/* Generated by the Nim Compiler v1.2.16 */
var framePtr = null;
var excHandler = 0;
var lastJSError = null;
if (typeof Int8Array === 'undefined') Int8Array = Array;
if (typeof Int16Array === 'undefined') Int16Array = Array;
if (typeof Int32Array === 'undefined') Int32Array = Array;
if (typeof Uint8Array === 'undefined') Uint8Array = Array;
if (typeof Uint16Array === 'undefined') Uint16Array = Array;
if (typeof Uint32Array === 'undefined') Uint32Array = Array;
if (typeof Float32Array === 'undefined') Float32Array = Array;
if (typeof Float64Array === 'undefined') Float64Array = Array;
var NTI163 = {size: 0,kind: 1,base: null,node: null,finalizer: null};
var NTI9681058 = {size: 0, kind: 18, base: null, node: null, finalizer: null};
var NTI6253 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
var NTI9840571 = {size: 0,kind: 24,base: null,node: null,finalizer: null};
var NTI622454 = {size: 0,kind: 25,base: null,node: null,finalizer: null};
var NTI622450 = {size: 0,kind: 25,base: null,node: null,finalizer: null};
var NTI622446 = {size: 0,kind: 25,base: null,node: null,finalizer: null};
var NTI622442 = {size: 0,kind: 25,base: null,node: null,finalizer: null};
var NTI622438 = {size: 0,kind: 25,base: null,node: null,finalizer: null};
var NTI622434 = {size: 0,kind: 25,base: null,node: null,finalizer: null};
var NTI622430 = {size: 0,kind: 25,base: null,node: null,finalizer: null};
var NTI622426 = {size: 0,kind: 25,base: null,node: null,finalizer: null};
var NTI622422 = {size: 0,kind: 25,base: null,node: null,finalizer: null};
var NTI622418 = {size: 0,kind: 25,base: null,node: null,finalizer: null};
var NTI622414 = {size: 0,kind: 25,base: null,node: null,finalizer: null};
var NTI622410 = {size: 0,kind: 25,base: null,node: null,finalizer: null};
var NTI622406 = {size: 0,kind: 25,base: null,node: null,finalizer: null};
var NTI622402 = {size: 0,kind: 25,base: null,node: null,finalizer: null};
var NTI622398 = {size: 0,kind: 25,base: null,node: null,finalizer: null};
var NTI622394 = {size: 0,kind: 25,base: null,node: null,finalizer: null};
var NTI622390 = {size: 0,kind: 25,base: null,node: null,finalizer: null};
var NTI622386 = {size: 0,kind: 25,base: null,node: null,finalizer: null};
var NTI622382 = {size: 0,kind: 25,base: null,node: null,finalizer: null};
var NTI622378 = {size: 0,kind: 25,base: null,node: null,finalizer: null};
var NTI622205 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
var NTI622289 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
var NTI622287 = {size: 0,kind: 22,base: null,node: null,finalizer: null};
var NTI622229 = {size: 0, kind: 14, base: null, node: null, finalizer: null};
var NTI622574 = {size: 0,kind: 24,base: null,node: null,finalizer: null};
var NTI622572 = {size: 0,kind: 24,base: null,node: null,finalizer: null};
var NTI622570 = {size: 0,kind: 24,base: null,node: null,finalizer: null};
var NTI622233 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
var NTI622231 = {size: 0,kind: 22,base: null,node: null,finalizer: null};
var NTI624105 = {size: 0,kind: 24,base: null,node: null,finalizer: null};
var NTI6241 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
var NTI6249 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
var NTI143 = {size: 0,kind: 31,base: null,node: null,finalizer: null};
var NTI160043 = {size: 0, kind: 18, base: null, node: null, finalizer: null};
var NTI6008 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
var NTI6286 = {size: 0,kind: 22,base: null,node: null,finalizer: null};
var NTI112 = {size: 0,kind: 28,base: null,node: null,finalizer: null};
var NTI114 = {size: 0,kind: 29,base: null,node: null,finalizer: null};
var NTI6281 = {size: 0,kind: 22,base: null,node: null,finalizer: null};
var NTI6217 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
var NTI6219 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
var NTI6233 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
var NTI6237 = {size: 0, kind: 17, base: null, node: null, finalizer: null};
var NNI6237 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []};
NTI6237.node = NNI6237;
var NNI6233 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []};
NTI6233.node = NNI6233;
var NNI6219 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []};
NTI6219.node = NNI6219;
NTI6281.base = NTI6217;
NTI6286.base = NTI6217;
var NNI6217 = {kind: 2, len: 5, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "parent", len: 0, typ: NTI6281, name: "parent", sons: null}, 
{kind: 1, offset: "name", len: 0, typ: NTI114, name: "name", sons: null}, 
{kind: 1, offset: "message", len: 0, typ: NTI112, name: "msg", sons: null}, 
{kind: 1, offset: "trace", len: 0, typ: NTI112, name: "trace", sons: null}, 
{kind: 1, offset: "up", len: 0, typ: NTI6286, name: "up", sons: null}]};
NTI6217.node = NNI6217;
var NNI6008 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []};
NTI6008.node = NNI6008;
NTI6217.base = NTI6008;
NTI6219.base = NTI6217;
NTI6233.base = NTI6219;
NTI6237.base = NTI6233;
var NNI160043 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "Field0", len: 0, typ: NTI114, name: "Field0", sons: null}, 
{kind: 1, offset: "Field1", len: 0, typ: NTI143, name: "Field1", sons: null}]};
NTI160043.node = NNI160043;
var NNI6249 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []};
NTI6249.node = NNI6249;
NTI6249.base = NTI6219;
var NNI6241 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []};
NTI6241.node = NNI6241;
NTI6241.base = NTI6219;
NTI622570.base = NTI622231;
NTI622572.base = NTI622231;
NTI622574.base = NTI622231;
var NNI622229 = {kind: 2, offset: 0, typ: null, name: null, len: 12, sons: {"1": {kind: 1, offset: 1, typ: NTI622229, name: "ElementNode", len: 0, sons: null}, 
"2": {kind: 1, offset: 2, typ: NTI622229, name: "AttributeNode", len: 0, sons: null}, 
"3": {kind: 1, offset: 3, typ: NTI622229, name: "TextNode", len: 0, sons: null}, 
"4": {kind: 1, offset: 4, typ: NTI622229, name: "CDATANode", len: 0, sons: null}, 
"5": {kind: 1, offset: 5, typ: NTI622229, name: "EntityRefNode", len: 0, sons: null}, 
"6": {kind: 1, offset: 6, typ: NTI622229, name: "EntityNode", len: 0, sons: null}, 
"7": {kind: 1, offset: 7, typ: NTI622229, name: "ProcessingInstructionNode", len: 0, sons: null}, 
"8": {kind: 1, offset: 8, typ: NTI622229, name: "CommentNode", len: 0, sons: null}, 
"9": {kind: 1, offset: 9, typ: NTI622229, name: "DocumentNode", len: 0, sons: null}, 
"10": {kind: 1, offset: 10, typ: NTI622229, name: "DocumentTypeNode", len: 0, sons: null}, 
"11": {kind: 1, offset: 11, typ: NTI622229, name: "DocumentFragmentNode", len: 0, sons: null}, 
"12": {kind: 1, offset: 12, typ: NTI622229, name: "NotationNode", len: 0, sons: null}}};
NTI622229.node = NNI622229;
var NNI622289 = {kind: 2, len: 100, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "background", len: 0, typ: NTI114, name: "background", sons: null}, 
{kind: 1, offset: "backgroundAttachment", len: 0, typ: NTI114, name: "backgroundAttachment", sons: null}, 
{kind: 1, offset: "backgroundColor", len: 0, typ: NTI114, name: "backgroundColor", sons: null}, 
{kind: 1, offset: "backgroundImage", len: 0, typ: NTI114, name: "backgroundImage", sons: null}, 
{kind: 1, offset: "backgroundPosition", len: 0, typ: NTI114, name: "backgroundPosition", sons: null}, 
{kind: 1, offset: "backgroundRepeat", len: 0, typ: NTI114, name: "backgroundRepeat", sons: null}, 
{kind: 1, offset: "backgroundSize", len: 0, typ: NTI114, name: "backgroundSize", sons: null}, 
{kind: 1, offset: "border", len: 0, typ: NTI114, name: "border", sons: null}, 
{kind: 1, offset: "borderBottom", len: 0, typ: NTI114, name: "borderBottom", sons: null}, 
{kind: 1, offset: "borderBottomColor", len: 0, typ: NTI114, name: "borderBottomColor", sons: null}, 
{kind: 1, offset: "borderBottomStyle", len: 0, typ: NTI114, name: "borderBottomStyle", sons: null}, 
{kind: 1, offset: "borderBottomWidth", len: 0, typ: NTI114, name: "borderBottomWidth", sons: null}, 
{kind: 1, offset: "borderColor", len: 0, typ: NTI114, name: "borderColor", sons: null}, 
{kind: 1, offset: "borderLeft", len: 0, typ: NTI114, name: "borderLeft", sons: null}, 
{kind: 1, offset: "borderLeftColor", len: 0, typ: NTI114, name: "borderLeftColor", sons: null}, 
{kind: 1, offset: "borderLeftStyle", len: 0, typ: NTI114, name: "borderLeftStyle", sons: null}, 
{kind: 1, offset: "borderLeftWidth", len: 0, typ: NTI114, name: "borderLeftWidth", sons: null}, 
{kind: 1, offset: "borderRadius", len: 0, typ: NTI114, name: "borderRadius", sons: null}, 
{kind: 1, offset: "borderRight", len: 0, typ: NTI114, name: "borderRight", sons: null}, 
{kind: 1, offset: "borderRightColor", len: 0, typ: NTI114, name: "borderRightColor", sons: null}, 
{kind: 1, offset: "borderRightStyle", len: 0, typ: NTI114, name: "borderRightStyle", sons: null}, 
{kind: 1, offset: "borderRightWidth", len: 0, typ: NTI114, name: "borderRightWidth", sons: null}, 
{kind: 1, offset: "borderStyle", len: 0, typ: NTI114, name: "borderStyle", sons: null}, 
{kind: 1, offset: "borderTop", len: 0, typ: NTI114, name: "borderTop", sons: null}, 
{kind: 1, offset: "borderTopColor", len: 0, typ: NTI114, name: "borderTopColor", sons: null}, 
{kind: 1, offset: "borderTopStyle", len: 0, typ: NTI114, name: "borderTopStyle", sons: null}, 
{kind: 1, offset: "borderTopWidth", len: 0, typ: NTI114, name: "borderTopWidth", sons: null}, 
{kind: 1, offset: "borderWidth", len: 0, typ: NTI114, name: "borderWidth", sons: null}, 
{kind: 1, offset: "bottom", len: 0, typ: NTI114, name: "bottom", sons: null}, 
{kind: 1, offset: "boxSizing", len: 0, typ: NTI114, name: "boxSizing", sons: null}, 
{kind: 1, offset: "boxShadow", len: 0, typ: NTI114, name: "boxShadow", sons: null}, 
{kind: 1, offset: "captionSide", len: 0, typ: NTI114, name: "captionSide", sons: null}, 
{kind: 1, offset: "clear", len: 0, typ: NTI114, name: "clear", sons: null}, 
{kind: 1, offset: "clip", len: 0, typ: NTI114, name: "clip", sons: null}, 
{kind: 1, offset: "color", len: 0, typ: NTI114, name: "color", sons: null}, 
{kind: 1, offset: "cursor", len: 0, typ: NTI114, name: "cursor", sons: null}, 
{kind: 1, offset: "direction", len: 0, typ: NTI114, name: "direction", sons: null}, 
{kind: 1, offset: "display", len: 0, typ: NTI114, name: "display", sons: null}, 
{kind: 1, offset: "emptyCells", len: 0, typ: NTI114, name: "emptyCells", sons: null}, 
{kind: 1, offset: "cssFloat", len: 0, typ: NTI114, name: "cssFloat", sons: null}, 
{kind: 1, offset: "font", len: 0, typ: NTI114, name: "font", sons: null}, 
{kind: 1, offset: "fontFamily", len: 0, typ: NTI114, name: "fontFamily", sons: null}, 
{kind: 1, offset: "fontSize", len: 0, typ: NTI114, name: "fontSize", sons: null}, 
{kind: 1, offset: "fontStretch", len: 0, typ: NTI114, name: "fontStretch", sons: null}, 
{kind: 1, offset: "fontStyle", len: 0, typ: NTI114, name: "fontStyle", sons: null}, 
{kind: 1, offset: "fontVariant", len: 0, typ: NTI114, name: "fontVariant", sons: null}, 
{kind: 1, offset: "fontWeight", len: 0, typ: NTI114, name: "fontWeight", sons: null}, 
{kind: 1, offset: "height", len: 0, typ: NTI114, name: "height", sons: null}, 
{kind: 1, offset: "left", len: 0, typ: NTI114, name: "left", sons: null}, 
{kind: 1, offset: "letterSpacing", len: 0, typ: NTI114, name: "letterSpacing", sons: null}, 
{kind: 1, offset: "lineHeight", len: 0, typ: NTI114, name: "lineHeight", sons: null}, 
{kind: 1, offset: "listStyle", len: 0, typ: NTI114, name: "listStyle", sons: null}, 
{kind: 1, offset: "listStyleImage", len: 0, typ: NTI114, name: "listStyleImage", sons: null}, 
{kind: 1, offset: "listStylePosition", len: 0, typ: NTI114, name: "listStylePosition", sons: null}, 
{kind: 1, offset: "listStyleType", len: 0, typ: NTI114, name: "listStyleType", sons: null}, 
{kind: 1, offset: "margin", len: 0, typ: NTI114, name: "margin", sons: null}, 
{kind: 1, offset: "marginBottom", len: 0, typ: NTI114, name: "marginBottom", sons: null}, 
{kind: 1, offset: "marginLeft", len: 0, typ: NTI114, name: "marginLeft", sons: null}, 
{kind: 1, offset: "marginRight", len: 0, typ: NTI114, name: "marginRight", sons: null}, 
{kind: 1, offset: "marginTop", len: 0, typ: NTI114, name: "marginTop", sons: null}, 
{kind: 1, offset: "maxHeight", len: 0, typ: NTI114, name: "maxHeight", sons: null}, 
{kind: 1, offset: "maxWidth", len: 0, typ: NTI114, name: "maxWidth", sons: null}, 
{kind: 1, offset: "minHeight", len: 0, typ: NTI114, name: "minHeight", sons: null}, 
{kind: 1, offset: "minWidth", len: 0, typ: NTI114, name: "minWidth", sons: null}, 
{kind: 1, offset: "opacity", len: 0, typ: NTI114, name: "opacity", sons: null}, 
{kind: 1, offset: "outline", len: 0, typ: NTI114, name: "outline", sons: null}, 
{kind: 1, offset: "overflow", len: 0, typ: NTI114, name: "overflow", sons: null}, 
{kind: 1, offset: "overflowX", len: 0, typ: NTI114, name: "overflowX", sons: null}, 
{kind: 1, offset: "overflowY", len: 0, typ: NTI114, name: "overflowY", sons: null}, 
{kind: 1, offset: "padding", len: 0, typ: NTI114, name: "padding", sons: null}, 
{kind: 1, offset: "paddingBottom", len: 0, typ: NTI114, name: "paddingBottom", sons: null}, 
{kind: 1, offset: "paddingLeft", len: 0, typ: NTI114, name: "paddingLeft", sons: null}, 
{kind: 1, offset: "paddingRight", len: 0, typ: NTI114, name: "paddingRight", sons: null}, 
{kind: 1, offset: "paddingTop", len: 0, typ: NTI114, name: "paddingTop", sons: null}, 
{kind: 1, offset: "pageBreakAfter", len: 0, typ: NTI114, name: "pageBreakAfter", sons: null}, 
{kind: 1, offset: "pageBreakBefore", len: 0, typ: NTI114, name: "pageBreakBefore", sons: null}, 
{kind: 1, offset: "pointerEvents", len: 0, typ: NTI114, name: "pointerEvents", sons: null}, 
{kind: 1, offset: "position", len: 0, typ: NTI114, name: "position", sons: null}, 
{kind: 1, offset: "resize", len: 0, typ: NTI114, name: "resize", sons: null}, 
{kind: 1, offset: "right", len: 0, typ: NTI114, name: "right", sons: null}, 
{kind: 1, offset: "scrollbar3dLightColor", len: 0, typ: NTI114, name: "scrollbar3dLightColor", sons: null}, 
{kind: 1, offset: "scrollbarArrowColor", len: 0, typ: NTI114, name: "scrollbarArrowColor", sons: null}, 
{kind: 1, offset: "scrollbarBaseColor", len: 0, typ: NTI114, name: "scrollbarBaseColor", sons: null}, 
{kind: 1, offset: "scrollbarDarkshadowColor", len: 0, typ: NTI114, name: "scrollbarDarkshadowColor", sons: null}, 
{kind: 1, offset: "scrollbarFaceColor", len: 0, typ: NTI114, name: "scrollbarFaceColor", sons: null}, 
{kind: 1, offset: "scrollbarHighlightColor", len: 0, typ: NTI114, name: "scrollbarHighlightColor", sons: null}, 
{kind: 1, offset: "scrollbarShadowColor", len: 0, typ: NTI114, name: "scrollbarShadowColor", sons: null}, 
{kind: 1, offset: "scrollbarTrackColor", len: 0, typ: NTI114, name: "scrollbarTrackColor", sons: null}, 
{kind: 1, offset: "tableLayout", len: 0, typ: NTI114, name: "tableLayout", sons: null}, 
{kind: 1, offset: "textAlign", len: 0, typ: NTI114, name: "textAlign", sons: null}, 
{kind: 1, offset: "textDecoration", len: 0, typ: NTI114, name: "textDecoration", sons: null}, 
{kind: 1, offset: "textIndent", len: 0, typ: NTI114, name: "textIndent", sons: null}, 
{kind: 1, offset: "textTransform", len: 0, typ: NTI114, name: "textTransform", sons: null}, 
{kind: 1, offset: "transform", len: 0, typ: NTI114, name: "transform", sons: null}, 
{kind: 1, offset: "top", len: 0, typ: NTI114, name: "top", sons: null}, 
{kind: 1, offset: "verticalAlign", len: 0, typ: NTI114, name: "verticalAlign", sons: null}, 
{kind: 1, offset: "visibility", len: 0, typ: NTI114, name: "visibility", sons: null}, 
{kind: 1, offset: "width", len: 0, typ: NTI114, name: "width", sons: null}, 
{kind: 1, offset: "wordSpacing", len: 0, typ: NTI114, name: "wordSpacing", sons: null}, 
{kind: 1, offset: "zIndex", len: 0, typ: NTI143, name: "zIndex", sons: null}]};
NTI622289.node = NNI622289;
NTI622289.base = NTI6008;
NTI622287.base = NTI622289;
var NNI622233 = {kind: 2, len: 16, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "attributes", len: 0, typ: NTI622570, name: "attributes", sons: null}, 
{kind: 1, offset: "childNodes", len: 0, typ: NTI622572, name: "childNodes", sons: null}, 
{kind: 1, offset: "children", len: 0, typ: NTI622574, name: "children", sons: null}, 
{kind: 1, offset: "data", len: 0, typ: NTI114, name: "data", sons: null}, 
{kind: 1, offset: "firstChild", len: 0, typ: NTI622231, name: "firstChild", sons: null}, 
{kind: 1, offset: "lastChild", len: 0, typ: NTI622231, name: "lastChild", sons: null}, 
{kind: 1, offset: "nextSibling", len: 0, typ: NTI622231, name: "nextSibling", sons: null}, 
{kind: 1, offset: "nodeName", len: 0, typ: NTI114, name: "nodeName", sons: null}, 
{kind: 1, offset: "nodeType", len: 0, typ: NTI622229, name: "nodeType", sons: null}, 
{kind: 1, offset: "nodeValue", len: 0, typ: NTI114, name: "nodeValue", sons: null}, 
{kind: 1, offset: "parentNode", len: 0, typ: NTI622231, name: "parentNode", sons: null}, 
{kind: 1, offset: "previousSibling", len: 0, typ: NTI622231, name: "previousSibling", sons: null}, 
{kind: 1, offset: "innerHTML", len: 0, typ: NTI114, name: "innerHTML", sons: null}, 
{kind: 1, offset: "innerText", len: 0, typ: NTI114, name: "innerText", sons: null}, 
{kind: 1, offset: "textContent", len: 0, typ: NTI114, name: "textContent", sons: null}, 
{kind: 1, offset: "style", len: 0, typ: NTI622287, name: "style", sons: null}]};
NTI622233.node = NNI622233;
var NNI622205 = {kind: 2, len: 20, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "onabort", len: 0, typ: NTI622378, name: "onabort", sons: null}, 
{kind: 1, offset: "onblur", len: 0, typ: NTI622382, name: "onblur", sons: null}, 
{kind: 1, offset: "onchange", len: 0, typ: NTI622386, name: "onchange", sons: null}, 
{kind: 1, offset: "onclick", len: 0, typ: NTI622390, name: "onclick", sons: null}, 
{kind: 1, offset: "ondblclick", len: 0, typ: NTI622394, name: "ondblclick", sons: null}, 
{kind: 1, offset: "onerror", len: 0, typ: NTI622398, name: "onerror", sons: null}, 
{kind: 1, offset: "onfocus", len: 0, typ: NTI622402, name: "onfocus", sons: null}, 
{kind: 1, offset: "onkeydown", len: 0, typ: NTI622406, name: "onkeydown", sons: null}, 
{kind: 1, offset: "onkeypress", len: 0, typ: NTI622410, name: "onkeypress", sons: null}, 
{kind: 1, offset: "onkeyup", len: 0, typ: NTI622414, name: "onkeyup", sons: null}, 
{kind: 1, offset: "onload", len: 0, typ: NTI622418, name: "onload", sons: null}, 
{kind: 1, offset: "onmousedown", len: 0, typ: NTI622422, name: "onmousedown", sons: null}, 
{kind: 1, offset: "onmousemove", len: 0, typ: NTI622426, name: "onmousemove", sons: null}, 
{kind: 1, offset: "onmouseout", len: 0, typ: NTI622430, name: "onmouseout", sons: null}, 
{kind: 1, offset: "onmouseover", len: 0, typ: NTI622434, name: "onmouseover", sons: null}, 
{kind: 1, offset: "onmouseup", len: 0, typ: NTI622438, name: "onmouseup", sons: null}, 
{kind: 1, offset: "onreset", len: 0, typ: NTI622442, name: "onreset", sons: null}, 
{kind: 1, offset: "onselect", len: 0, typ: NTI622446, name: "onselect", sons: null}, 
{kind: 1, offset: "onsubmit", len: 0, typ: NTI622450, name: "onsubmit", sons: null}, 
{kind: 1, offset: "onunload", len: 0, typ: NTI622454, name: "onunload", sons: null}]};
NTI622205.node = NNI622205;
NTI622205.base = NTI6008;
NTI622233.base = NTI622205;
NTI622231.base = NTI622233;
NTI624105.base = NTI622231;
NTI9840571.base = NTI114;
var NNI6253 = {kind: 2, len: 0, offset: 0, typ: null, name: null, sons: []};
NTI6253.node = NNI6253;
NTI6253.base = NTI6219;
var NNI9681058 = {kind: 2, len: 2, offset: 0, typ: null, name: null, sons: [{kind: 1, offset: "Field0", len: 0, typ: NTI143, name: "Field0", sons: null}, 
{kind: 1, offset: "Field1", len: 0, typ: NTI163, name: "Field1", sons: null}]};
NTI9681058.node = NNI9681058;
function makeNimstrLit(c_225062) {
      var ln = c_225062.length;
  var result = new Array(ln);
  for (var i = 0; i < ln; ++i) {
    result[i] = c_225062.charCodeAt(i);
  }
  return result;
  

  
}
function arrayConstr(len_250067, value_250068, typ_250069) {
        var result = new Array(len_250067);
    for (var i = 0; i < len_250067; ++i) result[i] = nimCopy(null, value_250068, typ_250069);
    return result;
  

  
}
function setConstr() {
        var result = {};
    for (var i = 0; i < arguments.length; ++i) {
      var x = arguments[i];
      if (typeof(x) == "object") {
        for (var j = x[0]; j <= x[1]; ++j) {
          result[j] = true;
        }
      } else {
        result[x] = true;
      }
    }
    return result;
  

  
}
var ConstSet1 = setConstr(17, 16, 4, 18, 27, 19, 23, 22, 21);
function nimCopy(dest_240023, src_240024, ti_240025) {
  var result_245219 = null;

    switch (ti_240025.kind) {
    case 21:
    case 22:
    case 23:
    case 5:
      if (!(is_fat_pointer_235401(ti_240025))) {
      result_245219 = src_240024;
      }
      else {
        result_245219 = [src_240024[0], src_240024[1]];
      }
      
      break;
    case 19:
            if (dest_240023 === null || dest_240023 === undefined) {
        dest_240023 = {};
      }
      else {
        for (var key in dest_240023) { delete dest_240023[key]; }
      }
      for (var key in src_240024) { dest_240023[key] = src_240024[key]; }
      result_245219 = dest_240023;
    
      break;
    case 18:
    case 17:
      if (!((ti_240025.base == null))) {
      result_245219 = nimCopy(dest_240023, src_240024, ti_240025.base);
      }
      else {
      if ((ti_240025.kind == 17)) {
      result_245219 = (dest_240023 === null || dest_240023 === undefined) ? {m_type: ti_240025} : dest_240023;
      }
      else {
        result_245219 = (dest_240023 === null || dest_240023 === undefined) ? {} : dest_240023;
      }
      }
      nimCopyAux(result_245219, src_240024, ti_240025.node);
      break;
    case 24:
    case 4:
    case 27:
    case 16:
            if (src_240024 === null) {
        result_245219 = null;
      }
      else {
        if (dest_240023 === null || dest_240023 === undefined) {
          dest_240023 = new Array(src_240024.length);
        }
        else {
          dest_240023.length = src_240024.length;
        }
        result_245219 = dest_240023;
        for (var i = 0; i < src_240024.length; ++i) {
          result_245219[i] = nimCopy(result_245219[i], src_240024[i], ti_240025.base);
        }
      }
    
      break;
    case 28:
            if (src_240024 !== null) {
        result_245219 = src_240024.slice(0);
      }
    
      break;
    default: 
      result_245219 = src_240024;
      break;
    }

  return result_245219;

}
function cstrToNimstr(c_225079) {
      var ln = c_225079.length;
  var result = new Array(ln);
  var r = 0;
  for (var i = 0; i < ln; ++i) {
    var ch = c_225079.charCodeAt(i);

    if (ch < 128) {
      result[r] = ch;
    }
    else {
      if (ch < 2048) {
        result[r] = (ch >> 6) | 192;
      }
      else {
        if (ch < 55296 || ch >= 57344) {
          result[r] = (ch >> 12) | 224;
        }
        else {
            ++i;
            ch = 65536 + (((ch & 1023) << 10) | (c_225079.charCodeAt(i) & 1023));
            result[r] = (ch >> 18) | 240;
            ++r;
            result[r] = ((ch >> 12) & 63) | 128;
        }
        ++r;
        result[r] = ((ch >> 6) & 63) | 128;
      }
      ++r;
      result[r] = (ch & 63) | 128;
    }
    ++r;
  }
  return result;
  

  
}
function toJSStr(s_225096) {
                    var Tmp5;
            var Tmp7;

  var result_225097 = null;

    var res_225169 = new_seq_225120((s_225096 != null ? s_225096.length : 0));
    var i_225171 = 0;
    var j_225173 = 0;
    L1: do {
        L2: while (true) {
        if (!(i_225171 < (s_225096 != null ? s_225096.length : 0))) break L2;
          var c_225174 = s_225096[i_225171];
          if ((c_225174 < 128)) {
          res_225169[j_225173] = String.fromCharCode(c_225174);
          i_225171 += 1;
          }
          else {
            var helper_225197 = new_seq_225120(0);
            L3: do {
                L4: while (true) {
                if (!true) break L4;
                  var code_225198 = c_225174.toString(16);
                  if (((code_225198 != null ? code_225198.length : 0) == 1)) {
                  if (helper_225197 != null) { helper_225197.push("%0"); } else { helper_225197 = ["%0"]; };
                  }
                  else {
                  if (helper_225197 != null) { helper_225197.push("%"); } else { helper_225197 = ["%"]; };
                  }
                  
                  if (helper_225197 != null) { helper_225197.push(code_225198); } else { helper_225197 = [code_225198]; };
                  i_225171 += 1;
                    if (((s_225096 != null ? s_225096.length : 0) <= i_225171)) Tmp5 = true; else {                      Tmp5 = (s_225096[i_225171] < 128);                    }                  if (Tmp5) {
                  break L3;
                  }
                  
                  c_225174 = s_225096[i_225171];
                }
            } while(false);
++excHandler;
            Tmp7 = framePtr;
            try {
            res_225169[j_225173] = decodeURIComponent(helper_225197.join(""));
--excHandler;
} catch (EXC) {
 var prevJSError = lastJSError;
 lastJSError = EXC;
 --excHandler;
            framePtr = Tmp7;
            res_225169[j_225173] = helper_225197.join("");
            lastJSError = prevJSError;
            } finally {
            framePtr = Tmp7;
            }
          }
          
          j_225173 += 1;
        }
    } while(false);
    if (res_225169 === null) res_225169 = [];
               if (res_225169.length < j_225173) { for (var i=res_225169.length;i<j_225173;++i) res_225169.push(null); }
               else { res_225169.length = j_225173; };
    result_225097 = res_225169.join("");

  return result_225097;

}
function raiseException(e_190218, ename_190219) {
    e_190218.name = ename_190219;
    if ((excHandler == 0)) {
    unhandledException(e_190218);
    }
    
    e_190218.trace = nimCopy(null, raw_write_stack_trace_180059(), NTI112);
    throw e_190218;

  
}
function addInt(a_230403, b_230404) {
        var result = a_230403 + b_230404;
    if (result > 2147483647 || result < -2147483648) raiseOverflow();
    return result;
  

  
}
function chckIndx(i_250086, a_250087, b_250088) {
      var Tmp1;

  var result_250089 = 0;

  BeforeRet: do {
      if (!(a_250087 <= i_250086)) Tmp1 = false; else {        Tmp1 = (i_250086 <= b_250088);      }    if (Tmp1) {
    result_250089 = i_250086;
    break BeforeRet;
    }
    else {
    raiseIndexError(i_250086, a_250087, b_250088);
    }
    
  } while (false);

  return result_250089;

}
function subInt(a_230421, b_230422) {
        var result = a_230421 - b_230422;
    if (result > 2147483647 || result < -2147483648) raiseOverflow();
    return result;
  

  
}
var ConstSet2 = setConstr([65, 90]);
function chckRange(i_255016, a_255017, b_255018) {
      var Tmp1;

  var result_255019 = 0;

  BeforeRet: do {
      if (!(a_255017 <= i_255016)) Tmp1 = false; else {        Tmp1 = (i_255016 <= b_255018);      }    if (Tmp1) {
    result_255019 = i_255016;
    break BeforeRet;
    }
    else {
    raiseRangeError();
    }
    
  } while (false);

  return result_255019;

}
var ConstSet3 = setConstr(95, 32, 46);
var ConstSet4 = setConstr(95, 32, 46);
function mulInt(a_230439, b_230440) {
        var result = a_230439 * b_230440;
    if (result > 2147483647 || result < -2147483648) raiseOverflow();
    return result;
  

  
}
var ConstSet5 = setConstr([97, 122]);
var ConstSet6 = setConstr([65, 90], [97, 122]);
var ConstSet7 = setConstr([97, 122]);
var ConstSet8 = setConstr([65, 90]);
var ConstSet9 = setConstr([65, 90], [97, 122]);
function nimMax(a_230821, b_230822) {
    var Tmp1;

  var result_230823 = 0;

  BeforeRet: do {
    if ((b_230822 <= a_230821)) {
    Tmp1 = a_230821;
    }
    else {
    Tmp1 = b_230822;
    }
    
    result_230823 = Tmp1;
    break BeforeRet;
  } while (false);

  return result_230823;

}
function nimMin(a_230803, b_230804) {
    var Tmp1;

  var result_230805 = 0;

  BeforeRet: do {
    if ((a_230803 <= b_230804)) {
    Tmp1 = a_230803;
    }
    else {
    Tmp1 = b_230804;
    }
    
    result_230805 = Tmp1;
    break BeforeRet;
  } while (false);

  return result_230805;

}
var nim_program_result = 0;
var global_raise_hook_142018 = [null];
var local_raise_hook_142023 = [null];
var out_of_mem_hook_142026 = [null];
var unhandled_exception_hook_142031 = [null];
if (!Math.trunc) {
  Math.trunc = function(v) {
    v = +v;
    if (!isFinite(v)) return v;
    return (v - v % 1) || (v < 0 ? -0 : v === 0 ? v : 0);
  };
}

var alternative_9840319 = [null];
function add_142042(x_142045, x_142045_Idx, y_142046) {
          if (x_142045[x_142045_Idx] === null) { x_142045[x_142045_Idx] = []; }
      var off = x_142045[x_142045_Idx].length;
      x_142045[x_142045_Idx].length += y_142046.length;
      for (var i = 0; i < y_142046.length; ++i) {
        x_142045[x_142045_Idx][off+i] = y_142046.charCodeAt(i);
      }
    

  
}
function is_fat_pointer_235401(ti_235403) {
  var result_235404 = false;

  BeforeRet: do {
    result_235404 = !((ConstSet1[ti_235403.base.kind] != undefined));
    break BeforeRet;
  } while (false);

  return result_235404;

}
function nimCopyAux(dest_240028, src_240029, n_240031) {
    switch (n_240031.kind) {
    case 0:
      break;
    case 1:
            dest_240028[n_240031.offset] = nimCopy(dest_240028[n_240031.offset], src_240029[n_240031.offset], n_240031.typ);
    
      break;
    case 2:
          for (var i = 0; i < n_240031.sons.length; i++) {
      nimCopyAux(dest_240028, src_240029, n_240031.sons[i]);
    }
    
      break;
    case 3:
            dest_240028[n_240031.offset] = nimCopy(dest_240028[n_240031.offset], src_240029[n_240031.offset], n_240031.typ);
      for (var i = 0; i < n_240031.sons.length; ++i) {
        nimCopyAux(dest_240028, src_240029, n_240031.sons[i][1]);
      }
    
      break;
    }

  
}
function aux_write_stack_trace_160038(f_160040) {
          var Tmp3;

  var result_160041 = [null];

    var it_160049 = f_160040;
    var i_160051 = 0;
    var total_160053 = 0;
    var temp_frames_160060 = arrayConstr(64, {Field0: null, Field1: 0}, NTI160043);
    L1: do {
        L2: while (true) {
          if (!!((it_160049 == null))) Tmp3 = false; else {            Tmp3 = (i_160051 <= 63);          }        if (!Tmp3) break L2;
          temp_frames_160060[i_160051].Field0 = it_160049.procname;
          temp_frames_160060[i_160051].Field1 = it_160049.line;
          i_160051 += 1;
          total_160053 += 1;
          it_160049 = it_160049.prev;
        }
    } while(false);
    L4: do {
        L5: while (true) {
        if (!!((it_160049 == null))) break L5;
          total_160053 += 1;
          it_160049 = it_160049.prev;
        }
    } while(false);
    result_160041[0] = nimCopy(null, [], NTI112);
    if (!((total_160053 == i_160051))) {
    if (result_160041[0] != null) { result_160041[0] = (result_160041[0]).concat(makeNimstrLit("(")); } else { result_160041[0] = makeNimstrLit("("); };
    if (result_160041[0] != null) { result_160041[0] = (result_160041[0]).concat(cstrToNimstr(((total_160053 - i_160051))+"")); } else { result_160041[0] = cstrToNimstr(((total_160053 - i_160051))+"").slice(); };
    if (result_160041[0] != null) { result_160041[0] = (result_160041[0]).concat(makeNimstrLit(" calls omitted) ...\x0A")); } else { result_160041[0] = makeNimstrLit(" calls omitted) ...\x0A"); };
    }
    
    L6: do {
      var j_175236 = 0;
      var colontmp__9840463 = 0;
      colontmp__9840463 = (i_160051 - 1);
      var res_9840468 = colontmp__9840463;
      L7: do {
          L8: while (true) {
          if (!(0 <= res_9840468)) break L8;
            j_175236 = res_9840468;
            add_142042(result_160041, 0, temp_frames_160060[j_175236].Field0);
            if ((0 < temp_frames_160060[j_175236].Field1)) {
            if (result_160041[0] != null) { result_160041[0] = (result_160041[0]).concat(makeNimstrLit(", line: ")); } else { result_160041[0] = makeNimstrLit(", line: "); };
            if (result_160041[0] != null) { result_160041[0] = (result_160041[0]).concat(cstrToNimstr((temp_frames_160060[j_175236].Field1)+"")); } else { result_160041[0] = cstrToNimstr((temp_frames_160060[j_175236].Field1)+"").slice(); };
            }
            
            if (result_160041[0] != null) { result_160041[0] = (result_160041[0]).concat(makeNimstrLit("\x0A")); } else { result_160041[0] = makeNimstrLit("\x0A"); };
            res_9840468 -= 1;
          }
      } while(false);
    } while(false);

  return result_160041[0];

}
function raw_write_stack_trace_180059() {
  var result_180061 = null;

    if (!((framePtr == null))) {
    result_180061 = nimCopy(null, (makeNimstrLit("Traceback (most recent call last)\x0A") || []).concat(aux_write_stack_trace_160038(framePtr) || []), NTI112);
    }
    else {
      result_180061 = nimCopy(null, makeNimstrLit("No stack traceback available\x0A"), NTI112);
    }
    

  return result_180061;

}
function new_seq_225120(len_225123) {
  var result_225125 = null;

  var F={procname:"newSeq.newSeq",prev:framePtr,filename:"system.nim",line:0};
  framePtr = F;
    F.line = 643;
    result_225125 = new Array(len_225123); for (var i=0;i<len_225123;++i) {result_225125[i]=null;}  framePtr = F.prev;

  return result_225125;

}
function unhandledException(e_185059) {
    var buf_185060 = [[]];
    if (!(((e_185059.message != null ? e_185059.message.length : 0) == 0))) {
    if (buf_185060[0] != null) { buf_185060[0] = (buf_185060[0]).concat(makeNimstrLit("Error: unhandled exception: ")); } else { buf_185060[0] = makeNimstrLit("Error: unhandled exception: "); };
    if (buf_185060[0] != null) { buf_185060[0] = (buf_185060[0]).concat(e_185059.message); } else { buf_185060[0] = e_185059.message.slice(); };
    }
    else {
    if (buf_185060[0] != null) { buf_185060[0] = (buf_185060[0]).concat(makeNimstrLit("Error: unhandled exception")); } else { buf_185060[0] = makeNimstrLit("Error: unhandled exception"); };
    }
    
    if (buf_185060[0] != null) { buf_185060[0] = (buf_185060[0]).concat(makeNimstrLit(" [")); } else { buf_185060[0] = makeNimstrLit(" ["); };
    add_142042(buf_185060, 0, e_185059.name);
    if (buf_185060[0] != null) { buf_185060[0] = (buf_185060[0]).concat(makeNimstrLit("]\x0A")); } else { buf_185060[0] = makeNimstrLit("]\x0A"); };
    if (buf_185060[0] != null) { buf_185060[0] = (buf_185060[0]).concat(raw_write_stack_trace_180059()); } else { buf_185060[0] = raw_write_stack_trace_180059().slice(); };
    var cbuf_190201 = toJSStr(buf_185060[0]);
    framePtr = null;
      if (typeof(Error) !== "undefined") {
    throw new Error(cbuf_190201);
  }
  else {
    throw cbuf_190201;
  }
  

  
}
function raiseOverflow() {
    raiseException({message: makeNimstrLit("over- or underflow"), parent: null, m_type: NTI6237, name: null, trace: null, up: null}, "OverflowError");

  
}
function is_whitespace_9815101(text_9815103) {
         return !/[^\s]/.test(text_9815103);
  

  
}
function is_whitespace_9815118(x_9815120) {
    var Tmp1;
    var Tmp2;

  var result_9815121 = false;

  var F={procname:"dochack.isWhitespace",prev:framePtr,filename:"dochack.nim",line:0};
  framePtr = F;
    F.line = 134;
    if (!(x_9815120.nodeName == "#text")) Tmp2 = false; else {      Tmp2 = is_whitespace_9815101(x_9815120.textContent);    }    if (Tmp2) Tmp1 = true; else {      Tmp1 = (x_9815120.nodeName == "#comment");    }    result_9815121 = Tmp1;
  framePtr = F.prev;

  return result_9815121;

}
function raiseIndexError(i_210047, a_210048, b_210049) {
    var Tmp1;

    if ((b_210049 < a_210048)) {
    Tmp1 = makeNimstrLit("index out of bounds, the container is empty");
    }
    else {
    Tmp1 = (makeNimstrLit("index ") || []).concat(cstrToNimstr((i_210047)+"") || [],makeNimstrLit(" not in ") || [],cstrToNimstr((a_210048)+"") || [],makeNimstrLit(" .. ") || [],cstrToNimstr((b_210049)+"") || []);
    }
    
    raiseException({message: nimCopy(null, Tmp1, NTI112), parent: null, m_type: NTI6249, name: null, trace: null, up: null}, "IndexError");

  
}
function to_toc_9815135(x_9815137, father_9815138) {
                var Tmp5;
            var Tmp6;
            var Tmp7;
            var Tmp8;
      var Tmp15;

  var F={procname:"dochack.toToc",prev:framePtr,filename:"dochack.nim",line:0};
  framePtr = F;
    if ((x_9815137.nodeName == "UL")) {
    F.line = 139;
    var f_9815159 = {heading: null, kids: [], sortId: (father_9815138.kids != null ? father_9815138.kids.length : 0), doSort: false};
    F.line = 140;
    var i_9815161 = 0;
    L1: do {
      F.line = 141;
        L2: while (true) {
        if (!(i_9815161 < x_9815137.childNodes.length)) break L2;
          F.line = 142;
          var nxt_9815162 = addInt(i_9815161, 1);
          L3: do {
            F.line = 143;
              L4: while (true) {
                if (!(nxt_9815162 < x_9815137.childNodes.length)) Tmp5 = false; else {                  Tmp5 = is_whitespace_9815118(x_9815137.childNodes[nxt_9815162]);                }              if (!Tmp5) break L4;
                F.line = 144;
                nxt_9815162 = addInt(nxt_9815162, 1);
              }
          } while(false);
            if (!(nxt_9815162 < x_9815137.childNodes.length)) Tmp8 = false; else {              Tmp8 = (x_9815137.childNodes[i_9815161].nodeName == "LI");            }            if (!Tmp8) Tmp7 = false; else {              Tmp7 = (x_9815137.childNodes[i_9815161].childNodes.length == 1);            }            if (!Tmp7) Tmp6 = false; else {              Tmp6 = (x_9815137.childNodes[nxt_9815162].nodeName == "UL");            }          if (Tmp6) {
          F.line = 147;
          var e_9815189 = {heading: x_9815137.childNodes[i_9815161].childNodes[0], kids: [], sortId: (f_9815159.kids != null ? f_9815159.kids.length : 0), doSort: false};
          F.line = 148;
          var it_9815190 = x_9815137.childNodes[nxt_9815162];
          L9: do {
            F.line = 149;
            var j_9815198 = 0;
            F.line = 104;
            var colontmp__9840442 = 0;
            F.line = 149;
            colontmp__9840442 = it_9815190.childNodes.length;
            F.line = 106;
            var i_9840443 = 0;
            L10: do {
              F.line = 107;
                L11: while (true) {
                if (!(i_9840443 < colontmp__9840442)) break L11;
                  F.line = 149;
                  j_9815198 = i_9840443;
                  F.line = 150;
                  to_toc_9815135(it_9815190.childNodes[j_9815198], e_9815189);
                  F.line = 109;
                  i_9840443 = addInt(i_9840443, 1);
                }
            } while(false);
          } while(false);
          F.line = 151;
          if (f_9815159.kids != null) { f_9815159.kids.push(e_9815189); } else { f_9815159.kids = [e_9815189]; };
          F.line = 152;
          i_9815161 = addInt(nxt_9815162, 1);
          }
          else {
            F.line = 154;
            to_toc_9815135(x_9815137.childNodes[i_9815161], f_9815159);
            F.line = 155;
            i_9815161 = addInt(i_9815161, 1);
          }
          
        }
    } while(false);
    F.line = 156;
    if (father_9815138.kids != null) { father_9815138.kids.push(f_9815159); } else { father_9815138.kids = [f_9815159]; };
    }
    else {
    if (is_whitespace_9815118(x_9815137)) {
    }
    else {
    if ((x_9815137.nodeName == "LI")) {
    F.line = 160;
    var idx_9815235 = [];
    L12: do {
      F.line = 161;
      var i_9815243 = 0;
      F.line = 104;
      var colontmp__9840446 = 0;
      F.line = 161;
      colontmp__9840446 = x_9815137.childNodes.length;
      F.line = 106;
      var i_9840447 = 0;
      L13: do {
        F.line = 107;
          L14: while (true) {
          if (!(i_9840447 < colontmp__9840446)) break L14;
            F.line = 161;
            i_9815243 = i_9840447;
            if (!(is_whitespace_9815118(x_9815137.childNodes[i_9815243]))) {
            F.line = 162;
            if (idx_9815235 != null) { idx_9815235.push(i_9815243); } else { idx_9815235 = [i_9815243]; };
            }
            
            F.line = 109;
            i_9840447 = addInt(i_9840447, 1);
          }
      } while(false);
    } while(false);
      if (!((idx_9815235 != null ? idx_9815235.length : 0) == 2)) Tmp15 = false; else {        Tmp15 = (x_9815137.childNodes[idx_9815235[chckIndx(1, 0, (idx_9815235 != null ? idx_9815235.length : 0)+0-1)-0]].nodeName == "UL");      }    if (Tmp15) {
    F.line = 164;
    var e_9815276 = {heading: x_9815137.childNodes[idx_9815235[chckIndx(0, 0, (idx_9815235 != null ? idx_9815235.length : 0)+0-1)-0]], kids: [], sortId: (father_9815138.kids != null ? father_9815138.kids.length : 0), doSort: false};
    F.line = 166;
    var it_9815277 = x_9815137.childNodes[idx_9815235[chckIndx(1, 0, (idx_9815235 != null ? idx_9815235.length : 0)+0-1)-0]];
    L16: do {
      F.line = 167;
      var j_9815285 = 0;
      F.line = 104;
      var colontmp__9840451 = 0;
      F.line = 167;
      colontmp__9840451 = it_9815277.childNodes.length;
      F.line = 106;
      var i_9840452 = 0;
      L17: do {
        F.line = 107;
          L18: while (true) {
          if (!(i_9840452 < colontmp__9840451)) break L18;
            F.line = 167;
            j_9815285 = i_9840452;
            F.line = 168;
            to_toc_9815135(it_9815277.childNodes[j_9815285], e_9815276);
            F.line = 109;
            i_9840452 = addInt(i_9840452, 1);
          }
      } while(false);
    } while(false);
    F.line = 169;
    if (father_9815138.kids != null) { father_9815138.kids.push(e_9815276); } else { father_9815138.kids = [e_9815276]; };
    }
    else {
      L19: do {
        F.line = 171;
        var i_9815300 = 0;
        F.line = 104;
        var colontmp__9840455 = 0;
        F.line = 171;
        colontmp__9840455 = x_9815137.childNodes.length;
        F.line = 106;
        var i_9840456 = 0;
        L20: do {
          F.line = 107;
            L21: while (true) {
            if (!(i_9840456 < colontmp__9840455)) break L21;
              F.line = 171;
              i_9815300 = i_9840456;
              F.line = 172;
              to_toc_9815135(x_9815137.childNodes[i_9815300], father_9815138);
              F.line = 109;
              i_9840456 = addInt(i_9840456, 1);
            }
        } while(false);
      } while(false);
    }
    
    }
    else {
      F.line = 174;
    if (father_9815138.kids != null) { father_9815138.kids.push({heading: x_9815137, kids: [], sortId: (father_9815138.kids != null ? father_9815138.kids.length : 0), doSort: false}); } else { father_9815138.kids = [{heading: x_9815137, kids: [], sortId: (father_9815138.kids != null ? father_9815138.kids.length : 0), doSort: false}]; };
    }
    }}
  framePtr = F.prev;

  
}
function extract_items_9770074(x_9770076, heading_9770077, items_9770080, items_9770080_Idx) {
      var Tmp1;

  var F={procname:"dochack.extractItems",prev:framePtr,filename:"dochack.nim",line:0};
  framePtr = F;
  BeforeRet: do {
    if ((x_9770076 == null)) {
    F.line = 81;
    break BeforeRet;
    }
    
      if (!!((x_9770076.heading == null))) Tmp1 = false; else {        Tmp1 = (x_9770076.heading.textContent == heading_9770077);      }    if (Tmp1) {
    L2: do {
      F.line = 83;
      var i_9775021 = 0;
      F.line = 104;
      var colontmp__9840485 = 0;
      F.line = 83;
      colontmp__9840485 = (x_9770076.kids != null ? x_9770076.kids.length : 0);
      F.line = 106;
      var i_9840486 = 0;
      L3: do {
        F.line = 107;
          L4: while (true) {
          if (!(i_9840486 < colontmp__9840485)) break L4;
            F.line = 83;
            i_9775021 = i_9840486;
            F.line = 84;
            if (items_9770080[items_9770080_Idx] != null) { items_9770080[items_9770080_Idx].push(x_9770076.kids[chckIndx(i_9775021, 0, (x_9770076.kids != null ? x_9770076.kids.length : 0)+0-1)-0].heading); } else { items_9770080[items_9770080_Idx] = [x_9770076.kids[chckIndx(i_9775021, 0, (x_9770076.kids != null ? x_9770076.kids.length : 0)+0-1)-0].heading]; };
            F.line = 109;
            i_9840486 = addInt(i_9840486, 1);
          }
      } while(false);
    } while(false);
    }
    else {
      L5: do {
        F.line = 86;
        var i_9775041 = 0;
        F.line = 104;
        var colontmp__9840489 = 0;
        F.line = 86;
        colontmp__9840489 = (x_9770076.kids != null ? x_9770076.kids.length : 0);
        F.line = 106;
        var i_9840490 = 0;
        L6: do {
          F.line = 107;
            L7: while (true) {
            if (!(i_9840490 < colontmp__9840489)) break L7;
              F.line = 86;
              i_9775041 = i_9840490;
              F.line = 87;
              var it_9775042 = x_9770076.kids[chckIndx(i_9775041, 0, (x_9770076.kids != null ? x_9770076.kids.length : 0)+0-1)-0];
              F.line = 88;
              extract_items_9770074(it_9775042, heading_9770077, items_9770080, items_9770080_Idx);
              F.line = 109;
              i_9840490 = addInt(i_9840490, 1);
            }
        } while(false);
      } while(false);
    }
    
  } while (false);
  framePtr = F.prev;

  
}
function tree_9761020(tag_9761022, kids_9761024) {
  var result_9761025 = null;

  var F={procname:"dochack.tree",prev:framePtr,filename:"dochack.nim",line:0};
  framePtr = F;
    F.line = 11;
    result_9761025 = document.createElement(toJSStr(tag_9761022));
    L1: do {
      F.line = 12;
      var k_9761056 = null;
      F.line = 3;
      var i_9840506 = 0;
      L2: do {
        F.line = 4;
          L3: while (true) {
          if (!(i_9840506 < (kids_9761024 != null ? kids_9761024.length : 0))) break L3;
            F.line = 12;
            k_9761056 = kids_9761024[chckIndx(i_9840506, 0, (kids_9761024 != null ? kids_9761024.length : 0)+0-1)-0];
            F.line = 13;
            result_9761025.appendChild(k_9761056);
            F.line = 6;
            i_9840506 = addInt(i_9840506, 1);
          }
      } while(false);
    } while(false);
  framePtr = F.prev;

  return result_9761025;

}
function text_9761152(s_9761154) {
  var result_9761155 = null;

  var F={procname:"dochack.text",prev:framePtr,filename:"dochack.nim",line:0};
  framePtr = F;
    F.line = 27;
    result_9761155 = document.createTextNode(s_9761154);
  framePtr = F.prev;

  return result_9761155;

}
function sys_fatal_102618(message_102622) {
  var F={procname:"sysFatal.sysFatal",prev:framePtr,filename:"fatal.nim",line:0};
  framePtr = F;
    F.line = 49;
    raiseException({message: nimCopy(null, message_102622, NTI112), m_type: NTI6241, parent: null, name: null, trace: null, up: null}, "AssertionError");
  framePtr = F.prev;

  
}
function raise_assert_102614(msg_102616) {
  var F={procname:"assertions.raiseAssert",prev:framePtr,filename:"assertions.nim",line:0};
  framePtr = F;
    F.line = 22;
    sys_fatal_102618(msg_102616);
  framePtr = F.prev;

  
}
function failed_assert_impl_102680(msg_102682) {
  var F={procname:"assertions.failedAssertImpl",prev:framePtr,filename:"assertions.nim",line:0};
  framePtr = F;
    F.line = 29;
    raise_assert_102614(msg_102682);
  framePtr = F.prev;

  
}
function uncovered_9820022(x_9820024) {
      var Tmp1;
    var Tmp2;

  var result_9820025 = null;

  var F={procname:"dochack.uncovered",prev:framePtr,filename:"dochack.nim",line:0};
  framePtr = F;
  BeforeRet: do {
      if (!((x_9820024.kids != null ? x_9820024.kids.length : 0) == 0)) Tmp1 = false; else {        Tmp1 = !((x_9820024.heading == null));      }    if (Tmp1) {
    F.line = 194;
    if (!(x_9820024.heading.hasOwnProperty('__karaxMarker__'))) {
    Tmp2 = x_9820024;
    }
    else {
    Tmp2 = null;
    }
    
    result_9820025 = Tmp2;
    break BeforeRet;
    }
    
    F.line = 195;
    result_9820025 = {heading: x_9820024.heading, kids: [], sortId: x_9820024.sortId, doSort: x_9820024.doSort};
    L3: do {
      F.line = 197;
      var i_9825036 = 0;
      F.line = 104;
      var colontmp__9840517 = 0;
      F.line = 197;
      colontmp__9840517 = (x_9820024.kids != null ? x_9820024.kids.length : 0);
      F.line = 106;
      var i_9840518 = 0;
      L4: do {
        F.line = 107;
          L5: while (true) {
          if (!(i_9840518 < colontmp__9840517)) break L5;
            F.line = 197;
            i_9825036 = i_9840518;
            F.line = 198;
            var y_9825037 = uncovered_9820022(x_9820024.kids[chckIndx(i_9825036, 0, (x_9820024.kids != null ? x_9820024.kids.length : 0)+0-1)-0]);
            if (!((y_9825037 == null))) {
            F.line = 199;
            if (result_9820025.kids != null) { result_9820025.kids.push(y_9825037); } else { result_9820025.kids = [y_9825037]; };
            }
            
            F.line = 109;
            i_9840518 = addInt(i_9840518, 1);
          }
      } while(false);
    } while(false);
    if (((result_9820025.kids != null ? result_9820025.kids.length : 0) == 0)) {
    F.line = 200;
    result_9820025 = null;
    }
    
  } while (false);
  framePtr = F.prev;

  return result_9820025;

}
function merge_tocs_9830034(orig_9830036, news_9830037) {
  var result_9830038 = null;

  var F={procname:"dochack.mergeTocs",prev:framePtr,filename:"dochack.nim",line:0};
  framePtr = F;
    F.line = 203;
    result_9830038 = uncovered_9820022(orig_9830036);
    if ((result_9830038 == null)) {
    F.line = 205;
    result_9830038 = news_9830037;
    }
    else {
      L1: do {
        F.line = 207;
        var i_9830059 = 0;
        F.line = 104;
        var colontmp__9840512 = 0;
        F.line = 207;
        colontmp__9840512 = (news_9830037.kids != null ? news_9830037.kids.length : 0);
        F.line = 106;
        var i_9840513 = 0;
        L2: do {
          F.line = 107;
            L3: while (true) {
            if (!(i_9840513 < colontmp__9840512)) break L3;
              F.line = 207;
              i_9830059 = i_9840513;
              F.line = 208;
              if (result_9830038.kids != null) { result_9830038.kids.push(news_9830037.kids[chckIndx(i_9830059, 0, (news_9830037.kids != null ? news_9830037.kids.length : 0)+0-1)-0]); } else { result_9830038.kids = [news_9830037.kids[chckIndx(i_9830059, 0, (news_9830037.kids != null ? news_9830037.kids.length : 0)+0-1)-0]]; };
              F.line = 109;
              i_9840513 = addInt(i_9840513, 1);
            }
        } while(false);
      } while(false);
    }
    
  framePtr = F.prev;

  return result_9830038;

}
function build_toc_9830080(orig_9830082, types_9830084, procs_9830085) {
                      var Tmp7;

  var result_9830086 = null;

  var F={procname:"dochack.buildToc",prev:framePtr,filename:"dochack.nim",line:0};
  framePtr = F;
    F.line = 211;
    var new_stuff_9830102 = {heading: null, kids: [], doSort: true, sortId: 0};
    L1: do {
      F.line = 212;
      var t_9840214 = null;
      F.line = 184;
      var i_9840501 = 0;
      F.line = 185;
      var l_9840502 = (types_9830084 != null ? types_9830084.length : 0);
      L2: do {
        F.line = 186;
          L3: while (true) {
          if (!(i_9840501 < l_9840502)) break L3;
            F.line = 212;
            t_9840214 = types_9830084[chckIndx(i_9840501, 0, (types_9830084 != null ? types_9830084.length : 0)+0-1)-0];
            F.line = 213;
            var c_9840230 = {heading: t_9840214.cloneNode(true), kids: [], doSort: true, sortId: 0};
            F.line = 214;
            t_9840214.__karaxMarker__ = true;
            L4: do {
              F.line = 215;
              var p_9840237 = null;
              F.line = 184;
              var i_9840498 = 0;
              F.line = 185;
              var l_9840499 = (procs_9830085 != null ? procs_9830085.length : 0);
              L5: do {
                F.line = 186;
                  L6: while (true) {
                  if (!(i_9840498 < l_9840499)) break L6;
                    F.line = 215;
                    p_9840237 = procs_9830085[chckIndx(i_9840498, 0, (procs_9830085 != null ? procs_9830085.length : 0)+0-1)-0];
                    if (!(p_9840237.hasOwnProperty('__karaxMarker__'))) {
                    F.line = 217;
                    var xx_9840238 = p_9840237.parentNode.getElementsByClassName("attachedType");
                      if (!((xx_9840238 != null ? xx_9840238.length : 0) == 1)) Tmp7 = false; else {                        Tmp7 = (xx_9840238[chckIndx(0, 0, (xx_9840238 != null ? xx_9840238.length : 0)+0-1)-0].textContent == t_9840214.textContent);                      }                    if (Tmp7) {
                    F.line = 220;
                    var q_9840246 = tree_9761020(makeNimstrLit("A"), [text_9761152(p_9840237.title)]);
                    F.line = 221;
                    q_9840246.setAttribute("href", p_9840237.getAttribute("href"));
                    F.line = 222;
                    if (c_9840230.kids != null) { c_9840230.kids.push({heading: q_9840246, kids: [], sortId: 0, doSort: false}); } else { c_9840230.kids = [{heading: q_9840246, kids: [], sortId: 0, doSort: false}]; };
                    F.line = 223;
                    p_9840237.__karaxMarker__ = true;
                    }
                    
                    }
                    
                    F.line = 188;
                    i_9840498 = addInt(i_9840498, 1);
                    if (!(((procs_9830085 != null ? procs_9830085.length : 0) == l_9840499))) {
                    F.line = 189;
                    failed_assert_impl_102680(makeNimstrLit("/home/runner/work/nightlies/nightlies/nim-1.2.16/lib/system/iterators.nim(189, 11) `len(a) == L` the length of the seq changed while iterating over it"));
                    }
                    
                  }
              } while(false);
            } while(false);
            F.line = 224;
            if (new_stuff_9830102.kids != null) { new_stuff_9830102.kids.push(c_9840230); } else { new_stuff_9830102.kids = [c_9840230]; };
            F.line = 188;
            i_9840501 = addInt(i_9840501, 1);
            if (!(((types_9830084 != null ? types_9830084.length : 0) == l_9840502))) {
            F.line = 189;
            failed_assert_impl_102680(makeNimstrLit("/home/runner/work/nightlies/nightlies/nim-1.2.16/lib/system/iterators.nim(189, 11) `len(a) == L` the length of the seq changed while iterating over it"));
            }
            
          }
      } while(false);
    } while(false);
    F.line = 225;
    result_9830086 = merge_tocs_9830034(orig_9830082, new_stuff_9830102);
  framePtr = F.prev;

  return result_9830086;

}
function add_9761100(parent_9761102, kid_9761103) {
      var Tmp1;
        var Tmp2;

  var F={procname:"dochack.add",prev:framePtr,filename:"dochack.nim",line:0};
  framePtr = F;
      if (!(parent_9761102.nodeName == "TR")) Tmp1 = false; else {        if ((kid_9761103.nodeName == "TD")) Tmp2 = true; else {          Tmp2 = (kid_9761103.nodeName == "TH");        }        Tmp1 = Tmp2;      }    if (Tmp1) {
    F.line = 18;
    var k_9761104 = document.createElement("TD");
    F.line = 19;
    k_9761104.appendChild(kid_9761103);
    F.line = 20;
    parent_9761102.appendChild(k_9761104);
    }
    else {
      F.line = 22;
    parent_9761102.appendChild(kid_9761103);
    }
    
  framePtr = F.prev;

  
}
function set_class_9761118(e_9761120, value_9761121) {
  var F={procname:"dochack.setClass",prev:framePtr,filename:"dochack.nim",line:0};
  framePtr = F;
    F.line = 25;
    e_9761120.setAttribute("class", toJSStr(value_9761121));
  framePtr = F.prev;

  
}
function to_html_9775071(x_9775073, is_root_9775074) {
      var Tmp1;
    function HEX3Aanonymous_9780015(a_9780017, b_9780018) {
          var Tmp1;

      var result_9780019 = 0;

      var F={procname:"toHtml.:anonymous",prev:framePtr,filename:"dochack.nim",line:0};
      framePtr = F;
      BeforeRet: do {
          if (!!((a_9780017.heading == null))) Tmp1 = false; else {            Tmp1 = !((b_9780018.heading == null));          }        if (Tmp1) {
        F.line = 106;
        var x_9790009 = a_9780017.heading.textContent;
        F.line = 107;
        var y_9790010 = b_9780018.heading.textContent;
        if ((x_9790009 < y_9790010)) {
        F.line = 108;
        result_9780019 = -1;
        break BeforeRet;
        }
        
        if ((y_9790010 < x_9790009)) {
        F.line = 109;
        result_9780019 = 1;
        break BeforeRet;
        }
        
        F.line = 110;
        result_9780019 = 0;
        break BeforeRet;
        }
        else {
          F.line = 113;
          result_9780019 = subInt(a_9780017.sortId, b_9780018.sortId);
          break BeforeRet;
        }
        
      } while (false);
      framePtr = F.prev;

      return result_9780019;

    }

  var result_9775075 = null;

  var F={procname:"dochack.toHtml",prev:framePtr,filename:"dochack.nim",line:0};
  framePtr = F;
  BeforeRet: do {
    if ((x_9775073 == null)) {
    F.line = 91;
    result_9775075 = null;
    break BeforeRet;
    }
    
    if (((x_9775073.kids != null ? x_9775073.kids.length : 0) == 0)) {
    if ((x_9775073.heading == null)) {
    F.line = 93;
    result_9775075 = null;
    break BeforeRet;
    }
    
    F.line = 94;
    result_9775075 = x_9775073.heading.cloneNode(true);
    break BeforeRet;
    }
    
    F.line = 95;
    result_9775075 = tree_9761020(makeNimstrLit("DIV"), []);
      if (!!((x_9775073.heading == null))) Tmp1 = false; else {        Tmp1 = !(x_9775073.heading.hasOwnProperty('__karaxMarker__'));      }    if (Tmp1) {
    F.line = 97;
    add_9761100(result_9775075, x_9775073.heading.cloneNode(true));
    }
    
    F.line = 98;
    var ul_9780012 = tree_9761020(makeNimstrLit("UL"), []);
    if (is_root_9775074) {
    F.line = 100;
    set_class_9761118(ul_9780012, makeNimstrLit("simple simple-toc"));
    }
    else {
      F.line = 102;
    set_class_9761118(ul_9780012, makeNimstrLit("simple"));
    }
    
    if (x_9775073.doSort) {
    F.line = 104;
    x_9775073.kids.sort(HEX3Aanonymous_9780015);
    }
    
    L2: do {
      F.line = 115;
      var k_9805214 = null;
      F.line = 184;
      var i_9840524 = 0;
      F.line = 185;
      var l_9840525 = (x_9775073.kids != null ? x_9775073.kids.length : 0);
      L3: do {
        F.line = 186;
          L4: while (true) {
          if (!(i_9840524 < l_9840525)) break L4;
            F.line = 115;
            k_9805214 = x_9775073.kids[chckIndx(i_9840524, 0, (x_9775073.kids != null ? x_9775073.kids.length : 0)+0-1)-0];
            F.line = 116;
            var y_9805215 = to_html_9775071(k_9805214, false);
            if (!((y_9805215 == null))) {
            F.line = 118;
            add_9761100(ul_9780012, tree_9761020(makeNimstrLit("LI"), [y_9805215]));
            }
            
            F.line = 188;
            i_9840524 = addInt(i_9840524, 1);
            if (!(((x_9775073.kids != null ? x_9775073.kids.length : 0) == l_9840525))) {
            F.line = 189;
            failed_assert_impl_102680(makeNimstrLit("/home/runner/work/nightlies/nightlies/nim-1.2.16/lib/system/iterators.nim(189, 11) `len(a) == L` the length of the seq changed while iterating over it"));
            }
            
          }
      } while(false);
    } while(false);
    if (!((ul_9780012.childNodes.length == 0))) {
    F.line = 119;
    add_9761100(result_9775075, ul_9780012);
    }
    
    if ((result_9775075.childNodes.length == 0)) {
    F.line = 120;
    result_9775075 = null;
    }
    
  } while (false);
  framePtr = F.prev;

  return result_9775075;

}
function replace_by_id_9761172(id_9761174, new_tree_9761175) {
  var F={procname:"dochack.replaceById",prev:framePtr,filename:"dochack.nim",line:0};
  framePtr = F;
    F.line = 32;
    var x_9761176 = document.getElementById(id_9761174);
    F.line = 33;
    x_9761176.parentNode.replaceChild(new_tree_9761175, x_9761176);
    F.line = 34;
    new_tree_9761175.id = id_9761174;
  framePtr = F.prev;

  
}
function togglevis_9840333(d_9840335) {
  var F={procname:"dochack.togglevis",prev:framePtr,filename:"dochack.nim",line:0};
  framePtr = F;
    F.line = 230;
        if (d_9840335.style.display == 'none')
      d_9840335.style.display = 'inline';
    else
      d_9840335.style.display = 'none';
  
  framePtr = F.prev;

  
}
function groupBy(value_9840351) {
  var F={procname:"dochack.groupBy",prev:framePtr,filename:"dochack.nim",line:0};
  framePtr = F;
    F.line = 238;
    var toc_9840352 = document.getElementById("toc-list");
    if ((alternative_9840319[0] == null)) {
    F.line = 240;
    var tt_9840373 = {heading: null, kids: [], sortId: 0, doSort: false};
    F.line = 241;
    to_toc_9815135(toc_9840352, tt_9840373);
    F.line = 242;
    tt_9840373 = tt_9840373.kids[chckIndx(0, 0, (tt_9840373.kids != null ? tt_9840373.kids.length : 0)+0-1)-0];
    F.line = 244;
    var types_9840390 = [[]];
    F.line = 245;
    var procs_9840407 = [[]];
    F.line = 247;
    extract_items_9770074(tt_9840373, "Types", types_9840390, 0);
    F.line = 248;
    extract_items_9770074(tt_9840373, "Procs", procs_9840407, 0);
    F.line = 249;
    extract_items_9770074(tt_9840373, "Converters", procs_9840407, 0);
    F.line = 250;
    extract_items_9770074(tt_9840373, "Methods", procs_9840407, 0);
    F.line = 251;
    extract_items_9770074(tt_9840373, "Templates", procs_9840407, 0);
    F.line = 252;
    extract_items_9770074(tt_9840373, "Macros", procs_9840407, 0);
    F.line = 253;
    extract_items_9770074(tt_9840373, "Iterators", procs_9840407, 0);
    F.line = 255;
    var ntoc_9840415 = build_toc_9830080(tt_9840373, types_9840390[0], procs_9840407[0]);
    F.line = 256;
    var x_9840416 = to_html_9775071(ntoc_9840415, true);
    F.line = 257;
    alternative_9840319[0] = tree_9761020(makeNimstrLit("DIV"), [x_9840416]);
    }
    
    if ((value_9840351 == "type")) {
    F.line = 259;
    replace_by_id_9761172("tocRoot", alternative_9840319[0]);
    }
    else {
      F.line = 261;
    replace_by_id_9761172("tocRoot", tree_9761020(makeNimstrLit("DIV"), []));
    }
    
    F.line = 262;
    togglevis_9840333(document.getElementById("toc-list"));
  framePtr = F.prev;

  
}
var db_9840528 = [null];
var contents_9840530 = [null];
var oldtoc_9850403 = [null];
var timer_9850404 = [null];
function raiseRangeError() {
    raiseException({message: makeNimstrLit("value out of range"), parent: null, m_type: NTI6253, name: null, trace: null, up: null}, "RangeError");

  
}
function nsuToLowerAsciiChar(c_8730023) {
  var result_8730024 = 0;

  var F={procname:"strutils.toLowerAscii",prev:framePtr,filename:"strutils.nim",line:0};
  framePtr = F;
    if ((ConstSet2[c_8730023] != undefined)) {
    F.line = 209;
    result_8730024 = chckRange(addInt(c_8730023, 32), 0, 255);
    }
    else {
      F.line = 211;
      result_8730024 = c_8730023;
    }
    
  framePtr = F.prev;

  return result_8730024;

}
function fuzzy_match_9681054(pattern_9681056, str_9681057) {
              var Tmp4;
              var Tmp5;
                var Tmp6;
      var Tmp7;
        var Tmp8;

  var result_9681061 = {Field0: 0, Field1: false};

  var F={procname:"fuzzysearch.fuzzyMatch",prev:framePtr,filename:"fuzzysearch.nim",line:0};
  framePtr = F;
    F.line = 36;
    var score_state_9681062 = -100;
    F.line = 37;
    var header_matched_9681063 = false;
    F.line = 38;
    var unmatched_leading_char_count_9681065 = 0;
    F.line = 39;
    var consecutive_match_count_9681067 = 0;
    F.line = 40;
    var str_index_9681069 = 0;
    F.line = 41;
    var pat_index_9681071 = 0;
    F.line = 42;
    var score_9681073 = 0;
    L1: do {
      F.line = 48;
        L2: while (true) {
        if (!((str_index_9681069 < (str_9681057 != null ? str_9681057.length : 0)) && (pat_index_9681071 < (pattern_9681056 != null ? pattern_9681056.length : 0)))) break L2;
          L3: do {
            F.line = 50;
            var pattern_char_9681079 = nsuToLowerAsciiChar(pattern_9681056.charCodeAt(chckIndx(pat_index_9681071, 0, (pattern_9681056 != null ? pattern_9681056.length : 0)+0-1)-0));
            F.line = 51;
            var str_char_9681080 = nsuToLowerAsciiChar(str_9681057.charCodeAt(chckIndx(str_index_9681069, 0, (str_9681057 != null ? str_9681057.length : 0)+0-1)-0));
            if ((ConstSet3[pattern_char_9681079] != undefined)) {
            F.line = 55;
            pat_index_9681071 = addInt(pat_index_9681071, 1);
            F.line = 56;
            break L3;
            }
            
            if ((ConstSet4[str_char_9681080] != undefined)) {
            F.line = 58;
            str_index_9681069 = addInt(str_index_9681069, 1);
            F.line = 59;
            break L3;
            }
            
            if ((!(header_matched_9681063) && (str_char_9681080 == 58))) {
            F.line = 64;
            header_matched_9681063 = true;
            F.line = 65;
            score_state_9681062 = -100;
            F.line = 66;
            score_9681073 = ((Math.floor((5.0000000000000000e-01 * score_9681073)))|0);
            F.line = 67;
            pat_index_9681071 = 0;
            F.line = 68;
            str_index_9681069 = addInt(str_index_9681069, 1);
            F.line = 69;
            break L3;
            }
            
            if ((str_char_9681080 == pattern_char_9681079)) {
            F.line = 72;
            switch (score_state_9681062) {
            case -100:
            case 20:
              F.line = 74;
              score_state_9681062 = 10;
              break;
            case 0:
              F.line = 77;
              score_state_9681062 = 5;
              F.line = 77;
              score_9681073 = addInt(score_9681073, score_state_9681062);
              break;
            case 10:
            case 5:
              F.line = 80;
              consecutive_match_count_9681067 = addInt(consecutive_match_count_9681067, 1);
              F.line = 81;
              score_state_9681062 = 5;
              F.line = 82;
              score_9681073 = addInt(score_9681073, mulInt(5, consecutive_match_count_9681067));
              if ((score_state_9681062 == 10)) {
              F.line = 85;
              score_9681073 = addInt(score_9681073, 10);
              }
              
              F.line = 87;
              var on_boundary_9695042 = (pat_index_9681071 == (pattern_9681056 != null ? (pattern_9681056.length-1) : -1));
              if ((!(on_boundary_9695042) && (str_index_9681069 < (str_9681057 != null ? (str_9681057.length-1) : -1)))) {
              F.line = 90;
              var next_pattern_char_9695043 = nsuToLowerAsciiChar(pattern_9681056.charCodeAt(chckIndx(addInt(pat_index_9681071, 1), 0, (pattern_9681056 != null ? pattern_9681056.length : 0)+0-1)-0));
              F.line = 91;
              var next_str_char_9695044 = nsuToLowerAsciiChar(str_9681057.charCodeAt(chckIndx(addInt(str_index_9681069, 1), 0, (str_9681057 != null ? str_9681057.length : 0)+0-1)-0));
              F.line = 94;
              if (!!((ConstSet5[next_str_char_9695044] != undefined))) Tmp4 = false; else {                Tmp4 = !((next_str_char_9695044 == next_pattern_char_9695043));              }              on_boundary_9695042 = Tmp4;
              }
              
              if (on_boundary_9695042) {
              F.line = 99;
              score_state_9681062 = 20;
              F.line = 99;
              score_9681073 = addInt(score_9681073, score_state_9681062);
              }
              
              break;
            case -1:
            case -3:
              F.line = 102;
              if (!((ConstSet6[str_9681057.charCodeAt(chckIndx(subInt(str_index_9681069, 1), 0, (str_9681057 != null ? str_9681057.length : 0)+0-1)-0)] != undefined))) Tmp5 = true; else {                if (!(ConstSet7[str_9681057.charCodeAt(chckIndx(subInt(str_index_9681069, 1), 0, (str_9681057 != null ? str_9681057.length : 0)+0-1)-0)] != undefined)) Tmp6 = false; else {                  Tmp6 = (ConstSet8[str_9681057.charCodeAt(chckIndx(str_index_9681069, 0, (str_9681057 != null ? str_9681057.length : 0)+0-1)-0)] != undefined);                }                Tmp5 = Tmp6;              }              var is_leading_char_9725008 = Tmp5;
              if (is_leading_char_9725008) {
              F.line = 109;
              score_state_9681062 = 10;
              }
              else {
                F.line = 113;
                score_state_9681062 = 0;
                F.line = 113;
                score_9681073 = addInt(score_9681073, score_state_9681062);
              }
              
              break;
            }
            F.line = 114;
            pat_index_9681071 = addInt(pat_index_9681071, 1);
            }
            else {
              F.line = 117;
              switch (score_state_9681062) {
              case -100:
                F.line = 119;
                score_state_9681062 = -3;
                F.line = 119;
                score_9681073 = addInt(score_9681073, score_state_9681062);
                break;
              case 5:
                F.line = 122;
                score_state_9681062 = -1;
                F.line = 122;
                score_9681073 = addInt(score_9681073, score_state_9681062);
                F.line = 123;
                consecutive_match_count_9681067 = 0;
                break;
              case -3:
                if ((unmatched_leading_char_count_9681065 < 3)) {
                F.line = 127;
                score_state_9681062 = -3;
                F.line = 127;
                score_9681073 = addInt(score_9681073, score_state_9681062);
                }
                
                F.line = 128;
                unmatched_leading_char_count_9681065 = addInt(unmatched_leading_char_count_9681065, 1);
                break;
              default: 
                F.line = 131;
                score_state_9681062 = -1;
                F.line = 131;
                score_9681073 = addInt(score_9681073, score_state_9681062);
                break;
              }
            }
            
            F.line = 133;
            str_index_9681069 = addInt(str_index_9681069, 1);
          } while(false);
        }
    } while(false);
      if (!(pat_index_9681071 == (pattern_9681056 != null ? pattern_9681056.length : 0))) Tmp7 = false; else {        if ((str_index_9681069 == (str_9681057 != null ? str_9681057.length : 0))) Tmp8 = true; else {          Tmp8 = !((ConstSet9[str_9681057.charCodeAt(chckIndx(str_index_9681069, 0, (str_9681057 != null ? str_9681057.length : 0)+0-1)-0)] != undefined));        }        Tmp7 = Tmp8;      }    if (Tmp7) {
    F.line = 136;
    score_9681073 = addInt(score_9681073, 10);
    }
    
    F.line = 139;
    var colontmp__9860060 = nimMax(0, score_9681073);
    F.line = 140;
    var colontmp__9860061 = (0 < score_9681073);
    F.line = 138;
    nimCopy(result_9681061, {Field0: colontmp__9860060, Field1: colontmp__9860061}, NTI9681058);
  framePtr = F.prev;

  return result_9681061;

}
function text_9761135(s_9761137) {
  var result_9761138 = null;

  var F={procname:"dochack.text",prev:framePtr,filename:"dochack.nim",line:0};
  framePtr = F;
    F.line = 26;
    result_9761138 = document.createTextNode(toJSStr(s_9761137));
  framePtr = F.prev;

  return result_9761138;

}
function dosearch_9840547(value_9840549) {
    function HEX3Aanonymous_9850273(a_9850282, b_9850283) {
      var result_9850287 = 0;

      var F={procname:"dosearch.:anonymous",prev:framePtr,filename:"dochack.nim",line:0};
      framePtr = F;
        F.line = 305;
        result_9850287 = subInt(b_9850283["Field1"], a_9850282["Field1"]);
      framePtr = F.prev;

      return result_9850287;

    }

  var result_9840550 = null;

  var F={procname:"dochack.dosearch",prev:framePtr,filename:"dochack.nim",line:0};
  framePtr = F;
    if (((db_9840528[0] != null ? db_9840528[0].length : 0) == 0)) {
    F.line = 272;
    var stuff_9840556 = null;
    F.line = 273;
        var request = new XMLHttpRequest();
    request.open("GET", "theindex.html", false);
    request.send(null);

    var doc = document.implementation.createHTMLDocument("theindex");
    doc.documentElement.innerHTML = request.responseText;

    //parser=new DOMParser();
    //doc=parser.parseFromString("<html></html>", "text/html");

    stuff_9840556 = doc.documentElement;
    
    F.line = 286;
    db_9840528[0] = nimCopy(null, stuff_9840556.getElementsByClassName("reference"), NTI624105);
    F.line = 287;
    contents_9840530[0] = nimCopy(null, [], NTI9840571);
    L1: do {
      F.line = 288;
      var ahref_9850214 = null;
      F.line = 184;
      var i_9860040 = 0;
      F.line = 185;
      var l_9860041 = (db_9840528[0] != null ? db_9840528[0].length : 0);
      L2: do {
        F.line = 186;
          L3: while (true) {
          if (!(i_9860040 < l_9860041)) break L3;
            F.line = 288;
            ahref_9850214 = db_9840528[0][chckIndx(i_9860040, 0, (db_9840528[0] != null ? db_9840528[0].length : 0)+0-1)-0];
            F.line = 289;
            if (contents_9840530[0] != null) { contents_9840530[0].push(ahref_9850214.getAttribute("data-doc-search-tag")); } else { contents_9840530[0] = [ahref_9850214.getAttribute("data-doc-search-tag")]; };
            F.line = 188;
            i_9860040 = addInt(i_9860040, 1);
            if (!(((db_9840528[0] != null ? db_9840528[0].length : 0) == l_9860041))) {
            F.line = 189;
            failed_assert_impl_102680(makeNimstrLit("/home/runner/work/nightlies/nightlies/nim-1.2.16/lib/system/iterators.nim(189, 11) `len(a) == L` the length of the seq changed while iterating over it"));
            }
            
          }
      } while(false);
    } while(false);
    }
    
    F.line = 290;
    var ul_9850225 = tree_9761020(makeNimstrLit("UL"), []);
    F.line = 291;
    result_9840550 = tree_9761020(makeNimstrLit("DIV"), []);
    F.line = 292;
    set_class_9761118(result_9840550, makeNimstrLit("search_results"));
    F.line = 293;
    var matches_9850246 = [];
    L4: do {
      F.line = 294;
      var i_9850259 = 0;
      F.line = 104;
      var colontmp__9860047 = 0;
      F.line = 294;
      colontmp__9860047 = (db_9840528[0] != null ? db_9840528[0].length : 0);
      F.line = 106;
      var i_9860048 = 0;
      L5: do {
        F.line = 107;
          L6: while (true) {
          if (!(i_9860048 < colontmp__9860047)) break L6;
            F.line = 294;
            i_9850259 = i_9860048;
            L7: do {
              F.line = 295;
              var c_9850260 = contents_9840530[0][chckIndx(i_9850259, 0, (contents_9840530[0] != null ? contents_9840530[0].length : 0)+0-1)-0];
              if (((c_9850260 == "Examples") || (c_9850260 == "PEG construction"))) {
              F.line = 300;
              break L7;
              }
              
              F.line = 301;
              var colontmp__9860055 = fuzzy_match_9681054(value_9840549, c_9850260);
              F.line = 301;
              var score_9850261 = colontmp__9860055["Field0"];
              F.line = 301;
              var matched_9850262 = colontmp__9860055["Field1"];
              if (matched_9850262) {
              F.line = 303;
              if (matches_9850246 != null) { matches_9850246.push({Field0: db_9840528[0][chckIndx(i_9850259, 0, (db_9840528[0] != null ? db_9840528[0].length : 0)+0-1)-0], Field1: score_9850261}); } else { matches_9850246 = [{Field0: db_9840528[0][chckIndx(i_9850259, 0, (db_9840528[0] != null ? db_9840528[0].length : 0)+0-1)-0], Field1: score_9850261}]; };
              }
              
            } while(false);
            F.line = 109;
            i_9860048 = addInt(i_9860048, 1);
          }
      } while(false);
    } while(false);
    F.line = 305;
    matches_9850246.sort(HEX3Aanonymous_9850273);
    L8: do {
      F.line = 306;
      var i_9850326 = 0;
      F.line = 104;
      var colontmp__9860052 = 0;
      F.line = 306;
      colontmp__9860052 = nimMin((matches_9850246 != null ? matches_9850246.length : 0), 29);
      F.line = 106;
      var i_9860053 = 0;
      L9: do {
        F.line = 107;
          L10: while (true) {
          if (!(i_9860053 < colontmp__9860052)) break L10;
            F.line = 306;
            i_9850326 = i_9860053;
            F.line = 307;
            matches_9850246[chckIndx(i_9850326, 0, (matches_9850246 != null ? matches_9850246.length : 0)+0-1)-0]["Field0"].innerHTML = matches_9850246[chckIndx(i_9850326, 0, (matches_9850246 != null ? matches_9850246.length : 0)+0-1)-0]["Field0"].getAttribute("data-doc-search-tag");
            F.line = 308;
            add_9761100(ul_9850225, tree_9761020(makeNimstrLit("LI"), [matches_9850246[chckIndx(i_9850326, 0, (matches_9850246 != null ? matches_9850246.length : 0)+0-1)-0]["Field0"]]));
            F.line = 109;
            i_9860053 = addInt(i_9860053, 1);
          }
      } while(false);
    } while(false);
    if ((ul_9850225.childNodes.length == 0)) {
    F.line = 310;
    add_9761100(result_9840550, tree_9761020(makeNimstrLit("B"), [text_9761135(makeNimstrLit("no search results"))]));
    }
    else {
      F.line = 312;
      add_9761100(result_9840550, tree_9761020(makeNimstrLit("B"), [text_9761135(makeNimstrLit("search results"))]));
      F.line = 313;
      add_9761100(result_9840550, ul_9850225);
    }
    
  framePtr = F.prev;

  return result_9840550;

}
function search() {
    function wrapper_9850435() {
      var F={procname:"search.wrapper",prev:framePtr,filename:"dochack.nim",line:0};
      framePtr = F;
        F.line = 320;
        var elem_9850437 = document.getElementById("searchInput");
        F.line = 321;
        var value_9850438 = elem_9850437.value;
        if (!(((value_9850438 != null ? value_9850438.length : 0) == 0))) {
        if ((oldtoc_9850403[0] == null)) {
        F.line = 324;
        oldtoc_9850403[0] = document.getElementById("tocRoot");
        }
        
        F.line = 325;
        var results_9855006 = dosearch_9840547(value_9850438);
        F.line = 326;
        replace_by_id_9761172("tocRoot", results_9855006);
        }
        else {
        if (!((oldtoc_9850403[0] == null))) {
        F.line = 328;
        replace_by_id_9761172("tocRoot", oldtoc_9850403[0]);
        }
        }
      framePtr = F.prev;

      
    }

  var F={procname:"dochack.search",prev:framePtr,filename:"dochack.nim",line:0};
  framePtr = F;
    if (!((timer_9850404[0] == null))) {
    F.line = 330;
    clearTimeout(timer_9850404[0]);
    }
    
    F.line = 331;
    timer_9850404[0] = setTimeout(wrapper_9850435, 400);
  framePtr = F.prev;

  
}
