diff --git a/branch/4.04/driver.html b/branch/4.04/driver.html new file mode 100644 index 0000000000000000000000000000000000000000..9de248a19dccb62097b7abe646a9e048c5d39145 --- /dev/null +++ b/branch/4.04/driver.html @@ -0,0 +1,239 @@ +<!doctype html> +<html> +<head> +<meta charset="utf-8"> +<title>Interactive Debugger for the JavaScript Specification</title> + +<script src="libraries/jquery-2.1.1.min.js"></script> + +<link rel=stylesheet href="libraries/codemirror/lib/codemirror.css"> +<script src="libraries/codemirror/lib/codemirror.js"></script> +<script src="libraries/codemirror/lib/javascript.js"></script> + + +<!-- styles needed by jScrollPane - include in your own sites --> +<link type="text/css" href="jquery_scroll/jquery.jscrollpane.css" rel="stylesheet" media="all" /> +<!-- the mousewheel plugin --> +<script type="text/javascript" src="jquery_scroll/jquery.mousewheel.js"></script> +<!-- the jScrollPane script --> +<script type="text/javascript" src="jquery_scroll/jquery.jscrollpane.min.js"></script> + +<link rel="stylesheet" href="jquery-ui-1.11.4.custom/jquery-ui.css"> +<script src="jquery-ui-1.11.4.custom/jquery-ui.js"></script> + +<script src="node_modules/esprima/esprima.js"></script> +<script type = "text/javascript" src="esprima-to-ast.js"></script> + + +<style> +.source_div { + border-top: 1px solid black; + border-bottom: 1px solid black; +} + +.heap_link { + color: black; +} + +#file_list { + height: 1em; + padding-top: 3px; + padding-bottom: 5px; + border-bottom: 1px solid black; +} + +#source_tabs { + padding: 3px; +} + +.file_item, .file_item_current { + font-size: smaller; + margin-right: 3px; + padding: 3px; + text-decoration: underline; +} + +.file_item, .file_item_current:hover { + cursor: pointer; + cursor: hand; +} + +.file_item { + background-color: #FAFAFA; +} + +.file_item_current { + background-color: #FFCCCC; +} + +#main_table td { + vertical-align: top; + border: 1px solid black; +} + +#action_output { + font-weight: bold; + color: red; +} + +#disp_env { + margin-top: 0.5em; +} + +#select_source_code { + width: 40em; +} + +#disp_env_pane { + height: 180px; +} + +.CodeMirror-selected { background: #F3F781; } +.CodeMirror-focused .CodeMirror-selected { background: #F3F781; } + + +.scroll-pane +{ + width: 100%; + height: 300px; + overflow: auto; +} +.hint { + display: none; +} +</style> + + +</head> +<body> + +<h2 class="hint">Interactive Debugger for the JavaScript Specification</h2> + + +<div class='source_div' style=""> + Load example: + <select id='select_source_code'><option disabled selected>Example Programs</option></select> + Load file: <input type='file' accept='.js' id='select_file' /> + <table id='main_table'><tr> + <td> + <div id='source_tabs'></div> + <textarea id='source_code' class='source' rows='6' cols='60'>source code here</textarea> + </td> + <td width='600'> + <div id='disp_env_pane' class="scroll-pane"> + <div id='disp_env'>ctx here</div> + </div> + </td> + </tr></table> +</div> + + +<div style="margin-top:0.2em"> +<input type="button" id="button_run" value="RUN" /> +Navigation: +<input type="textbox" id='navigation_step' style="width:3em" value="0"/> +/ <span id="navigation_total"></span> +<input type="button" id='button_goto_begin' value="Begin" /> +<input type="button" id='button_goto_end' value="End" /> +<input type="button" id='button_backward' value="Backward" /><div class="hint">(4)</div> +<input type="button" id='button_forward' value="Forward" /><div class="hint">(6)</div> +<span style="width:3em"> </span> +<input type="button" id='button_previous' value="Prev" /><div class="hint">(8)</div> +<input type="button" id='button_next' value="Next" /><div class="hint">(2)</div> +<input type="button" id='button_finish' value="Finish" /><div class="hint">(3)</div> +<span style="width:3em"> </span> +<input type="button" id='button_srcprevious' value="Source Prev" /><div class="hint">(7)</div> +<input type="button" id='button_srcnext' value="Source Next" /><div class="hint">(7)</div> +<input type="button" id='button_cursor' value="Source Cursor" /><div class="hint">(7)</div> +<!--<input type="button" id='button_selection' value="ReachSelection" /><div class="hint">(7)</div>--> + +<div style="margin-top: 0.2em">Condition: +<input type="textbox" id='reach_condition' style="width:20em" /> +<input type="button" id='button_reach_condition' value="Reach" /> +<input type="button" id='button_test_condition' value="Test" /> +<span id="reach_output"></span> +<font style="size: 50%"> +Using: S('x'), S_raw('x'), S_line(), I('x'), I_line(). +</font> +</div> +</div> + +<div id="action_output"></div> + +<div class='source_div'> + +<table id='main_table'><tr> +<td> + <div id='file_list'></div> + <textarea id='interpreter_code' class='source' rows='15' cols='60'></textarea> +</td> +<!--<td width='600'> + <div id='disp_ctx'></div> +</td>--> +</tr></table> +</div> +<div id='disp_ctx'></div> +<!--<hr>--> +<div id='disp_infos'></div> + +<script src="tools.js"></script> +<script src="jsref/displayed_sources.js"></script> +<script src="jsref/lineof.js"></script> +<script src="jsref/assembly.js"></script> +<script src="navig-driver.js"></script> + + +<!--- +<script language="javascript"> +$(function() { + $('.scroll-pane').jScrollPane(); +}); +</script> +---> + +<!-- + +<div style="font-size:0.8em">Instructions: type 'S' for step (next function call), 'N' for next (next call at same level), 'B' for backstep (symmetric to step), 'P' for previous (symmetric to next), 'F' for finish (next call at upper level), 'R' for restart.</div> + +<div style="font-size:0.8em">Examples of conditions: + <ul> + <li><pre style = "display:inline">X.type === "fun" && (X.v1, true)</pre> (we are at the beginning of a function and v1 is defined in the local interpreter context),</li> + <li><pre style = "display:inline">X.line === 32 && X.t.tag === "trm_set" && X.t.field === "bar"</pre> (we are at line 32 and we are setting the field “bar†of the current location),</li> + <li><pre style = "display:inline">y.foo === 12</pre> (the program variable “y†points to an object whose field “foo†is equal to 12),</li> + <li><pre style = "display:inline">X.heap[0].bar === 12</pre> (the first cell of the heap has a field “bar†defined equal to 12).</li> + </ul></div> + --> + + +</body> +</html> + + +<!-- +/* + $timeout(function() {codeMirror.refresh();}); + + this.codeMirrorInstance.setValue(content); + var that = this; + setTimeout(function() { + that.codeMirrorInstance.refresh(); + },1); + + http://codemirror.net/demo/buffers.html +*/ +----> + + + + + + +<!--- + +var t = []; for (var i = 0; i < 3; i++) { t[i] = function() { return i; } }; +() { return i; } +t[0](); +3 + +--> + diff --git a/branch/4.04/esprima-to-ast.js b/branch/4.04/esprima-to-ast.js new file mode 100644 index 0000000000000000000000000000000000000000..77817210981b18ecf58aa5b78740a87a268ac565 --- /dev/null +++ b/branch/4.04/esprima-to-ast.js @@ -0,0 +1,634 @@ +"use strict"; + +//https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey/Parser_API$revision/707671 + +function esprimaToAST(prog, sourceText, filename) { + filename = filename === undefined ? "" : filename; + + var returnSourceText = filename.startsWith("_eval_"); + + var contextStrictMode = false; + + var toList = function (array) { + var r = {type: "list", tag: "[]"}; + for (var i = array.length - 1; i >= 0; i--) { + r = {type: "list", tag: "::", head: array[i], tail: r}; + } + return r; + }; + + var toLoc = function (pos) { + if (pos === null) {throw "null position in esprima AST";}; + // TODO : could reuse the start and end object + var loc = {file: filename, + start: {line: pos.start.line, column: pos.start.column}, + end: {line: pos.end.line, column: pos.end.column}, + sourceText: ""}; + if (returnSourceText) loc.sourceText = sourceText; + return loc; + }; + + var toOption = function (funcTr, node) { + var option = { type: "option" }; + if (node === null) { + option.tag = "None"; + } else { + option.tag = "Some"; + option.value = funcTr(node); + } + return option; + }; + + // [] => None, [a] => Some a + var arrayToOption = function (funcTr, arr) { + if (arr.length > 1) { + throw new EsprimaToASTError("arrayToOption error, arr.length > 1.", arr); + } + return toOption(funcTr, (arr.length > 0 ? arr[0] : null)); + } + + var isDirectivePrologue = function(stat) { + return stat.type === "ExpressionStatement" && + stat.expression.type === "Literal" && + (typeof stat.expression.value) === "string"; + } + + var isUseStrictDirective = function(stat) { + return isDirectivePrologue(stat) && + /^["']use strict["']$/.test(stat.expression.raw); + } + + var getDirectivePrologue = function(statArr) { + // statArr.takeWhile(isDirectivePrologue) + return statArr.filter(function(stat) { + this.ok = this.ok && isDirectivePrologue(stat); + return this.ok; + }, { ok: true }); + }; + + var bodyIsStrict = function(statArr) { + return getDirectivePrologue(statArr).some(isUseStrictDirective); + } + + /*** Miscellaneous Helper Nodes ***/ + + // The JSCert AST special-cases this instance of option + var trOptLabel = function (label) { + var option = { type: "label" }; + if (label === null) { + option.tag = "Coq_label_empty"; + } else { + option.tag = "Coq_label_string"; + option.value = trIdentifier(label); + } + return option; + }; + + + /*** Program ***/ + + var trProg = function (prog) { + if (prog.type !== "Program") { + throw new EsprimaToASTError("trProg error: " + prog.type, prog); + }; + var r = {loc: toLoc(prog.loc), type: "prog"}; + r.tag = "Coq_prog_intro"; + r.strictness = contextStrictMode = bodyIsStrict(prog.body); + r.elements = toList(prog.body.map(trStatAsElement)); + return r; + }; + + /*** Statements ***/ + + var trStatAsElement = function (stat) { + var loc = toLoc(stat.loc); + var r = {loc: loc, type: "element"}; + if (stat.type === "FunctionDeclaration") { + r.tag = "Coq_element_func_decl"; + r.func_name = trIdentifier(stat.id); + r.arg_names = trParams(stat.params); + // TODO this could be detected by stat.expression of type bool + r.body = trBlockStatAsFuncbody(stat.body); + } else /* if (stat.type <: "Statement") */ { + r.tag = "Coq_element_stat"; + r.stat = trStat(stat); + } // else { + // throw new EsprimaToASTError("trStatAsElement error: " + stat.type, stat); + // } + return r; + }; + + var trBlockStatAsFuncbody = function (stat) { + if (stat.type !== "BlockStatement") { + throw new EsprimaToASTError("stat.type !== BlockStatement", stat); + } + + var loc = toLoc(stat.loc); + var prog = { loc: loc, type: "prog", tag: "Coq_prog_intro" }; + + var oldContextStrictMode = contextStrictMode; + contextStrictMode = contextStrictMode || bodyIsStrict(stat.body); + prog.strictness = contextStrictMode; + prog.elements = toList(stat.body.map(trStatAsElement)); + contextStrictMode = oldContextStrictMode; + + var source = ""; + if (sourceText && stat.range) { + // Esprima's range includes the { } + source = sourceText.slice(stat.range[0]+1, stat.range[1]-1); + } + + return {loc: loc, type: "funcbody", tag: "Coq_funcbody_intro", + prog: prog, source: source}; + }; + + var trFuncExprAsFuncbody = function (expr) { + if (expr.type !== "FunctionExpression") { + throw new EsprimaToASTError("expr.type !== FunctionExpression", expr); + } + checkFuncExpr(expr); + return trBlockStatAsFuncbody(expr.body); + }; + + + var trParams = function (params) { + return toList(params.map(trPattern)); + } + + // return string until ES6 support is required + var trPattern = function (pat) { + if (pat.type === "Identifier") { + return trIdentifier(pat); + } else { + throw new EsprimaToASTError("trPattern error: " + pat.type, pat); + } + }; + + var trIdentifier = function (ident) { + if (ident.type === "Identifier") { + return ident.name; + } else { + throw new EsprimaToASTError("Expected Identifier, got: " + ident.type); + } + } + + // return the encoding of a pair + var trVarDecl = function (decl) { + if (decl.type !== "VariableDeclarator") { + throw new ExprimaToASTError("trVarDecl called with wrong type: " + decl.type); + } + var id = trPattern(decl.id); + var eo = toOption(trExpr, decl.init); + return [id,eo]; + }; + + var trProperty = function (property) { + if (property.type !== "Property") { + throw new EsprimaToASTError("trProperty called with wrong type: " + property.type); + } + + var propname = { type: "propname", loc: toLoc(property.key.loc) }; + if (property.key.type === "Literal") { + propname.value = property.key.value; + + if ((typeof propname.value) === "number") { + propname.tag = "Coq_propname_number"; + } else if ((typeof propname.value) === "string") { + propname.tag = "Coq_propname_string"; + } else { + throw new EsprimaToASTError("Property key may only be number or string, got: " + property.key.value); + } + } else if (property.key.type === "Identifier") { + propname.tag = "Coq_propname_identifier"; + propname.value = trIdentifier(property.key); + } else { + throw new EsprimaToASTError("trProperty called with wrong identifier type: " + property.type); + } + + var propbody = { loc: toLoc(property.value.loc), type: "propbody" } + if (property.kind === "init") { + propbody.tag = "Coq_propbody_val"; + propbody.expr = trExpr(property.value); + } else if (property.kind === "get") { + propbody.tag = "Coq_propbody_get"; + propbody.body = trFuncExprAsFuncbody(property.value); + } else if (property.kind === "set") { + propbody.tag = "Coq_propbody_get"; + propbody.body = trFuncExprAsFuncbody(property.value); + propbody.names = toList(property.value.params.map(trPattern)); + } else { + throw new EsprimaToASTError("trProperty got unexpected kind: " + property.kind); + } + + return [propname, propbody]; + }; + + var trCatchClause = function (clause) { + if (clause.type !== "CatchClause") { + throw new EsprimaToASTError("trCatchClause called with wrong type: " + clause.type); + } + // clause.guard is a custom Mozilla extension + return [trPattern(clause.param), trBlockStat(clause.body)]; + }; + + var trSwitchCase = function (scase) { + if (scase.type !== "SwitchCase") { + throw new EsprimaToASTError("trSwitchCase called with wrong type: " + clause.type); + } + return { + type: "switchclause", + tag: "Coq_switchclause_intro", + loc: toLoc(scase.loc), + arg: trExpr(scase.test), + stats: toList(scase.consequent.map(trStat)) + }; + } + + + /*** Statements ***/ + + var trBlockStat = function (stat) { + var r = {loc: toLoc(stat.loc), type: "stat"}; + if (stat.type === "BlockStatement") { + r.tag = "Coq_stat_block"; + r.stats = toList(stat.body.map(trStat)); + } else { + throw new EsprimaToASTError("trStat error: " + stat.type, stat); + }; + return r; + }; + + var trStat = function (stat) { + var r = {loc: toLoc(stat.loc), type: "stat"}; + if (stat.type === "EmptyStatement") { + r.tag = "Coq_stat_block"; + r.stats = toList([]); + } else if (stat.type === "BlockStatement") { + r = trBlockStat(stat); + } else if (stat.type === "ExpressionStatement") { + r.tag = "Coq_stat_expr"; + r.expr = trExpr(stat.expression); + } else if (stat.type === "IfStatement") { + r.tag = "Coq_stat_if"; + r.cond = trExpr(stat.test); + r.then_branch = trStat(stat.consequent); + r.else_branch = toOption(trStat, stat.alternate); + } else if (stat.type === "LabeledStatement") { + r.tag = "Coq_stat_label"; + r.label = trIdentifier(stat.label); + r.stat = trStat(stat.body); + } else if (stat.type === "BreakStatement") { + r.tag = "Coq_stat_break"; + r.label = trOptLabel(stat.label); + } else if (stat.type === "ContinueStatement") { + r.tag = "Coq_stat_continue"; + r.label = trOptLabel(stat.label); + } else if (stat.type === "WithStatement") { + r.tag = "Coq_stat_with"; + r.obj = trExpr(stat.object); + r.stat = trStat(stat.body); + } else if (stat.type === "SwitchStatement") { + r.tag = "Coq_stat_switch"; + r.arg = trExpr(stat.discriminant); + r.labels = toList([]); + r.body = { type: "switchbody" }; + + // Find the index of the default clause (if any) + var index = stat.cases.findIndex(clause => clause.test === null); + if (index >= 0) { + r.body.tag = "Coq_switchbody_withdefault"; + r.body.clauses_before = toList(stat.cases.slice(0, index).map(trSwitchCase)); + r.body.clause_default = toList(stat.cases[index].consequent.map(trStat)); + r.body.clauses_after = toList(stat.cases.slice(index+1).map(trSwitchCase)); + } else { + r.body.tag = "Coq_switchbody_nodefault"; + r.body.clauses = toList(stat.cases.map(trSwitchCase)); + } + + } else if (stat.type === "ReturnStatement") { + r.tag = "Coq_stat_return"; + r.arg_opt = toOption(trExpr, stat.argument); + } else if (stat.type === "ThrowStatement") { + r.tag = "Coq_stat_throw"; + r.arg = trExpr(stat.argument); + } else if (stat.type === "TryStatement") { + r.tag = "Coq_stat_try"; + r.body = trStat(stat.block); + // NOTE: Esprima v1.2.5 deviates from the SpiderMonkey AST standard here: + // handler: CatchClause | null; + // guardedHandlers: [ CatchClause ]; // Mozilla extension + // r.catch_stats_opt = toOption(trCatchClause, stat.handler); + r.catch_stats_opt = arrayToOption(trCatchClause, stat.handlers); + r.finally_opt = toOption(trBlockStat, stat.finalizer); + } else if (stat.type === "WhileStatement") { + r.tag = "Coq_stat_while"; + r.cond = trExpr(stat.test); + r.body = trStat(stat.body); + + // This is precisely what interp/src/translate_syntax.ml does... + r.labels = toList([]); + } else if (stat.type === "DoWhileStatement") { + r.tag = "Coq_stat_do_while"; + r.cond = trExpr(stat.test); + r.body = trStat(stat.body); + + // This is precisely what interp/src/translate_syntax.ml does... + r.labels = toList([]); + } else if (stat.type === "ForStatement") { + if (stat.init && stat.init.type === "VariableDeclaration") { + r.tag = "Coq_stat_for_var"; + r.init = trStat(stat.init).decls; + } else { + r.tag = "Coq_stat_for"; + r.init = toOption(trExpr, stat.init); + } + r.cond = toOption(trExpr, stat.test); + r.step = toOption(trExpr, stat.update); + r.body = trStat(stat.body); + + // This is precisely what interp/src/translate_syntax.ml does... + r.labels = toList([]); + } else if (stat.type === "ForInStatement") { + throw new UnsupportedSyntaxError("We don't support for-in.", stat); + + // Everything below here is for when we do support for-in ;P + + if (stat.left.type === "VariableDeclaration") { + r.tag = "Coq_stat_for_in_var"; + if (stat.left.declarations.length != 1) { + throw new EsprimaToASTError("ForInStatement: Wrong number of declarations.", stat); + } + // TODO: Technically, the declaration should be executed, but this + // doesn't match our (current, broken) JsSyntax type signature + r.id = trStat(stat.left).decls.head[0]; + } else { + r.tag = "Coq_stat_for_in"; + r.id = trExpr(stat.left); + } + r.obj = trExpr(stat.right); + r.body = trStat(stat.body); + r.labels = toList([]); + + } else if (stat.type === "VariableDeclaration") { + r.tag = "Coq_stat_var_decl"; + if ("kind" in stat && stat.kind !== "var") { + throw new UnsupportedSyntaxError("Only var bindings are supported.", stat); + } + r.decls = toList(stat.declarations.map(trVarDecl)); + } else if (stat.type === "FunctionDeclaration") { + throw new UnsupportedSyntaxError("Function declaration in wrong place.", stat); + } else { + throw new EsprimaToASTError("trStat error: " + stat.type, stat); + }; + return r; + }; + + /*** Expressions ***/ + + var trExprAsLiteral = function (expr) { + var r = {loc: toLoc(expr.loc), type: "literal"}; + var v = expr.value; + var t = typeof(v); + if (t === "object" && expr.raw === "null") { + r.tag = "Coq_literal_null"; + } else if (t === "boolean") { + r.tag = "Coq_literal_bool"; + r.value = v; + } else if (t === "number") { + r.tag = "Coq_literal_number"; + r.value = v; + } else if (t === "string") { + r.tag = "Coq_literal_string"; + r.value = v; + } else if (t === "object" && expr.raw[0] === "/") { + throw new UnsupportedSyntaxError("Regular Expression literal: " + expr.raw, expr); + } else { + throw new EsprimaToASTError("trExprAsLiteral error: " + t, expr); + }; + return r; + }; + + var trExpr = function (expr) { + var r = {loc: toLoc(expr.loc), type: "expr"}; + if (expr.type === "ThisExpression") { + r.tag = "Coq_expr_this"; + } else if (expr.type === "ArrayExpression") { + r.tag = "Coq_expr_array"; + r.elements = toList(expr.elements.map(toOption.bind(null, trExpr))); + } else if (expr.type === "ObjectExpression") { + r.tag = "Coq_expr_object"; + r.fields = toList(expr.properties.map(trProperty)); + } else if (expr.type === "FunctionExpression") { + checkFuncExpr(expr); + r.tag = "Coq_expr_function"; + r.func_name_opt = toOption(trIdentifier, expr.id); + r.arg_names = toList(expr.params.map(trPattern)); + r.body = trBlockStatAsFuncbody(expr.body); + // TODO: USE STRICT + } else if (expr.type === "SequenceExpression") { + r = expr.expressions.map(trExpr).reduce(function (previousValue, currentValue) { + return { + type: "expr", + tag: "Coq_expr_binary_op", + arg1: previousValue, + op: { type: "binary_op", tag: "Coq_binary_op_coma" }, + arg2: currentValue, + loc: { + file: previousValue.loc.file, + start: previousValue.loc.start, + end: currentValue.loc.end + } + }; + }); + } else if (expr.type === "UnaryExpression") { + r.tag = "Coq_expr_unary_op"; + r.op = trUnaryOp(expr.operator); + // expr.prefix (boolean) unused + r.arg = trExpr(expr.argument); + } else if (expr.type === "BinaryExpression") { + r.tag = "Coq_expr_binary_op"; + r.arg1 = trExpr(expr.left); + r.op = trBinaryOp(expr.operator); + r.arg2 = trExpr(expr.right); + } else if (expr.type === "AssignmentExpression") { + r.tag = "Coq_expr_assign"; + r.left_expr = trExpr(expr.left); + r.op_opt = trAssignmentOp(expr.operator); + r.right_expr = trExpr(expr.right); + } else if (expr.type === "UpdateExpression") { + r.tag = "Coq_expr_unary_op"; + r.op = trUpdateOp(expr.operator, expr.prefix); + r.arg = trExpr(expr.argument); + } else if (expr.type === "LogicalExpression") { + r.tag = "Coq_expr_binary_op"; + r.arg1 = trExpr(expr.left); + r.op = trLogicalOp(expr.operator); + r.arg2 = trExpr(expr.right); + } else if (expr.type === "ConditionalExpression") { + r.tag = "Coq_expr_conditional"; + r.cond = trExpr(expr.test); + r.then_branch = trExpr(expr.consequent); + r.else_branch = trExpr(expr.alternate); + } else if (expr.type === "NewExpression") { + r.tag = "Coq_expr_new"; + r.func = trExpr(expr.callee); + r.args = toList(expr.arguments.map(trExpr)); + } else if (expr.type === "CallExpression") { + r.tag = "Coq_expr_call"; + r.func = trExpr(expr.callee); + r.args = toList(expr.arguments.map(trExpr)); + } else if (expr.type === "MemberExpression" && !expr.computed) { + r.tag = "Coq_expr_member"; + r.obj = trExpr(expr.object); + r.field_name = trIdentifier(expr.property); + } else if (expr.type === "MemberExpression" && expr.computed) { + r.tag = "Coq_expr_access"; + r.obj = trExpr(expr.object); + r.field = trExpr(expr.property); + } else if (expr.type === "Identifier") { + r.tag = "Coq_expr_identifier"; + r.name = trIdentifier(expr); + } else if (expr.type === "Literal") { + r.tag = "Coq_expr_literal"; + r.value = trExprAsLiteral(expr); + } else { + throw new EsprimaToASTError("trExpr error: " + expr.type, expr); + }; + return r; + }; + + var checkFuncExpr = function (expr) { + // Unsupported (ES6?) Syntax Checking + if (expr.generator || expr.expression || expr.rest || expr.defaults.length > 0) { + throw new UnsupportedSyntaxError("Function Expression", expr); + } + }; + + /*** Operators ***/ + + const unary_operators = Object.create(null); + unary_operators["-"] = "Coq_unary_op_neg"; + unary_operators["+"] = "Coq_unary_op_add"; + unary_operators["!"] = "Coq_unary_op_not"; + unary_operators["~"] = "Coq_unary_op_bitwise_not"; + unary_operators["void"] = "Coq_unary_op_void"; + unary_operators["typeof"] = "Coq_unary_op_typeof"; + unary_operators["delete"] = "Coq_unary_op_delete"; + var trUnaryOp = function (op) { + return { type: "unary_op", tag: unary_operators[op] }; + }; + + var binaryOpTagToObj = function (tag) { + return { type: "binary_op", tag: tag }; + }; + + const binary_operators = Object.create(null); + binary_operators["=="] = "Coq_binary_op_equal"; + binary_operators["!="] = "Coq_binary_op_disequal"; + binary_operators["==="] = "Coq_binary_op_strict_equal"; + binary_operators["!=="] = "Coq_binary_op_strict_disequal"; + binary_operators["<"] = "Coq_binary_op_lt"; + binary_operators["<="] = "Coq_binary_op_le"; + binary_operators[">"] = "Coq_binary_op_gt"; + binary_operators[">="] = "Coq_binary_op_ge"; + binary_operators["<<"] = "Coq_binary_op_left_shift"; + binary_operators[">>"] = "Coq_binary_op_right_shift"; + binary_operators[">>>"] = "Coq_binary_op_unsigned_right_shift"; + binary_operators["+"] = "Coq_binary_op_add"; + binary_operators["-"] = "Coq_binary_op_sub"; + binary_operators["*"] = "Coq_binary_op_mult"; + binary_operators["/"] = "Coq_binary_op_div"; + binary_operators["%"] = "Coq_binary_op_mod"; + binary_operators["|"] = "Coq_binary_op_bitwise_or"; + binary_operators["^"] = "Coq_binary_op_bitwise_xor"; + binary_operators["&"] = "Coq_binary_op_bitwise_and"; + binary_operators["in"] = "Coq_binary_op_in"; + binary_operators["instanceof"] = "Coq_binary_op_instanceof"; + var trBinaryOp = function (op) { + return binaryOpTagToObj(binary_operators[op]); + }; + + const assignment_operators = Object.create(null); + assignment_operators["="] = null; + assignment_operators["+="] = "Coq_binary_op_add"; + assignment_operators["-="] = "Coq_binary_op_sub"; + assignment_operators["*="] = "Coq_binary_op_mult"; + assignment_operators["/="] = "Coq_binary_op_div"; + assignment_operators["%="] = "Coq_binary_op_mod"; + assignment_operators["<<="] = "Coq_binary_op_left_shift"; + assignment_operators[">>="] = "Coq_binary_op_right_shift"; + assignment_operators[">>>="] = "Coq_binary_op_unsigned_right_shift"; + assignment_operators["|="] = "Coq_binary_op_bitwise_or"; + assignment_operators["^="] = "Coq_binary_op_bitwise_xor"; + assignment_operators["&="] = "Coq_binary_op_bitwise_and"; + var trAssignmentOp = function (op) { + return toOption(binaryOpTagToObj, assignment_operators[op]); + }; + + const update_operators = Object.create(null); + update_operators["++"] = "incr"; + update_operators["--"] = "decr"; + var trUpdateOp = function (op, prefix) { + var fix = prefix ? "pre" : "post"; + return { + type: "unary_op", + tag: "Coq_unary_op_" + fix + "_" + update_operators[op] + }; + }; + + const logical_operators = Object.create(null); + logical_operators["||"] = "Coq_binary_op_or"; + logical_operators["&&"] = "Coq_binary_op_and"; + var trLogicalOp = function (op) { + return { type: "binary_op", tag: logical_operators[op] }; + }; + + return trProg(prog); +} + + +/* Custom Error handler with JSON pretty-printing */ + +function toString(ast, maxDepth) { + if (maxDepth === undefined) { maxDepth = 3; } + + return JSON.stringify(ast, function ASTErrorJSONReplacer(key, value, depth) { + if (depth === undefined) { depth = maxDepth; } + + if (typeof value === "object") { + if (depth > 0) { + value = Object.assign({}, value); + for (var nestKey in value) { + value[nestKey] = ASTErrorJSONReplacer(nestKey, value[nestKey], depth - 1); + } + } else { + value = "RECURSION TRUNCATED"; + } + } + + return value; + }, 2); +} + +function NewASTErrorType(name, parentError) { + var error = function (message, expr) { + this.name = name; + this.message = message + "\n" + toString(expr); + if (Error.captureStackTrace) { Error.captureStackTrace(this, error); } + } + error.prototype = Object.create(parentError.prototype); + error.prototype.constructor = error; + return error; +} +var EsprimaToASTError = NewASTErrorType("EsprimaToASTError", Error); +var UnsupportedSyntaxError = NewASTErrorType("UnsupportedSyntaxError", EsprimaToASTError); + +try { + // For testing purposes with node + module.exports.esprimaToAST = esprimaToAST; + module.exports.EsprimaToASTError = EsprimaToASTError; + module.exports.UnsupportedSyntaxError = UnsupportedSyntaxError; + module.exports.toString = toString; +} catch (e) { + // Ignore these, as we're not using node +} diff --git a/branch/4.04/jquery-ui-1.11.4.custom/external/jquery/jquery.js b/branch/4.04/jquery-ui-1.11.4.custom/external/jquery/jquery.js new file mode 100644 index 0000000000000000000000000000000000000000..c5c648255c1574dcc95c506b82c25044f0972dfd --- /dev/null +++ b/branch/4.04/jquery-ui-1.11.4.custom/external/jquery/jquery.js @@ -0,0 +1,9789 @@ +/*! + * jQuery JavaScript Library v1.10.2 + * http://jquery.com/ + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * + * Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors + * Released under the MIT license + * http://jquery.org/license + * + * Date: 2013-07-03T13:48Z + */ +(function( window, undefined ) { + +// Can't do this because several apps including ASP.NET trace +// the stack via arguments.caller.callee and Firefox dies if +// you try to trace through "use strict" call chains. (#13335) +// Support: Firefox 18+ +//"use strict"; +var + // The deferred used on DOM ready + readyList, + + // A central reference to the root jQuery(document) + rootjQuery, + + // Support: IE<10 + // For `typeof xmlNode.method` instead of `xmlNode.method !== undefined` + core_strundefined = typeof undefined, + + // Use the correct document accordingly with window argument (sandbox) + location = window.location, + document = window.document, + docElem = document.documentElement, + + // Map over jQuery in case of overwrite + _jQuery = window.jQuery, + + // Map over the $ in case of overwrite + _$ = window.$, + + // [[Class]] -> type pairs + class2type = {}, + + // List of deleted data cache ids, so we can reuse them + core_deletedIds = [], + + core_version = "1.10.2", + + // Save a reference to some core methods + core_concat = core_deletedIds.concat, + core_push = core_deletedIds.push, + core_slice = core_deletedIds.slice, + core_indexOf = core_deletedIds.indexOf, + core_toString = class2type.toString, + core_hasOwn = class2type.hasOwnProperty, + core_trim = core_version.trim, + + // Define a local copy of jQuery + jQuery = function( selector, context ) { + // The jQuery object is actually just the init constructor 'enhanced' + return new jQuery.fn.init( selector, context, rootjQuery ); + }, + + // Used for matching numbers + core_pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source, + + // Used for splitting on whitespace + core_rnotwhite = /\S+/g, + + // Make sure we trim BOM and NBSP (here's looking at you, Safari 5.0 and IE) + rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, + + // A simple way to check for HTML strings + // Prioritize #id over <tag> to avoid XSS via location.hash (#9521) + // Strict HTML recognition (#11290: must start with <) + rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/, + + // Match a standalone tag + rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/, + + // JSON RegExp + rvalidchars = /^[\],:{}\s]*$/, + rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g, + rvalidescape = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g, + rvalidtokens = /"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g, + + // Matches dashed string for camelizing + rmsPrefix = /^-ms-/, + rdashAlpha = /-([\da-z])/gi, + + // Used by jQuery.camelCase as callback to replace() + fcamelCase = function( all, letter ) { + return letter.toUpperCase(); + }, + + // The ready event handler + completed = function( event ) { + + // readyState === "complete" is good enough for us to call the dom ready in oldIE + if ( document.addEventListener || event.type === "load" || document.readyState === "complete" ) { + detach(); + jQuery.ready(); + } + }, + // Clean-up method for dom ready events + detach = function() { + if ( document.addEventListener ) { + document.removeEventListener( "DOMContentLoaded", completed, false ); + window.removeEventListener( "load", completed, false ); + + } else { + document.detachEvent( "onreadystatechange", completed ); + window.detachEvent( "onload", completed ); + } + }; + +jQuery.fn = jQuery.prototype = { + // The current version of jQuery being used + jquery: core_version, + + constructor: jQuery, + init: function( selector, context, rootjQuery ) { + var match, elem; + + // HANDLE: $(""), $(null), $(undefined), $(false) + if ( !selector ) { + return this; + } + + // Handle HTML strings + if ( typeof selector === "string" ) { + if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) { + // Assume that strings that start and end with <> are HTML and skip the regex check + match = [ null, selector, null ]; + + } else { + match = rquickExpr.exec( selector ); + } + + // Match html or make sure no context is specified for #id + if ( match && (match[1] || !context) ) { + + // HANDLE: $(html) -> $(array) + if ( match[1] ) { + context = context instanceof jQuery ? context[0] : context; + + // scripts is true for back-compat + jQuery.merge( this, jQuery.parseHTML( + match[1], + context && context.nodeType ? context.ownerDocument || context : document, + true + ) ); + + // HANDLE: $(html, props) + if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) { + for ( match in context ) { + // Properties of context are called as methods if possible + if ( jQuery.isFunction( this[ match ] ) ) { + this[ match ]( context[ match ] ); + + // ...and otherwise set as attributes + } else { + this.attr( match, context[ match ] ); + } + } + } + + return this; + + // HANDLE: $(#id) + } else { + elem = document.getElementById( match[2] ); + + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + if ( elem && elem.parentNode ) { + // Handle the case where IE and Opera return items + // by name instead of ID + if ( elem.id !== match[2] ) { + return rootjQuery.find( selector ); + } + + // Otherwise, we inject the element directly into the jQuery object + this.length = 1; + this[0] = elem; + } + + this.context = document; + this.selector = selector; + return this; + } + + // HANDLE: $(expr, $(...)) + } else if ( !context || context.jquery ) { + return ( context || rootjQuery ).find( selector ); + + // HANDLE: $(expr, context) + // (which is just equivalent to: $(context).find(expr) + } else { + return this.constructor( context ).find( selector ); + } + + // HANDLE: $(DOMElement) + } else if ( selector.nodeType ) { + this.context = this[0] = selector; + this.length = 1; + return this; + + // HANDLE: $(function) + // Shortcut for document ready + } else if ( jQuery.isFunction( selector ) ) { + return rootjQuery.ready( selector ); + } + + if ( selector.selector !== undefined ) { + this.selector = selector.selector; + this.context = selector.context; + } + + return jQuery.makeArray( selector, this ); + }, + + // Start with an empty selector + selector: "", + + // The default length of a jQuery object is 0 + length: 0, + + toArray: function() { + return core_slice.call( this ); + }, + + // Get the Nth element in the matched element set OR + // Get the whole matched element set as a clean array + get: function( num ) { + return num == null ? + + // Return a 'clean' array + this.toArray() : + + // Return just the object + ( num < 0 ? this[ this.length + num ] : this[ num ] ); + }, + + // Take an array of elements and push it onto the stack + // (returning the new matched element set) + pushStack: function( elems ) { + + // Build a new jQuery matched element set + var ret = jQuery.merge( this.constructor(), elems ); + + // Add the old object onto the stack (as a reference) + ret.prevObject = this; + ret.context = this.context; + + // Return the newly-formed element set + return ret; + }, + + // Execute a callback for every element in the matched set. + // (You can seed the arguments with an array of args, but this is + // only used internally.) + each: function( callback, args ) { + return jQuery.each( this, callback, args ); + }, + + ready: function( fn ) { + // Add the callback + jQuery.ready.promise().done( fn ); + + return this; + }, + + slice: function() { + return this.pushStack( core_slice.apply( this, arguments ) ); + }, + + first: function() { + return this.eq( 0 ); + }, + + last: function() { + return this.eq( -1 ); + }, + + eq: function( i ) { + var len = this.length, + j = +i + ( i < 0 ? len : 0 ); + return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] ); + }, + + map: function( callback ) { + return this.pushStack( jQuery.map(this, function( elem, i ) { + return callback.call( elem, i, elem ); + })); + }, + + end: function() { + return this.prevObject || this.constructor(null); + }, + + // For internal use only. + // Behaves like an Array's method, not like a jQuery method. + push: core_push, + sort: [].sort, + splice: [].splice +}; + +// Give the init function the jQuery prototype for later instantiation +jQuery.fn.init.prototype = jQuery.fn; + +jQuery.extend = jQuery.fn.extend = function() { + var src, copyIsArray, copy, name, options, clone, + target = arguments[0] || {}, + i = 1, + length = arguments.length, + deep = false; + + // Handle a deep copy situation + if ( typeof target === "boolean" ) { + deep = target; + target = arguments[1] || {}; + // skip the boolean and the target + i = 2; + } + + // Handle case when target is a string or something (possible in deep copy) + if ( typeof target !== "object" && !jQuery.isFunction(target) ) { + target = {}; + } + + // extend jQuery itself if only one argument is passed + if ( length === i ) { + target = this; + --i; + } + + for ( ; i < length; i++ ) { + // Only deal with non-null/undefined values + if ( (options = arguments[ i ]) != null ) { + // Extend the base object + for ( name in options ) { + src = target[ name ]; + copy = options[ name ]; + + // Prevent never-ending loop + if ( target === copy ) { + continue; + } + + // Recurse if we're merging plain objects or arrays + if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { + if ( copyIsArray ) { + copyIsArray = false; + clone = src && jQuery.isArray(src) ? src : []; + + } else { + clone = src && jQuery.isPlainObject(src) ? src : {}; + } + + // Never move original objects, clone them + target[ name ] = jQuery.extend( deep, clone, copy ); + + // Don't bring in undefined values + } else if ( copy !== undefined ) { + target[ name ] = copy; + } + } + } + } + + // Return the modified object + return target; +}; + +jQuery.extend({ + // Unique for each copy of jQuery on the page + // Non-digits removed to match rinlinejQuery + expando: "jQuery" + ( core_version + Math.random() ).replace( /\D/g, "" ), + + noConflict: function( deep ) { + if ( window.$ === jQuery ) { + window.$ = _$; + } + + if ( deep && window.jQuery === jQuery ) { + window.jQuery = _jQuery; + } + + return jQuery; + }, + + // Is the DOM ready to be used? Set to true once it occurs. + isReady: false, + + // A counter to track how many items to wait for before + // the ready event fires. See #6781 + readyWait: 1, + + // Hold (or release) the ready event + holdReady: function( hold ) { + if ( hold ) { + jQuery.readyWait++; + } else { + jQuery.ready( true ); + } + }, + + // Handle when the DOM is ready + ready: function( wait ) { + + // Abort if there are pending holds or we're already ready + if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { + return; + } + + // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). + if ( !document.body ) { + return setTimeout( jQuery.ready ); + } + + // Remember that the DOM is ready + jQuery.isReady = true; + + // If a normal DOM Ready event fired, decrement, and wait if need be + if ( wait !== true && --jQuery.readyWait > 0 ) { + return; + } + + // If there are functions bound, to execute + readyList.resolveWith( document, [ jQuery ] ); + + // Trigger any bound ready events + if ( jQuery.fn.trigger ) { + jQuery( document ).trigger("ready").off("ready"); + } + }, + + // See test/unit/core.js for details concerning isFunction. + // Since version 1.3, DOM methods and functions like alert + // aren't supported. They return false on IE (#2968). + isFunction: function( obj ) { + return jQuery.type(obj) === "function"; + }, + + isArray: Array.isArray || function( obj ) { + return jQuery.type(obj) === "array"; + }, + + isWindow: function( obj ) { + /* jshint eqeqeq: false */ + return obj != null && obj == obj.window; + }, + + isNumeric: function( obj ) { + return !isNaN( parseFloat(obj) ) && isFinite( obj ); + }, + + type: function( obj ) { + if ( obj == null ) { + return String( obj ); + } + return typeof obj === "object" || typeof obj === "function" ? + class2type[ core_toString.call(obj) ] || "object" : + typeof obj; + }, + + isPlainObject: function( obj ) { + var key; + + // Must be an Object. + // Because of IE, we also have to check the presence of the constructor property. + // Make sure that DOM nodes and window objects don't pass through, as well + if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { + return false; + } + + try { + // Not own constructor property must be Object + if ( obj.constructor && + !core_hasOwn.call(obj, "constructor") && + !core_hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) { + return false; + } + } catch ( e ) { + // IE8,9 Will throw exceptions on certain host objects #9897 + return false; + } + + // Support: IE<9 + // Handle iteration over inherited properties before own properties. + if ( jQuery.support.ownLast ) { + for ( key in obj ) { + return core_hasOwn.call( obj, key ); + } + } + + // Own properties are enumerated firstly, so to speed up, + // if last one is own, then all properties are own. + for ( key in obj ) {} + + return key === undefined || core_hasOwn.call( obj, key ); + }, + + isEmptyObject: function( obj ) { + var name; + for ( name in obj ) { + return false; + } + return true; + }, + + error: function( msg ) { + throw new Error( msg ); + }, + + // data: string of html + // context (optional): If specified, the fragment will be created in this context, defaults to document + // keepScripts (optional): If true, will include scripts passed in the html string + parseHTML: function( data, context, keepScripts ) { + if ( !data || typeof data !== "string" ) { + return null; + } + if ( typeof context === "boolean" ) { + keepScripts = context; + context = false; + } + context = context || document; + + var parsed = rsingleTag.exec( data ), + scripts = !keepScripts && []; + + // Single tag + if ( parsed ) { + return [ context.createElement( parsed[1] ) ]; + } + + parsed = jQuery.buildFragment( [ data ], context, scripts ); + if ( scripts ) { + jQuery( scripts ).remove(); + } + return jQuery.merge( [], parsed.childNodes ); + }, + + parseJSON: function( data ) { + // Attempt to parse using the native JSON parser first + if ( window.JSON && window.JSON.parse ) { + return window.JSON.parse( data ); + } + + if ( data === null ) { + return data; + } + + if ( typeof data === "string" ) { + + // Make sure leading/trailing whitespace is removed (IE can't handle it) + data = jQuery.trim( data ); + + if ( data ) { + // Make sure the incoming data is actual JSON + // Logic borrowed from http://json.org/json2.js + if ( rvalidchars.test( data.replace( rvalidescape, "@" ) + .replace( rvalidtokens, "]" ) + .replace( rvalidbraces, "")) ) { + + return ( new Function( "return " + data ) )(); + } + } + } + + jQuery.error( "Invalid JSON: " + data ); + }, + + // Cross-browser xml parsing + parseXML: function( data ) { + var xml, tmp; + if ( !data || typeof data !== "string" ) { + return null; + } + try { + if ( window.DOMParser ) { // Standard + tmp = new DOMParser(); + xml = tmp.parseFromString( data , "text/xml" ); + } else { // IE + xml = new ActiveXObject( "Microsoft.XMLDOM" ); + xml.async = "false"; + xml.loadXML( data ); + } + } catch( e ) { + xml = undefined; + } + if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) { + jQuery.error( "Invalid XML: " + data ); + } + return xml; + }, + + noop: function() {}, + + // Evaluates a script in a global context + // Workarounds based on findings by Jim Driscoll + // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context + globalEval: function( data ) { + if ( data && jQuery.trim( data ) ) { + // We use execScript on Internet Explorer + // We use an anonymous function so that context is window + // rather than jQuery in Firefox + ( window.execScript || function( data ) { + window[ "eval" ].call( window, data ); + } )( data ); + } + }, + + // Convert dashed to camelCase; used by the css and data modules + // Microsoft forgot to hump their vendor prefix (#9572) + camelCase: function( string ) { + return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); + }, + + nodeName: function( elem, name ) { + return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); + }, + + // args is for internal usage only + each: function( obj, callback, args ) { + var value, + i = 0, + length = obj.length, + isArray = isArraylike( obj ); + + if ( args ) { + if ( isArray ) { + for ( ; i < length; i++ ) { + value = callback.apply( obj[ i ], args ); + + if ( value === false ) { + break; + } + } + } else { + for ( i in obj ) { + value = callback.apply( obj[ i ], args ); + + if ( value === false ) { + break; + } + } + } + + // A special, fast, case for the most common use of each + } else { + if ( isArray ) { + for ( ; i < length; i++ ) { + value = callback.call( obj[ i ], i, obj[ i ] ); + + if ( value === false ) { + break; + } + } + } else { + for ( i in obj ) { + value = callback.call( obj[ i ], i, obj[ i ] ); + + if ( value === false ) { + break; + } + } + } + } + + return obj; + }, + + // Use native String.trim function wherever possible + trim: core_trim && !core_trim.call("\uFEFF\xA0") ? + function( text ) { + return text == null ? + "" : + core_trim.call( text ); + } : + + // Otherwise use our own trimming functionality + function( text ) { + return text == null ? + "" : + ( text + "" ).replace( rtrim, "" ); + }, + + // results is for internal usage only + makeArray: function( arr, results ) { + var ret = results || []; + + if ( arr != null ) { + if ( isArraylike( Object(arr) ) ) { + jQuery.merge( ret, + typeof arr === "string" ? + [ arr ] : arr + ); + } else { + core_push.call( ret, arr ); + } + } + + return ret; + }, + + inArray: function( elem, arr, i ) { + var len; + + if ( arr ) { + if ( core_indexOf ) { + return core_indexOf.call( arr, elem, i ); + } + + len = arr.length; + i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0; + + for ( ; i < len; i++ ) { + // Skip accessing in sparse arrays + if ( i in arr && arr[ i ] === elem ) { + return i; + } + } + } + + return -1; + }, + + merge: function( first, second ) { + var l = second.length, + i = first.length, + j = 0; + + if ( typeof l === "number" ) { + for ( ; j < l; j++ ) { + first[ i++ ] = second[ j ]; + } + } else { + while ( second[j] !== undefined ) { + first[ i++ ] = second[ j++ ]; + } + } + + first.length = i; + + return first; + }, + + grep: function( elems, callback, inv ) { + var retVal, + ret = [], + i = 0, + length = elems.length; + inv = !!inv; + + // Go through the array, only saving the items + // that pass the validator function + for ( ; i < length; i++ ) { + retVal = !!callback( elems[ i ], i ); + if ( inv !== retVal ) { + ret.push( elems[ i ] ); + } + } + + return ret; + }, + + // arg is for internal usage only + map: function( elems, callback, arg ) { + var value, + i = 0, + length = elems.length, + isArray = isArraylike( elems ), + ret = []; + + // Go through the array, translating each of the items to their + if ( isArray ) { + for ( ; i < length; i++ ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret[ ret.length ] = value; + } + } + + // Go through every key on the object, + } else { + for ( i in elems ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret[ ret.length ] = value; + } + } + } + + // Flatten any nested arrays + return core_concat.apply( [], ret ); + }, + + // A global GUID counter for objects + guid: 1, + + // Bind a function to a context, optionally partially applying any + // arguments. + proxy: function( fn, context ) { + var args, proxy, tmp; + + if ( typeof context === "string" ) { + tmp = fn[ context ]; + context = fn; + fn = tmp; + } + + // Quick check to determine if target is callable, in the spec + // this throws a TypeError, but we will just return undefined. + if ( !jQuery.isFunction( fn ) ) { + return undefined; + } + + // Simulated bind + args = core_slice.call( arguments, 2 ); + proxy = function() { + return fn.apply( context || this, args.concat( core_slice.call( arguments ) ) ); + }; + + // Set the guid of unique handler to the same of original handler, so it can be removed + proxy.guid = fn.guid = fn.guid || jQuery.guid++; + + return proxy; + }, + + // Multifunctional method to get and set values of a collection + // The value/s can optionally be executed if it's a function + access: function( elems, fn, key, value, chainable, emptyGet, raw ) { + var i = 0, + length = elems.length, + bulk = key == null; + + // Sets many values + if ( jQuery.type( key ) === "object" ) { + chainable = true; + for ( i in key ) { + jQuery.access( elems, fn, i, key[i], true, emptyGet, raw ); + } + + // Sets one value + } else if ( value !== undefined ) { + chainable = true; + + if ( !jQuery.isFunction( value ) ) { + raw = true; + } + + if ( bulk ) { + // Bulk operations run against the entire set + if ( raw ) { + fn.call( elems, value ); + fn = null; + + // ...except when executing function values + } else { + bulk = fn; + fn = function( elem, key, value ) { + return bulk.call( jQuery( elem ), value ); + }; + } + } + + if ( fn ) { + for ( ; i < length; i++ ) { + fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) ); + } + } + } + + return chainable ? + elems : + + // Gets + bulk ? + fn.call( elems ) : + length ? fn( elems[0], key ) : emptyGet; + }, + + now: function() { + return ( new Date() ).getTime(); + }, + + // A method for quickly swapping in/out CSS properties to get correct calculations. + // Note: this method belongs to the css module but it's needed here for the support module. + // If support gets modularized, this method should be moved back to the css module. + swap: function( elem, options, callback, args ) { + var ret, name, + old = {}; + + // Remember the old values, and insert the new ones + for ( name in options ) { + old[ name ] = elem.style[ name ]; + elem.style[ name ] = options[ name ]; + } + + ret = callback.apply( elem, args || [] ); + + // Revert the old values + for ( name in options ) { + elem.style[ name ] = old[ name ]; + } + + return ret; + } +}); + +jQuery.ready.promise = function( obj ) { + if ( !readyList ) { + + readyList = jQuery.Deferred(); + + // Catch cases where $(document).ready() is called after the browser event has already occurred. + // we once tried to use readyState "interactive" here, but it caused issues like the one + // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15 + if ( document.readyState === "complete" ) { + // Handle it asynchronously to allow scripts the opportunity to delay ready + setTimeout( jQuery.ready ); + + // Standards-based browsers support DOMContentLoaded + } else if ( document.addEventListener ) { + // Use the handy event callback + document.addEventListener( "DOMContentLoaded", completed, false ); + + // A fallback to window.onload, that will always work + window.addEventListener( "load", completed, false ); + + // If IE event model is used + } else { + // Ensure firing before onload, maybe late but safe also for iframes + document.attachEvent( "onreadystatechange", completed ); + + // A fallback to window.onload, that will always work + window.attachEvent( "onload", completed ); + + // If IE and not a frame + // continually check to see if the document is ready + var top = false; + + try { + top = window.frameElement == null && document.documentElement; + } catch(e) {} + + if ( top && top.doScroll ) { + (function doScrollCheck() { + if ( !jQuery.isReady ) { + + try { + // Use the trick by Diego Perini + // http://javascript.nwbox.com/IEContentLoaded/ + top.doScroll("left"); + } catch(e) { + return setTimeout( doScrollCheck, 50 ); + } + + // detach all dom ready events + detach(); + + // and execute any waiting functions + jQuery.ready(); + } + })(); + } + } + } + return readyList.promise( obj ); +}; + +// Populate the class2type map +jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) { + class2type[ "[object " + name + "]" ] = name.toLowerCase(); +}); + +function isArraylike( obj ) { + var length = obj.length, + type = jQuery.type( obj ); + + if ( jQuery.isWindow( obj ) ) { + return false; + } + + if ( obj.nodeType === 1 && length ) { + return true; + } + + return type === "array" || type !== "function" && + ( length === 0 || + typeof length === "number" && length > 0 && ( length - 1 ) in obj ); +} + +// All jQuery objects should point back to these +rootjQuery = jQuery(document); +/*! + * Sizzle CSS Selector Engine v1.10.2 + * http://sizzlejs.com/ + * + * Copyright 2013 jQuery Foundation, Inc. and other contributors + * Released under the MIT license + * http://jquery.org/license + * + * Date: 2013-07-03 + */ +(function( window, undefined ) { + +var i, + support, + cachedruns, + Expr, + getText, + isXML, + compile, + outermostContext, + sortInput, + + // Local document vars + setDocument, + document, + docElem, + documentIsHTML, + rbuggyQSA, + rbuggyMatches, + matches, + contains, + + // Instance-specific data + expando = "sizzle" + -(new Date()), + preferredDoc = window.document, + dirruns = 0, + done = 0, + classCache = createCache(), + tokenCache = createCache(), + compilerCache = createCache(), + hasDuplicate = false, + sortOrder = function( a, b ) { + if ( a === b ) { + hasDuplicate = true; + return 0; + } + return 0; + }, + + // General-purpose constants + strundefined = typeof undefined, + MAX_NEGATIVE = 1 << 31, + + // Instance methods + hasOwn = ({}).hasOwnProperty, + arr = [], + pop = arr.pop, + push_native = arr.push, + push = arr.push, + slice = arr.slice, + // Use a stripped-down indexOf if we can't use a native one + indexOf = arr.indexOf || function( elem ) { + var i = 0, + len = this.length; + for ( ; i < len; i++ ) { + if ( this[i] === elem ) { + return i; + } + } + return -1; + }, + + booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", + + // Regular expressions + + // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace + whitespace = "[\\x20\\t\\r\\n\\f]", + // http://www.w3.org/TR/css3-syntax/#characters + characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", + + // Loosely modeled on CSS identifier characters + // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors + // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier + identifier = characterEncoding.replace( "w", "w#" ), + + // Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors + attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace + + "*(?:([*^$|!~]?=)" + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]", + + // Prefer arguments quoted, + // then not containing pseudos/brackets, + // then attribute selectors/non-parenthetical expressions, + // then anything else + // These preferences are here to reduce the number of selectors + // needing tokenize in the PSEUDO preFilter + pseudos = ":(" + characterEncoding + ")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + attributes.replace( 3, 8 ) + ")*)|.*)\\)|)", + + // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter + rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), + + rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), + rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ), + + rsibling = new RegExp( whitespace + "*[+~]" ), + rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*)" + whitespace + "*\\]", "g" ), + + rpseudo = new RegExp( pseudos ), + ridentifier = new RegExp( "^" + identifier + "$" ), + + matchExpr = { + "ID": new RegExp( "^#(" + characterEncoding + ")" ), + "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ), + "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ), + "ATTR": new RegExp( "^" + attributes ), + "PSEUDO": new RegExp( "^" + pseudos ), + "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), + "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), + // For use in libraries implementing .is() + // We use this for POS matching in `select` + "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + + whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) + }, + + rnative = /^[^{]+\{\s*\[native \w/, + + // Easily-parseable/retrievable ID or TAG or CLASS selectors + rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, + + rinputs = /^(?:input|select|textarea|button)$/i, + rheader = /^h\d$/i, + + rescape = /'|\\/g, + + // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters + runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ), + funescape = function( _, escaped, escapedWhitespace ) { + var high = "0x" + escaped - 0x10000; + // NaN means non-codepoint + // Support: Firefox + // Workaround erroneous numeric interpretation of +"0x" + return high !== high || escapedWhitespace ? + escaped : + // BMP codepoint + high < 0 ? + String.fromCharCode( high + 0x10000 ) : + // Supplemental Plane codepoint (surrogate pair) + String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); + }; + +// Optimize for push.apply( _, NodeList ) +try { + push.apply( + (arr = slice.call( preferredDoc.childNodes )), + preferredDoc.childNodes + ); + // Support: Android<4.0 + // Detect silently failing push.apply + arr[ preferredDoc.childNodes.length ].nodeType; +} catch ( e ) { + push = { apply: arr.length ? + + // Leverage slice if possible + function( target, els ) { + push_native.apply( target, slice.call(els) ); + } : + + // Support: IE<9 + // Otherwise append directly + function( target, els ) { + var j = target.length, + i = 0; + // Can't trust NodeList.length + while ( (target[j++] = els[i++]) ) {} + target.length = j - 1; + } + }; +} + +function Sizzle( selector, context, results, seed ) { + var match, elem, m, nodeType, + // QSA vars + i, groups, old, nid, newContext, newSelector; + + if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { + setDocument( context ); + } + + context = context || document; + results = results || []; + + if ( !selector || typeof selector !== "string" ) { + return results; + } + + if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) { + return []; + } + + if ( documentIsHTML && !seed ) { + + // Shortcuts + if ( (match = rquickExpr.exec( selector )) ) { + // Speed-up: Sizzle("#ID") + if ( (m = match[1]) ) { + if ( nodeType === 9 ) { + elem = context.getElementById( m ); + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + if ( elem && elem.parentNode ) { + // Handle the case where IE, Opera, and Webkit return items + // by name instead of ID + if ( elem.id === m ) { + results.push( elem ); + return results; + } + } else { + return results; + } + } else { + // Context is not a document + if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) && + contains( context, elem ) && elem.id === m ) { + results.push( elem ); + return results; + } + } + + // Speed-up: Sizzle("TAG") + } else if ( match[2] ) { + push.apply( results, context.getElementsByTagName( selector ) ); + return results; + + // Speed-up: Sizzle(".CLASS") + } else if ( (m = match[3]) && support.getElementsByClassName && context.getElementsByClassName ) { + push.apply( results, context.getElementsByClassName( m ) ); + return results; + } + } + + // QSA path + if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) { + nid = old = expando; + newContext = context; + newSelector = nodeType === 9 && selector; + + // qSA works strangely on Element-rooted queries + // We can work around this by specifying an extra ID on the root + // and working up from there (Thanks to Andrew Dupont for the technique) + // IE 8 doesn't work on object elements + if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { + groups = tokenize( selector ); + + if ( (old = context.getAttribute("id")) ) { + nid = old.replace( rescape, "\\$&" ); + } else { + context.setAttribute( "id", nid ); + } + nid = "[id='" + nid + "'] "; + + i = groups.length; + while ( i-- ) { + groups[i] = nid + toSelector( groups[i] ); + } + newContext = rsibling.test( selector ) && context.parentNode || context; + newSelector = groups.join(","); + } + + if ( newSelector ) { + try { + push.apply( results, + newContext.querySelectorAll( newSelector ) + ); + return results; + } catch(qsaError) { + } finally { + if ( !old ) { + context.removeAttribute("id"); + } + } + } + } + } + + // All others + return select( selector.replace( rtrim, "$1" ), context, results, seed ); +} + +/** + * Create key-value caches of limited size + * @returns {Function(string, Object)} Returns the Object data after storing it on itself with + * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) + * deleting the oldest entry + */ +function createCache() { + var keys = []; + + function cache( key, value ) { + // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) + if ( keys.push( key += " " ) > Expr.cacheLength ) { + // Only keep the most recent entries + delete cache[ keys.shift() ]; + } + return (cache[ key ] = value); + } + return cache; +} + +/** + * Mark a function for special use by Sizzle + * @param {Function} fn The function to mark + */ +function markFunction( fn ) { + fn[ expando ] = true; + return fn; +} + +/** + * Support testing using an element + * @param {Function} fn Passed the created div and expects a boolean result + */ +function assert( fn ) { + var div = document.createElement("div"); + + try { + return !!fn( div ); + } catch (e) { + return false; + } finally { + // Remove from its parent by default + if ( div.parentNode ) { + div.parentNode.removeChild( div ); + } + // release memory in IE + div = null; + } +} + +/** + * Adds the same handler for all of the specified attrs + * @param {String} attrs Pipe-separated list of attributes + * @param {Function} handler The method that will be applied + */ +function addHandle( attrs, handler ) { + var arr = attrs.split("|"), + i = attrs.length; + + while ( i-- ) { + Expr.attrHandle[ arr[i] ] = handler; + } +} + +/** + * Checks document order of two siblings + * @param {Element} a + * @param {Element} b + * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b + */ +function siblingCheck( a, b ) { + var cur = b && a, + diff = cur && a.nodeType === 1 && b.nodeType === 1 && + ( ~b.sourceIndex || MAX_NEGATIVE ) - + ( ~a.sourceIndex || MAX_NEGATIVE ); + + // Use IE sourceIndex if available on both nodes + if ( diff ) { + return diff; + } + + // Check if b follows a + if ( cur ) { + while ( (cur = cur.nextSibling) ) { + if ( cur === b ) { + return -1; + } + } + } + + return a ? 1 : -1; +} + +/** + * Returns a function to use in pseudos for input types + * @param {String} type + */ +function createInputPseudo( type ) { + return function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && elem.type === type; + }; +} + +/** + * Returns a function to use in pseudos for buttons + * @param {String} type + */ +function createButtonPseudo( type ) { + return function( elem ) { + var name = elem.nodeName.toLowerCase(); + return (name === "input" || name === "button") && elem.type === type; + }; +} + +/** + * Returns a function to use in pseudos for positionals + * @param {Function} fn + */ +function createPositionalPseudo( fn ) { + return markFunction(function( argument ) { + argument = +argument; + return markFunction(function( seed, matches ) { + var j, + matchIndexes = fn( [], seed.length, argument ), + i = matchIndexes.length; + + // Match elements found at the specified indexes + while ( i-- ) { + if ( seed[ (j = matchIndexes[i]) ] ) { + seed[j] = !(matches[j] = seed[j]); + } + } + }); + }); +} + +/** + * Detect xml + * @param {Element|Object} elem An element or a document + */ +isXML = Sizzle.isXML = function( elem ) { + // documentElement is verified for cases where it doesn't yet exist + // (such as loading iframes in IE - #4833) + var documentElement = elem && (elem.ownerDocument || elem).documentElement; + return documentElement ? documentElement.nodeName !== "HTML" : false; +}; + +// Expose support vars for convenience +support = Sizzle.support = {}; + +/** + * Sets document-related variables once based on the current document + * @param {Element|Object} [doc] An element or document object to use to set the document + * @returns {Object} Returns the current document + */ +setDocument = Sizzle.setDocument = function( node ) { + var doc = node ? node.ownerDocument || node : preferredDoc, + parent = doc.defaultView; + + // If no document and documentElement is available, return + if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { + return document; + } + + // Set our document + document = doc; + docElem = doc.documentElement; + + // Support tests + documentIsHTML = !isXML( doc ); + + // Support: IE>8 + // If iframe document is assigned to "document" variable and if iframe has been reloaded, + // IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936 + // IE6-8 do not support the defaultView property so parent will be undefined + if ( parent && parent.attachEvent && parent !== parent.top ) { + parent.attachEvent( "onbeforeunload", function() { + setDocument(); + }); + } + + /* Attributes + ---------------------------------------------------------------------- */ + + // Support: IE<8 + // Verify that getAttribute really returns attributes and not properties (excepting IE8 booleans) + support.attributes = assert(function( div ) { + div.className = "i"; + return !div.getAttribute("className"); + }); + + /* getElement(s)By* + ---------------------------------------------------------------------- */ + + // Check if getElementsByTagName("*") returns only elements + support.getElementsByTagName = assert(function( div ) { + div.appendChild( doc.createComment("") ); + return !div.getElementsByTagName("*").length; + }); + + // Check if getElementsByClassName can be trusted + support.getElementsByClassName = assert(function( div ) { + div.innerHTML = "<div class='a'></div><div class='a i'></div>"; + + // Support: Safari<4 + // Catch class over-caching + div.firstChild.className = "i"; + // Support: Opera<10 + // Catch gEBCN failure to find non-leading classes + return div.getElementsByClassName("i").length === 2; + }); + + // Support: IE<10 + // Check if getElementById returns elements by name + // The broken getElementById methods don't pick up programatically-set names, + // so use a roundabout getElementsByName test + support.getById = assert(function( div ) { + docElem.appendChild( div ).id = expando; + return !doc.getElementsByName || !doc.getElementsByName( expando ).length; + }); + + // ID find and filter + if ( support.getById ) { + Expr.find["ID"] = function( id, context ) { + if ( typeof context.getElementById !== strundefined && documentIsHTML ) { + var m = context.getElementById( id ); + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + return m && m.parentNode ? [m] : []; + } + }; + Expr.filter["ID"] = function( id ) { + var attrId = id.replace( runescape, funescape ); + return function( elem ) { + return elem.getAttribute("id") === attrId; + }; + }; + } else { + // Support: IE6/7 + // getElementById is not reliable as a find shortcut + delete Expr.find["ID"]; + + Expr.filter["ID"] = function( id ) { + var attrId = id.replace( runescape, funescape ); + return function( elem ) { + var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id"); + return node && node.value === attrId; + }; + }; + } + + // Tag + Expr.find["TAG"] = support.getElementsByTagName ? + function( tag, context ) { + if ( typeof context.getElementsByTagName !== strundefined ) { + return context.getElementsByTagName( tag ); + } + } : + function( tag, context ) { + var elem, + tmp = [], + i = 0, + results = context.getElementsByTagName( tag ); + + // Filter out possible comments + if ( tag === "*" ) { + while ( (elem = results[i++]) ) { + if ( elem.nodeType === 1 ) { + tmp.push( elem ); + } + } + + return tmp; + } + return results; + }; + + // Class + Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) { + if ( typeof context.getElementsByClassName !== strundefined && documentIsHTML ) { + return context.getElementsByClassName( className ); + } + }; + + /* QSA/matchesSelector + ---------------------------------------------------------------------- */ + + // QSA and matchesSelector support + + // matchesSelector(:active) reports false when true (IE9/Opera 11.5) + rbuggyMatches = []; + + // qSa(:focus) reports false when true (Chrome 21) + // We allow this because of a bug in IE8/9 that throws an error + // whenever `document.activeElement` is accessed on an iframe + // So, we allow :focus to pass through QSA all the time to avoid the IE error + // See http://bugs.jquery.com/ticket/13378 + rbuggyQSA = []; + + if ( (support.qsa = rnative.test( doc.querySelectorAll )) ) { + // Build QSA regex + // Regex strategy adopted from Diego Perini + assert(function( div ) { + // Select is set to empty string on purpose + // This is to test IE's treatment of not explicitly + // setting a boolean content attribute, + // since its presence should be enough + // http://bugs.jquery.com/ticket/12359 + div.innerHTML = "<select><option selected=''></option></select>"; + + // Support: IE8 + // Boolean attributes and "value" are not treated correctly + if ( !div.querySelectorAll("[selected]").length ) { + rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); + } + + // Webkit/Opera - :checked should return selected option elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + // IE8 throws error here and will not see later tests + if ( !div.querySelectorAll(":checked").length ) { + rbuggyQSA.push(":checked"); + } + }); + + assert(function( div ) { + + // Support: Opera 10-12/IE8 + // ^= $= *= and empty values + // Should not select anything + // Support: Windows 8 Native Apps + // The type attribute is restricted during .innerHTML assignment + var input = doc.createElement("input"); + input.setAttribute( "type", "hidden" ); + div.appendChild( input ).setAttribute( "t", "" ); + + if ( div.querySelectorAll("[t^='']").length ) { + rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); + } + + // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) + // IE8 throws error here and will not see later tests + if ( !div.querySelectorAll(":enabled").length ) { + rbuggyQSA.push( ":enabled", ":disabled" ); + } + + // Opera 10-11 does not throw on post-comma invalid pseudos + div.querySelectorAll("*,:x"); + rbuggyQSA.push(",.*:"); + }); + } + + if ( (support.matchesSelector = rnative.test( (matches = docElem.webkitMatchesSelector || + docElem.mozMatchesSelector || + docElem.oMatchesSelector || + docElem.msMatchesSelector) )) ) { + + assert(function( div ) { + // Check to see if it's possible to do matchesSelector + // on a disconnected node (IE 9) + support.disconnectedMatch = matches.call( div, "div" ); + + // This should fail with an exception + // Gecko does not error, returns false instead + matches.call( div, "[s!='']:x" ); + rbuggyMatches.push( "!=", pseudos ); + }); + } + + rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") ); + rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") ); + + /* Contains + ---------------------------------------------------------------------- */ + + // Element contains another + // Purposefully does not implement inclusive descendent + // As in, an element does not contain itself + contains = rnative.test( docElem.contains ) || docElem.compareDocumentPosition ? + function( a, b ) { + var adown = a.nodeType === 9 ? a.documentElement : a, + bup = b && b.parentNode; + return a === bup || !!( bup && bup.nodeType === 1 && ( + adown.contains ? + adown.contains( bup ) : + a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 + )); + } : + function( a, b ) { + if ( b ) { + while ( (b = b.parentNode) ) { + if ( b === a ) { + return true; + } + } + } + return false; + }; + + /* Sorting + ---------------------------------------------------------------------- */ + + // Document order sorting + sortOrder = docElem.compareDocumentPosition ? + function( a, b ) { + + // Flag for duplicate removal + if ( a === b ) { + hasDuplicate = true; + return 0; + } + + var compare = b.compareDocumentPosition && a.compareDocumentPosition && a.compareDocumentPosition( b ); + + if ( compare ) { + // Disconnected nodes + if ( compare & 1 || + (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) { + + // Choose the first element that is related to our preferred document + if ( a === doc || contains(preferredDoc, a) ) { + return -1; + } + if ( b === doc || contains(preferredDoc, b) ) { + return 1; + } + + // Maintain original order + return sortInput ? + ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) : + 0; + } + + return compare & 4 ? -1 : 1; + } + + // Not directly comparable, sort on existence of method + return a.compareDocumentPosition ? -1 : 1; + } : + function( a, b ) { + var cur, + i = 0, + aup = a.parentNode, + bup = b.parentNode, + ap = [ a ], + bp = [ b ]; + + // Exit early if the nodes are identical + if ( a === b ) { + hasDuplicate = true; + return 0; + + // Parentless nodes are either documents or disconnected + } else if ( !aup || !bup ) { + return a === doc ? -1 : + b === doc ? 1 : + aup ? -1 : + bup ? 1 : + sortInput ? + ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) : + 0; + + // If the nodes are siblings, we can do a quick check + } else if ( aup === bup ) { + return siblingCheck( a, b ); + } + + // Otherwise we need full lists of their ancestors for comparison + cur = a; + while ( (cur = cur.parentNode) ) { + ap.unshift( cur ); + } + cur = b; + while ( (cur = cur.parentNode) ) { + bp.unshift( cur ); + } + + // Walk down the tree looking for a discrepancy + while ( ap[i] === bp[i] ) { + i++; + } + + return i ? + // Do a sibling check if the nodes have a common ancestor + siblingCheck( ap[i], bp[i] ) : + + // Otherwise nodes in our document sort first + ap[i] === preferredDoc ? -1 : + bp[i] === preferredDoc ? 1 : + 0; + }; + + return doc; +}; + +Sizzle.matches = function( expr, elements ) { + return Sizzle( expr, null, null, elements ); +}; + +Sizzle.matchesSelector = function( elem, expr ) { + // Set document vars if needed + if ( ( elem.ownerDocument || elem ) !== document ) { + setDocument( elem ); + } + + // Make sure that attribute selectors are quoted + expr = expr.replace( rattributeQuotes, "='$1']" ); + + if ( support.matchesSelector && documentIsHTML && + ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && + ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { + + try { + var ret = matches.call( elem, expr ); + + // IE 9's matchesSelector returns false on disconnected nodes + if ( ret || support.disconnectedMatch || + // As well, disconnected nodes are said to be in a document + // fragment in IE 9 + elem.document && elem.document.nodeType !== 11 ) { + return ret; + } + } catch(e) {} + } + + return Sizzle( expr, document, null, [elem] ).length > 0; +}; + +Sizzle.contains = function( context, elem ) { + // Set document vars if needed + if ( ( context.ownerDocument || context ) !== document ) { + setDocument( context ); + } + return contains( context, elem ); +}; + +Sizzle.attr = function( elem, name ) { + // Set document vars if needed + if ( ( elem.ownerDocument || elem ) !== document ) { + setDocument( elem ); + } + + var fn = Expr.attrHandle[ name.toLowerCase() ], + // Don't get fooled by Object.prototype properties (jQuery #13807) + val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? + fn( elem, name, !documentIsHTML ) : + undefined; + + return val === undefined ? + support.attributes || !documentIsHTML ? + elem.getAttribute( name ) : + (val = elem.getAttributeNode(name)) && val.specified ? + val.value : + null : + val; +}; + +Sizzle.error = function( msg ) { + throw new Error( "Syntax error, unrecognized expression: " + msg ); +}; + +/** + * Document sorting and removing duplicates + * @param {ArrayLike} results + */ +Sizzle.uniqueSort = function( results ) { + var elem, + duplicates = [], + j = 0, + i = 0; + + // Unless we *know* we can detect duplicates, assume their presence + hasDuplicate = !support.detectDuplicates; + sortInput = !support.sortStable && results.slice( 0 ); + results.sort( sortOrder ); + + if ( hasDuplicate ) { + while ( (elem = results[i++]) ) { + if ( elem === results[ i ] ) { + j = duplicates.push( i ); + } + } + while ( j-- ) { + results.splice( duplicates[ j ], 1 ); + } + } + + return results; +}; + +/** + * Utility function for retrieving the text value of an array of DOM nodes + * @param {Array|Element} elem + */ +getText = Sizzle.getText = function( elem ) { + var node, + ret = "", + i = 0, + nodeType = elem.nodeType; + + if ( !nodeType ) { + // If no nodeType, this is expected to be an array + for ( ; (node = elem[i]); i++ ) { + // Do not traverse comment nodes + ret += getText( node ); + } + } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { + // Use textContent for elements + // innerText usage removed for consistency of new lines (see #11153) + if ( typeof elem.textContent === "string" ) { + return elem.textContent; + } else { + // Traverse its children + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { + ret += getText( elem ); + } + } + } else if ( nodeType === 3 || nodeType === 4 ) { + return elem.nodeValue; + } + // Do not include comment or processing instruction nodes + + return ret; +}; + +Expr = Sizzle.selectors = { + + // Can be adjusted by the user + cacheLength: 50, + + createPseudo: markFunction, + + match: matchExpr, + + attrHandle: {}, + + find: {}, + + relative: { + ">": { dir: "parentNode", first: true }, + " ": { dir: "parentNode" }, + "+": { dir: "previousSibling", first: true }, + "~": { dir: "previousSibling" } + }, + + preFilter: { + "ATTR": function( match ) { + match[1] = match[1].replace( runescape, funescape ); + + // Move the given value to match[3] whether quoted or unquoted + match[3] = ( match[4] || match[5] || "" ).replace( runescape, funescape ); + + if ( match[2] === "~=" ) { + match[3] = " " + match[3] + " "; + } + + return match.slice( 0, 4 ); + }, + + "CHILD": function( match ) { + /* matches from matchExpr["CHILD"] + 1 type (only|nth|...) + 2 what (child|of-type) + 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) + 4 xn-component of xn+y argument ([+-]?\d*n|) + 5 sign of xn-component + 6 x of xn-component + 7 sign of y-component + 8 y of y-component + */ + match[1] = match[1].toLowerCase(); + + if ( match[1].slice( 0, 3 ) === "nth" ) { + // nth-* requires argument + if ( !match[3] ) { + Sizzle.error( match[0] ); + } + + // numeric x and y parameters for Expr.filter.CHILD + // remember that false/true cast respectively to 0/1 + match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) ); + match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" ); + + // other types prohibit arguments + } else if ( match[3] ) { + Sizzle.error( match[0] ); + } + + return match; + }, + + "PSEUDO": function( match ) { + var excess, + unquoted = !match[5] && match[2]; + + if ( matchExpr["CHILD"].test( match[0] ) ) { + return null; + } + + // Accept quoted arguments as-is + if ( match[3] && match[4] !== undefined ) { + match[2] = match[4]; + + // Strip excess characters from unquoted arguments + } else if ( unquoted && rpseudo.test( unquoted ) && + // Get excess from tokenize (recursively) + (excess = tokenize( unquoted, true )) && + // advance to the next closing parenthesis + (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) { + + // excess is a negative index + match[0] = match[0].slice( 0, excess ); + match[2] = unquoted.slice( 0, excess ); + } + + // Return only captures needed by the pseudo filter method (type and argument) + return match.slice( 0, 3 ); + } + }, + + filter: { + + "TAG": function( nodeNameSelector ) { + var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); + return nodeNameSelector === "*" ? + function() { return true; } : + function( elem ) { + return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; + }; + }, + + "CLASS": function( className ) { + var pattern = classCache[ className + " " ]; + + return pattern || + (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) && + classCache( className, function( elem ) { + return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== strundefined && elem.getAttribute("class") || "" ); + }); + }, + + "ATTR": function( name, operator, check ) { + return function( elem ) { + var result = Sizzle.attr( elem, name ); + + if ( result == null ) { + return operator === "!="; + } + if ( !operator ) { + return true; + } + + result += ""; + + return operator === "=" ? result === check : + operator === "!=" ? result !== check : + operator === "^=" ? check && result.indexOf( check ) === 0 : + operator === "*=" ? check && result.indexOf( check ) > -1 : + operator === "$=" ? check && result.slice( -check.length ) === check : + operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 : + operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : + false; + }; + }, + + "CHILD": function( type, what, argument, first, last ) { + var simple = type.slice( 0, 3 ) !== "nth", + forward = type.slice( -4 ) !== "last", + ofType = what === "of-type"; + + return first === 1 && last === 0 ? + + // Shortcut for :nth-*(n) + function( elem ) { + return !!elem.parentNode; + } : + + function( elem, context, xml ) { + var cache, outerCache, node, diff, nodeIndex, start, + dir = simple !== forward ? "nextSibling" : "previousSibling", + parent = elem.parentNode, + name = ofType && elem.nodeName.toLowerCase(), + useCache = !xml && !ofType; + + if ( parent ) { + + // :(first|last|only)-(child|of-type) + if ( simple ) { + while ( dir ) { + node = elem; + while ( (node = node[ dir ]) ) { + if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) { + return false; + } + } + // Reverse direction for :only-* (if we haven't yet done so) + start = dir = type === "only" && !start && "nextSibling"; + } + return true; + } + + start = [ forward ? parent.firstChild : parent.lastChild ]; + + // non-xml :nth-child(...) stores cache data on `parent` + if ( forward && useCache ) { + // Seek `elem` from a previously-cached index + outerCache = parent[ expando ] || (parent[ expando ] = {}); + cache = outerCache[ type ] || []; + nodeIndex = cache[0] === dirruns && cache[1]; + diff = cache[0] === dirruns && cache[2]; + node = nodeIndex && parent.childNodes[ nodeIndex ]; + + while ( (node = ++nodeIndex && node && node[ dir ] || + + // Fallback to seeking `elem` from the start + (diff = nodeIndex = 0) || start.pop()) ) { + + // When found, cache indexes on `parent` and break + if ( node.nodeType === 1 && ++diff && node === elem ) { + outerCache[ type ] = [ dirruns, nodeIndex, diff ]; + break; + } + } + + // Use previously-cached element index if available + } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) { + diff = cache[1]; + + // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...) + } else { + // Use the same loop as above to seek `elem` from the start + while ( (node = ++nodeIndex && node && node[ dir ] || + (diff = nodeIndex = 0) || start.pop()) ) { + + if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) { + // Cache the index of each encountered element + if ( useCache ) { + (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ]; + } + + if ( node === elem ) { + break; + } + } + } + } + + // Incorporate the offset, then check against cycle size + diff -= last; + return diff === first || ( diff % first === 0 && diff / first >= 0 ); + } + }; + }, + + "PSEUDO": function( pseudo, argument ) { + // pseudo-class names are case-insensitive + // http://www.w3.org/TR/selectors/#pseudo-classes + // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters + // Remember that setFilters inherits from pseudos + var args, + fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || + Sizzle.error( "unsupported pseudo: " + pseudo ); + + // The user may use createPseudo to indicate that + // arguments are needed to create the filter function + // just as Sizzle does + if ( fn[ expando ] ) { + return fn( argument ); + } + + // But maintain support for old signatures + if ( fn.length > 1 ) { + args = [ pseudo, pseudo, "", argument ]; + return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? + markFunction(function( seed, matches ) { + var idx, + matched = fn( seed, argument ), + i = matched.length; + while ( i-- ) { + idx = indexOf.call( seed, matched[i] ); + seed[ idx ] = !( matches[ idx ] = matched[i] ); + } + }) : + function( elem ) { + return fn( elem, 0, args ); + }; + } + + return fn; + } + }, + + pseudos: { + // Potentially complex pseudos + "not": markFunction(function( selector ) { + // Trim the selector passed to compile + // to avoid treating leading and trailing + // spaces as combinators + var input = [], + results = [], + matcher = compile( selector.replace( rtrim, "$1" ) ); + + return matcher[ expando ] ? + markFunction(function( seed, matches, context, xml ) { + var elem, + unmatched = matcher( seed, null, xml, [] ), + i = seed.length; + + // Match elements unmatched by `matcher` + while ( i-- ) { + if ( (elem = unmatched[i]) ) { + seed[i] = !(matches[i] = elem); + } + } + }) : + function( elem, context, xml ) { + input[0] = elem; + matcher( input, null, xml, results ); + return !results.pop(); + }; + }), + + "has": markFunction(function( selector ) { + return function( elem ) { + return Sizzle( selector, elem ).length > 0; + }; + }), + + "contains": markFunction(function( text ) { + return function( elem ) { + return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; + }; + }), + + // "Whether an element is represented by a :lang() selector + // is based solely on the element's language value + // being equal to the identifier C, + // or beginning with the identifier C immediately followed by "-". + // The matching of C against the element's language value is performed case-insensitively. + // The identifier C does not have to be a valid language name." + // http://www.w3.org/TR/selectors/#lang-pseudo + "lang": markFunction( function( lang ) { + // lang value must be a valid identifier + if ( !ridentifier.test(lang || "") ) { + Sizzle.error( "unsupported lang: " + lang ); + } + lang = lang.replace( runescape, funescape ).toLowerCase(); + return function( elem ) { + var elemLang; + do { + if ( (elemLang = documentIsHTML ? + elem.lang : + elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) { + + elemLang = elemLang.toLowerCase(); + return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; + } + } while ( (elem = elem.parentNode) && elem.nodeType === 1 ); + return false; + }; + }), + + // Miscellaneous + "target": function( elem ) { + var hash = window.location && window.location.hash; + return hash && hash.slice( 1 ) === elem.id; + }, + + "root": function( elem ) { + return elem === docElem; + }, + + "focus": function( elem ) { + return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); + }, + + // Boolean properties + "enabled": function( elem ) { + return elem.disabled === false; + }, + + "disabled": function( elem ) { + return elem.disabled === true; + }, + + "checked": function( elem ) { + // In CSS3, :checked should return both checked and selected elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + var nodeName = elem.nodeName.toLowerCase(); + return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); + }, + + "selected": function( elem ) { + // Accessing this property makes selected-by-default + // options in Safari work properly + if ( elem.parentNode ) { + elem.parentNode.selectedIndex; + } + + return elem.selected === true; + }, + + // Contents + "empty": function( elem ) { + // http://www.w3.org/TR/selectors/#empty-pseudo + // :empty is only affected by element nodes and content nodes(including text(3), cdata(4)), + // not comment, processing instructions, or others + // Thanks to Diego Perini for the nodeName shortcut + // Greater than "@" means alpha characters (specifically not starting with "#" or "?") + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { + if ( elem.nodeName > "@" || elem.nodeType === 3 || elem.nodeType === 4 ) { + return false; + } + } + return true; + }, + + "parent": function( elem ) { + return !Expr.pseudos["empty"]( elem ); + }, + + // Element/input types + "header": function( elem ) { + return rheader.test( elem.nodeName ); + }, + + "input": function( elem ) { + return rinputs.test( elem.nodeName ); + }, + + "button": function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && elem.type === "button" || name === "button"; + }, + + "text": function( elem ) { + var attr; + // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) + // use getAttribute instead to test this case + return elem.nodeName.toLowerCase() === "input" && + elem.type === "text" && + ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === elem.type ); + }, + + // Position-in-collection + "first": createPositionalPseudo(function() { + return [ 0 ]; + }), + + "last": createPositionalPseudo(function( matchIndexes, length ) { + return [ length - 1 ]; + }), + + "eq": createPositionalPseudo(function( matchIndexes, length, argument ) { + return [ argument < 0 ? argument + length : argument ]; + }), + + "even": createPositionalPseudo(function( matchIndexes, length ) { + var i = 0; + for ( ; i < length; i += 2 ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "odd": createPositionalPseudo(function( matchIndexes, length ) { + var i = 1; + for ( ; i < length; i += 2 ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "lt": createPositionalPseudo(function( matchIndexes, length, argument ) { + var i = argument < 0 ? argument + length : argument; + for ( ; --i >= 0; ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "gt": createPositionalPseudo(function( matchIndexes, length, argument ) { + var i = argument < 0 ? argument + length : argument; + for ( ; ++i < length; ) { + matchIndexes.push( i ); + } + return matchIndexes; + }) + } +}; + +Expr.pseudos["nth"] = Expr.pseudos["eq"]; + +// Add button/input type pseudos +for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { + Expr.pseudos[ i ] = createInputPseudo( i ); +} +for ( i in { submit: true, reset: true } ) { + Expr.pseudos[ i ] = createButtonPseudo( i ); +} + +// Easy API for creating new setFilters +function setFilters() {} +setFilters.prototype = Expr.filters = Expr.pseudos; +Expr.setFilters = new setFilters(); + +function tokenize( selector, parseOnly ) { + var matched, match, tokens, type, + soFar, groups, preFilters, + cached = tokenCache[ selector + " " ]; + + if ( cached ) { + return parseOnly ? 0 : cached.slice( 0 ); + } + + soFar = selector; + groups = []; + preFilters = Expr.preFilter; + + while ( soFar ) { + + // Comma and first run + if ( !matched || (match = rcomma.exec( soFar )) ) { + if ( match ) { + // Don't consume trailing commas as valid + soFar = soFar.slice( match[0].length ) || soFar; + } + groups.push( tokens = [] ); + } + + matched = false; + + // Combinators + if ( (match = rcombinators.exec( soFar )) ) { + matched = match.shift(); + tokens.push({ + value: matched, + // Cast descendant combinators to space + type: match[0].replace( rtrim, " " ) + }); + soFar = soFar.slice( matched.length ); + } + + // Filters + for ( type in Expr.filter ) { + if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || + (match = preFilters[ type ]( match ))) ) { + matched = match.shift(); + tokens.push({ + value: matched, + type: type, + matches: match + }); + soFar = soFar.slice( matched.length ); + } + } + + if ( !matched ) { + break; + } + } + + // Return the length of the invalid excess + // if we're just parsing + // Otherwise, throw an error or return tokens + return parseOnly ? + soFar.length : + soFar ? + Sizzle.error( selector ) : + // Cache the tokens + tokenCache( selector, groups ).slice( 0 ); +} + +function toSelector( tokens ) { + var i = 0, + len = tokens.length, + selector = ""; + for ( ; i < len; i++ ) { + selector += tokens[i].value; + } + return selector; +} + +function addCombinator( matcher, combinator, base ) { + var dir = combinator.dir, + checkNonElements = base && dir === "parentNode", + doneName = done++; + + return combinator.first ? + // Check against closest ancestor/preceding element + function( elem, context, xml ) { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + return matcher( elem, context, xml ); + } + } + } : + + // Check against all ancestor/preceding elements + function( elem, context, xml ) { + var data, cache, outerCache, + dirkey = dirruns + " " + doneName; + + // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching + if ( xml ) { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + if ( matcher( elem, context, xml ) ) { + return true; + } + } + } + } else { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + outerCache = elem[ expando ] || (elem[ expando ] = {}); + if ( (cache = outerCache[ dir ]) && cache[0] === dirkey ) { + if ( (data = cache[1]) === true || data === cachedruns ) { + return data === true; + } + } else { + cache = outerCache[ dir ] = [ dirkey ]; + cache[1] = matcher( elem, context, xml ) || cachedruns; + if ( cache[1] === true ) { + return true; + } + } + } + } + } + }; +} + +function elementMatcher( matchers ) { + return matchers.length > 1 ? + function( elem, context, xml ) { + var i = matchers.length; + while ( i-- ) { + if ( !matchers[i]( elem, context, xml ) ) { + return false; + } + } + return true; + } : + matchers[0]; +} + +function condense( unmatched, map, filter, context, xml ) { + var elem, + newUnmatched = [], + i = 0, + len = unmatched.length, + mapped = map != null; + + for ( ; i < len; i++ ) { + if ( (elem = unmatched[i]) ) { + if ( !filter || filter( elem, context, xml ) ) { + newUnmatched.push( elem ); + if ( mapped ) { + map.push( i ); + } + } + } + } + + return newUnmatched; +} + +function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { + if ( postFilter && !postFilter[ expando ] ) { + postFilter = setMatcher( postFilter ); + } + if ( postFinder && !postFinder[ expando ] ) { + postFinder = setMatcher( postFinder, postSelector ); + } + return markFunction(function( seed, results, context, xml ) { + var temp, i, elem, + preMap = [], + postMap = [], + preexisting = results.length, + + // Get initial elements from seed or context + elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ), + + // Prefilter to get matcher input, preserving a map for seed-results synchronization + matcherIn = preFilter && ( seed || !selector ) ? + condense( elems, preMap, preFilter, context, xml ) : + elems, + + matcherOut = matcher ? + // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, + postFinder || ( seed ? preFilter : preexisting || postFilter ) ? + + // ...intermediate processing is necessary + [] : + + // ...otherwise use results directly + results : + matcherIn; + + // Find primary matches + if ( matcher ) { + matcher( matcherIn, matcherOut, context, xml ); + } + + // Apply postFilter + if ( postFilter ) { + temp = condense( matcherOut, postMap ); + postFilter( temp, [], context, xml ); + + // Un-match failing elements by moving them back to matcherIn + i = temp.length; + while ( i-- ) { + if ( (elem = temp[i]) ) { + matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem); + } + } + } + + if ( seed ) { + if ( postFinder || preFilter ) { + if ( postFinder ) { + // Get the final matcherOut by condensing this intermediate into postFinder contexts + temp = []; + i = matcherOut.length; + while ( i-- ) { + if ( (elem = matcherOut[i]) ) { + // Restore matcherIn since elem is not yet a final match + temp.push( (matcherIn[i] = elem) ); + } + } + postFinder( null, (matcherOut = []), temp, xml ); + } + + // Move matched elements from seed to results to keep them synchronized + i = matcherOut.length; + while ( i-- ) { + if ( (elem = matcherOut[i]) && + (temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) { + + seed[temp] = !(results[temp] = elem); + } + } + } + + // Add elements to results, through postFinder if defined + } else { + matcherOut = condense( + matcherOut === results ? + matcherOut.splice( preexisting, matcherOut.length ) : + matcherOut + ); + if ( postFinder ) { + postFinder( null, results, matcherOut, xml ); + } else { + push.apply( results, matcherOut ); + } + } + }); +} + +function matcherFromTokens( tokens ) { + var checkContext, matcher, j, + len = tokens.length, + leadingRelative = Expr.relative[ tokens[0].type ], + implicitRelative = leadingRelative || Expr.relative[" "], + i = leadingRelative ? 1 : 0, + + // The foundational matcher ensures that elements are reachable from top-level context(s) + matchContext = addCombinator( function( elem ) { + return elem === checkContext; + }, implicitRelative, true ), + matchAnyContext = addCombinator( function( elem ) { + return indexOf.call( checkContext, elem ) > -1; + }, implicitRelative, true ), + matchers = [ function( elem, context, xml ) { + return ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( + (checkContext = context).nodeType ? + matchContext( elem, context, xml ) : + matchAnyContext( elem, context, xml ) ); + } ]; + + for ( ; i < len; i++ ) { + if ( (matcher = Expr.relative[ tokens[i].type ]) ) { + matchers = [ addCombinator(elementMatcher( matchers ), matcher) ]; + } else { + matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches ); + + // Return special upon seeing a positional matcher + if ( matcher[ expando ] ) { + // Find the next relative operator (if any) for proper handling + j = ++i; + for ( ; j < len; j++ ) { + if ( Expr.relative[ tokens[j].type ] ) { + break; + } + } + return setMatcher( + i > 1 && elementMatcher( matchers ), + i > 1 && toSelector( + // If the preceding token was a descendant combinator, insert an implicit any-element `*` + tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" }) + ).replace( rtrim, "$1" ), + matcher, + i < j && matcherFromTokens( tokens.slice( i, j ) ), + j < len && matcherFromTokens( (tokens = tokens.slice( j )) ), + j < len && toSelector( tokens ) + ); + } + matchers.push( matcher ); + } + } + + return elementMatcher( matchers ); +} + +function matcherFromGroupMatchers( elementMatchers, setMatchers ) { + // A counter to specify which element is currently being matched + var matcherCachedRuns = 0, + bySet = setMatchers.length > 0, + byElement = elementMatchers.length > 0, + superMatcher = function( seed, context, xml, results, expandContext ) { + var elem, j, matcher, + setMatched = [], + matchedCount = 0, + i = "0", + unmatched = seed && [], + outermost = expandContext != null, + contextBackup = outermostContext, + // We must always have either seed elements or context + elems = seed || byElement && Expr.find["TAG"]( "*", expandContext && context.parentNode || context ), + // Use integer dirruns iff this is the outermost matcher + dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1); + + if ( outermost ) { + outermostContext = context !== document && context; + cachedruns = matcherCachedRuns; + } + + // Add elements passing elementMatchers directly to results + // Keep `i` a string if there are no elements so `matchedCount` will be "00" below + for ( ; (elem = elems[i]) != null; i++ ) { + if ( byElement && elem ) { + j = 0; + while ( (matcher = elementMatchers[j++]) ) { + if ( matcher( elem, context, xml ) ) { + results.push( elem ); + break; + } + } + if ( outermost ) { + dirruns = dirrunsUnique; + cachedruns = ++matcherCachedRuns; + } + } + + // Track unmatched elements for set filters + if ( bySet ) { + // They will have gone through all possible matchers + if ( (elem = !matcher && elem) ) { + matchedCount--; + } + + // Lengthen the array for every element, matched or not + if ( seed ) { + unmatched.push( elem ); + } + } + } + + // Apply set filters to unmatched elements + matchedCount += i; + if ( bySet && i !== matchedCount ) { + j = 0; + while ( (matcher = setMatchers[j++]) ) { + matcher( unmatched, setMatched, context, xml ); + } + + if ( seed ) { + // Reintegrate element matches to eliminate the need for sorting + if ( matchedCount > 0 ) { + while ( i-- ) { + if ( !(unmatched[i] || setMatched[i]) ) { + setMatched[i] = pop.call( results ); + } + } + } + + // Discard index placeholder values to get only actual matches + setMatched = condense( setMatched ); + } + + // Add matches to results + push.apply( results, setMatched ); + + // Seedless set matches succeeding multiple successful matchers stipulate sorting + if ( outermost && !seed && setMatched.length > 0 && + ( matchedCount + setMatchers.length ) > 1 ) { + + Sizzle.uniqueSort( results ); + } + } + + // Override manipulation of globals by nested matchers + if ( outermost ) { + dirruns = dirrunsUnique; + outermostContext = contextBackup; + } + + return unmatched; + }; + + return bySet ? + markFunction( superMatcher ) : + superMatcher; +} + +compile = Sizzle.compile = function( selector, group /* Internal Use Only */ ) { + var i, + setMatchers = [], + elementMatchers = [], + cached = compilerCache[ selector + " " ]; + + if ( !cached ) { + // Generate a function of recursive functions that can be used to check each element + if ( !group ) { + group = tokenize( selector ); + } + i = group.length; + while ( i-- ) { + cached = matcherFromTokens( group[i] ); + if ( cached[ expando ] ) { + setMatchers.push( cached ); + } else { + elementMatchers.push( cached ); + } + } + + // Cache the compiled function + cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) ); + } + return cached; +}; + +function multipleContexts( selector, contexts, results ) { + var i = 0, + len = contexts.length; + for ( ; i < len; i++ ) { + Sizzle( selector, contexts[i], results ); + } + return results; +} + +function select( selector, context, results, seed ) { + var i, tokens, token, type, find, + match = tokenize( selector ); + + if ( !seed ) { + // Try to minimize operations if there is only one group + if ( match.length === 1 ) { + + // Take a shortcut and set the context if the root selector is an ID + tokens = match[0] = match[0].slice( 0 ); + if ( tokens.length > 2 && (token = tokens[0]).type === "ID" && + support.getById && context.nodeType === 9 && documentIsHTML && + Expr.relative[ tokens[1].type ] ) { + + context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0]; + if ( !context ) { + return results; + } + selector = selector.slice( tokens.shift().value.length ); + } + + // Fetch a seed set for right-to-left matching + i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length; + while ( i-- ) { + token = tokens[i]; + + // Abort if we hit a combinator + if ( Expr.relative[ (type = token.type) ] ) { + break; + } + if ( (find = Expr.find[ type ]) ) { + // Search, expanding context for leading sibling combinators + if ( (seed = find( + token.matches[0].replace( runescape, funescape ), + rsibling.test( tokens[0].type ) && context.parentNode || context + )) ) { + + // If seed is empty or no tokens remain, we can return early + tokens.splice( i, 1 ); + selector = seed.length && toSelector( tokens ); + if ( !selector ) { + push.apply( results, seed ); + return results; + } + + break; + } + } + } + } + } + + // Compile and execute a filtering function + // Provide `match` to avoid retokenization if we modified the selector above + compile( selector, match )( + seed, + context, + !documentIsHTML, + results, + rsibling.test( selector ) + ); + return results; +} + +// One-time assignments + +// Sort stability +support.sortStable = expando.split("").sort( sortOrder ).join("") === expando; + +// Support: Chrome<14 +// Always assume duplicates if they aren't passed to the comparison function +support.detectDuplicates = hasDuplicate; + +// Initialize against the default document +setDocument(); + +// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) +// Detached nodes confoundingly follow *each other* +support.sortDetached = assert(function( div1 ) { + // Should return 1, but returns 4 (following) + return div1.compareDocumentPosition( document.createElement("div") ) & 1; +}); + +// Support: IE<8 +// Prevent attribute/property "interpolation" +// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx +if ( !assert(function( div ) { + div.innerHTML = "<a href='#'></a>"; + return div.firstChild.getAttribute("href") === "#" ; +}) ) { + addHandle( "type|href|height|width", function( elem, name, isXML ) { + if ( !isXML ) { + return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); + } + }); +} + +// Support: IE<9 +// Use defaultValue in place of getAttribute("value") +if ( !support.attributes || !assert(function( div ) { + div.innerHTML = "<input/>"; + div.firstChild.setAttribute( "value", "" ); + return div.firstChild.getAttribute( "value" ) === ""; +}) ) { + addHandle( "value", function( elem, name, isXML ) { + if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { + return elem.defaultValue; + } + }); +} + +// Support: IE<9 +// Use getAttributeNode to fetch booleans when getAttribute lies +if ( !assert(function( div ) { + return div.getAttribute("disabled") == null; +}) ) { + addHandle( booleans, function( elem, name, isXML ) { + var val; + if ( !isXML ) { + return (val = elem.getAttributeNode( name )) && val.specified ? + val.value : + elem[ name ] === true ? name.toLowerCase() : null; + } + }); +} + +jQuery.find = Sizzle; +jQuery.expr = Sizzle.selectors; +jQuery.expr[":"] = jQuery.expr.pseudos; +jQuery.unique = Sizzle.uniqueSort; +jQuery.text = Sizzle.getText; +jQuery.isXMLDoc = Sizzle.isXML; +jQuery.contains = Sizzle.contains; + + +})( window ); +// String to Object options format cache +var optionsCache = {}; + +// Convert String-formatted options into Object-formatted ones and store in cache +function createOptions( options ) { + var object = optionsCache[ options ] = {}; + jQuery.each( options.match( core_rnotwhite ) || [], function( _, flag ) { + object[ flag ] = true; + }); + return object; +} + +/* + * Create a callback list using the following parameters: + * + * options: an optional list of space-separated options that will change how + * the callback list behaves or a more traditional option object + * + * By default a callback list will act like an event callback list and can be + * "fired" multiple times. + * + * Possible options: + * + * once: will ensure the callback list can only be fired once (like a Deferred) + * + * memory: will keep track of previous values and will call any callback added + * after the list has been fired right away with the latest "memorized" + * values (like a Deferred) + * + * unique: will ensure a callback can only be added once (no duplicate in the list) + * + * stopOnFalse: interrupt callings when a callback returns false + * + */ +jQuery.Callbacks = function( options ) { + + // Convert options from String-formatted to Object-formatted if needed + // (we check in cache first) + options = typeof options === "string" ? + ( optionsCache[ options ] || createOptions( options ) ) : + jQuery.extend( {}, options ); + + var // Flag to know if list is currently firing + firing, + // Last fire value (for non-forgettable lists) + memory, + // Flag to know if list was already fired + fired, + // End of the loop when firing + firingLength, + // Index of currently firing callback (modified by remove if needed) + firingIndex, + // First callback to fire (used internally by add and fireWith) + firingStart, + // Actual callback list + list = [], + // Stack of fire calls for repeatable lists + stack = !options.once && [], + // Fire callbacks + fire = function( data ) { + memory = options.memory && data; + fired = true; + firingIndex = firingStart || 0; + firingStart = 0; + firingLength = list.length; + firing = true; + for ( ; list && firingIndex < firingLength; firingIndex++ ) { + if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) { + memory = false; // To prevent further calls using add + break; + } + } + firing = false; + if ( list ) { + if ( stack ) { + if ( stack.length ) { + fire( stack.shift() ); + } + } else if ( memory ) { + list = []; + } else { + self.disable(); + } + } + }, + // Actual Callbacks object + self = { + // Add a callback or a collection of callbacks to the list + add: function() { + if ( list ) { + // First, we save the current length + var start = list.length; + (function add( args ) { + jQuery.each( args, function( _, arg ) { + var type = jQuery.type( arg ); + if ( type === "function" ) { + if ( !options.unique || !self.has( arg ) ) { + list.push( arg ); + } + } else if ( arg && arg.length && type !== "string" ) { + // Inspect recursively + add( arg ); + } + }); + })( arguments ); + // Do we need to add the callbacks to the + // current firing batch? + if ( firing ) { + firingLength = list.length; + // With memory, if we're not firing then + // we should call right away + } else if ( memory ) { + firingStart = start; + fire( memory ); + } + } + return this; + }, + // Remove a callback from the list + remove: function() { + if ( list ) { + jQuery.each( arguments, function( _, arg ) { + var index; + while( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { + list.splice( index, 1 ); + // Handle firing indexes + if ( firing ) { + if ( index <= firingLength ) { + firingLength--; + } + if ( index <= firingIndex ) { + firingIndex--; + } + } + } + }); + } + return this; + }, + // Check if a given callback is in the list. + // If no argument is given, return whether or not list has callbacks attached. + has: function( fn ) { + return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length ); + }, + // Remove all callbacks from the list + empty: function() { + list = []; + firingLength = 0; + return this; + }, + // Have the list do nothing anymore + disable: function() { + list = stack = memory = undefined; + return this; + }, + // Is it disabled? + disabled: function() { + return !list; + }, + // Lock the list in its current state + lock: function() { + stack = undefined; + if ( !memory ) { + self.disable(); + } + return this; + }, + // Is it locked? + locked: function() { + return !stack; + }, + // Call all callbacks with the given context and arguments + fireWith: function( context, args ) { + if ( list && ( !fired || stack ) ) { + args = args || []; + args = [ context, args.slice ? args.slice() : args ]; + if ( firing ) { + stack.push( args ); + } else { + fire( args ); + } + } + return this; + }, + // Call all the callbacks with the given arguments + fire: function() { + self.fireWith( this, arguments ); + return this; + }, + // To know if the callbacks have already been called at least once + fired: function() { + return !!fired; + } + }; + + return self; +}; +jQuery.extend({ + + Deferred: function( func ) { + var tuples = [ + // action, add listener, listener list, final state + [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ], + [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ], + [ "notify", "progress", jQuery.Callbacks("memory") ] + ], + state = "pending", + promise = { + state: function() { + return state; + }, + always: function() { + deferred.done( arguments ).fail( arguments ); + return this; + }, + then: function( /* fnDone, fnFail, fnProgress */ ) { + var fns = arguments; + return jQuery.Deferred(function( newDefer ) { + jQuery.each( tuples, function( i, tuple ) { + var action = tuple[ 0 ], + fn = jQuery.isFunction( fns[ i ] ) && fns[ i ]; + // deferred[ done | fail | progress ] for forwarding actions to newDefer + deferred[ tuple[1] ](function() { + var returned = fn && fn.apply( this, arguments ); + if ( returned && jQuery.isFunction( returned.promise ) ) { + returned.promise() + .done( newDefer.resolve ) + .fail( newDefer.reject ) + .progress( newDefer.notify ); + } else { + newDefer[ action + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments ); + } + }); + }); + fns = null; + }).promise(); + }, + // Get a promise for this deferred + // If obj is provided, the promise aspect is added to the object + promise: function( obj ) { + return obj != null ? jQuery.extend( obj, promise ) : promise; + } + }, + deferred = {}; + + // Keep pipe for back-compat + promise.pipe = promise.then; + + // Add list-specific methods + jQuery.each( tuples, function( i, tuple ) { + var list = tuple[ 2 ], + stateString = tuple[ 3 ]; + + // promise[ done | fail | progress ] = list.add + promise[ tuple[1] ] = list.add; + + // Handle state + if ( stateString ) { + list.add(function() { + // state = [ resolved | rejected ] + state = stateString; + + // [ reject_list | resolve_list ].disable; progress_list.lock + }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock ); + } + + // deferred[ resolve | reject | notify ] + deferred[ tuple[0] ] = function() { + deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments ); + return this; + }; + deferred[ tuple[0] + "With" ] = list.fireWith; + }); + + // Make the deferred a promise + promise.promise( deferred ); + + // Call given func if any + if ( func ) { + func.call( deferred, deferred ); + } + + // All done! + return deferred; + }, + + // Deferred helper + when: function( subordinate /* , ..., subordinateN */ ) { + var i = 0, + resolveValues = core_slice.call( arguments ), + length = resolveValues.length, + + // the count of uncompleted subordinates + remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0, + + // the master Deferred. If resolveValues consist of only a single Deferred, just use that. + deferred = remaining === 1 ? subordinate : jQuery.Deferred(), + + // Update function for both resolve and progress values + updateFunc = function( i, contexts, values ) { + return function( value ) { + contexts[ i ] = this; + values[ i ] = arguments.length > 1 ? core_slice.call( arguments ) : value; + if( values === progressValues ) { + deferred.notifyWith( contexts, values ); + } else if ( !( --remaining ) ) { + deferred.resolveWith( contexts, values ); + } + }; + }, + + progressValues, progressContexts, resolveContexts; + + // add listeners to Deferred subordinates; treat others as resolved + if ( length > 1 ) { + progressValues = new Array( length ); + progressContexts = new Array( length ); + resolveContexts = new Array( length ); + for ( ; i < length; i++ ) { + if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) { + resolveValues[ i ].promise() + .done( updateFunc( i, resolveContexts, resolveValues ) ) + .fail( deferred.reject ) + .progress( updateFunc( i, progressContexts, progressValues ) ); + } else { + --remaining; + } + } + } + + // if we're not waiting on anything, resolve the master + if ( !remaining ) { + deferred.resolveWith( resolveContexts, resolveValues ); + } + + return deferred.promise(); + } +}); +jQuery.support = (function( support ) { + + var all, a, input, select, fragment, opt, eventName, isSupported, i, + div = document.createElement("div"); + + // Setup + div.setAttribute( "className", "t" ); + div.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>"; + + // Finish early in limited (non-browser) environments + all = div.getElementsByTagName("*") || []; + a = div.getElementsByTagName("a")[ 0 ]; + if ( !a || !a.style || !all.length ) { + return support; + } + + // First batch of tests + select = document.createElement("select"); + opt = select.appendChild( document.createElement("option") ); + input = div.getElementsByTagName("input")[ 0 ]; + + a.style.cssText = "top:1px;float:left;opacity:.5"; + + // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7) + support.getSetAttribute = div.className !== "t"; + + // IE strips leading whitespace when .innerHTML is used + support.leadingWhitespace = div.firstChild.nodeType === 3; + + // Make sure that tbody elements aren't automatically inserted + // IE will insert them into empty tables + support.tbody = !div.getElementsByTagName("tbody").length; + + // Make sure that link elements get serialized correctly by innerHTML + // This requires a wrapper element in IE + support.htmlSerialize = !!div.getElementsByTagName("link").length; + + // Get the style information from getAttribute + // (IE uses .cssText instead) + support.style = /top/.test( a.getAttribute("style") ); + + // Make sure that URLs aren't manipulated + // (IE normalizes it by default) + support.hrefNormalized = a.getAttribute("href") === "/a"; + + // Make sure that element opacity exists + // (IE uses filter instead) + // Use a regex to work around a WebKit issue. See #5145 + support.opacity = /^0.5/.test( a.style.opacity ); + + // Verify style float existence + // (IE uses styleFloat instead of cssFloat) + support.cssFloat = !!a.style.cssFloat; + + // Check the default checkbox/radio value ("" on WebKit; "on" elsewhere) + support.checkOn = !!input.value; + + // Make sure that a selected-by-default option has a working selected property. + // (WebKit defaults to false instead of true, IE too, if it's in an optgroup) + support.optSelected = opt.selected; + + // Tests for enctype support on a form (#6743) + support.enctype = !!document.createElement("form").enctype; + + // Makes sure cloning an html5 element does not cause problems + // Where outerHTML is undefined, this still works + support.html5Clone = document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav></:nav>"; + + // Will be defined later + support.inlineBlockNeedsLayout = false; + support.shrinkWrapBlocks = false; + support.pixelPosition = false; + support.deleteExpando = true; + support.noCloneEvent = true; + support.reliableMarginRight = true; + support.boxSizingReliable = true; + + // Make sure checked status is properly cloned + input.checked = true; + support.noCloneChecked = input.cloneNode( true ).checked; + + // Make sure that the options inside disabled selects aren't marked as disabled + // (WebKit marks them as disabled) + select.disabled = true; + support.optDisabled = !opt.disabled; + + // Support: IE<9 + try { + delete div.test; + } catch( e ) { + support.deleteExpando = false; + } + + // Check if we can trust getAttribute("value") + input = document.createElement("input"); + input.setAttribute( "value", "" ); + support.input = input.getAttribute( "value" ) === ""; + + // Check if an input maintains its value after becoming a radio + input.value = "t"; + input.setAttribute( "type", "radio" ); + support.radioValue = input.value === "t"; + + // #11217 - WebKit loses check when the name is after the checked attribute + input.setAttribute( "checked", "t" ); + input.setAttribute( "name", "t" ); + + fragment = document.createDocumentFragment(); + fragment.appendChild( input ); + + // Check if a disconnected checkbox will retain its checked + // value of true after appended to the DOM (IE6/7) + support.appendChecked = input.checked; + + // WebKit doesn't clone checked state correctly in fragments + support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked; + + // Support: IE<9 + // Opera does not clone events (and typeof div.attachEvent === undefined). + // IE9-10 clones events bound via attachEvent, but they don't trigger with .click() + if ( div.attachEvent ) { + div.attachEvent( "onclick", function() { + support.noCloneEvent = false; + }); + + div.cloneNode( true ).click(); + } + + // Support: IE<9 (lack submit/change bubble), Firefox 17+ (lack focusin event) + // Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP) + for ( i in { submit: true, change: true, focusin: true }) { + div.setAttribute( eventName = "on" + i, "t" ); + + support[ i + "Bubbles" ] = eventName in window || div.attributes[ eventName ].expando === false; + } + + div.style.backgroundClip = "content-box"; + div.cloneNode( true ).style.backgroundClip = ""; + support.clearCloneStyle = div.style.backgroundClip === "content-box"; + + // Support: IE<9 + // Iteration over object's inherited properties before its own. + for ( i in jQuery( support ) ) { + break; + } + support.ownLast = i !== "0"; + + // Run tests that need a body at doc ready + jQuery(function() { + var container, marginDiv, tds, + divReset = "padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;", + body = document.getElementsByTagName("body")[0]; + + if ( !body ) { + // Return for frameset docs that don't have a body + return; + } + + container = document.createElement("div"); + container.style.cssText = "border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px"; + + body.appendChild( container ).appendChild( div ); + + // Support: IE8 + // Check if table cells still have offsetWidth/Height when they are set + // to display:none and there are still other visible table cells in a + // table row; if so, offsetWidth/Height are not reliable for use when + // determining if an element has been hidden directly using + // display:none (it is still safe to use offsets if a parent element is + // hidden; don safety goggles and see bug #4512 for more information). + div.innerHTML = "<table><tr><td></td><td>t</td></tr></table>"; + tds = div.getElementsByTagName("td"); + tds[ 0 ].style.cssText = "padding:0;margin:0;border:0;display:none"; + isSupported = ( tds[ 0 ].offsetHeight === 0 ); + + tds[ 0 ].style.display = ""; + tds[ 1 ].style.display = "none"; + + // Support: IE8 + // Check if empty table cells still have offsetWidth/Height + support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 ); + + // Check box-sizing and margin behavior. + div.innerHTML = ""; + div.style.cssText = "box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;"; + + // Workaround failing boxSizing test due to offsetWidth returning wrong value + // with some non-1 values of body zoom, ticket #13543 + jQuery.swap( body, body.style.zoom != null ? { zoom: 1 } : {}, function() { + support.boxSizing = div.offsetWidth === 4; + }); + + // Use window.getComputedStyle because jsdom on node.js will break without it. + if ( window.getComputedStyle ) { + support.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== "1%"; + support.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px"; + + // Check if div with explicit width and no margin-right incorrectly + // gets computed margin-right based on width of container. (#3333) + // Fails in WebKit before Feb 2011 nightlies + // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right + marginDiv = div.appendChild( document.createElement("div") ); + marginDiv.style.cssText = div.style.cssText = divReset; + marginDiv.style.marginRight = marginDiv.style.width = "0"; + div.style.width = "1px"; + + support.reliableMarginRight = + !parseFloat( ( window.getComputedStyle( marginDiv, null ) || {} ).marginRight ); + } + + if ( typeof div.style.zoom !== core_strundefined ) { + // Support: IE<8 + // Check if natively block-level elements act like inline-block + // elements when setting their display to 'inline' and giving + // them layout + div.innerHTML = ""; + div.style.cssText = divReset + "width:1px;padding:1px;display:inline;zoom:1"; + support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 ); + + // Support: IE6 + // Check if elements with layout shrink-wrap their children + div.style.display = "block"; + div.innerHTML = "<div></div>"; + div.firstChild.style.width = "5px"; + support.shrinkWrapBlocks = ( div.offsetWidth !== 3 ); + + if ( support.inlineBlockNeedsLayout ) { + // Prevent IE 6 from affecting layout for positioned elements #11048 + // Prevent IE from shrinking the body in IE 7 mode #12869 + // Support: IE<8 + body.style.zoom = 1; + } + } + + body.removeChild( container ); + + // Null elements to avoid leaks in IE + container = div = tds = marginDiv = null; + }); + + // Null elements to avoid leaks in IE + all = select = fragment = opt = a = input = null; + + return support; +})({}); + +var rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/, + rmultiDash = /([A-Z])/g; + +function internalData( elem, name, data, pvt /* Internal Use Only */ ){ + if ( !jQuery.acceptData( elem ) ) { + return; + } + + var ret, thisCache, + internalKey = jQuery.expando, + + // We have to handle DOM nodes and JS objects differently because IE6-7 + // can't GC object references properly across the DOM-JS boundary + isNode = elem.nodeType, + + // Only DOM nodes need the global jQuery cache; JS object data is + // attached directly to the object so GC can occur automatically + cache = isNode ? jQuery.cache : elem, + + // Only defining an ID for JS objects if its cache already exists allows + // the code to shortcut on the same path as a DOM node with no cache + id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey; + + // Avoid doing any more work than we need to when trying to get data on an + // object that has no data at all + if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && data === undefined && typeof name === "string" ) { + return; + } + + if ( !id ) { + // Only DOM nodes need a new unique ID for each element since their data + // ends up in the global cache + if ( isNode ) { + id = elem[ internalKey ] = core_deletedIds.pop() || jQuery.guid++; + } else { + id = internalKey; + } + } + + if ( !cache[ id ] ) { + // Avoid exposing jQuery metadata on plain JS objects when the object + // is serialized using JSON.stringify + cache[ id ] = isNode ? {} : { toJSON: jQuery.noop }; + } + + // An object can be passed to jQuery.data instead of a key/value pair; this gets + // shallow copied over onto the existing cache + if ( typeof name === "object" || typeof name === "function" ) { + if ( pvt ) { + cache[ id ] = jQuery.extend( cache[ id ], name ); + } else { + cache[ id ].data = jQuery.extend( cache[ id ].data, name ); + } + } + + thisCache = cache[ id ]; + + // jQuery data() is stored in a separate object inside the object's internal data + // cache in order to avoid key collisions between internal data and user-defined + // data. + if ( !pvt ) { + if ( !thisCache.data ) { + thisCache.data = {}; + } + + thisCache = thisCache.data; + } + + if ( data !== undefined ) { + thisCache[ jQuery.camelCase( name ) ] = data; + } + + // Check for both converted-to-camel and non-converted data property names + // If a data property was specified + if ( typeof name === "string" ) { + + // First Try to find as-is property data + ret = thisCache[ name ]; + + // Test for null|undefined property data + if ( ret == null ) { + + // Try to find the camelCased property + ret = thisCache[ jQuery.camelCase( name ) ]; + } + } else { + ret = thisCache; + } + + return ret; +} + +function internalRemoveData( elem, name, pvt ) { + if ( !jQuery.acceptData( elem ) ) { + return; + } + + var thisCache, i, + isNode = elem.nodeType, + + // See jQuery.data for more information + cache = isNode ? jQuery.cache : elem, + id = isNode ? elem[ jQuery.expando ] : jQuery.expando; + + // If there is already no cache entry for this object, there is no + // purpose in continuing + if ( !cache[ id ] ) { + return; + } + + if ( name ) { + + thisCache = pvt ? cache[ id ] : cache[ id ].data; + + if ( thisCache ) { + + // Support array or space separated string names for data keys + if ( !jQuery.isArray( name ) ) { + + // try the string as a key before any manipulation + if ( name in thisCache ) { + name = [ name ]; + } else { + + // split the camel cased version by spaces unless a key with the spaces exists + name = jQuery.camelCase( name ); + if ( name in thisCache ) { + name = [ name ]; + } else { + name = name.split(" "); + } + } + } else { + // If "name" is an array of keys... + // When data is initially created, via ("key", "val") signature, + // keys will be converted to camelCase. + // Since there is no way to tell _how_ a key was added, remove + // both plain key and camelCase key. #12786 + // This will only penalize the array argument path. + name = name.concat( jQuery.map( name, jQuery.camelCase ) ); + } + + i = name.length; + while ( i-- ) { + delete thisCache[ name[i] ]; + } + + // If there is no data left in the cache, we want to continue + // and let the cache object itself get destroyed + if ( pvt ? !isEmptyDataObject(thisCache) : !jQuery.isEmptyObject(thisCache) ) { + return; + } + } + } + + // See jQuery.data for more information + if ( !pvt ) { + delete cache[ id ].data; + + // Don't destroy the parent cache unless the internal data object + // had been the only thing left in it + if ( !isEmptyDataObject( cache[ id ] ) ) { + return; + } + } + + // Destroy the cache + if ( isNode ) { + jQuery.cleanData( [ elem ], true ); + + // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080) + /* jshint eqeqeq: false */ + } else if ( jQuery.support.deleteExpando || cache != cache.window ) { + /* jshint eqeqeq: true */ + delete cache[ id ]; + + // When all else fails, null + } else { + cache[ id ] = null; + } +} + +jQuery.extend({ + cache: {}, + + // The following elements throw uncatchable exceptions if you + // attempt to add expando properties to them. + noData: { + "applet": true, + "embed": true, + // Ban all objects except for Flash (which handle expandos) + "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" + }, + + hasData: function( elem ) { + elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ]; + return !!elem && !isEmptyDataObject( elem ); + }, + + data: function( elem, name, data ) { + return internalData( elem, name, data ); + }, + + removeData: function( elem, name ) { + return internalRemoveData( elem, name ); + }, + + // For internal use only. + _data: function( elem, name, data ) { + return internalData( elem, name, data, true ); + }, + + _removeData: function( elem, name ) { + return internalRemoveData( elem, name, true ); + }, + + // A method for determining if a DOM node can handle the data expando + acceptData: function( elem ) { + // Do not set data on non-element because it will not be cleared (#8335). + if ( elem.nodeType && elem.nodeType !== 1 && elem.nodeType !== 9 ) { + return false; + } + + var noData = elem.nodeName && jQuery.noData[ elem.nodeName.toLowerCase() ]; + + // nodes accept data unless otherwise specified; rejection can be conditional + return !noData || noData !== true && elem.getAttribute("classid") === noData; + } +}); + +jQuery.fn.extend({ + data: function( key, value ) { + var attrs, name, + data = null, + i = 0, + elem = this[0]; + + // Special expections of .data basically thwart jQuery.access, + // so implement the relevant behavior ourselves + + // Gets all values + if ( key === undefined ) { + if ( this.length ) { + data = jQuery.data( elem ); + + if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) { + attrs = elem.attributes; + for ( ; i < attrs.length; i++ ) { + name = attrs[i].name; + + if ( name.indexOf("data-") === 0 ) { + name = jQuery.camelCase( name.slice(5) ); + + dataAttr( elem, name, data[ name ] ); + } + } + jQuery._data( elem, "parsedAttrs", true ); + } + } + + return data; + } + + // Sets multiple values + if ( typeof key === "object" ) { + return this.each(function() { + jQuery.data( this, key ); + }); + } + + return arguments.length > 1 ? + + // Sets one value + this.each(function() { + jQuery.data( this, key, value ); + }) : + + // Gets one value + // Try to fetch any internally stored data first + elem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : null; + }, + + removeData: function( key ) { + return this.each(function() { + jQuery.removeData( this, key ); + }); + } +}); + +function dataAttr( elem, key, data ) { + // If nothing was found internally, try to fetch any + // data from the HTML5 data-* attribute + if ( data === undefined && elem.nodeType === 1 ) { + + var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase(); + + data = elem.getAttribute( name ); + + if ( typeof data === "string" ) { + try { + data = data === "true" ? true : + data === "false" ? false : + data === "null" ? null : + // Only convert to a number if it doesn't change the string + +data + "" === data ? +data : + rbrace.test( data ) ? jQuery.parseJSON( data ) : + data; + } catch( e ) {} + + // Make sure we set the data so it isn't changed later + jQuery.data( elem, key, data ); + + } else { + data = undefined; + } + } + + return data; +} + +// checks a cache object for emptiness +function isEmptyDataObject( obj ) { + var name; + for ( name in obj ) { + + // if the public data object is empty, the private is still empty + if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) { + continue; + } + if ( name !== "toJSON" ) { + return false; + } + } + + return true; +} +jQuery.extend({ + queue: function( elem, type, data ) { + var queue; + + if ( elem ) { + type = ( type || "fx" ) + "queue"; + queue = jQuery._data( elem, type ); + + // Speed up dequeue by getting out quickly if this is just a lookup + if ( data ) { + if ( !queue || jQuery.isArray(data) ) { + queue = jQuery._data( elem, type, jQuery.makeArray(data) ); + } else { + queue.push( data ); + } + } + return queue || []; + } + }, + + dequeue: function( elem, type ) { + type = type || "fx"; + + var queue = jQuery.queue( elem, type ), + startLength = queue.length, + fn = queue.shift(), + hooks = jQuery._queueHooks( elem, type ), + next = function() { + jQuery.dequeue( elem, type ); + }; + + // If the fx queue is dequeued, always remove the progress sentinel + if ( fn === "inprogress" ) { + fn = queue.shift(); + startLength--; + } + + if ( fn ) { + + // Add a progress sentinel to prevent the fx queue from being + // automatically dequeued + if ( type === "fx" ) { + queue.unshift( "inprogress" ); + } + + // clear up the last queue stop function + delete hooks.stop; + fn.call( elem, next, hooks ); + } + + if ( !startLength && hooks ) { + hooks.empty.fire(); + } + }, + + // not intended for public consumption - generates a queueHooks object, or returns the current one + _queueHooks: function( elem, type ) { + var key = type + "queueHooks"; + return jQuery._data( elem, key ) || jQuery._data( elem, key, { + empty: jQuery.Callbacks("once memory").add(function() { + jQuery._removeData( elem, type + "queue" ); + jQuery._removeData( elem, key ); + }) + }); + } +}); + +jQuery.fn.extend({ + queue: function( type, data ) { + var setter = 2; + + if ( typeof type !== "string" ) { + data = type; + type = "fx"; + setter--; + } + + if ( arguments.length < setter ) { + return jQuery.queue( this[0], type ); + } + + return data === undefined ? + this : + this.each(function() { + var queue = jQuery.queue( this, type, data ); + + // ensure a hooks for this queue + jQuery._queueHooks( this, type ); + + if ( type === "fx" && queue[0] !== "inprogress" ) { + jQuery.dequeue( this, type ); + } + }); + }, + dequeue: function( type ) { + return this.each(function() { + jQuery.dequeue( this, type ); + }); + }, + // Based off of the plugin by Clint Helfers, with permission. + // http://blindsignals.com/index.php/2009/07/jquery-delay/ + delay: function( time, type ) { + time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; + type = type || "fx"; + + return this.queue( type, function( next, hooks ) { + var timeout = setTimeout( next, time ); + hooks.stop = function() { + clearTimeout( timeout ); + }; + }); + }, + clearQueue: function( type ) { + return this.queue( type || "fx", [] ); + }, + // Get a promise resolved when queues of a certain type + // are emptied (fx is the type by default) + promise: function( type, obj ) { + var tmp, + count = 1, + defer = jQuery.Deferred(), + elements = this, + i = this.length, + resolve = function() { + if ( !( --count ) ) { + defer.resolveWith( elements, [ elements ] ); + } + }; + + if ( typeof type !== "string" ) { + obj = type; + type = undefined; + } + type = type || "fx"; + + while( i-- ) { + tmp = jQuery._data( elements[ i ], type + "queueHooks" ); + if ( tmp && tmp.empty ) { + count++; + tmp.empty.add( resolve ); + } + } + resolve(); + return defer.promise( obj ); + } +}); +var nodeHook, boolHook, + rclass = /[\t\r\n\f]/g, + rreturn = /\r/g, + rfocusable = /^(?:input|select|textarea|button|object)$/i, + rclickable = /^(?:a|area)$/i, + ruseDefault = /^(?:checked|selected)$/i, + getSetAttribute = jQuery.support.getSetAttribute, + getSetInput = jQuery.support.input; + +jQuery.fn.extend({ + attr: function( name, value ) { + return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 ); + }, + + removeAttr: function( name ) { + return this.each(function() { + jQuery.removeAttr( this, name ); + }); + }, + + prop: function( name, value ) { + return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 ); + }, + + removeProp: function( name ) { + name = jQuery.propFix[ name ] || name; + return this.each(function() { + // try/catch handles cases where IE balks (such as removing a property on window) + try { + this[ name ] = undefined; + delete this[ name ]; + } catch( e ) {} + }); + }, + + addClass: function( value ) { + var classes, elem, cur, clazz, j, + i = 0, + len = this.length, + proceed = typeof value === "string" && value; + + if ( jQuery.isFunction( value ) ) { + return this.each(function( j ) { + jQuery( this ).addClass( value.call( this, j, this.className ) ); + }); + } + + if ( proceed ) { + // The disjunction here is for better compressibility (see removeClass) + classes = ( value || "" ).match( core_rnotwhite ) || []; + + for ( ; i < len; i++ ) { + elem = this[ i ]; + cur = elem.nodeType === 1 && ( elem.className ? + ( " " + elem.className + " " ).replace( rclass, " " ) : + " " + ); + + if ( cur ) { + j = 0; + while ( (clazz = classes[j++]) ) { + if ( cur.indexOf( " " + clazz + " " ) < 0 ) { + cur += clazz + " "; + } + } + elem.className = jQuery.trim( cur ); + + } + } + } + + return this; + }, + + removeClass: function( value ) { + var classes, elem, cur, clazz, j, + i = 0, + len = this.length, + proceed = arguments.length === 0 || typeof value === "string" && value; + + if ( jQuery.isFunction( value ) ) { + return this.each(function( j ) { + jQuery( this ).removeClass( value.call( this, j, this.className ) ); + }); + } + if ( proceed ) { + classes = ( value || "" ).match( core_rnotwhite ) || []; + + for ( ; i < len; i++ ) { + elem = this[ i ]; + // This expression is here for better compressibility (see addClass) + cur = elem.nodeType === 1 && ( elem.className ? + ( " " + elem.className + " " ).replace( rclass, " " ) : + "" + ); + + if ( cur ) { + j = 0; + while ( (clazz = classes[j++]) ) { + // Remove *all* instances + while ( cur.indexOf( " " + clazz + " " ) >= 0 ) { + cur = cur.replace( " " + clazz + " ", " " ); + } + } + elem.className = value ? jQuery.trim( cur ) : ""; + } + } + } + + return this; + }, + + toggleClass: function( value, stateVal ) { + var type = typeof value; + + if ( typeof stateVal === "boolean" && type === "string" ) { + return stateVal ? this.addClass( value ) : this.removeClass( value ); + } + + if ( jQuery.isFunction( value ) ) { + return this.each(function( i ) { + jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal ); + }); + } + + return this.each(function() { + if ( type === "string" ) { + // toggle individual class names + var className, + i = 0, + self = jQuery( this ), + classNames = value.match( core_rnotwhite ) || []; + + while ( (className = classNames[ i++ ]) ) { + // check each className given, space separated list + if ( self.hasClass( className ) ) { + self.removeClass( className ); + } else { + self.addClass( className ); + } + } + + // Toggle whole class name + } else if ( type === core_strundefined || type === "boolean" ) { + if ( this.className ) { + // store className if set + jQuery._data( this, "__className__", this.className ); + } + + // If the element has a class name or if we're passed "false", + // then remove the whole classname (if there was one, the above saved it). + // Otherwise bring back whatever was previously saved (if anything), + // falling back to the empty string if nothing was stored. + this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || ""; + } + }); + }, + + hasClass: function( selector ) { + var className = " " + selector + " ", + i = 0, + l = this.length; + for ( ; i < l; i++ ) { + if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) { + return true; + } + } + + return false; + }, + + val: function( value ) { + var ret, hooks, isFunction, + elem = this[0]; + + if ( !arguments.length ) { + if ( elem ) { + hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ]; + + if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) { + return ret; + } + + ret = elem.value; + + return typeof ret === "string" ? + // handle most common string cases + ret.replace(rreturn, "") : + // handle cases where value is null/undef or number + ret == null ? "" : ret; + } + + return; + } + + isFunction = jQuery.isFunction( value ); + + return this.each(function( i ) { + var val; + + if ( this.nodeType !== 1 ) { + return; + } + + if ( isFunction ) { + val = value.call( this, i, jQuery( this ).val() ); + } else { + val = value; + } + + // Treat null/undefined as ""; convert numbers to string + if ( val == null ) { + val = ""; + } else if ( typeof val === "number" ) { + val += ""; + } else if ( jQuery.isArray( val ) ) { + val = jQuery.map(val, function ( value ) { + return value == null ? "" : value + ""; + }); + } + + hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; + + // If set returns undefined, fall back to normal setting + if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) { + this.value = val; + } + }); + } +}); + +jQuery.extend({ + valHooks: { + option: { + get: function( elem ) { + // Use proper attribute retrieval(#6932, #12072) + var val = jQuery.find.attr( elem, "value" ); + return val != null ? + val : + elem.text; + } + }, + select: { + get: function( elem ) { + var value, option, + options = elem.options, + index = elem.selectedIndex, + one = elem.type === "select-one" || index < 0, + values = one ? null : [], + max = one ? index + 1 : options.length, + i = index < 0 ? + max : + one ? index : 0; + + // Loop through all the selected options + for ( ; i < max; i++ ) { + option = options[ i ]; + + // oldIE doesn't update selected after form reset (#2551) + if ( ( option.selected || i === index ) && + // Don't return options that are disabled or in a disabled optgroup + ( jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null ) && + ( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) { + + // Get the specific value for the option + value = jQuery( option ).val(); + + // We don't need an array for one selects + if ( one ) { + return value; + } + + // Multi-Selects return an array + values.push( value ); + } + } + + return values; + }, + + set: function( elem, value ) { + var optionSet, option, + options = elem.options, + values = jQuery.makeArray( value ), + i = options.length; + + while ( i-- ) { + option = options[ i ]; + if ( (option.selected = jQuery.inArray( jQuery(option).val(), values ) >= 0) ) { + optionSet = true; + } + } + + // force browsers to behave consistently when non-matching value is set + if ( !optionSet ) { + elem.selectedIndex = -1; + } + return values; + } + } + }, + + attr: function( elem, name, value ) { + var hooks, ret, + nType = elem.nodeType; + + // don't get/set attributes on text, comment and attribute nodes + if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { + return; + } + + // Fallback to prop when attributes are not supported + if ( typeof elem.getAttribute === core_strundefined ) { + return jQuery.prop( elem, name, value ); + } + + // All attributes are lowercase + // Grab necessary hook if one is defined + if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { + name = name.toLowerCase(); + hooks = jQuery.attrHooks[ name ] || + ( jQuery.expr.match.bool.test( name ) ? boolHook : nodeHook ); + } + + if ( value !== undefined ) { + + if ( value === null ) { + jQuery.removeAttr( elem, name ); + + } else if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) { + return ret; + + } else { + elem.setAttribute( name, value + "" ); + return value; + } + + } else if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) { + return ret; + + } else { + ret = jQuery.find.attr( elem, name ); + + // Non-existent attributes return null, we normalize to undefined + return ret == null ? + undefined : + ret; + } + }, + + removeAttr: function( elem, value ) { + var name, propName, + i = 0, + attrNames = value && value.match( core_rnotwhite ); + + if ( attrNames && elem.nodeType === 1 ) { + while ( (name = attrNames[i++]) ) { + propName = jQuery.propFix[ name ] || name; + + // Boolean attributes get special treatment (#10870) + if ( jQuery.expr.match.bool.test( name ) ) { + // Set corresponding property to false + if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) { + elem[ propName ] = false; + // Support: IE<9 + // Also clear defaultChecked/defaultSelected (if appropriate) + } else { + elem[ jQuery.camelCase( "default-" + name ) ] = + elem[ propName ] = false; + } + + // See #9699 for explanation of this approach (setting first, then removal) + } else { + jQuery.attr( elem, name, "" ); + } + + elem.removeAttribute( getSetAttribute ? name : propName ); + } + } + }, + + attrHooks: { + type: { + set: function( elem, value ) { + if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) { + // Setting the type on a radio button after the value resets the value in IE6-9 + // Reset value to default in case type is set after value during creation + var val = elem.value; + elem.setAttribute( "type", value ); + if ( val ) { + elem.value = val; + } + return value; + } + } + } + }, + + propFix: { + "for": "htmlFor", + "class": "className" + }, + + prop: function( elem, name, value ) { + var ret, hooks, notxml, + nType = elem.nodeType; + + // don't get/set properties on text, comment and attribute nodes + if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { + return; + } + + notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); + + if ( notxml ) { + // Fix name and attach hooks + name = jQuery.propFix[ name ] || name; + hooks = jQuery.propHooks[ name ]; + } + + if ( value !== undefined ) { + return hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ? + ret : + ( elem[ name ] = value ); + + } else { + return hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ? + ret : + elem[ name ]; + } + }, + + propHooks: { + tabIndex: { + get: function( elem ) { + // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set + // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ + // Use proper attribute retrieval(#12072) + var tabindex = jQuery.find.attr( elem, "tabindex" ); + + return tabindex ? + parseInt( tabindex, 10 ) : + rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ? + 0 : + -1; + } + } + } +}); + +// Hooks for boolean attributes +boolHook = { + set: function( elem, value, name ) { + if ( value === false ) { + // Remove boolean attributes when set to false + jQuery.removeAttr( elem, name ); + } else if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) { + // IE<8 needs the *property* name + elem.setAttribute( !getSetAttribute && jQuery.propFix[ name ] || name, name ); + + // Use defaultChecked and defaultSelected for oldIE + } else { + elem[ jQuery.camelCase( "default-" + name ) ] = elem[ name ] = true; + } + + return name; + } +}; +jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) { + var getter = jQuery.expr.attrHandle[ name ] || jQuery.find.attr; + + jQuery.expr.attrHandle[ name ] = getSetInput && getSetAttribute || !ruseDefault.test( name ) ? + function( elem, name, isXML ) { + var fn = jQuery.expr.attrHandle[ name ], + ret = isXML ? + undefined : + /* jshint eqeqeq: false */ + (jQuery.expr.attrHandle[ name ] = undefined) != + getter( elem, name, isXML ) ? + + name.toLowerCase() : + null; + jQuery.expr.attrHandle[ name ] = fn; + return ret; + } : + function( elem, name, isXML ) { + return isXML ? + undefined : + elem[ jQuery.camelCase( "default-" + name ) ] ? + name.toLowerCase() : + null; + }; +}); + +// fix oldIE attroperties +if ( !getSetInput || !getSetAttribute ) { + jQuery.attrHooks.value = { + set: function( elem, value, name ) { + if ( jQuery.nodeName( elem, "input" ) ) { + // Does not return so that setAttribute is also used + elem.defaultValue = value; + } else { + // Use nodeHook if defined (#1954); otherwise setAttribute is fine + return nodeHook && nodeHook.set( elem, value, name ); + } + } + }; +} + +// IE6/7 do not support getting/setting some attributes with get/setAttribute +if ( !getSetAttribute ) { + + // Use this for any attribute in IE6/7 + // This fixes almost every IE6/7 issue + nodeHook = { + set: function( elem, value, name ) { + // Set the existing or create a new attribute node + var ret = elem.getAttributeNode( name ); + if ( !ret ) { + elem.setAttributeNode( + (ret = elem.ownerDocument.createAttribute( name )) + ); + } + + ret.value = value += ""; + + // Break association with cloned elements by also using setAttribute (#9646) + return name === "value" || value === elem.getAttribute( name ) ? + value : + undefined; + } + }; + jQuery.expr.attrHandle.id = jQuery.expr.attrHandle.name = jQuery.expr.attrHandle.coords = + // Some attributes are constructed with empty-string values when not defined + function( elem, name, isXML ) { + var ret; + return isXML ? + undefined : + (ret = elem.getAttributeNode( name )) && ret.value !== "" ? + ret.value : + null; + }; + jQuery.valHooks.button = { + get: function( elem, name ) { + var ret = elem.getAttributeNode( name ); + return ret && ret.specified ? + ret.value : + undefined; + }, + set: nodeHook.set + }; + + // Set contenteditable to false on removals(#10429) + // Setting to empty string throws an error as an invalid value + jQuery.attrHooks.contenteditable = { + set: function( elem, value, name ) { + nodeHook.set( elem, value === "" ? false : value, name ); + } + }; + + // Set width and height to auto instead of 0 on empty string( Bug #8150 ) + // This is for removals + jQuery.each([ "width", "height" ], function( i, name ) { + jQuery.attrHooks[ name ] = { + set: function( elem, value ) { + if ( value === "" ) { + elem.setAttribute( name, "auto" ); + return value; + } + } + }; + }); +} + + +// Some attributes require a special call on IE +// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx +if ( !jQuery.support.hrefNormalized ) { + // href/src property should get the full normalized URL (#10299/#12915) + jQuery.each([ "href", "src" ], function( i, name ) { + jQuery.propHooks[ name ] = { + get: function( elem ) { + return elem.getAttribute( name, 4 ); + } + }; + }); +} + +if ( !jQuery.support.style ) { + jQuery.attrHooks.style = { + get: function( elem ) { + // Return undefined in the case of empty string + // Note: IE uppercases css property names, but if we were to .toLowerCase() + // .cssText, that would destroy case senstitivity in URL's, like in "background" + return elem.style.cssText || undefined; + }, + set: function( elem, value ) { + return ( elem.style.cssText = value + "" ); + } + }; +} + +// Safari mis-reports the default selected property of an option +// Accessing the parent's selectedIndex property fixes it +if ( !jQuery.support.optSelected ) { + jQuery.propHooks.selected = { + get: function( elem ) { + var parent = elem.parentNode; + + if ( parent ) { + parent.selectedIndex; + + // Make sure that it also works with optgroups, see #5701 + if ( parent.parentNode ) { + parent.parentNode.selectedIndex; + } + } + return null; + } + }; +} + +jQuery.each([ + "tabIndex", + "readOnly", + "maxLength", + "cellSpacing", + "cellPadding", + "rowSpan", + "colSpan", + "useMap", + "frameBorder", + "contentEditable" +], function() { + jQuery.propFix[ this.toLowerCase() ] = this; +}); + +// IE6/7 call enctype encoding +if ( !jQuery.support.enctype ) { + jQuery.propFix.enctype = "encoding"; +} + +// Radios and checkboxes getter/setter +jQuery.each([ "radio", "checkbox" ], function() { + jQuery.valHooks[ this ] = { + set: function( elem, value ) { + if ( jQuery.isArray( value ) ) { + return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 ); + } + } + }; + if ( !jQuery.support.checkOn ) { + jQuery.valHooks[ this ].get = function( elem ) { + // Support: Webkit + // "" is returned instead of "on" if a value isn't specified + return elem.getAttribute("value") === null ? "on" : elem.value; + }; + } +}); +var rformElems = /^(?:input|select|textarea)$/i, + rkeyEvent = /^key/, + rmouseEvent = /^(?:mouse|contextmenu)|click/, + rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, + rtypenamespace = /^([^.]*)(?:\.(.+)|)$/; + +function returnTrue() { + return true; +} + +function returnFalse() { + return false; +} + +function safeActiveElement() { + try { + return document.activeElement; + } catch ( err ) { } +} + +/* + * Helper functions for managing events -- not part of the public interface. + * Props to Dean Edwards' addEvent library for many of the ideas. + */ +jQuery.event = { + + global: {}, + + add: function( elem, types, handler, data, selector ) { + var tmp, events, t, handleObjIn, + special, eventHandle, handleObj, + handlers, type, namespaces, origType, + elemData = jQuery._data( elem ); + + // Don't attach events to noData or text/comment nodes (but allow plain objects) + if ( !elemData ) { + return; + } + + // Caller can pass in an object of custom data in lieu of the handler + if ( handler.handler ) { + handleObjIn = handler; + handler = handleObjIn.handler; + selector = handleObjIn.selector; + } + + // Make sure that the handler has a unique ID, used to find/remove it later + if ( !handler.guid ) { + handler.guid = jQuery.guid++; + } + + // Init the element's event structure and main handler, if this is the first + if ( !(events = elemData.events) ) { + events = elemData.events = {}; + } + if ( !(eventHandle = elemData.handle) ) { + eventHandle = elemData.handle = function( e ) { + // Discard the second event of a jQuery.event.trigger() and + // when an event is called after a page has unloaded + return typeof jQuery !== core_strundefined && (!e || jQuery.event.triggered !== e.type) ? + jQuery.event.dispatch.apply( eventHandle.elem, arguments ) : + undefined; + }; + // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events + eventHandle.elem = elem; + } + + // Handle multiple events separated by a space + types = ( types || "" ).match( core_rnotwhite ) || [""]; + t = types.length; + while ( t-- ) { + tmp = rtypenamespace.exec( types[t] ) || []; + type = origType = tmp[1]; + namespaces = ( tmp[2] || "" ).split( "." ).sort(); + + // There *must* be a type, no attaching namespace-only handlers + if ( !type ) { + continue; + } + + // If event changes its type, use the special event handlers for the changed type + special = jQuery.event.special[ type ] || {}; + + // If selector defined, determine special event api type, otherwise given type + type = ( selector ? special.delegateType : special.bindType ) || type; + + // Update special based on newly reset type + special = jQuery.event.special[ type ] || {}; + + // handleObj is passed to all event handlers + handleObj = jQuery.extend({ + type: type, + origType: origType, + data: data, + handler: handler, + guid: handler.guid, + selector: selector, + needsContext: selector && jQuery.expr.match.needsContext.test( selector ), + namespace: namespaces.join(".") + }, handleObjIn ); + + // Init the event handler queue if we're the first + if ( !(handlers = events[ type ]) ) { + handlers = events[ type ] = []; + handlers.delegateCount = 0; + + // Only use addEventListener/attachEvent if the special events handler returns false + if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { + // Bind the global event handler to the element + if ( elem.addEventListener ) { + elem.addEventListener( type, eventHandle, false ); + + } else if ( elem.attachEvent ) { + elem.attachEvent( "on" + type, eventHandle ); + } + } + } + + if ( special.add ) { + special.add.call( elem, handleObj ); + + if ( !handleObj.handler.guid ) { + handleObj.handler.guid = handler.guid; + } + } + + // Add to the element's handler list, delegates in front + if ( selector ) { + handlers.splice( handlers.delegateCount++, 0, handleObj ); + } else { + handlers.push( handleObj ); + } + + // Keep track of which events have ever been used, for event optimization + jQuery.event.global[ type ] = true; + } + + // Nullify elem to prevent memory leaks in IE + elem = null; + }, + + // Detach an event or set of events from an element + remove: function( elem, types, handler, selector, mappedTypes ) { + var j, handleObj, tmp, + origCount, t, events, + special, handlers, type, + namespaces, origType, + elemData = jQuery.hasData( elem ) && jQuery._data( elem ); + + if ( !elemData || !(events = elemData.events) ) { + return; + } + + // Once for each type.namespace in types; type may be omitted + types = ( types || "" ).match( core_rnotwhite ) || [""]; + t = types.length; + while ( t-- ) { + tmp = rtypenamespace.exec( types[t] ) || []; + type = origType = tmp[1]; + namespaces = ( tmp[2] || "" ).split( "." ).sort(); + + // Unbind all events (on this namespace, if provided) for the element + if ( !type ) { + for ( type in events ) { + jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); + } + continue; + } + + special = jQuery.event.special[ type ] || {}; + type = ( selector ? special.delegateType : special.bindType ) || type; + handlers = events[ type ] || []; + tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ); + + // Remove matching events + origCount = j = handlers.length; + while ( j-- ) { + handleObj = handlers[ j ]; + + if ( ( mappedTypes || origType === handleObj.origType ) && + ( !handler || handler.guid === handleObj.guid ) && + ( !tmp || tmp.test( handleObj.namespace ) ) && + ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) { + handlers.splice( j, 1 ); + + if ( handleObj.selector ) { + handlers.delegateCount--; + } + if ( special.remove ) { + special.remove.call( elem, handleObj ); + } + } + } + + // Remove generic event handler if we removed something and no more handlers exist + // (avoids potential for endless recursion during removal of special event handlers) + if ( origCount && !handlers.length ) { + if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) { + jQuery.removeEvent( elem, type, elemData.handle ); + } + + delete events[ type ]; + } + } + + // Remove the expando if it's no longer used + if ( jQuery.isEmptyObject( events ) ) { + delete elemData.handle; + + // removeData also checks for emptiness and clears the expando if empty + // so use it instead of delete + jQuery._removeData( elem, "events" ); + } + }, + + trigger: function( event, data, elem, onlyHandlers ) { + var handle, ontype, cur, + bubbleType, special, tmp, i, + eventPath = [ elem || document ], + type = core_hasOwn.call( event, "type" ) ? event.type : event, + namespaces = core_hasOwn.call( event, "namespace" ) ? event.namespace.split(".") : []; + + cur = tmp = elem = elem || document; + + // Don't do events on text and comment nodes + if ( elem.nodeType === 3 || elem.nodeType === 8 ) { + return; + } + + // focus/blur morphs to focusin/out; ensure we're not firing them right now + if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { + return; + } + + if ( type.indexOf(".") >= 0 ) { + // Namespaced trigger; create a regexp to match event type in handle() + namespaces = type.split("."); + type = namespaces.shift(); + namespaces.sort(); + } + ontype = type.indexOf(":") < 0 && "on" + type; + + // Caller can pass in a jQuery.Event object, Object, or just an event type string + event = event[ jQuery.expando ] ? + event : + new jQuery.Event( type, typeof event === "object" && event ); + + // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) + event.isTrigger = onlyHandlers ? 2 : 3; + event.namespace = namespaces.join("."); + event.namespace_re = event.namespace ? + new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) : + null; + + // Clean up the event in case it is being reused + event.result = undefined; + if ( !event.target ) { + event.target = elem; + } + + // Clone any incoming data and prepend the event, creating the handler arg list + data = data == null ? + [ event ] : + jQuery.makeArray( data, [ event ] ); + + // Allow special events to draw outside the lines + special = jQuery.event.special[ type ] || {}; + if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { + return; + } + + // Determine event propagation path in advance, per W3C events spec (#9951) + // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) + if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { + + bubbleType = special.delegateType || type; + if ( !rfocusMorph.test( bubbleType + type ) ) { + cur = cur.parentNode; + } + for ( ; cur; cur = cur.parentNode ) { + eventPath.push( cur ); + tmp = cur; + } + + // Only add window if we got to document (e.g., not plain obj or detached DOM) + if ( tmp === (elem.ownerDocument || document) ) { + eventPath.push( tmp.defaultView || tmp.parentWindow || window ); + } + } + + // Fire handlers on the event path + i = 0; + while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) { + + event.type = i > 1 ? + bubbleType : + special.bindType || type; + + // jQuery handler + handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" ); + if ( handle ) { + handle.apply( cur, data ); + } + + // Native handler + handle = ontype && cur[ ontype ]; + if ( handle && jQuery.acceptData( cur ) && handle.apply && handle.apply( cur, data ) === false ) { + event.preventDefault(); + } + } + event.type = type; + + // If nobody prevented the default action, do it now + if ( !onlyHandlers && !event.isDefaultPrevented() ) { + + if ( (!special._default || special._default.apply( eventPath.pop(), data ) === false) && + jQuery.acceptData( elem ) ) { + + // Call a native DOM method on the target with the same name name as the event. + // Can't use an .isFunction() check here because IE6/7 fails that test. + // Don't do default actions on window, that's where global variables be (#6170) + if ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) { + + // Don't re-trigger an onFOO event when we call its FOO() method + tmp = elem[ ontype ]; + + if ( tmp ) { + elem[ ontype ] = null; + } + + // Prevent re-triggering of the same event, since we already bubbled it above + jQuery.event.triggered = type; + try { + elem[ type ](); + } catch ( e ) { + // IE<9 dies on focus/blur to hidden element (#1486,#12518) + // only reproducible on winXP IE8 native, not IE9 in IE8 mode + } + jQuery.event.triggered = undefined; + + if ( tmp ) { + elem[ ontype ] = tmp; + } + } + } + } + + return event.result; + }, + + dispatch: function( event ) { + + // Make a writable jQuery.Event from the native event object + event = jQuery.event.fix( event ); + + var i, ret, handleObj, matched, j, + handlerQueue = [], + args = core_slice.call( arguments ), + handlers = ( jQuery._data( this, "events" ) || {} )[ event.type ] || [], + special = jQuery.event.special[ event.type ] || {}; + + // Use the fix-ed jQuery.Event rather than the (read-only) native event + args[0] = event; + event.delegateTarget = this; + + // Call the preDispatch hook for the mapped type, and let it bail if desired + if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { + return; + } + + // Determine handlers + handlerQueue = jQuery.event.handlers.call( this, event, handlers ); + + // Run delegates first; they may want to stop propagation beneath us + i = 0; + while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) { + event.currentTarget = matched.elem; + + j = 0; + while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) { + + // Triggered event must either 1) have no namespace, or + // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace). + if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) { + + event.handleObj = handleObj; + event.data = handleObj.data; + + ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler ) + .apply( matched.elem, args ); + + if ( ret !== undefined ) { + if ( (event.result = ret) === false ) { + event.preventDefault(); + event.stopPropagation(); + } + } + } + } + } + + // Call the postDispatch hook for the mapped type + if ( special.postDispatch ) { + special.postDispatch.call( this, event ); + } + + return event.result; + }, + + handlers: function( event, handlers ) { + var sel, handleObj, matches, i, + handlerQueue = [], + delegateCount = handlers.delegateCount, + cur = event.target; + + // Find delegate handlers + // Black-hole SVG <use> instance trees (#13180) + // Avoid non-left-click bubbling in Firefox (#3861) + if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) { + + /* jshint eqeqeq: false */ + for ( ; cur != this; cur = cur.parentNode || this ) { + /* jshint eqeqeq: true */ + + // Don't check non-elements (#13208) + // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) + if ( cur.nodeType === 1 && (cur.disabled !== true || event.type !== "click") ) { + matches = []; + for ( i = 0; i < delegateCount; i++ ) { + handleObj = handlers[ i ]; + + // Don't conflict with Object.prototype properties (#13203) + sel = handleObj.selector + " "; + + if ( matches[ sel ] === undefined ) { + matches[ sel ] = handleObj.needsContext ? + jQuery( sel, this ).index( cur ) >= 0 : + jQuery.find( sel, this, null, [ cur ] ).length; + } + if ( matches[ sel ] ) { + matches.push( handleObj ); + } + } + if ( matches.length ) { + handlerQueue.push({ elem: cur, handlers: matches }); + } + } + } + } + + // Add the remaining (directly-bound) handlers + if ( delegateCount < handlers.length ) { + handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) }); + } + + return handlerQueue; + }, + + fix: function( event ) { + if ( event[ jQuery.expando ] ) { + return event; + } + + // Create a writable copy of the event object and normalize some properties + var i, prop, copy, + type = event.type, + originalEvent = event, + fixHook = this.fixHooks[ type ]; + + if ( !fixHook ) { + this.fixHooks[ type ] = fixHook = + rmouseEvent.test( type ) ? this.mouseHooks : + rkeyEvent.test( type ) ? this.keyHooks : + {}; + } + copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; + + event = new jQuery.Event( originalEvent ); + + i = copy.length; + while ( i-- ) { + prop = copy[ i ]; + event[ prop ] = originalEvent[ prop ]; + } + + // Support: IE<9 + // Fix target property (#1925) + if ( !event.target ) { + event.target = originalEvent.srcElement || document; + } + + // Support: Chrome 23+, Safari? + // Target should not be a text node (#504, #13143) + if ( event.target.nodeType === 3 ) { + event.target = event.target.parentNode; + } + + // Support: IE<9 + // For mouse/key events, metaKey==false if it's undefined (#3368, #11328) + event.metaKey = !!event.metaKey; + + return fixHook.filter ? fixHook.filter( event, originalEvent ) : event; + }, + + // Includes some event props shared by KeyEvent and MouseEvent + props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), + + fixHooks: {}, + + keyHooks: { + props: "char charCode key keyCode".split(" "), + filter: function( event, original ) { + + // Add which for key events + if ( event.which == null ) { + event.which = original.charCode != null ? original.charCode : original.keyCode; + } + + return event; + } + }, + + mouseHooks: { + props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "), + filter: function( event, original ) { + var body, eventDoc, doc, + button = original.button, + fromElement = original.fromElement; + + // Calculate pageX/Y if missing and clientX/Y available + if ( event.pageX == null && original.clientX != null ) { + eventDoc = event.target.ownerDocument || document; + doc = eventDoc.documentElement; + body = eventDoc.body; + + event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 ); + event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 ); + } + + // Add relatedTarget, if necessary + if ( !event.relatedTarget && fromElement ) { + event.relatedTarget = fromElement === event.target ? original.toElement : fromElement; + } + + // Add which for click: 1 === left; 2 === middle; 3 === right + // Note: button is not normalized, so don't use it + if ( !event.which && button !== undefined ) { + event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); + } + + return event; + } + }, + + special: { + load: { + // Prevent triggered image.load events from bubbling to window.load + noBubble: true + }, + focus: { + // Fire native event if possible so blur/focus sequence is correct + trigger: function() { + if ( this !== safeActiveElement() && this.focus ) { + try { + this.focus(); + return false; + } catch ( e ) { + // Support: IE<9 + // If we error on focus to hidden element (#1486, #12518), + // let .trigger() run the handlers + } + } + }, + delegateType: "focusin" + }, + blur: { + trigger: function() { + if ( this === safeActiveElement() && this.blur ) { + this.blur(); + return false; + } + }, + delegateType: "focusout" + }, + click: { + // For checkbox, fire native event so checked state will be right + trigger: function() { + if ( jQuery.nodeName( this, "input" ) && this.type === "checkbox" && this.click ) { + this.click(); + return false; + } + }, + + // For cross-browser consistency, don't fire native .click() on links + _default: function( event ) { + return jQuery.nodeName( event.target, "a" ); + } + }, + + beforeunload: { + postDispatch: function( event ) { + + // Even when returnValue equals to undefined Firefox will still show alert + if ( event.result !== undefined ) { + event.originalEvent.returnValue = event.result; + } + } + } + }, + + simulate: function( type, elem, event, bubble ) { + // Piggyback on a donor event to simulate a different one. + // Fake originalEvent to avoid donor's stopPropagation, but if the + // simulated event prevents default then we do the same on the donor. + var e = jQuery.extend( + new jQuery.Event(), + event, + { + type: type, + isSimulated: true, + originalEvent: {} + } + ); + if ( bubble ) { + jQuery.event.trigger( e, null, elem ); + } else { + jQuery.event.dispatch.call( elem, e ); + } + if ( e.isDefaultPrevented() ) { + event.preventDefault(); + } + } +}; + +jQuery.removeEvent = document.removeEventListener ? + function( elem, type, handle ) { + if ( elem.removeEventListener ) { + elem.removeEventListener( type, handle, false ); + } + } : + function( elem, type, handle ) { + var name = "on" + type; + + if ( elem.detachEvent ) { + + // #8545, #7054, preventing memory leaks for custom events in IE6-8 + // detachEvent needed property on element, by name of that event, to properly expose it to GC + if ( typeof elem[ name ] === core_strundefined ) { + elem[ name ] = null; + } + + elem.detachEvent( name, handle ); + } + }; + +jQuery.Event = function( src, props ) { + // Allow instantiation without the 'new' keyword + if ( !(this instanceof jQuery.Event) ) { + return new jQuery.Event( src, props ); + } + + // Event object + if ( src && src.type ) { + this.originalEvent = src; + this.type = src.type; + + // Events bubbling up the document may have been marked as prevented + // by a handler lower down the tree; reflect the correct value. + this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false || + src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse; + + // Event type + } else { + this.type = src; + } + + // Put explicitly provided properties onto the event object + if ( props ) { + jQuery.extend( this, props ); + } + + // Create a timestamp if incoming event doesn't have one + this.timeStamp = src && src.timeStamp || jQuery.now(); + + // Mark it as fixed + this[ jQuery.expando ] = true; +}; + +// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding +// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html +jQuery.Event.prototype = { + isDefaultPrevented: returnFalse, + isPropagationStopped: returnFalse, + isImmediatePropagationStopped: returnFalse, + + preventDefault: function() { + var e = this.originalEvent; + + this.isDefaultPrevented = returnTrue; + if ( !e ) { + return; + } + + // If preventDefault exists, run it on the original event + if ( e.preventDefault ) { + e.preventDefault(); + + // Support: IE + // Otherwise set the returnValue property of the original event to false + } else { + e.returnValue = false; + } + }, + stopPropagation: function() { + var e = this.originalEvent; + + this.isPropagationStopped = returnTrue; + if ( !e ) { + return; + } + // If stopPropagation exists, run it on the original event + if ( e.stopPropagation ) { + e.stopPropagation(); + } + + // Support: IE + // Set the cancelBubble property of the original event to true + e.cancelBubble = true; + }, + stopImmediatePropagation: function() { + this.isImmediatePropagationStopped = returnTrue; + this.stopPropagation(); + } +}; + +// Create mouseenter/leave events using mouseover/out and event-time checks +jQuery.each({ + mouseenter: "mouseover", + mouseleave: "mouseout" +}, function( orig, fix ) { + jQuery.event.special[ orig ] = { + delegateType: fix, + bindType: fix, + + handle: function( event ) { + var ret, + target = this, + related = event.relatedTarget, + handleObj = event.handleObj; + + // For mousenter/leave call the handler if related is outside the target. + // NB: No relatedTarget if the mouse left/entered the browser window + if ( !related || (related !== target && !jQuery.contains( target, related )) ) { + event.type = handleObj.origType; + ret = handleObj.handler.apply( this, arguments ); + event.type = fix; + } + return ret; + } + }; +}); + +// IE submit delegation +if ( !jQuery.support.submitBubbles ) { + + jQuery.event.special.submit = { + setup: function() { + // Only need this for delegated form submit events + if ( jQuery.nodeName( this, "form" ) ) { + return false; + } + + // Lazy-add a submit handler when a descendant form may potentially be submitted + jQuery.event.add( this, "click._submit keypress._submit", function( e ) { + // Node name check avoids a VML-related crash in IE (#9807) + var elem = e.target, + form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined; + if ( form && !jQuery._data( form, "submitBubbles" ) ) { + jQuery.event.add( form, "submit._submit", function( event ) { + event._submit_bubble = true; + }); + jQuery._data( form, "submitBubbles", true ); + } + }); + // return undefined since we don't need an event listener + }, + + postDispatch: function( event ) { + // If form was submitted by the user, bubble the event up the tree + if ( event._submit_bubble ) { + delete event._submit_bubble; + if ( this.parentNode && !event.isTrigger ) { + jQuery.event.simulate( "submit", this.parentNode, event, true ); + } + } + }, + + teardown: function() { + // Only need this for delegated form submit events + if ( jQuery.nodeName( this, "form" ) ) { + return false; + } + + // Remove delegated handlers; cleanData eventually reaps submit handlers attached above + jQuery.event.remove( this, "._submit" ); + } + }; +} + +// IE change delegation and checkbox/radio fix +if ( !jQuery.support.changeBubbles ) { + + jQuery.event.special.change = { + + setup: function() { + + if ( rformElems.test( this.nodeName ) ) { + // IE doesn't fire change on a check/radio until blur; trigger it on click + // after a propertychange. Eat the blur-change in special.change.handle. + // This still fires onchange a second time for check/radio after blur. + if ( this.type === "checkbox" || this.type === "radio" ) { + jQuery.event.add( this, "propertychange._change", function( event ) { + if ( event.originalEvent.propertyName === "checked" ) { + this._just_changed = true; + } + }); + jQuery.event.add( this, "click._change", function( event ) { + if ( this._just_changed && !event.isTrigger ) { + this._just_changed = false; + } + // Allow triggered, simulated change events (#11500) + jQuery.event.simulate( "change", this, event, true ); + }); + } + return false; + } + // Delegated event; lazy-add a change handler on descendant inputs + jQuery.event.add( this, "beforeactivate._change", function( e ) { + var elem = e.target; + + if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "changeBubbles" ) ) { + jQuery.event.add( elem, "change._change", function( event ) { + if ( this.parentNode && !event.isSimulated && !event.isTrigger ) { + jQuery.event.simulate( "change", this.parentNode, event, true ); + } + }); + jQuery._data( elem, "changeBubbles", true ); + } + }); + }, + + handle: function( event ) { + var elem = event.target; + + // Swallow native change events from checkbox/radio, we already triggered them above + if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) { + return event.handleObj.handler.apply( this, arguments ); + } + }, + + teardown: function() { + jQuery.event.remove( this, "._change" ); + + return !rformElems.test( this.nodeName ); + } + }; +} + +// Create "bubbling" focus and blur events +if ( !jQuery.support.focusinBubbles ) { + jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { + + // Attach a single capturing handler while someone wants focusin/focusout + var attaches = 0, + handler = function( event ) { + jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true ); + }; + + jQuery.event.special[ fix ] = { + setup: function() { + if ( attaches++ === 0 ) { + document.addEventListener( orig, handler, true ); + } + }, + teardown: function() { + if ( --attaches === 0 ) { + document.removeEventListener( orig, handler, true ); + } + } + }; + }); +} + +jQuery.fn.extend({ + + on: function( types, selector, data, fn, /*INTERNAL*/ one ) { + var type, origFn; + + // Types can be a map of types/handlers + if ( typeof types === "object" ) { + // ( types-Object, selector, data ) + if ( typeof selector !== "string" ) { + // ( types-Object, data ) + data = data || selector; + selector = undefined; + } + for ( type in types ) { + this.on( type, selector, data, types[ type ], one ); + } + return this; + } + + if ( data == null && fn == null ) { + // ( types, fn ) + fn = selector; + data = selector = undefined; + } else if ( fn == null ) { + if ( typeof selector === "string" ) { + // ( types, selector, fn ) + fn = data; + data = undefined; + } else { + // ( types, data, fn ) + fn = data; + data = selector; + selector = undefined; + } + } + if ( fn === false ) { + fn = returnFalse; + } else if ( !fn ) { + return this; + } + + if ( one === 1 ) { + origFn = fn; + fn = function( event ) { + // Can use an empty set, since event contains the info + jQuery().off( event ); + return origFn.apply( this, arguments ); + }; + // Use same guid so caller can remove using origFn + fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); + } + return this.each( function() { + jQuery.event.add( this, types, fn, data, selector ); + }); + }, + one: function( types, selector, data, fn ) { + return this.on( types, selector, data, fn, 1 ); + }, + off: function( types, selector, fn ) { + var handleObj, type; + if ( types && types.preventDefault && types.handleObj ) { + // ( event ) dispatched jQuery.Event + handleObj = types.handleObj; + jQuery( types.delegateTarget ).off( + handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, + handleObj.selector, + handleObj.handler + ); + return this; + } + if ( typeof types === "object" ) { + // ( types-object [, selector] ) + for ( type in types ) { + this.off( type, selector, types[ type ] ); + } + return this; + } + if ( selector === false || typeof selector === "function" ) { + // ( types [, fn] ) + fn = selector; + selector = undefined; + } + if ( fn === false ) { + fn = returnFalse; + } + return this.each(function() { + jQuery.event.remove( this, types, fn, selector ); + }); + }, + + trigger: function( type, data ) { + return this.each(function() { + jQuery.event.trigger( type, data, this ); + }); + }, + triggerHandler: function( type, data ) { + var elem = this[0]; + if ( elem ) { + return jQuery.event.trigger( type, data, elem, true ); + } + } +}); +var isSimple = /^.[^:#\[\.,]*$/, + rparentsprev = /^(?:parents|prev(?:Until|All))/, + rneedsContext = jQuery.expr.match.needsContext, + // methods guaranteed to produce a unique set when starting from a unique set + guaranteedUnique = { + children: true, + contents: true, + next: true, + prev: true + }; + +jQuery.fn.extend({ + find: function( selector ) { + var i, + ret = [], + self = this, + len = self.length; + + if ( typeof selector !== "string" ) { + return this.pushStack( jQuery( selector ).filter(function() { + for ( i = 0; i < len; i++ ) { + if ( jQuery.contains( self[ i ], this ) ) { + return true; + } + } + }) ); + } + + for ( i = 0; i < len; i++ ) { + jQuery.find( selector, self[ i ], ret ); + } + + // Needed because $( selector, context ) becomes $( context ).find( selector ) + ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret ); + ret.selector = this.selector ? this.selector + " " + selector : selector; + return ret; + }, + + has: function( target ) { + var i, + targets = jQuery( target, this ), + len = targets.length; + + return this.filter(function() { + for ( i = 0; i < len; i++ ) { + if ( jQuery.contains( this, targets[i] ) ) { + return true; + } + } + }); + }, + + not: function( selector ) { + return this.pushStack( winnow(this, selector || [], true) ); + }, + + filter: function( selector ) { + return this.pushStack( winnow(this, selector || [], false) ); + }, + + is: function( selector ) { + return !!winnow( + this, + + // If this is a positional/relative selector, check membership in the returned set + // so $("p:first").is("p:last") won't return true for a doc with two "p". + typeof selector === "string" && rneedsContext.test( selector ) ? + jQuery( selector ) : + selector || [], + false + ).length; + }, + + closest: function( selectors, context ) { + var cur, + i = 0, + l = this.length, + ret = [], + pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ? + jQuery( selectors, context || this.context ) : + 0; + + for ( ; i < l; i++ ) { + for ( cur = this[i]; cur && cur !== context; cur = cur.parentNode ) { + // Always skip document fragments + if ( cur.nodeType < 11 && (pos ? + pos.index(cur) > -1 : + + // Don't pass non-elements to Sizzle + cur.nodeType === 1 && + jQuery.find.matchesSelector(cur, selectors)) ) { + + cur = ret.push( cur ); + break; + } + } + } + + return this.pushStack( ret.length > 1 ? jQuery.unique( ret ) : ret ); + }, + + // Determine the position of an element within + // the matched set of elements + index: function( elem ) { + + // No argument, return index in parent + if ( !elem ) { + return ( this[0] && this[0].parentNode ) ? this.first().prevAll().length : -1; + } + + // index in selector + if ( typeof elem === "string" ) { + return jQuery.inArray( this[0], jQuery( elem ) ); + } + + // Locate the position of the desired element + return jQuery.inArray( + // If it receives a jQuery object, the first element is used + elem.jquery ? elem[0] : elem, this ); + }, + + add: function( selector, context ) { + var set = typeof selector === "string" ? + jQuery( selector, context ) : + jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ), + all = jQuery.merge( this.get(), set ); + + return this.pushStack( jQuery.unique(all) ); + }, + + addBack: function( selector ) { + return this.add( selector == null ? + this.prevObject : this.prevObject.filter(selector) + ); + } +}); + +function sibling( cur, dir ) { + do { + cur = cur[ dir ]; + } while ( cur && cur.nodeType !== 1 ); + + return cur; +} + +jQuery.each({ + parent: function( elem ) { + var parent = elem.parentNode; + return parent && parent.nodeType !== 11 ? parent : null; + }, + parents: function( elem ) { + return jQuery.dir( elem, "parentNode" ); + }, + parentsUntil: function( elem, i, until ) { + return jQuery.dir( elem, "parentNode", until ); + }, + next: function( elem ) { + return sibling( elem, "nextSibling" ); + }, + prev: function( elem ) { + return sibling( elem, "previousSibling" ); + }, + nextAll: function( elem ) { + return jQuery.dir( elem, "nextSibling" ); + }, + prevAll: function( elem ) { + return jQuery.dir( elem, "previousSibling" ); + }, + nextUntil: function( elem, i, until ) { + return jQuery.dir( elem, "nextSibling", until ); + }, + prevUntil: function( elem, i, until ) { + return jQuery.dir( elem, "previousSibling", until ); + }, + siblings: function( elem ) { + return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem ); + }, + children: function( elem ) { + return jQuery.sibling( elem.firstChild ); + }, + contents: function( elem ) { + return jQuery.nodeName( elem, "iframe" ) ? + elem.contentDocument || elem.contentWindow.document : + jQuery.merge( [], elem.childNodes ); + } +}, function( name, fn ) { + jQuery.fn[ name ] = function( until, selector ) { + var ret = jQuery.map( this, fn, until ); + + if ( name.slice( -5 ) !== "Until" ) { + selector = until; + } + + if ( selector && typeof selector === "string" ) { + ret = jQuery.filter( selector, ret ); + } + + if ( this.length > 1 ) { + // Remove duplicates + if ( !guaranteedUnique[ name ] ) { + ret = jQuery.unique( ret ); + } + + // Reverse order for parents* and prev-derivatives + if ( rparentsprev.test( name ) ) { + ret = ret.reverse(); + } + } + + return this.pushStack( ret ); + }; +}); + +jQuery.extend({ + filter: function( expr, elems, not ) { + var elem = elems[ 0 ]; + + if ( not ) { + expr = ":not(" + expr + ")"; + } + + return elems.length === 1 && elem.nodeType === 1 ? + jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] : + jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { + return elem.nodeType === 1; + })); + }, + + dir: function( elem, dir, until ) { + var matched = [], + cur = elem[ dir ]; + + while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) { + if ( cur.nodeType === 1 ) { + matched.push( cur ); + } + cur = cur[dir]; + } + return matched; + }, + + sibling: function( n, elem ) { + var r = []; + + for ( ; n; n = n.nextSibling ) { + if ( n.nodeType === 1 && n !== elem ) { + r.push( n ); + } + } + + return r; + } +}); + +// Implement the identical functionality for filter and not +function winnow( elements, qualifier, not ) { + if ( jQuery.isFunction( qualifier ) ) { + return jQuery.grep( elements, function( elem, i ) { + /* jshint -W018 */ + return !!qualifier.call( elem, i, elem ) !== not; + }); + + } + + if ( qualifier.nodeType ) { + return jQuery.grep( elements, function( elem ) { + return ( elem === qualifier ) !== not; + }); + + } + + if ( typeof qualifier === "string" ) { + if ( isSimple.test( qualifier ) ) { + return jQuery.filter( qualifier, elements, not ); + } + + qualifier = jQuery.filter( qualifier, elements ); + } + + return jQuery.grep( elements, function( elem ) { + return ( jQuery.inArray( elem, qualifier ) >= 0 ) !== not; + }); +} +function createSafeFragment( document ) { + var list = nodeNames.split( "|" ), + safeFrag = document.createDocumentFragment(); + + if ( safeFrag.createElement ) { + while ( list.length ) { + safeFrag.createElement( + list.pop() + ); + } + } + return safeFrag; +} + +var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" + + "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video", + rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g, + rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"), + rleadingWhitespace = /^\s+/, + rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, + rtagName = /<([\w:]+)/, + rtbody = /<tbody/i, + rhtml = /<|&#?\w+;/, + rnoInnerhtml = /<(?:script|style|link)/i, + manipulation_rcheckableType = /^(?:checkbox|radio)$/i, + // checked="checked" or checked + rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, + rscriptType = /^$|\/(?:java|ecma)script/i, + rscriptTypeMasked = /^true\/(.*)/, + rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g, + + // We have to close these tags to support XHTML (#13200) + wrapMap = { + option: [ 1, "<select multiple='multiple'>", "</select>" ], + legend: [ 1, "<fieldset>", "</fieldset>" ], + area: [ 1, "<map>", "</map>" ], + param: [ 1, "<object>", "</object>" ], + thead: [ 1, "<table>", "</table>" ], + tr: [ 2, "<table><tbody>", "</tbody></table>" ], + col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ], + td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ], + + // IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags, + // unless wrapped in a div with non-breaking characters in front of it. + _default: jQuery.support.htmlSerialize ? [ 0, "", "" ] : [ 1, "X<div>", "</div>" ] + }, + safeFragment = createSafeFragment( document ), + fragmentDiv = safeFragment.appendChild( document.createElement("div") ); + +wrapMap.optgroup = wrapMap.option; +wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; +wrapMap.th = wrapMap.td; + +jQuery.fn.extend({ + text: function( value ) { + return jQuery.access( this, function( value ) { + return value === undefined ? + jQuery.text( this ) : + this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) ); + }, null, value, arguments.length ); + }, + + append: function() { + return this.domManip( arguments, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + var target = manipulationTarget( this, elem ); + target.appendChild( elem ); + } + }); + }, + + prepend: function() { + return this.domManip( arguments, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + var target = manipulationTarget( this, elem ); + target.insertBefore( elem, target.firstChild ); + } + }); + }, + + before: function() { + return this.domManip( arguments, function( elem ) { + if ( this.parentNode ) { + this.parentNode.insertBefore( elem, this ); + } + }); + }, + + after: function() { + return this.domManip( arguments, function( elem ) { + if ( this.parentNode ) { + this.parentNode.insertBefore( elem, this.nextSibling ); + } + }); + }, + + // keepData is for internal use only--do not document + remove: function( selector, keepData ) { + var elem, + elems = selector ? jQuery.filter( selector, this ) : this, + i = 0; + + for ( ; (elem = elems[i]) != null; i++ ) { + + if ( !keepData && elem.nodeType === 1 ) { + jQuery.cleanData( getAll( elem ) ); + } + + if ( elem.parentNode ) { + if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) { + setGlobalEval( getAll( elem, "script" ) ); + } + elem.parentNode.removeChild( elem ); + } + } + + return this; + }, + + empty: function() { + var elem, + i = 0; + + for ( ; (elem = this[i]) != null; i++ ) { + // Remove element nodes and prevent memory leaks + if ( elem.nodeType === 1 ) { + jQuery.cleanData( getAll( elem, false ) ); + } + + // Remove any remaining nodes + while ( elem.firstChild ) { + elem.removeChild( elem.firstChild ); + } + + // If this is a select, ensure that it displays empty (#12336) + // Support: IE<9 + if ( elem.options && jQuery.nodeName( elem, "select" ) ) { + elem.options.length = 0; + } + } + + return this; + }, + + clone: function( dataAndEvents, deepDataAndEvents ) { + dataAndEvents = dataAndEvents == null ? false : dataAndEvents; + deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; + + return this.map( function () { + return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); + }); + }, + + html: function( value ) { + return jQuery.access( this, function( value ) { + var elem = this[0] || {}, + i = 0, + l = this.length; + + if ( value === undefined ) { + return elem.nodeType === 1 ? + elem.innerHTML.replace( rinlinejQuery, "" ) : + undefined; + } + + // See if we can take a shortcut and just use innerHTML + if ( typeof value === "string" && !rnoInnerhtml.test( value ) && + ( jQuery.support.htmlSerialize || !rnoshimcache.test( value ) ) && + ( jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) && + !wrapMap[ ( rtagName.exec( value ) || ["", ""] )[1].toLowerCase() ] ) { + + value = value.replace( rxhtmlTag, "<$1></$2>" ); + + try { + for (; i < l; i++ ) { + // Remove element nodes and prevent memory leaks + elem = this[i] || {}; + if ( elem.nodeType === 1 ) { + jQuery.cleanData( getAll( elem, false ) ); + elem.innerHTML = value; + } + } + + elem = 0; + + // If using innerHTML throws an exception, use the fallback method + } catch(e) {} + } + + if ( elem ) { + this.empty().append( value ); + } + }, null, value, arguments.length ); + }, + + replaceWith: function() { + var + // Snapshot the DOM in case .domManip sweeps something relevant into its fragment + args = jQuery.map( this, function( elem ) { + return [ elem.nextSibling, elem.parentNode ]; + }), + i = 0; + + // Make the changes, replacing each context element with the new content + this.domManip( arguments, function( elem ) { + var next = args[ i++ ], + parent = args[ i++ ]; + + if ( parent ) { + // Don't use the snapshot next if it has moved (#13810) + if ( next && next.parentNode !== parent ) { + next = this.nextSibling; + } + jQuery( this ).remove(); + parent.insertBefore( elem, next ); + } + // Allow new content to include elements from the context set + }, true ); + + // Force removal if there was no new content (e.g., from empty arguments) + return i ? this : this.remove(); + }, + + detach: function( selector ) { + return this.remove( selector, true ); + }, + + domManip: function( args, callback, allowIntersection ) { + + // Flatten any nested arrays + args = core_concat.apply( [], args ); + + var first, node, hasScripts, + scripts, doc, fragment, + i = 0, + l = this.length, + set = this, + iNoClone = l - 1, + value = args[0], + isFunction = jQuery.isFunction( value ); + + // We can't cloneNode fragments that contain checked, in WebKit + if ( isFunction || !( l <= 1 || typeof value !== "string" || jQuery.support.checkClone || !rchecked.test( value ) ) ) { + return this.each(function( index ) { + var self = set.eq( index ); + if ( isFunction ) { + args[0] = value.call( this, index, self.html() ); + } + self.domManip( args, callback, allowIntersection ); + }); + } + + if ( l ) { + fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, !allowIntersection && this ); + first = fragment.firstChild; + + if ( fragment.childNodes.length === 1 ) { + fragment = first; + } + + if ( first ) { + scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); + hasScripts = scripts.length; + + // Use the original fragment for the last item instead of the first because it can end up + // being emptied incorrectly in certain situations (#8070). + for ( ; i < l; i++ ) { + node = fragment; + + if ( i !== iNoClone ) { + node = jQuery.clone( node, true, true ); + + // Keep references to cloned scripts for later restoration + if ( hasScripts ) { + jQuery.merge( scripts, getAll( node, "script" ) ); + } + } + + callback.call( this[i], node, i ); + } + + if ( hasScripts ) { + doc = scripts[ scripts.length - 1 ].ownerDocument; + + // Reenable scripts + jQuery.map( scripts, restoreScript ); + + // Evaluate executable scripts on first document insertion + for ( i = 0; i < hasScripts; i++ ) { + node = scripts[ i ]; + if ( rscriptType.test( node.type || "" ) && + !jQuery._data( node, "globalEval" ) && jQuery.contains( doc, node ) ) { + + if ( node.src ) { + // Hope ajax is available... + jQuery._evalUrl( node.src ); + } else { + jQuery.globalEval( ( node.text || node.textContent || node.innerHTML || "" ).replace( rcleanScript, "" ) ); + } + } + } + } + + // Fix #11809: Avoid leaking memory + fragment = first = null; + } + } + + return this; + } +}); + +// Support: IE<8 +// Manipulating tables requires a tbody +function manipulationTarget( elem, content ) { + return jQuery.nodeName( elem, "table" ) && + jQuery.nodeName( content.nodeType === 1 ? content : content.firstChild, "tr" ) ? + + elem.getElementsByTagName("tbody")[0] || + elem.appendChild( elem.ownerDocument.createElement("tbody") ) : + elem; +} + +// Replace/restore the type attribute of script elements for safe DOM manipulation +function disableScript( elem ) { + elem.type = (jQuery.find.attr( elem, "type" ) !== null) + "/" + elem.type; + return elem; +} +function restoreScript( elem ) { + var match = rscriptTypeMasked.exec( elem.type ); + if ( match ) { + elem.type = match[1]; + } else { + elem.removeAttribute("type"); + } + return elem; +} + +// Mark scripts as having already been evaluated +function setGlobalEval( elems, refElements ) { + var elem, + i = 0; + for ( ; (elem = elems[i]) != null; i++ ) { + jQuery._data( elem, "globalEval", !refElements || jQuery._data( refElements[i], "globalEval" ) ); + } +} + +function cloneCopyEvent( src, dest ) { + + if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) { + return; + } + + var type, i, l, + oldData = jQuery._data( src ), + curData = jQuery._data( dest, oldData ), + events = oldData.events; + + if ( events ) { + delete curData.handle; + curData.events = {}; + + for ( type in events ) { + for ( i = 0, l = events[ type ].length; i < l; i++ ) { + jQuery.event.add( dest, type, events[ type ][ i ] ); + } + } + } + + // make the cloned public data object a copy from the original + if ( curData.data ) { + curData.data = jQuery.extend( {}, curData.data ); + } +} + +function fixCloneNodeIssues( src, dest ) { + var nodeName, e, data; + + // We do not need to do anything for non-Elements + if ( dest.nodeType !== 1 ) { + return; + } + + nodeName = dest.nodeName.toLowerCase(); + + // IE6-8 copies events bound via attachEvent when using cloneNode. + if ( !jQuery.support.noCloneEvent && dest[ jQuery.expando ] ) { + data = jQuery._data( dest ); + + for ( e in data.events ) { + jQuery.removeEvent( dest, e, data.handle ); + } + + // Event data gets referenced instead of copied if the expando gets copied too + dest.removeAttribute( jQuery.expando ); + } + + // IE blanks contents when cloning scripts, and tries to evaluate newly-set text + if ( nodeName === "script" && dest.text !== src.text ) { + disableScript( dest ).text = src.text; + restoreScript( dest ); + + // IE6-10 improperly clones children of object elements using classid. + // IE10 throws NoModificationAllowedError if parent is null, #12132. + } else if ( nodeName === "object" ) { + if ( dest.parentNode ) { + dest.outerHTML = src.outerHTML; + } + + // This path appears unavoidable for IE9. When cloning an object + // element in IE9, the outerHTML strategy above is not sufficient. + // If the src has innerHTML and the destination does not, + // copy the src.innerHTML into the dest.innerHTML. #10324 + if ( jQuery.support.html5Clone && ( src.innerHTML && !jQuery.trim(dest.innerHTML) ) ) { + dest.innerHTML = src.innerHTML; + } + + } else if ( nodeName === "input" && manipulation_rcheckableType.test( src.type ) ) { + // IE6-8 fails to persist the checked state of a cloned checkbox + // or radio button. Worse, IE6-7 fail to give the cloned element + // a checked appearance if the defaultChecked value isn't also set + + dest.defaultChecked = dest.checked = src.checked; + + // IE6-7 get confused and end up setting the value of a cloned + // checkbox/radio button to an empty string instead of "on" + if ( dest.value !== src.value ) { + dest.value = src.value; + } + + // IE6-8 fails to return the selected option to the default selected + // state when cloning options + } else if ( nodeName === "option" ) { + dest.defaultSelected = dest.selected = src.defaultSelected; + + // IE6-8 fails to set the defaultValue to the correct value when + // cloning other types of input fields + } else if ( nodeName === "input" || nodeName === "textarea" ) { + dest.defaultValue = src.defaultValue; + } +} + +jQuery.each({ + appendTo: "append", + prependTo: "prepend", + insertBefore: "before", + insertAfter: "after", + replaceAll: "replaceWith" +}, function( name, original ) { + jQuery.fn[ name ] = function( selector ) { + var elems, + i = 0, + ret = [], + insert = jQuery( selector ), + last = insert.length - 1; + + for ( ; i <= last; i++ ) { + elems = i === last ? this : this.clone(true); + jQuery( insert[i] )[ original ]( elems ); + + // Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get() + core_push.apply( ret, elems.get() ); + } + + return this.pushStack( ret ); + }; +}); + +function getAll( context, tag ) { + var elems, elem, + i = 0, + found = typeof context.getElementsByTagName !== core_strundefined ? context.getElementsByTagName( tag || "*" ) : + typeof context.querySelectorAll !== core_strundefined ? context.querySelectorAll( tag || "*" ) : + undefined; + + if ( !found ) { + for ( found = [], elems = context.childNodes || context; (elem = elems[i]) != null; i++ ) { + if ( !tag || jQuery.nodeName( elem, tag ) ) { + found.push( elem ); + } else { + jQuery.merge( found, getAll( elem, tag ) ); + } + } + } + + return tag === undefined || tag && jQuery.nodeName( context, tag ) ? + jQuery.merge( [ context ], found ) : + found; +} + +// Used in buildFragment, fixes the defaultChecked property +function fixDefaultChecked( elem ) { + if ( manipulation_rcheckableType.test( elem.type ) ) { + elem.defaultChecked = elem.checked; + } +} + +jQuery.extend({ + clone: function( elem, dataAndEvents, deepDataAndEvents ) { + var destElements, node, clone, i, srcElements, + inPage = jQuery.contains( elem.ownerDocument, elem ); + + if ( jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) { + clone = elem.cloneNode( true ); + + // IE<=8 does not properly clone detached, unknown element nodes + } else { + fragmentDiv.innerHTML = elem.outerHTML; + fragmentDiv.removeChild( clone = fragmentDiv.firstChild ); + } + + if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) && + (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) { + + // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2 + destElements = getAll( clone ); + srcElements = getAll( elem ); + + // Fix all IE cloning issues + for ( i = 0; (node = srcElements[i]) != null; ++i ) { + // Ensure that the destination node is not null; Fixes #9587 + if ( destElements[i] ) { + fixCloneNodeIssues( node, destElements[i] ); + } + } + } + + // Copy the events from the original to the clone + if ( dataAndEvents ) { + if ( deepDataAndEvents ) { + srcElements = srcElements || getAll( elem ); + destElements = destElements || getAll( clone ); + + for ( i = 0; (node = srcElements[i]) != null; i++ ) { + cloneCopyEvent( node, destElements[i] ); + } + } else { + cloneCopyEvent( elem, clone ); + } + } + + // Preserve script evaluation history + destElements = getAll( clone, "script" ); + if ( destElements.length > 0 ) { + setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); + } + + destElements = srcElements = node = null; + + // Return the cloned set + return clone; + }, + + buildFragment: function( elems, context, scripts, selection ) { + var j, elem, contains, + tmp, tag, tbody, wrap, + l = elems.length, + + // Ensure a safe fragment + safe = createSafeFragment( context ), + + nodes = [], + i = 0; + + for ( ; i < l; i++ ) { + elem = elems[ i ]; + + if ( elem || elem === 0 ) { + + // Add nodes directly + if ( jQuery.type( elem ) === "object" ) { + jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); + + // Convert non-html into a text node + } else if ( !rhtml.test( elem ) ) { + nodes.push( context.createTextNode( elem ) ); + + // Convert html into DOM nodes + } else { + tmp = tmp || safe.appendChild( context.createElement("div") ); + + // Deserialize a standard representation + tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase(); + wrap = wrapMap[ tag ] || wrapMap._default; + + tmp.innerHTML = wrap[1] + elem.replace( rxhtmlTag, "<$1></$2>" ) + wrap[2]; + + // Descend through wrappers to the right content + j = wrap[0]; + while ( j-- ) { + tmp = tmp.lastChild; + } + + // Manually add leading whitespace removed by IE + if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) { + nodes.push( context.createTextNode( rleadingWhitespace.exec( elem )[0] ) ); + } + + // Remove IE's autoinserted <tbody> from table fragments + if ( !jQuery.support.tbody ) { + + // String was a <table>, *may* have spurious <tbody> + elem = tag === "table" && !rtbody.test( elem ) ? + tmp.firstChild : + + // String was a bare <thead> or <tfoot> + wrap[1] === "<table>" && !rtbody.test( elem ) ? + tmp : + 0; + + j = elem && elem.childNodes.length; + while ( j-- ) { + if ( jQuery.nodeName( (tbody = elem.childNodes[j]), "tbody" ) && !tbody.childNodes.length ) { + elem.removeChild( tbody ); + } + } + } + + jQuery.merge( nodes, tmp.childNodes ); + + // Fix #12392 for WebKit and IE > 9 + tmp.textContent = ""; + + // Fix #12392 for oldIE + while ( tmp.firstChild ) { + tmp.removeChild( tmp.firstChild ); + } + + // Remember the top-level container for proper cleanup + tmp = safe.lastChild; + } + } + } + + // Fix #11356: Clear elements from fragment + if ( tmp ) { + safe.removeChild( tmp ); + } + + // Reset defaultChecked for any radios and checkboxes + // about to be appended to the DOM in IE 6/7 (#8060) + if ( !jQuery.support.appendChecked ) { + jQuery.grep( getAll( nodes, "input" ), fixDefaultChecked ); + } + + i = 0; + while ( (elem = nodes[ i++ ]) ) { + + // #4087 - If origin and destination elements are the same, and this is + // that element, do not do anything + if ( selection && jQuery.inArray( elem, selection ) !== -1 ) { + continue; + } + + contains = jQuery.contains( elem.ownerDocument, elem ); + + // Append to fragment + tmp = getAll( safe.appendChild( elem ), "script" ); + + // Preserve script evaluation history + if ( contains ) { + setGlobalEval( tmp ); + } + + // Capture executables + if ( scripts ) { + j = 0; + while ( (elem = tmp[ j++ ]) ) { + if ( rscriptType.test( elem.type || "" ) ) { + scripts.push( elem ); + } + } + } + } + + tmp = null; + + return safe; + }, + + cleanData: function( elems, /* internal */ acceptData ) { + var elem, type, id, data, + i = 0, + internalKey = jQuery.expando, + cache = jQuery.cache, + deleteExpando = jQuery.support.deleteExpando, + special = jQuery.event.special; + + for ( ; (elem = elems[i]) != null; i++ ) { + + if ( acceptData || jQuery.acceptData( elem ) ) { + + id = elem[ internalKey ]; + data = id && cache[ id ]; + + if ( data ) { + if ( data.events ) { + for ( type in data.events ) { + if ( special[ type ] ) { + jQuery.event.remove( elem, type ); + + // This is a shortcut to avoid jQuery.event.remove's overhead + } else { + jQuery.removeEvent( elem, type, data.handle ); + } + } + } + + // Remove cache only if it was not already removed by jQuery.event.remove + if ( cache[ id ] ) { + + delete cache[ id ]; + + // IE does not allow us to delete expando properties from nodes, + // nor does it have a removeAttribute function on Document nodes; + // we must handle all of these cases + if ( deleteExpando ) { + delete elem[ internalKey ]; + + } else if ( typeof elem.removeAttribute !== core_strundefined ) { + elem.removeAttribute( internalKey ); + + } else { + elem[ internalKey ] = null; + } + + core_deletedIds.push( id ); + } + } + } + } + }, + + _evalUrl: function( url ) { + return jQuery.ajax({ + url: url, + type: "GET", + dataType: "script", + async: false, + global: false, + "throws": true + }); + } +}); +jQuery.fn.extend({ + wrapAll: function( html ) { + if ( jQuery.isFunction( html ) ) { + return this.each(function(i) { + jQuery(this).wrapAll( html.call(this, i) ); + }); + } + + if ( this[0] ) { + // The elements to wrap the target around + var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true); + + if ( this[0].parentNode ) { + wrap.insertBefore( this[0] ); + } + + wrap.map(function() { + var elem = this; + + while ( elem.firstChild && elem.firstChild.nodeType === 1 ) { + elem = elem.firstChild; + } + + return elem; + }).append( this ); + } + + return this; + }, + + wrapInner: function( html ) { + if ( jQuery.isFunction( html ) ) { + return this.each(function(i) { + jQuery(this).wrapInner( html.call(this, i) ); + }); + } + + return this.each(function() { + var self = jQuery( this ), + contents = self.contents(); + + if ( contents.length ) { + contents.wrapAll( html ); + + } else { + self.append( html ); + } + }); + }, + + wrap: function( html ) { + var isFunction = jQuery.isFunction( html ); + + return this.each(function(i) { + jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html ); + }); + }, + + unwrap: function() { + return this.parent().each(function() { + if ( !jQuery.nodeName( this, "body" ) ) { + jQuery( this ).replaceWith( this.childNodes ); + } + }).end(); + } +}); +var iframe, getStyles, curCSS, + ralpha = /alpha\([^)]*\)/i, + ropacity = /opacity\s*=\s*([^)]*)/, + rposition = /^(top|right|bottom|left)$/, + // swappable if display is none or starts with table except "table", "table-cell", or "table-caption" + // see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display + rdisplayswap = /^(none|table(?!-c[ea]).+)/, + rmargin = /^margin/, + rnumsplit = new RegExp( "^(" + core_pnum + ")(.*)$", "i" ), + rnumnonpx = new RegExp( "^(" + core_pnum + ")(?!px)[a-z%]+$", "i" ), + rrelNum = new RegExp( "^([+-])=(" + core_pnum + ")", "i" ), + elemdisplay = { BODY: "block" }, + + cssShow = { position: "absolute", visibility: "hidden", display: "block" }, + cssNormalTransform = { + letterSpacing: 0, + fontWeight: 400 + }, + + cssExpand = [ "Top", "Right", "Bottom", "Left" ], + cssPrefixes = [ "Webkit", "O", "Moz", "ms" ]; + +// return a css property mapped to a potentially vendor prefixed property +function vendorPropName( style, name ) { + + // shortcut for names that are not vendor prefixed + if ( name in style ) { + return name; + } + + // check for vendor prefixed names + var capName = name.charAt(0).toUpperCase() + name.slice(1), + origName = name, + i = cssPrefixes.length; + + while ( i-- ) { + name = cssPrefixes[ i ] + capName; + if ( name in style ) { + return name; + } + } + + return origName; +} + +function isHidden( elem, el ) { + // isHidden might be called from jQuery#filter function; + // in that case, element will be second argument + elem = el || elem; + return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem ); +} + +function showHide( elements, show ) { + var display, elem, hidden, + values = [], + index = 0, + length = elements.length; + + for ( ; index < length; index++ ) { + elem = elements[ index ]; + if ( !elem.style ) { + continue; + } + + values[ index ] = jQuery._data( elem, "olddisplay" ); + display = elem.style.display; + if ( show ) { + // Reset the inline display of this element to learn if it is + // being hidden by cascaded rules or not + if ( !values[ index ] && display === "none" ) { + elem.style.display = ""; + } + + // Set elements which have been overridden with display: none + // in a stylesheet to whatever the default browser style is + // for such an element + if ( elem.style.display === "" && isHidden( elem ) ) { + values[ index ] = jQuery._data( elem, "olddisplay", css_defaultDisplay(elem.nodeName) ); + } + } else { + + if ( !values[ index ] ) { + hidden = isHidden( elem ); + + if ( display && display !== "none" || !hidden ) { + jQuery._data( elem, "olddisplay", hidden ? display : jQuery.css( elem, "display" ) ); + } + } + } + } + + // Set the display of most of the elements in a second loop + // to avoid the constant reflow + for ( index = 0; index < length; index++ ) { + elem = elements[ index ]; + if ( !elem.style ) { + continue; + } + if ( !show || elem.style.display === "none" || elem.style.display === "" ) { + elem.style.display = show ? values[ index ] || "" : "none"; + } + } + + return elements; +} + +jQuery.fn.extend({ + css: function( name, value ) { + return jQuery.access( this, function( elem, name, value ) { + var len, styles, + map = {}, + i = 0; + + if ( jQuery.isArray( name ) ) { + styles = getStyles( elem ); + len = name.length; + + for ( ; i < len; i++ ) { + map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles ); + } + + return map; + } + + return value !== undefined ? + jQuery.style( elem, name, value ) : + jQuery.css( elem, name ); + }, name, value, arguments.length > 1 ); + }, + show: function() { + return showHide( this, true ); + }, + hide: function() { + return showHide( this ); + }, + toggle: function( state ) { + if ( typeof state === "boolean" ) { + return state ? this.show() : this.hide(); + } + + return this.each(function() { + if ( isHidden( this ) ) { + jQuery( this ).show(); + } else { + jQuery( this ).hide(); + } + }); + } +}); + +jQuery.extend({ + // Add in style property hooks for overriding the default + // behavior of getting and setting a style property + cssHooks: { + opacity: { + get: function( elem, computed ) { + if ( computed ) { + // We should always get a number back from opacity + var ret = curCSS( elem, "opacity" ); + return ret === "" ? "1" : ret; + } + } + } + }, + + // Don't automatically add "px" to these possibly-unitless properties + cssNumber: { + "columnCount": true, + "fillOpacity": true, + "fontWeight": true, + "lineHeight": true, + "opacity": true, + "order": true, + "orphans": true, + "widows": true, + "zIndex": true, + "zoom": true + }, + + // Add in properties whose names you wish to fix before + // setting or getting the value + cssProps: { + // normalize float css property + "float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat" + }, + + // Get and set the style property on a DOM Node + style: function( elem, name, value, extra ) { + // Don't set styles on text and comment nodes + if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { + return; + } + + // Make sure that we're working with the right name + var ret, type, hooks, + origName = jQuery.camelCase( name ), + style = elem.style; + + name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) ); + + // gets hook for the prefixed version + // followed by the unprefixed version + hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; + + // Check if we're setting a value + if ( value !== undefined ) { + type = typeof value; + + // convert relative number strings (+= or -=) to relative numbers. #7345 + if ( type === "string" && (ret = rrelNum.exec( value )) ) { + value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) ); + // Fixes bug #9237 + type = "number"; + } + + // Make sure that NaN and null values aren't set. See: #7116 + if ( value == null || type === "number" && isNaN( value ) ) { + return; + } + + // If a number was passed in, add 'px' to the (except for certain CSS properties) + if ( type === "number" && !jQuery.cssNumber[ origName ] ) { + value += "px"; + } + + // Fixes #8908, it can be done more correctly by specifing setters in cssHooks, + // but it would mean to define eight (for every problematic property) identical functions + if ( !jQuery.support.clearCloneStyle && value === "" && name.indexOf("background") === 0 ) { + style[ name ] = "inherit"; + } + + // If a hook was provided, use that value, otherwise just set the specified value + if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) { + + // Wrapped to prevent IE from throwing errors when 'invalid' values are provided + // Fixes bug #5509 + try { + style[ name ] = value; + } catch(e) {} + } + + } else { + // If a hook was provided get the non-computed value from there + if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) { + return ret; + } + + // Otherwise just get the value from the style object + return style[ name ]; + } + }, + + css: function( elem, name, extra, styles ) { + var num, val, hooks, + origName = jQuery.camelCase( name ); + + // Make sure that we're working with the right name + name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) ); + + // gets hook for the prefixed version + // followed by the unprefixed version + hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; + + // If a hook was provided get the computed value from there + if ( hooks && "get" in hooks ) { + val = hooks.get( elem, true, extra ); + } + + // Otherwise, if a way to get the computed value exists, use that + if ( val === undefined ) { + val = curCSS( elem, name, styles ); + } + + //convert "normal" to computed value + if ( val === "normal" && name in cssNormalTransform ) { + val = cssNormalTransform[ name ]; + } + + // Return, converting to number if forced or a qualifier was provided and val looks numeric + if ( extra === "" || extra ) { + num = parseFloat( val ); + return extra === true || jQuery.isNumeric( num ) ? num || 0 : val; + } + return val; + } +}); + +// NOTE: we've included the "window" in window.getComputedStyle +// because jsdom on node.js will break without it. +if ( window.getComputedStyle ) { + getStyles = function( elem ) { + return window.getComputedStyle( elem, null ); + }; + + curCSS = function( elem, name, _computed ) { + var width, minWidth, maxWidth, + computed = _computed || getStyles( elem ), + + // getPropertyValue is only needed for .css('filter') in IE9, see #12537 + ret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined, + style = elem.style; + + if ( computed ) { + + if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) { + ret = jQuery.style( elem, name ); + } + + // A tribute to the "awesome hack by Dean Edwards" + // Chrome < 17 and Safari 5.0 uses "computed value" instead of "used value" for margin-right + // Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels + // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values + if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) { + + // Remember the original values + width = style.width; + minWidth = style.minWidth; + maxWidth = style.maxWidth; + + // Put in the new values to get a computed value out + style.minWidth = style.maxWidth = style.width = ret; + ret = computed.width; + + // Revert the changed values + style.width = width; + style.minWidth = minWidth; + style.maxWidth = maxWidth; + } + } + + return ret; + }; +} else if ( document.documentElement.currentStyle ) { + getStyles = function( elem ) { + return elem.currentStyle; + }; + + curCSS = function( elem, name, _computed ) { + var left, rs, rsLeft, + computed = _computed || getStyles( elem ), + ret = computed ? computed[ name ] : undefined, + style = elem.style; + + // Avoid setting ret to empty string here + // so we don't default to auto + if ( ret == null && style && style[ name ] ) { + ret = style[ name ]; + } + + // From the awesome hack by Dean Edwards + // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 + + // If we're not dealing with a regular pixel number + // but a number that has a weird ending, we need to convert it to pixels + // but not position css attributes, as those are proportional to the parent element instead + // and we can't measure the parent instead because it might trigger a "stacking dolls" problem + if ( rnumnonpx.test( ret ) && !rposition.test( name ) ) { + + // Remember the original values + left = style.left; + rs = elem.runtimeStyle; + rsLeft = rs && rs.left; + + // Put in the new values to get a computed value out + if ( rsLeft ) { + rs.left = elem.currentStyle.left; + } + style.left = name === "fontSize" ? "1em" : ret; + ret = style.pixelLeft + "px"; + + // Revert the changed values + style.left = left; + if ( rsLeft ) { + rs.left = rsLeft; + } + } + + return ret === "" ? "auto" : ret; + }; +} + +function setPositiveNumber( elem, value, subtract ) { + var matches = rnumsplit.exec( value ); + return matches ? + // Guard against undefined "subtract", e.g., when used as in cssHooks + Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) : + value; +} + +function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) { + var i = extra === ( isBorderBox ? "border" : "content" ) ? + // If we already have the right measurement, avoid augmentation + 4 : + // Otherwise initialize for horizontal or vertical properties + name === "width" ? 1 : 0, + + val = 0; + + for ( ; i < 4; i += 2 ) { + // both box models exclude margin, so add it if we want it + if ( extra === "margin" ) { + val += jQuery.css( elem, extra + cssExpand[ i ], true, styles ); + } + + if ( isBorderBox ) { + // border-box includes padding, so remove it if we want content + if ( extra === "content" ) { + val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); + } + + // at this point, extra isn't border nor margin, so remove border + if ( extra !== "margin" ) { + val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); + } + } else { + // at this point, extra isn't content, so add padding + val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); + + // at this point, extra isn't content nor padding, so add border + if ( extra !== "padding" ) { + val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); + } + } + } + + return val; +} + +function getWidthOrHeight( elem, name, extra ) { + + // Start with offset property, which is equivalent to the border-box value + var valueIsBorderBox = true, + val = name === "width" ? elem.offsetWidth : elem.offsetHeight, + styles = getStyles( elem ), + isBorderBox = jQuery.support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box"; + + // some non-html elements return undefined for offsetWidth, so check for null/undefined + // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285 + // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668 + if ( val <= 0 || val == null ) { + // Fall back to computed then uncomputed css if necessary + val = curCSS( elem, name, styles ); + if ( val < 0 || val == null ) { + val = elem.style[ name ]; + } + + // Computed unit is not pixels. Stop here and return. + if ( rnumnonpx.test(val) ) { + return val; + } + + // we need the check for style in case a browser which returns unreliable values + // for getComputedStyle silently falls back to the reliable elem.style + valueIsBorderBox = isBorderBox && ( jQuery.support.boxSizingReliable || val === elem.style[ name ] ); + + // Normalize "", auto, and prepare for extra + val = parseFloat( val ) || 0; + } + + // use the active box-sizing model to add/subtract irrelevant styles + return ( val + + augmentWidthOrHeight( + elem, + name, + extra || ( isBorderBox ? "border" : "content" ), + valueIsBorderBox, + styles + ) + ) + "px"; +} + +// Try to determine the default display value of an element +function css_defaultDisplay( nodeName ) { + var doc = document, + display = elemdisplay[ nodeName ]; + + if ( !display ) { + display = actualDisplay( nodeName, doc ); + + // If the simple way fails, read from inside an iframe + if ( display === "none" || !display ) { + // Use the already-created iframe if possible + iframe = ( iframe || + jQuery("<iframe frameborder='0' width='0' height='0'/>") + .css( "cssText", "display:block !important" ) + ).appendTo( doc.documentElement ); + + // Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse + doc = ( iframe[0].contentWindow || iframe[0].contentDocument ).document; + doc.write("<!doctype html><html><body>"); + doc.close(); + + display = actualDisplay( nodeName, doc ); + iframe.detach(); + } + + // Store the correct default display + elemdisplay[ nodeName ] = display; + } + + return display; +} + +// Called ONLY from within css_defaultDisplay +function actualDisplay( name, doc ) { + var elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ), + display = jQuery.css( elem[0], "display" ); + elem.remove(); + return display; +} + +jQuery.each([ "height", "width" ], function( i, name ) { + jQuery.cssHooks[ name ] = { + get: function( elem, computed, extra ) { + if ( computed ) { + // certain elements can have dimension info if we invisibly show them + // however, it must have a current display style that would benefit from this + return elem.offsetWidth === 0 && rdisplayswap.test( jQuery.css( elem, "display" ) ) ? + jQuery.swap( elem, cssShow, function() { + return getWidthOrHeight( elem, name, extra ); + }) : + getWidthOrHeight( elem, name, extra ); + } + }, + + set: function( elem, value, extra ) { + var styles = extra && getStyles( elem ); + return setPositiveNumber( elem, value, extra ? + augmentWidthOrHeight( + elem, + name, + extra, + jQuery.support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box", + styles + ) : 0 + ); + } + }; +}); + +if ( !jQuery.support.opacity ) { + jQuery.cssHooks.opacity = { + get: function( elem, computed ) { + // IE uses filters for opacity + return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ? + ( 0.01 * parseFloat( RegExp.$1 ) ) + "" : + computed ? "1" : ""; + }, + + set: function( elem, value ) { + var style = elem.style, + currentStyle = elem.currentStyle, + opacity = jQuery.isNumeric( value ) ? "alpha(opacity=" + value * 100 + ")" : "", + filter = currentStyle && currentStyle.filter || style.filter || ""; + + // IE has trouble with opacity if it does not have layout + // Force it by setting the zoom level + style.zoom = 1; + + // if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652 + // if value === "", then remove inline opacity #12685 + if ( ( value >= 1 || value === "" ) && + jQuery.trim( filter.replace( ralpha, "" ) ) === "" && + style.removeAttribute ) { + + // Setting style.filter to null, "" & " " still leave "filter:" in the cssText + // if "filter:" is present at all, clearType is disabled, we want to avoid this + // style.removeAttribute is IE Only, but so apparently is this code path... + style.removeAttribute( "filter" ); + + // if there is no filter style applied in a css rule or unset inline opacity, we are done + if ( value === "" || currentStyle && !currentStyle.filter ) { + return; + } + } + + // otherwise, set new filter values + style.filter = ralpha.test( filter ) ? + filter.replace( ralpha, opacity ) : + filter + " " + opacity; + } + }; +} + +// These hooks cannot be added until DOM ready because the support test +// for it is not run until after DOM ready +jQuery(function() { + if ( !jQuery.support.reliableMarginRight ) { + jQuery.cssHooks.marginRight = { + get: function( elem, computed ) { + if ( computed ) { + // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right + // Work around by temporarily setting element display to inline-block + return jQuery.swap( elem, { "display": "inline-block" }, + curCSS, [ elem, "marginRight" ] ); + } + } + }; + } + + // Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084 + // getComputedStyle returns percent when specified for top/left/bottom/right + // rather than make the css module depend on the offset module, we just check for it here + if ( !jQuery.support.pixelPosition && jQuery.fn.position ) { + jQuery.each( [ "top", "left" ], function( i, prop ) { + jQuery.cssHooks[ prop ] = { + get: function( elem, computed ) { + if ( computed ) { + computed = curCSS( elem, prop ); + // if curCSS returns percentage, fallback to offset + return rnumnonpx.test( computed ) ? + jQuery( elem ).position()[ prop ] + "px" : + computed; + } + } + }; + }); + } + +}); + +if ( jQuery.expr && jQuery.expr.filters ) { + jQuery.expr.filters.hidden = function( elem ) { + // Support: Opera <= 12.12 + // Opera reports offsetWidths and offsetHeights less than zero on some elements + return elem.offsetWidth <= 0 && elem.offsetHeight <= 0 || + (!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || jQuery.css( elem, "display" )) === "none"); + }; + + jQuery.expr.filters.visible = function( elem ) { + return !jQuery.expr.filters.hidden( elem ); + }; +} + +// These hooks are used by animate to expand properties +jQuery.each({ + margin: "", + padding: "", + border: "Width" +}, function( prefix, suffix ) { + jQuery.cssHooks[ prefix + suffix ] = { + expand: function( value ) { + var i = 0, + expanded = {}, + + // assumes a single number if not a string + parts = typeof value === "string" ? value.split(" ") : [ value ]; + + for ( ; i < 4; i++ ) { + expanded[ prefix + cssExpand[ i ] + suffix ] = + parts[ i ] || parts[ i - 2 ] || parts[ 0 ]; + } + + return expanded; + } + }; + + if ( !rmargin.test( prefix ) ) { + jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber; + } +}); +var r20 = /%20/g, + rbracket = /\[\]$/, + rCRLF = /\r?\n/g, + rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i, + rsubmittable = /^(?:input|select|textarea|keygen)/i; + +jQuery.fn.extend({ + serialize: function() { + return jQuery.param( this.serializeArray() ); + }, + serializeArray: function() { + return this.map(function(){ + // Can add propHook for "elements" to filter or add form elements + var elements = jQuery.prop( this, "elements" ); + return elements ? jQuery.makeArray( elements ) : this; + }) + .filter(function(){ + var type = this.type; + // Use .is(":disabled") so that fieldset[disabled] works + return this.name && !jQuery( this ).is( ":disabled" ) && + rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) && + ( this.checked || !manipulation_rcheckableType.test( type ) ); + }) + .map(function( i, elem ){ + var val = jQuery( this ).val(); + + return val == null ? + null : + jQuery.isArray( val ) ? + jQuery.map( val, function( val ){ + return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; + }) : + { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; + }).get(); + } +}); + +//Serialize an array of form elements or a set of +//key/values into a query string +jQuery.param = function( a, traditional ) { + var prefix, + s = [], + add = function( key, value ) { + // If value is a function, invoke it and return its value + value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value ); + s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value ); + }; + + // Set traditional to true for jQuery <= 1.3.2 behavior. + if ( traditional === undefined ) { + traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional; + } + + // If an array was passed in, assume that it is an array of form elements. + if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) { + // Serialize the form elements + jQuery.each( a, function() { + add( this.name, this.value ); + }); + + } else { + // If traditional, encode the "old" way (the way 1.3.2 or older + // did it), otherwise encode params recursively. + for ( prefix in a ) { + buildParams( prefix, a[ prefix ], traditional, add ); + } + } + + // Return the resulting serialization + return s.join( "&" ).replace( r20, "+" ); +}; + +function buildParams( prefix, obj, traditional, add ) { + var name; + + if ( jQuery.isArray( obj ) ) { + // Serialize array item. + jQuery.each( obj, function( i, v ) { + if ( traditional || rbracket.test( prefix ) ) { + // Treat each array item as a scalar. + add( prefix, v ); + + } else { + // Item is non-scalar (array or object), encode its numeric index. + buildParams( prefix + "[" + ( typeof v === "object" ? i : "" ) + "]", v, traditional, add ); + } + }); + + } else if ( !traditional && jQuery.type( obj ) === "object" ) { + // Serialize object item. + for ( name in obj ) { + buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add ); + } + + } else { + // Serialize scalar item. + add( prefix, obj ); + } +} +jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " + + "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + + "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) { + + // Handle event binding + jQuery.fn[ name ] = function( data, fn ) { + return arguments.length > 0 ? + this.on( name, null, data, fn ) : + this.trigger( name ); + }; +}); + +jQuery.fn.extend({ + hover: function( fnOver, fnOut ) { + return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); + }, + + bind: function( types, data, fn ) { + return this.on( types, null, data, fn ); + }, + unbind: function( types, fn ) { + return this.off( types, null, fn ); + }, + + delegate: function( selector, types, data, fn ) { + return this.on( types, selector, data, fn ); + }, + undelegate: function( selector, types, fn ) { + // ( namespace ) or ( selector, types [, fn] ) + return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn ); + } +}); +var + // Document location + ajaxLocParts, + ajaxLocation, + ajax_nonce = jQuery.now(), + + ajax_rquery = /\?/, + rhash = /#.*$/, + rts = /([?&])_=[^&]*/, + rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL + // #7653, #8125, #8152: local protocol detection + rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, + rnoContent = /^(?:GET|HEAD)$/, + rprotocol = /^\/\//, + rurl = /^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/, + + // Keep a copy of the old load method + _load = jQuery.fn.load, + + /* Prefilters + * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) + * 2) These are called: + * - BEFORE asking for a transport + * - AFTER param serialization (s.data is a string if s.processData is true) + * 3) key is the dataType + * 4) the catchall symbol "*" can be used + * 5) execution will start with transport dataType and THEN continue down to "*" if needed + */ + prefilters = {}, + + /* Transports bindings + * 1) key is the dataType + * 2) the catchall symbol "*" can be used + * 3) selection will start with transport dataType and THEN go to "*" if needed + */ + transports = {}, + + // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression + allTypes = "*/".concat("*"); + +// #8138, IE may throw an exception when accessing +// a field from window.location if document.domain has been set +try { + ajaxLocation = location.href; +} catch( e ) { + // Use the href attribute of an A element + // since IE will modify it given document.location + ajaxLocation = document.createElement( "a" ); + ajaxLocation.href = ""; + ajaxLocation = ajaxLocation.href; +} + +// Segment location into parts +ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || []; + +// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport +function addToPrefiltersOrTransports( structure ) { + + // dataTypeExpression is optional and defaults to "*" + return function( dataTypeExpression, func ) { + + if ( typeof dataTypeExpression !== "string" ) { + func = dataTypeExpression; + dataTypeExpression = "*"; + } + + var dataType, + i = 0, + dataTypes = dataTypeExpression.toLowerCase().match( core_rnotwhite ) || []; + + if ( jQuery.isFunction( func ) ) { + // For each dataType in the dataTypeExpression + while ( (dataType = dataTypes[i++]) ) { + // Prepend if requested + if ( dataType[0] === "+" ) { + dataType = dataType.slice( 1 ) || "*"; + (structure[ dataType ] = structure[ dataType ] || []).unshift( func ); + + // Otherwise append + } else { + (structure[ dataType ] = structure[ dataType ] || []).push( func ); + } + } + } + }; +} + +// Base inspection function for prefilters and transports +function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) { + + var inspected = {}, + seekingTransport = ( structure === transports ); + + function inspect( dataType ) { + var selected; + inspected[ dataType ] = true; + jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) { + var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR ); + if( typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) { + options.dataTypes.unshift( dataTypeOrTransport ); + inspect( dataTypeOrTransport ); + return false; + } else if ( seekingTransport ) { + return !( selected = dataTypeOrTransport ); + } + }); + return selected; + } + + return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" ); +} + +// A special extend for ajax options +// that takes "flat" options (not to be deep extended) +// Fixes #9887 +function ajaxExtend( target, src ) { + var deep, key, + flatOptions = jQuery.ajaxSettings.flatOptions || {}; + + for ( key in src ) { + if ( src[ key ] !== undefined ) { + ( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ]; + } + } + if ( deep ) { + jQuery.extend( true, target, deep ); + } + + return target; +} + +jQuery.fn.load = function( url, params, callback ) { + if ( typeof url !== "string" && _load ) { + return _load.apply( this, arguments ); + } + + var selector, response, type, + self = this, + off = url.indexOf(" "); + + if ( off >= 0 ) { + selector = url.slice( off, url.length ); + url = url.slice( 0, off ); + } + + // If it's a function + if ( jQuery.isFunction( params ) ) { + + // We assume that it's the callback + callback = params; + params = undefined; + + // Otherwise, build a param string + } else if ( params && typeof params === "object" ) { + type = "POST"; + } + + // If we have elements to modify, make the request + if ( self.length > 0 ) { + jQuery.ajax({ + url: url, + + // if "type" variable is undefined, then "GET" method will be used + type: type, + dataType: "html", + data: params + }).done(function( responseText ) { + + // Save response for use in complete callback + response = arguments; + + self.html( selector ? + + // If a selector was specified, locate the right elements in a dummy div + // Exclude scripts to avoid IE 'Permission Denied' errors + jQuery("<div>").append( jQuery.parseHTML( responseText ) ).find( selector ) : + + // Otherwise use the full result + responseText ); + + }).complete( callback && function( jqXHR, status ) { + self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] ); + }); + } + + return this; +}; + +// Attach a bunch of functions for handling common AJAX events +jQuery.each( [ "ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend" ], function( i, type ){ + jQuery.fn[ type ] = function( fn ){ + return this.on( type, fn ); + }; +}); + +jQuery.extend({ + + // Counter for holding the number of active queries + active: 0, + + // Last-Modified header cache for next request + lastModified: {}, + etag: {}, + + ajaxSettings: { + url: ajaxLocation, + type: "GET", + isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ), + global: true, + processData: true, + async: true, + contentType: "application/x-www-form-urlencoded; charset=UTF-8", + /* + timeout: 0, + data: null, + dataType: null, + username: null, + password: null, + cache: null, + throws: false, + traditional: false, + headers: {}, + */ + + accepts: { + "*": allTypes, + text: "text/plain", + html: "text/html", + xml: "application/xml, text/xml", + json: "application/json, text/javascript" + }, + + contents: { + xml: /xml/, + html: /html/, + json: /json/ + }, + + responseFields: { + xml: "responseXML", + text: "responseText", + json: "responseJSON" + }, + + // Data converters + // Keys separate source (or catchall "*") and destination types with a single space + converters: { + + // Convert anything to text + "* text": String, + + // Text to html (true = no transformation) + "text html": true, + + // Evaluate text as a json expression + "text json": jQuery.parseJSON, + + // Parse text as xml + "text xml": jQuery.parseXML + }, + + // For options that shouldn't be deep extended: + // you can add your own custom options here if + // and when you create one that shouldn't be + // deep extended (see ajaxExtend) + flatOptions: { + url: true, + context: true + } + }, + + // Creates a full fledged settings object into target + // with both ajaxSettings and settings fields. + // If target is omitted, writes into ajaxSettings. + ajaxSetup: function( target, settings ) { + return settings ? + + // Building a settings object + ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) : + + // Extending ajaxSettings + ajaxExtend( jQuery.ajaxSettings, target ); + }, + + ajaxPrefilter: addToPrefiltersOrTransports( prefilters ), + ajaxTransport: addToPrefiltersOrTransports( transports ), + + // Main method + ajax: function( url, options ) { + + // If url is an object, simulate pre-1.5 signature + if ( typeof url === "object" ) { + options = url; + url = undefined; + } + + // Force options to be an object + options = options || {}; + + var // Cross-domain detection vars + parts, + // Loop variable + i, + // URL without anti-cache param + cacheURL, + // Response headers as string + responseHeadersString, + // timeout handle + timeoutTimer, + + // To know if global events are to be dispatched + fireGlobals, + + transport, + // Response headers + responseHeaders, + // Create the final options object + s = jQuery.ajaxSetup( {}, options ), + // Callbacks context + callbackContext = s.context || s, + // Context for global events is callbackContext if it is a DOM node or jQuery collection + globalEventContext = s.context && ( callbackContext.nodeType || callbackContext.jquery ) ? + jQuery( callbackContext ) : + jQuery.event, + // Deferreds + deferred = jQuery.Deferred(), + completeDeferred = jQuery.Callbacks("once memory"), + // Status-dependent callbacks + statusCode = s.statusCode || {}, + // Headers (they are sent all at once) + requestHeaders = {}, + requestHeadersNames = {}, + // The jqXHR state + state = 0, + // Default abort message + strAbort = "canceled", + // Fake xhr + jqXHR = { + readyState: 0, + + // Builds headers hashtable if needed + getResponseHeader: function( key ) { + var match; + if ( state === 2 ) { + if ( !responseHeaders ) { + responseHeaders = {}; + while ( (match = rheaders.exec( responseHeadersString )) ) { + responseHeaders[ match[1].toLowerCase() ] = match[ 2 ]; + } + } + match = responseHeaders[ key.toLowerCase() ]; + } + return match == null ? null : match; + }, + + // Raw string + getAllResponseHeaders: function() { + return state === 2 ? responseHeadersString : null; + }, + + // Caches the header + setRequestHeader: function( name, value ) { + var lname = name.toLowerCase(); + if ( !state ) { + name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name; + requestHeaders[ name ] = value; + } + return this; + }, + + // Overrides response content-type header + overrideMimeType: function( type ) { + if ( !state ) { + s.mimeType = type; + } + return this; + }, + + // Status-dependent callbacks + statusCode: function( map ) { + var code; + if ( map ) { + if ( state < 2 ) { + for ( code in map ) { + // Lazy-add the new callback in a way that preserves old ones + statusCode[ code ] = [ statusCode[ code ], map[ code ] ]; + } + } else { + // Execute the appropriate callbacks + jqXHR.always( map[ jqXHR.status ] ); + } + } + return this; + }, + + // Cancel the request + abort: function( statusText ) { + var finalText = statusText || strAbort; + if ( transport ) { + transport.abort( finalText ); + } + done( 0, finalText ); + return this; + } + }; + + // Attach deferreds + deferred.promise( jqXHR ).complete = completeDeferred.add; + jqXHR.success = jqXHR.done; + jqXHR.error = jqXHR.fail; + + // Remove hash character (#7531: and string promotion) + // Add protocol if not provided (#5866: IE7 issue with protocol-less urls) + // Handle falsy url in the settings object (#10093: consistency with old signature) + // We also use the url parameter if available + s.url = ( ( url || s.url || ajaxLocation ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" ); + + // Alias method option to type as per ticket #12004 + s.type = options.method || options.type || s.method || s.type; + + // Extract dataTypes list + s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().match( core_rnotwhite ) || [""]; + + // A cross-domain request is in order when we have a protocol:host:port mismatch + if ( s.crossDomain == null ) { + parts = rurl.exec( s.url.toLowerCase() ); + s.crossDomain = !!( parts && + ( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] || + ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? "80" : "443" ) ) !== + ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? "80" : "443" ) ) ) + ); + } + + // Convert data if not already a string + if ( s.data && s.processData && typeof s.data !== "string" ) { + s.data = jQuery.param( s.data, s.traditional ); + } + + // Apply prefilters + inspectPrefiltersOrTransports( prefilters, s, options, jqXHR ); + + // If request was aborted inside a prefilter, stop there + if ( state === 2 ) { + return jqXHR; + } + + // We can fire global events as of now if asked to + fireGlobals = s.global; + + // Watch for a new set of requests + if ( fireGlobals && jQuery.active++ === 0 ) { + jQuery.event.trigger("ajaxStart"); + } + + // Uppercase the type + s.type = s.type.toUpperCase(); + + // Determine if request has content + s.hasContent = !rnoContent.test( s.type ); + + // Save the URL in case we're toying with the If-Modified-Since + // and/or If-None-Match header later on + cacheURL = s.url; + + // More options handling for requests with no content + if ( !s.hasContent ) { + + // If data is available, append data to url + if ( s.data ) { + cacheURL = ( s.url += ( ajax_rquery.test( cacheURL ) ? "&" : "?" ) + s.data ); + // #9682: remove data so that it's not used in an eventual retry + delete s.data; + } + + // Add anti-cache in url if needed + if ( s.cache === false ) { + s.url = rts.test( cacheURL ) ? + + // If there is already a '_' parameter, set its value + cacheURL.replace( rts, "$1_=" + ajax_nonce++ ) : + + // Otherwise add one to the end + cacheURL + ( ajax_rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ajax_nonce++; + } + } + + // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. + if ( s.ifModified ) { + if ( jQuery.lastModified[ cacheURL ] ) { + jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] ); + } + if ( jQuery.etag[ cacheURL ] ) { + jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] ); + } + } + + // Set the correct header, if data is being sent + if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) { + jqXHR.setRequestHeader( "Content-Type", s.contentType ); + } + + // Set the Accepts header for the server, depending on the dataType + jqXHR.setRequestHeader( + "Accept", + s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ? + s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) : + s.accepts[ "*" ] + ); + + // Check for headers option + for ( i in s.headers ) { + jqXHR.setRequestHeader( i, s.headers[ i ] ); + } + + // Allow custom headers/mimetypes and early abort + if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) { + // Abort if not done already and return + return jqXHR.abort(); + } + + // aborting is no longer a cancellation + strAbort = "abort"; + + // Install callbacks on deferreds + for ( i in { success: 1, error: 1, complete: 1 } ) { + jqXHR[ i ]( s[ i ] ); + } + + // Get transport + transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR ); + + // If no transport, we auto-abort + if ( !transport ) { + done( -1, "No Transport" ); + } else { + jqXHR.readyState = 1; + + // Send global event + if ( fireGlobals ) { + globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] ); + } + // Timeout + if ( s.async && s.timeout > 0 ) { + timeoutTimer = setTimeout(function() { + jqXHR.abort("timeout"); + }, s.timeout ); + } + + try { + state = 1; + transport.send( requestHeaders, done ); + } catch ( e ) { + // Propagate exception as error if not done + if ( state < 2 ) { + done( -1, e ); + // Simply rethrow otherwise + } else { + throw e; + } + } + } + + // Callback for when everything is done + function done( status, nativeStatusText, responses, headers ) { + var isSuccess, success, error, response, modified, + statusText = nativeStatusText; + + // Called once + if ( state === 2 ) { + return; + } + + // State is "done" now + state = 2; + + // Clear timeout if it exists + if ( timeoutTimer ) { + clearTimeout( timeoutTimer ); + } + + // Dereference transport for early garbage collection + // (no matter how long the jqXHR object will be used) + transport = undefined; + + // Cache response headers + responseHeadersString = headers || ""; + + // Set readyState + jqXHR.readyState = status > 0 ? 4 : 0; + + // Determine if successful + isSuccess = status >= 200 && status < 300 || status === 304; + + // Get response data + if ( responses ) { + response = ajaxHandleResponses( s, jqXHR, responses ); + } + + // Convert no matter what (that way responseXXX fields are always set) + response = ajaxConvert( s, response, jqXHR, isSuccess ); + + // If successful, handle type chaining + if ( isSuccess ) { + + // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. + if ( s.ifModified ) { + modified = jqXHR.getResponseHeader("Last-Modified"); + if ( modified ) { + jQuery.lastModified[ cacheURL ] = modified; + } + modified = jqXHR.getResponseHeader("etag"); + if ( modified ) { + jQuery.etag[ cacheURL ] = modified; + } + } + + // if no content + if ( status === 204 || s.type === "HEAD" ) { + statusText = "nocontent"; + + // if not modified + } else if ( status === 304 ) { + statusText = "notmodified"; + + // If we have data, let's convert it + } else { + statusText = response.state; + success = response.data; + error = response.error; + isSuccess = !error; + } + } else { + // We extract error from statusText + // then normalize statusText and status for non-aborts + error = statusText; + if ( status || !statusText ) { + statusText = "error"; + if ( status < 0 ) { + status = 0; + } + } + } + + // Set data for the fake xhr object + jqXHR.status = status; + jqXHR.statusText = ( nativeStatusText || statusText ) + ""; + + // Success/Error + if ( isSuccess ) { + deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] ); + } else { + deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] ); + } + + // Status-dependent callbacks + jqXHR.statusCode( statusCode ); + statusCode = undefined; + + if ( fireGlobals ) { + globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError", + [ jqXHR, s, isSuccess ? success : error ] ); + } + + // Complete + completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] ); + + if ( fireGlobals ) { + globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] ); + // Handle the global AJAX counter + if ( !( --jQuery.active ) ) { + jQuery.event.trigger("ajaxStop"); + } + } + } + + return jqXHR; + }, + + getJSON: function( url, data, callback ) { + return jQuery.get( url, data, callback, "json" ); + }, + + getScript: function( url, callback ) { + return jQuery.get( url, undefined, callback, "script" ); + } +}); + +jQuery.each( [ "get", "post" ], function( i, method ) { + jQuery[ method ] = function( url, data, callback, type ) { + // shift arguments if data argument was omitted + if ( jQuery.isFunction( data ) ) { + type = type || callback; + callback = data; + data = undefined; + } + + return jQuery.ajax({ + url: url, + type: method, + dataType: type, + data: data, + success: callback + }); + }; +}); + +/* Handles responses to an ajax request: + * - finds the right dataType (mediates between content-type and expected dataType) + * - returns the corresponding response + */ +function ajaxHandleResponses( s, jqXHR, responses ) { + var firstDataType, ct, finalDataType, type, + contents = s.contents, + dataTypes = s.dataTypes; + + // Remove auto dataType and get content-type in the process + while( dataTypes[ 0 ] === "*" ) { + dataTypes.shift(); + if ( ct === undefined ) { + ct = s.mimeType || jqXHR.getResponseHeader("Content-Type"); + } + } + + // Check if we're dealing with a known content-type + if ( ct ) { + for ( type in contents ) { + if ( contents[ type ] && contents[ type ].test( ct ) ) { + dataTypes.unshift( type ); + break; + } + } + } + + // Check to see if we have a response for the expected dataType + if ( dataTypes[ 0 ] in responses ) { + finalDataType = dataTypes[ 0 ]; + } else { + // Try convertible dataTypes + for ( type in responses ) { + if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) { + finalDataType = type; + break; + } + if ( !firstDataType ) { + firstDataType = type; + } + } + // Or just use first one + finalDataType = finalDataType || firstDataType; + } + + // If we found a dataType + // We add the dataType to the list if needed + // and return the corresponding response + if ( finalDataType ) { + if ( finalDataType !== dataTypes[ 0 ] ) { + dataTypes.unshift( finalDataType ); + } + return responses[ finalDataType ]; + } +} + +/* Chain conversions given the request and the original response + * Also sets the responseXXX fields on the jqXHR instance + */ +function ajaxConvert( s, response, jqXHR, isSuccess ) { + var conv2, current, conv, tmp, prev, + converters = {}, + // Work with a copy of dataTypes in case we need to modify it for conversion + dataTypes = s.dataTypes.slice(); + + // Create converters map with lowercased keys + if ( dataTypes[ 1 ] ) { + for ( conv in s.converters ) { + converters[ conv.toLowerCase() ] = s.converters[ conv ]; + } + } + + current = dataTypes.shift(); + + // Convert to each sequential dataType + while ( current ) { + + if ( s.responseFields[ current ] ) { + jqXHR[ s.responseFields[ current ] ] = response; + } + + // Apply the dataFilter if provided + if ( !prev && isSuccess && s.dataFilter ) { + response = s.dataFilter( response, s.dataType ); + } + + prev = current; + current = dataTypes.shift(); + + if ( current ) { + + // There's only work to do if current dataType is non-auto + if ( current === "*" ) { + + current = prev; + + // Convert response if prev dataType is non-auto and differs from current + } else if ( prev !== "*" && prev !== current ) { + + // Seek a direct converter + conv = converters[ prev + " " + current ] || converters[ "* " + current ]; + + // If none found, seek a pair + if ( !conv ) { + for ( conv2 in converters ) { + + // If conv2 outputs current + tmp = conv2.split( " " ); + if ( tmp[ 1 ] === current ) { + + // If prev can be converted to accepted input + conv = converters[ prev + " " + tmp[ 0 ] ] || + converters[ "* " + tmp[ 0 ] ]; + if ( conv ) { + // Condense equivalence converters + if ( conv === true ) { + conv = converters[ conv2 ]; + + // Otherwise, insert the intermediate dataType + } else if ( converters[ conv2 ] !== true ) { + current = tmp[ 0 ]; + dataTypes.unshift( tmp[ 1 ] ); + } + break; + } + } + } + } + + // Apply converter (if not an equivalence) + if ( conv !== true ) { + + // Unless errors are allowed to bubble, catch and return them + if ( conv && s[ "throws" ] ) { + response = conv( response ); + } else { + try { + response = conv( response ); + } catch ( e ) { + return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current }; + } + } + } + } + } + } + + return { state: "success", data: response }; +} +// Install script dataType +jQuery.ajaxSetup({ + accepts: { + script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript" + }, + contents: { + script: /(?:java|ecma)script/ + }, + converters: { + "text script": function( text ) { + jQuery.globalEval( text ); + return text; + } + } +}); + +// Handle cache's special case and global +jQuery.ajaxPrefilter( "script", function( s ) { + if ( s.cache === undefined ) { + s.cache = false; + } + if ( s.crossDomain ) { + s.type = "GET"; + s.global = false; + } +}); + +// Bind script tag hack transport +jQuery.ajaxTransport( "script", function(s) { + + // This transport only deals with cross domain requests + if ( s.crossDomain ) { + + var script, + head = document.head || jQuery("head")[0] || document.documentElement; + + return { + + send: function( _, callback ) { + + script = document.createElement("script"); + + script.async = true; + + if ( s.scriptCharset ) { + script.charset = s.scriptCharset; + } + + script.src = s.url; + + // Attach handlers for all browsers + script.onload = script.onreadystatechange = function( _, isAbort ) { + + if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) { + + // Handle memory leak in IE + script.onload = script.onreadystatechange = null; + + // Remove the script + if ( script.parentNode ) { + script.parentNode.removeChild( script ); + } + + // Dereference the script + script = null; + + // Callback if not abort + if ( !isAbort ) { + callback( 200, "success" ); + } + } + }; + + // Circumvent IE6 bugs with base elements (#2709 and #4378) by prepending + // Use native DOM manipulation to avoid our domManip AJAX trickery + head.insertBefore( script, head.firstChild ); + }, + + abort: function() { + if ( script ) { + script.onload( undefined, true ); + } + } + }; + } +}); +var oldCallbacks = [], + rjsonp = /(=)\?(?=&|$)|\?\?/; + +// Default jsonp settings +jQuery.ajaxSetup({ + jsonp: "callback", + jsonpCallback: function() { + var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( ajax_nonce++ ) ); + this[ callback ] = true; + return callback; + } +}); + +// Detect, normalize options and install callbacks for jsonp requests +jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) { + + var callbackName, overwritten, responseContainer, + jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ? + "url" : + typeof s.data === "string" && !( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") && rjsonp.test( s.data ) && "data" + ); + + // Handle iff the expected data type is "jsonp" or we have a parameter to set + if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) { + + // Get callback name, remembering preexisting value associated with it + callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ? + s.jsonpCallback() : + s.jsonpCallback; + + // Insert callback into url or form data + if ( jsonProp ) { + s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName ); + } else if ( s.jsonp !== false ) { + s.url += ( ajax_rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName; + } + + // Use data converter to retrieve json after script execution + s.converters["script json"] = function() { + if ( !responseContainer ) { + jQuery.error( callbackName + " was not called" ); + } + return responseContainer[ 0 ]; + }; + + // force json dataType + s.dataTypes[ 0 ] = "json"; + + // Install callback + overwritten = window[ callbackName ]; + window[ callbackName ] = function() { + responseContainer = arguments; + }; + + // Clean-up function (fires after converters) + jqXHR.always(function() { + // Restore preexisting value + window[ callbackName ] = overwritten; + + // Save back as free + if ( s[ callbackName ] ) { + // make sure that re-using the options doesn't screw things around + s.jsonpCallback = originalSettings.jsonpCallback; + + // save the callback name for future use + oldCallbacks.push( callbackName ); + } + + // Call if it was a function and we have a response + if ( responseContainer && jQuery.isFunction( overwritten ) ) { + overwritten( responseContainer[ 0 ] ); + } + + responseContainer = overwritten = undefined; + }); + + // Delegate to script + return "script"; + } +}); +var xhrCallbacks, xhrSupported, + xhrId = 0, + // #5280: Internet Explorer will keep connections alive if we don't abort on unload + xhrOnUnloadAbort = window.ActiveXObject && function() { + // Abort all pending requests + var key; + for ( key in xhrCallbacks ) { + xhrCallbacks[ key ]( undefined, true ); + } + }; + +// Functions to create xhrs +function createStandardXHR() { + try { + return new window.XMLHttpRequest(); + } catch( e ) {} +} + +function createActiveXHR() { + try { + return new window.ActiveXObject("Microsoft.XMLHTTP"); + } catch( e ) {} +} + +// Create the request object +// (This is still attached to ajaxSettings for backward compatibility) +jQuery.ajaxSettings.xhr = window.ActiveXObject ? + /* Microsoft failed to properly + * implement the XMLHttpRequest in IE7 (can't request local files), + * so we use the ActiveXObject when it is available + * Additionally XMLHttpRequest can be disabled in IE7/IE8 so + * we need a fallback. + */ + function() { + return !this.isLocal && createStandardXHR() || createActiveXHR(); + } : + // For all other browsers, use the standard XMLHttpRequest object + createStandardXHR; + +// Determine support properties +xhrSupported = jQuery.ajaxSettings.xhr(); +jQuery.support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported ); +xhrSupported = jQuery.support.ajax = !!xhrSupported; + +// Create transport if the browser can provide an xhr +if ( xhrSupported ) { + + jQuery.ajaxTransport(function( s ) { + // Cross domain only allowed if supported through XMLHttpRequest + if ( !s.crossDomain || jQuery.support.cors ) { + + var callback; + + return { + send: function( headers, complete ) { + + // Get a new xhr + var handle, i, + xhr = s.xhr(); + + // Open the socket + // Passing null username, generates a login popup on Opera (#2865) + if ( s.username ) { + xhr.open( s.type, s.url, s.async, s.username, s.password ); + } else { + xhr.open( s.type, s.url, s.async ); + } + + // Apply custom fields if provided + if ( s.xhrFields ) { + for ( i in s.xhrFields ) { + xhr[ i ] = s.xhrFields[ i ]; + } + } + + // Override mime type if needed + if ( s.mimeType && xhr.overrideMimeType ) { + xhr.overrideMimeType( s.mimeType ); + } + + // X-Requested-With header + // For cross-domain requests, seeing as conditions for a preflight are + // akin to a jigsaw puzzle, we simply never set it to be sure. + // (it can always be set on a per-request basis or even using ajaxSetup) + // For same-domain requests, won't change header if already provided. + if ( !s.crossDomain && !headers["X-Requested-With"] ) { + headers["X-Requested-With"] = "XMLHttpRequest"; + } + + // Need an extra try/catch for cross domain requests in Firefox 3 + try { + for ( i in headers ) { + xhr.setRequestHeader( i, headers[ i ] ); + } + } catch( err ) {} + + // Do send the request + // This may raise an exception which is actually + // handled in jQuery.ajax (so no try/catch here) + xhr.send( ( s.hasContent && s.data ) || null ); + + // Listener + callback = function( _, isAbort ) { + var status, responseHeaders, statusText, responses; + + // Firefox throws exceptions when accessing properties + // of an xhr when a network error occurred + // http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE) + try { + + // Was never called and is aborted or complete + if ( callback && ( isAbort || xhr.readyState === 4 ) ) { + + // Only called once + callback = undefined; + + // Do not keep as active anymore + if ( handle ) { + xhr.onreadystatechange = jQuery.noop; + if ( xhrOnUnloadAbort ) { + delete xhrCallbacks[ handle ]; + } + } + + // If it's an abort + if ( isAbort ) { + // Abort it manually if needed + if ( xhr.readyState !== 4 ) { + xhr.abort(); + } + } else { + responses = {}; + status = xhr.status; + responseHeaders = xhr.getAllResponseHeaders(); + + // When requesting binary data, IE6-9 will throw an exception + // on any attempt to access responseText (#11426) + if ( typeof xhr.responseText === "string" ) { + responses.text = xhr.responseText; + } + + // Firefox throws an exception when accessing + // statusText for faulty cross-domain requests + try { + statusText = xhr.statusText; + } catch( e ) { + // We normalize with Webkit giving an empty statusText + statusText = ""; + } + + // Filter status for non standard behaviors + + // If the request is local and we have data: assume a success + // (success with no data won't get notified, that's the best we + // can do given current implementations) + if ( !status && s.isLocal && !s.crossDomain ) { + status = responses.text ? 200 : 404; + // IE - #1450: sometimes returns 1223 when it should be 204 + } else if ( status === 1223 ) { + status = 204; + } + } + } + } catch( firefoxAccessException ) { + if ( !isAbort ) { + complete( -1, firefoxAccessException ); + } + } + + // Call complete if needed + if ( responses ) { + complete( status, statusText, responses, responseHeaders ); + } + }; + + if ( !s.async ) { + // if we're in sync mode we fire the callback + callback(); + } else if ( xhr.readyState === 4 ) { + // (IE6 & IE7) if it's in cache and has been + // retrieved directly we need to fire the callback + setTimeout( callback ); + } else { + handle = ++xhrId; + if ( xhrOnUnloadAbort ) { + // Create the active xhrs callbacks list if needed + // and attach the unload handler + if ( !xhrCallbacks ) { + xhrCallbacks = {}; + jQuery( window ).unload( xhrOnUnloadAbort ); + } + // Add to list of active xhrs callbacks + xhrCallbacks[ handle ] = callback; + } + xhr.onreadystatechange = callback; + } + }, + + abort: function() { + if ( callback ) { + callback( undefined, true ); + } + } + }; + } + }); +} +var fxNow, timerId, + rfxtypes = /^(?:toggle|show|hide)$/, + rfxnum = new RegExp( "^(?:([+-])=|)(" + core_pnum + ")([a-z%]*)$", "i" ), + rrun = /queueHooks$/, + animationPrefilters = [ defaultPrefilter ], + tweeners = { + "*": [function( prop, value ) { + var tween = this.createTween( prop, value ), + target = tween.cur(), + parts = rfxnum.exec( value ), + unit = parts && parts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ), + + // Starting value computation is required for potential unit mismatches + start = ( jQuery.cssNumber[ prop ] || unit !== "px" && +target ) && + rfxnum.exec( jQuery.css( tween.elem, prop ) ), + scale = 1, + maxIterations = 20; + + if ( start && start[ 3 ] !== unit ) { + // Trust units reported by jQuery.css + unit = unit || start[ 3 ]; + + // Make sure we update the tween properties later on + parts = parts || []; + + // Iteratively approximate from a nonzero starting point + start = +target || 1; + + do { + // If previous iteration zeroed out, double until we get *something* + // Use a string for doubling factor so we don't accidentally see scale as unchanged below + scale = scale || ".5"; + + // Adjust and apply + start = start / scale; + jQuery.style( tween.elem, prop, start + unit ); + + // Update scale, tolerating zero or NaN from tween.cur() + // And breaking the loop if scale is unchanged or perfect, or if we've just had enough + } while ( scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations ); + } + + // Update tween properties + if ( parts ) { + start = tween.start = +start || +target || 0; + tween.unit = unit; + // If a +=/-= token was provided, we're doing a relative animation + tween.end = parts[ 1 ] ? + start + ( parts[ 1 ] + 1 ) * parts[ 2 ] : + +parts[ 2 ]; + } + + return tween; + }] + }; + +// Animations created synchronously will run synchronously +function createFxNow() { + setTimeout(function() { + fxNow = undefined; + }); + return ( fxNow = jQuery.now() ); +} + +function createTween( value, prop, animation ) { + var tween, + collection = ( tweeners[ prop ] || [] ).concat( tweeners[ "*" ] ), + index = 0, + length = collection.length; + for ( ; index < length; index++ ) { + if ( (tween = collection[ index ].call( animation, prop, value )) ) { + + // we're done with this property + return tween; + } + } +} + +function Animation( elem, properties, options ) { + var result, + stopped, + index = 0, + length = animationPrefilters.length, + deferred = jQuery.Deferred().always( function() { + // don't match elem in the :animated selector + delete tick.elem; + }), + tick = function() { + if ( stopped ) { + return false; + } + var currentTime = fxNow || createFxNow(), + remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ), + // archaic crash bug won't allow us to use 1 - ( 0.5 || 0 ) (#12497) + temp = remaining / animation.duration || 0, + percent = 1 - temp, + index = 0, + length = animation.tweens.length; + + for ( ; index < length ; index++ ) { + animation.tweens[ index ].run( percent ); + } + + deferred.notifyWith( elem, [ animation, percent, remaining ]); + + if ( percent < 1 && length ) { + return remaining; + } else { + deferred.resolveWith( elem, [ animation ] ); + return false; + } + }, + animation = deferred.promise({ + elem: elem, + props: jQuery.extend( {}, properties ), + opts: jQuery.extend( true, { specialEasing: {} }, options ), + originalProperties: properties, + originalOptions: options, + startTime: fxNow || createFxNow(), + duration: options.duration, + tweens: [], + createTween: function( prop, end ) { + var tween = jQuery.Tween( elem, animation.opts, prop, end, + animation.opts.specialEasing[ prop ] || animation.opts.easing ); + animation.tweens.push( tween ); + return tween; + }, + stop: function( gotoEnd ) { + var index = 0, + // if we are going to the end, we want to run all the tweens + // otherwise we skip this part + length = gotoEnd ? animation.tweens.length : 0; + if ( stopped ) { + return this; + } + stopped = true; + for ( ; index < length ; index++ ) { + animation.tweens[ index ].run( 1 ); + } + + // resolve when we played the last frame + // otherwise, reject + if ( gotoEnd ) { + deferred.resolveWith( elem, [ animation, gotoEnd ] ); + } else { + deferred.rejectWith( elem, [ animation, gotoEnd ] ); + } + return this; + } + }), + props = animation.props; + + propFilter( props, animation.opts.specialEasing ); + + for ( ; index < length ; index++ ) { + result = animationPrefilters[ index ].call( animation, elem, props, animation.opts ); + if ( result ) { + return result; + } + } + + jQuery.map( props, createTween, animation ); + + if ( jQuery.isFunction( animation.opts.start ) ) { + animation.opts.start.call( elem, animation ); + } + + jQuery.fx.timer( + jQuery.extend( tick, { + elem: elem, + anim: animation, + queue: animation.opts.queue + }) + ); + + // attach callbacks from options + return animation.progress( animation.opts.progress ) + .done( animation.opts.done, animation.opts.complete ) + .fail( animation.opts.fail ) + .always( animation.opts.always ); +} + +function propFilter( props, specialEasing ) { + var index, name, easing, value, hooks; + + // camelCase, specialEasing and expand cssHook pass + for ( index in props ) { + name = jQuery.camelCase( index ); + easing = specialEasing[ name ]; + value = props[ index ]; + if ( jQuery.isArray( value ) ) { + easing = value[ 1 ]; + value = props[ index ] = value[ 0 ]; + } + + if ( index !== name ) { + props[ name ] = value; + delete props[ index ]; + } + + hooks = jQuery.cssHooks[ name ]; + if ( hooks && "expand" in hooks ) { + value = hooks.expand( value ); + delete props[ name ]; + + // not quite $.extend, this wont overwrite keys already present. + // also - reusing 'index' from above because we have the correct "name" + for ( index in value ) { + if ( !( index in props ) ) { + props[ index ] = value[ index ]; + specialEasing[ index ] = easing; + } + } + } else { + specialEasing[ name ] = easing; + } + } +} + +jQuery.Animation = jQuery.extend( Animation, { + + tweener: function( props, callback ) { + if ( jQuery.isFunction( props ) ) { + callback = props; + props = [ "*" ]; + } else { + props = props.split(" "); + } + + var prop, + index = 0, + length = props.length; + + for ( ; index < length ; index++ ) { + prop = props[ index ]; + tweeners[ prop ] = tweeners[ prop ] || []; + tweeners[ prop ].unshift( callback ); + } + }, + + prefilter: function( callback, prepend ) { + if ( prepend ) { + animationPrefilters.unshift( callback ); + } else { + animationPrefilters.push( callback ); + } + } +}); + +function defaultPrefilter( elem, props, opts ) { + /* jshint validthis: true */ + var prop, value, toggle, tween, hooks, oldfire, + anim = this, + orig = {}, + style = elem.style, + hidden = elem.nodeType && isHidden( elem ), + dataShow = jQuery._data( elem, "fxshow" ); + + // handle queue: false promises + if ( !opts.queue ) { + hooks = jQuery._queueHooks( elem, "fx" ); + if ( hooks.unqueued == null ) { + hooks.unqueued = 0; + oldfire = hooks.empty.fire; + hooks.empty.fire = function() { + if ( !hooks.unqueued ) { + oldfire(); + } + }; + } + hooks.unqueued++; + + anim.always(function() { + // doing this makes sure that the complete handler will be called + // before this completes + anim.always(function() { + hooks.unqueued--; + if ( !jQuery.queue( elem, "fx" ).length ) { + hooks.empty.fire(); + } + }); + }); + } + + // height/width overflow pass + if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) { + // Make sure that nothing sneaks out + // Record all 3 overflow attributes because IE does not + // change the overflow attribute when overflowX and + // overflowY are set to the same value + opts.overflow = [ style.overflow, style.overflowX, style.overflowY ]; + + // Set display property to inline-block for height/width + // animations on inline elements that are having width/height animated + if ( jQuery.css( elem, "display" ) === "inline" && + jQuery.css( elem, "float" ) === "none" ) { + + // inline-level elements accept inline-block; + // block-level elements need to be inline with layout + if ( !jQuery.support.inlineBlockNeedsLayout || css_defaultDisplay( elem.nodeName ) === "inline" ) { + style.display = "inline-block"; + + } else { + style.zoom = 1; + } + } + } + + if ( opts.overflow ) { + style.overflow = "hidden"; + if ( !jQuery.support.shrinkWrapBlocks ) { + anim.always(function() { + style.overflow = opts.overflow[ 0 ]; + style.overflowX = opts.overflow[ 1 ]; + style.overflowY = opts.overflow[ 2 ]; + }); + } + } + + + // show/hide pass + for ( prop in props ) { + value = props[ prop ]; + if ( rfxtypes.exec( value ) ) { + delete props[ prop ]; + toggle = toggle || value === "toggle"; + if ( value === ( hidden ? "hide" : "show" ) ) { + continue; + } + orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop ); + } + } + + if ( !jQuery.isEmptyObject( orig ) ) { + if ( dataShow ) { + if ( "hidden" in dataShow ) { + hidden = dataShow.hidden; + } + } else { + dataShow = jQuery._data( elem, "fxshow", {} ); + } + + // store state if its toggle - enables .stop().toggle() to "reverse" + if ( toggle ) { + dataShow.hidden = !hidden; + } + if ( hidden ) { + jQuery( elem ).show(); + } else { + anim.done(function() { + jQuery( elem ).hide(); + }); + } + anim.done(function() { + var prop; + jQuery._removeData( elem, "fxshow" ); + for ( prop in orig ) { + jQuery.style( elem, prop, orig[ prop ] ); + } + }); + for ( prop in orig ) { + tween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim ); + + if ( !( prop in dataShow ) ) { + dataShow[ prop ] = tween.start; + if ( hidden ) { + tween.end = tween.start; + tween.start = prop === "width" || prop === "height" ? 1 : 0; + } + } + } + } +} + +function Tween( elem, options, prop, end, easing ) { + return new Tween.prototype.init( elem, options, prop, end, easing ); +} +jQuery.Tween = Tween; + +Tween.prototype = { + constructor: Tween, + init: function( elem, options, prop, end, easing, unit ) { + this.elem = elem; + this.prop = prop; + this.easing = easing || "swing"; + this.options = options; + this.start = this.now = this.cur(); + this.end = end; + this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" ); + }, + cur: function() { + var hooks = Tween.propHooks[ this.prop ]; + + return hooks && hooks.get ? + hooks.get( this ) : + Tween.propHooks._default.get( this ); + }, + run: function( percent ) { + var eased, + hooks = Tween.propHooks[ this.prop ]; + + if ( this.options.duration ) { + this.pos = eased = jQuery.easing[ this.easing ]( + percent, this.options.duration * percent, 0, 1, this.options.duration + ); + } else { + this.pos = eased = percent; + } + this.now = ( this.end - this.start ) * eased + this.start; + + if ( this.options.step ) { + this.options.step.call( this.elem, this.now, this ); + } + + if ( hooks && hooks.set ) { + hooks.set( this ); + } else { + Tween.propHooks._default.set( this ); + } + return this; + } +}; + +Tween.prototype.init.prototype = Tween.prototype; + +Tween.propHooks = { + _default: { + get: function( tween ) { + var result; + + if ( tween.elem[ tween.prop ] != null && + (!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) { + return tween.elem[ tween.prop ]; + } + + // passing an empty string as a 3rd parameter to .css will automatically + // attempt a parseFloat and fallback to a string if the parse fails + // so, simple values such as "10px" are parsed to Float. + // complex values such as "rotate(1rad)" are returned as is. + result = jQuery.css( tween.elem, tween.prop, "" ); + // Empty strings, null, undefined and "auto" are converted to 0. + return !result || result === "auto" ? 0 : result; + }, + set: function( tween ) { + // use step hook for back compat - use cssHook if its there - use .style if its + // available and use plain properties where available + if ( jQuery.fx.step[ tween.prop ] ) { + jQuery.fx.step[ tween.prop ]( tween ); + } else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) { + jQuery.style( tween.elem, tween.prop, tween.now + tween.unit ); + } else { + tween.elem[ tween.prop ] = tween.now; + } + } + } +}; + +// Support: IE <=9 +// Panic based approach to setting things on disconnected nodes + +Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { + set: function( tween ) { + if ( tween.elem.nodeType && tween.elem.parentNode ) { + tween.elem[ tween.prop ] = tween.now; + } + } +}; + +jQuery.each([ "toggle", "show", "hide" ], function( i, name ) { + var cssFn = jQuery.fn[ name ]; + jQuery.fn[ name ] = function( speed, easing, callback ) { + return speed == null || typeof speed === "boolean" ? + cssFn.apply( this, arguments ) : + this.animate( genFx( name, true ), speed, easing, callback ); + }; +}); + +jQuery.fn.extend({ + fadeTo: function( speed, to, easing, callback ) { + + // show any hidden elements after setting opacity to 0 + return this.filter( isHidden ).css( "opacity", 0 ).show() + + // animate to the value specified + .end().animate({ opacity: to }, speed, easing, callback ); + }, + animate: function( prop, speed, easing, callback ) { + var empty = jQuery.isEmptyObject( prop ), + optall = jQuery.speed( speed, easing, callback ), + doAnimation = function() { + // Operate on a copy of prop so per-property easing won't be lost + var anim = Animation( this, jQuery.extend( {}, prop ), optall ); + + // Empty animations, or finishing resolves immediately + if ( empty || jQuery._data( this, "finish" ) ) { + anim.stop( true ); + } + }; + doAnimation.finish = doAnimation; + + return empty || optall.queue === false ? + this.each( doAnimation ) : + this.queue( optall.queue, doAnimation ); + }, + stop: function( type, clearQueue, gotoEnd ) { + var stopQueue = function( hooks ) { + var stop = hooks.stop; + delete hooks.stop; + stop( gotoEnd ); + }; + + if ( typeof type !== "string" ) { + gotoEnd = clearQueue; + clearQueue = type; + type = undefined; + } + if ( clearQueue && type !== false ) { + this.queue( type || "fx", [] ); + } + + return this.each(function() { + var dequeue = true, + index = type != null && type + "queueHooks", + timers = jQuery.timers, + data = jQuery._data( this ); + + if ( index ) { + if ( data[ index ] && data[ index ].stop ) { + stopQueue( data[ index ] ); + } + } else { + for ( index in data ) { + if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) { + stopQueue( data[ index ] ); + } + } + } + + for ( index = timers.length; index--; ) { + if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) { + timers[ index ].anim.stop( gotoEnd ); + dequeue = false; + timers.splice( index, 1 ); + } + } + + // start the next in the queue if the last step wasn't forced + // timers currently will call their complete callbacks, which will dequeue + // but only if they were gotoEnd + if ( dequeue || !gotoEnd ) { + jQuery.dequeue( this, type ); + } + }); + }, + finish: function( type ) { + if ( type !== false ) { + type = type || "fx"; + } + return this.each(function() { + var index, + data = jQuery._data( this ), + queue = data[ type + "queue" ], + hooks = data[ type + "queueHooks" ], + timers = jQuery.timers, + length = queue ? queue.length : 0; + + // enable finishing flag on private data + data.finish = true; + + // empty the queue first + jQuery.queue( this, type, [] ); + + if ( hooks && hooks.stop ) { + hooks.stop.call( this, true ); + } + + // look for any active animations, and finish them + for ( index = timers.length; index--; ) { + if ( timers[ index ].elem === this && timers[ index ].queue === type ) { + timers[ index ].anim.stop( true ); + timers.splice( index, 1 ); + } + } + + // look for any animations in the old queue and finish them + for ( index = 0; index < length; index++ ) { + if ( queue[ index ] && queue[ index ].finish ) { + queue[ index ].finish.call( this ); + } + } + + // turn off finishing flag + delete data.finish; + }); + } +}); + +// Generate parameters to create a standard animation +function genFx( type, includeWidth ) { + var which, + attrs = { height: type }, + i = 0; + + // if we include width, step value is 1 to do all cssExpand values, + // if we don't include width, step value is 2 to skip over Left and Right + includeWidth = includeWidth? 1 : 0; + for( ; i < 4 ; i += 2 - includeWidth ) { + which = cssExpand[ i ]; + attrs[ "margin" + which ] = attrs[ "padding" + which ] = type; + } + + if ( includeWidth ) { + attrs.opacity = attrs.width = type; + } + + return attrs; +} + +// Generate shortcuts for custom animations +jQuery.each({ + slideDown: genFx("show"), + slideUp: genFx("hide"), + slideToggle: genFx("toggle"), + fadeIn: { opacity: "show" }, + fadeOut: { opacity: "hide" }, + fadeToggle: { opacity: "toggle" } +}, function( name, props ) { + jQuery.fn[ name ] = function( speed, easing, callback ) { + return this.animate( props, speed, easing, callback ); + }; +}); + +jQuery.speed = function( speed, easing, fn ) { + var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : { + complete: fn || !fn && easing || + jQuery.isFunction( speed ) && speed, + duration: speed, + easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing + }; + + opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration : + opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default; + + // normalize opt.queue - true/undefined/null -> "fx" + if ( opt.queue == null || opt.queue === true ) { + opt.queue = "fx"; + } + + // Queueing + opt.old = opt.complete; + + opt.complete = function() { + if ( jQuery.isFunction( opt.old ) ) { + opt.old.call( this ); + } + + if ( opt.queue ) { + jQuery.dequeue( this, opt.queue ); + } + }; + + return opt; +}; + +jQuery.easing = { + linear: function( p ) { + return p; + }, + swing: function( p ) { + return 0.5 - Math.cos( p*Math.PI ) / 2; + } +}; + +jQuery.timers = []; +jQuery.fx = Tween.prototype.init; +jQuery.fx.tick = function() { + var timer, + timers = jQuery.timers, + i = 0; + + fxNow = jQuery.now(); + + for ( ; i < timers.length; i++ ) { + timer = timers[ i ]; + // Checks the timer has not already been removed + if ( !timer() && timers[ i ] === timer ) { + timers.splice( i--, 1 ); + } + } + + if ( !timers.length ) { + jQuery.fx.stop(); + } + fxNow = undefined; +}; + +jQuery.fx.timer = function( timer ) { + if ( timer() && jQuery.timers.push( timer ) ) { + jQuery.fx.start(); + } +}; + +jQuery.fx.interval = 13; + +jQuery.fx.start = function() { + if ( !timerId ) { + timerId = setInterval( jQuery.fx.tick, jQuery.fx.interval ); + } +}; + +jQuery.fx.stop = function() { + clearInterval( timerId ); + timerId = null; +}; + +jQuery.fx.speeds = { + slow: 600, + fast: 200, + // Default speed + _default: 400 +}; + +// Back Compat <1.8 extension point +jQuery.fx.step = {}; + +if ( jQuery.expr && jQuery.expr.filters ) { + jQuery.expr.filters.animated = function( elem ) { + return jQuery.grep(jQuery.timers, function( fn ) { + return elem === fn.elem; + }).length; + }; +} +jQuery.fn.offset = function( options ) { + if ( arguments.length ) { + return options === undefined ? + this : + this.each(function( i ) { + jQuery.offset.setOffset( this, options, i ); + }); + } + + var docElem, win, + box = { top: 0, left: 0 }, + elem = this[ 0 ], + doc = elem && elem.ownerDocument; + + if ( !doc ) { + return; + } + + docElem = doc.documentElement; + + // Make sure it's not a disconnected DOM node + if ( !jQuery.contains( docElem, elem ) ) { + return box; + } + + // If we don't have gBCR, just use 0,0 rather than error + // BlackBerry 5, iOS 3 (original iPhone) + if ( typeof elem.getBoundingClientRect !== core_strundefined ) { + box = elem.getBoundingClientRect(); + } + win = getWindow( doc ); + return { + top: box.top + ( win.pageYOffset || docElem.scrollTop ) - ( docElem.clientTop || 0 ), + left: box.left + ( win.pageXOffset || docElem.scrollLeft ) - ( docElem.clientLeft || 0 ) + }; +}; + +jQuery.offset = { + + setOffset: function( elem, options, i ) { + var position = jQuery.css( elem, "position" ); + + // set position first, in-case top/left are set even on static elem + if ( position === "static" ) { + elem.style.position = "relative"; + } + + var curElem = jQuery( elem ), + curOffset = curElem.offset(), + curCSSTop = jQuery.css( elem, "top" ), + curCSSLeft = jQuery.css( elem, "left" ), + calculatePosition = ( position === "absolute" || position === "fixed" ) && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1, + props = {}, curPosition = {}, curTop, curLeft; + + // need to be able to calculate position if either top or left is auto and position is either absolute or fixed + if ( calculatePosition ) { + curPosition = curElem.position(); + curTop = curPosition.top; + curLeft = curPosition.left; + } else { + curTop = parseFloat( curCSSTop ) || 0; + curLeft = parseFloat( curCSSLeft ) || 0; + } + + if ( jQuery.isFunction( options ) ) { + options = options.call( elem, i, curOffset ); + } + + if ( options.top != null ) { + props.top = ( options.top - curOffset.top ) + curTop; + } + if ( options.left != null ) { + props.left = ( options.left - curOffset.left ) + curLeft; + } + + if ( "using" in options ) { + options.using.call( elem, props ); + } else { + curElem.css( props ); + } + } +}; + + +jQuery.fn.extend({ + + position: function() { + if ( !this[ 0 ] ) { + return; + } + + var offsetParent, offset, + parentOffset = { top: 0, left: 0 }, + elem = this[ 0 ]; + + // fixed elements are offset from window (parentOffset = {top:0, left: 0}, because it is it's only offset parent + if ( jQuery.css( elem, "position" ) === "fixed" ) { + // we assume that getBoundingClientRect is available when computed position is fixed + offset = elem.getBoundingClientRect(); + } else { + // Get *real* offsetParent + offsetParent = this.offsetParent(); + + // Get correct offsets + offset = this.offset(); + if ( !jQuery.nodeName( offsetParent[ 0 ], "html" ) ) { + parentOffset = offsetParent.offset(); + } + + // Add offsetParent borders + parentOffset.top += jQuery.css( offsetParent[ 0 ], "borderTopWidth", true ); + parentOffset.left += jQuery.css( offsetParent[ 0 ], "borderLeftWidth", true ); + } + + // Subtract parent offsets and element margins + // note: when an element has margin: auto the offsetLeft and marginLeft + // are the same in Safari causing offset.left to incorrectly be 0 + return { + top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ), + left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true) + }; + }, + + offsetParent: function() { + return this.map(function() { + var offsetParent = this.offsetParent || docElem; + while ( offsetParent && ( !jQuery.nodeName( offsetParent, "html" ) && jQuery.css( offsetParent, "position") === "static" ) ) { + offsetParent = offsetParent.offsetParent; + } + return offsetParent || docElem; + }); + } +}); + + +// Create scrollLeft and scrollTop methods +jQuery.each( {scrollLeft: "pageXOffset", scrollTop: "pageYOffset"}, function( method, prop ) { + var top = /Y/.test( prop ); + + jQuery.fn[ method ] = function( val ) { + return jQuery.access( this, function( elem, method, val ) { + var win = getWindow( elem ); + + if ( val === undefined ) { + return win ? (prop in win) ? win[ prop ] : + win.document.documentElement[ method ] : + elem[ method ]; + } + + if ( win ) { + win.scrollTo( + !top ? val : jQuery( win ).scrollLeft(), + top ? val : jQuery( win ).scrollTop() + ); + + } else { + elem[ method ] = val; + } + }, method, val, arguments.length, null ); + }; +}); + +function getWindow( elem ) { + return jQuery.isWindow( elem ) ? + elem : + elem.nodeType === 9 ? + elem.defaultView || elem.parentWindow : + false; +} +// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods +jQuery.each( { Height: "height", Width: "width" }, function( name, type ) { + jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) { + // margin is only for outerHeight, outerWidth + jQuery.fn[ funcName ] = function( margin, value ) { + var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ), + extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" ); + + return jQuery.access( this, function( elem, type, value ) { + var doc; + + if ( jQuery.isWindow( elem ) ) { + // As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there + // isn't a whole lot we can do. See pull request at this URL for discussion: + // https://github.com/jquery/jquery/pull/764 + return elem.document.documentElement[ "client" + name ]; + } + + // Get document width or height + if ( elem.nodeType === 9 ) { + doc = elem.documentElement; + + // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], whichever is greatest + // unfortunately, this causes bug #3838 in IE6/8 only, but there is currently no good, small way to fix it. + return Math.max( + elem.body[ "scroll" + name ], doc[ "scroll" + name ], + elem.body[ "offset" + name ], doc[ "offset" + name ], + doc[ "client" + name ] + ); + } + + return value === undefined ? + // Get width or height on the element, requesting but not forcing parseFloat + jQuery.css( elem, type, extra ) : + + // Set width or height on the element + jQuery.style( elem, type, value, extra ); + }, type, chainable ? margin : undefined, chainable, null ); + }; + }); +}); +// Limit scope pollution from any deprecated API +// (function() { + +// The number of elements contained in the matched element set +jQuery.fn.size = function() { + return this.length; +}; + +jQuery.fn.andSelf = jQuery.fn.addBack; + +// })(); +if ( typeof module === "object" && module && typeof module.exports === "object" ) { + // Expose jQuery as module.exports in loaders that implement the Node + // module pattern (including browserify). Do not create the global, since + // the user will be storing it themselves locally, and globals are frowned + // upon in the Node module world. + module.exports = jQuery; +} else { + // Otherwise expose jQuery to the global object as usual + window.jQuery = window.$ = jQuery; + + // Register as a named AMD module, since jQuery can be concatenated with other + // files that may use define, but not via a proper concatenation script that + // understands anonymous AMD modules. A named AMD is safest and most robust + // way to register. Lowercase jquery is used because AMD module names are + // derived from file names, and jQuery is normally delivered in a lowercase + // file name. Do this after creating the global so that if an AMD module wants + // to call noConflict to hide this version of jQuery, it will work. + if ( typeof define === "function" && define.amd ) { + define( "jquery", [], function () { return jQuery; } ); + } +} + +})( window ); diff --git a/branch/4.04/jquery-ui-1.11.4.custom/images/ui-bg_diagonals-thick_18_b81900_40x40.png b/branch/4.04/jquery-ui-1.11.4.custom/images/ui-bg_diagonals-thick_18_b81900_40x40.png new file mode 100644 index 0000000000000000000000000000000000000000..09fc62d5a08fdf2a628ae4fc1bc9ffec2d10c1e3 Binary files /dev/null and b/branch/4.04/jquery-ui-1.11.4.custom/images/ui-bg_diagonals-thick_18_b81900_40x40.png differ diff --git a/branch/4.04/jquery-ui-1.11.4.custom/images/ui-bg_diagonals-thick_20_666666_40x40.png b/branch/4.04/jquery-ui-1.11.4.custom/images/ui-bg_diagonals-thick_20_666666_40x40.png new file mode 100644 index 0000000000000000000000000000000000000000..252a7a0524cbef2e056684c112eaea1b55f306c9 Binary files /dev/null and b/branch/4.04/jquery-ui-1.11.4.custom/images/ui-bg_diagonals-thick_20_666666_40x40.png differ diff --git a/branch/4.04/jquery-ui-1.11.4.custom/images/ui-bg_flat_10_000000_40x100.png b/branch/4.04/jquery-ui-1.11.4.custom/images/ui-bg_flat_10_000000_40x100.png new file mode 100644 index 0000000000000000000000000000000000000000..f84f2c81fade37bb295cd85286a15b439b606330 Binary files /dev/null and b/branch/4.04/jquery-ui-1.11.4.custom/images/ui-bg_flat_10_000000_40x100.png differ diff --git a/branch/4.04/jquery-ui-1.11.4.custom/images/ui-bg_glass_100_f6f6f6_1x400.png b/branch/4.04/jquery-ui-1.11.4.custom/images/ui-bg_glass_100_f6f6f6_1x400.png new file mode 100644 index 0000000000000000000000000000000000000000..b0a731a6877a482bc96164ef76cb40febc423c60 Binary files /dev/null and b/branch/4.04/jquery-ui-1.11.4.custom/images/ui-bg_glass_100_f6f6f6_1x400.png differ diff --git a/branch/4.04/jquery-ui-1.11.4.custom/images/ui-bg_glass_100_fdf5ce_1x400.png b/branch/4.04/jquery-ui-1.11.4.custom/images/ui-bg_glass_100_fdf5ce_1x400.png new file mode 100644 index 0000000000000000000000000000000000000000..7d5502f800f5cc69db83ce548119e05a767fdc9b Binary files /dev/null and b/branch/4.04/jquery-ui-1.11.4.custom/images/ui-bg_glass_100_fdf5ce_1x400.png differ diff --git a/branch/4.04/jquery-ui-1.11.4.custom/images/ui-bg_glass_65_ffffff_1x400.png b/branch/4.04/jquery-ui-1.11.4.custom/images/ui-bg_glass_65_ffffff_1x400.png new file mode 100644 index 0000000000000000000000000000000000000000..b5aeafeff0612609bde888dd68210f1e46f8af12 Binary files /dev/null and b/branch/4.04/jquery-ui-1.11.4.custom/images/ui-bg_glass_65_ffffff_1x400.png differ diff --git a/branch/4.04/jquery-ui-1.11.4.custom/images/ui-bg_gloss-wave_35_f6a828_500x100.png b/branch/4.04/jquery-ui-1.11.4.custom/images/ui-bg_gloss-wave_35_f6a828_500x100.png new file mode 100644 index 0000000000000000000000000000000000000000..19b3588a65882e09667c13f36110df7b7895f241 Binary files /dev/null and b/branch/4.04/jquery-ui-1.11.4.custom/images/ui-bg_gloss-wave_35_f6a828_500x100.png differ diff --git a/branch/4.04/jquery-ui-1.11.4.custom/images/ui-bg_highlight-soft_100_eeeeee_1x100.png b/branch/4.04/jquery-ui-1.11.4.custom/images/ui-bg_highlight-soft_100_eeeeee_1x100.png new file mode 100644 index 0000000000000000000000000000000000000000..3ff05545a3e8838f867173f6f843cd3492ab9afe Binary files /dev/null and b/branch/4.04/jquery-ui-1.11.4.custom/images/ui-bg_highlight-soft_100_eeeeee_1x100.png differ diff --git a/branch/4.04/jquery-ui-1.11.4.custom/images/ui-bg_highlight-soft_75_ffe45c_1x100.png b/branch/4.04/jquery-ui-1.11.4.custom/images/ui-bg_highlight-soft_75_ffe45c_1x100.png new file mode 100644 index 0000000000000000000000000000000000000000..2e954aa63763670d2aa07b385e66c72ec45ace55 Binary files /dev/null and b/branch/4.04/jquery-ui-1.11.4.custom/images/ui-bg_highlight-soft_75_ffe45c_1x100.png differ diff --git a/branch/4.04/jquery-ui-1.11.4.custom/images/ui-icons_222222_256x240.png b/branch/4.04/jquery-ui-1.11.4.custom/images/ui-icons_222222_256x240.png new file mode 100644 index 0000000000000000000000000000000000000000..e9c8e16ac5e7f61c843fbac290ce30c5de7e40b6 Binary files /dev/null and b/branch/4.04/jquery-ui-1.11.4.custom/images/ui-icons_222222_256x240.png differ diff --git a/branch/4.04/jquery-ui-1.11.4.custom/images/ui-icons_228ef1_256x240.png b/branch/4.04/jquery-ui-1.11.4.custom/images/ui-icons_228ef1_256x240.png new file mode 100644 index 0000000000000000000000000000000000000000..8d68c543e056482edc5b48a09a73de2636d5580f Binary files /dev/null and b/branch/4.04/jquery-ui-1.11.4.custom/images/ui-icons_228ef1_256x240.png differ diff --git a/branch/4.04/jquery-ui-1.11.4.custom/images/ui-icons_ef8c08_256x240.png b/branch/4.04/jquery-ui-1.11.4.custom/images/ui-icons_ef8c08_256x240.png new file mode 100644 index 0000000000000000000000000000000000000000..18bbfe8215ac92fa1edd1f21a72bb6b14b4fa39d Binary files /dev/null and b/branch/4.04/jquery-ui-1.11.4.custom/images/ui-icons_ef8c08_256x240.png differ diff --git a/branch/4.04/jquery-ui-1.11.4.custom/images/ui-icons_ffd27a_256x240.png b/branch/4.04/jquery-ui-1.11.4.custom/images/ui-icons_ffd27a_256x240.png new file mode 100644 index 0000000000000000000000000000000000000000..4435b497eb4f472cbb1bd75616da555f6d49d082 Binary files /dev/null and b/branch/4.04/jquery-ui-1.11.4.custom/images/ui-icons_ffd27a_256x240.png differ diff --git a/branch/4.04/jquery-ui-1.11.4.custom/images/ui-icons_ffffff_256x240.png b/branch/4.04/jquery-ui-1.11.4.custom/images/ui-icons_ffffff_256x240.png new file mode 100644 index 0000000000000000000000000000000000000000..4d66f596e5967a460a37526e2130a55711eeca3c Binary files /dev/null and b/branch/4.04/jquery-ui-1.11.4.custom/images/ui-icons_ffffff_256x240.png differ diff --git a/branch/4.04/jquery-ui-1.11.4.custom/index.html b/branch/4.04/jquery-ui-1.11.4.custom/index.html new file mode 100644 index 0000000000000000000000000000000000000000..b878272bca58383378db3eedada7efcb6033545c --- /dev/null +++ b/branch/4.04/jquery-ui-1.11.4.custom/index.html @@ -0,0 +1,513 @@ +<!doctype html> +<html lang="us"> +<head> + <meta charset="utf-8"> + <title>jQuery UI Example Page</title> + <link href="jquery-ui.css" rel="stylesheet"> + <style> + body{ + font: 62.5% "Trebuchet MS", sans-serif; + margin: 50px; + } + .demoHeaders { + margin-top: 2em; + } + #dialog-link { + padding: .4em 1em .4em 20px; + text-decoration: none; + position: relative; + } + #dialog-link span.ui-icon { + margin: 0 5px 0 0; + position: absolute; + left: .2em; + top: 50%; + margin-top: -8px; + } + #icons { + margin: 0; + padding: 0; + } + #icons li { + margin: 2px; + position: relative; + padding: 4px 0; + cursor: pointer; + float: left; + list-style: none; + } + #icons span.ui-icon { + float: left; + margin: 0 4px; + } + .fakewindowcontain .ui-widget-overlay { + position: absolute; + } + select { + width: 200px; + } + </style> +</head> +<body> + +<h1>Welcome to jQuery UI!</h1> + +<div class="ui-widget"> + <p>This page demonstrates the widgets and theme you selected in Download Builder. Please make sure you are using them with a compatible jQuery version.</p> +</div> + +<h1>YOUR COMPONENTS:</h1> + + +<!-- Accordion --> +<h2 class="demoHeaders">Accordion</h2> +<div id="accordion"> + <h3>First</h3> + <div>Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.</div> + <h3>Second</h3> + <div>Phasellus mattis tincidunt nibh.</div> + <h3>Third</h3> + <div>Nam dui erat, auctor a, dignissim quis.</div> +</div> + + + +<!-- Autocomplete --> +<h2 class="demoHeaders">Autocomplete</h2> +<div> + <input id="autocomplete" title="type "a""> +</div> + + + +<!-- Button --> +<h2 class="demoHeaders">Button</h2> +<button id="button">A button element</button> +<form style="margin-top: 1em;"> + <div id="radioset"> + <input type="radio" id="radio1" name="radio"><label for="radio1">Choice 1</label> + <input type="radio" id="radio2" name="radio" checked="checked"><label for="radio2">Choice 2</label> + <input type="radio" id="radio3" name="radio"><label for="radio3">Choice 3</label> + </div> +</form> + + + +<!-- Tabs --> +<h2 class="demoHeaders">Tabs</h2> +<div id="tabs"> + <ul> + <li><a href="#tabs-1">First</a></li> + <li><a href="#tabs-2">Second</a></li> + <li><a href="#tabs-3">Third</a></li> + </ul> + <div id="tabs-1">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</div> + <div id="tabs-2">Phasellus mattis tincidunt nibh. Cras orci urna, blandit id, pretium vel, aliquet ornare, felis. Maecenas scelerisque sem non nisl. Fusce sed lorem in enim dictum bibendum.</div> + <div id="tabs-3">Nam dui erat, auctor a, dignissim quis, sollicitudin eu, felis. Pellentesque nisi urna, interdum eget, sagittis et, consequat vestibulum, lacus. Mauris porttitor ullamcorper augue.</div> +</div> + + + +<!-- Dialog NOTE: Dialog is not generated by UI in this demo so it can be visually styled in themeroller--> +<h2 class="demoHeaders">Dialog</h2> +<p><a href="#" id="dialog-link" class="ui-state-default ui-corner-all"><span class="ui-icon ui-icon-newwin"></span>Open Dialog</a></p> + +<h2 class="demoHeaders">Overlay and Shadow Classes <em>(not currently used in UI widgets)</em></h2> +<div style="position: relative; width: 96%; height: 200px; padding:1% 2%; overflow:hidden;" class="fakewindowcontain"> + <p>Lorem ipsum dolor sit amet, Nulla nec tortor. Donec id elit quis purus consectetur consequat. </p><p>Nam congue semper tellus. Sed erat dolor, dapibus sit amet, venenatis ornare, ultrices ut, nisi. Aliquam ante. Suspendisse scelerisque dui nec velit. Duis augue augue, gravida euismod, vulputate ac, facilisis id, sem. Morbi in orci. </p><p>Nulla purus lacus, pulvinar vel, malesuada ac, mattis nec, quam. Nam molestie scelerisque quam. Nullam feugiat cursus lacus.orem ipsum dolor sit amet, consectetur adipiscing elit. Donec libero risus, commodo vitae, pharetra mollis, posuere eu, pede. Nulla nec tortor. Donec id elit quis purus consectetur consequat. </p><p>Nam congue semper tellus. Sed erat dolor, dapibus sit amet, venenatis ornare, ultrices ut, nisi. Aliquam ante. Suspendisse scelerisque dui nec velit. Duis augue augue, gravida euismod, vulputate ac, facilisis id, sem. Morbi in orci. Nulla purus lacus, pulvinar vel, malesuada ac, mattis nec, quam. Nam molestie scelerisque quam. </p><p>Nullam feugiat cursus lacus.orem ipsum dolor sit amet, consectetur adipiscing elit. Donec libero risus, commodo vitae, pharetra mollis, posuere eu, pede. Nulla nec tortor. Donec id elit quis purus consectetur consequat. Nam congue semper tellus. Sed erat dolor, dapibus sit amet, venenatis ornare, ultrices ut, nisi. Aliquam ante. </p><p>Suspendisse scelerisque dui nec velit. Duis augue augue, gravida euismod, vulputate ac, facilisis id, sem. Morbi in orci. Nulla purus lacus, pulvinar vel, malesuada ac, mattis nec, quam. Nam molestie scelerisque quam. Nullam feugiat cursus lacus.orem ipsum dolor sit amet, consectetur adipiscing elit. Donec libero risus, commodo vitae, pharetra mollis, posuere eu, pede. Nulla nec tortor. Donec id elit quis purus consectetur consequat. Nam congue semper tellus. Sed erat dolor, dapibus sit amet, venenatis ornare, ultrices ut, nisi. </p> + + <!-- ui-dialog --> + <div class="ui-overlay"><div class="ui-widget-overlay"></div><div class="ui-widget-shadow ui-corner-all" style="width: 302px; height: 152px; position: absolute; left: 50px; top: 30px;"></div></div> + <div style="position: absolute; width: 280px; height: 130px;left: 50px; top: 30px; padding: 10px;" class="ui-widget ui-widget-content ui-corner-all"> + <div class="ui-dialog-content ui-widget-content" style="background: none; border: 0;"> + <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p> + </div> + </div> + +</div> + +<!-- ui-dialog --> +<div id="dialog" title="Dialog Title"> + <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p> +</div> + + + +<h2 class="demoHeaders">Framework Icons (content color preview)</h2> +<ul id="icons" class="ui-widget ui-helper-clearfix"> + <li class="ui-state-default ui-corner-all" title=".ui-icon-carat-1-n"><span class="ui-icon ui-icon-carat-1-n"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-carat-1-ne"><span class="ui-icon ui-icon-carat-1-ne"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-carat-1-e"><span class="ui-icon ui-icon-carat-1-e"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-carat-1-se"><span class="ui-icon ui-icon-carat-1-se"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-carat-1-s"><span class="ui-icon ui-icon-carat-1-s"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-carat-1-sw"><span class="ui-icon ui-icon-carat-1-sw"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-carat-1-w"><span class="ui-icon ui-icon-carat-1-w"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-carat-1-nw"><span class="ui-icon ui-icon-carat-1-nw"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-carat-2-n-s"><span class="ui-icon ui-icon-carat-2-n-s"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-carat-2-e-w"><span class="ui-icon ui-icon-carat-2-e-w"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-triangle-1-n"><span class="ui-icon ui-icon-triangle-1-n"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-triangle-1-ne"><span class="ui-icon ui-icon-triangle-1-ne"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-triangle-1-e"><span class="ui-icon ui-icon-triangle-1-e"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-triangle-1-se"><span class="ui-icon ui-icon-triangle-1-se"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-triangle-1-s"><span class="ui-icon ui-icon-triangle-1-s"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-triangle-1-sw"><span class="ui-icon ui-icon-triangle-1-sw"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-triangle-1-w"><span class="ui-icon ui-icon-triangle-1-w"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-triangle-1-nw"><span class="ui-icon ui-icon-triangle-1-nw"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-triangle-2-n-s"><span class="ui-icon ui-icon-triangle-2-n-s"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-triangle-2-e-w"><span class="ui-icon ui-icon-triangle-2-e-w"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-1-n"><span class="ui-icon ui-icon-arrow-1-n"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-1-ne"><span class="ui-icon ui-icon-arrow-1-ne"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-1-e"><span class="ui-icon ui-icon-arrow-1-e"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-1-se"><span class="ui-icon ui-icon-arrow-1-se"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-1-s"><span class="ui-icon ui-icon-arrow-1-s"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-1-sw"><span class="ui-icon ui-icon-arrow-1-sw"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-1-w"><span class="ui-icon ui-icon-arrow-1-w"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-1-nw"><span class="ui-icon ui-icon-arrow-1-nw"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-2-n-s"><span class="ui-icon ui-icon-arrow-2-n-s"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-2-ne-sw"><span class="ui-icon ui-icon-arrow-2-ne-sw"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-2-e-w"><span class="ui-icon ui-icon-arrow-2-e-w"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-2-se-nw"><span class="ui-icon ui-icon-arrow-2-se-nw"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowstop-1-n"><span class="ui-icon ui-icon-arrowstop-1-n"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowstop-1-e"><span class="ui-icon ui-icon-arrowstop-1-e"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowstop-1-s"><span class="ui-icon ui-icon-arrowstop-1-s"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowstop-1-w"><span class="ui-icon ui-icon-arrowstop-1-w"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-1-n"><span class="ui-icon ui-icon-arrowthick-1-n"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-1-ne"><span class="ui-icon ui-icon-arrowthick-1-ne"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-1-e"><span class="ui-icon ui-icon-arrowthick-1-e"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-1-se"><span class="ui-icon ui-icon-arrowthick-1-se"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-1-s"><span class="ui-icon ui-icon-arrowthick-1-s"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-1-sw"><span class="ui-icon ui-icon-arrowthick-1-sw"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-1-w"><span class="ui-icon ui-icon-arrowthick-1-w"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-1-nw"><span class="ui-icon ui-icon-arrowthick-1-nw"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-2-n-s"><span class="ui-icon ui-icon-arrowthick-2-n-s"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-2-ne-sw"><span class="ui-icon ui-icon-arrowthick-2-ne-sw"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-2-e-w"><span class="ui-icon ui-icon-arrowthick-2-e-w"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-2-se-nw"><span class="ui-icon ui-icon-arrowthick-2-se-nw"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthickstop-1-n"><span class="ui-icon ui-icon-arrowthickstop-1-n"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthickstop-1-e"><span class="ui-icon ui-icon-arrowthickstop-1-e"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthickstop-1-s"><span class="ui-icon ui-icon-arrowthickstop-1-s"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthickstop-1-w"><span class="ui-icon ui-icon-arrowthickstop-1-w"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowreturnthick-1-w"><span class="ui-icon ui-icon-arrowreturnthick-1-w"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowreturnthick-1-n"><span class="ui-icon ui-icon-arrowreturnthick-1-n"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowreturnthick-1-e"><span class="ui-icon ui-icon-arrowreturnthick-1-e"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowreturnthick-1-s"><span class="ui-icon ui-icon-arrowreturnthick-1-s"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowreturn-1-w"><span class="ui-icon ui-icon-arrowreturn-1-w"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowreturn-1-n"><span class="ui-icon ui-icon-arrowreturn-1-n"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowreturn-1-e"><span class="ui-icon ui-icon-arrowreturn-1-e"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowreturn-1-s"><span class="ui-icon ui-icon-arrowreturn-1-s"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowrefresh-1-w"><span class="ui-icon ui-icon-arrowrefresh-1-w"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowrefresh-1-n"><span class="ui-icon ui-icon-arrowrefresh-1-n"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowrefresh-1-e"><span class="ui-icon ui-icon-arrowrefresh-1-e"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowrefresh-1-s"><span class="ui-icon ui-icon-arrowrefresh-1-s"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-4"><span class="ui-icon ui-icon-arrow-4"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-4-diag"><span class="ui-icon ui-icon-arrow-4-diag"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-extlink"><span class="ui-icon ui-icon-extlink"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-newwin"><span class="ui-icon ui-icon-newwin"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-refresh"><span class="ui-icon ui-icon-refresh"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-shuffle"><span class="ui-icon ui-icon-shuffle"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-transfer-e-w"><span class="ui-icon ui-icon-transfer-e-w"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-transferthick-e-w"><span class="ui-icon ui-icon-transferthick-e-w"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-folder-collapsed"><span class="ui-icon ui-icon-folder-collapsed"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-folder-open"><span class="ui-icon ui-icon-folder-open"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-document"><span class="ui-icon ui-icon-document"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-document-b"><span class="ui-icon ui-icon-document-b"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-note"><span class="ui-icon ui-icon-note"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-mail-closed"><span class="ui-icon ui-icon-mail-closed"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-mail-open"><span class="ui-icon ui-icon-mail-open"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-suitcase"><span class="ui-icon ui-icon-suitcase"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-comment"><span class="ui-icon ui-icon-comment"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-person"><span class="ui-icon ui-icon-person"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-print"><span class="ui-icon ui-icon-print"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-trash"><span class="ui-icon ui-icon-trash"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-locked"><span class="ui-icon ui-icon-locked"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-unlocked"><span class="ui-icon ui-icon-unlocked"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-bookmark"><span class="ui-icon ui-icon-bookmark"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-tag"><span class="ui-icon ui-icon-tag"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-home"><span class="ui-icon ui-icon-home"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-flag"><span class="ui-icon ui-icon-flag"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-calculator"><span class="ui-icon ui-icon-calculator"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-cart"><span class="ui-icon ui-icon-cart"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-pencil"><span class="ui-icon ui-icon-pencil"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-clock"><span class="ui-icon ui-icon-clock"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-disk"><span class="ui-icon ui-icon-disk"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-calendar"><span class="ui-icon ui-icon-calendar"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-zoomin"><span class="ui-icon ui-icon-zoomin"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-zoomout"><span class="ui-icon ui-icon-zoomout"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-search"><span class="ui-icon ui-icon-search"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-wrench"><span class="ui-icon ui-icon-wrench"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-gear"><span class="ui-icon ui-icon-gear"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-heart"><span class="ui-icon ui-icon-heart"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-star"><span class="ui-icon ui-icon-star"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-link"><span class="ui-icon ui-icon-link"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-cancel"><span class="ui-icon ui-icon-cancel"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-plus"><span class="ui-icon ui-icon-plus"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-plusthick"><span class="ui-icon ui-icon-plusthick"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-minus"><span class="ui-icon ui-icon-minus"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-minusthick"><span class="ui-icon ui-icon-minusthick"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-close"><span class="ui-icon ui-icon-close"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-closethick"><span class="ui-icon ui-icon-closethick"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-key"><span class="ui-icon ui-icon-key"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-lightbulb"><span class="ui-icon ui-icon-lightbulb"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-scissors"><span class="ui-icon ui-icon-scissors"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-clipboard"><span class="ui-icon ui-icon-clipboard"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-copy"><span class="ui-icon ui-icon-copy"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-contact"><span class="ui-icon ui-icon-contact"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-image"><span class="ui-icon ui-icon-image"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-video"><span class="ui-icon ui-icon-video"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-script"><span class="ui-icon ui-icon-script"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-alert"><span class="ui-icon ui-icon-alert"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-info"><span class="ui-icon ui-icon-info"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-notice"><span class="ui-icon ui-icon-notice"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-help"><span class="ui-icon ui-icon-help"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-check"><span class="ui-icon ui-icon-check"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-bullet"><span class="ui-icon ui-icon-bullet"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-radio-off"><span class="ui-icon ui-icon-radio-off"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-radio-on"><span class="ui-icon ui-icon-radio-on"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-pin-w"><span class="ui-icon ui-icon-pin-w"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-pin-s"><span class="ui-icon ui-icon-pin-s"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-play"><span class="ui-icon ui-icon-play"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-pause"><span class="ui-icon ui-icon-pause"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-seek-next"><span class="ui-icon ui-icon-seek-next"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-seek-prev"><span class="ui-icon ui-icon-seek-prev"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-seek-end"><span class="ui-icon ui-icon-seek-end"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-seek-first"><span class="ui-icon ui-icon-seek-first"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-stop"><span class="ui-icon ui-icon-stop"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-eject"><span class="ui-icon ui-icon-eject"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-volume-off"><span class="ui-icon ui-icon-volume-off"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-volume-on"><span class="ui-icon ui-icon-volume-on"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-power"><span class="ui-icon ui-icon-power"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-signal-diag"><span class="ui-icon ui-icon-signal-diag"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-signal"><span class="ui-icon ui-icon-signal"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-battery-0"><span class="ui-icon ui-icon-battery-0"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-battery-1"><span class="ui-icon ui-icon-battery-1"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-battery-2"><span class="ui-icon ui-icon-battery-2"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-battery-3"><span class="ui-icon ui-icon-battery-3"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-circle-plus"><span class="ui-icon ui-icon-circle-plus"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-circle-minus"><span class="ui-icon ui-icon-circle-minus"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-circle-close"><span class="ui-icon ui-icon-circle-close"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-circle-triangle-e"><span class="ui-icon ui-icon-circle-triangle-e"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-circle-triangle-s"><span class="ui-icon ui-icon-circle-triangle-s"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-circle-triangle-w"><span class="ui-icon ui-icon-circle-triangle-w"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-circle-triangle-n"><span class="ui-icon ui-icon-circle-triangle-n"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-circle-arrow-e"><span class="ui-icon ui-icon-circle-arrow-e"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-circle-arrow-s"><span class="ui-icon ui-icon-circle-arrow-s"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-circle-arrow-w"><span class="ui-icon ui-icon-circle-arrow-w"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-circle-arrow-n"><span class="ui-icon ui-icon-circle-arrow-n"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-circle-zoomin"><span class="ui-icon ui-icon-circle-zoomin"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-circle-zoomout"><span class="ui-icon ui-icon-circle-zoomout"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-circle-check"><span class="ui-icon ui-icon-circle-check"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-circlesmall-plus"><span class="ui-icon ui-icon-circlesmall-plus"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-circlesmall-minus"><span class="ui-icon ui-icon-circlesmall-minus"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-circlesmall-close"><span class="ui-icon ui-icon-circlesmall-close"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-squaresmall-plus"><span class="ui-icon ui-icon-squaresmall-plus"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-squaresmall-minus"><span class="ui-icon ui-icon-squaresmall-minus"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-squaresmall-close"><span class="ui-icon ui-icon-squaresmall-close"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-grip-dotted-vertical"><span class="ui-icon ui-icon-grip-dotted-vertical"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-grip-dotted-horizontal"><span class="ui-icon ui-icon-grip-dotted-horizontal"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-grip-solid-vertical"><span class="ui-icon ui-icon-grip-solid-vertical"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-grip-solid-horizontal"><span class="ui-icon ui-icon-grip-solid-horizontal"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-gripsmall-diagonal-se"><span class="ui-icon ui-icon-gripsmall-diagonal-se"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-grip-diagonal-se"><span class="ui-icon ui-icon-grip-diagonal-se"></span></li> +</ul> + + +<!-- Slider --> +<h2 class="demoHeaders">Slider</h2> +<div id="slider"></div> + + + +<!-- Datepicker --> +<h2 class="demoHeaders">Datepicker</h2> +<div id="datepicker"></div> + + + +<!-- Progressbar --> +<h2 class="demoHeaders">Progressbar</h2> +<div id="progressbar"></div> + + + +<!-- Progressbar --> +<h2 class="demoHeaders">Selectmenu</h2> +<select id="selectmenu"> + <option>Slower</option> + <option>Slow</option> + <option selected="selected">Medium</option> + <option>Fast</option> + <option>Faster</option> +</select> + + + +<!-- Spinner --> +<h2 class="demoHeaders">Spinner</h2> +<input id="spinner"> + + + +<!-- Menu --> +<h2 class="demoHeaders">Menu</h2> +<ul style="width:100px;" id="menu"> + <li>Item 1</li> + <li>Item 2</li> + <li>Item 3 + <ul> + <li>Item 3-1</li> + <li>Item 3-2</li> + <li>Item 3-3</li> + <li>Item 3-4</li> + <li>Item 3-5</li> + </ul> + </li> + <li>Item 4</li> + <li>Item 5</li> +</ul> + + + +<!-- Tooltip --> +<h2 class="demoHeaders">Tooltip</h2> +<p id="tooltip"> + <a href="#" title="That's what this widget is">Tooltips</a> can be attached to any element. When you hover +the element with your mouse, the title attribute is displayed in a little box next to the element, just like a native tooltip. +</p> + + +<!-- Highlight / Error --> +<h2 class="demoHeaders">Highlight / Error</h2> +<div class="ui-widget"> + <div class="ui-state-highlight ui-corner-all" style="margin-top: 20px; padding: 0 .7em;"> + <p><span class="ui-icon ui-icon-info" style="float: left; margin-right: .3em;"></span> + <strong>Hey!</strong> Sample ui-state-highlight style.</p> + </div> +</div> +<br> +<div class="ui-widget"> + <div class="ui-state-error ui-corner-all" style="padding: 0 .7em;"> + <p><span class="ui-icon ui-icon-alert" style="float: left; margin-right: .3em;"></span> + <strong>Alert:</strong> Sample ui-state-error style.</p> + </div> +</div> + +<script src="external/jquery/jquery.js"></script> +<script src="jquery-ui.js"></script> +<script> + +$( "#accordion" ).accordion(); + + + +var availableTags = [ + "ActionScript", + "AppleScript", + "Asp", + "BASIC", + "C", + "C++", + "Clojure", + "COBOL", + "ColdFusion", + "Erlang", + "Fortran", + "Groovy", + "Haskell", + "Java", + "JavaScript", + "Lisp", + "Perl", + "PHP", + "Python", + "Ruby", + "Scala", + "Scheme" +]; +$( "#autocomplete" ).autocomplete({ + source: availableTags +}); + + + +$( "#button" ).button(); +$( "#radioset" ).buttonset(); + + + +$( "#tabs" ).tabs(); + + + +$( "#dialog" ).dialog({ + autoOpen: false, + width: 400, + buttons: [ + { + text: "Ok", + click: function() { + $( this ).dialog( "close" ); + } + }, + { + text: "Cancel", + click: function() { + $( this ).dialog( "close" ); + } + } + ] +}); + +// Link to open the dialog +$( "#dialog-link" ).click(function( event ) { + $( "#dialog" ).dialog( "open" ); + event.preventDefault(); +}); + + + +$( "#datepicker" ).datepicker({ + inline: true +}); + + + +$( "#slider" ).slider({ + range: true, + values: [ 17, 67 ] +}); + + + +$( "#progressbar" ).progressbar({ + value: 20 +}); + + + +$( "#spinner" ).spinner(); + + + +$( "#menu" ).menu(); + + + +$( "#tooltip" ).tooltip(); + + + +$( "#selectmenu" ).selectmenu(); + + +// Hover states on the static widgets +$( "#dialog-link, #icons li" ).hover( + function() { + $( this ).addClass( "ui-state-hover" ); + }, + function() { + $( this ).removeClass( "ui-state-hover" ); + } +); +</script> +</body> +</html> diff --git a/branch/4.04/jquery-ui-1.11.4.custom/jquery-ui.css b/branch/4.04/jquery-ui-1.11.4.custom/jquery-ui.css new file mode 100644 index 0000000000000000000000000000000000000000..0c21b586e9833285927d82e04cef315d319cfbd1 --- /dev/null +++ b/branch/4.04/jquery-ui-1.11.4.custom/jquery-ui.css @@ -0,0 +1,1225 @@ +/*! jQuery UI - v1.11.4 - 2015-05-12 +* http://jqueryui.com +* Includes: core.css, draggable.css, resizable.css, selectable.css, sortable.css, accordion.css, autocomplete.css, button.css, datepicker.css, dialog.css, menu.css, progressbar.css, selectmenu.css, slider.css, spinner.css, tabs.css, tooltip.css, theme.css +* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Trebuchet%20MS%2CTahoma%2CVerdana%2CArial%2Csans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=f6a828&bgTextureHeader=gloss_wave&bgImgOpacityHeader=35&borderColorHeader=e78f08&fcHeader=ffffff&iconColorHeader=ffffff&bgColorContent=eeeeee&bgTextureContent=highlight_soft&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=333333&iconColorContent=222222&bgColorDefault=f6f6f6&bgTextureDefault=glass&bgImgOpacityDefault=100&borderColorDefault=cccccc&fcDefault=1c94c4&iconColorDefault=ef8c08&bgColorHover=fdf5ce&bgTextureHover=glass&bgImgOpacityHover=100&borderColorHover=fbcb09&fcHover=c77405&iconColorHover=ef8c08&bgColorActive=ffffff&bgTextureActive=glass&bgImgOpacityActive=65&borderColorActive=fbd850&fcActive=eb8f00&iconColorActive=ef8c08&bgColorHighlight=ffe45c&bgTextureHighlight=highlight_soft&bgImgOpacityHighlight=75&borderColorHighlight=fed22f&fcHighlight=363636&iconColorHighlight=228ef1&bgColorError=b81900&bgTextureError=diagonals_thick&bgImgOpacityError=18&borderColorError=cd0a0a&fcError=ffffff&iconColorError=ffd27a&bgColorOverlay=666666&bgTextureOverlay=diagonals_thick&bgImgOpacityOverlay=20&opacityOverlay=50&bgColorShadow=000000&bgTextureShadow=flat&bgImgOpacityShadow=10&opacityShadow=20&thicknessShadow=5px&offsetTopShadow=-5px&offsetLeftShadow=-5px&cornerRadiusShadow=5px +* Copyright 2015 jQuery Foundation and other contributors; Licensed MIT */ + +/* Layout helpers +----------------------------------*/ +.ui-helper-hidden { + display: none; +} +.ui-helper-hidden-accessible { + border: 0; + clip: rect(0 0 0 0); + height: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute; + width: 1px; +} +.ui-helper-reset { + margin: 0; + padding: 0; + border: 0; + outline: 0; + line-height: 1.3; + text-decoration: none; + font-size: 100%; + list-style: none; +} +.ui-helper-clearfix:before, +.ui-helper-clearfix:after { + content: ""; + display: table; + border-collapse: collapse; +} +.ui-helper-clearfix:after { + clear: both; +} +.ui-helper-clearfix { + min-height: 0; /* support: IE7 */ +} +.ui-helper-zfix { + width: 100%; + height: 100%; + top: 0; + left: 0; + position: absolute; + opacity: 0; + filter:Alpha(Opacity=0); /* support: IE8 */ +} + +.ui-front { + z-index: 100; +} + + +/* Interaction Cues +----------------------------------*/ +.ui-state-disabled { + cursor: default !important; +} + + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { + display: block; + text-indent: -99999px; + overflow: hidden; + background-repeat: no-repeat; +} + + +/* Misc visuals +----------------------------------*/ + +/* Overlays */ +.ui-widget-overlay { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; +} +.ui-draggable-handle { + -ms-touch-action: none; + touch-action: none; +} +.ui-resizable { + position: relative; +} +.ui-resizable-handle { + position: absolute; + font-size: 0.1px; + display: block; + -ms-touch-action: none; + touch-action: none; +} +.ui-resizable-disabled .ui-resizable-handle, +.ui-resizable-autohide .ui-resizable-handle { + display: none; +} +.ui-resizable-n { + cursor: n-resize; + height: 7px; + width: 100%; + top: -5px; + left: 0; +} +.ui-resizable-s { + cursor: s-resize; + height: 7px; + width: 100%; + bottom: -5px; + left: 0; +} +.ui-resizable-e { + cursor: e-resize; + width: 7px; + right: -5px; + top: 0; + height: 100%; +} +.ui-resizable-w { + cursor: w-resize; + width: 7px; + left: -5px; + top: 0; + height: 100%; +} +.ui-resizable-se { + cursor: se-resize; + width: 12px; + height: 12px; + right: 1px; + bottom: 1px; +} +.ui-resizable-sw { + cursor: sw-resize; + width: 9px; + height: 9px; + left: -5px; + bottom: -5px; +} +.ui-resizable-nw { + cursor: nw-resize; + width: 9px; + height: 9px; + left: -5px; + top: -5px; +} +.ui-resizable-ne { + cursor: ne-resize; + width: 9px; + height: 9px; + right: -5px; + top: -5px; +} +.ui-selectable { + -ms-touch-action: none; + touch-action: none; +} +.ui-selectable-helper { + position: absolute; + z-index: 100; + border: 1px dotted black; +} +.ui-sortable-handle { + -ms-touch-action: none; + touch-action: none; +} +.ui-accordion .ui-accordion-header { + display: block; + cursor: pointer; + position: relative; + margin: 2px 0 0 0; + padding: .5em .5em .5em .7em; + min-height: 0; /* support: IE7 */ + font-size: 100%; +} +.ui-accordion .ui-accordion-icons { + padding-left: 2.2em; +} +.ui-accordion .ui-accordion-icons .ui-accordion-icons { + padding-left: 2.2em; +} +.ui-accordion .ui-accordion-header .ui-accordion-header-icon { + position: absolute; + left: .5em; + top: 50%; + margin-top: -8px; +} +.ui-accordion .ui-accordion-content { + padding: 1em 2.2em; + border-top: 0; + overflow: auto; +} +.ui-autocomplete { + position: absolute; + top: 0; + left: 0; + cursor: default; +} +.ui-button { + display: inline-block; + position: relative; + padding: 0; + line-height: normal; + margin-right: .1em; + cursor: pointer; + vertical-align: middle; + text-align: center; + overflow: visible; /* removes extra width in IE */ +} +.ui-button, +.ui-button:link, +.ui-button:visited, +.ui-button:hover, +.ui-button:active { + text-decoration: none; +} +/* to make room for the icon, a width needs to be set here */ +.ui-button-icon-only { + width: 2.2em; +} +/* button elements seem to need a little more width */ +button.ui-button-icon-only { + width: 2.4em; +} +.ui-button-icons-only { + width: 3.4em; +} +button.ui-button-icons-only { + width: 3.7em; +} + +/* button text element */ +.ui-button .ui-button-text { + display: block; + line-height: normal; +} +.ui-button-text-only .ui-button-text { + padding: .4em 1em; +} +.ui-button-icon-only .ui-button-text, +.ui-button-icons-only .ui-button-text { + padding: .4em; + text-indent: -9999999px; +} +.ui-button-text-icon-primary .ui-button-text, +.ui-button-text-icons .ui-button-text { + padding: .4em 1em .4em 2.1em; +} +.ui-button-text-icon-secondary .ui-button-text, +.ui-button-text-icons .ui-button-text { + padding: .4em 2.1em .4em 1em; +} +.ui-button-text-icons .ui-button-text { + padding-left: 2.1em; + padding-right: 2.1em; +} +/* no icon support for input elements, provide padding by default */ +input.ui-button { + padding: .4em 1em; +} + +/* button icon element(s) */ +.ui-button-icon-only .ui-icon, +.ui-button-text-icon-primary .ui-icon, +.ui-button-text-icon-secondary .ui-icon, +.ui-button-text-icons .ui-icon, +.ui-button-icons-only .ui-icon { + position: absolute; + top: 50%; + margin-top: -8px; +} +.ui-button-icon-only .ui-icon { + left: 50%; + margin-left: -8px; +} +.ui-button-text-icon-primary .ui-button-icon-primary, +.ui-button-text-icons .ui-button-icon-primary, +.ui-button-icons-only .ui-button-icon-primary { + left: .5em; +} +.ui-button-text-icon-secondary .ui-button-icon-secondary, +.ui-button-text-icons .ui-button-icon-secondary, +.ui-button-icons-only .ui-button-icon-secondary { + right: .5em; +} + +/* button sets */ +.ui-buttonset { + margin-right: 7px; +} +.ui-buttonset .ui-button { + margin-left: 0; + margin-right: -.3em; +} + +/* workarounds */ +/* reset extra padding in Firefox, see h5bp.com/l */ +input.ui-button::-moz-focus-inner, +button.ui-button::-moz-focus-inner { + border: 0; + padding: 0; +} +.ui-datepicker { + width: 17em; + padding: .2em .2em 0; + display: none; +} +.ui-datepicker .ui-datepicker-header { + position: relative; + padding: .2em 0; +} +.ui-datepicker .ui-datepicker-prev, +.ui-datepicker .ui-datepicker-next { + position: absolute; + top: 2px; + width: 1.8em; + height: 1.8em; +} +.ui-datepicker .ui-datepicker-prev-hover, +.ui-datepicker .ui-datepicker-next-hover { + top: 1px; +} +.ui-datepicker .ui-datepicker-prev { + left: 2px; +} +.ui-datepicker .ui-datepicker-next { + right: 2px; +} +.ui-datepicker .ui-datepicker-prev-hover { + left: 1px; +} +.ui-datepicker .ui-datepicker-next-hover { + right: 1px; +} +.ui-datepicker .ui-datepicker-prev span, +.ui-datepicker .ui-datepicker-next span { + display: block; + position: absolute; + left: 50%; + margin-left: -8px; + top: 50%; + margin-top: -8px; +} +.ui-datepicker .ui-datepicker-title { + margin: 0 2.3em; + line-height: 1.8em; + text-align: center; +} +.ui-datepicker .ui-datepicker-title select { + font-size: 1em; + margin: 1px 0; +} +.ui-datepicker select.ui-datepicker-month, +.ui-datepicker select.ui-datepicker-year { + width: 45%; +} +.ui-datepicker table { + width: 100%; + font-size: .9em; + border-collapse: collapse; + margin: 0 0 .4em; +} +.ui-datepicker th { + padding: .7em .3em; + text-align: center; + font-weight: bold; + border: 0; +} +.ui-datepicker td { + border: 0; + padding: 1px; +} +.ui-datepicker td span, +.ui-datepicker td a { + display: block; + padding: .2em; + text-align: right; + text-decoration: none; +} +.ui-datepicker .ui-datepicker-buttonpane { + background-image: none; + margin: .7em 0 0 0; + padding: 0 .2em; + border-left: 0; + border-right: 0; + border-bottom: 0; +} +.ui-datepicker .ui-datepicker-buttonpane button { + float: right; + margin: .5em .2em .4em; + cursor: pointer; + padding: .2em .6em .3em .6em; + width: auto; + overflow: visible; +} +.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { + float: left; +} + +/* with multiple calendars */ +.ui-datepicker.ui-datepicker-multi { + width: auto; +} +.ui-datepicker-multi .ui-datepicker-group { + float: left; +} +.ui-datepicker-multi .ui-datepicker-group table { + width: 95%; + margin: 0 auto .4em; +} +.ui-datepicker-multi-2 .ui-datepicker-group { + width: 50%; +} +.ui-datepicker-multi-3 .ui-datepicker-group { + width: 33.3%; +} +.ui-datepicker-multi-4 .ui-datepicker-group { + width: 25%; +} +.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header, +.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { + border-left-width: 0; +} +.ui-datepicker-multi .ui-datepicker-buttonpane { + clear: left; +} +.ui-datepicker-row-break { + clear: both; + width: 100%; + font-size: 0; +} + +/* RTL support */ +.ui-datepicker-rtl { + direction: rtl; +} +.ui-datepicker-rtl .ui-datepicker-prev { + right: 2px; + left: auto; +} +.ui-datepicker-rtl .ui-datepicker-next { + left: 2px; + right: auto; +} +.ui-datepicker-rtl .ui-datepicker-prev:hover { + right: 1px; + left: auto; +} +.ui-datepicker-rtl .ui-datepicker-next:hover { + left: 1px; + right: auto; +} +.ui-datepicker-rtl .ui-datepicker-buttonpane { + clear: right; +} +.ui-datepicker-rtl .ui-datepicker-buttonpane button { + float: left; +} +.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current, +.ui-datepicker-rtl .ui-datepicker-group { + float: right; +} +.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header, +.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { + border-right-width: 0; + border-left-width: 1px; +} +.ui-dialog { + overflow: hidden; + position: absolute; + top: 0; + left: 0; + padding: .2em; + outline: 0; +} +.ui-dialog .ui-dialog-titlebar { + padding: .4em 1em; + position: relative; +} +.ui-dialog .ui-dialog-title { + float: left; + margin: .1em 0; + white-space: nowrap; + width: 90%; + overflow: hidden; + text-overflow: ellipsis; +} +.ui-dialog .ui-dialog-titlebar-close { + position: absolute; + right: .3em; + top: 50%; + width: 20px; + margin: -10px 0 0 0; + padding: 1px; + height: 20px; +} +.ui-dialog .ui-dialog-content { + position: relative; + border: 0; + padding: .5em 1em; + background: none; + overflow: auto; +} +.ui-dialog .ui-dialog-buttonpane { + text-align: left; + border-width: 1px 0 0 0; + background-image: none; + margin-top: .5em; + padding: .3em 1em .5em .4em; +} +.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { + float: right; +} +.ui-dialog .ui-dialog-buttonpane button { + margin: .5em .4em .5em 0; + cursor: pointer; +} +.ui-dialog .ui-resizable-se { + width: 12px; + height: 12px; + right: -5px; + bottom: -5px; + background-position: 16px 16px; +} +.ui-draggable .ui-dialog-titlebar { + cursor: move; +} +.ui-menu { + list-style: none; + padding: 0; + margin: 0; + display: block; + outline: none; +} +.ui-menu .ui-menu { + position: absolute; +} +.ui-menu .ui-menu-item { + position: relative; + margin: 0; + padding: 3px 1em 3px .4em; + cursor: pointer; + min-height: 0; /* support: IE7 */ + /* support: IE10, see #8844 */ + list-style-image: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"); +} +.ui-menu .ui-menu-divider { + margin: 5px 0; + height: 0; + font-size: 0; + line-height: 0; + border-width: 1px 0 0 0; +} +.ui-menu .ui-state-focus, +.ui-menu .ui-state-active { + margin: -1px; +} + +/* icon support */ +.ui-menu-icons { + position: relative; +} +.ui-menu-icons .ui-menu-item { + padding-left: 2em; +} + +/* left-aligned */ +.ui-menu .ui-icon { + position: absolute; + top: 0; + bottom: 0; + left: .2em; + margin: auto 0; +} + +/* right-aligned */ +.ui-menu .ui-menu-icon { + left: auto; + right: 0; +} +.ui-progressbar { + height: 2em; + text-align: left; + overflow: hidden; +} +.ui-progressbar .ui-progressbar-value { + margin: -1px; + height: 100%; +} +.ui-progressbar .ui-progressbar-overlay { + background: url("data:image/gif;base64,R0lGODlhKAAoAIABAAAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh+QQJAQABACwAAAAAKAAoAAACkYwNqXrdC52DS06a7MFZI+4FHBCKoDeWKXqymPqGqxvJrXZbMx7Ttc+w9XgU2FB3lOyQRWET2IFGiU9m1frDVpxZZc6bfHwv4c1YXP6k1Vdy292Fb6UkuvFtXpvWSzA+HycXJHUXiGYIiMg2R6W459gnWGfHNdjIqDWVqemH2ekpObkpOlppWUqZiqr6edqqWQAAIfkECQEAAQAsAAAAACgAKAAAApSMgZnGfaqcg1E2uuzDmmHUBR8Qil95hiPKqWn3aqtLsS18y7G1SzNeowWBENtQd+T1JktP05nzPTdJZlR6vUxNWWjV+vUWhWNkWFwxl9VpZRedYcflIOLafaa28XdsH/ynlcc1uPVDZxQIR0K25+cICCmoqCe5mGhZOfeYSUh5yJcJyrkZWWpaR8doJ2o4NYq62lAAACH5BAkBAAEALAAAAAAoACgAAAKVDI4Yy22ZnINRNqosw0Bv7i1gyHUkFj7oSaWlu3ovC8GxNso5fluz3qLVhBVeT/Lz7ZTHyxL5dDalQWPVOsQWtRnuwXaFTj9jVVh8pma9JjZ4zYSj5ZOyma7uuolffh+IR5aW97cHuBUXKGKXlKjn+DiHWMcYJah4N0lYCMlJOXipGRr5qdgoSTrqWSq6WFl2ypoaUAAAIfkECQEAAQAsAAAAACgAKAAAApaEb6HLgd/iO7FNWtcFWe+ufODGjRfoiJ2akShbueb0wtI50zm02pbvwfWEMWBQ1zKGlLIhskiEPm9R6vRXxV4ZzWT2yHOGpWMyorblKlNp8HmHEb/lCXjcW7bmtXP8Xt229OVWR1fod2eWqNfHuMjXCPkIGNileOiImVmCOEmoSfn3yXlJWmoHGhqp6ilYuWYpmTqKUgAAIfkECQEAAQAsAAAAACgAKAAAApiEH6kb58biQ3FNWtMFWW3eNVcojuFGfqnZqSebuS06w5V80/X02pKe8zFwP6EFWOT1lDFk8rGERh1TTNOocQ61Hm4Xm2VexUHpzjymViHrFbiELsefVrn6XKfnt2Q9G/+Xdie499XHd2g4h7ioOGhXGJboGAnXSBnoBwKYyfioubZJ2Hn0RuRZaflZOil56Zp6iioKSXpUAAAh+QQJAQABACwAAAAAKAAoAAACkoQRqRvnxuI7kU1a1UU5bd5tnSeOZXhmn5lWK3qNTWvRdQxP8qvaC+/yaYQzXO7BMvaUEmJRd3TsiMAgswmNYrSgZdYrTX6tSHGZO73ezuAw2uxuQ+BbeZfMxsexY35+/Qe4J1inV0g4x3WHuMhIl2jXOKT2Q+VU5fgoSUI52VfZyfkJGkha6jmY+aaYdirq+lQAACH5BAkBAAEALAAAAAAoACgAAAKWBIKpYe0L3YNKToqswUlvznigd4wiR4KhZrKt9Upqip61i9E3vMvxRdHlbEFiEXfk9YARYxOZZD6VQ2pUunBmtRXo1Lf8hMVVcNl8JafV38aM2/Fu5V16Bn63r6xt97j09+MXSFi4BniGFae3hzbH9+hYBzkpuUh5aZmHuanZOZgIuvbGiNeomCnaxxap2upaCZsq+1kAACH5BAkBAAEALAAAAAAoACgAAAKXjI8By5zf4kOxTVrXNVlv1X0d8IGZGKLnNpYtm8Lr9cqVeuOSvfOW79D9aDHizNhDJidFZhNydEahOaDH6nomtJjp1tutKoNWkvA6JqfRVLHU/QUfau9l2x7G54d1fl995xcIGAdXqMfBNadoYrhH+Mg2KBlpVpbluCiXmMnZ2Sh4GBqJ+ckIOqqJ6LmKSllZmsoq6wpQAAAh+QQJAQABACwAAAAAKAAoAAAClYx/oLvoxuJDkU1a1YUZbJ59nSd2ZXhWqbRa2/gF8Gu2DY3iqs7yrq+xBYEkYvFSM8aSSObE+ZgRl1BHFZNr7pRCavZ5BW2142hY3AN/zWtsmf12p9XxxFl2lpLn1rseztfXZjdIWIf2s5dItwjYKBgo9yg5pHgzJXTEeGlZuenpyPmpGQoKOWkYmSpaSnqKileI2FAAACH5BAkBAAEALAAAAAAoACgAAAKVjB+gu+jG4kORTVrVhRlsnn2dJ3ZleFaptFrb+CXmO9OozeL5VfP99HvAWhpiUdcwkpBH3825AwYdU8xTqlLGhtCosArKMpvfa1mMRae9VvWZfeB2XfPkeLmm18lUcBj+p5dnN8jXZ3YIGEhYuOUn45aoCDkp16hl5IjYJvjWKcnoGQpqyPlpOhr3aElaqrq56Bq7VAAAOw=="); + height: 100%; + filter: alpha(opacity=25); /* support: IE8 */ + opacity: 0.25; +} +.ui-progressbar-indeterminate .ui-progressbar-value { + background-image: none; +} +.ui-selectmenu-menu { + padding: 0; + margin: 0; + position: absolute; + top: 0; + left: 0; + display: none; +} +.ui-selectmenu-menu .ui-menu { + overflow: auto; + /* Support: IE7 */ + overflow-x: hidden; + padding-bottom: 1px; +} +.ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup { + font-size: 1em; + font-weight: bold; + line-height: 1.5; + padding: 2px 0.4em; + margin: 0.5em 0 0 0; + height: auto; + border: 0; +} +.ui-selectmenu-open { + display: block; +} +.ui-selectmenu-button { + display: inline-block; + overflow: hidden; + position: relative; + text-decoration: none; + cursor: pointer; +} +.ui-selectmenu-button span.ui-icon { + right: 0.5em; + left: auto; + margin-top: -8px; + position: absolute; + top: 50%; +} +.ui-selectmenu-button span.ui-selectmenu-text { + text-align: left; + padding: 0.4em 2.1em 0.4em 1em; + display: block; + line-height: 1.4; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.ui-slider { + position: relative; + text-align: left; +} +.ui-slider .ui-slider-handle { + position: absolute; + z-index: 2; + width: 1.2em; + height: 1.2em; + cursor: default; + -ms-touch-action: none; + touch-action: none; +} +.ui-slider .ui-slider-range { + position: absolute; + z-index: 1; + font-size: .7em; + display: block; + border: 0; + background-position: 0 0; +} + +/* support: IE8 - See #6727 */ +.ui-slider.ui-state-disabled .ui-slider-handle, +.ui-slider.ui-state-disabled .ui-slider-range { + filter: inherit; +} + +.ui-slider-horizontal { + height: .8em; +} +.ui-slider-horizontal .ui-slider-handle { + top: -.3em; + margin-left: -.6em; +} +.ui-slider-horizontal .ui-slider-range { + top: 0; + height: 100%; +} +.ui-slider-horizontal .ui-slider-range-min { + left: 0; +} +.ui-slider-horizontal .ui-slider-range-max { + right: 0; +} + +.ui-slider-vertical { + width: .8em; + height: 100px; +} +.ui-slider-vertical .ui-slider-handle { + left: -.3em; + margin-left: 0; + margin-bottom: -.6em; +} +.ui-slider-vertical .ui-slider-range { + left: 0; + width: 100%; +} +.ui-slider-vertical .ui-slider-range-min { + bottom: 0; +} +.ui-slider-vertical .ui-slider-range-max { + top: 0; +} +.ui-spinner { + position: relative; + display: inline-block; + overflow: hidden; + padding: 0; + vertical-align: middle; +} +.ui-spinner-input { + border: none; + background: none; + color: inherit; + padding: 0; + margin: .2em 0; + vertical-align: middle; + margin-left: .4em; + margin-right: 22px; +} +.ui-spinner-button { + width: 16px; + height: 50%; + font-size: .5em; + padding: 0; + margin: 0; + text-align: center; + position: absolute; + cursor: default; + display: block; + overflow: hidden; + right: 0; +} +/* more specificity required here to override default borders */ +.ui-spinner a.ui-spinner-button { + border-top: none; + border-bottom: none; + border-right: none; +} +/* vertically center icon */ +.ui-spinner .ui-icon { + position: absolute; + margin-top: -8px; + top: 50%; + left: 0; +} +.ui-spinner-up { + top: 0; +} +.ui-spinner-down { + bottom: 0; +} + +/* TR overrides */ +.ui-spinner .ui-icon-triangle-1-s { + /* need to fix icons sprite */ + background-position: -65px -16px; +} +.ui-tabs { + position: relative;/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ + padding: .2em; +} +.ui-tabs .ui-tabs-nav { + margin: 0; + padding: .2em .2em 0; +} +.ui-tabs .ui-tabs-nav li { + list-style: none; + float: left; + position: relative; + top: 0; + margin: 1px .2em 0 0; + border-bottom-width: 0; + padding: 0; + white-space: nowrap; +} +.ui-tabs .ui-tabs-nav .ui-tabs-anchor { + float: left; + padding: .5em 1em; + text-decoration: none; +} +.ui-tabs .ui-tabs-nav li.ui-tabs-active { + margin-bottom: -1px; + padding-bottom: 1px; +} +.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor, +.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor, +.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor { + cursor: text; +} +.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor { + cursor: pointer; +} +.ui-tabs .ui-tabs-panel { + display: block; + border-width: 0; + padding: 1em 1.4em; + background: none; +} +.ui-tooltip { + padding: 8px; + position: absolute; + z-index: 9999; + max-width: 300px; + -webkit-box-shadow: 0 0 5px #aaa; + box-shadow: 0 0 5px #aaa; +} +body .ui-tooltip { + border-width: 2px; +} + +/* Component containers +----------------------------------*/ +.ui-widget { + font-family: Trebuchet MS,Tahoma,Verdana,Arial,sans-serif; + font-size: 1.1em; +} +.ui-widget .ui-widget { + font-size: 1em; +} +.ui-widget input, +.ui-widget select, +.ui-widget textarea, +.ui-widget button { + font-family: Trebuchet MS,Tahoma,Verdana,Arial,sans-serif; + font-size: 1em; +} +.ui-widget-content { + border: 1px solid #dddddd; + background: #eeeeee url("images/ui-bg_highlight-soft_100_eeeeee_1x100.png") 50% top repeat-x; + color: #333333; +} +.ui-widget-content a { + color: #333333; +} +.ui-widget-header { + border: 1px solid #e78f08; + background: #f6a828 url("images/ui-bg_gloss-wave_35_f6a828_500x100.png") 50% 50% repeat-x; + color: #ffffff; + font-weight: bold; +} +.ui-widget-header a { + color: #ffffff; +} + +/* Interaction states +----------------------------------*/ +.ui-state-default, +.ui-widget-content .ui-state-default, +.ui-widget-header .ui-state-default { + border: 1px solid #cccccc; + background: #f6f6f6 url("images/ui-bg_glass_100_f6f6f6_1x400.png") 50% 50% repeat-x; + font-weight: bold; + color: #1c94c4; +} +.ui-state-default a, +.ui-state-default a:link, +.ui-state-default a:visited { + color: #1c94c4; + text-decoration: none; +} +.ui-state-hover, +.ui-widget-content .ui-state-hover, +.ui-widget-header .ui-state-hover, +.ui-state-focus, +.ui-widget-content .ui-state-focus, +.ui-widget-header .ui-state-focus { + border: 1px solid #fbcb09; + background: #fdf5ce url("images/ui-bg_glass_100_fdf5ce_1x400.png") 50% 50% repeat-x; + font-weight: bold; + color: #c77405; +} +.ui-state-hover a, +.ui-state-hover a:hover, +.ui-state-hover a:link, +.ui-state-hover a:visited, +.ui-state-focus a, +.ui-state-focus a:hover, +.ui-state-focus a:link, +.ui-state-focus a:visited { + color: #c77405; + text-decoration: none; +} +.ui-state-active, +.ui-widget-content .ui-state-active, +.ui-widget-header .ui-state-active { + border: 1px solid #fbd850; + background: #ffffff url("images/ui-bg_glass_65_ffffff_1x400.png") 50% 50% repeat-x; + font-weight: bold; + color: #eb8f00; +} +.ui-state-active a, +.ui-state-active a:link, +.ui-state-active a:visited { + color: #eb8f00; + text-decoration: none; +} + +/* Interaction Cues +----------------------------------*/ +.ui-state-highlight, +.ui-widget-content .ui-state-highlight, +.ui-widget-header .ui-state-highlight { + border: 1px solid #fed22f; + background: #ffe45c url("images/ui-bg_highlight-soft_75_ffe45c_1x100.png") 50% top repeat-x; + color: #363636; +} +.ui-state-highlight a, +.ui-widget-content .ui-state-highlight a, +.ui-widget-header .ui-state-highlight a { + color: #363636; +} +.ui-state-error, +.ui-widget-content .ui-state-error, +.ui-widget-header .ui-state-error { + border: 1px solid #cd0a0a; + background: #b81900 url("images/ui-bg_diagonals-thick_18_b81900_40x40.png") 50% 50% repeat; + color: #ffffff; +} +.ui-state-error a, +.ui-widget-content .ui-state-error a, +.ui-widget-header .ui-state-error a { + color: #ffffff; +} +.ui-state-error-text, +.ui-widget-content .ui-state-error-text, +.ui-widget-header .ui-state-error-text { + color: #ffffff; +} +.ui-priority-primary, +.ui-widget-content .ui-priority-primary, +.ui-widget-header .ui-priority-primary { + font-weight: bold; +} +.ui-priority-secondary, +.ui-widget-content .ui-priority-secondary, +.ui-widget-header .ui-priority-secondary { + opacity: .7; + filter:Alpha(Opacity=70); /* support: IE8 */ + font-weight: normal; +} +.ui-state-disabled, +.ui-widget-content .ui-state-disabled, +.ui-widget-header .ui-state-disabled { + opacity: .35; + filter:Alpha(Opacity=35); /* support: IE8 */ + background-image: none; +} +.ui-state-disabled .ui-icon { + filter:Alpha(Opacity=35); /* support: IE8 - See #6059 */ +} + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { + width: 16px; + height: 16px; +} +.ui-icon, +.ui-widget-content .ui-icon { + background-image: url("images/ui-icons_222222_256x240.png"); +} +.ui-widget-header .ui-icon { + background-image: url("images/ui-icons_ffffff_256x240.png"); +} +.ui-state-default .ui-icon { + background-image: url("images/ui-icons_ef8c08_256x240.png"); +} +.ui-state-hover .ui-icon, +.ui-state-focus .ui-icon { + background-image: url("images/ui-icons_ef8c08_256x240.png"); +} +.ui-state-active .ui-icon { + background-image: url("images/ui-icons_ef8c08_256x240.png"); +} +.ui-state-highlight .ui-icon { + background-image: url("images/ui-icons_228ef1_256x240.png"); +} +.ui-state-error .ui-icon, +.ui-state-error-text .ui-icon { + background-image: url("images/ui-icons_ffd27a_256x240.png"); +} + +/* positioning */ +.ui-icon-blank { background-position: 16px 16px; } +.ui-icon-carat-1-n { background-position: 0 0; } +.ui-icon-carat-1-ne { background-position: -16px 0; } +.ui-icon-carat-1-e { background-position: -32px 0; } +.ui-icon-carat-1-se { background-position: -48px 0; } +.ui-icon-carat-1-s { background-position: -64px 0; } +.ui-icon-carat-1-sw { background-position: -80px 0; } +.ui-icon-carat-1-w { background-position: -96px 0; } +.ui-icon-carat-1-nw { background-position: -112px 0; } +.ui-icon-carat-2-n-s { background-position: -128px 0; } +.ui-icon-carat-2-e-w { background-position: -144px 0; } +.ui-icon-triangle-1-n { background-position: 0 -16px; } +.ui-icon-triangle-1-ne { background-position: -16px -16px; } +.ui-icon-triangle-1-e { background-position: -32px -16px; } +.ui-icon-triangle-1-se { background-position: -48px -16px; } +.ui-icon-triangle-1-s { background-position: -64px -16px; } +.ui-icon-triangle-1-sw { background-position: -80px -16px; } +.ui-icon-triangle-1-w { background-position: -96px -16px; } +.ui-icon-triangle-1-nw { background-position: -112px -16px; } +.ui-icon-triangle-2-n-s { background-position: -128px -16px; } +.ui-icon-triangle-2-e-w { background-position: -144px -16px; } +.ui-icon-arrow-1-n { background-position: 0 -32px; } +.ui-icon-arrow-1-ne { background-position: -16px -32px; } +.ui-icon-arrow-1-e { background-position: -32px -32px; } +.ui-icon-arrow-1-se { background-position: -48px -32px; } +.ui-icon-arrow-1-s { background-position: -64px -32px; } +.ui-icon-arrow-1-sw { background-position: -80px -32px; } +.ui-icon-arrow-1-w { background-position: -96px -32px; } +.ui-icon-arrow-1-nw { background-position: -112px -32px; } +.ui-icon-arrow-2-n-s { background-position: -128px -32px; } +.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } +.ui-icon-arrow-2-e-w { background-position: -160px -32px; } +.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } +.ui-icon-arrowstop-1-n { background-position: -192px -32px; } +.ui-icon-arrowstop-1-e { background-position: -208px -32px; } +.ui-icon-arrowstop-1-s { background-position: -224px -32px; } +.ui-icon-arrowstop-1-w { background-position: -240px -32px; } +.ui-icon-arrowthick-1-n { background-position: 0 -48px; } +.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } +.ui-icon-arrowthick-1-e { background-position: -32px -48px; } +.ui-icon-arrowthick-1-se { background-position: -48px -48px; } +.ui-icon-arrowthick-1-s { background-position: -64px -48px; } +.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } +.ui-icon-arrowthick-1-w { background-position: -96px -48px; } +.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } +.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } +.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } +.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } +.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } +.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } +.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } +.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } +.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } +.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } +.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } +.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } +.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } +.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } +.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } +.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } +.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } +.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } +.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } +.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } +.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } +.ui-icon-arrow-4 { background-position: 0 -80px; } +.ui-icon-arrow-4-diag { background-position: -16px -80px; } +.ui-icon-extlink { background-position: -32px -80px; } +.ui-icon-newwin { background-position: -48px -80px; } +.ui-icon-refresh { background-position: -64px -80px; } +.ui-icon-shuffle { background-position: -80px -80px; } +.ui-icon-transfer-e-w { background-position: -96px -80px; } +.ui-icon-transferthick-e-w { background-position: -112px -80px; } +.ui-icon-folder-collapsed { background-position: 0 -96px; } +.ui-icon-folder-open { background-position: -16px -96px; } +.ui-icon-document { background-position: -32px -96px; } +.ui-icon-document-b { background-position: -48px -96px; } +.ui-icon-note { background-position: -64px -96px; } +.ui-icon-mail-closed { background-position: -80px -96px; } +.ui-icon-mail-open { background-position: -96px -96px; } +.ui-icon-suitcase { background-position: -112px -96px; } +.ui-icon-comment { background-position: -128px -96px; } +.ui-icon-person { background-position: -144px -96px; } +.ui-icon-print { background-position: -160px -96px; } +.ui-icon-trash { background-position: -176px -96px; } +.ui-icon-locked { background-position: -192px -96px; } +.ui-icon-unlocked { background-position: -208px -96px; } +.ui-icon-bookmark { background-position: -224px -96px; } +.ui-icon-tag { background-position: -240px -96px; } +.ui-icon-home { background-position: 0 -112px; } +.ui-icon-flag { background-position: -16px -112px; } +.ui-icon-calendar { background-position: -32px -112px; } +.ui-icon-cart { background-position: -48px -112px; } +.ui-icon-pencil { background-position: -64px -112px; } +.ui-icon-clock { background-position: -80px -112px; } +.ui-icon-disk { background-position: -96px -112px; } +.ui-icon-calculator { background-position: -112px -112px; } +.ui-icon-zoomin { background-position: -128px -112px; } +.ui-icon-zoomout { background-position: -144px -112px; } +.ui-icon-search { background-position: -160px -112px; } +.ui-icon-wrench { background-position: -176px -112px; } +.ui-icon-gear { background-position: -192px -112px; } +.ui-icon-heart { background-position: -208px -112px; } +.ui-icon-star { background-position: -224px -112px; } +.ui-icon-link { background-position: -240px -112px; } +.ui-icon-cancel { background-position: 0 -128px; } +.ui-icon-plus { background-position: -16px -128px; } +.ui-icon-plusthick { background-position: -32px -128px; } +.ui-icon-minus { background-position: -48px -128px; } +.ui-icon-minusthick { background-position: -64px -128px; } +.ui-icon-close { background-position: -80px -128px; } +.ui-icon-closethick { background-position: -96px -128px; } +.ui-icon-key { background-position: -112px -128px; } +.ui-icon-lightbulb { background-position: -128px -128px; } +.ui-icon-scissors { background-position: -144px -128px; } +.ui-icon-clipboard { background-position: -160px -128px; } +.ui-icon-copy { background-position: -176px -128px; } +.ui-icon-contact { background-position: -192px -128px; } +.ui-icon-image { background-position: -208px -128px; } +.ui-icon-video { background-position: -224px -128px; } +.ui-icon-script { background-position: -240px -128px; } +.ui-icon-alert { background-position: 0 -144px; } +.ui-icon-info { background-position: -16px -144px; } +.ui-icon-notice { background-position: -32px -144px; } +.ui-icon-help { background-position: -48px -144px; } +.ui-icon-check { background-position: -64px -144px; } +.ui-icon-bullet { background-position: -80px -144px; } +.ui-icon-radio-on { background-position: -96px -144px; } +.ui-icon-radio-off { background-position: -112px -144px; } +.ui-icon-pin-w { background-position: -128px -144px; } +.ui-icon-pin-s { background-position: -144px -144px; } +.ui-icon-play { background-position: 0 -160px; } +.ui-icon-pause { background-position: -16px -160px; } +.ui-icon-seek-next { background-position: -32px -160px; } +.ui-icon-seek-prev { background-position: -48px -160px; } +.ui-icon-seek-end { background-position: -64px -160px; } +.ui-icon-seek-start { background-position: -80px -160px; } +/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ +.ui-icon-seek-first { background-position: -80px -160px; } +.ui-icon-stop { background-position: -96px -160px; } +.ui-icon-eject { background-position: -112px -160px; } +.ui-icon-volume-off { background-position: -128px -160px; } +.ui-icon-volume-on { background-position: -144px -160px; } +.ui-icon-power { background-position: 0 -176px; } +.ui-icon-signal-diag { background-position: -16px -176px; } +.ui-icon-signal { background-position: -32px -176px; } +.ui-icon-battery-0 { background-position: -48px -176px; } +.ui-icon-battery-1 { background-position: -64px -176px; } +.ui-icon-battery-2 { background-position: -80px -176px; } +.ui-icon-battery-3 { background-position: -96px -176px; } +.ui-icon-circle-plus { background-position: 0 -192px; } +.ui-icon-circle-minus { background-position: -16px -192px; } +.ui-icon-circle-close { background-position: -32px -192px; } +.ui-icon-circle-triangle-e { background-position: -48px -192px; } +.ui-icon-circle-triangle-s { background-position: -64px -192px; } +.ui-icon-circle-triangle-w { background-position: -80px -192px; } +.ui-icon-circle-triangle-n { background-position: -96px -192px; } +.ui-icon-circle-arrow-e { background-position: -112px -192px; } +.ui-icon-circle-arrow-s { background-position: -128px -192px; } +.ui-icon-circle-arrow-w { background-position: -144px -192px; } +.ui-icon-circle-arrow-n { background-position: -160px -192px; } +.ui-icon-circle-zoomin { background-position: -176px -192px; } +.ui-icon-circle-zoomout { background-position: -192px -192px; } +.ui-icon-circle-check { background-position: -208px -192px; } +.ui-icon-circlesmall-plus { background-position: 0 -208px; } +.ui-icon-circlesmall-minus { background-position: -16px -208px; } +.ui-icon-circlesmall-close { background-position: -32px -208px; } +.ui-icon-squaresmall-plus { background-position: -48px -208px; } +.ui-icon-squaresmall-minus { background-position: -64px -208px; } +.ui-icon-squaresmall-close { background-position: -80px -208px; } +.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } +.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } +.ui-icon-grip-solid-vertical { background-position: -32px -224px; } +.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } +.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } +.ui-icon-grip-diagonal-se { background-position: -80px -224px; } + + +/* Misc visuals +----------------------------------*/ + +/* Corner radius */ +.ui-corner-all, +.ui-corner-top, +.ui-corner-left, +.ui-corner-tl { + border-top-left-radius: 4px; +} +.ui-corner-all, +.ui-corner-top, +.ui-corner-right, +.ui-corner-tr { + border-top-right-radius: 4px; +} +.ui-corner-all, +.ui-corner-bottom, +.ui-corner-left, +.ui-corner-bl { + border-bottom-left-radius: 4px; +} +.ui-corner-all, +.ui-corner-bottom, +.ui-corner-right, +.ui-corner-br { + border-bottom-right-radius: 4px; +} + +/* Overlays */ +.ui-widget-overlay { + background: #666666 url("images/ui-bg_diagonals-thick_20_666666_40x40.png") 50% 50% repeat; + opacity: .5; + filter: Alpha(Opacity=50); /* support: IE8 */ +} +.ui-widget-shadow { + margin: -5px 0 0 -5px; + padding: 5px; + background: #000000 url("images/ui-bg_flat_10_000000_40x100.png") 50% 50% repeat-x; + opacity: .2; + filter: Alpha(Opacity=20); /* support: IE8 */ + border-radius: 5px; +} diff --git a/branch/4.04/jquery-ui-1.11.4.custom/jquery-ui.js b/branch/4.04/jquery-ui-1.11.4.custom/jquery-ui.js new file mode 100644 index 0000000000000000000000000000000000000000..f91677ef2d2870727ae8fa871495e1c8bf5bac00 --- /dev/null +++ b/branch/4.04/jquery-ui-1.11.4.custom/jquery-ui.js @@ -0,0 +1,16617 @@ +/*! jQuery UI - v1.11.4 - 2015-05-10 +* http://jqueryui.com +* Includes: core.js, widget.js, mouse.js, position.js, draggable.js, droppable.js, resizable.js, selectable.js, sortable.js, accordion.js, autocomplete.js, button.js, datepicker.js, dialog.js, menu.js, progressbar.js, selectmenu.js, slider.js, spinner.js, tabs.js, tooltip.js, effect.js, effect-blind.js, effect-bounce.js, effect-clip.js, effect-drop.js, effect-explode.js, effect-fade.js, effect-fold.js, effect-highlight.js, effect-puff.js, effect-pulsate.js, effect-scale.js, effect-shake.js, effect-size.js, effect-slide.js, effect-transfer.js +* Copyright 2015 jQuery Foundation and other contributors; Licensed MIT */ + +(function( factory ) { + if ( typeof define === "function" && define.amd ) { + + // AMD. Register as an anonymous module. + define([ "jquery" ], factory ); + } else { + + // Browser globals + factory( jQuery ); + } +}(function( $ ) { +/*! + * jQuery UI Core 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/category/ui-core/ + */ + + +// $.ui might exist from components with no dependencies, e.g., $.ui.position +$.ui = $.ui || {}; + +$.extend( $.ui, { + version: "1.11.4", + + keyCode: { + BACKSPACE: 8, + COMMA: 188, + DELETE: 46, + DOWN: 40, + END: 35, + ENTER: 13, + ESCAPE: 27, + HOME: 36, + LEFT: 37, + PAGE_DOWN: 34, + PAGE_UP: 33, + PERIOD: 190, + RIGHT: 39, + SPACE: 32, + TAB: 9, + UP: 38 + } +}); + +// plugins +$.fn.extend({ + scrollParent: function( includeHidden ) { + var position = this.css( "position" ), + excludeStaticParent = position === "absolute", + overflowRegex = includeHidden ? /(auto|scroll|hidden)/ : /(auto|scroll)/, + scrollParent = this.parents().filter( function() { + var parent = $( this ); + if ( excludeStaticParent && parent.css( "position" ) === "static" ) { + return false; + } + return overflowRegex.test( parent.css( "overflow" ) + parent.css( "overflow-y" ) + parent.css( "overflow-x" ) ); + }).eq( 0 ); + + return position === "fixed" || !scrollParent.length ? $( this[ 0 ].ownerDocument || document ) : scrollParent; + }, + + uniqueId: (function() { + var uuid = 0; + + return function() { + return this.each(function() { + if ( !this.id ) { + this.id = "ui-id-" + ( ++uuid ); + } + }); + }; + })(), + + removeUniqueId: function() { + return this.each(function() { + if ( /^ui-id-\d+$/.test( this.id ) ) { + $( this ).removeAttr( "id" ); + } + }); + } +}); + +// selectors +function focusable( element, isTabIndexNotNaN ) { + var map, mapName, img, + nodeName = element.nodeName.toLowerCase(); + if ( "area" === nodeName ) { + map = element.parentNode; + mapName = map.name; + if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) { + return false; + } + img = $( "img[usemap='#" + mapName + "']" )[ 0 ]; + return !!img && visible( img ); + } + return ( /^(input|select|textarea|button|object)$/.test( nodeName ) ? + !element.disabled : + "a" === nodeName ? + element.href || isTabIndexNotNaN : + isTabIndexNotNaN) && + // the element and all of its ancestors must be visible + visible( element ); +} + +function visible( element ) { + return $.expr.filters.visible( element ) && + !$( element ).parents().addBack().filter(function() { + return $.css( this, "visibility" ) === "hidden"; + }).length; +} + +$.extend( $.expr[ ":" ], { + data: $.expr.createPseudo ? + $.expr.createPseudo(function( dataName ) { + return function( elem ) { + return !!$.data( elem, dataName ); + }; + }) : + // support: jQuery <1.8 + function( elem, i, match ) { + return !!$.data( elem, match[ 3 ] ); + }, + + focusable: function( element ) { + return focusable( element, !isNaN( $.attr( element, "tabindex" ) ) ); + }, + + tabbable: function( element ) { + var tabIndex = $.attr( element, "tabindex" ), + isTabIndexNaN = isNaN( tabIndex ); + return ( isTabIndexNaN || tabIndex >= 0 ) && focusable( element, !isTabIndexNaN ); + } +}); + +// support: jQuery <1.8 +if ( !$( "<a>" ).outerWidth( 1 ).jquery ) { + $.each( [ "Width", "Height" ], function( i, name ) { + var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ], + type = name.toLowerCase(), + orig = { + innerWidth: $.fn.innerWidth, + innerHeight: $.fn.innerHeight, + outerWidth: $.fn.outerWidth, + outerHeight: $.fn.outerHeight + }; + + function reduce( elem, size, border, margin ) { + $.each( side, function() { + size -= parseFloat( $.css( elem, "padding" + this ) ) || 0; + if ( border ) { + size -= parseFloat( $.css( elem, "border" + this + "Width" ) ) || 0; + } + if ( margin ) { + size -= parseFloat( $.css( elem, "margin" + this ) ) || 0; + } + }); + return size; + } + + $.fn[ "inner" + name ] = function( size ) { + if ( size === undefined ) { + return orig[ "inner" + name ].call( this ); + } + + return this.each(function() { + $( this ).css( type, reduce( this, size ) + "px" ); + }); + }; + + $.fn[ "outer" + name] = function( size, margin ) { + if ( typeof size !== "number" ) { + return orig[ "outer" + name ].call( this, size ); + } + + return this.each(function() { + $( this).css( type, reduce( this, size, true, margin ) + "px" ); + }); + }; + }); +} + +// support: jQuery <1.8 +if ( !$.fn.addBack ) { + $.fn.addBack = function( selector ) { + return this.add( selector == null ? + this.prevObject : this.prevObject.filter( selector ) + ); + }; +} + +// support: jQuery 1.6.1, 1.6.2 (http://bugs.jquery.com/ticket/9413) +if ( $( "<a>" ).data( "a-b", "a" ).removeData( "a-b" ).data( "a-b" ) ) { + $.fn.removeData = (function( removeData ) { + return function( key ) { + if ( arguments.length ) { + return removeData.call( this, $.camelCase( key ) ); + } else { + return removeData.call( this ); + } + }; + })( $.fn.removeData ); +} + +// deprecated +$.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() ); + +$.fn.extend({ + focus: (function( orig ) { + return function( delay, fn ) { + return typeof delay === "number" ? + this.each(function() { + var elem = this; + setTimeout(function() { + $( elem ).focus(); + if ( fn ) { + fn.call( elem ); + } + }, delay ); + }) : + orig.apply( this, arguments ); + }; + })( $.fn.focus ), + + disableSelection: (function() { + var eventType = "onselectstart" in document.createElement( "div" ) ? + "selectstart" : + "mousedown"; + + return function() { + return this.bind( eventType + ".ui-disableSelection", function( event ) { + event.preventDefault(); + }); + }; + })(), + + enableSelection: function() { + return this.unbind( ".ui-disableSelection" ); + }, + + zIndex: function( zIndex ) { + if ( zIndex !== undefined ) { + return this.css( "zIndex", zIndex ); + } + + if ( this.length ) { + var elem = $( this[ 0 ] ), position, value; + while ( elem.length && elem[ 0 ] !== document ) { + // Ignore z-index if position is set to a value where z-index is ignored by the browser + // This makes behavior of this function consistent across browsers + // WebKit always returns auto if the element is positioned + position = elem.css( "position" ); + if ( position === "absolute" || position === "relative" || position === "fixed" ) { + // IE returns 0 when zIndex is not specified + // other browsers return a string + // we ignore the case of nested elements with an explicit value of 0 + // <div style="z-index: -10;"><div style="z-index: 0;"></div></div> + value = parseInt( elem.css( "zIndex" ), 10 ); + if ( !isNaN( value ) && value !== 0 ) { + return value; + } + } + elem = elem.parent(); + } + } + + return 0; + } +}); + +// $.ui.plugin is deprecated. Use $.widget() extensions instead. +$.ui.plugin = { + add: function( module, option, set ) { + var i, + proto = $.ui[ module ].prototype; + for ( i in set ) { + proto.plugins[ i ] = proto.plugins[ i ] || []; + proto.plugins[ i ].push( [ option, set[ i ] ] ); + } + }, + call: function( instance, name, args, allowDisconnected ) { + var i, + set = instance.plugins[ name ]; + + if ( !set ) { + return; + } + + if ( !allowDisconnected && ( !instance.element[ 0 ].parentNode || instance.element[ 0 ].parentNode.nodeType === 11 ) ) { + return; + } + + for ( i = 0; i < set.length; i++ ) { + if ( instance.options[ set[ i ][ 0 ] ] ) { + set[ i ][ 1 ].apply( instance.element, args ); + } + } + } +}; + + +/*! + * jQuery UI Widget 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/jQuery.widget/ + */ + + +var widget_uuid = 0, + widget_slice = Array.prototype.slice; + +$.cleanData = (function( orig ) { + return function( elems ) { + var events, elem, i; + for ( i = 0; (elem = elems[i]) != null; i++ ) { + try { + + // Only trigger remove when necessary to save time + events = $._data( elem, "events" ); + if ( events && events.remove ) { + $( elem ).triggerHandler( "remove" ); + } + + // http://bugs.jquery.com/ticket/8235 + } catch ( e ) {} + } + orig( elems ); + }; +})( $.cleanData ); + +$.widget = function( name, base, prototype ) { + var fullName, existingConstructor, constructor, basePrototype, + // proxiedPrototype allows the provided prototype to remain unmodified + // so that it can be used as a mixin for multiple widgets (#8876) + proxiedPrototype = {}, + namespace = name.split( "." )[ 0 ]; + + name = name.split( "." )[ 1 ]; + fullName = namespace + "-" + name; + + if ( !prototype ) { + prototype = base; + base = $.Widget; + } + + // create selector for plugin + $.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) { + return !!$.data( elem, fullName ); + }; + + $[ namespace ] = $[ namespace ] || {}; + existingConstructor = $[ namespace ][ name ]; + constructor = $[ namespace ][ name ] = function( options, element ) { + // allow instantiation without "new" keyword + if ( !this._createWidget ) { + return new constructor( options, element ); + } + + // allow instantiation without initializing for simple inheritance + // must use "new" keyword (the code above always passes args) + if ( arguments.length ) { + this._createWidget( options, element ); + } + }; + // extend with the existing constructor to carry over any static properties + $.extend( constructor, existingConstructor, { + version: prototype.version, + // copy the object used to create the prototype in case we need to + // redefine the widget later + _proto: $.extend( {}, prototype ), + // track widgets that inherit from this widget in case this widget is + // redefined after a widget inherits from it + _childConstructors: [] + }); + + basePrototype = new base(); + // we need to make the options hash a property directly on the new instance + // otherwise we'll modify the options hash on the prototype that we're + // inheriting from + basePrototype.options = $.widget.extend( {}, basePrototype.options ); + $.each( prototype, function( prop, value ) { + if ( !$.isFunction( value ) ) { + proxiedPrototype[ prop ] = value; + return; + } + proxiedPrototype[ prop ] = (function() { + var _super = function() { + return base.prototype[ prop ].apply( this, arguments ); + }, + _superApply = function( args ) { + return base.prototype[ prop ].apply( this, args ); + }; + return function() { + var __super = this._super, + __superApply = this._superApply, + returnValue; + + this._super = _super; + this._superApply = _superApply; + + returnValue = value.apply( this, arguments ); + + this._super = __super; + this._superApply = __superApply; + + return returnValue; + }; + })(); + }); + constructor.prototype = $.widget.extend( basePrototype, { + // TODO: remove support for widgetEventPrefix + // always use the name + a colon as the prefix, e.g., draggable:start + // don't prefix for widgets that aren't DOM-based + widgetEventPrefix: existingConstructor ? (basePrototype.widgetEventPrefix || name) : name + }, proxiedPrototype, { + constructor: constructor, + namespace: namespace, + widgetName: name, + widgetFullName: fullName + }); + + // If this widget is being redefined then we need to find all widgets that + // are inheriting from it and redefine all of them so that they inherit from + // the new version of this widget. We're essentially trying to replace one + // level in the prototype chain. + if ( existingConstructor ) { + $.each( existingConstructor._childConstructors, function( i, child ) { + var childPrototype = child.prototype; + + // redefine the child widget using the same prototype that was + // originally used, but inherit from the new version of the base + $.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, child._proto ); + }); + // remove the list of existing child constructors from the old constructor + // so the old child constructors can be garbage collected + delete existingConstructor._childConstructors; + } else { + base._childConstructors.push( constructor ); + } + + $.widget.bridge( name, constructor ); + + return constructor; +}; + +$.widget.extend = function( target ) { + var input = widget_slice.call( arguments, 1 ), + inputIndex = 0, + inputLength = input.length, + key, + value; + for ( ; inputIndex < inputLength; inputIndex++ ) { + for ( key in input[ inputIndex ] ) { + value = input[ inputIndex ][ key ]; + if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) { + // Clone objects + if ( $.isPlainObject( value ) ) { + target[ key ] = $.isPlainObject( target[ key ] ) ? + $.widget.extend( {}, target[ key ], value ) : + // Don't extend strings, arrays, etc. with objects + $.widget.extend( {}, value ); + // Copy everything else by reference + } else { + target[ key ] = value; + } + } + } + } + return target; +}; + +$.widget.bridge = function( name, object ) { + var fullName = object.prototype.widgetFullName || name; + $.fn[ name ] = function( options ) { + var isMethodCall = typeof options === "string", + args = widget_slice.call( arguments, 1 ), + returnValue = this; + + if ( isMethodCall ) { + this.each(function() { + var methodValue, + instance = $.data( this, fullName ); + if ( options === "instance" ) { + returnValue = instance; + return false; + } + if ( !instance ) { + return $.error( "cannot call methods on " + name + " prior to initialization; " + + "attempted to call method '" + options + "'" ); + } + if ( !$.isFunction( instance[options] ) || options.charAt( 0 ) === "_" ) { + return $.error( "no such method '" + options + "' for " + name + " widget instance" ); + } + methodValue = instance[ options ].apply( instance, args ); + if ( methodValue !== instance && methodValue !== undefined ) { + returnValue = methodValue && methodValue.jquery ? + returnValue.pushStack( methodValue.get() ) : + methodValue; + return false; + } + }); + } else { + + // Allow multiple hashes to be passed on init + if ( args.length ) { + options = $.widget.extend.apply( null, [ options ].concat(args) ); + } + + this.each(function() { + var instance = $.data( this, fullName ); + if ( instance ) { + instance.option( options || {} ); + if ( instance._init ) { + instance._init(); + } + } else { + $.data( this, fullName, new object( options, this ) ); + } + }); + } + + return returnValue; + }; +}; + +$.Widget = function( /* options, element */ ) {}; +$.Widget._childConstructors = []; + +$.Widget.prototype = { + widgetName: "widget", + widgetEventPrefix: "", + defaultElement: "<div>", + options: { + disabled: false, + + // callbacks + create: null + }, + _createWidget: function( options, element ) { + element = $( element || this.defaultElement || this )[ 0 ]; + this.element = $( element ); + this.uuid = widget_uuid++; + this.eventNamespace = "." + this.widgetName + this.uuid; + + this.bindings = $(); + this.hoverable = $(); + this.focusable = $(); + + if ( element !== this ) { + $.data( element, this.widgetFullName, this ); + this._on( true, this.element, { + remove: function( event ) { + if ( event.target === element ) { + this.destroy(); + } + } + }); + this.document = $( element.style ? + // element within the document + element.ownerDocument : + // element is window or document + element.document || element ); + this.window = $( this.document[0].defaultView || this.document[0].parentWindow ); + } + + this.options = $.widget.extend( {}, + this.options, + this._getCreateOptions(), + options ); + + this._create(); + this._trigger( "create", null, this._getCreateEventData() ); + this._init(); + }, + _getCreateOptions: $.noop, + _getCreateEventData: $.noop, + _create: $.noop, + _init: $.noop, + + destroy: function() { + this._destroy(); + // we can probably remove the unbind calls in 2.0 + // all event bindings should go through this._on() + this.element + .unbind( this.eventNamespace ) + .removeData( this.widgetFullName ) + // support: jquery <1.6.3 + // http://bugs.jquery.com/ticket/9413 + .removeData( $.camelCase( this.widgetFullName ) ); + this.widget() + .unbind( this.eventNamespace ) + .removeAttr( "aria-disabled" ) + .removeClass( + this.widgetFullName + "-disabled " + + "ui-state-disabled" ); + + // clean up events and states + this.bindings.unbind( this.eventNamespace ); + this.hoverable.removeClass( "ui-state-hover" ); + this.focusable.removeClass( "ui-state-focus" ); + }, + _destroy: $.noop, + + widget: function() { + return this.element; + }, + + option: function( key, value ) { + var options = key, + parts, + curOption, + i; + + if ( arguments.length === 0 ) { + // don't return a reference to the internal hash + return $.widget.extend( {}, this.options ); + } + + if ( typeof key === "string" ) { + // handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } } + options = {}; + parts = key.split( "." ); + key = parts.shift(); + if ( parts.length ) { + curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] ); + for ( i = 0; i < parts.length - 1; i++ ) { + curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {}; + curOption = curOption[ parts[ i ] ]; + } + key = parts.pop(); + if ( arguments.length === 1 ) { + return curOption[ key ] === undefined ? null : curOption[ key ]; + } + curOption[ key ] = value; + } else { + if ( arguments.length === 1 ) { + return this.options[ key ] === undefined ? null : this.options[ key ]; + } + options[ key ] = value; + } + } + + this._setOptions( options ); + + return this; + }, + _setOptions: function( options ) { + var key; + + for ( key in options ) { + this._setOption( key, options[ key ] ); + } + + return this; + }, + _setOption: function( key, value ) { + this.options[ key ] = value; + + if ( key === "disabled" ) { + this.widget() + .toggleClass( this.widgetFullName + "-disabled", !!value ); + + // If the widget is becoming disabled, then nothing is interactive + if ( value ) { + this.hoverable.removeClass( "ui-state-hover" ); + this.focusable.removeClass( "ui-state-focus" ); + } + } + + return this; + }, + + enable: function() { + return this._setOptions({ disabled: false }); + }, + disable: function() { + return this._setOptions({ disabled: true }); + }, + + _on: function( suppressDisabledCheck, element, handlers ) { + var delegateElement, + instance = this; + + // no suppressDisabledCheck flag, shuffle arguments + if ( typeof suppressDisabledCheck !== "boolean" ) { + handlers = element; + element = suppressDisabledCheck; + suppressDisabledCheck = false; + } + + // no element argument, shuffle and use this.element + if ( !handlers ) { + handlers = element; + element = this.element; + delegateElement = this.widget(); + } else { + element = delegateElement = $( element ); + this.bindings = this.bindings.add( element ); + } + + $.each( handlers, function( event, handler ) { + function handlerProxy() { + // allow widgets to customize the disabled handling + // - disabled as an array instead of boolean + // - disabled class as method for disabling individual parts + if ( !suppressDisabledCheck && + ( instance.options.disabled === true || + $( this ).hasClass( "ui-state-disabled" ) ) ) { + return; + } + return ( typeof handler === "string" ? instance[ handler ] : handler ) + .apply( instance, arguments ); + } + + // copy the guid so direct unbinding works + if ( typeof handler !== "string" ) { + handlerProxy.guid = handler.guid = + handler.guid || handlerProxy.guid || $.guid++; + } + + var match = event.match( /^([\w:-]*)\s*(.*)$/ ), + eventName = match[1] + instance.eventNamespace, + selector = match[2]; + if ( selector ) { + delegateElement.delegate( selector, eventName, handlerProxy ); + } else { + element.bind( eventName, handlerProxy ); + } + }); + }, + + _off: function( element, eventName ) { + eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) + + this.eventNamespace; + element.unbind( eventName ).undelegate( eventName ); + + // Clear the stack to avoid memory leaks (#10056) + this.bindings = $( this.bindings.not( element ).get() ); + this.focusable = $( this.focusable.not( element ).get() ); + this.hoverable = $( this.hoverable.not( element ).get() ); + }, + + _delay: function( handler, delay ) { + function handlerProxy() { + return ( typeof handler === "string" ? instance[ handler ] : handler ) + .apply( instance, arguments ); + } + var instance = this; + return setTimeout( handlerProxy, delay || 0 ); + }, + + _hoverable: function( element ) { + this.hoverable = this.hoverable.add( element ); + this._on( element, { + mouseenter: function( event ) { + $( event.currentTarget ).addClass( "ui-state-hover" ); + }, + mouseleave: function( event ) { + $( event.currentTarget ).removeClass( "ui-state-hover" ); + } + }); + }, + + _focusable: function( element ) { + this.focusable = this.focusable.add( element ); + this._on( element, { + focusin: function( event ) { + $( event.currentTarget ).addClass( "ui-state-focus" ); + }, + focusout: function( event ) { + $( event.currentTarget ).removeClass( "ui-state-focus" ); + } + }); + }, + + _trigger: function( type, event, data ) { + var prop, orig, + callback = this.options[ type ]; + + data = data || {}; + event = $.Event( event ); + event.type = ( type === this.widgetEventPrefix ? + type : + this.widgetEventPrefix + type ).toLowerCase(); + // the original event may come from any element + // so we need to reset the target on the new event + event.target = this.element[ 0 ]; + + // copy original event properties over to the new event + orig = event.originalEvent; + if ( orig ) { + for ( prop in orig ) { + if ( !( prop in event ) ) { + event[ prop ] = orig[ prop ]; + } + } + } + + this.element.trigger( event, data ); + return !( $.isFunction( callback ) && + callback.apply( this.element[0], [ event ].concat( data ) ) === false || + event.isDefaultPrevented() ); + } +}; + +$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) { + $.Widget.prototype[ "_" + method ] = function( element, options, callback ) { + if ( typeof options === "string" ) { + options = { effect: options }; + } + var hasOptions, + effectName = !options ? + method : + options === true || typeof options === "number" ? + defaultEffect : + options.effect || defaultEffect; + options = options || {}; + if ( typeof options === "number" ) { + options = { duration: options }; + } + hasOptions = !$.isEmptyObject( options ); + options.complete = callback; + if ( options.delay ) { + element.delay( options.delay ); + } + if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) { + element[ method ]( options ); + } else if ( effectName !== method && element[ effectName ] ) { + element[ effectName ]( options.duration, options.easing, callback ); + } else { + element.queue(function( next ) { + $( this )[ method ](); + if ( callback ) { + callback.call( element[ 0 ] ); + } + next(); + }); + } + }; +}); + +var widget = $.widget; + + +/*! + * jQuery UI Mouse 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/mouse/ + */ + + +var mouseHandled = false; +$( document ).mouseup( function() { + mouseHandled = false; +}); + +var mouse = $.widget("ui.mouse", { + version: "1.11.4", + options: { + cancel: "input,textarea,button,select,option", + distance: 1, + delay: 0 + }, + _mouseInit: function() { + var that = this; + + this.element + .bind("mousedown." + this.widgetName, function(event) { + return that._mouseDown(event); + }) + .bind("click." + this.widgetName, function(event) { + if (true === $.data(event.target, that.widgetName + ".preventClickEvent")) { + $.removeData(event.target, that.widgetName + ".preventClickEvent"); + event.stopImmediatePropagation(); + return false; + } + }); + + this.started = false; + }, + + // TODO: make sure destroying one instance of mouse doesn't mess with + // other instances of mouse + _mouseDestroy: function() { + this.element.unbind("." + this.widgetName); + if ( this._mouseMoveDelegate ) { + this.document + .unbind("mousemove." + this.widgetName, this._mouseMoveDelegate) + .unbind("mouseup." + this.widgetName, this._mouseUpDelegate); + } + }, + + _mouseDown: function(event) { + // don't let more than one widget handle mouseStart + if ( mouseHandled ) { + return; + } + + this._mouseMoved = false; + + // we may have missed mouseup (out of window) + (this._mouseStarted && this._mouseUp(event)); + + this._mouseDownEvent = event; + + var that = this, + btnIsLeft = (event.which === 1), + // event.target.nodeName works around a bug in IE 8 with + // disabled inputs (#7620) + elIsCancel = (typeof this.options.cancel === "string" && event.target.nodeName ? $(event.target).closest(this.options.cancel).length : false); + if (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) { + return true; + } + + this.mouseDelayMet = !this.options.delay; + if (!this.mouseDelayMet) { + this._mouseDelayTimer = setTimeout(function() { + that.mouseDelayMet = true; + }, this.options.delay); + } + + if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) { + this._mouseStarted = (this._mouseStart(event) !== false); + if (!this._mouseStarted) { + event.preventDefault(); + return true; + } + } + + // Click event may never have fired (Gecko & Opera) + if (true === $.data(event.target, this.widgetName + ".preventClickEvent")) { + $.removeData(event.target, this.widgetName + ".preventClickEvent"); + } + + // these delegates are required to keep context + this._mouseMoveDelegate = function(event) { + return that._mouseMove(event); + }; + this._mouseUpDelegate = function(event) { + return that._mouseUp(event); + }; + + this.document + .bind( "mousemove." + this.widgetName, this._mouseMoveDelegate ) + .bind( "mouseup." + this.widgetName, this._mouseUpDelegate ); + + event.preventDefault(); + + mouseHandled = true; + return true; + }, + + _mouseMove: function(event) { + // Only check for mouseups outside the document if you've moved inside the document + // at least once. This prevents the firing of mouseup in the case of IE<9, which will + // fire a mousemove event if content is placed under the cursor. See #7778 + // Support: IE <9 + if ( this._mouseMoved ) { + // IE mouseup check - mouseup happened when mouse was out of window + if ($.ui.ie && ( !document.documentMode || document.documentMode < 9 ) && !event.button) { + return this._mouseUp(event); + + // Iframe mouseup check - mouseup occurred in another document + } else if ( !event.which ) { + return this._mouseUp( event ); + } + } + + if ( event.which || event.button ) { + this._mouseMoved = true; + } + + if (this._mouseStarted) { + this._mouseDrag(event); + return event.preventDefault(); + } + + if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) { + this._mouseStarted = + (this._mouseStart(this._mouseDownEvent, event) !== false); + (this._mouseStarted ? this._mouseDrag(event) : this._mouseUp(event)); + } + + return !this._mouseStarted; + }, + + _mouseUp: function(event) { + this.document + .unbind( "mousemove." + this.widgetName, this._mouseMoveDelegate ) + .unbind( "mouseup." + this.widgetName, this._mouseUpDelegate ); + + if (this._mouseStarted) { + this._mouseStarted = false; + + if (event.target === this._mouseDownEvent.target) { + $.data(event.target, this.widgetName + ".preventClickEvent", true); + } + + this._mouseStop(event); + } + + mouseHandled = false; + return false; + }, + + _mouseDistanceMet: function(event) { + return (Math.max( + Math.abs(this._mouseDownEvent.pageX - event.pageX), + Math.abs(this._mouseDownEvent.pageY - event.pageY) + ) >= this.options.distance + ); + }, + + _mouseDelayMet: function(/* event */) { + return this.mouseDelayMet; + }, + + // These are placeholder methods, to be overriden by extending plugin + _mouseStart: function(/* event */) {}, + _mouseDrag: function(/* event */) {}, + _mouseStop: function(/* event */) {}, + _mouseCapture: function(/* event */) { return true; } +}); + + +/*! + * jQuery UI Position 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/position/ + */ + +(function() { + +$.ui = $.ui || {}; + +var cachedScrollbarWidth, supportsOffsetFractions, + max = Math.max, + abs = Math.abs, + round = Math.round, + rhorizontal = /left|center|right/, + rvertical = /top|center|bottom/, + roffset = /[\+\-]\d+(\.[\d]+)?%?/, + rposition = /^\w+/, + rpercent = /%$/, + _position = $.fn.position; + +function getOffsets( offsets, width, height ) { + return [ + parseFloat( offsets[ 0 ] ) * ( rpercent.test( offsets[ 0 ] ) ? width / 100 : 1 ), + parseFloat( offsets[ 1 ] ) * ( rpercent.test( offsets[ 1 ] ) ? height / 100 : 1 ) + ]; +} + +function parseCss( element, property ) { + return parseInt( $.css( element, property ), 10 ) || 0; +} + +function getDimensions( elem ) { + var raw = elem[0]; + if ( raw.nodeType === 9 ) { + return { + width: elem.width(), + height: elem.height(), + offset: { top: 0, left: 0 } + }; + } + if ( $.isWindow( raw ) ) { + return { + width: elem.width(), + height: elem.height(), + offset: { top: elem.scrollTop(), left: elem.scrollLeft() } + }; + } + if ( raw.preventDefault ) { + return { + width: 0, + height: 0, + offset: { top: raw.pageY, left: raw.pageX } + }; + } + return { + width: elem.outerWidth(), + height: elem.outerHeight(), + offset: elem.offset() + }; +} + +$.position = { + scrollbarWidth: function() { + if ( cachedScrollbarWidth !== undefined ) { + return cachedScrollbarWidth; + } + var w1, w2, + div = $( "<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>" ), + innerDiv = div.children()[0]; + + $( "body" ).append( div ); + w1 = innerDiv.offsetWidth; + div.css( "overflow", "scroll" ); + + w2 = innerDiv.offsetWidth; + + if ( w1 === w2 ) { + w2 = div[0].clientWidth; + } + + div.remove(); + + return (cachedScrollbarWidth = w1 - w2); + }, + getScrollInfo: function( within ) { + var overflowX = within.isWindow || within.isDocument ? "" : + within.element.css( "overflow-x" ), + overflowY = within.isWindow || within.isDocument ? "" : + within.element.css( "overflow-y" ), + hasOverflowX = overflowX === "scroll" || + ( overflowX === "auto" && within.width < within.element[0].scrollWidth ), + hasOverflowY = overflowY === "scroll" || + ( overflowY === "auto" && within.height < within.element[0].scrollHeight ); + return { + width: hasOverflowY ? $.position.scrollbarWidth() : 0, + height: hasOverflowX ? $.position.scrollbarWidth() : 0 + }; + }, + getWithinInfo: function( element ) { + var withinElement = $( element || window ), + isWindow = $.isWindow( withinElement[0] ), + isDocument = !!withinElement[ 0 ] && withinElement[ 0 ].nodeType === 9; + return { + element: withinElement, + isWindow: isWindow, + isDocument: isDocument, + offset: withinElement.offset() || { left: 0, top: 0 }, + scrollLeft: withinElement.scrollLeft(), + scrollTop: withinElement.scrollTop(), + + // support: jQuery 1.6.x + // jQuery 1.6 doesn't support .outerWidth/Height() on documents or windows + width: isWindow || isDocument ? withinElement.width() : withinElement.outerWidth(), + height: isWindow || isDocument ? withinElement.height() : withinElement.outerHeight() + }; + } +}; + +$.fn.position = function( options ) { + if ( !options || !options.of ) { + return _position.apply( this, arguments ); + } + + // make a copy, we don't want to modify arguments + options = $.extend( {}, options ); + + var atOffset, targetWidth, targetHeight, targetOffset, basePosition, dimensions, + target = $( options.of ), + within = $.position.getWithinInfo( options.within ), + scrollInfo = $.position.getScrollInfo( within ), + collision = ( options.collision || "flip" ).split( " " ), + offsets = {}; + + dimensions = getDimensions( target ); + if ( target[0].preventDefault ) { + // force left top to allow flipping + options.at = "left top"; + } + targetWidth = dimensions.width; + targetHeight = dimensions.height; + targetOffset = dimensions.offset; + // clone to reuse original targetOffset later + basePosition = $.extend( {}, targetOffset ); + + // force my and at to have valid horizontal and vertical positions + // if a value is missing or invalid, it will be converted to center + $.each( [ "my", "at" ], function() { + var pos = ( options[ this ] || "" ).split( " " ), + horizontalOffset, + verticalOffset; + + if ( pos.length === 1) { + pos = rhorizontal.test( pos[ 0 ] ) ? + pos.concat( [ "center" ] ) : + rvertical.test( pos[ 0 ] ) ? + [ "center" ].concat( pos ) : + [ "center", "center" ]; + } + pos[ 0 ] = rhorizontal.test( pos[ 0 ] ) ? pos[ 0 ] : "center"; + pos[ 1 ] = rvertical.test( pos[ 1 ] ) ? pos[ 1 ] : "center"; + + // calculate offsets + horizontalOffset = roffset.exec( pos[ 0 ] ); + verticalOffset = roffset.exec( pos[ 1 ] ); + offsets[ this ] = [ + horizontalOffset ? horizontalOffset[ 0 ] : 0, + verticalOffset ? verticalOffset[ 0 ] : 0 + ]; + + // reduce to just the positions without the offsets + options[ this ] = [ + rposition.exec( pos[ 0 ] )[ 0 ], + rposition.exec( pos[ 1 ] )[ 0 ] + ]; + }); + + // normalize collision option + if ( collision.length === 1 ) { + collision[ 1 ] = collision[ 0 ]; + } + + if ( options.at[ 0 ] === "right" ) { + basePosition.left += targetWidth; + } else if ( options.at[ 0 ] === "center" ) { + basePosition.left += targetWidth / 2; + } + + if ( options.at[ 1 ] === "bottom" ) { + basePosition.top += targetHeight; + } else if ( options.at[ 1 ] === "center" ) { + basePosition.top += targetHeight / 2; + } + + atOffset = getOffsets( offsets.at, targetWidth, targetHeight ); + basePosition.left += atOffset[ 0 ]; + basePosition.top += atOffset[ 1 ]; + + return this.each(function() { + var collisionPosition, using, + elem = $( this ), + elemWidth = elem.outerWidth(), + elemHeight = elem.outerHeight(), + marginLeft = parseCss( this, "marginLeft" ), + marginTop = parseCss( this, "marginTop" ), + collisionWidth = elemWidth + marginLeft + parseCss( this, "marginRight" ) + scrollInfo.width, + collisionHeight = elemHeight + marginTop + parseCss( this, "marginBottom" ) + scrollInfo.height, + position = $.extend( {}, basePosition ), + myOffset = getOffsets( offsets.my, elem.outerWidth(), elem.outerHeight() ); + + if ( options.my[ 0 ] === "right" ) { + position.left -= elemWidth; + } else if ( options.my[ 0 ] === "center" ) { + position.left -= elemWidth / 2; + } + + if ( options.my[ 1 ] === "bottom" ) { + position.top -= elemHeight; + } else if ( options.my[ 1 ] === "center" ) { + position.top -= elemHeight / 2; + } + + position.left += myOffset[ 0 ]; + position.top += myOffset[ 1 ]; + + // if the browser doesn't support fractions, then round for consistent results + if ( !supportsOffsetFractions ) { + position.left = round( position.left ); + position.top = round( position.top ); + } + + collisionPosition = { + marginLeft: marginLeft, + marginTop: marginTop + }; + + $.each( [ "left", "top" ], function( i, dir ) { + if ( $.ui.position[ collision[ i ] ] ) { + $.ui.position[ collision[ i ] ][ dir ]( position, { + targetWidth: targetWidth, + targetHeight: targetHeight, + elemWidth: elemWidth, + elemHeight: elemHeight, + collisionPosition: collisionPosition, + collisionWidth: collisionWidth, + collisionHeight: collisionHeight, + offset: [ atOffset[ 0 ] + myOffset[ 0 ], atOffset [ 1 ] + myOffset[ 1 ] ], + my: options.my, + at: options.at, + within: within, + elem: elem + }); + } + }); + + if ( options.using ) { + // adds feedback as second argument to using callback, if present + using = function( props ) { + var left = targetOffset.left - position.left, + right = left + targetWidth - elemWidth, + top = targetOffset.top - position.top, + bottom = top + targetHeight - elemHeight, + feedback = { + target: { + element: target, + left: targetOffset.left, + top: targetOffset.top, + width: targetWidth, + height: targetHeight + }, + element: { + element: elem, + left: position.left, + top: position.top, + width: elemWidth, + height: elemHeight + }, + horizontal: right < 0 ? "left" : left > 0 ? "right" : "center", + vertical: bottom < 0 ? "top" : top > 0 ? "bottom" : "middle" + }; + if ( targetWidth < elemWidth && abs( left + right ) < targetWidth ) { + feedback.horizontal = "center"; + } + if ( targetHeight < elemHeight && abs( top + bottom ) < targetHeight ) { + feedback.vertical = "middle"; + } + if ( max( abs( left ), abs( right ) ) > max( abs( top ), abs( bottom ) ) ) { + feedback.important = "horizontal"; + } else { + feedback.important = "vertical"; + } + options.using.call( this, props, feedback ); + }; + } + + elem.offset( $.extend( position, { using: using } ) ); + }); +}; + +$.ui.position = { + fit: { + left: function( position, data ) { + var within = data.within, + withinOffset = within.isWindow ? within.scrollLeft : within.offset.left, + outerWidth = within.width, + collisionPosLeft = position.left - data.collisionPosition.marginLeft, + overLeft = withinOffset - collisionPosLeft, + overRight = collisionPosLeft + data.collisionWidth - outerWidth - withinOffset, + newOverRight; + + // element is wider than within + if ( data.collisionWidth > outerWidth ) { + // element is initially over the left side of within + if ( overLeft > 0 && overRight <= 0 ) { + newOverRight = position.left + overLeft + data.collisionWidth - outerWidth - withinOffset; + position.left += overLeft - newOverRight; + // element is initially over right side of within + } else if ( overRight > 0 && overLeft <= 0 ) { + position.left = withinOffset; + // element is initially over both left and right sides of within + } else { + if ( overLeft > overRight ) { + position.left = withinOffset + outerWidth - data.collisionWidth; + } else { + position.left = withinOffset; + } + } + // too far left -> align with left edge + } else if ( overLeft > 0 ) { + position.left += overLeft; + // too far right -> align with right edge + } else if ( overRight > 0 ) { + position.left -= overRight; + // adjust based on position and margin + } else { + position.left = max( position.left - collisionPosLeft, position.left ); + } + }, + top: function( position, data ) { + var within = data.within, + withinOffset = within.isWindow ? within.scrollTop : within.offset.top, + outerHeight = data.within.height, + collisionPosTop = position.top - data.collisionPosition.marginTop, + overTop = withinOffset - collisionPosTop, + overBottom = collisionPosTop + data.collisionHeight - outerHeight - withinOffset, + newOverBottom; + + // element is taller than within + if ( data.collisionHeight > outerHeight ) { + // element is initially over the top of within + if ( overTop > 0 && overBottom <= 0 ) { + newOverBottom = position.top + overTop + data.collisionHeight - outerHeight - withinOffset; + position.top += overTop - newOverBottom; + // element is initially over bottom of within + } else if ( overBottom > 0 && overTop <= 0 ) { + position.top = withinOffset; + // element is initially over both top and bottom of within + } else { + if ( overTop > overBottom ) { + position.top = withinOffset + outerHeight - data.collisionHeight; + } else { + position.top = withinOffset; + } + } + // too far up -> align with top + } else if ( overTop > 0 ) { + position.top += overTop; + // too far down -> align with bottom edge + } else if ( overBottom > 0 ) { + position.top -= overBottom; + // adjust based on position and margin + } else { + position.top = max( position.top - collisionPosTop, position.top ); + } + } + }, + flip: { + left: function( position, data ) { + var within = data.within, + withinOffset = within.offset.left + within.scrollLeft, + outerWidth = within.width, + offsetLeft = within.isWindow ? within.scrollLeft : within.offset.left, + collisionPosLeft = position.left - data.collisionPosition.marginLeft, + overLeft = collisionPosLeft - offsetLeft, + overRight = collisionPosLeft + data.collisionWidth - outerWidth - offsetLeft, + myOffset = data.my[ 0 ] === "left" ? + -data.elemWidth : + data.my[ 0 ] === "right" ? + data.elemWidth : + 0, + atOffset = data.at[ 0 ] === "left" ? + data.targetWidth : + data.at[ 0 ] === "right" ? + -data.targetWidth : + 0, + offset = -2 * data.offset[ 0 ], + newOverRight, + newOverLeft; + + if ( overLeft < 0 ) { + newOverRight = position.left + myOffset + atOffset + offset + data.collisionWidth - outerWidth - withinOffset; + if ( newOverRight < 0 || newOverRight < abs( overLeft ) ) { + position.left += myOffset + atOffset + offset; + } + } else if ( overRight > 0 ) { + newOverLeft = position.left - data.collisionPosition.marginLeft + myOffset + atOffset + offset - offsetLeft; + if ( newOverLeft > 0 || abs( newOverLeft ) < overRight ) { + position.left += myOffset + atOffset + offset; + } + } + }, + top: function( position, data ) { + var within = data.within, + withinOffset = within.offset.top + within.scrollTop, + outerHeight = within.height, + offsetTop = within.isWindow ? within.scrollTop : within.offset.top, + collisionPosTop = position.top - data.collisionPosition.marginTop, + overTop = collisionPosTop - offsetTop, + overBottom = collisionPosTop + data.collisionHeight - outerHeight - offsetTop, + top = data.my[ 1 ] === "top", + myOffset = top ? + -data.elemHeight : + data.my[ 1 ] === "bottom" ? + data.elemHeight : + 0, + atOffset = data.at[ 1 ] === "top" ? + data.targetHeight : + data.at[ 1 ] === "bottom" ? + -data.targetHeight : + 0, + offset = -2 * data.offset[ 1 ], + newOverTop, + newOverBottom; + if ( overTop < 0 ) { + newOverBottom = position.top + myOffset + atOffset + offset + data.collisionHeight - outerHeight - withinOffset; + if ( newOverBottom < 0 || newOverBottom < abs( overTop ) ) { + position.top += myOffset + atOffset + offset; + } + } else if ( overBottom > 0 ) { + newOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset + offset - offsetTop; + if ( newOverTop > 0 || abs( newOverTop ) < overBottom ) { + position.top += myOffset + atOffset + offset; + } + } + } + }, + flipfit: { + left: function() { + $.ui.position.flip.left.apply( this, arguments ); + $.ui.position.fit.left.apply( this, arguments ); + }, + top: function() { + $.ui.position.flip.top.apply( this, arguments ); + $.ui.position.fit.top.apply( this, arguments ); + } + } +}; + +// fraction support test +(function() { + var testElement, testElementParent, testElementStyle, offsetLeft, i, + body = document.getElementsByTagName( "body" )[ 0 ], + div = document.createElement( "div" ); + + //Create a "fake body" for testing based on method used in jQuery.support + testElement = document.createElement( body ? "div" : "body" ); + testElementStyle = { + visibility: "hidden", + width: 0, + height: 0, + border: 0, + margin: 0, + background: "none" + }; + if ( body ) { + $.extend( testElementStyle, { + position: "absolute", + left: "-1000px", + top: "-1000px" + }); + } + for ( i in testElementStyle ) { + testElement.style[ i ] = testElementStyle[ i ]; + } + testElement.appendChild( div ); + testElementParent = body || document.documentElement; + testElementParent.insertBefore( testElement, testElementParent.firstChild ); + + div.style.cssText = "position: absolute; left: 10.7432222px;"; + + offsetLeft = $( div ).offset().left; + supportsOffsetFractions = offsetLeft > 10 && offsetLeft < 11; + + testElement.innerHTML = ""; + testElementParent.removeChild( testElement ); +})(); + +})(); + +var position = $.ui.position; + + +/*! + * jQuery UI Draggable 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/draggable/ + */ + + +$.widget("ui.draggable", $.ui.mouse, { + version: "1.11.4", + widgetEventPrefix: "drag", + options: { + addClasses: true, + appendTo: "parent", + axis: false, + connectToSortable: false, + containment: false, + cursor: "auto", + cursorAt: false, + grid: false, + handle: false, + helper: "original", + iframeFix: false, + opacity: false, + refreshPositions: false, + revert: false, + revertDuration: 500, + scope: "default", + scroll: true, + scrollSensitivity: 20, + scrollSpeed: 20, + snap: false, + snapMode: "both", + snapTolerance: 20, + stack: false, + zIndex: false, + + // callbacks + drag: null, + start: null, + stop: null + }, + _create: function() { + + if ( this.options.helper === "original" ) { + this._setPositionRelative(); + } + if (this.options.addClasses){ + this.element.addClass("ui-draggable"); + } + if (this.options.disabled){ + this.element.addClass("ui-draggable-disabled"); + } + this._setHandleClassName(); + + this._mouseInit(); + }, + + _setOption: function( key, value ) { + this._super( key, value ); + if ( key === "handle" ) { + this._removeHandleClassName(); + this._setHandleClassName(); + } + }, + + _destroy: function() { + if ( ( this.helper || this.element ).is( ".ui-draggable-dragging" ) ) { + this.destroyOnClear = true; + return; + } + this.element.removeClass( "ui-draggable ui-draggable-dragging ui-draggable-disabled" ); + this._removeHandleClassName(); + this._mouseDestroy(); + }, + + _mouseCapture: function(event) { + var o = this.options; + + this._blurActiveElement( event ); + + // among others, prevent a drag on a resizable-handle + if (this.helper || o.disabled || $(event.target).closest(".ui-resizable-handle").length > 0) { + return false; + } + + //Quit if we're not on a valid handle + this.handle = this._getHandle(event); + if (!this.handle) { + return false; + } + + this._blockFrames( o.iframeFix === true ? "iframe" : o.iframeFix ); + + return true; + + }, + + _blockFrames: function( selector ) { + this.iframeBlocks = this.document.find( selector ).map(function() { + var iframe = $( this ); + + return $( "<div>" ) + .css( "position", "absolute" ) + .appendTo( iframe.parent() ) + .outerWidth( iframe.outerWidth() ) + .outerHeight( iframe.outerHeight() ) + .offset( iframe.offset() )[ 0 ]; + }); + }, + + _unblockFrames: function() { + if ( this.iframeBlocks ) { + this.iframeBlocks.remove(); + delete this.iframeBlocks; + } + }, + + _blurActiveElement: function( event ) { + var document = this.document[ 0 ]; + + // Only need to blur if the event occurred on the draggable itself, see #10527 + if ( !this.handleElement.is( event.target ) ) { + return; + } + + // support: IE9 + // IE9 throws an "Unspecified error" accessing document.activeElement from an <iframe> + try { + + // Support: IE9, IE10 + // If the <body> is blurred, IE will switch windows, see #9520 + if ( document.activeElement && document.activeElement.nodeName.toLowerCase() !== "body" ) { + + // Blur any element that currently has focus, see #4261 + $( document.activeElement ).blur(); + } + } catch ( error ) {} + }, + + _mouseStart: function(event) { + + var o = this.options; + + //Create and append the visible helper + this.helper = this._createHelper(event); + + this.helper.addClass("ui-draggable-dragging"); + + //Cache the helper size + this._cacheHelperProportions(); + + //If ddmanager is used for droppables, set the global draggable + if ($.ui.ddmanager) { + $.ui.ddmanager.current = this; + } + + /* + * - Position generation - + * This block generates everything position related - it's the core of draggables. + */ + + //Cache the margins of the original element + this._cacheMargins(); + + //Store the helper's css position + this.cssPosition = this.helper.css( "position" ); + this.scrollParent = this.helper.scrollParent( true ); + this.offsetParent = this.helper.offsetParent(); + this.hasFixedAncestor = this.helper.parents().filter(function() { + return $( this ).css( "position" ) === "fixed"; + }).length > 0; + + //The element's absolute position on the page minus margins + this.positionAbs = this.element.offset(); + this._refreshOffsets( event ); + + //Generate the original position + this.originalPosition = this.position = this._generatePosition( event, false ); + this.originalPageX = event.pageX; + this.originalPageY = event.pageY; + + //Adjust the mouse offset relative to the helper if "cursorAt" is supplied + (o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt)); + + //Set a containment if given in the options + this._setContainment(); + + //Trigger event + callbacks + if (this._trigger("start", event) === false) { + this._clear(); + return false; + } + + //Recache the helper size + this._cacheHelperProportions(); + + //Prepare the droppable offsets + if ($.ui.ddmanager && !o.dropBehaviour) { + $.ui.ddmanager.prepareOffsets(this, event); + } + + // Reset helper's right/bottom css if they're set and set explicit width/height instead + // as this prevents resizing of elements with right/bottom set (see #7772) + this._normalizeRightBottom(); + + this._mouseDrag(event, true); //Execute the drag once - this causes the helper not to be visible before getting its correct position + + //If the ddmanager is used for droppables, inform the manager that dragging has started (see #5003) + if ( $.ui.ddmanager ) { + $.ui.ddmanager.dragStart(this, event); + } + + return true; + }, + + _refreshOffsets: function( event ) { + this.offset = { + top: this.positionAbs.top - this.margins.top, + left: this.positionAbs.left - this.margins.left, + scroll: false, + parent: this._getParentOffset(), + relative: this._getRelativeOffset() + }; + + this.offset.click = { + left: event.pageX - this.offset.left, + top: event.pageY - this.offset.top + }; + }, + + _mouseDrag: function(event, noPropagation) { + // reset any necessary cached properties (see #5009) + if ( this.hasFixedAncestor ) { + this.offset.parent = this._getParentOffset(); + } + + //Compute the helpers position + this.position = this._generatePosition( event, true ); + this.positionAbs = this._convertPositionTo("absolute"); + + //Call plugins and callbacks and use the resulting position if something is returned + if (!noPropagation) { + var ui = this._uiHash(); + if (this._trigger("drag", event, ui) === false) { + this._mouseUp({}); + return false; + } + this.position = ui.position; + } + + this.helper[ 0 ].style.left = this.position.left + "px"; + this.helper[ 0 ].style.top = this.position.top + "px"; + + if ($.ui.ddmanager) { + $.ui.ddmanager.drag(this, event); + } + + return false; + }, + + _mouseStop: function(event) { + + //If we are using droppables, inform the manager about the drop + var that = this, + dropped = false; + if ($.ui.ddmanager && !this.options.dropBehaviour) { + dropped = $.ui.ddmanager.drop(this, event); + } + + //if a drop comes from outside (a sortable) + if (this.dropped) { + dropped = this.dropped; + this.dropped = false; + } + + if ((this.options.revert === "invalid" && !dropped) || (this.options.revert === "valid" && dropped) || this.options.revert === true || ($.isFunction(this.options.revert) && this.options.revert.call(this.element, dropped))) { + $(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function() { + if (that._trigger("stop", event) !== false) { + that._clear(); + } + }); + } else { + if (this._trigger("stop", event) !== false) { + this._clear(); + } + } + + return false; + }, + + _mouseUp: function( event ) { + this._unblockFrames(); + + //If the ddmanager is used for droppables, inform the manager that dragging has stopped (see #5003) + if ( $.ui.ddmanager ) { + $.ui.ddmanager.dragStop(this, event); + } + + // Only need to focus if the event occurred on the draggable itself, see #10527 + if ( this.handleElement.is( event.target ) ) { + // The interaction is over; whether or not the click resulted in a drag, focus the element + this.element.focus(); + } + + return $.ui.mouse.prototype._mouseUp.call(this, event); + }, + + cancel: function() { + + if (this.helper.is(".ui-draggable-dragging")) { + this._mouseUp({}); + } else { + this._clear(); + } + + return this; + + }, + + _getHandle: function(event) { + return this.options.handle ? + !!$( event.target ).closest( this.element.find( this.options.handle ) ).length : + true; + }, + + _setHandleClassName: function() { + this.handleElement = this.options.handle ? + this.element.find( this.options.handle ) : this.element; + this.handleElement.addClass( "ui-draggable-handle" ); + }, + + _removeHandleClassName: function() { + this.handleElement.removeClass( "ui-draggable-handle" ); + }, + + _createHelper: function(event) { + + var o = this.options, + helperIsFunction = $.isFunction( o.helper ), + helper = helperIsFunction ? + $( o.helper.apply( this.element[ 0 ], [ event ] ) ) : + ( o.helper === "clone" ? + this.element.clone().removeAttr( "id" ) : + this.element ); + + if (!helper.parents("body").length) { + helper.appendTo((o.appendTo === "parent" ? this.element[0].parentNode : o.appendTo)); + } + + // http://bugs.jqueryui.com/ticket/9446 + // a helper function can return the original element + // which wouldn't have been set to relative in _create + if ( helperIsFunction && helper[ 0 ] === this.element[ 0 ] ) { + this._setPositionRelative(); + } + + if (helper[0] !== this.element[0] && !(/(fixed|absolute)/).test(helper.css("position"))) { + helper.css("position", "absolute"); + } + + return helper; + + }, + + _setPositionRelative: function() { + if ( !( /^(?:r|a|f)/ ).test( this.element.css( "position" ) ) ) { + this.element[ 0 ].style.position = "relative"; + } + }, + + _adjustOffsetFromHelper: function(obj) { + if (typeof obj === "string") { + obj = obj.split(" "); + } + if ($.isArray(obj)) { + obj = { left: +obj[0], top: +obj[1] || 0 }; + } + if ("left" in obj) { + this.offset.click.left = obj.left + this.margins.left; + } + if ("right" in obj) { + this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left; + } + if ("top" in obj) { + this.offset.click.top = obj.top + this.margins.top; + } + if ("bottom" in obj) { + this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top; + } + }, + + _isRootNode: function( element ) { + return ( /(html|body)/i ).test( element.tagName ) || element === this.document[ 0 ]; + }, + + _getParentOffset: function() { + + //Get the offsetParent and cache its position + var po = this.offsetParent.offset(), + document = this.document[ 0 ]; + + // This is a special case where we need to modify a offset calculated on start, since the following happened: + // 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent + // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that + // the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag + if (this.cssPosition === "absolute" && this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) { + po.left += this.scrollParent.scrollLeft(); + po.top += this.scrollParent.scrollTop(); + } + + if ( this._isRootNode( this.offsetParent[ 0 ] ) ) { + po = { top: 0, left: 0 }; + } + + return { + top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0), + left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 0) + }; + + }, + + _getRelativeOffset: function() { + if ( this.cssPosition !== "relative" ) { + return { top: 0, left: 0 }; + } + + var p = this.element.position(), + scrollIsRootNode = this._isRootNode( this.scrollParent[ 0 ] ); + + return { + top: p.top - ( parseInt(this.helper.css( "top" ), 10) || 0 ) + ( !scrollIsRootNode ? this.scrollParent.scrollTop() : 0 ), + left: p.left - ( parseInt(this.helper.css( "left" ), 10) || 0 ) + ( !scrollIsRootNode ? this.scrollParent.scrollLeft() : 0 ) + }; + + }, + + _cacheMargins: function() { + this.margins = { + left: (parseInt(this.element.css("marginLeft"), 10) || 0), + top: (parseInt(this.element.css("marginTop"), 10) || 0), + right: (parseInt(this.element.css("marginRight"), 10) || 0), + bottom: (parseInt(this.element.css("marginBottom"), 10) || 0) + }; + }, + + _cacheHelperProportions: function() { + this.helperProportions = { + width: this.helper.outerWidth(), + height: this.helper.outerHeight() + }; + }, + + _setContainment: function() { + + var isUserScrollable, c, ce, + o = this.options, + document = this.document[ 0 ]; + + this.relativeContainer = null; + + if ( !o.containment ) { + this.containment = null; + return; + } + + if ( o.containment === "window" ) { + this.containment = [ + $( window ).scrollLeft() - this.offset.relative.left - this.offset.parent.left, + $( window ).scrollTop() - this.offset.relative.top - this.offset.parent.top, + $( window ).scrollLeft() + $( window ).width() - this.helperProportions.width - this.margins.left, + $( window ).scrollTop() + ( $( window ).height() || document.body.parentNode.scrollHeight ) - this.helperProportions.height - this.margins.top + ]; + return; + } + + if ( o.containment === "document") { + this.containment = [ + 0, + 0, + $( document ).width() - this.helperProportions.width - this.margins.left, + ( $( document ).height() || document.body.parentNode.scrollHeight ) - this.helperProportions.height - this.margins.top + ]; + return; + } + + if ( o.containment.constructor === Array ) { + this.containment = o.containment; + return; + } + + if ( o.containment === "parent" ) { + o.containment = this.helper[ 0 ].parentNode; + } + + c = $( o.containment ); + ce = c[ 0 ]; + + if ( !ce ) { + return; + } + + isUserScrollable = /(scroll|auto)/.test( c.css( "overflow" ) ); + + this.containment = [ + ( parseInt( c.css( "borderLeftWidth" ), 10 ) || 0 ) + ( parseInt( c.css( "paddingLeft" ), 10 ) || 0 ), + ( parseInt( c.css( "borderTopWidth" ), 10 ) || 0 ) + ( parseInt( c.css( "paddingTop" ), 10 ) || 0 ), + ( isUserScrollable ? Math.max( ce.scrollWidth, ce.offsetWidth ) : ce.offsetWidth ) - + ( parseInt( c.css( "borderRightWidth" ), 10 ) || 0 ) - + ( parseInt( c.css( "paddingRight" ), 10 ) || 0 ) - + this.helperProportions.width - + this.margins.left - + this.margins.right, + ( isUserScrollable ? Math.max( ce.scrollHeight, ce.offsetHeight ) : ce.offsetHeight ) - + ( parseInt( c.css( "borderBottomWidth" ), 10 ) || 0 ) - + ( parseInt( c.css( "paddingBottom" ), 10 ) || 0 ) - + this.helperProportions.height - + this.margins.top - + this.margins.bottom + ]; + this.relativeContainer = c; + }, + + _convertPositionTo: function(d, pos) { + + if (!pos) { + pos = this.position; + } + + var mod = d === "absolute" ? 1 : -1, + scrollIsRootNode = this._isRootNode( this.scrollParent[ 0 ] ); + + return { + top: ( + pos.top + // The absolute mouse position + this.offset.relative.top * mod + // Only for relative positioned nodes: Relative offset from element to offset parent + this.offset.parent.top * mod - // The offsetParent's offset without borders (offset + border) + ( ( this.cssPosition === "fixed" ? -this.offset.scroll.top : ( scrollIsRootNode ? 0 : this.offset.scroll.top ) ) * mod) + ), + left: ( + pos.left + // The absolute mouse position + this.offset.relative.left * mod + // Only for relative positioned nodes: Relative offset from element to offset parent + this.offset.parent.left * mod - // The offsetParent's offset without borders (offset + border) + ( ( this.cssPosition === "fixed" ? -this.offset.scroll.left : ( scrollIsRootNode ? 0 : this.offset.scroll.left ) ) * mod) + ) + }; + + }, + + _generatePosition: function( event, constrainPosition ) { + + var containment, co, top, left, + o = this.options, + scrollIsRootNode = this._isRootNode( this.scrollParent[ 0 ] ), + pageX = event.pageX, + pageY = event.pageY; + + // Cache the scroll + if ( !scrollIsRootNode || !this.offset.scroll ) { + this.offset.scroll = { + top: this.scrollParent.scrollTop(), + left: this.scrollParent.scrollLeft() + }; + } + + /* + * - Position constraining - + * Constrain the position to a mix of grid, containment. + */ + + // If we are not dragging yet, we won't check for options + if ( constrainPosition ) { + if ( this.containment ) { + if ( this.relativeContainer ){ + co = this.relativeContainer.offset(); + containment = [ + this.containment[ 0 ] + co.left, + this.containment[ 1 ] + co.top, + this.containment[ 2 ] + co.left, + this.containment[ 3 ] + co.top + ]; + } else { + containment = this.containment; + } + + if (event.pageX - this.offset.click.left < containment[0]) { + pageX = containment[0] + this.offset.click.left; + } + if (event.pageY - this.offset.click.top < containment[1]) { + pageY = containment[1] + this.offset.click.top; + } + if (event.pageX - this.offset.click.left > containment[2]) { + pageX = containment[2] + this.offset.click.left; + } + if (event.pageY - this.offset.click.top > containment[3]) { + pageY = containment[3] + this.offset.click.top; + } + } + + if (o.grid) { + //Check for grid elements set to 0 to prevent divide by 0 error causing invalid argument errors in IE (see ticket #6950) + top = o.grid[1] ? this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1] : this.originalPageY; + pageY = containment ? ((top - this.offset.click.top >= containment[1] || top - this.offset.click.top > containment[3]) ? top : ((top - this.offset.click.top >= containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top; + + left = o.grid[0] ? this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0] : this.originalPageX; + pageX = containment ? ((left - this.offset.click.left >= containment[0] || left - this.offset.click.left > containment[2]) ? left : ((left - this.offset.click.left >= containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left; + } + + if ( o.axis === "y" ) { + pageX = this.originalPageX; + } + + if ( o.axis === "x" ) { + pageY = this.originalPageY; + } + } + + return { + top: ( + pageY - // The absolute mouse position + this.offset.click.top - // Click offset (relative to the element) + this.offset.relative.top - // Only for relative positioned nodes: Relative offset from element to offset parent + this.offset.parent.top + // The offsetParent's offset without borders (offset + border) + ( this.cssPosition === "fixed" ? -this.offset.scroll.top : ( scrollIsRootNode ? 0 : this.offset.scroll.top ) ) + ), + left: ( + pageX - // The absolute mouse position + this.offset.click.left - // Click offset (relative to the element) + this.offset.relative.left - // Only for relative positioned nodes: Relative offset from element to offset parent + this.offset.parent.left + // The offsetParent's offset without borders (offset + border) + ( this.cssPosition === "fixed" ? -this.offset.scroll.left : ( scrollIsRootNode ? 0 : this.offset.scroll.left ) ) + ) + }; + + }, + + _clear: function() { + this.helper.removeClass("ui-draggable-dragging"); + if (this.helper[0] !== this.element[0] && !this.cancelHelperRemoval) { + this.helper.remove(); + } + this.helper = null; + this.cancelHelperRemoval = false; + if ( this.destroyOnClear ) { + this.destroy(); + } + }, + + _normalizeRightBottom: function() { + if ( this.options.axis !== "y" && this.helper.css( "right" ) !== "auto" ) { + this.helper.width( this.helper.width() ); + this.helper.css( "right", "auto" ); + } + if ( this.options.axis !== "x" && this.helper.css( "bottom" ) !== "auto" ) { + this.helper.height( this.helper.height() ); + this.helper.css( "bottom", "auto" ); + } + }, + + // From now on bulk stuff - mainly helpers + + _trigger: function( type, event, ui ) { + ui = ui || this._uiHash(); + $.ui.plugin.call( this, type, [ event, ui, this ], true ); + + // Absolute position and offset (see #6884 ) have to be recalculated after plugins + if ( /^(drag|start|stop)/.test( type ) ) { + this.positionAbs = this._convertPositionTo( "absolute" ); + ui.offset = this.positionAbs; + } + return $.Widget.prototype._trigger.call( this, type, event, ui ); + }, + + plugins: {}, + + _uiHash: function() { + return { + helper: this.helper, + position: this.position, + originalPosition: this.originalPosition, + offset: this.positionAbs + }; + } + +}); + +$.ui.plugin.add( "draggable", "connectToSortable", { + start: function( event, ui, draggable ) { + var uiSortable = $.extend( {}, ui, { + item: draggable.element + }); + + draggable.sortables = []; + $( draggable.options.connectToSortable ).each(function() { + var sortable = $( this ).sortable( "instance" ); + + if ( sortable && !sortable.options.disabled ) { + draggable.sortables.push( sortable ); + + // refreshPositions is called at drag start to refresh the containerCache + // which is used in drag. This ensures it's initialized and synchronized + // with any changes that might have happened on the page since initialization. + sortable.refreshPositions(); + sortable._trigger("activate", event, uiSortable); + } + }); + }, + stop: function( event, ui, draggable ) { + var uiSortable = $.extend( {}, ui, { + item: draggable.element + }); + + draggable.cancelHelperRemoval = false; + + $.each( draggable.sortables, function() { + var sortable = this; + + if ( sortable.isOver ) { + sortable.isOver = 0; + + // Allow this sortable to handle removing the helper + draggable.cancelHelperRemoval = true; + sortable.cancelHelperRemoval = false; + + // Use _storedCSS To restore properties in the sortable, + // as this also handles revert (#9675) since the draggable + // may have modified them in unexpected ways (#8809) + sortable._storedCSS = { + position: sortable.placeholder.css( "position" ), + top: sortable.placeholder.css( "top" ), + left: sortable.placeholder.css( "left" ) + }; + + sortable._mouseStop(event); + + // Once drag has ended, the sortable should return to using + // its original helper, not the shared helper from draggable + sortable.options.helper = sortable.options._helper; + } else { + // Prevent this Sortable from removing the helper. + // However, don't set the draggable to remove the helper + // either as another connected Sortable may yet handle the removal. + sortable.cancelHelperRemoval = true; + + sortable._trigger( "deactivate", event, uiSortable ); + } + }); + }, + drag: function( event, ui, draggable ) { + $.each( draggable.sortables, function() { + var innermostIntersecting = false, + sortable = this; + + // Copy over variables that sortable's _intersectsWith uses + sortable.positionAbs = draggable.positionAbs; + sortable.helperProportions = draggable.helperProportions; + sortable.offset.click = draggable.offset.click; + + if ( sortable._intersectsWith( sortable.containerCache ) ) { + innermostIntersecting = true; + + $.each( draggable.sortables, function() { + // Copy over variables that sortable's _intersectsWith uses + this.positionAbs = draggable.positionAbs; + this.helperProportions = draggable.helperProportions; + this.offset.click = draggable.offset.click; + + if ( this !== sortable && + this._intersectsWith( this.containerCache ) && + $.contains( sortable.element[ 0 ], this.element[ 0 ] ) ) { + innermostIntersecting = false; + } + + return innermostIntersecting; + }); + } + + if ( innermostIntersecting ) { + // If it intersects, we use a little isOver variable and set it once, + // so that the move-in stuff gets fired only once. + if ( !sortable.isOver ) { + sortable.isOver = 1; + + // Store draggable's parent in case we need to reappend to it later. + draggable._parent = ui.helper.parent(); + + sortable.currentItem = ui.helper + .appendTo( sortable.element ) + .data( "ui-sortable-item", true ); + + // Store helper option to later restore it + sortable.options._helper = sortable.options.helper; + + sortable.options.helper = function() { + return ui.helper[ 0 ]; + }; + + // Fire the start events of the sortable with our passed browser event, + // and our own helper (so it doesn't create a new one) + event.target = sortable.currentItem[ 0 ]; + sortable._mouseCapture( event, true ); + sortable._mouseStart( event, true, true ); + + // Because the browser event is way off the new appended portlet, + // modify necessary variables to reflect the changes + sortable.offset.click.top = draggable.offset.click.top; + sortable.offset.click.left = draggable.offset.click.left; + sortable.offset.parent.left -= draggable.offset.parent.left - + sortable.offset.parent.left; + sortable.offset.parent.top -= draggable.offset.parent.top - + sortable.offset.parent.top; + + draggable._trigger( "toSortable", event ); + + // Inform draggable that the helper is in a valid drop zone, + // used solely in the revert option to handle "valid/invalid". + draggable.dropped = sortable.element; + + // Need to refreshPositions of all sortables in the case that + // adding to one sortable changes the location of the other sortables (#9675) + $.each( draggable.sortables, function() { + this.refreshPositions(); + }); + + // hack so receive/update callbacks work (mostly) + draggable.currentItem = draggable.element; + sortable.fromOutside = draggable; + } + + if ( sortable.currentItem ) { + sortable._mouseDrag( event ); + // Copy the sortable's position because the draggable's can potentially reflect + // a relative position, while sortable is always absolute, which the dragged + // element has now become. (#8809) + ui.position = sortable.position; + } + } else { + // If it doesn't intersect with the sortable, and it intersected before, + // we fake the drag stop of the sortable, but make sure it doesn't remove + // the helper by using cancelHelperRemoval. + if ( sortable.isOver ) { + + sortable.isOver = 0; + sortable.cancelHelperRemoval = true; + + // Calling sortable's mouseStop would trigger a revert, + // so revert must be temporarily false until after mouseStop is called. + sortable.options._revert = sortable.options.revert; + sortable.options.revert = false; + + sortable._trigger( "out", event, sortable._uiHash( sortable ) ); + sortable._mouseStop( event, true ); + + // restore sortable behaviors that were modfied + // when the draggable entered the sortable area (#9481) + sortable.options.revert = sortable.options._revert; + sortable.options.helper = sortable.options._helper; + + if ( sortable.placeholder ) { + sortable.placeholder.remove(); + } + + // Restore and recalculate the draggable's offset considering the sortable + // may have modified them in unexpected ways. (#8809, #10669) + ui.helper.appendTo( draggable._parent ); + draggable._refreshOffsets( event ); + ui.position = draggable._generatePosition( event, true ); + + draggable._trigger( "fromSortable", event ); + + // Inform draggable that the helper is no longer in a valid drop zone + draggable.dropped = false; + + // Need to refreshPositions of all sortables just in case removing + // from one sortable changes the location of other sortables (#9675) + $.each( draggable.sortables, function() { + this.refreshPositions(); + }); + } + } + }); + } +}); + +$.ui.plugin.add("draggable", "cursor", { + start: function( event, ui, instance ) { + var t = $( "body" ), + o = instance.options; + + if (t.css("cursor")) { + o._cursor = t.css("cursor"); + } + t.css("cursor", o.cursor); + }, + stop: function( event, ui, instance ) { + var o = instance.options; + if (o._cursor) { + $("body").css("cursor", o._cursor); + } + } +}); + +$.ui.plugin.add("draggable", "opacity", { + start: function( event, ui, instance ) { + var t = $( ui.helper ), + o = instance.options; + if (t.css("opacity")) { + o._opacity = t.css("opacity"); + } + t.css("opacity", o.opacity); + }, + stop: function( event, ui, instance ) { + var o = instance.options; + if (o._opacity) { + $(ui.helper).css("opacity", o._opacity); + } + } +}); + +$.ui.plugin.add("draggable", "scroll", { + start: function( event, ui, i ) { + if ( !i.scrollParentNotHidden ) { + i.scrollParentNotHidden = i.helper.scrollParent( false ); + } + + if ( i.scrollParentNotHidden[ 0 ] !== i.document[ 0 ] && i.scrollParentNotHidden[ 0 ].tagName !== "HTML" ) { + i.overflowOffset = i.scrollParentNotHidden.offset(); + } + }, + drag: function( event, ui, i ) { + + var o = i.options, + scrolled = false, + scrollParent = i.scrollParentNotHidden[ 0 ], + document = i.document[ 0 ]; + + if ( scrollParent !== document && scrollParent.tagName !== "HTML" ) { + if ( !o.axis || o.axis !== "x" ) { + if ( ( i.overflowOffset.top + scrollParent.offsetHeight ) - event.pageY < o.scrollSensitivity ) { + scrollParent.scrollTop = scrolled = scrollParent.scrollTop + o.scrollSpeed; + } else if ( event.pageY - i.overflowOffset.top < o.scrollSensitivity ) { + scrollParent.scrollTop = scrolled = scrollParent.scrollTop - o.scrollSpeed; + } + } + + if ( !o.axis || o.axis !== "y" ) { + if ( ( i.overflowOffset.left + scrollParent.offsetWidth ) - event.pageX < o.scrollSensitivity ) { + scrollParent.scrollLeft = scrolled = scrollParent.scrollLeft + o.scrollSpeed; + } else if ( event.pageX - i.overflowOffset.left < o.scrollSensitivity ) { + scrollParent.scrollLeft = scrolled = scrollParent.scrollLeft - o.scrollSpeed; + } + } + + } else { + + if (!o.axis || o.axis !== "x") { + if (event.pageY - $(document).scrollTop() < o.scrollSensitivity) { + scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed); + } else if ($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity) { + scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed); + } + } + + if (!o.axis || o.axis !== "y") { + if (event.pageX - $(document).scrollLeft() < o.scrollSensitivity) { + scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed); + } else if ($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity) { + scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed); + } + } + + } + + if (scrolled !== false && $.ui.ddmanager && !o.dropBehaviour) { + $.ui.ddmanager.prepareOffsets(i, event); + } + + } +}); + +$.ui.plugin.add("draggable", "snap", { + start: function( event, ui, i ) { + + var o = i.options; + + i.snapElements = []; + + $(o.snap.constructor !== String ? ( o.snap.items || ":data(ui-draggable)" ) : o.snap).each(function() { + var $t = $(this), + $o = $t.offset(); + if (this !== i.element[0]) { + i.snapElements.push({ + item: this, + width: $t.outerWidth(), height: $t.outerHeight(), + top: $o.top, left: $o.left + }); + } + }); + + }, + drag: function( event, ui, inst ) { + + var ts, bs, ls, rs, l, r, t, b, i, first, + o = inst.options, + d = o.snapTolerance, + x1 = ui.offset.left, x2 = x1 + inst.helperProportions.width, + y1 = ui.offset.top, y2 = y1 + inst.helperProportions.height; + + for (i = inst.snapElements.length - 1; i >= 0; i--){ + + l = inst.snapElements[i].left - inst.margins.left; + r = l + inst.snapElements[i].width; + t = inst.snapElements[i].top - inst.margins.top; + b = t + inst.snapElements[i].height; + + if ( x2 < l - d || x1 > r + d || y2 < t - d || y1 > b + d || !$.contains( inst.snapElements[ i ].item.ownerDocument, inst.snapElements[ i ].item ) ) { + if (inst.snapElements[i].snapping) { + (inst.options.snap.release && inst.options.snap.release.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item }))); + } + inst.snapElements[i].snapping = false; + continue; + } + + if (o.snapMode !== "inner") { + ts = Math.abs(t - y2) <= d; + bs = Math.abs(b - y1) <= d; + ls = Math.abs(l - x2) <= d; + rs = Math.abs(r - x1) <= d; + if (ts) { + ui.position.top = inst._convertPositionTo("relative", { top: t - inst.helperProportions.height, left: 0 }).top; + } + if (bs) { + ui.position.top = inst._convertPositionTo("relative", { top: b, left: 0 }).top; + } + if (ls) { + ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l - inst.helperProportions.width }).left; + } + if (rs) { + ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r }).left; + } + } + + first = (ts || bs || ls || rs); + + if (o.snapMode !== "outer") { + ts = Math.abs(t - y1) <= d; + bs = Math.abs(b - y2) <= d; + ls = Math.abs(l - x1) <= d; + rs = Math.abs(r - x2) <= d; + if (ts) { + ui.position.top = inst._convertPositionTo("relative", { top: t, left: 0 }).top; + } + if (bs) { + ui.position.top = inst._convertPositionTo("relative", { top: b - inst.helperProportions.height, left: 0 }).top; + } + if (ls) { + ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l }).left; + } + if (rs) { + ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r - inst.helperProportions.width }).left; + } + } + + if (!inst.snapElements[i].snapping && (ts || bs || ls || rs || first)) { + (inst.options.snap.snap && inst.options.snap.snap.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item }))); + } + inst.snapElements[i].snapping = (ts || bs || ls || rs || first); + + } + + } +}); + +$.ui.plugin.add("draggable", "stack", { + start: function( event, ui, instance ) { + var min, + o = instance.options, + group = $.makeArray($(o.stack)).sort(function(a, b) { + return (parseInt($(a).css("zIndex"), 10) || 0) - (parseInt($(b).css("zIndex"), 10) || 0); + }); + + if (!group.length) { return; } + + min = parseInt($(group[0]).css("zIndex"), 10) || 0; + $(group).each(function(i) { + $(this).css("zIndex", min + i); + }); + this.css("zIndex", (min + group.length)); + } +}); + +$.ui.plugin.add("draggable", "zIndex", { + start: function( event, ui, instance ) { + var t = $( ui.helper ), + o = instance.options; + + if (t.css("zIndex")) { + o._zIndex = t.css("zIndex"); + } + t.css("zIndex", o.zIndex); + }, + stop: function( event, ui, instance ) { + var o = instance.options; + + if (o._zIndex) { + $(ui.helper).css("zIndex", o._zIndex); + } + } +}); + +var draggable = $.ui.draggable; + + +/*! + * jQuery UI Droppable 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/droppable/ + */ + + +$.widget( "ui.droppable", { + version: "1.11.4", + widgetEventPrefix: "drop", + options: { + accept: "*", + activeClass: false, + addClasses: true, + greedy: false, + hoverClass: false, + scope: "default", + tolerance: "intersect", + + // callbacks + activate: null, + deactivate: null, + drop: null, + out: null, + over: null + }, + _create: function() { + + var proportions, + o = this.options, + accept = o.accept; + + this.isover = false; + this.isout = true; + + this.accept = $.isFunction( accept ) ? accept : function( d ) { + return d.is( accept ); + }; + + this.proportions = function( /* valueToWrite */ ) { + if ( arguments.length ) { + // Store the droppable's proportions + proportions = arguments[ 0 ]; + } else { + // Retrieve or derive the droppable's proportions + return proportions ? + proportions : + proportions = { + width: this.element[ 0 ].offsetWidth, + height: this.element[ 0 ].offsetHeight + }; + } + }; + + this._addToManager( o.scope ); + + o.addClasses && this.element.addClass( "ui-droppable" ); + + }, + + _addToManager: function( scope ) { + // Add the reference and positions to the manager + $.ui.ddmanager.droppables[ scope ] = $.ui.ddmanager.droppables[ scope ] || []; + $.ui.ddmanager.droppables[ scope ].push( this ); + }, + + _splice: function( drop ) { + var i = 0; + for ( ; i < drop.length; i++ ) { + if ( drop[ i ] === this ) { + drop.splice( i, 1 ); + } + } + }, + + _destroy: function() { + var drop = $.ui.ddmanager.droppables[ this.options.scope ]; + + this._splice( drop ); + + this.element.removeClass( "ui-droppable ui-droppable-disabled" ); + }, + + _setOption: function( key, value ) { + + if ( key === "accept" ) { + this.accept = $.isFunction( value ) ? value : function( d ) { + return d.is( value ); + }; + } else if ( key === "scope" ) { + var drop = $.ui.ddmanager.droppables[ this.options.scope ]; + + this._splice( drop ); + this._addToManager( value ); + } + + this._super( key, value ); + }, + + _activate: function( event ) { + var draggable = $.ui.ddmanager.current; + if ( this.options.activeClass ) { + this.element.addClass( this.options.activeClass ); + } + if ( draggable ){ + this._trigger( "activate", event, this.ui( draggable ) ); + } + }, + + _deactivate: function( event ) { + var draggable = $.ui.ddmanager.current; + if ( this.options.activeClass ) { + this.element.removeClass( this.options.activeClass ); + } + if ( draggable ){ + this._trigger( "deactivate", event, this.ui( draggable ) ); + } + }, + + _over: function( event ) { + + var draggable = $.ui.ddmanager.current; + + // Bail if draggable and droppable are same element + if ( !draggable || ( draggable.currentItem || draggable.element )[ 0 ] === this.element[ 0 ] ) { + return; + } + + if ( this.accept.call( this.element[ 0 ], ( draggable.currentItem || draggable.element ) ) ) { + if ( this.options.hoverClass ) { + this.element.addClass( this.options.hoverClass ); + } + this._trigger( "over", event, this.ui( draggable ) ); + } + + }, + + _out: function( event ) { + + var draggable = $.ui.ddmanager.current; + + // Bail if draggable and droppable are same element + if ( !draggable || ( draggable.currentItem || draggable.element )[ 0 ] === this.element[ 0 ] ) { + return; + } + + if ( this.accept.call( this.element[ 0 ], ( draggable.currentItem || draggable.element ) ) ) { + if ( this.options.hoverClass ) { + this.element.removeClass( this.options.hoverClass ); + } + this._trigger( "out", event, this.ui( draggable ) ); + } + + }, + + _drop: function( event, custom ) { + + var draggable = custom || $.ui.ddmanager.current, + childrenIntersection = false; + + // Bail if draggable and droppable are same element + if ( !draggable || ( draggable.currentItem || draggable.element )[ 0 ] === this.element[ 0 ] ) { + return false; + } + + this.element.find( ":data(ui-droppable)" ).not( ".ui-draggable-dragging" ).each(function() { + var inst = $( this ).droppable( "instance" ); + if ( + inst.options.greedy && + !inst.options.disabled && + inst.options.scope === draggable.options.scope && + inst.accept.call( inst.element[ 0 ], ( draggable.currentItem || draggable.element ) ) && + $.ui.intersect( draggable, $.extend( inst, { offset: inst.element.offset() } ), inst.options.tolerance, event ) + ) { childrenIntersection = true; return false; } + }); + if ( childrenIntersection ) { + return false; + } + + if ( this.accept.call( this.element[ 0 ], ( draggable.currentItem || draggable.element ) ) ) { + if ( this.options.activeClass ) { + this.element.removeClass( this.options.activeClass ); + } + if ( this.options.hoverClass ) { + this.element.removeClass( this.options.hoverClass ); + } + this._trigger( "drop", event, this.ui( draggable ) ); + return this.element; + } + + return false; + + }, + + ui: function( c ) { + return { + draggable: ( c.currentItem || c.element ), + helper: c.helper, + position: c.position, + offset: c.positionAbs + }; + } + +}); + +$.ui.intersect = (function() { + function isOverAxis( x, reference, size ) { + return ( x >= reference ) && ( x < ( reference + size ) ); + } + + return function( draggable, droppable, toleranceMode, event ) { + + if ( !droppable.offset ) { + return false; + } + + var x1 = ( draggable.positionAbs || draggable.position.absolute ).left + draggable.margins.left, + y1 = ( draggable.positionAbs || draggable.position.absolute ).top + draggable.margins.top, + x2 = x1 + draggable.helperProportions.width, + y2 = y1 + draggable.helperProportions.height, + l = droppable.offset.left, + t = droppable.offset.top, + r = l + droppable.proportions().width, + b = t + droppable.proportions().height; + + switch ( toleranceMode ) { + case "fit": + return ( l <= x1 && x2 <= r && t <= y1 && y2 <= b ); + case "intersect": + return ( l < x1 + ( draggable.helperProportions.width / 2 ) && // Right Half + x2 - ( draggable.helperProportions.width / 2 ) < r && // Left Half + t < y1 + ( draggable.helperProportions.height / 2 ) && // Bottom Half + y2 - ( draggable.helperProportions.height / 2 ) < b ); // Top Half + case "pointer": + return isOverAxis( event.pageY, t, droppable.proportions().height ) && isOverAxis( event.pageX, l, droppable.proportions().width ); + case "touch": + return ( + ( y1 >= t && y1 <= b ) || // Top edge touching + ( y2 >= t && y2 <= b ) || // Bottom edge touching + ( y1 < t && y2 > b ) // Surrounded vertically + ) && ( + ( x1 >= l && x1 <= r ) || // Left edge touching + ( x2 >= l && x2 <= r ) || // Right edge touching + ( x1 < l && x2 > r ) // Surrounded horizontally + ); + default: + return false; + } + }; +})(); + +/* + This manager tracks offsets of draggables and droppables +*/ +$.ui.ddmanager = { + current: null, + droppables: { "default": [] }, + prepareOffsets: function( t, event ) { + + var i, j, + m = $.ui.ddmanager.droppables[ t.options.scope ] || [], + type = event ? event.type : null, // workaround for #2317 + list = ( t.currentItem || t.element ).find( ":data(ui-droppable)" ).addBack(); + + droppablesLoop: for ( i = 0; i < m.length; i++ ) { + + // No disabled and non-accepted + if ( m[ i ].options.disabled || ( t && !m[ i ].accept.call( m[ i ].element[ 0 ], ( t.currentItem || t.element ) ) ) ) { + continue; + } + + // Filter out elements in the current dragged item + for ( j = 0; j < list.length; j++ ) { + if ( list[ j ] === m[ i ].element[ 0 ] ) { + m[ i ].proportions().height = 0; + continue droppablesLoop; + } + } + + m[ i ].visible = m[ i ].element.css( "display" ) !== "none"; + if ( !m[ i ].visible ) { + continue; + } + + // Activate the droppable if used directly from draggables + if ( type === "mousedown" ) { + m[ i ]._activate.call( m[ i ], event ); + } + + m[ i ].offset = m[ i ].element.offset(); + m[ i ].proportions({ width: m[ i ].element[ 0 ].offsetWidth, height: m[ i ].element[ 0 ].offsetHeight }); + + } + + }, + drop: function( draggable, event ) { + + var dropped = false; + // Create a copy of the droppables in case the list changes during the drop (#9116) + $.each( ( $.ui.ddmanager.droppables[ draggable.options.scope ] || [] ).slice(), function() { + + if ( !this.options ) { + return; + } + if ( !this.options.disabled && this.visible && $.ui.intersect( draggable, this, this.options.tolerance, event ) ) { + dropped = this._drop.call( this, event ) || dropped; + } + + if ( !this.options.disabled && this.visible && this.accept.call( this.element[ 0 ], ( draggable.currentItem || draggable.element ) ) ) { + this.isout = true; + this.isover = false; + this._deactivate.call( this, event ); + } + + }); + return dropped; + + }, + dragStart: function( draggable, event ) { + // Listen for scrolling so that if the dragging causes scrolling the position of the droppables can be recalculated (see #5003) + draggable.element.parentsUntil( "body" ).bind( "scroll.droppable", function() { + if ( !draggable.options.refreshPositions ) { + $.ui.ddmanager.prepareOffsets( draggable, event ); + } + }); + }, + drag: function( draggable, event ) { + + // If you have a highly dynamic page, you might try this option. It renders positions every time you move the mouse. + if ( draggable.options.refreshPositions ) { + $.ui.ddmanager.prepareOffsets( draggable, event ); + } + + // Run through all droppables and check their positions based on specific tolerance options + $.each( $.ui.ddmanager.droppables[ draggable.options.scope ] || [], function() { + + if ( this.options.disabled || this.greedyChild || !this.visible ) { + return; + } + + var parentInstance, scope, parent, + intersects = $.ui.intersect( draggable, this, this.options.tolerance, event ), + c = !intersects && this.isover ? "isout" : ( intersects && !this.isover ? "isover" : null ); + if ( !c ) { + return; + } + + if ( this.options.greedy ) { + // find droppable parents with same scope + scope = this.options.scope; + parent = this.element.parents( ":data(ui-droppable)" ).filter(function() { + return $( this ).droppable( "instance" ).options.scope === scope; + }); + + if ( parent.length ) { + parentInstance = $( parent[ 0 ] ).droppable( "instance" ); + parentInstance.greedyChild = ( c === "isover" ); + } + } + + // we just moved into a greedy child + if ( parentInstance && c === "isover" ) { + parentInstance.isover = false; + parentInstance.isout = true; + parentInstance._out.call( parentInstance, event ); + } + + this[ c ] = true; + this[c === "isout" ? "isover" : "isout"] = false; + this[c === "isover" ? "_over" : "_out"].call( this, event ); + + // we just moved out of a greedy child + if ( parentInstance && c === "isout" ) { + parentInstance.isout = false; + parentInstance.isover = true; + parentInstance._over.call( parentInstance, event ); + } + }); + + }, + dragStop: function( draggable, event ) { + draggable.element.parentsUntil( "body" ).unbind( "scroll.droppable" ); + // Call prepareOffsets one final time since IE does not fire return scroll events when overflow was caused by drag (see #5003) + if ( !draggable.options.refreshPositions ) { + $.ui.ddmanager.prepareOffsets( draggable, event ); + } + } +}; + +var droppable = $.ui.droppable; + + +/*! + * jQuery UI Resizable 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/resizable/ + */ + + +$.widget("ui.resizable", $.ui.mouse, { + version: "1.11.4", + widgetEventPrefix: "resize", + options: { + alsoResize: false, + animate: false, + animateDuration: "slow", + animateEasing: "swing", + aspectRatio: false, + autoHide: false, + containment: false, + ghost: false, + grid: false, + handles: "e,s,se", + helper: false, + maxHeight: null, + maxWidth: null, + minHeight: 10, + minWidth: 10, + // See #7960 + zIndex: 90, + + // callbacks + resize: null, + start: null, + stop: null + }, + + _num: function( value ) { + return parseInt( value, 10 ) || 0; + }, + + _isNumber: function( value ) { + return !isNaN( parseInt( value, 10 ) ); + }, + + _hasScroll: function( el, a ) { + + if ( $( el ).css( "overflow" ) === "hidden") { + return false; + } + + var scroll = ( a && a === "left" ) ? "scrollLeft" : "scrollTop", + has = false; + + if ( el[ scroll ] > 0 ) { + return true; + } + + // TODO: determine which cases actually cause this to happen + // if the element doesn't have the scroll set, see if it's possible to + // set the scroll + el[ scroll ] = 1; + has = ( el[ scroll ] > 0 ); + el[ scroll ] = 0; + return has; + }, + + _create: function() { + + var n, i, handle, axis, hname, + that = this, + o = this.options; + this.element.addClass("ui-resizable"); + + $.extend(this, { + _aspectRatio: !!(o.aspectRatio), + aspectRatio: o.aspectRatio, + originalElement: this.element, + _proportionallyResizeElements: [], + _helper: o.helper || o.ghost || o.animate ? o.helper || "ui-resizable-helper" : null + }); + + // Wrap the element if it cannot hold child nodes + if (this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)) { + + this.element.wrap( + $("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({ + position: this.element.css("position"), + width: this.element.outerWidth(), + height: this.element.outerHeight(), + top: this.element.css("top"), + left: this.element.css("left") + }) + ); + + this.element = this.element.parent().data( + "ui-resizable", this.element.resizable( "instance" ) + ); + + this.elementIsWrapper = true; + + this.element.css({ + marginLeft: this.originalElement.css("marginLeft"), + marginTop: this.originalElement.css("marginTop"), + marginRight: this.originalElement.css("marginRight"), + marginBottom: this.originalElement.css("marginBottom") + }); + this.originalElement.css({ + marginLeft: 0, + marginTop: 0, + marginRight: 0, + marginBottom: 0 + }); + // support: Safari + // Prevent Safari textarea resize + this.originalResizeStyle = this.originalElement.css("resize"); + this.originalElement.css("resize", "none"); + + this._proportionallyResizeElements.push( this.originalElement.css({ + position: "static", + zoom: 1, + display: "block" + }) ); + + // support: IE9 + // avoid IE jump (hard set the margin) + this.originalElement.css({ margin: this.originalElement.css("margin") }); + + this._proportionallyResize(); + } + + this.handles = o.handles || + ( !$(".ui-resizable-handle", this.element).length ? + "e,s,se" : { + n: ".ui-resizable-n", + e: ".ui-resizable-e", + s: ".ui-resizable-s", + w: ".ui-resizable-w", + se: ".ui-resizable-se", + sw: ".ui-resizable-sw", + ne: ".ui-resizable-ne", + nw: ".ui-resizable-nw" + } ); + + this._handles = $(); + if ( this.handles.constructor === String ) { + + if ( this.handles === "all") { + this.handles = "n,e,s,w,se,sw,ne,nw"; + } + + n = this.handles.split(","); + this.handles = {}; + + for (i = 0; i < n.length; i++) { + + handle = $.trim(n[i]); + hname = "ui-resizable-" + handle; + axis = $("<div class='ui-resizable-handle " + hname + "'></div>"); + + axis.css({ zIndex: o.zIndex }); + + // TODO : What's going on here? + if ("se" === handle) { + axis.addClass("ui-icon ui-icon-gripsmall-diagonal-se"); + } + + this.handles[handle] = ".ui-resizable-" + handle; + this.element.append(axis); + } + + } + + this._renderAxis = function(target) { + + var i, axis, padPos, padWrapper; + + target = target || this.element; + + for (i in this.handles) { + + if (this.handles[i].constructor === String) { + this.handles[i] = this.element.children( this.handles[ i ] ).first().show(); + } else if ( this.handles[ i ].jquery || this.handles[ i ].nodeType ) { + this.handles[ i ] = $( this.handles[ i ] ); + this._on( this.handles[ i ], { "mousedown": that._mouseDown }); + } + + if (this.elementIsWrapper && this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)) { + + axis = $(this.handles[i], this.element); + + padWrapper = /sw|ne|nw|se|n|s/.test(i) ? axis.outerHeight() : axis.outerWidth(); + + padPos = [ "padding", + /ne|nw|n/.test(i) ? "Top" : + /se|sw|s/.test(i) ? "Bottom" : + /^e$/.test(i) ? "Right" : "Left" ].join(""); + + target.css(padPos, padWrapper); + + this._proportionallyResize(); + } + + this._handles = this._handles.add( this.handles[ i ] ); + } + }; + + // TODO: make renderAxis a prototype function + this._renderAxis(this.element); + + this._handles = this._handles.add( this.element.find( ".ui-resizable-handle" ) ); + this._handles.disableSelection(); + + this._handles.mouseover(function() { + if (!that.resizing) { + if (this.className) { + axis = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i); + } + that.axis = axis && axis[1] ? axis[1] : "se"; + } + }); + + if (o.autoHide) { + this._handles.hide(); + $(this.element) + .addClass("ui-resizable-autohide") + .mouseenter(function() { + if (o.disabled) { + return; + } + $(this).removeClass("ui-resizable-autohide"); + that._handles.show(); + }) + .mouseleave(function() { + if (o.disabled) { + return; + } + if (!that.resizing) { + $(this).addClass("ui-resizable-autohide"); + that._handles.hide(); + } + }); + } + + this._mouseInit(); + }, + + _destroy: function() { + + this._mouseDestroy(); + + var wrapper, + _destroy = function(exp) { + $(exp) + .removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing") + .removeData("resizable") + .removeData("ui-resizable") + .unbind(".resizable") + .find(".ui-resizable-handle") + .remove(); + }; + + // TODO: Unwrap at same DOM position + if (this.elementIsWrapper) { + _destroy(this.element); + wrapper = this.element; + this.originalElement.css({ + position: wrapper.css("position"), + width: wrapper.outerWidth(), + height: wrapper.outerHeight(), + top: wrapper.css("top"), + left: wrapper.css("left") + }).insertAfter( wrapper ); + wrapper.remove(); + } + + this.originalElement.css("resize", this.originalResizeStyle); + _destroy(this.originalElement); + + return this; + }, + + _mouseCapture: function(event) { + var i, handle, + capture = false; + + for (i in this.handles) { + handle = $(this.handles[i])[0]; + if (handle === event.target || $.contains(handle, event.target)) { + capture = true; + } + } + + return !this.options.disabled && capture; + }, + + _mouseStart: function(event) { + + var curleft, curtop, cursor, + o = this.options, + el = this.element; + + this.resizing = true; + + this._renderProxy(); + + curleft = this._num(this.helper.css("left")); + curtop = this._num(this.helper.css("top")); + + if (o.containment) { + curleft += $(o.containment).scrollLeft() || 0; + curtop += $(o.containment).scrollTop() || 0; + } + + this.offset = this.helper.offset(); + this.position = { left: curleft, top: curtop }; + + this.size = this._helper ? { + width: this.helper.width(), + height: this.helper.height() + } : { + width: el.width(), + height: el.height() + }; + + this.originalSize = this._helper ? { + width: el.outerWidth(), + height: el.outerHeight() + } : { + width: el.width(), + height: el.height() + }; + + this.sizeDiff = { + width: el.outerWidth() - el.width(), + height: el.outerHeight() - el.height() + }; + + this.originalPosition = { left: curleft, top: curtop }; + this.originalMousePosition = { left: event.pageX, top: event.pageY }; + + this.aspectRatio = (typeof o.aspectRatio === "number") ? + o.aspectRatio : + ((this.originalSize.width / this.originalSize.height) || 1); + + cursor = $(".ui-resizable-" + this.axis).css("cursor"); + $("body").css("cursor", cursor === "auto" ? this.axis + "-resize" : cursor); + + el.addClass("ui-resizable-resizing"); + this._propagate("start", event); + return true; + }, + + _mouseDrag: function(event) { + + var data, props, + smp = this.originalMousePosition, + a = this.axis, + dx = (event.pageX - smp.left) || 0, + dy = (event.pageY - smp.top) || 0, + trigger = this._change[a]; + + this._updatePrevProperties(); + + if (!trigger) { + return false; + } + + data = trigger.apply(this, [ event, dx, dy ]); + + this._updateVirtualBoundaries(event.shiftKey); + if (this._aspectRatio || event.shiftKey) { + data = this._updateRatio(data, event); + } + + data = this._respectSize(data, event); + + this._updateCache(data); + + this._propagate("resize", event); + + props = this._applyChanges(); + + if ( !this._helper && this._proportionallyResizeElements.length ) { + this._proportionallyResize(); + } + + if ( !$.isEmptyObject( props ) ) { + this._updatePrevProperties(); + this._trigger( "resize", event, this.ui() ); + this._applyChanges(); + } + + return false; + }, + + _mouseStop: function(event) { + + this.resizing = false; + var pr, ista, soffseth, soffsetw, s, left, top, + o = this.options, that = this; + + if (this._helper) { + + pr = this._proportionallyResizeElements; + ista = pr.length && (/textarea/i).test(pr[0].nodeName); + soffseth = ista && this._hasScroll(pr[0], "left") ? 0 : that.sizeDiff.height; + soffsetw = ista ? 0 : that.sizeDiff.width; + + s = { + width: (that.helper.width() - soffsetw), + height: (that.helper.height() - soffseth) + }; + left = (parseInt(that.element.css("left"), 10) + + (that.position.left - that.originalPosition.left)) || null; + top = (parseInt(that.element.css("top"), 10) + + (that.position.top - that.originalPosition.top)) || null; + + if (!o.animate) { + this.element.css($.extend(s, { top: top, left: left })); + } + + that.helper.height(that.size.height); + that.helper.width(that.size.width); + + if (this._helper && !o.animate) { + this._proportionallyResize(); + } + } + + $("body").css("cursor", "auto"); + + this.element.removeClass("ui-resizable-resizing"); + + this._propagate("stop", event); + + if (this._helper) { + this.helper.remove(); + } + + return false; + + }, + + _updatePrevProperties: function() { + this.prevPosition = { + top: this.position.top, + left: this.position.left + }; + this.prevSize = { + width: this.size.width, + height: this.size.height + }; + }, + + _applyChanges: function() { + var props = {}; + + if ( this.position.top !== this.prevPosition.top ) { + props.top = this.position.top + "px"; + } + if ( this.position.left !== this.prevPosition.left ) { + props.left = this.position.left + "px"; + } + if ( this.size.width !== this.prevSize.width ) { + props.width = this.size.width + "px"; + } + if ( this.size.height !== this.prevSize.height ) { + props.height = this.size.height + "px"; + } + + this.helper.css( props ); + + return props; + }, + + _updateVirtualBoundaries: function(forceAspectRatio) { + var pMinWidth, pMaxWidth, pMinHeight, pMaxHeight, b, + o = this.options; + + b = { + minWidth: this._isNumber(o.minWidth) ? o.minWidth : 0, + maxWidth: this._isNumber(o.maxWidth) ? o.maxWidth : Infinity, + minHeight: this._isNumber(o.minHeight) ? o.minHeight : 0, + maxHeight: this._isNumber(o.maxHeight) ? o.maxHeight : Infinity + }; + + if (this._aspectRatio || forceAspectRatio) { + pMinWidth = b.minHeight * this.aspectRatio; + pMinHeight = b.minWidth / this.aspectRatio; + pMaxWidth = b.maxHeight * this.aspectRatio; + pMaxHeight = b.maxWidth / this.aspectRatio; + + if (pMinWidth > b.minWidth) { + b.minWidth = pMinWidth; + } + if (pMinHeight > b.minHeight) { + b.minHeight = pMinHeight; + } + if (pMaxWidth < b.maxWidth) { + b.maxWidth = pMaxWidth; + } + if (pMaxHeight < b.maxHeight) { + b.maxHeight = pMaxHeight; + } + } + this._vBoundaries = b; + }, + + _updateCache: function(data) { + this.offset = this.helper.offset(); + if (this._isNumber(data.left)) { + this.position.left = data.left; + } + if (this._isNumber(data.top)) { + this.position.top = data.top; + } + if (this._isNumber(data.height)) { + this.size.height = data.height; + } + if (this._isNumber(data.width)) { + this.size.width = data.width; + } + }, + + _updateRatio: function( data ) { + + var cpos = this.position, + csize = this.size, + a = this.axis; + + if (this._isNumber(data.height)) { + data.width = (data.height * this.aspectRatio); + } else if (this._isNumber(data.width)) { + data.height = (data.width / this.aspectRatio); + } + + if (a === "sw") { + data.left = cpos.left + (csize.width - data.width); + data.top = null; + } + if (a === "nw") { + data.top = cpos.top + (csize.height - data.height); + data.left = cpos.left + (csize.width - data.width); + } + + return data; + }, + + _respectSize: function( data ) { + + var o = this._vBoundaries, + a = this.axis, + ismaxw = this._isNumber(data.width) && o.maxWidth && (o.maxWidth < data.width), + ismaxh = this._isNumber(data.height) && o.maxHeight && (o.maxHeight < data.height), + isminw = this._isNumber(data.width) && o.minWidth && (o.minWidth > data.width), + isminh = this._isNumber(data.height) && o.minHeight && (o.minHeight > data.height), + dw = this.originalPosition.left + this.originalSize.width, + dh = this.position.top + this.size.height, + cw = /sw|nw|w/.test(a), ch = /nw|ne|n/.test(a); + if (isminw) { + data.width = o.minWidth; + } + if (isminh) { + data.height = o.minHeight; + } + if (ismaxw) { + data.width = o.maxWidth; + } + if (ismaxh) { + data.height = o.maxHeight; + } + + if (isminw && cw) { + data.left = dw - o.minWidth; + } + if (ismaxw && cw) { + data.left = dw - o.maxWidth; + } + if (isminh && ch) { + data.top = dh - o.minHeight; + } + if (ismaxh && ch) { + data.top = dh - o.maxHeight; + } + + // Fixing jump error on top/left - bug #2330 + if (!data.width && !data.height && !data.left && data.top) { + data.top = null; + } else if (!data.width && !data.height && !data.top && data.left) { + data.left = null; + } + + return data; + }, + + _getPaddingPlusBorderDimensions: function( element ) { + var i = 0, + widths = [], + borders = [ + element.css( "borderTopWidth" ), + element.css( "borderRightWidth" ), + element.css( "borderBottomWidth" ), + element.css( "borderLeftWidth" ) + ], + paddings = [ + element.css( "paddingTop" ), + element.css( "paddingRight" ), + element.css( "paddingBottom" ), + element.css( "paddingLeft" ) + ]; + + for ( ; i < 4; i++ ) { + widths[ i ] = ( parseInt( borders[ i ], 10 ) || 0 ); + widths[ i ] += ( parseInt( paddings[ i ], 10 ) || 0 ); + } + + return { + height: widths[ 0 ] + widths[ 2 ], + width: widths[ 1 ] + widths[ 3 ] + }; + }, + + _proportionallyResize: function() { + + if (!this._proportionallyResizeElements.length) { + return; + } + + var prel, + i = 0, + element = this.helper || this.element; + + for ( ; i < this._proportionallyResizeElements.length; i++) { + + prel = this._proportionallyResizeElements[i]; + + // TODO: Seems like a bug to cache this.outerDimensions + // considering that we are in a loop. + if (!this.outerDimensions) { + this.outerDimensions = this._getPaddingPlusBorderDimensions( prel ); + } + + prel.css({ + height: (element.height() - this.outerDimensions.height) || 0, + width: (element.width() - this.outerDimensions.width) || 0 + }); + + } + + }, + + _renderProxy: function() { + + var el = this.element, o = this.options; + this.elementOffset = el.offset(); + + if (this._helper) { + + this.helper = this.helper || $("<div style='overflow:hidden;'></div>"); + + this.helper.addClass(this._helper).css({ + width: this.element.outerWidth() - 1, + height: this.element.outerHeight() - 1, + position: "absolute", + left: this.elementOffset.left + "px", + top: this.elementOffset.top + "px", + zIndex: ++o.zIndex //TODO: Don't modify option + }); + + this.helper + .appendTo("body") + .disableSelection(); + + } else { + this.helper = this.element; + } + + }, + + _change: { + e: function(event, dx) { + return { width: this.originalSize.width + dx }; + }, + w: function(event, dx) { + var cs = this.originalSize, sp = this.originalPosition; + return { left: sp.left + dx, width: cs.width - dx }; + }, + n: function(event, dx, dy) { + var cs = this.originalSize, sp = this.originalPosition; + return { top: sp.top + dy, height: cs.height - dy }; + }, + s: function(event, dx, dy) { + return { height: this.originalSize.height + dy }; + }, + se: function(event, dx, dy) { + return $.extend(this._change.s.apply(this, arguments), + this._change.e.apply(this, [ event, dx, dy ])); + }, + sw: function(event, dx, dy) { + return $.extend(this._change.s.apply(this, arguments), + this._change.w.apply(this, [ event, dx, dy ])); + }, + ne: function(event, dx, dy) { + return $.extend(this._change.n.apply(this, arguments), + this._change.e.apply(this, [ event, dx, dy ])); + }, + nw: function(event, dx, dy) { + return $.extend(this._change.n.apply(this, arguments), + this._change.w.apply(this, [ event, dx, dy ])); + } + }, + + _propagate: function(n, event) { + $.ui.plugin.call(this, n, [ event, this.ui() ]); + (n !== "resize" && this._trigger(n, event, this.ui())); + }, + + plugins: {}, + + ui: function() { + return { + originalElement: this.originalElement, + element: this.element, + helper: this.helper, + position: this.position, + size: this.size, + originalSize: this.originalSize, + originalPosition: this.originalPosition + }; + } + +}); + +/* + * Resizable Extensions + */ + +$.ui.plugin.add("resizable", "animate", { + + stop: function( event ) { + var that = $(this).resizable( "instance" ), + o = that.options, + pr = that._proportionallyResizeElements, + ista = pr.length && (/textarea/i).test(pr[0].nodeName), + soffseth = ista && that._hasScroll(pr[0], "left") ? 0 : that.sizeDiff.height, + soffsetw = ista ? 0 : that.sizeDiff.width, + style = { width: (that.size.width - soffsetw), height: (that.size.height - soffseth) }, + left = (parseInt(that.element.css("left"), 10) + + (that.position.left - that.originalPosition.left)) || null, + top = (parseInt(that.element.css("top"), 10) + + (that.position.top - that.originalPosition.top)) || null; + + that.element.animate( + $.extend(style, top && left ? { top: top, left: left } : {}), { + duration: o.animateDuration, + easing: o.animateEasing, + step: function() { + + var data = { + width: parseInt(that.element.css("width"), 10), + height: parseInt(that.element.css("height"), 10), + top: parseInt(that.element.css("top"), 10), + left: parseInt(that.element.css("left"), 10) + }; + + if (pr && pr.length) { + $(pr[0]).css({ width: data.width, height: data.height }); + } + + // propagating resize, and updating values for each animation step + that._updateCache(data); + that._propagate("resize", event); + + } + } + ); + } + +}); + +$.ui.plugin.add( "resizable", "containment", { + + start: function() { + var element, p, co, ch, cw, width, height, + that = $( this ).resizable( "instance" ), + o = that.options, + el = that.element, + oc = o.containment, + ce = ( oc instanceof $ ) ? oc.get( 0 ) : ( /parent/.test( oc ) ) ? el.parent().get( 0 ) : oc; + + if ( !ce ) { + return; + } + + that.containerElement = $( ce ); + + if ( /document/.test( oc ) || oc === document ) { + that.containerOffset = { + left: 0, + top: 0 + }; + that.containerPosition = { + left: 0, + top: 0 + }; + + that.parentData = { + element: $( document ), + left: 0, + top: 0, + width: $( document ).width(), + height: $( document ).height() || document.body.parentNode.scrollHeight + }; + } else { + element = $( ce ); + p = []; + $([ "Top", "Right", "Left", "Bottom" ]).each(function( i, name ) { + p[ i ] = that._num( element.css( "padding" + name ) ); + }); + + that.containerOffset = element.offset(); + that.containerPosition = element.position(); + that.containerSize = { + height: ( element.innerHeight() - p[ 3 ] ), + width: ( element.innerWidth() - p[ 1 ] ) + }; + + co = that.containerOffset; + ch = that.containerSize.height; + cw = that.containerSize.width; + width = ( that._hasScroll ( ce, "left" ) ? ce.scrollWidth : cw ); + height = ( that._hasScroll ( ce ) ? ce.scrollHeight : ch ) ; + + that.parentData = { + element: ce, + left: co.left, + top: co.top, + width: width, + height: height + }; + } + }, + + resize: function( event ) { + var woset, hoset, isParent, isOffsetRelative, + that = $( this ).resizable( "instance" ), + o = that.options, + co = that.containerOffset, + cp = that.position, + pRatio = that._aspectRatio || event.shiftKey, + cop = { + top: 0, + left: 0 + }, + ce = that.containerElement, + continueResize = true; + + if ( ce[ 0 ] !== document && ( /static/ ).test( ce.css( "position" ) ) ) { + cop = co; + } + + if ( cp.left < ( that._helper ? co.left : 0 ) ) { + that.size.width = that.size.width + + ( that._helper ? + ( that.position.left - co.left ) : + ( that.position.left - cop.left ) ); + + if ( pRatio ) { + that.size.height = that.size.width / that.aspectRatio; + continueResize = false; + } + that.position.left = o.helper ? co.left : 0; + } + + if ( cp.top < ( that._helper ? co.top : 0 ) ) { + that.size.height = that.size.height + + ( that._helper ? + ( that.position.top - co.top ) : + that.position.top ); + + if ( pRatio ) { + that.size.width = that.size.height * that.aspectRatio; + continueResize = false; + } + that.position.top = that._helper ? co.top : 0; + } + + isParent = that.containerElement.get( 0 ) === that.element.parent().get( 0 ); + isOffsetRelative = /relative|absolute/.test( that.containerElement.css( "position" ) ); + + if ( isParent && isOffsetRelative ) { + that.offset.left = that.parentData.left + that.position.left; + that.offset.top = that.parentData.top + that.position.top; + } else { + that.offset.left = that.element.offset().left; + that.offset.top = that.element.offset().top; + } + + woset = Math.abs( that.sizeDiff.width + + (that._helper ? + that.offset.left - cop.left : + (that.offset.left - co.left)) ); + + hoset = Math.abs( that.sizeDiff.height + + (that._helper ? + that.offset.top - cop.top : + (that.offset.top - co.top)) ); + + if ( woset + that.size.width >= that.parentData.width ) { + that.size.width = that.parentData.width - woset; + if ( pRatio ) { + that.size.height = that.size.width / that.aspectRatio; + continueResize = false; + } + } + + if ( hoset + that.size.height >= that.parentData.height ) { + that.size.height = that.parentData.height - hoset; + if ( pRatio ) { + that.size.width = that.size.height * that.aspectRatio; + continueResize = false; + } + } + + if ( !continueResize ) { + that.position.left = that.prevPosition.left; + that.position.top = that.prevPosition.top; + that.size.width = that.prevSize.width; + that.size.height = that.prevSize.height; + } + }, + + stop: function() { + var that = $( this ).resizable( "instance" ), + o = that.options, + co = that.containerOffset, + cop = that.containerPosition, + ce = that.containerElement, + helper = $( that.helper ), + ho = helper.offset(), + w = helper.outerWidth() - that.sizeDiff.width, + h = helper.outerHeight() - that.sizeDiff.height; + + if ( that._helper && !o.animate && ( /relative/ ).test( ce.css( "position" ) ) ) { + $( this ).css({ + left: ho.left - cop.left - co.left, + width: w, + height: h + }); + } + + if ( that._helper && !o.animate && ( /static/ ).test( ce.css( "position" ) ) ) { + $( this ).css({ + left: ho.left - cop.left - co.left, + width: w, + height: h + }); + } + } +}); + +$.ui.plugin.add("resizable", "alsoResize", { + + start: function() { + var that = $(this).resizable( "instance" ), + o = that.options; + + $(o.alsoResize).each(function() { + var el = $(this); + el.data("ui-resizable-alsoresize", { + width: parseInt(el.width(), 10), height: parseInt(el.height(), 10), + left: parseInt(el.css("left"), 10), top: parseInt(el.css("top"), 10) + }); + }); + }, + + resize: function(event, ui) { + var that = $(this).resizable( "instance" ), + o = that.options, + os = that.originalSize, + op = that.originalPosition, + delta = { + height: (that.size.height - os.height) || 0, + width: (that.size.width - os.width) || 0, + top: (that.position.top - op.top) || 0, + left: (that.position.left - op.left) || 0 + }; + + $(o.alsoResize).each(function() { + var el = $(this), start = $(this).data("ui-resizable-alsoresize"), style = {}, + css = el.parents(ui.originalElement[0]).length ? + [ "width", "height" ] : + [ "width", "height", "top", "left" ]; + + $.each(css, function(i, prop) { + var sum = (start[prop] || 0) + (delta[prop] || 0); + if (sum && sum >= 0) { + style[prop] = sum || null; + } + }); + + el.css(style); + }); + }, + + stop: function() { + $(this).removeData("resizable-alsoresize"); + } +}); + +$.ui.plugin.add("resizable", "ghost", { + + start: function() { + + var that = $(this).resizable( "instance" ), o = that.options, cs = that.size; + + that.ghost = that.originalElement.clone(); + that.ghost + .css({ + opacity: 0.25, + display: "block", + position: "relative", + height: cs.height, + width: cs.width, + margin: 0, + left: 0, + top: 0 + }) + .addClass("ui-resizable-ghost") + .addClass(typeof o.ghost === "string" ? o.ghost : ""); + + that.ghost.appendTo(that.helper); + + }, + + resize: function() { + var that = $(this).resizable( "instance" ); + if (that.ghost) { + that.ghost.css({ + position: "relative", + height: that.size.height, + width: that.size.width + }); + } + }, + + stop: function() { + var that = $(this).resizable( "instance" ); + if (that.ghost && that.helper) { + that.helper.get(0).removeChild(that.ghost.get(0)); + } + } + +}); + +$.ui.plugin.add("resizable", "grid", { + + resize: function() { + var outerDimensions, + that = $(this).resizable( "instance" ), + o = that.options, + cs = that.size, + os = that.originalSize, + op = that.originalPosition, + a = that.axis, + grid = typeof o.grid === "number" ? [ o.grid, o.grid ] : o.grid, + gridX = (grid[0] || 1), + gridY = (grid[1] || 1), + ox = Math.round((cs.width - os.width) / gridX) * gridX, + oy = Math.round((cs.height - os.height) / gridY) * gridY, + newWidth = os.width + ox, + newHeight = os.height + oy, + isMaxWidth = o.maxWidth && (o.maxWidth < newWidth), + isMaxHeight = o.maxHeight && (o.maxHeight < newHeight), + isMinWidth = o.minWidth && (o.minWidth > newWidth), + isMinHeight = o.minHeight && (o.minHeight > newHeight); + + o.grid = grid; + + if (isMinWidth) { + newWidth += gridX; + } + if (isMinHeight) { + newHeight += gridY; + } + if (isMaxWidth) { + newWidth -= gridX; + } + if (isMaxHeight) { + newHeight -= gridY; + } + + if (/^(se|s|e)$/.test(a)) { + that.size.width = newWidth; + that.size.height = newHeight; + } else if (/^(ne)$/.test(a)) { + that.size.width = newWidth; + that.size.height = newHeight; + that.position.top = op.top - oy; + } else if (/^(sw)$/.test(a)) { + that.size.width = newWidth; + that.size.height = newHeight; + that.position.left = op.left - ox; + } else { + if ( newHeight - gridY <= 0 || newWidth - gridX <= 0) { + outerDimensions = that._getPaddingPlusBorderDimensions( this ); + } + + if ( newHeight - gridY > 0 ) { + that.size.height = newHeight; + that.position.top = op.top - oy; + } else { + newHeight = gridY - outerDimensions.height; + that.size.height = newHeight; + that.position.top = op.top + os.height - newHeight; + } + if ( newWidth - gridX > 0 ) { + that.size.width = newWidth; + that.position.left = op.left - ox; + } else { + newWidth = gridX - outerDimensions.width; + that.size.width = newWidth; + that.position.left = op.left + os.width - newWidth; + } + } + } + +}); + +var resizable = $.ui.resizable; + + +/*! + * jQuery UI Selectable 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/selectable/ + */ + + +var selectable = $.widget("ui.selectable", $.ui.mouse, { + version: "1.11.4", + options: { + appendTo: "body", + autoRefresh: true, + distance: 0, + filter: "*", + tolerance: "touch", + + // callbacks + selected: null, + selecting: null, + start: null, + stop: null, + unselected: null, + unselecting: null + }, + _create: function() { + var selectees, + that = this; + + this.element.addClass("ui-selectable"); + + this.dragged = false; + + // cache selectee children based on filter + this.refresh = function() { + selectees = $(that.options.filter, that.element[0]); + selectees.addClass("ui-selectee"); + selectees.each(function() { + var $this = $(this), + pos = $this.offset(); + $.data(this, "selectable-item", { + element: this, + $element: $this, + left: pos.left, + top: pos.top, + right: pos.left + $this.outerWidth(), + bottom: pos.top + $this.outerHeight(), + startselected: false, + selected: $this.hasClass("ui-selected"), + selecting: $this.hasClass("ui-selecting"), + unselecting: $this.hasClass("ui-unselecting") + }); + }); + }; + this.refresh(); + + this.selectees = selectees.addClass("ui-selectee"); + + this._mouseInit(); + + this.helper = $("<div class='ui-selectable-helper'></div>"); + }, + + _destroy: function() { + this.selectees + .removeClass("ui-selectee") + .removeData("selectable-item"); + this.element + .removeClass("ui-selectable ui-selectable-disabled"); + this._mouseDestroy(); + }, + + _mouseStart: function(event) { + var that = this, + options = this.options; + + this.opos = [ event.pageX, event.pageY ]; + + if (this.options.disabled) { + return; + } + + this.selectees = $(options.filter, this.element[0]); + + this._trigger("start", event); + + $(options.appendTo).append(this.helper); + // position helper (lasso) + this.helper.css({ + "left": event.pageX, + "top": event.pageY, + "width": 0, + "height": 0 + }); + + if (options.autoRefresh) { + this.refresh(); + } + + this.selectees.filter(".ui-selected").each(function() { + var selectee = $.data(this, "selectable-item"); + selectee.startselected = true; + if (!event.metaKey && !event.ctrlKey) { + selectee.$element.removeClass("ui-selected"); + selectee.selected = false; + selectee.$element.addClass("ui-unselecting"); + selectee.unselecting = true; + // selectable UNSELECTING callback + that._trigger("unselecting", event, { + unselecting: selectee.element + }); + } + }); + + $(event.target).parents().addBack().each(function() { + var doSelect, + selectee = $.data(this, "selectable-item"); + if (selectee) { + doSelect = (!event.metaKey && !event.ctrlKey) || !selectee.$element.hasClass("ui-selected"); + selectee.$element + .removeClass(doSelect ? "ui-unselecting" : "ui-selected") + .addClass(doSelect ? "ui-selecting" : "ui-unselecting"); + selectee.unselecting = !doSelect; + selectee.selecting = doSelect; + selectee.selected = doSelect; + // selectable (UN)SELECTING callback + if (doSelect) { + that._trigger("selecting", event, { + selecting: selectee.element + }); + } else { + that._trigger("unselecting", event, { + unselecting: selectee.element + }); + } + return false; + } + }); + + }, + + _mouseDrag: function(event) { + + this.dragged = true; + + if (this.options.disabled) { + return; + } + + var tmp, + that = this, + options = this.options, + x1 = this.opos[0], + y1 = this.opos[1], + x2 = event.pageX, + y2 = event.pageY; + + if (x1 > x2) { tmp = x2; x2 = x1; x1 = tmp; } + if (y1 > y2) { tmp = y2; y2 = y1; y1 = tmp; } + this.helper.css({ left: x1, top: y1, width: x2 - x1, height: y2 - y1 }); + + this.selectees.each(function() { + var selectee = $.data(this, "selectable-item"), + hit = false; + + //prevent helper from being selected if appendTo: selectable + if (!selectee || selectee.element === that.element[0]) { + return; + } + + if (options.tolerance === "touch") { + hit = ( !(selectee.left > x2 || selectee.right < x1 || selectee.top > y2 || selectee.bottom < y1) ); + } else if (options.tolerance === "fit") { + hit = (selectee.left > x1 && selectee.right < x2 && selectee.top > y1 && selectee.bottom < y2); + } + + if (hit) { + // SELECT + if (selectee.selected) { + selectee.$element.removeClass("ui-selected"); + selectee.selected = false; + } + if (selectee.unselecting) { + selectee.$element.removeClass("ui-unselecting"); + selectee.unselecting = false; + } + if (!selectee.selecting) { + selectee.$element.addClass("ui-selecting"); + selectee.selecting = true; + // selectable SELECTING callback + that._trigger("selecting", event, { + selecting: selectee.element + }); + } + } else { + // UNSELECT + if (selectee.selecting) { + if ((event.metaKey || event.ctrlKey) && selectee.startselected) { + selectee.$element.removeClass("ui-selecting"); + selectee.selecting = false; + selectee.$element.addClass("ui-selected"); + selectee.selected = true; + } else { + selectee.$element.removeClass("ui-selecting"); + selectee.selecting = false; + if (selectee.startselected) { + selectee.$element.addClass("ui-unselecting"); + selectee.unselecting = true; + } + // selectable UNSELECTING callback + that._trigger("unselecting", event, { + unselecting: selectee.element + }); + } + } + if (selectee.selected) { + if (!event.metaKey && !event.ctrlKey && !selectee.startselected) { + selectee.$element.removeClass("ui-selected"); + selectee.selected = false; + + selectee.$element.addClass("ui-unselecting"); + selectee.unselecting = true; + // selectable UNSELECTING callback + that._trigger("unselecting", event, { + unselecting: selectee.element + }); + } + } + } + }); + + return false; + }, + + _mouseStop: function(event) { + var that = this; + + this.dragged = false; + + $(".ui-unselecting", this.element[0]).each(function() { + var selectee = $.data(this, "selectable-item"); + selectee.$element.removeClass("ui-unselecting"); + selectee.unselecting = false; + selectee.startselected = false; + that._trigger("unselected", event, { + unselected: selectee.element + }); + }); + $(".ui-selecting", this.element[0]).each(function() { + var selectee = $.data(this, "selectable-item"); + selectee.$element.removeClass("ui-selecting").addClass("ui-selected"); + selectee.selecting = false; + selectee.selected = true; + selectee.startselected = true; + that._trigger("selected", event, { + selected: selectee.element + }); + }); + this._trigger("stop", event); + + this.helper.remove(); + + return false; + } + +}); + + +/*! + * jQuery UI Sortable 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/sortable/ + */ + + +var sortable = $.widget("ui.sortable", $.ui.mouse, { + version: "1.11.4", + widgetEventPrefix: "sort", + ready: false, + options: { + appendTo: "parent", + axis: false, + connectWith: false, + containment: false, + cursor: "auto", + cursorAt: false, + dropOnEmpty: true, + forcePlaceholderSize: false, + forceHelperSize: false, + grid: false, + handle: false, + helper: "original", + items: "> *", + opacity: false, + placeholder: false, + revert: false, + scroll: true, + scrollSensitivity: 20, + scrollSpeed: 20, + scope: "default", + tolerance: "intersect", + zIndex: 1000, + + // callbacks + activate: null, + beforeStop: null, + change: null, + deactivate: null, + out: null, + over: null, + receive: null, + remove: null, + sort: null, + start: null, + stop: null, + update: null + }, + + _isOverAxis: function( x, reference, size ) { + return ( x >= reference ) && ( x < ( reference + size ) ); + }, + + _isFloating: function( item ) { + return (/left|right/).test(item.css("float")) || (/inline|table-cell/).test(item.css("display")); + }, + + _create: function() { + this.containerCache = {}; + this.element.addClass("ui-sortable"); + + //Get the items + this.refresh(); + + //Let's determine the parent's offset + this.offset = this.element.offset(); + + //Initialize mouse events for interaction + this._mouseInit(); + + this._setHandleClassName(); + + //We're ready to go + this.ready = true; + + }, + + _setOption: function( key, value ) { + this._super( key, value ); + + if ( key === "handle" ) { + this._setHandleClassName(); + } + }, + + _setHandleClassName: function() { + this.element.find( ".ui-sortable-handle" ).removeClass( "ui-sortable-handle" ); + $.each( this.items, function() { + ( this.instance.options.handle ? + this.item.find( this.instance.options.handle ) : this.item ) + .addClass( "ui-sortable-handle" ); + }); + }, + + _destroy: function() { + this.element + .removeClass( "ui-sortable ui-sortable-disabled" ) + .find( ".ui-sortable-handle" ) + .removeClass( "ui-sortable-handle" ); + this._mouseDestroy(); + + for ( var i = this.items.length - 1; i >= 0; i-- ) { + this.items[i].item.removeData(this.widgetName + "-item"); + } + + return this; + }, + + _mouseCapture: function(event, overrideHandle) { + var currentItem = null, + validHandle = false, + that = this; + + if (this.reverting) { + return false; + } + + if(this.options.disabled || this.options.type === "static") { + return false; + } + + //We have to refresh the items data once first + this._refreshItems(event); + + //Find out if the clicked node (or one of its parents) is a actual item in this.items + $(event.target).parents().each(function() { + if($.data(this, that.widgetName + "-item") === that) { + currentItem = $(this); + return false; + } + }); + if($.data(event.target, that.widgetName + "-item") === that) { + currentItem = $(event.target); + } + + if(!currentItem) { + return false; + } + if(this.options.handle && !overrideHandle) { + $(this.options.handle, currentItem).find("*").addBack().each(function() { + if(this === event.target) { + validHandle = true; + } + }); + if(!validHandle) { + return false; + } + } + + this.currentItem = currentItem; + this._removeCurrentsFromItems(); + return true; + + }, + + _mouseStart: function(event, overrideHandle, noActivation) { + + var i, body, + o = this.options; + + this.currentContainer = this; + + //We only need to call refreshPositions, because the refreshItems call has been moved to mouseCapture + this.refreshPositions(); + + //Create and append the visible helper + this.helper = this._createHelper(event); + + //Cache the helper size + this._cacheHelperProportions(); + + /* + * - Position generation - + * This block generates everything position related - it's the core of draggables. + */ + + //Cache the margins of the original element + this._cacheMargins(); + + //Get the next scrolling parent + this.scrollParent = this.helper.scrollParent(); + + //The element's absolute position on the page minus margins + this.offset = this.currentItem.offset(); + this.offset = { + top: this.offset.top - this.margins.top, + left: this.offset.left - this.margins.left + }; + + $.extend(this.offset, { + click: { //Where the click happened, relative to the element + left: event.pageX - this.offset.left, + top: event.pageY - this.offset.top + }, + parent: this._getParentOffset(), + relative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper + }); + + // Only after we got the offset, we can change the helper's position to absolute + // TODO: Still need to figure out a way to make relative sorting possible + this.helper.css("position", "absolute"); + this.cssPosition = this.helper.css("position"); + + //Generate the original position + this.originalPosition = this._generatePosition(event); + this.originalPageX = event.pageX; + this.originalPageY = event.pageY; + + //Adjust the mouse offset relative to the helper if "cursorAt" is supplied + (o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt)); + + //Cache the former DOM position + this.domPosition = { prev: this.currentItem.prev()[0], parent: this.currentItem.parent()[0] }; + + //If the helper is not the original, hide the original so it's not playing any role during the drag, won't cause anything bad this way + if(this.helper[0] !== this.currentItem[0]) { + this.currentItem.hide(); + } + + //Create the placeholder + this._createPlaceholder(); + + //Set a containment if given in the options + if(o.containment) { + this._setContainment(); + } + + if( o.cursor && o.cursor !== "auto" ) { // cursor option + body = this.document.find( "body" ); + + // support: IE + this.storedCursor = body.css( "cursor" ); + body.css( "cursor", o.cursor ); + + this.storedStylesheet = $( "<style>*{ cursor: "+o.cursor+" !important; }</style>" ).appendTo( body ); + } + + if(o.opacity) { // opacity option + if (this.helper.css("opacity")) { + this._storedOpacity = this.helper.css("opacity"); + } + this.helper.css("opacity", o.opacity); + } + + if(o.zIndex) { // zIndex option + if (this.helper.css("zIndex")) { + this._storedZIndex = this.helper.css("zIndex"); + } + this.helper.css("zIndex", o.zIndex); + } + + //Prepare scrolling + if(this.scrollParent[0] !== this.document[0] && this.scrollParent[0].tagName !== "HTML") { + this.overflowOffset = this.scrollParent.offset(); + } + + //Call callbacks + this._trigger("start", event, this._uiHash()); + + //Recache the helper size + if(!this._preserveHelperProportions) { + this._cacheHelperProportions(); + } + + + //Post "activate" events to possible containers + if( !noActivation ) { + for ( i = this.containers.length - 1; i >= 0; i-- ) { + this.containers[ i ]._trigger( "activate", event, this._uiHash( this ) ); + } + } + + //Prepare possible droppables + if($.ui.ddmanager) { + $.ui.ddmanager.current = this; + } + + if ($.ui.ddmanager && !o.dropBehaviour) { + $.ui.ddmanager.prepareOffsets(this, event); + } + + this.dragging = true; + + this.helper.addClass("ui-sortable-helper"); + this._mouseDrag(event); //Execute the drag once - this causes the helper not to be visible before getting its correct position + return true; + + }, + + _mouseDrag: function(event) { + var i, item, itemElement, intersection, + o = this.options, + scrolled = false; + + //Compute the helpers position + this.position = this._generatePosition(event); + this.positionAbs = this._convertPositionTo("absolute"); + + if (!this.lastPositionAbs) { + this.lastPositionAbs = this.positionAbs; + } + + //Do scrolling + if(this.options.scroll) { + if(this.scrollParent[0] !== this.document[0] && this.scrollParent[0].tagName !== "HTML") { + + if((this.overflowOffset.top + this.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity) { + this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop + o.scrollSpeed; + } else if(event.pageY - this.overflowOffset.top < o.scrollSensitivity) { + this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop - o.scrollSpeed; + } + + if((this.overflowOffset.left + this.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity) { + this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft + o.scrollSpeed; + } else if(event.pageX - this.overflowOffset.left < o.scrollSensitivity) { + this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft - o.scrollSpeed; + } + + } else { + + if(event.pageY - this.document.scrollTop() < o.scrollSensitivity) { + scrolled = this.document.scrollTop(this.document.scrollTop() - o.scrollSpeed); + } else if(this.window.height() - (event.pageY - this.document.scrollTop()) < o.scrollSensitivity) { + scrolled = this.document.scrollTop(this.document.scrollTop() + o.scrollSpeed); + } + + if(event.pageX - this.document.scrollLeft() < o.scrollSensitivity) { + scrolled = this.document.scrollLeft(this.document.scrollLeft() - o.scrollSpeed); + } else if(this.window.width() - (event.pageX - this.document.scrollLeft()) < o.scrollSensitivity) { + scrolled = this.document.scrollLeft(this.document.scrollLeft() + o.scrollSpeed); + } + + } + + if(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour) { + $.ui.ddmanager.prepareOffsets(this, event); + } + } + + //Regenerate the absolute position used for position checks + this.positionAbs = this._convertPositionTo("absolute"); + + //Set the helper position + if(!this.options.axis || this.options.axis !== "y") { + this.helper[0].style.left = this.position.left+"px"; + } + if(!this.options.axis || this.options.axis !== "x") { + this.helper[0].style.top = this.position.top+"px"; + } + + //Rearrange + for (i = this.items.length - 1; i >= 0; i--) { + + //Cache variables and intersection, continue if no intersection + item = this.items[i]; + itemElement = item.item[0]; + intersection = this._intersectsWithPointer(item); + if (!intersection) { + continue; + } + + // Only put the placeholder inside the current Container, skip all + // items from other containers. This works because when moving + // an item from one container to another the + // currentContainer is switched before the placeholder is moved. + // + // Without this, moving items in "sub-sortables" can cause + // the placeholder to jitter between the outer and inner container. + if (item.instance !== this.currentContainer) { + continue; + } + + // cannot intersect with itself + // no useless actions that have been done before + // no action if the item moved is the parent of the item checked + if (itemElement !== this.currentItem[0] && + this.placeholder[intersection === 1 ? "next" : "prev"]()[0] !== itemElement && + !$.contains(this.placeholder[0], itemElement) && + (this.options.type === "semi-dynamic" ? !$.contains(this.element[0], itemElement) : true) + ) { + + this.direction = intersection === 1 ? "down" : "up"; + + if (this.options.tolerance === "pointer" || this._intersectsWithSides(item)) { + this._rearrange(event, item); + } else { + break; + } + + this._trigger("change", event, this._uiHash()); + break; + } + } + + //Post events to containers + this._contactContainers(event); + + //Interconnect with droppables + if($.ui.ddmanager) { + $.ui.ddmanager.drag(this, event); + } + + //Call callbacks + this._trigger("sort", event, this._uiHash()); + + this.lastPositionAbs = this.positionAbs; + return false; + + }, + + _mouseStop: function(event, noPropagation) { + + if(!event) { + return; + } + + //If we are using droppables, inform the manager about the drop + if ($.ui.ddmanager && !this.options.dropBehaviour) { + $.ui.ddmanager.drop(this, event); + } + + if(this.options.revert) { + var that = this, + cur = this.placeholder.offset(), + axis = this.options.axis, + animation = {}; + + if ( !axis || axis === "x" ) { + animation.left = cur.left - this.offset.parent.left - this.margins.left + (this.offsetParent[0] === this.document[0].body ? 0 : this.offsetParent[0].scrollLeft); + } + if ( !axis || axis === "y" ) { + animation.top = cur.top - this.offset.parent.top - this.margins.top + (this.offsetParent[0] === this.document[0].body ? 0 : this.offsetParent[0].scrollTop); + } + this.reverting = true; + $(this.helper).animate( animation, parseInt(this.options.revert, 10) || 500, function() { + that._clear(event); + }); + } else { + this._clear(event, noPropagation); + } + + return false; + + }, + + cancel: function() { + + if(this.dragging) { + + this._mouseUp({ target: null }); + + if(this.options.helper === "original") { + this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"); + } else { + this.currentItem.show(); + } + + //Post deactivating events to containers + for (var i = this.containers.length - 1; i >= 0; i--){ + this.containers[i]._trigger("deactivate", null, this._uiHash(this)); + if(this.containers[i].containerCache.over) { + this.containers[i]._trigger("out", null, this._uiHash(this)); + this.containers[i].containerCache.over = 0; + } + } + + } + + if (this.placeholder) { + //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node! + if(this.placeholder[0].parentNode) { + this.placeholder[0].parentNode.removeChild(this.placeholder[0]); + } + if(this.options.helper !== "original" && this.helper && this.helper[0].parentNode) { + this.helper.remove(); + } + + $.extend(this, { + helper: null, + dragging: false, + reverting: false, + _noFinalSort: null + }); + + if(this.domPosition.prev) { + $(this.domPosition.prev).after(this.currentItem); + } else { + $(this.domPosition.parent).prepend(this.currentItem); + } + } + + return this; + + }, + + serialize: function(o) { + + var items = this._getItemsAsjQuery(o && o.connected), + str = []; + o = o || {}; + + $(items).each(function() { + var res = ($(o.item || this).attr(o.attribute || "id") || "").match(o.expression || (/(.+)[\-=_](.+)/)); + if (res) { + str.push((o.key || res[1]+"[]")+"="+(o.key && o.expression ? res[1] : res[2])); + } + }); + + if(!str.length && o.key) { + str.push(o.key + "="); + } + + return str.join("&"); + + }, + + toArray: function(o) { + + var items = this._getItemsAsjQuery(o && o.connected), + ret = []; + + o = o || {}; + + items.each(function() { ret.push($(o.item || this).attr(o.attribute || "id") || ""); }); + return ret; + + }, + + /* Be careful with the following core functions */ + _intersectsWith: function(item) { + + var x1 = this.positionAbs.left, + x2 = x1 + this.helperProportions.width, + y1 = this.positionAbs.top, + y2 = y1 + this.helperProportions.height, + l = item.left, + r = l + item.width, + t = item.top, + b = t + item.height, + dyClick = this.offset.click.top, + dxClick = this.offset.click.left, + isOverElementHeight = ( this.options.axis === "x" ) || ( ( y1 + dyClick ) > t && ( y1 + dyClick ) < b ), + isOverElementWidth = ( this.options.axis === "y" ) || ( ( x1 + dxClick ) > l && ( x1 + dxClick ) < r ), + isOverElement = isOverElementHeight && isOverElementWidth; + + if ( this.options.tolerance === "pointer" || + this.options.forcePointerForContainers || + (this.options.tolerance !== "pointer" && this.helperProportions[this.floating ? "width" : "height"] > item[this.floating ? "width" : "height"]) + ) { + return isOverElement; + } else { + + return (l < x1 + (this.helperProportions.width / 2) && // Right Half + x2 - (this.helperProportions.width / 2) < r && // Left Half + t < y1 + (this.helperProportions.height / 2) && // Bottom Half + y2 - (this.helperProportions.height / 2) < b ); // Top Half + + } + }, + + _intersectsWithPointer: function(item) { + + var isOverElementHeight = (this.options.axis === "x") || this._isOverAxis(this.positionAbs.top + this.offset.click.top, item.top, item.height), + isOverElementWidth = (this.options.axis === "y") || this._isOverAxis(this.positionAbs.left + this.offset.click.left, item.left, item.width), + isOverElement = isOverElementHeight && isOverElementWidth, + verticalDirection = this._getDragVerticalDirection(), + horizontalDirection = this._getDragHorizontalDirection(); + + if (!isOverElement) { + return false; + } + + return this.floating ? + ( ((horizontalDirection && horizontalDirection === "right") || verticalDirection === "down") ? 2 : 1 ) + : ( verticalDirection && (verticalDirection === "down" ? 2 : 1) ); + + }, + + _intersectsWithSides: function(item) { + + var isOverBottomHalf = this._isOverAxis(this.positionAbs.top + this.offset.click.top, item.top + (item.height/2), item.height), + isOverRightHalf = this._isOverAxis(this.positionAbs.left + this.offset.click.left, item.left + (item.width/2), item.width), + verticalDirection = this._getDragVerticalDirection(), + horizontalDirection = this._getDragHorizontalDirection(); + + if (this.floating && horizontalDirection) { + return ((horizontalDirection === "right" && isOverRightHalf) || (horizontalDirection === "left" && !isOverRightHalf)); + } else { + return verticalDirection && ((verticalDirection === "down" && isOverBottomHalf) || (verticalDirection === "up" && !isOverBottomHalf)); + } + + }, + + _getDragVerticalDirection: function() { + var delta = this.positionAbs.top - this.lastPositionAbs.top; + return delta !== 0 && (delta > 0 ? "down" : "up"); + }, + + _getDragHorizontalDirection: function() { + var delta = this.positionAbs.left - this.lastPositionAbs.left; + return delta !== 0 && (delta > 0 ? "right" : "left"); + }, + + refresh: function(event) { + this._refreshItems(event); + this._setHandleClassName(); + this.refreshPositions(); + return this; + }, + + _connectWith: function() { + var options = this.options; + return options.connectWith.constructor === String ? [options.connectWith] : options.connectWith; + }, + + _getItemsAsjQuery: function(connected) { + + var i, j, cur, inst, + items = [], + queries = [], + connectWith = this._connectWith(); + + if(connectWith && connected) { + for (i = connectWith.length - 1; i >= 0; i--){ + cur = $(connectWith[i], this.document[0]); + for ( j = cur.length - 1; j >= 0; j--){ + inst = $.data(cur[j], this.widgetFullName); + if(inst && inst !== this && !inst.options.disabled) { + queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element) : $(inst.options.items, inst.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), inst]); + } + } + } + } + + queries.push([$.isFunction(this.options.items) ? this.options.items.call(this.element, null, { options: this.options, item: this.currentItem }) : $(this.options.items, this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), this]); + + function addItems() { + items.push( this ); + } + for (i = queries.length - 1; i >= 0; i--){ + queries[i][0].each( addItems ); + } + + return $(items); + + }, + + _removeCurrentsFromItems: function() { + + var list = this.currentItem.find(":data(" + this.widgetName + "-item)"); + + this.items = $.grep(this.items, function (item) { + for (var j=0; j < list.length; j++) { + if(list[j] === item.item[0]) { + return false; + } + } + return true; + }); + + }, + + _refreshItems: function(event) { + + this.items = []; + this.containers = [this]; + + var i, j, cur, inst, targetData, _queries, item, queriesLength, + items = this.items, + queries = [[$.isFunction(this.options.items) ? this.options.items.call(this.element[0], event, { item: this.currentItem }) : $(this.options.items, this.element), this]], + connectWith = this._connectWith(); + + if(connectWith && this.ready) { //Shouldn't be run the first time through due to massive slow-down + for (i = connectWith.length - 1; i >= 0; i--){ + cur = $(connectWith[i], this.document[0]); + for (j = cur.length - 1; j >= 0; j--){ + inst = $.data(cur[j], this.widgetFullName); + if(inst && inst !== this && !inst.options.disabled) { + queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element[0], event, { item: this.currentItem }) : $(inst.options.items, inst.element), inst]); + this.containers.push(inst); + } + } + } + } + + for (i = queries.length - 1; i >= 0; i--) { + targetData = queries[i][1]; + _queries = queries[i][0]; + + for (j=0, queriesLength = _queries.length; j < queriesLength; j++) { + item = $(_queries[j]); + + item.data(this.widgetName + "-item", targetData); // Data for target checking (mouse manager) + + items.push({ + item: item, + instance: targetData, + width: 0, height: 0, + left: 0, top: 0 + }); + } + } + + }, + + refreshPositions: function(fast) { + + // Determine whether items are being displayed horizontally + this.floating = this.items.length ? + this.options.axis === "x" || this._isFloating( this.items[ 0 ].item ) : + false; + + //This has to be redone because due to the item being moved out/into the offsetParent, the offsetParent's position will change + if(this.offsetParent && this.helper) { + this.offset.parent = this._getParentOffset(); + } + + var i, item, t, p; + + for (i = this.items.length - 1; i >= 0; i--){ + item = this.items[i]; + + //We ignore calculating positions of all connected containers when we're not over them + if(item.instance !== this.currentContainer && this.currentContainer && item.item[0] !== this.currentItem[0]) { + continue; + } + + t = this.options.toleranceElement ? $(this.options.toleranceElement, item.item) : item.item; + + if (!fast) { + item.width = t.outerWidth(); + item.height = t.outerHeight(); + } + + p = t.offset(); + item.left = p.left; + item.top = p.top; + } + + if(this.options.custom && this.options.custom.refreshContainers) { + this.options.custom.refreshContainers.call(this); + } else { + for (i = this.containers.length - 1; i >= 0; i--){ + p = this.containers[i].element.offset(); + this.containers[i].containerCache.left = p.left; + this.containers[i].containerCache.top = p.top; + this.containers[i].containerCache.width = this.containers[i].element.outerWidth(); + this.containers[i].containerCache.height = this.containers[i].element.outerHeight(); + } + } + + return this; + }, + + _createPlaceholder: function(that) { + that = that || this; + var className, + o = that.options; + + if(!o.placeholder || o.placeholder.constructor === String) { + className = o.placeholder; + o.placeholder = { + element: function() { + + var nodeName = that.currentItem[0].nodeName.toLowerCase(), + element = $( "<" + nodeName + ">", that.document[0] ) + .addClass(className || that.currentItem[0].className+" ui-sortable-placeholder") + .removeClass("ui-sortable-helper"); + + if ( nodeName === "tbody" ) { + that._createTrPlaceholder( + that.currentItem.find( "tr" ).eq( 0 ), + $( "<tr>", that.document[ 0 ] ).appendTo( element ) + ); + } else if ( nodeName === "tr" ) { + that._createTrPlaceholder( that.currentItem, element ); + } else if ( nodeName === "img" ) { + element.attr( "src", that.currentItem.attr( "src" ) ); + } + + if ( !className ) { + element.css( "visibility", "hidden" ); + } + + return element; + }, + update: function(container, p) { + + // 1. If a className is set as 'placeholder option, we don't force sizes - the class is responsible for that + // 2. The option 'forcePlaceholderSize can be enabled to force it even if a class name is specified + if(className && !o.forcePlaceholderSize) { + return; + } + + //If the element doesn't have a actual height by itself (without styles coming from a stylesheet), it receives the inline height from the dragged item + if(!p.height()) { p.height(that.currentItem.innerHeight() - parseInt(that.currentItem.css("paddingTop")||0, 10) - parseInt(that.currentItem.css("paddingBottom")||0, 10)); } + if(!p.width()) { p.width(that.currentItem.innerWidth() - parseInt(that.currentItem.css("paddingLeft")||0, 10) - parseInt(that.currentItem.css("paddingRight")||0, 10)); } + } + }; + } + + //Create the placeholder + that.placeholder = $(o.placeholder.element.call(that.element, that.currentItem)); + + //Append it after the actual current item + that.currentItem.after(that.placeholder); + + //Update the size of the placeholder (TODO: Logic to fuzzy, see line 316/317) + o.placeholder.update(that, that.placeholder); + + }, + + _createTrPlaceholder: function( sourceTr, targetTr ) { + var that = this; + + sourceTr.children().each(function() { + $( "<td> </td>", that.document[ 0 ] ) + .attr( "colspan", $( this ).attr( "colspan" ) || 1 ) + .appendTo( targetTr ); + }); + }, + + _contactContainers: function(event) { + var i, j, dist, itemWithLeastDistance, posProperty, sizeProperty, cur, nearBottom, floating, axis, + innermostContainer = null, + innermostIndex = null; + + // get innermost container that intersects with item + for (i = this.containers.length - 1; i >= 0; i--) { + + // never consider a container that's located within the item itself + if($.contains(this.currentItem[0], this.containers[i].element[0])) { + continue; + } + + if(this._intersectsWith(this.containers[i].containerCache)) { + + // if we've already found a container and it's more "inner" than this, then continue + if(innermostContainer && $.contains(this.containers[i].element[0], innermostContainer.element[0])) { + continue; + } + + innermostContainer = this.containers[i]; + innermostIndex = i; + + } else { + // container doesn't intersect. trigger "out" event if necessary + if(this.containers[i].containerCache.over) { + this.containers[i]._trigger("out", event, this._uiHash(this)); + this.containers[i].containerCache.over = 0; + } + } + + } + + // if no intersecting containers found, return + if(!innermostContainer) { + return; + } + + // move the item into the container if it's not there already + if(this.containers.length === 1) { + if (!this.containers[innermostIndex].containerCache.over) { + this.containers[innermostIndex]._trigger("over", event, this._uiHash(this)); + this.containers[innermostIndex].containerCache.over = 1; + } + } else { + + //When entering a new container, we will find the item with the least distance and append our item near it + dist = 10000; + itemWithLeastDistance = null; + floating = innermostContainer.floating || this._isFloating(this.currentItem); + posProperty = floating ? "left" : "top"; + sizeProperty = floating ? "width" : "height"; + axis = floating ? "clientX" : "clientY"; + + for (j = this.items.length - 1; j >= 0; j--) { + if(!$.contains(this.containers[innermostIndex].element[0], this.items[j].item[0])) { + continue; + } + if(this.items[j].item[0] === this.currentItem[0]) { + continue; + } + + cur = this.items[j].item.offset()[posProperty]; + nearBottom = false; + if ( event[ axis ] - cur > this.items[ j ][ sizeProperty ] / 2 ) { + nearBottom = true; + } + + if ( Math.abs( event[ axis ] - cur ) < dist ) { + dist = Math.abs( event[ axis ] - cur ); + itemWithLeastDistance = this.items[ j ]; + this.direction = nearBottom ? "up": "down"; + } + } + + //Check if dropOnEmpty is enabled + if(!itemWithLeastDistance && !this.options.dropOnEmpty) { + return; + } + + if(this.currentContainer === this.containers[innermostIndex]) { + if ( !this.currentContainer.containerCache.over ) { + this.containers[ innermostIndex ]._trigger( "over", event, this._uiHash() ); + this.currentContainer.containerCache.over = 1; + } + return; + } + + itemWithLeastDistance ? this._rearrange(event, itemWithLeastDistance, null, true) : this._rearrange(event, null, this.containers[innermostIndex].element, true); + this._trigger("change", event, this._uiHash()); + this.containers[innermostIndex]._trigger("change", event, this._uiHash(this)); + this.currentContainer = this.containers[innermostIndex]; + + //Update the placeholder + this.options.placeholder.update(this.currentContainer, this.placeholder); + + this.containers[innermostIndex]._trigger("over", event, this._uiHash(this)); + this.containers[innermostIndex].containerCache.over = 1; + } + + + }, + + _createHelper: function(event) { + + var o = this.options, + helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event, this.currentItem])) : (o.helper === "clone" ? this.currentItem.clone() : this.currentItem); + + //Add the helper to the DOM if that didn't happen already + if(!helper.parents("body").length) { + $(o.appendTo !== "parent" ? o.appendTo : this.currentItem[0].parentNode)[0].appendChild(helper[0]); + } + + if(helper[0] === this.currentItem[0]) { + this._storedCSS = { width: this.currentItem[0].style.width, height: this.currentItem[0].style.height, position: this.currentItem.css("position"), top: this.currentItem.css("top"), left: this.currentItem.css("left") }; + } + + if(!helper[0].style.width || o.forceHelperSize) { + helper.width(this.currentItem.width()); + } + if(!helper[0].style.height || o.forceHelperSize) { + helper.height(this.currentItem.height()); + } + + return helper; + + }, + + _adjustOffsetFromHelper: function(obj) { + if (typeof obj === "string") { + obj = obj.split(" "); + } + if ($.isArray(obj)) { + obj = {left: +obj[0], top: +obj[1] || 0}; + } + if ("left" in obj) { + this.offset.click.left = obj.left + this.margins.left; + } + if ("right" in obj) { + this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left; + } + if ("top" in obj) { + this.offset.click.top = obj.top + this.margins.top; + } + if ("bottom" in obj) { + this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top; + } + }, + + _getParentOffset: function() { + + + //Get the offsetParent and cache its position + this.offsetParent = this.helper.offsetParent(); + var po = this.offsetParent.offset(); + + // This is a special case where we need to modify a offset calculated on start, since the following happened: + // 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent + // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that + // the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag + if(this.cssPosition === "absolute" && this.scrollParent[0] !== this.document[0] && $.contains(this.scrollParent[0], this.offsetParent[0])) { + po.left += this.scrollParent.scrollLeft(); + po.top += this.scrollParent.scrollTop(); + } + + // This needs to be actually done for all browsers, since pageX/pageY includes this information + // with an ugly IE fix + if( this.offsetParent[0] === this.document[0].body || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() === "html" && $.ui.ie)) { + po = { top: 0, left: 0 }; + } + + return { + top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0), + left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0) + }; + + }, + + _getRelativeOffset: function() { + + if(this.cssPosition === "relative") { + var p = this.currentItem.position(); + return { + top: p.top - (parseInt(this.helper.css("top"),10) || 0) + this.scrollParent.scrollTop(), + left: p.left - (parseInt(this.helper.css("left"),10) || 0) + this.scrollParent.scrollLeft() + }; + } else { + return { top: 0, left: 0 }; + } + + }, + + _cacheMargins: function() { + this.margins = { + left: (parseInt(this.currentItem.css("marginLeft"),10) || 0), + top: (parseInt(this.currentItem.css("marginTop"),10) || 0) + }; + }, + + _cacheHelperProportions: function() { + this.helperProportions = { + width: this.helper.outerWidth(), + height: this.helper.outerHeight() + }; + }, + + _setContainment: function() { + + var ce, co, over, + o = this.options; + if(o.containment === "parent") { + o.containment = this.helper[0].parentNode; + } + if(o.containment === "document" || o.containment === "window") { + this.containment = [ + 0 - this.offset.relative.left - this.offset.parent.left, + 0 - this.offset.relative.top - this.offset.parent.top, + o.containment === "document" ? this.document.width() : this.window.width() - this.helperProportions.width - this.margins.left, + (o.containment === "document" ? this.document.width() : this.window.height() || this.document[0].body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top + ]; + } + + if(!(/^(document|window|parent)$/).test(o.containment)) { + ce = $(o.containment)[0]; + co = $(o.containment).offset(); + over = ($(ce).css("overflow") !== "hidden"); + + this.containment = [ + co.left + (parseInt($(ce).css("borderLeftWidth"),10) || 0) + (parseInt($(ce).css("paddingLeft"),10) || 0) - this.margins.left, + co.top + (parseInt($(ce).css("borderTopWidth"),10) || 0) + (parseInt($(ce).css("paddingTop"),10) || 0) - this.margins.top, + co.left+(over ? Math.max(ce.scrollWidth,ce.offsetWidth) : ce.offsetWidth) - (parseInt($(ce).css("borderLeftWidth"),10) || 0) - (parseInt($(ce).css("paddingRight"),10) || 0) - this.helperProportions.width - this.margins.left, + co.top+(over ? Math.max(ce.scrollHeight,ce.offsetHeight) : ce.offsetHeight) - (parseInt($(ce).css("borderTopWidth"),10) || 0) - (parseInt($(ce).css("paddingBottom"),10) || 0) - this.helperProportions.height - this.margins.top + ]; + } + + }, + + _convertPositionTo: function(d, pos) { + + if(!pos) { + pos = this.position; + } + var mod = d === "absolute" ? 1 : -1, + scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== this.document[0] && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, + scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName); + + return { + top: ( + pos.top + // The absolute mouse position + this.offset.relative.top * mod + // Only for relative positioned nodes: Relative offset from element to offset parent + this.offset.parent.top * mod - // The offsetParent's offset without borders (offset + border) + ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod) + ), + left: ( + pos.left + // The absolute mouse position + this.offset.relative.left * mod + // Only for relative positioned nodes: Relative offset from element to offset parent + this.offset.parent.left * mod - // The offsetParent's offset without borders (offset + border) + ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod) + ) + }; + + }, + + _generatePosition: function(event) { + + var top, left, + o = this.options, + pageX = event.pageX, + pageY = event.pageY, + scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== this.document[0] && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName); + + // This is another very weird special case that only happens for relative elements: + // 1. If the css position is relative + // 2. and the scroll parent is the document or similar to the offset parent + // we have to refresh the relative offset during the scroll so there are no jumps + if(this.cssPosition === "relative" && !(this.scrollParent[0] !== this.document[0] && this.scrollParent[0] !== this.offsetParent[0])) { + this.offset.relative = this._getRelativeOffset(); + } + + /* + * - Position constraining - + * Constrain the position to a mix of grid, containment. + */ + + if(this.originalPosition) { //If we are not dragging yet, we won't check for options + + if(this.containment) { + if(event.pageX - this.offset.click.left < this.containment[0]) { + pageX = this.containment[0] + this.offset.click.left; + } + if(event.pageY - this.offset.click.top < this.containment[1]) { + pageY = this.containment[1] + this.offset.click.top; + } + if(event.pageX - this.offset.click.left > this.containment[2]) { + pageX = this.containment[2] + this.offset.click.left; + } + if(event.pageY - this.offset.click.top > this.containment[3]) { + pageY = this.containment[3] + this.offset.click.top; + } + } + + if(o.grid) { + top = this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1]; + pageY = this.containment ? ( (top - this.offset.click.top >= this.containment[1] && top - this.offset.click.top <= this.containment[3]) ? top : ((top - this.offset.click.top >= this.containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top; + + left = this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0]; + pageX = this.containment ? ( (left - this.offset.click.left >= this.containment[0] && left - this.offset.click.left <= this.containment[2]) ? left : ((left - this.offset.click.left >= this.containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left; + } + + } + + return { + top: ( + pageY - // The absolute mouse position + this.offset.click.top - // Click offset (relative to the element) + this.offset.relative.top - // Only for relative positioned nodes: Relative offset from element to offset parent + this.offset.parent.top + // The offsetParent's offset without borders (offset + border) + ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) )) + ), + left: ( + pageX - // The absolute mouse position + this.offset.click.left - // Click offset (relative to the element) + this.offset.relative.left - // Only for relative positioned nodes: Relative offset from element to offset parent + this.offset.parent.left + // The offsetParent's offset without borders (offset + border) + ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() )) + ) + }; + + }, + + _rearrange: function(event, i, a, hardRefresh) { + + a ? a[0].appendChild(this.placeholder[0]) : i.item[0].parentNode.insertBefore(this.placeholder[0], (this.direction === "down" ? i.item[0] : i.item[0].nextSibling)); + + //Various things done here to improve the performance: + // 1. we create a setTimeout, that calls refreshPositions + // 2. on the instance, we have a counter variable, that get's higher after every append + // 3. on the local scope, we copy the counter variable, and check in the timeout, if it's still the same + // 4. this lets only the last addition to the timeout stack through + this.counter = this.counter ? ++this.counter : 1; + var counter = this.counter; + + this._delay(function() { + if(counter === this.counter) { + this.refreshPositions(!hardRefresh); //Precompute after each DOM insertion, NOT on mousemove + } + }); + + }, + + _clear: function(event, noPropagation) { + + this.reverting = false; + // We delay all events that have to be triggered to after the point where the placeholder has been removed and + // everything else normalized again + var i, + delayedTriggers = []; + + // We first have to update the dom position of the actual currentItem + // Note: don't do it if the current item is already removed (by a user), or it gets reappended (see #4088) + if(!this._noFinalSort && this.currentItem.parent().length) { + this.placeholder.before(this.currentItem); + } + this._noFinalSort = null; + + if(this.helper[0] === this.currentItem[0]) { + for(i in this._storedCSS) { + if(this._storedCSS[i] === "auto" || this._storedCSS[i] === "static") { + this._storedCSS[i] = ""; + } + } + this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"); + } else { + this.currentItem.show(); + } + + if(this.fromOutside && !noPropagation) { + delayedTriggers.push(function(event) { this._trigger("receive", event, this._uiHash(this.fromOutside)); }); + } + if((this.fromOutside || this.domPosition.prev !== this.currentItem.prev().not(".ui-sortable-helper")[0] || this.domPosition.parent !== this.currentItem.parent()[0]) && !noPropagation) { + delayedTriggers.push(function(event) { this._trigger("update", event, this._uiHash()); }); //Trigger update callback if the DOM position has changed + } + + // Check if the items Container has Changed and trigger appropriate + // events. + if (this !== this.currentContainer) { + if(!noPropagation) { + delayedTriggers.push(function(event) { this._trigger("remove", event, this._uiHash()); }); + delayedTriggers.push((function(c) { return function(event) { c._trigger("receive", event, this._uiHash(this)); }; }).call(this, this.currentContainer)); + delayedTriggers.push((function(c) { return function(event) { c._trigger("update", event, this._uiHash(this)); }; }).call(this, this.currentContainer)); + } + } + + + //Post events to containers + function delayEvent( type, instance, container ) { + return function( event ) { + container._trigger( type, event, instance._uiHash( instance ) ); + }; + } + for (i = this.containers.length - 1; i >= 0; i--){ + if (!noPropagation) { + delayedTriggers.push( delayEvent( "deactivate", this, this.containers[ i ] ) ); + } + if(this.containers[i].containerCache.over) { + delayedTriggers.push( delayEvent( "out", this, this.containers[ i ] ) ); + this.containers[i].containerCache.over = 0; + } + } + + //Do what was originally in plugins + if ( this.storedCursor ) { + this.document.find( "body" ).css( "cursor", this.storedCursor ); + this.storedStylesheet.remove(); + } + if(this._storedOpacity) { + this.helper.css("opacity", this._storedOpacity); + } + if(this._storedZIndex) { + this.helper.css("zIndex", this._storedZIndex === "auto" ? "" : this._storedZIndex); + } + + this.dragging = false; + + if(!noPropagation) { + this._trigger("beforeStop", event, this._uiHash()); + } + + //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node! + this.placeholder[0].parentNode.removeChild(this.placeholder[0]); + + if ( !this.cancelHelperRemoval ) { + if ( this.helper[ 0 ] !== this.currentItem[ 0 ] ) { + this.helper.remove(); + } + this.helper = null; + } + + if(!noPropagation) { + for (i=0; i < delayedTriggers.length; i++) { + delayedTriggers[i].call(this, event); + } //Trigger all delayed events + this._trigger("stop", event, this._uiHash()); + } + + this.fromOutside = false; + return !this.cancelHelperRemoval; + + }, + + _trigger: function() { + if ($.Widget.prototype._trigger.apply(this, arguments) === false) { + this.cancel(); + } + }, + + _uiHash: function(_inst) { + var inst = _inst || this; + return { + helper: inst.helper, + placeholder: inst.placeholder || $([]), + position: inst.position, + originalPosition: inst.originalPosition, + offset: inst.positionAbs, + item: inst.currentItem, + sender: _inst ? _inst.element : null + }; + } + +}); + + +/*! + * jQuery UI Accordion 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/accordion/ + */ + + +var accordion = $.widget( "ui.accordion", { + version: "1.11.4", + options: { + active: 0, + animate: {}, + collapsible: false, + event: "click", + header: "> li > :first-child,> :not(li):even", + heightStyle: "auto", + icons: { + activeHeader: "ui-icon-triangle-1-s", + header: "ui-icon-triangle-1-e" + }, + + // callbacks + activate: null, + beforeActivate: null + }, + + hideProps: { + borderTopWidth: "hide", + borderBottomWidth: "hide", + paddingTop: "hide", + paddingBottom: "hide", + height: "hide" + }, + + showProps: { + borderTopWidth: "show", + borderBottomWidth: "show", + paddingTop: "show", + paddingBottom: "show", + height: "show" + }, + + _create: function() { + var options = this.options; + this.prevShow = this.prevHide = $(); + this.element.addClass( "ui-accordion ui-widget ui-helper-reset" ) + // ARIA + .attr( "role", "tablist" ); + + // don't allow collapsible: false and active: false / null + if ( !options.collapsible && (options.active === false || options.active == null) ) { + options.active = 0; + } + + this._processPanels(); + // handle negative values + if ( options.active < 0 ) { + options.active += this.headers.length; + } + this._refresh(); + }, + + _getCreateEventData: function() { + return { + header: this.active, + panel: !this.active.length ? $() : this.active.next() + }; + }, + + _createIcons: function() { + var icons = this.options.icons; + if ( icons ) { + $( "<span>" ) + .addClass( "ui-accordion-header-icon ui-icon " + icons.header ) + .prependTo( this.headers ); + this.active.children( ".ui-accordion-header-icon" ) + .removeClass( icons.header ) + .addClass( icons.activeHeader ); + this.headers.addClass( "ui-accordion-icons" ); + } + }, + + _destroyIcons: function() { + this.headers + .removeClass( "ui-accordion-icons" ) + .children( ".ui-accordion-header-icon" ) + .remove(); + }, + + _destroy: function() { + var contents; + + // clean up main element + this.element + .removeClass( "ui-accordion ui-widget ui-helper-reset" ) + .removeAttr( "role" ); + + // clean up headers + this.headers + .removeClass( "ui-accordion-header ui-accordion-header-active ui-state-default " + + "ui-corner-all ui-state-active ui-state-disabled ui-corner-top" ) + .removeAttr( "role" ) + .removeAttr( "aria-expanded" ) + .removeAttr( "aria-selected" ) + .removeAttr( "aria-controls" ) + .removeAttr( "tabIndex" ) + .removeUniqueId(); + + this._destroyIcons(); + + // clean up content panels + contents = this.headers.next() + .removeClass( "ui-helper-reset ui-widget-content ui-corner-bottom " + + "ui-accordion-content ui-accordion-content-active ui-state-disabled" ) + .css( "display", "" ) + .removeAttr( "role" ) + .removeAttr( "aria-hidden" ) + .removeAttr( "aria-labelledby" ) + .removeUniqueId(); + + if ( this.options.heightStyle !== "content" ) { + contents.css( "height", "" ); + } + }, + + _setOption: function( key, value ) { + if ( key === "active" ) { + // _activate() will handle invalid values and update this.options + this._activate( value ); + return; + } + + if ( key === "event" ) { + if ( this.options.event ) { + this._off( this.headers, this.options.event ); + } + this._setupEvents( value ); + } + + this._super( key, value ); + + // setting collapsible: false while collapsed; open first panel + if ( key === "collapsible" && !value && this.options.active === false ) { + this._activate( 0 ); + } + + if ( key === "icons" ) { + this._destroyIcons(); + if ( value ) { + this._createIcons(); + } + } + + // #5332 - opacity doesn't cascade to positioned elements in IE + // so we need to add the disabled class to the headers and panels + if ( key === "disabled" ) { + this.element + .toggleClass( "ui-state-disabled", !!value ) + .attr( "aria-disabled", value ); + this.headers.add( this.headers.next() ) + .toggleClass( "ui-state-disabled", !!value ); + } + }, + + _keydown: function( event ) { + if ( event.altKey || event.ctrlKey ) { + return; + } + + var keyCode = $.ui.keyCode, + length = this.headers.length, + currentIndex = this.headers.index( event.target ), + toFocus = false; + + switch ( event.keyCode ) { + case keyCode.RIGHT: + case keyCode.DOWN: + toFocus = this.headers[ ( currentIndex + 1 ) % length ]; + break; + case keyCode.LEFT: + case keyCode.UP: + toFocus = this.headers[ ( currentIndex - 1 + length ) % length ]; + break; + case keyCode.SPACE: + case keyCode.ENTER: + this._eventHandler( event ); + break; + case keyCode.HOME: + toFocus = this.headers[ 0 ]; + break; + case keyCode.END: + toFocus = this.headers[ length - 1 ]; + break; + } + + if ( toFocus ) { + $( event.target ).attr( "tabIndex", -1 ); + $( toFocus ).attr( "tabIndex", 0 ); + toFocus.focus(); + event.preventDefault(); + } + }, + + _panelKeyDown: function( event ) { + if ( event.keyCode === $.ui.keyCode.UP && event.ctrlKey ) { + $( event.currentTarget ).prev().focus(); + } + }, + + refresh: function() { + var options = this.options; + this._processPanels(); + + // was collapsed or no panel + if ( ( options.active === false && options.collapsible === true ) || !this.headers.length ) { + options.active = false; + this.active = $(); + // active false only when collapsible is true + } else if ( options.active === false ) { + this._activate( 0 ); + // was active, but active panel is gone + } else if ( this.active.length && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) { + // all remaining panel are disabled + if ( this.headers.length === this.headers.find(".ui-state-disabled").length ) { + options.active = false; + this.active = $(); + // activate previous panel + } else { + this._activate( Math.max( 0, options.active - 1 ) ); + } + // was active, active panel still exists + } else { + // make sure active index is correct + options.active = this.headers.index( this.active ); + } + + this._destroyIcons(); + + this._refresh(); + }, + + _processPanels: function() { + var prevHeaders = this.headers, + prevPanels = this.panels; + + this.headers = this.element.find( this.options.header ) + .addClass( "ui-accordion-header ui-state-default ui-corner-all" ); + + this.panels = this.headers.next() + .addClass( "ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom" ) + .filter( ":not(.ui-accordion-content-active)" ) + .hide(); + + // Avoid memory leaks (#10056) + if ( prevPanels ) { + this._off( prevHeaders.not( this.headers ) ); + this._off( prevPanels.not( this.panels ) ); + } + }, + + _refresh: function() { + var maxHeight, + options = this.options, + heightStyle = options.heightStyle, + parent = this.element.parent(); + + this.active = this._findActive( options.active ) + .addClass( "ui-accordion-header-active ui-state-active ui-corner-top" ) + .removeClass( "ui-corner-all" ); + this.active.next() + .addClass( "ui-accordion-content-active" ) + .show(); + + this.headers + .attr( "role", "tab" ) + .each(function() { + var header = $( this ), + headerId = header.uniqueId().attr( "id" ), + panel = header.next(), + panelId = panel.uniqueId().attr( "id" ); + header.attr( "aria-controls", panelId ); + panel.attr( "aria-labelledby", headerId ); + }) + .next() + .attr( "role", "tabpanel" ); + + this.headers + .not( this.active ) + .attr({ + "aria-selected": "false", + "aria-expanded": "false", + tabIndex: -1 + }) + .next() + .attr({ + "aria-hidden": "true" + }) + .hide(); + + // make sure at least one header is in the tab order + if ( !this.active.length ) { + this.headers.eq( 0 ).attr( "tabIndex", 0 ); + } else { + this.active.attr({ + "aria-selected": "true", + "aria-expanded": "true", + tabIndex: 0 + }) + .next() + .attr({ + "aria-hidden": "false" + }); + } + + this._createIcons(); + + this._setupEvents( options.event ); + + if ( heightStyle === "fill" ) { + maxHeight = parent.height(); + this.element.siblings( ":visible" ).each(function() { + var elem = $( this ), + position = elem.css( "position" ); + + if ( position === "absolute" || position === "fixed" ) { + return; + } + maxHeight -= elem.outerHeight( true ); + }); + + this.headers.each(function() { + maxHeight -= $( this ).outerHeight( true ); + }); + + this.headers.next() + .each(function() { + $( this ).height( Math.max( 0, maxHeight - + $( this ).innerHeight() + $( this ).height() ) ); + }) + .css( "overflow", "auto" ); + } else if ( heightStyle === "auto" ) { + maxHeight = 0; + this.headers.next() + .each(function() { + maxHeight = Math.max( maxHeight, $( this ).css( "height", "" ).height() ); + }) + .height( maxHeight ); + } + }, + + _activate: function( index ) { + var active = this._findActive( index )[ 0 ]; + + // trying to activate the already active panel + if ( active === this.active[ 0 ] ) { + return; + } + + // trying to collapse, simulate a click on the currently active header + active = active || this.active[ 0 ]; + + this._eventHandler({ + target: active, + currentTarget: active, + preventDefault: $.noop + }); + }, + + _findActive: function( selector ) { + return typeof selector === "number" ? this.headers.eq( selector ) : $(); + }, + + _setupEvents: function( event ) { + var events = { + keydown: "_keydown" + }; + if ( event ) { + $.each( event.split( " " ), function( index, eventName ) { + events[ eventName ] = "_eventHandler"; + }); + } + + this._off( this.headers.add( this.headers.next() ) ); + this._on( this.headers, events ); + this._on( this.headers.next(), { keydown: "_panelKeyDown" }); + this._hoverable( this.headers ); + this._focusable( this.headers ); + }, + + _eventHandler: function( event ) { + var options = this.options, + active = this.active, + clicked = $( event.currentTarget ), + clickedIsActive = clicked[ 0 ] === active[ 0 ], + collapsing = clickedIsActive && options.collapsible, + toShow = collapsing ? $() : clicked.next(), + toHide = active.next(), + eventData = { + oldHeader: active, + oldPanel: toHide, + newHeader: collapsing ? $() : clicked, + newPanel: toShow + }; + + event.preventDefault(); + + if ( + // click on active header, but not collapsible + ( clickedIsActive && !options.collapsible ) || + // allow canceling activation + ( this._trigger( "beforeActivate", event, eventData ) === false ) ) { + return; + } + + options.active = collapsing ? false : this.headers.index( clicked ); + + // when the call to ._toggle() comes after the class changes + // it causes a very odd bug in IE 8 (see #6720) + this.active = clickedIsActive ? $() : clicked; + this._toggle( eventData ); + + // switch classes + // corner classes on the previously active header stay after the animation + active.removeClass( "ui-accordion-header-active ui-state-active" ); + if ( options.icons ) { + active.children( ".ui-accordion-header-icon" ) + .removeClass( options.icons.activeHeader ) + .addClass( options.icons.header ); + } + + if ( !clickedIsActive ) { + clicked + .removeClass( "ui-corner-all" ) + .addClass( "ui-accordion-header-active ui-state-active ui-corner-top" ); + if ( options.icons ) { + clicked.children( ".ui-accordion-header-icon" ) + .removeClass( options.icons.header ) + .addClass( options.icons.activeHeader ); + } + + clicked + .next() + .addClass( "ui-accordion-content-active" ); + } + }, + + _toggle: function( data ) { + var toShow = data.newPanel, + toHide = this.prevShow.length ? this.prevShow : data.oldPanel; + + // handle activating a panel during the animation for another activation + this.prevShow.add( this.prevHide ).stop( true, true ); + this.prevShow = toShow; + this.prevHide = toHide; + + if ( this.options.animate ) { + this._animate( toShow, toHide, data ); + } else { + toHide.hide(); + toShow.show(); + this._toggleComplete( data ); + } + + toHide.attr({ + "aria-hidden": "true" + }); + toHide.prev().attr({ + "aria-selected": "false", + "aria-expanded": "false" + }); + // if we're switching panels, remove the old header from the tab order + // if we're opening from collapsed state, remove the previous header from the tab order + // if we're collapsing, then keep the collapsing header in the tab order + if ( toShow.length && toHide.length ) { + toHide.prev().attr({ + "tabIndex": -1, + "aria-expanded": "false" + }); + } else if ( toShow.length ) { + this.headers.filter(function() { + return parseInt( $( this ).attr( "tabIndex" ), 10 ) === 0; + }) + .attr( "tabIndex", -1 ); + } + + toShow + .attr( "aria-hidden", "false" ) + .prev() + .attr({ + "aria-selected": "true", + "aria-expanded": "true", + tabIndex: 0 + }); + }, + + _animate: function( toShow, toHide, data ) { + var total, easing, duration, + that = this, + adjust = 0, + boxSizing = toShow.css( "box-sizing" ), + down = toShow.length && + ( !toHide.length || ( toShow.index() < toHide.index() ) ), + animate = this.options.animate || {}, + options = down && animate.down || animate, + complete = function() { + that._toggleComplete( data ); + }; + + if ( typeof options === "number" ) { + duration = options; + } + if ( typeof options === "string" ) { + easing = options; + } + // fall back from options to animation in case of partial down settings + easing = easing || options.easing || animate.easing; + duration = duration || options.duration || animate.duration; + + if ( !toHide.length ) { + return toShow.animate( this.showProps, duration, easing, complete ); + } + if ( !toShow.length ) { + return toHide.animate( this.hideProps, duration, easing, complete ); + } + + total = toShow.show().outerHeight(); + toHide.animate( this.hideProps, { + duration: duration, + easing: easing, + step: function( now, fx ) { + fx.now = Math.round( now ); + } + }); + toShow + .hide() + .animate( this.showProps, { + duration: duration, + easing: easing, + complete: complete, + step: function( now, fx ) { + fx.now = Math.round( now ); + if ( fx.prop !== "height" ) { + if ( boxSizing === "content-box" ) { + adjust += fx.now; + } + } else if ( that.options.heightStyle !== "content" ) { + fx.now = Math.round( total - toHide.outerHeight() - adjust ); + adjust = 0; + } + } + }); + }, + + _toggleComplete: function( data ) { + var toHide = data.oldPanel; + + toHide + .removeClass( "ui-accordion-content-active" ) + .prev() + .removeClass( "ui-corner-top" ) + .addClass( "ui-corner-all" ); + + // Work around for rendering bug in IE (#5421) + if ( toHide.length ) { + toHide.parent()[ 0 ].className = toHide.parent()[ 0 ].className; + } + this._trigger( "activate", null, data ); + } +}); + + +/*! + * jQuery UI Menu 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/menu/ + */ + + +var menu = $.widget( "ui.menu", { + version: "1.11.4", + defaultElement: "<ul>", + delay: 300, + options: { + icons: { + submenu: "ui-icon-carat-1-e" + }, + items: "> *", + menus: "ul", + position: { + my: "left-1 top", + at: "right top" + }, + role: "menu", + + // callbacks + blur: null, + focus: null, + select: null + }, + + _create: function() { + this.activeMenu = this.element; + + // Flag used to prevent firing of the click handler + // as the event bubbles up through nested menus + this.mouseHandled = false; + this.element + .uniqueId() + .addClass( "ui-menu ui-widget ui-widget-content" ) + .toggleClass( "ui-menu-icons", !!this.element.find( ".ui-icon" ).length ) + .attr({ + role: this.options.role, + tabIndex: 0 + }); + + if ( this.options.disabled ) { + this.element + .addClass( "ui-state-disabled" ) + .attr( "aria-disabled", "true" ); + } + + this._on({ + // Prevent focus from sticking to links inside menu after clicking + // them (focus should always stay on UL during navigation). + "mousedown .ui-menu-item": function( event ) { + event.preventDefault(); + }, + "click .ui-menu-item": function( event ) { + var target = $( event.target ); + if ( !this.mouseHandled && target.not( ".ui-state-disabled" ).length ) { + this.select( event ); + + // Only set the mouseHandled flag if the event will bubble, see #9469. + if ( !event.isPropagationStopped() ) { + this.mouseHandled = true; + } + + // Open submenu on click + if ( target.has( ".ui-menu" ).length ) { + this.expand( event ); + } else if ( !this.element.is( ":focus" ) && $( this.document[ 0 ].activeElement ).closest( ".ui-menu" ).length ) { + + // Redirect focus to the menu + this.element.trigger( "focus", [ true ] ); + + // If the active item is on the top level, let it stay active. + // Otherwise, blur the active item since it is no longer visible. + if ( this.active && this.active.parents( ".ui-menu" ).length === 1 ) { + clearTimeout( this.timer ); + } + } + } + }, + "mouseenter .ui-menu-item": function( event ) { + // Ignore mouse events while typeahead is active, see #10458. + // Prevents focusing the wrong item when typeahead causes a scroll while the mouse + // is over an item in the menu + if ( this.previousFilter ) { + return; + } + var target = $( event.currentTarget ); + // Remove ui-state-active class from siblings of the newly focused menu item + // to avoid a jump caused by adjacent elements both having a class with a border + target.siblings( ".ui-state-active" ).removeClass( "ui-state-active" ); + this.focus( event, target ); + }, + mouseleave: "collapseAll", + "mouseleave .ui-menu": "collapseAll", + focus: function( event, keepActiveItem ) { + // If there's already an active item, keep it active + // If not, activate the first item + var item = this.active || this.element.find( this.options.items ).eq( 0 ); + + if ( !keepActiveItem ) { + this.focus( event, item ); + } + }, + blur: function( event ) { + this._delay(function() { + if ( !$.contains( this.element[0], this.document[0].activeElement ) ) { + this.collapseAll( event ); + } + }); + }, + keydown: "_keydown" + }); + + this.refresh(); + + // Clicks outside of a menu collapse any open menus + this._on( this.document, { + click: function( event ) { + if ( this._closeOnDocumentClick( event ) ) { + this.collapseAll( event ); + } + + // Reset the mouseHandled flag + this.mouseHandled = false; + } + }); + }, + + _destroy: function() { + // Destroy (sub)menus + this.element + .removeAttr( "aria-activedescendant" ) + .find( ".ui-menu" ).addBack() + .removeClass( "ui-menu ui-widget ui-widget-content ui-menu-icons ui-front" ) + .removeAttr( "role" ) + .removeAttr( "tabIndex" ) + .removeAttr( "aria-labelledby" ) + .removeAttr( "aria-expanded" ) + .removeAttr( "aria-hidden" ) + .removeAttr( "aria-disabled" ) + .removeUniqueId() + .show(); + + // Destroy menu items + this.element.find( ".ui-menu-item" ) + .removeClass( "ui-menu-item" ) + .removeAttr( "role" ) + .removeAttr( "aria-disabled" ) + .removeUniqueId() + .removeClass( "ui-state-hover" ) + .removeAttr( "tabIndex" ) + .removeAttr( "role" ) + .removeAttr( "aria-haspopup" ) + .children().each( function() { + var elem = $( this ); + if ( elem.data( "ui-menu-submenu-carat" ) ) { + elem.remove(); + } + }); + + // Destroy menu dividers + this.element.find( ".ui-menu-divider" ).removeClass( "ui-menu-divider ui-widget-content" ); + }, + + _keydown: function( event ) { + var match, prev, character, skip, + preventDefault = true; + + switch ( event.keyCode ) { + case $.ui.keyCode.PAGE_UP: + this.previousPage( event ); + break; + case $.ui.keyCode.PAGE_DOWN: + this.nextPage( event ); + break; + case $.ui.keyCode.HOME: + this._move( "first", "first", event ); + break; + case $.ui.keyCode.END: + this._move( "last", "last", event ); + break; + case $.ui.keyCode.UP: + this.previous( event ); + break; + case $.ui.keyCode.DOWN: + this.next( event ); + break; + case $.ui.keyCode.LEFT: + this.collapse( event ); + break; + case $.ui.keyCode.RIGHT: + if ( this.active && !this.active.is( ".ui-state-disabled" ) ) { + this.expand( event ); + } + break; + case $.ui.keyCode.ENTER: + case $.ui.keyCode.SPACE: + this._activate( event ); + break; + case $.ui.keyCode.ESCAPE: + this.collapse( event ); + break; + default: + preventDefault = false; + prev = this.previousFilter || ""; + character = String.fromCharCode( event.keyCode ); + skip = false; + + clearTimeout( this.filterTimer ); + + if ( character === prev ) { + skip = true; + } else { + character = prev + character; + } + + match = this._filterMenuItems( character ); + match = skip && match.index( this.active.next() ) !== -1 ? + this.active.nextAll( ".ui-menu-item" ) : + match; + + // If no matches on the current filter, reset to the last character pressed + // to move down the menu to the first item that starts with that character + if ( !match.length ) { + character = String.fromCharCode( event.keyCode ); + match = this._filterMenuItems( character ); + } + + if ( match.length ) { + this.focus( event, match ); + this.previousFilter = character; + this.filterTimer = this._delay(function() { + delete this.previousFilter; + }, 1000 ); + } else { + delete this.previousFilter; + } + } + + if ( preventDefault ) { + event.preventDefault(); + } + }, + + _activate: function( event ) { + if ( !this.active.is( ".ui-state-disabled" ) ) { + if ( this.active.is( "[aria-haspopup='true']" ) ) { + this.expand( event ); + } else { + this.select( event ); + } + } + }, + + refresh: function() { + var menus, items, + that = this, + icon = this.options.icons.submenu, + submenus = this.element.find( this.options.menus ); + + this.element.toggleClass( "ui-menu-icons", !!this.element.find( ".ui-icon" ).length ); + + // Initialize nested menus + submenus.filter( ":not(.ui-menu)" ) + .addClass( "ui-menu ui-widget ui-widget-content ui-front" ) + .hide() + .attr({ + role: this.options.role, + "aria-hidden": "true", + "aria-expanded": "false" + }) + .each(function() { + var menu = $( this ), + item = menu.parent(), + submenuCarat = $( "<span>" ) + .addClass( "ui-menu-icon ui-icon " + icon ) + .data( "ui-menu-submenu-carat", true ); + + item + .attr( "aria-haspopup", "true" ) + .prepend( submenuCarat ); + menu.attr( "aria-labelledby", item.attr( "id" ) ); + }); + + menus = submenus.add( this.element ); + items = menus.find( this.options.items ); + + // Initialize menu-items containing spaces and/or dashes only as dividers + items.not( ".ui-menu-item" ).each(function() { + var item = $( this ); + if ( that._isDivider( item ) ) { + item.addClass( "ui-widget-content ui-menu-divider" ); + } + }); + + // Don't refresh list items that are already adapted + items.not( ".ui-menu-item, .ui-menu-divider" ) + .addClass( "ui-menu-item" ) + .uniqueId() + .attr({ + tabIndex: -1, + role: this._itemRole() + }); + + // Add aria-disabled attribute to any disabled menu item + items.filter( ".ui-state-disabled" ).attr( "aria-disabled", "true" ); + + // If the active item has been removed, blur the menu + if ( this.active && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) { + this.blur(); + } + }, + + _itemRole: function() { + return { + menu: "menuitem", + listbox: "option" + }[ this.options.role ]; + }, + + _setOption: function( key, value ) { + if ( key === "icons" ) { + this.element.find( ".ui-menu-icon" ) + .removeClass( this.options.icons.submenu ) + .addClass( value.submenu ); + } + if ( key === "disabled" ) { + this.element + .toggleClass( "ui-state-disabled", !!value ) + .attr( "aria-disabled", value ); + } + this._super( key, value ); + }, + + focus: function( event, item ) { + var nested, focused; + this.blur( event, event && event.type === "focus" ); + + this._scrollIntoView( item ); + + this.active = item.first(); + focused = this.active.addClass( "ui-state-focus" ).removeClass( "ui-state-active" ); + // Only update aria-activedescendant if there's a role + // otherwise we assume focus is managed elsewhere + if ( this.options.role ) { + this.element.attr( "aria-activedescendant", focused.attr( "id" ) ); + } + + // Highlight active parent menu item, if any + this.active + .parent() + .closest( ".ui-menu-item" ) + .addClass( "ui-state-active" ); + + if ( event && event.type === "keydown" ) { + this._close(); + } else { + this.timer = this._delay(function() { + this._close(); + }, this.delay ); + } + + nested = item.children( ".ui-menu" ); + if ( nested.length && event && ( /^mouse/.test( event.type ) ) ) { + this._startOpening(nested); + } + this.activeMenu = item.parent(); + + this._trigger( "focus", event, { item: item } ); + }, + + _scrollIntoView: function( item ) { + var borderTop, paddingTop, offset, scroll, elementHeight, itemHeight; + if ( this._hasScroll() ) { + borderTop = parseFloat( $.css( this.activeMenu[0], "borderTopWidth" ) ) || 0; + paddingTop = parseFloat( $.css( this.activeMenu[0], "paddingTop" ) ) || 0; + offset = item.offset().top - this.activeMenu.offset().top - borderTop - paddingTop; + scroll = this.activeMenu.scrollTop(); + elementHeight = this.activeMenu.height(); + itemHeight = item.outerHeight(); + + if ( offset < 0 ) { + this.activeMenu.scrollTop( scroll + offset ); + } else if ( offset + itemHeight > elementHeight ) { + this.activeMenu.scrollTop( scroll + offset - elementHeight + itemHeight ); + } + } + }, + + blur: function( event, fromFocus ) { + if ( !fromFocus ) { + clearTimeout( this.timer ); + } + + if ( !this.active ) { + return; + } + + this.active.removeClass( "ui-state-focus" ); + this.active = null; + + this._trigger( "blur", event, { item: this.active } ); + }, + + _startOpening: function( submenu ) { + clearTimeout( this.timer ); + + // Don't open if already open fixes a Firefox bug that caused a .5 pixel + // shift in the submenu position when mousing over the carat icon + if ( submenu.attr( "aria-hidden" ) !== "true" ) { + return; + } + + this.timer = this._delay(function() { + this._close(); + this._open( submenu ); + }, this.delay ); + }, + + _open: function( submenu ) { + var position = $.extend({ + of: this.active + }, this.options.position ); + + clearTimeout( this.timer ); + this.element.find( ".ui-menu" ).not( submenu.parents( ".ui-menu" ) ) + .hide() + .attr( "aria-hidden", "true" ); + + submenu + .show() + .removeAttr( "aria-hidden" ) + .attr( "aria-expanded", "true" ) + .position( position ); + }, + + collapseAll: function( event, all ) { + clearTimeout( this.timer ); + this.timer = this._delay(function() { + // If we were passed an event, look for the submenu that contains the event + var currentMenu = all ? this.element : + $( event && event.target ).closest( this.element.find( ".ui-menu" ) ); + + // If we found no valid submenu ancestor, use the main menu to close all sub menus anyway + if ( !currentMenu.length ) { + currentMenu = this.element; + } + + this._close( currentMenu ); + + this.blur( event ); + this.activeMenu = currentMenu; + }, this.delay ); + }, + + // With no arguments, closes the currently active menu - if nothing is active + // it closes all menus. If passed an argument, it will search for menus BELOW + _close: function( startMenu ) { + if ( !startMenu ) { + startMenu = this.active ? this.active.parent() : this.element; + } + + startMenu + .find( ".ui-menu" ) + .hide() + .attr( "aria-hidden", "true" ) + .attr( "aria-expanded", "false" ) + .end() + .find( ".ui-state-active" ).not( ".ui-state-focus" ) + .removeClass( "ui-state-active" ); + }, + + _closeOnDocumentClick: function( event ) { + return !$( event.target ).closest( ".ui-menu" ).length; + }, + + _isDivider: function( item ) { + + // Match hyphen, em dash, en dash + return !/[^\-\u2014\u2013\s]/.test( item.text() ); + }, + + collapse: function( event ) { + var newItem = this.active && + this.active.parent().closest( ".ui-menu-item", this.element ); + if ( newItem && newItem.length ) { + this._close(); + this.focus( event, newItem ); + } + }, + + expand: function( event ) { + var newItem = this.active && + this.active + .children( ".ui-menu " ) + .find( this.options.items ) + .first(); + + if ( newItem && newItem.length ) { + this._open( newItem.parent() ); + + // Delay so Firefox will not hide activedescendant change in expanding submenu from AT + this._delay(function() { + this.focus( event, newItem ); + }); + } + }, + + next: function( event ) { + this._move( "next", "first", event ); + }, + + previous: function( event ) { + this._move( "prev", "last", event ); + }, + + isFirstItem: function() { + return this.active && !this.active.prevAll( ".ui-menu-item" ).length; + }, + + isLastItem: function() { + return this.active && !this.active.nextAll( ".ui-menu-item" ).length; + }, + + _move: function( direction, filter, event ) { + var next; + if ( this.active ) { + if ( direction === "first" || direction === "last" ) { + next = this.active + [ direction === "first" ? "prevAll" : "nextAll" ]( ".ui-menu-item" ) + .eq( -1 ); + } else { + next = this.active + [ direction + "All" ]( ".ui-menu-item" ) + .eq( 0 ); + } + } + if ( !next || !next.length || !this.active ) { + next = this.activeMenu.find( this.options.items )[ filter ](); + } + + this.focus( event, next ); + }, + + nextPage: function( event ) { + var item, base, height; + + if ( !this.active ) { + this.next( event ); + return; + } + if ( this.isLastItem() ) { + return; + } + if ( this._hasScroll() ) { + base = this.active.offset().top; + height = this.element.height(); + this.active.nextAll( ".ui-menu-item" ).each(function() { + item = $( this ); + return item.offset().top - base - height < 0; + }); + + this.focus( event, item ); + } else { + this.focus( event, this.activeMenu.find( this.options.items ) + [ !this.active ? "first" : "last" ]() ); + } + }, + + previousPage: function( event ) { + var item, base, height; + if ( !this.active ) { + this.next( event ); + return; + } + if ( this.isFirstItem() ) { + return; + } + if ( this._hasScroll() ) { + base = this.active.offset().top; + height = this.element.height(); + this.active.prevAll( ".ui-menu-item" ).each(function() { + item = $( this ); + return item.offset().top - base + height > 0; + }); + + this.focus( event, item ); + } else { + this.focus( event, this.activeMenu.find( this.options.items ).first() ); + } + }, + + _hasScroll: function() { + return this.element.outerHeight() < this.element.prop( "scrollHeight" ); + }, + + select: function( event ) { + // TODO: It should never be possible to not have an active item at this + // point, but the tests don't trigger mouseenter before click. + this.active = this.active || $( event.target ).closest( ".ui-menu-item" ); + var ui = { item: this.active }; + if ( !this.active.has( ".ui-menu" ).length ) { + this.collapseAll( event, true ); + } + this._trigger( "select", event, ui ); + }, + + _filterMenuItems: function(character) { + var escapedCharacter = character.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" ), + regex = new RegExp( "^" + escapedCharacter, "i" ); + + return this.activeMenu + .find( this.options.items ) + + // Only match on items, not dividers or other content (#10571) + .filter( ".ui-menu-item" ) + .filter(function() { + return regex.test( $.trim( $( this ).text() ) ); + }); + } +}); + + +/*! + * jQuery UI Autocomplete 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/autocomplete/ + */ + + +$.widget( "ui.autocomplete", { + version: "1.11.4", + defaultElement: "<input>", + options: { + appendTo: null, + autoFocus: false, + delay: 300, + minLength: 1, + position: { + my: "left top", + at: "left bottom", + collision: "none" + }, + source: null, + + // callbacks + change: null, + close: null, + focus: null, + open: null, + response: null, + search: null, + select: null + }, + + requestIndex: 0, + pending: 0, + + _create: function() { + // Some browsers only repeat keydown events, not keypress events, + // so we use the suppressKeyPress flag to determine if we've already + // handled the keydown event. #7269 + // Unfortunately the code for & in keypress is the same as the up arrow, + // so we use the suppressKeyPressRepeat flag to avoid handling keypress + // events when we know the keydown event was used to modify the + // search term. #7799 + var suppressKeyPress, suppressKeyPressRepeat, suppressInput, + nodeName = this.element[ 0 ].nodeName.toLowerCase(), + isTextarea = nodeName === "textarea", + isInput = nodeName === "input"; + + this.isMultiLine = + // Textareas are always multi-line + isTextarea ? true : + // Inputs are always single-line, even if inside a contentEditable element + // IE also treats inputs as contentEditable + isInput ? false : + // All other element types are determined by whether or not they're contentEditable + this.element.prop( "isContentEditable" ); + + this.valueMethod = this.element[ isTextarea || isInput ? "val" : "text" ]; + this.isNewMenu = true; + + this.element + .addClass( "ui-autocomplete-input" ) + .attr( "autocomplete", "off" ); + + this._on( this.element, { + keydown: function( event ) { + if ( this.element.prop( "readOnly" ) ) { + suppressKeyPress = true; + suppressInput = true; + suppressKeyPressRepeat = true; + return; + } + + suppressKeyPress = false; + suppressInput = false; + suppressKeyPressRepeat = false; + var keyCode = $.ui.keyCode; + switch ( event.keyCode ) { + case keyCode.PAGE_UP: + suppressKeyPress = true; + this._move( "previousPage", event ); + break; + case keyCode.PAGE_DOWN: + suppressKeyPress = true; + this._move( "nextPage", event ); + break; + case keyCode.UP: + suppressKeyPress = true; + this._keyEvent( "previous", event ); + break; + case keyCode.DOWN: + suppressKeyPress = true; + this._keyEvent( "next", event ); + break; + case keyCode.ENTER: + // when menu is open and has focus + if ( this.menu.active ) { + // #6055 - Opera still allows the keypress to occur + // which causes forms to submit + suppressKeyPress = true; + event.preventDefault(); + this.menu.select( event ); + } + break; + case keyCode.TAB: + if ( this.menu.active ) { + this.menu.select( event ); + } + break; + case keyCode.ESCAPE: + if ( this.menu.element.is( ":visible" ) ) { + if ( !this.isMultiLine ) { + this._value( this.term ); + } + this.close( event ); + // Different browsers have different default behavior for escape + // Single press can mean undo or clear + // Double press in IE means clear the whole form + event.preventDefault(); + } + break; + default: + suppressKeyPressRepeat = true; + // search timeout should be triggered before the input value is changed + this._searchTimeout( event ); + break; + } + }, + keypress: function( event ) { + if ( suppressKeyPress ) { + suppressKeyPress = false; + if ( !this.isMultiLine || this.menu.element.is( ":visible" ) ) { + event.preventDefault(); + } + return; + } + if ( suppressKeyPressRepeat ) { + return; + } + + // replicate some key handlers to allow them to repeat in Firefox and Opera + var keyCode = $.ui.keyCode; + switch ( event.keyCode ) { + case keyCode.PAGE_UP: + this._move( "previousPage", event ); + break; + case keyCode.PAGE_DOWN: + this._move( "nextPage", event ); + break; + case keyCode.UP: + this._keyEvent( "previous", event ); + break; + case keyCode.DOWN: + this._keyEvent( "next", event ); + break; + } + }, + input: function( event ) { + if ( suppressInput ) { + suppressInput = false; + event.preventDefault(); + return; + } + this._searchTimeout( event ); + }, + focus: function() { + this.selectedItem = null; + this.previous = this._value(); + }, + blur: function( event ) { + if ( this.cancelBlur ) { + delete this.cancelBlur; + return; + } + + clearTimeout( this.searching ); + this.close( event ); + this._change( event ); + } + }); + + this._initSource(); + this.menu = $( "<ul>" ) + .addClass( "ui-autocomplete ui-front" ) + .appendTo( this._appendTo() ) + .menu({ + // disable ARIA support, the live region takes care of that + role: null + }) + .hide() + .menu( "instance" ); + + this._on( this.menu.element, { + mousedown: function( event ) { + // prevent moving focus out of the text field + event.preventDefault(); + + // IE doesn't prevent moving focus even with event.preventDefault() + // so we set a flag to know when we should ignore the blur event + this.cancelBlur = true; + this._delay(function() { + delete this.cancelBlur; + }); + + // clicking on the scrollbar causes focus to shift to the body + // but we can't detect a mouseup or a click immediately afterward + // so we have to track the next mousedown and close the menu if + // the user clicks somewhere outside of the autocomplete + var menuElement = this.menu.element[ 0 ]; + if ( !$( event.target ).closest( ".ui-menu-item" ).length ) { + this._delay(function() { + var that = this; + this.document.one( "mousedown", function( event ) { + if ( event.target !== that.element[ 0 ] && + event.target !== menuElement && + !$.contains( menuElement, event.target ) ) { + that.close(); + } + }); + }); + } + }, + menufocus: function( event, ui ) { + var label, item; + // support: Firefox + // Prevent accidental activation of menu items in Firefox (#7024 #9118) + if ( this.isNewMenu ) { + this.isNewMenu = false; + if ( event.originalEvent && /^mouse/.test( event.originalEvent.type ) ) { + this.menu.blur(); + + this.document.one( "mousemove", function() { + $( event.target ).trigger( event.originalEvent ); + }); + + return; + } + } + + item = ui.item.data( "ui-autocomplete-item" ); + if ( false !== this._trigger( "focus", event, { item: item } ) ) { + // use value to match what will end up in the input, if it was a key event + if ( event.originalEvent && /^key/.test( event.originalEvent.type ) ) { + this._value( item.value ); + } + } + + // Announce the value in the liveRegion + label = ui.item.attr( "aria-label" ) || item.value; + if ( label && $.trim( label ).length ) { + this.liveRegion.children().hide(); + $( "<div>" ).text( label ).appendTo( this.liveRegion ); + } + }, + menuselect: function( event, ui ) { + var item = ui.item.data( "ui-autocomplete-item" ), + previous = this.previous; + + // only trigger when focus was lost (click on menu) + if ( this.element[ 0 ] !== this.document[ 0 ].activeElement ) { + this.element.focus(); + this.previous = previous; + // #6109 - IE triggers two focus events and the second + // is asynchronous, so we need to reset the previous + // term synchronously and asynchronously :-( + this._delay(function() { + this.previous = previous; + this.selectedItem = item; + }); + } + + if ( false !== this._trigger( "select", event, { item: item } ) ) { + this._value( item.value ); + } + // reset the term after the select event + // this allows custom select handling to work properly + this.term = this._value(); + + this.close( event ); + this.selectedItem = item; + } + }); + + this.liveRegion = $( "<span>", { + role: "status", + "aria-live": "assertive", + "aria-relevant": "additions" + }) + .addClass( "ui-helper-hidden-accessible" ) + .appendTo( this.document[ 0 ].body ); + + // turning off autocomplete prevents the browser from remembering the + // value when navigating through history, so we re-enable autocomplete + // if the page is unloaded before the widget is destroyed. #7790 + this._on( this.window, { + beforeunload: function() { + this.element.removeAttr( "autocomplete" ); + } + }); + }, + + _destroy: function() { + clearTimeout( this.searching ); + this.element + .removeClass( "ui-autocomplete-input" ) + .removeAttr( "autocomplete" ); + this.menu.element.remove(); + this.liveRegion.remove(); + }, + + _setOption: function( key, value ) { + this._super( key, value ); + if ( key === "source" ) { + this._initSource(); + } + if ( key === "appendTo" ) { + this.menu.element.appendTo( this._appendTo() ); + } + if ( key === "disabled" && value && this.xhr ) { + this.xhr.abort(); + } + }, + + _appendTo: function() { + var element = this.options.appendTo; + + if ( element ) { + element = element.jquery || element.nodeType ? + $( element ) : + this.document.find( element ).eq( 0 ); + } + + if ( !element || !element[ 0 ] ) { + element = this.element.closest( ".ui-front" ); + } + + if ( !element.length ) { + element = this.document[ 0 ].body; + } + + return element; + }, + + _initSource: function() { + var array, url, + that = this; + if ( $.isArray( this.options.source ) ) { + array = this.options.source; + this.source = function( request, response ) { + response( $.ui.autocomplete.filter( array, request.term ) ); + }; + } else if ( typeof this.options.source === "string" ) { + url = this.options.source; + this.source = function( request, response ) { + if ( that.xhr ) { + that.xhr.abort(); + } + that.xhr = $.ajax({ + url: url, + data: request, + dataType: "json", + success: function( data ) { + response( data ); + }, + error: function() { + response([]); + } + }); + }; + } else { + this.source = this.options.source; + } + }, + + _searchTimeout: function( event ) { + clearTimeout( this.searching ); + this.searching = this._delay(function() { + + // Search if the value has changed, or if the user retypes the same value (see #7434) + var equalValues = this.term === this._value(), + menuVisible = this.menu.element.is( ":visible" ), + modifierKey = event.altKey || event.ctrlKey || event.metaKey || event.shiftKey; + + if ( !equalValues || ( equalValues && !menuVisible && !modifierKey ) ) { + this.selectedItem = null; + this.search( null, event ); + } + }, this.options.delay ); + }, + + search: function( value, event ) { + value = value != null ? value : this._value(); + + // always save the actual value, not the one passed as an argument + this.term = this._value(); + + if ( value.length < this.options.minLength ) { + return this.close( event ); + } + + if ( this._trigger( "search", event ) === false ) { + return; + } + + return this._search( value ); + }, + + _search: function( value ) { + this.pending++; + this.element.addClass( "ui-autocomplete-loading" ); + this.cancelSearch = false; + + this.source( { term: value }, this._response() ); + }, + + _response: function() { + var index = ++this.requestIndex; + + return $.proxy(function( content ) { + if ( index === this.requestIndex ) { + this.__response( content ); + } + + this.pending--; + if ( !this.pending ) { + this.element.removeClass( "ui-autocomplete-loading" ); + } + }, this ); + }, + + __response: function( content ) { + if ( content ) { + content = this._normalize( content ); + } + this._trigger( "response", null, { content: content } ); + if ( !this.options.disabled && content && content.length && !this.cancelSearch ) { + this._suggest( content ); + this._trigger( "open" ); + } else { + // use ._close() instead of .close() so we don't cancel future searches + this._close(); + } + }, + + close: function( event ) { + this.cancelSearch = true; + this._close( event ); + }, + + _close: function( event ) { + if ( this.menu.element.is( ":visible" ) ) { + this.menu.element.hide(); + this.menu.blur(); + this.isNewMenu = true; + this._trigger( "close", event ); + } + }, + + _change: function( event ) { + if ( this.previous !== this._value() ) { + this._trigger( "change", event, { item: this.selectedItem } ); + } + }, + + _normalize: function( items ) { + // assume all items have the right format when the first item is complete + if ( items.length && items[ 0 ].label && items[ 0 ].value ) { + return items; + } + return $.map( items, function( item ) { + if ( typeof item === "string" ) { + return { + label: item, + value: item + }; + } + return $.extend( {}, item, { + label: item.label || item.value, + value: item.value || item.label + }); + }); + }, + + _suggest: function( items ) { + var ul = this.menu.element.empty(); + this._renderMenu( ul, items ); + this.isNewMenu = true; + this.menu.refresh(); + + // size and position menu + ul.show(); + this._resizeMenu(); + ul.position( $.extend({ + of: this.element + }, this.options.position ) ); + + if ( this.options.autoFocus ) { + this.menu.next(); + } + }, + + _resizeMenu: function() { + var ul = this.menu.element; + ul.outerWidth( Math.max( + // Firefox wraps long text (possibly a rounding bug) + // so we add 1px to avoid the wrapping (#7513) + ul.width( "" ).outerWidth() + 1, + this.element.outerWidth() + ) ); + }, + + _renderMenu: function( ul, items ) { + var that = this; + $.each( items, function( index, item ) { + that._renderItemData( ul, item ); + }); + }, + + _renderItemData: function( ul, item ) { + return this._renderItem( ul, item ).data( "ui-autocomplete-item", item ); + }, + + _renderItem: function( ul, item ) { + return $( "<li>" ).text( item.label ).appendTo( ul ); + }, + + _move: function( direction, event ) { + if ( !this.menu.element.is( ":visible" ) ) { + this.search( null, event ); + return; + } + if ( this.menu.isFirstItem() && /^previous/.test( direction ) || + this.menu.isLastItem() && /^next/.test( direction ) ) { + + if ( !this.isMultiLine ) { + this._value( this.term ); + } + + this.menu.blur(); + return; + } + this.menu[ direction ]( event ); + }, + + widget: function() { + return this.menu.element; + }, + + _value: function() { + return this.valueMethod.apply( this.element, arguments ); + }, + + _keyEvent: function( keyEvent, event ) { + if ( !this.isMultiLine || this.menu.element.is( ":visible" ) ) { + this._move( keyEvent, event ); + + // prevents moving cursor to beginning/end of the text field in some browsers + event.preventDefault(); + } + } +}); + +$.extend( $.ui.autocomplete, { + escapeRegex: function( value ) { + return value.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" ); + }, + filter: function( array, term ) { + var matcher = new RegExp( $.ui.autocomplete.escapeRegex( term ), "i" ); + return $.grep( array, function( value ) { + return matcher.test( value.label || value.value || value ); + }); + } +}); + +// live region extension, adding a `messages` option +// NOTE: This is an experimental API. We are still investigating +// a full solution for string manipulation and internationalization. +$.widget( "ui.autocomplete", $.ui.autocomplete, { + options: { + messages: { + noResults: "No search results.", + results: function( amount ) { + return amount + ( amount > 1 ? " results are" : " result is" ) + + " available, use up and down arrow keys to navigate."; + } + } + }, + + __response: function( content ) { + var message; + this._superApply( arguments ); + if ( this.options.disabled || this.cancelSearch ) { + return; + } + if ( content && content.length ) { + message = this.options.messages.results( content.length ); + } else { + message = this.options.messages.noResults; + } + this.liveRegion.children().hide(); + $( "<div>" ).text( message ).appendTo( this.liveRegion ); + } +}); + +var autocomplete = $.ui.autocomplete; + + +/*! + * jQuery UI Button 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/button/ + */ + + +var lastActive, + baseClasses = "ui-button ui-widget ui-state-default ui-corner-all", + typeClasses = "ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only", + formResetHandler = function() { + var form = $( this ); + setTimeout(function() { + form.find( ":ui-button" ).button( "refresh" ); + }, 1 ); + }, + radioGroup = function( radio ) { + var name = radio.name, + form = radio.form, + radios = $( [] ); + if ( name ) { + name = name.replace( /'/g, "\\'" ); + if ( form ) { + radios = $( form ).find( "[name='" + name + "'][type=radio]" ); + } else { + radios = $( "[name='" + name + "'][type=radio]", radio.ownerDocument ) + .filter(function() { + return !this.form; + }); + } + } + return radios; + }; + +$.widget( "ui.button", { + version: "1.11.4", + defaultElement: "<button>", + options: { + disabled: null, + text: true, + label: null, + icons: { + primary: null, + secondary: null + } + }, + _create: function() { + this.element.closest( "form" ) + .unbind( "reset" + this.eventNamespace ) + .bind( "reset" + this.eventNamespace, formResetHandler ); + + if ( typeof this.options.disabled !== "boolean" ) { + this.options.disabled = !!this.element.prop( "disabled" ); + } else { + this.element.prop( "disabled", this.options.disabled ); + } + + this._determineButtonType(); + this.hasTitle = !!this.buttonElement.attr( "title" ); + + var that = this, + options = this.options, + toggleButton = this.type === "checkbox" || this.type === "radio", + activeClass = !toggleButton ? "ui-state-active" : ""; + + if ( options.label === null ) { + options.label = (this.type === "input" ? this.buttonElement.val() : this.buttonElement.html()); + } + + this._hoverable( this.buttonElement ); + + this.buttonElement + .addClass( baseClasses ) + .attr( "role", "button" ) + .bind( "mouseenter" + this.eventNamespace, function() { + if ( options.disabled ) { + return; + } + if ( this === lastActive ) { + $( this ).addClass( "ui-state-active" ); + } + }) + .bind( "mouseleave" + this.eventNamespace, function() { + if ( options.disabled ) { + return; + } + $( this ).removeClass( activeClass ); + }) + .bind( "click" + this.eventNamespace, function( event ) { + if ( options.disabled ) { + event.preventDefault(); + event.stopImmediatePropagation(); + } + }); + + // Can't use _focusable() because the element that receives focus + // and the element that gets the ui-state-focus class are different + this._on({ + focus: function() { + this.buttonElement.addClass( "ui-state-focus" ); + }, + blur: function() { + this.buttonElement.removeClass( "ui-state-focus" ); + } + }); + + if ( toggleButton ) { + this.element.bind( "change" + this.eventNamespace, function() { + that.refresh(); + }); + } + + if ( this.type === "checkbox" ) { + this.buttonElement.bind( "click" + this.eventNamespace, function() { + if ( options.disabled ) { + return false; + } + }); + } else if ( this.type === "radio" ) { + this.buttonElement.bind( "click" + this.eventNamespace, function() { + if ( options.disabled ) { + return false; + } + $( this ).addClass( "ui-state-active" ); + that.buttonElement.attr( "aria-pressed", "true" ); + + var radio = that.element[ 0 ]; + radioGroup( radio ) + .not( radio ) + .map(function() { + return $( this ).button( "widget" )[ 0 ]; + }) + .removeClass( "ui-state-active" ) + .attr( "aria-pressed", "false" ); + }); + } else { + this.buttonElement + .bind( "mousedown" + this.eventNamespace, function() { + if ( options.disabled ) { + return false; + } + $( this ).addClass( "ui-state-active" ); + lastActive = this; + that.document.one( "mouseup", function() { + lastActive = null; + }); + }) + .bind( "mouseup" + this.eventNamespace, function() { + if ( options.disabled ) { + return false; + } + $( this ).removeClass( "ui-state-active" ); + }) + .bind( "keydown" + this.eventNamespace, function(event) { + if ( options.disabled ) { + return false; + } + if ( event.keyCode === $.ui.keyCode.SPACE || event.keyCode === $.ui.keyCode.ENTER ) { + $( this ).addClass( "ui-state-active" ); + } + }) + // see #8559, we bind to blur here in case the button element loses + // focus between keydown and keyup, it would be left in an "active" state + .bind( "keyup" + this.eventNamespace + " blur" + this.eventNamespace, function() { + $( this ).removeClass( "ui-state-active" ); + }); + + if ( this.buttonElement.is("a") ) { + this.buttonElement.keyup(function(event) { + if ( event.keyCode === $.ui.keyCode.SPACE ) { + // TODO pass through original event correctly (just as 2nd argument doesn't work) + $( this ).click(); + } + }); + } + } + + this._setOption( "disabled", options.disabled ); + this._resetButton(); + }, + + _determineButtonType: function() { + var ancestor, labelSelector, checked; + + if ( this.element.is("[type=checkbox]") ) { + this.type = "checkbox"; + } else if ( this.element.is("[type=radio]") ) { + this.type = "radio"; + } else if ( this.element.is("input") ) { + this.type = "input"; + } else { + this.type = "button"; + } + + if ( this.type === "checkbox" || this.type === "radio" ) { + // we don't search against the document in case the element + // is disconnected from the DOM + ancestor = this.element.parents().last(); + labelSelector = "label[for='" + this.element.attr("id") + "']"; + this.buttonElement = ancestor.find( labelSelector ); + if ( !this.buttonElement.length ) { + ancestor = ancestor.length ? ancestor.siblings() : this.element.siblings(); + this.buttonElement = ancestor.filter( labelSelector ); + if ( !this.buttonElement.length ) { + this.buttonElement = ancestor.find( labelSelector ); + } + } + this.element.addClass( "ui-helper-hidden-accessible" ); + + checked = this.element.is( ":checked" ); + if ( checked ) { + this.buttonElement.addClass( "ui-state-active" ); + } + this.buttonElement.prop( "aria-pressed", checked ); + } else { + this.buttonElement = this.element; + } + }, + + widget: function() { + return this.buttonElement; + }, + + _destroy: function() { + this.element + .removeClass( "ui-helper-hidden-accessible" ); + this.buttonElement + .removeClass( baseClasses + " ui-state-active " + typeClasses ) + .removeAttr( "role" ) + .removeAttr( "aria-pressed" ) + .html( this.buttonElement.find(".ui-button-text").html() ); + + if ( !this.hasTitle ) { + this.buttonElement.removeAttr( "title" ); + } + }, + + _setOption: function( key, value ) { + this._super( key, value ); + if ( key === "disabled" ) { + this.widget().toggleClass( "ui-state-disabled", !!value ); + this.element.prop( "disabled", !!value ); + if ( value ) { + if ( this.type === "checkbox" || this.type === "radio" ) { + this.buttonElement.removeClass( "ui-state-focus" ); + } else { + this.buttonElement.removeClass( "ui-state-focus ui-state-active" ); + } + } + return; + } + this._resetButton(); + }, + + refresh: function() { + //See #8237 & #8828 + var isDisabled = this.element.is( "input, button" ) ? this.element.is( ":disabled" ) : this.element.hasClass( "ui-button-disabled" ); + + if ( isDisabled !== this.options.disabled ) { + this._setOption( "disabled", isDisabled ); + } + if ( this.type === "radio" ) { + radioGroup( this.element[0] ).each(function() { + if ( $( this ).is( ":checked" ) ) { + $( this ).button( "widget" ) + .addClass( "ui-state-active" ) + .attr( "aria-pressed", "true" ); + } else { + $( this ).button( "widget" ) + .removeClass( "ui-state-active" ) + .attr( "aria-pressed", "false" ); + } + }); + } else if ( this.type === "checkbox" ) { + if ( this.element.is( ":checked" ) ) { + this.buttonElement + .addClass( "ui-state-active" ) + .attr( "aria-pressed", "true" ); + } else { + this.buttonElement + .removeClass( "ui-state-active" ) + .attr( "aria-pressed", "false" ); + } + } + }, + + _resetButton: function() { + if ( this.type === "input" ) { + if ( this.options.label ) { + this.element.val( this.options.label ); + } + return; + } + var buttonElement = this.buttonElement.removeClass( typeClasses ), + buttonText = $( "<span></span>", this.document[0] ) + .addClass( "ui-button-text" ) + .html( this.options.label ) + .appendTo( buttonElement.empty() ) + .text(), + icons = this.options.icons, + multipleIcons = icons.primary && icons.secondary, + buttonClasses = []; + + if ( icons.primary || icons.secondary ) { + if ( this.options.text ) { + buttonClasses.push( "ui-button-text-icon" + ( multipleIcons ? "s" : ( icons.primary ? "-primary" : "-secondary" ) ) ); + } + + if ( icons.primary ) { + buttonElement.prepend( "<span class='ui-button-icon-primary ui-icon " + icons.primary + "'></span>" ); + } + + if ( icons.secondary ) { + buttonElement.append( "<span class='ui-button-icon-secondary ui-icon " + icons.secondary + "'></span>" ); + } + + if ( !this.options.text ) { + buttonClasses.push( multipleIcons ? "ui-button-icons-only" : "ui-button-icon-only" ); + + if ( !this.hasTitle ) { + buttonElement.attr( "title", $.trim( buttonText ) ); + } + } + } else { + buttonClasses.push( "ui-button-text-only" ); + } + buttonElement.addClass( buttonClasses.join( " " ) ); + } +}); + +$.widget( "ui.buttonset", { + version: "1.11.4", + options: { + items: "button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)" + }, + + _create: function() { + this.element.addClass( "ui-buttonset" ); + }, + + _init: function() { + this.refresh(); + }, + + _setOption: function( key, value ) { + if ( key === "disabled" ) { + this.buttons.button( "option", key, value ); + } + + this._super( key, value ); + }, + + refresh: function() { + var rtl = this.element.css( "direction" ) === "rtl", + allButtons = this.element.find( this.options.items ), + existingButtons = allButtons.filter( ":ui-button" ); + + // Initialize new buttons + allButtons.not( ":ui-button" ).button(); + + // Refresh existing buttons + existingButtons.button( "refresh" ); + + this.buttons = allButtons + .map(function() { + return $( this ).button( "widget" )[ 0 ]; + }) + .removeClass( "ui-corner-all ui-corner-left ui-corner-right" ) + .filter( ":first" ) + .addClass( rtl ? "ui-corner-right" : "ui-corner-left" ) + .end() + .filter( ":last" ) + .addClass( rtl ? "ui-corner-left" : "ui-corner-right" ) + .end() + .end(); + }, + + _destroy: function() { + this.element.removeClass( "ui-buttonset" ); + this.buttons + .map(function() { + return $( this ).button( "widget" )[ 0 ]; + }) + .removeClass( "ui-corner-left ui-corner-right" ) + .end() + .button( "destroy" ); + } +}); + +var button = $.ui.button; + + +/*! + * jQuery UI Datepicker 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/datepicker/ + */ + + +$.extend($.ui, { datepicker: { version: "1.11.4" } }); + +var datepicker_instActive; + +function datepicker_getZindex( elem ) { + var position, value; + while ( elem.length && elem[ 0 ] !== document ) { + // Ignore z-index if position is set to a value where z-index is ignored by the browser + // This makes behavior of this function consistent across browsers + // WebKit always returns auto if the element is positioned + position = elem.css( "position" ); + if ( position === "absolute" || position === "relative" || position === "fixed" ) { + // IE returns 0 when zIndex is not specified + // other browsers return a string + // we ignore the case of nested elements with an explicit value of 0 + // <div style="z-index: -10;"><div style="z-index: 0;"></div></div> + value = parseInt( elem.css( "zIndex" ), 10 ); + if ( !isNaN( value ) && value !== 0 ) { + return value; + } + } + elem = elem.parent(); + } + + return 0; +} +/* Date picker manager. + Use the singleton instance of this class, $.datepicker, to interact with the date picker. + Settings for (groups of) date pickers are maintained in an instance object, + allowing multiple different settings on the same page. */ + +function Datepicker() { + this._curInst = null; // The current instance in use + this._keyEvent = false; // If the last event was a key event + this._disabledInputs = []; // List of date picker inputs that have been disabled + this._datepickerShowing = false; // True if the popup picker is showing , false if not + this._inDialog = false; // True if showing within a "dialog", false if not + this._mainDivId = "ui-datepicker-div"; // The ID of the main datepicker division + this._inlineClass = "ui-datepicker-inline"; // The name of the inline marker class + this._appendClass = "ui-datepicker-append"; // The name of the append marker class + this._triggerClass = "ui-datepicker-trigger"; // The name of the trigger marker class + this._dialogClass = "ui-datepicker-dialog"; // The name of the dialog marker class + this._disableClass = "ui-datepicker-disabled"; // The name of the disabled covering marker class + this._unselectableClass = "ui-datepicker-unselectable"; // The name of the unselectable cell marker class + this._currentClass = "ui-datepicker-current-day"; // The name of the current day marker class + this._dayOverClass = "ui-datepicker-days-cell-over"; // The name of the day hover marker class + this.regional = []; // Available regional settings, indexed by language code + this.regional[""] = { // Default regional settings + closeText: "Done", // Display text for close link + prevText: "Prev", // Display text for previous month link + nextText: "Next", // Display text for next month link + currentText: "Today", // Display text for current month link + monthNames: ["January","February","March","April","May","June", + "July","August","September","October","November","December"], // Names of months for drop-down and formatting + monthNamesShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], // For formatting + dayNames: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], // For formatting + dayNamesShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], // For formatting + dayNamesMin: ["Su","Mo","Tu","We","Th","Fr","Sa"], // Column headings for days starting at Sunday + weekHeader: "Wk", // Column header for week of the year + dateFormat: "mm/dd/yy", // See format options on parseDate + firstDay: 0, // The first day of the week, Sun = 0, Mon = 1, ... + isRTL: false, // True if right-to-left language, false if left-to-right + showMonthAfterYear: false, // True if the year select precedes month, false for month then year + yearSuffix: "" // Additional text to append to the year in the month headers + }; + this._defaults = { // Global defaults for all the date picker instances + showOn: "focus", // "focus" for popup on focus, + // "button" for trigger button, or "both" for either + showAnim: "fadeIn", // Name of jQuery animation for popup + showOptions: {}, // Options for enhanced animations + defaultDate: null, // Used when field is blank: actual date, + // +/-number for offset from today, null for today + appendText: "", // Display text following the input box, e.g. showing the format + buttonText: "...", // Text for trigger button + buttonImage: "", // URL for trigger button image + buttonImageOnly: false, // True if the image appears alone, false if it appears on a button + hideIfNoPrevNext: false, // True to hide next/previous month links + // if not applicable, false to just disable them + navigationAsDateFormat: false, // True if date formatting applied to prev/today/next links + gotoCurrent: false, // True if today link goes back to current selection instead + changeMonth: false, // True if month can be selected directly, false if only prev/next + changeYear: false, // True if year can be selected directly, false if only prev/next + yearRange: "c-10:c+10", // Range of years to display in drop-down, + // either relative to today's year (-nn:+nn), relative to currently displayed year + // (c-nn:c+nn), absolute (nnnn:nnnn), or a combination of the above (nnnn:-n) + showOtherMonths: false, // True to show dates in other months, false to leave blank + selectOtherMonths: false, // True to allow selection of dates in other months, false for unselectable + showWeek: false, // True to show week of the year, false to not show it + calculateWeek: this.iso8601Week, // How to calculate the week of the year, + // takes a Date and returns the number of the week for it + shortYearCutoff: "+10", // Short year values < this are in the current century, + // > this are in the previous century, + // string value starting with "+" for current year + value + minDate: null, // The earliest selectable date, or null for no limit + maxDate: null, // The latest selectable date, or null for no limit + duration: "fast", // Duration of display/closure + beforeShowDay: null, // Function that takes a date and returns an array with + // [0] = true if selectable, false if not, [1] = custom CSS class name(s) or "", + // [2] = cell title (optional), e.g. $.datepicker.noWeekends + beforeShow: null, // Function that takes an input field and + // returns a set of custom settings for the date picker + onSelect: null, // Define a callback function when a date is selected + onChangeMonthYear: null, // Define a callback function when the month or year is changed + onClose: null, // Define a callback function when the datepicker is closed + numberOfMonths: 1, // Number of months to show at a time + showCurrentAtPos: 0, // The position in multipe months at which to show the current month (starting at 0) + stepMonths: 1, // Number of months to step back/forward + stepBigMonths: 12, // Number of months to step back/forward for the big links + altField: "", // Selector for an alternate field to store selected dates into + altFormat: "", // The date format to use for the alternate field + constrainInput: true, // The input is constrained by the current date format + showButtonPanel: false, // True to show button panel, false to not show it + autoSize: false, // True to size the input for the date format, false to leave as is + disabled: false // The initial disabled state + }; + $.extend(this._defaults, this.regional[""]); + this.regional.en = $.extend( true, {}, this.regional[ "" ]); + this.regional[ "en-US" ] = $.extend( true, {}, this.regional.en ); + this.dpDiv = datepicker_bindHover($("<div id='" + this._mainDivId + "' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")); +} + +$.extend(Datepicker.prototype, { + /* Class name added to elements to indicate already configured with a date picker. */ + markerClassName: "hasDatepicker", + + //Keep track of the maximum number of rows displayed (see #7043) + maxRows: 4, + + // TODO rename to "widget" when switching to widget factory + _widgetDatepicker: function() { + return this.dpDiv; + }, + + /* Override the default settings for all instances of the date picker. + * @param settings object - the new settings to use as defaults (anonymous object) + * @return the manager object + */ + setDefaults: function(settings) { + datepicker_extendRemove(this._defaults, settings || {}); + return this; + }, + + /* Attach the date picker to a jQuery selection. + * @param target element - the target input field or division or span + * @param settings object - the new settings to use for this date picker instance (anonymous) + */ + _attachDatepicker: function(target, settings) { + var nodeName, inline, inst; + nodeName = target.nodeName.toLowerCase(); + inline = (nodeName === "div" || nodeName === "span"); + if (!target.id) { + this.uuid += 1; + target.id = "dp" + this.uuid; + } + inst = this._newInst($(target), inline); + inst.settings = $.extend({}, settings || {}); + if (nodeName === "input") { + this._connectDatepicker(target, inst); + } else if (inline) { + this._inlineDatepicker(target, inst); + } + }, + + /* Create a new instance object. */ + _newInst: function(target, inline) { + var id = target[0].id.replace(/([^A-Za-z0-9_\-])/g, "\\\\$1"); // escape jQuery meta chars + return {id: id, input: target, // associated target + selectedDay: 0, selectedMonth: 0, selectedYear: 0, // current selection + drawMonth: 0, drawYear: 0, // month being drawn + inline: inline, // is datepicker inline or not + dpDiv: (!inline ? this.dpDiv : // presentation div + datepicker_bindHover($("<div class='" + this._inlineClass + " ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")))}; + }, + + /* Attach the date picker to an input field. */ + _connectDatepicker: function(target, inst) { + var input = $(target); + inst.append = $([]); + inst.trigger = $([]); + if (input.hasClass(this.markerClassName)) { + return; + } + this._attachments(input, inst); + input.addClass(this.markerClassName).keydown(this._doKeyDown). + keypress(this._doKeyPress).keyup(this._doKeyUp); + this._autoSize(inst); + $.data(target, "datepicker", inst); + //If disabled option is true, disable the datepicker once it has been attached to the input (see ticket #5665) + if( inst.settings.disabled ) { + this._disableDatepicker( target ); + } + }, + + /* Make attachments based on settings. */ + _attachments: function(input, inst) { + var showOn, buttonText, buttonImage, + appendText = this._get(inst, "appendText"), + isRTL = this._get(inst, "isRTL"); + + if (inst.append) { + inst.append.remove(); + } + if (appendText) { + inst.append = $("<span class='" + this._appendClass + "'>" + appendText + "</span>"); + input[isRTL ? "before" : "after"](inst.append); + } + + input.unbind("focus", this._showDatepicker); + + if (inst.trigger) { + inst.trigger.remove(); + } + + showOn = this._get(inst, "showOn"); + if (showOn === "focus" || showOn === "both") { // pop-up date picker when in the marked field + input.focus(this._showDatepicker); + } + if (showOn === "button" || showOn === "both") { // pop-up date picker when button clicked + buttonText = this._get(inst, "buttonText"); + buttonImage = this._get(inst, "buttonImage"); + inst.trigger = $(this._get(inst, "buttonImageOnly") ? + $("<img/>").addClass(this._triggerClass). + attr({ src: buttonImage, alt: buttonText, title: buttonText }) : + $("<button type='button'></button>").addClass(this._triggerClass). + html(!buttonImage ? buttonText : $("<img/>").attr( + { src:buttonImage, alt:buttonText, title:buttonText }))); + input[isRTL ? "before" : "after"](inst.trigger); + inst.trigger.click(function() { + if ($.datepicker._datepickerShowing && $.datepicker._lastInput === input[0]) { + $.datepicker._hideDatepicker(); + } else if ($.datepicker._datepickerShowing && $.datepicker._lastInput !== input[0]) { + $.datepicker._hideDatepicker(); + $.datepicker._showDatepicker(input[0]); + } else { + $.datepicker._showDatepicker(input[0]); + } + return false; + }); + } + }, + + /* Apply the maximum length for the date format. */ + _autoSize: function(inst) { + if (this._get(inst, "autoSize") && !inst.inline) { + var findMax, max, maxI, i, + date = new Date(2009, 12 - 1, 20), // Ensure double digits + dateFormat = this._get(inst, "dateFormat"); + + if (dateFormat.match(/[DM]/)) { + findMax = function(names) { + max = 0; + maxI = 0; + for (i = 0; i < names.length; i++) { + if (names[i].length > max) { + max = names[i].length; + maxI = i; + } + } + return maxI; + }; + date.setMonth(findMax(this._get(inst, (dateFormat.match(/MM/) ? + "monthNames" : "monthNamesShort")))); + date.setDate(findMax(this._get(inst, (dateFormat.match(/DD/) ? + "dayNames" : "dayNamesShort"))) + 20 - date.getDay()); + } + inst.input.attr("size", this._formatDate(inst, date).length); + } + }, + + /* Attach an inline date picker to a div. */ + _inlineDatepicker: function(target, inst) { + var divSpan = $(target); + if (divSpan.hasClass(this.markerClassName)) { + return; + } + divSpan.addClass(this.markerClassName).append(inst.dpDiv); + $.data(target, "datepicker", inst); + this._setDate(inst, this._getDefaultDate(inst), true); + this._updateDatepicker(inst); + this._updateAlternate(inst); + //If disabled option is true, disable the datepicker before showing it (see ticket #5665) + if( inst.settings.disabled ) { + this._disableDatepicker( target ); + } + // Set display:block in place of inst.dpDiv.show() which won't work on disconnected elements + // http://bugs.jqueryui.com/ticket/7552 - A Datepicker created on a detached div has zero height + inst.dpDiv.css( "display", "block" ); + }, + + /* Pop-up the date picker in a "dialog" box. + * @param input element - ignored + * @param date string or Date - the initial date to display + * @param onSelect function - the function to call when a date is selected + * @param settings object - update the dialog date picker instance's settings (anonymous object) + * @param pos int[2] - coordinates for the dialog's position within the screen or + * event - with x/y coordinates or + * leave empty for default (screen centre) + * @return the manager object + */ + _dialogDatepicker: function(input, date, onSelect, settings, pos) { + var id, browserWidth, browserHeight, scrollX, scrollY, + inst = this._dialogInst; // internal instance + + if (!inst) { + this.uuid += 1; + id = "dp" + this.uuid; + this._dialogInput = $("<input type='text' id='" + id + + "' style='position: absolute; top: -100px; width: 0px;'/>"); + this._dialogInput.keydown(this._doKeyDown); + $("body").append(this._dialogInput); + inst = this._dialogInst = this._newInst(this._dialogInput, false); + inst.settings = {}; + $.data(this._dialogInput[0], "datepicker", inst); + } + datepicker_extendRemove(inst.settings, settings || {}); + date = (date && date.constructor === Date ? this._formatDate(inst, date) : date); + this._dialogInput.val(date); + + this._pos = (pos ? (pos.length ? pos : [pos.pageX, pos.pageY]) : null); + if (!this._pos) { + browserWidth = document.documentElement.clientWidth; + browserHeight = document.documentElement.clientHeight; + scrollX = document.documentElement.scrollLeft || document.body.scrollLeft; + scrollY = document.documentElement.scrollTop || document.body.scrollTop; + this._pos = // should use actual width/height below + [(browserWidth / 2) - 100 + scrollX, (browserHeight / 2) - 150 + scrollY]; + } + + // move input on screen for focus, but hidden behind dialog + this._dialogInput.css("left", (this._pos[0] + 20) + "px").css("top", this._pos[1] + "px"); + inst.settings.onSelect = onSelect; + this._inDialog = true; + this.dpDiv.addClass(this._dialogClass); + this._showDatepicker(this._dialogInput[0]); + if ($.blockUI) { + $.blockUI(this.dpDiv); + } + $.data(this._dialogInput[0], "datepicker", inst); + return this; + }, + + /* Detach a datepicker from its control. + * @param target element - the target input field or division or span + */ + _destroyDatepicker: function(target) { + var nodeName, + $target = $(target), + inst = $.data(target, "datepicker"); + + if (!$target.hasClass(this.markerClassName)) { + return; + } + + nodeName = target.nodeName.toLowerCase(); + $.removeData(target, "datepicker"); + if (nodeName === "input") { + inst.append.remove(); + inst.trigger.remove(); + $target.removeClass(this.markerClassName). + unbind("focus", this._showDatepicker). + unbind("keydown", this._doKeyDown). + unbind("keypress", this._doKeyPress). + unbind("keyup", this._doKeyUp); + } else if (nodeName === "div" || nodeName === "span") { + $target.removeClass(this.markerClassName).empty(); + } + + if ( datepicker_instActive === inst ) { + datepicker_instActive = null; + } + }, + + /* Enable the date picker to a jQuery selection. + * @param target element - the target input field or division or span + */ + _enableDatepicker: function(target) { + var nodeName, inline, + $target = $(target), + inst = $.data(target, "datepicker"); + + if (!$target.hasClass(this.markerClassName)) { + return; + } + + nodeName = target.nodeName.toLowerCase(); + if (nodeName === "input") { + target.disabled = false; + inst.trigger.filter("button"). + each(function() { this.disabled = false; }).end(). + filter("img").css({opacity: "1.0", cursor: ""}); + } else if (nodeName === "div" || nodeName === "span") { + inline = $target.children("." + this._inlineClass); + inline.children().removeClass("ui-state-disabled"); + inline.find("select.ui-datepicker-month, select.ui-datepicker-year"). + prop("disabled", false); + } + this._disabledInputs = $.map(this._disabledInputs, + function(value) { return (value === target ? null : value); }); // delete entry + }, + + /* Disable the date picker to a jQuery selection. + * @param target element - the target input field or division or span + */ + _disableDatepicker: function(target) { + var nodeName, inline, + $target = $(target), + inst = $.data(target, "datepicker"); + + if (!$target.hasClass(this.markerClassName)) { + return; + } + + nodeName = target.nodeName.toLowerCase(); + if (nodeName === "input") { + target.disabled = true; + inst.trigger.filter("button"). + each(function() { this.disabled = true; }).end(). + filter("img").css({opacity: "0.5", cursor: "default"}); + } else if (nodeName === "div" || nodeName === "span") { + inline = $target.children("." + this._inlineClass); + inline.children().addClass("ui-state-disabled"); + inline.find("select.ui-datepicker-month, select.ui-datepicker-year"). + prop("disabled", true); + } + this._disabledInputs = $.map(this._disabledInputs, + function(value) { return (value === target ? null : value); }); // delete entry + this._disabledInputs[this._disabledInputs.length] = target; + }, + + /* Is the first field in a jQuery collection disabled as a datepicker? + * @param target element - the target input field or division or span + * @return boolean - true if disabled, false if enabled + */ + _isDisabledDatepicker: function(target) { + if (!target) { + return false; + } + for (var i = 0; i < this._disabledInputs.length; i++) { + if (this._disabledInputs[i] === target) { + return true; + } + } + return false; + }, + + /* Retrieve the instance data for the target control. + * @param target element - the target input field or division or span + * @return object - the associated instance data + * @throws error if a jQuery problem getting data + */ + _getInst: function(target) { + try { + return $.data(target, "datepicker"); + } + catch (err) { + throw "Missing instance data for this datepicker"; + } + }, + + /* Update or retrieve the settings for a date picker attached to an input field or division. + * @param target element - the target input field or division or span + * @param name object - the new settings to update or + * string - the name of the setting to change or retrieve, + * when retrieving also "all" for all instance settings or + * "defaults" for all global defaults + * @param value any - the new value for the setting + * (omit if above is an object or to retrieve a value) + */ + _optionDatepicker: function(target, name, value) { + var settings, date, minDate, maxDate, + inst = this._getInst(target); + + if (arguments.length === 2 && typeof name === "string") { + return (name === "defaults" ? $.extend({}, $.datepicker._defaults) : + (inst ? (name === "all" ? $.extend({}, inst.settings) : + this._get(inst, name)) : null)); + } + + settings = name || {}; + if (typeof name === "string") { + settings = {}; + settings[name] = value; + } + + if (inst) { + if (this._curInst === inst) { + this._hideDatepicker(); + } + + date = this._getDateDatepicker(target, true); + minDate = this._getMinMaxDate(inst, "min"); + maxDate = this._getMinMaxDate(inst, "max"); + datepicker_extendRemove(inst.settings, settings); + // reformat the old minDate/maxDate values if dateFormat changes and a new minDate/maxDate isn't provided + if (minDate !== null && settings.dateFormat !== undefined && settings.minDate === undefined) { + inst.settings.minDate = this._formatDate(inst, minDate); + } + if (maxDate !== null && settings.dateFormat !== undefined && settings.maxDate === undefined) { + inst.settings.maxDate = this._formatDate(inst, maxDate); + } + if ( "disabled" in settings ) { + if ( settings.disabled ) { + this._disableDatepicker(target); + } else { + this._enableDatepicker(target); + } + } + this._attachments($(target), inst); + this._autoSize(inst); + this._setDate(inst, date); + this._updateAlternate(inst); + this._updateDatepicker(inst); + } + }, + + // change method deprecated + _changeDatepicker: function(target, name, value) { + this._optionDatepicker(target, name, value); + }, + + /* Redraw the date picker attached to an input field or division. + * @param target element - the target input field or division or span + */ + _refreshDatepicker: function(target) { + var inst = this._getInst(target); + if (inst) { + this._updateDatepicker(inst); + } + }, + + /* Set the dates for a jQuery selection. + * @param target element - the target input field or division or span + * @param date Date - the new date + */ + _setDateDatepicker: function(target, date) { + var inst = this._getInst(target); + if (inst) { + this._setDate(inst, date); + this._updateDatepicker(inst); + this._updateAlternate(inst); + } + }, + + /* Get the date(s) for the first entry in a jQuery selection. + * @param target element - the target input field or division or span + * @param noDefault boolean - true if no default date is to be used + * @return Date - the current date + */ + _getDateDatepicker: function(target, noDefault) { + var inst = this._getInst(target); + if (inst && !inst.inline) { + this._setDateFromField(inst, noDefault); + } + return (inst ? this._getDate(inst) : null); + }, + + /* Handle keystrokes. */ + _doKeyDown: function(event) { + var onSelect, dateStr, sel, + inst = $.datepicker._getInst(event.target), + handled = true, + isRTL = inst.dpDiv.is(".ui-datepicker-rtl"); + + inst._keyEvent = true; + if ($.datepicker._datepickerShowing) { + switch (event.keyCode) { + case 9: $.datepicker._hideDatepicker(); + handled = false; + break; // hide on tab out + case 13: sel = $("td." + $.datepicker._dayOverClass + ":not(." + + $.datepicker._currentClass + ")", inst.dpDiv); + if (sel[0]) { + $.datepicker._selectDay(event.target, inst.selectedMonth, inst.selectedYear, sel[0]); + } + + onSelect = $.datepicker._get(inst, "onSelect"); + if (onSelect) { + dateStr = $.datepicker._formatDate(inst); + + // trigger custom callback + onSelect.apply((inst.input ? inst.input[0] : null), [dateStr, inst]); + } else { + $.datepicker._hideDatepicker(); + } + + return false; // don't submit the form + case 27: $.datepicker._hideDatepicker(); + break; // hide on escape + case 33: $.datepicker._adjustDate(event.target, (event.ctrlKey ? + -$.datepicker._get(inst, "stepBigMonths") : + -$.datepicker._get(inst, "stepMonths")), "M"); + break; // previous month/year on page up/+ ctrl + case 34: $.datepicker._adjustDate(event.target, (event.ctrlKey ? + +$.datepicker._get(inst, "stepBigMonths") : + +$.datepicker._get(inst, "stepMonths")), "M"); + break; // next month/year on page down/+ ctrl + case 35: if (event.ctrlKey || event.metaKey) { + $.datepicker._clearDate(event.target); + } + handled = event.ctrlKey || event.metaKey; + break; // clear on ctrl or command +end + case 36: if (event.ctrlKey || event.metaKey) { + $.datepicker._gotoToday(event.target); + } + handled = event.ctrlKey || event.metaKey; + break; // current on ctrl or command +home + case 37: if (event.ctrlKey || event.metaKey) { + $.datepicker._adjustDate(event.target, (isRTL ? +1 : -1), "D"); + } + handled = event.ctrlKey || event.metaKey; + // -1 day on ctrl or command +left + if (event.originalEvent.altKey) { + $.datepicker._adjustDate(event.target, (event.ctrlKey ? + -$.datepicker._get(inst, "stepBigMonths") : + -$.datepicker._get(inst, "stepMonths")), "M"); + } + // next month/year on alt +left on Mac + break; + case 38: if (event.ctrlKey || event.metaKey) { + $.datepicker._adjustDate(event.target, -7, "D"); + } + handled = event.ctrlKey || event.metaKey; + break; // -1 week on ctrl or command +up + case 39: if (event.ctrlKey || event.metaKey) { + $.datepicker._adjustDate(event.target, (isRTL ? -1 : +1), "D"); + } + handled = event.ctrlKey || event.metaKey; + // +1 day on ctrl or command +right + if (event.originalEvent.altKey) { + $.datepicker._adjustDate(event.target, (event.ctrlKey ? + +$.datepicker._get(inst, "stepBigMonths") : + +$.datepicker._get(inst, "stepMonths")), "M"); + } + // next month/year on alt +right + break; + case 40: if (event.ctrlKey || event.metaKey) { + $.datepicker._adjustDate(event.target, +7, "D"); + } + handled = event.ctrlKey || event.metaKey; + break; // +1 week on ctrl or command +down + default: handled = false; + } + } else if (event.keyCode === 36 && event.ctrlKey) { // display the date picker on ctrl+home + $.datepicker._showDatepicker(this); + } else { + handled = false; + } + + if (handled) { + event.preventDefault(); + event.stopPropagation(); + } + }, + + /* Filter entered characters - based on date format. */ + _doKeyPress: function(event) { + var chars, chr, + inst = $.datepicker._getInst(event.target); + + if ($.datepicker._get(inst, "constrainInput")) { + chars = $.datepicker._possibleChars($.datepicker._get(inst, "dateFormat")); + chr = String.fromCharCode(event.charCode == null ? event.keyCode : event.charCode); + return event.ctrlKey || event.metaKey || (chr < " " || !chars || chars.indexOf(chr) > -1); + } + }, + + /* Synchronise manual entry and field/alternate field. */ + _doKeyUp: function(event) { + var date, + inst = $.datepicker._getInst(event.target); + + if (inst.input.val() !== inst.lastVal) { + try { + date = $.datepicker.parseDate($.datepicker._get(inst, "dateFormat"), + (inst.input ? inst.input.val() : null), + $.datepicker._getFormatConfig(inst)); + + if (date) { // only if valid + $.datepicker._setDateFromField(inst); + $.datepicker._updateAlternate(inst); + $.datepicker._updateDatepicker(inst); + } + } + catch (err) { + } + } + return true; + }, + + /* Pop-up the date picker for a given input field. + * If false returned from beforeShow event handler do not show. + * @param input element - the input field attached to the date picker or + * event - if triggered by focus + */ + _showDatepicker: function(input) { + input = input.target || input; + if (input.nodeName.toLowerCase() !== "input") { // find from button/image trigger + input = $("input", input.parentNode)[0]; + } + + if ($.datepicker._isDisabledDatepicker(input) || $.datepicker._lastInput === input) { // already here + return; + } + + var inst, beforeShow, beforeShowSettings, isFixed, + offset, showAnim, duration; + + inst = $.datepicker._getInst(input); + if ($.datepicker._curInst && $.datepicker._curInst !== inst) { + $.datepicker._curInst.dpDiv.stop(true, true); + if ( inst && $.datepicker._datepickerShowing ) { + $.datepicker._hideDatepicker( $.datepicker._curInst.input[0] ); + } + } + + beforeShow = $.datepicker._get(inst, "beforeShow"); + beforeShowSettings = beforeShow ? beforeShow.apply(input, [input, inst]) : {}; + if(beforeShowSettings === false){ + return; + } + datepicker_extendRemove(inst.settings, beforeShowSettings); + + inst.lastVal = null; + $.datepicker._lastInput = input; + $.datepicker._setDateFromField(inst); + + if ($.datepicker._inDialog) { // hide cursor + input.value = ""; + } + if (!$.datepicker._pos) { // position below input + $.datepicker._pos = $.datepicker._findPos(input); + $.datepicker._pos[1] += input.offsetHeight; // add the height + } + + isFixed = false; + $(input).parents().each(function() { + isFixed |= $(this).css("position") === "fixed"; + return !isFixed; + }); + + offset = {left: $.datepicker._pos[0], top: $.datepicker._pos[1]}; + $.datepicker._pos = null; + //to avoid flashes on Firefox + inst.dpDiv.empty(); + // determine sizing offscreen + inst.dpDiv.css({position: "absolute", display: "block", top: "-1000px"}); + $.datepicker._updateDatepicker(inst); + // fix width for dynamic number of date pickers + // and adjust position before showing + offset = $.datepicker._checkOffset(inst, offset, isFixed); + inst.dpDiv.css({position: ($.datepicker._inDialog && $.blockUI ? + "static" : (isFixed ? "fixed" : "absolute")), display: "none", + left: offset.left + "px", top: offset.top + "px"}); + + if (!inst.inline) { + showAnim = $.datepicker._get(inst, "showAnim"); + duration = $.datepicker._get(inst, "duration"); + inst.dpDiv.css( "z-index", datepicker_getZindex( $( input ) ) + 1 ); + $.datepicker._datepickerShowing = true; + + if ( $.effects && $.effects.effect[ showAnim ] ) { + inst.dpDiv.show(showAnim, $.datepicker._get(inst, "showOptions"), duration); + } else { + inst.dpDiv[showAnim || "show"](showAnim ? duration : null); + } + + if ( $.datepicker._shouldFocusInput( inst ) ) { + inst.input.focus(); + } + + $.datepicker._curInst = inst; + } + }, + + /* Generate the date picker content. */ + _updateDatepicker: function(inst) { + this.maxRows = 4; //Reset the max number of rows being displayed (see #7043) + datepicker_instActive = inst; // for delegate hover events + inst.dpDiv.empty().append(this._generateHTML(inst)); + this._attachHandlers(inst); + + var origyearshtml, + numMonths = this._getNumberOfMonths(inst), + cols = numMonths[1], + width = 17, + activeCell = inst.dpDiv.find( "." + this._dayOverClass + " a" ); + + if ( activeCell.length > 0 ) { + datepicker_handleMouseover.apply( activeCell.get( 0 ) ); + } + + inst.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""); + if (cols > 1) { + inst.dpDiv.addClass("ui-datepicker-multi-" + cols).css("width", (width * cols) + "em"); + } + inst.dpDiv[(numMonths[0] !== 1 || numMonths[1] !== 1 ? "add" : "remove") + + "Class"]("ui-datepicker-multi"); + inst.dpDiv[(this._get(inst, "isRTL") ? "add" : "remove") + + "Class"]("ui-datepicker-rtl"); + + if (inst === $.datepicker._curInst && $.datepicker._datepickerShowing && $.datepicker._shouldFocusInput( inst ) ) { + inst.input.focus(); + } + + // deffered render of the years select (to avoid flashes on Firefox) + if( inst.yearshtml ){ + origyearshtml = inst.yearshtml; + setTimeout(function(){ + //assure that inst.yearshtml didn't change. + if( origyearshtml === inst.yearshtml && inst.yearshtml ){ + inst.dpDiv.find("select.ui-datepicker-year:first").replaceWith(inst.yearshtml); + } + origyearshtml = inst.yearshtml = null; + }, 0); + } + }, + + // #6694 - don't focus the input if it's already focused + // this breaks the change event in IE + // Support: IE and jQuery <1.9 + _shouldFocusInput: function( inst ) { + return inst.input && inst.input.is( ":visible" ) && !inst.input.is( ":disabled" ) && !inst.input.is( ":focus" ); + }, + + /* Check positioning to remain on screen. */ + _checkOffset: function(inst, offset, isFixed) { + var dpWidth = inst.dpDiv.outerWidth(), + dpHeight = inst.dpDiv.outerHeight(), + inputWidth = inst.input ? inst.input.outerWidth() : 0, + inputHeight = inst.input ? inst.input.outerHeight() : 0, + viewWidth = document.documentElement.clientWidth + (isFixed ? 0 : $(document).scrollLeft()), + viewHeight = document.documentElement.clientHeight + (isFixed ? 0 : $(document).scrollTop()); + + offset.left -= (this._get(inst, "isRTL") ? (dpWidth - inputWidth) : 0); + offset.left -= (isFixed && offset.left === inst.input.offset().left) ? $(document).scrollLeft() : 0; + offset.top -= (isFixed && offset.top === (inst.input.offset().top + inputHeight)) ? $(document).scrollTop() : 0; + + // now check if datepicker is showing outside window viewport - move to a better place if so. + offset.left -= Math.min(offset.left, (offset.left + dpWidth > viewWidth && viewWidth > dpWidth) ? + Math.abs(offset.left + dpWidth - viewWidth) : 0); + offset.top -= Math.min(offset.top, (offset.top + dpHeight > viewHeight && viewHeight > dpHeight) ? + Math.abs(dpHeight + inputHeight) : 0); + + return offset; + }, + + /* Find an object's position on the screen. */ + _findPos: function(obj) { + var position, + inst = this._getInst(obj), + isRTL = this._get(inst, "isRTL"); + + while (obj && (obj.type === "hidden" || obj.nodeType !== 1 || $.expr.filters.hidden(obj))) { + obj = obj[isRTL ? "previousSibling" : "nextSibling"]; + } + + position = $(obj).offset(); + return [position.left, position.top]; + }, + + /* Hide the date picker from view. + * @param input element - the input field attached to the date picker + */ + _hideDatepicker: function(input) { + var showAnim, duration, postProcess, onClose, + inst = this._curInst; + + if (!inst || (input && inst !== $.data(input, "datepicker"))) { + return; + } + + if (this._datepickerShowing) { + showAnim = this._get(inst, "showAnim"); + duration = this._get(inst, "duration"); + postProcess = function() { + $.datepicker._tidyDialog(inst); + }; + + // DEPRECATED: after BC for 1.8.x $.effects[ showAnim ] is not needed + if ( $.effects && ( $.effects.effect[ showAnim ] || $.effects[ showAnim ] ) ) { + inst.dpDiv.hide(showAnim, $.datepicker._get(inst, "showOptions"), duration, postProcess); + } else { + inst.dpDiv[(showAnim === "slideDown" ? "slideUp" : + (showAnim === "fadeIn" ? "fadeOut" : "hide"))]((showAnim ? duration : null), postProcess); + } + + if (!showAnim) { + postProcess(); + } + this._datepickerShowing = false; + + onClose = this._get(inst, "onClose"); + if (onClose) { + onClose.apply((inst.input ? inst.input[0] : null), [(inst.input ? inst.input.val() : ""), inst]); + } + + this._lastInput = null; + if (this._inDialog) { + this._dialogInput.css({ position: "absolute", left: "0", top: "-100px" }); + if ($.blockUI) { + $.unblockUI(); + $("body").append(this.dpDiv); + } + } + this._inDialog = false; + } + }, + + /* Tidy up after a dialog display. */ + _tidyDialog: function(inst) { + inst.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar"); + }, + + /* Close date picker if clicked elsewhere. */ + _checkExternalClick: function(event) { + if (!$.datepicker._curInst) { + return; + } + + var $target = $(event.target), + inst = $.datepicker._getInst($target[0]); + + if ( ( ( $target[0].id !== $.datepicker._mainDivId && + $target.parents("#" + $.datepicker._mainDivId).length === 0 && + !$target.hasClass($.datepicker.markerClassName) && + !$target.closest("." + $.datepicker._triggerClass).length && + $.datepicker._datepickerShowing && !($.datepicker._inDialog && $.blockUI) ) ) || + ( $target.hasClass($.datepicker.markerClassName) && $.datepicker._curInst !== inst ) ) { + $.datepicker._hideDatepicker(); + } + }, + + /* Adjust one of the date sub-fields. */ + _adjustDate: function(id, offset, period) { + var target = $(id), + inst = this._getInst(target[0]); + + if (this._isDisabledDatepicker(target[0])) { + return; + } + this._adjustInstDate(inst, offset + + (period === "M" ? this._get(inst, "showCurrentAtPos") : 0), // undo positioning + period); + this._updateDatepicker(inst); + }, + + /* Action for current link. */ + _gotoToday: function(id) { + var date, + target = $(id), + inst = this._getInst(target[0]); + + if (this._get(inst, "gotoCurrent") && inst.currentDay) { + inst.selectedDay = inst.currentDay; + inst.drawMonth = inst.selectedMonth = inst.currentMonth; + inst.drawYear = inst.selectedYear = inst.currentYear; + } else { + date = new Date(); + inst.selectedDay = date.getDate(); + inst.drawMonth = inst.selectedMonth = date.getMonth(); + inst.drawYear = inst.selectedYear = date.getFullYear(); + } + this._notifyChange(inst); + this._adjustDate(target); + }, + + /* Action for selecting a new month/year. */ + _selectMonthYear: function(id, select, period) { + var target = $(id), + inst = this._getInst(target[0]); + + inst["selected" + (period === "M" ? "Month" : "Year")] = + inst["draw" + (period === "M" ? "Month" : "Year")] = + parseInt(select.options[select.selectedIndex].value,10); + + this._notifyChange(inst); + this._adjustDate(target); + }, + + /* Action for selecting a day. */ + _selectDay: function(id, month, year, td) { + var inst, + target = $(id); + + if ($(td).hasClass(this._unselectableClass) || this._isDisabledDatepicker(target[0])) { + return; + } + + inst = this._getInst(target[0]); + inst.selectedDay = inst.currentDay = $("a", td).html(); + inst.selectedMonth = inst.currentMonth = month; + inst.selectedYear = inst.currentYear = year; + this._selectDate(id, this._formatDate(inst, + inst.currentDay, inst.currentMonth, inst.currentYear)); + }, + + /* Erase the input field and hide the date picker. */ + _clearDate: function(id) { + var target = $(id); + this._selectDate(target, ""); + }, + + /* Update the input field with the selected date. */ + _selectDate: function(id, dateStr) { + var onSelect, + target = $(id), + inst = this._getInst(target[0]); + + dateStr = (dateStr != null ? dateStr : this._formatDate(inst)); + if (inst.input) { + inst.input.val(dateStr); + } + this._updateAlternate(inst); + + onSelect = this._get(inst, "onSelect"); + if (onSelect) { + onSelect.apply((inst.input ? inst.input[0] : null), [dateStr, inst]); // trigger custom callback + } else if (inst.input) { + inst.input.trigger("change"); // fire the change event + } + + if (inst.inline){ + this._updateDatepicker(inst); + } else { + this._hideDatepicker(); + this._lastInput = inst.input[0]; + if (typeof(inst.input[0]) !== "object") { + inst.input.focus(); // restore focus + } + this._lastInput = null; + } + }, + + /* Update any alternate field to synchronise with the main field. */ + _updateAlternate: function(inst) { + var altFormat, date, dateStr, + altField = this._get(inst, "altField"); + + if (altField) { // update alternate field too + altFormat = this._get(inst, "altFormat") || this._get(inst, "dateFormat"); + date = this._getDate(inst); + dateStr = this.formatDate(altFormat, date, this._getFormatConfig(inst)); + $(altField).each(function() { $(this).val(dateStr); }); + } + }, + + /* Set as beforeShowDay function to prevent selection of weekends. + * @param date Date - the date to customise + * @return [boolean, string] - is this date selectable?, what is its CSS class? + */ + noWeekends: function(date) { + var day = date.getDay(); + return [(day > 0 && day < 6), ""]; + }, + + /* Set as calculateWeek to determine the week of the year based on the ISO 8601 definition. + * @param date Date - the date to get the week for + * @return number - the number of the week within the year that contains this date + */ + iso8601Week: function(date) { + var time, + checkDate = new Date(date.getTime()); + + // Find Thursday of this week starting on Monday + checkDate.setDate(checkDate.getDate() + 4 - (checkDate.getDay() || 7)); + + time = checkDate.getTime(); + checkDate.setMonth(0); // Compare with Jan 1 + checkDate.setDate(1); + return Math.floor(Math.round((time - checkDate) / 86400000) / 7) + 1; + }, + + /* Parse a string value into a date object. + * See formatDate below for the possible formats. + * + * @param format string - the expected format of the date + * @param value string - the date in the above format + * @param settings Object - attributes include: + * shortYearCutoff number - the cutoff year for determining the century (optional) + * dayNamesShort string[7] - abbreviated names of the days from Sunday (optional) + * dayNames string[7] - names of the days from Sunday (optional) + * monthNamesShort string[12] - abbreviated names of the months (optional) + * monthNames string[12] - names of the months (optional) + * @return Date - the extracted date value or null if value is blank + */ + parseDate: function (format, value, settings) { + if (format == null || value == null) { + throw "Invalid arguments"; + } + + value = (typeof value === "object" ? value.toString() : value + ""); + if (value === "") { + return null; + } + + var iFormat, dim, extra, + iValue = 0, + shortYearCutoffTemp = (settings ? settings.shortYearCutoff : null) || this._defaults.shortYearCutoff, + shortYearCutoff = (typeof shortYearCutoffTemp !== "string" ? shortYearCutoffTemp : + new Date().getFullYear() % 100 + parseInt(shortYearCutoffTemp, 10)), + dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort, + dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames, + monthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort, + monthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames, + year = -1, + month = -1, + day = -1, + doy = -1, + literal = false, + date, + // Check whether a format character is doubled + lookAhead = function(match) { + var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) === match); + if (matches) { + iFormat++; + } + return matches; + }, + // Extract a number from the string value + getNumber = function(match) { + var isDoubled = lookAhead(match), + size = (match === "@" ? 14 : (match === "!" ? 20 : + (match === "y" && isDoubled ? 4 : (match === "o" ? 3 : 2)))), + minSize = (match === "y" ? size : 1), + digits = new RegExp("^\\d{" + minSize + "," + size + "}"), + num = value.substring(iValue).match(digits); + if (!num) { + throw "Missing number at position " + iValue; + } + iValue += num[0].length; + return parseInt(num[0], 10); + }, + // Extract a name from the string value and convert to an index + getName = function(match, shortNames, longNames) { + var index = -1, + names = $.map(lookAhead(match) ? longNames : shortNames, function (v, k) { + return [ [k, v] ]; + }).sort(function (a, b) { + return -(a[1].length - b[1].length); + }); + + $.each(names, function (i, pair) { + var name = pair[1]; + if (value.substr(iValue, name.length).toLowerCase() === name.toLowerCase()) { + index = pair[0]; + iValue += name.length; + return false; + } + }); + if (index !== -1) { + return index + 1; + } else { + throw "Unknown name at position " + iValue; + } + }, + // Confirm that a literal character matches the string value + checkLiteral = function() { + if (value.charAt(iValue) !== format.charAt(iFormat)) { + throw "Unexpected literal at position " + iValue; + } + iValue++; + }; + + for (iFormat = 0; iFormat < format.length; iFormat++) { + if (literal) { + if (format.charAt(iFormat) === "'" && !lookAhead("'")) { + literal = false; + } else { + checkLiteral(); + } + } else { + switch (format.charAt(iFormat)) { + case "d": + day = getNumber("d"); + break; + case "D": + getName("D", dayNamesShort, dayNames); + break; + case "o": + doy = getNumber("o"); + break; + case "m": + month = getNumber("m"); + break; + case "M": + month = getName("M", monthNamesShort, monthNames); + break; + case "y": + year = getNumber("y"); + break; + case "@": + date = new Date(getNumber("@")); + year = date.getFullYear(); + month = date.getMonth() + 1; + day = date.getDate(); + break; + case "!": + date = new Date((getNumber("!") - this._ticksTo1970) / 10000); + year = date.getFullYear(); + month = date.getMonth() + 1; + day = date.getDate(); + break; + case "'": + if (lookAhead("'")){ + checkLiteral(); + } else { + literal = true; + } + break; + default: + checkLiteral(); + } + } + } + + if (iValue < value.length){ + extra = value.substr(iValue); + if (!/^\s+/.test(extra)) { + throw "Extra/unparsed characters found in date: " + extra; + } + } + + if (year === -1) { + year = new Date().getFullYear(); + } else if (year < 100) { + year += new Date().getFullYear() - new Date().getFullYear() % 100 + + (year <= shortYearCutoff ? 0 : -100); + } + + if (doy > -1) { + month = 1; + day = doy; + do { + dim = this._getDaysInMonth(year, month - 1); + if (day <= dim) { + break; + } + month++; + day -= dim; + } while (true); + } + + date = this._daylightSavingAdjust(new Date(year, month - 1, day)); + if (date.getFullYear() !== year || date.getMonth() + 1 !== month || date.getDate() !== day) { + throw "Invalid date"; // E.g. 31/02/00 + } + return date; + }, + + /* Standard date formats. */ + ATOM: "yy-mm-dd", // RFC 3339 (ISO 8601) + COOKIE: "D, dd M yy", + ISO_8601: "yy-mm-dd", + RFC_822: "D, d M y", + RFC_850: "DD, dd-M-y", + RFC_1036: "D, d M y", + RFC_1123: "D, d M yy", + RFC_2822: "D, d M yy", + RSS: "D, d M y", // RFC 822 + TICKS: "!", + TIMESTAMP: "@", + W3C: "yy-mm-dd", // ISO 8601 + + _ticksTo1970: (((1970 - 1) * 365 + Math.floor(1970 / 4) - Math.floor(1970 / 100) + + Math.floor(1970 / 400)) * 24 * 60 * 60 * 10000000), + + /* Format a date object into a string value. + * The format can be combinations of the following: + * d - day of month (no leading zero) + * dd - day of month (two digit) + * o - day of year (no leading zeros) + * oo - day of year (three digit) + * D - day name short + * DD - day name long + * m - month of year (no leading zero) + * mm - month of year (two digit) + * M - month name short + * MM - month name long + * y - year (two digit) + * yy - year (four digit) + * @ - Unix timestamp (ms since 01/01/1970) + * ! - Windows ticks (100ns since 01/01/0001) + * "..." - literal text + * '' - single quote + * + * @param format string - the desired format of the date + * @param date Date - the date value to format + * @param settings Object - attributes include: + * dayNamesShort string[7] - abbreviated names of the days from Sunday (optional) + * dayNames string[7] - names of the days from Sunday (optional) + * monthNamesShort string[12] - abbreviated names of the months (optional) + * monthNames string[12] - names of the months (optional) + * @return string - the date in the above format + */ + formatDate: function (format, date, settings) { + if (!date) { + return ""; + } + + var iFormat, + dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort, + dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames, + monthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort, + monthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames, + // Check whether a format character is doubled + lookAhead = function(match) { + var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) === match); + if (matches) { + iFormat++; + } + return matches; + }, + // Format a number, with leading zero if necessary + formatNumber = function(match, value, len) { + var num = "" + value; + if (lookAhead(match)) { + while (num.length < len) { + num = "0" + num; + } + } + return num; + }, + // Format a name, short or long as requested + formatName = function(match, value, shortNames, longNames) { + return (lookAhead(match) ? longNames[value] : shortNames[value]); + }, + output = "", + literal = false; + + if (date) { + for (iFormat = 0; iFormat < format.length; iFormat++) { + if (literal) { + if (format.charAt(iFormat) === "'" && !lookAhead("'")) { + literal = false; + } else { + output += format.charAt(iFormat); + } + } else { + switch (format.charAt(iFormat)) { + case "d": + output += formatNumber("d", date.getDate(), 2); + break; + case "D": + output += formatName("D", date.getDay(), dayNamesShort, dayNames); + break; + case "o": + output += formatNumber("o", + Math.round((new Date(date.getFullYear(), date.getMonth(), date.getDate()).getTime() - new Date(date.getFullYear(), 0, 0).getTime()) / 86400000), 3); + break; + case "m": + output += formatNumber("m", date.getMonth() + 1, 2); + break; + case "M": + output += formatName("M", date.getMonth(), monthNamesShort, monthNames); + break; + case "y": + output += (lookAhead("y") ? date.getFullYear() : + (date.getYear() % 100 < 10 ? "0" : "") + date.getYear() % 100); + break; + case "@": + output += date.getTime(); + break; + case "!": + output += date.getTime() * 10000 + this._ticksTo1970; + break; + case "'": + if (lookAhead("'")) { + output += "'"; + } else { + literal = true; + } + break; + default: + output += format.charAt(iFormat); + } + } + } + } + return output; + }, + + /* Extract all possible characters from the date format. */ + _possibleChars: function (format) { + var iFormat, + chars = "", + literal = false, + // Check whether a format character is doubled + lookAhead = function(match) { + var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) === match); + if (matches) { + iFormat++; + } + return matches; + }; + + for (iFormat = 0; iFormat < format.length; iFormat++) { + if (literal) { + if (format.charAt(iFormat) === "'" && !lookAhead("'")) { + literal = false; + } else { + chars += format.charAt(iFormat); + } + } else { + switch (format.charAt(iFormat)) { + case "d": case "m": case "y": case "@": + chars += "0123456789"; + break; + case "D": case "M": + return null; // Accept anything + case "'": + if (lookAhead("'")) { + chars += "'"; + } else { + literal = true; + } + break; + default: + chars += format.charAt(iFormat); + } + } + } + return chars; + }, + + /* Get a setting value, defaulting if necessary. */ + _get: function(inst, name) { + return inst.settings[name] !== undefined ? + inst.settings[name] : this._defaults[name]; + }, + + /* Parse existing date and initialise date picker. */ + _setDateFromField: function(inst, noDefault) { + if (inst.input.val() === inst.lastVal) { + return; + } + + var dateFormat = this._get(inst, "dateFormat"), + dates = inst.lastVal = inst.input ? inst.input.val() : null, + defaultDate = this._getDefaultDate(inst), + date = defaultDate, + settings = this._getFormatConfig(inst); + + try { + date = this.parseDate(dateFormat, dates, settings) || defaultDate; + } catch (event) { + dates = (noDefault ? "" : dates); + } + inst.selectedDay = date.getDate(); + inst.drawMonth = inst.selectedMonth = date.getMonth(); + inst.drawYear = inst.selectedYear = date.getFullYear(); + inst.currentDay = (dates ? date.getDate() : 0); + inst.currentMonth = (dates ? date.getMonth() : 0); + inst.currentYear = (dates ? date.getFullYear() : 0); + this._adjustInstDate(inst); + }, + + /* Retrieve the default date shown on opening. */ + _getDefaultDate: function(inst) { + return this._restrictMinMax(inst, + this._determineDate(inst, this._get(inst, "defaultDate"), new Date())); + }, + + /* A date may be specified as an exact value or a relative one. */ + _determineDate: function(inst, date, defaultDate) { + var offsetNumeric = function(offset) { + var date = new Date(); + date.setDate(date.getDate() + offset); + return date; + }, + offsetString = function(offset) { + try { + return $.datepicker.parseDate($.datepicker._get(inst, "dateFormat"), + offset, $.datepicker._getFormatConfig(inst)); + } + catch (e) { + // Ignore + } + + var date = (offset.toLowerCase().match(/^c/) ? + $.datepicker._getDate(inst) : null) || new Date(), + year = date.getFullYear(), + month = date.getMonth(), + day = date.getDate(), + pattern = /([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g, + matches = pattern.exec(offset); + + while (matches) { + switch (matches[2] || "d") { + case "d" : case "D" : + day += parseInt(matches[1],10); break; + case "w" : case "W" : + day += parseInt(matches[1],10) * 7; break; + case "m" : case "M" : + month += parseInt(matches[1],10); + day = Math.min(day, $.datepicker._getDaysInMonth(year, month)); + break; + case "y": case "Y" : + year += parseInt(matches[1],10); + day = Math.min(day, $.datepicker._getDaysInMonth(year, month)); + break; + } + matches = pattern.exec(offset); + } + return new Date(year, month, day); + }, + newDate = (date == null || date === "" ? defaultDate : (typeof date === "string" ? offsetString(date) : + (typeof date === "number" ? (isNaN(date) ? defaultDate : offsetNumeric(date)) : new Date(date.getTime())))); + + newDate = (newDate && newDate.toString() === "Invalid Date" ? defaultDate : newDate); + if (newDate) { + newDate.setHours(0); + newDate.setMinutes(0); + newDate.setSeconds(0); + newDate.setMilliseconds(0); + } + return this._daylightSavingAdjust(newDate); + }, + + /* Handle switch to/from daylight saving. + * Hours may be non-zero on daylight saving cut-over: + * > 12 when midnight changeover, but then cannot generate + * midnight datetime, so jump to 1AM, otherwise reset. + * @param date (Date) the date to check + * @return (Date) the corrected date + */ + _daylightSavingAdjust: function(date) { + if (!date) { + return null; + } + date.setHours(date.getHours() > 12 ? date.getHours() + 2 : 0); + return date; + }, + + /* Set the date(s) directly. */ + _setDate: function(inst, date, noChange) { + var clear = !date, + origMonth = inst.selectedMonth, + origYear = inst.selectedYear, + newDate = this._restrictMinMax(inst, this._determineDate(inst, date, new Date())); + + inst.selectedDay = inst.currentDay = newDate.getDate(); + inst.drawMonth = inst.selectedMonth = inst.currentMonth = newDate.getMonth(); + inst.drawYear = inst.selectedYear = inst.currentYear = newDate.getFullYear(); + if ((origMonth !== inst.selectedMonth || origYear !== inst.selectedYear) && !noChange) { + this._notifyChange(inst); + } + this._adjustInstDate(inst); + if (inst.input) { + inst.input.val(clear ? "" : this._formatDate(inst)); + } + }, + + /* Retrieve the date(s) directly. */ + _getDate: function(inst) { + var startDate = (!inst.currentYear || (inst.input && inst.input.val() === "") ? null : + this._daylightSavingAdjust(new Date( + inst.currentYear, inst.currentMonth, inst.currentDay))); + return startDate; + }, + + /* Attach the onxxx handlers. These are declared statically so + * they work with static code transformers like Caja. + */ + _attachHandlers: function(inst) { + var stepMonths = this._get(inst, "stepMonths"), + id = "#" + inst.id.replace( /\\\\/g, "\\" ); + inst.dpDiv.find("[data-handler]").map(function () { + var handler = { + prev: function () { + $.datepicker._adjustDate(id, -stepMonths, "M"); + }, + next: function () { + $.datepicker._adjustDate(id, +stepMonths, "M"); + }, + hide: function () { + $.datepicker._hideDatepicker(); + }, + today: function () { + $.datepicker._gotoToday(id); + }, + selectDay: function () { + $.datepicker._selectDay(id, +this.getAttribute("data-month"), +this.getAttribute("data-year"), this); + return false; + }, + selectMonth: function () { + $.datepicker._selectMonthYear(id, this, "M"); + return false; + }, + selectYear: function () { + $.datepicker._selectMonthYear(id, this, "Y"); + return false; + } + }; + $(this).bind(this.getAttribute("data-event"), handler[this.getAttribute("data-handler")]); + }); + }, + + /* Generate the HTML for the current state of the date picker. */ + _generateHTML: function(inst) { + var maxDraw, prevText, prev, nextText, next, currentText, gotoDate, + controls, buttonPanel, firstDay, showWeek, dayNames, dayNamesMin, + monthNames, monthNamesShort, beforeShowDay, showOtherMonths, + selectOtherMonths, defaultDate, html, dow, row, group, col, selectedDate, + cornerClass, calender, thead, day, daysInMonth, leadDays, curRows, numRows, + printDate, dRow, tbody, daySettings, otherMonth, unselectable, + tempDate = new Date(), + today = this._daylightSavingAdjust( + new Date(tempDate.getFullYear(), tempDate.getMonth(), tempDate.getDate())), // clear time + isRTL = this._get(inst, "isRTL"), + showButtonPanel = this._get(inst, "showButtonPanel"), + hideIfNoPrevNext = this._get(inst, "hideIfNoPrevNext"), + navigationAsDateFormat = this._get(inst, "navigationAsDateFormat"), + numMonths = this._getNumberOfMonths(inst), + showCurrentAtPos = this._get(inst, "showCurrentAtPos"), + stepMonths = this._get(inst, "stepMonths"), + isMultiMonth = (numMonths[0] !== 1 || numMonths[1] !== 1), + currentDate = this._daylightSavingAdjust((!inst.currentDay ? new Date(9999, 9, 9) : + new Date(inst.currentYear, inst.currentMonth, inst.currentDay))), + minDate = this._getMinMaxDate(inst, "min"), + maxDate = this._getMinMaxDate(inst, "max"), + drawMonth = inst.drawMonth - showCurrentAtPos, + drawYear = inst.drawYear; + + if (drawMonth < 0) { + drawMonth += 12; + drawYear--; + } + if (maxDate) { + maxDraw = this._daylightSavingAdjust(new Date(maxDate.getFullYear(), + maxDate.getMonth() - (numMonths[0] * numMonths[1]) + 1, maxDate.getDate())); + maxDraw = (minDate && maxDraw < minDate ? minDate : maxDraw); + while (this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1)) > maxDraw) { + drawMonth--; + if (drawMonth < 0) { + drawMonth = 11; + drawYear--; + } + } + } + inst.drawMonth = drawMonth; + inst.drawYear = drawYear; + + prevText = this._get(inst, "prevText"); + prevText = (!navigationAsDateFormat ? prevText : this.formatDate(prevText, + this._daylightSavingAdjust(new Date(drawYear, drawMonth - stepMonths, 1)), + this._getFormatConfig(inst))); + + prev = (this._canAdjustMonth(inst, -1, drawYear, drawMonth) ? + "<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click'" + + " title='" + prevText + "'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "e" : "w") + "'>" + prevText + "</span></a>" : + (hideIfNoPrevNext ? "" : "<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+ prevText +"'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "e" : "w") + "'>" + prevText + "</span></a>")); + + nextText = this._get(inst, "nextText"); + nextText = (!navigationAsDateFormat ? nextText : this.formatDate(nextText, + this._daylightSavingAdjust(new Date(drawYear, drawMonth + stepMonths, 1)), + this._getFormatConfig(inst))); + + next = (this._canAdjustMonth(inst, +1, drawYear, drawMonth) ? + "<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click'" + + " title='" + nextText + "'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "w" : "e") + "'>" + nextText + "</span></a>" : + (hideIfNoPrevNext ? "" : "<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+ nextText + "'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "w" : "e") + "'>" + nextText + "</span></a>")); + + currentText = this._get(inst, "currentText"); + gotoDate = (this._get(inst, "gotoCurrent") && inst.currentDay ? currentDate : today); + currentText = (!navigationAsDateFormat ? currentText : + this.formatDate(currentText, gotoDate, this._getFormatConfig(inst))); + + controls = (!inst.inline ? "<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>" + + this._get(inst, "closeText") + "</button>" : ""); + + buttonPanel = (showButtonPanel) ? "<div class='ui-datepicker-buttonpane ui-widget-content'>" + (isRTL ? controls : "") + + (this._isInRange(inst, gotoDate) ? "<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'" + + ">" + currentText + "</button>" : "") + (isRTL ? "" : controls) + "</div>" : ""; + + firstDay = parseInt(this._get(inst, "firstDay"),10); + firstDay = (isNaN(firstDay) ? 0 : firstDay); + + showWeek = this._get(inst, "showWeek"); + dayNames = this._get(inst, "dayNames"); + dayNamesMin = this._get(inst, "dayNamesMin"); + monthNames = this._get(inst, "monthNames"); + monthNamesShort = this._get(inst, "monthNamesShort"); + beforeShowDay = this._get(inst, "beforeShowDay"); + showOtherMonths = this._get(inst, "showOtherMonths"); + selectOtherMonths = this._get(inst, "selectOtherMonths"); + defaultDate = this._getDefaultDate(inst); + html = ""; + dow; + for (row = 0; row < numMonths[0]; row++) { + group = ""; + this.maxRows = 4; + for (col = 0; col < numMonths[1]; col++) { + selectedDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, inst.selectedDay)); + cornerClass = " ui-corner-all"; + calender = ""; + if (isMultiMonth) { + calender += "<div class='ui-datepicker-group"; + if (numMonths[1] > 1) { + switch (col) { + case 0: calender += " ui-datepicker-group-first"; + cornerClass = " ui-corner-" + (isRTL ? "right" : "left"); break; + case numMonths[1]-1: calender += " ui-datepicker-group-last"; + cornerClass = " ui-corner-" + (isRTL ? "left" : "right"); break; + default: calender += " ui-datepicker-group-middle"; cornerClass = ""; break; + } + } + calender += "'>"; + } + calender += "<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix" + cornerClass + "'>" + + (/all|left/.test(cornerClass) && row === 0 ? (isRTL ? next : prev) : "") + + (/all|right/.test(cornerClass) && row === 0 ? (isRTL ? prev : next) : "") + + this._generateMonthYearHeader(inst, drawMonth, drawYear, minDate, maxDate, + row > 0 || col > 0, monthNames, monthNamesShort) + // draw month headers + "</div><table class='ui-datepicker-calendar'><thead>" + + "<tr>"; + thead = (showWeek ? "<th class='ui-datepicker-week-col'>" + this._get(inst, "weekHeader") + "</th>" : ""); + for (dow = 0; dow < 7; dow++) { // days of the week + day = (dow + firstDay) % 7; + thead += "<th scope='col'" + ((dow + firstDay + 6) % 7 >= 5 ? " class='ui-datepicker-week-end'" : "") + ">" + + "<span title='" + dayNames[day] + "'>" + dayNamesMin[day] + "</span></th>"; + } + calender += thead + "</tr></thead><tbody>"; + daysInMonth = this._getDaysInMonth(drawYear, drawMonth); + if (drawYear === inst.selectedYear && drawMonth === inst.selectedMonth) { + inst.selectedDay = Math.min(inst.selectedDay, daysInMonth); + } + leadDays = (this._getFirstDayOfMonth(drawYear, drawMonth) - firstDay + 7) % 7; + curRows = Math.ceil((leadDays + daysInMonth) / 7); // calculate the number of rows to generate + numRows = (isMultiMonth ? this.maxRows > curRows ? this.maxRows : curRows : curRows); //If multiple months, use the higher number of rows (see #7043) + this.maxRows = numRows; + printDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1 - leadDays)); + for (dRow = 0; dRow < numRows; dRow++) { // create date picker rows + calender += "<tr>"; + tbody = (!showWeek ? "" : "<td class='ui-datepicker-week-col'>" + + this._get(inst, "calculateWeek")(printDate) + "</td>"); + for (dow = 0; dow < 7; dow++) { // create date picker days + daySettings = (beforeShowDay ? + beforeShowDay.apply((inst.input ? inst.input[0] : null), [printDate]) : [true, ""]); + otherMonth = (printDate.getMonth() !== drawMonth); + unselectable = (otherMonth && !selectOtherMonths) || !daySettings[0] || + (minDate && printDate < minDate) || (maxDate && printDate > maxDate); + tbody += "<td class='" + + ((dow + firstDay + 6) % 7 >= 5 ? " ui-datepicker-week-end" : "") + // highlight weekends + (otherMonth ? " ui-datepicker-other-month" : "") + // highlight days from other months + ((printDate.getTime() === selectedDate.getTime() && drawMonth === inst.selectedMonth && inst._keyEvent) || // user pressed key + (defaultDate.getTime() === printDate.getTime() && defaultDate.getTime() === selectedDate.getTime()) ? + // or defaultDate is current printedDate and defaultDate is selectedDate + " " + this._dayOverClass : "") + // highlight selected day + (unselectable ? " " + this._unselectableClass + " ui-state-disabled": "") + // highlight unselectable days + (otherMonth && !showOtherMonths ? "" : " " + daySettings[1] + // highlight custom dates + (printDate.getTime() === currentDate.getTime() ? " " + this._currentClass : "") + // highlight selected day + (printDate.getTime() === today.getTime() ? " ui-datepicker-today" : "")) + "'" + // highlight today (if different) + ((!otherMonth || showOtherMonths) && daySettings[2] ? " title='" + daySettings[2].replace(/'/g, "'") + "'" : "") + // cell title + (unselectable ? "" : " data-handler='selectDay' data-event='click' data-month='" + printDate.getMonth() + "' data-year='" + printDate.getFullYear() + "'") + ">" + // actions + (otherMonth && !showOtherMonths ? " " : // display for other months + (unselectable ? "<span class='ui-state-default'>" + printDate.getDate() + "</span>" : "<a class='ui-state-default" + + (printDate.getTime() === today.getTime() ? " ui-state-highlight" : "") + + (printDate.getTime() === currentDate.getTime() ? " ui-state-active" : "") + // highlight selected day + (otherMonth ? " ui-priority-secondary" : "") + // distinguish dates from other months + "' href='#'>" + printDate.getDate() + "</a>")) + "</td>"; // display selectable date + printDate.setDate(printDate.getDate() + 1); + printDate = this._daylightSavingAdjust(printDate); + } + calender += tbody + "</tr>"; + } + drawMonth++; + if (drawMonth > 11) { + drawMonth = 0; + drawYear++; + } + calender += "</tbody></table>" + (isMultiMonth ? "</div>" + + ((numMonths[0] > 0 && col === numMonths[1]-1) ? "<div class='ui-datepicker-row-break'></div>" : "") : ""); + group += calender; + } + html += group; + } + html += buttonPanel; + inst._keyEvent = false; + return html; + }, + + /* Generate the month and year header. */ + _generateMonthYearHeader: function(inst, drawMonth, drawYear, minDate, maxDate, + secondary, monthNames, monthNamesShort) { + + var inMinYear, inMaxYear, month, years, thisYear, determineYear, year, endYear, + changeMonth = this._get(inst, "changeMonth"), + changeYear = this._get(inst, "changeYear"), + showMonthAfterYear = this._get(inst, "showMonthAfterYear"), + html = "<div class='ui-datepicker-title'>", + monthHtml = ""; + + // month selection + if (secondary || !changeMonth) { + monthHtml += "<span class='ui-datepicker-month'>" + monthNames[drawMonth] + "</span>"; + } else { + inMinYear = (minDate && minDate.getFullYear() === drawYear); + inMaxYear = (maxDate && maxDate.getFullYear() === drawYear); + monthHtml += "<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>"; + for ( month = 0; month < 12; month++) { + if ((!inMinYear || month >= minDate.getMonth()) && (!inMaxYear || month <= maxDate.getMonth())) { + monthHtml += "<option value='" + month + "'" + + (month === drawMonth ? " selected='selected'" : "") + + ">" + monthNamesShort[month] + "</option>"; + } + } + monthHtml += "</select>"; + } + + if (!showMonthAfterYear) { + html += monthHtml + (secondary || !(changeMonth && changeYear) ? " " : ""); + } + + // year selection + if ( !inst.yearshtml ) { + inst.yearshtml = ""; + if (secondary || !changeYear) { + html += "<span class='ui-datepicker-year'>" + drawYear + "</span>"; + } else { + // determine range of years to display + years = this._get(inst, "yearRange").split(":"); + thisYear = new Date().getFullYear(); + determineYear = function(value) { + var year = (value.match(/c[+\-].*/) ? drawYear + parseInt(value.substring(1), 10) : + (value.match(/[+\-].*/) ? thisYear + parseInt(value, 10) : + parseInt(value, 10))); + return (isNaN(year) ? thisYear : year); + }; + year = determineYear(years[0]); + endYear = Math.max(year, determineYear(years[1] || "")); + year = (minDate ? Math.max(year, minDate.getFullYear()) : year); + endYear = (maxDate ? Math.min(endYear, maxDate.getFullYear()) : endYear); + inst.yearshtml += "<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>"; + for (; year <= endYear; year++) { + inst.yearshtml += "<option value='" + year + "'" + + (year === drawYear ? " selected='selected'" : "") + + ">" + year + "</option>"; + } + inst.yearshtml += "</select>"; + + html += inst.yearshtml; + inst.yearshtml = null; + } + } + + html += this._get(inst, "yearSuffix"); + if (showMonthAfterYear) { + html += (secondary || !(changeMonth && changeYear) ? " " : "") + monthHtml; + } + html += "</div>"; // Close datepicker_header + return html; + }, + + /* Adjust one of the date sub-fields. */ + _adjustInstDate: function(inst, offset, period) { + var year = inst.drawYear + (period === "Y" ? offset : 0), + month = inst.drawMonth + (period === "M" ? offset : 0), + day = Math.min(inst.selectedDay, this._getDaysInMonth(year, month)) + (period === "D" ? offset : 0), + date = this._restrictMinMax(inst, this._daylightSavingAdjust(new Date(year, month, day))); + + inst.selectedDay = date.getDate(); + inst.drawMonth = inst.selectedMonth = date.getMonth(); + inst.drawYear = inst.selectedYear = date.getFullYear(); + if (period === "M" || period === "Y") { + this._notifyChange(inst); + } + }, + + /* Ensure a date is within any min/max bounds. */ + _restrictMinMax: function(inst, date) { + var minDate = this._getMinMaxDate(inst, "min"), + maxDate = this._getMinMaxDate(inst, "max"), + newDate = (minDate && date < minDate ? minDate : date); + return (maxDate && newDate > maxDate ? maxDate : newDate); + }, + + /* Notify change of month/year. */ + _notifyChange: function(inst) { + var onChange = this._get(inst, "onChangeMonthYear"); + if (onChange) { + onChange.apply((inst.input ? inst.input[0] : null), + [inst.selectedYear, inst.selectedMonth + 1, inst]); + } + }, + + /* Determine the number of months to show. */ + _getNumberOfMonths: function(inst) { + var numMonths = this._get(inst, "numberOfMonths"); + return (numMonths == null ? [1, 1] : (typeof numMonths === "number" ? [1, numMonths] : numMonths)); + }, + + /* Determine the current maximum date - ensure no time components are set. */ + _getMinMaxDate: function(inst, minMax) { + return this._determineDate(inst, this._get(inst, minMax + "Date"), null); + }, + + /* Find the number of days in a given month. */ + _getDaysInMonth: function(year, month) { + return 32 - this._daylightSavingAdjust(new Date(year, month, 32)).getDate(); + }, + + /* Find the day of the week of the first of a month. */ + _getFirstDayOfMonth: function(year, month) { + return new Date(year, month, 1).getDay(); + }, + + /* Determines if we should allow a "next/prev" month display change. */ + _canAdjustMonth: function(inst, offset, curYear, curMonth) { + var numMonths = this._getNumberOfMonths(inst), + date = this._daylightSavingAdjust(new Date(curYear, + curMonth + (offset < 0 ? offset : numMonths[0] * numMonths[1]), 1)); + + if (offset < 0) { + date.setDate(this._getDaysInMonth(date.getFullYear(), date.getMonth())); + } + return this._isInRange(inst, date); + }, + + /* Is the given date in the accepted range? */ + _isInRange: function(inst, date) { + var yearSplit, currentYear, + minDate = this._getMinMaxDate(inst, "min"), + maxDate = this._getMinMaxDate(inst, "max"), + minYear = null, + maxYear = null, + years = this._get(inst, "yearRange"); + if (years){ + yearSplit = years.split(":"); + currentYear = new Date().getFullYear(); + minYear = parseInt(yearSplit[0], 10); + maxYear = parseInt(yearSplit[1], 10); + if ( yearSplit[0].match(/[+\-].*/) ) { + minYear += currentYear; + } + if ( yearSplit[1].match(/[+\-].*/) ) { + maxYear += currentYear; + } + } + + return ((!minDate || date.getTime() >= minDate.getTime()) && + (!maxDate || date.getTime() <= maxDate.getTime()) && + (!minYear || date.getFullYear() >= minYear) && + (!maxYear || date.getFullYear() <= maxYear)); + }, + + /* Provide the configuration settings for formatting/parsing. */ + _getFormatConfig: function(inst) { + var shortYearCutoff = this._get(inst, "shortYearCutoff"); + shortYearCutoff = (typeof shortYearCutoff !== "string" ? shortYearCutoff : + new Date().getFullYear() % 100 + parseInt(shortYearCutoff, 10)); + return {shortYearCutoff: shortYearCutoff, + dayNamesShort: this._get(inst, "dayNamesShort"), dayNames: this._get(inst, "dayNames"), + monthNamesShort: this._get(inst, "monthNamesShort"), monthNames: this._get(inst, "monthNames")}; + }, + + /* Format the given date for display. */ + _formatDate: function(inst, day, month, year) { + if (!day) { + inst.currentDay = inst.selectedDay; + inst.currentMonth = inst.selectedMonth; + inst.currentYear = inst.selectedYear; + } + var date = (day ? (typeof day === "object" ? day : + this._daylightSavingAdjust(new Date(year, month, day))) : + this._daylightSavingAdjust(new Date(inst.currentYear, inst.currentMonth, inst.currentDay))); + return this.formatDate(this._get(inst, "dateFormat"), date, this._getFormatConfig(inst)); + } +}); + +/* + * Bind hover events for datepicker elements. + * Done via delegate so the binding only occurs once in the lifetime of the parent div. + * Global datepicker_instActive, set by _updateDatepicker allows the handlers to find their way back to the active picker. + */ +function datepicker_bindHover(dpDiv) { + var selector = "button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a"; + return dpDiv.delegate(selector, "mouseout", function() { + $(this).removeClass("ui-state-hover"); + if (this.className.indexOf("ui-datepicker-prev") !== -1) { + $(this).removeClass("ui-datepicker-prev-hover"); + } + if (this.className.indexOf("ui-datepicker-next") !== -1) { + $(this).removeClass("ui-datepicker-next-hover"); + } + }) + .delegate( selector, "mouseover", datepicker_handleMouseover ); +} + +function datepicker_handleMouseover() { + if (!$.datepicker._isDisabledDatepicker( datepicker_instActive.inline? datepicker_instActive.dpDiv.parent()[0] : datepicker_instActive.input[0])) { + $(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"); + $(this).addClass("ui-state-hover"); + if (this.className.indexOf("ui-datepicker-prev") !== -1) { + $(this).addClass("ui-datepicker-prev-hover"); + } + if (this.className.indexOf("ui-datepicker-next") !== -1) { + $(this).addClass("ui-datepicker-next-hover"); + } + } +} + +/* jQuery extend now ignores nulls! */ +function datepicker_extendRemove(target, props) { + $.extend(target, props); + for (var name in props) { + if (props[name] == null) { + target[name] = props[name]; + } + } + return target; +} + +/* Invoke the datepicker functionality. + @param options string - a command, optionally followed by additional parameters or + Object - settings for attaching new datepicker functionality + @return jQuery object */ +$.fn.datepicker = function(options){ + + /* Verify an empty collection wasn't passed - Fixes #6976 */ + if ( !this.length ) { + return this; + } + + /* Initialise the date picker. */ + if (!$.datepicker.initialized) { + $(document).mousedown($.datepicker._checkExternalClick); + $.datepicker.initialized = true; + } + + /* Append datepicker main container to body if not exist. */ + if ($("#"+$.datepicker._mainDivId).length === 0) { + $("body").append($.datepicker.dpDiv); + } + + var otherArgs = Array.prototype.slice.call(arguments, 1); + if (typeof options === "string" && (options === "isDisabled" || options === "getDate" || options === "widget")) { + return $.datepicker["_" + options + "Datepicker"]. + apply($.datepicker, [this[0]].concat(otherArgs)); + } + if (options === "option" && arguments.length === 2 && typeof arguments[1] === "string") { + return $.datepicker["_" + options + "Datepicker"]. + apply($.datepicker, [this[0]].concat(otherArgs)); + } + return this.each(function() { + typeof options === "string" ? + $.datepicker["_" + options + "Datepicker"]. + apply($.datepicker, [this].concat(otherArgs)) : + $.datepicker._attachDatepicker(this, options); + }); +}; + +$.datepicker = new Datepicker(); // singleton instance +$.datepicker.initialized = false; +$.datepicker.uuid = new Date().getTime(); +$.datepicker.version = "1.11.4"; + +var datepicker = $.datepicker; + + +/*! + * jQuery UI Dialog 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/dialog/ + */ + + +var dialog = $.widget( "ui.dialog", { + version: "1.11.4", + options: { + appendTo: "body", + autoOpen: true, + buttons: [], + closeOnEscape: true, + closeText: "Close", + dialogClass: "", + draggable: true, + hide: null, + height: "auto", + maxHeight: null, + maxWidth: null, + minHeight: 150, + minWidth: 150, + modal: false, + position: { + my: "center", + at: "center", + of: window, + collision: "fit", + // Ensure the titlebar is always visible + using: function( pos ) { + var topOffset = $( this ).css( pos ).offset().top; + if ( topOffset < 0 ) { + $( this ).css( "top", pos.top - topOffset ); + } + } + }, + resizable: true, + show: null, + title: null, + width: 300, + + // callbacks + beforeClose: null, + close: null, + drag: null, + dragStart: null, + dragStop: null, + focus: null, + open: null, + resize: null, + resizeStart: null, + resizeStop: null + }, + + sizeRelatedOptions: { + buttons: true, + height: true, + maxHeight: true, + maxWidth: true, + minHeight: true, + minWidth: true, + width: true + }, + + resizableRelatedOptions: { + maxHeight: true, + maxWidth: true, + minHeight: true, + minWidth: true + }, + + _create: function() { + this.originalCss = { + display: this.element[ 0 ].style.display, + width: this.element[ 0 ].style.width, + minHeight: this.element[ 0 ].style.minHeight, + maxHeight: this.element[ 0 ].style.maxHeight, + height: this.element[ 0 ].style.height + }; + this.originalPosition = { + parent: this.element.parent(), + index: this.element.parent().children().index( this.element ) + }; + this.originalTitle = this.element.attr( "title" ); + this.options.title = this.options.title || this.originalTitle; + + this._createWrapper(); + + this.element + .show() + .removeAttr( "title" ) + .addClass( "ui-dialog-content ui-widget-content" ) + .appendTo( this.uiDialog ); + + this._createTitlebar(); + this._createButtonPane(); + + if ( this.options.draggable && $.fn.draggable ) { + this._makeDraggable(); + } + if ( this.options.resizable && $.fn.resizable ) { + this._makeResizable(); + } + + this._isOpen = false; + + this._trackFocus(); + }, + + _init: function() { + if ( this.options.autoOpen ) { + this.open(); + } + }, + + _appendTo: function() { + var element = this.options.appendTo; + if ( element && (element.jquery || element.nodeType) ) { + return $( element ); + } + return this.document.find( element || "body" ).eq( 0 ); + }, + + _destroy: function() { + var next, + originalPosition = this.originalPosition; + + this._untrackInstance(); + this._destroyOverlay(); + + this.element + .removeUniqueId() + .removeClass( "ui-dialog-content ui-widget-content" ) + .css( this.originalCss ) + // Without detaching first, the following becomes really slow + .detach(); + + this.uiDialog.stop( true, true ).remove(); + + if ( this.originalTitle ) { + this.element.attr( "title", this.originalTitle ); + } + + next = originalPosition.parent.children().eq( originalPosition.index ); + // Don't try to place the dialog next to itself (#8613) + if ( next.length && next[ 0 ] !== this.element[ 0 ] ) { + next.before( this.element ); + } else { + originalPosition.parent.append( this.element ); + } + }, + + widget: function() { + return this.uiDialog; + }, + + disable: $.noop, + enable: $.noop, + + close: function( event ) { + var activeElement, + that = this; + + if ( !this._isOpen || this._trigger( "beforeClose", event ) === false ) { + return; + } + + this._isOpen = false; + this._focusedElement = null; + this._destroyOverlay(); + this._untrackInstance(); + + if ( !this.opener.filter( ":focusable" ).focus().length ) { + + // support: IE9 + // IE9 throws an "Unspecified error" accessing document.activeElement from an <iframe> + try { + activeElement = this.document[ 0 ].activeElement; + + // Support: IE9, IE10 + // If the <body> is blurred, IE will switch windows, see #4520 + if ( activeElement && activeElement.nodeName.toLowerCase() !== "body" ) { + + // Hiding a focused element doesn't trigger blur in WebKit + // so in case we have nothing to focus on, explicitly blur the active element + // https://bugs.webkit.org/show_bug.cgi?id=47182 + $( activeElement ).blur(); + } + } catch ( error ) {} + } + + this._hide( this.uiDialog, this.options.hide, function() { + that._trigger( "close", event ); + }); + }, + + isOpen: function() { + return this._isOpen; + }, + + moveToTop: function() { + this._moveToTop(); + }, + + _moveToTop: function( event, silent ) { + var moved = false, + zIndices = this.uiDialog.siblings( ".ui-front:visible" ).map(function() { + return +$( this ).css( "z-index" ); + }).get(), + zIndexMax = Math.max.apply( null, zIndices ); + + if ( zIndexMax >= +this.uiDialog.css( "z-index" ) ) { + this.uiDialog.css( "z-index", zIndexMax + 1 ); + moved = true; + } + + if ( moved && !silent ) { + this._trigger( "focus", event ); + } + return moved; + }, + + open: function() { + var that = this; + if ( this._isOpen ) { + if ( this._moveToTop() ) { + this._focusTabbable(); + } + return; + } + + this._isOpen = true; + this.opener = $( this.document[ 0 ].activeElement ); + + this._size(); + this._position(); + this._createOverlay(); + this._moveToTop( null, true ); + + // Ensure the overlay is moved to the top with the dialog, but only when + // opening. The overlay shouldn't move after the dialog is open so that + // modeless dialogs opened after the modal dialog stack properly. + if ( this.overlay ) { + this.overlay.css( "z-index", this.uiDialog.css( "z-index" ) - 1 ); + } + + this._show( this.uiDialog, this.options.show, function() { + that._focusTabbable(); + that._trigger( "focus" ); + }); + + // Track the dialog immediately upon openening in case a focus event + // somehow occurs outside of the dialog before an element inside the + // dialog is focused (#10152) + this._makeFocusTarget(); + + this._trigger( "open" ); + }, + + _focusTabbable: function() { + // Set focus to the first match: + // 1. An element that was focused previously + // 2. First element inside the dialog matching [autofocus] + // 3. Tabbable element inside the content element + // 4. Tabbable element inside the buttonpane + // 5. The close button + // 6. The dialog itself + var hasFocus = this._focusedElement; + if ( !hasFocus ) { + hasFocus = this.element.find( "[autofocus]" ); + } + if ( !hasFocus.length ) { + hasFocus = this.element.find( ":tabbable" ); + } + if ( !hasFocus.length ) { + hasFocus = this.uiDialogButtonPane.find( ":tabbable" ); + } + if ( !hasFocus.length ) { + hasFocus = this.uiDialogTitlebarClose.filter( ":tabbable" ); + } + if ( !hasFocus.length ) { + hasFocus = this.uiDialog; + } + hasFocus.eq( 0 ).focus(); + }, + + _keepFocus: function( event ) { + function checkFocus() { + var activeElement = this.document[0].activeElement, + isActive = this.uiDialog[0] === activeElement || + $.contains( this.uiDialog[0], activeElement ); + if ( !isActive ) { + this._focusTabbable(); + } + } + event.preventDefault(); + checkFocus.call( this ); + // support: IE + // IE <= 8 doesn't prevent moving focus even with event.preventDefault() + // so we check again later + this._delay( checkFocus ); + }, + + _createWrapper: function() { + this.uiDialog = $("<div>") + .addClass( "ui-dialog ui-widget ui-widget-content ui-corner-all ui-front " + + this.options.dialogClass ) + .hide() + .attr({ + // Setting tabIndex makes the div focusable + tabIndex: -1, + role: "dialog" + }) + .appendTo( this._appendTo() ); + + this._on( this.uiDialog, { + keydown: function( event ) { + if ( this.options.closeOnEscape && !event.isDefaultPrevented() && event.keyCode && + event.keyCode === $.ui.keyCode.ESCAPE ) { + event.preventDefault(); + this.close( event ); + return; + } + + // prevent tabbing out of dialogs + if ( event.keyCode !== $.ui.keyCode.TAB || event.isDefaultPrevented() ) { + return; + } + var tabbables = this.uiDialog.find( ":tabbable" ), + first = tabbables.filter( ":first" ), + last = tabbables.filter( ":last" ); + + if ( ( event.target === last[0] || event.target === this.uiDialog[0] ) && !event.shiftKey ) { + this._delay(function() { + first.focus(); + }); + event.preventDefault(); + } else if ( ( event.target === first[0] || event.target === this.uiDialog[0] ) && event.shiftKey ) { + this._delay(function() { + last.focus(); + }); + event.preventDefault(); + } + }, + mousedown: function( event ) { + if ( this._moveToTop( event ) ) { + this._focusTabbable(); + } + } + }); + + // We assume that any existing aria-describedby attribute means + // that the dialog content is marked up properly + // otherwise we brute force the content as the description + if ( !this.element.find( "[aria-describedby]" ).length ) { + this.uiDialog.attr({ + "aria-describedby": this.element.uniqueId().attr( "id" ) + }); + } + }, + + _createTitlebar: function() { + var uiDialogTitle; + + this.uiDialogTitlebar = $( "<div>" ) + .addClass( "ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix" ) + .prependTo( this.uiDialog ); + this._on( this.uiDialogTitlebar, { + mousedown: function( event ) { + // Don't prevent click on close button (#8838) + // Focusing a dialog that is partially scrolled out of view + // causes the browser to scroll it into view, preventing the click event + if ( !$( event.target ).closest( ".ui-dialog-titlebar-close" ) ) { + // Dialog isn't getting focus when dragging (#8063) + this.uiDialog.focus(); + } + } + }); + + // support: IE + // Use type="button" to prevent enter keypresses in textboxes from closing the + // dialog in IE (#9312) + this.uiDialogTitlebarClose = $( "<button type='button'></button>" ) + .button({ + label: this.options.closeText, + icons: { + primary: "ui-icon-closethick" + }, + text: false + }) + .addClass( "ui-dialog-titlebar-close" ) + .appendTo( this.uiDialogTitlebar ); + this._on( this.uiDialogTitlebarClose, { + click: function( event ) { + event.preventDefault(); + this.close( event ); + } + }); + + uiDialogTitle = $( "<span>" ) + .uniqueId() + .addClass( "ui-dialog-title" ) + .prependTo( this.uiDialogTitlebar ); + this._title( uiDialogTitle ); + + this.uiDialog.attr({ + "aria-labelledby": uiDialogTitle.attr( "id" ) + }); + }, + + _title: function( title ) { + if ( !this.options.title ) { + title.html( " " ); + } + title.text( this.options.title ); + }, + + _createButtonPane: function() { + this.uiDialogButtonPane = $( "<div>" ) + .addClass( "ui-dialog-buttonpane ui-widget-content ui-helper-clearfix" ); + + this.uiButtonSet = $( "<div>" ) + .addClass( "ui-dialog-buttonset" ) + .appendTo( this.uiDialogButtonPane ); + + this._createButtons(); + }, + + _createButtons: function() { + var that = this, + buttons = this.options.buttons; + + // if we already have a button pane, remove it + this.uiDialogButtonPane.remove(); + this.uiButtonSet.empty(); + + if ( $.isEmptyObject( buttons ) || ($.isArray( buttons ) && !buttons.length) ) { + this.uiDialog.removeClass( "ui-dialog-buttons" ); + return; + } + + $.each( buttons, function( name, props ) { + var click, buttonOptions; + props = $.isFunction( props ) ? + { click: props, text: name } : + props; + // Default to a non-submitting button + props = $.extend( { type: "button" }, props ); + // Change the context for the click callback to be the main element + click = props.click; + props.click = function() { + click.apply( that.element[ 0 ], arguments ); + }; + buttonOptions = { + icons: props.icons, + text: props.showText + }; + delete props.icons; + delete props.showText; + $( "<button></button>", props ) + .button( buttonOptions ) + .appendTo( that.uiButtonSet ); + }); + this.uiDialog.addClass( "ui-dialog-buttons" ); + this.uiDialogButtonPane.appendTo( this.uiDialog ); + }, + + _makeDraggable: function() { + var that = this, + options = this.options; + + function filteredUi( ui ) { + return { + position: ui.position, + offset: ui.offset + }; + } + + this.uiDialog.draggable({ + cancel: ".ui-dialog-content, .ui-dialog-titlebar-close", + handle: ".ui-dialog-titlebar", + containment: "document", + start: function( event, ui ) { + $( this ).addClass( "ui-dialog-dragging" ); + that._blockFrames(); + that._trigger( "dragStart", event, filteredUi( ui ) ); + }, + drag: function( event, ui ) { + that._trigger( "drag", event, filteredUi( ui ) ); + }, + stop: function( event, ui ) { + var left = ui.offset.left - that.document.scrollLeft(), + top = ui.offset.top - that.document.scrollTop(); + + options.position = { + my: "left top", + at: "left" + (left >= 0 ? "+" : "") + left + " " + + "top" + (top >= 0 ? "+" : "") + top, + of: that.window + }; + $( this ).removeClass( "ui-dialog-dragging" ); + that._unblockFrames(); + that._trigger( "dragStop", event, filteredUi( ui ) ); + } + }); + }, + + _makeResizable: function() { + var that = this, + options = this.options, + handles = options.resizable, + // .ui-resizable has position: relative defined in the stylesheet + // but dialogs have to use absolute or fixed positioning + position = this.uiDialog.css("position"), + resizeHandles = typeof handles === "string" ? + handles : + "n,e,s,w,se,sw,ne,nw"; + + function filteredUi( ui ) { + return { + originalPosition: ui.originalPosition, + originalSize: ui.originalSize, + position: ui.position, + size: ui.size + }; + } + + this.uiDialog.resizable({ + cancel: ".ui-dialog-content", + containment: "document", + alsoResize: this.element, + maxWidth: options.maxWidth, + maxHeight: options.maxHeight, + minWidth: options.minWidth, + minHeight: this._minHeight(), + handles: resizeHandles, + start: function( event, ui ) { + $( this ).addClass( "ui-dialog-resizing" ); + that._blockFrames(); + that._trigger( "resizeStart", event, filteredUi( ui ) ); + }, + resize: function( event, ui ) { + that._trigger( "resize", event, filteredUi( ui ) ); + }, + stop: function( event, ui ) { + var offset = that.uiDialog.offset(), + left = offset.left - that.document.scrollLeft(), + top = offset.top - that.document.scrollTop(); + + options.height = that.uiDialog.height(); + options.width = that.uiDialog.width(); + options.position = { + my: "left top", + at: "left" + (left >= 0 ? "+" : "") + left + " " + + "top" + (top >= 0 ? "+" : "") + top, + of: that.window + }; + $( this ).removeClass( "ui-dialog-resizing" ); + that._unblockFrames(); + that._trigger( "resizeStop", event, filteredUi( ui ) ); + } + }) + .css( "position", position ); + }, + + _trackFocus: function() { + this._on( this.widget(), { + focusin: function( event ) { + this._makeFocusTarget(); + this._focusedElement = $( event.target ); + } + }); + }, + + _makeFocusTarget: function() { + this._untrackInstance(); + this._trackingInstances().unshift( this ); + }, + + _untrackInstance: function() { + var instances = this._trackingInstances(), + exists = $.inArray( this, instances ); + if ( exists !== -1 ) { + instances.splice( exists, 1 ); + } + }, + + _trackingInstances: function() { + var instances = this.document.data( "ui-dialog-instances" ); + if ( !instances ) { + instances = []; + this.document.data( "ui-dialog-instances", instances ); + } + return instances; + }, + + _minHeight: function() { + var options = this.options; + + return options.height === "auto" ? + options.minHeight : + Math.min( options.minHeight, options.height ); + }, + + _position: function() { + // Need to show the dialog to get the actual offset in the position plugin + var isVisible = this.uiDialog.is( ":visible" ); + if ( !isVisible ) { + this.uiDialog.show(); + } + this.uiDialog.position( this.options.position ); + if ( !isVisible ) { + this.uiDialog.hide(); + } + }, + + _setOptions: function( options ) { + var that = this, + resize = false, + resizableOptions = {}; + + $.each( options, function( key, value ) { + that._setOption( key, value ); + + if ( key in that.sizeRelatedOptions ) { + resize = true; + } + if ( key in that.resizableRelatedOptions ) { + resizableOptions[ key ] = value; + } + }); + + if ( resize ) { + this._size(); + this._position(); + } + if ( this.uiDialog.is( ":data(ui-resizable)" ) ) { + this.uiDialog.resizable( "option", resizableOptions ); + } + }, + + _setOption: function( key, value ) { + var isDraggable, isResizable, + uiDialog = this.uiDialog; + + if ( key === "dialogClass" ) { + uiDialog + .removeClass( this.options.dialogClass ) + .addClass( value ); + } + + if ( key === "disabled" ) { + return; + } + + this._super( key, value ); + + if ( key === "appendTo" ) { + this.uiDialog.appendTo( this._appendTo() ); + } + + if ( key === "buttons" ) { + this._createButtons(); + } + + if ( key === "closeText" ) { + this.uiDialogTitlebarClose.button({ + // Ensure that we always pass a string + label: "" + value + }); + } + + if ( key === "draggable" ) { + isDraggable = uiDialog.is( ":data(ui-draggable)" ); + if ( isDraggable && !value ) { + uiDialog.draggable( "destroy" ); + } + + if ( !isDraggable && value ) { + this._makeDraggable(); + } + } + + if ( key === "position" ) { + this._position(); + } + + if ( key === "resizable" ) { + // currently resizable, becoming non-resizable + isResizable = uiDialog.is( ":data(ui-resizable)" ); + if ( isResizable && !value ) { + uiDialog.resizable( "destroy" ); + } + + // currently resizable, changing handles + if ( isResizable && typeof value === "string" ) { + uiDialog.resizable( "option", "handles", value ); + } + + // currently non-resizable, becoming resizable + if ( !isResizable && value !== false ) { + this._makeResizable(); + } + } + + if ( key === "title" ) { + this._title( this.uiDialogTitlebar.find( ".ui-dialog-title" ) ); + } + }, + + _size: function() { + // If the user has resized the dialog, the .ui-dialog and .ui-dialog-content + // divs will both have width and height set, so we need to reset them + var nonContentHeight, minContentHeight, maxContentHeight, + options = this.options; + + // Reset content sizing + this.element.show().css({ + width: "auto", + minHeight: 0, + maxHeight: "none", + height: 0 + }); + + if ( options.minWidth > options.width ) { + options.width = options.minWidth; + } + + // reset wrapper sizing + // determine the height of all the non-content elements + nonContentHeight = this.uiDialog.css({ + height: "auto", + width: options.width + }) + .outerHeight(); + minContentHeight = Math.max( 0, options.minHeight - nonContentHeight ); + maxContentHeight = typeof options.maxHeight === "number" ? + Math.max( 0, options.maxHeight - nonContentHeight ) : + "none"; + + if ( options.height === "auto" ) { + this.element.css({ + minHeight: minContentHeight, + maxHeight: maxContentHeight, + height: "auto" + }); + } else { + this.element.height( Math.max( 0, options.height - nonContentHeight ) ); + } + + if ( this.uiDialog.is( ":data(ui-resizable)" ) ) { + this.uiDialog.resizable( "option", "minHeight", this._minHeight() ); + } + }, + + _blockFrames: function() { + this.iframeBlocks = this.document.find( "iframe" ).map(function() { + var iframe = $( this ); + + return $( "<div>" ) + .css({ + position: "absolute", + width: iframe.outerWidth(), + height: iframe.outerHeight() + }) + .appendTo( iframe.parent() ) + .offset( iframe.offset() )[0]; + }); + }, + + _unblockFrames: function() { + if ( this.iframeBlocks ) { + this.iframeBlocks.remove(); + delete this.iframeBlocks; + } + }, + + _allowInteraction: function( event ) { + if ( $( event.target ).closest( ".ui-dialog" ).length ) { + return true; + } + + // TODO: Remove hack when datepicker implements + // the .ui-front logic (#8989) + return !!$( event.target ).closest( ".ui-datepicker" ).length; + }, + + _createOverlay: function() { + if ( !this.options.modal ) { + return; + } + + // We use a delay in case the overlay is created from an + // event that we're going to be cancelling (#2804) + var isOpening = true; + this._delay(function() { + isOpening = false; + }); + + if ( !this.document.data( "ui-dialog-overlays" ) ) { + + // Prevent use of anchors and inputs + // Using _on() for an event handler shared across many instances is + // safe because the dialogs stack and must be closed in reverse order + this._on( this.document, { + focusin: function( event ) { + if ( isOpening ) { + return; + } + + if ( !this._allowInteraction( event ) ) { + event.preventDefault(); + this._trackingInstances()[ 0 ]._focusTabbable(); + } + } + }); + } + + this.overlay = $( "<div>" ) + .addClass( "ui-widget-overlay ui-front" ) + .appendTo( this._appendTo() ); + this._on( this.overlay, { + mousedown: "_keepFocus" + }); + this.document.data( "ui-dialog-overlays", + (this.document.data( "ui-dialog-overlays" ) || 0) + 1 ); + }, + + _destroyOverlay: function() { + if ( !this.options.modal ) { + return; + } + + if ( this.overlay ) { + var overlays = this.document.data( "ui-dialog-overlays" ) - 1; + + if ( !overlays ) { + this.document + .unbind( "focusin" ) + .removeData( "ui-dialog-overlays" ); + } else { + this.document.data( "ui-dialog-overlays", overlays ); + } + + this.overlay.remove(); + this.overlay = null; + } + } +}); + + +/*! + * jQuery UI Progressbar 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/progressbar/ + */ + + +var progressbar = $.widget( "ui.progressbar", { + version: "1.11.4", + options: { + max: 100, + value: 0, + + change: null, + complete: null + }, + + min: 0, + + _create: function() { + // Constrain initial value + this.oldValue = this.options.value = this._constrainedValue(); + + this.element + .addClass( "ui-progressbar ui-widget ui-widget-content ui-corner-all" ) + .attr({ + // Only set static values, aria-valuenow and aria-valuemax are + // set inside _refreshValue() + role: "progressbar", + "aria-valuemin": this.min + }); + + this.valueDiv = $( "<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>" ) + .appendTo( this.element ); + + this._refreshValue(); + }, + + _destroy: function() { + this.element + .removeClass( "ui-progressbar ui-widget ui-widget-content ui-corner-all" ) + .removeAttr( "role" ) + .removeAttr( "aria-valuemin" ) + .removeAttr( "aria-valuemax" ) + .removeAttr( "aria-valuenow" ); + + this.valueDiv.remove(); + }, + + value: function( newValue ) { + if ( newValue === undefined ) { + return this.options.value; + } + + this.options.value = this._constrainedValue( newValue ); + this._refreshValue(); + }, + + _constrainedValue: function( newValue ) { + if ( newValue === undefined ) { + newValue = this.options.value; + } + + this.indeterminate = newValue === false; + + // sanitize value + if ( typeof newValue !== "number" ) { + newValue = 0; + } + + return this.indeterminate ? false : + Math.min( this.options.max, Math.max( this.min, newValue ) ); + }, + + _setOptions: function( options ) { + // Ensure "value" option is set after other values (like max) + var value = options.value; + delete options.value; + + this._super( options ); + + this.options.value = this._constrainedValue( value ); + this._refreshValue(); + }, + + _setOption: function( key, value ) { + if ( key === "max" ) { + // Don't allow a max less than min + value = Math.max( this.min, value ); + } + if ( key === "disabled" ) { + this.element + .toggleClass( "ui-state-disabled", !!value ) + .attr( "aria-disabled", value ); + } + this._super( key, value ); + }, + + _percentage: function() { + return this.indeterminate ? 100 : 100 * ( this.options.value - this.min ) / ( this.options.max - this.min ); + }, + + _refreshValue: function() { + var value = this.options.value, + percentage = this._percentage(); + + this.valueDiv + .toggle( this.indeterminate || value > this.min ) + .toggleClass( "ui-corner-right", value === this.options.max ) + .width( percentage.toFixed(0) + "%" ); + + this.element.toggleClass( "ui-progressbar-indeterminate", this.indeterminate ); + + if ( this.indeterminate ) { + this.element.removeAttr( "aria-valuenow" ); + if ( !this.overlayDiv ) { + this.overlayDiv = $( "<div class='ui-progressbar-overlay'></div>" ).appendTo( this.valueDiv ); + } + } else { + this.element.attr({ + "aria-valuemax": this.options.max, + "aria-valuenow": value + }); + if ( this.overlayDiv ) { + this.overlayDiv.remove(); + this.overlayDiv = null; + } + } + + if ( this.oldValue !== value ) { + this.oldValue = value; + this._trigger( "change" ); + } + if ( value === this.options.max ) { + this._trigger( "complete" ); + } + } +}); + + +/*! + * jQuery UI Selectmenu 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/selectmenu + */ + + +var selectmenu = $.widget( "ui.selectmenu", { + version: "1.11.4", + defaultElement: "<select>", + options: { + appendTo: null, + disabled: null, + icons: { + button: "ui-icon-triangle-1-s" + }, + position: { + my: "left top", + at: "left bottom", + collision: "none" + }, + width: null, + + // callbacks + change: null, + close: null, + focus: null, + open: null, + select: null + }, + + _create: function() { + var selectmenuId = this.element.uniqueId().attr( "id" ); + this.ids = { + element: selectmenuId, + button: selectmenuId + "-button", + menu: selectmenuId + "-menu" + }; + + this._drawButton(); + this._drawMenu(); + + if ( this.options.disabled ) { + this.disable(); + } + }, + + _drawButton: function() { + var that = this; + + // Associate existing label with the new button + this.label = $( "label[for='" + this.ids.element + "']" ).attr( "for", this.ids.button ); + this._on( this.label, { + click: function( event ) { + this.button.focus(); + event.preventDefault(); + } + }); + + // Hide original select element + this.element.hide(); + + // Create button + this.button = $( "<span>", { + "class": "ui-selectmenu-button ui-widget ui-state-default ui-corner-all", + tabindex: this.options.disabled ? -1 : 0, + id: this.ids.button, + role: "combobox", + "aria-expanded": "false", + "aria-autocomplete": "list", + "aria-owns": this.ids.menu, + "aria-haspopup": "true" + }) + .insertAfter( this.element ); + + $( "<span>", { + "class": "ui-icon " + this.options.icons.button + }) + .prependTo( this.button ); + + this.buttonText = $( "<span>", { + "class": "ui-selectmenu-text" + }) + .appendTo( this.button ); + + this._setText( this.buttonText, this.element.find( "option:selected" ).text() ); + this._resizeButton(); + + this._on( this.button, this._buttonEvents ); + this.button.one( "focusin", function() { + + // Delay rendering the menu items until the button receives focus. + // The menu may have already been rendered via a programmatic open. + if ( !that.menuItems ) { + that._refreshMenu(); + } + }); + this._hoverable( this.button ); + this._focusable( this.button ); + }, + + _drawMenu: function() { + var that = this; + + // Create menu + this.menu = $( "<ul>", { + "aria-hidden": "true", + "aria-labelledby": this.ids.button, + id: this.ids.menu + }); + + // Wrap menu + this.menuWrap = $( "<div>", { + "class": "ui-selectmenu-menu ui-front" + }) + .append( this.menu ) + .appendTo( this._appendTo() ); + + // Initialize menu widget + this.menuInstance = this.menu + .menu({ + role: "listbox", + select: function( event, ui ) { + event.preventDefault(); + + // support: IE8 + // If the item was selected via a click, the text selection + // will be destroyed in IE + that._setSelection(); + + that._select( ui.item.data( "ui-selectmenu-item" ), event ); + }, + focus: function( event, ui ) { + var item = ui.item.data( "ui-selectmenu-item" ); + + // Prevent inital focus from firing and check if its a newly focused item + if ( that.focusIndex != null && item.index !== that.focusIndex ) { + that._trigger( "focus", event, { item: item } ); + if ( !that.isOpen ) { + that._select( item, event ); + } + } + that.focusIndex = item.index; + + that.button.attr( "aria-activedescendant", + that.menuItems.eq( item.index ).attr( "id" ) ); + } + }) + .menu( "instance" ); + + // Adjust menu styles to dropdown + this.menu + .addClass( "ui-corner-bottom" ) + .removeClass( "ui-corner-all" ); + + // Don't close the menu on mouseleave + this.menuInstance._off( this.menu, "mouseleave" ); + + // Cancel the menu's collapseAll on document click + this.menuInstance._closeOnDocumentClick = function() { + return false; + }; + + // Selects often contain empty items, but never contain dividers + this.menuInstance._isDivider = function() { + return false; + }; + }, + + refresh: function() { + this._refreshMenu(); + this._setText( this.buttonText, this._getSelectedItem().text() ); + if ( !this.options.width ) { + this._resizeButton(); + } + }, + + _refreshMenu: function() { + this.menu.empty(); + + var item, + options = this.element.find( "option" ); + + if ( !options.length ) { + return; + } + + this._parseOptions( options ); + this._renderMenu( this.menu, this.items ); + + this.menuInstance.refresh(); + this.menuItems = this.menu.find( "li" ).not( ".ui-selectmenu-optgroup" ); + + item = this._getSelectedItem(); + + // Update the menu to have the correct item focused + this.menuInstance.focus( null, item ); + this._setAria( item.data( "ui-selectmenu-item" ) ); + + // Set disabled state + this._setOption( "disabled", this.element.prop( "disabled" ) ); + }, + + open: function( event ) { + if ( this.options.disabled ) { + return; + } + + // If this is the first time the menu is being opened, render the items + if ( !this.menuItems ) { + this._refreshMenu(); + } else { + + // Menu clears focus on close, reset focus to selected item + this.menu.find( ".ui-state-focus" ).removeClass( "ui-state-focus" ); + this.menuInstance.focus( null, this._getSelectedItem() ); + } + + this.isOpen = true; + this._toggleAttr(); + this._resizeMenu(); + this._position(); + + this._on( this.document, this._documentClick ); + + this._trigger( "open", event ); + }, + + _position: function() { + this.menuWrap.position( $.extend( { of: this.button }, this.options.position ) ); + }, + + close: function( event ) { + if ( !this.isOpen ) { + return; + } + + this.isOpen = false; + this._toggleAttr(); + + this.range = null; + this._off( this.document ); + + this._trigger( "close", event ); + }, + + widget: function() { + return this.button; + }, + + menuWidget: function() { + return this.menu; + }, + + _renderMenu: function( ul, items ) { + var that = this, + currentOptgroup = ""; + + $.each( items, function( index, item ) { + if ( item.optgroup !== currentOptgroup ) { + $( "<li>", { + "class": "ui-selectmenu-optgroup ui-menu-divider" + + ( item.element.parent( "optgroup" ).prop( "disabled" ) ? + " ui-state-disabled" : + "" ), + text: item.optgroup + }) + .appendTo( ul ); + + currentOptgroup = item.optgroup; + } + + that._renderItemData( ul, item ); + }); + }, + + _renderItemData: function( ul, item ) { + return this._renderItem( ul, item ).data( "ui-selectmenu-item", item ); + }, + + _renderItem: function( ul, item ) { + var li = $( "<li>" ); + + if ( item.disabled ) { + li.addClass( "ui-state-disabled" ); + } + this._setText( li, item.label ); + + return li.appendTo( ul ); + }, + + _setText: function( element, value ) { + if ( value ) { + element.text( value ); + } else { + element.html( " " ); + } + }, + + _move: function( direction, event ) { + var item, next, + filter = ".ui-menu-item"; + + if ( this.isOpen ) { + item = this.menuItems.eq( this.focusIndex ); + } else { + item = this.menuItems.eq( this.element[ 0 ].selectedIndex ); + filter += ":not(.ui-state-disabled)"; + } + + if ( direction === "first" || direction === "last" ) { + next = item[ direction === "first" ? "prevAll" : "nextAll" ]( filter ).eq( -1 ); + } else { + next = item[ direction + "All" ]( filter ).eq( 0 ); + } + + if ( next.length ) { + this.menuInstance.focus( event, next ); + } + }, + + _getSelectedItem: function() { + return this.menuItems.eq( this.element[ 0 ].selectedIndex ); + }, + + _toggle: function( event ) { + this[ this.isOpen ? "close" : "open" ]( event ); + }, + + _setSelection: function() { + var selection; + + if ( !this.range ) { + return; + } + + if ( window.getSelection ) { + selection = window.getSelection(); + selection.removeAllRanges(); + selection.addRange( this.range ); + + // support: IE8 + } else { + this.range.select(); + } + + // support: IE + // Setting the text selection kills the button focus in IE, but + // restoring the focus doesn't kill the selection. + this.button.focus(); + }, + + _documentClick: { + mousedown: function( event ) { + if ( !this.isOpen ) { + return; + } + + if ( !$( event.target ).closest( ".ui-selectmenu-menu, #" + this.ids.button ).length ) { + this.close( event ); + } + } + }, + + _buttonEvents: { + + // Prevent text selection from being reset when interacting with the selectmenu (#10144) + mousedown: function() { + var selection; + + if ( window.getSelection ) { + selection = window.getSelection(); + if ( selection.rangeCount ) { + this.range = selection.getRangeAt( 0 ); + } + + // support: IE8 + } else { + this.range = document.selection.createRange(); + } + }, + + click: function( event ) { + this._setSelection(); + this._toggle( event ); + }, + + keydown: function( event ) { + var preventDefault = true; + switch ( event.keyCode ) { + case $.ui.keyCode.TAB: + case $.ui.keyCode.ESCAPE: + this.close( event ); + preventDefault = false; + break; + case $.ui.keyCode.ENTER: + if ( this.isOpen ) { + this._selectFocusedItem( event ); + } + break; + case $.ui.keyCode.UP: + if ( event.altKey ) { + this._toggle( event ); + } else { + this._move( "prev", event ); + } + break; + case $.ui.keyCode.DOWN: + if ( event.altKey ) { + this._toggle( event ); + } else { + this._move( "next", event ); + } + break; + case $.ui.keyCode.SPACE: + if ( this.isOpen ) { + this._selectFocusedItem( event ); + } else { + this._toggle( event ); + } + break; + case $.ui.keyCode.LEFT: + this._move( "prev", event ); + break; + case $.ui.keyCode.RIGHT: + this._move( "next", event ); + break; + case $.ui.keyCode.HOME: + case $.ui.keyCode.PAGE_UP: + this._move( "first", event ); + break; + case $.ui.keyCode.END: + case $.ui.keyCode.PAGE_DOWN: + this._move( "last", event ); + break; + default: + this.menu.trigger( event ); + preventDefault = false; + } + + if ( preventDefault ) { + event.preventDefault(); + } + } + }, + + _selectFocusedItem: function( event ) { + var item = this.menuItems.eq( this.focusIndex ); + if ( !item.hasClass( "ui-state-disabled" ) ) { + this._select( item.data( "ui-selectmenu-item" ), event ); + } + }, + + _select: function( item, event ) { + var oldIndex = this.element[ 0 ].selectedIndex; + + // Change native select element + this.element[ 0 ].selectedIndex = item.index; + this._setText( this.buttonText, item.label ); + this._setAria( item ); + this._trigger( "select", event, { item: item } ); + + if ( item.index !== oldIndex ) { + this._trigger( "change", event, { item: item } ); + } + + this.close( event ); + }, + + _setAria: function( item ) { + var id = this.menuItems.eq( item.index ).attr( "id" ); + + this.button.attr({ + "aria-labelledby": id, + "aria-activedescendant": id + }); + this.menu.attr( "aria-activedescendant", id ); + }, + + _setOption: function( key, value ) { + if ( key === "icons" ) { + this.button.find( "span.ui-icon" ) + .removeClass( this.options.icons.button ) + .addClass( value.button ); + } + + this._super( key, value ); + + if ( key === "appendTo" ) { + this.menuWrap.appendTo( this._appendTo() ); + } + + if ( key === "disabled" ) { + this.menuInstance.option( "disabled", value ); + this.button + .toggleClass( "ui-state-disabled", value ) + .attr( "aria-disabled", value ); + + this.element.prop( "disabled", value ); + if ( value ) { + this.button.attr( "tabindex", -1 ); + this.close(); + } else { + this.button.attr( "tabindex", 0 ); + } + } + + if ( key === "width" ) { + this._resizeButton(); + } + }, + + _appendTo: function() { + var element = this.options.appendTo; + + if ( element ) { + element = element.jquery || element.nodeType ? + $( element ) : + this.document.find( element ).eq( 0 ); + } + + if ( !element || !element[ 0 ] ) { + element = this.element.closest( ".ui-front" ); + } + + if ( !element.length ) { + element = this.document[ 0 ].body; + } + + return element; + }, + + _toggleAttr: function() { + this.button + .toggleClass( "ui-corner-top", this.isOpen ) + .toggleClass( "ui-corner-all", !this.isOpen ) + .attr( "aria-expanded", this.isOpen ); + this.menuWrap.toggleClass( "ui-selectmenu-open", this.isOpen ); + this.menu.attr( "aria-hidden", !this.isOpen ); + }, + + _resizeButton: function() { + var width = this.options.width; + + if ( !width ) { + width = this.element.show().outerWidth(); + this.element.hide(); + } + + this.button.outerWidth( width ); + }, + + _resizeMenu: function() { + this.menu.outerWidth( Math.max( + this.button.outerWidth(), + + // support: IE10 + // IE10 wraps long text (possibly a rounding bug) + // so we add 1px to avoid the wrapping + this.menu.width( "" ).outerWidth() + 1 + ) ); + }, + + _getCreateOptions: function() { + return { disabled: this.element.prop( "disabled" ) }; + }, + + _parseOptions: function( options ) { + var data = []; + options.each(function( index, item ) { + var option = $( item ), + optgroup = option.parent( "optgroup" ); + data.push({ + element: option, + index: index, + value: option.val(), + label: option.text(), + optgroup: optgroup.attr( "label" ) || "", + disabled: optgroup.prop( "disabled" ) || option.prop( "disabled" ) + }); + }); + this.items = data; + }, + + _destroy: function() { + this.menuWrap.remove(); + this.button.remove(); + this.element.show(); + this.element.removeUniqueId(); + this.label.attr( "for", this.ids.element ); + } +}); + + +/*! + * jQuery UI Slider 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/slider/ + */ + + +var slider = $.widget( "ui.slider", $.ui.mouse, { + version: "1.11.4", + widgetEventPrefix: "slide", + + options: { + animate: false, + distance: 0, + max: 100, + min: 0, + orientation: "horizontal", + range: false, + step: 1, + value: 0, + values: null, + + // callbacks + change: null, + slide: null, + start: null, + stop: null + }, + + // number of pages in a slider + // (how many times can you page up/down to go through the whole range) + numPages: 5, + + _create: function() { + this._keySliding = false; + this._mouseSliding = false; + this._animateOff = true; + this._handleIndex = null; + this._detectOrientation(); + this._mouseInit(); + this._calculateNewMax(); + + this.element + .addClass( "ui-slider" + + " ui-slider-" + this.orientation + + " ui-widget" + + " ui-widget-content" + + " ui-corner-all"); + + this._refresh(); + this._setOption( "disabled", this.options.disabled ); + + this._animateOff = false; + }, + + _refresh: function() { + this._createRange(); + this._createHandles(); + this._setupEvents(); + this._refreshValue(); + }, + + _createHandles: function() { + var i, handleCount, + options = this.options, + existingHandles = this.element.find( ".ui-slider-handle" ).addClass( "ui-state-default ui-corner-all" ), + handle = "<span class='ui-slider-handle ui-state-default ui-corner-all' tabindex='0'></span>", + handles = []; + + handleCount = ( options.values && options.values.length ) || 1; + + if ( existingHandles.length > handleCount ) { + existingHandles.slice( handleCount ).remove(); + existingHandles = existingHandles.slice( 0, handleCount ); + } + + for ( i = existingHandles.length; i < handleCount; i++ ) { + handles.push( handle ); + } + + this.handles = existingHandles.add( $( handles.join( "" ) ).appendTo( this.element ) ); + + this.handle = this.handles.eq( 0 ); + + this.handles.each(function( i ) { + $( this ).data( "ui-slider-handle-index", i ); + }); + }, + + _createRange: function() { + var options = this.options, + classes = ""; + + if ( options.range ) { + if ( options.range === true ) { + if ( !options.values ) { + options.values = [ this._valueMin(), this._valueMin() ]; + } else if ( options.values.length && options.values.length !== 2 ) { + options.values = [ options.values[0], options.values[0] ]; + } else if ( $.isArray( options.values ) ) { + options.values = options.values.slice(0); + } + } + + if ( !this.range || !this.range.length ) { + this.range = $( "<div></div>" ) + .appendTo( this.element ); + + classes = "ui-slider-range" + + // note: this isn't the most fittingly semantic framework class for this element, + // but worked best visually with a variety of themes + " ui-widget-header ui-corner-all"; + } else { + this.range.removeClass( "ui-slider-range-min ui-slider-range-max" ) + // Handle range switching from true to min/max + .css({ + "left": "", + "bottom": "" + }); + } + + this.range.addClass( classes + + ( ( options.range === "min" || options.range === "max" ) ? " ui-slider-range-" + options.range : "" ) ); + } else { + if ( this.range ) { + this.range.remove(); + } + this.range = null; + } + }, + + _setupEvents: function() { + this._off( this.handles ); + this._on( this.handles, this._handleEvents ); + this._hoverable( this.handles ); + this._focusable( this.handles ); + }, + + _destroy: function() { + this.handles.remove(); + if ( this.range ) { + this.range.remove(); + } + + this.element + .removeClass( "ui-slider" + + " ui-slider-horizontal" + + " ui-slider-vertical" + + " ui-widget" + + " ui-widget-content" + + " ui-corner-all" ); + + this._mouseDestroy(); + }, + + _mouseCapture: function( event ) { + var position, normValue, distance, closestHandle, index, allowed, offset, mouseOverHandle, + that = this, + o = this.options; + + if ( o.disabled ) { + return false; + } + + this.elementSize = { + width: this.element.outerWidth(), + height: this.element.outerHeight() + }; + this.elementOffset = this.element.offset(); + + position = { x: event.pageX, y: event.pageY }; + normValue = this._normValueFromMouse( position ); + distance = this._valueMax() - this._valueMin() + 1; + this.handles.each(function( i ) { + var thisDistance = Math.abs( normValue - that.values(i) ); + if (( distance > thisDistance ) || + ( distance === thisDistance && + (i === that._lastChangedValue || that.values(i) === o.min ))) { + distance = thisDistance; + closestHandle = $( this ); + index = i; + } + }); + + allowed = this._start( event, index ); + if ( allowed === false ) { + return false; + } + this._mouseSliding = true; + + this._handleIndex = index; + + closestHandle + .addClass( "ui-state-active" ) + .focus(); + + offset = closestHandle.offset(); + mouseOverHandle = !$( event.target ).parents().addBack().is( ".ui-slider-handle" ); + this._clickOffset = mouseOverHandle ? { left: 0, top: 0 } : { + left: event.pageX - offset.left - ( closestHandle.width() / 2 ), + top: event.pageY - offset.top - + ( closestHandle.height() / 2 ) - + ( parseInt( closestHandle.css("borderTopWidth"), 10 ) || 0 ) - + ( parseInt( closestHandle.css("borderBottomWidth"), 10 ) || 0) + + ( parseInt( closestHandle.css("marginTop"), 10 ) || 0) + }; + + if ( !this.handles.hasClass( "ui-state-hover" ) ) { + this._slide( event, index, normValue ); + } + this._animateOff = true; + return true; + }, + + _mouseStart: function() { + return true; + }, + + _mouseDrag: function( event ) { + var position = { x: event.pageX, y: event.pageY }, + normValue = this._normValueFromMouse( position ); + + this._slide( event, this._handleIndex, normValue ); + + return false; + }, + + _mouseStop: function( event ) { + this.handles.removeClass( "ui-state-active" ); + this._mouseSliding = false; + + this._stop( event, this._handleIndex ); + this._change( event, this._handleIndex ); + + this._handleIndex = null; + this._clickOffset = null; + this._animateOff = false; + + return false; + }, + + _detectOrientation: function() { + this.orientation = ( this.options.orientation === "vertical" ) ? "vertical" : "horizontal"; + }, + + _normValueFromMouse: function( position ) { + var pixelTotal, + pixelMouse, + percentMouse, + valueTotal, + valueMouse; + + if ( this.orientation === "horizontal" ) { + pixelTotal = this.elementSize.width; + pixelMouse = position.x - this.elementOffset.left - ( this._clickOffset ? this._clickOffset.left : 0 ); + } else { + pixelTotal = this.elementSize.height; + pixelMouse = position.y - this.elementOffset.top - ( this._clickOffset ? this._clickOffset.top : 0 ); + } + + percentMouse = ( pixelMouse / pixelTotal ); + if ( percentMouse > 1 ) { + percentMouse = 1; + } + if ( percentMouse < 0 ) { + percentMouse = 0; + } + if ( this.orientation === "vertical" ) { + percentMouse = 1 - percentMouse; + } + + valueTotal = this._valueMax() - this._valueMin(); + valueMouse = this._valueMin() + percentMouse * valueTotal; + + return this._trimAlignValue( valueMouse ); + }, + + _start: function( event, index ) { + var uiHash = { + handle: this.handles[ index ], + value: this.value() + }; + if ( this.options.values && this.options.values.length ) { + uiHash.value = this.values( index ); + uiHash.values = this.values(); + } + return this._trigger( "start", event, uiHash ); + }, + + _slide: function( event, index, newVal ) { + var otherVal, + newValues, + allowed; + + if ( this.options.values && this.options.values.length ) { + otherVal = this.values( index ? 0 : 1 ); + + if ( ( this.options.values.length === 2 && this.options.range === true ) && + ( ( index === 0 && newVal > otherVal) || ( index === 1 && newVal < otherVal ) ) + ) { + newVal = otherVal; + } + + if ( newVal !== this.values( index ) ) { + newValues = this.values(); + newValues[ index ] = newVal; + // A slide can be canceled by returning false from the slide callback + allowed = this._trigger( "slide", event, { + handle: this.handles[ index ], + value: newVal, + values: newValues + } ); + otherVal = this.values( index ? 0 : 1 ); + if ( allowed !== false ) { + this.values( index, newVal ); + } + } + } else { + if ( newVal !== this.value() ) { + // A slide can be canceled by returning false from the slide callback + allowed = this._trigger( "slide", event, { + handle: this.handles[ index ], + value: newVal + } ); + if ( allowed !== false ) { + this.value( newVal ); + } + } + } + }, + + _stop: function( event, index ) { + var uiHash = { + handle: this.handles[ index ], + value: this.value() + }; + if ( this.options.values && this.options.values.length ) { + uiHash.value = this.values( index ); + uiHash.values = this.values(); + } + + this._trigger( "stop", event, uiHash ); + }, + + _change: function( event, index ) { + if ( !this._keySliding && !this._mouseSliding ) { + var uiHash = { + handle: this.handles[ index ], + value: this.value() + }; + if ( this.options.values && this.options.values.length ) { + uiHash.value = this.values( index ); + uiHash.values = this.values(); + } + + //store the last changed value index for reference when handles overlap + this._lastChangedValue = index; + + this._trigger( "change", event, uiHash ); + } + }, + + value: function( newValue ) { + if ( arguments.length ) { + this.options.value = this._trimAlignValue( newValue ); + this._refreshValue(); + this._change( null, 0 ); + return; + } + + return this._value(); + }, + + values: function( index, newValue ) { + var vals, + newValues, + i; + + if ( arguments.length > 1 ) { + this.options.values[ index ] = this._trimAlignValue( newValue ); + this._refreshValue(); + this._change( null, index ); + return; + } + + if ( arguments.length ) { + if ( $.isArray( arguments[ 0 ] ) ) { + vals = this.options.values; + newValues = arguments[ 0 ]; + for ( i = 0; i < vals.length; i += 1 ) { + vals[ i ] = this._trimAlignValue( newValues[ i ] ); + this._change( null, i ); + } + this._refreshValue(); + } else { + if ( this.options.values && this.options.values.length ) { + return this._values( index ); + } else { + return this.value(); + } + } + } else { + return this._values(); + } + }, + + _setOption: function( key, value ) { + var i, + valsLength = 0; + + if ( key === "range" && this.options.range === true ) { + if ( value === "min" ) { + this.options.value = this._values( 0 ); + this.options.values = null; + } else if ( value === "max" ) { + this.options.value = this._values( this.options.values.length - 1 ); + this.options.values = null; + } + } + + if ( $.isArray( this.options.values ) ) { + valsLength = this.options.values.length; + } + + if ( key === "disabled" ) { + this.element.toggleClass( "ui-state-disabled", !!value ); + } + + this._super( key, value ); + + switch ( key ) { + case "orientation": + this._detectOrientation(); + this.element + .removeClass( "ui-slider-horizontal ui-slider-vertical" ) + .addClass( "ui-slider-" + this.orientation ); + this._refreshValue(); + + // Reset positioning from previous orientation + this.handles.css( value === "horizontal" ? "bottom" : "left", "" ); + break; + case "value": + this._animateOff = true; + this._refreshValue(); + this._change( null, 0 ); + this._animateOff = false; + break; + case "values": + this._animateOff = true; + this._refreshValue(); + for ( i = 0; i < valsLength; i += 1 ) { + this._change( null, i ); + } + this._animateOff = false; + break; + case "step": + case "min": + case "max": + this._animateOff = true; + this._calculateNewMax(); + this._refreshValue(); + this._animateOff = false; + break; + case "range": + this._animateOff = true; + this._refresh(); + this._animateOff = false; + break; + } + }, + + //internal value getter + // _value() returns value trimmed by min and max, aligned by step + _value: function() { + var val = this.options.value; + val = this._trimAlignValue( val ); + + return val; + }, + + //internal values getter + // _values() returns array of values trimmed by min and max, aligned by step + // _values( index ) returns single value trimmed by min and max, aligned by step + _values: function( index ) { + var val, + vals, + i; + + if ( arguments.length ) { + val = this.options.values[ index ]; + val = this._trimAlignValue( val ); + + return val; + } else if ( this.options.values && this.options.values.length ) { + // .slice() creates a copy of the array + // this copy gets trimmed by min and max and then returned + vals = this.options.values.slice(); + for ( i = 0; i < vals.length; i += 1) { + vals[ i ] = this._trimAlignValue( vals[ i ] ); + } + + return vals; + } else { + return []; + } + }, + + // returns the step-aligned value that val is closest to, between (inclusive) min and max + _trimAlignValue: function( val ) { + if ( val <= this._valueMin() ) { + return this._valueMin(); + } + if ( val >= this._valueMax() ) { + return this._valueMax(); + } + var step = ( this.options.step > 0 ) ? this.options.step : 1, + valModStep = (val - this._valueMin()) % step, + alignValue = val - valModStep; + + if ( Math.abs(valModStep) * 2 >= step ) { + alignValue += ( valModStep > 0 ) ? step : ( -step ); + } + + // Since JavaScript has problems with large floats, round + // the final value to 5 digits after the decimal point (see #4124) + return parseFloat( alignValue.toFixed(5) ); + }, + + _calculateNewMax: function() { + var max = this.options.max, + min = this._valueMin(), + step = this.options.step, + aboveMin = Math.floor( ( +( max - min ).toFixed( this._precision() ) ) / step ) * step; + max = aboveMin + min; + this.max = parseFloat( max.toFixed( this._precision() ) ); + }, + + _precision: function() { + var precision = this._precisionOf( this.options.step ); + if ( this.options.min !== null ) { + precision = Math.max( precision, this._precisionOf( this.options.min ) ); + } + return precision; + }, + + _precisionOf: function( num ) { + var str = num.toString(), + decimal = str.indexOf( "." ); + return decimal === -1 ? 0 : str.length - decimal - 1; + }, + + _valueMin: function() { + return this.options.min; + }, + + _valueMax: function() { + return this.max; + }, + + _refreshValue: function() { + var lastValPercent, valPercent, value, valueMin, valueMax, + oRange = this.options.range, + o = this.options, + that = this, + animate = ( !this._animateOff ) ? o.animate : false, + _set = {}; + + if ( this.options.values && this.options.values.length ) { + this.handles.each(function( i ) { + valPercent = ( that.values(i) - that._valueMin() ) / ( that._valueMax() - that._valueMin() ) * 100; + _set[ that.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%"; + $( this ).stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate ); + if ( that.options.range === true ) { + if ( that.orientation === "horizontal" ) { + if ( i === 0 ) { + that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { left: valPercent + "%" }, o.animate ); + } + if ( i === 1 ) { + that.range[ animate ? "animate" : "css" ]( { width: ( valPercent - lastValPercent ) + "%" }, { queue: false, duration: o.animate } ); + } + } else { + if ( i === 0 ) { + that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { bottom: ( valPercent ) + "%" }, o.animate ); + } + if ( i === 1 ) { + that.range[ animate ? "animate" : "css" ]( { height: ( valPercent - lastValPercent ) + "%" }, { queue: false, duration: o.animate } ); + } + } + } + lastValPercent = valPercent; + }); + } else { + value = this.value(); + valueMin = this._valueMin(); + valueMax = this._valueMax(); + valPercent = ( valueMax !== valueMin ) ? + ( value - valueMin ) / ( valueMax - valueMin ) * 100 : + 0; + _set[ this.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%"; + this.handle.stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate ); + + if ( oRange === "min" && this.orientation === "horizontal" ) { + this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { width: valPercent + "%" }, o.animate ); + } + if ( oRange === "max" && this.orientation === "horizontal" ) { + this.range[ animate ? "animate" : "css" ]( { width: ( 100 - valPercent ) + "%" }, { queue: false, duration: o.animate } ); + } + if ( oRange === "min" && this.orientation === "vertical" ) { + this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { height: valPercent + "%" }, o.animate ); + } + if ( oRange === "max" && this.orientation === "vertical" ) { + this.range[ animate ? "animate" : "css" ]( { height: ( 100 - valPercent ) + "%" }, { queue: false, duration: o.animate } ); + } + } + }, + + _handleEvents: { + keydown: function( event ) { + var allowed, curVal, newVal, step, + index = $( event.target ).data( "ui-slider-handle-index" ); + + switch ( event.keyCode ) { + case $.ui.keyCode.HOME: + case $.ui.keyCode.END: + case $.ui.keyCode.PAGE_UP: + case $.ui.keyCode.PAGE_DOWN: + case $.ui.keyCode.UP: + case $.ui.keyCode.RIGHT: + case $.ui.keyCode.DOWN: + case $.ui.keyCode.LEFT: + event.preventDefault(); + if ( !this._keySliding ) { + this._keySliding = true; + $( event.target ).addClass( "ui-state-active" ); + allowed = this._start( event, index ); + if ( allowed === false ) { + return; + } + } + break; + } + + step = this.options.step; + if ( this.options.values && this.options.values.length ) { + curVal = newVal = this.values( index ); + } else { + curVal = newVal = this.value(); + } + + switch ( event.keyCode ) { + case $.ui.keyCode.HOME: + newVal = this._valueMin(); + break; + case $.ui.keyCode.END: + newVal = this._valueMax(); + break; + case $.ui.keyCode.PAGE_UP: + newVal = this._trimAlignValue( + curVal + ( ( this._valueMax() - this._valueMin() ) / this.numPages ) + ); + break; + case $.ui.keyCode.PAGE_DOWN: + newVal = this._trimAlignValue( + curVal - ( (this._valueMax() - this._valueMin()) / this.numPages ) ); + break; + case $.ui.keyCode.UP: + case $.ui.keyCode.RIGHT: + if ( curVal === this._valueMax() ) { + return; + } + newVal = this._trimAlignValue( curVal + step ); + break; + case $.ui.keyCode.DOWN: + case $.ui.keyCode.LEFT: + if ( curVal === this._valueMin() ) { + return; + } + newVal = this._trimAlignValue( curVal - step ); + break; + } + + this._slide( event, index, newVal ); + }, + keyup: function( event ) { + var index = $( event.target ).data( "ui-slider-handle-index" ); + + if ( this._keySliding ) { + this._keySliding = false; + this._stop( event, index ); + this._change( event, index ); + $( event.target ).removeClass( "ui-state-active" ); + } + } + } +}); + + +/*! + * jQuery UI Spinner 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/spinner/ + */ + + +function spinner_modifier( fn ) { + return function() { + var previous = this.element.val(); + fn.apply( this, arguments ); + this._refresh(); + if ( previous !== this.element.val() ) { + this._trigger( "change" ); + } + }; +} + +var spinner = $.widget( "ui.spinner", { + version: "1.11.4", + defaultElement: "<input>", + widgetEventPrefix: "spin", + options: { + culture: null, + icons: { + down: "ui-icon-triangle-1-s", + up: "ui-icon-triangle-1-n" + }, + incremental: true, + max: null, + min: null, + numberFormat: null, + page: 10, + step: 1, + + change: null, + spin: null, + start: null, + stop: null + }, + + _create: function() { + // handle string values that need to be parsed + this._setOption( "max", this.options.max ); + this._setOption( "min", this.options.min ); + this._setOption( "step", this.options.step ); + + // Only format if there is a value, prevents the field from being marked + // as invalid in Firefox, see #9573. + if ( this.value() !== "" ) { + // Format the value, but don't constrain. + this._value( this.element.val(), true ); + } + + this._draw(); + this._on( this._events ); + this._refresh(); + + // turning off autocomplete prevents the browser from remembering the + // value when navigating through history, so we re-enable autocomplete + // if the page is unloaded before the widget is destroyed. #7790 + this._on( this.window, { + beforeunload: function() { + this.element.removeAttr( "autocomplete" ); + } + }); + }, + + _getCreateOptions: function() { + var options = {}, + element = this.element; + + $.each( [ "min", "max", "step" ], function( i, option ) { + var value = element.attr( option ); + if ( value !== undefined && value.length ) { + options[ option ] = value; + } + }); + + return options; + }, + + _events: { + keydown: function( event ) { + if ( this._start( event ) && this._keydown( event ) ) { + event.preventDefault(); + } + }, + keyup: "_stop", + focus: function() { + this.previous = this.element.val(); + }, + blur: function( event ) { + if ( this.cancelBlur ) { + delete this.cancelBlur; + return; + } + + this._stop(); + this._refresh(); + if ( this.previous !== this.element.val() ) { + this._trigger( "change", event ); + } + }, + mousewheel: function( event, delta ) { + if ( !delta ) { + return; + } + if ( !this.spinning && !this._start( event ) ) { + return false; + } + + this._spin( (delta > 0 ? 1 : -1) * this.options.step, event ); + clearTimeout( this.mousewheelTimer ); + this.mousewheelTimer = this._delay(function() { + if ( this.spinning ) { + this._stop( event ); + } + }, 100 ); + event.preventDefault(); + }, + "mousedown .ui-spinner-button": function( event ) { + var previous; + + // We never want the buttons to have focus; whenever the user is + // interacting with the spinner, the focus should be on the input. + // If the input is focused then this.previous is properly set from + // when the input first received focus. If the input is not focused + // then we need to set this.previous based on the value before spinning. + previous = this.element[0] === this.document[0].activeElement ? + this.previous : this.element.val(); + function checkFocus() { + var isActive = this.element[0] === this.document[0].activeElement; + if ( !isActive ) { + this.element.focus(); + this.previous = previous; + // support: IE + // IE sets focus asynchronously, so we need to check if focus + // moved off of the input because the user clicked on the button. + this._delay(function() { + this.previous = previous; + }); + } + } + + // ensure focus is on (or stays on) the text field + event.preventDefault(); + checkFocus.call( this ); + + // support: IE + // IE doesn't prevent moving focus even with event.preventDefault() + // so we set a flag to know when we should ignore the blur event + // and check (again) if focus moved off of the input. + this.cancelBlur = true; + this._delay(function() { + delete this.cancelBlur; + checkFocus.call( this ); + }); + + if ( this._start( event ) === false ) { + return; + } + + this._repeat( null, $( event.currentTarget ).hasClass( "ui-spinner-up" ) ? 1 : -1, event ); + }, + "mouseup .ui-spinner-button": "_stop", + "mouseenter .ui-spinner-button": function( event ) { + // button will add ui-state-active if mouse was down while mouseleave and kept down + if ( !$( event.currentTarget ).hasClass( "ui-state-active" ) ) { + return; + } + + if ( this._start( event ) === false ) { + return false; + } + this._repeat( null, $( event.currentTarget ).hasClass( "ui-spinner-up" ) ? 1 : -1, event ); + }, + // TODO: do we really want to consider this a stop? + // shouldn't we just stop the repeater and wait until mouseup before + // we trigger the stop event? + "mouseleave .ui-spinner-button": "_stop" + }, + + _draw: function() { + var uiSpinner = this.uiSpinner = this.element + .addClass( "ui-spinner-input" ) + .attr( "autocomplete", "off" ) + .wrap( this._uiSpinnerHtml() ) + .parent() + // add buttons + .append( this._buttonHtml() ); + + this.element.attr( "role", "spinbutton" ); + + // button bindings + this.buttons = uiSpinner.find( ".ui-spinner-button" ) + .attr( "tabIndex", -1 ) + .button() + .removeClass( "ui-corner-all" ); + + // IE 6 doesn't understand height: 50% for the buttons + // unless the wrapper has an explicit height + if ( this.buttons.height() > Math.ceil( uiSpinner.height() * 0.5 ) && + uiSpinner.height() > 0 ) { + uiSpinner.height( uiSpinner.height() ); + } + + // disable spinner if element was already disabled + if ( this.options.disabled ) { + this.disable(); + } + }, + + _keydown: function( event ) { + var options = this.options, + keyCode = $.ui.keyCode; + + switch ( event.keyCode ) { + case keyCode.UP: + this._repeat( null, 1, event ); + return true; + case keyCode.DOWN: + this._repeat( null, -1, event ); + return true; + case keyCode.PAGE_UP: + this._repeat( null, options.page, event ); + return true; + case keyCode.PAGE_DOWN: + this._repeat( null, -options.page, event ); + return true; + } + + return false; + }, + + _uiSpinnerHtml: function() { + return "<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>"; + }, + + _buttonHtml: function() { + return "" + + "<a class='ui-spinner-button ui-spinner-up ui-corner-tr'>" + + "<span class='ui-icon " + this.options.icons.up + "'>▲</span>" + + "</a>" + + "<a class='ui-spinner-button ui-spinner-down ui-corner-br'>" + + "<span class='ui-icon " + this.options.icons.down + "'>▼</span>" + + "</a>"; + }, + + _start: function( event ) { + if ( !this.spinning && this._trigger( "start", event ) === false ) { + return false; + } + + if ( !this.counter ) { + this.counter = 1; + } + this.spinning = true; + return true; + }, + + _repeat: function( i, steps, event ) { + i = i || 500; + + clearTimeout( this.timer ); + this.timer = this._delay(function() { + this._repeat( 40, steps, event ); + }, i ); + + this._spin( steps * this.options.step, event ); + }, + + _spin: function( step, event ) { + var value = this.value() || 0; + + if ( !this.counter ) { + this.counter = 1; + } + + value = this._adjustValue( value + step * this._increment( this.counter ) ); + + if ( !this.spinning || this._trigger( "spin", event, { value: value } ) !== false) { + this._value( value ); + this.counter++; + } + }, + + _increment: function( i ) { + var incremental = this.options.incremental; + + if ( incremental ) { + return $.isFunction( incremental ) ? + incremental( i ) : + Math.floor( i * i * i / 50000 - i * i / 500 + 17 * i / 200 + 1 ); + } + + return 1; + }, + + _precision: function() { + var precision = this._precisionOf( this.options.step ); + if ( this.options.min !== null ) { + precision = Math.max( precision, this._precisionOf( this.options.min ) ); + } + return precision; + }, + + _precisionOf: function( num ) { + var str = num.toString(), + decimal = str.indexOf( "." ); + return decimal === -1 ? 0 : str.length - decimal - 1; + }, + + _adjustValue: function( value ) { + var base, aboveMin, + options = this.options; + + // make sure we're at a valid step + // - find out where we are relative to the base (min or 0) + base = options.min !== null ? options.min : 0; + aboveMin = value - base; + // - round to the nearest step + aboveMin = Math.round(aboveMin / options.step) * options.step; + // - rounding is based on 0, so adjust back to our base + value = base + aboveMin; + + // fix precision from bad JS floating point math + value = parseFloat( value.toFixed( this._precision() ) ); + + // clamp the value + if ( options.max !== null && value > options.max) { + return options.max; + } + if ( options.min !== null && value < options.min ) { + return options.min; + } + + return value; + }, + + _stop: function( event ) { + if ( !this.spinning ) { + return; + } + + clearTimeout( this.timer ); + clearTimeout( this.mousewheelTimer ); + this.counter = 0; + this.spinning = false; + this._trigger( "stop", event ); + }, + + _setOption: function( key, value ) { + if ( key === "culture" || key === "numberFormat" ) { + var prevValue = this._parse( this.element.val() ); + this.options[ key ] = value; + this.element.val( this._format( prevValue ) ); + return; + } + + if ( key === "max" || key === "min" || key === "step" ) { + if ( typeof value === "string" ) { + value = this._parse( value ); + } + } + if ( key === "icons" ) { + this.buttons.first().find( ".ui-icon" ) + .removeClass( this.options.icons.up ) + .addClass( value.up ); + this.buttons.last().find( ".ui-icon" ) + .removeClass( this.options.icons.down ) + .addClass( value.down ); + } + + this._super( key, value ); + + if ( key === "disabled" ) { + this.widget().toggleClass( "ui-state-disabled", !!value ); + this.element.prop( "disabled", !!value ); + this.buttons.button( value ? "disable" : "enable" ); + } + }, + + _setOptions: spinner_modifier(function( options ) { + this._super( options ); + }), + + _parse: function( val ) { + if ( typeof val === "string" && val !== "" ) { + val = window.Globalize && this.options.numberFormat ? + Globalize.parseFloat( val, 10, this.options.culture ) : +val; + } + return val === "" || isNaN( val ) ? null : val; + }, + + _format: function( value ) { + if ( value === "" ) { + return ""; + } + return window.Globalize && this.options.numberFormat ? + Globalize.format( value, this.options.numberFormat, this.options.culture ) : + value; + }, + + _refresh: function() { + this.element.attr({ + "aria-valuemin": this.options.min, + "aria-valuemax": this.options.max, + // TODO: what should we do with values that can't be parsed? + "aria-valuenow": this._parse( this.element.val() ) + }); + }, + + isValid: function() { + var value = this.value(); + + // null is invalid + if ( value === null ) { + return false; + } + + // if value gets adjusted, it's invalid + return value === this._adjustValue( value ); + }, + + // update the value without triggering change + _value: function( value, allowAny ) { + var parsed; + if ( value !== "" ) { + parsed = this._parse( value ); + if ( parsed !== null ) { + if ( !allowAny ) { + parsed = this._adjustValue( parsed ); + } + value = this._format( parsed ); + } + } + this.element.val( value ); + this._refresh(); + }, + + _destroy: function() { + this.element + .removeClass( "ui-spinner-input" ) + .prop( "disabled", false ) + .removeAttr( "autocomplete" ) + .removeAttr( "role" ) + .removeAttr( "aria-valuemin" ) + .removeAttr( "aria-valuemax" ) + .removeAttr( "aria-valuenow" ); + this.uiSpinner.replaceWith( this.element ); + }, + + stepUp: spinner_modifier(function( steps ) { + this._stepUp( steps ); + }), + _stepUp: function( steps ) { + if ( this._start() ) { + this._spin( (steps || 1) * this.options.step ); + this._stop(); + } + }, + + stepDown: spinner_modifier(function( steps ) { + this._stepDown( steps ); + }), + _stepDown: function( steps ) { + if ( this._start() ) { + this._spin( (steps || 1) * -this.options.step ); + this._stop(); + } + }, + + pageUp: spinner_modifier(function( pages ) { + this._stepUp( (pages || 1) * this.options.page ); + }), + + pageDown: spinner_modifier(function( pages ) { + this._stepDown( (pages || 1) * this.options.page ); + }), + + value: function( newVal ) { + if ( !arguments.length ) { + return this._parse( this.element.val() ); + } + spinner_modifier( this._value ).call( this, newVal ); + }, + + widget: function() { + return this.uiSpinner; + } +}); + + +/*! + * jQuery UI Tabs 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/tabs/ + */ + + +var tabs = $.widget( "ui.tabs", { + version: "1.11.4", + delay: 300, + options: { + active: null, + collapsible: false, + event: "click", + heightStyle: "content", + hide: null, + show: null, + + // callbacks + activate: null, + beforeActivate: null, + beforeLoad: null, + load: null + }, + + _isLocal: (function() { + var rhash = /#.*$/; + + return function( anchor ) { + var anchorUrl, locationUrl; + + // support: IE7 + // IE7 doesn't normalize the href property when set via script (#9317) + anchor = anchor.cloneNode( false ); + + anchorUrl = anchor.href.replace( rhash, "" ); + locationUrl = location.href.replace( rhash, "" ); + + // decoding may throw an error if the URL isn't UTF-8 (#9518) + try { + anchorUrl = decodeURIComponent( anchorUrl ); + } catch ( error ) {} + try { + locationUrl = decodeURIComponent( locationUrl ); + } catch ( error ) {} + + return anchor.hash.length > 1 && anchorUrl === locationUrl; + }; + })(), + + _create: function() { + var that = this, + options = this.options; + + this.running = false; + + this.element + .addClass( "ui-tabs ui-widget ui-widget-content ui-corner-all" ) + .toggleClass( "ui-tabs-collapsible", options.collapsible ); + + this._processTabs(); + options.active = this._initialActive(); + + // Take disabling tabs via class attribute from HTML + // into account and update option properly. + if ( $.isArray( options.disabled ) ) { + options.disabled = $.unique( options.disabled.concat( + $.map( this.tabs.filter( ".ui-state-disabled" ), function( li ) { + return that.tabs.index( li ); + }) + ) ).sort(); + } + + // check for length avoids error when initializing empty list + if ( this.options.active !== false && this.anchors.length ) { + this.active = this._findActive( options.active ); + } else { + this.active = $(); + } + + this._refresh(); + + if ( this.active.length ) { + this.load( options.active ); + } + }, + + _initialActive: function() { + var active = this.options.active, + collapsible = this.options.collapsible, + locationHash = location.hash.substring( 1 ); + + if ( active === null ) { + // check the fragment identifier in the URL + if ( locationHash ) { + this.tabs.each(function( i, tab ) { + if ( $( tab ).attr( "aria-controls" ) === locationHash ) { + active = i; + return false; + } + }); + } + + // check for a tab marked active via a class + if ( active === null ) { + active = this.tabs.index( this.tabs.filter( ".ui-tabs-active" ) ); + } + + // no active tab, set to false + if ( active === null || active === -1 ) { + active = this.tabs.length ? 0 : false; + } + } + + // handle numbers: negative, out of range + if ( active !== false ) { + active = this.tabs.index( this.tabs.eq( active ) ); + if ( active === -1 ) { + active = collapsible ? false : 0; + } + } + + // don't allow collapsible: false and active: false + if ( !collapsible && active === false && this.anchors.length ) { + active = 0; + } + + return active; + }, + + _getCreateEventData: function() { + return { + tab: this.active, + panel: !this.active.length ? $() : this._getPanelForTab( this.active ) + }; + }, + + _tabKeydown: function( event ) { + var focusedTab = $( this.document[0].activeElement ).closest( "li" ), + selectedIndex = this.tabs.index( focusedTab ), + goingForward = true; + + if ( this._handlePageNav( event ) ) { + return; + } + + switch ( event.keyCode ) { + case $.ui.keyCode.RIGHT: + case $.ui.keyCode.DOWN: + selectedIndex++; + break; + case $.ui.keyCode.UP: + case $.ui.keyCode.LEFT: + goingForward = false; + selectedIndex--; + break; + case $.ui.keyCode.END: + selectedIndex = this.anchors.length - 1; + break; + case $.ui.keyCode.HOME: + selectedIndex = 0; + break; + case $.ui.keyCode.SPACE: + // Activate only, no collapsing + event.preventDefault(); + clearTimeout( this.activating ); + this._activate( selectedIndex ); + return; + case $.ui.keyCode.ENTER: + // Toggle (cancel delayed activation, allow collapsing) + event.preventDefault(); + clearTimeout( this.activating ); + // Determine if we should collapse or activate + this._activate( selectedIndex === this.options.active ? false : selectedIndex ); + return; + default: + return; + } + + // Focus the appropriate tab, based on which key was pressed + event.preventDefault(); + clearTimeout( this.activating ); + selectedIndex = this._focusNextTab( selectedIndex, goingForward ); + + // Navigating with control/command key will prevent automatic activation + if ( !event.ctrlKey && !event.metaKey ) { + + // Update aria-selected immediately so that AT think the tab is already selected. + // Otherwise AT may confuse the user by stating that they need to activate the tab, + // but the tab will already be activated by the time the announcement finishes. + focusedTab.attr( "aria-selected", "false" ); + this.tabs.eq( selectedIndex ).attr( "aria-selected", "true" ); + + this.activating = this._delay(function() { + this.option( "active", selectedIndex ); + }, this.delay ); + } + }, + + _panelKeydown: function( event ) { + if ( this._handlePageNav( event ) ) { + return; + } + + // Ctrl+up moves focus to the current tab + if ( event.ctrlKey && event.keyCode === $.ui.keyCode.UP ) { + event.preventDefault(); + this.active.focus(); + } + }, + + // Alt+page up/down moves focus to the previous/next tab (and activates) + _handlePageNav: function( event ) { + if ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_UP ) { + this._activate( this._focusNextTab( this.options.active - 1, false ) ); + return true; + } + if ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_DOWN ) { + this._activate( this._focusNextTab( this.options.active + 1, true ) ); + return true; + } + }, + + _findNextTab: function( index, goingForward ) { + var lastTabIndex = this.tabs.length - 1; + + function constrain() { + if ( index > lastTabIndex ) { + index = 0; + } + if ( index < 0 ) { + index = lastTabIndex; + } + return index; + } + + while ( $.inArray( constrain(), this.options.disabled ) !== -1 ) { + index = goingForward ? index + 1 : index - 1; + } + + return index; + }, + + _focusNextTab: function( index, goingForward ) { + index = this._findNextTab( index, goingForward ); + this.tabs.eq( index ).focus(); + return index; + }, + + _setOption: function( key, value ) { + if ( key === "active" ) { + // _activate() will handle invalid values and update this.options + this._activate( value ); + return; + } + + if ( key === "disabled" ) { + // don't use the widget factory's disabled handling + this._setupDisabled( value ); + return; + } + + this._super( key, value); + + if ( key === "collapsible" ) { + this.element.toggleClass( "ui-tabs-collapsible", value ); + // Setting collapsible: false while collapsed; open first panel + if ( !value && this.options.active === false ) { + this._activate( 0 ); + } + } + + if ( key === "event" ) { + this._setupEvents( value ); + } + + if ( key === "heightStyle" ) { + this._setupHeightStyle( value ); + } + }, + + _sanitizeSelector: function( hash ) { + return hash ? hash.replace( /[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g, "\\$&" ) : ""; + }, + + refresh: function() { + var options = this.options, + lis = this.tablist.children( ":has(a[href])" ); + + // get disabled tabs from class attribute from HTML + // this will get converted to a boolean if needed in _refresh() + options.disabled = $.map( lis.filter( ".ui-state-disabled" ), function( tab ) { + return lis.index( tab ); + }); + + this._processTabs(); + + // was collapsed or no tabs + if ( options.active === false || !this.anchors.length ) { + options.active = false; + this.active = $(); + // was active, but active tab is gone + } else if ( this.active.length && !$.contains( this.tablist[ 0 ], this.active[ 0 ] ) ) { + // all remaining tabs are disabled + if ( this.tabs.length === options.disabled.length ) { + options.active = false; + this.active = $(); + // activate previous tab + } else { + this._activate( this._findNextTab( Math.max( 0, options.active - 1 ), false ) ); + } + // was active, active tab still exists + } else { + // make sure active index is correct + options.active = this.tabs.index( this.active ); + } + + this._refresh(); + }, + + _refresh: function() { + this._setupDisabled( this.options.disabled ); + this._setupEvents( this.options.event ); + this._setupHeightStyle( this.options.heightStyle ); + + this.tabs.not( this.active ).attr({ + "aria-selected": "false", + "aria-expanded": "false", + tabIndex: -1 + }); + this.panels.not( this._getPanelForTab( this.active ) ) + .hide() + .attr({ + "aria-hidden": "true" + }); + + // Make sure one tab is in the tab order + if ( !this.active.length ) { + this.tabs.eq( 0 ).attr( "tabIndex", 0 ); + } else { + this.active + .addClass( "ui-tabs-active ui-state-active" ) + .attr({ + "aria-selected": "true", + "aria-expanded": "true", + tabIndex: 0 + }); + this._getPanelForTab( this.active ) + .show() + .attr({ + "aria-hidden": "false" + }); + } + }, + + _processTabs: function() { + var that = this, + prevTabs = this.tabs, + prevAnchors = this.anchors, + prevPanels = this.panels; + + this.tablist = this._getList() + .addClass( "ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all" ) + .attr( "role", "tablist" ) + + // Prevent users from focusing disabled tabs via click + .delegate( "> li", "mousedown" + this.eventNamespace, function( event ) { + if ( $( this ).is( ".ui-state-disabled" ) ) { + event.preventDefault(); + } + }) + + // support: IE <9 + // Preventing the default action in mousedown doesn't prevent IE + // from focusing the element, so if the anchor gets focused, blur. + // We don't have to worry about focusing the previously focused + // element since clicking on a non-focusable element should focus + // the body anyway. + .delegate( ".ui-tabs-anchor", "focus" + this.eventNamespace, function() { + if ( $( this ).closest( "li" ).is( ".ui-state-disabled" ) ) { + this.blur(); + } + }); + + this.tabs = this.tablist.find( "> li:has(a[href])" ) + .addClass( "ui-state-default ui-corner-top" ) + .attr({ + role: "tab", + tabIndex: -1 + }); + + this.anchors = this.tabs.map(function() { + return $( "a", this )[ 0 ]; + }) + .addClass( "ui-tabs-anchor" ) + .attr({ + role: "presentation", + tabIndex: -1 + }); + + this.panels = $(); + + this.anchors.each(function( i, anchor ) { + var selector, panel, panelId, + anchorId = $( anchor ).uniqueId().attr( "id" ), + tab = $( anchor ).closest( "li" ), + originalAriaControls = tab.attr( "aria-controls" ); + + // inline tab + if ( that._isLocal( anchor ) ) { + selector = anchor.hash; + panelId = selector.substring( 1 ); + panel = that.element.find( that._sanitizeSelector( selector ) ); + // remote tab + } else { + // If the tab doesn't already have aria-controls, + // generate an id by using a throw-away element + panelId = tab.attr( "aria-controls" ) || $( {} ).uniqueId()[ 0 ].id; + selector = "#" + panelId; + panel = that.element.find( selector ); + if ( !panel.length ) { + panel = that._createPanel( panelId ); + panel.insertAfter( that.panels[ i - 1 ] || that.tablist ); + } + panel.attr( "aria-live", "polite" ); + } + + if ( panel.length) { + that.panels = that.panels.add( panel ); + } + if ( originalAriaControls ) { + tab.data( "ui-tabs-aria-controls", originalAriaControls ); + } + tab.attr({ + "aria-controls": panelId, + "aria-labelledby": anchorId + }); + panel.attr( "aria-labelledby", anchorId ); + }); + + this.panels + .addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom" ) + .attr( "role", "tabpanel" ); + + // Avoid memory leaks (#10056) + if ( prevTabs ) { + this._off( prevTabs.not( this.tabs ) ); + this._off( prevAnchors.not( this.anchors ) ); + this._off( prevPanels.not( this.panels ) ); + } + }, + + // allow overriding how to find the list for rare usage scenarios (#7715) + _getList: function() { + return this.tablist || this.element.find( "ol,ul" ).eq( 0 ); + }, + + _createPanel: function( id ) { + return $( "<div>" ) + .attr( "id", id ) + .addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom" ) + .data( "ui-tabs-destroy", true ); + }, + + _setupDisabled: function( disabled ) { + if ( $.isArray( disabled ) ) { + if ( !disabled.length ) { + disabled = false; + } else if ( disabled.length === this.anchors.length ) { + disabled = true; + } + } + + // disable tabs + for ( var i = 0, li; ( li = this.tabs[ i ] ); i++ ) { + if ( disabled === true || $.inArray( i, disabled ) !== -1 ) { + $( li ) + .addClass( "ui-state-disabled" ) + .attr( "aria-disabled", "true" ); + } else { + $( li ) + .removeClass( "ui-state-disabled" ) + .removeAttr( "aria-disabled" ); + } + } + + this.options.disabled = disabled; + }, + + _setupEvents: function( event ) { + var events = {}; + if ( event ) { + $.each( event.split(" "), function( index, eventName ) { + events[ eventName ] = "_eventHandler"; + }); + } + + this._off( this.anchors.add( this.tabs ).add( this.panels ) ); + // Always prevent the default action, even when disabled + this._on( true, this.anchors, { + click: function( event ) { + event.preventDefault(); + } + }); + this._on( this.anchors, events ); + this._on( this.tabs, { keydown: "_tabKeydown" } ); + this._on( this.panels, { keydown: "_panelKeydown" } ); + + this._focusable( this.tabs ); + this._hoverable( this.tabs ); + }, + + _setupHeightStyle: function( heightStyle ) { + var maxHeight, + parent = this.element.parent(); + + if ( heightStyle === "fill" ) { + maxHeight = parent.height(); + maxHeight -= this.element.outerHeight() - this.element.height(); + + this.element.siblings( ":visible" ).each(function() { + var elem = $( this ), + position = elem.css( "position" ); + + if ( position === "absolute" || position === "fixed" ) { + return; + } + maxHeight -= elem.outerHeight( true ); + }); + + this.element.children().not( this.panels ).each(function() { + maxHeight -= $( this ).outerHeight( true ); + }); + + this.panels.each(function() { + $( this ).height( Math.max( 0, maxHeight - + $( this ).innerHeight() + $( this ).height() ) ); + }) + .css( "overflow", "auto" ); + } else if ( heightStyle === "auto" ) { + maxHeight = 0; + this.panels.each(function() { + maxHeight = Math.max( maxHeight, $( this ).height( "" ).height() ); + }).height( maxHeight ); + } + }, + + _eventHandler: function( event ) { + var options = this.options, + active = this.active, + anchor = $( event.currentTarget ), + tab = anchor.closest( "li" ), + clickedIsActive = tab[ 0 ] === active[ 0 ], + collapsing = clickedIsActive && options.collapsible, + toShow = collapsing ? $() : this._getPanelForTab( tab ), + toHide = !active.length ? $() : this._getPanelForTab( active ), + eventData = { + oldTab: active, + oldPanel: toHide, + newTab: collapsing ? $() : tab, + newPanel: toShow + }; + + event.preventDefault(); + + if ( tab.hasClass( "ui-state-disabled" ) || + // tab is already loading + tab.hasClass( "ui-tabs-loading" ) || + // can't switch durning an animation + this.running || + // click on active header, but not collapsible + ( clickedIsActive && !options.collapsible ) || + // allow canceling activation + ( this._trigger( "beforeActivate", event, eventData ) === false ) ) { + return; + } + + options.active = collapsing ? false : this.tabs.index( tab ); + + this.active = clickedIsActive ? $() : tab; + if ( this.xhr ) { + this.xhr.abort(); + } + + if ( !toHide.length && !toShow.length ) { + $.error( "jQuery UI Tabs: Mismatching fragment identifier." ); + } + + if ( toShow.length ) { + this.load( this.tabs.index( tab ), event ); + } + this._toggle( event, eventData ); + }, + + // handles show/hide for selecting tabs + _toggle: function( event, eventData ) { + var that = this, + toShow = eventData.newPanel, + toHide = eventData.oldPanel; + + this.running = true; + + function complete() { + that.running = false; + that._trigger( "activate", event, eventData ); + } + + function show() { + eventData.newTab.closest( "li" ).addClass( "ui-tabs-active ui-state-active" ); + + if ( toShow.length && that.options.show ) { + that._show( toShow, that.options.show, complete ); + } else { + toShow.show(); + complete(); + } + } + + // start out by hiding, then showing, then completing + if ( toHide.length && this.options.hide ) { + this._hide( toHide, this.options.hide, function() { + eventData.oldTab.closest( "li" ).removeClass( "ui-tabs-active ui-state-active" ); + show(); + }); + } else { + eventData.oldTab.closest( "li" ).removeClass( "ui-tabs-active ui-state-active" ); + toHide.hide(); + show(); + } + + toHide.attr( "aria-hidden", "true" ); + eventData.oldTab.attr({ + "aria-selected": "false", + "aria-expanded": "false" + }); + // If we're switching tabs, remove the old tab from the tab order. + // If we're opening from collapsed state, remove the previous tab from the tab order. + // If we're collapsing, then keep the collapsing tab in the tab order. + if ( toShow.length && toHide.length ) { + eventData.oldTab.attr( "tabIndex", -1 ); + } else if ( toShow.length ) { + this.tabs.filter(function() { + return $( this ).attr( "tabIndex" ) === 0; + }) + .attr( "tabIndex", -1 ); + } + + toShow.attr( "aria-hidden", "false" ); + eventData.newTab.attr({ + "aria-selected": "true", + "aria-expanded": "true", + tabIndex: 0 + }); + }, + + _activate: function( index ) { + var anchor, + active = this._findActive( index ); + + // trying to activate the already active panel + if ( active[ 0 ] === this.active[ 0 ] ) { + return; + } + + // trying to collapse, simulate a click on the current active header + if ( !active.length ) { + active = this.active; + } + + anchor = active.find( ".ui-tabs-anchor" )[ 0 ]; + this._eventHandler({ + target: anchor, + currentTarget: anchor, + preventDefault: $.noop + }); + }, + + _findActive: function( index ) { + return index === false ? $() : this.tabs.eq( index ); + }, + + _getIndex: function( index ) { + // meta-function to give users option to provide a href string instead of a numerical index. + if ( typeof index === "string" ) { + index = this.anchors.index( this.anchors.filter( "[href$='" + index + "']" ) ); + } + + return index; + }, + + _destroy: function() { + if ( this.xhr ) { + this.xhr.abort(); + } + + this.element.removeClass( "ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible" ); + + this.tablist + .removeClass( "ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all" ) + .removeAttr( "role" ); + + this.anchors + .removeClass( "ui-tabs-anchor" ) + .removeAttr( "role" ) + .removeAttr( "tabIndex" ) + .removeUniqueId(); + + this.tablist.unbind( this.eventNamespace ); + + this.tabs.add( this.panels ).each(function() { + if ( $.data( this, "ui-tabs-destroy" ) ) { + $( this ).remove(); + } else { + $( this ) + .removeClass( "ui-state-default ui-state-active ui-state-disabled " + + "ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel" ) + .removeAttr( "tabIndex" ) + .removeAttr( "aria-live" ) + .removeAttr( "aria-busy" ) + .removeAttr( "aria-selected" ) + .removeAttr( "aria-labelledby" ) + .removeAttr( "aria-hidden" ) + .removeAttr( "aria-expanded" ) + .removeAttr( "role" ); + } + }); + + this.tabs.each(function() { + var li = $( this ), + prev = li.data( "ui-tabs-aria-controls" ); + if ( prev ) { + li + .attr( "aria-controls", prev ) + .removeData( "ui-tabs-aria-controls" ); + } else { + li.removeAttr( "aria-controls" ); + } + }); + + this.panels.show(); + + if ( this.options.heightStyle !== "content" ) { + this.panels.css( "height", "" ); + } + }, + + enable: function( index ) { + var disabled = this.options.disabled; + if ( disabled === false ) { + return; + } + + if ( index === undefined ) { + disabled = false; + } else { + index = this._getIndex( index ); + if ( $.isArray( disabled ) ) { + disabled = $.map( disabled, function( num ) { + return num !== index ? num : null; + }); + } else { + disabled = $.map( this.tabs, function( li, num ) { + return num !== index ? num : null; + }); + } + } + this._setupDisabled( disabled ); + }, + + disable: function( index ) { + var disabled = this.options.disabled; + if ( disabled === true ) { + return; + } + + if ( index === undefined ) { + disabled = true; + } else { + index = this._getIndex( index ); + if ( $.inArray( index, disabled ) !== -1 ) { + return; + } + if ( $.isArray( disabled ) ) { + disabled = $.merge( [ index ], disabled ).sort(); + } else { + disabled = [ index ]; + } + } + this._setupDisabled( disabled ); + }, + + load: function( index, event ) { + index = this._getIndex( index ); + var that = this, + tab = this.tabs.eq( index ), + anchor = tab.find( ".ui-tabs-anchor" ), + panel = this._getPanelForTab( tab ), + eventData = { + tab: tab, + panel: panel + }, + complete = function( jqXHR, status ) { + if ( status === "abort" ) { + that.panels.stop( false, true ); + } + + tab.removeClass( "ui-tabs-loading" ); + panel.removeAttr( "aria-busy" ); + + if ( jqXHR === that.xhr ) { + delete that.xhr; + } + }; + + // not remote + if ( this._isLocal( anchor[ 0 ] ) ) { + return; + } + + this.xhr = $.ajax( this._ajaxSettings( anchor, event, eventData ) ); + + // support: jQuery <1.8 + // jQuery <1.8 returns false if the request is canceled in beforeSend, + // but as of 1.8, $.ajax() always returns a jqXHR object. + if ( this.xhr && this.xhr.statusText !== "canceled" ) { + tab.addClass( "ui-tabs-loading" ); + panel.attr( "aria-busy", "true" ); + + this.xhr + .done(function( response, status, jqXHR ) { + // support: jQuery <1.8 + // http://bugs.jquery.com/ticket/11778 + setTimeout(function() { + panel.html( response ); + that._trigger( "load", event, eventData ); + + complete( jqXHR, status ); + }, 1 ); + }) + .fail(function( jqXHR, status ) { + // support: jQuery <1.8 + // http://bugs.jquery.com/ticket/11778 + setTimeout(function() { + complete( jqXHR, status ); + }, 1 ); + }); + } + }, + + _ajaxSettings: function( anchor, event, eventData ) { + var that = this; + return { + url: anchor.attr( "href" ), + beforeSend: function( jqXHR, settings ) { + return that._trigger( "beforeLoad", event, + $.extend( { jqXHR: jqXHR, ajaxSettings: settings }, eventData ) ); + } + }; + }, + + _getPanelForTab: function( tab ) { + var id = $( tab ).attr( "aria-controls" ); + return this.element.find( this._sanitizeSelector( "#" + id ) ); + } +}); + + +/*! + * jQuery UI Tooltip 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/tooltip/ + */ + + +var tooltip = $.widget( "ui.tooltip", { + version: "1.11.4", + options: { + content: function() { + // support: IE<9, Opera in jQuery <1.7 + // .text() can't accept undefined, so coerce to a string + var title = $( this ).attr( "title" ) || ""; + // Escape title, since we're going from an attribute to raw HTML + return $( "<a>" ).text( title ).html(); + }, + hide: true, + // Disabled elements have inconsistent behavior across browsers (#8661) + items: "[title]:not([disabled])", + position: { + my: "left top+15", + at: "left bottom", + collision: "flipfit flip" + }, + show: true, + tooltipClass: null, + track: false, + + // callbacks + close: null, + open: null + }, + + _addDescribedBy: function( elem, id ) { + var describedby = (elem.attr( "aria-describedby" ) || "").split( /\s+/ ); + describedby.push( id ); + elem + .data( "ui-tooltip-id", id ) + .attr( "aria-describedby", $.trim( describedby.join( " " ) ) ); + }, + + _removeDescribedBy: function( elem ) { + var id = elem.data( "ui-tooltip-id" ), + describedby = (elem.attr( "aria-describedby" ) || "").split( /\s+/ ), + index = $.inArray( id, describedby ); + + if ( index !== -1 ) { + describedby.splice( index, 1 ); + } + + elem.removeData( "ui-tooltip-id" ); + describedby = $.trim( describedby.join( " " ) ); + if ( describedby ) { + elem.attr( "aria-describedby", describedby ); + } else { + elem.removeAttr( "aria-describedby" ); + } + }, + + _create: function() { + this._on({ + mouseover: "open", + focusin: "open" + }); + + // IDs of generated tooltips, needed for destroy + this.tooltips = {}; + + // IDs of parent tooltips where we removed the title attribute + this.parents = {}; + + if ( this.options.disabled ) { + this._disable(); + } + + // Append the aria-live region so tooltips announce correctly + this.liveRegion = $( "<div>" ) + .attr({ + role: "log", + "aria-live": "assertive", + "aria-relevant": "additions" + }) + .addClass( "ui-helper-hidden-accessible" ) + .appendTo( this.document[ 0 ].body ); + }, + + _setOption: function( key, value ) { + var that = this; + + if ( key === "disabled" ) { + this[ value ? "_disable" : "_enable" ](); + this.options[ key ] = value; + // disable element style changes + return; + } + + this._super( key, value ); + + if ( key === "content" ) { + $.each( this.tooltips, function( id, tooltipData ) { + that._updateContent( tooltipData.element ); + }); + } + }, + + _disable: function() { + var that = this; + + // close open tooltips + $.each( this.tooltips, function( id, tooltipData ) { + var event = $.Event( "blur" ); + event.target = event.currentTarget = tooltipData.element[ 0 ]; + that.close( event, true ); + }); + + // remove title attributes to prevent native tooltips + this.element.find( this.options.items ).addBack().each(function() { + var element = $( this ); + if ( element.is( "[title]" ) ) { + element + .data( "ui-tooltip-title", element.attr( "title" ) ) + .removeAttr( "title" ); + } + }); + }, + + _enable: function() { + // restore title attributes + this.element.find( this.options.items ).addBack().each(function() { + var element = $( this ); + if ( element.data( "ui-tooltip-title" ) ) { + element.attr( "title", element.data( "ui-tooltip-title" ) ); + } + }); + }, + + open: function( event ) { + var that = this, + target = $( event ? event.target : this.element ) + // we need closest here due to mouseover bubbling, + // but always pointing at the same event target + .closest( this.options.items ); + + // No element to show a tooltip for or the tooltip is already open + if ( !target.length || target.data( "ui-tooltip-id" ) ) { + return; + } + + if ( target.attr( "title" ) ) { + target.data( "ui-tooltip-title", target.attr( "title" ) ); + } + + target.data( "ui-tooltip-open", true ); + + // kill parent tooltips, custom or native, for hover + if ( event && event.type === "mouseover" ) { + target.parents().each(function() { + var parent = $( this ), + blurEvent; + if ( parent.data( "ui-tooltip-open" ) ) { + blurEvent = $.Event( "blur" ); + blurEvent.target = blurEvent.currentTarget = this; + that.close( blurEvent, true ); + } + if ( parent.attr( "title" ) ) { + parent.uniqueId(); + that.parents[ this.id ] = { + element: this, + title: parent.attr( "title" ) + }; + parent.attr( "title", "" ); + } + }); + } + + this._registerCloseHandlers( event, target ); + this._updateContent( target, event ); + }, + + _updateContent: function( target, event ) { + var content, + contentOption = this.options.content, + that = this, + eventType = event ? event.type : null; + + if ( typeof contentOption === "string" ) { + return this._open( event, target, contentOption ); + } + + content = contentOption.call( target[0], function( response ) { + + // IE may instantly serve a cached response for ajax requests + // delay this call to _open so the other call to _open runs first + that._delay(function() { + + // Ignore async response if tooltip was closed already + if ( !target.data( "ui-tooltip-open" ) ) { + return; + } + + // jQuery creates a special event for focusin when it doesn't + // exist natively. To improve performance, the native event + // object is reused and the type is changed. Therefore, we can't + // rely on the type being correct after the event finished + // bubbling, so we set it back to the previous value. (#8740) + if ( event ) { + event.type = eventType; + } + this._open( event, target, response ); + }); + }); + if ( content ) { + this._open( event, target, content ); + } + }, + + _open: function( event, target, content ) { + var tooltipData, tooltip, delayedShow, a11yContent, + positionOption = $.extend( {}, this.options.position ); + + if ( !content ) { + return; + } + + // Content can be updated multiple times. If the tooltip already + // exists, then just update the content and bail. + tooltipData = this._find( target ); + if ( tooltipData ) { + tooltipData.tooltip.find( ".ui-tooltip-content" ).html( content ); + return; + } + + // if we have a title, clear it to prevent the native tooltip + // we have to check first to avoid defining a title if none exists + // (we don't want to cause an element to start matching [title]) + // + // We use removeAttr only for key events, to allow IE to export the correct + // accessible attributes. For mouse events, set to empty string to avoid + // native tooltip showing up (happens only when removing inside mouseover). + if ( target.is( "[title]" ) ) { + if ( event && event.type === "mouseover" ) { + target.attr( "title", "" ); + } else { + target.removeAttr( "title" ); + } + } + + tooltipData = this._tooltip( target ); + tooltip = tooltipData.tooltip; + this._addDescribedBy( target, tooltip.attr( "id" ) ); + tooltip.find( ".ui-tooltip-content" ).html( content ); + + // Support: Voiceover on OS X, JAWS on IE <= 9 + // JAWS announces deletions even when aria-relevant="additions" + // Voiceover will sometimes re-read the entire log region's contents from the beginning + this.liveRegion.children().hide(); + if ( content.clone ) { + a11yContent = content.clone(); + a11yContent.removeAttr( "id" ).find( "[id]" ).removeAttr( "id" ); + } else { + a11yContent = content; + } + $( "<div>" ).html( a11yContent ).appendTo( this.liveRegion ); + + function position( event ) { + positionOption.of = event; + if ( tooltip.is( ":hidden" ) ) { + return; + } + tooltip.position( positionOption ); + } + if ( this.options.track && event && /^mouse/.test( event.type ) ) { + this._on( this.document, { + mousemove: position + }); + // trigger once to override element-relative positioning + position( event ); + } else { + tooltip.position( $.extend({ + of: target + }, this.options.position ) ); + } + + tooltip.hide(); + + this._show( tooltip, this.options.show ); + // Handle tracking tooltips that are shown with a delay (#8644). As soon + // as the tooltip is visible, position the tooltip using the most recent + // event. + if ( this.options.show && this.options.show.delay ) { + delayedShow = this.delayedShow = setInterval(function() { + if ( tooltip.is( ":visible" ) ) { + position( positionOption.of ); + clearInterval( delayedShow ); + } + }, $.fx.interval ); + } + + this._trigger( "open", event, { tooltip: tooltip } ); + }, + + _registerCloseHandlers: function( event, target ) { + var events = { + keyup: function( event ) { + if ( event.keyCode === $.ui.keyCode.ESCAPE ) { + var fakeEvent = $.Event(event); + fakeEvent.currentTarget = target[0]; + this.close( fakeEvent, true ); + } + } + }; + + // Only bind remove handler for delegated targets. Non-delegated + // tooltips will handle this in destroy. + if ( target[ 0 ] !== this.element[ 0 ] ) { + events.remove = function() { + this._removeTooltip( this._find( target ).tooltip ); + }; + } + + if ( !event || event.type === "mouseover" ) { + events.mouseleave = "close"; + } + if ( !event || event.type === "focusin" ) { + events.focusout = "close"; + } + this._on( true, target, events ); + }, + + close: function( event ) { + var tooltip, + that = this, + target = $( event ? event.currentTarget : this.element ), + tooltipData = this._find( target ); + + // The tooltip may already be closed + if ( !tooltipData ) { + + // We set ui-tooltip-open immediately upon open (in open()), but only set the + // additional data once there's actually content to show (in _open()). So even if the + // tooltip doesn't have full data, we always remove ui-tooltip-open in case we're in + // the period between open() and _open(). + target.removeData( "ui-tooltip-open" ); + return; + } + + tooltip = tooltipData.tooltip; + + // disabling closes the tooltip, so we need to track when we're closing + // to avoid an infinite loop in case the tooltip becomes disabled on close + if ( tooltipData.closing ) { + return; + } + + // Clear the interval for delayed tracking tooltips + clearInterval( this.delayedShow ); + + // only set title if we had one before (see comment in _open()) + // If the title attribute has changed since open(), don't restore + if ( target.data( "ui-tooltip-title" ) && !target.attr( "title" ) ) { + target.attr( "title", target.data( "ui-tooltip-title" ) ); + } + + this._removeDescribedBy( target ); + + tooltipData.hiding = true; + tooltip.stop( true ); + this._hide( tooltip, this.options.hide, function() { + that._removeTooltip( $( this ) ); + }); + + target.removeData( "ui-tooltip-open" ); + this._off( target, "mouseleave focusout keyup" ); + + // Remove 'remove' binding only on delegated targets + if ( target[ 0 ] !== this.element[ 0 ] ) { + this._off( target, "remove" ); + } + this._off( this.document, "mousemove" ); + + if ( event && event.type === "mouseleave" ) { + $.each( this.parents, function( id, parent ) { + $( parent.element ).attr( "title", parent.title ); + delete that.parents[ id ]; + }); + } + + tooltipData.closing = true; + this._trigger( "close", event, { tooltip: tooltip } ); + if ( !tooltipData.hiding ) { + tooltipData.closing = false; + } + }, + + _tooltip: function( element ) { + var tooltip = $( "<div>" ) + .attr( "role", "tooltip" ) + .addClass( "ui-tooltip ui-widget ui-corner-all ui-widget-content " + + ( this.options.tooltipClass || "" ) ), + id = tooltip.uniqueId().attr( "id" ); + + $( "<div>" ) + .addClass( "ui-tooltip-content" ) + .appendTo( tooltip ); + + tooltip.appendTo( this.document[0].body ); + + return this.tooltips[ id ] = { + element: element, + tooltip: tooltip + }; + }, + + _find: function( target ) { + var id = target.data( "ui-tooltip-id" ); + return id ? this.tooltips[ id ] : null; + }, + + _removeTooltip: function( tooltip ) { + tooltip.remove(); + delete this.tooltips[ tooltip.attr( "id" ) ]; + }, + + _destroy: function() { + var that = this; + + // close open tooltips + $.each( this.tooltips, function( id, tooltipData ) { + // Delegate to close method to handle common cleanup + var event = $.Event( "blur" ), + element = tooltipData.element; + event.target = event.currentTarget = element[ 0 ]; + that.close( event, true ); + + // Remove immediately; destroying an open tooltip doesn't use the + // hide animation + $( "#" + id ).remove(); + + // Restore the title + if ( element.data( "ui-tooltip-title" ) ) { + // If the title attribute has changed since open(), don't restore + if ( !element.attr( "title" ) ) { + element.attr( "title", element.data( "ui-tooltip-title" ) ); + } + element.removeData( "ui-tooltip-title" ); + } + }); + this.liveRegion.remove(); + } +}); + + +/*! + * jQuery UI Effects 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/category/effects-core/ + */ + + +var dataSpace = "ui-effects-", + + // Create a local jQuery because jQuery Color relies on it and the + // global may not exist with AMD and a custom build (#10199) + jQuery = $; + +$.effects = { + effect: {} +}; + +/*! + * jQuery Color Animations v2.1.2 + * https://github.com/jquery/jquery-color + * + * Copyright 2014 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * Date: Wed Jan 16 08:47:09 2013 -0600 + */ +(function( jQuery, undefined ) { + + var stepHooks = "backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor", + + // plusequals test for += 100 -= 100 + rplusequals = /^([\-+])=\s*(\d+\.?\d*)/, + // a set of RE's that can match strings and generate color tuples. + stringParsers = [ { + re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, + parse: function( execResult ) { + return [ + execResult[ 1 ], + execResult[ 2 ], + execResult[ 3 ], + execResult[ 4 ] + ]; + } + }, { + re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, + parse: function( execResult ) { + return [ + execResult[ 1 ] * 2.55, + execResult[ 2 ] * 2.55, + execResult[ 3 ] * 2.55, + execResult[ 4 ] + ]; + } + }, { + // this regex ignores A-F because it's compared against an already lowercased string + re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/, + parse: function( execResult ) { + return [ + parseInt( execResult[ 1 ], 16 ), + parseInt( execResult[ 2 ], 16 ), + parseInt( execResult[ 3 ], 16 ) + ]; + } + }, { + // this regex ignores A-F because it's compared against an already lowercased string + re: /#([a-f0-9])([a-f0-9])([a-f0-9])/, + parse: function( execResult ) { + return [ + parseInt( execResult[ 1 ] + execResult[ 1 ], 16 ), + parseInt( execResult[ 2 ] + execResult[ 2 ], 16 ), + parseInt( execResult[ 3 ] + execResult[ 3 ], 16 ) + ]; + } + }, { + re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, + space: "hsla", + parse: function( execResult ) { + return [ + execResult[ 1 ], + execResult[ 2 ] / 100, + execResult[ 3 ] / 100, + execResult[ 4 ] + ]; + } + } ], + + // jQuery.Color( ) + color = jQuery.Color = function( color, green, blue, alpha ) { + return new jQuery.Color.fn.parse( color, green, blue, alpha ); + }, + spaces = { + rgba: { + props: { + red: { + idx: 0, + type: "byte" + }, + green: { + idx: 1, + type: "byte" + }, + blue: { + idx: 2, + type: "byte" + } + } + }, + + hsla: { + props: { + hue: { + idx: 0, + type: "degrees" + }, + saturation: { + idx: 1, + type: "percent" + }, + lightness: { + idx: 2, + type: "percent" + } + } + } + }, + propTypes = { + "byte": { + floor: true, + max: 255 + }, + "percent": { + max: 1 + }, + "degrees": { + mod: 360, + floor: true + } + }, + support = color.support = {}, + + // element for support tests + supportElem = jQuery( "<p>" )[ 0 ], + + // colors = jQuery.Color.names + colors, + + // local aliases of functions called often + each = jQuery.each; + +// determine rgba support immediately +supportElem.style.cssText = "background-color:rgba(1,1,1,.5)"; +support.rgba = supportElem.style.backgroundColor.indexOf( "rgba" ) > -1; + +// define cache name and alpha properties +// for rgba and hsla spaces +each( spaces, function( spaceName, space ) { + space.cache = "_" + spaceName; + space.props.alpha = { + idx: 3, + type: "percent", + def: 1 + }; +}); + +function clamp( value, prop, allowEmpty ) { + var type = propTypes[ prop.type ] || {}; + + if ( value == null ) { + return (allowEmpty || !prop.def) ? null : prop.def; + } + + // ~~ is an short way of doing floor for positive numbers + value = type.floor ? ~~value : parseFloat( value ); + + // IE will pass in empty strings as value for alpha, + // which will hit this case + if ( isNaN( value ) ) { + return prop.def; + } + + if ( type.mod ) { + // we add mod before modding to make sure that negatives values + // get converted properly: -10 -> 350 + return (value + type.mod) % type.mod; + } + + // for now all property types without mod have min and max + return 0 > value ? 0 : type.max < value ? type.max : value; +} + +function stringParse( string ) { + var inst = color(), + rgba = inst._rgba = []; + + string = string.toLowerCase(); + + each( stringParsers, function( i, parser ) { + var parsed, + match = parser.re.exec( string ), + values = match && parser.parse( match ), + spaceName = parser.space || "rgba"; + + if ( values ) { + parsed = inst[ spaceName ]( values ); + + // if this was an rgba parse the assignment might happen twice + // oh well.... + inst[ spaces[ spaceName ].cache ] = parsed[ spaces[ spaceName ].cache ]; + rgba = inst._rgba = parsed._rgba; + + // exit each( stringParsers ) here because we matched + return false; + } + }); + + // Found a stringParser that handled it + if ( rgba.length ) { + + // if this came from a parsed string, force "transparent" when alpha is 0 + // chrome, (and maybe others) return "transparent" as rgba(0,0,0,0) + if ( rgba.join() === "0,0,0,0" ) { + jQuery.extend( rgba, colors.transparent ); + } + return inst; + } + + // named colors + return colors[ string ]; +} + +color.fn = jQuery.extend( color.prototype, { + parse: function( red, green, blue, alpha ) { + if ( red === undefined ) { + this._rgba = [ null, null, null, null ]; + return this; + } + if ( red.jquery || red.nodeType ) { + red = jQuery( red ).css( green ); + green = undefined; + } + + var inst = this, + type = jQuery.type( red ), + rgba = this._rgba = []; + + // more than 1 argument specified - assume ( red, green, blue, alpha ) + if ( green !== undefined ) { + red = [ red, green, blue, alpha ]; + type = "array"; + } + + if ( type === "string" ) { + return this.parse( stringParse( red ) || colors._default ); + } + + if ( type === "array" ) { + each( spaces.rgba.props, function( key, prop ) { + rgba[ prop.idx ] = clamp( red[ prop.idx ], prop ); + }); + return this; + } + + if ( type === "object" ) { + if ( red instanceof color ) { + each( spaces, function( spaceName, space ) { + if ( red[ space.cache ] ) { + inst[ space.cache ] = red[ space.cache ].slice(); + } + }); + } else { + each( spaces, function( spaceName, space ) { + var cache = space.cache; + each( space.props, function( key, prop ) { + + // if the cache doesn't exist, and we know how to convert + if ( !inst[ cache ] && space.to ) { + + // if the value was null, we don't need to copy it + // if the key was alpha, we don't need to copy it either + if ( key === "alpha" || red[ key ] == null ) { + return; + } + inst[ cache ] = space.to( inst._rgba ); + } + + // this is the only case where we allow nulls for ALL properties. + // call clamp with alwaysAllowEmpty + inst[ cache ][ prop.idx ] = clamp( red[ key ], prop, true ); + }); + + // everything defined but alpha? + if ( inst[ cache ] && jQuery.inArray( null, inst[ cache ].slice( 0, 3 ) ) < 0 ) { + // use the default of 1 + inst[ cache ][ 3 ] = 1; + if ( space.from ) { + inst._rgba = space.from( inst[ cache ] ); + } + } + }); + } + return this; + } + }, + is: function( compare ) { + var is = color( compare ), + same = true, + inst = this; + + each( spaces, function( _, space ) { + var localCache, + isCache = is[ space.cache ]; + if (isCache) { + localCache = inst[ space.cache ] || space.to && space.to( inst._rgba ) || []; + each( space.props, function( _, prop ) { + if ( isCache[ prop.idx ] != null ) { + same = ( isCache[ prop.idx ] === localCache[ prop.idx ] ); + return same; + } + }); + } + return same; + }); + return same; + }, + _space: function() { + var used = [], + inst = this; + each( spaces, function( spaceName, space ) { + if ( inst[ space.cache ] ) { + used.push( spaceName ); + } + }); + return used.pop(); + }, + transition: function( other, distance ) { + var end = color( other ), + spaceName = end._space(), + space = spaces[ spaceName ], + startColor = this.alpha() === 0 ? color( "transparent" ) : this, + start = startColor[ space.cache ] || space.to( startColor._rgba ), + result = start.slice(); + + end = end[ space.cache ]; + each( space.props, function( key, prop ) { + var index = prop.idx, + startValue = start[ index ], + endValue = end[ index ], + type = propTypes[ prop.type ] || {}; + + // if null, don't override start value + if ( endValue === null ) { + return; + } + // if null - use end + if ( startValue === null ) { + result[ index ] = endValue; + } else { + if ( type.mod ) { + if ( endValue - startValue > type.mod / 2 ) { + startValue += type.mod; + } else if ( startValue - endValue > type.mod / 2 ) { + startValue -= type.mod; + } + } + result[ index ] = clamp( ( endValue - startValue ) * distance + startValue, prop ); + } + }); + return this[ spaceName ]( result ); + }, + blend: function( opaque ) { + // if we are already opaque - return ourself + if ( this._rgba[ 3 ] === 1 ) { + return this; + } + + var rgb = this._rgba.slice(), + a = rgb.pop(), + blend = color( opaque )._rgba; + + return color( jQuery.map( rgb, function( v, i ) { + return ( 1 - a ) * blend[ i ] + a * v; + })); + }, + toRgbaString: function() { + var prefix = "rgba(", + rgba = jQuery.map( this._rgba, function( v, i ) { + return v == null ? ( i > 2 ? 1 : 0 ) : v; + }); + + if ( rgba[ 3 ] === 1 ) { + rgba.pop(); + prefix = "rgb("; + } + + return prefix + rgba.join() + ")"; + }, + toHslaString: function() { + var prefix = "hsla(", + hsla = jQuery.map( this.hsla(), function( v, i ) { + if ( v == null ) { + v = i > 2 ? 1 : 0; + } + + // catch 1 and 2 + if ( i && i < 3 ) { + v = Math.round( v * 100 ) + "%"; + } + return v; + }); + + if ( hsla[ 3 ] === 1 ) { + hsla.pop(); + prefix = "hsl("; + } + return prefix + hsla.join() + ")"; + }, + toHexString: function( includeAlpha ) { + var rgba = this._rgba.slice(), + alpha = rgba.pop(); + + if ( includeAlpha ) { + rgba.push( ~~( alpha * 255 ) ); + } + + return "#" + jQuery.map( rgba, function( v ) { + + // default to 0 when nulls exist + v = ( v || 0 ).toString( 16 ); + return v.length === 1 ? "0" + v : v; + }).join(""); + }, + toString: function() { + return this._rgba[ 3 ] === 0 ? "transparent" : this.toRgbaString(); + } +}); +color.fn.parse.prototype = color.fn; + +// hsla conversions adapted from: +// https://code.google.com/p/maashaack/source/browse/packages/graphics/trunk/src/graphics/colors/HUE2RGB.as?r=5021 + +function hue2rgb( p, q, h ) { + h = ( h + 1 ) % 1; + if ( h * 6 < 1 ) { + return p + ( q - p ) * h * 6; + } + if ( h * 2 < 1) { + return q; + } + if ( h * 3 < 2 ) { + return p + ( q - p ) * ( ( 2 / 3 ) - h ) * 6; + } + return p; +} + +spaces.hsla.to = function( rgba ) { + if ( rgba[ 0 ] == null || rgba[ 1 ] == null || rgba[ 2 ] == null ) { + return [ null, null, null, rgba[ 3 ] ]; + } + var r = rgba[ 0 ] / 255, + g = rgba[ 1 ] / 255, + b = rgba[ 2 ] / 255, + a = rgba[ 3 ], + max = Math.max( r, g, b ), + min = Math.min( r, g, b ), + diff = max - min, + add = max + min, + l = add * 0.5, + h, s; + + if ( min === max ) { + h = 0; + } else if ( r === max ) { + h = ( 60 * ( g - b ) / diff ) + 360; + } else if ( g === max ) { + h = ( 60 * ( b - r ) / diff ) + 120; + } else { + h = ( 60 * ( r - g ) / diff ) + 240; + } + + // chroma (diff) == 0 means greyscale which, by definition, saturation = 0% + // otherwise, saturation is based on the ratio of chroma (diff) to lightness (add) + if ( diff === 0 ) { + s = 0; + } else if ( l <= 0.5 ) { + s = diff / add; + } else { + s = diff / ( 2 - add ); + } + return [ Math.round(h) % 360, s, l, a == null ? 1 : a ]; +}; + +spaces.hsla.from = function( hsla ) { + if ( hsla[ 0 ] == null || hsla[ 1 ] == null || hsla[ 2 ] == null ) { + return [ null, null, null, hsla[ 3 ] ]; + } + var h = hsla[ 0 ] / 360, + s = hsla[ 1 ], + l = hsla[ 2 ], + a = hsla[ 3 ], + q = l <= 0.5 ? l * ( 1 + s ) : l + s - l * s, + p = 2 * l - q; + + return [ + Math.round( hue2rgb( p, q, h + ( 1 / 3 ) ) * 255 ), + Math.round( hue2rgb( p, q, h ) * 255 ), + Math.round( hue2rgb( p, q, h - ( 1 / 3 ) ) * 255 ), + a + ]; +}; + +each( spaces, function( spaceName, space ) { + var props = space.props, + cache = space.cache, + to = space.to, + from = space.from; + + // makes rgba() and hsla() + color.fn[ spaceName ] = function( value ) { + + // generate a cache for this space if it doesn't exist + if ( to && !this[ cache ] ) { + this[ cache ] = to( this._rgba ); + } + if ( value === undefined ) { + return this[ cache ].slice(); + } + + var ret, + type = jQuery.type( value ), + arr = ( type === "array" || type === "object" ) ? value : arguments, + local = this[ cache ].slice(); + + each( props, function( key, prop ) { + var val = arr[ type === "object" ? key : prop.idx ]; + if ( val == null ) { + val = local[ prop.idx ]; + } + local[ prop.idx ] = clamp( val, prop ); + }); + + if ( from ) { + ret = color( from( local ) ); + ret[ cache ] = local; + return ret; + } else { + return color( local ); + } + }; + + // makes red() green() blue() alpha() hue() saturation() lightness() + each( props, function( key, prop ) { + // alpha is included in more than one space + if ( color.fn[ key ] ) { + return; + } + color.fn[ key ] = function( value ) { + var vtype = jQuery.type( value ), + fn = ( key === "alpha" ? ( this._hsla ? "hsla" : "rgba" ) : spaceName ), + local = this[ fn ](), + cur = local[ prop.idx ], + match; + + if ( vtype === "undefined" ) { + return cur; + } + + if ( vtype === "function" ) { + value = value.call( this, cur ); + vtype = jQuery.type( value ); + } + if ( value == null && prop.empty ) { + return this; + } + if ( vtype === "string" ) { + match = rplusequals.exec( value ); + if ( match ) { + value = cur + parseFloat( match[ 2 ] ) * ( match[ 1 ] === "+" ? 1 : -1 ); + } + } + local[ prop.idx ] = value; + return this[ fn ]( local ); + }; + }); +}); + +// add cssHook and .fx.step function for each named hook. +// accept a space separated string of properties +color.hook = function( hook ) { + var hooks = hook.split( " " ); + each( hooks, function( i, hook ) { + jQuery.cssHooks[ hook ] = { + set: function( elem, value ) { + var parsed, curElem, + backgroundColor = ""; + + if ( value !== "transparent" && ( jQuery.type( value ) !== "string" || ( parsed = stringParse( value ) ) ) ) { + value = color( parsed || value ); + if ( !support.rgba && value._rgba[ 3 ] !== 1 ) { + curElem = hook === "backgroundColor" ? elem.parentNode : elem; + while ( + (backgroundColor === "" || backgroundColor === "transparent") && + curElem && curElem.style + ) { + try { + backgroundColor = jQuery.css( curElem, "backgroundColor" ); + curElem = curElem.parentNode; + } catch ( e ) { + } + } + + value = value.blend( backgroundColor && backgroundColor !== "transparent" ? + backgroundColor : + "_default" ); + } + + value = value.toRgbaString(); + } + try { + elem.style[ hook ] = value; + } catch ( e ) { + // wrapped to prevent IE from throwing errors on "invalid" values like 'auto' or 'inherit' + } + } + }; + jQuery.fx.step[ hook ] = function( fx ) { + if ( !fx.colorInit ) { + fx.start = color( fx.elem, hook ); + fx.end = color( fx.end ); + fx.colorInit = true; + } + jQuery.cssHooks[ hook ].set( fx.elem, fx.start.transition( fx.end, fx.pos ) ); + }; + }); + +}; + +color.hook( stepHooks ); + +jQuery.cssHooks.borderColor = { + expand: function( value ) { + var expanded = {}; + + each( [ "Top", "Right", "Bottom", "Left" ], function( i, part ) { + expanded[ "border" + part + "Color" ] = value; + }); + return expanded; + } +}; + +// Basic color names only. +// Usage of any of the other color names requires adding yourself or including +// jquery.color.svg-names.js. +colors = jQuery.Color.names = { + // 4.1. Basic color keywords + aqua: "#00ffff", + black: "#000000", + blue: "#0000ff", + fuchsia: "#ff00ff", + gray: "#808080", + green: "#008000", + lime: "#00ff00", + maroon: "#800000", + navy: "#000080", + olive: "#808000", + purple: "#800080", + red: "#ff0000", + silver: "#c0c0c0", + teal: "#008080", + white: "#ffffff", + yellow: "#ffff00", + + // 4.2.3. "transparent" color keyword + transparent: [ null, null, null, 0 ], + + _default: "#ffffff" +}; + +})( jQuery ); + +/******************************************************************************/ +/****************************** CLASS ANIMATIONS ******************************/ +/******************************************************************************/ +(function() { + +var classAnimationActions = [ "add", "remove", "toggle" ], + shorthandStyles = { + border: 1, + borderBottom: 1, + borderColor: 1, + borderLeft: 1, + borderRight: 1, + borderTop: 1, + borderWidth: 1, + margin: 1, + padding: 1 + }; + +$.each([ "borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopStyle" ], function( _, prop ) { + $.fx.step[ prop ] = function( fx ) { + if ( fx.end !== "none" && !fx.setAttr || fx.pos === 1 && !fx.setAttr ) { + jQuery.style( fx.elem, prop, fx.end ); + fx.setAttr = true; + } + }; +}); + +function getElementStyles( elem ) { + var key, len, + style = elem.ownerDocument.defaultView ? + elem.ownerDocument.defaultView.getComputedStyle( elem, null ) : + elem.currentStyle, + styles = {}; + + if ( style && style.length && style[ 0 ] && style[ style[ 0 ] ] ) { + len = style.length; + while ( len-- ) { + key = style[ len ]; + if ( typeof style[ key ] === "string" ) { + styles[ $.camelCase( key ) ] = style[ key ]; + } + } + // support: Opera, IE <9 + } else { + for ( key in style ) { + if ( typeof style[ key ] === "string" ) { + styles[ key ] = style[ key ]; + } + } + } + + return styles; +} + +function styleDifference( oldStyle, newStyle ) { + var diff = {}, + name, value; + + for ( name in newStyle ) { + value = newStyle[ name ]; + if ( oldStyle[ name ] !== value ) { + if ( !shorthandStyles[ name ] ) { + if ( $.fx.step[ name ] || !isNaN( parseFloat( value ) ) ) { + diff[ name ] = value; + } + } + } + } + + return diff; +} + +// support: jQuery <1.8 +if ( !$.fn.addBack ) { + $.fn.addBack = function( selector ) { + return this.add( selector == null ? + this.prevObject : this.prevObject.filter( selector ) + ); + }; +} + +$.effects.animateClass = function( value, duration, easing, callback ) { + var o = $.speed( duration, easing, callback ); + + return this.queue( function() { + var animated = $( this ), + baseClass = animated.attr( "class" ) || "", + applyClassChange, + allAnimations = o.children ? animated.find( "*" ).addBack() : animated; + + // map the animated objects to store the original styles. + allAnimations = allAnimations.map(function() { + var el = $( this ); + return { + el: el, + start: getElementStyles( this ) + }; + }); + + // apply class change + applyClassChange = function() { + $.each( classAnimationActions, function(i, action) { + if ( value[ action ] ) { + animated[ action + "Class" ]( value[ action ] ); + } + }); + }; + applyClassChange(); + + // map all animated objects again - calculate new styles and diff + allAnimations = allAnimations.map(function() { + this.end = getElementStyles( this.el[ 0 ] ); + this.diff = styleDifference( this.start, this.end ); + return this; + }); + + // apply original class + animated.attr( "class", baseClass ); + + // map all animated objects again - this time collecting a promise + allAnimations = allAnimations.map(function() { + var styleInfo = this, + dfd = $.Deferred(), + opts = $.extend({}, o, { + queue: false, + complete: function() { + dfd.resolve( styleInfo ); + } + }); + + this.el.animate( this.diff, opts ); + return dfd.promise(); + }); + + // once all animations have completed: + $.when.apply( $, allAnimations.get() ).done(function() { + + // set the final class + applyClassChange(); + + // for each animated element, + // clear all css properties that were animated + $.each( arguments, function() { + var el = this.el; + $.each( this.diff, function(key) { + el.css( key, "" ); + }); + }); + + // this is guarnteed to be there if you use jQuery.speed() + // it also handles dequeuing the next anim... + o.complete.call( animated[ 0 ] ); + }); + }); +}; + +$.fn.extend({ + addClass: (function( orig ) { + return function( classNames, speed, easing, callback ) { + return speed ? + $.effects.animateClass.call( this, + { add: classNames }, speed, easing, callback ) : + orig.apply( this, arguments ); + }; + })( $.fn.addClass ), + + removeClass: (function( orig ) { + return function( classNames, speed, easing, callback ) { + return arguments.length > 1 ? + $.effects.animateClass.call( this, + { remove: classNames }, speed, easing, callback ) : + orig.apply( this, arguments ); + }; + })( $.fn.removeClass ), + + toggleClass: (function( orig ) { + return function( classNames, force, speed, easing, callback ) { + if ( typeof force === "boolean" || force === undefined ) { + if ( !speed ) { + // without speed parameter + return orig.apply( this, arguments ); + } else { + return $.effects.animateClass.call( this, + (force ? { add: classNames } : { remove: classNames }), + speed, easing, callback ); + } + } else { + // without force parameter + return $.effects.animateClass.call( this, + { toggle: classNames }, force, speed, easing ); + } + }; + })( $.fn.toggleClass ), + + switchClass: function( remove, add, speed, easing, callback) { + return $.effects.animateClass.call( this, { + add: add, + remove: remove + }, speed, easing, callback ); + } +}); + +})(); + +/******************************************************************************/ +/*********************************** EFFECTS **********************************/ +/******************************************************************************/ + +(function() { + +$.extend( $.effects, { + version: "1.11.4", + + // Saves a set of properties in a data storage + save: function( element, set ) { + for ( var i = 0; i < set.length; i++ ) { + if ( set[ i ] !== null ) { + element.data( dataSpace + set[ i ], element[ 0 ].style[ set[ i ] ] ); + } + } + }, + + // Restores a set of previously saved properties from a data storage + restore: function( element, set ) { + var val, i; + for ( i = 0; i < set.length; i++ ) { + if ( set[ i ] !== null ) { + val = element.data( dataSpace + set[ i ] ); + // support: jQuery 1.6.2 + // http://bugs.jquery.com/ticket/9917 + // jQuery 1.6.2 incorrectly returns undefined for any falsy value. + // We can't differentiate between "" and 0 here, so we just assume + // empty string since it's likely to be a more common value... + if ( val === undefined ) { + val = ""; + } + element.css( set[ i ], val ); + } + } + }, + + setMode: function( el, mode ) { + if (mode === "toggle") { + mode = el.is( ":hidden" ) ? "show" : "hide"; + } + return mode; + }, + + // Translates a [top,left] array into a baseline value + // this should be a little more flexible in the future to handle a string & hash + getBaseline: function( origin, original ) { + var y, x; + switch ( origin[ 0 ] ) { + case "top": y = 0; break; + case "middle": y = 0.5; break; + case "bottom": y = 1; break; + default: y = origin[ 0 ] / original.height; + } + switch ( origin[ 1 ] ) { + case "left": x = 0; break; + case "center": x = 0.5; break; + case "right": x = 1; break; + default: x = origin[ 1 ] / original.width; + } + return { + x: x, + y: y + }; + }, + + // Wraps the element around a wrapper that copies position properties + createWrapper: function( element ) { + + // if the element is already wrapped, return it + if ( element.parent().is( ".ui-effects-wrapper" )) { + return element.parent(); + } + + // wrap the element + var props = { + width: element.outerWidth(true), + height: element.outerHeight(true), + "float": element.css( "float" ) + }, + wrapper = $( "<div></div>" ) + .addClass( "ui-effects-wrapper" ) + .css({ + fontSize: "100%", + background: "transparent", + border: "none", + margin: 0, + padding: 0 + }), + // Store the size in case width/height are defined in % - Fixes #5245 + size = { + width: element.width(), + height: element.height() + }, + active = document.activeElement; + + // support: Firefox + // Firefox incorrectly exposes anonymous content + // https://bugzilla.mozilla.org/show_bug.cgi?id=561664 + try { + active.id; + } catch ( e ) { + active = document.body; + } + + element.wrap( wrapper ); + + // Fixes #7595 - Elements lose focus when wrapped. + if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) { + $( active ).focus(); + } + + wrapper = element.parent(); //Hotfix for jQuery 1.4 since some change in wrap() seems to actually lose the reference to the wrapped element + + // transfer positioning properties to the wrapper + if ( element.css( "position" ) === "static" ) { + wrapper.css({ position: "relative" }); + element.css({ position: "relative" }); + } else { + $.extend( props, { + position: element.css( "position" ), + zIndex: element.css( "z-index" ) + }); + $.each([ "top", "left", "bottom", "right" ], function(i, pos) { + props[ pos ] = element.css( pos ); + if ( isNaN( parseInt( props[ pos ], 10 ) ) ) { + props[ pos ] = "auto"; + } + }); + element.css({ + position: "relative", + top: 0, + left: 0, + right: "auto", + bottom: "auto" + }); + } + element.css(size); + + return wrapper.css( props ).show(); + }, + + removeWrapper: function( element ) { + var active = document.activeElement; + + if ( element.parent().is( ".ui-effects-wrapper" ) ) { + element.parent().replaceWith( element ); + + // Fixes #7595 - Elements lose focus when wrapped. + if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) { + $( active ).focus(); + } + } + + return element; + }, + + setTransition: function( element, list, factor, value ) { + value = value || {}; + $.each( list, function( i, x ) { + var unit = element.cssUnit( x ); + if ( unit[ 0 ] > 0 ) { + value[ x ] = unit[ 0 ] * factor + unit[ 1 ]; + } + }); + return value; + } +}); + +// return an effect options object for the given parameters: +function _normalizeArguments( effect, options, speed, callback ) { + + // allow passing all options as the first parameter + if ( $.isPlainObject( effect ) ) { + options = effect; + effect = effect.effect; + } + + // convert to an object + effect = { effect: effect }; + + // catch (effect, null, ...) + if ( options == null ) { + options = {}; + } + + // catch (effect, callback) + if ( $.isFunction( options ) ) { + callback = options; + speed = null; + options = {}; + } + + // catch (effect, speed, ?) + if ( typeof options === "number" || $.fx.speeds[ options ] ) { + callback = speed; + speed = options; + options = {}; + } + + // catch (effect, options, callback) + if ( $.isFunction( speed ) ) { + callback = speed; + speed = null; + } + + // add options to effect + if ( options ) { + $.extend( effect, options ); + } + + speed = speed || options.duration; + effect.duration = $.fx.off ? 0 : + typeof speed === "number" ? speed : + speed in $.fx.speeds ? $.fx.speeds[ speed ] : + $.fx.speeds._default; + + effect.complete = callback || options.complete; + + return effect; +} + +function standardAnimationOption( option ) { + // Valid standard speeds (nothing, number, named speed) + if ( !option || typeof option === "number" || $.fx.speeds[ option ] ) { + return true; + } + + // Invalid strings - treat as "normal" speed + if ( typeof option === "string" && !$.effects.effect[ option ] ) { + return true; + } + + // Complete callback + if ( $.isFunction( option ) ) { + return true; + } + + // Options hash (but not naming an effect) + if ( typeof option === "object" && !option.effect ) { + return true; + } + + // Didn't match any standard API + return false; +} + +$.fn.extend({ + effect: function( /* effect, options, speed, callback */ ) { + var args = _normalizeArguments.apply( this, arguments ), + mode = args.mode, + queue = args.queue, + effectMethod = $.effects.effect[ args.effect ]; + + if ( $.fx.off || !effectMethod ) { + // delegate to the original method (e.g., .show()) if possible + if ( mode ) { + return this[ mode ]( args.duration, args.complete ); + } else { + return this.each( function() { + if ( args.complete ) { + args.complete.call( this ); + } + }); + } + } + + function run( next ) { + var elem = $( this ), + complete = args.complete, + mode = args.mode; + + function done() { + if ( $.isFunction( complete ) ) { + complete.call( elem[0] ); + } + if ( $.isFunction( next ) ) { + next(); + } + } + + // If the element already has the correct final state, delegate to + // the core methods so the internal tracking of "olddisplay" works. + if ( elem.is( ":hidden" ) ? mode === "hide" : mode === "show" ) { + elem[ mode ](); + done(); + } else { + effectMethod.call( elem[0], args, done ); + } + } + + return queue === false ? this.each( run ) : this.queue( queue || "fx", run ); + }, + + show: (function( orig ) { + return function( option ) { + if ( standardAnimationOption( option ) ) { + return orig.apply( this, arguments ); + } else { + var args = _normalizeArguments.apply( this, arguments ); + args.mode = "show"; + return this.effect.call( this, args ); + } + }; + })( $.fn.show ), + + hide: (function( orig ) { + return function( option ) { + if ( standardAnimationOption( option ) ) { + return orig.apply( this, arguments ); + } else { + var args = _normalizeArguments.apply( this, arguments ); + args.mode = "hide"; + return this.effect.call( this, args ); + } + }; + })( $.fn.hide ), + + toggle: (function( orig ) { + return function( option ) { + if ( standardAnimationOption( option ) || typeof option === "boolean" ) { + return orig.apply( this, arguments ); + } else { + var args = _normalizeArguments.apply( this, arguments ); + args.mode = "toggle"; + return this.effect.call( this, args ); + } + }; + })( $.fn.toggle ), + + // helper functions + cssUnit: function(key) { + var style = this.css( key ), + val = []; + + $.each( [ "em", "px", "%", "pt" ], function( i, unit ) { + if ( style.indexOf( unit ) > 0 ) { + val = [ parseFloat( style ), unit ]; + } + }); + return val; + } +}); + +})(); + +/******************************************************************************/ +/*********************************** EASING ***********************************/ +/******************************************************************************/ + +(function() { + +// based on easing equations from Robert Penner (http://www.robertpenner.com/easing) + +var baseEasings = {}; + +$.each( [ "Quad", "Cubic", "Quart", "Quint", "Expo" ], function( i, name ) { + baseEasings[ name ] = function( p ) { + return Math.pow( p, i + 2 ); + }; +}); + +$.extend( baseEasings, { + Sine: function( p ) { + return 1 - Math.cos( p * Math.PI / 2 ); + }, + Circ: function( p ) { + return 1 - Math.sqrt( 1 - p * p ); + }, + Elastic: function( p ) { + return p === 0 || p === 1 ? p : + -Math.pow( 2, 8 * (p - 1) ) * Math.sin( ( (p - 1) * 80 - 7.5 ) * Math.PI / 15 ); + }, + Back: function( p ) { + return p * p * ( 3 * p - 2 ); + }, + Bounce: function( p ) { + var pow2, + bounce = 4; + + while ( p < ( ( pow2 = Math.pow( 2, --bounce ) ) - 1 ) / 11 ) {} + return 1 / Math.pow( 4, 3 - bounce ) - 7.5625 * Math.pow( ( pow2 * 3 - 2 ) / 22 - p, 2 ); + } +}); + +$.each( baseEasings, function( name, easeIn ) { + $.easing[ "easeIn" + name ] = easeIn; + $.easing[ "easeOut" + name ] = function( p ) { + return 1 - easeIn( 1 - p ); + }; + $.easing[ "easeInOut" + name ] = function( p ) { + return p < 0.5 ? + easeIn( p * 2 ) / 2 : + 1 - easeIn( p * -2 + 2 ) / 2; + }; +}); + +})(); + +var effect = $.effects; + + +/*! + * jQuery UI Effects Blind 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/blind-effect/ + */ + + +var effectBlind = $.effects.effect.blind = function( o, done ) { + // Create element + var el = $( this ), + rvertical = /up|down|vertical/, + rpositivemotion = /up|left|vertical|horizontal/, + props = [ "position", "top", "bottom", "left", "right", "height", "width" ], + mode = $.effects.setMode( el, o.mode || "hide" ), + direction = o.direction || "up", + vertical = rvertical.test( direction ), + ref = vertical ? "height" : "width", + ref2 = vertical ? "top" : "left", + motion = rpositivemotion.test( direction ), + animation = {}, + show = mode === "show", + wrapper, distance, margin; + + // if already wrapped, the wrapper's properties are my property. #6245 + if ( el.parent().is( ".ui-effects-wrapper" ) ) { + $.effects.save( el.parent(), props ); + } else { + $.effects.save( el, props ); + } + el.show(); + wrapper = $.effects.createWrapper( el ).css({ + overflow: "hidden" + }); + + distance = wrapper[ ref ](); + margin = parseFloat( wrapper.css( ref2 ) ) || 0; + + animation[ ref ] = show ? distance : 0; + if ( !motion ) { + el + .css( vertical ? "bottom" : "right", 0 ) + .css( vertical ? "top" : "left", "auto" ) + .css({ position: "absolute" }); + + animation[ ref2 ] = show ? margin : distance + margin; + } + + // start at 0 if we are showing + if ( show ) { + wrapper.css( ref, 0 ); + if ( !motion ) { + wrapper.css( ref2, margin + distance ); + } + } + + // Animate + wrapper.animate( animation, { + duration: o.duration, + easing: o.easing, + queue: false, + complete: function() { + if ( mode === "hide" ) { + el.hide(); + } + $.effects.restore( el, props ); + $.effects.removeWrapper( el ); + done(); + } + }); +}; + + +/*! + * jQuery UI Effects Bounce 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/bounce-effect/ + */ + + +var effectBounce = $.effects.effect.bounce = function( o, done ) { + var el = $( this ), + props = [ "position", "top", "bottom", "left", "right", "height", "width" ], + + // defaults: + mode = $.effects.setMode( el, o.mode || "effect" ), + hide = mode === "hide", + show = mode === "show", + direction = o.direction || "up", + distance = o.distance, + times = o.times || 5, + + // number of internal animations + anims = times * 2 + ( show || hide ? 1 : 0 ), + speed = o.duration / anims, + easing = o.easing, + + // utility: + ref = ( direction === "up" || direction === "down" ) ? "top" : "left", + motion = ( direction === "up" || direction === "left" ), + i, + upAnim, + downAnim, + + // we will need to re-assemble the queue to stack our animations in place + queue = el.queue(), + queuelen = queue.length; + + // Avoid touching opacity to prevent clearType and PNG issues in IE + if ( show || hide ) { + props.push( "opacity" ); + } + + $.effects.save( el, props ); + el.show(); + $.effects.createWrapper( el ); // Create Wrapper + + // default distance for the BIGGEST bounce is the outer Distance / 3 + if ( !distance ) { + distance = el[ ref === "top" ? "outerHeight" : "outerWidth" ]() / 3; + } + + if ( show ) { + downAnim = { opacity: 1 }; + downAnim[ ref ] = 0; + + // if we are showing, force opacity 0 and set the initial position + // then do the "first" animation + el.css( "opacity", 0 ) + .css( ref, motion ? -distance * 2 : distance * 2 ) + .animate( downAnim, speed, easing ); + } + + // start at the smallest distance if we are hiding + if ( hide ) { + distance = distance / Math.pow( 2, times - 1 ); + } + + downAnim = {}; + downAnim[ ref ] = 0; + // Bounces up/down/left/right then back to 0 -- times * 2 animations happen here + for ( i = 0; i < times; i++ ) { + upAnim = {}; + upAnim[ ref ] = ( motion ? "-=" : "+=" ) + distance; + + el.animate( upAnim, speed, easing ) + .animate( downAnim, speed, easing ); + + distance = hide ? distance * 2 : distance / 2; + } + + // Last Bounce when Hiding + if ( hide ) { + upAnim = { opacity: 0 }; + upAnim[ ref ] = ( motion ? "-=" : "+=" ) + distance; + + el.animate( upAnim, speed, easing ); + } + + el.queue(function() { + if ( hide ) { + el.hide(); + } + $.effects.restore( el, props ); + $.effects.removeWrapper( el ); + done(); + }); + + // inject all the animations we just queued to be first in line (after "inprogress") + if ( queuelen > 1) { + queue.splice.apply( queue, + [ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) ); + } + el.dequeue(); + +}; + + +/*! + * jQuery UI Effects Clip 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/clip-effect/ + */ + + +var effectClip = $.effects.effect.clip = function( o, done ) { + // Create element + var el = $( this ), + props = [ "position", "top", "bottom", "left", "right", "height", "width" ], + mode = $.effects.setMode( el, o.mode || "hide" ), + show = mode === "show", + direction = o.direction || "vertical", + vert = direction === "vertical", + size = vert ? "height" : "width", + position = vert ? "top" : "left", + animation = {}, + wrapper, animate, distance; + + // Save & Show + $.effects.save( el, props ); + el.show(); + + // Create Wrapper + wrapper = $.effects.createWrapper( el ).css({ + overflow: "hidden" + }); + animate = ( el[0].tagName === "IMG" ) ? wrapper : el; + distance = animate[ size ](); + + // Shift + if ( show ) { + animate.css( size, 0 ); + animate.css( position, distance / 2 ); + } + + // Create Animation Object: + animation[ size ] = show ? distance : 0; + animation[ position ] = show ? 0 : distance / 2; + + // Animate + animate.animate( animation, { + queue: false, + duration: o.duration, + easing: o.easing, + complete: function() { + if ( !show ) { + el.hide(); + } + $.effects.restore( el, props ); + $.effects.removeWrapper( el ); + done(); + } + }); + +}; + + +/*! + * jQuery UI Effects Drop 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/drop-effect/ + */ + + +var effectDrop = $.effects.effect.drop = function( o, done ) { + + var el = $( this ), + props = [ "position", "top", "bottom", "left", "right", "opacity", "height", "width" ], + mode = $.effects.setMode( el, o.mode || "hide" ), + show = mode === "show", + direction = o.direction || "left", + ref = ( direction === "up" || direction === "down" ) ? "top" : "left", + motion = ( direction === "up" || direction === "left" ) ? "pos" : "neg", + animation = { + opacity: show ? 1 : 0 + }, + distance; + + // Adjust + $.effects.save( el, props ); + el.show(); + $.effects.createWrapper( el ); + + distance = o.distance || el[ ref === "top" ? "outerHeight" : "outerWidth" ]( true ) / 2; + + if ( show ) { + el + .css( "opacity", 0 ) + .css( ref, motion === "pos" ? -distance : distance ); + } + + // Animation + animation[ ref ] = ( show ? + ( motion === "pos" ? "+=" : "-=" ) : + ( motion === "pos" ? "-=" : "+=" ) ) + + distance; + + // Animate + el.animate( animation, { + queue: false, + duration: o.duration, + easing: o.easing, + complete: function() { + if ( mode === "hide" ) { + el.hide(); + } + $.effects.restore( el, props ); + $.effects.removeWrapper( el ); + done(); + } + }); +}; + + +/*! + * jQuery UI Effects Explode 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/explode-effect/ + */ + + +var effectExplode = $.effects.effect.explode = function( o, done ) { + + var rows = o.pieces ? Math.round( Math.sqrt( o.pieces ) ) : 3, + cells = rows, + el = $( this ), + mode = $.effects.setMode( el, o.mode || "hide" ), + show = mode === "show", + + // show and then visibility:hidden the element before calculating offset + offset = el.show().css( "visibility", "hidden" ).offset(), + + // width and height of a piece + width = Math.ceil( el.outerWidth() / cells ), + height = Math.ceil( el.outerHeight() / rows ), + pieces = [], + + // loop + i, j, left, top, mx, my; + + // children animate complete: + function childComplete() { + pieces.push( this ); + if ( pieces.length === rows * cells ) { + animComplete(); + } + } + + // clone the element for each row and cell. + for ( i = 0; i < rows ; i++ ) { // ===> + top = offset.top + i * height; + my = i - ( rows - 1 ) / 2 ; + + for ( j = 0; j < cells ; j++ ) { // ||| + left = offset.left + j * width; + mx = j - ( cells - 1 ) / 2 ; + + // Create a clone of the now hidden main element that will be absolute positioned + // within a wrapper div off the -left and -top equal to size of our pieces + el + .clone() + .appendTo( "body" ) + .wrap( "<div></div>" ) + .css({ + position: "absolute", + visibility: "visible", + left: -j * width, + top: -i * height + }) + + // select the wrapper - make it overflow: hidden and absolute positioned based on + // where the original was located +left and +top equal to the size of pieces + .parent() + .addClass( "ui-effects-explode" ) + .css({ + position: "absolute", + overflow: "hidden", + width: width, + height: height, + left: left + ( show ? mx * width : 0 ), + top: top + ( show ? my * height : 0 ), + opacity: show ? 0 : 1 + }).animate({ + left: left + ( show ? 0 : mx * width ), + top: top + ( show ? 0 : my * height ), + opacity: show ? 1 : 0 + }, o.duration || 500, o.easing, childComplete ); + } + } + + function animComplete() { + el.css({ + visibility: "visible" + }); + $( pieces ).remove(); + if ( !show ) { + el.hide(); + } + done(); + } +}; + + +/*! + * jQuery UI Effects Fade 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/fade-effect/ + */ + + +var effectFade = $.effects.effect.fade = function( o, done ) { + var el = $( this ), + mode = $.effects.setMode( el, o.mode || "toggle" ); + + el.animate({ + opacity: mode + }, { + queue: false, + duration: o.duration, + easing: o.easing, + complete: done + }); +}; + + +/*! + * jQuery UI Effects Fold 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/fold-effect/ + */ + + +var effectFold = $.effects.effect.fold = function( o, done ) { + + // Create element + var el = $( this ), + props = [ "position", "top", "bottom", "left", "right", "height", "width" ], + mode = $.effects.setMode( el, o.mode || "hide" ), + show = mode === "show", + hide = mode === "hide", + size = o.size || 15, + percent = /([0-9]+)%/.exec( size ), + horizFirst = !!o.horizFirst, + widthFirst = show !== horizFirst, + ref = widthFirst ? [ "width", "height" ] : [ "height", "width" ], + duration = o.duration / 2, + wrapper, distance, + animation1 = {}, + animation2 = {}; + + $.effects.save( el, props ); + el.show(); + + // Create Wrapper + wrapper = $.effects.createWrapper( el ).css({ + overflow: "hidden" + }); + distance = widthFirst ? + [ wrapper.width(), wrapper.height() ] : + [ wrapper.height(), wrapper.width() ]; + + if ( percent ) { + size = parseInt( percent[ 1 ], 10 ) / 100 * distance[ hide ? 0 : 1 ]; + } + if ( show ) { + wrapper.css( horizFirst ? { + height: 0, + width: size + } : { + height: size, + width: 0 + }); + } + + // Animation + animation1[ ref[ 0 ] ] = show ? distance[ 0 ] : size; + animation2[ ref[ 1 ] ] = show ? distance[ 1 ] : 0; + + // Animate + wrapper + .animate( animation1, duration, o.easing ) + .animate( animation2, duration, o.easing, function() { + if ( hide ) { + el.hide(); + } + $.effects.restore( el, props ); + $.effects.removeWrapper( el ); + done(); + }); + +}; + + +/*! + * jQuery UI Effects Highlight 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/highlight-effect/ + */ + + +var effectHighlight = $.effects.effect.highlight = function( o, done ) { + var elem = $( this ), + props = [ "backgroundImage", "backgroundColor", "opacity" ], + mode = $.effects.setMode( elem, o.mode || "show" ), + animation = { + backgroundColor: elem.css( "backgroundColor" ) + }; + + if (mode === "hide") { + animation.opacity = 0; + } + + $.effects.save( elem, props ); + + elem + .show() + .css({ + backgroundImage: "none", + backgroundColor: o.color || "#ffff99" + }) + .animate( animation, { + queue: false, + duration: o.duration, + easing: o.easing, + complete: function() { + if ( mode === "hide" ) { + elem.hide(); + } + $.effects.restore( elem, props ); + done(); + } + }); +}; + + +/*! + * jQuery UI Effects Size 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/size-effect/ + */ + + +var effectSize = $.effects.effect.size = function( o, done ) { + + // Create element + var original, baseline, factor, + el = $( this ), + props0 = [ "position", "top", "bottom", "left", "right", "width", "height", "overflow", "opacity" ], + + // Always restore + props1 = [ "position", "top", "bottom", "left", "right", "overflow", "opacity" ], + + // Copy for children + props2 = [ "width", "height", "overflow" ], + cProps = [ "fontSize" ], + vProps = [ "borderTopWidth", "borderBottomWidth", "paddingTop", "paddingBottom" ], + hProps = [ "borderLeftWidth", "borderRightWidth", "paddingLeft", "paddingRight" ], + + // Set options + mode = $.effects.setMode( el, o.mode || "effect" ), + restore = o.restore || mode !== "effect", + scale = o.scale || "both", + origin = o.origin || [ "middle", "center" ], + position = el.css( "position" ), + props = restore ? props0 : props1, + zero = { + height: 0, + width: 0, + outerHeight: 0, + outerWidth: 0 + }; + + if ( mode === "show" ) { + el.show(); + } + original = { + height: el.height(), + width: el.width(), + outerHeight: el.outerHeight(), + outerWidth: el.outerWidth() + }; + + if ( o.mode === "toggle" && mode === "show" ) { + el.from = o.to || zero; + el.to = o.from || original; + } else { + el.from = o.from || ( mode === "show" ? zero : original ); + el.to = o.to || ( mode === "hide" ? zero : original ); + } + + // Set scaling factor + factor = { + from: { + y: el.from.height / original.height, + x: el.from.width / original.width + }, + to: { + y: el.to.height / original.height, + x: el.to.width / original.width + } + }; + + // Scale the css box + if ( scale === "box" || scale === "both" ) { + + // Vertical props scaling + if ( factor.from.y !== factor.to.y ) { + props = props.concat( vProps ); + el.from = $.effects.setTransition( el, vProps, factor.from.y, el.from ); + el.to = $.effects.setTransition( el, vProps, factor.to.y, el.to ); + } + + // Horizontal props scaling + if ( factor.from.x !== factor.to.x ) { + props = props.concat( hProps ); + el.from = $.effects.setTransition( el, hProps, factor.from.x, el.from ); + el.to = $.effects.setTransition( el, hProps, factor.to.x, el.to ); + } + } + + // Scale the content + if ( scale === "content" || scale === "both" ) { + + // Vertical props scaling + if ( factor.from.y !== factor.to.y ) { + props = props.concat( cProps ).concat( props2 ); + el.from = $.effects.setTransition( el, cProps, factor.from.y, el.from ); + el.to = $.effects.setTransition( el, cProps, factor.to.y, el.to ); + } + } + + $.effects.save( el, props ); + el.show(); + $.effects.createWrapper( el ); + el.css( "overflow", "hidden" ).css( el.from ); + + // Adjust + if (origin) { // Calculate baseline shifts + baseline = $.effects.getBaseline( origin, original ); + el.from.top = ( original.outerHeight - el.outerHeight() ) * baseline.y; + el.from.left = ( original.outerWidth - el.outerWidth() ) * baseline.x; + el.to.top = ( original.outerHeight - el.to.outerHeight ) * baseline.y; + el.to.left = ( original.outerWidth - el.to.outerWidth ) * baseline.x; + } + el.css( el.from ); // set top & left + + // Animate + if ( scale === "content" || scale === "both" ) { // Scale the children + + // Add margins/font-size + vProps = vProps.concat([ "marginTop", "marginBottom" ]).concat(cProps); + hProps = hProps.concat([ "marginLeft", "marginRight" ]); + props2 = props0.concat(vProps).concat(hProps); + + el.find( "*[width]" ).each( function() { + var child = $( this ), + c_original = { + height: child.height(), + width: child.width(), + outerHeight: child.outerHeight(), + outerWidth: child.outerWidth() + }; + if (restore) { + $.effects.save(child, props2); + } + + child.from = { + height: c_original.height * factor.from.y, + width: c_original.width * factor.from.x, + outerHeight: c_original.outerHeight * factor.from.y, + outerWidth: c_original.outerWidth * factor.from.x + }; + child.to = { + height: c_original.height * factor.to.y, + width: c_original.width * factor.to.x, + outerHeight: c_original.height * factor.to.y, + outerWidth: c_original.width * factor.to.x + }; + + // Vertical props scaling + if ( factor.from.y !== factor.to.y ) { + child.from = $.effects.setTransition( child, vProps, factor.from.y, child.from ); + child.to = $.effects.setTransition( child, vProps, factor.to.y, child.to ); + } + + // Horizontal props scaling + if ( factor.from.x !== factor.to.x ) { + child.from = $.effects.setTransition( child, hProps, factor.from.x, child.from ); + child.to = $.effects.setTransition( child, hProps, factor.to.x, child.to ); + } + + // Animate children + child.css( child.from ); + child.animate( child.to, o.duration, o.easing, function() { + + // Restore children + if ( restore ) { + $.effects.restore( child, props2 ); + } + }); + }); + } + + // Animate + el.animate( el.to, { + queue: false, + duration: o.duration, + easing: o.easing, + complete: function() { + if ( el.to.opacity === 0 ) { + el.css( "opacity", el.from.opacity ); + } + if ( mode === "hide" ) { + el.hide(); + } + $.effects.restore( el, props ); + if ( !restore ) { + + // we need to calculate our new positioning based on the scaling + if ( position === "static" ) { + el.css({ + position: "relative", + top: el.to.top, + left: el.to.left + }); + } else { + $.each([ "top", "left" ], function( idx, pos ) { + el.css( pos, function( _, str ) { + var val = parseInt( str, 10 ), + toRef = idx ? el.to.left : el.to.top; + + // if original was "auto", recalculate the new value from wrapper + if ( str === "auto" ) { + return toRef + "px"; + } + + return val + toRef + "px"; + }); + }); + } + } + + $.effects.removeWrapper( el ); + done(); + } + }); + +}; + + +/*! + * jQuery UI Effects Scale 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/scale-effect/ + */ + + +var effectScale = $.effects.effect.scale = function( o, done ) { + + // Create element + var el = $( this ), + options = $.extend( true, {}, o ), + mode = $.effects.setMode( el, o.mode || "effect" ), + percent = parseInt( o.percent, 10 ) || + ( parseInt( o.percent, 10 ) === 0 ? 0 : ( mode === "hide" ? 0 : 100 ) ), + direction = o.direction || "both", + origin = o.origin, + original = { + height: el.height(), + width: el.width(), + outerHeight: el.outerHeight(), + outerWidth: el.outerWidth() + }, + factor = { + y: direction !== "horizontal" ? (percent / 100) : 1, + x: direction !== "vertical" ? (percent / 100) : 1 + }; + + // We are going to pass this effect to the size effect: + options.effect = "size"; + options.queue = false; + options.complete = done; + + // Set default origin and restore for show/hide + if ( mode !== "effect" ) { + options.origin = origin || [ "middle", "center" ]; + options.restore = true; + } + + options.from = o.from || ( mode === "show" ? { + height: 0, + width: 0, + outerHeight: 0, + outerWidth: 0 + } : original ); + options.to = { + height: original.height * factor.y, + width: original.width * factor.x, + outerHeight: original.outerHeight * factor.y, + outerWidth: original.outerWidth * factor.x + }; + + // Fade option to support puff + if ( options.fade ) { + if ( mode === "show" ) { + options.from.opacity = 0; + options.to.opacity = 1; + } + if ( mode === "hide" ) { + options.from.opacity = 1; + options.to.opacity = 0; + } + } + + // Animate + el.effect( options ); + +}; + + +/*! + * jQuery UI Effects Puff 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/puff-effect/ + */ + + +var effectPuff = $.effects.effect.puff = function( o, done ) { + var elem = $( this ), + mode = $.effects.setMode( elem, o.mode || "hide" ), + hide = mode === "hide", + percent = parseInt( o.percent, 10 ) || 150, + factor = percent / 100, + original = { + height: elem.height(), + width: elem.width(), + outerHeight: elem.outerHeight(), + outerWidth: elem.outerWidth() + }; + + $.extend( o, { + effect: "scale", + queue: false, + fade: true, + mode: mode, + complete: done, + percent: hide ? percent : 100, + from: hide ? + original : + { + height: original.height * factor, + width: original.width * factor, + outerHeight: original.outerHeight * factor, + outerWidth: original.outerWidth * factor + } + }); + + elem.effect( o ); +}; + + +/*! + * jQuery UI Effects Pulsate 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/pulsate-effect/ + */ + + +var effectPulsate = $.effects.effect.pulsate = function( o, done ) { + var elem = $( this ), + mode = $.effects.setMode( elem, o.mode || "show" ), + show = mode === "show", + hide = mode === "hide", + showhide = ( show || mode === "hide" ), + + // showing or hiding leaves of the "last" animation + anims = ( ( o.times || 5 ) * 2 ) + ( showhide ? 1 : 0 ), + duration = o.duration / anims, + animateTo = 0, + queue = elem.queue(), + queuelen = queue.length, + i; + + if ( show || !elem.is(":visible")) { + elem.css( "opacity", 0 ).show(); + animateTo = 1; + } + + // anims - 1 opacity "toggles" + for ( i = 1; i < anims; i++ ) { + elem.animate({ + opacity: animateTo + }, duration, o.easing ); + animateTo = 1 - animateTo; + } + + elem.animate({ + opacity: animateTo + }, duration, o.easing); + + elem.queue(function() { + if ( hide ) { + elem.hide(); + } + done(); + }); + + // We just queued up "anims" animations, we need to put them next in the queue + if ( queuelen > 1 ) { + queue.splice.apply( queue, + [ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) ); + } + elem.dequeue(); +}; + + +/*! + * jQuery UI Effects Shake 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/shake-effect/ + */ + + +var effectShake = $.effects.effect.shake = function( o, done ) { + + var el = $( this ), + props = [ "position", "top", "bottom", "left", "right", "height", "width" ], + mode = $.effects.setMode( el, o.mode || "effect" ), + direction = o.direction || "left", + distance = o.distance || 20, + times = o.times || 3, + anims = times * 2 + 1, + speed = Math.round( o.duration / anims ), + ref = (direction === "up" || direction === "down") ? "top" : "left", + positiveMotion = (direction === "up" || direction === "left"), + animation = {}, + animation1 = {}, + animation2 = {}, + i, + + // we will need to re-assemble the queue to stack our animations in place + queue = el.queue(), + queuelen = queue.length; + + $.effects.save( el, props ); + el.show(); + $.effects.createWrapper( el ); + + // Animation + animation[ ref ] = ( positiveMotion ? "-=" : "+=" ) + distance; + animation1[ ref ] = ( positiveMotion ? "+=" : "-=" ) + distance * 2; + animation2[ ref ] = ( positiveMotion ? "-=" : "+=" ) + distance * 2; + + // Animate + el.animate( animation, speed, o.easing ); + + // Shakes + for ( i = 1; i < times; i++ ) { + el.animate( animation1, speed, o.easing ).animate( animation2, speed, o.easing ); + } + el + .animate( animation1, speed, o.easing ) + .animate( animation, speed / 2, o.easing ) + .queue(function() { + if ( mode === "hide" ) { + el.hide(); + } + $.effects.restore( el, props ); + $.effects.removeWrapper( el ); + done(); + }); + + // inject all the animations we just queued to be first in line (after "inprogress") + if ( queuelen > 1) { + queue.splice.apply( queue, + [ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) ); + } + el.dequeue(); + +}; + + +/*! + * jQuery UI Effects Slide 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/slide-effect/ + */ + + +var effectSlide = $.effects.effect.slide = function( o, done ) { + + // Create element + var el = $( this ), + props = [ "position", "top", "bottom", "left", "right", "width", "height" ], + mode = $.effects.setMode( el, o.mode || "show" ), + show = mode === "show", + direction = o.direction || "left", + ref = (direction === "up" || direction === "down") ? "top" : "left", + positiveMotion = (direction === "up" || direction === "left"), + distance, + animation = {}; + + // Adjust + $.effects.save( el, props ); + el.show(); + distance = o.distance || el[ ref === "top" ? "outerHeight" : "outerWidth" ]( true ); + + $.effects.createWrapper( el ).css({ + overflow: "hidden" + }); + + if ( show ) { + el.css( ref, positiveMotion ? (isNaN(distance) ? "-" + distance : -distance) : distance ); + } + + // Animation + animation[ ref ] = ( show ? + ( positiveMotion ? "+=" : "-=") : + ( positiveMotion ? "-=" : "+=")) + + distance; + + // Animate + el.animate( animation, { + queue: false, + duration: o.duration, + easing: o.easing, + complete: function() { + if ( mode === "hide" ) { + el.hide(); + } + $.effects.restore( el, props ); + $.effects.removeWrapper( el ); + done(); + } + }); +}; + + +/*! + * jQuery UI Effects Transfer 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/transfer-effect/ + */ + + +var effectTransfer = $.effects.effect.transfer = function( o, done ) { + var elem = $( this ), + target = $( o.to ), + targetFixed = target.css( "position" ) === "fixed", + body = $("body"), + fixTop = targetFixed ? body.scrollTop() : 0, + fixLeft = targetFixed ? body.scrollLeft() : 0, + endPosition = target.offset(), + animation = { + top: endPosition.top - fixTop, + left: endPosition.left - fixLeft, + height: target.innerHeight(), + width: target.innerWidth() + }, + startPosition = elem.offset(), + transfer = $( "<div class='ui-effects-transfer'></div>" ) + .appendTo( document.body ) + .addClass( o.className ) + .css({ + top: startPosition.top - fixTop, + left: startPosition.left - fixLeft, + height: elem.innerHeight(), + width: elem.innerWidth(), + position: targetFixed ? "fixed" : "absolute" + }) + .animate( animation, o.duration, o.easing, function() { + transfer.remove(); + done(); + }); +}; + + + +})); \ No newline at end of file diff --git a/branch/4.04/jquery-ui-1.11.4.custom/jquery-ui.min.css b/branch/4.04/jquery-ui-1.11.4.custom/jquery-ui.min.css new file mode 100644 index 0000000000000000000000000000000000000000..f7d4aa15bc79d959b7679d6a1736654e2ff06b00 --- /dev/null +++ b/branch/4.04/jquery-ui-1.11.4.custom/jquery-ui.min.css @@ -0,0 +1,7 @@ +/*! jQuery UI - v1.11.4 - 2015-05-12 +* http://jqueryui.com +* Includes: core.css, draggable.css, resizable.css, selectable.css, sortable.css, accordion.css, autocomplete.css, button.css, datepicker.css, dialog.css, menu.css, progressbar.css, selectmenu.css, slider.css, spinner.css, tabs.css, tooltip.css, theme.css +* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Trebuchet%20MS%2CTahoma%2CVerdana%2CArial%2Csans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=f6a828&bgTextureHeader=gloss_wave&bgImgOpacityHeader=35&borderColorHeader=e78f08&fcHeader=ffffff&iconColorHeader=ffffff&bgColorContent=eeeeee&bgTextureContent=highlight_soft&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=333333&iconColorContent=222222&bgColorDefault=f6f6f6&bgTextureDefault=glass&bgImgOpacityDefault=100&borderColorDefault=cccccc&fcDefault=1c94c4&iconColorDefault=ef8c08&bgColorHover=fdf5ce&bgTextureHover=glass&bgImgOpacityHover=100&borderColorHover=fbcb09&fcHover=c77405&iconColorHover=ef8c08&bgColorActive=ffffff&bgTextureActive=glass&bgImgOpacityActive=65&borderColorActive=fbd850&fcActive=eb8f00&iconColorActive=ef8c08&bgColorHighlight=ffe45c&bgTextureHighlight=highlight_soft&bgImgOpacityHighlight=75&borderColorHighlight=fed22f&fcHighlight=363636&iconColorHighlight=228ef1&bgColorError=b81900&bgTextureError=diagonals_thick&bgImgOpacityError=18&borderColorError=cd0a0a&fcError=ffffff&iconColorError=ffd27a&bgColorOverlay=666666&bgTextureOverlay=diagonals_thick&bgImgOpacityOverlay=20&opacityOverlay=50&bgColorShadow=000000&bgTextureShadow=flat&bgImgOpacityShadow=10&opacityShadow=20&thicknessShadow=5px&offsetTopShadow=-5px&offsetLeftShadow=-5px&cornerRadiusShadow=5px +* Copyright 2015 jQuery Foundation and other contributors; Licensed MIT */ + +.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{min-height:0}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-draggable-handle{-ms-touch-action:none;touch-action:none}.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:0.1px;display:block;-ms-touch-action:none;touch-action:none}.ui-resizable-disabled .ui-resizable-handle,.ui-resizable-autohide .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}.ui-selectable{-ms-touch-action:none;touch-action:none}.ui-selectable-helper{position:absolute;z-index:100;border:1px dotted black}.ui-sortable-handle{-ms-touch-action:none;touch-action:none}.ui-accordion .ui-accordion-header{display:block;cursor:pointer;position:relative;margin:2px 0 0 0;padding:.5em .5em .5em .7em;min-height:0;font-size:100%}.ui-accordion .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-icons .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-header .ui-accordion-header-icon{position:absolute;left:.5em;top:50%;margin-top:-8px}.ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;overflow:auto}.ui-autocomplete{position:absolute;top:0;left:0;cursor:default}.ui-button{display:inline-block;position:relative;padding:0;line-height:normal;margin-right:.1em;cursor:pointer;vertical-align:middle;text-align:center;overflow:visible}.ui-button,.ui-button:link,.ui-button:visited,.ui-button:hover,.ui-button:active{text-decoration:none}.ui-button-icon-only{width:2.2em}button.ui-button-icon-only{width:2.4em}.ui-button-icons-only{width:3.4em}button.ui-button-icons-only{width:3.7em}.ui-button .ui-button-text{display:block;line-height:normal}.ui-button-text-only .ui-button-text{padding:.4em 1em}.ui-button-icon-only .ui-button-text,.ui-button-icons-only .ui-button-text{padding:.4em;text-indent:-9999999px}.ui-button-text-icon-primary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 1em .4em 2.1em}.ui-button-text-icon-secondary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 2.1em .4em 1em}.ui-button-text-icons .ui-button-text{padding-left:2.1em;padding-right:2.1em}input.ui-button{padding:.4em 1em}.ui-button-icon-only .ui-icon,.ui-button-text-icon-primary .ui-icon,.ui-button-text-icon-secondary .ui-icon,.ui-button-text-icons .ui-icon,.ui-button-icons-only .ui-icon{position:absolute;top:50%;margin-top:-8px}.ui-button-icon-only .ui-icon{left:50%;margin-left:-8px}.ui-button-text-icon-primary .ui-button-icon-primary,.ui-button-text-icons .ui-button-icon-primary,.ui-button-icons-only .ui-button-icon-primary{left:.5em}.ui-button-text-icon-secondary .ui-button-icon-secondary,.ui-button-text-icons .ui-button-icon-secondary,.ui-button-icons-only .ui-button-icon-secondary{right:.5em}.ui-buttonset{margin-right:7px}.ui-buttonset .ui-button{margin-left:0;margin-right:-.3em}input.ui-button::-moz-focus-inner,button.ui-button::-moz-focus-inner{border:0;padding:0}.ui-datepicker{width:17em;padding:.2em .2em 0;display:none}.ui-datepicker .ui-datepicker-header{position:relative;padding:.2em 0}.ui-datepicker .ui-datepicker-prev,.ui-datepicker .ui-datepicker-next{position:absolute;top:2px;width:1.8em;height:1.8em}.ui-datepicker .ui-datepicker-prev-hover,.ui-datepicker .ui-datepicker-next-hover{top:1px}.ui-datepicker .ui-datepicker-prev{left:2px}.ui-datepicker .ui-datepicker-next{right:2px}.ui-datepicker .ui-datepicker-prev-hover{left:1px}.ui-datepicker .ui-datepicker-next-hover{right:1px}.ui-datepicker .ui-datepicker-prev span,.ui-datepicker .ui-datepicker-next span{display:block;position:absolute;left:50%;margin-left:-8px;top:50%;margin-top:-8px}.ui-datepicker .ui-datepicker-title{margin:0 2.3em;line-height:1.8em;text-align:center}.ui-datepicker .ui-datepicker-title select{font-size:1em;margin:1px 0}.ui-datepicker select.ui-datepicker-month,.ui-datepicker select.ui-datepicker-year{width:45%}.ui-datepicker table{width:100%;font-size:.9em;border-collapse:collapse;margin:0 0 .4em}.ui-datepicker th{padding:.7em .3em;text-align:center;font-weight:bold;border:0}.ui-datepicker td{border:0;padding:1px}.ui-datepicker td span,.ui-datepicker td a{display:block;padding:.2em;text-align:right;text-decoration:none}.ui-datepicker .ui-datepicker-buttonpane{background-image:none;margin:.7em 0 0 0;padding:0 .2em;border-left:0;border-right:0;border-bottom:0}.ui-datepicker .ui-datepicker-buttonpane button{float:right;margin:.5em .2em .4em;cursor:pointer;padding:.2em .6em .3em .6em;width:auto;overflow:visible}.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current{float:left}.ui-datepicker.ui-datepicker-multi{width:auto}.ui-datepicker-multi .ui-datepicker-group{float:left}.ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .4em}.ui-datepicker-multi-2 .ui-datepicker-group{width:50%}.ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%}.ui-datepicker-multi-4 .ui-datepicker-group{width:25%}.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0}.ui-datepicker-multi .ui-datepicker-buttonpane{clear:left}.ui-datepicker-row-break{clear:both;width:100%;font-size:0}.ui-datepicker-rtl{direction:rtl}.ui-datepicker-rtl .ui-datepicker-prev{right:2px;left:auto}.ui-datepicker-rtl .ui-datepicker-next{left:2px;right:auto}.ui-datepicker-rtl .ui-datepicker-prev:hover{right:1px;left:auto}.ui-datepicker-rtl .ui-datepicker-next:hover{left:1px;right:auto}.ui-datepicker-rtl .ui-datepicker-buttonpane{clear:right}.ui-datepicker-rtl .ui-datepicker-buttonpane button{float:left}.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,.ui-datepicker-rtl .ui-datepicker-group{float:right}.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0;border-left-width:1px}.ui-dialog{overflow:hidden;position:absolute;top:0;left:0;padding:.2em;outline:0}.ui-dialog .ui-dialog-titlebar{padding:.4em 1em;position:relative}.ui-dialog .ui-dialog-title{float:left;margin:.1em 0;white-space:nowrap;width:90%;overflow:hidden;text-overflow:ellipsis}.ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:20px;margin:-10px 0 0 0;padding:1px;height:20px}.ui-dialog .ui-dialog-content{position:relative;border:0;padding:.5em 1em;background:none;overflow:auto}.ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0 0;background-image:none;margin-top:.5em;padding:.3em 1em .5em .4em}.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:right}.ui-dialog .ui-dialog-buttonpane button{margin:.5em .4em .5em 0;cursor:pointer}.ui-dialog .ui-resizable-se{width:12px;height:12px;right:-5px;bottom:-5px;background-position:16px 16px}.ui-draggable .ui-dialog-titlebar{cursor:move}.ui-menu{list-style:none;padding:0;margin:0;display:block;outline:none}.ui-menu .ui-menu{position:absolute}.ui-menu .ui-menu-item{position:relative;margin:0;padding:3px 1em 3px .4em;cursor:pointer;min-height:0;list-style-image:url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7")}.ui-menu .ui-menu-divider{margin:5px 0;height:0;font-size:0;line-height:0;border-width:1px 0 0 0}.ui-menu .ui-state-focus,.ui-menu .ui-state-active{margin:-1px}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item{padding-left:2em}.ui-menu .ui-icon{position:absolute;top:0;bottom:0;left:.2em;margin:auto 0}.ui-menu .ui-menu-icon{left:auto;right:0}.ui-progressbar{height:2em;text-align:left;overflow:hidden}.ui-progressbar .ui-progressbar-value{margin:-1px;height:100%}.ui-progressbar .ui-progressbar-overlay{background:url("data:image/gif;base64,R0lGODlhKAAoAIABAAAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh+QQJAQABACwAAAAAKAAoAAACkYwNqXrdC52DS06a7MFZI+4FHBCKoDeWKXqymPqGqxvJrXZbMx7Ttc+w9XgU2FB3lOyQRWET2IFGiU9m1frDVpxZZc6bfHwv4c1YXP6k1Vdy292Fb6UkuvFtXpvWSzA+HycXJHUXiGYIiMg2R6W459gnWGfHNdjIqDWVqemH2ekpObkpOlppWUqZiqr6edqqWQAAIfkECQEAAQAsAAAAACgAKAAAApSMgZnGfaqcg1E2uuzDmmHUBR8Qil95hiPKqWn3aqtLsS18y7G1SzNeowWBENtQd+T1JktP05nzPTdJZlR6vUxNWWjV+vUWhWNkWFwxl9VpZRedYcflIOLafaa28XdsH/ynlcc1uPVDZxQIR0K25+cICCmoqCe5mGhZOfeYSUh5yJcJyrkZWWpaR8doJ2o4NYq62lAAACH5BAkBAAEALAAAAAAoACgAAAKVDI4Yy22ZnINRNqosw0Bv7i1gyHUkFj7oSaWlu3ovC8GxNso5fluz3qLVhBVeT/Lz7ZTHyxL5dDalQWPVOsQWtRnuwXaFTj9jVVh8pma9JjZ4zYSj5ZOyma7uuolffh+IR5aW97cHuBUXKGKXlKjn+DiHWMcYJah4N0lYCMlJOXipGRr5qdgoSTrqWSq6WFl2ypoaUAAAIfkECQEAAQAsAAAAACgAKAAAApaEb6HLgd/iO7FNWtcFWe+ufODGjRfoiJ2akShbueb0wtI50zm02pbvwfWEMWBQ1zKGlLIhskiEPm9R6vRXxV4ZzWT2yHOGpWMyorblKlNp8HmHEb/lCXjcW7bmtXP8Xt229OVWR1fod2eWqNfHuMjXCPkIGNileOiImVmCOEmoSfn3yXlJWmoHGhqp6ilYuWYpmTqKUgAAIfkECQEAAQAsAAAAACgAKAAAApiEH6kb58biQ3FNWtMFWW3eNVcojuFGfqnZqSebuS06w5V80/X02pKe8zFwP6EFWOT1lDFk8rGERh1TTNOocQ61Hm4Xm2VexUHpzjymViHrFbiELsefVrn6XKfnt2Q9G/+Xdie499XHd2g4h7ioOGhXGJboGAnXSBnoBwKYyfioubZJ2Hn0RuRZaflZOil56Zp6iioKSXpUAAAh+QQJAQABACwAAAAAKAAoAAACkoQRqRvnxuI7kU1a1UU5bd5tnSeOZXhmn5lWK3qNTWvRdQxP8qvaC+/yaYQzXO7BMvaUEmJRd3TsiMAgswmNYrSgZdYrTX6tSHGZO73ezuAw2uxuQ+BbeZfMxsexY35+/Qe4J1inV0g4x3WHuMhIl2jXOKT2Q+VU5fgoSUI52VfZyfkJGkha6jmY+aaYdirq+lQAACH5BAkBAAEALAAAAAAoACgAAAKWBIKpYe0L3YNKToqswUlvznigd4wiR4KhZrKt9Upqip61i9E3vMvxRdHlbEFiEXfk9YARYxOZZD6VQ2pUunBmtRXo1Lf8hMVVcNl8JafV38aM2/Fu5V16Bn63r6xt97j09+MXSFi4BniGFae3hzbH9+hYBzkpuUh5aZmHuanZOZgIuvbGiNeomCnaxxap2upaCZsq+1kAACH5BAkBAAEALAAAAAAoACgAAAKXjI8By5zf4kOxTVrXNVlv1X0d8IGZGKLnNpYtm8Lr9cqVeuOSvfOW79D9aDHizNhDJidFZhNydEahOaDH6nomtJjp1tutKoNWkvA6JqfRVLHU/QUfau9l2x7G54d1fl995xcIGAdXqMfBNadoYrhH+Mg2KBlpVpbluCiXmMnZ2Sh4GBqJ+ckIOqqJ6LmKSllZmsoq6wpQAAAh+QQJAQABACwAAAAAKAAoAAAClYx/oLvoxuJDkU1a1YUZbJ59nSd2ZXhWqbRa2/gF8Gu2DY3iqs7yrq+xBYEkYvFSM8aSSObE+ZgRl1BHFZNr7pRCavZ5BW2142hY3AN/zWtsmf12p9XxxFl2lpLn1rseztfXZjdIWIf2s5dItwjYKBgo9yg5pHgzJXTEeGlZuenpyPmpGQoKOWkYmSpaSnqKileI2FAAACH5BAkBAAEALAAAAAAoACgAAAKVjB+gu+jG4kORTVrVhRlsnn2dJ3ZleFaptFrb+CXmO9OozeL5VfP99HvAWhpiUdcwkpBH3825AwYdU8xTqlLGhtCosArKMpvfa1mMRae9VvWZfeB2XfPkeLmm18lUcBj+p5dnN8jXZ3YIGEhYuOUn45aoCDkp16hl5IjYJvjWKcnoGQpqyPlpOhr3aElaqrq56Bq7VAAAOw==");height:100%;filter:alpha(opacity=25);opacity:0.25}.ui-progressbar-indeterminate .ui-progressbar-value{background-image:none}.ui-selectmenu-menu{padding:0;margin:0;position:absolute;top:0;left:0;display:none}.ui-selectmenu-menu .ui-menu{overflow:auto;overflow-x:hidden;padding-bottom:1px}.ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup{font-size:1em;font-weight:bold;line-height:1.5;padding:2px 0.4em;margin:0.5em 0 0 0;height:auto;border:0}.ui-selectmenu-open{display:block}.ui-selectmenu-button{display:inline-block;overflow:hidden;position:relative;text-decoration:none;cursor:pointer}.ui-selectmenu-button span.ui-icon{right:0.5em;left:auto;margin-top:-8px;position:absolute;top:50%}.ui-selectmenu-button span.ui-selectmenu-text{text-align:left;padding:0.4em 2.1em 0.4em 1em;display:block;line-height:1.4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-slider{position:relative;text-align:left}.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default;-ms-touch-action:none;touch-action:none}.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}.ui-slider.ui-state-disabled .ui-slider-handle,.ui-slider.ui-state-disabled .ui-slider-range{filter:inherit}.ui-slider-horizontal{height:.8em}.ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em}.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.ui-slider-horizontal .ui-slider-range-min{left:0}.ui-slider-horizontal .ui-slider-range-max{right:0}.ui-slider-vertical{width:.8em;height:100px}.ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em}.ui-slider-vertical .ui-slider-range{left:0;width:100%}.ui-slider-vertical .ui-slider-range-min{bottom:0}.ui-slider-vertical .ui-slider-range-max{top:0}.ui-spinner{position:relative;display:inline-block;overflow:hidden;padding:0;vertical-align:middle}.ui-spinner-input{border:none;background:none;color:inherit;padding:0;margin:.2em 0;vertical-align:middle;margin-left:.4em;margin-right:22px}.ui-spinner-button{width:16px;height:50%;font-size:.5em;padding:0;margin:0;text-align:center;position:absolute;cursor:default;display:block;overflow:hidden;right:0}.ui-spinner a.ui-spinner-button{border-top:none;border-bottom:none;border-right:none}.ui-spinner .ui-icon{position:absolute;margin-top:-8px;top:50%;left:0}.ui-spinner-up{top:0}.ui-spinner-down{bottom:0}.ui-spinner .ui-icon-triangle-1-s{background-position:-65px -16px}.ui-tabs{position:relative;padding:.2em}.ui-tabs .ui-tabs-nav{margin:0;padding:.2em .2em 0}.ui-tabs .ui-tabs-nav li{list-style:none;float:left;position:relative;top:0;margin:1px .2em 0 0;border-bottom-width:0;padding:0;white-space:nowrap}.ui-tabs .ui-tabs-nav .ui-tabs-anchor{float:left;padding:.5em 1em;text-decoration:none}.ui-tabs .ui-tabs-nav li.ui-tabs-active{margin-bottom:-1px;padding-bottom:1px}.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor{cursor:text}.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor{cursor:pointer}.ui-tabs .ui-tabs-panel{display:block;border-width:0;padding:1em 1.4em;background:none}.ui-tooltip{padding:8px;position:absolute;z-index:9999;max-width:300px;-webkit-box-shadow:0 0 5px #aaa;box-shadow:0 0 5px #aaa}body .ui-tooltip{border-width:2px}.ui-widget{font-family:Trebuchet MS,Tahoma,Verdana,Arial,sans-serif;font-size:1.1em}.ui-widget .ui-widget{font-size:1em}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:Trebuchet MS,Tahoma,Verdana,Arial,sans-serif;font-size:1em}.ui-widget-content{border:1px solid #ddd;background:#eee url("images/ui-bg_highlight-soft_100_eeeeee_1x100.png") 50% top repeat-x;color:#333}.ui-widget-content a{color:#333}.ui-widget-header{border:1px solid #e78f08;background:#f6a828 url("images/ui-bg_gloss-wave_35_f6a828_500x100.png") 50% 50% repeat-x;color:#fff;font-weight:bold}.ui-widget-header a{color:#fff}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default{border:1px solid #ccc;background:#f6f6f6 url("images/ui-bg_glass_100_f6f6f6_1x400.png") 50% 50% repeat-x;font-weight:bold;color:#1c94c4}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited{color:#1c94c4;text-decoration:none}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus{border:1px solid #fbcb09;background:#fdf5ce url("images/ui-bg_glass_100_fdf5ce_1x400.png") 50% 50% repeat-x;font-weight:bold;color:#c77405}.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited,.ui-state-focus a,.ui-state-focus a:hover,.ui-state-focus a:link,.ui-state-focus a:visited{color:#c77405;text-decoration:none}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active{border:1px solid #fbd850;background:#fff url("images/ui-bg_glass_65_ffffff_1x400.png") 50% 50% repeat-x;font-weight:bold;color:#eb8f00}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#eb8f00;text-decoration:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #fed22f;background:#ffe45c url("images/ui-bg_highlight-soft_75_ffe45c_1x100.png") 50% top repeat-x;color:#363636}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#363636}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #cd0a0a;background:#b81900 url("images/ui-bg_diagonals-thick_18_b81900_40x40.png") 50% 50% repeat;color:#fff}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#fff}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#fff}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:bold}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:normal}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none}.ui-state-disabled .ui-icon{filter:Alpha(Opacity=35)}.ui-icon{width:16px;height:16px}.ui-icon,.ui-widget-content .ui-icon{background-image:url("images/ui-icons_222222_256x240.png")}.ui-widget-header .ui-icon{background-image:url("images/ui-icons_ffffff_256x240.png")}.ui-state-default .ui-icon{background-image:url("images/ui-icons_ef8c08_256x240.png")}.ui-state-hover .ui-icon,.ui-state-focus .ui-icon{background-image:url("images/ui-icons_ef8c08_256x240.png")}.ui-state-active .ui-icon{background-image:url("images/ui-icons_ef8c08_256x240.png")}.ui-state-highlight .ui-icon{background-image:url("images/ui-icons_228ef1_256x240.png")}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url("images/ui-icons_ffd27a_256x240.png")}.ui-icon-blank{background-position:16px 16px}.ui-icon-carat-1-n{background-position:0 0}.ui-icon-carat-1-ne{background-position:-16px 0}.ui-icon-carat-1-e{background-position:-32px 0}.ui-icon-carat-1-se{background-position:-48px 0}.ui-icon-carat-1-s{background-position:-64px 0}.ui-icon-carat-1-sw{background-position:-80px 0}.ui-icon-carat-1-w{background-position:-96px 0}.ui-icon-carat-1-nw{background-position:-112px 0}.ui-icon-carat-2-n-s{background-position:-128px 0}.ui-icon-carat-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:0 -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-64px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:0 -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-64px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:0 -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:0 -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:0 -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:0 -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:0 -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:0 -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:0 -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-on{background-position:-96px -144px}.ui-icon-radio-off{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:0 -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-seek-first{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:0 -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:0 -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:0 -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:0 -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-top,.ui-corner-left,.ui-corner-tl{border-top-left-radius:4px}.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr{border-top-right-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl{border-bottom-left-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br{border-bottom-right-radius:4px}.ui-widget-overlay{background:#666 url("images/ui-bg_diagonals-thick_20_666666_40x40.png") 50% 50% repeat;opacity:.5;filter:Alpha(Opacity=50)}.ui-widget-shadow{margin:-5px 0 0 -5px;padding:5px;background:#000 url("images/ui-bg_flat_10_000000_40x100.png") 50% 50% repeat-x;opacity:.2;filter:Alpha(Opacity=20);border-radius:5px} \ No newline at end of file diff --git a/branch/4.04/jquery-ui-1.11.4.custom/jquery-ui.min.js b/branch/4.04/jquery-ui-1.11.4.custom/jquery-ui.min.js new file mode 100644 index 0000000000000000000000000000000000000000..47c00b48eb74fe55e602336a2a74005164e54ca9 --- /dev/null +++ b/branch/4.04/jquery-ui-1.11.4.custom/jquery-ui.min.js @@ -0,0 +1,13 @@ +/*! jQuery UI - v1.11.4 - 2015-05-10 +* http://jqueryui.com +* Includes: core.js, widget.js, mouse.js, position.js, draggable.js, droppable.js, resizable.js, selectable.js, sortable.js, accordion.js, autocomplete.js, button.js, datepicker.js, dialog.js, menu.js, progressbar.js, selectmenu.js, slider.js, spinner.js, tabs.js, tooltip.js, effect.js, effect-blind.js, effect-bounce.js, effect-clip.js, effect-drop.js, effect-explode.js, effect-fade.js, effect-fold.js, effect-highlight.js, effect-puff.js, effect-pulsate.js, effect-scale.js, effect-shake.js, effect-size.js, effect-slide.js, effect-transfer.js +* Copyright 2015 jQuery Foundation and other contributors; Licensed MIT */ + +(function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)})(function(e){function t(t,s){var n,a,o,r=t.nodeName.toLowerCase();return"area"===r?(n=t.parentNode,a=n.name,t.href&&a&&"map"===n.nodeName.toLowerCase()?(o=e("img[usemap='#"+a+"']")[0],!!o&&i(o)):!1):(/^(input|select|textarea|button|object)$/.test(r)?!t.disabled:"a"===r?t.href||s:s)&&i(t)}function i(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")}).length}function s(e){for(var t,i;e.length&&e[0]!==document;){if(t=e.css("position"),("absolute"===t||"relative"===t||"fixed"===t)&&(i=parseInt(e.css("zIndex"),10),!isNaN(i)&&0!==i))return i;e=e.parent()}return 0}function n(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},e.extend(this._defaults,this.regional[""]),this.regional.en=e.extend(!0,{},this.regional[""]),this.regional["en-US"]=e.extend(!0,{},this.regional.en),this.dpDiv=a(e("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function a(t){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return t.delegate(i,"mouseout",function(){e(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&e(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&e(this).removeClass("ui-datepicker-next-hover")}).delegate(i,"mouseover",o)}function o(){e.datepicker._isDisabledDatepicker(v.inline?v.dpDiv.parent()[0]:v.input[0])||(e(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),e(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&e(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&e(this).addClass("ui-datepicker-next-hover"))}function r(t,i){e.extend(t,i);for(var s in i)null==i[s]&&(t[s]=i[s]);return t}function h(e){return function(){var t=this.element.val();e.apply(this,arguments),this._refresh(),t!==this.element.val()&&this._trigger("change")}}e.ui=e.ui||{},e.extend(e.ui,{version:"1.11.4",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),e.fn.extend({scrollParent:function(t){var i=this.css("position"),s="absolute"===i,n=t?/(auto|scroll|hidden)/:/(auto|scroll)/,a=this.parents().filter(function(){var t=e(this);return s&&"static"===t.css("position")?!1:n.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==i&&a.length?a:e(this[0].ownerDocument||document)},uniqueId:function(){var e=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++e)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&e(this).removeAttr("id")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(i){return!!e.data(i,t)}}):function(t,i,s){return!!e.data(t,s[3])},focusable:function(i){return t(i,!isNaN(e.attr(i,"tabindex")))},tabbable:function(i){var s=e.attr(i,"tabindex"),n=isNaN(s);return(n||s>=0)&&t(i,!n)}}),e("<a>").outerWidth(1).jquery||e.each(["Width","Height"],function(t,i){function s(t,i,s,a){return e.each(n,function(){i-=parseFloat(e.css(t,"padding"+this))||0,s&&(i-=parseFloat(e.css(t,"border"+this+"Width"))||0),a&&(i-=parseFloat(e.css(t,"margin"+this))||0)}),i}var n="Width"===i?["Left","Right"]:["Top","Bottom"],a=i.toLowerCase(),o={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+i]=function(t){return void 0===t?o["inner"+i].call(this):this.each(function(){e(this).css(a,s(this,t)+"px")})},e.fn["outer"+i]=function(t,n){return"number"!=typeof t?o["outer"+i].call(this,t):this.each(function(){e(this).css(a,s(this,t,!0,n)+"px")})}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(i){return arguments.length?t.call(this,e.camelCase(i)):t.call(this)}}(e.fn.removeData)),e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),e.fn.extend({focus:function(t){return function(i,s){return"number"==typeof i?this.each(function(){var t=this;setTimeout(function(){e(t).focus(),s&&s.call(t)},i)}):t.apply(this,arguments)}}(e.fn.focus),disableSelection:function(){var e="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.bind(e+".ui-disableSelection",function(e){e.preventDefault()})}}(),enableSelection:function(){return this.unbind(".ui-disableSelection")},zIndex:function(t){if(void 0!==t)return this.css("zIndex",t);if(this.length)for(var i,s,n=e(this[0]);n.length&&n[0]!==document;){if(i=n.css("position"),("absolute"===i||"relative"===i||"fixed"===i)&&(s=parseInt(n.css("zIndex"),10),!isNaN(s)&&0!==s))return s;n=n.parent()}return 0}}),e.ui.plugin={add:function(t,i,s){var n,a=e.ui[t].prototype;for(n in s)a.plugins[n]=a.plugins[n]||[],a.plugins[n].push([i,s[n]])},call:function(e,t,i,s){var n,a=e.plugins[t];if(a&&(s||e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType))for(n=0;a.length>n;n++)e.options[a[n][0]]&&a[n][1].apply(e.element,i)}};var l=0,u=Array.prototype.slice;e.cleanData=function(t){return function(i){var s,n,a;for(a=0;null!=(n=i[a]);a++)try{s=e._data(n,"events"),s&&s.remove&&e(n).triggerHandler("remove")}catch(o){}t(i)}}(e.cleanData),e.widget=function(t,i,s){var n,a,o,r,h={},l=t.split(".")[0];return t=t.split(".")[1],n=l+"-"+t,s||(s=i,i=e.Widget),e.expr[":"][n.toLowerCase()]=function(t){return!!e.data(t,n)},e[l]=e[l]||{},a=e[l][t],o=e[l][t]=function(e,t){return this._createWidget?(arguments.length&&this._createWidget(e,t),void 0):new o(e,t)},e.extend(o,a,{version:s.version,_proto:e.extend({},s),_childConstructors:[]}),r=new i,r.options=e.widget.extend({},r.options),e.each(s,function(t,s){return e.isFunction(s)?(h[t]=function(){var e=function(){return i.prototype[t].apply(this,arguments)},n=function(e){return i.prototype[t].apply(this,e)};return function(){var t,i=this._super,a=this._superApply;return this._super=e,this._superApply=n,t=s.apply(this,arguments),this._super=i,this._superApply=a,t}}(),void 0):(h[t]=s,void 0)}),o.prototype=e.widget.extend(r,{widgetEventPrefix:a?r.widgetEventPrefix||t:t},h,{constructor:o,namespace:l,widgetName:t,widgetFullName:n}),a?(e.each(a._childConstructors,function(t,i){var s=i.prototype;e.widget(s.namespace+"."+s.widgetName,o,i._proto)}),delete a._childConstructors):i._childConstructors.push(o),e.widget.bridge(t,o),o},e.widget.extend=function(t){for(var i,s,n=u.call(arguments,1),a=0,o=n.length;o>a;a++)for(i in n[a])s=n[a][i],n[a].hasOwnProperty(i)&&void 0!==s&&(t[i]=e.isPlainObject(s)?e.isPlainObject(t[i])?e.widget.extend({},t[i],s):e.widget.extend({},s):s);return t},e.widget.bridge=function(t,i){var s=i.prototype.widgetFullName||t;e.fn[t]=function(n){var a="string"==typeof n,o=u.call(arguments,1),r=this;return a?this.each(function(){var i,a=e.data(this,s);return"instance"===n?(r=a,!1):a?e.isFunction(a[n])&&"_"!==n.charAt(0)?(i=a[n].apply(a,o),i!==a&&void 0!==i?(r=i&&i.jquery?r.pushStack(i.get()):i,!1):void 0):e.error("no such method '"+n+"' for "+t+" widget instance"):e.error("cannot call methods on "+t+" prior to initialization; "+"attempted to call method '"+n+"'")}):(o.length&&(n=e.widget.extend.apply(null,[n].concat(o))),this.each(function(){var t=e.data(this,s);t?(t.option(n||{}),t._init&&t._init()):e.data(this,s,new i(n,this))})),r}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(t,i){i=e(i||this.defaultElement||this)[0],this.element=e(i),this.uuid=l++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=e(),this.hoverable=e(),this.focusable=e(),i!==this&&(e.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===i&&this.destroy()}}),this.document=e(i.style?i.ownerDocument:i.document||i),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:e.noop,widget:function(){return this.element},option:function(t,i){var s,n,a,o=t;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof t)if(o={},s=t.split("."),t=s.shift(),s.length){for(n=o[t]=e.widget.extend({},this.options[t]),a=0;s.length-1>a;a++)n[s[a]]=n[s[a]]||{},n=n[s[a]];if(t=s.pop(),1===arguments.length)return void 0===n[t]?null:n[t];n[t]=i}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];o[t]=i}return this._setOptions(o),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return this.options[e]=t,"disabled"===e&&(this.widget().toggleClass(this.widgetFullName+"-disabled",!!t),t&&(this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus"))),this},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_on:function(t,i,s){var n,a=this;"boolean"!=typeof t&&(s=i,i=t,t=!1),s?(i=n=e(i),this.bindings=this.bindings.add(i)):(s=i,i=this.element,n=this.widget()),e.each(s,function(s,o){function r(){return t||a.options.disabled!==!0&&!e(this).hasClass("ui-state-disabled")?("string"==typeof o?a[o]:o).apply(a,arguments):void 0}"string"!=typeof o&&(r.guid=o.guid=o.guid||r.guid||e.guid++);var h=s.match(/^([\w:-]*)\s*(.*)$/),l=h[1]+a.eventNamespace,u=h[2];u?n.delegate(u,l,r):i.bind(l,r)})},_off:function(t,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.unbind(i).undelegate(i),this.bindings=e(this.bindings.not(t).get()),this.focusable=e(this.focusable.not(t).get()),this.hoverable=e(this.hoverable.not(t).get())},_delay:function(e,t){function i(){return("string"==typeof e?s[e]:e).apply(s,arguments)}var s=this;return setTimeout(i,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){e(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){e(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){e(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){e(t.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(t,i,s){var n,a,o=this.options[t];if(s=s||{},i=e.Event(i),i.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),i.target=this.element[0],a=i.originalEvent)for(n in a)n in i||(i[n]=a[n]);return this.element.trigger(i,s),!(e.isFunction(o)&&o.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},function(t,i){e.Widget.prototype["_"+t]=function(s,n,a){"string"==typeof n&&(n={effect:n});var o,r=n?n===!0||"number"==typeof n?i:n.effect||i:t;n=n||{},"number"==typeof n&&(n={duration:n}),o=!e.isEmptyObject(n),n.complete=a,n.delay&&s.delay(n.delay),o&&e.effects&&e.effects.effect[r]?s[t](n):r!==t&&s[r]?s[r](n.duration,n.easing,a):s.queue(function(i){e(this)[t](),a&&a.call(s[0]),i()})}}),e.widget;var d=!1;e(document).mouseup(function(){d=!1}),e.widget("ui.mouse",{version:"1.11.4",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.bind("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).bind("click."+this.widgetName,function(i){return!0===e.data(i.target,t.widgetName+".preventClickEvent")?(e.removeData(i.target,t.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(t){if(!d){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(t),this._mouseDownEvent=t;var i=this,s=1===t.which,n="string"==typeof this.options.cancel&&t.target.nodeName?e(t.target).closest(this.options.cancel).length:!1;return s&&!n&&this._mouseCapture(t)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){i.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(t)!==!1,!this._mouseStarted)?(t.preventDefault(),!0):(!0===e.data(t.target,this.widgetName+".preventClickEvent")&&e.removeData(t.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return i._mouseMove(e)},this._mouseUpDelegate=function(e){return i._mouseUp(e)},this.document.bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),t.preventDefault(),d=!0,!0)):!0}},_mouseMove:function(t){if(this._mouseMoved){if(e.ui.ie&&(!document.documentMode||9>document.documentMode)&&!t.button)return this._mouseUp(t);if(!t.which)return this._mouseUp(t)}return(t.which||t.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,t)!==!1,this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(t){return this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&e.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),d=!1,!1},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),function(){function t(e,t,i){return[parseFloat(e[0])*(p.test(e[0])?t/100:1),parseFloat(e[1])*(p.test(e[1])?i/100:1)]}function i(t,i){return parseInt(e.css(t,i),10)||0}function s(t){var i=t[0];return 9===i.nodeType?{width:t.width(),height:t.height(),offset:{top:0,left:0}}:e.isWindow(i)?{width:t.width(),height:t.height(),offset:{top:t.scrollTop(),left:t.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:t.outerWidth(),height:t.outerHeight(),offset:t.offset()}}e.ui=e.ui||{};var n,a,o=Math.max,r=Math.abs,h=Math.round,l=/left|center|right/,u=/top|center|bottom/,d=/[\+\-]\d+(\.[\d]+)?%?/,c=/^\w+/,p=/%$/,f=e.fn.position;e.position={scrollbarWidth:function(){if(void 0!==n)return n;var t,i,s=e("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),a=s.children()[0];return e("body").append(s),t=a.offsetWidth,s.css("overflow","scroll"),i=a.offsetWidth,t===i&&(i=s[0].clientWidth),s.remove(),n=t-i},getScrollInfo:function(t){var i=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),s=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),n="scroll"===i||"auto"===i&&t.width<t.element[0].scrollWidth,a="scroll"===s||"auto"===s&&t.height<t.element[0].scrollHeight;return{width:a?e.position.scrollbarWidth():0,height:n?e.position.scrollbarWidth():0}},getWithinInfo:function(t){var i=e(t||window),s=e.isWindow(i[0]),n=!!i[0]&&9===i[0].nodeType;return{element:i,isWindow:s,isDocument:n,offset:i.offset()||{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:s||n?i.width():i.outerWidth(),height:s||n?i.height():i.outerHeight()}}},e.fn.position=function(n){if(!n||!n.of)return f.apply(this,arguments);n=e.extend({},n);var p,m,g,v,y,b,_=e(n.of),x=e.position.getWithinInfo(n.within),w=e.position.getScrollInfo(x),k=(n.collision||"flip").split(" "),T={};return b=s(_),_[0].preventDefault&&(n.at="left top"),m=b.width,g=b.height,v=b.offset,y=e.extend({},v),e.each(["my","at"],function(){var e,t,i=(n[this]||"").split(" ");1===i.length&&(i=l.test(i[0])?i.concat(["center"]):u.test(i[0])?["center"].concat(i):["center","center"]),i[0]=l.test(i[0])?i[0]:"center",i[1]=u.test(i[1])?i[1]:"center",e=d.exec(i[0]),t=d.exec(i[1]),T[this]=[e?e[0]:0,t?t[0]:0],n[this]=[c.exec(i[0])[0],c.exec(i[1])[0]]}),1===k.length&&(k[1]=k[0]),"right"===n.at[0]?y.left+=m:"center"===n.at[0]&&(y.left+=m/2),"bottom"===n.at[1]?y.top+=g:"center"===n.at[1]&&(y.top+=g/2),p=t(T.at,m,g),y.left+=p[0],y.top+=p[1],this.each(function(){var s,l,u=e(this),d=u.outerWidth(),c=u.outerHeight(),f=i(this,"marginLeft"),b=i(this,"marginTop"),D=d+f+i(this,"marginRight")+w.width,S=c+b+i(this,"marginBottom")+w.height,M=e.extend({},y),C=t(T.my,u.outerWidth(),u.outerHeight());"right"===n.my[0]?M.left-=d:"center"===n.my[0]&&(M.left-=d/2),"bottom"===n.my[1]?M.top-=c:"center"===n.my[1]&&(M.top-=c/2),M.left+=C[0],M.top+=C[1],a||(M.left=h(M.left),M.top=h(M.top)),s={marginLeft:f,marginTop:b},e.each(["left","top"],function(t,i){e.ui.position[k[t]]&&e.ui.position[k[t]][i](M,{targetWidth:m,targetHeight:g,elemWidth:d,elemHeight:c,collisionPosition:s,collisionWidth:D,collisionHeight:S,offset:[p[0]+C[0],p[1]+C[1]],my:n.my,at:n.at,within:x,elem:u})}),n.using&&(l=function(e){var t=v.left-M.left,i=t+m-d,s=v.top-M.top,a=s+g-c,h={target:{element:_,left:v.left,top:v.top,width:m,height:g},element:{element:u,left:M.left,top:M.top,width:d,height:c},horizontal:0>i?"left":t>0?"right":"center",vertical:0>a?"top":s>0?"bottom":"middle"};d>m&&m>r(t+i)&&(h.horizontal="center"),c>g&&g>r(s+a)&&(h.vertical="middle"),h.important=o(r(t),r(i))>o(r(s),r(a))?"horizontal":"vertical",n.using.call(this,e,h)}),u.offset(e.extend(M,{using:l}))})},e.ui.position={fit:{left:function(e,t){var i,s=t.within,n=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,r=e.left-t.collisionPosition.marginLeft,h=n-r,l=r+t.collisionWidth-a-n;t.collisionWidth>a?h>0&&0>=l?(i=e.left+h+t.collisionWidth-a-n,e.left+=h-i):e.left=l>0&&0>=h?n:h>l?n+a-t.collisionWidth:n:h>0?e.left+=h:l>0?e.left-=l:e.left=o(e.left-r,e.left)},top:function(e,t){var i,s=t.within,n=s.isWindow?s.scrollTop:s.offset.top,a=t.within.height,r=e.top-t.collisionPosition.marginTop,h=n-r,l=r+t.collisionHeight-a-n;t.collisionHeight>a?h>0&&0>=l?(i=e.top+h+t.collisionHeight-a-n,e.top+=h-i):e.top=l>0&&0>=h?n:h>l?n+a-t.collisionHeight:n:h>0?e.top+=h:l>0?e.top-=l:e.top=o(e.top-r,e.top)}},flip:{left:function(e,t){var i,s,n=t.within,a=n.offset.left+n.scrollLeft,o=n.width,h=n.isWindow?n.scrollLeft:n.offset.left,l=e.left-t.collisionPosition.marginLeft,u=l-h,d=l+t.collisionWidth-o-h,c="left"===t.my[0]?-t.elemWidth:"right"===t.my[0]?t.elemWidth:0,p="left"===t.at[0]?t.targetWidth:"right"===t.at[0]?-t.targetWidth:0,f=-2*t.offset[0];0>u?(i=e.left+c+p+f+t.collisionWidth-o-a,(0>i||r(u)>i)&&(e.left+=c+p+f)):d>0&&(s=e.left-t.collisionPosition.marginLeft+c+p+f-h,(s>0||d>r(s))&&(e.left+=c+p+f))},top:function(e,t){var i,s,n=t.within,a=n.offset.top+n.scrollTop,o=n.height,h=n.isWindow?n.scrollTop:n.offset.top,l=e.top-t.collisionPosition.marginTop,u=l-h,d=l+t.collisionHeight-o-h,c="top"===t.my[1],p=c?-t.elemHeight:"bottom"===t.my[1]?t.elemHeight:0,f="top"===t.at[1]?t.targetHeight:"bottom"===t.at[1]?-t.targetHeight:0,m=-2*t.offset[1];0>u?(s=e.top+p+f+m+t.collisionHeight-o-a,(0>s||r(u)>s)&&(e.top+=p+f+m)):d>0&&(i=e.top-t.collisionPosition.marginTop+p+f+m-h,(i>0||d>r(i))&&(e.top+=p+f+m))}},flipfit:{left:function(){e.ui.position.flip.left.apply(this,arguments),e.ui.position.fit.left.apply(this,arguments)},top:function(){e.ui.position.flip.top.apply(this,arguments),e.ui.position.fit.top.apply(this,arguments)}}},function(){var t,i,s,n,o,r=document.getElementsByTagName("body")[0],h=document.createElement("div");t=document.createElement(r?"div":"body"),s={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},r&&e.extend(s,{position:"absolute",left:"-1000px",top:"-1000px"});for(o in s)t.style[o]=s[o];t.appendChild(h),i=r||document.documentElement,i.insertBefore(t,i.firstChild),h.style.cssText="position: absolute; left: 10.7432222px;",n=e(h).offset().left,a=n>10&&11>n,t.innerHTML="",i.removeChild(t)}()}(),e.ui.position,e.widget("ui.draggable",e.ui.mouse,{version:"1.11.4",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._setHandleClassName(),this._mouseInit()},_setOption:function(e,t){this._super(e,t),"handle"===e&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){return(this.helper||this.element).is(".ui-draggable-dragging")?(this.destroyOnClear=!0,void 0):(this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._removeHandleClassName(),this._mouseDestroy(),void 0)},_mouseCapture:function(t){var i=this.options;return this._blurActiveElement(t),this.helper||i.disabled||e(t.target).closest(".ui-resizable-handle").length>0?!1:(this.handle=this._getHandle(t),this.handle?(this._blockFrames(i.iframeFix===!0?"iframe":i.iframeFix),!0):!1)},_blockFrames:function(t){this.iframeBlocks=this.document.find(t).map(function(){var t=e(this);return e("<div>").css("position","absolute").appendTo(t.parent()).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(t){var i=this.document[0];if(this.handleElement.is(t.target))try{i.activeElement&&"body"!==i.activeElement.nodeName.toLowerCase()&&e(i.activeElement).blur()}catch(s){}},_mouseStart:function(t){var i=this.options;return this.helper=this._createHelper(t),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),e.ui.ddmanager&&(e.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=this.helper.parents().filter(function(){return"fixed"===e(this).css("position")}).length>0,this.positionAbs=this.element.offset(),this._refreshOffsets(t),this.originalPosition=this.position=this._generatePosition(t,!1),this.originalPageX=t.pageX,this.originalPageY=t.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),this._trigger("start",t)===!1?(this._clear(),!1):(this._cacheHelperProportions(),e.ui.ddmanager&&!i.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this._normalizeRightBottom(),this._mouseDrag(t,!0),e.ui.ddmanager&&e.ui.ddmanager.dragStart(this,t),!0)},_refreshOffsets:function(e){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:e.pageX-this.offset.left,top:e.pageY-this.offset.top}},_mouseDrag:function(t,i){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(t,!0),this.positionAbs=this._convertPositionTo("absolute"),!i){var s=this._uiHash();if(this._trigger("drag",t,s)===!1)return this._mouseUp({}),!1;this.position=s.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var i=this,s=!1;return e.ui.ddmanager&&!this.options.dropBehaviour&&(s=e.ui.ddmanager.drop(this,t)),this.dropped&&(s=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!s||"valid"===this.options.revert&&s||this.options.revert===!0||e.isFunction(this.options.revert)&&this.options.revert.call(this.element,s)?e(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){i._trigger("stop",t)!==!1&&i._clear()}):this._trigger("stop",t)!==!1&&this._clear(),!1},_mouseUp:function(t){return this._unblockFrames(),e.ui.ddmanager&&e.ui.ddmanager.dragStop(this,t),this.handleElement.is(t.target)&&this.element.focus(),e.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(t){return this.options.handle?!!e(t.target).closest(this.element.find(this.options.handle)).length:!0},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this.handleElement.addClass("ui-draggable-handle")},_removeHandleClassName:function(){this.handleElement.removeClass("ui-draggable-handle")},_createHelper:function(t){var i=this.options,s=e.isFunction(i.helper),n=s?e(i.helper.apply(this.element[0],[t])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return n.parents("body").length||n.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),s&&n[0]===this.element[0]&&this._setPositionRelative(),n[0]===this.element[0]||/(fixed|absolute)/.test(n.css("position"))||n.css("position","absolute"),n},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_isRootNode:function(e){return/(html|body)/i.test(e.tagName)||e===this.document[0]},_getParentOffset:function(){var t=this.offsetParent.offset(),i=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==i&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var e=this.element.position(),t=this._isRootNode(this.scrollParent[0]);return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+(t?0:this.scrollParent.scrollTop()),left:e.left-(parseInt(this.helper.css("left"),10)||0)+(t?0:this.scrollParent.scrollLeft())}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,i,s,n=this.options,a=this.document[0];return this.relativeContainer=null,n.containment?"window"===n.containment?(this.containment=[e(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,e(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,e(window).scrollLeft()+e(window).width()-this.helperProportions.width-this.margins.left,e(window).scrollTop()+(e(window).height()||a.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],void 0):"document"===n.containment?(this.containment=[0,0,e(a).width()-this.helperProportions.width-this.margins.left,(e(a).height()||a.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],void 0):n.containment.constructor===Array?(this.containment=n.containment,void 0):("parent"===n.containment&&(n.containment=this.helper[0].parentNode),i=e(n.containment),s=i[0],s&&(t=/(scroll|auto)/.test(i.css("overflow")),this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(t?Math.max(s.scrollWidth,s.offsetWidth):s.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(t?Math.max(s.scrollHeight,s.offsetHeight):s.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=i),void 0):(this.containment=null,void 0)},_convertPositionTo:function(e,t){t||(t=this.position);var i="absolute"===e?1:-1,s=this._isRootNode(this.scrollParent[0]);return{top:t.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.offset.scroll.top:s?0:this.offset.scroll.top)*i,left:t.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.offset.scroll.left:s?0:this.offset.scroll.left)*i}},_generatePosition:function(e,t){var i,s,n,a,o=this.options,r=this._isRootNode(this.scrollParent[0]),h=e.pageX,l=e.pageY;return r&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),t&&(this.containment&&(this.relativeContainer?(s=this.relativeContainer.offset(),i=[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):i=this.containment,e.pageX-this.offset.click.left<i[0]&&(h=i[0]+this.offset.click.left),e.pageY-this.offset.click.top<i[1]&&(l=i[1]+this.offset.click.top),e.pageX-this.offset.click.left>i[2]&&(h=i[2]+this.offset.click.left),e.pageY-this.offset.click.top>i[3]&&(l=i[3]+this.offset.click.top)),o.grid&&(n=o.grid[1]?this.originalPageY+Math.round((l-this.originalPageY)/o.grid[1])*o.grid[1]:this.originalPageY,l=i?n-this.offset.click.top>=i[1]||n-this.offset.click.top>i[3]?n:n-this.offset.click.top>=i[1]?n-o.grid[1]:n+o.grid[1]:n,a=o.grid[0]?this.originalPageX+Math.round((h-this.originalPageX)/o.grid[0])*o.grid[0]:this.originalPageX,h=i?a-this.offset.click.left>=i[0]||a-this.offset.click.left>i[2]?a:a-this.offset.click.left>=i[0]?a-o.grid[0]:a+o.grid[0]:a),"y"===o.axis&&(h=this.originalPageX),"x"===o.axis&&(l=this.originalPageY)),{top:l-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:r?0:this.offset.scroll.top),left:h-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:r?0:this.offset.scroll.left)} +},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_normalizeRightBottom:function(){"y"!==this.options.axis&&"auto"!==this.helper.css("right")&&(this.helper.width(this.helper.width()),this.helper.css("right","auto")),"x"!==this.options.axis&&"auto"!==this.helper.css("bottom")&&(this.helper.height(this.helper.height()),this.helper.css("bottom","auto"))},_trigger:function(t,i,s){return s=s||this._uiHash(),e.ui.plugin.call(this,t,[i,s,this],!0),/^(drag|start|stop)/.test(t)&&(this.positionAbs=this._convertPositionTo("absolute"),s.offset=this.positionAbs),e.Widget.prototype._trigger.call(this,t,i,s)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),e.ui.plugin.add("draggable","connectToSortable",{start:function(t,i,s){var n=e.extend({},i,{item:s.element});s.sortables=[],e(s.options.connectToSortable).each(function(){var i=e(this).sortable("instance");i&&!i.options.disabled&&(s.sortables.push(i),i.refreshPositions(),i._trigger("activate",t,n))})},stop:function(t,i,s){var n=e.extend({},i,{item:s.element});s.cancelHelperRemoval=!1,e.each(s.sortables,function(){var e=this;e.isOver?(e.isOver=0,s.cancelHelperRemoval=!0,e.cancelHelperRemoval=!1,e._storedCSS={position:e.placeholder.css("position"),top:e.placeholder.css("top"),left:e.placeholder.css("left")},e._mouseStop(t),e.options.helper=e.options._helper):(e.cancelHelperRemoval=!0,e._trigger("deactivate",t,n))})},drag:function(t,i,s){e.each(s.sortables,function(){var n=!1,a=this;a.positionAbs=s.positionAbs,a.helperProportions=s.helperProportions,a.offset.click=s.offset.click,a._intersectsWith(a.containerCache)&&(n=!0,e.each(s.sortables,function(){return this.positionAbs=s.positionAbs,this.helperProportions=s.helperProportions,this.offset.click=s.offset.click,this!==a&&this._intersectsWith(this.containerCache)&&e.contains(a.element[0],this.element[0])&&(n=!1),n})),n?(a.isOver||(a.isOver=1,s._parent=i.helper.parent(),a.currentItem=i.helper.appendTo(a.element).data("ui-sortable-item",!0),a.options._helper=a.options.helper,a.options.helper=function(){return i.helper[0]},t.target=a.currentItem[0],a._mouseCapture(t,!0),a._mouseStart(t,!0,!0),a.offset.click.top=s.offset.click.top,a.offset.click.left=s.offset.click.left,a.offset.parent.left-=s.offset.parent.left-a.offset.parent.left,a.offset.parent.top-=s.offset.parent.top-a.offset.parent.top,s._trigger("toSortable",t),s.dropped=a.element,e.each(s.sortables,function(){this.refreshPositions()}),s.currentItem=s.element,a.fromOutside=s),a.currentItem&&(a._mouseDrag(t),i.position=a.position)):a.isOver&&(a.isOver=0,a.cancelHelperRemoval=!0,a.options._revert=a.options.revert,a.options.revert=!1,a._trigger("out",t,a._uiHash(a)),a._mouseStop(t,!0),a.options.revert=a.options._revert,a.options.helper=a.options._helper,a.placeholder&&a.placeholder.remove(),i.helper.appendTo(s._parent),s._refreshOffsets(t),i.position=s._generatePosition(t,!0),s._trigger("fromSortable",t),s.dropped=!1,e.each(s.sortables,function(){this.refreshPositions()}))})}}),e.ui.plugin.add("draggable","cursor",{start:function(t,i,s){var n=e("body"),a=s.options;n.css("cursor")&&(a._cursor=n.css("cursor")),n.css("cursor",a.cursor)},stop:function(t,i,s){var n=s.options;n._cursor&&e("body").css("cursor",n._cursor)}}),e.ui.plugin.add("draggable","opacity",{start:function(t,i,s){var n=e(i.helper),a=s.options;n.css("opacity")&&(a._opacity=n.css("opacity")),n.css("opacity",a.opacity)},stop:function(t,i,s){var n=s.options;n._opacity&&e(i.helper).css("opacity",n._opacity)}}),e.ui.plugin.add("draggable","scroll",{start:function(e,t,i){i.scrollParentNotHidden||(i.scrollParentNotHidden=i.helper.scrollParent(!1)),i.scrollParentNotHidden[0]!==i.document[0]&&"HTML"!==i.scrollParentNotHidden[0].tagName&&(i.overflowOffset=i.scrollParentNotHidden.offset())},drag:function(t,i,s){var n=s.options,a=!1,o=s.scrollParentNotHidden[0],r=s.document[0];o!==r&&"HTML"!==o.tagName?(n.axis&&"x"===n.axis||(s.overflowOffset.top+o.offsetHeight-t.pageY<n.scrollSensitivity?o.scrollTop=a=o.scrollTop+n.scrollSpeed:t.pageY-s.overflowOffset.top<n.scrollSensitivity&&(o.scrollTop=a=o.scrollTop-n.scrollSpeed)),n.axis&&"y"===n.axis||(s.overflowOffset.left+o.offsetWidth-t.pageX<n.scrollSensitivity?o.scrollLeft=a=o.scrollLeft+n.scrollSpeed:t.pageX-s.overflowOffset.left<n.scrollSensitivity&&(o.scrollLeft=a=o.scrollLeft-n.scrollSpeed))):(n.axis&&"x"===n.axis||(t.pageY-e(r).scrollTop()<n.scrollSensitivity?a=e(r).scrollTop(e(r).scrollTop()-n.scrollSpeed):e(window).height()-(t.pageY-e(r).scrollTop())<n.scrollSensitivity&&(a=e(r).scrollTop(e(r).scrollTop()+n.scrollSpeed))),n.axis&&"y"===n.axis||(t.pageX-e(r).scrollLeft()<n.scrollSensitivity?a=e(r).scrollLeft(e(r).scrollLeft()-n.scrollSpeed):e(window).width()-(t.pageX-e(r).scrollLeft())<n.scrollSensitivity&&(a=e(r).scrollLeft(e(r).scrollLeft()+n.scrollSpeed)))),a!==!1&&e.ui.ddmanager&&!n.dropBehaviour&&e.ui.ddmanager.prepareOffsets(s,t)}}),e.ui.plugin.add("draggable","snap",{start:function(t,i,s){var n=s.options;s.snapElements=[],e(n.snap.constructor!==String?n.snap.items||":data(ui-draggable)":n.snap).each(function(){var t=e(this),i=t.offset();this!==s.element[0]&&s.snapElements.push({item:this,width:t.outerWidth(),height:t.outerHeight(),top:i.top,left:i.left})})},drag:function(t,i,s){var n,a,o,r,h,l,u,d,c,p,f=s.options,m=f.snapTolerance,g=i.offset.left,v=g+s.helperProportions.width,y=i.offset.top,b=y+s.helperProportions.height;for(c=s.snapElements.length-1;c>=0;c--)h=s.snapElements[c].left-s.margins.left,l=h+s.snapElements[c].width,u=s.snapElements[c].top-s.margins.top,d=u+s.snapElements[c].height,h-m>v||g>l+m||u-m>b||y>d+m||!e.contains(s.snapElements[c].item.ownerDocument,s.snapElements[c].item)?(s.snapElements[c].snapping&&s.options.snap.release&&s.options.snap.release.call(s.element,t,e.extend(s._uiHash(),{snapItem:s.snapElements[c].item})),s.snapElements[c].snapping=!1):("inner"!==f.snapMode&&(n=m>=Math.abs(u-b),a=m>=Math.abs(d-y),o=m>=Math.abs(h-v),r=m>=Math.abs(l-g),n&&(i.position.top=s._convertPositionTo("relative",{top:u-s.helperProportions.height,left:0}).top),a&&(i.position.top=s._convertPositionTo("relative",{top:d,left:0}).top),o&&(i.position.left=s._convertPositionTo("relative",{top:0,left:h-s.helperProportions.width}).left),r&&(i.position.left=s._convertPositionTo("relative",{top:0,left:l}).left)),p=n||a||o||r,"outer"!==f.snapMode&&(n=m>=Math.abs(u-y),a=m>=Math.abs(d-b),o=m>=Math.abs(h-g),r=m>=Math.abs(l-v),n&&(i.position.top=s._convertPositionTo("relative",{top:u,left:0}).top),a&&(i.position.top=s._convertPositionTo("relative",{top:d-s.helperProportions.height,left:0}).top),o&&(i.position.left=s._convertPositionTo("relative",{top:0,left:h}).left),r&&(i.position.left=s._convertPositionTo("relative",{top:0,left:l-s.helperProportions.width}).left)),!s.snapElements[c].snapping&&(n||a||o||r||p)&&s.options.snap.snap&&s.options.snap.snap.call(s.element,t,e.extend(s._uiHash(),{snapItem:s.snapElements[c].item})),s.snapElements[c].snapping=n||a||o||r||p)}}),e.ui.plugin.add("draggable","stack",{start:function(t,i,s){var n,a=s.options,o=e.makeArray(e(a.stack)).sort(function(t,i){return(parseInt(e(t).css("zIndex"),10)||0)-(parseInt(e(i).css("zIndex"),10)||0)});o.length&&(n=parseInt(e(o[0]).css("zIndex"),10)||0,e(o).each(function(t){e(this).css("zIndex",n+t)}),this.css("zIndex",n+o.length))}}),e.ui.plugin.add("draggable","zIndex",{start:function(t,i,s){var n=e(i.helper),a=s.options;n.css("zIndex")&&(a._zIndex=n.css("zIndex")),n.css("zIndex",a.zIndex)},stop:function(t,i,s){var n=s.options;n._zIndex&&e(i.helper).css("zIndex",n._zIndex)}}),e.ui.draggable,e.widget("ui.droppable",{version:"1.11.4",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var t,i=this.options,s=i.accept;this.isover=!1,this.isout=!0,this.accept=e.isFunction(s)?s:function(e){return e.is(s)},this.proportions=function(){return arguments.length?(t=arguments[0],void 0):t?t:t={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight}},this._addToManager(i.scope),i.addClasses&&this.element.addClass("ui-droppable")},_addToManager:function(t){e.ui.ddmanager.droppables[t]=e.ui.ddmanager.droppables[t]||[],e.ui.ddmanager.droppables[t].push(this)},_splice:function(e){for(var t=0;e.length>t;t++)e[t]===this&&e.splice(t,1)},_destroy:function(){var t=e.ui.ddmanager.droppables[this.options.scope];this._splice(t),this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(t,i){if("accept"===t)this.accept=e.isFunction(i)?i:function(e){return e.is(i)};else if("scope"===t){var s=e.ui.ddmanager.droppables[this.options.scope];this._splice(s),this._addToManager(i)}this._super(t,i)},_activate:function(t){var i=e.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),i&&this._trigger("activate",t,this.ui(i))},_deactivate:function(t){var i=e.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),i&&this._trigger("deactivate",t,this.ui(i))},_over:function(t){var i=e.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",t,this.ui(i)))},_out:function(t){var i=e.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",t,this.ui(i)))},_drop:function(t,i){var s=i||e.ui.ddmanager.current,n=!1;return s&&(s.currentItem||s.element)[0]!==this.element[0]?(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var i=e(this).droppable("instance");return i.options.greedy&&!i.options.disabled&&i.options.scope===s.options.scope&&i.accept.call(i.element[0],s.currentItem||s.element)&&e.ui.intersect(s,e.extend(i,{offset:i.element.offset()}),i.options.tolerance,t)?(n=!0,!1):void 0}),n?!1:this.accept.call(this.element[0],s.currentItem||s.element)?(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",t,this.ui(s)),this.element):!1):!1},ui:function(e){return{draggable:e.currentItem||e.element,helper:e.helper,position:e.position,offset:e.positionAbs}}}),e.ui.intersect=function(){function e(e,t,i){return e>=t&&t+i>e}return function(t,i,s,n){if(!i.offset)return!1;var a=(t.positionAbs||t.position.absolute).left+t.margins.left,o=(t.positionAbs||t.position.absolute).top+t.margins.top,r=a+t.helperProportions.width,h=o+t.helperProportions.height,l=i.offset.left,u=i.offset.top,d=l+i.proportions().width,c=u+i.proportions().height;switch(s){case"fit":return a>=l&&d>=r&&o>=u&&c>=h;case"intersect":return a+t.helperProportions.width/2>l&&d>r-t.helperProportions.width/2&&o+t.helperProportions.height/2>u&&c>h-t.helperProportions.height/2;case"pointer":return e(n.pageY,u,i.proportions().height)&&e(n.pageX,l,i.proportions().width);case"touch":return(o>=u&&c>=o||h>=u&&c>=h||u>o&&h>c)&&(a>=l&&d>=a||r>=l&&d>=r||l>a&&r>d);default:return!1}}}(),e.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(t,i){var s,n,a=e.ui.ddmanager.droppables[t.options.scope]||[],o=i?i.type:null,r=(t.currentItem||t.element).find(":data(ui-droppable)").addBack();e:for(s=0;a.length>s;s++)if(!(a[s].options.disabled||t&&!a[s].accept.call(a[s].element[0],t.currentItem||t.element))){for(n=0;r.length>n;n++)if(r[n]===a[s].element[0]){a[s].proportions().height=0;continue e}a[s].visible="none"!==a[s].element.css("display"),a[s].visible&&("mousedown"===o&&a[s]._activate.call(a[s],i),a[s].offset=a[s].element.offset(),a[s].proportions({width:a[s].element[0].offsetWidth,height:a[s].element[0].offsetHeight}))}},drop:function(t,i){var s=!1;return e.each((e.ui.ddmanager.droppables[t.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&e.ui.intersect(t,this,this.options.tolerance,i)&&(s=this._drop.call(this,i)||s),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],t.currentItem||t.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,i)))}),s},dragStart:function(t,i){t.element.parentsUntil("body").bind("scroll.droppable",function(){t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,i)})},drag:function(t,i){t.options.refreshPositions&&e.ui.ddmanager.prepareOffsets(t,i),e.each(e.ui.ddmanager.droppables[t.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var s,n,a,o=e.ui.intersect(t,this,this.options.tolerance,i),r=!o&&this.isover?"isout":o&&!this.isover?"isover":null;r&&(this.options.greedy&&(n=this.options.scope,a=this.element.parents(":data(ui-droppable)").filter(function(){return e(this).droppable("instance").options.scope===n}),a.length&&(s=e(a[0]).droppable("instance"),s.greedyChild="isover"===r)),s&&"isover"===r&&(s.isover=!1,s.isout=!0,s._out.call(s,i)),this[r]=!0,this["isout"===r?"isover":"isout"]=!1,this["isover"===r?"_over":"_out"].call(this,i),s&&"isout"===r&&(s.isout=!1,s.isover=!0,s._over.call(s,i)))}})},dragStop:function(t,i){t.element.parentsUntil("body").unbind("scroll.droppable"),t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,i)}},e.ui.droppable,e.widget("ui.resizable",e.ui.mouse,{version:"1.11.4",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(e){return parseInt(e,10)||0},_isNumber:function(e){return!isNaN(parseInt(e,10))},_hasScroll:function(t,i){if("hidden"===e(t).css("overflow"))return!1;var s=i&&"left"===i?"scrollLeft":"scrollTop",n=!1;return t[s]>0?!0:(t[s]=1,n=t[s]>0,t[s]=0,n)},_create:function(){var t,i,s,n,a,o=this,r=this.options;if(this.element.addClass("ui-resizable"),e.extend(this,{_aspectRatio:!!r.aspectRatio,aspectRatio:r.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:r.helper||r.ghost||r.animate?r.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(e("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=r.handles||(e(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=e(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),t=this.handles.split(","),this.handles={},i=0;t.length>i;i++)s=e.trim(t[i]),a="ui-resizable-"+s,n=e("<div class='ui-resizable-handle "+a+"'></div>"),n.css({zIndex:r.zIndex}),"se"===s&&n.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[s]=".ui-resizable-"+s,this.element.append(n);this._renderAxis=function(t){var i,s,n,a;t=t||this.element;for(i in this.handles)this.handles[i].constructor===String?this.handles[i]=this.element.children(this.handles[i]).first().show():(this.handles[i].jquery||this.handles[i].nodeType)&&(this.handles[i]=e(this.handles[i]),this._on(this.handles[i],{mousedown:o._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(s=e(this.handles[i],this.element),a=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(),n=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),t.css(n,a),this._proportionallyResize()),this._handles=this._handles.add(this.handles[i])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.mouseover(function(){o.resizing||(this.className&&(n=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),o.axis=n&&n[1]?n[1]:"se")}),r.autoHide&&(this._handles.hide(),e(this.element).addClass("ui-resizable-autohide").mouseenter(function(){r.disabled||(e(this).removeClass("ui-resizable-autohide"),o._handles.show())}).mouseleave(function(){r.disabled||o.resizing||(e(this).addClass("ui-resizable-autohide"),o._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var t,i=function(t){e(t).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),t=this.element,this.originalElement.css({position:t.css("position"),width:t.outerWidth(),height:t.outerHeight(),top:t.css("top"),left:t.css("left")}).insertAfter(t),t.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_mouseCapture:function(t){var i,s,n=!1;for(i in this.handles)s=e(this.handles[i])[0],(s===t.target||e.contains(s,t.target))&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(t){var i,s,n,a=this.options,o=this.element;return this.resizing=!0,this._renderProxy(),i=this._num(this.helper.css("left")),s=this._num(this.helper.css("top")),a.containment&&(i+=e(a.containment).scrollLeft()||0,s+=e(a.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:i,top:s},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:o.width(),height:o.height()},this.originalSize=this._helper?{width:o.outerWidth(),height:o.outerHeight()}:{width:o.width(),height:o.height()},this.sizeDiff={width:o.outerWidth()-o.width(),height:o.outerHeight()-o.height()},this.originalPosition={left:i,top:s},this.originalMousePosition={left:t.pageX,top:t.pageY},this.aspectRatio="number"==typeof a.aspectRatio?a.aspectRatio:this.originalSize.width/this.originalSize.height||1,n=e(".ui-resizable-"+this.axis).css("cursor"),e("body").css("cursor","auto"===n?this.axis+"-resize":n),o.addClass("ui-resizable-resizing"),this._propagate("start",t),!0},_mouseDrag:function(t){var i,s,n=this.originalMousePosition,a=this.axis,o=t.pageX-n.left||0,r=t.pageY-n.top||0,h=this._change[a];return this._updatePrevProperties(),h?(i=h.apply(this,[t,o,r]),this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(i=this._updateRatio(i,t)),i=this._respectSize(i,t),this._updateCache(i),this._propagate("resize",t),s=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),e.isEmptyObject(s)||(this._updatePrevProperties(),this._trigger("resize",t,this.ui()),this._applyChanges()),!1):!1},_mouseStop:function(t){this.resizing=!1;var i,s,n,a,o,r,h,l=this.options,u=this;return this._helper&&(i=this._proportionallyResizeElements,s=i.length&&/textarea/i.test(i[0].nodeName),n=s&&this._hasScroll(i[0],"left")?0:u.sizeDiff.height,a=s?0:u.sizeDiff.width,o={width:u.helper.width()-a,height:u.helper.height()-n},r=parseInt(u.element.css("left"),10)+(u.position.left-u.originalPosition.left)||null,h=parseInt(u.element.css("top"),10)+(u.position.top-u.originalPosition.top)||null,l.animate||this.element.css(e.extend(o,{top:h,left:r})),u.helper.height(u.size.height),u.helper.width(u.size.width),this._helper&&!l.animate&&this._proportionallyResize()),e("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var e={};return this.position.top!==this.prevPosition.top&&(e.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(e.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(e.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(e.height=this.size.height+"px"),this.helper.css(e),e},_updateVirtualBoundaries:function(e){var t,i,s,n,a,o=this.options;a={minWidth:this._isNumber(o.minWidth)?o.minWidth:0,maxWidth:this._isNumber(o.maxWidth)?o.maxWidth:1/0,minHeight:this._isNumber(o.minHeight)?o.minHeight:0,maxHeight:this._isNumber(o.maxHeight)?o.maxHeight:1/0},(this._aspectRatio||e)&&(t=a.minHeight*this.aspectRatio,s=a.minWidth/this.aspectRatio,i=a.maxHeight*this.aspectRatio,n=a.maxWidth/this.aspectRatio,t>a.minWidth&&(a.minWidth=t),s>a.minHeight&&(a.minHeight=s),a.maxWidth>i&&(a.maxWidth=i),a.maxHeight>n&&(a.maxHeight=n)),this._vBoundaries=a},_updateCache:function(e){this.offset=this.helper.offset(),this._isNumber(e.left)&&(this.position.left=e.left),this._isNumber(e.top)&&(this.position.top=e.top),this._isNumber(e.height)&&(this.size.height=e.height),this._isNumber(e.width)&&(this.size.width=e.width)},_updateRatio:function(e){var t=this.position,i=this.size,s=this.axis;return this._isNumber(e.height)?e.width=e.height*this.aspectRatio:this._isNumber(e.width)&&(e.height=e.width/this.aspectRatio),"sw"===s&&(e.left=t.left+(i.width-e.width),e.top=null),"nw"===s&&(e.top=t.top+(i.height-e.height),e.left=t.left+(i.width-e.width)),e},_respectSize:function(e){var t=this._vBoundaries,i=this.axis,s=this._isNumber(e.width)&&t.maxWidth&&t.maxWidth<e.width,n=this._isNumber(e.height)&&t.maxHeight&&t.maxHeight<e.height,a=this._isNumber(e.width)&&t.minWidth&&t.minWidth>e.width,o=this._isNumber(e.height)&&t.minHeight&&t.minHeight>e.height,r=this.originalPosition.left+this.originalSize.width,h=this.position.top+this.size.height,l=/sw|nw|w/.test(i),u=/nw|ne|n/.test(i);return a&&(e.width=t.minWidth),o&&(e.height=t.minHeight),s&&(e.width=t.maxWidth),n&&(e.height=t.maxHeight),a&&l&&(e.left=r-t.minWidth),s&&l&&(e.left=r-t.maxWidth),o&&u&&(e.top=h-t.minHeight),n&&u&&(e.top=h-t.maxHeight),e.width||e.height||e.left||!e.top?e.width||e.height||e.top||!e.left||(e.left=null):e.top=null,e},_getPaddingPlusBorderDimensions:function(e){for(var t=0,i=[],s=[e.css("borderTopWidth"),e.css("borderRightWidth"),e.css("borderBottomWidth"),e.css("borderLeftWidth")],n=[e.css("paddingTop"),e.css("paddingRight"),e.css("paddingBottom"),e.css("paddingLeft")];4>t;t++)i[t]=parseInt(s[t],10)||0,i[t]+=parseInt(n[t],10)||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var e,t=0,i=this.helper||this.element;this._proportionallyResizeElements.length>t;t++)e=this._proportionallyResizeElements[t],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(e)),e.css({height:i.height()-this.outerDimensions.height||0,width:i.width()-this.outerDimensions.width||0})},_renderProxy:function(){var t=this.element,i=this.options;this.elementOffset=t.offset(),this._helper?(this.helper=this.helper||e("<div style='overflow:hidden;'></div>"),this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(e,t){return{width:this.originalSize.width+t}},w:function(e,t){var i=this.originalSize,s=this.originalPosition;return{left:s.left+t,width:i.width-t}},n:function(e,t,i){var s=this.originalSize,n=this.originalPosition;return{top:n.top+i,height:s.height-i}},s:function(e,t,i){return{height:this.originalSize.height+i}},se:function(t,i,s){return e.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,i,s]))},sw:function(t,i,s){return e.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,i,s]))},ne:function(t,i,s){return e.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,i,s]))},nw:function(t,i,s){return e.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,i,s]))}},_propagate:function(t,i){e.ui.plugin.call(this,t,[i,this.ui()]),"resize"!==t&&this._trigger(t,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),e.ui.plugin.add("resizable","animate",{stop:function(t){var i=e(this).resizable("instance"),s=i.options,n=i._proportionallyResizeElements,a=n.length&&/textarea/i.test(n[0].nodeName),o=a&&i._hasScroll(n[0],"left")?0:i.sizeDiff.height,r=a?0:i.sizeDiff.width,h={width:i.size.width-r,height:i.size.height-o},l=parseInt(i.element.css("left"),10)+(i.position.left-i.originalPosition.left)||null,u=parseInt(i.element.css("top"),10)+(i.position.top-i.originalPosition.top)||null;i.element.animate(e.extend(h,u&&l?{top:u,left:l}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var s={width:parseInt(i.element.css("width"),10),height:parseInt(i.element.css("height"),10),top:parseInt(i.element.css("top"),10),left:parseInt(i.element.css("left"),10)};n&&n.length&&e(n[0]).css({width:s.width,height:s.height}),i._updateCache(s),i._propagate("resize",t)}})}}),e.ui.plugin.add("resizable","containment",{start:function(){var t,i,s,n,a,o,r,h=e(this).resizable("instance"),l=h.options,u=h.element,d=l.containment,c=d instanceof e?d.get(0):/parent/.test(d)?u.parent().get(0):d;c&&(h.containerElement=e(c),/document/.test(d)||d===document?(h.containerOffset={left:0,top:0},h.containerPosition={left:0,top:0},h.parentData={element:e(document),left:0,top:0,width:e(document).width(),height:e(document).height()||document.body.parentNode.scrollHeight}):(t=e(c),i=[],e(["Top","Right","Left","Bottom"]).each(function(e,s){i[e]=h._num(t.css("padding"+s))}),h.containerOffset=t.offset(),h.containerPosition=t.position(),h.containerSize={height:t.innerHeight()-i[3],width:t.innerWidth()-i[1]},s=h.containerOffset,n=h.containerSize.height,a=h.containerSize.width,o=h._hasScroll(c,"left")?c.scrollWidth:a,r=h._hasScroll(c)?c.scrollHeight:n,h.parentData={element:c,left:s.left,top:s.top,width:o,height:r}))},resize:function(t){var i,s,n,a,o=e(this).resizable("instance"),r=o.options,h=o.containerOffset,l=o.position,u=o._aspectRatio||t.shiftKey,d={top:0,left:0},c=o.containerElement,p=!0;c[0]!==document&&/static/.test(c.css("position"))&&(d=h),l.left<(o._helper?h.left:0)&&(o.size.width=o.size.width+(o._helper?o.position.left-h.left:o.position.left-d.left),u&&(o.size.height=o.size.width/o.aspectRatio,p=!1),o.position.left=r.helper?h.left:0),l.top<(o._helper?h.top:0)&&(o.size.height=o.size.height+(o._helper?o.position.top-h.top:o.position.top),u&&(o.size.width=o.size.height*o.aspectRatio,p=!1),o.position.top=o._helper?h.top:0),n=o.containerElement.get(0)===o.element.parent().get(0),a=/relative|absolute/.test(o.containerElement.css("position")),n&&a?(o.offset.left=o.parentData.left+o.position.left,o.offset.top=o.parentData.top+o.position.top):(o.offset.left=o.element.offset().left,o.offset.top=o.element.offset().top),i=Math.abs(o.sizeDiff.width+(o._helper?o.offset.left-d.left:o.offset.left-h.left)),s=Math.abs(o.sizeDiff.height+(o._helper?o.offset.top-d.top:o.offset.top-h.top)),i+o.size.width>=o.parentData.width&&(o.size.width=o.parentData.width-i,u&&(o.size.height=o.size.width/o.aspectRatio,p=!1)),s+o.size.height>=o.parentData.height&&(o.size.height=o.parentData.height-s,u&&(o.size.width=o.size.height*o.aspectRatio,p=!1)),p||(o.position.left=o.prevPosition.left,o.position.top=o.prevPosition.top,o.size.width=o.prevSize.width,o.size.height=o.prevSize.height)},stop:function(){var t=e(this).resizable("instance"),i=t.options,s=t.containerOffset,n=t.containerPosition,a=t.containerElement,o=e(t.helper),r=o.offset(),h=o.outerWidth()-t.sizeDiff.width,l=o.outerHeight()-t.sizeDiff.height;t._helper&&!i.animate&&/relative/.test(a.css("position"))&&e(this).css({left:r.left-n.left-s.left,width:h,height:l}),t._helper&&!i.animate&&/static/.test(a.css("position"))&&e(this).css({left:r.left-n.left-s.left,width:h,height:l})}}),e.ui.plugin.add("resizable","alsoResize",{start:function(){var t=e(this).resizable("instance"),i=t.options;e(i.alsoResize).each(function(){var t=e(this);t.data("ui-resizable-alsoresize",{width:parseInt(t.width(),10),height:parseInt(t.height(),10),left:parseInt(t.css("left"),10),top:parseInt(t.css("top"),10)})})},resize:function(t,i){var s=e(this).resizable("instance"),n=s.options,a=s.originalSize,o=s.originalPosition,r={height:s.size.height-a.height||0,width:s.size.width-a.width||0,top:s.position.top-o.top||0,left:s.position.left-o.left||0};e(n.alsoResize).each(function(){var t=e(this),s=e(this).data("ui-resizable-alsoresize"),n={},a=t.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];e.each(a,function(e,t){var i=(s[t]||0)+(r[t]||0);i&&i>=0&&(n[t]=i||null)}),t.css(n)})},stop:function(){e(this).removeData("resizable-alsoresize")}}),e.ui.plugin.add("resizable","ghost",{start:function(){var t=e(this).resizable("instance"),i=t.options,s=t.size;t.ghost=t.originalElement.clone(),t.ghost.css({opacity:.25,display:"block",position:"relative",height:s.height,width:s.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof i.ghost?i.ghost:""),t.ghost.appendTo(t.helper)},resize:function(){var t=e(this).resizable("instance");t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=e(this).resizable("instance");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}}),e.ui.plugin.add("resizable","grid",{resize:function(){var t,i=e(this).resizable("instance"),s=i.options,n=i.size,a=i.originalSize,o=i.originalPosition,r=i.axis,h="number"==typeof s.grid?[s.grid,s.grid]:s.grid,l=h[0]||1,u=h[1]||1,d=Math.round((n.width-a.width)/l)*l,c=Math.round((n.height-a.height)/u)*u,p=a.width+d,f=a.height+c,m=s.maxWidth&&p>s.maxWidth,g=s.maxHeight&&f>s.maxHeight,v=s.minWidth&&s.minWidth>p,y=s.minHeight&&s.minHeight>f;s.grid=h,v&&(p+=l),y&&(f+=u),m&&(p-=l),g&&(f-=u),/^(se|s|e)$/.test(r)?(i.size.width=p,i.size.height=f):/^(ne)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.top=o.top-c):/^(sw)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.left=o.left-d):((0>=f-u||0>=p-l)&&(t=i._getPaddingPlusBorderDimensions(this)),f-u>0?(i.size.height=f,i.position.top=o.top-c):(f=u-t.height,i.size.height=f,i.position.top=o.top+a.height-f),p-l>0?(i.size.width=p,i.position.left=o.left-d):(p=l-t.width,i.size.width=p,i.position.left=o.left+a.width-p))}}),e.ui.resizable,e.widget("ui.selectable",e.ui.mouse,{version:"1.11.4",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var t,i=this; +this.element.addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){t=e(i.options.filter,i.element[0]),t.addClass("ui-selectee"),t.each(function(){var t=e(this),i=t.offset();e.data(this,"selectable-item",{element:this,$element:t,left:i.left,top:i.top,right:i.left+t.outerWidth(),bottom:i.top+t.outerHeight(),startselected:!1,selected:t.hasClass("ui-selected"),selecting:t.hasClass("ui-selecting"),unselecting:t.hasClass("ui-unselecting")})})},this.refresh(),this.selectees=t.addClass("ui-selectee"),this._mouseInit(),this.helper=e("<div class='ui-selectable-helper'></div>")},_destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item"),this.element.removeClass("ui-selectable ui-selectable-disabled"),this._mouseDestroy()},_mouseStart:function(t){var i=this,s=this.options;this.opos=[t.pageX,t.pageY],this.options.disabled||(this.selectees=e(s.filter,this.element[0]),this._trigger("start",t),e(s.appendTo).append(this.helper),this.helper.css({left:t.pageX,top:t.pageY,width:0,height:0}),s.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var s=e.data(this,"selectable-item");s.startselected=!0,t.metaKey||t.ctrlKey||(s.$element.removeClass("ui-selected"),s.selected=!1,s.$element.addClass("ui-unselecting"),s.unselecting=!0,i._trigger("unselecting",t,{unselecting:s.element}))}),e(t.target).parents().addBack().each(function(){var s,n=e.data(this,"selectable-item");return n?(s=!t.metaKey&&!t.ctrlKey||!n.$element.hasClass("ui-selected"),n.$element.removeClass(s?"ui-unselecting":"ui-selected").addClass(s?"ui-selecting":"ui-unselecting"),n.unselecting=!s,n.selecting=s,n.selected=s,s?i._trigger("selecting",t,{selecting:n.element}):i._trigger("unselecting",t,{unselecting:n.element}),!1):void 0}))},_mouseDrag:function(t){if(this.dragged=!0,!this.options.disabled){var i,s=this,n=this.options,a=this.opos[0],o=this.opos[1],r=t.pageX,h=t.pageY;return a>r&&(i=r,r=a,a=i),o>h&&(i=h,h=o,o=i),this.helper.css({left:a,top:o,width:r-a,height:h-o}),this.selectees.each(function(){var i=e.data(this,"selectable-item"),l=!1;i&&i.element!==s.element[0]&&("touch"===n.tolerance?l=!(i.left>r||a>i.right||i.top>h||o>i.bottom):"fit"===n.tolerance&&(l=i.left>a&&r>i.right&&i.top>o&&h>i.bottom),l?(i.selected&&(i.$element.removeClass("ui-selected"),i.selected=!1),i.unselecting&&(i.$element.removeClass("ui-unselecting"),i.unselecting=!1),i.selecting||(i.$element.addClass("ui-selecting"),i.selecting=!0,s._trigger("selecting",t,{selecting:i.element}))):(i.selecting&&((t.metaKey||t.ctrlKey)&&i.startselected?(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.$element.addClass("ui-selected"),i.selected=!0):(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.startselected&&(i.$element.addClass("ui-unselecting"),i.unselecting=!0),s._trigger("unselecting",t,{unselecting:i.element}))),i.selected&&(t.metaKey||t.ctrlKey||i.startselected||(i.$element.removeClass("ui-selected"),i.selected=!1,i.$element.addClass("ui-unselecting"),i.unselecting=!0,s._trigger("unselecting",t,{unselecting:i.element})))))}),!1}},_mouseStop:function(t){var i=this;return this.dragged=!1,e(".ui-unselecting",this.element[0]).each(function(){var s=e.data(this,"selectable-item");s.$element.removeClass("ui-unselecting"),s.unselecting=!1,s.startselected=!1,i._trigger("unselected",t,{unselected:s.element})}),e(".ui-selecting",this.element[0]).each(function(){var s=e.data(this,"selectable-item");s.$element.removeClass("ui-selecting").addClass("ui-selected"),s.selecting=!1,s.selected=!0,s.startselected=!0,i._trigger("selected",t,{selected:s.element})}),this._trigger("stop",t),this.helper.remove(),!1}}),e.widget("ui.sortable",e.ui.mouse,{version:"1.11.4",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(e,t,i){return e>=t&&t+i>e},_isFloating:function(e){return/left|right/.test(e.css("float"))||/inline|table-cell/.test(e.css("display"))},_create:function(){this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(e,t){this._super(e,t),"handle"===e&&this._setHandleClassName()},_setHandleClassName:function(){this.element.find(".ui-sortable-handle").removeClass("ui-sortable-handle"),e.each(this.items,function(){(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item).addClass("ui-sortable-handle")})},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").find(".ui-sortable-handle").removeClass("ui-sortable-handle"),this._mouseDestroy();for(var e=this.items.length-1;e>=0;e--)this.items[e].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(t,i){var s=null,n=!1,a=this;return this.reverting?!1:this.options.disabled||"static"===this.options.type?!1:(this._refreshItems(t),e(t.target).parents().each(function(){return e.data(this,a.widgetName+"-item")===a?(s=e(this),!1):void 0}),e.data(t.target,a.widgetName+"-item")===a&&(s=e(t.target)),s?!this.options.handle||i||(e(this.options.handle,s).find("*").addBack().each(function(){this===t.target&&(n=!0)}),n)?(this.currentItem=s,this._removeCurrentsFromItems(),!0):!1:!1)},_mouseStart:function(t,i,s){var n,a,o=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(t),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},e.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,o.cursorAt&&this._adjustOffsetFromHelper(o.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),o.containment&&this._setContainment(),o.cursor&&"auto"!==o.cursor&&(a=this.document.find("body"),this.storedCursor=a.css("cursor"),a.css("cursor",o.cursor),this.storedStylesheet=e("<style>*{ cursor: "+o.cursor+" !important; }</style>").appendTo(a)),o.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",o.opacity)),o.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",o.zIndex)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",t,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!s)for(n=this.containers.length-1;n>=0;n--)this.containers[n]._trigger("activate",t,this._uiHash(this));return e.ui.ddmanager&&(e.ui.ddmanager.current=this),e.ui.ddmanager&&!o.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(t),!0},_mouseDrag:function(t){var i,s,n,a,o=this.options,r=!1;for(this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageY<o.scrollSensitivity?this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop+o.scrollSpeed:t.pageY-this.overflowOffset.top<o.scrollSensitivity&&(this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop-o.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-t.pageX<o.scrollSensitivity?this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft+o.scrollSpeed:t.pageX-this.overflowOffset.left<o.scrollSensitivity&&(this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft-o.scrollSpeed)):(t.pageY-this.document.scrollTop()<o.scrollSensitivity?r=this.document.scrollTop(this.document.scrollTop()-o.scrollSpeed):this.window.height()-(t.pageY-this.document.scrollTop())<o.scrollSensitivity&&(r=this.document.scrollTop(this.document.scrollTop()+o.scrollSpeed)),t.pageX-this.document.scrollLeft()<o.scrollSensitivity?r=this.document.scrollLeft(this.document.scrollLeft()-o.scrollSpeed):this.window.width()-(t.pageX-this.document.scrollLeft())<o.scrollSensitivity&&(r=this.document.scrollLeft(this.document.scrollLeft()+o.scrollSpeed))),r!==!1&&e.ui.ddmanager&&!o.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),i=this.items.length-1;i>=0;i--)if(s=this.items[i],n=s.item[0],a=this._intersectsWithPointer(s),a&&s.instance===this.currentContainer&&n!==this.currentItem[0]&&this.placeholder[1===a?"next":"prev"]()[0]!==n&&!e.contains(this.placeholder[0],n)&&("semi-dynamic"===this.options.type?!e.contains(this.element[0],n):!0)){if(this.direction=1===a?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(s))break;this._rearrange(t,s),this._trigger("change",t,this._uiHash());break}return this._contactContainers(t),e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),this._trigger("sort",t,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(t,i){if(t){if(e.ui.ddmanager&&!this.options.dropBehaviour&&e.ui.ddmanager.drop(this,t),this.options.revert){var s=this,n=this.placeholder.offset(),a=this.options.axis,o={};a&&"x"!==a||(o.left=n.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),a&&"y"!==a||(o.top=n.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,e(this.helper).animate(o,parseInt(this.options.revert,10)||500,function(){s._clear(t)})}else this._clear(t,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null}),"original"===this.options.helper?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var t=this.containers.length-1;t>=0;t--)this.containers[t]._trigger("deactivate",null,this._uiHash(this)),this.containers[t].containerCache.over&&(this.containers[t]._trigger("out",null,this._uiHash(this)),this.containers[t].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),e.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?e(this.domPosition.prev).after(this.currentItem):e(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(t){var i=this._getItemsAsjQuery(t&&t.connected),s=[];return t=t||{},e(i).each(function(){var i=(e(t.item||this).attr(t.attribute||"id")||"").match(t.expression||/(.+)[\-=_](.+)/);i&&s.push((t.key||i[1]+"[]")+"="+(t.key&&t.expression?i[1]:i[2]))}),!s.length&&t.key&&s.push(t.key+"="),s.join("&")},toArray:function(t){var i=this._getItemsAsjQuery(t&&t.connected),s=[];return t=t||{},i.each(function(){s.push(e(t.item||this).attr(t.attribute||"id")||"")}),s},_intersectsWith:function(e){var t=this.positionAbs.left,i=t+this.helperProportions.width,s=this.positionAbs.top,n=s+this.helperProportions.height,a=e.left,o=a+e.width,r=e.top,h=r+e.height,l=this.offset.click.top,u=this.offset.click.left,d="x"===this.options.axis||s+l>r&&h>s+l,c="y"===this.options.axis||t+u>a&&o>t+u,p=d&&c;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>e[this.floating?"width":"height"]?p:t+this.helperProportions.width/2>a&&o>i-this.helperProportions.width/2&&s+this.helperProportions.height/2>r&&h>n-this.helperProportions.height/2},_intersectsWithPointer:function(e){var t="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,e.top,e.height),i="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,e.left,e.width),s=t&&i,n=this._getDragVerticalDirection(),a=this._getDragHorizontalDirection();return s?this.floating?a&&"right"===a||"down"===n?2:1:n&&("down"===n?2:1):!1},_intersectsWithSides:function(e){var t=this._isOverAxis(this.positionAbs.top+this.offset.click.top,e.top+e.height/2,e.height),i=this._isOverAxis(this.positionAbs.left+this.offset.click.left,e.left+e.width/2,e.width),s=this._getDragVerticalDirection(),n=this._getDragHorizontalDirection();return this.floating&&n?"right"===n&&i||"left"===n&&!i:s&&("down"===s&&t||"up"===s&&!t)},_getDragVerticalDirection:function(){var e=this.positionAbs.top-this.lastPositionAbs.top;return 0!==e&&(e>0?"down":"up")},_getDragHorizontalDirection:function(){var e=this.positionAbs.left-this.lastPositionAbs.left;return 0!==e&&(e>0?"right":"left")},refresh:function(e){return this._refreshItems(e),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var e=this.options;return e.connectWith.constructor===String?[e.connectWith]:e.connectWith},_getItemsAsjQuery:function(t){function i(){r.push(this)}var s,n,a,o,r=[],h=[],l=this._connectWith();if(l&&t)for(s=l.length-1;s>=0;s--)for(a=e(l[s],this.document[0]),n=a.length-1;n>=0;n--)o=e.data(a[n],this.widgetFullName),o&&o!==this&&!o.options.disabled&&h.push([e.isFunction(o.options.items)?o.options.items.call(o.element):e(o.options.items,o.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),o]);for(h.push([e.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):e(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),s=h.length-1;s>=0;s--)h[s][0].each(i);return e(r)},_removeCurrentsFromItems:function(){var t=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=e.grep(this.items,function(e){for(var i=0;t.length>i;i++)if(t[i]===e.item[0])return!1;return!0})},_refreshItems:function(t){this.items=[],this.containers=[this];var i,s,n,a,o,r,h,l,u=this.items,d=[[e.isFunction(this.options.items)?this.options.items.call(this.element[0],t,{item:this.currentItem}):e(this.options.items,this.element),this]],c=this._connectWith();if(c&&this.ready)for(i=c.length-1;i>=0;i--)for(n=e(c[i],this.document[0]),s=n.length-1;s>=0;s--)a=e.data(n[s],this.widgetFullName),a&&a!==this&&!a.options.disabled&&(d.push([e.isFunction(a.options.items)?a.options.items.call(a.element[0],t,{item:this.currentItem}):e(a.options.items,a.element),a]),this.containers.push(a));for(i=d.length-1;i>=0;i--)for(o=d[i][1],r=d[i][0],s=0,l=r.length;l>s;s++)h=e(r[s]),h.data(this.widgetName+"-item",o),u.push({item:h,instance:o,width:0,height:0,left:0,top:0})},refreshPositions:function(t){this.floating=this.items.length?"x"===this.options.axis||this._isFloating(this.items[0].item):!1,this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var i,s,n,a;for(i=this.items.length-1;i>=0;i--)s=this.items[i],s.instance!==this.currentContainer&&this.currentContainer&&s.item[0]!==this.currentItem[0]||(n=this.options.toleranceElement?e(this.options.toleranceElement,s.item):s.item,t||(s.width=n.outerWidth(),s.height=n.outerHeight()),a=n.offset(),s.left=a.left,s.top=a.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)a=this.containers[i].element.offset(),this.containers[i].containerCache.left=a.left,this.containers[i].containerCache.top=a.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(t){t=t||this;var i,s=t.options;s.placeholder&&s.placeholder.constructor!==String||(i=s.placeholder,s.placeholder={element:function(){var s=t.currentItem[0].nodeName.toLowerCase(),n=e("<"+s+">",t.document[0]).addClass(i||t.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");return"tbody"===s?t._createTrPlaceholder(t.currentItem.find("tr").eq(0),e("<tr>",t.document[0]).appendTo(n)):"tr"===s?t._createTrPlaceholder(t.currentItem,n):"img"===s&&n.attr("src",t.currentItem.attr("src")),i||n.css("visibility","hidden"),n},update:function(e,n){(!i||s.forcePlaceholderSize)&&(n.height()||n.height(t.currentItem.innerHeight()-parseInt(t.currentItem.css("paddingTop")||0,10)-parseInt(t.currentItem.css("paddingBottom")||0,10)),n.width()||n.width(t.currentItem.innerWidth()-parseInt(t.currentItem.css("paddingLeft")||0,10)-parseInt(t.currentItem.css("paddingRight")||0,10)))}}),t.placeholder=e(s.placeholder.element.call(t.element,t.currentItem)),t.currentItem.after(t.placeholder),s.placeholder.update(t,t.placeholder)},_createTrPlaceholder:function(t,i){var s=this;t.children().each(function(){e("<td> </td>",s.document[0]).attr("colspan",e(this).attr("colspan")||1).appendTo(i)})},_contactContainers:function(t){var i,s,n,a,o,r,h,l,u,d,c=null,p=null;for(i=this.containers.length-1;i>=0;i--)if(!e.contains(this.currentItem[0],this.containers[i].element[0]))if(this._intersectsWith(this.containers[i].containerCache)){if(c&&e.contains(this.containers[i].element[0],c.element[0]))continue;c=this.containers[i],p=i}else this.containers[i].containerCache.over&&(this.containers[i]._trigger("out",t,this._uiHash(this)),this.containers[i].containerCache.over=0);if(c)if(1===this.containers.length)this.containers[p].containerCache.over||(this.containers[p]._trigger("over",t,this._uiHash(this)),this.containers[p].containerCache.over=1);else{for(n=1e4,a=null,u=c.floating||this._isFloating(this.currentItem),o=u?"left":"top",r=u?"width":"height",d=u?"clientX":"clientY",s=this.items.length-1;s>=0;s--)e.contains(this.containers[p].element[0],this.items[s].item[0])&&this.items[s].item[0]!==this.currentItem[0]&&(h=this.items[s].item.offset()[o],l=!1,t[d]-h>this.items[s][r]/2&&(l=!0),n>Math.abs(t[d]-h)&&(n=Math.abs(t[d]-h),a=this.items[s],this.direction=l?"up":"down"));if(!a&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[p])return this.currentContainer.containerCache.over||(this.containers[p]._trigger("over",t,this._uiHash()),this.currentContainer.containerCache.over=1),void 0;a?this._rearrange(t,a,null,!0):this._rearrange(t,null,this.containers[p].element,!0),this._trigger("change",t,this._uiHash()),this.containers[p]._trigger("change",t,this._uiHash(this)),this.currentContainer=this.containers[p],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[p]._trigger("over",t,this._uiHash(this)),this.containers[p].containerCache.over=1}},_createHelper:function(t){var i=this.options,s=e.isFunction(i.helper)?e(i.helper.apply(this.element[0],[t,this.currentItem])):"clone"===i.helper?this.currentItem.clone():this.currentItem;return s.parents("body").length||e("parent"!==i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(s[0]),s[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),(!s[0].style.width||i.forceHelperSize)&&s.width(this.currentItem.width()),(!s[0].style.height||i.forceHelperSize)&&s.height(this.currentItem.height()),s},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===this.document[0].body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&e.ui.ie)&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var e=this.currentItem.position();return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:e.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,i,s,n=this.options;"parent"===n.containment&&(n.containment=this.helper[0].parentNode),("document"===n.containment||"window"===n.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===n.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===n.containment?this.document.width():this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(n.containment)||(t=e(n.containment)[0],i=e(n.containment).offset(),s="hidden"!==e(t).css("overflow"),this.containment=[i.left+(parseInt(e(t).css("borderLeftWidth"),10)||0)+(parseInt(e(t).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(e(t).css("borderTopWidth"),10)||0)+(parseInt(e(t).css("paddingTop"),10)||0)-this.margins.top,i.left+(s?Math.max(t.scrollWidth,t.offsetWidth):t.offsetWidth)-(parseInt(e(t).css("borderLeftWidth"),10)||0)-(parseInt(e(t).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(s?Math.max(t.scrollHeight,t.offsetHeight):t.offsetHeight)-(parseInt(e(t).css("borderTopWidth"),10)||0)-(parseInt(e(t).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(t,i){i||(i=this.position);var s="absolute"===t?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,a=/(html|body)/i.test(n[0].tagName);return{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():a?0:n.scrollTop())*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():a?0:n.scrollLeft())*s}},_generatePosition:function(t){var i,s,n=this.options,a=t.pageX,o=t.pageY,r="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,h=/(html|body)/i.test(r[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(t.pageX-this.offset.click.left<this.containment[0]&&(a=this.containment[0]+this.offset.click.left),t.pageY-this.offset.click.top<this.containment[1]&&(o=this.containment[1]+this.offset.click.top),t.pageX-this.offset.click.left>this.containment[2]&&(a=this.containment[2]+this.offset.click.left),t.pageY-this.offset.click.top>this.containment[3]&&(o=this.containment[3]+this.offset.click.top)),n.grid&&(i=this.originalPageY+Math.round((o-this.originalPageY)/n.grid[1])*n.grid[1],o=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-n.grid[1]:i+n.grid[1]:i,s=this.originalPageX+Math.round((a-this.originalPageX)/n.grid[0])*n.grid[0],a=this.containment?s-this.offset.click.left>=this.containment[0]&&s-this.offset.click.left<=this.containment[2]?s:s-this.offset.click.left>=this.containment[0]?s-n.grid[0]:s+n.grid[0]:s)),{top:o-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():h?0:r.scrollTop()),left:a-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():h?0:r.scrollLeft())}},_rearrange:function(e,t,i,s){i?i[0].appendChild(this.placeholder[0]):t.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?t.item[0]:t.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var n=this.counter;this._delay(function(){n===this.counter&&this.refreshPositions(!s)})},_clear:function(e,t){function i(e,t,i){return function(s){i._trigger(e,s,t._uiHash(t))}}this.reverting=!1;var s,n=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(s in this._storedCSS)("auto"===this._storedCSS[s]||"static"===this._storedCSS[s])&&(this._storedCSS[s]="");this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!t&&n.push(function(e){this._trigger("receive",e,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||t||n.push(function(e){this._trigger("update",e,this._uiHash())}),this!==this.currentContainer&&(t||(n.push(function(e){this._trigger("remove",e,this._uiHash())}),n.push(function(e){return function(t){e._trigger("receive",t,this._uiHash(this))}}.call(this,this.currentContainer)),n.push(function(e){return function(t){e._trigger("update",t,this._uiHash(this))}}.call(this,this.currentContainer)))),s=this.containers.length-1;s>=0;s--)t||n.push(i("deactivate",this,this.containers[s])),this.containers[s].containerCache.over&&(n.push(i("out",this,this.containers[s])),this.containers[s].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,t||this._trigger("beforeStop",e,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!t){for(s=0;n.length>s;s++)n[s].call(this,e);this._trigger("stop",e,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){e.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(t){var i=t||this;return{helper:i.helper,placeholder:i.placeholder||e([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:t?t.element:null}}}),e.widget("ui.accordion",{version:"1.11.4",options:{active:0,animate:{},collapsible:!1,event:"click",header:"> li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var t=this.options;this.prevShow=this.prevHide=e(),this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role","tablist"),t.collapsible||t.active!==!1&&null!=t.active||(t.active=0),this._processPanels(),0>t.active&&(t.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():e()}},_createIcons:function(){var t=this.options.icons;t&&(e("<span>").addClass("ui-accordion-header-icon ui-icon "+t.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(t.header).addClass(t.activeHeader),this.headers.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var e;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").removeUniqueId(),this._destroyIcons(),e=this.headers.next().removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").css("display","").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&e.css("height","")},_setOption:function(e,t){return"active"===e?(this._activate(t),void 0):("event"===e&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(t)),this._super(e,t),"collapsible"!==e||t||this.options.active!==!1||this._activate(0),"icons"===e&&(this._destroyIcons(),t&&this._createIcons()),"disabled"===e&&(this.element.toggleClass("ui-state-disabled",!!t).attr("aria-disabled",t),this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!t)),void 0)},_keydown:function(t){if(!t.altKey&&!t.ctrlKey){var i=e.ui.keyCode,s=this.headers.length,n=this.headers.index(t.target),a=!1;switch(t.keyCode){case i.RIGHT:case i.DOWN:a=this.headers[(n+1)%s];break;case i.LEFT:case i.UP:a=this.headers[(n-1+s)%s];break;case i.SPACE:case i.ENTER:this._eventHandler(t);break;case i.HOME:a=this.headers[0];break;case i.END:a=this.headers[s-1]}a&&(e(t.target).attr("tabIndex",-1),e(a).attr("tabIndex",0),a.focus(),t.preventDefault())}},_panelKeyDown:function(t){t.keyCode===e.ui.keyCode.UP&&t.ctrlKey&&e(t.currentTarget).prev().focus()},refresh:function(){var t=this.options;this._processPanels(),t.active===!1&&t.collapsible===!0||!this.headers.length?(t.active=!1,this.active=e()):t.active===!1?this._activate(0):this.active.length&&!e.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(t.active=!1,this.active=e()):this._activate(Math.max(0,t.active-1)):t.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var e=this.headers,t=this.panels;this.headers=this.element.find(this.options.header).addClass("ui-accordion-header ui-state-default ui-corner-all"),this.panels=this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide(),t&&(this._off(e.not(this.headers)),this._off(t.not(this.panels))) +},_refresh:function(){var t,i=this.options,s=i.heightStyle,n=this.element.parent();this.active=this._findActive(i.active).addClass("ui-accordion-header-active ui-state-active ui-corner-top").removeClass("ui-corner-all"),this.active.next().addClass("ui-accordion-content-active").show(),this.headers.attr("role","tab").each(function(){var t=e(this),i=t.uniqueId().attr("id"),s=t.next(),n=s.uniqueId().attr("id");t.attr("aria-controls",n),s.attr("aria-labelledby",i)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(i.event),"fill"===s?(t=n.height(),this.element.siblings(":visible").each(function(){var i=e(this),s=i.css("position");"absolute"!==s&&"fixed"!==s&&(t-=i.outerHeight(!0))}),this.headers.each(function(){t-=e(this).outerHeight(!0)}),this.headers.next().each(function(){e(this).height(Math.max(0,t-e(this).innerHeight()+e(this).height()))}).css("overflow","auto")):"auto"===s&&(t=0,this.headers.next().each(function(){t=Math.max(t,e(this).css("height","").height())}).height(t))},_activate:function(t){var i=this._findActive(t)[0];i!==this.active[0]&&(i=i||this.active[0],this._eventHandler({target:i,currentTarget:i,preventDefault:e.noop}))},_findActive:function(t){return"number"==typeof t?this.headers.eq(t):e()},_setupEvents:function(t){var i={keydown:"_keydown"};t&&e.each(t.split(" "),function(e,t){i[t]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(t){var i=this.options,s=this.active,n=e(t.currentTarget),a=n[0]===s[0],o=a&&i.collapsible,r=o?e():n.next(),h=s.next(),l={oldHeader:s,oldPanel:h,newHeader:o?e():n,newPanel:r};t.preventDefault(),a&&!i.collapsible||this._trigger("beforeActivate",t,l)===!1||(i.active=o?!1:this.headers.index(n),this.active=a?e():n,this._toggle(l),s.removeClass("ui-accordion-header-active ui-state-active"),i.icons&&s.children(".ui-accordion-header-icon").removeClass(i.icons.activeHeader).addClass(i.icons.header),a||(n.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),i.icons&&n.children(".ui-accordion-header-icon").removeClass(i.icons.header).addClass(i.icons.activeHeader),n.next().addClass("ui-accordion-content-active")))},_toggle:function(t){var i=t.newPanel,s=this.prevShow.length?this.prevShow:t.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=i,this.prevHide=s,this.options.animate?this._animate(i,s,t):(s.hide(),i.show(),this._toggleComplete(t)),s.attr({"aria-hidden":"true"}),s.prev().attr({"aria-selected":"false","aria-expanded":"false"}),i.length&&s.length?s.prev().attr({tabIndex:-1,"aria-expanded":"false"}):i.length&&this.headers.filter(function(){return 0===parseInt(e(this).attr("tabIndex"),10)}).attr("tabIndex",-1),i.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(e,t,i){var s,n,a,o=this,r=0,h=e.css("box-sizing"),l=e.length&&(!t.length||e.index()<t.index()),u=this.options.animate||{},d=l&&u.down||u,c=function(){o._toggleComplete(i)};return"number"==typeof d&&(a=d),"string"==typeof d&&(n=d),n=n||d.easing||u.easing,a=a||d.duration||u.duration,t.length?e.length?(s=e.show().outerHeight(),t.animate(this.hideProps,{duration:a,easing:n,step:function(e,t){t.now=Math.round(e)}}),e.hide().animate(this.showProps,{duration:a,easing:n,complete:c,step:function(e,i){i.now=Math.round(e),"height"!==i.prop?"content-box"===h&&(r+=i.now):"content"!==o.options.heightStyle&&(i.now=Math.round(s-t.outerHeight()-r),r=0)}}),void 0):t.animate(this.hideProps,a,n,c):e.animate(this.showProps,a,n,c)},_toggleComplete:function(e){var t=e.oldPanel;t.removeClass("ui-accordion-content-active").prev().removeClass("ui-corner-top").addClass("ui-corner-all"),t.length&&(t.parent()[0].className=t.parent()[0].className),this._trigger("activate",null,e)}}),e.widget("ui.menu",{version:"1.11.4",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},items:"> *",menus:"ul",position:{my:"left-1 top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item":function(e){e.preventDefault()},"click .ui-menu-item":function(t){var i=e(t.target);!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.select(t),t.isPropagationStopped()||(this.mouseHandled=!0),i.has(".ui-menu").length?this.expand(t):!this.element.is(":focus")&&e(this.document[0].activeElement).closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(t){if(!this.previousFilter){var i=e(t.currentTarget);i.siblings(".ui-state-active").removeClass("ui-state-active"),this.focus(t,i)}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(e,t){var i=this.active||this.element.find(this.options.items).eq(0);t||this.focus(e,i)},blur:function(t){this._delay(function(){e.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(t)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(e){this._closeOnDocumentClick(e)&&this.collapseAll(e),this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-menu-icons ui-front").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").removeUniqueId().removeClass("ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var t=e(this);t.data("ui-menu-submenu-carat")&&t.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(t){var i,s,n,a,o=!0;switch(t.keyCode){case e.ui.keyCode.PAGE_UP:this.previousPage(t);break;case e.ui.keyCode.PAGE_DOWN:this.nextPage(t);break;case e.ui.keyCode.HOME:this._move("first","first",t);break;case e.ui.keyCode.END:this._move("last","last",t);break;case e.ui.keyCode.UP:this.previous(t);break;case e.ui.keyCode.DOWN:this.next(t);break;case e.ui.keyCode.LEFT:this.collapse(t);break;case e.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(t);break;case e.ui.keyCode.ENTER:case e.ui.keyCode.SPACE:this._activate(t);break;case e.ui.keyCode.ESCAPE:this.collapse(t);break;default:o=!1,s=this.previousFilter||"",n=String.fromCharCode(t.keyCode),a=!1,clearTimeout(this.filterTimer),n===s?a=!0:n=s+n,i=this._filterMenuItems(n),i=a&&-1!==i.index(this.active.next())?this.active.nextAll(".ui-menu-item"):i,i.length||(n=String.fromCharCode(t.keyCode),i=this._filterMenuItems(n)),i.length?(this.focus(t,i),this.previousFilter=n,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}o&&t.preventDefault()},_activate:function(e){this.active.is(".ui-state-disabled")||(this.active.is("[aria-haspopup='true']")?this.expand(e):this.select(e))},refresh:function(){var t,i,s=this,n=this.options.icons.submenu,a=this.element.find(this.options.menus);this.element.toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length),a.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-front").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var t=e(this),i=t.parent(),s=e("<span>").addClass("ui-menu-icon ui-icon "+n).data("ui-menu-submenu-carat",!0);i.attr("aria-haspopup","true").prepend(s),t.attr("aria-labelledby",i.attr("id"))}),t=a.add(this.element),i=t.find(this.options.items),i.not(".ui-menu-item").each(function(){var t=e(this);s._isDivider(t)&&t.addClass("ui-widget-content ui-menu-divider")}),i.not(".ui-menu-item, .ui-menu-divider").addClass("ui-menu-item").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),i.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!e.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(e,t){"icons"===e&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(t.submenu),"disabled"===e&&this.element.toggleClass("ui-state-disabled",!!t).attr("aria-disabled",t),this._super(e,t)},focus:function(e,t){var i,s;this.blur(e,e&&"focus"===e.type),this._scrollIntoView(t),this.active=t.first(),s=this.active.addClass("ui-state-focus").removeClass("ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",s.attr("id")),this.active.parent().closest(".ui-menu-item").addClass("ui-state-active"),e&&"keydown"===e.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=t.children(".ui-menu"),i.length&&e&&/^mouse/.test(e.type)&&this._startOpening(i),this.activeMenu=t.parent(),this._trigger("focus",e,{item:t})},_scrollIntoView:function(t){var i,s,n,a,o,r;this._hasScroll()&&(i=parseFloat(e.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(e.css(this.activeMenu[0],"paddingTop"))||0,n=t.offset().top-this.activeMenu.offset().top-i-s,a=this.activeMenu.scrollTop(),o=this.activeMenu.height(),r=t.outerHeight(),0>n?this.activeMenu.scrollTop(a+n):n+r>o&&this.activeMenu.scrollTop(a+n-o+r))},blur:function(e,t){t||clearTimeout(this.timer),this.active&&(this.active.removeClass("ui-state-focus"),this.active=null,this._trigger("blur",e,{item:this.active}))},_startOpening:function(e){clearTimeout(this.timer),"true"===e.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(e)},this.delay))},_open:function(t){var i=e.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(t.parents(".ui-menu")).hide().attr("aria-hidden","true"),t.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(t,i){clearTimeout(this.timer),this.timer=this._delay(function(){var s=i?this.element:e(t&&t.target).closest(this.element.find(".ui-menu"));s.length||(s=this.element),this._close(s),this.blur(t),this.activeMenu=s},this.delay)},_close:function(e){e||(e=this.active?this.active.parent():this.element),e.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find(".ui-state-active").not(".ui-state-focus").removeClass("ui-state-active")},_closeOnDocumentClick:function(t){return!e(t.target).closest(".ui-menu").length},_isDivider:function(e){return!/[^\-\u2014\u2013\s]/.test(e.text())},collapse:function(e){var t=this.active&&this.active.parent().closest(".ui-menu-item",this.element);t&&t.length&&(this._close(),this.focus(e,t))},expand:function(e){var t=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();t&&t.length&&(this._open(t.parent()),this._delay(function(){this.focus(e,t)}))},next:function(e){this._move("next","first",e)},previous:function(e){this._move("prev","last",e)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(e,t,i){var s;this.active&&(s="first"===e||"last"===e?this.active["first"===e?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[e+"All"](".ui-menu-item").eq(0)),s&&s.length&&this.active||(s=this.activeMenu.find(this.options.items)[t]()),this.focus(i,s)},nextPage:function(t){var i,s,n;return this.active?(this.isLastItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=e(this),0>i.offset().top-s-n}),this.focus(t,i)):this.focus(t,this.activeMenu.find(this.options.items)[this.active?"last":"first"]())),void 0):(this.next(t),void 0)},previousPage:function(t){var i,s,n;return this.active?(this.isFirstItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=e(this),i.offset().top-s+n>0}),this.focus(t,i)):this.focus(t,this.activeMenu.find(this.options.items).first())),void 0):(this.next(t),void 0)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(t){this.active=this.active||e(t.target).closest(".ui-menu-item");var i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(t,!0),this._trigger("select",t,i)},_filterMenuItems:function(t){var i=t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),s=RegExp("^"+i,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return s.test(e.trim(e(this).text()))})}}),e.widget("ui.autocomplete",{version:"1.11.4",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var t,i,s,n=this.element[0].nodeName.toLowerCase(),a="textarea"===n,o="input"===n;this.isMultiLine=a?!0:o?!1:this.element.prop("isContentEditable"),this.valueMethod=this.element[a||o?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(n){if(this.element.prop("readOnly"))return t=!0,s=!0,i=!0,void 0;t=!1,s=!1,i=!1;var a=e.ui.keyCode;switch(n.keyCode){case a.PAGE_UP:t=!0,this._move("previousPage",n);break;case a.PAGE_DOWN:t=!0,this._move("nextPage",n);break;case a.UP:t=!0,this._keyEvent("previous",n);break;case a.DOWN:t=!0,this._keyEvent("next",n);break;case a.ENTER:this.menu.active&&(t=!0,n.preventDefault(),this.menu.select(n));break;case a.TAB:this.menu.active&&this.menu.select(n);break;case a.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(n),n.preventDefault());break;default:i=!0,this._searchTimeout(n)}},keypress:function(s){if(t)return t=!1,(!this.isMultiLine||this.menu.element.is(":visible"))&&s.preventDefault(),void 0;if(!i){var n=e.ui.keyCode;switch(s.keyCode){case n.PAGE_UP:this._move("previousPage",s);break;case n.PAGE_DOWN:this._move("nextPage",s);break;case n.UP:this._keyEvent("previous",s);break;case n.DOWN:this._keyEvent("next",s)}}},input:function(e){return s?(s=!1,e.preventDefault(),void 0):(this._searchTimeout(e),void 0)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(e){return this.cancelBlur?(delete this.cancelBlur,void 0):(clearTimeout(this.searching),this.close(e),this._change(e),void 0)}}),this._initSource(),this.menu=e("<ul>").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._on(this.menu.element,{mousedown:function(t){t.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var i=this.menu.element[0];e(t.target).closest(".ui-menu-item").length||this._delay(function(){var t=this;this.document.one("mousedown",function(s){s.target===t.element[0]||s.target===i||e.contains(i,s.target)||t.close()})})},menufocus:function(t,i){var s,n;return this.isNewMenu&&(this.isNewMenu=!1,t.originalEvent&&/^mouse/.test(t.originalEvent.type))?(this.menu.blur(),this.document.one("mousemove",function(){e(t.target).trigger(t.originalEvent)}),void 0):(n=i.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",t,{item:n})&&t.originalEvent&&/^key/.test(t.originalEvent.type)&&this._value(n.value),s=i.item.attr("aria-label")||n.value,s&&e.trim(s).length&&(this.liveRegion.children().hide(),e("<div>").text(s).appendTo(this.liveRegion)),void 0)},menuselect:function(e,t){var i=t.item.data("ui-autocomplete-item"),s=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=s,this._delay(function(){this.previous=s,this.selectedItem=i})),!1!==this._trigger("select",e,{item:i})&&this._value(i.value),this.term=this._value(),this.close(e),this.selectedItem=i}}),this.liveRegion=e("<span>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).addClass("ui-helper-hidden-accessible").appendTo(this.document[0].body),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(e,t){this._super(e,t),"source"===e&&this._initSource(),"appendTo"===e&&this.menu.element.appendTo(this._appendTo()),"disabled"===e&&t&&this.xhr&&this.xhr.abort()},_appendTo:function(){var t=this.options.appendTo;return t&&(t=t.jquery||t.nodeType?e(t):this.document.find(t).eq(0)),t&&t[0]||(t=this.element.closest(".ui-front")),t.length||(t=this.document[0].body),t},_initSource:function(){var t,i,s=this;e.isArray(this.options.source)?(t=this.options.source,this.source=function(i,s){s(e.ui.autocomplete.filter(t,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(t,n){s.xhr&&s.xhr.abort(),s.xhr=e.ajax({url:i,data:t,dataType:"json",success:function(e){n(e)},error:function(){n([])}})}):this.source=this.options.source},_searchTimeout:function(e){clearTimeout(this.searching),this.searching=this._delay(function(){var t=this.term===this._value(),i=this.menu.element.is(":visible"),s=e.altKey||e.ctrlKey||e.metaKey||e.shiftKey;(!t||t&&!i&&!s)&&(this.selectedItem=null,this.search(null,e))},this.options.delay)},search:function(e,t){return e=null!=e?e:this._value(),this.term=this._value(),e.length<this.options.minLength?this.close(t):this._trigger("search",t)!==!1?this._search(e):void 0},_search:function(e){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:e},this._response())},_response:function(){var t=++this.requestIndex;return e.proxy(function(e){t===this.requestIndex&&this.__response(e),this.pending--,this.pending||this.element.removeClass("ui-autocomplete-loading")},this)},__response:function(e){e&&(e=this._normalize(e)),this._trigger("response",null,{content:e}),!this.options.disabled&&e&&e.length&&!this.cancelSearch?(this._suggest(e),this._trigger("open")):this._close()},close:function(e){this.cancelSearch=!0,this._close(e)},_close:function(e){this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",e))},_change:function(e){this.previous!==this._value()&&this._trigger("change",e,{item:this.selectedItem})},_normalize:function(t){return t.length&&t[0].label&&t[0].value?t:e.map(t,function(t){return"string"==typeof t?{label:t,value:t}:e.extend({},t,{label:t.label||t.value,value:t.value||t.label})})},_suggest:function(t){var i=this.menu.element.empty();this._renderMenu(i,t),this.isNewMenu=!0,this.menu.refresh(),i.show(),this._resizeMenu(),i.position(e.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next()},_resizeMenu:function(){var e=this.menu.element;e.outerWidth(Math.max(e.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(t,i){var s=this;e.each(i,function(e,i){s._renderItemData(t,i)})},_renderItemData:function(e,t){return this._renderItem(e,t).data("ui-autocomplete-item",t)},_renderItem:function(t,i){return e("<li>").text(i.label).appendTo(t)},_move:function(e,t){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(e)||this.menu.isLastItem()&&/^next/.test(e)?(this.isMultiLine||this._value(this.term),this.menu.blur(),void 0):(this.menu[e](t),void 0):(this.search(null,t),void 0)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(e,t){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(e,t),t.preventDefault())}}),e.extend(e.ui.autocomplete,{escapeRegex:function(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(t,i){var s=RegExp(e.ui.autocomplete.escapeRegex(i),"i");return e.grep(t,function(e){return s.test(e.label||e.value||e)})}}),e.widget("ui.autocomplete",e.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(e){return e+(e>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(t){var i;this._superApply(arguments),this.options.disabled||this.cancelSearch||(i=t&&t.length?this.options.messages.results(t.length):this.options.messages.noResults,this.liveRegion.children().hide(),e("<div>").text(i).appendTo(this.liveRegion))}}),e.ui.autocomplete;var c,p="ui-button ui-widget ui-state-default ui-corner-all",f="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",m=function(){var t=e(this);setTimeout(function(){t.find(":ui-button").button("refresh")},1)},g=function(t){var i=t.name,s=t.form,n=e([]);return i&&(i=i.replace(/'/g,"\\'"),n=s?e(s).find("[name='"+i+"'][type=radio]"):e("[name='"+i+"'][type=radio]",t.ownerDocument).filter(function(){return!this.form})),n};e.widget("ui.button",{version:"1.11.4",defaultElement:"<button>",options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+this.eventNamespace).bind("reset"+this.eventNamespace,m),"boolean"!=typeof this.options.disabled?this.options.disabled=!!this.element.prop("disabled"):this.element.prop("disabled",this.options.disabled),this._determineButtonType(),this.hasTitle=!!this.buttonElement.attr("title");var t=this,i=this.options,s="checkbox"===this.type||"radio"===this.type,n=s?"":"ui-state-active";null===i.label&&(i.label="input"===this.type?this.buttonElement.val():this.buttonElement.html()),this._hoverable(this.buttonElement),this.buttonElement.addClass(p).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){i.disabled||this===c&&e(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){i.disabled||e(this).removeClass(n)}).bind("click"+this.eventNamespace,function(e){i.disabled&&(e.preventDefault(),e.stopImmediatePropagation())}),this._on({focus:function(){this.buttonElement.addClass("ui-state-focus")},blur:function(){this.buttonElement.removeClass("ui-state-focus")}}),s&&this.element.bind("change"+this.eventNamespace,function(){t.refresh()}),"checkbox"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){return i.disabled?!1:void 0}):"radio"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(i.disabled)return!1;e(this).addClass("ui-state-active"),t.buttonElement.attr("aria-pressed","true");var s=t.element[0];g(s).not(s).map(function(){return e(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown"+this.eventNamespace,function(){return i.disabled?!1:(e(this).addClass("ui-state-active"),c=this,t.document.one("mouseup",function(){c=null}),void 0)}).bind("mouseup"+this.eventNamespace,function(){return i.disabled?!1:(e(this).removeClass("ui-state-active"),void 0)}).bind("keydown"+this.eventNamespace,function(t){return i.disabled?!1:((t.keyCode===e.ui.keyCode.SPACE||t.keyCode===e.ui.keyCode.ENTER)&&e(this).addClass("ui-state-active"),void 0)}).bind("keyup"+this.eventNamespace+" blur"+this.eventNamespace,function(){e(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(t){t.keyCode===e.ui.keyCode.SPACE&&e(this).click()})),this._setOption("disabled",i.disabled),this._resetButton()},_determineButtonType:function(){var e,t,i;this.type=this.element.is("[type=checkbox]")?"checkbox":this.element.is("[type=radio]")?"radio":this.element.is("input")?"input":"button","checkbox"===this.type||"radio"===this.type?(e=this.element.parents().last(),t="label[for='"+this.element.attr("id")+"']",this.buttonElement=e.find(t),this.buttonElement.length||(e=e.length?e.siblings():this.element.siblings(),this.buttonElement=e.filter(t),this.buttonElement.length||(this.buttonElement=e.find(t))),this.element.addClass("ui-helper-hidden-accessible"),i=this.element.is(":checked"),i&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.prop("aria-pressed",i)):this.buttonElement=this.element},widget:function(){return this.buttonElement},_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible"),this.buttonElement.removeClass(p+" ui-state-active "+f).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()),this.hasTitle||this.buttonElement.removeAttr("title")},_setOption:function(e,t){return this._super(e,t),"disabled"===e?(this.widget().toggleClass("ui-state-disabled",!!t),this.element.prop("disabled",!!t),t&&("checkbox"===this.type||"radio"===this.type?this.buttonElement.removeClass("ui-state-focus"):this.buttonElement.removeClass("ui-state-focus ui-state-active")),void 0):(this._resetButton(),void 0)},refresh:function(){var t=this.element.is("input, button")?this.element.is(":disabled"):this.element.hasClass("ui-button-disabled");t!==this.options.disabled&&this._setOption("disabled",t),"radio"===this.type?g(this.element[0]).each(function(){e(this).is(":checked")?e(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):e(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):"checkbox"===this.type&&(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false"))},_resetButton:function(){if("input"===this.type)return this.options.label&&this.element.val(this.options.label),void 0;var t=this.buttonElement.removeClass(f),i=e("<span></span>",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(t.empty()).text(),s=this.options.icons,n=s.primary&&s.secondary,a=[];s.primary||s.secondary?(this.options.text&&a.push("ui-button-text-icon"+(n?"s":s.primary?"-primary":"-secondary")),s.primary&&t.prepend("<span class='ui-button-icon-primary ui-icon "+s.primary+"'></span>"),s.secondary&&t.append("<span class='ui-button-icon-secondary ui-icon "+s.secondary+"'></span>"),this.options.text||(a.push(n?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||t.attr("title",e.trim(i)))):a.push("ui-button-text-only"),t.addClass(a.join(" "))}}),e.widget("ui.buttonset",{version:"1.11.4",options:{items:"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(e,t){"disabled"===e&&this.buttons.button("option",e,t),this._super(e,t)},refresh:function(){var t="rtl"===this.element.css("direction"),i=this.element.find(this.options.items),s=i.filter(":ui-button");i.not(":ui-button").button(),s.button("refresh"),this.buttons=i.map(function(){return e(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(t?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(t?"ui-corner-left":"ui-corner-right").end().end()},_destroy:function(){this.element.removeClass("ui-buttonset"),this.buttons.map(function(){return e(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}}),e.ui.button,e.extend(e.ui,{datepicker:{version:"1.11.4"}});var v;e.extend(n.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(e){return r(this._defaults,e||{}),this},_attachDatepicker:function(t,i){var s,n,a;s=t.nodeName.toLowerCase(),n="div"===s||"span"===s,t.id||(this.uuid+=1,t.id="dp"+this.uuid),a=this._newInst(e(t),n),a.settings=e.extend({},i||{}),"input"===s?this._connectDatepicker(t,a):n&&this._inlineDatepicker(t,a)},_newInst:function(t,i){var s=t[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:s,input:t,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?a(e("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(t,i){var s=e(t);i.append=e([]),i.trigger=e([]),s.hasClass(this.markerClassName)||(this._attachments(s,i),s.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp),this._autoSize(i),e.data(t,"datepicker",i),i.settings.disabled&&this._disableDatepicker(t))},_attachments:function(t,i){var s,n,a,o=this._get(i,"appendText"),r=this._get(i,"isRTL");i.append&&i.append.remove(),o&&(i.append=e("<span class='"+this._appendClass+"'>"+o+"</span>"),t[r?"before":"after"](i.append)),t.unbind("focus",this._showDatepicker),i.trigger&&i.trigger.remove(),s=this._get(i,"showOn"),("focus"===s||"both"===s)&&t.focus(this._showDatepicker),("button"===s||"both"===s)&&(n=this._get(i,"buttonText"),a=this._get(i,"buttonImage"),i.trigger=e(this._get(i,"buttonImageOnly")?e("<img/>").addClass(this._triggerClass).attr({src:a,alt:n,title:n}):e("<button type='button'></button>").addClass(this._triggerClass).html(a?e("<img/>").attr({src:a,alt:n,title:n}):n)),t[r?"before":"after"](i.trigger),i.trigger.click(function(){return e.datepicker._datepickerShowing&&e.datepicker._lastInput===t[0]?e.datepicker._hideDatepicker():e.datepicker._datepickerShowing&&e.datepicker._lastInput!==t[0]?(e.datepicker._hideDatepicker(),e.datepicker._showDatepicker(t[0])):e.datepicker._showDatepicker(t[0]),!1}))},_autoSize:function(e){if(this._get(e,"autoSize")&&!e.inline){var t,i,s,n,a=new Date(2009,11,20),o=this._get(e,"dateFormat");o.match(/[DM]/)&&(t=function(e){for(i=0,s=0,n=0;e.length>n;n++)e[n].length>i&&(i=e[n].length,s=n);return s},a.setMonth(t(this._get(e,o.match(/MM/)?"monthNames":"monthNamesShort"))),a.setDate(t(this._get(e,o.match(/DD/)?"dayNames":"dayNamesShort"))+20-a.getDay())),e.input.attr("size",this._formatDate(e,a).length)}},_inlineDatepicker:function(t,i){var s=e(t);s.hasClass(this.markerClassName)||(s.addClass(this.markerClassName).append(i.dpDiv),e.data(t,"datepicker",i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(t),i.dpDiv.css("display","block"))},_dialogDatepicker:function(t,i,s,n,a){var o,h,l,u,d,c=this._dialogInst;return c||(this.uuid+=1,o="dp"+this.uuid,this._dialogInput=e("<input type='text' id='"+o+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.keydown(this._doKeyDown),e("body").append(this._dialogInput),c=this._dialogInst=this._newInst(this._dialogInput,!1),c.settings={},e.data(this._dialogInput[0],"datepicker",c)),r(c.settings,n||{}),i=i&&i.constructor===Date?this._formatDate(c,i):i,this._dialogInput.val(i),this._pos=a?a.length?a:[a.pageX,a.pageY]:null,this._pos||(h=document.documentElement.clientWidth,l=document.documentElement.clientHeight,u=document.documentElement.scrollLeft||document.body.scrollLeft,d=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[h/2-100+u,l/2-150+d]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),c.settings.onSelect=s,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),e.blockUI&&e.blockUI(this.dpDiv),e.data(this._dialogInput[0],"datepicker",c),this +},_destroyDatepicker:function(t){var i,s=e(t),n=e.data(t,"datepicker");s.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),e.removeData(t,"datepicker"),"input"===i?(n.append.remove(),n.trigger.remove(),s.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):("div"===i||"span"===i)&&s.removeClass(this.markerClassName).empty(),v===n&&(v=null))},_enableDatepicker:function(t){var i,s,n=e(t),a=e.data(t,"datepicker");n.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),"input"===i?(t.disabled=!1,a.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().removeClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=e.map(this._disabledInputs,function(e){return e===t?null:e}))},_disableDatepicker:function(t){var i,s,n=e(t),a=e.data(t,"datepicker");n.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),"input"===i?(t.disabled=!0,a.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().addClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=e.map(this._disabledInputs,function(e){return e===t?null:e}),this._disabledInputs[this._disabledInputs.length]=t)},_isDisabledDatepicker:function(e){if(!e)return!1;for(var t=0;this._disabledInputs.length>t;t++)if(this._disabledInputs[t]===e)return!0;return!1},_getInst:function(t){try{return e.data(t,"datepicker")}catch(i){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(t,i,s){var n,a,o,h,l=this._getInst(t);return 2===arguments.length&&"string"==typeof i?"defaults"===i?e.extend({},e.datepicker._defaults):l?"all"===i?e.extend({},l.settings):this._get(l,i):null:(n=i||{},"string"==typeof i&&(n={},n[i]=s),l&&(this._curInst===l&&this._hideDatepicker(),a=this._getDateDatepicker(t,!0),o=this._getMinMaxDate(l,"min"),h=this._getMinMaxDate(l,"max"),r(l.settings,n),null!==o&&void 0!==n.dateFormat&&void 0===n.minDate&&(l.settings.minDate=this._formatDate(l,o)),null!==h&&void 0!==n.dateFormat&&void 0===n.maxDate&&(l.settings.maxDate=this._formatDate(l,h)),"disabled"in n&&(n.disabled?this._disableDatepicker(t):this._enableDatepicker(t)),this._attachments(e(t),l),this._autoSize(l),this._setDate(l,a),this._updateAlternate(l),this._updateDatepicker(l)),void 0)},_changeDatepicker:function(e,t,i){this._optionDatepicker(e,t,i)},_refreshDatepicker:function(e){var t=this._getInst(e);t&&this._updateDatepicker(t)},_setDateDatepicker:function(e,t){var i=this._getInst(e);i&&(this._setDate(i,t),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(e,t){var i=this._getInst(e);return i&&!i.inline&&this._setDateFromField(i,t),i?this._getDate(i):null},_doKeyDown:function(t){var i,s,n,a=e.datepicker._getInst(t.target),o=!0,r=a.dpDiv.is(".ui-datepicker-rtl");if(a._keyEvent=!0,e.datepicker._datepickerShowing)switch(t.keyCode){case 9:e.datepicker._hideDatepicker(),o=!1;break;case 13:return n=e("td."+e.datepicker._dayOverClass+":not(."+e.datepicker._currentClass+")",a.dpDiv),n[0]&&e.datepicker._selectDay(t.target,a.selectedMonth,a.selectedYear,n[0]),i=e.datepicker._get(a,"onSelect"),i?(s=e.datepicker._formatDate(a),i.apply(a.input?a.input[0]:null,[s,a])):e.datepicker._hideDatepicker(),!1;case 27:e.datepicker._hideDatepicker();break;case 33:e.datepicker._adjustDate(t.target,t.ctrlKey?-e.datepicker._get(a,"stepBigMonths"):-e.datepicker._get(a,"stepMonths"),"M");break;case 34:e.datepicker._adjustDate(t.target,t.ctrlKey?+e.datepicker._get(a,"stepBigMonths"):+e.datepicker._get(a,"stepMonths"),"M");break;case 35:(t.ctrlKey||t.metaKey)&&e.datepicker._clearDate(t.target),o=t.ctrlKey||t.metaKey;break;case 36:(t.ctrlKey||t.metaKey)&&e.datepicker._gotoToday(t.target),o=t.ctrlKey||t.metaKey;break;case 37:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,r?1:-1,"D"),o=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&e.datepicker._adjustDate(t.target,t.ctrlKey?-e.datepicker._get(a,"stepBigMonths"):-e.datepicker._get(a,"stepMonths"),"M");break;case 38:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,-7,"D"),o=t.ctrlKey||t.metaKey;break;case 39:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,r?-1:1,"D"),o=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&e.datepicker._adjustDate(t.target,t.ctrlKey?+e.datepicker._get(a,"stepBigMonths"):+e.datepicker._get(a,"stepMonths"),"M");break;case 40:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,7,"D"),o=t.ctrlKey||t.metaKey;break;default:o=!1}else 36===t.keyCode&&t.ctrlKey?e.datepicker._showDatepicker(this):o=!1;o&&(t.preventDefault(),t.stopPropagation())},_doKeyPress:function(t){var i,s,n=e.datepicker._getInst(t.target);return e.datepicker._get(n,"constrainInput")?(i=e.datepicker._possibleChars(e.datepicker._get(n,"dateFormat")),s=String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),t.ctrlKey||t.metaKey||" ">s||!i||i.indexOf(s)>-1):void 0},_doKeyUp:function(t){var i,s=e.datepicker._getInst(t.target);if(s.input.val()!==s.lastVal)try{i=e.datepicker.parseDate(e.datepicker._get(s,"dateFormat"),s.input?s.input.val():null,e.datepicker._getFormatConfig(s)),i&&(e.datepicker._setDateFromField(s),e.datepicker._updateAlternate(s),e.datepicker._updateDatepicker(s))}catch(n){}return!0},_showDatepicker:function(t){if(t=t.target||t,"input"!==t.nodeName.toLowerCase()&&(t=e("input",t.parentNode)[0]),!e.datepicker._isDisabledDatepicker(t)&&e.datepicker._lastInput!==t){var i,n,a,o,h,l,u;i=e.datepicker._getInst(t),e.datepicker._curInst&&e.datepicker._curInst!==i&&(e.datepicker._curInst.dpDiv.stop(!0,!0),i&&e.datepicker._datepickerShowing&&e.datepicker._hideDatepicker(e.datepicker._curInst.input[0])),n=e.datepicker._get(i,"beforeShow"),a=n?n.apply(t,[t,i]):{},a!==!1&&(r(i.settings,a),i.lastVal=null,e.datepicker._lastInput=t,e.datepicker._setDateFromField(i),e.datepicker._inDialog&&(t.value=""),e.datepicker._pos||(e.datepicker._pos=e.datepicker._findPos(t),e.datepicker._pos[1]+=t.offsetHeight),o=!1,e(t).parents().each(function(){return o|="fixed"===e(this).css("position"),!o}),h={left:e.datepicker._pos[0],top:e.datepicker._pos[1]},e.datepicker._pos=null,i.dpDiv.empty(),i.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),e.datepicker._updateDatepicker(i),h=e.datepicker._checkOffset(i,h,o),i.dpDiv.css({position:e.datepicker._inDialog&&e.blockUI?"static":o?"fixed":"absolute",display:"none",left:h.left+"px",top:h.top+"px"}),i.inline||(l=e.datepicker._get(i,"showAnim"),u=e.datepicker._get(i,"duration"),i.dpDiv.css("z-index",s(e(t))+1),e.datepicker._datepickerShowing=!0,e.effects&&e.effects.effect[l]?i.dpDiv.show(l,e.datepicker._get(i,"showOptions"),u):i.dpDiv[l||"show"](l?u:null),e.datepicker._shouldFocusInput(i)&&i.input.focus(),e.datepicker._curInst=i))}},_updateDatepicker:function(t){this.maxRows=4,v=t,t.dpDiv.empty().append(this._generateHTML(t)),this._attachHandlers(t);var i,s=this._getNumberOfMonths(t),n=s[1],a=17,r=t.dpDiv.find("."+this._dayOverClass+" a");r.length>0&&o.apply(r.get(0)),t.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),n>1&&t.dpDiv.addClass("ui-datepicker-multi-"+n).css("width",a*n+"em"),t.dpDiv[(1!==s[0]||1!==s[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),t.dpDiv[(this._get(t,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),t===e.datepicker._curInst&&e.datepicker._datepickerShowing&&e.datepicker._shouldFocusInput(t)&&t.input.focus(),t.yearshtml&&(i=t.yearshtml,setTimeout(function(){i===t.yearshtml&&t.yearshtml&&t.dpDiv.find("select.ui-datepicker-year:first").replaceWith(t.yearshtml),i=t.yearshtml=null},0))},_shouldFocusInput:function(e){return e.input&&e.input.is(":visible")&&!e.input.is(":disabled")&&!e.input.is(":focus")},_checkOffset:function(t,i,s){var n=t.dpDiv.outerWidth(),a=t.dpDiv.outerHeight(),o=t.input?t.input.outerWidth():0,r=t.input?t.input.outerHeight():0,h=document.documentElement.clientWidth+(s?0:e(document).scrollLeft()),l=document.documentElement.clientHeight+(s?0:e(document).scrollTop());return i.left-=this._get(t,"isRTL")?n-o:0,i.left-=s&&i.left===t.input.offset().left?e(document).scrollLeft():0,i.top-=s&&i.top===t.input.offset().top+r?e(document).scrollTop():0,i.left-=Math.min(i.left,i.left+n>h&&h>n?Math.abs(i.left+n-h):0),i.top-=Math.min(i.top,i.top+a>l&&l>a?Math.abs(a+r):0),i},_findPos:function(t){for(var i,s=this._getInst(t),n=this._get(s,"isRTL");t&&("hidden"===t.type||1!==t.nodeType||e.expr.filters.hidden(t));)t=t[n?"previousSibling":"nextSibling"];return i=e(t).offset(),[i.left,i.top]},_hideDatepicker:function(t){var i,s,n,a,o=this._curInst;!o||t&&o!==e.data(t,"datepicker")||this._datepickerShowing&&(i=this._get(o,"showAnim"),s=this._get(o,"duration"),n=function(){e.datepicker._tidyDialog(o)},e.effects&&(e.effects.effect[i]||e.effects[i])?o.dpDiv.hide(i,e.datepicker._get(o,"showOptions"),s,n):o.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?s:null,n),i||n(),this._datepickerShowing=!1,a=this._get(o,"onClose"),a&&a.apply(o.input?o.input[0]:null,[o.input?o.input.val():"",o]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),e.blockUI&&(e.unblockUI(),e("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(e){e.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(t){if(e.datepicker._curInst){var i=e(t.target),s=e.datepicker._getInst(i[0]);(i[0].id!==e.datepicker._mainDivId&&0===i.parents("#"+e.datepicker._mainDivId).length&&!i.hasClass(e.datepicker.markerClassName)&&!i.closest("."+e.datepicker._triggerClass).length&&e.datepicker._datepickerShowing&&(!e.datepicker._inDialog||!e.blockUI)||i.hasClass(e.datepicker.markerClassName)&&e.datepicker._curInst!==s)&&e.datepicker._hideDatepicker()}},_adjustDate:function(t,i,s){var n=e(t),a=this._getInst(n[0]);this._isDisabledDatepicker(n[0])||(this._adjustInstDate(a,i+("M"===s?this._get(a,"showCurrentAtPos"):0),s),this._updateDatepicker(a))},_gotoToday:function(t){var i,s=e(t),n=this._getInst(s[0]);this._get(n,"gotoCurrent")&&n.currentDay?(n.selectedDay=n.currentDay,n.drawMonth=n.selectedMonth=n.currentMonth,n.drawYear=n.selectedYear=n.currentYear):(i=new Date,n.selectedDay=i.getDate(),n.drawMonth=n.selectedMonth=i.getMonth(),n.drawYear=n.selectedYear=i.getFullYear()),this._notifyChange(n),this._adjustDate(s)},_selectMonthYear:function(t,i,s){var n=e(t),a=this._getInst(n[0]);a["selected"+("M"===s?"Month":"Year")]=a["draw"+("M"===s?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(a),this._adjustDate(n)},_selectDay:function(t,i,s,n){var a,o=e(t);e(n).hasClass(this._unselectableClass)||this._isDisabledDatepicker(o[0])||(a=this._getInst(o[0]),a.selectedDay=a.currentDay=e("a",n).html(),a.selectedMonth=a.currentMonth=i,a.selectedYear=a.currentYear=s,this._selectDate(t,this._formatDate(a,a.currentDay,a.currentMonth,a.currentYear)))},_clearDate:function(t){var i=e(t);this._selectDate(i,"")},_selectDate:function(t,i){var s,n=e(t),a=this._getInst(n[0]);i=null!=i?i:this._formatDate(a),a.input&&a.input.val(i),this._updateAlternate(a),s=this._get(a,"onSelect"),s?s.apply(a.input?a.input[0]:null,[i,a]):a.input&&a.input.trigger("change"),a.inline?this._updateDatepicker(a):(this._hideDatepicker(),this._lastInput=a.input[0],"object"!=typeof a.input[0]&&a.input.focus(),this._lastInput=null)},_updateAlternate:function(t){var i,s,n,a=this._get(t,"altField");a&&(i=this._get(t,"altFormat")||this._get(t,"dateFormat"),s=this._getDate(t),n=this.formatDate(i,s,this._getFormatConfig(t)),e(a).each(function(){e(this).val(n)}))},noWeekends:function(e){var t=e.getDay();return[t>0&&6>t,""]},iso8601Week:function(e){var t,i=new Date(e.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),t=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((t-i)/864e5)/7)+1},parseDate:function(t,i,s){if(null==t||null==i)throw"Invalid arguments";if(i="object"==typeof i?""+i:i+"",""===i)return null;var n,a,o,r,h=0,l=(s?s.shortYearCutoff:null)||this._defaults.shortYearCutoff,u="string"!=typeof l?l:(new Date).getFullYear()%100+parseInt(l,10),d=(s?s.dayNamesShort:null)||this._defaults.dayNamesShort,c=(s?s.dayNames:null)||this._defaults.dayNames,p=(s?s.monthNamesShort:null)||this._defaults.monthNamesShort,f=(s?s.monthNames:null)||this._defaults.monthNames,m=-1,g=-1,v=-1,y=-1,b=!1,_=function(e){var i=t.length>n+1&&t.charAt(n+1)===e;return i&&n++,i},x=function(e){var t=_(e),s="@"===e?14:"!"===e?20:"y"===e&&t?4:"o"===e?3:2,n="y"===e?s:1,a=RegExp("^\\d{"+n+","+s+"}"),o=i.substring(h).match(a);if(!o)throw"Missing number at position "+h;return h+=o[0].length,parseInt(o[0],10)},w=function(t,s,n){var a=-1,o=e.map(_(t)?n:s,function(e,t){return[[t,e]]}).sort(function(e,t){return-(e[1].length-t[1].length)});if(e.each(o,function(e,t){var s=t[1];return i.substr(h,s.length).toLowerCase()===s.toLowerCase()?(a=t[0],h+=s.length,!1):void 0}),-1!==a)return a+1;throw"Unknown name at position "+h},k=function(){if(i.charAt(h)!==t.charAt(n))throw"Unexpected literal at position "+h;h++};for(n=0;t.length>n;n++)if(b)"'"!==t.charAt(n)||_("'")?k():b=!1;else switch(t.charAt(n)){case"d":v=x("d");break;case"D":w("D",d,c);break;case"o":y=x("o");break;case"m":g=x("m");break;case"M":g=w("M",p,f);break;case"y":m=x("y");break;case"@":r=new Date(x("@")),m=r.getFullYear(),g=r.getMonth()+1,v=r.getDate();break;case"!":r=new Date((x("!")-this._ticksTo1970)/1e4),m=r.getFullYear(),g=r.getMonth()+1,v=r.getDate();break;case"'":_("'")?k():b=!0;break;default:k()}if(i.length>h&&(o=i.substr(h),!/^\s+/.test(o)))throw"Extra/unparsed characters found in date: "+o;if(-1===m?m=(new Date).getFullYear():100>m&&(m+=(new Date).getFullYear()-(new Date).getFullYear()%100+(u>=m?0:-100)),y>-1)for(g=1,v=y;;){if(a=this._getDaysInMonth(m,g-1),a>=v)break;g++,v-=a}if(r=this._daylightSavingAdjust(new Date(m,g-1,v)),r.getFullYear()!==m||r.getMonth()+1!==g||r.getDate()!==v)throw"Invalid date";return r},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:1e7*60*60*24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925)),formatDate:function(e,t,i){if(!t)return"";var s,n=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,a=(i?i.dayNames:null)||this._defaults.dayNames,o=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,r=(i?i.monthNames:null)||this._defaults.monthNames,h=function(t){var i=e.length>s+1&&e.charAt(s+1)===t;return i&&s++,i},l=function(e,t,i){var s=""+t;if(h(e))for(;i>s.length;)s="0"+s;return s},u=function(e,t,i,s){return h(e)?s[t]:i[t]},d="",c=!1;if(t)for(s=0;e.length>s;s++)if(c)"'"!==e.charAt(s)||h("'")?d+=e.charAt(s):c=!1;else switch(e.charAt(s)){case"d":d+=l("d",t.getDate(),2);break;case"D":d+=u("D",t.getDay(),n,a);break;case"o":d+=l("o",Math.round((new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()-new Date(t.getFullYear(),0,0).getTime())/864e5),3);break;case"m":d+=l("m",t.getMonth()+1,2);break;case"M":d+=u("M",t.getMonth(),o,r);break;case"y":d+=h("y")?t.getFullYear():(10>t.getYear()%100?"0":"")+t.getYear()%100;break;case"@":d+=t.getTime();break;case"!":d+=1e4*t.getTime()+this._ticksTo1970;break;case"'":h("'")?d+="'":c=!0;break;default:d+=e.charAt(s)}return d},_possibleChars:function(e){var t,i="",s=!1,n=function(i){var s=e.length>t+1&&e.charAt(t+1)===i;return s&&t++,s};for(t=0;e.length>t;t++)if(s)"'"!==e.charAt(t)||n("'")?i+=e.charAt(t):s=!1;else switch(e.charAt(t)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":n("'")?i+="'":s=!0;break;default:i+=e.charAt(t)}return i},_get:function(e,t){return void 0!==e.settings[t]?e.settings[t]:this._defaults[t]},_setDateFromField:function(e,t){if(e.input.val()!==e.lastVal){var i=this._get(e,"dateFormat"),s=e.lastVal=e.input?e.input.val():null,n=this._getDefaultDate(e),a=n,o=this._getFormatConfig(e);try{a=this.parseDate(i,s,o)||n}catch(r){s=t?"":s}e.selectedDay=a.getDate(),e.drawMonth=e.selectedMonth=a.getMonth(),e.drawYear=e.selectedYear=a.getFullYear(),e.currentDay=s?a.getDate():0,e.currentMonth=s?a.getMonth():0,e.currentYear=s?a.getFullYear():0,this._adjustInstDate(e)}},_getDefaultDate:function(e){return this._restrictMinMax(e,this._determineDate(e,this._get(e,"defaultDate"),new Date))},_determineDate:function(t,i,s){var n=function(e){var t=new Date;return t.setDate(t.getDate()+e),t},a=function(i){try{return e.datepicker.parseDate(e.datepicker._get(t,"dateFormat"),i,e.datepicker._getFormatConfig(t))}catch(s){}for(var n=(i.toLowerCase().match(/^c/)?e.datepicker._getDate(t):null)||new Date,a=n.getFullYear(),o=n.getMonth(),r=n.getDate(),h=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,l=h.exec(i);l;){switch(l[2]||"d"){case"d":case"D":r+=parseInt(l[1],10);break;case"w":case"W":r+=7*parseInt(l[1],10);break;case"m":case"M":o+=parseInt(l[1],10),r=Math.min(r,e.datepicker._getDaysInMonth(a,o));break;case"y":case"Y":a+=parseInt(l[1],10),r=Math.min(r,e.datepicker._getDaysInMonth(a,o))}l=h.exec(i)}return new Date(a,o,r)},o=null==i||""===i?s:"string"==typeof i?a(i):"number"==typeof i?isNaN(i)?s:n(i):new Date(i.getTime());return o=o&&"Invalid Date"==""+o?s:o,o&&(o.setHours(0),o.setMinutes(0),o.setSeconds(0),o.setMilliseconds(0)),this._daylightSavingAdjust(o)},_daylightSavingAdjust:function(e){return e?(e.setHours(e.getHours()>12?e.getHours()+2:0),e):null},_setDate:function(e,t,i){var s=!t,n=e.selectedMonth,a=e.selectedYear,o=this._restrictMinMax(e,this._determineDate(e,t,new Date));e.selectedDay=e.currentDay=o.getDate(),e.drawMonth=e.selectedMonth=e.currentMonth=o.getMonth(),e.drawYear=e.selectedYear=e.currentYear=o.getFullYear(),n===e.selectedMonth&&a===e.selectedYear||i||this._notifyChange(e),this._adjustInstDate(e),e.input&&e.input.val(s?"":this._formatDate(e))},_getDate:function(e){var t=!e.currentYear||e.input&&""===e.input.val()?null:this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return t},_attachHandlers:function(t){var i=this._get(t,"stepMonths"),s="#"+t.id.replace(/\\\\/g,"\\");t.dpDiv.find("[data-handler]").map(function(){var t={prev:function(){e.datepicker._adjustDate(s,-i,"M")},next:function(){e.datepicker._adjustDate(s,+i,"M")},hide:function(){e.datepicker._hideDatepicker()},today:function(){e.datepicker._gotoToday(s)},selectDay:function(){return e.datepicker._selectDay(s,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return e.datepicker._selectMonthYear(s,this,"M"),!1},selectYear:function(){return e.datepicker._selectMonthYear(s,this,"Y"),!1}};e(this).bind(this.getAttribute("data-event"),t[this.getAttribute("data-handler")])})},_generateHTML:function(e){var t,i,s,n,a,o,r,h,l,u,d,c,p,f,m,g,v,y,b,_,x,w,k,T,D,S,M,C,N,A,P,I,H,z,F,E,O,j,W,L=new Date,R=this._daylightSavingAdjust(new Date(L.getFullYear(),L.getMonth(),L.getDate())),Y=this._get(e,"isRTL"),B=this._get(e,"showButtonPanel"),J=this._get(e,"hideIfNoPrevNext"),q=this._get(e,"navigationAsDateFormat"),K=this._getNumberOfMonths(e),V=this._get(e,"showCurrentAtPos"),U=this._get(e,"stepMonths"),Q=1!==K[0]||1!==K[1],G=this._daylightSavingAdjust(e.currentDay?new Date(e.currentYear,e.currentMonth,e.currentDay):new Date(9999,9,9)),X=this._getMinMaxDate(e,"min"),$=this._getMinMaxDate(e,"max"),Z=e.drawMonth-V,et=e.drawYear;if(0>Z&&(Z+=12,et--),$)for(t=this._daylightSavingAdjust(new Date($.getFullYear(),$.getMonth()-K[0]*K[1]+1,$.getDate())),t=X&&X>t?X:t;this._daylightSavingAdjust(new Date(et,Z,1))>t;)Z--,0>Z&&(Z=11,et--);for(e.drawMonth=Z,e.drawYear=et,i=this._get(e,"prevText"),i=q?this.formatDate(i,this._daylightSavingAdjust(new Date(et,Z-U,1)),this._getFormatConfig(e)):i,s=this._canAdjustMonth(e,-1,et,Z)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"e":"w")+"'>"+i+"</span></a>":J?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"e":"w")+"'>"+i+"</span></a>",n=this._get(e,"nextText"),n=q?this.formatDate(n,this._daylightSavingAdjust(new Date(et,Z+U,1)),this._getFormatConfig(e)):n,a=this._canAdjustMonth(e,1,et,Z)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"w":"e")+"'>"+n+"</span></a>":J?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"w":"e")+"'>"+n+"</span></a>",o=this._get(e,"currentText"),r=this._get(e,"gotoCurrent")&&e.currentDay?G:R,o=q?this.formatDate(o,r,this._getFormatConfig(e)):o,h=e.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(e,"closeText")+"</button>",l=B?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(Y?h:"")+(this._isInRange(e,r)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+o+"</button>":"")+(Y?"":h)+"</div>":"",u=parseInt(this._get(e,"firstDay"),10),u=isNaN(u)?0:u,d=this._get(e,"showWeek"),c=this._get(e,"dayNames"),p=this._get(e,"dayNamesMin"),f=this._get(e,"monthNames"),m=this._get(e,"monthNamesShort"),g=this._get(e,"beforeShowDay"),v=this._get(e,"showOtherMonths"),y=this._get(e,"selectOtherMonths"),b=this._getDefaultDate(e),_="",w=0;K[0]>w;w++){for(k="",this.maxRows=4,T=0;K[1]>T;T++){if(D=this._daylightSavingAdjust(new Date(et,Z,e.selectedDay)),S=" ui-corner-all",M="",Q){if(M+="<div class='ui-datepicker-group",K[1]>1)switch(T){case 0:M+=" ui-datepicker-group-first",S=" ui-corner-"+(Y?"right":"left");break;case K[1]-1:M+=" ui-datepicker-group-last",S=" ui-corner-"+(Y?"left":"right");break;default:M+=" ui-datepicker-group-middle",S=""}M+="'>"}for(M+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+S+"'>"+(/all|left/.test(S)&&0===w?Y?a:s:"")+(/all|right/.test(S)&&0===w?Y?s:a:"")+this._generateMonthYearHeader(e,Z,et,X,$,w>0||T>0,f,m)+"</div><table class='ui-datepicker-calendar'><thead>"+"<tr>",C=d?"<th class='ui-datepicker-week-col'>"+this._get(e,"weekHeader")+"</th>":"",x=0;7>x;x++)N=(x+u)%7,C+="<th scope='col'"+((x+u+6)%7>=5?" class='ui-datepicker-week-end'":"")+">"+"<span title='"+c[N]+"'>"+p[N]+"</span></th>";for(M+=C+"</tr></thead><tbody>",A=this._getDaysInMonth(et,Z),et===e.selectedYear&&Z===e.selectedMonth&&(e.selectedDay=Math.min(e.selectedDay,A)),P=(this._getFirstDayOfMonth(et,Z)-u+7)%7,I=Math.ceil((P+A)/7),H=Q?this.maxRows>I?this.maxRows:I:I,this.maxRows=H,z=this._daylightSavingAdjust(new Date(et,Z,1-P)),F=0;H>F;F++){for(M+="<tr>",E=d?"<td class='ui-datepicker-week-col'>"+this._get(e,"calculateWeek")(z)+"</td>":"",x=0;7>x;x++)O=g?g.apply(e.input?e.input[0]:null,[z]):[!0,""],j=z.getMonth()!==Z,W=j&&!y||!O[0]||X&&X>z||$&&z>$,E+="<td class='"+((x+u+6)%7>=5?" ui-datepicker-week-end":"")+(j?" ui-datepicker-other-month":"")+(z.getTime()===D.getTime()&&Z===e.selectedMonth&&e._keyEvent||b.getTime()===z.getTime()&&b.getTime()===D.getTime()?" "+this._dayOverClass:"")+(W?" "+this._unselectableClass+" ui-state-disabled":"")+(j&&!v?"":" "+O[1]+(z.getTime()===G.getTime()?" "+this._currentClass:"")+(z.getTime()===R.getTime()?" ui-datepicker-today":""))+"'"+(j&&!v||!O[2]?"":" title='"+O[2].replace(/'/g,"'")+"'")+(W?"":" data-handler='selectDay' data-event='click' data-month='"+z.getMonth()+"' data-year='"+z.getFullYear()+"'")+">"+(j&&!v?" ":W?"<span class='ui-state-default'>"+z.getDate()+"</span>":"<a class='ui-state-default"+(z.getTime()===R.getTime()?" ui-state-highlight":"")+(z.getTime()===G.getTime()?" ui-state-active":"")+(j?" ui-priority-secondary":"")+"' href='#'>"+z.getDate()+"</a>")+"</td>",z.setDate(z.getDate()+1),z=this._daylightSavingAdjust(z);M+=E+"</tr>"}Z++,Z>11&&(Z=0,et++),M+="</tbody></table>"+(Q?"</div>"+(K[0]>0&&T===K[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),k+=M}_+=k}return _+=l,e._keyEvent=!1,_},_generateMonthYearHeader:function(e,t,i,s,n,a,o,r){var h,l,u,d,c,p,f,m,g=this._get(e,"changeMonth"),v=this._get(e,"changeYear"),y=this._get(e,"showMonthAfterYear"),b="<div class='ui-datepicker-title'>",_="";if(a||!g)_+="<span class='ui-datepicker-month'>"+o[t]+"</span>";else{for(h=s&&s.getFullYear()===i,l=n&&n.getFullYear()===i,_+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",u=0;12>u;u++)(!h||u>=s.getMonth())&&(!l||n.getMonth()>=u)&&(_+="<option value='"+u+"'"+(u===t?" selected='selected'":"")+">"+r[u]+"</option>");_+="</select>"}if(y||(b+=_+(!a&&g&&v?"":" ")),!e.yearshtml)if(e.yearshtml="",a||!v)b+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(d=this._get(e,"yearRange").split(":"),c=(new Date).getFullYear(),p=function(e){var t=e.match(/c[+\-].*/)?i+parseInt(e.substring(1),10):e.match(/[+\-].*/)?c+parseInt(e,10):parseInt(e,10);return isNaN(t)?c:t},f=p(d[0]),m=Math.max(f,p(d[1]||"")),f=s?Math.max(f,s.getFullYear()):f,m=n?Math.min(m,n.getFullYear()):m,e.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";m>=f;f++)e.yearshtml+="<option value='"+f+"'"+(f===i?" selected='selected'":"")+">"+f+"</option>";e.yearshtml+="</select>",b+=e.yearshtml,e.yearshtml=null}return b+=this._get(e,"yearSuffix"),y&&(b+=(!a&&g&&v?"":" ")+_),b+="</div>"},_adjustInstDate:function(e,t,i){var s=e.drawYear+("Y"===i?t:0),n=e.drawMonth+("M"===i?t:0),a=Math.min(e.selectedDay,this._getDaysInMonth(s,n))+("D"===i?t:0),o=this._restrictMinMax(e,this._daylightSavingAdjust(new Date(s,n,a)));e.selectedDay=o.getDate(),e.drawMonth=e.selectedMonth=o.getMonth(),e.drawYear=e.selectedYear=o.getFullYear(),("M"===i||"Y"===i)&&this._notifyChange(e)},_restrictMinMax:function(e,t){var i=this._getMinMaxDate(e,"min"),s=this._getMinMaxDate(e,"max"),n=i&&i>t?i:t;return s&&n>s?s:n},_notifyChange:function(e){var t=this._get(e,"onChangeMonthYear");t&&t.apply(e.input?e.input[0]:null,[e.selectedYear,e.selectedMonth+1,e])},_getNumberOfMonths:function(e){var t=this._get(e,"numberOfMonths");return null==t?[1,1]:"number"==typeof t?[1,t]:t},_getMinMaxDate:function(e,t){return this._determineDate(e,this._get(e,t+"Date"),null)},_getDaysInMonth:function(e,t){return 32-this._daylightSavingAdjust(new Date(e,t,32)).getDate()},_getFirstDayOfMonth:function(e,t){return new Date(e,t,1).getDay()},_canAdjustMonth:function(e,t,i,s){var n=this._getNumberOfMonths(e),a=this._daylightSavingAdjust(new Date(i,s+(0>t?t:n[0]*n[1]),1));return 0>t&&a.setDate(this._getDaysInMonth(a.getFullYear(),a.getMonth())),this._isInRange(e,a)},_isInRange:function(e,t){var i,s,n=this._getMinMaxDate(e,"min"),a=this._getMinMaxDate(e,"max"),o=null,r=null,h=this._get(e,"yearRange");return h&&(i=h.split(":"),s=(new Date).getFullYear(),o=parseInt(i[0],10),r=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(o+=s),i[1].match(/[+\-].*/)&&(r+=s)),(!n||t.getTime()>=n.getTime())&&(!a||t.getTime()<=a.getTime())&&(!o||t.getFullYear()>=o)&&(!r||r>=t.getFullYear())},_getFormatConfig:function(e){var t=this._get(e,"shortYearCutoff");return t="string"!=typeof t?t:(new Date).getFullYear()%100+parseInt(t,10),{shortYearCutoff:t,dayNamesShort:this._get(e,"dayNamesShort"),dayNames:this._get(e,"dayNames"),monthNamesShort:this._get(e,"monthNamesShort"),monthNames:this._get(e,"monthNames")}},_formatDate:function(e,t,i,s){t||(e.currentDay=e.selectedDay,e.currentMonth=e.selectedMonth,e.currentYear=e.selectedYear);var n=t?"object"==typeof t?t:this._daylightSavingAdjust(new Date(s,i,t)):this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return this.formatDate(this._get(e,"dateFormat"),n,this._getFormatConfig(e))}}),e.fn.datepicker=function(t){if(!this.length)return this;e.datepicker.initialized||(e(document).mousedown(e.datepicker._checkExternalClick),e.datepicker.initialized=!0),0===e("#"+e.datepicker._mainDivId).length&&e("body").append(e.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return"string"!=typeof t||"isDisabled"!==t&&"getDate"!==t&&"widget"!==t?"option"===t&&2===arguments.length&&"string"==typeof arguments[1]?e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this[0]].concat(i)):this.each(function(){"string"==typeof t?e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this].concat(i)):e.datepicker._attachDatepicker(this,t)}):e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this[0]].concat(i))},e.datepicker=new n,e.datepicker.initialized=!1,e.datepicker.uuid=(new Date).getTime(),e.datepicker.version="1.11.4",e.datepicker,e.widget("ui.dialog",{version:"1.11.4",options:{appendTo:"body",autoOpen:!0,buttons:[],closeOnEscape:!0,closeText:"Close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(t){var i=e(this).css(t).offset().top;0>i&&e(this).css("top",t.top-i)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},sizeRelatedOptions:{buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},resizableRelatedOptions:{maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),this.options.title=this.options.title||this.originalTitle,this._createWrapper(),this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(this.uiDialog),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&e.fn.draggable&&this._makeDraggable(),this.options.resizable&&e.fn.resizable&&this._makeResizable(),this._isOpen=!1,this._trackFocus()},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var t=this.options.appendTo;return t&&(t.jquery||t.nodeType)?e(t):this.document.find(t||"body").eq(0)},_destroy:function(){var e,t=this.originalPosition;this._untrackInstance(),this._destroyOverlay(),this.element.removeUniqueId().removeClass("ui-dialog-content ui-widget-content").css(this.originalCss).detach(),this.uiDialog.stop(!0,!0).remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),e=t.parent.children().eq(t.index),e.length&&e[0]!==this.element[0]?e.before(this.element):t.parent.append(this.element)},widget:function(){return this.uiDialog},disable:e.noop,enable:e.noop,close:function(t){var i,s=this;if(this._isOpen&&this._trigger("beforeClose",t)!==!1){if(this._isOpen=!1,this._focusedElement=null,this._destroyOverlay(),this._untrackInstance(),!this.opener.filter(":focusable").focus().length)try{i=this.document[0].activeElement,i&&"body"!==i.nodeName.toLowerCase()&&e(i).blur()}catch(n){}this._hide(this.uiDialog,this.options.hide,function(){s._trigger("close",t)})}},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(t,i){var s=!1,n=this.uiDialog.siblings(".ui-front:visible").map(function(){return+e(this).css("z-index")}).get(),a=Math.max.apply(null,n);return a>=+this.uiDialog.css("z-index")&&(this.uiDialog.css("z-index",a+1),s=!0),s&&!i&&this._trigger("focus",t),s},open:function(){var t=this; +return this._isOpen?(this._moveToTop()&&this._focusTabbable(),void 0):(this._isOpen=!0,this.opener=e(this.document[0].activeElement),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this.overlay&&this.overlay.css("z-index",this.uiDialog.css("z-index")-1),this._show(this.uiDialog,this.options.show,function(){t._focusTabbable(),t._trigger("focus")}),this._makeFocusTarget(),this._trigger("open"),void 0)},_focusTabbable:function(){var e=this._focusedElement;e||(e=this.element.find("[autofocus]")),e.length||(e=this.element.find(":tabbable")),e.length||(e=this.uiDialogButtonPane.find(":tabbable")),e.length||(e=this.uiDialogTitlebarClose.filter(":tabbable")),e.length||(e=this.uiDialog),e.eq(0).focus()},_keepFocus:function(t){function i(){var t=this.document[0].activeElement,i=this.uiDialog[0]===t||e.contains(this.uiDialog[0],t);i||this._focusTabbable()}t.preventDefault(),i.call(this),this._delay(i)},_createWrapper:function(){this.uiDialog=e("<div>").addClass("ui-dialog ui-widget ui-widget-content ui-corner-all ui-front "+this.options.dialogClass).hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._on(this.uiDialog,{keydown:function(t){if(this.options.closeOnEscape&&!t.isDefaultPrevented()&&t.keyCode&&t.keyCode===e.ui.keyCode.ESCAPE)return t.preventDefault(),this.close(t),void 0;if(t.keyCode===e.ui.keyCode.TAB&&!t.isDefaultPrevented()){var i=this.uiDialog.find(":tabbable"),s=i.filter(":first"),n=i.filter(":last");t.target!==n[0]&&t.target!==this.uiDialog[0]||t.shiftKey?t.target!==s[0]&&t.target!==this.uiDialog[0]||!t.shiftKey||(this._delay(function(){n.focus()}),t.preventDefault()):(this._delay(function(){s.focus()}),t.preventDefault())}},mousedown:function(e){this._moveToTop(e)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var t;this.uiDialogTitlebar=e("<div>").addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(this.uiDialog),this._on(this.uiDialogTitlebar,{mousedown:function(t){e(t.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.focus()}}),this.uiDialogTitlebarClose=e("<button type='button'></button>").button({label:this.options.closeText,icons:{primary:"ui-icon-closethick"},text:!1}).addClass("ui-dialog-titlebar-close").appendTo(this.uiDialogTitlebar),this._on(this.uiDialogTitlebarClose,{click:function(e){e.preventDefault(),this.close(e)}}),t=e("<span>").uniqueId().addClass("ui-dialog-title").prependTo(this.uiDialogTitlebar),this._title(t),this.uiDialog.attr({"aria-labelledby":t.attr("id")})},_title:function(e){this.options.title||e.html(" "),e.text(this.options.title)},_createButtonPane:function(){this.uiDialogButtonPane=e("<div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),this.uiButtonSet=e("<div>").addClass("ui-dialog-buttonset").appendTo(this.uiDialogButtonPane),this._createButtons()},_createButtons:function(){var t=this,i=this.options.buttons;return this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),e.isEmptyObject(i)||e.isArray(i)&&!i.length?(this.uiDialog.removeClass("ui-dialog-buttons"),void 0):(e.each(i,function(i,s){var n,a;s=e.isFunction(s)?{click:s,text:i}:s,s=e.extend({type:"button"},s),n=s.click,s.click=function(){n.apply(t.element[0],arguments)},a={icons:s.icons,text:s.showText},delete s.icons,delete s.showText,e("<button></button>",s).button(a).appendTo(t.uiButtonSet)}),this.uiDialog.addClass("ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog),void 0)},_makeDraggable:function(){function t(e){return{position:e.position,offset:e.offset}}var i=this,s=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(s,n){e(this).addClass("ui-dialog-dragging"),i._blockFrames(),i._trigger("dragStart",s,t(n))},drag:function(e,s){i._trigger("drag",e,t(s))},stop:function(n,a){var o=a.offset.left-i.document.scrollLeft(),r=a.offset.top-i.document.scrollTop();s.position={my:"left top",at:"left"+(o>=0?"+":"")+o+" "+"top"+(r>=0?"+":"")+r,of:i.window},e(this).removeClass("ui-dialog-dragging"),i._unblockFrames(),i._trigger("dragStop",n,t(a))}})},_makeResizable:function(){function t(e){return{originalPosition:e.originalPosition,originalSize:e.originalSize,position:e.position,size:e.size}}var i=this,s=this.options,n=s.resizable,a=this.uiDialog.css("position"),o="string"==typeof n?n:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:s.maxWidth,maxHeight:s.maxHeight,minWidth:s.minWidth,minHeight:this._minHeight(),handles:o,start:function(s,n){e(this).addClass("ui-dialog-resizing"),i._blockFrames(),i._trigger("resizeStart",s,t(n))},resize:function(e,s){i._trigger("resize",e,t(s))},stop:function(n,a){var o=i.uiDialog.offset(),r=o.left-i.document.scrollLeft(),h=o.top-i.document.scrollTop();s.height=i.uiDialog.height(),s.width=i.uiDialog.width(),s.position={my:"left top",at:"left"+(r>=0?"+":"")+r+" "+"top"+(h>=0?"+":"")+h,of:i.window},e(this).removeClass("ui-dialog-resizing"),i._unblockFrames(),i._trigger("resizeStop",n,t(a))}}).css("position",a)},_trackFocus:function(){this._on(this.widget(),{focusin:function(t){this._makeFocusTarget(),this._focusedElement=e(t.target)}})},_makeFocusTarget:function(){this._untrackInstance(),this._trackingInstances().unshift(this)},_untrackInstance:function(){var t=this._trackingInstances(),i=e.inArray(this,t);-1!==i&&t.splice(i,1)},_trackingInstances:function(){var e=this.document.data("ui-dialog-instances");return e||(e=[],this.document.data("ui-dialog-instances",e)),e},_minHeight:function(){var e=this.options;return"auto"===e.height?e.minHeight:Math.min(e.minHeight,e.height)},_position:function(){var e=this.uiDialog.is(":visible");e||this.uiDialog.show(),this.uiDialog.position(this.options.position),e||this.uiDialog.hide()},_setOptions:function(t){var i=this,s=!1,n={};e.each(t,function(e,t){i._setOption(e,t),e in i.sizeRelatedOptions&&(s=!0),e in i.resizableRelatedOptions&&(n[e]=t)}),s&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",n)},_setOption:function(e,t){var i,s,n=this.uiDialog;"dialogClass"===e&&n.removeClass(this.options.dialogClass).addClass(t),"disabled"!==e&&(this._super(e,t),"appendTo"===e&&this.uiDialog.appendTo(this._appendTo()),"buttons"===e&&this._createButtons(),"closeText"===e&&this.uiDialogTitlebarClose.button({label:""+t}),"draggable"===e&&(i=n.is(":data(ui-draggable)"),i&&!t&&n.draggable("destroy"),!i&&t&&this._makeDraggable()),"position"===e&&this._position(),"resizable"===e&&(s=n.is(":data(ui-resizable)"),s&&!t&&n.resizable("destroy"),s&&"string"==typeof t&&n.resizable("option","handles",t),s||t===!1||this._makeResizable()),"title"===e&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var e,t,i,s=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),s.minWidth>s.width&&(s.width=s.minWidth),e=this.uiDialog.css({height:"auto",width:s.width}).outerHeight(),t=Math.max(0,s.minHeight-e),i="number"==typeof s.maxHeight?Math.max(0,s.maxHeight-e):"none","auto"===s.height?this.element.css({minHeight:t,maxHeight:i,height:"auto"}):this.element.height(Math.max(0,s.height-e)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var t=e(this);return e("<div>").css({position:"absolute",width:t.outerWidth(),height:t.outerHeight()}).appendTo(t.parent()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(t){return e(t.target).closest(".ui-dialog").length?!0:!!e(t.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var t=!0;this._delay(function(){t=!1}),this.document.data("ui-dialog-overlays")||this._on(this.document,{focusin:function(e){t||this._allowInteraction(e)||(e.preventDefault(),this._trackingInstances()[0]._focusTabbable())}}),this.overlay=e("<div>").addClass("ui-widget-overlay ui-front").appendTo(this._appendTo()),this._on(this.overlay,{mousedown:"_keepFocus"}),this.document.data("ui-dialog-overlays",(this.document.data("ui-dialog-overlays")||0)+1)}},_destroyOverlay:function(){if(this.options.modal&&this.overlay){var e=this.document.data("ui-dialog-overlays")-1;e?this.document.data("ui-dialog-overlays",e):this.document.unbind("focusin").removeData("ui-dialog-overlays"),this.overlay.remove(),this.overlay=null}}}),e.widget("ui.progressbar",{version:"1.11.4",options:{max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min}),this.valueDiv=e("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element),this._refreshValue()},_destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.valueDiv.remove()},value:function(e){return void 0===e?this.options.value:(this.options.value=this._constrainedValue(e),this._refreshValue(),void 0)},_constrainedValue:function(e){return void 0===e&&(e=this.options.value),this.indeterminate=e===!1,"number"!=typeof e&&(e=0),this.indeterminate?!1:Math.min(this.options.max,Math.max(this.min,e))},_setOptions:function(e){var t=e.value;delete e.value,this._super(e),this.options.value=this._constrainedValue(t),this._refreshValue()},_setOption:function(e,t){"max"===e&&(t=Math.max(this.min,t)),"disabled"===e&&this.element.toggleClass("ui-state-disabled",!!t).attr("aria-disabled",t),this._super(e,t)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var t=this.options.value,i=this._percentage();this.valueDiv.toggle(this.indeterminate||t>this.min).toggleClass("ui-corner-right",t===this.options.max).width(i.toFixed(0)+"%"),this.element.toggleClass("ui-progressbar-indeterminate",this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=e("<div class='ui-progressbar-overlay'></div>").appendTo(this.valueDiv))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":t}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==t&&(this.oldValue=t,this._trigger("change")),t===this.options.max&&this._trigger("complete")}}),e.widget("ui.selectmenu",{version:"1.11.4",defaultElement:"<select>",options:{appendTo:null,disabled:null,icons:{button:"ui-icon-triangle-1-s"},position:{my:"left top",at:"left bottom",collision:"none"},width:null,change:null,close:null,focus:null,open:null,select:null},_create:function(){var e=this.element.uniqueId().attr("id");this.ids={element:e,button:e+"-button",menu:e+"-menu"},this._drawButton(),this._drawMenu(),this.options.disabled&&this.disable()},_drawButton:function(){var t=this;this.label=e("label[for='"+this.ids.element+"']").attr("for",this.ids.button),this._on(this.label,{click:function(e){this.button.focus(),e.preventDefault()}}),this.element.hide(),this.button=e("<span>",{"class":"ui-selectmenu-button ui-widget ui-state-default ui-corner-all",tabindex:this.options.disabled?-1:0,id:this.ids.button,role:"combobox","aria-expanded":"false","aria-autocomplete":"list","aria-owns":this.ids.menu,"aria-haspopup":"true"}).insertAfter(this.element),e("<span>",{"class":"ui-icon "+this.options.icons.button}).prependTo(this.button),this.buttonText=e("<span>",{"class":"ui-selectmenu-text"}).appendTo(this.button),this._setText(this.buttonText,this.element.find("option:selected").text()),this._resizeButton(),this._on(this.button,this._buttonEvents),this.button.one("focusin",function(){t.menuItems||t._refreshMenu()}),this._hoverable(this.button),this._focusable(this.button)},_drawMenu:function(){var t=this;this.menu=e("<ul>",{"aria-hidden":"true","aria-labelledby":this.ids.button,id:this.ids.menu}),this.menuWrap=e("<div>",{"class":"ui-selectmenu-menu ui-front"}).append(this.menu).appendTo(this._appendTo()),this.menuInstance=this.menu.menu({role:"listbox",select:function(e,i){e.preventDefault(),t._setSelection(),t._select(i.item.data("ui-selectmenu-item"),e)},focus:function(e,i){var s=i.item.data("ui-selectmenu-item");null!=t.focusIndex&&s.index!==t.focusIndex&&(t._trigger("focus",e,{item:s}),t.isOpen||t._select(s,e)),t.focusIndex=s.index,t.button.attr("aria-activedescendant",t.menuItems.eq(s.index).attr("id"))}}).menu("instance"),this.menu.addClass("ui-corner-bottom").removeClass("ui-corner-all"),this.menuInstance._off(this.menu,"mouseleave"),this.menuInstance._closeOnDocumentClick=function(){return!1},this.menuInstance._isDivider=function(){return!1}},refresh:function(){this._refreshMenu(),this._setText(this.buttonText,this._getSelectedItem().text()),this.options.width||this._resizeButton()},_refreshMenu:function(){this.menu.empty();var e,t=this.element.find("option");t.length&&(this._parseOptions(t),this._renderMenu(this.menu,this.items),this.menuInstance.refresh(),this.menuItems=this.menu.find("li").not(".ui-selectmenu-optgroup"),e=this._getSelectedItem(),this.menuInstance.focus(null,e),this._setAria(e.data("ui-selectmenu-item")),this._setOption("disabled",this.element.prop("disabled")))},open:function(e){this.options.disabled||(this.menuItems?(this.menu.find(".ui-state-focus").removeClass("ui-state-focus"),this.menuInstance.focus(null,this._getSelectedItem())):this._refreshMenu(),this.isOpen=!0,this._toggleAttr(),this._resizeMenu(),this._position(),this._on(this.document,this._documentClick),this._trigger("open",e))},_position:function(){this.menuWrap.position(e.extend({of:this.button},this.options.position))},close:function(e){this.isOpen&&(this.isOpen=!1,this._toggleAttr(),this.range=null,this._off(this.document),this._trigger("close",e))},widget:function(){return this.button},menuWidget:function(){return this.menu},_renderMenu:function(t,i){var s=this,n="";e.each(i,function(i,a){a.optgroup!==n&&(e("<li>",{"class":"ui-selectmenu-optgroup ui-menu-divider"+(a.element.parent("optgroup").prop("disabled")?" ui-state-disabled":""),text:a.optgroup}).appendTo(t),n=a.optgroup),s._renderItemData(t,a)})},_renderItemData:function(e,t){return this._renderItem(e,t).data("ui-selectmenu-item",t)},_renderItem:function(t,i){var s=e("<li>");return i.disabled&&s.addClass("ui-state-disabled"),this._setText(s,i.label),s.appendTo(t)},_setText:function(e,t){t?e.text(t):e.html(" ")},_move:function(e,t){var i,s,n=".ui-menu-item";this.isOpen?i=this.menuItems.eq(this.focusIndex):(i=this.menuItems.eq(this.element[0].selectedIndex),n+=":not(.ui-state-disabled)"),s="first"===e||"last"===e?i["first"===e?"prevAll":"nextAll"](n).eq(-1):i[e+"All"](n).eq(0),s.length&&this.menuInstance.focus(t,s)},_getSelectedItem:function(){return this.menuItems.eq(this.element[0].selectedIndex)},_toggle:function(e){this[this.isOpen?"close":"open"](e)},_setSelection:function(){var e;this.range&&(window.getSelection?(e=window.getSelection(),e.removeAllRanges(),e.addRange(this.range)):this.range.select(),this.button.focus())},_documentClick:{mousedown:function(t){this.isOpen&&(e(t.target).closest(".ui-selectmenu-menu, #"+this.ids.button).length||this.close(t))}},_buttonEvents:{mousedown:function(){var e;window.getSelection?(e=window.getSelection(),e.rangeCount&&(this.range=e.getRangeAt(0))):this.range=document.selection.createRange()},click:function(e){this._setSelection(),this._toggle(e)},keydown:function(t){var i=!0;switch(t.keyCode){case e.ui.keyCode.TAB:case e.ui.keyCode.ESCAPE:this.close(t),i=!1;break;case e.ui.keyCode.ENTER:this.isOpen&&this._selectFocusedItem(t);break;case e.ui.keyCode.UP:t.altKey?this._toggle(t):this._move("prev",t);break;case e.ui.keyCode.DOWN:t.altKey?this._toggle(t):this._move("next",t);break;case e.ui.keyCode.SPACE:this.isOpen?this._selectFocusedItem(t):this._toggle(t);break;case e.ui.keyCode.LEFT:this._move("prev",t);break;case e.ui.keyCode.RIGHT:this._move("next",t);break;case e.ui.keyCode.HOME:case e.ui.keyCode.PAGE_UP:this._move("first",t);break;case e.ui.keyCode.END:case e.ui.keyCode.PAGE_DOWN:this._move("last",t);break;default:this.menu.trigger(t),i=!1}i&&t.preventDefault()}},_selectFocusedItem:function(e){var t=this.menuItems.eq(this.focusIndex);t.hasClass("ui-state-disabled")||this._select(t.data("ui-selectmenu-item"),e)},_select:function(e,t){var i=this.element[0].selectedIndex;this.element[0].selectedIndex=e.index,this._setText(this.buttonText,e.label),this._setAria(e),this._trigger("select",t,{item:e}),e.index!==i&&this._trigger("change",t,{item:e}),this.close(t)},_setAria:function(e){var t=this.menuItems.eq(e.index).attr("id");this.button.attr({"aria-labelledby":t,"aria-activedescendant":t}),this.menu.attr("aria-activedescendant",t)},_setOption:function(e,t){"icons"===e&&this.button.find("span.ui-icon").removeClass(this.options.icons.button).addClass(t.button),this._super(e,t),"appendTo"===e&&this.menuWrap.appendTo(this._appendTo()),"disabled"===e&&(this.menuInstance.option("disabled",t),this.button.toggleClass("ui-state-disabled",t).attr("aria-disabled",t),this.element.prop("disabled",t),t?(this.button.attr("tabindex",-1),this.close()):this.button.attr("tabindex",0)),"width"===e&&this._resizeButton()},_appendTo:function(){var t=this.options.appendTo;return t&&(t=t.jquery||t.nodeType?e(t):this.document.find(t).eq(0)),t&&t[0]||(t=this.element.closest(".ui-front")),t.length||(t=this.document[0].body),t},_toggleAttr:function(){this.button.toggleClass("ui-corner-top",this.isOpen).toggleClass("ui-corner-all",!this.isOpen).attr("aria-expanded",this.isOpen),this.menuWrap.toggleClass("ui-selectmenu-open",this.isOpen),this.menu.attr("aria-hidden",!this.isOpen)},_resizeButton:function(){var e=this.options.width;e||(e=this.element.show().outerWidth(),this.element.hide()),this.button.outerWidth(e)},_resizeMenu:function(){this.menu.outerWidth(Math.max(this.button.outerWidth(),this.menu.width("").outerWidth()+1))},_getCreateOptions:function(){return{disabled:this.element.prop("disabled")}},_parseOptions:function(t){var i=[];t.each(function(t,s){var n=e(s),a=n.parent("optgroup");i.push({element:n,index:t,value:n.val(),label:n.text(),optgroup:a.attr("label")||"",disabled:a.prop("disabled")||n.prop("disabled")})}),this.items=i},_destroy:function(){this.menuWrap.remove(),this.button.remove(),this.element.show(),this.element.removeUniqueId(),this.label.attr("for",this.ids.element)}}),e.widget("ui.slider",e.ui.mouse,{version:"1.11.4",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget"+" ui-widget-content"+" ui-corner-all"),this._refresh(),this._setOption("disabled",this.options.disabled),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var t,i,s=this.options,n=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),a="<span class='ui-slider-handle ui-state-default ui-corner-all' tabindex='0'></span>",o=[];for(i=s.values&&s.values.length||1,n.length>i&&(n.slice(i).remove(),n=n.slice(0,i)),t=n.length;i>t;t++)o.push(a);this.handles=n.add(e(o.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.each(function(t){e(this).data("ui-slider-handle-index",t)})},_createRange:function(){var t=this.options,i="";t.range?(t.range===!0&&(t.values?t.values.length&&2!==t.values.length?t.values=[t.values[0],t.values[0]]:e.isArray(t.values)&&(t.values=t.values.slice(0)):t.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({left:"",bottom:""}):(this.range=e("<div></div>").appendTo(this.element),i="ui-slider-range ui-widget-header ui-corner-all"),this.range.addClass(i+("min"===t.range||"max"===t.range?" ui-slider-range-"+t.range:""))):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all"),this._mouseDestroy()},_mouseCapture:function(t){var i,s,n,a,o,r,h,l,u=this,d=this.options;return d.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:t.pageX,y:t.pageY},s=this._normValueFromMouse(i),n=this._valueMax()-this._valueMin()+1,this.handles.each(function(t){var i=Math.abs(s-u.values(t));(n>i||n===i&&(t===u._lastChangedValue||u.values(t)===d.min))&&(n=i,a=e(this),o=t)}),r=this._start(t,o),r===!1?!1:(this._mouseSliding=!0,this._handleIndex=o,a.addClass("ui-state-active").focus(),h=a.offset(),l=!e(t.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=l?{left:0,top:0}:{left:t.pageX-h.left-a.width()/2,top:t.pageY-h.top-a.height()/2-(parseInt(a.css("borderTopWidth"),10)||0)-(parseInt(a.css("borderBottomWidth"),10)||0)+(parseInt(a.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(t,o,s),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(e){var t={x:e.pageX,y:e.pageY},i=this._normValueFromMouse(t);return this._slide(e,this._handleIndex,i),!1},_mouseStop:function(e){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(e,this._handleIndex),this._change(e,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(e){var t,i,s,n,a;return"horizontal"===this.orientation?(t=this.elementSize.width,i=e.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(t=this.elementSize.height,i=e.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),s=i/t,s>1&&(s=1),0>s&&(s=0),"vertical"===this.orientation&&(s=1-s),n=this._valueMax()-this._valueMin(),a=this._valueMin()+s*n,this._trimAlignValue(a)},_start:function(e,t){var i={handle:this.handles[t],value:this.value()};return this.options.values&&this.options.values.length&&(i.value=this.values(t),i.values=this.values()),this._trigger("start",e,i)},_slide:function(e,t,i){var s,n,a;this.options.values&&this.options.values.length?(s=this.values(t?0:1),2===this.options.values.length&&this.options.range===!0&&(0===t&&i>s||1===t&&s>i)&&(i=s),i!==this.values(t)&&(n=this.values(),n[t]=i,a=this._trigger("slide",e,{handle:this.handles[t],value:i,values:n}),s=this.values(t?0:1),a!==!1&&this.values(t,i))):i!==this.value()&&(a=this._trigger("slide",e,{handle:this.handles[t],value:i}),a!==!1&&this.value(i))},_stop:function(e,t){var i={handle:this.handles[t],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(t),i.values=this.values()),this._trigger("stop",e,i)},_change:function(e,t){if(!this._keySliding&&!this._mouseSliding){var i={handle:this.handles[t],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(t),i.values=this.values()),this._lastChangedValue=t,this._trigger("change",e,i)}},value:function(e){return arguments.length?(this.options.value=this._trimAlignValue(e),this._refreshValue(),this._change(null,0),void 0):this._value()},values:function(t,i){var s,n,a;if(arguments.length>1)return this.options.values[t]=this._trimAlignValue(i),this._refreshValue(),this._change(null,t),void 0;if(!arguments.length)return this._values();if(!e.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(t):this.value();for(s=this.options.values,n=arguments[0],a=0;s.length>a;a+=1)s[a]=this._trimAlignValue(n[a]),this._change(null,a);this._refreshValue()},_setOption:function(t,i){var s,n=0;switch("range"===t&&this.options.range===!0&&("min"===i?(this.options.value=this._values(0),this.options.values=null):"max"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),e.isArray(this.options.values)&&(n=this.options.values.length),"disabled"===t&&this.element.toggleClass("ui-state-disabled",!!i),this._super(t,i),t){case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue(),this.handles.css("horizontal"===i?"bottom":"left","");break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),s=0;n>s;s+=1)this._change(null,s);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_value:function(){var e=this.options.value;return e=this._trimAlignValue(e)},_values:function(e){var t,i,s;if(arguments.length)return t=this.options.values[e],t=this._trimAlignValue(t);if(this.options.values&&this.options.values.length){for(i=this.options.values.slice(),s=0;i.length>s;s+=1)i[s]=this._trimAlignValue(i[s]);return i}return[]},_trimAlignValue:function(e){if(this._valueMin()>=e)return this._valueMin();if(e>=this._valueMax())return this._valueMax();var t=this.options.step>0?this.options.step:1,i=(e-this._valueMin())%t,s=e-i;return 2*Math.abs(i)>=t&&(s+=i>0?t:-t),parseFloat(s.toFixed(5))},_calculateNewMax:function(){var e=this.options.max,t=this._valueMin(),i=this.options.step,s=Math.floor(+(e-t).toFixed(this._precision())/i)*i;e=s+t,this.max=parseFloat(e.toFixed(this._precision()))},_precision:function(){var e=this._precisionOf(this.options.step);return null!==this.options.min&&(e=Math.max(e,this._precisionOf(this.options.min))),e},_precisionOf:function(e){var t=""+e,i=t.indexOf(".");return-1===i?0:t.length-i-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshValue:function(){var t,i,s,n,a,o=this.options.range,r=this.options,h=this,l=this._animateOff?!1:r.animate,u={};this.options.values&&this.options.values.length?this.handles.each(function(s){i=100*((h.values(s)-h._valueMin())/(h._valueMax()-h._valueMin())),u["horizontal"===h.orientation?"left":"bottom"]=i+"%",e(this).stop(1,1)[l?"animate":"css"](u,r.animate),h.options.range===!0&&("horizontal"===h.orientation?(0===s&&h.range.stop(1,1)[l?"animate":"css"]({left:i+"%"},r.animate),1===s&&h.range[l?"animate":"css"]({width:i-t+"%"},{queue:!1,duration:r.animate})):(0===s&&h.range.stop(1,1)[l?"animate":"css"]({bottom:i+"%"},r.animate),1===s&&h.range[l?"animate":"css"]({height:i-t+"%"},{queue:!1,duration:r.animate}))),t=i}):(s=this.value(),n=this._valueMin(),a=this._valueMax(),i=a!==n?100*((s-n)/(a-n)):0,u["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[l?"animate":"css"](u,r.animate),"min"===o&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:i+"%"},r.animate),"max"===o&&"horizontal"===this.orientation&&this.range[l?"animate":"css"]({width:100-i+"%"},{queue:!1,duration:r.animate}),"min"===o&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:i+"%"},r.animate),"max"===o&&"vertical"===this.orientation&&this.range[l?"animate":"css"]({height:100-i+"%"},{queue:!1,duration:r.animate}))},_handleEvents:{keydown:function(t){var i,s,n,a,o=e(t.target).data("ui-slider-handle-index");switch(t.keyCode){case e.ui.keyCode.HOME:case e.ui.keyCode.END:case e.ui.keyCode.PAGE_UP:case e.ui.keyCode.PAGE_DOWN:case e.ui.keyCode.UP:case e.ui.keyCode.RIGHT:case e.ui.keyCode.DOWN:case e.ui.keyCode.LEFT:if(t.preventDefault(),!this._keySliding&&(this._keySliding=!0,e(t.target).addClass("ui-state-active"),i=this._start(t,o),i===!1))return}switch(a=this.options.step,s=n=this.options.values&&this.options.values.length?this.values(o):this.value(),t.keyCode){case e.ui.keyCode.HOME:n=this._valueMin();break;case e.ui.keyCode.END:n=this._valueMax();break;case e.ui.keyCode.PAGE_UP:n=this._trimAlignValue(s+(this._valueMax()-this._valueMin())/this.numPages);break;case e.ui.keyCode.PAGE_DOWN:n=this._trimAlignValue(s-(this._valueMax()-this._valueMin())/this.numPages);break;case e.ui.keyCode.UP:case e.ui.keyCode.RIGHT:if(s===this._valueMax())return;n=this._trimAlignValue(s+a);break;case e.ui.keyCode.DOWN:case e.ui.keyCode.LEFT:if(s===this._valueMin())return;n=this._trimAlignValue(s-a)}this._slide(t,o,n)},keyup:function(t){var i=e(t.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(t,i),this._change(t,i),e(t.target).removeClass("ui-state-active"))}}}),e.widget("ui.spinner",{version:"1.11.4",defaultElement:"<input>",widgetEventPrefix:"spin",options:{culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),""!==this.value()&&this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var t={},i=this.element;return e.each(["min","max","step"],function(e,s){var n=i.attr(s);void 0!==n&&n.length&&(t[s]=n)}),t},_events:{keydown:function(e){this._start(e)&&this._keydown(e)&&e.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(e){return this.cancelBlur?(delete this.cancelBlur,void 0):(this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger("change",e),void 0)},mousewheel:function(e,t){if(t){if(!this.spinning&&!this._start(e))return!1;this._spin((t>0?1:-1)*this.options.step,e),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(e)},100),e.preventDefault()}},"mousedown .ui-spinner-button":function(t){function i(){var e=this.element[0]===this.document[0].activeElement;e||(this.element.focus(),this.previous=s,this._delay(function(){this.previous=s}))}var s;s=this.element[0]===this.document[0].activeElement?this.previous:this.element.val(),t.preventDefault(),i.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,i.call(this)}),this._start(t)!==!1&&this._repeat(null,e(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(t){return e(t.currentTarget).hasClass("ui-state-active")?this._start(t)===!1?!1:(this._repeat(null,e(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t),void 0):void 0},"mouseleave .ui-spinner-button":"_stop"},_draw:function(){var e=this.uiSpinner=this.element.addClass("ui-spinner-input").attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());this.element.attr("role","spinbutton"),this.buttons=e.find(".ui-spinner-button").attr("tabIndex",-1).button().removeClass("ui-corner-all"),this.buttons.height()>Math.ceil(.5*e.height())&&e.height()>0&&e.height(e.height()),this.options.disabled&&this.disable() +},_keydown:function(t){var i=this.options,s=e.ui.keyCode;switch(t.keyCode){case s.UP:return this._repeat(null,1,t),!0;case s.DOWN:return this._repeat(null,-1,t),!0;case s.PAGE_UP:return this._repeat(null,i.page,t),!0;case s.PAGE_DOWN:return this._repeat(null,-i.page,t),!0}return!1},_uiSpinnerHtml:function(){return"<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>"},_buttonHtml:function(){return"<a class='ui-spinner-button ui-spinner-up ui-corner-tr'><span class='ui-icon "+this.options.icons.up+"'>▲</span>"+"</a>"+"<a class='ui-spinner-button ui-spinner-down ui-corner-br'>"+"<span class='ui-icon "+this.options.icons.down+"'>▼</span>"+"</a>"},_start:function(e){return this.spinning||this._trigger("start",e)!==!1?(this.counter||(this.counter=1),this.spinning=!0,!0):!1},_repeat:function(e,t,i){e=e||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,t,i)},e),this._spin(t*this.options.step,i)},_spin:function(e,t){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+e*this._increment(this.counter)),this.spinning&&this._trigger("spin",t,{value:i})===!1||(this._value(i),this.counter++)},_increment:function(t){var i=this.options.incremental;return i?e.isFunction(i)?i(t):Math.floor(t*t*t/5e4-t*t/500+17*t/200+1):1},_precision:function(){var e=this._precisionOf(this.options.step);return null!==this.options.min&&(e=Math.max(e,this._precisionOf(this.options.min))),e},_precisionOf:function(e){var t=""+e,i=t.indexOf(".");return-1===i?0:t.length-i-1},_adjustValue:function(e){var t,i,s=this.options;return t=null!==s.min?s.min:0,i=e-t,i=Math.round(i/s.step)*s.step,e=t+i,e=parseFloat(e.toFixed(this._precision())),null!==s.max&&e>s.max?s.max:null!==s.min&&s.min>e?s.min:e},_stop:function(e){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",e))},_setOption:function(e,t){if("culture"===e||"numberFormat"===e){var i=this._parse(this.element.val());return this.options[e]=t,this.element.val(this._format(i)),void 0}("max"===e||"min"===e||"step"===e)&&"string"==typeof t&&(t=this._parse(t)),"icons"===e&&(this.buttons.first().find(".ui-icon").removeClass(this.options.icons.up).addClass(t.up),this.buttons.last().find(".ui-icon").removeClass(this.options.icons.down).addClass(t.down)),this._super(e,t),"disabled"===e&&(this.widget().toggleClass("ui-state-disabled",!!t),this.element.prop("disabled",!!t),this.buttons.button(t?"disable":"enable"))},_setOptions:h(function(e){this._super(e)}),_parse:function(e){return"string"==typeof e&&""!==e&&(e=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(e,10,this.options.culture):+e),""===e||isNaN(e)?null:e},_format:function(e){return""===e?"":window.Globalize&&this.options.numberFormat?Globalize.format(e,this.options.numberFormat,this.options.culture):e},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},isValid:function(){var e=this.value();return null===e?!1:e===this._adjustValue(e)},_value:function(e,t){var i;""!==e&&(i=this._parse(e),null!==i&&(t||(i=this._adjustValue(i)),e=this._format(i))),this.element.val(e),this._refresh()},_destroy:function(){this.element.removeClass("ui-spinner-input").prop("disabled",!1).removeAttr("autocomplete").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:h(function(e){this._stepUp(e)}),_stepUp:function(e){this._start()&&(this._spin((e||1)*this.options.step),this._stop())},stepDown:h(function(e){this._stepDown(e)}),_stepDown:function(e){this._start()&&(this._spin((e||1)*-this.options.step),this._stop())},pageUp:h(function(e){this._stepUp((e||1)*this.options.page)}),pageDown:h(function(e){this._stepDown((e||1)*this.options.page)}),value:function(e){return arguments.length?(h(this._value).call(this,e),void 0):this._parse(this.element.val())},widget:function(){return this.uiSpinner}}),e.widget("ui.tabs",{version:"1.11.4",delay:300,options:{active:null,collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:function(){var e=/#.*$/;return function(t){var i,s;t=t.cloneNode(!1),i=t.href.replace(e,""),s=location.href.replace(e,"");try{i=decodeURIComponent(i)}catch(n){}try{s=decodeURIComponent(s)}catch(n){}return t.hash.length>1&&i===s}}(),_create:function(){var t=this,i=this.options;this.running=!1,this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",i.collapsible),this._processTabs(),i.active=this._initialActive(),e.isArray(i.disabled)&&(i.disabled=e.unique(i.disabled.concat(e.map(this.tabs.filter(".ui-state-disabled"),function(e){return t.tabs.index(e)}))).sort()),this.active=this.options.active!==!1&&this.anchors.length?this._findActive(i.active):e(),this._refresh(),this.active.length&&this.load(i.active)},_initialActive:function(){var t=this.options.active,i=this.options.collapsible,s=location.hash.substring(1);return null===t&&(s&&this.tabs.each(function(i,n){return e(n).attr("aria-controls")===s?(t=i,!1):void 0}),null===t&&(t=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),(null===t||-1===t)&&(t=this.tabs.length?0:!1)),t!==!1&&(t=this.tabs.index(this.tabs.eq(t)),-1===t&&(t=i?!1:0)),!i&&t===!1&&this.anchors.length&&(t=0),t},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):e()}},_tabKeydown:function(t){var i=e(this.document[0].activeElement).closest("li"),s=this.tabs.index(i),n=!0;if(!this._handlePageNav(t)){switch(t.keyCode){case e.ui.keyCode.RIGHT:case e.ui.keyCode.DOWN:s++;break;case e.ui.keyCode.UP:case e.ui.keyCode.LEFT:n=!1,s--;break;case e.ui.keyCode.END:s=this.anchors.length-1;break;case e.ui.keyCode.HOME:s=0;break;case e.ui.keyCode.SPACE:return t.preventDefault(),clearTimeout(this.activating),this._activate(s),void 0;case e.ui.keyCode.ENTER:return t.preventDefault(),clearTimeout(this.activating),this._activate(s===this.options.active?!1:s),void 0;default:return}t.preventDefault(),clearTimeout(this.activating),s=this._focusNextTab(s,n),t.ctrlKey||t.metaKey||(i.attr("aria-selected","false"),this.tabs.eq(s).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",s)},this.delay))}},_panelKeydown:function(t){this._handlePageNav(t)||t.ctrlKey&&t.keyCode===e.ui.keyCode.UP&&(t.preventDefault(),this.active.focus())},_handlePageNav:function(t){return t.altKey&&t.keyCode===e.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):t.altKey&&t.keyCode===e.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(t,i){function s(){return t>n&&(t=0),0>t&&(t=n),t}for(var n=this.tabs.length-1;-1!==e.inArray(s(),this.options.disabled);)t=i?t+1:t-1;return t},_focusNextTab:function(e,t){return e=this._findNextTab(e,t),this.tabs.eq(e).focus(),e},_setOption:function(e,t){return"active"===e?(this._activate(t),void 0):"disabled"===e?(this._setupDisabled(t),void 0):(this._super(e,t),"collapsible"===e&&(this.element.toggleClass("ui-tabs-collapsible",t),t||this.options.active!==!1||this._activate(0)),"event"===e&&this._setupEvents(t),"heightStyle"===e&&this._setupHeightStyle(t),void 0)},_sanitizeSelector:function(e){return e?e.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var t=this.options,i=this.tablist.children(":has(a[href])");t.disabled=e.map(i.filter(".ui-state-disabled"),function(e){return i.index(e)}),this._processTabs(),t.active!==!1&&this.anchors.length?this.active.length&&!e.contains(this.tablist[0],this.active[0])?this.tabs.length===t.disabled.length?(t.active=!1,this.active=e()):this._activate(this._findNextTab(Math.max(0,t.active-1),!1)):t.active=this.tabs.index(this.active):(t.active=!1,this.active=e()),this._refresh()},_refresh:function(){this._setupDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-hidden":"true"}),this.active.length?(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var t=this,i=this.tabs,s=this.anchors,n=this.panels;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist").delegate("> li","mousedown"+this.eventNamespace,function(t){e(this).is(".ui-state-disabled")&&t.preventDefault()}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){e(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this.tabs=this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab",tabIndex:-1}),this.anchors=this.tabs.map(function(){return e("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1}),this.panels=e(),this.anchors.each(function(i,s){var n,a,o,r=e(s).uniqueId().attr("id"),h=e(s).closest("li"),l=h.attr("aria-controls");t._isLocal(s)?(n=s.hash,o=n.substring(1),a=t.element.find(t._sanitizeSelector(n))):(o=h.attr("aria-controls")||e({}).uniqueId()[0].id,n="#"+o,a=t.element.find(n),a.length||(a=t._createPanel(o),a.insertAfter(t.panels[i-1]||t.tablist)),a.attr("aria-live","polite")),a.length&&(t.panels=t.panels.add(a)),l&&h.data("ui-tabs-aria-controls",l),h.attr({"aria-controls":o,"aria-labelledby":r}),a.attr("aria-labelledby",r)}),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel"),i&&(this._off(i.not(this.tabs)),this._off(s.not(this.anchors)),this._off(n.not(this.panels)))},_getList:function(){return this.tablist||this.element.find("ol,ul").eq(0)},_createPanel:function(t){return e("<div>").attr("id",t).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(t){e.isArray(t)&&(t.length?t.length===this.anchors.length&&(t=!0):t=!1);for(var i,s=0;i=this.tabs[s];s++)t===!0||-1!==e.inArray(s,t)?e(i).addClass("ui-state-disabled").attr("aria-disabled","true"):e(i).removeClass("ui-state-disabled").removeAttr("aria-disabled");this.options.disabled=t},_setupEvents:function(t){var i={};t&&e.each(t.split(" "),function(e,t){i[t]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(!0,this.anchors,{click:function(e){e.preventDefault()}}),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(t){var i,s=this.element.parent();"fill"===t?(i=s.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var t=e(this),s=t.css("position");"absolute"!==s&&"fixed"!==s&&(i-=t.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=e(this).outerHeight(!0)}),this.panels.each(function(){e(this).height(Math.max(0,i-e(this).innerHeight()+e(this).height()))}).css("overflow","auto")):"auto"===t&&(i=0,this.panels.each(function(){i=Math.max(i,e(this).height("").height())}).height(i))},_eventHandler:function(t){var i=this.options,s=this.active,n=e(t.currentTarget),a=n.closest("li"),o=a[0]===s[0],r=o&&i.collapsible,h=r?e():this._getPanelForTab(a),l=s.length?this._getPanelForTab(s):e(),u={oldTab:s,oldPanel:l,newTab:r?e():a,newPanel:h};t.preventDefault(),a.hasClass("ui-state-disabled")||a.hasClass("ui-tabs-loading")||this.running||o&&!i.collapsible||this._trigger("beforeActivate",t,u)===!1||(i.active=r?!1:this.tabs.index(a),this.active=o?e():a,this.xhr&&this.xhr.abort(),l.length||h.length||e.error("jQuery UI Tabs: Mismatching fragment identifier."),h.length&&this.load(this.tabs.index(a),t),this._toggle(t,u))},_toggle:function(t,i){function s(){a.running=!1,a._trigger("activate",t,i)}function n(){i.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),o.length&&a.options.show?a._show(o,a.options.show,s):(o.show(),s())}var a=this,o=i.newPanel,r=i.oldPanel;this.running=!0,r.length&&this.options.hide?this._hide(r,this.options.hide,function(){i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),n()}):(i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),r.hide(),n()),r.attr("aria-hidden","true"),i.oldTab.attr({"aria-selected":"false","aria-expanded":"false"}),o.length&&r.length?i.oldTab.attr("tabIndex",-1):o.length&&this.tabs.filter(function(){return 0===e(this).attr("tabIndex")}).attr("tabIndex",-1),o.attr("aria-hidden","false"),i.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(t){var i,s=this._findActive(t);s[0]!==this.active[0]&&(s.length||(s=this.active),i=s.find(".ui-tabs-anchor")[0],this._eventHandler({target:i,currentTarget:i,preventDefault:e.noop}))},_findActive:function(t){return t===!1?e():this.tabs.eq(t)},_getIndex:function(e){return"string"==typeof e&&(e=this.anchors.index(this.anchors.filter("[href$='"+e+"']"))),e},_destroy:function(){this.xhr&&this.xhr.abort(),this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible"),this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role"),this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeUniqueId(),this.tablist.unbind(this.eventNamespace),this.tabs.add(this.panels).each(function(){e.data(this,"ui-tabs-destroy")?e(this).remove():e(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")}),this.tabs.each(function(){var t=e(this),i=t.data("ui-tabs-aria-controls");i?t.attr("aria-controls",i).removeData("ui-tabs-aria-controls"):t.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(t){var i=this.options.disabled;i!==!1&&(void 0===t?i=!1:(t=this._getIndex(t),i=e.isArray(i)?e.map(i,function(e){return e!==t?e:null}):e.map(this.tabs,function(e,i){return i!==t?i:null})),this._setupDisabled(i))},disable:function(t){var i=this.options.disabled;if(i!==!0){if(void 0===t)i=!0;else{if(t=this._getIndex(t),-1!==e.inArray(t,i))return;i=e.isArray(i)?e.merge([t],i).sort():[t]}this._setupDisabled(i)}},load:function(t,i){t=this._getIndex(t);var s=this,n=this.tabs.eq(t),a=n.find(".ui-tabs-anchor"),o=this._getPanelForTab(n),r={tab:n,panel:o},h=function(e,t){"abort"===t&&s.panels.stop(!1,!0),n.removeClass("ui-tabs-loading"),o.removeAttr("aria-busy"),e===s.xhr&&delete s.xhr};this._isLocal(a[0])||(this.xhr=e.ajax(this._ajaxSettings(a,i,r)),this.xhr&&"canceled"!==this.xhr.statusText&&(n.addClass("ui-tabs-loading"),o.attr("aria-busy","true"),this.xhr.done(function(e,t,n){setTimeout(function(){o.html(e),s._trigger("load",i,r),h(n,t)},1)}).fail(function(e,t){setTimeout(function(){h(e,t)},1)})))},_ajaxSettings:function(t,i,s){var n=this;return{url:t.attr("href"),beforeSend:function(t,a){return n._trigger("beforeLoad",i,e.extend({jqXHR:t,ajaxSettings:a},s))}}},_getPanelForTab:function(t){var i=e(t).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+i))}}),e.widget("ui.tooltip",{version:"1.11.4",options:{content:function(){var t=e(this).attr("title")||"";return e("<a>").text(t).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,tooltipClass:null,track:!1,close:null,open:null},_addDescribedBy:function(t,i){var s=(t.attr("aria-describedby")||"").split(/\s+/);s.push(i),t.data("ui-tooltip-id",i).attr("aria-describedby",e.trim(s.join(" ")))},_removeDescribedBy:function(t){var i=t.data("ui-tooltip-id"),s=(t.attr("aria-describedby")||"").split(/\s+/),n=e.inArray(i,s);-1!==n&&s.splice(n,1),t.removeData("ui-tooltip-id"),s=e.trim(s.join(" ")),s?t.attr("aria-describedby",s):t.removeAttr("aria-describedby")},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.options.disabled&&this._disable(),this.liveRegion=e("<div>").attr({role:"log","aria-live":"assertive","aria-relevant":"additions"}).addClass("ui-helper-hidden-accessible").appendTo(this.document[0].body)},_setOption:function(t,i){var s=this;return"disabled"===t?(this[i?"_disable":"_enable"](),this.options[t]=i,void 0):(this._super(t,i),"content"===t&&e.each(this.tooltips,function(e,t){s._updateContent(t.element)}),void 0)},_disable:function(){var t=this;e.each(this.tooltips,function(i,s){var n=e.Event("blur");n.target=n.currentTarget=s.element[0],t.close(n,!0)}),this.element.find(this.options.items).addBack().each(function(){var t=e(this);t.is("[title]")&&t.data("ui-tooltip-title",t.attr("title")).removeAttr("title")})},_enable:function(){this.element.find(this.options.items).addBack().each(function(){var t=e(this);t.data("ui-tooltip-title")&&t.attr("title",t.data("ui-tooltip-title"))})},open:function(t){var i=this,s=e(t?t.target:this.element).closest(this.options.items);s.length&&!s.data("ui-tooltip-id")&&(s.attr("title")&&s.data("ui-tooltip-title",s.attr("title")),s.data("ui-tooltip-open",!0),t&&"mouseover"===t.type&&s.parents().each(function(){var t,s=e(this);s.data("ui-tooltip-open")&&(t=e.Event("blur"),t.target=t.currentTarget=this,i.close(t,!0)),s.attr("title")&&(s.uniqueId(),i.parents[this.id]={element:this,title:s.attr("title")},s.attr("title",""))}),this._registerCloseHandlers(t,s),this._updateContent(s,t))},_updateContent:function(e,t){var i,s=this.options.content,n=this,a=t?t.type:null;return"string"==typeof s?this._open(t,e,s):(i=s.call(e[0],function(i){n._delay(function(){e.data("ui-tooltip-open")&&(t&&(t.type=a),this._open(t,e,i))})}),i&&this._open(t,e,i),void 0)},_open:function(t,i,s){function n(e){l.of=e,o.is(":hidden")||o.position(l)}var a,o,r,h,l=e.extend({},this.options.position);if(s){if(a=this._find(i))return a.tooltip.find(".ui-tooltip-content").html(s),void 0;i.is("[title]")&&(t&&"mouseover"===t.type?i.attr("title",""):i.removeAttr("title")),a=this._tooltip(i),o=a.tooltip,this._addDescribedBy(i,o.attr("id")),o.find(".ui-tooltip-content").html(s),this.liveRegion.children().hide(),s.clone?(h=s.clone(),h.removeAttr("id").find("[id]").removeAttr("id")):h=s,e("<div>").html(h).appendTo(this.liveRegion),this.options.track&&t&&/^mouse/.test(t.type)?(this._on(this.document,{mousemove:n}),n(t)):o.position(e.extend({of:i},this.options.position)),o.hide(),this._show(o,this.options.show),this.options.show&&this.options.show.delay&&(r=this.delayedShow=setInterval(function(){o.is(":visible")&&(n(l.of),clearInterval(r))},e.fx.interval)),this._trigger("open",t,{tooltip:o})}},_registerCloseHandlers:function(t,i){var s={keyup:function(t){if(t.keyCode===e.ui.keyCode.ESCAPE){var s=e.Event(t);s.currentTarget=i[0],this.close(s,!0)}}};i[0]!==this.element[0]&&(s.remove=function(){this._removeTooltip(this._find(i).tooltip)}),t&&"mouseover"!==t.type||(s.mouseleave="close"),t&&"focusin"!==t.type||(s.focusout="close"),this._on(!0,i,s)},close:function(t){var i,s=this,n=e(t?t.currentTarget:this.element),a=this._find(n);return a?(i=a.tooltip,a.closing||(clearInterval(this.delayedShow),n.data("ui-tooltip-title")&&!n.attr("title")&&n.attr("title",n.data("ui-tooltip-title")),this._removeDescribedBy(n),a.hiding=!0,i.stop(!0),this._hide(i,this.options.hide,function(){s._removeTooltip(e(this))}),n.removeData("ui-tooltip-open"),this._off(n,"mouseleave focusout keyup"),n[0]!==this.element[0]&&this._off(n,"remove"),this._off(this.document,"mousemove"),t&&"mouseleave"===t.type&&e.each(this.parents,function(t,i){e(i.element).attr("title",i.title),delete s.parents[t]}),a.closing=!0,this._trigger("close",t,{tooltip:i}),a.hiding||(a.closing=!1)),void 0):(n.removeData("ui-tooltip-open"),void 0)},_tooltip:function(t){var i=e("<div>").attr("role","tooltip").addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||"")),s=i.uniqueId().attr("id");return e("<div>").addClass("ui-tooltip-content").appendTo(i),i.appendTo(this.document[0].body),this.tooltips[s]={element:t,tooltip:i}},_find:function(e){var t=e.data("ui-tooltip-id");return t?this.tooltips[t]:null},_removeTooltip:function(e){e.remove(),delete this.tooltips[e.attr("id")]},_destroy:function(){var t=this;e.each(this.tooltips,function(i,s){var n=e.Event("blur"),a=s.element;n.target=n.currentTarget=a[0],t.close(n,!0),e("#"+i).remove(),a.data("ui-tooltip-title")&&(a.attr("title")||a.attr("title",a.data("ui-tooltip-title")),a.removeData("ui-tooltip-title"))}),this.liveRegion.remove()}});var y="ui-effects-",b=e;e.effects={effect:{}},function(e,t){function i(e,t,i){var s=d[t.type]||{};return null==e?i||!t.def?null:t.def:(e=s.floor?~~e:parseFloat(e),isNaN(e)?t.def:s.mod?(e+s.mod)%s.mod:0>e?0:e>s.max?s.max:e)}function s(i){var s=l(),n=s._rgba=[];return i=i.toLowerCase(),f(h,function(e,a){var o,r=a.re.exec(i),h=r&&a.parse(r),l=a.space||"rgba";return h?(o=s[l](h),s[u[l].cache]=o[u[l].cache],n=s._rgba=o._rgba,!1):t}),n.length?("0,0,0,0"===n.join()&&e.extend(n,a.transparent),s):a[i]}function n(e,t,i){return i=(i+1)%1,1>6*i?e+6*(t-e)*i:1>2*i?t:2>3*i?e+6*(t-e)*(2/3-i):e}var a,o="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",r=/^([\-+])=\s*(\d+\.?\d*)/,h=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(e){return[e[1],e[2],e[3],e[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(e){return[2.55*e[1],2.55*e[2],2.55*e[3],e[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(e){return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(e){return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(e){return[e[1],e[2]/100,e[3]/100,e[4]]}}],l=e.Color=function(t,i,s,n){return new e.Color.fn.parse(t,i,s,n)},u={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},d={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},c=l.support={},p=e("<p>")[0],f=e.each;p.style.cssText="background-color:rgba(1,1,1,.5)",c.rgba=p.style.backgroundColor.indexOf("rgba")>-1,f(u,function(e,t){t.cache="_"+e,t.props.alpha={idx:3,type:"percent",def:1}}),l.fn=e.extend(l.prototype,{parse:function(n,o,r,h){if(n===t)return this._rgba=[null,null,null,null],this;(n.jquery||n.nodeType)&&(n=e(n).css(o),o=t);var d=this,c=e.type(n),p=this._rgba=[];return o!==t&&(n=[n,o,r,h],c="array"),"string"===c?this.parse(s(n)||a._default):"array"===c?(f(u.rgba.props,function(e,t){p[t.idx]=i(n[t.idx],t)}),this):"object"===c?(n instanceof l?f(u,function(e,t){n[t.cache]&&(d[t.cache]=n[t.cache].slice())}):f(u,function(t,s){var a=s.cache;f(s.props,function(e,t){if(!d[a]&&s.to){if("alpha"===e||null==n[e])return;d[a]=s.to(d._rgba)}d[a][t.idx]=i(n[e],t,!0)}),d[a]&&0>e.inArray(null,d[a].slice(0,3))&&(d[a][3]=1,s.from&&(d._rgba=s.from(d[a])))}),this):t},is:function(e){var i=l(e),s=!0,n=this;return f(u,function(e,a){var o,r=i[a.cache];return r&&(o=n[a.cache]||a.to&&a.to(n._rgba)||[],f(a.props,function(e,i){return null!=r[i.idx]?s=r[i.idx]===o[i.idx]:t})),s}),s},_space:function(){var e=[],t=this;return f(u,function(i,s){t[s.cache]&&e.push(i)}),e.pop()},transition:function(e,t){var s=l(e),n=s._space(),a=u[n],o=0===this.alpha()?l("transparent"):this,r=o[a.cache]||a.to(o._rgba),h=r.slice();return s=s[a.cache],f(a.props,function(e,n){var a=n.idx,o=r[a],l=s[a],u=d[n.type]||{};null!==l&&(null===o?h[a]=l:(u.mod&&(l-o>u.mod/2?o+=u.mod:o-l>u.mod/2&&(o-=u.mod)),h[a]=i((l-o)*t+o,n)))}),this[n](h)},blend:function(t){if(1===this._rgba[3])return this;var i=this._rgba.slice(),s=i.pop(),n=l(t)._rgba;return l(e.map(i,function(e,t){return(1-s)*n[t]+s*e}))},toRgbaString:function(){var t="rgba(",i=e.map(this._rgba,function(e,t){return null==e?t>2?1:0:e});return 1===i[3]&&(i.pop(),t="rgb("),t+i.join()+")"},toHslaString:function(){var t="hsla(",i=e.map(this.hsla(),function(e,t){return null==e&&(e=t>2?1:0),t&&3>t&&(e=Math.round(100*e)+"%"),e});return 1===i[3]&&(i.pop(),t="hsl("),t+i.join()+")"},toHexString:function(t){var i=this._rgba.slice(),s=i.pop();return t&&i.push(~~(255*s)),"#"+e.map(i,function(e){return e=(e||0).toString(16),1===e.length?"0"+e:e}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),l.fn.parse.prototype=l.fn,u.hsla.to=function(e){if(null==e[0]||null==e[1]||null==e[2])return[null,null,null,e[3]];var t,i,s=e[0]/255,n=e[1]/255,a=e[2]/255,o=e[3],r=Math.max(s,n,a),h=Math.min(s,n,a),l=r-h,u=r+h,d=.5*u;return t=h===r?0:s===r?60*(n-a)/l+360:n===r?60*(a-s)/l+120:60*(s-n)/l+240,i=0===l?0:.5>=d?l/u:l/(2-u),[Math.round(t)%360,i,d,null==o?1:o]},u.hsla.from=function(e){if(null==e[0]||null==e[1]||null==e[2])return[null,null,null,e[3]];var t=e[0]/360,i=e[1],s=e[2],a=e[3],o=.5>=s?s*(1+i):s+i-s*i,r=2*s-o;return[Math.round(255*n(r,o,t+1/3)),Math.round(255*n(r,o,t)),Math.round(255*n(r,o,t-1/3)),a]},f(u,function(s,n){var a=n.props,o=n.cache,h=n.to,u=n.from;l.fn[s]=function(s){if(h&&!this[o]&&(this[o]=h(this._rgba)),s===t)return this[o].slice();var n,r=e.type(s),d="array"===r||"object"===r?s:arguments,c=this[o].slice();return f(a,function(e,t){var s=d["object"===r?e:t.idx];null==s&&(s=c[t.idx]),c[t.idx]=i(s,t)}),u?(n=l(u(c)),n[o]=c,n):l(c)},f(a,function(t,i){l.fn[t]||(l.fn[t]=function(n){var a,o=e.type(n),h="alpha"===t?this._hsla?"hsla":"rgba":s,l=this[h](),u=l[i.idx];return"undefined"===o?u:("function"===o&&(n=n.call(this,u),o=e.type(n)),null==n&&i.empty?this:("string"===o&&(a=r.exec(n),a&&(n=u+parseFloat(a[2])*("+"===a[1]?1:-1))),l[i.idx]=n,this[h](l)))})})}),l.hook=function(t){var i=t.split(" ");f(i,function(t,i){e.cssHooks[i]={set:function(t,n){var a,o,r="";if("transparent"!==n&&("string"!==e.type(n)||(a=s(n)))){if(n=l(a||n),!c.rgba&&1!==n._rgba[3]){for(o="backgroundColor"===i?t.parentNode:t;(""===r||"transparent"===r)&&o&&o.style;)try{r=e.css(o,"backgroundColor"),o=o.parentNode}catch(h){}n=n.blend(r&&"transparent"!==r?r:"_default")}n=n.toRgbaString()}try{t.style[i]=n}catch(h){}}},e.fx.step[i]=function(t){t.colorInit||(t.start=l(t.elem,i),t.end=l(t.end),t.colorInit=!0),e.cssHooks[i].set(t.elem,t.start.transition(t.end,t.pos))}})},l.hook(o),e.cssHooks.borderColor={expand:function(e){var t={};return f(["Top","Right","Bottom","Left"],function(i,s){t["border"+s+"Color"]=e}),t}},a=e.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(b),function(){function t(t){var i,s,n=t.ownerDocument.defaultView?t.ownerDocument.defaultView.getComputedStyle(t,null):t.currentStyle,a={};if(n&&n.length&&n[0]&&n[n[0]])for(s=n.length;s--;)i=n[s],"string"==typeof n[i]&&(a[e.camelCase(i)]=n[i]);else for(i in n)"string"==typeof n[i]&&(a[i]=n[i]);return a}function i(t,i){var s,a,o={};for(s in i)a=i[s],t[s]!==a&&(n[s]||(e.fx.step[s]||!isNaN(parseFloat(a)))&&(o[s]=a));return o}var s=["add","remove","toggle"],n={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};e.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(t,i){e.fx.step[i]=function(e){("none"!==e.end&&!e.setAttr||1===e.pos&&!e.setAttr)&&(b.style(e.elem,i,e.end),e.setAttr=!0)}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e.effects.animateClass=function(n,a,o,r){var h=e.speed(a,o,r);return this.queue(function(){var a,o=e(this),r=o.attr("class")||"",l=h.children?o.find("*").addBack():o;l=l.map(function(){var i=e(this);return{el:i,start:t(this)}}),a=function(){e.each(s,function(e,t){n[t]&&o[t+"Class"](n[t])})},a(),l=l.map(function(){return this.end=t(this.el[0]),this.diff=i(this.start,this.end),this}),o.attr("class",r),l=l.map(function(){var t=this,i=e.Deferred(),s=e.extend({},h,{queue:!1,complete:function(){i.resolve(t)}});return this.el.animate(this.diff,s),i.promise()}),e.when.apply(e,l.get()).done(function(){a(),e.each(arguments,function(){var t=this.el;e.each(this.diff,function(e){t.css(e,"")})}),h.complete.call(o[0])})})},e.fn.extend({addClass:function(t){return function(i,s,n,a){return s?e.effects.animateClass.call(this,{add:i},s,n,a):t.apply(this,arguments)}}(e.fn.addClass),removeClass:function(t){return function(i,s,n,a){return arguments.length>1?e.effects.animateClass.call(this,{remove:i},s,n,a):t.apply(this,arguments)}}(e.fn.removeClass),toggleClass:function(t){return function(i,s,n,a,o){return"boolean"==typeof s||void 0===s?n?e.effects.animateClass.call(this,s?{add:i}:{remove:i},n,a,o):t.apply(this,arguments):e.effects.animateClass.call(this,{toggle:i},s,n,a)}}(e.fn.toggleClass),switchClass:function(t,i,s,n,a){return e.effects.animateClass.call(this,{add:i,remove:t},s,n,a)}})}(),function(){function t(t,i,s,n){return e.isPlainObject(t)&&(i=t,t=t.effect),t={effect:t},null==i&&(i={}),e.isFunction(i)&&(n=i,s=null,i={}),("number"==typeof i||e.fx.speeds[i])&&(n=s,s=i,i={}),e.isFunction(s)&&(n=s,s=null),i&&e.extend(t,i),s=s||i.duration,t.duration=e.fx.off?0:"number"==typeof s?s:s in e.fx.speeds?e.fx.speeds[s]:e.fx.speeds._default,t.complete=n||i.complete,t}function i(t){return!t||"number"==typeof t||e.fx.speeds[t]?!0:"string"!=typeof t||e.effects.effect[t]?e.isFunction(t)?!0:"object"!=typeof t||t.effect?!1:!0:!0}e.extend(e.effects,{version:"1.11.4",save:function(e,t){for(var i=0;t.length>i;i++)null!==t[i]&&e.data(y+t[i],e[0].style[t[i]])},restore:function(e,t){var i,s;for(s=0;t.length>s;s++)null!==t[s]&&(i=e.data(y+t[s]),void 0===i&&(i=""),e.css(t[s],i))},setMode:function(e,t){return"toggle"===t&&(t=e.is(":hidden")?"show":"hide"),t},getBaseline:function(e,t){var i,s;switch(e[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=e[0]/t.height}switch(e[1]){case"left":s=0;break;case"center":s=.5;break;case"right":s=1;break;default:s=e[1]/t.width}return{x:s,y:i}},createWrapper:function(t){if(t.parent().is(".ui-effects-wrapper"))return t.parent();var i={width:t.outerWidth(!0),height:t.outerHeight(!0),"float":t.css("float")},s=e("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),n={width:t.width(),height:t.height()},a=document.activeElement;try{a.id}catch(o){a=document.body}return t.wrap(s),(t[0]===a||e.contains(t[0],a))&&e(a).focus(),s=t.parent(),"static"===t.css("position")?(s.css({position:"relative"}),t.css({position:"relative"})):(e.extend(i,{position:t.css("position"),zIndex:t.css("z-index")}),e.each(["top","left","bottom","right"],function(e,s){i[s]=t.css(s),isNaN(parseInt(i[s],10))&&(i[s]="auto")}),t.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),t.css(n),s.css(i).show()},removeWrapper:function(t){var i=document.activeElement; +return t.parent().is(".ui-effects-wrapper")&&(t.parent().replaceWith(t),(t[0]===i||e.contains(t[0],i))&&e(i).focus()),t},setTransition:function(t,i,s,n){return n=n||{},e.each(i,function(e,i){var a=t.cssUnit(i);a[0]>0&&(n[i]=a[0]*s+a[1])}),n}}),e.fn.extend({effect:function(){function i(t){function i(){e.isFunction(a)&&a.call(n[0]),e.isFunction(t)&&t()}var n=e(this),a=s.complete,r=s.mode;(n.is(":hidden")?"hide"===r:"show"===r)?(n[r](),i()):o.call(n[0],s,i)}var s=t.apply(this,arguments),n=s.mode,a=s.queue,o=e.effects.effect[s.effect];return e.fx.off||!o?n?this[n](s.duration,s.complete):this.each(function(){s.complete&&s.complete.call(this)}):a===!1?this.each(i):this.queue(a||"fx",i)},show:function(e){return function(s){if(i(s))return e.apply(this,arguments);var n=t.apply(this,arguments);return n.mode="show",this.effect.call(this,n)}}(e.fn.show),hide:function(e){return function(s){if(i(s))return e.apply(this,arguments);var n=t.apply(this,arguments);return n.mode="hide",this.effect.call(this,n)}}(e.fn.hide),toggle:function(e){return function(s){if(i(s)||"boolean"==typeof s)return e.apply(this,arguments);var n=t.apply(this,arguments);return n.mode="toggle",this.effect.call(this,n)}}(e.fn.toggle),cssUnit:function(t){var i=this.css(t),s=[];return e.each(["em","px","%","pt"],function(e,t){i.indexOf(t)>0&&(s=[parseFloat(i),t])}),s}})}(),function(){var t={};e.each(["Quad","Cubic","Quart","Quint","Expo"],function(e,i){t[i]=function(t){return Math.pow(t,e+2)}}),e.extend(t,{Sine:function(e){return 1-Math.cos(e*Math.PI/2)},Circ:function(e){return 1-Math.sqrt(1-e*e)},Elastic:function(e){return 0===e||1===e?e:-Math.pow(2,8*(e-1))*Math.sin((80*(e-1)-7.5)*Math.PI/15)},Back:function(e){return e*e*(3*e-2)},Bounce:function(e){for(var t,i=4;((t=Math.pow(2,--i))-1)/11>e;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*t-2)/22-e,2)}}),e.each(t,function(t,i){e.easing["easeIn"+t]=i,e.easing["easeOut"+t]=function(e){return 1-i(1-e)},e.easing["easeInOut"+t]=function(e){return.5>e?i(2*e)/2:1-i(-2*e+2)/2}})}(),e.effects,e.effects.effect.blind=function(t,i){var s,n,a,o=e(this),r=/up|down|vertical/,h=/up|left|vertical|horizontal/,l=["position","top","bottom","left","right","height","width"],u=e.effects.setMode(o,t.mode||"hide"),d=t.direction||"up",c=r.test(d),p=c?"height":"width",f=c?"top":"left",m=h.test(d),g={},v="show"===u;o.parent().is(".ui-effects-wrapper")?e.effects.save(o.parent(),l):e.effects.save(o,l),o.show(),s=e.effects.createWrapper(o).css({overflow:"hidden"}),n=s[p](),a=parseFloat(s.css(f))||0,g[p]=v?n:0,m||(o.css(c?"bottom":"right",0).css(c?"top":"left","auto").css({position:"absolute"}),g[f]=v?a:n+a),v&&(s.css(p,0),m||s.css(f,a+n)),s.animate(g,{duration:t.duration,easing:t.easing,queue:!1,complete:function(){"hide"===u&&o.hide(),e.effects.restore(o,l),e.effects.removeWrapper(o),i()}})},e.effects.effect.bounce=function(t,i){var s,n,a,o=e(this),r=["position","top","bottom","left","right","height","width"],h=e.effects.setMode(o,t.mode||"effect"),l="hide"===h,u="show"===h,d=t.direction||"up",c=t.distance,p=t.times||5,f=2*p+(u||l?1:0),m=t.duration/f,g=t.easing,v="up"===d||"down"===d?"top":"left",y="up"===d||"left"===d,b=o.queue(),_=b.length;for((u||l)&&r.push("opacity"),e.effects.save(o,r),o.show(),e.effects.createWrapper(o),c||(c=o["top"===v?"outerHeight":"outerWidth"]()/3),u&&(a={opacity:1},a[v]=0,o.css("opacity",0).css(v,y?2*-c:2*c).animate(a,m,g)),l&&(c/=Math.pow(2,p-1)),a={},a[v]=0,s=0;p>s;s++)n={},n[v]=(y?"-=":"+=")+c,o.animate(n,m,g).animate(a,m,g),c=l?2*c:c/2;l&&(n={opacity:0},n[v]=(y?"-=":"+=")+c,o.animate(n,m,g)),o.queue(function(){l&&o.hide(),e.effects.restore(o,r),e.effects.removeWrapper(o),i()}),_>1&&b.splice.apply(b,[1,0].concat(b.splice(_,f+1))),o.dequeue()},e.effects.effect.clip=function(t,i){var s,n,a,o=e(this),r=["position","top","bottom","left","right","height","width"],h=e.effects.setMode(o,t.mode||"hide"),l="show"===h,u=t.direction||"vertical",d="vertical"===u,c=d?"height":"width",p=d?"top":"left",f={};e.effects.save(o,r),o.show(),s=e.effects.createWrapper(o).css({overflow:"hidden"}),n="IMG"===o[0].tagName?s:o,a=n[c](),l&&(n.css(c,0),n.css(p,a/2)),f[c]=l?a:0,f[p]=l?0:a/2,n.animate(f,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){l||o.hide(),e.effects.restore(o,r),e.effects.removeWrapper(o),i()}})},e.effects.effect.drop=function(t,i){var s,n=e(this),a=["position","top","bottom","left","right","opacity","height","width"],o=e.effects.setMode(n,t.mode||"hide"),r="show"===o,h=t.direction||"left",l="up"===h||"down"===h?"top":"left",u="up"===h||"left"===h?"pos":"neg",d={opacity:r?1:0};e.effects.save(n,a),n.show(),e.effects.createWrapper(n),s=t.distance||n["top"===l?"outerHeight":"outerWidth"](!0)/2,r&&n.css("opacity",0).css(l,"pos"===u?-s:s),d[l]=(r?"pos"===u?"+=":"-=":"pos"===u?"-=":"+=")+s,n.animate(d,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){"hide"===o&&n.hide(),e.effects.restore(n,a),e.effects.removeWrapper(n),i()}})},e.effects.effect.explode=function(t,i){function s(){b.push(this),b.length===d*c&&n()}function n(){p.css({visibility:"visible"}),e(b).remove(),m||p.hide(),i()}var a,o,r,h,l,u,d=t.pieces?Math.round(Math.sqrt(t.pieces)):3,c=d,p=e(this),f=e.effects.setMode(p,t.mode||"hide"),m="show"===f,g=p.show().css("visibility","hidden").offset(),v=Math.ceil(p.outerWidth()/c),y=Math.ceil(p.outerHeight()/d),b=[];for(a=0;d>a;a++)for(h=g.top+a*y,u=a-(d-1)/2,o=0;c>o;o++)r=g.left+o*v,l=o-(c-1)/2,p.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-o*v,top:-a*y}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:v,height:y,left:r+(m?l*v:0),top:h+(m?u*y:0),opacity:m?0:1}).animate({left:r+(m?0:l*v),top:h+(m?0:u*y),opacity:m?1:0},t.duration||500,t.easing,s)},e.effects.effect.fade=function(t,i){var s=e(this),n=e.effects.setMode(s,t.mode||"toggle");s.animate({opacity:n},{queue:!1,duration:t.duration,easing:t.easing,complete:i})},e.effects.effect.fold=function(t,i){var s,n,a=e(this),o=["position","top","bottom","left","right","height","width"],r=e.effects.setMode(a,t.mode||"hide"),h="show"===r,l="hide"===r,u=t.size||15,d=/([0-9]+)%/.exec(u),c=!!t.horizFirst,p=h!==c,f=p?["width","height"]:["height","width"],m=t.duration/2,g={},v={};e.effects.save(a,o),a.show(),s=e.effects.createWrapper(a).css({overflow:"hidden"}),n=p?[s.width(),s.height()]:[s.height(),s.width()],d&&(u=parseInt(d[1],10)/100*n[l?0:1]),h&&s.css(c?{height:0,width:u}:{height:u,width:0}),g[f[0]]=h?n[0]:u,v[f[1]]=h?n[1]:0,s.animate(g,m,t.easing).animate(v,m,t.easing,function(){l&&a.hide(),e.effects.restore(a,o),e.effects.removeWrapper(a),i()})},e.effects.effect.highlight=function(t,i){var s=e(this),n=["backgroundImage","backgroundColor","opacity"],a=e.effects.setMode(s,t.mode||"show"),o={backgroundColor:s.css("backgroundColor")};"hide"===a&&(o.opacity=0),e.effects.save(s,n),s.show().css({backgroundImage:"none",backgroundColor:t.color||"#ffff99"}).animate(o,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){"hide"===a&&s.hide(),e.effects.restore(s,n),i()}})},e.effects.effect.size=function(t,i){var s,n,a,o=e(this),r=["position","top","bottom","left","right","width","height","overflow","opacity"],h=["position","top","bottom","left","right","overflow","opacity"],l=["width","height","overflow"],u=["fontSize"],d=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],c=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],p=e.effects.setMode(o,t.mode||"effect"),f=t.restore||"effect"!==p,m=t.scale||"both",g=t.origin||["middle","center"],v=o.css("position"),y=f?r:h,b={height:0,width:0,outerHeight:0,outerWidth:0};"show"===p&&o.show(),s={height:o.height(),width:o.width(),outerHeight:o.outerHeight(),outerWidth:o.outerWidth()},"toggle"===t.mode&&"show"===p?(o.from=t.to||b,o.to=t.from||s):(o.from=t.from||("show"===p?b:s),o.to=t.to||("hide"===p?b:s)),a={from:{y:o.from.height/s.height,x:o.from.width/s.width},to:{y:o.to.height/s.height,x:o.to.width/s.width}},("box"===m||"both"===m)&&(a.from.y!==a.to.y&&(y=y.concat(d),o.from=e.effects.setTransition(o,d,a.from.y,o.from),o.to=e.effects.setTransition(o,d,a.to.y,o.to)),a.from.x!==a.to.x&&(y=y.concat(c),o.from=e.effects.setTransition(o,c,a.from.x,o.from),o.to=e.effects.setTransition(o,c,a.to.x,o.to))),("content"===m||"both"===m)&&a.from.y!==a.to.y&&(y=y.concat(u).concat(l),o.from=e.effects.setTransition(o,u,a.from.y,o.from),o.to=e.effects.setTransition(o,u,a.to.y,o.to)),e.effects.save(o,y),o.show(),e.effects.createWrapper(o),o.css("overflow","hidden").css(o.from),g&&(n=e.effects.getBaseline(g,s),o.from.top=(s.outerHeight-o.outerHeight())*n.y,o.from.left=(s.outerWidth-o.outerWidth())*n.x,o.to.top=(s.outerHeight-o.to.outerHeight)*n.y,o.to.left=(s.outerWidth-o.to.outerWidth)*n.x),o.css(o.from),("content"===m||"both"===m)&&(d=d.concat(["marginTop","marginBottom"]).concat(u),c=c.concat(["marginLeft","marginRight"]),l=r.concat(d).concat(c),o.find("*[width]").each(function(){var i=e(this),s={height:i.height(),width:i.width(),outerHeight:i.outerHeight(),outerWidth:i.outerWidth()};f&&e.effects.save(i,l),i.from={height:s.height*a.from.y,width:s.width*a.from.x,outerHeight:s.outerHeight*a.from.y,outerWidth:s.outerWidth*a.from.x},i.to={height:s.height*a.to.y,width:s.width*a.to.x,outerHeight:s.height*a.to.y,outerWidth:s.width*a.to.x},a.from.y!==a.to.y&&(i.from=e.effects.setTransition(i,d,a.from.y,i.from),i.to=e.effects.setTransition(i,d,a.to.y,i.to)),a.from.x!==a.to.x&&(i.from=e.effects.setTransition(i,c,a.from.x,i.from),i.to=e.effects.setTransition(i,c,a.to.x,i.to)),i.css(i.from),i.animate(i.to,t.duration,t.easing,function(){f&&e.effects.restore(i,l)})})),o.animate(o.to,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){0===o.to.opacity&&o.css("opacity",o.from.opacity),"hide"===p&&o.hide(),e.effects.restore(o,y),f||("static"===v?o.css({position:"relative",top:o.to.top,left:o.to.left}):e.each(["top","left"],function(e,t){o.css(t,function(t,i){var s=parseInt(i,10),n=e?o.to.left:o.to.top;return"auto"===i?n+"px":s+n+"px"})})),e.effects.removeWrapper(o),i()}})},e.effects.effect.scale=function(t,i){var s=e(this),n=e.extend(!0,{},t),a=e.effects.setMode(s,t.mode||"effect"),o=parseInt(t.percent,10)||(0===parseInt(t.percent,10)?0:"hide"===a?0:100),r=t.direction||"both",h=t.origin,l={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerWidth:s.outerWidth()},u={y:"horizontal"!==r?o/100:1,x:"vertical"!==r?o/100:1};n.effect="size",n.queue=!1,n.complete=i,"effect"!==a&&(n.origin=h||["middle","center"],n.restore=!0),n.from=t.from||("show"===a?{height:0,width:0,outerHeight:0,outerWidth:0}:l),n.to={height:l.height*u.y,width:l.width*u.x,outerHeight:l.outerHeight*u.y,outerWidth:l.outerWidth*u.x},n.fade&&("show"===a&&(n.from.opacity=0,n.to.opacity=1),"hide"===a&&(n.from.opacity=1,n.to.opacity=0)),s.effect(n)},e.effects.effect.puff=function(t,i){var s=e(this),n=e.effects.setMode(s,t.mode||"hide"),a="hide"===n,o=parseInt(t.percent,10)||150,r=o/100,h={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerWidth:s.outerWidth()};e.extend(t,{effect:"scale",queue:!1,fade:!0,mode:n,complete:i,percent:a?o:100,from:a?h:{height:h.height*r,width:h.width*r,outerHeight:h.outerHeight*r,outerWidth:h.outerWidth*r}}),s.effect(t)},e.effects.effect.pulsate=function(t,i){var s,n=e(this),a=e.effects.setMode(n,t.mode||"show"),o="show"===a,r="hide"===a,h=o||"hide"===a,l=2*(t.times||5)+(h?1:0),u=t.duration/l,d=0,c=n.queue(),p=c.length;for((o||!n.is(":visible"))&&(n.css("opacity",0).show(),d=1),s=1;l>s;s++)n.animate({opacity:d},u,t.easing),d=1-d;n.animate({opacity:d},u,t.easing),n.queue(function(){r&&n.hide(),i()}),p>1&&c.splice.apply(c,[1,0].concat(c.splice(p,l+1))),n.dequeue()},e.effects.effect.shake=function(t,i){var s,n=e(this),a=["position","top","bottom","left","right","height","width"],o=e.effects.setMode(n,t.mode||"effect"),r=t.direction||"left",h=t.distance||20,l=t.times||3,u=2*l+1,d=Math.round(t.duration/u),c="up"===r||"down"===r?"top":"left",p="up"===r||"left"===r,f={},m={},g={},v=n.queue(),y=v.length;for(e.effects.save(n,a),n.show(),e.effects.createWrapper(n),f[c]=(p?"-=":"+=")+h,m[c]=(p?"+=":"-=")+2*h,g[c]=(p?"-=":"+=")+2*h,n.animate(f,d,t.easing),s=1;l>s;s++)n.animate(m,d,t.easing).animate(g,d,t.easing);n.animate(m,d,t.easing).animate(f,d/2,t.easing).queue(function(){"hide"===o&&n.hide(),e.effects.restore(n,a),e.effects.removeWrapper(n),i()}),y>1&&v.splice.apply(v,[1,0].concat(v.splice(y,u+1))),n.dequeue()},e.effects.effect.slide=function(t,i){var s,n=e(this),a=["position","top","bottom","left","right","width","height"],o=e.effects.setMode(n,t.mode||"show"),r="show"===o,h=t.direction||"left",l="up"===h||"down"===h?"top":"left",u="up"===h||"left"===h,d={};e.effects.save(n,a),n.show(),s=t.distance||n["top"===l?"outerHeight":"outerWidth"](!0),e.effects.createWrapper(n).css({overflow:"hidden"}),r&&n.css(l,u?isNaN(s)?"-"+s:-s:s),d[l]=(r?u?"+=":"-=":u?"-=":"+=")+s,n.animate(d,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){"hide"===o&&n.hide(),e.effects.restore(n,a),e.effects.removeWrapper(n),i()}})},e.effects.effect.transfer=function(t,i){var s=e(this),n=e(t.to),a="fixed"===n.css("position"),o=e("body"),r=a?o.scrollTop():0,h=a?o.scrollLeft():0,l=n.offset(),u={top:l.top-r,left:l.left-h,height:n.innerHeight(),width:n.innerWidth()},d=s.offset(),c=e("<div class='ui-effects-transfer'></div>").appendTo(document.body).addClass(t.className).css({top:d.top-r,left:d.left-h,height:s.innerHeight(),width:s.innerWidth(),position:a?"fixed":"absolute"}).animate(u,t.duration,t.easing,function(){c.remove(),i()})}}); \ No newline at end of file diff --git a/branch/4.04/jquery-ui-1.11.4.custom/jquery-ui.structure.css b/branch/4.04/jquery-ui-1.11.4.custom/jquery-ui.structure.css new file mode 100644 index 0000000000000000000000000000000000000000..8184e152df2d03022a325af8c2ea41ff4137bbe0 --- /dev/null +++ b/branch/4.04/jquery-ui-1.11.4.custom/jquery-ui.structure.css @@ -0,0 +1,833 @@ +/*! + * jQuery UI CSS Framework 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/category/theming/ + */ + +/* Layout helpers +----------------------------------*/ +.ui-helper-hidden { + display: none; +} +.ui-helper-hidden-accessible { + border: 0; + clip: rect(0 0 0 0); + height: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute; + width: 1px; +} +.ui-helper-reset { + margin: 0; + padding: 0; + border: 0; + outline: 0; + line-height: 1.3; + text-decoration: none; + font-size: 100%; + list-style: none; +} +.ui-helper-clearfix:before, +.ui-helper-clearfix:after { + content: ""; + display: table; + border-collapse: collapse; +} +.ui-helper-clearfix:after { + clear: both; +} +.ui-helper-clearfix { + min-height: 0; /* support: IE7 */ +} +.ui-helper-zfix { + width: 100%; + height: 100%; + top: 0; + left: 0; + position: absolute; + opacity: 0; + filter:Alpha(Opacity=0); /* support: IE8 */ +} + +.ui-front { + z-index: 100; +} + + +/* Interaction Cues +----------------------------------*/ +.ui-state-disabled { + cursor: default !important; +} + + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { + display: block; + text-indent: -99999px; + overflow: hidden; + background-repeat: no-repeat; +} + + +/* Misc visuals +----------------------------------*/ + +/* Overlays */ +.ui-widget-overlay { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; +} +.ui-draggable-handle { + -ms-touch-action: none; + touch-action: none; +} +.ui-resizable { + position: relative; +} +.ui-resizable-handle { + position: absolute; + font-size: 0.1px; + display: block; + -ms-touch-action: none; + touch-action: none; +} +.ui-resizable-disabled .ui-resizable-handle, +.ui-resizable-autohide .ui-resizable-handle { + display: none; +} +.ui-resizable-n { + cursor: n-resize; + height: 7px; + width: 100%; + top: -5px; + left: 0; +} +.ui-resizable-s { + cursor: s-resize; + height: 7px; + width: 100%; + bottom: -5px; + left: 0; +} +.ui-resizable-e { + cursor: e-resize; + width: 7px; + right: -5px; + top: 0; + height: 100%; +} +.ui-resizable-w { + cursor: w-resize; + width: 7px; + left: -5px; + top: 0; + height: 100%; +} +.ui-resizable-se { + cursor: se-resize; + width: 12px; + height: 12px; + right: 1px; + bottom: 1px; +} +.ui-resizable-sw { + cursor: sw-resize; + width: 9px; + height: 9px; + left: -5px; + bottom: -5px; +} +.ui-resizable-nw { + cursor: nw-resize; + width: 9px; + height: 9px; + left: -5px; + top: -5px; +} +.ui-resizable-ne { + cursor: ne-resize; + width: 9px; + height: 9px; + right: -5px; + top: -5px; +} +.ui-selectable { + -ms-touch-action: none; + touch-action: none; +} +.ui-selectable-helper { + position: absolute; + z-index: 100; + border: 1px dotted black; +} +.ui-sortable-handle { + -ms-touch-action: none; + touch-action: none; +} +.ui-accordion .ui-accordion-header { + display: block; + cursor: pointer; + position: relative; + margin: 2px 0 0 0; + padding: .5em .5em .5em .7em; + min-height: 0; /* support: IE7 */ + font-size: 100%; +} +.ui-accordion .ui-accordion-icons { + padding-left: 2.2em; +} +.ui-accordion .ui-accordion-icons .ui-accordion-icons { + padding-left: 2.2em; +} +.ui-accordion .ui-accordion-header .ui-accordion-header-icon { + position: absolute; + left: .5em; + top: 50%; + margin-top: -8px; +} +.ui-accordion .ui-accordion-content { + padding: 1em 2.2em; + border-top: 0; + overflow: auto; +} +.ui-autocomplete { + position: absolute; + top: 0; + left: 0; + cursor: default; +} +.ui-button { + display: inline-block; + position: relative; + padding: 0; + line-height: normal; + margin-right: .1em; + cursor: pointer; + vertical-align: middle; + text-align: center; + overflow: visible; /* removes extra width in IE */ +} +.ui-button, +.ui-button:link, +.ui-button:visited, +.ui-button:hover, +.ui-button:active { + text-decoration: none; +} +/* to make room for the icon, a width needs to be set here */ +.ui-button-icon-only { + width: 2.2em; +} +/* button elements seem to need a little more width */ +button.ui-button-icon-only { + width: 2.4em; +} +.ui-button-icons-only { + width: 3.4em; +} +button.ui-button-icons-only { + width: 3.7em; +} + +/* button text element */ +.ui-button .ui-button-text { + display: block; + line-height: normal; +} +.ui-button-text-only .ui-button-text { + padding: .4em 1em; +} +.ui-button-icon-only .ui-button-text, +.ui-button-icons-only .ui-button-text { + padding: .4em; + text-indent: -9999999px; +} +.ui-button-text-icon-primary .ui-button-text, +.ui-button-text-icons .ui-button-text { + padding: .4em 1em .4em 2.1em; +} +.ui-button-text-icon-secondary .ui-button-text, +.ui-button-text-icons .ui-button-text { + padding: .4em 2.1em .4em 1em; +} +.ui-button-text-icons .ui-button-text { + padding-left: 2.1em; + padding-right: 2.1em; +} +/* no icon support for input elements, provide padding by default */ +input.ui-button { + padding: .4em 1em; +} + +/* button icon element(s) */ +.ui-button-icon-only .ui-icon, +.ui-button-text-icon-primary .ui-icon, +.ui-button-text-icon-secondary .ui-icon, +.ui-button-text-icons .ui-icon, +.ui-button-icons-only .ui-icon { + position: absolute; + top: 50%; + margin-top: -8px; +} +.ui-button-icon-only .ui-icon { + left: 50%; + margin-left: -8px; +} +.ui-button-text-icon-primary .ui-button-icon-primary, +.ui-button-text-icons .ui-button-icon-primary, +.ui-button-icons-only .ui-button-icon-primary { + left: .5em; +} +.ui-button-text-icon-secondary .ui-button-icon-secondary, +.ui-button-text-icons .ui-button-icon-secondary, +.ui-button-icons-only .ui-button-icon-secondary { + right: .5em; +} + +/* button sets */ +.ui-buttonset { + margin-right: 7px; +} +.ui-buttonset .ui-button { + margin-left: 0; + margin-right: -.3em; +} + +/* workarounds */ +/* reset extra padding in Firefox, see h5bp.com/l */ +input.ui-button::-moz-focus-inner, +button.ui-button::-moz-focus-inner { + border: 0; + padding: 0; +} +.ui-datepicker { + width: 17em; + padding: .2em .2em 0; + display: none; +} +.ui-datepicker .ui-datepicker-header { + position: relative; + padding: .2em 0; +} +.ui-datepicker .ui-datepicker-prev, +.ui-datepicker .ui-datepicker-next { + position: absolute; + top: 2px; + width: 1.8em; + height: 1.8em; +} +.ui-datepicker .ui-datepicker-prev-hover, +.ui-datepicker .ui-datepicker-next-hover { + top: 1px; +} +.ui-datepicker .ui-datepicker-prev { + left: 2px; +} +.ui-datepicker .ui-datepicker-next { + right: 2px; +} +.ui-datepicker .ui-datepicker-prev-hover { + left: 1px; +} +.ui-datepicker .ui-datepicker-next-hover { + right: 1px; +} +.ui-datepicker .ui-datepicker-prev span, +.ui-datepicker .ui-datepicker-next span { + display: block; + position: absolute; + left: 50%; + margin-left: -8px; + top: 50%; + margin-top: -8px; +} +.ui-datepicker .ui-datepicker-title { + margin: 0 2.3em; + line-height: 1.8em; + text-align: center; +} +.ui-datepicker .ui-datepicker-title select { + font-size: 1em; + margin: 1px 0; +} +.ui-datepicker select.ui-datepicker-month, +.ui-datepicker select.ui-datepicker-year { + width: 45%; +} +.ui-datepicker table { + width: 100%; + font-size: .9em; + border-collapse: collapse; + margin: 0 0 .4em; +} +.ui-datepicker th { + padding: .7em .3em; + text-align: center; + font-weight: bold; + border: 0; +} +.ui-datepicker td { + border: 0; + padding: 1px; +} +.ui-datepicker td span, +.ui-datepicker td a { + display: block; + padding: .2em; + text-align: right; + text-decoration: none; +} +.ui-datepicker .ui-datepicker-buttonpane { + background-image: none; + margin: .7em 0 0 0; + padding: 0 .2em; + border-left: 0; + border-right: 0; + border-bottom: 0; +} +.ui-datepicker .ui-datepicker-buttonpane button { + float: right; + margin: .5em .2em .4em; + cursor: pointer; + padding: .2em .6em .3em .6em; + width: auto; + overflow: visible; +} +.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { + float: left; +} + +/* with multiple calendars */ +.ui-datepicker.ui-datepicker-multi { + width: auto; +} +.ui-datepicker-multi .ui-datepicker-group { + float: left; +} +.ui-datepicker-multi .ui-datepicker-group table { + width: 95%; + margin: 0 auto .4em; +} +.ui-datepicker-multi-2 .ui-datepicker-group { + width: 50%; +} +.ui-datepicker-multi-3 .ui-datepicker-group { + width: 33.3%; +} +.ui-datepicker-multi-4 .ui-datepicker-group { + width: 25%; +} +.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header, +.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { + border-left-width: 0; +} +.ui-datepicker-multi .ui-datepicker-buttonpane { + clear: left; +} +.ui-datepicker-row-break { + clear: both; + width: 100%; + font-size: 0; +} + +/* RTL support */ +.ui-datepicker-rtl { + direction: rtl; +} +.ui-datepicker-rtl .ui-datepicker-prev { + right: 2px; + left: auto; +} +.ui-datepicker-rtl .ui-datepicker-next { + left: 2px; + right: auto; +} +.ui-datepicker-rtl .ui-datepicker-prev:hover { + right: 1px; + left: auto; +} +.ui-datepicker-rtl .ui-datepicker-next:hover { + left: 1px; + right: auto; +} +.ui-datepicker-rtl .ui-datepicker-buttonpane { + clear: right; +} +.ui-datepicker-rtl .ui-datepicker-buttonpane button { + float: left; +} +.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current, +.ui-datepicker-rtl .ui-datepicker-group { + float: right; +} +.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header, +.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { + border-right-width: 0; + border-left-width: 1px; +} +.ui-dialog { + overflow: hidden; + position: absolute; + top: 0; + left: 0; + padding: .2em; + outline: 0; +} +.ui-dialog .ui-dialog-titlebar { + padding: .4em 1em; + position: relative; +} +.ui-dialog .ui-dialog-title { + float: left; + margin: .1em 0; + white-space: nowrap; + width: 90%; + overflow: hidden; + text-overflow: ellipsis; +} +.ui-dialog .ui-dialog-titlebar-close { + position: absolute; + right: .3em; + top: 50%; + width: 20px; + margin: -10px 0 0 0; + padding: 1px; + height: 20px; +} +.ui-dialog .ui-dialog-content { + position: relative; + border: 0; + padding: .5em 1em; + background: none; + overflow: auto; +} +.ui-dialog .ui-dialog-buttonpane { + text-align: left; + border-width: 1px 0 0 0; + background-image: none; + margin-top: .5em; + padding: .3em 1em .5em .4em; +} +.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { + float: right; +} +.ui-dialog .ui-dialog-buttonpane button { + margin: .5em .4em .5em 0; + cursor: pointer; +} +.ui-dialog .ui-resizable-se { + width: 12px; + height: 12px; + right: -5px; + bottom: -5px; + background-position: 16px 16px; +} +.ui-draggable .ui-dialog-titlebar { + cursor: move; +} +.ui-menu { + list-style: none; + padding: 0; + margin: 0; + display: block; + outline: none; +} +.ui-menu .ui-menu { + position: absolute; +} +.ui-menu .ui-menu-item { + position: relative; + margin: 0; + padding: 3px 1em 3px .4em; + cursor: pointer; + min-height: 0; /* support: IE7 */ + /* support: IE10, see #8844 */ + list-style-image: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"); +} +.ui-menu .ui-menu-divider { + margin: 5px 0; + height: 0; + font-size: 0; + line-height: 0; + border-width: 1px 0 0 0; +} +.ui-menu .ui-state-focus, +.ui-menu .ui-state-active { + margin: -1px; +} + +/* icon support */ +.ui-menu-icons { + position: relative; +} +.ui-menu-icons .ui-menu-item { + padding-left: 2em; +} + +/* left-aligned */ +.ui-menu .ui-icon { + position: absolute; + top: 0; + bottom: 0; + left: .2em; + margin: auto 0; +} + +/* right-aligned */ +.ui-menu .ui-menu-icon { + left: auto; + right: 0; +} +.ui-progressbar { + height: 2em; + text-align: left; + overflow: hidden; +} +.ui-progressbar .ui-progressbar-value { + margin: -1px; + height: 100%; +} +.ui-progressbar .ui-progressbar-overlay { + background: url("data:image/gif;base64,R0lGODlhKAAoAIABAAAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh+QQJAQABACwAAAAAKAAoAAACkYwNqXrdC52DS06a7MFZI+4FHBCKoDeWKXqymPqGqxvJrXZbMx7Ttc+w9XgU2FB3lOyQRWET2IFGiU9m1frDVpxZZc6bfHwv4c1YXP6k1Vdy292Fb6UkuvFtXpvWSzA+HycXJHUXiGYIiMg2R6W459gnWGfHNdjIqDWVqemH2ekpObkpOlppWUqZiqr6edqqWQAAIfkECQEAAQAsAAAAACgAKAAAApSMgZnGfaqcg1E2uuzDmmHUBR8Qil95hiPKqWn3aqtLsS18y7G1SzNeowWBENtQd+T1JktP05nzPTdJZlR6vUxNWWjV+vUWhWNkWFwxl9VpZRedYcflIOLafaa28XdsH/ynlcc1uPVDZxQIR0K25+cICCmoqCe5mGhZOfeYSUh5yJcJyrkZWWpaR8doJ2o4NYq62lAAACH5BAkBAAEALAAAAAAoACgAAAKVDI4Yy22ZnINRNqosw0Bv7i1gyHUkFj7oSaWlu3ovC8GxNso5fluz3qLVhBVeT/Lz7ZTHyxL5dDalQWPVOsQWtRnuwXaFTj9jVVh8pma9JjZ4zYSj5ZOyma7uuolffh+IR5aW97cHuBUXKGKXlKjn+DiHWMcYJah4N0lYCMlJOXipGRr5qdgoSTrqWSq6WFl2ypoaUAAAIfkECQEAAQAsAAAAACgAKAAAApaEb6HLgd/iO7FNWtcFWe+ufODGjRfoiJ2akShbueb0wtI50zm02pbvwfWEMWBQ1zKGlLIhskiEPm9R6vRXxV4ZzWT2yHOGpWMyorblKlNp8HmHEb/lCXjcW7bmtXP8Xt229OVWR1fod2eWqNfHuMjXCPkIGNileOiImVmCOEmoSfn3yXlJWmoHGhqp6ilYuWYpmTqKUgAAIfkECQEAAQAsAAAAACgAKAAAApiEH6kb58biQ3FNWtMFWW3eNVcojuFGfqnZqSebuS06w5V80/X02pKe8zFwP6EFWOT1lDFk8rGERh1TTNOocQ61Hm4Xm2VexUHpzjymViHrFbiELsefVrn6XKfnt2Q9G/+Xdie499XHd2g4h7ioOGhXGJboGAnXSBnoBwKYyfioubZJ2Hn0RuRZaflZOil56Zp6iioKSXpUAAAh+QQJAQABACwAAAAAKAAoAAACkoQRqRvnxuI7kU1a1UU5bd5tnSeOZXhmn5lWK3qNTWvRdQxP8qvaC+/yaYQzXO7BMvaUEmJRd3TsiMAgswmNYrSgZdYrTX6tSHGZO73ezuAw2uxuQ+BbeZfMxsexY35+/Qe4J1inV0g4x3WHuMhIl2jXOKT2Q+VU5fgoSUI52VfZyfkJGkha6jmY+aaYdirq+lQAACH5BAkBAAEALAAAAAAoACgAAAKWBIKpYe0L3YNKToqswUlvznigd4wiR4KhZrKt9Upqip61i9E3vMvxRdHlbEFiEXfk9YARYxOZZD6VQ2pUunBmtRXo1Lf8hMVVcNl8JafV38aM2/Fu5V16Bn63r6xt97j09+MXSFi4BniGFae3hzbH9+hYBzkpuUh5aZmHuanZOZgIuvbGiNeomCnaxxap2upaCZsq+1kAACH5BAkBAAEALAAAAAAoACgAAAKXjI8By5zf4kOxTVrXNVlv1X0d8IGZGKLnNpYtm8Lr9cqVeuOSvfOW79D9aDHizNhDJidFZhNydEahOaDH6nomtJjp1tutKoNWkvA6JqfRVLHU/QUfau9l2x7G54d1fl995xcIGAdXqMfBNadoYrhH+Mg2KBlpVpbluCiXmMnZ2Sh4GBqJ+ckIOqqJ6LmKSllZmsoq6wpQAAAh+QQJAQABACwAAAAAKAAoAAAClYx/oLvoxuJDkU1a1YUZbJ59nSd2ZXhWqbRa2/gF8Gu2DY3iqs7yrq+xBYEkYvFSM8aSSObE+ZgRl1BHFZNr7pRCavZ5BW2142hY3AN/zWtsmf12p9XxxFl2lpLn1rseztfXZjdIWIf2s5dItwjYKBgo9yg5pHgzJXTEeGlZuenpyPmpGQoKOWkYmSpaSnqKileI2FAAACH5BAkBAAEALAAAAAAoACgAAAKVjB+gu+jG4kORTVrVhRlsnn2dJ3ZleFaptFrb+CXmO9OozeL5VfP99HvAWhpiUdcwkpBH3825AwYdU8xTqlLGhtCosArKMpvfa1mMRae9VvWZfeB2XfPkeLmm18lUcBj+p5dnN8jXZ3YIGEhYuOUn45aoCDkp16hl5IjYJvjWKcnoGQpqyPlpOhr3aElaqrq56Bq7VAAAOw=="); + height: 100%; + filter: alpha(opacity=25); /* support: IE8 */ + opacity: 0.25; +} +.ui-progressbar-indeterminate .ui-progressbar-value { + background-image: none; +} +.ui-selectmenu-menu { + padding: 0; + margin: 0; + position: absolute; + top: 0; + left: 0; + display: none; +} +.ui-selectmenu-menu .ui-menu { + overflow: auto; + /* Support: IE7 */ + overflow-x: hidden; + padding-bottom: 1px; +} +.ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup { + font-size: 1em; + font-weight: bold; + line-height: 1.5; + padding: 2px 0.4em; + margin: 0.5em 0 0 0; + height: auto; + border: 0; +} +.ui-selectmenu-open { + display: block; +} +.ui-selectmenu-button { + display: inline-block; + overflow: hidden; + position: relative; + text-decoration: none; + cursor: pointer; +} +.ui-selectmenu-button span.ui-icon { + right: 0.5em; + left: auto; + margin-top: -8px; + position: absolute; + top: 50%; +} +.ui-selectmenu-button span.ui-selectmenu-text { + text-align: left; + padding: 0.4em 2.1em 0.4em 1em; + display: block; + line-height: 1.4; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.ui-slider { + position: relative; + text-align: left; +} +.ui-slider .ui-slider-handle { + position: absolute; + z-index: 2; + width: 1.2em; + height: 1.2em; + cursor: default; + -ms-touch-action: none; + touch-action: none; +} +.ui-slider .ui-slider-range { + position: absolute; + z-index: 1; + font-size: .7em; + display: block; + border: 0; + background-position: 0 0; +} + +/* support: IE8 - See #6727 */ +.ui-slider.ui-state-disabled .ui-slider-handle, +.ui-slider.ui-state-disabled .ui-slider-range { + filter: inherit; +} + +.ui-slider-horizontal { + height: .8em; +} +.ui-slider-horizontal .ui-slider-handle { + top: -.3em; + margin-left: -.6em; +} +.ui-slider-horizontal .ui-slider-range { + top: 0; + height: 100%; +} +.ui-slider-horizontal .ui-slider-range-min { + left: 0; +} +.ui-slider-horizontal .ui-slider-range-max { + right: 0; +} + +.ui-slider-vertical { + width: .8em; + height: 100px; +} +.ui-slider-vertical .ui-slider-handle { + left: -.3em; + margin-left: 0; + margin-bottom: -.6em; +} +.ui-slider-vertical .ui-slider-range { + left: 0; + width: 100%; +} +.ui-slider-vertical .ui-slider-range-min { + bottom: 0; +} +.ui-slider-vertical .ui-slider-range-max { + top: 0; +} +.ui-spinner { + position: relative; + display: inline-block; + overflow: hidden; + padding: 0; + vertical-align: middle; +} +.ui-spinner-input { + border: none; + background: none; + color: inherit; + padding: 0; + margin: .2em 0; + vertical-align: middle; + margin-left: .4em; + margin-right: 22px; +} +.ui-spinner-button { + width: 16px; + height: 50%; + font-size: .5em; + padding: 0; + margin: 0; + text-align: center; + position: absolute; + cursor: default; + display: block; + overflow: hidden; + right: 0; +} +/* more specificity required here to override default borders */ +.ui-spinner a.ui-spinner-button { + border-top: none; + border-bottom: none; + border-right: none; +} +/* vertically center icon */ +.ui-spinner .ui-icon { + position: absolute; + margin-top: -8px; + top: 50%; + left: 0; +} +.ui-spinner-up { + top: 0; +} +.ui-spinner-down { + bottom: 0; +} + +/* TR overrides */ +.ui-spinner .ui-icon-triangle-1-s { + /* need to fix icons sprite */ + background-position: -65px -16px; +} +.ui-tabs { + position: relative;/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ + padding: .2em; +} +.ui-tabs .ui-tabs-nav { + margin: 0; + padding: .2em .2em 0; +} +.ui-tabs .ui-tabs-nav li { + list-style: none; + float: left; + position: relative; + top: 0; + margin: 1px .2em 0 0; + border-bottom-width: 0; + padding: 0; + white-space: nowrap; +} +.ui-tabs .ui-tabs-nav .ui-tabs-anchor { + float: left; + padding: .5em 1em; + text-decoration: none; +} +.ui-tabs .ui-tabs-nav li.ui-tabs-active { + margin-bottom: -1px; + padding-bottom: 1px; +} +.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor, +.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor, +.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor { + cursor: text; +} +.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor { + cursor: pointer; +} +.ui-tabs .ui-tabs-panel { + display: block; + border-width: 0; + padding: 1em 1.4em; + background: none; +} +.ui-tooltip { + padding: 8px; + position: absolute; + z-index: 9999; + max-width: 300px; + -webkit-box-shadow: 0 0 5px #aaa; + box-shadow: 0 0 5px #aaa; +} +body .ui-tooltip { + border-width: 2px; +} diff --git a/branch/4.04/jquery-ui-1.11.4.custom/jquery-ui.structure.min.css b/branch/4.04/jquery-ui-1.11.4.custom/jquery-ui.structure.min.css new file mode 100644 index 0000000000000000000000000000000000000000..2e59ac8266e2902811d744743b568e4470f0ce8d --- /dev/null +++ b/branch/4.04/jquery-ui-1.11.4.custom/jquery-ui.structure.min.css @@ -0,0 +1,5 @@ +/*! jQuery UI - v1.11.4 - 2015-05-10 +* http://jqueryui.com +* Copyright 2015 jQuery Foundation and other contributors; Licensed MIT */ + +.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{min-height:0}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-draggable-handle{-ms-touch-action:none;touch-action:none}.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:0.1px;display:block;-ms-touch-action:none;touch-action:none}.ui-resizable-disabled .ui-resizable-handle,.ui-resizable-autohide .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}.ui-selectable{-ms-touch-action:none;touch-action:none}.ui-selectable-helper{position:absolute;z-index:100;border:1px dotted black}.ui-sortable-handle{-ms-touch-action:none;touch-action:none}.ui-accordion .ui-accordion-header{display:block;cursor:pointer;position:relative;margin:2px 0 0 0;padding:.5em .5em .5em .7em;min-height:0;font-size:100%}.ui-accordion .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-icons .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-header .ui-accordion-header-icon{position:absolute;left:.5em;top:50%;margin-top:-8px}.ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;overflow:auto}.ui-autocomplete{position:absolute;top:0;left:0;cursor:default}.ui-button{display:inline-block;position:relative;padding:0;line-height:normal;margin-right:.1em;cursor:pointer;vertical-align:middle;text-align:center;overflow:visible}.ui-button,.ui-button:link,.ui-button:visited,.ui-button:hover,.ui-button:active{text-decoration:none}.ui-button-icon-only{width:2.2em}button.ui-button-icon-only{width:2.4em}.ui-button-icons-only{width:3.4em}button.ui-button-icons-only{width:3.7em}.ui-button .ui-button-text{display:block;line-height:normal}.ui-button-text-only .ui-button-text{padding:.4em 1em}.ui-button-icon-only .ui-button-text,.ui-button-icons-only .ui-button-text{padding:.4em;text-indent:-9999999px}.ui-button-text-icon-primary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 1em .4em 2.1em}.ui-button-text-icon-secondary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 2.1em .4em 1em}.ui-button-text-icons .ui-button-text{padding-left:2.1em;padding-right:2.1em}input.ui-button{padding:.4em 1em}.ui-button-icon-only .ui-icon,.ui-button-text-icon-primary .ui-icon,.ui-button-text-icon-secondary .ui-icon,.ui-button-text-icons .ui-icon,.ui-button-icons-only .ui-icon{position:absolute;top:50%;margin-top:-8px}.ui-button-icon-only .ui-icon{left:50%;margin-left:-8px}.ui-button-text-icon-primary .ui-button-icon-primary,.ui-button-text-icons .ui-button-icon-primary,.ui-button-icons-only .ui-button-icon-primary{left:.5em}.ui-button-text-icon-secondary .ui-button-icon-secondary,.ui-button-text-icons .ui-button-icon-secondary,.ui-button-icons-only .ui-button-icon-secondary{right:.5em}.ui-buttonset{margin-right:7px}.ui-buttonset .ui-button{margin-left:0;margin-right:-.3em}input.ui-button::-moz-focus-inner,button.ui-button::-moz-focus-inner{border:0;padding:0}.ui-datepicker{width:17em;padding:.2em .2em 0;display:none}.ui-datepicker .ui-datepicker-header{position:relative;padding:.2em 0}.ui-datepicker .ui-datepicker-prev,.ui-datepicker .ui-datepicker-next{position:absolute;top:2px;width:1.8em;height:1.8em}.ui-datepicker .ui-datepicker-prev-hover,.ui-datepicker .ui-datepicker-next-hover{top:1px}.ui-datepicker .ui-datepicker-prev{left:2px}.ui-datepicker .ui-datepicker-next{right:2px}.ui-datepicker .ui-datepicker-prev-hover{left:1px}.ui-datepicker .ui-datepicker-next-hover{right:1px}.ui-datepicker .ui-datepicker-prev span,.ui-datepicker .ui-datepicker-next span{display:block;position:absolute;left:50%;margin-left:-8px;top:50%;margin-top:-8px}.ui-datepicker .ui-datepicker-title{margin:0 2.3em;line-height:1.8em;text-align:center}.ui-datepicker .ui-datepicker-title select{font-size:1em;margin:1px 0}.ui-datepicker select.ui-datepicker-month,.ui-datepicker select.ui-datepicker-year{width:45%}.ui-datepicker table{width:100%;font-size:.9em;border-collapse:collapse;margin:0 0 .4em}.ui-datepicker th{padding:.7em .3em;text-align:center;font-weight:bold;border:0}.ui-datepicker td{border:0;padding:1px}.ui-datepicker td span,.ui-datepicker td a{display:block;padding:.2em;text-align:right;text-decoration:none}.ui-datepicker .ui-datepicker-buttonpane{background-image:none;margin:.7em 0 0 0;padding:0 .2em;border-left:0;border-right:0;border-bottom:0}.ui-datepicker .ui-datepicker-buttonpane button{float:right;margin:.5em .2em .4em;cursor:pointer;padding:.2em .6em .3em .6em;width:auto;overflow:visible}.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current{float:left}.ui-datepicker.ui-datepicker-multi{width:auto}.ui-datepicker-multi .ui-datepicker-group{float:left}.ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .4em}.ui-datepicker-multi-2 .ui-datepicker-group{width:50%}.ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%}.ui-datepicker-multi-4 .ui-datepicker-group{width:25%}.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0}.ui-datepicker-multi .ui-datepicker-buttonpane{clear:left}.ui-datepicker-row-break{clear:both;width:100%;font-size:0}.ui-datepicker-rtl{direction:rtl}.ui-datepicker-rtl .ui-datepicker-prev{right:2px;left:auto}.ui-datepicker-rtl .ui-datepicker-next{left:2px;right:auto}.ui-datepicker-rtl .ui-datepicker-prev:hover{right:1px;left:auto}.ui-datepicker-rtl .ui-datepicker-next:hover{left:1px;right:auto}.ui-datepicker-rtl .ui-datepicker-buttonpane{clear:right}.ui-datepicker-rtl .ui-datepicker-buttonpane button{float:left}.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,.ui-datepicker-rtl .ui-datepicker-group{float:right}.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0;border-left-width:1px}.ui-dialog{overflow:hidden;position:absolute;top:0;left:0;padding:.2em;outline:0}.ui-dialog .ui-dialog-titlebar{padding:.4em 1em;position:relative}.ui-dialog .ui-dialog-title{float:left;margin:.1em 0;white-space:nowrap;width:90%;overflow:hidden;text-overflow:ellipsis}.ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:20px;margin:-10px 0 0 0;padding:1px;height:20px}.ui-dialog .ui-dialog-content{position:relative;border:0;padding:.5em 1em;background:none;overflow:auto}.ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0 0;background-image:none;margin-top:.5em;padding:.3em 1em .5em .4em}.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:right}.ui-dialog .ui-dialog-buttonpane button{margin:.5em .4em .5em 0;cursor:pointer}.ui-dialog .ui-resizable-se{width:12px;height:12px;right:-5px;bottom:-5px;background-position:16px 16px}.ui-draggable .ui-dialog-titlebar{cursor:move}.ui-menu{list-style:none;padding:0;margin:0;display:block;outline:none}.ui-menu .ui-menu{position:absolute}.ui-menu .ui-menu-item{position:relative;margin:0;padding:3px 1em 3px .4em;cursor:pointer;min-height:0;list-style-image:url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7")}.ui-menu .ui-menu-divider{margin:5px 0;height:0;font-size:0;line-height:0;border-width:1px 0 0 0}.ui-menu .ui-state-focus,.ui-menu .ui-state-active{margin:-1px}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item{padding-left:2em}.ui-menu .ui-icon{position:absolute;top:0;bottom:0;left:.2em;margin:auto 0}.ui-menu .ui-menu-icon{left:auto;right:0}.ui-progressbar{height:2em;text-align:left;overflow:hidden}.ui-progressbar .ui-progressbar-value{margin:-1px;height:100%}.ui-progressbar .ui-progressbar-overlay{background:url("data:image/gif;base64,R0lGODlhKAAoAIABAAAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh+QQJAQABACwAAAAAKAAoAAACkYwNqXrdC52DS06a7MFZI+4FHBCKoDeWKXqymPqGqxvJrXZbMx7Ttc+w9XgU2FB3lOyQRWET2IFGiU9m1frDVpxZZc6bfHwv4c1YXP6k1Vdy292Fb6UkuvFtXpvWSzA+HycXJHUXiGYIiMg2R6W459gnWGfHNdjIqDWVqemH2ekpObkpOlppWUqZiqr6edqqWQAAIfkECQEAAQAsAAAAACgAKAAAApSMgZnGfaqcg1E2uuzDmmHUBR8Qil95hiPKqWn3aqtLsS18y7G1SzNeowWBENtQd+T1JktP05nzPTdJZlR6vUxNWWjV+vUWhWNkWFwxl9VpZRedYcflIOLafaa28XdsH/ynlcc1uPVDZxQIR0K25+cICCmoqCe5mGhZOfeYSUh5yJcJyrkZWWpaR8doJ2o4NYq62lAAACH5BAkBAAEALAAAAAAoACgAAAKVDI4Yy22ZnINRNqosw0Bv7i1gyHUkFj7oSaWlu3ovC8GxNso5fluz3qLVhBVeT/Lz7ZTHyxL5dDalQWPVOsQWtRnuwXaFTj9jVVh8pma9JjZ4zYSj5ZOyma7uuolffh+IR5aW97cHuBUXKGKXlKjn+DiHWMcYJah4N0lYCMlJOXipGRr5qdgoSTrqWSq6WFl2ypoaUAAAIfkECQEAAQAsAAAAACgAKAAAApaEb6HLgd/iO7FNWtcFWe+ufODGjRfoiJ2akShbueb0wtI50zm02pbvwfWEMWBQ1zKGlLIhskiEPm9R6vRXxV4ZzWT2yHOGpWMyorblKlNp8HmHEb/lCXjcW7bmtXP8Xt229OVWR1fod2eWqNfHuMjXCPkIGNileOiImVmCOEmoSfn3yXlJWmoHGhqp6ilYuWYpmTqKUgAAIfkECQEAAQAsAAAAACgAKAAAApiEH6kb58biQ3FNWtMFWW3eNVcojuFGfqnZqSebuS06w5V80/X02pKe8zFwP6EFWOT1lDFk8rGERh1TTNOocQ61Hm4Xm2VexUHpzjymViHrFbiELsefVrn6XKfnt2Q9G/+Xdie499XHd2g4h7ioOGhXGJboGAnXSBnoBwKYyfioubZJ2Hn0RuRZaflZOil56Zp6iioKSXpUAAAh+QQJAQABACwAAAAAKAAoAAACkoQRqRvnxuI7kU1a1UU5bd5tnSeOZXhmn5lWK3qNTWvRdQxP8qvaC+/yaYQzXO7BMvaUEmJRd3TsiMAgswmNYrSgZdYrTX6tSHGZO73ezuAw2uxuQ+BbeZfMxsexY35+/Qe4J1inV0g4x3WHuMhIl2jXOKT2Q+VU5fgoSUI52VfZyfkJGkha6jmY+aaYdirq+lQAACH5BAkBAAEALAAAAAAoACgAAAKWBIKpYe0L3YNKToqswUlvznigd4wiR4KhZrKt9Upqip61i9E3vMvxRdHlbEFiEXfk9YARYxOZZD6VQ2pUunBmtRXo1Lf8hMVVcNl8JafV38aM2/Fu5V16Bn63r6xt97j09+MXSFi4BniGFae3hzbH9+hYBzkpuUh5aZmHuanZOZgIuvbGiNeomCnaxxap2upaCZsq+1kAACH5BAkBAAEALAAAAAAoACgAAAKXjI8By5zf4kOxTVrXNVlv1X0d8IGZGKLnNpYtm8Lr9cqVeuOSvfOW79D9aDHizNhDJidFZhNydEahOaDH6nomtJjp1tutKoNWkvA6JqfRVLHU/QUfau9l2x7G54d1fl995xcIGAdXqMfBNadoYrhH+Mg2KBlpVpbluCiXmMnZ2Sh4GBqJ+ckIOqqJ6LmKSllZmsoq6wpQAAAh+QQJAQABACwAAAAAKAAoAAAClYx/oLvoxuJDkU1a1YUZbJ59nSd2ZXhWqbRa2/gF8Gu2DY3iqs7yrq+xBYEkYvFSM8aSSObE+ZgRl1BHFZNr7pRCavZ5BW2142hY3AN/zWtsmf12p9XxxFl2lpLn1rseztfXZjdIWIf2s5dItwjYKBgo9yg5pHgzJXTEeGlZuenpyPmpGQoKOWkYmSpaSnqKileI2FAAACH5BAkBAAEALAAAAAAoACgAAAKVjB+gu+jG4kORTVrVhRlsnn2dJ3ZleFaptFrb+CXmO9OozeL5VfP99HvAWhpiUdcwkpBH3825AwYdU8xTqlLGhtCosArKMpvfa1mMRae9VvWZfeB2XfPkeLmm18lUcBj+p5dnN8jXZ3YIGEhYuOUn45aoCDkp16hl5IjYJvjWKcnoGQpqyPlpOhr3aElaqrq56Bq7VAAAOw==");height:100%;filter:alpha(opacity=25);opacity:0.25}.ui-progressbar-indeterminate .ui-progressbar-value{background-image:none}.ui-selectmenu-menu{padding:0;margin:0;position:absolute;top:0;left:0;display:none}.ui-selectmenu-menu .ui-menu{overflow:auto;overflow-x:hidden;padding-bottom:1px}.ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup{font-size:1em;font-weight:bold;line-height:1.5;padding:2px 0.4em;margin:0.5em 0 0 0;height:auto;border:0}.ui-selectmenu-open{display:block}.ui-selectmenu-button{display:inline-block;overflow:hidden;position:relative;text-decoration:none;cursor:pointer}.ui-selectmenu-button span.ui-icon{right:0.5em;left:auto;margin-top:-8px;position:absolute;top:50%}.ui-selectmenu-button span.ui-selectmenu-text{text-align:left;padding:0.4em 2.1em 0.4em 1em;display:block;line-height:1.4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-slider{position:relative;text-align:left}.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default;-ms-touch-action:none;touch-action:none}.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}.ui-slider.ui-state-disabled .ui-slider-handle,.ui-slider.ui-state-disabled .ui-slider-range{filter:inherit}.ui-slider-horizontal{height:.8em}.ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em}.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.ui-slider-horizontal .ui-slider-range-min{left:0}.ui-slider-horizontal .ui-slider-range-max{right:0}.ui-slider-vertical{width:.8em;height:100px}.ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em}.ui-slider-vertical .ui-slider-range{left:0;width:100%}.ui-slider-vertical .ui-slider-range-min{bottom:0}.ui-slider-vertical .ui-slider-range-max{top:0}.ui-spinner{position:relative;display:inline-block;overflow:hidden;padding:0;vertical-align:middle}.ui-spinner-input{border:none;background:none;color:inherit;padding:0;margin:.2em 0;vertical-align:middle;margin-left:.4em;margin-right:22px}.ui-spinner-button{width:16px;height:50%;font-size:.5em;padding:0;margin:0;text-align:center;position:absolute;cursor:default;display:block;overflow:hidden;right:0}.ui-spinner a.ui-spinner-button{border-top:none;border-bottom:none;border-right:none}.ui-spinner .ui-icon{position:absolute;margin-top:-8px;top:50%;left:0}.ui-spinner-up{top:0}.ui-spinner-down{bottom:0}.ui-spinner .ui-icon-triangle-1-s{background-position:-65px -16px}.ui-tabs{position:relative;padding:.2em}.ui-tabs .ui-tabs-nav{margin:0;padding:.2em .2em 0}.ui-tabs .ui-tabs-nav li{list-style:none;float:left;position:relative;top:0;margin:1px .2em 0 0;border-bottom-width:0;padding:0;white-space:nowrap}.ui-tabs .ui-tabs-nav .ui-tabs-anchor{float:left;padding:.5em 1em;text-decoration:none}.ui-tabs .ui-tabs-nav li.ui-tabs-active{margin-bottom:-1px;padding-bottom:1px}.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor{cursor:text}.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor{cursor:pointer}.ui-tabs .ui-tabs-panel{display:block;border-width:0;padding:1em 1.4em;background:none}.ui-tooltip{padding:8px;position:absolute;z-index:9999;max-width:300px;-webkit-box-shadow:0 0 5px #aaa;box-shadow:0 0 5px #aaa}body .ui-tooltip{border-width:2px} \ No newline at end of file diff --git a/branch/4.04/jquery-ui-1.11.4.custom/jquery-ui.theme.css b/branch/4.04/jquery-ui-1.11.4.custom/jquery-ui.theme.css new file mode 100644 index 0000000000000000000000000000000000000000..5db92db3eba26a617fae6c75e8e88527bc234412 --- /dev/null +++ b/branch/4.04/jquery-ui-1.11.4.custom/jquery-ui.theme.css @@ -0,0 +1,410 @@ +/*! + * jQuery UI CSS Framework 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/category/theming/ + * + * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Trebuchet%20MS%2CTahoma%2CVerdana%2CArial%2Csans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=f6a828&bgTextureHeader=gloss_wave&bgImgOpacityHeader=35&borderColorHeader=e78f08&fcHeader=ffffff&iconColorHeader=ffffff&bgColorContent=eeeeee&bgTextureContent=highlight_soft&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=333333&iconColorContent=222222&bgColorDefault=f6f6f6&bgTextureDefault=glass&bgImgOpacityDefault=100&borderColorDefault=cccccc&fcDefault=1c94c4&iconColorDefault=ef8c08&bgColorHover=fdf5ce&bgTextureHover=glass&bgImgOpacityHover=100&borderColorHover=fbcb09&fcHover=c77405&iconColorHover=ef8c08&bgColorActive=ffffff&bgTextureActive=glass&bgImgOpacityActive=65&borderColorActive=fbd850&fcActive=eb8f00&iconColorActive=ef8c08&bgColorHighlight=ffe45c&bgTextureHighlight=highlight_soft&bgImgOpacityHighlight=75&borderColorHighlight=fed22f&fcHighlight=363636&iconColorHighlight=228ef1&bgColorError=b81900&bgTextureError=diagonals_thick&bgImgOpacityError=18&borderColorError=cd0a0a&fcError=ffffff&iconColorError=ffd27a&bgColorOverlay=666666&bgTextureOverlay=diagonals_thick&bgImgOpacityOverlay=20&opacityOverlay=50&bgColorShadow=000000&bgTextureShadow=flat&bgImgOpacityShadow=10&opacityShadow=20&thicknessShadow=5px&offsetTopShadow=-5px&offsetLeftShadow=-5px&cornerRadiusShadow=5px + */ + + +/* Component containers +----------------------------------*/ +.ui-widget { + font-family: Trebuchet MS,Tahoma,Verdana,Arial,sans-serif; + font-size: 1.1em; +} +.ui-widget .ui-widget { + font-size: 1em; +} +.ui-widget input, +.ui-widget select, +.ui-widget textarea, +.ui-widget button { + font-family: Trebuchet MS,Tahoma,Verdana,Arial,sans-serif; + font-size: 1em; +} +.ui-widget-content { + border: 1px solid #dddddd; + background: #eeeeee url("images/ui-bg_highlight-soft_100_eeeeee_1x100.png") 50% top repeat-x; + color: #333333; +} +.ui-widget-content a { + color: #333333; +} +.ui-widget-header { + border: 1px solid #e78f08; + background: #f6a828 url("images/ui-bg_gloss-wave_35_f6a828_500x100.png") 50% 50% repeat-x; + color: #ffffff; + font-weight: bold; +} +.ui-widget-header a { + color: #ffffff; +} + +/* Interaction states +----------------------------------*/ +.ui-state-default, +.ui-widget-content .ui-state-default, +.ui-widget-header .ui-state-default { + border: 1px solid #cccccc; + background: #f6f6f6 url("images/ui-bg_glass_100_f6f6f6_1x400.png") 50% 50% repeat-x; + font-weight: bold; + color: #1c94c4; +} +.ui-state-default a, +.ui-state-default a:link, +.ui-state-default a:visited { + color: #1c94c4; + text-decoration: none; +} +.ui-state-hover, +.ui-widget-content .ui-state-hover, +.ui-widget-header .ui-state-hover, +.ui-state-focus, +.ui-widget-content .ui-state-focus, +.ui-widget-header .ui-state-focus { + border: 1px solid #fbcb09; + background: #fdf5ce url("images/ui-bg_glass_100_fdf5ce_1x400.png") 50% 50% repeat-x; + font-weight: bold; + color: #c77405; +} +.ui-state-hover a, +.ui-state-hover a:hover, +.ui-state-hover a:link, +.ui-state-hover a:visited, +.ui-state-focus a, +.ui-state-focus a:hover, +.ui-state-focus a:link, +.ui-state-focus a:visited { + color: #c77405; + text-decoration: none; +} +.ui-state-active, +.ui-widget-content .ui-state-active, +.ui-widget-header .ui-state-active { + border: 1px solid #fbd850; + background: #ffffff url("images/ui-bg_glass_65_ffffff_1x400.png") 50% 50% repeat-x; + font-weight: bold; + color: #eb8f00; +} +.ui-state-active a, +.ui-state-active a:link, +.ui-state-active a:visited { + color: #eb8f00; + text-decoration: none; +} + +/* Interaction Cues +----------------------------------*/ +.ui-state-highlight, +.ui-widget-content .ui-state-highlight, +.ui-widget-header .ui-state-highlight { + border: 1px solid #fed22f; + background: #ffe45c url("images/ui-bg_highlight-soft_75_ffe45c_1x100.png") 50% top repeat-x; + color: #363636; +} +.ui-state-highlight a, +.ui-widget-content .ui-state-highlight a, +.ui-widget-header .ui-state-highlight a { + color: #363636; +} +.ui-state-error, +.ui-widget-content .ui-state-error, +.ui-widget-header .ui-state-error { + border: 1px solid #cd0a0a; + background: #b81900 url("images/ui-bg_diagonals-thick_18_b81900_40x40.png") 50% 50% repeat; + color: #ffffff; +} +.ui-state-error a, +.ui-widget-content .ui-state-error a, +.ui-widget-header .ui-state-error a { + color: #ffffff; +} +.ui-state-error-text, +.ui-widget-content .ui-state-error-text, +.ui-widget-header .ui-state-error-text { + color: #ffffff; +} +.ui-priority-primary, +.ui-widget-content .ui-priority-primary, +.ui-widget-header .ui-priority-primary { + font-weight: bold; +} +.ui-priority-secondary, +.ui-widget-content .ui-priority-secondary, +.ui-widget-header .ui-priority-secondary { + opacity: .7; + filter:Alpha(Opacity=70); /* support: IE8 */ + font-weight: normal; +} +.ui-state-disabled, +.ui-widget-content .ui-state-disabled, +.ui-widget-header .ui-state-disabled { + opacity: .35; + filter:Alpha(Opacity=35); /* support: IE8 */ + background-image: none; +} +.ui-state-disabled .ui-icon { + filter:Alpha(Opacity=35); /* support: IE8 - See #6059 */ +} + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { + width: 16px; + height: 16px; +} +.ui-icon, +.ui-widget-content .ui-icon { + background-image: url("images/ui-icons_222222_256x240.png"); +} +.ui-widget-header .ui-icon { + background-image: url("images/ui-icons_ffffff_256x240.png"); +} +.ui-state-default .ui-icon { + background-image: url("images/ui-icons_ef8c08_256x240.png"); +} +.ui-state-hover .ui-icon, +.ui-state-focus .ui-icon { + background-image: url("images/ui-icons_ef8c08_256x240.png"); +} +.ui-state-active .ui-icon { + background-image: url("images/ui-icons_ef8c08_256x240.png"); +} +.ui-state-highlight .ui-icon { + background-image: url("images/ui-icons_228ef1_256x240.png"); +} +.ui-state-error .ui-icon, +.ui-state-error-text .ui-icon { + background-image: url("images/ui-icons_ffd27a_256x240.png"); +} + +/* positioning */ +.ui-icon-blank { background-position: 16px 16px; } +.ui-icon-carat-1-n { background-position: 0 0; } +.ui-icon-carat-1-ne { background-position: -16px 0; } +.ui-icon-carat-1-e { background-position: -32px 0; } +.ui-icon-carat-1-se { background-position: -48px 0; } +.ui-icon-carat-1-s { background-position: -64px 0; } +.ui-icon-carat-1-sw { background-position: -80px 0; } +.ui-icon-carat-1-w { background-position: -96px 0; } +.ui-icon-carat-1-nw { background-position: -112px 0; } +.ui-icon-carat-2-n-s { background-position: -128px 0; } +.ui-icon-carat-2-e-w { background-position: -144px 0; } +.ui-icon-triangle-1-n { background-position: 0 -16px; } +.ui-icon-triangle-1-ne { background-position: -16px -16px; } +.ui-icon-triangle-1-e { background-position: -32px -16px; } +.ui-icon-triangle-1-se { background-position: -48px -16px; } +.ui-icon-triangle-1-s { background-position: -64px -16px; } +.ui-icon-triangle-1-sw { background-position: -80px -16px; } +.ui-icon-triangle-1-w { background-position: -96px -16px; } +.ui-icon-triangle-1-nw { background-position: -112px -16px; } +.ui-icon-triangle-2-n-s { background-position: -128px -16px; } +.ui-icon-triangle-2-e-w { background-position: -144px -16px; } +.ui-icon-arrow-1-n { background-position: 0 -32px; } +.ui-icon-arrow-1-ne { background-position: -16px -32px; } +.ui-icon-arrow-1-e { background-position: -32px -32px; } +.ui-icon-arrow-1-se { background-position: -48px -32px; } +.ui-icon-arrow-1-s { background-position: -64px -32px; } +.ui-icon-arrow-1-sw { background-position: -80px -32px; } +.ui-icon-arrow-1-w { background-position: -96px -32px; } +.ui-icon-arrow-1-nw { background-position: -112px -32px; } +.ui-icon-arrow-2-n-s { background-position: -128px -32px; } +.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } +.ui-icon-arrow-2-e-w { background-position: -160px -32px; } +.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } +.ui-icon-arrowstop-1-n { background-position: -192px -32px; } +.ui-icon-arrowstop-1-e { background-position: -208px -32px; } +.ui-icon-arrowstop-1-s { background-position: -224px -32px; } +.ui-icon-arrowstop-1-w { background-position: -240px -32px; } +.ui-icon-arrowthick-1-n { background-position: 0 -48px; } +.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } +.ui-icon-arrowthick-1-e { background-position: -32px -48px; } +.ui-icon-arrowthick-1-se { background-position: -48px -48px; } +.ui-icon-arrowthick-1-s { background-position: -64px -48px; } +.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } +.ui-icon-arrowthick-1-w { background-position: -96px -48px; } +.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } +.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } +.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } +.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } +.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } +.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } +.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } +.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } +.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } +.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } +.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } +.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } +.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } +.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } +.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } +.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } +.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } +.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } +.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } +.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } +.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } +.ui-icon-arrow-4 { background-position: 0 -80px; } +.ui-icon-arrow-4-diag { background-position: -16px -80px; } +.ui-icon-extlink { background-position: -32px -80px; } +.ui-icon-newwin { background-position: -48px -80px; } +.ui-icon-refresh { background-position: -64px -80px; } +.ui-icon-shuffle { background-position: -80px -80px; } +.ui-icon-transfer-e-w { background-position: -96px -80px; } +.ui-icon-transferthick-e-w { background-position: -112px -80px; } +.ui-icon-folder-collapsed { background-position: 0 -96px; } +.ui-icon-folder-open { background-position: -16px -96px; } +.ui-icon-document { background-position: -32px -96px; } +.ui-icon-document-b { background-position: -48px -96px; } +.ui-icon-note { background-position: -64px -96px; } +.ui-icon-mail-closed { background-position: -80px -96px; } +.ui-icon-mail-open { background-position: -96px -96px; } +.ui-icon-suitcase { background-position: -112px -96px; } +.ui-icon-comment { background-position: -128px -96px; } +.ui-icon-person { background-position: -144px -96px; } +.ui-icon-print { background-position: -160px -96px; } +.ui-icon-trash { background-position: -176px -96px; } +.ui-icon-locked { background-position: -192px -96px; } +.ui-icon-unlocked { background-position: -208px -96px; } +.ui-icon-bookmark { background-position: -224px -96px; } +.ui-icon-tag { background-position: -240px -96px; } +.ui-icon-home { background-position: 0 -112px; } +.ui-icon-flag { background-position: -16px -112px; } +.ui-icon-calendar { background-position: -32px -112px; } +.ui-icon-cart { background-position: -48px -112px; } +.ui-icon-pencil { background-position: -64px -112px; } +.ui-icon-clock { background-position: -80px -112px; } +.ui-icon-disk { background-position: -96px -112px; } +.ui-icon-calculator { background-position: -112px -112px; } +.ui-icon-zoomin { background-position: -128px -112px; } +.ui-icon-zoomout { background-position: -144px -112px; } +.ui-icon-search { background-position: -160px -112px; } +.ui-icon-wrench { background-position: -176px -112px; } +.ui-icon-gear { background-position: -192px -112px; } +.ui-icon-heart { background-position: -208px -112px; } +.ui-icon-star { background-position: -224px -112px; } +.ui-icon-link { background-position: -240px -112px; } +.ui-icon-cancel { background-position: 0 -128px; } +.ui-icon-plus { background-position: -16px -128px; } +.ui-icon-plusthick { background-position: -32px -128px; } +.ui-icon-minus { background-position: -48px -128px; } +.ui-icon-minusthick { background-position: -64px -128px; } +.ui-icon-close { background-position: -80px -128px; } +.ui-icon-closethick { background-position: -96px -128px; } +.ui-icon-key { background-position: -112px -128px; } +.ui-icon-lightbulb { background-position: -128px -128px; } +.ui-icon-scissors { background-position: -144px -128px; } +.ui-icon-clipboard { background-position: -160px -128px; } +.ui-icon-copy { background-position: -176px -128px; } +.ui-icon-contact { background-position: -192px -128px; } +.ui-icon-image { background-position: -208px -128px; } +.ui-icon-video { background-position: -224px -128px; } +.ui-icon-script { background-position: -240px -128px; } +.ui-icon-alert { background-position: 0 -144px; } +.ui-icon-info { background-position: -16px -144px; } +.ui-icon-notice { background-position: -32px -144px; } +.ui-icon-help { background-position: -48px -144px; } +.ui-icon-check { background-position: -64px -144px; } +.ui-icon-bullet { background-position: -80px -144px; } +.ui-icon-radio-on { background-position: -96px -144px; } +.ui-icon-radio-off { background-position: -112px -144px; } +.ui-icon-pin-w { background-position: -128px -144px; } +.ui-icon-pin-s { background-position: -144px -144px; } +.ui-icon-play { background-position: 0 -160px; } +.ui-icon-pause { background-position: -16px -160px; } +.ui-icon-seek-next { background-position: -32px -160px; } +.ui-icon-seek-prev { background-position: -48px -160px; } +.ui-icon-seek-end { background-position: -64px -160px; } +.ui-icon-seek-start { background-position: -80px -160px; } +/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ +.ui-icon-seek-first { background-position: -80px -160px; } +.ui-icon-stop { background-position: -96px -160px; } +.ui-icon-eject { background-position: -112px -160px; } +.ui-icon-volume-off { background-position: -128px -160px; } +.ui-icon-volume-on { background-position: -144px -160px; } +.ui-icon-power { background-position: 0 -176px; } +.ui-icon-signal-diag { background-position: -16px -176px; } +.ui-icon-signal { background-position: -32px -176px; } +.ui-icon-battery-0 { background-position: -48px -176px; } +.ui-icon-battery-1 { background-position: -64px -176px; } +.ui-icon-battery-2 { background-position: -80px -176px; } +.ui-icon-battery-3 { background-position: -96px -176px; } +.ui-icon-circle-plus { background-position: 0 -192px; } +.ui-icon-circle-minus { background-position: -16px -192px; } +.ui-icon-circle-close { background-position: -32px -192px; } +.ui-icon-circle-triangle-e { background-position: -48px -192px; } +.ui-icon-circle-triangle-s { background-position: -64px -192px; } +.ui-icon-circle-triangle-w { background-position: -80px -192px; } +.ui-icon-circle-triangle-n { background-position: -96px -192px; } +.ui-icon-circle-arrow-e { background-position: -112px -192px; } +.ui-icon-circle-arrow-s { background-position: -128px -192px; } +.ui-icon-circle-arrow-w { background-position: -144px -192px; } +.ui-icon-circle-arrow-n { background-position: -160px -192px; } +.ui-icon-circle-zoomin { background-position: -176px -192px; } +.ui-icon-circle-zoomout { background-position: -192px -192px; } +.ui-icon-circle-check { background-position: -208px -192px; } +.ui-icon-circlesmall-plus { background-position: 0 -208px; } +.ui-icon-circlesmall-minus { background-position: -16px -208px; } +.ui-icon-circlesmall-close { background-position: -32px -208px; } +.ui-icon-squaresmall-plus { background-position: -48px -208px; } +.ui-icon-squaresmall-minus { background-position: -64px -208px; } +.ui-icon-squaresmall-close { background-position: -80px -208px; } +.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } +.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } +.ui-icon-grip-solid-vertical { background-position: -32px -224px; } +.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } +.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } +.ui-icon-grip-diagonal-se { background-position: -80px -224px; } + + +/* Misc visuals +----------------------------------*/ + +/* Corner radius */ +.ui-corner-all, +.ui-corner-top, +.ui-corner-left, +.ui-corner-tl { + border-top-left-radius: 4px; +} +.ui-corner-all, +.ui-corner-top, +.ui-corner-right, +.ui-corner-tr { + border-top-right-radius: 4px; +} +.ui-corner-all, +.ui-corner-bottom, +.ui-corner-left, +.ui-corner-bl { + border-bottom-left-radius: 4px; +} +.ui-corner-all, +.ui-corner-bottom, +.ui-corner-right, +.ui-corner-br { + border-bottom-right-radius: 4px; +} + +/* Overlays */ +.ui-widget-overlay { + background: #666666 url("images/ui-bg_diagonals-thick_20_666666_40x40.png") 50% 50% repeat; + opacity: .5; + filter: Alpha(Opacity=50); /* support: IE8 */ +} +.ui-widget-shadow { + margin: -5px 0 0 -5px; + padding: 5px; + background: #000000 url("images/ui-bg_flat_10_000000_40x100.png") 50% 50% repeat-x; + opacity: .2; + filter: Alpha(Opacity=20); /* support: IE8 */ + border-radius: 5px; +} diff --git a/branch/4.04/jquery-ui-1.11.4.custom/jquery-ui.theme.min.css b/branch/4.04/jquery-ui-1.11.4.custom/jquery-ui.theme.min.css new file mode 100644 index 0000000000000000000000000000000000000000..d2b9e558a97ca6867fa7236b09afac2987ea8b08 --- /dev/null +++ b/branch/4.04/jquery-ui-1.11.4.custom/jquery-ui.theme.min.css @@ -0,0 +1,5 @@ +/*! jQuery UI - v1.11.4 - 2015-05-12 +* http://jqueryui.com +* Copyright 2015 jQuery Foundation and other contributors; Licensed MIT */ + +.ui-widget{font-family:Trebuchet MS,Tahoma,Verdana,Arial,sans-serif;font-size:1.1em}.ui-widget .ui-widget{font-size:1em}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:Trebuchet MS,Tahoma,Verdana,Arial,sans-serif;font-size:1em}.ui-widget-content{border:1px solid #ddd;background:#eee url("images/ui-bg_highlight-soft_100_eeeeee_1x100.png") 50% top repeat-x;color:#333}.ui-widget-content a{color:#333}.ui-widget-header{border:1px solid #e78f08;background:#f6a828 url("images/ui-bg_gloss-wave_35_f6a828_500x100.png") 50% 50% repeat-x;color:#fff;font-weight:bold}.ui-widget-header a{color:#fff}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default{border:1px solid #ccc;background:#f6f6f6 url("images/ui-bg_glass_100_f6f6f6_1x400.png") 50% 50% repeat-x;font-weight:bold;color:#1c94c4}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited{color:#1c94c4;text-decoration:none}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus{border:1px solid #fbcb09;background:#fdf5ce url("images/ui-bg_glass_100_fdf5ce_1x400.png") 50% 50% repeat-x;font-weight:bold;color:#c77405}.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited,.ui-state-focus a,.ui-state-focus a:hover,.ui-state-focus a:link,.ui-state-focus a:visited{color:#c77405;text-decoration:none}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active{border:1px solid #fbd850;background:#fff url("images/ui-bg_glass_65_ffffff_1x400.png") 50% 50% repeat-x;font-weight:bold;color:#eb8f00}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#eb8f00;text-decoration:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #fed22f;background:#ffe45c url("images/ui-bg_highlight-soft_75_ffe45c_1x100.png") 50% top repeat-x;color:#363636}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#363636}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #cd0a0a;background:#b81900 url("images/ui-bg_diagonals-thick_18_b81900_40x40.png") 50% 50% repeat;color:#fff}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#fff}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#fff}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:bold}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:normal}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none}.ui-state-disabled .ui-icon{filter:Alpha(Opacity=35)}.ui-icon{width:16px;height:16px}.ui-icon,.ui-widget-content .ui-icon{background-image:url("images/ui-icons_222222_256x240.png")}.ui-widget-header .ui-icon{background-image:url("images/ui-icons_ffffff_256x240.png")}.ui-state-default .ui-icon{background-image:url("images/ui-icons_ef8c08_256x240.png")}.ui-state-hover .ui-icon,.ui-state-focus .ui-icon{background-image:url("images/ui-icons_ef8c08_256x240.png")}.ui-state-active .ui-icon{background-image:url("images/ui-icons_ef8c08_256x240.png")}.ui-state-highlight .ui-icon{background-image:url("images/ui-icons_228ef1_256x240.png")}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url("images/ui-icons_ffd27a_256x240.png")}.ui-icon-blank{background-position:16px 16px}.ui-icon-carat-1-n{background-position:0 0}.ui-icon-carat-1-ne{background-position:-16px 0}.ui-icon-carat-1-e{background-position:-32px 0}.ui-icon-carat-1-se{background-position:-48px 0}.ui-icon-carat-1-s{background-position:-64px 0}.ui-icon-carat-1-sw{background-position:-80px 0}.ui-icon-carat-1-w{background-position:-96px 0}.ui-icon-carat-1-nw{background-position:-112px 0}.ui-icon-carat-2-n-s{background-position:-128px 0}.ui-icon-carat-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:0 -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-64px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:0 -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-64px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:0 -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:0 -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:0 -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:0 -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:0 -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:0 -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:0 -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-on{background-position:-96px -144px}.ui-icon-radio-off{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:0 -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-seek-first{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:0 -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:0 -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:0 -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:0 -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-top,.ui-corner-left,.ui-corner-tl{border-top-left-radius:4px}.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr{border-top-right-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl{border-bottom-left-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br{border-bottom-right-radius:4px}.ui-widget-overlay{background:#666 url("images/ui-bg_diagonals-thick_20_666666_40x40.png") 50% 50% repeat;opacity:.5;filter:Alpha(Opacity=50)}.ui-widget-shadow{margin:-5px 0 0 -5px;padding:5px;background:#000 url("images/ui-bg_flat_10_000000_40x100.png") 50% 50% repeat-x;opacity:.2;filter:Alpha(Opacity=20);border-radius:5px} \ No newline at end of file diff --git a/branch/4.04/jquery_scroll/jquery.jscrollpane.css b/branch/4.04/jquery_scroll/jquery.jscrollpane.css new file mode 100644 index 0000000000000000000000000000000000000000..57ccca25316d53a0cd86826be79b509da349be24 --- /dev/null +++ b/branch/4.04/jquery_scroll/jquery.jscrollpane.css @@ -0,0 +1,115 @@ +/* + * CSS Styles that are needed by jScrollPane for it to operate correctly. + * + * Include this stylesheet in your site or copy and paste the styles below into your stylesheet - jScrollPane + * may not operate correctly without them. + */ + +.jspContainer +{ + overflow: hidden; + position: relative; +} + +.jspPane +{ + position: absolute; +} + +.jspVerticalBar +{ + position: absolute; + top: 0; + right: 0; + width: 16px; + height: 100%; + background: red; +} + +.jspHorizontalBar +{ + position: absolute; + bottom: 0; + left: 0; + width: 100%; + height: 16px; + background: red; +} + +.jspCap +{ + display: none; +} + +.jspHorizontalBar .jspCap +{ + float: left; +} + +.jspTrack +{ + background: #dde; + position: relative; +} + +.jspDrag +{ + background: #bbd; + position: relative; + top: 0; + left: 0; + cursor: pointer; +} + +.jspHorizontalBar .jspTrack, +.jspHorizontalBar .jspDrag +{ + float: left; + height: 100%; +} + +.jspArrow +{ + background: #50506d; + text-indent: -20000px; + display: block; + cursor: pointer; + padding: 0; + margin: 0; +} + +.jspArrow.jspDisabled +{ + cursor: default; + background: #80808d; +} + +.jspVerticalBar .jspArrow +{ + height: 16px; +} + +.jspHorizontalBar .jspArrow +{ + width: 16px; + float: left; + height: 100%; +} + +.jspVerticalBar .jspArrow:focus +{ + outline: none; +} + +.jspCorner +{ + background: #eeeef4; + float: left; + height: 100%; +} + +/* Yuk! CSS Hack for IE6 3 pixel bug :( */ +* html .jspCorner +{ + margin: 0 -3px 0 0; +} \ No newline at end of file diff --git a/branch/4.04/jquery_scroll/jquery.jscrollpane.min.js b/branch/4.04/jquery_scroll/jquery.jscrollpane.min.js new file mode 100644 index 0000000000000000000000000000000000000000..57d2945fcaab4bf82fa72c259093d3a95e145fb4 --- /dev/null +++ b/branch/4.04/jquery_scroll/jquery.jscrollpane.min.js @@ -0,0 +1,8 @@ +/*! + * jScrollPane - v2.0.22 - 2015-04-25 + * http://jscrollpane.kelvinluck.com/ + * + * Copyright (c) 2014 Kelvin Luck + * Dual licensed under the MIT or GPL licenses. + */ +!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){a.fn.jScrollPane=function(b){function c(b,c){function d(c){var f,h,j,k,l,o,p=!1,q=!1;if(N=c,void 0===O)l=b.scrollTop(),o=b.scrollLeft(),b.css({overflow:"hidden",padding:0}),P=b.innerWidth()+ra,Q=b.innerHeight(),b.width(P),O=a('<div class="jspPane" />').css("padding",qa).append(b.children()),R=a('<div class="jspContainer" />').css({width:P+"px",height:Q+"px"}).append(O).appendTo(b);else{if(b.css("width",""),p=N.stickToBottom&&A(),q=N.stickToRight&&B(),k=b.innerWidth()+ra!=P||b.outerHeight()!=Q,k&&(P=b.innerWidth()+ra,Q=b.innerHeight(),R.css({width:P+"px",height:Q+"px"})),!k&&sa==S&&O.outerHeight()==T)return void b.width(P);sa=S,O.css("width",""),b.width(P),R.find(">.jspVerticalBar,>.jspHorizontalBar").remove().end()}O.css("overflow","auto"),S=c.contentWidth?c.contentWidth:O[0].scrollWidth,T=O[0].scrollHeight,O.css("overflow",""),U=S/P,V=T/Q,W=V>1,X=U>1,X||W?(b.addClass("jspScrollable"),f=N.maintainPosition&&($||ba),f&&(h=y(),j=z()),e(),g(),i(),f&&(w(q?S-P:h,!1),v(p?T-Q:j,!1)),F(),C(),L(),N.enableKeyboardNavigation&&H(),N.clickOnTrack&&m(),J(),N.hijackInternalLinks&&K()):(b.removeClass("jspScrollable"),O.css({top:0,left:0,width:R.width()-ra}),D(),G(),I(),n()),N.autoReinitialise&&!pa?pa=setInterval(function(){d(N)},N.autoReinitialiseDelay):!N.autoReinitialise&&pa&&clearInterval(pa),l&&b.scrollTop(0)&&v(l,!1),o&&b.scrollLeft(0)&&w(o,!1),b.trigger("jsp-initialised",[X||W])}function e(){W&&(R.append(a('<div class="jspVerticalBar" />').append(a('<div class="jspCap jspCapTop" />'),a('<div class="jspTrack" />').append(a('<div class="jspDrag" />').append(a('<div class="jspDragTop" />'),a('<div class="jspDragBottom" />'))),a('<div class="jspCap jspCapBottom" />'))),ca=R.find(">.jspVerticalBar"),da=ca.find(">.jspTrack"),Y=da.find(">.jspDrag"),N.showArrows&&(ha=a('<a class="jspArrow jspArrowUp" />').bind("mousedown.jsp",k(0,-1)).bind("click.jsp",E),ia=a('<a class="jspArrow jspArrowDown" />').bind("mousedown.jsp",k(0,1)).bind("click.jsp",E),N.arrowScrollOnHover&&(ha.bind("mouseover.jsp",k(0,-1,ha)),ia.bind("mouseover.jsp",k(0,1,ia))),j(da,N.verticalArrowPositions,ha,ia)),fa=Q,R.find(">.jspVerticalBar>.jspCap:visible,>.jspVerticalBar>.jspArrow").each(function(){fa-=a(this).outerHeight()}),Y.hover(function(){Y.addClass("jspHover")},function(){Y.removeClass("jspHover")}).bind("mousedown.jsp",function(b){a("html").bind("dragstart.jsp selectstart.jsp",E),Y.addClass("jspActive");var c=b.pageY-Y.position().top;return a("html").bind("mousemove.jsp",function(a){p(a.pageY-c,!1)}).bind("mouseup.jsp mouseleave.jsp",o),!1}),f())}function f(){da.height(fa+"px"),$=0,ea=N.verticalGutter+da.outerWidth(),O.width(P-ea-ra);try{0===ca.position().left&&O.css("margin-left",ea+"px")}catch(a){}}function g(){X&&(R.append(a('<div class="jspHorizontalBar" />').append(a('<div class="jspCap jspCapLeft" />'),a('<div class="jspTrack" />').append(a('<div class="jspDrag" />').append(a('<div class="jspDragLeft" />'),a('<div class="jspDragRight" />'))),a('<div class="jspCap jspCapRight" />'))),ja=R.find(">.jspHorizontalBar"),ka=ja.find(">.jspTrack"),_=ka.find(">.jspDrag"),N.showArrows&&(na=a('<a class="jspArrow jspArrowLeft" />').bind("mousedown.jsp",k(-1,0)).bind("click.jsp",E),oa=a('<a class="jspArrow jspArrowRight" />').bind("mousedown.jsp",k(1,0)).bind("click.jsp",E),N.arrowScrollOnHover&&(na.bind("mouseover.jsp",k(-1,0,na)),oa.bind("mouseover.jsp",k(1,0,oa))),j(ka,N.horizontalArrowPositions,na,oa)),_.hover(function(){_.addClass("jspHover")},function(){_.removeClass("jspHover")}).bind("mousedown.jsp",function(b){a("html").bind("dragstart.jsp selectstart.jsp",E),_.addClass("jspActive");var c=b.pageX-_.position().left;return a("html").bind("mousemove.jsp",function(a){r(a.pageX-c,!1)}).bind("mouseup.jsp mouseleave.jsp",o),!1}),la=R.innerWidth(),h())}function h(){R.find(">.jspHorizontalBar>.jspCap:visible,>.jspHorizontalBar>.jspArrow").each(function(){la-=a(this).outerWidth()}),ka.width(la+"px"),ba=0}function i(){if(X&&W){var b=ka.outerHeight(),c=da.outerWidth();fa-=b,a(ja).find(">.jspCap:visible,>.jspArrow").each(function(){la+=a(this).outerWidth()}),la-=c,Q-=c,P-=b,ka.parent().append(a('<div class="jspCorner" />').css("width",b+"px")),f(),h()}X&&O.width(R.outerWidth()-ra+"px"),T=O.outerHeight(),V=T/Q,X&&(ma=Math.ceil(1/U*la),ma>N.horizontalDragMaxWidth?ma=N.horizontalDragMaxWidth:ma<N.horizontalDragMinWidth&&(ma=N.horizontalDragMinWidth),_.width(ma+"px"),aa=la-ma,s(ba)),W&&(ga=Math.ceil(1/V*fa),ga>N.verticalDragMaxHeight?ga=N.verticalDragMaxHeight:ga<N.verticalDragMinHeight&&(ga=N.verticalDragMinHeight),Y.height(ga+"px"),Z=fa-ga,q($))}function j(a,b,c,d){var e,f="before",g="after";"os"==b&&(b=/Mac/.test(navigator.platform)?"after":"split"),b==f?g=b:b==g&&(f=b,e=c,c=d,d=e),a[f](c)[g](d)}function k(a,b,c){return function(){return l(a,b,this,c),this.blur(),!1}}function l(b,c,d,e){d=a(d).addClass("jspActive");var f,g,h=!0,i=function(){0!==b&&ta.scrollByX(b*N.arrowButtonSpeed),0!==c&&ta.scrollByY(c*N.arrowButtonSpeed),g=setTimeout(i,h?N.initialDelay:N.arrowRepeatFreq),h=!1};i(),f=e?"mouseout.jsp":"mouseup.jsp",e=e||a("html"),e.bind(f,function(){d.removeClass("jspActive"),g&&clearTimeout(g),g=null,e.unbind(f)})}function m(){n(),W&&da.bind("mousedown.jsp",function(b){if(void 0===b.originalTarget||b.originalTarget==b.currentTarget){var c,d=a(this),e=d.offset(),f=b.pageY-e.top-$,g=!0,h=function(){var a=d.offset(),e=b.pageY-a.top-ga/2,j=Q*N.scrollPagePercent,k=Z*j/(T-Q);if(0>f)$-k>e?ta.scrollByY(-j):p(e);else{if(!(f>0))return void i();e>$+k?ta.scrollByY(j):p(e)}c=setTimeout(h,g?N.initialDelay:N.trackClickRepeatFreq),g=!1},i=function(){c&&clearTimeout(c),c=null,a(document).unbind("mouseup.jsp",i)};return h(),a(document).bind("mouseup.jsp",i),!1}}),X&&ka.bind("mousedown.jsp",function(b){if(void 0===b.originalTarget||b.originalTarget==b.currentTarget){var c,d=a(this),e=d.offset(),f=b.pageX-e.left-ba,g=!0,h=function(){var a=d.offset(),e=b.pageX-a.left-ma/2,j=P*N.scrollPagePercent,k=aa*j/(S-P);if(0>f)ba-k>e?ta.scrollByX(-j):r(e);else{if(!(f>0))return void i();e>ba+k?ta.scrollByX(j):r(e)}c=setTimeout(h,g?N.initialDelay:N.trackClickRepeatFreq),g=!1},i=function(){c&&clearTimeout(c),c=null,a(document).unbind("mouseup.jsp",i)};return h(),a(document).bind("mouseup.jsp",i),!1}})}function n(){ka&&ka.unbind("mousedown.jsp"),da&&da.unbind("mousedown.jsp")}function o(){a("html").unbind("dragstart.jsp selectstart.jsp mousemove.jsp mouseup.jsp mouseleave.jsp"),Y&&Y.removeClass("jspActive"),_&&_.removeClass("jspActive")}function p(a,b){W&&(0>a?a=0:a>Z&&(a=Z),void 0===b&&(b=N.animateScroll),b?ta.animate(Y,"top",a,q):(Y.css("top",a),q(a)))}function q(a){void 0===a&&(a=Y.position().top),R.scrollTop(0),$=a||0;var c=0===$,d=$==Z,e=a/Z,f=-e*(T-Q);(ua!=c||wa!=d)&&(ua=c,wa=d,b.trigger("jsp-arrow-change",[ua,wa,va,xa])),t(c,d),O.css("top",f),b.trigger("jsp-scroll-y",[-f,c,d]).trigger("scroll")}function r(a,b){X&&(0>a?a=0:a>aa&&(a=aa),void 0===b&&(b=N.animateScroll),b?ta.animate(_,"left",a,s):(_.css("left",a),s(a)))}function s(a){void 0===a&&(a=_.position().left),R.scrollTop(0),ba=a||0;var c=0===ba,d=ba==aa,e=a/aa,f=-e*(S-P);(va!=c||xa!=d)&&(va=c,xa=d,b.trigger("jsp-arrow-change",[ua,wa,va,xa])),u(c,d),O.css("left",f),b.trigger("jsp-scroll-x",[-f,c,d]).trigger("scroll")}function t(a,b){N.showArrows&&(ha[a?"addClass":"removeClass"]("jspDisabled"),ia[b?"addClass":"removeClass"]("jspDisabled"))}function u(a,b){N.showArrows&&(na[a?"addClass":"removeClass"]("jspDisabled"),oa[b?"addClass":"removeClass"]("jspDisabled"))}function v(a,b){var c=a/(T-Q);p(c*Z,b)}function w(a,b){var c=a/(S-P);r(c*aa,b)}function x(b,c,d){var e,f,g,h,i,j,k,l,m,n=0,o=0;try{e=a(b)}catch(p){return}for(f=e.outerHeight(),g=e.outerWidth(),R.scrollTop(0),R.scrollLeft(0);!e.is(".jspPane");)if(n+=e.position().top,o+=e.position().left,e=e.offsetParent(),/^body|html$/i.test(e[0].nodeName))return;h=z(),j=h+Q,h>n||c?l=n-N.horizontalGutter:n+f>j&&(l=n-Q+f+N.horizontalGutter),isNaN(l)||v(l,d),i=y(),k=i+P,i>o||c?m=o-N.horizontalGutter:o+g>k&&(m=o-P+g+N.horizontalGutter),isNaN(m)||w(m,d)}function y(){return-O.position().left}function z(){return-O.position().top}function A(){var a=T-Q;return a>20&&a-z()<10}function B(){var a=S-P;return a>20&&a-y()<10}function C(){R.unbind(za).bind(za,function(a,b,c,d){ba||(ba=0),$||($=0);var e=ba,f=$,g=a.deltaFactor||N.mouseWheelSpeed;return ta.scrollBy(c*g,-d*g,!1),e==ba&&f==$})}function D(){R.unbind(za)}function E(){return!1}function F(){O.find(":input,a").unbind("focus.jsp").bind("focus.jsp",function(a){x(a.target,!1)})}function G(){O.find(":input,a").unbind("focus.jsp")}function H(){function c(){var a=ba,b=$;switch(d){case 40:ta.scrollByY(N.keyboardSpeed,!1);break;case 38:ta.scrollByY(-N.keyboardSpeed,!1);break;case 34:case 32:ta.scrollByY(Q*N.scrollPagePercent,!1);break;case 33:ta.scrollByY(-Q*N.scrollPagePercent,!1);break;case 39:ta.scrollByX(N.keyboardSpeed,!1);break;case 37:ta.scrollByX(-N.keyboardSpeed,!1)}return e=a!=ba||b!=$}var d,e,f=[];X&&f.push(ja[0]),W&&f.push(ca[0]),O.bind("focus.jsp",function(){b.focus()}),b.attr("tabindex",0).unbind("keydown.jsp keypress.jsp").bind("keydown.jsp",function(b){if(b.target===this||f.length&&a(b.target).closest(f).length){var g=ba,h=$;switch(b.keyCode){case 40:case 38:case 34:case 32:case 33:case 39:case 37:d=b.keyCode,c();break;case 35:v(T-Q),d=null;break;case 36:v(0),d=null}return e=b.keyCode==d&&g!=ba||h!=$,!e}}).bind("keypress.jsp",function(a){return a.keyCode==d&&c(),!e}),N.hideFocus?(b.css("outline","none"),"hideFocus"in R[0]&&b.attr("hideFocus",!0)):(b.css("outline",""),"hideFocus"in R[0]&&b.attr("hideFocus",!1))}function I(){b.attr("tabindex","-1").removeAttr("tabindex").unbind("keydown.jsp keypress.jsp"),O.unbind(".jsp")}function J(){if(location.hash&&location.hash.length>1){var b,c,d=escape(location.hash.substr(1));try{b=a("#"+d+', a[name="'+d+'"]')}catch(e){return}b.length&&O.find(d)&&(0===R.scrollTop()?c=setInterval(function(){R.scrollTop()>0&&(x(b,!0),a(document).scrollTop(R.position().top),clearInterval(c))},50):(x(b,!0),a(document).scrollTop(R.position().top)))}}function K(){a(document.body).data("jspHijack")||(a(document.body).data("jspHijack",!0),a(document.body).delegate("a[href*=#]","click",function(b){var c,d,e,f,g,h,i=this.href.substr(0,this.href.indexOf("#")),j=location.href;if(-1!==location.href.indexOf("#")&&(j=location.href.substr(0,location.href.indexOf("#"))),i===j){c=escape(this.href.substr(this.href.indexOf("#")+1));try{d=a("#"+c+', a[name="'+c+'"]')}catch(k){return}d.length&&(e=d.closest(".jspScrollable"),f=e.data("jsp"),f.scrollToElement(d,!0),e[0].scrollIntoView&&(g=a(window).scrollTop(),h=d.offset().top,(g>h||h>g+a(window).height())&&e[0].scrollIntoView()),b.preventDefault())}}))}function L(){var a,b,c,d,e,f=!1;R.unbind("touchstart.jsp touchmove.jsp touchend.jsp click.jsp-touchclick").bind("touchstart.jsp",function(g){var h=g.originalEvent.touches[0];a=y(),b=z(),c=h.pageX,d=h.pageY,e=!1,f=!0}).bind("touchmove.jsp",function(g){if(f){var h=g.originalEvent.touches[0],i=ba,j=$;return ta.scrollTo(a+c-h.pageX,b+d-h.pageY),e=e||Math.abs(c-h.pageX)>5||Math.abs(d-h.pageY)>5,i==ba&&j==$}}).bind("touchend.jsp",function(a){f=!1}).bind("click.jsp-touchclick",function(a){return e?(e=!1,!1):void 0})}function M(){var a=z(),c=y();b.removeClass("jspScrollable").unbind(".jsp"),O.unbind(".jsp"),b.replaceWith(ya.append(O.children())),ya.scrollTop(a),ya.scrollLeft(c),pa&&clearInterval(pa)}var N,O,P,Q,R,S,T,U,V,W,X,Y,Z,$,_,aa,ba,ca,da,ea,fa,ga,ha,ia,ja,ka,la,ma,na,oa,pa,qa,ra,sa,ta=this,ua=!0,va=!0,wa=!1,xa=!1,ya=b.clone(!1,!1).empty(),za=a.fn.mwheelIntent?"mwheelIntent.jsp":"mousewheel.jsp";"border-box"===b.css("box-sizing")?(qa=0,ra=0):(qa=b.css("paddingTop")+" "+b.css("paddingRight")+" "+b.css("paddingBottom")+" "+b.css("paddingLeft"),ra=(parseInt(b.css("paddingLeft"),10)||0)+(parseInt(b.css("paddingRight"),10)||0)),a.extend(ta,{reinitialise:function(b){b=a.extend({},N,b),d(b)},scrollToElement:function(a,b,c){x(a,b,c)},scrollTo:function(a,b,c){w(a,c),v(b,c)},scrollToX:function(a,b){w(a,b)},scrollToY:function(a,b){v(a,b)},scrollToPercentX:function(a,b){w(a*(S-P),b)},scrollToPercentY:function(a,b){v(a*(T-Q),b)},scrollBy:function(a,b,c){ta.scrollByX(a,c),ta.scrollByY(b,c)},scrollByX:function(a,b){var c=y()+Math[0>a?"floor":"ceil"](a),d=c/(S-P);r(d*aa,b)},scrollByY:function(a,b){var c=z()+Math[0>a?"floor":"ceil"](a),d=c/(T-Q);p(d*Z,b)},positionDragX:function(a,b){r(a,b)},positionDragY:function(a,b){p(a,b)},animate:function(a,b,c,d){var e={};e[b]=c,a.animate(e,{duration:N.animateDuration,easing:N.animateEase,queue:!1,step:d})},getContentPositionX:function(){return y()},getContentPositionY:function(){return z()},getContentWidth:function(){return S},getContentHeight:function(){return T},getPercentScrolledX:function(){return y()/(S-P)},getPercentScrolledY:function(){return z()/(T-Q)},getIsScrollableH:function(){return X},getIsScrollableV:function(){return W},getContentPane:function(){return O},scrollToBottom:function(a){p(Z,a)},hijackInternalLinks:a.noop,destroy:function(){M()}}),d(c)}return b=a.extend({},a.fn.jScrollPane.defaults,b),a.each(["arrowButtonSpeed","trackClickSpeed","keyboardSpeed"],function(){b[this]=b[this]||b.speed}),this.each(function(){var d=a(this),e=d.data("jsp");e?e.reinitialise(b):(a("script",d).filter('[type="text/javascript"],:not([type])').remove(),e=new c(d,b),d.data("jsp",e))})},a.fn.jScrollPane.defaults={showArrows:!1,maintainPosition:!0,stickToBottom:!1,stickToRight:!1,clickOnTrack:!0,autoReinitialise:!1,autoReinitialiseDelay:500,verticalDragMinHeight:0,verticalDragMaxHeight:99999,horizontalDragMinWidth:0,horizontalDragMaxWidth:99999,contentWidth:void 0,animateScroll:!1,animateDuration:300,animateEase:"linear",hijackInternalLinks:!1,verticalGutter:4,horizontalGutter:4,mouseWheelSpeed:3,arrowButtonSpeed:0,arrowRepeatFreq:50,arrowScrollOnHover:!1,trackClickSpeed:0,trackClickRepeatFreq:70,verticalArrowPositions:"split",horizontalArrowPositions:"split",enableKeyboardNavigation:!0,hideFocus:!1,keyboardSpeed:0,initialDelay:300,speed:30,scrollPagePercent:.8}}); \ No newline at end of file diff --git a/branch/4.04/jquery_scroll/jquery.mousewheel.js b/branch/4.04/jquery_scroll/jquery.mousewheel.js new file mode 100644 index 0000000000000000000000000000000000000000..bf61ad0e1621209d8cbb5c5d0761bda78ad0ea15 --- /dev/null +++ b/branch/4.04/jquery_scroll/jquery.mousewheel.js @@ -0,0 +1,221 @@ +/*! + * jQuery Mousewheel 3.1.12 + * + * Copyright 2014 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +(function (factory) { + if ( typeof define === 'function' && define.amd ) { + // AMD. Register as an anonymous module. + define(['jquery'], factory); + } else if (typeof exports === 'object') { + // Node/CommonJS style for Browserify + module.exports = factory; + } else { + // Browser globals + factory(jQuery); + } +}(function ($) { + + var toFix = ['wheel', 'mousewheel', 'DOMMouseScroll', 'MozMousePixelScroll'], + toBind = ( 'onwheel' in document || document.documentMode >= 9 ) ? + ['wheel'] : ['mousewheel', 'DomMouseScroll', 'MozMousePixelScroll'], + slice = Array.prototype.slice, + nullLowestDeltaTimeout, lowestDelta; + + if ( $.event.fixHooks ) { + for ( var i = toFix.length; i; ) { + $.event.fixHooks[ toFix[--i] ] = $.event.mouseHooks; + } + } + + var special = $.event.special.mousewheel = { + version: '3.1.12', + + setup: function() { + if ( this.addEventListener ) { + for ( var i = toBind.length; i; ) { + this.addEventListener( toBind[--i], handler, false ); + } + } else { + this.onmousewheel = handler; + } + // Store the line height and page height for this particular element + $.data(this, 'mousewheel-line-height', special.getLineHeight(this)); + $.data(this, 'mousewheel-page-height', special.getPageHeight(this)); + }, + + teardown: function() { + if ( this.removeEventListener ) { + for ( var i = toBind.length; i; ) { + this.removeEventListener( toBind[--i], handler, false ); + } + } else { + this.onmousewheel = null; + } + // Clean up the data we added to the element + $.removeData(this, 'mousewheel-line-height'); + $.removeData(this, 'mousewheel-page-height'); + }, + + getLineHeight: function(elem) { + var $elem = $(elem), + $parent = $elem['offsetParent' in $.fn ? 'offsetParent' : 'parent'](); + if (!$parent.length) { + $parent = $('body'); + } + return parseInt($parent.css('fontSize'), 10) || parseInt($elem.css('fontSize'), 10) || 16; + }, + + getPageHeight: function(elem) { + return $(elem).height(); + }, + + settings: { + adjustOldDeltas: true, // see shouldAdjustOldDeltas() below + normalizeOffset: true // calls getBoundingClientRect for each event + } + }; + + $.fn.extend({ + mousewheel: function(fn) { + return fn ? this.bind('mousewheel', fn) : this.trigger('mousewheel'); + }, + + unmousewheel: function(fn) { + return this.unbind('mousewheel', fn); + } + }); + + + function handler(event) { + var orgEvent = event || window.event, + args = slice.call(arguments, 1), + delta = 0, + deltaX = 0, + deltaY = 0, + absDelta = 0, + offsetX = 0, + offsetY = 0; + event = $.event.fix(orgEvent); + event.type = 'mousewheel'; + + // Old school scrollwheel delta + if ( 'detail' in orgEvent ) { deltaY = orgEvent.detail * -1; } + if ( 'wheelDelta' in orgEvent ) { deltaY = orgEvent.wheelDelta; } + if ( 'wheelDeltaY' in orgEvent ) { deltaY = orgEvent.wheelDeltaY; } + if ( 'wheelDeltaX' in orgEvent ) { deltaX = orgEvent.wheelDeltaX * -1; } + + // Firefox < 17 horizontal scrolling related to DOMMouseScroll event + if ( 'axis' in orgEvent && orgEvent.axis === orgEvent.HORIZONTAL_AXIS ) { + deltaX = deltaY * -1; + deltaY = 0; + } + + // Set delta to be deltaY or deltaX if deltaY is 0 for backwards compatabilitiy + delta = deltaY === 0 ? deltaX : deltaY; + + // New school wheel delta (wheel event) + if ( 'deltaY' in orgEvent ) { + deltaY = orgEvent.deltaY * -1; + delta = deltaY; + } + if ( 'deltaX' in orgEvent ) { + deltaX = orgEvent.deltaX; + if ( deltaY === 0 ) { delta = deltaX * -1; } + } + + // No change actually happened, no reason to go any further + if ( deltaY === 0 && deltaX === 0 ) { return; } + + // Need to convert lines and pages to pixels if we aren't already in pixels + // There are three delta modes: + // * deltaMode 0 is by pixels, nothing to do + // * deltaMode 1 is by lines + // * deltaMode 2 is by pages + if ( orgEvent.deltaMode === 1 ) { + var lineHeight = $.data(this, 'mousewheel-line-height'); + delta *= lineHeight; + deltaY *= lineHeight; + deltaX *= lineHeight; + } else if ( orgEvent.deltaMode === 2 ) { + var pageHeight = $.data(this, 'mousewheel-page-height'); + delta *= pageHeight; + deltaY *= pageHeight; + deltaX *= pageHeight; + } + + // Store lowest absolute delta to normalize the delta values + absDelta = Math.max( Math.abs(deltaY), Math.abs(deltaX) ); + + if ( !lowestDelta || absDelta < lowestDelta ) { + lowestDelta = absDelta; + + // Adjust older deltas if necessary + if ( shouldAdjustOldDeltas(orgEvent, absDelta) ) { + lowestDelta /= 40; + } + } + + // Adjust older deltas if necessary + if ( shouldAdjustOldDeltas(orgEvent, absDelta) ) { + // Divide all the things by 40! + delta /= 40; + deltaX /= 40; + deltaY /= 40; + } + + // Get a whole, normalized value for the deltas + delta = Math[ delta >= 1 ? 'floor' : 'ceil' ](delta / lowestDelta); + deltaX = Math[ deltaX >= 1 ? 'floor' : 'ceil' ](deltaX / lowestDelta); + deltaY = Math[ deltaY >= 1 ? 'floor' : 'ceil' ](deltaY / lowestDelta); + + // Normalise offsetX and offsetY properties + if ( special.settings.normalizeOffset && this.getBoundingClientRect ) { + var boundingRect = this.getBoundingClientRect(); + offsetX = event.clientX - boundingRect.left; + offsetY = event.clientY - boundingRect.top; + } + + // Add information to the event object + event.deltaX = deltaX; + event.deltaY = deltaY; + event.deltaFactor = lowestDelta; + event.offsetX = offsetX; + event.offsetY = offsetY; + // Go ahead and set deltaMode to 0 since we converted to pixels + // Although this is a little odd since we overwrite the deltaX/Y + // properties with normalized deltas. + event.deltaMode = 0; + + // Add event and delta to the front of the arguments + args.unshift(event, delta, deltaX, deltaY); + + // Clearout lowestDelta after sometime to better + // handle multiple device types that give different + // a different lowestDelta + // Ex: trackpad = 3 and mouse wheel = 120 + if (nullLowestDeltaTimeout) { clearTimeout(nullLowestDeltaTimeout); } + nullLowestDeltaTimeout = setTimeout(nullLowestDelta, 200); + + return ($.event.dispatch || $.event.handle).apply(this, args); + } + + function nullLowestDelta() { + lowestDelta = null; + } + + function shouldAdjustOldDeltas(orgEvent, absDelta) { + // If this is an older event and the delta is divisable by 120, + // then we are assuming that the browser is treating this as an + // older mouse wheel event and that we should divide the deltas + // by 40 to try and get a more usable deltaFactor. + // Side note, this actually impacts the reported scroll distance + // in older browsers and can cause scrolling to be slower than native. + // Turn this off by setting $.event.special.mousewheel.settings.adjustOldDeltas to false. + return special.settings.adjustOldDeltas && orgEvent.type === 'mousewheel' && absDelta % 120 === 0; + } + +})); diff --git a/branch/4.04/jsref/assembly.js b/branch/4.04/jsref/assembly.js new file mode 100644 index 0000000000000000000000000000000000000000..957a6b3e264cc4543d807a81d514e43fb62a8d09 --- /dev/null +++ b/branch/4.04/jsref/assembly.js @@ -0,0 +1,33818 @@ + +/* --------------------- ../generator/stdlib_ml/stdlib.js --------------------- */ + +// JS implementations for OCaml's Pervasives library +// See stdlib.mli for documentation + +// Infix operators are converted to equivalent JS in +// js_of_ast.ml#js_of_path_longident + +//---------------------------------------------------------------------------- +// Js_of_ocaml bis Generator Requirements + +// Implementation for the OCaml syntax `{ einit with lbl = exp }` +function record_with(einit, lbl, exp) { + var res = {}; + for (var i in einit) { + res[i] = einit[i]; + } + res[lbl] = exp; + return res; +} + +// type option 'a = None | Some of 'a +var None = function() { + return { /*type: "option",*/ tag: "None" }; +}; + +var Some = function(value) { + return { /*type: "option",*/ tag: "Some", value: value }; +}; + +// type list 'a = [] | :: of 'a * list 'a +var mk_nil = function() { + return { /*type: "list",*/ tag: "[]" }; +}; + +var mk_cons = function(head, tail) { + return { /*type: "list",*/ tag: "::", head: head, tail: tail }; +}; + +//---------------------------------------------------------------------------- +// Exceptions + +// val raise : exn -> 'a +var raise = function(x) { throw "Not_found"; }; + +//---------------------------------------------------------------------------- +// Boolean operations + +// val not : bool -> bool +var not = function(x) { return !x; }; + +// val ( && ) : bool -> bool -> bool +// val ( || ) : bool -> bool -> bool +// Operators mapped directly to JS equivalent + +//---------------------------------------------------------------------------- +// Deugging + +// val __LOC__ : string +var __LOC__ = "___LOC___" + +//---------------------------------------------------------------------------- +// Integer Arithmetic + +// val ( + ) : int -> int -> int +// val ( - ) : int -> int -> int +// val ( * ) : int -> int -> int +// val ( / ) : int -> int -> int +// Operators mapped directly to JS equivalent + +//---------------------------------------------------------------------------- +// Floating-point Arithmetic + +// val ( +. ) : float -> float -> float +// val ( -. ) : float -> float -> float +// val ( *. ) : float -> float -> float +// val ( /. ) : float -> float -> float +// Operators mapped to JS equivalent by removing . + +//---------------------------------------------------------------------------- +//---------------------------------------------------------------------------- + +// Pervasives-incompatible functions + +// Infix operators are converted to equivalent JS in +// js_of_ast.ml#js_of_path_longident + +//---------------------------------------------------------------------------- +// Comparisons + +// val ( = ) : float -> float -> bool +// Mapped to == + +// val ( < ) : float -> float -> bool +// val ( > ) : float -> float -> bool +// val ( <= ) : float -> float -> bool +// val ( >= ) : float -> float -> bool +// Operators mapped directly to JS equivalent + +/* +// val compare : 'a -> 'a -> int +// val min : float -> float -> float +// val max : float -> float -> float +*/ + +// val ( === ) : 'a -> 'a -> bool + +/* +// val float_compare : float -> float -> int +*/ + +// val int_eq : int -> int -> bool +var int_eq = function(x, y) { return x === y; }; + +// val int_lt : int -> int -> bool +var int_lt = function(x, y) { return x < y; }; + +// val int_gt : int -> int -> bool +var int_gt = function(x, y) { return x > y; }; + +// val int_le : int -> int -> bool +var int_le = function(x, y) { return x <= y; }; + +// val int_ge : int -> int -> bool +var int_ge = function(x, y) { return x >= y; }; + +// val int_compare : int -> int -> int +var int_compare = function(x, y) { return x - y; }; + +// val bool_eq : bool -> bool -> bool +var bool_eq = function(x, y) { return x === y; }; + +// val nat_eq : int -> int -> bool (* nat_eq x y = int_eq x y *) +var nat_eq = function(x, y) { return x === y; }; + +// val string_eq : string -> string -> bool (* === *) +var string_eq = function(x, y) { + if (typeof(x) != "string" || typeof(y) != "string") + throw "string_eq invalid arguments"; + return x === y; +}; + +// val string_lt : string -> string -> bool +var string_lt = function(x, y) { + if (typeof(x) != "string" || typeof(y) != "string") + throw "string_lt invalid arguments"; + return x < y; +}; + +// val string_compare : string -> string -> int +var string_compare = function(x, y) { + return x.localeCompare(y); +}; + +//---------------------------------------------------------------------------- +// Floating-point arithmetic + +/* Functions renamed: +// val fmod : float -> float -> float (* mod_float, implemented as % operator in JS *) +// val float_neg : float -> float (* ~-. *) +// val float_exp : float -> float -> float (* exp *) +*/ + +// Alan: Ideally we would add these to the spec, but for the moment conversion +// to a string is doing a foo+"", and conversion to an int is doing +foo +// val int_of_number : float -> int (* will be removed, since only used by substring *) +var int_of_number = function(x) { return x; }; + +// val number_of_int : int -> float (* = fun x -> float_of_int x *) +var number_of_int = function(x) { return x; }; + +//---------------------------------------------------------------------------- +// String operations + +// val string_concat : string -> string -> string (* + *) + +// val strappend : string -> string -> string +var strappend = function(x, y) { + if (typeof(x) != "string" || typeof(y) != "string") + throw "strappend invalid arguments"; + return x + y; +}; + +// val strlength : string -> int +var strlength = function(x) { + if (typeof(x) != "string") + throw "strlength invalid arguments"; + return x.length; +}; + +// val substring : int -> int -> string -> string +var substring = function(n, m, s) { + if (typeof(s) != "string") + throw "strlength invalid arguments"; + return s.slice(n, n+m); +}; + +/* --------------------- BinNums.unlog.js --------------------- */ + +var BinNums = (function() { + + + +return {}; +})(); + +/* --------------------- Datatypes.unlog.js --------------------- */ + +var Datatypes = (function() { + +var fst = function (p) { + var x = p[0], y = p[1]; + return (x); +}; + + + +var snd = function (p) { + var x = p[0], y = p[1]; + return (y); +}; + +function Eq() { return {tag: "Eq" }; } + +function Lt() { return {tag: "Lt" }; } + +function Gt() { return {tag: "Gt" }; } + +return { + fst: fst, + snd: snd, + Eq: Eq, + Lt: Lt, + Gt: Gt}; +})(); + +/* --------------------- Fappli_IEEE_bits.unlog.js --------------------- */ + +var Fappli_IEEE_bits = (function() { + + + +return {}; +})(); + +/* --------------------- Fappli_IEEE.unlog.js --------------------- */ + +var Fappli_IEEE = (function() { + + + +return {}; +})(); + +/* --------------------- LibList.unlog.js --------------------- */ + +var LibList = (function() { + +var hd = function (d, l) { + switch (l.tag) { + case "[]": + return (d); + case "::": + var x = l.head, l0 = l.tail; + return (x); + } + +}; + + + +var tl = function (l) { + switch (l.tag) { + case "[]": + return (mk_nil()); + case "::": + var a = l.head, m = l.tail; + return (m); + } + +}; + + + +var list_eq_nil_decidable = function (l) { + switch (l.tag) { + case "[]": + return (true); + case "::": + var a = l.head, l0 = l.tail; + return (false); + } + +}; + + + +var fold_right = function (f, acc, l) { + switch (l.tag) { + case "[]": + return (acc); + case "::": + var x = l.head, l$ = l.tail; + return (f(x, fold_right(f, acc, l$))); + } + +}; + + + +var fold_left = function (f, acc, l) { + switch (l.tag) { + case "[]": + return (acc); + case "::": + var x = l.head, l$ = l.tail; + return (fold_left(f, f(x, acc), l$)); + } + +}; + + + +var map = function (f, l) { + return ( + fold_right(function (x, acc) { return (mk_cons(f(x), acc));}, mk_nil(), + l)); +}; + + + +var filter = function (f, l) { + return ( + fold_right(function (x, acc) { + if (f(x)) { + return (mk_cons(x, acc)); + } else { + return (acc); + }}, mk_nil(), l)); +}; + + + +var append = function (l1, l2) { + return ( + fold_right(function (x, acc) { return (mk_cons(x, acc));}, l2, l1)); +}; + + + +var concat = function (l) { + return (fold_right(append, mk_nil(), l)); +}; + + + +var rev = function (l) { + return ( + fold_left(function (x, acc) { return (mk_cons(x, acc));}, mk_nil(), l)); +}; + + + +var length = function (l) { + return (fold_right(function (x, acc) { return ((1 + acc));}, 0, l)); +}; + + + +var take_drop_last = function (l) { + switch (l.tag) { + case "[]": + return (raise(Not_found())); + case "::": + var x = l.head, l$ = l.tail; + switch (l$.tag) { + case "[]": + return ([mk_nil(), x]); + case "::": + var a = l$.head, l1 = l$.tail; + var _tuple_arg_1 = take_drop_last(l$); + var t = _tuple_arg_1[0], y = _tuple_arg_1[1]; + return ([mk_cons(x, t), y]); + } + + } + +}; + + + +var nth_def = function (d, n, l) { + switch (l.tag) { + case "[]": + return (d); + case "::": + var x = l.head, l$ = l.tail; + if (int_eq(n, 0)) { + return (x); + } else { + return (nth_def(d, (n - 1), l$)); + } + } + +}; + + + +var mem_decide = function (h, x, l) { + switch (l.tag) { + case "[]": + return (false); + case "::": + var y = l.head, l$ = l.tail; + if (h(x, y)) { + return (true); + } else { + return (mem_decide(h, x, l$)); + } + } + +}; + +return { + hd: hd, + tl: tl, + list_eq_nil_decidable: list_eq_nil_decidable, + fold_right: fold_right, + fold_left: fold_left, + map: map, + filter: filter, + append: append, + concat: concat, + rev: rev, + length: length, + take_drop_last: take_drop_last, + nth_def: nth_def, + mem_decide: mem_decide}; +})(); + +/* --------------------- LibOption.unlog.js --------------------- */ + +var LibOption = (function() { + +var option_compare = function (h, o1, o2) { + switch (o1.tag) { + case "Some": + var v1 = o1.value; + switch (o2.tag) { + case "Some": + var v2 = o2.value; + return (h(v1, v2)); + case "None": + return (false); + } + + case "None": + switch (o2.tag) { + case "Some": + var a = o2.value; + return (false); + case "None": + return (true); + } + + } + +}; + + + +var unsome_default = function (d, o) { + switch (o.tag) { + case "Some": + var x = o.value; + return (x); + case "None": + return (d); + } + +}; + + + +var map = function (f, o) { + switch (o.tag) { + case "Some": + var x = o.value; + return (Some(f(x))); + case "None": + return (None()); + } + +}; + +return { + option_compare: option_compare, + unsome_default: unsome_default, + map: map}; +})(); + +/* --------------------- LibProd.unlog.js --------------------- */ + +var LibProd = (function() { + +var prod_compare = function (h, h0, x, y) { + var x1 = x[0], x2 = x[1]; + var y1 = y[0], y2 = y[1]; + return ((h(x1, y1) && h0(x2, y2))); +}; + +return { + prod_compare: prod_compare}; +})(); + +/* --------------------- StdMap.unlog.js --------------------- */ + +var StdMap = (function() { + +function Empty() { return {tag: "Empty" }; } + +function Node(l, x, d, r, h) { return {tag: "Node", l: l, x: x, d: d, r: r, h: h}; } + +var height = function (_fun_arg_) { + switch (_fun_arg_.tag) { + case "Empty": + return (0); + case "Node": + var l = _fun_arg_.l, x = _fun_arg_.x, d = _fun_arg_.d, r = _fun_arg_.r, + h = _fun_arg_.h; + return (h); + } + +}; + +var create = function (l, x, d, r) { + var hl = height(l); +var hr = height(r); + return ( + Node(l, x, d, r, (function () { + if (int_ge(hl, hr)) { + return ((hl + 1)); + } else { + return ((hr + 1)); + }}()))); +}; + +var singleton = function (x, d) { + return (Node(Empty(), x, d, Empty(), 1)); +}; + +var bal = function (l, x, d, r) { + switch (l.tag) { + case "Empty": + var hl = 0; + break; + case "Node": + var h = l.h; + var hl = h; + break; + } + + switch (r.tag) { + case "Empty": + var hr = 0; + break; + case "Node": + var h = r.h; + var hr = h; + break; + } + + if (int_gt(hl, (hr + 2))) { + switch (l.tag) { + case "Empty": + throw false; + case "Node": + var ll = l.l, lv = l.x, ld = l.d, lr = l.r; + if (int_ge(height(ll), height(lr))) { + return (create(ll, lv, ld, create(lr, x, d, r))); + } else { + switch (lr.tag) { + case "Empty": + throw false; + case "Node": + var lrl = lr.l, lrv = lr.x, lrd = lr.d, lrr = lr.r; + return ( + create(create(ll, lv, ld, lrl), lrv, lrd, + create(lrr, x, d, r))); + } + + } + } + + } else { + if (int_gt(hr, (hl + 2))) { + switch (r.tag) { + case "Empty": + throw false; + case "Node": + var rl = r.l, rv = r.x, rd = r.d, rr = r.r; + if (int_ge(height(rr), height(rl))) { + return (create(create(l, x, d, rl), rv, rd, rr)); + } else { + switch (rl.tag) { + case "Empty": + throw false; + case "Node": + var rll = rl.l, rlv = rl.x, rld = rl.d, rlr = rl.r; + return ( + create(create(l, x, d, rll), rlv, rld, + create(rlr, rv, rd, rr))); + } + + } + } + + } else { + return ( + Node(l, x, d, r, (function () { + if (int_ge(hl, hr)) { + return ((hl + 1)); + } else { + return ((hr + 1)); + }}()))); + } + } +}; + +var empty = Empty(); + +var is_empty = function (s) { + switch (s.tag) { + case "Empty": + return (true); + default: + return (false); + } + +}; + +var add = function (compare, x, data, s) { + switch (s.tag) { + case "Empty": + return (Node(Empty(), x, data, Empty(), 1)); + case "Node": + var l = s.l, v = s.x, d = s.d, r = s.r, h = s.h; + var c = compare(x, v); + if (int_eq(c, 0)) { + return (Node(l, x, data, r, h)); + } else { + if (int_lt(c, 0)) { + return (bal(add(compare, x, data, l), v, d, r)); + } else { + return (bal(l, v, d, add(compare, x, data, r))); + } + } + } + +}; + +var find = function (compare, x, s) { + switch (s.tag) { + case "Empty": + throw false; + case "Node": + var l = s.l, v = s.x, d = s.d, r = s.r; + var c = compare(x, v); + if (int_eq(c, 0)) { + return (d); + } else { + return ( + find(compare, x, (function () { + if (int_lt(c, 0)) { + return (l); + } else { + return (r); + }}()))); + } + } + +}; + +var find_option = function (compare, x, s) { + switch (s.tag) { + case "Empty": + return (None()); + case "Node": + var l = s.l, v = s.x, d = s.d, r = s.r; + var c = compare(x, v); + if (int_eq(c, 0)) { + return (Some(d)); + } else { + return ( + find_option(compare, x, (function () { + if (int_lt(c, 0)) { + return (l); + } else { + return (r); + }}()))); + } + } + +}; + +var mem = function (compare, x, s) { + switch (s.tag) { + case "Empty": + return (false); + case "Node": + var l = s.l, v = s.x, d = s.d, r = s.r; + var c = compare(x, v); + return ( + (int_eq(c, 0) + || mem(compare, x, (function () { + if (int_lt(c, 0)) { + return (l); + } else { + return (r); + }}())))); + } + +}; + +var min_binding = function (s) { + switch (s.tag) { + case "Empty": + return (raise(Not_found())); + case "Node": + var l = s.l, x = s.x, d = s.d, r = s.r; + switch (l.tag) { + case "Empty": + return ([x, d]); + default: + return (min_binding(l)); + } + + } + +}; + +var remove_min_binding = function (s) { + switch (s.tag) { + case "Empty": + throw false; + case "Node": + var l = s.l, x = s.x, d = s.d, r = s.r; + switch (l.tag) { + case "Empty": + return (r); + default: + return (bal(remove_min_binding(l), x, d, r)); + } + + } + +}; + +var merge = function (t1, t2) { + switch (t1.tag) { + case "Empty": + return (t2); + default: + switch (t2.tag) { + case "Empty": + return (t1); + default: + var _tuple_arg_1 = min_binding(t2); + var x = _tuple_arg_1[0], d = _tuple_arg_1[1]; + return (bal(t1, x, d, remove_min_binding(t2))); + } + + } + +}; + +var remove = function (compare, x, s) { + switch (s.tag) { + case "Empty": + return (Empty()); + case "Node": + var l = s.l, v = s.x, d = s.d, r = s.r, h = s.h; + var c = compare(x, v); + if (int_eq(c, 0)) { + return (merge(l, r)); + } else { + if (int_lt(c, 0)) { + return (bal(remove(compare, x, l), v, d, r)); + } else { + return (bal(l, v, d, remove(compare, x, r))); + } + } + } + +}; + +var fold = function (f, m, accu) { + switch (m.tag) { + case "Empty": + return (accu); + case "Node": + var l = m.l, v = m.x, d = m.d, r = m.r; + return (fold(f, r, f(v, d, fold(f, l, accu)))); + } + +}; + +return { + Empty: Empty, + Node: Node, + height: height, + create: create, + singleton: singleton, + bal: bal, + empty: empty, + is_empty: is_empty, + add: add, + find: find, + find_option: find_option, + mem: mem, + min_binding: min_binding, + remove_min_binding: remove_min_binding, + merge: merge, + remove: remove, + fold: fold}; +})(); + +/* --------------------- Heap.unlog.js --------------------- */ + +var Heap = (function() { +with (Datatypes) { + +var empty = StdMap.empty; + + + +var read = function (h, l, k) { + return (StdMap.find(h, k, l)); +}; + + + +var write = function (h, l, k, v) { + return (StdMap.add(h, k, v, l)); +}; + + + +var rem = function (h, l, k) { + return (StdMap.remove(h, k, l)); +}; + + + +var read_option = function (h, l, k) { + return (StdMap.find_option(h, k, l)); +}; + + + +var indom_dec = function (h, l, k) { + return (StdMap.mem(h, k, l)); +}; + + + +var to_list = function (h, l) { + return ( + StdMap.fold(function (k, v, acc) { return (mk_cons([k, v], acc));}, l, + mk_nil())); +}; +}// end of with Datatypes + +return { + empty: empty, + read: read, + write: write, + rem: rem, + read_option: read_option, + indom_dec: indom_dec, + to_list: to_list}; +})(); + +/* --------------------- HeapInt.unlog.js --------------------- */ + +var HeapInt = (function() { + +var empty = Heap.empty; + +var read = function (l, k) { + return (Heap.read(int_compare, l, k)); +}; + +var write = function (l, k, v) { + return (Heap.write(int_compare, l, k, v)); +}; + +var rem = function (l, k) { + return (Heap.rem(int_compare, l, k)); +}; + +var read_option = function (l, k) { + return (Heap.read_option(int_compare, l, k)); +}; + +var indom_dec = function (l, k) { + return (Heap.indom_dec(int_compare, l, k)); +}; + +var to_list = function (l) { + return (Heap.to_list(int_compare, l)); +}; + +return { + empty: empty, + read: read, + write: write, + rem: rem, + read_option: read_option, + indom_dec: indom_dec, + to_list: to_list}; +})(); + +/* --------------------- HeapStr.unlog.js --------------------- */ + +var HeapStr = (function() { + +var empty = Heap.empty; + +var read = function (l, k) { + return (Heap.read(string_compare, l, k)); +}; + +var write = function (l, k, v) { + return (Heap.write(string_compare, l, k, v)); +}; + +var rem = function (l, k) { + return (Heap.rem(string_compare, l, k)); +}; + +var read_option = function (l, k) { + return (Heap.read_option(string_compare, l, k)); +}; + +var indom_dec = function (l, k) { + return (Heap.indom_dec(string_compare, l, k)); +}; + +var to_list = function (l) { + return (Heap.to_list(string_compare, l)); +}; + +return { + empty: empty, + read: read, + write: write, + rem: rem, + read_option: read_option, + indom_dec: indom_dec, + to_list: to_list}; +})(); + +/* --------------------- HeapList.unlog.js --------------------- */ + +var HeapList = (function() { +with (Datatypes) { +with (LibList) { + +var empty = mk_nil(); + + + +var read = function (h, l, k) { + switch (l.tag) { + case "[]": + return (raise(Not_found())); + case "::": + var p = l.head, l$ = l.tail; + var x = p[0], v = p[1]; + if (int_eq(h(x, k), 0)) { + return (v); + } else { + return (read(h, l$, k)); + } + } + +}; + + + +var write = function (h, l, k, v) { + return (mk_cons([k, v], l)); +}; + + + +var rem = function (h1, l, k) { + return ( + filter(function (p) { + if (int_eq(h1(fst(p), k), 0)) { + return (false); + } else { + return (true); + }}, l)); +}; + + + +var read_option = function (h, l, k) { + var read_option0 = function (l, k) { + switch (l.tag) { + case "[]": + return (None()); + case "::": + var p = l.head, l$ = l.tail; + var x = p[0], v = p[1]; + if (int_eq(h(x, k), 0)) { + return (Some(v)); + } else { + return (read_option0(l$, k)); + } + } + + }; + return (read_option0(l, k)); +}; + + + +var indom_dec = function (h1, l, k) { + switch (l.tag) { + case "[]": + return (false); + case "::": + var p = l.head, l$ = l.tail; + var x = p[0], y = p[1]; + return ((int_eq(h1(x, k), 0) || indom_dec(h1, l$, k))); + } + +}; + + + +var to_list = function (h, l) { + switch (l.tag) { + case "[]": + return (mk_nil()); + case "::": + var p = l.head, l$ = l.tail; + return (mk_cons(p, to_list(h, rem(h, l$, fst(p))))); + } + +}; +}// end of with Datatypes +}// end of with LibList + +return { + empty: empty, + read: read, + write: write, + rem: rem, + read_option: read_option, + indom_dec: indom_dec, + to_list: to_list}; +})(); + +/* --------------------- Shared.unlog.js --------------------- */ + +var Shared = (function() { +with (Datatypes) { +with (Heap) { + +var option_case = function (d, f, o) { + switch (o.tag) { + case "Some": + var x = o.value; + return (f(x)); + case "None": + return (d); + } + +}; + + + + + +var string_sub = function (s, n, l) { + return (substring(n, l, s)); +}; + + + +var lt_int_decidable = function (x, y) { + return ((x < y)); +}; + + + +var le_int_decidable = function (x, y) { + return ((x <= y)); +}; + + + +var ge_nat_decidable = function (x, y) { + return (int_ge(x, y)); +}; + + +}// end of with Datatypes +}// end of with Heap + +return { + option_case: option_case, + string_sub: string_sub, + lt_int_decidable: lt_int_decidable, + le_int_decidable: le_int_decidable, + ge_nat_decidable: ge_nat_decidable}; +})(); + +/* --------------------- Compare.js --------------------- */ + +/* Calls to these comparison functions are inserted into the + * generated code in place of === + */ + +var _compare_JsSyntax_mathop = function(x, y) { + return (x.tag == y.tag); +}; + +var _compare_JsSyntax_native_error = function(x, y) { + return (x.tag == y.tag); +}; + +var _compare_JsSyntax_prealloc = function(x, y) { + return (x.tag == y.tag) + && (x.tag != "Coq_prealloc_mathop" + || _compare_JsSyntax_mathop(x.mathop, y.mathop)) + && (x.tag != "Coq_prealloc_native_error" + || _compare_JsSyntax_native_error(x.error, y.error)) + && (x.tag != "Coq_prealloc_native_error_proto" + || _compare_JsSyntax_native_error(x.error, y.error)) + ; +}; + + +/* --------------------- JsNumber.js --------------------- */ + +var JsNumber = { + /* Alternative approach to the int32 and uint32 conversions + source: http://www.2ality.com/2012/02/js-integers.html + function modulo(a, b) { + return a - Math.floor(a/b)*b; + } + function ToUint32(x) { + return modulo(ToInteger(x), Math.pow(2, 32)); + } + + function ToInt32(x) { + var uint32 = ToUint32(x); + if (uint32 >= Math.pow(2, 31)) { + return uint32 - Math.pow(2, 32) + } else { + return uint32; + } + } + */ + + // this works because the >>> operator first converts its first argument to uint32 + to_uint32 : function (x) { + return x >>> 0; + }, + + // this works because the >> operator first converts its first argument to int32 + to_int32 : function (x) { + return x >> 0; + }, + + from_string : function (x) { + return Number(x); + }, + + to_string : function (x) { + return "" + x; + }, + + int32_left_shift : function (x, y) { return x << y; }, + int32_right_shift : function (x, y) { return x >> y; }, + uint32_right_shift : function (x, y) { return x >>> y; }, + + int32_bitwise_and : function (x, y) { return x & y; }, + int32_bitwise_or : function (x, y) { return x | y; }, + int32_bitwise_xor : function (x, y) { return x ^ y; }, + int32_bitwise_not : function (x) { return ~ x; }, + + floor : function (x) { return Math.floor(x); }, + neg : function (x) { return - x; }, + sign : function (x) { return Math.sign(x); }, + absolute : function (x) { return Math.abs(x); }, + fmod : function (x, y) { return x % y; }, + + modulo_32 : function (x) { return x & 0x1F; }, + + zero : 0.0, + neg_zero : -0.0, + one : 1.0, + infinity : Number.POSITIVE_INFINITY, + neg_infinity : Number.NEGATIVE_INFINITY, + max_value : Number.MAX_VALUE, + min_value : Number.MIN_VALUE, + nan : Number.NaN, + pi : Math.PI, + e : Math.E, + ln2 : Math.LN2, + + isnan : isNaN, + isposzero : function (n) { return (n === 0) && ((1/n) > 0) }, + isnegzero : function (n) { return (n === 0) && ((1/n) < 0) } +}; + +/* --------------------- JsSyntax.unlog.js --------------------- */ + +var JsSyntax = (function() { +with (Heap) { +with (Shared) { + +function Coq_unary_op_delete() { return {tag: "Coq_unary_op_delete" }; } + +function Coq_unary_op_void() { return {tag: "Coq_unary_op_void" }; } + +function Coq_unary_op_typeof() { return {tag: "Coq_unary_op_typeof" }; } + +function Coq_unary_op_post_incr() { return {tag: "Coq_unary_op_post_incr" }; } + +function Coq_unary_op_post_decr() { return {tag: "Coq_unary_op_post_decr" }; } + +function Coq_unary_op_pre_incr() { return {tag: "Coq_unary_op_pre_incr" }; } + +function Coq_unary_op_pre_decr() { return {tag: "Coq_unary_op_pre_decr" }; } + +function Coq_unary_op_add() { return {tag: "Coq_unary_op_add" }; } + +function Coq_unary_op_neg() { return {tag: "Coq_unary_op_neg" }; } + +function Coq_unary_op_bitwise_not() { return {tag: "Coq_unary_op_bitwise_not" }; } + +function Coq_unary_op_not() { return {tag: "Coq_unary_op_not" }; } + +function Coq_binary_op_mult() { return {tag: "Coq_binary_op_mult" }; } + +function Coq_binary_op_div() { return {tag: "Coq_binary_op_div" }; } + +function Coq_binary_op_mod() { return {tag: "Coq_binary_op_mod" }; } + +function Coq_binary_op_add() { return {tag: "Coq_binary_op_add" }; } + +function Coq_binary_op_sub() { return {tag: "Coq_binary_op_sub" }; } + +function Coq_binary_op_left_shift() { return {tag: "Coq_binary_op_left_shift" }; } + +function Coq_binary_op_right_shift() { return {tag: "Coq_binary_op_right_shift" }; } + +function Coq_binary_op_unsigned_right_shift() { return {tag: "Coq_binary_op_unsigned_right_shift" }; } + +function Coq_binary_op_lt() { return {tag: "Coq_binary_op_lt" }; } + +function Coq_binary_op_gt() { return {tag: "Coq_binary_op_gt" }; } + +function Coq_binary_op_le() { return {tag: "Coq_binary_op_le" }; } + +function Coq_binary_op_ge() { return {tag: "Coq_binary_op_ge" }; } + +function Coq_binary_op_instanceof() { return {tag: "Coq_binary_op_instanceof" }; } + +function Coq_binary_op_in() { return {tag: "Coq_binary_op_in" }; } + +function Coq_binary_op_equal() { return {tag: "Coq_binary_op_equal" }; } + +function Coq_binary_op_disequal() { return {tag: "Coq_binary_op_disequal" }; } + +function Coq_binary_op_strict_equal() { return {tag: "Coq_binary_op_strict_equal" }; } + +function Coq_binary_op_strict_disequal() { return {tag: "Coq_binary_op_strict_disequal" }; } + +function Coq_binary_op_bitwise_and() { return {tag: "Coq_binary_op_bitwise_and" }; } + +function Coq_binary_op_bitwise_or() { return {tag: "Coq_binary_op_bitwise_or" }; } + +function Coq_binary_op_bitwise_xor() { return {tag: "Coq_binary_op_bitwise_xor" }; } + +function Coq_binary_op_and() { return {tag: "Coq_binary_op_and" }; } + +function Coq_binary_op_or() { return {tag: "Coq_binary_op_or" }; } + +function Coq_binary_op_coma() { return {tag: "Coq_binary_op_coma" }; } + +function Coq_literal_null() { return {tag: "Coq_literal_null" }; } + +function Coq_literal_bool(value) { return {tag: "Coq_literal_bool", value: value}; } + +function Coq_literal_number(value) { return {tag: "Coq_literal_number", value: value}; } + +function Coq_literal_string(value) { return {tag: "Coq_literal_string", value: value}; } + +function Coq_label_empty() { return {tag: "Coq_label_empty" }; } + +function Coq_label_string(value) { return {tag: "Coq_label_string", value: value}; } + + + + + + + +var strictness_false = false; + +function Coq_propname_identifier(value) { return {tag: "Coq_propname_identifier", value: value}; } + +function Coq_propname_string(value) { return {tag: "Coq_propname_string", value: value}; } + +function Coq_propname_number(value) { return {tag: "Coq_propname_number", value: value}; } + +function Coq_expr_this() { return {tag: "Coq_expr_this" }; } + +function Coq_expr_identifier(name) { return {tag: "Coq_expr_identifier", name: name}; } + +function Coq_expr_literal(value) { return {tag: "Coq_expr_literal", value: value}; } + +function Coq_expr_object(fields) { return {tag: "Coq_expr_object", fields: fields}; } + +function Coq_expr_array(elements) { return {tag: "Coq_expr_array", elements: elements}; } + +function Coq_expr_function(func_name_opt, arg_names, body) { return { +tag: "Coq_expr_function", func_name_opt: func_name_opt, arg_names: arg_names, body: body}; } + +function Coq_expr_access(obj, field) { return {tag: "Coq_expr_access", obj: obj, field: field}; } + +function Coq_expr_member(obj, field_name) { return {tag: "Coq_expr_member", obj: obj, field_name: field_name}; } + +function Coq_expr_new(func, args) { return {tag: "Coq_expr_new", func: func, args: args}; } + +function Coq_expr_call(func, args) { return {tag: "Coq_expr_call", func: func, args: args}; } + +function Coq_expr_unary_op(op, arg) { return {tag: "Coq_expr_unary_op", op: op, arg: arg}; } + +function Coq_expr_binary_op(arg1, op, arg2) { return {tag: "Coq_expr_binary_op", arg1: arg1, op: op, arg2: arg2}; } + +function Coq_expr_conditional(cond, then_branch, else_branch) { return { +tag: "Coq_expr_conditional", cond: cond, then_branch: then_branch, else_branch: else_branch}; } + +function Coq_expr_assign(left_expr, op_opt, right_expr) { return {tag: "Coq_expr_assign", left_expr: left_expr, op_opt: op_opt, right_expr: right_expr}; } + +function Coq_propbody_val(expr) { return {tag: "Coq_propbody_val", expr: expr}; } + +function Coq_propbody_get(body) { return {tag: "Coq_propbody_get", body: body}; } + +function Coq_propbody_set(names, body) { return {tag: "Coq_propbody_set", names: names, body: body}; } + +function Coq_funcbody_intro(prog, source) { return {tag: "Coq_funcbody_intro", prog: prog, source: source}; } + +function Coq_stat_expr(expr) { return {tag: "Coq_stat_expr", expr: expr}; } + +function Coq_stat_label(label, stat) { return {tag: "Coq_stat_label", label: label, stat: stat}; } + +function Coq_stat_block(stats) { return {tag: "Coq_stat_block", stats: stats}; } + +function Coq_stat_var_decl(decls) { return {tag: "Coq_stat_var_decl", decls: decls}; } + +function Coq_stat_if(cond, then_branch, else_branch) { return {tag: "Coq_stat_if", cond: cond, then_branch: then_branch, else_branch: else_branch}; } + +function Coq_stat_do_while(labels, body, cond) { return {tag: "Coq_stat_do_while", labels: labels, body: body, cond: cond}; } + +function Coq_stat_while(labels, cond, body) { return {tag: "Coq_stat_while", labels: labels, cond: cond, body: body}; } + +function Coq_stat_with(obj, stat) { return {tag: "Coq_stat_with", obj: obj, stat: stat}; } + +function Coq_stat_throw(arg) { return {tag: "Coq_stat_throw", arg: arg}; } + +function Coq_stat_return(arg_opt) { return {tag: "Coq_stat_return", arg_opt: arg_opt}; } + +function Coq_stat_break(label) { return {tag: "Coq_stat_break", label: label}; } + +function Coq_stat_continue(label) { return {tag: "Coq_stat_continue", label: label}; } + +function Coq_stat_try(body, catch_stats_opt, finally_opt) { return {tag: "Coq_stat_try", body: body, catch_stats_opt: catch_stats_opt, finally_opt: finally_opt}; } + +function Coq_stat_for(labels, init, cond, step, body) { return {tag: "Coq_stat_for", labels: labels, init: init, cond: cond, step: step, body: body}; } + +function Coq_stat_for_var(labels, init, cond, step, body) { return {tag: "Coq_stat_for_var", labels: labels, init: init, cond: cond, step: step, body: body}; } + +function Coq_stat_for_in(labels, id, obj, body) { return {tag: "Coq_stat_for_in", labels: labels, id: id, obj: obj, body: body}; } + +function Coq_stat_for_in_var(labels, id, init, obj, body) { return {tag: "Coq_stat_for_in_var", labels: labels, id: id, init: init, obj: obj, body: body}; } + +function Coq_stat_debugger() { return {tag: "Coq_stat_debugger" }; } + +function Coq_stat_switch(labels, arg, body) { return {tag: "Coq_stat_switch", labels: labels, arg: arg, body: body}; } + +function Coq_switchbody_nodefault(clauses) { return {tag: "Coq_switchbody_nodefault", clauses: clauses}; } + +function Coq_switchbody_withdefault(clauses_before, clause_default, clauses_after) { return { +tag: "Coq_switchbody_withdefault", clauses_before: clauses_before, clause_default: clause_default, clauses_after: clauses_after}; } + +function Coq_switchclause_intro(arg, stats) { return {tag: "Coq_switchclause_intro", arg: arg, stats: stats}; } + +function Coq_prog_intro(strictness, elements) { return {tag: "Coq_prog_intro", strictness: strictness, elements: elements}; } + +function Coq_element_stat(stat) { return {tag: "Coq_element_stat", stat: stat}; } + +function Coq_element_func_decl(func_name, arg_names, body) { return { +tag: "Coq_element_func_decl", func_name: func_name, arg_names: arg_names, body: body}; } + + + + + + + + + +var funcdecl_name = function (x) { + return (x.funcdecl_name); +}; + + + +var funcdecl_parameters = function (x) { + return (x.funcdecl_parameters); +}; + + + +var funcdecl_body = function (x) { + return (x.funcdecl_body); +}; + +function Coq_mathop_abs() { return {tag: "Coq_mathop_abs" }; } + +function Coq_native_error_eval() { return {tag: "Coq_native_error_eval" }; } + +function Coq_native_error_range() { return {tag: "Coq_native_error_range" }; } + +function Coq_native_error_ref() { return {tag: "Coq_native_error_ref" }; } + +function Coq_native_error_syntax() { return {tag: "Coq_native_error_syntax" }; } + +function Coq_native_error_type() { return {tag: "Coq_native_error_type" }; } + +function Coq_native_error_uri() { return {tag: "Coq_native_error_uri" }; } + +function Coq_prealloc_global() { return {tag: "Coq_prealloc_global" }; } + +function Coq_prealloc_global_eval() { return {tag: "Coq_prealloc_global_eval" }; } + +function Coq_prealloc_global_parse_int() { return {tag: "Coq_prealloc_global_parse_int" }; } + +function Coq_prealloc_global_parse_float() { return {tag: "Coq_prealloc_global_parse_float" }; } + +function Coq_prealloc_global_is_finite() { return {tag: "Coq_prealloc_global_is_finite" }; } + +function Coq_prealloc_global_is_nan() { return {tag: "Coq_prealloc_global_is_nan" }; } + +function Coq_prealloc_global_decode_uri() { return {tag: "Coq_prealloc_global_decode_uri" }; } + +function Coq_prealloc_global_decode_uri_component() { return {tag: "Coq_prealloc_global_decode_uri_component" }; } + +function Coq_prealloc_global_encode_uri() { return {tag: "Coq_prealloc_global_encode_uri" }; } + +function Coq_prealloc_global_encode_uri_component() { return {tag: "Coq_prealloc_global_encode_uri_component" }; } + +function Coq_prealloc_object() { return {tag: "Coq_prealloc_object" }; } + +function Coq_prealloc_object_get_proto_of() { return {tag: "Coq_prealloc_object_get_proto_of" }; } + +function Coq_prealloc_object_get_own_prop_descriptor() { return {tag: "Coq_prealloc_object_get_own_prop_descriptor" }; } + +function Coq_prealloc_object_get_own_prop_name() { return {tag: "Coq_prealloc_object_get_own_prop_name" }; } + +function Coq_prealloc_object_create() { return {tag: "Coq_prealloc_object_create" }; } + +function Coq_prealloc_object_define_prop() { return {tag: "Coq_prealloc_object_define_prop" }; } + +function Coq_prealloc_object_define_props() { return {tag: "Coq_prealloc_object_define_props" }; } + +function Coq_prealloc_object_seal() { return {tag: "Coq_prealloc_object_seal" }; } + +function Coq_prealloc_object_freeze() { return {tag: "Coq_prealloc_object_freeze" }; } + +function Coq_prealloc_object_prevent_extensions() { return {tag: "Coq_prealloc_object_prevent_extensions" }; } + +function Coq_prealloc_object_is_sealed() { return {tag: "Coq_prealloc_object_is_sealed" }; } + +function Coq_prealloc_object_is_frozen() { return {tag: "Coq_prealloc_object_is_frozen" }; } + +function Coq_prealloc_object_is_extensible() { return {tag: "Coq_prealloc_object_is_extensible" }; } + +function Coq_prealloc_object_keys() { return {tag: "Coq_prealloc_object_keys" }; } + +function Coq_prealloc_object_keys_call() { return {tag: "Coq_prealloc_object_keys_call" }; } + +function Coq_prealloc_object_proto() { return {tag: "Coq_prealloc_object_proto" }; } + +function Coq_prealloc_object_proto_to_string() { return {tag: "Coq_prealloc_object_proto_to_string" }; } + +function Coq_prealloc_object_proto_value_of() { return {tag: "Coq_prealloc_object_proto_value_of" }; } + +function Coq_prealloc_object_proto_has_own_prop() { return {tag: "Coq_prealloc_object_proto_has_own_prop" }; } + +function Coq_prealloc_object_proto_is_prototype_of() { return {tag: "Coq_prealloc_object_proto_is_prototype_of" }; } + +function Coq_prealloc_object_proto_prop_is_enumerable() { return {tag: "Coq_prealloc_object_proto_prop_is_enumerable" }; } + +function Coq_prealloc_function() { return {tag: "Coq_prealloc_function" }; } + +function Coq_prealloc_function_proto() { return {tag: "Coq_prealloc_function_proto" }; } + +function Coq_prealloc_function_proto_to_string() { return {tag: "Coq_prealloc_function_proto_to_string" }; } + +function Coq_prealloc_function_proto_apply() { return {tag: "Coq_prealloc_function_proto_apply" }; } + +function Coq_prealloc_function_proto_call() { return {tag: "Coq_prealloc_function_proto_call" }; } + +function Coq_prealloc_function_proto_bind() { return {tag: "Coq_prealloc_function_proto_bind" }; } + +function Coq_prealloc_bool() { return {tag: "Coq_prealloc_bool" }; } + +function Coq_prealloc_bool_proto() { return {tag: "Coq_prealloc_bool_proto" }; } + +function Coq_prealloc_bool_proto_to_string() { return {tag: "Coq_prealloc_bool_proto_to_string" }; } + +function Coq_prealloc_bool_proto_value_of() { return {tag: "Coq_prealloc_bool_proto_value_of" }; } + +function Coq_prealloc_number() { return {tag: "Coq_prealloc_number" }; } + +function Coq_prealloc_number_proto() { return {tag: "Coq_prealloc_number_proto" }; } + +function Coq_prealloc_number_proto_to_string() { return {tag: "Coq_prealloc_number_proto_to_string" }; } + +function Coq_prealloc_number_proto_value_of() { return {tag: "Coq_prealloc_number_proto_value_of" }; } + +function Coq_prealloc_number_proto_to_fixed() { return {tag: "Coq_prealloc_number_proto_to_fixed" }; } + +function Coq_prealloc_number_proto_to_exponential() { return {tag: "Coq_prealloc_number_proto_to_exponential" }; } + +function Coq_prealloc_number_proto_to_precision() { return {tag: "Coq_prealloc_number_proto_to_precision" }; } + +function Coq_prealloc_array() { return {tag: "Coq_prealloc_array" }; } + +function Coq_prealloc_array_is_array() { return {tag: "Coq_prealloc_array_is_array" }; } + +function Coq_prealloc_array_proto() { return {tag: "Coq_prealloc_array_proto" }; } + +function Coq_prealloc_array_proto_to_string() { return {tag: "Coq_prealloc_array_proto_to_string" }; } + +function Coq_prealloc_array_proto_join() { return {tag: "Coq_prealloc_array_proto_join" }; } + +function Coq_prealloc_array_proto_pop() { return {tag: "Coq_prealloc_array_proto_pop" }; } + +function Coq_prealloc_array_proto_push() { return {tag: "Coq_prealloc_array_proto_push" }; } + +function Coq_prealloc_string() { return {tag: "Coq_prealloc_string" }; } + +function Coq_prealloc_string_proto() { return {tag: "Coq_prealloc_string_proto" }; } + +function Coq_prealloc_string_proto_to_string() { return {tag: "Coq_prealloc_string_proto_to_string" }; } + +function Coq_prealloc_string_proto_value_of() { return {tag: "Coq_prealloc_string_proto_value_of" }; } + +function Coq_prealloc_string_proto_char_at() { return {tag: "Coq_prealloc_string_proto_char_at" }; } + +function Coq_prealloc_string_proto_char_code_at() { return {tag: "Coq_prealloc_string_proto_char_code_at" }; } + +function Coq_prealloc_math() { return {tag: "Coq_prealloc_math" }; } + +function Coq_prealloc_date() { return {tag: "Coq_prealloc_date" }; } + +function Coq_prealloc_regexp() { return {tag: "Coq_prealloc_regexp" }; } + +function Coq_prealloc_error() { return {tag: "Coq_prealloc_error" }; } + +function Coq_prealloc_error_proto() { return {tag: "Coq_prealloc_error_proto" }; } + +function Coq_prealloc_error_proto_to_string() { return {tag: "Coq_prealloc_error_proto_to_string" }; } + +function Coq_prealloc_throw_type_error() { return {tag: "Coq_prealloc_throw_type_error" }; } + +function Coq_prealloc_json() { return {tag: "Coq_prealloc_json" }; } + +function Coq_prealloc_mathop(mathop) { return {tag: "Coq_prealloc_mathop", mathop: mathop}; } + +function Coq_prealloc_native_error(error) { return {tag: "Coq_prealloc_native_error", error: error}; } + +function Coq_prealloc_native_error_proto(error) { return {tag: "Coq_prealloc_native_error_proto", error: error}; } + +function Coq_call_default() { return {tag: "Coq_call_default" }; } + +function Coq_call_after_bind() { return {tag: "Coq_call_after_bind" }; } + +function Coq_call_prealloc(prealloc) { return {tag: "Coq_call_prealloc", prealloc: prealloc}; } + +function Coq_construct_default() { return {tag: "Coq_construct_default" }; } + +function Coq_construct_after_bind() { return {tag: "Coq_construct_after_bind" }; } + +function Coq_construct_prealloc(prealloc) { return {tag: "Coq_construct_prealloc", prealloc: prealloc}; } + +function Coq_builtin_has_instance_function() { return {tag: "Coq_builtin_has_instance_function" }; } + +function Coq_builtin_has_instance_after_bind() { return {tag: "Coq_builtin_has_instance_after_bind" }; } + +function Coq_builtin_get_default() { return {tag: "Coq_builtin_get_default" }; } + +function Coq_builtin_get_function() { return {tag: "Coq_builtin_get_function" }; } + +function Coq_builtin_get_args_obj() { return {tag: "Coq_builtin_get_args_obj" }; } + +function Coq_builtin_get_own_prop_default() { return {tag: "Coq_builtin_get_own_prop_default" }; } + +function Coq_builtin_get_own_prop_args_obj() { return {tag: "Coq_builtin_get_own_prop_args_obj" }; } + +function Coq_builtin_get_own_prop_string() { return {tag: "Coq_builtin_get_own_prop_string" }; } + +function Coq_builtin_get_prop_default() { return {tag: "Coq_builtin_get_prop_default" }; } + +function Coq_builtin_put_default() { return {tag: "Coq_builtin_put_default" }; } + +function Coq_builtin_can_put_default() { return {tag: "Coq_builtin_can_put_default" }; } + +function Coq_builtin_has_prop_default() { return {tag: "Coq_builtin_has_prop_default" }; } + +function Coq_builtin_delete_default() { return {tag: "Coq_builtin_delete_default" }; } + +function Coq_builtin_delete_args_obj() { return {tag: "Coq_builtin_delete_args_obj" }; } + +function Coq_builtin_default_value_default() { return {tag: "Coq_builtin_default_value_default" }; } + +function Coq_builtin_define_own_prop_default() { return {tag: "Coq_builtin_define_own_prop_default" }; } + +function Coq_builtin_define_own_prop_array() { return {tag: "Coq_builtin_define_own_prop_array" }; } + +function Coq_builtin_define_own_prop_args_obj() { return {tag: "Coq_builtin_define_own_prop_args_obj" }; } + +function Coq_object_loc_normal(address) { return {tag: "Coq_object_loc_normal", address: address}; } + +function Coq_object_loc_prealloc(prealloc) { return {tag: "Coq_object_loc_prealloc", prealloc: prealloc}; } + +function Coq_prim_undef() { return {tag: "Coq_prim_undef" }; } + +function Coq_prim_null() { return {tag: "Coq_prim_null" }; } + +function Coq_prim_bool(value) { return {tag: "Coq_prim_bool", value: value}; } + +function Coq_prim_number(value) { return {tag: "Coq_prim_number", value: value}; } + +function Coq_prim_string(value) { return {tag: "Coq_prim_string", value: value}; } + +function Coq_value_prim(value) { return {tag: "Coq_value_prim", value: value}; } + +function Coq_value_object(value) { return {tag: "Coq_value_object", value: value}; } + +function Coq_type_undef() { return {tag: "Coq_type_undef" }; } + +function Coq_type_null() { return {tag: "Coq_type_null" }; } + +function Coq_type_bool() { return {tag: "Coq_type_bool" }; } + +function Coq_type_number() { return {tag: "Coq_type_number" }; } + +function Coq_type_string() { return {tag: "Coq_type_string" }; } + +function Coq_type_object() { return {tag: "Coq_type_object" }; } + + + + + +var attributes_data_value = function (x) { + return (x.attributes_data_value); +}; + + + +var attributes_data_writable = function (x) { + return (x.attributes_data_writable); +}; + + + +var attributes_data_enumerable = function (x) { + return (x.attributes_data_enumerable); +}; + + + +var attributes_data_configurable = function (x) { + return (x.attributes_data_configurable); +}; + + + + + +var attributes_accessor_get = function (x) { + return (x.attributes_accessor_get); +}; + + + +var attributes_accessor_set = function (x) { + return (x.attributes_accessor_set); +}; + + + +var attributes_accessor_enumerable = function (x) { + return (x.attributes_accessor_enumerable); +}; + + + +var attributes_accessor_configurable = function (x) { + return (x.attributes_accessor_configurable); +}; + +function Coq_attributes_data_of(value) { return {tag: "Coq_attributes_data_of", value: value}; } + +function Coq_attributes_accessor_of(value) { return {tag: "Coq_attributes_accessor_of", value: value}; } + + + + + +var descriptor_value = function (x) { + return (x.descriptor_value); +}; + + + +var descriptor_writable = function (x) { + return (x.descriptor_writable); +}; + + + +var descriptor_get = function (x) { + return (x.descriptor_get); +}; + + + +var descriptor_set = function (x) { + return (x.descriptor_set); +}; + + + +var descriptor_enumerable = function (x) { + return (x.descriptor_enumerable); +}; + + + +var descriptor_configurable = function (x) { + return (x.descriptor_configurable); +}; + +function Coq_full_descriptor_undef() { return {tag: "Coq_full_descriptor_undef" }; } + +function Coq_full_descriptor_some(value) { return {tag: "Coq_full_descriptor_some", value: value}; } + +function Coq_mutability_uninitialized_immutable() { return {tag: "Coq_mutability_uninitialized_immutable" }; } + +function Coq_mutability_immutable() { return {tag: "Coq_mutability_immutable" }; } + +function Coq_mutability_nondeletable() { return {tag: "Coq_mutability_nondeletable" }; } + +function Coq_mutability_deletable() { return {tag: "Coq_mutability_deletable" }; } + + + + + +function Coq_env_record_decl(value) { return {tag: "Coq_env_record_decl", value: value}; } + +function Coq_env_record_object(value, provide_this) { return {tag: "Coq_env_record_object", value: value, provide_this: provide_this}; } + + + + + +var env_loc_global_env_record = 0; + + + + + + + +var execution_ctx_lexical_env = function (x) { + return (x.execution_ctx_lexical_env); +}; + + + +var execution_ctx_variable_env = function (x) { + return (x.execution_ctx_variable_env); +}; + + + +var execution_ctx_this_binding = function (x) { + return (x.execution_ctx_this_binding); +}; + + + +var execution_ctx_strict = function (x) { + return (x.execution_ctx_strict); +}; + + + +function Coq_ref_base_type_value(value) { return {tag: "Coq_ref_base_type_value", value: value}; } + +function Coq_ref_base_type_env_loc(value) { return {tag: "Coq_ref_base_type_env_loc", value: value}; } + + + + + +var ref_base = function (x) { + return (x.ref_base); +}; + + + +var ref_name = function (x) { + return (x.ref_name); +}; + + + +var ref_strict = function (x) { + return (x.ref_strict); +}; + + + + + + + + + +var object_proto_ = function (x) { + return (x.object_proto_); +}; + + + +var object_class_ = function (x) { + return (x.object_class_); +}; + + + +var object_extensible_ = function (x) { + return (x.object_extensible_); +}; + + + +var object_prim_value_ = function (x) { + return (x.object_prim_value_); +}; + + + +var object_properties_ = function (x) { + return (x.object_properties_); +}; + + + +var object_get_ = function (x) { + return (x.object_get_); +}; + + + +var object_get_own_prop_ = function (x) { + return (x.object_get_own_prop_); +}; + + + +var object_get_prop_ = function (x) { + return (x.object_get_prop_); +}; + + + +var object_put_ = function (x) { + return (x.object_put_); +}; + + + +var object_can_put_ = function (x) { + return (x.object_can_put_); +}; + + + +var object_has_prop_ = function (x) { + return (x.object_has_prop_); +}; + + + +var object_delete_ = function (x) { + return (x.object_delete_); +}; + + + +var object_default_value_ = function (x) { + return (x.object_default_value_); +}; + + + +var object_define_own_prop_ = function (x) { + return (x.object_define_own_prop_); +}; + + + +var object_construct_ = function (x) { + return (x.object_construct_); +}; + + + +var object_call_ = function (x) { + return (x.object_call_); +}; + + + +var object_has_instance_ = function (x) { + return (x.object_has_instance_); +}; + + + +var object_scope_ = function (x) { + return (x.object_scope_); +}; + + + +var object_formal_parameters_ = function (x) { + return (x.object_formal_parameters_); +}; + + + +var object_code_ = function (x) { + return (x.object_code_); +}; + + + +var object_target_function_ = function (x) { + return (x.object_target_function_); +}; + + + +var object_bound_this_ = function (x) { + return (x.object_bound_this_); +}; + + + +var object_bound_args_ = function (x) { + return (x.object_bound_args_); +}; + + + +var object_parameter_map_ = function (x) { + return (x.object_parameter_map_); +}; + +function Coq_delete_event(loc, name, locopt) { return {tag: "Coq_delete_event", loc: loc, name: name, locopt: locopt}; } + +function Coq_mutateproto_event(loc, fields) { return {tag: "Coq_mutateproto_event", loc: loc, fields: fields}; } + +function Coq_enumchange_event(loc, name) { return {tag: "Coq_enumchange_event", loc: loc, name: name}; } + + + + + +var state_object_heap = function (x) { + return (x.state_object_heap); +}; + + + +var state_env_record_heap = function (x) { + return (x.state_env_record_heap); +}; + +function Coq_restype_normal() { return {tag: "Coq_restype_normal" }; } + +function Coq_restype_break() { return {tag: "Coq_restype_break" }; } + +function Coq_restype_continue() { return {tag: "Coq_restype_continue" }; } + +function Coq_restype_return() { return {tag: "Coq_restype_return" }; } + +function Coq_restype_throw() { return {tag: "Coq_restype_throw" }; } + +function Coq_resvalue_empty() { return {tag: "Coq_resvalue_empty" }; } + +function Coq_resvalue_value(value) { return {tag: "Coq_resvalue_value", value: value}; } + +function Coq_resvalue_ref(ref) { return {tag: "Coq_resvalue_ref", ref: ref}; } + + + + + +var res_type = function (x) { + return (x.res_type); +}; + + + +var res_value = function (x) { + return (x.res_value); +}; + + + +var res_label = function (x) { + return (x.res_label); +}; + + + +var res_ref = function (r) { + return ( + { + res_type: Coq_restype_normal(), + res_value: Coq_resvalue_ref(r), + res_label: Coq_label_empty() + }); +}; + + + +var res_val = function (v) { + return ( + { + res_type: Coq_restype_normal(), + res_value: Coq_resvalue_value(v), + res_label: Coq_label_empty() + }); +}; + + + +var res_normal = function (rv) { + return ( + { + res_type: Coq_restype_normal(), + res_value: rv, + res_label: Coq_label_empty() + }); +}; + + + +var res_empty = { + res_type: Coq_restype_normal(), + res_value: Coq_resvalue_empty(), + res_label: Coq_label_empty() +}; + + + +var res_break = function (labo) { + return ( + { + res_type: Coq_restype_break(), + res_value: Coq_resvalue_empty(), + res_label: labo + }); +}; + + + +var res_continue = function (labo) { + return ( + { + res_type: Coq_restype_continue(), + res_value: Coq_resvalue_empty(), + res_label: labo + }); +}; + + + +var res_return = function (v) { + return ( + { + res_type: Coq_restype_return(), + res_value: v, + res_label: Coq_label_empty() + }); +}; + + + +var res_throw = function (v) { + return ( + { + res_type: Coq_restype_throw(), + res_value: v, + res_label: Coq_label_empty() + }); +}; + +function Coq_out_div() { return {tag: "Coq_out_div" }; } + +function Coq_out_ter(state, res) { return {tag: "Coq_out_ter", state: state, res: res}; } + + + +var out_void = function (s) { + return (Coq_out_ter(s, res_empty)); +}; + +function Coq_specret_val(state, res) { return {tag: "Coq_specret_val", state: state, res: res}; } + +function Coq_specret_out(out) { return {tag: "Coq_specret_out", out: out}; } + +function Coq_codetype_func() { return {tag: "Coq_codetype_func" }; } + +function Coq_codetype_global() { return {tag: "Coq_codetype_global" }; } + +function Coq_codetype_eval() { return {tag: "Coq_codetype_eval" }; } +}// end of with Heap +}// end of with Shared + +return { + Coq_unary_op_delete: Coq_unary_op_delete, + Coq_unary_op_void: Coq_unary_op_void, + Coq_unary_op_typeof: Coq_unary_op_typeof, + Coq_unary_op_post_incr: Coq_unary_op_post_incr, + Coq_unary_op_post_decr: Coq_unary_op_post_decr, + Coq_unary_op_pre_incr: Coq_unary_op_pre_incr, + Coq_unary_op_pre_decr: Coq_unary_op_pre_decr, + Coq_unary_op_add: Coq_unary_op_add, + Coq_unary_op_neg: Coq_unary_op_neg, + Coq_unary_op_bitwise_not: Coq_unary_op_bitwise_not, + Coq_unary_op_not: Coq_unary_op_not, + Coq_binary_op_mult: Coq_binary_op_mult, + Coq_binary_op_div: Coq_binary_op_div, + Coq_binary_op_mod: Coq_binary_op_mod, + Coq_binary_op_add: Coq_binary_op_add, + Coq_binary_op_sub: Coq_binary_op_sub, + Coq_binary_op_left_shift: Coq_binary_op_left_shift, + Coq_binary_op_right_shift: Coq_binary_op_right_shift, + Coq_binary_op_unsigned_right_shift: Coq_binary_op_unsigned_right_shift, + Coq_binary_op_lt: Coq_binary_op_lt, + Coq_binary_op_gt: Coq_binary_op_gt, + Coq_binary_op_le: Coq_binary_op_le, + Coq_binary_op_ge: Coq_binary_op_ge, + Coq_binary_op_instanceof: Coq_binary_op_instanceof, + Coq_binary_op_in: Coq_binary_op_in, + Coq_binary_op_equal: Coq_binary_op_equal, + Coq_binary_op_disequal: Coq_binary_op_disequal, + Coq_binary_op_strict_equal: Coq_binary_op_strict_equal, + Coq_binary_op_strict_disequal: Coq_binary_op_strict_disequal, + Coq_binary_op_bitwise_and: Coq_binary_op_bitwise_and, + Coq_binary_op_bitwise_or: Coq_binary_op_bitwise_or, + Coq_binary_op_bitwise_xor: Coq_binary_op_bitwise_xor, + Coq_binary_op_and: Coq_binary_op_and, + Coq_binary_op_or: Coq_binary_op_or, + Coq_binary_op_coma: Coq_binary_op_coma, + Coq_literal_null: Coq_literal_null, + Coq_literal_bool: Coq_literal_bool, + Coq_literal_number: Coq_literal_number, + Coq_literal_string: Coq_literal_string, + Coq_label_empty: Coq_label_empty, + Coq_label_string: Coq_label_string, + strictness_false: strictness_false, + Coq_propname_identifier: Coq_propname_identifier, + Coq_propname_string: Coq_propname_string, + Coq_propname_number: Coq_propname_number, + Coq_expr_this: Coq_expr_this, + Coq_expr_identifier: Coq_expr_identifier, + Coq_expr_literal: Coq_expr_literal, + Coq_expr_object: Coq_expr_object, + Coq_expr_array: Coq_expr_array, + Coq_expr_function: Coq_expr_function, + Coq_expr_access: Coq_expr_access, + Coq_expr_member: Coq_expr_member, + Coq_expr_new: Coq_expr_new, + Coq_expr_call: Coq_expr_call, + Coq_expr_unary_op: Coq_expr_unary_op, + Coq_expr_binary_op: Coq_expr_binary_op, + Coq_expr_conditional: Coq_expr_conditional, + Coq_expr_assign: Coq_expr_assign, + Coq_propbody_val: Coq_propbody_val, + Coq_propbody_get: Coq_propbody_get, + Coq_propbody_set: Coq_propbody_set, + Coq_funcbody_intro: Coq_funcbody_intro, + Coq_stat_expr: Coq_stat_expr, + Coq_stat_label: Coq_stat_label, + Coq_stat_block: Coq_stat_block, + Coq_stat_var_decl: Coq_stat_var_decl, + Coq_stat_if: Coq_stat_if, + Coq_stat_do_while: Coq_stat_do_while, + Coq_stat_while: Coq_stat_while, + Coq_stat_with: Coq_stat_with, + Coq_stat_throw: Coq_stat_throw, + Coq_stat_return: Coq_stat_return, + Coq_stat_break: Coq_stat_break, + Coq_stat_continue: Coq_stat_continue, + Coq_stat_try: Coq_stat_try, + Coq_stat_for: Coq_stat_for, + Coq_stat_for_var: Coq_stat_for_var, + Coq_stat_for_in: Coq_stat_for_in, + Coq_stat_for_in_var: Coq_stat_for_in_var, + Coq_stat_debugger: Coq_stat_debugger, + Coq_stat_switch: Coq_stat_switch, + Coq_switchbody_nodefault: Coq_switchbody_nodefault, + Coq_switchbody_withdefault: Coq_switchbody_withdefault, + Coq_switchclause_intro: Coq_switchclause_intro, + Coq_prog_intro: Coq_prog_intro, + Coq_element_stat: Coq_element_stat, + Coq_element_func_decl: Coq_element_func_decl, + funcdecl_name: funcdecl_name, + funcdecl_parameters: funcdecl_parameters, + funcdecl_body: funcdecl_body, + Coq_mathop_abs: Coq_mathop_abs, + Coq_native_error_eval: Coq_native_error_eval, + Coq_native_error_range: Coq_native_error_range, + Coq_native_error_ref: Coq_native_error_ref, + Coq_native_error_syntax: Coq_native_error_syntax, + Coq_native_error_type: Coq_native_error_type, + Coq_native_error_uri: Coq_native_error_uri, + Coq_prealloc_global: Coq_prealloc_global, + Coq_prealloc_global_eval: Coq_prealloc_global_eval, + Coq_prealloc_global_parse_int: Coq_prealloc_global_parse_int, + Coq_prealloc_global_parse_float: Coq_prealloc_global_parse_float, + Coq_prealloc_global_is_finite: Coq_prealloc_global_is_finite, + Coq_prealloc_global_is_nan: Coq_prealloc_global_is_nan, + Coq_prealloc_global_decode_uri: Coq_prealloc_global_decode_uri, + Coq_prealloc_global_decode_uri_component: Coq_prealloc_global_decode_uri_component, + Coq_prealloc_global_encode_uri: Coq_prealloc_global_encode_uri, + Coq_prealloc_global_encode_uri_component: Coq_prealloc_global_encode_uri_component, + Coq_prealloc_object: Coq_prealloc_object, + Coq_prealloc_object_get_proto_of: Coq_prealloc_object_get_proto_of, + Coq_prealloc_object_get_own_prop_descriptor: Coq_prealloc_object_get_own_prop_descriptor, + Coq_prealloc_object_get_own_prop_name: Coq_prealloc_object_get_own_prop_name, + Coq_prealloc_object_create: Coq_prealloc_object_create, + Coq_prealloc_object_define_prop: Coq_prealloc_object_define_prop, + Coq_prealloc_object_define_props: Coq_prealloc_object_define_props, + Coq_prealloc_object_seal: Coq_prealloc_object_seal, + Coq_prealloc_object_freeze: Coq_prealloc_object_freeze, + Coq_prealloc_object_prevent_extensions: Coq_prealloc_object_prevent_extensions, + Coq_prealloc_object_is_sealed: Coq_prealloc_object_is_sealed, + Coq_prealloc_object_is_frozen: Coq_prealloc_object_is_frozen, + Coq_prealloc_object_is_extensible: Coq_prealloc_object_is_extensible, + Coq_prealloc_object_keys: Coq_prealloc_object_keys, + Coq_prealloc_object_keys_call: Coq_prealloc_object_keys_call, + Coq_prealloc_object_proto: Coq_prealloc_object_proto, + Coq_prealloc_object_proto_to_string: Coq_prealloc_object_proto_to_string, + Coq_prealloc_object_proto_value_of: Coq_prealloc_object_proto_value_of, + Coq_prealloc_object_proto_has_own_prop: Coq_prealloc_object_proto_has_own_prop, + Coq_prealloc_object_proto_is_prototype_of: Coq_prealloc_object_proto_is_prototype_of, + Coq_prealloc_object_proto_prop_is_enumerable: Coq_prealloc_object_proto_prop_is_enumerable, + Coq_prealloc_function: Coq_prealloc_function, + Coq_prealloc_function_proto: Coq_prealloc_function_proto, + Coq_prealloc_function_proto_to_string: Coq_prealloc_function_proto_to_string, + Coq_prealloc_function_proto_apply: Coq_prealloc_function_proto_apply, + Coq_prealloc_function_proto_call: Coq_prealloc_function_proto_call, + Coq_prealloc_function_proto_bind: Coq_prealloc_function_proto_bind, + Coq_prealloc_bool: Coq_prealloc_bool, + Coq_prealloc_bool_proto: Coq_prealloc_bool_proto, + Coq_prealloc_bool_proto_to_string: Coq_prealloc_bool_proto_to_string, + Coq_prealloc_bool_proto_value_of: Coq_prealloc_bool_proto_value_of, + Coq_prealloc_number: Coq_prealloc_number, + Coq_prealloc_number_proto: Coq_prealloc_number_proto, + Coq_prealloc_number_proto_to_string: Coq_prealloc_number_proto_to_string, + Coq_prealloc_number_proto_value_of: Coq_prealloc_number_proto_value_of, + Coq_prealloc_number_proto_to_fixed: Coq_prealloc_number_proto_to_fixed, + Coq_prealloc_number_proto_to_exponential: Coq_prealloc_number_proto_to_exponential, + Coq_prealloc_number_proto_to_precision: Coq_prealloc_number_proto_to_precision, + Coq_prealloc_array: Coq_prealloc_array, + Coq_prealloc_array_is_array: Coq_prealloc_array_is_array, + Coq_prealloc_array_proto: Coq_prealloc_array_proto, + Coq_prealloc_array_proto_to_string: Coq_prealloc_array_proto_to_string, + Coq_prealloc_array_proto_join: Coq_prealloc_array_proto_join, + Coq_prealloc_array_proto_pop: Coq_prealloc_array_proto_pop, + Coq_prealloc_array_proto_push: Coq_prealloc_array_proto_push, + Coq_prealloc_string: Coq_prealloc_string, + Coq_prealloc_string_proto: Coq_prealloc_string_proto, + Coq_prealloc_string_proto_to_string: Coq_prealloc_string_proto_to_string, + Coq_prealloc_string_proto_value_of: Coq_prealloc_string_proto_value_of, + Coq_prealloc_string_proto_char_at: Coq_prealloc_string_proto_char_at, + Coq_prealloc_string_proto_char_code_at: Coq_prealloc_string_proto_char_code_at, + Coq_prealloc_math: Coq_prealloc_math, + Coq_prealloc_date: Coq_prealloc_date, + Coq_prealloc_regexp: Coq_prealloc_regexp, + Coq_prealloc_error: Coq_prealloc_error, + Coq_prealloc_error_proto: Coq_prealloc_error_proto, + Coq_prealloc_error_proto_to_string: Coq_prealloc_error_proto_to_string, + Coq_prealloc_throw_type_error: Coq_prealloc_throw_type_error, + Coq_prealloc_json: Coq_prealloc_json, + Coq_prealloc_mathop: Coq_prealloc_mathop, + Coq_prealloc_native_error: Coq_prealloc_native_error, + Coq_prealloc_native_error_proto: Coq_prealloc_native_error_proto, + Coq_call_default: Coq_call_default, + Coq_call_after_bind: Coq_call_after_bind, + Coq_call_prealloc: Coq_call_prealloc, + Coq_construct_default: Coq_construct_default, + Coq_construct_after_bind: Coq_construct_after_bind, + Coq_construct_prealloc: Coq_construct_prealloc, + Coq_builtin_has_instance_function: Coq_builtin_has_instance_function, + Coq_builtin_has_instance_after_bind: Coq_builtin_has_instance_after_bind, + Coq_builtin_get_default: Coq_builtin_get_default, + Coq_builtin_get_function: Coq_builtin_get_function, + Coq_builtin_get_args_obj: Coq_builtin_get_args_obj, + Coq_builtin_get_own_prop_default: Coq_builtin_get_own_prop_default, + Coq_builtin_get_own_prop_args_obj: Coq_builtin_get_own_prop_args_obj, + Coq_builtin_get_own_prop_string: Coq_builtin_get_own_prop_string, + Coq_builtin_get_prop_default: Coq_builtin_get_prop_default, + Coq_builtin_put_default: Coq_builtin_put_default, + Coq_builtin_can_put_default: Coq_builtin_can_put_default, + Coq_builtin_has_prop_default: Coq_builtin_has_prop_default, + Coq_builtin_delete_default: Coq_builtin_delete_default, + Coq_builtin_delete_args_obj: Coq_builtin_delete_args_obj, + Coq_builtin_default_value_default: Coq_builtin_default_value_default, + Coq_builtin_define_own_prop_default: Coq_builtin_define_own_prop_default, + Coq_builtin_define_own_prop_array: Coq_builtin_define_own_prop_array, + Coq_builtin_define_own_prop_args_obj: Coq_builtin_define_own_prop_args_obj, + Coq_object_loc_normal: Coq_object_loc_normal, + Coq_object_loc_prealloc: Coq_object_loc_prealloc, + Coq_prim_undef: Coq_prim_undef, + Coq_prim_null: Coq_prim_null, + Coq_prim_bool: Coq_prim_bool, + Coq_prim_number: Coq_prim_number, + Coq_prim_string: Coq_prim_string, + Coq_value_prim: Coq_value_prim, + Coq_value_object: Coq_value_object, + Coq_type_undef: Coq_type_undef, + Coq_type_null: Coq_type_null, + Coq_type_bool: Coq_type_bool, + Coq_type_number: Coq_type_number, + Coq_type_string: Coq_type_string, + Coq_type_object: Coq_type_object, + attributes_data_value: attributes_data_value, + attributes_data_writable: attributes_data_writable, + attributes_data_enumerable: attributes_data_enumerable, + attributes_data_configurable: attributes_data_configurable, + attributes_accessor_get: attributes_accessor_get, + attributes_accessor_set: attributes_accessor_set, + attributes_accessor_enumerable: attributes_accessor_enumerable, + attributes_accessor_configurable: attributes_accessor_configurable, + Coq_attributes_data_of: Coq_attributes_data_of, + Coq_attributes_accessor_of: Coq_attributes_accessor_of, + descriptor_value: descriptor_value, + descriptor_writable: descriptor_writable, + descriptor_get: descriptor_get, + descriptor_set: descriptor_set, + descriptor_enumerable: descriptor_enumerable, + descriptor_configurable: descriptor_configurable, + Coq_full_descriptor_undef: Coq_full_descriptor_undef, + Coq_full_descriptor_some: Coq_full_descriptor_some, + Coq_mutability_uninitialized_immutable: Coq_mutability_uninitialized_immutable, + Coq_mutability_immutable: Coq_mutability_immutable, + Coq_mutability_nondeletable: Coq_mutability_nondeletable, + Coq_mutability_deletable: Coq_mutability_deletable, + Coq_env_record_decl: Coq_env_record_decl, + Coq_env_record_object: Coq_env_record_object, + env_loc_global_env_record: env_loc_global_env_record, + execution_ctx_lexical_env: execution_ctx_lexical_env, + execution_ctx_variable_env: execution_ctx_variable_env, + execution_ctx_this_binding: execution_ctx_this_binding, + execution_ctx_strict: execution_ctx_strict, + Coq_ref_base_type_value: Coq_ref_base_type_value, + Coq_ref_base_type_env_loc: Coq_ref_base_type_env_loc, + ref_base: ref_base, + ref_name: ref_name, + ref_strict: ref_strict, + object_proto_: object_proto_, + object_class_: object_class_, + object_extensible_: object_extensible_, + object_prim_value_: object_prim_value_, + object_properties_: object_properties_, + object_get_: object_get_, + object_get_own_prop_: object_get_own_prop_, + object_get_prop_: object_get_prop_, + object_put_: object_put_, + object_can_put_: object_can_put_, + object_has_prop_: object_has_prop_, + object_delete_: object_delete_, + object_default_value_: object_default_value_, + object_define_own_prop_: object_define_own_prop_, + object_construct_: object_construct_, + object_call_: object_call_, + object_has_instance_: object_has_instance_, + object_scope_: object_scope_, + object_formal_parameters_: object_formal_parameters_, + object_code_: object_code_, + object_target_function_: object_target_function_, + object_bound_this_: object_bound_this_, + object_bound_args_: object_bound_args_, + object_parameter_map_: object_parameter_map_, + Coq_delete_event: Coq_delete_event, + Coq_mutateproto_event: Coq_mutateproto_event, + Coq_enumchange_event: Coq_enumchange_event, + state_object_heap: state_object_heap, + state_env_record_heap: state_env_record_heap, + Coq_restype_normal: Coq_restype_normal, + Coq_restype_break: Coq_restype_break, + Coq_restype_continue: Coq_restype_continue, + Coq_restype_return: Coq_restype_return, + Coq_restype_throw: Coq_restype_throw, + Coq_resvalue_empty: Coq_resvalue_empty, + Coq_resvalue_value: Coq_resvalue_value, + Coq_resvalue_ref: Coq_resvalue_ref, + res_type: res_type, + res_value: res_value, + res_label: res_label, + res_ref: res_ref, + res_val: res_val, + res_normal: res_normal, + res_empty: res_empty, + res_break: res_break, + res_continue: res_continue, + res_return: res_return, + res_throw: res_throw, + Coq_out_div: Coq_out_div, + Coq_out_ter: Coq_out_ter, + out_void: out_void, + Coq_specret_val: Coq_specret_val, + Coq_specret_out: Coq_specret_out, + Coq_codetype_func: Coq_codetype_func, + Coq_codetype_global: Coq_codetype_global, + Coq_codetype_eval: Coq_codetype_eval}; +})(); + +/* --------------------- JsSyntaxAux.unlog.js --------------------- */ + +var JsSyntaxAux = (function() { +with (JsSyntax) { +with (LibList) { + +var int_of_native_error = function (e) { + switch (e.tag) { + case "Coq_native_error_eval": + return (1); + case "Coq_native_error_range": + return (2); + case "Coq_native_error_ref": + return (3); + case "Coq_native_error_syntax": + return (4); + case "Coq_native_error_type": + return (5); + case "Coq_native_error_uri": + return (6); + } + +}; + +var int_of_mathop = function (o) { + switch (o.tag) { + case "Coq_mathop_abs": + return (1); + } + +}; + +var int_of_prealloc = function (p) { + switch (p.tag) { + case "Coq_prealloc_global": + return (1); + case "Coq_prealloc_global_eval": + return (2); + case "Coq_prealloc_global_parse_int": + return (3); + case "Coq_prealloc_global_parse_float": + return (4); + case "Coq_prealloc_global_is_finite": + return (5); + case "Coq_prealloc_global_is_nan": + return (6); + case "Coq_prealloc_global_decode_uri": + return (7); + case "Coq_prealloc_global_decode_uri_component": + return (8); + case "Coq_prealloc_global_encode_uri": + return (9); + case "Coq_prealloc_global_encode_uri_component": + return (10); + case "Coq_prealloc_object": + return (11); + case "Coq_prealloc_object_get_proto_of": + return (12); + case "Coq_prealloc_object_get_own_prop_descriptor": + return (13); + case "Coq_prealloc_object_get_own_prop_name": + return (14); + case "Coq_prealloc_object_create": + return (15); + case "Coq_prealloc_object_define_prop": + return (16); + case "Coq_prealloc_object_define_props": + return (17); + case "Coq_prealloc_object_seal": + return (18); + case "Coq_prealloc_object_freeze": + return (19); + case "Coq_prealloc_object_prevent_extensions": + return (20); + case "Coq_prealloc_object_is_sealed": + return (21); + case "Coq_prealloc_object_is_frozen": + return (22); + case "Coq_prealloc_object_is_extensible": + return (23); + case "Coq_prealloc_object_keys": + return (24); + case "Coq_prealloc_object_keys_call": + return (25); + case "Coq_prealloc_object_proto": + return (26); + case "Coq_prealloc_object_proto_to_string": + return (27); + case "Coq_prealloc_object_proto_value_of": + return (28); + case "Coq_prealloc_object_proto_has_own_prop": + return (29); + case "Coq_prealloc_object_proto_is_prototype_of": + return (30); + case "Coq_prealloc_object_proto_prop_is_enumerable": + return (31); + case "Coq_prealloc_function": + return (32); + case "Coq_prealloc_function_proto": + return (33); + case "Coq_prealloc_function_proto_to_string": + return (34); + case "Coq_prealloc_function_proto_apply": + return (35); + case "Coq_prealloc_function_proto_call": + return (36); + case "Coq_prealloc_function_proto_bind": + return (37); + case "Coq_prealloc_bool": + return (38); + case "Coq_prealloc_bool_proto": + return (39); + case "Coq_prealloc_bool_proto_to_string": + return (40); + case "Coq_prealloc_bool_proto_value_of": + return (41); + case "Coq_prealloc_number": + return (42); + case "Coq_prealloc_number_proto": + return (43); + case "Coq_prealloc_number_proto_to_string": + return (44); + case "Coq_prealloc_number_proto_value_of": + return (45); + case "Coq_prealloc_number_proto_to_fixed": + return (46); + case "Coq_prealloc_number_proto_to_exponential": + return (47); + case "Coq_prealloc_number_proto_to_precision": + return (48); + case "Coq_prealloc_array": + return (49); + case "Coq_prealloc_array_is_array": + return (50); + case "Coq_prealloc_array_proto": + return (51); + case "Coq_prealloc_array_proto_to_string": + return (52); + case "Coq_prealloc_array_proto_join": + return (53); + case "Coq_prealloc_array_proto_pop": + return (54); + case "Coq_prealloc_array_proto_push": + return (55); + case "Coq_prealloc_string": + return (56); + case "Coq_prealloc_string_proto": + return (57); + case "Coq_prealloc_string_proto_to_string": + return (58); + case "Coq_prealloc_string_proto_value_of": + return (59); + case "Coq_prealloc_string_proto_char_at": + return (60); + case "Coq_prealloc_string_proto_char_code_at": + return (61); + case "Coq_prealloc_math": + return (62); + case "Coq_prealloc_date": + return (63); + case "Coq_prealloc_regexp": + return (64); + case "Coq_prealloc_error": + return (65); + case "Coq_prealloc_error_proto": + return (66); + case "Coq_prealloc_error_proto_to_string": + return (67); + case "Coq_prealloc_throw_type_error": + return (68); + case "Coq_prealloc_json": + return (69); + case "Coq_prealloc_mathop": + var o = p.mathop; + return ((100 + int_of_mathop(o))); + case "Coq_prealloc_native_error": + var e = p.error; + return ((200 + int_of_native_error(e))); + case "Coq_prealloc_native_error_proto": + var e = p.error; + return ((300 + int_of_native_error(e))); + } + +}; + +var prealloc_cmp = function (p1, p2) { + return (int_compare(int_of_prealloc(p1), int_of_prealloc(p2))); +}; + +var object_loc_cmp = function (l1, l2) { + switch (l1.tag) { + case "Coq_object_loc_normal": + var n1 = l1.address; + switch (l2.tag) { + case "Coq_object_loc_normal": + var n2 = l2.address; + return (int_compare(n1, n2)); + case "Coq_object_loc_prealloc": + var p2 = l2.prealloc; + return (1); + } + + case "Coq_object_loc_prealloc": + var p1 = l1.prealloc; + switch (l2.tag) { + case "Coq_object_loc_normal": + var n2 = l2.address; + return (-1); + case "Coq_object_loc_prealloc": + var p2 = l2.prealloc; + return (prealloc_cmp(p1, p2)); + } + + } + +}; + + + +var object_create = function (vproto, sclass, bextens, p) { + return ( + { + object_proto_: vproto, + object_class_: sclass, + object_extensible_: bextens, + object_prim_value_: None(), + object_properties_: p, + object_get_: Coq_builtin_get_default(), + object_get_own_prop_: Coq_builtin_get_own_prop_default(), + object_get_prop_: Coq_builtin_get_prop_default(), + object_put_: Coq_builtin_put_default(), + object_can_put_: Coq_builtin_can_put_default(), + object_has_prop_: Coq_builtin_has_prop_default(), + object_delete_: Coq_builtin_delete_default(), + object_default_value_: Coq_builtin_default_value_default(), + object_define_own_prop_: Coq_builtin_define_own_prop_default(), + object_construct_: None(), + object_call_: None(), + object_has_instance_: None(), + object_scope_: None(), + object_formal_parameters_: None(), + object_code_: None(), + object_target_function_: None(), + object_bound_this_: None(), + object_bound_args_: None(), + object_parameter_map_: None() + }); +}; + + + +var object_set_proto = function (o, v) { + var x1 = o.object_proto_, x2 = o.object_class_, x3 = o.object_extensible_, + x4 = o.object_prim_value_, x5 = o.object_properties_, x6 = o.object_get_, + x7 = o.object_get_own_prop_, x8 = o.object_get_prop_, x9 = o.object_put_, + x10 = o.object_can_put_, x11 = o.object_has_prop_, + x12 = o.object_delete_, x13 = o.object_default_value_, + x14 = o.object_define_own_prop_, x15 = o.object_construct_, + x16 = o.object_call_, x17 = o.object_has_instance_, + x18 = o.object_scope_, x19 = o.object_formal_parameters_, + x20 = o.object_code_, x21 = o.object_target_function_, + x22 = o.object_bound_this_, x23 = o.object_bound_args_, + x24 = o.object_parameter_map_; + return ( + { + object_proto_: v, + object_class_: x2, + object_extensible_: x3, + object_prim_value_: x4, + object_properties_: x5, + object_get_: x6, + object_get_own_prop_: x7, + object_get_prop_: x8, + object_put_: x9, + object_can_put_: x10, + object_has_prop_: x11, + object_delete_: x12, + object_default_value_: x13, + object_define_own_prop_: x14, + object_construct_: x15, + object_call_: x16, + object_has_instance_: x17, + object_scope_: x18, + object_formal_parameters_: x19, + object_code_: x20, + object_target_function_: x21, + object_bound_this_: x22, + object_bound_args_: x23, + object_parameter_map_: x24 + }); +}; + + + +var object_set_class = function (o, s) { + var x1 = o.object_proto_, x2 = o.object_class_, x3 = o.object_extensible_, + x4 = o.object_prim_value_, x5 = o.object_properties_, x6 = o.object_get_, + x7 = o.object_get_own_prop_, x8 = o.object_get_prop_, x9 = o.object_put_, + x10 = o.object_can_put_, x11 = o.object_has_prop_, + x12 = o.object_delete_, x13 = o.object_default_value_, + x14 = o.object_define_own_prop_, x15 = o.object_construct_, + x16 = o.object_call_, x17 = o.object_has_instance_, + x18 = o.object_scope_, x19 = o.object_formal_parameters_, + x20 = o.object_code_, x21 = o.object_target_function_, + x22 = o.object_bound_this_, x23 = o.object_bound_args_, + x24 = o.object_parameter_map_; + return ( + { + object_proto_: x1, + object_class_: s, + object_extensible_: x3, + object_prim_value_: x4, + object_properties_: x5, + object_get_: x6, + object_get_own_prop_: x7, + object_get_prop_: x8, + object_put_: x9, + object_can_put_: x10, + object_has_prop_: x11, + object_delete_: x12, + object_default_value_: x13, + object_define_own_prop_: x14, + object_construct_: x15, + object_call_: x16, + object_has_instance_: x17, + object_scope_: x18, + object_formal_parameters_: x19, + object_code_: x20, + object_target_function_: x21, + object_bound_this_: x22, + object_bound_args_: x23, + object_parameter_map_: x24 + }); +}; + + + +var object_set_extensible = function (o, b) { + var x1 = o.object_proto_, x2 = o.object_class_, x3 = o.object_extensible_, + x4 = o.object_prim_value_, x5 = o.object_properties_, x6 = o.object_get_, + x7 = o.object_get_own_prop_, x8 = o.object_get_prop_, x9 = o.object_put_, + x10 = o.object_can_put_, x11 = o.object_has_prop_, + x12 = o.object_delete_, x13 = o.object_default_value_, + x14 = o.object_define_own_prop_, x15 = o.object_construct_, + x16 = o.object_call_, x17 = o.object_has_instance_, + x18 = o.object_scope_, x19 = o.object_formal_parameters_, + x20 = o.object_code_, x21 = o.object_target_function_, + x22 = o.object_bound_this_, x23 = o.object_bound_args_, + x24 = o.object_parameter_map_; + return ( + { + object_proto_: x1, + object_class_: x2, + object_extensible_: b, + object_prim_value_: x4, + object_properties_: x5, + object_get_: x6, + object_get_own_prop_: x7, + object_get_prop_: x8, + object_put_: x9, + object_can_put_: x10, + object_has_prop_: x11, + object_delete_: x12, + object_default_value_: x13, + object_define_own_prop_: x14, + object_construct_: x15, + object_call_: x16, + object_has_instance_: x17, + object_scope_: x18, + object_formal_parameters_: x19, + object_code_: x20, + object_target_function_: x21, + object_bound_this_: x22, + object_bound_args_: x23, + object_parameter_map_: x24 + }); +}; + + + +var object_with_primitive_value = function (o, v) { + var x1 = o.object_proto_, x2 = o.object_class_, x3 = o.object_extensible_, + x4 = o.object_prim_value_, x5 = o.object_properties_, x6 = o.object_get_, + x7 = o.object_get_own_prop_, x8 = o.object_get_prop_, x9 = o.object_put_, + x10 = o.object_can_put_, x11 = o.object_has_prop_, + x12 = o.object_delete_, x13 = o.object_default_value_, + x14 = o.object_define_own_prop_, x15 = o.object_construct_, + x16 = o.object_call_, x17 = o.object_has_instance_, + x18 = o.object_scope_, x19 = o.object_formal_parameters_, + x20 = o.object_code_, x21 = o.object_target_function_, + x22 = o.object_bound_this_, x23 = o.object_bound_args_, + x24 = o.object_parameter_map_; + return ( + { + object_proto_: x1, + object_class_: x2, + object_extensible_: x3, + object_prim_value_: Some(v), + object_properties_: x5, + object_get_: x6, + object_get_own_prop_: x7, + object_get_prop_: x8, + object_put_: x9, + object_can_put_: x10, + object_has_prop_: x11, + object_delete_: x12, + object_default_value_: x13, + object_define_own_prop_: x14, + object_construct_: x15, + object_call_: x16, + object_has_instance_: x17, + object_scope_: x18, + object_formal_parameters_: x19, + object_code_: x20, + object_target_function_: x21, + object_bound_this_: x22, + object_bound_args_: x23, + object_parameter_map_: x24 + }); +}; + + + +var object_with_extension = function (o, b) { + var x1 = o.object_proto_, x2 = o.object_class_, x3 = o.object_extensible_, + x4 = o.object_prim_value_, x5 = o.object_properties_, x6 = o.object_get_, + x7 = o.object_get_own_prop_, x8 = o.object_get_prop_, x9 = o.object_put_, + x10 = o.object_can_put_, x11 = o.object_has_prop_, + x12 = o.object_delete_, x13 = o.object_default_value_, + x14 = o.object_define_own_prop_, x15 = o.object_construct_, + x16 = o.object_call_, x17 = o.object_has_instance_, + x18 = o.object_scope_, x19 = o.object_formal_parameters_, + x20 = o.object_code_, x21 = o.object_target_function_, + x22 = o.object_bound_this_, x23 = o.object_bound_args_, + x24 = o.object_parameter_map_; + return ( + { + object_proto_: x1, + object_class_: x2, + object_extensible_: b, + object_prim_value_: x4, + object_properties_: x5, + object_get_: x6, + object_get_own_prop_: x7, + object_get_prop_: x8, + object_put_: x9, + object_can_put_: x10, + object_has_prop_: x11, + object_delete_: x12, + object_default_value_: x13, + object_define_own_prop_: x14, + object_construct_: x15, + object_call_: x16, + object_has_instance_: x17, + object_scope_: x18, + object_formal_parameters_: x19, + object_code_: x20, + object_target_function_: x21, + object_bound_this_: x22, + object_bound_args_: x23, + object_parameter_map_: x24 + }); +}; + + + +var object_with_properties = function (o, properties) { + var x1 = o.object_proto_, x2 = o.object_class_, x3 = o.object_extensible_, + x4 = o.object_prim_value_, x5 = o.object_properties_, x6 = o.object_get_, + x7 = o.object_get_own_prop_, x8 = o.object_get_prop_, x9 = o.object_put_, + x10 = o.object_can_put_, x11 = o.object_has_prop_, + x12 = o.object_delete_, x13 = o.object_default_value_, + x14 = o.object_define_own_prop_, x15 = o.object_construct_, + x16 = o.object_call_, x17 = o.object_has_instance_, + x18 = o.object_scope_, x19 = o.object_formal_parameters_, + x20 = o.object_code_, x21 = o.object_target_function_, + x22 = o.object_bound_this_, x23 = o.object_bound_args_, + x24 = o.object_parameter_map_; + return ( + { + object_proto_: x1, + object_class_: x2, + object_extensible_: x3, + object_prim_value_: x4, + object_properties_: properties, + object_get_: x6, + object_get_own_prop_: x7, + object_get_prop_: x8, + object_put_: x9, + object_can_put_: x10, + object_has_prop_: x11, + object_delete_: x12, + object_default_value_: x13, + object_define_own_prop_: x14, + object_construct_: x15, + object_call_: x16, + object_has_instance_: x17, + object_scope_: x18, + object_formal_parameters_: x19, + object_code_: x20, + object_target_function_: x21, + object_bound_this_: x22, + object_bound_args_: x23, + object_parameter_map_: x24 + }); +}; + + + +var object_with_get = function (o, g) { + var x1 = o.object_proto_, x2 = o.object_class_, x3 = o.object_extensible_, + x4 = o.object_prim_value_, x5 = o.object_properties_, x6 = o.object_get_, + x7 = o.object_get_own_prop_, x8 = o.object_get_prop_, x9 = o.object_put_, + x10 = o.object_can_put_, x11 = o.object_has_prop_, + x12 = o.object_delete_, x13 = o.object_default_value_, + x14 = o.object_define_own_prop_, x15 = o.object_construct_, + x16 = o.object_call_, x17 = o.object_has_instance_, + x18 = o.object_scope_, x19 = o.object_formal_parameters_, + x20 = o.object_code_, x21 = o.object_target_function_, + x22 = o.object_bound_this_, x23 = o.object_bound_args_, + x24 = o.object_parameter_map_; + return ( + { + object_proto_: x1, + object_class_: x2, + object_extensible_: x3, + object_prim_value_: x4, + object_properties_: x5, + object_get_: g, + object_get_own_prop_: x7, + object_get_prop_: x8, + object_put_: x9, + object_can_put_: x10, + object_has_prop_: x11, + object_delete_: x12, + object_default_value_: x13, + object_define_own_prop_: x14, + object_construct_: x15, + object_call_: x16, + object_has_instance_: x17, + object_scope_: x18, + object_formal_parameters_: x19, + object_code_: x20, + object_target_function_: x21, + object_bound_this_: x22, + object_bound_args_: x23, + object_parameter_map_: x24 + }); +}; + + + +var object_with_get_own_property = function (o, gop) { + var x1 = o.object_proto_, x2 = o.object_class_, x3 = o.object_extensible_, + x4 = o.object_prim_value_, x5 = o.object_properties_, x6 = o.object_get_, + x7 = o.object_get_own_prop_, x8 = o.object_get_prop_, x9 = o.object_put_, + x10 = o.object_can_put_, x11 = o.object_has_prop_, + x12 = o.object_delete_, x13 = o.object_default_value_, + x14 = o.object_define_own_prop_, x15 = o.object_construct_, + x16 = o.object_call_, x17 = o.object_has_instance_, + x18 = o.object_scope_, x19 = o.object_formal_parameters_, + x20 = o.object_code_, x21 = o.object_target_function_, + x22 = o.object_bound_this_, x23 = o.object_bound_args_, + x24 = o.object_parameter_map_; + return ( + { + object_proto_: x1, + object_class_: x2, + object_extensible_: x3, + object_prim_value_: x4, + object_properties_: x5, + object_get_: x6, + object_get_own_prop_: gop, + object_get_prop_: x8, + object_put_: x9, + object_can_put_: x10, + object_has_prop_: x11, + object_delete_: x12, + object_default_value_: x13, + object_define_own_prop_: x14, + object_construct_: x15, + object_call_: x16, + object_has_instance_: x17, + object_scope_: x18, + object_formal_parameters_: x19, + object_code_: x20, + object_target_function_: x21, + object_bound_this_: x22, + object_bound_args_: x23, + object_parameter_map_: x24 + }); +}; + + + +var object_with_invokation = function (o, constr, call0, has_instance) { + var x1 = o.object_proto_, x2 = o.object_class_, x3 = o.object_extensible_, + x4 = o.object_prim_value_, x5 = o.object_properties_, x6 = o.object_get_, + x7 = o.object_get_own_prop_, x8 = o.object_get_prop_, x9 = o.object_put_, + x10 = o.object_can_put_, x11 = o.object_has_prop_, + x12 = o.object_delete_, x13 = o.object_default_value_, + x14 = o.object_define_own_prop_, x15 = o.object_construct_, + x16 = o.object_call_, x17 = o.object_has_instance_, + x18 = o.object_scope_, x19 = o.object_formal_parameters_, + x20 = o.object_code_, x21 = o.object_target_function_, + x22 = o.object_bound_this_, x23 = o.object_bound_args_, + x24 = o.object_parameter_map_; + return ( + { + object_proto_: x1, + object_class_: x2, + object_extensible_: x3, + object_prim_value_: x4, + object_properties_: x5, + object_get_: x6, + object_get_own_prop_: x7, + object_get_prop_: x8, + object_put_: x9, + object_can_put_: x10, + object_has_prop_: x11, + object_delete_: x12, + object_default_value_: x13, + object_define_own_prop_: x14, + object_construct_: constr, + object_call_: call0, + object_has_instance_: has_instance, + object_scope_: x18, + object_formal_parameters_: x19, + object_code_: x20, + object_target_function_: x21, + object_bound_this_: x22, + object_bound_args_: x23, + object_parameter_map_: x24 + }); +}; + + + +var object_with_scope = function (o, scope) { + var x1 = o.object_proto_, x2 = o.object_class_, x3 = o.object_extensible_, + x4 = o.object_prim_value_, x5 = o.object_properties_, x6 = o.object_get_, + x7 = o.object_get_own_prop_, x8 = o.object_get_prop_, x9 = o.object_put_, + x10 = o.object_can_put_, x11 = o.object_has_prop_, + x12 = o.object_delete_, x13 = o.object_default_value_, + x14 = o.object_define_own_prop_, x15 = o.object_construct_, + x16 = o.object_call_, x17 = o.object_has_instance_, + x18 = o.object_scope_, x19 = o.object_formal_parameters_, + x20 = o.object_code_, x21 = o.object_target_function_, + x22 = o.object_bound_this_, x23 = o.object_bound_args_, + x24 = o.object_parameter_map_; + return ( + { + object_proto_: x1, + object_class_: x2, + object_extensible_: x3, + object_prim_value_: x4, + object_properties_: x5, + object_get_: x6, + object_get_own_prop_: x7, + object_get_prop_: x8, + object_put_: x9, + object_can_put_: x10, + object_has_prop_: x11, + object_delete_: x12, + object_default_value_: x13, + object_define_own_prop_: x14, + object_construct_: x15, + object_call_: x16, + object_has_instance_: x17, + object_scope_: scope, + object_formal_parameters_: x19, + object_code_: x20, + object_target_function_: x21, + object_bound_this_: x22, + object_bound_args_: x23, + object_parameter_map_: x24 + }); +}; + + + +var object_with_formal_params = function (o, params) { + var x1 = o.object_proto_, x2 = o.object_class_, x3 = o.object_extensible_, + x4 = o.object_prim_value_, x5 = o.object_properties_, x6 = o.object_get_, + x7 = o.object_get_own_prop_, x8 = o.object_get_prop_, x9 = o.object_put_, + x10 = o.object_can_put_, x11 = o.object_has_prop_, + x12 = o.object_delete_, x13 = o.object_default_value_, + x14 = o.object_define_own_prop_, x15 = o.object_construct_, + x16 = o.object_call_, x17 = o.object_has_instance_, + x18 = o.object_scope_, x19 = o.object_formal_parameters_, + x20 = o.object_code_, x21 = o.object_target_function_, + x22 = o.object_bound_this_, x23 = o.object_bound_args_, + x24 = o.object_parameter_map_; + return ( + { + object_proto_: x1, + object_class_: x2, + object_extensible_: x3, + object_prim_value_: x4, + object_properties_: x5, + object_get_: x6, + object_get_own_prop_: x7, + object_get_prop_: x8, + object_put_: x9, + object_can_put_: x10, + object_has_prop_: x11, + object_delete_: x12, + object_default_value_: x13, + object_define_own_prop_: x14, + object_construct_: x15, + object_call_: x16, + object_has_instance_: x17, + object_scope_: x18, + object_formal_parameters_: params, + object_code_: x20, + object_target_function_: x21, + object_bound_this_: x22, + object_bound_args_: x23, + object_parameter_map_: x24 + }); +}; + + + +var object_with_details = function (o, scope, params, code, target, boundthis, boundargs, paramsmap) { + var x1 = o.object_proto_, x2 = o.object_class_, x3 = o.object_extensible_, + x4 = o.object_prim_value_, x5 = o.object_properties_, x6 = o.object_get_, + x7 = o.object_get_own_prop_, x8 = o.object_get_prop_, x9 = o.object_put_, + x10 = o.object_can_put_, x11 = o.object_has_prop_, + x12 = o.object_delete_, x13 = o.object_default_value_, + x14 = o.object_define_own_prop_, x15 = o.object_construct_, + x16 = o.object_call_, x17 = o.object_has_instance_, + x18 = o.object_scope_, x19 = o.object_formal_parameters_, + x20 = o.object_code_, x21 = o.object_target_function_, + x22 = o.object_bound_this_, x23 = o.object_bound_args_, + x24 = o.object_parameter_map_; + return ( + { + object_proto_: x1, + object_class_: x2, + object_extensible_: x3, + object_prim_value_: x4, + object_properties_: x5, + object_get_: x6, + object_get_own_prop_: x7, + object_get_prop_: x8, + object_put_: x9, + object_can_put_: x10, + object_has_prop_: x11, + object_delete_: x12, + object_default_value_: x13, + object_define_own_prop_: x14, + object_construct_: x15, + object_call_: x16, + object_has_instance_: x17, + object_scope_: scope, + object_formal_parameters_: params, + object_code_: code, + object_target_function_: target, + object_bound_this_: boundthis, + object_bound_args_: boundargs, + object_parameter_map_: paramsmap + }); +}; + + + +var object_for_array = function (o, defineownproperty) { + var x1 = o.object_proto_, x2 = o.object_class_, x3 = o.object_extensible_, + x4 = o.object_prim_value_, x5 = o.object_properties_, x6 = o.object_get_, + x7 = o.object_get_own_prop_, x8 = o.object_get_prop_, x9 = o.object_put_, + x10 = o.object_can_put_, x11 = o.object_has_prop_, + x12 = o.object_delete_, x13 = o.object_default_value_, + x14 = o.object_define_own_prop_, x15 = o.object_construct_, + x16 = o.object_call_, x17 = o.object_has_instance_, + x18 = o.object_scope_, x19 = o.object_formal_parameters_, + x20 = o.object_code_, x21 = o.object_target_function_, + x22 = o.object_bound_this_, x23 = o.object_bound_args_, + x24 = o.object_parameter_map_; + return ( + { + object_proto_: x1, + object_class_: x2, + object_extensible_: x3, + object_prim_value_: x4, + object_properties_: x5, + object_get_: x6, + object_get_own_prop_: x7, + object_get_prop_: x8, + object_put_: x9, + object_can_put_: x10, + object_has_prop_: x11, + object_delete_: x12, + object_default_value_: x13, + object_define_own_prop_: defineownproperty, + object_construct_: x15, + object_call_: x16, + object_has_instance_: x17, + object_scope_: x18, + object_formal_parameters_: x19, + object_code_: x20, + object_target_function_: x21, + object_bound_this_: x22, + object_bound_args_: x23, + object_parameter_map_: x24 + }); +}; + + + +var object_for_args_object = function (o, paramsmap, get, getownproperty, defineownproperty, delete_prop) { + var x1 = o.object_proto_, x2 = o.object_class_, x3 = o.object_extensible_, + x4 = o.object_prim_value_, x5 = o.object_properties_, x6 = o.object_get_, + x7 = o.object_get_own_prop_, x8 = o.object_get_prop_, x9 = o.object_put_, + x10 = o.object_can_put_, x11 = o.object_has_prop_, + x12 = o.object_delete_, x13 = o.object_default_value_, + x14 = o.object_define_own_prop_, x15 = o.object_construct_, + x16 = o.object_call_, x17 = o.object_has_instance_, + x18 = o.object_scope_, x19 = o.object_formal_parameters_, + x20 = o.object_code_, x21 = o.object_target_function_, + x22 = o.object_bound_this_, x23 = o.object_bound_args_, + x24 = o.object_parameter_map_; + return ( + { + object_proto_: x1, + object_class_: x2, + object_extensible_: x3, + object_prim_value_: x4, + object_properties_: x5, + object_get_: get, + object_get_own_prop_: getownproperty, + object_get_prop_: x8, + object_put_: x9, + object_can_put_: x10, + object_has_prop_: x11, + object_delete_: delete_prop, + object_default_value_: x13, + object_define_own_prop_: defineownproperty, + object_construct_: x15, + object_call_: x16, + object_has_instance_: x17, + object_scope_: x18, + object_formal_parameters_: x19, + object_code_: x20, + object_target_function_: x21, + object_bound_this_: x22, + object_bound_args_: x23, + object_parameter_map_: Some(paramsmap) + }); +}; + + + +var mathop_compare = function (m1, m2) { + switch (m1.tag) { + case "Coq_mathop_abs": + switch (m2.tag) { + case "Coq_mathop_abs": + return (true); + } + + } + +}; + + + +var prealloc_compare = function (bl1, bl2) { + return (_compare_JsSyntax_prealloc(bl1, bl2)); +}; + + + +var object_loc_compare = function (l1, l2) { + switch (l1.tag) { + case "Coq_object_loc_normal": + var ln1 = l1.address; + switch (l2.tag) { + case "Coq_object_loc_normal": + var ln2 = l2.address; + return (nat_eq(ln1, ln2)); + case "Coq_object_loc_prealloc": + var p = l2.prealloc; + return (false); + } + + case "Coq_object_loc_prealloc": + var bl1 = l1.prealloc; + switch (l2.tag) { + case "Coq_object_loc_normal": + var n = l2.address; + return (false); + case "Coq_object_loc_prealloc": + var bl2 = l2.prealloc; + return (prealloc_compare(bl1, bl2)); + } + + } + +}; + + + +var prim_compare = function (w1, w2) { + switch (w1.tag) { + case "Coq_prim_undef": + switch (w2.tag) { + case "Coq_prim_undef": + return (true); + case "Coq_prim_null": + return (false); + case "Coq_prim_bool": + var b = w2.value; + return (false); + case "Coq_prim_number": + var n = w2.value; + return (false); + case "Coq_prim_string": + var s = w2.value; + return (false); + } + + case "Coq_prim_null": + switch (w2.tag) { + case "Coq_prim_undef": + return (false); + case "Coq_prim_null": + return (true); + case "Coq_prim_bool": + var b = w2.value; + return (false); + case "Coq_prim_number": + var n = w2.value; + return (false); + case "Coq_prim_string": + var s = w2.value; + return (false); + } + + case "Coq_prim_bool": + var b1 = w1.value; + switch (w2.tag) { + case "Coq_prim_undef": + return (false); + case "Coq_prim_null": + return (false); + case "Coq_prim_bool": + var b2 = w2.value; + return (bool_eq(b1, b2)); + case "Coq_prim_number": + var n = w2.value; + return (false); + case "Coq_prim_string": + var s = w2.value; + return (false); + } + + case "Coq_prim_number": + var n1 = w1.value; + switch (w2.tag) { + case "Coq_prim_undef": + return (false); + case "Coq_prim_null": + return (false); + case "Coq_prim_bool": + var b = w2.value; + return (false); + case "Coq_prim_number": + var n2 = w2.value; + return ((n1 === n2)); + case "Coq_prim_string": + var s = w2.value; + return (false); + } + + case "Coq_prim_string": + var s1 = w1.value; + switch (w2.tag) { + case "Coq_prim_undef": + return (false); + case "Coq_prim_null": + return (false); + case "Coq_prim_bool": + var b = w2.value; + return (false); + case "Coq_prim_number": + var n = w2.value; + return (false); + case "Coq_prim_string": + var s2 = w2.value; + return (string_eq(s1, s2)); + } + + } + +}; + + + +var value_compare = function (v1, v2) { + switch (v1.tag) { + case "Coq_value_prim": + var w1 = v1.value; + switch (v2.tag) { + case "Coq_value_prim": + var w2 = v2.value; + return (prim_compare(w1, w2)); + case "Coq_value_object": + var o = v2.value; + return (false); + } + + case "Coq_value_object": + var l1 = v1.value; + switch (v2.tag) { + case "Coq_value_prim": + var p = v2.value; + return (false); + case "Coq_value_object": + var l2 = v2.value; + return (object_loc_compare(l1, l2)); + } + + } + +}; + + + +var mutability_compare = function (m1, m2) { + switch (m1.tag) { + case "Coq_mutability_uninitialized_immutable": + switch (m2.tag) { + case "Coq_mutability_uninitialized_immutable": + return (true); + case "Coq_mutability_immutable": + return (false); + case "Coq_mutability_nondeletable": + return (false); + case "Coq_mutability_deletable": + return (false); + } + + case "Coq_mutability_immutable": + switch (m2.tag) { + case "Coq_mutability_uninitialized_immutable": + return (false); + case "Coq_mutability_immutable": + return (true); + case "Coq_mutability_nondeletable": + return (false); + case "Coq_mutability_deletable": + return (false); + } + + case "Coq_mutability_nondeletable": + switch (m2.tag) { + case "Coq_mutability_uninitialized_immutable": + return (false); + case "Coq_mutability_immutable": + return (false); + case "Coq_mutability_nondeletable": + return (true); + case "Coq_mutability_deletable": + return (false); + } + + case "Coq_mutability_deletable": + switch (m2.tag) { + case "Coq_mutability_uninitialized_immutable": + return (false); + case "Coq_mutability_immutable": + return (false); + case "Coq_mutability_nondeletable": + return (false); + case "Coq_mutability_deletable": + return (true); + } + + } + +}; + + + +var ref_base_type_compare = function (rb1, rb2) { + switch (rb1.tag) { + case "Coq_ref_base_type_value": + var v1 = rb1.value; + switch (rb2.tag) { + case "Coq_ref_base_type_value": + var v2 = rb2.value; + return (value_compare(v1, v2)); + case "Coq_ref_base_type_env_loc": + var e = rb2.value; + return (false); + } + + case "Coq_ref_base_type_env_loc": + var l1 = rb1.value; + switch (rb2.tag) { + case "Coq_ref_base_type_value": + var v = rb2.value; + return (false); + case "Coq_ref_base_type_env_loc": + var l2 = rb2.value; + return (nat_eq(l1, l2)); + } + + } + +}; + + + +var ref_compare = function (r1, r2) { + return ( + (ref_base_type_compare(r1.ref_base, r2.ref_base) + && (string_eq(r1.ref_name, r2.ref_name) + && bool_eq(r1.ref_strict, r2.ref_strict)))); +}; + + + +var type_compare = function (t1, t2) { + switch (t1.tag) { + case "Coq_type_undef": + switch (t2.tag) { + case "Coq_type_undef": + return (true); + case "Coq_type_null": + return (false); + case "Coq_type_bool": + return (false); + case "Coq_type_number": + return (false); + case "Coq_type_string": + return (false); + case "Coq_type_object": + return (false); + } + + case "Coq_type_null": + switch (t2.tag) { + case "Coq_type_undef": + return (false); + case "Coq_type_null": + return (true); + case "Coq_type_bool": + return (false); + case "Coq_type_number": + return (false); + case "Coq_type_string": + return (false); + case "Coq_type_object": + return (false); + } + + case "Coq_type_bool": + switch (t2.tag) { + case "Coq_type_undef": + return (false); + case "Coq_type_null": + return (false); + case "Coq_type_bool": + return (true); + case "Coq_type_number": + return (false); + case "Coq_type_string": + return (false); + case "Coq_type_object": + return (false); + } + + case "Coq_type_number": + switch (t2.tag) { + case "Coq_type_undef": + return (false); + case "Coq_type_null": + return (false); + case "Coq_type_bool": + return (false); + case "Coq_type_number": + return (true); + case "Coq_type_string": + return (false); + case "Coq_type_object": + return (false); + } + + case "Coq_type_string": + switch (t2.tag) { + case "Coq_type_undef": + return (false); + case "Coq_type_null": + return (false); + case "Coq_type_bool": + return (false); + case "Coq_type_number": + return (false); + case "Coq_type_string": + return (true); + case "Coq_type_object": + return (false); + } + + case "Coq_type_object": + switch (t2.tag) { + case "Coq_type_undef": + return (false); + case "Coq_type_null": + return (false); + case "Coq_type_bool": + return (false); + case "Coq_type_number": + return (false); + case "Coq_type_string": + return (false); + case "Coq_type_object": + return (true); + } + + } + +}; + + + +var res_with_value = function (r, rv) { + var rt = r.res_type, old_rv = r.res_value, labopt = r.res_label; + return ({ res_type: rt, + res_value: rv, + res_label: labopt}); +}; + + + +var resvalue_compare = function (rv1, rv2) { + switch (rv1.tag) { + case "Coq_resvalue_empty": + switch (rv2.tag) { + case "Coq_resvalue_empty": + return (true); + case "Coq_resvalue_value": + var v = rv2.value; + return (false); + case "Coq_resvalue_ref": + var r = rv2.ref; + return (false); + } + + case "Coq_resvalue_value": + var v1 = rv1.value; + switch (rv2.tag) { + case "Coq_resvalue_empty": + return (false); + case "Coq_resvalue_value": + var v2 = rv2.value; + return (value_compare(v1, v2)); + case "Coq_resvalue_ref": + var r = rv2.ref; + return (false); + } + + case "Coq_resvalue_ref": + var r1 = rv1.ref; + switch (rv2.tag) { + case "Coq_resvalue_empty": + return (false); + case "Coq_resvalue_value": + var v = rv2.value; + return (false); + case "Coq_resvalue_ref": + var r2 = rv2.ref; + return (ref_compare(r1, r2)); + } + + } + +}; + + + +var binary_op_compare = function (op1, op2) { + switch (op1.tag) { + case "Coq_binary_op_mult": + switch (op2.tag) { + case "Coq_binary_op_mult": + return (true); + case "Coq_binary_op_div": + return (false); + case "Coq_binary_op_mod": + return (false); + case "Coq_binary_op_add": + return (false); + case "Coq_binary_op_sub": + return (false); + case "Coq_binary_op_left_shift": + return (false); + case "Coq_binary_op_right_shift": + return (false); + case "Coq_binary_op_unsigned_right_shift": + return (false); + case "Coq_binary_op_lt": + return (false); + case "Coq_binary_op_gt": + return (false); + case "Coq_binary_op_le": + return (false); + case "Coq_binary_op_ge": + return (false); + case "Coq_binary_op_instanceof": + return (false); + case "Coq_binary_op_in": + return (false); + case "Coq_binary_op_equal": + return (false); + case "Coq_binary_op_disequal": + return (false); + case "Coq_binary_op_strict_equal": + return (false); + case "Coq_binary_op_strict_disequal": + return (false); + case "Coq_binary_op_bitwise_and": + return (false); + case "Coq_binary_op_bitwise_or": + return (false); + case "Coq_binary_op_bitwise_xor": + return (false); + case "Coq_binary_op_and": + return (false); + case "Coq_binary_op_or": + return (false); + case "Coq_binary_op_coma": + return (false); + } + + case "Coq_binary_op_div": + switch (op2.tag) { + case "Coq_binary_op_mult": + return (false); + case "Coq_binary_op_div": + return (true); + case "Coq_binary_op_mod": + return (false); + case "Coq_binary_op_add": + return (false); + case "Coq_binary_op_sub": + return (false); + case "Coq_binary_op_left_shift": + return (false); + case "Coq_binary_op_right_shift": + return (false); + case "Coq_binary_op_unsigned_right_shift": + return (false); + case "Coq_binary_op_lt": + return (false); + case "Coq_binary_op_gt": + return (false); + case "Coq_binary_op_le": + return (false); + case "Coq_binary_op_ge": + return (false); + case "Coq_binary_op_instanceof": + return (false); + case "Coq_binary_op_in": + return (false); + case "Coq_binary_op_equal": + return (false); + case "Coq_binary_op_disequal": + return (false); + case "Coq_binary_op_strict_equal": + return (false); + case "Coq_binary_op_strict_disequal": + return (false); + case "Coq_binary_op_bitwise_and": + return (false); + case "Coq_binary_op_bitwise_or": + return (false); + case "Coq_binary_op_bitwise_xor": + return (false); + case "Coq_binary_op_and": + return (false); + case "Coq_binary_op_or": + return (false); + case "Coq_binary_op_coma": + return (false); + } + + case "Coq_binary_op_mod": + switch (op2.tag) { + case "Coq_binary_op_mult": + return (false); + case "Coq_binary_op_div": + return (false); + case "Coq_binary_op_mod": + return (true); + case "Coq_binary_op_add": + return (false); + case "Coq_binary_op_sub": + return (false); + case "Coq_binary_op_left_shift": + return (false); + case "Coq_binary_op_right_shift": + return (false); + case "Coq_binary_op_unsigned_right_shift": + return (false); + case "Coq_binary_op_lt": + return (false); + case "Coq_binary_op_gt": + return (false); + case "Coq_binary_op_le": + return (false); + case "Coq_binary_op_ge": + return (false); + case "Coq_binary_op_instanceof": + return (false); + case "Coq_binary_op_in": + return (false); + case "Coq_binary_op_equal": + return (false); + case "Coq_binary_op_disequal": + return (false); + case "Coq_binary_op_strict_equal": + return (false); + case "Coq_binary_op_strict_disequal": + return (false); + case "Coq_binary_op_bitwise_and": + return (false); + case "Coq_binary_op_bitwise_or": + return (false); + case "Coq_binary_op_bitwise_xor": + return (false); + case "Coq_binary_op_and": + return (false); + case "Coq_binary_op_or": + return (false); + case "Coq_binary_op_coma": + return (false); + } + + case "Coq_binary_op_add": + switch (op2.tag) { + case "Coq_binary_op_mult": + return (false); + case "Coq_binary_op_div": + return (false); + case "Coq_binary_op_mod": + return (false); + case "Coq_binary_op_add": + return (true); + case "Coq_binary_op_sub": + return (false); + case "Coq_binary_op_left_shift": + return (false); + case "Coq_binary_op_right_shift": + return (false); + case "Coq_binary_op_unsigned_right_shift": + return (false); + case "Coq_binary_op_lt": + return (false); + case "Coq_binary_op_gt": + return (false); + case "Coq_binary_op_le": + return (false); + case "Coq_binary_op_ge": + return (false); + case "Coq_binary_op_instanceof": + return (false); + case "Coq_binary_op_in": + return (false); + case "Coq_binary_op_equal": + return (false); + case "Coq_binary_op_disequal": + return (false); + case "Coq_binary_op_strict_equal": + return (false); + case "Coq_binary_op_strict_disequal": + return (false); + case "Coq_binary_op_bitwise_and": + return (false); + case "Coq_binary_op_bitwise_or": + return (false); + case "Coq_binary_op_bitwise_xor": + return (false); + case "Coq_binary_op_and": + return (false); + case "Coq_binary_op_or": + return (false); + case "Coq_binary_op_coma": + return (false); + } + + case "Coq_binary_op_sub": + switch (op2.tag) { + case "Coq_binary_op_mult": + return (false); + case "Coq_binary_op_div": + return (false); + case "Coq_binary_op_mod": + return (false); + case "Coq_binary_op_add": + return (false); + case "Coq_binary_op_sub": + return (true); + case "Coq_binary_op_left_shift": + return (false); + case "Coq_binary_op_right_shift": + return (false); + case "Coq_binary_op_unsigned_right_shift": + return (false); + case "Coq_binary_op_lt": + return (false); + case "Coq_binary_op_gt": + return (false); + case "Coq_binary_op_le": + return (false); + case "Coq_binary_op_ge": + return (false); + case "Coq_binary_op_instanceof": + return (false); + case "Coq_binary_op_in": + return (false); + case "Coq_binary_op_equal": + return (false); + case "Coq_binary_op_disequal": + return (false); + case "Coq_binary_op_strict_equal": + return (false); + case "Coq_binary_op_strict_disequal": + return (false); + case "Coq_binary_op_bitwise_and": + return (false); + case "Coq_binary_op_bitwise_or": + return (false); + case "Coq_binary_op_bitwise_xor": + return (false); + case "Coq_binary_op_and": + return (false); + case "Coq_binary_op_or": + return (false); + case "Coq_binary_op_coma": + return (false); + } + + case "Coq_binary_op_left_shift": + switch (op2.tag) { + case "Coq_binary_op_mult": + return (false); + case "Coq_binary_op_div": + return (false); + case "Coq_binary_op_mod": + return (false); + case "Coq_binary_op_add": + return (false); + case "Coq_binary_op_sub": + return (false); + case "Coq_binary_op_left_shift": + return (true); + case "Coq_binary_op_right_shift": + return (false); + case "Coq_binary_op_unsigned_right_shift": + return (false); + case "Coq_binary_op_lt": + return (false); + case "Coq_binary_op_gt": + return (false); + case "Coq_binary_op_le": + return (false); + case "Coq_binary_op_ge": + return (false); + case "Coq_binary_op_instanceof": + return (false); + case "Coq_binary_op_in": + return (false); + case "Coq_binary_op_equal": + return (false); + case "Coq_binary_op_disequal": + return (false); + case "Coq_binary_op_strict_equal": + return (false); + case "Coq_binary_op_strict_disequal": + return (false); + case "Coq_binary_op_bitwise_and": + return (false); + case "Coq_binary_op_bitwise_or": + return (false); + case "Coq_binary_op_bitwise_xor": + return (false); + case "Coq_binary_op_and": + return (false); + case "Coq_binary_op_or": + return (false); + case "Coq_binary_op_coma": + return (false); + } + + case "Coq_binary_op_right_shift": + switch (op2.tag) { + case "Coq_binary_op_mult": + return (false); + case "Coq_binary_op_div": + return (false); + case "Coq_binary_op_mod": + return (false); + case "Coq_binary_op_add": + return (false); + case "Coq_binary_op_sub": + return (false); + case "Coq_binary_op_left_shift": + return (false); + case "Coq_binary_op_right_shift": + return (true); + case "Coq_binary_op_unsigned_right_shift": + return (false); + case "Coq_binary_op_lt": + return (false); + case "Coq_binary_op_gt": + return (false); + case "Coq_binary_op_le": + return (false); + case "Coq_binary_op_ge": + return (false); + case "Coq_binary_op_instanceof": + return (false); + case "Coq_binary_op_in": + return (false); + case "Coq_binary_op_equal": + return (false); + case "Coq_binary_op_disequal": + return (false); + case "Coq_binary_op_strict_equal": + return (false); + case "Coq_binary_op_strict_disequal": + return (false); + case "Coq_binary_op_bitwise_and": + return (false); + case "Coq_binary_op_bitwise_or": + return (false); + case "Coq_binary_op_bitwise_xor": + return (false); + case "Coq_binary_op_and": + return (false); + case "Coq_binary_op_or": + return (false); + case "Coq_binary_op_coma": + return (false); + } + + case "Coq_binary_op_unsigned_right_shift": + switch (op2.tag) { + case "Coq_binary_op_mult": + return (false); + case "Coq_binary_op_div": + return (false); + case "Coq_binary_op_mod": + return (false); + case "Coq_binary_op_add": + return (false); + case "Coq_binary_op_sub": + return (false); + case "Coq_binary_op_left_shift": + return (false); + case "Coq_binary_op_right_shift": + return (false); + case "Coq_binary_op_unsigned_right_shift": + return (true); + case "Coq_binary_op_lt": + return (false); + case "Coq_binary_op_gt": + return (false); + case "Coq_binary_op_le": + return (false); + case "Coq_binary_op_ge": + return (false); + case "Coq_binary_op_instanceof": + return (false); + case "Coq_binary_op_in": + return (false); + case "Coq_binary_op_equal": + return (false); + case "Coq_binary_op_disequal": + return (false); + case "Coq_binary_op_strict_equal": + return (false); + case "Coq_binary_op_strict_disequal": + return (false); + case "Coq_binary_op_bitwise_and": + return (false); + case "Coq_binary_op_bitwise_or": + return (false); + case "Coq_binary_op_bitwise_xor": + return (false); + case "Coq_binary_op_and": + return (false); + case "Coq_binary_op_or": + return (false); + case "Coq_binary_op_coma": + return (false); + } + + case "Coq_binary_op_lt": + switch (op2.tag) { + case "Coq_binary_op_mult": + return (false); + case "Coq_binary_op_div": + return (false); + case "Coq_binary_op_mod": + return (false); + case "Coq_binary_op_add": + return (false); + case "Coq_binary_op_sub": + return (false); + case "Coq_binary_op_left_shift": + return (false); + case "Coq_binary_op_right_shift": + return (false); + case "Coq_binary_op_unsigned_right_shift": + return (false); + case "Coq_binary_op_lt": + return (true); + case "Coq_binary_op_gt": + return (false); + case "Coq_binary_op_le": + return (false); + case "Coq_binary_op_ge": + return (false); + case "Coq_binary_op_instanceof": + return (false); + case "Coq_binary_op_in": + return (false); + case "Coq_binary_op_equal": + return (false); + case "Coq_binary_op_disequal": + return (false); + case "Coq_binary_op_strict_equal": + return (false); + case "Coq_binary_op_strict_disequal": + return (false); + case "Coq_binary_op_bitwise_and": + return (false); + case "Coq_binary_op_bitwise_or": + return (false); + case "Coq_binary_op_bitwise_xor": + return (false); + case "Coq_binary_op_and": + return (false); + case "Coq_binary_op_or": + return (false); + case "Coq_binary_op_coma": + return (false); + } + + case "Coq_binary_op_gt": + switch (op2.tag) { + case "Coq_binary_op_mult": + return (false); + case "Coq_binary_op_div": + return (false); + case "Coq_binary_op_mod": + return (false); + case "Coq_binary_op_add": + return (false); + case "Coq_binary_op_sub": + return (false); + case "Coq_binary_op_left_shift": + return (false); + case "Coq_binary_op_right_shift": + return (false); + case "Coq_binary_op_unsigned_right_shift": + return (false); + case "Coq_binary_op_lt": + return (false); + case "Coq_binary_op_gt": + return (true); + case "Coq_binary_op_le": + return (false); + case "Coq_binary_op_ge": + return (false); + case "Coq_binary_op_instanceof": + return (false); + case "Coq_binary_op_in": + return (false); + case "Coq_binary_op_equal": + return (false); + case "Coq_binary_op_disequal": + return (false); + case "Coq_binary_op_strict_equal": + return (false); + case "Coq_binary_op_strict_disequal": + return (false); + case "Coq_binary_op_bitwise_and": + return (false); + case "Coq_binary_op_bitwise_or": + return (false); + case "Coq_binary_op_bitwise_xor": + return (false); + case "Coq_binary_op_and": + return (false); + case "Coq_binary_op_or": + return (false); + case "Coq_binary_op_coma": + return (false); + } + + case "Coq_binary_op_le": + switch (op2.tag) { + case "Coq_binary_op_mult": + return (false); + case "Coq_binary_op_div": + return (false); + case "Coq_binary_op_mod": + return (false); + case "Coq_binary_op_add": + return (false); + case "Coq_binary_op_sub": + return (false); + case "Coq_binary_op_left_shift": + return (false); + case "Coq_binary_op_right_shift": + return (false); + case "Coq_binary_op_unsigned_right_shift": + return (false); + case "Coq_binary_op_lt": + return (false); + case "Coq_binary_op_gt": + return (false); + case "Coq_binary_op_le": + return (true); + case "Coq_binary_op_ge": + return (false); + case "Coq_binary_op_instanceof": + return (false); + case "Coq_binary_op_in": + return (false); + case "Coq_binary_op_equal": + return (false); + case "Coq_binary_op_disequal": + return (false); + case "Coq_binary_op_strict_equal": + return (false); + case "Coq_binary_op_strict_disequal": + return (false); + case "Coq_binary_op_bitwise_and": + return (false); + case "Coq_binary_op_bitwise_or": + return (false); + case "Coq_binary_op_bitwise_xor": + return (false); + case "Coq_binary_op_and": + return (false); + case "Coq_binary_op_or": + return (false); + case "Coq_binary_op_coma": + return (false); + } + + case "Coq_binary_op_ge": + switch (op2.tag) { + case "Coq_binary_op_mult": + return (false); + case "Coq_binary_op_div": + return (false); + case "Coq_binary_op_mod": + return (false); + case "Coq_binary_op_add": + return (false); + case "Coq_binary_op_sub": + return (false); + case "Coq_binary_op_left_shift": + return (false); + case "Coq_binary_op_right_shift": + return (false); + case "Coq_binary_op_unsigned_right_shift": + return (false); + case "Coq_binary_op_lt": + return (false); + case "Coq_binary_op_gt": + return (false); + case "Coq_binary_op_le": + return (false); + case "Coq_binary_op_ge": + return (true); + case "Coq_binary_op_instanceof": + return (false); + case "Coq_binary_op_in": + return (false); + case "Coq_binary_op_equal": + return (false); + case "Coq_binary_op_disequal": + return (false); + case "Coq_binary_op_strict_equal": + return (false); + case "Coq_binary_op_strict_disequal": + return (false); + case "Coq_binary_op_bitwise_and": + return (false); + case "Coq_binary_op_bitwise_or": + return (false); + case "Coq_binary_op_bitwise_xor": + return (false); + case "Coq_binary_op_and": + return (false); + case "Coq_binary_op_or": + return (false); + case "Coq_binary_op_coma": + return (false); + } + + case "Coq_binary_op_instanceof": + switch (op2.tag) { + case "Coq_binary_op_mult": + return (false); + case "Coq_binary_op_div": + return (false); + case "Coq_binary_op_mod": + return (false); + case "Coq_binary_op_add": + return (false); + case "Coq_binary_op_sub": + return (false); + case "Coq_binary_op_left_shift": + return (false); + case "Coq_binary_op_right_shift": + return (false); + case "Coq_binary_op_unsigned_right_shift": + return (false); + case "Coq_binary_op_lt": + return (false); + case "Coq_binary_op_gt": + return (false); + case "Coq_binary_op_le": + return (false); + case "Coq_binary_op_ge": + return (false); + case "Coq_binary_op_instanceof": + return (true); + case "Coq_binary_op_in": + return (false); + case "Coq_binary_op_equal": + return (false); + case "Coq_binary_op_disequal": + return (false); + case "Coq_binary_op_strict_equal": + return (false); + case "Coq_binary_op_strict_disequal": + return (false); + case "Coq_binary_op_bitwise_and": + return (false); + case "Coq_binary_op_bitwise_or": + return (false); + case "Coq_binary_op_bitwise_xor": + return (false); + case "Coq_binary_op_and": + return (false); + case "Coq_binary_op_or": + return (false); + case "Coq_binary_op_coma": + return (false); + } + + case "Coq_binary_op_in": + switch (op2.tag) { + case "Coq_binary_op_mult": + return (false); + case "Coq_binary_op_div": + return (false); + case "Coq_binary_op_mod": + return (false); + case "Coq_binary_op_add": + return (false); + case "Coq_binary_op_sub": + return (false); + case "Coq_binary_op_left_shift": + return (false); + case "Coq_binary_op_right_shift": + return (false); + case "Coq_binary_op_unsigned_right_shift": + return (false); + case "Coq_binary_op_lt": + return (false); + case "Coq_binary_op_gt": + return (false); + case "Coq_binary_op_le": + return (false); + case "Coq_binary_op_ge": + return (false); + case "Coq_binary_op_instanceof": + return (false); + case "Coq_binary_op_in": + return (true); + case "Coq_binary_op_equal": + return (false); + case "Coq_binary_op_disequal": + return (false); + case "Coq_binary_op_strict_equal": + return (false); + case "Coq_binary_op_strict_disequal": + return (false); + case "Coq_binary_op_bitwise_and": + return (false); + case "Coq_binary_op_bitwise_or": + return (false); + case "Coq_binary_op_bitwise_xor": + return (false); + case "Coq_binary_op_and": + return (false); + case "Coq_binary_op_or": + return (false); + case "Coq_binary_op_coma": + return (false); + } + + case "Coq_binary_op_equal": + switch (op2.tag) { + case "Coq_binary_op_mult": + return (false); + case "Coq_binary_op_div": + return (false); + case "Coq_binary_op_mod": + return (false); + case "Coq_binary_op_add": + return (false); + case "Coq_binary_op_sub": + return (false); + case "Coq_binary_op_left_shift": + return (false); + case "Coq_binary_op_right_shift": + return (false); + case "Coq_binary_op_unsigned_right_shift": + return (false); + case "Coq_binary_op_lt": + return (false); + case "Coq_binary_op_gt": + return (false); + case "Coq_binary_op_le": + return (false); + case "Coq_binary_op_ge": + return (false); + case "Coq_binary_op_instanceof": + return (false); + case "Coq_binary_op_in": + return (false); + case "Coq_binary_op_equal": + return (true); + case "Coq_binary_op_disequal": + return (false); + case "Coq_binary_op_strict_equal": + return (false); + case "Coq_binary_op_strict_disequal": + return (false); + case "Coq_binary_op_bitwise_and": + return (false); + case "Coq_binary_op_bitwise_or": + return (false); + case "Coq_binary_op_bitwise_xor": + return (false); + case "Coq_binary_op_and": + return (false); + case "Coq_binary_op_or": + return (false); + case "Coq_binary_op_coma": + return (false); + } + + case "Coq_binary_op_disequal": + switch (op2.tag) { + case "Coq_binary_op_mult": + return (false); + case "Coq_binary_op_div": + return (false); + case "Coq_binary_op_mod": + return (false); + case "Coq_binary_op_add": + return (false); + case "Coq_binary_op_sub": + return (false); + case "Coq_binary_op_left_shift": + return (false); + case "Coq_binary_op_right_shift": + return (false); + case "Coq_binary_op_unsigned_right_shift": + return (false); + case "Coq_binary_op_lt": + return (false); + case "Coq_binary_op_gt": + return (false); + case "Coq_binary_op_le": + return (false); + case "Coq_binary_op_ge": + return (false); + case "Coq_binary_op_instanceof": + return (false); + case "Coq_binary_op_in": + return (false); + case "Coq_binary_op_equal": + return (false); + case "Coq_binary_op_disequal": + return (true); + case "Coq_binary_op_strict_equal": + return (false); + case "Coq_binary_op_strict_disequal": + return (false); + case "Coq_binary_op_bitwise_and": + return (false); + case "Coq_binary_op_bitwise_or": + return (false); + case "Coq_binary_op_bitwise_xor": + return (false); + case "Coq_binary_op_and": + return (false); + case "Coq_binary_op_or": + return (false); + case "Coq_binary_op_coma": + return (false); + } + + case "Coq_binary_op_strict_equal": + switch (op2.tag) { + case "Coq_binary_op_mult": + return (false); + case "Coq_binary_op_div": + return (false); + case "Coq_binary_op_mod": + return (false); + case "Coq_binary_op_add": + return (false); + case "Coq_binary_op_sub": + return (false); + case "Coq_binary_op_left_shift": + return (false); + case "Coq_binary_op_right_shift": + return (false); + case "Coq_binary_op_unsigned_right_shift": + return (false); + case "Coq_binary_op_lt": + return (false); + case "Coq_binary_op_gt": + return (false); + case "Coq_binary_op_le": + return (false); + case "Coq_binary_op_ge": + return (false); + case "Coq_binary_op_instanceof": + return (false); + case "Coq_binary_op_in": + return (false); + case "Coq_binary_op_equal": + return (false); + case "Coq_binary_op_disequal": + return (false); + case "Coq_binary_op_strict_equal": + return (true); + case "Coq_binary_op_strict_disequal": + return (false); + case "Coq_binary_op_bitwise_and": + return (false); + case "Coq_binary_op_bitwise_or": + return (false); + case "Coq_binary_op_bitwise_xor": + return (false); + case "Coq_binary_op_and": + return (false); + case "Coq_binary_op_or": + return (false); + case "Coq_binary_op_coma": + return (false); + } + + case "Coq_binary_op_strict_disequal": + switch (op2.tag) { + case "Coq_binary_op_mult": + return (false); + case "Coq_binary_op_div": + return (false); + case "Coq_binary_op_mod": + return (false); + case "Coq_binary_op_add": + return (false); + case "Coq_binary_op_sub": + return (false); + case "Coq_binary_op_left_shift": + return (false); + case "Coq_binary_op_right_shift": + return (false); + case "Coq_binary_op_unsigned_right_shift": + return (false); + case "Coq_binary_op_lt": + return (false); + case "Coq_binary_op_gt": + return (false); + case "Coq_binary_op_le": + return (false); + case "Coq_binary_op_ge": + return (false); + case "Coq_binary_op_instanceof": + return (false); + case "Coq_binary_op_in": + return (false); + case "Coq_binary_op_equal": + return (false); + case "Coq_binary_op_disequal": + return (false); + case "Coq_binary_op_strict_equal": + return (false); + case "Coq_binary_op_strict_disequal": + return (true); + case "Coq_binary_op_bitwise_and": + return (false); + case "Coq_binary_op_bitwise_or": + return (false); + case "Coq_binary_op_bitwise_xor": + return (false); + case "Coq_binary_op_and": + return (false); + case "Coq_binary_op_or": + return (false); + case "Coq_binary_op_coma": + return (false); + } + + case "Coq_binary_op_bitwise_and": + switch (op2.tag) { + case "Coq_binary_op_mult": + return (false); + case "Coq_binary_op_div": + return (false); + case "Coq_binary_op_mod": + return (false); + case "Coq_binary_op_add": + return (false); + case "Coq_binary_op_sub": + return (false); + case "Coq_binary_op_left_shift": + return (false); + case "Coq_binary_op_right_shift": + return (false); + case "Coq_binary_op_unsigned_right_shift": + return (false); + case "Coq_binary_op_lt": + return (false); + case "Coq_binary_op_gt": + return (false); + case "Coq_binary_op_le": + return (false); + case "Coq_binary_op_ge": + return (false); + case "Coq_binary_op_instanceof": + return (false); + case "Coq_binary_op_in": + return (false); + case "Coq_binary_op_equal": + return (false); + case "Coq_binary_op_disequal": + return (false); + case "Coq_binary_op_strict_equal": + return (false); + case "Coq_binary_op_strict_disequal": + return (false); + case "Coq_binary_op_bitwise_and": + return (true); + case "Coq_binary_op_bitwise_or": + return (false); + case "Coq_binary_op_bitwise_xor": + return (false); + case "Coq_binary_op_and": + return (false); + case "Coq_binary_op_or": + return (false); + case "Coq_binary_op_coma": + return (false); + } + + case "Coq_binary_op_bitwise_or": + switch (op2.tag) { + case "Coq_binary_op_mult": + return (false); + case "Coq_binary_op_div": + return (false); + case "Coq_binary_op_mod": + return (false); + case "Coq_binary_op_add": + return (false); + case "Coq_binary_op_sub": + return (false); + case "Coq_binary_op_left_shift": + return (false); + case "Coq_binary_op_right_shift": + return (false); + case "Coq_binary_op_unsigned_right_shift": + return (false); + case "Coq_binary_op_lt": + return (false); + case "Coq_binary_op_gt": + return (false); + case "Coq_binary_op_le": + return (false); + case "Coq_binary_op_ge": + return (false); + case "Coq_binary_op_instanceof": + return (false); + case "Coq_binary_op_in": + return (false); + case "Coq_binary_op_equal": + return (false); + case "Coq_binary_op_disequal": + return (false); + case "Coq_binary_op_strict_equal": + return (false); + case "Coq_binary_op_strict_disequal": + return (false); + case "Coq_binary_op_bitwise_and": + return (false); + case "Coq_binary_op_bitwise_or": + return (true); + case "Coq_binary_op_bitwise_xor": + return (false); + case "Coq_binary_op_and": + return (false); + case "Coq_binary_op_or": + return (false); + case "Coq_binary_op_coma": + return (false); + } + + case "Coq_binary_op_bitwise_xor": + switch (op2.tag) { + case "Coq_binary_op_mult": + return (false); + case "Coq_binary_op_div": + return (false); + case "Coq_binary_op_mod": + return (false); + case "Coq_binary_op_add": + return (false); + case "Coq_binary_op_sub": + return (false); + case "Coq_binary_op_left_shift": + return (false); + case "Coq_binary_op_right_shift": + return (false); + case "Coq_binary_op_unsigned_right_shift": + return (false); + case "Coq_binary_op_lt": + return (false); + case "Coq_binary_op_gt": + return (false); + case "Coq_binary_op_le": + return (false); + case "Coq_binary_op_ge": + return (false); + case "Coq_binary_op_instanceof": + return (false); + case "Coq_binary_op_in": + return (false); + case "Coq_binary_op_equal": + return (false); + case "Coq_binary_op_disequal": + return (false); + case "Coq_binary_op_strict_equal": + return (false); + case "Coq_binary_op_strict_disequal": + return (false); + case "Coq_binary_op_bitwise_and": + return (false); + case "Coq_binary_op_bitwise_or": + return (false); + case "Coq_binary_op_bitwise_xor": + return (true); + case "Coq_binary_op_and": + return (false); + case "Coq_binary_op_or": + return (false); + case "Coq_binary_op_coma": + return (false); + } + + case "Coq_binary_op_and": + switch (op2.tag) { + case "Coq_binary_op_mult": + return (false); + case "Coq_binary_op_div": + return (false); + case "Coq_binary_op_mod": + return (false); + case "Coq_binary_op_add": + return (false); + case "Coq_binary_op_sub": + return (false); + case "Coq_binary_op_left_shift": + return (false); + case "Coq_binary_op_right_shift": + return (false); + case "Coq_binary_op_unsigned_right_shift": + return (false); + case "Coq_binary_op_lt": + return (false); + case "Coq_binary_op_gt": + return (false); + case "Coq_binary_op_le": + return (false); + case "Coq_binary_op_ge": + return (false); + case "Coq_binary_op_instanceof": + return (false); + case "Coq_binary_op_in": + return (false); + case "Coq_binary_op_equal": + return (false); + case "Coq_binary_op_disequal": + return (false); + case "Coq_binary_op_strict_equal": + return (false); + case "Coq_binary_op_strict_disequal": + return (false); + case "Coq_binary_op_bitwise_and": + return (false); + case "Coq_binary_op_bitwise_or": + return (false); + case "Coq_binary_op_bitwise_xor": + return (false); + case "Coq_binary_op_and": + return (true); + case "Coq_binary_op_or": + return (false); + case "Coq_binary_op_coma": + return (false); + } + + case "Coq_binary_op_or": + switch (op2.tag) { + case "Coq_binary_op_mult": + return (false); + case "Coq_binary_op_div": + return (false); + case "Coq_binary_op_mod": + return (false); + case "Coq_binary_op_add": + return (false); + case "Coq_binary_op_sub": + return (false); + case "Coq_binary_op_left_shift": + return (false); + case "Coq_binary_op_right_shift": + return (false); + case "Coq_binary_op_unsigned_right_shift": + return (false); + case "Coq_binary_op_lt": + return (false); + case "Coq_binary_op_gt": + return (false); + case "Coq_binary_op_le": + return (false); + case "Coq_binary_op_ge": + return (false); + case "Coq_binary_op_instanceof": + return (false); + case "Coq_binary_op_in": + return (false); + case "Coq_binary_op_equal": + return (false); + case "Coq_binary_op_disequal": + return (false); + case "Coq_binary_op_strict_equal": + return (false); + case "Coq_binary_op_strict_disequal": + return (false); + case "Coq_binary_op_bitwise_and": + return (false); + case "Coq_binary_op_bitwise_or": + return (false); + case "Coq_binary_op_bitwise_xor": + return (false); + case "Coq_binary_op_and": + return (false); + case "Coq_binary_op_or": + return (true); + case "Coq_binary_op_coma": + return (false); + } + + case "Coq_binary_op_coma": + switch (op2.tag) { + case "Coq_binary_op_mult": + return (false); + case "Coq_binary_op_div": + return (false); + case "Coq_binary_op_mod": + return (false); + case "Coq_binary_op_add": + return (false); + case "Coq_binary_op_sub": + return (false); + case "Coq_binary_op_left_shift": + return (false); + case "Coq_binary_op_right_shift": + return (false); + case "Coq_binary_op_unsigned_right_shift": + return (false); + case "Coq_binary_op_lt": + return (false); + case "Coq_binary_op_gt": + return (false); + case "Coq_binary_op_le": + return (false); + case "Coq_binary_op_ge": + return (false); + case "Coq_binary_op_instanceof": + return (false); + case "Coq_binary_op_in": + return (false); + case "Coq_binary_op_equal": + return (false); + case "Coq_binary_op_disequal": + return (false); + case "Coq_binary_op_strict_equal": + return (false); + case "Coq_binary_op_strict_disequal": + return (false); + case "Coq_binary_op_bitwise_and": + return (false); + case "Coq_binary_op_bitwise_or": + return (false); + case "Coq_binary_op_bitwise_xor": + return (false); + case "Coq_binary_op_and": + return (false); + case "Coq_binary_op_or": + return (false); + case "Coq_binary_op_coma": + return (true); + } + + } + +}; + + + +var prog_intro_strictness = function (p) { + switch (p.tag) { + case "Coq_prog_intro": + var str = p.strictness, els = p.elements; + return (str); + } + +}; + + + +var prog_elements = function (p) { + switch (p.tag) { + case "Coq_prog_intro": + var str = p.strictness, els = p.elements; + return (els); + } + +}; + + + +var funcbody_prog = function (fb) { + switch (fb.tag) { + case "Coq_funcbody_intro": + var p = fb.prog, s = fb.source; + return (p); + } + +}; + + + +var funcbody_is_strict = function (fb) { + switch (fb.tag) { + case "Coq_funcbody_intro": + var p = fb.prog, s = fb.source; + switch (p.tag) { + case "Coq_prog_intro": + var b_strict = p.strictness, l = p.elements; + return (b_strict); + } + + } + +}; + + + +var restype_compare = function (rt1, rt2) { + switch (rt1.tag) { + case "Coq_restype_normal": + switch (rt2.tag) { + case "Coq_restype_normal": + return (true); + case "Coq_restype_break": + return (false); + case "Coq_restype_continue": + return (false); + case "Coq_restype_return": + return (false); + case "Coq_restype_throw": + return (false); + } + + case "Coq_restype_break": + switch (rt2.tag) { + case "Coq_restype_normal": + return (false); + case "Coq_restype_break": + return (true); + case "Coq_restype_continue": + return (false); + case "Coq_restype_return": + return (false); + case "Coq_restype_throw": + return (false); + } + + case "Coq_restype_continue": + switch (rt2.tag) { + case "Coq_restype_normal": + return (false); + case "Coq_restype_break": + return (false); + case "Coq_restype_continue": + return (true); + case "Coq_restype_return": + return (false); + case "Coq_restype_throw": + return (false); + } + + case "Coq_restype_return": + switch (rt2.tag) { + case "Coq_restype_normal": + return (false); + case "Coq_restype_break": + return (false); + case "Coq_restype_continue": + return (false); + case "Coq_restype_return": + return (true); + case "Coq_restype_throw": + return (false); + } + + case "Coq_restype_throw": + switch (rt2.tag) { + case "Coq_restype_normal": + return (false); + case "Coq_restype_break": + return (false); + case "Coq_restype_continue": + return (false); + case "Coq_restype_return": + return (false); + case "Coq_restype_throw": + return (true); + } + + } + +}; + + + +var label_compare = function (lab1, lab2) { + switch (lab1.tag) { + case "Coq_label_empty": + switch (lab2.tag) { + case "Coq_label_empty": + return (true); + case "Coq_label_string": + var s = lab2.value; + return (false); + } + + case "Coq_label_string": + var s1 = lab1.value; + switch (lab2.tag) { + case "Coq_label_empty": + return (false); + case "Coq_label_string": + var s2 = lab2.value; + return (string_eq(s1, s2)); + } + + } + +}; + + + +var label_set_empty = mk_nil(); + + + +var label_set_add = function (lab, labs) { + return (mk_cons(lab, labs)); +}; + + + +var label_set_add_empty = function (labs) { + return (label_set_add(Coq_label_empty(), labs)); +}; + + + +var label_set_mem = function (lab, labs) { + return (mem_decide(label_compare, lab, labs)); +}; + + + +var attributes_data_with_value = function (ad, v$) { + var v = ad.attributes_data_value, bw = ad.attributes_data_writable, + be = ad.attributes_data_enumerable, bc = ad.attributes_data_configurable; + return ( + { + attributes_data_value: v$, + attributes_data_writable: bw, + attributes_data_enumerable: be, + attributes_data_configurable: bc + }); +}; + + + +var descriptor_with_value = function (desc, v$) { + var v = desc.descriptor_value, bw = desc.descriptor_writable, + vg = desc.descriptor_get, vs = desc.descriptor_set, + be = desc.descriptor_enumerable, bc = desc.descriptor_configurable; + return ( + { + descriptor_value: v$, + descriptor_writable: bw, + descriptor_get: vg, + descriptor_set: vs, + descriptor_enumerable: be, + descriptor_configurable: bc + }); +}; + + + +var descriptor_with_writable = function (desc, bw$) { + var v = desc.descriptor_value, bw = desc.descriptor_writable, + vg = desc.descriptor_get, vs = desc.descriptor_set, + be = desc.descriptor_enumerable, bc = desc.descriptor_configurable; + return ( + { + descriptor_value: v, + descriptor_writable: bw$, + descriptor_get: vg, + descriptor_set: vs, + descriptor_enumerable: be, + descriptor_configurable: bc + }); +}; + + + +var descriptor_with_get = function (desc, vg$) { + var v = desc.descriptor_value, bw = desc.descriptor_writable, + vg = desc.descriptor_get, vs = desc.descriptor_set, + be = desc.descriptor_enumerable, bc = desc.descriptor_configurable; + return ( + { + descriptor_value: v, + descriptor_writable: bw, + descriptor_get: vg$, + descriptor_set: vs, + descriptor_enumerable: be, + descriptor_configurable: bc + }); +}; + + + +var descriptor_with_set = function (desc, vs$) { + var v = desc.descriptor_value, bw = desc.descriptor_writable, + vg = desc.descriptor_get, vs = desc.descriptor_set, + be = desc.descriptor_enumerable, bc = desc.descriptor_configurable; + return ( + { + descriptor_value: v, + descriptor_writable: bw, + descriptor_get: vg, + descriptor_set: vs$, + descriptor_enumerable: be, + descriptor_configurable: bc + }); +}; + + + +var descriptor_with_enumerable = function (desc, be$) { + var v = desc.descriptor_value, bw = desc.descriptor_writable, + vg = desc.descriptor_get, vs = desc.descriptor_set, + be = desc.descriptor_enumerable, bc = desc.descriptor_configurable; + return ( + { + descriptor_value: v, + descriptor_writable: bw, + descriptor_get: vg, + descriptor_set: vs, + descriptor_enumerable: be$, + descriptor_configurable: bc + }); +}; + + + +var descriptor_with_configurable = function (desc, bc$) { + var v = desc.descriptor_value, bw = desc.descriptor_writable, + vg = desc.descriptor_get, vs = desc.descriptor_set, + be = desc.descriptor_enumerable, bc = desc.descriptor_configurable; + return ( + { + descriptor_value: v, + descriptor_writable: bw, + descriptor_get: vg, + descriptor_set: vs, + descriptor_enumerable: be, + descriptor_configurable: bc$ + }); +}; + + + +var codetype_compare = function (ct1, ct2) { + switch (ct1.tag) { + case "Coq_codetype_func": + switch (ct2.tag) { + case "Coq_codetype_func": + return (true); + case "Coq_codetype_global": + return (false); + case "Coq_codetype_eval": + return (false); + } + + case "Coq_codetype_global": + switch (ct2.tag) { + case "Coq_codetype_func": + return (false); + case "Coq_codetype_global": + return (true); + case "Coq_codetype_eval": + return (false); + } + + case "Coq_codetype_eval": + switch (ct2.tag) { + case "Coq_codetype_func": + return (false); + case "Coq_codetype_global": + return (false); + case "Coq_codetype_eval": + return (true); + } + + } + +}; +}// end of with JsSyntax +}// end of with LibList + +return { + int_of_native_error: int_of_native_error, + int_of_mathop: int_of_mathop, + int_of_prealloc: int_of_prealloc, + prealloc_cmp: prealloc_cmp, + object_loc_cmp: object_loc_cmp, + object_create: object_create, + object_set_proto: object_set_proto, + object_set_class: object_set_class, + object_set_extensible: object_set_extensible, + object_with_primitive_value: object_with_primitive_value, + object_with_extension: object_with_extension, + object_with_properties: object_with_properties, + object_with_get: object_with_get, + object_with_get_own_property: object_with_get_own_property, + object_with_invokation: object_with_invokation, + object_with_scope: object_with_scope, + object_with_formal_params: object_with_formal_params, + object_with_details: object_with_details, + object_for_array: object_for_array, + object_for_args_object: object_for_args_object, + mathop_compare: mathop_compare, + prealloc_compare: prealloc_compare, + object_loc_compare: object_loc_compare, + prim_compare: prim_compare, + value_compare: value_compare, + mutability_compare: mutability_compare, + ref_base_type_compare: ref_base_type_compare, + ref_compare: ref_compare, + type_compare: type_compare, + res_with_value: res_with_value, + resvalue_compare: resvalue_compare, + binary_op_compare: binary_op_compare, + prog_intro_strictness: prog_intro_strictness, + prog_elements: prog_elements, + funcbody_prog: funcbody_prog, + funcbody_is_strict: funcbody_is_strict, + restype_compare: restype_compare, + label_compare: label_compare, + label_set_empty: label_set_empty, + label_set_add: label_set_add, + label_set_add_empty: label_set_add_empty, + label_set_mem: label_set_mem, + attributes_data_with_value: attributes_data_with_value, + descriptor_with_value: descriptor_with_value, + descriptor_with_writable: descriptor_with_writable, + descriptor_with_get: descriptor_with_get, + descriptor_with_set: descriptor_with_set, + descriptor_with_enumerable: descriptor_with_enumerable, + descriptor_with_configurable: descriptor_with_configurable, + codetype_compare: codetype_compare}; +})(); + +/* --------------------- HeapObj.unlog.js --------------------- */ + +var HeapObj = (function() { + +var empty = Heap.empty; + +var read = function (l, k) { + return (Heap.read(JsSyntaxAux.object_loc_cmp, l, k)); +}; + +var write = function (l, k, v) { + return (Heap.write(JsSyntaxAux.object_loc_cmp, l, k, v)); +}; + +var rem = function (l, k) { + return (Heap.rem(JsSyntaxAux.object_loc_cmp, l, k)); +}; + +var read_option = function (l, k) { + return (Heap.read_option(JsSyntaxAux.object_loc_cmp, l, k)); +}; + +var indom_dec = function (l, k) { + return (Heap.indom_dec(JsSyntaxAux.object_loc_cmp, l, k)); +}; + +var to_list = function (l) { + return (Heap.to_list(JsSyntaxAux.object_loc_cmp, l)); +}; + +return { + empty: empty, + read: read, + write: write, + rem: rem, + read_option: read_option, + indom_dec: indom_dec, + to_list: to_list}; +})(); + +/* --------------------- Translate_syntax.js --------------------- */ + +var Translate_syntax = { + eval_counter: 0, + parse_js_syntax: function (strictness, src) { + try { + // EVAL: Uncomment line below to enable multiple eval tabs + //return Some(parseSource(src, "_eval_" + Translate_syntax.eval_counter++, true)); + return Some(parseSource(src, "_eval_", true)); + } catch (e) { + return None(); + } + } +}; + +/* --------------------- JsCommon.unlog.js --------------------- */ + +var JsCommon = (function() { +with (Datatypes) { +with (JsSyntax) { +with (JsSyntaxAux) { +with (LibList) { +with (LibOption) { +with (Shared) { + +var res_overwrite_value_if_empty = function (rv, r) { + if (resvalue_compare(r.res_value, Coq_resvalue_empty())) { + return (res_with_value(r, rv)); + } else { + return (r); + } +}; + + + +var res_label_in = function (r, labs) { + return (label_set_mem(r.res_label, labs)); +}; + + + +var convert_literal_to_prim = function (_foo_) { + switch (_foo_.tag) { + case "Coq_literal_null": + return (Coq_prim_null()); + case "Coq_literal_bool": + var b = _foo_.value; + return (Coq_prim_bool(b)); + case "Coq_literal_number": + var n = _foo_.value; + return (Coq_prim_number(n)); + case "Coq_literal_string": + var s = _foo_.value; + return (Coq_prim_string(s)); + } + +}; + + + +var type_of_prim = function (_foo_) { + switch (_foo_.tag) { + case "Coq_prim_undef": + return (Coq_type_undef()); + case "Coq_prim_null": + return (Coq_type_null()); + case "Coq_prim_bool": + var b = _foo_.value; + return (Coq_type_bool()); + case "Coq_prim_number": + var n = _foo_.value; + return (Coq_type_number()); + case "Coq_prim_string": + var s = _foo_.value; + return (Coq_type_string()); + } + +}; + + + +var type_of = function (_foo_) { + switch (_foo_.tag) { + case "Coq_value_prim": + var w = _foo_.value; + return (type_of_prim(w)); + case "Coq_value_object": + var o = _foo_.value; + return (Coq_type_object()); + } + +}; + + + +var attributes_data_default = { + attributes_data_value: Coq_value_prim(Coq_prim_undef()), + attributes_data_writable: false, + attributes_data_enumerable: false, + attributes_data_configurable: false +}; + + + +var attributes_accessor_default = { + attributes_accessor_get: Coq_value_prim(Coq_prim_undef()), + attributes_accessor_set: Coq_value_prim(Coq_prim_undef()), + attributes_accessor_enumerable: false, + attributes_accessor_configurable: false +}; + + + +var attributes_accessor_of_attributes_data = function (ad) { + return ( + { + attributes_accessor_get: attributes_accessor_default.attributes_accessor_get, + attributes_accessor_set: attributes_accessor_default.attributes_accessor_set, + attributes_accessor_enumerable: ad.attributes_data_enumerable, + attributes_accessor_configurable: ad.attributes_data_configurable + }); +}; + + + +var attributes_data_of_attributes_accessor = function (aa) { + return ( + { + attributes_data_value: attributes_data_default.attributes_data_value, + attributes_data_writable: attributes_data_default.attributes_data_writable, + attributes_data_enumerable: aa.attributes_accessor_enumerable, + attributes_data_configurable: aa.attributes_accessor_configurable + }); +}; + + + +var attributes_data_update = function (ad, desc) { + return ( + { + attributes_data_value: unsome_default(ad.attributes_data_value, + desc.descriptor_value), + attributes_data_writable: unsome_default(ad.attributes_data_writable, + desc.descriptor_writable), + attributes_data_enumerable: unsome_default( + ad.attributes_data_enumerable, + desc.descriptor_enumerable), + attributes_data_configurable: unsome_default( + ad.attributes_data_configurable, + desc.descriptor_configurable) + }); +}; + + + +var attributes_accessor_update = function (aa, desc) { + return ( + { + attributes_accessor_get: unsome_default(aa.attributes_accessor_get, + desc.descriptor_get), + attributes_accessor_set: unsome_default(aa.attributes_accessor_set, + desc.descriptor_set), + attributes_accessor_enumerable: unsome_default( + aa.attributes_accessor_enumerable, + desc.descriptor_enumerable), + attributes_accessor_configurable: unsome_default( + aa.attributes_accessor_configurable, + desc.descriptor_configurable) + }); +}; + + + +var attributes_update = function (a, desc) { + switch (a.tag) { + case "Coq_attributes_data_of": + var ad = a.value; + return (Coq_attributes_data_of(attributes_data_update(ad, desc))); + case "Coq_attributes_accessor_of": + var aa = a.value; + return ( + Coq_attributes_accessor_of(attributes_accessor_update(aa, desc))); + } + +}; + + + +var attributes_data_of_descriptor = function (desc) { + return (attributes_data_update(attributes_data_default, desc)); +}; + + + +var attributes_accessor_of_descriptor = function (desc) { + return (attributes_accessor_update(attributes_accessor_default, desc)); +}; + + + +var descriptor_of_attributes = function (_foo_) { + switch (_foo_.tag) { + case "Coq_attributes_data_of": + var ad = _foo_.value; + return ( + { + descriptor_value: Some(ad.attributes_data_value), + descriptor_writable: Some(ad.attributes_data_writable), + descriptor_get: None(), + descriptor_set: None(), + descriptor_enumerable: Some(ad.attributes_data_enumerable), + descriptor_configurable: Some(ad.attributes_data_configurable) + }); + case "Coq_attributes_accessor_of": + var aa = _foo_.value; + return ( + { + descriptor_value: None(), + descriptor_writable: None(), + descriptor_get: Some(aa.attributes_accessor_get), + descriptor_set: Some(aa.attributes_accessor_set), + descriptor_enumerable: Some(aa.attributes_accessor_enumerable), + descriptor_configurable: Some(aa.attributes_accessor_configurable) + }); + } + +}; + + + +var attributes_configurable = function (_foo_) { + switch (_foo_.tag) { + case "Coq_attributes_data_of": + var ad = _foo_.value; + return (ad.attributes_data_configurable); + case "Coq_attributes_accessor_of": + var aa = _foo_.value; + return (aa.attributes_accessor_configurable); + } + +}; + + + +var attributes_enumerable = function (_foo_) { + switch (_foo_.tag) { + case "Coq_attributes_data_of": + var ad = _foo_.value; + return (ad.attributes_data_enumerable); + case "Coq_attributes_accessor_of": + var aa = _foo_.value; + return (aa.attributes_accessor_enumerable); + } + +}; + + + +var state_with_object_heap = function (s, new_object_heap) { + return (record_with(s, "state_object_heap", new_object_heap)); +}; + + + +var state_map_object_heap = function (s, f) { + return (state_with_object_heap(s, f(s.state_object_heap))); +}; + + + +var object_write = function (s, l, o) { + return ( + state_map_object_heap(s, function (h) { return (HeapObj.write(h, l, o)); + })); +}; + + + +var object_alloc = function (s, o) { + var cells = s.state_object_heap, bindings = s.state_env_record_heap, + state_fresh_locations0 = s.state_fresh_locations; + var n = state_fresh_locations0; + var alloc = (state_fresh_locations0 + 1); + var l = Coq_object_loc_normal(n); + return ( + [l, object_write({ + state_object_heap: cells, + state_env_record_heap: bindings, + state_fresh_locations: alloc}, l, o)]); +}; + + + +var object_map_properties = function (o, f) { + return (object_with_properties(o, f(o.object_properties_))); +}; + + + +var object_new = function (vproto, sclass) { + return (object_create(vproto, sclass, true, Heap.empty)); +}; + + + +var attributes_writable = function (_foo_) { + switch (_foo_.tag) { + case "Coq_attributes_data_of": + var ad = _foo_.value; + return (ad.attributes_data_writable); + case "Coq_attributes_accessor_of": + var aa = _foo_.value; + return (false); + } + +}; + + + +var attributes_data_intro_constant = function (v) { + return ( + { + attributes_data_value: v, + attributes_data_writable: false, + attributes_data_enumerable: false, + attributes_data_configurable: false + }); +}; + + + +var attributes_data_intro_all_true = function (v) { + return ( + { + attributes_data_value: v, + attributes_data_writable: true, + attributes_data_enumerable: true, + attributes_data_configurable: true + }); +}; + + + +var descriptor_intro_data = function (v, bw, be, bc) { + return ( + { + descriptor_value: Some(v), + descriptor_writable: Some(bw), + descriptor_get: None(), + descriptor_set: None(), + descriptor_enumerable: Some(be), + descriptor_configurable: Some(bc) + }); +}; + + + +var descriptor_intro_empty = { + descriptor_value: None(), + descriptor_writable: None(), + descriptor_get: None(), + descriptor_set: None(), + descriptor_enumerable: None(), + descriptor_configurable: None() +}; + +function Coq_ref_kind_null() { return {tag: "Coq_ref_kind_null" }; } + +function Coq_ref_kind_undef() { return {tag: "Coq_ref_kind_undef" }; } + +function Coq_ref_kind_primitive_base() { return {tag: "Coq_ref_kind_primitive_base" }; } + +function Coq_ref_kind_object() { return {tag: "Coq_ref_kind_object" }; } + +function Coq_ref_kind_env_record() { return {tag: "Coq_ref_kind_env_record" }; } + + + +var ref_kind_of = function (r) { + var _switch_arg_1 = r.ref_base; + switch (_switch_arg_1.tag) { + case "Coq_ref_base_type_value": + var v = _switch_arg_1.value; + switch (v.tag) { + case "Coq_value_prim": + var w = v.value; + switch (w.tag) { + case "Coq_prim_undef": + return (Coq_ref_kind_undef()); + case "Coq_prim_null": + return (Coq_ref_kind_null()); + case "Coq_prim_bool": + var b = w.value; + return (Coq_ref_kind_primitive_base()); + case "Coq_prim_number": + var n = w.value; + return (Coq_ref_kind_primitive_base()); + case "Coq_prim_string": + var s = w.value; + return (Coq_ref_kind_primitive_base()); + } + + case "Coq_value_object": + var o = v.value; + return (Coq_ref_kind_object()); + } + + case "Coq_ref_base_type_env_loc": + var l = _switch_arg_1.value; + return (Coq_ref_kind_env_record()); + } + +}; + + + +var ref_create_value = function (v, x, strict) { + return ( + { + ref_base: Coq_ref_base_type_value(v), + ref_name: x, + ref_strict: strict + }); +}; + + + +var ref_create_env_loc = function (l, x, strict) { + return ( + { + ref_base: Coq_ref_base_type_env_loc(l), + ref_name: x, + ref_strict: strict + }); +}; + + + +var mutability_of_bool = function (_foo_) { + switch (_foo_) { + case true: + return (Coq_mutability_deletable()); + case false: + return (Coq_mutability_nondeletable()); + } + +}; + + + +var state_with_env_record_heap = function (s, new_env_heap) { + var object_heap = s.state_object_heap, + old_env_heap = s.state_env_record_heap, + fresh_locs = s.state_fresh_locations; + return ( + { + state_object_heap: object_heap, + state_env_record_heap: new_env_heap, + state_fresh_locations: fresh_locs + }); +}; + + + +var state_map_env_record_heap = function (s, f) { + return (state_with_env_record_heap(s, f(s.state_env_record_heap))); +}; + + + +var env_record_write = function (s, l, e) { + return ( + state_map_env_record_heap(s, function (h) { + return (HeapInt.write(h, l, e));})); +}; + + + +var env_record_alloc = function (s, e) { + var cells = s.state_object_heap, bindings = s.state_env_record_heap, + state_fresh_locations0 = s.state_fresh_locations; + var l = state_fresh_locations0; + var alloc = (state_fresh_locations0 + 1); + var bindings$ = HeapInt.write(bindings, l, e); + return ( + [l, { + state_object_heap: cells, + state_env_record_heap: bindings$, + state_fresh_locations: alloc + }]); +}; + + + +var provide_this_true = true; + + + +var provide_this_false = false; + + + +var env_record_object_default = function (l) { + return (Coq_env_record_object(l, provide_this_false)); +}; + + + +var decl_env_record_empty = Heap.empty; + + + +var decl_env_record_write = function (ed, x, mu, v) { + return (HeapStr.write(ed, x, [mu, v])); +}; + + + +var decl_env_record_rem = function (ed, x) { + return (HeapStr.rem(ed, x)); +}; + + + +var env_record_write_decl_env = function (s, l, x, mu, v) { + var _switch_arg_2 = HeapInt.read(s.state_env_record_heap, l); + switch (_switch_arg_2.tag) { + case "Coq_env_record_decl": + var ed = _switch_arg_2.value; + var env$ = decl_env_record_write(ed, x, mu, v); + return (env_record_write(s, l, Coq_env_record_decl(env$))); + case "Coq_env_record_object": + var o = _switch_arg_2.value, p = _switch_arg_2.provide_this; + return (s); + } + +}; + + + +var lexical_env_alloc = function (s, lex, e) { + var _tuple_arg_3 = env_record_alloc(s, e); + var l = _tuple_arg_3[0], s$ = _tuple_arg_3[1]; + var lex$ = mk_cons(l, lex); + return ([lex$, s$]); +}; + + + +var lexical_env_alloc_decl = function (s, lex) { + return ( + lexical_env_alloc(s, lex, Coq_env_record_decl(decl_env_record_empty))); +}; + + + +var lexical_env_alloc_object = function (s, lex, l, pt) { + return (lexical_env_alloc(s, lex, Coq_env_record_object(l, pt))); +}; + + + +var execution_ctx_intro_same = function (x, lthis, strict) { + return ( + { + execution_ctx_lexical_env: x, + execution_ctx_variable_env: x, + execution_ctx_this_binding: lthis, + execution_ctx_strict: strict + }); +}; + + + +var execution_ctx_with_lex = function (c, lex) { + var x1 = c.execution_ctx_lexical_env, x2 = c.execution_ctx_variable_env, + x3 = c.execution_ctx_this_binding, x4 = c.execution_ctx_strict; + return ( + { + execution_ctx_lexical_env: lex, + execution_ctx_variable_env: x2, + execution_ctx_this_binding: x3, + execution_ctx_strict: x4 + }); +}; + + + +var execution_ctx_with_lex_same = function (c, lex) { + var x1 = c.execution_ctx_lexical_env, x2 = c.execution_ctx_variable_env, + x3 = c.execution_ctx_this_binding, x4 = c.execution_ctx_strict; + return ( + { + execution_ctx_lexical_env: lex, + execution_ctx_variable_env: lex, + execution_ctx_this_binding: x3, + execution_ctx_strict: x4 + }); +}; + + + +var lexical_env_initial = mk_cons(env_loc_global_env_record, mk_nil()); + + + +var execution_ctx_initial = function (str) { + return ( + { + execution_ctx_lexical_env: lexical_env_initial, + execution_ctx_variable_env: lexical_env_initial, + execution_ctx_this_binding: Coq_value_object( + Coq_object_loc_prealloc( + Coq_prealloc_global())), + execution_ctx_strict: str + }); +}; + + + +var element_funcdecl = function (_foo_) { + switch (_foo_.tag) { + case "Coq_element_stat": + var s = _foo_.stat; + return (mk_nil()); + case "Coq_element_func_decl": + var name = _foo_.func_name, args = _foo_.arg_names, bd = _foo_.body; + return ( + mk_cons({ + funcdecl_name: name, + funcdecl_parameters: args, + funcdecl_body: bd}, mk_nil())); + } + +}; + + + +var prog_funcdecl = function (p) { + return (concat(LibList.map(element_funcdecl, prog_elements(p)))); +}; + + + +var stat_vardecl = function (_foo_) { + switch (_foo_.tag) { + case "Coq_stat_expr": + var e = _foo_.expr; + return (mk_nil()); + case "Coq_stat_label": + var s0 = _foo_.label, s = _foo_.stat; + return (stat_vardecl(s)); + case "Coq_stat_block": + var ts = _foo_.stats; + return (concat(LibList.map(stat_vardecl, ts))); + case "Coq_stat_var_decl": + var nes = _foo_.decls; + return (LibList.map(fst, nes)); + case "Coq_stat_if": + var e = _foo_.cond, s1 = _foo_.then_branch, s2o = _foo_.else_branch; + return ( + append(stat_vardecl(s1), + unsome_default(mk_nil(), LibOption.map(stat_vardecl, s2o)))); + case "Coq_stat_do_while": + var l = _foo_.labels, s = _foo_.body, e = _foo_.cond; + return (stat_vardecl(s)); + case "Coq_stat_while": + var l = _foo_.labels, e = _foo_.cond, s = _foo_.body; + return (stat_vardecl(s)); + case "Coq_stat_with": + var e = _foo_.obj, s = _foo_.stat; + return (stat_vardecl(s)); + case "Coq_stat_throw": + var e = _foo_.arg; + return (mk_nil()); + case "Coq_stat_return": + var o = _foo_.arg_opt; + return (mk_nil()); + case "Coq_stat_break": + var l = _foo_.label; + return (mk_nil()); + case "Coq_stat_continue": + var l = _foo_.label; + return (mk_nil()); + case "Coq_stat_try": + var s = _foo_.body, sco = _foo_.catch_stats_opt, + sfo = _foo_.finally_opt; + return ( + append(stat_vardecl(s), + append( + unsome_default(mk_nil(), + LibOption.map(function (sc) { return (stat_vardecl(snd(sc)));}, + sco)), + unsome_default(mk_nil(), LibOption.map(stat_vardecl, sfo))))); + case "Coq_stat_for": + var l = _foo_.labels, o = _foo_.init, o0 = _foo_.cond, o1 = _foo_.step, + s = _foo_.body; + return (stat_vardecl(s)); + case "Coq_stat_for_var": + var l = _foo_.labels, nes = _foo_.init, o = _foo_.cond, + o0 = _foo_.step, s = _foo_.body; + return (append(LibList.map(fst, nes), stat_vardecl(s))); + case "Coq_stat_for_in": + var l = _foo_.labels, e = _foo_.id, e0 = _foo_.obj, s = _foo_.body; + return (stat_vardecl(s)); + case "Coq_stat_for_in_var": + var l = _foo_.labels, str = _foo_.id, o = _foo_.init, e = _foo_.obj, + s = _foo_.body; + return (mk_cons(str, stat_vardecl(s))); + case "Coq_stat_debugger": + return (mk_nil()); + case "Coq_stat_switch": + var l = _foo_.labels, e = _foo_.arg, sb = _foo_.body; + return (switchbody_vardecl(sb)); + } + +}; + +var switchbody_vardecl = function (_foo_) { + switch (_foo_.tag) { + case "Coq_switchbody_nodefault": + var scl = _foo_.clauses; + return (concat(LibList.map(switchclause_vardecl, scl))); + case "Coq_switchbody_withdefault": + var scl1 = _foo_.clauses_before, sl = _foo_.clause_default, + scl2 = _foo_.clauses_after; + return ( + append(concat(LibList.map(switchclause_vardecl, scl1)), + append(concat(LibList.map(stat_vardecl, sl)), + concat(LibList.map(switchclause_vardecl, scl2))))); + } + +}; + +var switchclause_vardecl = function (_foo_) { + switch (_foo_.tag) { + case "Coq_switchclause_intro": + var e = _foo_.arg, sl = _foo_.stats; + return (concat(LibList.map(stat_vardecl, sl))); + } + +}; + + + +var element_vardecl = function (_foo_) { + switch (_foo_.tag) { + case "Coq_element_stat": + var t = _foo_.stat; + return (stat_vardecl(t)); + case "Coq_element_func_decl": + var name = _foo_.func_name, args = _foo_.arg_names, bd = _foo_.body; + return (mk_nil()); + } + +}; + + + +var prog_vardecl = function (p) { + return (concat(LibList.map(element_vardecl, prog_elements(p)))); +}; + +function Coq_preftype_number() { return {tag: "Coq_preftype_number" }; } + +function Coq_preftype_string() { return {tag: "Coq_preftype_string" }; } + + + +var method_of_preftype = function (_foo_) { + switch (_foo_.tag) { + case "Coq_preftype_number": + return ("valueOf"); + case "Coq_preftype_string": + return ("toString"); + } + +}; + + + +var other_preftypes = function (_foo_) { + switch (_foo_.tag) { + case "Coq_preftype_number": + return (Coq_preftype_string()); + case "Coq_preftype_string": + return (Coq_preftype_number()); + } + +}; + + + +var throw_true = true; + + + +var throw_false = false; + + + +var throw_irrelevant = false; + + + +var add_one = function (n) { + return ((n + JsNumber.one)); +}; + + + +var sub_one = function (n) { + return ((n - JsNumber.one)); +}; + + + +var is_syntactic_eval = function (_foo_) { + switch (_foo_.tag) { + case "Coq_expr_this": + return (false); + case "Coq_expr_identifier": + var s = _foo_.name; + return (string_eq(s, "eval")); + case "Coq_expr_literal": + var l = _foo_.value; + switch (l.tag) { + case "Coq_literal_null": + return (false); + case "Coq_literal_bool": + var b = l.value; + return (false); + case "Coq_literal_number": + var n = l.value; + return (false); + case "Coq_literal_string": + var s = l.value; + return (string_eq(s, "eval")); + } + + case "Coq_expr_object": + var l = _foo_.fields; + return (false); + case "Coq_expr_array": + var l = _foo_.elements; + return (false); + case "Coq_expr_function": + var o = _foo_.func_name_opt, l = _foo_.arg_names, f = _foo_.body; + return (false); + case "Coq_expr_access": + var e0 = _foo_.obj, e1 = _foo_.field; + return (false); + case "Coq_expr_member": + var e0 = _foo_.obj, s = _foo_.field_name; + return (false); + case "Coq_expr_new": + var e0 = _foo_.func, l = _foo_.args; + return (false); + case "Coq_expr_call": + var e0 = _foo_.func, l = _foo_.args; + return (false); + case "Coq_expr_unary_op": + var u = _foo_.op, e0 = _foo_.arg; + return (false); + case "Coq_expr_binary_op": + var e0 = _foo_.arg1, b = _foo_.op, e1 = _foo_.arg2; + return (false); + case "Coq_expr_conditional": + var e0 = _foo_.cond, e1 = _foo_.then_branch, e2 = _foo_.else_branch; + return (false); + case "Coq_expr_assign": + var e0 = _foo_.left_expr, o = _foo_.op_opt, e1 = _foo_.right_expr; + return (false); + } + +}; + + + +var elision_head_count = function (_foo_) { + switch (_foo_.tag) { + case "[]": + return (0); + case "::": + var o = _foo_.head, ol$ = _foo_.tail; + switch (o.tag) { + case "Some": + var t = o.value; + return (0); + case "None": + return ((1 + elision_head_count(ol$))); + } + + } + +}; + + + +var elision_head_remove = function (ol) { + switch (ol.tag) { + case "[]": + return (ol); + case "::": + var o = ol.head, ol$ = ol.tail; + switch (o.tag) { + case "Some": + var t = o.value; + return (ol); + case "None": + return (elision_head_remove(ol$)); + } + + } + +}; + + + +var elision_tail_count = function (ol) { + return (elision_head_count(rev(ol))); +}; + + + +var elision_tail_remove = function (ol) { + return (rev(elision_head_remove(rev(ol)))); +}; + + + +var parse_pickable = function (s, strict) { + return (Translate_syntax.parse_js_syntax(strict, s)); +}; +}// end of with Datatypes +}// end of with JsSyntax +}// end of with JsSyntaxAux +}// end of with LibList +}// end of with LibOption +}// end of with Shared + +return { + res_overwrite_value_if_empty: res_overwrite_value_if_empty, + res_label_in: res_label_in, + convert_literal_to_prim: convert_literal_to_prim, + type_of_prim: type_of_prim, + type_of: type_of, + attributes_data_default: attributes_data_default, + attributes_accessor_default: attributes_accessor_default, + attributes_accessor_of_attributes_data: attributes_accessor_of_attributes_data, + attributes_data_of_attributes_accessor: attributes_data_of_attributes_accessor, + attributes_data_update: attributes_data_update, + attributes_accessor_update: attributes_accessor_update, + attributes_update: attributes_update, + attributes_data_of_descriptor: attributes_data_of_descriptor, + attributes_accessor_of_descriptor: attributes_accessor_of_descriptor, + descriptor_of_attributes: descriptor_of_attributes, + attributes_configurable: attributes_configurable, + attributes_enumerable: attributes_enumerable, + state_with_object_heap: state_with_object_heap, + state_map_object_heap: state_map_object_heap, + object_write: object_write, + object_alloc: object_alloc, + object_map_properties: object_map_properties, + object_new: object_new, + attributes_writable: attributes_writable, + attributes_data_intro_constant: attributes_data_intro_constant, + attributes_data_intro_all_true: attributes_data_intro_all_true, + descriptor_intro_data: descriptor_intro_data, + descriptor_intro_empty: descriptor_intro_empty, + Coq_ref_kind_null: Coq_ref_kind_null, + Coq_ref_kind_undef: Coq_ref_kind_undef, + Coq_ref_kind_primitive_base: Coq_ref_kind_primitive_base, + Coq_ref_kind_object: Coq_ref_kind_object, + Coq_ref_kind_env_record: Coq_ref_kind_env_record, + ref_kind_of: ref_kind_of, + ref_create_value: ref_create_value, + ref_create_env_loc: ref_create_env_loc, + mutability_of_bool: mutability_of_bool, + state_with_env_record_heap: state_with_env_record_heap, + state_map_env_record_heap: state_map_env_record_heap, + env_record_write: env_record_write, + env_record_alloc: env_record_alloc, + provide_this_true: provide_this_true, + provide_this_false: provide_this_false, + env_record_object_default: env_record_object_default, + decl_env_record_empty: decl_env_record_empty, + decl_env_record_write: decl_env_record_write, + decl_env_record_rem: decl_env_record_rem, + env_record_write_decl_env: env_record_write_decl_env, + lexical_env_alloc: lexical_env_alloc, + lexical_env_alloc_decl: lexical_env_alloc_decl, + lexical_env_alloc_object: lexical_env_alloc_object, + execution_ctx_intro_same: execution_ctx_intro_same, + execution_ctx_with_lex: execution_ctx_with_lex, + execution_ctx_with_lex_same: execution_ctx_with_lex_same, + lexical_env_initial: lexical_env_initial, + execution_ctx_initial: execution_ctx_initial, + element_funcdecl: element_funcdecl, + prog_funcdecl: prog_funcdecl, + stat_vardecl: stat_vardecl, + switchbody_vardecl: switchbody_vardecl, + switchclause_vardecl: switchclause_vardecl, + element_vardecl: element_vardecl, + prog_vardecl: prog_vardecl, + Coq_preftype_number: Coq_preftype_number, + Coq_preftype_string: Coq_preftype_string, + method_of_preftype: method_of_preftype, + other_preftypes: other_preftypes, + throw_true: throw_true, + throw_false: throw_false, + throw_irrelevant: throw_irrelevant, + add_one: add_one, + sub_one: sub_one, + is_syntactic_eval: is_syntactic_eval, + elision_head_count: elision_head_count, + elision_head_remove: elision_head_remove, + elision_tail_count: elision_tail_count, + elision_tail_remove: elision_tail_remove, + parse_pickable: parse_pickable}; +})(); + +/* --------------------- JsCommonAux.unlog.js --------------------- */ + +var JsCommonAux = (function() { +with (Datatypes) { +with (JsCommon) { +with (JsSyntax) { +with (JsSyntaxAux) { +with (LibList) { +with (LibOption) { +with (Shared) { + +var __ = {}; + + + +var if_some_then_same_dec = function (x, y, d) { + switch (x.tag) { + case "Some": + var a = x.value; + switch (y.tag) { + case "Some": + var a0 = y.value; + return (d(a0, a)); + case "None": + return (true); + } + + case "None": + switch (y.tag) { + case "Some": + var a = y.value; + return (false); + case "None": + return (true); + } + + } + +}; + + + +var same_value_dec = function (v1, v2) { + var h0 = !(type_compare(type_of(v1), type_of(v2))); + return ( + (function () { + if (h0) { + return (function (_pat_any_20) { return (false);}); + } else { + return ( + function (_pat_any_1) { + var t = type_of(v1); + return ( + (function () { + switch (t.tag) { + case "Coq_type_undef": + return ( + function (_pat_any_2, _pat_any_3) { + return (true); + }); + case "Coq_type_null": + return ( + function (_pat_any_4, _pat_any_5) { + return (true); + }); + case "Coq_type_bool": + return ( + function (_pat_any_6, _pat_any_7) { + return (value_compare(v1, v2)); + }); + case "Coq_type_number": + return ( + function (_pat_any_8, _pat_any_9) { + var h2 = (value_compare(v1, + Coq_value_prim( + Coq_prim_number(JsNumber.nan))) + && value_compare(v2, + Coq_value_prim( + Coq_prim_number(JsNumber.nan)))); + return ( + (function () { + if (h2) { + return ( + function (_pat_any_15) { + return (true); + }); + } else { + return ( + function (_pat_any_10) { + var h3 = (value_compare(v1, + Coq_value_prim( + Coq_prim_number( + JsNumber.zero))) + && value_compare(v2, + Coq_value_prim( + Coq_prim_number( + JsNumber.neg_zero)))); + return ( + (function () { + if (h3) { + return ( + function (_pat_any_14) { + return (false); + }); + } else { + return ( + function (_pat_any_11) { + var h4 = (value_compare( + v1, + Coq_value_prim( + Coq_prim_number( + JsNumber.neg_zero))) + && value_compare( + v2, + Coq_value_prim( + Coq_prim_number( + JsNumber.zero)))); + return ( + (function () { + if (h4) { + return ( + function (_pat_any_13) { + return ( + false); + }); + } else { + return ( + function (_pat_any_12) { + return ( + value_compare( + v1, v2)); + }); + }}())(__)); + }); + }}())(__)); + }); + }}())(__)); + }); + case "Coq_type_string": + return ( + function (_pat_any_16, _pat_any_17) { + return (value_compare(v1, v2)); + }); + case "Coq_type_object": + return ( + function (_pat_any_18, _pat_any_19) { + return (value_compare(v1, v2)); + }); + } + }())(__, __)); + }); + }}())(__)); +}; + + + +var attributes_data_compare = function (ad1, ad2) { + var v1 = ad1.attributes_data_value, w1 = ad1.attributes_data_writable, + e1 = ad1.attributes_data_enumerable, + c1 = ad1.attributes_data_configurable; + var v2 = ad2.attributes_data_value, w2 = ad2.attributes_data_writable, + e2 = ad2.attributes_data_enumerable, + c2 = ad2.attributes_data_configurable; + return ( + (value_compare(v1, v2) && ((w1 === w2) && ((e1 === e2) && (c1 === c2))))); +}; + + + +var attributes_accessor_compare = function (aa1, aa2) { + var v1 = aa1.attributes_accessor_get, w1 = aa1.attributes_accessor_set, + e1 = aa1.attributes_accessor_enumerable, + c1 = aa1.attributes_accessor_configurable; + var v2 = aa2.attributes_accessor_get, w2 = aa2.attributes_accessor_set, + e2 = aa2.attributes_accessor_enumerable, + c2 = aa2.attributes_accessor_configurable; + return ( + (value_compare(v1, v2) + && (value_compare(w1, w2) && (bool_eq(e1, e2) && bool_eq(c1, c2))))); +}; + + + +var attributes_compare = function (a1, a2) { + switch (a1.tag) { + case "Coq_attributes_data_of": + var ad1 = a1.value; + switch (a2.tag) { + case "Coq_attributes_data_of": + var ad2 = a2.value; + return (attributes_data_compare(ad1, ad2)); + case "Coq_attributes_accessor_of": + var a = a2.value; + return (false); + } + + case "Coq_attributes_accessor_of": + var aa1 = a1.value; + switch (a2.tag) { + case "Coq_attributes_data_of": + var a = a2.value; + return (false); + case "Coq_attributes_accessor_of": + var aa2 = a2.value; + return (attributes_accessor_compare(aa1, aa2)); + } + + } + +}; + + + +var full_descriptor_compare = function (an1, an2) { + switch (an1.tag) { + case "Coq_full_descriptor_undef": + switch (an2.tag) { + case "Coq_full_descriptor_undef": + return (true); + case "Coq_full_descriptor_some": + var a = an2.value; + return (false); + } + + case "Coq_full_descriptor_some": + var a1 = an1.value; + switch (an2.tag) { + case "Coq_full_descriptor_undef": + return (false); + case "Coq_full_descriptor_some": + var a2 = an2.value; + return (attributes_compare(a1, a2)); + } + + } + +}; + + + +var ref_kind_comparable = function (x, y) { + switch (x.tag) { + case "Coq_ref_kind_null": + switch (y.tag) { + case "Coq_ref_kind_null": + return (true); + case "Coq_ref_kind_undef": + return (false); + case "Coq_ref_kind_primitive_base": + return (false); + case "Coq_ref_kind_object": + return (false); + case "Coq_ref_kind_env_record": + return (false); + } + + case "Coq_ref_kind_undef": + switch (y.tag) { + case "Coq_ref_kind_null": + return (false); + case "Coq_ref_kind_undef": + return (true); + case "Coq_ref_kind_primitive_base": + return (false); + case "Coq_ref_kind_object": + return (false); + case "Coq_ref_kind_env_record": + return (false); + } + + case "Coq_ref_kind_primitive_base": + switch (y.tag) { + case "Coq_ref_kind_null": + return (false); + case "Coq_ref_kind_undef": + return (false); + case "Coq_ref_kind_primitive_base": + return (true); + case "Coq_ref_kind_object": + return (false); + case "Coq_ref_kind_env_record": + return (false); + } + + case "Coq_ref_kind_object": + switch (y.tag) { + case "Coq_ref_kind_null": + return (false); + case "Coq_ref_kind_undef": + return (false); + case "Coq_ref_kind_primitive_base": + return (false); + case "Coq_ref_kind_object": + return (true); + case "Coq_ref_kind_env_record": + return (false); + } + + case "Coq_ref_kind_env_record": + switch (y.tag) { + case "Coq_ref_kind_null": + return (false); + case "Coq_ref_kind_undef": + return (false); + case "Coq_ref_kind_primitive_base": + return (false); + case "Coq_ref_kind_object": + return (false); + case "Coq_ref_kind_env_record": + return (true); + } + + } + +}; + + + +var object_binds_pickable_option = function (s, l) { + return (HeapObj.read_option(s.state_object_heap, l)); +}; + + + +var env_record_binds_pickable_option = function (s, l) { + return (HeapInt.read_option(s.state_env_record_heap, l)); +}; + + + +var decl_env_record_pickable_option = function (ed, x) { + return (HeapStr.read_option(ed, x)); +}; + + + +var descriptor_is_data_dec = function (desc) { + return ( + !( + (option_compare(value_compare, desc.descriptor_value, None()) + && option_compare(bool_eq, desc.descriptor_writable, None())))); +}; + + + +var descriptor_is_accessor_dec = function (desc) { + return ( + !( + (option_compare(value_compare, desc.descriptor_get, None()) + && option_compare(value_compare, desc.descriptor_set, None())))); +}; + + + +var descriptor_is_generic_dec = function (desc) { + return ( + (!(descriptor_is_data_dec(desc)) && !(descriptor_is_accessor_dec(desc)))); +}; + + + +var prepost_unary_op_dec = function (op) { + switch (op.tag) { + case "Coq_unary_op_delete": + return (false); + case "Coq_unary_op_void": + return (false); + case "Coq_unary_op_typeof": + return (false); + case "Coq_unary_op_post_incr": + return (true); + case "Coq_unary_op_post_decr": + return (true); + case "Coq_unary_op_pre_incr": + return (true); + case "Coq_unary_op_pre_decr": + return (true); + case "Coq_unary_op_add": + return (false); + case "Coq_unary_op_neg": + return (false); + case "Coq_unary_op_bitwise_not": + return (false); + case "Coq_unary_op_not": + return (false); + } + +}; + + + +var attributes_is_data_dec = function (a) { + switch (a.tag) { + case "Coq_attributes_data_of": + var a0 = a.value; + return (true); + case "Coq_attributes_accessor_of": + var a0 = a.value; + return (false); + } + +}; + + + +var run_object_heap_map_properties = function (s, l, f) { + return ( + map(function (o) { + return (object_write(s, l, object_map_properties(o, f)));}, + object_binds_pickable_option(s, l))); +}; + + + +var object_heap_map_properties_pickable_option = function (s, l, f) { + return (run_object_heap_map_properties(s, l, f)); +}; + + + +var descriptor_contains_dec = function (desc1, desc2) { + var descriptor_value0 = desc1.descriptor_value, + descriptor_writable0 = desc1.descriptor_writable, + descriptor_get0 = desc1.descriptor_get, + descriptor_set0 = desc1.descriptor_set, + descriptor_enumerable0 = desc1.descriptor_enumerable, + descriptor_configurable0 = desc1.descriptor_configurable; + var descriptor_value1 = desc2.descriptor_value, + descriptor_writable1 = desc2.descriptor_writable, + descriptor_get1 = desc2.descriptor_get, + descriptor_set1 = desc2.descriptor_set, + descriptor_enumerable1 = desc2.descriptor_enumerable, + descriptor_configurable1 = desc2.descriptor_configurable; + return ( + (if_some_then_same_dec(descriptor_value0, descriptor_value1, + function (u, v) { return (same_value_dec(u, v));}) + && (if_some_then_same_dec(descriptor_writable0, descriptor_writable1, + function (u, v) { return (bool_eq(u, v));}) + && (if_some_then_same_dec(descriptor_get0, descriptor_get1, + function (u, v) { return (same_value_dec(u, v));}) + && (if_some_then_same_dec(descriptor_set0, descriptor_set1, + function (u, v) { return (same_value_dec(u, v));}) + && (if_some_then_same_dec(descriptor_enumerable0, + descriptor_enumerable1, function (u, v) { + return (bool_eq(u, v));}) + && if_some_then_same_dec(descriptor_configurable0, + descriptor_configurable1, function (u, v) { + return (bool_eq(u, v));}))))))); +}; + + + +var descriptor_enumerable_not_same_dec = function (a, desc) { + var o = desc.descriptor_enumerable; + switch (o.tag) { + case "Some": + var b = o.value; + return (!(bool_eq(b, attributes_enumerable(a)))); + case "None": + return (false); + } + +}; + + + +var descriptor_value_not_same_dec = function (ad, desc) { + var o = desc.descriptor_value; + switch (o.tag) { + case "Some": + var v = o.value; + return (!(same_value_dec(v, ad.attributes_data_value))); + case "None": + return (false); + } + +}; + + + +var descriptor_get_not_same_dec = function (aa, desc) { + var o = desc.descriptor_get; + switch (o.tag) { + case "Some": + var v = o.value; + return (!(same_value_dec(v, aa.attributes_accessor_get))); + case "None": + return (false); + } + +}; + + + +var descriptor_set_not_same_dec = function (aa, desc) { + var o = desc.descriptor_set; + switch (o.tag) { + case "Some": + var v = o.value; + return (!(same_value_dec(v, aa.attributes_accessor_set))); + case "None": + return (false); + } + +}; + + + +var attributes_change_enumerable_on_non_configurable_dec = function (a, desc) { + return ( + (!(attributes_configurable(a)) + && (option_compare(bool_eq, desc.descriptor_configurable, Some(true)) + || descriptor_enumerable_not_same_dec(a, desc)))); +}; + + + +var attributes_change_data_on_non_configurable_dec = function (ad, desc) { + return ( + (!(attributes_configurable(Coq_attributes_data_of(ad))) + && (!(ad.attributes_data_writable) + && (option_compare(bool_eq, desc.descriptor_writable, Some(true)) + || descriptor_value_not_same_dec(ad, desc))))); +}; + + + +var attributes_change_accessor_on_non_configurable_dec = function (aa, desc) { + return ( + (!(attributes_configurable(Coq_attributes_accessor_of(aa))) + && (descriptor_get_not_same_dec(aa, desc) + || descriptor_set_not_same_dec(aa, desc)))); +}; + + + +var run_function_get_error_case = function (s, x, v) { + switch (v.tag) { + case "Coq_value_prim": + var w = v.value; + return (false); + case "Coq_value_object": + var l = v.value; + return ( + ((function () { + if (string_eq(x, "caller")) { + return (true); + } else { + return (false); + }}()) + && option_case(false, function (o) { + return ( + option_case(false, function (bd) { + return (funcbody_is_strict(bd));}, o.object_code_));}, + object_binds_pickable_option(s, l)))); + } + +}; + + + +var spec_function_get_error_case_dec = function (s, x, v) { + return (run_function_get_error_case(s, x, v)); +}; + + + +var run_callable = function (s, v) { + switch (v.tag) { + case "Coq_value_prim": + var w = v.value; + return (Some(None())); + case "Coq_value_object": + var l = v.value; + return ( + option_case(None(), function (o) { return (Some(o.object_call_));}, + object_binds_pickable_option(s, l))); + } + +}; + + + +var is_callable_dec = function (s, v) { + return ( + option_case(false, function (o) { + return (option_case(false, function (x) { return (true);}, o));}, + run_callable(s, v))); +}; + + + +var object_properties_keys_as_list_pickable_option = function (s, l) { + return ( + map(function (props) { return (LibList.map(fst, HeapStr.to_list(props))); + }, map(object_properties_, object_binds_pickable_option(s, l)))); +}; +}// end of with Datatypes +}// end of with JsCommon +}// end of with JsSyntax +}// end of with JsSyntaxAux +}// end of with LibList +}// end of with LibOption +}// end of with Shared + +return { + __: __, + if_some_then_same_dec: if_some_then_same_dec, + same_value_dec: same_value_dec, + attributes_data_compare: attributes_data_compare, + attributes_accessor_compare: attributes_accessor_compare, + attributes_compare: attributes_compare, + full_descriptor_compare: full_descriptor_compare, + ref_kind_comparable: ref_kind_comparable, + object_binds_pickable_option: object_binds_pickable_option, + env_record_binds_pickable_option: env_record_binds_pickable_option, + decl_env_record_pickable_option: decl_env_record_pickable_option, + descriptor_is_data_dec: descriptor_is_data_dec, + descriptor_is_accessor_dec: descriptor_is_accessor_dec, + descriptor_is_generic_dec: descriptor_is_generic_dec, + prepost_unary_op_dec: prepost_unary_op_dec, + attributes_is_data_dec: attributes_is_data_dec, + run_object_heap_map_properties: run_object_heap_map_properties, + object_heap_map_properties_pickable_option: object_heap_map_properties_pickable_option, + descriptor_contains_dec: descriptor_contains_dec, + descriptor_enumerable_not_same_dec: descriptor_enumerable_not_same_dec, + descriptor_value_not_same_dec: descriptor_value_not_same_dec, + descriptor_get_not_same_dec: descriptor_get_not_same_dec, + descriptor_set_not_same_dec: descriptor_set_not_same_dec, + attributes_change_enumerable_on_non_configurable_dec: attributes_change_enumerable_on_non_configurable_dec, + attributes_change_data_on_non_configurable_dec: attributes_change_data_on_non_configurable_dec, + attributes_change_accessor_on_non_configurable_dec: attributes_change_accessor_on_non_configurable_dec, + run_function_get_error_case: run_function_get_error_case, + spec_function_get_error_case_dec: spec_function_get_error_case_dec, + run_callable: run_callable, + is_callable_dec: is_callable_dec, + object_properties_keys_as_list_pickable_option: object_properties_keys_as_list_pickable_option}; +})(); + +/* --------------------- JsPreliminary.unlog.js --------------------- */ + +var JsPreliminary = (function() { + + + +return {}; +})(); + +/* --------------------- JsInit.unlog.js --------------------- */ + +var JsInit = (function() { +with (JsCommon) { +with (JsSyntax) { +with (JsSyntaxAux) { + +var string_of_native_error = function (_foo_) { + switch (_foo_.tag) { + case "Coq_native_error_eval": + return ("EvalError"); + case "Coq_native_error_range": + return ("RangeError"); + case "Coq_native_error_ref": + return ("ReferenceError"); + case "Coq_native_error_syntax": + return ("SyntaxError"); + case "Coq_native_error_type": + return ("TypeError"); + case "Coq_native_error_uri": + return ("URIError"); + } + +}; + + + + + +var prop_attributes_for_global_object = function (v) { + return ( + { + attributes_data_value: v, + attributes_data_writable: true, + attributes_data_enumerable: false, + attributes_data_configurable: true + }); +}; + + + +var attrib_constant = function (v) { + return ( + { + attributes_data_value: v, + attributes_data_writable: false, + attributes_data_enumerable: false, + attributes_data_configurable: false + }); +}; + + + +var object_create_builtin = function (vproto, sclass, p) { + return (object_create(vproto, sclass, true, p)); +}; + + + +var object_create_prealloc_call_or_construct = function (length, p) { + var sclass = "Function"; + var p$ = HeapStr.write(p, "length", + Coq_attributes_data_of(attrib_constant(length))); + return ( + object_create_builtin( + Coq_value_object( + Coq_object_loc_prealloc(Coq_prealloc_function_proto())), sclass, p$)); +}; + + + +var object_create_prealloc_call = function (fprealloc, length, p) { + var o = object_create_prealloc_call_or_construct(length, p); + return ( + object_with_invokation(o, None(), Some(Coq_call_prealloc(fprealloc)), + None())); +}; + + + +var object_create_prealloc_constructor = function (fprealloc, length, p) { + var o = object_create_prealloc_call_or_construct(length, p); + return ( + object_with_invokation(o, Some(Coq_construct_prealloc(fprealloc)), + Some(Coq_call_prealloc(fprealloc)), + Some(Coq_builtin_has_instance_function()))); +}; + + + +var write_native = function (p, name, v) { + return ( + HeapStr.write(p, name, + Coq_attributes_data_of(prop_attributes_for_global_object(v)))); +}; + + + +var write_constant = function (p, name, value0) { + return ( + HeapStr.write(p, name, Coq_attributes_data_of(attrib_constant(value0)))); +}; + + + +var object_prealloc_global_proto = Coq_value_prim(Coq_prim_null()); + + + +var object_prealloc_global_class = "GlobalClass"; + + + +var object_prealloc_global_properties = (function () { + var p = write_constant(Heap.empty, "NaN", + Coq_value_prim(Coq_prim_number(JsNumber.nan))); + var p0 = write_constant(p, "Infinity", + Coq_value_prim(Coq_prim_number(JsNumber.infinity))); + var p1 = write_constant(p0, "undefined", Coq_value_prim(Coq_prim_undef())); + var p2 = write_native(p1, "eval", + Coq_value_object( + Coq_object_loc_prealloc(Coq_prealloc_global_eval()))); + var p3 = write_native(p2, "parseInt", + Coq_value_object( + Coq_object_loc_prealloc(Coq_prealloc_global_parse_int()))); + var p4 = write_native(p3, "parseFloat", + Coq_value_object( + Coq_object_loc_prealloc(Coq_prealloc_global_parse_float()))); + var p5 = write_native(p4, "isNaN", + Coq_value_object( + Coq_object_loc_prealloc(Coq_prealloc_global_is_nan()))); + var p6 = write_native(p5, "isFinite", + Coq_value_object( + Coq_object_loc_prealloc(Coq_prealloc_global_is_finite()))); + var p7 = write_native(p6, "decodeURI", + Coq_value_object( + Coq_object_loc_prealloc(Coq_prealloc_global_decode_uri()))); + var p8 = write_native(p7, "decodeURIComponent", + Coq_value_object( + Coq_object_loc_prealloc( + Coq_prealloc_global_decode_uri_component()))); + var p9 = write_native(p8, "encodeURI", + Coq_value_object( + Coq_object_loc_prealloc(Coq_prealloc_global_encode_uri()))); + var p10 = write_native(p9, "encodeURIComponent", + Coq_value_object( + Coq_object_loc_prealloc( + Coq_prealloc_global_encode_uri_component()))); + var p11 = write_native(p10, "Object", + Coq_value_object( + Coq_object_loc_prealloc(Coq_prealloc_object()))); + var p12 = write_native(p11, "Function", + Coq_value_object( + Coq_object_loc_prealloc(Coq_prealloc_function()))); + var p13 = write_native(p12, "Array", + Coq_value_object(Coq_object_loc_prealloc(Coq_prealloc_array()))); + var p14 = write_native(p13, "String", + Coq_value_object( + Coq_object_loc_prealloc(Coq_prealloc_string()))); + var p15 = write_native(p14, "Boolean", + Coq_value_object(Coq_object_loc_prealloc(Coq_prealloc_bool()))); + var p16 = write_native(p15, "Number", + Coq_value_object( + Coq_object_loc_prealloc(Coq_prealloc_number()))); + var p17 = write_native(p16, "Math", + Coq_value_object(Coq_object_loc_prealloc(Coq_prealloc_math()))); + var p18 = write_native(p17, "Date", + Coq_value_object(Coq_object_loc_prealloc(Coq_prealloc_date()))); + var p19 = write_native(p18, "RegExp", + Coq_value_object( + Coq_object_loc_prealloc(Coq_prealloc_regexp()))); + var p20 = write_native(p19, "Error", + Coq_value_object(Coq_object_loc_prealloc(Coq_prealloc_error()))); + var p21 = write_native(p20, "EvalError", + Coq_value_object( + Coq_object_loc_prealloc( + Coq_prealloc_native_error(Coq_native_error_eval())))); + var p22 = write_native(p21, "RangeError", + Coq_value_object( + Coq_object_loc_prealloc( + Coq_prealloc_native_error(Coq_native_error_range())))); + var p23 = write_native(p22, "ReferenceError", + Coq_value_object( + Coq_object_loc_prealloc( + Coq_prealloc_native_error(Coq_native_error_ref())))); + var p24 = write_native(p23, "SyntaxError", + Coq_value_object( + Coq_object_loc_prealloc( + Coq_prealloc_native_error(Coq_native_error_syntax())))); + var p25 = write_native(p24, "TypeError", + Coq_value_object( + Coq_object_loc_prealloc( + Coq_prealloc_native_error(Coq_native_error_type())))); + var p26 = write_native(p25, "URIError", + Coq_value_object( + Coq_object_loc_prealloc( + Coq_prealloc_native_error(Coq_native_error_uri())))); + return ( + write_native(p26, "JSON", + Coq_value_object(Coq_object_loc_prealloc(Coq_prealloc_json())))); +}()) +; + + + +var object_prealloc_global = object_create_builtin( + object_prealloc_global_proto, + object_prealloc_global_class, + object_prealloc_global_properties); + + + +var global_eval_function_object = object_create_prealloc_call( + Coq_prealloc_global_eval(), + Coq_value_prim(Coq_prim_number(1.0)), + Heap.empty); + + + +var global_parse_int_function_object = object_create_prealloc_call( + Coq_prealloc_global_parse_int(), + Coq_value_prim(Coq_prim_number(2.0)), + Heap.empty); + + + +var global_parse_float_function_object = object_create_prealloc_call( + Coq_prealloc_global_parse_float(), + Coq_value_prim( + Coq_prim_number(1.0)), + Heap.empty); + + + +var global_is_nan_function_object = object_create_prealloc_call( + Coq_prealloc_global_is_nan(), + Coq_value_prim(Coq_prim_number(1.0)), + Heap.empty); + + + +var global_is_finite_function_object = object_create_prealloc_call( + Coq_prealloc_global_is_finite(), + Coq_value_prim(Coq_prim_number(1.0)), + Heap.empty); + + + +var global_decode_uri_function_object = object_create_prealloc_call( + Coq_prealloc_global_decode_uri(), + Coq_value_prim( + Coq_prim_number(1.0)), + Heap.empty); + + + +var global_decode_uri_component_function_object = object_create_prealloc_call( + Coq_prealloc_global_decode_uri_component( + ), + Coq_value_prim( + Coq_prim_number(1.0)), + Heap.empty); + + + +var global_encode_uri_function_object = object_create_prealloc_call( + Coq_prealloc_global_encode_uri(), + Coq_value_prim( + Coq_prim_number(1.0)), + Heap.empty); + + + +var global_encode_uri_component_function_object = object_create_prealloc_call( + Coq_prealloc_global_encode_uri_component( + ), + Coq_value_prim( + Coq_prim_number(1.0)), + Heap.empty); + + + +var object_prealloc_object = (function () { + var p = write_constant(Heap.empty, "prototype", + Coq_value_object( + Coq_object_loc_prealloc(Coq_prealloc_object_proto()))); + var p0 = write_native(p, "getPrototypeOf", + Coq_value_object( + Coq_object_loc_prealloc(Coq_prealloc_object_get_proto_of()))); + var p1 = write_native(p0, "getOwnPropertyDescriptor", + Coq_value_object( + Coq_object_loc_prealloc( + Coq_prealloc_object_get_own_prop_descriptor()))); + var p2 = write_native(p1, "getOwnPropertyNames", + Coq_value_object( + Coq_object_loc_prealloc( + Coq_prealloc_object_get_own_prop_name()))); + var p3 = write_native(p2, "create", + Coq_value_object( + Coq_object_loc_prealloc(Coq_prealloc_object_create()))); + var p4 = write_native(p3, "defineProperty", + Coq_value_object( + Coq_object_loc_prealloc(Coq_prealloc_object_define_prop()))); + var p5 = write_native(p4, "defineProperties", + Coq_value_object( + Coq_object_loc_prealloc(Coq_prealloc_object_define_props()))); + var p6 = write_native(p5, "seal", + Coq_value_object( + Coq_object_loc_prealloc(Coq_prealloc_object_seal()))); + var p7 = write_native(p6, "freeze", + Coq_value_object( + Coq_object_loc_prealloc(Coq_prealloc_object_freeze()))); + var p8 = write_native(p7, "preventExtensions", + Coq_value_object( + Coq_object_loc_prealloc( + Coq_prealloc_object_prevent_extensions()))); + var p9 = write_native(p8, "isSealed", + Coq_value_object( + Coq_object_loc_prealloc(Coq_prealloc_object_is_sealed()))); + var p10 = write_native(p9, "isFrozen", + Coq_value_object( + Coq_object_loc_prealloc(Coq_prealloc_object_is_frozen()))); + var p11 = write_native(p10, "isExtensible", + Coq_value_object( + Coq_object_loc_prealloc(Coq_prealloc_object_is_extensible()))); + return ( + object_create_prealloc_constructor(Coq_prealloc_object(), + Coq_value_prim(Coq_prim_number(1.0)), p11)); +}()) +; + + + +var object_get_proto_of_function_object = object_create_prealloc_call( + Coq_prealloc_object_get_proto_of( + ), + Coq_value_prim( + Coq_prim_number(1.0)), + Heap.empty); + + + +var object_get_own_prop_descriptor_function_object = object_create_prealloc_call( + Coq_prealloc_object_get_own_prop_descriptor( + ), + Coq_value_prim( + Coq_prim_number(1.0)), + Heap.empty); + + + +var object_get_own_prop_name_function_object = object_create_prealloc_call( + Coq_prealloc_object_get_own_prop_name( + ), + Coq_value_prim( + Coq_prim_number(1.0)), + Heap.empty); + + + +var object_create_function_object = object_create_prealloc_call( + Coq_prealloc_object_create(), + Coq_value_prim(Coq_prim_number(2.0)), + Heap.empty); + + + +var object_define_prop_function_object = object_create_prealloc_call( + Coq_prealloc_object_define_prop(), + Coq_value_prim( + Coq_prim_number(3.0)), + Heap.empty); + + + +var object_define_props_function_object = object_create_prealloc_call( + Coq_prealloc_object_define_props( + ), + Coq_value_prim( + Coq_prim_number(2.0)), + Heap.empty); + + + +var object_seal_function_object = object_create_prealloc_call( + Coq_prealloc_object_seal(), + Coq_value_prim(Coq_prim_number(1.0)), + Heap.empty); + + + +var object_freeze_function_object = object_create_prealloc_call( + Coq_prealloc_object_freeze(), + Coq_value_prim(Coq_prim_number(1.0)), + Heap.empty); + + + +var object_prevent_extensions_function_object = object_create_prealloc_call( + Coq_prealloc_object_prevent_extensions( + ), + Coq_value_prim( + Coq_prim_number(1.0)), + Heap.empty); + + + +var object_is_sealed_function_object = object_create_prealloc_call( + Coq_prealloc_object_is_sealed(), + Coq_value_prim(Coq_prim_number(1.0)), + Heap.empty); + + + +var object_is_frozen_function_object = object_create_prealloc_call( + Coq_prealloc_object_is_frozen(), + Coq_value_prim(Coq_prim_number(1.0)), + Heap.empty); + + + +var object_is_extensible_function_object = object_create_prealloc_call( + Coq_prealloc_object_is_extensible( + ), + Coq_value_prim( + Coq_prim_number(1.0)), + Heap.empty); + + + +var object_prealloc_object_proto = (function () { + var p = write_native(Heap.empty, "constructor", + Coq_value_object(Coq_object_loc_prealloc(Coq_prealloc_object()))); + var p0 = write_native(p, "toString", + Coq_value_object( + Coq_object_loc_prealloc(Coq_prealloc_object_proto_to_string()))); + var p1 = write_native(p0, "valueOf", + Coq_value_object( + Coq_object_loc_prealloc(Coq_prealloc_object_proto_value_of()))); + var p2 = write_native(p1, "hasOwnProperty", + Coq_value_object( + Coq_object_loc_prealloc( + Coq_prealloc_object_proto_has_own_prop()))); + var p3 = write_native(p2, "isPrototypeOf", + Coq_value_object( + Coq_object_loc_prealloc( + Coq_prealloc_object_proto_is_prototype_of()))); + var p4 = write_native(p3, "propertyIsEnumerable", + Coq_value_object( + Coq_object_loc_prealloc( + Coq_prealloc_object_proto_prop_is_enumerable()))); + return ( + object_create_builtin(Coq_value_prim(Coq_prim_null()), "Object", p4)); +}()) +; + + + +var object_proto_to_string_function_object = object_create_prealloc_call( + Coq_prealloc_object_proto_to_string( + ), + Coq_value_prim( + Coq_prim_number(0.0)), + Heap.empty); + + + +var object_proto_value_of_function_object = object_create_prealloc_call( + Coq_prealloc_object_proto_value_of( + ), + Coq_value_prim( + Coq_prim_number(0.0)), + Heap.empty); + + + +var object_proto_has_own_prop_function_object = object_create_prealloc_call( + Coq_prealloc_object_proto_has_own_prop( + ), + Coq_value_prim( + Coq_prim_number(0.0)), + Heap.empty); + + + +var object_proto_is_prototype_of_function_object = object_create_prealloc_call( + Coq_prealloc_object_proto_is_prototype_of( + ), + Coq_value_prim( + Coq_prim_number(1.0)), + Heap.empty); + + + +var object_proto_prop_is_enumerable_function_object = object_create_prealloc_call( + Coq_prealloc_object_proto_prop_is_enumerable( + ), + Coq_value_prim( + Coq_prim_number( + 1.0)), + Heap.empty); + + + +var object_prealloc_function = (function () { + var p = write_constant(Heap.empty, "prototype", + Coq_value_object( + Coq_object_loc_prealloc(Coq_prealloc_function_proto()))); + return ( + object_create_prealloc_constructor(Coq_prealloc_function(), + Coq_value_prim(Coq_prim_number(1.0)), p)); +}()) +; + + + +var object_prealloc_function_proto = (function () { + var p = write_native(Heap.empty, "constructor", + Coq_value_object( + Coq_object_loc_prealloc(Coq_prealloc_function()))); + var p0 = HeapStr.write(p, "length", + Coq_attributes_data_of( + attrib_constant(Coq_value_prim(Coq_prim_number(0.0))))); + var p1 = write_native(p0, "toString", + Coq_value_object( + Coq_object_loc_prealloc( + Coq_prealloc_function_proto_to_string()))); + var p2 = write_native(p1, "apply", + Coq_value_object( + Coq_object_loc_prealloc(Coq_prealloc_function_proto_apply()))); + var p3 = write_native(p2, "call", + Coq_value_object( + Coq_object_loc_prealloc(Coq_prealloc_function_proto_call()))); + var p4 = write_native(p3, "bind", + Coq_value_object( + Coq_object_loc_prealloc(Coq_prealloc_function_proto_bind()))); + var o = object_create_builtin( + Coq_value_object( + Coq_object_loc_prealloc(Coq_prealloc_object_proto())), + "Function", p4); + return ( + object_with_invokation(o, None(), + Some(Coq_call_prealloc(Coq_prealloc_function_proto())), None())); +}()) +; + + + +var function_proto_to_string_function_object = object_create_prealloc_call( + Coq_prealloc_function_proto_to_string( + ), + Coq_value_prim( + Coq_prim_number(0.0)), + Heap.empty); + + + +var function_proto_call_function_object = object_create_prealloc_call( + Coq_prealloc_function_proto_call( + ), + Coq_value_prim( + Coq_prim_number(1.0)), + Heap.empty); + + + +var function_proto_bind_function_object = object_create_prealloc_call( + Coq_prealloc_function_proto_bind( + ), + Coq_value_prim( + Coq_prim_number(1.0)), + Heap.empty); + + + +var function_proto_apply_function_object = object_create_prealloc_call( + Coq_prealloc_function_proto_apply( + ), + Coq_value_prim( + Coq_prim_number(2.0)), + Heap.empty); + + + +var object_prealloc_number = (function () { + var p = write_constant(Heap.empty, "prototype", + Coq_value_object( + Coq_object_loc_prealloc(Coq_prealloc_number_proto()))); + var p0 = write_constant(p, "NaN", + Coq_value_prim(Coq_prim_number(JsNumber.nan))); + var p1 = write_constant(p0, "NEGATIVE_INFINITY", + Coq_value_prim(Coq_prim_number(JsNumber.neg_infinity))); + var p2 = write_constant(p1, "POSITIVE_INFINITY", + Coq_value_prim(Coq_prim_number(JsNumber.infinity))); + var p3 = write_constant(p2, "MAX_VALUE", + Coq_value_prim(Coq_prim_number(JsNumber.max_value))); + var p4 = write_constant(p3, "MIN_VALUE", + Coq_value_prim(Coq_prim_number(JsNumber.min_value))); + return ( + object_create_prealloc_constructor(Coq_prealloc_number(), + Coq_value_prim(Coq_prim_number(1.0)), p4)); +}()) +; + + + +var object_prealloc_number_proto = (function () { + var p = write_native(Heap.empty, "constructor", + Coq_value_object(Coq_object_loc_prealloc(Coq_prealloc_number()))); + var p0 = write_native(p, "toString", + Coq_value_object( + Coq_object_loc_prealloc(Coq_prealloc_number_proto_to_string()))); + var p1 = write_native(p0, "valueOf", + Coq_value_object( + Coq_object_loc_prealloc(Coq_prealloc_number_proto_value_of()))); + var o = object_create_builtin( + Coq_value_object( + Coq_object_loc_prealloc(Coq_prealloc_object_proto())), + "Number", p1); + return ( + object_with_primitive_value(o, + Coq_value_prim(Coq_prim_number(JsNumber.zero)))); +}()) +; + + + +var number_proto_to_string_function_object = object_create_prealloc_call( + Coq_prealloc_number_proto_to_string( + ), + Coq_value_prim( + Coq_prim_number(0.0)), + Heap.empty); + + + +var number_proto_value_of_function_object = object_create_prealloc_call( + Coq_prealloc_number_proto_value_of( + ), + Coq_value_prim( + Coq_prim_number(0.0)), + Heap.empty); + + + +var object_prealloc_array = (function () { + var p = write_constant(Heap.empty, "prototype", + Coq_value_object( + Coq_object_loc_prealloc(Coq_prealloc_array_proto()))); + var p0 = write_native(p, "isArray", + Coq_value_object( + Coq_object_loc_prealloc(Coq_prealloc_array_is_array()))); + var p1 = write_constant(p0, "length", Coq_value_prim(Coq_prim_number(1.0))); + return ( + object_create_prealloc_constructor(Coq_prealloc_array(), + Coq_value_prim(Coq_prim_number(1.0)), p1)); +}()) +; + + + +var array_is_array_function_object = object_create_prealloc_call( + Coq_prealloc_array_is_array(), + Coq_value_prim(Coq_prim_number(1.0)), + Heap.empty); + + + +var object_prealloc_array_proto = (function () { + var p = write_native(Heap.empty, "constructor", + Coq_value_object(Coq_object_loc_prealloc(Coq_prealloc_array()))); + var p0 = write_native(p, "toString", + Coq_value_object( + Coq_object_loc_prealloc(Coq_prealloc_array_proto_to_string()))); + var p1 = write_native(p0, "join", + Coq_value_object( + Coq_object_loc_prealloc(Coq_prealloc_array_proto_join()))); + var p2 = write_native(p1, "pop", + Coq_value_object( + Coq_object_loc_prealloc(Coq_prealloc_array_proto_pop()))); + var p3 = write_native(p2, "push", + Coq_value_object( + Coq_object_loc_prealloc(Coq_prealloc_array_proto_push()))); + var p4 = write_constant(p3, "length", Coq_value_prim(Coq_prim_number(0.0))); + return ( + object_create_builtin( + Coq_value_object(Coq_object_loc_prealloc(Coq_prealloc_object_proto())), + "Array", p4)); +}()) +; + + + +var array_proto_pop_function_object = object_create_prealloc_call( + Coq_prealloc_array_proto_pop(), + Coq_value_prim(Coq_prim_number(0.0)), + Heap.empty); + + + +var array_proto_push_function_object = object_create_prealloc_call( + Coq_prealloc_array_proto_push(), + Coq_value_prim(Coq_prim_number(1.0)), + Heap.empty); + + + +var array_proto_to_string_function_object = object_create_prealloc_call( + Coq_prealloc_array_proto_to_string( + ), + Coq_value_prim( + Coq_prim_number(0.0)), + Heap.empty); + + + +var array_proto_join_function_object = object_create_prealloc_call( + Coq_prealloc_array_proto_join(), + Coq_value_prim(Coq_prim_number(1.0)), + Heap.empty); + + + +var object_prealloc_string = (function () { + var p = write_constant(Heap.empty, "prototype", + Coq_value_object( + Coq_object_loc_prealloc(Coq_prealloc_string_proto()))); + return ( + object_create_prealloc_constructor(Coq_prealloc_string(), + Coq_value_prim(Coq_prim_number(1.0)), p)); +}()) +; + + + +var object_prealloc_string_proto = (function () { + var p = write_native(Heap.empty, "constructor", + Coq_value_object(Coq_object_loc_prealloc(Coq_prealloc_string()))); + var p0 = write_native(p, "toString", + Coq_value_object( + Coq_object_loc_prealloc(Coq_prealloc_string_proto_to_string()))); + var p1 = write_native(p0, "valueOf", + Coq_value_object( + Coq_object_loc_prealloc(Coq_prealloc_string_proto_value_of()))); + var o = object_create_builtin( + Coq_value_object( + Coq_object_loc_prealloc(Coq_prealloc_object_proto())), + "String", p1); + return ( + object_with_primitive_value(o, Coq_value_prim(Coq_prim_string("")))); +}()) +; + + + +var string_proto_to_string_function_object = object_create_prealloc_call( + Coq_prealloc_string_proto_to_string( + ), + Coq_value_prim( + Coq_prim_number(0.0)), + Heap.empty); + + + +var string_proto_value_of_function_object = object_create_prealloc_call( + Coq_prealloc_string_proto_value_of( + ), + Coq_value_prim( + Coq_prim_number(0.0)), + Heap.empty); + + + +var object_prealloc_bool = (function () { + var p = write_constant(Heap.empty, "prototype", + Coq_value_object( + Coq_object_loc_prealloc(Coq_prealloc_bool_proto()))); + return ( + object_create_prealloc_constructor(Coq_prealloc_bool(), + Coq_value_prim(Coq_prim_number(1.0)), p)); +}()) +; + + + +var object_prealloc_bool_proto = (function () { + var p = write_native(Heap.empty, "constructor", + Coq_value_object(Coq_object_loc_prealloc(Coq_prealloc_bool()))); + var p0 = write_native(p, "toString", + Coq_value_object( + Coq_object_loc_prealloc(Coq_prealloc_bool_proto_to_string()))); + var p1 = write_native(p0, "valueOf", + Coq_value_object( + Coq_object_loc_prealloc(Coq_prealloc_bool_proto_value_of()))); + var o = object_create_builtin( + Coq_value_object( + Coq_object_loc_prealloc(Coq_prealloc_object_proto())), + "Boolean", p1); + return ( + object_with_primitive_value(o, Coq_value_prim(Coq_prim_bool(false)))); +}()) +; + + + +var bool_proto_to_string_function_object = object_create_prealloc_call( + Coq_prealloc_bool_proto_to_string( + ), + Coq_value_prim( + Coq_prim_number(0.0)), + Heap.empty); + + + +var bool_proto_value_of_function_object = object_create_prealloc_call( + Coq_prealloc_bool_proto_value_of( + ), + Coq_value_prim( + Coq_prim_number(0.0)), + Heap.empty); + + + +var object_prealloc_math = (function () { + var p = write_constant(Heap.empty, "PI", + Coq_value_prim(Coq_prim_number(JsNumber.pi))); + var p0 = write_constant(p, "E", + Coq_value_prim(Coq_prim_number(JsNumber.e))); + var p1 = write_constant(p0, "LN2", + Coq_value_prim(Coq_prim_number(JsNumber.ln2))); + return ( + object_create_builtin( + Coq_value_object(Coq_object_loc_prealloc(Coq_prealloc_object_proto())), + "Math", p1)); +}()) +; + + + +var object_prealloc_date = object_create_prealloc_constructor( + Coq_prealloc_date(), + Coq_value_prim(Coq_prim_number(1.0)), + Heap.empty); + + + +var object_prealloc_regexp = object_create_prealloc_constructor( + Coq_prealloc_regexp(), + Coq_value_prim(Coq_prim_number(1.0)), + Heap.empty); + + + +var object_prealloc_error = (function () { + var p = write_constant(Heap.empty, "prototype", + Coq_value_object( + Coq_object_loc_prealloc(Coq_prealloc_error_proto()))); + return ( + object_create_prealloc_constructor(Coq_prealloc_error(), + Coq_value_prim(Coq_prim_number(1.0)), p)); +}()) +; + + + +var object_prealloc_error_proto = (function () { + var p = write_native(Heap.empty, "constructor", + Coq_value_object(Coq_object_loc_prealloc(Coq_prealloc_error()))); + var p0 = write_native(p, "name", Coq_value_prim(Coq_prim_string("Error"))); + var p1 = write_native(p0, "message", Coq_value_prim(Coq_prim_string(""))); + var p2 = write_native(p1, "toString", + Coq_value_object( + Coq_object_loc_prealloc(Coq_prealloc_error_proto_to_string()))); + return ( + object_create_builtin( + Coq_value_object(Coq_object_loc_prealloc(Coq_prealloc_object_proto())), + "Error", p2)); +}()) +; + + + +var error_proto_to_string_function_object = object_create_prealloc_call( + Coq_prealloc_error_proto_to_string( + ), + Coq_value_prim( + Coq_prim_number(0.0)), + Heap.empty); + + + +var object_prealloc_native_error = function (ne) { + var p = write_constant(Heap.empty, "prototype", + Coq_value_object( + Coq_object_loc_prealloc(Coq_prealloc_native_error_proto(ne)))); + return ( + object_create_prealloc_constructor(Coq_prealloc_native_error(ne), + Coq_value_prim(Coq_prim_number(1.0)), p)); +}; + + + +var object_prealloc_native_error_proto = function (ne) { + var p = write_native(Heap.empty, "constructor", + Coq_value_object( + Coq_object_loc_prealloc(Coq_prealloc_native_error(ne)))); + var p0 = write_native(p, "name", + Coq_value_prim(Coq_prim_string(string_of_native_error(ne)))); + var p1 = write_native(p0, "message", Coq_value_prim(Coq_prim_string(""))); + return ( + object_create_builtin( + Coq_value_object(Coq_object_loc_prealloc(Coq_prealloc_error_proto())), + "Error", p1)); +}; + + + +var object_prealloc_json = object_create_builtin( + Coq_value_object( + Coq_object_loc_prealloc( + Coq_prealloc_object_proto())), "JSON", + Heap.empty); + + + +var throw_type_error_object = (function () { + var o = object_create_prealloc_call(Coq_prealloc_throw_type_error(), + Coq_value_prim(Coq_prim_number(0.0)), Heap.empty); + var o0 = object_with_scope(o, Some(lexical_env_initial)); + var o1 = object_with_formal_params(o0, Some(mk_nil())); + return (object_set_extensible(o1, false)); +}()) +; + + + +var object_heap_initial_function_objects_1 = function (h) { + var h0 = HeapObj.write(h, + Coq_object_loc_prealloc(Coq_prealloc_throw_type_error()), + throw_type_error_object); + var h1 = HeapObj.write(h0, + Coq_object_loc_prealloc(Coq_prealloc_global_eval()), + global_eval_function_object); + var h2 = HeapObj.write(h1, + Coq_object_loc_prealloc(Coq_prealloc_global_parse_int()), + global_parse_int_function_object); + var h3 = HeapObj.write(h2, + Coq_object_loc_prealloc(Coq_prealloc_global_parse_float()), + global_parse_float_function_object); + var h4 = HeapObj.write(h3, + Coq_object_loc_prealloc(Coq_prealloc_global_is_nan()), + global_is_nan_function_object); + var h5 = HeapObj.write(h4, + Coq_object_loc_prealloc(Coq_prealloc_global_is_finite()), + global_is_finite_function_object); + var h6 = HeapObj.write(h5, + Coq_object_loc_prealloc(Coq_prealloc_global_decode_uri()), + global_decode_uri_function_object); + var h7 = HeapObj.write(h6, + Coq_object_loc_prealloc( + Coq_prealloc_global_decode_uri_component()), + global_decode_uri_component_function_object); + var h8 = HeapObj.write(h7, + Coq_object_loc_prealloc(Coq_prealloc_global_encode_uri()), + global_encode_uri_function_object); + return ( + HeapObj.write(h8, + Coq_object_loc_prealloc(Coq_prealloc_global_encode_uri_component()), + global_encode_uri_component_function_object)); +}; + + + +var object_heap_initial_function_objects_2 = function (h) { + var h0 = object_heap_initial_function_objects_1(h); + var h1 = HeapObj.write(h0, + Coq_object_loc_prealloc(Coq_prealloc_object_get_proto_of()), + object_get_proto_of_function_object); + var h2 = HeapObj.write(h1, + Coq_object_loc_prealloc( + Coq_prealloc_object_get_own_prop_descriptor()), + object_get_own_prop_descriptor_function_object); + var h3 = HeapObj.write(h2, + Coq_object_loc_prealloc(Coq_prealloc_object_get_own_prop_name()), + object_get_own_prop_name_function_object); + var h4 = HeapObj.write(h3, + Coq_object_loc_prealloc(Coq_prealloc_object_create()), + object_create_function_object); + var h5 = HeapObj.write(h4, + Coq_object_loc_prealloc(Coq_prealloc_object_define_prop()), + object_define_prop_function_object); + var h6 = HeapObj.write(h5, + Coq_object_loc_prealloc(Coq_prealloc_object_define_props()), + object_define_props_function_object); + var h7 = HeapObj.write(h6, + Coq_object_loc_prealloc(Coq_prealloc_object_seal()), + object_seal_function_object); + var h8 = HeapObj.write(h7, + Coq_object_loc_prealloc(Coq_prealloc_object_freeze()), + object_freeze_function_object); + var h9 = HeapObj.write(h8, + Coq_object_loc_prealloc( + Coq_prealloc_object_prevent_extensions()), + object_prevent_extensions_function_object); + var h10 = HeapObj.write(h9, + Coq_object_loc_prealloc(Coq_prealloc_object_is_sealed()), + object_is_sealed_function_object); + var h11 = HeapObj.write(h10, + Coq_object_loc_prealloc(Coq_prealloc_object_is_frozen()), + object_is_frozen_function_object); + return ( + HeapObj.write(h11, + Coq_object_loc_prealloc(Coq_prealloc_object_is_extensible()), + object_is_extensible_function_object)); +}; + + + +var object_heap_initial_function_objects_3 = function (h) { + var h0 = object_heap_initial_function_objects_2(h); + var h1 = HeapObj.write(h0, + Coq_object_loc_prealloc(Coq_prealloc_object_proto_to_string()), + object_proto_to_string_function_object); + var h2 = HeapObj.write(h1, + Coq_object_loc_prealloc(Coq_prealloc_object_proto_value_of()), + object_proto_value_of_function_object); + var h3 = HeapObj.write(h2, + Coq_object_loc_prealloc( + Coq_prealloc_object_proto_has_own_prop()), + object_proto_has_own_prop_function_object); + var h4 = HeapObj.write(h3, + Coq_object_loc_prealloc( + Coq_prealloc_object_proto_is_prototype_of()), + object_proto_is_prototype_of_function_object); + var h5 = HeapObj.write(h4, + Coq_object_loc_prealloc( + Coq_prealloc_object_proto_prop_is_enumerable()), + object_proto_prop_is_enumerable_function_object); + var h6 = HeapObj.write(h5, + Coq_object_loc_prealloc(Coq_prealloc_function_proto_to_string()), + function_proto_to_string_function_object); + var h7 = HeapObj.write(h6, + Coq_object_loc_prealloc(Coq_prealloc_function_proto_call()), + function_proto_call_function_object); + var h8 = HeapObj.write(h7, + Coq_object_loc_prealloc(Coq_prealloc_function_proto_bind()), + function_proto_bind_function_object); + return ( + HeapObj.write(h8, + Coq_object_loc_prealloc(Coq_prealloc_function_proto_apply()), + function_proto_apply_function_object)); +}; + + + +var object_heap_initial_function_objects_4 = function (h) { + var h0 = object_heap_initial_function_objects_3(h); + var h1 = HeapObj.write(h0, + Coq_object_loc_prealloc(Coq_prealloc_array_is_array()), + array_is_array_function_object); + var h2 = HeapObj.write(h1, + Coq_object_loc_prealloc(Coq_prealloc_array_proto_to_string()), + array_proto_to_string_function_object); + var h3 = HeapObj.write(h2, + Coq_object_loc_prealloc(Coq_prealloc_array_proto_join()), + array_proto_join_function_object); + var h4 = HeapObj.write(h3, + Coq_object_loc_prealloc(Coq_prealloc_array_proto_pop()), + array_proto_pop_function_object); + var h5 = HeapObj.write(h4, + Coq_object_loc_prealloc(Coq_prealloc_array_proto_push()), + array_proto_push_function_object); + var h6 = HeapObj.write(h5, + Coq_object_loc_prealloc(Coq_prealloc_string_proto_to_string()), + string_proto_to_string_function_object); + var h7 = HeapObj.write(h6, + Coq_object_loc_prealloc(Coq_prealloc_string_proto_value_of()), + string_proto_value_of_function_object); + var h8 = HeapObj.write(h7, + Coq_object_loc_prealloc(Coq_prealloc_bool_proto_to_string()), + bool_proto_to_string_function_object); + return ( + HeapObj.write(h8, + Coq_object_loc_prealloc(Coq_prealloc_bool_proto_value_of()), + bool_proto_value_of_function_object)); +}; + + + +var object_heap_initial_function_objects = function (h) { + var h0 = object_heap_initial_function_objects_4(h); + var h1 = HeapObj.write(h0, + Coq_object_loc_prealloc(Coq_prealloc_number_proto_to_string()), + number_proto_to_string_function_object); + var h2 = HeapObj.write(h1, + Coq_object_loc_prealloc(Coq_prealloc_number_proto_value_of()), + number_proto_value_of_function_object); + return ( + HeapObj.write(h2, + Coq_object_loc_prealloc(Coq_prealloc_error_proto_to_string()), + error_proto_to_string_function_object)); +}; + + + +var object_heap_initial = (function () { + var h = HeapObj.write(Heap.empty, + Coq_object_loc_prealloc(Coq_prealloc_global()), + object_prealloc_global); + var h0 = HeapObj.write(h, Coq_object_loc_prealloc(Coq_prealloc_object()), + object_prealloc_object); + var h1 = HeapObj.write(h0, + Coq_object_loc_prealloc(Coq_prealloc_object_proto()), + object_prealloc_object_proto); + var h2 = HeapObj.write(h1, Coq_object_loc_prealloc(Coq_prealloc_bool()), + object_prealloc_bool); + var h3 = HeapObj.write(h2, + Coq_object_loc_prealloc(Coq_prealloc_bool_proto()), + object_prealloc_bool_proto); + var h4 = HeapObj.write(h3, Coq_object_loc_prealloc(Coq_prealloc_number()), + object_prealloc_number); + var h5 = HeapObj.write(h4, + Coq_object_loc_prealloc(Coq_prealloc_number_proto()), + object_prealloc_number_proto); + var h6 = HeapObj.write(h5, + Coq_object_loc_prealloc(Coq_prealloc_function()), + object_prealloc_function); + var h7 = HeapObj.write(h6, + Coq_object_loc_prealloc(Coq_prealloc_function_proto()), + object_prealloc_function_proto); + var h8 = HeapObj.write(h7, Coq_object_loc_prealloc(Coq_prealloc_array()), + object_prealloc_array); + var h9 = HeapObj.write(h8, + Coq_object_loc_prealloc(Coq_prealloc_array_proto()), + object_prealloc_array_proto); + var h10 = HeapObj.write(h9, Coq_object_loc_prealloc(Coq_prealloc_string()), + object_prealloc_string); + var h11 = HeapObj.write(h10, + Coq_object_loc_prealloc(Coq_prealloc_string_proto()), + object_prealloc_string_proto); + var h12 = HeapObj.write(h11, Coq_object_loc_prealloc(Coq_prealloc_math()), + object_prealloc_math); + var h13 = HeapObj.write(h12, Coq_object_loc_prealloc(Coq_prealloc_date()), + object_prealloc_date); + var h14 = HeapObj.write(h13, + Coq_object_loc_prealloc(Coq_prealloc_regexp()), + object_prealloc_regexp); + var h15 = HeapObj.write(h14, + Coq_object_loc_prealloc(Coq_prealloc_error_proto()), + object_prealloc_error_proto); + var h16 = HeapObj.write(h15, + Coq_object_loc_prealloc( + Coq_prealloc_native_error_proto(Coq_native_error_eval())), + object_prealloc_native_error_proto(Coq_native_error_eval())); + var h17 = HeapObj.write(h16, + Coq_object_loc_prealloc( + Coq_prealloc_native_error_proto(Coq_native_error_range())), + object_prealloc_native_error_proto(Coq_native_error_range())); + var h18 = HeapObj.write(h17, + Coq_object_loc_prealloc( + Coq_prealloc_native_error_proto(Coq_native_error_ref())), + object_prealloc_native_error_proto(Coq_native_error_ref())); + var h19 = HeapObj.write(h18, + Coq_object_loc_prealloc( + Coq_prealloc_native_error_proto(Coq_native_error_syntax())), + object_prealloc_native_error_proto(Coq_native_error_syntax())); + var h20 = HeapObj.write(h19, + Coq_object_loc_prealloc( + Coq_prealloc_native_error_proto(Coq_native_error_type())), + object_prealloc_native_error_proto(Coq_native_error_type())); + var h21 = HeapObj.write(h20, + Coq_object_loc_prealloc( + Coq_prealloc_native_error_proto(Coq_native_error_uri())), + object_prealloc_native_error_proto(Coq_native_error_uri())); + var h22 = HeapObj.write(h21, Coq_object_loc_prealloc(Coq_prealloc_error()), + object_prealloc_error); + var h23 = HeapObj.write(h22, + Coq_object_loc_prealloc( + Coq_prealloc_native_error(Coq_native_error_eval())), + object_prealloc_native_error(Coq_native_error_eval())); + var h24 = HeapObj.write(h23, + Coq_object_loc_prealloc( + Coq_prealloc_native_error(Coq_native_error_range())), + object_prealloc_native_error(Coq_native_error_range())); + var h25 = HeapObj.write(h24, + Coq_object_loc_prealloc( + Coq_prealloc_native_error(Coq_native_error_ref())), + object_prealloc_native_error(Coq_native_error_ref())); + var h26 = HeapObj.write(h25, + Coq_object_loc_prealloc( + Coq_prealloc_native_error(Coq_native_error_syntax())), + object_prealloc_native_error(Coq_native_error_syntax())); + var h27 = HeapObj.write(h26, + Coq_object_loc_prealloc( + Coq_prealloc_native_error(Coq_native_error_type())), + object_prealloc_native_error(Coq_native_error_type())); + var h28 = HeapObj.write(h27, + Coq_object_loc_prealloc( + Coq_prealloc_native_error(Coq_native_error_uri())), + object_prealloc_native_error(Coq_native_error_uri())); + var h29 = HeapObj.write(h28, Coq_object_loc_prealloc(Coq_prealloc_json()), + object_prealloc_json); + return (object_heap_initial_function_objects(h29)); +}()) +; + + + +var env_record_heap_initial = HeapInt.write(Heap.empty, + env_loc_global_env_record, + env_record_object_default( + Coq_object_loc_prealloc( + Coq_prealloc_global()))); + + + +var dummy_fresh_locations = 0; + + + +var state_initial = { + state_object_heap: object_heap_initial, + state_env_record_heap: env_record_heap_initial, + state_fresh_locations: dummy_fresh_locations +}; +}// end of with JsCommon +}// end of with JsSyntax +}// end of with JsSyntaxAux + +return { + string_of_native_error: string_of_native_error, + prop_attributes_for_global_object: prop_attributes_for_global_object, + attrib_constant: attrib_constant, + object_create_builtin: object_create_builtin, + object_create_prealloc_call_or_construct: object_create_prealloc_call_or_construct, + object_create_prealloc_call: object_create_prealloc_call, + object_create_prealloc_constructor: object_create_prealloc_constructor, + write_native: write_native, + write_constant: write_constant, + object_prealloc_global_proto: object_prealloc_global_proto, + object_prealloc_global_class: object_prealloc_global_class, + object_prealloc_global_properties: object_prealloc_global_properties, + object_prealloc_global: object_prealloc_global, + global_eval_function_object: global_eval_function_object, + global_parse_int_function_object: global_parse_int_function_object, + global_parse_float_function_object: global_parse_float_function_object, + global_is_nan_function_object: global_is_nan_function_object, + global_is_finite_function_object: global_is_finite_function_object, + global_decode_uri_function_object: global_decode_uri_function_object, + global_decode_uri_component_function_object: global_decode_uri_component_function_object, + global_encode_uri_function_object: global_encode_uri_function_object, + global_encode_uri_component_function_object: global_encode_uri_component_function_object, + object_prealloc_object: object_prealloc_object, + object_get_proto_of_function_object: object_get_proto_of_function_object, + object_get_own_prop_descriptor_function_object: object_get_own_prop_descriptor_function_object, + object_get_own_prop_name_function_object: object_get_own_prop_name_function_object, + object_create_function_object: object_create_function_object, + object_define_prop_function_object: object_define_prop_function_object, + object_define_props_function_object: object_define_props_function_object, + object_seal_function_object: object_seal_function_object, + object_freeze_function_object: object_freeze_function_object, + object_prevent_extensions_function_object: object_prevent_extensions_function_object, + object_is_sealed_function_object: object_is_sealed_function_object, + object_is_frozen_function_object: object_is_frozen_function_object, + object_is_extensible_function_object: object_is_extensible_function_object, + object_prealloc_object_proto: object_prealloc_object_proto, + object_proto_to_string_function_object: object_proto_to_string_function_object, + object_proto_value_of_function_object: object_proto_value_of_function_object, + object_proto_has_own_prop_function_object: object_proto_has_own_prop_function_object, + object_proto_is_prototype_of_function_object: object_proto_is_prototype_of_function_object, + object_proto_prop_is_enumerable_function_object: object_proto_prop_is_enumerable_function_object, + object_prealloc_function: object_prealloc_function, + object_prealloc_function_proto: object_prealloc_function_proto, + function_proto_to_string_function_object: function_proto_to_string_function_object, + function_proto_call_function_object: function_proto_call_function_object, + function_proto_bind_function_object: function_proto_bind_function_object, + function_proto_apply_function_object: function_proto_apply_function_object, + object_prealloc_number: object_prealloc_number, + object_prealloc_number_proto: object_prealloc_number_proto, + number_proto_to_string_function_object: number_proto_to_string_function_object, + number_proto_value_of_function_object: number_proto_value_of_function_object, + object_prealloc_array: object_prealloc_array, + array_is_array_function_object: array_is_array_function_object, + object_prealloc_array_proto: object_prealloc_array_proto, + array_proto_pop_function_object: array_proto_pop_function_object, + array_proto_push_function_object: array_proto_push_function_object, + array_proto_to_string_function_object: array_proto_to_string_function_object, + array_proto_join_function_object: array_proto_join_function_object, + object_prealloc_string: object_prealloc_string, + object_prealloc_string_proto: object_prealloc_string_proto, + string_proto_to_string_function_object: string_proto_to_string_function_object, + string_proto_value_of_function_object: string_proto_value_of_function_object, + object_prealloc_bool: object_prealloc_bool, + object_prealloc_bool_proto: object_prealloc_bool_proto, + bool_proto_to_string_function_object: bool_proto_to_string_function_object, + bool_proto_value_of_function_object: bool_proto_value_of_function_object, + object_prealloc_math: object_prealloc_math, + object_prealloc_date: object_prealloc_date, + object_prealloc_regexp: object_prealloc_regexp, + object_prealloc_error: object_prealloc_error, + object_prealloc_error_proto: object_prealloc_error_proto, + error_proto_to_string_function_object: error_proto_to_string_function_object, + object_prealloc_native_error: object_prealloc_native_error, + object_prealloc_native_error_proto: object_prealloc_native_error_proto, + object_prealloc_json: object_prealloc_json, + throw_type_error_object: throw_type_error_object, + object_heap_initial_function_objects_1: object_heap_initial_function_objects_1, + object_heap_initial_function_objects_2: object_heap_initial_function_objects_2, + object_heap_initial_function_objects_3: object_heap_initial_function_objects_3, + object_heap_initial_function_objects_4: object_heap_initial_function_objects_4, + object_heap_initial_function_objects: object_heap_initial_function_objects, + object_heap_initial: object_heap_initial, + env_record_heap_initial: env_record_heap_initial, + dummy_fresh_locations: dummy_fresh_locations, + state_initial: state_initial}; +})(); + +/* --------------------- Prheap.js --------------------- */ + + +/* --------------------- Debug.js --------------------- */ + +var Debug = { + not_yet_implemented_because : function() {}, + impossible_because : function() {}, + impossible_with_heap_because : function() {}, + ref_get_value : function() {}, + ref_get_value_2 : function() {}, + run_object_method : function() {}, + run_object_heap_set_extensible : function() {}, + lexical_env_get_identifier_ref : function() {} +}; + +/* --------------------- JsInterpreterMonads.unlog.js --------------------- */ + +var JsInterpreterMonads = (function() { +with (JsCommon) { +with (JsSyntax) { +with (JsSyntaxAux) { +with (LibList) { +with (LibOption) { +with (Shared) { + +function Coq_result_some(value) { return {tag: "Coq_result_some", value: value}; } + +function Coq_result_not_yet_implemented() { return {tag: "Coq_result_not_yet_implemented" }; } + +function Coq_result_impossible() { return {tag: "Coq_result_impossible" }; } + +function Coq_result_bottom(state) { return {tag: "Coq_result_bottom", state: state}; } + + + + + +var res_out = function (o) { + return (Coq_result_some(Coq_specret_out(o))); +}; + + + +var res_spec = function (s, a) { + return (Coq_result_some(Coq_specret_val(s, a))); +}; + + + + + + + +var res_ter = function (s, r) { + return (res_out(Coq_out_ter(s, r))); +}; + + + + + +var res_void = function (s) { + return (res_out(out_void(s))); +}; + + + +var out_from_retn = function (_foo_) { + switch (_foo_.tag) { + case "Coq_specret_val": + var s = _foo_.state; + throw false; + case "Coq_specret_out": + var o = _foo_.out; + return (o); + } + +}; + + + +var result_out = function (o) { + return (res_out(o)); +}; + + + +var get_arg = function (x, l) { + return (nth_def(Coq_value_prim(Coq_prim_undef()), x, l)); +}; + + + +var get_arg_first_and_rest = function (lv) { + return ( + [get_arg(0, lv), (function () { + switch (lv.tag) { + case "[]": + return (mk_nil()); + case "::": + var v = lv.head, rest = lv.tail; + return (rest); + } + + }()) + ]); +}; + + + +var destr_list = function (l, d, f) { + switch (l.tag) { + case "[]": + return (d); + case "::": + var a = l.head, l0 = l.tail; + return (f(a)); + } + +}; + + + +var if_empty_label = function (s, r, k) { + if (label_compare(r.res_label, Coq_label_empty())) { + return (k({})); + } else { + return ( + function (s, m) { + Debug.impossible_with_heap_because(__LOC__, s, m); + return (Coq_result_impossible());}(s, + "[if_empty_label] received a normal result with non-empty label.")); + } +}; + + + +var if_some = function (op, k) { + switch (op.tag) { + case "Some": + var a = op.value; + return (k(a)); + case "None": + return ( + function (s) { + Debug.impossible_because(__LOC__, s); + return (Coq_result_impossible());}( + "[if_some] called with [None].")); + } + +}; + + + +var if_some_or_default = function (o, d, k) { + return (option_case(d, k, o)); +}; + + + +var if_result_some = function (w, k) { + switch (w.tag) { + case "Coq_result_some": + var a = w.value; + return (k(a)); + case "Coq_result_not_yet_implemented": + return (Coq_result_not_yet_implemented()); + case "Coq_result_impossible": + return (Coq_result_impossible()); + case "Coq_result_bottom": + var s0 = w.state; + return (Coq_result_bottom(s0)); + } + +}; + + + +var if_out_some = function (w, k) { + return ( + if_result_some(w, function (sp) { return (k(out_from_retn(sp)));})); +}; + + + +var throw_result = function (w) { + return (if_out_some(w, function (o) { return (res_out(o));})); +}; + + + +var if_ter = function (w, k) { + return ( + if_out_some(w, function (o) { + switch (o.tag) { + case "Coq_out_div": + return (res_out(o)); + case "Coq_out_ter": + var s0 = o.state, r = o.res; + return (k(s0, r)); + } + })); +}; + + + +var if_success_state = function (rv, w, k) { + return ( + if_ter(w, function (s0, r) { + var _switch_arg_1 = r.res_type; + switch (_switch_arg_1.tag) { + case "Coq_restype_normal": + return ( + if_empty_label(s0, r, function (x) { + return ( + k(s0, (function () { + if (resvalue_compare(r.res_value, + Coq_resvalue_empty())) { + return (rv); + } else { + return (r.res_value); + }}())));})); + case "Coq_restype_throw": + return (res_ter(s0, r)); + default: + return (res_ter(s0, res_overwrite_value_if_empty(rv, r))); + } + })); +}; + + + +var if_success = function (w, k) { + return ( + if_ter(w, function (s0, r) { + var _switch_arg_2 = r.res_type; + switch (_switch_arg_2.tag) { + case "Coq_restype_normal": + return ( + if_empty_label(s0, r, function (x) { + return (k(s0, r.res_value));})); + case "Coq_restype_break": + return (res_out(Coq_out_ter(s0, r))); + case "Coq_restype_continue": + return (res_out(Coq_out_ter(s0, r))); + case "Coq_restype_return": + return (res_out(Coq_out_ter(s0, r))); + case "Coq_restype_throw": + return (res_out(Coq_out_ter(s0, r))); + } + })); +}; + + + +var if_void = function (w, k) { + return ( + if_success(w, function (s, rv) { + switch (rv.tag) { + case "Coq_resvalue_empty": + return (k(s)); + case "Coq_resvalue_value": + var v = rv.value; + return ( + function (s, m) { + Debug.impossible_with_heap_because(__LOC__, s, m); + return (Coq_result_impossible());}(s, + "[if_void called] with non-void result value.")); + case "Coq_resvalue_ref": + var r = rv.ref; + return ( + function (s, m) { + Debug.impossible_with_heap_because(__LOC__, s, m); + return (Coq_result_impossible());}(s, + "[if_void called] with non-void result value.")); + } + })); +}; + + + +var if_not_throw = function (w, k) { + return ( + if_ter(w, function (s0, r) { + var _switch_arg_3 = r.res_type; + switch (_switch_arg_3.tag) { + case "Coq_restype_normal": + return (k(s0, r)); + case "Coq_restype_break": + return (k(s0, r)); + case "Coq_restype_continue": + return (k(s0, r)); + case "Coq_restype_return": + return (k(s0, r)); + case "Coq_restype_throw": + return (w); + } + })); +}; + + + +var if_any_or_throw = function (w, k1, k2) { + return ( + if_ter(w, function (s, r) { + var _switch_arg_4 = r.res_type; + switch (_switch_arg_4.tag) { + case "Coq_restype_normal": + return (k1(s, r)); + case "Coq_restype_break": + return (k1(s, r)); + case "Coq_restype_continue": + return (k1(s, r)); + case "Coq_restype_return": + return (k1(s, r)); + case "Coq_restype_throw": + var _switch_arg_5 = r.res_value; + switch (_switch_arg_5.tag) { + case "Coq_resvalue_value": + var v = _switch_arg_5.value; + return ( + if_empty_label(s, r, function (x) { return (k2(s, v));})); + default: + return ( + function (s, m) { + Debug.impossible_with_heap_because(__LOC__, s, m); + return (Coq_result_impossible());}(s, + "[if_any_or_throw] called with a non-value result.")); + } + + } + })); +}; + + + +var if_success_or_return = function (w, k1, k2) { + return ( + if_ter(w, function (s, r) { + var _switch_arg_6 = r.res_type; + switch (_switch_arg_6.tag) { + case "Coq_restype_normal": + return (if_empty_label(s, r, function (x) { return (k1(s));})); + case "Coq_restype_break": + return (w); + case "Coq_restype_continue": + return (w); + case "Coq_restype_return": + return ( + if_empty_label(s, r, function (x) { + return (k2(s, r.res_value));})); + case "Coq_restype_throw": + return (w); + } + })); +}; + + + +var if_break = function (w, k) { + return ( + if_ter(w, function (s, r) { + var _switch_arg_7 = r.res_type; + switch (_switch_arg_7.tag) { + case "Coq_restype_normal": + return (res_ter(s, r)); + case "Coq_restype_break": + return (k(s, r)); + case "Coq_restype_continue": + return (res_ter(s, r)); + case "Coq_restype_return": + return (res_ter(s, r)); + case "Coq_restype_throw": + return (res_ter(s, r)); + } + })); +}; + + + +var if_value = function (w, k) { + return ( + if_success(w, function (s, rv) { + switch (rv.tag) { + case "Coq_resvalue_empty": + return ( + function (s, m) { + Debug.impossible_with_heap_because(__LOC__, s, m); + return (Coq_result_impossible());}(s, + "[if_value] called with non-value.")); + case "Coq_resvalue_value": + var v = rv.value; + return (k(s, v)); + case "Coq_resvalue_ref": + var r = rv.ref; + return ( + function (s, m) { + Debug.impossible_with_heap_because(__LOC__, s, m); + return (Coq_result_impossible());}(s, + "[if_value] called with non-value.")); + } + })); +}; + + + +var if_bool = function (w, k) { + return ( + if_value(w, function (s, v) { + switch (v.tag) { + case "Coq_value_prim": + var p = v.value; + switch (p.tag) { + case "Coq_prim_undef": + return ( + function (s, m) { + Debug.impossible_with_heap_because(__LOC__, s, m); + return (Coq_result_impossible());}(s, + "[if_bool] called with non-boolean value.")); + case "Coq_prim_null": + return ( + function (s, m) { + Debug.impossible_with_heap_because(__LOC__, s, m); + return (Coq_result_impossible());}(s, + "[if_bool] called with non-boolean value.")); + case "Coq_prim_bool": + var b = p.value; + return (k(s, b)); + case "Coq_prim_number": + var n = p.value; + return ( + function (s, m) { + Debug.impossible_with_heap_because(__LOC__, s, m); + return (Coq_result_impossible());}(s, + "[if_bool] called with non-boolean value.")); + case "Coq_prim_string": + var s0 = p.value; + return ( + function (s, m) { + Debug.impossible_with_heap_because(__LOC__, s, m); + return (Coq_result_impossible());}(s, + "[if_bool] called with non-boolean value.")); + } + + case "Coq_value_object": + var o = v.value; + return ( + function (s, m) { + Debug.impossible_with_heap_because(__LOC__, s, m); + return (Coq_result_impossible());}(s, + "[if_bool] called with non-boolean value.")); + } + })); +}; + + + +var if_object = function (w, k) { + return ( + if_value(w, function (s, v) { + switch (v.tag) { + case "Coq_value_prim": + var p = v.value; + return ( + function (s, m) { + Debug.impossible_with_heap_because(__LOC__, s, m); + return (Coq_result_impossible());}(s, + "[if_object] called on a primitive.")); + case "Coq_value_object": + var l = v.value; + return (k(s, l)); + } + })); +}; + + + +var if_string = function (w, k) { + return ( + if_value(w, function (s, v) { + switch (v.tag) { + case "Coq_value_prim": + var p = v.value; + switch (p.tag) { + case "Coq_prim_string": + var s0 = p.value; + return (k(s, s0)); + default: + return ( + function (s, m) { + Debug.impossible_with_heap_because(__LOC__, s, m); + return (Coq_result_impossible());}(s, + "[if_string] called on a non-string value.")); + } + + case "Coq_value_object": + var o = v.value; + return ( + function (s, m) { + Debug.impossible_with_heap_because(__LOC__, s, m); + return (Coq_result_impossible());}(s, + "[if_string] called on a non-string value.")); + } + })); +}; + + + +var if_number = function (w, k) { + return ( + if_value(w, function (s, v) { + switch (v.tag) { + case "Coq_value_prim": + var p = v.value; + switch (p.tag) { + case "Coq_prim_number": + var n = p.value; + return (k(s, n)); + default: + return ( + function (s, m) { + Debug.impossible_with_heap_because(__LOC__, s, m); + return (Coq_result_impossible());}(s, + "[if_number] called with non-number value.")); + } + + case "Coq_value_object": + var o = v.value; + return ( + function (s, m) { + Debug.impossible_with_heap_because(__LOC__, s, m); + return (Coq_result_impossible());}(s, + "[if_number] called with non-number value.")); + } + })); +}; + + + +var if_prim = function (w, k) { + return ( + if_value(w, function (s, v) { + switch (v.tag) { + case "Coq_value_prim": + var w0 = v.value; + return (k(s, w0)); + case "Coq_value_object": + var o = v.value; + return ( + function (s, m) { + Debug.impossible_with_heap_because(__LOC__, s, m); + return (Coq_result_impossible());}(s, + "[if_primitive] called on an object.")); + } + })); +}; + + + +var convert_option_attributes = function (o) { + return (map(function (a) { return (Coq_full_descriptor_some(a));}, o)); +}; + + + +var if_abort = function (o, k) { + switch (o.tag) { + case "Coq_out_div": + return (k({})); + case "Coq_out_ter": + var s0 = o.state, r = o.res; + if (restype_compare(r.res_type, Coq_restype_normal())) { + return ( + function (s, m) { + Debug.impossible_with_heap_because(__LOC__, s, m); + return (Coq_result_impossible());}(s0, + "[if_abort] received a normal result!")); + } else { + return (k({})); + } + } + +}; + + + +var if_spec = function (w, k) { + return ( + if_result_some(w, function (sp) { + switch (sp.tag) { + case "Coq_specret_val": + var s0 = sp.state, a = sp.res; + return (k(s0, a)); + case "Coq_specret_out": + var o = sp.out; + return (if_abort(o, function (x) { return (res_out(o));})); + } + })); +}; + +var if_run = function (w, k) { + return (if_spec(w, k)); +}; + +var ifx_prim = function (w, k) { + return (if_prim(w, k)); +}; + +var ifx_number = function (w, k) { + return (if_number(w, k)); +}; + +var ifx_string = function (w, k) { + return (if_string(w, k)); +}; + +var ifx_success_state = function (a, b, c) { + return (if_success_state(a, b, c)); +}; + +var ifx_some_or_default = function (v, d, f) { + return (if_some_or_default(v, d, f)); +}; + +var ifx_success_or_return = function (a, b, c) { + return (if_success_or_return(a, b, c)); +}; + +var ifx_empty_label = function (a, b, c) { + return (if_empty_label(a, b, c)); +}; + +var ifx_any_or_throw = function (a, b, c) { + return (if_any_or_throw(a, b, c)); +}; +}// end of with JsCommon +}// end of with JsSyntax +}// end of with JsSyntaxAux +}// end of with LibList +}// end of with LibOption +}// end of with Shared + +return { + Coq_result_some: Coq_result_some, + Coq_result_not_yet_implemented: Coq_result_not_yet_implemented, + Coq_result_impossible: Coq_result_impossible, + Coq_result_bottom: Coq_result_bottom, + res_out: res_out, + res_spec: res_spec, + res_ter: res_ter, + res_void: res_void, + out_from_retn: out_from_retn, + result_out: result_out, + get_arg: get_arg, + get_arg_first_and_rest: get_arg_first_and_rest, + destr_list: destr_list, + if_empty_label: if_empty_label, + if_some: if_some, + if_some_or_default: if_some_or_default, + if_result_some: if_result_some, + if_out_some: if_out_some, + throw_result: throw_result, + if_ter: if_ter, + if_success_state: if_success_state, + if_success: if_success, + if_void: if_void, + if_not_throw: if_not_throw, + if_any_or_throw: if_any_or_throw, + if_success_or_return: if_success_or_return, + if_break: if_break, + if_value: if_value, + if_bool: if_bool, + if_object: if_object, + if_string: if_string, + if_number: if_number, + if_prim: if_prim, + convert_option_attributes: convert_option_attributes, + if_abort: if_abort, + if_spec: if_spec, + if_run: if_run, + ifx_prim: ifx_prim, + ifx_number: ifx_number, + ifx_string: ifx_string, + ifx_success_state: ifx_success_state, + ifx_some_or_default: ifx_some_or_default, + ifx_success_or_return: ifx_success_or_return, + ifx_empty_label: ifx_empty_label, + ifx_any_or_throw: ifx_any_or_throw}; +})(); + +/* --------------------- JsInterpreter.log.js --------------------- */ + +var JsInterpreter = (function() { +with (Datatypes) { +with (JsCommon) { +with (JsCommonAux) { +with (JsInit) { +with (JsInterpreterMonads) { +with (JsPreliminary) { +with (JsSyntax) { +with (JsSyntaxAux) { +with (LibList) { +with (LibOption) { +with (LibProd) { +with (Shared) { + +var convert_number_to_bool = function (n) { + var ctx_1 = ctx_push(ctx_empty, [{key: "n", val: n}]); + log_event("JsInterpreter.js", 14, ctx_1, "enter"); + var _if_arg_1 = (function () { + log_event("JsInterpreter.js", 10, ctx_1, "call"); + var _return_6 = ((function () { + log_event("JsInterpreter.js", 2, ctx_1, "call"); + var _return_2 = JsNumber.isposzero(n); + log_event("JsInterpreter.js", 1, ctx_push(ctx_1, [{key: "#RETURN_VALUE#", val: _return_2}]), "return"); + return (_return_2); }()) || (function () { + log_event("JsInterpreter.js", 8, ctx_1, "call"); + var _return_5 = ((function () { + log_event("JsInterpreter.js", 4, ctx_1, "call"); + var _return_3 = JsNumber.isnegzero(n); + log_event("JsInterpreter.js", 3, ctx_push(ctx_1, [{key: "#RETURN_VALUE#", val: _return_3}]), "return"); + return (_return_3); }()) + || (function () { + log_event("JsInterpreter.js", 6, ctx_1, "call"); + var _return_4 = JsNumber.isnan(n); + log_event("JsInterpreter.js", 5, ctx_push(ctx_1, [{key: "#RETURN_VALUE#", val: _return_4}]), "return"); + return (_return_4); }())); + log_event("JsInterpreter.js", 7, ctx_push(ctx_1, [{key: "#RETURN_VALUE#", val: _return_5}]), "return"); + return (_return_5); }())); + log_event("JsInterpreter.js", 9, ctx_push(ctx_1, [{key: "#RETURN_VALUE#", val: _return_6}]), "return"); + return (_return_6); + }()) + ; + log_event("JsInterpreter.js", 13, ctx_1, "if"); + if (_if_arg_1) { + var _return_8 = false; + log_event("JsInterpreter.js", 12, ctx_push(ctx_1, [{key: "#RETURN_VALUE#", val: _return_8}]), "return"); + return (_return_8); + } else { + var _return_7 = true; + log_event("JsInterpreter.js", 11, ctx_push(ctx_1, [{key: "#RETURN_VALUE#", val: _return_7}]), "return"); + return (_return_7); + } +}; + + + +var convert_string_to_bool = function (s) { + var ctx_2 = ctx_push(ctx_empty, [{key: "s", val: s}]); + log_event("JsInterpreter.js", 20, ctx_2, "enter"); + var _if_arg_9 = (function () { + log_event("JsInterpreter.js", 16, ctx_2, "call"); + var _return_10 = string_eq(s, ""); + log_event("JsInterpreter.js", 15, ctx_push(ctx_2, [{key: "#RETURN_VALUE#", val: _return_10}]), "return"); + return (_return_10); + }()) + ; + log_event("JsInterpreter.js", 19, ctx_2, "if"); + if (_if_arg_9) { + var _return_12 = false; + log_event("JsInterpreter.js", 18, ctx_push(ctx_2, [{key: "#RETURN_VALUE#", val: _return_12}]), "return"); + return (_return_12); + } else { + var _return_11 = true; + log_event("JsInterpreter.js", 17, ctx_push(ctx_2, [{key: "#RETURN_VALUE#", val: _return_11}]), "return"); + return (_return_11); + } +}; + + + +var convert_prim_to_boolean = function (_foo_) { + var ctx_3 = ctx_push(ctx_empty, [{key: "_foo_", val: _foo_}]); + log_event("JsInterpreter.js", 36, ctx_3, "enter"); + log_event("JsInterpreter.js", 35, ctx_3, "switch"); + switch (_foo_.tag) { + case "Coq_prim_undef":log_event("JsInterpreter.js", 22, ctx_3, "case"); + + var _return_13 = false; + log_event("JsInterpreter.js", 21, ctx_push(ctx_3, [{key: "#RETURN_VALUE#", val: _return_13}]), "return"); + return (_return_13); + case "Coq_prim_null":log_event("JsInterpreter.js", 24, ctx_3, "case"); + + var _return_14 = false; + log_event("JsInterpreter.js", 23, ctx_push(ctx_3, [{key: "#RETURN_VALUE#", val: _return_14}]), "return"); + return (_return_14); + case "Coq_prim_bool": + var b = _foo_.value;var ctx_4 = ctx_push(ctx_3, [{key: "b", val: b}]); + log_event("JsInterpreter.js", 26, ctx_4, "case"); + + var _return_15 = b; + log_event("JsInterpreter.js", 25, ctx_push(ctx_4, [{key: "#RETURN_VALUE#", val: _return_15}]), "return"); + return (_return_15); + case "Coq_prim_number": + var n = _foo_.value;var ctx_5 = ctx_push(ctx_3, [{key: "n", val: n}]); + log_event("JsInterpreter.js", 30, ctx_5, "case"); + + var _return_17 = (function () { + log_event("JsInterpreter.js", 28, ctx_5, "call"); + var _return_16 = convert_number_to_bool(n); + log_event("JsInterpreter.js", 27, ctx_push(ctx_5, [{key: "#RETURN_VALUE#", val: _return_16}]), "return"); + return (_return_16); + }()) + ; + log_event("JsInterpreter.js", 29, ctx_push(ctx_5, [{key: "#RETURN_VALUE#", val: _return_17}]), "return"); + return (_return_17); + case "Coq_prim_string": + var s = _foo_.value;var ctx_6 = ctx_push(ctx_3, [{key: "s", val: s}]); + log_event("JsInterpreter.js", 34, ctx_6, "case"); + + var _return_19 = (function () { + log_event("JsInterpreter.js", 32, ctx_6, "call"); + var _return_18 = convert_string_to_bool(s); + log_event("JsInterpreter.js", 31, ctx_push(ctx_6, [{key: "#RETURN_VALUE#", val: _return_18}]), "return"); + return (_return_18); + }()) + ; + log_event("JsInterpreter.js", 33, ctx_push(ctx_6, [{key: "#RETURN_VALUE#", val: _return_19}]), "return"); + return (_return_19); + } + +}; + + + +var convert_value_to_boolean = function (_foo_) { + var ctx_7 = ctx_push(ctx_empty, [{key: "_foo_", val: _foo_}]); + log_event("JsInterpreter.js", 44, ctx_7, "enter"); + log_event("JsInterpreter.js", 43, ctx_7, "switch"); + switch (_foo_.tag) { + case "Coq_value_prim": + var p = _foo_.value;var ctx_8 = ctx_push(ctx_7, [{key: "p", val: p}]); + log_event("JsInterpreter.js", 40, ctx_8, "case"); + + var _return_21 = (function () { + log_event("JsInterpreter.js", 38, ctx_8, "call"); + var _return_20 = convert_prim_to_boolean(p); + log_event("JsInterpreter.js", 37, ctx_push(ctx_8, [{key: "#RETURN_VALUE#", val: _return_20}]), "return"); + return (_return_20); + }()) + ; + log_event("JsInterpreter.js", 39, ctx_push(ctx_8, [{key: "#RETURN_VALUE#", val: _return_21}]), "return"); + return (_return_21); + case "Coq_value_object": + var o = _foo_.value;var ctx_9 = ctx_push(ctx_7, [{key: "o", val: o}]); + log_event("JsInterpreter.js", 42, ctx_9, "case"); + + var _return_22 = true; + log_event("JsInterpreter.js", 41, ctx_push(ctx_9, [{key: "#RETURN_VALUE#", val: _return_22}]), "return"); + return (_return_22); + } + +}; + + + +var convert_prim_to_number = function (_foo_) { + var ctx_10 = ctx_push(ctx_empty, [{key: "_foo_", val: _foo_}]); + log_event("JsInterpreter.js", 60, ctx_10, "enter"); + log_event("JsInterpreter.js", 59, ctx_10, "switch"); + switch (_foo_.tag) { + case "Coq_prim_undef":log_event("JsInterpreter.js", 46, ctx_10, "case"); + + var _return_23 = JsNumber.nan; + log_event("JsInterpreter.js", 45, ctx_push(ctx_10, [{key: "#RETURN_VALUE#", val: _return_23}]), "return"); + return (_return_23); + case "Coq_prim_null":log_event("JsInterpreter.js", 48, ctx_10, "case"); + + var _return_24 = JsNumber.zero; + log_event("JsInterpreter.js", 47, ctx_push(ctx_10, [{key: "#RETURN_VALUE#", val: _return_24}]), "return"); + return (_return_24); + case "Coq_prim_bool": + var b = _foo_.value;var ctx_11 = ctx_push(ctx_10, [{key: "b", val: b}]); + log_event("JsInterpreter.js", 52, ctx_11, "case"); + + log_event("JsInterpreter.js", 51, ctx_11, "if"); + if (b) { + var _return_26 = JsNumber.one; + log_event("JsInterpreter.js", 50, ctx_push(ctx_11, [{key: "#RETURN_VALUE#", val: _return_26}]), "return"); + return (_return_26); + } else { + var _return_25 = JsNumber.zero; + log_event("JsInterpreter.js", 49, ctx_push(ctx_11, [{key: "#RETURN_VALUE#", val: _return_25}]), "return"); + return (_return_25); + } + case "Coq_prim_number": + var n = _foo_.value;var ctx_12 = ctx_push(ctx_10, [{key: "n", val: n}]); + log_event("JsInterpreter.js", 54, ctx_12, "case"); + + var _return_27 = n; + log_event("JsInterpreter.js", 53, ctx_push(ctx_12, [{key: "#RETURN_VALUE#", val: _return_27}]), "return"); + return (_return_27); + case "Coq_prim_string": + var s = _foo_.value;var ctx_13 = ctx_push(ctx_10, [{key: "s", val: s}]); + log_event("JsInterpreter.js", 58, ctx_13, "case"); + + var _return_29 = (function () { + log_event("JsInterpreter.js", 56, ctx_13, "call"); + var _return_28 = JsNumber.from_string(s); + log_event("JsInterpreter.js", 55, ctx_push(ctx_13, [{key: "#RETURN_VALUE#", val: _return_28}]), "return"); + return (_return_28); + }()) + ; + log_event("JsInterpreter.js", 57, ctx_push(ctx_13, [{key: "#RETURN_VALUE#", val: _return_29}]), "return"); + return (_return_29); + } + +}; + + + +var convert_number_to_integer = function (n) { + var ctx_14 = ctx_push(ctx_empty, [{key: "n", val: n}]); + log_event("JsInterpreter.js", 90, ctx_14, "enter"); + var _if_arg_30 = (function () { + log_event("JsInterpreter.js", 62, ctx_14, "call"); + var _return_31 = JsNumber.isnan(n); + log_event("JsInterpreter.js", 61, ctx_push(ctx_14, [{key: "#RETURN_VALUE#", val: _return_31}]), "return"); + return (_return_31); + }()) + ; + log_event("JsInterpreter.js", 89, ctx_14, "if"); + if (_if_arg_30) { + var _return_46 = JsNumber.zero; + log_event("JsInterpreter.js", 88, ctx_push(ctx_14, [{key: "#RETURN_VALUE#", val: _return_46}]), "return"); + return (_return_46); + } else { + var _if_arg_32 = (function () { + log_event("JsInterpreter.js", 76, ctx_14, "call"); + var _return_39 = ((function () { + log_event("JsInterpreter.js", 64, ctx_14, "call"); + var _return_33 = JsNumber.isposzero(n); + log_event("JsInterpreter.js", 63, ctx_push(ctx_14, [{key: "#RETURN_VALUE#", val: _return_33}]), "return"); + return (_return_33); }()) || (function () { + log_event("JsInterpreter.js", 74, ctx_14, "call"); + var _return_38 = ((function () { + log_event("JsInterpreter.js", 66, ctx_14, "call"); + var _return_34 = JsNumber.isnegzero( + n); + log_event("JsInterpreter.js", 65, ctx_push(ctx_14, [{key: "#RETURN_VALUE#", val: _return_34}]), "return"); + return (_return_34); }()) + || (function () { + log_event("JsInterpreter.js", 72, ctx_14, "call"); + var _return_37 = ((function () { + log_event("JsInterpreter.js", 68, ctx_14, "call"); + var _return_35 = + (n + === JsNumber.infinity); + log_event("JsInterpreter.js", 67, ctx_push(ctx_14, [{key: "#RETURN_VALUE#", val: _return_35}]), "return"); + return (_return_35); + }()) + || (function () { + log_event("JsInterpreter.js", 70, ctx_14, "call"); + var _return_36 = + (n + === JsNumber.neg_infinity); + log_event("JsInterpreter.js", 69, ctx_push(ctx_14, [{key: "#RETURN_VALUE#", val: _return_36}]), "return"); + return (_return_36); + }())); + log_event("JsInterpreter.js", 71, ctx_push(ctx_14, [{key: "#RETURN_VALUE#", val: _return_37}]), "return"); + return (_return_37); }())); + log_event("JsInterpreter.js", 73, ctx_push(ctx_14, [{key: "#RETURN_VALUE#", val: _return_38}]), "return"); + return (_return_38); }())); + log_event("JsInterpreter.js", 75, ctx_push(ctx_14, [{key: "#RETURN_VALUE#", val: _return_39}]), "return"); + return (_return_39); + }()) + ; + log_event("JsInterpreter.js", 87, ctx_14, "if"); + if (_if_arg_32) { + var _return_45 = n; + log_event("JsInterpreter.js", 86, ctx_push(ctx_14, [{key: "#RETURN_VALUE#", val: _return_45}]), "return"); + return (_return_45); + } else { + var _return_44 = (function () { + log_event("JsInterpreter.js", 84, ctx_14, "call"); + var _return_43 = ((function () { + log_event("JsInterpreter.js", 78, ctx_14, "call"); + var _return_40 = JsNumber.sign(n); + log_event("JsInterpreter.js", 77, ctx_push(ctx_14, [{key: "#RETURN_VALUE#", val: _return_40}]), "return"); + return (_return_40); }()) * (function () { + log_event("JsInterpreter.js", 82, ctx_14, "call"); + var _return_42 = JsNumber.floor((function () { + log_event("JsInterpreter.js", 80, ctx_14, "call"); + var _return_41 = JsNumber.absolute( + n); + log_event("JsInterpreter.js", 79, ctx_push(ctx_14, [{key: "#RETURN_VALUE#", val: _return_41}]), "return"); + return (_return_41); }())); + log_event("JsInterpreter.js", 81, ctx_push(ctx_14, [{key: "#RETURN_VALUE#", val: _return_42}]), "return"); + return (_return_42); }())); + log_event("JsInterpreter.js", 83, ctx_push(ctx_14, [{key: "#RETURN_VALUE#", val: _return_43}]), "return"); + return (_return_43); + }()) + ; + log_event("JsInterpreter.js", 85, ctx_push(ctx_14, [{key: "#RETURN_VALUE#", val: _return_44}]), "return"); + return (_return_44); + } + } +}; + + + +var convert_bool_to_string = function (_foo_) { + var ctx_15 = ctx_push(ctx_empty, [{key: "_foo_", val: _foo_}]); + log_event("JsInterpreter.js", 96, ctx_15, "enter"); + log_event("JsInterpreter.js", 95, ctx_15, "switch"); + switch (_foo_) { + case true:log_event("JsInterpreter.js", 92, ctx_15, "case"); + + var _return_47 = "true"; + log_event("JsInterpreter.js", 91, ctx_push(ctx_15, [{key: "#RETURN_VALUE#", val: _return_47}]), "return"); + return (_return_47); + case false:log_event("JsInterpreter.js", 94, ctx_15, "case"); + + var _return_48 = "false"; + log_event("JsInterpreter.js", 93, ctx_push(ctx_15, [{key: "#RETURN_VALUE#", val: _return_48}]), "return"); + return (_return_48); + } + +}; + + + +var convert_prim_to_string = function (_foo_) { + var ctx_16 = ctx_push(ctx_empty, [{key: "_foo_", val: _foo_}]); + log_event("JsInterpreter.js", 112, ctx_16, "enter"); + log_event("JsInterpreter.js", 111, ctx_16, "switch"); + switch (_foo_.tag) { + case "Coq_prim_undef":log_event("JsInterpreter.js", 98, ctx_16, "case"); + + var _return_49 = "undefined"; + log_event("JsInterpreter.js", 97, ctx_push(ctx_16, [{key: "#RETURN_VALUE#", val: _return_49}]), "return"); + return (_return_49); + case "Coq_prim_null":log_event("JsInterpreter.js", 100, ctx_16, "case"); + + var _return_50 = "null"; + log_event("JsInterpreter.js", 99, ctx_push(ctx_16, [{key: "#RETURN_VALUE#", val: _return_50}]), "return"); + return (_return_50); + case "Coq_prim_bool": + var b = _foo_.value;var ctx_17 = ctx_push(ctx_16, [{key: "b", val: b}]); + log_event("JsInterpreter.js", 104, ctx_17, "case"); + + var _return_52 = (function () { + log_event("JsInterpreter.js", 102, ctx_17, "call"); + var _return_51 = convert_bool_to_string(b); + log_event("JsInterpreter.js", 101, ctx_push(ctx_17, [{key: "#RETURN_VALUE#", val: _return_51}]), "return"); + return (_return_51); + }()) + ; + log_event("JsInterpreter.js", 103, ctx_push(ctx_17, [{key: "#RETURN_VALUE#", val: _return_52}]), "return"); + return (_return_52); + case "Coq_prim_number": + var n = _foo_.value;var ctx_18 = ctx_push(ctx_16, [{key: "n", val: n}]); + log_event("JsInterpreter.js", 108, ctx_18, "case"); + + var _return_54 = (function () { + log_event("JsInterpreter.js", 106, ctx_18, "call"); + var _return_53 = JsNumber.to_string(n); + log_event("JsInterpreter.js", 105, ctx_push(ctx_18, [{key: "#RETURN_VALUE#", val: _return_53}]), "return"); + return (_return_53); + }()) + ; + log_event("JsInterpreter.js", 107, ctx_push(ctx_18, [{key: "#RETURN_VALUE#", val: _return_54}]), "return"); + return (_return_54); + case "Coq_prim_string": + var s = _foo_.value;var ctx_19 = ctx_push(ctx_16, [{key: "s", val: s}]); + log_event("JsInterpreter.js", 110, ctx_19, "case"); + + var _return_55 = s; + log_event("JsInterpreter.js", 109, ctx_push(ctx_19, [{key: "#RETURN_VALUE#", val: _return_55}]), "return"); + return (_return_55); + } + +}; + + + +var equality_test_for_same_type = function (ty, v1, v2) { + var ctx_20 = ctx_push(ctx_empty, [{key: "ty", val: ty}, {key: "v1", val: v1}, {key: "v2", val: v2}]); + log_event("JsInterpreter.js", 180, ctx_20, "enter"); + log_event("JsInterpreter.js", 179, ctx_20, "switch"); + switch (ty.tag) { + case "Coq_type_undef":log_event("JsInterpreter.js", 114, ctx_20, "case"); + + var _return_56 = true; + log_event("JsInterpreter.js", 113, ctx_push(ctx_20, [{key: "#RETURN_VALUE#", val: _return_56}]), "return"); + return (_return_56); + case "Coq_type_null":log_event("JsInterpreter.js", 116, ctx_20, "case"); + + var _return_57 = true; + log_event("JsInterpreter.js", 115, ctx_push(ctx_20, [{key: "#RETURN_VALUE#", val: _return_57}]), "return"); + return (_return_57); + case "Coq_type_bool":log_event("JsInterpreter.js", 118, ctx_20, "case"); + + var _return_58 = value_compare(v1, v2); + log_event("JsInterpreter.js", 117, ctx_push(ctx_20, [{key: "#RETURN_VALUE#", val: _return_58}]), "return"); + return (_return_58); + case "Coq_type_number":log_event("JsInterpreter.js", 174, ctx_20, "case"); + + log_event("JsInterpreter.js", 173, ctx_20, "switch"); + switch (v1.tag) { + case "Coq_value_prim": + var p = v1.value;var ctx_21 = ctx_push(ctx_20, [{key: "p", val: p}]); + log_event("JsInterpreter.js", 170, ctx_21, "case"); + + log_event("JsInterpreter.js", 169, ctx_21, "switch"); + switch (p.tag) { + case "Coq_prim_undef":log_event("JsInterpreter.js", 120, ctx_21, "case"); + + var _return_59 = false; + log_event("JsInterpreter.js", 119, ctx_push(ctx_21, [{key: "#RETURN_VALUE#", val: _return_59}]), "return"); + return (_return_59); + case "Coq_prim_null":log_event("JsInterpreter.js", 122, ctx_21, "case"); + + var _return_60 = false; + log_event("JsInterpreter.js", 121, ctx_push(ctx_21, [{key: "#RETURN_VALUE#", val: _return_60}]), "return"); + return (_return_60); + case "Coq_prim_bool": + var b = p.value;var ctx_22 = ctx_push(ctx_21, [{key: "b", val: b}]); + log_event("JsInterpreter.js", 124, ctx_22, "case"); + + var _return_61 = false; + log_event("JsInterpreter.js", 123, ctx_push(ctx_22, [{key: "#RETURN_VALUE#", val: _return_61}]), "return"); + return (_return_61); + case "Coq_prim_number": + var n1 = p.value;var ctx_23 = ctx_push(ctx_21, [{key: "n1", val: n1}]); + log_event("JsInterpreter.js", 166, ctx_23, "case"); + + log_event("JsInterpreter.js", 165, ctx_23, "switch"); + switch (v2.tag) { + case "Coq_value_prim": + var p0 = v2.value;var ctx_24 = ctx_push(ctx_23, [{key: "p0", val: p0}]); + log_event("JsInterpreter.js", 162, ctx_24, "case"); + + log_event("JsInterpreter.js", 161, ctx_24, "switch"); + switch (p0.tag) { + case "Coq_prim_undef":log_event("JsInterpreter.js", 126, ctx_24, "case"); + + var _return_62 = false; + log_event("JsInterpreter.js", 125, ctx_push(ctx_24, [{key: "#RETURN_VALUE#", val: _return_62}]), "return"); + return (_return_62); + case "Coq_prim_null":log_event("JsInterpreter.js", 128, ctx_24, "case"); + + var _return_63 = false; + log_event("JsInterpreter.js", 127, ctx_push(ctx_24, [{key: "#RETURN_VALUE#", val: _return_63}]), "return"); + return (_return_63); + case "Coq_prim_bool": + var b = p0.value;var ctx_25 = ctx_push(ctx_24, [{key: "b", val: b}]); + log_event("JsInterpreter.js", 130, ctx_25, "case"); + + var _return_64 = false; + log_event("JsInterpreter.js", 129, ctx_push(ctx_25, [{key: "#RETURN_VALUE#", val: _return_64}]), "return"); + return (_return_64); + case "Coq_prim_number": + var n2 = p0.value;var ctx_26 = ctx_push(ctx_24, [{key: "n2", val: n2}]); + log_event("JsInterpreter.js", 158, ctx_26, "case"); + + var _if_arg_65 = (function () { + log_event("JsInterpreter.js", 132, ctx_26, "call"); + var _return_66 = JsNumber.isnan(n1); + log_event("JsInterpreter.js", 131, ctx_push(ctx_26, [{key: "#RETURN_VALUE#", val: _return_66}]), "return"); + return (_return_66); + }()) + ; + log_event("JsInterpreter.js", 157, ctx_26, "if"); + if (_if_arg_65) { + var _return_82 = false; + log_event("JsInterpreter.js", 156, ctx_push(ctx_26, [{key: "#RETURN_VALUE#", val: _return_82}]), "return"); + return (_return_82); + } else { + var _if_arg_67 = (function () { + log_event("JsInterpreter.js", 134, ctx_26, "call"); + var _return_68 = JsNumber.isnan(n2); + log_event("JsInterpreter.js", 133, ctx_push(ctx_26, [{key: "#RETURN_VALUE#", val: _return_68}]), "return"); + return (_return_68); + }()) + ; + log_event("JsInterpreter.js", 155, ctx_26, "if"); + if (_if_arg_67) { + var _return_81 = false; + log_event("JsInterpreter.js", 154, ctx_push(ctx_26, [{key: "#RETURN_VALUE#", val: _return_81}]), "return"); + return (_return_81); + } else { + var _if_arg_69 = (function () { + log_event("JsInterpreter.js", 140, ctx_26, "call"); + var _return_72 = ((function () { + log_event("JsInterpreter.js", 136, ctx_26, "call"); + var _return_70 = JsNumber.isposzero( + n1); + log_event("JsInterpreter.js", 135, ctx_push(ctx_26, [{key: "#RETURN_VALUE#", val: _return_70}]), "return"); + return (_return_70); }()) + && (function () { + log_event("JsInterpreter.js", 138, ctx_26, "call"); + var _return_71 = JsNumber.isnegzero( + n2); + log_event("JsInterpreter.js", 137, ctx_push(ctx_26, [{key: "#RETURN_VALUE#", val: _return_71}]), "return"); + return (_return_71); }())); + log_event("JsInterpreter.js", 139, ctx_push(ctx_26, [{key: "#RETURN_VALUE#", val: _return_72}]), "return"); + return (_return_72); + }()) + ; + log_event("JsInterpreter.js", 153, ctx_26, "if"); + if (_if_arg_69) { + var _return_80 = true; + log_event("JsInterpreter.js", 152, ctx_push(ctx_26, [{key: "#RETURN_VALUE#", val: _return_80}]), "return"); + return (_return_80); + } else { + var _if_arg_73 = (function () { + log_event("JsInterpreter.js", 146, ctx_26, "call"); + var _return_76 = ((function () { + log_event("JsInterpreter.js", 142, ctx_26, "call"); + var _return_74 = JsNumber.isnegzero( + n1); + log_event("JsInterpreter.js", 141, ctx_push(ctx_26, [{key: "#RETURN_VALUE#", val: _return_74}]), "return"); + return (_return_74); }()) + && (function () { + log_event("JsInterpreter.js", 144, ctx_26, "call"); + var _return_75 = JsNumber.isposzero( + n2); + log_event("JsInterpreter.js", 143, ctx_push(ctx_26, [{key: "#RETURN_VALUE#", val: _return_75}]), "return"); + return (_return_75); }())); + log_event("JsInterpreter.js", 145, ctx_push(ctx_26, [{key: "#RETURN_VALUE#", val: _return_76}]), "return"); + return (_return_76); + }()) + ; + log_event("JsInterpreter.js", 151, ctx_26, "if"); + if (_if_arg_73) { + var _return_79 = true; + log_event("JsInterpreter.js", 150, ctx_push(ctx_26, [{key: "#RETURN_VALUE#", val: _return_79}]), "return"); + return (_return_79); + } else { + var _return_78 = (function () { + log_event("JsInterpreter.js", 148, ctx_26, "call"); + var _return_77 = (n1 === n2); + log_event("JsInterpreter.js", 147, ctx_push(ctx_26, [{key: "#RETURN_VALUE#", val: _return_77}]), "return"); + return (_return_77); + }()) + ; + log_event("JsInterpreter.js", 149, ctx_push(ctx_26, [{key: "#RETURN_VALUE#", val: _return_78}]), "return"); + return (_return_78); + } + } + } + } + case "Coq_prim_string": + var s = p0.value;var ctx_27 = ctx_push(ctx_24, [{key: "s", val: s}]); + log_event("JsInterpreter.js", 160, ctx_27, "case"); + + var _return_83 = false; + log_event("JsInterpreter.js", 159, ctx_push(ctx_27, [{key: "#RETURN_VALUE#", val: _return_83}]), "return"); + return (_return_83); + } + + case "Coq_value_object": + var o = v2.value;var ctx_28 = ctx_push(ctx_23, [{key: "o", val: o}]); + log_event("JsInterpreter.js", 164, ctx_28, "case"); + + var _return_84 = false; + log_event("JsInterpreter.js", 163, ctx_push(ctx_28, [{key: "#RETURN_VALUE#", val: _return_84}]), "return"); + return (_return_84); + } + + case "Coq_prim_string": + var s = p.value;var ctx_29 = ctx_push(ctx_21, [{key: "s", val: s}]); + log_event("JsInterpreter.js", 168, ctx_29, "case"); + + var _return_85 = false; + log_event("JsInterpreter.js", 167, ctx_push(ctx_29, [{key: "#RETURN_VALUE#", val: _return_85}]), "return"); + return (_return_85); + } + + case "Coq_value_object": + var o = v1.value;var ctx_30 = ctx_push(ctx_20, [{key: "o", val: o}]); + log_event("JsInterpreter.js", 172, ctx_30, "case"); + + var _return_86 = false; + log_event("JsInterpreter.js", 171, ctx_push(ctx_30, [{key: "#RETURN_VALUE#", val: _return_86}]), "return"); + return (_return_86); + } + + case "Coq_type_string":log_event("JsInterpreter.js", 176, ctx_20, "case"); + + var _return_87 = value_compare(v1, v2); + log_event("JsInterpreter.js", 175, ctx_push(ctx_20, [{key: "#RETURN_VALUE#", val: _return_87}]), "return"); + return (_return_87); + case "Coq_type_object":log_event("JsInterpreter.js", 178, ctx_20, "case"); + + var _return_88 = value_compare(v1, v2); + log_event("JsInterpreter.js", 177, ctx_push(ctx_20, [{key: "#RETURN_VALUE#", val: _return_88}]), "return"); + return (_return_88); + } + +}; + + + +var strict_equality_test = function (v1, v2) { + var ctx_31 = ctx_push(ctx_empty, [{key: "v1", val: v1}, {key: "v2", val: v2}]); + log_event("JsInterpreter.js", 192, ctx_31, "enter"); + var ty1 = (function () { + log_event("JsInterpreter.js", 182, ctx_31, "call"); + var _return_89 = type_of(v1); + log_event("JsInterpreter.js", 181, ctx_push(ctx_31, [{key: "#RETURN_VALUE#", val: _return_89}]), "return"); + return (_return_89); + }()) + ; + var ctx_32 = ctx_push(ctx_31, [{key: "ty1", val: ty1}]); + log_event("JsInterpreter.js", 191, ctx_32, "let"); + var ty2 = (function () { + log_event("JsInterpreter.js", 184, ctx_32, "call"); + var _return_90 = type_of(v2); + log_event("JsInterpreter.js", 183, ctx_push(ctx_32, [{key: "#RETURN_VALUE#", val: _return_90}]), "return"); + return (_return_90); + }()) + ; + var ctx_33 = ctx_push(ctx_32, [{key: "ty2", val: ty2}]); + log_event("JsInterpreter.js", 190, ctx_33, "let"); + var _if_arg_91 = type_compare(ty1, ty2); + log_event("JsInterpreter.js", 189, ctx_33, "if"); + if (_if_arg_91) { + var _return_94 = (function () { + log_event("JsInterpreter.js", 187, ctx_33, "call"); + var _return_93 = equality_test_for_same_type(ty1, v1, v2); + log_event("JsInterpreter.js", 186, ctx_push(ctx_33, [{key: "#RETURN_VALUE#", val: _return_93}]), "return"); + return (_return_93); + }()) + ; + log_event("JsInterpreter.js", 188, ctx_push(ctx_33, [{key: "#RETURN_VALUE#", val: _return_94}]), "return"); + return (_return_94); + } else { + var _return_92 = false; + log_event("JsInterpreter.js", 185, ctx_push(ctx_33, [{key: "#RETURN_VALUE#", val: _return_92}]), "return"); + return (_return_92); + } + + +}; + + + +var inequality_test_number = function (n1, n2) { + var ctx_34 = ctx_push(ctx_empty, [{key: "n1", val: n1}, {key: "n2", val: n2}]); + log_event("JsInterpreter.js", 240, ctx_34, "enter"); + var _if_arg_95 = (function () { + log_event("JsInterpreter.js", 198, ctx_34, "call"); + var _return_98 = ((function () { + log_event("JsInterpreter.js", 194, ctx_34, "call"); + var _return_96 = JsNumber.isnan(n1); + log_event("JsInterpreter.js", 193, ctx_push(ctx_34, [{key: "#RETURN_VALUE#", val: _return_96}]), "return"); + return (_return_96); }()) || (function () { + log_event("JsInterpreter.js", 196, ctx_34, "call"); + var _return_97 = JsNumber.isnan(n2); + log_event("JsInterpreter.js", 195, ctx_push(ctx_34, [{key: "#RETURN_VALUE#", val: _return_97}]), "return"); + return (_return_97); }())); + log_event("JsInterpreter.js", 197, ctx_push(ctx_34, [{key: "#RETURN_VALUE#", val: _return_98}]), "return"); + return (_return_98); + }()) + ; + log_event("JsInterpreter.js", 239, ctx_34, "if"); + if (_if_arg_95) { + var _return_126 = Coq_prim_undef(); + log_event("JsInterpreter.js", 238, ctx_push(ctx_34, [{key: "#RETURN_VALUE#", val: _return_126}]), "return"); + return (_return_126); + } else { + var _if_arg_99 = (function () { + log_event("JsInterpreter.js", 200, ctx_34, "call"); + var _return_100 = (n1 === n2); + log_event("JsInterpreter.js", 199, ctx_push(ctx_34, [{key: "#RETURN_VALUE#", val: _return_100}]), "return"); + return (_return_100); + }()) + ; + log_event("JsInterpreter.js", 237, ctx_34, "if"); + if (_if_arg_99) { + var _return_125 = Coq_prim_bool(false); + log_event("JsInterpreter.js", 236, ctx_push(ctx_34, [{key: "#RETURN_VALUE#", val: _return_125}]), "return"); + return (_return_125); + } else { + var _if_arg_101 = (function () { + log_event("JsInterpreter.js", 206, ctx_34, "call"); + var _return_104 = ((function () { + log_event("JsInterpreter.js", 202, ctx_34, "call"); + var _return_102 = JsNumber.isposzero(n1); + log_event("JsInterpreter.js", 201, ctx_push(ctx_34, [{key: "#RETURN_VALUE#", val: _return_102}]), "return"); + return (_return_102); }()) && (function () { + log_event("JsInterpreter.js", 204, ctx_34, "call"); + var _return_103 = JsNumber.isnegzero(n2); + log_event("JsInterpreter.js", 203, ctx_push(ctx_34, [{key: "#RETURN_VALUE#", val: _return_103}]), "return"); + return (_return_103); }())); + log_event("JsInterpreter.js", 205, ctx_push(ctx_34, [{key: "#RETURN_VALUE#", val: _return_104}]), "return"); + return (_return_104); + }()) + ; + log_event("JsInterpreter.js", 235, ctx_34, "if"); + if (_if_arg_101) { + var _return_124 = Coq_prim_bool(false); + log_event("JsInterpreter.js", 234, ctx_push(ctx_34, [{key: "#RETURN_VALUE#", val: _return_124}]), "return"); + return (_return_124); + } else { + var _if_arg_105 = (function () { + log_event("JsInterpreter.js", 212, ctx_34, "call"); + var _return_108 = ((function () { + log_event("JsInterpreter.js", 208, ctx_34, "call"); + var _return_106 = JsNumber.isnegzero(n1); + log_event("JsInterpreter.js", 207, ctx_push(ctx_34, [{key: "#RETURN_VALUE#", val: _return_106}]), "return"); + return (_return_106); }()) && (function () { + log_event("JsInterpreter.js", 210, ctx_34, "call"); + var _return_107 = JsNumber.isposzero(n2); + log_event("JsInterpreter.js", 209, ctx_push(ctx_34, [{key: "#RETURN_VALUE#", val: _return_107}]), "return"); + return (_return_107); }())); + log_event("JsInterpreter.js", 211, ctx_push(ctx_34, [{key: "#RETURN_VALUE#", val: _return_108}]), "return"); + return (_return_108); + }()) + ; + log_event("JsInterpreter.js", 233, ctx_34, "if"); + if (_if_arg_105) { + var _return_123 = Coq_prim_bool(false); + log_event("JsInterpreter.js", 232, ctx_push(ctx_34, [{key: "#RETURN_VALUE#", val: _return_123}]), "return"); + return (_return_123); + } else { + var _if_arg_109 = (function () { + log_event("JsInterpreter.js", 214, ctx_34, "call"); + var _return_110 = (n1 === JsNumber.infinity); + log_event("JsInterpreter.js", 213, ctx_push(ctx_34, [{key: "#RETURN_VALUE#", val: _return_110}]), "return"); + return (_return_110); + }()) + ; + log_event("JsInterpreter.js", 231, ctx_34, "if"); + if (_if_arg_109) { + var _return_122 = Coq_prim_bool(false); + log_event("JsInterpreter.js", 230, ctx_push(ctx_34, [{key: "#RETURN_VALUE#", val: _return_122}]), "return"); + return (_return_122); + } else { + var _if_arg_111 = (function () { + log_event("JsInterpreter.js", 216, ctx_34, "call"); + var _return_112 = (n2 === JsNumber.infinity); + log_event("JsInterpreter.js", 215, ctx_push(ctx_34, [{key: "#RETURN_VALUE#", val: _return_112}]), "return"); + return (_return_112); + }()) + ; + log_event("JsInterpreter.js", 229, ctx_34, "if"); + if (_if_arg_111) { + var _return_121 = Coq_prim_bool(true); + log_event("JsInterpreter.js", 228, ctx_push(ctx_34, [{key: "#RETURN_VALUE#", val: _return_121}]), "return"); + return (_return_121); + } else { + var _if_arg_113 = (function () { + log_event("JsInterpreter.js", 218, ctx_34, "call"); + var _return_114 = (n2 === JsNumber.neg_infinity); + log_event("JsInterpreter.js", 217, ctx_push(ctx_34, [{key: "#RETURN_VALUE#", val: _return_114}]), "return"); + return (_return_114); + }()) + ; + log_event("JsInterpreter.js", 227, ctx_34, "if"); + if (_if_arg_113) { + var _return_120 = Coq_prim_bool(false); + log_event("JsInterpreter.js", 226, ctx_push(ctx_34, [{key: "#RETURN_VALUE#", val: _return_120}]), "return"); + return (_return_120); + } else { + var _if_arg_115 = (function () { + log_event("JsInterpreter.js", 220, ctx_34, "call"); + var _return_116 = (n1 === JsNumber.neg_infinity); + log_event("JsInterpreter.js", 219, ctx_push(ctx_34, [{key: "#RETURN_VALUE#", val: _return_116}]), "return"); + return (_return_116); + }()) + ; + log_event("JsInterpreter.js", 225, ctx_34, "if"); + if (_if_arg_115) { + var _return_119 = Coq_prim_bool(true); + log_event("JsInterpreter.js", 224, ctx_push(ctx_34, [{key: "#RETURN_VALUE#", val: _return_119}]), "return"); + return (_return_119); + } else { + var _return_118 = Coq_prim_bool((function () { + log_event("JsInterpreter.js", 222, ctx_34, "call"); + var _return_117 = (n1 < n2); + log_event("JsInterpreter.js", 221, ctx_push(ctx_34, [{key: "#RETURN_VALUE#", val: _return_117}]), "return"); + return (_return_117); }())); + log_event("JsInterpreter.js", 223, ctx_push(ctx_34, [{key: "#RETURN_VALUE#", val: _return_118}]), "return"); + return (_return_118); + } + } + } + } + } + } + } + } +}; + + + +var inequality_test_string = function (s1, s2) { + var ctx_35 = ctx_push(ctx_empty, [{key: "s1", val: s1}, {key: "s2", val: s2}]); + log_event("JsInterpreter.js", 244, ctx_35, "enter"); + var _return_128 = (function () { + log_event("JsInterpreter.js", 242, ctx_35, "call"); + var _return_127 = string_lt(s1, s2); + log_event("JsInterpreter.js", 241, ctx_push(ctx_35, [{key: "#RETURN_VALUE#", val: _return_127}]), "return"); + return (_return_127); + }()) + ; + log_event("JsInterpreter.js", 243, ctx_push(ctx_35, [{key: "#RETURN_VALUE#", val: _return_128}]), "return"); + return (_return_128); +}; + + + +var inequality_test_primitive = function (w1, w2) { + var ctx_36 = ctx_push(ctx_empty, [{key: "w1", val: w1}, {key: "w2", val: w2}]); + log_event("JsInterpreter.js", 316, ctx_36, "enter"); + log_event("JsInterpreter.js", 315, ctx_36, "switch"); + switch (w1.tag) { + case "Coq_prim_undef":log_event("JsInterpreter.js", 252, ctx_36, "case"); + + var _return_132 = (function () { + log_event("JsInterpreter.js", 250, ctx_36, "call"); + var _return_131 = inequality_test_number((function () { + log_event("JsInterpreter.js", 246, ctx_36, "call"); + var _return_129 = convert_prim_to_number(w1); + log_event("JsInterpreter.js", 245, ctx_push(ctx_36, [{key: "#RETURN_VALUE#", val: _return_129}]), "return"); + return (_return_129); }()), (function () { + log_event("JsInterpreter.js", 248, ctx_36, "call"); + var _return_130 = convert_prim_to_number(w2); + log_event("JsInterpreter.js", 247, ctx_push(ctx_36, [{key: "#RETURN_VALUE#", val: _return_130}]), "return"); + return (_return_130); }())); + log_event("JsInterpreter.js", 249, ctx_push(ctx_36, [{key: "#RETURN_VALUE#", val: _return_131}]), "return"); + return (_return_131); + }()) + ; + log_event("JsInterpreter.js", 251, ctx_push(ctx_36, [{key: "#RETURN_VALUE#", val: _return_132}]), "return"); + return (_return_132); + case "Coq_prim_null":log_event("JsInterpreter.js", 260, ctx_36, "case"); + + var _return_136 = (function () { + log_event("JsInterpreter.js", 258, ctx_36, "call"); + var _return_135 = inequality_test_number((function () { + log_event("JsInterpreter.js", 254, ctx_36, "call"); + var _return_133 = convert_prim_to_number(w1); + log_event("JsInterpreter.js", 253, ctx_push(ctx_36, [{key: "#RETURN_VALUE#", val: _return_133}]), "return"); + return (_return_133); }()), (function () { + log_event("JsInterpreter.js", 256, ctx_36, "call"); + var _return_134 = convert_prim_to_number(w2); + log_event("JsInterpreter.js", 255, ctx_push(ctx_36, [{key: "#RETURN_VALUE#", val: _return_134}]), "return"); + return (_return_134); }())); + log_event("JsInterpreter.js", 257, ctx_push(ctx_36, [{key: "#RETURN_VALUE#", val: _return_135}]), "return"); + return (_return_135); + }()) + ; + log_event("JsInterpreter.js", 259, ctx_push(ctx_36, [{key: "#RETURN_VALUE#", val: _return_136}]), "return"); + return (_return_136); + case "Coq_prim_bool": + var b = w1.value;var ctx_37 = ctx_push(ctx_36, [{key: "b", val: b}]); + log_event("JsInterpreter.js", 268, ctx_37, "case"); + + var _return_140 = (function () { + log_event("JsInterpreter.js", 266, ctx_37, "call"); + var _return_139 = inequality_test_number((function () { + log_event("JsInterpreter.js", 262, ctx_37, "call"); + var _return_137 = convert_prim_to_number(w1); + log_event("JsInterpreter.js", 261, ctx_push(ctx_37, [{key: "#RETURN_VALUE#", val: _return_137}]), "return"); + return (_return_137); }()), (function () { + log_event("JsInterpreter.js", 264, ctx_37, "call"); + var _return_138 = convert_prim_to_number(w2); + log_event("JsInterpreter.js", 263, ctx_push(ctx_37, [{key: "#RETURN_VALUE#", val: _return_138}]), "return"); + return (_return_138); }())); + log_event("JsInterpreter.js", 265, ctx_push(ctx_37, [{key: "#RETURN_VALUE#", val: _return_139}]), "return"); + return (_return_139); + }()) + ; + log_event("JsInterpreter.js", 267, ctx_push(ctx_37, [{key: "#RETURN_VALUE#", val: _return_140}]), "return"); + return (_return_140); + case "Coq_prim_number": + var n = w1.value;var ctx_38 = ctx_push(ctx_36, [{key: "n", val: n}]); + log_event("JsInterpreter.js", 276, ctx_38, "case"); + + var _return_144 = (function () { + log_event("JsInterpreter.js", 274, ctx_38, "call"); + var _return_143 = inequality_test_number((function () { + log_event("JsInterpreter.js", 270, ctx_38, "call"); + var _return_141 = convert_prim_to_number(w1); + log_event("JsInterpreter.js", 269, ctx_push(ctx_38, [{key: "#RETURN_VALUE#", val: _return_141}]), "return"); + return (_return_141); }()), (function () { + log_event("JsInterpreter.js", 272, ctx_38, "call"); + var _return_142 = convert_prim_to_number(w2); + log_event("JsInterpreter.js", 271, ctx_push(ctx_38, [{key: "#RETURN_VALUE#", val: _return_142}]), "return"); + return (_return_142); }())); + log_event("JsInterpreter.js", 273, ctx_push(ctx_38, [{key: "#RETURN_VALUE#", val: _return_143}]), "return"); + return (_return_143); + }()) + ; + log_event("JsInterpreter.js", 275, ctx_push(ctx_38, [{key: "#RETURN_VALUE#", val: _return_144}]), "return"); + return (_return_144); + case "Coq_prim_string": + var s1 = w1.value;var ctx_39 = ctx_push(ctx_36, [{key: "s1", val: s1}]); + log_event("JsInterpreter.js", 314, ctx_39, "case"); + + log_event("JsInterpreter.js", 313, ctx_39, "switch"); + switch (w2.tag) { + case "Coq_prim_undef":log_event("JsInterpreter.js", 284, ctx_39, "case"); + + var _return_148 = (function () { + log_event("JsInterpreter.js", 282, ctx_39, "call"); + var _return_147 = inequality_test_number((function () { + log_event("JsInterpreter.js", 278, ctx_39, "call"); + var _return_145 = convert_prim_to_number( + w1); + log_event("JsInterpreter.js", 277, ctx_push(ctx_39, [{key: "#RETURN_VALUE#", val: _return_145}]), "return"); + return (_return_145); }()), (function () { + log_event("JsInterpreter.js", 280, ctx_39, "call"); + var _return_146 = convert_prim_to_number( + w2); + log_event("JsInterpreter.js", 279, ctx_push(ctx_39, [{key: "#RETURN_VALUE#", val: _return_146}]), "return"); + return (_return_146); }())); + log_event("JsInterpreter.js", 281, ctx_push(ctx_39, [{key: "#RETURN_VALUE#", val: _return_147}]), "return"); + return (_return_147); + }()) + ; + log_event("JsInterpreter.js", 283, ctx_push(ctx_39, [{key: "#RETURN_VALUE#", val: _return_148}]), "return"); + return (_return_148); + case "Coq_prim_null":log_event("JsInterpreter.js", 292, ctx_39, "case"); + + var _return_152 = (function () { + log_event("JsInterpreter.js", 290, ctx_39, "call"); + var _return_151 = inequality_test_number((function () { + log_event("JsInterpreter.js", 286, ctx_39, "call"); + var _return_149 = convert_prim_to_number( + w1); + log_event("JsInterpreter.js", 285, ctx_push(ctx_39, [{key: "#RETURN_VALUE#", val: _return_149}]), "return"); + return (_return_149); }()), (function () { + log_event("JsInterpreter.js", 288, ctx_39, "call"); + var _return_150 = convert_prim_to_number( + w2); + log_event("JsInterpreter.js", 287, ctx_push(ctx_39, [{key: "#RETURN_VALUE#", val: _return_150}]), "return"); + return (_return_150); }())); + log_event("JsInterpreter.js", 289, ctx_push(ctx_39, [{key: "#RETURN_VALUE#", val: _return_151}]), "return"); + return (_return_151); + }()) + ; + log_event("JsInterpreter.js", 291, ctx_push(ctx_39, [{key: "#RETURN_VALUE#", val: _return_152}]), "return"); + return (_return_152); + case "Coq_prim_bool": + var b = w2.value;var ctx_40 = ctx_push(ctx_39, [{key: "b", val: b}]); + log_event("JsInterpreter.js", 300, ctx_40, "case"); + + var _return_156 = (function () { + log_event("JsInterpreter.js", 298, ctx_40, "call"); + var _return_155 = inequality_test_number((function () { + log_event("JsInterpreter.js", 294, ctx_40, "call"); + var _return_153 = convert_prim_to_number( + w1); + log_event("JsInterpreter.js", 293, ctx_push(ctx_40, [{key: "#RETURN_VALUE#", val: _return_153}]), "return"); + return (_return_153); }()), (function () { + log_event("JsInterpreter.js", 296, ctx_40, "call"); + var _return_154 = convert_prim_to_number( + w2); + log_event("JsInterpreter.js", 295, ctx_push(ctx_40, [{key: "#RETURN_VALUE#", val: _return_154}]), "return"); + return (_return_154); }())); + log_event("JsInterpreter.js", 297, ctx_push(ctx_40, [{key: "#RETURN_VALUE#", val: _return_155}]), "return"); + return (_return_155); + }()) + ; + log_event("JsInterpreter.js", 299, ctx_push(ctx_40, [{key: "#RETURN_VALUE#", val: _return_156}]), "return"); + return (_return_156); + case "Coq_prim_number": + var n = w2.value;var ctx_41 = ctx_push(ctx_39, [{key: "n", val: n}]); + log_event("JsInterpreter.js", 308, ctx_41, "case"); + + var _return_160 = (function () { + log_event("JsInterpreter.js", 306, ctx_41, "call"); + var _return_159 = inequality_test_number((function () { + log_event("JsInterpreter.js", 302, ctx_41, "call"); + var _return_157 = convert_prim_to_number( + w1); + log_event("JsInterpreter.js", 301, ctx_push(ctx_41, [{key: "#RETURN_VALUE#", val: _return_157}]), "return"); + return (_return_157); }()), (function () { + log_event("JsInterpreter.js", 304, ctx_41, "call"); + var _return_158 = convert_prim_to_number( + w2); + log_event("JsInterpreter.js", 303, ctx_push(ctx_41, [{key: "#RETURN_VALUE#", val: _return_158}]), "return"); + return (_return_158); }())); + log_event("JsInterpreter.js", 305, ctx_push(ctx_41, [{key: "#RETURN_VALUE#", val: _return_159}]), "return"); + return (_return_159); + }()) + ; + log_event("JsInterpreter.js", 307, ctx_push(ctx_41, [{key: "#RETURN_VALUE#", val: _return_160}]), "return"); + return (_return_160); + case "Coq_prim_string": + var s2 = w2.value;var ctx_42 = ctx_push(ctx_39, [{key: "s2", val: s2}]); + log_event("JsInterpreter.js", 312, ctx_42, "case"); + + var _return_162 = Coq_prim_bool((function () { + log_event("JsInterpreter.js", 310, ctx_42, "call"); + var _return_161 = inequality_test_string(s1, + s2); + log_event("JsInterpreter.js", 309, ctx_push(ctx_42, [{key: "#RETURN_VALUE#", val: _return_161}]), "return"); + return (_return_161); }())); + log_event("JsInterpreter.js", 311, ctx_push(ctx_42, [{key: "#RETURN_VALUE#", val: _return_162}]), "return"); + return (_return_162); + } + + } + +}; + + + +var typeof_prim = function (_foo_) { + var ctx_43 = ctx_push(ctx_empty, [{key: "_foo_", val: _foo_}]); + log_event("JsInterpreter.js", 328, ctx_43, "enter"); + log_event("JsInterpreter.js", 327, ctx_43, "switch"); + switch (_foo_.tag) { + case "Coq_prim_undef":log_event("JsInterpreter.js", 318, ctx_43, "case"); + + var _return_163 = "undefined"; + log_event("JsInterpreter.js", 317, ctx_push(ctx_43, [{key: "#RETURN_VALUE#", val: _return_163}]), "return"); + return (_return_163); + case "Coq_prim_null":log_event("JsInterpreter.js", 320, ctx_43, "case"); + + var _return_164 = "object"; + log_event("JsInterpreter.js", 319, ctx_push(ctx_43, [{key: "#RETURN_VALUE#", val: _return_164}]), "return"); + return (_return_164); + case "Coq_prim_bool": + var b = _foo_.value;var ctx_44 = ctx_push(ctx_43, [{key: "b", val: b}]); + log_event("JsInterpreter.js", 322, ctx_44, "case"); + + var _return_165 = "boolean"; + log_event("JsInterpreter.js", 321, ctx_push(ctx_44, [{key: "#RETURN_VALUE#", val: _return_165}]), "return"); + return (_return_165); + case "Coq_prim_number": + var n = _foo_.value;var ctx_45 = ctx_push(ctx_43, [{key: "n", val: n}]); + log_event("JsInterpreter.js", 324, ctx_45, "case"); + + var _return_166 = "number"; + log_event("JsInterpreter.js", 323, ctx_push(ctx_45, [{key: "#RETURN_VALUE#", val: _return_166}]), "return"); + return (_return_166); + case "Coq_prim_string": + var s = _foo_.value;var ctx_46 = ctx_push(ctx_43, [{key: "s", val: s}]); + log_event("JsInterpreter.js", 326, ctx_46, "case"); + + var _return_167 = "string"; + log_event("JsInterpreter.js", 325, ctx_push(ctx_46, [{key: "#RETURN_VALUE#", val: _return_167}]), "return"); + return (_return_167); + } + +}; + + + +var string_of_propname = function (_foo_) { + var ctx_47 = ctx_push(ctx_empty, [{key: "_foo_", val: _foo_}]); + log_event("JsInterpreter.js", 338, ctx_47, "enter"); + log_event("JsInterpreter.js", 337, ctx_47, "switch"); + switch (_foo_.tag) { + case "Coq_propname_identifier": + var s = _foo_.value;var ctx_48 = ctx_push(ctx_47, [{key: "s", val: s}]); + log_event("JsInterpreter.js", 330, ctx_48, "case"); + + var _return_168 = s; + log_event("JsInterpreter.js", 329, ctx_push(ctx_48, [{key: "#RETURN_VALUE#", val: _return_168}]), "return"); + return (_return_168); + case "Coq_propname_string": + var s = _foo_.value;var ctx_49 = ctx_push(ctx_47, [{key: "s", val: s}]); + log_event("JsInterpreter.js", 332, ctx_49, "case"); + + var _return_169 = s; + log_event("JsInterpreter.js", 331, ctx_push(ctx_49, [{key: "#RETURN_VALUE#", val: _return_169}]), "return"); + return (_return_169); + case "Coq_propname_number": + var n = _foo_.value;var ctx_50 = ctx_push(ctx_47, [{key: "n", val: n}]); + log_event("JsInterpreter.js", 336, ctx_50, "case"); + + var _return_171 = (function () { + log_event("JsInterpreter.js", 334, ctx_50, "call"); + var _return_170 = JsNumber.to_string(n); + log_event("JsInterpreter.js", 333, ctx_push(ctx_50, [{key: "#RETURN_VALUE#", val: _return_170}]), "return"); + return (_return_170); + }()) + ; + log_event("JsInterpreter.js", 335, ctx_push(ctx_50, [{key: "#RETURN_VALUE#", val: _return_171}]), "return"); + return (_return_171); + } + +}; + + + +var build_error = function (s, vproto, vmsg) { + var ctx_51 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "vproto", val: vproto}, {key: "vmsg", val: vmsg}]); + log_event("JsInterpreter.js", 354, ctx_51, "enter"); + var o = (function () { + log_event("JsInterpreter.js", 340, ctx_51, "call"); + var _return_172 = object_new(vproto, "Error"); + log_event("JsInterpreter.js", 339, ctx_push(ctx_51, [{key: "#RETURN_VALUE#", val: _return_172}]), "return"); + return (_return_172); + }()) + ; + var ctx_52 = ctx_push(ctx_51, [{key: "o", val: o}]); + log_event("JsInterpreter.js", 353, ctx_52, "let"); + var _tuple_arg_173 = (function () { + log_event("JsInterpreter.js", 342, ctx_52, "call"); + var _return_174 = object_alloc(s, o); + log_event("JsInterpreter.js", 341, ctx_push(ctx_52, [{key: "#RETURN_VALUE#", val: _return_174}]), "return"); + return (_return_174); + }()) + ; + var l = _tuple_arg_173[0], s_2 = _tuple_arg_173[1]; + var ctx_53 = ctx_push(ctx_52, [{key: "l", val: l}, {key: "s_2", val: s_2}]); + log_event("JsInterpreter.js", 352, ctx_53, "let"); + var _if_arg_175 = value_compare(vmsg, Coq_value_prim(Coq_prim_undef())); + log_event("JsInterpreter.js", 351, ctx_53, "if"); + if (_if_arg_175) { + var _return_180 = result_out( + Coq_out_ter(s_2, res_val(Coq_value_object(l)))); + log_event("JsInterpreter.js", 350, ctx_push(ctx_53, [{key: "#RETURN_VALUE#", val: _return_180}]), "return"); + return (_return_180); + } else { + var _return_179 = (function () { + log_event("JsInterpreter.js", 348, ctx_53, "call"); + var _return_178 = function (s) { + var ctx_54 = ctx_push(ctx_53, [{key: "s", val: s}]); + log_event("JsInterpreter.js", 346, ctx_54, "enter"); + (function () { + log_event("JsInterpreter.js", 345, ctx_54, "call"); + var _return_177 = Debug.not_yet_implemented_because( + __LOC__, s); + log_event("JsInterpreter.js", 344, ctx_push(ctx_54, [{key: "#RETURN_VALUE#", val: _return_177}]), "return"); + return (_return_177); + }()) + ; + var _return_176 = Coq_result_not_yet_implemented( + ); + log_event("JsInterpreter.js", 343, ctx_push(ctx_54, [{key: "#RETURN_VALUE#", val: _return_176}]), "return"); + return (_return_176); }( + "Need [to_string] (this function shall be put in [runs_type].)"); + log_event("JsInterpreter.js", 347, ctx_push(ctx_53, [{key: "#RETURN_VALUE#", val: _return_178}]), "return"); + return (_return_178); + }()) + ; + log_event("JsInterpreter.js", 349, ctx_push(ctx_53, [{key: "#RETURN_VALUE#", val: _return_179}]), "return"); + return (_return_179); + } + + +}; + + + +var run_error = function (s, ne) { + var ctx_55 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "ne", val: ne}]); + log_event("JsInterpreter.js", 362, ctx_55, "enter"); + var _return_183 = if_object((function () { + log_event("JsInterpreter.js", 356, ctx_55, "call"); + var _return_181 = build_error(s, + Coq_value_object( + Coq_object_loc_prealloc( + Coq_prealloc_native_error_proto( + ne))), + Coq_value_prim(Coq_prim_undef())); + log_event("JsInterpreter.js", 355, ctx_push(ctx_55, [{key: "#RETURN_VALUE#", val: _return_181}]), "return"); + return (_return_181); }()), function(s_2, l) { + + var ctx_56 = ctx_push(ctx_55, [{key: "s_2", val: s_2}, {key: "l", val: l}]); + log_event("JsInterpreter.js", 360, ctx_56, "let"); + var _return_182 = Coq_result_some( + Coq_specret_out( + Coq_out_ter(s_2, + res_throw( + Coq_resvalue_value( + Coq_value_object(l)))))); + log_event("JsInterpreter.js", 357, ctx_push(ctx_56, [{key: "#RETURN_VALUE#", val: _return_182}]), "return"); + return (_return_182); + }); + log_event("JsInterpreter.js", 361, ctx_push(ctx_55, [{key: "#RETURN_VALUE#", val: _return_183}]), "return"); + return (_return_183); +}; + + + +var out_error_or_void = function (s, str, ne) { + var ctx_57 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "str", val: str}, {key: "ne", val: ne}]); + log_event("JsInterpreter.js", 368, ctx_57, "enter"); + log_event("JsInterpreter.js", 367, ctx_57, "if"); + if (str) { + var _return_186 = (function () { + log_event("JsInterpreter.js", 365, ctx_57, "call"); + var _return_185 = run_error(s, ne); + log_event("JsInterpreter.js", 364, ctx_push(ctx_57, [{key: "#RETURN_VALUE#", val: _return_185}]), "return"); + return (_return_185); + }()) + ; + log_event("JsInterpreter.js", 366, ctx_push(ctx_57, [{key: "#RETURN_VALUE#", val: _return_186}]), "return"); + return (_return_186); + } else { + var _return_184 = result_out(out_void(s)); + log_event("JsInterpreter.js", 363, ctx_push(ctx_57, [{key: "#RETURN_VALUE#", val: _return_184}]), "return"); + return (_return_184); + } +}; + + + +var out_error_or_cst = function (s, str, ne, v) { + var ctx_58 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "str", val: str}, {key: "ne", val: ne}, {key: "v", val: v}]); + log_event("JsInterpreter.js", 374, ctx_58, "enter"); + log_event("JsInterpreter.js", 373, ctx_58, "if"); + if (str) { + var _return_189 = (function () { + log_event("JsInterpreter.js", 371, ctx_58, "call"); + var _return_188 = run_error(s, ne); + log_event("JsInterpreter.js", 370, ctx_push(ctx_58, [{key: "#RETURN_VALUE#", val: _return_188}]), "return"); + return (_return_188); + }()) + ; + log_event("JsInterpreter.js", 372, ctx_push(ctx_58, [{key: "#RETURN_VALUE#", val: _return_189}]), "return"); + return (_return_189); + } else { + var _return_187 = result_out(Coq_out_ter(s, res_val(v))); + log_event("JsInterpreter.js", 369, ctx_push(ctx_58, [{key: "#RETURN_VALUE#", val: _return_187}]), "return"); + return (_return_187); + } +}; + + + +var run_object_method = function (proj, s, l) { + var ctx_59 = ctx_push(ctx_empty, [{key: "proj", val: proj}, {key: "s", val: s}, {key: "l", val: l}]); + log_event("JsInterpreter.js", 380, ctx_59, "enter"); + var _return_192 = (function () { + log_event("JsInterpreter.js", 378, ctx_59, "call"); + var _return_191 = LibOption.map(proj, (function () { + log_event("JsInterpreter.js", 376, ctx_59, "call"); + var _return_190 = object_binds_pickable_option(s, + l); + log_event("JsInterpreter.js", 375, ctx_push(ctx_59, [{key: "#RETURN_VALUE#", val: _return_190}]), "return"); + return (_return_190); }())); + log_event("JsInterpreter.js", 377, ctx_push(ctx_59, [{key: "#RETURN_VALUE#", val: _return_191}]), "return"); + return (_return_191); + }()) + ; + log_event("JsInterpreter.js", 379, ctx_push(ctx_59, [{key: "#RETURN_VALUE#", val: _return_192}]), "return"); + return (_return_192); +}; + + + +var run_object_heap_set_extensible = function (b, s, l) { + var ctx_60 = ctx_push(ctx_empty, [{key: "b", val: b}, {key: "s", val: s}, {key: "l", val: l}]); + log_event("JsInterpreter.js", 390, ctx_60, "enter"); + var _return_197 = (function () { + log_event("JsInterpreter.js", 388, ctx_60, "call"); + var _return_196 = LibOption.map(function (o) { + var ctx_61 = ctx_push(ctx_60, [{key: "o", val: o}]); + log_event("JsInterpreter.js", 384, ctx_61, "enter"); + var _return_194 = (function () { + log_event("JsInterpreter.js", 382, ctx_61, "call"); + var _return_193 = object_write(s, l, + object_set_extensible(o, b)); + log_event("JsInterpreter.js", 381, ctx_push(ctx_61, [{key: "#RETURN_VALUE#", val: _return_193}]), "return"); + return (_return_193); + }()) + ; + log_event("JsInterpreter.js", 383, ctx_push(ctx_61, [{key: "#RETURN_VALUE#", val: _return_194}]), "return"); + return (_return_194); }, (function () { + log_event("JsInterpreter.js", 386, ctx_60, "call"); + var _return_195 = object_binds_pickable_option(s, + l); + log_event("JsInterpreter.js", 385, ctx_push(ctx_60, [{key: "#RETURN_VALUE#", val: _return_195}]), "return"); + return (_return_195); }())); + log_event("JsInterpreter.js", 387, ctx_push(ctx_60, [{key: "#RETURN_VALUE#", val: _return_196}]), "return"); + return (_return_196); + }()) + ; + log_event("JsInterpreter.js", 389, ctx_push(ctx_60, [{key: "#RETURN_VALUE#", val: _return_197}]), "return"); + return (_return_197); +}; + + + +var object_has_prop = function (s, c, l, x) { + var ctx_62 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "l", val: l}, {key: "x", val: x}]); + log_event("JsInterpreter.js", 410, ctx_62, "enter"); + var _return_204 = if_some((function () { + log_event("JsInterpreter.js", 392, ctx_62, "call"); + var _return_198 = run_object_method(object_has_prop_, + s, l); + log_event("JsInterpreter.js", 391, ctx_push(ctx_62, [{key: "#RETURN_VALUE#", val: _return_198}]), "return"); + return (_return_198); }()), function(b) { + + var ctx_63 = ctx_push(ctx_62, [{key: "b", val: b}]); + log_event("JsInterpreter.js", 408, ctx_63, "let"); + log_event("JsInterpreter.js", 405, ctx_63, "switch"); + switch (b.tag) { + case "Coq_builtin_has_prop_default":log_event("JsInterpreter.js", 404, ctx_63, "case"); + + var _return_203 = if_run((function () { + log_event("JsInterpreter.js", 394, ctx_63, "call"); + var _return_199 = run_object_get_prop( + s, c, l, + x); + log_event("JsInterpreter.js", 393, ctx_push(ctx_63, [{key: "#RETURN_VALUE#", val: _return_199}]), "return"); + return (_return_199); }()), + function(s1, d) { + + var ctx_64 = ctx_push(ctx_63, [{key: "s1", val: s1}, {key: "d", val: d}]); + log_event("JsInterpreter.js", 402, ctx_64, "let"); + var _return_202 = res_ter( + s1, + res_val( + Coq_value_prim( + Coq_prim_bool( + (function () { + log_event("JsInterpreter.js", 398, ctx_64, "call"); + var _return_201 = + !( + (function () { + log_event("JsInterpreter.js", 396, ctx_64, "call"); + var _return_200 = + full_descriptor_compare( + d, + Coq_full_descriptor_undef( + )); + log_event("JsInterpreter.js", 395, ctx_push(ctx_64, [{key: "#RETURN_VALUE#", val: _return_200}]), "return"); + return (_return_200); + }())); + log_event("JsInterpreter.js", 397, ctx_push(ctx_64, [{key: "#RETURN_VALUE#", val: _return_201}]), "return"); + return (_return_201); + }()))))); + log_event("JsInterpreter.js", 399, ctx_push(ctx_64, [{key: "#RETURN_VALUE#", val: _return_202}]), "return"); + return (_return_202); + }); + log_event("JsInterpreter.js", 403, ctx_push(ctx_63, [{key: "#RETURN_VALUE#", val: _return_203}]), "return"); + return (_return_203); + } + + }); + log_event("JsInterpreter.js", 409, ctx_push(ctx_62, [{key: "#RETURN_VALUE#", val: _return_204}]), "return"); + return (_return_204); +}; + +var object_get_builtin = function (s, c, b, vthis, l, x) { + var ctx_65 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "b", val: b}, {key: "vthis", val: vthis}, {key: "l", val: l}, {key: "x", val: x}]); + log_event("JsInterpreter.js", 494, ctx_65, "enter"); + var def = function (s0, l0) { + var ctx_66 = ctx_push(ctx_65, [{key: "s0", val: s0}, {key: "l0", val: l0}]); + log_event("JsInterpreter.js", 442, ctx_66, "enter"); + var _return_216 = if_run((function () { + log_event("JsInterpreter.js", 412, ctx_66, "call"); + var _return_205 = run_object_get_prop(s0, c, l0, x); + log_event("JsInterpreter.js", 411, ctx_push(ctx_66, [{key: "#RETURN_VALUE#", val: _return_205}]), "return"); + return (_return_205); }()), function(s1, d) { + + var ctx_67 = ctx_push(ctx_66, [{key: "s1", val: s1}, {key: "d", val: d}]); + log_event("JsInterpreter.js", 440, ctx_67, "let"); + log_event("JsInterpreter.js", 437, ctx_67, "switch"); + switch (d.tag) { + case "Coq_full_descriptor_undef":log_event("JsInterpreter.js", 414, ctx_67, "case"); + + var _return_206 = res_ter(s1, + res_val( + Coq_value_prim( + Coq_prim_undef()))); + log_event("JsInterpreter.js", 413, ctx_push(ctx_67, [{key: "#RETURN_VALUE#", val: _return_206}]), "return"); + return (_return_206); + case "Coq_full_descriptor_some": + var a = d.value;var ctx_68 = ctx_push(ctx_67, [{key: "a", val: a}]); + log_event("JsInterpreter.js", 436, ctx_68, "case"); + + log_event("JsInterpreter.js", 435, ctx_68, "switch"); + switch (a.tag) { + case "Coq_attributes_data_of": + var ad = a.value;var ctx_69 = ctx_push(ctx_68, [{key: "ad", val: ad}]); + log_event("JsInterpreter.js", 416, ctx_69, "case"); + + var _return_207 = res_ter(s1, + res_val( + ad.attributes_data_value)); + log_event("JsInterpreter.js", 415, ctx_push(ctx_69, [{key: "#RETURN_VALUE#", val: _return_207}]), "return"); + return (_return_207); + case "Coq_attributes_accessor_of": + var aa = a.value;var ctx_70 = ctx_push(ctx_68, [{key: "aa", val: aa}]); + log_event("JsInterpreter.js", 434, ctx_70, "case"); + + var _switch_arg_208 = aa.attributes_accessor_get; + log_event("JsInterpreter.js", 433, ctx_70, "switch"); + switch (_switch_arg_208.tag) { + case "Coq_value_prim": + var p = _switch_arg_208.value;var ctx_71 = ctx_push(ctx_70, [{key: "p", val: p}]); + log_event("JsInterpreter.js", 428, ctx_71, "case"); + + log_event("JsInterpreter.js", 427, ctx_71, "switch"); + switch (p.tag) { + case "Coq_prim_undef":log_event("JsInterpreter.js", 418, ctx_71, "case"); + + var _return_209 = res_ter(s1, + res_val( + Coq_value_prim( + Coq_prim_undef( + )))); + log_event("JsInterpreter.js", 417, ctx_push(ctx_71, [{key: "#RETURN_VALUE#", val: _return_209}]), "return"); + return (_return_209); + case "Coq_prim_null":log_event("JsInterpreter.js", 420, ctx_71, "case"); + + var _return_210 = Coq_result_impossible( + ); + log_event("JsInterpreter.js", 419, ctx_push(ctx_71, [{key: "#RETURN_VALUE#", val: _return_210}]), "return"); + return (_return_210); + case "Coq_prim_bool": + var b0 = p.value;var ctx_72 = ctx_push(ctx_71, [{key: "b0", val: b0}]); + log_event("JsInterpreter.js", 422, ctx_72, "case"); + + var _return_211 = Coq_result_impossible( + ); + log_event("JsInterpreter.js", 421, ctx_push(ctx_72, [{key: "#RETURN_VALUE#", val: _return_211}]), "return"); + return (_return_211); + case "Coq_prim_number": + var n = p.value;var ctx_73 = ctx_push(ctx_71, [{key: "n", val: n}]); + log_event("JsInterpreter.js", 424, ctx_73, "case"); + + var _return_212 = Coq_result_impossible( + ); + log_event("JsInterpreter.js", 423, ctx_push(ctx_73, [{key: "#RETURN_VALUE#", val: _return_212}]), "return"); + return (_return_212); + case "Coq_prim_string": + var s2 = p.value;var ctx_74 = ctx_push(ctx_71, [{key: "s2", val: s2}]); + log_event("JsInterpreter.js", 426, ctx_74, "case"); + + var _return_213 = Coq_result_impossible( + ); + log_event("JsInterpreter.js", 425, ctx_push(ctx_74, [{key: "#RETURN_VALUE#", val: _return_213}]), "return"); + return (_return_213); + } + + case "Coq_value_object": + var lf = _switch_arg_208.value;var ctx_75 = ctx_push(ctx_70, [{key: "lf", val: lf}]); + log_event("JsInterpreter.js", 432, ctx_75, "case"); + + var _return_215 = (function () { + log_event("JsInterpreter.js", 430, ctx_75, "call"); + var _return_214 = run_call(s1, c, lf, + vthis, mk_nil()); + log_event("JsInterpreter.js", 429, ctx_push(ctx_75, [{key: "#RETURN_VALUE#", val: _return_214}]), "return"); + return (_return_214); + }()) + ; + log_event("JsInterpreter.js", 431, ctx_push(ctx_75, [{key: "#RETURN_VALUE#", val: _return_215}]), "return"); + return (_return_215); + } + + } + + } + + }); + log_event("JsInterpreter.js", 441, ctx_push(ctx_66, [{key: "#RETURN_VALUE#", val: _return_216}]), "return"); + return (_return_216); + }; + var ctx_76 = ctx_push(ctx_65, [{key: "def", val: def}]); + log_event("JsInterpreter.js", 493, ctx_76, "let"); + var function0 = function (s0) { + var ctx_77 = ctx_push(ctx_76, [{key: "s0", val: s0}]); + log_event("JsInterpreter.js", 456, ctx_77, "enter"); + var _return_223 = if_value((function () { + log_event("JsInterpreter.js", 444, ctx_77, "call"); + var _return_217 = def(s0, l); + log_event("JsInterpreter.js", 443, ctx_push(ctx_77, [{key: "#RETURN_VALUE#", val: _return_217}]), "return"); + return (_return_217); }()), function(s_2, v) { + + var ctx_78 = ctx_push(ctx_77, [{key: "s_2", val: s_2}, {key: "v", val: v}]); + log_event("JsInterpreter.js", 454, ctx_78, "let"); + var _if_arg_218 = (function () { + log_event("JsInterpreter.js", 446, ctx_78, "call"); + var _return_219 = spec_function_get_error_case_dec( + s_2, x, v); + log_event("JsInterpreter.js", 445, ctx_push(ctx_78, [{key: "#RETURN_VALUE#", val: _return_219}]), "return"); + return (_return_219); + }()) + ; + log_event("JsInterpreter.js", 451, ctx_78, "if"); + if (_if_arg_218) { + var _return_222 = (function () { + log_event("JsInterpreter.js", 449, ctx_78, "call"); + var _return_221 = run_error(s_2, + Coq_native_error_type()); + log_event("JsInterpreter.js", 448, ctx_push(ctx_78, [{key: "#RETURN_VALUE#", val: _return_221}]), "return"); + return (_return_221); + }()) + ; + log_event("JsInterpreter.js", 450, ctx_push(ctx_78, [{key: "#RETURN_VALUE#", val: _return_222}]), "return"); + return (_return_222); + } else { + var _return_220 = res_ter(s_2, res_val(v)); + log_event("JsInterpreter.js", 447, ctx_push(ctx_78, [{key: "#RETURN_VALUE#", val: _return_220}]), "return"); + return (_return_220); + } + }); + log_event("JsInterpreter.js", 455, ctx_push(ctx_77, [{key: "#RETURN_VALUE#", val: _return_223}]), "return"); + return (_return_223); + }; + var ctx_79 = ctx_push(ctx_76, [{key: "function0", val: function0}]); + log_event("JsInterpreter.js", 492, ctx_79, "let"); + log_event("JsInterpreter.js", 491, ctx_79, "switch"); + switch (b.tag) { + case "Coq_builtin_get_default":log_event("JsInterpreter.js", 460, ctx_79, "case"); + + var _return_225 = (function () { + log_event("JsInterpreter.js", 458, ctx_79, "call"); + var _return_224 = def(s, l); + log_event("JsInterpreter.js", 457, ctx_push(ctx_79, [{key: "#RETURN_VALUE#", val: _return_224}]), "return"); + return (_return_224); + }()) + ; + log_event("JsInterpreter.js", 459, ctx_push(ctx_79, [{key: "#RETURN_VALUE#", val: _return_225}]), "return"); + return (_return_225); + case "Coq_builtin_get_function":log_event("JsInterpreter.js", 464, ctx_79, "case"); + + var _return_227 = (function () { + log_event("JsInterpreter.js", 462, ctx_79, "call"); + var _return_226 = function0(s); + log_event("JsInterpreter.js", 461, ctx_push(ctx_79, [{key: "#RETURN_VALUE#", val: _return_226}]), "return"); + return (_return_226); + }()) + ; + log_event("JsInterpreter.js", 463, ctx_push(ctx_79, [{key: "#RETURN_VALUE#", val: _return_227}]), "return"); + return (_return_227); + case "Coq_builtin_get_args_obj":log_event("JsInterpreter.js", 490, ctx_79, "case"); + + var _return_236 = if_some((function () { + log_event("JsInterpreter.js", 466, ctx_79, "call"); + var _return_228 = run_object_method( + object_parameter_map_, s, l); + log_event("JsInterpreter.js", 465, ctx_push(ctx_79, [{key: "#RETURN_VALUE#", val: _return_228}]), "return"); + return (_return_228); }()), function(lmapo) { + + var ctx_80 = ctx_push(ctx_79, [{key: "lmapo", val: lmapo}]); + log_event("JsInterpreter.js", 488, ctx_80, "let"); + var _return_235 = if_some(lmapo, function(lmap) { + + var ctx_81 = ctx_push(ctx_80, [{key: "lmap", val: lmap}]); + log_event("JsInterpreter.js", 484, ctx_81, "let"); + var _return_234 = if_run( + (function () { + log_event("JsInterpreter.js", 468, ctx_81, "call"); + var _return_229 = + run_object_get_own_prop( + s, c, + lmap, x); + log_event("JsInterpreter.js", 467, ctx_push(ctx_81, [{key: "#RETURN_VALUE#", val: _return_229}]), "return"); + return (_return_229); + }()), + function(s0, + d) { + + var ctx_82 = ctx_push(ctx_81, [{key: "s0", val: s0}, {key: "d", val: d}]); + log_event("JsInterpreter.js", 480, ctx_82, "let"); + log_event("JsInterpreter.js", 477, ctx_82, "switch"); + switch (d.tag) { + case "Coq_full_descriptor_undef":log_event("JsInterpreter.js", 472, ctx_82, "case"); + + var _return_231 = (function () { + log_event("JsInterpreter.js", 470, ctx_82, "call"); + var _return_230 = + function0( + s0); + log_event("JsInterpreter.js", 469, ctx_push(ctx_82, [{key: "#RETURN_VALUE#", val: _return_230}]), "return"); + return (_return_230); + }()) + ; + log_event("JsInterpreter.js", 471, ctx_push(ctx_82, [{key: "#RETURN_VALUE#", val: _return_231}]), "return"); + return (_return_231); + case "Coq_full_descriptor_some": + var a = d.value;var ctx_83 = ctx_push(ctx_82, [{key: "a", val: a}]); + log_event("JsInterpreter.js", 476, ctx_83, "case"); + + var _return_233 = (function () { + log_event("JsInterpreter.js", 474, ctx_83, "call"); + var _return_232 = + run_object_get( + s0, c, + lmap, x); + log_event("JsInterpreter.js", 473, ctx_push(ctx_83, [{key: "#RETURN_VALUE#", val: _return_232}]), "return"); + return (_return_232); + }()) + ; + log_event("JsInterpreter.js", 475, ctx_push(ctx_83, [{key: "#RETURN_VALUE#", val: _return_233}]), "return"); + return (_return_233); + } + + }); + log_event("JsInterpreter.js", 481, ctx_push(ctx_81, [{key: "#RETURN_VALUE#", val: _return_234}]), "return"); + return (_return_234); + }); + log_event("JsInterpreter.js", 485, ctx_push(ctx_80, [{key: "#RETURN_VALUE#", val: _return_235}]), "return"); + return (_return_235); + }); + log_event("JsInterpreter.js", 489, ctx_push(ctx_79, [{key: "#RETURN_VALUE#", val: _return_236}]), "return"); + return (_return_236); + } + + + +}; + +var run_object_get = function (s, c, l, x) { + var ctx_84 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "l", val: l}, {key: "x", val: x}]); + log_event("JsInterpreter.js", 504, ctx_84, "enter"); + var _return_240 = if_some((function () { + log_event("JsInterpreter.js", 496, ctx_84, "call"); + var _return_237 = run_object_method(object_get_, s, + l); + log_event("JsInterpreter.js", 495, ctx_push(ctx_84, [{key: "#RETURN_VALUE#", val: _return_237}]), "return"); + return (_return_237); }()), function(b) { + + var ctx_85 = ctx_push(ctx_84, [{key: "b", val: b}]); + log_event("JsInterpreter.js", 502, ctx_85, "let"); + var _return_239 = (function () { + log_event("JsInterpreter.js", 498, ctx_85, "call"); + var _return_238 = object_get_builtin(s, c, b, + Coq_value_object(l), l, x); + log_event("JsInterpreter.js", 497, ctx_push(ctx_85, [{key: "#RETURN_VALUE#", val: _return_238}]), "return"); + return (_return_238); + }()) + ; + log_event("JsInterpreter.js", 499, ctx_push(ctx_85, [{key: "#RETURN_VALUE#", val: _return_239}]), "return"); + return (_return_239); + }); + log_event("JsInterpreter.js", 503, ctx_push(ctx_84, [{key: "#RETURN_VALUE#", val: _return_240}]), "return"); + return (_return_240); +}; + +var run_object_get_prop = function (s, c, l, x) { + var ctx_86 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "l", val: l}, {key: "x", val: x}]); + log_event("JsInterpreter.js", 546, ctx_86, "enter"); + var _return_256 = if_some((function () { + log_event("JsInterpreter.js", 506, ctx_86, "call"); + var _return_241 = run_object_method(object_get_prop_, + s, l); + log_event("JsInterpreter.js", 505, ctx_push(ctx_86, [{key: "#RETURN_VALUE#", val: _return_241}]), "return"); + return (_return_241); }()), function(b) { + + var ctx_87 = ctx_push(ctx_86, [{key: "b", val: b}]); + log_event("JsInterpreter.js", 544, ctx_87, "let"); + log_event("JsInterpreter.js", 541, ctx_87, "switch"); + switch (b.tag) { + case "Coq_builtin_get_prop_default":log_event("JsInterpreter.js", 540, ctx_87, "case"); + + var _return_255 = if_run((function () { + log_event("JsInterpreter.js", 508, ctx_87, "call"); + var _return_242 = run_object_get_own_prop( + s, c, l, + x); + log_event("JsInterpreter.js", 507, ctx_push(ctx_87, [{key: "#RETURN_VALUE#", val: _return_242}]), "return"); + return (_return_242); }()), + function(s1, d) { + + var ctx_88 = ctx_push(ctx_87, [{key: "s1", val: s1}, {key: "d", val: d}]); + log_event("JsInterpreter.js", 538, ctx_88, "let"); + var _if_arg_243 = (function () { + log_event("JsInterpreter.js", 510, ctx_88, "call"); + var _return_244 = + full_descriptor_compare( + d, + Coq_full_descriptor_undef( + )); + log_event("JsInterpreter.js", 509, ctx_push(ctx_88, [{key: "#RETURN_VALUE#", val: _return_244}]), "return"); + return (_return_244); + }()) + ; + log_event("JsInterpreter.js", 535, ctx_88, "if"); + if (_if_arg_243) { + var _return_254 = + if_some((function () { + log_event("JsInterpreter.js", 513, ctx_88, "call"); + var _return_246 = + run_object_method( + object_proto_, s1, + l); + log_event("JsInterpreter.js", 512, ctx_push(ctx_88, [{key: "#RETURN_VALUE#", val: _return_246}]), "return"); + return (_return_246); + }()), function(proto) { + + var ctx_89 = ctx_push(ctx_88, [{key: "proto", val: proto}]); + log_event("JsInterpreter.js", 533, ctx_89, "let"); + log_event("JsInterpreter.js", 530, ctx_89, "switch"); + switch (proto.tag) { + case "Coq_value_prim": + var p = proto.value;var ctx_90 = ctx_push(ctx_89, [{key: "p", val: p}]); + log_event("JsInterpreter.js", 525, ctx_90, "case"); + + log_event("JsInterpreter.js", 524, ctx_90, "switch"); + switch (p.tag) { + case "Coq_prim_null":log_event("JsInterpreter.js", 515, ctx_90, "case"); + + var _return_247 = + res_spec(s1, + Coq_full_descriptor_undef( + )); + log_event("JsInterpreter.js", 514, ctx_push(ctx_90, [{key: "#RETURN_VALUE#", val: _return_247}]), "return"); + return (_return_247); + default:log_event("JsInterpreter.js", 523, ctx_90, "case"); + + var _return_251 = (function () { + log_event("JsInterpreter.js", 521, ctx_90, "call"); + var _return_250 = + function (s, m) { + var ctx_91 = ctx_push(ctx_90, [{key: "s", val: s}, {key: "m", val: m}]); + log_event("JsInterpreter.js", 519, ctx_91, "enter"); + (function () { + log_event("JsInterpreter.js", 518, ctx_91, "call"); + var _return_249 = + Debug.impossible_with_heap_because( + __LOC__, + s, m); + log_event("JsInterpreter.js", 517, ctx_push(ctx_91, [{key: "#RETURN_VALUE#", val: _return_249}]), "return"); + return (_return_249); + }()) + ; + var _return_248 = + Coq_result_impossible( + ); + log_event("JsInterpreter.js", 516, ctx_push(ctx_91, [{key: "#RETURN_VALUE#", val: _return_248}]), "return"); + return (_return_248); + }(s1, + "Found a non-null primitive value as a prototype in [run_object_get_prop]."); + log_event("JsInterpreter.js", 520, ctx_push(ctx_90, [{key: "#RETURN_VALUE#", val: _return_250}]), "return"); + return (_return_250); + }()) + ; + log_event("JsInterpreter.js", 522, ctx_push(ctx_90, [{key: "#RETURN_VALUE#", val: _return_251}]), "return"); + return (_return_251); + } + + case "Coq_value_object": + var lproto = proto.value;var ctx_92 = ctx_push(ctx_89, [{key: "lproto", val: lproto}]); + log_event("JsInterpreter.js", 529, ctx_92, "case"); + + var _return_253 = (function () { + log_event("JsInterpreter.js", 527, ctx_92, "call"); + var _return_252 = + run_object_get_prop( + s1, c, + lproto, x); + log_event("JsInterpreter.js", 526, ctx_push(ctx_92, [{key: "#RETURN_VALUE#", val: _return_252}]), "return"); + return (_return_252); + }()) + ; + log_event("JsInterpreter.js", 528, ctx_push(ctx_92, [{key: "#RETURN_VALUE#", val: _return_253}]), "return"); + return (_return_253); + } + + }); + log_event("JsInterpreter.js", 534, ctx_push(ctx_88, [{key: "#RETURN_VALUE#", val: _return_254}]), "return"); + return (_return_254); + } else { + var _return_245 = + res_spec(s1, d); + log_event("JsInterpreter.js", 511, ctx_push(ctx_88, [{key: "#RETURN_VALUE#", val: _return_245}]), "return"); + return (_return_245); + } + }); + log_event("JsInterpreter.js", 539, ctx_push(ctx_87, [{key: "#RETURN_VALUE#", val: _return_255}]), "return"); + return (_return_255); + } + + }); + log_event("JsInterpreter.js", 545, ctx_push(ctx_86, [{key: "#RETURN_VALUE#", val: _return_256}]), "return"); + return (_return_256); +}; + +var object_proto_is_prototype_of = function (s, l0, l) { + var ctx_93 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "l0", val: l0}, {key: "l", val: l}]); + log_event("JsInterpreter.js", 572, ctx_93, "enter"); + var _return_267 = if_some((function () { + log_event("JsInterpreter.js", 548, ctx_93, "call"); + var _return_257 = run_object_method(object_proto_, s, + l); + log_event("JsInterpreter.js", 547, ctx_push(ctx_93, [{key: "#RETURN_VALUE#", val: _return_257}]), "return"); + return (_return_257); }()), function(b) { + + var ctx_94 = ctx_push(ctx_93, [{key: "b", val: b}]); + log_event("JsInterpreter.js", 570, ctx_94, "let"); + log_event("JsInterpreter.js", 567, ctx_94, "switch"); + switch (b.tag) { + case "Coq_value_prim": + var p = b.value;var ctx_95 = ctx_push(ctx_94, [{key: "p", val: p}]); + log_event("JsInterpreter.js", 560, ctx_95, "case"); + + log_event("JsInterpreter.js", 559, ctx_95, "switch"); + switch (p.tag) { + case "Coq_prim_null":log_event("JsInterpreter.js", 550, ctx_95, "case"); + + var _return_258 = result_out( + Coq_out_ter(s, + res_val( + Coq_value_prim( + Coq_prim_bool( + false))))); + log_event("JsInterpreter.js", 549, ctx_push(ctx_95, [{key: "#RETURN_VALUE#", val: _return_258}]), "return"); + return (_return_258); + default:log_event("JsInterpreter.js", 558, ctx_95, "case"); + + var _return_262 = (function () { + log_event("JsInterpreter.js", 556, ctx_95, "call"); + var _return_261 = function (s, m) { + var ctx_96 = ctx_push(ctx_95, [{key: "s", val: s}, {key: "m", val: m}]); + log_event("JsInterpreter.js", 554, ctx_96, "enter"); + (function () { + log_event("JsInterpreter.js", 553, ctx_96, "call"); + var _return_260 = + Debug.impossible_with_heap_because( + __LOC__, s, m); + log_event("JsInterpreter.js", 552, ctx_push(ctx_96, [{key: "#RETURN_VALUE#", val: _return_260}]), "return"); + return (_return_260); + }()) + ; + var _return_259 = + Coq_result_impossible( + ); + log_event("JsInterpreter.js", 551, ctx_push(ctx_96, [{key: "#RETURN_VALUE#", val: _return_259}]), "return"); + return (_return_259); + }(s, + "[run_object_method] returned a primitive in [object_proto_is_prototype_of_body]."); + log_event("JsInterpreter.js", 555, ctx_push(ctx_95, [{key: "#RETURN_VALUE#", val: _return_261}]), "return"); + return (_return_261); + }()) + ; + log_event("JsInterpreter.js", 557, ctx_push(ctx_95, [{key: "#RETURN_VALUE#", val: _return_262}]), "return"); + return (_return_262); + } + + case "Coq_value_object": + var l_2 = b.value;var ctx_97 = ctx_push(ctx_94, [{key: "l_2", val: l_2}]); + log_event("JsInterpreter.js", 566, ctx_97, "case"); + + var _if_arg_263 = object_loc_compare(l_2, l0); + log_event("JsInterpreter.js", 565, ctx_97, "if"); + if (_if_arg_263) { + var _return_266 = result_out( + Coq_out_ter(s, + res_val( + Coq_value_prim( + Coq_prim_bool(true))))); + log_event("JsInterpreter.js", 564, ctx_push(ctx_97, [{key: "#RETURN_VALUE#", val: _return_266}]), "return"); + return (_return_266); + } else { + var _return_265 = (function () { + log_event("JsInterpreter.js", 562, ctx_97, "call"); + var _return_264 = object_proto_is_prototype_of( + s, l0, l_2); + log_event("JsInterpreter.js", 561, ctx_push(ctx_97, [{key: "#RETURN_VALUE#", val: _return_264}]), "return"); + return (_return_264); + }()) + ; + log_event("JsInterpreter.js", 563, ctx_push(ctx_97, [{key: "#RETURN_VALUE#", val: _return_265}]), "return"); + return (_return_265); + } + } + + }); + log_event("JsInterpreter.js", 571, ctx_push(ctx_93, [{key: "#RETURN_VALUE#", val: _return_267}]), "return"); + return (_return_267); +}; + +var object_default_value = function (s, c, l, prefo) { + var ctx_98 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "l", val: l}, {key: "prefo", val: prefo}]); + log_event("JsInterpreter.js", 641, ctx_98, "enter"); + var _return_291 = if_some((function () { + log_event("JsInterpreter.js", 574, ctx_98, "call"); + var _return_268 = run_object_method( + object_default_value_, s, l); + log_event("JsInterpreter.js", 573, ctx_push(ctx_98, [{key: "#RETURN_VALUE#", val: _return_268}]), "return"); + return (_return_268); }()), function(b) { + + var ctx_99 = ctx_push(ctx_98, [{key: "b", val: b}]); + log_event("JsInterpreter.js", 639, ctx_99, "let"); + log_event("JsInterpreter.js", 636, ctx_99, "switch"); + switch (b.tag) { + case "Coq_builtin_default_value_default":log_event("JsInterpreter.js", 635, ctx_99, "case"); + + var gpref = (function () { + log_event("JsInterpreter.js", 576, ctx_99, "call"); + var _return_269 = unsome_default( + Coq_preftype_number(), + prefo); + log_event("JsInterpreter.js", 575, ctx_push(ctx_99, [{key: "#RETURN_VALUE#", val: _return_269}]), "return"); + return (_return_269); + }()) + ; + var ctx_100 = ctx_push(ctx_99, [{key: "gpref", val: gpref}]); + log_event("JsInterpreter.js", 634, ctx_100, "let"); + var lpref = (function () { + log_event("JsInterpreter.js", 578, ctx_100, "call"); + var _return_270 = other_preftypes(gpref); + log_event("JsInterpreter.js", 577, ctx_push(ctx_100, [{key: "#RETURN_VALUE#", val: _return_270}]), "return"); + return (_return_270); + }()) + ; + var ctx_101 = ctx_push(ctx_100, [{key: "lpref", val: lpref}]); + log_event("JsInterpreter.js", 633, ctx_101, "let"); + var sub0 = function (s_2, x, k) { + var ctx_102 = ctx_push(ctx_101, [{key: "s_2", val: s_2}, {key: "x", val: x}, {key: "k", val: k}]); + log_event("JsInterpreter.js", 614, ctx_102, "enter"); + var _return_282 = if_value((function () { + log_event("JsInterpreter.js", 580, ctx_102, "call"); + var _return_271 = + run_object_get(s_2, c, l, + x); + log_event("JsInterpreter.js", 579, ctx_push(ctx_102, [{key: "#RETURN_VALUE#", val: _return_271}]), "return"); + return (_return_271); + }()), function(s1, vfo) { + + var ctx_103 = ctx_push(ctx_102, [{key: "s1", val: s1}, {key: "vfo", val: vfo}]); + log_event("JsInterpreter.js", 612, ctx_103, "let"); + var _return_281 = + if_some((function () { + log_event("JsInterpreter.js", 582, ctx_103, "call"); + var _return_272 = + run_callable(s1, vfo); + log_event("JsInterpreter.js", 581, ctx_push(ctx_103, [{key: "#RETURN_VALUE#", val: _return_272}]), "return"); + return (_return_272); + }()), function(co) { + + var ctx_104 = ctx_push(ctx_103, [{key: "co", val: co}]); + log_event("JsInterpreter.js", 608, ctx_104, "let"); + log_event("JsInterpreter.js", 605, ctx_104, "switch"); + switch (co.tag) { + case "Some": + var b0 = co.value;var ctx_105 = ctx_push(ctx_104, [{key: "b0", val: b0}]); + log_event("JsInterpreter.js", 600, ctx_105, "case"); + + var _return_278 = + if_object( + result_out( + Coq_out_ter( + s1, + res_val( + vfo))), + function(s2, + lfunc) { + + var ctx_106 = ctx_push(ctx_105, [{key: "s2", val: s2}, {key: "lfunc", val: lfunc}]); + log_event("JsInterpreter.js", 598, ctx_106, "let"); + var _return_277 = + if_value( + (function () { + log_event("JsInterpreter.js", 584, ctx_106, "call"); + var _return_273 = + run_call( + s2, c, + lfunc, + Coq_value_object( + l), + mk_nil()); + log_event("JsInterpreter.js", 583, ctx_push(ctx_106, [{key: "#RETURN_VALUE#", val: _return_273}]), "return"); + return (_return_273); + }()), + function(s3, + v) { + + var ctx_107 = ctx_push(ctx_106, [{key: "s3", val: s3}, {key: "v", val: v}]); + log_event("JsInterpreter.js", 594, ctx_107, "let"); + log_event("JsInterpreter.js", 591, ctx_107, "switch"); + switch (v.tag) { + case "Coq_value_prim": + var w = v.value;var ctx_108 = ctx_push(ctx_107, [{key: "w", val: w}]); + log_event("JsInterpreter.js", 586, ctx_108, "case"); + + var _return_274 = + result_out( + Coq_out_ter( + s3, + res_val( + Coq_value_prim( + w)))); + log_event("JsInterpreter.js", 585, ctx_push(ctx_108, [{key: "#RETURN_VALUE#", val: _return_274}]), "return"); + return (_return_274); + case "Coq_value_object": + var l0 = v.value;var ctx_109 = ctx_push(ctx_107, [{key: "l0", val: l0}]); + log_event("JsInterpreter.js", 590, ctx_109, "case"); + + var _return_276 = (function () { + log_event("JsInterpreter.js", 588, ctx_109, "call"); + var _return_275 = + k(s3); + log_event("JsInterpreter.js", 587, ctx_push(ctx_109, [{key: "#RETURN_VALUE#", val: _return_275}]), "return"); + return (_return_275); + }()) + ; + log_event("JsInterpreter.js", 589, ctx_push(ctx_109, [{key: "#RETURN_VALUE#", val: _return_276}]), "return"); + return (_return_276); + } + + }); + log_event("JsInterpreter.js", 595, ctx_push(ctx_106, [{key: "#RETURN_VALUE#", val: _return_277}]), "return"); + return (_return_277); + }); + log_event("JsInterpreter.js", 599, ctx_push(ctx_105, [{key: "#RETURN_VALUE#", val: _return_278}]), "return"); + return (_return_278); + case "None":log_event("JsInterpreter.js", 604, ctx_104, "case"); + + var _return_280 = (function () { + log_event("JsInterpreter.js", 602, ctx_104, "call"); + var _return_279 = + k(s1); + log_event("JsInterpreter.js", 601, ctx_push(ctx_104, [{key: "#RETURN_VALUE#", val: _return_279}]), "return"); + return (_return_279); + }()) + ; + log_event("JsInterpreter.js", 603, ctx_push(ctx_104, [{key: "#RETURN_VALUE#", val: _return_280}]), "return"); + return (_return_280); + } + + }); + log_event("JsInterpreter.js", 609, ctx_push(ctx_103, [{key: "#RETURN_VALUE#", val: _return_281}]), "return"); + return (_return_281); + }); + log_event("JsInterpreter.js", 613, ctx_push(ctx_102, [{key: "#RETURN_VALUE#", val: _return_282}]), "return"); + return (_return_282); + }; + var ctx_110 = ctx_push(ctx_101, [{key: "sub0", val: sub0}]); + log_event("JsInterpreter.js", 632, ctx_110, "let"); + var gmeth = (function () { + log_event("JsInterpreter.js", 616, ctx_110, "call"); + var _return_283 = method_of_preftype(gpref); + log_event("JsInterpreter.js", 615, ctx_push(ctx_110, [{key: "#RETURN_VALUE#", val: _return_283}]), "return"); + return (_return_283); + }()) + ; + var ctx_111 = ctx_push(ctx_110, [{key: "gmeth", val: gmeth}]); + log_event("JsInterpreter.js", 631, ctx_111, "let"); + var _return_290 = (function () { + log_event("JsInterpreter.js", 629, ctx_111, "call"); + var _return_289 = sub0(s, gmeth, + function (s_2) { + var ctx_112 = ctx_push(ctx_111, [{key: "s_2", val: s_2}]); + log_event("JsInterpreter.js", 627, ctx_112, "enter"); + var lmeth = (function () { + log_event("JsInterpreter.js", 618, ctx_112, "call"); + var _return_284 = + method_of_preftype( + lpref); + log_event("JsInterpreter.js", 617, ctx_push(ctx_112, [{key: "#RETURN_VALUE#", val: _return_284}]), "return"); + return (_return_284); + }()) + ; + var ctx_113 = ctx_push(ctx_112, [{key: "lmeth", val: lmeth}]); + log_event("JsInterpreter.js", 626, ctx_113, "let"); + var _return_288 = (function () { + log_event("JsInterpreter.js", 624, ctx_113, "call"); + var _return_287 = + sub0(s_2, lmeth, + function (s_3) { + var ctx_114 = ctx_push(ctx_113, [{key: "s_3", val: s_3}]); + log_event("JsInterpreter.js", 622, ctx_114, "enter"); + var _return_286 = (function () { + log_event("JsInterpreter.js", 620, ctx_114, "call"); + var _return_285 = + run_error(s_3, + Coq_native_error_type( + )); + log_event("JsInterpreter.js", 619, ctx_push(ctx_114, [{key: "#RETURN_VALUE#", val: _return_285}]), "return"); + return (_return_285); + }()) + ; + log_event("JsInterpreter.js", 621, ctx_push(ctx_114, [{key: "#RETURN_VALUE#", val: _return_286}]), "return"); + return (_return_286); + }); + log_event("JsInterpreter.js", 623, ctx_push(ctx_113, [{key: "#RETURN_VALUE#", val: _return_287}]), "return"); + return (_return_287); + }()) + ; + log_event("JsInterpreter.js", 625, ctx_push(ctx_113, [{key: "#RETURN_VALUE#", val: _return_288}]), "return"); + return (_return_288); + }); + log_event("JsInterpreter.js", 628, ctx_push(ctx_111, [{key: "#RETURN_VALUE#", val: _return_289}]), "return"); + return (_return_289); + }()) + ; + log_event("JsInterpreter.js", 630, ctx_push(ctx_111, [{key: "#RETURN_VALUE#", val: _return_290}]), "return"); + return (_return_290); + + + + + } + + }); + log_event("JsInterpreter.js", 640, ctx_push(ctx_98, [{key: "#RETURN_VALUE#", val: _return_291}]), "return"); + return (_return_291); +}; + +var to_primitive = function (s, c, v, prefo) { + var ctx_115 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "v", val: v}, {key: "prefo", val: prefo}]); + log_event("JsInterpreter.js", 653, ctx_115, "enter"); + log_event("JsInterpreter.js", 652, ctx_115, "switch"); + switch (v.tag) { + case "Coq_value_prim": + var w = v.value;var ctx_116 = ctx_push(ctx_115, [{key: "w", val: w}]); + log_event("JsInterpreter.js", 643, ctx_116, "case"); + + var _return_292 = result_out(Coq_out_ter(s, res_val(Coq_value_prim(w)))); + log_event("JsInterpreter.js", 642, ctx_push(ctx_116, [{key: "#RETURN_VALUE#", val: _return_292}]), "return"); + return (_return_292); + case "Coq_value_object": + var l = v.value;var ctx_117 = ctx_push(ctx_115, [{key: "l", val: l}]); + log_event("JsInterpreter.js", 651, ctx_117, "case"); + + var _return_295 = if_prim((function () { + log_event("JsInterpreter.js", 645, ctx_117, "call"); + var _return_293 = object_default_value(s, c, l, + prefo); + log_event("JsInterpreter.js", 644, ctx_push(ctx_117, [{key: "#RETURN_VALUE#", val: _return_293}]), "return"); + return (_return_293); }()), function(s0, r) { + + var ctx_118 = ctx_push(ctx_117, [{key: "s0", val: s0}, {key: "r", val: r}]); + log_event("JsInterpreter.js", 649, ctx_118, "let"); + var _return_294 = res_ter(s0, + res_val(Coq_value_prim(r))); + log_event("JsInterpreter.js", 646, ctx_push(ctx_118, [{key: "#RETURN_VALUE#", val: _return_294}]), "return"); + return (_return_294); + }); + log_event("JsInterpreter.js", 650, ctx_push(ctx_117, [{key: "#RETURN_VALUE#", val: _return_295}]), "return"); + return (_return_295); + } + +}; + +var to_number = function (s, c, _foo_) { + var ctx_119 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "_foo_", val: _foo_}]); + log_event("JsInterpreter.js", 669, ctx_119, "enter"); + log_event("JsInterpreter.js", 668, ctx_119, "switch"); + switch (_foo_.tag) { + case "Coq_value_prim": + var w = _foo_.value;var ctx_120 = ctx_push(ctx_119, [{key: "w", val: w}]); + log_event("JsInterpreter.js", 657, ctx_120, "case"); + + var _return_297 = result_out( + Coq_out_ter(s, + res_val( + Coq_value_prim( + Coq_prim_number((function () { + log_event("JsInterpreter.js", 655, ctx_120, "call"); + var _return_296 = convert_prim_to_number( + w); + log_event("JsInterpreter.js", 654, ctx_push(ctx_120, [{key: "#RETURN_VALUE#", val: _return_296}]), "return"); + return (_return_296); }())))))); + log_event("JsInterpreter.js", 656, ctx_push(ctx_120, [{key: "#RETURN_VALUE#", val: _return_297}]), "return"); + return (_return_297); + case "Coq_value_object": + var l = _foo_.value;var ctx_121 = ctx_push(ctx_119, [{key: "l", val: l}]); + log_event("JsInterpreter.js", 667, ctx_121, "case"); + + var _return_301 = if_prim((function () { + log_event("JsInterpreter.js", 659, ctx_121, "call"); + var _return_298 = to_primitive(s, c, + Coq_value_object(l), + Some(Coq_preftype_number())); + log_event("JsInterpreter.js", 658, ctx_push(ctx_121, [{key: "#RETURN_VALUE#", val: _return_298}]), "return"); + return (_return_298); }()), function(s1, w) { + + var ctx_122 = ctx_push(ctx_121, [{key: "s1", val: s1}, {key: "w", val: w}]); + log_event("JsInterpreter.js", 665, ctx_122, "let"); + var _return_300 = res_ter(s1, + res_val( + Coq_value_prim( + Coq_prim_number( + (function () { + log_event("JsInterpreter.js", 661, ctx_122, "call"); + var _return_299 = + convert_prim_to_number( + w); + log_event("JsInterpreter.js", 660, ctx_push(ctx_122, [{key: "#RETURN_VALUE#", val: _return_299}]), "return"); + return (_return_299); + }()))))); + log_event("JsInterpreter.js", 662, ctx_push(ctx_122, [{key: "#RETURN_VALUE#", val: _return_300}]), "return"); + return (_return_300); + }); + log_event("JsInterpreter.js", 666, ctx_push(ctx_121, [{key: "#RETURN_VALUE#", val: _return_301}]), "return"); + return (_return_301); + } + +}; + +var to_integer = function (s, c, v) { + var ctx_123 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "v", val: v}]); + log_event("JsInterpreter.js", 679, ctx_123, "enter"); + var _return_305 = if_number((function () { + log_event("JsInterpreter.js", 671, ctx_123, "call"); + var _return_302 = to_number(s, c, v); + log_event("JsInterpreter.js", 670, ctx_push(ctx_123, [{key: "#RETURN_VALUE#", val: _return_302}]), "return"); + return (_return_302); }()), function(s1, n) { + + var ctx_124 = ctx_push(ctx_123, [{key: "s1", val: s1}, {key: "n", val: n}]); + log_event("JsInterpreter.js", 677, ctx_124, "let"); + var _return_304 = res_ter(s1, + res_val( + Coq_value_prim( + Coq_prim_number( + (function () { + log_event("JsInterpreter.js", 673, ctx_124, "call"); + var _return_303 = + convert_number_to_integer( + n); + log_event("JsInterpreter.js", 672, ctx_push(ctx_124, [{key: "#RETURN_VALUE#", val: _return_303}]), "return"); + return (_return_303); + }()))))); + log_event("JsInterpreter.js", 674, ctx_push(ctx_124, [{key: "#RETURN_VALUE#", val: _return_304}]), "return"); + return (_return_304); + }); + log_event("JsInterpreter.js", 678, ctx_push(ctx_123, [{key: "#RETURN_VALUE#", val: _return_305}]), "return"); + return (_return_305); +}; + +var to_int32 = function (s, c, v) { + var ctx_125 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "v", val: v}]); + log_event("JsInterpreter.js", 689, ctx_125, "enter"); + var _return_309 = if_number((function () { + log_event("JsInterpreter.js", 681, ctx_125, "call"); + var _return_306 = to_number(s, c, v); + log_event("JsInterpreter.js", 680, ctx_push(ctx_125, [{key: "#RETURN_VALUE#", val: _return_306}]), "return"); + return (_return_306); }()), function(s_2, n) { + + var ctx_126 = ctx_push(ctx_125, [{key: "s_2", val: s_2}, {key: "n", val: n}]); + log_event("JsInterpreter.js", 687, ctx_126, "let"); + var _return_308 = res_spec(s_2, (function () { + log_event("JsInterpreter.js", 683, ctx_126, "call"); + var _return_307 = JsNumber.to_int32( + n); + log_event("JsInterpreter.js", 682, ctx_push(ctx_126, [{key: "#RETURN_VALUE#", val: _return_307}]), "return"); + return (_return_307); }())); + log_event("JsInterpreter.js", 684, ctx_push(ctx_126, [{key: "#RETURN_VALUE#", val: _return_308}]), "return"); + return (_return_308); + }); + log_event("JsInterpreter.js", 688, ctx_push(ctx_125, [{key: "#RETURN_VALUE#", val: _return_309}]), "return"); + return (_return_309); +}; + +var to_uint32 = function (s, c, v) { + var ctx_127 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "v", val: v}]); + log_event("JsInterpreter.js", 699, ctx_127, "enter"); + var _return_313 = if_number((function () { + log_event("JsInterpreter.js", 691, ctx_127, "call"); + var _return_310 = to_number(s, c, v); + log_event("JsInterpreter.js", 690, ctx_push(ctx_127, [{key: "#RETURN_VALUE#", val: _return_310}]), "return"); + return (_return_310); }()), function(s_2, n) { + + var ctx_128 = ctx_push(ctx_127, [{key: "s_2", val: s_2}, {key: "n", val: n}]); + log_event("JsInterpreter.js", 697, ctx_128, "let"); + var _return_312 = res_spec(s_2, (function () { + log_event("JsInterpreter.js", 693, ctx_128, "call"); + var _return_311 = JsNumber.to_uint32( + n); + log_event("JsInterpreter.js", 692, ctx_push(ctx_128, [{key: "#RETURN_VALUE#", val: _return_311}]), "return"); + return (_return_311); }())); + log_event("JsInterpreter.js", 694, ctx_push(ctx_128, [{key: "#RETURN_VALUE#", val: _return_312}]), "return"); + return (_return_312); + }); + log_event("JsInterpreter.js", 698, ctx_push(ctx_127, [{key: "#RETURN_VALUE#", val: _return_313}]), "return"); + return (_return_313); +}; + +var to_string = function (s, c, _foo_) { + var ctx_129 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "_foo_", val: _foo_}]); + log_event("JsInterpreter.js", 715, ctx_129, "enter"); + log_event("JsInterpreter.js", 714, ctx_129, "switch"); + switch (_foo_.tag) { + case "Coq_value_prim": + var w = _foo_.value;var ctx_130 = ctx_push(ctx_129, [{key: "w", val: w}]); + log_event("JsInterpreter.js", 703, ctx_130, "case"); + + var _return_315 = result_out( + Coq_out_ter(s, + res_val( + Coq_value_prim( + Coq_prim_string((function () { + log_event("JsInterpreter.js", 701, ctx_130, "call"); + var _return_314 = convert_prim_to_string( + w); + log_event("JsInterpreter.js", 700, ctx_push(ctx_130, [{key: "#RETURN_VALUE#", val: _return_314}]), "return"); + return (_return_314); }())))))); + log_event("JsInterpreter.js", 702, ctx_push(ctx_130, [{key: "#RETURN_VALUE#", val: _return_315}]), "return"); + return (_return_315); + case "Coq_value_object": + var l = _foo_.value;var ctx_131 = ctx_push(ctx_129, [{key: "l", val: l}]); + log_event("JsInterpreter.js", 713, ctx_131, "case"); + + var _return_319 = if_prim((function () { + log_event("JsInterpreter.js", 705, ctx_131, "call"); + var _return_316 = to_primitive(s, c, + Coq_value_object(l), + Some(Coq_preftype_string())); + log_event("JsInterpreter.js", 704, ctx_push(ctx_131, [{key: "#RETURN_VALUE#", val: _return_316}]), "return"); + return (_return_316); }()), function(s1, w) { + + var ctx_132 = ctx_push(ctx_131, [{key: "s1", val: s1}, {key: "w", val: w}]); + log_event("JsInterpreter.js", 711, ctx_132, "let"); + var _return_318 = res_ter(s1, + res_val( + Coq_value_prim( + Coq_prim_string( + (function () { + log_event("JsInterpreter.js", 707, ctx_132, "call"); + var _return_317 = + convert_prim_to_string( + w); + log_event("JsInterpreter.js", 706, ctx_push(ctx_132, [{key: "#RETURN_VALUE#", val: _return_317}]), "return"); + return (_return_317); + }()))))); + log_event("JsInterpreter.js", 708, ctx_push(ctx_132, [{key: "#RETURN_VALUE#", val: _return_318}]), "return"); + return (_return_318); + }); + log_event("JsInterpreter.js", 712, ctx_push(ctx_131, [{key: "#RETURN_VALUE#", val: _return_319}]), "return"); + return (_return_319); + } + +}; + +var object_can_put = function (s, c, l, x) { + var ctx_133 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "l", val: l}, {key: "x", val: x}]); + log_event("JsInterpreter.js", 798, ctx_133, "enter"); + var _return_347 = if_some((function () { + log_event("JsInterpreter.js", 717, ctx_133, "call"); + var _return_320 = run_object_method(object_can_put_, + s, l); + log_event("JsInterpreter.js", 716, ctx_push(ctx_133, [{key: "#RETURN_VALUE#", val: _return_320}]), "return"); + return (_return_320); }()), function(b) { + + var ctx_134 = ctx_push(ctx_133, [{key: "b", val: b}]); + log_event("JsInterpreter.js", 796, ctx_134, "let"); + log_event("JsInterpreter.js", 793, ctx_134, "switch"); + switch (b.tag) { + case "Coq_builtin_can_put_default":log_event("JsInterpreter.js", 792, ctx_134, "case"); + + var _return_346 = if_run((function () { + log_event("JsInterpreter.js", 719, ctx_134, "call"); + var _return_321 = run_object_get_own_prop( + s, c, l, + x); + log_event("JsInterpreter.js", 718, ctx_push(ctx_134, [{key: "#RETURN_VALUE#", val: _return_321}]), "return"); + return (_return_321); }()), + function(s1, d) { + + var ctx_135 = ctx_push(ctx_134, [{key: "s1", val: s1}, {key: "d", val: d}]); + log_event("JsInterpreter.js", 790, ctx_135, "let"); + log_event("JsInterpreter.js", 787, ctx_135, "switch"); + switch (d.tag) { + case "Coq_full_descriptor_undef":log_event("JsInterpreter.js", 778, ctx_135, "case"); + + var _return_342 = + if_some((function () { + log_event("JsInterpreter.js", 721, ctx_135, "call"); + var _return_322 = + run_object_method( + object_proto_, + s1, l); + log_event("JsInterpreter.js", 720, ctx_push(ctx_135, [{key: "#RETURN_VALUE#", val: _return_322}]), "return"); + return (_return_322); + }()), + function(vproto) { + + var ctx_136 = ctx_push(ctx_135, [{key: "vproto", val: vproto}]); + log_event("JsInterpreter.js", 776, ctx_136, "let"); + log_event("JsInterpreter.js", 773, ctx_136, "switch"); + switch (vproto.tag) { + case "Coq_value_prim": + var p = vproto.value;var ctx_137 = ctx_push(ctx_136, [{key: "p", val: p}]); + log_event("JsInterpreter.js", 739, ctx_137, "case"); + + log_event("JsInterpreter.js", 738, ctx_137, "switch"); + switch (p.tag) { + case "Coq_prim_null":log_event("JsInterpreter.js", 729, ctx_137, "case"); + + var _return_325 = + if_some( + (function () { + log_event("JsInterpreter.js", 723, ctx_137, "call"); + var _return_323 = + run_object_method( + object_extensible_, + s1, l); + log_event("JsInterpreter.js", 722, ctx_push(ctx_137, [{key: "#RETURN_VALUE#", val: _return_323}]), "return"); + return (_return_323); + }()), + function(b0) { + + var ctx_138 = ctx_push(ctx_137, [{key: "b0", val: b0}]); + log_event("JsInterpreter.js", 727, ctx_138, "let"); + var _return_324 = + res_ter( + s1, + res_val( + Coq_value_prim( + Coq_prim_bool( + b0)))); + log_event("JsInterpreter.js", 724, ctx_push(ctx_138, [{key: "#RETURN_VALUE#", val: _return_324}]), "return"); + return (_return_324); + }); + log_event("JsInterpreter.js", 728, ctx_push(ctx_137, [{key: "#RETURN_VALUE#", val: _return_325}]), "return"); + return (_return_325); + default:log_event("JsInterpreter.js", 737, ctx_137, "case"); + + var _return_329 = (function () { + log_event("JsInterpreter.js", 735, ctx_137, "call"); + var _return_328 = + function (s, m) { + var ctx_139 = ctx_push(ctx_137, [{key: "s", val: s}, {key: "m", val: m}]); + log_event("JsInterpreter.js", 733, ctx_139, "enter"); + (function () { + log_event("JsInterpreter.js", 732, ctx_139, "call"); + var _return_327 = + Debug.impossible_with_heap_because( + __LOC__, + s, m); + log_event("JsInterpreter.js", 731, ctx_push(ctx_139, [{key: "#RETURN_VALUE#", val: _return_327}]), "return"); + return (_return_327); + }()) + ; + var _return_326 = + Coq_result_impossible( + ); + log_event("JsInterpreter.js", 730, ctx_push(ctx_139, [{key: "#RETURN_VALUE#", val: _return_326}]), "return"); + return (_return_326); + }(s1, + "Non-null primitive get as a prototype value in [object_can_put]."); + log_event("JsInterpreter.js", 734, ctx_push(ctx_137, [{key: "#RETURN_VALUE#", val: _return_328}]), "return"); + return (_return_328); + }()) + ; + log_event("JsInterpreter.js", 736, ctx_push(ctx_137, [{key: "#RETURN_VALUE#", val: _return_329}]), "return"); + return (_return_329); + } + + case "Coq_value_object": + var lproto = vproto.value;var ctx_140 = ctx_push(ctx_136, [{key: "lproto", val: lproto}]); + log_event("JsInterpreter.js", 772, ctx_140, "case"); + + var _return_341 = + if_run( + (function () { + log_event("JsInterpreter.js", 741, ctx_140, "call"); + var _return_330 = + run_object_get_prop( + s1, c, + lproto, + x); + log_event("JsInterpreter.js", 740, ctx_push(ctx_140, [{key: "#RETURN_VALUE#", val: _return_330}]), "return"); + return (_return_330); + }()), + function(s2, + d_2) { + + var ctx_141 = ctx_push(ctx_140, [{key: "s2", val: s2}, {key: "d_2", val: d_2}]); + log_event("JsInterpreter.js", 770, ctx_141, "let"); + log_event("JsInterpreter.js", 767, ctx_141, "switch"); + switch (d_2.tag) { + case "Coq_full_descriptor_undef":log_event("JsInterpreter.js", 749, ctx_141, "case"); + + var _return_333 = + if_some( + (function () { + log_event("JsInterpreter.js", 743, ctx_141, "call"); + var _return_331 = + run_object_method( + object_extensible_, + s2, l); + log_event("JsInterpreter.js", 742, ctx_push(ctx_141, [{key: "#RETURN_VALUE#", val: _return_331}]), "return"); + return (_return_331); + }()), + function(b0) { + + var ctx_142 = ctx_push(ctx_141, [{key: "b0", val: b0}]); + log_event("JsInterpreter.js", 747, ctx_142, "let"); + var _return_332 = + res_ter( + s2, + res_val( + Coq_value_prim( + Coq_prim_bool( + b0)))); + log_event("JsInterpreter.js", 744, ctx_push(ctx_142, [{key: "#RETURN_VALUE#", val: _return_332}]), "return"); + return (_return_332); + }); + log_event("JsInterpreter.js", 748, ctx_push(ctx_141, [{key: "#RETURN_VALUE#", val: _return_333}]), "return"); + return (_return_333); + case "Coq_full_descriptor_some": + var a = d_2.value;var ctx_143 = ctx_push(ctx_141, [{key: "a", val: a}]); + log_event("JsInterpreter.js", 766, ctx_143, "case"); + + log_event("JsInterpreter.js", 765, ctx_143, "switch"); + switch (a.tag) { + case "Coq_attributes_data_of": + var ad = a.value;var ctx_144 = ctx_push(ctx_143, [{key: "ad", val: ad}]); + log_event("JsInterpreter.js", 760, ctx_144, "case"); + + var _return_338 = + if_some( + (function () { + log_event("JsInterpreter.js", 751, ctx_144, "call"); + var _return_334 = + run_object_method( + object_extensible_, + s2, l); + log_event("JsInterpreter.js", 750, ctx_push(ctx_144, [{key: "#RETURN_VALUE#", val: _return_334}]), "return"); + return (_return_334); + }()), + function(ext) { + + var ctx_145 = ctx_push(ctx_144, [{key: "ext", val: ext}]); + log_event("JsInterpreter.js", 758, ctx_145, "let"); + var _return_337 = + res_ter( + s2, + (function () { + log_event("JsInterpreter.js", 754, ctx_145, "if"); + if (ext) { + var _return_336 = + res_val( + Coq_value_prim( + Coq_prim_bool( + ad.attributes_data_writable))); + log_event("JsInterpreter.js", 753, ctx_push(ctx_145, [{key: "#RETURN_VALUE#", val: _return_336}]), "return"); + return (_return_336); + } else { + var _return_335 = + res_val( + Coq_value_prim( + Coq_prim_bool( + false))); + log_event("JsInterpreter.js", 752, ctx_push(ctx_145, [{key: "#RETURN_VALUE#", val: _return_335}]), "return"); + return (_return_335); + }}())); + log_event("JsInterpreter.js", 755, ctx_push(ctx_145, [{key: "#RETURN_VALUE#", val: _return_337}]), "return"); + return (_return_337); + }); + log_event("JsInterpreter.js", 759, ctx_push(ctx_144, [{key: "#RETURN_VALUE#", val: _return_338}]), "return"); + return (_return_338); + case "Coq_attributes_accessor_of": + var aa = a.value;var ctx_146 = ctx_push(ctx_143, [{key: "aa", val: aa}]); + log_event("JsInterpreter.js", 764, ctx_146, "case"); + + var _return_340 = + res_ter( + s2, + res_val( + Coq_value_prim( + Coq_prim_bool( + (function () { + log_event("JsInterpreter.js", 762, ctx_146, "call"); + var _return_339 = + !( + value_compare( + aa.attributes_accessor_set, + Coq_value_prim( + Coq_prim_undef( + )))); + log_event("JsInterpreter.js", 761, ctx_push(ctx_146, [{key: "#RETURN_VALUE#", val: _return_339}]), "return"); + return (_return_339); + }()))))); + log_event("JsInterpreter.js", 763, ctx_push(ctx_146, [{key: "#RETURN_VALUE#", val: _return_340}]), "return"); + return (_return_340); + } + + } + + }); + log_event("JsInterpreter.js", 771, ctx_push(ctx_140, [{key: "#RETURN_VALUE#", val: _return_341}]), "return"); + return (_return_341); + } + + }); + log_event("JsInterpreter.js", 777, ctx_push(ctx_135, [{key: "#RETURN_VALUE#", val: _return_342}]), "return"); + return (_return_342); + case "Coq_full_descriptor_some": + var a = d.value;var ctx_147 = ctx_push(ctx_135, [{key: "a", val: a}]); + log_event("JsInterpreter.js", 786, ctx_147, "case"); + + log_event("JsInterpreter.js", 785, ctx_147, "switch"); + switch (a.tag) { + case "Coq_attributes_data_of": + var ad = a.value;var ctx_148 = ctx_push(ctx_147, [{key: "ad", val: ad}]); + log_event("JsInterpreter.js", 780, ctx_148, "case"); + + var _return_343 = + res_ter(s1, + res_val( + Coq_value_prim( + Coq_prim_bool( + ad.attributes_data_writable)))); + log_event("JsInterpreter.js", 779, ctx_push(ctx_148, [{key: "#RETURN_VALUE#", val: _return_343}]), "return"); + return (_return_343); + case "Coq_attributes_accessor_of": + var aa = a.value;var ctx_149 = ctx_push(ctx_147, [{key: "aa", val: aa}]); + log_event("JsInterpreter.js", 784, ctx_149, "case"); + + var _return_345 = + res_ter(s1, + res_val( + Coq_value_prim( + Coq_prim_bool( + (function () { + log_event("JsInterpreter.js", 782, ctx_149, "call"); + var _return_344 = + !( + value_compare( + aa.attributes_accessor_set, + Coq_value_prim( + Coq_prim_undef( + )))); + log_event("JsInterpreter.js", 781, ctx_push(ctx_149, [{key: "#RETURN_VALUE#", val: _return_344}]), "return"); + return (_return_344); + }()))))); + log_event("JsInterpreter.js", 783, ctx_push(ctx_149, [{key: "#RETURN_VALUE#", val: _return_345}]), "return"); + return (_return_345); + } + + } + + }); + log_event("JsInterpreter.js", 791, ctx_push(ctx_134, [{key: "#RETURN_VALUE#", val: _return_346}]), "return"); + return (_return_346); + } + + }); + log_event("JsInterpreter.js", 797, ctx_push(ctx_133, [{key: "#RETURN_VALUE#", val: _return_347}]), "return"); + return (_return_347); +}; + +var run_object_define_own_prop_array_loop = function (s, c, l, newLen, oldLen, newLenDesc, newWritable, throwcont, def) { + var ctx_150 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "l", val: l}, {key: "newLen", val: newLen}, {key: "oldLen", val: oldLen}, {key: "newLenDesc", val: newLenDesc}, {key: "newWritable", val: newWritable}, {key: "throwcont", val: throwcont}, {key: "def", val: def}]); + log_event("JsInterpreter.js", 846, ctx_150, "enter"); + var _if_arg_348 = (function () { + log_event("JsInterpreter.js", 800, ctx_150, "call"); + var _return_349 = (newLen < oldLen); + log_event("JsInterpreter.js", 799, ctx_push(ctx_150, [{key: "#RETURN_VALUE#", val: _return_349}]), "return"); + return (_return_349); + }()) + ; + log_event("JsInterpreter.js", 845, ctx_150, "if"); + if (_if_arg_348) { + var oldLen_2 = (function () { + log_event("JsInterpreter.js", 809, ctx_150, "call"); + var _return_355 = (oldLen - 1.); + log_event("JsInterpreter.js", 808, ctx_push(ctx_150, [{key: "#RETURN_VALUE#", val: _return_355}]), "return"); + return (_return_355); + }()) + ; + var ctx_151 = ctx_push(ctx_150, [{key: "oldLen_2", val: oldLen_2}]); + log_event("JsInterpreter.js", 844, ctx_151, "let"); + var _return_370 = if_string((function () { + log_event("JsInterpreter.js", 811, ctx_151, "call"); + var _return_356 = to_string(s, c, + Coq_value_prim( + Coq_prim_number(oldLen_2))); + log_event("JsInterpreter.js", 810, ctx_push(ctx_151, [{key: "#RETURN_VALUE#", val: _return_356}]), "return"); + return (_return_356); }()), function(s0, slen) { + + var ctx_152 = ctx_push(ctx_151, [{key: "s0", val: s0}, {key: "slen", val: slen}]); + log_event("JsInterpreter.js", 842, ctx_152, "let"); + var _return_369 = if_bool((function () { + log_event("JsInterpreter.js", 813, ctx_152, "call"); + var _return_357 = object_delete( + s0, c, l, + slen, + false); + log_event("JsInterpreter.js", 812, ctx_push(ctx_152, [{key: "#RETURN_VALUE#", val: _return_357}]), "return"); + return (_return_357); }()), + function(s1, deleteSucceeded) { + + var ctx_153 = ctx_push(ctx_152, [{key: "s1", val: s1}, {key: "deleteSucceeded", val: deleteSucceeded}]); + log_event("JsInterpreter.js", 838, ctx_153, "let"); + var _if_arg_358 = (function () { + log_event("JsInterpreter.js", 815, ctx_153, "call"); + var _return_359 = !( + deleteSucceeded); + log_event("JsInterpreter.js", 814, ctx_push(ctx_153, [{key: "#RETURN_VALUE#", val: _return_359}]), "return"); + return (_return_359); + }()) + ; + log_event("JsInterpreter.js", 835, ctx_153, "if"); + if (_if_arg_358) { + var newLenDesc0 = descriptor_with_value( + newLenDesc, + Some( + Coq_value_prim( + Coq_prim_number( + (function () { + log_event("JsInterpreter.js", 820, ctx_153, "call"); + var _return_362 = + (oldLen_2 + + 1.); + log_event("JsInterpreter.js", 819, ctx_push(ctx_153, [{key: "#RETURN_VALUE#", val: _return_362}]), "return"); + return (_return_362); + }()))))); + var ctx_154 = ctx_push(ctx_153, [{key: "newLenDesc0", val: newLenDesc0}]); + log_event("JsInterpreter.js", 834, ctx_154, "let"); + var _if_arg_363 = (function () { + log_event("JsInterpreter.js", 822, ctx_154, "call"); + var _return_364 = + !(newWritable); + log_event("JsInterpreter.js", 821, ctx_push(ctx_154, [{key: "#RETURN_VALUE#", val: _return_364}]), "return"); + return (_return_364); + }()) + ; + log_event("JsInterpreter.js", 823, ctx_154, "if"); + if (_if_arg_363) { + var newLenDesc1 = + descriptor_with_writable( + newLenDesc0, + Some(false)); + } else { + var newLenDesc1 = newLenDesc0; + } + var ctx_155 = ctx_push(ctx_154, [{key: "newLenDesc1", val: newLenDesc1}]); + log_event("JsInterpreter.js", 833, ctx_155, "let"); + var _return_368 = if_bool( + (function () { + log_event("JsInterpreter.js", 825, ctx_155, "call"); + var _return_365 = + def(s1, + "length", + newLenDesc1, + false); + log_event("JsInterpreter.js", 824, ctx_push(ctx_155, [{key: "#RETURN_VALUE#", val: _return_365}]), "return"); + return (_return_365); + }()), + function(s2, + x) { + + var ctx_156 = ctx_push(ctx_155, [{key: "s2", val: s2}, {key: "x", val: x}]); + log_event("JsInterpreter.js", 831, ctx_156, "let"); + var _return_367 = (function () { + log_event("JsInterpreter.js", 827, ctx_156, "call"); + var _return_366 = + out_error_or_cst( + s2, + throwcont, + Coq_native_error_type( + ), + Coq_value_prim( + Coq_prim_bool( + false))); + log_event("JsInterpreter.js", 826, ctx_push(ctx_156, [{key: "#RETURN_VALUE#", val: _return_366}]), "return"); + return (_return_366); + }()) + ; + log_event("JsInterpreter.js", 828, ctx_push(ctx_156, [{key: "#RETURN_VALUE#", val: _return_367}]), "return"); + return (_return_367); + }); + log_event("JsInterpreter.js", 832, ctx_push(ctx_155, [{key: "#RETURN_VALUE#", val: _return_368}]), "return"); + return (_return_368); + + + } else { + var _return_361 = (function () { + log_event("JsInterpreter.js", 817, ctx_153, "call"); + var _return_360 = + run_object_define_own_prop_array_loop( + s1, c, l, newLen, + oldLen_2, newLenDesc, + newWritable, throwcont, + def); + log_event("JsInterpreter.js", 816, ctx_push(ctx_153, [{key: "#RETURN_VALUE#", val: _return_360}]), "return"); + return (_return_360); + }()) + ; + log_event("JsInterpreter.js", 818, ctx_push(ctx_153, [{key: "#RETURN_VALUE#", val: _return_361}]), "return"); + return (_return_361); + } + }); + log_event("JsInterpreter.js", 839, ctx_push(ctx_152, [{key: "#RETURN_VALUE#", val: _return_369}]), "return"); + return (_return_369); + }); + log_event("JsInterpreter.js", 843, ctx_push(ctx_151, [{key: "#RETURN_VALUE#", val: _return_370}]), "return"); + return (_return_370); + + } else { + var _if_arg_350 = (function () { + log_event("JsInterpreter.js", 802, ctx_150, "call"); + var _return_351 = !(newWritable); + log_event("JsInterpreter.js", 801, ctx_push(ctx_150, [{key: "#RETURN_VALUE#", val: _return_351}]), "return"); + return (_return_351); + }()) + ; + log_event("JsInterpreter.js", 807, ctx_150, "if"); + if (_if_arg_350) { + var _return_354 = (function () { + log_event("JsInterpreter.js", 805, ctx_150, "call"); + var _return_353 = def(s, "length", { + descriptor_value: None(), + descriptor_writable: Some(false), + descriptor_get: None(), + descriptor_set: None(), + descriptor_enumerable: None(), + descriptor_configurable: None()}, false); + log_event("JsInterpreter.js", 804, ctx_push(ctx_150, [{key: "#RETURN_VALUE#", val: _return_353}]), "return"); + return (_return_353); + }()) + ; + log_event("JsInterpreter.js", 806, ctx_push(ctx_150, [{key: "#RETURN_VALUE#", val: _return_354}]), "return"); + return (_return_354); + } else { + var _return_352 = res_ter(s, + res_val(Coq_value_prim(Coq_prim_bool(true)))); + log_event("JsInterpreter.js", 803, ctx_push(ctx_150, [{key: "#RETURN_VALUE#", val: _return_352}]), "return"); + return (_return_352); + } + } +}; + +var object_define_own_prop = function (s, c, l, x, desc, throwcont) { + var ctx_157 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "l", val: l}, {key: "x", val: x}, {key: "desc", val: desc}, {key: "throwcont", val: throwcont}]); + log_event("JsInterpreter.js", 1290, ctx_157, "enter"); + var reject = function (s0, throwcont0) { + var ctx_158 = ctx_push(ctx_157, [{key: "s0", val: s0}, {key: "throwcont0", val: throwcont0}]); + log_event("JsInterpreter.js", 850, ctx_158, "enter"); + var _return_372 = (function () { + log_event("JsInterpreter.js", 848, ctx_158, "call"); + var _return_371 = out_error_or_cst(s0, throwcont0, + Coq_native_error_type(), + Coq_value_prim(Coq_prim_bool(false))); + log_event("JsInterpreter.js", 847, ctx_push(ctx_158, [{key: "#RETURN_VALUE#", val: _return_371}]), "return"); + return (_return_371); + }()) + ; + log_event("JsInterpreter.js", 849, ctx_push(ctx_158, [{key: "#RETURN_VALUE#", val: _return_372}]), "return"); + return (_return_372); + }; + var ctx_159 = ctx_push(ctx_157, [{key: "reject", val: reject}]); + log_event("JsInterpreter.js", 1289, ctx_159, "let"); + var def = function (s0, x0, desc0, throwcont0) { + var ctx_160 = ctx_push(ctx_159, [{key: "s0", val: s0}, {key: "x0", val: x0}, {key: "desc0", val: desc0}, {key: "throwcont0", val: throwcont0}]); + log_event("JsInterpreter.js", 1024, ctx_160, "enter"); + var _return_457 = if_run((function () { + log_event("JsInterpreter.js", 852, ctx_160, "call"); + var _return_373 = run_object_get_own_prop(s0, c, l, + x0); + log_event("JsInterpreter.js", 851, ctx_push(ctx_160, [{key: "#RETURN_VALUE#", val: _return_373}]), "return"); + return (_return_373); }()), function(s1, d) { + + var ctx_161 = ctx_push(ctx_160, [{key: "s1", val: s1}, {key: "d", val: d}]); + log_event("JsInterpreter.js", 1022, ctx_161, "let"); + var _return_456 = if_some((function () { + log_event("JsInterpreter.js", 854, ctx_161, "call"); + var _return_374 = run_object_method( + object_extensible_, + s1, l); + log_event("JsInterpreter.js", 853, ctx_push(ctx_161, [{key: "#RETURN_VALUE#", val: _return_374}]), "return"); + return (_return_374); }()), + function(ext) { + + var ctx_162 = ctx_push(ctx_161, [{key: "ext", val: ext}]); + log_event("JsInterpreter.js", 1018, ctx_162, "let"); + log_event("JsInterpreter.js", 1015, ctx_162, "switch"); + switch (d.tag) { + case "Coq_full_descriptor_undef":log_event("JsInterpreter.js", 882, ctx_162, "case"); + + log_event("JsInterpreter.js", 881, ctx_162, "if"); + if (ext) { + var _if_arg_377 = (function () { + log_event("JsInterpreter.js", 863, ctx_162, "call"); + var _return_380 = + ((function () { + log_event("JsInterpreter.js", 859, ctx_162, "call"); + var _return_378 = + descriptor_is_generic_dec( + desc0); + log_event("JsInterpreter.js", 858, ctx_push(ctx_162, [{key: "#RETURN_VALUE#", val: _return_378}]), "return"); + return (_return_378); + }()) + || (function () { + log_event("JsInterpreter.js", 861, ctx_162, "call"); + var _return_379 = + descriptor_is_data_dec( + desc0); + log_event("JsInterpreter.js", 860, ctx_push(ctx_162, [{key: "#RETURN_VALUE#", val: _return_379}]), "return"); + return (_return_379); + }())); + log_event("JsInterpreter.js", 862, ctx_push(ctx_162, [{key: "#RETURN_VALUE#", val: _return_380}]), "return"); + return (_return_380); + }()) + ; + log_event("JsInterpreter.js", 868, ctx_162, "if"); + if (_if_arg_377) { + var a = Coq_attributes_data_of( + (function () { + log_event("JsInterpreter.js", 867, ctx_162, "call"); + var _return_382 = + attributes_data_of_descriptor( + desc0); + log_event("JsInterpreter.js", 866, ctx_push(ctx_162, [{key: "#RETURN_VALUE#", val: _return_382}]), "return"); + return (_return_382); + }())); + } else { + var a = Coq_attributes_accessor_of( + (function () { + log_event("JsInterpreter.js", 865, ctx_162, "call"); + var _return_381 = + attributes_accessor_of_descriptor( + desc0); + log_event("JsInterpreter.js", 864, ctx_push(ctx_162, [{key: "#RETURN_VALUE#", val: _return_381}]), "return"); + return (_return_381); + }())); + } + var ctx_163 = ctx_push(ctx_162, [{key: "a", val: a}]); + log_event("JsInterpreter.js", 880, ctx_163, "let"); + var _return_387 = + if_some((function () { + log_event("JsInterpreter.js", 874, ctx_163, "call"); + var _return_385 = + object_heap_map_properties_pickable_option( + s1, l, + function (p) { + var ctx_164 = ctx_push(ctx_163, [{key: "p", val: p}]); + log_event("JsInterpreter.js", 872, ctx_164, "enter"); + var _return_384 = (function () { + log_event("JsInterpreter.js", 870, ctx_164, "call"); + var _return_383 = + HeapStr.write( + p, x0, a); + log_event("JsInterpreter.js", 869, ctx_push(ctx_164, [{key: "#RETURN_VALUE#", val: _return_383}]), "return"); + return (_return_383); + }()) + ; + log_event("JsInterpreter.js", 871, ctx_push(ctx_164, [{key: "#RETURN_VALUE#", val: _return_384}]), "return"); + return (_return_384); + }); + log_event("JsInterpreter.js", 873, ctx_push(ctx_163, [{key: "#RETURN_VALUE#", val: _return_385}]), "return"); + return (_return_385); + }()), function(s2) { + + var ctx_165 = ctx_push(ctx_163, [{key: "s2", val: s2}]); + log_event("JsInterpreter.js", 878, ctx_165, "let"); + var _return_386 = + res_ter(s2, + res_val( + Coq_value_prim( + Coq_prim_bool( + true)))); + log_event("JsInterpreter.js", 875, ctx_push(ctx_165, [{key: "#RETURN_VALUE#", val: _return_386}]), "return"); + return (_return_386); + }); + log_event("JsInterpreter.js", 879, ctx_push(ctx_163, [{key: "#RETURN_VALUE#", val: _return_387}]), "return"); + return (_return_387); + + } else { + var _return_376 = (function () { + log_event("JsInterpreter.js", 856, ctx_162, "call"); + var _return_375 = + reject(s1, + throwcont0); + log_event("JsInterpreter.js", 855, ctx_push(ctx_162, [{key: "#RETURN_VALUE#", val: _return_375}]), "return"); + return (_return_375); + }()) + ; + log_event("JsInterpreter.js", 857, ctx_push(ctx_162, [{key: "#RETURN_VALUE#", val: _return_376}]), "return"); + return (_return_376); + } + case "Coq_full_descriptor_some": + var a = d.value;var ctx_166 = ctx_push(ctx_162, [{key: "a", val: a}]); + log_event("JsInterpreter.js", 1014, ctx_166, "case"); + + var object_define_own_prop_write = function (s2, a0) { + var ctx_167 = ctx_push(ctx_166, [{key: "s2", val: s2}, {key: "a0", val: a0}]); + log_event("JsInterpreter.js", 897, ctx_167, "enter"); + var a_2 = (function () { + log_event("JsInterpreter.js", 884, ctx_167, "call"); + var _return_388 = + attributes_update(a0, + desc0); + log_event("JsInterpreter.js", 883, ctx_push(ctx_167, [{key: "#RETURN_VALUE#", val: _return_388}]), "return"); + return (_return_388); + }()) + ; + var ctx_168 = ctx_push(ctx_167, [{key: "a_2", val: a_2}]); + log_event("JsInterpreter.js", 896, ctx_168, "let"); + var _return_393 = + if_some((function () { + log_event("JsInterpreter.js", 890, ctx_168, "call"); + var _return_391 = + object_heap_map_properties_pickable_option( + s2, l, + function (p) { + var ctx_169 = ctx_push(ctx_168, [{key: "p", val: p}]); + log_event("JsInterpreter.js", 888, ctx_169, "enter"); + var _return_390 = (function () { + log_event("JsInterpreter.js", 886, ctx_169, "call"); + var _return_389 = + HeapStr.write( + p, x0, a_2); + log_event("JsInterpreter.js", 885, ctx_push(ctx_169, [{key: "#RETURN_VALUE#", val: _return_389}]), "return"); + return (_return_389); + }()) + ; + log_event("JsInterpreter.js", 887, ctx_push(ctx_169, [{key: "#RETURN_VALUE#", val: _return_390}]), "return"); + return (_return_390); + }); + log_event("JsInterpreter.js", 889, ctx_push(ctx_168, [{key: "#RETURN_VALUE#", val: _return_391}]), "return"); + return (_return_391); + }()), function(s3) { + + var ctx_170 = ctx_push(ctx_168, [{key: "s3", val: s3}]); + log_event("JsInterpreter.js", 894, ctx_170, "let"); + var _return_392 = + res_ter(s3, + res_val( + Coq_value_prim( + Coq_prim_bool( + true)))); + log_event("JsInterpreter.js", 891, ctx_push(ctx_170, [{key: "#RETURN_VALUE#", val: _return_392}]), "return"); + return (_return_392); + }); + log_event("JsInterpreter.js", 895, ctx_push(ctx_168, [{key: "#RETURN_VALUE#", val: _return_393}]), "return"); + return (_return_393); + + }; + var ctx_171 = ctx_push(ctx_166, [{key: "object_define_own_prop_write", val: object_define_own_prop_write}]); + log_event("JsInterpreter.js", 1013, ctx_171, "let"); + var _if_arg_394 = (function () { + log_event("JsInterpreter.js", 901, ctx_171, "call"); + var _return_396 = + descriptor_contains_dec( + (function () { + log_event("JsInterpreter.js", 899, ctx_171, "call"); + var _return_395 = + descriptor_of_attributes( + a); + log_event("JsInterpreter.js", 898, ctx_push(ctx_171, [{key: "#RETURN_VALUE#", val: _return_395}]), "return"); + return (_return_395); + }()), desc0); + log_event("JsInterpreter.js", 900, ctx_push(ctx_171, [{key: "#RETURN_VALUE#", val: _return_396}]), "return"); + return (_return_396); + }()) + ; + log_event("JsInterpreter.js", 1012, ctx_171, "if"); + if (_if_arg_394) { + var _return_455 = + res_ter(s1, + res_val( + Coq_value_prim( + Coq_prim_bool( + true)))); + log_event("JsInterpreter.js", 1011, ctx_push(ctx_171, [{key: "#RETURN_VALUE#", val: _return_455}]), "return"); + return (_return_455); + } else { + var _if_arg_397 = (function () { + log_event("JsInterpreter.js", 903, ctx_171, "call"); + var _return_398 = + attributes_change_enumerable_on_non_configurable_dec( + a, desc0); + log_event("JsInterpreter.js", 902, ctx_push(ctx_171, [{key: "#RETURN_VALUE#", val: _return_398}]), "return"); + return (_return_398); + }()) + ; + log_event("JsInterpreter.js", 1010, ctx_171, "if"); + if (_if_arg_397) { + var _return_454 = (function () { + log_event("JsInterpreter.js", 1008, ctx_171, "call"); + var _return_453 = + reject(s1, + throwcont0); + log_event("JsInterpreter.js", 1007, ctx_push(ctx_171, [{key: "#RETURN_VALUE#", val: _return_453}]), "return"); + return (_return_453); + }()) + ; + log_event("JsInterpreter.js", 1009, ctx_push(ctx_171, [{key: "#RETURN_VALUE#", val: _return_454}]), "return"); + return (_return_454); + } else { + var _if_arg_399 = (function () { + log_event("JsInterpreter.js", 905, ctx_171, "call"); + var _return_400 = + descriptor_is_generic_dec( + desc0); + log_event("JsInterpreter.js", 904, ctx_push(ctx_171, [{key: "#RETURN_VALUE#", val: _return_400}]), "return"); + return (_return_400); + }()) + ; + log_event("JsInterpreter.js", 1006, ctx_171, "if"); + if (_if_arg_399) { + var _return_452 = (function () { + log_event("JsInterpreter.js", 1004, ctx_171, "call"); + var _return_451 = + object_define_own_prop_write( + s1, a); + log_event("JsInterpreter.js", 1003, ctx_push(ctx_171, [{key: "#RETURN_VALUE#", val: _return_451}]), "return"); + return (_return_451); + }()) + ; + log_event("JsInterpreter.js", 1005, ctx_push(ctx_171, [{key: "#RETURN_VALUE#", val: _return_452}]), "return"); + return (_return_452); + } else { + var _if_arg_401 = (function () { + log_event("JsInterpreter.js", 913, ctx_171, "call"); + var _return_405 = + !((function () { + log_event("JsInterpreter.js", 911, ctx_171, "call"); + var _return_404 = + bool_eq( + (function () { + log_event("JsInterpreter.js", 907, ctx_171, "call"); + var _return_402 = + attributes_is_data_dec( + a); + log_event("JsInterpreter.js", 906, ctx_push(ctx_171, [{key: "#RETURN_VALUE#", val: _return_402}]), "return"); + return (_return_402); + }()), + (function () { + log_event("JsInterpreter.js", 909, ctx_171, "call"); + var _return_403 = + descriptor_is_data_dec( + desc0); + log_event("JsInterpreter.js", 908, ctx_push(ctx_171, [{key: "#RETURN_VALUE#", val: _return_403}]), "return"); + return (_return_403); + }())); + log_event("JsInterpreter.js", 910, ctx_push(ctx_171, [{key: "#RETURN_VALUE#", val: _return_404}]), "return"); + return (_return_404); + }())); + log_event("JsInterpreter.js", 912, ctx_push(ctx_171, [{key: "#RETURN_VALUE#", val: _return_405}]), "return"); + return (_return_405); + }()) + ; + log_event("JsInterpreter.js", 1002, ctx_171, "if"); + if (_if_arg_401) { + var _if_arg_439 = (function () { + log_event("JsInterpreter.js", 976, ctx_171, "call"); + var _return_440 = + attributes_configurable( + a); + log_event("JsInterpreter.js", 975, ctx_push(ctx_171, [{key: "#RETURN_VALUE#", val: _return_440}]), "return"); + return (_return_440); + }()) + ; + log_event("JsInterpreter.js", 1001, ctx_171, "if"); + if (_if_arg_439) { + log_event("JsInterpreter.js", 986, ctx_171, "switch"); + switch (a.tag) { + case "Coq_attributes_data_of": + var ad = a.value;var ctx_179 = ctx_push(ctx_171, [{key: "ad", val: ad}]); + log_event("JsInterpreter.js", 982, ctx_179, "case"); + + var a_2 = + Coq_attributes_accessor_of( + (function () { + log_event("JsInterpreter.js", 981, ctx_179, "call"); + var _return_443 = + attributes_accessor_of_attributes_data( + ad); + log_event("JsInterpreter.js", 980, ctx_push(ctx_179, [{key: "#RETURN_VALUE#", val: _return_443}]), "return"); + return (_return_443); + }())); + break; + case "Coq_attributes_accessor_of": + var aa = a.value;var ctx_180 = ctx_push(ctx_171, [{key: "aa", val: aa}]); + log_event("JsInterpreter.js", 985, ctx_180, "case"); + + var a_2 = + Coq_attributes_data_of( + (function () { + log_event("JsInterpreter.js", 984, ctx_180, "call"); + var _return_444 = + attributes_data_of_attributes_accessor( + aa); + log_event("JsInterpreter.js", 983, ctx_push(ctx_180, [{key: "#RETURN_VALUE#", val: _return_444}]), "return"); + return (_return_444); + }())); + break; + } + + var ctx_181 = ctx_push(ctx_171, [{key: "a_2", val: a_2}]); + log_event("JsInterpreter.js", 1000, ctx_181, "let"); + var _return_450 = + if_some( + (function () { + log_event("JsInterpreter.js", 992, ctx_181, "call"); + var _return_447 = + object_heap_map_properties_pickable_option( + s1, l, + function (p) { + var ctx_182 = ctx_push(ctx_181, [{key: "p", val: p}]); + log_event("JsInterpreter.js", 990, ctx_182, "enter"); + var _return_446 = (function () { + log_event("JsInterpreter.js", 988, ctx_182, "call"); + var _return_445 = + HeapStr.write( + p, x0, + a_2); + log_event("JsInterpreter.js", 987, ctx_push(ctx_182, [{key: "#RETURN_VALUE#", val: _return_445}]), "return"); + return (_return_445); + }()) + ; + log_event("JsInterpreter.js", 989, ctx_push(ctx_182, [{key: "#RETURN_VALUE#", val: _return_446}]), "return"); + return (_return_446); + }); + log_event("JsInterpreter.js", 991, ctx_push(ctx_181, [{key: "#RETURN_VALUE#", val: _return_447}]), "return"); + return (_return_447); + }()), + function(s2) { + + var ctx_183 = ctx_push(ctx_181, [{key: "s2", val: s2}]); + log_event("JsInterpreter.js", 998, ctx_183, "let"); + var _return_449 = (function () { + log_event("JsInterpreter.js", 994, ctx_183, "call"); + var _return_448 = + object_define_own_prop_write( + s2, a_2); + log_event("JsInterpreter.js", 993, ctx_push(ctx_183, [{key: "#RETURN_VALUE#", val: _return_448}]), "return"); + return (_return_448); + }()) + ; + log_event("JsInterpreter.js", 995, ctx_push(ctx_183, [{key: "#RETURN_VALUE#", val: _return_449}]), "return"); + return (_return_449); + }); + log_event("JsInterpreter.js", 999, ctx_push(ctx_181, [{key: "#RETURN_VALUE#", val: _return_450}]), "return"); + return (_return_450); + + } else { + var _return_442 = (function () { + log_event("JsInterpreter.js", 978, ctx_171, "call"); + var _return_441 = + reject(s1, + throwcont0); + log_event("JsInterpreter.js", 977, ctx_push(ctx_171, [{key: "#RETURN_VALUE#", val: _return_441}]), "return"); + return (_return_441); + }()) + ; + log_event("JsInterpreter.js", 979, ctx_push(ctx_171, [{key: "#RETURN_VALUE#", val: _return_442}]), "return"); + return (_return_442); + } + } else { + var _if_arg_406 = (function () { + log_event("JsInterpreter.js", 919, ctx_171, "call"); + var _return_409 = + ((function () { + log_event("JsInterpreter.js", 915, ctx_171, "call"); + var _return_407 = + attributes_is_data_dec( + a); + log_event("JsInterpreter.js", 914, ctx_push(ctx_171, [{key: "#RETURN_VALUE#", val: _return_407}]), "return"); + return (_return_407); + }()) + && (function () { + log_event("JsInterpreter.js", 917, ctx_171, "call"); + var _return_408 = + descriptor_is_data_dec( + desc0); + log_event("JsInterpreter.js", 916, ctx_push(ctx_171, [{key: "#RETURN_VALUE#", val: _return_408}]), "return"); + return (_return_408); + }())); + log_event("JsInterpreter.js", 918, ctx_push(ctx_171, [{key: "#RETURN_VALUE#", val: _return_409}]), "return"); + return (_return_409); + }()) + ; + log_event("JsInterpreter.js", 974, ctx_171, "if"); + if (_if_arg_406) { + log_event("JsInterpreter.js", 973, ctx_171, "switch"); + switch (a.tag) { + case "Coq_attributes_data_of": + var ad = a.value;var ctx_176 = ctx_push(ctx_171, [{key: "ad", val: ad}]); + log_event("JsInterpreter.js", 964, ctx_176, "case"); + + var _if_arg_429 = (function () { + log_event("JsInterpreter.js", 956, ctx_176, "call"); + var _return_430 = + attributes_change_data_on_non_configurable_dec( + ad, + desc0); + log_event("JsInterpreter.js", 955, ctx_push(ctx_176, [{key: "#RETURN_VALUE#", val: _return_430}]), "return"); + return (_return_430); + }()) + ; + log_event("JsInterpreter.js", 963, ctx_176, "if"); + if (_if_arg_429) { + var _return_434 = (function () { + log_event("JsInterpreter.js", 961, ctx_176, "call"); + var _return_433 = + reject( + s1, + throwcont0); + log_event("JsInterpreter.js", 960, ctx_push(ctx_176, [{key: "#RETURN_VALUE#", val: _return_433}]), "return"); + return (_return_433); + }()) + ; + log_event("JsInterpreter.js", 962, ctx_push(ctx_176, [{key: "#RETURN_VALUE#", val: _return_434}]), "return"); + return (_return_434); + } else { + var _return_432 = (function () { + log_event("JsInterpreter.js", 958, ctx_176, "call"); + var _return_431 = + object_define_own_prop_write( + s1, a); + log_event("JsInterpreter.js", 957, ctx_push(ctx_176, [{key: "#RETURN_VALUE#", val: _return_431}]), "return"); + return (_return_431); + }()) + ; + log_event("JsInterpreter.js", 959, ctx_push(ctx_176, [{key: "#RETURN_VALUE#", val: _return_432}]), "return"); + return (_return_432); + } + case "Coq_attributes_accessor_of": + var a0 = a.value;var ctx_177 = ctx_push(ctx_171, [{key: "a0", val: a0}]); + log_event("JsInterpreter.js", 972, ctx_177, "case"); + + var _return_438 = (function () { + log_event("JsInterpreter.js", 970, ctx_177, "call"); + var _return_437 = + function (s, m) { + var ctx_178 = ctx_push(ctx_177, [{key: "s", val: s}, {key: "m", val: m}]); + log_event("JsInterpreter.js", 968, ctx_178, "enter"); + (function () { + log_event("JsInterpreter.js", 967, ctx_178, "call"); + var _return_436 = + Debug.impossible_with_heap_because( + __LOC__, + s, m); + log_event("JsInterpreter.js", 966, ctx_push(ctx_178, [{key: "#RETURN_VALUE#", val: _return_436}]), "return"); + return (_return_436); + }()) + ; + var _return_435 = + Coq_result_impossible( + ); + log_event("JsInterpreter.js", 965, ctx_push(ctx_178, [{key: "#RETURN_VALUE#", val: _return_435}]), "return"); + return (_return_435); + }(s0, + "data is not accessor in [defineOwnProperty]"); + log_event("JsInterpreter.js", 969, ctx_push(ctx_177, [{key: "#RETURN_VALUE#", val: _return_437}]), "return"); + return (_return_437); + }()) + ; + log_event("JsInterpreter.js", 971, ctx_push(ctx_177, [{key: "#RETURN_VALUE#", val: _return_438}]), "return"); + return (_return_438); + } + + } else { + var _if_arg_410 = (function () { + log_event("JsInterpreter.js", 927, ctx_171, "call"); + var _return_414 = + ((function () { + log_event("JsInterpreter.js", 923, ctx_171, "call"); + var _return_412 = + !( + (function () { + log_event("JsInterpreter.js", 921, ctx_171, "call"); + var _return_411 = + attributes_is_data_dec( + a); + log_event("JsInterpreter.js", 920, ctx_push(ctx_171, [{key: "#RETURN_VALUE#", val: _return_411}]), "return"); + return (_return_411); + }())); + log_event("JsInterpreter.js", 922, ctx_push(ctx_171, [{key: "#RETURN_VALUE#", val: _return_412}]), "return"); + return (_return_412); + }()) + && (function () { + log_event("JsInterpreter.js", 925, ctx_171, "call"); + var _return_413 = + descriptor_is_accessor_dec( + desc0); + log_event("JsInterpreter.js", 924, ctx_push(ctx_171, [{key: "#RETURN_VALUE#", val: _return_413}]), "return"); + return (_return_413); + }())); + log_event("JsInterpreter.js", 926, ctx_push(ctx_171, [{key: "#RETURN_VALUE#", val: _return_414}]), "return"); + return (_return_414); + }()) + ; + log_event("JsInterpreter.js", 954, ctx_171, "if"); + if (_if_arg_410) { + log_event("JsInterpreter.js", 953, ctx_171, "switch"); + switch (a.tag) { + case "Coq_attributes_data_of": + var a0 = a.value;var ctx_173 = ctx_push(ctx_171, [{key: "a0", val: a0}]); + log_event("JsInterpreter.js", 942, ctx_173, "case"); + + var _return_422 = (function () { + log_event("JsInterpreter.js", 940, ctx_173, "call"); + var _return_421 = + function (s, m) { + var ctx_174 = ctx_push(ctx_173, [{key: "s", val: s}, {key: "m", val: m}]); + log_event("JsInterpreter.js", 938, ctx_174, "enter"); + (function () { + log_event("JsInterpreter.js", 937, ctx_174, "call"); + var _return_420 = + Debug.impossible_with_heap_because( + __LOC__, + s, m); + log_event("JsInterpreter.js", 936, ctx_push(ctx_174, [{key: "#RETURN_VALUE#", val: _return_420}]), "return"); + return (_return_420); + }()) + ; + var _return_419 = + Coq_result_impossible( + ); + log_event("JsInterpreter.js", 935, ctx_push(ctx_174, [{key: "#RETURN_VALUE#", val: _return_419}]), "return"); + return (_return_419); + }(s0, + "accessor is not data in [defineOwnProperty]"); + log_event("JsInterpreter.js", 939, ctx_push(ctx_173, [{key: "#RETURN_VALUE#", val: _return_421}]), "return"); + return (_return_421); + }()) + ; + log_event("JsInterpreter.js", 941, ctx_push(ctx_173, [{key: "#RETURN_VALUE#", val: _return_422}]), "return"); + return (_return_422); + case "Coq_attributes_accessor_of": + var aa = a.value;var ctx_175 = ctx_push(ctx_171, [{key: "aa", val: aa}]); + log_event("JsInterpreter.js", 952, ctx_175, "case"); + + var _if_arg_423 = (function () { + log_event("JsInterpreter.js", 944, ctx_175, "call"); + var _return_424 = + attributes_change_accessor_on_non_configurable_dec( + aa, + desc0); + log_event("JsInterpreter.js", 943, ctx_push(ctx_175, [{key: "#RETURN_VALUE#", val: _return_424}]), "return"); + return (_return_424); + }()) + ; + log_event("JsInterpreter.js", 951, ctx_175, "if"); + if (_if_arg_423) { + var _return_428 = (function () { + log_event("JsInterpreter.js", 949, ctx_175, "call"); + var _return_427 = + reject( + s1, + throwcont0); + log_event("JsInterpreter.js", 948, ctx_push(ctx_175, [{key: "#RETURN_VALUE#", val: _return_427}]), "return"); + return (_return_427); + }()) + ; + log_event("JsInterpreter.js", 950, ctx_push(ctx_175, [{key: "#RETURN_VALUE#", val: _return_428}]), "return"); + return (_return_428); + } else { + var _return_426 = (function () { + log_event("JsInterpreter.js", 946, ctx_175, "call"); + var _return_425 = + object_define_own_prop_write( + s1, a); + log_event("JsInterpreter.js", 945, ctx_push(ctx_175, [{key: "#RETURN_VALUE#", val: _return_425}]), "return"); + return (_return_425); + }()) + ; + log_event("JsInterpreter.js", 947, ctx_push(ctx_175, [{key: "#RETURN_VALUE#", val: _return_426}]), "return"); + return (_return_426); + } + } + + } else { + var _return_418 = (function () { + log_event("JsInterpreter.js", 933, ctx_171, "call"); + var _return_417 = + function (s, m) { + var ctx_172 = ctx_push(ctx_171, [{key: "s", val: s}, {key: "m", val: m}]); + log_event("JsInterpreter.js", 931, ctx_172, "enter"); + (function () { + log_event("JsInterpreter.js", 930, ctx_172, "call"); + var _return_416 = + Debug.impossible_with_heap_because( + __LOC__, + s, m); + log_event("JsInterpreter.js", 929, ctx_push(ctx_172, [{key: "#RETURN_VALUE#", val: _return_416}]), "return"); + return (_return_416); + }()) + ; + var _return_415 = + Coq_result_impossible( + ); + log_event("JsInterpreter.js", 928, ctx_push(ctx_172, [{key: "#RETURN_VALUE#", val: _return_415}]), "return"); + return (_return_415); + }(s0, + "cases are mutually exclusives in [defineOwnProperty]"); + log_event("JsInterpreter.js", 932, ctx_push(ctx_171, [{key: "#RETURN_VALUE#", val: _return_417}]), "return"); + return (_return_417); + }()) + ; + log_event("JsInterpreter.js", 934, ctx_push(ctx_171, [{key: "#RETURN_VALUE#", val: _return_418}]), "return"); + return (_return_418); + } + } + } + } + } + } + + } + + }); + log_event("JsInterpreter.js", 1019, ctx_push(ctx_161, [{key: "#RETURN_VALUE#", val: _return_456}]), "return"); + return (_return_456); + }); + log_event("JsInterpreter.js", 1023, ctx_push(ctx_160, [{key: "#RETURN_VALUE#", val: _return_457}]), "return"); + return (_return_457); + }; + var ctx_184 = ctx_push(ctx_159, [{key: "def", val: def}]); + log_event("JsInterpreter.js", 1288, ctx_184, "let"); + var _return_573 = if_some((function () { + log_event("JsInterpreter.js", 1026, ctx_184, "call"); + var _return_458 = run_object_method( + object_define_own_prop_, s, l); + log_event("JsInterpreter.js", 1025, ctx_push(ctx_184, [{key: "#RETURN_VALUE#", val: _return_458}]), "return"); + return (_return_458); }()), function(b) { + + var ctx_185 = ctx_push(ctx_184, [{key: "b", val: b}]); + log_event("JsInterpreter.js", 1286, ctx_185, "let"); + log_event("JsInterpreter.js", 1283, ctx_185, "switch"); + switch (b.tag) { + case "Coq_builtin_define_own_prop_default":log_event("JsInterpreter.js", 1030, ctx_185, "case"); + + var _return_460 = (function () { + log_event("JsInterpreter.js", 1028, ctx_185, "call"); + var _return_459 = def(s, x, desc, throwcont); + log_event("JsInterpreter.js", 1027, ctx_push(ctx_185, [{key: "#RETURN_VALUE#", val: _return_459}]), "return"); + return (_return_459); + }()) + ; + log_event("JsInterpreter.js", 1029, ctx_push(ctx_185, [{key: "#RETURN_VALUE#", val: _return_460}]), "return"); + return (_return_460); + case "Coq_builtin_define_own_prop_array":log_event("JsInterpreter.js", 1202, ctx_185, "case"); + + var _return_539 = if_run((function () { + log_event("JsInterpreter.js", 1032, ctx_185, "call"); + var _return_461 = run_object_get_own_prop( + s, c, l, + "length"); + log_event("JsInterpreter.js", 1031, ctx_push(ctx_185, [{key: "#RETURN_VALUE#", val: _return_461}]), "return"); + return (_return_461); }()), + function(s0, d) { + + var ctx_186 = ctx_push(ctx_185, [{key: "s0", val: s0}, {key: "d", val: d}]); + log_event("JsInterpreter.js", 1200, ctx_186, "let"); + log_event("JsInterpreter.js", 1197, ctx_186, "switch"); + switch (d.tag) { + case "Coq_full_descriptor_undef":log_event("JsInterpreter.js", 1040, ctx_186, "case"); + + var _return_465 = (function () { + log_event("JsInterpreter.js", 1038, ctx_186, "call"); + var _return_464 = + function (s, m) { + var ctx_187 = ctx_push(ctx_186, [{key: "s", val: s}, {key: "m", val: m}]); + log_event("JsInterpreter.js", 1036, ctx_187, "enter"); + (function () { + log_event("JsInterpreter.js", 1035, ctx_187, "call"); + var _return_463 = + Debug.impossible_with_heap_because( + __LOC__, s, + m); + log_event("JsInterpreter.js", 1034, ctx_push(ctx_187, [{key: "#RETURN_VALUE#", val: _return_463}]), "return"); + return (_return_463); + }()) + ; + var _return_462 = + Coq_result_impossible( + ); + log_event("JsInterpreter.js", 1033, ctx_push(ctx_187, [{key: "#RETURN_VALUE#", val: _return_462}]), "return"); + return (_return_462); + }(s0, + "Array length property descriptor cannot be undefined."); + log_event("JsInterpreter.js", 1037, ctx_push(ctx_186, [{key: "#RETURN_VALUE#", val: _return_464}]), "return"); + return (_return_464); + }()) + ; + log_event("JsInterpreter.js", 1039, ctx_push(ctx_186, [{key: "#RETURN_VALUE#", val: _return_465}]), "return"); + return (_return_465); + case "Coq_full_descriptor_some": + var attr = d.value;var ctx_188 = ctx_push(ctx_186, [{key: "attr", val: attr}]); + log_event("JsInterpreter.js", 1196, ctx_188, "case"); + + log_event("JsInterpreter.js", 1195, ctx_188, "switch"); + switch (attr.tag) { + case "Coq_attributes_data_of": + var a = attr.value;var ctx_189 = ctx_push(ctx_188, [{key: "a", val: a}]); + log_event("JsInterpreter.js", 1186, ctx_189, "case"); + + var oldLen = a.attributes_data_value; + var ctx_190 = ctx_push(ctx_189, [{key: "oldLen", val: oldLen}]); + log_event("JsInterpreter.js", 1185, ctx_190, "let"); + log_event("JsInterpreter.js", 1184, ctx_190, "switch"); + switch (oldLen.tag) { + case "Coq_value_prim": + var w = oldLen.value;var ctx_191 = ctx_push(ctx_190, [{key: "w", val: w}]); + log_event("JsInterpreter.js", 1175, ctx_191, "case"); + + var oldLen0 = (function () { + log_event("JsInterpreter.js", 1044, ctx_191, "call"); + var _return_467 = + JsNumber.to_uint32( + (function () { + log_event("JsInterpreter.js", 1042, ctx_191, "call"); + var _return_466 = + convert_prim_to_number( + w); + log_event("JsInterpreter.js", 1041, ctx_push(ctx_191, [{key: "#RETURN_VALUE#", val: _return_466}]), "return"); + return (_return_466); + }())); + log_event("JsInterpreter.js", 1043, ctx_push(ctx_191, [{key: "#RETURN_VALUE#", val: _return_467}]), "return"); + return (_return_467); + }()) + ; + var ctx_192 = ctx_push(ctx_191, [{key: "oldLen0", val: oldLen0}]); + log_event("JsInterpreter.js", 1174, ctx_192, "let"); + var descValueOpt = desc.descriptor_value; + var ctx_193 = ctx_push(ctx_192, [{key: "descValueOpt", val: descValueOpt}]); + log_event("JsInterpreter.js", 1173, ctx_193, "let"); + var _if_arg_468 = (function () { + log_event("JsInterpreter.js", 1046, ctx_193, "call"); + var _return_469 = + string_eq(x, + "length"); + log_event("JsInterpreter.js", 1045, ctx_push(ctx_193, [{key: "#RETURN_VALUE#", val: _return_469}]), "return"); + return (_return_469); + }()) + ; + log_event("JsInterpreter.js", 1172, ctx_193, "if"); + if (_if_arg_468) { + log_event("JsInterpreter.js", 1171, ctx_193, "switch"); + switch (descValueOpt.tag) { + case "Some": + var descValue = descValueOpt.value;var ctx_199 = ctx_push(ctx_193, [{key: "descValue", val: descValue}]); + log_event("JsInterpreter.js", 1166, ctx_199, "case"); + + var _return_528 = + if_run( + (function () { + log_event("JsInterpreter.js", 1112, ctx_199, "call"); + var _return_502 = + to_uint32( + s0, c, + descValue); + log_event("JsInterpreter.js", 1111, ctx_push(ctx_199, [{key: "#RETURN_VALUE#", val: _return_502}]), "return"); + return (_return_502); + }()), + function(s1, + newLen) { + + var ctx_200 = ctx_push(ctx_199, [{key: "s1", val: s1}, {key: "newLen", val: newLen}]); + log_event("JsInterpreter.js", 1164, ctx_200, "let"); + var _return_527 = + if_number( + (function () { + log_event("JsInterpreter.js", 1114, ctx_200, "call"); + var _return_503 = + to_number( + s1, c, + descValue); + log_event("JsInterpreter.js", 1113, ctx_push(ctx_200, [{key: "#RETURN_VALUE#", val: _return_503}]), "return"); + return (_return_503); + }()), + function(s2, + newLenN) { + + var ctx_201 = ctx_push(ctx_200, [{key: "s2", val: s2}, {key: "newLenN", val: newLenN}]); + log_event("JsInterpreter.js", 1160, ctx_201, "let"); + var _if_arg_504 = (function () { + log_event("JsInterpreter.js", 1118, ctx_201, "call"); + var _return_506 = + !( + (function () { + log_event("JsInterpreter.js", 1116, ctx_201, "call"); + var _return_505 = + (newLen + === newLenN); + log_event("JsInterpreter.js", 1115, ctx_push(ctx_201, [{key: "#RETURN_VALUE#", val: _return_505}]), "return"); + return (_return_505); + }())); + log_event("JsInterpreter.js", 1117, ctx_push(ctx_201, [{key: "#RETURN_VALUE#", val: _return_506}]), "return"); + return (_return_506); + }()) + ; + log_event("JsInterpreter.js", 1157, ctx_201, "if"); + if (_if_arg_504) { + var _return_526 = (function () { + log_event("JsInterpreter.js", 1155, ctx_201, "call"); + var _return_525 = + run_error( + s2, + Coq_native_error_range( + )); + log_event("JsInterpreter.js", 1154, ctx_push(ctx_201, [{key: "#RETURN_VALUE#", val: _return_525}]), "return"); + return (_return_525); + }()) + ; + log_event("JsInterpreter.js", 1156, ctx_push(ctx_201, [{key: "#RETURN_VALUE#", val: _return_526}]), "return"); + return (_return_526); + } else { + var newLenDesc = + descriptor_with_value( + desc, + Some( + Coq_value_prim( + Coq_prim_number( + newLen)))); + var ctx_202 = ctx_push(ctx_201, [{key: "newLenDesc", val: newLenDesc}]); + log_event("JsInterpreter.js", 1153, ctx_202, "let"); + var _if_arg_507 = (function () { + log_event("JsInterpreter.js", 1120, ctx_202, "call"); + var _return_508 = + le_int_decidable( + oldLen0, + newLen); + log_event("JsInterpreter.js", 1119, ctx_push(ctx_202, [{key: "#RETURN_VALUE#", val: _return_508}]), "return"); + return (_return_508); + }()) + ; + log_event("JsInterpreter.js", 1152, ctx_202, "if"); + if (_if_arg_507) { + var _return_524 = (function () { + log_event("JsInterpreter.js", 1150, ctx_202, "call"); + var _return_523 = + def(s2, + "length", + newLenDesc, + throwcont); + log_event("JsInterpreter.js", 1149, ctx_push(ctx_202, [{key: "#RETURN_VALUE#", val: _return_523}]), "return"); + return (_return_523); + }()) + ; + log_event("JsInterpreter.js", 1151, ctx_push(ctx_202, [{key: "#RETURN_VALUE#", val: _return_524}]), "return"); + return (_return_524); + } else { + var _if_arg_509 = (function () { + log_event("JsInterpreter.js", 1122, ctx_202, "call"); + var _return_510 = + !( + a.attributes_data_writable); + log_event("JsInterpreter.js", 1121, ctx_push(ctx_202, [{key: "#RETURN_VALUE#", val: _return_510}]), "return"); + return (_return_510); + }()) + ; + log_event("JsInterpreter.js", 1148, ctx_202, "if"); + if (_if_arg_509) { + var _return_522 = (function () { + log_event("JsInterpreter.js", 1146, ctx_202, "call"); + var _return_521 = + reject( + s2, + throwcont); + log_event("JsInterpreter.js", 1145, ctx_push(ctx_202, [{key: "#RETURN_VALUE#", val: _return_521}]), "return"); + return (_return_521); + }()) + ; + log_event("JsInterpreter.js", 1147, ctx_push(ctx_202, [{key: "#RETURN_VALUE#", val: _return_522}]), "return"); + return (_return_522); + } else { + var _switch_arg_511 = newLenDesc.descriptor_writable; + log_event("JsInterpreter.js", 1126, ctx_202, "switch"); + switch (_switch_arg_511.tag) { + case "Some": + var b0 = _switch_arg_511.value;var ctx_203 = ctx_push(ctx_202, [{key: "b0", val: b0}]); + log_event("JsInterpreter.js", 1124, ctx_203, "case"); + + log_event("JsInterpreter.js", 1123, ctx_203, "if"); + if (b0) { + var newWritable = true; + } else { + var newWritable = false; + } + break; + case "None":log_event("JsInterpreter.js", 1125, ctx_202, "case"); + + var newWritable = true; + break; + } + + var ctx_204 = ctx_push(ctx_202, [{key: "newWritable", val: newWritable}]); + log_event("JsInterpreter.js", 1144, ctx_204, "let"); + var _if_arg_512 = (function () { + log_event("JsInterpreter.js", 1128, ctx_204, "call"); + var _return_513 = + !( + newWritable); + log_event("JsInterpreter.js", 1127, ctx_push(ctx_204, [{key: "#RETURN_VALUE#", val: _return_513}]), "return"); + return (_return_513); + }()) + ; + log_event("JsInterpreter.js", 1129, ctx_204, "if"); + if (_if_arg_512) { + var newLenDesc0 = + descriptor_with_writable( + newLenDesc, + Some( + true)); + } else { + var newLenDesc0 = newLenDesc; + } + var ctx_205 = ctx_push(ctx_204, [{key: "newLenDesc0", val: newLenDesc0}]); + log_event("JsInterpreter.js", 1143, ctx_205, "let"); + var _return_520 = + if_bool( + (function () { + log_event("JsInterpreter.js", 1131, ctx_205, "call"); + var _return_514 = + def(s2, + "length", + newLenDesc0, + throwcont); + log_event("JsInterpreter.js", 1130, ctx_push(ctx_205, [{key: "#RETURN_VALUE#", val: _return_514}]), "return"); + return (_return_514); + }()), + function(s3, + succ) { + + var ctx_206 = ctx_push(ctx_205, [{key: "s3", val: s3}, {key: "succ", val: succ}]); + log_event("JsInterpreter.js", 1141, ctx_206, "let"); + var _if_arg_515 = (function () { + log_event("JsInterpreter.js", 1133, ctx_206, "call"); + var _return_516 = + !(succ); + log_event("JsInterpreter.js", 1132, ctx_push(ctx_206, [{key: "#RETURN_VALUE#", val: _return_516}]), "return"); + return (_return_516); + }()) + ; + log_event("JsInterpreter.js", 1138, ctx_206, "if"); + if (_if_arg_515) { + var _return_519 = + res_ter( + s3, + res_val( + Coq_value_prim( + Coq_prim_bool( + false)))); + log_event("JsInterpreter.js", 1137, ctx_push(ctx_206, [{key: "#RETURN_VALUE#", val: _return_519}]), "return"); + return (_return_519); + } else { + var _return_518 = (function () { + log_event("JsInterpreter.js", 1135, ctx_206, "call"); + var _return_517 = + run_object_define_own_prop_array_loop( + s3, c, l, + newLen, + oldLen0, + newLenDesc0, + newWritable, + throwcont, + def); + log_event("JsInterpreter.js", 1134, ctx_push(ctx_206, [{key: "#RETURN_VALUE#", val: _return_517}]), "return"); + return (_return_517); + }()) + ; + log_event("JsInterpreter.js", 1136, ctx_push(ctx_206, [{key: "#RETURN_VALUE#", val: _return_518}]), "return"); + return (_return_518); + } + }); + log_event("JsInterpreter.js", 1142, ctx_push(ctx_205, [{key: "#RETURN_VALUE#", val: _return_520}]), "return"); + return (_return_520); + + + } + } + + } + }); + log_event("JsInterpreter.js", 1161, ctx_push(ctx_200, [{key: "#RETURN_VALUE#", val: _return_527}]), "return"); + return (_return_527); + }); + log_event("JsInterpreter.js", 1165, ctx_push(ctx_199, [{key: "#RETURN_VALUE#", val: _return_528}]), "return"); + return (_return_528); + case "None":log_event("JsInterpreter.js", 1170, ctx_193, "case"); + + var _return_530 = (function () { + log_event("JsInterpreter.js", 1168, ctx_193, "call"); + var _return_529 = + def(s0, + "length", + desc, + throwcont); + log_event("JsInterpreter.js", 1167, ctx_push(ctx_193, [{key: "#RETURN_VALUE#", val: _return_529}]), "return"); + return (_return_529); + }()) + ; + log_event("JsInterpreter.js", 1169, ctx_push(ctx_193, [{key: "#RETURN_VALUE#", val: _return_530}]), "return"); + return (_return_530); + } + + } else { + var _return_501 = + if_run( + (function () { + log_event("JsInterpreter.js", 1048, ctx_193, "call"); + var _return_470 = + to_uint32( + s0, c, + Coq_value_prim( + Coq_prim_string( + x))); + log_event("JsInterpreter.js", 1047, ctx_push(ctx_193, [{key: "#RETURN_VALUE#", val: _return_470}]), "return"); + return (_return_470); + }()), + function(s1, + ilen) { + + var ctx_194 = ctx_push(ctx_193, [{key: "s1", val: s1}, {key: "ilen", val: ilen}]); + log_event("JsInterpreter.js", 1109, ctx_194, "let"); + var _return_500 = + if_string( + (function () { + log_event("JsInterpreter.js", 1050, ctx_194, "call"); + var _return_471 = + to_string( + s1, c, + Coq_value_prim( + Coq_prim_number( + ilen))); + log_event("JsInterpreter.js", 1049, ctx_push(ctx_194, [{key: "#RETURN_VALUE#", val: _return_471}]), "return"); + return (_return_471); + }()), + function(s2, + slen) { + + var ctx_195 = ctx_push(ctx_194, [{key: "s2", val: s2}, {key: "slen", val: slen}]); + log_event("JsInterpreter.js", 1105, ctx_195, "let"); + var _if_arg_472 = (function () { + log_event("JsInterpreter.js", 1058, ctx_195, "call"); + var _return_476 = + ((function () { + log_event("JsInterpreter.js", 1052, ctx_195, "call"); + var _return_473 = + string_eq( + x, slen); + log_event("JsInterpreter.js", 1051, ctx_push(ctx_195, [{key: "#RETURN_VALUE#", val: _return_473}]), "return"); + return (_return_473); + }()) + && (function () { + log_event("JsInterpreter.js", 1056, ctx_195, "call"); + var _return_475 = + !( + (function () { + log_event("JsInterpreter.js", 1054, ctx_195, "call"); + var _return_474 = + (ilen + == 4294967295.); + log_event("JsInterpreter.js", 1053, ctx_push(ctx_195, [{key: "#RETURN_VALUE#", val: _return_474}]), "return"); + return (_return_474); + }())); + log_event("JsInterpreter.js", 1055, ctx_push(ctx_195, [{key: "#RETURN_VALUE#", val: _return_475}]), "return"); + return (_return_475); + }())); + log_event("JsInterpreter.js", 1057, ctx_push(ctx_195, [{key: "#RETURN_VALUE#", val: _return_476}]), "return"); + return (_return_476); + }()) + ; + log_event("JsInterpreter.js", 1102, ctx_195, "if"); + if (_if_arg_472) { + var _return_499 = + if_run( + (function () { + log_event("JsInterpreter.js", 1063, ctx_195, "call"); + var _return_479 = + to_uint32( + s2, c, + Coq_value_prim( + Coq_prim_string( + x))); + log_event("JsInterpreter.js", 1062, ctx_push(ctx_195, [{key: "#RETURN_VALUE#", val: _return_479}]), "return"); + return (_return_479); + }()), + function(s3, + index) { + + var ctx_196 = ctx_push(ctx_195, [{key: "s3", val: s3}, {key: "index", val: index}]); + log_event("JsInterpreter.js", 1100, ctx_196, "let"); + var _if_arg_480 = (function () { + log_event("JsInterpreter.js", 1069, ctx_196, "call"); + var _return_483 = + ((function () { + log_event("JsInterpreter.js", 1065, ctx_196, "call"); + var _return_481 = + le_int_decidable( + oldLen0, + index); + log_event("JsInterpreter.js", 1064, ctx_push(ctx_196, [{key: "#RETURN_VALUE#", val: _return_481}]), "return"); + return (_return_481); + }()) + && (function () { + log_event("JsInterpreter.js", 1067, ctx_196, "call"); + var _return_482 = + !( + a.attributes_data_writable); + log_event("JsInterpreter.js", 1066, ctx_push(ctx_196, [{key: "#RETURN_VALUE#", val: _return_482}]), "return"); + return (_return_482); + }())); + log_event("JsInterpreter.js", 1068, ctx_push(ctx_196, [{key: "#RETURN_VALUE#", val: _return_483}]), "return"); + return (_return_483); + }()) + ; + log_event("JsInterpreter.js", 1097, ctx_196, "if"); + if (_if_arg_480) { + var _return_498 = (function () { + log_event("JsInterpreter.js", 1095, ctx_196, "call"); + var _return_497 = + reject( + s3, + throwcont); + log_event("JsInterpreter.js", 1094, ctx_push(ctx_196, [{key: "#RETURN_VALUE#", val: _return_497}]), "return"); + return (_return_497); + }()) + ; + log_event("JsInterpreter.js", 1096, ctx_push(ctx_196, [{key: "#RETURN_VALUE#", val: _return_498}]), "return"); + return (_return_498); + } else { + var _return_496 = + if_bool( + (function () { + log_event("JsInterpreter.js", 1071, ctx_196, "call"); + var _return_484 = + def(s3, + x, desc, + false); + log_event("JsInterpreter.js", 1070, ctx_push(ctx_196, [{key: "#RETURN_VALUE#", val: _return_484}]), "return"); + return (_return_484); + }()), + function(s4, + b0) { + + var ctx_197 = ctx_push(ctx_196, [{key: "s4", val: s4}, {key: "b0", val: b0}]); + log_event("JsInterpreter.js", 1092, ctx_197, "let"); + var _if_arg_485 = (function () { + log_event("JsInterpreter.js", 1073, ctx_197, "call"); + var _return_486 = + !(b0); + log_event("JsInterpreter.js", 1072, ctx_push(ctx_197, [{key: "#RETURN_VALUE#", val: _return_486}]), "return"); + return (_return_486); + }()) + ; + log_event("JsInterpreter.js", 1089, ctx_197, "if"); + if (_if_arg_485) { + var _return_495 = (function () { + log_event("JsInterpreter.js", 1087, ctx_197, "call"); + var _return_494 = + reject( + s4, + throwcont); + log_event("JsInterpreter.js", 1086, ctx_push(ctx_197, [{key: "#RETURN_VALUE#", val: _return_494}]), "return"); + return (_return_494); + }()) + ; + log_event("JsInterpreter.js", 1088, ctx_push(ctx_197, [{key: "#RETURN_VALUE#", val: _return_495}]), "return"); + return (_return_495); + } else { + var _if_arg_487 = (function () { + log_event("JsInterpreter.js", 1075, ctx_197, "call"); + var _return_488 = + le_int_decidable( + oldLen0, + index); + log_event("JsInterpreter.js", 1074, ctx_push(ctx_197, [{key: "#RETURN_VALUE#", val: _return_488}]), "return"); + return (_return_488); + }()) + ; + log_event("JsInterpreter.js", 1085, ctx_197, "if"); + if (_if_arg_487) { + var a0 = + descriptor_with_value( + (function () { + log_event("JsInterpreter.js", 1078, ctx_197, "call"); + var _return_490 = + descriptor_of_attributes( + Coq_attributes_data_of( + a)); + log_event("JsInterpreter.js", 1077, ctx_push(ctx_197, [{key: "#RETURN_VALUE#", val: _return_490}]), "return"); + return (_return_490); + }()), + Some( + Coq_value_prim( + Coq_prim_number( + (function () { + log_event("JsInterpreter.js", 1080, ctx_197, "call"); + var _return_491 = + (index + + 1.); + log_event("JsInterpreter.js", 1079, ctx_push(ctx_197, [{key: "#RETURN_VALUE#", val: _return_491}]), "return"); + return (_return_491); + }()))))); + var ctx_198 = ctx_push(ctx_197, [{key: "a0", val: a0}]); + log_event("JsInterpreter.js", 1084, ctx_198, "let"); + var _return_493 = (function () { + log_event("JsInterpreter.js", 1082, ctx_198, "call"); + var _return_492 = + def(s4, + "length", + a0, + false); + log_event("JsInterpreter.js", 1081, ctx_push(ctx_198, [{key: "#RETURN_VALUE#", val: _return_492}]), "return"); + return (_return_492); + }()) + ; + log_event("JsInterpreter.js", 1083, ctx_push(ctx_198, [{key: "#RETURN_VALUE#", val: _return_493}]), "return"); + return (_return_493); + + } else { + var _return_489 = + res_ter( + s4, + res_val( + Coq_value_prim( + Coq_prim_bool( + true)))); + log_event("JsInterpreter.js", 1076, ctx_push(ctx_197, [{key: "#RETURN_VALUE#", val: _return_489}]), "return"); + return (_return_489); + } + } + }); + log_event("JsInterpreter.js", 1093, ctx_push(ctx_196, [{key: "#RETURN_VALUE#", val: _return_496}]), "return"); + return (_return_496); + } + }); + log_event("JsInterpreter.js", 1101, ctx_push(ctx_195, [{key: "#RETURN_VALUE#", val: _return_499}]), "return"); + return (_return_499); + } else { + var _return_478 = (function () { + log_event("JsInterpreter.js", 1060, ctx_195, "call"); + var _return_477 = + def(s2, + x, desc, + throwcont); + log_event("JsInterpreter.js", 1059, ctx_push(ctx_195, [{key: "#RETURN_VALUE#", val: _return_477}]), "return"); + return (_return_477); + }()) + ; + log_event("JsInterpreter.js", 1061, ctx_push(ctx_195, [{key: "#RETURN_VALUE#", val: _return_478}]), "return"); + return (_return_478); + } + }); + log_event("JsInterpreter.js", 1106, ctx_push(ctx_194, [{key: "#RETURN_VALUE#", val: _return_500}]), "return"); + return (_return_500); + }); + log_event("JsInterpreter.js", 1110, ctx_push(ctx_193, [{key: "#RETURN_VALUE#", val: _return_501}]), "return"); + return (_return_501); + } + + + case "Coq_value_object": + var l0 = oldLen.value;var ctx_207 = ctx_push(ctx_190, [{key: "l0", val: l0}]); + log_event("JsInterpreter.js", 1183, ctx_207, "case"); + + var _return_534 = (function () { + log_event("JsInterpreter.js", 1181, ctx_207, "call"); + var _return_533 = + function (s, m) { + var ctx_208 = ctx_push(ctx_207, [{key: "s", val: s}, {key: "m", val: m}]); + log_event("JsInterpreter.js", 1179, ctx_208, "enter"); + (function () { + log_event("JsInterpreter.js", 1178, ctx_208, "call"); + var _return_532 = + Debug.impossible_with_heap_because( + __LOC__, + s, m); + log_event("JsInterpreter.js", 1177, ctx_push(ctx_208, [{key: "#RETURN_VALUE#", val: _return_532}]), "return"); + return (_return_532); + }()) + ; + var _return_531 = + Coq_result_impossible( + ); + log_event("JsInterpreter.js", 1176, ctx_push(ctx_208, [{key: "#RETURN_VALUE#", val: _return_531}]), "return"); + return (_return_531); + }(s0, + "Spec asserts length of array is number."); + log_event("JsInterpreter.js", 1180, ctx_push(ctx_207, [{key: "#RETURN_VALUE#", val: _return_533}]), "return"); + return (_return_533); + }()) + ; + log_event("JsInterpreter.js", 1182, ctx_push(ctx_207, [{key: "#RETURN_VALUE#", val: _return_534}]), "return"); + return (_return_534); + } + + + case "Coq_attributes_accessor_of": + var a = attr.value;var ctx_209 = ctx_push(ctx_188, [{key: "a", val: a}]); + log_event("JsInterpreter.js", 1194, ctx_209, "case"); + + var _return_538 = (function () { + log_event("JsInterpreter.js", 1192, ctx_209, "call"); + var _return_537 = + function (s, m) { + var ctx_210 = ctx_push(ctx_209, [{key: "s", val: s}, {key: "m", val: m}]); + log_event("JsInterpreter.js", 1190, ctx_210, "enter"); + (function () { + log_event("JsInterpreter.js", 1189, ctx_210, "call"); + var _return_536 = + Debug.impossible_with_heap_because( + __LOC__, + s, m); + log_event("JsInterpreter.js", 1188, ctx_push(ctx_210, [{key: "#RETURN_VALUE#", val: _return_536}]), "return"); + return (_return_536); + }()) + ; + var _return_535 = + Coq_result_impossible( + ); + log_event("JsInterpreter.js", 1187, ctx_push(ctx_210, [{key: "#RETURN_VALUE#", val: _return_535}]), "return"); + return (_return_535); + }(s0, + "Array length property descriptor cannot be accessor."); + log_event("JsInterpreter.js", 1191, ctx_push(ctx_209, [{key: "#RETURN_VALUE#", val: _return_537}]), "return"); + return (_return_537); + }()) + ; + log_event("JsInterpreter.js", 1193, ctx_push(ctx_209, [{key: "#RETURN_VALUE#", val: _return_538}]), "return"); + return (_return_538); + } + + } + + }); + log_event("JsInterpreter.js", 1201, ctx_push(ctx_185, [{key: "#RETURN_VALUE#", val: _return_539}]), "return"); + return (_return_539); + case "Coq_builtin_define_own_prop_args_obj":log_event("JsInterpreter.js", 1282, ctx_185, "case"); + + var _return_572 = if_some((function () { + log_event("JsInterpreter.js", 1204, ctx_185, "call"); + var _return_540 = run_object_method( + object_parameter_map_, + s, l); + log_event("JsInterpreter.js", 1203, ctx_push(ctx_185, [{key: "#RETURN_VALUE#", val: _return_540}]), "return"); + return (_return_540); }()), + function(lmapo) { + + var ctx_211 = ctx_push(ctx_185, [{key: "lmapo", val: lmapo}]); + log_event("JsInterpreter.js", 1280, ctx_211, "let"); + var _return_571 = if_some( + lmapo, + function(lmap) { + + var ctx_212 = ctx_push(ctx_211, [{key: "lmap", val: lmap}]); + log_event("JsInterpreter.js", 1276, ctx_212, "let"); + var _return_570 = + if_run( + (function () { + log_event("JsInterpreter.js", 1206, ctx_212, "call"); + var _return_541 = + run_object_get_own_prop( + s, c, + lmap, x); + log_event("JsInterpreter.js", 1205, ctx_push(ctx_212, [{key: "#RETURN_VALUE#", val: _return_541}]), "return"); + return (_return_541); + }()), + function(s0, + d) { + + var ctx_213 = ctx_push(ctx_212, [{key: "s0", val: s0}, {key: "d", val: d}]); + log_event("JsInterpreter.js", 1272, ctx_213, "let"); + var _return_569 = + if_bool( + (function () { + log_event("JsInterpreter.js", 1208, ctx_213, "call"); + var _return_542 = + def(s0, + x, desc, + false); + log_event("JsInterpreter.js", 1207, ctx_push(ctx_213, [{key: "#RETURN_VALUE#", val: _return_542}]), "return"); + return (_return_542); + }()), + function(s1, + b0) { + + var ctx_214 = ctx_push(ctx_213, [{key: "s1", val: s1}, {key: "b0", val: b0}]); + log_event("JsInterpreter.js", 1268, ctx_214, "let"); + log_event("JsInterpreter.js", 1265, ctx_214, "if"); + if (b0) { + var follow = function (s2) { + var ctx_215 = ctx_push(ctx_214, [{key: "s2", val: s2}]); + log_event("JsInterpreter.js", 1213, ctx_215, "enter"); + var _return_545 = + res_ter( + s2, + res_val( + Coq_value_prim( + Coq_prim_bool( + true)))); + log_event("JsInterpreter.js", 1212, ctx_push(ctx_215, [{key: "#RETURN_VALUE#", val: _return_545}]), "return"); + return (_return_545); + }; + var ctx_216 = ctx_push(ctx_214, [{key: "follow", val: follow}]); + log_event("JsInterpreter.js", 1264, ctx_216, "let"); + log_event("JsInterpreter.js", 1263, ctx_216, "switch"); + switch (d.tag) { + case "Coq_full_descriptor_undef":log_event("JsInterpreter.js", 1217, ctx_216, "case"); + + var _return_547 = (function () { + log_event("JsInterpreter.js", 1215, ctx_216, "call"); + var _return_546 = + follow( + s1); + log_event("JsInterpreter.js", 1214, ctx_push(ctx_216, [{key: "#RETURN_VALUE#", val: _return_546}]), "return"); + return (_return_546); + }()) + ; + log_event("JsInterpreter.js", 1216, ctx_push(ctx_216, [{key: "#RETURN_VALUE#", val: _return_547}]), "return"); + return (_return_547); + case "Coq_full_descriptor_some": + var a = d.value;var ctx_217 = ctx_push(ctx_216, [{key: "a", val: a}]); + log_event("JsInterpreter.js", 1262, ctx_217, "case"); + + var _if_arg_548 = (function () { + log_event("JsInterpreter.js", 1219, ctx_217, "call"); + var _return_549 = + descriptor_is_accessor_dec( + desc); + log_event("JsInterpreter.js", 1218, ctx_push(ctx_217, [{key: "#RETURN_VALUE#", val: _return_549}]), "return"); + return (_return_549); + }()) + ; + log_event("JsInterpreter.js", 1261, ctx_217, "if"); + if (_if_arg_548) { + var _return_568 = + if_bool( + (function () { + log_event("JsInterpreter.js", 1253, ctx_217, "call"); + var _return_565 = + object_delete( + s1, c, + lmap, x, + false); + log_event("JsInterpreter.js", 1252, ctx_push(ctx_217, [{key: "#RETURN_VALUE#", val: _return_565}]), "return"); + return (_return_565); + }()), + function(s2, + x0) { + + var ctx_223 = ctx_push(ctx_217, [{key: "s2", val: s2}, {key: "x0", val: x0}]); + log_event("JsInterpreter.js", 1259, ctx_223, "let"); + var _return_567 = (function () { + log_event("JsInterpreter.js", 1255, ctx_223, "call"); + var _return_566 = + follow( + s2); + log_event("JsInterpreter.js", 1254, ctx_push(ctx_223, [{key: "#RETURN_VALUE#", val: _return_566}]), "return"); + return (_return_566); + }()) + ; + log_event("JsInterpreter.js", 1256, ctx_push(ctx_223, [{key: "#RETURN_VALUE#", val: _return_567}]), "return"); + return (_return_567); + }); + log_event("JsInterpreter.js", 1260, ctx_push(ctx_217, [{key: "#RETURN_VALUE#", val: _return_568}]), "return"); + return (_return_568); + } else { + var follow0 = function (s2) { + var ctx_218 = ctx_push(ctx_217, [{key: "s2", val: s2}]); + log_event("JsInterpreter.js", 1235, ctx_218, "enter"); + var _if_arg_550 = (function () { + log_event("JsInterpreter.js", 1221, ctx_218, "call"); + var _return_551 = + option_compare( + bool_eq, + desc.descriptor_writable, + Some( + false)); + log_event("JsInterpreter.js", 1220, ctx_push(ctx_218, [{key: "#RETURN_VALUE#", val: _return_551}]), "return"); + return (_return_551); + }()) + ; + log_event("JsInterpreter.js", 1234, ctx_218, "if"); + if (_if_arg_550) { + var _return_557 = + if_bool( + (function () { + log_event("JsInterpreter.js", 1226, ctx_218, "call"); + var _return_554 = + object_delete( + s2, c, + lmap, x, + false); + log_event("JsInterpreter.js", 1225, ctx_push(ctx_218, [{key: "#RETURN_VALUE#", val: _return_554}]), "return"); + return (_return_554); + }()), + function(s3, + x0) { + + var ctx_219 = ctx_push(ctx_218, [{key: "s3", val: s3}, {key: "x0", val: x0}]); + log_event("JsInterpreter.js", 1232, ctx_219, "let"); + var _return_556 = (function () { + log_event("JsInterpreter.js", 1228, ctx_219, "call"); + var _return_555 = + follow( + s3); + log_event("JsInterpreter.js", 1227, ctx_push(ctx_219, [{key: "#RETURN_VALUE#", val: _return_555}]), "return"); + return (_return_555); + }()) + ; + log_event("JsInterpreter.js", 1229, ctx_push(ctx_219, [{key: "#RETURN_VALUE#", val: _return_556}]), "return"); + return (_return_556); + }); + log_event("JsInterpreter.js", 1233, ctx_push(ctx_218, [{key: "#RETURN_VALUE#", val: _return_557}]), "return"); + return (_return_557); + } else { + var _return_553 = (function () { + log_event("JsInterpreter.js", 1223, ctx_218, "call"); + var _return_552 = + follow( + s2); + log_event("JsInterpreter.js", 1222, ctx_push(ctx_218, [{key: "#RETURN_VALUE#", val: _return_552}]), "return"); + return (_return_552); + }()) + ; + log_event("JsInterpreter.js", 1224, ctx_push(ctx_218, [{key: "#RETURN_VALUE#", val: _return_553}]), "return"); + return (_return_553); + } + }; + var ctx_220 = ctx_push(ctx_217, [{key: "follow0", val: follow0}]); + log_event("JsInterpreter.js", 1251, ctx_220, "let"); + var _switch_arg_558 = desc.descriptor_value; + log_event("JsInterpreter.js", 1250, ctx_220, "switch"); + switch (_switch_arg_558.tag) { + case "Some": + var v = _switch_arg_558.value;var ctx_221 = ctx_push(ctx_220, [{key: "v", val: v}]); + log_event("JsInterpreter.js", 1245, ctx_221, "case"); + + var _return_562 = + if_void( + (function () { + log_event("JsInterpreter.js", 1237, ctx_221, "call"); + var _return_559 = + object_put( + s1, c, + lmap, x, + v, + throwcont); + log_event("JsInterpreter.js", 1236, ctx_push(ctx_221, [{key: "#RETURN_VALUE#", val: _return_559}]), "return"); + return (_return_559); + }()), + function(s2) { + + var ctx_222 = ctx_push(ctx_221, [{key: "s2", val: s2}]); + log_event("JsInterpreter.js", 1243, ctx_222, "let"); + var _return_561 = (function () { + log_event("JsInterpreter.js", 1239, ctx_222, "call"); + var _return_560 = + follow0( + s2); + log_event("JsInterpreter.js", 1238, ctx_push(ctx_222, [{key: "#RETURN_VALUE#", val: _return_560}]), "return"); + return (_return_560); + }()) + ; + log_event("JsInterpreter.js", 1240, ctx_push(ctx_222, [{key: "#RETURN_VALUE#", val: _return_561}]), "return"); + return (_return_561); + }); + log_event("JsInterpreter.js", 1244, ctx_push(ctx_221, [{key: "#RETURN_VALUE#", val: _return_562}]), "return"); + return (_return_562); + case "None":log_event("JsInterpreter.js", 1249, ctx_220, "case"); + + var _return_564 = (function () { + log_event("JsInterpreter.js", 1247, ctx_220, "call"); + var _return_563 = + follow0( + s1); + log_event("JsInterpreter.js", 1246, ctx_push(ctx_220, [{key: "#RETURN_VALUE#", val: _return_563}]), "return"); + return (_return_563); + }()) + ; + log_event("JsInterpreter.js", 1248, ctx_push(ctx_220, [{key: "#RETURN_VALUE#", val: _return_564}]), "return"); + return (_return_564); + } + + + } + } + + + } else { + var _return_544 = (function () { + log_event("JsInterpreter.js", 1210, ctx_214, "call"); + var _return_543 = + reject( + s1, + throwcont); + log_event("JsInterpreter.js", 1209, ctx_push(ctx_214, [{key: "#RETURN_VALUE#", val: _return_543}]), "return"); + return (_return_543); + }()) + ; + log_event("JsInterpreter.js", 1211, ctx_push(ctx_214, [{key: "#RETURN_VALUE#", val: _return_544}]), "return"); + return (_return_544); + } + }); + log_event("JsInterpreter.js", 1269, ctx_push(ctx_213, [{key: "#RETURN_VALUE#", val: _return_569}]), "return"); + return (_return_569); + }); + log_event("JsInterpreter.js", 1273, ctx_push(ctx_212, [{key: "#RETURN_VALUE#", val: _return_570}]), "return"); + return (_return_570); + }); + log_event("JsInterpreter.js", 1277, ctx_push(ctx_211, [{key: "#RETURN_VALUE#", val: _return_571}]), "return"); + return (_return_571); + }); + log_event("JsInterpreter.js", 1281, ctx_push(ctx_185, [{key: "#RETURN_VALUE#", val: _return_572}]), "return"); + return (_return_572); + } + + }); + log_event("JsInterpreter.js", 1287, ctx_push(ctx_184, [{key: "#RETURN_VALUE#", val: _return_573}]), "return"); + return (_return_573); + + +}; + +var run_to_descriptor = function (s, c, _foo_) { + var ctx_224 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "_foo_", val: _foo_}]); + log_event("JsInterpreter.js", 1430, ctx_224, "enter"); + log_event("JsInterpreter.js", 1429, ctx_224, "switch"); + switch (_foo_.tag) { + case "Coq_value_prim": + var p = _foo_.value;var ctx_225 = ctx_push(ctx_224, [{key: "p", val: p}]); + log_event("JsInterpreter.js", 1296, ctx_225, "case"); + + var _return_576 = (function () { + log_event("JsInterpreter.js", 1294, ctx_225, "call"); + var _return_575 = throw_result((function () { + log_event("JsInterpreter.js", 1292, ctx_225, "call"); + var _return_574 = run_error(s, + Coq_native_error_type()); + log_event("JsInterpreter.js", 1291, ctx_push(ctx_225, [{key: "#RETURN_VALUE#", val: _return_574}]), "return"); + return (_return_574); }())); + log_event("JsInterpreter.js", 1293, ctx_push(ctx_225, [{key: "#RETURN_VALUE#", val: _return_575}]), "return"); + return (_return_575); + }()) + ; + log_event("JsInterpreter.js", 1295, ctx_push(ctx_225, [{key: "#RETURN_VALUE#", val: _return_576}]), "return"); + return (_return_576); + case "Coq_value_object": + var l = _foo_.value;var ctx_226 = ctx_push(ctx_224, [{key: "l", val: l}]); + log_event("JsInterpreter.js", 1428, ctx_226, "case"); + + var sub0 = function (s0, desc, name, conv, k) { + var ctx_227 = ctx_push(ctx_226, [{key: "s0", val: s0}, {key: "desc", val: desc}, {key: "name", val: name}, {key: "conv", val: conv}, {key: "k", val: k}]); + log_event("JsInterpreter.js", 1324, ctx_227, "enter"); + var _return_588 = if_bool((function () { + log_event("JsInterpreter.js", 1298, ctx_227, "call"); + var _return_577 = object_has_prop(s0, c, l, + name); + log_event("JsInterpreter.js", 1297, ctx_push(ctx_227, [{key: "#RETURN_VALUE#", val: _return_577}]), "return"); + return (_return_577); }()), function(s1, has) { + + var ctx_228 = ctx_push(ctx_227, [{key: "s1", val: s1}, {key: "has", val: has}]); + log_event("JsInterpreter.js", 1322, ctx_228, "let"); + var _if_arg_578 = (function () { + log_event("JsInterpreter.js", 1300, ctx_228, "call"); + var _return_579 = !(has); + log_event("JsInterpreter.js", 1299, ctx_push(ctx_228, [{key: "#RETURN_VALUE#", val: _return_579}]), "return"); + return (_return_579); + }()) + ; + log_event("JsInterpreter.js", 1319, ctx_228, "if"); + if (_if_arg_578) { + var _return_587 = (function () { + log_event("JsInterpreter.js", 1317, ctx_228, "call"); + var _return_586 = k(s1, desc); + log_event("JsInterpreter.js", 1316, ctx_push(ctx_228, [{key: "#RETURN_VALUE#", val: _return_586}]), "return"); + return (_return_586); + }()) + ; + log_event("JsInterpreter.js", 1318, ctx_push(ctx_228, [{key: "#RETURN_VALUE#", val: _return_587}]), "return"); + return (_return_587); + } else { + var _return_585 = if_value((function () { + log_event("JsInterpreter.js", 1302, ctx_228, "call"); + var _return_580 = + run_object_get(s1, c, + l, name); + log_event("JsInterpreter.js", 1301, ctx_push(ctx_228, [{key: "#RETURN_VALUE#", val: _return_580}]), "return"); + return (_return_580); + }()), function(s2, v0) { + + var ctx_229 = ctx_push(ctx_228, [{key: "s2", val: s2}, {key: "v0", val: v0}]); + log_event("JsInterpreter.js", 1314, ctx_229, "let"); + var _return_584 = + if_run((function () { + log_event("JsInterpreter.js", 1304, ctx_229, "call"); + var _return_581 = + conv(s2, v0, desc); + log_event("JsInterpreter.js", 1303, ctx_push(ctx_229, [{key: "#RETURN_VALUE#", val: _return_581}]), "return"); + return (_return_581); + }()), function(s3, + r) { + + var ctx_230 = ctx_push(ctx_229, [{key: "s3", val: s3}, {key: "r", val: r}]); + log_event("JsInterpreter.js", 1310, ctx_230, "let"); + var _return_583 = (function () { + log_event("JsInterpreter.js", 1306, ctx_230, "call"); + var _return_582 = + k(s3, r); + log_event("JsInterpreter.js", 1305, ctx_push(ctx_230, [{key: "#RETURN_VALUE#", val: _return_582}]), "return"); + return (_return_582); + }()) + ; + log_event("JsInterpreter.js", 1307, ctx_push(ctx_230, [{key: "#RETURN_VALUE#", val: _return_583}]), "return"); + return (_return_583); + }); + log_event("JsInterpreter.js", 1311, ctx_push(ctx_229, [{key: "#RETURN_VALUE#", val: _return_584}]), "return"); + return (_return_584); + }); + log_event("JsInterpreter.js", 1315, ctx_push(ctx_228, [{key: "#RETURN_VALUE#", val: _return_585}]), "return"); + return (_return_585); + } + }); + log_event("JsInterpreter.js", 1323, ctx_push(ctx_227, [{key: "#RETURN_VALUE#", val: _return_588}]), "return"); + return (_return_588); + }; + var ctx_231 = ctx_push(ctx_226, [{key: "sub0", val: sub0}]); + log_event("JsInterpreter.js", 1427, ctx_231, "let"); + var _return_641 = (function () { + log_event("JsInterpreter.js", 1425, ctx_231, "call"); + var _return_640 = sub0(s, descriptor_intro_empty, "enumerable", + function (s1, v1, desc) { + var ctx_232 = ctx_push(ctx_231, [{key: "s1", val: s1}, {key: "v1", val: v1}, {key: "desc", val: desc}]); + log_event("JsInterpreter.js", 1329, ctx_232, "enter"); + var b = (function () { + log_event("JsInterpreter.js", 1326, ctx_232, "call"); + var _return_589 = convert_value_to_boolean( + v1); + log_event("JsInterpreter.js", 1325, ctx_push(ctx_232, [{key: "#RETURN_VALUE#", val: _return_589}]), "return"); + return (_return_589); + }()) + ; + var ctx_233 = ctx_push(ctx_232, [{key: "b", val: b}]); + log_event("JsInterpreter.js", 1328, ctx_233, "let"); + var _return_590 = res_spec(s1, + descriptor_with_enumerable( + desc, Some(b))); + log_event("JsInterpreter.js", 1327, ctx_push(ctx_233, [{key: "#RETURN_VALUE#", val: _return_590}]), "return"); + return (_return_590); + }, function (s1_2, desc) { + var ctx_234 = ctx_push(ctx_231, [{key: "s1_2", val: s1_2}, {key: "desc", val: desc}]); + log_event("JsInterpreter.js", 1423, ctx_234, "enter"); + var _return_639 = (function () { + log_event("JsInterpreter.js", 1421, ctx_234, "call"); + var _return_638 = sub0(s1_2, desc, + "configurable", + function (s2, v2, desc0) { + var ctx_235 = ctx_push(ctx_234, [{key: "s2", val: s2}, {key: "v2", val: v2}, {key: "desc0", val: desc0}]); + log_event("JsInterpreter.js", 1334, ctx_235, "enter"); + var b = (function () { + log_event("JsInterpreter.js", 1331, ctx_235, "call"); + var _return_591 = + convert_value_to_boolean( + v2); + log_event("JsInterpreter.js", 1330, ctx_push(ctx_235, [{key: "#RETURN_VALUE#", val: _return_591}]), "return"); + return (_return_591); + }()) + ; + var ctx_236 = ctx_push(ctx_235, [{key: "b", val: b}]); + log_event("JsInterpreter.js", 1333, ctx_236, "let"); + var _return_592 = + res_spec(s2, + descriptor_with_configurable( + desc0, Some(b))); + log_event("JsInterpreter.js", 1332, ctx_push(ctx_236, [{key: "#RETURN_VALUE#", val: _return_592}]), "return"); + return (_return_592); + }, + function (s2_2, desc0) { + var ctx_237 = ctx_push(ctx_234, [{key: "s2_2", val: s2_2}, {key: "desc0", val: desc0}]); + log_event("JsInterpreter.js", 1419, ctx_237, "enter"); + var _return_637 = (function () { + log_event("JsInterpreter.js", 1417, ctx_237, "call"); + var _return_636 = + sub0(s2_2, desc0, + "value", + function (s3, v3, desc1) { + var ctx_238 = ctx_push(ctx_237, [{key: "s3", val: s3}, {key: "v3", val: v3}, {key: "desc1", val: desc1}]); + log_event("JsInterpreter.js", 1336, ctx_238, "enter"); + var _return_593 = + res_spec(s3, + descriptor_with_value( + desc1, + Some(v3))); + log_event("JsInterpreter.js", 1335, ctx_push(ctx_238, [{key: "#RETURN_VALUE#", val: _return_593}]), "return"); + return (_return_593); + }, + function (s3_2, desc1) { + var ctx_239 = ctx_push(ctx_237, [{key: "s3_2", val: s3_2}, {key: "desc1", val: desc1}]); + log_event("JsInterpreter.js", 1415, ctx_239, "enter"); + var _return_635 = (function () { + log_event("JsInterpreter.js", 1413, ctx_239, "call"); + var _return_634 = + sub0(s3_2, + desc1, + "writable", + function (s4, v4, desc2) { + var ctx_240 = ctx_push(ctx_239, [{key: "s4", val: s4}, {key: "v4", val: v4}, {key: "desc2", val: desc2}]); + log_event("JsInterpreter.js", 1341, ctx_240, "enter"); + var b = (function () { + log_event("JsInterpreter.js", 1338, ctx_240, "call"); + var _return_594 = + convert_value_to_boolean( + v4); + log_event("JsInterpreter.js", 1337, ctx_push(ctx_240, [{key: "#RETURN_VALUE#", val: _return_594}]), "return"); + return (_return_594); + }()) + ; + var ctx_241 = ctx_push(ctx_240, [{key: "b", val: b}]); + log_event("JsInterpreter.js", 1340, ctx_241, "let"); + var _return_595 = + res_spec( + s4, + descriptor_with_writable( + desc2, + Some(b))); + log_event("JsInterpreter.js", 1339, ctx_push(ctx_241, [{key: "#RETURN_VALUE#", val: _return_595}]), "return"); + return (_return_595); + }, + function (s4_2, desc2) { + var ctx_242 = ctx_push(ctx_239, [{key: "s4_2", val: s4_2}, {key: "desc2", val: desc2}]); + log_event("JsInterpreter.js", 1411, ctx_242, "enter"); + var _return_633 = (function () { + log_event("JsInterpreter.js", 1409, ctx_242, "call"); + var _return_632 = + sub0( + s4_2, + desc2, + "get", + function (s5, v5, desc3) { + var ctx_243 = ctx_push(ctx_242, [{key: "s5", val: s5}, {key: "v5", val: v5}, {key: "desc3", val: desc3}]); + log_event("JsInterpreter.js", 1357, ctx_243, "enter"); + var _if_arg_596 = (function () { + log_event("JsInterpreter.js", 1349, ctx_243, "call"); + var _return_600 = + ((function () { + log_event("JsInterpreter.js", 1345, ctx_243, "call"); + var _return_598 = + !( + (function () { + log_event("JsInterpreter.js", 1343, ctx_243, "call"); + var _return_597 = + is_callable_dec( + s5, v5); + log_event("JsInterpreter.js", 1342, ctx_push(ctx_243, [{key: "#RETURN_VALUE#", val: _return_597}]), "return"); + return (_return_597); + }())); + log_event("JsInterpreter.js", 1344, ctx_push(ctx_243, [{key: "#RETURN_VALUE#", val: _return_598}]), "return"); + return (_return_598); + }()) + && (function () { + log_event("JsInterpreter.js", 1347, ctx_243, "call"); + var _return_599 = + !( + value_compare( + v5, + Coq_value_prim( + Coq_prim_undef( + )))); + log_event("JsInterpreter.js", 1346, ctx_push(ctx_243, [{key: "#RETURN_VALUE#", val: _return_599}]), "return"); + return (_return_599); + }())); + log_event("JsInterpreter.js", 1348, ctx_push(ctx_243, [{key: "#RETURN_VALUE#", val: _return_600}]), "return"); + return (_return_600); + }()) + ; + log_event("JsInterpreter.js", 1356, ctx_243, "if"); + if (_if_arg_596) { + var _return_604 = (function () { + log_event("JsInterpreter.js", 1354, ctx_243, "call"); + var _return_603 = + throw_result( + (function () { + log_event("JsInterpreter.js", 1352, ctx_243, "call"); + var _return_602 = + run_error( + s5, + Coq_native_error_type( + )); + log_event("JsInterpreter.js", 1351, ctx_push(ctx_243, [{key: "#RETURN_VALUE#", val: _return_602}]), "return"); + return (_return_602); + }())); + log_event("JsInterpreter.js", 1353, ctx_push(ctx_243, [{key: "#RETURN_VALUE#", val: _return_603}]), "return"); + return (_return_603); + }()) + ; + log_event("JsInterpreter.js", 1355, ctx_push(ctx_243, [{key: "#RETURN_VALUE#", val: _return_604}]), "return"); + return (_return_604); + } else { + var _return_601 = + res_spec( + s5, + descriptor_with_get( + desc3, + Some(v5))); + log_event("JsInterpreter.js", 1350, ctx_push(ctx_243, [{key: "#RETURN_VALUE#", val: _return_601}]), "return"); + return (_return_601); + }}, + function (s5_2, desc3) { + var ctx_244 = ctx_push(ctx_242, [{key: "s5_2", val: s5_2}, {key: "desc3", val: desc3}]); + log_event("JsInterpreter.js", 1407, ctx_244, "enter"); + var _return_631 = (function () { + log_event("JsInterpreter.js", 1405, ctx_244, "call"); + var _return_630 = + sub0( + s5_2, + desc3, + "set", + function (s6, v6, desc4) { + var ctx_245 = ctx_push(ctx_244, [{key: "s6", val: s6}, {key: "v6", val: v6}, {key: "desc4", val: desc4}]); + log_event("JsInterpreter.js", 1373, ctx_245, "enter"); + var _if_arg_605 = (function () { + log_event("JsInterpreter.js", 1365, ctx_245, "call"); + var _return_609 = + ((function () { + log_event("JsInterpreter.js", 1361, ctx_245, "call"); + var _return_607 = + !( + (function () { + log_event("JsInterpreter.js", 1359, ctx_245, "call"); + var _return_606 = + is_callable_dec( + s6, v6); + log_event("JsInterpreter.js", 1358, ctx_push(ctx_245, [{key: "#RETURN_VALUE#", val: _return_606}]), "return"); + return (_return_606); + }())); + log_event("JsInterpreter.js", 1360, ctx_push(ctx_245, [{key: "#RETURN_VALUE#", val: _return_607}]), "return"); + return (_return_607); + }()) + && (function () { + log_event("JsInterpreter.js", 1363, ctx_245, "call"); + var _return_608 = + !( + value_compare( + v6, + Coq_value_prim( + Coq_prim_undef( + )))); + log_event("JsInterpreter.js", 1362, ctx_push(ctx_245, [{key: "#RETURN_VALUE#", val: _return_608}]), "return"); + return (_return_608); + }())); + log_event("JsInterpreter.js", 1364, ctx_push(ctx_245, [{key: "#RETURN_VALUE#", val: _return_609}]), "return"); + return (_return_609); + }()) + ; + log_event("JsInterpreter.js", 1372, ctx_245, "if"); + if (_if_arg_605) { + var _return_613 = (function () { + log_event("JsInterpreter.js", 1370, ctx_245, "call"); + var _return_612 = + throw_result( + (function () { + log_event("JsInterpreter.js", 1368, ctx_245, "call"); + var _return_611 = + run_error( + s6, + Coq_native_error_type( + )); + log_event("JsInterpreter.js", 1367, ctx_push(ctx_245, [{key: "#RETURN_VALUE#", val: _return_611}]), "return"); + return (_return_611); + }())); + log_event("JsInterpreter.js", 1369, ctx_push(ctx_245, [{key: "#RETURN_VALUE#", val: _return_612}]), "return"); + return (_return_612); + }()) + ; + log_event("JsInterpreter.js", 1371, ctx_push(ctx_245, [{key: "#RETURN_VALUE#", val: _return_613}]), "return"); + return (_return_613); + } else { + var _return_610 = + res_spec( + s6, + descriptor_with_set( + desc4, + Some(v6))); + log_event("JsInterpreter.js", 1366, ctx_push(ctx_245, [{key: "#RETURN_VALUE#", val: _return_610}]), "return"); + return (_return_610); + }}, + function (s7, desc4) { + var ctx_246 = ctx_push(ctx_244, [{key: "s7", val: s7}, {key: "desc4", val: desc4}]); + log_event("JsInterpreter.js", 1403, ctx_246, "enter"); + var _if_arg_614 = (function () { + log_event("JsInterpreter.js", 1395, ctx_246, "call"); + var _return_625 = + ((function () { + log_event("JsInterpreter.js", 1383, ctx_246, "call"); + var _return_619 = + ((function () { + log_event("JsInterpreter.js", 1377, ctx_246, "call"); + var _return_616 = + !( + (function () { + log_event("JsInterpreter.js", 1375, ctx_246, "call"); + var _return_615 = + option_compare( + value_compare, + desc4.descriptor_get, + None()); + log_event("JsInterpreter.js", 1374, ctx_push(ctx_246, [{key: "#RETURN_VALUE#", val: _return_615}]), "return"); + return (_return_615); + }())); + log_event("JsInterpreter.js", 1376, ctx_push(ctx_246, [{key: "#RETURN_VALUE#", val: _return_616}]), "return"); + return (_return_616); + }()) + || (function () { + log_event("JsInterpreter.js", 1381, ctx_246, "call"); + var _return_618 = + !( + (function () { + log_event("JsInterpreter.js", 1379, ctx_246, "call"); + var _return_617 = + option_compare( + value_compare, + desc4.descriptor_set, + None()); + log_event("JsInterpreter.js", 1378, ctx_push(ctx_246, [{key: "#RETURN_VALUE#", val: _return_617}]), "return"); + return (_return_617); + }())); + log_event("JsInterpreter.js", 1380, ctx_push(ctx_246, [{key: "#RETURN_VALUE#", val: _return_618}]), "return"); + return (_return_618); + }())); + log_event("JsInterpreter.js", 1382, ctx_push(ctx_246, [{key: "#RETURN_VALUE#", val: _return_619}]), "return"); + return (_return_619); + }()) + && (function () { + log_event("JsInterpreter.js", 1393, ctx_246, "call"); + var _return_624 = + ((function () { + log_event("JsInterpreter.js", 1387, ctx_246, "call"); + var _return_621 = + !( + (function () { + log_event("JsInterpreter.js", 1385, ctx_246, "call"); + var _return_620 = + option_compare( + value_compare, + desc4.descriptor_value, + None()); + log_event("JsInterpreter.js", 1384, ctx_push(ctx_246, [{key: "#RETURN_VALUE#", val: _return_620}]), "return"); + return (_return_620); + }())); + log_event("JsInterpreter.js", 1386, ctx_push(ctx_246, [{key: "#RETURN_VALUE#", val: _return_621}]), "return"); + return (_return_621); + }()) + || (function () { + log_event("JsInterpreter.js", 1391, ctx_246, "call"); + var _return_623 = + !( + (function () { + log_event("JsInterpreter.js", 1389, ctx_246, "call"); + var _return_622 = + option_compare( + bool_eq, + desc4.descriptor_writable, + None()); + log_event("JsInterpreter.js", 1388, ctx_push(ctx_246, [{key: "#RETURN_VALUE#", val: _return_622}]), "return"); + return (_return_622); + }())); + log_event("JsInterpreter.js", 1390, ctx_push(ctx_246, [{key: "#RETURN_VALUE#", val: _return_623}]), "return"); + return (_return_623); + }())); + log_event("JsInterpreter.js", 1392, ctx_push(ctx_246, [{key: "#RETURN_VALUE#", val: _return_624}]), "return"); + return (_return_624); + }())); + log_event("JsInterpreter.js", 1394, ctx_push(ctx_246, [{key: "#RETURN_VALUE#", val: _return_625}]), "return"); + return (_return_625); + }()) + ; + log_event("JsInterpreter.js", 1402, ctx_246, "if"); + if (_if_arg_614) { + var _return_629 = (function () { + log_event("JsInterpreter.js", 1400, ctx_246, "call"); + var _return_628 = + throw_result( + (function () { + log_event("JsInterpreter.js", 1398, ctx_246, "call"); + var _return_627 = + run_error( + s7, + Coq_native_error_type( + )); + log_event("JsInterpreter.js", 1397, ctx_push(ctx_246, [{key: "#RETURN_VALUE#", val: _return_627}]), "return"); + return (_return_627); + }())); + log_event("JsInterpreter.js", 1399, ctx_push(ctx_246, [{key: "#RETURN_VALUE#", val: _return_628}]), "return"); + return (_return_628); + }()) + ; + log_event("JsInterpreter.js", 1401, ctx_push(ctx_246, [{key: "#RETURN_VALUE#", val: _return_629}]), "return"); + return (_return_629); + } else { + var _return_626 = + res_spec( + s7, + desc4); + log_event("JsInterpreter.js", 1396, ctx_push(ctx_246, [{key: "#RETURN_VALUE#", val: _return_626}]), "return"); + return (_return_626); + }}); + log_event("JsInterpreter.js", 1404, ctx_push(ctx_244, [{key: "#RETURN_VALUE#", val: _return_630}]), "return"); + return (_return_630); + }()) + ; + log_event("JsInterpreter.js", 1406, ctx_push(ctx_244, [{key: "#RETURN_VALUE#", val: _return_631}]), "return"); + return (_return_631); + }); + log_event("JsInterpreter.js", 1408, ctx_push(ctx_242, [{key: "#RETURN_VALUE#", val: _return_632}]), "return"); + return (_return_632); + }()) + ; + log_event("JsInterpreter.js", 1410, ctx_push(ctx_242, [{key: "#RETURN_VALUE#", val: _return_633}]), "return"); + return (_return_633); + }); + log_event("JsInterpreter.js", 1412, ctx_push(ctx_239, [{key: "#RETURN_VALUE#", val: _return_634}]), "return"); + return (_return_634); + }()) + ; + log_event("JsInterpreter.js", 1414, ctx_push(ctx_239, [{key: "#RETURN_VALUE#", val: _return_635}]), "return"); + return (_return_635); + }); + log_event("JsInterpreter.js", 1416, ctx_push(ctx_237, [{key: "#RETURN_VALUE#", val: _return_636}]), "return"); + return (_return_636); + }()) + ; + log_event("JsInterpreter.js", 1418, ctx_push(ctx_237, [{key: "#RETURN_VALUE#", val: _return_637}]), "return"); + return (_return_637); + }); + log_event("JsInterpreter.js", 1420, ctx_push(ctx_234, [{key: "#RETURN_VALUE#", val: _return_638}]), "return"); + return (_return_638); + }()) + ; + log_event("JsInterpreter.js", 1422, ctx_push(ctx_234, [{key: "#RETURN_VALUE#", val: _return_639}]), "return"); + return (_return_639); }); + log_event("JsInterpreter.js", 1424, ctx_push(ctx_231, [{key: "#RETURN_VALUE#", val: _return_640}]), "return"); + return (_return_640); + }()) + ; + log_event("JsInterpreter.js", 1426, ctx_push(ctx_231, [{key: "#RETURN_VALUE#", val: _return_641}]), "return"); + return (_return_641); + + } + +}; + +var prim_new_object = function (s, _foo_) { + var ctx_247 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "_foo_", val: _foo_}]); + log_event("JsInterpreter.js", 1484, ctx_247, "enter"); + log_event("JsInterpreter.js", 1483, ctx_247, "switch"); + switch (_foo_.tag) { + case "Coq_prim_bool": + var b = _foo_.value;var ctx_248 = ctx_push(ctx_247, [{key: "b", val: b}]); + log_event("JsInterpreter.js", 1440, ctx_248, "case"); + + var _return_646 = result_out((function () { + var o1 = (function () { + log_event("JsInterpreter.js", 1432, ctx_248, "call"); + var _return_642 = object_new( + Coq_value_object( + Coq_object_loc_prealloc( + Coq_prealloc_bool_proto( + ))), "Boolean"); + log_event("JsInterpreter.js", 1431, ctx_push(ctx_248, [{key: "#RETURN_VALUE#", val: _return_642}]), "return"); + return (_return_642); + }()) + ; + var ctx_249 = ctx_push(ctx_248, [{key: "o1", val: o1}]); + log_event("JsInterpreter.js", 1438, ctx_249, "let"); + var o = object_with_primitive_value(o1, + Coq_value_prim(Coq_prim_bool(b))); + var ctx_250 = ctx_push(ctx_249, [{key: "o", val: o}]); + log_event("JsInterpreter.js", 1437, ctx_250, "let"); + var _tuple_arg_643 = (function () { + log_event("JsInterpreter.js", 1434, ctx_250, "call"); + var _return_644 = object_alloc(s, o); + log_event("JsInterpreter.js", 1433, ctx_push(ctx_250, [{key: "#RETURN_VALUE#", val: _return_644}]), "return"); + return (_return_644); + }()) + ; + var l = _tuple_arg_643[0], + s1 = _tuple_arg_643[1]; + var ctx_251 = ctx_push(ctx_250, [{key: "l", val: l}, {key: "s1", val: s1}]); + log_event("JsInterpreter.js", 1436, ctx_251, "let"); + var _return_645 = Coq_out_ter(s1, + res_val(Coq_value_object(l))); + log_event("JsInterpreter.js", 1435, ctx_push(ctx_251, [{key: "#RETURN_VALUE#", val: _return_645}]), "return"); + return (_return_645); + + + }())); + log_event("JsInterpreter.js", 1439, ctx_push(ctx_248, [{key: "#RETURN_VALUE#", val: _return_646}]), "return"); + return (_return_646); + case "Coq_prim_number": + var n = _foo_.value;var ctx_252 = ctx_push(ctx_247, [{key: "n", val: n}]); + log_event("JsInterpreter.js", 1450, ctx_252, "case"); + + var _return_651 = result_out((function () { + var o1 = (function () { + log_event("JsInterpreter.js", 1442, ctx_252, "call"); + var _return_647 = object_new( + Coq_value_object( + Coq_object_loc_prealloc( + Coq_prealloc_number_proto( + ))), "Number"); + log_event("JsInterpreter.js", 1441, ctx_push(ctx_252, [{key: "#RETURN_VALUE#", val: _return_647}]), "return"); + return (_return_647); + }()) + ; + var ctx_253 = ctx_push(ctx_252, [{key: "o1", val: o1}]); + log_event("JsInterpreter.js", 1448, ctx_253, "let"); + var o = object_with_primitive_value(o1, + Coq_value_prim(Coq_prim_number(n))); + var ctx_254 = ctx_push(ctx_253, [{key: "o", val: o}]); + log_event("JsInterpreter.js", 1447, ctx_254, "let"); + var _tuple_arg_648 = (function () { + log_event("JsInterpreter.js", 1444, ctx_254, "call"); + var _return_649 = object_alloc(s, o); + log_event("JsInterpreter.js", 1443, ctx_push(ctx_254, [{key: "#RETURN_VALUE#", val: _return_649}]), "return"); + return (_return_649); + }()) + ; + var l = _tuple_arg_648[0], + s1 = _tuple_arg_648[1]; + var ctx_255 = ctx_push(ctx_254, [{key: "l", val: l}, {key: "s1", val: s1}]); + log_event("JsInterpreter.js", 1446, ctx_255, "let"); + var _return_650 = Coq_out_ter(s1, + res_val(Coq_value_object(l))); + log_event("JsInterpreter.js", 1445, ctx_push(ctx_255, [{key: "#RETURN_VALUE#", val: _return_650}]), "return"); + return (_return_650); + + + }())); + log_event("JsInterpreter.js", 1449, ctx_push(ctx_252, [{key: "#RETURN_VALUE#", val: _return_651}]), "return"); + return (_return_651); + case "Coq_prim_string": + var s0 = _foo_.value;var ctx_256 = ctx_push(ctx_247, [{key: "s0", val: s0}]); + log_event("JsInterpreter.js", 1474, ctx_256, "case"); + + var o2 = (function () { + log_event("JsInterpreter.js", 1452, ctx_256, "call"); + var _return_652 = object_new( + Coq_value_object( + Coq_object_loc_prealloc( + Coq_prealloc_string_proto())), "String"); + log_event("JsInterpreter.js", 1451, ctx_push(ctx_256, [{key: "#RETURN_VALUE#", val: _return_652}]), "return"); + return (_return_652); + }()) + ; + var ctx_257 = ctx_push(ctx_256, [{key: "o2", val: o2}]); + log_event("JsInterpreter.js", 1473, ctx_257, "let"); + var o1 = object_with_get_own_property(o2, + Coq_builtin_get_own_prop_string()); + var ctx_258 = ctx_push(ctx_257, [{key: "o1", val: o1}]); + log_event("JsInterpreter.js", 1472, ctx_258, "let"); + var o = object_with_primitive_value(o1, + Coq_value_prim(Coq_prim_string(s0))); + var ctx_259 = ctx_push(ctx_258, [{key: "o", val: o}]); + log_event("JsInterpreter.js", 1471, ctx_259, "let"); + var _tuple_arg_653 = (function () { + log_event("JsInterpreter.js", 1454, ctx_259, "call"); + var _return_654 = object_alloc(s, o); + log_event("JsInterpreter.js", 1453, ctx_push(ctx_259, [{key: "#RETURN_VALUE#", val: _return_654}]), "return"); + return (_return_654); + }()) + ; + var l = _tuple_arg_653[0], s1 = _tuple_arg_653[1]; + var ctx_260 = ctx_push(ctx_259, [{key: "l", val: l}, {key: "s1", val: s1}]); + log_event("JsInterpreter.js", 1470, ctx_260, "let"); + var _return_661 = if_some((function () { + log_event("JsInterpreter.js", 1464, ctx_260, "call"); + var _return_659 = object_heap_map_properties_pickable_option( + s1, l, function (p) { + var ctx_261 = ctx_push(ctx_260, [{key: "p", val: p}]); + log_event("JsInterpreter.js", 1462, ctx_261, "enter"); + var _return_658 = (function () { + log_event("JsInterpreter.js", 1460, ctx_261, "call"); + var _return_657 = + HeapStr.write(p, + "length", + Coq_attributes_data_of( + (function () { + log_event("JsInterpreter.js", 1458, ctx_261, "call"); + var _return_656 = + attributes_data_intro_constant( + Coq_value_prim( + Coq_prim_number( + number_of_int( + (function () { + log_event("JsInterpreter.js", 1456, ctx_261, "call"); + var _return_655 = + strlength( + s0); + log_event("JsInterpreter.js", 1455, ctx_push(ctx_261, [{key: "#RETURN_VALUE#", val: _return_655}]), "return"); + return (_return_655); + }()))))); + log_event("JsInterpreter.js", 1457, ctx_push(ctx_261, [{key: "#RETURN_VALUE#", val: _return_656}]), "return"); + return (_return_656); + }()))); + log_event("JsInterpreter.js", 1459, ctx_push(ctx_261, [{key: "#RETURN_VALUE#", val: _return_657}]), "return"); + return (_return_657); + }()) + ; + log_event("JsInterpreter.js", 1461, ctx_push(ctx_261, [{key: "#RETURN_VALUE#", val: _return_658}]), "return"); + return (_return_658); }); + log_event("JsInterpreter.js", 1463, ctx_push(ctx_260, [{key: "#RETURN_VALUE#", val: _return_659}]), "return"); + return (_return_659); }()), function(s_2) { + + var ctx_262 = ctx_push(ctx_260, [{key: "s_2", val: s_2}]); + log_event("JsInterpreter.js", 1468, ctx_262, "let"); + var _return_660 = res_ter(s_2, + res_val(Coq_value_object(l))); + log_event("JsInterpreter.js", 1465, ctx_push(ctx_262, [{key: "#RETURN_VALUE#", val: _return_660}]), "return"); + return (_return_660); + }); + log_event("JsInterpreter.js", 1469, ctx_push(ctx_260, [{key: "#RETURN_VALUE#", val: _return_661}]), "return"); + return (_return_661); + + + + + default:log_event("JsInterpreter.js", 1482, ctx_247, "case"); + + var _return_665 = (function () { + log_event("JsInterpreter.js", 1480, ctx_247, "call"); + var _return_664 = function (s, m) { + var ctx_263 = ctx_push(ctx_247, [{key: "s", val: s}, {key: "m", val: m}]); + log_event("JsInterpreter.js", 1478, ctx_263, "enter"); + (function () { + log_event("JsInterpreter.js", 1477, ctx_263, "call"); + var _return_663 = Debug.impossible_with_heap_because( + __LOC__, s, m); + log_event("JsInterpreter.js", 1476, ctx_push(ctx_263, [{key: "#RETURN_VALUE#", val: _return_663}]), "return"); + return (_return_663); + }()) + ; + var _return_662 = Coq_result_impossible(); + log_event("JsInterpreter.js", 1475, ctx_push(ctx_263, [{key: "#RETURN_VALUE#", val: _return_662}]), "return"); + return (_return_662); }(s, + "[prim_new_object] received an null or undef."); + log_event("JsInterpreter.js", 1479, ctx_push(ctx_247, [{key: "#RETURN_VALUE#", val: _return_664}]), "return"); + return (_return_664); + }()) + ; + log_event("JsInterpreter.js", 1481, ctx_push(ctx_247, [{key: "#RETURN_VALUE#", val: _return_665}]), "return"); + return (_return_665); + } + +}; + +var to_object = function (s, _foo_) { + var ctx_264 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "_foo_", val: _foo_}]); + log_event("JsInterpreter.js", 1510, ctx_264, "enter"); + log_event("JsInterpreter.js", 1509, ctx_264, "switch"); + switch (_foo_.tag) { + case "Coq_value_prim": + var w = _foo_.value;var ctx_265 = ctx_push(ctx_264, [{key: "w", val: w}]); + log_event("JsInterpreter.js", 1506, ctx_265, "case"); + + log_event("JsInterpreter.js", 1505, ctx_265, "switch"); + switch (w.tag) { + case "Coq_prim_undef":log_event("JsInterpreter.js", 1488, ctx_265, "case"); + + var _return_667 = (function () { + log_event("JsInterpreter.js", 1486, ctx_265, "call"); + var _return_666 = run_error(s, Coq_native_error_type()); + log_event("JsInterpreter.js", 1485, ctx_push(ctx_265, [{key: "#RETURN_VALUE#", val: _return_666}]), "return"); + return (_return_666); + }()) + ; + log_event("JsInterpreter.js", 1487, ctx_push(ctx_265, [{key: "#RETURN_VALUE#", val: _return_667}]), "return"); + return (_return_667); + case "Coq_prim_null":log_event("JsInterpreter.js", 1492, ctx_265, "case"); + + var _return_669 = (function () { + log_event("JsInterpreter.js", 1490, ctx_265, "call"); + var _return_668 = run_error(s, Coq_native_error_type()); + log_event("JsInterpreter.js", 1489, ctx_push(ctx_265, [{key: "#RETURN_VALUE#", val: _return_668}]), "return"); + return (_return_668); + }()) + ; + log_event("JsInterpreter.js", 1491, ctx_push(ctx_265, [{key: "#RETURN_VALUE#", val: _return_669}]), "return"); + return (_return_669); + case "Coq_prim_bool": + var b = w.value;var ctx_266 = ctx_push(ctx_265, [{key: "b", val: b}]); + log_event("JsInterpreter.js", 1496, ctx_266, "case"); + + var _return_671 = (function () { + log_event("JsInterpreter.js", 1494, ctx_266, "call"); + var _return_670 = prim_new_object(s, w); + log_event("JsInterpreter.js", 1493, ctx_push(ctx_266, [{key: "#RETURN_VALUE#", val: _return_670}]), "return"); + return (_return_670); + }()) + ; + log_event("JsInterpreter.js", 1495, ctx_push(ctx_266, [{key: "#RETURN_VALUE#", val: _return_671}]), "return"); + return (_return_671); + case "Coq_prim_number": + var n = w.value;var ctx_267 = ctx_push(ctx_265, [{key: "n", val: n}]); + log_event("JsInterpreter.js", 1500, ctx_267, "case"); + + var _return_673 = (function () { + log_event("JsInterpreter.js", 1498, ctx_267, "call"); + var _return_672 = prim_new_object(s, w); + log_event("JsInterpreter.js", 1497, ctx_push(ctx_267, [{key: "#RETURN_VALUE#", val: _return_672}]), "return"); + return (_return_672); + }()) + ; + log_event("JsInterpreter.js", 1499, ctx_push(ctx_267, [{key: "#RETURN_VALUE#", val: _return_673}]), "return"); + return (_return_673); + case "Coq_prim_string": + var s0 = w.value;var ctx_268 = ctx_push(ctx_265, [{key: "s0", val: s0}]); + log_event("JsInterpreter.js", 1504, ctx_268, "case"); + + var _return_675 = (function () { + log_event("JsInterpreter.js", 1502, ctx_268, "call"); + var _return_674 = prim_new_object(s, w); + log_event("JsInterpreter.js", 1501, ctx_push(ctx_268, [{key: "#RETURN_VALUE#", val: _return_674}]), "return"); + return (_return_674); + }()) + ; + log_event("JsInterpreter.js", 1503, ctx_push(ctx_268, [{key: "#RETURN_VALUE#", val: _return_675}]), "return"); + return (_return_675); + } + + case "Coq_value_object": + var l = _foo_.value;var ctx_269 = ctx_push(ctx_264, [{key: "l", val: l}]); + log_event("JsInterpreter.js", 1508, ctx_269, "case"); + + var _return_676 = result_out( + Coq_out_ter(s, res_val(Coq_value_object(l)))); + log_event("JsInterpreter.js", 1507, ctx_push(ctx_269, [{key: "#RETURN_VALUE#", val: _return_676}]), "return"); + return (_return_676); + } + +}; + +var run_object_prim_value = function (s, l) { + var ctx_270 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "l", val: l}]); + log_event("JsInterpreter.js", 1522, ctx_270, "enter"); + var _return_680 = if_some((function () { + log_event("JsInterpreter.js", 1512, ctx_270, "call"); + var _return_677 = run_object_method( + object_prim_value_, s, l); + log_event("JsInterpreter.js", 1511, ctx_push(ctx_270, [{key: "#RETURN_VALUE#", val: _return_677}]), "return"); + return (_return_677); }()), function(ov) { + + var ctx_271 = ctx_push(ctx_270, [{key: "ov", val: ov}]); + log_event("JsInterpreter.js", 1520, ctx_271, "let"); + var _return_679 = if_some(ov, function(v) { + + var ctx_272 = ctx_push(ctx_271, [{key: "v", val: v}]); + log_event("JsInterpreter.js", 1516, ctx_272, "let"); + var _return_678 = res_ter(s, + res_val(v)); + log_event("JsInterpreter.js", 1513, ctx_push(ctx_272, [{key: "#RETURN_VALUE#", val: _return_678}]), "return"); + return (_return_678); + }); + log_event("JsInterpreter.js", 1517, ctx_push(ctx_271, [{key: "#RETURN_VALUE#", val: _return_679}]), "return"); + return (_return_679); + }); + log_event("JsInterpreter.js", 1521, ctx_push(ctx_270, [{key: "#RETURN_VALUE#", val: _return_680}]), "return"); + return (_return_680); +}; + +var prim_value_get = function (s, c, v, x) { + var ctx_273 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "v", val: v}, {key: "x", val: x}]); + log_event("JsInterpreter.js", 1532, ctx_273, "enter"); + var _return_684 = if_object((function () { + log_event("JsInterpreter.js", 1524, ctx_273, "call"); + var _return_681 = to_object(s, v); + log_event("JsInterpreter.js", 1523, ctx_push(ctx_273, [{key: "#RETURN_VALUE#", val: _return_681}]), "return"); + return (_return_681); }()), function(s_2, l) { + + var ctx_274 = ctx_push(ctx_273, [{key: "s_2", val: s_2}, {key: "l", val: l}]); + log_event("JsInterpreter.js", 1530, ctx_274, "let"); + var _return_683 = (function () { + log_event("JsInterpreter.js", 1526, ctx_274, "call"); + var _return_682 = object_get_builtin(s_2, c, + Coq_builtin_get_default(), v, + l, x); + log_event("JsInterpreter.js", 1525, ctx_push(ctx_274, [{key: "#RETURN_VALUE#", val: _return_682}]), "return"); + return (_return_682); + }()) + ; + log_event("JsInterpreter.js", 1527, ctx_push(ctx_274, [{key: "#RETURN_VALUE#", val: _return_683}]), "return"); + return (_return_683); + }); + log_event("JsInterpreter.js", 1531, ctx_push(ctx_273, [{key: "#RETURN_VALUE#", val: _return_684}]), "return"); + return (_return_684); +}; + +var env_record_has_binding = function (s, c, l, x) { + var ctx_275 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "l", val: l}, {key: "x", val: x}]); + log_event("JsInterpreter.js", 1548, ctx_275, "enter"); + var _return_690 = if_some((function () { + log_event("JsInterpreter.js", 1534, ctx_275, "call"); + var _return_685 = env_record_binds_pickable_option(s, + l); + log_event("JsInterpreter.js", 1533, ctx_push(ctx_275, [{key: "#RETURN_VALUE#", val: _return_685}]), "return"); + return (_return_685); }()), function(e) { + + var ctx_276 = ctx_push(ctx_275, [{key: "e", val: e}]); + log_event("JsInterpreter.js", 1546, ctx_276, "let"); + log_event("JsInterpreter.js", 1543, ctx_276, "switch"); + switch (e.tag) { + case "Coq_env_record_decl": + var ed = e.value;var ctx_277 = ctx_push(ctx_276, [{key: "ed", val: ed}]); + log_event("JsInterpreter.js", 1538, ctx_277, "case"); + + var _return_687 = result_out( + Coq_out_ter(s, + res_val( + Coq_value_prim( + Coq_prim_bool( + (function () { + log_event("JsInterpreter.js", 1536, ctx_277, "call"); + var _return_686 = + HeapStr.indom_dec( + ed, x); + log_event("JsInterpreter.js", 1535, ctx_push(ctx_277, [{key: "#RETURN_VALUE#", val: _return_686}]), "return"); + return (_return_686); + }())))))); + log_event("JsInterpreter.js", 1537, ctx_push(ctx_277, [{key: "#RETURN_VALUE#", val: _return_687}]), "return"); + return (_return_687); + case "Coq_env_record_object": + var l0 = e.value, pt = e.provide_this;var ctx_278 = ctx_push(ctx_276, [{key: "l0", val: l0}, {key: "pt", val: pt}]); + log_event("JsInterpreter.js", 1542, ctx_278, "case"); + + var _return_689 = (function () { + log_event("JsInterpreter.js", 1540, ctx_278, "call"); + var _return_688 = object_has_prop(s, c, l0, x); + log_event("JsInterpreter.js", 1539, ctx_push(ctx_278, [{key: "#RETURN_VALUE#", val: _return_688}]), "return"); + return (_return_688); + }()) + ; + log_event("JsInterpreter.js", 1541, ctx_push(ctx_278, [{key: "#RETURN_VALUE#", val: _return_689}]), "return"); + return (_return_689); + } + + }); + log_event("JsInterpreter.js", 1547, ctx_push(ctx_275, [{key: "#RETURN_VALUE#", val: _return_690}]), "return"); + return (_return_690); +}; + +var lexical_env_get_identifier_ref = function (s, c, x, x0, str) { + var ctx_279 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "x", val: x}, {key: "x0", val: x0}, {key: "str", val: str}]); + log_event("JsInterpreter.js", 1568, ctx_279, "enter"); + log_event("JsInterpreter.js", 1567, ctx_279, "switch"); + switch (x.tag) { + case "[]":log_event("JsInterpreter.js", 1552, ctx_279, "case"); + + var _return_692 = res_spec(s, (function () { + log_event("JsInterpreter.js", 1550, ctx_279, "call"); + var _return_691 = ref_create_value( + Coq_value_prim( + Coq_prim_undef()), x0, str); + log_event("JsInterpreter.js", 1549, ctx_push(ctx_279, [{key: "#RETURN_VALUE#", val: _return_691}]), "return"); + return (_return_691); }())); + log_event("JsInterpreter.js", 1551, ctx_push(ctx_279, [{key: "#RETURN_VALUE#", val: _return_692}]), "return"); + return (_return_692); + case "::": + var l = x.head, x_2 = x.tail;var ctx_280 = ctx_push(ctx_279, [{key: "l", val: l}, {key: "x_2", val: x_2}]); + log_event("JsInterpreter.js", 1566, ctx_280, "case"); + + var _return_698 = if_bool((function () { + log_event("JsInterpreter.js", 1554, ctx_280, "call"); + var _return_693 = env_record_has_binding(s, c, l, + x0); + log_event("JsInterpreter.js", 1553, ctx_push(ctx_280, [{key: "#RETURN_VALUE#", val: _return_693}]), "return"); + return (_return_693); }()), function(s1, has) { + + var ctx_281 = ctx_push(ctx_280, [{key: "s1", val: s1}, {key: "has", val: has}]); + log_event("JsInterpreter.js", 1564, ctx_281, "let"); + log_event("JsInterpreter.js", 1561, ctx_281, "if"); + if (has) { + var _return_697 = res_spec(s1, (function () { + log_event("JsInterpreter.js", 1559, ctx_281, "call"); + var _return_696 = + ref_create_env_loc(l, x0, + str); + log_event("JsInterpreter.js", 1558, ctx_push(ctx_281, [{key: "#RETURN_VALUE#", val: _return_696}]), "return"); + return (_return_696); + }())); + log_event("JsInterpreter.js", 1560, ctx_push(ctx_281, [{key: "#RETURN_VALUE#", val: _return_697}]), "return"); + return (_return_697); + } else { + var _return_695 = (function () { + log_event("JsInterpreter.js", 1556, ctx_281, "call"); + var _return_694 = lexical_env_get_identifier_ref( + s1, c, x_2, x0, str); + log_event("JsInterpreter.js", 1555, ctx_push(ctx_281, [{key: "#RETURN_VALUE#", val: _return_694}]), "return"); + return (_return_694); + }()) + ; + log_event("JsInterpreter.js", 1557, ctx_push(ctx_281, [{key: "#RETURN_VALUE#", val: _return_695}]), "return"); + return (_return_695); + } + }); + log_event("JsInterpreter.js", 1565, ctx_push(ctx_280, [{key: "#RETURN_VALUE#", val: _return_698}]), "return"); + return (_return_698); + } + +}; + +var object_delete_default = function (s, c, l, x, str) { + var ctx_282 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "l", val: l}, {key: "x", val: x}, {key: "str", val: str}]); + log_event("JsInterpreter.js", 1596, ctx_282, "enter"); + var _return_710 = if_run((function () { + log_event("JsInterpreter.js", 1570, ctx_282, "call"); + var _return_699 = run_object_get_own_prop(s, c, l, x); + log_event("JsInterpreter.js", 1569, ctx_push(ctx_282, [{key: "#RETURN_VALUE#", val: _return_699}]), "return"); + return (_return_699); }()), function(s1, d) { + + var ctx_283 = ctx_push(ctx_282, [{key: "s1", val: s1}, {key: "d", val: d}]); + log_event("JsInterpreter.js", 1594, ctx_283, "let"); + log_event("JsInterpreter.js", 1591, ctx_283, "switch"); + switch (d.tag) { + case "Coq_full_descriptor_undef":log_event("JsInterpreter.js", 1572, ctx_283, "case"); + + var _return_700 = res_ter(s1, + res_val( + Coq_value_prim( + Coq_prim_bool(true)))); + log_event("JsInterpreter.js", 1571, ctx_push(ctx_283, [{key: "#RETURN_VALUE#", val: _return_700}]), "return"); + return (_return_700); + case "Coq_full_descriptor_some": + var a = d.value;var ctx_284 = ctx_push(ctx_283, [{key: "a", val: a}]); + log_event("JsInterpreter.js", 1590, ctx_284, "case"); + + var _if_arg_701 = (function () { + log_event("JsInterpreter.js", 1574, ctx_284, "call"); + var _return_702 = attributes_configurable(a); + log_event("JsInterpreter.js", 1573, ctx_push(ctx_284, [{key: "#RETURN_VALUE#", val: _return_702}]), "return"); + return (_return_702); + }()) + ; + log_event("JsInterpreter.js", 1589, ctx_284, "if"); + if (_if_arg_701) { + var _return_709 = if_some((function () { + log_event("JsInterpreter.js", 1583, ctx_284, "call"); + var _return_707 = + object_heap_map_properties_pickable_option( + s1, l, function (p) { + var ctx_285 = ctx_push(ctx_284, [{key: "p", val: p}]); + log_event("JsInterpreter.js", 1581, ctx_285, "enter"); + var _return_706 = (function () { + log_event("JsInterpreter.js", 1579, ctx_285, "call"); + var _return_705 = + HeapStr.rem(p, x); + log_event("JsInterpreter.js", 1578, ctx_push(ctx_285, [{key: "#RETURN_VALUE#", val: _return_705}]), "return"); + return (_return_705); + }()) + ; + log_event("JsInterpreter.js", 1580, ctx_push(ctx_285, [{key: "#RETURN_VALUE#", val: _return_706}]), "return"); + return (_return_706); + }); + log_event("JsInterpreter.js", 1582, ctx_push(ctx_284, [{key: "#RETURN_VALUE#", val: _return_707}]), "return"); + return (_return_707); + }()), function(s_2) { + + var ctx_286 = ctx_push(ctx_284, [{key: "s_2", val: s_2}]); + log_event("JsInterpreter.js", 1587, ctx_286, "let"); + var _return_708 = + res_ter(s_2, + res_val( + Coq_value_prim( + Coq_prim_bool(true)))); + log_event("JsInterpreter.js", 1584, ctx_push(ctx_286, [{key: "#RETURN_VALUE#", val: _return_708}]), "return"); + return (_return_708); + }); + log_event("JsInterpreter.js", 1588, ctx_push(ctx_284, [{key: "#RETURN_VALUE#", val: _return_709}]), "return"); + return (_return_709); + } else { + var _return_704 = (function () { + log_event("JsInterpreter.js", 1576, ctx_284, "call"); + var _return_703 = out_error_or_cst(s1, str, + Coq_native_error_type(), + Coq_value_prim( + Coq_prim_bool(false))); + log_event("JsInterpreter.js", 1575, ctx_push(ctx_284, [{key: "#RETURN_VALUE#", val: _return_703}]), "return"); + return (_return_703); + }()) + ; + log_event("JsInterpreter.js", 1577, ctx_push(ctx_284, [{key: "#RETURN_VALUE#", val: _return_704}]), "return"); + return (_return_704); + } + } + + }); + log_event("JsInterpreter.js", 1595, ctx_push(ctx_282, [{key: "#RETURN_VALUE#", val: _return_710}]), "return"); + return (_return_710); +}; + +var object_delete = function (s, c, l, x, str) { + var ctx_287 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "l", val: l}, {key: "x", val: x}, {key: "str", val: str}]); + log_event("JsInterpreter.js", 1644, ctx_287, "enter"); + var _return_726 = if_some((function () { + log_event("JsInterpreter.js", 1598, ctx_287, "call"); + var _return_711 = run_object_method(object_delete_, + s, l); + log_event("JsInterpreter.js", 1597, ctx_push(ctx_287, [{key: "#RETURN_VALUE#", val: _return_711}]), "return"); + return (_return_711); }()), function(b) { + + var ctx_288 = ctx_push(ctx_287, [{key: "b", val: b}]); + log_event("JsInterpreter.js", 1642, ctx_288, "let"); + log_event("JsInterpreter.js", 1639, ctx_288, "switch"); + switch (b.tag) { + case "Coq_builtin_delete_default":log_event("JsInterpreter.js", 1602, ctx_288, "case"); + + var _return_713 = (function () { + log_event("JsInterpreter.js", 1600, ctx_288, "call"); + var _return_712 = object_delete_default(s, c, + l, x, str); + log_event("JsInterpreter.js", 1599, ctx_push(ctx_288, [{key: "#RETURN_VALUE#", val: _return_712}]), "return"); + return (_return_712); + }()) + ; + log_event("JsInterpreter.js", 1601, ctx_push(ctx_288, [{key: "#RETURN_VALUE#", val: _return_713}]), "return"); + return (_return_713); + case "Coq_builtin_delete_args_obj":log_event("JsInterpreter.js", 1638, ctx_288, "case"); + + var _return_725 = if_some((function () { + log_event("JsInterpreter.js", 1604, ctx_288, "call"); + var _return_714 = run_object_method( + object_parameter_map_, + s, l); + log_event("JsInterpreter.js", 1603, ctx_push(ctx_288, [{key: "#RETURN_VALUE#", val: _return_714}]), "return"); + return (_return_714); }()), + function(mo) { + + var ctx_289 = ctx_push(ctx_288, [{key: "mo", val: mo}]); + log_event("JsInterpreter.js", 1636, ctx_289, "let"); + var _return_724 = if_some( + mo, + function(m) { + + var ctx_290 = ctx_push(ctx_289, [{key: "m", val: m}]); + log_event("JsInterpreter.js", 1632, ctx_290, "let"); + var _return_723 = + if_run( + (function () { + log_event("JsInterpreter.js", 1606, ctx_290, "call"); + var _return_715 = + run_object_get_own_prop( + s, c, m, + x); + log_event("JsInterpreter.js", 1605, ctx_push(ctx_290, [{key: "#RETURN_VALUE#", val: _return_715}]), "return"); + return (_return_715); + }()), + function(s1, + d) { + + var ctx_291 = ctx_push(ctx_290, [{key: "s1", val: s1}, {key: "d", val: d}]); + log_event("JsInterpreter.js", 1628, ctx_291, "let"); + var _return_722 = + if_bool( + (function () { + log_event("JsInterpreter.js", 1608, ctx_291, "call"); + var _return_716 = + object_delete_default( + s1, c, l, + x, str); + log_event("JsInterpreter.js", 1607, ctx_push(ctx_291, [{key: "#RETURN_VALUE#", val: _return_716}]), "return"); + return (_return_716); + }()), + function(s2, + b0) { + + var ctx_292 = ctx_push(ctx_291, [{key: "s2", val: s2}, {key: "b0", val: b0}]); + log_event("JsInterpreter.js", 1624, ctx_292, "let"); + log_event("JsInterpreter.js", 1621, ctx_292, "if"); + if (b0) { + log_event("JsInterpreter.js", 1620, ctx_292, "switch"); + switch (d.tag) { + case "Coq_full_descriptor_undef":log_event("JsInterpreter.js", 1611, ctx_292, "case"); + + var _return_718 = + res_ter( + s2, + res_val( + Coq_value_prim( + Coq_prim_bool( + b0)))); + log_event("JsInterpreter.js", 1610, ctx_push(ctx_292, [{key: "#RETURN_VALUE#", val: _return_718}]), "return"); + return (_return_718); + case "Coq_full_descriptor_some": + var a = d.value;var ctx_293 = ctx_push(ctx_292, [{key: "a", val: a}]); + log_event("JsInterpreter.js", 1619, ctx_293, "case"); + + var _return_721 = + if_bool( + (function () { + log_event("JsInterpreter.js", 1613, ctx_293, "call"); + var _return_719 = + object_delete( + s2, c, m, + x, false); + log_event("JsInterpreter.js", 1612, ctx_push(ctx_293, [{key: "#RETURN_VALUE#", val: _return_719}]), "return"); + return (_return_719); + }()), + function(s3, + b_2) { + + var ctx_294 = ctx_push(ctx_293, [{key: "s3", val: s3}, {key: "b_2", val: b_2}]); + log_event("JsInterpreter.js", 1617, ctx_294, "let"); + var _return_720 = + res_ter( + s3, + res_val( + Coq_value_prim( + Coq_prim_bool( + b0)))); + log_event("JsInterpreter.js", 1614, ctx_push(ctx_294, [{key: "#RETURN_VALUE#", val: _return_720}]), "return"); + return (_return_720); + }); + log_event("JsInterpreter.js", 1618, ctx_push(ctx_293, [{key: "#RETURN_VALUE#", val: _return_721}]), "return"); + return (_return_721); + } + + } else { + var _return_717 = + res_ter( + s2, + res_val( + Coq_value_prim( + Coq_prim_bool( + b0)))); + log_event("JsInterpreter.js", 1609, ctx_push(ctx_292, [{key: "#RETURN_VALUE#", val: _return_717}]), "return"); + return (_return_717); + } + }); + log_event("JsInterpreter.js", 1625, ctx_push(ctx_291, [{key: "#RETURN_VALUE#", val: _return_722}]), "return"); + return (_return_722); + }); + log_event("JsInterpreter.js", 1629, ctx_push(ctx_290, [{key: "#RETURN_VALUE#", val: _return_723}]), "return"); + return (_return_723); + }); + log_event("JsInterpreter.js", 1633, ctx_push(ctx_289, [{key: "#RETURN_VALUE#", val: _return_724}]), "return"); + return (_return_724); + }); + log_event("JsInterpreter.js", 1637, ctx_push(ctx_288, [{key: "#RETURN_VALUE#", val: _return_725}]), "return"); + return (_return_725); + } + + }); + log_event("JsInterpreter.js", 1643, ctx_push(ctx_287, [{key: "#RETURN_VALUE#", val: _return_726}]), "return"); + return (_return_726); +}; + +var env_record_delete_binding = function (s, c, l, x) { + var ctx_295 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "l", val: l}, {key: "x", val: x}]); + log_event("JsInterpreter.js", 1678, ctx_295, "enter"); + var _return_739 = if_some((function () { + log_event("JsInterpreter.js", 1646, ctx_295, "call"); + var _return_727 = env_record_binds_pickable_option(s, + l); + log_event("JsInterpreter.js", 1645, ctx_push(ctx_295, [{key: "#RETURN_VALUE#", val: _return_727}]), "return"); + return (_return_727); }()), function(e) { + + var ctx_296 = ctx_push(ctx_295, [{key: "e", val: e}]); + log_event("JsInterpreter.js", 1676, ctx_296, "let"); + log_event("JsInterpreter.js", 1673, ctx_296, "switch"); + switch (e.tag) { + case "Coq_env_record_decl": + var ed = e.value;var ctx_297 = ctx_push(ctx_296, [{key: "ed", val: ed}]); + log_event("JsInterpreter.js", 1668, ctx_297, "case"); + + var _switch_arg_728 = (function () { + log_event("JsInterpreter.js", 1648, ctx_297, "call"); + var _return_729 = HeapStr.read_option(ed, x); + log_event("JsInterpreter.js", 1647, ctx_push(ctx_297, [{key: "#RETURN_VALUE#", val: _return_729}]), "return"); + return (_return_729); + }()) + ; + log_event("JsInterpreter.js", 1667, ctx_297, "switch"); + switch (_switch_arg_728.tag) { + case "Some": + var p = _switch_arg_728.value;var ctx_298 = ctx_push(ctx_297, [{key: "p", val: p}]); + log_event("JsInterpreter.js", 1664, ctx_298, "case"); + + var mu = p[0], v = p[1]; + var ctx_299 = ctx_push(ctx_298, [{key: "mu", val: mu}, {key: "v", val: v}]); + log_event("JsInterpreter.js", 1663, ctx_299, "let"); + log_event("JsInterpreter.js", 1662, ctx_299, "switch"); + switch (mu.tag) { + case "Coq_mutability_uninitialized_immutable":log_event("JsInterpreter.js", 1650, ctx_299, "case"); + + var _return_730 = result_out( + Coq_out_ter(s, + res_val( + Coq_value_prim( + Coq_prim_bool( + false))))); + log_event("JsInterpreter.js", 1649, ctx_push(ctx_299, [{key: "#RETURN_VALUE#", val: _return_730}]), "return"); + return (_return_730); + case "Coq_mutability_immutable":log_event("JsInterpreter.js", 1652, ctx_299, "case"); + + var _return_731 = result_out( + Coq_out_ter(s, + res_val( + Coq_value_prim( + Coq_prim_bool( + false))))); + log_event("JsInterpreter.js", 1651, ctx_push(ctx_299, [{key: "#RETURN_VALUE#", val: _return_731}]), "return"); + return (_return_731); + case "Coq_mutability_nondeletable":log_event("JsInterpreter.js", 1654, ctx_299, "case"); + + var _return_732 = result_out( + Coq_out_ter(s, + res_val( + Coq_value_prim( + Coq_prim_bool( + false))))); + log_event("JsInterpreter.js", 1653, ctx_push(ctx_299, [{key: "#RETURN_VALUE#", val: _return_732}]), "return"); + return (_return_732); + case "Coq_mutability_deletable":log_event("JsInterpreter.js", 1661, ctx_299, "case"); + + var s_2 = (function () { + log_event("JsInterpreter.js", 1658, ctx_299, "call"); + var _return_734 = env_record_write(s, + l, + Coq_env_record_decl( + (function () { + log_event("JsInterpreter.js", 1656, ctx_299, "call"); + var _return_733 = + decl_env_record_rem( + ed, x); + log_event("JsInterpreter.js", 1655, ctx_push(ctx_299, [{key: "#RETURN_VALUE#", val: _return_733}]), "return"); + return (_return_733); + }()))); + log_event("JsInterpreter.js", 1657, ctx_push(ctx_299, [{key: "#RETURN_VALUE#", val: _return_734}]), "return"); + return (_return_734); + }()) + ; + var ctx_300 = ctx_push(ctx_299, [{key: "s_2", val: s_2}]); + log_event("JsInterpreter.js", 1660, ctx_300, "let"); + var _return_735 = result_out( + Coq_out_ter(s_2, + res_val( + Coq_value_prim( + Coq_prim_bool( + true))))); + log_event("JsInterpreter.js", 1659, ctx_push(ctx_300, [{key: "#RETURN_VALUE#", val: _return_735}]), "return"); + return (_return_735); + + } + + + case "None":log_event("JsInterpreter.js", 1666, ctx_297, "case"); + + var _return_736 = result_out( + Coq_out_ter(s, + res_val( + Coq_value_prim( + Coq_prim_bool(true))))); + log_event("JsInterpreter.js", 1665, ctx_push(ctx_297, [{key: "#RETURN_VALUE#", val: _return_736}]), "return"); + return (_return_736); + } + + case "Coq_env_record_object": + var l0 = e.value, pt = e.provide_this;var ctx_301 = ctx_push(ctx_296, [{key: "l0", val: l0}, {key: "pt", val: pt}]); + log_event("JsInterpreter.js", 1672, ctx_301, "case"); + + var _return_738 = (function () { + log_event("JsInterpreter.js", 1670, ctx_301, "call"); + var _return_737 = object_delete(s, c, l0, x, + throw_false); + log_event("JsInterpreter.js", 1669, ctx_push(ctx_301, [{key: "#RETURN_VALUE#", val: _return_737}]), "return"); + return (_return_737); + }()) + ; + log_event("JsInterpreter.js", 1671, ctx_push(ctx_301, [{key: "#RETURN_VALUE#", val: _return_738}]), "return"); + return (_return_738); + } + + }); + log_event("JsInterpreter.js", 1677, ctx_push(ctx_295, [{key: "#RETURN_VALUE#", val: _return_739}]), "return"); + return (_return_739); +}; + +var env_record_implicit_this_value = function (s, l) { + var ctx_302 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "l", val: l}]); + log_event("JsInterpreter.js", 1693, ctx_302, "enter"); + var _return_746 = (function () { + log_event("JsInterpreter.js", 1691, ctx_302, "call"); + var _return_745 = ifx_some_or_default((function () { + log_event("JsInterpreter.js", 1680, ctx_302, "call"); + var _return_740 = env_record_binds_pickable_option( + s, l); + log_event("JsInterpreter.js", 1679, ctx_push(ctx_302, [{key: "#RETURN_VALUE#", val: _return_740}]), "return"); + return (_return_740); }()), None(), function (e) { + var ctx_303 = ctx_push(ctx_302, [{key: "e", val: e}]); + log_event("JsInterpreter.js", 1689, ctx_303, "enter"); + var _return_744 = Some((function () { + log_event("JsInterpreter.js", 1687, ctx_303, "switch"); + switch (e.tag) { + case "Coq_env_record_decl": + var ed = e.value;var ctx_304 = ctx_push(ctx_303, [{key: "ed", val: ed}]); + log_event("JsInterpreter.js", 1682, ctx_304, "case"); + + var _return_741 = + Coq_value_prim( + Coq_prim_undef()); + log_event("JsInterpreter.js", 1681, ctx_push(ctx_304, [{key: "#RETURN_VALUE#", val: _return_741}]), "return"); + return (_return_741); + case "Coq_env_record_object": + var l0 = e.value, + provide_this = e.provide_this;var ctx_305 = ctx_push(ctx_303, [{key: "l0", val: l0}, {key: "provide_this", val: provide_this}]); + log_event("JsInterpreter.js", 1686, ctx_305, "case"); + + log_event("JsInterpreter.js", 1685, ctx_305, "if"); + if (provide_this) { + var _return_743 = + Coq_value_object(l0); + log_event("JsInterpreter.js", 1684, ctx_push(ctx_305, [{key: "#RETURN_VALUE#", val: _return_743}]), "return"); + return (_return_743); + } else { + var _return_742 = + Coq_value_prim( + Coq_prim_undef()); + log_event("JsInterpreter.js", 1683, ctx_push(ctx_305, [{key: "#RETURN_VALUE#", val: _return_742}]), "return"); + return (_return_742); + } + } + }())); + log_event("JsInterpreter.js", 1688, ctx_push(ctx_303, [{key: "#RETURN_VALUE#", val: _return_744}]), "return"); + return (_return_744); }); + log_event("JsInterpreter.js", 1690, ctx_push(ctx_302, [{key: "#RETURN_VALUE#", val: _return_745}]), "return"); + return (_return_745); + }()) + ; + log_event("JsInterpreter.js", 1692, ctx_push(ctx_302, [{key: "#RETURN_VALUE#", val: _return_746}]), "return"); + return (_return_746); +}; + +var identifier_resolution = function (s, c, x) { + var ctx_306 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "x", val: x}]); + log_event("JsInterpreter.js", 1699, ctx_306, "enter"); + var x0 = c.execution_ctx_lexical_env; + var ctx_307 = ctx_push(ctx_306, [{key: "x0", val: x0}]); + log_event("JsInterpreter.js", 1698, ctx_307, "let"); + var str = c.execution_ctx_strict; + var ctx_308 = ctx_push(ctx_307, [{key: "str", val: str}]); + log_event("JsInterpreter.js", 1697, ctx_308, "let"); + var _return_748 = (function () { + log_event("JsInterpreter.js", 1695, ctx_308, "call"); + var _return_747 = lexical_env_get_identifier_ref(s, c, x0, x, str); + log_event("JsInterpreter.js", 1694, ctx_push(ctx_308, [{key: "#RETURN_VALUE#", val: _return_747}]), "return"); + return (_return_747); + }()) + ; + log_event("JsInterpreter.js", 1696, ctx_push(ctx_308, [{key: "#RETURN_VALUE#", val: _return_748}]), "return"); + return (_return_748); + + +}; + +var env_record_get_binding_value = function (s, c, l, x, str) { + var ctx_309 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "l", val: l}, {key: "x", val: x}, {key: "str", val: str}]); + log_event("JsInterpreter.js", 1734, ctx_309, "enter"); + var _return_762 = if_some((function () { + log_event("JsInterpreter.js", 1701, ctx_309, "call"); + var _return_749 = env_record_binds_pickable_option(s, + l); + log_event("JsInterpreter.js", 1700, ctx_push(ctx_309, [{key: "#RETURN_VALUE#", val: _return_749}]), "return"); + return (_return_749); }()), function(e) { + + var ctx_310 = ctx_push(ctx_309, [{key: "e", val: e}]); + log_event("JsInterpreter.js", 1732, ctx_310, "let"); + log_event("JsInterpreter.js", 1729, ctx_310, "switch"); + switch (e.tag) { + case "Coq_env_record_decl": + var ed = e.value;var ctx_311 = ctx_push(ctx_310, [{key: "ed", val: ed}]); + log_event("JsInterpreter.js", 1714, ctx_311, "case"); + + var _return_755 = if_some((function () { + log_event("JsInterpreter.js", 1703, ctx_311, "call"); + var _return_750 = HeapStr.read_option( + ed, x); + log_event("JsInterpreter.js", 1702, ctx_push(ctx_311, [{key: "#RETURN_VALUE#", val: _return_750}]), "return"); + return (_return_750); }()), + function(rm) { + + var ctx_312 = ctx_push(ctx_311, [{key: "rm", val: rm}]); + log_event("JsInterpreter.js", 1712, ctx_312, "let"); + var mu = rm[0], v = rm[1]; + var ctx_313 = ctx_push(ctx_312, [{key: "mu", val: mu}, {key: "v", val: v}]); + log_event("JsInterpreter.js", 1709, ctx_313, "let"); + var _if_arg_751 = mutability_compare( + mu, + Coq_mutability_uninitialized_immutable( + )); + log_event("JsInterpreter.js", 1708, ctx_313, "if"); + if (_if_arg_751) { + var _return_754 = (function () { + log_event("JsInterpreter.js", 1706, ctx_313, "call"); + var _return_753 = + out_error_or_cst(s, + str, + Coq_native_error_ref( + ), + Coq_value_prim( + Coq_prim_undef())); + log_event("JsInterpreter.js", 1705, ctx_push(ctx_313, [{key: "#RETURN_VALUE#", val: _return_753}]), "return"); + return (_return_753); + }()) + ; + log_event("JsInterpreter.js", 1707, ctx_push(ctx_313, [{key: "#RETURN_VALUE#", val: _return_754}]), "return"); + return (_return_754); + } else { + var _return_752 = + res_ter(s, res_val(v)); + log_event("JsInterpreter.js", 1704, ctx_push(ctx_313, [{key: "#RETURN_VALUE#", val: _return_752}]), "return"); + return (_return_752); + } + + }); + log_event("JsInterpreter.js", 1713, ctx_push(ctx_311, [{key: "#RETURN_VALUE#", val: _return_755}]), "return"); + return (_return_755); + case "Coq_env_record_object": + var l0 = e.value, pt = e.provide_this;var ctx_314 = ctx_push(ctx_310, [{key: "l0", val: l0}, {key: "pt", val: pt}]); + log_event("JsInterpreter.js", 1728, ctx_314, "case"); + + var _return_761 = if_bool((function () { + log_event("JsInterpreter.js", 1716, ctx_314, "call"); + var _return_756 = object_has_prop( + s, c, l0, + x); + log_event("JsInterpreter.js", 1715, ctx_push(ctx_314, [{key: "#RETURN_VALUE#", val: _return_756}]), "return"); + return (_return_756); }()), + function(s1, has) { + + var ctx_315 = ctx_push(ctx_314, [{key: "s1", val: s1}, {key: "has", val: has}]); + log_event("JsInterpreter.js", 1726, ctx_315, "let"); + log_event("JsInterpreter.js", 1723, ctx_315, "if"); + if (has) { + var _return_760 = (function () { + log_event("JsInterpreter.js", 1721, ctx_315, "call"); + var _return_759 = + run_object_get(s1, c, + l0, x); + log_event("JsInterpreter.js", 1720, ctx_push(ctx_315, [{key: "#RETURN_VALUE#", val: _return_759}]), "return"); + return (_return_759); + }()) + ; + log_event("JsInterpreter.js", 1722, ctx_push(ctx_315, [{key: "#RETURN_VALUE#", val: _return_760}]), "return"); + return (_return_760); + } else { + var _return_758 = (function () { + log_event("JsInterpreter.js", 1718, ctx_315, "call"); + var _return_757 = + out_error_or_cst(s1, + str, + Coq_native_error_ref( + ), + Coq_value_prim( + Coq_prim_undef())); + log_event("JsInterpreter.js", 1717, ctx_push(ctx_315, [{key: "#RETURN_VALUE#", val: _return_757}]), "return"); + return (_return_757); + }()) + ; + log_event("JsInterpreter.js", 1719, ctx_push(ctx_315, [{key: "#RETURN_VALUE#", val: _return_758}]), "return"); + return (_return_758); + } + }); + log_event("JsInterpreter.js", 1727, ctx_push(ctx_314, [{key: "#RETURN_VALUE#", val: _return_761}]), "return"); + return (_return_761); + } + + }); + log_event("JsInterpreter.js", 1733, ctx_push(ctx_309, [{key: "#RETURN_VALUE#", val: _return_762}]), "return"); + return (_return_762); +}; + +var ref_get_value = function (s, c, _foo_) { + var ctx_316 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "_foo_", val: _foo_}]); + log_event("JsInterpreter.js", 1831, ctx_316, "enter"); + log_event("JsInterpreter.js", 1830, ctx_316, "switch"); + switch (_foo_.tag) { + case "Coq_resvalue_empty":log_event("JsInterpreter.js", 1742, ctx_316, "case"); + + var _return_766 = (function () { + log_event("JsInterpreter.js", 1740, ctx_316, "call"); + var _return_765 = function (s, m) { + var ctx_317 = ctx_push(ctx_316, [{key: "s", val: s}, {key: "m", val: m}]); + log_event("JsInterpreter.js", 1738, ctx_317, "enter"); + (function () { + log_event("JsInterpreter.js", 1737, ctx_317, "call"); + var _return_764 = Debug.impossible_with_heap_because( + __LOC__, s, m); + log_event("JsInterpreter.js", 1736, ctx_push(ctx_317, [{key: "#RETURN_VALUE#", val: _return_764}]), "return"); + return (_return_764); + }()) + ; + var _return_763 = Coq_result_impossible(); + log_event("JsInterpreter.js", 1735, ctx_push(ctx_317, [{key: "#RETURN_VALUE#", val: _return_763}]), "return"); + return (_return_763); }(s, + "[ref_get_value] received an empty result."); + log_event("JsInterpreter.js", 1739, ctx_push(ctx_316, [{key: "#RETURN_VALUE#", val: _return_765}]), "return"); + return (_return_765); + }()) + ; + log_event("JsInterpreter.js", 1741, ctx_push(ctx_316, [{key: "#RETURN_VALUE#", val: _return_766}]), "return"); + return (_return_766); + case "Coq_resvalue_value": + var v = _foo_.value;var ctx_318 = ctx_push(ctx_316, [{key: "v", val: v}]); + log_event("JsInterpreter.js", 1744, ctx_318, "case"); + + var _return_767 = res_spec(s, v); + log_event("JsInterpreter.js", 1743, ctx_push(ctx_318, [{key: "#RETURN_VALUE#", val: _return_767}]), "return"); + return (_return_767); + case "Coq_resvalue_ref": + var r = _foo_.ref;var ctx_319 = ctx_push(ctx_316, [{key: "r", val: r}]); + log_event("JsInterpreter.js", 1829, ctx_319, "case"); + + var for_base_or_object = function (tt) { + var ctx_320 = ctx_push(ctx_319, [{key: "tt", val: tt}]); + log_event("JsInterpreter.js", 1784, ctx_320, "enter"); + var _switch_arg_768 = r.ref_base; + log_event("JsInterpreter.js", 1783, ctx_320, "switch"); + switch (_switch_arg_768.tag) { + case "Coq_ref_base_type_value": + var v = _switch_arg_768.value;var ctx_321 = ctx_push(ctx_320, [{key: "v", val: v}]); + log_event("JsInterpreter.js", 1774, ctx_321, "case"); + + var _if_arg_769 = (function () { + log_event("JsInterpreter.js", 1748, ctx_321, "call"); + var _return_771 = ref_kind_comparable((function () { + log_event("JsInterpreter.js", 1746, ctx_321, "call"); + var _return_770 = ref_kind_of(r); + log_event("JsInterpreter.js", 1745, ctx_push(ctx_321, [{key: "#RETURN_VALUE#", val: _return_770}]), "return"); + return (_return_770); }()), + Coq_ref_kind_primitive_base()); + log_event("JsInterpreter.js", 1747, ctx_push(ctx_321, [{key: "#RETURN_VALUE#", val: _return_771}]), "return"); + return (_return_771); + }()) + ; + log_event("JsInterpreter.js", 1773, ctx_321, "if"); + if (_if_arg_769) { + var _return_781 = if_value((function () { + log_event("JsInterpreter.js", 1767, ctx_321, "call"); + var _return_779 = prim_value_get(s, c, v, + r.ref_name); + log_event("JsInterpreter.js", 1766, ctx_push(ctx_321, [{key: "#RETURN_VALUE#", val: _return_779}]), "return"); + return (_return_779); }()), function(s2, + v) { + + var ctx_326 = ctx_push(ctx_321, [{key: "s2", val: s2}, {key: "v", val: v}]); + log_event("JsInterpreter.js", 1771, ctx_326, "let"); + var _return_780 = res_spec(s2, v); + log_event("JsInterpreter.js", 1768, ctx_push(ctx_326, [{key: "#RETURN_VALUE#", val: _return_780}]), "return"); + return (_return_780); + }); + log_event("JsInterpreter.js", 1772, ctx_push(ctx_321, [{key: "#RETURN_VALUE#", val: _return_781}]), "return"); + return (_return_781); + } else { + log_event("JsInterpreter.js", 1765, ctx_321, "switch"); + switch (v.tag) { + case "Coq_value_prim": + var p = v.value;var ctx_322 = ctx_push(ctx_321, [{key: "p", val: p}]); + log_event("JsInterpreter.js", 1756, ctx_322, "case"); + + var _return_775 = (function () { + log_event("JsInterpreter.js", 1754, ctx_322, "call"); + var _return_774 = function (s, m) { + var ctx_323 = ctx_push(ctx_322, [{key: "s", val: s}, {key: "m", val: m}]); + log_event("JsInterpreter.js", 1752, ctx_323, "enter"); + (function () { + log_event("JsInterpreter.js", 1751, ctx_323, "call"); + var _return_773 = Debug.impossible_with_heap_because( + __LOC__, s, + m); + log_event("JsInterpreter.js", 1750, ctx_push(ctx_323, [{key: "#RETURN_VALUE#", val: _return_773}]), "return"); + return (_return_773); + }()) + ; + var _return_772 = Coq_result_impossible( + ); + log_event("JsInterpreter.js", 1749, ctx_push(ctx_323, [{key: "#RETURN_VALUE#", val: _return_772}]), "return"); + return (_return_772); }(s, + "[ref_get_value] received a primitive value whose kind is not primitive."); + log_event("JsInterpreter.js", 1753, ctx_push(ctx_322, [{key: "#RETURN_VALUE#", val: _return_774}]), "return"); + return (_return_774); + }()) + ; + log_event("JsInterpreter.js", 1755, ctx_push(ctx_322, [{key: "#RETURN_VALUE#", val: _return_775}]), "return"); + return (_return_775); + case "Coq_value_object": + var l = v.value;var ctx_324 = ctx_push(ctx_321, [{key: "l", val: l}]); + log_event("JsInterpreter.js", 1764, ctx_324, "case"); + + var _return_778 = if_value((function () { + log_event("JsInterpreter.js", 1758, ctx_324, "call"); + var _return_776 = run_object_get(s, + c, l, r.ref_name); + log_event("JsInterpreter.js", 1757, ctx_push(ctx_324, [{key: "#RETURN_VALUE#", val: _return_776}]), "return"); + return (_return_776); }()), + function(s2, v) { + + var ctx_325 = ctx_push(ctx_324, [{key: "s2", val: s2}, {key: "v", val: v}]); + log_event("JsInterpreter.js", 1762, ctx_325, "let"); + var _return_777 = res_spec(s2, v); + log_event("JsInterpreter.js", 1759, ctx_push(ctx_325, [{key: "#RETURN_VALUE#", val: _return_777}]), "return"); + return (_return_777); + }); + log_event("JsInterpreter.js", 1763, ctx_push(ctx_324, [{key: "#RETURN_VALUE#", val: _return_778}]), "return"); + return (_return_778); + } + + } + case "Coq_ref_base_type_env_loc": + var l = _switch_arg_768.value;var ctx_327 = ctx_push(ctx_320, [{key: "l", val: l}]); + log_event("JsInterpreter.js", 1782, ctx_327, "case"); + + var _return_785 = (function () { + log_event("JsInterpreter.js", 1780, ctx_327, "call"); + var _return_784 = function (s, m) { + var ctx_328 = ctx_push(ctx_327, [{key: "s", val: s}, {key: "m", val: m}]); + log_event("JsInterpreter.js", 1778, ctx_328, "enter"); + (function () { + log_event("JsInterpreter.js", 1777, ctx_328, "call"); + var _return_783 = Debug.impossible_with_heap_because( + __LOC__, s, m); + log_event("JsInterpreter.js", 1776, ctx_push(ctx_328, [{key: "#RETURN_VALUE#", val: _return_783}]), "return"); + return (_return_783); + }()) + ; + var _return_782 = Coq_result_impossible(); + log_event("JsInterpreter.js", 1775, ctx_push(ctx_328, [{key: "#RETURN_VALUE#", val: _return_782}]), "return"); + return (_return_782); }(s, + "[ref_get_value] received a reference to a value whose base type is an environnment record."); + log_event("JsInterpreter.js", 1779, ctx_push(ctx_327, [{key: "#RETURN_VALUE#", val: _return_784}]), "return"); + return (_return_784); + }()) + ; + log_event("JsInterpreter.js", 1781, ctx_push(ctx_327, [{key: "#RETURN_VALUE#", val: _return_785}]), "return"); + return (_return_785); + } + + }; + var ctx_329 = ctx_push(ctx_319, [{key: "for_base_or_object", val: for_base_or_object}]); + log_event("JsInterpreter.js", 1828, ctx_329, "let"); + var _switch_arg_786 = (function () { + log_event("JsInterpreter.js", 1786, ctx_329, "call"); + var _return_787 = ref_kind_of(r); + log_event("JsInterpreter.js", 1785, ctx_push(ctx_329, [{key: "#RETURN_VALUE#", val: _return_787}]), "return"); + return (_return_787); + }()) + ; + log_event("JsInterpreter.js", 1827, ctx_329, "switch"); + switch (_switch_arg_786.tag) { + case "Coq_ref_kind_null":log_event("JsInterpreter.js", 1794, ctx_329, "case"); + + var _return_791 = (function () { + log_event("JsInterpreter.js", 1792, ctx_329, "call"); + var _return_790 = function (s, m) { + var ctx_330 = ctx_push(ctx_329, [{key: "s", val: s}, {key: "m", val: m}]); + log_event("JsInterpreter.js", 1790, ctx_330, "enter"); + (function () { + log_event("JsInterpreter.js", 1789, ctx_330, "call"); + var _return_789 = Debug.impossible_with_heap_because( + __LOC__, s, m); + log_event("JsInterpreter.js", 1788, ctx_push(ctx_330, [{key: "#RETURN_VALUE#", val: _return_789}]), "return"); + return (_return_789); + }()) + ; + var _return_788 = Coq_result_impossible(); + log_event("JsInterpreter.js", 1787, ctx_push(ctx_330, [{key: "#RETURN_VALUE#", val: _return_788}]), "return"); + return (_return_788); }(s, + "[ref_get_value] received a reference whose base is [null]."); + log_event("JsInterpreter.js", 1791, ctx_push(ctx_329, [{key: "#RETURN_VALUE#", val: _return_790}]), "return"); + return (_return_790); + }()) + ; + log_event("JsInterpreter.js", 1793, ctx_push(ctx_329, [{key: "#RETURN_VALUE#", val: _return_791}]), "return"); + return (_return_791); + case "Coq_ref_kind_undef":log_event("JsInterpreter.js", 1800, ctx_329, "case"); + + var _return_794 = (function () { + log_event("JsInterpreter.js", 1798, ctx_329, "call"); + var _return_793 = throw_result((function () { + log_event("JsInterpreter.js", 1796, ctx_329, "call"); + var _return_792 = run_error(s, + Coq_native_error_ref()); + log_event("JsInterpreter.js", 1795, ctx_push(ctx_329, [{key: "#RETURN_VALUE#", val: _return_792}]), "return"); + return (_return_792); }())); + log_event("JsInterpreter.js", 1797, ctx_push(ctx_329, [{key: "#RETURN_VALUE#", val: _return_793}]), "return"); + return (_return_793); + }()) + ; + log_event("JsInterpreter.js", 1799, ctx_push(ctx_329, [{key: "#RETURN_VALUE#", val: _return_794}]), "return"); + return (_return_794); + case "Coq_ref_kind_primitive_base":log_event("JsInterpreter.js", 1804, ctx_329, "case"); + + var _return_796 = (function () { + log_event("JsInterpreter.js", 1802, ctx_329, "call"); + var _return_795 = for_base_or_object({}); + log_event("JsInterpreter.js", 1801, ctx_push(ctx_329, [{key: "#RETURN_VALUE#", val: _return_795}]), "return"); + return (_return_795); + }()) + ; + log_event("JsInterpreter.js", 1803, ctx_push(ctx_329, [{key: "#RETURN_VALUE#", val: _return_796}]), "return"); + return (_return_796); + case "Coq_ref_kind_object":log_event("JsInterpreter.js", 1808, ctx_329, "case"); + + var _return_798 = (function () { + log_event("JsInterpreter.js", 1806, ctx_329, "call"); + var _return_797 = for_base_or_object({}); + log_event("JsInterpreter.js", 1805, ctx_push(ctx_329, [{key: "#RETURN_VALUE#", val: _return_797}]), "return"); + return (_return_797); + }()) + ; + log_event("JsInterpreter.js", 1807, ctx_push(ctx_329, [{key: "#RETURN_VALUE#", val: _return_798}]), "return"); + return (_return_798); + case "Coq_ref_kind_env_record":log_event("JsInterpreter.js", 1826, ctx_329, "case"); + + var _switch_arg_799 = r.ref_base; + log_event("JsInterpreter.js", 1825, ctx_329, "switch"); + switch (_switch_arg_799.tag) { + case "Coq_ref_base_type_value": + var v = _switch_arg_799.value;var ctx_331 = ctx_push(ctx_329, [{key: "v", val: v}]); + log_event("JsInterpreter.js", 1816, ctx_331, "case"); + + var _return_803 = (function () { + log_event("JsInterpreter.js", 1814, ctx_331, "call"); + var _return_802 = function (s, m) { + var ctx_332 = ctx_push(ctx_331, [{key: "s", val: s}, {key: "m", val: m}]); + log_event("JsInterpreter.js", 1812, ctx_332, "enter"); + (function () { + log_event("JsInterpreter.js", 1811, ctx_332, "call"); + var _return_801 = Debug.impossible_with_heap_because( + __LOC__, s, m); + log_event("JsInterpreter.js", 1810, ctx_push(ctx_332, [{key: "#RETURN_VALUE#", val: _return_801}]), "return"); + return (_return_801); + }()) + ; + var _return_800 = Coq_result_impossible( + ); + log_event("JsInterpreter.js", 1809, ctx_push(ctx_332, [{key: "#RETURN_VALUE#", val: _return_800}]), "return"); + return (_return_800); }(s, + "[ref_get_value] received a reference to an environnment record whose base type is a value."); + log_event("JsInterpreter.js", 1813, ctx_push(ctx_331, [{key: "#RETURN_VALUE#", val: _return_802}]), "return"); + return (_return_802); + }()) + ; + log_event("JsInterpreter.js", 1815, ctx_push(ctx_331, [{key: "#RETURN_VALUE#", val: _return_803}]), "return"); + return (_return_803); + case "Coq_ref_base_type_env_loc": + var l = _switch_arg_799.value;var ctx_333 = ctx_push(ctx_329, [{key: "l", val: l}]); + log_event("JsInterpreter.js", 1824, ctx_333, "case"); + + var _return_806 = if_value((function () { + log_event("JsInterpreter.js", 1818, ctx_333, "call"); + var _return_804 = env_record_get_binding_value( + s, c, l, r.ref_name, + r.ref_strict); + log_event("JsInterpreter.js", 1817, ctx_push(ctx_333, [{key: "#RETURN_VALUE#", val: _return_804}]), "return"); + return (_return_804); }()), function(s2, + v) { + + var ctx_334 = ctx_push(ctx_333, [{key: "s2", val: s2}, {key: "v", val: v}]); + log_event("JsInterpreter.js", 1822, ctx_334, "let"); + var _return_805 = res_spec(s2, v); + log_event("JsInterpreter.js", 1819, ctx_push(ctx_334, [{key: "#RETURN_VALUE#", val: _return_805}]), "return"); + return (_return_805); + }); + log_event("JsInterpreter.js", 1823, ctx_push(ctx_333, [{key: "#RETURN_VALUE#", val: _return_806}]), "return"); + return (_return_806); + } + + } + + + } + +}; + +var run_expr_get_value = function (s, c, e) { + var ctx_335 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "e", val: e}]); + log_event("JsInterpreter.js", 1841, ctx_335, "enter"); + var _return_810 = if_success((function () { + log_event("JsInterpreter.js", 1833, ctx_335, "call"); + var _return_807 = run_expr(s, c, e); + log_event("JsInterpreter.js", 1832, ctx_push(ctx_335, [{key: "#RETURN_VALUE#", val: _return_807}]), "return"); + return (_return_807); }()), function(s0, rv) { + + var ctx_336 = ctx_push(ctx_335, [{key: "s0", val: s0}, {key: "rv", val: rv}]); + log_event("JsInterpreter.js", 1839, ctx_336, "let"); + var _return_809 = (function () { + log_event("JsInterpreter.js", 1835, ctx_336, "call"); + var _return_808 = ref_get_value(s0, c, rv); + log_event("JsInterpreter.js", 1834, ctx_push(ctx_336, [{key: "#RETURN_VALUE#", val: _return_808}]), "return"); + return (_return_808); + }()) + ; + log_event("JsInterpreter.js", 1836, ctx_push(ctx_336, [{key: "#RETURN_VALUE#", val: _return_809}]), "return"); + return (_return_809); + }); + log_event("JsInterpreter.js", 1840, ctx_push(ctx_335, [{key: "#RETURN_VALUE#", val: _return_810}]), "return"); + return (_return_810); +}; + +var object_put_complete = function (b, s, c, vthis, l, x, v, str) { + var ctx_337 = ctx_push(ctx_empty, [{key: "b", val: b}, {key: "s", val: s}, {key: "c", val: c}, {key: "vthis", val: vthis}, {key: "l", val: l}, {key: "x", val: x}, {key: "v", val: v}, {key: "str", val: str}]); + log_event("JsInterpreter.js", 1947, ctx_337, "enter"); + log_event("JsInterpreter.js", 1946, ctx_337, "switch"); + switch (b.tag) { + case "Coq_builtin_put_default":log_event("JsInterpreter.js", 1945, ctx_337, "case"); + + var _return_848 = if_bool((function () { + log_event("JsInterpreter.js", 1843, ctx_337, "call"); + var _return_811 = object_can_put(s, c, l, x); + log_event("JsInterpreter.js", 1842, ctx_push(ctx_337, [{key: "#RETURN_VALUE#", val: _return_811}]), "return"); + return (_return_811); }()), function(s1, b0) { + + var ctx_338 = ctx_push(ctx_337, [{key: "s1", val: s1}, {key: "b0", val: b0}]); + log_event("JsInterpreter.js", 1943, ctx_338, "let"); + log_event("JsInterpreter.js", 1940, ctx_338, "if"); + if (b0) { + var _return_847 = if_run((function () { + log_event("JsInterpreter.js", 1848, ctx_338, "call"); + var _return_814 = + run_object_get_own_prop( + s1, c, l, x); + log_event("JsInterpreter.js", 1847, ctx_push(ctx_338, [{key: "#RETURN_VALUE#", val: _return_814}]), "return"); + return (_return_814); + }()), function(s2, d) { + + var ctx_339 = ctx_push(ctx_338, [{key: "s2", val: s2}, {key: "d", val: d}]); + log_event("JsInterpreter.js", 1938, ctx_339, "let"); + var follow = function (x0) { + var ctx_340 = ctx_push(ctx_339, [{key: "x0", val: x0}]); + log_event("JsInterpreter.js", 1906, ctx_340, "enter"); + var _return_836 = + if_run((function () { + log_event("JsInterpreter.js", 1850, ctx_340, "call"); + var _return_815 = + run_object_get_prop( + s2, c, l, x); + log_event("JsInterpreter.js", 1849, ctx_push(ctx_340, [{key: "#RETURN_VALUE#", val: _return_815}]), "return"); + return (_return_815); + }()), function(s3, + d_2) { + + var ctx_341 = ctx_push(ctx_340, [{key: "s3", val: s3}, {key: "d_2", val: d_2}]); + log_event("JsInterpreter.js", 1904, ctx_341, "let"); + var follow_2 = function (x1) { + var ctx_342 = ctx_push(ctx_341, [{key: "x1", val: x1}]); + log_event("JsInterpreter.js", 1869, ctx_342, "enter"); + log_event("JsInterpreter.js", 1868, ctx_342, "switch"); + switch (vthis.tag) { + case "Coq_value_prim": + var wthis = vthis.value;var ctx_343 = ctx_push(ctx_342, [{key: "wthis", val: wthis}]); + log_event("JsInterpreter.js", 1854, ctx_343, "case"); + + var _return_817 = (function () { + log_event("JsInterpreter.js", 1852, ctx_343, "call"); + var _return_816 = + out_error_or_void( + s3, str, + Coq_native_error_type( + )); + log_event("JsInterpreter.js", 1851, ctx_push(ctx_343, [{key: "#RETURN_VALUE#", val: _return_816}]), "return"); + return (_return_816); + }()) + ; + log_event("JsInterpreter.js", 1853, ctx_push(ctx_343, [{key: "#RETURN_VALUE#", val: _return_817}]), "return"); + return (_return_817); + case "Coq_value_object": + var lthis = vthis.value;var ctx_344 = ctx_push(ctx_342, [{key: "lthis", val: lthis}]); + log_event("JsInterpreter.js", 1867, ctx_344, "case"); + + var desc = (function () { + log_event("JsInterpreter.js", 1856, ctx_344, "call"); + var _return_818 = + descriptor_intro_data( + v, true, + true, + true); + log_event("JsInterpreter.js", 1855, ctx_push(ctx_344, [{key: "#RETURN_VALUE#", val: _return_818}]), "return"); + return (_return_818); + }()) + ; + var ctx_345 = ctx_push(ctx_344, [{key: "desc", val: desc}]); + log_event("JsInterpreter.js", 1866, ctx_345, "let"); + var _return_822 = + if_success( + (function () { + log_event("JsInterpreter.js", 1858, ctx_345, "call"); + var _return_819 = + object_define_own_prop( + s3, c, l, + x, desc, + str); + log_event("JsInterpreter.js", 1857, ctx_push(ctx_345, [{key: "#RETURN_VALUE#", val: _return_819}]), "return"); + return (_return_819); + }()), + function(s4, + rv) { + + var ctx_346 = ctx_push(ctx_345, [{key: "s4", val: s4}, {key: "rv", val: rv}]); + log_event("JsInterpreter.js", 1864, ctx_346, "let"); + var _return_821 = (function () { + log_event("JsInterpreter.js", 1860, ctx_346, "call"); + var _return_820 = + res_void( + s4); + log_event("JsInterpreter.js", 1859, ctx_push(ctx_346, [{key: "#RETURN_VALUE#", val: _return_820}]), "return"); + return (_return_820); + }()) + ; + log_event("JsInterpreter.js", 1861, ctx_push(ctx_346, [{key: "#RETURN_VALUE#", val: _return_821}]), "return"); + return (_return_821); + }); + log_event("JsInterpreter.js", 1865, ctx_push(ctx_345, [{key: "#RETURN_VALUE#", val: _return_822}]), "return"); + return (_return_822); + + } + + }; + var ctx_347 = ctx_push(ctx_341, [{key: "follow_2", val: follow_2}]); + log_event("JsInterpreter.js", 1901, ctx_347, "let"); + log_event("JsInterpreter.js", 1900, ctx_347, "switch"); + switch (d_2.tag) { + case "Coq_full_descriptor_undef":log_event("JsInterpreter.js", 1873, ctx_347, "case"); + + var _return_824 = (function () { + log_event("JsInterpreter.js", 1871, ctx_347, "call"); + var _return_823 = + follow_2({}); + log_event("JsInterpreter.js", 1870, ctx_push(ctx_347, [{key: "#RETURN_VALUE#", val: _return_823}]), "return"); + return (_return_823); + }()) + ; + log_event("JsInterpreter.js", 1872, ctx_push(ctx_347, [{key: "#RETURN_VALUE#", val: _return_824}]), "return"); + return (_return_824); + case "Coq_full_descriptor_some": + var a = d_2.value;var ctx_348 = ctx_push(ctx_347, [{key: "a", val: a}]); + log_event("JsInterpreter.js", 1899, ctx_348, "case"); + + log_event("JsInterpreter.js", 1898, ctx_348, "switch"); + switch (a.tag) { + case "Coq_attributes_data_of": + var a0 = a.value;var ctx_349 = ctx_push(ctx_348, [{key: "a0", val: a0}]); + log_event("JsInterpreter.js", 1877, ctx_349, "case"); + + var _return_826 = (function () { + log_event("JsInterpreter.js", 1875, ctx_349, "call"); + var _return_825 = + follow_2( + {}); + log_event("JsInterpreter.js", 1874, ctx_push(ctx_349, [{key: "#RETURN_VALUE#", val: _return_825}]), "return"); + return (_return_825); + }()) + ; + log_event("JsInterpreter.js", 1876, ctx_push(ctx_349, [{key: "#RETURN_VALUE#", val: _return_826}]), "return"); + return (_return_826); + case "Coq_attributes_accessor_of": + var aa_2 = a.value;var ctx_350 = ctx_push(ctx_348, [{key: "aa_2", val: aa_2}]); + log_event("JsInterpreter.js", 1897, ctx_350, "case"); + + var _switch_arg_827 = aa_2.attributes_accessor_set; + log_event("JsInterpreter.js", 1896, ctx_350, "switch"); + switch (_switch_arg_827.tag) { + case "Coq_value_prim": + var p = _switch_arg_827.value;var ctx_351 = ctx_push(ctx_350, [{key: "p", val: p}]); + log_event("JsInterpreter.js", 1885, ctx_351, "case"); + + var _return_831 = (function () { + log_event("JsInterpreter.js", 1883, ctx_351, "call"); + var _return_830 = + function (s, m) { + var ctx_352 = ctx_push(ctx_351, [{key: "s", val: s}, {key: "m", val: m}]); + log_event("JsInterpreter.js", 1881, ctx_352, "enter"); + (function () { + log_event("JsInterpreter.js", 1880, ctx_352, "call"); + var _return_829 = + Debug.impossible_with_heap_because( + __LOC__, + s, m); + log_event("JsInterpreter.js", 1879, ctx_push(ctx_352, [{key: "#RETURN_VALUE#", val: _return_829}]), "return"); + return (_return_829); + }()) + ; + var _return_828 = + Coq_result_impossible( + ); + log_event("JsInterpreter.js", 1878, ctx_push(ctx_352, [{key: "#RETURN_VALUE#", val: _return_828}]), "return"); + return (_return_828); + }(s3, + "[object_put_complete] found a primitive in an `set' accessor."); + log_event("JsInterpreter.js", 1882, ctx_push(ctx_351, [{key: "#RETURN_VALUE#", val: _return_830}]), "return"); + return (_return_830); + }()) + ; + log_event("JsInterpreter.js", 1884, ctx_push(ctx_351, [{key: "#RETURN_VALUE#", val: _return_831}]), "return"); + return (_return_831); + case "Coq_value_object": + var lfsetter = _switch_arg_827.value;var ctx_353 = ctx_push(ctx_350, [{key: "lfsetter", val: lfsetter}]); + log_event("JsInterpreter.js", 1895, ctx_353, "case"); + + var _return_835 = + if_success( + (function () { + log_event("JsInterpreter.js", 1887, ctx_353, "call"); + var _return_832 = + run_call( + s3, c, + lfsetter, + vthis, + mk_cons( + v, + mk_nil())); + log_event("JsInterpreter.js", 1886, ctx_push(ctx_353, [{key: "#RETURN_VALUE#", val: _return_832}]), "return"); + return (_return_832); + }()), + function(s4, + rv) { + + var ctx_354 = ctx_push(ctx_353, [{key: "s4", val: s4}, {key: "rv", val: rv}]); + log_event("JsInterpreter.js", 1893, ctx_354, "let"); + var _return_834 = (function () { + log_event("JsInterpreter.js", 1889, ctx_354, "call"); + var _return_833 = + res_void( + s4); + log_event("JsInterpreter.js", 1888, ctx_push(ctx_354, [{key: "#RETURN_VALUE#", val: _return_833}]), "return"); + return (_return_833); + }()) + ; + log_event("JsInterpreter.js", 1890, ctx_push(ctx_354, [{key: "#RETURN_VALUE#", val: _return_834}]), "return"); + return (_return_834); + }); + log_event("JsInterpreter.js", 1894, ctx_push(ctx_353, [{key: "#RETURN_VALUE#", val: _return_835}]), "return"); + return (_return_835); + } + + } + + } + + + }); + log_event("JsInterpreter.js", 1905, ctx_push(ctx_340, [{key: "#RETURN_VALUE#", val: _return_836}]), "return"); + return (_return_836); + }; + var ctx_355 = ctx_push(ctx_339, [{key: "follow", val: follow}]); + log_event("JsInterpreter.js", 1935, ctx_355, "let"); + log_event("JsInterpreter.js", 1934, ctx_355, "switch"); + switch (d.tag) { + case "Coq_full_descriptor_undef":log_event("JsInterpreter.js", 1910, ctx_355, "case"); + + var _return_838 = (function () { + log_event("JsInterpreter.js", 1908, ctx_355, "call"); + var _return_837 = + follow({}); + log_event("JsInterpreter.js", 1907, ctx_push(ctx_355, [{key: "#RETURN_VALUE#", val: _return_837}]), "return"); + return (_return_837); + }()) + ; + log_event("JsInterpreter.js", 1909, ctx_push(ctx_355, [{key: "#RETURN_VALUE#", val: _return_838}]), "return"); + return (_return_838); + case "Coq_full_descriptor_some": + var a = d.value;var ctx_356 = ctx_push(ctx_355, [{key: "a", val: a}]); + log_event("JsInterpreter.js", 1933, ctx_356, "case"); + + log_event("JsInterpreter.js", 1932, ctx_356, "switch"); + switch (a.tag) { + case "Coq_attributes_data_of": + var ad = a.value;var ctx_357 = ctx_push(ctx_356, [{key: "ad", val: ad}]); + log_event("JsInterpreter.js", 1927, ctx_357, "case"); + + log_event("JsInterpreter.js", 1926, ctx_357, "switch"); + switch (vthis.tag) { + case "Coq_value_prim": + var wthis = vthis.value;var ctx_358 = ctx_push(ctx_357, [{key: "wthis", val: wthis}]); + log_event("JsInterpreter.js", 1914, ctx_358, "case"); + + var _return_840 = (function () { + log_event("JsInterpreter.js", 1912, ctx_358, "call"); + var _return_839 = + out_error_or_void( + s2, str, + Coq_native_error_type( + )); + log_event("JsInterpreter.js", 1911, ctx_push(ctx_358, [{key: "#RETURN_VALUE#", val: _return_839}]), "return"); + return (_return_839); + }()) + ; + log_event("JsInterpreter.js", 1913, ctx_push(ctx_358, [{key: "#RETURN_VALUE#", val: _return_840}]), "return"); + return (_return_840); + case "Coq_value_object": + var lthis = vthis.value;var ctx_359 = ctx_push(ctx_357, [{key: "lthis", val: lthis}]); + log_event("JsInterpreter.js", 1925, ctx_359, "case"); + + var desc = { + descriptor_value: + Some(v), + descriptor_writable: + None(), + descriptor_get: + None(), + descriptor_set: + None(), + descriptor_enumerable: + None(), + descriptor_configurable: + None() + }; + var ctx_360 = ctx_push(ctx_359, [{key: "desc", val: desc}]); + log_event("JsInterpreter.js", 1924, ctx_360, "let"); + var _return_844 = + if_success( + (function () { + log_event("JsInterpreter.js", 1916, ctx_360, "call"); + var _return_841 = + object_define_own_prop( + s2, c, l, + x, desc, + str); + log_event("JsInterpreter.js", 1915, ctx_push(ctx_360, [{key: "#RETURN_VALUE#", val: _return_841}]), "return"); + return (_return_841); + }()), + function(s3, + rv) { + + var ctx_361 = ctx_push(ctx_360, [{key: "s3", val: s3}, {key: "rv", val: rv}]); + log_event("JsInterpreter.js", 1922, ctx_361, "let"); + var _return_843 = (function () { + log_event("JsInterpreter.js", 1918, ctx_361, "call"); + var _return_842 = + res_void( + s3); + log_event("JsInterpreter.js", 1917, ctx_push(ctx_361, [{key: "#RETURN_VALUE#", val: _return_842}]), "return"); + return (_return_842); + }()) + ; + log_event("JsInterpreter.js", 1919, ctx_push(ctx_361, [{key: "#RETURN_VALUE#", val: _return_843}]), "return"); + return (_return_843); + }); + log_event("JsInterpreter.js", 1923, ctx_push(ctx_360, [{key: "#RETURN_VALUE#", val: _return_844}]), "return"); + return (_return_844); + + } + + case "Coq_attributes_accessor_of": + var a0 = a.value;var ctx_362 = ctx_push(ctx_356, [{key: "a0", val: a0}]); + log_event("JsInterpreter.js", 1931, ctx_362, "case"); + + var _return_846 = (function () { + log_event("JsInterpreter.js", 1929, ctx_362, "call"); + var _return_845 = + follow({}); + log_event("JsInterpreter.js", 1928, ctx_push(ctx_362, [{key: "#RETURN_VALUE#", val: _return_845}]), "return"); + return (_return_845); + }()) + ; + log_event("JsInterpreter.js", 1930, ctx_push(ctx_362, [{key: "#RETURN_VALUE#", val: _return_846}]), "return"); + return (_return_846); + } + + } + + + }); + log_event("JsInterpreter.js", 1939, ctx_push(ctx_338, [{key: "#RETURN_VALUE#", val: _return_847}]), "return"); + return (_return_847); + } else { + var _return_813 = (function () { + log_event("JsInterpreter.js", 1845, ctx_338, "call"); + var _return_812 = out_error_or_void(s1, str, + Coq_native_error_type()); + log_event("JsInterpreter.js", 1844, ctx_push(ctx_338, [{key: "#RETURN_VALUE#", val: _return_812}]), "return"); + return (_return_812); + }()) + ; + log_event("JsInterpreter.js", 1846, ctx_push(ctx_338, [{key: "#RETURN_VALUE#", val: _return_813}]), "return"); + return (_return_813); + } + }); + log_event("JsInterpreter.js", 1944, ctx_push(ctx_337, [{key: "#RETURN_VALUE#", val: _return_848}]), "return"); + return (_return_848); + } + +}; + +var object_put = function (s, c, l, x, v, str) { + var ctx_363 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "l", val: l}, {key: "x", val: x}, {key: "v", val: v}, {key: "str", val: str}]); + log_event("JsInterpreter.js", 1957, ctx_363, "enter"); + var _return_852 = if_some((function () { + log_event("JsInterpreter.js", 1949, ctx_363, "call"); + var _return_849 = run_object_method(object_put_, s, + l); + log_event("JsInterpreter.js", 1948, ctx_push(ctx_363, [{key: "#RETURN_VALUE#", val: _return_849}]), "return"); + return (_return_849); }()), function(b) { + + var ctx_364 = ctx_push(ctx_363, [{key: "b", val: b}]); + log_event("JsInterpreter.js", 1955, ctx_364, "let"); + var _return_851 = (function () { + log_event("JsInterpreter.js", 1951, ctx_364, "call"); + var _return_850 = object_put_complete(b, s, c, + Coq_value_object(l), l, x, v, + str); + log_event("JsInterpreter.js", 1950, ctx_push(ctx_364, [{key: "#RETURN_VALUE#", val: _return_850}]), "return"); + return (_return_850); + }()) + ; + log_event("JsInterpreter.js", 1952, ctx_push(ctx_364, [{key: "#RETURN_VALUE#", val: _return_851}]), "return"); + return (_return_851); + }); + log_event("JsInterpreter.js", 1956, ctx_push(ctx_363, [{key: "#RETURN_VALUE#", val: _return_852}]), "return"); + return (_return_852); +}; + +var env_record_set_mutable_binding = function (s, c, l, x, v, str) { + var ctx_365 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "l", val: l}, {key: "x", val: x}, {key: "v", val: v}, {key: "str", val: str}]); + log_event("JsInterpreter.js", 1988, ctx_365, "enter"); + var _return_865 = if_some((function () { + log_event("JsInterpreter.js", 1959, ctx_365, "call"); + var _return_853 = env_record_binds_pickable_option(s, + l); + log_event("JsInterpreter.js", 1958, ctx_push(ctx_365, [{key: "#RETURN_VALUE#", val: _return_853}]), "return"); + return (_return_853); }()), function(e) { + + var ctx_366 = ctx_push(ctx_365, [{key: "e", val: e}]); + log_event("JsInterpreter.js", 1986, ctx_366, "let"); + log_event("JsInterpreter.js", 1983, ctx_366, "switch"); + switch (e.tag) { + case "Coq_env_record_decl": + var ed = e.value;var ctx_367 = ctx_push(ctx_366, [{key: "ed", val: ed}]); + log_event("JsInterpreter.js", 1978, ctx_367, "case"); + + var _return_862 = if_some((function () { + log_event("JsInterpreter.js", 1961, ctx_367, "call"); + var _return_854 = HeapStr.read_option( + ed, x); + log_event("JsInterpreter.js", 1960, ctx_push(ctx_367, [{key: "#RETURN_VALUE#", val: _return_854}]), "return"); + return (_return_854); }()), + function(rm) { + + var ctx_368 = ctx_push(ctx_367, [{key: "rm", val: rm}]); + log_event("JsInterpreter.js", 1976, ctx_368, "let"); + var mu = rm[0], + v_old = rm[1]; + var ctx_369 = ctx_push(ctx_368, [{key: "mu", val: mu}, {key: "v_old", val: v_old}]); + log_event("JsInterpreter.js", 1973, ctx_369, "let"); + var _if_arg_855 = (function () { + log_event("JsInterpreter.js", 1963, ctx_369, "call"); + var _return_856 = + !( + mutability_compare(mu, + Coq_mutability_immutable( + ))); + log_event("JsInterpreter.js", 1962, ctx_push(ctx_369, [{key: "#RETURN_VALUE#", val: _return_856}]), "return"); + return (_return_856); + }()) + ; + log_event("JsInterpreter.js", 1972, ctx_369, "if"); + if (_if_arg_855) { + var _return_861 = (function () { + log_event("JsInterpreter.js", 1970, ctx_369, "call"); + var _return_860 = + res_void((function () { + log_event("JsInterpreter.js", 1968, ctx_369, "call"); + var _return_859 = + env_record_write_decl_env( + s, l, x, mu, v); + log_event("JsInterpreter.js", 1967, ctx_push(ctx_369, [{key: "#RETURN_VALUE#", val: _return_859}]), "return"); + return (_return_859); + }())); + log_event("JsInterpreter.js", 1969, ctx_push(ctx_369, [{key: "#RETURN_VALUE#", val: _return_860}]), "return"); + return (_return_860); + }()) + ; + log_event("JsInterpreter.js", 1971, ctx_push(ctx_369, [{key: "#RETURN_VALUE#", val: _return_861}]), "return"); + return (_return_861); + } else { + var _return_858 = (function () { + log_event("JsInterpreter.js", 1965, ctx_369, "call"); + var _return_857 = + out_error_or_void(s, + str, + Coq_native_error_type( + )); + log_event("JsInterpreter.js", 1964, ctx_push(ctx_369, [{key: "#RETURN_VALUE#", val: _return_857}]), "return"); + return (_return_857); + }()) + ; + log_event("JsInterpreter.js", 1966, ctx_push(ctx_369, [{key: "#RETURN_VALUE#", val: _return_858}]), "return"); + return (_return_858); + } + + }); + log_event("JsInterpreter.js", 1977, ctx_push(ctx_367, [{key: "#RETURN_VALUE#", val: _return_862}]), "return"); + return (_return_862); + case "Coq_env_record_object": + var l0 = e.value, pt = e.provide_this;var ctx_370 = ctx_push(ctx_366, [{key: "l0", val: l0}, {key: "pt", val: pt}]); + log_event("JsInterpreter.js", 1982, ctx_370, "case"); + + var _return_864 = (function () { + log_event("JsInterpreter.js", 1980, ctx_370, "call"); + var _return_863 = object_put(s, c, l0, x, v, + str); + log_event("JsInterpreter.js", 1979, ctx_push(ctx_370, [{key: "#RETURN_VALUE#", val: _return_863}]), "return"); + return (_return_863); + }()) + ; + log_event("JsInterpreter.js", 1981, ctx_push(ctx_370, [{key: "#RETURN_VALUE#", val: _return_864}]), "return"); + return (_return_864); + } + + }); + log_event("JsInterpreter.js", 1987, ctx_push(ctx_365, [{key: "#RETURN_VALUE#", val: _return_865}]), "return"); + return (_return_865); +}; + +var prim_value_put = function (s, c, w, x, v, str) { + var ctx_371 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "w", val: w}, {key: "x", val: x}, {key: "v", val: v}, {key: "str", val: str}]); + log_event("JsInterpreter.js", 1998, ctx_371, "enter"); + var _return_869 = if_object((function () { + log_event("JsInterpreter.js", 1990, ctx_371, "call"); + var _return_866 = to_object(s, Coq_value_prim(w)); + log_event("JsInterpreter.js", 1989, ctx_push(ctx_371, [{key: "#RETURN_VALUE#", val: _return_866}]), "return"); + return (_return_866); }()), function(s1, l) { + + var ctx_372 = ctx_push(ctx_371, [{key: "s1", val: s1}, {key: "l", val: l}]); + log_event("JsInterpreter.js", 1996, ctx_372, "let"); + var _return_868 = (function () { + log_event("JsInterpreter.js", 1992, ctx_372, "call"); + var _return_867 = object_put_complete( + Coq_builtin_put_default(), s1, + c, Coq_value_prim(w), l, x, v, + str); + log_event("JsInterpreter.js", 1991, ctx_push(ctx_372, [{key: "#RETURN_VALUE#", val: _return_867}]), "return"); + return (_return_867); + }()) + ; + log_event("JsInterpreter.js", 1993, ctx_push(ctx_372, [{key: "#RETURN_VALUE#", val: _return_868}]), "return"); + return (_return_868); + }); + log_event("JsInterpreter.js", 1997, ctx_push(ctx_371, [{key: "#RETURN_VALUE#", val: _return_869}]), "return"); + return (_return_869); +}; + +var ref_put_value = function (s, c, rv, v) { + var ctx_373 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "rv", val: rv}, {key: "v", val: v}]); + log_event("JsInterpreter.js", 2096, ctx_373, "enter"); + log_event("JsInterpreter.js", 2095, ctx_373, "switch"); + switch (rv.tag) { + case "Coq_resvalue_empty":log_event("JsInterpreter.js", 2006, ctx_373, "case"); + + var _return_873 = (function () { + log_event("JsInterpreter.js", 2004, ctx_373, "call"); + var _return_872 = function (s, m) { + var ctx_374 = ctx_push(ctx_373, [{key: "s", val: s}, {key: "m", val: m}]); + log_event("JsInterpreter.js", 2002, ctx_374, "enter"); + (function () { + log_event("JsInterpreter.js", 2001, ctx_374, "call"); + var _return_871 = Debug.impossible_with_heap_because( + __LOC__, s, m); + log_event("JsInterpreter.js", 2000, ctx_push(ctx_374, [{key: "#RETURN_VALUE#", val: _return_871}]), "return"); + return (_return_871); + }()) + ; + var _return_870 = Coq_result_impossible(); + log_event("JsInterpreter.js", 1999, ctx_push(ctx_374, [{key: "#RETURN_VALUE#", val: _return_870}]), "return"); + return (_return_870); }(s, + "[ref_put_value] received an empty result."); + log_event("JsInterpreter.js", 2003, ctx_push(ctx_373, [{key: "#RETURN_VALUE#", val: _return_872}]), "return"); + return (_return_872); + }()) + ; + log_event("JsInterpreter.js", 2005, ctx_push(ctx_373, [{key: "#RETURN_VALUE#", val: _return_873}]), "return"); + return (_return_873); + case "Coq_resvalue_value": + var v0 = rv.value;var ctx_375 = ctx_push(ctx_373, [{key: "v0", val: v0}]); + log_event("JsInterpreter.js", 2010, ctx_375, "case"); + + var _return_875 = (function () { + log_event("JsInterpreter.js", 2008, ctx_375, "call"); + var _return_874 = run_error(s, Coq_native_error_ref()); + log_event("JsInterpreter.js", 2007, ctx_push(ctx_375, [{key: "#RETURN_VALUE#", val: _return_874}]), "return"); + return (_return_874); + }()) + ; + log_event("JsInterpreter.js", 2009, ctx_push(ctx_375, [{key: "#RETURN_VALUE#", val: _return_875}]), "return"); + return (_return_875); + case "Coq_resvalue_ref": + var r = rv.ref;var ctx_376 = ctx_push(ctx_373, [{key: "r", val: r}]); + log_event("JsInterpreter.js", 2094, ctx_376, "case"); + + var _if_arg_876 = (function () { + log_event("JsInterpreter.js", 2014, ctx_376, "call"); + var _return_878 = ref_kind_comparable((function () { + log_event("JsInterpreter.js", 2012, ctx_376, "call"); + var _return_877 = ref_kind_of(r); + log_event("JsInterpreter.js", 2011, ctx_push(ctx_376, [{key: "#RETURN_VALUE#", val: _return_877}]), "return"); + return (_return_877); }()), + Coq_ref_kind_undef()); + log_event("JsInterpreter.js", 2013, ctx_push(ctx_376, [{key: "#RETURN_VALUE#", val: _return_878}]), "return"); + return (_return_878); + }()) + ; + log_event("JsInterpreter.js", 2093, ctx_376, "if"); + if (_if_arg_876) { + var _if_arg_915 = r.ref_strict; + log_event("JsInterpreter.js", 2092, ctx_376, "if"); + if (_if_arg_915) { + var _return_919 = (function () { + log_event("JsInterpreter.js", 2090, ctx_376, "call"); + var _return_918 = run_error(s, Coq_native_error_ref()); + log_event("JsInterpreter.js", 2089, ctx_push(ctx_376, [{key: "#RETURN_VALUE#", val: _return_918}]), "return"); + return (_return_918); + }()) + ; + log_event("JsInterpreter.js", 2091, ctx_push(ctx_376, [{key: "#RETURN_VALUE#", val: _return_919}]), "return"); + return (_return_919); + } else { + var _return_917 = (function () { + log_event("JsInterpreter.js", 2087, ctx_376, "call"); + var _return_916 = object_put(s, c, + Coq_object_loc_prealloc( + Coq_prealloc_global()), r.ref_name, v, + throw_false); + log_event("JsInterpreter.js", 2086, ctx_push(ctx_376, [{key: "#RETURN_VALUE#", val: _return_916}]), "return"); + return (_return_916); + }()) + ; + log_event("JsInterpreter.js", 2088, ctx_push(ctx_376, [{key: "#RETURN_VALUE#", val: _return_917}]), "return"); + return (_return_917); + } + } else { + var _if_arg_879 = (function () { + log_event("JsInterpreter.js", 2030, ctx_376, "call"); + var _return_887 = ((function () { + log_event("JsInterpreter.js", 2018, ctx_376, "call"); + var _return_881 = ref_kind_comparable( + (function () { + log_event("JsInterpreter.js", 2016, ctx_376, "call"); + var _return_880 = + ref_kind_of(r); + log_event("JsInterpreter.js", 2015, ctx_push(ctx_376, [{key: "#RETURN_VALUE#", val: _return_880}]), "return"); + return (_return_880); + }()), + Coq_ref_kind_primitive_base( + )); + log_event("JsInterpreter.js", 2017, ctx_push(ctx_376, [{key: "#RETURN_VALUE#", val: _return_881}]), "return"); + return (_return_881); }()) || (function () { + log_event("JsInterpreter.js", 2028, ctx_376, "call"); + var _return_886 = ((function () { + log_event("JsInterpreter.js", 2022, ctx_376, "call"); + var _return_883 = ref_kind_comparable( + (function () { + log_event("JsInterpreter.js", 2020, ctx_376, "call"); + var _return_882 = + ref_kind_of( + r); + log_event("JsInterpreter.js", 2019, ctx_push(ctx_376, [{key: "#RETURN_VALUE#", val: _return_882}]), "return"); + return (_return_882); + }()), + Coq_ref_kind_null( + )); + log_event("JsInterpreter.js", 2021, ctx_push(ctx_376, [{key: "#RETURN_VALUE#", val: _return_883}]), "return"); + return (_return_883); }()) + || (function () { + log_event("JsInterpreter.js", 2026, ctx_376, "call"); + var _return_885 = ref_kind_comparable( + (function () { + log_event("JsInterpreter.js", 2024, ctx_376, "call"); + var _return_884 = + ref_kind_of( + r); + log_event("JsInterpreter.js", 2023, ctx_push(ctx_376, [{key: "#RETURN_VALUE#", val: _return_884}]), "return"); + return (_return_884); + }()), + Coq_ref_kind_object( + )); + log_event("JsInterpreter.js", 2025, ctx_push(ctx_376, [{key: "#RETURN_VALUE#", val: _return_885}]), "return"); + return (_return_885); }())); + log_event("JsInterpreter.js", 2027, ctx_push(ctx_376, [{key: "#RETURN_VALUE#", val: _return_886}]), "return"); + return (_return_886); }())); + log_event("JsInterpreter.js", 2029, ctx_push(ctx_376, [{key: "#RETURN_VALUE#", val: _return_887}]), "return"); + return (_return_887); + }()) + ; + log_event("JsInterpreter.js", 2085, ctx_376, "if"); + if (_if_arg_879) { + var _switch_arg_895 = r.ref_base; + log_event("JsInterpreter.js", 2084, ctx_376, "switch"); + switch (_switch_arg_895.tag) { + case "Coq_ref_base_type_value": + var v_2 = _switch_arg_895.value;var ctx_380 = ctx_push(ctx_376, [{key: "v_2", val: v_2}]); + log_event("JsInterpreter.js", 2075, ctx_380, "case"); + + var _if_arg_896 = (function () { + log_event("JsInterpreter.js", 2047, ctx_380, "call"); + var _return_898 = ref_kind_comparable((function () { + log_event("JsInterpreter.js", 2045, ctx_380, "call"); + var _return_897 = ref_kind_of(r); + log_event("JsInterpreter.js", 2044, ctx_push(ctx_380, [{key: "#RETURN_VALUE#", val: _return_897}]), "return"); + return (_return_897); }()), + Coq_ref_kind_primitive_base()); + log_event("JsInterpreter.js", 2046, ctx_push(ctx_380, [{key: "#RETURN_VALUE#", val: _return_898}]), "return"); + return (_return_898); + }()) + ; + log_event("JsInterpreter.js", 2074, ctx_380, "if"); + if (_if_arg_896) { + log_event("JsInterpreter.js", 2073, ctx_380, "switch"); + switch (v_2.tag) { + case "Coq_value_prim": + var w = v_2.value;var ctx_384 = ctx_push(ctx_380, [{key: "w", val: w}]); + log_event("JsInterpreter.js", 2064, ctx_384, "case"); + + var _return_906 = (function () { + log_event("JsInterpreter.js", 2062, ctx_384, "call"); + var _return_905 = prim_value_put(s, c, w, r.ref_name, + v, r.ref_strict); + log_event("JsInterpreter.js", 2061, ctx_push(ctx_384, [{key: "#RETURN_VALUE#", val: _return_905}]), "return"); + return (_return_905); + }()) + ; + log_event("JsInterpreter.js", 2063, ctx_push(ctx_384, [{key: "#RETURN_VALUE#", val: _return_906}]), "return"); + return (_return_906); + case "Coq_value_object": + var o = v_2.value;var ctx_385 = ctx_push(ctx_380, [{key: "o", val: o}]); + log_event("JsInterpreter.js", 2072, ctx_385, "case"); + + var _return_910 = (function () { + log_event("JsInterpreter.js", 2070, ctx_385, "call"); + var _return_909 = function (s, m) { + var ctx_386 = ctx_push(ctx_385, [{key: "s", val: s}, {key: "m", val: m}]); + log_event("JsInterpreter.js", 2068, ctx_386, "enter"); + (function () { + log_event("JsInterpreter.js", 2067, ctx_386, "call"); + var _return_908 = Debug.impossible_with_heap_because( + __LOC__, s, + m); + log_event("JsInterpreter.js", 2066, ctx_push(ctx_386, [{key: "#RETURN_VALUE#", val: _return_908}]), "return"); + return (_return_908); + }()) + ; + var _return_907 = Coq_result_impossible( + ); + log_event("JsInterpreter.js", 2065, ctx_push(ctx_386, [{key: "#RETURN_VALUE#", val: _return_907}]), "return"); + return (_return_907); }(s, + "[ref_put_value] impossible case"); + log_event("JsInterpreter.js", 2069, ctx_push(ctx_385, [{key: "#RETURN_VALUE#", val: _return_909}]), "return"); + return (_return_909); + }()) + ; + log_event("JsInterpreter.js", 2071, ctx_push(ctx_385, [{key: "#RETURN_VALUE#", val: _return_910}]), "return"); + return (_return_910); + } + + } else { + log_event("JsInterpreter.js", 2060, ctx_380, "switch"); + switch (v_2.tag) { + case "Coq_value_prim": + var p = v_2.value;var ctx_381 = ctx_push(ctx_380, [{key: "p", val: p}]); + log_event("JsInterpreter.js", 2055, ctx_381, "case"); + + var _return_902 = (function () { + log_event("JsInterpreter.js", 2053, ctx_381, "call"); + var _return_901 = function (s, m) { + var ctx_382 = ctx_push(ctx_381, [{key: "s", val: s}, {key: "m", val: m}]); + log_event("JsInterpreter.js", 2051, ctx_382, "enter"); + (function () { + log_event("JsInterpreter.js", 2050, ctx_382, "call"); + var _return_900 = Debug.impossible_with_heap_because( + __LOC__, s, + m); + log_event("JsInterpreter.js", 2049, ctx_push(ctx_382, [{key: "#RETURN_VALUE#", val: _return_900}]), "return"); + return (_return_900); + }()) + ; + var _return_899 = Coq_result_impossible( + ); + log_event("JsInterpreter.js", 2048, ctx_push(ctx_382, [{key: "#RETURN_VALUE#", val: _return_899}]), "return"); + return (_return_899); }(s, + "[ref_put_value] impossible case"); + log_event("JsInterpreter.js", 2052, ctx_push(ctx_381, [{key: "#RETURN_VALUE#", val: _return_901}]), "return"); + return (_return_901); + }()) + ; + log_event("JsInterpreter.js", 2054, ctx_push(ctx_381, [{key: "#RETURN_VALUE#", val: _return_902}]), "return"); + return (_return_902); + case "Coq_value_object": + var l = v_2.value;var ctx_383 = ctx_push(ctx_380, [{key: "l", val: l}]); + log_event("JsInterpreter.js", 2059, ctx_383, "case"); + + var _return_904 = (function () { + log_event("JsInterpreter.js", 2057, ctx_383, "call"); + var _return_903 = object_put(s, c, l, r.ref_name, v, + r.ref_strict); + log_event("JsInterpreter.js", 2056, ctx_push(ctx_383, [{key: "#RETURN_VALUE#", val: _return_903}]), "return"); + return (_return_903); + }()) + ; + log_event("JsInterpreter.js", 2058, ctx_push(ctx_383, [{key: "#RETURN_VALUE#", val: _return_904}]), "return"); + return (_return_904); + } + + } + case "Coq_ref_base_type_env_loc": + var l = _switch_arg_895.value;var ctx_387 = ctx_push(ctx_376, [{key: "l", val: l}]); + log_event("JsInterpreter.js", 2083, ctx_387, "case"); + + var _return_914 = (function () { + log_event("JsInterpreter.js", 2081, ctx_387, "call"); + var _return_913 = function (s, m) { + var ctx_388 = ctx_push(ctx_387, [{key: "s", val: s}, {key: "m", val: m}]); + log_event("JsInterpreter.js", 2079, ctx_388, "enter"); + (function () { + log_event("JsInterpreter.js", 2078, ctx_388, "call"); + var _return_912 = Debug.impossible_with_heap_because( + __LOC__, s, m); + log_event("JsInterpreter.js", 2077, ctx_push(ctx_388, [{key: "#RETURN_VALUE#", val: _return_912}]), "return"); + return (_return_912); + }()) + ; + var _return_911 = Coq_result_impossible( + ); + log_event("JsInterpreter.js", 2076, ctx_push(ctx_388, [{key: "#RETURN_VALUE#", val: _return_911}]), "return"); + return (_return_911); }(s, + "[ref_put_value] contradicts ref_is_property"); + log_event("JsInterpreter.js", 2080, ctx_push(ctx_387, [{key: "#RETURN_VALUE#", val: _return_913}]), "return"); + return (_return_913); + }()) + ; + log_event("JsInterpreter.js", 2082, ctx_push(ctx_387, [{key: "#RETURN_VALUE#", val: _return_914}]), "return"); + return (_return_914); + } + + } else { + var _switch_arg_888 = r.ref_base; + log_event("JsInterpreter.js", 2043, ctx_376, "switch"); + switch (_switch_arg_888.tag) { + case "Coq_ref_base_type_value": + var v0 = _switch_arg_888.value;var ctx_377 = ctx_push(ctx_376, [{key: "v0", val: v0}]); + log_event("JsInterpreter.js", 2038, ctx_377, "case"); + + var _return_892 = (function () { + log_event("JsInterpreter.js", 2036, ctx_377, "call"); + var _return_891 = function (s, m) { + var ctx_378 = ctx_push(ctx_377, [{key: "s", val: s}, {key: "m", val: m}]); + log_event("JsInterpreter.js", 2034, ctx_378, "enter"); + (function () { + log_event("JsInterpreter.js", 2033, ctx_378, "call"); + var _return_890 = Debug.impossible_with_heap_because( + __LOC__, s, m); + log_event("JsInterpreter.js", 2032, ctx_push(ctx_378, [{key: "#RETURN_VALUE#", val: _return_890}]), "return"); + return (_return_890); + }()) + ; + var _return_889 = Coq_result_impossible( + ); + log_event("JsInterpreter.js", 2031, ctx_push(ctx_378, [{key: "#RETURN_VALUE#", val: _return_889}]), "return"); + return (_return_889); }(s, + "[ref_put_value] impossible spec"); + log_event("JsInterpreter.js", 2035, ctx_push(ctx_377, [{key: "#RETURN_VALUE#", val: _return_891}]), "return"); + return (_return_891); + }()) + ; + log_event("JsInterpreter.js", 2037, ctx_push(ctx_377, [{key: "#RETURN_VALUE#", val: _return_892}]), "return"); + return (_return_892); + case "Coq_ref_base_type_env_loc": + var l = _switch_arg_888.value;var ctx_379 = ctx_push(ctx_376, [{key: "l", val: l}]); + log_event("JsInterpreter.js", 2042, ctx_379, "case"); + + var _return_894 = (function () { + log_event("JsInterpreter.js", 2040, ctx_379, "call"); + var _return_893 = env_record_set_mutable_binding(s, c, l, + r.ref_name, v, r.ref_strict); + log_event("JsInterpreter.js", 2039, ctx_push(ctx_379, [{key: "#RETURN_VALUE#", val: _return_893}]), "return"); + return (_return_893); + }()) + ; + log_event("JsInterpreter.js", 2041, ctx_push(ctx_379, [{key: "#RETURN_VALUE#", val: _return_894}]), "return"); + return (_return_894); + } + + } + } + } + +}; + +var env_record_create_mutable_binding = function (s, c, l, x, deletable_opt) { + var ctx_389 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "l", val: l}, {key: "x", val: x}, {key: "deletable_opt", val: deletable_opt}]); + log_event("JsInterpreter.js", 2153, ctx_389, "enter"); + var deletable = (function () { + log_event("JsInterpreter.js", 2098, ctx_389, "call"); + var _return_920 = unsome_default(false, deletable_opt); + log_event("JsInterpreter.js", 2097, ctx_push(ctx_389, [{key: "#RETURN_VALUE#", val: _return_920}]), "return"); + return (_return_920); + }()) + ; + var ctx_390 = ctx_push(ctx_389, [{key: "deletable", val: deletable}]); + log_event("JsInterpreter.js", 2152, ctx_390, "let"); + var _return_943 = if_some((function () { + log_event("JsInterpreter.js", 2100, ctx_390, "call"); + var _return_921 = env_record_binds_pickable_option(s, + l); + log_event("JsInterpreter.js", 2099, ctx_push(ctx_390, [{key: "#RETURN_VALUE#", val: _return_921}]), "return"); + return (_return_921); }()), function(e) { + + var ctx_391 = ctx_push(ctx_390, [{key: "e", val: e}]); + log_event("JsInterpreter.js", 2150, ctx_391, "let"); + log_event("JsInterpreter.js", 2147, ctx_391, "switch"); + switch (e.tag) { + case "Coq_env_record_decl": + var ed = e.value;var ctx_392 = ctx_push(ctx_391, [{key: "ed", val: ed}]); + log_event("JsInterpreter.js", 2119, ctx_392, "case"); + + var _if_arg_922 = (function () { + log_event("JsInterpreter.js", 2102, ctx_392, "call"); + var _return_923 = HeapStr.indom_dec(ed, x); + log_event("JsInterpreter.js", 2101, ctx_push(ctx_392, [{key: "#RETURN_VALUE#", val: _return_923}]), "return"); + return (_return_923); + }()) + ; + log_event("JsInterpreter.js", 2118, ctx_392, "if"); + if (_if_arg_922) { + var _return_931 = (function () { + log_event("JsInterpreter.js", 2116, ctx_392, "call"); + var _return_930 = function (s, m) { + var ctx_394 = ctx_push(ctx_392, [{key: "s", val: s}, {key: "m", val: m}]); + log_event("JsInterpreter.js", 2114, ctx_394, "enter"); + (function () { + log_event("JsInterpreter.js", 2113, ctx_394, "call"); + var _return_929 = + Debug.impossible_with_heap_because( + __LOC__, s, m); + log_event("JsInterpreter.js", 2112, ctx_push(ctx_394, [{key: "#RETURN_VALUE#", val: _return_929}]), "return"); + return (_return_929); + }()) + ; + var _return_928 = + Coq_result_impossible(); + log_event("JsInterpreter.js", 2111, ctx_push(ctx_394, [{key: "#RETURN_VALUE#", val: _return_928}]), "return"); + return (_return_928); + }(s, + "Already declared environnment record in [env_record_create_mutable_binding]."); + log_event("JsInterpreter.js", 2115, ctx_push(ctx_392, [{key: "#RETURN_VALUE#", val: _return_930}]), "return"); + return (_return_930); + }()) + ; + log_event("JsInterpreter.js", 2117, ctx_push(ctx_392, [{key: "#RETURN_VALUE#", val: _return_931}]), "return"); + return (_return_931); + } else { + var s_2 = (function () { + log_event("JsInterpreter.js", 2106, ctx_392, "call"); + var _return_925 = env_record_write_decl_env( + s, l, x, (function () { + log_event("JsInterpreter.js", 2104, ctx_392, "call"); + var _return_924 = + mutability_of_bool( + deletable); + log_event("JsInterpreter.js", 2103, ctx_push(ctx_392, [{key: "#RETURN_VALUE#", val: _return_924}]), "return"); + return (_return_924); + }()), + Coq_value_prim( + Coq_prim_undef())); + log_event("JsInterpreter.js", 2105, ctx_push(ctx_392, [{key: "#RETURN_VALUE#", val: _return_925}]), "return"); + return (_return_925); + }()) + ; + var ctx_393 = ctx_push(ctx_392, [{key: "s_2", val: s_2}]); + log_event("JsInterpreter.js", 2110, ctx_393, "let"); + var _return_927 = (function () { + log_event("JsInterpreter.js", 2108, ctx_393, "call"); + var _return_926 = res_void(s_2); + log_event("JsInterpreter.js", 2107, ctx_push(ctx_393, [{key: "#RETURN_VALUE#", val: _return_926}]), "return"); + return (_return_926); + }()) + ; + log_event("JsInterpreter.js", 2109, ctx_push(ctx_393, [{key: "#RETURN_VALUE#", val: _return_927}]), "return"); + return (_return_927); + + } + case "Coq_env_record_object": + var l0 = e.value, pt = e.provide_this;var ctx_395 = ctx_push(ctx_391, [{key: "l0", val: l0}, {key: "pt", val: pt}]); + log_event("JsInterpreter.js", 2146, ctx_395, "case"); + + var _return_942 = if_bool((function () { + log_event("JsInterpreter.js", 2121, ctx_395, "call"); + var _return_932 = object_has_prop( + s, c, l0, + x); + log_event("JsInterpreter.js", 2120, ctx_push(ctx_395, [{key: "#RETURN_VALUE#", val: _return_932}]), "return"); + return (_return_932); }()), + function(s1, has) { + + var ctx_396 = ctx_push(ctx_395, [{key: "s1", val: s1}, {key: "has", val: has}]); + log_event("JsInterpreter.js", 2144, ctx_396, "let"); + log_event("JsInterpreter.js", 2141, ctx_396, "if"); + if (has) { + var _return_941 = (function () { + log_event("JsInterpreter.js", 2139, ctx_396, "call"); + var _return_940 = + function (s, m) { + var ctx_399 = ctx_push(ctx_396, [{key: "s", val: s}, {key: "m", val: m}]); + log_event("JsInterpreter.js", 2137, ctx_399, "enter"); + (function () { + log_event("JsInterpreter.js", 2136, ctx_399, "call"); + var _return_939 = + Debug.impossible_with_heap_because( + __LOC__, s, m); + log_event("JsInterpreter.js", 2135, ctx_push(ctx_399, [{key: "#RETURN_VALUE#", val: _return_939}]), "return"); + return (_return_939); + }()) + ; + var _return_938 = + Coq_result_impossible( + ); + log_event("JsInterpreter.js", 2134, ctx_push(ctx_399, [{key: "#RETURN_VALUE#", val: _return_938}]), "return"); + return (_return_938); + }(s1, + "Already declared binding in [env_record_create_mutable_binding]."); + log_event("JsInterpreter.js", 2138, ctx_push(ctx_396, [{key: "#RETURN_VALUE#", val: _return_940}]), "return"); + return (_return_940); + }()) + ; + log_event("JsInterpreter.js", 2140, ctx_push(ctx_396, [{key: "#RETURN_VALUE#", val: _return_941}]), "return"); + return (_return_941); + } else { + var a = { + attributes_data_value: + Coq_value_prim( + Coq_prim_undef()), + attributes_data_writable: true, + attributes_data_enumerable: true, + attributes_data_configurable: deletable + }; + var ctx_397 = ctx_push(ctx_396, [{key: "a", val: a}]); + log_event("JsInterpreter.js", 2133, ctx_397, "let"); + var _return_937 = + if_success((function () { + log_event("JsInterpreter.js", 2125, ctx_397, "call"); + var _return_934 = + object_define_own_prop( + s1, c, l0, x, + (function () { + log_event("JsInterpreter.js", 2123, ctx_397, "call"); + var _return_933 = + descriptor_of_attributes( + Coq_attributes_data_of( + a)); + log_event("JsInterpreter.js", 2122, ctx_push(ctx_397, [{key: "#RETURN_VALUE#", val: _return_933}]), "return"); + return (_return_933); + }()), throw_true); + log_event("JsInterpreter.js", 2124, ctx_push(ctx_397, [{key: "#RETURN_VALUE#", val: _return_934}]), "return"); + return (_return_934); + }()), function(s2, + rv) { + + var ctx_398 = ctx_push(ctx_397, [{key: "s2", val: s2}, {key: "rv", val: rv}]); + log_event("JsInterpreter.js", 2131, ctx_398, "let"); + var _return_936 = (function () { + log_event("JsInterpreter.js", 2127, ctx_398, "call"); + var _return_935 = + res_void(s2); + log_event("JsInterpreter.js", 2126, ctx_push(ctx_398, [{key: "#RETURN_VALUE#", val: _return_935}]), "return"); + return (_return_935); + }()) + ; + log_event("JsInterpreter.js", 2128, ctx_push(ctx_398, [{key: "#RETURN_VALUE#", val: _return_936}]), "return"); + return (_return_936); + }); + log_event("JsInterpreter.js", 2132, ctx_push(ctx_397, [{key: "#RETURN_VALUE#", val: _return_937}]), "return"); + return (_return_937); + + } + }); + log_event("JsInterpreter.js", 2145, ctx_push(ctx_395, [{key: "#RETURN_VALUE#", val: _return_942}]), "return"); + return (_return_942); + } + + }); + log_event("JsInterpreter.js", 2151, ctx_push(ctx_390, [{key: "#RETURN_VALUE#", val: _return_943}]), "return"); + return (_return_943); + +}; + +var env_record_create_set_mutable_binding = function (s, c, l, x, deletable_opt, v, str) { + var ctx_400 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "l", val: l}, {key: "x", val: x}, {key: "deletable_opt", val: deletable_opt}, {key: "v", val: v}, {key: "str", val: str}]); + log_event("JsInterpreter.js", 2163, ctx_400, "enter"); + var _return_947 = if_void((function () { + log_event("JsInterpreter.js", 2155, ctx_400, "call"); + var _return_944 = env_record_create_mutable_binding( + s, c, l, x, deletable_opt); + log_event("JsInterpreter.js", 2154, ctx_push(ctx_400, [{key: "#RETURN_VALUE#", val: _return_944}]), "return"); + return (_return_944); }()), function(s0) { + + var ctx_401 = ctx_push(ctx_400, [{key: "s0", val: s0}]); + log_event("JsInterpreter.js", 2161, ctx_401, "let"); + var _return_946 = (function () { + log_event("JsInterpreter.js", 2157, ctx_401, "call"); + var _return_945 = env_record_set_mutable_binding( + s0, c, l, x, v, str); + log_event("JsInterpreter.js", 2156, ctx_push(ctx_401, [{key: "#RETURN_VALUE#", val: _return_945}]), "return"); + return (_return_945); + }()) + ; + log_event("JsInterpreter.js", 2158, ctx_push(ctx_401, [{key: "#RETURN_VALUE#", val: _return_946}]), "return"); + return (_return_946); + }); + log_event("JsInterpreter.js", 2162, ctx_push(ctx_400, [{key: "#RETURN_VALUE#", val: _return_947}]), "return"); + return (_return_947); +}; + +var env_record_create_immutable_binding = function (s, l, x) { + var ctx_402 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "l", val: l}, {key: "x", val: x}]); + log_event("JsInterpreter.js", 2195, ctx_402, "enter"); + var _return_962 = if_some((function () { + log_event("JsInterpreter.js", 2165, ctx_402, "call"); + var _return_948 = env_record_binds_pickable_option(s, + l); + log_event("JsInterpreter.js", 2164, ctx_push(ctx_402, [{key: "#RETURN_VALUE#", val: _return_948}]), "return"); + return (_return_948); }()), function(e) { + + var ctx_403 = ctx_push(ctx_402, [{key: "e", val: e}]); + log_event("JsInterpreter.js", 2193, ctx_403, "let"); + log_event("JsInterpreter.js", 2190, ctx_403, "switch"); + switch (e.tag) { + case "Coq_env_record_decl": + var ed = e.value;var ctx_404 = ctx_push(ctx_403, [{key: "ed", val: ed}]); + log_event("JsInterpreter.js", 2181, ctx_404, "case"); + + var _if_arg_949 = (function () { + log_event("JsInterpreter.js", 2167, ctx_404, "call"); + var _return_950 = HeapStr.indom_dec(ed, x); + log_event("JsInterpreter.js", 2166, ctx_push(ctx_404, [{key: "#RETURN_VALUE#", val: _return_950}]), "return"); + return (_return_950); + }()) + ; + log_event("JsInterpreter.js", 2180, ctx_404, "if"); + if (_if_arg_949) { + var _return_957 = (function () { + log_event("JsInterpreter.js", 2178, ctx_404, "call"); + var _return_956 = function (s, m) { + var ctx_405 = ctx_push(ctx_404, [{key: "s", val: s}, {key: "m", val: m}]); + log_event("JsInterpreter.js", 2176, ctx_405, "enter"); + (function () { + log_event("JsInterpreter.js", 2175, ctx_405, "call"); + var _return_955 = + Debug.impossible_with_heap_because( + __LOC__, s, m); + log_event("JsInterpreter.js", 2174, ctx_push(ctx_405, [{key: "#RETURN_VALUE#", val: _return_955}]), "return"); + return (_return_955); + }()) + ; + var _return_954 = + Coq_result_impossible(); + log_event("JsInterpreter.js", 2173, ctx_push(ctx_405, [{key: "#RETURN_VALUE#", val: _return_954}]), "return"); + return (_return_954); + }(s, + "Already declared environnment record in [env_record_create_immutable_binding]."); + log_event("JsInterpreter.js", 2177, ctx_push(ctx_404, [{key: "#RETURN_VALUE#", val: _return_956}]), "return"); + return (_return_956); + }()) + ; + log_event("JsInterpreter.js", 2179, ctx_push(ctx_404, [{key: "#RETURN_VALUE#", val: _return_957}]), "return"); + return (_return_957); + } else { + var _return_953 = (function () { + log_event("JsInterpreter.js", 2171, ctx_404, "call"); + var _return_952 = res_void((function () { + log_event("JsInterpreter.js", 2169, ctx_404, "call"); + var _return_951 = + env_record_write_decl_env( + s, l, x, + Coq_mutability_uninitialized_immutable( + ), + Coq_value_prim( + Coq_prim_undef())); + log_event("JsInterpreter.js", 2168, ctx_push(ctx_404, [{key: "#RETURN_VALUE#", val: _return_951}]), "return"); + return (_return_951); + }())); + log_event("JsInterpreter.js", 2170, ctx_push(ctx_404, [{key: "#RETURN_VALUE#", val: _return_952}]), "return"); + return (_return_952); + }()) + ; + log_event("JsInterpreter.js", 2172, ctx_push(ctx_404, [{key: "#RETURN_VALUE#", val: _return_953}]), "return"); + return (_return_953); + } + case "Coq_env_record_object": + var o = e.value, p = e.provide_this;var ctx_406 = ctx_push(ctx_403, [{key: "o", val: o}, {key: "p", val: p}]); + log_event("JsInterpreter.js", 2189, ctx_406, "case"); + + var _return_961 = (function () { + log_event("JsInterpreter.js", 2187, ctx_406, "call"); + var _return_960 = function (s, m) { + var ctx_407 = ctx_push(ctx_406, [{key: "s", val: s}, {key: "m", val: m}]); + log_event("JsInterpreter.js", 2185, ctx_407, "enter"); + (function () { + log_event("JsInterpreter.js", 2184, ctx_407, "call"); + var _return_959 = + Debug.impossible_with_heap_because( + __LOC__, s, m); + log_event("JsInterpreter.js", 2183, ctx_push(ctx_407, [{key: "#RETURN_VALUE#", val: _return_959}]), "return"); + return (_return_959); + }()) + ; + var _return_958 = + Coq_result_impossible(); + log_event("JsInterpreter.js", 2182, ctx_push(ctx_407, [{key: "#RETURN_VALUE#", val: _return_958}]), "return"); + return (_return_958); }( + s, + "[env_record_create_immutable_binding] received an environnment record object."); + log_event("JsInterpreter.js", 2186, ctx_push(ctx_406, [{key: "#RETURN_VALUE#", val: _return_960}]), "return"); + return (_return_960); + }()) + ; + log_event("JsInterpreter.js", 2188, ctx_push(ctx_406, [{key: "#RETURN_VALUE#", val: _return_961}]), "return"); + return (_return_961); + } + + }); + log_event("JsInterpreter.js", 2194, ctx_push(ctx_402, [{key: "#RETURN_VALUE#", val: _return_962}]), "return"); + return (_return_962); +}; + +var env_record_initialize_immutable_binding = function (s, l, x, v) { + var ctx_408 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "l", val: l}, {key: "x", val: x}, {key: "v", val: v}]); + log_event("JsInterpreter.js", 2234, ctx_408, "enter"); + var _return_979 = if_some((function () { + log_event("JsInterpreter.js", 2197, ctx_408, "call"); + var _return_963 = env_record_binds_pickable_option(s, + l); + log_event("JsInterpreter.js", 2196, ctx_push(ctx_408, [{key: "#RETURN_VALUE#", val: _return_963}]), "return"); + return (_return_963); }()), function(e) { + + var ctx_409 = ctx_push(ctx_408, [{key: "e", val: e}]); + log_event("JsInterpreter.js", 2232, ctx_409, "let"); + log_event("JsInterpreter.js", 2229, ctx_409, "switch"); + switch (e.tag) { + case "Coq_env_record_decl": + var ed = e.value;var ctx_410 = ctx_push(ctx_409, [{key: "ed", val: ed}]); + log_event("JsInterpreter.js", 2220, ctx_410, "case"); + + var _return_974 = if_some((function () { + log_event("JsInterpreter.js", 2199, ctx_410, "call"); + var _return_964 = decl_env_record_pickable_option( + ed, x); + log_event("JsInterpreter.js", 2198, ctx_push(ctx_410, [{key: "#RETURN_VALUE#", val: _return_964}]), "return"); + return (_return_964); }()), + function(evs) { + + var ctx_411 = ctx_push(ctx_410, [{key: "evs", val: evs}]); + log_event("JsInterpreter.js", 2218, ctx_411, "let"); + var _if_arg_965 = (function () { + log_event("JsInterpreter.js", 2201, ctx_411, "call"); + var _return_966 = + prod_compare( + mutability_compare, + value_compare, evs, + [Coq_mutability_uninitialized_immutable( + ), Coq_value_prim( + Coq_prim_undef( + ))]); + log_event("JsInterpreter.js", 2200, ctx_push(ctx_411, [{key: "#RETURN_VALUE#", val: _return_966}]), "return"); + return (_return_966); + }()) + ; + log_event("JsInterpreter.js", 2215, ctx_411, "if"); + if (_if_arg_965) { + var s_2 = (function () { + log_event("JsInterpreter.js", 2210, ctx_411, "call"); + var _return_971 = + env_record_write_decl_env( + s, l, x, + Coq_mutability_immutable( + ), v); + log_event("JsInterpreter.js", 2209, ctx_push(ctx_411, [{key: "#RETURN_VALUE#", val: _return_971}]), "return"); + return (_return_971); + }()) + ; + var ctx_413 = ctx_push(ctx_411, [{key: "s_2", val: s_2}]); + log_event("JsInterpreter.js", 2214, ctx_413, "let"); + var _return_973 = (function () { + log_event("JsInterpreter.js", 2212, ctx_413, "call"); + var _return_972 = + res_void(s_2); + log_event("JsInterpreter.js", 2211, ctx_push(ctx_413, [{key: "#RETURN_VALUE#", val: _return_972}]), "return"); + return (_return_972); + }()) + ; + log_event("JsInterpreter.js", 2213, ctx_push(ctx_413, [{key: "#RETURN_VALUE#", val: _return_973}]), "return"); + return (_return_973); + + } else { + var _return_970 = (function () { + log_event("JsInterpreter.js", 2207, ctx_411, "call"); + var _return_969 = + function (s, m) { + var ctx_412 = ctx_push(ctx_411, [{key: "s", val: s}, {key: "m", val: m}]); + log_event("JsInterpreter.js", 2205, ctx_412, "enter"); + (function () { + log_event("JsInterpreter.js", 2204, ctx_412, "call"); + var _return_968 = + Debug.impossible_with_heap_because( + __LOC__, s, m); + log_event("JsInterpreter.js", 2203, ctx_push(ctx_412, [{key: "#RETURN_VALUE#", val: _return_968}]), "return"); + return (_return_968); + }()) + ; + var _return_967 = + Coq_result_impossible( + ); + log_event("JsInterpreter.js", 2202, ctx_push(ctx_412, [{key: "#RETURN_VALUE#", val: _return_967}]), "return"); + return (_return_967); + }(s, + "Non suitable binding in [env_record_initialize_immutable_binding]."); + log_event("JsInterpreter.js", 2206, ctx_push(ctx_411, [{key: "#RETURN_VALUE#", val: _return_969}]), "return"); + return (_return_969); + }()) + ; + log_event("JsInterpreter.js", 2208, ctx_push(ctx_411, [{key: "#RETURN_VALUE#", val: _return_970}]), "return"); + return (_return_970); + } + }); + log_event("JsInterpreter.js", 2219, ctx_push(ctx_410, [{key: "#RETURN_VALUE#", val: _return_974}]), "return"); + return (_return_974); + case "Coq_env_record_object": + var o = e.value, p = e.provide_this;var ctx_414 = ctx_push(ctx_409, [{key: "o", val: o}, {key: "p", val: p}]); + log_event("JsInterpreter.js", 2228, ctx_414, "case"); + + var _return_978 = (function () { + log_event("JsInterpreter.js", 2226, ctx_414, "call"); + var _return_977 = function (s, m) { + var ctx_415 = ctx_push(ctx_414, [{key: "s", val: s}, {key: "m", val: m}]); + log_event("JsInterpreter.js", 2224, ctx_415, "enter"); + (function () { + log_event("JsInterpreter.js", 2223, ctx_415, "call"); + var _return_976 = + Debug.impossible_with_heap_because( + __LOC__, s, m); + log_event("JsInterpreter.js", 2222, ctx_push(ctx_415, [{key: "#RETURN_VALUE#", val: _return_976}]), "return"); + return (_return_976); + }()) + ; + var _return_975 = + Coq_result_impossible(); + log_event("JsInterpreter.js", 2221, ctx_push(ctx_415, [{key: "#RETURN_VALUE#", val: _return_975}]), "return"); + return (_return_975); }( + s, + "[env_record_initialize_immutable_binding] received an environnment record object."); + log_event("JsInterpreter.js", 2225, ctx_push(ctx_414, [{key: "#RETURN_VALUE#", val: _return_977}]), "return"); + return (_return_977); + }()) + ; + log_event("JsInterpreter.js", 2227, ctx_push(ctx_414, [{key: "#RETURN_VALUE#", val: _return_978}]), "return"); + return (_return_978); + } + + }); + log_event("JsInterpreter.js", 2233, ctx_push(ctx_408, [{key: "#RETURN_VALUE#", val: _return_979}]), "return"); + return (_return_979); +}; + +var call_object_new = function (s, v) { + var ctx_416 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "v", val: v}]); + log_event("JsInterpreter.js", 2272, ctx_416, "enter"); + var _switch_arg_980 = (function () { + log_event("JsInterpreter.js", 2236, ctx_416, "call"); + var _return_981 = type_of(v); + log_event("JsInterpreter.js", 2235, ctx_push(ctx_416, [{key: "#RETURN_VALUE#", val: _return_981}]), "return"); + return (_return_981); + }()) + ; + log_event("JsInterpreter.js", 2271, ctx_416, "switch"); + switch (_switch_arg_980.tag) { + case "Coq_type_undef":log_event("JsInterpreter.js", 2246, ctx_416, "case"); + + var _return_985 = result_out((function () { + var o = (function () { + log_event("JsInterpreter.js", 2238, ctx_416, "call"); + var _return_982 = object_new( + Coq_value_object( + Coq_object_loc_prealloc( + Coq_prealloc_object_proto( + ))), "Object"); + log_event("JsInterpreter.js", 2237, ctx_push(ctx_416, [{key: "#RETURN_VALUE#", val: _return_982}]), "return"); + return (_return_982); + }()) + ; + var ctx_417 = ctx_push(ctx_416, [{key: "o", val: o}]); + log_event("JsInterpreter.js", 2244, ctx_417, "let"); + var p = (function () { + log_event("JsInterpreter.js", 2240, ctx_417, "call"); + var _return_983 = object_alloc(s, o); + log_event("JsInterpreter.js", 2239, ctx_push(ctx_417, [{key: "#RETURN_VALUE#", val: _return_983}]), "return"); + return (_return_983); + }()) + ; + var ctx_418 = ctx_push(ctx_417, [{key: "p", val: p}]); + log_event("JsInterpreter.js", 2243, ctx_418, "let"); + var l = p[0], s_2 = p[1]; + var ctx_419 = ctx_push(ctx_418, [{key: "l", val: l}, {key: "s_2", val: s_2}]); + log_event("JsInterpreter.js", 2242, ctx_419, "let"); + var _return_984 = Coq_out_ter(s_2, + res_val(Coq_value_object(l))); + log_event("JsInterpreter.js", 2241, ctx_push(ctx_419, [{key: "#RETURN_VALUE#", val: _return_984}]), "return"); + return (_return_984); + + + }())); + log_event("JsInterpreter.js", 2245, ctx_push(ctx_416, [{key: "#RETURN_VALUE#", val: _return_985}]), "return"); + return (_return_985); + case "Coq_type_null":log_event("JsInterpreter.js", 2256, ctx_416, "case"); + + var _return_989 = result_out((function () { + var o = (function () { + log_event("JsInterpreter.js", 2248, ctx_416, "call"); + var _return_986 = object_new( + Coq_value_object( + Coq_object_loc_prealloc( + Coq_prealloc_object_proto( + ))), "Object"); + log_event("JsInterpreter.js", 2247, ctx_push(ctx_416, [{key: "#RETURN_VALUE#", val: _return_986}]), "return"); + return (_return_986); + }()) + ; + var ctx_420 = ctx_push(ctx_416, [{key: "o", val: o}]); + log_event("JsInterpreter.js", 2254, ctx_420, "let"); + var p = (function () { + log_event("JsInterpreter.js", 2250, ctx_420, "call"); + var _return_987 = object_alloc(s, o); + log_event("JsInterpreter.js", 2249, ctx_push(ctx_420, [{key: "#RETURN_VALUE#", val: _return_987}]), "return"); + return (_return_987); + }()) + ; + var ctx_421 = ctx_push(ctx_420, [{key: "p", val: p}]); + log_event("JsInterpreter.js", 2253, ctx_421, "let"); + var l = p[0], s_2 = p[1]; + var ctx_422 = ctx_push(ctx_421, [{key: "l", val: l}, {key: "s_2", val: s_2}]); + log_event("JsInterpreter.js", 2252, ctx_422, "let"); + var _return_988 = Coq_out_ter(s_2, + res_val(Coq_value_object(l))); + log_event("JsInterpreter.js", 2251, ctx_push(ctx_422, [{key: "#RETURN_VALUE#", val: _return_988}]), "return"); + return (_return_988); + + + }())); + log_event("JsInterpreter.js", 2255, ctx_push(ctx_416, [{key: "#RETURN_VALUE#", val: _return_989}]), "return"); + return (_return_989); + case "Coq_type_bool":log_event("JsInterpreter.js", 2260, ctx_416, "case"); + + var _return_991 = (function () { + log_event("JsInterpreter.js", 2258, ctx_416, "call"); + var _return_990 = to_object(s, v); + log_event("JsInterpreter.js", 2257, ctx_push(ctx_416, [{key: "#RETURN_VALUE#", val: _return_990}]), "return"); + return (_return_990); + }()) + ; + log_event("JsInterpreter.js", 2259, ctx_push(ctx_416, [{key: "#RETURN_VALUE#", val: _return_991}]), "return"); + return (_return_991); + case "Coq_type_number":log_event("JsInterpreter.js", 2264, ctx_416, "case"); + + var _return_993 = (function () { + log_event("JsInterpreter.js", 2262, ctx_416, "call"); + var _return_992 = to_object(s, v); + log_event("JsInterpreter.js", 2261, ctx_push(ctx_416, [{key: "#RETURN_VALUE#", val: _return_992}]), "return"); + return (_return_992); + }()) + ; + log_event("JsInterpreter.js", 2263, ctx_push(ctx_416, [{key: "#RETURN_VALUE#", val: _return_993}]), "return"); + return (_return_993); + case "Coq_type_string":log_event("JsInterpreter.js", 2268, ctx_416, "case"); + + var _return_995 = (function () { + log_event("JsInterpreter.js", 2266, ctx_416, "call"); + var _return_994 = to_object(s, v); + log_event("JsInterpreter.js", 2265, ctx_push(ctx_416, [{key: "#RETURN_VALUE#", val: _return_994}]), "return"); + return (_return_994); + }()) + ; + log_event("JsInterpreter.js", 2267, ctx_push(ctx_416, [{key: "#RETURN_VALUE#", val: _return_995}]), "return"); + return (_return_995); + case "Coq_type_object":log_event("JsInterpreter.js", 2270, ctx_416, "case"); + + var _return_996 = result_out(Coq_out_ter(s, res_val(v))); + log_event("JsInterpreter.js", 2269, ctx_push(ctx_416, [{key: "#RETURN_VALUE#", val: _return_996}]), "return"); + return (_return_996); + } + +}; + +var array_args_map_loop = function (s, c, l, args, ind) { + var ctx_423 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "l", val: l}, {key: "args", val: args}, {key: "ind", val: ind}]); + log_event("JsInterpreter.js", 2298, ctx_423, "enter"); + log_event("JsInterpreter.js", 2297, ctx_423, "switch"); + switch (args.tag) { + case "[]":log_event("JsInterpreter.js", 2276, ctx_423, "case"); + + var _return_998 = (function () { + log_event("JsInterpreter.js", 2274, ctx_423, "call"); + var _return_997 = res_void(s); + log_event("JsInterpreter.js", 2273, ctx_push(ctx_423, [{key: "#RETURN_VALUE#", val: _return_997}]), "return"); + return (_return_997); + }()) + ; + log_event("JsInterpreter.js", 2275, ctx_push(ctx_423, [{key: "#RETURN_VALUE#", val: _return_998}]), "return"); + return (_return_998); + case "::": + var h = args.head, rest = args.tail;var ctx_424 = ctx_push(ctx_423, [{key: "h", val: h}, {key: "rest", val: rest}]); + log_event("JsInterpreter.js", 2296, ctx_424, "case"); + + var _return_1007 = if_some((function () { + log_event("JsInterpreter.js", 2286, ctx_424, "call"); + var _return_1003 = object_heap_map_properties_pickable_option( + s, l, function (p) { + var ctx_425 = ctx_push(ctx_424, [{key: "p", val: p}]); + log_event("JsInterpreter.js", 2284, ctx_425, "enter"); + var _return_1002 = (function () { + log_event("JsInterpreter.js", 2282, ctx_425, "call"); + var _return_1001 = + HeapStr.write(p, + (function () { + log_event("JsInterpreter.js", 2278, ctx_425, "call"); + var _return_999 = + JsNumber.to_string( + ind); + log_event("JsInterpreter.js", 2277, ctx_push(ctx_425, [{key: "#RETURN_VALUE#", val: _return_999}]), "return"); + return (_return_999); + }()), + Coq_attributes_data_of( + (function () { + log_event("JsInterpreter.js", 2280, ctx_425, "call"); + var _return_1000 = + attributes_data_intro_all_true( + h); + log_event("JsInterpreter.js", 2279, ctx_push(ctx_425, [{key: "#RETURN_VALUE#", val: _return_1000}]), "return"); + return (_return_1000); + }()))); + log_event("JsInterpreter.js", 2281, ctx_push(ctx_425, [{key: "#RETURN_VALUE#", val: _return_1001}]), "return"); + return (_return_1001); + }()) + ; + log_event("JsInterpreter.js", 2283, ctx_push(ctx_425, [{key: "#RETURN_VALUE#", val: _return_1002}]), "return"); + return (_return_1002); }); + log_event("JsInterpreter.js", 2285, ctx_push(ctx_424, [{key: "#RETURN_VALUE#", val: _return_1003}]), "return"); + return (_return_1003); }()), function(s_2) { + + var ctx_426 = ctx_push(ctx_424, [{key: "s_2", val: s_2}]); + log_event("JsInterpreter.js", 2294, ctx_426, "let"); + var _return_1006 = (function () { + log_event("JsInterpreter.js", 2290, ctx_426, "call"); + var _return_1005 = array_args_map_loop(s_2, c, + l, rest, (function () { + log_event("JsInterpreter.js", 2288, ctx_426, "call"); + var _return_1004 = + (ind + 1.); + log_event("JsInterpreter.js", 2287, ctx_push(ctx_426, [{key: "#RETURN_VALUE#", val: _return_1004}]), "return"); + return (_return_1004); + }())); + log_event("JsInterpreter.js", 2289, ctx_push(ctx_426, [{key: "#RETURN_VALUE#", val: _return_1005}]), "return"); + return (_return_1005); + }()) + ; + log_event("JsInterpreter.js", 2291, ctx_push(ctx_426, [{key: "#RETURN_VALUE#", val: _return_1006}]), "return"); + return (_return_1006); + }); + log_event("JsInterpreter.js", 2295, ctx_push(ctx_424, [{key: "#RETURN_VALUE#", val: _return_1007}]), "return"); + return (_return_1007); + } + +}; + +var string_of_prealloc = function (_foo_) { + var ctx_427 = ctx_push(ctx_empty, [{key: "_foo_", val: _foo_}]); + log_event("JsInterpreter.js", 2444, ctx_427, "enter"); + log_event("JsInterpreter.js", 2443, ctx_427, "switch"); + switch (_foo_.tag) { + case "Coq_prealloc_global":log_event("JsInterpreter.js", 2300, ctx_427, "case"); + + var _return_1008 = "global"; + log_event("JsInterpreter.js", 2299, ctx_push(ctx_427, [{key: "#RETURN_VALUE#", val: _return_1008}]), "return"); + return (_return_1008); + case "Coq_prealloc_global_eval":log_event("JsInterpreter.js", 2302, ctx_427, "case"); + + var _return_1009 = "global_eval"; + log_event("JsInterpreter.js", 2301, ctx_push(ctx_427, [{key: "#RETURN_VALUE#", val: _return_1009}]), "return"); + return (_return_1009); + case "Coq_prealloc_global_parse_int":log_event("JsInterpreter.js", 2304, ctx_427, "case"); + + var _return_1010 = "global_parse_int"; + log_event("JsInterpreter.js", 2303, ctx_push(ctx_427, [{key: "#RETURN_VALUE#", val: _return_1010}]), "return"); + return (_return_1010); + case "Coq_prealloc_global_parse_float":log_event("JsInterpreter.js", 2306, ctx_427, "case"); + + var _return_1011 = "global_parse_float"; + log_event("JsInterpreter.js", 2305, ctx_push(ctx_427, [{key: "#RETURN_VALUE#", val: _return_1011}]), "return"); + return (_return_1011); + case "Coq_prealloc_global_is_finite":log_event("JsInterpreter.js", 2308, ctx_427, "case"); + + var _return_1012 = "global_is_finite"; + log_event("JsInterpreter.js", 2307, ctx_push(ctx_427, [{key: "#RETURN_VALUE#", val: _return_1012}]), "return"); + return (_return_1012); + case "Coq_prealloc_global_is_nan":log_event("JsInterpreter.js", 2310, ctx_427, "case"); + + var _return_1013 = "global_is_nan"; + log_event("JsInterpreter.js", 2309, ctx_push(ctx_427, [{key: "#RETURN_VALUE#", val: _return_1013}]), "return"); + return (_return_1013); + case "Coq_prealloc_global_decode_uri":log_event("JsInterpreter.js", 2312, ctx_427, "case"); + + var _return_1014 = "global_decode_uri"; + log_event("JsInterpreter.js", 2311, ctx_push(ctx_427, [{key: "#RETURN_VALUE#", val: _return_1014}]), "return"); + return (_return_1014); + case "Coq_prealloc_global_decode_uri_component":log_event("JsInterpreter.js", 2314, ctx_427, "case"); + + var _return_1015 = "global_decode_uri_component"; + log_event("JsInterpreter.js", 2313, ctx_push(ctx_427, [{key: "#RETURN_VALUE#", val: _return_1015}]), "return"); + return (_return_1015); + case "Coq_prealloc_global_encode_uri":log_event("JsInterpreter.js", 2316, ctx_427, "case"); + + var _return_1016 = "global_encode_uri"; + log_event("JsInterpreter.js", 2315, ctx_push(ctx_427, [{key: "#RETURN_VALUE#", val: _return_1016}]), "return"); + return (_return_1016); + case "Coq_prealloc_global_encode_uri_component":log_event("JsInterpreter.js", 2318, ctx_427, "case"); + + var _return_1017 = "global_encode_uri_component"; + log_event("JsInterpreter.js", 2317, ctx_push(ctx_427, [{key: "#RETURN_VALUE#", val: _return_1017}]), "return"); + return (_return_1017); + case "Coq_prealloc_object":log_event("JsInterpreter.js", 2320, ctx_427, "case"); + + var _return_1018 = "object"; + log_event("JsInterpreter.js", 2319, ctx_push(ctx_427, [{key: "#RETURN_VALUE#", val: _return_1018}]), "return"); + return (_return_1018); + case "Coq_prealloc_object_get_proto_of":log_event("JsInterpreter.js", 2322, ctx_427, "case"); + + var _return_1019 = "object_get_proto_of"; + log_event("JsInterpreter.js", 2321, ctx_push(ctx_427, [{key: "#RETURN_VALUE#", val: _return_1019}]), "return"); + return (_return_1019); + case "Coq_prealloc_object_get_own_prop_descriptor":log_event("JsInterpreter.js", 2324, ctx_427, "case"); + + var _return_1020 = "object_get_own_prop_descriptor"; + log_event("JsInterpreter.js", 2323, ctx_push(ctx_427, [{key: "#RETURN_VALUE#", val: _return_1020}]), "return"); + return (_return_1020); + case "Coq_prealloc_object_get_own_prop_name":log_event("JsInterpreter.js", 2326, ctx_427, "case"); + + var _return_1021 = "object_get_own_prop_name"; + log_event("JsInterpreter.js", 2325, ctx_push(ctx_427, [{key: "#RETURN_VALUE#", val: _return_1021}]), "return"); + return (_return_1021); + case "Coq_prealloc_object_create":log_event("JsInterpreter.js", 2328, ctx_427, "case"); + + var _return_1022 = "object_create"; + log_event("JsInterpreter.js", 2327, ctx_push(ctx_427, [{key: "#RETURN_VALUE#", val: _return_1022}]), "return"); + return (_return_1022); + case "Coq_prealloc_object_define_prop":log_event("JsInterpreter.js", 2330, ctx_427, "case"); + + var _return_1023 = "object_define_prop"; + log_event("JsInterpreter.js", 2329, ctx_push(ctx_427, [{key: "#RETURN_VALUE#", val: _return_1023}]), "return"); + return (_return_1023); + case "Coq_prealloc_object_define_props":log_event("JsInterpreter.js", 2332, ctx_427, "case"); + + var _return_1024 = "object_define_props"; + log_event("JsInterpreter.js", 2331, ctx_push(ctx_427, [{key: "#RETURN_VALUE#", val: _return_1024}]), "return"); + return (_return_1024); + case "Coq_prealloc_object_seal":log_event("JsInterpreter.js", 2334, ctx_427, "case"); + + var _return_1025 = "object_seal"; + log_event("JsInterpreter.js", 2333, ctx_push(ctx_427, [{key: "#RETURN_VALUE#", val: _return_1025}]), "return"); + return (_return_1025); + case "Coq_prealloc_object_freeze":log_event("JsInterpreter.js", 2336, ctx_427, "case"); + + var _return_1026 = "object_freeze"; + log_event("JsInterpreter.js", 2335, ctx_push(ctx_427, [{key: "#RETURN_VALUE#", val: _return_1026}]), "return"); + return (_return_1026); + case "Coq_prealloc_object_prevent_extensions":log_event("JsInterpreter.js", 2338, ctx_427, "case"); + + var _return_1027 = "object_prevent_extensions"; + log_event("JsInterpreter.js", 2337, ctx_push(ctx_427, [{key: "#RETURN_VALUE#", val: _return_1027}]), "return"); + return (_return_1027); + case "Coq_prealloc_object_is_sealed":log_event("JsInterpreter.js", 2340, ctx_427, "case"); + + var _return_1028 = "object_is_sealed"; + log_event("JsInterpreter.js", 2339, ctx_push(ctx_427, [{key: "#RETURN_VALUE#", val: _return_1028}]), "return"); + return (_return_1028); + case "Coq_prealloc_object_is_frozen":log_event("JsInterpreter.js", 2342, ctx_427, "case"); + + var _return_1029 = "object_is_frozen"; + log_event("JsInterpreter.js", 2341, ctx_push(ctx_427, [{key: "#RETURN_VALUE#", val: _return_1029}]), "return"); + return (_return_1029); + case "Coq_prealloc_object_is_extensible":log_event("JsInterpreter.js", 2344, ctx_427, "case"); + + var _return_1030 = "object_is_extensible"; + log_event("JsInterpreter.js", 2343, ctx_push(ctx_427, [{key: "#RETURN_VALUE#", val: _return_1030}]), "return"); + return (_return_1030); + case "Coq_prealloc_object_keys":log_event("JsInterpreter.js", 2346, ctx_427, "case"); + + var _return_1031 = "object_keys"; + log_event("JsInterpreter.js", 2345, ctx_push(ctx_427, [{key: "#RETURN_VALUE#", val: _return_1031}]), "return"); + return (_return_1031); + case "Coq_prealloc_object_keys_call":log_event("JsInterpreter.js", 2348, ctx_427, "case"); + + var _return_1032 = "object_keys_call"; + log_event("JsInterpreter.js", 2347, ctx_push(ctx_427, [{key: "#RETURN_VALUE#", val: _return_1032}]), "return"); + return (_return_1032); + case "Coq_prealloc_object_proto":log_event("JsInterpreter.js", 2350, ctx_427, "case"); + + var _return_1033 = "object_proto_"; + log_event("JsInterpreter.js", 2349, ctx_push(ctx_427, [{key: "#RETURN_VALUE#", val: _return_1033}]), "return"); + return (_return_1033); + case "Coq_prealloc_object_proto_to_string":log_event("JsInterpreter.js", 2352, ctx_427, "case"); + + var _return_1034 = "object_proto_to_string"; + log_event("JsInterpreter.js", 2351, ctx_push(ctx_427, [{key: "#RETURN_VALUE#", val: _return_1034}]), "return"); + return (_return_1034); + case "Coq_prealloc_object_proto_value_of":log_event("JsInterpreter.js", 2354, ctx_427, "case"); + + var _return_1035 = "object_proto_value_of"; + log_event("JsInterpreter.js", 2353, ctx_push(ctx_427, [{key: "#RETURN_VALUE#", val: _return_1035}]), "return"); + return (_return_1035); + case "Coq_prealloc_object_proto_has_own_prop":log_event("JsInterpreter.js", 2356, ctx_427, "case"); + + var _return_1036 = "object_proto_has_own_prop"; + log_event("JsInterpreter.js", 2355, ctx_push(ctx_427, [{key: "#RETURN_VALUE#", val: _return_1036}]), "return"); + return (_return_1036); + case "Coq_prealloc_object_proto_is_prototype_of":log_event("JsInterpreter.js", 2358, ctx_427, "case"); + + var _return_1037 = "object_proto_is_prototype_of"; + log_event("JsInterpreter.js", 2357, ctx_push(ctx_427, [{key: "#RETURN_VALUE#", val: _return_1037}]), "return"); + return (_return_1037); + case "Coq_prealloc_object_proto_prop_is_enumerable":log_event("JsInterpreter.js", 2360, ctx_427, "case"); + + var _return_1038 = "object_proto_prop_is_enumerable"; + log_event("JsInterpreter.js", 2359, ctx_push(ctx_427, [{key: "#RETURN_VALUE#", val: _return_1038}]), "return"); + return (_return_1038); + case "Coq_prealloc_function":log_event("JsInterpreter.js", 2362, ctx_427, "case"); + + var _return_1039 = "function"; + log_event("JsInterpreter.js", 2361, ctx_push(ctx_427, [{key: "#RETURN_VALUE#", val: _return_1039}]), "return"); + return (_return_1039); + case "Coq_prealloc_function_proto":log_event("JsInterpreter.js", 2364, ctx_427, "case"); + + var _return_1040 = "function_proto"; + log_event("JsInterpreter.js", 2363, ctx_push(ctx_427, [{key: "#RETURN_VALUE#", val: _return_1040}]), "return"); + return (_return_1040); + case "Coq_prealloc_function_proto_to_string":log_event("JsInterpreter.js", 2366, ctx_427, "case"); + + var _return_1041 = "function_proto_to_string"; + log_event("JsInterpreter.js", 2365, ctx_push(ctx_427, [{key: "#RETURN_VALUE#", val: _return_1041}]), "return"); + return (_return_1041); + case "Coq_prealloc_function_proto_apply":log_event("JsInterpreter.js", 2368, ctx_427, "case"); + + var _return_1042 = "function_proto_apply"; + log_event("JsInterpreter.js", 2367, ctx_push(ctx_427, [{key: "#RETURN_VALUE#", val: _return_1042}]), "return"); + return (_return_1042); + case "Coq_prealloc_function_proto_call":log_event("JsInterpreter.js", 2370, ctx_427, "case"); + + var _return_1043 = "function_proto_call"; + log_event("JsInterpreter.js", 2369, ctx_push(ctx_427, [{key: "#RETURN_VALUE#", val: _return_1043}]), "return"); + return (_return_1043); + case "Coq_prealloc_function_proto_bind":log_event("JsInterpreter.js", 2372, ctx_427, "case"); + + var _return_1044 = "function_proto_bind"; + log_event("JsInterpreter.js", 2371, ctx_push(ctx_427, [{key: "#RETURN_VALUE#", val: _return_1044}]), "return"); + return (_return_1044); + case "Coq_prealloc_bool":log_event("JsInterpreter.js", 2374, ctx_427, "case"); + + var _return_1045 = "bool"; + log_event("JsInterpreter.js", 2373, ctx_push(ctx_427, [{key: "#RETURN_VALUE#", val: _return_1045}]), "return"); + return (_return_1045); + case "Coq_prealloc_bool_proto":log_event("JsInterpreter.js", 2376, ctx_427, "case"); + + var _return_1046 = "bool_proto"; + log_event("JsInterpreter.js", 2375, ctx_push(ctx_427, [{key: "#RETURN_VALUE#", val: _return_1046}]), "return"); + return (_return_1046); + case "Coq_prealloc_bool_proto_to_string":log_event("JsInterpreter.js", 2378, ctx_427, "case"); + + var _return_1047 = "bool_proto_to_string"; + log_event("JsInterpreter.js", 2377, ctx_push(ctx_427, [{key: "#RETURN_VALUE#", val: _return_1047}]), "return"); + return (_return_1047); + case "Coq_prealloc_bool_proto_value_of":log_event("JsInterpreter.js", 2380, ctx_427, "case"); + + var _return_1048 = "bool_proto_value_of"; + log_event("JsInterpreter.js", 2379, ctx_push(ctx_427, [{key: "#RETURN_VALUE#", val: _return_1048}]), "return"); + return (_return_1048); + case "Coq_prealloc_number":log_event("JsInterpreter.js", 2382, ctx_427, "case"); + + var _return_1049 = "number"; + log_event("JsInterpreter.js", 2381, ctx_push(ctx_427, [{key: "#RETURN_VALUE#", val: _return_1049}]), "return"); + return (_return_1049); + case "Coq_prealloc_number_proto":log_event("JsInterpreter.js", 2384, ctx_427, "case"); + + var _return_1050 = "number_proto"; + log_event("JsInterpreter.js", 2383, ctx_push(ctx_427, [{key: "#RETURN_VALUE#", val: _return_1050}]), "return"); + return (_return_1050); + case "Coq_prealloc_number_proto_to_string":log_event("JsInterpreter.js", 2386, ctx_427, "case"); + + var _return_1051 = "number_proto_to_string"; + log_event("JsInterpreter.js", 2385, ctx_push(ctx_427, [{key: "#RETURN_VALUE#", val: _return_1051}]), "return"); + return (_return_1051); + case "Coq_prealloc_number_proto_value_of":log_event("JsInterpreter.js", 2388, ctx_427, "case"); + + var _return_1052 = "number_proto_value_of"; + log_event("JsInterpreter.js", 2387, ctx_push(ctx_427, [{key: "#RETURN_VALUE#", val: _return_1052}]), "return"); + return (_return_1052); + case "Coq_prealloc_number_proto_to_fixed":log_event("JsInterpreter.js", 2390, ctx_427, "case"); + + var _return_1053 = "number_proto_to_fixed"; + log_event("JsInterpreter.js", 2389, ctx_push(ctx_427, [{key: "#RETURN_VALUE#", val: _return_1053}]), "return"); + return (_return_1053); + case "Coq_prealloc_number_proto_to_exponential":log_event("JsInterpreter.js", 2392, ctx_427, "case"); + + var _return_1054 = "number_proto_to_exponential"; + log_event("JsInterpreter.js", 2391, ctx_push(ctx_427, [{key: "#RETURN_VALUE#", val: _return_1054}]), "return"); + return (_return_1054); + case "Coq_prealloc_number_proto_to_precision":log_event("JsInterpreter.js", 2394, ctx_427, "case"); + + var _return_1055 = "number_proto_to_precision"; + log_event("JsInterpreter.js", 2393, ctx_push(ctx_427, [{key: "#RETURN_VALUE#", val: _return_1055}]), "return"); + return (_return_1055); + case "Coq_prealloc_array":log_event("JsInterpreter.js", 2396, ctx_427, "case"); + + var _return_1056 = "array"; + log_event("JsInterpreter.js", 2395, ctx_push(ctx_427, [{key: "#RETURN_VALUE#", val: _return_1056}]), "return"); + return (_return_1056); + case "Coq_prealloc_array_is_array":log_event("JsInterpreter.js", 2398, ctx_427, "case"); + + var _return_1057 = "array_is_array"; + log_event("JsInterpreter.js", 2397, ctx_push(ctx_427, [{key: "#RETURN_VALUE#", val: _return_1057}]), "return"); + return (_return_1057); + case "Coq_prealloc_array_proto":log_event("JsInterpreter.js", 2400, ctx_427, "case"); + + var _return_1058 = "array_proto"; + log_event("JsInterpreter.js", 2399, ctx_push(ctx_427, [{key: "#RETURN_VALUE#", val: _return_1058}]), "return"); + return (_return_1058); + case "Coq_prealloc_array_proto_to_string":log_event("JsInterpreter.js", 2402, ctx_427, "case"); + + var _return_1059 = "array_proto_to_string"; + log_event("JsInterpreter.js", 2401, ctx_push(ctx_427, [{key: "#RETURN_VALUE#", val: _return_1059}]), "return"); + return (_return_1059); + case "Coq_prealloc_array_proto_join":log_event("JsInterpreter.js", 2404, ctx_427, "case"); + + var _return_1060 = "array_proto_join"; + log_event("JsInterpreter.js", 2403, ctx_push(ctx_427, [{key: "#RETURN_VALUE#", val: _return_1060}]), "return"); + return (_return_1060); + case "Coq_prealloc_array_proto_pop":log_event("JsInterpreter.js", 2406, ctx_427, "case"); + + var _return_1061 = "array_proto_pop"; + log_event("JsInterpreter.js", 2405, ctx_push(ctx_427, [{key: "#RETURN_VALUE#", val: _return_1061}]), "return"); + return (_return_1061); + case "Coq_prealloc_array_proto_push":log_event("JsInterpreter.js", 2408, ctx_427, "case"); + + var _return_1062 = "array_proto_push"; + log_event("JsInterpreter.js", 2407, ctx_push(ctx_427, [{key: "#RETURN_VALUE#", val: _return_1062}]), "return"); + return (_return_1062); + case "Coq_prealloc_string":log_event("JsInterpreter.js", 2410, ctx_427, "case"); + + var _return_1063 = "string"; + log_event("JsInterpreter.js", 2409, ctx_push(ctx_427, [{key: "#RETURN_VALUE#", val: _return_1063}]), "return"); + return (_return_1063); + case "Coq_prealloc_string_proto":log_event("JsInterpreter.js", 2412, ctx_427, "case"); + + var _return_1064 = "string_proto"; + log_event("JsInterpreter.js", 2411, ctx_push(ctx_427, [{key: "#RETURN_VALUE#", val: _return_1064}]), "return"); + return (_return_1064); + case "Coq_prealloc_string_proto_to_string":log_event("JsInterpreter.js", 2414, ctx_427, "case"); + + var _return_1065 = "string_proto_to_string"; + log_event("JsInterpreter.js", 2413, ctx_push(ctx_427, [{key: "#RETURN_VALUE#", val: _return_1065}]), "return"); + return (_return_1065); + case "Coq_prealloc_string_proto_value_of":log_event("JsInterpreter.js", 2416, ctx_427, "case"); + + var _return_1066 = "string_proto_value_of"; + log_event("JsInterpreter.js", 2415, ctx_push(ctx_427, [{key: "#RETURN_VALUE#", val: _return_1066}]), "return"); + return (_return_1066); + case "Coq_prealloc_string_proto_char_at":log_event("JsInterpreter.js", 2418, ctx_427, "case"); + + var _return_1067 = "string_proto_char_at"; + log_event("JsInterpreter.js", 2417, ctx_push(ctx_427, [{key: "#RETURN_VALUE#", val: _return_1067}]), "return"); + return (_return_1067); + case "Coq_prealloc_string_proto_char_code_at":log_event("JsInterpreter.js", 2420, ctx_427, "case"); + + var _return_1068 = "string_proto_char_code_at"; + log_event("JsInterpreter.js", 2419, ctx_push(ctx_427, [{key: "#RETURN_VALUE#", val: _return_1068}]), "return"); + return (_return_1068); + case "Coq_prealloc_math":log_event("JsInterpreter.js", 2422, ctx_427, "case"); + + var _return_1069 = "math"; + log_event("JsInterpreter.js", 2421, ctx_push(ctx_427, [{key: "#RETURN_VALUE#", val: _return_1069}]), "return"); + return (_return_1069); + case "Coq_prealloc_mathop": + var m = _foo_.mathop;var ctx_428 = ctx_push(ctx_427, [{key: "m", val: m}]); + log_event("JsInterpreter.js", 2424, ctx_428, "case"); + + var _return_1070 = "mathop"; + log_event("JsInterpreter.js", 2423, ctx_push(ctx_428, [{key: "#RETURN_VALUE#", val: _return_1070}]), "return"); + return (_return_1070); + case "Coq_prealloc_date":log_event("JsInterpreter.js", 2426, ctx_427, "case"); + + var _return_1071 = "date"; + log_event("JsInterpreter.js", 2425, ctx_push(ctx_427, [{key: "#RETURN_VALUE#", val: _return_1071}]), "return"); + return (_return_1071); + case "Coq_prealloc_regexp":log_event("JsInterpreter.js", 2428, ctx_427, "case"); + + var _return_1072 = "regexp"; + log_event("JsInterpreter.js", 2427, ctx_push(ctx_427, [{key: "#RETURN_VALUE#", val: _return_1072}]), "return"); + return (_return_1072); + case "Coq_prealloc_error":log_event("JsInterpreter.js", 2430, ctx_427, "case"); + + var _return_1073 = "error"; + log_event("JsInterpreter.js", 2429, ctx_push(ctx_427, [{key: "#RETURN_VALUE#", val: _return_1073}]), "return"); + return (_return_1073); + case "Coq_prealloc_error_proto":log_event("JsInterpreter.js", 2432, ctx_427, "case"); + + var _return_1074 = "error_proto"; + log_event("JsInterpreter.js", 2431, ctx_push(ctx_427, [{key: "#RETURN_VALUE#", val: _return_1074}]), "return"); + return (_return_1074); + case "Coq_prealloc_native_error": + var n = _foo_.error;var ctx_429 = ctx_push(ctx_427, [{key: "n", val: n}]); + log_event("JsInterpreter.js", 2434, ctx_429, "case"); + + var _return_1075 = "native_error"; + log_event("JsInterpreter.js", 2433, ctx_push(ctx_429, [{key: "#RETURN_VALUE#", val: _return_1075}]), "return"); + return (_return_1075); + case "Coq_prealloc_native_error_proto": + var n = _foo_.error;var ctx_430 = ctx_push(ctx_427, [{key: "n", val: n}]); + log_event("JsInterpreter.js", 2436, ctx_430, "case"); + + var _return_1076 = "native_error_proto"; + log_event("JsInterpreter.js", 2435, ctx_push(ctx_430, [{key: "#RETURN_VALUE#", val: _return_1076}]), "return"); + return (_return_1076); + case "Coq_prealloc_error_proto_to_string":log_event("JsInterpreter.js", 2438, ctx_427, "case"); + + var _return_1077 = "error_proto_to_string"; + log_event("JsInterpreter.js", 2437, ctx_push(ctx_427, [{key: "#RETURN_VALUE#", val: _return_1077}]), "return"); + return (_return_1077); + case "Coq_prealloc_throw_type_error":log_event("JsInterpreter.js", 2440, ctx_427, "case"); + + var _return_1078 = "throw_type_error"; + log_event("JsInterpreter.js", 2439, ctx_push(ctx_427, [{key: "#RETURN_VALUE#", val: _return_1078}]), "return"); + return (_return_1078); + case "Coq_prealloc_json":log_event("JsInterpreter.js", 2442, ctx_427, "case"); + + var _return_1079 = "json"; + log_event("JsInterpreter.js", 2441, ctx_push(ctx_427, [{key: "#RETURN_VALUE#", val: _return_1079}]), "return"); + return (_return_1079); + } + +}; + +var run_construct_prealloc = function (s, c, b, args) { + var ctx_431 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "b", val: b}, {key: "args", val: args}]); + log_event("JsInterpreter.js", 2722, ctx_431, "enter"); + log_event("JsInterpreter.js", 2721, ctx_431, "switch"); + switch (b.tag) { + case "Coq_prealloc_object":log_event("JsInterpreter.js", 2451, ctx_431, "case"); + + var v = (function () { + log_event("JsInterpreter.js", 2446, ctx_431, "call"); + var _return_1080 = get_arg(0, args); + log_event("JsInterpreter.js", 2445, ctx_push(ctx_431, [{key: "#RETURN_VALUE#", val: _return_1080}]), "return"); + return (_return_1080); + }()) + ; + var ctx_432 = ctx_push(ctx_431, [{key: "v", val: v}]); + log_event("JsInterpreter.js", 2450, ctx_432, "let"); + var _return_1082 = (function () { + log_event("JsInterpreter.js", 2448, ctx_432, "call"); + var _return_1081 = call_object_new(s, v); + log_event("JsInterpreter.js", 2447, ctx_push(ctx_432, [{key: "#RETURN_VALUE#", val: _return_1081}]), "return"); + return (_return_1081); + }()) + ; + log_event("JsInterpreter.js", 2449, ctx_push(ctx_432, [{key: "#RETURN_VALUE#", val: _return_1082}]), "return"); + return (_return_1082); + + case "Coq_prealloc_bool":log_event("JsInterpreter.js", 2468, ctx_431, "case"); + + var _return_1088 = result_out((function () { + var v = (function () { + log_event("JsInterpreter.js", 2453, ctx_431, "call"); + var _return_1083 = get_arg(0, args); + log_event("JsInterpreter.js", 2452, ctx_push(ctx_431, [{key: "#RETURN_VALUE#", val: _return_1083}]), "return"); + return (_return_1083); + }()) + ; + var ctx_433 = ctx_push(ctx_431, [{key: "v", val: v}]); + log_event("JsInterpreter.js", 2466, ctx_433, "let"); + var b0 = (function () { + log_event("JsInterpreter.js", 2455, ctx_433, "call"); + var _return_1084 = convert_value_to_boolean(v); + log_event("JsInterpreter.js", 2454, ctx_push(ctx_433, [{key: "#RETURN_VALUE#", val: _return_1084}]), "return"); + return (_return_1084); + }()) + ; + var ctx_434 = ctx_push(ctx_433, [{key: "b0", val: b0}]); + log_event("JsInterpreter.js", 2465, ctx_434, "let"); + var o1 = (function () { + log_event("JsInterpreter.js", 2457, ctx_434, "call"); + var _return_1085 = object_new( + Coq_value_object( + Coq_object_loc_prealloc( + Coq_prealloc_bool_proto( + ))), "Boolean"); + log_event("JsInterpreter.js", 2456, ctx_push(ctx_434, [{key: "#RETURN_VALUE#", val: _return_1085}]), "return"); + return (_return_1085); + }()) + ; + var ctx_435 = ctx_push(ctx_434, [{key: "o1", val: o1}]); + log_event("JsInterpreter.js", 2464, ctx_435, "let"); + var o = object_with_primitive_value(o1, + Coq_value_prim(Coq_prim_bool(b0))); + var ctx_436 = ctx_push(ctx_435, [{key: "o", val: o}]); + log_event("JsInterpreter.js", 2463, ctx_436, "let"); + var p = (function () { + log_event("JsInterpreter.js", 2459, ctx_436, "call"); + var _return_1086 = object_alloc(s, o); + log_event("JsInterpreter.js", 2458, ctx_push(ctx_436, [{key: "#RETURN_VALUE#", val: _return_1086}]), "return"); + return (_return_1086); + }()) + ; + var ctx_437 = ctx_push(ctx_436, [{key: "p", val: p}]); + log_event("JsInterpreter.js", 2462, ctx_437, "let"); + var l = p[0], s_2 = p[1]; + var ctx_438 = ctx_push(ctx_437, [{key: "l", val: l}, {key: "s_2", val: s_2}]); + log_event("JsInterpreter.js", 2461, ctx_438, "let"); + var _return_1087 = Coq_out_ter(s_2, + res_val( + Coq_value_object(l))); + log_event("JsInterpreter.js", 2460, ctx_push(ctx_438, [{key: "#RETURN_VALUE#", val: _return_1087}]), "return"); + return (_return_1087); + + + + + + }())); + log_event("JsInterpreter.js", 2467, ctx_push(ctx_431, [{key: "#RETURN_VALUE#", val: _return_1088}]), "return"); + return (_return_1088); + case "Coq_prealloc_number":log_event("JsInterpreter.js", 2497, ctx_431, "case"); + + var follow = function (s_2, v) { + var ctx_439 = ctx_push(ctx_431, [{key: "s_2", val: s_2}, {key: "v", val: v}]); + log_event("JsInterpreter.js", 2477, ctx_439, "enter"); + var o1 = (function () { + log_event("JsInterpreter.js", 2470, ctx_439, "call"); + var _return_1089 = object_new( + Coq_value_object( + Coq_object_loc_prealloc( + Coq_prealloc_number_proto())), "Number"); + log_event("JsInterpreter.js", 2469, ctx_push(ctx_439, [{key: "#RETURN_VALUE#", val: _return_1089}]), "return"); + return (_return_1089); + }()) + ; + var ctx_440 = ctx_push(ctx_439, [{key: "o1", val: o1}]); + log_event("JsInterpreter.js", 2476, ctx_440, "let"); + var o = object_with_primitive_value(o1, v); + var ctx_441 = ctx_push(ctx_440, [{key: "o", val: o}]); + log_event("JsInterpreter.js", 2475, ctx_441, "let"); + var _tuple_arg_1090 = (function () { + log_event("JsInterpreter.js", 2472, ctx_441, "call"); + var _return_1091 = object_alloc(s_2, o); + log_event("JsInterpreter.js", 2471, ctx_push(ctx_441, [{key: "#RETURN_VALUE#", val: _return_1091}]), "return"); + return (_return_1091); + }()) + ; + var l = _tuple_arg_1090[0], s1 = _tuple_arg_1090[1]; + var ctx_442 = ctx_push(ctx_441, [{key: "l", val: l}, {key: "s1", val: s1}]); + log_event("JsInterpreter.js", 2474, ctx_442, "let"); + var _return_1092 = result_out( + Coq_out_ter(s1, res_val(Coq_value_object(l)))); + log_event("JsInterpreter.js", 2473, ctx_push(ctx_442, [{key: "#RETURN_VALUE#", val: _return_1092}]), "return"); + return (_return_1092); + + + + }; + var ctx_443 = ctx_push(ctx_431, [{key: "follow", val: follow}]); + log_event("JsInterpreter.js", 2496, ctx_443, "let"); + var _if_arg_1093 = (function () { + log_event("JsInterpreter.js", 2479, ctx_443, "call"); + var _return_1094 = list_eq_nil_decidable(args); + log_event("JsInterpreter.js", 2478, ctx_push(ctx_443, [{key: "#RETURN_VALUE#", val: _return_1094}]), "return"); + return (_return_1094); + }()) + ; + log_event("JsInterpreter.js", 2495, ctx_443, "if"); + if (_if_arg_1093) { + var _return_1101 = (function () { + log_event("JsInterpreter.js", 2493, ctx_443, "call"); + var _return_1100 = follow(s, + Coq_value_prim(Coq_prim_number(JsNumber.zero))); + log_event("JsInterpreter.js", 2492, ctx_push(ctx_443, [{key: "#RETURN_VALUE#", val: _return_1100}]), "return"); + return (_return_1100); + }()) + ; + log_event("JsInterpreter.js", 2494, ctx_push(ctx_443, [{key: "#RETURN_VALUE#", val: _return_1101}]), "return"); + return (_return_1101); + } else { + var v = (function () { + log_event("JsInterpreter.js", 2481, ctx_443, "call"); + var _return_1095 = get_arg(0, args); + log_event("JsInterpreter.js", 2480, ctx_push(ctx_443, [{key: "#RETURN_VALUE#", val: _return_1095}]), "return"); + return (_return_1095); + }()) + ; + var ctx_444 = ctx_push(ctx_443, [{key: "v", val: v}]); + log_event("JsInterpreter.js", 2491, ctx_444, "let"); + var _return_1099 = if_number((function () { + log_event("JsInterpreter.js", 2483, ctx_444, "call"); + var _return_1096 = to_number(s, c, v); + log_event("JsInterpreter.js", 2482, ctx_push(ctx_444, [{key: "#RETURN_VALUE#", val: _return_1096}]), "return"); + return (_return_1096); }()), function(x, x0) { + + var ctx_445 = ctx_push(ctx_444, [{key: "x", val: x}, {key: "x0", val: x0}]); + log_event("JsInterpreter.js", 2489, ctx_445, "let"); + var _return_1098 = (function () { + log_event("JsInterpreter.js", 2485, ctx_445, "call"); + var _return_1097 = follow(x, + Coq_value_prim( + Coq_prim_number(x0))); + log_event("JsInterpreter.js", 2484, ctx_push(ctx_445, [{key: "#RETURN_VALUE#", val: _return_1097}]), "return"); + return (_return_1097); + }()) + ; + log_event("JsInterpreter.js", 2486, ctx_push(ctx_445, [{key: "#RETURN_VALUE#", val: _return_1098}]), "return"); + return (_return_1098); + }); + log_event("JsInterpreter.js", 2490, ctx_push(ctx_444, [{key: "#RETURN_VALUE#", val: _return_1099}]), "return"); + return (_return_1099); + + } + + case "Coq_prealloc_array":log_event("JsInterpreter.js", 2644, ctx_431, "case"); + + var o_2 = (function () { + log_event("JsInterpreter.js", 2499, ctx_431, "call"); + var _return_1102 = object_new( + Coq_value_object( + Coq_object_loc_prealloc( + Coq_prealloc_array_proto())), "Array"); + log_event("JsInterpreter.js", 2498, ctx_push(ctx_431, [{key: "#RETURN_VALUE#", val: _return_1102}]), "return"); + return (_return_1102); + }()) + ; + var ctx_446 = ctx_push(ctx_431, [{key: "o_2", val: o_2}]); + log_event("JsInterpreter.js", 2643, ctx_446, "let"); + var o = object_for_array(o_2, Coq_builtin_define_own_prop_array()); + var ctx_447 = ctx_push(ctx_446, [{key: "o", val: o}]); + log_event("JsInterpreter.js", 2642, ctx_447, "let"); + var p = (function () { + log_event("JsInterpreter.js", 2501, ctx_447, "call"); + var _return_1103 = object_alloc(s, o); + log_event("JsInterpreter.js", 2500, ctx_push(ctx_447, [{key: "#RETURN_VALUE#", val: _return_1103}]), "return"); + return (_return_1103); + }()) + ; + var ctx_448 = ctx_push(ctx_447, [{key: "p", val: p}]); + log_event("JsInterpreter.js", 2641, ctx_448, "let"); + var l = p[0], s_2 = p[1]; + var ctx_449 = ctx_push(ctx_448, [{key: "l", val: l}, {key: "s_2", val: s_2}]); + log_event("JsInterpreter.js", 2640, ctx_449, "let"); + var follow = function (s_3, length0) { + var ctx_450 = ctx_push(ctx_449, [{key: "s_3", val: s_3}, {key: "length0", val: length0}]); + log_event("JsInterpreter.js", 2513, ctx_450, "enter"); + var _return_1108 = if_some((function () { + log_event("JsInterpreter.js", 2507, ctx_450, "call"); + var _return_1106 = object_heap_map_properties_pickable_option( + s_3, l, function (p0) { + var ctx_451 = ctx_push(ctx_450, [{key: "p0", val: p0}]); + log_event("JsInterpreter.js", 2505, ctx_451, "enter"); + var _return_1105 = (function () { + log_event("JsInterpreter.js", 2503, ctx_451, "call"); + var _return_1104 = + HeapStr.write(p0, + "length", + Coq_attributes_data_of( + { + attributes_data_value: + Coq_value_prim( + Coq_prim_number( + length0)), + attributes_data_writable: true, + attributes_data_enumerable: false, + attributes_data_configurable: false + })); + log_event("JsInterpreter.js", 2502, ctx_push(ctx_451, [{key: "#RETURN_VALUE#", val: _return_1104}]), "return"); + return (_return_1104); + }()) + ; + log_event("JsInterpreter.js", 2504, ctx_push(ctx_451, [{key: "#RETURN_VALUE#", val: _return_1105}]), "return"); + return (_return_1105); + }); + log_event("JsInterpreter.js", 2506, ctx_push(ctx_450, [{key: "#RETURN_VALUE#", val: _return_1106}]), "return"); + return (_return_1106); }()), function(s0) { + + var ctx_452 = ctx_push(ctx_450, [{key: "s0", val: s0}]); + log_event("JsInterpreter.js", 2511, ctx_452, "let"); + var _return_1107 = res_ter(s0, + res_val( + Coq_value_object(l))); + log_event("JsInterpreter.js", 2508, ctx_push(ctx_452, [{key: "#RETURN_VALUE#", val: _return_1107}]), "return"); + return (_return_1107); + }); + log_event("JsInterpreter.js", 2512, ctx_push(ctx_450, [{key: "#RETURN_VALUE#", val: _return_1108}]), "return"); + return (_return_1108); + }; + var ctx_453 = ctx_push(ctx_449, [{key: "follow", val: follow}]); + log_event("JsInterpreter.js", 2639, ctx_453, "let"); + var arg_len = (function () { + log_event("JsInterpreter.js", 2515, ctx_453, "call"); + var _return_1109 = LibList.length(args); + log_event("JsInterpreter.js", 2514, ctx_push(ctx_453, [{key: "#RETURN_VALUE#", val: _return_1109}]), "return"); + return (_return_1109); + }()) + ; + var ctx_454 = ctx_push(ctx_453, [{key: "arg_len", val: arg_len}]); + log_event("JsInterpreter.js", 2638, ctx_454, "let"); + var _if_arg_1110 = (function () { + log_event("JsInterpreter.js", 2517, ctx_454, "call"); + var _return_1111 = nat_eq(arg_len, 1); + log_event("JsInterpreter.js", 2516, ctx_push(ctx_454, [{key: "#RETURN_VALUE#", val: _return_1111}]), "return"); + return (_return_1111); + }()) + ; + log_event("JsInterpreter.js", 2637, ctx_454, "if"); + if (_if_arg_1110) { + var v = (function () { + log_event("JsInterpreter.js", 2536, ctx_454, "call"); + var _return_1119 = get_arg(0, args); + log_event("JsInterpreter.js", 2535, ctx_push(ctx_454, [{key: "#RETURN_VALUE#", val: _return_1119}]), "return"); + return (_return_1119); + }()) + ; + var ctx_458 = ctx_push(ctx_454, [{key: "v", val: v}]); + log_event("JsInterpreter.js", 2636, ctx_458, "let"); + log_event("JsInterpreter.js", 2635, ctx_458, "switch"); + switch (v.tag) { + case "Coq_value_prim": + var p0 = v.value;var ctx_459 = ctx_push(ctx_458, [{key: "p0", val: p0}]); + log_event("JsInterpreter.js", 2618, ctx_459, "case"); + + log_event("JsInterpreter.js", 2617, ctx_459, "switch"); + switch (p0.tag) { + case "Coq_prim_undef":log_event("JsInterpreter.js", 2552, ctx_459, "case"); + + var _return_1126 = if_some((function () { + log_event("JsInterpreter.js", 2544, ctx_459, "call"); + var _return_1123 = object_heap_map_properties_pickable_option( + s_2, l, + function (p1) { + var ctx_460 = ctx_push(ctx_459, [{key: "p1", val: p1}]); + log_event("JsInterpreter.js", 2542, ctx_460, "enter"); + var _return_1122 = (function () { + log_event("JsInterpreter.js", 2540, ctx_460, "call"); + var _return_1121 = + HeapStr.write( + p1, "0", + Coq_attributes_data_of( + (function () { + log_event("JsInterpreter.js", 2538, ctx_460, "call"); + var _return_1120 = + attributes_data_intro_all_true( + v); + log_event("JsInterpreter.js", 2537, ctx_push(ctx_460, [{key: "#RETURN_VALUE#", val: _return_1120}]), "return"); + return (_return_1120); + }()))); + log_event("JsInterpreter.js", 2539, ctx_push(ctx_460, [{key: "#RETURN_VALUE#", val: _return_1121}]), "return"); + return (_return_1121); + }()) + ; + log_event("JsInterpreter.js", 2541, ctx_push(ctx_460, [{key: "#RETURN_VALUE#", val: _return_1122}]), "return"); + return (_return_1122); + }); + log_event("JsInterpreter.js", 2543, ctx_push(ctx_459, [{key: "#RETURN_VALUE#", val: _return_1123}]), "return"); + return (_return_1123); }()), + function(s0) { + + var ctx_461 = ctx_push(ctx_459, [{key: "s0", val: s0}]); + log_event("JsInterpreter.js", 2550, ctx_461, "let"); + var _return_1125 = (function () { + log_event("JsInterpreter.js", 2546, ctx_461, "call"); + var _return_1124 = follow(s0, 1.0); + log_event("JsInterpreter.js", 2545, ctx_push(ctx_461, [{key: "#RETURN_VALUE#", val: _return_1124}]), "return"); + return (_return_1124); + }()) + ; + log_event("JsInterpreter.js", 2547, ctx_push(ctx_461, [{key: "#RETURN_VALUE#", val: _return_1125}]), "return"); + return (_return_1125); + }); + log_event("JsInterpreter.js", 2551, ctx_push(ctx_459, [{key: "#RETURN_VALUE#", val: _return_1126}]), "return"); + return (_return_1126); + case "Coq_prim_null":log_event("JsInterpreter.js", 2568, ctx_459, "case"); + + var _return_1133 = if_some((function () { + log_event("JsInterpreter.js", 2560, ctx_459, "call"); + var _return_1130 = object_heap_map_properties_pickable_option( + s_2, l, + function (p1) { + var ctx_462 = ctx_push(ctx_459, [{key: "p1", val: p1}]); + log_event("JsInterpreter.js", 2558, ctx_462, "enter"); + var _return_1129 = (function () { + log_event("JsInterpreter.js", 2556, ctx_462, "call"); + var _return_1128 = + HeapStr.write( + p1, "0", + Coq_attributes_data_of( + (function () { + log_event("JsInterpreter.js", 2554, ctx_462, "call"); + var _return_1127 = + attributes_data_intro_all_true( + v); + log_event("JsInterpreter.js", 2553, ctx_push(ctx_462, [{key: "#RETURN_VALUE#", val: _return_1127}]), "return"); + return (_return_1127); + }()))); + log_event("JsInterpreter.js", 2555, ctx_push(ctx_462, [{key: "#RETURN_VALUE#", val: _return_1128}]), "return"); + return (_return_1128); + }()) + ; + log_event("JsInterpreter.js", 2557, ctx_push(ctx_462, [{key: "#RETURN_VALUE#", val: _return_1129}]), "return"); + return (_return_1129); + }); + log_event("JsInterpreter.js", 2559, ctx_push(ctx_459, [{key: "#RETURN_VALUE#", val: _return_1130}]), "return"); + return (_return_1130); }()), + function(s0) { + + var ctx_463 = ctx_push(ctx_459, [{key: "s0", val: s0}]); + log_event("JsInterpreter.js", 2566, ctx_463, "let"); + var _return_1132 = (function () { + log_event("JsInterpreter.js", 2562, ctx_463, "call"); + var _return_1131 = follow(s0, 1.0); + log_event("JsInterpreter.js", 2561, ctx_push(ctx_463, [{key: "#RETURN_VALUE#", val: _return_1131}]), "return"); + return (_return_1131); + }()) + ; + log_event("JsInterpreter.js", 2563, ctx_push(ctx_463, [{key: "#RETURN_VALUE#", val: _return_1132}]), "return"); + return (_return_1132); + }); + log_event("JsInterpreter.js", 2567, ctx_push(ctx_459, [{key: "#RETURN_VALUE#", val: _return_1133}]), "return"); + return (_return_1133); + case "Coq_prim_bool": + var b0 = p0.value;var ctx_464 = ctx_push(ctx_459, [{key: "b0", val: b0}]); + log_event("JsInterpreter.js", 2584, ctx_464, "case"); + + var _return_1140 = if_some((function () { + log_event("JsInterpreter.js", 2576, ctx_464, "call"); + var _return_1137 = object_heap_map_properties_pickable_option( + s_2, l, + function (p1) { + var ctx_465 = ctx_push(ctx_464, [{key: "p1", val: p1}]); + log_event("JsInterpreter.js", 2574, ctx_465, "enter"); + var _return_1136 = (function () { + log_event("JsInterpreter.js", 2572, ctx_465, "call"); + var _return_1135 = + HeapStr.write( + p1, "0", + Coq_attributes_data_of( + (function () { + log_event("JsInterpreter.js", 2570, ctx_465, "call"); + var _return_1134 = + attributes_data_intro_all_true( + v); + log_event("JsInterpreter.js", 2569, ctx_push(ctx_465, [{key: "#RETURN_VALUE#", val: _return_1134}]), "return"); + return (_return_1134); + }()))); + log_event("JsInterpreter.js", 2571, ctx_push(ctx_465, [{key: "#RETURN_VALUE#", val: _return_1135}]), "return"); + return (_return_1135); + }()) + ; + log_event("JsInterpreter.js", 2573, ctx_push(ctx_465, [{key: "#RETURN_VALUE#", val: _return_1136}]), "return"); + return (_return_1136); + }); + log_event("JsInterpreter.js", 2575, ctx_push(ctx_464, [{key: "#RETURN_VALUE#", val: _return_1137}]), "return"); + return (_return_1137); }()), + function(s0) { + + var ctx_466 = ctx_push(ctx_464, [{key: "s0", val: s0}]); + log_event("JsInterpreter.js", 2582, ctx_466, "let"); + var _return_1139 = (function () { + log_event("JsInterpreter.js", 2578, ctx_466, "call"); + var _return_1138 = follow(s0, 1.0); + log_event("JsInterpreter.js", 2577, ctx_push(ctx_466, [{key: "#RETURN_VALUE#", val: _return_1138}]), "return"); + return (_return_1138); + }()) + ; + log_event("JsInterpreter.js", 2579, ctx_push(ctx_466, [{key: "#RETURN_VALUE#", val: _return_1139}]), "return"); + return (_return_1139); + }); + log_event("JsInterpreter.js", 2583, ctx_push(ctx_464, [{key: "#RETURN_VALUE#", val: _return_1140}]), "return"); + return (_return_1140); + case "Coq_prim_number": + var vlen = p0.value;var ctx_467 = ctx_push(ctx_459, [{key: "vlen", val: vlen}]); + log_event("JsInterpreter.js", 2600, ctx_467, "case"); + + var _return_1148 = if_run((function () { + log_event("JsInterpreter.js", 2586, ctx_467, "call"); + var _return_1141 = to_uint32(s_2, c, + Coq_value_prim( + Coq_prim_number( + vlen))); + log_event("JsInterpreter.js", 2585, ctx_push(ctx_467, [{key: "#RETURN_VALUE#", val: _return_1141}]), "return"); + return (_return_1141); }()), + function(s0, ilen) { + + var ctx_468 = ctx_push(ctx_467, [{key: "s0", val: s0}, {key: "ilen", val: ilen}]); + log_event("JsInterpreter.js", 2598, ctx_468, "let"); + var _if_arg_1142 = (function () { + log_event("JsInterpreter.js", 2588, ctx_468, "call"); + var _return_1143 = (ilen === vlen); + log_event("JsInterpreter.js", 2587, ctx_push(ctx_468, [{key: "#RETURN_VALUE#", val: _return_1143}]), "return"); + return (_return_1143); + }()) + ; + log_event("JsInterpreter.js", 2595, ctx_468, "if"); + if (_if_arg_1142) { + var _return_1147 = (function () { + log_event("JsInterpreter.js", 2593, ctx_468, "call"); + var _return_1146 = follow(s0, + ilen); + log_event("JsInterpreter.js", 2592, ctx_push(ctx_468, [{key: "#RETURN_VALUE#", val: _return_1146}]), "return"); + return (_return_1146); + }()) + ; + log_event("JsInterpreter.js", 2594, ctx_push(ctx_468, [{key: "#RETURN_VALUE#", val: _return_1147}]), "return"); + return (_return_1147); + } else { + var _return_1145 = (function () { + log_event("JsInterpreter.js", 2590, ctx_468, "call"); + var _return_1144 = run_error(s0, + Coq_native_error_range( + )); + log_event("JsInterpreter.js", 2589, ctx_push(ctx_468, [{key: "#RETURN_VALUE#", val: _return_1144}]), "return"); + return (_return_1144); + }()) + ; + log_event("JsInterpreter.js", 2591, ctx_push(ctx_468, [{key: "#RETURN_VALUE#", val: _return_1145}]), "return"); + return (_return_1145); + } + }); + log_event("JsInterpreter.js", 2599, ctx_push(ctx_467, [{key: "#RETURN_VALUE#", val: _return_1148}]), "return"); + return (_return_1148); + case "Coq_prim_string": + var s0 = p0.value;var ctx_469 = ctx_push(ctx_459, [{key: "s0", val: s0}]); + log_event("JsInterpreter.js", 2616, ctx_469, "case"); + + var _return_1155 = if_some((function () { + log_event("JsInterpreter.js", 2608, ctx_469, "call"); + var _return_1152 = object_heap_map_properties_pickable_option( + s_2, l, + function (p1) { + var ctx_470 = ctx_push(ctx_469, [{key: "p1", val: p1}]); + log_event("JsInterpreter.js", 2606, ctx_470, "enter"); + var _return_1151 = (function () { + log_event("JsInterpreter.js", 2604, ctx_470, "call"); + var _return_1150 = + HeapStr.write( + p1, "0", + Coq_attributes_data_of( + (function () { + log_event("JsInterpreter.js", 2602, ctx_470, "call"); + var _return_1149 = + attributes_data_intro_all_true( + v); + log_event("JsInterpreter.js", 2601, ctx_push(ctx_470, [{key: "#RETURN_VALUE#", val: _return_1149}]), "return"); + return (_return_1149); + }()))); + log_event("JsInterpreter.js", 2603, ctx_push(ctx_470, [{key: "#RETURN_VALUE#", val: _return_1150}]), "return"); + return (_return_1150); + }()) + ; + log_event("JsInterpreter.js", 2605, ctx_push(ctx_470, [{key: "#RETURN_VALUE#", val: _return_1151}]), "return"); + return (_return_1151); + }); + log_event("JsInterpreter.js", 2607, ctx_push(ctx_469, [{key: "#RETURN_VALUE#", val: _return_1152}]), "return"); + return (_return_1152); }()), + function(s1) { + + var ctx_471 = ctx_push(ctx_469, [{key: "s1", val: s1}]); + log_event("JsInterpreter.js", 2614, ctx_471, "let"); + var _return_1154 = (function () { + log_event("JsInterpreter.js", 2610, ctx_471, "call"); + var _return_1153 = follow(s1, 1.0); + log_event("JsInterpreter.js", 2609, ctx_push(ctx_471, [{key: "#RETURN_VALUE#", val: _return_1153}]), "return"); + return (_return_1153); + }()) + ; + log_event("JsInterpreter.js", 2611, ctx_push(ctx_471, [{key: "#RETURN_VALUE#", val: _return_1154}]), "return"); + return (_return_1154); + }); + log_event("JsInterpreter.js", 2615, ctx_push(ctx_469, [{key: "#RETURN_VALUE#", val: _return_1155}]), "return"); + return (_return_1155); + } + + case "Coq_value_object": + var o0 = v.value;var ctx_472 = ctx_push(ctx_458, [{key: "o0", val: o0}]); + log_event("JsInterpreter.js", 2634, ctx_472, "case"); + + var _return_1162 = if_some((function () { + log_event("JsInterpreter.js", 2626, ctx_472, "call"); + var _return_1159 = object_heap_map_properties_pickable_option( + s_2, l, + function (p0) { + var ctx_473 = ctx_push(ctx_472, [{key: "p0", val: p0}]); + log_event("JsInterpreter.js", 2624, ctx_473, "enter"); + var _return_1158 = (function () { + log_event("JsInterpreter.js", 2622, ctx_473, "call"); + var _return_1157 = + HeapStr.write(p0, + "0", + Coq_attributes_data_of( + (function () { + log_event("JsInterpreter.js", 2620, ctx_473, "call"); + var _return_1156 = + attributes_data_intro_all_true( + v); + log_event("JsInterpreter.js", 2619, ctx_push(ctx_473, [{key: "#RETURN_VALUE#", val: _return_1156}]), "return"); + return (_return_1156); + }()))); + log_event("JsInterpreter.js", 2621, ctx_push(ctx_473, [{key: "#RETURN_VALUE#", val: _return_1157}]), "return"); + return (_return_1157); + }()) + ; + log_event("JsInterpreter.js", 2623, ctx_push(ctx_473, [{key: "#RETURN_VALUE#", val: _return_1158}]), "return"); + return (_return_1158); + }); + log_event("JsInterpreter.js", 2625, ctx_push(ctx_472, [{key: "#RETURN_VALUE#", val: _return_1159}]), "return"); + return (_return_1159); }()), + function(s0) { + + var ctx_474 = ctx_push(ctx_472, [{key: "s0", val: s0}]); + log_event("JsInterpreter.js", 2632, ctx_474, "let"); + var _return_1161 = (function () { + log_event("JsInterpreter.js", 2628, ctx_474, "call"); + var _return_1160 = follow(s0, 1.0); + log_event("JsInterpreter.js", 2627, ctx_push(ctx_474, [{key: "#RETURN_VALUE#", val: _return_1160}]), "return"); + return (_return_1160); + }()) + ; + log_event("JsInterpreter.js", 2629, ctx_push(ctx_474, [{key: "#RETURN_VALUE#", val: _return_1161}]), "return"); + return (_return_1161); + }); + log_event("JsInterpreter.js", 2633, ctx_push(ctx_472, [{key: "#RETURN_VALUE#", val: _return_1162}]), "return"); + return (_return_1162); + } + + + } else { + var _return_1118 = if_some((function () { + log_event("JsInterpreter.js", 2523, ctx_454, "call"); + var _return_1114 = object_heap_map_properties_pickable_option( + s_2, l, function (p0) { + var ctx_455 = ctx_push(ctx_454, [{key: "p0", val: p0}]); + log_event("JsInterpreter.js", 2521, ctx_455, "enter"); + var _return_1113 = (function () { + log_event("JsInterpreter.js", 2519, ctx_455, "call"); + var _return_1112 = + HeapStr.write(p0, + "length", + Coq_attributes_data_of( + { + attributes_data_value: + Coq_value_prim( + Coq_prim_number( + number_of_int( + arg_len))), + attributes_data_writable: true, + attributes_data_enumerable: false, + attributes_data_configurable: false + })); + log_event("JsInterpreter.js", 2518, ctx_push(ctx_455, [{key: "#RETURN_VALUE#", val: _return_1112}]), "return"); + return (_return_1112); + }()) + ; + log_event("JsInterpreter.js", 2520, ctx_push(ctx_455, [{key: "#RETURN_VALUE#", val: _return_1113}]), "return"); + return (_return_1113); + }); + log_event("JsInterpreter.js", 2522, ctx_push(ctx_454, [{key: "#RETURN_VALUE#", val: _return_1114}]), "return"); + return (_return_1114); }()), function(s0) { + + var ctx_456 = ctx_push(ctx_454, [{key: "s0", val: s0}]); + log_event("JsInterpreter.js", 2533, ctx_456, "let"); + var _return_1117 = if_void((function () { + log_event("JsInterpreter.js", 2525, ctx_456, "call"); + var _return_1115 = + array_args_map_loop(s0, + c, l, args, 0.); + log_event("JsInterpreter.js", 2524, ctx_push(ctx_456, [{key: "#RETURN_VALUE#", val: _return_1115}]), "return"); + return (_return_1115); + }()), function(s1) { + + var ctx_457 = ctx_push(ctx_456, [{key: "s1", val: s1}]); + log_event("JsInterpreter.js", 2529, ctx_457, "let"); + var _return_1116 = + res_ter(s1, + res_val( + Coq_value_object(l))); + log_event("JsInterpreter.js", 2526, ctx_push(ctx_457, [{key: "#RETURN_VALUE#", val: _return_1116}]), "return"); + return (_return_1116); + }); + log_event("JsInterpreter.js", 2530, ctx_push(ctx_456, [{key: "#RETURN_VALUE#", val: _return_1117}]), "return"); + return (_return_1117); + }); + log_event("JsInterpreter.js", 2534, ctx_push(ctx_454, [{key: "#RETURN_VALUE#", val: _return_1118}]), "return"); + return (_return_1118); + } + + + + + + + case "Coq_prealloc_string":log_event("JsInterpreter.js", 2692, ctx_431, "case"); + + var o2 = (function () { + log_event("JsInterpreter.js", 2646, ctx_431, "call"); + var _return_1163 = object_new( + Coq_value_object( + Coq_object_loc_prealloc( + Coq_prealloc_string_proto())), "String"); + log_event("JsInterpreter.js", 2645, ctx_push(ctx_431, [{key: "#RETURN_VALUE#", val: _return_1163}]), "return"); + return (_return_1163); + }()) + ; + var ctx_475 = ctx_push(ctx_431, [{key: "o2", val: o2}]); + log_event("JsInterpreter.js", 2691, ctx_475, "let"); + var o1 = object_with_get_own_property(o2, + Coq_builtin_get_own_prop_string()); + var ctx_476 = ctx_push(ctx_475, [{key: "o1", val: o1}]); + log_event("JsInterpreter.js", 2690, ctx_476, "let"); + var follow = function (s0, s1) { + var ctx_477 = ctx_push(ctx_476, [{key: "s0", val: s0}, {key: "s1", val: s1}]); + log_event("JsInterpreter.js", 2667, ctx_477, "enter"); + var o = object_with_primitive_value(o1, + Coq_value_prim(Coq_prim_string(s1))); + var ctx_478 = ctx_push(ctx_477, [{key: "o", val: o}]); + log_event("JsInterpreter.js", 2666, ctx_478, "let"); + var _tuple_arg_1164 = (function () { + log_event("JsInterpreter.js", 2648, ctx_478, "call"); + var _return_1165 = object_alloc(s0, o); + log_event("JsInterpreter.js", 2647, ctx_push(ctx_478, [{key: "#RETURN_VALUE#", val: _return_1165}]), "return"); + return (_return_1165); + }()) + ; + var l = _tuple_arg_1164[0], s2 = _tuple_arg_1164[1]; + var ctx_479 = ctx_push(ctx_478, [{key: "l", val: l}, {key: "s2", val: s2}]); + log_event("JsInterpreter.js", 2665, ctx_479, "let"); + var lenDesc = (function () { + log_event("JsInterpreter.js", 2652, ctx_479, "call"); + var _return_1167 = attributes_data_intro_constant( + Coq_value_prim( + Coq_prim_number( + number_of_int((function () { + log_event("JsInterpreter.js", 2650, ctx_479, "call"); + var _return_1166 = strlength(s1); + log_event("JsInterpreter.js", 2649, ctx_push(ctx_479, [{key: "#RETURN_VALUE#", val: _return_1166}]), "return"); + return (_return_1166); }()))))); + log_event("JsInterpreter.js", 2651, ctx_push(ctx_479, [{key: "#RETURN_VALUE#", val: _return_1167}]), "return"); + return (_return_1167); + }()) + ; + var ctx_480 = ctx_push(ctx_479, [{key: "lenDesc", val: lenDesc}]); + log_event("JsInterpreter.js", 2664, ctx_480, "let"); + var _return_1172 = if_some((function () { + log_event("JsInterpreter.js", 2658, ctx_480, "call"); + var _return_1170 = object_heap_map_properties_pickable_option( + s2, l, function (p) { + var ctx_481 = ctx_push(ctx_480, [{key: "p", val: p}]); + log_event("JsInterpreter.js", 2656, ctx_481, "enter"); + var _return_1169 = (function () { + log_event("JsInterpreter.js", 2654, ctx_481, "call"); + var _return_1168 = + HeapStr.write(p, + "length", + Coq_attributes_data_of( + lenDesc)); + log_event("JsInterpreter.js", 2653, ctx_push(ctx_481, [{key: "#RETURN_VALUE#", val: _return_1168}]), "return"); + return (_return_1168); + }()) + ; + log_event("JsInterpreter.js", 2655, ctx_push(ctx_481, [{key: "#RETURN_VALUE#", val: _return_1169}]), "return"); + return (_return_1169); + }); + log_event("JsInterpreter.js", 2657, ctx_push(ctx_480, [{key: "#RETURN_VALUE#", val: _return_1170}]), "return"); + return (_return_1170); }()), function(s_2) { + + var ctx_482 = ctx_push(ctx_480, [{key: "s_2", val: s_2}]); + log_event("JsInterpreter.js", 2662, ctx_482, "let"); + var _return_1171 = res_ter(s_2, + res_val( + Coq_value_object(l))); + log_event("JsInterpreter.js", 2659, ctx_push(ctx_482, [{key: "#RETURN_VALUE#", val: _return_1171}]), "return"); + return (_return_1171); + }); + log_event("JsInterpreter.js", 2663, ctx_push(ctx_480, [{key: "#RETURN_VALUE#", val: _return_1172}]), "return"); + return (_return_1172); + + + + }; + var ctx_483 = ctx_push(ctx_476, [{key: "follow", val: follow}]); + log_event("JsInterpreter.js", 2689, ctx_483, "let"); + var arg_len = (function () { + log_event("JsInterpreter.js", 2669, ctx_483, "call"); + var _return_1173 = LibList.length(args); + log_event("JsInterpreter.js", 2668, ctx_push(ctx_483, [{key: "#RETURN_VALUE#", val: _return_1173}]), "return"); + return (_return_1173); + }()) + ; + var ctx_484 = ctx_push(ctx_483, [{key: "arg_len", val: arg_len}]); + log_event("JsInterpreter.js", 2688, ctx_484, "let"); + var _if_arg_1174 = (function () { + log_event("JsInterpreter.js", 2671, ctx_484, "call"); + var _return_1175 = nat_eq(arg_len, 0); + log_event("JsInterpreter.js", 2670, ctx_push(ctx_484, [{key: "#RETURN_VALUE#", val: _return_1175}]), "return"); + return (_return_1175); + }()) + ; + log_event("JsInterpreter.js", 2687, ctx_484, "if"); + if (_if_arg_1174) { + var _return_1182 = (function () { + log_event("JsInterpreter.js", 2685, ctx_484, "call"); + var _return_1181 = follow(s, ""); + log_event("JsInterpreter.js", 2684, ctx_push(ctx_484, [{key: "#RETURN_VALUE#", val: _return_1181}]), "return"); + return (_return_1181); + }()) + ; + log_event("JsInterpreter.js", 2686, ctx_push(ctx_484, [{key: "#RETURN_VALUE#", val: _return_1182}]), "return"); + return (_return_1182); + } else { + var arg = (function () { + log_event("JsInterpreter.js", 2673, ctx_484, "call"); + var _return_1176 = get_arg(0, args); + log_event("JsInterpreter.js", 2672, ctx_push(ctx_484, [{key: "#RETURN_VALUE#", val: _return_1176}]), "return"); + return (_return_1176); + }()) + ; + var ctx_485 = ctx_push(ctx_484, [{key: "arg", val: arg}]); + log_event("JsInterpreter.js", 2683, ctx_485, "let"); + var _return_1180 = if_string((function () { + log_event("JsInterpreter.js", 2675, ctx_485, "call"); + var _return_1177 = to_string(s, c, arg); + log_event("JsInterpreter.js", 2674, ctx_push(ctx_485, [{key: "#RETURN_VALUE#", val: _return_1177}]), "return"); + return (_return_1177); }()), function(s0, + s1) { + + var ctx_486 = ctx_push(ctx_485, [{key: "s0", val: s0}, {key: "s1", val: s1}]); + log_event("JsInterpreter.js", 2681, ctx_486, "let"); + var _return_1179 = (function () { + log_event("JsInterpreter.js", 2677, ctx_486, "call"); + var _return_1178 = follow(s0, s1); + log_event("JsInterpreter.js", 2676, ctx_push(ctx_486, [{key: "#RETURN_VALUE#", val: _return_1178}]), "return"); + return (_return_1178); + }()) + ; + log_event("JsInterpreter.js", 2678, ctx_push(ctx_486, [{key: "#RETURN_VALUE#", val: _return_1179}]), "return"); + return (_return_1179); + }); + log_event("JsInterpreter.js", 2682, ctx_push(ctx_485, [{key: "#RETURN_VALUE#", val: _return_1180}]), "return"); + return (_return_1180); + + } + + + + + case "Coq_prealloc_error":log_event("JsInterpreter.js", 2699, ctx_431, "case"); + + var v = (function () { + log_event("JsInterpreter.js", 2694, ctx_431, "call"); + var _return_1183 = get_arg(0, args); + log_event("JsInterpreter.js", 2693, ctx_push(ctx_431, [{key: "#RETURN_VALUE#", val: _return_1183}]), "return"); + return (_return_1183); + }()) + ; + var ctx_487 = ctx_push(ctx_431, [{key: "v", val: v}]); + log_event("JsInterpreter.js", 2698, ctx_487, "let"); + var _return_1185 = (function () { + log_event("JsInterpreter.js", 2696, ctx_487, "call"); + var _return_1184 = build_error(s, + Coq_value_object( + Coq_object_loc_prealloc( + Coq_prealloc_error_proto())), v); + log_event("JsInterpreter.js", 2695, ctx_push(ctx_487, [{key: "#RETURN_VALUE#", val: _return_1184}]), "return"); + return (_return_1184); + }()) + ; + log_event("JsInterpreter.js", 2697, ctx_push(ctx_487, [{key: "#RETURN_VALUE#", val: _return_1185}]), "return"); + return (_return_1185); + + case "Coq_prealloc_native_error": + var ne = b.error;var ctx_488 = ctx_push(ctx_431, [{key: "ne", val: ne}]); + log_event("JsInterpreter.js", 2706, ctx_488, "case"); + + var v = (function () { + log_event("JsInterpreter.js", 2701, ctx_488, "call"); + var _return_1186 = get_arg(0, args); + log_event("JsInterpreter.js", 2700, ctx_push(ctx_488, [{key: "#RETURN_VALUE#", val: _return_1186}]), "return"); + return (_return_1186); + }()) + ; + var ctx_489 = ctx_push(ctx_488, [{key: "v", val: v}]); + log_event("JsInterpreter.js", 2705, ctx_489, "let"); + var _return_1188 = (function () { + log_event("JsInterpreter.js", 2703, ctx_489, "call"); + var _return_1187 = build_error(s, + Coq_value_object( + Coq_object_loc_prealloc( + Coq_prealloc_native_error_proto(ne))), v); + log_event("JsInterpreter.js", 2702, ctx_push(ctx_489, [{key: "#RETURN_VALUE#", val: _return_1187}]), "return"); + return (_return_1187); + }()) + ; + log_event("JsInterpreter.js", 2704, ctx_push(ctx_489, [{key: "#RETURN_VALUE#", val: _return_1188}]), "return"); + return (_return_1188); + + default:log_event("JsInterpreter.js", 2720, ctx_431, "case"); + + var _return_1195 = (function () { + log_event("JsInterpreter.js", 2718, ctx_431, "call"); + var _return_1194 = function (s) { + var ctx_490 = ctx_push(ctx_431, [{key: "s", val: s}]); + log_event("JsInterpreter.js", 2716, ctx_490, "enter"); + (function () { + log_event("JsInterpreter.js", 2715, ctx_490, "call"); + var _return_1193 = Debug.not_yet_implemented_because( + __LOC__, s); + log_event("JsInterpreter.js", 2714, ctx_push(ctx_490, [{key: "#RETURN_VALUE#", val: _return_1193}]), "return"); + return (_return_1193); + }()) + ; + var _return_1192 = Coq_result_not_yet_implemented( + ); + log_event("JsInterpreter.js", 2713, ctx_push(ctx_490, [{key: "#RETURN_VALUE#", val: _return_1192}]), "return"); + return (_return_1192); }((function () { + log_event("JsInterpreter.js", 2712, ctx_431, "call"); + var _return_1191 = strappend( + "Construct prealloc_", + (function () { + log_event("JsInterpreter.js", 2710, ctx_431, "call"); + var _return_1190 = + strappend( + (function () { + log_event("JsInterpreter.js", 2708, ctx_431, "call"); + var _return_1189 = + string_of_prealloc( + b); + log_event("JsInterpreter.js", 2707, ctx_push(ctx_431, [{key: "#RETURN_VALUE#", val: _return_1189}]), "return"); + return (_return_1189); + }()), + " not yet implemented."); + log_event("JsInterpreter.js", 2709, ctx_push(ctx_431, [{key: "#RETURN_VALUE#", val: _return_1190}]), "return"); + return (_return_1190); + }())); + log_event("JsInterpreter.js", 2711, ctx_push(ctx_431, [{key: "#RETURN_VALUE#", val: _return_1191}]), "return"); + return (_return_1191); }())); + log_event("JsInterpreter.js", 2717, ctx_push(ctx_431, [{key: "#RETURN_VALUE#", val: _return_1194}]), "return"); + return (_return_1194); + }()) + ; + log_event("JsInterpreter.js", 2719, ctx_push(ctx_431, [{key: "#RETURN_VALUE#", val: _return_1195}]), "return"); + return (_return_1195); + } + +}; + +var run_construct_default = function (s, c, l, args) { + var ctx_491 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "l", val: l}, {key: "args", val: args}]); + log_event("JsInterpreter.js", 2751, ctx_491, "enter"); + var _return_1206 = if_value((function () { + log_event("JsInterpreter.js", 2724, ctx_491, "call"); + var _return_1196 = run_object_get(s, c, l, + "prototype"); + log_event("JsInterpreter.js", 2723, ctx_push(ctx_491, [{key: "#RETURN_VALUE#", val: _return_1196}]), "return"); + return (_return_1196); }()), function(s1, v1) { + + var ctx_492 = ctx_push(ctx_491, [{key: "s1", val: s1}, {key: "v1", val: v1}]); + log_event("JsInterpreter.js", 2749, ctx_492, "let"); + var _if_arg_1197 = type_compare((function () { + log_event("JsInterpreter.js", 2726, ctx_492, "call"); + var _return_1198 = type_of( + v1); + log_event("JsInterpreter.js", 2725, ctx_push(ctx_492, [{key: "#RETURN_VALUE#", val: _return_1198}]), "return"); + return (_return_1198); }()), + Coq_type_object()); + log_event("JsInterpreter.js", 2727, ctx_492, "if"); + if (_if_arg_1197) { + var vproto = v1; + } else { + var vproto = Coq_value_object( + Coq_object_loc_prealloc( + Coq_prealloc_object_proto())); + } + var ctx_493 = ctx_push(ctx_492, [{key: "vproto", val: vproto}]); + log_event("JsInterpreter.js", 2746, ctx_493, "let"); + var o = (function () { + log_event("JsInterpreter.js", 2729, ctx_493, "call"); + var _return_1199 = object_new(vproto, "Object"); + log_event("JsInterpreter.js", 2728, ctx_push(ctx_493, [{key: "#RETURN_VALUE#", val: _return_1199}]), "return"); + return (_return_1199); + }()) + ; + var ctx_494 = ctx_push(ctx_493, [{key: "o", val: o}]); + log_event("JsInterpreter.js", 2745, ctx_494, "let"); + var p = (function () { + log_event("JsInterpreter.js", 2731, ctx_494, "call"); + var _return_1200 = object_alloc(s1, o); + log_event("JsInterpreter.js", 2730, ctx_push(ctx_494, [{key: "#RETURN_VALUE#", val: _return_1200}]), "return"); + return (_return_1200); + }()) + ; + var ctx_495 = ctx_push(ctx_494, [{key: "p", val: p}]); + log_event("JsInterpreter.js", 2744, ctx_495, "let"); + var l_2 = p[0], s2 = p[1]; + var ctx_496 = ctx_push(ctx_495, [{key: "l_2", val: l_2}, {key: "s2", val: s2}]); + log_event("JsInterpreter.js", 2743, ctx_496, "let"); + var _return_1205 = if_value((function () { + log_event("JsInterpreter.js", 2733, ctx_496, "call"); + var _return_1201 = run_call( + s2, c, l, + Coq_value_object( + l_2), + args); + log_event("JsInterpreter.js", 2732, ctx_push(ctx_496, [{key: "#RETURN_VALUE#", val: _return_1201}]), "return"); + return (_return_1201); }()), + function(s3, v2) { + + var ctx_497 = ctx_push(ctx_496, [{key: "s3", val: s3}, {key: "v2", val: v2}]); + log_event("JsInterpreter.js", 2741, ctx_497, "let"); + var _if_arg_1202 = type_compare( + (function () { + log_event("JsInterpreter.js", 2735, ctx_497, "call"); + var _return_1203 = + type_of( + v2); + log_event("JsInterpreter.js", 2734, ctx_push(ctx_497, [{key: "#RETURN_VALUE#", val: _return_1203}]), "return"); + return (_return_1203); + }()), + Coq_type_object( + )); + log_event("JsInterpreter.js", 2736, ctx_497, "if"); + if (_if_arg_1202) { + var vr = v2; + } else { + var vr = Coq_value_object( + l_2); + } + var ctx_498 = ctx_push(ctx_497, [{key: "vr", val: vr}]); + log_event("JsInterpreter.js", 2738, ctx_498, "let"); + var _return_1204 = res_ter( + s3, + res_val( + vr)); + log_event("JsInterpreter.js", 2737, ctx_push(ctx_498, [{key: "#RETURN_VALUE#", val: _return_1204}]), "return"); + return (_return_1204); + + }); + log_event("JsInterpreter.js", 2742, ctx_push(ctx_496, [{key: "#RETURN_VALUE#", val: _return_1205}]), "return"); + return (_return_1205); + + + + + }); + log_event("JsInterpreter.js", 2750, ctx_push(ctx_491, [{key: "#RETURN_VALUE#", val: _return_1206}]), "return"); + return (_return_1206); +}; + +var run_construct = function (s, c, co, l, args) { + var ctx_499 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "co", val: co}, {key: "l", val: l}, {key: "args", val: args}]); + log_event("JsInterpreter.js", 2800, ctx_499, "enter"); + log_event("JsInterpreter.js", 2799, ctx_499, "switch"); + switch (co.tag) { + case "Coq_construct_default":log_event("JsInterpreter.js", 2755, ctx_499, "case"); + + var _return_1208 = (function () { + log_event("JsInterpreter.js", 2753, ctx_499, "call"); + var _return_1207 = run_construct_default(s, c, l, args); + log_event("JsInterpreter.js", 2752, ctx_push(ctx_499, [{key: "#RETURN_VALUE#", val: _return_1207}]), "return"); + return (_return_1207); + }()) + ; + log_event("JsInterpreter.js", 2754, ctx_push(ctx_499, [{key: "#RETURN_VALUE#", val: _return_1208}]), "return"); + return (_return_1208); + case "Coq_construct_after_bind":log_event("JsInterpreter.js", 2794, ctx_499, "case"); + + var _return_1221 = if_some((function () { + log_event("JsInterpreter.js", 2757, ctx_499, "call"); + var _return_1209 = run_object_method( + object_target_function_, s, + l); + log_event("JsInterpreter.js", 2756, ctx_push(ctx_499, [{key: "#RETURN_VALUE#", val: _return_1209}]), "return"); + return (_return_1209); }()), function(otrg) { + + var ctx_500 = ctx_push(ctx_499, [{key: "otrg", val: otrg}]); + log_event("JsInterpreter.js", 2792, ctx_500, "let"); + var _return_1220 = if_some(otrg, + function(target) { + + var ctx_501 = ctx_push(ctx_500, [{key: "target", val: target}]); + log_event("JsInterpreter.js", 2788, ctx_501, "let"); + var _return_1219 = + if_some((function () { + log_event("JsInterpreter.js", 2759, ctx_501, "call"); + var _return_1210 = + run_object_method( + object_construct_, + s, target); + log_event("JsInterpreter.js", 2758, ctx_push(ctx_501, [{key: "#RETURN_VALUE#", val: _return_1210}]), "return"); + return (_return_1210); + }()), function(oco) { + + var ctx_502 = ctx_push(ctx_501, [{key: "oco", val: oco}]); + log_event("JsInterpreter.js", 2784, ctx_502, "let"); + log_event("JsInterpreter.js", 2781, ctx_502, "switch"); + switch (oco.tag) { + case "Some": + var co0 = oco.value;var ctx_503 = ctx_push(ctx_502, [{key: "co0", val: co0}]); + log_event("JsInterpreter.js", 2776, ctx_503, "case"); + + var _return_1216 = + if_some( + (function () { + log_event("JsInterpreter.js", 2761, ctx_503, "call"); + var _return_1211 = + run_object_method( + object_bound_args_, + s, l); + log_event("JsInterpreter.js", 2760, ctx_push(ctx_503, [{key: "#RETURN_VALUE#", val: _return_1211}]), "return"); + return (_return_1211); + }()), + function(oarg) { + + var ctx_504 = ctx_push(ctx_503, [{key: "oarg", val: oarg}]); + log_event("JsInterpreter.js", 2774, ctx_504, "let"); + var _return_1215 = + if_some(oarg, + function(boundArgs) { + + var ctx_505 = ctx_push(ctx_504, [{key: "boundArgs", val: boundArgs}]); + log_event("JsInterpreter.js", 2770, ctx_505, "let"); + var arguments_ = (function () { + log_event("JsInterpreter.js", 2763, ctx_505, "call"); + var _return_1212 = + LibList.append( + boundArgs, + args); + log_event("JsInterpreter.js", 2762, ctx_push(ctx_505, [{key: "#RETURN_VALUE#", val: _return_1212}]), "return"); + return (_return_1212); + }()) + ; + var ctx_506 = ctx_push(ctx_505, [{key: "arguments_", val: arguments_}]); + log_event("JsInterpreter.js", 2767, ctx_506, "let"); + var _return_1214 = (function () { + log_event("JsInterpreter.js", 2765, ctx_506, "call"); + var _return_1213 = + run_construct( + s, c, + co0, + target, + arguments_); + log_event("JsInterpreter.js", 2764, ctx_push(ctx_506, [{key: "#RETURN_VALUE#", val: _return_1213}]), "return"); + return (_return_1213); + }()) + ; + log_event("JsInterpreter.js", 2766, ctx_push(ctx_506, [{key: "#RETURN_VALUE#", val: _return_1214}]), "return"); + return (_return_1214); + + }); + log_event("JsInterpreter.js", 2771, ctx_push(ctx_504, [{key: "#RETURN_VALUE#", val: _return_1215}]), "return"); + return (_return_1215); + }); + log_event("JsInterpreter.js", 2775, ctx_push(ctx_503, [{key: "#RETURN_VALUE#", val: _return_1216}]), "return"); + return (_return_1216); + case "None":log_event("JsInterpreter.js", 2780, ctx_502, "case"); + + var _return_1218 = (function () { + log_event("JsInterpreter.js", 2778, ctx_502, "call"); + var _return_1217 = + run_error(s, + Coq_native_error_type( + )); + log_event("JsInterpreter.js", 2777, ctx_push(ctx_502, [{key: "#RETURN_VALUE#", val: _return_1217}]), "return"); + return (_return_1217); + }()) + ; + log_event("JsInterpreter.js", 2779, ctx_push(ctx_502, [{key: "#RETURN_VALUE#", val: _return_1218}]), "return"); + return (_return_1218); + } + + }); + log_event("JsInterpreter.js", 2785, ctx_push(ctx_501, [{key: "#RETURN_VALUE#", val: _return_1219}]), "return"); + return (_return_1219); + }); + log_event("JsInterpreter.js", 2789, ctx_push(ctx_500, [{key: "#RETURN_VALUE#", val: _return_1220}]), "return"); + return (_return_1220); + }); + log_event("JsInterpreter.js", 2793, ctx_push(ctx_499, [{key: "#RETURN_VALUE#", val: _return_1221}]), "return"); + return (_return_1221); + case "Coq_construct_prealloc": + var b = co.prealloc;var ctx_507 = ctx_push(ctx_499, [{key: "b", val: b}]); + log_event("JsInterpreter.js", 2798, ctx_507, "case"); + + var _return_1223 = (function () { + log_event("JsInterpreter.js", 2796, ctx_507, "call"); + var _return_1222 = run_construct_prealloc(s, c, b, args); + log_event("JsInterpreter.js", 2795, ctx_push(ctx_507, [{key: "#RETURN_VALUE#", val: _return_1222}]), "return"); + return (_return_1222); + }()) + ; + log_event("JsInterpreter.js", 2797, ctx_push(ctx_507, [{key: "#RETURN_VALUE#", val: _return_1223}]), "return"); + return (_return_1223); + } + +}; + +var run_call_default = function (s, c, lf) { + var ctx_508 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "lf", val: lf}]); + log_event("JsInterpreter.js", 2825, ctx_508, "enter"); + var def = result_out( + Coq_out_ter(s, res_val(Coq_value_prim(Coq_prim_undef())))); + var ctx_509 = ctx_push(ctx_508, [{key: "def", val: def}]); + log_event("JsInterpreter.js", 2824, ctx_509, "let"); + var _return_1234 = if_some((function () { + log_event("JsInterpreter.js", 2802, ctx_509, "call"); + var _return_1224 = run_object_method(object_code_, + s, lf); + log_event("JsInterpreter.js", 2801, ctx_push(ctx_509, [{key: "#RETURN_VALUE#", val: _return_1224}]), "return"); + return (_return_1224); }()), function(oC) { + + var ctx_510 = ctx_push(ctx_509, [{key: "oC", val: oC}]); + log_event("JsInterpreter.js", 2822, ctx_510, "let"); + log_event("JsInterpreter.js", 2819, ctx_510, "switch"); + switch (oC.tag) { + case "Some": + var bd = oC.value;var ctx_511 = ctx_push(ctx_510, [{key: "bd", val: bd}]); + log_event("JsInterpreter.js", 2816, ctx_511, "case"); + + var _if_arg_1225 = (function () { + log_event("JsInterpreter.js", 2804, ctx_511, "call"); + var _return_1226 = list_eq_nil_decidable( + prog_elements( + funcbody_prog(bd))); + log_event("JsInterpreter.js", 2803, ctx_push(ctx_511, [{key: "#RETURN_VALUE#", val: _return_1226}]), "return"); + return (_return_1226); + }()) + ; + log_event("JsInterpreter.js", 2815, ctx_511, "if"); + if (_if_arg_1225) { + var _return_1232 = def; + log_event("JsInterpreter.js", 2814, ctx_push(ctx_511, [{key: "#RETURN_VALUE#", val: _return_1232}]), "return"); + return (_return_1232); + } else { + var _return_1231 = (function () { + log_event("JsInterpreter.js", 2812, ctx_511, "call"); + var _return_1230 = ifx_success_or_return( + (function () { + log_event("JsInterpreter.js", 2806, ctx_511, "call"); + var _return_1227 = + run_prog(s, c, + funcbody_prog(bd)); + log_event("JsInterpreter.js", 2805, ctx_push(ctx_511, [{key: "#RETURN_VALUE#", val: _return_1227}]), "return"); + return (_return_1227); + }()), function (s_2) { + var ctx_512 = ctx_push(ctx_511, [{key: "s_2", val: s_2}]); + log_event("JsInterpreter.js", 2808, ctx_512, "enter"); + var _return_1228 = + result_out( + Coq_out_ter(s_2, + res_val( + Coq_value_prim( + Coq_prim_undef( + ))))); + log_event("JsInterpreter.js", 2807, ctx_push(ctx_512, [{key: "#RETURN_VALUE#", val: _return_1228}]), "return"); + return (_return_1228); + }, function (s_2, rv) { + var ctx_513 = ctx_push(ctx_511, [{key: "s_2", val: s_2}, {key: "rv", val: rv}]); + log_event("JsInterpreter.js", 2810, ctx_513, "enter"); + var _return_1229 = + result_out( + Coq_out_ter(s_2, + res_normal(rv))); + log_event("JsInterpreter.js", 2809, ctx_push(ctx_513, [{key: "#RETURN_VALUE#", val: _return_1229}]), "return"); + return (_return_1229); + }); + log_event("JsInterpreter.js", 2811, ctx_push(ctx_511, [{key: "#RETURN_VALUE#", val: _return_1230}]), "return"); + return (_return_1230); + }()) + ; + log_event("JsInterpreter.js", 2813, ctx_push(ctx_511, [{key: "#RETURN_VALUE#", val: _return_1231}]), "return"); + return (_return_1231); + } + case "None":log_event("JsInterpreter.js", 2818, ctx_510, "case"); + + var _return_1233 = def; + log_event("JsInterpreter.js", 2817, ctx_push(ctx_510, [{key: "#RETURN_VALUE#", val: _return_1233}]), "return"); + return (_return_1233); + } + + }); + log_event("JsInterpreter.js", 2823, ctx_push(ctx_509, [{key: "#RETURN_VALUE#", val: _return_1234}]), "return"); + return (_return_1234); + +}; + +var creating_function_object_proto = function (s, c, l) { + var ctx_514 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "l", val: l}]); + log_event("JsInterpreter.js", 2847, ctx_514, "enter"); + var _return_1242 = if_object((function () { + log_event("JsInterpreter.js", 2827, ctx_514, "call"); + var _return_1235 = run_construct_prealloc(s, c, + Coq_prealloc_object(), + mk_nil()); + log_event("JsInterpreter.js", 2826, ctx_push(ctx_514, [{key: "#RETURN_VALUE#", val: _return_1235}]), "return"); + return (_return_1235); }()), function(s1, lproto) { + + var ctx_515 = ctx_push(ctx_514, [{key: "s1", val: s1}, {key: "lproto", val: lproto}]); + log_event("JsInterpreter.js", 2845, ctx_515, "let"); + var a1 = { + attributes_data_value: Coq_value_object(l), + attributes_data_writable: true, + attributes_data_enumerable: false, + attributes_data_configurable: true + }; + var ctx_516 = ctx_push(ctx_515, [{key: "a1", val: a1}]); + log_event("JsInterpreter.js", 2842, ctx_516, "let"); + var _return_1241 = if_bool((function () { + log_event("JsInterpreter.js", 2831, ctx_516, "call"); + var _return_1237 = object_define_own_prop( + s1, c, + lproto, + "constructor", + (function () { + log_event("JsInterpreter.js", 2829, ctx_516, "call"); + var _return_1236 = + descriptor_of_attributes( + Coq_attributes_data_of( + a1)); + log_event("JsInterpreter.js", 2828, ctx_push(ctx_516, [{key: "#RETURN_VALUE#", val: _return_1236}]), "return"); + return (_return_1236); + }()), + false); + log_event("JsInterpreter.js", 2830, ctx_push(ctx_516, [{key: "#RETURN_VALUE#", val: _return_1237}]), "return"); + return (_return_1237); }()), + function(s2, b) { + + var ctx_517 = ctx_push(ctx_516, [{key: "s2", val: s2}, {key: "b", val: b}]); + log_event("JsInterpreter.js", 2840, ctx_517, "let"); + var a2 = { + attributes_data_value: + Coq_value_object(lproto), + attributes_data_writable: true, + attributes_data_enumerable: false, + attributes_data_configurable: false + }; + var ctx_518 = ctx_push(ctx_517, [{key: "a2", val: a2}]); + log_event("JsInterpreter.js", 2837, ctx_518, "let"); + var _return_1240 = (function () { + log_event("JsInterpreter.js", 2835, ctx_518, "call"); + var _return_1239 = + object_define_own_prop(s2, + c, l, "prototype", + (function () { + log_event("JsInterpreter.js", 2833, ctx_518, "call"); + var _return_1238 = + descriptor_of_attributes( + Coq_attributes_data_of( + a2)); + log_event("JsInterpreter.js", 2832, ctx_push(ctx_518, [{key: "#RETURN_VALUE#", val: _return_1238}]), "return"); + return (_return_1238); + }()), false); + log_event("JsInterpreter.js", 2834, ctx_push(ctx_518, [{key: "#RETURN_VALUE#", val: _return_1239}]), "return"); + return (_return_1239); + }()) + ; + log_event("JsInterpreter.js", 2836, ctx_push(ctx_518, [{key: "#RETURN_VALUE#", val: _return_1240}]), "return"); + return (_return_1240); + + }); + log_event("JsInterpreter.js", 2841, ctx_push(ctx_516, [{key: "#RETURN_VALUE#", val: _return_1241}]), "return"); + return (_return_1241); + + }); + log_event("JsInterpreter.js", 2846, ctx_push(ctx_514, [{key: "#RETURN_VALUE#", val: _return_1242}]), "return"); + return (_return_1242); +}; + +var creating_function_object = function (s, c, names, bd, x, str) { + var ctx_519 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "names", val: names}, {key: "bd", val: bd}, {key: "x", val: x}, {key: "str", val: str}]); + log_event("JsInterpreter.js", 2898, ctx_519, "enter"); + var o = (function () { + log_event("JsInterpreter.js", 2849, ctx_519, "call"); + var _return_1243 = object_new( + Coq_value_object( + Coq_object_loc_prealloc( + Coq_prealloc_function_proto())), "Function"); + log_event("JsInterpreter.js", 2848, ctx_push(ctx_519, [{key: "#RETURN_VALUE#", val: _return_1243}]), "return"); + return (_return_1243); + }()) + ; + var ctx_520 = ctx_push(ctx_519, [{key: "o", val: o}]); + log_event("JsInterpreter.js", 2897, ctx_520, "let"); + var o1 = object_with_get(o, Coq_builtin_get_function()); + var ctx_521 = ctx_push(ctx_520, [{key: "o1", val: o1}]); + log_event("JsInterpreter.js", 2896, ctx_521, "let"); + var o2 = object_with_invokation(o1, Some(Coq_construct_default()), + Some(Coq_call_default()), + Some(Coq_builtin_has_instance_function())); + var ctx_522 = ctx_push(ctx_521, [{key: "o2", val: o2}]); + log_event("JsInterpreter.js", 2895, ctx_522, "let"); + var o3 = object_with_details(o2, Some(x), Some(names), Some(bd), None(), + None(), None(), None()); + var ctx_523 = ctx_push(ctx_522, [{key: "o3", val: o3}]); + log_event("JsInterpreter.js", 2894, ctx_523, "let"); + var p = (function () { + log_event("JsInterpreter.js", 2851, ctx_523, "call"); + var _return_1244 = object_alloc(s, o3); + log_event("JsInterpreter.js", 2850, ctx_push(ctx_523, [{key: "#RETURN_VALUE#", val: _return_1244}]), "return"); + return (_return_1244); + }()) + ; + var ctx_524 = ctx_push(ctx_523, [{key: "p", val: p}]); + log_event("JsInterpreter.js", 2893, ctx_524, "let"); + var l = p[0], s1 = p[1]; + var ctx_525 = ctx_push(ctx_524, [{key: "l", val: l}, {key: "s1", val: s1}]); + log_event("JsInterpreter.js", 2892, ctx_525, "let"); + var a1 = { + attributes_data_value: Coq_value_prim( + Coq_prim_number( + number_of_int((function () { + log_event("JsInterpreter.js", 2853, ctx_525, "call"); + var _return_1245 = LibList.length(names); + log_event("JsInterpreter.js", 2852, ctx_push(ctx_525, [{key: "#RETURN_VALUE#", val: _return_1245}]), "return"); + return (_return_1245); }())))), + attributes_data_writable: false, + attributes_data_enumerable: false, + attributes_data_configurable: false + }; + var ctx_526 = ctx_push(ctx_525, [{key: "a1", val: a1}]); + log_event("JsInterpreter.js", 2891, ctx_526, "let"); + var _return_1260 = if_bool((function () { + log_event("JsInterpreter.js", 2857, ctx_526, "call"); + var _return_1247 = object_define_own_prop(s1, c, l, + "length", (function () { + log_event("JsInterpreter.js", 2855, ctx_526, "call"); + var _return_1246 = descriptor_of_attributes( + Coq_attributes_data_of( + a1)); + log_event("JsInterpreter.js", 2854, ctx_push(ctx_526, [{key: "#RETURN_VALUE#", val: _return_1246}]), "return"); + return (_return_1246); }()), + false); + log_event("JsInterpreter.js", 2856, ctx_push(ctx_526, [{key: "#RETURN_VALUE#", val: _return_1247}]), "return"); + return (_return_1247); }()), function(s2, b2) { + + var ctx_527 = ctx_push(ctx_526, [{key: "s2", val: s2}, {key: "b2", val: b2}]); + log_event("JsInterpreter.js", 2889, ctx_527, "let"); + var _return_1259 = if_bool((function () { + log_event("JsInterpreter.js", 2859, ctx_527, "call"); + var _return_1248 = creating_function_object_proto( + s2, c, l); + log_event("JsInterpreter.js", 2858, ctx_push(ctx_527, [{key: "#RETURN_VALUE#", val: _return_1248}]), "return"); + return (_return_1248); }()), + function(s3, b3) { + + var ctx_528 = ctx_push(ctx_527, [{key: "s3", val: s3}, {key: "b3", val: b3}]); + log_event("JsInterpreter.js", 2885, ctx_528, "let"); + var _if_arg_1249 = (function () { + log_event("JsInterpreter.js", 2861, ctx_528, "call"); + var _return_1250 = + !(str); + log_event("JsInterpreter.js", 2860, ctx_push(ctx_528, [{key: "#RETURN_VALUE#", val: _return_1250}]), "return"); + return (_return_1250); + }()) + ; + log_event("JsInterpreter.js", 2882, ctx_528, "if"); + if (_if_arg_1249) { + var _return_1258 = + res_ter(s3, + res_val( + Coq_value_object(l))); + log_event("JsInterpreter.js", 2881, ctx_push(ctx_528, [{key: "#RETURN_VALUE#", val: _return_1258}]), "return"); + return (_return_1258); + } else { + var vthrower = Coq_value_object( + Coq_object_loc_prealloc( + Coq_prealloc_throw_type_error( + ))); + var ctx_529 = ctx_push(ctx_528, [{key: "vthrower", val: vthrower}]); + log_event("JsInterpreter.js", 2880, ctx_529, "let"); + var a2 = { + attributes_accessor_get: vthrower, + attributes_accessor_set: vthrower, + attributes_accessor_enumerable: false, + attributes_accessor_configurable: false + }; + var ctx_530 = ctx_push(ctx_529, [{key: "a2", val: a2}]); + log_event("JsInterpreter.js", 2879, ctx_530, "let"); + var _return_1257 = + if_bool((function () { + log_event("JsInterpreter.js", 2865, ctx_530, "call"); + var _return_1252 = + object_define_own_prop( + s3, c, l, "caller", + (function () { + log_event("JsInterpreter.js", 2863, ctx_530, "call"); + var _return_1251 = + descriptor_of_attributes( + Coq_attributes_accessor_of( + a2)); + log_event("JsInterpreter.js", 2862, ctx_push(ctx_530, [{key: "#RETURN_VALUE#", val: _return_1251}]), "return"); + return (_return_1251); + }()), false); + log_event("JsInterpreter.js", 2864, ctx_push(ctx_530, [{key: "#RETURN_VALUE#", val: _return_1252}]), "return"); + return (_return_1252); + }()), function(s4, b4) { + + var ctx_531 = ctx_push(ctx_530, [{key: "s4", val: s4}, {key: "b4", val: b4}]); + log_event("JsInterpreter.js", 2877, ctx_531, "let"); + var _return_1256 = + if_bool((function () { + log_event("JsInterpreter.js", 2869, ctx_531, "call"); + var _return_1254 = + object_define_own_prop( + s4, c, l, + "arguments", + (function () { + log_event("JsInterpreter.js", 2867, ctx_531, "call"); + var _return_1253 = + descriptor_of_attributes( + Coq_attributes_accessor_of( + a2)); + log_event("JsInterpreter.js", 2866, ctx_push(ctx_531, [{key: "#RETURN_VALUE#", val: _return_1253}]), "return"); + return (_return_1253); + }()), false); + log_event("JsInterpreter.js", 2868, ctx_push(ctx_531, [{key: "#RETURN_VALUE#", val: _return_1254}]), "return"); + return (_return_1254); + }()), function(s5, + b5) { + + var ctx_532 = ctx_push(ctx_531, [{key: "s5", val: s5}, {key: "b5", val: b5}]); + log_event("JsInterpreter.js", 2873, ctx_532, "let"); + var _return_1255 = + res_ter(s5, + res_val( + Coq_value_object( + l))); + log_event("JsInterpreter.js", 2870, ctx_push(ctx_532, [{key: "#RETURN_VALUE#", val: _return_1255}]), "return"); + return (_return_1255); + }); + log_event("JsInterpreter.js", 2874, ctx_push(ctx_531, [{key: "#RETURN_VALUE#", val: _return_1256}]), "return"); + return (_return_1256); + }); + log_event("JsInterpreter.js", 2878, ctx_push(ctx_530, [{key: "#RETURN_VALUE#", val: _return_1257}]), "return"); + return (_return_1257); + + + } + }); + log_event("JsInterpreter.js", 2886, ctx_push(ctx_527, [{key: "#RETURN_VALUE#", val: _return_1259}]), "return"); + return (_return_1259); + }); + log_event("JsInterpreter.js", 2890, ctx_push(ctx_526, [{key: "#RETURN_VALUE#", val: _return_1260}]), "return"); + return (_return_1260); + + + + + + + +}; + +var binding_inst_formal_params = function (s, c, l, args, names, str) { + var ctx_533 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "l", val: l}, {key: "args", val: args}, {key: "names", val: names}, {key: "str", val: str}]); + log_event("JsInterpreter.js", 2941, ctx_533, "enter"); + log_event("JsInterpreter.js", 2940, ctx_533, "switch"); + switch (names.tag) { + case "[]":log_event("JsInterpreter.js", 2902, ctx_533, "case"); + + var _return_1262 = (function () { + log_event("JsInterpreter.js", 2900, ctx_533, "call"); + var _return_1261 = res_void(s); + log_event("JsInterpreter.js", 2899, ctx_push(ctx_533, [{key: "#RETURN_VALUE#", val: _return_1261}]), "return"); + return (_return_1261); + }()) + ; + log_event("JsInterpreter.js", 2901, ctx_push(ctx_533, [{key: "#RETURN_VALUE#", val: _return_1262}]), "return"); + return (_return_1262); + case "::": + var argname = names.head, names_2 = names.tail;var ctx_534 = ctx_push(ctx_533, [{key: "argname", val: argname}, {key: "names_2", val: names_2}]); + log_event("JsInterpreter.js", 2939, ctx_534, "case"); + + var v = (function () { + log_event("JsInterpreter.js", 2904, ctx_534, "call"); + var _return_1263 = hd(Coq_value_prim(Coq_prim_undef()), args); + log_event("JsInterpreter.js", 2903, ctx_push(ctx_534, [{key: "#RETURN_VALUE#", val: _return_1263}]), "return"); + return (_return_1263); + }()) + ; + var ctx_535 = ctx_push(ctx_534, [{key: "v", val: v}]); + log_event("JsInterpreter.js", 2938, ctx_535, "let"); + var args_2 = (function () { + log_event("JsInterpreter.js", 2906, ctx_535, "call"); + var _return_1264 = tl(args); + log_event("JsInterpreter.js", 2905, ctx_push(ctx_535, [{key: "#RETURN_VALUE#", val: _return_1264}]), "return"); + return (_return_1264); + }()) + ; + var ctx_536 = ctx_push(ctx_535, [{key: "args_2", val: args_2}]); + log_event("JsInterpreter.js", 2937, ctx_536, "let"); + var _return_1276 = if_bool((function () { + log_event("JsInterpreter.js", 2908, ctx_536, "call"); + var _return_1265 = env_record_has_binding(s, c, + l, argname); + log_event("JsInterpreter.js", 2907, ctx_push(ctx_536, [{key: "#RETURN_VALUE#", val: _return_1265}]), "return"); + return (_return_1265); }()), function(s1, hb) { + + var ctx_537 = ctx_push(ctx_536, [{key: "s1", val: s1}, {key: "hb", val: hb}]); + log_event("JsInterpreter.js", 2935, ctx_537, "let"); + var follow = function (s_2) { + var ctx_538 = ctx_push(ctx_537, [{key: "s_2", val: s_2}]); + log_event("JsInterpreter.js", 2918, ctx_538, "enter"); + var _return_1269 = if_void((function () { + log_event("JsInterpreter.js", 2910, ctx_538, "call"); + var _return_1266 = + env_record_set_mutable_binding( + s_2, c, l, argname, + v, str); + log_event("JsInterpreter.js", 2909, ctx_push(ctx_538, [{key: "#RETURN_VALUE#", val: _return_1266}]), "return"); + return (_return_1266); + }()), function(s_3) { + + var ctx_539 = ctx_push(ctx_538, [{key: "s_3", val: s_3}]); + log_event("JsInterpreter.js", 2916, ctx_539, "let"); + var _return_1268 = (function () { + log_event("JsInterpreter.js", 2912, ctx_539, "call"); + var _return_1267 = + binding_inst_formal_params( + s_3, c, l, args_2, + names_2, str); + log_event("JsInterpreter.js", 2911, ctx_push(ctx_539, [{key: "#RETURN_VALUE#", val: _return_1267}]), "return"); + return (_return_1267); + }()) + ; + log_event("JsInterpreter.js", 2913, ctx_push(ctx_539, [{key: "#RETURN_VALUE#", val: _return_1268}]), "return"); + return (_return_1268); + }); + log_event("JsInterpreter.js", 2917, ctx_push(ctx_538, [{key: "#RETURN_VALUE#", val: _return_1269}]), "return"); + return (_return_1269); + }; + var ctx_540 = ctx_push(ctx_537, [{key: "follow", val: follow}]); + log_event("JsInterpreter.js", 2932, ctx_540, "let"); + log_event("JsInterpreter.js", 2931, ctx_540, "if"); + if (hb) { + var _return_1275 = (function () { + log_event("JsInterpreter.js", 2929, ctx_540, "call"); + var _return_1274 = follow(s1); + log_event("JsInterpreter.js", 2928, ctx_push(ctx_540, [{key: "#RETURN_VALUE#", val: _return_1274}]), "return"); + return (_return_1274); + }()) + ; + log_event("JsInterpreter.js", 2930, ctx_push(ctx_540, [{key: "#RETURN_VALUE#", val: _return_1275}]), "return"); + return (_return_1275); + } else { + var _return_1273 = if_void((function () { + log_event("JsInterpreter.js", 2920, ctx_540, "call"); + var _return_1270 = + env_record_create_mutable_binding( + s1, c, l, argname, + None()); + log_event("JsInterpreter.js", 2919, ctx_push(ctx_540, [{key: "#RETURN_VALUE#", val: _return_1270}]), "return"); + return (_return_1270); + }()), function(s2) { + + var ctx_541 = ctx_push(ctx_540, [{key: "s2", val: s2}]); + log_event("JsInterpreter.js", 2926, ctx_541, "let"); + var _return_1272 = (function () { + log_event("JsInterpreter.js", 2922, ctx_541, "call"); + var _return_1271 = + follow(s2); + log_event("JsInterpreter.js", 2921, ctx_push(ctx_541, [{key: "#RETURN_VALUE#", val: _return_1271}]), "return"); + return (_return_1271); + }()) + ; + log_event("JsInterpreter.js", 2923, ctx_push(ctx_541, [{key: "#RETURN_VALUE#", val: _return_1272}]), "return"); + return (_return_1272); + }); + log_event("JsInterpreter.js", 2927, ctx_push(ctx_540, [{key: "#RETURN_VALUE#", val: _return_1273}]), "return"); + return (_return_1273); + } + + }); + log_event("JsInterpreter.js", 2936, ctx_push(ctx_536, [{key: "#RETURN_VALUE#", val: _return_1276}]), "return"); + return (_return_1276); + + + } + +}; + +var binding_inst_function_decls = function (s, c, l, fds, str, bconfig) { + var ctx_542 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "l", val: l}, {key: "fds", val: fds}, {key: "str", val: str}, {key: "bconfig", val: bconfig}]); + log_event("JsInterpreter.js", 3045, ctx_542, "enter"); + log_event("JsInterpreter.js", 3044, ctx_542, "switch"); + switch (fds.tag) { + case "[]":log_event("JsInterpreter.js", 2945, ctx_542, "case"); + + var _return_1278 = (function () { + log_event("JsInterpreter.js", 2943, ctx_542, "call"); + var _return_1277 = res_void(s); + log_event("JsInterpreter.js", 2942, ctx_push(ctx_542, [{key: "#RETURN_VALUE#", val: _return_1277}]), "return"); + return (_return_1277); + }()) + ; + log_event("JsInterpreter.js", 2944, ctx_push(ctx_542, [{key: "#RETURN_VALUE#", val: _return_1278}]), "return"); + return (_return_1278); + case "::": + var fd = fds.head, fds_2 = fds.tail;var ctx_543 = ctx_push(ctx_542, [{key: "fd", val: fd}, {key: "fds_2", val: fds_2}]); + log_event("JsInterpreter.js", 3043, ctx_543, "case"); + + var fbd = fd.funcdecl_body; + var ctx_544 = ctx_push(ctx_543, [{key: "fbd", val: fbd}]); + log_event("JsInterpreter.js", 3042, ctx_544, "let"); + var str_fd = funcbody_is_strict(fbd); + var ctx_545 = ctx_push(ctx_544, [{key: "str_fd", val: str_fd}]); + log_event("JsInterpreter.js", 3041, ctx_545, "let"); + var fparams = fd.funcdecl_parameters; + var ctx_546 = ctx_push(ctx_545, [{key: "fparams", val: fparams}]); + log_event("JsInterpreter.js", 3040, ctx_546, "let"); + var fname = fd.funcdecl_name; + var ctx_547 = ctx_push(ctx_546, [{key: "fname", val: fname}]); + log_event("JsInterpreter.js", 3039, ctx_547, "let"); + var _return_1320 = if_object((function () { + log_event("JsInterpreter.js", 2947, ctx_547, "call"); + var _return_1279 = creating_function_object(s, + c, fparams, fbd, + c.execution_ctx_variable_env, + str_fd); + log_event("JsInterpreter.js", 2946, ctx_push(ctx_547, [{key: "#RETURN_VALUE#", val: _return_1279}]), "return"); + return (_return_1279); }()), function(s1, fo) { + + var ctx_548 = ctx_push(ctx_547, [{key: "s1", val: s1}, {key: "fo", val: fo}]); + log_event("JsInterpreter.js", 3037, ctx_548, "let"); + var follow = function (s2) { + var ctx_549 = ctx_push(ctx_548, [{key: "s2", val: s2}]); + log_event("JsInterpreter.js", 2957, ctx_549, "enter"); + var _return_1283 = if_void((function () { + log_event("JsInterpreter.js", 2949, ctx_549, "call"); + var _return_1280 = + env_record_set_mutable_binding( + s2, c, l, fname, + Coq_value_object(fo), + str); + log_event("JsInterpreter.js", 2948, ctx_push(ctx_549, [{key: "#RETURN_VALUE#", val: _return_1280}]), "return"); + return (_return_1280); + }()), function(s3) { + + var ctx_550 = ctx_push(ctx_549, [{key: "s3", val: s3}]); + log_event("JsInterpreter.js", 2955, ctx_550, "let"); + var _return_1282 = (function () { + log_event("JsInterpreter.js", 2951, ctx_550, "call"); + var _return_1281 = + binding_inst_function_decls( + s3, c, l, fds_2, + str, bconfig); + log_event("JsInterpreter.js", 2950, ctx_push(ctx_550, [{key: "#RETURN_VALUE#", val: _return_1281}]), "return"); + return (_return_1281); + }()) + ; + log_event("JsInterpreter.js", 2952, ctx_push(ctx_550, [{key: "#RETURN_VALUE#", val: _return_1282}]), "return"); + return (_return_1282); + }); + log_event("JsInterpreter.js", 2956, ctx_push(ctx_549, [{key: "#RETURN_VALUE#", val: _return_1283}]), "return"); + return (_return_1283); + }; + var ctx_551 = ctx_push(ctx_548, [{key: "follow", val: follow}]); + log_event("JsInterpreter.js", 3034, ctx_551, "let"); + var _return_1319 = if_bool((function () { + log_event("JsInterpreter.js", 2959, ctx_551, "call"); + var _return_1284 = + env_record_has_binding( + s1, c, l, fname); + log_event("JsInterpreter.js", 2958, ctx_push(ctx_551, [{key: "#RETURN_VALUE#", val: _return_1284}]), "return"); + return (_return_1284); + }()), function(s2, has) { + + var ctx_552 = ctx_push(ctx_551, [{key: "s2", val: s2}, {key: "has", val: has}]); + log_event("JsInterpreter.js", 3032, ctx_552, "let"); + log_event("JsInterpreter.js", 3029, ctx_552, "if"); + if (has) { + var _if_arg_1289 = (function () { + log_event("JsInterpreter.js", 2970, ctx_552, "call"); + var _return_1290 = + nat_eq(l, + env_loc_global_env_record); + log_event("JsInterpreter.js", 2969, ctx_push(ctx_552, [{key: "#RETURN_VALUE#", val: _return_1290}]), "return"); + return (_return_1290); + }()) + ; + log_event("JsInterpreter.js", 3028, ctx_552, "if"); + if (_if_arg_1289) { + var _return_1318 = + if_run((function () { + log_event("JsInterpreter.js", 2975, ctx_552, "call"); + var _return_1293 = + run_object_get_prop( + s2, c, + Coq_object_loc_prealloc( + Coq_prealloc_global( + )), fname); + log_event("JsInterpreter.js", 2974, ctx_push(ctx_552, [{key: "#RETURN_VALUE#", val: _return_1293}]), "return"); + return (_return_1293); + }()), function(s3, + d) { + + var ctx_554 = ctx_push(ctx_552, [{key: "s3", val: s3}, {key: "d", val: d}]); + log_event("JsInterpreter.js", 3026, ctx_554, "let"); + log_event("JsInterpreter.js", 3023, ctx_554, "switch"); + switch (d.tag) { + case "Coq_full_descriptor_undef":log_event("JsInterpreter.js", 2983, ctx_554, "case"); + + var _return_1297 = (function () { + log_event("JsInterpreter.js", 2981, ctx_554, "call"); + var _return_1296 = + function (s, m) { + var ctx_555 = ctx_push(ctx_554, [{key: "s", val: s}, {key: "m", val: m}]); + log_event("JsInterpreter.js", 2979, ctx_555, "enter"); + (function () { + log_event("JsInterpreter.js", 2978, ctx_555, "call"); + var _return_1295 = + Debug.impossible_with_heap_because( + __LOC__, + s, m); + log_event("JsInterpreter.js", 2977, ctx_push(ctx_555, [{key: "#RETURN_VALUE#", val: _return_1295}]), "return"); + return (_return_1295); + }()) + ; + var _return_1294 = + Coq_result_impossible( + ); + log_event("JsInterpreter.js", 2976, ctx_push(ctx_555, [{key: "#RETURN_VALUE#", val: _return_1294}]), "return"); + return (_return_1294); + }(s3, + "Undefined full descriptor in [binding_inst_function_decls]."); + log_event("JsInterpreter.js", 2980, ctx_push(ctx_554, [{key: "#RETURN_VALUE#", val: _return_1296}]), "return"); + return (_return_1296); + }()) + ; + log_event("JsInterpreter.js", 2982, ctx_push(ctx_554, [{key: "#RETURN_VALUE#", val: _return_1297}]), "return"); + return (_return_1297); + case "Coq_full_descriptor_some": + var a = d.value;var ctx_556 = ctx_push(ctx_554, [{key: "a", val: a}]); + log_event("JsInterpreter.js", 3022, ctx_556, "case"); + + var _if_arg_1298 = (function () { + log_event("JsInterpreter.js", 2985, ctx_556, "call"); + var _return_1299 = + attributes_configurable( + a); + log_event("JsInterpreter.js", 2984, ctx_push(ctx_556, [{key: "#RETURN_VALUE#", val: _return_1299}]), "return"); + return (_return_1299); + }()) + ; + log_event("JsInterpreter.js", 3021, ctx_556, "if"); + if (_if_arg_1298) { + var a_2 = { + attributes_data_value: + Coq_value_prim( + Coq_prim_undef( + )), + attributes_data_writable: true, + attributes_data_enumerable: true, + attributes_data_configurable: bconfig + }; + var ctx_557 = ctx_push(ctx_556, [{key: "a_2", val: a_2}]); + log_event("JsInterpreter.js", 3020, ctx_557, "let"); + var _return_1317 = + if_bool( + (function () { + log_event("JsInterpreter.js", 3012, ctx_557, "call"); + var _return_1314 = + object_define_own_prop( + s3, c, + Coq_object_loc_prealloc( + Coq_prealloc_global( + )), + fname, + (function () { + log_event("JsInterpreter.js", 3010, ctx_557, "call"); + var _return_1313 = + descriptor_of_attributes( + Coq_attributes_data_of( + a_2)); + log_event("JsInterpreter.js", 3009, ctx_push(ctx_557, [{key: "#RETURN_VALUE#", val: _return_1313}]), "return"); + return (_return_1313); + }()), + true); + log_event("JsInterpreter.js", 3011, ctx_push(ctx_557, [{key: "#RETURN_VALUE#", val: _return_1314}]), "return"); + return (_return_1314); + }()), + function(s0, + x) { + + var ctx_558 = ctx_push(ctx_557, [{key: "s0", val: s0}, {key: "x", val: x}]); + log_event("JsInterpreter.js", 3018, ctx_558, "let"); + var _return_1316 = (function () { + log_event("JsInterpreter.js", 3014, ctx_558, "call"); + var _return_1315 = + follow( + s0); + log_event("JsInterpreter.js", 3013, ctx_push(ctx_558, [{key: "#RETURN_VALUE#", val: _return_1315}]), "return"); + return (_return_1315); + }()) + ; + log_event("JsInterpreter.js", 3015, ctx_push(ctx_558, [{key: "#RETURN_VALUE#", val: _return_1316}]), "return"); + return (_return_1316); + }); + log_event("JsInterpreter.js", 3019, ctx_push(ctx_557, [{key: "#RETURN_VALUE#", val: _return_1317}]), "return"); + return (_return_1317); + + } else { + var _if_arg_1300 = (function () { + log_event("JsInterpreter.js", 3001, ctx_556, "call"); + var _return_1308 = + ((function () { + log_event("JsInterpreter.js", 2989, ctx_556, "call"); + var _return_1302 = + descriptor_is_accessor_dec( + (function () { + log_event("JsInterpreter.js", 2987, ctx_556, "call"); + var _return_1301 = + descriptor_of_attributes( + a); + log_event("JsInterpreter.js", 2986, ctx_push(ctx_556, [{key: "#RETURN_VALUE#", val: _return_1301}]), "return"); + return (_return_1301); + }())); + log_event("JsInterpreter.js", 2988, ctx_push(ctx_556, [{key: "#RETURN_VALUE#", val: _return_1302}]), "return"); + return (_return_1302); + }()) + || (function () { + log_event("JsInterpreter.js", 2999, ctx_556, "call"); + var _return_1307 = + ((function () { + log_event("JsInterpreter.js", 2993, ctx_556, "call"); + var _return_1304 = + !( + (function () { + log_event("JsInterpreter.js", 2991, ctx_556, "call"); + var _return_1303 = + attributes_writable( + a); + log_event("JsInterpreter.js", 2990, ctx_push(ctx_556, [{key: "#RETURN_VALUE#", val: _return_1303}]), "return"); + return (_return_1303); + }())); + log_event("JsInterpreter.js", 2992, ctx_push(ctx_556, [{key: "#RETURN_VALUE#", val: _return_1304}]), "return"); + return (_return_1304); + }()) + || (function () { + log_event("JsInterpreter.js", 2997, ctx_556, "call"); + var _return_1306 = + !( + (function () { + log_event("JsInterpreter.js", 2995, ctx_556, "call"); + var _return_1305 = + attributes_enumerable( + a); + log_event("JsInterpreter.js", 2994, ctx_push(ctx_556, [{key: "#RETURN_VALUE#", val: _return_1305}]), "return"); + return (_return_1305); + }())); + log_event("JsInterpreter.js", 2996, ctx_push(ctx_556, [{key: "#RETURN_VALUE#", val: _return_1306}]), "return"); + return (_return_1306); + }())); + log_event("JsInterpreter.js", 2998, ctx_push(ctx_556, [{key: "#RETURN_VALUE#", val: _return_1307}]), "return"); + return (_return_1307); + }())); + log_event("JsInterpreter.js", 3000, ctx_push(ctx_556, [{key: "#RETURN_VALUE#", val: _return_1308}]), "return"); + return (_return_1308); + }()) + ; + log_event("JsInterpreter.js", 3008, ctx_556, "if"); + if (_if_arg_1300) { + var _return_1312 = (function () { + log_event("JsInterpreter.js", 3006, ctx_556, "call"); + var _return_1311 = + run_error( + s3, + Coq_native_error_type( + )); + log_event("JsInterpreter.js", 3005, ctx_push(ctx_556, [{key: "#RETURN_VALUE#", val: _return_1311}]), "return"); + return (_return_1311); + }()) + ; + log_event("JsInterpreter.js", 3007, ctx_push(ctx_556, [{key: "#RETURN_VALUE#", val: _return_1312}]), "return"); + return (_return_1312); + } else { + var _return_1310 = (function () { + log_event("JsInterpreter.js", 3003, ctx_556, "call"); + var _return_1309 = + follow( + s3); + log_event("JsInterpreter.js", 3002, ctx_push(ctx_556, [{key: "#RETURN_VALUE#", val: _return_1309}]), "return"); + return (_return_1309); + }()) + ; + log_event("JsInterpreter.js", 3004, ctx_push(ctx_556, [{key: "#RETURN_VALUE#", val: _return_1310}]), "return"); + return (_return_1310); + } + } + } + + }); + log_event("JsInterpreter.js", 3027, ctx_push(ctx_552, [{key: "#RETURN_VALUE#", val: _return_1318}]), "return"); + return (_return_1318); + } else { + var _return_1292 = (function () { + log_event("JsInterpreter.js", 2972, ctx_552, "call"); + var _return_1291 = + follow(s2); + log_event("JsInterpreter.js", 2971, ctx_push(ctx_552, [{key: "#RETURN_VALUE#", val: _return_1291}]), "return"); + return (_return_1291); + }()) + ; + log_event("JsInterpreter.js", 2973, ctx_push(ctx_552, [{key: "#RETURN_VALUE#", val: _return_1292}]), "return"); + return (_return_1292); + } + } else { + var _return_1288 = + if_void((function () { + log_event("JsInterpreter.js", 2961, ctx_552, "call"); + var _return_1285 = + env_record_create_mutable_binding( + s2, c, l, fname, + Some(bconfig)); + log_event("JsInterpreter.js", 2960, ctx_push(ctx_552, [{key: "#RETURN_VALUE#", val: _return_1285}]), "return"); + return (_return_1285); + }()), function(s3) { + + var ctx_553 = ctx_push(ctx_552, [{key: "s3", val: s3}]); + log_event("JsInterpreter.js", 2967, ctx_553, "let"); + var _return_1287 = (function () { + log_event("JsInterpreter.js", 2963, ctx_553, "call"); + var _return_1286 = + follow(s3); + log_event("JsInterpreter.js", 2962, ctx_push(ctx_553, [{key: "#RETURN_VALUE#", val: _return_1286}]), "return"); + return (_return_1286); + }()) + ; + log_event("JsInterpreter.js", 2964, ctx_push(ctx_553, [{key: "#RETURN_VALUE#", val: _return_1287}]), "return"); + return (_return_1287); + }); + log_event("JsInterpreter.js", 2968, ctx_push(ctx_552, [{key: "#RETURN_VALUE#", val: _return_1288}]), "return"); + return (_return_1288); + } + }); + log_event("JsInterpreter.js", 3033, ctx_push(ctx_551, [{key: "#RETURN_VALUE#", val: _return_1319}]), "return"); + return (_return_1319); + + }); + log_event("JsInterpreter.js", 3038, ctx_push(ctx_547, [{key: "#RETURN_VALUE#", val: _return_1320}]), "return"); + return (_return_1320); + + + + + } + +}; + +var make_arg_getter = function (s, c, x, x0) { + var ctx_559 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "x", val: x}, {key: "x0", val: x0}]); + log_event("JsInterpreter.js", 3055, ctx_559, "enter"); + var xbd = (function () { + log_event("JsInterpreter.js", 3049, ctx_559, "call"); + var _return_1322 = strappend("return ", (function () { + log_event("JsInterpreter.js", 3047, ctx_559, "call"); + var _return_1321 = strappend(x, ";"); + log_event("JsInterpreter.js", 3046, ctx_push(ctx_559, [{key: "#RETURN_VALUE#", val: _return_1321}]), "return"); + return (_return_1321); }())); + log_event("JsInterpreter.js", 3048, ctx_push(ctx_559, [{key: "#RETURN_VALUE#", val: _return_1322}]), "return"); + return (_return_1322); + }()) + ; + var ctx_560 = ctx_push(ctx_559, [{key: "xbd", val: xbd}]); + log_event("JsInterpreter.js", 3054, ctx_560, "let"); + var bd = Coq_funcbody_intro( + Coq_prog_intro(true, + mk_cons( + Coq_element_stat( + Coq_stat_return(Some(Coq_expr_identifier(x)))), mk_nil())), + xbd); + var ctx_561 = ctx_push(ctx_560, [{key: "bd", val: bd}]); + log_event("JsInterpreter.js", 3053, ctx_561, "let"); + var _return_1324 = (function () { + log_event("JsInterpreter.js", 3051, ctx_561, "call"); + var _return_1323 = creating_function_object(s, c, mk_nil(), bd, x0, true); + log_event("JsInterpreter.js", 3050, ctx_push(ctx_561, [{key: "#RETURN_VALUE#", val: _return_1323}]), "return"); + return (_return_1323); + }()) + ; + log_event("JsInterpreter.js", 3052, ctx_push(ctx_561, [{key: "#RETURN_VALUE#", val: _return_1324}]), "return"); + return (_return_1324); + + +}; + +var make_arg_setter = function (s, c, x, x0) { + var ctx_562 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "x", val: x}, {key: "x0", val: x0}]); + log_event("JsInterpreter.js", 3070, ctx_562, "enter"); + var xparam = (function () { + log_event("JsInterpreter.js", 3057, ctx_562, "call"); + var _return_1325 = strappend(x, "_arg"); + log_event("JsInterpreter.js", 3056, ctx_push(ctx_562, [{key: "#RETURN_VALUE#", val: _return_1325}]), "return"); + return (_return_1325); + }()) + ; + var ctx_563 = ctx_push(ctx_562, [{key: "xparam", val: xparam}]); + log_event("JsInterpreter.js", 3069, ctx_563, "let"); + var xbd = (function () { + log_event("JsInterpreter.js", 3063, ctx_563, "call"); + var _return_1328 = strappend(x, (function () { + log_event("JsInterpreter.js", 3061, ctx_563, "call"); + var _return_1327 = strappend(" = ", (function () { + log_event("JsInterpreter.js", 3059, ctx_563, "call"); + var _return_1326 = + strappend(xparam, ";"); + log_event("JsInterpreter.js", 3058, ctx_push(ctx_563, [{key: "#RETURN_VALUE#", val: _return_1326}]), "return"); + return (_return_1326); }()) + ); + log_event("JsInterpreter.js", 3060, ctx_push(ctx_563, [{key: "#RETURN_VALUE#", val: _return_1327}]), "return"); + return (_return_1327); }())); + log_event("JsInterpreter.js", 3062, ctx_push(ctx_563, [{key: "#RETURN_VALUE#", val: _return_1328}]), "return"); + return (_return_1328); + }()) + ; + var ctx_564 = ctx_push(ctx_563, [{key: "xbd", val: xbd}]); + log_event("JsInterpreter.js", 3068, ctx_564, "let"); + var bd = Coq_funcbody_intro( + Coq_prog_intro(true, + mk_cons( + Coq_element_stat( + Coq_stat_expr( + Coq_expr_assign(Coq_expr_identifier(x), None(), + Coq_expr_identifier(xparam)))), mk_nil())), xbd); + var ctx_565 = ctx_push(ctx_564, [{key: "bd", val: bd}]); + log_event("JsInterpreter.js", 3067, ctx_565, "let"); + var _return_1330 = (function () { + log_event("JsInterpreter.js", 3065, ctx_565, "call"); + var _return_1329 = creating_function_object(s, c, + mk_cons(xparam, mk_nil()), bd, x0, true); + log_event("JsInterpreter.js", 3064, ctx_push(ctx_565, [{key: "#RETURN_VALUE#", val: _return_1329}]), "return"); + return (_return_1329); + }()) + ; + log_event("JsInterpreter.js", 3066, ctx_push(ctx_565, [{key: "#RETURN_VALUE#", val: _return_1330}]), "return"); + return (_return_1330); + + + +}; + +var arguments_object_map_loop = function (s, c, l, xs, len, args, x, str, lmap, xsmap) { + var ctx_566 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "l", val: l}, {key: "xs", val: xs}, {key: "len", val: len}, {key: "args", val: args}, {key: "x", val: x}, {key: "str", val: str}, {key: "lmap", val: lmap}, {key: "xsmap", val: xsmap}]); + log_event("JsInterpreter.js", 3174, ctx_566, "enter"); + var _return_1378 = (function () { + log_event("JsInterpreter.js", 3172, ctx_566, "call"); + var _return_1377 = function (fO, fS, n) { + var ctx_583 = ctx_push(ctx_566, [{key: "fO", val: fO}, {key: "fS", val: fS}, {key: "n", val: n}]); + log_event("JsInterpreter.js", 3170, ctx_583, "enter"); + var _if_arg_1370 = (function () { + log_event("JsInterpreter.js", 3160, ctx_583, "call"); + var _return_1371 = int_eq(n, 0); + log_event("JsInterpreter.js", 3159, ctx_push(ctx_583, [{key: "#RETURN_VALUE#", val: _return_1371}]), "return"); + return (_return_1371); + }()) + ; + log_event("JsInterpreter.js", 3169, ctx_583, "if"); + if (_if_arg_1370) { + var _return_1376 = (function () { + log_event("JsInterpreter.js", 3167, ctx_583, "call"); + var _return_1375 = fO({}); + log_event("JsInterpreter.js", 3166, ctx_push(ctx_583, [{key: "#RETURN_VALUE#", val: _return_1375}]), "return"); + return (_return_1375); + }()) + ; + log_event("JsInterpreter.js", 3168, ctx_push(ctx_583, [{key: "#RETURN_VALUE#", val: _return_1376}]), "return"); + return (_return_1376); + } else { + var _return_1374 = (function () { + log_event("JsInterpreter.js", 3164, ctx_583, "call"); + var _return_1373 = fS((function () { + log_event("JsInterpreter.js", 3162, ctx_583, "call"); + var _return_1372 = + (n - 1); + log_event("JsInterpreter.js", 3161, ctx_push(ctx_583, [{key: "#RETURN_VALUE#", val: _return_1372}]), "return"); + return (_return_1372); + }())); + log_event("JsInterpreter.js", 3163, ctx_push(ctx_583, [{key: "#RETURN_VALUE#", val: _return_1373}]), "return"); + return (_return_1373); + }()) + ; + log_event("JsInterpreter.js", 3165, ctx_push(ctx_583, [{key: "#RETURN_VALUE#", val: _return_1374}]), "return"); + return (_return_1374); + }}(function (_pat_any_1331) { + var ctx_567 = ctx_push(ctx_566, [{key: "_pat_any_1331", val: _pat_any_1331}]); + log_event("JsInterpreter.js", 3089, ctx_567, "enter"); + var _if_arg_1332 = (function () { + log_event("JsInterpreter.js", 3072, ctx_567, "call"); + var _return_1333 = list_eq_nil_decidable(xsmap); + log_event("JsInterpreter.js", 3071, ctx_push(ctx_567, [{key: "#RETURN_VALUE#", val: _return_1333}]), "return"); + return (_return_1333); + }()) + ; + log_event("JsInterpreter.js", 3088, ctx_567, "if"); + if (_if_arg_1332) { + var _return_1340 = (function () { + log_event("JsInterpreter.js", 3086, ctx_567, "call"); + var _return_1339 = res_void(s); + log_event("JsInterpreter.js", 3085, ctx_push(ctx_567, [{key: "#RETURN_VALUE#", val: _return_1339}]), "return"); + return (_return_1339); + }()) + ; + log_event("JsInterpreter.js", 3087, ctx_push(ctx_567, [{key: "#RETURN_VALUE#", val: _return_1340}]), "return"); + return (_return_1340); + } else { + var _return_1338 = if_some((function () { + log_event("JsInterpreter.js", 3074, ctx_567, "call"); + var _return_1334 = + object_binds_pickable_option( + s, l); + log_event("JsInterpreter.js", 3073, ctx_push(ctx_567, [{key: "#RETURN_VALUE#", val: _return_1334}]), "return"); + return (_return_1334); + }()), function(o) { + + var ctx_568 = ctx_push(ctx_567, [{key: "o", val: o}]); + log_event("JsInterpreter.js", 3083, ctx_568, "let"); + var o_2 = object_for_args_object( + o, lmap, + Coq_builtin_get_args_obj( + ), + Coq_builtin_get_own_prop_args_obj( + ), + Coq_builtin_define_own_prop_args_obj( + ), + Coq_builtin_delete_args_obj( + )); + var ctx_569 = ctx_push(ctx_568, [{key: "o_2", val: o_2}]); + log_event("JsInterpreter.js", 3080, ctx_569, "let"); + var _return_1337 = (function () { + log_event("JsInterpreter.js", 3078, ctx_569, "call"); + var _return_1336 = + res_void((function () { + log_event("JsInterpreter.js", 3076, ctx_569, "call"); + var _return_1335 = + object_write(s, l, + o_2); + log_event("JsInterpreter.js", 3075, ctx_push(ctx_569, [{key: "#RETURN_VALUE#", val: _return_1335}]), "return"); + return (_return_1335); + }())); + log_event("JsInterpreter.js", 3077, ctx_push(ctx_569, [{key: "#RETURN_VALUE#", val: _return_1336}]), "return"); + return (_return_1336); + }()) + ; + log_event("JsInterpreter.js", 3079, ctx_push(ctx_569, [{key: "#RETURN_VALUE#", val: _return_1337}]), "return"); + return (_return_1337); + + }); + log_event("JsInterpreter.js", 3084, ctx_push(ctx_567, [{key: "#RETURN_VALUE#", val: _return_1338}]), "return"); + return (_return_1338); + }}, function (len_2) { + var ctx_570 = ctx_push(ctx_566, [{key: "len_2", val: len_2}]); + log_event("JsInterpreter.js", 3158, ctx_570, "enter"); + var tdl = (function () { + log_event("JsInterpreter.js", 3091, ctx_570, "call"); + var _return_1341 = take_drop_last(args); + log_event("JsInterpreter.js", 3090, ctx_push(ctx_570, [{key: "#RETURN_VALUE#", val: _return_1341}]), "return"); + return (_return_1341); + }()) + ; + var ctx_571 = ctx_push(ctx_570, [{key: "tdl", val: tdl}]); + log_event("JsInterpreter.js", 3157, ctx_571, "let"); + var rmlargs = tdl[0], largs = tdl[1]; + var ctx_572 = ctx_push(ctx_571, [{key: "rmlargs", val: rmlargs}, {key: "largs", val: largs}]); + log_event("JsInterpreter.js", 3156, ctx_572, "let"); + var arguments_object_map_loop_2 = function (s0, xsmap0) { + var ctx_573 = ctx_push(ctx_572, [{key: "s0", val: s0}, {key: "xsmap0", val: xsmap0}]); + log_event("JsInterpreter.js", 3095, ctx_573, "enter"); + var _return_1343 = (function () { + log_event("JsInterpreter.js", 3093, ctx_573, "call"); + var _return_1342 = arguments_object_map_loop( + s0, c, l, xs, len_2, + rmlargs, x, str, lmap, + xsmap0); + log_event("JsInterpreter.js", 3092, ctx_push(ctx_573, [{key: "#RETURN_VALUE#", val: _return_1342}]), "return"); + return (_return_1342); + }()) + ; + log_event("JsInterpreter.js", 3094, ctx_push(ctx_573, [{key: "#RETURN_VALUE#", val: _return_1343}]), "return"); + return (_return_1343); + }; + var ctx_574 = ctx_push(ctx_572, [{key: "arguments_object_map_loop_2", val: arguments_object_map_loop_2}]); + log_event("JsInterpreter.js", 3155, ctx_574, "let"); + var a = (function () { + log_event("JsInterpreter.js", 3097, ctx_574, "call"); + var _return_1344 = attributes_data_intro_all_true( + largs); + log_event("JsInterpreter.js", 3096, ctx_push(ctx_574, [{key: "#RETURN_VALUE#", val: _return_1344}]), "return"); + return (_return_1344); + }()) + ; + var ctx_575 = ctx_push(ctx_574, [{key: "a", val: a}]); + log_event("JsInterpreter.js", 3154, ctx_575, "let"); + var _return_1369 = if_bool((function () { + log_event("JsInterpreter.js", 3103, ctx_575, "call"); + var _return_1347 = + object_define_own_prop(s, + c, l, (function () { + log_event("JsInterpreter.js", 3099, ctx_575, "call"); + var _return_1345 = + convert_prim_to_string( + Coq_prim_number( + number_of_int( + len_2))); + log_event("JsInterpreter.js", 3098, ctx_push(ctx_575, [{key: "#RETURN_VALUE#", val: _return_1345}]), "return"); + return (_return_1345); + }()), (function () { + log_event("JsInterpreter.js", 3101, ctx_575, "call"); + var _return_1346 = + descriptor_of_attributes( + Coq_attributes_data_of( + a)); + log_event("JsInterpreter.js", 3100, ctx_push(ctx_575, [{key: "#RETURN_VALUE#", val: _return_1346}]), "return"); + return (_return_1346); + }()), false); + log_event("JsInterpreter.js", 3102, ctx_push(ctx_575, [{key: "#RETURN_VALUE#", val: _return_1347}]), "return"); + return (_return_1347); }()) + , function(s1, b) { + + var ctx_576 = ctx_push(ctx_575, [{key: "s1", val: s1}, {key: "b", val: b}]); + log_event("JsInterpreter.js", 3152, ctx_576, "let"); + var _if_arg_1348 = (function () { + log_event("JsInterpreter.js", 3107, ctx_576, "call"); + var _return_1350 = + ge_nat_decidable(len_2, + (function () { + log_event("JsInterpreter.js", 3105, ctx_576, "call"); + var _return_1349 = + LibList.length(xs); + log_event("JsInterpreter.js", 3104, ctx_push(ctx_576, [{key: "#RETURN_VALUE#", val: _return_1349}]), "return"); + return (_return_1349); + }())); + log_event("JsInterpreter.js", 3106, ctx_push(ctx_576, [{key: "#RETURN_VALUE#", val: _return_1350}]), "return"); + return (_return_1350); + }()) + ; + log_event("JsInterpreter.js", 3149, ctx_576, "if"); + if (_if_arg_1348) { + var _return_1368 = (function () { + log_event("JsInterpreter.js", 3147, ctx_576, "call"); + var _return_1367 = + arguments_object_map_loop_2( + s1, xsmap); + log_event("JsInterpreter.js", 3146, ctx_push(ctx_576, [{key: "#RETURN_VALUE#", val: _return_1367}]), "return"); + return (_return_1367); + }()) + ; + log_event("JsInterpreter.js", 3148, ctx_push(ctx_576, [{key: "#RETURN_VALUE#", val: _return_1368}]), "return"); + return (_return_1368); + } else { + var dummy = ""; + var ctx_577 = ctx_push(ctx_576, [{key: "dummy", val: dummy}]); + log_event("JsInterpreter.js", 3145, ctx_577, "let"); + var x0 = (function () { + log_event("JsInterpreter.js", 3109, ctx_577, "call"); + var _return_1351 = + nth_def(dummy, len_2, + xs); + log_event("JsInterpreter.js", 3108, ctx_push(ctx_577, [{key: "#RETURN_VALUE#", val: _return_1351}]), "return"); + return (_return_1351); + }()) + ; + var ctx_578 = ctx_push(ctx_577, [{key: "x0", val: x0}]); + log_event("JsInterpreter.js", 3144, ctx_578, "let"); + var _if_arg_1352 = (function () { + log_event("JsInterpreter.js", 3113, ctx_578, "call"); + var _return_1354 = + (str || (function () { + log_event("JsInterpreter.js", 3111, ctx_578, "call"); + var _return_1353 = + mem_decide(string_eq, + x0, xsmap); + log_event("JsInterpreter.js", 3110, ctx_push(ctx_578, [{key: "#RETURN_VALUE#", val: _return_1353}]), "return"); + return (_return_1353); + }())); + log_event("JsInterpreter.js", 3112, ctx_push(ctx_578, [{key: "#RETURN_VALUE#", val: _return_1354}]), "return"); + return (_return_1354); + }()) + ; + log_event("JsInterpreter.js", 3143, ctx_578, "if"); + if (_if_arg_1352) { + var _return_1366 = (function () { + log_event("JsInterpreter.js", 3141, ctx_578, "call"); + var _return_1365 = + arguments_object_map_loop_2( + s1, xsmap); + log_event("JsInterpreter.js", 3140, ctx_push(ctx_578, [{key: "#RETURN_VALUE#", val: _return_1365}]), "return"); + return (_return_1365); + }()) + ; + log_event("JsInterpreter.js", 3142, ctx_push(ctx_578, [{key: "#RETURN_VALUE#", val: _return_1366}]), "return"); + return (_return_1366); + } else { + var _return_1364 = + if_object( + (function () { + log_event("JsInterpreter.js", 3115, ctx_578, "call"); + var _return_1355 = + make_arg_getter(s1, + c, x0, x); + log_event("JsInterpreter.js", 3114, ctx_push(ctx_578, [{key: "#RETURN_VALUE#", val: _return_1355}]), "return"); + return (_return_1355); + }()), function(s2, + lgetter) { + + var ctx_579 = ctx_push(ctx_578, [{key: "s2", val: s2}, {key: "lgetter", val: lgetter}]); + log_event("JsInterpreter.js", 3138, ctx_579, "let"); + var _return_1363 = + if_object( + (function () { + log_event("JsInterpreter.js", 3117, ctx_579, "call"); + var _return_1356 = + make_arg_setter( + s2, c, x0, x); + log_event("JsInterpreter.js", 3116, ctx_push(ctx_579, [{key: "#RETURN_VALUE#", val: _return_1356}]), "return"); + return (_return_1356); + }()), + function(s3, + lsetter) { + + var ctx_580 = ctx_push(ctx_579, [{key: "s3", val: s3}, {key: "lsetter", val: lsetter}]); + log_event("JsInterpreter.js", 3134, ctx_580, "let"); + var a_2 = { + attributes_accessor_get: + Coq_value_object( + lgetter), + attributes_accessor_set: + Coq_value_object( + lsetter), + attributes_accessor_enumerable: false, + attributes_accessor_configurable: true + }; + var ctx_581 = ctx_push(ctx_580, [{key: "a_2", val: a_2}]); + log_event("JsInterpreter.js", 3131, ctx_581, "let"); + var _return_1362 = + if_bool( + (function () { + log_event("JsInterpreter.js", 3123, ctx_581, "call"); + var _return_1359 = + object_define_own_prop( + s3, c, + lmap, + (function () { + log_event("JsInterpreter.js", 3119, ctx_581, "call"); + var _return_1357 = + convert_prim_to_string( + Coq_prim_number( + number_of_int( + len_2))); + log_event("JsInterpreter.js", 3118, ctx_push(ctx_581, [{key: "#RETURN_VALUE#", val: _return_1357}]), "return"); + return (_return_1357); + }()), + (function () { + log_event("JsInterpreter.js", 3121, ctx_581, "call"); + var _return_1358 = + descriptor_of_attributes( + Coq_attributes_accessor_of( + a_2)); + log_event("JsInterpreter.js", 3120, ctx_push(ctx_581, [{key: "#RETURN_VALUE#", val: _return_1358}]), "return"); + return (_return_1358); + }()), + false); + log_event("JsInterpreter.js", 3122, ctx_push(ctx_581, [{key: "#RETURN_VALUE#", val: _return_1359}]), "return"); + return (_return_1359); + }()), + function(s4, + b_2) { + + var ctx_582 = ctx_push(ctx_581, [{key: "s4", val: s4}, {key: "b_2", val: b_2}]); + log_event("JsInterpreter.js", 3129, ctx_582, "let"); + var _return_1361 = (function () { + log_event("JsInterpreter.js", 3125, ctx_582, "call"); + var _return_1360 = + arguments_object_map_loop_2( + s4, + mk_cons( + x0, + xsmap)); + log_event("JsInterpreter.js", 3124, ctx_push(ctx_582, [{key: "#RETURN_VALUE#", val: _return_1360}]), "return"); + return (_return_1360); + }()) + ; + log_event("JsInterpreter.js", 3126, ctx_push(ctx_582, [{key: "#RETURN_VALUE#", val: _return_1361}]), "return"); + return (_return_1361); + }); + log_event("JsInterpreter.js", 3130, ctx_push(ctx_581, [{key: "#RETURN_VALUE#", val: _return_1362}]), "return"); + return (_return_1362); + + }); + log_event("JsInterpreter.js", 3135, ctx_push(ctx_579, [{key: "#RETURN_VALUE#", val: _return_1363}]), "return"); + return (_return_1363); + }); + log_event("JsInterpreter.js", 3139, ctx_push(ctx_578, [{key: "#RETURN_VALUE#", val: _return_1364}]), "return"); + return (_return_1364); + } + + + } + }); + log_event("JsInterpreter.js", 3153, ctx_push(ctx_575, [{key: "#RETURN_VALUE#", val: _return_1369}]), "return"); + return (_return_1369); + + + + }, len); + log_event("JsInterpreter.js", 3171, ctx_push(ctx_566, [{key: "#RETURN_VALUE#", val: _return_1377}]), "return"); + return (_return_1377); + }()) + ; + log_event("JsInterpreter.js", 3173, ctx_push(ctx_566, [{key: "#RETURN_VALUE#", val: _return_1378}]), "return"); + return (_return_1378); +}; + +var arguments_object_map = function (s, c, l, xs, args, x, str) { + var ctx_584 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "l", val: l}, {key: "xs", val: xs}, {key: "args", val: args}, {key: "x", val: x}, {key: "str", val: str}]); + log_event("JsInterpreter.js", 3186, ctx_584, "enter"); + var _return_1383 = if_object((function () { + log_event("JsInterpreter.js", 3176, ctx_584, "call"); + var _return_1379 = run_construct_prealloc(s, c, + Coq_prealloc_object(), + mk_nil()); + log_event("JsInterpreter.js", 3175, ctx_push(ctx_584, [{key: "#RETURN_VALUE#", val: _return_1379}]), "return"); + return (_return_1379); }()), function(s_2, lmap) { + + var ctx_585 = ctx_push(ctx_584, [{key: "s_2", val: s_2}, {key: "lmap", val: lmap}]); + log_event("JsInterpreter.js", 3184, ctx_585, "let"); + var _return_1382 = (function () { + log_event("JsInterpreter.js", 3180, ctx_585, "call"); + var _return_1381 = arguments_object_map_loop(s_2, + c, l, xs, (function () { + log_event("JsInterpreter.js", 3178, ctx_585, "call"); + var _return_1380 = + LibList.length(args); + log_event("JsInterpreter.js", 3177, ctx_push(ctx_585, [{key: "#RETURN_VALUE#", val: _return_1380}]), "return"); + return (_return_1380); }()) + , args, x, str, lmap, + mk_nil()); + log_event("JsInterpreter.js", 3179, ctx_push(ctx_585, [{key: "#RETURN_VALUE#", val: _return_1381}]), "return"); + return (_return_1381); + }()) + ; + log_event("JsInterpreter.js", 3181, ctx_push(ctx_585, [{key: "#RETURN_VALUE#", val: _return_1382}]), "return"); + return (_return_1382); + }); + log_event("JsInterpreter.js", 3185, ctx_push(ctx_584, [{key: "#RETURN_VALUE#", val: _return_1383}]), "return"); + return (_return_1383); +}; + +var create_arguments_object = function (s, c, lf, xs, args, x, str) { + var ctx_586 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "lf", val: lf}, {key: "xs", val: xs}, {key: "args", val: args}, {key: "x", val: x}, {key: "str", val: str}]); + log_event("JsInterpreter.js", 3241, ctx_586, "enter"); + var o = (function () { + log_event("JsInterpreter.js", 3188, ctx_586, "call"); + var _return_1384 = object_create_builtin( + Coq_value_object( + Coq_object_loc_prealloc( + Coq_prealloc_object_proto())), "Arguments", + Heap.empty); + log_event("JsInterpreter.js", 3187, ctx_push(ctx_586, [{key: "#RETURN_VALUE#", val: _return_1384}]), "return"); + return (_return_1384); + }()) + ; + var ctx_587 = ctx_push(ctx_586, [{key: "o", val: o}]); + log_event("JsInterpreter.js", 3240, ctx_587, "let"); + var p = (function () { + log_event("JsInterpreter.js", 3190, ctx_587, "call"); + var _return_1385 = object_alloc(s, o); + log_event("JsInterpreter.js", 3189, ctx_push(ctx_587, [{key: "#RETURN_VALUE#", val: _return_1385}]), "return"); + return (_return_1385); + }()) + ; + var ctx_588 = ctx_push(ctx_587, [{key: "p", val: p}]); + log_event("JsInterpreter.js", 3239, ctx_588, "let"); + var l = p[0], s_2 = p[1]; + var ctx_589 = ctx_push(ctx_588, [{key: "l", val: l}, {key: "s_2", val: s_2}]); + log_event("JsInterpreter.js", 3238, ctx_589, "let"); + var a = { + attributes_data_value: Coq_value_prim( + Coq_prim_number( + number_of_int((function () { + log_event("JsInterpreter.js", 3192, ctx_589, "call"); + var _return_1386 = LibList.length(args); + log_event("JsInterpreter.js", 3191, ctx_push(ctx_589, [{key: "#RETURN_VALUE#", val: _return_1386}]), "return"); + return (_return_1386); }())))), + attributes_data_writable: true, + attributes_data_enumerable: false, + attributes_data_configurable: true + }; + var ctx_590 = ctx_push(ctx_589, [{key: "a", val: a}]); + log_event("JsInterpreter.js", 3237, ctx_590, "let"); + var _return_1402 = if_bool((function () { + log_event("JsInterpreter.js", 3196, ctx_590, "call"); + var _return_1388 = object_define_own_prop(s_2, c, l, + "length", (function () { + log_event("JsInterpreter.js", 3194, ctx_590, "call"); + var _return_1387 = descriptor_of_attributes( + Coq_attributes_data_of( + a)); + log_event("JsInterpreter.js", 3193, ctx_push(ctx_590, [{key: "#RETURN_VALUE#", val: _return_1387}]), "return"); + return (_return_1387); }()), + false); + log_event("JsInterpreter.js", 3195, ctx_push(ctx_590, [{key: "#RETURN_VALUE#", val: _return_1388}]), "return"); + return (_return_1388); }()), function(s1, b) { + + var ctx_591 = ctx_push(ctx_590, [{key: "s1", val: s1}, {key: "b", val: b}]); + log_event("JsInterpreter.js", 3235, ctx_591, "let"); + var _return_1401 = if_void((function () { + log_event("JsInterpreter.js", 3198, ctx_591, "call"); + var _return_1389 = arguments_object_map( + s1, c, l, + xs, args, + x, str); + log_event("JsInterpreter.js", 3197, ctx_push(ctx_591, [{key: "#RETURN_VALUE#", val: _return_1389}]), "return"); + return (_return_1389); }()), + function(s2) { + + var ctx_592 = ctx_push(ctx_591, [{key: "s2", val: s2}]); + log_event("JsInterpreter.js", 3231, ctx_592, "let"); + log_event("JsInterpreter.js", 3228, ctx_592, "if"); + if (str) { + var vthrower = Coq_value_object( + Coq_object_loc_prealloc( + Coq_prealloc_throw_type_error( + ))); + var ctx_595 = ctx_push(ctx_592, [{key: "vthrower", val: vthrower}]); + log_event("JsInterpreter.js", 3227, ctx_595, "let"); + var a0 = { + attributes_accessor_get: vthrower, + attributes_accessor_set: vthrower, + attributes_accessor_enumerable: false, + attributes_accessor_configurable: false + }; + var ctx_596 = ctx_push(ctx_595, [{key: "a0", val: a0}]); + log_event("JsInterpreter.js", 3226, ctx_596, "let"); + var _return_1400 = + if_bool((function () { + log_event("JsInterpreter.js", 3212, ctx_596, "call"); + var _return_1395 = + object_define_own_prop( + s2, c, l, "caller", + (function () { + log_event("JsInterpreter.js", 3210, ctx_596, "call"); + var _return_1394 = + descriptor_of_attributes( + Coq_attributes_accessor_of( + a0)); + log_event("JsInterpreter.js", 3209, ctx_push(ctx_596, [{key: "#RETURN_VALUE#", val: _return_1394}]), "return"); + return (_return_1394); + }()), false); + log_event("JsInterpreter.js", 3211, ctx_push(ctx_596, [{key: "#RETURN_VALUE#", val: _return_1395}]), "return"); + return (_return_1395); + }()), function(s3, b_2) { + + var ctx_597 = ctx_push(ctx_596, [{key: "s3", val: s3}, {key: "b_2", val: b_2}]); + log_event("JsInterpreter.js", 3224, ctx_597, "let"); + var _return_1399 = + if_bool((function () { + log_event("JsInterpreter.js", 3216, ctx_597, "call"); + var _return_1397 = + object_define_own_prop( + s3, c, l, + "callee", + (function () { + log_event("JsInterpreter.js", 3214, ctx_597, "call"); + var _return_1396 = + descriptor_of_attributes( + Coq_attributes_accessor_of( + a0)); + log_event("JsInterpreter.js", 3213, ctx_push(ctx_597, [{key: "#RETURN_VALUE#", val: _return_1396}]), "return"); + return (_return_1396); + }()), false); + log_event("JsInterpreter.js", 3215, ctx_push(ctx_597, [{key: "#RETURN_VALUE#", val: _return_1397}]), "return"); + return (_return_1397); + }()), function(s4, + b_3) { + + var ctx_598 = ctx_push(ctx_597, [{key: "s4", val: s4}, {key: "b_3", val: b_3}]); + log_event("JsInterpreter.js", 3220, ctx_598, "let"); + var _return_1398 = + res_ter(s4, + res_val( + Coq_value_object( + l))); + log_event("JsInterpreter.js", 3217, ctx_push(ctx_598, [{key: "#RETURN_VALUE#", val: _return_1398}]), "return"); + return (_return_1398); + }); + log_event("JsInterpreter.js", 3221, ctx_push(ctx_597, [{key: "#RETURN_VALUE#", val: _return_1399}]), "return"); + return (_return_1399); + }); + log_event("JsInterpreter.js", 3225, ctx_push(ctx_596, [{key: "#RETURN_VALUE#", val: _return_1400}]), "return"); + return (_return_1400); + + + } else { + var a0 = { + attributes_data_value: + Coq_value_object(lf), + attributes_data_writable: true, + attributes_data_enumerable: false, + attributes_data_configurable: true + }; + var ctx_593 = ctx_push(ctx_592, [{key: "a0", val: a0}]); + log_event("JsInterpreter.js", 3208, ctx_593, "let"); + var _return_1393 = + if_bool((function () { + log_event("JsInterpreter.js", 3202, ctx_593, "call"); + var _return_1391 = + object_define_own_prop( + s2, c, l, "callee", + (function () { + log_event("JsInterpreter.js", 3200, ctx_593, "call"); + var _return_1390 = + descriptor_of_attributes( + Coq_attributes_data_of( + a0)); + log_event("JsInterpreter.js", 3199, ctx_push(ctx_593, [{key: "#RETURN_VALUE#", val: _return_1390}]), "return"); + return (_return_1390); + }()), false); + log_event("JsInterpreter.js", 3201, ctx_push(ctx_593, [{key: "#RETURN_VALUE#", val: _return_1391}]), "return"); + return (_return_1391); + }()), function(s3, b_2) { + + var ctx_594 = ctx_push(ctx_593, [{key: "s3", val: s3}, {key: "b_2", val: b_2}]); + log_event("JsInterpreter.js", 3206, ctx_594, "let"); + var _return_1392 = + res_ter(s3, + res_val( + Coq_value_object(l))); + log_event("JsInterpreter.js", 3203, ctx_push(ctx_594, [{key: "#RETURN_VALUE#", val: _return_1392}]), "return"); + return (_return_1392); + }); + log_event("JsInterpreter.js", 3207, ctx_push(ctx_593, [{key: "#RETURN_VALUE#", val: _return_1393}]), "return"); + return (_return_1393); + + } + }); + log_event("JsInterpreter.js", 3232, ctx_push(ctx_591, [{key: "#RETURN_VALUE#", val: _return_1401}]), "return"); + return (_return_1401); + }); + log_event("JsInterpreter.js", 3236, ctx_push(ctx_590, [{key: "#RETURN_VALUE#", val: _return_1402}]), "return"); + return (_return_1402); + + + + +}; + +var binding_inst_arg_obj = function (s, c, lf, p, xs, args, l) { + var ctx_599 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "lf", val: lf}, {key: "p", val: p}, {key: "xs", val: xs}, {key: "args", val: args}, {key: "l", val: l}]); + log_event("JsInterpreter.js", 3263, ctx_599, "enter"); + var arguments_ = "arguments"; + var ctx_600 = ctx_push(ctx_599, [{key: "arguments_", val: arguments_}]); + log_event("JsInterpreter.js", 3262, ctx_600, "let"); + var str = prog_intro_strictness(p); + var ctx_601 = ctx_push(ctx_600, [{key: "str", val: str}]); + log_event("JsInterpreter.js", 3261, ctx_601, "let"); + var _return_1410 = if_object((function () { + log_event("JsInterpreter.js", 3243, ctx_601, "call"); + var _return_1403 = create_arguments_object(s, c, lf, + xs, args, + c.execution_ctx_variable_env, + str); + log_event("JsInterpreter.js", 3242, ctx_push(ctx_601, [{key: "#RETURN_VALUE#", val: _return_1403}]), "return"); + return (_return_1403); }()), function(s1, largs) { + + var ctx_602 = ctx_push(ctx_601, [{key: "s1", val: s1}, {key: "largs", val: largs}]); + log_event("JsInterpreter.js", 3259, ctx_602, "let"); + log_event("JsInterpreter.js", 3256, ctx_602, "if"); + if (str) { + var _return_1409 = if_void((function () { + log_event("JsInterpreter.js", 3248, ctx_602, "call"); + var _return_1406 = + env_record_create_immutable_binding( + s1, l, arguments_); + log_event("JsInterpreter.js", 3247, ctx_push(ctx_602, [{key: "#RETURN_VALUE#", val: _return_1406}]), "return"); + return (_return_1406); }()) + , function(s2) { + + var ctx_603 = ctx_push(ctx_602, [{key: "s2", val: s2}]); + log_event("JsInterpreter.js", 3254, ctx_603, "let"); + var _return_1408 = (function () { + log_event("JsInterpreter.js", 3250, ctx_603, "call"); + var _return_1407 = + env_record_initialize_immutable_binding( + s2, l, arguments_, + Coq_value_object(largs)); + log_event("JsInterpreter.js", 3249, ctx_push(ctx_603, [{key: "#RETURN_VALUE#", val: _return_1407}]), "return"); + return (_return_1407); + }()) + ; + log_event("JsInterpreter.js", 3251, ctx_push(ctx_603, [{key: "#RETURN_VALUE#", val: _return_1408}]), "return"); + return (_return_1408); + }); + log_event("JsInterpreter.js", 3255, ctx_push(ctx_602, [{key: "#RETURN_VALUE#", val: _return_1409}]), "return"); + return (_return_1409); + } else { + var _return_1405 = (function () { + log_event("JsInterpreter.js", 3245, ctx_602, "call"); + var _return_1404 = env_record_create_set_mutable_binding( + s1, c, l, arguments_, + None(), + Coq_value_object(largs), + false); + log_event("JsInterpreter.js", 3244, ctx_push(ctx_602, [{key: "#RETURN_VALUE#", val: _return_1404}]), "return"); + return (_return_1404); + }()) + ; + log_event("JsInterpreter.js", 3246, ctx_push(ctx_602, [{key: "#RETURN_VALUE#", val: _return_1405}]), "return"); + return (_return_1405); + } + }); + log_event("JsInterpreter.js", 3260, ctx_push(ctx_601, [{key: "#RETURN_VALUE#", val: _return_1410}]), "return"); + return (_return_1410); + + +}; + +var binding_inst_var_decls = function (s, c, l, vds, bconfig, str) { + var ctx_604 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "l", val: l}, {key: "vds", val: vds}, {key: "bconfig", val: bconfig}, {key: "str", val: str}]); + log_event("JsInterpreter.js", 3294, ctx_604, "enter"); + log_event("JsInterpreter.js", 3293, ctx_604, "switch"); + switch (vds.tag) { + case "[]":log_event("JsInterpreter.js", 3267, ctx_604, "case"); + + var _return_1412 = (function () { + log_event("JsInterpreter.js", 3265, ctx_604, "call"); + var _return_1411 = res_void(s); + log_event("JsInterpreter.js", 3264, ctx_push(ctx_604, [{key: "#RETURN_VALUE#", val: _return_1411}]), "return"); + return (_return_1411); + }()) + ; + log_event("JsInterpreter.js", 3266, ctx_push(ctx_604, [{key: "#RETURN_VALUE#", val: _return_1412}]), "return"); + return (_return_1412); + case "::": + var vd = vds.head, vds_2 = vds.tail;var ctx_605 = ctx_push(ctx_604, [{key: "vd", val: vd}, {key: "vds_2", val: vds_2}]); + log_event("JsInterpreter.js", 3292, ctx_605, "case"); + + var bivd = function (s0) { + var ctx_606 = ctx_push(ctx_605, [{key: "s0", val: s0}]); + log_event("JsInterpreter.js", 3271, ctx_606, "enter"); + var _return_1414 = (function () { + log_event("JsInterpreter.js", 3269, ctx_606, "call"); + var _return_1413 = binding_inst_var_decls(s0, c, l, vds_2, bconfig, + str); + log_event("JsInterpreter.js", 3268, ctx_push(ctx_606, [{key: "#RETURN_VALUE#", val: _return_1413}]), "return"); + return (_return_1413); + }()) + ; + log_event("JsInterpreter.js", 3270, ctx_push(ctx_606, [{key: "#RETURN_VALUE#", val: _return_1414}]), "return"); + return (_return_1414); + }; + var ctx_607 = ctx_push(ctx_605, [{key: "bivd", val: bivd}]); + log_event("JsInterpreter.js", 3291, ctx_607, "let"); + var _return_1422 = if_bool((function () { + log_event("JsInterpreter.js", 3273, ctx_607, "call"); + var _return_1415 = env_record_has_binding(s, c, + l, vd); + log_event("JsInterpreter.js", 3272, ctx_push(ctx_607, [{key: "#RETURN_VALUE#", val: _return_1415}]), "return"); + return (_return_1415); }()), function(s1, has) { + + var ctx_608 = ctx_push(ctx_607, [{key: "s1", val: s1}, {key: "has", val: has}]); + log_event("JsInterpreter.js", 3289, ctx_608, "let"); + log_event("JsInterpreter.js", 3286, ctx_608, "if"); + if (has) { + var _return_1421 = (function () { + log_event("JsInterpreter.js", 3284, ctx_608, "call"); + var _return_1420 = bivd(s1); + log_event("JsInterpreter.js", 3283, ctx_push(ctx_608, [{key: "#RETURN_VALUE#", val: _return_1420}]), "return"); + return (_return_1420); + }()) + ; + log_event("JsInterpreter.js", 3285, ctx_push(ctx_608, [{key: "#RETURN_VALUE#", val: _return_1421}]), "return"); + return (_return_1421); + } else { + var _return_1419 = if_void((function () { + log_event("JsInterpreter.js", 3275, ctx_608, "call"); + var _return_1416 = + env_record_create_set_mutable_binding( + s1, c, l, vd, + Some(bconfig), + Coq_value_prim( + Coq_prim_undef()), + str); + log_event("JsInterpreter.js", 3274, ctx_push(ctx_608, [{key: "#RETURN_VALUE#", val: _return_1416}]), "return"); + return (_return_1416); + }()), function(s2) { + + var ctx_609 = ctx_push(ctx_608, [{key: "s2", val: s2}]); + log_event("JsInterpreter.js", 3281, ctx_609, "let"); + var _return_1418 = (function () { + log_event("JsInterpreter.js", 3277, ctx_609, "call"); + var _return_1417 = + bivd(s2); + log_event("JsInterpreter.js", 3276, ctx_push(ctx_609, [{key: "#RETURN_VALUE#", val: _return_1417}]), "return"); + return (_return_1417); + }()) + ; + log_event("JsInterpreter.js", 3278, ctx_push(ctx_609, [{key: "#RETURN_VALUE#", val: _return_1418}]), "return"); + return (_return_1418); + }); + log_event("JsInterpreter.js", 3282, ctx_push(ctx_608, [{key: "#RETURN_VALUE#", val: _return_1419}]), "return"); + return (_return_1419); + } + }); + log_event("JsInterpreter.js", 3290, ctx_push(ctx_607, [{key: "#RETURN_VALUE#", val: _return_1422}]), "return"); + return (_return_1422); + + } + +}; + +var execution_ctx_binding_inst = function (s, c, ct, funco, p, args) { + var ctx_610 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "ct", val: ct}, {key: "funco", val: funco}, {key: "p", val: p}, {key: "args", val: args}]); + log_event("JsInterpreter.js", 3428, ctx_610, "enter"); + var _switch_arg_1423 = c.execution_ctx_variable_env; + log_event("JsInterpreter.js", 3427, ctx_610, "switch"); + switch (_switch_arg_1423.tag) { + case "[]":log_event("JsInterpreter.js", 3302, ctx_610, "case"); + + var _return_1427 = (function () { + log_event("JsInterpreter.js", 3300, ctx_610, "call"); + var _return_1426 = function (s, m) { + var ctx_611 = ctx_push(ctx_610, [{key: "s", val: s}, {key: "m", val: m}]); + log_event("JsInterpreter.js", 3298, ctx_611, "enter"); + (function () { + log_event("JsInterpreter.js", 3297, ctx_611, "call"); + var _return_1425 = Debug.impossible_with_heap_because( + __LOC__, s, m); + log_event("JsInterpreter.js", 3296, ctx_push(ctx_611, [{key: "#RETURN_VALUE#", val: _return_1425}]), "return"); + return (_return_1425); + }()) + ; + var _return_1424 = Coq_result_impossible(); + log_event("JsInterpreter.js", 3295, ctx_push(ctx_611, [{key: "#RETURN_VALUE#", val: _return_1424}]), "return"); + return (_return_1424); }(s, + "Empty [execution_ctx_variable_env] in [execution_ctx_binding_inst]."); + log_event("JsInterpreter.js", 3299, ctx_push(ctx_610, [{key: "#RETURN_VALUE#", val: _return_1426}]), "return"); + return (_return_1426); + }()) + ; + log_event("JsInterpreter.js", 3301, ctx_push(ctx_610, [{key: "#RETURN_VALUE#", val: _return_1427}]), "return"); + return (_return_1427); + case "::": + var l = _switch_arg_1423.head, l0 = _switch_arg_1423.tail;var ctx_612 = ctx_push(ctx_610, [{key: "l", val: l}, {key: "l0", val: l0}]); + log_event("JsInterpreter.js", 3426, ctx_612, "case"); + + var str = prog_intro_strictness(p); + var ctx_613 = ctx_push(ctx_612, [{key: "str", val: str}]); + log_event("JsInterpreter.js", 3425, ctx_613, "let"); + var follow = function (s_2, names) { + var ctx_614 = ctx_push(ctx_613, [{key: "s_2", val: s_2}, {key: "names", val: names}]); + log_event("JsInterpreter.js", 3364, ctx_614, "enter"); + var bconfig = codetype_compare(ct, Coq_codetype_eval()); + var ctx_615 = ctx_push(ctx_614, [{key: "bconfig", val: bconfig}]); + log_event("JsInterpreter.js", 3363, ctx_615, "let"); + var fds = (function () { + log_event("JsInterpreter.js", 3304, ctx_615, "call"); + var _return_1428 = prog_funcdecl(p); + log_event("JsInterpreter.js", 3303, ctx_push(ctx_615, [{key: "#RETURN_VALUE#", val: _return_1428}]), "return"); + return (_return_1428); + }()) + ; + var ctx_616 = ctx_push(ctx_615, [{key: "fds", val: fds}]); + log_event("JsInterpreter.js", 3362, ctx_616, "let"); + var _return_1451 = if_void((function () { + log_event("JsInterpreter.js", 3306, ctx_616, "call"); + var _return_1429 = binding_inst_function_decls( + s_2, c, l, fds, str, + bconfig); + log_event("JsInterpreter.js", 3305, ctx_push(ctx_616, [{key: "#RETURN_VALUE#", val: _return_1429}]), "return"); + return (_return_1429); }()), function(s1) { + + var ctx_617 = ctx_push(ctx_616, [{key: "s1", val: s1}]); + log_event("JsInterpreter.js", 3360, ctx_617, "let"); + var _return_1450 = if_bool((function () { + log_event("JsInterpreter.js", 3308, ctx_617, "call"); + var _return_1430 = + env_record_has_binding( + s1, c, l, + "arguments"); + log_event("JsInterpreter.js", 3307, ctx_push(ctx_617, [{key: "#RETURN_VALUE#", val: _return_1430}]), "return"); + return (_return_1430); + }()), function(s2, + bdefined) { + + var ctx_618 = ctx_push(ctx_617, [{key: "s2", val: s2}, {key: "bdefined", val: bdefined}]); + log_event("JsInterpreter.js", 3356, ctx_618, "let"); + var follow2 = function (s10) { + var ctx_619 = ctx_push(ctx_618, [{key: "s10", val: s10}]); + log_event("JsInterpreter.js", 3315, ctx_619, "enter"); + var vds = (function () { + log_event("JsInterpreter.js", 3310, ctx_619, "call"); + var _return_1431 = + prog_vardecl(p); + log_event("JsInterpreter.js", 3309, ctx_push(ctx_619, [{key: "#RETURN_VALUE#", val: _return_1431}]), "return"); + return (_return_1431); + }()) + ; + var ctx_620 = ctx_push(ctx_619, [{key: "vds", val: vds}]); + log_event("JsInterpreter.js", 3314, ctx_620, "let"); + var _return_1433 = (function () { + log_event("JsInterpreter.js", 3312, ctx_620, "call"); + var _return_1432 = + binding_inst_var_decls( + s10, c, l, vds, + bconfig, str); + log_event("JsInterpreter.js", 3311, ctx_push(ctx_620, [{key: "#RETURN_VALUE#", val: _return_1432}]), "return"); + return (_return_1432); + }()) + ; + log_event("JsInterpreter.js", 3313, ctx_push(ctx_620, [{key: "#RETURN_VALUE#", val: _return_1433}]), "return"); + return (_return_1433); + + }; + var ctx_621 = ctx_push(ctx_618, [{key: "follow2", val: follow2}]); + log_event("JsInterpreter.js", 3353, ctx_621, "let"); + log_event("JsInterpreter.js", 3352, ctx_621, "switch"); + switch (ct.tag) { + case "Coq_codetype_func":log_event("JsInterpreter.js", 3343, ctx_621, "case"); + + log_event("JsInterpreter.js", 3342, ctx_621, "switch"); + switch (funco.tag) { + case "Some": + var func = funco.value;var ctx_622 = ctx_push(ctx_621, [{key: "func", val: func}]); + log_event("JsInterpreter.js", 3329, ctx_622, "case"); + + log_event("JsInterpreter.js", 3328, ctx_622, "if"); + if (bdefined) { + var _return_1439 = (function () { + log_event("JsInterpreter.js", 3326, ctx_622, "call"); + var _return_1438 = + follow2(s2); + log_event("JsInterpreter.js", 3325, ctx_push(ctx_622, [{key: "#RETURN_VALUE#", val: _return_1438}]), "return"); + return (_return_1438); + }()) + ; + log_event("JsInterpreter.js", 3327, ctx_push(ctx_622, [{key: "#RETURN_VALUE#", val: _return_1439}]), "return"); + return (_return_1439); + } else { + var _return_1437 = + if_void( + (function () { + log_event("JsInterpreter.js", 3317, ctx_622, "call"); + var _return_1434 = + binding_inst_arg_obj( + s2, c, + func, p, + names, + args, l); + log_event("JsInterpreter.js", 3316, ctx_push(ctx_622, [{key: "#RETURN_VALUE#", val: _return_1434}]), "return"); + return (_return_1434); + }()), + function(s3) { + + var ctx_623 = ctx_push(ctx_622, [{key: "s3", val: s3}]); + log_event("JsInterpreter.js", 3323, ctx_623, "let"); + var _return_1436 = (function () { + log_event("JsInterpreter.js", 3319, ctx_623, "call"); + var _return_1435 = + follow2( + s3); + log_event("JsInterpreter.js", 3318, ctx_push(ctx_623, [{key: "#RETURN_VALUE#", val: _return_1435}]), "return"); + return (_return_1435); + }()) + ; + log_event("JsInterpreter.js", 3320, ctx_push(ctx_623, [{key: "#RETURN_VALUE#", val: _return_1436}]), "return"); + return (_return_1436); + }); + log_event("JsInterpreter.js", 3324, ctx_push(ctx_622, [{key: "#RETURN_VALUE#", val: _return_1437}]), "return"); + return (_return_1437); + } + case "None":log_event("JsInterpreter.js", 3341, ctx_621, "case"); + + log_event("JsInterpreter.js", 3340, ctx_621, "if"); + if (bdefined) { + var _return_1445 = (function () { + log_event("JsInterpreter.js", 3338, ctx_621, "call"); + var _return_1444 = + follow2(s2); + log_event("JsInterpreter.js", 3337, ctx_push(ctx_621, [{key: "#RETURN_VALUE#", val: _return_1444}]), "return"); + return (_return_1444); + }()) + ; + log_event("JsInterpreter.js", 3339, ctx_push(ctx_621, [{key: "#RETURN_VALUE#", val: _return_1445}]), "return"); + return (_return_1445); + } else { + var _return_1443 = (function () { + log_event("JsInterpreter.js", 3335, ctx_621, "call"); + var _return_1442 = + function (s, m) { + var ctx_624 = ctx_push(ctx_621, [{key: "s", val: s}, {key: "m", val: m}]); + log_event("JsInterpreter.js", 3333, ctx_624, "enter"); + (function () { + log_event("JsInterpreter.js", 3332, ctx_624, "call"); + var _return_1441 = + Debug.impossible_with_heap_because( + __LOC__, + s, m); + log_event("JsInterpreter.js", 3331, ctx_push(ctx_624, [{key: "#RETURN_VALUE#", val: _return_1441}]), "return"); + return (_return_1441); + }()) + ; + var _return_1440 = + Coq_result_impossible( + ); + log_event("JsInterpreter.js", 3330, ctx_push(ctx_624, [{key: "#RETURN_VALUE#", val: _return_1440}]), "return"); + return (_return_1440); + }(s2, + "Weird `arguments' object in [execution_ctx_binding_inst]."); + log_event("JsInterpreter.js", 3334, ctx_push(ctx_621, [{key: "#RETURN_VALUE#", val: _return_1442}]), "return"); + return (_return_1442); + }()) + ; + log_event("JsInterpreter.js", 3336, ctx_push(ctx_621, [{key: "#RETURN_VALUE#", val: _return_1443}]), "return"); + return (_return_1443); + } + } + + case "Coq_codetype_global":log_event("JsInterpreter.js", 3347, ctx_621, "case"); + + var _return_1447 = (function () { + log_event("JsInterpreter.js", 3345, ctx_621, "call"); + var _return_1446 = + follow2(s2); + log_event("JsInterpreter.js", 3344, ctx_push(ctx_621, [{key: "#RETURN_VALUE#", val: _return_1446}]), "return"); + return (_return_1446); + }()) + ; + log_event("JsInterpreter.js", 3346, ctx_push(ctx_621, [{key: "#RETURN_VALUE#", val: _return_1447}]), "return"); + return (_return_1447); + case "Coq_codetype_eval":log_event("JsInterpreter.js", 3351, ctx_621, "case"); + + var _return_1449 = (function () { + log_event("JsInterpreter.js", 3349, ctx_621, "call"); + var _return_1448 = + follow2(s2); + log_event("JsInterpreter.js", 3348, ctx_push(ctx_621, [{key: "#RETURN_VALUE#", val: _return_1448}]), "return"); + return (_return_1448); + }()) + ; + log_event("JsInterpreter.js", 3350, ctx_push(ctx_621, [{key: "#RETURN_VALUE#", val: _return_1449}]), "return"); + return (_return_1449); + } + + + }); + log_event("JsInterpreter.js", 3357, ctx_push(ctx_617, [{key: "#RETURN_VALUE#", val: _return_1450}]), "return"); + return (_return_1450); + }); + log_event("JsInterpreter.js", 3361, ctx_push(ctx_616, [{key: "#RETURN_VALUE#", val: _return_1451}]), "return"); + return (_return_1451); + + + }; + var ctx_625 = ctx_push(ctx_613, [{key: "follow", val: follow}]); + log_event("JsInterpreter.js", 3424, ctx_625, "let"); + log_event("JsInterpreter.js", 3423, ctx_625, "switch"); + switch (ct.tag) { + case "Coq_codetype_func":log_event("JsInterpreter.js", 3394, ctx_625, "case"); + + log_event("JsInterpreter.js", 3393, ctx_625, "switch"); + switch (funco.tag) { + case "Some": + var func = funco.value;var ctx_626 = ctx_push(ctx_625, [{key: "func", val: func}]); + log_event("JsInterpreter.js", 3384, ctx_626, "case"); + + var _return_1458 = if_some((function () { + log_event("JsInterpreter.js", 3366, ctx_626, "call"); + var _return_1452 = run_object_method( + object_formal_parameters_, + s, func); + log_event("JsInterpreter.js", 3365, ctx_push(ctx_626, [{key: "#RETURN_VALUE#", val: _return_1452}]), "return"); + return (_return_1452); }()), + function(nameso) { + + var ctx_627 = ctx_push(ctx_626, [{key: "nameso", val: nameso}]); + log_event("JsInterpreter.js", 3382, ctx_627, "let"); + var _return_1457 = if_some(nameso, + function(names) { + + var ctx_628 = ctx_push(ctx_627, [{key: "names", val: names}]); + log_event("JsInterpreter.js", 3378, ctx_628, "let"); + var _return_1456 = + if_void( + (function () { + log_event("JsInterpreter.js", 3368, ctx_628, "call"); + var _return_1453 = + binding_inst_formal_params( + s, c, l, + args, + names, str); + log_event("JsInterpreter.js", 3367, ctx_push(ctx_628, [{key: "#RETURN_VALUE#", val: _return_1453}]), "return"); + return (_return_1453); + }()), + function(s_2) { + + var ctx_629 = ctx_push(ctx_628, [{key: "s_2", val: s_2}]); + log_event("JsInterpreter.js", 3374, ctx_629, "let"); + var _return_1455 = (function () { + log_event("JsInterpreter.js", 3370, ctx_629, "call"); + var _return_1454 = + follow(s_2, + names); + log_event("JsInterpreter.js", 3369, ctx_push(ctx_629, [{key: "#RETURN_VALUE#", val: _return_1454}]), "return"); + return (_return_1454); + }()) + ; + log_event("JsInterpreter.js", 3371, ctx_push(ctx_629, [{key: "#RETURN_VALUE#", val: _return_1455}]), "return"); + return (_return_1455); + }); + log_event("JsInterpreter.js", 3375, ctx_push(ctx_628, [{key: "#RETURN_VALUE#", val: _return_1456}]), "return"); + return (_return_1456); + }); + log_event("JsInterpreter.js", 3379, ctx_push(ctx_627, [{key: "#RETURN_VALUE#", val: _return_1457}]), "return"); + return (_return_1457); + }); + log_event("JsInterpreter.js", 3383, ctx_push(ctx_626, [{key: "#RETURN_VALUE#", val: _return_1458}]), "return"); + return (_return_1458); + case "None":log_event("JsInterpreter.js", 3392, ctx_625, "case"); + + var _return_1462 = (function () { + log_event("JsInterpreter.js", 3390, ctx_625, "call"); + var _return_1461 = function (s, m) { + var ctx_630 = ctx_push(ctx_625, [{key: "s", val: s}, {key: "m", val: m}]); + log_event("JsInterpreter.js", 3388, ctx_630, "enter"); + (function () { + log_event("JsInterpreter.js", 3387, ctx_630, "call"); + var _return_1460 = Debug.impossible_with_heap_because( + __LOC__, s, m); + log_event("JsInterpreter.js", 3386, ctx_push(ctx_630, [{key: "#RETURN_VALUE#", val: _return_1460}]), "return"); + return (_return_1460); + }()) + ; + var _return_1459 = Coq_result_impossible( + ); + log_event("JsInterpreter.js", 3385, ctx_push(ctx_630, [{key: "#RETURN_VALUE#", val: _return_1459}]), "return"); + return (_return_1459); }(s, + "Non coherent functionnal code type in [execution_ctx_binding_inst]."); + log_event("JsInterpreter.js", 3389, ctx_push(ctx_625, [{key: "#RETURN_VALUE#", val: _return_1461}]), "return"); + return (_return_1461); + }()) + ; + log_event("JsInterpreter.js", 3391, ctx_push(ctx_625, [{key: "#RETURN_VALUE#", val: _return_1462}]), "return"); + return (_return_1462); + } + + case "Coq_codetype_global":log_event("JsInterpreter.js", 3408, ctx_625, "case"); + + log_event("JsInterpreter.js", 3407, ctx_625, "switch"); + switch (funco.tag) { + case "Some": + var o = funco.value;var ctx_631 = ctx_push(ctx_625, [{key: "o", val: o}]); + log_event("JsInterpreter.js", 3402, ctx_631, "case"); + + var _return_1466 = (function () { + log_event("JsInterpreter.js", 3400, ctx_631, "call"); + var _return_1465 = function (s, m) { + var ctx_632 = ctx_push(ctx_631, [{key: "s", val: s}, {key: "m", val: m}]); + log_event("JsInterpreter.js", 3398, ctx_632, "enter"); + (function () { + log_event("JsInterpreter.js", 3397, ctx_632, "call"); + var _return_1464 = Debug.impossible_with_heap_because( + __LOC__, s, m); + log_event("JsInterpreter.js", 3396, ctx_push(ctx_632, [{key: "#RETURN_VALUE#", val: _return_1464}]), "return"); + return (_return_1464); + }()) + ; + var _return_1463 = Coq_result_impossible( + ); + log_event("JsInterpreter.js", 3395, ctx_push(ctx_632, [{key: "#RETURN_VALUE#", val: _return_1463}]), "return"); + return (_return_1463); }(s, + "Non coherent non-functionnal code type in [execution_ctx_binding_inst]."); + log_event("JsInterpreter.js", 3399, ctx_push(ctx_631, [{key: "#RETURN_VALUE#", val: _return_1465}]), "return"); + return (_return_1465); + }()) + ; + log_event("JsInterpreter.js", 3401, ctx_push(ctx_631, [{key: "#RETURN_VALUE#", val: _return_1466}]), "return"); + return (_return_1466); + case "None":log_event("JsInterpreter.js", 3406, ctx_625, "case"); + + var _return_1468 = (function () { + log_event("JsInterpreter.js", 3404, ctx_625, "call"); + var _return_1467 = follow(s, mk_nil()); + log_event("JsInterpreter.js", 3403, ctx_push(ctx_625, [{key: "#RETURN_VALUE#", val: _return_1467}]), "return"); + return (_return_1467); + }()) + ; + log_event("JsInterpreter.js", 3405, ctx_push(ctx_625, [{key: "#RETURN_VALUE#", val: _return_1468}]), "return"); + return (_return_1468); + } + + case "Coq_codetype_eval":log_event("JsInterpreter.js", 3422, ctx_625, "case"); + + log_event("JsInterpreter.js", 3421, ctx_625, "switch"); + switch (funco.tag) { + case "Some": + var o = funco.value;var ctx_633 = ctx_push(ctx_625, [{key: "o", val: o}]); + log_event("JsInterpreter.js", 3416, ctx_633, "case"); + + var _return_1472 = (function () { + log_event("JsInterpreter.js", 3414, ctx_633, "call"); + var _return_1471 = function (s, m) { + var ctx_634 = ctx_push(ctx_633, [{key: "s", val: s}, {key: "m", val: m}]); + log_event("JsInterpreter.js", 3412, ctx_634, "enter"); + (function () { + log_event("JsInterpreter.js", 3411, ctx_634, "call"); + var _return_1470 = Debug.impossible_with_heap_because( + __LOC__, s, m); + log_event("JsInterpreter.js", 3410, ctx_push(ctx_634, [{key: "#RETURN_VALUE#", val: _return_1470}]), "return"); + return (_return_1470); + }()) + ; + var _return_1469 = Coq_result_impossible( + ); + log_event("JsInterpreter.js", 3409, ctx_push(ctx_634, [{key: "#RETURN_VALUE#", val: _return_1469}]), "return"); + return (_return_1469); }(s, + "Non coherent non-functionnal code type in [execution_ctx_binding_inst]."); + log_event("JsInterpreter.js", 3413, ctx_push(ctx_633, [{key: "#RETURN_VALUE#", val: _return_1471}]), "return"); + return (_return_1471); + }()) + ; + log_event("JsInterpreter.js", 3415, ctx_push(ctx_633, [{key: "#RETURN_VALUE#", val: _return_1472}]), "return"); + return (_return_1472); + case "None":log_event("JsInterpreter.js", 3420, ctx_625, "case"); + + var _return_1474 = (function () { + log_event("JsInterpreter.js", 3418, ctx_625, "call"); + var _return_1473 = follow(s, mk_nil()); + log_event("JsInterpreter.js", 3417, ctx_push(ctx_625, [{key: "#RETURN_VALUE#", val: _return_1473}]), "return"); + return (_return_1473); + }()) + ; + log_event("JsInterpreter.js", 3419, ctx_push(ctx_625, [{key: "#RETURN_VALUE#", val: _return_1474}]), "return"); + return (_return_1474); + } + + } + + + + } + +}; + +var entering_func_code = function (s, c, lf, vthis, args) { + var ctx_635 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "lf", val: lf}, {key: "vthis", val: vthis}, {key: "args", val: args}]); + log_event("JsInterpreter.js", 3517, ctx_635, "enter"); + var _return_1506 = if_some((function () { + log_event("JsInterpreter.js", 3430, ctx_635, "call"); + var _return_1475 = run_object_method(object_code_, + s, lf); + log_event("JsInterpreter.js", 3429, ctx_push(ctx_635, [{key: "#RETURN_VALUE#", val: _return_1475}]), "return"); + return (_return_1475); }()), function(bdo) { + + var ctx_636 = ctx_push(ctx_635, [{key: "bdo", val: bdo}]); + log_event("JsInterpreter.js", 3515, ctx_636, "let"); + var _return_1505 = if_some(bdo, function(bd) { + + var ctx_637 = ctx_push(ctx_636, [{key: "bd", val: bd}]); + log_event("JsInterpreter.js", 3511, ctx_637, "let"); + var str = funcbody_is_strict( + bd); + var ctx_638 = ctx_push(ctx_637, [{key: "str", val: str}]); + log_event("JsInterpreter.js", 3508, ctx_638, "let"); + var follow = function (s_2, vthis_2) { + var ctx_639 = ctx_push(ctx_638, [{key: "s_2", val: s_2}, {key: "vthis_2", val: vthis_2}]); + log_event("JsInterpreter.js", 3457, ctx_639, "enter"); + var _return_1484 = + if_some((function () { + log_event("JsInterpreter.js", 3432, ctx_639, "call"); + var _return_1476 = + run_object_method( + object_scope_, s_2, + lf); + log_event("JsInterpreter.js", 3431, ctx_push(ctx_639, [{key: "#RETURN_VALUE#", val: _return_1476}]), "return"); + return (_return_1476); + }()), function(lexo) { + + var ctx_640 = ctx_push(ctx_639, [{key: "lexo", val: lexo}]); + log_event("JsInterpreter.js", 3455, ctx_640, "let"); + var _return_1483 = + if_some(lexo, + function(lex) { + + var ctx_641 = ctx_push(ctx_640, [{key: "lex", val: lex}]); + log_event("JsInterpreter.js", 3451, ctx_641, "let"); + var p = (function () { + log_event("JsInterpreter.js", 3434, ctx_641, "call"); + var _return_1477 = + lexical_env_alloc_decl( + s_2, lex); + log_event("JsInterpreter.js", 3433, ctx_push(ctx_641, [{key: "#RETURN_VALUE#", val: _return_1477}]), "return"); + return (_return_1477); + }()) + ; + var ctx_642 = ctx_push(ctx_641, [{key: "p", val: p}]); + log_event("JsInterpreter.js", 3448, ctx_642, "let"); + var lex_2 = p[0], + s1 = p[1]; + var ctx_643 = ctx_push(ctx_642, [{key: "lex_2", val: lex_2}, {key: "s1", val: s1}]); + log_event("JsInterpreter.js", 3447, ctx_643, "let"); + var c_2 = (function () { + log_event("JsInterpreter.js", 3436, ctx_643, "call"); + var _return_1478 = + execution_ctx_intro_same( + lex_2, vthis_2, + str); + log_event("JsInterpreter.js", 3435, ctx_push(ctx_643, [{key: "#RETURN_VALUE#", val: _return_1478}]), "return"); + return (_return_1478); + }()) + ; + var ctx_644 = ctx_push(ctx_643, [{key: "c_2", val: c_2}]); + log_event("JsInterpreter.js", 3446, ctx_644, "let"); + var _return_1482 = + if_void( + (function () { + log_event("JsInterpreter.js", 3438, ctx_644, "call"); + var _return_1479 = + execution_ctx_binding_inst( + s1, c_2, + Coq_codetype_func( + ), + Some(lf), + funcbody_prog( + bd), args); + log_event("JsInterpreter.js", 3437, ctx_push(ctx_644, [{key: "#RETURN_VALUE#", val: _return_1479}]), "return"); + return (_return_1479); + }()), + function(s2) { + + var ctx_645 = ctx_push(ctx_644, [{key: "s2", val: s2}]); + log_event("JsInterpreter.js", 3444, ctx_645, "let"); + var _return_1481 = (function () { + log_event("JsInterpreter.js", 3440, ctx_645, "call"); + var _return_1480 = + run_call_default( + s2, c_2, + lf); + log_event("JsInterpreter.js", 3439, ctx_push(ctx_645, [{key: "#RETURN_VALUE#", val: _return_1480}]), "return"); + return (_return_1480); + }()) + ; + log_event("JsInterpreter.js", 3441, ctx_push(ctx_645, [{key: "#RETURN_VALUE#", val: _return_1481}]), "return"); + return (_return_1481); + }); + log_event("JsInterpreter.js", 3445, ctx_push(ctx_644, [{key: "#RETURN_VALUE#", val: _return_1482}]), "return"); + return (_return_1482); + + + + }); + log_event("JsInterpreter.js", 3452, ctx_push(ctx_640, [{key: "#RETURN_VALUE#", val: _return_1483}]), "return"); + return (_return_1483); + }); + log_event("JsInterpreter.js", 3456, ctx_push(ctx_639, [{key: "#RETURN_VALUE#", val: _return_1484}]), "return"); + return (_return_1484); + }; + var ctx_646 = ctx_push(ctx_638, [{key: "follow", val: follow}]); + log_event("JsInterpreter.js", 3507, ctx_646, "let"); + log_event("JsInterpreter.js", 3506, ctx_646, "if"); + if (str) { + var _return_1504 = (function () { + log_event("JsInterpreter.js", 3504, ctx_646, "call"); + var _return_1503 = + follow(s, vthis); + log_event("JsInterpreter.js", 3503, ctx_push(ctx_646, [{key: "#RETURN_VALUE#", val: _return_1503}]), "return"); + return (_return_1503); + }()) + ; + log_event("JsInterpreter.js", 3505, ctx_push(ctx_646, [{key: "#RETURN_VALUE#", val: _return_1504}]), "return"); + return (_return_1504); + } else { + log_event("JsInterpreter.js", 3502, ctx_646, "switch"); + switch (vthis.tag) { + case "Coq_value_prim": + var p = vthis.value;var ctx_647 = ctx_push(ctx_646, [{key: "p", val: p}]); + log_event("JsInterpreter.js", 3497, ctx_647, "case"); + + log_event("JsInterpreter.js", 3496, ctx_647, "switch"); + switch (p.tag) { + case "Coq_prim_undef":log_event("JsInterpreter.js", 3461, ctx_647, "case"); + + var _return_1486 = (function () { + log_event("JsInterpreter.js", 3459, ctx_647, "call"); + var _return_1485 = + follow(s, + Coq_value_object( + Coq_object_loc_prealloc( + Coq_prealloc_global( + )))); + log_event("JsInterpreter.js", 3458, ctx_push(ctx_647, [{key: "#RETURN_VALUE#", val: _return_1485}]), "return"); + return (_return_1485); + }()) + ; + log_event("JsInterpreter.js", 3460, ctx_push(ctx_647, [{key: "#RETURN_VALUE#", val: _return_1486}]), "return"); + return (_return_1486); + case "Coq_prim_null":log_event("JsInterpreter.js", 3465, ctx_647, "case"); + + var _return_1488 = (function () { + log_event("JsInterpreter.js", 3463, ctx_647, "call"); + var _return_1487 = + follow(s, + Coq_value_object( + Coq_object_loc_prealloc( + Coq_prealloc_global( + )))); + log_event("JsInterpreter.js", 3462, ctx_push(ctx_647, [{key: "#RETURN_VALUE#", val: _return_1487}]), "return"); + return (_return_1487); + }()) + ; + log_event("JsInterpreter.js", 3464, ctx_push(ctx_647, [{key: "#RETURN_VALUE#", val: _return_1488}]), "return"); + return (_return_1488); + case "Coq_prim_bool": + var b = p.value;var ctx_648 = ctx_push(ctx_647, [{key: "b", val: b}]); + log_event("JsInterpreter.js", 3475, ctx_648, "case"); + + var _return_1492 = + if_value( + (function () { + log_event("JsInterpreter.js", 3467, ctx_648, "call"); + var _return_1489 = + to_object(s, + vthis); + log_event("JsInterpreter.js", 3466, ctx_push(ctx_648, [{key: "#RETURN_VALUE#", val: _return_1489}]), "return"); + return (_return_1489); + }()), + function(s2, v) { + + var ctx_649 = ctx_push(ctx_648, [{key: "s2", val: s2}, {key: "v", val: v}]); + log_event("JsInterpreter.js", 3473, ctx_649, "let"); + var _return_1491 = (function () { + log_event("JsInterpreter.js", 3469, ctx_649, "call"); + var _return_1490 = + follow(s2, v); + log_event("JsInterpreter.js", 3468, ctx_push(ctx_649, [{key: "#RETURN_VALUE#", val: _return_1490}]), "return"); + return (_return_1490); + }()) + ; + log_event("JsInterpreter.js", 3470, ctx_push(ctx_649, [{key: "#RETURN_VALUE#", val: _return_1491}]), "return"); + return (_return_1491); + }); + log_event("JsInterpreter.js", 3474, ctx_push(ctx_648, [{key: "#RETURN_VALUE#", val: _return_1492}]), "return"); + return (_return_1492); + case "Coq_prim_number": + var n = p.value;var ctx_650 = ctx_push(ctx_647, [{key: "n", val: n}]); + log_event("JsInterpreter.js", 3485, ctx_650, "case"); + + var _return_1496 = + if_value( + (function () { + log_event("JsInterpreter.js", 3477, ctx_650, "call"); + var _return_1493 = + to_object(s, + vthis); + log_event("JsInterpreter.js", 3476, ctx_push(ctx_650, [{key: "#RETURN_VALUE#", val: _return_1493}]), "return"); + return (_return_1493); + }()), + function(s2, v) { + + var ctx_651 = ctx_push(ctx_650, [{key: "s2", val: s2}, {key: "v", val: v}]); + log_event("JsInterpreter.js", 3483, ctx_651, "let"); + var _return_1495 = (function () { + log_event("JsInterpreter.js", 3479, ctx_651, "call"); + var _return_1494 = + follow(s2, v); + log_event("JsInterpreter.js", 3478, ctx_push(ctx_651, [{key: "#RETURN_VALUE#", val: _return_1494}]), "return"); + return (_return_1494); + }()) + ; + log_event("JsInterpreter.js", 3480, ctx_push(ctx_651, [{key: "#RETURN_VALUE#", val: _return_1495}]), "return"); + return (_return_1495); + }); + log_event("JsInterpreter.js", 3484, ctx_push(ctx_650, [{key: "#RETURN_VALUE#", val: _return_1496}]), "return"); + return (_return_1496); + case "Coq_prim_string": + var s0 = p.value;var ctx_652 = ctx_push(ctx_647, [{key: "s0", val: s0}]); + log_event("JsInterpreter.js", 3495, ctx_652, "case"); + + var _return_1500 = + if_value( + (function () { + log_event("JsInterpreter.js", 3487, ctx_652, "call"); + var _return_1497 = + to_object(s, + vthis); + log_event("JsInterpreter.js", 3486, ctx_push(ctx_652, [{key: "#RETURN_VALUE#", val: _return_1497}]), "return"); + return (_return_1497); + }()), + function(s2, v) { + + var ctx_653 = ctx_push(ctx_652, [{key: "s2", val: s2}, {key: "v", val: v}]); + log_event("JsInterpreter.js", 3493, ctx_653, "let"); + var _return_1499 = (function () { + log_event("JsInterpreter.js", 3489, ctx_653, "call"); + var _return_1498 = + follow(s2, v); + log_event("JsInterpreter.js", 3488, ctx_push(ctx_653, [{key: "#RETURN_VALUE#", val: _return_1498}]), "return"); + return (_return_1498); + }()) + ; + log_event("JsInterpreter.js", 3490, ctx_push(ctx_653, [{key: "#RETURN_VALUE#", val: _return_1499}]), "return"); + return (_return_1499); + }); + log_event("JsInterpreter.js", 3494, ctx_push(ctx_652, [{key: "#RETURN_VALUE#", val: _return_1500}]), "return"); + return (_return_1500); + } + + case "Coq_value_object": + var lthis = vthis.value;var ctx_654 = ctx_push(ctx_646, [{key: "lthis", val: lthis}]); + log_event("JsInterpreter.js", 3501, ctx_654, "case"); + + var _return_1502 = (function () { + log_event("JsInterpreter.js", 3499, ctx_654, "call"); + var _return_1501 = + follow(s, vthis); + log_event("JsInterpreter.js", 3498, ctx_push(ctx_654, [{key: "#RETURN_VALUE#", val: _return_1501}]), "return"); + return (_return_1501); + }()) + ; + log_event("JsInterpreter.js", 3500, ctx_push(ctx_654, [{key: "#RETURN_VALUE#", val: _return_1502}]), "return"); + return (_return_1502); + } + + } + + + }); + log_event("JsInterpreter.js", 3512, ctx_push(ctx_636, [{key: "#RETURN_VALUE#", val: _return_1505}]), "return"); + return (_return_1505); + }); + log_event("JsInterpreter.js", 3516, ctx_push(ctx_635, [{key: "#RETURN_VALUE#", val: _return_1506}]), "return"); + return (_return_1506); +}; + +var run_object_get_own_prop = function (s, c, l, x) { + var ctx_655 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "l", val: l}, {key: "x", val: x}]); + log_event("JsInterpreter.js", 3658, ctx_655, "enter"); + var _return_1559 = if_some((function () { + log_event("JsInterpreter.js", 3519, ctx_655, "call"); + var _return_1507 = run_object_method( + object_get_own_prop_, s, l); + log_event("JsInterpreter.js", 3518, ctx_push(ctx_655, [{key: "#RETURN_VALUE#", val: _return_1507}]), "return"); + return (_return_1507); }()), function(b) { + + var ctx_656 = ctx_push(ctx_655, [{key: "b", val: b}]); + log_event("JsInterpreter.js", 3656, ctx_656, "let"); + var def = function (s_2) { + var ctx_657 = ctx_push(ctx_656, [{key: "s_2", val: s_2}]); + log_event("JsInterpreter.js", 3535, ctx_657, "enter"); + var _return_1514 = if_some((function () { + log_event("JsInterpreter.js", 3521, ctx_657, "call"); + var _return_1508 = + run_object_method( + object_properties_, s_2, + l); + log_event("JsInterpreter.js", 3520, ctx_push(ctx_657, [{key: "#RETURN_VALUE#", val: _return_1508}]), "return"); + return (_return_1508); }()) + , function(p) { + + var ctx_658 = ctx_push(ctx_657, [{key: "p", val: p}]); + log_event("JsInterpreter.js", 3533, ctx_658, "let"); + var _return_1513 = + res_spec(s_2, + (function () { + log_event("JsInterpreter.js", 3529, ctx_658, "call"); + var _return_1512 = + ifx_some_or_default( + (function () { + log_event("JsInterpreter.js", 3525, ctx_658, "call"); + var _return_1510 = + convert_option_attributes( + (function () { + log_event("JsInterpreter.js", 3523, ctx_658, "call"); + var _return_1509 = + HeapStr.read_option( + p, x); + log_event("JsInterpreter.js", 3522, ctx_push(ctx_658, [{key: "#RETURN_VALUE#", val: _return_1509}]), "return"); + return (_return_1509); + }())); + log_event("JsInterpreter.js", 3524, ctx_push(ctx_658, [{key: "#RETURN_VALUE#", val: _return_1510}]), "return"); + return (_return_1510); + }()), + Coq_full_descriptor_undef( + ), function (x) { + var ctx_659 = ctx_push(ctx_658, [{key: "x", val: x}]); + log_event("JsInterpreter.js", 3527, ctx_659, "enter"); + var _return_1511 = x; + log_event("JsInterpreter.js", 3526, ctx_push(ctx_659, [{key: "#RETURN_VALUE#", val: _return_1511}]), "return"); + return (_return_1511); + }); + log_event("JsInterpreter.js", 3528, ctx_push(ctx_658, [{key: "#RETURN_VALUE#", val: _return_1512}]), "return"); + return (_return_1512); + }())); + log_event("JsInterpreter.js", 3530, ctx_push(ctx_658, [{key: "#RETURN_VALUE#", val: _return_1513}]), "return"); + return (_return_1513); + }); + log_event("JsInterpreter.js", 3534, ctx_push(ctx_657, [{key: "#RETURN_VALUE#", val: _return_1514}]), "return"); + return (_return_1514); + }; + var ctx_660 = ctx_push(ctx_656, [{key: "def", val: def}]); + log_event("JsInterpreter.js", 3653, ctx_660, "let"); + log_event("JsInterpreter.js", 3652, ctx_660, "switch"); + switch (b.tag) { + case "Coq_builtin_get_own_prop_default":log_event("JsInterpreter.js", 3539, ctx_660, "case"); + + var _return_1516 = (function () { + log_event("JsInterpreter.js", 3537, ctx_660, "call"); + var _return_1515 = def(s); + log_event("JsInterpreter.js", 3536, ctx_push(ctx_660, [{key: "#RETURN_VALUE#", val: _return_1515}]), "return"); + return (_return_1515); + }()) + ; + log_event("JsInterpreter.js", 3538, ctx_push(ctx_660, [{key: "#RETURN_VALUE#", val: _return_1516}]), "return"); + return (_return_1516); + case "Coq_builtin_get_own_prop_args_obj":log_event("JsInterpreter.js", 3594, ctx_660, "case"); + + var _return_1535 = if_run((function () { + log_event("JsInterpreter.js", 3541, ctx_660, "call"); + var _return_1517 = + def(s); + log_event("JsInterpreter.js", 3540, ctx_push(ctx_660, [{key: "#RETURN_VALUE#", val: _return_1517}]), "return"); + return (_return_1517); + }()), function(s1, d) { + + var ctx_661 = ctx_push(ctx_660, [{key: "s1", val: s1}, {key: "d", val: d}]); + log_event("JsInterpreter.js", 3592, ctx_661, "let"); + log_event("JsInterpreter.js", 3589, ctx_661, "switch"); + switch (d.tag) { + case "Coq_full_descriptor_undef":log_event("JsInterpreter.js", 3543, ctx_661, "case"); + + var _return_1518 = + res_spec(s1, + Coq_full_descriptor_undef( + )); + log_event("JsInterpreter.js", 3542, ctx_push(ctx_661, [{key: "#RETURN_VALUE#", val: _return_1518}]), "return"); + return (_return_1518); + case "Coq_full_descriptor_some": + var a = d.value;var ctx_662 = ctx_push(ctx_661, [{key: "a", val: a}]); + log_event("JsInterpreter.js", 3588, ctx_662, "case"); + + var _return_1534 = + if_some( + (function () { + log_event("JsInterpreter.js", 3545, ctx_662, "call"); + var _return_1519 = + run_object_method( + object_parameter_map_, + s1, l); + log_event("JsInterpreter.js", 3544, ctx_push(ctx_662, [{key: "#RETURN_VALUE#", val: _return_1519}]), "return"); + return (_return_1519); + }()), + function(lmapo) { + + var ctx_663 = ctx_push(ctx_662, [{key: "lmapo", val: lmapo}]); + log_event("JsInterpreter.js", 3586, ctx_663, "let"); + var _return_1533 = + if_some(lmapo, + function(lmap) { + + var ctx_664 = ctx_push(ctx_663, [{key: "lmap", val: lmap}]); + log_event("JsInterpreter.js", 3582, ctx_664, "let"); + var _return_1532 = + if_run( + (function () { + log_event("JsInterpreter.js", 3547, ctx_664, "call"); + var _return_1520 = + run_object_get_own_prop( + s1, c, + lmap, x); + log_event("JsInterpreter.js", 3546, ctx_push(ctx_664, [{key: "#RETURN_VALUE#", val: _return_1520}]), "return"); + return (_return_1520); + }()), + function(s2, + d0) { + + var ctx_665 = ctx_push(ctx_664, [{key: "s2", val: s2}, {key: "d0", val: d0}]); + log_event("JsInterpreter.js", 3578, ctx_665, "let"); + var follow = function (s_2, a0) { + var ctx_666 = ctx_push(ctx_665, [{key: "s_2", val: s_2}, {key: "a0", val: a0}]); + log_event("JsInterpreter.js", 3549, ctx_666, "enter"); + var _return_1521 = + res_spec( + s_2, + Coq_full_descriptor_some( + a0)); + log_event("JsInterpreter.js", 3548, ctx_push(ctx_666, [{key: "#RETURN_VALUE#", val: _return_1521}]), "return"); + return (_return_1521); + }; + var ctx_667 = ctx_push(ctx_665, [{key: "follow", val: follow}]); + log_event("JsInterpreter.js", 3575, ctx_667, "let"); + log_event("JsInterpreter.js", 3574, ctx_667, "switch"); + switch (d0.tag) { + case "Coq_full_descriptor_undef":log_event("JsInterpreter.js", 3553, ctx_667, "case"); + + var _return_1523 = (function () { + log_event("JsInterpreter.js", 3551, ctx_667, "call"); + var _return_1522 = + follow( + s2, a); + log_event("JsInterpreter.js", 3550, ctx_push(ctx_667, [{key: "#RETURN_VALUE#", val: _return_1522}]), "return"); + return (_return_1522); + }()) + ; + log_event("JsInterpreter.js", 3552, ctx_push(ctx_667, [{key: "#RETURN_VALUE#", val: _return_1523}]), "return"); + return (_return_1523); + case "Coq_full_descriptor_some": + var amap = d0.value;var ctx_668 = ctx_push(ctx_667, [{key: "amap", val: amap}]); + log_event("JsInterpreter.js", 3573, ctx_668, "case"); + + var _return_1531 = + if_value( + (function () { + log_event("JsInterpreter.js", 3555, ctx_668, "call"); + var _return_1524 = + run_object_get( + s2, c, + lmap, x); + log_event("JsInterpreter.js", 3554, ctx_push(ctx_668, [{key: "#RETURN_VALUE#", val: _return_1524}]), "return"); + return (_return_1524); + }()), + function(s3, + v) { + + var ctx_669 = ctx_push(ctx_668, [{key: "s3", val: s3}, {key: "v", val: v}]); + log_event("JsInterpreter.js", 3571, ctx_669, "let"); + log_event("JsInterpreter.js", 3568, ctx_669, "switch"); + switch (a.tag) { + case "Coq_attributes_data_of": + var ad = a.value;var ctx_670 = ctx_push(ctx_669, [{key: "ad", val: ad}]); + log_event("JsInterpreter.js", 3559, ctx_670, "case"); + + var _return_1526 = (function () { + log_event("JsInterpreter.js", 3557, ctx_670, "call"); + var _return_1525 = + follow( + s3, + Coq_attributes_data_of( + attributes_data_with_value( + ad, v))); + log_event("JsInterpreter.js", 3556, ctx_push(ctx_670, [{key: "#RETURN_VALUE#", val: _return_1525}]), "return"); + return (_return_1525); + }()) + ; + log_event("JsInterpreter.js", 3558, ctx_push(ctx_670, [{key: "#RETURN_VALUE#", val: _return_1526}]), "return"); + return (_return_1526); + case "Coq_attributes_accessor_of": + var aa = a.value;var ctx_671 = ctx_push(ctx_669, [{key: "aa", val: aa}]); + log_event("JsInterpreter.js", 3567, ctx_671, "case"); + + var _return_1530 = (function () { + log_event("JsInterpreter.js", 3565, ctx_671, "call"); + var _return_1529 = + function (s, m) { + var ctx_672 = ctx_push(ctx_671, [{key: "s", val: s}, {key: "m", val: m}]); + log_event("JsInterpreter.js", 3563, ctx_672, "enter"); + (function () { + log_event("JsInterpreter.js", 3562, ctx_672, "call"); + var _return_1528 = + Debug.impossible_with_heap_because( + __LOC__, + s, m); + log_event("JsInterpreter.js", 3561, ctx_push(ctx_672, [{key: "#RETURN_VALUE#", val: _return_1528}]), "return"); + return (_return_1528); + }()) + ; + var _return_1527 = + Coq_result_impossible( + ); + log_event("JsInterpreter.js", 3560, ctx_push(ctx_672, [{key: "#RETURN_VALUE#", val: _return_1527}]), "return"); + return (_return_1527); + }(s3, + "[run_object_get_own_prop]: received an accessor property descriptor in a point where the specification suppose it never happens."); + log_event("JsInterpreter.js", 3564, ctx_push(ctx_671, [{key: "#RETURN_VALUE#", val: _return_1529}]), "return"); + return (_return_1529); + }()) + ; + log_event("JsInterpreter.js", 3566, ctx_push(ctx_671, [{key: "#RETURN_VALUE#", val: _return_1530}]), "return"); + return (_return_1530); + } + + }); + log_event("JsInterpreter.js", 3572, ctx_push(ctx_668, [{key: "#RETURN_VALUE#", val: _return_1531}]), "return"); + return (_return_1531); + } + + + }); + log_event("JsInterpreter.js", 3579, ctx_push(ctx_664, [{key: "#RETURN_VALUE#", val: _return_1532}]), "return"); + return (_return_1532); + }); + log_event("JsInterpreter.js", 3583, ctx_push(ctx_663, [{key: "#RETURN_VALUE#", val: _return_1533}]), "return"); + return (_return_1533); + }); + log_event("JsInterpreter.js", 3587, ctx_push(ctx_662, [{key: "#RETURN_VALUE#", val: _return_1534}]), "return"); + return (_return_1534); + } + + }); + log_event("JsInterpreter.js", 3593, ctx_push(ctx_660, [{key: "#RETURN_VALUE#", val: _return_1535}]), "return"); + return (_return_1535); + case "Coq_builtin_get_own_prop_string":log_event("JsInterpreter.js", 3651, ctx_660, "case"); + + var _return_1558 = if_run((function () { + log_event("JsInterpreter.js", 3596, ctx_660, "call"); + var _return_1536 = + def(s); + log_event("JsInterpreter.js", 3595, ctx_push(ctx_660, [{key: "#RETURN_VALUE#", val: _return_1536}]), "return"); + return (_return_1536); + }()), function(s0, d) { + + var ctx_673 = ctx_push(ctx_660, [{key: "s0", val: s0}, {key: "d", val: d}]); + log_event("JsInterpreter.js", 3649, ctx_673, "let"); + log_event("JsInterpreter.js", 3646, ctx_673, "switch"); + switch (d.tag) { + case "Coq_full_descriptor_undef":log_event("JsInterpreter.js", 3643, ctx_673, "case"); + + var _return_1556 = + if_run((function () { + log_event("JsInterpreter.js", 3598, ctx_673, "call"); + var _return_1537 = + to_int32(s0, c, + Coq_value_prim( + Coq_prim_string( + x))); + log_event("JsInterpreter.js", 3597, ctx_push(ctx_673, [{key: "#RETURN_VALUE#", val: _return_1537}]), "return"); + return (_return_1537); + }()), function(s1, + k) { + + var ctx_674 = ctx_push(ctx_673, [{key: "s1", val: s1}, {key: "k", val: k}]); + log_event("JsInterpreter.js", 3641, ctx_674, "let"); + var _return_1555 = + if_string( + (function () { + log_event("JsInterpreter.js", 3602, ctx_674, "call"); + var _return_1539 = + to_string(s1, + c, + Coq_value_prim( + Coq_prim_number( + (function () { + log_event("JsInterpreter.js", 3600, ctx_674, "call"); + var _return_1538 = + JsNumber.absolute( + k); + log_event("JsInterpreter.js", 3599, ctx_push(ctx_674, [{key: "#RETURN_VALUE#", val: _return_1538}]), "return"); + return (_return_1538); + }())))); + log_event("JsInterpreter.js", 3601, ctx_push(ctx_674, [{key: "#RETURN_VALUE#", val: _return_1539}]), "return"); + return (_return_1539); + }()), + function(s2, + s3) { + + var ctx_675 = ctx_push(ctx_674, [{key: "s2", val: s2}, {key: "s3", val: s3}]); + log_event("JsInterpreter.js", 3637, ctx_675, "let"); + var _if_arg_1540 = (function () { + log_event("JsInterpreter.js", 3606, ctx_675, "call"); + var _return_1542 = + !( + (function () { + log_event("JsInterpreter.js", 3604, ctx_675, "call"); + var _return_1541 = + string_eq( + x, s3); + log_event("JsInterpreter.js", 3603, ctx_push(ctx_675, [{key: "#RETURN_VALUE#", val: _return_1541}]), "return"); + return (_return_1541); + }())); + log_event("JsInterpreter.js", 3605, ctx_push(ctx_675, [{key: "#RETURN_VALUE#", val: _return_1542}]), "return"); + return (_return_1542); + }()) + ; + log_event("JsInterpreter.js", 3634, ctx_675, "if"); + if (_if_arg_1540) { + var _return_1554 = + res_spec( + s2, + Coq_full_descriptor_undef( + )); + log_event("JsInterpreter.js", 3633, ctx_push(ctx_675, [{key: "#RETURN_VALUE#", val: _return_1554}]), "return"); + return (_return_1554); + } else { + var _return_1553 = + if_string( + (function () { + log_event("JsInterpreter.js", 3608, ctx_675, "call"); + var _return_1543 = + run_object_prim_value( + s2, l); + log_event("JsInterpreter.js", 3607, ctx_push(ctx_675, [{key: "#RETURN_VALUE#", val: _return_1543}]), "return"); + return (_return_1543); + }()), + function(s4, + str) { + + var ctx_676 = ctx_push(ctx_675, [{key: "s4", val: s4}, {key: "str", val: str}]); + log_event("JsInterpreter.js", 3631, ctx_676, "let"); + var _return_1552 = + if_run( + (function () { + log_event("JsInterpreter.js", 3610, ctx_676, "call"); + var _return_1544 = + to_int32( + s4, c, + Coq_value_prim( + Coq_prim_string( + x))); + log_event("JsInterpreter.js", 3609, ctx_push(ctx_676, [{key: "#RETURN_VALUE#", val: _return_1544}]), "return"); + return (_return_1544); + }()), + function(s5, + k0) { + + var ctx_677 = ctx_push(ctx_676, [{key: "s5", val: s5}, {key: "k0", val: k0}]); + log_event("JsInterpreter.js", 3627, ctx_677, "let"); + var len = + number_of_int( + (function () { + log_event("JsInterpreter.js", 3612, ctx_677, "call"); + var _return_1545 = + strlength( + str); + log_event("JsInterpreter.js", 3611, ctx_push(ctx_677, [{key: "#RETURN_VALUE#", val: _return_1545}]), "return"); + return (_return_1545); + }())); + var ctx_678 = ctx_push(ctx_677, [{key: "len", val: len}]); + log_event("JsInterpreter.js", 3624, ctx_678, "let"); + var _if_arg_1546 = (function () { + log_event("JsInterpreter.js", 3614, ctx_678, "call"); + var _return_1547 = + le_int_decidable( + len, k0); + log_event("JsInterpreter.js", 3613, ctx_push(ctx_678, [{key: "#RETURN_VALUE#", val: _return_1547}]), "return"); + return (_return_1547); + }()) + ; + log_event("JsInterpreter.js", 3623, ctx_678, "if"); + if (_if_arg_1546) { + var _return_1551 = + res_spec( + s5, + Coq_full_descriptor_undef( + )); + log_event("JsInterpreter.js", 3622, ctx_push(ctx_678, [{key: "#RETURN_VALUE#", val: _return_1551}]), "return"); + return (_return_1551); + } else { + var resultStr = (function () { + log_event("JsInterpreter.js", 3618, ctx_678, "call"); + var _return_1549 = + string_sub( + str, + (function () { + log_event("JsInterpreter.js", 3616, ctx_678, "call"); + var _return_1548 = + int_of_number( + k0); + log_event("JsInterpreter.js", 3615, ctx_push(ctx_678, [{key: "#RETURN_VALUE#", val: _return_1548}]), "return"); + return (_return_1548); + }()), 1); + log_event("JsInterpreter.js", 3617, ctx_push(ctx_678, [{key: "#RETURN_VALUE#", val: _return_1549}]), "return"); + return (_return_1549); + }()) + ; + var ctx_679 = ctx_push(ctx_678, [{key: "resultStr", val: resultStr}]); + log_event("JsInterpreter.js", 3621, ctx_679, "let"); + var a = { + attributes_data_value: + Coq_value_prim( + Coq_prim_string( + resultStr)), + attributes_data_writable: false, + attributes_data_enumerable: true, + attributes_data_configurable: false + }; + var ctx_680 = ctx_push(ctx_679, [{key: "a", val: a}]); + log_event("JsInterpreter.js", 3620, ctx_680, "let"); + var _return_1550 = + res_spec( + s5, + Coq_full_descriptor_some( + Coq_attributes_data_of( + a))); + log_event("JsInterpreter.js", 3619, ctx_push(ctx_680, [{key: "#RETURN_VALUE#", val: _return_1550}]), "return"); + return (_return_1550); + + + } + + }); + log_event("JsInterpreter.js", 3628, ctx_push(ctx_676, [{key: "#RETURN_VALUE#", val: _return_1552}]), "return"); + return (_return_1552); + }); + log_event("JsInterpreter.js", 3632, ctx_push(ctx_675, [{key: "#RETURN_VALUE#", val: _return_1553}]), "return"); + return (_return_1553); + } + }); + log_event("JsInterpreter.js", 3638, ctx_push(ctx_674, [{key: "#RETURN_VALUE#", val: _return_1555}]), "return"); + return (_return_1555); + }); + log_event("JsInterpreter.js", 3642, ctx_push(ctx_673, [{key: "#RETURN_VALUE#", val: _return_1556}]), "return"); + return (_return_1556); + case "Coq_full_descriptor_some": + var a = d.value;var ctx_681 = ctx_push(ctx_673, [{key: "a", val: a}]); + log_event("JsInterpreter.js", 3645, ctx_681, "case"); + + var _return_1557 = + res_spec(s0, d); + log_event("JsInterpreter.js", 3644, ctx_push(ctx_681, [{key: "#RETURN_VALUE#", val: _return_1557}]), "return"); + return (_return_1557); + } + + }); + log_event("JsInterpreter.js", 3650, ctx_push(ctx_660, [{key: "#RETURN_VALUE#", val: _return_1558}]), "return"); + return (_return_1558); + } + + + }); + log_event("JsInterpreter.js", 3657, ctx_push(ctx_655, [{key: "#RETURN_VALUE#", val: _return_1559}]), "return"); + return (_return_1559); +}; + +var run_function_has_instance = function (s, lv, _foo_) { + var ctx_682 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "lv", val: lv}, {key: "_foo_", val: _foo_}]); + log_event("JsInterpreter.js", 3690, ctx_682, "enter"); + log_event("JsInterpreter.js", 3689, ctx_682, "switch"); + switch (_foo_.tag) { + case "Coq_value_prim": + var p = _foo_.value;var ctx_683 = ctx_push(ctx_682, [{key: "p", val: p}]); + log_event("JsInterpreter.js", 3662, ctx_683, "case"); + + var _return_1561 = (function () { + log_event("JsInterpreter.js", 3660, ctx_683, "call"); + var _return_1560 = run_error(s, Coq_native_error_type()); + log_event("JsInterpreter.js", 3659, ctx_push(ctx_683, [{key: "#RETURN_VALUE#", val: _return_1560}]), "return"); + return (_return_1560); + }()) + ; + log_event("JsInterpreter.js", 3661, ctx_push(ctx_683, [{key: "#RETURN_VALUE#", val: _return_1561}]), "return"); + return (_return_1561); + case "Coq_value_object": + var lo = _foo_.value;var ctx_684 = ctx_push(ctx_682, [{key: "lo", val: lo}]); + log_event("JsInterpreter.js", 3688, ctx_684, "case"); + + var _return_1572 = if_some((function () { + log_event("JsInterpreter.js", 3664, ctx_684, "call"); + var _return_1562 = run_object_method( + object_proto_, s, lv); + log_event("JsInterpreter.js", 3663, ctx_push(ctx_684, [{key: "#RETURN_VALUE#", val: _return_1562}]), "return"); + return (_return_1562); }()), function(vproto) { + + var ctx_685 = ctx_push(ctx_684, [{key: "vproto", val: vproto}]); + log_event("JsInterpreter.js", 3686, ctx_685, "let"); + log_event("JsInterpreter.js", 3683, ctx_685, "switch"); + switch (vproto.tag) { + case "Coq_value_prim": + var p = vproto.value;var ctx_686 = ctx_push(ctx_685, [{key: "p", val: p}]); + log_event("JsInterpreter.js", 3676, ctx_686, "case"); + + log_event("JsInterpreter.js", 3675, ctx_686, "switch"); + switch (p.tag) { + case "Coq_prim_null":log_event("JsInterpreter.js", 3666, ctx_686, "case"); + + var _return_1563 = res_ter(s, + res_val( + Coq_value_prim( + Coq_prim_bool( + false)))); + log_event("JsInterpreter.js", 3665, ctx_push(ctx_686, [{key: "#RETURN_VALUE#", val: _return_1563}]), "return"); + return (_return_1563); + default:log_event("JsInterpreter.js", 3674, ctx_686, "case"); + + var _return_1567 = (function () { + log_event("JsInterpreter.js", 3672, ctx_686, "call"); + var _return_1566 = function (s, m) { + var ctx_687 = ctx_push(ctx_686, [{key: "s", val: s}, {key: "m", val: m}]); + log_event("JsInterpreter.js", 3670, ctx_687, "enter"); + (function () { + log_event("JsInterpreter.js", 3669, ctx_687, "call"); + var _return_1565 = + Debug.impossible_with_heap_because( + __LOC__, s, + m); + log_event("JsInterpreter.js", 3668, ctx_push(ctx_687, [{key: "#RETURN_VALUE#", val: _return_1565}]), "return"); + return (_return_1565); + }()) + ; + var _return_1564 = + Coq_result_impossible( + ); + log_event("JsInterpreter.js", 3667, ctx_push(ctx_687, [{key: "#RETURN_VALUE#", val: _return_1564}]), "return"); + return (_return_1564); + }(s, + "Primitive found in the prototype chain in [run_object_has_instance_loop]."); + log_event("JsInterpreter.js", 3671, ctx_push(ctx_686, [{key: "#RETURN_VALUE#", val: _return_1566}]), "return"); + return (_return_1566); + }()) + ; + log_event("JsInterpreter.js", 3673, ctx_push(ctx_686, [{key: "#RETURN_VALUE#", val: _return_1567}]), "return"); + return (_return_1567); + } + + case "Coq_value_object": + var proto = vproto.value;var ctx_688 = ctx_push(ctx_685, [{key: "proto", val: proto}]); + log_event("JsInterpreter.js", 3682, ctx_688, "case"); + + var _if_arg_1568 = object_loc_compare(proto, + lo); + log_event("JsInterpreter.js", 3681, ctx_688, "if"); + if (_if_arg_1568) { + var _return_1571 = res_ter(s, + res_val( + Coq_value_prim( + Coq_prim_bool( + true)))); + log_event("JsInterpreter.js", 3680, ctx_push(ctx_688, [{key: "#RETURN_VALUE#", val: _return_1571}]), "return"); + return (_return_1571); + } else { + var _return_1570 = (function () { + log_event("JsInterpreter.js", 3678, ctx_688, "call"); + var _return_1569 = run_function_has_instance( + s, proto, + Coq_value_object( + lo)); + log_event("JsInterpreter.js", 3677, ctx_push(ctx_688, [{key: "#RETURN_VALUE#", val: _return_1569}]), "return"); + return (_return_1569); + }()) + ; + log_event("JsInterpreter.js", 3679, ctx_push(ctx_688, [{key: "#RETURN_VALUE#", val: _return_1570}]), "return"); + return (_return_1570); + } + } + + }); + log_event("JsInterpreter.js", 3687, ctx_push(ctx_684, [{key: "#RETURN_VALUE#", val: _return_1572}]), "return"); + return (_return_1572); + } + +}; + +var run_object_has_instance = function (s, c, b, l, v) { + var ctx_689 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "b", val: b}, {key: "l", val: l}, {key: "v", val: v}]); + log_event("JsInterpreter.js", 3738, ctx_689, "enter"); + log_event("JsInterpreter.js", 3737, ctx_689, "switch"); + switch (b.tag) { + case "Coq_builtin_has_instance_function":log_event("JsInterpreter.js", 3710, ctx_689, "case"); + + log_event("JsInterpreter.js", 3709, ctx_689, "switch"); + switch (v.tag) { + case "Coq_value_prim": + var w = v.value;var ctx_690 = ctx_push(ctx_689, [{key: "w", val: w}]); + log_event("JsInterpreter.js", 3692, ctx_690, "case"); + + var _return_1573 = result_out( + Coq_out_ter(s, + res_val( + Coq_value_prim(Coq_prim_bool(false))))); + log_event("JsInterpreter.js", 3691, ctx_push(ctx_690, [{key: "#RETURN_VALUE#", val: _return_1573}]), "return"); + return (_return_1573); + case "Coq_value_object": + var lv = v.value;var ctx_691 = ctx_push(ctx_689, [{key: "lv", val: lv}]); + log_event("JsInterpreter.js", 3708, ctx_691, "case"); + + var _return_1579 = if_value((function () { + log_event("JsInterpreter.js", 3694, ctx_691, "call"); + var _return_1574 = run_object_get(s, c, l, + "prototype"); + log_event("JsInterpreter.js", 3693, ctx_push(ctx_691, [{key: "#RETURN_VALUE#", val: _return_1574}]), "return"); + return (_return_1574); }()), function(s1, + vproto) { + + var ctx_692 = ctx_push(ctx_691, [{key: "s1", val: s1}, {key: "vproto", val: vproto}]); + log_event("JsInterpreter.js", 3706, ctx_692, "let"); + log_event("JsInterpreter.js", 3703, ctx_692, "switch"); + switch (vproto.tag) { + case "Coq_value_prim": + var p = vproto.value;var ctx_693 = ctx_push(ctx_692, [{key: "p", val: p}]); + log_event("JsInterpreter.js", 3698, ctx_693, "case"); + + var _return_1576 = (function () { + log_event("JsInterpreter.js", 3696, ctx_693, "call"); + var _return_1575 = run_error(s1, + Coq_native_error_type( + )); + log_event("JsInterpreter.js", 3695, ctx_push(ctx_693, [{key: "#RETURN_VALUE#", val: _return_1575}]), "return"); + return (_return_1575); + }()) + ; + log_event("JsInterpreter.js", 3697, ctx_push(ctx_693, [{key: "#RETURN_VALUE#", val: _return_1576}]), "return"); + return (_return_1576); + case "Coq_value_object": + var lproto = vproto.value;var ctx_694 = ctx_push(ctx_692, [{key: "lproto", val: lproto}]); + log_event("JsInterpreter.js", 3702, ctx_694, "case"); + + var _return_1578 = (function () { + log_event("JsInterpreter.js", 3700, ctx_694, "call"); + var _return_1577 = run_function_has_instance( + s1, lv, + Coq_value_object( + lproto)); + log_event("JsInterpreter.js", 3699, ctx_push(ctx_694, [{key: "#RETURN_VALUE#", val: _return_1577}]), "return"); + return (_return_1577); + }()) + ; + log_event("JsInterpreter.js", 3701, ctx_push(ctx_694, [{key: "#RETURN_VALUE#", val: _return_1578}]), "return"); + return (_return_1578); + } + + }); + log_event("JsInterpreter.js", 3707, ctx_push(ctx_691, [{key: "#RETURN_VALUE#", val: _return_1579}]), "return"); + return (_return_1579); + } + + case "Coq_builtin_has_instance_after_bind":log_event("JsInterpreter.js", 3736, ctx_689, "case"); + + var _return_1588 = if_some((function () { + log_event("JsInterpreter.js", 3712, ctx_689, "call"); + var _return_1580 = run_object_method( + object_target_function_, s, + l); + log_event("JsInterpreter.js", 3711, ctx_push(ctx_689, [{key: "#RETURN_VALUE#", val: _return_1580}]), "return"); + return (_return_1580); }()), function(ol) { + + var ctx_695 = ctx_push(ctx_689, [{key: "ol", val: ol}]); + log_event("JsInterpreter.js", 3734, ctx_695, "let"); + var _return_1587 = if_some(ol, function(l0) { + + var ctx_696 = ctx_push(ctx_695, [{key: "l0", val: l0}]); + log_event("JsInterpreter.js", 3730, ctx_696, "let"); + var _return_1586 = + if_some((function () { + log_event("JsInterpreter.js", 3714, ctx_696, "call"); + var _return_1581 = + run_object_method( + object_has_instance_, + s, l0); + log_event("JsInterpreter.js", 3713, ctx_push(ctx_696, [{key: "#RETURN_VALUE#", val: _return_1581}]), "return"); + return (_return_1581); + }()), function(ob) { + + var ctx_697 = ctx_push(ctx_696, [{key: "ob", val: ob}]); + log_event("JsInterpreter.js", 3726, ctx_697, "let"); + log_event("JsInterpreter.js", 3723, ctx_697, "switch"); + switch (ob.tag) { + case "Some": + var b0 = ob.value;var ctx_698 = ctx_push(ctx_697, [{key: "b0", val: b0}]); + log_event("JsInterpreter.js", 3718, ctx_698, "case"); + + var _return_1583 = (function () { + log_event("JsInterpreter.js", 3716, ctx_698, "call"); + var _return_1582 = + run_object_has_instance( + s, c, b0, l0, + v); + log_event("JsInterpreter.js", 3715, ctx_push(ctx_698, [{key: "#RETURN_VALUE#", val: _return_1582}]), "return"); + return (_return_1582); + }()) + ; + log_event("JsInterpreter.js", 3717, ctx_push(ctx_698, [{key: "#RETURN_VALUE#", val: _return_1583}]), "return"); + return (_return_1583); + case "None":log_event("JsInterpreter.js", 3722, ctx_697, "case"); + + var _return_1585 = (function () { + log_event("JsInterpreter.js", 3720, ctx_697, "call"); + var _return_1584 = + run_error(s, + Coq_native_error_type( + )); + log_event("JsInterpreter.js", 3719, ctx_push(ctx_697, [{key: "#RETURN_VALUE#", val: _return_1584}]), "return"); + return (_return_1584); + }()) + ; + log_event("JsInterpreter.js", 3721, ctx_push(ctx_697, [{key: "#RETURN_VALUE#", val: _return_1585}]), "return"); + return (_return_1585); + } + + }); + log_event("JsInterpreter.js", 3727, ctx_push(ctx_696, [{key: "#RETURN_VALUE#", val: _return_1586}]), "return"); + return (_return_1586); + }); + log_event("JsInterpreter.js", 3731, ctx_push(ctx_695, [{key: "#RETURN_VALUE#", val: _return_1587}]), "return"); + return (_return_1587); + }); + log_event("JsInterpreter.js", 3735, ctx_push(ctx_689, [{key: "#RETURN_VALUE#", val: _return_1588}]), "return"); + return (_return_1588); + } + +}; + +var from_prop_descriptor = function (s, c, _foo_) { + var ctx_699 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "_foo_", val: _foo_}]); + log_event("JsInterpreter.js", 3831, ctx_699, "enter"); + log_event("JsInterpreter.js", 3830, ctx_699, "switch"); + switch (_foo_.tag) { + case "Coq_full_descriptor_undef":log_event("JsInterpreter.js", 3740, ctx_699, "case"); + + var _return_1589 = result_out( + Coq_out_ter(s, + res_val(Coq_value_prim(Coq_prim_undef())))); + log_event("JsInterpreter.js", 3739, ctx_push(ctx_699, [{key: "#RETURN_VALUE#", val: _return_1589}]), "return"); + return (_return_1589); + case "Coq_full_descriptor_some": + var a = _foo_.value;var ctx_700 = ctx_push(ctx_699, [{key: "a", val: a}]); + log_event("JsInterpreter.js", 3829, ctx_700, "case"); + + var _return_1622 = if_object((function () { + log_event("JsInterpreter.js", 3742, ctx_700, "call"); + var _return_1590 = run_construct_prealloc(s, c, + Coq_prealloc_object(), + mk_nil()); + log_event("JsInterpreter.js", 3741, ctx_push(ctx_700, [{key: "#RETURN_VALUE#", val: _return_1590}]), "return"); + return (_return_1590); }()), function(s1, l) { + + var ctx_701 = ctx_push(ctx_700, [{key: "s1", val: s1}, {key: "l", val: l}]); + log_event("JsInterpreter.js", 3827, ctx_701, "let"); + var follow = function (s0, x) { + var ctx_702 = ctx_push(ctx_701, [{key: "s0", val: s0}, {key: "x", val: x}]); + log_event("JsInterpreter.js", 3770, ctx_702, "enter"); + var a1 = (function () { + log_event("JsInterpreter.js", 3746, ctx_702, "call"); + var _return_1592 = attributes_data_intro_all_true( + Coq_value_prim( + Coq_prim_bool( + (function () { + log_event("JsInterpreter.js", 3744, ctx_702, "call"); + var _return_1591 = + attributes_enumerable( + a); + log_event("JsInterpreter.js", 3743, ctx_push(ctx_702, [{key: "#RETURN_VALUE#", val: _return_1591}]), "return"); + return (_return_1591); + }())))); + log_event("JsInterpreter.js", 3745, ctx_push(ctx_702, [{key: "#RETURN_VALUE#", val: _return_1592}]), "return"); + return (_return_1592); + }()) + ; + var ctx_703 = ctx_push(ctx_702, [{key: "a1", val: a1}]); + log_event("JsInterpreter.js", 3769, ctx_703, "let"); + var _return_1601 = if_bool((function () { + log_event("JsInterpreter.js", 3750, ctx_703, "call"); + var _return_1594 = + object_define_own_prop( + s0, c, l, + "enumerable", + (function () { + log_event("JsInterpreter.js", 3748, ctx_703, "call"); + var _return_1593 = + descriptor_of_attributes( + Coq_attributes_data_of( + a1)); + log_event("JsInterpreter.js", 3747, ctx_push(ctx_703, [{key: "#RETURN_VALUE#", val: _return_1593}]), "return"); + return (_return_1593); + }()), throw_false); + log_event("JsInterpreter.js", 3749, ctx_push(ctx_703, [{key: "#RETURN_VALUE#", val: _return_1594}]), "return"); + return (_return_1594); + }()), function(s0_2, + x0) { + + var ctx_704 = ctx_push(ctx_703, [{key: "s0_2", val: s0_2}, {key: "x0", val: x0}]); + log_event("JsInterpreter.js", 3767, ctx_704, "let"); + var a2 = (function () { + log_event("JsInterpreter.js", 3754, ctx_704, "call"); + var _return_1596 = + attributes_data_intro_all_true( + Coq_value_prim( + Coq_prim_bool( + (function () { + log_event("JsInterpreter.js", 3752, ctx_704, "call"); + var _return_1595 = + attributes_configurable( + a); + log_event("JsInterpreter.js", 3751, ctx_push(ctx_704, [{key: "#RETURN_VALUE#", val: _return_1595}]), "return"); + return (_return_1595); + }())))); + log_event("JsInterpreter.js", 3753, ctx_push(ctx_704, [{key: "#RETURN_VALUE#", val: _return_1596}]), "return"); + return (_return_1596); + }()) + ; + var ctx_705 = ctx_push(ctx_704, [{key: "a2", val: a2}]); + log_event("JsInterpreter.js", 3764, ctx_705, "let"); + var _return_1600 = + if_bool((function () { + log_event("JsInterpreter.js", 3758, ctx_705, "call"); + var _return_1598 = + object_define_own_prop( + s0_2, c, l, + "configurable", + (function () { + log_event("JsInterpreter.js", 3756, ctx_705, "call"); + var _return_1597 = + descriptor_of_attributes( + Coq_attributes_data_of( + a2)); + log_event("JsInterpreter.js", 3755, ctx_push(ctx_705, [{key: "#RETURN_VALUE#", val: _return_1597}]), "return"); + return (_return_1597); + }()), + throw_false); + log_event("JsInterpreter.js", 3757, ctx_push(ctx_705, [{key: "#RETURN_VALUE#", val: _return_1598}]), "return"); + return (_return_1598); + }()), function(s_2, + x1) { + + var ctx_706 = ctx_push(ctx_705, [{key: "s_2", val: s_2}, {key: "x1", val: x1}]); + log_event("JsInterpreter.js", 3762, ctx_706, "let"); + var _return_1599 = + res_ter(s_2, + res_val( + Coq_value_object( + l))); + log_event("JsInterpreter.js", 3759, ctx_push(ctx_706, [{key: "#RETURN_VALUE#", val: _return_1599}]), "return"); + return (_return_1599); + }); + log_event("JsInterpreter.js", 3763, ctx_push(ctx_705, [{key: "#RETURN_VALUE#", val: _return_1600}]), "return"); + return (_return_1600); + + }); + log_event("JsInterpreter.js", 3768, ctx_push(ctx_703, [{key: "#RETURN_VALUE#", val: _return_1601}]), "return"); + return (_return_1601); + + }; + var ctx_707 = ctx_push(ctx_701, [{key: "follow", val: follow}]); + log_event("JsInterpreter.js", 3824, ctx_707, "let"); + log_event("JsInterpreter.js", 3823, ctx_707, "switch"); + switch (a.tag) { + case "Coq_attributes_data_of": + var ad = a.value;var ctx_708 = ctx_push(ctx_707, [{key: "ad", val: ad}]); + log_event("JsInterpreter.js", 3796, ctx_708, "case"); + + var a1 = (function () { + log_event("JsInterpreter.js", 3772, ctx_708, "call"); + var _return_1602 = attributes_data_intro_all_true( + ad.attributes_data_value); + log_event("JsInterpreter.js", 3771, ctx_push(ctx_708, [{key: "#RETURN_VALUE#", val: _return_1602}]), "return"); + return (_return_1602); + }()) + ; + var ctx_709 = ctx_push(ctx_708, [{key: "a1", val: a1}]); + log_event("JsInterpreter.js", 3795, ctx_709, "let"); + var _return_1611 = if_bool((function () { + log_event("JsInterpreter.js", 3776, ctx_709, "call"); + var _return_1604 = + object_define_own_prop( + s1, c, l, "value", + (function () { + log_event("JsInterpreter.js", 3774, ctx_709, "call"); + var _return_1603 = + descriptor_of_attributes( + Coq_attributes_data_of( + a1)); + log_event("JsInterpreter.js", 3773, ctx_push(ctx_709, [{key: "#RETURN_VALUE#", val: _return_1603}]), "return"); + return (_return_1603); + }()), throw_false); + log_event("JsInterpreter.js", 3775, ctx_push(ctx_709, [{key: "#RETURN_VALUE#", val: _return_1604}]), "return"); + return (_return_1604); + }()), function(s2, x) { + + var ctx_710 = ctx_push(ctx_709, [{key: "s2", val: s2}, {key: "x", val: x}]); + log_event("JsInterpreter.js", 3793, ctx_710, "let"); + var a2 = (function () { + log_event("JsInterpreter.js", 3778, ctx_710, "call"); + var _return_1605 = + attributes_data_intro_all_true( + Coq_value_prim( + Coq_prim_bool( + ad.attributes_data_writable))); + log_event("JsInterpreter.js", 3777, ctx_push(ctx_710, [{key: "#RETURN_VALUE#", val: _return_1605}]), "return"); + return (_return_1605); + }()) + ; + var ctx_711 = ctx_push(ctx_710, [{key: "a2", val: a2}]); + log_event("JsInterpreter.js", 3790, ctx_711, "let"); + var _return_1610 = + if_bool( + (function () { + log_event("JsInterpreter.js", 3782, ctx_711, "call"); + var _return_1607 = + object_define_own_prop( + s2, c, l, + "writable", + (function () { + log_event("JsInterpreter.js", 3780, ctx_711, "call"); + var _return_1606 = + descriptor_of_attributes( + Coq_attributes_data_of( + a2)); + log_event("JsInterpreter.js", 3779, ctx_push(ctx_711, [{key: "#RETURN_VALUE#", val: _return_1606}]), "return"); + return (_return_1606); + }()), + throw_false); + log_event("JsInterpreter.js", 3781, ctx_push(ctx_711, [{key: "#RETURN_VALUE#", val: _return_1607}]), "return"); + return (_return_1607); + }()), function(s3, + v) { + + var ctx_712 = ctx_push(ctx_711, [{key: "s3", val: s3}, {key: "v", val: v}]); + log_event("JsInterpreter.js", 3788, ctx_712, "let"); + var _return_1609 = (function () { + log_event("JsInterpreter.js", 3784, ctx_712, "call"); + var _return_1608 = + follow(s3, v); + log_event("JsInterpreter.js", 3783, ctx_push(ctx_712, [{key: "#RETURN_VALUE#", val: _return_1608}]), "return"); + return (_return_1608); + }()) + ; + log_event("JsInterpreter.js", 3785, ctx_push(ctx_712, [{key: "#RETURN_VALUE#", val: _return_1609}]), "return"); + return (_return_1609); + }); + log_event("JsInterpreter.js", 3789, ctx_push(ctx_711, [{key: "#RETURN_VALUE#", val: _return_1610}]), "return"); + return (_return_1610); + + }); + log_event("JsInterpreter.js", 3794, ctx_push(ctx_709, [{key: "#RETURN_VALUE#", val: _return_1611}]), "return"); + return (_return_1611); + + case "Coq_attributes_accessor_of": + var aa = a.value;var ctx_713 = ctx_push(ctx_707, [{key: "aa", val: aa}]); + log_event("JsInterpreter.js", 3822, ctx_713, "case"); + + var a1 = (function () { + log_event("JsInterpreter.js", 3798, ctx_713, "call"); + var _return_1612 = attributes_data_intro_all_true( + aa.attributes_accessor_get); + log_event("JsInterpreter.js", 3797, ctx_push(ctx_713, [{key: "#RETURN_VALUE#", val: _return_1612}]), "return"); + return (_return_1612); + }()) + ; + var ctx_714 = ctx_push(ctx_713, [{key: "a1", val: a1}]); + log_event("JsInterpreter.js", 3821, ctx_714, "let"); + var _return_1621 = if_bool((function () { + log_event("JsInterpreter.js", 3802, ctx_714, "call"); + var _return_1614 = + object_define_own_prop( + s1, c, l, "get", + (function () { + log_event("JsInterpreter.js", 3800, ctx_714, "call"); + var _return_1613 = + descriptor_of_attributes( + Coq_attributes_data_of( + a1)); + log_event("JsInterpreter.js", 3799, ctx_push(ctx_714, [{key: "#RETURN_VALUE#", val: _return_1613}]), "return"); + return (_return_1613); + }()), throw_false); + log_event("JsInterpreter.js", 3801, ctx_push(ctx_714, [{key: "#RETURN_VALUE#", val: _return_1614}]), "return"); + return (_return_1614); + }()), function(s2, x) { + + var ctx_715 = ctx_push(ctx_714, [{key: "s2", val: s2}, {key: "x", val: x}]); + log_event("JsInterpreter.js", 3819, ctx_715, "let"); + var a2 = (function () { + log_event("JsInterpreter.js", 3804, ctx_715, "call"); + var _return_1615 = + attributes_data_intro_all_true( + aa.attributes_accessor_set); + log_event("JsInterpreter.js", 3803, ctx_push(ctx_715, [{key: "#RETURN_VALUE#", val: _return_1615}]), "return"); + return (_return_1615); + }()) + ; + var ctx_716 = ctx_push(ctx_715, [{key: "a2", val: a2}]); + log_event("JsInterpreter.js", 3816, ctx_716, "let"); + var _return_1620 = + if_bool( + (function () { + log_event("JsInterpreter.js", 3808, ctx_716, "call"); + var _return_1617 = + object_define_own_prop( + s2, c, l, + "set", + (function () { + log_event("JsInterpreter.js", 3806, ctx_716, "call"); + var _return_1616 = + descriptor_of_attributes( + Coq_attributes_data_of( + a2)); + log_event("JsInterpreter.js", 3805, ctx_push(ctx_716, [{key: "#RETURN_VALUE#", val: _return_1616}]), "return"); + return (_return_1616); + }()), + throw_false); + log_event("JsInterpreter.js", 3807, ctx_push(ctx_716, [{key: "#RETURN_VALUE#", val: _return_1617}]), "return"); + return (_return_1617); + }()), function(s3, + v) { + + var ctx_717 = ctx_push(ctx_716, [{key: "s3", val: s3}, {key: "v", val: v}]); + log_event("JsInterpreter.js", 3814, ctx_717, "let"); + var _return_1619 = (function () { + log_event("JsInterpreter.js", 3810, ctx_717, "call"); + var _return_1618 = + follow(s3, v); + log_event("JsInterpreter.js", 3809, ctx_push(ctx_717, [{key: "#RETURN_VALUE#", val: _return_1618}]), "return"); + return (_return_1618); + }()) + ; + log_event("JsInterpreter.js", 3811, ctx_push(ctx_717, [{key: "#RETURN_VALUE#", val: _return_1619}]), "return"); + return (_return_1619); + }); + log_event("JsInterpreter.js", 3815, ctx_push(ctx_716, [{key: "#RETURN_VALUE#", val: _return_1620}]), "return"); + return (_return_1620); + + }); + log_event("JsInterpreter.js", 3820, ctx_push(ctx_714, [{key: "#RETURN_VALUE#", val: _return_1621}]), "return"); + return (_return_1621); + + } + + + }); + log_event("JsInterpreter.js", 3828, ctx_push(ctx_700, [{key: "#RETURN_VALUE#", val: _return_1622}]), "return"); + return (_return_1622); + } + +}; + +var run_equal = function (s, c, v1, v2) { + var ctx_718 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "v1", val: v1}, {key: "v2", val: v2}]); + log_event("JsInterpreter.js", 3926, ctx_718, "enter"); + var conv_number = function (s0, v) { + var ctx_719 = ctx_push(ctx_718, [{key: "s0", val: s0}, {key: "v", val: v}]); + log_event("JsInterpreter.js", 3835, ctx_719, "enter"); + var _return_1624 = (function () { + log_event("JsInterpreter.js", 3833, ctx_719, "call"); + var _return_1623 = to_number(s0, c, v); + log_event("JsInterpreter.js", 3832, ctx_push(ctx_719, [{key: "#RETURN_VALUE#", val: _return_1623}]), "return"); + return (_return_1623); + }()) + ; + log_event("JsInterpreter.js", 3834, ctx_push(ctx_719, [{key: "#RETURN_VALUE#", val: _return_1624}]), "return"); + return (_return_1624); + }; + var ctx_720 = ctx_push(ctx_718, [{key: "conv_number", val: conv_number}]); + log_event("JsInterpreter.js", 3925, ctx_720, "let"); + var conv_primitive = function (s0, v) { + var ctx_721 = ctx_push(ctx_720, [{key: "s0", val: s0}, {key: "v", val: v}]); + log_event("JsInterpreter.js", 3839, ctx_721, "enter"); + var _return_1626 = (function () { + log_event("JsInterpreter.js", 3837, ctx_721, "call"); + var _return_1625 = to_primitive(s0, c, v, None()); + log_event("JsInterpreter.js", 3836, ctx_push(ctx_721, [{key: "#RETURN_VALUE#", val: _return_1625}]), "return"); + return (_return_1625); + }()) + ; + log_event("JsInterpreter.js", 3838, ctx_push(ctx_721, [{key: "#RETURN_VALUE#", val: _return_1626}]), "return"); + return (_return_1626); + }; + var ctx_722 = ctx_push(ctx_720, [{key: "conv_primitive", val: conv_primitive}]); + log_event("JsInterpreter.js", 3924, ctx_722, "let"); + var checkTypesThen = function (s0, v3, v4, k) { + var ctx_723 = ctx_push(ctx_722, [{key: "s0", val: s0}, {key: "v3", val: v3}, {key: "v4", val: v4}, {key: "k", val: k}]); + log_event("JsInterpreter.js", 3853, ctx_723, "enter"); + var ty1 = (function () { + log_event("JsInterpreter.js", 3841, ctx_723, "call"); + var _return_1627 = type_of(v3); + log_event("JsInterpreter.js", 3840, ctx_push(ctx_723, [{key: "#RETURN_VALUE#", val: _return_1627}]), "return"); + return (_return_1627); + }()) + ; + var ctx_724 = ctx_push(ctx_723, [{key: "ty1", val: ty1}]); + log_event("JsInterpreter.js", 3852, ctx_724, "let"); + var ty2 = (function () { + log_event("JsInterpreter.js", 3843, ctx_724, "call"); + var _return_1628 = type_of(v4); + log_event("JsInterpreter.js", 3842, ctx_push(ctx_724, [{key: "#RETURN_VALUE#", val: _return_1628}]), "return"); + return (_return_1628); + }()) + ; + var ctx_725 = ctx_push(ctx_724, [{key: "ty2", val: ty2}]); + log_event("JsInterpreter.js", 3851, ctx_725, "let"); + var _if_arg_1629 = type_compare(ty1, ty2); + log_event("JsInterpreter.js", 3850, ctx_725, "if"); + if (_if_arg_1629) { + var _return_1633 = result_out( + Coq_out_ter(s0, + res_val( + Coq_value_prim( + Coq_prim_bool((function () { + log_event("JsInterpreter.js", 3848, ctx_725, "call"); + var _return_1632 = equality_test_for_same_type( + ty1, v3, v4); + log_event("JsInterpreter.js", 3847, ctx_push(ctx_725, [{key: "#RETURN_VALUE#", val: _return_1632}]), "return"); + return (_return_1632); }())))))); + log_event("JsInterpreter.js", 3849, ctx_push(ctx_725, [{key: "#RETURN_VALUE#", val: _return_1633}]), "return"); + return (_return_1633); + } else { + var _return_1631 = (function () { + log_event("JsInterpreter.js", 3845, ctx_725, "call"); + var _return_1630 = k(ty1, ty2); + log_event("JsInterpreter.js", 3844, ctx_push(ctx_725, [{key: "#RETURN_VALUE#", val: _return_1630}]), "return"); + return (_return_1630); + }()) + ; + log_event("JsInterpreter.js", 3846, ctx_push(ctx_725, [{key: "#RETURN_VALUE#", val: _return_1631}]), "return"); + return (_return_1631); + } + + + }; + var ctx_726 = ctx_push(ctx_722, [{key: "checkTypesThen", val: checkTypesThen}]); + log_event("JsInterpreter.js", 3923, ctx_726, "let"); + var _return_1674 = (function () { + log_event("JsInterpreter.js", 3921, ctx_726, "call"); + var _return_1673 = checkTypesThen(s, v1, v2, function (ty1, ty2) { + var ctx_727 = ctx_push(ctx_726, [{key: "ty1", val: ty1}, {key: "ty2", val: ty2}]); + log_event("JsInterpreter.js", 3919, ctx_727, "enter"); + var dc_conv = function (v3, f, v4) { + var ctx_728 = ctx_push(ctx_727, [{key: "v3", val: v3}, {key: "f", val: f}, {key: "v4", val: v4}]); + log_event("JsInterpreter.js", 3863, ctx_728, "enter"); + var _return_1637 = if_value((function () { + log_event("JsInterpreter.js", 3855, ctx_728, "call"); + var _return_1634 = + f(s, v4); + log_event("JsInterpreter.js", 3854, ctx_push(ctx_728, [{key: "#RETURN_VALUE#", val: _return_1634}]), "return"); + return (_return_1634); + }()), function(s0, v2_2) { + + var ctx_729 = ctx_push(ctx_728, [{key: "s0", val: s0}, {key: "v2_2", val: v2_2}]); + log_event("JsInterpreter.js", 3861, ctx_729, "let"); + var _return_1636 = (function () { + log_event("JsInterpreter.js", 3857, ctx_729, "call"); + var _return_1635 = + run_equal(s0, c, v3, + v2_2); + log_event("JsInterpreter.js", 3856, ctx_push(ctx_729, [{key: "#RETURN_VALUE#", val: _return_1635}]), "return"); + return (_return_1635); + }()) + ; + log_event("JsInterpreter.js", 3858, ctx_push(ctx_729, [{key: "#RETURN_VALUE#", val: _return_1636}]), "return"); + return (_return_1636); + }); + log_event("JsInterpreter.js", 3862, ctx_push(ctx_728, [{key: "#RETURN_VALUE#", val: _return_1637}]), "return"); + return (_return_1637); + }; + var ctx_730 = ctx_push(ctx_727, [{key: "dc_conv", val: dc_conv}]); + log_event("JsInterpreter.js", 3918, ctx_730, "let"); + var so = function (b) { + var ctx_731 = ctx_push(ctx_730, [{key: "b", val: b}]); + log_event("JsInterpreter.js", 3865, ctx_731, "enter"); + var _return_1638 = result_out( + Coq_out_ter(s, + res_val( + Coq_value_prim( + Coq_prim_bool(b))))); + log_event("JsInterpreter.js", 3864, ctx_push(ctx_731, [{key: "#RETURN_VALUE#", val: _return_1638}]), "return"); + return (_return_1638); + }; + var ctx_732 = ctx_push(ctx_730, [{key: "so", val: so}]); + log_event("JsInterpreter.js", 3917, ctx_732, "let"); + var _if_arg_1639 = (function () { + log_event("JsInterpreter.js", 3867, ctx_732, "call"); + var _return_1640 = (type_compare(ty1, + Coq_type_null()) + && type_compare(ty2, + Coq_type_undef())); + log_event("JsInterpreter.js", 3866, ctx_push(ctx_732, [{key: "#RETURN_VALUE#", val: _return_1640}]), "return"); + return (_return_1640); + }()) + ; + log_event("JsInterpreter.js", 3916, ctx_732, "if"); + if (_if_arg_1639) { + var _return_1672 = (function () { + log_event("JsInterpreter.js", 3914, ctx_732, "call"); + var _return_1671 = so(true); + log_event("JsInterpreter.js", 3913, ctx_push(ctx_732, [{key: "#RETURN_VALUE#", val: _return_1671}]), "return"); + return (_return_1671); + }()) + ; + log_event("JsInterpreter.js", 3915, ctx_push(ctx_732, [{key: "#RETURN_VALUE#", val: _return_1672}]), "return"); + return (_return_1672); + } else { + var _if_arg_1641 = (function () { + log_event("JsInterpreter.js", 3869, ctx_732, "call"); + var _return_1642 = (type_compare(ty1, + Coq_type_undef()) + && type_compare(ty2, + Coq_type_null())); + log_event("JsInterpreter.js", 3868, ctx_push(ctx_732, [{key: "#RETURN_VALUE#", val: _return_1642}]), "return"); + return (_return_1642); + }()) + ; + log_event("JsInterpreter.js", 3912, ctx_732, "if"); + if (_if_arg_1641) { + var _return_1670 = (function () { + log_event("JsInterpreter.js", 3910, ctx_732, "call"); + var _return_1669 = so(true); + log_event("JsInterpreter.js", 3909, ctx_push(ctx_732, [{key: "#RETURN_VALUE#", val: _return_1669}]), "return"); + return (_return_1669); + }()) + ; + log_event("JsInterpreter.js", 3911, ctx_push(ctx_732, [{key: "#RETURN_VALUE#", val: _return_1670}]), "return"); + return (_return_1670); + } else { + var _if_arg_1643 = (function () { + log_event("JsInterpreter.js", 3871, ctx_732, "call"); + var _return_1644 = (type_compare(ty1, + Coq_type_number()) + && type_compare(ty2, + Coq_type_string())); + log_event("JsInterpreter.js", 3870, ctx_push(ctx_732, [{key: "#RETURN_VALUE#", val: _return_1644}]), "return"); + return (_return_1644); + }()) + ; + log_event("JsInterpreter.js", 3908, ctx_732, "if"); + if (_if_arg_1643) { + var _return_1668 = (function () { + log_event("JsInterpreter.js", 3906, ctx_732, "call"); + var _return_1667 = dc_conv(v1, + conv_number, v2); + log_event("JsInterpreter.js", 3905, ctx_push(ctx_732, [{key: "#RETURN_VALUE#", val: _return_1667}]), "return"); + return (_return_1667); + }()) + ; + log_event("JsInterpreter.js", 3907, ctx_push(ctx_732, [{key: "#RETURN_VALUE#", val: _return_1668}]), "return"); + return (_return_1668); + } else { + var _if_arg_1645 = (function () { + log_event("JsInterpreter.js", 3873, ctx_732, "call"); + var _return_1646 = (type_compare(ty1, + Coq_type_string()) + && type_compare(ty2, + Coq_type_number())); + log_event("JsInterpreter.js", 3872, ctx_push(ctx_732, [{key: "#RETURN_VALUE#", val: _return_1646}]), "return"); + return (_return_1646); + }()) + ; + log_event("JsInterpreter.js", 3904, ctx_732, "if"); + if (_if_arg_1645) { + var _return_1666 = (function () { + log_event("JsInterpreter.js", 3902, ctx_732, "call"); + var _return_1665 = dc_conv(v2, + conv_number, v1); + log_event("JsInterpreter.js", 3901, ctx_push(ctx_732, [{key: "#RETURN_VALUE#", val: _return_1665}]), "return"); + return (_return_1665); + }()) + ; + log_event("JsInterpreter.js", 3903, ctx_push(ctx_732, [{key: "#RETURN_VALUE#", val: _return_1666}]), "return"); + return (_return_1666); + } else { + var _if_arg_1647 = type_compare(ty1, + Coq_type_bool()); + log_event("JsInterpreter.js", 3900, ctx_732, "if"); + if (_if_arg_1647) { + var _return_1664 = (function () { + log_event("JsInterpreter.js", 3898, ctx_732, "call"); + var _return_1663 = dc_conv(v2, + conv_number, v1); + log_event("JsInterpreter.js", 3897, ctx_push(ctx_732, [{key: "#RETURN_VALUE#", val: _return_1663}]), "return"); + return (_return_1663); + }()) + ; + log_event("JsInterpreter.js", 3899, ctx_push(ctx_732, [{key: "#RETURN_VALUE#", val: _return_1664}]), "return"); + return (_return_1664); + } else { + var _if_arg_1648 = type_compare(ty2, + Coq_type_bool()); + log_event("JsInterpreter.js", 3896, ctx_732, "if"); + if (_if_arg_1648) { + var _return_1662 = (function () { + log_event("JsInterpreter.js", 3894, ctx_732, "call"); + var _return_1661 = dc_conv(v1, + conv_number, + v2); + log_event("JsInterpreter.js", 3893, ctx_push(ctx_732, [{key: "#RETURN_VALUE#", val: _return_1661}]), "return"); + return (_return_1661); + }()) + ; + log_event("JsInterpreter.js", 3895, ctx_push(ctx_732, [{key: "#RETURN_VALUE#", val: _return_1662}]), "return"); + return (_return_1662); + } else { + var _if_arg_1649 = (function () { + log_event("JsInterpreter.js", 3877, ctx_732, "call"); + var _return_1651 = ((function () { + log_event("JsInterpreter.js", 3875, ctx_732, "call"); + var _return_1650 = + (type_compare( + ty1, + Coq_type_string( + )) + || type_compare( + ty1, + Coq_type_number( + ))); + log_event("JsInterpreter.js", 3874, ctx_push(ctx_732, [{key: "#RETURN_VALUE#", val: _return_1650}]), "return"); + return (_return_1650); + }()) + && type_compare( + ty2, + Coq_type_object( + ))); + log_event("JsInterpreter.js", 3876, ctx_push(ctx_732, [{key: "#RETURN_VALUE#", val: _return_1651}]), "return"); + return (_return_1651); + }()) + ; + log_event("JsInterpreter.js", 3892, ctx_732, "if"); + if (_if_arg_1649) { + var _return_1660 = (function () { + log_event("JsInterpreter.js", 3890, ctx_732, "call"); + var _return_1659 = dc_conv(v1, + conv_primitive, + v2); + log_event("JsInterpreter.js", 3889, ctx_push(ctx_732, [{key: "#RETURN_VALUE#", val: _return_1659}]), "return"); + return (_return_1659); + }()) + ; + log_event("JsInterpreter.js", 3891, ctx_push(ctx_732, [{key: "#RETURN_VALUE#", val: _return_1660}]), "return"); + return (_return_1660); + } else { + var _if_arg_1652 = (function () { + log_event("JsInterpreter.js", 3881, ctx_732, "call"); + var _return_1654 = (type_compare( + ty1, + Coq_type_object( + )) + && (function () { + log_event("JsInterpreter.js", 3879, ctx_732, "call"); + var _return_1653 = + (type_compare( + ty2, + Coq_type_string( + )) + || type_compare( + ty2, + Coq_type_number( + ))); + log_event("JsInterpreter.js", 3878, ctx_push(ctx_732, [{key: "#RETURN_VALUE#", val: _return_1653}]), "return"); + return (_return_1653); + }())); + log_event("JsInterpreter.js", 3880, ctx_push(ctx_732, [{key: "#RETURN_VALUE#", val: _return_1654}]), "return"); + return (_return_1654); + }()) + ; + log_event("JsInterpreter.js", 3888, ctx_732, "if"); + if (_if_arg_1652) { + var _return_1658 = (function () { + log_event("JsInterpreter.js", 3886, ctx_732, "call"); + var _return_1657 = dc_conv(v2, + conv_primitive, + v1); + log_event("JsInterpreter.js", 3885, ctx_push(ctx_732, [{key: "#RETURN_VALUE#", val: _return_1657}]), "return"); + return (_return_1657); + }()) + ; + log_event("JsInterpreter.js", 3887, ctx_push(ctx_732, [{key: "#RETURN_VALUE#", val: _return_1658}]), "return"); + return (_return_1658); + } else { + var _return_1656 = (function () { + log_event("JsInterpreter.js", 3883, ctx_732, "call"); + var _return_1655 = so(false); + log_event("JsInterpreter.js", 3882, ctx_push(ctx_732, [{key: "#RETURN_VALUE#", val: _return_1655}]), "return"); + return (_return_1655); + }()) + ; + log_event("JsInterpreter.js", 3884, ctx_push(ctx_732, [{key: "#RETURN_VALUE#", val: _return_1656}]), "return"); + return (_return_1656); + } + } + } + } + } + } + } + } + + }); + log_event("JsInterpreter.js", 3920, ctx_push(ctx_726, [{key: "#RETURN_VALUE#", val: _return_1673}]), "return"); + return (_return_1673); + }()) + ; + log_event("JsInterpreter.js", 3922, ctx_push(ctx_726, [{key: "#RETURN_VALUE#", val: _return_1674}]), "return"); + return (_return_1674); + + + +}; + +var convert_twice = function (ifv, kC, s, v1, v2) { + var ctx_733 = ctx_push(ctx_empty, [{key: "ifv", val: ifv}, {key: "kC", val: kC}, {key: "s", val: s}, {key: "v1", val: v1}, {key: "v2", val: v2}]); + log_event("JsInterpreter.js", 3940, ctx_733, "enter"); + var _return_1681 = (function () { + log_event("JsInterpreter.js", 3938, ctx_733, "call"); + var _return_1680 = ifv((function () { + log_event("JsInterpreter.js", 3928, ctx_733, "call"); + var _return_1675 = kC(s, v1); + log_event("JsInterpreter.js", 3927, ctx_push(ctx_733, [{key: "#RETURN_VALUE#", val: _return_1675}]), "return"); + return (_return_1675); }()), function (s1, vc1) { + var ctx_734 = ctx_push(ctx_733, [{key: "s1", val: s1}, {key: "vc1", val: vc1}]); + log_event("JsInterpreter.js", 3936, ctx_734, "enter"); + var _return_1679 = (function () { + log_event("JsInterpreter.js", 3934, ctx_734, "call"); + var _return_1678 = ifv((function () { + log_event("JsInterpreter.js", 3930, ctx_734, "call"); + var _return_1676 = + kC(s1, v2); + log_event("JsInterpreter.js", 3929, ctx_push(ctx_734, [{key: "#RETURN_VALUE#", val: _return_1676}]), "return"); + return (_return_1676); + }()), function (s2, vc2) { + var ctx_735 = ctx_push(ctx_734, [{key: "s2", val: s2}, {key: "vc2", val: vc2}]); + log_event("JsInterpreter.js", 3932, ctx_735, "enter"); + var _return_1677 = + res_spec(s2, [vc1, vc2]); + log_event("JsInterpreter.js", 3931, ctx_push(ctx_735, [{key: "#RETURN_VALUE#", val: _return_1677}]), "return"); + return (_return_1677); }); + log_event("JsInterpreter.js", 3933, ctx_push(ctx_734, [{key: "#RETURN_VALUE#", val: _return_1678}]), "return"); + return (_return_1678); + }()) + ; + log_event("JsInterpreter.js", 3935, ctx_push(ctx_734, [{key: "#RETURN_VALUE#", val: _return_1679}]), "return"); + return (_return_1679); }); + log_event("JsInterpreter.js", 3937, ctx_push(ctx_733, [{key: "#RETURN_VALUE#", val: _return_1680}]), "return"); + return (_return_1680); + }()) + ; + log_event("JsInterpreter.js", 3939, ctx_push(ctx_733, [{key: "#RETURN_VALUE#", val: _return_1681}]), "return"); + return (_return_1681); +}; + +var convert_twice_primitive = function (s, c, v1, v2) { + var ctx_736 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "v1", val: v1}, {key: "v2", val: v2}]); + log_event("JsInterpreter.js", 3948, ctx_736, "enter"); + var _return_1685 = (function () { + log_event("JsInterpreter.js", 3946, ctx_736, "call"); + var _return_1684 = convert_twice(ifx_prim, function (s0, v) { + var ctx_737 = ctx_push(ctx_736, [{key: "s0", val: s0}, {key: "v", val: v}]); + log_event("JsInterpreter.js", 3944, ctx_737, "enter"); + var _return_1683 = (function () { + log_event("JsInterpreter.js", 3942, ctx_737, "call"); + var _return_1682 = to_primitive(s0, c, v, + None()); + log_event("JsInterpreter.js", 3941, ctx_push(ctx_737, [{key: "#RETURN_VALUE#", val: _return_1682}]), "return"); + return (_return_1682); + }()) + ; + log_event("JsInterpreter.js", 3943, ctx_push(ctx_737, [{key: "#RETURN_VALUE#", val: _return_1683}]), "return"); + return (_return_1683); }, s, v1, v2); + log_event("JsInterpreter.js", 3945, ctx_push(ctx_736, [{key: "#RETURN_VALUE#", val: _return_1684}]), "return"); + return (_return_1684); + }()) + ; + log_event("JsInterpreter.js", 3947, ctx_push(ctx_736, [{key: "#RETURN_VALUE#", val: _return_1685}]), "return"); + return (_return_1685); +}; + +var convert_twice_number = function (s, c, v1, v2) { + var ctx_738 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "v1", val: v1}, {key: "v2", val: v2}]); + log_event("JsInterpreter.js", 3956, ctx_738, "enter"); + var _return_1689 = (function () { + log_event("JsInterpreter.js", 3954, ctx_738, "call"); + var _return_1688 = convert_twice(ifx_number, function (s0, v) { + var ctx_739 = ctx_push(ctx_738, [{key: "s0", val: s0}, {key: "v", val: v}]); + log_event("JsInterpreter.js", 3952, ctx_739, "enter"); + var _return_1687 = (function () { + log_event("JsInterpreter.js", 3950, ctx_739, "call"); + var _return_1686 = to_number(s0, c, v); + log_event("JsInterpreter.js", 3949, ctx_push(ctx_739, [{key: "#RETURN_VALUE#", val: _return_1686}]), "return"); + return (_return_1686); + }()) + ; + log_event("JsInterpreter.js", 3951, ctx_push(ctx_739, [{key: "#RETURN_VALUE#", val: _return_1687}]), "return"); + return (_return_1687); }, s, v1, v2); + log_event("JsInterpreter.js", 3953, ctx_push(ctx_738, [{key: "#RETURN_VALUE#", val: _return_1688}]), "return"); + return (_return_1688); + }()) + ; + log_event("JsInterpreter.js", 3955, ctx_push(ctx_738, [{key: "#RETURN_VALUE#", val: _return_1689}]), "return"); + return (_return_1689); +}; + +var convert_twice_string = function (s, c, v1, v2) { + var ctx_740 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "v1", val: v1}, {key: "v2", val: v2}]); + log_event("JsInterpreter.js", 3964, ctx_740, "enter"); + var _return_1693 = (function () { + log_event("JsInterpreter.js", 3962, ctx_740, "call"); + var _return_1692 = convert_twice(ifx_string, function (s0, v) { + var ctx_741 = ctx_push(ctx_740, [{key: "s0", val: s0}, {key: "v", val: v}]); + log_event("JsInterpreter.js", 3960, ctx_741, "enter"); + var _return_1691 = (function () { + log_event("JsInterpreter.js", 3958, ctx_741, "call"); + var _return_1690 = to_string(s0, c, v); + log_event("JsInterpreter.js", 3957, ctx_push(ctx_741, [{key: "#RETURN_VALUE#", val: _return_1690}]), "return"); + return (_return_1690); + }()) + ; + log_event("JsInterpreter.js", 3959, ctx_push(ctx_741, [{key: "#RETURN_VALUE#", val: _return_1691}]), "return"); + return (_return_1691); }, s, v1, v2); + log_event("JsInterpreter.js", 3961, ctx_push(ctx_740, [{key: "#RETURN_VALUE#", val: _return_1692}]), "return"); + return (_return_1692); + }()) + ; + log_event("JsInterpreter.js", 3963, ctx_push(ctx_740, [{key: "#RETURN_VALUE#", val: _return_1693}]), "return"); + return (_return_1693); +}; + +var issome = function (_foo_) { + var ctx_742 = ctx_push(ctx_empty, [{key: "_foo_", val: _foo_}]); + log_event("JsInterpreter.js", 3970, ctx_742, "enter"); + log_event("JsInterpreter.js", 3969, ctx_742, "switch"); + switch (_foo_.tag) { + case "Some": + var t = _foo_.value;var ctx_743 = ctx_push(ctx_742, [{key: "t", val: t}]); + log_event("JsInterpreter.js", 3966, ctx_743, "case"); + + var _return_1694 = true; + log_event("JsInterpreter.js", 3965, ctx_push(ctx_743, [{key: "#RETURN_VALUE#", val: _return_1694}]), "return"); + return (_return_1694); + case "None":log_event("JsInterpreter.js", 3968, ctx_742, "case"); + + var _return_1695 = false; + log_event("JsInterpreter.js", 3967, ctx_push(ctx_742, [{key: "#RETURN_VALUE#", val: _return_1695}]), "return"); + return (_return_1695); + } + +}; + +var run_binary_op_add = function (s, c, v1, v2) { + var ctx_744 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "v1", val: v1}, {key: "v2", val: v2}]); + log_event("JsInterpreter.js", 4002, ctx_744, "enter"); + var _return_1712 = if_run((function () { + log_event("JsInterpreter.js", 3972, ctx_744, "call"); + var _return_1696 = convert_twice_primitive(s, c, v1, + v2); + log_event("JsInterpreter.js", 3971, ctx_push(ctx_744, [{key: "#RETURN_VALUE#", val: _return_1696}]), "return"); + return (_return_1696); }()), function(s1, + _tuple_arg_1711) { + var w1 = _tuple_arg_1711[0], + w2 = _tuple_arg_1711[1]; + + var ctx_745 = ctx_push(ctx_744, [{key: "s1", val: s1}, {key: "w1", val: w1}, {key: "w2", val: w2}]); + log_event("JsInterpreter.js", 4000, ctx_745, "let"); + var _if_arg_1697 = (function () { + log_event("JsInterpreter.js", 3978, ctx_745, "call"); + var _return_1700 = (type_compare((function () { + log_event("JsInterpreter.js", 3974, ctx_745, "call"); + var _return_1698 = + type_of( + Coq_value_prim(w1)); + log_event("JsInterpreter.js", 3973, ctx_push(ctx_745, [{key: "#RETURN_VALUE#", val: _return_1698}]), "return"); + return (_return_1698); + }()), Coq_type_string()) + || type_compare((function () { + log_event("JsInterpreter.js", 3976, ctx_745, "call"); + var _return_1699 = + type_of( + Coq_value_prim(w2)); + log_event("JsInterpreter.js", 3975, ctx_push(ctx_745, [{key: "#RETURN_VALUE#", val: _return_1699}]), "return"); + return (_return_1699); + }()), Coq_type_string())); + log_event("JsInterpreter.js", 3977, ctx_push(ctx_745, [{key: "#RETURN_VALUE#", val: _return_1700}]), "return"); + return (_return_1700); + }()) + ; + log_event("JsInterpreter.js", 3997, ctx_745, "if"); + if (_if_arg_1697) { + var _return_1710 = if_run((function () { + log_event("JsInterpreter.js", 3989, ctx_745, "call"); + var _return_1706 = + convert_twice_string(s1, c, + Coq_value_prim(w1), + Coq_value_prim(w2)); + log_event("JsInterpreter.js", 3988, ctx_push(ctx_745, [{key: "#RETURN_VALUE#", val: _return_1706}]), "return"); + return (_return_1706); }()) + , function(s2, + _tuple_arg_1709) { + var str1 = _tuple_arg_1709[0], + str2 = _tuple_arg_1709[1]; + + var ctx_747 = ctx_push(ctx_745, [{key: "s2", val: s2}, {key: "str1", val: str1}, {key: "str2", val: str2}]); + log_event("JsInterpreter.js", 3995, ctx_747, "let"); + var _return_1708 = + res_out( + Coq_out_ter(s2, + res_val( + Coq_value_prim( + Coq_prim_string( + (function () { + log_event("JsInterpreter.js", 3991, ctx_747, "call"); + var _return_1707 = + strappend(str1, + str2); + log_event("JsInterpreter.js", 3990, ctx_push(ctx_747, [{key: "#RETURN_VALUE#", val: _return_1707}]), "return"); + return (_return_1707); + }())))))); + log_event("JsInterpreter.js", 3992, ctx_push(ctx_747, [{key: "#RETURN_VALUE#", val: _return_1708}]), "return"); + return (_return_1708); + }); + log_event("JsInterpreter.js", 3996, ctx_push(ctx_745, [{key: "#RETURN_VALUE#", val: _return_1710}]), "return"); + return (_return_1710); + } else { + var _return_1705 = if_run((function () { + log_event("JsInterpreter.js", 3980, ctx_745, "call"); + var _return_1701 = + convert_twice_number(s1, c, + Coq_value_prim(w1), + Coq_value_prim(w2)); + log_event("JsInterpreter.js", 3979, ctx_push(ctx_745, [{key: "#RETURN_VALUE#", val: _return_1701}]), "return"); + return (_return_1701); }()) + , function(s2, + _tuple_arg_1704) { + var n1 = _tuple_arg_1704[0], + n2 = _tuple_arg_1704[1]; + + var ctx_746 = ctx_push(ctx_745, [{key: "s2", val: s2}, {key: "n1", val: n1}, {key: "n2", val: n2}]); + log_event("JsInterpreter.js", 3986, ctx_746, "let"); + var _return_1703 = + res_out( + Coq_out_ter(s2, + res_val( + Coq_value_prim( + Coq_prim_number( + (function () { + log_event("JsInterpreter.js", 3982, ctx_746, "call"); + var _return_1702 = + (n1 + n2); + log_event("JsInterpreter.js", 3981, ctx_push(ctx_746, [{key: "#RETURN_VALUE#", val: _return_1702}]), "return"); + return (_return_1702); + }())))))); + log_event("JsInterpreter.js", 3983, ctx_push(ctx_746, [{key: "#RETURN_VALUE#", val: _return_1703}]), "return"); + return (_return_1703); + }); + log_event("JsInterpreter.js", 3987, ctx_push(ctx_745, [{key: "#RETURN_VALUE#", val: _return_1705}]), "return"); + return (_return_1705); + } + }); + log_event("JsInterpreter.js", 4001, ctx_push(ctx_744, [{key: "#RETURN_VALUE#", val: _return_1712}]), "return"); + return (_return_1712); +}; + +var run_binary_op_arith = function (mathop, s, c, v1, v2) { + var ctx_748 = ctx_push(ctx_empty, [{key: "mathop", val: mathop}, {key: "s", val: s}, {key: "c", val: c}, {key: "v1", val: v1}, {key: "v2", val: v2}]); + log_event("JsInterpreter.js", 4013, ctx_748, "enter"); + var _return_1716 = if_run((function () { + log_event("JsInterpreter.js", 4004, ctx_748, "call"); + var _return_1713 = convert_twice_number(s, c, v1, + v2); + log_event("JsInterpreter.js", 4003, ctx_push(ctx_748, [{key: "#RETURN_VALUE#", val: _return_1713}]), "return"); + return (_return_1713); }()), function(s1, nn) { + + var ctx_749 = ctx_push(ctx_748, [{key: "s1", val: s1}, {key: "nn", val: nn}]); + log_event("JsInterpreter.js", 4011, ctx_749, "let"); + var n1 = nn[0], n2 = nn[1]; + var ctx_750 = ctx_push(ctx_749, [{key: "n1", val: n1}, {key: "n2", val: n2}]); + log_event("JsInterpreter.js", 4008, ctx_750, "let"); + var _return_1715 = res_out( + Coq_out_ter(s1, + res_val( + Coq_value_prim( + Coq_prim_number( + (function () { + log_event("JsInterpreter.js", 4006, ctx_750, "call"); + var _return_1714 = + mathop(n1, n2); + log_event("JsInterpreter.js", 4005, ctx_push(ctx_750, [{key: "#RETURN_VALUE#", val: _return_1714}]), "return"); + return (_return_1714); + }())))))); + log_event("JsInterpreter.js", 4007, ctx_push(ctx_750, [{key: "#RETURN_VALUE#", val: _return_1715}]), "return"); + return (_return_1715); + + }); + log_event("JsInterpreter.js", 4012, ctx_push(ctx_748, [{key: "#RETURN_VALUE#", val: _return_1716}]), "return"); + return (_return_1716); +}; + +var run_binary_op_shift = function (b_unsigned, mathop, s, c, v1, v2) { + var ctx_751 = ctx_push(ctx_empty, [{key: "b_unsigned", val: b_unsigned}, {key: "mathop", val: mathop}, {key: "s", val: s}, {key: "c", val: c}, {key: "v1", val: v1}, {key: "v2", val: v2}]); + log_event("JsInterpreter.js", 4034, ctx_751, "enter"); + log_event("JsInterpreter.js", 4014, ctx_751, "if"); + if (b_unsigned) { + var conv = to_uint32; + } else { + var conv = to_int32; + } + var ctx_752 = ctx_push(ctx_751, [{key: "conv", val: conv}]); + log_event("JsInterpreter.js", 4033, ctx_752, "let"); + var _return_1723 = if_run((function () { + log_event("JsInterpreter.js", 4016, ctx_752, "call"); + var _return_1717 = conv(s, c, v1); + log_event("JsInterpreter.js", 4015, ctx_push(ctx_752, [{key: "#RETURN_VALUE#", val: _return_1717}]), "return"); + return (_return_1717); }()), function(s1, k1) { + + var ctx_753 = ctx_push(ctx_752, [{key: "s1", val: s1}, {key: "k1", val: k1}]); + log_event("JsInterpreter.js", 4031, ctx_753, "let"); + var _return_1722 = if_run((function () { + log_event("JsInterpreter.js", 4018, ctx_753, "call"); + var _return_1718 = to_uint32( + s1, c, + v2); + log_event("JsInterpreter.js", 4017, ctx_push(ctx_753, [{key: "#RETURN_VALUE#", val: _return_1718}]), "return"); + return (_return_1718); }()), + function(s2, k2) { + + var ctx_754 = ctx_push(ctx_753, [{key: "s2", val: s2}, {key: "k2", val: k2}]); + log_event("JsInterpreter.js", 4027, ctx_754, "let"); + var k2_2 = (function () { + log_event("JsInterpreter.js", 4020, ctx_754, "call"); + var _return_1719 = + JsNumber.modulo_32(k2); + log_event("JsInterpreter.js", 4019, ctx_push(ctx_754, [{key: "#RETURN_VALUE#", val: _return_1719}]), "return"); + return (_return_1719); + }()) + ; + var ctx_755 = ctx_push(ctx_754, [{key: "k2_2", val: k2_2}]); + log_event("JsInterpreter.js", 4024, ctx_755, "let"); + var _return_1721 = res_ter( + s2, + res_val( + Coq_value_prim( + Coq_prim_number( + (function () { + log_event("JsInterpreter.js", 4022, ctx_755, "call"); + var _return_1720 = + mathop( + k1, k2_2); + log_event("JsInterpreter.js", 4021, ctx_push(ctx_755, [{key: "#RETURN_VALUE#", val: _return_1720}]), "return"); + return (_return_1720); + }()))))); + log_event("JsInterpreter.js", 4023, ctx_push(ctx_755, [{key: "#RETURN_VALUE#", val: _return_1721}]), "return"); + return (_return_1721); + + }); + log_event("JsInterpreter.js", 4028, ctx_push(ctx_753, [{key: "#RETURN_VALUE#", val: _return_1722}]), "return"); + return (_return_1722); + }); + log_event("JsInterpreter.js", 4032, ctx_push(ctx_752, [{key: "#RETURN_VALUE#", val: _return_1723}]), "return"); + return (_return_1723); + +}; + +var run_binary_op_bitwise = function (mathop, s, c, v1, v2) { + var ctx_756 = ctx_push(ctx_empty, [{key: "mathop", val: mathop}, {key: "s", val: s}, {key: "c", val: c}, {key: "v1", val: v1}, {key: "v2", val: v2}]); + log_event("JsInterpreter.js", 4050, ctx_756, "enter"); + var _return_1729 = if_run((function () { + log_event("JsInterpreter.js", 4036, ctx_756, "call"); + var _return_1724 = to_int32(s, c, v1); + log_event("JsInterpreter.js", 4035, ctx_push(ctx_756, [{key: "#RETURN_VALUE#", val: _return_1724}]), "return"); + return (_return_1724); }()), function(s1, k1) { + + var ctx_757 = ctx_push(ctx_756, [{key: "s1", val: s1}, {key: "k1", val: k1}]); + log_event("JsInterpreter.js", 4048, ctx_757, "let"); + var _return_1728 = if_run((function () { + log_event("JsInterpreter.js", 4038, ctx_757, "call"); + var _return_1725 = to_int32( + s1, c, + v2); + log_event("JsInterpreter.js", 4037, ctx_push(ctx_757, [{key: "#RETURN_VALUE#", val: _return_1725}]), "return"); + return (_return_1725); }()), + function(s2, k2) { + + var ctx_758 = ctx_push(ctx_757, [{key: "s2", val: s2}, {key: "k2", val: k2}]); + log_event("JsInterpreter.js", 4044, ctx_758, "let"); + var _return_1727 = res_ter( + s2, + res_val( + Coq_value_prim( + Coq_prim_number( + (function () { + log_event("JsInterpreter.js", 4040, ctx_758, "call"); + var _return_1726 = + mathop( + k1, k2); + log_event("JsInterpreter.js", 4039, ctx_push(ctx_758, [{key: "#RETURN_VALUE#", val: _return_1726}]), "return"); + return (_return_1726); + }()))))); + log_event("JsInterpreter.js", 4041, ctx_push(ctx_758, [{key: "#RETURN_VALUE#", val: _return_1727}]), "return"); + return (_return_1727); + }); + log_event("JsInterpreter.js", 4045, ctx_push(ctx_757, [{key: "#RETURN_VALUE#", val: _return_1728}]), "return"); + return (_return_1728); + }); + log_event("JsInterpreter.js", 4049, ctx_push(ctx_756, [{key: "#RETURN_VALUE#", val: _return_1729}]), "return"); + return (_return_1729); +}; + +var run_binary_op_compare = function (b_swap, b_neg, s, c, v1, v2) { + var ctx_759 = ctx_push(ctx_empty, [{key: "b_swap", val: b_swap}, {key: "b_neg", val: b_neg}, {key: "s", val: s}, {key: "c", val: c}, {key: "v1", val: v1}, {key: "v2", val: v2}]); + log_event("JsInterpreter.js", 4075, ctx_759, "enter"); + var _return_1741 = if_run((function () { + log_event("JsInterpreter.js", 4052, ctx_759, "call"); + var _return_1730 = convert_twice_primitive(s, c, v1, + v2); + log_event("JsInterpreter.js", 4051, ctx_push(ctx_759, [{key: "#RETURN_VALUE#", val: _return_1730}]), "return"); + return (_return_1730); }()), function(s1, ww) { + + var ctx_760 = ctx_push(ctx_759, [{key: "s1", val: s1}, {key: "ww", val: ww}]); + log_event("JsInterpreter.js", 4073, ctx_760, "let"); + var w1 = ww[0], w2 = ww[1]; + var ctx_761 = ctx_push(ctx_760, [{key: "w1", val: w1}, {key: "w2", val: w2}]); + log_event("JsInterpreter.js", 4070, ctx_761, "let"); + log_event("JsInterpreter.js", 4053, ctx_761, "if"); + if (b_swap) { + var p = [w2, w1]; + } else { + var p = [w1, w2]; + } + var ctx_762 = ctx_push(ctx_761, [{key: "p", val: p}]); + log_event("JsInterpreter.js", 4069, ctx_762, "let"); + var wa = p[0], wb = p[1]; + var ctx_763 = ctx_push(ctx_762, [{key: "wa", val: wa}, {key: "wb", val: wb}]); + log_event("JsInterpreter.js", 4068, ctx_763, "let"); + var wr = (function () { + log_event("JsInterpreter.js", 4055, ctx_763, "call"); + var _return_1731 = inequality_test_primitive(wa, + wb); + log_event("JsInterpreter.js", 4054, ctx_push(ctx_763, [{key: "#RETURN_VALUE#", val: _return_1731}]), "return"); + return (_return_1731); + }()) + ; + var ctx_764 = ctx_push(ctx_763, [{key: "wr", val: wr}]); + log_event("JsInterpreter.js", 4067, ctx_764, "let"); + var _if_arg_1732 = prim_compare(wr, + Coq_prim_undef()); + log_event("JsInterpreter.js", 4066, ctx_764, "if"); + if (_if_arg_1732) { + var _return_1740 = res_out( + Coq_out_ter(s1, + res_val( + Coq_value_prim( + Coq_prim_bool(false))))); + log_event("JsInterpreter.js", 4065, ctx_push(ctx_764, [{key: "#RETURN_VALUE#", val: _return_1740}]), "return"); + return (_return_1740); + } else { + var _if_arg_1733 = (function () { + log_event("JsInterpreter.js", 4057, ctx_764, "call"); + var _return_1734 = (b_neg + && prim_compare(wr, + Coq_prim_bool(true))); + log_event("JsInterpreter.js", 4056, ctx_push(ctx_764, [{key: "#RETURN_VALUE#", val: _return_1734}]), "return"); + return (_return_1734); + }()) + ; + log_event("JsInterpreter.js", 4064, ctx_764, "if"); + if (_if_arg_1733) { + var _return_1739 = res_out( + Coq_out_ter(s1, + res_val( + Coq_value_prim( + Coq_prim_bool(false))))); + log_event("JsInterpreter.js", 4063, ctx_push(ctx_764, [{key: "#RETURN_VALUE#", val: _return_1739}]), "return"); + return (_return_1739); + } else { + var _if_arg_1735 = (function () { + log_event("JsInterpreter.js", 4059, ctx_764, "call"); + var _return_1736 = (b_neg + && prim_compare(wr, + Coq_prim_bool(false))); + log_event("JsInterpreter.js", 4058, ctx_push(ctx_764, [{key: "#RETURN_VALUE#", val: _return_1736}]), "return"); + return (_return_1736); + }()) + ; + log_event("JsInterpreter.js", 4062, ctx_764, "if"); + if (_if_arg_1735) { + var _return_1738 = res_out( + Coq_out_ter(s1, + res_val( + Coq_value_prim( + Coq_prim_bool(true))))); + log_event("JsInterpreter.js", 4061, ctx_push(ctx_764, [{key: "#RETURN_VALUE#", val: _return_1738}]), "return"); + return (_return_1738); + } else { + var _return_1737 = res_out( + Coq_out_ter(s1, + res_val( + Coq_value_prim(wr)))); + log_event("JsInterpreter.js", 4060, ctx_push(ctx_764, [{key: "#RETURN_VALUE#", val: _return_1737}]), "return"); + return (_return_1737); + } + } + } + + + + + }); + log_event("JsInterpreter.js", 4074, ctx_push(ctx_759, [{key: "#RETURN_VALUE#", val: _return_1741}]), "return"); + return (_return_1741); +}; + +var run_binary_op_instanceof = function (s, c, v1, v2) { + var ctx_765 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "v1", val: v1}, {key: "v2", val: v2}]); + log_event("JsInterpreter.js", 4097, ctx_765, "enter"); + log_event("JsInterpreter.js", 4096, ctx_765, "switch"); + switch (v2.tag) { + case "Coq_value_prim": + var p = v2.value;var ctx_766 = ctx_push(ctx_765, [{key: "p", val: p}]); + log_event("JsInterpreter.js", 4079, ctx_766, "case"); + + var _return_1743 = (function () { + log_event("JsInterpreter.js", 4077, ctx_766, "call"); + var _return_1742 = run_error(s, Coq_native_error_type()); + log_event("JsInterpreter.js", 4076, ctx_push(ctx_766, [{key: "#RETURN_VALUE#", val: _return_1742}]), "return"); + return (_return_1742); + }()) + ; + log_event("JsInterpreter.js", 4078, ctx_push(ctx_766, [{key: "#RETURN_VALUE#", val: _return_1743}]), "return"); + return (_return_1743); + case "Coq_value_object": + var l = v2.value;var ctx_767 = ctx_push(ctx_765, [{key: "l", val: l}]); + log_event("JsInterpreter.js", 4095, ctx_767, "case"); + + var _return_1749 = if_some((function () { + log_event("JsInterpreter.js", 4081, ctx_767, "call"); + var _return_1744 = run_object_method( + object_has_instance_, s, l); + log_event("JsInterpreter.js", 4080, ctx_push(ctx_767, [{key: "#RETURN_VALUE#", val: _return_1744}]), "return"); + return (_return_1744); }()), function(b) { + + var ctx_768 = ctx_push(ctx_767, [{key: "b", val: b}]); + log_event("JsInterpreter.js", 4093, ctx_768, "let"); + log_event("JsInterpreter.js", 4090, ctx_768, "switch"); + switch (b.tag) { + case "None":log_event("JsInterpreter.js", 4085, ctx_768, "case"); + + var _return_1746 = (function () { + log_event("JsInterpreter.js", 4083, ctx_768, "call"); + var _return_1745 = run_error(s, + Coq_native_error_type( + )); + log_event("JsInterpreter.js", 4082, ctx_push(ctx_768, [{key: "#RETURN_VALUE#", val: _return_1745}]), "return"); + return (_return_1745); + }()) + ; + log_event("JsInterpreter.js", 4084, ctx_push(ctx_768, [{key: "#RETURN_VALUE#", val: _return_1746}]), "return"); + return (_return_1746); + case "Some": + var has_instance_id = b.value;var ctx_769 = ctx_push(ctx_768, [{key: "has_instance_id", val: has_instance_id}]); + log_event("JsInterpreter.js", 4089, ctx_769, "case"); + + var _return_1748 = (function () { + log_event("JsInterpreter.js", 4087, ctx_769, "call"); + var _return_1747 = run_object_has_instance( + s, c, + has_instance_id, l, + v1); + log_event("JsInterpreter.js", 4086, ctx_push(ctx_769, [{key: "#RETURN_VALUE#", val: _return_1747}]), "return"); + return (_return_1747); + }()) + ; + log_event("JsInterpreter.js", 4088, ctx_push(ctx_769, [{key: "#RETURN_VALUE#", val: _return_1748}]), "return"); + return (_return_1748); + } + + }); + log_event("JsInterpreter.js", 4094, ctx_push(ctx_767, [{key: "#RETURN_VALUE#", val: _return_1749}]), "return"); + return (_return_1749); + } + +}; + +var run_binary_op_in = function (s, c, v1, v2) { + var ctx_770 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "v1", val: v1}, {key: "v2", val: v2}]); + log_event("JsInterpreter.js", 4113, ctx_770, "enter"); + log_event("JsInterpreter.js", 4112, ctx_770, "switch"); + switch (v2.tag) { + case "Coq_value_prim": + var p = v2.value;var ctx_771 = ctx_push(ctx_770, [{key: "p", val: p}]); + log_event("JsInterpreter.js", 4101, ctx_771, "case"); + + var _return_1751 = (function () { + log_event("JsInterpreter.js", 4099, ctx_771, "call"); + var _return_1750 = run_error(s, Coq_native_error_type()); + log_event("JsInterpreter.js", 4098, ctx_push(ctx_771, [{key: "#RETURN_VALUE#", val: _return_1750}]), "return"); + return (_return_1750); + }()) + ; + log_event("JsInterpreter.js", 4100, ctx_push(ctx_771, [{key: "#RETURN_VALUE#", val: _return_1751}]), "return"); + return (_return_1751); + case "Coq_value_object": + var l = v2.value;var ctx_772 = ctx_push(ctx_770, [{key: "l", val: l}]); + log_event("JsInterpreter.js", 4111, ctx_772, "case"); + + var _return_1755 = if_string((function () { + log_event("JsInterpreter.js", 4103, ctx_772, "call"); + var _return_1752 = to_string(s, c, v1); + log_event("JsInterpreter.js", 4102, ctx_push(ctx_772, [{key: "#RETURN_VALUE#", val: _return_1752}]), "return"); + return (_return_1752); }()), function(s2, x) { + + var ctx_773 = ctx_push(ctx_772, [{key: "s2", val: s2}, {key: "x", val: x}]); + log_event("JsInterpreter.js", 4109, ctx_773, "let"); + var _return_1754 = (function () { + log_event("JsInterpreter.js", 4105, ctx_773, "call"); + var _return_1753 = object_has_prop(s2, c, l, + x); + log_event("JsInterpreter.js", 4104, ctx_push(ctx_773, [{key: "#RETURN_VALUE#", val: _return_1753}]), "return"); + return (_return_1753); + }()) + ; + log_event("JsInterpreter.js", 4106, ctx_push(ctx_773, [{key: "#RETURN_VALUE#", val: _return_1754}]), "return"); + return (_return_1754); + }); + log_event("JsInterpreter.js", 4110, ctx_push(ctx_772, [{key: "#RETURN_VALUE#", val: _return_1755}]), "return"); + return (_return_1755); + } + +}; + +var run_binary_op = function (s, c, op, v1, v2) { + var ctx_774 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "op", val: op}, {key: "v1", val: v1}, {key: "v2", val: v2}]); + log_event("JsInterpreter.js", 4229, ctx_774, "enter"); + log_event("JsInterpreter.js", 4228, ctx_774, "switch"); + switch (op.tag) { + case "Coq_binary_op_mult":log_event("JsInterpreter.js", 4121, ctx_774, "case"); + + var _return_1759 = (function () { + log_event("JsInterpreter.js", 4119, ctx_774, "call"); + var _return_1758 = run_binary_op_arith(function (x, y) { + var ctx_775 = ctx_push(ctx_774, [{key: "x", val: x}, {key: "y", val: y}]); + log_event("JsInterpreter.js", 4117, ctx_775, "enter"); + var _return_1757 = (function () { + log_event("JsInterpreter.js", 4115, ctx_775, "call"); + var _return_1756 = (x * y); + log_event("JsInterpreter.js", 4114, ctx_push(ctx_775, [{key: "#RETURN_VALUE#", val: _return_1756}]), "return"); + return (_return_1756); + }()) + ; + log_event("JsInterpreter.js", 4116, ctx_push(ctx_775, [{key: "#RETURN_VALUE#", val: _return_1757}]), "return"); + return (_return_1757); }, s, c, v1, v2); + log_event("JsInterpreter.js", 4118, ctx_push(ctx_774, [{key: "#RETURN_VALUE#", val: _return_1758}]), "return"); + return (_return_1758); + }()) + ; + log_event("JsInterpreter.js", 4120, ctx_push(ctx_774, [{key: "#RETURN_VALUE#", val: _return_1759}]), "return"); + return (_return_1759); + case "Coq_binary_op_div":log_event("JsInterpreter.js", 4129, ctx_774, "case"); + + var _return_1763 = (function () { + log_event("JsInterpreter.js", 4127, ctx_774, "call"); + var _return_1762 = run_binary_op_arith(function (x, y) { + var ctx_776 = ctx_push(ctx_774, [{key: "x", val: x}, {key: "y", val: y}]); + log_event("JsInterpreter.js", 4125, ctx_776, "enter"); + var _return_1761 = (function () { + log_event("JsInterpreter.js", 4123, ctx_776, "call"); + var _return_1760 = (x / y); + log_event("JsInterpreter.js", 4122, ctx_push(ctx_776, [{key: "#RETURN_VALUE#", val: _return_1760}]), "return"); + return (_return_1760); + }()) + ; + log_event("JsInterpreter.js", 4124, ctx_push(ctx_776, [{key: "#RETURN_VALUE#", val: _return_1761}]), "return"); + return (_return_1761); }, s, c, v1, v2); + log_event("JsInterpreter.js", 4126, ctx_push(ctx_774, [{key: "#RETURN_VALUE#", val: _return_1762}]), "return"); + return (_return_1762); + }()) + ; + log_event("JsInterpreter.js", 4128, ctx_push(ctx_774, [{key: "#RETURN_VALUE#", val: _return_1763}]), "return"); + return (_return_1763); + case "Coq_binary_op_mod":log_event("JsInterpreter.js", 4137, ctx_774, "case"); + + var _return_1767 = (function () { + log_event("JsInterpreter.js", 4135, ctx_774, "call"); + var _return_1766 = run_binary_op_arith(function (x, y) { + var ctx_777 = ctx_push(ctx_774, [{key: "x", val: x}, {key: "y", val: y}]); + log_event("JsInterpreter.js", 4133, ctx_777, "enter"); + var _return_1765 = (function () { + log_event("JsInterpreter.js", 4131, ctx_777, "call"); + var _return_1764 = JsNumber.fmod(x, y); + log_event("JsInterpreter.js", 4130, ctx_push(ctx_777, [{key: "#RETURN_VALUE#", val: _return_1764}]), "return"); + return (_return_1764); + }()) + ; + log_event("JsInterpreter.js", 4132, ctx_push(ctx_777, [{key: "#RETURN_VALUE#", val: _return_1765}]), "return"); + return (_return_1765); }, s, c, v1, v2); + log_event("JsInterpreter.js", 4134, ctx_push(ctx_774, [{key: "#RETURN_VALUE#", val: _return_1766}]), "return"); + return (_return_1766); + }()) + ; + log_event("JsInterpreter.js", 4136, ctx_push(ctx_774, [{key: "#RETURN_VALUE#", val: _return_1767}]), "return"); + return (_return_1767); + case "Coq_binary_op_sub":log_event("JsInterpreter.js", 4145, ctx_774, "case"); + + var _return_1771 = (function () { + log_event("JsInterpreter.js", 4143, ctx_774, "call"); + var _return_1770 = run_binary_op_arith(function (x, y) { + var ctx_778 = ctx_push(ctx_774, [{key: "x", val: x}, {key: "y", val: y}]); + log_event("JsInterpreter.js", 4141, ctx_778, "enter"); + var _return_1769 = (function () { + log_event("JsInterpreter.js", 4139, ctx_778, "call"); + var _return_1768 = (x - y); + log_event("JsInterpreter.js", 4138, ctx_push(ctx_778, [{key: "#RETURN_VALUE#", val: _return_1768}]), "return"); + return (_return_1768); + }()) + ; + log_event("JsInterpreter.js", 4140, ctx_push(ctx_778, [{key: "#RETURN_VALUE#", val: _return_1769}]), "return"); + return (_return_1769); }, s, c, v1, v2); + log_event("JsInterpreter.js", 4142, ctx_push(ctx_774, [{key: "#RETURN_VALUE#", val: _return_1770}]), "return"); + return (_return_1770); + }()) + ; + log_event("JsInterpreter.js", 4144, ctx_push(ctx_774, [{key: "#RETURN_VALUE#", val: _return_1771}]), "return"); + return (_return_1771); + case "Coq_binary_op_lt":log_event("JsInterpreter.js", 4149, ctx_774, "case"); + + var _return_1773 = (function () { + log_event("JsInterpreter.js", 4147, ctx_774, "call"); + var _return_1772 = run_binary_op_compare(false, false, s, c, v1, v2); + log_event("JsInterpreter.js", 4146, ctx_push(ctx_774, [{key: "#RETURN_VALUE#", val: _return_1772}]), "return"); + return (_return_1772); + }()) + ; + log_event("JsInterpreter.js", 4148, ctx_push(ctx_774, [{key: "#RETURN_VALUE#", val: _return_1773}]), "return"); + return (_return_1773); + case "Coq_binary_op_gt":log_event("JsInterpreter.js", 4153, ctx_774, "case"); + + var _return_1775 = (function () { + log_event("JsInterpreter.js", 4151, ctx_774, "call"); + var _return_1774 = run_binary_op_compare(true, false, s, c, v1, v2); + log_event("JsInterpreter.js", 4150, ctx_push(ctx_774, [{key: "#RETURN_VALUE#", val: _return_1774}]), "return"); + return (_return_1774); + }()) + ; + log_event("JsInterpreter.js", 4152, ctx_push(ctx_774, [{key: "#RETURN_VALUE#", val: _return_1775}]), "return"); + return (_return_1775); + case "Coq_binary_op_le":log_event("JsInterpreter.js", 4157, ctx_774, "case"); + + var _return_1777 = (function () { + log_event("JsInterpreter.js", 4155, ctx_774, "call"); + var _return_1776 = run_binary_op_compare(true, true, s, c, v1, v2); + log_event("JsInterpreter.js", 4154, ctx_push(ctx_774, [{key: "#RETURN_VALUE#", val: _return_1776}]), "return"); + return (_return_1776); + }()) + ; + log_event("JsInterpreter.js", 4156, ctx_push(ctx_774, [{key: "#RETURN_VALUE#", val: _return_1777}]), "return"); + return (_return_1777); + case "Coq_binary_op_ge":log_event("JsInterpreter.js", 4161, ctx_774, "case"); + + var _return_1779 = (function () { + log_event("JsInterpreter.js", 4159, ctx_774, "call"); + var _return_1778 = run_binary_op_compare(false, true, s, c, v1, v2); + log_event("JsInterpreter.js", 4158, ctx_push(ctx_774, [{key: "#RETURN_VALUE#", val: _return_1778}]), "return"); + return (_return_1778); + }()) + ; + log_event("JsInterpreter.js", 4160, ctx_push(ctx_774, [{key: "#RETURN_VALUE#", val: _return_1779}]), "return"); + return (_return_1779); + case "Coq_binary_op_left_shift":log_event("JsInterpreter.js", 4165, ctx_774, "case"); + + var _return_1781 = (function () { + log_event("JsInterpreter.js", 4163, ctx_774, "call"); + var _return_1780 = run_binary_op_shift(false, + JsNumber.int32_left_shift, s, c, v1, v2); + log_event("JsInterpreter.js", 4162, ctx_push(ctx_774, [{key: "#RETURN_VALUE#", val: _return_1780}]), "return"); + return (_return_1780); + }()) + ; + log_event("JsInterpreter.js", 4164, ctx_push(ctx_774, [{key: "#RETURN_VALUE#", val: _return_1781}]), "return"); + return (_return_1781); + case "Coq_binary_op_right_shift":log_event("JsInterpreter.js", 4169, ctx_774, "case"); + + var _return_1783 = (function () { + log_event("JsInterpreter.js", 4167, ctx_774, "call"); + var _return_1782 = run_binary_op_shift(false, + JsNumber.int32_right_shift, s, c, v1, v2); + log_event("JsInterpreter.js", 4166, ctx_push(ctx_774, [{key: "#RETURN_VALUE#", val: _return_1782}]), "return"); + return (_return_1782); + }()) + ; + log_event("JsInterpreter.js", 4168, ctx_push(ctx_774, [{key: "#RETURN_VALUE#", val: _return_1783}]), "return"); + return (_return_1783); + case "Coq_binary_op_unsigned_right_shift":log_event("JsInterpreter.js", 4173, ctx_774, "case"); + + var _return_1785 = (function () { + log_event("JsInterpreter.js", 4171, ctx_774, "call"); + var _return_1784 = run_binary_op_shift(true, + JsNumber.uint32_right_shift, s, c, v1, v2); + log_event("JsInterpreter.js", 4170, ctx_push(ctx_774, [{key: "#RETURN_VALUE#", val: _return_1784}]), "return"); + return (_return_1784); + }()) + ; + log_event("JsInterpreter.js", 4172, ctx_push(ctx_774, [{key: "#RETURN_VALUE#", val: _return_1785}]), "return"); + return (_return_1785); + case "Coq_binary_op_bitwise_and":log_event("JsInterpreter.js", 4177, ctx_774, "case"); + + var _return_1787 = (function () { + log_event("JsInterpreter.js", 4175, ctx_774, "call"); + var _return_1786 = run_binary_op_bitwise(JsNumber.int32_bitwise_and, + s, c, v1, v2); + log_event("JsInterpreter.js", 4174, ctx_push(ctx_774, [{key: "#RETURN_VALUE#", val: _return_1786}]), "return"); + return (_return_1786); + }()) + ; + log_event("JsInterpreter.js", 4176, ctx_push(ctx_774, [{key: "#RETURN_VALUE#", val: _return_1787}]), "return"); + return (_return_1787); + case "Coq_binary_op_bitwise_or":log_event("JsInterpreter.js", 4181, ctx_774, "case"); + + var _return_1789 = (function () { + log_event("JsInterpreter.js", 4179, ctx_774, "call"); + var _return_1788 = run_binary_op_bitwise(JsNumber.int32_bitwise_or, + s, c, v1, v2); + log_event("JsInterpreter.js", 4178, ctx_push(ctx_774, [{key: "#RETURN_VALUE#", val: _return_1788}]), "return"); + return (_return_1788); + }()) + ; + log_event("JsInterpreter.js", 4180, ctx_push(ctx_774, [{key: "#RETURN_VALUE#", val: _return_1789}]), "return"); + return (_return_1789); + case "Coq_binary_op_bitwise_xor":log_event("JsInterpreter.js", 4185, ctx_774, "case"); + + var _return_1791 = (function () { + log_event("JsInterpreter.js", 4183, ctx_774, "call"); + var _return_1790 = run_binary_op_bitwise(JsNumber.int32_bitwise_xor, + s, c, v1, v2); + log_event("JsInterpreter.js", 4182, ctx_push(ctx_774, [{key: "#RETURN_VALUE#", val: _return_1790}]), "return"); + return (_return_1790); + }()) + ; + log_event("JsInterpreter.js", 4184, ctx_push(ctx_774, [{key: "#RETURN_VALUE#", val: _return_1791}]), "return"); + return (_return_1791); + case "Coq_binary_op_add":log_event("JsInterpreter.js", 4189, ctx_774, "case"); + + var _return_1793 = (function () { + log_event("JsInterpreter.js", 4187, ctx_774, "call"); + var _return_1792 = run_binary_op_add(s, c, v1, v2); + log_event("JsInterpreter.js", 4186, ctx_push(ctx_774, [{key: "#RETURN_VALUE#", val: _return_1792}]), "return"); + return (_return_1792); + }()) + ; + log_event("JsInterpreter.js", 4188, ctx_push(ctx_774, [{key: "#RETURN_VALUE#", val: _return_1793}]), "return"); + return (_return_1793); + case "Coq_binary_op_instanceof":log_event("JsInterpreter.js", 4193, ctx_774, "case"); + + var _return_1795 = (function () { + log_event("JsInterpreter.js", 4191, ctx_774, "call"); + var _return_1794 = run_binary_op_instanceof(s, c, v1, v2); + log_event("JsInterpreter.js", 4190, ctx_push(ctx_774, [{key: "#RETURN_VALUE#", val: _return_1794}]), "return"); + return (_return_1794); + }()) + ; + log_event("JsInterpreter.js", 4192, ctx_push(ctx_774, [{key: "#RETURN_VALUE#", val: _return_1795}]), "return"); + return (_return_1795); + case "Coq_binary_op_in":log_event("JsInterpreter.js", 4197, ctx_774, "case"); + + var _return_1797 = (function () { + log_event("JsInterpreter.js", 4195, ctx_774, "call"); + var _return_1796 = run_binary_op_in(s, c, v1, v2); + log_event("JsInterpreter.js", 4194, ctx_push(ctx_774, [{key: "#RETURN_VALUE#", val: _return_1796}]), "return"); + return (_return_1796); + }()) + ; + log_event("JsInterpreter.js", 4196, ctx_push(ctx_774, [{key: "#RETURN_VALUE#", val: _return_1797}]), "return"); + return (_return_1797); + case "Coq_binary_op_equal":log_event("JsInterpreter.js", 4201, ctx_774, "case"); + + var _return_1799 = (function () { + log_event("JsInterpreter.js", 4199, ctx_774, "call"); + var _return_1798 = run_equal(s, c, v1, v2); + log_event("JsInterpreter.js", 4198, ctx_push(ctx_774, [{key: "#RETURN_VALUE#", val: _return_1798}]), "return"); + return (_return_1798); + }()) + ; + log_event("JsInterpreter.js", 4200, ctx_push(ctx_774, [{key: "#RETURN_VALUE#", val: _return_1799}]), "return"); + return (_return_1799); + case "Coq_binary_op_disequal":log_event("JsInterpreter.js", 4211, ctx_774, "case"); + + var _return_1803 = if_bool((function () { + log_event("JsInterpreter.js", 4203, ctx_774, "call"); + var _return_1800 = run_equal(s, c, v1, v2); + log_event("JsInterpreter.js", 4202, ctx_push(ctx_774, [{key: "#RETURN_VALUE#", val: _return_1800}]), "return"); + return (_return_1800); }()), function(s0, b0) { + + var ctx_779 = ctx_push(ctx_774, [{key: "s0", val: s0}, {key: "b0", val: b0}]); + log_event("JsInterpreter.js", 4209, ctx_779, "let"); + var _return_1802 = res_ter(s0, + res_val( + Coq_value_prim( + Coq_prim_bool( + (function () { + log_event("JsInterpreter.js", 4205, ctx_779, "call"); + var _return_1801 = + !(b0); + log_event("JsInterpreter.js", 4204, ctx_push(ctx_779, [{key: "#RETURN_VALUE#", val: _return_1801}]), "return"); + return (_return_1801); + }()))))); + log_event("JsInterpreter.js", 4206, ctx_push(ctx_779, [{key: "#RETURN_VALUE#", val: _return_1802}]), "return"); + return (_return_1802); + }); + log_event("JsInterpreter.js", 4210, ctx_push(ctx_774, [{key: "#RETURN_VALUE#", val: _return_1803}]), "return"); + return (_return_1803); + case "Coq_binary_op_strict_equal":log_event("JsInterpreter.js", 4215, ctx_774, "case"); + + var _return_1805 = result_out( + Coq_out_ter(s, + res_val( + Coq_value_prim( + Coq_prim_bool((function () { + log_event("JsInterpreter.js", 4213, ctx_774, "call"); + var _return_1804 = strict_equality_test( + v1, v2); + log_event("JsInterpreter.js", 4212, ctx_push(ctx_774, [{key: "#RETURN_VALUE#", val: _return_1804}]), "return"); + return (_return_1804); }())))))); + log_event("JsInterpreter.js", 4214, ctx_push(ctx_774, [{key: "#RETURN_VALUE#", val: _return_1805}]), "return"); + return (_return_1805); + case "Coq_binary_op_strict_disequal":log_event("JsInterpreter.js", 4221, ctx_774, "case"); + + var _return_1808 = result_out( + Coq_out_ter(s, + res_val( + Coq_value_prim( + Coq_prim_bool((function () { + log_event("JsInterpreter.js", 4219, ctx_774, "call"); + var _return_1807 = !((function () { + log_event("JsInterpreter.js", 4217, ctx_774, "call"); + var _return_1806 = + strict_equality_test( + v1, v2); + log_event("JsInterpreter.js", 4216, ctx_push(ctx_774, [{key: "#RETURN_VALUE#", val: _return_1806}]), "return"); + return (_return_1806); + }())); + log_event("JsInterpreter.js", 4218, ctx_push(ctx_774, [{key: "#RETURN_VALUE#", val: _return_1807}]), "return"); + return (_return_1807); }())))))); + log_event("JsInterpreter.js", 4220, ctx_push(ctx_774, [{key: "#RETURN_VALUE#", val: _return_1808}]), "return"); + return (_return_1808); + case "Coq_binary_op_coma":log_event("JsInterpreter.js", 4223, ctx_774, "case"); + + var _return_1809 = result_out(Coq_out_ter(s, res_val(v2))); + log_event("JsInterpreter.js", 4222, ctx_push(ctx_774, [{key: "#RETURN_VALUE#", val: _return_1809}]), "return"); + return (_return_1809); + case "Coq_binary_op_and":log_event("JsInterpreter.js", 4225, ctx_774, "case"); + + var _return_1810 = Coq_result_impossible(); + log_event("JsInterpreter.js", 4224, ctx_push(ctx_774, [{key: "#RETURN_VALUE#", val: _return_1810}]), "return"); + return (_return_1810); + case "Coq_binary_op_or":log_event("JsInterpreter.js", 4227, ctx_774, "case"); + + var _return_1811 = Coq_result_impossible(); + log_event("JsInterpreter.js", 4226, ctx_push(ctx_774, [{key: "#RETURN_VALUE#", val: _return_1811}]), "return"); + return (_return_1811); + } + +}; + +var run_prepost_op = function (_foo_) { + var ctx_780 = ctx_push(ctx_empty, [{key: "_foo_", val: _foo_}]); + log_event("JsInterpreter.js", 4253, ctx_780, "enter"); + log_event("JsInterpreter.js", 4252, ctx_780, "switch"); + switch (_foo_.tag) { + case "Coq_unary_op_delete":log_event("JsInterpreter.js", 4231, ctx_780, "case"); + + var _return_1812 = None(); + log_event("JsInterpreter.js", 4230, ctx_push(ctx_780, [{key: "#RETURN_VALUE#", val: _return_1812}]), "return"); + return (_return_1812); + case "Coq_unary_op_void":log_event("JsInterpreter.js", 4233, ctx_780, "case"); + + var _return_1813 = None(); + log_event("JsInterpreter.js", 4232, ctx_push(ctx_780, [{key: "#RETURN_VALUE#", val: _return_1813}]), "return"); + return (_return_1813); + case "Coq_unary_op_typeof":log_event("JsInterpreter.js", 4235, ctx_780, "case"); + + var _return_1814 = None(); + log_event("JsInterpreter.js", 4234, ctx_push(ctx_780, [{key: "#RETURN_VALUE#", val: _return_1814}]), "return"); + return (_return_1814); + case "Coq_unary_op_post_incr":log_event("JsInterpreter.js", 4237, ctx_780, "case"); + + var _return_1815 = Some([add_one, false]); + log_event("JsInterpreter.js", 4236, ctx_push(ctx_780, [{key: "#RETURN_VALUE#", val: _return_1815}]), "return"); + return (_return_1815); + case "Coq_unary_op_post_decr":log_event("JsInterpreter.js", 4239, ctx_780, "case"); + + var _return_1816 = Some([sub_one, false]); + log_event("JsInterpreter.js", 4238, ctx_push(ctx_780, [{key: "#RETURN_VALUE#", val: _return_1816}]), "return"); + return (_return_1816); + case "Coq_unary_op_pre_incr":log_event("JsInterpreter.js", 4241, ctx_780, "case"); + + var _return_1817 = Some([add_one, true]); + log_event("JsInterpreter.js", 4240, ctx_push(ctx_780, [{key: "#RETURN_VALUE#", val: _return_1817}]), "return"); + return (_return_1817); + case "Coq_unary_op_pre_decr":log_event("JsInterpreter.js", 4243, ctx_780, "case"); + + var _return_1818 = Some([sub_one, true]); + log_event("JsInterpreter.js", 4242, ctx_push(ctx_780, [{key: "#RETURN_VALUE#", val: _return_1818}]), "return"); + return (_return_1818); + case "Coq_unary_op_add":log_event("JsInterpreter.js", 4245, ctx_780, "case"); + + var _return_1819 = None(); + log_event("JsInterpreter.js", 4244, ctx_push(ctx_780, [{key: "#RETURN_VALUE#", val: _return_1819}]), "return"); + return (_return_1819); + case "Coq_unary_op_neg":log_event("JsInterpreter.js", 4247, ctx_780, "case"); + + var _return_1820 = None(); + log_event("JsInterpreter.js", 4246, ctx_push(ctx_780, [{key: "#RETURN_VALUE#", val: _return_1820}]), "return"); + return (_return_1820); + case "Coq_unary_op_bitwise_not":log_event("JsInterpreter.js", 4249, ctx_780, "case"); + + var _return_1821 = None(); + log_event("JsInterpreter.js", 4248, ctx_push(ctx_780, [{key: "#RETURN_VALUE#", val: _return_1821}]), "return"); + return (_return_1821); + case "Coq_unary_op_not":log_event("JsInterpreter.js", 4251, ctx_780, "case"); + + var _return_1822 = None(); + log_event("JsInterpreter.js", 4250, ctx_push(ctx_780, [{key: "#RETURN_VALUE#", val: _return_1822}]), "return"); + return (_return_1822); + } + +}; + +var run_typeof_value = function (s, _foo_) { + var ctx_781 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "_foo_", val: _foo_}]); + log_event("JsInterpreter.js", 4265, ctx_781, "enter"); + log_event("JsInterpreter.js", 4264, ctx_781, "switch"); + switch (_foo_.tag) { + case "Coq_value_prim": + var w = _foo_.value;var ctx_782 = ctx_push(ctx_781, [{key: "w", val: w}]); + log_event("JsInterpreter.js", 4257, ctx_782, "case"); + + var _return_1824 = (function () { + log_event("JsInterpreter.js", 4255, ctx_782, "call"); + var _return_1823 = typeof_prim(w); + log_event("JsInterpreter.js", 4254, ctx_push(ctx_782, [{key: "#RETURN_VALUE#", val: _return_1823}]), "return"); + return (_return_1823); + }()) + ; + log_event("JsInterpreter.js", 4256, ctx_push(ctx_782, [{key: "#RETURN_VALUE#", val: _return_1824}]), "return"); + return (_return_1824); + case "Coq_value_object": + var l = _foo_.value;var ctx_783 = ctx_push(ctx_781, [{key: "l", val: l}]); + log_event("JsInterpreter.js", 4263, ctx_783, "case"); + + var _if_arg_1825 = (function () { + log_event("JsInterpreter.js", 4259, ctx_783, "call"); + var _return_1826 = is_callable_dec(s, Coq_value_object(l)); + log_event("JsInterpreter.js", 4258, ctx_push(ctx_783, [{key: "#RETURN_VALUE#", val: _return_1826}]), "return"); + return (_return_1826); + }()) + ; + log_event("JsInterpreter.js", 4262, ctx_783, "if"); + if (_if_arg_1825) { + var _return_1828 = "function"; + log_event("JsInterpreter.js", 4261, ctx_push(ctx_783, [{key: "#RETURN_VALUE#", val: _return_1828}]), "return"); + return (_return_1828); + } else { + var _return_1827 = "object"; + log_event("JsInterpreter.js", 4260, ctx_push(ctx_783, [{key: "#RETURN_VALUE#", val: _return_1827}]), "return"); + return (_return_1827); + } + } + +}; + +var run_unary_op = function (s, c, op, e) { + var ctx_784 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "op", val: op}, {key: "e", val: e}]); + log_event("JsInterpreter.js", 4435, ctx_784, "enter"); + var _if_arg_1829 = (function () { + log_event("JsInterpreter.js", 4267, ctx_784, "call"); + var _return_1830 = prepost_unary_op_dec(op); + log_event("JsInterpreter.js", 4266, ctx_push(ctx_784, [{key: "#RETURN_VALUE#", val: _return_1830}]), "return"); + return (_return_1830); + }()) + ; + log_event("JsInterpreter.js", 4434, ctx_784, "if"); + if (_if_arg_1829) { + var _return_1901 = if_success((function () { + log_event("JsInterpreter.js", 4396, ctx_784, "call"); + var _return_1888 = run_expr(s, c, e); + log_event("JsInterpreter.js", 4395, ctx_push(ctx_784, [{key: "#RETURN_VALUE#", val: _return_1888}]), "return"); + return (_return_1888); }()), function(s1, rv1) { + + var ctx_800 = ctx_push(ctx_784, [{key: "s1", val: s1}, {key: "rv1", val: rv1}]); + log_event("JsInterpreter.js", 4432, ctx_800, "let"); + var _return_1900 = if_run((function () { + log_event("JsInterpreter.js", 4398, ctx_800, "call"); + var _return_1889 = + ref_get_value(s1, c, rv1); + log_event("JsInterpreter.js", 4397, ctx_push(ctx_800, [{key: "#RETURN_VALUE#", val: _return_1889}]), "return"); + return (_return_1889); }()) + , function(s2, v2) { + + var ctx_801 = ctx_push(ctx_800, [{key: "s2", val: s2}, {key: "v2", val: v2}]); + log_event("JsInterpreter.js", 4428, ctx_801, "let"); + var _return_1899 = + if_number((function () { + log_event("JsInterpreter.js", 4400, ctx_801, "call"); + var _return_1890 = + to_number(s2, c, v2); + log_event("JsInterpreter.js", 4399, ctx_push(ctx_801, [{key: "#RETURN_VALUE#", val: _return_1890}]), "return"); + return (_return_1890); + }()), function(s3, n1) { + + var ctx_802 = ctx_push(ctx_801, [{key: "s3", val: s3}, {key: "n1", val: n1}]); + log_event("JsInterpreter.js", 4424, ctx_802, "let"); + var _return_1898 = + if_some((function () { + log_event("JsInterpreter.js", 4402, ctx_802, "call"); + var _return_1891 = + run_prepost_op(op); + log_event("JsInterpreter.js", 4401, ctx_push(ctx_802, [{key: "#RETURN_VALUE#", val: _return_1891}]), "return"); + return (_return_1891); + }()), function(po) { + + var ctx_803 = ctx_push(ctx_802, [{key: "po", val: po}]); + log_event("JsInterpreter.js", 4420, ctx_803, "let"); + var number_op = po[0], + is_pre = po[1]; + var ctx_804 = ctx_push(ctx_803, [{key: "number_op", val: number_op}, {key: "is_pre", val: is_pre}]); + log_event("JsInterpreter.js", 4417, ctx_804, "let"); + var n2 = (function () { + log_event("JsInterpreter.js", 4404, ctx_804, "call"); + var _return_1892 = + number_op(n1); + log_event("JsInterpreter.js", 4403, ctx_push(ctx_804, [{key: "#RETURN_VALUE#", val: _return_1892}]), "return"); + return (_return_1892); + }()) + ; + var ctx_805 = ctx_push(ctx_804, [{key: "n2", val: n2}]); + log_event("JsInterpreter.js", 4416, ctx_805, "let"); + var v = Coq_prim_number( + (function () { + log_event("JsInterpreter.js", 4407, ctx_805, "if"); + if (is_pre) { + var _return_1894 = n2; + log_event("JsInterpreter.js", 4406, ctx_push(ctx_805, [{key: "#RETURN_VALUE#", val: _return_1894}]), "return"); + return (_return_1894); + } else { + var _return_1893 = n1; + log_event("JsInterpreter.js", 4405, ctx_push(ctx_805, [{key: "#RETURN_VALUE#", val: _return_1893}]), "return"); + return (_return_1893); + }}())); + var ctx_806 = ctx_push(ctx_805, [{key: "v", val: v}]); + log_event("JsInterpreter.js", 4415, ctx_806, "let"); + var _return_1897 = + if_void( + (function () { + log_event("JsInterpreter.js", 4409, ctx_806, "call"); + var _return_1895 = + ref_put_value( + s3, c, rv1, + Coq_value_prim( + Coq_prim_number( + n2))); + log_event("JsInterpreter.js", 4408, ctx_push(ctx_806, [{key: "#RETURN_VALUE#", val: _return_1895}]), "return"); + return (_return_1895); + }()), + function(s4) { + + var ctx_807 = ctx_push(ctx_806, [{key: "s4", val: s4}]); + log_event("JsInterpreter.js", 4413, ctx_807, "let"); + var _return_1896 = + result_out( + Coq_out_ter( + s4, + res_val( + Coq_value_prim( + v)))); + log_event("JsInterpreter.js", 4410, ctx_push(ctx_807, [{key: "#RETURN_VALUE#", val: _return_1896}]), "return"); + return (_return_1896); + }); + log_event("JsInterpreter.js", 4414, ctx_push(ctx_806, [{key: "#RETURN_VALUE#", val: _return_1897}]), "return"); + return (_return_1897); + + + + }); + log_event("JsInterpreter.js", 4421, ctx_push(ctx_802, [{key: "#RETURN_VALUE#", val: _return_1898}]), "return"); + return (_return_1898); + }); + log_event("JsInterpreter.js", 4425, ctx_push(ctx_801, [{key: "#RETURN_VALUE#", val: _return_1899}]), "return"); + return (_return_1899); + }); + log_event("JsInterpreter.js", 4429, ctx_push(ctx_800, [{key: "#RETURN_VALUE#", val: _return_1900}]), "return"); + return (_return_1900); + }); + log_event("JsInterpreter.js", 4433, ctx_push(ctx_784, [{key: "#RETURN_VALUE#", val: _return_1901}]), "return"); + return (_return_1901); + } else { + log_event("JsInterpreter.js", 4394, ctx_784, "switch"); + switch (op.tag) { + case "Coq_unary_op_delete":log_event("JsInterpreter.js", 4309, ctx_784, "case"); + + var _return_1851 = if_success((function () { + log_event("JsInterpreter.js", 4269, ctx_784, "call"); + var _return_1831 = run_expr(s, c, e); + log_event("JsInterpreter.js", 4268, ctx_push(ctx_784, [{key: "#RETURN_VALUE#", val: _return_1831}]), "return"); + return (_return_1831); }()), function(s0, + rv) { + + var ctx_785 = ctx_push(ctx_784, [{key: "s0", val: s0}, {key: "rv", val: rv}]); + log_event("JsInterpreter.js", 4307, ctx_785, "let"); + log_event("JsInterpreter.js", 4304, ctx_785, "switch"); + switch (rv.tag) { + case "Coq_resvalue_empty":log_event("JsInterpreter.js", 4271, ctx_785, "case"); + + var _return_1832 = res_ter(s0, + res_val( + Coq_value_prim( + Coq_prim_bool( + true)))); + log_event("JsInterpreter.js", 4270, ctx_push(ctx_785, [{key: "#RETURN_VALUE#", val: _return_1832}]), "return"); + return (_return_1832); + case "Coq_resvalue_value": + var v = rv.value;var ctx_786 = ctx_push(ctx_785, [{key: "v", val: v}]); + log_event("JsInterpreter.js", 4273, ctx_786, "case"); + + var _return_1833 = res_ter(s0, + res_val( + Coq_value_prim( + Coq_prim_bool( + true)))); + log_event("JsInterpreter.js", 4272, ctx_push(ctx_786, [{key: "#RETURN_VALUE#", val: _return_1833}]), "return"); + return (_return_1833); + case "Coq_resvalue_ref": + var r = rv.ref;var ctx_787 = ctx_push(ctx_785, [{key: "r", val: r}]); + log_event("JsInterpreter.js", 4303, ctx_787, "case"); + + var _if_arg_1834 = (function () { + log_event("JsInterpreter.js", 4277, ctx_787, "call"); + var _return_1836 = ref_kind_comparable( + (function () { + log_event("JsInterpreter.js", 4275, ctx_787, "call"); + var _return_1835 = + ref_kind_of(r); + log_event("JsInterpreter.js", 4274, ctx_push(ctx_787, [{key: "#RETURN_VALUE#", val: _return_1835}]), "return"); + return (_return_1835); + }()), + Coq_ref_kind_undef( + )); + log_event("JsInterpreter.js", 4276, ctx_push(ctx_787, [{key: "#RETURN_VALUE#", val: _return_1836}]), "return"); + return (_return_1836); + }()) + ; + log_event("JsInterpreter.js", 4302, ctx_787, "if"); + if (_if_arg_1834) { + var _if_arg_1847 = r.ref_strict; + log_event("JsInterpreter.js", 4301, ctx_787, "if"); + if (_if_arg_1847) { + var _return_1850 = (function () { + log_event("JsInterpreter.js", 4299, ctx_787, "call"); + var _return_1849 = run_error(s0, + Coq_native_error_syntax( + )); + log_event("JsInterpreter.js", 4298, ctx_push(ctx_787, [{key: "#RETURN_VALUE#", val: _return_1849}]), "return"); + return (_return_1849); + }()) + ; + log_event("JsInterpreter.js", 4300, ctx_push(ctx_787, [{key: "#RETURN_VALUE#", val: _return_1850}]), "return"); + return (_return_1850); + } else { + var _return_1848 = res_ter(s0, + res_val( + Coq_value_prim( + Coq_prim_bool( + true)))); + log_event("JsInterpreter.js", 4297, ctx_push(ctx_787, [{key: "#RETURN_VALUE#", val: _return_1848}]), "return"); + return (_return_1848); + } + } else { + var _switch_arg_1837 = r.ref_base; + log_event("JsInterpreter.js", 4296, ctx_787, "switch"); + switch (_switch_arg_1837.tag) { + case "Coq_ref_base_type_value": + var v = _switch_arg_1837.value;var ctx_788 = ctx_push(ctx_787, [{key: "v", val: v}]); + log_event("JsInterpreter.js", 4287, ctx_788, "case"); + + var _return_1841 = if_object( + (function () { + log_event("JsInterpreter.js", 4279, ctx_788, "call"); + var _return_1838 = + to_object(s0, + v); + log_event("JsInterpreter.js", 4278, ctx_push(ctx_788, [{key: "#RETURN_VALUE#", val: _return_1838}]), "return"); + return (_return_1838); + }()), + function(s1, + l) { + + var ctx_789 = ctx_push(ctx_788, [{key: "s1", val: s1}, {key: "l", val: l}]); + log_event("JsInterpreter.js", 4285, ctx_789, "let"); + var _return_1840 = (function () { + log_event("JsInterpreter.js", 4281, ctx_789, "call"); + var _return_1839 = + object_delete( + s1, c, l, + r.ref_name, + r.ref_strict); + log_event("JsInterpreter.js", 4280, ctx_push(ctx_789, [{key: "#RETURN_VALUE#", val: _return_1839}]), "return"); + return (_return_1839); + }()) + ; + log_event("JsInterpreter.js", 4282, ctx_push(ctx_789, [{key: "#RETURN_VALUE#", val: _return_1840}]), "return"); + return (_return_1840); + }); + log_event("JsInterpreter.js", 4286, ctx_push(ctx_788, [{key: "#RETURN_VALUE#", val: _return_1841}]), "return"); + return (_return_1841); + case "Coq_ref_base_type_env_loc": + var l = _switch_arg_1837.value;var ctx_790 = ctx_push(ctx_787, [{key: "l", val: l}]); + log_event("JsInterpreter.js", 4295, ctx_790, "case"); + + var _if_arg_1842 = r.ref_strict; + log_event("JsInterpreter.js", 4294, ctx_790, "if"); + if (_if_arg_1842) { + var _return_1846 = (function () { + log_event("JsInterpreter.js", 4292, ctx_790, "call"); + var _return_1845 = run_error(s0, + Coq_native_error_syntax( + )); + log_event("JsInterpreter.js", 4291, ctx_push(ctx_790, [{key: "#RETURN_VALUE#", val: _return_1845}]), "return"); + return (_return_1845); + }()) + ; + log_event("JsInterpreter.js", 4293, ctx_push(ctx_790, [{key: "#RETURN_VALUE#", val: _return_1846}]), "return"); + return (_return_1846); + } else { + var _return_1844 = (function () { + log_event("JsInterpreter.js", 4289, ctx_790, "call"); + var _return_1843 = env_record_delete_binding( + s0, c, l, + r.ref_name); + log_event("JsInterpreter.js", 4288, ctx_push(ctx_790, [{key: "#RETURN_VALUE#", val: _return_1843}]), "return"); + return (_return_1843); + }()) + ; + log_event("JsInterpreter.js", 4290, ctx_push(ctx_790, [{key: "#RETURN_VALUE#", val: _return_1844}]), "return"); + return (_return_1844); + } + } + + } + } + + }); + log_event("JsInterpreter.js", 4308, ctx_push(ctx_784, [{key: "#RETURN_VALUE#", val: _return_1851}]), "return"); + return (_return_1851); + case "Coq_unary_op_typeof":log_event("JsInterpreter.js", 4345, ctx_784, "case"); + + var _return_1867 = if_success((function () { + log_event("JsInterpreter.js", 4311, ctx_784, "call"); + var _return_1852 = run_expr(s, c, e); + log_event("JsInterpreter.js", 4310, ctx_push(ctx_784, [{key: "#RETURN_VALUE#", val: _return_1852}]), "return"); + return (_return_1852); }()), function(s1, + rv) { + + var ctx_791 = ctx_push(ctx_784, [{key: "s1", val: s1}, {key: "rv", val: rv}]); + log_event("JsInterpreter.js", 4343, ctx_791, "let"); + log_event("JsInterpreter.js", 4340, ctx_791, "switch"); + switch (rv.tag) { + case "Coq_resvalue_empty":log_event("JsInterpreter.js", 4319, ctx_791, "case"); + + var _return_1856 = (function () { + log_event("JsInterpreter.js", 4317, ctx_791, "call"); + var _return_1855 = function (s, m) { + var ctx_792 = ctx_push(ctx_791, [{key: "s", val: s}, {key: "m", val: m}]); + log_event("JsInterpreter.js", 4315, ctx_792, "enter"); + (function () { + log_event("JsInterpreter.js", 4314, ctx_792, "call"); + var _return_1854 = + Debug.impossible_with_heap_because( + __LOC__, s, + m); + log_event("JsInterpreter.js", 4313, ctx_push(ctx_792, [{key: "#RETURN_VALUE#", val: _return_1854}]), "return"); + return (_return_1854); + }()) + ; + var _return_1853 = + Coq_result_impossible( + ); + log_event("JsInterpreter.js", 4312, ctx_push(ctx_792, [{key: "#RETURN_VALUE#", val: _return_1853}]), "return"); + return (_return_1853); + }(s1, + "Empty result for a `typeof' in [run_unary_op]."); + log_event("JsInterpreter.js", 4316, ctx_push(ctx_791, [{key: "#RETURN_VALUE#", val: _return_1855}]), "return"); + return (_return_1855); + }()) + ; + log_event("JsInterpreter.js", 4318, ctx_push(ctx_791, [{key: "#RETURN_VALUE#", val: _return_1856}]), "return"); + return (_return_1856); + case "Coq_resvalue_value": + var v = rv.value;var ctx_793 = ctx_push(ctx_791, [{key: "v", val: v}]); + log_event("JsInterpreter.js", 4323, ctx_793, "case"); + + var _return_1858 = res_ter(s1, + res_val( + Coq_value_prim( + Coq_prim_string( + (function () { + log_event("JsInterpreter.js", 4321, ctx_793, "call"); + var _return_1857 = + run_typeof_value( + s1, v); + log_event("JsInterpreter.js", 4320, ctx_push(ctx_793, [{key: "#RETURN_VALUE#", val: _return_1857}]), "return"); + return (_return_1857); + }()))))); + log_event("JsInterpreter.js", 4322, ctx_push(ctx_793, [{key: "#RETURN_VALUE#", val: _return_1858}]), "return"); + return (_return_1858); + case "Coq_resvalue_ref": + var r = rv.ref;var ctx_794 = ctx_push(ctx_791, [{key: "r", val: r}]); + log_event("JsInterpreter.js", 4339, ctx_794, "case"); + + var _if_arg_1859 = (function () { + log_event("JsInterpreter.js", 4327, ctx_794, "call"); + var _return_1861 = ref_kind_comparable( + (function () { + log_event("JsInterpreter.js", 4325, ctx_794, "call"); + var _return_1860 = + ref_kind_of(r); + log_event("JsInterpreter.js", 4324, ctx_push(ctx_794, [{key: "#RETURN_VALUE#", val: _return_1860}]), "return"); + return (_return_1860); + }()), + Coq_ref_kind_undef( + )); + log_event("JsInterpreter.js", 4326, ctx_push(ctx_794, [{key: "#RETURN_VALUE#", val: _return_1861}]), "return"); + return (_return_1861); + }()) + ; + log_event("JsInterpreter.js", 4338, ctx_794, "if"); + if (_if_arg_1859) { + var _return_1866 = res_ter(s1, + res_val( + Coq_value_prim( + Coq_prim_string( + "undefined")))); + log_event("JsInterpreter.js", 4337, ctx_push(ctx_794, [{key: "#RETURN_VALUE#", val: _return_1866}]), "return"); + return (_return_1866); + } else { + var _return_1865 = if_run((function () { + log_event("JsInterpreter.js", 4329, ctx_794, "call"); + var _return_1862 = + ref_get_value(s1, + c, + Coq_resvalue_ref( + r)); + log_event("JsInterpreter.js", 4328, ctx_push(ctx_794, [{key: "#RETURN_VALUE#", val: _return_1862}]), "return"); + return (_return_1862); + }()), function(s2, + v) { + + var ctx_795 = ctx_push(ctx_794, [{key: "s2", val: s2}, {key: "v", val: v}]); + log_event("JsInterpreter.js", 4335, ctx_795, "let"); + var _return_1864 = + res_ter(s2, + res_val( + Coq_value_prim( + Coq_prim_string( + (function () { + log_event("JsInterpreter.js", 4331, ctx_795, "call"); + var _return_1863 = + run_typeof_value( + s2, v); + log_event("JsInterpreter.js", 4330, ctx_push(ctx_795, [{key: "#RETURN_VALUE#", val: _return_1863}]), "return"); + return (_return_1863); + }()))))); + log_event("JsInterpreter.js", 4332, ctx_push(ctx_795, [{key: "#RETURN_VALUE#", val: _return_1864}]), "return"); + return (_return_1864); + }); + log_event("JsInterpreter.js", 4336, ctx_push(ctx_794, [{key: "#RETURN_VALUE#", val: _return_1865}]), "return"); + return (_return_1865); + } + } + + }); + log_event("JsInterpreter.js", 4344, ctx_push(ctx_784, [{key: "#RETURN_VALUE#", val: _return_1867}]), "return"); + return (_return_1867); + default:log_event("JsInterpreter.js", 4393, ctx_784, "case"); + + var _return_1887 = if_run((function () { + log_event("JsInterpreter.js", 4347, ctx_784, "call"); + var _return_1868 = run_expr_get_value(s, c, e); + log_event("JsInterpreter.js", 4346, ctx_push(ctx_784, [{key: "#RETURN_VALUE#", val: _return_1868}]), "return"); + return (_return_1868); }()), function(s1, v) { + + var ctx_796 = ctx_push(ctx_784, [{key: "s1", val: s1}, {key: "v", val: v}]); + log_event("JsInterpreter.js", 4391, ctx_796, "let"); + log_event("JsInterpreter.js", 4388, ctx_796, "switch"); + switch (op.tag) { + case "Coq_unary_op_void":log_event("JsInterpreter.js", 4349, ctx_796, "case"); + + var _return_1869 = res_ter(s1, + res_val( + Coq_value_prim( + Coq_prim_undef()))); + log_event("JsInterpreter.js", 4348, ctx_push(ctx_796, [{key: "#RETURN_VALUE#", val: _return_1869}]), "return"); + return (_return_1869); + case "Coq_unary_op_add":log_event("JsInterpreter.js", 4353, ctx_796, "case"); + + var _return_1871 = (function () { + log_event("JsInterpreter.js", 4351, ctx_796, "call"); + var _return_1870 = to_number(s1, c, v); + log_event("JsInterpreter.js", 4350, ctx_push(ctx_796, [{key: "#RETURN_VALUE#", val: _return_1870}]), "return"); + return (_return_1870); + }()) + ; + log_event("JsInterpreter.js", 4352, ctx_push(ctx_796, [{key: "#RETURN_VALUE#", val: _return_1871}]), "return"); + return (_return_1871); + case "Coq_unary_op_neg":log_event("JsInterpreter.js", 4363, ctx_796, "case"); + + var _return_1875 = if_number( + (function () { + log_event("JsInterpreter.js", 4355, ctx_796, "call"); + var _return_1872 = + to_number(s1, c, v); + log_event("JsInterpreter.js", 4354, ctx_push(ctx_796, [{key: "#RETURN_VALUE#", val: _return_1872}]), "return"); + return (_return_1872); + }()), function(s2, + n) { + + var ctx_797 = ctx_push(ctx_796, [{key: "s2", val: s2}, {key: "n", val: n}]); + log_event("JsInterpreter.js", 4361, ctx_797, "let"); + var _return_1874 = + res_ter(s2, + res_val( + Coq_value_prim( + Coq_prim_number( + (function () { + log_event("JsInterpreter.js", 4357, ctx_797, "call"); + var _return_1873 = + JsNumber.neg( + n); + log_event("JsInterpreter.js", 4356, ctx_push(ctx_797, [{key: "#RETURN_VALUE#", val: _return_1873}]), "return"); + return (_return_1873); + }()))))); + log_event("JsInterpreter.js", 4358, ctx_push(ctx_797, [{key: "#RETURN_VALUE#", val: _return_1874}]), "return"); + return (_return_1874); + }); + log_event("JsInterpreter.js", 4362, ctx_push(ctx_796, [{key: "#RETURN_VALUE#", val: _return_1875}]), "return"); + return (_return_1875); + case "Coq_unary_op_bitwise_not":log_event("JsInterpreter.js", 4373, ctx_796, "case"); + + var _return_1879 = if_run((function () { + log_event("JsInterpreter.js", 4365, ctx_796, "call"); + var _return_1876 = + to_int32(s1, c, v); + log_event("JsInterpreter.js", 4364, ctx_push(ctx_796, [{key: "#RETURN_VALUE#", val: _return_1876}]), "return"); + return (_return_1876); + }()), function(s2, + k) { + + var ctx_798 = ctx_push(ctx_796, [{key: "s2", val: s2}, {key: "k", val: k}]); + log_event("JsInterpreter.js", 4371, ctx_798, "let"); + var _return_1878 = + res_ter(s2, + res_val( + Coq_value_prim( + Coq_prim_number( + (function () { + log_event("JsInterpreter.js", 4367, ctx_798, "call"); + var _return_1877 = + JsNumber.int32_bitwise_not( + k); + log_event("JsInterpreter.js", 4366, ctx_push(ctx_798, [{key: "#RETURN_VALUE#", val: _return_1877}]), "return"); + return (_return_1877); + }()))))); + log_event("JsInterpreter.js", 4368, ctx_push(ctx_798, [{key: "#RETURN_VALUE#", val: _return_1878}]), "return"); + return (_return_1878); + }); + log_event("JsInterpreter.js", 4372, ctx_push(ctx_796, [{key: "#RETURN_VALUE#", val: _return_1879}]), "return"); + return (_return_1879); + case "Coq_unary_op_not":log_event("JsInterpreter.js", 4379, ctx_796, "case"); + + var _return_1882 = res_ter(s1, + res_val( + Coq_value_prim( + Coq_prim_bool( + (function () { + log_event("JsInterpreter.js", 4377, ctx_796, "call"); + var _return_1881 = + !( + (function () { + log_event("JsInterpreter.js", 4375, ctx_796, "call"); + var _return_1880 = + convert_value_to_boolean( + v); + log_event("JsInterpreter.js", 4374, ctx_push(ctx_796, [{key: "#RETURN_VALUE#", val: _return_1880}]), "return"); + return (_return_1880); + }())); + log_event("JsInterpreter.js", 4376, ctx_push(ctx_796, [{key: "#RETURN_VALUE#", val: _return_1881}]), "return"); + return (_return_1881); + }()))))); + log_event("JsInterpreter.js", 4378, ctx_push(ctx_796, [{key: "#RETURN_VALUE#", val: _return_1882}]), "return"); + return (_return_1882); + default:log_event("JsInterpreter.js", 4387, ctx_796, "case"); + + var _return_1886 = (function () { + log_event("JsInterpreter.js", 4385, ctx_796, "call"); + var _return_1885 = function (s, m) { + var ctx_799 = ctx_push(ctx_796, [{key: "s", val: s}, {key: "m", val: m}]); + log_event("JsInterpreter.js", 4383, ctx_799, "enter"); + (function () { + log_event("JsInterpreter.js", 4382, ctx_799, "call"); + var _return_1884 = + Debug.impossible_with_heap_because( + __LOC__, s, + m); + log_event("JsInterpreter.js", 4381, ctx_push(ctx_799, [{key: "#RETURN_VALUE#", val: _return_1884}]), "return"); + return (_return_1884); + }()) + ; + var _return_1883 = + Coq_result_impossible( + ); + log_event("JsInterpreter.js", 4380, ctx_push(ctx_799, [{key: "#RETURN_VALUE#", val: _return_1883}]), "return"); + return (_return_1883); + }(s1, + "Undealt regular operator in [run_unary_op]."); + log_event("JsInterpreter.js", 4384, ctx_push(ctx_796, [{key: "#RETURN_VALUE#", val: _return_1885}]), "return"); + return (_return_1885); + }()) + ; + log_event("JsInterpreter.js", 4386, ctx_push(ctx_796, [{key: "#RETURN_VALUE#", val: _return_1886}]), "return"); + return (_return_1886); + } + + }); + log_event("JsInterpreter.js", 4392, ctx_push(ctx_784, [{key: "#RETURN_VALUE#", val: _return_1887}]), "return"); + return (_return_1887); + } + + } +}; + +var create_new_function_in = function (s, c, args, bd) { + var ctx_808 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "args", val: args}, {key: "bd", val: bd}]); + log_event("JsInterpreter.js", 4439, ctx_808, "enter"); + var _return_1903 = (function () { + log_event("JsInterpreter.js", 4437, ctx_808, "call"); + var _return_1902 = creating_function_object(s, c, args, bd, + c.execution_ctx_lexical_env, c.execution_ctx_strict); + log_event("JsInterpreter.js", 4436, ctx_push(ctx_808, [{key: "#RETURN_VALUE#", val: _return_1902}]), "return"); + return (_return_1902); + }()) + ; + log_event("JsInterpreter.js", 4438, ctx_push(ctx_808, [{key: "#RETURN_VALUE#", val: _return_1903}]), "return"); + return (_return_1903); +}; + +var init_object = function (s, c, l, _foo_) { + var ctx_809 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "l", val: l}, {key: "_foo_", val: _foo_}]); + log_event("JsInterpreter.js", 4493, ctx_809, "enter"); + log_event("JsInterpreter.js", 4492, ctx_809, "switch"); + switch (_foo_.tag) { + case "[]":log_event("JsInterpreter.js", 4441, ctx_809, "case"); + + var _return_1904 = result_out( + Coq_out_ter(s, res_val(Coq_value_object(l)))); + log_event("JsInterpreter.js", 4440, ctx_push(ctx_809, [{key: "#RETURN_VALUE#", val: _return_1904}]), "return"); + return (_return_1904); + case "::": + var p = _foo_.head, pds_2 = _foo_.tail;var ctx_810 = ctx_push(ctx_809, [{key: "p", val: p}, {key: "pds_2", val: pds_2}]); + log_event("JsInterpreter.js", 4491, ctx_810, "case"); + + var pn = p[0], pb = p[1]; + var ctx_811 = ctx_push(ctx_810, [{key: "pn", val: pn}, {key: "pb", val: pb}]); + log_event("JsInterpreter.js", 4490, ctx_811, "let"); + var x = (function () { + log_event("JsInterpreter.js", 4443, ctx_811, "call"); + var _return_1905 = string_of_propname(pn); + log_event("JsInterpreter.js", 4442, ctx_push(ctx_811, [{key: "#RETURN_VALUE#", val: _return_1905}]), "return"); + return (_return_1905); + }()) + ; + var ctx_812 = ctx_push(ctx_811, [{key: "x", val: x}]); + log_event("JsInterpreter.js", 4489, ctx_812, "let"); + var follows = function (s1, desc) { + var ctx_813 = ctx_push(ctx_812, [{key: "s1", val: s1}, {key: "desc", val: desc}]); + log_event("JsInterpreter.js", 4453, ctx_813, "enter"); + var _return_1909 = if_success((function () { + log_event("JsInterpreter.js", 4445, ctx_813, "call"); + var _return_1906 = object_define_own_prop(s1, + c, l, x, desc, false); + log_event("JsInterpreter.js", 4444, ctx_push(ctx_813, [{key: "#RETURN_VALUE#", val: _return_1906}]), "return"); + return (_return_1906); }()), function(s2, + rv) { + + var ctx_814 = ctx_push(ctx_813, [{key: "s2", val: s2}, {key: "rv", val: rv}]); + log_event("JsInterpreter.js", 4451, ctx_814, "let"); + var _return_1908 = (function () { + log_event("JsInterpreter.js", 4447, ctx_814, "call"); + var _return_1907 = init_object(s2, c, l, + pds_2); + log_event("JsInterpreter.js", 4446, ctx_push(ctx_814, [{key: "#RETURN_VALUE#", val: _return_1907}]), "return"); + return (_return_1907); + }()) + ; + log_event("JsInterpreter.js", 4448, ctx_push(ctx_814, [{key: "#RETURN_VALUE#", val: _return_1908}]), "return"); + return (_return_1908); + }); + log_event("JsInterpreter.js", 4452, ctx_push(ctx_813, [{key: "#RETURN_VALUE#", val: _return_1909}]), "return"); + return (_return_1909); + }; + var ctx_815 = ctx_push(ctx_812, [{key: "follows", val: follows}]); + log_event("JsInterpreter.js", 4488, ctx_815, "let"); + log_event("JsInterpreter.js", 4487, ctx_815, "switch"); + switch (pb.tag) { + case "Coq_propbody_val": + var e0 = pb.expr;var ctx_816 = ctx_push(ctx_815, [{key: "e0", val: e0}]); + log_event("JsInterpreter.js", 4464, ctx_816, "case"); + + var _return_1913 = if_run((function () { + log_event("JsInterpreter.js", 4455, ctx_816, "call"); + var _return_1910 = run_expr_get_value(s, c, + e0); + log_event("JsInterpreter.js", 4454, ctx_push(ctx_816, [{key: "#RETURN_VALUE#", val: _return_1910}]), "return"); + return (_return_1910); }()), function(s1, + v0) { + + var ctx_817 = ctx_push(ctx_816, [{key: "s1", val: s1}, {key: "v0", val: v0}]); + log_event("JsInterpreter.js", 4462, ctx_817, "let"); + var desc = { + descriptor_value: Some(v0), + descriptor_writable: Some(true), + descriptor_get: None(), + descriptor_set: None(), + descriptor_enumerable: Some(true), + descriptor_configurable: Some(true) + }; + var ctx_818 = ctx_push(ctx_817, [{key: "desc", val: desc}]); + log_event("JsInterpreter.js", 4459, ctx_818, "let"); + var _return_1912 = (function () { + log_event("JsInterpreter.js", 4457, ctx_818, "call"); + var _return_1911 = follows(s1, desc); + log_event("JsInterpreter.js", 4456, ctx_push(ctx_818, [{key: "#RETURN_VALUE#", val: _return_1911}]), "return"); + return (_return_1911); + }()) + ; + log_event("JsInterpreter.js", 4458, ctx_push(ctx_818, [{key: "#RETURN_VALUE#", val: _return_1912}]), "return"); + return (_return_1912); + + }); + log_event("JsInterpreter.js", 4463, ctx_push(ctx_816, [{key: "#RETURN_VALUE#", val: _return_1913}]), "return"); + return (_return_1913); + case "Coq_propbody_get": + var bd = pb.body;var ctx_819 = ctx_push(ctx_815, [{key: "bd", val: bd}]); + log_event("JsInterpreter.js", 4475, ctx_819, "case"); + + var _return_1917 = if_value((function () { + log_event("JsInterpreter.js", 4466, ctx_819, "call"); + var _return_1914 = create_new_function_in(s, + c, mk_nil(), bd); + log_event("JsInterpreter.js", 4465, ctx_push(ctx_819, [{key: "#RETURN_VALUE#", val: _return_1914}]), "return"); + return (_return_1914); }()), function(s1, + v0) { + + var ctx_820 = ctx_push(ctx_819, [{key: "s1", val: s1}, {key: "v0", val: v0}]); + log_event("JsInterpreter.js", 4473, ctx_820, "let"); + var desc = { + descriptor_value: None(), + descriptor_writable: None(), + descriptor_get: Some(v0), + descriptor_set: None(), + descriptor_enumerable: Some(true), + descriptor_configurable: Some(true) + }; + var ctx_821 = ctx_push(ctx_820, [{key: "desc", val: desc}]); + log_event("JsInterpreter.js", 4470, ctx_821, "let"); + var _return_1916 = (function () { + log_event("JsInterpreter.js", 4468, ctx_821, "call"); + var _return_1915 = follows(s1, desc); + log_event("JsInterpreter.js", 4467, ctx_push(ctx_821, [{key: "#RETURN_VALUE#", val: _return_1915}]), "return"); + return (_return_1915); + }()) + ; + log_event("JsInterpreter.js", 4469, ctx_push(ctx_821, [{key: "#RETURN_VALUE#", val: _return_1916}]), "return"); + return (_return_1916); + + }); + log_event("JsInterpreter.js", 4474, ctx_push(ctx_819, [{key: "#RETURN_VALUE#", val: _return_1917}]), "return"); + return (_return_1917); + case "Coq_propbody_set": + var args = pb.names, bd = pb.body;var ctx_822 = ctx_push(ctx_815, [{key: "args", val: args}, {key: "bd", val: bd}]); + log_event("JsInterpreter.js", 4486, ctx_822, "case"); + + var _return_1921 = if_value((function () { + log_event("JsInterpreter.js", 4477, ctx_822, "call"); + var _return_1918 = create_new_function_in(s, + c, args, bd); + log_event("JsInterpreter.js", 4476, ctx_push(ctx_822, [{key: "#RETURN_VALUE#", val: _return_1918}]), "return"); + return (_return_1918); }()), function(s1, + v0) { + + var ctx_823 = ctx_push(ctx_822, [{key: "s1", val: s1}, {key: "v0", val: v0}]); + log_event("JsInterpreter.js", 4484, ctx_823, "let"); + var desc = { + descriptor_value: None(), + descriptor_writable: None(), + descriptor_get: None(), + descriptor_set: Some(v0), + descriptor_enumerable: Some(true), + descriptor_configurable: Some(true) + }; + var ctx_824 = ctx_push(ctx_823, [{key: "desc", val: desc}]); + log_event("JsInterpreter.js", 4481, ctx_824, "let"); + var _return_1920 = (function () { + log_event("JsInterpreter.js", 4479, ctx_824, "call"); + var _return_1919 = follows(s1, desc); + log_event("JsInterpreter.js", 4478, ctx_push(ctx_824, [{key: "#RETURN_VALUE#", val: _return_1919}]), "return"); + return (_return_1919); + }()) + ; + log_event("JsInterpreter.js", 4480, ctx_push(ctx_824, [{key: "#RETURN_VALUE#", val: _return_1920}]), "return"); + return (_return_1920); + + }); + log_event("JsInterpreter.js", 4485, ctx_push(ctx_822, [{key: "#RETURN_VALUE#", val: _return_1921}]), "return"); + return (_return_1921); + } + + + + + } + +}; + +var run_array_element_list = function (s, c, l, oes, n) { + var ctx_825 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "l", val: l}, {key: "oes", val: oes}, {key: "n", val: n}]); + log_event("JsInterpreter.js", 4556, ctx_825, "enter"); + log_event("JsInterpreter.js", 4555, ctx_825, "switch"); + switch (oes.tag) { + case "[]":log_event("JsInterpreter.js", 4495, ctx_825, "case"); + + var _return_1922 = result_out( + Coq_out_ter(s, res_val(Coq_value_object(l)))); + log_event("JsInterpreter.js", 4494, ctx_push(ctx_825, [{key: "#RETURN_VALUE#", val: _return_1922}]), "return"); + return (_return_1922); + case "::": + var o = oes.head, oes_2 = oes.tail;var ctx_826 = ctx_push(ctx_825, [{key: "o", val: o}, {key: "oes_2", val: oes_2}]); + log_event("JsInterpreter.js", 4554, ctx_826, "case"); + + log_event("JsInterpreter.js", 4553, ctx_826, "switch"); + switch (o.tag) { + case "Some": + var e = o.value;var ctx_827 = ctx_push(ctx_826, [{key: "e", val: e}]); + log_event("JsInterpreter.js", 4543, ctx_827, "case"); + + var loop_result = function (s0) { + var ctx_828 = ctx_push(ctx_827, [{key: "s0", val: s0}]); + log_event("JsInterpreter.js", 4499, ctx_828, "enter"); + var _return_1924 = (function () { + log_event("JsInterpreter.js", 4497, ctx_828, "call"); + var _return_1923 = run_array_element_list(s0, c, l, oes_2, 0.); + log_event("JsInterpreter.js", 4496, ctx_push(ctx_828, [{key: "#RETURN_VALUE#", val: _return_1923}]), "return"); + return (_return_1923); + }()) + ; + log_event("JsInterpreter.js", 4498, ctx_push(ctx_828, [{key: "#RETURN_VALUE#", val: _return_1924}]), "return"); + return (_return_1924); + }; + var ctx_829 = ctx_push(ctx_827, [{key: "loop_result", val: loop_result}]); + log_event("JsInterpreter.js", 4542, ctx_829, "let"); + var _return_1939 = if_run((function () { + log_event("JsInterpreter.js", 4501, ctx_829, "call"); + var _return_1925 = run_expr_get_value(s, c, + e); + log_event("JsInterpreter.js", 4500, ctx_push(ctx_829, [{key: "#RETURN_VALUE#", val: _return_1925}]), "return"); + return (_return_1925); }()), function(s0, + v) { + + var ctx_830 = ctx_push(ctx_829, [{key: "s0", val: s0}, {key: "v", val: v}]); + log_event("JsInterpreter.js", 4540, ctx_830, "let"); + var _return_1938 = if_value((function () { + log_event("JsInterpreter.js", 4503, ctx_830, "call"); + var _return_1926 = + run_object_get(s0, c, + l, "length"); + log_event("JsInterpreter.js", 4502, ctx_push(ctx_830, [{key: "#RETURN_VALUE#", val: _return_1926}]), "return"); + return (_return_1926); + }()), function(s1, + vlen) { + + var ctx_831 = ctx_push(ctx_830, [{key: "s1", val: s1}, {key: "vlen", val: vlen}]); + log_event("JsInterpreter.js", 4536, ctx_831, "let"); + var _return_1937 = + if_run((function () { + log_event("JsInterpreter.js", 4505, ctx_831, "call"); + var _return_1927 = + to_uint32(s1, c, + vlen); + log_event("JsInterpreter.js", 4504, ctx_push(ctx_831, [{key: "#RETURN_VALUE#", val: _return_1927}]), "return"); + return (_return_1927); + }()), function(s2, + ilen) { + + var ctx_832 = ctx_push(ctx_831, [{key: "s2", val: s2}, {key: "ilen", val: ilen}]); + log_event("JsInterpreter.js", 4532, ctx_832, "let"); + var _return_1936 = + if_string( + (function () { + log_event("JsInterpreter.js", 4509, ctx_832, "call"); + var _return_1929 = + to_string(s2, + c, + Coq_value_prim( + Coq_prim_number( + (function () { + log_event("JsInterpreter.js", 4507, ctx_832, "call"); + var _return_1928 = + (ilen + + n); + log_event("JsInterpreter.js", 4506, ctx_push(ctx_832, [{key: "#RETURN_VALUE#", val: _return_1928}]), "return"); + return (_return_1928); + }())))); + log_event("JsInterpreter.js", 4508, ctx_push(ctx_832, [{key: "#RETURN_VALUE#", val: _return_1929}]), "return"); + return (_return_1929); + }()), + function(s3, + slen) { + + var ctx_833 = ctx_push(ctx_832, [{key: "s3", val: s3}, {key: "slen", val: slen}]); + log_event("JsInterpreter.js", 4528, ctx_833, "let"); + var desc = { + attributes_data_value: v, + attributes_data_writable: true, + attributes_data_enumerable: true, + attributes_data_configurable: true + }; + var ctx_834 = ctx_push(ctx_833, [{key: "desc", val: desc}]); + log_event("JsInterpreter.js", 4525, ctx_834, "let"); + var _return_1935 = + if_bool( + (function () { + log_event("JsInterpreter.js", 4513, ctx_834, "call"); + var _return_1931 = + object_define_own_prop( + s3, c, l, + slen, + (function () { + log_event("JsInterpreter.js", 4511, ctx_834, "call"); + var _return_1930 = + descriptor_of_attributes( + Coq_attributes_data_of( + desc)); + log_event("JsInterpreter.js", 4510, ctx_push(ctx_834, [{key: "#RETURN_VALUE#", val: _return_1930}]), "return"); + return (_return_1930); + }()), + false); + log_event("JsInterpreter.js", 4512, ctx_push(ctx_834, [{key: "#RETURN_VALUE#", val: _return_1931}]), "return"); + return (_return_1931); + }()), + function(s4, + x) { + + var ctx_835 = ctx_push(ctx_834, [{key: "s4", val: s4}, {key: "x", val: x}]); + log_event("JsInterpreter.js", 4523, ctx_835, "let"); + var _return_1934 = + if_object( + (function () { + log_event("JsInterpreter.js", 4515, ctx_835, "call"); + var _return_1932 = + loop_result( + s4); + log_event("JsInterpreter.js", 4514, ctx_push(ctx_835, [{key: "#RETURN_VALUE#", val: _return_1932}]), "return"); + return (_return_1932); + }()), + function(s5, + l0) { + + var ctx_836 = ctx_push(ctx_835, [{key: "s5", val: s5}, {key: "l0", val: l0}]); + log_event("JsInterpreter.js", 4519, ctx_836, "let"); + var _return_1933 = + res_ter( + s5, + res_val( + Coq_value_object( + l0))); + log_event("JsInterpreter.js", 4516, ctx_push(ctx_836, [{key: "#RETURN_VALUE#", val: _return_1933}]), "return"); + return (_return_1933); + }); + log_event("JsInterpreter.js", 4520, ctx_push(ctx_835, [{key: "#RETURN_VALUE#", val: _return_1934}]), "return"); + return (_return_1934); + }); + log_event("JsInterpreter.js", 4524, ctx_push(ctx_834, [{key: "#RETURN_VALUE#", val: _return_1935}]), "return"); + return (_return_1935); + + }); + log_event("JsInterpreter.js", 4529, ctx_push(ctx_832, [{key: "#RETURN_VALUE#", val: _return_1936}]), "return"); + return (_return_1936); + }); + log_event("JsInterpreter.js", 4533, ctx_push(ctx_831, [{key: "#RETURN_VALUE#", val: _return_1937}]), "return"); + return (_return_1937); + }); + log_event("JsInterpreter.js", 4537, ctx_push(ctx_830, [{key: "#RETURN_VALUE#", val: _return_1938}]), "return"); + return (_return_1938); + }); + log_event("JsInterpreter.js", 4541, ctx_push(ctx_829, [{key: "#RETURN_VALUE#", val: _return_1939}]), "return"); + return (_return_1939); + + case "None":log_event("JsInterpreter.js", 4552, ctx_826, "case"); + + var firstIndex = (function () { + log_event("JsInterpreter.js", 4545, ctx_826, "call"); + var _return_1940 = elision_head_count(mk_cons(None(), oes_2)); + log_event("JsInterpreter.js", 4544, ctx_push(ctx_826, [{key: "#RETURN_VALUE#", val: _return_1940}]), "return"); + return (_return_1940); + }()) + ; + var ctx_837 = ctx_push(ctx_826, [{key: "firstIndex", val: firstIndex}]); + log_event("JsInterpreter.js", 4551, ctx_837, "let"); + var _return_1943 = (function () { + log_event("JsInterpreter.js", 4549, ctx_837, "call"); + var _return_1942 = run_array_element_list(s, c, l, (function () { + log_event("JsInterpreter.js", 4547, ctx_837, "call"); + var _return_1941 = elision_head_remove( + mk_cons(None(), + oes_2)); + log_event("JsInterpreter.js", 4546, ctx_push(ctx_837, [{key: "#RETURN_VALUE#", val: _return_1941}]), "return"); + return (_return_1941); }()), + number_of_int(firstIndex)); + log_event("JsInterpreter.js", 4548, ctx_push(ctx_837, [{key: "#RETURN_VALUE#", val: _return_1942}]), "return"); + return (_return_1942); + }()) + ; + log_event("JsInterpreter.js", 4550, ctx_push(ctx_837, [{key: "#RETURN_VALUE#", val: _return_1943}]), "return"); + return (_return_1943); + + } + + } + +}; + +var init_array = function (s, c, l, oes) { + var ctx_838 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "l", val: l}, {key: "oes", val: oes}]); + log_event("JsInterpreter.js", 4596, ctx_838, "enter"); + var elementList = (function () { + log_event("JsInterpreter.js", 4558, ctx_838, "call"); + var _return_1944 = elision_tail_remove(oes); + log_event("JsInterpreter.js", 4557, ctx_push(ctx_838, [{key: "#RETURN_VALUE#", val: _return_1944}]), "return"); + return (_return_1944); + }()) + ; + var ctx_839 = ctx_push(ctx_838, [{key: "elementList", val: elementList}]); + log_event("JsInterpreter.js", 4595, ctx_839, "let"); + var elisionLength = (function () { + log_event("JsInterpreter.js", 4560, ctx_839, "call"); + var _return_1945 = elision_tail_count(oes); + log_event("JsInterpreter.js", 4559, ctx_push(ctx_839, [{key: "#RETURN_VALUE#", val: _return_1945}]), "return"); + return (_return_1945); + }()) + ; + var ctx_840 = ctx_push(ctx_839, [{key: "elisionLength", val: elisionLength}]); + log_event("JsInterpreter.js", 4594, ctx_840, "let"); + var _return_1957 = if_object((function () { + log_event("JsInterpreter.js", 4562, ctx_840, "call"); + var _return_1946 = run_array_element_list(s, c, l, + elementList, 0.); + log_event("JsInterpreter.js", 4561, ctx_push(ctx_840, [{key: "#RETURN_VALUE#", val: _return_1946}]), "return"); + return (_return_1946); }()), function(s0, l0) { + + var ctx_841 = ctx_push(ctx_840, [{key: "s0", val: s0}, {key: "l0", val: l0}]); + log_event("JsInterpreter.js", 4592, ctx_841, "let"); + var _return_1956 = if_value((function () { + log_event("JsInterpreter.js", 4564, ctx_841, "call"); + var _return_1947 = run_object_get( + s0, c, + l0, + "length"); + log_event("JsInterpreter.js", 4563, ctx_push(ctx_841, [{key: "#RETURN_VALUE#", val: _return_1947}]), "return"); + return (_return_1947); }()), + function(s1, vlen) { + + var ctx_842 = ctx_push(ctx_841, [{key: "s1", val: s1}, {key: "vlen", val: vlen}]); + log_event("JsInterpreter.js", 4588, ctx_842, "let"); + var _return_1955 = if_run( + (function () { + log_event("JsInterpreter.js", 4566, ctx_842, "call"); + var _return_1948 = + to_uint32( + s1, c, + vlen); + log_event("JsInterpreter.js", 4565, ctx_push(ctx_842, [{key: "#RETURN_VALUE#", val: _return_1948}]), "return"); + return (_return_1948); + }()), + function(s2, + ilen) { + + var ctx_843 = ctx_push(ctx_842, [{key: "s2", val: s2}, {key: "ilen", val: ilen}]); + log_event("JsInterpreter.js", 4584, ctx_843, "let"); + var _return_1954 = + if_run( + (function () { + log_event("JsInterpreter.js", 4570, ctx_843, "call"); + var _return_1950 = + to_uint32( + s2, c, + Coq_value_prim( + Coq_prim_number( + (function () { + log_event("JsInterpreter.js", 4568, ctx_843, "call"); + var _return_1949 = + (ilen + + + number_of_int( + elisionLength)); + log_event("JsInterpreter.js", 4567, ctx_push(ctx_843, [{key: "#RETURN_VALUE#", val: _return_1949}]), "return"); + return (_return_1949); + }())))); + log_event("JsInterpreter.js", 4569, ctx_push(ctx_843, [{key: "#RETURN_VALUE#", val: _return_1950}]), "return"); + return (_return_1950); + }()), + function(s3, + len) { + + var ctx_844 = ctx_push(ctx_843, [{key: "s3", val: s3}, {key: "len", val: len}]); + log_event("JsInterpreter.js", 4580, ctx_844, "let"); + var _return_1953 = + if_not_throw( + (function () { + log_event("JsInterpreter.js", 4572, ctx_844, "call"); + var _return_1951 = + object_put( + s3, c, + l0, + "length", + Coq_value_prim( + Coq_prim_number( + len)), + throw_false); + log_event("JsInterpreter.js", 4571, ctx_push(ctx_844, [{key: "#RETURN_VALUE#", val: _return_1951}]), "return"); + return (_return_1951); + }()), + function(s4, + x) { + + var ctx_845 = ctx_push(ctx_844, [{key: "s4", val: s4}, {key: "x", val: x}]); + log_event("JsInterpreter.js", 4576, ctx_845, "let"); + var _return_1952 = + result_out( + Coq_out_ter( + s4, + res_val( + Coq_value_object( + l0)))); + log_event("JsInterpreter.js", 4573, ctx_push(ctx_845, [{key: "#RETURN_VALUE#", val: _return_1952}]), "return"); + return (_return_1952); + }); + log_event("JsInterpreter.js", 4577, ctx_push(ctx_844, [{key: "#RETURN_VALUE#", val: _return_1953}]), "return"); + return (_return_1953); + }); + log_event("JsInterpreter.js", 4581, ctx_push(ctx_843, [{key: "#RETURN_VALUE#", val: _return_1954}]), "return"); + return (_return_1954); + }); + log_event("JsInterpreter.js", 4585, ctx_push(ctx_842, [{key: "#RETURN_VALUE#", val: _return_1955}]), "return"); + return (_return_1955); + }); + log_event("JsInterpreter.js", 4589, ctx_push(ctx_841, [{key: "#RETURN_VALUE#", val: _return_1956}]), "return"); + return (_return_1956); + }); + log_event("JsInterpreter.js", 4593, ctx_push(ctx_840, [{key: "#RETURN_VALUE#", val: _return_1957}]), "return"); + return (_return_1957); + + +}; + +var run_var_decl_item = function (s, c, x, _foo_) { + var ctx_846 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "x", val: x}, {key: "_foo_", val: _foo_}]); + log_event("JsInterpreter.js", 4620, ctx_846, "enter"); + log_event("JsInterpreter.js", 4619, ctx_846, "switch"); + switch (_foo_.tag) { + case "Some": + var e = _foo_.value;var ctx_847 = ctx_push(ctx_846, [{key: "e", val: e}]); + log_event("JsInterpreter.js", 4616, ctx_847, "case"); + + var _return_1964 = if_run((function () { + log_event("JsInterpreter.js", 4598, ctx_847, "call"); + var _return_1958 = identifier_resolution(s, c, + x); + log_event("JsInterpreter.js", 4597, ctx_push(ctx_847, [{key: "#RETURN_VALUE#", val: _return_1958}]), "return"); + return (_return_1958); }()), function(s1, ir) { + + var ctx_848 = ctx_push(ctx_847, [{key: "s1", val: s1}, {key: "ir", val: ir}]); + log_event("JsInterpreter.js", 4614, ctx_848, "let"); + var _return_1963 = if_run((function () { + log_event("JsInterpreter.js", 4600, ctx_848, "call"); + var _return_1959 = + run_expr_get_value(s1, c, + e); + log_event("JsInterpreter.js", 4599, ctx_push(ctx_848, [{key: "#RETURN_VALUE#", val: _return_1959}]), "return"); + return (_return_1959); + }()), function(s2, v) { + + var ctx_849 = ctx_push(ctx_848, [{key: "s2", val: s2}, {key: "v", val: v}]); + log_event("JsInterpreter.js", 4610, ctx_849, "let"); + var _return_1962 = + if_void((function () { + log_event("JsInterpreter.js", 4602, ctx_849, "call"); + var _return_1960 = + ref_put_value(s2, c, + Coq_resvalue_ref( + ir), v); + log_event("JsInterpreter.js", 4601, ctx_push(ctx_849, [{key: "#RETURN_VALUE#", val: _return_1960}]), "return"); + return (_return_1960); + }()), function(s3) { + + var ctx_850 = ctx_push(ctx_849, [{key: "s3", val: s3}]); + log_event("JsInterpreter.js", 4606, ctx_850, "let"); + var _return_1961 = + result_out( + Coq_out_ter(s3, + res_val( + Coq_value_prim( + Coq_prim_string( + x))))); + log_event("JsInterpreter.js", 4603, ctx_push(ctx_850, [{key: "#RETURN_VALUE#", val: _return_1961}]), "return"); + return (_return_1961); + }); + log_event("JsInterpreter.js", 4607, ctx_push(ctx_849, [{key: "#RETURN_VALUE#", val: _return_1962}]), "return"); + return (_return_1962); + }); + log_event("JsInterpreter.js", 4611, ctx_push(ctx_848, [{key: "#RETURN_VALUE#", val: _return_1963}]), "return"); + return (_return_1963); + }); + log_event("JsInterpreter.js", 4615, ctx_push(ctx_847, [{key: "#RETURN_VALUE#", val: _return_1964}]), "return"); + return (_return_1964); + case "None":log_event("JsInterpreter.js", 4618, ctx_846, "case"); + + var _return_1965 = result_out( + Coq_out_ter(s, + res_val(Coq_value_prim(Coq_prim_string(x))))); + log_event("JsInterpreter.js", 4617, ctx_push(ctx_846, [{key: "#RETURN_VALUE#", val: _return_1965}]), "return"); + return (_return_1965); + } + +}; + +var run_var_decl = function (s, c, _foo_) { + var ctx_851 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "_foo_", val: _foo_}]); + log_event("JsInterpreter.js", 4635, ctx_851, "enter"); + log_event("JsInterpreter.js", 4634, ctx_851, "switch"); + switch (_foo_.tag) { + case "[]":log_event("JsInterpreter.js", 4622, ctx_851, "case"); + + var _return_1966 = result_out(Coq_out_ter(s, res_empty)); + log_event("JsInterpreter.js", 4621, ctx_push(ctx_851, [{key: "#RETURN_VALUE#", val: _return_1966}]), "return"); + return (_return_1966); + case "::": + var y = _foo_.head, xeos_2 = _foo_.tail;var ctx_852 = ctx_push(ctx_851, [{key: "y", val: y}, {key: "xeos_2", val: xeos_2}]); + log_event("JsInterpreter.js", 4633, ctx_852, "case"); + + var x = y[0], eo = y[1]; + var ctx_853 = ctx_push(ctx_852, [{key: "x", val: x}, {key: "eo", val: eo}]); + log_event("JsInterpreter.js", 4632, ctx_853, "let"); + var _return_1970 = if_value((function () { + log_event("JsInterpreter.js", 4624, ctx_853, "call"); + var _return_1967 = run_var_decl_item(s, c, x, + eo); + log_event("JsInterpreter.js", 4623, ctx_push(ctx_853, [{key: "#RETURN_VALUE#", val: _return_1967}]), "return"); + return (_return_1967); }()), function(s1, + vname) { + + var ctx_854 = ctx_push(ctx_853, [{key: "s1", val: s1}, {key: "vname", val: vname}]); + log_event("JsInterpreter.js", 4630, ctx_854, "let"); + var _return_1969 = (function () { + log_event("JsInterpreter.js", 4626, ctx_854, "call"); + var _return_1968 = run_var_decl(s1, c, xeos_2); + log_event("JsInterpreter.js", 4625, ctx_push(ctx_854, [{key: "#RETURN_VALUE#", val: _return_1968}]), "return"); + return (_return_1968); + }()) + ; + log_event("JsInterpreter.js", 4627, ctx_push(ctx_854, [{key: "#RETURN_VALUE#", val: _return_1969}]), "return"); + return (_return_1969); + }); + log_event("JsInterpreter.js", 4631, ctx_push(ctx_853, [{key: "#RETURN_VALUE#", val: _return_1970}]), "return"); + return (_return_1970); + + } + +}; + +var run_list_expr = function (s1, c, vs, _foo_) { + var ctx_855 = ctx_push(ctx_empty, [{key: "s1", val: s1}, {key: "c", val: c}, {key: "vs", val: vs}, {key: "_foo_", val: _foo_}]); + log_event("JsInterpreter.js", 4651, ctx_855, "enter"); + log_event("JsInterpreter.js", 4650, ctx_855, "switch"); + switch (_foo_.tag) { + case "[]":log_event("JsInterpreter.js", 4639, ctx_855, "case"); + + var _return_1972 = res_spec(s1, (function () { + log_event("JsInterpreter.js", 4637, ctx_855, "call"); + var _return_1971 = rev(vs); + log_event("JsInterpreter.js", 4636, ctx_push(ctx_855, [{key: "#RETURN_VALUE#", val: _return_1971}]), "return"); + return (_return_1971); }())); + log_event("JsInterpreter.js", 4638, ctx_push(ctx_855, [{key: "#RETURN_VALUE#", val: _return_1972}]), "return"); + return (_return_1972); + case "::": + var e = _foo_.head, es_2 = _foo_.tail;var ctx_856 = ctx_push(ctx_855, [{key: "e", val: e}, {key: "es_2", val: es_2}]); + log_event("JsInterpreter.js", 4649, ctx_856, "case"); + + var _return_1976 = if_run((function () { + log_event("JsInterpreter.js", 4641, ctx_856, "call"); + var _return_1973 = run_expr_get_value(s1, c, e); + log_event("JsInterpreter.js", 4640, ctx_push(ctx_856, [{key: "#RETURN_VALUE#", val: _return_1973}]), "return"); + return (_return_1973); }()), function(s2, v) { + + var ctx_857 = ctx_push(ctx_856, [{key: "s2", val: s2}, {key: "v", val: v}]); + log_event("JsInterpreter.js", 4647, ctx_857, "let"); + var _return_1975 = (function () { + log_event("JsInterpreter.js", 4643, ctx_857, "call"); + var _return_1974 = run_list_expr(s2, c, + mk_cons(v, vs), es_2); + log_event("JsInterpreter.js", 4642, ctx_push(ctx_857, [{key: "#RETURN_VALUE#", val: _return_1974}]), "return"); + return (_return_1974); + }()) + ; + log_event("JsInterpreter.js", 4644, ctx_push(ctx_857, [{key: "#RETURN_VALUE#", val: _return_1975}]), "return"); + return (_return_1975); + }); + log_event("JsInterpreter.js", 4648, ctx_push(ctx_856, [{key: "#RETURN_VALUE#", val: _return_1976}]), "return"); + return (_return_1976); + } + +}; + +var run_block = function (s, c, _foo_) { + var ctx_858 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "_foo_", val: _foo_}]); + log_event("JsInterpreter.js", 4669, ctx_858, "enter"); + log_event("JsInterpreter.js", 4668, ctx_858, "switch"); + switch (_foo_.tag) { + case "[]":log_event("JsInterpreter.js", 4653, ctx_858, "case"); + + var _return_1977 = res_ter(s, res_normal(Coq_resvalue_empty())); + log_event("JsInterpreter.js", 4652, ctx_push(ctx_858, [{key: "#RETURN_VALUE#", val: _return_1977}]), "return"); + return (_return_1977); + case "::": + var t = _foo_.head, ts_rev_2 = _foo_.tail;var ctx_859 = ctx_push(ctx_858, [{key: "t", val: t}, {key: "ts_rev_2", val: ts_rev_2}]); + log_event("JsInterpreter.js", 4667, ctx_859, "case"); + + var _return_1983 = if_success((function () { + log_event("JsInterpreter.js", 4655, ctx_859, "call"); + var _return_1978 = run_block(s, c, ts_rev_2); + log_event("JsInterpreter.js", 4654, ctx_push(ctx_859, [{key: "#RETURN_VALUE#", val: _return_1978}]), "return"); + return (_return_1978); }()), function(s0, rv0) { + + var ctx_860 = ctx_push(ctx_859, [{key: "s0", val: s0}, {key: "rv0", val: rv0}]); + log_event("JsInterpreter.js", 4665, ctx_860, "let"); + var _return_1982 = (function () { + log_event("JsInterpreter.js", 4661, ctx_860, "call"); + var _return_1981 = ifx_success_state(rv0, + (function () { + log_event("JsInterpreter.js", 4657, ctx_860, "call"); + var _return_1979 = + run_stat(s0, c, t); + log_event("JsInterpreter.js", 4656, ctx_push(ctx_860, [{key: "#RETURN_VALUE#", val: _return_1979}]), "return"); + return (_return_1979); + }()), function (x, x0) { + var ctx_861 = ctx_push(ctx_860, [{key: "x", val: x}, {key: "x0", val: x0}]); + log_event("JsInterpreter.js", 4659, ctx_861, "enter"); + var _return_1980 = + result_out( + Coq_out_ter(x, + res_normal(x0))); + log_event("JsInterpreter.js", 4658, ctx_push(ctx_861, [{key: "#RETURN_VALUE#", val: _return_1980}]), "return"); + return (_return_1980); + }); + log_event("JsInterpreter.js", 4660, ctx_push(ctx_860, [{key: "#RETURN_VALUE#", val: _return_1981}]), "return"); + return (_return_1981); + }()) + ; + log_event("JsInterpreter.js", 4662, ctx_push(ctx_860, [{key: "#RETURN_VALUE#", val: _return_1982}]), "return"); + return (_return_1982); + }); + log_event("JsInterpreter.js", 4666, ctx_push(ctx_859, [{key: "#RETURN_VALUE#", val: _return_1983}]), "return"); + return (_return_1983); + } + +}; + +var run_binary_op_and = function (s, c, e1, e2) { + var ctx_862 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "e1", val: e1}, {key: "e2", val: e2}]); + log_event("JsInterpreter.js", 4690, ctx_862, "enter"); + var _return_1992 = if_run((function () { + log_event("JsInterpreter.js", 4671, ctx_862, "call"); + var _return_1984 = run_expr_get_value(s, c, e1); + log_event("JsInterpreter.js", 4670, ctx_push(ctx_862, [{key: "#RETURN_VALUE#", val: _return_1984}]), "return"); + return (_return_1984); }()), function(s1, v1) { + + var ctx_863 = ctx_push(ctx_862, [{key: "s1", val: s1}, {key: "v1", val: v1}]); + log_event("JsInterpreter.js", 4688, ctx_863, "let"); + var b1 = (function () { + log_event("JsInterpreter.js", 4673, ctx_863, "call"); + var _return_1985 = convert_value_to_boolean(v1); + log_event("JsInterpreter.js", 4672, ctx_push(ctx_863, [{key: "#RETURN_VALUE#", val: _return_1985}]), "return"); + return (_return_1985); + }()) + ; + var ctx_864 = ctx_push(ctx_863, [{key: "b1", val: b1}]); + log_event("JsInterpreter.js", 4685, ctx_864, "let"); + var _if_arg_1986 = (function () { + log_event("JsInterpreter.js", 4675, ctx_864, "call"); + var _return_1987 = !(b1); + log_event("JsInterpreter.js", 4674, ctx_push(ctx_864, [{key: "#RETURN_VALUE#", val: _return_1987}]), "return"); + return (_return_1987); + }()) + ; + log_event("JsInterpreter.js", 4684, ctx_864, "if"); + if (_if_arg_1986) { + var _return_1991 = res_ter(s1, res_val(v1)); + log_event("JsInterpreter.js", 4683, ctx_push(ctx_864, [{key: "#RETURN_VALUE#", val: _return_1991}]), "return"); + return (_return_1991); + } else { + var _return_1990 = if_run((function () { + log_event("JsInterpreter.js", 4677, ctx_864, "call"); + var _return_1988 = + run_expr_get_value(s1, c, + e2); + log_event("JsInterpreter.js", 4676, ctx_push(ctx_864, [{key: "#RETURN_VALUE#", val: _return_1988}]), "return"); + return (_return_1988); }()) + , function(s2, v) { + + var ctx_865 = ctx_push(ctx_864, [{key: "s2", val: s2}, {key: "v", val: v}]); + log_event("JsInterpreter.js", 4681, ctx_865, "let"); + var _return_1989 = + res_ter(s2, res_val(v)); + log_event("JsInterpreter.js", 4678, ctx_push(ctx_865, [{key: "#RETURN_VALUE#", val: _return_1989}]), "return"); + return (_return_1989); + }); + log_event("JsInterpreter.js", 4682, ctx_push(ctx_864, [{key: "#RETURN_VALUE#", val: _return_1990}]), "return"); + return (_return_1990); + } + + }); + log_event("JsInterpreter.js", 4689, ctx_push(ctx_862, [{key: "#RETURN_VALUE#", val: _return_1992}]), "return"); + return (_return_1992); +}; + +var run_binary_op_or = function (s, c, e1, e2) { + var ctx_866 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "e1", val: e1}, {key: "e2", val: e2}]); + log_event("JsInterpreter.js", 4709, ctx_866, "enter"); + var _return_1999 = if_run((function () { + log_event("JsInterpreter.js", 4692, ctx_866, "call"); + var _return_1993 = run_expr_get_value(s, c, e1); + log_event("JsInterpreter.js", 4691, ctx_push(ctx_866, [{key: "#RETURN_VALUE#", val: _return_1993}]), "return"); + return (_return_1993); }()), function(s1, v1) { + + var ctx_867 = ctx_push(ctx_866, [{key: "s1", val: s1}, {key: "v1", val: v1}]); + log_event("JsInterpreter.js", 4707, ctx_867, "let"); + var b1 = (function () { + log_event("JsInterpreter.js", 4694, ctx_867, "call"); + var _return_1994 = convert_value_to_boolean(v1); + log_event("JsInterpreter.js", 4693, ctx_push(ctx_867, [{key: "#RETURN_VALUE#", val: _return_1994}]), "return"); + return (_return_1994); + }()) + ; + var ctx_868 = ctx_push(ctx_867, [{key: "b1", val: b1}]); + log_event("JsInterpreter.js", 4704, ctx_868, "let"); + log_event("JsInterpreter.js", 4703, ctx_868, "if"); + if (b1) { + var _return_1998 = res_ter(s1, res_val(v1)); + log_event("JsInterpreter.js", 4702, ctx_push(ctx_868, [{key: "#RETURN_VALUE#", val: _return_1998}]), "return"); + return (_return_1998); + } else { + var _return_1997 = if_run((function () { + log_event("JsInterpreter.js", 4696, ctx_868, "call"); + var _return_1995 = + run_expr_get_value(s1, c, + e2); + log_event("JsInterpreter.js", 4695, ctx_push(ctx_868, [{key: "#RETURN_VALUE#", val: _return_1995}]), "return"); + return (_return_1995); }()) + , function(s2, v) { + + var ctx_869 = ctx_push(ctx_868, [{key: "s2", val: s2}, {key: "v", val: v}]); + log_event("JsInterpreter.js", 4700, ctx_869, "let"); + var _return_1996 = + res_ter(s2, res_val(v)); + log_event("JsInterpreter.js", 4697, ctx_push(ctx_869, [{key: "#RETURN_VALUE#", val: _return_1996}]), "return"); + return (_return_1996); + }); + log_event("JsInterpreter.js", 4701, ctx_push(ctx_868, [{key: "#RETURN_VALUE#", val: _return_1997}]), "return"); + return (_return_1997); + } + + }); + log_event("JsInterpreter.js", 4708, ctx_push(ctx_866, [{key: "#RETURN_VALUE#", val: _return_1999}]), "return"); + return (_return_1999); +}; + +var run_expr_binary_op = function (s, c, op, e1, e2) { + var ctx_870 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "op", val: op}, {key: "e1", val: e1}, {key: "e2", val: e2}]); + log_event("JsInterpreter.js", 4735, ctx_870, "enter"); + log_event("JsInterpreter.js", 4734, ctx_870, "switch"); + switch (op.tag) { + case "Coq_binary_op_and":log_event("JsInterpreter.js", 4713, ctx_870, "case"); + + var _return_2001 = (function () { + log_event("JsInterpreter.js", 4711, ctx_870, "call"); + var _return_2000 = run_binary_op_and(s, c, e1, e2); + log_event("JsInterpreter.js", 4710, ctx_push(ctx_870, [{key: "#RETURN_VALUE#", val: _return_2000}]), "return"); + return (_return_2000); + }()) + ; + log_event("JsInterpreter.js", 4712, ctx_push(ctx_870, [{key: "#RETURN_VALUE#", val: _return_2001}]), "return"); + return (_return_2001); + case "Coq_binary_op_or":log_event("JsInterpreter.js", 4717, ctx_870, "case"); + + var _return_2003 = (function () { + log_event("JsInterpreter.js", 4715, ctx_870, "call"); + var _return_2002 = run_binary_op_or(s, c, e1, e2); + log_event("JsInterpreter.js", 4714, ctx_push(ctx_870, [{key: "#RETURN_VALUE#", val: _return_2002}]), "return"); + return (_return_2002); + }()) + ; + log_event("JsInterpreter.js", 4716, ctx_push(ctx_870, [{key: "#RETURN_VALUE#", val: _return_2003}]), "return"); + return (_return_2003); + default:log_event("JsInterpreter.js", 4733, ctx_870, "case"); + + var _return_2009 = if_run((function () { + log_event("JsInterpreter.js", 4719, ctx_870, "call"); + var _return_2004 = run_expr_get_value(s, c, e1); + log_event("JsInterpreter.js", 4718, ctx_push(ctx_870, [{key: "#RETURN_VALUE#", val: _return_2004}]), "return"); + return (_return_2004); }()), function(s1, v1) { + + var ctx_871 = ctx_push(ctx_870, [{key: "s1", val: s1}, {key: "v1", val: v1}]); + log_event("JsInterpreter.js", 4731, ctx_871, "let"); + var _return_2008 = if_run((function () { + log_event("JsInterpreter.js", 4721, ctx_871, "call"); + var _return_2005 = + run_expr_get_value(s1, c, + e2); + log_event("JsInterpreter.js", 4720, ctx_push(ctx_871, [{key: "#RETURN_VALUE#", val: _return_2005}]), "return"); + return (_return_2005); + }()), function(s2, v2) { + + var ctx_872 = ctx_push(ctx_871, [{key: "s2", val: s2}, {key: "v2", val: v2}]); + log_event("JsInterpreter.js", 4727, ctx_872, "let"); + var _return_2007 = (function () { + log_event("JsInterpreter.js", 4723, ctx_872, "call"); + var _return_2006 = + run_binary_op(s2, c, + op, v1, v2); + log_event("JsInterpreter.js", 4722, ctx_push(ctx_872, [{key: "#RETURN_VALUE#", val: _return_2006}]), "return"); + return (_return_2006); + }()) + ; + log_event("JsInterpreter.js", 4724, ctx_push(ctx_872, [{key: "#RETURN_VALUE#", val: _return_2007}]), "return"); + return (_return_2007); + }); + log_event("JsInterpreter.js", 4728, ctx_push(ctx_871, [{key: "#RETURN_VALUE#", val: _return_2008}]), "return"); + return (_return_2008); + }); + log_event("JsInterpreter.js", 4732, ctx_push(ctx_870, [{key: "#RETURN_VALUE#", val: _return_2009}]), "return"); + return (_return_2009); + } + +}; + +var run_expr_access = function (s, c, e1, e2) { + var ctx_873 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "e1", val: e1}, {key: "e2", val: e2}]); + log_event("JsInterpreter.js", 4763, ctx_873, "enter"); + var _return_2021 = if_run((function () { + log_event("JsInterpreter.js", 4737, ctx_873, "call"); + var _return_2010 = run_expr_get_value(s, c, e1); + log_event("JsInterpreter.js", 4736, ctx_push(ctx_873, [{key: "#RETURN_VALUE#", val: _return_2010}]), "return"); + return (_return_2010); }()), function(s1, v1) { + + var ctx_874 = ctx_push(ctx_873, [{key: "s1", val: s1}, {key: "v1", val: v1}]); + log_event("JsInterpreter.js", 4761, ctx_874, "let"); + var _return_2020 = if_run((function () { + log_event("JsInterpreter.js", 4739, ctx_874, "call"); + var _return_2011 = run_expr_get_value( + s1, c, + e2); + log_event("JsInterpreter.js", 4738, ctx_push(ctx_874, [{key: "#RETURN_VALUE#", val: _return_2011}]), "return"); + return (_return_2011); }()), + function(s2, v2) { + + var ctx_875 = ctx_push(ctx_874, [{key: "s2", val: s2}, {key: "v2", val: v2}]); + log_event("JsInterpreter.js", 4757, ctx_875, "let"); + var _if_arg_2012 = (function () { + log_event("JsInterpreter.js", 4741, ctx_875, "call"); + var _return_2013 = + (value_compare(v1, + Coq_value_prim( + Coq_prim_undef())) + || value_compare(v1, + Coq_value_prim( + Coq_prim_null()))); + log_event("JsInterpreter.js", 4740, ctx_push(ctx_875, [{key: "#RETURN_VALUE#", val: _return_2013}]), "return"); + return (_return_2013); + }()) + ; + log_event("JsInterpreter.js", 4754, ctx_875, "if"); + if (_if_arg_2012) { + var _return_2019 = (function () { + log_event("JsInterpreter.js", 4752, ctx_875, "call"); + var _return_2018 = + run_error(s2, + Coq_native_error_type()); + log_event("JsInterpreter.js", 4751, ctx_push(ctx_875, [{key: "#RETURN_VALUE#", val: _return_2018}]), "return"); + return (_return_2018); + }()) + ; + log_event("JsInterpreter.js", 4753, ctx_push(ctx_875, [{key: "#RETURN_VALUE#", val: _return_2019}]), "return"); + return (_return_2019); + } else { + var _return_2017 = + if_string((function () { + log_event("JsInterpreter.js", 4743, ctx_875, "call"); + var _return_2014 = + to_string(s2, c, v2); + log_event("JsInterpreter.js", 4742, ctx_push(ctx_875, [{key: "#RETURN_VALUE#", val: _return_2014}]), "return"); + return (_return_2014); + }()), function(s3, x) { + + var ctx_876 = ctx_push(ctx_875, [{key: "s3", val: s3}, {key: "x", val: x}]); + log_event("JsInterpreter.js", 4749, ctx_876, "let"); + var _return_2016 = + res_ter(s3, + res_ref( + (function () { + log_event("JsInterpreter.js", 4745, ctx_876, "call"); + var _return_2015 = + ref_create_value( + v1, x, + c.execution_ctx_strict); + log_event("JsInterpreter.js", 4744, ctx_push(ctx_876, [{key: "#RETURN_VALUE#", val: _return_2015}]), "return"); + return (_return_2015); + }()))); + log_event("JsInterpreter.js", 4746, ctx_push(ctx_876, [{key: "#RETURN_VALUE#", val: _return_2016}]), "return"); + return (_return_2016); + }); + log_event("JsInterpreter.js", 4750, ctx_push(ctx_875, [{key: "#RETURN_VALUE#", val: _return_2017}]), "return"); + return (_return_2017); + } + }); + log_event("JsInterpreter.js", 4758, ctx_push(ctx_874, [{key: "#RETURN_VALUE#", val: _return_2020}]), "return"); + return (_return_2020); + }); + log_event("JsInterpreter.js", 4762, ctx_push(ctx_873, [{key: "#RETURN_VALUE#", val: _return_2021}]), "return"); + return (_return_2021); +}; + +var run_expr_assign = function (s, c, opo, e1, e2) { + var ctx_877 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "opo", val: opo}, {key: "e1", val: e1}, {key: "e2", val: e2}]); + log_event("JsInterpreter.js", 4830, ctx_877, "enter"); + var _return_2046 = if_success((function () { + log_event("JsInterpreter.js", 4765, ctx_877, "call"); + var _return_2022 = run_expr(s, c, e1); + log_event("JsInterpreter.js", 4764, ctx_push(ctx_877, [{key: "#RETURN_VALUE#", val: _return_2022}]), "return"); + return (_return_2022); }()), function(s1, rv1) { + + var ctx_878 = ctx_push(ctx_877, [{key: "s1", val: s1}, {key: "rv1", val: rv1}]); + log_event("JsInterpreter.js", 4828, ctx_878, "let"); + var follow = function (s0, rv_2) { + var ctx_879 = ctx_push(ctx_878, [{key: "s0", val: s0}, {key: "rv_2", val: rv_2}]); + log_event("JsInterpreter.js", 4791, ctx_879, "enter"); + log_event("JsInterpreter.js", 4790, ctx_879, "switch"); + switch (rv_2.tag) { + case "Coq_resvalue_empty":log_event("JsInterpreter.js", 4773, ctx_879, "case"); + + var _return_2026 = (function () { + log_event("JsInterpreter.js", 4771, ctx_879, "call"); + var _return_2025 = function (s, m) { + var ctx_880 = ctx_push(ctx_879, [{key: "s", val: s}, {key: "m", val: m}]); + log_event("JsInterpreter.js", 4769, ctx_880, "enter"); + (function () { + log_event("JsInterpreter.js", 4768, ctx_880, "call"); + var _return_2024 = + Debug.impossible_with_heap_because( + __LOC__, s, m); + log_event("JsInterpreter.js", 4767, ctx_push(ctx_880, [{key: "#RETURN_VALUE#", val: _return_2024}]), "return"); + return (_return_2024); + }()) + ; + var _return_2023 = + Coq_result_impossible( + ); + log_event("JsInterpreter.js", 4766, ctx_push(ctx_880, [{key: "#RETURN_VALUE#", val: _return_2023}]), "return"); + return (_return_2023); + }(s0, + "Non-value result in [run_expr_assign]."); + log_event("JsInterpreter.js", 4770, ctx_push(ctx_879, [{key: "#RETURN_VALUE#", val: _return_2025}]), "return"); + return (_return_2025); + }()) + ; + log_event("JsInterpreter.js", 4772, ctx_push(ctx_879, [{key: "#RETURN_VALUE#", val: _return_2026}]), "return"); + return (_return_2026); + case "Coq_resvalue_value": + var v = rv_2.value;var ctx_881 = ctx_push(ctx_879, [{key: "v", val: v}]); + log_event("JsInterpreter.js", 4781, ctx_881, "case"); + + var _return_2029 = if_void((function () { + log_event("JsInterpreter.js", 4775, ctx_881, "call"); + var _return_2027 = + ref_put_value(s0, c, + rv1, v); + log_event("JsInterpreter.js", 4774, ctx_push(ctx_881, [{key: "#RETURN_VALUE#", val: _return_2027}]), "return"); + return (_return_2027); + }()), function(s_2) { + + var ctx_882 = ctx_push(ctx_881, [{key: "s_2", val: s_2}]); + log_event("JsInterpreter.js", 4779, ctx_882, "let"); + var _return_2028 = + result_out( + Coq_out_ter(s_2, + res_val(v))); + log_event("JsInterpreter.js", 4776, ctx_push(ctx_882, [{key: "#RETURN_VALUE#", val: _return_2028}]), "return"); + return (_return_2028); + }); + log_event("JsInterpreter.js", 4780, ctx_push(ctx_881, [{key: "#RETURN_VALUE#", val: _return_2029}]), "return"); + return (_return_2029); + case "Coq_resvalue_ref": + var r = rv_2.ref;var ctx_883 = ctx_push(ctx_879, [{key: "r", val: r}]); + log_event("JsInterpreter.js", 4789, ctx_883, "case"); + + var _return_2033 = (function () { + log_event("JsInterpreter.js", 4787, ctx_883, "call"); + var _return_2032 = function (s, m) { + var ctx_884 = ctx_push(ctx_883, [{key: "s", val: s}, {key: "m", val: m}]); + log_event("JsInterpreter.js", 4785, ctx_884, "enter"); + (function () { + log_event("JsInterpreter.js", 4784, ctx_884, "call"); + var _return_2031 = + Debug.impossible_with_heap_because( + __LOC__, s, m); + log_event("JsInterpreter.js", 4783, ctx_push(ctx_884, [{key: "#RETURN_VALUE#", val: _return_2031}]), "return"); + return (_return_2031); + }()) + ; + var _return_2030 = + Coq_result_impossible( + ); + log_event("JsInterpreter.js", 4782, ctx_push(ctx_884, [{key: "#RETURN_VALUE#", val: _return_2030}]), "return"); + return (_return_2030); + }(s0, + "Non-value result in [run_expr_assign]."); + log_event("JsInterpreter.js", 4786, ctx_push(ctx_883, [{key: "#RETURN_VALUE#", val: _return_2032}]), "return"); + return (_return_2032); + }()) + ; + log_event("JsInterpreter.js", 4788, ctx_push(ctx_883, [{key: "#RETURN_VALUE#", val: _return_2033}]), "return"); + return (_return_2033); + } + + }; + var ctx_885 = ctx_push(ctx_878, [{key: "follow", val: follow}]); + log_event("JsInterpreter.js", 4825, ctx_885, "let"); + log_event("JsInterpreter.js", 4824, ctx_885, "switch"); + switch (opo.tag) { + case "Some": + var op = opo.value;var ctx_886 = ctx_push(ctx_885, [{key: "op", val: op}]); + log_event("JsInterpreter.js", 4813, ctx_886, "case"); + + var _return_2041 = if_run((function () { + log_event("JsInterpreter.js", 4793, ctx_886, "call"); + var _return_2034 = + ref_get_value(s1, c, rv1); + log_event("JsInterpreter.js", 4792, ctx_push(ctx_886, [{key: "#RETURN_VALUE#", val: _return_2034}]), "return"); + return (_return_2034); + }()), function(s2, v1) { + + var ctx_887 = ctx_push(ctx_886, [{key: "s2", val: s2}, {key: "v1", val: v1}]); + log_event("JsInterpreter.js", 4811, ctx_887, "let"); + var _return_2040 = + if_run((function () { + log_event("JsInterpreter.js", 4795, ctx_887, "call"); + var _return_2035 = + run_expr_get_value( + s2, c, e2); + log_event("JsInterpreter.js", 4794, ctx_push(ctx_887, [{key: "#RETURN_VALUE#", val: _return_2035}]), "return"); + return (_return_2035); + }()), function(s3, + v2) { + + var ctx_888 = ctx_push(ctx_887, [{key: "s3", val: s3}, {key: "v2", val: v2}]); + log_event("JsInterpreter.js", 4807, ctx_888, "let"); + var _return_2039 = + if_success( + (function () { + log_event("JsInterpreter.js", 4797, ctx_888, "call"); + var _return_2036 = + run_binary_op(s3, + c, op, v1, v2); + log_event("JsInterpreter.js", 4796, ctx_push(ctx_888, [{key: "#RETURN_VALUE#", val: _return_2036}]), "return"); + return (_return_2036); + }()), function(s4, + v) { + + var ctx_889 = ctx_push(ctx_888, [{key: "s4", val: s4}, {key: "v", val: v}]); + log_event("JsInterpreter.js", 4803, ctx_889, "let"); + var _return_2038 = (function () { + log_event("JsInterpreter.js", 4799, ctx_889, "call"); + var _return_2037 = + follow(s4, v); + log_event("JsInterpreter.js", 4798, ctx_push(ctx_889, [{key: "#RETURN_VALUE#", val: _return_2037}]), "return"); + return (_return_2037); + }()) + ; + log_event("JsInterpreter.js", 4800, ctx_push(ctx_889, [{key: "#RETURN_VALUE#", val: _return_2038}]), "return"); + return (_return_2038); + }); + log_event("JsInterpreter.js", 4804, ctx_push(ctx_888, [{key: "#RETURN_VALUE#", val: _return_2039}]), "return"); + return (_return_2039); + }); + log_event("JsInterpreter.js", 4808, ctx_push(ctx_887, [{key: "#RETURN_VALUE#", val: _return_2040}]), "return"); + return (_return_2040); + }); + log_event("JsInterpreter.js", 4812, ctx_push(ctx_886, [{key: "#RETURN_VALUE#", val: _return_2041}]), "return"); + return (_return_2041); + case "None":log_event("JsInterpreter.js", 4823, ctx_885, "case"); + + var _return_2045 = if_run((function () { + log_event("JsInterpreter.js", 4815, ctx_885, "call"); + var _return_2042 = + run_expr_get_value(s1, c, + e2); + log_event("JsInterpreter.js", 4814, ctx_push(ctx_885, [{key: "#RETURN_VALUE#", val: _return_2042}]), "return"); + return (_return_2042); + }()), function(x, x0) { + + var ctx_890 = ctx_push(ctx_885, [{key: "x", val: x}, {key: "x0", val: x0}]); + log_event("JsInterpreter.js", 4821, ctx_890, "let"); + var _return_2044 = (function () { + log_event("JsInterpreter.js", 4817, ctx_890, "call"); + var _return_2043 = + follow(x, + Coq_resvalue_value( + x0)); + log_event("JsInterpreter.js", 4816, ctx_push(ctx_890, [{key: "#RETURN_VALUE#", val: _return_2043}]), "return"); + return (_return_2043); + }()) + ; + log_event("JsInterpreter.js", 4818, ctx_push(ctx_890, [{key: "#RETURN_VALUE#", val: _return_2044}]), "return"); + return (_return_2044); + }); + log_event("JsInterpreter.js", 4822, ctx_push(ctx_885, [{key: "#RETURN_VALUE#", val: _return_2045}]), "return"); + return (_return_2045); + } + + + }); + log_event("JsInterpreter.js", 4829, ctx_push(ctx_877, [{key: "#RETURN_VALUE#", val: _return_2046}]), "return"); + return (_return_2046); +}; + +var run_expr_function = function (s, c, fo, args, bd) { + var ctx_891 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "fo", val: fo}, {key: "args", val: args}, {key: "bd", val: bd}]); + log_event("JsInterpreter.js", 4884, ctx_891, "enter"); + log_event("JsInterpreter.js", 4883, ctx_891, "switch"); + switch (fo.tag) { + case "Some": + var fn = fo.value;var ctx_892 = ctx_push(ctx_891, [{key: "fn", val: fn}]); + log_event("JsInterpreter.js", 4877, ctx_892, "case"); + + var p = (function () { + log_event("JsInterpreter.js", 4832, ctx_892, "call"); + var _return_2047 = lexical_env_alloc_decl(s, + c.execution_ctx_lexical_env); + log_event("JsInterpreter.js", 4831, ctx_push(ctx_892, [{key: "#RETURN_VALUE#", val: _return_2047}]), "return"); + return (_return_2047); + }()) + ; + var ctx_893 = ctx_push(ctx_892, [{key: "p", val: p}]); + log_event("JsInterpreter.js", 4876, ctx_893, "let"); + var lex_2 = p[0], s_2 = p[1]; + var ctx_894 = ctx_push(ctx_893, [{key: "lex_2", val: lex_2}, {key: "s_2", val: s_2}]); + log_event("JsInterpreter.js", 4875, ctx_894, "let"); + var follow = function (l) { + var ctx_895 = ctx_push(ctx_894, [{key: "l", val: l}]); + log_event("JsInterpreter.js", 4858, ctx_895, "enter"); + var _return_2056 = if_some((function () { + log_event("JsInterpreter.js", 4834, ctx_895, "call"); + var _return_2048 = env_record_binds_pickable_option( + s_2, l); + log_event("JsInterpreter.js", 4833, ctx_push(ctx_895, [{key: "#RETURN_VALUE#", val: _return_2048}]), "return"); + return (_return_2048); }()), function(e) { + + var ctx_896 = ctx_push(ctx_895, [{key: "e", val: e}]); + log_event("JsInterpreter.js", 4856, ctx_896, "let"); + var _return_2055 = if_void((function () { + log_event("JsInterpreter.js", 4836, ctx_896, "call"); + var _return_2049 = + env_record_create_immutable_binding( + s_2, l, fn); + log_event("JsInterpreter.js", 4835, ctx_push(ctx_896, [{key: "#RETURN_VALUE#", val: _return_2049}]), "return"); + return (_return_2049); + }()), function(s1) { + + var ctx_897 = ctx_push(ctx_896, [{key: "s1", val: s1}]); + log_event("JsInterpreter.js", 4852, ctx_897, "let"); + var _return_2054 = + if_object( + (function () { + log_event("JsInterpreter.js", 4838, ctx_897, "call"); + var _return_2050 = + creating_function_object( + s1, c, args, bd, + lex_2, + funcbody_is_strict( + bd)); + log_event("JsInterpreter.js", 4837, ctx_push(ctx_897, [{key: "#RETURN_VALUE#", val: _return_2050}]), "return"); + return (_return_2050); + }()), function(s2, + l0) { + + var ctx_898 = ctx_push(ctx_897, [{key: "s2", val: s2}, {key: "l0", val: l0}]); + log_event("JsInterpreter.js", 4848, ctx_898, "let"); + var _return_2053 = + if_void( + (function () { + log_event("JsInterpreter.js", 4840, ctx_898, "call"); + var _return_2051 = + env_record_initialize_immutable_binding( + s2, l, fn, + Coq_value_object( + l0)); + log_event("JsInterpreter.js", 4839, ctx_push(ctx_898, [{key: "#RETURN_VALUE#", val: _return_2051}]), "return"); + return (_return_2051); + }()), + function(s3) { + + var ctx_899 = ctx_push(ctx_898, [{key: "s3", val: s3}]); + log_event("JsInterpreter.js", 4844, ctx_899, "let"); + var _return_2052 = + result_out( + Coq_out_ter( + s3, + res_val( + Coq_value_object( + l0)))); + log_event("JsInterpreter.js", 4841, ctx_push(ctx_899, [{key: "#RETURN_VALUE#", val: _return_2052}]), "return"); + return (_return_2052); + }); + log_event("JsInterpreter.js", 4845, ctx_push(ctx_898, [{key: "#RETURN_VALUE#", val: _return_2053}]), "return"); + return (_return_2053); + }); + log_event("JsInterpreter.js", 4849, ctx_push(ctx_897, [{key: "#RETURN_VALUE#", val: _return_2054}]), "return"); + return (_return_2054); + }); + log_event("JsInterpreter.js", 4853, ctx_push(ctx_896, [{key: "#RETURN_VALUE#", val: _return_2055}]), "return"); + return (_return_2055); + }); + log_event("JsInterpreter.js", 4857, ctx_push(ctx_895, [{key: "#RETURN_VALUE#", val: _return_2056}]), "return"); + return (_return_2056); + }; + var ctx_900 = ctx_push(ctx_894, [{key: "follow", val: follow}]); + log_event("JsInterpreter.js", 4874, ctx_900, "let"); + var _return_2064 = (function () { + log_event("JsInterpreter.js", 4872, ctx_900, "call"); + var _return_2063 = destr_list(lex_2, function (x) { + var ctx_901 = ctx_push(ctx_900, [{key: "x", val: x}]); + log_event("JsInterpreter.js", 4866, ctx_901, "enter"); + var _return_2060 = (function () { + log_event("JsInterpreter.js", 4864, ctx_901, "call"); + var _return_2059 = function (s, m) { + var ctx_902 = ctx_push(ctx_901, [{key: "s", val: s}, {key: "m", val: m}]); + log_event("JsInterpreter.js", 4862, ctx_902, "enter"); + (function () { + log_event("JsInterpreter.js", 4861, ctx_902, "call"); + var _return_2058 = + Debug.impossible_with_heap_because( + __LOC__, s, m); + log_event("JsInterpreter.js", 4860, ctx_push(ctx_902, [{key: "#RETURN_VALUE#", val: _return_2058}]), "return"); + return (_return_2058); + }()) + ; + var _return_2057 = + Coq_result_impossible( + ); + log_event("JsInterpreter.js", 4859, ctx_push(ctx_902, [{key: "#RETURN_VALUE#", val: _return_2057}]), "return"); + return (_return_2057); + }(s_2, + "Empty lexical environnment allocated in [run_expr_function]."); + log_event("JsInterpreter.js", 4863, ctx_push(ctx_901, [{key: "#RETURN_VALUE#", val: _return_2059}]), "return"); + return (_return_2059); + }()) + ; + log_event("JsInterpreter.js", 4865, ctx_push(ctx_901, [{key: "#RETURN_VALUE#", val: _return_2060}]), "return"); + return (_return_2060); }, function (l, x) { + var ctx_903 = ctx_push(ctx_900, [{key: "l", val: l}, {key: "x", val: x}]); + log_event("JsInterpreter.js", 4870, ctx_903, "enter"); + var _return_2062 = (function () { + log_event("JsInterpreter.js", 4868, ctx_903, "call"); + var _return_2061 = follow(l); + log_event("JsInterpreter.js", 4867, ctx_push(ctx_903, [{key: "#RETURN_VALUE#", val: _return_2061}]), "return"); + return (_return_2061); + }()) + ; + log_event("JsInterpreter.js", 4869, ctx_push(ctx_903, [{key: "#RETURN_VALUE#", val: _return_2062}]), "return"); + return (_return_2062); }, {}); + log_event("JsInterpreter.js", 4871, ctx_push(ctx_900, [{key: "#RETURN_VALUE#", val: _return_2063}]), "return"); + return (_return_2063); + }()) + ; + log_event("JsInterpreter.js", 4873, ctx_push(ctx_900, [{key: "#RETURN_VALUE#", val: _return_2064}]), "return"); + return (_return_2064); + + + + case "None":log_event("JsInterpreter.js", 4882, ctx_891, "case"); + + var lex = c.execution_ctx_lexical_env; + var ctx_904 = ctx_push(ctx_891, [{key: "lex", val: lex}]); + log_event("JsInterpreter.js", 4881, ctx_904, "let"); + var _return_2066 = (function () { + log_event("JsInterpreter.js", 4879, ctx_904, "call"); + var _return_2065 = creating_function_object(s, c, args, bd, lex, + funcbody_is_strict(bd)); + log_event("JsInterpreter.js", 4878, ctx_push(ctx_904, [{key: "#RETURN_VALUE#", val: _return_2065}]), "return"); + return (_return_2065); + }()) + ; + log_event("JsInterpreter.js", 4880, ctx_push(ctx_904, [{key: "#RETURN_VALUE#", val: _return_2066}]), "return"); + return (_return_2066); + + } + +}; + +var entering_eval_code = function (s, c, direct, bd, k) { + var ctx_905 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "direct", val: direct}, {key: "bd", val: bd}, {key: "k", val: k}]); + log_event("JsInterpreter.js", 4913, ctx_905, "enter"); + var str = (function () { + log_event("JsInterpreter.js", 4888, ctx_905, "call"); + var _return_2068 = (funcbody_is_strict(bd) || (function () { + log_event("JsInterpreter.js", 4886, ctx_905, "call"); + var _return_2067 = (direct + && c.execution_ctx_strict); + log_event("JsInterpreter.js", 4885, ctx_push(ctx_905, [{key: "#RETURN_VALUE#", val: _return_2067}]), "return"); + return (_return_2067); }())); + log_event("JsInterpreter.js", 4887, ctx_push(ctx_905, [{key: "#RETURN_VALUE#", val: _return_2068}]), "return"); + return (_return_2068); + }()) + ; + var ctx_906 = ctx_push(ctx_905, [{key: "str", val: str}]); + log_event("JsInterpreter.js", 4912, ctx_906, "let"); + log_event("JsInterpreter.js", 4891, ctx_906, "if"); + if (direct) { + var c_2 = c; + } else { + var c_2 = (function () { + log_event("JsInterpreter.js", 4890, ctx_906, "call"); + var _return_2069 = execution_ctx_initial(str); + log_event("JsInterpreter.js", 4889, ctx_push(ctx_906, [{key: "#RETURN_VALUE#", val: _return_2069}]), "return"); + return (_return_2069); + }()) + ; + } + var ctx_907 = ctx_push(ctx_906, [{key: "c_2", val: c_2}]); + log_event("JsInterpreter.js", 4911, ctx_907, "let"); + log_event("JsInterpreter.js", 4894, ctx_907, "if"); + if (str) { + var p = (function () { + log_event("JsInterpreter.js", 4893, ctx_907, "call"); + var _return_2070 = lexical_env_alloc_decl(s, + c_2.execution_ctx_lexical_env); + log_event("JsInterpreter.js", 4892, ctx_push(ctx_907, [{key: "#RETURN_VALUE#", val: _return_2070}]), "return"); + return (_return_2070); + }()) + ; + } else { + var p = [c_2.execution_ctx_lexical_env, s]; + } + var ctx_908 = ctx_push(ctx_907, [{key: "p", val: p}]); + log_event("JsInterpreter.js", 4910, ctx_908, "let"); + var lex = p[0], s_2 = p[1]; + var ctx_909 = ctx_push(ctx_908, [{key: "lex", val: lex}, {key: "s_2", val: s_2}]); + log_event("JsInterpreter.js", 4909, ctx_909, "let"); + log_event("JsInterpreter.js", 4897, ctx_909, "if"); + if (str) { + var c1 = (function () { + log_event("JsInterpreter.js", 4896, ctx_909, "call"); + var _return_2071 = execution_ctx_with_lex_same(c_2, lex); + log_event("JsInterpreter.js", 4895, ctx_push(ctx_909, [{key: "#RETURN_VALUE#", val: _return_2071}]), "return"); + return (_return_2071); + }()) + ; + } else { + var c1 = c_2; + } + var ctx_910 = ctx_push(ctx_909, [{key: "c1", val: c1}]); + log_event("JsInterpreter.js", 4908, ctx_910, "let"); + var p0 = funcbody_prog(bd); + var ctx_911 = ctx_push(ctx_910, [{key: "p0", val: p0}]); + log_event("JsInterpreter.js", 4907, ctx_911, "let"); + var _return_2075 = if_void((function () { + log_event("JsInterpreter.js", 4899, ctx_911, "call"); + var _return_2072 = execution_ctx_binding_inst(s_2, + c1, Coq_codetype_eval(), + None(), p0, mk_nil()); + log_event("JsInterpreter.js", 4898, ctx_push(ctx_911, [{key: "#RETURN_VALUE#", val: _return_2072}]), "return"); + return (_return_2072); }()), function(s1) { + + var ctx_912 = ctx_push(ctx_911, [{key: "s1", val: s1}]); + log_event("JsInterpreter.js", 4905, ctx_912, "let"); + var _return_2074 = (function () { + log_event("JsInterpreter.js", 4901, ctx_912, "call"); + var _return_2073 = k(s1, c1); + log_event("JsInterpreter.js", 4900, ctx_push(ctx_912, [{key: "#RETURN_VALUE#", val: _return_2073}]), "return"); + return (_return_2073); + }()) + ; + log_event("JsInterpreter.js", 4902, ctx_push(ctx_912, [{key: "#RETURN_VALUE#", val: _return_2074}]), "return"); + return (_return_2074); + }); + log_event("JsInterpreter.js", 4906, ctx_push(ctx_911, [{key: "#RETURN_VALUE#", val: _return_2075}]), "return"); + return (_return_2075); + + + + + + +}; + +var run_eval = function (s, c, is_direct_call, vs) { + var ctx_913 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "is_direct_call", val: is_direct_call}, {key: "vs", val: vs}]); + log_event("JsInterpreter.js", 4980, ctx_913, "enter"); + var _switch_arg_2076 = (function () { + log_event("JsInterpreter.js", 4915, ctx_913, "call"); + var _return_2077 = get_arg(0, vs); + log_event("JsInterpreter.js", 4914, ctx_push(ctx_913, [{key: "#RETURN_VALUE#", val: _return_2077}]), "return"); + return (_return_2077); + }()) + ; + log_event("JsInterpreter.js", 4979, ctx_913, "switch"); + switch (_switch_arg_2076.tag) { + case "Coq_value_prim": + var p = _switch_arg_2076.value;var ctx_914 = ctx_push(ctx_913, [{key: "p", val: p}]); + log_event("JsInterpreter.js", 4976, ctx_914, "case"); + + log_event("JsInterpreter.js", 4975, ctx_914, "switch"); + switch (p.tag) { + case "Coq_prim_undef":log_event("JsInterpreter.js", 4917, ctx_914, "case"); + + var _return_2078 = result_out( + Coq_out_ter(s, + res_val(Coq_value_prim(Coq_prim_undef())))); + log_event("JsInterpreter.js", 4916, ctx_push(ctx_914, [{key: "#RETURN_VALUE#", val: _return_2078}]), "return"); + return (_return_2078); + case "Coq_prim_null":log_event("JsInterpreter.js", 4919, ctx_914, "case"); + + var _return_2079 = result_out( + Coq_out_ter(s, + res_val(Coq_value_prim(Coq_prim_null())))); + log_event("JsInterpreter.js", 4918, ctx_push(ctx_914, [{key: "#RETURN_VALUE#", val: _return_2079}]), "return"); + return (_return_2079); + case "Coq_prim_bool": + var b = p.value;var ctx_915 = ctx_push(ctx_914, [{key: "b", val: b}]); + log_event("JsInterpreter.js", 4921, ctx_915, "case"); + + var _return_2080 = result_out( + Coq_out_ter(s, + res_val(Coq_value_prim(Coq_prim_bool(b))))); + log_event("JsInterpreter.js", 4920, ctx_push(ctx_915, [{key: "#RETURN_VALUE#", val: _return_2080}]), "return"); + return (_return_2080); + case "Coq_prim_number": + var n = p.value;var ctx_916 = ctx_push(ctx_914, [{key: "n", val: n}]); + log_event("JsInterpreter.js", 4923, ctx_916, "case"); + + var _return_2081 = result_out( + Coq_out_ter(s, + res_val(Coq_value_prim(Coq_prim_number(n))))); + log_event("JsInterpreter.js", 4922, ctx_push(ctx_916, [{key: "#RETURN_VALUE#", val: _return_2081}]), "return"); + return (_return_2081); + case "Coq_prim_string": + var s0 = p.value;var ctx_917 = ctx_push(ctx_914, [{key: "s0", val: s0}]); + log_event("JsInterpreter.js", 4974, ctx_917, "case"); + + var str = (function () { + log_event("JsInterpreter.js", 4925, ctx_917, "call"); + var _return_2082 = (is_direct_call && c.execution_ctx_strict); + log_event("JsInterpreter.js", 4924, ctx_push(ctx_917, [{key: "#RETURN_VALUE#", val: _return_2082}]), "return"); + return (_return_2082); + }()) + ; + var ctx_918 = ctx_push(ctx_917, [{key: "str", val: str}]); + log_event("JsInterpreter.js", 4973, ctx_918, "let"); + var _switch_arg_2083 = (function () { + log_event("JsInterpreter.js", 4927, ctx_918, "call"); + var _return_2084 = parse_pickable(s0, str); + log_event("JsInterpreter.js", 4926, ctx_push(ctx_918, [{key: "#RETURN_VALUE#", val: _return_2084}]), "return"); + return (_return_2084); + }()) + ; + log_event("JsInterpreter.js", 4972, ctx_918, "switch"); + switch (_switch_arg_2083.tag) { + case "Some": + var p0 = _switch_arg_2083.value;var ctx_919 = ctx_push(ctx_918, [{key: "p0", val: p0}]); + log_event("JsInterpreter.js", 4967, ctx_919, "case"); + + var _return_2103 = (function () { + log_event("JsInterpreter.js", 4965, ctx_919, "call"); + var _return_2102 = entering_eval_code(s, c, is_direct_call, + Coq_funcbody_intro(p0, s0), + function (s1, c_2) { + var ctx_920 = ctx_push(ctx_919, [{key: "s1", val: s1}, {key: "c_2", val: c_2}]); + log_event("JsInterpreter.js", 4963, ctx_920, "enter"); + var _return_2101 = if_ter( + (function () { + log_event("JsInterpreter.js", 4929, ctx_920, "call"); + var _return_2085 = + run_prog(s1, + c_2, p0); + log_event("JsInterpreter.js", 4928, ctx_push(ctx_920, [{key: "#RETURN_VALUE#", val: _return_2085}]), "return"); + return (_return_2085); + }()), + function(s2, r) { + + var ctx_921 = ctx_push(ctx_920, [{key: "s2", val: s2}, {key: "r", val: r}]); + log_event("JsInterpreter.js", 4961, ctx_921, "let"); + var _switch_arg_2086 = r.res_type; + log_event("JsInterpreter.js", 4958, ctx_921, "switch"); + switch (_switch_arg_2086.tag) { + case "Coq_restype_normal":log_event("JsInterpreter.js", 4947, ctx_921, "case"); + + var _return_2095 = (function () { + log_event("JsInterpreter.js", 4945, ctx_921, "call"); + var _return_2094 = + ifx_empty_label( + s2, r, + function (x) { + var ctx_922 = ctx_push(ctx_921, [{key: "x", val: x}]); + log_event("JsInterpreter.js", 4943, ctx_922, "enter"); + var _switch_arg_2087 = r.res_value; + log_event("JsInterpreter.js", 4942, ctx_922, "switch"); + switch (_switch_arg_2087.tag) { + case "Coq_resvalue_empty":log_event("JsInterpreter.js", 4931, ctx_922, "case"); + + var _return_2088 = + res_ter( + s2, + res_val( + Coq_value_prim( + Coq_prim_undef( + )))); + log_event("JsInterpreter.js", 4930, ctx_push(ctx_922, [{key: "#RETURN_VALUE#", val: _return_2088}]), "return"); + return (_return_2088); + case "Coq_resvalue_value": + var v = _switch_arg_2087.value;var ctx_923 = ctx_push(ctx_922, [{key: "v", val: v}]); + log_event("JsInterpreter.js", 4933, ctx_923, "case"); + + var _return_2089 = + res_ter( + s2, + res_val( + v)); + log_event("JsInterpreter.js", 4932, ctx_push(ctx_923, [{key: "#RETURN_VALUE#", val: _return_2089}]), "return"); + return (_return_2089); + case "Coq_resvalue_ref": + var r0 = _switch_arg_2087.ref;var ctx_924 = ctx_push(ctx_922, [{key: "r0", val: r0}]); + log_event("JsInterpreter.js", 4941, ctx_924, "case"); + + var _return_2093 = (function () { + log_event("JsInterpreter.js", 4939, ctx_924, "call"); + var _return_2092 = + function (s, m) { + var ctx_925 = ctx_push(ctx_924, [{key: "s", val: s}, {key: "m", val: m}]); + log_event("JsInterpreter.js", 4937, ctx_925, "enter"); + (function () { + log_event("JsInterpreter.js", 4936, ctx_925, "call"); + var _return_2091 = + Debug.impossible_with_heap_because( + __LOC__, + s, m); + log_event("JsInterpreter.js", 4935, ctx_push(ctx_925, [{key: "#RETURN_VALUE#", val: _return_2091}]), "return"); + return (_return_2091); + }()) + ; + var _return_2090 = + Coq_result_impossible( + ); + log_event("JsInterpreter.js", 4934, ctx_push(ctx_925, [{key: "#RETURN_VALUE#", val: _return_2090}]), "return"); + return (_return_2090); + }(s2, + "Reference found in the result of an `eval' in [run_eval]."); + log_event("JsInterpreter.js", 4938, ctx_push(ctx_924, [{key: "#RETURN_VALUE#", val: _return_2092}]), "return"); + return (_return_2092); + }()) + ; + log_event("JsInterpreter.js", 4940, ctx_push(ctx_924, [{key: "#RETURN_VALUE#", val: _return_2093}]), "return"); + return (_return_2093); + } + }); + log_event("JsInterpreter.js", 4944, ctx_push(ctx_921, [{key: "#RETURN_VALUE#", val: _return_2094}]), "return"); + return (_return_2094); + }()) + ; + log_event("JsInterpreter.js", 4946, ctx_push(ctx_921, [{key: "#RETURN_VALUE#", val: _return_2095}]), "return"); + return (_return_2095); + case "Coq_restype_throw":log_event("JsInterpreter.js", 4949, ctx_921, "case"); + + var _return_2096 = + res_ter(s2, + res_throw( + r.res_value)); + log_event("JsInterpreter.js", 4948, ctx_push(ctx_921, [{key: "#RETURN_VALUE#", val: _return_2096}]), "return"); + return (_return_2096); + default:log_event("JsInterpreter.js", 4957, ctx_921, "case"); + + var _return_2100 = (function () { + log_event("JsInterpreter.js", 4955, ctx_921, "call"); + var _return_2099 = + function (s, m) { + var ctx_926 = ctx_push(ctx_921, [{key: "s", val: s}, {key: "m", val: m}]); + log_event("JsInterpreter.js", 4953, ctx_926, "enter"); + (function () { + log_event("JsInterpreter.js", 4952, ctx_926, "call"); + var _return_2098 = + Debug.impossible_with_heap_because( + __LOC__, + s, m); + log_event("JsInterpreter.js", 4951, ctx_push(ctx_926, [{key: "#RETURN_VALUE#", val: _return_2098}]), "return"); + return (_return_2098); + }()) + ; + var _return_2097 = + Coq_result_impossible( + ); + log_event("JsInterpreter.js", 4950, ctx_push(ctx_926, [{key: "#RETURN_VALUE#", val: _return_2097}]), "return"); + return (_return_2097); + }(s2, + "Forbidden result type returned by an `eval' in [run_eval]."); + log_event("JsInterpreter.js", 4954, ctx_push(ctx_921, [{key: "#RETURN_VALUE#", val: _return_2099}]), "return"); + return (_return_2099); + }()) + ; + log_event("JsInterpreter.js", 4956, ctx_push(ctx_921, [{key: "#RETURN_VALUE#", val: _return_2100}]), "return"); + return (_return_2100); + } + + }); + log_event("JsInterpreter.js", 4962, ctx_push(ctx_920, [{key: "#RETURN_VALUE#", val: _return_2101}]), "return"); + return (_return_2101); }); + log_event("JsInterpreter.js", 4964, ctx_push(ctx_919, [{key: "#RETURN_VALUE#", val: _return_2102}]), "return"); + return (_return_2102); + }()) + ; + log_event("JsInterpreter.js", 4966, ctx_push(ctx_919, [{key: "#RETURN_VALUE#", val: _return_2103}]), "return"); + return (_return_2103); + case "None":log_event("JsInterpreter.js", 4971, ctx_918, "case"); + + var _return_2105 = (function () { + log_event("JsInterpreter.js", 4969, ctx_918, "call"); + var _return_2104 = run_error(s, Coq_native_error_syntax()); + log_event("JsInterpreter.js", 4968, ctx_push(ctx_918, [{key: "#RETURN_VALUE#", val: _return_2104}]), "return"); + return (_return_2104); + }()) + ; + log_event("JsInterpreter.js", 4970, ctx_push(ctx_918, [{key: "#RETURN_VALUE#", val: _return_2105}]), "return"); + return (_return_2105); + } + + + } + + case "Coq_value_object": + var o = _switch_arg_2076.value;var ctx_927 = ctx_push(ctx_913, [{key: "o", val: o}]); + log_event("JsInterpreter.js", 4978, ctx_927, "case"); + + var _return_2106 = result_out( + Coq_out_ter(s, res_val(Coq_value_object(o)))); + log_event("JsInterpreter.js", 4977, ctx_push(ctx_927, [{key: "#RETURN_VALUE#", val: _return_2106}]), "return"); + return (_return_2106); + } + +}; + +var run_expr_call = function (s, c, e1, e2s) { + var ctx_928 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "e1", val: e1}, {key: "e2s", val: e2s}]); + log_event("JsInterpreter.js", 5076, ctx_928, "enter"); + var is_eval_direct = (function () { + log_event("JsInterpreter.js", 4982, ctx_928, "call"); + var _return_2107 = is_syntactic_eval(e1); + log_event("JsInterpreter.js", 4981, ctx_push(ctx_928, [{key: "#RETURN_VALUE#", val: _return_2107}]), "return"); + return (_return_2107); + }()) + ; + var ctx_929 = ctx_push(ctx_928, [{key: "is_eval_direct", val: is_eval_direct}]); + log_event("JsInterpreter.js", 5075, ctx_929, "let"); + var _return_2150 = if_success((function () { + log_event("JsInterpreter.js", 4984, ctx_929, "call"); + var _return_2108 = run_expr(s, c, e1); + log_event("JsInterpreter.js", 4983, ctx_push(ctx_929, [{key: "#RETURN_VALUE#", val: _return_2108}]), "return"); + return (_return_2108); }()), function(s1, rv) { + + var ctx_930 = ctx_push(ctx_929, [{key: "s1", val: s1}, {key: "rv", val: rv}]); + log_event("JsInterpreter.js", 5073, ctx_930, "let"); + var _return_2149 = if_run((function () { + log_event("JsInterpreter.js", 4986, ctx_930, "call"); + var _return_2109 = ref_get_value( + s1, c, + rv); + log_event("JsInterpreter.js", 4985, ctx_push(ctx_930, [{key: "#RETURN_VALUE#", val: _return_2109}]), "return"); + return (_return_2109); }()), + function(s2, f) { + + var ctx_931 = ctx_push(ctx_930, [{key: "s2", val: s2}, {key: "f", val: f}]); + log_event("JsInterpreter.js", 5069, ctx_931, "let"); + var _return_2148 = if_run( + (function () { + log_event("JsInterpreter.js", 4988, ctx_931, "call"); + var _return_2110 = + run_list_expr( + s2, c, + mk_nil(), + e2s); + log_event("JsInterpreter.js", 4987, ctx_push(ctx_931, [{key: "#RETURN_VALUE#", val: _return_2110}]), "return"); + return (_return_2110); + }()), + function(s3, + vs) { + + var ctx_932 = ctx_push(ctx_931, [{key: "s3", val: s3}, {key: "vs", val: vs}]); + log_event("JsInterpreter.js", 5065, ctx_932, "let"); + log_event("JsInterpreter.js", 5062, ctx_932, "switch"); + switch (f.tag) { + case "Coq_value_prim": + var p = f.value;var ctx_933 = ctx_push(ctx_932, [{key: "p", val: p}]); + log_event("JsInterpreter.js", 4992, ctx_933, "case"); + + var _return_2112 = (function () { + log_event("JsInterpreter.js", 4990, ctx_933, "call"); + var _return_2111 = + run_error( + s3, + Coq_native_error_type( + )); + log_event("JsInterpreter.js", 4989, ctx_push(ctx_933, [{key: "#RETURN_VALUE#", val: _return_2111}]), "return"); + return (_return_2111); + }()) + ; + log_event("JsInterpreter.js", 4991, ctx_push(ctx_933, [{key: "#RETURN_VALUE#", val: _return_2112}]), "return"); + return (_return_2112); + case "Coq_value_object": + var l = f.value;var ctx_934 = ctx_push(ctx_932, [{key: "l", val: l}]); + log_event("JsInterpreter.js", 5061, ctx_934, "case"); + + var _if_arg_2113 = (function () { + log_event("JsInterpreter.js", 4994, ctx_934, "call"); + var _return_2114 = + is_callable_dec( + s3, + Coq_value_object( + l)); + log_event("JsInterpreter.js", 4993, ctx_push(ctx_934, [{key: "#RETURN_VALUE#", val: _return_2114}]), "return"); + return (_return_2114); + }()) + ; + log_event("JsInterpreter.js", 5060, ctx_934, "if"); + if (_if_arg_2113) { + var follow = function (vthis) { + var ctx_935 = ctx_push(ctx_934, [{key: "vthis", val: vthis}]); + log_event("JsInterpreter.js", 5005, ctx_935, "enter"); + var _if_arg_2117 = + object_loc_compare( + l, + Coq_object_loc_prealloc( + Coq_prealloc_global_eval( + ))); + log_event("JsInterpreter.js", 5004, ctx_935, "if"); + if (_if_arg_2117) { + var _return_2121 = (function () { + log_event("JsInterpreter.js", 5002, ctx_935, "call"); + var _return_2120 = + run_eval( + s3, c, + is_eval_direct, + vs); + log_event("JsInterpreter.js", 5001, ctx_push(ctx_935, [{key: "#RETURN_VALUE#", val: _return_2120}]), "return"); + return (_return_2120); + }()) + ; + log_event("JsInterpreter.js", 5003, ctx_push(ctx_935, [{key: "#RETURN_VALUE#", val: _return_2121}]), "return"); + return (_return_2121); + } else { + var _return_2119 = (function () { + log_event("JsInterpreter.js", 4999, ctx_935, "call"); + var _return_2118 = + run_call( + s3, c, l, + vthis, + vs); + log_event("JsInterpreter.js", 4998, ctx_push(ctx_935, [{key: "#RETURN_VALUE#", val: _return_2118}]), "return"); + return (_return_2118); + }()) + ; + log_event("JsInterpreter.js", 5000, ctx_push(ctx_935, [{key: "#RETURN_VALUE#", val: _return_2119}]), "return"); + return (_return_2119); + } + }; + var ctx_936 = ctx_push(ctx_934, [{key: "follow", val: follow}]); + log_event("JsInterpreter.js", 5059, ctx_936, "let"); + log_event("JsInterpreter.js", 5058, ctx_936, "switch"); + switch (rv.tag) { + case "Coq_resvalue_empty":log_event("JsInterpreter.js", 5013, ctx_936, "case"); + + var _return_2125 = (function () { + log_event("JsInterpreter.js", 5011, ctx_936, "call"); + var _return_2124 = + function (s, m) { + var ctx_937 = ctx_push(ctx_936, [{key: "s", val: s}, {key: "m", val: m}]); + log_event("JsInterpreter.js", 5009, ctx_937, "enter"); + (function () { + log_event("JsInterpreter.js", 5008, ctx_937, "call"); + var _return_2123 = + Debug.impossible_with_heap_because( + __LOC__, + s, m); + log_event("JsInterpreter.js", 5007, ctx_push(ctx_937, [{key: "#RETURN_VALUE#", val: _return_2123}]), "return"); + return (_return_2123); + }()) + ; + var _return_2122 = + Coq_result_impossible( + ); + log_event("JsInterpreter.js", 5006, ctx_push(ctx_937, [{key: "#RETURN_VALUE#", val: _return_2122}]), "return"); + return (_return_2122); + }(s3, + "[run_expr_call] unable to call an empty result."); + log_event("JsInterpreter.js", 5010, ctx_push(ctx_936, [{key: "#RETURN_VALUE#", val: _return_2124}]), "return"); + return (_return_2124); + }()) + ; + log_event("JsInterpreter.js", 5012, ctx_push(ctx_936, [{key: "#RETURN_VALUE#", val: _return_2125}]), "return"); + return (_return_2125); + case "Coq_resvalue_value": + var v = rv.value;var ctx_938 = ctx_push(ctx_936, [{key: "v", val: v}]); + log_event("JsInterpreter.js", 5017, ctx_938, "case"); + + var _return_2127 = (function () { + log_event("JsInterpreter.js", 5015, ctx_938, "call"); + var _return_2126 = + follow( + Coq_value_prim( + Coq_prim_undef( + ))); + log_event("JsInterpreter.js", 5014, ctx_push(ctx_938, [{key: "#RETURN_VALUE#", val: _return_2126}]), "return"); + return (_return_2126); + }()) + ; + log_event("JsInterpreter.js", 5016, ctx_push(ctx_938, [{key: "#RETURN_VALUE#", val: _return_2127}]), "return"); + return (_return_2127); + case "Coq_resvalue_ref": + var r = rv.ref;var ctx_939 = ctx_push(ctx_936, [{key: "r", val: r}]); + log_event("JsInterpreter.js", 5057, ctx_939, "case"); + + var _switch_arg_2128 = r.ref_base; + log_event("JsInterpreter.js", 5056, ctx_939, "switch"); + switch (_switch_arg_2128.tag) { + case "Coq_ref_base_type_value": + var v = _switch_arg_2128.value;var ctx_940 = ctx_push(ctx_939, [{key: "v", val: v}]); + log_event("JsInterpreter.js", 5045, ctx_940, "case"); + + var _if_arg_2129 = (function () { + log_event("JsInterpreter.js", 5033, ctx_940, "call"); + var _return_2137 = + ((function () { + log_event("JsInterpreter.js", 5021, ctx_940, "call"); + var _return_2131 = + ref_kind_comparable( + (function () { + log_event("JsInterpreter.js", 5019, ctx_940, "call"); + var _return_2130 = + ref_kind_of( + r); + log_event("JsInterpreter.js", 5018, ctx_push(ctx_940, [{key: "#RETURN_VALUE#", val: _return_2130}]), "return"); + return (_return_2130); + }()), + Coq_ref_kind_primitive_base( + )); + log_event("JsInterpreter.js", 5020, ctx_push(ctx_940, [{key: "#RETURN_VALUE#", val: _return_2131}]), "return"); + return (_return_2131); + }()) + || (function () { + log_event("JsInterpreter.js", 5031, ctx_940, "call"); + var _return_2136 = + ((function () { + log_event("JsInterpreter.js", 5025, ctx_940, "call"); + var _return_2133 = + ref_kind_comparable( + (function () { + log_event("JsInterpreter.js", 5023, ctx_940, "call"); + var _return_2132 = + ref_kind_of( + r); + log_event("JsInterpreter.js", 5022, ctx_push(ctx_940, [{key: "#RETURN_VALUE#", val: _return_2132}]), "return"); + return (_return_2132); + }()), + Coq_ref_kind_null( + )); + log_event("JsInterpreter.js", 5024, ctx_push(ctx_940, [{key: "#RETURN_VALUE#", val: _return_2133}]), "return"); + return (_return_2133); + }()) + || (function () { + log_event("JsInterpreter.js", 5029, ctx_940, "call"); + var _return_2135 = + ref_kind_comparable( + (function () { + log_event("JsInterpreter.js", 5027, ctx_940, "call"); + var _return_2134 = + ref_kind_of( + r); + log_event("JsInterpreter.js", 5026, ctx_push(ctx_940, [{key: "#RETURN_VALUE#", val: _return_2134}]), "return"); + return (_return_2134); + }()), + Coq_ref_kind_object( + )); + log_event("JsInterpreter.js", 5028, ctx_push(ctx_940, [{key: "#RETURN_VALUE#", val: _return_2135}]), "return"); + return (_return_2135); + }())); + log_event("JsInterpreter.js", 5030, ctx_push(ctx_940, [{key: "#RETURN_VALUE#", val: _return_2136}]), "return"); + return (_return_2136); + }())); + log_event("JsInterpreter.js", 5032, ctx_push(ctx_940, [{key: "#RETURN_VALUE#", val: _return_2137}]), "return"); + return (_return_2137); + }()) + ; + log_event("JsInterpreter.js", 5044, ctx_940, "if"); + if (_if_arg_2129) { + var _return_2143 = (function () { + log_event("JsInterpreter.js", 5042, ctx_940, "call"); + var _return_2142 = + follow(v); + log_event("JsInterpreter.js", 5041, ctx_push(ctx_940, [{key: "#RETURN_VALUE#", val: _return_2142}]), "return"); + return (_return_2142); + }()) + ; + log_event("JsInterpreter.js", 5043, ctx_push(ctx_940, [{key: "#RETURN_VALUE#", val: _return_2143}]), "return"); + return (_return_2143); + } else { + var _return_2141 = (function () { + log_event("JsInterpreter.js", 5039, ctx_940, "call"); + var _return_2140 = + function (s, m) { + var ctx_941 = ctx_push(ctx_940, [{key: "s", val: s}, {key: "m", val: m}]); + log_event("JsInterpreter.js", 5037, ctx_941, "enter"); + (function () { + log_event("JsInterpreter.js", 5036, ctx_941, "call"); + var _return_2139 = + Debug.impossible_with_heap_because( + __LOC__, + s, m); + log_event("JsInterpreter.js", 5035, ctx_push(ctx_941, [{key: "#RETURN_VALUE#", val: _return_2139}]), "return"); + return (_return_2139); + }()) + ; + var _return_2138 = + Coq_result_impossible( + ); + log_event("JsInterpreter.js", 5034, ctx_push(ctx_941, [{key: "#RETURN_VALUE#", val: _return_2138}]), "return"); + return (_return_2138); + }(s3, + "[run_expr_call] unable to call a non-property function."); + log_event("JsInterpreter.js", 5038, ctx_push(ctx_940, [{key: "#RETURN_VALUE#", val: _return_2140}]), "return"); + return (_return_2140); + }()) + ; + log_event("JsInterpreter.js", 5040, ctx_push(ctx_940, [{key: "#RETURN_VALUE#", val: _return_2141}]), "return"); + return (_return_2141); + } + case "Coq_ref_base_type_env_loc": + var l0 = _switch_arg_2128.value;var ctx_942 = ctx_push(ctx_939, [{key: "l0", val: l0}]); + log_event("JsInterpreter.js", 5055, ctx_942, "case"); + + var _return_2147 = + if_some( + (function () { + log_event("JsInterpreter.js", 5047, ctx_942, "call"); + var _return_2144 = + env_record_implicit_this_value( + s3, l0); + log_event("JsInterpreter.js", 5046, ctx_push(ctx_942, [{key: "#RETURN_VALUE#", val: _return_2144}]), "return"); + return (_return_2144); + }()), + function(v) { + + var ctx_943 = ctx_push(ctx_942, [{key: "v", val: v}]); + log_event("JsInterpreter.js", 5053, ctx_943, "let"); + var _return_2146 = (function () { + log_event("JsInterpreter.js", 5049, ctx_943, "call"); + var _return_2145 = + follow(v); + log_event("JsInterpreter.js", 5048, ctx_push(ctx_943, [{key: "#RETURN_VALUE#", val: _return_2145}]), "return"); + return (_return_2145); + }()) + ; + log_event("JsInterpreter.js", 5050, ctx_push(ctx_943, [{key: "#RETURN_VALUE#", val: _return_2146}]), "return"); + return (_return_2146); + }); + log_event("JsInterpreter.js", 5054, ctx_push(ctx_942, [{key: "#RETURN_VALUE#", val: _return_2147}]), "return"); + return (_return_2147); + } + + } + + + } else { + var _return_2116 = (function () { + log_event("JsInterpreter.js", 4996, ctx_934, "call"); + var _return_2115 = + run_error( + s3, + Coq_native_error_type( + )); + log_event("JsInterpreter.js", 4995, ctx_push(ctx_934, [{key: "#RETURN_VALUE#", val: _return_2115}]), "return"); + return (_return_2115); + }()) + ; + log_event("JsInterpreter.js", 4997, ctx_push(ctx_934, [{key: "#RETURN_VALUE#", val: _return_2116}]), "return"); + return (_return_2116); + } + } + + }); + log_event("JsInterpreter.js", 5066, ctx_push(ctx_931, [{key: "#RETURN_VALUE#", val: _return_2148}]), "return"); + return (_return_2148); + }); + log_event("JsInterpreter.js", 5070, ctx_push(ctx_930, [{key: "#RETURN_VALUE#", val: _return_2149}]), "return"); + return (_return_2149); + }); + log_event("JsInterpreter.js", 5074, ctx_push(ctx_929, [{key: "#RETURN_VALUE#", val: _return_2150}]), "return"); + return (_return_2150); + +}; + +var run_expr_conditionnal = function (s, c, e1, e2, e3) { + var ctx_944 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "e1", val: e1}, {key: "e2", val: e2}, {key: "e3", val: e3}]); + log_event("JsInterpreter.js", 5095, ctx_944, "enter"); + var _return_2156 = if_run((function () { + log_event("JsInterpreter.js", 5078, ctx_944, "call"); + var _return_2151 = run_expr_get_value(s, c, e1); + log_event("JsInterpreter.js", 5077, ctx_push(ctx_944, [{key: "#RETURN_VALUE#", val: _return_2151}]), "return"); + return (_return_2151); }()), function(s1, v1) { + + var ctx_945 = ctx_push(ctx_944, [{key: "s1", val: s1}, {key: "v1", val: v1}]); + log_event("JsInterpreter.js", 5093, ctx_945, "let"); + var b = (function () { + log_event("JsInterpreter.js", 5080, ctx_945, "call"); + var _return_2152 = convert_value_to_boolean(v1); + log_event("JsInterpreter.js", 5079, ctx_push(ctx_945, [{key: "#RETURN_VALUE#", val: _return_2152}]), "return"); + return (_return_2152); + }()) + ; + var ctx_946 = ctx_push(ctx_945, [{key: "b", val: b}]); + log_event("JsInterpreter.js", 5090, ctx_946, "let"); + log_event("JsInterpreter.js", 5081, ctx_946, "if"); + if (b) { + var e = e2; + } else { + var e = e3; + } + var ctx_947 = ctx_push(ctx_946, [{key: "e", val: e}]); + log_event("JsInterpreter.js", 5089, ctx_947, "let"); + var _return_2155 = if_run((function () { + log_event("JsInterpreter.js", 5083, ctx_947, "call"); + var _return_2153 = run_expr_get_value( + s1, c, e); + log_event("JsInterpreter.js", 5082, ctx_push(ctx_947, [{key: "#RETURN_VALUE#", val: _return_2153}]), "return"); + return (_return_2153); }()), + function(s0, r) { + + var ctx_948 = ctx_push(ctx_947, [{key: "s0", val: s0}, {key: "r", val: r}]); + log_event("JsInterpreter.js", 5087, ctx_948, "let"); + var _return_2154 = res_ter( + s0, + res_val( + r)); + log_event("JsInterpreter.js", 5084, ctx_push(ctx_948, [{key: "#RETURN_VALUE#", val: _return_2154}]), "return"); + return (_return_2154); + }); + log_event("JsInterpreter.js", 5088, ctx_push(ctx_947, [{key: "#RETURN_VALUE#", val: _return_2155}]), "return"); + return (_return_2155); + + + }); + log_event("JsInterpreter.js", 5094, ctx_push(ctx_944, [{key: "#RETURN_VALUE#", val: _return_2156}]), "return"); + return (_return_2156); +}; + +var run_expr_new = function (s, c, e1, e2s) { + var ctx_949 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "e1", val: e1}, {key: "e2s", val: e2s}]); + log_event("JsInterpreter.js", 5129, ctx_949, "enter"); + var _return_2168 = if_run((function () { + log_event("JsInterpreter.js", 5097, ctx_949, "call"); + var _return_2157 = run_expr_get_value(s, c, e1); + log_event("JsInterpreter.js", 5096, ctx_push(ctx_949, [{key: "#RETURN_VALUE#", val: _return_2157}]), "return"); + return (_return_2157); }()), function(s1, v) { + + var ctx_950 = ctx_push(ctx_949, [{key: "s1", val: s1}, {key: "v", val: v}]); + log_event("JsInterpreter.js", 5127, ctx_950, "let"); + var _return_2167 = if_run((function () { + log_event("JsInterpreter.js", 5099, ctx_950, "call"); + var _return_2158 = run_list_expr( + s1, c, + mk_nil(), + e2s); + log_event("JsInterpreter.js", 5098, ctx_push(ctx_950, [{key: "#RETURN_VALUE#", val: _return_2158}]), "return"); + return (_return_2158); }()), + function(s2, args) { + + var ctx_951 = ctx_push(ctx_950, [{key: "s2", val: s2}, {key: "args", val: args}]); + log_event("JsInterpreter.js", 5123, ctx_951, "let"); + log_event("JsInterpreter.js", 5120, ctx_951, "switch"); + switch (v.tag) { + case "Coq_value_prim": + var p = v.value;var ctx_952 = ctx_push(ctx_951, [{key: "p", val: p}]); + log_event("JsInterpreter.js", 5103, ctx_952, "case"); + + var _return_2160 = (function () { + log_event("JsInterpreter.js", 5101, ctx_952, "call"); + var _return_2159 = + run_error(s2, + Coq_native_error_type( + )); + log_event("JsInterpreter.js", 5100, ctx_push(ctx_952, [{key: "#RETURN_VALUE#", val: _return_2159}]), "return"); + return (_return_2159); + }()) + ; + log_event("JsInterpreter.js", 5102, ctx_push(ctx_952, [{key: "#RETURN_VALUE#", val: _return_2160}]), "return"); + return (_return_2160); + case "Coq_value_object": + var l = v.value;var ctx_953 = ctx_push(ctx_951, [{key: "l", val: l}]); + log_event("JsInterpreter.js", 5119, ctx_953, "case"); + + var _return_2166 = + if_some((function () { + log_event("JsInterpreter.js", 5105, ctx_953, "call"); + var _return_2161 = + run_object_method( + object_construct_, + s2, l); + log_event("JsInterpreter.js", 5104, ctx_push(ctx_953, [{key: "#RETURN_VALUE#", val: _return_2161}]), "return"); + return (_return_2161); + }()), function(coo) { + + var ctx_954 = ctx_push(ctx_953, [{key: "coo", val: coo}]); + log_event("JsInterpreter.js", 5117, ctx_954, "let"); + log_event("JsInterpreter.js", 5114, ctx_954, "switch"); + switch (coo.tag) { + case "Some": + var co = coo.value;var ctx_955 = ctx_push(ctx_954, [{key: "co", val: co}]); + log_event("JsInterpreter.js", 5109, ctx_955, "case"); + + var _return_2163 = (function () { + log_event("JsInterpreter.js", 5107, ctx_955, "call"); + var _return_2162 = + run_construct( + s2, c, co, l, + args); + log_event("JsInterpreter.js", 5106, ctx_push(ctx_955, [{key: "#RETURN_VALUE#", val: _return_2162}]), "return"); + return (_return_2162); + }()) + ; + log_event("JsInterpreter.js", 5108, ctx_push(ctx_955, [{key: "#RETURN_VALUE#", val: _return_2163}]), "return"); + return (_return_2163); + case "None":log_event("JsInterpreter.js", 5113, ctx_954, "case"); + + var _return_2165 = (function () { + log_event("JsInterpreter.js", 5111, ctx_954, "call"); + var _return_2164 = + run_error(s2, + Coq_native_error_type( + )); + log_event("JsInterpreter.js", 5110, ctx_push(ctx_954, [{key: "#RETURN_VALUE#", val: _return_2164}]), "return"); + return (_return_2164); + }()) + ; + log_event("JsInterpreter.js", 5112, ctx_push(ctx_954, [{key: "#RETURN_VALUE#", val: _return_2165}]), "return"); + return (_return_2165); + } + + }); + log_event("JsInterpreter.js", 5118, ctx_push(ctx_953, [{key: "#RETURN_VALUE#", val: _return_2166}]), "return"); + return (_return_2166); + } + + }); + log_event("JsInterpreter.js", 5124, ctx_push(ctx_950, [{key: "#RETURN_VALUE#", val: _return_2167}]), "return"); + return (_return_2167); + }); + log_event("JsInterpreter.js", 5128, ctx_push(ctx_949, [{key: "#RETURN_VALUE#", val: _return_2168}]), "return"); + return (_return_2168); +}; + +var run_stat_label = function (s, c, lab, t) { + var ctx_956 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "lab", val: lab}, {key: "t", val: t}]); + log_event("JsInterpreter.js", 5140, ctx_956, "enter"); + var _return_2174 = if_break((function () { + log_event("JsInterpreter.js", 5131, ctx_956, "call"); + var _return_2169 = run_stat(s, c, t); + log_event("JsInterpreter.js", 5130, ctx_push(ctx_956, [{key: "#RETURN_VALUE#", val: _return_2169}]), "return"); + return (_return_2169); }()), function(s1, r1) { + + var ctx_957 = ctx_push(ctx_956, [{key: "s1", val: s1}, {key: "r1", val: r1}]); + log_event("JsInterpreter.js", 5138, ctx_957, "let"); + var _return_2173 = result_out( + Coq_out_ter(s1, (function () { + var _if_arg_2170 = + label_compare(r1.res_label, + lab); + log_event("JsInterpreter.js", 5134, ctx_957, "if"); + if (_if_arg_2170) { + var _return_2172 = + res_normal(r1.res_value); + log_event("JsInterpreter.js", 5133, ctx_push(ctx_957, [{key: "#RETURN_VALUE#", val: _return_2172}]), "return"); + return (_return_2172); + } else { + var _return_2171 = r1; + log_event("JsInterpreter.js", 5132, ctx_push(ctx_957, [{key: "#RETURN_VALUE#", val: _return_2171}]), "return"); + return (_return_2171); + }}()))); + log_event("JsInterpreter.js", 5135, ctx_push(ctx_957, [{key: "#RETURN_VALUE#", val: _return_2173}]), "return"); + return (_return_2173); + }); + log_event("JsInterpreter.js", 5139, ctx_push(ctx_956, [{key: "#RETURN_VALUE#", val: _return_2174}]), "return"); + return (_return_2174); +}; + +var run_stat_with = function (s, c, e1, t2) { + var ctx_958 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "e1", val: e1}, {key: "t2", val: t2}]); + log_event("JsInterpreter.js", 5164, ctx_958, "enter"); + var _return_2182 = if_run((function () { + log_event("JsInterpreter.js", 5142, ctx_958, "call"); + var _return_2175 = run_expr_get_value(s, c, e1); + log_event("JsInterpreter.js", 5141, ctx_push(ctx_958, [{key: "#RETURN_VALUE#", val: _return_2175}]), "return"); + return (_return_2175); }()), function(s1, v1) { + + var ctx_959 = ctx_push(ctx_958, [{key: "s1", val: s1}, {key: "v1", val: v1}]); + log_event("JsInterpreter.js", 5162, ctx_959, "let"); + var _return_2181 = if_object((function () { + log_event("JsInterpreter.js", 5144, ctx_959, "call"); + var _return_2176 = to_object( + s1, v1); + log_event("JsInterpreter.js", 5143, ctx_push(ctx_959, [{key: "#RETURN_VALUE#", val: _return_2176}]), "return"); + return (_return_2176); }()), + function(s2, l) { + + var ctx_960 = ctx_push(ctx_959, [{key: "s2", val: s2}, {key: "l", val: l}]); + log_event("JsInterpreter.js", 5158, ctx_960, "let"); + var lex = c.execution_ctx_lexical_env; + var ctx_961 = ctx_push(ctx_960, [{key: "lex", val: lex}]); + log_event("JsInterpreter.js", 5155, ctx_961, "let"); + var p = (function () { + log_event("JsInterpreter.js", 5146, ctx_961, "call"); + var _return_2177 = + lexical_env_alloc_object( + s2, lex, l, + provide_this_true); + log_event("JsInterpreter.js", 5145, ctx_push(ctx_961, [{key: "#RETURN_VALUE#", val: _return_2177}]), "return"); + return (_return_2177); + }()) + ; + var ctx_962 = ctx_push(ctx_961, [{key: "p", val: p}]); + log_event("JsInterpreter.js", 5154, ctx_962, "let"); + var lex_2 = p[0], s3 = p[1]; + var ctx_963 = ctx_push(ctx_962, [{key: "lex_2", val: lex_2}, {key: "s3", val: s3}]); + log_event("JsInterpreter.js", 5153, ctx_963, "let"); + var c_2 = (function () { + log_event("JsInterpreter.js", 5148, ctx_963, "call"); + var _return_2178 = + execution_ctx_with_lex(c, + lex_2); + log_event("JsInterpreter.js", 5147, ctx_push(ctx_963, [{key: "#RETURN_VALUE#", val: _return_2178}]), "return"); + return (_return_2178); + }()) + ; + var ctx_964 = ctx_push(ctx_963, [{key: "c_2", val: c_2}]); + log_event("JsInterpreter.js", 5152, ctx_964, "let"); + var _return_2180 = (function () { + log_event("JsInterpreter.js", 5150, ctx_964, "call"); + var _return_2179 = + run_stat(s3, c_2, t2); + log_event("JsInterpreter.js", 5149, ctx_push(ctx_964, [{key: "#RETURN_VALUE#", val: _return_2179}]), "return"); + return (_return_2179); + }()) + ; + log_event("JsInterpreter.js", 5151, ctx_push(ctx_964, [{key: "#RETURN_VALUE#", val: _return_2180}]), "return"); + return (_return_2180); + + + + + }); + log_event("JsInterpreter.js", 5159, ctx_push(ctx_959, [{key: "#RETURN_VALUE#", val: _return_2181}]), "return"); + return (_return_2181); + }); + log_event("JsInterpreter.js", 5163, ctx_push(ctx_958, [{key: "#RETURN_VALUE#", val: _return_2182}]), "return"); + return (_return_2182); +}; + +var run_stat_if = function (s, c, e1, t2, to0) { + var ctx_965 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "e1", val: e1}, {key: "t2", val: t2}, {key: "to0", val: to0}]); + log_event("JsInterpreter.js", 5185, ctx_965, "enter"); + var _return_2190 = if_run((function () { + log_event("JsInterpreter.js", 5166, ctx_965, "call"); + var _return_2183 = run_expr_get_value(s, c, e1); + log_event("JsInterpreter.js", 5165, ctx_push(ctx_965, [{key: "#RETURN_VALUE#", val: _return_2183}]), "return"); + return (_return_2183); }()), function(s1, v1) { + + var ctx_966 = ctx_push(ctx_965, [{key: "s1", val: s1}, {key: "v1", val: v1}]); + log_event("JsInterpreter.js", 5183, ctx_966, "let"); + var b = (function () { + log_event("JsInterpreter.js", 5168, ctx_966, "call"); + var _return_2184 = convert_value_to_boolean(v1); + log_event("JsInterpreter.js", 5167, ctx_push(ctx_966, [{key: "#RETURN_VALUE#", val: _return_2184}]), "return"); + return (_return_2184); + }()) + ; + var ctx_967 = ctx_push(ctx_966, [{key: "b", val: b}]); + log_event("JsInterpreter.js", 5180, ctx_967, "let"); + log_event("JsInterpreter.js", 5179, ctx_967, "if"); + if (b) { + var _return_2189 = (function () { + log_event("JsInterpreter.js", 5177, ctx_967, "call"); + var _return_2188 = run_stat(s1, c, t2); + log_event("JsInterpreter.js", 5176, ctx_push(ctx_967, [{key: "#RETURN_VALUE#", val: _return_2188}]), "return"); + return (_return_2188); + }()) + ; + log_event("JsInterpreter.js", 5178, ctx_push(ctx_967, [{key: "#RETURN_VALUE#", val: _return_2189}]), "return"); + return (_return_2189); + } else { + log_event("JsInterpreter.js", 5175, ctx_967, "switch"); + switch (to0.tag) { + case "Some": + var t3 = to0.value;var ctx_968 = ctx_push(ctx_967, [{key: "t3", val: t3}]); + log_event("JsInterpreter.js", 5172, ctx_968, "case"); + + var _return_2186 = (function () { + log_event("JsInterpreter.js", 5170, ctx_968, "call"); + var _return_2185 = run_stat(s1, c, t3); + log_event("JsInterpreter.js", 5169, ctx_push(ctx_968, [{key: "#RETURN_VALUE#", val: _return_2185}]), "return"); + return (_return_2185); + }()) + ; + log_event("JsInterpreter.js", 5171, ctx_push(ctx_968, [{key: "#RETURN_VALUE#", val: _return_2186}]), "return"); + return (_return_2186); + case "None":log_event("JsInterpreter.js", 5174, ctx_967, "case"); + + var _return_2187 = result_out( + Coq_out_ter(s1, + res_normal( + Coq_resvalue_empty()))); + log_event("JsInterpreter.js", 5173, ctx_push(ctx_967, [{key: "#RETURN_VALUE#", val: _return_2187}]), "return"); + return (_return_2187); + } + + } + + }); + log_event("JsInterpreter.js", 5184, ctx_push(ctx_965, [{key: "#RETURN_VALUE#", val: _return_2190}]), "return"); + return (_return_2190); +}; + +var run_stat_while = function (s, c, rv, labs, e1, t2) { + var ctx_969 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "rv", val: rv}, {key: "labs", val: labs}, {key: "e1", val: e1}, {key: "t2", val: t2}]); + log_event("JsInterpreter.js", 5237, ctx_969, "enter"); + var _return_2216 = if_run((function () { + log_event("JsInterpreter.js", 5187, ctx_969, "call"); + var _return_2191 = run_expr_get_value(s, c, e1); + log_event("JsInterpreter.js", 5186, ctx_push(ctx_969, [{key: "#RETURN_VALUE#", val: _return_2191}]), "return"); + return (_return_2191); }()), function(s1, v1) { + + var ctx_970 = ctx_push(ctx_969, [{key: "s1", val: s1}, {key: "v1", val: v1}]); + log_event("JsInterpreter.js", 5235, ctx_970, "let"); + var b = (function () { + log_event("JsInterpreter.js", 5189, ctx_970, "call"); + var _return_2192 = convert_value_to_boolean(v1); + log_event("JsInterpreter.js", 5188, ctx_push(ctx_970, [{key: "#RETURN_VALUE#", val: _return_2192}]), "return"); + return (_return_2192); + }()) + ; + var ctx_971 = ctx_push(ctx_970, [{key: "b", val: b}]); + log_event("JsInterpreter.js", 5232, ctx_971, "let"); + log_event("JsInterpreter.js", 5231, ctx_971, "if"); + if (b) { + var _return_2215 = if_ter((function () { + log_event("JsInterpreter.js", 5192, ctx_971, "call"); + var _return_2194 = + run_stat(s1, c, t2); + log_event("JsInterpreter.js", 5191, ctx_push(ctx_971, [{key: "#RETURN_VALUE#", val: _return_2194}]), "return"); + return (_return_2194); }()) + , function(s2, r) { + + var ctx_972 = ctx_push(ctx_971, [{key: "s2", val: s2}, {key: "r", val: r}]); + log_event("JsInterpreter.js", 5229, ctx_972, "let"); + var _if_arg_2195 = (function () { + log_event("JsInterpreter.js", 5194, ctx_972, "call"); + var _return_2196 = + !( + resvalue_compare( + r.res_value, + Coq_resvalue_empty())); + log_event("JsInterpreter.js", 5193, ctx_push(ctx_972, [{key: "#RETURN_VALUE#", val: _return_2196}]), "return"); + return (_return_2196); + }()) + ; + log_event("JsInterpreter.js", 5195, ctx_972, "if"); + if (_if_arg_2195) { + var rv_2 = r.res_value; + } else { + var rv_2 = rv; + } + var ctx_973 = ctx_push(ctx_972, [{key: "rv_2", val: rv_2}]); + log_event("JsInterpreter.js", 5226, ctx_973, "let"); + var loop = function (x) { + var ctx_974 = ctx_push(ctx_973, [{key: "x", val: x}]); + log_event("JsInterpreter.js", 5199, ctx_974, "enter"); + var _return_2198 = (function () { + log_event("JsInterpreter.js", 5197, ctx_974, "call"); + var _return_2197 = + run_stat_while(s2, c, + rv_2, labs, e1, t2); + log_event("JsInterpreter.js", 5196, ctx_push(ctx_974, [{key: "#RETURN_VALUE#", val: _return_2197}]), "return"); + return (_return_2197); + }()) + ; + log_event("JsInterpreter.js", 5198, ctx_push(ctx_974, [{key: "#RETURN_VALUE#", val: _return_2198}]), "return"); + return (_return_2198); + }; + var ctx_975 = ctx_push(ctx_973, [{key: "loop", val: loop}]); + log_event("JsInterpreter.js", 5225, ctx_975, "let"); + var _if_arg_2199 = (function () { + log_event("JsInterpreter.js", 5207, ctx_975, "call"); + var _return_2203 = + ((function () { + log_event("JsInterpreter.js", 5201, ctx_975, "call"); + var _return_2200 = + !( + restype_compare( + r.res_type, + Coq_restype_continue( + ))); + log_event("JsInterpreter.js", 5200, ctx_push(ctx_975, [{key: "#RETURN_VALUE#", val: _return_2200}]), "return"); + return (_return_2200); + }()) || (function () { + log_event("JsInterpreter.js", 5205, ctx_975, "call"); + var _return_2202 = + !((function () { + log_event("JsInterpreter.js", 5203, ctx_975, "call"); + var _return_2201 = + res_label_in(r, + labs); + log_event("JsInterpreter.js", 5202, ctx_push(ctx_975, [{key: "#RETURN_VALUE#", val: _return_2201}]), "return"); + return (_return_2201); + }())); + log_event("JsInterpreter.js", 5204, ctx_push(ctx_975, [{key: "#RETURN_VALUE#", val: _return_2202}]), "return"); + return (_return_2202); + }())); + log_event("JsInterpreter.js", 5206, ctx_push(ctx_975, [{key: "#RETURN_VALUE#", val: _return_2203}]), "return"); + return (_return_2203); + }()) + ; + log_event("JsInterpreter.js", 5224, ctx_975, "if"); + if (_if_arg_2199) { + var _if_arg_2206 = (function () { + log_event("JsInterpreter.js", 5214, ctx_975, "call"); + var _return_2208 = + (restype_compare( + r.res_type, + Coq_restype_break()) + && (function () { + log_event("JsInterpreter.js", 5212, ctx_975, "call"); + var _return_2207 = + res_label_in(r, labs); + log_event("JsInterpreter.js", 5211, ctx_push(ctx_975, [{key: "#RETURN_VALUE#", val: _return_2207}]), "return"); + return (_return_2207); + }())); + log_event("JsInterpreter.js", 5213, ctx_push(ctx_975, [{key: "#RETURN_VALUE#", val: _return_2208}]), "return"); + return (_return_2208); + }()) + ; + log_event("JsInterpreter.js", 5223, ctx_975, "if"); + if (_if_arg_2206) { + var _return_2214 = + res_ter(s2, + res_normal(rv_2)); + log_event("JsInterpreter.js", 5222, ctx_push(ctx_975, [{key: "#RETURN_VALUE#", val: _return_2214}]), "return"); + return (_return_2214); + } else { + var _if_arg_2209 = (function () { + log_event("JsInterpreter.js", 5216, ctx_975, "call"); + var _return_2210 = + !( + restype_compare( + r.res_type, + Coq_restype_normal( + ))); + log_event("JsInterpreter.js", 5215, ctx_push(ctx_975, [{key: "#RETURN_VALUE#", val: _return_2210}]), "return"); + return (_return_2210); + }()) + ; + log_event("JsInterpreter.js", 5221, ctx_975, "if"); + if (_if_arg_2209) { + var _return_2213 = + res_ter(s2, r); + log_event("JsInterpreter.js", 5220, ctx_push(ctx_975, [{key: "#RETURN_VALUE#", val: _return_2213}]), "return"); + return (_return_2213); + } else { + var _return_2212 = (function () { + log_event("JsInterpreter.js", 5218, ctx_975, "call"); + var _return_2211 = + loop({}); + log_event("JsInterpreter.js", 5217, ctx_push(ctx_975, [{key: "#RETURN_VALUE#", val: _return_2211}]), "return"); + return (_return_2211); + }()) + ; + log_event("JsInterpreter.js", 5219, ctx_push(ctx_975, [{key: "#RETURN_VALUE#", val: _return_2212}]), "return"); + return (_return_2212); + } + } + } else { + var _return_2205 = (function () { + log_event("JsInterpreter.js", 5209, ctx_975, "call"); + var _return_2204 = + loop({}); + log_event("JsInterpreter.js", 5208, ctx_push(ctx_975, [{key: "#RETURN_VALUE#", val: _return_2204}]), "return"); + return (_return_2204); + }()) + ; + log_event("JsInterpreter.js", 5210, ctx_push(ctx_975, [{key: "#RETURN_VALUE#", val: _return_2205}]), "return"); + return (_return_2205); + } + + + }); + log_event("JsInterpreter.js", 5230, ctx_push(ctx_971, [{key: "#RETURN_VALUE#", val: _return_2215}]), "return"); + return (_return_2215); + } else { + var _return_2193 = res_ter(s1, res_normal(rv)); + log_event("JsInterpreter.js", 5190, ctx_push(ctx_971, [{key: "#RETURN_VALUE#", val: _return_2193}]), "return"); + return (_return_2193); + } + + }); + log_event("JsInterpreter.js", 5236, ctx_push(ctx_969, [{key: "#RETURN_VALUE#", val: _return_2216}]), "return"); + return (_return_2216); +}; + +var run_stat_switch_end = function (s, c, rv, _foo_) { + var ctx_976 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "rv", val: rv}, {key: "_foo_", val: _foo_}]); + log_event("JsInterpreter.js", 5255, ctx_976, "enter"); + log_event("JsInterpreter.js", 5254, ctx_976, "switch"); + switch (_foo_.tag) { + case "[]":log_event("JsInterpreter.js", 5239, ctx_976, "case"); + + var _return_2217 = result_out(Coq_out_ter(s, res_normal(rv))); + log_event("JsInterpreter.js", 5238, ctx_push(ctx_976, [{key: "#RETURN_VALUE#", val: _return_2217}]), "return"); + return (_return_2217); + case "::": + var y = _foo_.head, scs_2 = _foo_.tail;var ctx_977 = ctx_push(ctx_976, [{key: "y", val: y}, {key: "scs_2", val: scs_2}]); + log_event("JsInterpreter.js", 5253, ctx_977, "case"); + + log_event("JsInterpreter.js", 5252, ctx_977, "switch"); + switch (y.tag) { + case "Coq_switchclause_intro": + var e = y.arg, ts = y.stats;var ctx_978 = ctx_push(ctx_977, [{key: "e", val: e}, {key: "ts", val: ts}]); + log_event("JsInterpreter.js", 5251, ctx_978, "case"); + + var _return_2223 = (function () { + log_event("JsInterpreter.js", 5249, ctx_978, "call"); + var _return_2222 = ifx_success_state(rv, (function () { + log_event("JsInterpreter.js", 5243, ctx_978, "call"); + var _return_2219 = run_block(s, c, + (function () { + log_event("JsInterpreter.js", 5241, ctx_978, "call"); + var _return_2218 = + rev(ts); + log_event("JsInterpreter.js", 5240, ctx_push(ctx_978, [{key: "#RETURN_VALUE#", val: _return_2218}]), "return"); + return (_return_2218); + }())); + log_event("JsInterpreter.js", 5242, ctx_push(ctx_978, [{key: "#RETURN_VALUE#", val: _return_2219}]), "return"); + return (_return_2219); }()), + function (s1, rv1) { + var ctx_979 = ctx_push(ctx_978, [{key: "s1", val: s1}, {key: "rv1", val: rv1}]); + log_event("JsInterpreter.js", 5247, ctx_979, "enter"); + var _return_2221 = (function () { + log_event("JsInterpreter.js", 5245, ctx_979, "call"); + var _return_2220 = run_stat_switch_end( + s1, c, rv1, scs_2); + log_event("JsInterpreter.js", 5244, ctx_push(ctx_979, [{key: "#RETURN_VALUE#", val: _return_2220}]), "return"); + return (_return_2220); + }()) + ; + log_event("JsInterpreter.js", 5246, ctx_push(ctx_979, [{key: "#RETURN_VALUE#", val: _return_2221}]), "return"); + return (_return_2221); }); + log_event("JsInterpreter.js", 5248, ctx_push(ctx_978, [{key: "#RETURN_VALUE#", val: _return_2222}]), "return"); + return (_return_2222); + }()) + ; + log_event("JsInterpreter.js", 5250, ctx_push(ctx_978, [{key: "#RETURN_VALUE#", val: _return_2223}]), "return"); + return (_return_2223); + } + + } + +}; + +var run_stat_switch_no_default = function (s, c, vi, rv, _foo_) { + var ctx_980 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "vi", val: vi}, {key: "rv", val: rv}, {key: "_foo_", val: _foo_}]); + log_event("JsInterpreter.js", 5286, ctx_980, "enter"); + log_event("JsInterpreter.js", 5285, ctx_980, "switch"); + switch (_foo_.tag) { + case "[]":log_event("JsInterpreter.js", 5257, ctx_980, "case"); + + var _return_2224 = result_out(Coq_out_ter(s, res_normal(rv))); + log_event("JsInterpreter.js", 5256, ctx_push(ctx_980, [{key: "#RETURN_VALUE#", val: _return_2224}]), "return"); + return (_return_2224); + case "::": + var y = _foo_.head, scs_2 = _foo_.tail;var ctx_981 = ctx_push(ctx_980, [{key: "y", val: y}, {key: "scs_2", val: scs_2}]); + log_event("JsInterpreter.js", 5284, ctx_981, "case"); + + log_event("JsInterpreter.js", 5283, ctx_981, "switch"); + switch (y.tag) { + case "Coq_switchclause_intro": + var e = y.arg, ts = y.stats;var ctx_982 = ctx_push(ctx_981, [{key: "e", val: e}, {key: "ts", val: ts}]); + log_event("JsInterpreter.js", 5282, ctx_982, "case"); + + var _return_2234 = if_run((function () { + log_event("JsInterpreter.js", 5259, ctx_982, "call"); + var _return_2225 = run_expr_get_value(s, c, + e); + log_event("JsInterpreter.js", 5258, ctx_push(ctx_982, [{key: "#RETURN_VALUE#", val: _return_2225}]), "return"); + return (_return_2225); }()), function(s1, + v1) { + + var ctx_983 = ctx_push(ctx_982, [{key: "s1", val: s1}, {key: "v1", val: v1}]); + log_event("JsInterpreter.js", 5280, ctx_983, "let"); + var b = (function () { + log_event("JsInterpreter.js", 5261, ctx_983, "call"); + var _return_2226 = strict_equality_test( + v1, vi); + log_event("JsInterpreter.js", 5260, ctx_push(ctx_983, [{key: "#RETURN_VALUE#", val: _return_2226}]), "return"); + return (_return_2226); + }()) + ; + var ctx_984 = ctx_push(ctx_983, [{key: "b", val: b}]); + log_event("JsInterpreter.js", 5277, ctx_984, "let"); + log_event("JsInterpreter.js", 5276, ctx_984, "if"); + if (b) { + var _return_2233 = if_success( + (function () { + log_event("JsInterpreter.js", 5268, ctx_984, "call"); + var _return_2230 = + run_block(s1, c, + (function () { + log_event("JsInterpreter.js", 5266, ctx_984, "call"); + var _return_2229 = + rev(ts); + log_event("JsInterpreter.js", 5265, ctx_push(ctx_984, [{key: "#RETURN_VALUE#", val: _return_2229}]), "return"); + return (_return_2229); + }())); + log_event("JsInterpreter.js", 5267, ctx_push(ctx_984, [{key: "#RETURN_VALUE#", val: _return_2230}]), "return"); + return (_return_2230); + }()), function(s2, + rv2) { + + var ctx_985 = ctx_push(ctx_984, [{key: "s2", val: s2}, {key: "rv2", val: rv2}]); + log_event("JsInterpreter.js", 5274, ctx_985, "let"); + var _return_2232 = (function () { + log_event("JsInterpreter.js", 5270, ctx_985, "call"); + var _return_2231 = + run_stat_switch_end( + s2, c, rv2, + scs_2); + log_event("JsInterpreter.js", 5269, ctx_push(ctx_985, [{key: "#RETURN_VALUE#", val: _return_2231}]), "return"); + return (_return_2231); + }()) + ; + log_event("JsInterpreter.js", 5271, ctx_push(ctx_985, [{key: "#RETURN_VALUE#", val: _return_2232}]), "return"); + return (_return_2232); + }); + log_event("JsInterpreter.js", 5275, ctx_push(ctx_984, [{key: "#RETURN_VALUE#", val: _return_2233}]), "return"); + return (_return_2233); + } else { + var _return_2228 = (function () { + log_event("JsInterpreter.js", 5263, ctx_984, "call"); + var _return_2227 = run_stat_switch_no_default( + s1, c, vi, rv, + scs_2); + log_event("JsInterpreter.js", 5262, ctx_push(ctx_984, [{key: "#RETURN_VALUE#", val: _return_2227}]), "return"); + return (_return_2227); + }()) + ; + log_event("JsInterpreter.js", 5264, ctx_push(ctx_984, [{key: "#RETURN_VALUE#", val: _return_2228}]), "return"); + return (_return_2228); + } + + }); + log_event("JsInterpreter.js", 5281, ctx_push(ctx_982, [{key: "#RETURN_VALUE#", val: _return_2234}]), "return"); + return (_return_2234); + } + + } + +}; + +var run_stat_switch_with_default_default = function (s, c, ts, scs) { + var ctx_986 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "ts", val: ts}, {key: "scs", val: scs}]); + log_event("JsInterpreter.js", 5298, ctx_986, "enter"); + var _return_2239 = if_success((function () { + log_event("JsInterpreter.js", 5290, ctx_986, "call"); + var _return_2236 = run_block(s, c, (function () { + log_event("JsInterpreter.js", 5288, ctx_986, "call"); + var _return_2235 = rev(ts); + log_event("JsInterpreter.js", 5287, ctx_push(ctx_986, [{key: "#RETURN_VALUE#", val: _return_2235}]), "return"); + return (_return_2235); }())); + log_event("JsInterpreter.js", 5289, ctx_push(ctx_986, [{key: "#RETURN_VALUE#", val: _return_2236}]), "return"); + return (_return_2236); }()), function(s1, rv) { + + var ctx_987 = ctx_push(ctx_986, [{key: "s1", val: s1}, {key: "rv", val: rv}]); + log_event("JsInterpreter.js", 5296, ctx_987, "let"); + var _return_2238 = (function () { + log_event("JsInterpreter.js", 5292, ctx_987, "call"); + var _return_2237 = run_stat_switch_end(s1, c, rv, + scs); + log_event("JsInterpreter.js", 5291, ctx_push(ctx_987, [{key: "#RETURN_VALUE#", val: _return_2237}]), "return"); + return (_return_2237); + }()) + ; + log_event("JsInterpreter.js", 5293, ctx_push(ctx_987, [{key: "#RETURN_VALUE#", val: _return_2238}]), "return"); + return (_return_2238); + }); + log_event("JsInterpreter.js", 5297, ctx_push(ctx_986, [{key: "#RETURN_VALUE#", val: _return_2239}]), "return"); + return (_return_2239); +}; + +var run_stat_switch_with_default_B = function (s, c, vi, rv, ts0, scs) { + var ctx_988 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "vi", val: vi}, {key: "rv", val: rv}, {key: "ts0", val: ts0}, {key: "scs", val: scs}]); + log_event("JsInterpreter.js", 5331, ctx_988, "enter"); + log_event("JsInterpreter.js", 5330, ctx_988, "switch"); + switch (scs.tag) { + case "[]":log_event("JsInterpreter.js", 5302, ctx_988, "case"); + + var _return_2241 = (function () { + log_event("JsInterpreter.js", 5300, ctx_988, "call"); + var _return_2240 = run_stat_switch_with_default_default(s, c, ts0, + scs); + log_event("JsInterpreter.js", 5299, ctx_push(ctx_988, [{key: "#RETURN_VALUE#", val: _return_2240}]), "return"); + return (_return_2240); + }()) + ; + log_event("JsInterpreter.js", 5301, ctx_push(ctx_988, [{key: "#RETURN_VALUE#", val: _return_2241}]), "return"); + return (_return_2241); + case "::": + var y = scs.head, scs_2 = scs.tail;var ctx_989 = ctx_push(ctx_988, [{key: "y", val: y}, {key: "scs_2", val: scs_2}]); + log_event("JsInterpreter.js", 5329, ctx_989, "case"); + + log_event("JsInterpreter.js", 5328, ctx_989, "switch"); + switch (y.tag) { + case "Coq_switchclause_intro": + var e = y.arg, ts = y.stats;var ctx_990 = ctx_push(ctx_989, [{key: "e", val: e}, {key: "ts", val: ts}]); + log_event("JsInterpreter.js", 5327, ctx_990, "case"); + + var _return_2251 = if_run((function () { + log_event("JsInterpreter.js", 5304, ctx_990, "call"); + var _return_2242 = run_expr_get_value(s, c, + e); + log_event("JsInterpreter.js", 5303, ctx_push(ctx_990, [{key: "#RETURN_VALUE#", val: _return_2242}]), "return"); + return (_return_2242); }()), function(s1, + v1) { + + var ctx_991 = ctx_push(ctx_990, [{key: "s1", val: s1}, {key: "v1", val: v1}]); + log_event("JsInterpreter.js", 5325, ctx_991, "let"); + var b = (function () { + log_event("JsInterpreter.js", 5306, ctx_991, "call"); + var _return_2243 = strict_equality_test( + v1, vi); + log_event("JsInterpreter.js", 5305, ctx_push(ctx_991, [{key: "#RETURN_VALUE#", val: _return_2243}]), "return"); + return (_return_2243); + }()) + ; + var ctx_992 = ctx_push(ctx_991, [{key: "b", val: b}]); + log_event("JsInterpreter.js", 5322, ctx_992, "let"); + log_event("JsInterpreter.js", 5321, ctx_992, "if"); + if (b) { + var _return_2250 = if_success( + (function () { + log_event("JsInterpreter.js", 5313, ctx_992, "call"); + var _return_2247 = + run_block(s1, c, + (function () { + log_event("JsInterpreter.js", 5311, ctx_992, "call"); + var _return_2246 = + rev(ts); + log_event("JsInterpreter.js", 5310, ctx_push(ctx_992, [{key: "#RETURN_VALUE#", val: _return_2246}]), "return"); + return (_return_2246); + }())); + log_event("JsInterpreter.js", 5312, ctx_push(ctx_992, [{key: "#RETURN_VALUE#", val: _return_2247}]), "return"); + return (_return_2247); + }()), function(s2, + rv2) { + + var ctx_993 = ctx_push(ctx_992, [{key: "s2", val: s2}, {key: "rv2", val: rv2}]); + log_event("JsInterpreter.js", 5319, ctx_993, "let"); + var _return_2249 = (function () { + log_event("JsInterpreter.js", 5315, ctx_993, "call"); + var _return_2248 = + run_stat_switch_end( + s2, c, rv2, + scs_2); + log_event("JsInterpreter.js", 5314, ctx_push(ctx_993, [{key: "#RETURN_VALUE#", val: _return_2248}]), "return"); + return (_return_2248); + }()) + ; + log_event("JsInterpreter.js", 5316, ctx_push(ctx_993, [{key: "#RETURN_VALUE#", val: _return_2249}]), "return"); + return (_return_2249); + }); + log_event("JsInterpreter.js", 5320, ctx_push(ctx_992, [{key: "#RETURN_VALUE#", val: _return_2250}]), "return"); + return (_return_2250); + } else { + var _return_2245 = (function () { + log_event("JsInterpreter.js", 5308, ctx_992, "call"); + var _return_2244 = run_stat_switch_with_default_B( + s1, c, vi, rv, ts0, + scs_2); + log_event("JsInterpreter.js", 5307, ctx_push(ctx_992, [{key: "#RETURN_VALUE#", val: _return_2244}]), "return"); + return (_return_2244); + }()) + ; + log_event("JsInterpreter.js", 5309, ctx_push(ctx_992, [{key: "#RETURN_VALUE#", val: _return_2245}]), "return"); + return (_return_2245); + } + + }); + log_event("JsInterpreter.js", 5326, ctx_push(ctx_990, [{key: "#RETURN_VALUE#", val: _return_2251}]), "return"); + return (_return_2251); + } + + } + +}; + +var run_stat_switch_with_default_A = function (s, c, found, vi, rv, scs1, ts0, scs2) { + var ctx_994 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "found", val: found}, {key: "vi", val: vi}, {key: "rv", val: rv}, {key: "scs1", val: scs1}, {key: "ts0", val: ts0}, {key: "scs2", val: scs2}]); + log_event("JsInterpreter.js", 5377, ctx_994, "enter"); + log_event("JsInterpreter.js", 5376, ctx_994, "switch"); + switch (scs1.tag) { + case "[]":log_event("JsInterpreter.js", 5339, ctx_994, "case"); + + log_event("JsInterpreter.js", 5338, ctx_994, "if"); + if (found) { + var _return_2255 = (function () { + log_event("JsInterpreter.js", 5336, ctx_994, "call"); + var _return_2254 = run_stat_switch_with_default_default(s, c, ts0, + scs2); + log_event("JsInterpreter.js", 5335, ctx_push(ctx_994, [{key: "#RETURN_VALUE#", val: _return_2254}]), "return"); + return (_return_2254); + }()) + ; + log_event("JsInterpreter.js", 5337, ctx_push(ctx_994, [{key: "#RETURN_VALUE#", val: _return_2255}]), "return"); + return (_return_2255); + } else { + var _return_2253 = (function () { + log_event("JsInterpreter.js", 5333, ctx_994, "call"); + var _return_2252 = run_stat_switch_with_default_B(s, c, vi, rv, + ts0, scs2); + log_event("JsInterpreter.js", 5332, ctx_push(ctx_994, [{key: "#RETURN_VALUE#", val: _return_2252}]), "return"); + return (_return_2252); + }()) + ; + log_event("JsInterpreter.js", 5334, ctx_push(ctx_994, [{key: "#RETURN_VALUE#", val: _return_2253}]), "return"); + return (_return_2253); + } + case "::": + var y = scs1.head, scs_2 = scs1.tail;var ctx_995 = ctx_push(ctx_994, [{key: "y", val: y}, {key: "scs_2", val: scs_2}]); + log_event("JsInterpreter.js", 5375, ctx_995, "case"); + + log_event("JsInterpreter.js", 5374, ctx_995, "switch"); + switch (y.tag) { + case "Coq_switchclause_intro": + var e = y.arg, ts = y.stats;var ctx_996 = ctx_push(ctx_995, [{key: "e", val: e}, {key: "ts", val: ts}]); + log_event("JsInterpreter.js", 5373, ctx_996, "case"); + + var follow = function (s0) { + var ctx_997 = ctx_push(ctx_996, [{key: "s0", val: s0}]); + log_event("JsInterpreter.js", 5351, ctx_997, "enter"); + var _return_2261 = (function () { + log_event("JsInterpreter.js", 5349, ctx_997, "call"); + var _return_2260 = ifx_success_state(rv, (function () { + log_event("JsInterpreter.js", 5343, ctx_997, "call"); + var _return_2257 = run_block(s0, c, + (function () { + log_event("JsInterpreter.js", 5341, ctx_997, "call"); + var _return_2256 = + rev(ts); + log_event("JsInterpreter.js", 5340, ctx_push(ctx_997, [{key: "#RETURN_VALUE#", val: _return_2256}]), "return"); + return (_return_2256); + }())); + log_event("JsInterpreter.js", 5342, ctx_push(ctx_997, [{key: "#RETURN_VALUE#", val: _return_2257}]), "return"); + return (_return_2257); }()), + function (s1, rv0) { + var ctx_998 = ctx_push(ctx_997, [{key: "s1", val: s1}, {key: "rv0", val: rv0}]); + log_event("JsInterpreter.js", 5347, ctx_998, "enter"); + var _return_2259 = (function () { + log_event("JsInterpreter.js", 5345, ctx_998, "call"); + var _return_2258 = run_stat_switch_with_default_A( + s1, c, true, vi, + rv0, scs_2, ts0, + scs2); + log_event("JsInterpreter.js", 5344, ctx_push(ctx_998, [{key: "#RETURN_VALUE#", val: _return_2258}]), "return"); + return (_return_2258); + }()) + ; + log_event("JsInterpreter.js", 5346, ctx_push(ctx_998, [{key: "#RETURN_VALUE#", val: _return_2259}]), "return"); + return (_return_2259); }); + log_event("JsInterpreter.js", 5348, ctx_push(ctx_997, [{key: "#RETURN_VALUE#", val: _return_2260}]), "return"); + return (_return_2260); + }()) + ; + log_event("JsInterpreter.js", 5350, ctx_push(ctx_997, [{key: "#RETURN_VALUE#", val: _return_2261}]), "return"); + return (_return_2261); + }; + var ctx_999 = ctx_push(ctx_996, [{key: "follow", val: follow}]); + log_event("JsInterpreter.js", 5372, ctx_999, "let"); + log_event("JsInterpreter.js", 5371, ctx_999, "if"); + if (found) { + var _return_2270 = (function () { + log_event("JsInterpreter.js", 5369, ctx_999, "call"); + var _return_2269 = follow(s); + log_event("JsInterpreter.js", 5368, ctx_push(ctx_999, [{key: "#RETURN_VALUE#", val: _return_2269}]), "return"); + return (_return_2269); + }()) + ; + log_event("JsInterpreter.js", 5370, ctx_push(ctx_999, [{key: "#RETURN_VALUE#", val: _return_2270}]), "return"); + return (_return_2270); + } else { + var _return_2268 = if_run((function () { + log_event("JsInterpreter.js", 5353, ctx_999, "call"); + var _return_2262 = run_expr_get_value(s, + c, e); + log_event("JsInterpreter.js", 5352, ctx_push(ctx_999, [{key: "#RETURN_VALUE#", val: _return_2262}]), "return"); + return (_return_2262); }()), function(s1, + v1) { + + var ctx_1000 = ctx_push(ctx_999, [{key: "s1", val: s1}, {key: "v1", val: v1}]); + log_event("JsInterpreter.js", 5366, ctx_1000, "let"); + var b = (function () { + log_event("JsInterpreter.js", 5355, ctx_1000, "call"); + var _return_2263 = strict_equality_test( + v1, vi); + log_event("JsInterpreter.js", 5354, ctx_push(ctx_1000, [{key: "#RETURN_VALUE#", val: _return_2263}]), "return"); + return (_return_2263); + }()) + ; + var ctx_1001 = ctx_push(ctx_1000, [{key: "b", val: b}]); + log_event("JsInterpreter.js", 5363, ctx_1001, "let"); + log_event("JsInterpreter.js", 5362, ctx_1001, "if"); + if (b) { + var _return_2267 = (function () { + log_event("JsInterpreter.js", 5360, ctx_1001, "call"); + var _return_2266 = follow(s1); + log_event("JsInterpreter.js", 5359, ctx_push(ctx_1001, [{key: "#RETURN_VALUE#", val: _return_2266}]), "return"); + return (_return_2266); + }()) + ; + log_event("JsInterpreter.js", 5361, ctx_push(ctx_1001, [{key: "#RETURN_VALUE#", val: _return_2267}]), "return"); + return (_return_2267); + } else { + var _return_2265 = (function () { + log_event("JsInterpreter.js", 5357, ctx_1001, "call"); + var _return_2264 = run_stat_switch_with_default_A( + s1, c, false, vi, + rv, scs_2, ts0, + scs2); + log_event("JsInterpreter.js", 5356, ctx_push(ctx_1001, [{key: "#RETURN_VALUE#", val: _return_2264}]), "return"); + return (_return_2264); + }()) + ; + log_event("JsInterpreter.js", 5358, ctx_push(ctx_1001, [{key: "#RETURN_VALUE#", val: _return_2265}]), "return"); + return (_return_2265); + } + + }); + log_event("JsInterpreter.js", 5367, ctx_push(ctx_999, [{key: "#RETURN_VALUE#", val: _return_2268}]), "return"); + return (_return_2268); + } + + } + + } + +}; + +var run_stat_switch = function (s, c, labs, e, sb) { + var ctx_1002 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "labs", val: labs}, {key: "e", val: e}, {key: "sb", val: sb}]); + log_event("JsInterpreter.js", 5412, ctx_1002, "enter"); + var _return_2284 = if_run((function () { + log_event("JsInterpreter.js", 5379, ctx_1002, "call"); + var _return_2271 = run_expr_get_value(s, c, e); + log_event("JsInterpreter.js", 5378, ctx_push(ctx_1002, [{key: "#RETURN_VALUE#", val: _return_2271}]), "return"); + return (_return_2271); }()), function(s1, vi) { + + var ctx_1003 = ctx_push(ctx_1002, [{key: "s1", val: s1}, {key: "vi", val: vi}]); + log_event("JsInterpreter.js", 5410, ctx_1003, "let"); + var follow = function (w) { + var ctx_1004 = ctx_push(ctx_1003, [{key: "w", val: w}]); + log_event("JsInterpreter.js", 5393, ctx_1004, "enter"); + var _return_2277 = if_success( + if_break(w, function(s2, r) { + + var ctx_1005 = ctx_push(ctx_1004, [{key: "s2", val: s2}, {key: "r", val: r}]); + log_event("JsInterpreter.js", 5387, ctx_1005, "let"); + var _if_arg_2272 = (function () { + log_event("JsInterpreter.js", 5381, ctx_1005, "call"); + var _return_2273 = + res_label_in(r, labs); + log_event("JsInterpreter.js", 5380, ctx_push(ctx_1005, [{key: "#RETURN_VALUE#", val: _return_2273}]), "return"); + return (_return_2273); + }()) + ; + log_event("JsInterpreter.js", 5384, ctx_1005, "if"); + if (_if_arg_2272) { + var _return_2275 = + result_out( + Coq_out_ter(s2, + res_normal( + r.res_value))); + log_event("JsInterpreter.js", 5383, ctx_push(ctx_1005, [{key: "#RETURN_VALUE#", val: _return_2275}]), "return"); + return (_return_2275); + } else { + var _return_2274 = + result_out( + Coq_out_ter(s2, r)); + log_event("JsInterpreter.js", 5382, ctx_push(ctx_1005, [{key: "#RETURN_VALUE#", val: _return_2274}]), "return"); + return (_return_2274); + } + }), function(s0, r) { + + var ctx_1006 = ctx_push(ctx_1004, [{key: "s0", val: s0}, {key: "r", val: r}]); + log_event("JsInterpreter.js", 5391, ctx_1006, "let"); + var _return_2276 = + res_ter(s0, res_normal(r)); + log_event("JsInterpreter.js", 5388, ctx_push(ctx_1006, [{key: "#RETURN_VALUE#", val: _return_2276}]), "return"); + return (_return_2276); + }); + log_event("JsInterpreter.js", 5392, ctx_push(ctx_1004, [{key: "#RETURN_VALUE#", val: _return_2277}]), "return"); + return (_return_2277); + }; + var ctx_1007 = ctx_push(ctx_1003, [{key: "follow", val: follow}]); + log_event("JsInterpreter.js", 5407, ctx_1007, "let"); + log_event("JsInterpreter.js", 5406, ctx_1007, "switch"); + switch (sb.tag) { + case "Coq_switchbody_nodefault": + var scs = sb.clauses;var ctx_1008 = ctx_push(ctx_1007, [{key: "scs", val: scs}]); + log_event("JsInterpreter.js", 5399, ctx_1008, "case"); + + var _return_2280 = (function () { + log_event("JsInterpreter.js", 5397, ctx_1008, "call"); + var _return_2279 = follow((function () { + log_event("JsInterpreter.js", 5395, ctx_1008, "call"); + var _return_2278 = + run_stat_switch_no_default( + s1, c, vi, + Coq_resvalue_empty(), + scs); + log_event("JsInterpreter.js", 5394, ctx_push(ctx_1008, [{key: "#RETURN_VALUE#", val: _return_2278}]), "return"); + return (_return_2278); + }())); + log_event("JsInterpreter.js", 5396, ctx_push(ctx_1008, [{key: "#RETURN_VALUE#", val: _return_2279}]), "return"); + return (_return_2279); + }()) + ; + log_event("JsInterpreter.js", 5398, ctx_push(ctx_1008, [{key: "#RETURN_VALUE#", val: _return_2280}]), "return"); + return (_return_2280); + case "Coq_switchbody_withdefault": + var scs1 = sb.clauses_before, + ts = sb.clause_default, + scs2 = sb.clauses_after;var ctx_1009 = ctx_push(ctx_1007, [{key: "scs1", val: scs1}, {key: "ts", val: ts}, {key: "scs2", val: scs2}]); + log_event("JsInterpreter.js", 5405, ctx_1009, "case"); + + var _return_2283 = (function () { + log_event("JsInterpreter.js", 5403, ctx_1009, "call"); + var _return_2282 = follow((function () { + log_event("JsInterpreter.js", 5401, ctx_1009, "call"); + var _return_2281 = + run_stat_switch_with_default_A( + s1, c, false, vi, + Coq_resvalue_empty(), + scs1, ts, scs2); + log_event("JsInterpreter.js", 5400, ctx_push(ctx_1009, [{key: "#RETURN_VALUE#", val: _return_2281}]), "return"); + return (_return_2281); + }())); + log_event("JsInterpreter.js", 5402, ctx_push(ctx_1009, [{key: "#RETURN_VALUE#", val: _return_2282}]), "return"); + return (_return_2282); + }()) + ; + log_event("JsInterpreter.js", 5404, ctx_push(ctx_1009, [{key: "#RETURN_VALUE#", val: _return_2283}]), "return"); + return (_return_2283); + } + + + }); + log_event("JsInterpreter.js", 5411, ctx_push(ctx_1002, [{key: "#RETURN_VALUE#", val: _return_2284}]), "return"); + return (_return_2284); +}; + +var run_stat_do_while = function (s, c, rv, labs, e1, t2) { + var ctx_1010 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "rv", val: rv}, {key: "labs", val: labs}, {key: "e1", val: e1}, {key: "t2", val: t2}]); + log_event("JsInterpreter.js", 5458, ctx_1010, "enter"); + var _return_2307 = if_ter((function () { + log_event("JsInterpreter.js", 5414, ctx_1010, "call"); + var _return_2285 = run_stat(s, c, t2); + log_event("JsInterpreter.js", 5413, ctx_push(ctx_1010, [{key: "#RETURN_VALUE#", val: _return_2285}]), "return"); + return (_return_2285); }()), function(s1, r) { + + var ctx_1011 = ctx_push(ctx_1010, [{key: "s1", val: s1}, {key: "r", val: r}]); + log_event("JsInterpreter.js", 5456, ctx_1011, "let"); + var _if_arg_2286 = resvalue_compare(r.res_value, + Coq_resvalue_empty()); + log_event("JsInterpreter.js", 5415, ctx_1011, "if"); + if (_if_arg_2286) { + var rv_2 = rv; + } else { + var rv_2 = r.res_value; + } + var ctx_1012 = ctx_push(ctx_1011, [{key: "rv_2", val: rv_2}]); + log_event("JsInterpreter.js", 5453, ctx_1012, "let"); + var loop = function (x) { + var ctx_1013 = ctx_push(ctx_1012, [{key: "x", val: x}]); + log_event("JsInterpreter.js", 5430, ctx_1013, "enter"); + var _return_2292 = if_run((function () { + log_event("JsInterpreter.js", 5417, ctx_1013, "call"); + var _return_2287 = + run_expr_get_value(s1, c, + e1); + log_event("JsInterpreter.js", 5416, ctx_push(ctx_1013, [{key: "#RETURN_VALUE#", val: _return_2287}]), "return"); + return (_return_2287); }()) + , function(s2, v1) { + + var ctx_1014 = ctx_push(ctx_1013, [{key: "s2", val: s2}, {key: "v1", val: v1}]); + log_event("JsInterpreter.js", 5428, ctx_1014, "let"); + var b = (function () { + log_event("JsInterpreter.js", 5419, ctx_1014, "call"); + var _return_2288 = + convert_value_to_boolean( + v1); + log_event("JsInterpreter.js", 5418, ctx_push(ctx_1014, [{key: "#RETURN_VALUE#", val: _return_2288}]), "return"); + return (_return_2288); + }()) + ; + var ctx_1015 = ctx_push(ctx_1014, [{key: "b", val: b}]); + log_event("JsInterpreter.js", 5425, ctx_1015, "let"); + log_event("JsInterpreter.js", 5424, ctx_1015, "if"); + if (b) { + var _return_2291 = (function () { + log_event("JsInterpreter.js", 5422, ctx_1015, "call"); + var _return_2290 = + run_stat_do_while(s2, + c, rv_2, labs, e1, + t2); + log_event("JsInterpreter.js", 5421, ctx_push(ctx_1015, [{key: "#RETURN_VALUE#", val: _return_2290}]), "return"); + return (_return_2290); + }()) + ; + log_event("JsInterpreter.js", 5423, ctx_push(ctx_1015, [{key: "#RETURN_VALUE#", val: _return_2291}]), "return"); + return (_return_2291); + } else { + var _return_2289 = + res_ter(s2, + res_normal(rv_2)); + log_event("JsInterpreter.js", 5420, ctx_push(ctx_1015, [{key: "#RETURN_VALUE#", val: _return_2289}]), "return"); + return (_return_2289); + } + + }); + log_event("JsInterpreter.js", 5429, ctx_push(ctx_1013, [{key: "#RETURN_VALUE#", val: _return_2292}]), "return"); + return (_return_2292); + }; + var ctx_1016 = ctx_push(ctx_1012, [{key: "loop", val: loop}]); + log_event("JsInterpreter.js", 5452, ctx_1016, "let"); + var _if_arg_2293 = (function () { + log_event("JsInterpreter.js", 5434, ctx_1016, "call"); + var _return_2295 = (restype_compare(r.res_type, + Coq_restype_continue()) + && (function () { + log_event("JsInterpreter.js", 5432, ctx_1016, "call"); + var _return_2294 = res_label_in( + r, labs); + log_event("JsInterpreter.js", 5431, ctx_push(ctx_1016, [{key: "#RETURN_VALUE#", val: _return_2294}]), "return"); + return (_return_2294); }())); + log_event("JsInterpreter.js", 5433, ctx_push(ctx_1016, [{key: "#RETURN_VALUE#", val: _return_2295}]), "return"); + return (_return_2295); + }()) + ; + log_event("JsInterpreter.js", 5451, ctx_1016, "if"); + if (_if_arg_2293) { + var _return_2306 = (function () { + log_event("JsInterpreter.js", 5449, ctx_1016, "call"); + var _return_2305 = loop({}); + log_event("JsInterpreter.js", 5448, ctx_push(ctx_1016, [{key: "#RETURN_VALUE#", val: _return_2305}]), "return"); + return (_return_2305); + }()) + ; + log_event("JsInterpreter.js", 5450, ctx_push(ctx_1016, [{key: "#RETURN_VALUE#", val: _return_2306}]), "return"); + return (_return_2306); + } else { + var _if_arg_2296 = (function () { + log_event("JsInterpreter.js", 5438, ctx_1016, "call"); + var _return_2298 = (restype_compare(r.res_type, + Coq_restype_break()) + && (function () { + log_event("JsInterpreter.js", 5436, ctx_1016, "call"); + var _return_2297 = + res_label_in(r, labs); + log_event("JsInterpreter.js", 5435, ctx_push(ctx_1016, [{key: "#RETURN_VALUE#", val: _return_2297}]), "return"); + return (_return_2297); }()) + ); + log_event("JsInterpreter.js", 5437, ctx_push(ctx_1016, [{key: "#RETURN_VALUE#", val: _return_2298}]), "return"); + return (_return_2298); + }()) + ; + log_event("JsInterpreter.js", 5447, ctx_1016, "if"); + if (_if_arg_2296) { + var _return_2304 = res_ter(s1, res_normal(rv_2)); + log_event("JsInterpreter.js", 5446, ctx_push(ctx_1016, [{key: "#RETURN_VALUE#", val: _return_2304}]), "return"); + return (_return_2304); + } else { + var _if_arg_2299 = (function () { + log_event("JsInterpreter.js", 5440, ctx_1016, "call"); + var _return_2300 = !( + restype_compare( + r.res_type, + Coq_restype_normal())); + log_event("JsInterpreter.js", 5439, ctx_push(ctx_1016, [{key: "#RETURN_VALUE#", val: _return_2300}]), "return"); + return (_return_2300); + }()) + ; + log_event("JsInterpreter.js", 5445, ctx_1016, "if"); + if (_if_arg_2299) { + var _return_2303 = res_ter(s1, r); + log_event("JsInterpreter.js", 5444, ctx_push(ctx_1016, [{key: "#RETURN_VALUE#", val: _return_2303}]), "return"); + return (_return_2303); + } else { + var _return_2302 = (function () { + log_event("JsInterpreter.js", 5442, ctx_1016, "call"); + var _return_2301 = loop({}); + log_event("JsInterpreter.js", 5441, ctx_push(ctx_1016, [{key: "#RETURN_VALUE#", val: _return_2301}]), "return"); + return (_return_2301); + }()) + ; + log_event("JsInterpreter.js", 5443, ctx_push(ctx_1016, [{key: "#RETURN_VALUE#", val: _return_2302}]), "return"); + return (_return_2302); + } + } + } + + + }); + log_event("JsInterpreter.js", 5457, ctx_push(ctx_1010, [{key: "#RETURN_VALUE#", val: _return_2307}]), "return"); + return (_return_2307); +}; + +var run_stat_try = function (s, c, t1, t2o, t3o) { + var ctx_1017 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "t1", val: t1}, {key: "t2o", val: t2o}, {key: "t3o", val: t3o}]); + log_event("JsInterpreter.js", 5518, ctx_1017, "enter"); + var finallycont = function (s1, r) { + var ctx_1018 = ctx_push(ctx_1017, [{key: "s1", val: s1}, {key: "r", val: r}]); + log_event("JsInterpreter.js", 5470, ctx_1018, "enter"); + log_event("JsInterpreter.js", 5469, ctx_1018, "switch"); + switch (t3o.tag) { + case "Some": + var t3 = t3o.value;var ctx_1019 = ctx_push(ctx_1018, [{key: "t3", val: t3}]); + log_event("JsInterpreter.js", 5466, ctx_1019, "case"); + + var _return_2310 = if_success((function () { + log_event("JsInterpreter.js", 5460, ctx_1019, "call"); + var _return_2308 = run_stat(s1, c, t3); + log_event("JsInterpreter.js", 5459, ctx_push(ctx_1019, [{key: "#RETURN_VALUE#", val: _return_2308}]), "return"); + return (_return_2308); }()), function(s2, + rv_2) { + + var ctx_1020 = ctx_push(ctx_1019, [{key: "s2", val: s2}, {key: "rv_2", val: rv_2}]); + log_event("JsInterpreter.js", 5464, ctx_1020, "let"); + var _return_2309 = res_ter(s2, r); + log_event("JsInterpreter.js", 5461, ctx_push(ctx_1020, [{key: "#RETURN_VALUE#", val: _return_2309}]), "return"); + return (_return_2309); + }); + log_event("JsInterpreter.js", 5465, ctx_push(ctx_1019, [{key: "#RETURN_VALUE#", val: _return_2310}]), "return"); + return (_return_2310); + case "None":log_event("JsInterpreter.js", 5468, ctx_1018, "case"); + + var _return_2311 = res_ter(s1, r); + log_event("JsInterpreter.js", 5467, ctx_push(ctx_1018, [{key: "#RETURN_VALUE#", val: _return_2311}]), "return"); + return (_return_2311); + } + + }; + var ctx_1021 = ctx_push(ctx_1017, [{key: "finallycont", val: finallycont}]); + log_event("JsInterpreter.js", 5517, ctx_1021, "let"); + var _return_2328 = (function () { + log_event("JsInterpreter.js", 5515, ctx_1021, "call"); + var _return_2327 = ifx_any_or_throw((function () { + log_event("JsInterpreter.js", 5472, ctx_1021, "call"); + var _return_2312 = run_stat(s, c, t1); + log_event("JsInterpreter.js", 5471, ctx_push(ctx_1021, [{key: "#RETURN_VALUE#", val: _return_2312}]), "return"); + return (_return_2312); }()), finallycont, + function (s1, v) { + var ctx_1022 = ctx_push(ctx_1021, [{key: "s1", val: s1}, {key: "v", val: v}]); + log_event("JsInterpreter.js", 5513, ctx_1022, "enter"); + log_event("JsInterpreter.js", 5512, ctx_1022, "switch"); + switch (t2o.tag) { + case "Some": + var y = t2o.value;var ctx_1023 = ctx_push(ctx_1022, [{key: "y", val: y}]); + log_event("JsInterpreter.js", 5507, ctx_1023, "case"); + + var x = y[0], t2 = y[1]; + var ctx_1024 = ctx_push(ctx_1023, [{key: "x", val: x}, {key: "t2", val: t2}]); + log_event("JsInterpreter.js", 5506, ctx_1024, "let"); + var lex = c.execution_ctx_lexical_env; + var ctx_1025 = ctx_push(ctx_1024, [{key: "lex", val: lex}]); + log_event("JsInterpreter.js", 5505, ctx_1025, "let"); + var p = (function () { + log_event("JsInterpreter.js", 5474, ctx_1025, "call"); + var _return_2313 = lexical_env_alloc_decl( + s1, lex); + log_event("JsInterpreter.js", 5473, ctx_push(ctx_1025, [{key: "#RETURN_VALUE#", val: _return_2313}]), "return"); + return (_return_2313); + }()) + ; + var ctx_1026 = ctx_push(ctx_1025, [{key: "p", val: p}]); + log_event("JsInterpreter.js", 5504, ctx_1026, "let"); + var lex_2 = p[0], s_2 = p[1]; + var ctx_1027 = ctx_push(ctx_1026, [{key: "lex_2", val: lex_2}, {key: "s_2", val: s_2}]); + log_event("JsInterpreter.js", 5503, ctx_1027, "let"); + log_event("JsInterpreter.js", 5502, ctx_1027, "switch"); + switch (lex_2.tag) { + case "[]":log_event("JsInterpreter.js", 5482, ctx_1027, "case"); + + var _return_2317 = (function () { + log_event("JsInterpreter.js", 5480, ctx_1027, "call"); + var _return_2316 = function (s, m) { + var ctx_1028 = ctx_push(ctx_1027, [{key: "s", val: s}, {key: "m", val: m}]); + log_event("JsInterpreter.js", 5478, ctx_1028, "enter"); + (function () { + log_event("JsInterpreter.js", 5477, ctx_1028, "call"); + var _return_2315 = + Debug.impossible_with_heap_because( + __LOC__, s, + m); + log_event("JsInterpreter.js", 5476, ctx_push(ctx_1028, [{key: "#RETURN_VALUE#", val: _return_2315}]), "return"); + return (_return_2315); + }()) + ; + var _return_2314 = + Coq_result_impossible( + ); + log_event("JsInterpreter.js", 5475, ctx_push(ctx_1028, [{key: "#RETURN_VALUE#", val: _return_2314}]), "return"); + return (_return_2314); + }(s_2, + "Empty lexical environnment in [run_stat_try]."); + log_event("JsInterpreter.js", 5479, ctx_push(ctx_1027, [{key: "#RETURN_VALUE#", val: _return_2316}]), "return"); + return (_return_2316); + }()) + ; + log_event("JsInterpreter.js", 5481, ctx_push(ctx_1027, [{key: "#RETURN_VALUE#", val: _return_2317}]), "return"); + return (_return_2317); + case "::": + var l = lex_2.head, oldlex = lex_2.tail;var ctx_1029 = ctx_push(ctx_1027, [{key: "l", val: l}, {key: "oldlex", val: oldlex}]); + log_event("JsInterpreter.js", 5501, ctx_1029, "case"); + + var _return_2324 = if_void((function () { + log_event("JsInterpreter.js", 5484, ctx_1029, "call"); + var _return_2318 = + env_record_create_set_mutable_binding( + s_2, c, l, x, + None(), v, + throw_irrelevant); + log_event("JsInterpreter.js", 5483, ctx_push(ctx_1029, [{key: "#RETURN_VALUE#", val: _return_2318}]), "return"); + return (_return_2318); + }()), function(s2) { + + var ctx_1030 = ctx_push(ctx_1029, [{key: "s2", val: s2}]); + log_event("JsInterpreter.js", 5499, ctx_1030, "let"); + var c_2 = (function () { + log_event("JsInterpreter.js", 5486, ctx_1030, "call"); + var _return_2319 = + execution_ctx_with_lex( + c, lex_2); + log_event("JsInterpreter.js", 5485, ctx_push(ctx_1030, [{key: "#RETURN_VALUE#", val: _return_2319}]), "return"); + return (_return_2319); + }()) + ; + var ctx_1031 = ctx_push(ctx_1030, [{key: "c_2", val: c_2}]); + log_event("JsInterpreter.js", 5496, ctx_1031, "let"); + var _return_2323 = + if_ter( + (function () { + log_event("JsInterpreter.js", 5488, ctx_1031, "call"); + var _return_2320 = + run_stat(s2, + c_2, t2); + log_event("JsInterpreter.js", 5487, ctx_push(ctx_1031, [{key: "#RETURN_VALUE#", val: _return_2320}]), "return"); + return (_return_2320); + }()), + function(s3, r) { + + var ctx_1032 = ctx_push(ctx_1031, [{key: "s3", val: s3}, {key: "r", val: r}]); + log_event("JsInterpreter.js", 5494, ctx_1032, "let"); + var _return_2322 = (function () { + log_event("JsInterpreter.js", 5490, ctx_1032, "call"); + var _return_2321 = + finallycont( + s3, r); + log_event("JsInterpreter.js", 5489, ctx_push(ctx_1032, [{key: "#RETURN_VALUE#", val: _return_2321}]), "return"); + return (_return_2321); + }()) + ; + log_event("JsInterpreter.js", 5491, ctx_push(ctx_1032, [{key: "#RETURN_VALUE#", val: _return_2322}]), "return"); + return (_return_2322); + }); + log_event("JsInterpreter.js", 5495, ctx_push(ctx_1031, [{key: "#RETURN_VALUE#", val: _return_2323}]), "return"); + return (_return_2323); + + }); + log_event("JsInterpreter.js", 5500, ctx_push(ctx_1029, [{key: "#RETURN_VALUE#", val: _return_2324}]), "return"); + return (_return_2324); + } + + + + + + case "None":log_event("JsInterpreter.js", 5511, ctx_1022, "case"); + + var _return_2326 = (function () { + log_event("JsInterpreter.js", 5509, ctx_1022, "call"); + var _return_2325 = finallycont(s1, + res_throw( + Coq_resvalue_value(v))); + log_event("JsInterpreter.js", 5508, ctx_push(ctx_1022, [{key: "#RETURN_VALUE#", val: _return_2325}]), "return"); + return (_return_2325); + }()) + ; + log_event("JsInterpreter.js", 5510, ctx_push(ctx_1022, [{key: "#RETURN_VALUE#", val: _return_2326}]), "return"); + return (_return_2326); + } + }); + log_event("JsInterpreter.js", 5514, ctx_push(ctx_1021, [{key: "#RETURN_VALUE#", val: _return_2327}]), "return"); + return (_return_2327); + }()) + ; + log_event("JsInterpreter.js", 5516, ctx_push(ctx_1021, [{key: "#RETURN_VALUE#", val: _return_2328}]), "return"); + return (_return_2328); + +}; + +var run_stat_throw = function (s, c, e) { + var ctx_1033 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "e", val: e}]); + log_event("JsInterpreter.js", 5526, ctx_1033, "enter"); + var _return_2331 = if_run((function () { + log_event("JsInterpreter.js", 5520, ctx_1033, "call"); + var _return_2329 = run_expr_get_value(s, c, e); + log_event("JsInterpreter.js", 5519, ctx_push(ctx_1033, [{key: "#RETURN_VALUE#", val: _return_2329}]), "return"); + return (_return_2329); }()), function(s1, v1) { + + var ctx_1034 = ctx_push(ctx_1033, [{key: "s1", val: s1}, {key: "v1", val: v1}]); + log_event("JsInterpreter.js", 5524, ctx_1034, "let"); + var _return_2330 = res_ter(s1, + res_throw( + Coq_resvalue_value(v1))); + log_event("JsInterpreter.js", 5521, ctx_push(ctx_1034, [{key: "#RETURN_VALUE#", val: _return_2330}]), "return"); + return (_return_2330); + }); + log_event("JsInterpreter.js", 5525, ctx_push(ctx_1033, [{key: "#RETURN_VALUE#", val: _return_2331}]), "return"); + return (_return_2331); +}; + +var run_stat_return = function (s, c, _foo_) { + var ctx_1035 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "_foo_", val: _foo_}]); + log_event("JsInterpreter.js", 5538, ctx_1035, "enter"); + log_event("JsInterpreter.js", 5537, ctx_1035, "switch"); + switch (_foo_.tag) { + case "Some": + var e = _foo_.value;var ctx_1036 = ctx_push(ctx_1035, [{key: "e", val: e}]); + log_event("JsInterpreter.js", 5534, ctx_1036, "case"); + + var _return_2334 = if_run((function () { + log_event("JsInterpreter.js", 5528, ctx_1036, "call"); + var _return_2332 = run_expr_get_value(s, c, e); + log_event("JsInterpreter.js", 5527, ctx_push(ctx_1036, [{key: "#RETURN_VALUE#", val: _return_2332}]), "return"); + return (_return_2332); }()), function(s1, v1) { + + var ctx_1037 = ctx_push(ctx_1036, [{key: "s1", val: s1}, {key: "v1", val: v1}]); + log_event("JsInterpreter.js", 5532, ctx_1037, "let"); + var _return_2333 = res_ter(s1, + res_return( + Coq_resvalue_value(v1))); + log_event("JsInterpreter.js", 5529, ctx_push(ctx_1037, [{key: "#RETURN_VALUE#", val: _return_2333}]), "return"); + return (_return_2333); + }); + log_event("JsInterpreter.js", 5533, ctx_push(ctx_1036, [{key: "#RETURN_VALUE#", val: _return_2334}]), "return"); + return (_return_2334); + case "None":log_event("JsInterpreter.js", 5536, ctx_1035, "case"); + + var _return_2335 = result_out( + Coq_out_ter(s, + res_return( + Coq_resvalue_value( + Coq_value_prim(Coq_prim_undef()))))); + log_event("JsInterpreter.js", 5535, ctx_push(ctx_1035, [{key: "#RETURN_VALUE#", val: _return_2335}]), "return"); + return (_return_2335); + } + +}; + +var run_stat_for_loop = function (s, c, labs, rv, eo2, eo3, t) { + var ctx_1038 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "labs", val: labs}, {key: "rv", val: rv}, {key: "eo2", val: eo2}, {key: "eo3", val: eo3}, {key: "t", val: t}]); + log_event("JsInterpreter.js", 5605, ctx_1038, "enter"); + var follows = function (s0) { + var ctx_1039 = ctx_push(ctx_1038, [{key: "s0", val: s0}]); + log_event("JsInterpreter.js", 5583, ctx_1039, "enter"); + var _return_2356 = if_ter((function () { + log_event("JsInterpreter.js", 5540, ctx_1039, "call"); + var _return_2336 = run_stat(s0, c, t); + log_event("JsInterpreter.js", 5539, ctx_push(ctx_1039, [{key: "#RETURN_VALUE#", val: _return_2336}]), "return"); + return (_return_2336); }()), function(s1, r) { + + var ctx_1040 = ctx_push(ctx_1039, [{key: "s1", val: s1}, {key: "r", val: r}]); + log_event("JsInterpreter.js", 5581, ctx_1040, "let"); + var _if_arg_2337 = (function () { + log_event("JsInterpreter.js", 5542, ctx_1040, "call"); + var _return_2338 = !( + resvalue_compare( + r.res_value, + Coq_resvalue_empty())); + log_event("JsInterpreter.js", 5541, ctx_push(ctx_1040, [{key: "#RETURN_VALUE#", val: _return_2338}]), "return"); + return (_return_2338); + }()) + ; + log_event("JsInterpreter.js", 5543, ctx_1040, "if"); + if (_if_arg_2337) { + var rv_2 = r.res_value; + } else { + var rv_2 = rv; + } + var ctx_1041 = ctx_push(ctx_1040, [{key: "rv_2", val: rv_2}]); + log_event("JsInterpreter.js", 5578, ctx_1041, "let"); + var loop = function (s2) { + var ctx_1042 = ctx_push(ctx_1041, [{key: "s2", val: s2}]); + log_event("JsInterpreter.js", 5547, ctx_1042, "enter"); + var _return_2340 = (function () { + log_event("JsInterpreter.js", 5545, ctx_1042, "call"); + var _return_2339 = run_stat_for_loop(s2, c, + labs, rv_2, eo2, eo3, t); + log_event("JsInterpreter.js", 5544, ctx_push(ctx_1042, [{key: "#RETURN_VALUE#", val: _return_2339}]), "return"); + return (_return_2339); + }()) + ; + log_event("JsInterpreter.js", 5546, ctx_push(ctx_1042, [{key: "#RETURN_VALUE#", val: _return_2340}]), "return"); + return (_return_2340); + }; + var ctx_1043 = ctx_push(ctx_1041, [{key: "loop", val: loop}]); + log_event("JsInterpreter.js", 5577, ctx_1043, "let"); + var _if_arg_2341 = (function () { + log_event("JsInterpreter.js", 5551, ctx_1043, "call"); + var _return_2343 = (restype_compare(r.res_type, + Coq_restype_break()) + && (function () { + log_event("JsInterpreter.js", 5549, ctx_1043, "call"); + var _return_2342 = + res_label_in(r, labs); + log_event("JsInterpreter.js", 5548, ctx_push(ctx_1043, [{key: "#RETURN_VALUE#", val: _return_2342}]), "return"); + return (_return_2342); }()) + ); + log_event("JsInterpreter.js", 5550, ctx_push(ctx_1043, [{key: "#RETURN_VALUE#", val: _return_2343}]), "return"); + return (_return_2343); + }()) + ; + log_event("JsInterpreter.js", 5576, ctx_1043, "if"); + if (_if_arg_2341) { + var _return_2355 = res_ter(s1, res_normal(rv_2)); + log_event("JsInterpreter.js", 5575, ctx_push(ctx_1043, [{key: "#RETURN_VALUE#", val: _return_2355}]), "return"); + return (_return_2355); + } else { + var _if_arg_2344 = (function () { + log_event("JsInterpreter.js", 5557, ctx_1043, "call"); + var _return_2347 = (restype_compare( + r.res_type, + Coq_restype_normal()) + || (function () { + log_event("JsInterpreter.js", 5555, ctx_1043, "call"); + var _return_2346 = + (restype_compare( + r.res_type, + Coq_restype_continue()) + && (function () { + log_event("JsInterpreter.js", 5553, ctx_1043, "call"); + var _return_2345 = + res_label_in(r, labs); + log_event("JsInterpreter.js", 5552, ctx_push(ctx_1043, [{key: "#RETURN_VALUE#", val: _return_2345}]), "return"); + return (_return_2345); + }())); + log_event("JsInterpreter.js", 5554, ctx_push(ctx_1043, [{key: "#RETURN_VALUE#", val: _return_2346}]), "return"); + return (_return_2346); + }())); + log_event("JsInterpreter.js", 5556, ctx_push(ctx_1043, [{key: "#RETURN_VALUE#", val: _return_2347}]), "return"); + return (_return_2347); + }()) + ; + log_event("JsInterpreter.js", 5574, ctx_1043, "if"); + if (_if_arg_2344) { + log_event("JsInterpreter.js", 5573, ctx_1043, "switch"); + switch (eo3.tag) { + case "Some": + var e3 = eo3.value;var ctx_1044 = ctx_push(ctx_1043, [{key: "e3", val: e3}]); + log_event("JsInterpreter.js", 5568, ctx_1044, "case"); + + var _return_2352 = if_run((function () { + log_event("JsInterpreter.js", 5560, ctx_1044, "call"); + var _return_2349 = + run_expr_get_value( + s1, c, e3); + log_event("JsInterpreter.js", 5559, ctx_push(ctx_1044, [{key: "#RETURN_VALUE#", val: _return_2349}]), "return"); + return (_return_2349); + }()), function(s2, + v3) { + + var ctx_1045 = ctx_push(ctx_1044, [{key: "s2", val: s2}, {key: "v3", val: v3}]); + log_event("JsInterpreter.js", 5566, ctx_1045, "let"); + var _return_2351 = (function () { + log_event("JsInterpreter.js", 5562, ctx_1045, "call"); + var _return_2350 = + loop(s2); + log_event("JsInterpreter.js", 5561, ctx_push(ctx_1045, [{key: "#RETURN_VALUE#", val: _return_2350}]), "return"); + return (_return_2350); + }()) + ; + log_event("JsInterpreter.js", 5563, ctx_push(ctx_1045, [{key: "#RETURN_VALUE#", val: _return_2351}]), "return"); + return (_return_2351); + }); + log_event("JsInterpreter.js", 5567, ctx_push(ctx_1044, [{key: "#RETURN_VALUE#", val: _return_2352}]), "return"); + return (_return_2352); + case "None":log_event("JsInterpreter.js", 5572, ctx_1043, "case"); + + var _return_2354 = (function () { + log_event("JsInterpreter.js", 5570, ctx_1043, "call"); + var _return_2353 = loop(s1); + log_event("JsInterpreter.js", 5569, ctx_push(ctx_1043, [{key: "#RETURN_VALUE#", val: _return_2353}]), "return"); + return (_return_2353); + }()) + ; + log_event("JsInterpreter.js", 5571, ctx_push(ctx_1043, [{key: "#RETURN_VALUE#", val: _return_2354}]), "return"); + return (_return_2354); + } + + } else { + var _return_2348 = res_ter(s1, r); + log_event("JsInterpreter.js", 5558, ctx_push(ctx_1043, [{key: "#RETURN_VALUE#", val: _return_2348}]), "return"); + return (_return_2348); + } + } + + + }); + log_event("JsInterpreter.js", 5582, ctx_push(ctx_1039, [{key: "#RETURN_VALUE#", val: _return_2356}]), "return"); + return (_return_2356); + }; + var ctx_1046 = ctx_push(ctx_1038, [{key: "follows", val: follows}]); + log_event("JsInterpreter.js", 5604, ctx_1046, "let"); + log_event("JsInterpreter.js", 5603, ctx_1046, "switch"); + switch (eo2.tag) { + case "Some": + var e2 = eo2.value;var ctx_1047 = ctx_push(ctx_1046, [{key: "e2", val: e2}]); + log_event("JsInterpreter.js", 5598, ctx_1047, "case"); + + var _return_2362 = if_run((function () { + log_event("JsInterpreter.js", 5585, ctx_1047, "call"); + var _return_2357 = run_expr_get_value(s, c, e2); + log_event("JsInterpreter.js", 5584, ctx_push(ctx_1047, [{key: "#RETURN_VALUE#", val: _return_2357}]), "return"); + return (_return_2357); }()), function(s0, v2) { + + var ctx_1048 = ctx_push(ctx_1047, [{key: "s0", val: s0}, {key: "v2", val: v2}]); + log_event("JsInterpreter.js", 5596, ctx_1048, "let"); + var b = (function () { + log_event("JsInterpreter.js", 5587, ctx_1048, "call"); + var _return_2358 = convert_value_to_boolean( + v2); + log_event("JsInterpreter.js", 5586, ctx_push(ctx_1048, [{key: "#RETURN_VALUE#", val: _return_2358}]), "return"); + return (_return_2358); + }()) + ; + var ctx_1049 = ctx_push(ctx_1048, [{key: "b", val: b}]); + log_event("JsInterpreter.js", 5593, ctx_1049, "let"); + log_event("JsInterpreter.js", 5592, ctx_1049, "if"); + if (b) { + var _return_2361 = (function () { + log_event("JsInterpreter.js", 5590, ctx_1049, "call"); + var _return_2360 = follows(s0); + log_event("JsInterpreter.js", 5589, ctx_push(ctx_1049, [{key: "#RETURN_VALUE#", val: _return_2360}]), "return"); + return (_return_2360); + }()) + ; + log_event("JsInterpreter.js", 5591, ctx_push(ctx_1049, [{key: "#RETURN_VALUE#", val: _return_2361}]), "return"); + return (_return_2361); + } else { + var _return_2359 = res_ter(s0, res_normal(rv)); + log_event("JsInterpreter.js", 5588, ctx_push(ctx_1049, [{key: "#RETURN_VALUE#", val: _return_2359}]), "return"); + return (_return_2359); + } + + }); + log_event("JsInterpreter.js", 5597, ctx_push(ctx_1047, [{key: "#RETURN_VALUE#", val: _return_2362}]), "return"); + return (_return_2362); + case "None":log_event("JsInterpreter.js", 5602, ctx_1046, "case"); + + var _return_2364 = (function () { + log_event("JsInterpreter.js", 5600, ctx_1046, "call"); + var _return_2363 = follows(s); + log_event("JsInterpreter.js", 5599, ctx_push(ctx_1046, [{key: "#RETURN_VALUE#", val: _return_2363}]), "return"); + return (_return_2363); + }()) + ; + log_event("JsInterpreter.js", 5601, ctx_push(ctx_1046, [{key: "#RETURN_VALUE#", val: _return_2364}]), "return"); + return (_return_2364); + } + + +}; + +var run_stat_for = function (s, c, labs, eo1, eo2, eo3, t) { + var ctx_1050 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "labs", val: labs}, {key: "eo1", val: eo1}, {key: "eo2", val: eo2}, {key: "eo3", val: eo3}, {key: "t", val: t}]); + log_event("JsInterpreter.js", 5626, ctx_1050, "enter"); + var follows = function (s0) { + var ctx_1051 = ctx_push(ctx_1050, [{key: "s0", val: s0}]); + log_event("JsInterpreter.js", 5609, ctx_1051, "enter"); + var _return_2366 = (function () { + log_event("JsInterpreter.js", 5607, ctx_1051, "call"); + var _return_2365 = run_stat_for_loop(s0, c, labs, Coq_resvalue_empty(), + eo2, eo3, t); + log_event("JsInterpreter.js", 5606, ctx_push(ctx_1051, [{key: "#RETURN_VALUE#", val: _return_2365}]), "return"); + return (_return_2365); + }()) + ; + log_event("JsInterpreter.js", 5608, ctx_push(ctx_1051, [{key: "#RETURN_VALUE#", val: _return_2366}]), "return"); + return (_return_2366); + }; + var ctx_1052 = ctx_push(ctx_1050, [{key: "follows", val: follows}]); + log_event("JsInterpreter.js", 5625, ctx_1052, "let"); + log_event("JsInterpreter.js", 5624, ctx_1052, "switch"); + switch (eo1.tag) { + case "Some": + var e1 = eo1.value;var ctx_1053 = ctx_push(ctx_1052, [{key: "e1", val: e1}]); + log_event("JsInterpreter.js", 5619, ctx_1053, "case"); + + var _return_2370 = if_run((function () { + log_event("JsInterpreter.js", 5611, ctx_1053, "call"); + var _return_2367 = run_expr_get_value(s, c, e1); + log_event("JsInterpreter.js", 5610, ctx_push(ctx_1053, [{key: "#RETURN_VALUE#", val: _return_2367}]), "return"); + return (_return_2367); }()), function(s0, v1) { + + var ctx_1054 = ctx_push(ctx_1053, [{key: "s0", val: s0}, {key: "v1", val: v1}]); + log_event("JsInterpreter.js", 5617, ctx_1054, "let"); + var _return_2369 = (function () { + log_event("JsInterpreter.js", 5613, ctx_1054, "call"); + var _return_2368 = follows(s0); + log_event("JsInterpreter.js", 5612, ctx_push(ctx_1054, [{key: "#RETURN_VALUE#", val: _return_2368}]), "return"); + return (_return_2368); + }()) + ; + log_event("JsInterpreter.js", 5614, ctx_push(ctx_1054, [{key: "#RETURN_VALUE#", val: _return_2369}]), "return"); + return (_return_2369); + }); + log_event("JsInterpreter.js", 5618, ctx_push(ctx_1053, [{key: "#RETURN_VALUE#", val: _return_2370}]), "return"); + return (_return_2370); + case "None":log_event("JsInterpreter.js", 5623, ctx_1052, "case"); + + var _return_2372 = (function () { + log_event("JsInterpreter.js", 5621, ctx_1052, "call"); + var _return_2371 = follows(s); + log_event("JsInterpreter.js", 5620, ctx_push(ctx_1052, [{key: "#RETURN_VALUE#", val: _return_2371}]), "return"); + return (_return_2371); + }()) + ; + log_event("JsInterpreter.js", 5622, ctx_push(ctx_1052, [{key: "#RETURN_VALUE#", val: _return_2372}]), "return"); + return (_return_2372); + } + + +}; + +var run_stat_for_var = function (s, c, labs, ds, eo2, eo3, t) { + var ctx_1055 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "labs", val: labs}, {key: "ds", val: ds}, {key: "eo2", val: eo2}, {key: "eo3", val: eo3}, {key: "t", val: t}]); + log_event("JsInterpreter.js", 5636, ctx_1055, "enter"); + var _return_2376 = if_ter((function () { + log_event("JsInterpreter.js", 5628, ctx_1055, "call"); + var _return_2373 = run_stat(s, c, + Coq_stat_var_decl(ds)); + log_event("JsInterpreter.js", 5627, ctx_push(ctx_1055, [{key: "#RETURN_VALUE#", val: _return_2373}]), "return"); + return (_return_2373); }()), function(s0, r) { + + var ctx_1056 = ctx_push(ctx_1055, [{key: "s0", val: s0}, {key: "r", val: r}]); + log_event("JsInterpreter.js", 5634, ctx_1056, "let"); + var _return_2375 = (function () { + log_event("JsInterpreter.js", 5630, ctx_1056, "call"); + var _return_2374 = run_stat_for_loop(s0, c, labs, + Coq_resvalue_empty(), eo2, + eo3, t); + log_event("JsInterpreter.js", 5629, ctx_push(ctx_1056, [{key: "#RETURN_VALUE#", val: _return_2374}]), "return"); + return (_return_2374); + }()) + ; + log_event("JsInterpreter.js", 5631, ctx_push(ctx_1056, [{key: "#RETURN_VALUE#", val: _return_2375}]), "return"); + return (_return_2375); + }); + log_event("JsInterpreter.js", 5635, ctx_push(ctx_1055, [{key: "#RETURN_VALUE#", val: _return_2376}]), "return"); + return (_return_2376); +}; + +var run_expr = function (s, c, _term_) { + var ctx_1057 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "_term_", val: _term_}]); + log_event("JsInterpreter.js", 5708, ctx_1057, "enter"); + log_event("JsInterpreter.js", 5707, ctx_1057, "switch"); + switch (_term_.tag) { + case "Coq_expr_this":log_event("JsInterpreter.js", 5638, ctx_1057, "case"); + + var _return_2377 = result_out( + Coq_out_ter(s, + res_val(c.execution_ctx_this_binding))); + log_event("JsInterpreter.js", 5637, ctx_push(ctx_1057, [{key: "#RETURN_VALUE#", val: _return_2377}]), "return"); + return (_return_2377); + case "Coq_expr_identifier": + var x = _term_.name;var ctx_1058 = ctx_push(ctx_1057, [{key: "x", val: x}]); + log_event("JsInterpreter.js", 5646, ctx_1058, "case"); + + var _return_2380 = if_run((function () { + log_event("JsInterpreter.js", 5640, ctx_1058, "call"); + var _return_2378 = identifier_resolution(s, c, + x); + log_event("JsInterpreter.js", 5639, ctx_push(ctx_1058, [{key: "#RETURN_VALUE#", val: _return_2378}]), "return"); + return (_return_2378); }()), function(s0, r) { + + var ctx_1059 = ctx_push(ctx_1058, [{key: "s0", val: s0}, {key: "r", val: r}]); + log_event("JsInterpreter.js", 5644, ctx_1059, "let"); + var _return_2379 = res_ter(s0, res_ref(r)); + log_event("JsInterpreter.js", 5641, ctx_push(ctx_1059, [{key: "#RETURN_VALUE#", val: _return_2379}]), "return"); + return (_return_2379); + }); + log_event("JsInterpreter.js", 5645, ctx_push(ctx_1058, [{key: "#RETURN_VALUE#", val: _return_2380}]), "return"); + return (_return_2380); + case "Coq_expr_literal": + var i = _term_.value;var ctx_1060 = ctx_push(ctx_1057, [{key: "i", val: i}]); + log_event("JsInterpreter.js", 5650, ctx_1060, "case"); + + var _return_2382 = result_out( + Coq_out_ter(s, + res_val( + Coq_value_prim((function () { + log_event("JsInterpreter.js", 5648, ctx_1060, "call"); + var _return_2381 = convert_literal_to_prim( + i); + log_event("JsInterpreter.js", 5647, ctx_push(ctx_1060, [{key: "#RETURN_VALUE#", val: _return_2381}]), "return"); + return (_return_2381); }()))))); + log_event("JsInterpreter.js", 5649, ctx_push(ctx_1060, [{key: "#RETURN_VALUE#", val: _return_2382}]), "return"); + return (_return_2382); + case "Coq_expr_object": + var pds = _term_.fields;var ctx_1061 = ctx_push(ctx_1057, [{key: "pds", val: pds}]); + log_event("JsInterpreter.js", 5660, ctx_1061, "case"); + + var _return_2386 = if_object((function () { + log_event("JsInterpreter.js", 5652, ctx_1061, "call"); + var _return_2383 = run_construct_prealloc(s, c, + Coq_prealloc_object(), + mk_nil()); + log_event("JsInterpreter.js", 5651, ctx_push(ctx_1061, [{key: "#RETURN_VALUE#", val: _return_2383}]), "return"); + return (_return_2383); }()), function(s1, l) { + + var ctx_1062 = ctx_push(ctx_1061, [{key: "s1", val: s1}, {key: "l", val: l}]); + log_event("JsInterpreter.js", 5658, ctx_1062, "let"); + var _return_2385 = (function () { + log_event("JsInterpreter.js", 5654, ctx_1062, "call"); + var _return_2384 = init_object(s1, c, l, pds); + log_event("JsInterpreter.js", 5653, ctx_push(ctx_1062, [{key: "#RETURN_VALUE#", val: _return_2384}]), "return"); + return (_return_2384); + }()) + ; + log_event("JsInterpreter.js", 5655, ctx_push(ctx_1062, [{key: "#RETURN_VALUE#", val: _return_2385}]), "return"); + return (_return_2385); + }); + log_event("JsInterpreter.js", 5659, ctx_push(ctx_1061, [{key: "#RETURN_VALUE#", val: _return_2386}]), "return"); + return (_return_2386); + case "Coq_expr_array": + var oes = _term_.elements;var ctx_1063 = ctx_push(ctx_1057, [{key: "oes", val: oes}]); + log_event("JsInterpreter.js", 5670, ctx_1063, "case"); + + var _return_2390 = if_object((function () { + log_event("JsInterpreter.js", 5662, ctx_1063, "call"); + var _return_2387 = run_construct_prealloc(s, c, + Coq_prealloc_array(), + mk_nil()); + log_event("JsInterpreter.js", 5661, ctx_push(ctx_1063, [{key: "#RETURN_VALUE#", val: _return_2387}]), "return"); + return (_return_2387); }()), function(s1, l) { + + var ctx_1064 = ctx_push(ctx_1063, [{key: "s1", val: s1}, {key: "l", val: l}]); + log_event("JsInterpreter.js", 5668, ctx_1064, "let"); + var _return_2389 = (function () { + log_event("JsInterpreter.js", 5664, ctx_1064, "call"); + var _return_2388 = init_array(s1, c, l, oes); + log_event("JsInterpreter.js", 5663, ctx_push(ctx_1064, [{key: "#RETURN_VALUE#", val: _return_2388}]), "return"); + return (_return_2388); + }()) + ; + log_event("JsInterpreter.js", 5665, ctx_push(ctx_1064, [{key: "#RETURN_VALUE#", val: _return_2389}]), "return"); + return (_return_2389); + }); + log_event("JsInterpreter.js", 5669, ctx_push(ctx_1063, [{key: "#RETURN_VALUE#", val: _return_2390}]), "return"); + return (_return_2390); + case "Coq_expr_function": + var fo = _term_.func_name_opt, args = _term_.arg_names, + bd = _term_.body;var ctx_1065 = ctx_push(ctx_1057, [{key: "fo", val: fo}, {key: "args", val: args}, {key: "bd", val: bd}]); + log_event("JsInterpreter.js", 5674, ctx_1065, "case"); + + var _return_2392 = (function () { + log_event("JsInterpreter.js", 5672, ctx_1065, "call"); + var _return_2391 = run_expr_function(s, c, fo, args, bd); + log_event("JsInterpreter.js", 5671, ctx_push(ctx_1065, [{key: "#RETURN_VALUE#", val: _return_2391}]), "return"); + return (_return_2391); + }()) + ; + log_event("JsInterpreter.js", 5673, ctx_push(ctx_1065, [{key: "#RETURN_VALUE#", val: _return_2392}]), "return"); + return (_return_2392); + case "Coq_expr_access": + var e1 = _term_.obj, e2 = _term_.field;var ctx_1066 = ctx_push(ctx_1057, [{key: "e1", val: e1}, {key: "e2", val: e2}]); + log_event("JsInterpreter.js", 5678, ctx_1066, "case"); + + var _return_2394 = (function () { + log_event("JsInterpreter.js", 5676, ctx_1066, "call"); + var _return_2393 = run_expr_access(s, c, e1, e2); + log_event("JsInterpreter.js", 5675, ctx_push(ctx_1066, [{key: "#RETURN_VALUE#", val: _return_2393}]), "return"); + return (_return_2393); + }()) + ; + log_event("JsInterpreter.js", 5677, ctx_push(ctx_1066, [{key: "#RETURN_VALUE#", val: _return_2394}]), "return"); + return (_return_2394); + case "Coq_expr_member": + var e1 = _term_.obj, f = _term_.field_name;var ctx_1067 = ctx_push(ctx_1057, [{key: "e1", val: e1}, {key: "f", val: f}]); + log_event("JsInterpreter.js", 5682, ctx_1067, "case"); + + var _return_2396 = (function () { + log_event("JsInterpreter.js", 5680, ctx_1067, "call"); + var _return_2395 = run_expr(s, c, + Coq_expr_access(e1, + Coq_expr_literal(Coq_literal_string(f)))); + log_event("JsInterpreter.js", 5679, ctx_push(ctx_1067, [{key: "#RETURN_VALUE#", val: _return_2395}]), "return"); + return (_return_2395); + }()) + ; + log_event("JsInterpreter.js", 5681, ctx_push(ctx_1067, [{key: "#RETURN_VALUE#", val: _return_2396}]), "return"); + return (_return_2396); + case "Coq_expr_new": + var e1 = _term_.func, e2s = _term_.args;var ctx_1068 = ctx_push(ctx_1057, [{key: "e1", val: e1}, {key: "e2s", val: e2s}]); + log_event("JsInterpreter.js", 5686, ctx_1068, "case"); + + var _return_2398 = (function () { + log_event("JsInterpreter.js", 5684, ctx_1068, "call"); + var _return_2397 = run_expr_new(s, c, e1, e2s); + log_event("JsInterpreter.js", 5683, ctx_push(ctx_1068, [{key: "#RETURN_VALUE#", val: _return_2397}]), "return"); + return (_return_2397); + }()) + ; + log_event("JsInterpreter.js", 5685, ctx_push(ctx_1068, [{key: "#RETURN_VALUE#", val: _return_2398}]), "return"); + return (_return_2398); + case "Coq_expr_call": + var e1 = _term_.func, e2s = _term_.args;var ctx_1069 = ctx_push(ctx_1057, [{key: "e1", val: e1}, {key: "e2s", val: e2s}]); + log_event("JsInterpreter.js", 5690, ctx_1069, "case"); + + var _return_2400 = (function () { + log_event("JsInterpreter.js", 5688, ctx_1069, "call"); + var _return_2399 = run_expr_call(s, c, e1, e2s); + log_event("JsInterpreter.js", 5687, ctx_push(ctx_1069, [{key: "#RETURN_VALUE#", val: _return_2399}]), "return"); + return (_return_2399); + }()) + ; + log_event("JsInterpreter.js", 5689, ctx_push(ctx_1069, [{key: "#RETURN_VALUE#", val: _return_2400}]), "return"); + return (_return_2400); + case "Coq_expr_unary_op": + var op = _term_.op, e0 = _term_.arg;var ctx_1070 = ctx_push(ctx_1057, [{key: "op", val: op}, {key: "e0", val: e0}]); + log_event("JsInterpreter.js", 5694, ctx_1070, "case"); + + var _return_2402 = (function () { + log_event("JsInterpreter.js", 5692, ctx_1070, "call"); + var _return_2401 = run_unary_op(s, c, op, e0); + log_event("JsInterpreter.js", 5691, ctx_push(ctx_1070, [{key: "#RETURN_VALUE#", val: _return_2401}]), "return"); + return (_return_2401); + }()) + ; + log_event("JsInterpreter.js", 5693, ctx_push(ctx_1070, [{key: "#RETURN_VALUE#", val: _return_2402}]), "return"); + return (_return_2402); + case "Coq_expr_binary_op": + var e1 = _term_.arg1, op = _term_.op, e2 = _term_.arg2;var ctx_1071 = ctx_push(ctx_1057, [{key: "e1", val: e1}, {key: "op", val: op}, {key: "e2", val: e2}]); + log_event("JsInterpreter.js", 5698, ctx_1071, "case"); + + var _return_2404 = (function () { + log_event("JsInterpreter.js", 5696, ctx_1071, "call"); + var _return_2403 = run_expr_binary_op(s, c, op, e1, e2); + log_event("JsInterpreter.js", 5695, ctx_push(ctx_1071, [{key: "#RETURN_VALUE#", val: _return_2403}]), "return"); + return (_return_2403); + }()) + ; + log_event("JsInterpreter.js", 5697, ctx_push(ctx_1071, [{key: "#RETURN_VALUE#", val: _return_2404}]), "return"); + return (_return_2404); + case "Coq_expr_conditional": + var e1 = _term_.cond, e2 = _term_.then_branch, e3 = _term_.else_branch;var ctx_1072 = ctx_push(ctx_1057, [{key: "e1", val: e1}, {key: "e2", val: e2}, {key: "e3", val: e3}]); + log_event("JsInterpreter.js", 5702, ctx_1072, "case"); + + var _return_2406 = (function () { + log_event("JsInterpreter.js", 5700, ctx_1072, "call"); + var _return_2405 = run_expr_conditionnal(s, c, e1, e2, e3); + log_event("JsInterpreter.js", 5699, ctx_push(ctx_1072, [{key: "#RETURN_VALUE#", val: _return_2405}]), "return"); + return (_return_2405); + }()) + ; + log_event("JsInterpreter.js", 5701, ctx_push(ctx_1072, [{key: "#RETURN_VALUE#", val: _return_2406}]), "return"); + return (_return_2406); + case "Coq_expr_assign": + var e1 = _term_.left_expr, opo = _term_.op_opt, e2 = _term_.right_expr;var ctx_1073 = ctx_push(ctx_1057, [{key: "e1", val: e1}, {key: "opo", val: opo}, {key: "e2", val: e2}]); + log_event("JsInterpreter.js", 5706, ctx_1073, "case"); + + var _return_2408 = (function () { + log_event("JsInterpreter.js", 5704, ctx_1073, "call"); + var _return_2407 = run_expr_assign(s, c, opo, e1, e2); + log_event("JsInterpreter.js", 5703, ctx_push(ctx_1073, [{key: "#RETURN_VALUE#", val: _return_2407}]), "return"); + return (_return_2407); + }()) + ; + log_event("JsInterpreter.js", 5705, ctx_push(ctx_1073, [{key: "#RETURN_VALUE#", val: _return_2408}]), "return"); + return (_return_2408); + } + +}; + +var run_stat = function (s, c, _term_) { + var ctx_1074 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "_term_", val: _term_}]); + log_event("JsInterpreter.js", 5794, ctx_1074, "enter"); + log_event("JsInterpreter.js", 5793, ctx_1074, "switch"); + switch (_term_.tag) { + case "Coq_stat_expr": + var e = _term_.expr;var ctx_1075 = ctx_push(ctx_1074, [{key: "e", val: e}]); + log_event("JsInterpreter.js", 5716, ctx_1075, "case"); + + var _return_2411 = if_run((function () { + log_event("JsInterpreter.js", 5710, ctx_1075, "call"); + var _return_2409 = run_expr_get_value(s, c, e); + log_event("JsInterpreter.js", 5709, ctx_push(ctx_1075, [{key: "#RETURN_VALUE#", val: _return_2409}]), "return"); + return (_return_2409); }()), function(s0, r) { + + var ctx_1076 = ctx_push(ctx_1075, [{key: "s0", val: s0}, {key: "r", val: r}]); + log_event("JsInterpreter.js", 5714, ctx_1076, "let"); + var _return_2410 = res_ter(s0, res_val(r)); + log_event("JsInterpreter.js", 5711, ctx_push(ctx_1076, [{key: "#RETURN_VALUE#", val: _return_2410}]), "return"); + return (_return_2410); + }); + log_event("JsInterpreter.js", 5715, ctx_push(ctx_1075, [{key: "#RETURN_VALUE#", val: _return_2411}]), "return"); + return (_return_2411); + case "Coq_stat_label": + var lab = _term_.label, t0 = _term_.stat;var ctx_1077 = ctx_push(ctx_1074, [{key: "lab", val: lab}, {key: "t0", val: t0}]); + log_event("JsInterpreter.js", 5720, ctx_1077, "case"); + + var _return_2413 = (function () { + log_event("JsInterpreter.js", 5718, ctx_1077, "call"); + var _return_2412 = run_stat_label(s, c, Coq_label_string(lab), t0); + log_event("JsInterpreter.js", 5717, ctx_push(ctx_1077, [{key: "#RETURN_VALUE#", val: _return_2412}]), "return"); + return (_return_2412); + }()) + ; + log_event("JsInterpreter.js", 5719, ctx_push(ctx_1077, [{key: "#RETURN_VALUE#", val: _return_2413}]), "return"); + return (_return_2413); + case "Coq_stat_block": + var ts = _term_.stats;var ctx_1078 = ctx_push(ctx_1074, [{key: "ts", val: ts}]); + log_event("JsInterpreter.js", 5726, ctx_1078, "case"); + + var _return_2416 = (function () { + log_event("JsInterpreter.js", 5724, ctx_1078, "call"); + var _return_2415 = run_block(s, c, (function () { + log_event("JsInterpreter.js", 5722, ctx_1078, "call"); + var _return_2414 = rev(ts); + log_event("JsInterpreter.js", 5721, ctx_push(ctx_1078, [{key: "#RETURN_VALUE#", val: _return_2414}]), "return"); + return (_return_2414); }())); + log_event("JsInterpreter.js", 5723, ctx_push(ctx_1078, [{key: "#RETURN_VALUE#", val: _return_2415}]), "return"); + return (_return_2415); + }()) + ; + log_event("JsInterpreter.js", 5725, ctx_push(ctx_1078, [{key: "#RETURN_VALUE#", val: _return_2416}]), "return"); + return (_return_2416); + case "Coq_stat_var_decl": + var xeos = _term_.decls;var ctx_1079 = ctx_push(ctx_1074, [{key: "xeos", val: xeos}]); + log_event("JsInterpreter.js", 5730, ctx_1079, "case"); + + var _return_2418 = (function () { + log_event("JsInterpreter.js", 5728, ctx_1079, "call"); + var _return_2417 = run_var_decl(s, c, xeos); + log_event("JsInterpreter.js", 5727, ctx_push(ctx_1079, [{key: "#RETURN_VALUE#", val: _return_2417}]), "return"); + return (_return_2417); + }()) + ; + log_event("JsInterpreter.js", 5729, ctx_push(ctx_1079, [{key: "#RETURN_VALUE#", val: _return_2418}]), "return"); + return (_return_2418); + case "Coq_stat_if": + var e1 = _term_.cond, t2 = _term_.then_branch, + to0 = _term_.else_branch;var ctx_1080 = ctx_push(ctx_1074, [{key: "e1", val: e1}, {key: "t2", val: t2}, {key: "to0", val: to0}]); + log_event("JsInterpreter.js", 5734, ctx_1080, "case"); + + var _return_2420 = (function () { + log_event("JsInterpreter.js", 5732, ctx_1080, "call"); + var _return_2419 = run_stat_if(s, c, e1, t2, to0); + log_event("JsInterpreter.js", 5731, ctx_push(ctx_1080, [{key: "#RETURN_VALUE#", val: _return_2419}]), "return"); + return (_return_2419); + }()) + ; + log_event("JsInterpreter.js", 5733, ctx_push(ctx_1080, [{key: "#RETURN_VALUE#", val: _return_2420}]), "return"); + return (_return_2420); + case "Coq_stat_do_while": + var ls = _term_.labels, t1 = _term_.body, e2 = _term_.cond;var ctx_1081 = ctx_push(ctx_1074, [{key: "ls", val: ls}, {key: "t1", val: t1}, {key: "e2", val: e2}]); + log_event("JsInterpreter.js", 5738, ctx_1081, "case"); + + var _return_2422 = (function () { + log_event("JsInterpreter.js", 5736, ctx_1081, "call"); + var _return_2421 = run_stat_do_while(s, c, Coq_resvalue_empty(), ls, + e2, t1); + log_event("JsInterpreter.js", 5735, ctx_push(ctx_1081, [{key: "#RETURN_VALUE#", val: _return_2421}]), "return"); + return (_return_2421); + }()) + ; + log_event("JsInterpreter.js", 5737, ctx_push(ctx_1081, [{key: "#RETURN_VALUE#", val: _return_2422}]), "return"); + return (_return_2422); + case "Coq_stat_while": + var ls = _term_.labels, e1 = _term_.cond, t2 = _term_.body;var ctx_1082 = ctx_push(ctx_1074, [{key: "ls", val: ls}, {key: "e1", val: e1}, {key: "t2", val: t2}]); + log_event("JsInterpreter.js", 5742, ctx_1082, "case"); + + var _return_2424 = (function () { + log_event("JsInterpreter.js", 5740, ctx_1082, "call"); + var _return_2423 = run_stat_while(s, c, Coq_resvalue_empty(), ls, e1, + t2); + log_event("JsInterpreter.js", 5739, ctx_push(ctx_1082, [{key: "#RETURN_VALUE#", val: _return_2423}]), "return"); + return (_return_2423); + }()) + ; + log_event("JsInterpreter.js", 5741, ctx_push(ctx_1082, [{key: "#RETURN_VALUE#", val: _return_2424}]), "return"); + return (_return_2424); + case "Coq_stat_with": + var e1 = _term_.obj, t2 = _term_.stat;var ctx_1083 = ctx_push(ctx_1074, [{key: "e1", val: e1}, {key: "t2", val: t2}]); + log_event("JsInterpreter.js", 5746, ctx_1083, "case"); + + var _return_2426 = (function () { + log_event("JsInterpreter.js", 5744, ctx_1083, "call"); + var _return_2425 = run_stat_with(s, c, e1, t2); + log_event("JsInterpreter.js", 5743, ctx_push(ctx_1083, [{key: "#RETURN_VALUE#", val: _return_2425}]), "return"); + return (_return_2425); + }()) + ; + log_event("JsInterpreter.js", 5745, ctx_push(ctx_1083, [{key: "#RETURN_VALUE#", val: _return_2426}]), "return"); + return (_return_2426); + case "Coq_stat_throw": + var e = _term_.arg;var ctx_1084 = ctx_push(ctx_1074, [{key: "e", val: e}]); + log_event("JsInterpreter.js", 5750, ctx_1084, "case"); + + var _return_2428 = (function () { + log_event("JsInterpreter.js", 5748, ctx_1084, "call"); + var _return_2427 = run_stat_throw(s, c, e); + log_event("JsInterpreter.js", 5747, ctx_push(ctx_1084, [{key: "#RETURN_VALUE#", val: _return_2427}]), "return"); + return (_return_2427); + }()) + ; + log_event("JsInterpreter.js", 5749, ctx_push(ctx_1084, [{key: "#RETURN_VALUE#", val: _return_2428}]), "return"); + return (_return_2428); + case "Coq_stat_return": + var eo = _term_.arg_opt;var ctx_1085 = ctx_push(ctx_1074, [{key: "eo", val: eo}]); + log_event("JsInterpreter.js", 5754, ctx_1085, "case"); + + var _return_2430 = (function () { + log_event("JsInterpreter.js", 5752, ctx_1085, "call"); + var _return_2429 = run_stat_return(s, c, eo); + log_event("JsInterpreter.js", 5751, ctx_push(ctx_1085, [{key: "#RETURN_VALUE#", val: _return_2429}]), "return"); + return (_return_2429); + }()) + ; + log_event("JsInterpreter.js", 5753, ctx_push(ctx_1085, [{key: "#RETURN_VALUE#", val: _return_2430}]), "return"); + return (_return_2430); + case "Coq_stat_break": + var so = _term_.label;var ctx_1086 = ctx_push(ctx_1074, [{key: "so", val: so}]); + log_event("JsInterpreter.js", 5756, ctx_1086, "case"); + + var _return_2431 = result_out(Coq_out_ter(s, res_break(so))); + log_event("JsInterpreter.js", 5755, ctx_push(ctx_1086, [{key: "#RETURN_VALUE#", val: _return_2431}]), "return"); + return (_return_2431); + case "Coq_stat_continue": + var so = _term_.label;var ctx_1087 = ctx_push(ctx_1074, [{key: "so", val: so}]); + log_event("JsInterpreter.js", 5758, ctx_1087, "case"); + + var _return_2432 = result_out(Coq_out_ter(s, res_continue(so))); + log_event("JsInterpreter.js", 5757, ctx_push(ctx_1087, [{key: "#RETURN_VALUE#", val: _return_2432}]), "return"); + return (_return_2432); + case "Coq_stat_try": + var t1 = _term_.body, t2o = _term_.catch_stats_opt, + t3o = _term_.finally_opt;var ctx_1088 = ctx_push(ctx_1074, [{key: "t1", val: t1}, {key: "t2o", val: t2o}, {key: "t3o", val: t3o}]); + log_event("JsInterpreter.js", 5762, ctx_1088, "case"); + + var _return_2434 = (function () { + log_event("JsInterpreter.js", 5760, ctx_1088, "call"); + var _return_2433 = run_stat_try(s, c, t1, t2o, t3o); + log_event("JsInterpreter.js", 5759, ctx_push(ctx_1088, [{key: "#RETURN_VALUE#", val: _return_2433}]), "return"); + return (_return_2433); + }()) + ; + log_event("JsInterpreter.js", 5761, ctx_push(ctx_1088, [{key: "#RETURN_VALUE#", val: _return_2434}]), "return"); + return (_return_2434); + case "Coq_stat_for": + var ls = _term_.labels, eo1 = _term_.init, eo2 = _term_.cond, + eo3 = _term_.step, s0 = _term_.body;var ctx_1089 = ctx_push(ctx_1074, [{key: "ls", val: ls}, {key: "eo1", val: eo1}, {key: "eo2", val: eo2}, {key: "eo3", val: eo3}, {key: "s0", val: s0}]); + log_event("JsInterpreter.js", 5766, ctx_1089, "case"); + + var _return_2436 = (function () { + log_event("JsInterpreter.js", 5764, ctx_1089, "call"); + var _return_2435 = run_stat_for(s, c, ls, eo1, eo2, eo3, s0); + log_event("JsInterpreter.js", 5763, ctx_push(ctx_1089, [{key: "#RETURN_VALUE#", val: _return_2435}]), "return"); + return (_return_2435); + }()) + ; + log_event("JsInterpreter.js", 5765, ctx_push(ctx_1089, [{key: "#RETURN_VALUE#", val: _return_2436}]), "return"); + return (_return_2436); + case "Coq_stat_for_var": + var ls = _term_.labels, ds = _term_.init, eo2 = _term_.cond, + eo3 = _term_.step, s0 = _term_.body;var ctx_1090 = ctx_push(ctx_1074, [{key: "ls", val: ls}, {key: "ds", val: ds}, {key: "eo2", val: eo2}, {key: "eo3", val: eo3}, {key: "s0", val: s0}]); + log_event("JsInterpreter.js", 5770, ctx_1090, "case"); + + var _return_2438 = (function () { + log_event("JsInterpreter.js", 5768, ctx_1090, "call"); + var _return_2437 = run_stat_for_var(s, c, ls, ds, eo2, eo3, s0); + log_event("JsInterpreter.js", 5767, ctx_push(ctx_1090, [{key: "#RETURN_VALUE#", val: _return_2437}]), "return"); + return (_return_2437); + }()) + ; + log_event("JsInterpreter.js", 5769, ctx_push(ctx_1090, [{key: "#RETURN_VALUE#", val: _return_2438}]), "return"); + return (_return_2438); + case "Coq_stat_for_in": + var ls = _term_.labels, e1 = _term_.id, e2 = _term_.obj, + s0 = _term_.body;var ctx_1091 = ctx_push(ctx_1074, [{key: "ls", val: ls}, {key: "e1", val: e1}, {key: "e2", val: e2}, {key: "s0", val: s0}]); + log_event("JsInterpreter.js", 5778, ctx_1091, "case"); + + var _return_2442 = (function () { + log_event("JsInterpreter.js", 5776, ctx_1091, "call"); + var _return_2441 = function (s) { + var ctx_1092 = ctx_push(ctx_1091, [{key: "s", val: s}]); + log_event("JsInterpreter.js", 5774, ctx_1092, "enter"); + (function () { + log_event("JsInterpreter.js", 5773, ctx_1092, "call"); + var _return_2440 = Debug.not_yet_implemented_because( + __LOC__, s); + log_event("JsInterpreter.js", 5772, ctx_push(ctx_1092, [{key: "#RETURN_VALUE#", val: _return_2440}]), "return"); + return (_return_2440); + }()) + ; + var _return_2439 = Coq_result_not_yet_implemented( + ); + log_event("JsInterpreter.js", 5771, ctx_push(ctx_1092, [{key: "#RETURN_VALUE#", val: _return_2439}]), "return"); + return (_return_2439); }("stat_for_in"); + log_event("JsInterpreter.js", 5775, ctx_push(ctx_1091, [{key: "#RETURN_VALUE#", val: _return_2441}]), "return"); + return (_return_2441); + }()) + ; + log_event("JsInterpreter.js", 5777, ctx_push(ctx_1091, [{key: "#RETURN_VALUE#", val: _return_2442}]), "return"); + return (_return_2442); + case "Coq_stat_for_in_var": + var ls = _term_.labels, x = _term_.id, e1o = _term_.init, + e2 = _term_.obj, s0 = _term_.body;var ctx_1093 = ctx_push(ctx_1074, [{key: "ls", val: ls}, {key: "x", val: x}, {key: "e1o", val: e1o}, {key: "e2", val: e2}, {key: "s0", val: s0}]); + log_event("JsInterpreter.js", 5786, ctx_1093, "case"); + + var _return_2446 = (function () { + log_event("JsInterpreter.js", 5784, ctx_1093, "call"); + var _return_2445 = function (s) { + var ctx_1094 = ctx_push(ctx_1093, [{key: "s", val: s}]); + log_event("JsInterpreter.js", 5782, ctx_1094, "enter"); + (function () { + log_event("JsInterpreter.js", 5781, ctx_1094, "call"); + var _return_2444 = Debug.not_yet_implemented_because( + __LOC__, s); + log_event("JsInterpreter.js", 5780, ctx_push(ctx_1094, [{key: "#RETURN_VALUE#", val: _return_2444}]), "return"); + return (_return_2444); + }()) + ; + var _return_2443 = Coq_result_not_yet_implemented( + ); + log_event("JsInterpreter.js", 5779, ctx_push(ctx_1094, [{key: "#RETURN_VALUE#", val: _return_2443}]), "return"); + return (_return_2443); }("stat_for_in_var"); + log_event("JsInterpreter.js", 5783, ctx_push(ctx_1093, [{key: "#RETURN_VALUE#", val: _return_2445}]), "return"); + return (_return_2445); + }()) + ; + log_event("JsInterpreter.js", 5785, ctx_push(ctx_1093, [{key: "#RETURN_VALUE#", val: _return_2446}]), "return"); + return (_return_2446); + case "Coq_stat_debugger":log_event("JsInterpreter.js", 5788, ctx_1074, "case"); + + var _return_2447 = result_out(Coq_out_ter(s, res_empty)); + log_event("JsInterpreter.js", 5787, ctx_push(ctx_1074, [{key: "#RETURN_VALUE#", val: _return_2447}]), "return"); + return (_return_2447); + case "Coq_stat_switch": + var labs = _term_.labels, e = _term_.arg, sb = _term_.body;var ctx_1095 = ctx_push(ctx_1074, [{key: "labs", val: labs}, {key: "e", val: e}, {key: "sb", val: sb}]); + log_event("JsInterpreter.js", 5792, ctx_1095, "case"); + + var _return_2449 = (function () { + log_event("JsInterpreter.js", 5790, ctx_1095, "call"); + var _return_2448 = run_stat_switch(s, c, labs, e, sb); + log_event("JsInterpreter.js", 5789, ctx_push(ctx_1095, [{key: "#RETURN_VALUE#", val: _return_2448}]), "return"); + return (_return_2448); + }()) + ; + log_event("JsInterpreter.js", 5791, ctx_push(ctx_1095, [{key: "#RETURN_VALUE#", val: _return_2449}]), "return"); + return (_return_2449); + } + +}; + +var run_elements = function (s, c, _foo_) { + var ctx_1096 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "_foo_", val: _foo_}]); + log_event("JsInterpreter.js", 5819, ctx_1096, "enter"); + log_event("JsInterpreter.js", 5818, ctx_1096, "switch"); + switch (_foo_.tag) { + case "[]":log_event("JsInterpreter.js", 5796, ctx_1096, "case"); + + var _return_2450 = result_out( + Coq_out_ter(s, res_normal(Coq_resvalue_empty()))); + log_event("JsInterpreter.js", 5795, ctx_push(ctx_1096, [{key: "#RETURN_VALUE#", val: _return_2450}]), "return"); + return (_return_2450); + case "::": + var el = _foo_.head, els_rev_2 = _foo_.tail;var ctx_1097 = ctx_push(ctx_1096, [{key: "el", val: el}, {key: "els_rev_2", val: els_rev_2}]); + log_event("JsInterpreter.js", 5817, ctx_1097, "case"); + + var _return_2457 = if_success((function () { + log_event("JsInterpreter.js", 5798, ctx_1097, "call"); + var _return_2451 = run_elements(s, c, els_rev_2); + log_event("JsInterpreter.js", 5797, ctx_push(ctx_1097, [{key: "#RETURN_VALUE#", val: _return_2451}]), "return"); + return (_return_2451); }()), function(s0, rv0) { + + var ctx_1098 = ctx_push(ctx_1097, [{key: "s0", val: s0}, {key: "rv0", val: rv0}]); + log_event("JsInterpreter.js", 5815, ctx_1098, "let"); + log_event("JsInterpreter.js", 5812, ctx_1098, "switch"); + switch (el.tag) { + case "Coq_element_stat": + var t = el.stat;var ctx_1099 = ctx_push(ctx_1098, [{key: "t", val: t}]); + log_event("JsInterpreter.js", 5809, ctx_1099, "case"); + + var _return_2455 = if_ter((function () { + log_event("JsInterpreter.js", 5800, ctx_1099, "call"); + var _return_2452 = + run_stat(s0, c, t); + log_event("JsInterpreter.js", 5799, ctx_push(ctx_1099, [{key: "#RETURN_VALUE#", val: _return_2452}]), "return"); + return (_return_2452); + }()), function(s1, + r1) { + + var ctx_1100 = ctx_push(ctx_1099, [{key: "s1", val: s1}, {key: "r1", val: r1}]); + log_event("JsInterpreter.js", 5807, ctx_1100, "let"); + var r2 = (function () { + log_event("JsInterpreter.js", 5802, ctx_1100, "call"); + var _return_2453 = + res_overwrite_value_if_empty( + rv0, r1); + log_event("JsInterpreter.js", 5801, ctx_push(ctx_1100, [{key: "#RETURN_VALUE#", val: _return_2453}]), "return"); + return (_return_2453); + }()) + ; + var ctx_1101 = ctx_push(ctx_1100, [{key: "r2", val: r2}]); + log_event("JsInterpreter.js", 5804, ctx_1101, "let"); + var _return_2454 = + res_out( + Coq_out_ter(s1, r2)); + log_event("JsInterpreter.js", 5803, ctx_push(ctx_1101, [{key: "#RETURN_VALUE#", val: _return_2454}]), "return"); + return (_return_2454); + + }); + log_event("JsInterpreter.js", 5808, ctx_push(ctx_1099, [{key: "#RETURN_VALUE#", val: _return_2455}]), "return"); + return (_return_2455); + case "Coq_element_func_decl": + var name = el.func_name, + args = el.arg_names, bd = el.body;var ctx_1102 = ctx_push(ctx_1098, [{key: "name", val: name}, {key: "args", val: args}, {key: "bd", val: bd}]); + log_event("JsInterpreter.js", 5811, ctx_1102, "case"); + + var _return_2456 = res_ter(s0, + res_normal(rv0)); + log_event("JsInterpreter.js", 5810, ctx_push(ctx_1102, [{key: "#RETURN_VALUE#", val: _return_2456}]), "return"); + return (_return_2456); + } + + }); + log_event("JsInterpreter.js", 5816, ctx_push(ctx_1097, [{key: "#RETURN_VALUE#", val: _return_2457}]), "return"); + return (_return_2457); + } + +}; + +var run_prog = function (s, c, _term_) { + var ctx_1103 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "_term_", val: _term_}]); + log_event("JsInterpreter.js", 5827, ctx_1103, "enter"); + log_event("JsInterpreter.js", 5826, ctx_1103, "switch"); + switch (_term_.tag) { + case "Coq_prog_intro": + var str = _term_.strictness, els = _term_.elements;var ctx_1104 = ctx_push(ctx_1103, [{key: "str", val: str}, {key: "els", val: els}]); + log_event("JsInterpreter.js", 5825, ctx_1104, "case"); + + var _return_2460 = (function () { + log_event("JsInterpreter.js", 5823, ctx_1104, "call"); + var _return_2459 = run_elements(s, c, (function () { + log_event("JsInterpreter.js", 5821, ctx_1104, "call"); + var _return_2458 = rev(els); + log_event("JsInterpreter.js", 5820, ctx_push(ctx_1104, [{key: "#RETURN_VALUE#", val: _return_2458}]), "return"); + return (_return_2458); }())); + log_event("JsInterpreter.js", 5822, ctx_push(ctx_1104, [{key: "#RETURN_VALUE#", val: _return_2459}]), "return"); + return (_return_2459); + }()) + ; + log_event("JsInterpreter.js", 5824, ctx_push(ctx_1104, [{key: "#RETURN_VALUE#", val: _return_2460}]), "return"); + return (_return_2460); + } + +}; + +var push = function (s, c, l, args, ilen) { + var ctx_1105 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "l", val: l}, {key: "args", val: args}, {key: "ilen", val: ilen}]); + log_event("JsInterpreter.js", 5856, ctx_1105, "enter"); + var vlen = ilen; + var ctx_1106 = ctx_push(ctx_1105, [{key: "vlen", val: vlen}]); + log_event("JsInterpreter.js", 5855, ctx_1106, "let"); + log_event("JsInterpreter.js", 5854, ctx_1106, "switch"); + switch (args.tag) { + case "[]":log_event("JsInterpreter.js", 5835, ctx_1106, "case"); + + var _return_2463 = if_not_throw((function () { + log_event("JsInterpreter.js", 5829, ctx_1106, "call"); + var _return_2461 = object_put(s, c, l, "length", + Coq_value_prim( + Coq_prim_number(vlen)), + throw_true); + log_event("JsInterpreter.js", 5828, ctx_push(ctx_1106, [{key: "#RETURN_VALUE#", val: _return_2461}]), "return"); + return (_return_2461); }()), function(s0, x) { + + var ctx_1107 = ctx_push(ctx_1106, [{key: "s0", val: s0}, {key: "x", val: x}]); + log_event("JsInterpreter.js", 5833, ctx_1107, "let"); + var _return_2462 = result_out( + Coq_out_ter(s0, + res_val( + Coq_value_prim( + Coq_prim_number(vlen))))); + log_event("JsInterpreter.js", 5830, ctx_push(ctx_1107, [{key: "#RETURN_VALUE#", val: _return_2462}]), "return"); + return (_return_2462); + }); + log_event("JsInterpreter.js", 5834, ctx_push(ctx_1106, [{key: "#RETURN_VALUE#", val: _return_2463}]), "return"); + return (_return_2463); + case "::": + var v = args.head, vs = args.tail;var ctx_1108 = ctx_push(ctx_1106, [{key: "v", val: v}, {key: "vs", val: vs}]); + log_event("JsInterpreter.js", 5853, ctx_1108, "case"); + + var _return_2470 = if_string((function () { + log_event("JsInterpreter.js", 5837, ctx_1108, "call"); + var _return_2464 = to_string(s, c, + Coq_value_prim( + Coq_prim_number(vlen))); + log_event("JsInterpreter.js", 5836, ctx_push(ctx_1108, [{key: "#RETURN_VALUE#", val: _return_2464}]), "return"); + return (_return_2464); }()), function(s0, + slen) { + + var ctx_1109 = ctx_push(ctx_1108, [{key: "s0", val: s0}, {key: "slen", val: slen}]); + log_event("JsInterpreter.js", 5851, ctx_1109, "let"); + var _return_2469 = if_not_throw((function () { + log_event("JsInterpreter.js", 5839, ctx_1109, "call"); + var _return_2465 = + object_put(s0, c, l, + slen, v, throw_true); + log_event("JsInterpreter.js", 5838, ctx_push(ctx_1109, [{key: "#RETURN_VALUE#", val: _return_2465}]), "return"); + return (_return_2465); + }()), function(s1, x) { + + var ctx_1110 = ctx_push(ctx_1109, [{key: "s1", val: s1}, {key: "x", val: x}]); + log_event("JsInterpreter.js", 5847, ctx_1110, "let"); + var _return_2468 = (function () { + log_event("JsInterpreter.js", 5843, ctx_1110, "call"); + var _return_2467 = + push(s1, c, l, vs, + (function () { + log_event("JsInterpreter.js", 5841, ctx_1110, "call"); + var _return_2466 = + (ilen + 1.); + log_event("JsInterpreter.js", 5840, ctx_push(ctx_1110, [{key: "#RETURN_VALUE#", val: _return_2466}]), "return"); + return (_return_2466); + }())); + log_event("JsInterpreter.js", 5842, ctx_push(ctx_1110, [{key: "#RETURN_VALUE#", val: _return_2467}]), "return"); + return (_return_2467); + }()) + ; + log_event("JsInterpreter.js", 5844, ctx_push(ctx_1110, [{key: "#RETURN_VALUE#", val: _return_2468}]), "return"); + return (_return_2468); + }); + log_event("JsInterpreter.js", 5848, ctx_push(ctx_1109, [{key: "#RETURN_VALUE#", val: _return_2469}]), "return"); + return (_return_2469); + }); + log_event("JsInterpreter.js", 5852, ctx_push(ctx_1108, [{key: "#RETURN_VALUE#", val: _return_2470}]), "return"); + return (_return_2470); + } + + +}; + +var run_object_is_sealed = function (s, c, l, _foo_) { + var ctx_1111 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "l", val: l}, {key: "_foo_", val: _foo_}]); + log_event("JsInterpreter.js", 5892, ctx_1111, "enter"); + log_event("JsInterpreter.js", 5891, ctx_1111, "switch"); + switch (_foo_.tag) { + case "[]":log_event("JsInterpreter.js", 5866, ctx_1111, "case"); + + var _return_2474 = if_some((function () { + log_event("JsInterpreter.js", 5858, ctx_1111, "call"); + var _return_2471 = run_object_method( + object_extensible_, s, l); + log_event("JsInterpreter.js", 5857, ctx_push(ctx_1111, [{key: "#RETURN_VALUE#", val: _return_2471}]), "return"); + return (_return_2471); }()), function(ext) { + + var ctx_1112 = ctx_push(ctx_1111, [{key: "ext", val: ext}]); + log_event("JsInterpreter.js", 5864, ctx_1112, "let"); + var _return_2473 = res_ter(s, + res_val( + Coq_value_prim( + Coq_prim_bool( + (function () { + log_event("JsInterpreter.js", 5860, ctx_1112, "call"); + var _return_2472 = + !(ext); + log_event("JsInterpreter.js", 5859, ctx_push(ctx_1112, [{key: "#RETURN_VALUE#", val: _return_2472}]), "return"); + return (_return_2472); + }()))))); + log_event("JsInterpreter.js", 5861, ctx_push(ctx_1112, [{key: "#RETURN_VALUE#", val: _return_2473}]), "return"); + return (_return_2473); + }); + log_event("JsInterpreter.js", 5865, ctx_push(ctx_1111, [{key: "#RETURN_VALUE#", val: _return_2474}]), "return"); + return (_return_2474); + case "::": + var x = _foo_.head, xs_2 = _foo_.tail;var ctx_1113 = ctx_push(ctx_1111, [{key: "x", val: x}, {key: "xs_2", val: xs_2}]); + log_event("JsInterpreter.js", 5890, ctx_1113, "case"); + + var _return_2485 = if_run((function () { + log_event("JsInterpreter.js", 5868, ctx_1113, "call"); + var _return_2475 = run_object_get_own_prop(s, c, + l, x); + log_event("JsInterpreter.js", 5867, ctx_push(ctx_1113, [{key: "#RETURN_VALUE#", val: _return_2475}]), "return"); + return (_return_2475); }()), function(s0, d) { + + var ctx_1114 = ctx_push(ctx_1113, [{key: "s0", val: s0}, {key: "d", val: d}]); + log_event("JsInterpreter.js", 5888, ctx_1114, "let"); + log_event("JsInterpreter.js", 5885, ctx_1114, "switch"); + switch (d.tag) { + case "Coq_full_descriptor_undef":log_event("JsInterpreter.js", 5876, ctx_1114, "case"); + + var _return_2479 = (function () { + log_event("JsInterpreter.js", 5874, ctx_1114, "call"); + var _return_2478 = function (s, m) { + var ctx_1115 = ctx_push(ctx_1114, [{key: "s", val: s}, {key: "m", val: m}]); + log_event("JsInterpreter.js", 5872, ctx_1115, "enter"); + (function () { + log_event("JsInterpreter.js", 5871, ctx_1115, "call"); + var _return_2477 = + Debug.impossible_with_heap_because( + __LOC__, s, m); + log_event("JsInterpreter.js", 5870, ctx_push(ctx_1115, [{key: "#RETURN_VALUE#", val: _return_2477}]), "return"); + return (_return_2477); + }()) + ; + var _return_2476 = + Coq_result_impossible( + ); + log_event("JsInterpreter.js", 5869, ctx_push(ctx_1115, [{key: "#RETURN_VALUE#", val: _return_2476}]), "return"); + return (_return_2476); + }(s0, + "[run_object_is_sealed]: Undefined descriptor found in a place where it shouldn't."); + log_event("JsInterpreter.js", 5873, ctx_push(ctx_1114, [{key: "#RETURN_VALUE#", val: _return_2478}]), "return"); + return (_return_2478); + }()) + ; + log_event("JsInterpreter.js", 5875, ctx_push(ctx_1114, [{key: "#RETURN_VALUE#", val: _return_2479}]), "return"); + return (_return_2479); + case "Coq_full_descriptor_some": + var a = d.value;var ctx_1116 = ctx_push(ctx_1114, [{key: "a", val: a}]); + log_event("JsInterpreter.js", 5884, ctx_1116, "case"); + + var _if_arg_2480 = (function () { + log_event("JsInterpreter.js", 5878, ctx_1116, "call"); + var _return_2481 = attributes_configurable( + a); + log_event("JsInterpreter.js", 5877, ctx_push(ctx_1116, [{key: "#RETURN_VALUE#", val: _return_2481}]), "return"); + return (_return_2481); + }()) + ; + log_event("JsInterpreter.js", 5883, ctx_1116, "if"); + if (_if_arg_2480) { + var _return_2484 = res_ter(s0, + res_val( + Coq_value_prim( + Coq_prim_bool( + false)))); + log_event("JsInterpreter.js", 5882, ctx_push(ctx_1116, [{key: "#RETURN_VALUE#", val: _return_2484}]), "return"); + return (_return_2484); + } else { + var _return_2483 = (function () { + log_event("JsInterpreter.js", 5880, ctx_1116, "call"); + var _return_2482 = run_object_is_sealed( + s0, c, l, xs_2); + log_event("JsInterpreter.js", 5879, ctx_push(ctx_1116, [{key: "#RETURN_VALUE#", val: _return_2482}]), "return"); + return (_return_2482); + }()) + ; + log_event("JsInterpreter.js", 5881, ctx_push(ctx_1116, [{key: "#RETURN_VALUE#", val: _return_2483}]), "return"); + return (_return_2483); + } + } + + }); + log_event("JsInterpreter.js", 5889, ctx_push(ctx_1113, [{key: "#RETURN_VALUE#", val: _return_2485}]), "return"); + return (_return_2485); + } + +}; + +var run_object_seal = function (s, c, l, _foo_) { + var ctx_1117 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "l", val: l}, {key: "_foo_", val: _foo_}]); + log_event("JsInterpreter.js", 5937, ctx_1117, "enter"); + log_event("JsInterpreter.js", 5936, ctx_1117, "switch"); + switch (_foo_.tag) { + case "[]":log_event("JsInterpreter.js", 5900, ctx_1117, "case"); + + var _return_2488 = if_some((function () { + log_event("JsInterpreter.js", 5894, ctx_1117, "call"); + var _return_2486 = run_object_heap_set_extensible( + false, s, l); + log_event("JsInterpreter.js", 5893, ctx_push(ctx_1117, [{key: "#RETURN_VALUE#", val: _return_2486}]), "return"); + return (_return_2486); }()), function(s0) { + + var ctx_1118 = ctx_push(ctx_1117, [{key: "s0", val: s0}]); + log_event("JsInterpreter.js", 5898, ctx_1118, "let"); + var _return_2487 = res_ter(s0, + res_val( + Coq_value_object(l))); + log_event("JsInterpreter.js", 5895, ctx_push(ctx_1118, [{key: "#RETURN_VALUE#", val: _return_2487}]), "return"); + return (_return_2487); + }); + log_event("JsInterpreter.js", 5899, ctx_push(ctx_1117, [{key: "#RETURN_VALUE#", val: _return_2488}]), "return"); + return (_return_2488); + case "::": + var x = _foo_.head, xs_2 = _foo_.tail;var ctx_1119 = ctx_push(ctx_1117, [{key: "x", val: x}, {key: "xs_2", val: xs_2}]); + log_event("JsInterpreter.js", 5935, ctx_1119, "case"); + + var _return_2502 = if_run((function () { + log_event("JsInterpreter.js", 5902, ctx_1119, "call"); + var _return_2489 = run_object_get_own_prop(s, c, + l, x); + log_event("JsInterpreter.js", 5901, ctx_push(ctx_1119, [{key: "#RETURN_VALUE#", val: _return_2489}]), "return"); + return (_return_2489); }()), function(s0, d) { + + var ctx_1120 = ctx_push(ctx_1119, [{key: "s0", val: s0}, {key: "d", val: d}]); + log_event("JsInterpreter.js", 5933, ctx_1120, "let"); + log_event("JsInterpreter.js", 5930, ctx_1120, "switch"); + switch (d.tag) { + case "Coq_full_descriptor_undef":log_event("JsInterpreter.js", 5910, ctx_1120, "case"); + + var _return_2493 = (function () { + log_event("JsInterpreter.js", 5908, ctx_1120, "call"); + var _return_2492 = function (s, m) { + var ctx_1121 = ctx_push(ctx_1120, [{key: "s", val: s}, {key: "m", val: m}]); + log_event("JsInterpreter.js", 5906, ctx_1121, "enter"); + (function () { + log_event("JsInterpreter.js", 5905, ctx_1121, "call"); + var _return_2491 = + Debug.impossible_with_heap_because( + __LOC__, s, m); + log_event("JsInterpreter.js", 5904, ctx_push(ctx_1121, [{key: "#RETURN_VALUE#", val: _return_2491}]), "return"); + return (_return_2491); + }()) + ; + var _return_2490 = + Coq_result_impossible( + ); + log_event("JsInterpreter.js", 5903, ctx_push(ctx_1121, [{key: "#RETURN_VALUE#", val: _return_2490}]), "return"); + return (_return_2490); + }(s0, + "[run_object_seal]: Undefined descriptor found in a place where it shouldn't."); + log_event("JsInterpreter.js", 5907, ctx_push(ctx_1120, [{key: "#RETURN_VALUE#", val: _return_2492}]), "return"); + return (_return_2492); + }()) + ; + log_event("JsInterpreter.js", 5909, ctx_push(ctx_1120, [{key: "#RETURN_VALUE#", val: _return_2493}]), "return"); + return (_return_2493); + case "Coq_full_descriptor_some": + var a = d.value;var ctx_1122 = ctx_push(ctx_1120, [{key: "a", val: a}]); + log_event("JsInterpreter.js", 5929, ctx_1122, "case"); + + var _if_arg_2494 = (function () { + log_event("JsInterpreter.js", 5912, ctx_1122, "call"); + var _return_2495 = attributes_configurable( + a); + log_event("JsInterpreter.js", 5911, ctx_push(ctx_1122, [{key: "#RETURN_VALUE#", val: _return_2495}]), "return"); + return (_return_2495); + }()) + ; + log_event("JsInterpreter.js", 5916, ctx_1122, "if"); + if (_if_arg_2494) { + var desc = { + descriptor_value: None(), + descriptor_writable: None(), + descriptor_get: None(), + descriptor_set: None(), + descriptor_enumerable: None(), + descriptor_configurable: Some(false) + }; + var ctx_1123 = ctx_push(ctx_1122, [{key: "desc", val: desc}]); + log_event("JsInterpreter.js", 5915, ctx_1123, "let"); + var a_2 = (function () { + log_event("JsInterpreter.js", 5914, ctx_1123, "call"); + var _return_2496 = attributes_update(a, + desc); + log_event("JsInterpreter.js", 5913, ctx_push(ctx_1123, [{key: "#RETURN_VALUE#", val: _return_2496}]), "return"); + return (_return_2496); + }()) + ; + + } else { + var a_2 = a; + } + var ctx_1124 = ctx_push(ctx_1122, [{key: "a_2", val: a_2}]); + log_event("JsInterpreter.js", 5928, ctx_1124, "let"); + var _return_2501 = if_bool((function () { + log_event("JsInterpreter.js", 5920, ctx_1124, "call"); + var _return_2498 = + object_define_own_prop( + s0, c, l, x, + (function () { + log_event("JsInterpreter.js", 5918, ctx_1124, "call"); + var _return_2497 = + descriptor_of_attributes( + a_2); + log_event("JsInterpreter.js", 5917, ctx_push(ctx_1124, [{key: "#RETURN_VALUE#", val: _return_2497}]), "return"); + return (_return_2497); + }()), true); + log_event("JsInterpreter.js", 5919, ctx_push(ctx_1124, [{key: "#RETURN_VALUE#", val: _return_2498}]), "return"); + return (_return_2498); + }()), function(s1, + x0) { + + var ctx_1125 = ctx_push(ctx_1124, [{key: "s1", val: s1}, {key: "x0", val: x0}]); + log_event("JsInterpreter.js", 5926, ctx_1125, "let"); + var _return_2500 = (function () { + log_event("JsInterpreter.js", 5922, ctx_1125, "call"); + var _return_2499 = + run_object_seal(s1, + c, l, xs_2); + log_event("JsInterpreter.js", 5921, ctx_push(ctx_1125, [{key: "#RETURN_VALUE#", val: _return_2499}]), "return"); + return (_return_2499); + }()) + ; + log_event("JsInterpreter.js", 5923, ctx_push(ctx_1125, [{key: "#RETURN_VALUE#", val: _return_2500}]), "return"); + return (_return_2500); + }); + log_event("JsInterpreter.js", 5927, ctx_push(ctx_1124, [{key: "#RETURN_VALUE#", val: _return_2501}]), "return"); + return (_return_2501); + + } + + }); + log_event("JsInterpreter.js", 5934, ctx_push(ctx_1119, [{key: "#RETURN_VALUE#", val: _return_2502}]), "return"); + return (_return_2502); + } + +}; + +var run_object_freeze = function (s, c, l, _foo_) { + var ctx_1126 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "l", val: l}, {key: "_foo_", val: _foo_}]); + log_event("JsInterpreter.js", 5993, ctx_1126, "enter"); + log_event("JsInterpreter.js", 5992, ctx_1126, "switch"); + switch (_foo_.tag) { + case "[]":log_event("JsInterpreter.js", 5945, ctx_1126, "case"); + + var _return_2505 = if_some((function () { + log_event("JsInterpreter.js", 5939, ctx_1126, "call"); + var _return_2503 = run_object_heap_set_extensible( + false, s, l); + log_event("JsInterpreter.js", 5938, ctx_push(ctx_1126, [{key: "#RETURN_VALUE#", val: _return_2503}]), "return"); + return (_return_2503); }()), function(s0) { + + var ctx_1127 = ctx_push(ctx_1126, [{key: "s0", val: s0}]); + log_event("JsInterpreter.js", 5943, ctx_1127, "let"); + var _return_2504 = res_ter(s0, + res_val( + Coq_value_object(l))); + log_event("JsInterpreter.js", 5940, ctx_push(ctx_1127, [{key: "#RETURN_VALUE#", val: _return_2504}]), "return"); + return (_return_2504); + }); + log_event("JsInterpreter.js", 5944, ctx_push(ctx_1126, [{key: "#RETURN_VALUE#", val: _return_2505}]), "return"); + return (_return_2505); + case "::": + var x = _foo_.head, xs_2 = _foo_.tail;var ctx_1128 = ctx_push(ctx_1126, [{key: "x", val: x}, {key: "xs_2", val: xs_2}]); + log_event("JsInterpreter.js", 5991, ctx_1128, "case"); + + var _return_2524 = if_run((function () { + log_event("JsInterpreter.js", 5947, ctx_1128, "call"); + var _return_2506 = run_object_get_own_prop(s, c, + l, x); + log_event("JsInterpreter.js", 5946, ctx_push(ctx_1128, [{key: "#RETURN_VALUE#", val: _return_2506}]), "return"); + return (_return_2506); }()), function(s0, d) { + + var ctx_1129 = ctx_push(ctx_1128, [{key: "s0", val: s0}, {key: "d", val: d}]); + log_event("JsInterpreter.js", 5989, ctx_1129, "let"); + log_event("JsInterpreter.js", 5986, ctx_1129, "switch"); + switch (d.tag) { + case "Coq_full_descriptor_undef":log_event("JsInterpreter.js", 5955, ctx_1129, "case"); + + var _return_2510 = (function () { + log_event("JsInterpreter.js", 5953, ctx_1129, "call"); + var _return_2509 = function (s, m) { + var ctx_1130 = ctx_push(ctx_1129, [{key: "s", val: s}, {key: "m", val: m}]); + log_event("JsInterpreter.js", 5951, ctx_1130, "enter"); + (function () { + log_event("JsInterpreter.js", 5950, ctx_1130, "call"); + var _return_2508 = + Debug.impossible_with_heap_because( + __LOC__, s, m); + log_event("JsInterpreter.js", 5949, ctx_push(ctx_1130, [{key: "#RETURN_VALUE#", val: _return_2508}]), "return"); + return (_return_2508); + }()) + ; + var _return_2507 = + Coq_result_impossible( + ); + log_event("JsInterpreter.js", 5948, ctx_push(ctx_1130, [{key: "#RETURN_VALUE#", val: _return_2507}]), "return"); + return (_return_2507); + }(s0, + "[run_object_freeze]: Undefined descriptor found in a place where it shouldn't."); + log_event("JsInterpreter.js", 5952, ctx_push(ctx_1129, [{key: "#RETURN_VALUE#", val: _return_2509}]), "return"); + return (_return_2509); + }()) + ; + log_event("JsInterpreter.js", 5954, ctx_push(ctx_1129, [{key: "#RETURN_VALUE#", val: _return_2510}]), "return"); + return (_return_2510); + case "Coq_full_descriptor_some": + var a = d.value;var ctx_1131 = ctx_push(ctx_1129, [{key: "a", val: a}]); + log_event("JsInterpreter.js", 5985, ctx_1131, "case"); + + var _if_arg_2511 = (function () { + log_event("JsInterpreter.js", 5961, ctx_1131, "call"); + var _return_2514 = ((function () { + log_event("JsInterpreter.js", 5957, ctx_1131, "call"); + var _return_2512 = + attributes_is_data_dec( + a); + log_event("JsInterpreter.js", 5956, ctx_push(ctx_1131, [{key: "#RETURN_VALUE#", val: _return_2512}]), "return"); + return (_return_2512); + }()) && (function () { + log_event("JsInterpreter.js", 5959, ctx_1131, "call"); + var _return_2513 = + attributes_writable( + a); + log_event("JsInterpreter.js", 5958, ctx_push(ctx_1131, [{key: "#RETURN_VALUE#", val: _return_2513}]), "return"); + return (_return_2513); + }())); + log_event("JsInterpreter.js", 5960, ctx_push(ctx_1131, [{key: "#RETURN_VALUE#", val: _return_2514}]), "return"); + return (_return_2514); + }()) + ; + log_event("JsInterpreter.js", 5965, ctx_1131, "if"); + if (_if_arg_2511) { + var desc = { + descriptor_value: None(), + descriptor_writable: Some(false), + descriptor_get: None(), + descriptor_set: None(), + descriptor_enumerable: None(), + descriptor_configurable: None() + }; + var ctx_1132 = ctx_push(ctx_1131, [{key: "desc", val: desc}]); + log_event("JsInterpreter.js", 5964, ctx_1132, "let"); + var a_2 = (function () { + log_event("JsInterpreter.js", 5963, ctx_1132, "call"); + var _return_2515 = attributes_update(a, + desc); + log_event("JsInterpreter.js", 5962, ctx_push(ctx_1132, [{key: "#RETURN_VALUE#", val: _return_2515}]), "return"); + return (_return_2515); + }()) + ; + + } else { + var a_2 = a; + } + var ctx_1133 = ctx_push(ctx_1131, [{key: "a_2", val: a_2}]); + log_event("JsInterpreter.js", 5984, ctx_1133, "let"); + var _if_arg_2516 = (function () { + log_event("JsInterpreter.js", 5967, ctx_1133, "call"); + var _return_2517 = attributes_configurable( + a_2); + log_event("JsInterpreter.js", 5966, ctx_push(ctx_1133, [{key: "#RETURN_VALUE#", val: _return_2517}]), "return"); + return (_return_2517); + }()) + ; + log_event("JsInterpreter.js", 5971, ctx_1133, "if"); + if (_if_arg_2516) { + var desc = { + descriptor_value: None(), + descriptor_writable: None(), + descriptor_get: None(), + descriptor_set: None(), + descriptor_enumerable: None(), + descriptor_configurable: Some(false) + }; + var ctx_1134 = ctx_push(ctx_1133, [{key: "desc", val: desc}]); + log_event("JsInterpreter.js", 5970, ctx_1134, "let"); + var a_3 = (function () { + log_event("JsInterpreter.js", 5969, ctx_1134, "call"); + var _return_2518 = attributes_update( + a_2, desc); + log_event("JsInterpreter.js", 5968, ctx_push(ctx_1134, [{key: "#RETURN_VALUE#", val: _return_2518}]), "return"); + return (_return_2518); + }()) + ; + + } else { + var a_3 = a_2; + } + var ctx_1135 = ctx_push(ctx_1133, [{key: "a_3", val: a_3}]); + log_event("JsInterpreter.js", 5983, ctx_1135, "let"); + var _return_2523 = if_bool((function () { + log_event("JsInterpreter.js", 5975, ctx_1135, "call"); + var _return_2520 = + object_define_own_prop( + s0, c, l, x, + (function () { + log_event("JsInterpreter.js", 5973, ctx_1135, "call"); + var _return_2519 = + descriptor_of_attributes( + a_3); + log_event("JsInterpreter.js", 5972, ctx_push(ctx_1135, [{key: "#RETURN_VALUE#", val: _return_2519}]), "return"); + return (_return_2519); + }()), true); + log_event("JsInterpreter.js", 5974, ctx_push(ctx_1135, [{key: "#RETURN_VALUE#", val: _return_2520}]), "return"); + return (_return_2520); + }()), function(s1, + x0) { + + var ctx_1136 = ctx_push(ctx_1135, [{key: "s1", val: s1}, {key: "x0", val: x0}]); + log_event("JsInterpreter.js", 5981, ctx_1136, "let"); + var _return_2522 = (function () { + log_event("JsInterpreter.js", 5977, ctx_1136, "call"); + var _return_2521 = + run_object_freeze( + s1, c, l, xs_2); + log_event("JsInterpreter.js", 5976, ctx_push(ctx_1136, [{key: "#RETURN_VALUE#", val: _return_2521}]), "return"); + return (_return_2521); + }()) + ; + log_event("JsInterpreter.js", 5978, ctx_push(ctx_1136, [{key: "#RETURN_VALUE#", val: _return_2522}]), "return"); + return (_return_2522); + }); + log_event("JsInterpreter.js", 5982, ctx_push(ctx_1135, [{key: "#RETURN_VALUE#", val: _return_2523}]), "return"); + return (_return_2523); + + + } + + }); + log_event("JsInterpreter.js", 5990, ctx_push(ctx_1128, [{key: "#RETURN_VALUE#", val: _return_2524}]), "return"); + return (_return_2524); + } + +}; + +var run_object_is_frozen = function (s, c, l, _foo_) { + var ctx_1137 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "l", val: l}, {key: "_foo_", val: _foo_}]); + log_event("JsInterpreter.js", 6044, ctx_1137, "enter"); + log_event("JsInterpreter.js", 6043, ctx_1137, "switch"); + switch (_foo_.tag) { + case "[]":log_event("JsInterpreter.js", 6003, ctx_1137, "case"); + + var _return_2528 = if_some((function () { + log_event("JsInterpreter.js", 5995, ctx_1137, "call"); + var _return_2525 = run_object_method( + object_extensible_, s, l); + log_event("JsInterpreter.js", 5994, ctx_push(ctx_1137, [{key: "#RETURN_VALUE#", val: _return_2525}]), "return"); + return (_return_2525); }()), function(ext) { + + var ctx_1138 = ctx_push(ctx_1137, [{key: "ext", val: ext}]); + log_event("JsInterpreter.js", 6001, ctx_1138, "let"); + var _return_2527 = res_ter(s, + res_val( + Coq_value_prim( + Coq_prim_bool( + (function () { + log_event("JsInterpreter.js", 5997, ctx_1138, "call"); + var _return_2526 = + !(ext); + log_event("JsInterpreter.js", 5996, ctx_push(ctx_1138, [{key: "#RETURN_VALUE#", val: _return_2526}]), "return"); + return (_return_2526); + }()))))); + log_event("JsInterpreter.js", 5998, ctx_push(ctx_1138, [{key: "#RETURN_VALUE#", val: _return_2527}]), "return"); + return (_return_2527); + }); + log_event("JsInterpreter.js", 6002, ctx_push(ctx_1137, [{key: "#RETURN_VALUE#", val: _return_2528}]), "return"); + return (_return_2528); + case "::": + var x = _foo_.head, xs_2 = _foo_.tail;var ctx_1139 = ctx_push(ctx_1137, [{key: "x", val: x}, {key: "xs_2", val: xs_2}]); + log_event("JsInterpreter.js", 6042, ctx_1139, "case"); + + var _return_2546 = if_run((function () { + log_event("JsInterpreter.js", 6005, ctx_1139, "call"); + var _return_2529 = run_object_get_own_prop(s, c, + l, x); + log_event("JsInterpreter.js", 6004, ctx_push(ctx_1139, [{key: "#RETURN_VALUE#", val: _return_2529}]), "return"); + return (_return_2529); }()), function(s0, d) { + + var ctx_1140 = ctx_push(ctx_1139, [{key: "s0", val: s0}, {key: "d", val: d}]); + log_event("JsInterpreter.js", 6040, ctx_1140, "let"); + var check_configurable = function (a) { + var ctx_1141 = ctx_push(ctx_1140, [{key: "a", val: a}]); + log_event("JsInterpreter.js", 6013, ctx_1141, "enter"); + var _if_arg_2530 = (function () { + log_event("JsInterpreter.js", 6007, ctx_1141, "call"); + var _return_2531 = attributes_configurable( + a); + log_event("JsInterpreter.js", 6006, ctx_push(ctx_1141, [{key: "#RETURN_VALUE#", val: _return_2531}]), "return"); + return (_return_2531); + }()) + ; + log_event("JsInterpreter.js", 6012, ctx_1141, "if"); + if (_if_arg_2530) { + var _return_2534 = res_ter(s0, + res_val( + Coq_value_prim( + Coq_prim_bool( + false)))); + log_event("JsInterpreter.js", 6011, ctx_push(ctx_1141, [{key: "#RETURN_VALUE#", val: _return_2534}]), "return"); + return (_return_2534); + } else { + var _return_2533 = (function () { + log_event("JsInterpreter.js", 6009, ctx_1141, "call"); + var _return_2532 = run_object_is_frozen( + s0, c, l, xs_2); + log_event("JsInterpreter.js", 6008, ctx_push(ctx_1141, [{key: "#RETURN_VALUE#", val: _return_2532}]), "return"); + return (_return_2532); + }()) + ; + log_event("JsInterpreter.js", 6010, ctx_push(ctx_1141, [{key: "#RETURN_VALUE#", val: _return_2533}]), "return"); + return (_return_2533); + } + }; + var ctx_1142 = ctx_push(ctx_1140, [{key: "check_configurable", val: check_configurable}]); + log_event("JsInterpreter.js", 6037, ctx_1142, "let"); + log_event("JsInterpreter.js", 6036, ctx_1142, "switch"); + switch (d.tag) { + case "Coq_full_descriptor_undef":log_event("JsInterpreter.js", 6021, ctx_1142, "case"); + + var _return_2538 = (function () { + log_event("JsInterpreter.js", 6019, ctx_1142, "call"); + var _return_2537 = function (s, m) { + var ctx_1143 = ctx_push(ctx_1142, [{key: "s", val: s}, {key: "m", val: m}]); + log_event("JsInterpreter.js", 6017, ctx_1143, "enter"); + (function () { + log_event("JsInterpreter.js", 6016, ctx_1143, "call"); + var _return_2536 = + Debug.impossible_with_heap_because( + __LOC__, s, m); + log_event("JsInterpreter.js", 6015, ctx_push(ctx_1143, [{key: "#RETURN_VALUE#", val: _return_2536}]), "return"); + return (_return_2536); + }()) + ; + var _return_2535 = + Coq_result_impossible( + ); + log_event("JsInterpreter.js", 6014, ctx_push(ctx_1143, [{key: "#RETURN_VALUE#", val: _return_2535}]), "return"); + return (_return_2535); + }(s0, + "[run_object_is_frozen]: Undefined descriptor found in a place where it shouldn't."); + log_event("JsInterpreter.js", 6018, ctx_push(ctx_1142, [{key: "#RETURN_VALUE#", val: _return_2537}]), "return"); + return (_return_2537); + }()) + ; + log_event("JsInterpreter.js", 6020, ctx_push(ctx_1142, [{key: "#RETURN_VALUE#", val: _return_2538}]), "return"); + return (_return_2538); + case "Coq_full_descriptor_some": + var a = d.value;var ctx_1144 = ctx_push(ctx_1142, [{key: "a", val: a}]); + log_event("JsInterpreter.js", 6035, ctx_1144, "case"); + + log_event("JsInterpreter.js", 6034, ctx_1144, "switch"); + switch (a.tag) { + case "Coq_attributes_data_of": + var ad = a.value;var ctx_1145 = ctx_push(ctx_1144, [{key: "ad", val: ad}]); + log_event("JsInterpreter.js", 6029, ctx_1145, "case"); + + var _if_arg_2539 = (function () { + log_event("JsInterpreter.js", 6023, ctx_1145, "call"); + var _return_2540 = attributes_writable( + Coq_attributes_data_of( + ad)); + log_event("JsInterpreter.js", 6022, ctx_push(ctx_1145, [{key: "#RETURN_VALUE#", val: _return_2540}]), "return"); + return (_return_2540); + }()) + ; + log_event("JsInterpreter.js", 6028, ctx_1145, "if"); + if (_if_arg_2539) { + var _return_2543 = res_ter(s0, + res_val( + Coq_value_prim( + Coq_prim_bool( + false)))); + log_event("JsInterpreter.js", 6027, ctx_push(ctx_1145, [{key: "#RETURN_VALUE#", val: _return_2543}]), "return"); + return (_return_2543); + } else { + var _return_2542 = (function () { + log_event("JsInterpreter.js", 6025, ctx_1145, "call"); + var _return_2541 = check_configurable( + Coq_attributes_data_of( + ad)); + log_event("JsInterpreter.js", 6024, ctx_push(ctx_1145, [{key: "#RETURN_VALUE#", val: _return_2541}]), "return"); + return (_return_2541); + }()) + ; + log_event("JsInterpreter.js", 6026, ctx_push(ctx_1145, [{key: "#RETURN_VALUE#", val: _return_2542}]), "return"); + return (_return_2542); + } + case "Coq_attributes_accessor_of": + var aa = a.value;var ctx_1146 = ctx_push(ctx_1144, [{key: "aa", val: aa}]); + log_event("JsInterpreter.js", 6033, ctx_1146, "case"); + + var _return_2545 = (function () { + log_event("JsInterpreter.js", 6031, ctx_1146, "call"); + var _return_2544 = check_configurable( + Coq_attributes_accessor_of( + aa)); + log_event("JsInterpreter.js", 6030, ctx_push(ctx_1146, [{key: "#RETURN_VALUE#", val: _return_2544}]), "return"); + return (_return_2544); + }()) + ; + log_event("JsInterpreter.js", 6032, ctx_push(ctx_1146, [{key: "#RETURN_VALUE#", val: _return_2545}]), "return"); + return (_return_2545); + } + + } + + + }); + log_event("JsInterpreter.js", 6041, ctx_push(ctx_1139, [{key: "#RETURN_VALUE#", val: _return_2546}]), "return"); + return (_return_2546); + } + +}; + +var run_get_args_for_apply = function (s, c, l, index, n) { + var ctx_1147 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "l", val: l}, {key: "index", val: index}, {key: "n", val: n}]); + log_event("JsInterpreter.js", 6071, ctx_1147, "enter"); + var _if_arg_2547 = (function () { + log_event("JsInterpreter.js", 6046, ctx_1147, "call"); + var _return_2548 = (index < n); + log_event("JsInterpreter.js", 6045, ctx_push(ctx_1147, [{key: "#RETURN_VALUE#", val: _return_2548}]), "return"); + return (_return_2548); + }()) + ; + log_event("JsInterpreter.js", 6070, ctx_1147, "if"); + if (_if_arg_2547) { + var _return_2557 = if_string((function () { + log_event("JsInterpreter.js", 6049, ctx_1147, "call"); + var _return_2550 = to_string(s, c, + Coq_value_prim( + Coq_prim_number(index))); + log_event("JsInterpreter.js", 6048, ctx_push(ctx_1147, [{key: "#RETURN_VALUE#", val: _return_2550}]), "return"); + return (_return_2550); }()), function(s0, + sindex) { + + var ctx_1148 = ctx_push(ctx_1147, [{key: "s0", val: s0}, {key: "sindex", val: sindex}]); + log_event("JsInterpreter.js", 6068, ctx_1148, "let"); + var _return_2556 = if_value((function () { + log_event("JsInterpreter.js", 6051, ctx_1148, "call"); + var _return_2551 = + run_object_get(s0, c, l, + sindex); + log_event("JsInterpreter.js", 6050, ctx_push(ctx_1148, [{key: "#RETURN_VALUE#", val: _return_2551}]), "return"); + return (_return_2551); }()) + , function(s1, v) { + + var ctx_1149 = ctx_push(ctx_1148, [{key: "s1", val: s1}, {key: "v", val: v}]); + log_event("JsInterpreter.js", 6064, ctx_1149, "let"); + var tail_args = (function () { + log_event("JsInterpreter.js", 6055, ctx_1149, "call"); + var _return_2553 = + run_get_args_for_apply( + s1, c, l, + (function () { + log_event("JsInterpreter.js", 6053, ctx_1149, "call"); + var _return_2552 = + (index + 1.); + log_event("JsInterpreter.js", 6052, ctx_push(ctx_1149, [{key: "#RETURN_VALUE#", val: _return_2552}]), "return"); + return (_return_2552); + }()), n); + log_event("JsInterpreter.js", 6054, ctx_push(ctx_1149, [{key: "#RETURN_VALUE#", val: _return_2553}]), "return"); + return (_return_2553); + }()) + ; + var ctx_1150 = ctx_push(ctx_1149, [{key: "tail_args", val: tail_args}]); + log_event("JsInterpreter.js", 6061, ctx_1150, "let"); + var _return_2555 = + if_run(tail_args, + function(s2, tail) { + + var ctx_1151 = ctx_push(ctx_1150, [{key: "s2", val: s2}, {key: "tail", val: tail}]); + log_event("JsInterpreter.js", 6059, ctx_1151, "let"); + var _return_2554 = + res_spec(s2, + mk_cons(v, tail)); + log_event("JsInterpreter.js", 6056, ctx_push(ctx_1151, [{key: "#RETURN_VALUE#", val: _return_2554}]), "return"); + return (_return_2554); + }); + log_event("JsInterpreter.js", 6060, ctx_push(ctx_1150, [{key: "#RETURN_VALUE#", val: _return_2555}]), "return"); + return (_return_2555); + + }); + log_event("JsInterpreter.js", 6065, ctx_push(ctx_1148, [{key: "#RETURN_VALUE#", val: _return_2556}]), "return"); + return (_return_2556); + }); + log_event("JsInterpreter.js", 6069, ctx_push(ctx_1147, [{key: "#RETURN_VALUE#", val: _return_2557}]), "return"); + return (_return_2557); + } else { + var _return_2549 = res_spec(s, mk_nil()); + log_event("JsInterpreter.js", 6047, ctx_push(ctx_1147, [{key: "#RETURN_VALUE#", val: _return_2549}]), "return"); + return (_return_2549); + } +}; + +var valueToStringForJoin = function (s, c, l, k) { + var ctx_1152 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "l", val: l}, {key: "k", val: k}]); + log_event("JsInterpreter.js", 6123, ctx_1152, "enter"); + var _return_2575 = if_string((function () { + log_event("JsInterpreter.js", 6073, ctx_1152, "call"); + var _return_2558 = to_string(s, c, + Coq_value_prim( + Coq_prim_number(k))); + log_event("JsInterpreter.js", 6072, ctx_push(ctx_1152, [{key: "#RETURN_VALUE#", val: _return_2558}]), "return"); + return (_return_2558); }()), function(s0, prop) { + + var ctx_1153 = ctx_push(ctx_1152, [{key: "s0", val: s0}, {key: "prop", val: prop}]); + log_event("JsInterpreter.js", 6121, ctx_1153, "let"); + var _return_2574 = if_value((function () { + log_event("JsInterpreter.js", 6075, ctx_1153, "call"); + var _return_2559 = run_object_get( + s0, c, l, + prop); + log_event("JsInterpreter.js", 6074, ctx_push(ctx_1153, [{key: "#RETURN_VALUE#", val: _return_2559}]), "return"); + return (_return_2559); }()), + function(s1, v) { + + var ctx_1154 = ctx_push(ctx_1153, [{key: "s1", val: s1}, {key: "v", val: v}]); + log_event("JsInterpreter.js", 6117, ctx_1154, "let"); + log_event("JsInterpreter.js", 6114, ctx_1154, "switch"); + switch (v.tag) { + case "Coq_value_prim": + var p = v.value;var ctx_1155 = ctx_push(ctx_1154, [{key: "p", val: p}]); + log_event("JsInterpreter.js", 6105, ctx_1155, "case"); + + log_event("JsInterpreter.js", 6104, ctx_1155, "switch"); + switch (p.tag) { + case "Coq_prim_undef":log_event("JsInterpreter.js", 6077, ctx_1155, "case"); + + var _return_2560 = + res_spec(s1, ""); + log_event("JsInterpreter.js", 6076, ctx_push(ctx_1155, [{key: "#RETURN_VALUE#", val: _return_2560}]), "return"); + return (_return_2560); + case "Coq_prim_null":log_event("JsInterpreter.js", 6079, ctx_1155, "case"); + + var _return_2561 = + res_spec(s1, ""); + log_event("JsInterpreter.js", 6078, ctx_push(ctx_1155, [{key: "#RETURN_VALUE#", val: _return_2561}]), "return"); + return (_return_2561); + case "Coq_prim_bool": + var b = p.value;var ctx_1156 = ctx_push(ctx_1155, [{key: "b", val: b}]); + log_event("JsInterpreter.js", 6087, ctx_1156, "case"); + + var _return_2564 = + if_string( + (function () { + log_event("JsInterpreter.js", 6081, ctx_1156, "call"); + var _return_2562 = + to_string(s1, c, + v); + log_event("JsInterpreter.js", 6080, ctx_push(ctx_1156, [{key: "#RETURN_VALUE#", val: _return_2562}]), "return"); + return (_return_2562); + }()), function(s2, + s3) { + + var ctx_1157 = ctx_push(ctx_1156, [{key: "s2", val: s2}, {key: "s3", val: s3}]); + log_event("JsInterpreter.js", 6085, ctx_1157, "let"); + var _return_2563 = + res_spec(s2, s3); + log_event("JsInterpreter.js", 6082, ctx_push(ctx_1157, [{key: "#RETURN_VALUE#", val: _return_2563}]), "return"); + return (_return_2563); + }); + log_event("JsInterpreter.js", 6086, ctx_push(ctx_1156, [{key: "#RETURN_VALUE#", val: _return_2564}]), "return"); + return (_return_2564); + case "Coq_prim_number": + var n = p.value;var ctx_1158 = ctx_push(ctx_1155, [{key: "n", val: n}]); + log_event("JsInterpreter.js", 6095, ctx_1158, "case"); + + var _return_2567 = + if_string( + (function () { + log_event("JsInterpreter.js", 6089, ctx_1158, "call"); + var _return_2565 = + to_string(s1, c, + v); + log_event("JsInterpreter.js", 6088, ctx_push(ctx_1158, [{key: "#RETURN_VALUE#", val: _return_2565}]), "return"); + return (_return_2565); + }()), function(s2, + s3) { + + var ctx_1159 = ctx_push(ctx_1158, [{key: "s2", val: s2}, {key: "s3", val: s3}]); + log_event("JsInterpreter.js", 6093, ctx_1159, "let"); + var _return_2566 = + res_spec(s2, s3); + log_event("JsInterpreter.js", 6090, ctx_push(ctx_1159, [{key: "#RETURN_VALUE#", val: _return_2566}]), "return"); + return (_return_2566); + }); + log_event("JsInterpreter.js", 6094, ctx_push(ctx_1158, [{key: "#RETURN_VALUE#", val: _return_2567}]), "return"); + return (_return_2567); + case "Coq_prim_string": + var s2 = p.value;var ctx_1160 = ctx_push(ctx_1155, [{key: "s2", val: s2}]); + log_event("JsInterpreter.js", 6103, ctx_1160, "case"); + + var _return_2570 = + if_string( + (function () { + log_event("JsInterpreter.js", 6097, ctx_1160, "call"); + var _return_2568 = + to_string(s1, c, + v); + log_event("JsInterpreter.js", 6096, ctx_push(ctx_1160, [{key: "#RETURN_VALUE#", val: _return_2568}]), "return"); + return (_return_2568); + }()), function(s3, + s4) { + + var ctx_1161 = ctx_push(ctx_1160, [{key: "s3", val: s3}, {key: "s4", val: s4}]); + log_event("JsInterpreter.js", 6101, ctx_1161, "let"); + var _return_2569 = + res_spec(s3, s4); + log_event("JsInterpreter.js", 6098, ctx_push(ctx_1161, [{key: "#RETURN_VALUE#", val: _return_2569}]), "return"); + return (_return_2569); + }); + log_event("JsInterpreter.js", 6102, ctx_push(ctx_1160, [{key: "#RETURN_VALUE#", val: _return_2570}]), "return"); + return (_return_2570); + } + + case "Coq_value_object": + var o = v.value;var ctx_1162 = ctx_push(ctx_1154, [{key: "o", val: o}]); + log_event("JsInterpreter.js", 6113, ctx_1162, "case"); + + var _return_2573 = + if_string((function () { + log_event("JsInterpreter.js", 6107, ctx_1162, "call"); + var _return_2571 = + to_string(s1, c, v); + log_event("JsInterpreter.js", 6106, ctx_push(ctx_1162, [{key: "#RETURN_VALUE#", val: _return_2571}]), "return"); + return (_return_2571); + }()), function(s2, + s3) { + + var ctx_1163 = ctx_push(ctx_1162, [{key: "s2", val: s2}, {key: "s3", val: s3}]); + log_event("JsInterpreter.js", 6111, ctx_1163, "let"); + var _return_2572 = + res_spec(s2, s3); + log_event("JsInterpreter.js", 6108, ctx_push(ctx_1163, [{key: "#RETURN_VALUE#", val: _return_2572}]), "return"); + return (_return_2572); + }); + log_event("JsInterpreter.js", 6112, ctx_push(ctx_1162, [{key: "#RETURN_VALUE#", val: _return_2573}]), "return"); + return (_return_2573); + } + + }); + log_event("JsInterpreter.js", 6118, ctx_push(ctx_1153, [{key: "#RETURN_VALUE#", val: _return_2574}]), "return"); + return (_return_2574); + }); + log_event("JsInterpreter.js", 6122, ctx_push(ctx_1152, [{key: "#RETURN_VALUE#", val: _return_2575}]), "return"); + return (_return_2575); +}; + +var run_array_join_elements = function (s, c, l, k, length0, sep, sR) { + var ctx_1164 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "l", val: l}, {key: "k", val: k}, {key: "length0", val: length0}, {key: "sep", val: sep}, {key: "sR", val: sR}]); + log_event("JsInterpreter.js", 6146, ctx_1164, "enter"); + var _if_arg_2576 = (function () { + log_event("JsInterpreter.js", 6125, ctx_1164, "call"); + var _return_2577 = (k < length0); + log_event("JsInterpreter.js", 6124, ctx_push(ctx_1164, [{key: "#RETURN_VALUE#", val: _return_2577}]), "return"); + return (_return_2577); + }()) + ; + log_event("JsInterpreter.js", 6145, ctx_1164, "if"); + if (_if_arg_2576) { + var ss = (function () { + log_event("JsInterpreter.js", 6128, ctx_1164, "call"); + var _return_2579 = strappend(sR, sep); + log_event("JsInterpreter.js", 6127, ctx_push(ctx_1164, [{key: "#RETURN_VALUE#", val: _return_2579}]), "return"); + return (_return_2579); + }()) + ; + var ctx_1165 = ctx_push(ctx_1164, [{key: "ss", val: ss}]); + log_event("JsInterpreter.js", 6144, ctx_1165, "let"); + var sE = (function () { + log_event("JsInterpreter.js", 6130, ctx_1165, "call"); + var _return_2580 = valueToStringForJoin(s, c, l, k); + log_event("JsInterpreter.js", 6129, ctx_push(ctx_1165, [{key: "#RETURN_VALUE#", val: _return_2580}]), "return"); + return (_return_2580); + }()) + ; + var ctx_1166 = ctx_push(ctx_1165, [{key: "sE", val: sE}]); + log_event("JsInterpreter.js", 6143, ctx_1166, "let"); + var _return_2585 = if_run(sE, function(s0, element) { + + var ctx_1167 = ctx_push(ctx_1166, [{key: "s0", val: s0}, {key: "element", val: element}]); + log_event("JsInterpreter.js", 6141, ctx_1167, "let"); + var sR0 = (function () { + log_event("JsInterpreter.js", 6132, ctx_1167, "call"); + var _return_2581 = strappend(ss, element); + log_event("JsInterpreter.js", 6131, ctx_push(ctx_1167, [{key: "#RETURN_VALUE#", val: _return_2581}]), "return"); + return (_return_2581); + }()) + ; + var ctx_1168 = ctx_push(ctx_1167, [{key: "sR0", val: sR0}]); + log_event("JsInterpreter.js", 6138, ctx_1168, "let"); + var _return_2584 = (function () { + log_event("JsInterpreter.js", 6136, ctx_1168, "call"); + var _return_2583 = run_array_join_elements(s0, + c, l, (function () { + log_event("JsInterpreter.js", 6134, ctx_1168, "call"); + var _return_2582 = + (k + 1.); + log_event("JsInterpreter.js", 6133, ctx_push(ctx_1168, [{key: "#RETURN_VALUE#", val: _return_2582}]), "return"); + return (_return_2582); + }()), length0, sep, sR0); + log_event("JsInterpreter.js", 6135, ctx_push(ctx_1168, [{key: "#RETURN_VALUE#", val: _return_2583}]), "return"); + return (_return_2583); + }()) + ; + log_event("JsInterpreter.js", 6137, ctx_push(ctx_1168, [{key: "#RETURN_VALUE#", val: _return_2584}]), "return"); + return (_return_2584); + + }); + log_event("JsInterpreter.js", 6142, ctx_push(ctx_1166, [{key: "#RETURN_VALUE#", val: _return_2585}]), "return"); + return (_return_2585); + + + } else { + var _return_2578 = res_ter(s, + res_val(Coq_value_prim(Coq_prim_string(sR)))); + log_event("JsInterpreter.js", 6126, ctx_push(ctx_1164, [{key: "#RETURN_VALUE#", val: _return_2578}]), "return"); + return (_return_2578); + } +}; + +var run_call_prealloc = function (s, c, b, vthis, args) { + var ctx_1169 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "b", val: b}, {key: "vthis", val: vthis}, {key: "args", val: args}]); + log_event("JsInterpreter.js", 7300, ctx_1169, "enter"); + log_event("JsInterpreter.js", 7299, ctx_1169, "switch"); + switch (b.tag) { + case "Coq_prealloc_global_is_finite":log_event("JsInterpreter.js", 6169, ctx_1169, "case"); + + var v = (function () { + log_event("JsInterpreter.js", 6148, ctx_1169, "call"); + var _return_2586 = get_arg(0, args); + log_event("JsInterpreter.js", 6147, ctx_push(ctx_1169, [{key: "#RETURN_VALUE#", val: _return_2586}]), "return"); + return (_return_2586); + }()) + ; + var ctx_1170 = ctx_push(ctx_1169, [{key: "v", val: v}]); + log_event("JsInterpreter.js", 6168, ctx_1170, "let"); + var _return_2595 = if_number((function () { + log_event("JsInterpreter.js", 6150, ctx_1170, "call"); + var _return_2587 = to_number(s, c, v); + log_event("JsInterpreter.js", 6149, ctx_push(ctx_1170, [{key: "#RETURN_VALUE#", val: _return_2587}]), "return"); + return (_return_2587); }()), function(s0, n) { + + var ctx_1171 = ctx_push(ctx_1170, [{key: "s0", val: s0}, {key: "n", val: n}]); + log_event("JsInterpreter.js", 6166, ctx_1171, "let"); + var _return_2594 = res_ter(s0, + res_val( + Coq_value_prim( + Coq_prim_bool( + (function () { + log_event("JsInterpreter.js", 6162, ctx_1171, "call"); + var _return_2593 = + !((function () { + log_event("JsInterpreter.js", 6160, ctx_1171, "call"); + var _return_2592 = + ((function () { + log_event("JsInterpreter.js", 6152, ctx_1171, "call"); + var _return_2588 = + JsNumber.isnan( + n); + log_event("JsInterpreter.js", 6151, ctx_push(ctx_1171, [{key: "#RETURN_VALUE#", val: _return_2588}]), "return"); + return (_return_2588); + }()) + || (function () { + log_event("JsInterpreter.js", 6158, ctx_1171, "call"); + var _return_2591 = + ((function () { + log_event("JsInterpreter.js", 6154, ctx_1171, "call"); + var _return_2589 = + (n + === JsNumber.infinity); + log_event("JsInterpreter.js", 6153, ctx_push(ctx_1171, [{key: "#RETURN_VALUE#", val: _return_2589}]), "return"); + return (_return_2589); + }()) + || (function () { + log_event("JsInterpreter.js", 6156, ctx_1171, "call"); + var _return_2590 = + (n + === JsNumber.neg_infinity); + log_event("JsInterpreter.js", 6155, ctx_push(ctx_1171, [{key: "#RETURN_VALUE#", val: _return_2590}]), "return"); + return (_return_2590); + }())); + log_event("JsInterpreter.js", 6157, ctx_push(ctx_1171, [{key: "#RETURN_VALUE#", val: _return_2591}]), "return"); + return (_return_2591); + }())); + log_event("JsInterpreter.js", 6159, ctx_push(ctx_1171, [{key: "#RETURN_VALUE#", val: _return_2592}]), "return"); + return (_return_2592); + }())); + log_event("JsInterpreter.js", 6161, ctx_push(ctx_1171, [{key: "#RETURN_VALUE#", val: _return_2593}]), "return"); + return (_return_2593); + }()))))); + log_event("JsInterpreter.js", 6163, ctx_push(ctx_1171, [{key: "#RETURN_VALUE#", val: _return_2594}]), "return"); + return (_return_2594); + }); + log_event("JsInterpreter.js", 6167, ctx_push(ctx_1170, [{key: "#RETURN_VALUE#", val: _return_2595}]), "return"); + return (_return_2595); + + case "Coq_prealloc_global_is_nan":log_event("JsInterpreter.js", 6182, ctx_1169, "case"); + + var v = (function () { + log_event("JsInterpreter.js", 6171, ctx_1169, "call"); + var _return_2596 = get_arg(0, args); + log_event("JsInterpreter.js", 6170, ctx_push(ctx_1169, [{key: "#RETURN_VALUE#", val: _return_2596}]), "return"); + return (_return_2596); + }()) + ; + var ctx_1172 = ctx_push(ctx_1169, [{key: "v", val: v}]); + log_event("JsInterpreter.js", 6181, ctx_1172, "let"); + var _return_2600 = if_number((function () { + log_event("JsInterpreter.js", 6173, ctx_1172, "call"); + var _return_2597 = to_number(s, c, v); + log_event("JsInterpreter.js", 6172, ctx_push(ctx_1172, [{key: "#RETURN_VALUE#", val: _return_2597}]), "return"); + return (_return_2597); }()), function(s0, n) { + + var ctx_1173 = ctx_push(ctx_1172, [{key: "s0", val: s0}, {key: "n", val: n}]); + log_event("JsInterpreter.js", 6179, ctx_1173, "let"); + var _return_2599 = res_ter(s0, + res_val( + Coq_value_prim( + Coq_prim_bool( + (function () { + log_event("JsInterpreter.js", 6175, ctx_1173, "call"); + var _return_2598 = + JsNumber.isnan(n); + log_event("JsInterpreter.js", 6174, ctx_push(ctx_1173, [{key: "#RETURN_VALUE#", val: _return_2598}]), "return"); + return (_return_2598); + }()))))); + log_event("JsInterpreter.js", 6176, ctx_push(ctx_1173, [{key: "#RETURN_VALUE#", val: _return_2599}]), "return"); + return (_return_2599); + }); + log_event("JsInterpreter.js", 6180, ctx_push(ctx_1172, [{key: "#RETURN_VALUE#", val: _return_2600}]), "return"); + return (_return_2600); + + case "Coq_prealloc_object":log_event("JsInterpreter.js", 6213, ctx_1169, "case"); + + var value0 = (function () { + log_event("JsInterpreter.js", 6184, ctx_1169, "call"); + var _return_2601 = get_arg(0, args); + log_event("JsInterpreter.js", 6183, ctx_push(ctx_1169, [{key: "#RETURN_VALUE#", val: _return_2601}]), "return"); + return (_return_2601); + }()) + ; + var ctx_1174 = ctx_push(ctx_1169, [{key: "value0", val: value0}]); + log_event("JsInterpreter.js", 6212, ctx_1174, "let"); + log_event("JsInterpreter.js", 6211, ctx_1174, "switch"); + switch (value0.tag) { + case "Coq_value_prim": + var p = value0.value;var ctx_1175 = ctx_push(ctx_1174, [{key: "p", val: p}]); + log_event("JsInterpreter.js", 6206, ctx_1175, "case"); + + log_event("JsInterpreter.js", 6205, ctx_1175, "switch"); + switch (p.tag) { + case "Coq_prim_undef":log_event("JsInterpreter.js", 6188, ctx_1175, "case"); + + var _return_2603 = (function () { + log_event("JsInterpreter.js", 6186, ctx_1175, "call"); + var _return_2602 = run_construct_prealloc(s, c, b, args); + log_event("JsInterpreter.js", 6185, ctx_push(ctx_1175, [{key: "#RETURN_VALUE#", val: _return_2602}]), "return"); + return (_return_2602); + }()) + ; + log_event("JsInterpreter.js", 6187, ctx_push(ctx_1175, [{key: "#RETURN_VALUE#", val: _return_2603}]), "return"); + return (_return_2603); + case "Coq_prim_null":log_event("JsInterpreter.js", 6192, ctx_1175, "case"); + + var _return_2605 = (function () { + log_event("JsInterpreter.js", 6190, ctx_1175, "call"); + var _return_2604 = run_construct_prealloc(s, c, b, args); + log_event("JsInterpreter.js", 6189, ctx_push(ctx_1175, [{key: "#RETURN_VALUE#", val: _return_2604}]), "return"); + return (_return_2604); + }()) + ; + log_event("JsInterpreter.js", 6191, ctx_push(ctx_1175, [{key: "#RETURN_VALUE#", val: _return_2605}]), "return"); + return (_return_2605); + case "Coq_prim_bool": + var b0 = p.value;var ctx_1176 = ctx_push(ctx_1175, [{key: "b0", val: b0}]); + log_event("JsInterpreter.js", 6196, ctx_1176, "case"); + + var _return_2607 = (function () { + log_event("JsInterpreter.js", 6194, ctx_1176, "call"); + var _return_2606 = to_object(s, value0); + log_event("JsInterpreter.js", 6193, ctx_push(ctx_1176, [{key: "#RETURN_VALUE#", val: _return_2606}]), "return"); + return (_return_2606); + }()) + ; + log_event("JsInterpreter.js", 6195, ctx_push(ctx_1176, [{key: "#RETURN_VALUE#", val: _return_2607}]), "return"); + return (_return_2607); + case "Coq_prim_number": + var n = p.value;var ctx_1177 = ctx_push(ctx_1175, [{key: "n", val: n}]); + log_event("JsInterpreter.js", 6200, ctx_1177, "case"); + + var _return_2609 = (function () { + log_event("JsInterpreter.js", 6198, ctx_1177, "call"); + var _return_2608 = to_object(s, value0); + log_event("JsInterpreter.js", 6197, ctx_push(ctx_1177, [{key: "#RETURN_VALUE#", val: _return_2608}]), "return"); + return (_return_2608); + }()) + ; + log_event("JsInterpreter.js", 6199, ctx_push(ctx_1177, [{key: "#RETURN_VALUE#", val: _return_2609}]), "return"); + return (_return_2609); + case "Coq_prim_string": + var s0 = p.value;var ctx_1178 = ctx_push(ctx_1175, [{key: "s0", val: s0}]); + log_event("JsInterpreter.js", 6204, ctx_1178, "case"); + + var _return_2611 = (function () { + log_event("JsInterpreter.js", 6202, ctx_1178, "call"); + var _return_2610 = to_object(s, value0); + log_event("JsInterpreter.js", 6201, ctx_push(ctx_1178, [{key: "#RETURN_VALUE#", val: _return_2610}]), "return"); + return (_return_2610); + }()) + ; + log_event("JsInterpreter.js", 6203, ctx_push(ctx_1178, [{key: "#RETURN_VALUE#", val: _return_2611}]), "return"); + return (_return_2611); + } + + case "Coq_value_object": + var o = value0.value;var ctx_1179 = ctx_push(ctx_1174, [{key: "o", val: o}]); + log_event("JsInterpreter.js", 6210, ctx_1179, "case"); + + var _return_2613 = (function () { + log_event("JsInterpreter.js", 6208, ctx_1179, "call"); + var _return_2612 = to_object(s, value0); + log_event("JsInterpreter.js", 6207, ctx_push(ctx_1179, [{key: "#RETURN_VALUE#", val: _return_2612}]), "return"); + return (_return_2612); + }()) + ; + log_event("JsInterpreter.js", 6209, ctx_push(ctx_1179, [{key: "#RETURN_VALUE#", val: _return_2613}]), "return"); + return (_return_2613); + } + + + case "Coq_prealloc_object_get_proto_of":log_event("JsInterpreter.js", 6230, ctx_1169, "case"); + + var v = (function () { + log_event("JsInterpreter.js", 6215, ctx_1169, "call"); + var _return_2614 = get_arg(0, args); + log_event("JsInterpreter.js", 6214, ctx_push(ctx_1169, [{key: "#RETURN_VALUE#", val: _return_2614}]), "return"); + return (_return_2614); + }()) + ; + var ctx_1180 = ctx_push(ctx_1169, [{key: "v", val: v}]); + log_event("JsInterpreter.js", 6229, ctx_1180, "let"); + log_event("JsInterpreter.js", 6228, ctx_1180, "switch"); + switch (v.tag) { + case "Coq_value_prim": + var p = v.value;var ctx_1181 = ctx_push(ctx_1180, [{key: "p", val: p}]); + log_event("JsInterpreter.js", 6219, ctx_1181, "case"); + + var _return_2616 = (function () { + log_event("JsInterpreter.js", 6217, ctx_1181, "call"); + var _return_2615 = run_error(s, Coq_native_error_type()); + log_event("JsInterpreter.js", 6216, ctx_push(ctx_1181, [{key: "#RETURN_VALUE#", val: _return_2615}]), "return"); + return (_return_2615); + }()) + ; + log_event("JsInterpreter.js", 6218, ctx_push(ctx_1181, [{key: "#RETURN_VALUE#", val: _return_2616}]), "return"); + return (_return_2616); + case "Coq_value_object": + var l = v.value;var ctx_1182 = ctx_push(ctx_1180, [{key: "l", val: l}]); + log_event("JsInterpreter.js", 6227, ctx_1182, "case"); + + var _return_2619 = if_some((function () { + log_event("JsInterpreter.js", 6221, ctx_1182, "call"); + var _return_2617 = run_object_method( + object_proto_, s, l); + log_event("JsInterpreter.js", 6220, ctx_push(ctx_1182, [{key: "#RETURN_VALUE#", val: _return_2617}]), "return"); + return (_return_2617); }()), + function(proto) { + + var ctx_1183 = ctx_push(ctx_1182, [{key: "proto", val: proto}]); + log_event("JsInterpreter.js", 6225, ctx_1183, "let"); + var _return_2618 = res_ter(s, + res_val(proto)); + log_event("JsInterpreter.js", 6222, ctx_push(ctx_1183, [{key: "#RETURN_VALUE#", val: _return_2618}]), "return"); + return (_return_2618); + }); + log_event("JsInterpreter.js", 6226, ctx_push(ctx_1182, [{key: "#RETURN_VALUE#", val: _return_2619}]), "return"); + return (_return_2619); + } + + + case "Coq_prealloc_object_get_own_prop_descriptor":log_event("JsInterpreter.js", 6257, ctx_1169, "case"); + + var v = (function () { + log_event("JsInterpreter.js", 6232, ctx_1169, "call"); + var _return_2620 = get_arg(0, args); + log_event("JsInterpreter.js", 6231, ctx_push(ctx_1169, [{key: "#RETURN_VALUE#", val: _return_2620}]), "return"); + return (_return_2620); + }()) + ; + var ctx_1184 = ctx_push(ctx_1169, [{key: "v", val: v}]); + log_event("JsInterpreter.js", 6256, ctx_1184, "let"); + log_event("JsInterpreter.js", 6255, ctx_1184, "switch"); + switch (v.tag) { + case "Coq_value_prim": + var p = v.value;var ctx_1185 = ctx_push(ctx_1184, [{key: "p", val: p}]); + log_event("JsInterpreter.js", 6236, ctx_1185, "case"); + + var _return_2622 = (function () { + log_event("JsInterpreter.js", 6234, ctx_1185, "call"); + var _return_2621 = run_error(s, Coq_native_error_type()); + log_event("JsInterpreter.js", 6233, ctx_push(ctx_1185, [{key: "#RETURN_VALUE#", val: _return_2621}]), "return"); + return (_return_2621); + }()) + ; + log_event("JsInterpreter.js", 6235, ctx_push(ctx_1185, [{key: "#RETURN_VALUE#", val: _return_2622}]), "return"); + return (_return_2622); + case "Coq_value_object": + var l = v.value;var ctx_1186 = ctx_push(ctx_1184, [{key: "l", val: l}]); + log_event("JsInterpreter.js", 6254, ctx_1186, "case"); + + var _return_2629 = if_string((function () { + log_event("JsInterpreter.js", 6240, ctx_1186, "call"); + var _return_2624 = to_string(s, c, + (function () { + log_event("JsInterpreter.js", 6238, ctx_1186, "call"); + var _return_2623 = + get_arg(1, args); + log_event("JsInterpreter.js", 6237, ctx_push(ctx_1186, [{key: "#RETURN_VALUE#", val: _return_2623}]), "return"); + return (_return_2623); + }())); + log_event("JsInterpreter.js", 6239, ctx_push(ctx_1186, [{key: "#RETURN_VALUE#", val: _return_2624}]), "return"); + return (_return_2624); }()), function(s1, + x) { + + var ctx_1187 = ctx_push(ctx_1186, [{key: "s1", val: s1}, {key: "x", val: x}]); + log_event("JsInterpreter.js", 6252, ctx_1187, "let"); + var _return_2628 = if_run((function () { + log_event("JsInterpreter.js", 6242, ctx_1187, "call"); + var _return_2625 = + run_object_get_own_prop( + s1, c, l, x); + log_event("JsInterpreter.js", 6241, ctx_push(ctx_1187, [{key: "#RETURN_VALUE#", val: _return_2625}]), "return"); + return (_return_2625); + }()), function(s2, d) { + + var ctx_1188 = ctx_push(ctx_1187, [{key: "s2", val: s2}, {key: "d", val: d}]); + log_event("JsInterpreter.js", 6248, ctx_1188, "let"); + var _return_2627 = (function () { + log_event("JsInterpreter.js", 6244, ctx_1188, "call"); + var _return_2626 = + from_prop_descriptor( + s2, c, d); + log_event("JsInterpreter.js", 6243, ctx_push(ctx_1188, [{key: "#RETURN_VALUE#", val: _return_2626}]), "return"); + return (_return_2626); + }()) + ; + log_event("JsInterpreter.js", 6245, ctx_push(ctx_1188, [{key: "#RETURN_VALUE#", val: _return_2627}]), "return"); + return (_return_2627); + }); + log_event("JsInterpreter.js", 6249, ctx_push(ctx_1187, [{key: "#RETURN_VALUE#", val: _return_2628}]), "return"); + return (_return_2628); + }); + log_event("JsInterpreter.js", 6253, ctx_push(ctx_1186, [{key: "#RETURN_VALUE#", val: _return_2629}]), "return"); + return (_return_2629); + } + + + case "Coq_prealloc_object_define_prop":log_event("JsInterpreter.js", 6292, ctx_1169, "case"); + + var o = (function () { + log_event("JsInterpreter.js", 6259, ctx_1169, "call"); + var _return_2630 = get_arg(0, args); + log_event("JsInterpreter.js", 6258, ctx_push(ctx_1169, [{key: "#RETURN_VALUE#", val: _return_2630}]), "return"); + return (_return_2630); + }()) + ; + var ctx_1189 = ctx_push(ctx_1169, [{key: "o", val: o}]); + log_event("JsInterpreter.js", 6291, ctx_1189, "let"); + var p = (function () { + log_event("JsInterpreter.js", 6261, ctx_1189, "call"); + var _return_2631 = get_arg(1, args); + log_event("JsInterpreter.js", 6260, ctx_push(ctx_1189, [{key: "#RETURN_VALUE#", val: _return_2631}]), "return"); + return (_return_2631); + }()) + ; + var ctx_1190 = ctx_push(ctx_1189, [{key: "p", val: p}]); + log_event("JsInterpreter.js", 6290, ctx_1190, "let"); + var attr = (function () { + log_event("JsInterpreter.js", 6263, ctx_1190, "call"); + var _return_2632 = get_arg(2, args); + log_event("JsInterpreter.js", 6262, ctx_push(ctx_1190, [{key: "#RETURN_VALUE#", val: _return_2632}]), "return"); + return (_return_2632); + }()) + ; + var ctx_1191 = ctx_push(ctx_1190, [{key: "attr", val: attr}]); + log_event("JsInterpreter.js", 6289, ctx_1191, "let"); + log_event("JsInterpreter.js", 6288, ctx_1191, "switch"); + switch (o.tag) { + case "Coq_value_prim": + var p0 = o.value;var ctx_1192 = ctx_push(ctx_1191, [{key: "p0", val: p0}]); + log_event("JsInterpreter.js", 6267, ctx_1192, "case"); + + var _return_2634 = (function () { + log_event("JsInterpreter.js", 6265, ctx_1192, "call"); + var _return_2633 = run_error(s, Coq_native_error_type()); + log_event("JsInterpreter.js", 6264, ctx_push(ctx_1192, [{key: "#RETURN_VALUE#", val: _return_2633}]), "return"); + return (_return_2633); + }()) + ; + log_event("JsInterpreter.js", 6266, ctx_push(ctx_1192, [{key: "#RETURN_VALUE#", val: _return_2634}]), "return"); + return (_return_2634); + case "Coq_value_object": + var l = o.value;var ctx_1193 = ctx_push(ctx_1191, [{key: "l", val: l}]); + log_event("JsInterpreter.js", 6287, ctx_1193, "case"); + + var _return_2641 = if_string((function () { + log_event("JsInterpreter.js", 6269, ctx_1193, "call"); + var _return_2635 = to_string(s, c, p); + log_event("JsInterpreter.js", 6268, ctx_push(ctx_1193, [{key: "#RETURN_VALUE#", val: _return_2635}]), "return"); + return (_return_2635); }()), function(s1, + name) { + + var ctx_1194 = ctx_push(ctx_1193, [{key: "s1", val: s1}, {key: "name", val: name}]); + log_event("JsInterpreter.js", 6285, ctx_1194, "let"); + var _return_2640 = if_run((function () { + log_event("JsInterpreter.js", 6271, ctx_1194, "call"); + var _return_2636 = + run_to_descriptor(s1, + c, attr); + log_event("JsInterpreter.js", 6270, ctx_push(ctx_1194, [{key: "#RETURN_VALUE#", val: _return_2636}]), "return"); + return (_return_2636); + }()), function(s2, + desc) { + + var ctx_1195 = ctx_push(ctx_1194, [{key: "s2", val: s2}, {key: "desc", val: desc}]); + log_event("JsInterpreter.js", 6281, ctx_1195, "let"); + var _return_2639 = + if_bool( + (function () { + log_event("JsInterpreter.js", 6273, ctx_1195, "call"); + var _return_2637 = + object_define_own_prop( + s2, c, l, name, + desc, true); + log_event("JsInterpreter.js", 6272, ctx_push(ctx_1195, [{key: "#RETURN_VALUE#", val: _return_2637}]), "return"); + return (_return_2637); + }()), function(s3, + x) { + + var ctx_1196 = ctx_push(ctx_1195, [{key: "s3", val: s3}, {key: "x", val: x}]); + log_event("JsInterpreter.js", 6277, ctx_1196, "let"); + var _return_2638 = + res_ter(s3, + res_val( + Coq_value_object( + l))); + log_event("JsInterpreter.js", 6274, ctx_push(ctx_1196, [{key: "#RETURN_VALUE#", val: _return_2638}]), "return"); + return (_return_2638); + }); + log_event("JsInterpreter.js", 6278, ctx_push(ctx_1195, [{key: "#RETURN_VALUE#", val: _return_2639}]), "return"); + return (_return_2639); + }); + log_event("JsInterpreter.js", 6282, ctx_push(ctx_1194, [{key: "#RETURN_VALUE#", val: _return_2640}]), "return"); + return (_return_2640); + }); + log_event("JsInterpreter.js", 6286, ctx_push(ctx_1193, [{key: "#RETURN_VALUE#", val: _return_2641}]), "return"); + return (_return_2641); + } + + + + + case "Coq_prealloc_object_seal":log_event("JsInterpreter.js", 6311, ctx_1169, "case"); + + var v = (function () { + log_event("JsInterpreter.js", 6294, ctx_1169, "call"); + var _return_2642 = get_arg(0, args); + log_event("JsInterpreter.js", 6293, ctx_push(ctx_1169, [{key: "#RETURN_VALUE#", val: _return_2642}]), "return"); + return (_return_2642); + }()) + ; + var ctx_1197 = ctx_push(ctx_1169, [{key: "v", val: v}]); + log_event("JsInterpreter.js", 6310, ctx_1197, "let"); + log_event("JsInterpreter.js", 6309, ctx_1197, "switch"); + switch (v.tag) { + case "Coq_value_prim": + var p = v.value;var ctx_1198 = ctx_push(ctx_1197, [{key: "p", val: p}]); + log_event("JsInterpreter.js", 6298, ctx_1198, "case"); + + var _return_2644 = (function () { + log_event("JsInterpreter.js", 6296, ctx_1198, "call"); + var _return_2643 = run_error(s, Coq_native_error_type()); + log_event("JsInterpreter.js", 6295, ctx_push(ctx_1198, [{key: "#RETURN_VALUE#", val: _return_2643}]), "return"); + return (_return_2643); + }()) + ; + log_event("JsInterpreter.js", 6297, ctx_push(ctx_1198, [{key: "#RETURN_VALUE#", val: _return_2644}]), "return"); + return (_return_2644); + case "Coq_value_object": + var l = v.value;var ctx_1199 = ctx_push(ctx_1197, [{key: "l", val: l}]); + log_event("JsInterpreter.js", 6308, ctx_1199, "case"); + + var _return_2648 = if_some((function () { + log_event("JsInterpreter.js", 6300, ctx_1199, "call"); + var _return_2645 = object_properties_keys_as_list_pickable_option( + s, l); + log_event("JsInterpreter.js", 6299, ctx_push(ctx_1199, [{key: "#RETURN_VALUE#", val: _return_2645}]), "return"); + return (_return_2645); }()), function(_x_) { + + var ctx_1200 = ctx_push(ctx_1199, [{key: "_x_", val: _x_}]); + log_event("JsInterpreter.js", 6306, ctx_1200, "let"); + var _return_2647 = (function () { + log_event("JsInterpreter.js", 6302, ctx_1200, "call"); + var _return_2646 = run_object_seal(s, c, + l, _x_); + log_event("JsInterpreter.js", 6301, ctx_push(ctx_1200, [{key: "#RETURN_VALUE#", val: _return_2646}]), "return"); + return (_return_2646); + }()) + ; + log_event("JsInterpreter.js", 6303, ctx_push(ctx_1200, [{key: "#RETURN_VALUE#", val: _return_2647}]), "return"); + return (_return_2647); + }); + log_event("JsInterpreter.js", 6307, ctx_push(ctx_1199, [{key: "#RETURN_VALUE#", val: _return_2648}]), "return"); + return (_return_2648); + } + + + case "Coq_prealloc_object_freeze":log_event("JsInterpreter.js", 6330, ctx_1169, "case"); + + var v = (function () { + log_event("JsInterpreter.js", 6313, ctx_1169, "call"); + var _return_2649 = get_arg(0, args); + log_event("JsInterpreter.js", 6312, ctx_push(ctx_1169, [{key: "#RETURN_VALUE#", val: _return_2649}]), "return"); + return (_return_2649); + }()) + ; + var ctx_1201 = ctx_push(ctx_1169, [{key: "v", val: v}]); + log_event("JsInterpreter.js", 6329, ctx_1201, "let"); + log_event("JsInterpreter.js", 6328, ctx_1201, "switch"); + switch (v.tag) { + case "Coq_value_prim": + var p = v.value;var ctx_1202 = ctx_push(ctx_1201, [{key: "p", val: p}]); + log_event("JsInterpreter.js", 6317, ctx_1202, "case"); + + var _return_2651 = (function () { + log_event("JsInterpreter.js", 6315, ctx_1202, "call"); + var _return_2650 = run_error(s, Coq_native_error_type()); + log_event("JsInterpreter.js", 6314, ctx_push(ctx_1202, [{key: "#RETURN_VALUE#", val: _return_2650}]), "return"); + return (_return_2650); + }()) + ; + log_event("JsInterpreter.js", 6316, ctx_push(ctx_1202, [{key: "#RETURN_VALUE#", val: _return_2651}]), "return"); + return (_return_2651); + case "Coq_value_object": + var l = v.value;var ctx_1203 = ctx_push(ctx_1201, [{key: "l", val: l}]); + log_event("JsInterpreter.js", 6327, ctx_1203, "case"); + + var _return_2655 = if_some((function () { + log_event("JsInterpreter.js", 6319, ctx_1203, "call"); + var _return_2652 = object_properties_keys_as_list_pickable_option( + s, l); + log_event("JsInterpreter.js", 6318, ctx_push(ctx_1203, [{key: "#RETURN_VALUE#", val: _return_2652}]), "return"); + return (_return_2652); }()), function(_x_) { + + var ctx_1204 = ctx_push(ctx_1203, [{key: "_x_", val: _x_}]); + log_event("JsInterpreter.js", 6325, ctx_1204, "let"); + var _return_2654 = (function () { + log_event("JsInterpreter.js", 6321, ctx_1204, "call"); + var _return_2653 = run_object_freeze(s, c, + l, _x_); + log_event("JsInterpreter.js", 6320, ctx_push(ctx_1204, [{key: "#RETURN_VALUE#", val: _return_2653}]), "return"); + return (_return_2653); + }()) + ; + log_event("JsInterpreter.js", 6322, ctx_push(ctx_1204, [{key: "#RETURN_VALUE#", val: _return_2654}]), "return"); + return (_return_2654); + }); + log_event("JsInterpreter.js", 6326, ctx_push(ctx_1203, [{key: "#RETURN_VALUE#", val: _return_2655}]), "return"); + return (_return_2655); + } + + + case "Coq_prealloc_object_prevent_extensions":log_event("JsInterpreter.js", 6351, ctx_1169, "case"); + + var v = (function () { + log_event("JsInterpreter.js", 6332, ctx_1169, "call"); + var _return_2656 = get_arg(0, args); + log_event("JsInterpreter.js", 6331, ctx_push(ctx_1169, [{key: "#RETURN_VALUE#", val: _return_2656}]), "return"); + return (_return_2656); + }()) + ; + var ctx_1205 = ctx_push(ctx_1169, [{key: "v", val: v}]); + log_event("JsInterpreter.js", 6350, ctx_1205, "let"); + log_event("JsInterpreter.js", 6349, ctx_1205, "switch"); + switch (v.tag) { + case "Coq_value_prim": + var p = v.value;var ctx_1206 = ctx_push(ctx_1205, [{key: "p", val: p}]); + log_event("JsInterpreter.js", 6336, ctx_1206, "case"); + + var _return_2658 = (function () { + log_event("JsInterpreter.js", 6334, ctx_1206, "call"); + var _return_2657 = run_error(s, Coq_native_error_type()); + log_event("JsInterpreter.js", 6333, ctx_push(ctx_1206, [{key: "#RETURN_VALUE#", val: _return_2657}]), "return"); + return (_return_2657); + }()) + ; + log_event("JsInterpreter.js", 6335, ctx_push(ctx_1206, [{key: "#RETURN_VALUE#", val: _return_2658}]), "return"); + return (_return_2658); + case "Coq_value_object": + var l = v.value;var ctx_1207 = ctx_push(ctx_1205, [{key: "l", val: l}]); + log_event("JsInterpreter.js", 6348, ctx_1207, "case"); + + var _return_2662 = if_some((function () { + log_event("JsInterpreter.js", 6338, ctx_1207, "call"); + var _return_2659 = object_binds_pickable_option( + s, l); + log_event("JsInterpreter.js", 6337, ctx_push(ctx_1207, [{key: "#RETURN_VALUE#", val: _return_2659}]), "return"); + return (_return_2659); }()), function(o) { + + var ctx_1208 = ctx_push(ctx_1207, [{key: "o", val: o}]); + log_event("JsInterpreter.js", 6346, ctx_1208, "let"); + var o1 = object_with_extension(o, false); + var ctx_1209 = ctx_push(ctx_1208, [{key: "o1", val: o1}]); + log_event("JsInterpreter.js", 6343, ctx_1209, "let"); + var s_2 = (function () { + log_event("JsInterpreter.js", 6340, ctx_1209, "call"); + var _return_2660 = object_write(s, l, o1); + log_event("JsInterpreter.js", 6339, ctx_push(ctx_1209, [{key: "#RETURN_VALUE#", val: _return_2660}]), "return"); + return (_return_2660); + }()) + ; + var ctx_1210 = ctx_push(ctx_1209, [{key: "s_2", val: s_2}]); + log_event("JsInterpreter.js", 6342, ctx_1210, "let"); + var _return_2661 = res_ter(s_2, + res_val( + Coq_value_object(l))); + log_event("JsInterpreter.js", 6341, ctx_push(ctx_1210, [{key: "#RETURN_VALUE#", val: _return_2661}]), "return"); + return (_return_2661); + + + }); + log_event("JsInterpreter.js", 6347, ctx_push(ctx_1207, [{key: "#RETURN_VALUE#", val: _return_2662}]), "return"); + return (_return_2662); + } + + + case "Coq_prealloc_object_is_sealed":log_event("JsInterpreter.js", 6370, ctx_1169, "case"); + + var v = (function () { + log_event("JsInterpreter.js", 6353, ctx_1169, "call"); + var _return_2663 = get_arg(0, args); + log_event("JsInterpreter.js", 6352, ctx_push(ctx_1169, [{key: "#RETURN_VALUE#", val: _return_2663}]), "return"); + return (_return_2663); + }()) + ; + var ctx_1211 = ctx_push(ctx_1169, [{key: "v", val: v}]); + log_event("JsInterpreter.js", 6369, ctx_1211, "let"); + log_event("JsInterpreter.js", 6368, ctx_1211, "switch"); + switch (v.tag) { + case "Coq_value_prim": + var p = v.value;var ctx_1212 = ctx_push(ctx_1211, [{key: "p", val: p}]); + log_event("JsInterpreter.js", 6357, ctx_1212, "case"); + + var _return_2665 = (function () { + log_event("JsInterpreter.js", 6355, ctx_1212, "call"); + var _return_2664 = run_error(s, Coq_native_error_type()); + log_event("JsInterpreter.js", 6354, ctx_push(ctx_1212, [{key: "#RETURN_VALUE#", val: _return_2664}]), "return"); + return (_return_2664); + }()) + ; + log_event("JsInterpreter.js", 6356, ctx_push(ctx_1212, [{key: "#RETURN_VALUE#", val: _return_2665}]), "return"); + return (_return_2665); + case "Coq_value_object": + var l = v.value;var ctx_1213 = ctx_push(ctx_1211, [{key: "l", val: l}]); + log_event("JsInterpreter.js", 6367, ctx_1213, "case"); + + var _return_2669 = if_some((function () { + log_event("JsInterpreter.js", 6359, ctx_1213, "call"); + var _return_2666 = object_properties_keys_as_list_pickable_option( + s, l); + log_event("JsInterpreter.js", 6358, ctx_push(ctx_1213, [{key: "#RETURN_VALUE#", val: _return_2666}]), "return"); + return (_return_2666); }()), function(_x_) { + + var ctx_1214 = ctx_push(ctx_1213, [{key: "_x_", val: _x_}]); + log_event("JsInterpreter.js", 6365, ctx_1214, "let"); + var _return_2668 = (function () { + log_event("JsInterpreter.js", 6361, ctx_1214, "call"); + var _return_2667 = run_object_is_sealed(s, + c, l, _x_); + log_event("JsInterpreter.js", 6360, ctx_push(ctx_1214, [{key: "#RETURN_VALUE#", val: _return_2667}]), "return"); + return (_return_2667); + }()) + ; + log_event("JsInterpreter.js", 6362, ctx_push(ctx_1214, [{key: "#RETURN_VALUE#", val: _return_2668}]), "return"); + return (_return_2668); + }); + log_event("JsInterpreter.js", 6366, ctx_push(ctx_1213, [{key: "#RETURN_VALUE#", val: _return_2669}]), "return"); + return (_return_2669); + } + + + case "Coq_prealloc_object_is_frozen":log_event("JsInterpreter.js", 6389, ctx_1169, "case"); + + var v = (function () { + log_event("JsInterpreter.js", 6372, ctx_1169, "call"); + var _return_2670 = get_arg(0, args); + log_event("JsInterpreter.js", 6371, ctx_push(ctx_1169, [{key: "#RETURN_VALUE#", val: _return_2670}]), "return"); + return (_return_2670); + }()) + ; + var ctx_1215 = ctx_push(ctx_1169, [{key: "v", val: v}]); + log_event("JsInterpreter.js", 6388, ctx_1215, "let"); + log_event("JsInterpreter.js", 6387, ctx_1215, "switch"); + switch (v.tag) { + case "Coq_value_prim": + var p = v.value;var ctx_1216 = ctx_push(ctx_1215, [{key: "p", val: p}]); + log_event("JsInterpreter.js", 6376, ctx_1216, "case"); + + var _return_2672 = (function () { + log_event("JsInterpreter.js", 6374, ctx_1216, "call"); + var _return_2671 = run_error(s, Coq_native_error_type()); + log_event("JsInterpreter.js", 6373, ctx_push(ctx_1216, [{key: "#RETURN_VALUE#", val: _return_2671}]), "return"); + return (_return_2671); + }()) + ; + log_event("JsInterpreter.js", 6375, ctx_push(ctx_1216, [{key: "#RETURN_VALUE#", val: _return_2672}]), "return"); + return (_return_2672); + case "Coq_value_object": + var l = v.value;var ctx_1217 = ctx_push(ctx_1215, [{key: "l", val: l}]); + log_event("JsInterpreter.js", 6386, ctx_1217, "case"); + + var _return_2676 = if_some((function () { + log_event("JsInterpreter.js", 6378, ctx_1217, "call"); + var _return_2673 = object_properties_keys_as_list_pickable_option( + s, l); + log_event("JsInterpreter.js", 6377, ctx_push(ctx_1217, [{key: "#RETURN_VALUE#", val: _return_2673}]), "return"); + return (_return_2673); }()), function(_x_) { + + var ctx_1218 = ctx_push(ctx_1217, [{key: "_x_", val: _x_}]); + log_event("JsInterpreter.js", 6384, ctx_1218, "let"); + var _return_2675 = (function () { + log_event("JsInterpreter.js", 6380, ctx_1218, "call"); + var _return_2674 = run_object_is_frozen(s, + c, l, _x_); + log_event("JsInterpreter.js", 6379, ctx_push(ctx_1218, [{key: "#RETURN_VALUE#", val: _return_2674}]), "return"); + return (_return_2674); + }()) + ; + log_event("JsInterpreter.js", 6381, ctx_push(ctx_1218, [{key: "#RETURN_VALUE#", val: _return_2675}]), "return"); + return (_return_2675); + }); + log_event("JsInterpreter.js", 6385, ctx_push(ctx_1217, [{key: "#RETURN_VALUE#", val: _return_2676}]), "return"); + return (_return_2676); + } + + + case "Coq_prealloc_object_is_extensible":log_event("JsInterpreter.js", 6406, ctx_1169, "case"); + + var v = (function () { + log_event("JsInterpreter.js", 6391, ctx_1169, "call"); + var _return_2677 = get_arg(0, args); + log_event("JsInterpreter.js", 6390, ctx_push(ctx_1169, [{key: "#RETURN_VALUE#", val: _return_2677}]), "return"); + return (_return_2677); + }()) + ; + var ctx_1219 = ctx_push(ctx_1169, [{key: "v", val: v}]); + log_event("JsInterpreter.js", 6405, ctx_1219, "let"); + log_event("JsInterpreter.js", 6404, ctx_1219, "switch"); + switch (v.tag) { + case "Coq_value_prim": + var p = v.value;var ctx_1220 = ctx_push(ctx_1219, [{key: "p", val: p}]); + log_event("JsInterpreter.js", 6395, ctx_1220, "case"); + + var _return_2679 = (function () { + log_event("JsInterpreter.js", 6393, ctx_1220, "call"); + var _return_2678 = run_error(s, Coq_native_error_type()); + log_event("JsInterpreter.js", 6392, ctx_push(ctx_1220, [{key: "#RETURN_VALUE#", val: _return_2678}]), "return"); + return (_return_2678); + }()) + ; + log_event("JsInterpreter.js", 6394, ctx_push(ctx_1220, [{key: "#RETURN_VALUE#", val: _return_2679}]), "return"); + return (_return_2679); + case "Coq_value_object": + var l = v.value;var ctx_1221 = ctx_push(ctx_1219, [{key: "l", val: l}]); + log_event("JsInterpreter.js", 6403, ctx_1221, "case"); + + var _return_2682 = if_some((function () { + log_event("JsInterpreter.js", 6397, ctx_1221, "call"); + var _return_2680 = run_object_method( + object_extensible_, s, + l); + log_event("JsInterpreter.js", 6396, ctx_push(ctx_1221, [{key: "#RETURN_VALUE#", val: _return_2680}]), "return"); + return (_return_2680); }()), function(r) { + + var ctx_1222 = ctx_push(ctx_1221, [{key: "r", val: r}]); + log_event("JsInterpreter.js", 6401, ctx_1222, "let"); + var _return_2681 = res_ter(s, + res_val( + Coq_value_prim( + Coq_prim_bool(r)))); + log_event("JsInterpreter.js", 6398, ctx_push(ctx_1222, [{key: "#RETURN_VALUE#", val: _return_2681}]), "return"); + return (_return_2681); + }); + log_event("JsInterpreter.js", 6402, ctx_push(ctx_1221, [{key: "#RETURN_VALUE#", val: _return_2682}]), "return"); + return (_return_2682); + } + + + case "Coq_prealloc_object_proto_to_string":log_event("JsInterpreter.js", 6486, ctx_1169, "case"); + + log_event("JsInterpreter.js", 6485, ctx_1169, "switch"); + switch (vthis.tag) { + case "Coq_value_prim": + var p = vthis.value;var ctx_1223 = ctx_push(ctx_1169, [{key: "p", val: p}]); + log_event("JsInterpreter.js", 6466, ctx_1223, "case"); + + log_event("JsInterpreter.js", 6465, ctx_1223, "switch"); + switch (p.tag) { + case "Coq_prim_undef":log_event("JsInterpreter.js", 6408, ctx_1223, "case"); + + var _return_2683 = result_out( + Coq_out_ter(s, + res_val( + Coq_value_prim( + Coq_prim_string( + "[object Undefined]"))))); + log_event("JsInterpreter.js", 6407, ctx_push(ctx_1223, [{key: "#RETURN_VALUE#", val: _return_2683}]), "return"); + return (_return_2683); + case "Coq_prim_null":log_event("JsInterpreter.js", 6410, ctx_1223, "case"); + + var _return_2684 = result_out( + Coq_out_ter(s, + res_val( + Coq_value_prim( + Coq_prim_string("[object Null]"))))); + log_event("JsInterpreter.js", 6409, ctx_push(ctx_1223, [{key: "#RETURN_VALUE#", val: _return_2684}]), "return"); + return (_return_2684); + case "Coq_prim_bool": + var b0 = p.value;var ctx_1224 = ctx_push(ctx_1223, [{key: "b0", val: b0}]); + log_event("JsInterpreter.js", 6428, ctx_1224, "case"); + + var _return_2691 = if_object((function () { + log_event("JsInterpreter.js", 6412, ctx_1224, "call"); + var _return_2685 = to_object(s, vthis); + log_event("JsInterpreter.js", 6411, ctx_push(ctx_1224, [{key: "#RETURN_VALUE#", val: _return_2685}]), "return"); + return (_return_2685); }()), + function(s1, l) { + + var ctx_1225 = ctx_push(ctx_1224, [{key: "s1", val: s1}, {key: "l", val: l}]); + log_event("JsInterpreter.js", 6426, ctx_1225, "let"); + var _return_2690 = if_some( + (function () { + log_event("JsInterpreter.js", 6414, ctx_1225, "call"); + var _return_2686 = + run_object_method( + object_class_, + s1, l); + log_event("JsInterpreter.js", 6413, ctx_push(ctx_1225, [{key: "#RETURN_VALUE#", val: _return_2686}]), "return"); + return (_return_2686); + }()), + function(s0) { + + var ctx_1226 = ctx_push(ctx_1225, [{key: "s0", val: s0}]); + log_event("JsInterpreter.js", 6422, ctx_1226, "let"); + var _return_2689 = + res_ter(s1, + res_val( + Coq_value_prim( + Coq_prim_string( + (function () { + log_event("JsInterpreter.js", 6418, ctx_1226, "call"); + var _return_2688 = + strappend( + "[object ", + (function () { + log_event("JsInterpreter.js", 6416, ctx_1226, "call"); + var _return_2687 = + strappend( + s0, "]"); + log_event("JsInterpreter.js", 6415, ctx_push(ctx_1226, [{key: "#RETURN_VALUE#", val: _return_2687}]), "return"); + return (_return_2687); + }())); + log_event("JsInterpreter.js", 6417, ctx_push(ctx_1226, [{key: "#RETURN_VALUE#", val: _return_2688}]), "return"); + return (_return_2688); + }()))))); + log_event("JsInterpreter.js", 6419, ctx_push(ctx_1226, [{key: "#RETURN_VALUE#", val: _return_2689}]), "return"); + return (_return_2689); + }); + log_event("JsInterpreter.js", 6423, ctx_push(ctx_1225, [{key: "#RETURN_VALUE#", val: _return_2690}]), "return"); + return (_return_2690); + }); + log_event("JsInterpreter.js", 6427, ctx_push(ctx_1224, [{key: "#RETURN_VALUE#", val: _return_2691}]), "return"); + return (_return_2691); + case "Coq_prim_number": + var n = p.value;var ctx_1227 = ctx_push(ctx_1223, [{key: "n", val: n}]); + log_event("JsInterpreter.js", 6446, ctx_1227, "case"); + + var _return_2698 = if_object((function () { + log_event("JsInterpreter.js", 6430, ctx_1227, "call"); + var _return_2692 = to_object(s, vthis); + log_event("JsInterpreter.js", 6429, ctx_push(ctx_1227, [{key: "#RETURN_VALUE#", val: _return_2692}]), "return"); + return (_return_2692); }()), + function(s1, l) { + + var ctx_1228 = ctx_push(ctx_1227, [{key: "s1", val: s1}, {key: "l", val: l}]); + log_event("JsInterpreter.js", 6444, ctx_1228, "let"); + var _return_2697 = if_some( + (function () { + log_event("JsInterpreter.js", 6432, ctx_1228, "call"); + var _return_2693 = + run_object_method( + object_class_, + s1, l); + log_event("JsInterpreter.js", 6431, ctx_push(ctx_1228, [{key: "#RETURN_VALUE#", val: _return_2693}]), "return"); + return (_return_2693); + }()), + function(s0) { + + var ctx_1229 = ctx_push(ctx_1228, [{key: "s0", val: s0}]); + log_event("JsInterpreter.js", 6440, ctx_1229, "let"); + var _return_2696 = + res_ter(s1, + res_val( + Coq_value_prim( + Coq_prim_string( + (function () { + log_event("JsInterpreter.js", 6436, ctx_1229, "call"); + var _return_2695 = + strappend( + "[object ", + (function () { + log_event("JsInterpreter.js", 6434, ctx_1229, "call"); + var _return_2694 = + strappend( + s0, "]"); + log_event("JsInterpreter.js", 6433, ctx_push(ctx_1229, [{key: "#RETURN_VALUE#", val: _return_2694}]), "return"); + return (_return_2694); + }())); + log_event("JsInterpreter.js", 6435, ctx_push(ctx_1229, [{key: "#RETURN_VALUE#", val: _return_2695}]), "return"); + return (_return_2695); + }()))))); + log_event("JsInterpreter.js", 6437, ctx_push(ctx_1229, [{key: "#RETURN_VALUE#", val: _return_2696}]), "return"); + return (_return_2696); + }); + log_event("JsInterpreter.js", 6441, ctx_push(ctx_1228, [{key: "#RETURN_VALUE#", val: _return_2697}]), "return"); + return (_return_2697); + }); + log_event("JsInterpreter.js", 6445, ctx_push(ctx_1227, [{key: "#RETURN_VALUE#", val: _return_2698}]), "return"); + return (_return_2698); + case "Coq_prim_string": + var s0 = p.value;var ctx_1230 = ctx_push(ctx_1223, [{key: "s0", val: s0}]); + log_event("JsInterpreter.js", 6464, ctx_1230, "case"); + + var _return_2705 = if_object((function () { + log_event("JsInterpreter.js", 6448, ctx_1230, "call"); + var _return_2699 = to_object(s, vthis); + log_event("JsInterpreter.js", 6447, ctx_push(ctx_1230, [{key: "#RETURN_VALUE#", val: _return_2699}]), "return"); + return (_return_2699); }()), + function(s1, l) { + + var ctx_1231 = ctx_push(ctx_1230, [{key: "s1", val: s1}, {key: "l", val: l}]); + log_event("JsInterpreter.js", 6462, ctx_1231, "let"); + var _return_2704 = if_some( + (function () { + log_event("JsInterpreter.js", 6450, ctx_1231, "call"); + var _return_2700 = + run_object_method( + object_class_, + s1, l); + log_event("JsInterpreter.js", 6449, ctx_push(ctx_1231, [{key: "#RETURN_VALUE#", val: _return_2700}]), "return"); + return (_return_2700); + }()), + function(s2) { + + var ctx_1232 = ctx_push(ctx_1231, [{key: "s2", val: s2}]); + log_event("JsInterpreter.js", 6458, ctx_1232, "let"); + var _return_2703 = + res_ter(s1, + res_val( + Coq_value_prim( + Coq_prim_string( + (function () { + log_event("JsInterpreter.js", 6454, ctx_1232, "call"); + var _return_2702 = + strappend( + "[object ", + (function () { + log_event("JsInterpreter.js", 6452, ctx_1232, "call"); + var _return_2701 = + strappend( + s2, "]"); + log_event("JsInterpreter.js", 6451, ctx_push(ctx_1232, [{key: "#RETURN_VALUE#", val: _return_2701}]), "return"); + return (_return_2701); + }())); + log_event("JsInterpreter.js", 6453, ctx_push(ctx_1232, [{key: "#RETURN_VALUE#", val: _return_2702}]), "return"); + return (_return_2702); + }()))))); + log_event("JsInterpreter.js", 6455, ctx_push(ctx_1232, [{key: "#RETURN_VALUE#", val: _return_2703}]), "return"); + return (_return_2703); + }); + log_event("JsInterpreter.js", 6459, ctx_push(ctx_1231, [{key: "#RETURN_VALUE#", val: _return_2704}]), "return"); + return (_return_2704); + }); + log_event("JsInterpreter.js", 6463, ctx_push(ctx_1230, [{key: "#RETURN_VALUE#", val: _return_2705}]), "return"); + return (_return_2705); + } + + case "Coq_value_object": + var o = vthis.value;var ctx_1233 = ctx_push(ctx_1169, [{key: "o", val: o}]); + log_event("JsInterpreter.js", 6484, ctx_1233, "case"); + + var _return_2712 = if_object((function () { + log_event("JsInterpreter.js", 6468, ctx_1233, "call"); + var _return_2706 = to_object(s, vthis); + log_event("JsInterpreter.js", 6467, ctx_push(ctx_1233, [{key: "#RETURN_VALUE#", val: _return_2706}]), "return"); + return (_return_2706); }()), function(s1, + l) { + + var ctx_1234 = ctx_push(ctx_1233, [{key: "s1", val: s1}, {key: "l", val: l}]); + log_event("JsInterpreter.js", 6482, ctx_1234, "let"); + var _return_2711 = if_some((function () { + log_event("JsInterpreter.js", 6470, ctx_1234, "call"); + var _return_2707 = + run_object_method( + object_class_, s1, + l); + log_event("JsInterpreter.js", 6469, ctx_push(ctx_1234, [{key: "#RETURN_VALUE#", val: _return_2707}]), "return"); + return (_return_2707); + }()), function(s0) { + + var ctx_1235 = ctx_push(ctx_1234, [{key: "s0", val: s0}]); + log_event("JsInterpreter.js", 6478, ctx_1235, "let"); + var _return_2710 = + res_ter(s1, + res_val( + Coq_value_prim( + Coq_prim_string( + (function () { + log_event("JsInterpreter.js", 6474, ctx_1235, "call"); + var _return_2709 = + strappend( + "[object ", + (function () { + log_event("JsInterpreter.js", 6472, ctx_1235, "call"); + var _return_2708 = + strappend( + s0, "]"); + log_event("JsInterpreter.js", 6471, ctx_push(ctx_1235, [{key: "#RETURN_VALUE#", val: _return_2708}]), "return"); + return (_return_2708); + }())); + log_event("JsInterpreter.js", 6473, ctx_push(ctx_1235, [{key: "#RETURN_VALUE#", val: _return_2709}]), "return"); + return (_return_2709); + }()))))); + log_event("JsInterpreter.js", 6475, ctx_push(ctx_1235, [{key: "#RETURN_VALUE#", val: _return_2710}]), "return"); + return (_return_2710); + }); + log_event("JsInterpreter.js", 6479, ctx_push(ctx_1234, [{key: "#RETURN_VALUE#", val: _return_2711}]), "return"); + return (_return_2711); + }); + log_event("JsInterpreter.js", 6483, ctx_push(ctx_1233, [{key: "#RETURN_VALUE#", val: _return_2712}]), "return"); + return (_return_2712); + } + + case "Coq_prealloc_object_proto_value_of":log_event("JsInterpreter.js", 6490, ctx_1169, "case"); + + var _return_2714 = (function () { + log_event("JsInterpreter.js", 6488, ctx_1169, "call"); + var _return_2713 = to_object(s, vthis); + log_event("JsInterpreter.js", 6487, ctx_push(ctx_1169, [{key: "#RETURN_VALUE#", val: _return_2713}]), "return"); + return (_return_2713); + }()) + ; + log_event("JsInterpreter.js", 6489, ctx_push(ctx_1169, [{key: "#RETURN_VALUE#", val: _return_2714}]), "return"); + return (_return_2714); + case "Coq_prealloc_object_proto_has_own_prop":log_event("JsInterpreter.js", 6517, ctx_1169, "case"); + + var v = (function () { + log_event("JsInterpreter.js", 6492, ctx_1169, "call"); + var _return_2715 = get_arg(0, args); + log_event("JsInterpreter.js", 6491, ctx_push(ctx_1169, [{key: "#RETURN_VALUE#", val: _return_2715}]), "return"); + return (_return_2715); + }()) + ; + var ctx_1236 = ctx_push(ctx_1169, [{key: "v", val: v}]); + log_event("JsInterpreter.js", 6516, ctx_1236, "let"); + var _return_2723 = if_string((function () { + log_event("JsInterpreter.js", 6494, ctx_1236, "call"); + var _return_2716 = to_string(s, c, v); + log_event("JsInterpreter.js", 6493, ctx_push(ctx_1236, [{key: "#RETURN_VALUE#", val: _return_2716}]), "return"); + return (_return_2716); }()), function(s1, x) { + + var ctx_1237 = ctx_push(ctx_1236, [{key: "s1", val: s1}, {key: "x", val: x}]); + log_event("JsInterpreter.js", 6514, ctx_1237, "let"); + var _return_2722 = if_object((function () { + log_event("JsInterpreter.js", 6496, ctx_1237, "call"); + var _return_2717 = + to_object(s1, vthis); + log_event("JsInterpreter.js", 6495, ctx_push(ctx_1237, [{key: "#RETURN_VALUE#", val: _return_2717}]), "return"); + return (_return_2717); + }()), function(s2, l) { + + var ctx_1238 = ctx_push(ctx_1237, [{key: "s2", val: s2}, {key: "l", val: l}]); + log_event("JsInterpreter.js", 6510, ctx_1238, "let"); + var _return_2721 = + if_run((function () { + log_event("JsInterpreter.js", 6498, ctx_1238, "call"); + var _return_2718 = + run_object_get_own_prop( + s2, c, l, x); + log_event("JsInterpreter.js", 6497, ctx_push(ctx_1238, [{key: "#RETURN_VALUE#", val: _return_2718}]), "return"); + return (_return_2718); + }()), function(s3, d) { + + var ctx_1239 = ctx_push(ctx_1238, [{key: "s3", val: s3}, {key: "d", val: d}]); + log_event("JsInterpreter.js", 6506, ctx_1239, "let"); + log_event("JsInterpreter.js", 6503, ctx_1239, "switch"); + switch (d.tag) { + case "Coq_full_descriptor_undef":log_event("JsInterpreter.js", 6500, ctx_1239, "case"); + + var _return_2719 = + res_ter(s3, + res_val( + Coq_value_prim( + Coq_prim_bool( + false)))); + log_event("JsInterpreter.js", 6499, ctx_push(ctx_1239, [{key: "#RETURN_VALUE#", val: _return_2719}]), "return"); + return (_return_2719); + case "Coq_full_descriptor_some": + var a = d.value;var ctx_1240 = ctx_push(ctx_1239, [{key: "a", val: a}]); + log_event("JsInterpreter.js", 6502, ctx_1240, "case"); + + var _return_2720 = + res_ter(s3, + res_val( + Coq_value_prim( + Coq_prim_bool( + true)))); + log_event("JsInterpreter.js", 6501, ctx_push(ctx_1240, [{key: "#RETURN_VALUE#", val: _return_2720}]), "return"); + return (_return_2720); + } + + }); + log_event("JsInterpreter.js", 6507, ctx_push(ctx_1238, [{key: "#RETURN_VALUE#", val: _return_2721}]), "return"); + return (_return_2721); + }); + log_event("JsInterpreter.js", 6511, ctx_push(ctx_1237, [{key: "#RETURN_VALUE#", val: _return_2722}]), "return"); + return (_return_2722); + }); + log_event("JsInterpreter.js", 6515, ctx_push(ctx_1236, [{key: "#RETURN_VALUE#", val: _return_2723}]), "return"); + return (_return_2723); + + case "Coq_prealloc_object_proto_is_prototype_of":log_event("JsInterpreter.js", 6534, ctx_1169, "case"); + + var v = (function () { + log_event("JsInterpreter.js", 6519, ctx_1169, "call"); + var _return_2724 = get_arg(0, args); + log_event("JsInterpreter.js", 6518, ctx_push(ctx_1169, [{key: "#RETURN_VALUE#", val: _return_2724}]), "return"); + return (_return_2724); + }()) + ; + var ctx_1241 = ctx_push(ctx_1169, [{key: "v", val: v}]); + log_event("JsInterpreter.js", 6533, ctx_1241, "let"); + log_event("JsInterpreter.js", 6532, ctx_1241, "switch"); + switch (v.tag) { + case "Coq_value_prim": + var p = v.value;var ctx_1242 = ctx_push(ctx_1241, [{key: "p", val: p}]); + log_event("JsInterpreter.js", 6521, ctx_1242, "case"); + + var _return_2725 = result_out( + Coq_out_ter(s, + res_val( + Coq_value_prim(Coq_prim_bool(false))))); + log_event("JsInterpreter.js", 6520, ctx_push(ctx_1242, [{key: "#RETURN_VALUE#", val: _return_2725}]), "return"); + return (_return_2725); + case "Coq_value_object": + var l = v.value;var ctx_1243 = ctx_push(ctx_1241, [{key: "l", val: l}]); + log_event("JsInterpreter.js", 6531, ctx_1243, "case"); + + var _return_2729 = if_object((function () { + log_event("JsInterpreter.js", 6523, ctx_1243, "call"); + var _return_2726 = to_object(s, vthis); + log_event("JsInterpreter.js", 6522, ctx_push(ctx_1243, [{key: "#RETURN_VALUE#", val: _return_2726}]), "return"); + return (_return_2726); }()), function(s1, + lo) { + + var ctx_1244 = ctx_push(ctx_1243, [{key: "s1", val: s1}, {key: "lo", val: lo}]); + log_event("JsInterpreter.js", 6529, ctx_1244, "let"); + var _return_2728 = (function () { + log_event("JsInterpreter.js", 6525, ctx_1244, "call"); + var _return_2727 = object_proto_is_prototype_of( + s1, lo, l); + log_event("JsInterpreter.js", 6524, ctx_push(ctx_1244, [{key: "#RETURN_VALUE#", val: _return_2727}]), "return"); + return (_return_2727); + }()) + ; + log_event("JsInterpreter.js", 6526, ctx_push(ctx_1244, [{key: "#RETURN_VALUE#", val: _return_2728}]), "return"); + return (_return_2728); + }); + log_event("JsInterpreter.js", 6530, ctx_push(ctx_1243, [{key: "#RETURN_VALUE#", val: _return_2729}]), "return"); + return (_return_2729); + } + + + case "Coq_prealloc_object_proto_prop_is_enumerable":log_event("JsInterpreter.js", 6563, ctx_1169, "case"); + + var v = (function () { + log_event("JsInterpreter.js", 6536, ctx_1169, "call"); + var _return_2730 = get_arg(0, args); + log_event("JsInterpreter.js", 6535, ctx_push(ctx_1169, [{key: "#RETURN_VALUE#", val: _return_2730}]), "return"); + return (_return_2730); + }()) + ; + var ctx_1245 = ctx_push(ctx_1169, [{key: "v", val: v}]); + log_event("JsInterpreter.js", 6562, ctx_1245, "let"); + var _return_2739 = if_string((function () { + log_event("JsInterpreter.js", 6538, ctx_1245, "call"); + var _return_2731 = to_string(s, c, v); + log_event("JsInterpreter.js", 6537, ctx_push(ctx_1245, [{key: "#RETURN_VALUE#", val: _return_2731}]), "return"); + return (_return_2731); }()), function(s1, x) { + + var ctx_1246 = ctx_push(ctx_1245, [{key: "s1", val: s1}, {key: "x", val: x}]); + log_event("JsInterpreter.js", 6560, ctx_1246, "let"); + var _return_2738 = if_object((function () { + log_event("JsInterpreter.js", 6540, ctx_1246, "call"); + var _return_2732 = + to_object(s1, vthis); + log_event("JsInterpreter.js", 6539, ctx_push(ctx_1246, [{key: "#RETURN_VALUE#", val: _return_2732}]), "return"); + return (_return_2732); + }()), function(s2, l) { + + var ctx_1247 = ctx_push(ctx_1246, [{key: "s2", val: s2}, {key: "l", val: l}]); + log_event("JsInterpreter.js", 6556, ctx_1247, "let"); + var _return_2737 = + if_run((function () { + log_event("JsInterpreter.js", 6542, ctx_1247, "call"); + var _return_2733 = + run_object_get_own_prop( + s2, c, l, x); + log_event("JsInterpreter.js", 6541, ctx_push(ctx_1247, [{key: "#RETURN_VALUE#", val: _return_2733}]), "return"); + return (_return_2733); + }()), function(s3, d) { + + var ctx_1248 = ctx_push(ctx_1247, [{key: "s3", val: s3}, {key: "d", val: d}]); + log_event("JsInterpreter.js", 6552, ctx_1248, "let"); + log_event("JsInterpreter.js", 6549, ctx_1248, "switch"); + switch (d.tag) { + case "Coq_full_descriptor_undef":log_event("JsInterpreter.js", 6544, ctx_1248, "case"); + + var _return_2734 = + res_ter(s3, + res_val( + Coq_value_prim( + Coq_prim_bool( + false)))); + log_event("JsInterpreter.js", 6543, ctx_push(ctx_1248, [{key: "#RETURN_VALUE#", val: _return_2734}]), "return"); + return (_return_2734); + case "Coq_full_descriptor_some": + var a = d.value;var ctx_1249 = ctx_push(ctx_1248, [{key: "a", val: a}]); + log_event("JsInterpreter.js", 6548, ctx_1249, "case"); + + var _return_2736 = + res_ter(s3, + res_val( + Coq_value_prim( + Coq_prim_bool( + (function () { + log_event("JsInterpreter.js", 6546, ctx_1249, "call"); + var _return_2735 = + attributes_enumerable( + a); + log_event("JsInterpreter.js", 6545, ctx_push(ctx_1249, [{key: "#RETURN_VALUE#", val: _return_2735}]), "return"); + return (_return_2735); + }()))))); + log_event("JsInterpreter.js", 6547, ctx_push(ctx_1249, [{key: "#RETURN_VALUE#", val: _return_2736}]), "return"); + return (_return_2736); + } + + }); + log_event("JsInterpreter.js", 6553, ctx_push(ctx_1247, [{key: "#RETURN_VALUE#", val: _return_2737}]), "return"); + return (_return_2737); + }); + log_event("JsInterpreter.js", 6557, ctx_push(ctx_1246, [{key: "#RETURN_VALUE#", val: _return_2738}]), "return"); + return (_return_2738); + }); + log_event("JsInterpreter.js", 6561, ctx_push(ctx_1245, [{key: "#RETURN_VALUE#", val: _return_2739}]), "return"); + return (_return_2739); + + case "Coq_prealloc_function_proto":log_event("JsInterpreter.js", 6565, ctx_1169, "case"); + + var _return_2740 = result_out( + Coq_out_ter(s, + res_val(Coq_value_prim(Coq_prim_undef())))); + log_event("JsInterpreter.js", 6564, ctx_push(ctx_1169, [{key: "#RETURN_VALUE#", val: _return_2740}]), "return"); + return (_return_2740); + case "Coq_prealloc_function_proto_to_string":log_event("JsInterpreter.js", 6579, ctx_1169, "case"); + + var _if_arg_2741 = (function () { + log_event("JsInterpreter.js", 6567, ctx_1169, "call"); + var _return_2742 = is_callable_dec(s, vthis); + log_event("JsInterpreter.js", 6566, ctx_push(ctx_1169, [{key: "#RETURN_VALUE#", val: _return_2742}]), "return"); + return (_return_2742); + }()) + ; + log_event("JsInterpreter.js", 6578, ctx_1169, "if"); + if (_if_arg_2741) { + var _return_2748 = (function () { + log_event("JsInterpreter.js", 6576, ctx_1169, "call"); + var _return_2747 = function (s) { + var ctx_1250 = ctx_push(ctx_1169, [{key: "s", val: s}]); + log_event("JsInterpreter.js", 6574, ctx_1250, "enter"); + (function () { + log_event("JsInterpreter.js", 6573, ctx_1250, "call"); + var _return_2746 = Debug.not_yet_implemented_because( + __LOC__, s); + log_event("JsInterpreter.js", 6572, ctx_push(ctx_1250, [{key: "#RETURN_VALUE#", val: _return_2746}]), "return"); + return (_return_2746); + }()) + ; + var _return_2745 = Coq_result_not_yet_implemented( + ); + log_event("JsInterpreter.js", 6571, ctx_push(ctx_1250, [{key: "#RETURN_VALUE#", val: _return_2745}]), "return"); + return (_return_2745); }( + "Function.prototype.toString() is implementation dependent."); + log_event("JsInterpreter.js", 6575, ctx_push(ctx_1169, [{key: "#RETURN_VALUE#", val: _return_2747}]), "return"); + return (_return_2747); + }()) + ; + log_event("JsInterpreter.js", 6577, ctx_push(ctx_1169, [{key: "#RETURN_VALUE#", val: _return_2748}]), "return"); + return (_return_2748); + } else { + var _return_2744 = (function () { + log_event("JsInterpreter.js", 6569, ctx_1169, "call"); + var _return_2743 = run_error(s, Coq_native_error_type()); + log_event("JsInterpreter.js", 6568, ctx_push(ctx_1169, [{key: "#RETURN_VALUE#", val: _return_2743}]), "return"); + return (_return_2743); + }()) + ; + log_event("JsInterpreter.js", 6570, ctx_push(ctx_1169, [{key: "#RETURN_VALUE#", val: _return_2744}]), "return"); + return (_return_2744); + } + case "Coq_prealloc_function_proto_apply":log_event("JsInterpreter.js", 6647, ctx_1169, "case"); + + var thisArg = (function () { + log_event("JsInterpreter.js", 6581, ctx_1169, "call"); + var _return_2749 = get_arg(0, args); + log_event("JsInterpreter.js", 6580, ctx_push(ctx_1169, [{key: "#RETURN_VALUE#", val: _return_2749}]), "return"); + return (_return_2749); + }()) + ; + var ctx_1251 = ctx_push(ctx_1169, [{key: "thisArg", val: thisArg}]); + log_event("JsInterpreter.js", 6646, ctx_1251, "let"); + var argArray = (function () { + log_event("JsInterpreter.js", 6583, ctx_1251, "call"); + var _return_2750 = get_arg(1, args); + log_event("JsInterpreter.js", 6582, ctx_push(ctx_1251, [{key: "#RETURN_VALUE#", val: _return_2750}]), "return"); + return (_return_2750); + }()) + ; + var ctx_1252 = ctx_push(ctx_1251, [{key: "argArray", val: argArray}]); + log_event("JsInterpreter.js", 6645, ctx_1252, "let"); + var _if_arg_2751 = (function () { + log_event("JsInterpreter.js", 6585, ctx_1252, "call"); + var _return_2752 = is_callable_dec(s, vthis); + log_event("JsInterpreter.js", 6584, ctx_push(ctx_1252, [{key: "#RETURN_VALUE#", val: _return_2752}]), "return"); + return (_return_2752); + }()) + ; + log_event("JsInterpreter.js", 6644, ctx_1252, "if"); + if (_if_arg_2751) { + log_event("JsInterpreter.js", 6643, ctx_1252, "switch"); + switch (vthis.tag) { + case "Coq_value_prim": + var p = vthis.value;var ctx_1253 = ctx_push(ctx_1252, [{key: "p", val: p}]); + log_event("JsInterpreter.js", 6596, ctx_1253, "case"); + + var _return_2758 = (function () { + log_event("JsInterpreter.js", 6594, ctx_1253, "call"); + var _return_2757 = function (s, m) { + var ctx_1254 = ctx_push(ctx_1253, [{key: "s", val: s}, {key: "m", val: m}]); + log_event("JsInterpreter.js", 6592, ctx_1254, "enter"); + (function () { + log_event("JsInterpreter.js", 6591, ctx_1254, "call"); + var _return_2756 = Debug.impossible_with_heap_because( + __LOC__, s, m); + log_event("JsInterpreter.js", 6590, ctx_push(ctx_1254, [{key: "#RETURN_VALUE#", val: _return_2756}]), "return"); + return (_return_2756); + }()) + ; + var _return_2755 = Coq_result_impossible( + ); + log_event("JsInterpreter.js", 6589, ctx_push(ctx_1254, [{key: "#RETURN_VALUE#", val: _return_2755}]), "return"); + return (_return_2755); }(s, + "Value is callable, but isn't an object."); + log_event("JsInterpreter.js", 6593, ctx_push(ctx_1253, [{key: "#RETURN_VALUE#", val: _return_2757}]), "return"); + return (_return_2757); + }()) + ; + log_event("JsInterpreter.js", 6595, ctx_push(ctx_1253, [{key: "#RETURN_VALUE#", val: _return_2758}]), "return"); + return (_return_2758); + case "Coq_value_object": + var thisobj = vthis.value;var ctx_1255 = ctx_push(ctx_1252, [{key: "thisobj", val: thisobj}]); + log_event("JsInterpreter.js", 6642, ctx_1255, "case"); + + log_event("JsInterpreter.js", 6641, ctx_1255, "switch"); + switch (argArray.tag) { + case "Coq_value_prim": + var p = argArray.value;var ctx_1256 = ctx_push(ctx_1255, [{key: "p", val: p}]); + log_event("JsInterpreter.js", 6618, ctx_1256, "case"); + + log_event("JsInterpreter.js", 6617, ctx_1256, "switch"); + switch (p.tag) { + case "Coq_prim_undef":log_event("JsInterpreter.js", 6600, ctx_1256, "case"); + + var _return_2760 = (function () { + log_event("JsInterpreter.js", 6598, ctx_1256, "call"); + var _return_2759 = run_call(s, c, thisobj, thisArg, + mk_nil()); + log_event("JsInterpreter.js", 6597, ctx_push(ctx_1256, [{key: "#RETURN_VALUE#", val: _return_2759}]), "return"); + return (_return_2759); + }()) + ; + log_event("JsInterpreter.js", 6599, ctx_push(ctx_1256, [{key: "#RETURN_VALUE#", val: _return_2760}]), "return"); + return (_return_2760); + case "Coq_prim_null":log_event("JsInterpreter.js", 6604, ctx_1256, "case"); + + var _return_2762 = (function () { + log_event("JsInterpreter.js", 6602, ctx_1256, "call"); + var _return_2761 = run_call(s, c, thisobj, thisArg, + mk_nil()); + log_event("JsInterpreter.js", 6601, ctx_push(ctx_1256, [{key: "#RETURN_VALUE#", val: _return_2761}]), "return"); + return (_return_2761); + }()) + ; + log_event("JsInterpreter.js", 6603, ctx_push(ctx_1256, [{key: "#RETURN_VALUE#", val: _return_2762}]), "return"); + return (_return_2762); + case "Coq_prim_bool": + var b0 = p.value;var ctx_1257 = ctx_push(ctx_1256, [{key: "b0", val: b0}]); + log_event("JsInterpreter.js", 6608, ctx_1257, "case"); + + var _return_2764 = (function () { + log_event("JsInterpreter.js", 6606, ctx_1257, "call"); + var _return_2763 = run_error(s, + Coq_native_error_type()); + log_event("JsInterpreter.js", 6605, ctx_push(ctx_1257, [{key: "#RETURN_VALUE#", val: _return_2763}]), "return"); + return (_return_2763); + }()) + ; + log_event("JsInterpreter.js", 6607, ctx_push(ctx_1257, [{key: "#RETURN_VALUE#", val: _return_2764}]), "return"); + return (_return_2764); + case "Coq_prim_number": + var n = p.value;var ctx_1258 = ctx_push(ctx_1256, [{key: "n", val: n}]); + log_event("JsInterpreter.js", 6612, ctx_1258, "case"); + + var _return_2766 = (function () { + log_event("JsInterpreter.js", 6610, ctx_1258, "call"); + var _return_2765 = run_error(s, + Coq_native_error_type()); + log_event("JsInterpreter.js", 6609, ctx_push(ctx_1258, [{key: "#RETURN_VALUE#", val: _return_2765}]), "return"); + return (_return_2765); + }()) + ; + log_event("JsInterpreter.js", 6611, ctx_push(ctx_1258, [{key: "#RETURN_VALUE#", val: _return_2766}]), "return"); + return (_return_2766); + case "Coq_prim_string": + var s0 = p.value;var ctx_1259 = ctx_push(ctx_1256, [{key: "s0", val: s0}]); + log_event("JsInterpreter.js", 6616, ctx_1259, "case"); + + var _return_2768 = (function () { + log_event("JsInterpreter.js", 6614, ctx_1259, "call"); + var _return_2767 = run_error(s, + Coq_native_error_type()); + log_event("JsInterpreter.js", 6613, ctx_push(ctx_1259, [{key: "#RETURN_VALUE#", val: _return_2767}]), "return"); + return (_return_2767); + }()) + ; + log_event("JsInterpreter.js", 6615, ctx_push(ctx_1259, [{key: "#RETURN_VALUE#", val: _return_2768}]), "return"); + return (_return_2768); + } + + case "Coq_value_object": + var array = argArray.value;var ctx_1260 = ctx_push(ctx_1255, [{key: "array", val: array}]); + log_event("JsInterpreter.js", 6640, ctx_1260, "case"); + + var _return_2776 = if_value((function () { + log_event("JsInterpreter.js", 6620, ctx_1260, "call"); + var _return_2769 = run_object_get(s, + c, array, + "length"); + log_event("JsInterpreter.js", 6619, ctx_push(ctx_1260, [{key: "#RETURN_VALUE#", val: _return_2769}]), "return"); + return (_return_2769); }()), + function(s0, v) { + + var ctx_1261 = ctx_push(ctx_1260, [{key: "s0", val: s0}, {key: "v", val: v}]); + log_event("JsInterpreter.js", 6638, ctx_1261, "let"); + var _return_2775 = if_run( + (function () { + log_event("JsInterpreter.js", 6622, ctx_1261, "call"); + var _return_2770 = + to_uint32(s0, + c, v); + log_event("JsInterpreter.js", 6621, ctx_push(ctx_1261, [{key: "#RETURN_VALUE#", val: _return_2770}]), "return"); + return (_return_2770); + }()), + function(s1, + ilen) { + + var ctx_1262 = ctx_push(ctx_1261, [{key: "s1", val: s1}, {key: "ilen", val: ilen}]); + log_event("JsInterpreter.js", 6634, ctx_1262, "let"); + var _return_2774 = + if_run( + (function () { + log_event("JsInterpreter.js", 6624, ctx_1262, "call"); + var _return_2771 = + run_get_args_for_apply( + s1, c, + array, + 0., ilen); + log_event("JsInterpreter.js", 6623, ctx_push(ctx_1262, [{key: "#RETURN_VALUE#", val: _return_2771}]), "return"); + return (_return_2771); + }()), + function(s2, + arguments_) { + + var ctx_1263 = ctx_push(ctx_1262, [{key: "s2", val: s2}, {key: "arguments_", val: arguments_}]); + log_event("JsInterpreter.js", 6630, ctx_1263, "let"); + var _return_2773 = (function () { + log_event("JsInterpreter.js", 6626, ctx_1263, "call"); + var _return_2772 = + run_call( + s2, c, + thisobj, + thisArg, + arguments_); + log_event("JsInterpreter.js", 6625, ctx_push(ctx_1263, [{key: "#RETURN_VALUE#", val: _return_2772}]), "return"); + return (_return_2772); + }()) + ; + log_event("JsInterpreter.js", 6627, ctx_push(ctx_1263, [{key: "#RETURN_VALUE#", val: _return_2773}]), "return"); + return (_return_2773); + }); + log_event("JsInterpreter.js", 6631, ctx_push(ctx_1262, [{key: "#RETURN_VALUE#", val: _return_2774}]), "return"); + return (_return_2774); + }); + log_event("JsInterpreter.js", 6635, ctx_push(ctx_1261, [{key: "#RETURN_VALUE#", val: _return_2775}]), "return"); + return (_return_2775); + }); + log_event("JsInterpreter.js", 6639, ctx_push(ctx_1260, [{key: "#RETURN_VALUE#", val: _return_2776}]), "return"); + return (_return_2776); + } + + } + + } else { + var _return_2754 = (function () { + log_event("JsInterpreter.js", 6587, ctx_1252, "call"); + var _return_2753 = run_error(s, Coq_native_error_type()); + log_event("JsInterpreter.js", 6586, ctx_push(ctx_1252, [{key: "#RETURN_VALUE#", val: _return_2753}]), "return"); + return (_return_2753); + }()) + ; + log_event("JsInterpreter.js", 6588, ctx_push(ctx_1252, [{key: "#RETURN_VALUE#", val: _return_2754}]), "return"); + return (_return_2754); + } + + + case "Coq_prealloc_function_proto_call":log_event("JsInterpreter.js", 6670, ctx_1169, "case"); + + var _if_arg_2777 = (function () { + log_event("JsInterpreter.js", 6649, ctx_1169, "call"); + var _return_2778 = is_callable_dec(s, vthis); + log_event("JsInterpreter.js", 6648, ctx_push(ctx_1169, [{key: "#RETURN_VALUE#", val: _return_2778}]), "return"); + return (_return_2778); + }()) + ; + log_event("JsInterpreter.js", 6669, ctx_1169, "if"); + if (_if_arg_2777) { + log_event("JsInterpreter.js", 6668, ctx_1169, "switch"); + switch (vthis.tag) { + case "Coq_value_prim": + var p = vthis.value;var ctx_1264 = ctx_push(ctx_1169, [{key: "p", val: p}]); + log_event("JsInterpreter.js", 6660, ctx_1264, "case"); + + var _return_2784 = (function () { + log_event("JsInterpreter.js", 6658, ctx_1264, "call"); + var _return_2783 = function (s, m) { + var ctx_1265 = ctx_push(ctx_1264, [{key: "s", val: s}, {key: "m", val: m}]); + log_event("JsInterpreter.js", 6656, ctx_1265, "enter"); + (function () { + log_event("JsInterpreter.js", 6655, ctx_1265, "call"); + var _return_2782 = Debug.impossible_with_heap_because( + __LOC__, s, m); + log_event("JsInterpreter.js", 6654, ctx_push(ctx_1265, [{key: "#RETURN_VALUE#", val: _return_2782}]), "return"); + return (_return_2782); + }()) + ; + var _return_2781 = Coq_result_impossible( + ); + log_event("JsInterpreter.js", 6653, ctx_push(ctx_1265, [{key: "#RETURN_VALUE#", val: _return_2781}]), "return"); + return (_return_2781); }(s, + "Value is callable, but isn't an object."); + log_event("JsInterpreter.js", 6657, ctx_push(ctx_1264, [{key: "#RETURN_VALUE#", val: _return_2783}]), "return"); + return (_return_2783); + }()) + ; + log_event("JsInterpreter.js", 6659, ctx_push(ctx_1264, [{key: "#RETURN_VALUE#", val: _return_2784}]), "return"); + return (_return_2784); + case "Coq_value_object": + var thisobj = vthis.value;var ctx_1266 = ctx_push(ctx_1169, [{key: "thisobj", val: thisobj}]); + log_event("JsInterpreter.js", 6667, ctx_1266, "case"); + + var _tuple_arg_2785 = (function () { + log_event("JsInterpreter.js", 6662, ctx_1266, "call"); + var _return_2786 = get_arg_first_and_rest(args); + log_event("JsInterpreter.js", 6661, ctx_push(ctx_1266, [{key: "#RETURN_VALUE#", val: _return_2786}]), "return"); + return (_return_2786); + }()) + ; + var thisArg = _tuple_arg_2785[0], a = _tuple_arg_2785[1]; + var ctx_1267 = ctx_push(ctx_1266, [{key: "thisArg", val: thisArg}, {key: "a", val: a}]); + log_event("JsInterpreter.js", 6666, ctx_1267, "let"); + var _return_2788 = (function () { + log_event("JsInterpreter.js", 6664, ctx_1267, "call"); + var _return_2787 = run_call(s, c, thisobj, thisArg, a); + log_event("JsInterpreter.js", 6663, ctx_push(ctx_1267, [{key: "#RETURN_VALUE#", val: _return_2787}]), "return"); + return (_return_2787); + }()) + ; + log_event("JsInterpreter.js", 6665, ctx_push(ctx_1267, [{key: "#RETURN_VALUE#", val: _return_2788}]), "return"); + return (_return_2788); + + } + + } else { + var _return_2780 = (function () { + log_event("JsInterpreter.js", 6651, ctx_1169, "call"); + var _return_2779 = run_error(s, Coq_native_error_type()); + log_event("JsInterpreter.js", 6650, ctx_push(ctx_1169, [{key: "#RETURN_VALUE#", val: _return_2779}]), "return"); + return (_return_2779); + }()) + ; + log_event("JsInterpreter.js", 6652, ctx_push(ctx_1169, [{key: "#RETURN_VALUE#", val: _return_2780}]), "return"); + return (_return_2780); + } + case "Coq_prealloc_function_proto_bind":log_event("JsInterpreter.js", 6769, ctx_1169, "case"); + + var _if_arg_2789 = (function () { + log_event("JsInterpreter.js", 6672, ctx_1169, "call"); + var _return_2790 = is_callable_dec(s, vthis); + log_event("JsInterpreter.js", 6671, ctx_push(ctx_1169, [{key: "#RETURN_VALUE#", val: _return_2790}]), "return"); + return (_return_2790); + }()) + ; + log_event("JsInterpreter.js", 6768, ctx_1169, "if"); + if (_if_arg_2789) { + log_event("JsInterpreter.js", 6767, ctx_1169, "switch"); + switch (vthis.tag) { + case "Coq_value_prim": + var p = vthis.value;var ctx_1268 = ctx_push(ctx_1169, [{key: "p", val: p}]); + log_event("JsInterpreter.js", 6683, ctx_1268, "case"); + + var _return_2796 = (function () { + log_event("JsInterpreter.js", 6681, ctx_1268, "call"); + var _return_2795 = function (s, m) { + var ctx_1269 = ctx_push(ctx_1268, [{key: "s", val: s}, {key: "m", val: m}]); + log_event("JsInterpreter.js", 6679, ctx_1269, "enter"); + (function () { + log_event("JsInterpreter.js", 6678, ctx_1269, "call"); + var _return_2794 = Debug.impossible_with_heap_because( + __LOC__, s, m); + log_event("JsInterpreter.js", 6677, ctx_push(ctx_1269, [{key: "#RETURN_VALUE#", val: _return_2794}]), "return"); + return (_return_2794); + }()) + ; + var _return_2793 = Coq_result_impossible( + ); + log_event("JsInterpreter.js", 6676, ctx_push(ctx_1269, [{key: "#RETURN_VALUE#", val: _return_2793}]), "return"); + return (_return_2793); }(s, + "Value is callable, but isn't an object."); + log_event("JsInterpreter.js", 6680, ctx_push(ctx_1268, [{key: "#RETURN_VALUE#", val: _return_2795}]), "return"); + return (_return_2795); + }()) + ; + log_event("JsInterpreter.js", 6682, ctx_push(ctx_1268, [{key: "#RETURN_VALUE#", val: _return_2796}]), "return"); + return (_return_2796); + case "Coq_value_object": + var thisobj = vthis.value;var ctx_1270 = ctx_push(ctx_1169, [{key: "thisobj", val: thisobj}]); + log_event("JsInterpreter.js", 6766, ctx_1270, "case"); + + var _tuple_arg_2797 = (function () { + log_event("JsInterpreter.js", 6685, ctx_1270, "call"); + var _return_2798 = get_arg_first_and_rest(args); + log_event("JsInterpreter.js", 6684, ctx_push(ctx_1270, [{key: "#RETURN_VALUE#", val: _return_2798}]), "return"); + return (_return_2798); + }()) + ; + var vthisArg = _tuple_arg_2797[0], a = _tuple_arg_2797[1]; + var ctx_1271 = ctx_push(ctx_1270, [{key: "vthisArg", val: vthisArg}, {key: "a", val: a}]); + log_event("JsInterpreter.js", 6765, ctx_1271, "let"); + var o1 = (function () { + log_event("JsInterpreter.js", 6687, ctx_1271, "call"); + var _return_2799 = object_new( + Coq_value_object( + Coq_object_loc_prealloc( + Coq_prealloc_object_proto())), + "Object"); + log_event("JsInterpreter.js", 6686, ctx_push(ctx_1271, [{key: "#RETURN_VALUE#", val: _return_2799}]), "return"); + return (_return_2799); + }()) + ; + var ctx_1272 = ctx_push(ctx_1271, [{key: "o1", val: o1}]); + log_event("JsInterpreter.js", 6764, ctx_1272, "let"); + var o2 = object_with_get(o1, Coq_builtin_get_function()); + var ctx_1273 = ctx_push(ctx_1272, [{key: "o2", val: o2}]); + log_event("JsInterpreter.js", 6763, ctx_1273, "let"); + var o3 = object_with_details(o2, None(), None(), None(), + Some(thisobj), Some(vthisArg), Some(a), None()); + var ctx_1274 = ctx_push(ctx_1273, [{key: "o3", val: o3}]); + log_event("JsInterpreter.js", 6762, ctx_1274, "let"); + var o4 = object_set_class(o3, "Function"); + var ctx_1275 = ctx_push(ctx_1274, [{key: "o4", val: o4}]); + log_event("JsInterpreter.js", 6761, ctx_1275, "let"); + var o5 = object_set_proto(o4, + Coq_value_object( + Coq_object_loc_prealloc( + Coq_prealloc_function_proto()))); + var ctx_1276 = ctx_push(ctx_1275, [{key: "o5", val: o5}]); + log_event("JsInterpreter.js", 6760, ctx_1276, "let"); + var o6 = object_with_invokation(o5, + Some(Coq_construct_after_bind()), + Some(Coq_call_after_bind()), + Some(Coq_builtin_has_instance_after_bind())); + var ctx_1277 = ctx_push(ctx_1276, [{key: "o6", val: o6}]); + log_event("JsInterpreter.js", 6759, ctx_1277, "let"); + var o7 = object_set_extensible(o6, true); + var ctx_1278 = ctx_push(ctx_1277, [{key: "o7", val: o7}]); + log_event("JsInterpreter.js", 6758, ctx_1278, "let"); + var _tuple_arg_2800 = (function () { + log_event("JsInterpreter.js", 6689, ctx_1278, "call"); + var _return_2801 = object_alloc(s, o7); + log_event("JsInterpreter.js", 6688, ctx_push(ctx_1278, [{key: "#RETURN_VALUE#", val: _return_2801}]), "return"); + return (_return_2801); + }()) + ; + var l = _tuple_arg_2800[0], s_2 = _tuple_arg_2800[1]; + var ctx_1279 = ctx_push(ctx_1278, [{key: "l", val: l}, {key: "s_2", val: s_2}]); + log_event("JsInterpreter.js", 6757, ctx_1279, "let"); + var vlength = if_some((function () { + log_event("JsInterpreter.js", 6691, ctx_1279, "call"); + var _return_2802 = run_object_method( + object_class_, s_2, + thisobj); + log_event("JsInterpreter.js", 6690, ctx_push(ctx_1279, [{key: "#RETURN_VALUE#", val: _return_2802}]), "return"); + return (_return_2802); }()), function(class0) { + + var ctx_1280 = ctx_push(ctx_1279, [{key: "class0", val: class0}]); + log_event("JsInterpreter.js", 6721, ctx_1280, "let"); + var _if_arg_2803 = (function () { + log_event("JsInterpreter.js", 6693, ctx_1280, "call"); + var _return_2804 = string_eq(class0, + "Function"); + log_event("JsInterpreter.js", 6692, ctx_push(ctx_1280, [{key: "#RETURN_VALUE#", val: _return_2804}]), "return"); + return (_return_2804); + }()) + ; + log_event("JsInterpreter.js", 6718, ctx_1280, "if"); + if (_if_arg_2803) { + var _return_2816 = if_number((function () { + log_event("JsInterpreter.js", 6696, ctx_1280, "call"); + var _return_2806 = + run_object_get(s_2, c, + thisobj, "length"); + log_event("JsInterpreter.js", 6695, ctx_push(ctx_1280, [{key: "#RETURN_VALUE#", val: _return_2806}]), "return"); + return (_return_2806); + }()), function(s10, n) { + + var ctx_1281 = ctx_push(ctx_1280, [{key: "s10", val: s10}, {key: "n", val: n}]); + log_event("JsInterpreter.js", 6716, ctx_1281, "let"); + var _return_2815 = + if_run((function () { + log_event("JsInterpreter.js", 6698, ctx_1281, "call"); + var _return_2807 = + to_int32(s10, c, + Coq_value_prim( + Coq_prim_number( + n))); + log_event("JsInterpreter.js", 6697, ctx_push(ctx_1281, [{key: "#RETURN_VALUE#", val: _return_2807}]), "return"); + return (_return_2807); + }()), function(s11, + ilen) { + + var ctx_1282 = ctx_push(ctx_1281, [{key: "s11", val: s11}, {key: "ilen", val: ilen}]); + log_event("JsInterpreter.js", 6712, ctx_1282, "let"); + var _if_arg_2808 = (function () { + log_event("JsInterpreter.js", 6702, ctx_1282, "call"); + var _return_2810 = + (ilen + < number_of_int( + (function () { + log_event("JsInterpreter.js", 6700, ctx_1282, "call"); + var _return_2809 = + LibList.length( + a); + log_event("JsInterpreter.js", 6699, ctx_push(ctx_1282, [{key: "#RETURN_VALUE#", val: _return_2809}]), "return"); + return (_return_2809); + }()))); + log_event("JsInterpreter.js", 6701, ctx_push(ctx_1282, [{key: "#RETURN_VALUE#", val: _return_2810}]), "return"); + return (_return_2810); + }()) + ; + log_event("JsInterpreter.js", 6709, ctx_1282, "if"); + if (_if_arg_2808) { + var _return_2814 = + res_spec(s11, + 0.); + log_event("JsInterpreter.js", 6708, ctx_push(ctx_1282, [{key: "#RETURN_VALUE#", val: _return_2814}]), "return"); + return (_return_2814); + } else { + var _return_2813 = + res_spec(s11, + (function () { + log_event("JsInterpreter.js", 6706, ctx_1282, "call"); + var _return_2812 = + (ilen + - number_of_int( + (function () { + log_event("JsInterpreter.js", 6704, ctx_1282, "call"); + var _return_2811 = + LibList.length( + a); + log_event("JsInterpreter.js", 6703, ctx_push(ctx_1282, [{key: "#RETURN_VALUE#", val: _return_2811}]), "return"); + return (_return_2811); + }()))); + log_event("JsInterpreter.js", 6705, ctx_push(ctx_1282, [{key: "#RETURN_VALUE#", val: _return_2812}]), "return"); + return (_return_2812); + }())); + log_event("JsInterpreter.js", 6707, ctx_push(ctx_1282, [{key: "#RETURN_VALUE#", val: _return_2813}]), "return"); + return (_return_2813); + } + }); + log_event("JsInterpreter.js", 6713, ctx_push(ctx_1281, [{key: "#RETURN_VALUE#", val: _return_2815}]), "return"); + return (_return_2815); + }); + log_event("JsInterpreter.js", 6717, ctx_push(ctx_1280, [{key: "#RETURN_VALUE#", val: _return_2816}]), "return"); + return (_return_2816); + } else { + var _return_2805 = res_spec(s_2, 0.); + log_event("JsInterpreter.js", 6694, ctx_push(ctx_1280, [{key: "#RETURN_VALUE#", val: _return_2805}]), "return"); + return (_return_2805); + } + }); + var ctx_1283 = ctx_push(ctx_1279, [{key: "vlength", val: vlength}]); + log_event("JsInterpreter.js", 6756, ctx_1283, "let"); + var _return_2828 = if_run(vlength, function(s10, length0) { + + var ctx_1284 = ctx_push(ctx_1283, [{key: "s10", val: s10}, {key: "length0", val: length0}]); + log_event("JsInterpreter.js", 6754, ctx_1284, "let"); + var a0 = { + attributes_data_value: Coq_value_prim( + Coq_prim_number( + length0)), + attributes_data_writable: false, + attributes_data_enumerable: false, + attributes_data_configurable: false + }; + var ctx_1285 = ctx_push(ctx_1284, [{key: "a0", val: a0}]); + log_event("JsInterpreter.js", 6751, ctx_1285, "let"); + var _return_2827 = if_some((function () { + log_event("JsInterpreter.js", 6727, ctx_1285, "call"); + var _return_2819 = + object_heap_map_properties_pickable_option( + s10, l, + function (p) { + var ctx_1286 = ctx_push(ctx_1285, [{key: "p", val: p}]); + log_event("JsInterpreter.js", 6725, ctx_1286, "enter"); + var _return_2818 = (function () { + log_event("JsInterpreter.js", 6723, ctx_1286, "call"); + var _return_2817 = + HeapStr.write( + p, + "length", + Coq_attributes_data_of( + a0)); + log_event("JsInterpreter.js", 6722, ctx_push(ctx_1286, [{key: "#RETURN_VALUE#", val: _return_2817}]), "return"); + return (_return_2817); + }()) + ; + log_event("JsInterpreter.js", 6724, ctx_push(ctx_1286, [{key: "#RETURN_VALUE#", val: _return_2818}]), "return"); + return (_return_2818); + }); + log_event("JsInterpreter.js", 6726, ctx_push(ctx_1285, [{key: "#RETURN_VALUE#", val: _return_2819}]), "return"); + return (_return_2819); + }()), function(s11) { + + var ctx_1287 = ctx_push(ctx_1285, [{key: "s11", val: s11}]); + log_event("JsInterpreter.js", 6749, ctx_1287, "let"); + var vthrower = + Coq_value_object( + Coq_object_loc_prealloc( + Coq_prealloc_throw_type_error( + ))); + var ctx_1288 = ctx_push(ctx_1287, [{key: "vthrower", val: vthrower}]); + log_event("JsInterpreter.js", 6746, ctx_1288, "let"); + var a1 = { + attributes_accessor_get: vthrower, + attributes_accessor_set: vthrower, + attributes_accessor_enumerable: false, + attributes_accessor_configurable: false + }; + var ctx_1289 = ctx_push(ctx_1288, [{key: "a1", val: a1}]); + log_event("JsInterpreter.js", 6745, ctx_1289, "let"); + var _return_2826 = + if_bool( + (function () { + log_event("JsInterpreter.js", 6731, ctx_1289, "call"); + var _return_2821 = + object_define_own_prop( + s11, c, l, + "caller", + (function () { + log_event("JsInterpreter.js", 6729, ctx_1289, "call"); + var _return_2820 = + descriptor_of_attributes( + Coq_attributes_accessor_of( + a1)); + log_event("JsInterpreter.js", 6728, ctx_push(ctx_1289, [{key: "#RETURN_VALUE#", val: _return_2820}]), "return"); + return (_return_2820); + }()), false); + log_event("JsInterpreter.js", 6730, ctx_push(ctx_1289, [{key: "#RETURN_VALUE#", val: _return_2821}]), "return"); + return (_return_2821); + }()), + function(s12, + x) { + + var ctx_1290 = ctx_push(ctx_1289, [{key: "s12", val: s12}, {key: "x", val: x}]); + log_event("JsInterpreter.js", 6743, ctx_1290, "let"); + var _return_2825 = + if_bool( + (function () { + log_event("JsInterpreter.js", 6735, ctx_1290, "call"); + var _return_2823 = + object_define_own_prop( + s12, c, + l, + "arguments", + (function () { + log_event("JsInterpreter.js", 6733, ctx_1290, "call"); + var _return_2822 = + descriptor_of_attributes( + Coq_attributes_accessor_of( + a1)); + log_event("JsInterpreter.js", 6732, ctx_push(ctx_1290, [{key: "#RETURN_VALUE#", val: _return_2822}]), "return"); + return (_return_2822); + }()), + false); + log_event("JsInterpreter.js", 6734, ctx_push(ctx_1290, [{key: "#RETURN_VALUE#", val: _return_2823}]), "return"); + return (_return_2823); + }()), + function(s13, + x0) { + + var ctx_1291 = ctx_push(ctx_1290, [{key: "s13", val: s13}, {key: "x0", val: x0}]); + log_event("JsInterpreter.js", 6739, ctx_1291, "let"); + var _return_2824 = + res_ter( + s13, + res_val( + Coq_value_object( + l))); + log_event("JsInterpreter.js", 6736, ctx_push(ctx_1291, [{key: "#RETURN_VALUE#", val: _return_2824}]), "return"); + return (_return_2824); + }); + log_event("JsInterpreter.js", 6740, ctx_push(ctx_1290, [{key: "#RETURN_VALUE#", val: _return_2825}]), "return"); + return (_return_2825); + }); + log_event("JsInterpreter.js", 6744, ctx_push(ctx_1289, [{key: "#RETURN_VALUE#", val: _return_2826}]), "return"); + return (_return_2826); + + + }); + log_event("JsInterpreter.js", 6750, ctx_push(ctx_1285, [{key: "#RETURN_VALUE#", val: _return_2827}]), "return"); + return (_return_2827); + + }); + log_event("JsInterpreter.js", 6755, ctx_push(ctx_1283, [{key: "#RETURN_VALUE#", val: _return_2828}]), "return"); + return (_return_2828); + + + + + + + + + + + } + + } else { + var _return_2792 = (function () { + log_event("JsInterpreter.js", 6674, ctx_1169, "call"); + var _return_2791 = run_error(s, Coq_native_error_type()); + log_event("JsInterpreter.js", 6673, ctx_push(ctx_1169, [{key: "#RETURN_VALUE#", val: _return_2791}]), "return"); + return (_return_2791); + }()) + ; + log_event("JsInterpreter.js", 6675, ctx_push(ctx_1169, [{key: "#RETURN_VALUE#", val: _return_2792}]), "return"); + return (_return_2792); + } + case "Coq_prealloc_bool":log_event("JsInterpreter.js", 6777, ctx_1169, "case"); + + var _return_2832 = result_out((function () { + var v = (function () { + log_event("JsInterpreter.js", 6771, ctx_1169, "call"); + var _return_2829 = get_arg(0, args); + log_event("JsInterpreter.js", 6770, ctx_push(ctx_1169, [{key: "#RETURN_VALUE#", val: _return_2829}]), "return"); + return (_return_2829); + }()) + ; + var ctx_1292 = ctx_push(ctx_1169, [{key: "v", val: v}]); + log_event("JsInterpreter.js", 6775, ctx_1292, "let"); + var _return_2831 = Coq_out_ter(s, + res_val( + Coq_value_prim( + Coq_prim_bool( + (function () { + log_event("JsInterpreter.js", 6773, ctx_1292, "call"); + var _return_2830 = + convert_value_to_boolean( + v); + log_event("JsInterpreter.js", 6772, ctx_push(ctx_1292, [{key: "#RETURN_VALUE#", val: _return_2830}]), "return"); + return (_return_2830); + }()))))); + log_event("JsInterpreter.js", 6774, ctx_push(ctx_1292, [{key: "#RETURN_VALUE#", val: _return_2831}]), "return"); + return (_return_2831); + }())); + log_event("JsInterpreter.js", 6776, ctx_push(ctx_1169, [{key: "#RETURN_VALUE#", val: _return_2832}]), "return"); + return (_return_2832); + case "Coq_prealloc_bool_proto_to_string":log_event("JsInterpreter.js", 6857, ctx_1169, "case"); + + log_event("JsInterpreter.js", 6856, ctx_1169, "switch"); + switch (vthis.tag) { + case "Coq_value_prim": + var p = vthis.value;var ctx_1293 = ctx_push(ctx_1169, [{key: "p", val: p}]); + log_event("JsInterpreter.js", 6799, ctx_1293, "case"); + + log_event("JsInterpreter.js", 6798, ctx_1293, "switch"); + switch (p.tag) { + case "Coq_prim_undef":log_event("JsInterpreter.js", 6781, ctx_1293, "case"); + + var _return_2834 = (function () { + log_event("JsInterpreter.js", 6779, ctx_1293, "call"); + var _return_2833 = run_error(s, Coq_native_error_type()); + log_event("JsInterpreter.js", 6778, ctx_push(ctx_1293, [{key: "#RETURN_VALUE#", val: _return_2833}]), "return"); + return (_return_2833); + }()) + ; + log_event("JsInterpreter.js", 6780, ctx_push(ctx_1293, [{key: "#RETURN_VALUE#", val: _return_2834}]), "return"); + return (_return_2834); + case "Coq_prim_null":log_event("JsInterpreter.js", 6785, ctx_1293, "case"); + + var _return_2836 = (function () { + log_event("JsInterpreter.js", 6783, ctx_1293, "call"); + var _return_2835 = run_error(s, Coq_native_error_type()); + log_event("JsInterpreter.js", 6782, ctx_push(ctx_1293, [{key: "#RETURN_VALUE#", val: _return_2835}]), "return"); + return (_return_2835); + }()) + ; + log_event("JsInterpreter.js", 6784, ctx_push(ctx_1293, [{key: "#RETURN_VALUE#", val: _return_2836}]), "return"); + return (_return_2836); + case "Coq_prim_bool": + var b0 = p.value;var ctx_1294 = ctx_push(ctx_1293, [{key: "b0", val: b0}]); + log_event("JsInterpreter.js", 6789, ctx_1294, "case"); + + var _return_2838 = res_ter(s, + res_val( + Coq_value_prim( + Coq_prim_string((function () { + log_event("JsInterpreter.js", 6787, ctx_1294, "call"); + var _return_2837 = convert_bool_to_string( + b0); + log_event("JsInterpreter.js", 6786, ctx_push(ctx_1294, [{key: "#RETURN_VALUE#", val: _return_2837}]), "return"); + return (_return_2837); }()))))); + log_event("JsInterpreter.js", 6788, ctx_push(ctx_1294, [{key: "#RETURN_VALUE#", val: _return_2838}]), "return"); + return (_return_2838); + case "Coq_prim_number": + var n = p.value;var ctx_1295 = ctx_push(ctx_1293, [{key: "n", val: n}]); + log_event("JsInterpreter.js", 6793, ctx_1295, "case"); + + var _return_2840 = (function () { + log_event("JsInterpreter.js", 6791, ctx_1295, "call"); + var _return_2839 = run_error(s, Coq_native_error_type()); + log_event("JsInterpreter.js", 6790, ctx_push(ctx_1295, [{key: "#RETURN_VALUE#", val: _return_2839}]), "return"); + return (_return_2839); + }()) + ; + log_event("JsInterpreter.js", 6792, ctx_push(ctx_1295, [{key: "#RETURN_VALUE#", val: _return_2840}]), "return"); + return (_return_2840); + case "Coq_prim_string": + var s0 = p.value;var ctx_1296 = ctx_push(ctx_1293, [{key: "s0", val: s0}]); + log_event("JsInterpreter.js", 6797, ctx_1296, "case"); + + var _return_2842 = (function () { + log_event("JsInterpreter.js", 6795, ctx_1296, "call"); + var _return_2841 = run_error(s, Coq_native_error_type()); + log_event("JsInterpreter.js", 6794, ctx_push(ctx_1296, [{key: "#RETURN_VALUE#", val: _return_2841}]), "return"); + return (_return_2841); + }()) + ; + log_event("JsInterpreter.js", 6796, ctx_push(ctx_1296, [{key: "#RETURN_VALUE#", val: _return_2842}]), "return"); + return (_return_2842); + } + + case "Coq_value_object": + var l = vthis.value;var ctx_1297 = ctx_push(ctx_1169, [{key: "l", val: l}]); + log_event("JsInterpreter.js", 6855, ctx_1297, "case"); + + var _return_2868 = (function () { + log_event("JsInterpreter.js", 6853, ctx_1297, "call"); + var _return_2867 = ifx_some_or_default((function () { + log_event("JsInterpreter.js", 6801, ctx_1297, "call"); + var _return_2843 = run_object_method( + object_class_, s, l); + log_event("JsInterpreter.js", 6800, ctx_push(ctx_1297, [{key: "#RETURN_VALUE#", val: _return_2843}]), "return"); + return (_return_2843); }()), + (function () { + log_event("JsInterpreter.js", 6803, ctx_1297, "call"); + var _return_2844 = run_error(s, + Coq_native_error_type( + )); + log_event("JsInterpreter.js", 6802, ctx_push(ctx_1297, [{key: "#RETURN_VALUE#", val: _return_2844}]), "return"); + return (_return_2844); }()), + function (s0) { + var ctx_1298 = ctx_push(ctx_1297, [{key: "s0", val: s0}]); + log_event("JsInterpreter.js", 6851, ctx_1298, "enter"); + var _if_arg_2845 = (function () { + log_event("JsInterpreter.js", 6805, ctx_1298, "call"); + var _return_2846 = string_eq(s0, + "Boolean"); + log_event("JsInterpreter.js", 6804, ctx_push(ctx_1298, [{key: "#RETURN_VALUE#", val: _return_2846}]), "return"); + return (_return_2846); + }()) + ; + log_event("JsInterpreter.js", 6850, ctx_1298, "if"); + if (_if_arg_2845) { + var _return_2866 = (function () { + log_event("JsInterpreter.js", 6848, ctx_1298, "call"); + var _return_2865 = ifx_some_or_default( + (function () { + log_event("JsInterpreter.js", 6810, ctx_1298, "call"); + var _return_2849 = + run_object_method( + object_prim_value_, + s, l); + log_event("JsInterpreter.js", 6809, ctx_push(ctx_1298, [{key: "#RETURN_VALUE#", val: _return_2849}]), "return"); + return (_return_2849); + }()), + (function () { + log_event("JsInterpreter.js", 6812, ctx_1298, "call"); + var _return_2850 = + run_error(s, + Coq_native_error_type( + )); + log_event("JsInterpreter.js", 6811, ctx_push(ctx_1298, [{key: "#RETURN_VALUE#", val: _return_2850}]), "return"); + return (_return_2850); + }()), + function (wo) { + var ctx_1299 = ctx_push(ctx_1298, [{key: "wo", val: wo}]); + log_event("JsInterpreter.js", 6846, ctx_1299, "enter"); + log_event("JsInterpreter.js", 6845, ctx_1299, "switch"); + switch (wo.tag) { + case "Some": + var v = wo.value;var ctx_1300 = ctx_push(ctx_1299, [{key: "v", val: v}]); + log_event("JsInterpreter.js", 6840, ctx_1300, "case"); + + log_event("JsInterpreter.js", 6839, ctx_1300, "switch"); + switch (v.tag) { + case "Coq_value_prim": + var p = v.value;var ctx_1301 = ctx_push(ctx_1300, [{key: "p", val: p}]); + log_event("JsInterpreter.js", 6834, ctx_1301, "case"); + + log_event("JsInterpreter.js", 6833, ctx_1301, "switch"); + switch (p.tag) { + case "Coq_prim_undef":log_event("JsInterpreter.js", 6816, ctx_1301, "case"); + + var _return_2852 = (function () { + log_event("JsInterpreter.js", 6814, ctx_1301, "call"); + var _return_2851 = + run_error( + s, + Coq_native_error_type( + )); + log_event("JsInterpreter.js", 6813, ctx_push(ctx_1301, [{key: "#RETURN_VALUE#", val: _return_2851}]), "return"); + return (_return_2851); + }()) + ; + log_event("JsInterpreter.js", 6815, ctx_push(ctx_1301, [{key: "#RETURN_VALUE#", val: _return_2852}]), "return"); + return (_return_2852); + case "Coq_prim_null":log_event("JsInterpreter.js", 6820, ctx_1301, "case"); + + var _return_2854 = (function () { + log_event("JsInterpreter.js", 6818, ctx_1301, "call"); + var _return_2853 = + run_error( + s, + Coq_native_error_type( + )); + log_event("JsInterpreter.js", 6817, ctx_push(ctx_1301, [{key: "#RETURN_VALUE#", val: _return_2853}]), "return"); + return (_return_2853); + }()) + ; + log_event("JsInterpreter.js", 6819, ctx_push(ctx_1301, [{key: "#RETURN_VALUE#", val: _return_2854}]), "return"); + return (_return_2854); + case "Coq_prim_bool": + var b0 = p.value;var ctx_1302 = ctx_push(ctx_1301, [{key: "b0", val: b0}]); + log_event("JsInterpreter.js", 6824, ctx_1302, "case"); + + var _return_2856 = + res_ter( + s, + res_val( + Coq_value_prim( + Coq_prim_string( + (function () { + log_event("JsInterpreter.js", 6822, ctx_1302, "call"); + var _return_2855 = + convert_bool_to_string( + b0); + log_event("JsInterpreter.js", 6821, ctx_push(ctx_1302, [{key: "#RETURN_VALUE#", val: _return_2855}]), "return"); + return (_return_2855); + }()))))); + log_event("JsInterpreter.js", 6823, ctx_push(ctx_1302, [{key: "#RETURN_VALUE#", val: _return_2856}]), "return"); + return (_return_2856); + case "Coq_prim_number": + var n = p.value;var ctx_1303 = ctx_push(ctx_1301, [{key: "n", val: n}]); + log_event("JsInterpreter.js", 6828, ctx_1303, "case"); + + var _return_2858 = (function () { + log_event("JsInterpreter.js", 6826, ctx_1303, "call"); + var _return_2857 = + run_error( + s, + Coq_native_error_type( + )); + log_event("JsInterpreter.js", 6825, ctx_push(ctx_1303, [{key: "#RETURN_VALUE#", val: _return_2857}]), "return"); + return (_return_2857); + }()) + ; + log_event("JsInterpreter.js", 6827, ctx_push(ctx_1303, [{key: "#RETURN_VALUE#", val: _return_2858}]), "return"); + return (_return_2858); + case "Coq_prim_string": + var s1 = p.value;var ctx_1304 = ctx_push(ctx_1301, [{key: "s1", val: s1}]); + log_event("JsInterpreter.js", 6832, ctx_1304, "case"); + + var _return_2860 = (function () { + log_event("JsInterpreter.js", 6830, ctx_1304, "call"); + var _return_2859 = + run_error( + s, + Coq_native_error_type( + )); + log_event("JsInterpreter.js", 6829, ctx_push(ctx_1304, [{key: "#RETURN_VALUE#", val: _return_2859}]), "return"); + return (_return_2859); + }()) + ; + log_event("JsInterpreter.js", 6831, ctx_push(ctx_1304, [{key: "#RETURN_VALUE#", val: _return_2860}]), "return"); + return (_return_2860); + } + + case "Coq_value_object": + var o = v.value;var ctx_1305 = ctx_push(ctx_1300, [{key: "o", val: o}]); + log_event("JsInterpreter.js", 6838, ctx_1305, "case"); + + var _return_2862 = (function () { + log_event("JsInterpreter.js", 6836, ctx_1305, "call"); + var _return_2861 = + run_error( + s, + Coq_native_error_type( + )); + log_event("JsInterpreter.js", 6835, ctx_push(ctx_1305, [{key: "#RETURN_VALUE#", val: _return_2861}]), "return"); + return (_return_2861); + }()) + ; + log_event("JsInterpreter.js", 6837, ctx_push(ctx_1305, [{key: "#RETURN_VALUE#", val: _return_2862}]), "return"); + return (_return_2862); + } + + case "None":log_event("JsInterpreter.js", 6844, ctx_1299, "case"); + + var _return_2864 = (function () { + log_event("JsInterpreter.js", 6842, ctx_1299, "call"); + var _return_2863 = + run_error( + s, + Coq_native_error_type( + )); + log_event("JsInterpreter.js", 6841, ctx_push(ctx_1299, [{key: "#RETURN_VALUE#", val: _return_2863}]), "return"); + return (_return_2863); + }()) + ; + log_event("JsInterpreter.js", 6843, ctx_push(ctx_1299, [{key: "#RETURN_VALUE#", val: _return_2864}]), "return"); + return (_return_2864); + } + }); + log_event("JsInterpreter.js", 6847, ctx_push(ctx_1298, [{key: "#RETURN_VALUE#", val: _return_2865}]), "return"); + return (_return_2865); + }()) + ; + log_event("JsInterpreter.js", 6849, ctx_push(ctx_1298, [{key: "#RETURN_VALUE#", val: _return_2866}]), "return"); + return (_return_2866); + } else { + var _return_2848 = (function () { + log_event("JsInterpreter.js", 6807, ctx_1298, "call"); + var _return_2847 = run_error(s, + Coq_native_error_type( + )); + log_event("JsInterpreter.js", 6806, ctx_push(ctx_1298, [{key: "#RETURN_VALUE#", val: _return_2847}]), "return"); + return (_return_2847); + }()) + ; + log_event("JsInterpreter.js", 6808, ctx_push(ctx_1298, [{key: "#RETURN_VALUE#", val: _return_2848}]), "return"); + return (_return_2848); + }}); + log_event("JsInterpreter.js", 6852, ctx_push(ctx_1297, [{key: "#RETURN_VALUE#", val: _return_2867}]), "return"); + return (_return_2867); + }()) + ; + log_event("JsInterpreter.js", 6854, ctx_push(ctx_1297, [{key: "#RETURN_VALUE#", val: _return_2868}]), "return"); + return (_return_2868); + } + + case "Coq_prealloc_bool_proto_value_of":log_event("JsInterpreter.js", 6933, ctx_1169, "case"); + + log_event("JsInterpreter.js", 6932, ctx_1169, "switch"); + switch (vthis.tag) { + case "Coq_value_prim": + var p = vthis.value;var ctx_1306 = ctx_push(ctx_1169, [{key: "p", val: p}]); + log_event("JsInterpreter.js", 6877, ctx_1306, "case"); + + log_event("JsInterpreter.js", 6876, ctx_1306, "switch"); + switch (p.tag) { + case "Coq_prim_undef":log_event("JsInterpreter.js", 6861, ctx_1306, "case"); + + var _return_2870 = (function () { + log_event("JsInterpreter.js", 6859, ctx_1306, "call"); + var _return_2869 = run_error(s, Coq_native_error_type()); + log_event("JsInterpreter.js", 6858, ctx_push(ctx_1306, [{key: "#RETURN_VALUE#", val: _return_2869}]), "return"); + return (_return_2869); + }()) + ; + log_event("JsInterpreter.js", 6860, ctx_push(ctx_1306, [{key: "#RETURN_VALUE#", val: _return_2870}]), "return"); + return (_return_2870); + case "Coq_prim_null":log_event("JsInterpreter.js", 6865, ctx_1306, "case"); + + var _return_2872 = (function () { + log_event("JsInterpreter.js", 6863, ctx_1306, "call"); + var _return_2871 = run_error(s, Coq_native_error_type()); + log_event("JsInterpreter.js", 6862, ctx_push(ctx_1306, [{key: "#RETURN_VALUE#", val: _return_2871}]), "return"); + return (_return_2871); + }()) + ; + log_event("JsInterpreter.js", 6864, ctx_push(ctx_1306, [{key: "#RETURN_VALUE#", val: _return_2872}]), "return"); + return (_return_2872); + case "Coq_prim_bool": + var b0 = p.value;var ctx_1307 = ctx_push(ctx_1306, [{key: "b0", val: b0}]); + log_event("JsInterpreter.js", 6867, ctx_1307, "case"); + + var _return_2873 = res_ter(s, + res_val(Coq_value_prim(Coq_prim_bool(b0)))); + log_event("JsInterpreter.js", 6866, ctx_push(ctx_1307, [{key: "#RETURN_VALUE#", val: _return_2873}]), "return"); + return (_return_2873); + case "Coq_prim_number": + var n = p.value;var ctx_1308 = ctx_push(ctx_1306, [{key: "n", val: n}]); + log_event("JsInterpreter.js", 6871, ctx_1308, "case"); + + var _return_2875 = (function () { + log_event("JsInterpreter.js", 6869, ctx_1308, "call"); + var _return_2874 = run_error(s, Coq_native_error_type()); + log_event("JsInterpreter.js", 6868, ctx_push(ctx_1308, [{key: "#RETURN_VALUE#", val: _return_2874}]), "return"); + return (_return_2874); + }()) + ; + log_event("JsInterpreter.js", 6870, ctx_push(ctx_1308, [{key: "#RETURN_VALUE#", val: _return_2875}]), "return"); + return (_return_2875); + case "Coq_prim_string": + var s0 = p.value;var ctx_1309 = ctx_push(ctx_1306, [{key: "s0", val: s0}]); + log_event("JsInterpreter.js", 6875, ctx_1309, "case"); + + var _return_2877 = (function () { + log_event("JsInterpreter.js", 6873, ctx_1309, "call"); + var _return_2876 = run_error(s, Coq_native_error_type()); + log_event("JsInterpreter.js", 6872, ctx_push(ctx_1309, [{key: "#RETURN_VALUE#", val: _return_2876}]), "return"); + return (_return_2876); + }()) + ; + log_event("JsInterpreter.js", 6874, ctx_push(ctx_1309, [{key: "#RETURN_VALUE#", val: _return_2877}]), "return"); + return (_return_2877); + } + + case "Coq_value_object": + var l = vthis.value;var ctx_1310 = ctx_push(ctx_1169, [{key: "l", val: l}]); + log_event("JsInterpreter.js", 6931, ctx_1310, "case"); + + var _return_2902 = (function () { + log_event("JsInterpreter.js", 6929, ctx_1310, "call"); + var _return_2901 = ifx_some_or_default((function () { + log_event("JsInterpreter.js", 6879, ctx_1310, "call"); + var _return_2878 = run_object_method( + object_class_, s, l); + log_event("JsInterpreter.js", 6878, ctx_push(ctx_1310, [{key: "#RETURN_VALUE#", val: _return_2878}]), "return"); + return (_return_2878); }()), + (function () { + log_event("JsInterpreter.js", 6881, ctx_1310, "call"); + var _return_2879 = run_error(s, + Coq_native_error_type( + )); + log_event("JsInterpreter.js", 6880, ctx_push(ctx_1310, [{key: "#RETURN_VALUE#", val: _return_2879}]), "return"); + return (_return_2879); }()), + function (s0) { + var ctx_1311 = ctx_push(ctx_1310, [{key: "s0", val: s0}]); + log_event("JsInterpreter.js", 6927, ctx_1311, "enter"); + var _if_arg_2880 = (function () { + log_event("JsInterpreter.js", 6883, ctx_1311, "call"); + var _return_2881 = string_eq(s0, + "Boolean"); + log_event("JsInterpreter.js", 6882, ctx_push(ctx_1311, [{key: "#RETURN_VALUE#", val: _return_2881}]), "return"); + return (_return_2881); + }()) + ; + log_event("JsInterpreter.js", 6926, ctx_1311, "if"); + if (_if_arg_2880) { + var _return_2900 = (function () { + log_event("JsInterpreter.js", 6924, ctx_1311, "call"); + var _return_2899 = ifx_some_or_default( + (function () { + log_event("JsInterpreter.js", 6888, ctx_1311, "call"); + var _return_2884 = + run_object_method( + object_prim_value_, + s, l); + log_event("JsInterpreter.js", 6887, ctx_push(ctx_1311, [{key: "#RETURN_VALUE#", val: _return_2884}]), "return"); + return (_return_2884); + }()), + (function () { + log_event("JsInterpreter.js", 6890, ctx_1311, "call"); + var _return_2885 = + run_error(s, + Coq_native_error_type( + )); + log_event("JsInterpreter.js", 6889, ctx_push(ctx_1311, [{key: "#RETURN_VALUE#", val: _return_2885}]), "return"); + return (_return_2885); + }()), + function (wo) { + var ctx_1312 = ctx_push(ctx_1311, [{key: "wo", val: wo}]); + log_event("JsInterpreter.js", 6922, ctx_1312, "enter"); + log_event("JsInterpreter.js", 6921, ctx_1312, "switch"); + switch (wo.tag) { + case "Some": + var v = wo.value;var ctx_1313 = ctx_push(ctx_1312, [{key: "v", val: v}]); + log_event("JsInterpreter.js", 6916, ctx_1313, "case"); + + log_event("JsInterpreter.js", 6915, ctx_1313, "switch"); + switch (v.tag) { + case "Coq_value_prim": + var p = v.value;var ctx_1314 = ctx_push(ctx_1313, [{key: "p", val: p}]); + log_event("JsInterpreter.js", 6910, ctx_1314, "case"); + + log_event("JsInterpreter.js", 6909, ctx_1314, "switch"); + switch (p.tag) { + case "Coq_prim_undef":log_event("JsInterpreter.js", 6894, ctx_1314, "case"); + + var _return_2887 = (function () { + log_event("JsInterpreter.js", 6892, ctx_1314, "call"); + var _return_2886 = + run_error( + s, + Coq_native_error_type( + )); + log_event("JsInterpreter.js", 6891, ctx_push(ctx_1314, [{key: "#RETURN_VALUE#", val: _return_2886}]), "return"); + return (_return_2886); + }()) + ; + log_event("JsInterpreter.js", 6893, ctx_push(ctx_1314, [{key: "#RETURN_VALUE#", val: _return_2887}]), "return"); + return (_return_2887); + case "Coq_prim_null":log_event("JsInterpreter.js", 6898, ctx_1314, "case"); + + var _return_2889 = (function () { + log_event("JsInterpreter.js", 6896, ctx_1314, "call"); + var _return_2888 = + run_error( + s, + Coq_native_error_type( + )); + log_event("JsInterpreter.js", 6895, ctx_push(ctx_1314, [{key: "#RETURN_VALUE#", val: _return_2888}]), "return"); + return (_return_2888); + }()) + ; + log_event("JsInterpreter.js", 6897, ctx_push(ctx_1314, [{key: "#RETURN_VALUE#", val: _return_2889}]), "return"); + return (_return_2889); + case "Coq_prim_bool": + var b0 = p.value;var ctx_1315 = ctx_push(ctx_1314, [{key: "b0", val: b0}]); + log_event("JsInterpreter.js", 6900, ctx_1315, "case"); + + var _return_2890 = + res_ter( + s, + res_val( + Coq_value_prim( + Coq_prim_bool( + b0)))); + log_event("JsInterpreter.js", 6899, ctx_push(ctx_1315, [{key: "#RETURN_VALUE#", val: _return_2890}]), "return"); + return (_return_2890); + case "Coq_prim_number": + var n = p.value;var ctx_1316 = ctx_push(ctx_1314, [{key: "n", val: n}]); + log_event("JsInterpreter.js", 6904, ctx_1316, "case"); + + var _return_2892 = (function () { + log_event("JsInterpreter.js", 6902, ctx_1316, "call"); + var _return_2891 = + run_error( + s, + Coq_native_error_type( + )); + log_event("JsInterpreter.js", 6901, ctx_push(ctx_1316, [{key: "#RETURN_VALUE#", val: _return_2891}]), "return"); + return (_return_2891); + }()) + ; + log_event("JsInterpreter.js", 6903, ctx_push(ctx_1316, [{key: "#RETURN_VALUE#", val: _return_2892}]), "return"); + return (_return_2892); + case "Coq_prim_string": + var s1 = p.value;var ctx_1317 = ctx_push(ctx_1314, [{key: "s1", val: s1}]); + log_event("JsInterpreter.js", 6908, ctx_1317, "case"); + + var _return_2894 = (function () { + log_event("JsInterpreter.js", 6906, ctx_1317, "call"); + var _return_2893 = + run_error( + s, + Coq_native_error_type( + )); + log_event("JsInterpreter.js", 6905, ctx_push(ctx_1317, [{key: "#RETURN_VALUE#", val: _return_2893}]), "return"); + return (_return_2893); + }()) + ; + log_event("JsInterpreter.js", 6907, ctx_push(ctx_1317, [{key: "#RETURN_VALUE#", val: _return_2894}]), "return"); + return (_return_2894); + } + + case "Coq_value_object": + var o = v.value;var ctx_1318 = ctx_push(ctx_1313, [{key: "o", val: o}]); + log_event("JsInterpreter.js", 6914, ctx_1318, "case"); + + var _return_2896 = (function () { + log_event("JsInterpreter.js", 6912, ctx_1318, "call"); + var _return_2895 = + run_error( + s, + Coq_native_error_type( + )); + log_event("JsInterpreter.js", 6911, ctx_push(ctx_1318, [{key: "#RETURN_VALUE#", val: _return_2895}]), "return"); + return (_return_2895); + }()) + ; + log_event("JsInterpreter.js", 6913, ctx_push(ctx_1318, [{key: "#RETURN_VALUE#", val: _return_2896}]), "return"); + return (_return_2896); + } + + case "None":log_event("JsInterpreter.js", 6920, ctx_1312, "case"); + + var _return_2898 = (function () { + log_event("JsInterpreter.js", 6918, ctx_1312, "call"); + var _return_2897 = + run_error( + s, + Coq_native_error_type( + )); + log_event("JsInterpreter.js", 6917, ctx_push(ctx_1312, [{key: "#RETURN_VALUE#", val: _return_2897}]), "return"); + return (_return_2897); + }()) + ; + log_event("JsInterpreter.js", 6919, ctx_push(ctx_1312, [{key: "#RETURN_VALUE#", val: _return_2898}]), "return"); + return (_return_2898); + } + }); + log_event("JsInterpreter.js", 6923, ctx_push(ctx_1311, [{key: "#RETURN_VALUE#", val: _return_2899}]), "return"); + return (_return_2899); + }()) + ; + log_event("JsInterpreter.js", 6925, ctx_push(ctx_1311, [{key: "#RETURN_VALUE#", val: _return_2900}]), "return"); + return (_return_2900); + } else { + var _return_2883 = (function () { + log_event("JsInterpreter.js", 6885, ctx_1311, "call"); + var _return_2882 = run_error(s, + Coq_native_error_type( + )); + log_event("JsInterpreter.js", 6884, ctx_push(ctx_1311, [{key: "#RETURN_VALUE#", val: _return_2882}]), "return"); + return (_return_2882); + }()) + ; + log_event("JsInterpreter.js", 6886, ctx_push(ctx_1311, [{key: "#RETURN_VALUE#", val: _return_2883}]), "return"); + return (_return_2883); + }}); + log_event("JsInterpreter.js", 6928, ctx_push(ctx_1310, [{key: "#RETURN_VALUE#", val: _return_2901}]), "return"); + return (_return_2901); + }()) + ; + log_event("JsInterpreter.js", 6930, ctx_push(ctx_1310, [{key: "#RETURN_VALUE#", val: _return_2902}]), "return"); + return (_return_2902); + } + + case "Coq_prealloc_number":log_event("JsInterpreter.js", 6944, ctx_1169, "case"); + + var _if_arg_2903 = (function () { + log_event("JsInterpreter.js", 6935, ctx_1169, "call"); + var _return_2904 = list_eq_nil_decidable(args); + log_event("JsInterpreter.js", 6934, ctx_push(ctx_1169, [{key: "#RETURN_VALUE#", val: _return_2904}]), "return"); + return (_return_2904); + }()) + ; + log_event("JsInterpreter.js", 6943, ctx_1169, "if"); + if (_if_arg_2903) { + var _return_2908 = result_out( + Coq_out_ter(s, + res_val( + Coq_value_prim( + Coq_prim_number(JsNumber.zero))))); + log_event("JsInterpreter.js", 6942, ctx_push(ctx_1169, [{key: "#RETURN_VALUE#", val: _return_2908}]), "return"); + return (_return_2908); + } else { + var v = (function () { + log_event("JsInterpreter.js", 6937, ctx_1169, "call"); + var _return_2905 = get_arg(0, args); + log_event("JsInterpreter.js", 6936, ctx_push(ctx_1169, [{key: "#RETURN_VALUE#", val: _return_2905}]), "return"); + return (_return_2905); + }()) + ; + var ctx_1319 = ctx_push(ctx_1169, [{key: "v", val: v}]); + log_event("JsInterpreter.js", 6941, ctx_1319, "let"); + var _return_2907 = (function () { + log_event("JsInterpreter.js", 6939, ctx_1319, "call"); + var _return_2906 = to_number(s, c, v); + log_event("JsInterpreter.js", 6938, ctx_push(ctx_1319, [{key: "#RETURN_VALUE#", val: _return_2906}]), "return"); + return (_return_2906); + }()) + ; + log_event("JsInterpreter.js", 6940, ctx_push(ctx_1319, [{key: "#RETURN_VALUE#", val: _return_2907}]), "return"); + return (_return_2907); + + } + case "Coq_prealloc_number_proto_value_of":log_event("JsInterpreter.js", 7020, ctx_1169, "case"); + + log_event("JsInterpreter.js", 7019, ctx_1169, "switch"); + switch (vthis.tag) { + case "Coq_value_prim": + var p = vthis.value;var ctx_1320 = ctx_push(ctx_1169, [{key: "p", val: p}]); + log_event("JsInterpreter.js", 6964, ctx_1320, "case"); + + log_event("JsInterpreter.js", 6963, ctx_1320, "switch"); + switch (p.tag) { + case "Coq_prim_undef":log_event("JsInterpreter.js", 6948, ctx_1320, "case"); + + var _return_2910 = (function () { + log_event("JsInterpreter.js", 6946, ctx_1320, "call"); + var _return_2909 = run_error(s, Coq_native_error_type()); + log_event("JsInterpreter.js", 6945, ctx_push(ctx_1320, [{key: "#RETURN_VALUE#", val: _return_2909}]), "return"); + return (_return_2909); + }()) + ; + log_event("JsInterpreter.js", 6947, ctx_push(ctx_1320, [{key: "#RETURN_VALUE#", val: _return_2910}]), "return"); + return (_return_2910); + case "Coq_prim_null":log_event("JsInterpreter.js", 6952, ctx_1320, "case"); + + var _return_2912 = (function () { + log_event("JsInterpreter.js", 6950, ctx_1320, "call"); + var _return_2911 = run_error(s, Coq_native_error_type()); + log_event("JsInterpreter.js", 6949, ctx_push(ctx_1320, [{key: "#RETURN_VALUE#", val: _return_2911}]), "return"); + return (_return_2911); + }()) + ; + log_event("JsInterpreter.js", 6951, ctx_push(ctx_1320, [{key: "#RETURN_VALUE#", val: _return_2912}]), "return"); + return (_return_2912); + case "Coq_prim_bool": + var b0 = p.value;var ctx_1321 = ctx_push(ctx_1320, [{key: "b0", val: b0}]); + log_event("JsInterpreter.js", 6956, ctx_1321, "case"); + + var _return_2914 = (function () { + log_event("JsInterpreter.js", 6954, ctx_1321, "call"); + var _return_2913 = run_error(s, Coq_native_error_type()); + log_event("JsInterpreter.js", 6953, ctx_push(ctx_1321, [{key: "#RETURN_VALUE#", val: _return_2913}]), "return"); + return (_return_2913); + }()) + ; + log_event("JsInterpreter.js", 6955, ctx_push(ctx_1321, [{key: "#RETURN_VALUE#", val: _return_2914}]), "return"); + return (_return_2914); + case "Coq_prim_number": + var n = p.value;var ctx_1322 = ctx_push(ctx_1320, [{key: "n", val: n}]); + log_event("JsInterpreter.js", 6958, ctx_1322, "case"); + + var _return_2915 = res_ter(s, + res_val( + Coq_value_prim(Coq_prim_number(n)))); + log_event("JsInterpreter.js", 6957, ctx_push(ctx_1322, [{key: "#RETURN_VALUE#", val: _return_2915}]), "return"); + return (_return_2915); + case "Coq_prim_string": + var s0 = p.value;var ctx_1323 = ctx_push(ctx_1320, [{key: "s0", val: s0}]); + log_event("JsInterpreter.js", 6962, ctx_1323, "case"); + + var _return_2917 = (function () { + log_event("JsInterpreter.js", 6960, ctx_1323, "call"); + var _return_2916 = run_error(s, Coq_native_error_type()); + log_event("JsInterpreter.js", 6959, ctx_push(ctx_1323, [{key: "#RETURN_VALUE#", val: _return_2916}]), "return"); + return (_return_2916); + }()) + ; + log_event("JsInterpreter.js", 6961, ctx_push(ctx_1323, [{key: "#RETURN_VALUE#", val: _return_2917}]), "return"); + return (_return_2917); + } + + case "Coq_value_object": + var l = vthis.value;var ctx_1324 = ctx_push(ctx_1169, [{key: "l", val: l}]); + log_event("JsInterpreter.js", 7018, ctx_1324, "case"); + + var _return_2942 = (function () { + log_event("JsInterpreter.js", 7016, ctx_1324, "call"); + var _return_2941 = ifx_some_or_default((function () { + log_event("JsInterpreter.js", 6966, ctx_1324, "call"); + var _return_2918 = run_object_method( + object_class_, s, l); + log_event("JsInterpreter.js", 6965, ctx_push(ctx_1324, [{key: "#RETURN_VALUE#", val: _return_2918}]), "return"); + return (_return_2918); }()), + (function () { + log_event("JsInterpreter.js", 6968, ctx_1324, "call"); + var _return_2919 = run_error(s, + Coq_native_error_type( + )); + log_event("JsInterpreter.js", 6967, ctx_push(ctx_1324, [{key: "#RETURN_VALUE#", val: _return_2919}]), "return"); + return (_return_2919); }()), + function (s0) { + var ctx_1325 = ctx_push(ctx_1324, [{key: "s0", val: s0}]); + log_event("JsInterpreter.js", 7014, ctx_1325, "enter"); + var _if_arg_2920 = (function () { + log_event("JsInterpreter.js", 6970, ctx_1325, "call"); + var _return_2921 = string_eq(s0, + "Number"); + log_event("JsInterpreter.js", 6969, ctx_push(ctx_1325, [{key: "#RETURN_VALUE#", val: _return_2921}]), "return"); + return (_return_2921); + }()) + ; + log_event("JsInterpreter.js", 7013, ctx_1325, "if"); + if (_if_arg_2920) { + var _return_2940 = (function () { + log_event("JsInterpreter.js", 7011, ctx_1325, "call"); + var _return_2939 = ifx_some_or_default( + (function () { + log_event("JsInterpreter.js", 6975, ctx_1325, "call"); + var _return_2924 = + run_object_method( + object_prim_value_, + s, l); + log_event("JsInterpreter.js", 6974, ctx_push(ctx_1325, [{key: "#RETURN_VALUE#", val: _return_2924}]), "return"); + return (_return_2924); + }()), + (function () { + log_event("JsInterpreter.js", 6977, ctx_1325, "call"); + var _return_2925 = + run_error(s, + Coq_native_error_type( + )); + log_event("JsInterpreter.js", 6976, ctx_push(ctx_1325, [{key: "#RETURN_VALUE#", val: _return_2925}]), "return"); + return (_return_2925); + }()), + function (wo) { + var ctx_1326 = ctx_push(ctx_1325, [{key: "wo", val: wo}]); + log_event("JsInterpreter.js", 7009, ctx_1326, "enter"); + log_event("JsInterpreter.js", 7008, ctx_1326, "switch"); + switch (wo.tag) { + case "Some": + var v = wo.value;var ctx_1327 = ctx_push(ctx_1326, [{key: "v", val: v}]); + log_event("JsInterpreter.js", 7003, ctx_1327, "case"); + + log_event("JsInterpreter.js", 7002, ctx_1327, "switch"); + switch (v.tag) { + case "Coq_value_prim": + var p = v.value;var ctx_1328 = ctx_push(ctx_1327, [{key: "p", val: p}]); + log_event("JsInterpreter.js", 6997, ctx_1328, "case"); + + log_event("JsInterpreter.js", 6996, ctx_1328, "switch"); + switch (p.tag) { + case "Coq_prim_undef":log_event("JsInterpreter.js", 6981, ctx_1328, "case"); + + var _return_2927 = (function () { + log_event("JsInterpreter.js", 6979, ctx_1328, "call"); + var _return_2926 = + run_error( + s, + Coq_native_error_type( + )); + log_event("JsInterpreter.js", 6978, ctx_push(ctx_1328, [{key: "#RETURN_VALUE#", val: _return_2926}]), "return"); + return (_return_2926); + }()) + ; + log_event("JsInterpreter.js", 6980, ctx_push(ctx_1328, [{key: "#RETURN_VALUE#", val: _return_2927}]), "return"); + return (_return_2927); + case "Coq_prim_null":log_event("JsInterpreter.js", 6985, ctx_1328, "case"); + + var _return_2929 = (function () { + log_event("JsInterpreter.js", 6983, ctx_1328, "call"); + var _return_2928 = + run_error( + s, + Coq_native_error_type( + )); + log_event("JsInterpreter.js", 6982, ctx_push(ctx_1328, [{key: "#RETURN_VALUE#", val: _return_2928}]), "return"); + return (_return_2928); + }()) + ; + log_event("JsInterpreter.js", 6984, ctx_push(ctx_1328, [{key: "#RETURN_VALUE#", val: _return_2929}]), "return"); + return (_return_2929); + case "Coq_prim_bool": + var b0 = p.value;var ctx_1329 = ctx_push(ctx_1328, [{key: "b0", val: b0}]); + log_event("JsInterpreter.js", 6989, ctx_1329, "case"); + + var _return_2931 = (function () { + log_event("JsInterpreter.js", 6987, ctx_1329, "call"); + var _return_2930 = + run_error( + s, + Coq_native_error_type( + )); + log_event("JsInterpreter.js", 6986, ctx_push(ctx_1329, [{key: "#RETURN_VALUE#", val: _return_2930}]), "return"); + return (_return_2930); + }()) + ; + log_event("JsInterpreter.js", 6988, ctx_push(ctx_1329, [{key: "#RETURN_VALUE#", val: _return_2931}]), "return"); + return (_return_2931); + case "Coq_prim_number": + var n = p.value;var ctx_1330 = ctx_push(ctx_1328, [{key: "n", val: n}]); + log_event("JsInterpreter.js", 6991, ctx_1330, "case"); + + var _return_2932 = + res_ter( + s, + res_val( + Coq_value_prim( + Coq_prim_number( + n)))); + log_event("JsInterpreter.js", 6990, ctx_push(ctx_1330, [{key: "#RETURN_VALUE#", val: _return_2932}]), "return"); + return (_return_2932); + case "Coq_prim_string": + var s1 = p.value;var ctx_1331 = ctx_push(ctx_1328, [{key: "s1", val: s1}]); + log_event("JsInterpreter.js", 6995, ctx_1331, "case"); + + var _return_2934 = (function () { + log_event("JsInterpreter.js", 6993, ctx_1331, "call"); + var _return_2933 = + run_error( + s, + Coq_native_error_type( + )); + log_event("JsInterpreter.js", 6992, ctx_push(ctx_1331, [{key: "#RETURN_VALUE#", val: _return_2933}]), "return"); + return (_return_2933); + }()) + ; + log_event("JsInterpreter.js", 6994, ctx_push(ctx_1331, [{key: "#RETURN_VALUE#", val: _return_2934}]), "return"); + return (_return_2934); + } + + case "Coq_value_object": + var o = v.value;var ctx_1332 = ctx_push(ctx_1327, [{key: "o", val: o}]); + log_event("JsInterpreter.js", 7001, ctx_1332, "case"); + + var _return_2936 = (function () { + log_event("JsInterpreter.js", 6999, ctx_1332, "call"); + var _return_2935 = + run_error( + s, + Coq_native_error_type( + )); + log_event("JsInterpreter.js", 6998, ctx_push(ctx_1332, [{key: "#RETURN_VALUE#", val: _return_2935}]), "return"); + return (_return_2935); + }()) + ; + log_event("JsInterpreter.js", 7000, ctx_push(ctx_1332, [{key: "#RETURN_VALUE#", val: _return_2936}]), "return"); + return (_return_2936); + } + + case "None":log_event("JsInterpreter.js", 7007, ctx_1326, "case"); + + var _return_2938 = (function () { + log_event("JsInterpreter.js", 7005, ctx_1326, "call"); + var _return_2937 = + run_error( + s, + Coq_native_error_type( + )); + log_event("JsInterpreter.js", 7004, ctx_push(ctx_1326, [{key: "#RETURN_VALUE#", val: _return_2937}]), "return"); + return (_return_2937); + }()) + ; + log_event("JsInterpreter.js", 7006, ctx_push(ctx_1326, [{key: "#RETURN_VALUE#", val: _return_2938}]), "return"); + return (_return_2938); + } + }); + log_event("JsInterpreter.js", 7010, ctx_push(ctx_1325, [{key: "#RETURN_VALUE#", val: _return_2939}]), "return"); + return (_return_2939); + }()) + ; + log_event("JsInterpreter.js", 7012, ctx_push(ctx_1325, [{key: "#RETURN_VALUE#", val: _return_2940}]), "return"); + return (_return_2940); + } else { + var _return_2923 = (function () { + log_event("JsInterpreter.js", 6972, ctx_1325, "call"); + var _return_2922 = run_error(s, + Coq_native_error_type( + )); + log_event("JsInterpreter.js", 6971, ctx_push(ctx_1325, [{key: "#RETURN_VALUE#", val: _return_2922}]), "return"); + return (_return_2922); + }()) + ; + log_event("JsInterpreter.js", 6973, ctx_push(ctx_1325, [{key: "#RETURN_VALUE#", val: _return_2923}]), "return"); + return (_return_2923); + }}); + log_event("JsInterpreter.js", 7015, ctx_push(ctx_1324, [{key: "#RETURN_VALUE#", val: _return_2941}]), "return"); + return (_return_2941); + }()) + ; + log_event("JsInterpreter.js", 7017, ctx_push(ctx_1324, [{key: "#RETURN_VALUE#", val: _return_2942}]), "return"); + return (_return_2942); + } + + case "Coq_prealloc_array":log_event("JsInterpreter.js", 7024, ctx_1169, "case"); + + var _return_2944 = (function () { + log_event("JsInterpreter.js", 7022, ctx_1169, "call"); + var _return_2943 = run_construct_prealloc(s, c, Coq_prealloc_array(), + args); + log_event("JsInterpreter.js", 7021, ctx_push(ctx_1169, [{key: "#RETURN_VALUE#", val: _return_2943}]), "return"); + return (_return_2943); + }()) + ; + log_event("JsInterpreter.js", 7023, ctx_push(ctx_1169, [{key: "#RETURN_VALUE#", val: _return_2944}]), "return"); + return (_return_2944); + case "Coq_prealloc_array_is_array":log_event("JsInterpreter.js", 7043, ctx_1169, "case"); + + var arg = (function () { + log_event("JsInterpreter.js", 7026, ctx_1169, "call"); + var _return_2945 = get_arg(0, args); + log_event("JsInterpreter.js", 7025, ctx_push(ctx_1169, [{key: "#RETURN_VALUE#", val: _return_2945}]), "return"); + return (_return_2945); + }()) + ; + var ctx_1333 = ctx_push(ctx_1169, [{key: "arg", val: arg}]); + log_event("JsInterpreter.js", 7042, ctx_1333, "let"); + log_event("JsInterpreter.js", 7041, ctx_1333, "switch"); + switch (arg.tag) { + case "Coq_value_prim": + var p = arg.value;var ctx_1334 = ctx_push(ctx_1333, [{key: "p", val: p}]); + log_event("JsInterpreter.js", 7028, ctx_1334, "case"); + + var _return_2946 = res_ter(s, + res_val(Coq_value_prim(Coq_prim_bool(false)))); + log_event("JsInterpreter.js", 7027, ctx_push(ctx_1334, [{key: "#RETURN_VALUE#", val: _return_2946}]), "return"); + return (_return_2946); + case "Coq_value_object": + var arg0 = arg.value;var ctx_1335 = ctx_push(ctx_1333, [{key: "arg0", val: arg0}]); + log_event("JsInterpreter.js", 7040, ctx_1335, "case"); + + var _return_2952 = if_some((function () { + log_event("JsInterpreter.js", 7030, ctx_1335, "call"); + var _return_2947 = run_object_method( + object_class_, s, arg0); + log_event("JsInterpreter.js", 7029, ctx_push(ctx_1335, [{key: "#RETURN_VALUE#", val: _return_2947}]), "return"); + return (_return_2947); }()), + function(class0) { + + var ctx_1336 = ctx_push(ctx_1335, [{key: "class0", val: class0}]); + log_event("JsInterpreter.js", 7038, ctx_1336, "let"); + var _if_arg_2948 = (function () { + log_event("JsInterpreter.js", 7032, ctx_1336, "call"); + var _return_2949 = string_eq(class0, + "Array"); + log_event("JsInterpreter.js", 7031, ctx_push(ctx_1336, [{key: "#RETURN_VALUE#", val: _return_2949}]), "return"); + return (_return_2949); + }()) + ; + log_event("JsInterpreter.js", 7035, ctx_1336, "if"); + if (_if_arg_2948) { + var _return_2951 = res_ter(s, + res_val( + Coq_value_prim( + Coq_prim_bool( + true)))); + log_event("JsInterpreter.js", 7034, ctx_push(ctx_1336, [{key: "#RETURN_VALUE#", val: _return_2951}]), "return"); + return (_return_2951); + } else { + var _return_2950 = res_ter(s, + res_val( + Coq_value_prim( + Coq_prim_bool( + false)))); + log_event("JsInterpreter.js", 7033, ctx_push(ctx_1336, [{key: "#RETURN_VALUE#", val: _return_2950}]), "return"); + return (_return_2950); + } + }); + log_event("JsInterpreter.js", 7039, ctx_push(ctx_1335, [{key: "#RETURN_VALUE#", val: _return_2952}]), "return"); + return (_return_2952); + } + + + case "Coq_prealloc_array_proto_to_string":log_event("JsInterpreter.js", 7075, ctx_1169, "case"); + + var _return_2966 = if_object((function () { + log_event("JsInterpreter.js", 7045, ctx_1169, "call"); + var _return_2953 = to_object(s, vthis); + log_event("JsInterpreter.js", 7044, ctx_push(ctx_1169, [{key: "#RETURN_VALUE#", val: _return_2953}]), "return"); + return (_return_2953); }()), function(s0, + array) { + + var ctx_1337 = ctx_push(ctx_1169, [{key: "s0", val: s0}, {key: "array", val: array}]); + log_event("JsInterpreter.js", 7073, ctx_1337, "let"); + var _return_2965 = if_value((function () { + log_event("JsInterpreter.js", 7047, ctx_1337, "call"); + var _return_2954 = + run_object_get(s0, c, + array, "join"); + log_event("JsInterpreter.js", 7046, ctx_push(ctx_1337, [{key: "#RETURN_VALUE#", val: _return_2954}]), "return"); + return (_return_2954); + }()), function(s1, vfunc) { + + var ctx_1338 = ctx_push(ctx_1337, [{key: "s1", val: s1}, {key: "vfunc", val: vfunc}]); + log_event("JsInterpreter.js", 7069, ctx_1338, "let"); + var _if_arg_2955 = (function () { + log_event("JsInterpreter.js", 7049, ctx_1338, "call"); + var _return_2956 = + is_callable_dec(s1, + vfunc); + log_event("JsInterpreter.js", 7048, ctx_push(ctx_1338, [{key: "#RETURN_VALUE#", val: _return_2956}]), "return"); + return (_return_2956); + }()) + ; + log_event("JsInterpreter.js", 7066, ctx_1338, "if"); + if (_if_arg_2955) { + log_event("JsInterpreter.js", 7065, ctx_1338, "switch"); + switch (vfunc.tag) { + case "Coq_value_prim": + var p = vfunc.value;var ctx_1339 = ctx_push(ctx_1338, [{key: "p", val: p}]); + log_event("JsInterpreter.js", 7060, ctx_1339, "case"); + + var _return_2962 = (function () { + log_event("JsInterpreter.js", 7058, ctx_1339, "call"); + var _return_2961 = + function (s, m) { + var ctx_1340 = ctx_push(ctx_1339, [{key: "s", val: s}, {key: "m", val: m}]); + log_event("JsInterpreter.js", 7056, ctx_1340, "enter"); + (function () { + log_event("JsInterpreter.js", 7055, ctx_1340, "call"); + var _return_2960 = + Debug.impossible_with_heap_because( + __LOC__, + s, m); + log_event("JsInterpreter.js", 7054, ctx_push(ctx_1340, [{key: "#RETURN_VALUE#", val: _return_2960}]), "return"); + return (_return_2960); + }()) + ; + var _return_2959 = + Coq_result_impossible( + ); + log_event("JsInterpreter.js", 7053, ctx_push(ctx_1340, [{key: "#RETURN_VALUE#", val: _return_2959}]), "return"); + return (_return_2959); + }(s1, + "Value is callable, but isn't an object."); + log_event("JsInterpreter.js", 7057, ctx_push(ctx_1339, [{key: "#RETURN_VALUE#", val: _return_2961}]), "return"); + return (_return_2961); + }()) + ; + log_event("JsInterpreter.js", 7059, ctx_push(ctx_1339, [{key: "#RETURN_VALUE#", val: _return_2962}]), "return"); + return (_return_2962); + case "Coq_value_object": + var func = vfunc.value;var ctx_1341 = ctx_push(ctx_1338, [{key: "func", val: func}]); + log_event("JsInterpreter.js", 7064, ctx_1341, "case"); + + var _return_2964 = (function () { + log_event("JsInterpreter.js", 7062, ctx_1341, "call"); + var _return_2963 = + run_call(s1, c, + func, + Coq_value_object( + array), + mk_nil()); + log_event("JsInterpreter.js", 7061, ctx_push(ctx_1341, [{key: "#RETURN_VALUE#", val: _return_2963}]), "return"); + return (_return_2963); + }()) + ; + log_event("JsInterpreter.js", 7063, ctx_push(ctx_1341, [{key: "#RETURN_VALUE#", val: _return_2964}]), "return"); + return (_return_2964); + } + + } else { + var _return_2958 = (function () { + log_event("JsInterpreter.js", 7051, ctx_1338, "call"); + var _return_2957 = + run_call_prealloc(s1, + c, + Coq_prealloc_object_proto_to_string( + ), + Coq_value_object( + array), mk_nil()); + log_event("JsInterpreter.js", 7050, ctx_push(ctx_1338, [{key: "#RETURN_VALUE#", val: _return_2957}]), "return"); + return (_return_2957); + }()) + ; + log_event("JsInterpreter.js", 7052, ctx_push(ctx_1338, [{key: "#RETURN_VALUE#", val: _return_2958}]), "return"); + return (_return_2958); + } + }); + log_event("JsInterpreter.js", 7070, ctx_push(ctx_1337, [{key: "#RETURN_VALUE#", val: _return_2965}]), "return"); + return (_return_2965); + }); + log_event("JsInterpreter.js", 7074, ctx_push(ctx_1169, [{key: "#RETURN_VALUE#", val: _return_2966}]), "return"); + return (_return_2966); + case "Coq_prealloc_array_proto_join":log_event("JsInterpreter.js", 7121, ctx_1169, "case"); + + var vsep = (function () { + log_event("JsInterpreter.js", 7077, ctx_1169, "call"); + var _return_2967 = get_arg(0, args); + log_event("JsInterpreter.js", 7076, ctx_push(ctx_1169, [{key: "#RETURN_VALUE#", val: _return_2967}]), "return"); + return (_return_2967); + }()) + ; + var ctx_1342 = ctx_push(ctx_1169, [{key: "vsep", val: vsep}]); + log_event("JsInterpreter.js", 7120, ctx_1342, "let"); + var _return_2984 = if_object((function () { + log_event("JsInterpreter.js", 7079, ctx_1342, "call"); + var _return_2968 = to_object(s, vthis); + log_event("JsInterpreter.js", 7078, ctx_push(ctx_1342, [{key: "#RETURN_VALUE#", val: _return_2968}]), "return"); + return (_return_2968); }()), function(s0, l) { + + var ctx_1343 = ctx_push(ctx_1342, [{key: "s0", val: s0}, {key: "l", val: l}]); + log_event("JsInterpreter.js", 7118, ctx_1343, "let"); + var _return_2983 = if_value((function () { + log_event("JsInterpreter.js", 7081, ctx_1343, "call"); + var _return_2969 = + run_object_get(s0, c, l, + "length"); + log_event("JsInterpreter.js", 7080, ctx_push(ctx_1343, [{key: "#RETURN_VALUE#", val: _return_2969}]), "return"); + return (_return_2969); + }()), function(s1, vlen) { + + var ctx_1344 = ctx_push(ctx_1343, [{key: "s1", val: s1}, {key: "vlen", val: vlen}]); + log_event("JsInterpreter.js", 7114, ctx_1344, "let"); + var _return_2982 = + if_run((function () { + log_event("JsInterpreter.js", 7083, ctx_1344, "call"); + var _return_2970 = + to_uint32(s1, c, + vlen); + log_event("JsInterpreter.js", 7082, ctx_push(ctx_1344, [{key: "#RETURN_VALUE#", val: _return_2970}]), "return"); + return (_return_2970); + }()), function(s2, + ilen) { + + var ctx_1345 = ctx_push(ctx_1344, [{key: "s2", val: s2}, {key: "ilen", val: ilen}]); + log_event("JsInterpreter.js", 7110, ctx_1345, "let"); + var _if_arg_2971 = (function () { + log_event("JsInterpreter.js", 7085, ctx_1345, "call"); + var _return_2972 = + !( + value_compare( + vsep, + Coq_value_prim( + Coq_prim_undef( + )))); + log_event("JsInterpreter.js", 7084, ctx_push(ctx_1345, [{key: "#RETURN_VALUE#", val: _return_2972}]), "return"); + return (_return_2972); + }()) + ; + log_event("JsInterpreter.js", 7086, ctx_1345, "if"); + if (_if_arg_2971) { + var rsep = vsep; + } else { + var rsep = + Coq_value_prim( + Coq_prim_string( + ",")); + } + var ctx_1346 = ctx_push(ctx_1345, [{key: "rsep", val: rsep}]); + log_event("JsInterpreter.js", 7107, ctx_1346, "let"); + var _return_2981 = + if_string( + (function () { + log_event("JsInterpreter.js", 7088, ctx_1346, "call"); + var _return_2973 = + to_string(s2, c, + rsep); + log_event("JsInterpreter.js", 7087, ctx_push(ctx_1346, [{key: "#RETURN_VALUE#", val: _return_2973}]), "return"); + return (_return_2973); + }()), function(s3, + sep) { + + var ctx_1347 = ctx_push(ctx_1346, [{key: "s3", val: s3}, {key: "sep", val: sep}]); + log_event("JsInterpreter.js", 7105, ctx_1347, "let"); + var _if_arg_2974 = (function () { + log_event("JsInterpreter.js", 7090, ctx_1347, "call"); + var _return_2975 = + (ilen == 0.0); + log_event("JsInterpreter.js", 7089, ctx_push(ctx_1347, [{key: "#RETURN_VALUE#", val: _return_2975}]), "return"); + return (_return_2975); + }()) + ; + log_event("JsInterpreter.js", 7102, ctx_1347, "if"); + if (_if_arg_2974) { + var _return_2980 = + res_ter(s3, + res_val( + Coq_value_prim( + Coq_prim_string( + "")))); + log_event("JsInterpreter.js", 7101, ctx_push(ctx_1347, [{key: "#RETURN_VALUE#", val: _return_2980}]), "return"); + return (_return_2980); + } else { + var sR = (function () { + log_event("JsInterpreter.js", 7092, ctx_1347, "call"); + var _return_2976 = + valueToStringForJoin( + s3, c, l, + 0.); + log_event("JsInterpreter.js", 7091, ctx_push(ctx_1347, [{key: "#RETURN_VALUE#", val: _return_2976}]), "return"); + return (_return_2976); + }()) + ; + var ctx_1348 = ctx_push(ctx_1347, [{key: "sR", val: sR}]); + log_event("JsInterpreter.js", 7100, ctx_1348, "let"); + var _return_2979 = + if_run(sR, + function(s4, + sR0) { + + var ctx_1349 = ctx_push(ctx_1348, [{key: "s4", val: s4}, {key: "sR0", val: sR0}]); + log_event("JsInterpreter.js", 7098, ctx_1349, "let"); + var _return_2978 = (function () { + log_event("JsInterpreter.js", 7094, ctx_1349, "call"); + var _return_2977 = + run_array_join_elements( + s4, c, l, + 1., ilen, + sep, sR0); + log_event("JsInterpreter.js", 7093, ctx_push(ctx_1349, [{key: "#RETURN_VALUE#", val: _return_2977}]), "return"); + return (_return_2977); + }()) + ; + log_event("JsInterpreter.js", 7095, ctx_push(ctx_1349, [{key: "#RETURN_VALUE#", val: _return_2978}]), "return"); + return (_return_2978); + }); + log_event("JsInterpreter.js", 7099, ctx_push(ctx_1348, [{key: "#RETURN_VALUE#", val: _return_2979}]), "return"); + return (_return_2979); + + } + }); + log_event("JsInterpreter.js", 7106, ctx_push(ctx_1346, [{key: "#RETURN_VALUE#", val: _return_2981}]), "return"); + return (_return_2981); + + }); + log_event("JsInterpreter.js", 7111, ctx_push(ctx_1344, [{key: "#RETURN_VALUE#", val: _return_2982}]), "return"); + return (_return_2982); + }); + log_event("JsInterpreter.js", 7115, ctx_push(ctx_1343, [{key: "#RETURN_VALUE#", val: _return_2983}]), "return"); + return (_return_2983); + }); + log_event("JsInterpreter.js", 7119, ctx_push(ctx_1342, [{key: "#RETURN_VALUE#", val: _return_2984}]), "return"); + return (_return_2984); + + case "Coq_prealloc_array_proto_pop":log_event("JsInterpreter.js", 7177, ctx_1169, "case"); + + var _return_3005 = if_object((function () { + log_event("JsInterpreter.js", 7123, ctx_1169, "call"); + var _return_2985 = to_object(s, vthis); + log_event("JsInterpreter.js", 7122, ctx_push(ctx_1169, [{key: "#RETURN_VALUE#", val: _return_2985}]), "return"); + return (_return_2985); }()), function(s0, l) { + + var ctx_1350 = ctx_push(ctx_1169, [{key: "s0", val: s0}, {key: "l", val: l}]); + log_event("JsInterpreter.js", 7175, ctx_1350, "let"); + var _return_3004 = if_value((function () { + log_event("JsInterpreter.js", 7125, ctx_1350, "call"); + var _return_2986 = + run_object_get(s0, c, l, + "length"); + log_event("JsInterpreter.js", 7124, ctx_push(ctx_1350, [{key: "#RETURN_VALUE#", val: _return_2986}]), "return"); + return (_return_2986); + }()), function(s1, vlen) { + + var ctx_1351 = ctx_push(ctx_1350, [{key: "s1", val: s1}, {key: "vlen", val: vlen}]); + log_event("JsInterpreter.js", 7171, ctx_1351, "let"); + var _return_3003 = + if_run((function () { + log_event("JsInterpreter.js", 7127, ctx_1351, "call"); + var _return_2987 = + to_uint32(s1, c, + vlen); + log_event("JsInterpreter.js", 7126, ctx_push(ctx_1351, [{key: "#RETURN_VALUE#", val: _return_2987}]), "return"); + return (_return_2987); + }()), function(s2, + ilen) { + + var ctx_1352 = ctx_push(ctx_1351, [{key: "s2", val: s2}, {key: "ilen", val: ilen}]); + log_event("JsInterpreter.js", 7167, ctx_1352, "let"); + var _if_arg_2988 = (function () { + log_event("JsInterpreter.js", 7129, ctx_1352, "call"); + var _return_2989 = + (ilen == 0.0); + log_event("JsInterpreter.js", 7128, ctx_push(ctx_1352, [{key: "#RETURN_VALUE#", val: _return_2989}]), "return"); + return (_return_2989); + }()) + ; + log_event("JsInterpreter.js", 7164, ctx_1352, "if"); + if (_if_arg_2988) { + var _return_3002 = + if_not_throw( + (function () { + log_event("JsInterpreter.js", 7158, ctx_1352, "call"); + var _return_3000 = + object_put(s2, + c, l, + "length", + Coq_value_prim( + Coq_prim_number( + JsNumber.zero)), + throw_true); + log_event("JsInterpreter.js", 7157, ctx_push(ctx_1352, [{key: "#RETURN_VALUE#", val: _return_3000}]), "return"); + return (_return_3000); + }()), + function(s3, x) { + + var ctx_1357 = ctx_push(ctx_1352, [{key: "s3", val: s3}, {key: "x", val: x}]); + log_event("JsInterpreter.js", 7162, ctx_1357, "let"); + var _return_3001 = + result_out( + Coq_out_ter( + s3, + res_val( + Coq_value_prim( + Coq_prim_undef( + ))))); + log_event("JsInterpreter.js", 7159, ctx_push(ctx_1357, [{key: "#RETURN_VALUE#", val: _return_3001}]), "return"); + return (_return_3001); + }); + log_event("JsInterpreter.js", 7163, ctx_push(ctx_1352, [{key: "#RETURN_VALUE#", val: _return_3002}]), "return"); + return (_return_3002); + } else { + var _return_2999 = + if_string( + (function () { + log_event("JsInterpreter.js", 7133, ctx_1352, "call"); + var _return_2991 = + to_string(s2, + c, + Coq_value_prim( + Coq_prim_number( + (function () { + log_event("JsInterpreter.js", 7131, ctx_1352, "call"); + var _return_2990 = + (ilen + - 1.); + log_event("JsInterpreter.js", 7130, ctx_push(ctx_1352, [{key: "#RETURN_VALUE#", val: _return_2990}]), "return"); + return (_return_2990); + }())))); + log_event("JsInterpreter.js", 7132, ctx_push(ctx_1352, [{key: "#RETURN_VALUE#", val: _return_2991}]), "return"); + return (_return_2991); + }()), + function(s3, + sindx) { + + var ctx_1353 = ctx_push(ctx_1352, [{key: "s3", val: s3}, {key: "sindx", val: sindx}]); + log_event("JsInterpreter.js", 7155, ctx_1353, "let"); + var _return_2998 = + if_value( + (function () { + log_event("JsInterpreter.js", 7135, ctx_1353, "call"); + var _return_2992 = + run_object_get( + s3, c, l, + sindx); + log_event("JsInterpreter.js", 7134, ctx_push(ctx_1353, [{key: "#RETURN_VALUE#", val: _return_2992}]), "return"); + return (_return_2992); + }()), + function(s4, + velem) { + + var ctx_1354 = ctx_push(ctx_1353, [{key: "s4", val: s4}, {key: "velem", val: velem}]); + log_event("JsInterpreter.js", 7151, ctx_1354, "let"); + var _return_2997 = + if_not_throw( + (function () { + log_event("JsInterpreter.js", 7137, ctx_1354, "call"); + var _return_2993 = + object_delete_default( + s4, c, l, + sindx, + throw_true); + log_event("JsInterpreter.js", 7136, ctx_push(ctx_1354, [{key: "#RETURN_VALUE#", val: _return_2993}]), "return"); + return (_return_2993); + }()), + function(s5, + x) { + + var ctx_1355 = ctx_push(ctx_1354, [{key: "s5", val: s5}, {key: "x", val: x}]); + log_event("JsInterpreter.js", 7147, ctx_1355, "let"); + var _return_2996 = + if_not_throw( + (function () { + log_event("JsInterpreter.js", 7139, ctx_1355, "call"); + var _return_2994 = + object_put( + s5, c, l, + "length", + Coq_value_prim( + Coq_prim_string( + sindx)), + throw_true); + log_event("JsInterpreter.js", 7138, ctx_push(ctx_1355, [{key: "#RETURN_VALUE#", val: _return_2994}]), "return"); + return (_return_2994); + }()), + function(s6, + x0) { + + var ctx_1356 = ctx_push(ctx_1355, [{key: "s6", val: s6}, {key: "x0", val: x0}]); + log_event("JsInterpreter.js", 7143, ctx_1356, "let"); + var _return_2995 = + result_out( + Coq_out_ter( + s6, + res_val( + velem))); + log_event("JsInterpreter.js", 7140, ctx_push(ctx_1356, [{key: "#RETURN_VALUE#", val: _return_2995}]), "return"); + return (_return_2995); + }); + log_event("JsInterpreter.js", 7144, ctx_push(ctx_1355, [{key: "#RETURN_VALUE#", val: _return_2996}]), "return"); + return (_return_2996); + }); + log_event("JsInterpreter.js", 7148, ctx_push(ctx_1354, [{key: "#RETURN_VALUE#", val: _return_2997}]), "return"); + return (_return_2997); + }); + log_event("JsInterpreter.js", 7152, ctx_push(ctx_1353, [{key: "#RETURN_VALUE#", val: _return_2998}]), "return"); + return (_return_2998); + }); + log_event("JsInterpreter.js", 7156, ctx_push(ctx_1352, [{key: "#RETURN_VALUE#", val: _return_2999}]), "return"); + return (_return_2999); + } + }); + log_event("JsInterpreter.js", 7168, ctx_push(ctx_1351, [{key: "#RETURN_VALUE#", val: _return_3003}]), "return"); + return (_return_3003); + }); + log_event("JsInterpreter.js", 7172, ctx_push(ctx_1350, [{key: "#RETURN_VALUE#", val: _return_3004}]), "return"); + return (_return_3004); + }); + log_event("JsInterpreter.js", 7176, ctx_push(ctx_1169, [{key: "#RETURN_VALUE#", val: _return_3005}]), "return"); + return (_return_3005); + case "Coq_prealloc_array_proto_push":log_event("JsInterpreter.js", 7199, ctx_1169, "case"); + + var _return_3013 = if_object((function () { + log_event("JsInterpreter.js", 7179, ctx_1169, "call"); + var _return_3006 = to_object(s, vthis); + log_event("JsInterpreter.js", 7178, ctx_push(ctx_1169, [{key: "#RETURN_VALUE#", val: _return_3006}]), "return"); + return (_return_3006); }()), function(s0, l) { + + var ctx_1358 = ctx_push(ctx_1169, [{key: "s0", val: s0}, {key: "l", val: l}]); + log_event("JsInterpreter.js", 7197, ctx_1358, "let"); + var _return_3012 = if_value((function () { + log_event("JsInterpreter.js", 7181, ctx_1358, "call"); + var _return_3007 = + run_object_get(s0, c, l, + "length"); + log_event("JsInterpreter.js", 7180, ctx_push(ctx_1358, [{key: "#RETURN_VALUE#", val: _return_3007}]), "return"); + return (_return_3007); + }()), function(s1, vlen) { + + var ctx_1359 = ctx_push(ctx_1358, [{key: "s1", val: s1}, {key: "vlen", val: vlen}]); + log_event("JsInterpreter.js", 7193, ctx_1359, "let"); + var _return_3011 = + if_run((function () { + log_event("JsInterpreter.js", 7183, ctx_1359, "call"); + var _return_3008 = + to_uint32(s1, c, + vlen); + log_event("JsInterpreter.js", 7182, ctx_push(ctx_1359, [{key: "#RETURN_VALUE#", val: _return_3008}]), "return"); + return (_return_3008); + }()), function(s2, + ilen) { + + var ctx_1360 = ctx_push(ctx_1359, [{key: "s2", val: s2}, {key: "ilen", val: ilen}]); + log_event("JsInterpreter.js", 7189, ctx_1360, "let"); + var _return_3010 = (function () { + log_event("JsInterpreter.js", 7185, ctx_1360, "call"); + var _return_3009 = + push(s2, c, l, + args, ilen); + log_event("JsInterpreter.js", 7184, ctx_push(ctx_1360, [{key: "#RETURN_VALUE#", val: _return_3009}]), "return"); + return (_return_3009); + }()) + ; + log_event("JsInterpreter.js", 7186, ctx_push(ctx_1360, [{key: "#RETURN_VALUE#", val: _return_3010}]), "return"); + return (_return_3010); + }); + log_event("JsInterpreter.js", 7190, ctx_push(ctx_1359, [{key: "#RETURN_VALUE#", val: _return_3011}]), "return"); + return (_return_3011); + }); + log_event("JsInterpreter.js", 7194, ctx_push(ctx_1358, [{key: "#RETURN_VALUE#", val: _return_3012}]), "return"); + return (_return_3012); + }); + log_event("JsInterpreter.js", 7198, ctx_push(ctx_1169, [{key: "#RETURN_VALUE#", val: _return_3013}]), "return"); + return (_return_3013); + case "Coq_prealloc_string":log_event("JsInterpreter.js", 7214, ctx_1169, "case"); + + var _if_arg_3014 = (function () { + log_event("JsInterpreter.js", 7201, ctx_1169, "call"); + var _return_3015 = list_eq_nil_decidable(args); + log_event("JsInterpreter.js", 7200, ctx_push(ctx_1169, [{key: "#RETURN_VALUE#", val: _return_3015}]), "return"); + return (_return_3015); + }()) + ; + log_event("JsInterpreter.js", 7213, ctx_1169, "if"); + if (_if_arg_3014) { + var _return_3020 = res_ter(s, + res_val(Coq_value_prim(Coq_prim_string("")))); + log_event("JsInterpreter.js", 7212, ctx_push(ctx_1169, [{key: "#RETURN_VALUE#", val: _return_3020}]), "return"); + return (_return_3020); + } else { + var value0 = (function () { + log_event("JsInterpreter.js", 7203, ctx_1169, "call"); + var _return_3016 = get_arg(0, args); + log_event("JsInterpreter.js", 7202, ctx_push(ctx_1169, [{key: "#RETURN_VALUE#", val: _return_3016}]), "return"); + return (_return_3016); + }()) + ; + var ctx_1361 = ctx_push(ctx_1169, [{key: "value0", val: value0}]); + log_event("JsInterpreter.js", 7211, ctx_1361, "let"); + var _return_3019 = if_string((function () { + log_event("JsInterpreter.js", 7205, ctx_1361, "call"); + var _return_3017 = to_string(s, c, value0); + log_event("JsInterpreter.js", 7204, ctx_push(ctx_1361, [{key: "#RETURN_VALUE#", val: _return_3017}]), "return"); + return (_return_3017); }()), function(s0, + s1) { + + var ctx_1362 = ctx_push(ctx_1361, [{key: "s0", val: s0}, {key: "s1", val: s1}]); + log_event("JsInterpreter.js", 7209, ctx_1362, "let"); + var _return_3018 = res_ter(s0, + res_val( + Coq_value_prim( + Coq_prim_string(s1)))); + log_event("JsInterpreter.js", 7206, ctx_push(ctx_1362, [{key: "#RETURN_VALUE#", val: _return_3018}]), "return"); + return (_return_3018); + }); + log_event("JsInterpreter.js", 7210, ctx_push(ctx_1361, [{key: "#RETURN_VALUE#", val: _return_3019}]), "return"); + return (_return_3019); + + } + case "Coq_prealloc_string_proto_to_string":log_event("JsInterpreter.js", 7240, ctx_1169, "case"); + + log_event("JsInterpreter.js", 7239, ctx_1169, "switch"); + switch (vthis.tag) { + case "Coq_value_prim": + var p = vthis.value;var ctx_1363 = ctx_push(ctx_1169, [{key: "p", val: p}]); + log_event("JsInterpreter.js", 7222, ctx_1363, "case"); + + var _if_arg_3021 = type_compare((function () { + log_event("JsInterpreter.js", 7216, ctx_1363, "call"); + var _return_3022 = type_of(vthis); + log_event("JsInterpreter.js", 7215, ctx_push(ctx_1363, [{key: "#RETURN_VALUE#", val: _return_3022}]), "return"); + return (_return_3022); }()), + Coq_type_string()); + log_event("JsInterpreter.js", 7221, ctx_1363, "if"); + if (_if_arg_3021) { + var _return_3025 = res_ter(s, res_val(vthis)); + log_event("JsInterpreter.js", 7220, ctx_push(ctx_1363, [{key: "#RETURN_VALUE#", val: _return_3025}]), "return"); + return (_return_3025); + } else { + var _return_3024 = (function () { + log_event("JsInterpreter.js", 7218, ctx_1363, "call"); + var _return_3023 = run_error(s, Coq_native_error_type()); + log_event("JsInterpreter.js", 7217, ctx_push(ctx_1363, [{key: "#RETURN_VALUE#", val: _return_3023}]), "return"); + return (_return_3023); + }()) + ; + log_event("JsInterpreter.js", 7219, ctx_push(ctx_1363, [{key: "#RETURN_VALUE#", val: _return_3024}]), "return"); + return (_return_3024); + } + case "Coq_value_object": + var l = vthis.value;var ctx_1364 = ctx_push(ctx_1169, [{key: "l", val: l}]); + log_event("JsInterpreter.js", 7238, ctx_1364, "case"); + + var _return_3033 = if_some((function () { + log_event("JsInterpreter.js", 7224, ctx_1364, "call"); + var _return_3026 = run_object_method( + object_class_, s, l); + log_event("JsInterpreter.js", 7223, ctx_push(ctx_1364, [{key: "#RETURN_VALUE#", val: _return_3026}]), "return"); + return (_return_3026); }()), function(s0) { + + var ctx_1365 = ctx_push(ctx_1364, [{key: "s0", val: s0}]); + log_event("JsInterpreter.js", 7236, ctx_1365, "let"); + var _if_arg_3027 = (function () { + log_event("JsInterpreter.js", 7226, ctx_1365, "call"); + var _return_3028 = string_eq(s0, "String"); + log_event("JsInterpreter.js", 7225, ctx_push(ctx_1365, [{key: "#RETURN_VALUE#", val: _return_3028}]), "return"); + return (_return_3028); + }()) + ; + log_event("JsInterpreter.js", 7233, ctx_1365, "if"); + if (_if_arg_3027) { + var _return_3032 = (function () { + log_event("JsInterpreter.js", 7231, ctx_1365, "call"); + var _return_3031 = run_object_prim_value( + s, l); + log_event("JsInterpreter.js", 7230, ctx_push(ctx_1365, [{key: "#RETURN_VALUE#", val: _return_3031}]), "return"); + return (_return_3031); + }()) + ; + log_event("JsInterpreter.js", 7232, ctx_push(ctx_1365, [{key: "#RETURN_VALUE#", val: _return_3032}]), "return"); + return (_return_3032); + } else { + var _return_3030 = (function () { + log_event("JsInterpreter.js", 7228, ctx_1365, "call"); + var _return_3029 = run_error(s, + Coq_native_error_type( + )); + log_event("JsInterpreter.js", 7227, ctx_push(ctx_1365, [{key: "#RETURN_VALUE#", val: _return_3029}]), "return"); + return (_return_3029); + }()) + ; + log_event("JsInterpreter.js", 7229, ctx_push(ctx_1365, [{key: "#RETURN_VALUE#", val: _return_3030}]), "return"); + return (_return_3030); + } + }); + log_event("JsInterpreter.js", 7237, ctx_push(ctx_1364, [{key: "#RETURN_VALUE#", val: _return_3033}]), "return"); + return (_return_3033); + } + + case "Coq_prealloc_string_proto_value_of":log_event("JsInterpreter.js", 7266, ctx_1169, "case"); + + log_event("JsInterpreter.js", 7265, ctx_1169, "switch"); + switch (vthis.tag) { + case "Coq_value_prim": + var p = vthis.value;var ctx_1366 = ctx_push(ctx_1169, [{key: "p", val: p}]); + log_event("JsInterpreter.js", 7248, ctx_1366, "case"); + + var _if_arg_3034 = type_compare((function () { + log_event("JsInterpreter.js", 7242, ctx_1366, "call"); + var _return_3035 = type_of(vthis); + log_event("JsInterpreter.js", 7241, ctx_push(ctx_1366, [{key: "#RETURN_VALUE#", val: _return_3035}]), "return"); + return (_return_3035); }()), + Coq_type_string()); + log_event("JsInterpreter.js", 7247, ctx_1366, "if"); + if (_if_arg_3034) { + var _return_3038 = res_ter(s, res_val(vthis)); + log_event("JsInterpreter.js", 7246, ctx_push(ctx_1366, [{key: "#RETURN_VALUE#", val: _return_3038}]), "return"); + return (_return_3038); + } else { + var _return_3037 = (function () { + log_event("JsInterpreter.js", 7244, ctx_1366, "call"); + var _return_3036 = run_error(s, Coq_native_error_type()); + log_event("JsInterpreter.js", 7243, ctx_push(ctx_1366, [{key: "#RETURN_VALUE#", val: _return_3036}]), "return"); + return (_return_3036); + }()) + ; + log_event("JsInterpreter.js", 7245, ctx_push(ctx_1366, [{key: "#RETURN_VALUE#", val: _return_3037}]), "return"); + return (_return_3037); + } + case "Coq_value_object": + var l = vthis.value;var ctx_1367 = ctx_push(ctx_1169, [{key: "l", val: l}]); + log_event("JsInterpreter.js", 7264, ctx_1367, "case"); + + var _return_3046 = if_some((function () { + log_event("JsInterpreter.js", 7250, ctx_1367, "call"); + var _return_3039 = run_object_method( + object_class_, s, l); + log_event("JsInterpreter.js", 7249, ctx_push(ctx_1367, [{key: "#RETURN_VALUE#", val: _return_3039}]), "return"); + return (_return_3039); }()), function(s0) { + + var ctx_1368 = ctx_push(ctx_1367, [{key: "s0", val: s0}]); + log_event("JsInterpreter.js", 7262, ctx_1368, "let"); + var _if_arg_3040 = (function () { + log_event("JsInterpreter.js", 7252, ctx_1368, "call"); + var _return_3041 = string_eq(s0, "String"); + log_event("JsInterpreter.js", 7251, ctx_push(ctx_1368, [{key: "#RETURN_VALUE#", val: _return_3041}]), "return"); + return (_return_3041); + }()) + ; + log_event("JsInterpreter.js", 7259, ctx_1368, "if"); + if (_if_arg_3040) { + var _return_3045 = (function () { + log_event("JsInterpreter.js", 7257, ctx_1368, "call"); + var _return_3044 = run_object_prim_value( + s, l); + log_event("JsInterpreter.js", 7256, ctx_push(ctx_1368, [{key: "#RETURN_VALUE#", val: _return_3044}]), "return"); + return (_return_3044); + }()) + ; + log_event("JsInterpreter.js", 7258, ctx_push(ctx_1368, [{key: "#RETURN_VALUE#", val: _return_3045}]), "return"); + return (_return_3045); + } else { + var _return_3043 = (function () { + log_event("JsInterpreter.js", 7254, ctx_1368, "call"); + var _return_3042 = run_error(s, + Coq_native_error_type( + )); + log_event("JsInterpreter.js", 7253, ctx_push(ctx_1368, [{key: "#RETURN_VALUE#", val: _return_3042}]), "return"); + return (_return_3042); + }()) + ; + log_event("JsInterpreter.js", 7255, ctx_push(ctx_1368, [{key: "#RETURN_VALUE#", val: _return_3043}]), "return"); + return (_return_3043); + } + }); + log_event("JsInterpreter.js", 7263, ctx_push(ctx_1367, [{key: "#RETURN_VALUE#", val: _return_3046}]), "return"); + return (_return_3046); + } + + case "Coq_prealloc_error":log_event("JsInterpreter.js", 7273, ctx_1169, "case"); + + var v = (function () { + log_event("JsInterpreter.js", 7268, ctx_1169, "call"); + var _return_3047 = get_arg(0, args); + log_event("JsInterpreter.js", 7267, ctx_push(ctx_1169, [{key: "#RETURN_VALUE#", val: _return_3047}]), "return"); + return (_return_3047); + }()) + ; + var ctx_1369 = ctx_push(ctx_1169, [{key: "v", val: v}]); + log_event("JsInterpreter.js", 7272, ctx_1369, "let"); + var _return_3049 = (function () { + log_event("JsInterpreter.js", 7270, ctx_1369, "call"); + var _return_3048 = build_error(s, + Coq_value_object( + Coq_object_loc_prealloc( + Coq_prealloc_error_proto())), v); + log_event("JsInterpreter.js", 7269, ctx_push(ctx_1369, [{key: "#RETURN_VALUE#", val: _return_3048}]), "return"); + return (_return_3048); + }()) + ; + log_event("JsInterpreter.js", 7271, ctx_push(ctx_1369, [{key: "#RETURN_VALUE#", val: _return_3049}]), "return"); + return (_return_3049); + + case "Coq_prealloc_native_error": + var ne = b.error;var ctx_1370 = ctx_push(ctx_1169, [{key: "ne", val: ne}]); + log_event("JsInterpreter.js", 7280, ctx_1370, "case"); + + var v = (function () { + log_event("JsInterpreter.js", 7275, ctx_1370, "call"); + var _return_3050 = get_arg(0, args); + log_event("JsInterpreter.js", 7274, ctx_push(ctx_1370, [{key: "#RETURN_VALUE#", val: _return_3050}]), "return"); + return (_return_3050); + }()) + ; + var ctx_1371 = ctx_push(ctx_1370, [{key: "v", val: v}]); + log_event("JsInterpreter.js", 7279, ctx_1371, "let"); + var _return_3052 = (function () { + log_event("JsInterpreter.js", 7277, ctx_1371, "call"); + var _return_3051 = build_error(s, + Coq_value_object( + Coq_object_loc_prealloc( + Coq_prealloc_native_error_proto(ne))), v); + log_event("JsInterpreter.js", 7276, ctx_push(ctx_1371, [{key: "#RETURN_VALUE#", val: _return_3051}]), "return"); + return (_return_3051); + }()) + ; + log_event("JsInterpreter.js", 7278, ctx_push(ctx_1371, [{key: "#RETURN_VALUE#", val: _return_3052}]), "return"); + return (_return_3052); + + case "Coq_prealloc_throw_type_error":log_event("JsInterpreter.js", 7284, ctx_1169, "case"); + + var _return_3054 = (function () { + log_event("JsInterpreter.js", 7282, ctx_1169, "call"); + var _return_3053 = run_error(s, Coq_native_error_type()); + log_event("JsInterpreter.js", 7281, ctx_push(ctx_1169, [{key: "#RETURN_VALUE#", val: _return_3053}]), "return"); + return (_return_3053); + }()) + ; + log_event("JsInterpreter.js", 7283, ctx_push(ctx_1169, [{key: "#RETURN_VALUE#", val: _return_3054}]), "return"); + return (_return_3054); + default:log_event("JsInterpreter.js", 7298, ctx_1169, "case"); + + var _return_3061 = (function () { + log_event("JsInterpreter.js", 7296, ctx_1169, "call"); + var _return_3060 = function (s) { + var ctx_1372 = ctx_push(ctx_1169, [{key: "s", val: s}]); + log_event("JsInterpreter.js", 7294, ctx_1372, "enter"); + (function () { + log_event("JsInterpreter.js", 7293, ctx_1372, "call"); + var _return_3059 = Debug.not_yet_implemented_because( + __LOC__, s); + log_event("JsInterpreter.js", 7292, ctx_push(ctx_1372, [{key: "#RETURN_VALUE#", val: _return_3059}]), "return"); + return (_return_3059); + }()) + ; + var _return_3058 = Coq_result_not_yet_implemented( + ); + log_event("JsInterpreter.js", 7291, ctx_push(ctx_1372, [{key: "#RETURN_VALUE#", val: _return_3058}]), "return"); + return (_return_3058); }((function () { + log_event("JsInterpreter.js", 7290, ctx_1169, "call"); + var _return_3057 = strappend("Call prealloc_", + (function () { + log_event("JsInterpreter.js", 7288, ctx_1169, "call"); + var _return_3056 = + strappend( + (function () { + log_event("JsInterpreter.js", 7286, ctx_1169, "call"); + var _return_3055 = + string_of_prealloc( + b); + log_event("JsInterpreter.js", 7285, ctx_push(ctx_1169, [{key: "#RETURN_VALUE#", val: _return_3055}]), "return"); + return (_return_3055); + }()), + " not yet implemented"); + log_event("JsInterpreter.js", 7287, ctx_push(ctx_1169, [{key: "#RETURN_VALUE#", val: _return_3056}]), "return"); + return (_return_3056); + }())); + log_event("JsInterpreter.js", 7289, ctx_push(ctx_1169, [{key: "#RETURN_VALUE#", val: _return_3057}]), "return"); + return (_return_3057); }())); + log_event("JsInterpreter.js", 7295, ctx_push(ctx_1169, [{key: "#RETURN_VALUE#", val: _return_3060}]), "return"); + return (_return_3060); + }()) + ; + log_event("JsInterpreter.js", 7297, ctx_push(ctx_1169, [{key: "#RETURN_VALUE#", val: _return_3061}]), "return"); + return (_return_3061); + } + +}; + +var run_call = function (s, c, l, vthis, args) { + var ctx_1373 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "c", val: c}, {key: "l", val: l}, {key: "vthis", val: vthis}, {key: "args", val: args}]); + log_event("JsInterpreter.js", 7357, ctx_1373, "enter"); + var _return_3080 = if_some((function () { + log_event("JsInterpreter.js", 7302, ctx_1373, "call"); + var _return_3062 = run_object_method(object_call_, + s, l); + log_event("JsInterpreter.js", 7301, ctx_push(ctx_1373, [{key: "#RETURN_VALUE#", val: _return_3062}]), "return"); + return (_return_3062); }()), function(co) { + + var ctx_1374 = ctx_push(ctx_1373, [{key: "co", val: co}]); + log_event("JsInterpreter.js", 7355, ctx_1374, "let"); + var _return_3079 = if_some(co, function(c0) { + + var ctx_1375 = ctx_push(ctx_1374, [{key: "c0", val: c0}]); + log_event("JsInterpreter.js", 7351, ctx_1375, "let"); + log_event("JsInterpreter.js", 7348, ctx_1375, "switch"); + switch (c0.tag) { + case "Coq_call_default":log_event("JsInterpreter.js", 7306, ctx_1375, "case"); + + var _return_3064 = (function () { + log_event("JsInterpreter.js", 7304, ctx_1375, "call"); + var _return_3063 = + entering_func_code(s, + c, l, vthis, args); + log_event("JsInterpreter.js", 7303, ctx_push(ctx_1375, [{key: "#RETURN_VALUE#", val: _return_3063}]), "return"); + return (_return_3063); + }()) + ; + log_event("JsInterpreter.js", 7305, ctx_push(ctx_1375, [{key: "#RETURN_VALUE#", val: _return_3064}]), "return"); + return (_return_3064); + case "Coq_call_after_bind":log_event("JsInterpreter.js", 7343, ctx_1375, "case"); + + var _return_3076 = + if_some((function () { + log_event("JsInterpreter.js", 7308, ctx_1375, "call"); + var _return_3065 = + run_object_method( + object_bound_args_, + s, l); + log_event("JsInterpreter.js", 7307, ctx_push(ctx_1375, [{key: "#RETURN_VALUE#", val: _return_3065}]), "return"); + return (_return_3065); + }()), function(oarg) { + + var ctx_1376 = ctx_push(ctx_1375, [{key: "oarg", val: oarg}]); + log_event("JsInterpreter.js", 7341, ctx_1376, "let"); + var _return_3075 = + if_some(oarg, + function(boundArgs) { + + var ctx_1377 = ctx_push(ctx_1376, [{key: "boundArgs", val: boundArgs}]); + log_event("JsInterpreter.js", 7337, ctx_1377, "let"); + var _return_3074 = + if_some( + (function () { + log_event("JsInterpreter.js", 7310, ctx_1377, "call"); + var _return_3066 = + run_object_method( + object_bound_this_, + s, l); + log_event("JsInterpreter.js", 7309, ctx_push(ctx_1377, [{key: "#RETURN_VALUE#", val: _return_3066}]), "return"); + return (_return_3066); + }()), + function(obnd) { + + var ctx_1378 = ctx_push(ctx_1377, [{key: "obnd", val: obnd}]); + log_event("JsInterpreter.js", 7333, ctx_1378, "let"); + var _return_3073 = + if_some(obnd, + function(boundThis) { + + var ctx_1379 = ctx_push(ctx_1378, [{key: "boundThis", val: boundThis}]); + log_event("JsInterpreter.js", 7329, ctx_1379, "let"); + var _return_3072 = + if_some( + (function () { + log_event("JsInterpreter.js", 7312, ctx_1379, "call"); + var _return_3067 = + run_object_method( + object_target_function_, + s, l); + log_event("JsInterpreter.js", 7311, ctx_push(ctx_1379, [{key: "#RETURN_VALUE#", val: _return_3067}]), "return"); + return (_return_3067); + }()), + function(otrg) { + + var ctx_1380 = ctx_push(ctx_1379, [{key: "otrg", val: otrg}]); + log_event("JsInterpreter.js", 7325, ctx_1380, "let"); + var _return_3071 = + if_some( + otrg, + function(target) { + + var ctx_1381 = ctx_push(ctx_1380, [{key: "target", val: target}]); + log_event("JsInterpreter.js", 7321, ctx_1381, "let"); + var arguments_ = (function () { + log_event("JsInterpreter.js", 7314, ctx_1381, "call"); + var _return_3068 = + LibList.append( + boundArgs, + args); + log_event("JsInterpreter.js", 7313, ctx_push(ctx_1381, [{key: "#RETURN_VALUE#", val: _return_3068}]), "return"); + return (_return_3068); + }()) + ; + var ctx_1382 = ctx_push(ctx_1381, [{key: "arguments_", val: arguments_}]); + log_event("JsInterpreter.js", 7318, ctx_1382, "let"); + var _return_3070 = (function () { + log_event("JsInterpreter.js", 7316, ctx_1382, "call"); + var _return_3069 = + run_call( + s, c, + target, + boundThis, + arguments_); + log_event("JsInterpreter.js", 7315, ctx_push(ctx_1382, [{key: "#RETURN_VALUE#", val: _return_3069}]), "return"); + return (_return_3069); + }()) + ; + log_event("JsInterpreter.js", 7317, ctx_push(ctx_1382, [{key: "#RETURN_VALUE#", val: _return_3070}]), "return"); + return (_return_3070); + + }); + log_event("JsInterpreter.js", 7322, ctx_push(ctx_1380, [{key: "#RETURN_VALUE#", val: _return_3071}]), "return"); + return (_return_3071); + }); + log_event("JsInterpreter.js", 7326, ctx_push(ctx_1379, [{key: "#RETURN_VALUE#", val: _return_3072}]), "return"); + return (_return_3072); + }); + log_event("JsInterpreter.js", 7330, ctx_push(ctx_1378, [{key: "#RETURN_VALUE#", val: _return_3073}]), "return"); + return (_return_3073); + }); + log_event("JsInterpreter.js", 7334, ctx_push(ctx_1377, [{key: "#RETURN_VALUE#", val: _return_3074}]), "return"); + return (_return_3074); + }); + log_event("JsInterpreter.js", 7338, ctx_push(ctx_1376, [{key: "#RETURN_VALUE#", val: _return_3075}]), "return"); + return (_return_3075); + }); + log_event("JsInterpreter.js", 7342, ctx_push(ctx_1375, [{key: "#RETURN_VALUE#", val: _return_3076}]), "return"); + return (_return_3076); + case "Coq_call_prealloc": + var b = c0.prealloc;var ctx_1383 = ctx_push(ctx_1375, [{key: "b", val: b}]); + log_event("JsInterpreter.js", 7347, ctx_1383, "case"); + + var _return_3078 = (function () { + log_event("JsInterpreter.js", 7345, ctx_1383, "call"); + var _return_3077 = + run_call_prealloc(s, c, + b, vthis, args); + log_event("JsInterpreter.js", 7344, ctx_push(ctx_1383, [{key: "#RETURN_VALUE#", val: _return_3077}]), "return"); + return (_return_3077); + }()) + ; + log_event("JsInterpreter.js", 7346, ctx_push(ctx_1383, [{key: "#RETURN_VALUE#", val: _return_3078}]), "return"); + return (_return_3078); + } + + }); + log_event("JsInterpreter.js", 7352, ctx_push(ctx_1374, [{key: "#RETURN_VALUE#", val: _return_3079}]), "return"); + return (_return_3079); + }); + log_event("JsInterpreter.js", 7356, ctx_push(ctx_1373, [{key: "#RETURN_VALUE#", val: _return_3080}]), "return"); + return (_return_3080); +}; + +var run_javascript_from_state = function (s, p) { + var ctx_1384 = ctx_push(ctx_empty, [{key: "s", val: s}, {key: "p", val: p}]); + log_event("JsInterpreter.js", 7370, ctx_1384, "enter"); + var c = (function () { + log_event("JsInterpreter.js", 7359, ctx_1384, "call"); + var _return_3081 = execution_ctx_initial(prog_intro_strictness(p)); + log_event("JsInterpreter.js", 7358, ctx_push(ctx_1384, [{key: "#RETURN_VALUE#", val: _return_3081}]), "return"); + return (_return_3081); + }()) + ; + var ctx_1385 = ctx_push(ctx_1384, [{key: "c", val: c}]); + log_event("JsInterpreter.js", 7369, ctx_1385, "let"); + var _return_3085 = if_void((function () { + log_event("JsInterpreter.js", 7361, ctx_1385, "call"); + var _return_3082 = execution_ctx_binding_inst(s, c, + Coq_codetype_global(), + None(), p, mk_nil()); + log_event("JsInterpreter.js", 7360, ctx_push(ctx_1385, [{key: "#RETURN_VALUE#", val: _return_3082}]), "return"); + return (_return_3082); }()), function(s_2) { + + var ctx_1386 = ctx_push(ctx_1385, [{key: "s_2", val: s_2}]); + log_event("JsInterpreter.js", 7367, ctx_1386, "let"); + var _return_3084 = (function () { + log_event("JsInterpreter.js", 7363, ctx_1386, "call"); + var _return_3083 = run_prog(s_2, c, p); + log_event("JsInterpreter.js", 7362, ctx_push(ctx_1386, [{key: "#RETURN_VALUE#", val: _return_3083}]), "return"); + return (_return_3083); + }()) + ; + log_event("JsInterpreter.js", 7364, ctx_push(ctx_1386, [{key: "#RETURN_VALUE#", val: _return_3084}]), "return"); + return (_return_3084); + }); + log_event("JsInterpreter.js", 7368, ctx_push(ctx_1385, [{key: "#RETURN_VALUE#", val: _return_3085}]), "return"); + return (_return_3085); + +}; + +var run_javascript_from_result = function (w, p) { + var ctx_1387 = ctx_push(ctx_empty, [{key: "w", val: w}, {key: "p", val: p}]); + log_event("JsInterpreter.js", 7378, ctx_1387, "enter"); + var _return_3089 = if_success(w, function(s, _pat_any_3088) { + + var ctx_1388 = ctx_push(ctx_1387, [{key: "s", val: s}]); + log_event("JsInterpreter.js", 7376, ctx_1388, "let"); + var _return_3087 = (function () { + log_event("JsInterpreter.js", 7372, ctx_1388, "call"); + var _return_3086 = run_javascript_from_state(s, p); + log_event("JsInterpreter.js", 7371, ctx_push(ctx_1388, [{key: "#RETURN_VALUE#", val: _return_3086}]), "return"); + return (_return_3086); + }()) + ; + log_event("JsInterpreter.js", 7373, ctx_push(ctx_1388, [{key: "#RETURN_VALUE#", val: _return_3087}]), "return"); + return (_return_3087); + }); + log_event("JsInterpreter.js", 7377, ctx_push(ctx_1387, [{key: "#RETURN_VALUE#", val: _return_3089}]), "return"); + return (_return_3089); +}; + +var run_javascript = function (p) { + var ctx_1389 = ctx_push(ctx_empty, [{key: "p", val: p}]); + log_event("JsInterpreter.js", 7382, ctx_1389, "enter"); + var _return_3091 = (function () { + log_event("JsInterpreter.js", 7380, ctx_1389, "call"); + var _return_3090 = run_javascript_from_state(state_initial, p); + log_event("JsInterpreter.js", 7379, ctx_push(ctx_1389, [{key: "#RETURN_VALUE#", val: _return_3090}]), "return"); + return (_return_3090); + }()) + ; + log_event("JsInterpreter.js", 7381, ctx_push(ctx_1389, [{key: "#RETURN_VALUE#", val: _return_3091}]), "return"); + return (_return_3091); +}; +}// end of with Datatypes +}// end of with JsCommon +}// end of with JsCommonAux +}// end of with JsInit +}// end of with JsInterpreterMonads +}// end of with JsPreliminary +}// end of with JsSyntax +}// end of with JsSyntaxAux +}// end of with LibList +}// end of with LibOption +}// end of with LibProd +}// end of with Shared + +return { + convert_number_to_bool: convert_number_to_bool, + convert_string_to_bool: convert_string_to_bool, + convert_prim_to_boolean: convert_prim_to_boolean, + convert_value_to_boolean: convert_value_to_boolean, + convert_prim_to_number: convert_prim_to_number, + convert_number_to_integer: convert_number_to_integer, + convert_bool_to_string: convert_bool_to_string, + convert_prim_to_string: convert_prim_to_string, + equality_test_for_same_type: equality_test_for_same_type, + strict_equality_test: strict_equality_test, + inequality_test_number: inequality_test_number, + inequality_test_string: inequality_test_string, + inequality_test_primitive: inequality_test_primitive, + typeof_prim: typeof_prim, + string_of_propname: string_of_propname, + build_error: build_error, + run_error: run_error, + out_error_or_void: out_error_or_void, + out_error_or_cst: out_error_or_cst, + run_object_method: run_object_method, + run_object_heap_set_extensible: run_object_heap_set_extensible, + object_has_prop: object_has_prop, + object_get_builtin: object_get_builtin, + run_object_get: run_object_get, + run_object_get_prop: run_object_get_prop, + object_proto_is_prototype_of: object_proto_is_prototype_of, + object_default_value: object_default_value, + to_primitive: to_primitive, + to_number: to_number, + to_integer: to_integer, + to_int32: to_int32, + to_uint32: to_uint32, + to_string: to_string, + object_can_put: object_can_put, + run_object_define_own_prop_array_loop: run_object_define_own_prop_array_loop, + object_define_own_prop: object_define_own_prop, + run_to_descriptor: run_to_descriptor, + prim_new_object: prim_new_object, + to_object: to_object, + run_object_prim_value: run_object_prim_value, + prim_value_get: prim_value_get, + env_record_has_binding: env_record_has_binding, + lexical_env_get_identifier_ref: lexical_env_get_identifier_ref, + object_delete_default: object_delete_default, + object_delete: object_delete, + env_record_delete_binding: env_record_delete_binding, + env_record_implicit_this_value: env_record_implicit_this_value, + identifier_resolution: identifier_resolution, + env_record_get_binding_value: env_record_get_binding_value, + ref_get_value: ref_get_value, + run_expr_get_value: run_expr_get_value, + object_put_complete: object_put_complete, + object_put: object_put, + env_record_set_mutable_binding: env_record_set_mutable_binding, + prim_value_put: prim_value_put, + ref_put_value: ref_put_value, + env_record_create_mutable_binding: env_record_create_mutable_binding, + env_record_create_set_mutable_binding: env_record_create_set_mutable_binding, + env_record_create_immutable_binding: env_record_create_immutable_binding, + env_record_initialize_immutable_binding: env_record_initialize_immutable_binding, + call_object_new: call_object_new, + array_args_map_loop: array_args_map_loop, + string_of_prealloc: string_of_prealloc, + run_construct_prealloc: run_construct_prealloc, + run_construct_default: run_construct_default, + run_construct: run_construct, + run_call_default: run_call_default, + creating_function_object_proto: creating_function_object_proto, + creating_function_object: creating_function_object, + binding_inst_formal_params: binding_inst_formal_params, + binding_inst_function_decls: binding_inst_function_decls, + make_arg_getter: make_arg_getter, + make_arg_setter: make_arg_setter, + arguments_object_map_loop: arguments_object_map_loop, + arguments_object_map: arguments_object_map, + create_arguments_object: create_arguments_object, + binding_inst_arg_obj: binding_inst_arg_obj, + binding_inst_var_decls: binding_inst_var_decls, + execution_ctx_binding_inst: execution_ctx_binding_inst, + entering_func_code: entering_func_code, + run_object_get_own_prop: run_object_get_own_prop, + run_function_has_instance: run_function_has_instance, + run_object_has_instance: run_object_has_instance, + from_prop_descriptor: from_prop_descriptor, + run_equal: run_equal, + convert_twice: convert_twice, + convert_twice_primitive: convert_twice_primitive, + convert_twice_number: convert_twice_number, + convert_twice_string: convert_twice_string, + issome: issome, + run_binary_op_add: run_binary_op_add, + run_binary_op_arith: run_binary_op_arith, + run_binary_op_shift: run_binary_op_shift, + run_binary_op_bitwise: run_binary_op_bitwise, + run_binary_op_compare: run_binary_op_compare, + run_binary_op_instanceof: run_binary_op_instanceof, + run_binary_op_in: run_binary_op_in, + run_binary_op: run_binary_op, + run_prepost_op: run_prepost_op, + run_typeof_value: run_typeof_value, + run_unary_op: run_unary_op, + create_new_function_in: create_new_function_in, + init_object: init_object, + run_array_element_list: run_array_element_list, + init_array: init_array, + run_var_decl_item: run_var_decl_item, + run_var_decl: run_var_decl, + run_list_expr: run_list_expr, + run_block: run_block, + run_binary_op_and: run_binary_op_and, + run_binary_op_or: run_binary_op_or, + run_expr_binary_op: run_expr_binary_op, + run_expr_access: run_expr_access, + run_expr_assign: run_expr_assign, + run_expr_function: run_expr_function, + entering_eval_code: entering_eval_code, + run_eval: run_eval, + run_expr_call: run_expr_call, + run_expr_conditionnal: run_expr_conditionnal, + run_expr_new: run_expr_new, + run_stat_label: run_stat_label, + run_stat_with: run_stat_with, + run_stat_if: run_stat_if, + run_stat_while: run_stat_while, + run_stat_switch_end: run_stat_switch_end, + run_stat_switch_no_default: run_stat_switch_no_default, + run_stat_switch_with_default_default: run_stat_switch_with_default_default, + run_stat_switch_with_default_B: run_stat_switch_with_default_B, + run_stat_switch_with_default_A: run_stat_switch_with_default_A, + run_stat_switch: run_stat_switch, + run_stat_do_while: run_stat_do_while, + run_stat_try: run_stat_try, + run_stat_throw: run_stat_throw, + run_stat_return: run_stat_return, + run_stat_for_loop: run_stat_for_loop, + run_stat_for: run_stat_for, + run_stat_for_var: run_stat_for_var, + run_expr: run_expr, + run_stat: run_stat, + run_elements: run_elements, + run_prog: run_prog, + push: push, + run_object_is_sealed: run_object_is_sealed, + run_object_seal: run_object_seal, + run_object_freeze: run_object_freeze, + run_object_is_frozen: run_object_is_frozen, + run_get_args_for_apply: run_get_args_for_apply, + valueToStringForJoin: valueToStringForJoin, + run_array_join_elements: run_array_join_elements, + run_call_prealloc: run_call_prealloc, + run_call: run_call, + run_javascript_from_state: run_javascript_from_state, + run_javascript_from_result: run_javascript_from_result, + run_javascript: run_javascript}; +})(); + +/* --------------------- ModuleExport.js --------------------- */ + +// Export the JsInterpreter ML module as a NodeJS module +try { + module.exports = JsInterpreter; +} catch (e) {} diff --git a/branch/4.04/jsref/displayed_sources.js b/branch/4.04/jsref/displayed_sources.js new file mode 100644 index 0000000000000000000000000000000000000000..e749e2310f91d0e1412310aa19ab44d194fe48ed --- /dev/null +++ b/branch/4.04/jsref/displayed_sources.js @@ -0,0 +1,11 @@ +var tracer_files = [ + +/* --------------------- JsInterpreter.js --------------------- */ + { file: 'JsInterpreter.js', contents: 'var JsInterpreter = (function() {\nwith (Datatypes) {\nwith (JsCommon) {\nwith (JsCommonAux) {\nwith (JsInit) {\nwith (JsInterpreterMonads) {\nwith (JsPreliminary) {\nwith (JsSyntax) {\nwith (JsSyntaxAux) {\nwith (LibList) {\nwith (LibOption) {\nwith (LibProd) {\nwith (Shared) {\n\nvar convert_number_to_bool = function (n) {\n if ((JsNumber.isposzero(n) || (JsNumber.isnegzero(n) || JsNumber.isnan(n)))) {\n return (false);\n } else {\n return (true);\n }\n};\n\n\n\nvar convert_string_to_bool = function (s) {\n if (string_eq(s, "")) {\n return (false);\n } else {\n return (true);\n }\n};\n\n\n\nvar convert_prim_to_boolean = function (_foo_) {\n switch (_foo_.tag) {\n case "Coq_prim_undef":\n return (false);\n case "Coq_prim_null":\n return (false);\n case "Coq_prim_bool":\n var b = _foo_.value;\n return (b);\n case "Coq_prim_number":\n var n = _foo_.value;\n return (convert_number_to_bool(n));\n case "Coq_prim_string":\n var s = _foo_.value;\n return (convert_string_to_bool(s));\n }\n \n};\n\n\n\nvar convert_value_to_boolean = function (_foo_) {\n switch (_foo_.tag) {\n case "Coq_value_prim":\n var p = _foo_.value;\n return (convert_prim_to_boolean(p));\n case "Coq_value_object":\n var o = _foo_.value;\n return (true);\n }\n \n};\n\n\n\nvar convert_prim_to_number = function (_foo_) {\n switch (_foo_.tag) {\n case "Coq_prim_undef":\n return (JsNumber.nan);\n case "Coq_prim_null":\n return (JsNumber.zero);\n case "Coq_prim_bool":\n var b = _foo_.value;\n if (b) {\n return (JsNumber.one);\n } else {\n return (JsNumber.zero);\n }\n case "Coq_prim_number":\n var n = _foo_.value;\n return (n);\n case "Coq_prim_string":\n var s = _foo_.value;\n return (JsNumber.from_string(s));\n }\n \n};\n\n\n\nvar convert_number_to_integer = function (n) {\n if (JsNumber.isnan(n)) {\n return (JsNumber.zero);\n } else {\n if ((JsNumber.isposzero(n)\n || (JsNumber.isnegzero(n)\n || ((n === JsNumber.infinity) || (n === JsNumber.neg_infinity))))) {\n return (n);\n } else {\n return ((JsNumber.sign(n) * JsNumber.floor(JsNumber.absolute(n))));\n }\n }\n};\n\n\n\nvar convert_bool_to_string = function (_foo_) {\n switch (_foo_) {\n case true:\n return ("true");\n case false:\n return ("false");\n }\n \n};\n\n\n\nvar convert_prim_to_string = function (_foo_) {\n switch (_foo_.tag) {\n case "Coq_prim_undef":\n return ("undefined");\n case "Coq_prim_null":\n return ("null");\n case "Coq_prim_bool":\n var b = _foo_.value;\n return (convert_bool_to_string(b));\n case "Coq_prim_number":\n var n = _foo_.value;\n return (JsNumber.to_string(n));\n case "Coq_prim_string":\n var s = _foo_.value;\n return (s);\n }\n \n};\n\n\n\nvar equality_test_for_same_type = function (ty, v1, v2) {\n switch (ty.tag) {\n case "Coq_type_undef":\n return (true);\n case "Coq_type_null":\n return (true);\n case "Coq_type_bool":\n return (value_compare(v1, v2));\n case "Coq_type_number":\n switch (v1.tag) {\n case "Coq_value_prim":\n var p = v1.value;\n switch (p.tag) {\n case "Coq_prim_undef":\n return (false);\n case "Coq_prim_null":\n return (false);\n case "Coq_prim_bool":\n var b = p.value;\n return (false);\n case "Coq_prim_number":\n var n1 = p.value;\n switch (v2.tag) {\n case "Coq_value_prim":\n var p0 = v2.value;\n switch (p0.tag) {\n case "Coq_prim_undef":\n return (false);\n case "Coq_prim_null":\n return (false);\n case "Coq_prim_bool":\n var b = p0.value;\n return (false);\n case "Coq_prim_number":\n var n2 = p0.value;\n if (JsNumber.isnan(n1)) {\n return (false);\n } else {\n if (JsNumber.isnan(n2)) {\n return (false);\n } else {\n if ((JsNumber.isposzero(n1)\n && JsNumber.isnegzero(n2))) {\n return (true);\n } else {\n if ((JsNumber.isnegzero(n1)\n && JsNumber.isposzero(n2))) {\n return (true);\n } else {\n return ((n1 === n2));\n }\n }\n }\n }\n case "Coq_prim_string":\n var s = p0.value;\n return (false);\n }\n \n case "Coq_value_object":\n var o = v2.value;\n return (false);\n }\n \n case "Coq_prim_string":\n var s = p.value;\n return (false);\n }\n \n case "Coq_value_object":\n var o = v1.value;\n return (false);\n }\n \n case "Coq_type_string":\n return (value_compare(v1, v2));\n case "Coq_type_object":\n return (value_compare(v1, v2));\n }\n \n};\n\n\n\nvar strict_equality_test = function (v1, v2) {\n var ty1 = type_of(v1);\n var ty2 = type_of(v2);\n if (type_compare(ty1, ty2)) {\n return (equality_test_for_same_type(ty1, v1, v2));\n } else {\n return (false);\n }\n};\n\n\n\nvar inequality_test_number = function (n1, n2) {\n if ((JsNumber.isnan(n1) || JsNumber.isnan(n2))) {\n return (Coq_prim_undef());\n } else {\n if ((n1 === n2)) {\n return (Coq_prim_bool(false));\n } else {\n if ((JsNumber.isposzero(n1) && JsNumber.isnegzero(n2))) {\n return (Coq_prim_bool(false));\n } else {\n if ((JsNumber.isnegzero(n1) && JsNumber.isposzero(n2))) {\n return (Coq_prim_bool(false));\n } else {\n if ((n1 === JsNumber.infinity)) {\n return (Coq_prim_bool(false));\n } else {\n if ((n2 === JsNumber.infinity)) {\n return (Coq_prim_bool(true));\n } else {\n if ((n2 === JsNumber.neg_infinity)) {\n return (Coq_prim_bool(false));\n } else {\n if ((n1 === JsNumber.neg_infinity)) {\n return (Coq_prim_bool(true));\n } else {\n return (Coq_prim_bool((n1 < n2)));\n }\n }\n }\n }\n }\n }\n }\n }\n};\n\n\n\nvar inequality_test_string = function (s1, s2) {\n return (string_lt(s1, s2));\n};\n\n\n\nvar inequality_test_primitive = function (w1, w2) {\n switch (w1.tag) {\n case "Coq_prim_undef":\n return (\n inequality_test_number(convert_prim_to_number(w1),\n convert_prim_to_number(w2)));\n case "Coq_prim_null":\n return (\n inequality_test_number(convert_prim_to_number(w1),\n convert_prim_to_number(w2)));\n case "Coq_prim_bool":\n var b = w1.value;\n return (\n inequality_test_number(convert_prim_to_number(w1),\n convert_prim_to_number(w2)));\n case "Coq_prim_number":\n var n = w1.value;\n return (\n inequality_test_number(convert_prim_to_number(w1),\n convert_prim_to_number(w2)));\n case "Coq_prim_string":\n var s1 = w1.value;\n switch (w2.tag) {\n case "Coq_prim_undef":\n return (\n inequality_test_number(convert_prim_to_number(w1),\n convert_prim_to_number(w2)));\n case "Coq_prim_null":\n return (\n inequality_test_number(convert_prim_to_number(w1),\n convert_prim_to_number(w2)));\n case "Coq_prim_bool":\n var b = w2.value;\n return (\n inequality_test_number(convert_prim_to_number(w1),\n convert_prim_to_number(w2)));\n case "Coq_prim_number":\n var n = w2.value;\n return (\n inequality_test_number(convert_prim_to_number(w1),\n convert_prim_to_number(w2)));\n case "Coq_prim_string":\n var s2 = w2.value;\n return (Coq_prim_bool(inequality_test_string(s1, s2)));\n }\n \n }\n \n};\n\n\n\nvar typeof_prim = function (_foo_) {\n switch (_foo_.tag) {\n case "Coq_prim_undef":\n return ("undefined");\n case "Coq_prim_null":\n return ("object");\n case "Coq_prim_bool":\n var b = _foo_.value;\n return ("boolean");\n case "Coq_prim_number":\n var n = _foo_.value;\n return ("number");\n case "Coq_prim_string":\n var s = _foo_.value;\n return ("string");\n }\n \n};\n\n\n\nvar string_of_propname = function (_foo_) {\n switch (_foo_.tag) {\n case "Coq_propname_identifier":\n var s = _foo_.value;\n return (s);\n case "Coq_propname_string":\n var s = _foo_.value;\n return (s);\n case "Coq_propname_number":\n var n = _foo_.value;\n return (JsNumber.to_string(n));\n }\n \n};\n\n\n\nvar build_error = function (s, vproto, vmsg) {\n var o = object_new(vproto, "Error");\n var _tuple_arg_1 = object_alloc(s, o);\n var l = _tuple_arg_1[0], s_2 = _tuple_arg_1[1];\n if (value_compare(vmsg, Coq_value_prim(Coq_prim_undef()))) {\n return (result_out(Coq_out_ter(s_2, res_val(Coq_value_object(l)))));\n } else {\n return (\n function (s) {\n Debug.not_yet_implemented_because(__LOC__, s);\n return (Coq_result_not_yet_implemented());}(\n "Need [to_string] (this function shall be put in [runs_type].)"));\n }\n};\n\n\n\nvar run_error = function (s, ne) {\n return (\n if_object(\n build_error(s,\n Coq_value_object(\n Coq_object_loc_prealloc(Coq_prealloc_native_error_proto(ne))),\n Coq_value_prim(Coq_prim_undef())), function(s_2, l) {\n \n return (\n Coq_result_some(\n Coq_specret_out(\n Coq_out_ter(s_2,\n res_throw(Coq_resvalue_value(Coq_value_object(l)))))));}));\n};\n\n\n\nvar out_error_or_void = function (s, str, ne) {\n if (str) {\n return (run_error(s, ne));\n } else {\n return (result_out(out_void(s)));\n }\n};\n\n\n\nvar out_error_or_cst = function (s, str, ne, v) {\n if (str) {\n return (run_error(s, ne));\n } else {\n return (result_out(Coq_out_ter(s, res_val(v))));\n }\n};\n\n\n\nvar run_object_method = function (proj, s, l) {\n return (LibOption.map(proj, object_binds_pickable_option(s, l)));\n};\n\n\n\nvar run_object_heap_set_extensible = function (b, s, l) {\n return (\n LibOption.map(function (o) {\n return (object_write(s, l, object_set_extensible(o, b)));},\n object_binds_pickable_option(s, l)));\n};\n\n\n\nvar object_has_prop = function (s, c, l, x) {\n return (\n if_some(run_object_method(object_has_prop_, s, l), function(b) {\n \n switch (b.tag) {\n case "Coq_builtin_has_prop_default":\n return (\n if_run(run_object_get_prop(s, c, l, x), function(s1, d) {\n \n return (\n res_ter(s1,\n res_val(\n Coq_value_prim(\n Coq_prim_bool(\n !(\n full_descriptor_compare(d,\n Coq_full_descriptor_undef())))))));}));\n }\n }));\n};\n\nvar object_get_builtin = function (s, c, b, vthis, l, x) {\n var def = function (s0, l0) {\n return (\n if_run(run_object_get_prop(s0, c, l0, x), function(s1, d) {\n \n switch (d.tag) {\n case "Coq_full_descriptor_undef":\n return (\n res_ter(s1, res_val(Coq_value_prim(Coq_prim_undef()))));\n case "Coq_full_descriptor_some":\n var a = d.value;\n switch (a.tag) {\n case "Coq_attributes_data_of":\n var ad = a.value;\n return (res_ter(s1, res_val(ad.attributes_data_value)));\n case "Coq_attributes_accessor_of":\n var aa = a.value;\n var _switch_arg_2 = aa.attributes_accessor_get;\n switch (_switch_arg_2.tag) {\n case "Coq_value_prim":\n var p = _switch_arg_2.value;\n switch (p.tag) {\n case "Coq_prim_undef":\n return (\n res_ter(s1,\n res_val(Coq_value_prim(Coq_prim_undef()))));\n case "Coq_prim_null":\n return (Coq_result_impossible());\n case "Coq_prim_bool":\n var b0 = p.value;\n return (Coq_result_impossible());\n case "Coq_prim_number":\n var n = p.value;\n return (Coq_result_impossible());\n case "Coq_prim_string":\n var s2 = p.value;\n return (Coq_result_impossible());\n }\n \n case "Coq_value_object":\n var lf = _switch_arg_2.value;\n return (run_call(s1, c, lf, vthis, mk_nil()));\n }\n \n }\n \n }\n }));\n };\n var function0 = function (s0) {\n return (\n if_value(def(s0, l), function(s_2, v) {\n \n if (spec_function_get_error_case_dec(s_2, x, v)) {\n return (run_error(s_2, Coq_native_error_type()));\n } else {\n return (res_ter(s_2, res_val(v)));\n }}));\n };\n switch (b.tag) {\n case "Coq_builtin_get_default":\n return (def(s, l));\n case "Coq_builtin_get_function":\n return (function0(s));\n case "Coq_builtin_get_args_obj":\n return (\n if_some(run_object_method(object_parameter_map_, s, l),\n function(lmapo) {\n \n return (\n if_some(lmapo, function(lmap) {\n \n return (\n if_run(run_object_get_own_prop(s, c, lmap, x),\n function(s0, d) {\n \n switch (d.tag) {\n case "Coq_full_descriptor_undef":\n return (function0(s0));\n case "Coq_full_descriptor_some":\n var a = d.value;\n return (run_object_get(s0, c, lmap, x));\n }\n }));}));}));\n }\n \n};\n\nvar run_object_get = function (s, c, l, x) {\n return (\n if_some(run_object_method(object_get_, s, l), function(b) {\n \n return (object_get_builtin(s, c, b, Coq_value_object(l), l, x));}));\n};\n\nvar run_object_get_prop = function (s, c, l, x) {\n return (\n if_some(run_object_method(object_get_prop_, s, l), function(b) {\n \n switch (b.tag) {\n case "Coq_builtin_get_prop_default":\n return (\n if_run(run_object_get_own_prop(s, c, l, x), function(s1, d) {\n \n if (full_descriptor_compare(d, Coq_full_descriptor_undef())) {\n return (\n if_some(run_object_method(object_proto_, s1, l),\n function(proto) {\n \n switch (proto.tag) {\n case "Coq_value_prim":\n var p = proto.value;\n switch (p.tag) {\n case "Coq_prim_null":\n return (\n res_spec(s1, Coq_full_descriptor_undef()));\n default:\n return (\n function (s, m) {\n Debug.impossible_with_heap_because(\n __LOC__, s, m);\n return (Coq_result_impossible());}(\n s1,\n "Found a non-null primitive value as a prototype in [run_object_get_prop]."));\n }\n \n case "Coq_value_object":\n var lproto = proto.value;\n return (run_object_get_prop(s1, c, lproto, x));\n }\n }));\n } else {\n return (res_spec(s1, d));\n }}));\n }\n }));\n};\n\nvar object_proto_is_prototype_of = function (s, l0, l) {\n return (\n if_some(run_object_method(object_proto_, s, l), function(b) {\n \n switch (b.tag) {\n case "Coq_value_prim":\n var p = b.value;\n switch (p.tag) {\n case "Coq_prim_null":\n return (\n result_out(\n Coq_out_ter(s,\n res_val(Coq_value_prim(Coq_prim_bool(false))))));\n default:\n return (\n function (s, m) {\n Debug.impossible_with_heap_because(__LOC__, s, m);\n return (Coq_result_impossible());}(s,\n "[run_object_method] returned a primitive in [object_proto_is_prototype_of_body]."));\n }\n \n case "Coq_value_object":\n var l_2 = b.value;\n if (object_loc_compare(l_2, l0)) {\n return (\n result_out(\n Coq_out_ter(s,\n res_val(Coq_value_prim(Coq_prim_bool(true))))));\n } else {\n return (object_proto_is_prototype_of(s, l0, l_2));\n }\n }\n }));\n};\n\nvar object_default_value = function (s, c, l, prefo) {\n return (\n if_some(run_object_method(object_default_value_, s, l), function(b) {\n \n switch (b.tag) {\n case "Coq_builtin_default_value_default":\n var gpref = unsome_default(Coq_preftype_number(), prefo);\n var lpref = other_preftypes(gpref);\n var sub0 = function (s_2, x, k) {\n return (\n if_value(run_object_get(s_2, c, l, x), function(s1, vfo) {\n \n return (\n if_some(run_callable(s1, vfo), function(co) {\n \n switch (co.tag) {\n case "Some":\n var b0 = co.value;\n return (\n if_object(\n result_out(Coq_out_ter(s1, res_val(vfo))),\n function(s2, lfunc) {\n \n return (\n if_value(\n run_call(s2, c, lfunc,\n Coq_value_object(l), mk_nil()),\n function(s3, v) {\n \n switch (v.tag) {\n case "Coq_value_prim":\n var w = v.value;\n return (\n result_out(\n Coq_out_ter(s3,\n res_val(\n Coq_value_prim(w)))));\n case "Coq_value_object":\n var l0 = v.value;\n return (k(s3));\n }\n }));}));\n case "None":\n return (k(s1));\n }\n }));}));\n };\n var gmeth = method_of_preftype(gpref);\n return (\n sub0(s, gmeth, function (s_2) {\n var lmeth = method_of_preftype(lpref);\n return (\n sub0(s_2, lmeth, function (s_3) {\n return (run_error(s_3, Coq_native_error_type()));}));\n }));\n }\n }));\n};\n\nvar to_primitive = function (s, c, v, prefo) {\n switch (v.tag) {\n case "Coq_value_prim":\n var w = v.value;\n return (result_out(Coq_out_ter(s, res_val(Coq_value_prim(w)))));\n case "Coq_value_object":\n var l = v.value;\n return (\n if_prim(object_default_value(s, c, l, prefo), function(s0, r) {\n \n return (res_ter(s0, res_val(Coq_value_prim(r))));}));\n }\n \n};\n\nvar to_number = function (s, c, _foo_) {\n switch (_foo_.tag) {\n case "Coq_value_prim":\n var w = _foo_.value;\n return (\n result_out(\n Coq_out_ter(s,\n res_val(\n Coq_value_prim(Coq_prim_number(convert_prim_to_number(w)))))));\n case "Coq_value_object":\n var l = _foo_.value;\n return (\n if_prim(\n to_primitive(s, c, Coq_value_object(l),\n Some(Coq_preftype_number())), function(s1, w) {\n \n return (\n res_ter(s1,\n res_val(\n Coq_value_prim(Coq_prim_number(convert_prim_to_number(w))))));\n }));\n }\n \n};\n\nvar to_integer = function (s, c, v) {\n return (\n if_number(to_number(s, c, v), function(s1, n) {\n \n return (\n res_ter(s1,\n res_val(\n Coq_value_prim(Coq_prim_number(convert_number_to_integer(n))))));\n }));\n};\n\nvar to_int32 = function (s, c, v) {\n return (\n if_number(to_number(s, c, v), function(s_2, n) {\n \n return (res_spec(s_2, JsNumber.to_int32(n)));}));\n};\n\nvar to_uint32 = function (s, c, v) {\n return (\n if_number(to_number(s, c, v), function(s_2, n) {\n \n return (res_spec(s_2, JsNumber.to_uint32(n)));}));\n};\n\nvar to_string = function (s, c, _foo_) {\n switch (_foo_.tag) {\n case "Coq_value_prim":\n var w = _foo_.value;\n return (\n result_out(\n Coq_out_ter(s,\n res_val(\n Coq_value_prim(Coq_prim_string(convert_prim_to_string(w)))))));\n case "Coq_value_object":\n var l = _foo_.value;\n return (\n if_prim(\n to_primitive(s, c, Coq_value_object(l),\n Some(Coq_preftype_string())), function(s1, w) {\n \n return (\n res_ter(s1,\n res_val(\n Coq_value_prim(Coq_prim_string(convert_prim_to_string(w))))));\n }));\n }\n \n};\n\nvar object_can_put = function (s, c, l, x) {\n return (\n if_some(run_object_method(object_can_put_, s, l), function(b) {\n \n switch (b.tag) {\n case "Coq_builtin_can_put_default":\n return (\n if_run(run_object_get_own_prop(s, c, l, x), function(s1, d) {\n \n switch (d.tag) {\n case "Coq_full_descriptor_undef":\n return (\n if_some(run_object_method(object_proto_, s1, l),\n function(vproto) {\n \n switch (vproto.tag) {\n case "Coq_value_prim":\n var p = vproto.value;\n switch (p.tag) {\n case "Coq_prim_null":\n return (\n if_some(\n run_object_method(object_extensible_,\n s1, l), function(b0) {\n \n return (\n res_ter(s1,\n res_val(\n Coq_value_prim(\n Coq_prim_bool(b0)))));}));\n default:\n return (\n function (s, m) {\n Debug.impossible_with_heap_because(\n __LOC__, s, m);\n return (Coq_result_impossible());}(\n s1,\n "Non-null primitive get as a prototype value in [object_can_put]."));\n }\n \n case "Coq_value_object":\n var lproto = vproto.value;\n return (\n if_run(\n run_object_get_prop(s1, c, lproto, x),\n function(s2, d_2) {\n \n switch (d_2.tag) {\n case "Coq_full_descriptor_undef":\n return (\n if_some(\n run_object_method(\n object_extensible_, s2, l),\n function(b0) {\n \n return (\n res_ter(s2,\n res_val(\n Coq_value_prim(\n Coq_prim_bool(b0)))));\n }));\n case "Coq_full_descriptor_some":\n var a = d_2.value;\n switch (a.tag) {\n case "Coq_attributes_data_of":\n var ad = a.value;\n return (\n if_some(\n run_object_method(\n object_extensible_, s2,\n l), function(ext) {\n \n return (\n res_ter(s2,\n (function () {\n if (ext) {\n return (\n res_val(\n Coq_value_prim(\n Coq_prim_bool(\n ad.attributes_data_writable))));\n } else {\n return (\n res_val(\n Coq_value_prim(\n Coq_prim_bool(\n false))));\n }}())));}));\n case "Coq_attributes_accessor_of":\n var aa = a.value;\n return (\n res_ter(s2,\n res_val(\n Coq_value_prim(\n Coq_prim_bool(\n !(\n value_compare(\n aa.attributes_accessor_set,\n Coq_value_prim(\n Coq_prim_undef(\n )))))))));\n }\n \n }\n }));\n }\n }));\n case "Coq_full_descriptor_some":\n var a = d.value;\n switch (a.tag) {\n case "Coq_attributes_data_of":\n var ad = a.value;\n return (\n res_ter(s1,\n res_val(\n Coq_value_prim(\n Coq_prim_bool(ad.attributes_data_writable)))));\n case "Coq_attributes_accessor_of":\n var aa = a.value;\n return (\n res_ter(s1,\n res_val(\n Coq_value_prim(\n Coq_prim_bool(\n !(\n value_compare(\n aa.attributes_accessor_set,\n Coq_value_prim(Coq_prim_undef()))))))));\n }\n \n }\n }));\n }\n }));\n};\n\nvar run_object_define_own_prop_array_loop = function (s, c, l, newLen, oldLen, newLenDesc, newWritable, throwcont, def) {\n if ((newLen < oldLen)) {\n var oldLen_2 = (oldLen - 1.);\n return (\n if_string(to_string(s, c, Coq_value_prim(Coq_prim_number(oldLen_2))),\n function(s0, slen) {\n \n return (\n if_bool(object_delete(s0, c, l, slen, false), function(s1,\n deleteSucceeded) {\n \n if (!(deleteSucceeded)) {\n var newLenDesc0 = descriptor_with_value(newLenDesc,\n Some(\n Coq_value_prim(\n Coq_prim_number((oldLen_2 + 1.)))));\n if (!(newWritable)) {\n var newLenDesc1 = descriptor_with_writable(newLenDesc0,\n Some(false));\n } else {\n var newLenDesc1 = newLenDesc0;\n }\n return (\n if_bool(def(s1, "length", newLenDesc1, false),\n function(s2, x) {\n \n return (\n out_error_or_cst(s2, throwcont,\n Coq_native_error_type(),\n Coq_value_prim(Coq_prim_bool(false))));}));\n } else {\n return (\n run_object_define_own_prop_array_loop(s1, c, l, newLen,\n oldLen_2, newLenDesc, newWritable, throwcont, def));\n }}));}));\n } else {\n if (!(newWritable)) {\n return (\n def(s, "length", {\n descriptor_value: None(),\n descriptor_writable: Some(false),\n descriptor_get: None(),\n descriptor_set: None(),\n descriptor_enumerable: None(),\n descriptor_configurable: None()}, false));\n } else {\n return (res_ter(s, res_val(Coq_value_prim(Coq_prim_bool(true)))));\n }\n }\n};\n\nvar object_define_own_prop = function (s, c, l, x, desc, throwcont) {\n var reject = function (s0, throwcont0) {\n return (\n out_error_or_cst(s0, throwcont0, Coq_native_error_type(),\n Coq_value_prim(Coq_prim_bool(false))));\n };\n var def = function (s0, x0, desc0, throwcont0) {\n return (\n if_run(run_object_get_own_prop(s0, c, l, x0), function(s1, d) {\n \n return (\n if_some(run_object_method(object_extensible_, s1, l),\n function(ext) {\n \n switch (d.tag) {\n case "Coq_full_descriptor_undef":\n if (ext) {\n if ((descriptor_is_generic_dec(desc0)\n || descriptor_is_data_dec(desc0))) {\n var a = Coq_attributes_data_of(\n attributes_data_of_descriptor(desc0));\n } else {\n var a = Coq_attributes_accessor_of(\n attributes_accessor_of_descriptor(desc0));\n }\n return (\n if_some(\n object_heap_map_properties_pickable_option(s1, l,\n function (p) { return (HeapStr.write(p, x0, a));\n }), function(s2) {\n \n return (\n res_ter(s2,\n res_val(Coq_value_prim(Coq_prim_bool(true)))));\n }));\n } else {\n return (reject(s1, throwcont0));\n }\n case "Coq_full_descriptor_some":\n var a = d.value;\n var object_define_own_prop_write = function (s2, a0) {\n var a_2 = attributes_update(a0, desc0);\n return (\n if_some(\n object_heap_map_properties_pickable_option(s2, l,\n function (p) {\n return (HeapStr.write(p, x0, a_2));}),\n function(s3) {\n \n return (\n res_ter(s3,\n res_val(Coq_value_prim(Coq_prim_bool(true)))));\n }));\n };\n if (descriptor_contains_dec(descriptor_of_attributes(a),\n desc0)) {\n return (\n res_ter(s1,\n res_val(Coq_value_prim(Coq_prim_bool(true)))));\n } else {\n if (attributes_change_enumerable_on_non_configurable_dec(\n a, desc0)) {\n return (reject(s1, throwcont0));\n } else {\n if (descriptor_is_generic_dec(desc0)) {\n return (object_define_own_prop_write(s1, a));\n } else {\n if (!(\n bool_eq(attributes_is_data_dec(a),\n descriptor_is_data_dec(desc0)))) {\n if (attributes_configurable(a)) {\n switch (a.tag) {\n case "Coq_attributes_data_of":\n var ad = a.value;\n var a_2 = Coq_attributes_accessor_of(\n attributes_accessor_of_attributes_data(\n ad));\n break;\n case "Coq_attributes_accessor_of":\n var aa = a.value;\n var a_2 = Coq_attributes_data_of(\n attributes_data_of_attributes_accessor(\n aa));\n break;\n }\n \n return (\n if_some(\n object_heap_map_properties_pickable_option(\n s1, l, function (p) {\n return (HeapStr.write(p, x0, a_2));}),\n function(s2) {\n \n return (\n object_define_own_prop_write(s2, a_2));\n }));\n } else {\n return (reject(s1, throwcont0));\n }\n } else {\n if ((attributes_is_data_dec(a)\n && descriptor_is_data_dec(desc0))) {\n switch (a.tag) {\n case "Coq_attributes_data_of":\n var ad = a.value;\n if (attributes_change_data_on_non_configurable_dec(\n ad, desc0)) {\n return (reject(s1, throwcont0));\n } else {\n return (\n object_define_own_prop_write(s1, a));\n }\n case "Coq_attributes_accessor_of":\n var a0 = a.value;\n return (\n function (s, m) {\n Debug.impossible_with_heap_because(\n __LOC__, s, m);\n return (Coq_result_impossible());}(\n s0,\n "data is not accessor in [defineOwnProperty]"));\n }\n \n } else {\n if ((!(attributes_is_data_dec(a))\n && descriptor_is_accessor_dec(desc0))) {\n switch (a.tag) {\n case "Coq_attributes_data_of":\n var a0 = a.value;\n return (\n function (s, m) {\n Debug.impossible_with_heap_because(\n __LOC__, s, m);\n return (Coq_result_impossible());}(\n s0,\n "accessor is not data in [defineOwnProperty]"));\n case "Coq_attributes_accessor_of":\n var aa = a.value;\n if (attributes_change_accessor_on_non_configurable_dec(\n aa, desc0)) {\n return (reject(s1, throwcont0));\n } else {\n return (\n object_define_own_prop_write(s1, a));\n }\n }\n \n } else {\n return (\n function (s, m) {\n Debug.impossible_with_heap_because(\n __LOC__, s, m);\n return (Coq_result_impossible());}(s0,\n "cases are mutually exclusives in [defineOwnProperty]"));\n }\n }\n }\n }\n }\n }\n }\n }));}));\n };\n return (\n if_some(run_object_method(object_define_own_prop_, s, l), function(b) {\n \n switch (b.tag) {\n case "Coq_builtin_define_own_prop_default":\n return (def(s, x, desc, throwcont));\n case "Coq_builtin_define_own_prop_array":\n return (\n if_run(run_object_get_own_prop(s, c, l, "length"), function(s0,\n d) {\n \n switch (d.tag) {\n case "Coq_full_descriptor_undef":\n return (\n function (s, m) {\n Debug.impossible_with_heap_because(__LOC__, s, m);\n return (Coq_result_impossible());}(s0,\n "Array length property descriptor cannot be undefined."));\n case "Coq_full_descriptor_some":\n var attr = d.value;\n switch (attr.tag) {\n case "Coq_attributes_data_of":\n var a = attr.value;\n var oldLen = a.attributes_data_value;\n switch (oldLen.tag) {\n case "Coq_value_prim":\n var w = oldLen.value;\n var oldLen0 = JsNumber.to_uint32(\n convert_prim_to_number(w));\n var descValueOpt = desc.descriptor_value;\n if (string_eq(x, "length")) {\n switch (descValueOpt.tag) {\n case "Some":\n var descValue = descValueOpt.value;\n return (\n if_run(to_uint32(s0, c, descValue),\n function(s1, newLen) {\n \n return (\n if_number(\n to_number(s1, c, descValue),\n function(s2, newLenN) {\n \n if (!((newLen === newLenN))) {\n return (\n run_error(s2,\n Coq_native_error_range(\n )));\n } else {\n var newLenDesc = descriptor_with_value(\n desc,\n Some(\n Coq_value_prim(\n Coq_prim_number(\n newLen))));\n if (le_int_decidable(\n oldLen0, newLen)) {\n return (\n def(s2, "length",\n newLenDesc,\n throwcont));\n } else {\n if (!(\n a.attributes_data_writable)) {\n return (\n reject(s2, throwcont));\n } else {\n var _switch_arg_3 = newLenDesc.descriptor_writable;\n switch (_switch_arg_3.tag) {\n case "Some":\n var b0 = _switch_arg_3.value;\n if (b0) {\n var newWritable = true;\n } else {\n var newWritable = false;\n }\n break;\n case "None":\n var newWritable = true;\n break;\n }\n \n if (!(newWritable)) {\n var newLenDesc0 = \n descriptor_with_writable(\n newLenDesc,\n Some(true));\n } else {\n var newLenDesc0 = newLenDesc;\n }\n return (\n if_bool(\n def(s2, "length",\n newLenDesc0,\n throwcont),\n function(s3,\n succ) {\n \n if (!(succ)) {\n return (\n res_ter(s3,\n res_val(\n Coq_value_prim(\n Coq_prim_bool(\n false)))));\n } else {\n return (\n run_object_define_own_prop_array_loop(\n s3, c, l,\n newLen,\n oldLen0,\n newLenDesc0,\n newWritable,\n throwcont,\n def));\n }}));\n }\n }\n }}));}));\n case "None":\n return (\n def(s0, "length", desc, throwcont));\n }\n \n } else {\n return (\n if_run(\n to_uint32(s0, c,\n Coq_value_prim(Coq_prim_string(x))),\n function(s1, ilen) {\n \n return (\n if_string(\n to_string(s1, c,\n Coq_value_prim(\n Coq_prim_number(ilen))),\n function(s2, slen) {\n \n if ((string_eq(x, slen)\n && !((ilen == 4294967295.)))) {\n return (\n if_run(\n to_uint32(s2, c,\n Coq_value_prim(\n Coq_prim_string(x))),\n function(s3, index) {\n \n if ((le_int_decidable(\n oldLen0, index)\n && !(\n a.attributes_data_writable))) {\n return (\n reject(s3, throwcont));\n } else {\n return (\n if_bool(\n def(s3, x, desc,\n false),\n function(s4, b0) {\n \n if (!(b0)) {\n return (\n reject(s4,\n throwcont));\n } else {\n if (le_int_decidable(\n oldLen0,\n index)) {\n var a0 = \n descriptor_with_value(\n descriptor_of_attributes(\n Coq_attributes_data_of(\n a)),\n Some(\n Coq_value_prim(\n Coq_prim_number(\n (index\n + 1.)))));\n return (\n def(s4,\n "length",\n a0,\n false));\n } else {\n return (\n res_ter(s4,\n res_val(\n Coq_value_prim(\n Coq_prim_bool(\n true)))));\n }\n }}));\n }}));\n } else {\n return (\n def(s2, x, desc, throwcont));\n }}));}));\n }\n case "Coq_value_object":\n var l0 = oldLen.value;\n return (\n function (s, m) {\n Debug.impossible_with_heap_because(\n __LOC__, s, m);\n return (Coq_result_impossible());}(s0,\n "Spec asserts length of array is number."));\n }\n \n case "Coq_attributes_accessor_of":\n var a = attr.value;\n return (\n function (s, m) {\n Debug.impossible_with_heap_because(__LOC__,\n s, m);\n return (Coq_result_impossible());}(s0,\n "Array length property descriptor cannot be accessor."));\n }\n \n }\n }));\n case "Coq_builtin_define_own_prop_args_obj":\n return (\n if_some(run_object_method(object_parameter_map_, s, l),\n function(lmapo) {\n \n return (\n if_some(lmapo, function(lmap) {\n \n return (\n if_run(run_object_get_own_prop(s, c, lmap, x),\n function(s0, d) {\n \n return (\n if_bool(def(s0, x, desc, false), function(s1,\n b0) {\n \n if (b0) {\n var follow = function (s2) {\n return (\n res_ter(s2,\n res_val(\n Coq_value_prim(\n Coq_prim_bool(true)))));\n };\n switch (d.tag) {\n case "Coq_full_descriptor_undef":\n return (follow(s1));\n case "Coq_full_descriptor_some":\n var a = d.value;\n if (descriptor_is_accessor_dec(\n desc)) {\n return (\n if_bool(\n object_delete(s1, c, lmap, x,\n false), function(s2, x0) {\n \n return (follow(s2));}));\n } else {\n var follow0 = function (s2) {\n if (option_compare(bool_eq,\n desc.descriptor_writable,\n Some(false))) {\n return (\n if_bool(\n object_delete(s2, c,\n lmap, x, false),\n function(s3, x0) {\n \n return (follow(s3));}));\n } else {\n return (follow(s2));\n }\n };\n var _switch_arg_4 = desc.descriptor_value;\n switch (_switch_arg_4.tag) {\n case "Some":\n var v = _switch_arg_4.value;\n return (\n if_void(\n object_put(s1, c, lmap,\n x, v, throwcont),\n function(s2) {\n \n return (follow0(s2));}));\n case "None":\n return (follow0(s1));\n }\n \n }\n }\n \n } else {\n return (reject(s1, throwcont));\n }}));}));}));}));\n }\n }));\n};\n\nvar run_to_descriptor = function (s, c, _foo_) {\n switch (_foo_.tag) {\n case "Coq_value_prim":\n var p = _foo_.value;\n return (throw_result(run_error(s, Coq_native_error_type())));\n case "Coq_value_object":\n var l = _foo_.value;\n var sub0 = function (s0, desc, name, conv, k) {\n return (\n if_bool(object_has_prop(s0, c, l, name), function(s1, has) {\n \n if (!(has)) {\n return (k(s1, desc));\n } else {\n return (\n if_value(run_object_get(s1, c, l, name), function(s2, v0) {\n \n return (\n if_run(conv(s2, v0, desc), function(s3, r) {\n \n return (k(s3, r));}));}));\n }}));\n };\n return (\n sub0(s, descriptor_intro_empty, "enumerable",\n function (s1, v1, desc) {\n var b = convert_value_to_boolean(v1);\n return (res_spec(s1, descriptor_with_enumerable(desc, Some(b))));\n }, function (s1_2, desc) {\n return (\n sub0(s1_2, desc, "configurable", function (s2, v2, desc0) {\n var b = convert_value_to_boolean(v2);\n return (\n res_spec(s2,\n descriptor_with_configurable(desc0, Some(b))));},\n function (s2_2, desc0) {\n return (\n sub0(s2_2, desc0, "value", function (s3, v3, desc1) {\n return (\n res_spec(s3,\n descriptor_with_value(desc1, Some(v3))));},\n function (s3_2, desc1) {\n return (\n sub0(s3_2, desc1, "writable",\n function (s4, v4, desc2) {\n var b = convert_value_to_boolean(v4);\n return (\n res_spec(s4,\n descriptor_with_writable(desc2, Some(b))));\n }, function (s4_2, desc2) {\n return (\n sub0(s4_2, desc2, "get",\n function (s5, v5, desc3) {\n if ((!(is_callable_dec(s5, v5))\n && !(\n value_compare(v5,\n Coq_value_prim(\n Coq_prim_undef()))))) {\n return (\n throw_result(\n run_error(s5,\n Coq_native_error_type())));\n } else {\n return (\n res_spec(s5,\n descriptor_with_get(desc3,\n Some(v5))));\n }}, function (s5_2, desc3) {\n return (\n sub0(s5_2, desc3, "set",\n function (s6, v6, desc4) {\n if ((!(is_callable_dec(s6, v6))\n && !(\n value_compare(v6,\n Coq_value_prim(\n Coq_prim_undef()))))) {\n return (\n throw_result(\n run_error(s6,\n Coq_native_error_type())));\n } else {\n return (\n res_spec(s6,\n descriptor_with_set(desc4,\n Some(v6))));\n }}, function (s7, desc4) {\n if (((!(\n option_compare(\n value_compare,\n desc4.descriptor_get,\n None()))\n || !(\n option_compare(\n value_compare,\n desc4.descriptor_set,\n None())))\n && (!(\n option_compare(\n value_compare,\n desc4.descriptor_value,\n None()))\n || !(\n option_compare(bool_eq,\n desc4.descriptor_writable,\n None()))))) {\n return (\n throw_result(\n run_error(s7,\n Coq_native_error_type())));\n } else {\n return (res_spec(s7, desc4));\n }}));}));}));}));}));}));\n }\n \n};\n\nvar prim_new_object = function (s, _foo_) {\n switch (_foo_.tag) {\n case "Coq_prim_bool":\n var b = _foo_.value;\n return (\n result_out((function () {\n var o1 = object_new(\n Coq_value_object(\n Coq_object_loc_prealloc(Coq_prealloc_bool_proto())),\n "Boolean");\n var o = object_with_primitive_value(o1,\n Coq_value_prim(Coq_prim_bool(b)));\n var _tuple_arg_5 = object_alloc(s, o);\n var l = _tuple_arg_5[0], s1 = _tuple_arg_5[1];\n return (Coq_out_ter(s1, res_val(Coq_value_object(l))));}())));\n case "Coq_prim_number":\n var n = _foo_.value;\n return (\n result_out((function () {\n var o1 = object_new(\n Coq_value_object(\n Coq_object_loc_prealloc(Coq_prealloc_number_proto())),\n "Number");\n var o = object_with_primitive_value(o1,\n Coq_value_prim(Coq_prim_number(n)));\n var _tuple_arg_6 = object_alloc(s, o);\n var l = _tuple_arg_6[0], s1 = _tuple_arg_6[1];\n return (Coq_out_ter(s1, res_val(Coq_value_object(l))));}())));\n case "Coq_prim_string":\n var s0 = _foo_.value;\n var o2 = object_new(\n Coq_value_object(\n Coq_object_loc_prealloc(Coq_prealloc_string_proto())),\n "String");\n var o1 = object_with_get_own_property(o2,\n Coq_builtin_get_own_prop_string());\n var o = object_with_primitive_value(o1,\n Coq_value_prim(Coq_prim_string(s0)));\n var _tuple_arg_7 = object_alloc(s, o);\n var l = _tuple_arg_7[0], s1 = _tuple_arg_7[1];\n return (\n if_some(\n object_heap_map_properties_pickable_option(s1, l, function (p) {\n return (\n HeapStr.write(p, "length",\n Coq_attributes_data_of(\n attributes_data_intro_constant(\n Coq_value_prim(\n Coq_prim_number(number_of_int(strlength(s0))))))));}),\n function(s_2) {\n \n return (res_ter(s_2, res_val(Coq_value_object(l))));}));\n default:\n return (\n function (s, m) {\n Debug.impossible_with_heap_because(__LOC__, s, m);\n return (Coq_result_impossible());}(s,\n "[prim_new_object] received an null or undef."));\n }\n \n};\n\nvar to_object = function (s, _foo_) {\n switch (_foo_.tag) {\n case "Coq_value_prim":\n var w = _foo_.value;\n switch (w.tag) {\n case "Coq_prim_undef":\n return (run_error(s, Coq_native_error_type()));\n case "Coq_prim_null":\n return (run_error(s, Coq_native_error_type()));\n case "Coq_prim_bool":\n var b = w.value;\n return (prim_new_object(s, w));\n case "Coq_prim_number":\n var n = w.value;\n return (prim_new_object(s, w));\n case "Coq_prim_string":\n var s0 = w.value;\n return (prim_new_object(s, w));\n }\n \n case "Coq_value_object":\n var l = _foo_.value;\n return (result_out(Coq_out_ter(s, res_val(Coq_value_object(l)))));\n }\n \n};\n\nvar run_object_prim_value = function (s, l) {\n return (\n if_some(run_object_method(object_prim_value_, s, l), function(ov) {\n \n return (\n if_some(ov, function(v) { \n return (res_ter(s, res_val(v)));}));}));\n};\n\nvar prim_value_get = function (s, c, v, x) {\n return (\n if_object(to_object(s, v), function(s_2, l) {\n \n return (\n object_get_builtin(s_2, c, Coq_builtin_get_default(), v, l, x));}));\n};\n\nvar env_record_has_binding = function (s, c, l, x) {\n return (\n if_some(env_record_binds_pickable_option(s, l), function(e) {\n \n switch (e.tag) {\n case "Coq_env_record_decl":\n var ed = e.value;\n return (\n result_out(\n Coq_out_ter(s,\n res_val(\n Coq_value_prim(Coq_prim_bool(HeapStr.indom_dec(ed, x)))))));\n case "Coq_env_record_object":\n var l0 = e.value, pt = e.provide_this;\n return (object_has_prop(s, c, l0, x));\n }\n }));\n};\n\nvar lexical_env_get_identifier_ref = function (s, c, x, x0, str) {\n switch (x.tag) {\n case "[]":\n return (\n res_spec(s,\n ref_create_value(Coq_value_prim(Coq_prim_undef()), x0, str)));\n case "::":\n var l = x.head, x_2 = x.tail;\n return (\n if_bool(env_record_has_binding(s, c, l, x0), function(s1, has) {\n \n if (has) {\n return (res_spec(s1, ref_create_env_loc(l, x0, str)));\n } else {\n return (lexical_env_get_identifier_ref(s1, c, x_2, x0, str));\n }}));\n }\n \n};\n\nvar object_delete_default = function (s, c, l, x, str) {\n return (\n if_run(run_object_get_own_prop(s, c, l, x), function(s1, d) {\n \n switch (d.tag) {\n case "Coq_full_descriptor_undef":\n return (\n res_ter(s1, res_val(Coq_value_prim(Coq_prim_bool(true)))));\n case "Coq_full_descriptor_some":\n var a = d.value;\n if (attributes_configurable(a)) {\n return (\n if_some(\n object_heap_map_properties_pickable_option(s1, l,\n function (p) { return (HeapStr.rem(p, x));}),\n function(s_2) {\n \n return (\n res_ter(s_2,\n res_val(Coq_value_prim(Coq_prim_bool(true)))));}));\n } else {\n return (\n out_error_or_cst(s1, str, Coq_native_error_type(),\n Coq_value_prim(Coq_prim_bool(false))));\n }\n }\n }));\n};\n\nvar object_delete = function (s, c, l, x, str) {\n return (\n if_some(run_object_method(object_delete_, s, l), function(b) {\n \n switch (b.tag) {\n case "Coq_builtin_delete_default":\n return (object_delete_default(s, c, l, x, str));\n case "Coq_builtin_delete_args_obj":\n return (\n if_some(run_object_method(object_parameter_map_, s, l),\n function(mo) {\n \n return (\n if_some(mo, function(m) {\n \n return (\n if_run(run_object_get_own_prop(s, c, m, x),\n function(s1, d) {\n \n return (\n if_bool(\n object_delete_default(s1, c, l, x, str),\n function(s2, b0) {\n \n if (b0) {\n switch (d.tag) {\n case "Coq_full_descriptor_undef":\n return (\n res_ter(s2,\n res_val(\n Coq_value_prim(\n Coq_prim_bool(b0)))));\n case "Coq_full_descriptor_some":\n var a = d.value;\n return (\n if_bool(\n object_delete(s2, c, m, x,\n false), function(s3, b_2) {\n \n return (\n res_ter(s3,\n res_val(\n Coq_value_prim(\n Coq_prim_bool(b0)))));\n }));\n }\n \n } else {\n return (\n res_ter(s2,\n res_val(\n Coq_value_prim(Coq_prim_bool(b0)))));\n }}));}));}));}));\n }\n }));\n};\n\nvar env_record_delete_binding = function (s, c, l, x) {\n return (\n if_some(env_record_binds_pickable_option(s, l), function(e) {\n \n switch (e.tag) {\n case "Coq_env_record_decl":\n var ed = e.value;\n var _switch_arg_8 = HeapStr.read_option(ed, x);\n switch (_switch_arg_8.tag) {\n case "Some":\n var p = _switch_arg_8.value;\n var mu = p[0], v = p[1];\n switch (mu.tag) {\n case "Coq_mutability_uninitialized_immutable":\n return (\n result_out(\n Coq_out_ter(s,\n res_val(Coq_value_prim(Coq_prim_bool(false))))));\n case "Coq_mutability_immutable":\n return (\n result_out(\n Coq_out_ter(s,\n res_val(Coq_value_prim(Coq_prim_bool(false))))));\n case "Coq_mutability_nondeletable":\n return (\n result_out(\n Coq_out_ter(s,\n res_val(Coq_value_prim(Coq_prim_bool(false))))));\n case "Coq_mutability_deletable":\n var s_2 = env_record_write(s, l,\n Coq_env_record_decl(\n decl_env_record_rem(ed, x)));\n return (\n result_out(\n Coq_out_ter(s_2,\n res_val(Coq_value_prim(Coq_prim_bool(true))))));\n }\n \n case "None":\n return (\n result_out(\n Coq_out_ter(s,\n res_val(Coq_value_prim(Coq_prim_bool(true))))));\n }\n \n case "Coq_env_record_object":\n var l0 = e.value, pt = e.provide_this;\n return (object_delete(s, c, l0, x, throw_false));\n }\n }));\n};\n\nvar env_record_implicit_this_value = function (s, l) {\n return (\n ifx_some_or_default(env_record_binds_pickable_option(s, l), None(),\n function (e) {\n return (\n Some((function () {\n switch (e.tag) {\n case "Coq_env_record_decl":\n var ed = e.value;\n return (Coq_value_prim(Coq_prim_undef()));\n case "Coq_env_record_object":\n var l0 = e.value, provide_this = e.provide_this;\n if (provide_this) {\n return (Coq_value_object(l0));\n } else {\n return (Coq_value_prim(Coq_prim_undef()));\n }\n }\n }())));}));\n};\n\nvar identifier_resolution = function (s, c, x) {\n var x0 = c.execution_ctx_lexical_env;\n var str = c.execution_ctx_strict;\n return (lexical_env_get_identifier_ref(s, c, x0, x, str));\n};\n\nvar env_record_get_binding_value = function (s, c, l, x, str) {\n return (\n if_some(env_record_binds_pickable_option(s, l), function(e) {\n \n switch (e.tag) {\n case "Coq_env_record_decl":\n var ed = e.value;\n return (\n if_some(HeapStr.read_option(ed, x), function(rm) {\n \n var mu = rm[0], v = rm[1];\n if (mutability_compare(mu,\n Coq_mutability_uninitialized_immutable())) {\n return (\n out_error_or_cst(s, str, Coq_native_error_ref(),\n Coq_value_prim(Coq_prim_undef())));\n } else {\n return (res_ter(s, res_val(v)));\n }}));\n case "Coq_env_record_object":\n var l0 = e.value, pt = e.provide_this;\n return (\n if_bool(object_has_prop(s, c, l0, x), function(s1, has) {\n \n if (has) {\n return (run_object_get(s1, c, l0, x));\n } else {\n return (\n out_error_or_cst(s1, str, Coq_native_error_ref(),\n Coq_value_prim(Coq_prim_undef())));\n }}));\n }\n }));\n};\n\nvar ref_get_value = function (s, c, _foo_) {\n switch (_foo_.tag) {\n case "Coq_resvalue_empty":\n return (\n function (s, m) {\n Debug.impossible_with_heap_because(__LOC__, s, m);\n return (Coq_result_impossible());}(s,\n "[ref_get_value] received an empty result."));\n case "Coq_resvalue_value":\n var v = _foo_.value;\n return (res_spec(s, v));\n case "Coq_resvalue_ref":\n var r = _foo_.ref;\n var for_base_or_object = function (tt) {\n var _switch_arg_9 = r.ref_base;\n switch (_switch_arg_9.tag) {\n case "Coq_ref_base_type_value":\n var v = _switch_arg_9.value;\n if (ref_kind_comparable(ref_kind_of(r),\n Coq_ref_kind_primitive_base())) {\n return (\n if_value(prim_value_get(s, c, v, r.ref_name), function(s2,\n v) { \n return (res_spec(s2, v));}));\n } else {\n switch (v.tag) {\n case "Coq_value_prim":\n var p = v.value;\n return (\n function (s, m) {\n Debug.impossible_with_heap_because(__LOC__, s, m);\n return (Coq_result_impossible());}(s,\n "[ref_get_value] received a primitive value whose kind is not primitive."));\n case "Coq_value_object":\n var l = v.value;\n return (\n if_value(run_object_get(s, c, l, r.ref_name),\n function(s2, v) { \n return (res_spec(s2, v));}));\n }\n \n }\n case "Coq_ref_base_type_env_loc":\n var l = _switch_arg_9.value;\n return (\n function (s, m) {\n Debug.impossible_with_heap_because(__LOC__, s, m);\n return (Coq_result_impossible());}(s,\n "[ref_get_value] received a reference to a value whose base type is an environnment record."));\n }\n \n };\n var _switch_arg_10 = ref_kind_of(r);\n switch (_switch_arg_10.tag) {\n case "Coq_ref_kind_null":\n return (\n function (s, m) {\n Debug.impossible_with_heap_because(__LOC__, s, m);\n return (Coq_result_impossible());}(s,\n "[ref_get_value] received a reference whose base is [null]."));\n case "Coq_ref_kind_undef":\n return (throw_result(run_error(s, Coq_native_error_ref())));\n case "Coq_ref_kind_primitive_base":\n return (for_base_or_object({}));\n case "Coq_ref_kind_object":\n return (for_base_or_object({}));\n case "Coq_ref_kind_env_record":\n var _switch_arg_11 = r.ref_base;\n switch (_switch_arg_11.tag) {\n case "Coq_ref_base_type_value":\n var v = _switch_arg_11.value;\n return (\n function (s, m) {\n Debug.impossible_with_heap_because(__LOC__, s, m);\n return (Coq_result_impossible());}(s,\n "[ref_get_value] received a reference to an environnment record whose base type is a value."));\n case "Coq_ref_base_type_env_loc":\n var l = _switch_arg_11.value;\n return (\n if_value(\n env_record_get_binding_value(s, c, l, r.ref_name,\n r.ref_strict), function(s2, v) {\n \n return (res_spec(s2, v));}));\n }\n \n }\n \n }\n \n};\n\nvar run_expr_get_value = function (s, c, e) {\n return (\n if_success(run_expr(s, c, e), function(s0, rv) {\n \n return (ref_get_value(s0, c, rv));}));\n};\n\nvar object_put_complete = function (b, s, c, vthis, l, x, v, str) {\n switch (b.tag) {\n case "Coq_builtin_put_default":\n return (\n if_bool(object_can_put(s, c, l, x), function(s1, b0) {\n \n if (b0) {\n return (\n if_run(run_object_get_own_prop(s1, c, l, x), function(s2,\n d) {\n \n var follow = function (x0) {\n return (\n if_run(run_object_get_prop(s2, c, l, x), function(s3,\n d_2) {\n \n var follow_2 = function (x1) {\n switch (vthis.tag) {\n case "Coq_value_prim":\n var wthis = vthis.value;\n return (\n out_error_or_void(s3, str,\n Coq_native_error_type()));\n case "Coq_value_object":\n var lthis = vthis.value;\n var desc = descriptor_intro_data(v, true,\n true, true);\n return (\n if_success(\n object_define_own_prop(s3, c, l, x,\n desc, str), function(s4, rv) {\n \n return (res_void(s4));}));\n }\n \n };\n switch (d_2.tag) {\n case "Coq_full_descriptor_undef":\n return (follow_2({}));\n case "Coq_full_descriptor_some":\n var a = d_2.value;\n switch (a.tag) {\n case "Coq_attributes_data_of":\n var a0 = a.value;\n return (follow_2({}));\n case "Coq_attributes_accessor_of":\n var aa_2 = a.value;\n var _switch_arg_12 = aa_2.attributes_accessor_set;\n switch (_switch_arg_12.tag) {\n case "Coq_value_prim":\n var p = _switch_arg_12.value;\n return (\n function (s, m) {\n Debug.impossible_with_heap_because(\n __LOC__, s, m);\n return (\n Coq_result_impossible());}(\n s3,\n "[object_put_complete] found a primitive in an `set\' accessor."));\n case "Coq_value_object":\n var lfsetter = _switch_arg_12.value;\n return (\n if_success(\n run_call(s3, c, lfsetter, vthis,\n mk_cons(v, mk_nil())),\n function(s4, rv) {\n \n return (res_void(s4));}));\n }\n \n }\n \n }\n }));\n };\n switch (d.tag) {\n case "Coq_full_descriptor_undef":\n return (follow({}));\n case "Coq_full_descriptor_some":\n var a = d.value;\n switch (a.tag) {\n case "Coq_attributes_data_of":\n var ad = a.value;\n switch (vthis.tag) {\n case "Coq_value_prim":\n var wthis = vthis.value;\n return (\n out_error_or_void(s2, str,\n Coq_native_error_type()));\n case "Coq_value_object":\n var lthis = vthis.value;\n var desc = {\n descriptor_value: Some(v),\n descriptor_writable: None(),\n descriptor_get: None(),\n descriptor_set: None(),\n descriptor_enumerable: None(),\n descriptor_configurable: None()\n };\n return (\n if_success(\n object_define_own_prop(s2, c, l, x, desc,\n str), function(s3, rv) {\n \n return (res_void(s3));}));\n }\n \n case "Coq_attributes_accessor_of":\n var a0 = a.value;\n return (follow({}));\n }\n \n }\n }));\n } else {\n return (out_error_or_void(s1, str, Coq_native_error_type()));\n }}));\n }\n \n};\n\nvar object_put = function (s, c, l, x, v, str) {\n return (\n if_some(run_object_method(object_put_, s, l), function(b) {\n \n return (\n object_put_complete(b, s, c, Coq_value_object(l), l, x, v, str));}));\n};\n\nvar env_record_set_mutable_binding = function (s, c, l, x, v, str) {\n return (\n if_some(env_record_binds_pickable_option(s, l), function(e) {\n \n switch (e.tag) {\n case "Coq_env_record_decl":\n var ed = e.value;\n return (\n if_some(HeapStr.read_option(ed, x), function(rm) {\n \n var mu = rm[0], v_old = rm[1];\n if (!(mutability_compare(mu, Coq_mutability_immutable()))) {\n return (\n res_void(env_record_write_decl_env(s, l, x, mu, v)));\n } else {\n return (\n out_error_or_void(s, str, Coq_native_error_type()));\n }}));\n case "Coq_env_record_object":\n var l0 = e.value, pt = e.provide_this;\n return (object_put(s, c, l0, x, v, str));\n }\n }));\n};\n\nvar prim_value_put = function (s, c, w, x, v, str) {\n return (\n if_object(to_object(s, Coq_value_prim(w)), function(s1, l) {\n \n return (\n object_put_complete(Coq_builtin_put_default(), s1, c,\n Coq_value_prim(w), l, x, v, str));}));\n};\n\nvar ref_put_value = function (s, c, rv, v) {\n switch (rv.tag) {\n case "Coq_resvalue_empty":\n return (\n function (s, m) {\n Debug.impossible_with_heap_because(__LOC__, s, m);\n return (Coq_result_impossible());}(s,\n "[ref_put_value] received an empty result."));\n case "Coq_resvalue_value":\n var v0 = rv.value;\n return (run_error(s, Coq_native_error_ref()));\n case "Coq_resvalue_ref":\n var r = rv.ref;\n if (ref_kind_comparable(ref_kind_of(r), Coq_ref_kind_undef())) {\n if (r.ref_strict) {\n return (run_error(s, Coq_native_error_ref()));\n } else {\n return (\n object_put(s, c, Coq_object_loc_prealloc(Coq_prealloc_global()),\n r.ref_name, v, throw_false));\n }\n } else {\n if ((ref_kind_comparable(ref_kind_of(r),\n Coq_ref_kind_primitive_base())\n || (ref_kind_comparable(ref_kind_of(r), Coq_ref_kind_null())\n || ref_kind_comparable(ref_kind_of(r), Coq_ref_kind_object())))) {\n var _switch_arg_14 = r.ref_base;\n switch (_switch_arg_14.tag) {\n case "Coq_ref_base_type_value":\n var v_2 = _switch_arg_14.value;\n if (ref_kind_comparable(ref_kind_of(r),\n Coq_ref_kind_primitive_base())) {\n switch (v_2.tag) {\n case "Coq_value_prim":\n var w = v_2.value;\n return (\n prim_value_put(s, c, w, r.ref_name, v, r.ref_strict));\n case "Coq_value_object":\n var o = v_2.value;\n return (\n function (s, m) {\n Debug.impossible_with_heap_because(__LOC__, s, m);\n return (Coq_result_impossible());}(s,\n "[ref_put_value] impossible case"));\n }\n \n } else {\n switch (v_2.tag) {\n case "Coq_value_prim":\n var p = v_2.value;\n return (\n function (s, m) {\n Debug.impossible_with_heap_because(__LOC__, s, m);\n return (Coq_result_impossible());}(s,\n "[ref_put_value] impossible case"));\n case "Coq_value_object":\n var l = v_2.value;\n return (\n object_put(s, c, l, r.ref_name, v, r.ref_strict));\n }\n \n }\n case "Coq_ref_base_type_env_loc":\n var l = _switch_arg_14.value;\n return (\n function (s, m) {\n Debug.impossible_with_heap_because(__LOC__, s, m);\n return (Coq_result_impossible());}(s,\n "[ref_put_value] contradicts ref_is_property"));\n }\n \n } else {\n var _switch_arg_13 = r.ref_base;\n switch (_switch_arg_13.tag) {\n case "Coq_ref_base_type_value":\n var v0 = _switch_arg_13.value;\n return (\n function (s, m) {\n Debug.impossible_with_heap_because(__LOC__, s, m);\n return (Coq_result_impossible());}(s,\n "[ref_put_value] impossible spec"));\n case "Coq_ref_base_type_env_loc":\n var l = _switch_arg_13.value;\n return (\n env_record_set_mutable_binding(s, c, l, r.ref_name, v,\n r.ref_strict));\n }\n \n }\n }\n }\n \n};\n\nvar env_record_create_mutable_binding = function (s, c, l, x, deletable_opt) {\n var deletable = unsome_default(false, deletable_opt);\n return (\n if_some(env_record_binds_pickable_option(s, l), function(e) {\n \n switch (e.tag) {\n case "Coq_env_record_decl":\n var ed = e.value;\n if (HeapStr.indom_dec(ed, x)) {\n return (\n function (s, m) {\n Debug.impossible_with_heap_because(__LOC__, s, m);\n return (Coq_result_impossible());}(s,\n "Already declared environnment record in [env_record_create_mutable_binding]."));\n } else {\n var s_2 = env_record_write_decl_env(s, l, x,\n mutability_of_bool(deletable),\n Coq_value_prim(Coq_prim_undef()));\n return (res_void(s_2));\n }\n case "Coq_env_record_object":\n var l0 = e.value, pt = e.provide_this;\n return (\n if_bool(object_has_prop(s, c, l0, x), function(s1, has) {\n \n if (has) {\n return (\n function (s, m) {\n Debug.impossible_with_heap_because(__LOC__, s, m);\n return (Coq_result_impossible());}(s1,\n "Already declared binding in [env_record_create_mutable_binding]."));\n } else {\n var a = {\n attributes_data_value: Coq_value_prim(Coq_prim_undef()),\n attributes_data_writable: true,\n attributes_data_enumerable: true,\n attributes_data_configurable: deletable\n };\n return (\n if_success(\n object_define_own_prop(s1, c, l0, x,\n descriptor_of_attributes(Coq_attributes_data_of(a)),\n throw_true), function(s2, rv) {\n \n return (res_void(s2));}));\n }}));\n }\n }));\n};\n\nvar env_record_create_set_mutable_binding = function (s, c, l, x, deletable_opt, v, str) {\n return (\n if_void(env_record_create_mutable_binding(s, c, l, x, deletable_opt),\n function(s0) {\n \n return (env_record_set_mutable_binding(s0, c, l, x, v, str));}));\n};\n\nvar env_record_create_immutable_binding = function (s, l, x) {\n return (\n if_some(env_record_binds_pickable_option(s, l), function(e) {\n \n switch (e.tag) {\n case "Coq_env_record_decl":\n var ed = e.value;\n if (HeapStr.indom_dec(ed, x)) {\n return (\n function (s, m) {\n Debug.impossible_with_heap_because(__LOC__, s, m);\n return (Coq_result_impossible());}(s,\n "Already declared environnment record in [env_record_create_immutable_binding]."));\n } else {\n return (\n res_void(\n env_record_write_decl_env(s, l, x,\n Coq_mutability_uninitialized_immutable(),\n Coq_value_prim(Coq_prim_undef()))));\n }\n case "Coq_env_record_object":\n var o = e.value, p = e.provide_this;\n return (\n function (s, m) {\n Debug.impossible_with_heap_because(__LOC__, s, m);\n return (Coq_result_impossible());}(s,\n "[env_record_create_immutable_binding] received an environnment record object."));\n }\n }));\n};\n\nvar env_record_initialize_immutable_binding = function (s, l, x, v) {\n return (\n if_some(env_record_binds_pickable_option(s, l), function(e) {\n \n switch (e.tag) {\n case "Coq_env_record_decl":\n var ed = e.value;\n return (\n if_some(decl_env_record_pickable_option(ed, x), function(evs) {\n \n if (prod_compare(mutability_compare, value_compare, evs,\n [Coq_mutability_uninitialized_immutable(), Coq_value_prim(\n Coq_prim_undef(\n ))])) {\n var s_2 = env_record_write_decl_env(s, l, x,\n Coq_mutability_immutable(), v);\n return (res_void(s_2));\n } else {\n return (\n function (s, m) {\n Debug.impossible_with_heap_because(__LOC__, s, m);\n return (Coq_result_impossible());}(s,\n "Non suitable binding in [env_record_initialize_immutable_binding]."));\n }}));\n case "Coq_env_record_object":\n var o = e.value, p = e.provide_this;\n return (\n function (s, m) {\n Debug.impossible_with_heap_because(__LOC__, s, m);\n return (Coq_result_impossible());}(s,\n "[env_record_initialize_immutable_binding] received an environnment record object."));\n }\n }));\n};\n\nvar call_object_new = function (s, v) {\n var _switch_arg_15 = type_of(v);\n switch (_switch_arg_15.tag) {\n case "Coq_type_undef":\n return (\n result_out((function () {\n var o = object_new(\n Coq_value_object(\n Coq_object_loc_prealloc(Coq_prealloc_object_proto())),\n "Object");\n var p = object_alloc(s, o);\n var l = p[0], s_2 = p[1];\n return (Coq_out_ter(s_2, res_val(Coq_value_object(l))));}())));\n case "Coq_type_null":\n return (\n result_out((function () {\n var o = object_new(\n Coq_value_object(\n Coq_object_loc_prealloc(Coq_prealloc_object_proto())),\n "Object");\n var p = object_alloc(s, o);\n var l = p[0], s_2 = p[1];\n return (Coq_out_ter(s_2, res_val(Coq_value_object(l))));}())));\n case "Coq_type_bool":\n return (to_object(s, v));\n case "Coq_type_number":\n return (to_object(s, v));\n case "Coq_type_string":\n return (to_object(s, v));\n case "Coq_type_object":\n return (result_out(Coq_out_ter(s, res_val(v))));\n }\n \n};\n\nvar array_args_map_loop = function (s, c, l, args, ind) {\n switch (args.tag) {\n case "[]":\n return (res_void(s));\n case "::":\n var h = args.head, rest = args.tail;\n return (\n if_some(\n object_heap_map_properties_pickable_option(s, l, function (p) {\n return (\n HeapStr.write(p, JsNumber.to_string(ind),\n Coq_attributes_data_of(attributes_data_intro_all_true(h))));\n }), function(s_2) {\n \n return (array_args_map_loop(s_2, c, l, rest, (ind + 1.)));}));\n }\n \n};\n\nvar string_of_prealloc = function (_foo_) {\n switch (_foo_.tag) {\n case "Coq_prealloc_global":\n return ("global");\n case "Coq_prealloc_global_eval":\n return ("global_eval");\n case "Coq_prealloc_global_parse_int":\n return ("global_parse_int");\n case "Coq_prealloc_global_parse_float":\n return ("global_parse_float");\n case "Coq_prealloc_global_is_finite":\n return ("global_is_finite");\n case "Coq_prealloc_global_is_nan":\n return ("global_is_nan");\n case "Coq_prealloc_global_decode_uri":\n return ("global_decode_uri");\n case "Coq_prealloc_global_decode_uri_component":\n return ("global_decode_uri_component");\n case "Coq_prealloc_global_encode_uri":\n return ("global_encode_uri");\n case "Coq_prealloc_global_encode_uri_component":\n return ("global_encode_uri_component");\n case "Coq_prealloc_object":\n return ("object");\n case "Coq_prealloc_object_get_proto_of":\n return ("object_get_proto_of");\n case "Coq_prealloc_object_get_own_prop_descriptor":\n return ("object_get_own_prop_descriptor");\n case "Coq_prealloc_object_get_own_prop_name":\n return ("object_get_own_prop_name");\n case "Coq_prealloc_object_create":\n return ("object_create");\n case "Coq_prealloc_object_define_prop":\n return ("object_define_prop");\n case "Coq_prealloc_object_define_props":\n return ("object_define_props");\n case "Coq_prealloc_object_seal":\n return ("object_seal");\n case "Coq_prealloc_object_freeze":\n return ("object_freeze");\n case "Coq_prealloc_object_prevent_extensions":\n return ("object_prevent_extensions");\n case "Coq_prealloc_object_is_sealed":\n return ("object_is_sealed");\n case "Coq_prealloc_object_is_frozen":\n return ("object_is_frozen");\n case "Coq_prealloc_object_is_extensible":\n return ("object_is_extensible");\n case "Coq_prealloc_object_keys":\n return ("object_keys");\n case "Coq_prealloc_object_keys_call":\n return ("object_keys_call");\n case "Coq_prealloc_object_proto":\n return ("object_proto_");\n case "Coq_prealloc_object_proto_to_string":\n return ("object_proto_to_string");\n case "Coq_prealloc_object_proto_value_of":\n return ("object_proto_value_of");\n case "Coq_prealloc_object_proto_has_own_prop":\n return ("object_proto_has_own_prop");\n case "Coq_prealloc_object_proto_is_prototype_of":\n return ("object_proto_is_prototype_of");\n case "Coq_prealloc_object_proto_prop_is_enumerable":\n return ("object_proto_prop_is_enumerable");\n case "Coq_prealloc_function":\n return ("function");\n case "Coq_prealloc_function_proto":\n return ("function_proto");\n case "Coq_prealloc_function_proto_to_string":\n return ("function_proto_to_string");\n case "Coq_prealloc_function_proto_apply":\n return ("function_proto_apply");\n case "Coq_prealloc_function_proto_call":\n return ("function_proto_call");\n case "Coq_prealloc_function_proto_bind":\n return ("function_proto_bind");\n case "Coq_prealloc_bool":\n return ("bool");\n case "Coq_prealloc_bool_proto":\n return ("bool_proto");\n case "Coq_prealloc_bool_proto_to_string":\n return ("bool_proto_to_string");\n case "Coq_prealloc_bool_proto_value_of":\n return ("bool_proto_value_of");\n case "Coq_prealloc_number":\n return ("number");\n case "Coq_prealloc_number_proto":\n return ("number_proto");\n case "Coq_prealloc_number_proto_to_string":\n return ("number_proto_to_string");\n case "Coq_prealloc_number_proto_value_of":\n return ("number_proto_value_of");\n case "Coq_prealloc_number_proto_to_fixed":\n return ("number_proto_to_fixed");\n case "Coq_prealloc_number_proto_to_exponential":\n return ("number_proto_to_exponential");\n case "Coq_prealloc_number_proto_to_precision":\n return ("number_proto_to_precision");\n case "Coq_prealloc_array":\n return ("array");\n case "Coq_prealloc_array_is_array":\n return ("array_is_array");\n case "Coq_prealloc_array_proto":\n return ("array_proto");\n case "Coq_prealloc_array_proto_to_string":\n return ("array_proto_to_string");\n case "Coq_prealloc_array_proto_join":\n return ("array_proto_join");\n case "Coq_prealloc_array_proto_pop":\n return ("array_proto_pop");\n case "Coq_prealloc_array_proto_push":\n return ("array_proto_push");\n case "Coq_prealloc_string":\n return ("string");\n case "Coq_prealloc_string_proto":\n return ("string_proto");\n case "Coq_prealloc_string_proto_to_string":\n return ("string_proto_to_string");\n case "Coq_prealloc_string_proto_value_of":\n return ("string_proto_value_of");\n case "Coq_prealloc_string_proto_char_at":\n return ("string_proto_char_at");\n case "Coq_prealloc_string_proto_char_code_at":\n return ("string_proto_char_code_at");\n case "Coq_prealloc_math":\n return ("math");\n case "Coq_prealloc_mathop":\n var m = _foo_.mathop;\n return ("mathop");\n case "Coq_prealloc_date":\n return ("date");\n case "Coq_prealloc_regexp":\n return ("regexp");\n case "Coq_prealloc_error":\n return ("error");\n case "Coq_prealloc_error_proto":\n return ("error_proto");\n case "Coq_prealloc_native_error":\n var n = _foo_.error;\n return ("native_error");\n case "Coq_prealloc_native_error_proto":\n var n = _foo_.error;\n return ("native_error_proto");\n case "Coq_prealloc_error_proto_to_string":\n return ("error_proto_to_string");\n case "Coq_prealloc_throw_type_error":\n return ("throw_type_error");\n case "Coq_prealloc_json":\n return ("json");\n }\n \n};\n\nvar run_construct_prealloc = function (s, c, b, args) {\n switch (b.tag) {\n case "Coq_prealloc_object":\n var v = get_arg(0, args);\n return (call_object_new(s, v));\n case "Coq_prealloc_bool":\n return (\n result_out((function () {\n var v = get_arg(0, args);\n var b0 = convert_value_to_boolean(v);\n var o1 = object_new(\n Coq_value_object(\n Coq_object_loc_prealloc(Coq_prealloc_bool_proto())),\n "Boolean");\n var o = object_with_primitive_value(o1,\n Coq_value_prim(Coq_prim_bool(b0)));\n var p = object_alloc(s, o);\n var l = p[0], s_2 = p[1];\n return (Coq_out_ter(s_2, res_val(Coq_value_object(l))));}())));\n case "Coq_prealloc_number":\n var follow = function (s_2, v) {\n var o1 = object_new(\n Coq_value_object(\n Coq_object_loc_prealloc(Coq_prealloc_number_proto())),\n "Number");\n var o = object_with_primitive_value(o1, v);\n var _tuple_arg_16 = object_alloc(s_2, o);\n var l = _tuple_arg_16[0], s1 = _tuple_arg_16[1];\n return (result_out(Coq_out_ter(s1, res_val(Coq_value_object(l)))));\n };\n if (list_eq_nil_decidable(args)) {\n return (follow(s, Coq_value_prim(Coq_prim_number(JsNumber.zero))));\n } else {\n var v = get_arg(0, args);\n return (\n if_number(to_number(s, c, v), function(x, x0) {\n \n return (follow(x, Coq_value_prim(Coq_prim_number(x0))));}));\n }\n case "Coq_prealloc_array":\n var o_2 = object_new(\n Coq_value_object(\n Coq_object_loc_prealloc(Coq_prealloc_array_proto())),\n "Array");\n var o = object_for_array(o_2, Coq_builtin_define_own_prop_array());\n var p = object_alloc(s, o);\n var l = p[0], s_2 = p[1];\n var follow = function (s_3, length0) {\n return (\n if_some(\n object_heap_map_properties_pickable_option(s_3, l,\n function (p0) {\n return (\n HeapStr.write(p0, "length",\n Coq_attributes_data_of({\n attributes_data_value: Coq_value_prim(\n Coq_prim_number(length0)),\n attributes_data_writable: true,\n attributes_data_enumerable: false,\n attributes_data_configurable: false})));}),\n function(s0) {\n \n return (res_ter(s0, res_val(Coq_value_object(l))));}));\n };\n var arg_len = LibList.length(args);\n if (nat_eq(arg_len, 1)) {\n var v = get_arg(0, args);\n switch (v.tag) {\n case "Coq_value_prim":\n var p0 = v.value;\n switch (p0.tag) {\n case "Coq_prim_undef":\n return (\n if_some(\n object_heap_map_properties_pickable_option(s_2, l,\n function (p1) {\n return (\n HeapStr.write(p1, "0",\n Coq_attributes_data_of(\n attributes_data_intro_all_true(v))));}),\n function(s0) { \n return (follow(s0, 1.0));}));\n case "Coq_prim_null":\n return (\n if_some(\n object_heap_map_properties_pickable_option(s_2, l,\n function (p1) {\n return (\n HeapStr.write(p1, "0",\n Coq_attributes_data_of(\n attributes_data_intro_all_true(v))));}),\n function(s0) { \n return (follow(s0, 1.0));}));\n case "Coq_prim_bool":\n var b0 = p0.value;\n return (\n if_some(\n object_heap_map_properties_pickable_option(s_2, l,\n function (p1) {\n return (\n HeapStr.write(p1, "0",\n Coq_attributes_data_of(\n attributes_data_intro_all_true(v))));}),\n function(s0) { \n return (follow(s0, 1.0));}));\n case "Coq_prim_number":\n var vlen = p0.value;\n return (\n if_run(\n to_uint32(s_2, c, Coq_value_prim(Coq_prim_number(vlen))),\n function(s0, ilen) {\n \n if ((ilen === vlen)) {\n return (follow(s0, ilen));\n } else {\n return (run_error(s0, Coq_native_error_range()));\n }}));\n case "Coq_prim_string":\n var s0 = p0.value;\n return (\n if_some(\n object_heap_map_properties_pickable_option(s_2, l,\n function (p1) {\n return (\n HeapStr.write(p1, "0",\n Coq_attributes_data_of(\n attributes_data_intro_all_true(v))));}),\n function(s1) { \n return (follow(s1, 1.0));}));\n }\n \n case "Coq_value_object":\n var o0 = v.value;\n return (\n if_some(\n object_heap_map_properties_pickable_option(s_2, l,\n function (p0) {\n return (\n HeapStr.write(p0, "0",\n Coq_attributes_data_of(\n attributes_data_intro_all_true(v))));}),\n function(s0) { \n return (follow(s0, 1.0));}));\n }\n \n } else {\n return (\n if_some(\n object_heap_map_properties_pickable_option(s_2, l,\n function (p0) {\n return (\n HeapStr.write(p0, "length",\n Coq_attributes_data_of({\n attributes_data_value: Coq_value_prim(\n Coq_prim_number(\n number_of_int(arg_len))),\n attributes_data_writable: true,\n attributes_data_enumerable: false,\n attributes_data_configurable: false})));}),\n function(s0) {\n \n return (\n if_void(array_args_map_loop(s0, c, l, args, 0.),\n function(s1) {\n \n return (res_ter(s1, res_val(Coq_value_object(l))));}));}));\n }\n case "Coq_prealloc_string":\n var o2 = object_new(\n Coq_value_object(\n Coq_object_loc_prealloc(Coq_prealloc_string_proto())),\n "String");\n var o1 = object_with_get_own_property(o2,\n Coq_builtin_get_own_prop_string());\n var follow = function (s0, s1) {\n var o = object_with_primitive_value(o1,\n Coq_value_prim(Coq_prim_string(s1)));\n var _tuple_arg_17 = object_alloc(s0, o);\n var l = _tuple_arg_17[0], s2 = _tuple_arg_17[1];\n var lenDesc = attributes_data_intro_constant(\n Coq_value_prim(\n Coq_prim_number(number_of_int(strlength(s1)))));\n return (\n if_some(\n object_heap_map_properties_pickable_option(s2, l, function (p) {\n return (\n HeapStr.write(p, "length", Coq_attributes_data_of(lenDesc)));\n }), function(s_2) {\n \n return (res_ter(s_2, res_val(Coq_value_object(l))));}));\n };\n var arg_len = LibList.length(args);\n if (nat_eq(arg_len, 0)) {\n return (follow(s, ""));\n } else {\n var arg = get_arg(0, args);\n return (\n if_string(to_string(s, c, arg), function(s0, s1) {\n \n return (follow(s0, s1));}));\n }\n case "Coq_prealloc_error":\n var v = get_arg(0, args);\n return (\n build_error(s,\n Coq_value_object(\n Coq_object_loc_prealloc(Coq_prealloc_error_proto())), v));\n case "Coq_prealloc_native_error":\n var ne = b.error;\n var v = get_arg(0, args);\n return (\n build_error(s,\n Coq_value_object(\n Coq_object_loc_prealloc(Coq_prealloc_native_error_proto(ne))), v));\n default:\n return (\n function (s) {\n Debug.not_yet_implemented_because(__LOC__, s);\n return (Coq_result_not_yet_implemented());}(\n strappend("Construct prealloc_",\n strappend(string_of_prealloc(b), " not yet implemented."))));\n }\n \n};\n\nvar run_construct_default = function (s, c, l, args) {\n return (\n if_value(run_object_get(s, c, l, "prototype"), function(s1, v1) {\n \n if (type_compare(type_of(v1), Coq_type_object())) {\n var vproto = v1;\n } else {\n var vproto = Coq_value_object(\n Coq_object_loc_prealloc(Coq_prealloc_object_proto()));\n }\n var o = object_new(vproto, "Object");\n var p = object_alloc(s1, o);\n var l_2 = p[0], s2 = p[1];\n return (\n if_value(run_call(s2, c, l, Coq_value_object(l_2), args),\n function(s3, v2) {\n \n if (type_compare(type_of(v2), Coq_type_object())) {\n var vr = v2;\n } else {\n var vr = Coq_value_object(l_2);\n }\n return (res_ter(s3, res_val(vr)));}));}));\n};\n\nvar run_construct = function (s, c, co, l, args) {\n switch (co.tag) {\n case "Coq_construct_default":\n return (run_construct_default(s, c, l, args));\n case "Coq_construct_after_bind":\n return (\n if_some(run_object_method(object_target_function_, s, l),\n function(otrg) {\n \n return (\n if_some(otrg, function(target) {\n \n return (\n if_some(run_object_method(object_construct_, s, target),\n function(oco) {\n \n switch (oco.tag) {\n case "Some":\n var co0 = oco.value;\n return (\n if_some(\n run_object_method(object_bound_args_, s, l),\n function(oarg) {\n \n return (\n if_some(oarg, function(boundArgs) {\n \n var arguments_ = LibList.append(\n boundArgs, args);\n return (\n run_construct(s, c, co0, target,\n arguments_));}));}));\n case "None":\n return (run_error(s, Coq_native_error_type()));\n }\n }));}));}));\n case "Coq_construct_prealloc":\n var b = co.prealloc;\n return (run_construct_prealloc(s, c, b, args));\n }\n \n};\n\nvar run_call_default = function (s, c, lf) {\n var def = result_out(\n Coq_out_ter(s, res_val(Coq_value_prim(Coq_prim_undef()))));\n return (\n if_some(run_object_method(object_code_, s, lf), function(oC) {\n \n switch (oC.tag) {\n case "Some":\n var bd = oC.value;\n if (list_eq_nil_decidable(prog_elements(funcbody_prog(bd)))) {\n return (def);\n } else {\n return (\n ifx_success_or_return(run_prog(s, c, funcbody_prog(bd)),\n function (s_2) {\n return (\n result_out(\n Coq_out_ter(s_2,\n res_val(Coq_value_prim(Coq_prim_undef())))));},\n function (s_2, rv) {\n return (result_out(Coq_out_ter(s_2, res_normal(rv))));}));\n }\n case "None":\n return (def);\n }\n }));\n};\n\nvar creating_function_object_proto = function (s, c, l) {\n return (\n if_object(run_construct_prealloc(s, c, Coq_prealloc_object(), mk_nil()),\n function(s1, lproto) {\n \n var a1 = {\n attributes_data_value: Coq_value_object(l),\n attributes_data_writable: true,\n attributes_data_enumerable: false,\n attributes_data_configurable: true\n };\n return (\n if_bool(\n object_define_own_prop(s1, c, lproto, "constructor",\n descriptor_of_attributes(Coq_attributes_data_of(a1)), false),\n function(s2, b) {\n \n var a2 = {\n attributes_data_value: Coq_value_object(lproto),\n attributes_data_writable: true,\n attributes_data_enumerable: false,\n attributes_data_configurable: false\n };\n return (\n object_define_own_prop(s2, c, l, "prototype",\n descriptor_of_attributes(Coq_attributes_data_of(a2)),\n false));}));}));\n};\n\nvar creating_function_object = function (s, c, names, bd, x, str) {\n var o = object_new(\n Coq_value_object(\n Coq_object_loc_prealloc(Coq_prealloc_function_proto())),\n "Function");\n var o1 = object_with_get(o, Coq_builtin_get_function());\n var o2 = object_with_invokation(o1, Some(Coq_construct_default()),\n Some(Coq_call_default()),\n Some(Coq_builtin_has_instance_function()));\n var o3 = object_with_details(o2, Some(x), Some(names), Some(bd), None(),\n None(), None(), None());\n var p = object_alloc(s, o3);\n var l = p[0], s1 = p[1];\n var a1 = {\n attributes_data_value: Coq_value_prim(\n Coq_prim_number(\n number_of_int(LibList.length(names)))),\n attributes_data_writable: false,\n attributes_data_enumerable: false,\n attributes_data_configurable: false\n };\n return (\n if_bool(\n object_define_own_prop(s1, c, l, "length",\n descriptor_of_attributes(Coq_attributes_data_of(a1)), false),\n function(s2, b2) {\n \n return (\n if_bool(creating_function_object_proto(s2, c, l), function(s3,\n b3) {\n \n if (!(str)) {\n return (res_ter(s3, res_val(Coq_value_object(l))));\n } else {\n var vthrower = Coq_value_object(\n Coq_object_loc_prealloc(\n Coq_prealloc_throw_type_error()));\n var a2 = {\n attributes_accessor_get: vthrower,\n attributes_accessor_set: vthrower,\n attributes_accessor_enumerable: false,\n attributes_accessor_configurable: false\n };\n return (\n if_bool(\n object_define_own_prop(s3, c, l, "caller",\n descriptor_of_attributes(\n Coq_attributes_accessor_of(a2)), false), function(s4,\n b4) {\n \n return (\n if_bool(\n object_define_own_prop(s4, c, l, "arguments",\n descriptor_of_attributes(\n Coq_attributes_accessor_of(a2)), false),\n function(s5, b5) {\n \n return (\n res_ter(s5, res_val(Coq_value_object(l))));}));\n }));\n }}));}));\n};\n\nvar binding_inst_formal_params = function (s, c, l, args, names, str) {\n switch (names.tag) {\n case "[]":\n return (res_void(s));\n case "::":\n var argname = names.head, names_2 = names.tail;\n var v = hd(Coq_value_prim(Coq_prim_undef()), args);\n var args_2 = tl(args);\n return (\n if_bool(env_record_has_binding(s, c, l, argname), function(s1, hb) {\n \n var follow = function (s_2) {\n return (\n if_void(\n env_record_set_mutable_binding(s_2, c, l, argname, v, str),\n function(s_3) {\n \n return (\n binding_inst_formal_params(s_3, c, l, args_2, names_2,\n str));}));\n };\n if (hb) {\n return (follow(s1));\n } else {\n return (\n if_void(\n env_record_create_mutable_binding(s1, c, l, argname,\n None()), function(s2) { \n return (follow(s2));}));\n }}));\n }\n \n};\n\nvar binding_inst_function_decls = function (s, c, l, fds, str, bconfig) {\n switch (fds.tag) {\n case "[]":\n return (res_void(s));\n case "::":\n var fd = fds.head, fds_2 = fds.tail;\n var fbd = fd.funcdecl_body;\n var str_fd = funcbody_is_strict(fbd);\n var fparams = fd.funcdecl_parameters;\n var fname = fd.funcdecl_name;\n return (\n if_object(\n creating_function_object(s, c, fparams, fbd,\n c.execution_ctx_variable_env, str_fd), function(s1, fo) {\n \n var follow = function (s2) {\n return (\n if_void(\n env_record_set_mutable_binding(s2, c, l, fname,\n Coq_value_object(fo), str), function(s3) {\n \n return (\n binding_inst_function_decls(s3, c, l, fds_2, str,\n bconfig));}));\n };\n return (\n if_bool(env_record_has_binding(s1, c, l, fname), function(s2,\n has) {\n \n if (has) {\n if (nat_eq(l, env_loc_global_env_record)) {\n return (\n if_run(\n run_object_get_prop(s2, c,\n Coq_object_loc_prealloc(Coq_prealloc_global()),\n fname), function(s3, d) {\n \n switch (d.tag) {\n case "Coq_full_descriptor_undef":\n return (\n function (s, m) {\n Debug.impossible_with_heap_because(\n __LOC__, s, m);\n return (Coq_result_impossible());}(s3,\n "Undefined full descriptor in [binding_inst_function_decls]."));\n case "Coq_full_descriptor_some":\n var a = d.value;\n if (attributes_configurable(a)) {\n var a_2 = {\n attributes_data_value: Coq_value_prim(\n Coq_prim_undef()),\n attributes_data_writable: true,\n attributes_data_enumerable: true,\n attributes_data_configurable: bconfig\n };\n return (\n if_bool(\n object_define_own_prop(s3, c,\n Coq_object_loc_prealloc(\n Coq_prealloc_global()), fname,\n descriptor_of_attributes(\n Coq_attributes_data_of(a_2)), true),\n function(s0, x) { \n return (follow(s0));\n }));\n } else {\n if ((descriptor_is_accessor_dec(\n descriptor_of_attributes(a))\n || (!(attributes_writable(a))\n || !(attributes_enumerable(a))))) {\n return (\n run_error(s3, Coq_native_error_type()));\n } else {\n return (follow(s3));\n }\n }\n }\n }));\n } else {\n return (follow(s2));\n }\n } else {\n return (\n if_void(\n env_record_create_mutable_binding(s2, c, l, fname,\n Some(bconfig)), function(s3) { \n return (follow(s3));\n }));\n }}));}));\n }\n \n};\n\nvar make_arg_getter = function (s, c, x, x0) {\n var xbd = strappend("return ", strappend(x, ";"));\n var bd = Coq_funcbody_intro(\n Coq_prog_intro(true,\n mk_cons(\n Coq_element_stat(\n Coq_stat_return(Some(Coq_expr_identifier(x)))), mk_nil())),\n xbd);\n return (creating_function_object(s, c, mk_nil(), bd, x0, true));\n};\n\nvar make_arg_setter = function (s, c, x, x0) {\n var xparam = strappend(x, "_arg");\n var xbd = strappend(x, strappend(" = ", strappend(xparam, ";")));\n var bd = Coq_funcbody_intro(\n Coq_prog_intro(true,\n mk_cons(\n Coq_element_stat(\n Coq_stat_expr(\n Coq_expr_assign(Coq_expr_identifier(x), None(),\n Coq_expr_identifier(xparam)))), mk_nil())), xbd);\n return (\n creating_function_object(s, c, mk_cons(xparam, mk_nil()), bd, x0, true));\n};\n\nvar arguments_object_map_loop = function (s, c, l, xs, len, args, x, str, lmap, xsmap) {\n return (\n function (fO, fS, n) {\n if (int_eq(n, 0)) {\n return (fO({}));\n } else {\n return (fS((n - 1)));\n }}(function (_pat_any_18) {\n if (list_eq_nil_decidable(xsmap)) {\n return (res_void(s));\n } else {\n return (\n if_some(object_binds_pickable_option(s, l), function(o) {\n \n var o_2 = object_for_args_object(o, lmap,\n Coq_builtin_get_args_obj(),\n Coq_builtin_get_own_prop_args_obj(),\n Coq_builtin_define_own_prop_args_obj(),\n Coq_builtin_delete_args_obj());\n return (res_void(object_write(s, l, o_2)));}));\n }}, function (len_2) {\n var tdl = take_drop_last(args);\n var rmlargs = tdl[0], largs = tdl[1];\n var arguments_object_map_loop_2 = function (s0, xsmap0) {\n return (\n arguments_object_map_loop(s0, c, l, xs, len_2, rmlargs, x, str,\n lmap, xsmap0));\n };\n var a = attributes_data_intro_all_true(largs);\n return (\n if_bool(\n object_define_own_prop(s, c, l,\n convert_prim_to_string(Coq_prim_number(number_of_int(len_2))),\n descriptor_of_attributes(Coq_attributes_data_of(a)), false),\n function(s1, b) {\n \n if (ge_nat_decidable(len_2, LibList.length(xs))) {\n return (arguments_object_map_loop_2(s1, xsmap));\n } else {\n var dummy = "";\n var x0 = nth_def(dummy, len_2, xs);\n if ((str || mem_decide(string_eq, x0, xsmap))) {\n return (arguments_object_map_loop_2(s1, xsmap));\n } else {\n return (\n if_object(make_arg_getter(s1, c, x0, x), function(s2,\n lgetter) {\n \n return (\n if_object(make_arg_setter(s2, c, x0, x),\n function(s3, lsetter) {\n \n var a_2 = {\n attributes_accessor_get: Coq_value_object(\n lgetter),\n attributes_accessor_set: Coq_value_object(\n lsetter),\n attributes_accessor_enumerable: false,\n attributes_accessor_configurable: true\n };\n return (\n if_bool(\n object_define_own_prop(s3, c, lmap,\n convert_prim_to_string(\n Coq_prim_number(number_of_int(len_2))),\n descriptor_of_attributes(\n Coq_attributes_accessor_of(a_2)),\n false), function(s4, b_2) {\n \n return (\n arguments_object_map_loop_2(s4,\n mk_cons(x0, xsmap)));}));}));}));\n }\n }}));}, len));\n};\n\nvar arguments_object_map = function (s, c, l, xs, args, x, str) {\n return (\n if_object(run_construct_prealloc(s, c, Coq_prealloc_object(), mk_nil()),\n function(s_2, lmap) {\n \n return (\n arguments_object_map_loop(s_2, c, l, xs, LibList.length(args),\n args, x, str, lmap, mk_nil()));}));\n};\n\nvar create_arguments_object = function (s, c, lf, xs, args, x, str) {\n var o = object_create_builtin(\n Coq_value_object(\n Coq_object_loc_prealloc(Coq_prealloc_object_proto())),\n "Arguments", Heap.empty);\n var p = object_alloc(s, o);\n var l = p[0], s_2 = p[1];\n var a = {\n attributes_data_value: Coq_value_prim(\n Coq_prim_number(\n number_of_int(LibList.length(args)))),\n attributes_data_writable: true,\n attributes_data_enumerable: false,\n attributes_data_configurable: true\n };\n return (\n if_bool(\n object_define_own_prop(s_2, c, l, "length",\n descriptor_of_attributes(Coq_attributes_data_of(a)), false),\n function(s1, b) {\n \n return (\n if_void(arguments_object_map(s1, c, l, xs, args, x, str),\n function(s2) {\n \n if (str) {\n var vthrower = Coq_value_object(\n Coq_object_loc_prealloc(\n Coq_prealloc_throw_type_error()));\n var a0 = {\n attributes_accessor_get: vthrower,\n attributes_accessor_set: vthrower,\n attributes_accessor_enumerable: false,\n attributes_accessor_configurable: false\n };\n return (\n if_bool(\n object_define_own_prop(s2, c, l, "caller",\n descriptor_of_attributes(\n Coq_attributes_accessor_of(a0)), false), function(s3,\n b_2) {\n \n return (\n if_bool(\n object_define_own_prop(s3, c, l, "callee",\n descriptor_of_attributes(\n Coq_attributes_accessor_of(a0)), false),\n function(s4, b_3) {\n \n return (\n res_ter(s4, res_val(Coq_value_object(l))));}));\n }));\n } else {\n var a0 = {\n attributes_data_value: Coq_value_object(lf),\n attributes_data_writable: true,\n attributes_data_enumerable: false,\n attributes_data_configurable: true\n };\n return (\n if_bool(\n object_define_own_prop(s2, c, l, "callee",\n descriptor_of_attributes(Coq_attributes_data_of(a0)),\n false), function(s3, b_2) {\n \n return (res_ter(s3, res_val(Coq_value_object(l))));}));\n }}));}));\n};\n\nvar binding_inst_arg_obj = function (s, c, lf, p, xs, args, l) {\n var arguments_ = "arguments";\n var str = prog_intro_strictness(p);\n return (\n if_object(\n create_arguments_object(s, c, lf, xs, args,\n c.execution_ctx_variable_env, str), function(s1, largs) {\n \n if (str) {\n return (\n if_void(env_record_create_immutable_binding(s1, l, arguments_),\n function(s2) {\n \n return (\n env_record_initialize_immutable_binding(s2, l, arguments_,\n Coq_value_object(largs)));}));\n } else {\n return (\n env_record_create_set_mutable_binding(s1, c, l, arguments_,\n None(), Coq_value_object(largs), false));\n }}));\n};\n\nvar binding_inst_var_decls = function (s, c, l, vds, bconfig, str) {\n switch (vds.tag) {\n case "[]":\n return (res_void(s));\n case "::":\n var vd = vds.head, vds_2 = vds.tail;\n var bivd = function (s0) {\n return (binding_inst_var_decls(s0, c, l, vds_2, bconfig, str));\n };\n return (\n if_bool(env_record_has_binding(s, c, l, vd), function(s1, has) {\n \n if (has) {\n return (bivd(s1));\n } else {\n return (\n if_void(\n env_record_create_set_mutable_binding(s1, c, l, vd,\n Some(bconfig), Coq_value_prim(Coq_prim_undef()), str),\n function(s2) { \n return (bivd(s2));}));\n }}));\n }\n \n};\n\nvar execution_ctx_binding_inst = function (s, c, ct, funco, p, args) {\n var _switch_arg_19 = c.execution_ctx_variable_env;\n switch (_switch_arg_19.tag) {\n case "[]":\n return (\n function (s, m) {\n Debug.impossible_with_heap_because(__LOC__, s, m);\n return (Coq_result_impossible());}(s,\n "Empty [execution_ctx_variable_env] in [execution_ctx_binding_inst]."));\n case "::":\n var l = _switch_arg_19.head, l0 = _switch_arg_19.tail;\n var str = prog_intro_strictness(p);\n var follow = function (s_2, names) {\n var bconfig = codetype_compare(ct, Coq_codetype_eval());\n var fds = prog_funcdecl(p);\n return (\n if_void(binding_inst_function_decls(s_2, c, l, fds, str, bconfig),\n function(s1) {\n \n return (\n if_bool(env_record_has_binding(s1, c, l, "arguments"),\n function(s2, bdefined) {\n \n var follow2 = function (s10) {\n var vds = prog_vardecl(p);\n return (\n binding_inst_var_decls(s10, c, l, vds, bconfig, str));\n };\n switch (ct.tag) {\n case "Coq_codetype_func":\n switch (funco.tag) {\n case "Some":\n var func = funco.value;\n if (bdefined) {\n return (follow2(s2));\n } else {\n return (\n if_void(\n binding_inst_arg_obj(s2, c, func, p, names,\n args, l), function(s3) {\n \n return (follow2(s3));}));\n }\n case "None":\n if (bdefined) {\n return (follow2(s2));\n } else {\n return (\n function (s, m) {\n Debug.impossible_with_heap_because(\n __LOC__, s, m);\n return (Coq_result_impossible());}(s2,\n "Weird `arguments\' object in [execution_ctx_binding_inst]."));\n }\n }\n \n case "Coq_codetype_global":\n return (follow2(s2));\n case "Coq_codetype_eval":\n return (follow2(s2));\n }\n }));}));\n };\n switch (ct.tag) {\n case "Coq_codetype_func":\n switch (funco.tag) {\n case "Some":\n var func = funco.value;\n return (\n if_some(\n run_object_method(object_formal_parameters_, s, func),\n function(nameso) {\n \n return (\n if_some(nameso, function(names) {\n \n return (\n if_void(\n binding_inst_formal_params(s, c, l, args,\n names, str), function(s_2) {\n \n return (follow(s_2, names));}));}));}));\n case "None":\n return (\n function (s, m) {\n Debug.impossible_with_heap_because(__LOC__, s, m);\n return (Coq_result_impossible());}(s,\n "Non coherent functionnal code type in [execution_ctx_binding_inst]."));\n }\n \n case "Coq_codetype_global":\n switch (funco.tag) {\n case "Some":\n var o = funco.value;\n return (\n function (s, m) {\n Debug.impossible_with_heap_because(__LOC__, s, m);\n return (Coq_result_impossible());}(s,\n "Non coherent non-functionnal code type in [execution_ctx_binding_inst]."));\n case "None":\n return (follow(s, mk_nil()));\n }\n \n case "Coq_codetype_eval":\n switch (funco.tag) {\n case "Some":\n var o = funco.value;\n return (\n function (s, m) {\n Debug.impossible_with_heap_because(__LOC__, s, m);\n return (Coq_result_impossible());}(s,\n "Non coherent non-functionnal code type in [execution_ctx_binding_inst]."));\n case "None":\n return (follow(s, mk_nil()));\n }\n \n }\n \n }\n \n};\n\nvar entering_func_code = function (s, c, lf, vthis, args) {\n return (\n if_some(run_object_method(object_code_, s, lf), function(bdo) {\n \n return (\n if_some(bdo, function(bd) {\n \n var str = funcbody_is_strict(bd);\n var follow = function (s_2, vthis_2) {\n return (\n if_some(run_object_method(object_scope_, s_2, lf),\n function(lexo) {\n \n return (\n if_some(lexo, function(lex) {\n \n var p = lexical_env_alloc_decl(s_2, lex);\n var lex_2 = p[0], s1 = p[1];\n var c_2 = execution_ctx_intro_same(lex_2,\n vthis_2, str);\n return (\n if_void(\n execution_ctx_binding_inst(s1, c_2,\n Coq_codetype_func(), Some(lf),\n funcbody_prog(bd), args), function(s2) {\n \n return (run_call_default(s2, c_2, lf));}));\n }));}));\n };\n if (str) {\n return (follow(s, vthis));\n } else {\n switch (vthis.tag) {\n case "Coq_value_prim":\n var p = vthis.value;\n switch (p.tag) {\n case "Coq_prim_undef":\n return (\n follow(s,\n Coq_value_object(\n Coq_object_loc_prealloc(Coq_prealloc_global()))));\n case "Coq_prim_null":\n return (\n follow(s,\n Coq_value_object(\n Coq_object_loc_prealloc(Coq_prealloc_global()))));\n case "Coq_prim_bool":\n var b = p.value;\n return (\n if_value(to_object(s, vthis), function(s2, v) {\n \n return (follow(s2, v));}));\n case "Coq_prim_number":\n var n = p.value;\n return (\n if_value(to_object(s, vthis), function(s2, v) {\n \n return (follow(s2, v));}));\n case "Coq_prim_string":\n var s0 = p.value;\n return (\n if_value(to_object(s, vthis), function(s2, v) {\n \n return (follow(s2, v));}));\n }\n \n case "Coq_value_object":\n var lthis = vthis.value;\n return (follow(s, vthis));\n }\n \n }}));}));\n};\n\nvar run_object_get_own_prop = function (s, c, l, x) {\n return (\n if_some(run_object_method(object_get_own_prop_, s, l), function(b) {\n \n var def = function (s_2) {\n return (\n if_some(run_object_method(object_properties_, s_2, l),\n function(p) {\n \n return (\n res_spec(s_2,\n ifx_some_or_default(\n convert_option_attributes(HeapStr.read_option(p, x)),\n Coq_full_descriptor_undef(), function (x) { return (x);\n })));}));\n };\n switch (b.tag) {\n case "Coq_builtin_get_own_prop_default":\n return (def(s));\n case "Coq_builtin_get_own_prop_args_obj":\n return (\n if_run(def(s), function(s1, d) {\n \n switch (d.tag) {\n case "Coq_full_descriptor_undef":\n return (res_spec(s1, Coq_full_descriptor_undef()));\n case "Coq_full_descriptor_some":\n var a = d.value;\n return (\n if_some(\n run_object_method(object_parameter_map_, s1, l),\n function(lmapo) {\n \n return (\n if_some(lmapo, function(lmap) {\n \n return (\n if_run(\n run_object_get_own_prop(s1, c, lmap, x),\n function(s2, d0) {\n \n var follow = function (s_2, a0) {\n return (\n res_spec(s_2,\n Coq_full_descriptor_some(a0)));\n };\n switch (d0.tag) {\n case "Coq_full_descriptor_undef":\n return (follow(s2, a));\n case "Coq_full_descriptor_some":\n var amap = d0.value;\n return (\n if_value(\n run_object_get(s2, c, lmap,\n x), function(s3, v) {\n \n switch (a.tag) {\n case "Coq_attributes_data_of":\n var ad = a.value;\n return (\n follow(s3,\n Coq_attributes_data_of(\n attributes_data_with_value(\n ad, v))));\n case "Coq_attributes_accessor_of":\n var aa = a.value;\n return (\n function (s, m) {\n Debug.impossible_with_heap_because(\n __LOC__, s, m);\n return (\n Coq_result_impossible(\n ));}(s3,\n "[run_object_get_own_prop]: received an accessor property descriptor in a point where the specification suppose it never happens."));\n }\n }));\n }\n }));}));}));\n }\n }));\n case "Coq_builtin_get_own_prop_string":\n return (\n if_run(def(s), function(s0, d) {\n \n switch (d.tag) {\n case "Coq_full_descriptor_undef":\n return (\n if_run(\n to_int32(s0, c, Coq_value_prim(Coq_prim_string(x))),\n function(s1, k) {\n \n return (\n if_string(\n to_string(s1, c,\n Coq_value_prim(\n Coq_prim_number(JsNumber.absolute(k)))),\n function(s2, s3) {\n \n if (!(string_eq(x, s3))) {\n return (\n res_spec(s2,\n Coq_full_descriptor_undef()));\n } else {\n return (\n if_string(run_object_prim_value(s2, l),\n function(s4, str) {\n \n return (\n if_run(\n to_int32(s4, c,\n Coq_value_prim(\n Coq_prim_string(x))),\n function(s5, k0) {\n \n var len = number_of_int(\n strlength(str));\n if (le_int_decidable(len, k0)) {\n return (\n res_spec(s5,\n Coq_full_descriptor_undef(\n )));\n } else {\n var resultStr = string_sub(\n str,\n int_of_number(\n k0), 1);\n var a = {\n attributes_data_value: \n Coq_value_prim(\n Coq_prim_string(\n resultStr)),\n attributes_data_writable: false,\n attributes_data_enumerable: true,\n attributes_data_configurable: false\n };\n return (\n res_spec(s5,\n Coq_full_descriptor_some(\n Coq_attributes_data_of(\n a))));\n }}));}));\n }}));}));\n case "Coq_full_descriptor_some":\n var a = d.value;\n return (res_spec(s0, d));\n }\n }));\n }\n }));\n};\n\nvar run_function_has_instance = function (s, lv, _foo_) {\n switch (_foo_.tag) {\n case "Coq_value_prim":\n var p = _foo_.value;\n return (run_error(s, Coq_native_error_type()));\n case "Coq_value_object":\n var lo = _foo_.value;\n return (\n if_some(run_object_method(object_proto_, s, lv), function(vproto) {\n \n switch (vproto.tag) {\n case "Coq_value_prim":\n var p = vproto.value;\n switch (p.tag) {\n case "Coq_prim_null":\n return (\n res_ter(s,\n res_val(Coq_value_prim(Coq_prim_bool(false)))));\n default:\n return (\n function (s, m) {\n Debug.impossible_with_heap_because(__LOC__, s, m);\n return (Coq_result_impossible());}(s,\n "Primitive found in the prototype chain in [run_object_has_instance_loop]."));\n }\n \n case "Coq_value_object":\n var proto = vproto.value;\n if (object_loc_compare(proto, lo)) {\n return (\n res_ter(s, res_val(Coq_value_prim(Coq_prim_bool(true)))));\n } else {\n return (\n run_function_has_instance(s, proto, Coq_value_object(lo)));\n }\n }\n }));\n }\n \n};\n\nvar run_object_has_instance = function (s, c, b, l, v) {\n switch (b.tag) {\n case "Coq_builtin_has_instance_function":\n switch (v.tag) {\n case "Coq_value_prim":\n var w = v.value;\n return (\n result_out(\n Coq_out_ter(s, res_val(Coq_value_prim(Coq_prim_bool(false))))));\n case "Coq_value_object":\n var lv = v.value;\n return (\n if_value(run_object_get(s, c, l, "prototype"), function(s1,\n vproto) {\n \n switch (vproto.tag) {\n case "Coq_value_prim":\n var p = vproto.value;\n return (run_error(s1, Coq_native_error_type()));\n case "Coq_value_object":\n var lproto = vproto.value;\n return (\n run_function_has_instance(s1, lv,\n Coq_value_object(lproto)));\n }\n }));\n }\n \n case "Coq_builtin_has_instance_after_bind":\n return (\n if_some(run_object_method(object_target_function_, s, l),\n function(ol) {\n \n return (\n if_some(ol, function(l0) {\n \n return (\n if_some(run_object_method(object_has_instance_, s, l0),\n function(ob) {\n \n switch (ob.tag) {\n case "Some":\n var b0 = ob.value;\n return (\n run_object_has_instance(s, c, b0, l0, v));\n case "None":\n return (run_error(s, Coq_native_error_type()));\n }\n }));}));}));\n }\n \n};\n\nvar from_prop_descriptor = function (s, c, _foo_) {\n switch (_foo_.tag) {\n case "Coq_full_descriptor_undef":\n return (\n result_out(Coq_out_ter(s, res_val(Coq_value_prim(Coq_prim_undef())))));\n case "Coq_full_descriptor_some":\n var a = _foo_.value;\n return (\n if_object(\n run_construct_prealloc(s, c, Coq_prealloc_object(), mk_nil()),\n function(s1, l) {\n \n var follow = function (s0, x) {\n var a1 = attributes_data_intro_all_true(\n Coq_value_prim(\n Coq_prim_bool(attributes_enumerable(a))));\n return (\n if_bool(\n object_define_own_prop(s0, c, l, "enumerable",\n descriptor_of_attributes(Coq_attributes_data_of(a1)),\n throw_false), function(s0_2, x0) {\n \n var a2 = attributes_data_intro_all_true(\n Coq_value_prim(\n Coq_prim_bool(attributes_configurable(a))));\n return (\n if_bool(\n object_define_own_prop(s0_2, c, l, "configurable",\n descriptor_of_attributes(\n Coq_attributes_data_of(a2)), throw_false),\n function(s_2, x1) {\n \n return (\n res_ter(s_2, res_val(Coq_value_object(l))));}));\n }));\n };\n switch (a.tag) {\n case "Coq_attributes_data_of":\n var ad = a.value;\n var a1 = attributes_data_intro_all_true(\n ad.attributes_data_value);\n return (\n if_bool(\n object_define_own_prop(s1, c, l, "value",\n descriptor_of_attributes(Coq_attributes_data_of(a1)),\n throw_false), function(s2, x) {\n \n var a2 = attributes_data_intro_all_true(\n Coq_value_prim(\n Coq_prim_bool(ad.attributes_data_writable)));\n return (\n if_bool(\n object_define_own_prop(s2, c, l, "writable",\n descriptor_of_attributes(\n Coq_attributes_data_of(a2)), throw_false),\n function(s3, v) { \n return (follow(s3, v));}));}));\n case "Coq_attributes_accessor_of":\n var aa = a.value;\n var a1 = attributes_data_intro_all_true(\n aa.attributes_accessor_get);\n return (\n if_bool(\n object_define_own_prop(s1, c, l, "get",\n descriptor_of_attributes(Coq_attributes_data_of(a1)),\n throw_false), function(s2, x) {\n \n var a2 = attributes_data_intro_all_true(\n aa.attributes_accessor_set);\n return (\n if_bool(\n object_define_own_prop(s2, c, l, "set",\n descriptor_of_attributes(\n Coq_attributes_data_of(a2)), throw_false),\n function(s3, v) { \n return (follow(s3, v));}));}));\n }\n }));\n }\n \n};\n\nvar run_equal = function (s, c, v1, v2) {\n var conv_number = function (s0, v) {\n return (to_number(s0, c, v));\n };\n var conv_primitive = function (s0, v) {\n return (to_primitive(s0, c, v, None()));\n };\n var checkTypesThen = function (s0, v3, v4, k) {\n var ty1 = type_of(v3);\n var ty2 = type_of(v4);\n if (type_compare(ty1, ty2)) {\n return (\n result_out(\n Coq_out_ter(s0,\n res_val(\n Coq_value_prim(\n Coq_prim_bool(equality_test_for_same_type(ty1, v3, v4)))))));\n } else {\n return (k(ty1, ty2));\n }\n };\n return (\n checkTypesThen(s, v1, v2, function (ty1, ty2) {\n var dc_conv = function (v3, f, v4) {\n return (\n if_value(f(s, v4), function(s0, v2_2) {\n \n return (run_equal(s0, c, v3, v2_2));}));\n };\n var so = function (b) {\n return (\n result_out(\n Coq_out_ter(s, res_val(Coq_value_prim(Coq_prim_bool(b))))));\n };\n if ((type_compare(ty1, Coq_type_null())\n && type_compare(ty2, Coq_type_undef()))) {\n return (so(true));\n } else {\n if ((type_compare(ty1, Coq_type_undef())\n && type_compare(ty2, Coq_type_null()))) {\n return (so(true));\n } else {\n if ((type_compare(ty1, Coq_type_number())\n && type_compare(ty2, Coq_type_string()))) {\n return (dc_conv(v1, conv_number, v2));\n } else {\n if ((type_compare(ty1, Coq_type_string())\n && type_compare(ty2, Coq_type_number()))) {\n return (dc_conv(v2, conv_number, v1));\n } else {\n if (type_compare(ty1, Coq_type_bool())) {\n return (dc_conv(v2, conv_number, v1));\n } else {\n if (type_compare(ty2, Coq_type_bool())) {\n return (dc_conv(v1, conv_number, v2));\n } else {\n if (((type_compare(ty1, Coq_type_string())\n || type_compare(ty1, Coq_type_number()))\n && type_compare(ty2, Coq_type_object()))) {\n return (dc_conv(v1, conv_primitive, v2));\n } else {\n if ((type_compare(ty1, Coq_type_object())\n && (type_compare(ty2, Coq_type_string())\n || type_compare(ty2, Coq_type_number())))) {\n return (dc_conv(v2, conv_primitive, v1));\n } else {\n return (so(false));\n }\n }\n }\n }\n }\n }\n }\n }}));\n};\n\nvar convert_twice = function (ifv, kC, s, v1, v2) {\n return (\n ifv(kC(s, v1), function (s1, vc1) {\n return (\n ifv(kC(s1, v2), function (s2, vc2) {\n return (res_spec(s2, [vc1, vc2]));}));}));\n};\n\nvar convert_twice_primitive = function (s, c, v1, v2) {\n return (\n convert_twice(ifx_prim, function (s0, v) {\n return (to_primitive(s0, c, v, None()));}, s, v1, v2));\n};\n\nvar convert_twice_number = function (s, c, v1, v2) {\n return (\n convert_twice(ifx_number, function (s0, v) {\n return (to_number(s0, c, v));}, s, v1, v2));\n};\n\nvar convert_twice_string = function (s, c, v1, v2) {\n return (\n convert_twice(ifx_string, function (s0, v) {\n return (to_string(s0, c, v));}, s, v1, v2));\n};\n\nvar issome = function (_foo_) {\n switch (_foo_.tag) {\n case "Some":\n var t = _foo_.value;\n return (true);\n case "None":\n return (false);\n }\n \n};\n\nvar run_binary_op_add = function (s, c, v1, v2) {\n return (\n if_run(convert_twice_primitive(s, c, v1, v2), function(s1,\n _tuple_arg_22) {\n var w1 = _tuple_arg_22[0], w2 = _tuple_arg_22[1];\n \n if ((type_compare(type_of(Coq_value_prim(w1)), Coq_type_string())\n || type_compare(type_of(Coq_value_prim(w2)), Coq_type_string()))) {\n return (\n if_run(\n convert_twice_string(s1, c, Coq_value_prim(w1),\n Coq_value_prim(w2)), function(s2, _tuple_arg_21) {\n var str1 = _tuple_arg_21[0], str2 = _tuple_arg_21[1];\n \n return (\n res_out(\n Coq_out_ter(s2,\n res_val(\n Coq_value_prim(\n Coq_prim_string(strappend(str1, str2)))))));}));\n } else {\n return (\n if_run(\n convert_twice_number(s1, c, Coq_value_prim(w1),\n Coq_value_prim(w2)), function(s2, _tuple_arg_20) {\n var n1 = _tuple_arg_20[0], n2 = _tuple_arg_20[1];\n \n return (\n res_out(\n Coq_out_ter(s2,\n res_val(Coq_value_prim(Coq_prim_number((n1 + n2)))))));\n }));\n }}));\n};\n\nvar run_binary_op_arith = function (mathop, s, c, v1, v2) {\n return (\n if_run(convert_twice_number(s, c, v1, v2), function(s1, nn) {\n \n var n1 = nn[0], n2 = nn[1];\n return (\n res_out(\n Coq_out_ter(s1,\n res_val(Coq_value_prim(Coq_prim_number(mathop(n1, n2)))))));}));\n};\n\nvar run_binary_op_shift = function (b_unsigned, mathop, s, c, v1, v2) {\n if (b_unsigned) {\n var conv = to_uint32;\n } else {\n var conv = to_int32;\n }\n return (\n if_run(conv(s, c, v1), function(s1, k1) {\n \n return (\n if_run(to_uint32(s1, c, v2), function(s2, k2) {\n \n var k2_2 = JsNumber.modulo_32(k2);\n return (\n res_ter(s2,\n res_val(Coq_value_prim(Coq_prim_number(mathop(k1, k2_2))))));\n }));}));\n};\n\nvar run_binary_op_bitwise = function (mathop, s, c, v1, v2) {\n return (\n if_run(to_int32(s, c, v1), function(s1, k1) {\n \n return (\n if_run(to_int32(s1, c, v2), function(s2, k2) {\n \n return (\n res_ter(s2,\n res_val(Coq_value_prim(Coq_prim_number(mathop(k1, k2))))));\n }));}));\n};\n\nvar run_binary_op_compare = function (b_swap, b_neg, s, c, v1, v2) {\n return (\n if_run(convert_twice_primitive(s, c, v1, v2), function(s1, ww) {\n \n var w1 = ww[0], w2 = ww[1];\n if (b_swap) {\n var p = [w2, w1];\n } else {\n var p = [w1, w2];\n }\n var wa = p[0], wb = p[1];\n var wr = inequality_test_primitive(wa, wb);\n if (prim_compare(wr, Coq_prim_undef())) {\n return (\n res_out(\n Coq_out_ter(s1, res_val(Coq_value_prim(Coq_prim_bool(false))))));\n } else {\n if ((b_neg && prim_compare(wr, Coq_prim_bool(true)))) {\n return (\n res_out(\n Coq_out_ter(s1,\n res_val(Coq_value_prim(Coq_prim_bool(false))))));\n } else {\n if ((b_neg && prim_compare(wr, Coq_prim_bool(false)))) {\n return (\n res_out(\n Coq_out_ter(s1,\n res_val(Coq_value_prim(Coq_prim_bool(true))))));\n } else {\n return (res_out(Coq_out_ter(s1, res_val(Coq_value_prim(wr)))));\n }\n }\n }}));\n};\n\nvar run_binary_op_instanceof = function (s, c, v1, v2) {\n switch (v2.tag) {\n case "Coq_value_prim":\n var p = v2.value;\n return (run_error(s, Coq_native_error_type()));\n case "Coq_value_object":\n var l = v2.value;\n return (\n if_some(run_object_method(object_has_instance_, s, l), function(b) {\n \n switch (b.tag) {\n case "None":\n return (run_error(s, Coq_native_error_type()));\n case "Some":\n var has_instance_id = b.value;\n return (\n run_object_has_instance(s, c, has_instance_id, l, v1));\n }\n }));\n }\n \n};\n\nvar run_binary_op_in = function (s, c, v1, v2) {\n switch (v2.tag) {\n case "Coq_value_prim":\n var p = v2.value;\n return (run_error(s, Coq_native_error_type()));\n case "Coq_value_object":\n var l = v2.value;\n return (\n if_string(to_string(s, c, v1), function(s2, x) {\n \n return (object_has_prop(s2, c, l, x));}));\n }\n \n};\n\nvar run_binary_op = function (s, c, op, v1, v2) {\n switch (op.tag) {\n case "Coq_binary_op_mult":\n return (\n run_binary_op_arith(function (x, y) { return ((x * y));}, s, c, v1,\n v2));\n case "Coq_binary_op_div":\n return (\n run_binary_op_arith(function (x, y) { return ((x / y));}, s, c, v1,\n v2));\n case "Coq_binary_op_mod":\n return (\n run_binary_op_arith(function (x, y) { return (JsNumber.fmod(x, y));},\n s, c, v1, v2));\n case "Coq_binary_op_sub":\n return (\n run_binary_op_arith(function (x, y) { return ((x - y));}, s, c, v1,\n v2));\n case "Coq_binary_op_lt":\n return (run_binary_op_compare(false, false, s, c, v1, v2));\n case "Coq_binary_op_gt":\n return (run_binary_op_compare(true, false, s, c, v1, v2));\n case "Coq_binary_op_le":\n return (run_binary_op_compare(true, true, s, c, v1, v2));\n case "Coq_binary_op_ge":\n return (run_binary_op_compare(false, true, s, c, v1, v2));\n case "Coq_binary_op_left_shift":\n return (\n run_binary_op_shift(false, JsNumber.int32_left_shift, s, c, v1, v2));\n case "Coq_binary_op_right_shift":\n return (\n run_binary_op_shift(false, JsNumber.int32_right_shift, s, c, v1, v2));\n case "Coq_binary_op_unsigned_right_shift":\n return (\n run_binary_op_shift(true, JsNumber.uint32_right_shift, s, c, v1, v2));\n case "Coq_binary_op_bitwise_and":\n return (\n run_binary_op_bitwise(JsNumber.int32_bitwise_and, s, c, v1, v2));\n case "Coq_binary_op_bitwise_or":\n return (\n run_binary_op_bitwise(JsNumber.int32_bitwise_or, s, c, v1, v2));\n case "Coq_binary_op_bitwise_xor":\n return (\n run_binary_op_bitwise(JsNumber.int32_bitwise_xor, s, c, v1, v2));\n case "Coq_binary_op_add":\n return (run_binary_op_add(s, c, v1, v2));\n case "Coq_binary_op_instanceof":\n return (run_binary_op_instanceof(s, c, v1, v2));\n case "Coq_binary_op_in":\n return (run_binary_op_in(s, c, v1, v2));\n case "Coq_binary_op_equal":\n return (run_equal(s, c, v1, v2));\n case "Coq_binary_op_disequal":\n return (\n if_bool(run_equal(s, c, v1, v2), function(s0, b0) {\n \n return (\n res_ter(s0, res_val(Coq_value_prim(Coq_prim_bool(!(b0))))));}));\n case "Coq_binary_op_strict_equal":\n return (\n result_out(\n Coq_out_ter(s,\n res_val(\n Coq_value_prim(Coq_prim_bool(strict_equality_test(v1, v2)))))));\n case "Coq_binary_op_strict_disequal":\n return (\n result_out(\n Coq_out_ter(s,\n res_val(\n Coq_value_prim(Coq_prim_bool(!(strict_equality_test(v1, v2))))))));\n case "Coq_binary_op_coma":\n return (result_out(Coq_out_ter(s, res_val(v2))));\n case "Coq_binary_op_and":\n return (Coq_result_impossible());\n case "Coq_binary_op_or":\n return (Coq_result_impossible());\n }\n \n};\n\nvar run_prepost_op = function (_foo_) {\n switch (_foo_.tag) {\n case "Coq_unary_op_delete":\n return (None());\n case "Coq_unary_op_void":\n return (None());\n case "Coq_unary_op_typeof":\n return (None());\n case "Coq_unary_op_post_incr":\n return (Some([add_one, false]));\n case "Coq_unary_op_post_decr":\n return (Some([sub_one, false]));\n case "Coq_unary_op_pre_incr":\n return (Some([add_one, true]));\n case "Coq_unary_op_pre_decr":\n return (Some([sub_one, true]));\n case "Coq_unary_op_add":\n return (None());\n case "Coq_unary_op_neg":\n return (None());\n case "Coq_unary_op_bitwise_not":\n return (None());\n case "Coq_unary_op_not":\n return (None());\n }\n \n};\n\nvar run_typeof_value = function (s, _foo_) {\n switch (_foo_.tag) {\n case "Coq_value_prim":\n var w = _foo_.value;\n return (typeof_prim(w));\n case "Coq_value_object":\n var l = _foo_.value;\n if (is_callable_dec(s, Coq_value_object(l))) {\n return ("function");\n } else {\n return ("object");\n }\n }\n \n};\n\nvar run_unary_op = function (s, c, op, e) {\n if (prepost_unary_op_dec(op)) {\n return (\n if_success(run_expr(s, c, e), function(s1, rv1) {\n \n return (\n if_run(ref_get_value(s1, c, rv1), function(s2, v2) {\n \n return (\n if_number(to_number(s2, c, v2), function(s3, n1) {\n \n return (\n if_some(run_prepost_op(op), function(po) {\n \n var number_op = po[0], is_pre = po[1];\n var n2 = number_op(n1);\n var v = Coq_prim_number((function () {\n if (is_pre) {\n return (n2);\n } else {\n return (n1);\n }}()));\n return (\n if_void(\n ref_put_value(s3, c, rv1,\n Coq_value_prim(Coq_prim_number(n2))),\n function(s4) {\n \n return (\n result_out(\n Coq_out_ter(s4,\n res_val(Coq_value_prim(v)))));}));}));\n }));}));}));\n } else {\n switch (op.tag) {\n case "Coq_unary_op_delete":\n return (\n if_success(run_expr(s, c, e), function(s0, rv) {\n \n switch (rv.tag) {\n case "Coq_resvalue_empty":\n return (\n res_ter(s0, res_val(Coq_value_prim(Coq_prim_bool(true)))));\n case "Coq_resvalue_value":\n var v = rv.value;\n return (\n res_ter(s0, res_val(Coq_value_prim(Coq_prim_bool(true)))));\n case "Coq_resvalue_ref":\n var r = rv.ref;\n if (ref_kind_comparable(ref_kind_of(r),\n Coq_ref_kind_undef())) {\n if (r.ref_strict) {\n return (run_error(s0, Coq_native_error_syntax()));\n } else {\n return (\n res_ter(s0,\n res_val(Coq_value_prim(Coq_prim_bool(true)))));\n }\n } else {\n var _switch_arg_23 = r.ref_base;\n switch (_switch_arg_23.tag) {\n case "Coq_ref_base_type_value":\n var v = _switch_arg_23.value;\n return (\n if_object(to_object(s0, v), function(s1, l) {\n \n return (\n object_delete(s1, c, l, r.ref_name,\n r.ref_strict));}));\n case "Coq_ref_base_type_env_loc":\n var l = _switch_arg_23.value;\n if (r.ref_strict) {\n return (run_error(s0, Coq_native_error_syntax()));\n } else {\n return (\n env_record_delete_binding(s0, c, l, r.ref_name));\n }\n }\n \n }\n }\n }));\n case "Coq_unary_op_typeof":\n return (\n if_success(run_expr(s, c, e), function(s1, rv) {\n \n switch (rv.tag) {\n case "Coq_resvalue_empty":\n return (\n function (s, m) {\n Debug.impossible_with_heap_because(__LOC__, s, m);\n return (Coq_result_impossible());}(s1,\n "Empty result for a `typeof\' in [run_unary_op]."));\n case "Coq_resvalue_value":\n var v = rv.value;\n return (\n res_ter(s1,\n res_val(\n Coq_value_prim(\n Coq_prim_string(run_typeof_value(s1, v))))));\n case "Coq_resvalue_ref":\n var r = rv.ref;\n if (ref_kind_comparable(ref_kind_of(r),\n Coq_ref_kind_undef())) {\n return (\n res_ter(s1,\n res_val(Coq_value_prim(Coq_prim_string("undefined")))));\n } else {\n return (\n if_run(ref_get_value(s1, c, Coq_resvalue_ref(r)),\n function(s2, v) {\n \n return (\n res_ter(s2,\n res_val(\n Coq_value_prim(\n Coq_prim_string(run_typeof_value(s2, v))))));\n }));\n }\n }\n }));\n default:\n return (\n if_run(run_expr_get_value(s, c, e), function(s1, v) {\n \n switch (op.tag) {\n case "Coq_unary_op_void":\n return (\n res_ter(s1, res_val(Coq_value_prim(Coq_prim_undef()))));\n case "Coq_unary_op_add":\n return (to_number(s1, c, v));\n case "Coq_unary_op_neg":\n return (\n if_number(to_number(s1, c, v), function(s2, n) {\n \n return (\n res_ter(s2,\n res_val(\n Coq_value_prim(\n Coq_prim_number(JsNumber.neg(n))))));}));\n case "Coq_unary_op_bitwise_not":\n return (\n if_run(to_int32(s1, c, v), function(s2, k) {\n \n return (\n res_ter(s2,\n res_val(\n Coq_value_prim(\n Coq_prim_number(\n JsNumber.int32_bitwise_not(k))))));}));\n case "Coq_unary_op_not":\n return (\n res_ter(s1,\n res_val(\n Coq_value_prim(\n Coq_prim_bool(!(convert_value_to_boolean(v)))))));\n default:\n return (\n function (s, m) {\n Debug.impossible_with_heap_because(__LOC__, s, m);\n return (Coq_result_impossible());}(s1,\n "Undealt regular operator in [run_unary_op]."));\n }\n }));\n }\n \n }\n};\n\nvar create_new_function_in = function (s, c, args, bd) {\n return (\n creating_function_object(s, c, args, bd, c.execution_ctx_lexical_env,\n c.execution_ctx_strict));\n};\n\nvar init_object = function (s, c, l, _foo_) {\n switch (_foo_.tag) {\n case "[]":\n return (result_out(Coq_out_ter(s, res_val(Coq_value_object(l)))));\n case "::":\n var p = _foo_.head, pds_2 = _foo_.tail;\n var pn = p[0], pb = p[1];\n var x = string_of_propname(pn);\n var follows = function (s1, desc) {\n return (\n if_success(object_define_own_prop(s1, c, l, x, desc, false),\n function(s2, rv) { \n return (init_object(s2, c, l, pds_2));}));\n };\n switch (pb.tag) {\n case "Coq_propbody_val":\n var e0 = pb.expr;\n return (\n if_run(run_expr_get_value(s, c, e0), function(s1, v0) {\n \n var desc = {\n descriptor_value: Some(v0),\n descriptor_writable: Some(true),\n descriptor_get: None(),\n descriptor_set: None(),\n descriptor_enumerable: Some(true),\n descriptor_configurable: Some(true)\n };\n return (follows(s1, desc));}));\n case "Coq_propbody_get":\n var bd = pb.body;\n return (\n if_value(create_new_function_in(s, c, mk_nil(), bd), function(s1,\n v0) {\n \n var desc = {\n descriptor_value: None(),\n descriptor_writable: None(),\n descriptor_get: Some(v0),\n descriptor_set: None(),\n descriptor_enumerable: Some(true),\n descriptor_configurable: Some(true)\n };\n return (follows(s1, desc));}));\n case "Coq_propbody_set":\n var args = pb.names, bd = pb.body;\n return (\n if_value(create_new_function_in(s, c, args, bd), function(s1,\n v0) {\n \n var desc = {\n descriptor_value: None(),\n descriptor_writable: None(),\n descriptor_get: None(),\n descriptor_set: Some(v0),\n descriptor_enumerable: Some(true),\n descriptor_configurable: Some(true)\n };\n return (follows(s1, desc));}));\n }\n \n }\n \n};\n\nvar run_array_element_list = function (s, c, l, oes, n) {\n switch (oes.tag) {\n case "[]":\n return (result_out(Coq_out_ter(s, res_val(Coq_value_object(l)))));\n case "::":\n var o = oes.head, oes_2 = oes.tail;\n switch (o.tag) {\n case "Some":\n var e = o.value;\n var loop_result = function (s0) {\n return (run_array_element_list(s0, c, l, oes_2, 0.));\n };\n return (\n if_run(run_expr_get_value(s, c, e), function(s0, v) {\n \n return (\n if_value(run_object_get(s0, c, l, "length"), function(s1,\n vlen) {\n \n return (\n if_run(to_uint32(s1, c, vlen), function(s2, ilen) {\n \n return (\n if_string(\n to_string(s2, c,\n Coq_value_prim(Coq_prim_number((ilen + n)))),\n function(s3, slen) {\n \n var desc = {\n attributes_data_value: v,\n attributes_data_writable: true,\n attributes_data_enumerable: true,\n attributes_data_configurable: true\n };\n return (\n if_bool(\n object_define_own_prop(s3, c, l, slen,\n descriptor_of_attributes(\n Coq_attributes_data_of(desc)),\n false), function(s4, x) {\n \n return (\n if_object(loop_result(s4),\n function(s5, l0) {\n \n return (\n res_ter(s5,\n res_val(\n Coq_value_object(l0))));\n }));}));}));}));}));}));\n case "None":\n var firstIndex = elision_head_count(mk_cons(None(), oes_2));\n return (\n run_array_element_list(s, c, l,\n elision_head_remove(mk_cons(None(), oes_2)),\n number_of_int(firstIndex)));\n }\n \n }\n \n};\n\nvar init_array = function (s, c, l, oes) {\n var elementList = elision_tail_remove(oes);\n var elisionLength = elision_tail_count(oes);\n return (\n if_object(run_array_element_list(s, c, l, elementList, 0.), function(s0,\n l0) {\n \n return (\n if_value(run_object_get(s0, c, l0, "length"), function(s1, vlen) {\n \n return (\n if_run(to_uint32(s1, c, vlen), function(s2, ilen) {\n \n return (\n if_run(\n to_uint32(s2, c,\n Coq_value_prim(\n Coq_prim_number(\n (ilen + number_of_int(elisionLength))))),\n function(s3, len) {\n \n return (\n if_not_throw(\n object_put(s3, c, l0, "length",\n Coq_value_prim(Coq_prim_number(len)),\n throw_false), function(s4, x) {\n \n return (\n result_out(\n Coq_out_ter(s4,\n res_val(Coq_value_object(l0)))));}));}));\n }));}));}));\n};\n\nvar run_var_decl_item = function (s, c, x, _foo_) {\n switch (_foo_.tag) {\n case "Some":\n var e = _foo_.value;\n return (\n if_run(identifier_resolution(s, c, x), function(s1, ir) {\n \n return (\n if_run(run_expr_get_value(s1, c, e), function(s2, v) {\n \n return (\n if_void(ref_put_value(s2, c, Coq_resvalue_ref(ir), v),\n function(s3) {\n \n return (\n result_out(\n Coq_out_ter(s3,\n res_val(Coq_value_prim(Coq_prim_string(x))))));\n }));}));}));\n case "None":\n return (\n result_out(\n Coq_out_ter(s, res_val(Coq_value_prim(Coq_prim_string(x))))));\n }\n \n};\n\nvar run_var_decl = function (s, c, _foo_) {\n switch (_foo_.tag) {\n case "[]":\n return (result_out(Coq_out_ter(s, res_empty)));\n case "::":\n var y = _foo_.head, xeos_2 = _foo_.tail;\n var x = y[0], eo = y[1];\n return (\n if_value(run_var_decl_item(s, c, x, eo), function(s1, vname) {\n \n return (run_var_decl(s1, c, xeos_2));}));\n }\n \n};\n\nvar run_list_expr = function (s1, c, vs, _foo_) {\n switch (_foo_.tag) {\n case "[]":\n return (res_spec(s1, rev(vs)));\n case "::":\n var e = _foo_.head, es_2 = _foo_.tail;\n return (\n if_run(run_expr_get_value(s1, c, e), function(s2, v) {\n \n return (run_list_expr(s2, c, mk_cons(v, vs), es_2));}));\n }\n \n};\n\nvar run_block = function (s, c, _foo_) {\n switch (_foo_.tag) {\n case "[]":\n return (res_ter(s, res_normal(Coq_resvalue_empty())));\n case "::":\n var t = _foo_.head, ts_rev_2 = _foo_.tail;\n return (\n if_success(run_block(s, c, ts_rev_2), function(s0, rv0) {\n \n return (\n ifx_success_state(rv0, run_stat(s0, c, t), function (x, x0) {\n return (result_out(Coq_out_ter(x, res_normal(x0))));}));}));\n }\n \n};\n\nvar run_binary_op_and = function (s, c, e1, e2) {\n return (\n if_run(run_expr_get_value(s, c, e1), function(s1, v1) {\n \n var b1 = convert_value_to_boolean(v1);\n if (!(b1)) {\n return (res_ter(s1, res_val(v1)));\n } else {\n return (\n if_run(run_expr_get_value(s1, c, e2), function(s2, v) {\n \n return (res_ter(s2, res_val(v)));}));\n }}));\n};\n\nvar run_binary_op_or = function (s, c, e1, e2) {\n return (\n if_run(run_expr_get_value(s, c, e1), function(s1, v1) {\n \n var b1 = convert_value_to_boolean(v1);\n if (b1) {\n return (res_ter(s1, res_val(v1)));\n } else {\n return (\n if_run(run_expr_get_value(s1, c, e2), function(s2, v) {\n \n return (res_ter(s2, res_val(v)));}));\n }}));\n};\n\nvar run_expr_binary_op = function (s, c, op, e1, e2) {\n switch (op.tag) {\n case "Coq_binary_op_and":\n return (run_binary_op_and(s, c, e1, e2));\n case "Coq_binary_op_or":\n return (run_binary_op_or(s, c, e1, e2));\n default:\n return (\n if_run(run_expr_get_value(s, c, e1), function(s1, v1) {\n \n return (\n if_run(run_expr_get_value(s1, c, e2), function(s2, v2) {\n \n return (run_binary_op(s2, c, op, v1, v2));}));}));\n }\n \n};\n\nvar run_expr_access = function (s, c, e1, e2) {\n return (\n if_run(run_expr_get_value(s, c, e1), function(s1, v1) {\n \n return (\n if_run(run_expr_get_value(s1, c, e2), function(s2, v2) {\n \n if ((value_compare(v1, Coq_value_prim(Coq_prim_undef()))\n || value_compare(v1, Coq_value_prim(Coq_prim_null())))) {\n return (run_error(s2, Coq_native_error_type()));\n } else {\n return (\n if_string(to_string(s2, c, v2), function(s3, x) {\n \n return (\n res_ter(s3,\n res_ref(\n ref_create_value(v1, x, c.execution_ctx_strict))));\n }));\n }}));}));\n};\n\nvar run_expr_assign = function (s, c, opo, e1, e2) {\n return (\n if_success(run_expr(s, c, e1), function(s1, rv1) {\n \n var follow = function (s0, rv_2) {\n switch (rv_2.tag) {\n case "Coq_resvalue_empty":\n return (\n function (s, m) {\n Debug.impossible_with_heap_because(__LOC__, s, m);\n return (Coq_result_impossible());}(s0,\n "Non-value result in [run_expr_assign]."));\n case "Coq_resvalue_value":\n var v = rv_2.value;\n return (\n if_void(ref_put_value(s0, c, rv1, v), function(s_2) {\n \n return (result_out(Coq_out_ter(s_2, res_val(v))));}));\n case "Coq_resvalue_ref":\n var r = rv_2.ref;\n return (\n function (s, m) {\n Debug.impossible_with_heap_because(__LOC__, s, m);\n return (Coq_result_impossible());}(s0,\n "Non-value result in [run_expr_assign]."));\n }\n \n };\n switch (opo.tag) {\n case "Some":\n var op = opo.value;\n return (\n if_run(ref_get_value(s1, c, rv1), function(s2, v1) {\n \n return (\n if_run(run_expr_get_value(s2, c, e2), function(s3, v2) {\n \n return (\n if_success(run_binary_op(s3, c, op, v1, v2),\n function(s4, v) { \n return (follow(s4, v));}));}));\n }));\n case "None":\n return (\n if_run(run_expr_get_value(s1, c, e2), function(x, x0) {\n \n return (follow(x, Coq_resvalue_value(x0)));}));\n }\n }));\n};\n\nvar run_expr_function = function (s, c, fo, args, bd) {\n switch (fo.tag) {\n case "Some":\n var fn = fo.value;\n var p = lexical_env_alloc_decl(s, c.execution_ctx_lexical_env);\n var lex_2 = p[0], s_2 = p[1];\n var follow = function (l) {\n return (\n if_some(env_record_binds_pickable_option(s_2, l), function(e) {\n \n return (\n if_void(env_record_create_immutable_binding(s_2, l, fn),\n function(s1) {\n \n return (\n if_object(\n creating_function_object(s1, c, args, bd, lex_2,\n funcbody_is_strict(bd)), function(s2, l0) {\n \n return (\n if_void(\n env_record_initialize_immutable_binding(s2, l,\n fn, Coq_value_object(l0)), function(s3) {\n \n return (\n result_out(\n Coq_out_ter(s3,\n res_val(Coq_value_object(l0)))));}));}));\n }));}));\n };\n return (\n destr_list(lex_2, function (x) {\n return (\n function (s, m) {\n Debug.impossible_with_heap_because(__LOC__, s, m);\n return (Coq_result_impossible());}(s_2,\n "Empty lexical environnment allocated in [run_expr_function]."));\n }, function (l, x) { return (follow(l));}, {}));\n case "None":\n var lex = c.execution_ctx_lexical_env;\n return (\n creating_function_object(s, c, args, bd, lex, funcbody_is_strict(bd)));\n }\n \n};\n\nvar entering_eval_code = function (s, c, direct, bd, k) {\n var str = (funcbody_is_strict(bd) || (direct && c.execution_ctx_strict));\n if (direct) {\n var c_2 = c;\n } else {\n var c_2 = execution_ctx_initial(str);\n }\n if (str) {\n var p = lexical_env_alloc_decl(s, c_2.execution_ctx_lexical_env);\n } else {\n var p = [c_2.execution_ctx_lexical_env, s];\n }\n var lex = p[0], s_2 = p[1];\n if (str) {\n var c1 = execution_ctx_with_lex_same(c_2, lex);\n } else {\n var c1 = c_2;\n }\n var p0 = funcbody_prog(bd);\n return (\n if_void(\n execution_ctx_binding_inst(s_2, c1, Coq_codetype_eval(), None(), p0,\n mk_nil()), function(s1) { \n return (k(s1, c1));}));\n};\n\nvar run_eval = function (s, c, is_direct_call, vs) {\n var _switch_arg_24 = get_arg(0, vs);\n switch (_switch_arg_24.tag) {\n case "Coq_value_prim":\n var p = _switch_arg_24.value;\n switch (p.tag) {\n case "Coq_prim_undef":\n return (\n result_out(\n Coq_out_ter(s, res_val(Coq_value_prim(Coq_prim_undef())))));\n case "Coq_prim_null":\n return (\n result_out(\n Coq_out_ter(s, res_val(Coq_value_prim(Coq_prim_null())))));\n case "Coq_prim_bool":\n var b = p.value;\n return (\n result_out(\n Coq_out_ter(s, res_val(Coq_value_prim(Coq_prim_bool(b))))));\n case "Coq_prim_number":\n var n = p.value;\n return (\n result_out(\n Coq_out_ter(s, res_val(Coq_value_prim(Coq_prim_number(n))))));\n case "Coq_prim_string":\n var s0 = p.value;\n var str = (is_direct_call && c.execution_ctx_strict);\n var _switch_arg_25 = parse_pickable(s0, str);\n switch (_switch_arg_25.tag) {\n case "Some":\n var p0 = _switch_arg_25.value;\n return (\n entering_eval_code(s, c, is_direct_call,\n Coq_funcbody_intro(p0, s0), function (s1, c_2) {\n return (\n if_ter(run_prog(s1, c_2, p0), function(s2, r) {\n \n var _switch_arg_26 = r.res_type;\n switch (_switch_arg_26.tag) {\n case "Coq_restype_normal":\n return (\n ifx_empty_label(s2, r, function (x) {\n var _switch_arg_27 = r.res_value;\n switch (_switch_arg_27.tag) {\n case "Coq_resvalue_empty":\n return (\n res_ter(s2,\n res_val(\n Coq_value_prim(\n Coq_prim_undef()))));\n case "Coq_resvalue_value":\n var v = _switch_arg_27.value;\n return (res_ter(s2, res_val(v)));\n case "Coq_resvalue_ref":\n var r0 = _switch_arg_27.ref;\n return (\n function (s, m) {\n Debug.impossible_with_heap_because(\n __LOC__, s, m);\n return (\n Coq_result_impossible());}(\n s2,\n "Reference found in the result of an `eval\' in [run_eval]."));\n }\n }));\n case "Coq_restype_throw":\n return (res_ter(s2, res_throw(r.res_value)));\n default:\n return (\n function (s, m) {\n Debug.impossible_with_heap_because(\n __LOC__, s, m);\n return (Coq_result_impossible());}(s2,\n "Forbidden result type returned by an `eval\' in [run_eval]."));\n }\n }));}));\n case "None":\n return (run_error(s, Coq_native_error_syntax()));\n }\n \n }\n \n case "Coq_value_object":\n var o = _switch_arg_24.value;\n return (result_out(Coq_out_ter(s, res_val(Coq_value_object(o)))));\n }\n \n};\n\nvar run_expr_call = function (s, c, e1, e2s) {\n var is_eval_direct = is_syntactic_eval(e1);\n return (\n if_success(run_expr(s, c, e1), function(s1, rv) {\n \n return (\n if_run(ref_get_value(s1, c, rv), function(s2, f) {\n \n return (\n if_run(run_list_expr(s2, c, mk_nil(), e2s), function(s3,\n vs) {\n \n switch (f.tag) {\n case "Coq_value_prim":\n var p = f.value;\n return (run_error(s3, Coq_native_error_type()));\n case "Coq_value_object":\n var l = f.value;\n if (is_callable_dec(s3, Coq_value_object(l))) {\n var follow = function (vthis) {\n if (object_loc_compare(l,\n Coq_object_loc_prealloc(\n Coq_prealloc_global_eval()))) {\n return (run_eval(s3, c, is_eval_direct, vs));\n } else {\n return (run_call(s3, c, l, vthis, vs));\n }\n };\n switch (rv.tag) {\n case "Coq_resvalue_empty":\n return (\n function (s, m) {\n Debug.impossible_with_heap_because(\n __LOC__, s, m);\n return (Coq_result_impossible());}(s3,\n "[run_expr_call] unable to call an empty result."));\n case "Coq_resvalue_value":\n var v = rv.value;\n return (\n follow(Coq_value_prim(Coq_prim_undef())));\n case "Coq_resvalue_ref":\n var r = rv.ref;\n var _switch_arg_28 = r.ref_base;\n switch (_switch_arg_28.tag) {\n case "Coq_ref_base_type_value":\n var v = _switch_arg_28.value;\n if ((ref_kind_comparable(ref_kind_of(r),\n Coq_ref_kind_primitive_base())\n || (ref_kind_comparable(ref_kind_of(r),\n Coq_ref_kind_null())\n || ref_kind_comparable(\n ref_kind_of(r),\n Coq_ref_kind_object())))) {\n return (follow(v));\n } else {\n return (\n function (s, m) {\n Debug.impossible_with_heap_because(\n __LOC__, s, m);\n return (Coq_result_impossible());}(\n s3,\n "[run_expr_call] unable to call a non-property function."));\n }\n case "Coq_ref_base_type_env_loc":\n var l0 = _switch_arg_28.value;\n return (\n if_some(\n env_record_implicit_this_value(s3, l0),\n function(v) { \n return (follow(v));}));\n }\n \n }\n \n } else {\n return (run_error(s3, Coq_native_error_type()));\n }\n }\n }));}));}));\n};\n\nvar run_expr_conditionnal = function (s, c, e1, e2, e3) {\n return (\n if_run(run_expr_get_value(s, c, e1), function(s1, v1) {\n \n var b = convert_value_to_boolean(v1);\n if (b) {\n var e = e2;\n } else {\n var e = e3;\n }\n return (\n if_run(run_expr_get_value(s1, c, e), function(s0, r) {\n \n return (res_ter(s0, res_val(r)));}));}));\n};\n\nvar run_expr_new = function (s, c, e1, e2s) {\n return (\n if_run(run_expr_get_value(s, c, e1), function(s1, v) {\n \n return (\n if_run(run_list_expr(s1, c, mk_nil(), e2s), function(s2, args) {\n \n switch (v.tag) {\n case "Coq_value_prim":\n var p = v.value;\n return (run_error(s2, Coq_native_error_type()));\n case "Coq_value_object":\n var l = v.value;\n return (\n if_some(run_object_method(object_construct_, s2, l),\n function(coo) {\n \n switch (coo.tag) {\n case "Some":\n var co = coo.value;\n return (run_construct(s2, c, co, l, args));\n case "None":\n return (run_error(s2, Coq_native_error_type()));\n }\n }));\n }\n }));}));\n};\n\nvar run_stat_label = function (s, c, lab, t) {\n return (\n if_break(run_stat(s, c, t), function(s1, r1) {\n \n return (\n result_out(\n Coq_out_ter(s1, (function () {\n if (label_compare(r1.res_label, lab)) {\n return (res_normal(r1.res_value));\n } else {\n return (r1);\n }}()))));}));\n};\n\nvar run_stat_with = function (s, c, e1, t2) {\n return (\n if_run(run_expr_get_value(s, c, e1), function(s1, v1) {\n \n return (\n if_object(to_object(s1, v1), function(s2, l) {\n \n var lex = c.execution_ctx_lexical_env;\n var p = lexical_env_alloc_object(s2, lex, l, provide_this_true);\n var lex_2 = p[0], s3 = p[1];\n var c_2 = execution_ctx_with_lex(c, lex_2);\n return (run_stat(s3, c_2, t2));}));}));\n};\n\nvar run_stat_if = function (s, c, e1, t2, to0) {\n return (\n if_run(run_expr_get_value(s, c, e1), function(s1, v1) {\n \n var b = convert_value_to_boolean(v1);\n if (b) {\n return (run_stat(s1, c, t2));\n } else {\n switch (to0.tag) {\n case "Some":\n var t3 = to0.value;\n return (run_stat(s1, c, t3));\n case "None":\n return (\n result_out(Coq_out_ter(s1, res_normal(Coq_resvalue_empty()))));\n }\n \n }}));\n};\n\nvar run_stat_while = function (s, c, rv, labs, e1, t2) {\n return (\n if_run(run_expr_get_value(s, c, e1), function(s1, v1) {\n \n var b = convert_value_to_boolean(v1);\n if (b) {\n return (\n if_ter(run_stat(s1, c, t2), function(s2, r) {\n \n if (!(resvalue_compare(r.res_value, Coq_resvalue_empty()))) {\n var rv_2 = r.res_value;\n } else {\n var rv_2 = rv;\n }\n var loop = function (x) {\n return (run_stat_while(s2, c, rv_2, labs, e1, t2));\n };\n if ((!(restype_compare(r.res_type, Coq_restype_continue()))\n || !(res_label_in(r, labs)))) {\n if ((restype_compare(r.res_type, Coq_restype_break())\n && res_label_in(r, labs))) {\n return (res_ter(s2, res_normal(rv_2)));\n } else {\n if (!(restype_compare(r.res_type, Coq_restype_normal()))) {\n return (res_ter(s2, r));\n } else {\n return (loop({}));\n }\n }\n } else {\n return (loop({}));\n }}));\n } else {\n return (res_ter(s1, res_normal(rv)));\n }}));\n};\n\nvar run_stat_switch_end = function (s, c, rv, _foo_) {\n switch (_foo_.tag) {\n case "[]":\n return (result_out(Coq_out_ter(s, res_normal(rv))));\n case "::":\n var y = _foo_.head, scs_2 = _foo_.tail;\n switch (y.tag) {\n case "Coq_switchclause_intro":\n var e = y.arg, ts = y.stats;\n return (\n ifx_success_state(rv, run_block(s, c, rev(ts)),\n function (s1, rv1) {\n return (run_stat_switch_end(s1, c, rv1, scs_2));}));\n }\n \n }\n \n};\n\nvar run_stat_switch_no_default = function (s, c, vi, rv, _foo_) {\n switch (_foo_.tag) {\n case "[]":\n return (result_out(Coq_out_ter(s, res_normal(rv))));\n case "::":\n var y = _foo_.head, scs_2 = _foo_.tail;\n switch (y.tag) {\n case "Coq_switchclause_intro":\n var e = y.arg, ts = y.stats;\n return (\n if_run(run_expr_get_value(s, c, e), function(s1, v1) {\n \n var b = strict_equality_test(v1, vi);\n if (b) {\n return (\n if_success(run_block(s1, c, rev(ts)), function(s2, rv2) {\n \n return (run_stat_switch_end(s2, c, rv2, scs_2));}));\n } else {\n return (run_stat_switch_no_default(s1, c, vi, rv, scs_2));\n }}));\n }\n \n }\n \n};\n\nvar run_stat_switch_with_default_default = function (s, c, ts, scs) {\n return (\n if_success(run_block(s, c, rev(ts)), function(s1, rv) {\n \n return (run_stat_switch_end(s1, c, rv, scs));}));\n};\n\nvar run_stat_switch_with_default_B = function (s, c, vi, rv, ts0, scs) {\n switch (scs.tag) {\n case "[]":\n return (run_stat_switch_with_default_default(s, c, ts0, scs));\n case "::":\n var y = scs.head, scs_2 = scs.tail;\n switch (y.tag) {\n case "Coq_switchclause_intro":\n var e = y.arg, ts = y.stats;\n return (\n if_run(run_expr_get_value(s, c, e), function(s1, v1) {\n \n var b = strict_equality_test(v1, vi);\n if (b) {\n return (\n if_success(run_block(s1, c, rev(ts)), function(s2, rv2) {\n \n return (run_stat_switch_end(s2, c, rv2, scs_2));}));\n } else {\n return (\n run_stat_switch_with_default_B(s1, c, vi, rv, ts0, scs_2));\n }}));\n }\n \n }\n \n};\n\nvar run_stat_switch_with_default_A = function (s, c, found, vi, rv, scs1, ts0, scs2) {\n switch (scs1.tag) {\n case "[]":\n if (found) {\n return (run_stat_switch_with_default_default(s, c, ts0, scs2));\n } else {\n return (run_stat_switch_with_default_B(s, c, vi, rv, ts0, scs2));\n }\n case "::":\n var y = scs1.head, scs_2 = scs1.tail;\n switch (y.tag) {\n case "Coq_switchclause_intro":\n var e = y.arg, ts = y.stats;\n var follow = function (s0) {\n return (\n ifx_success_state(rv, run_block(s0, c, rev(ts)),\n function (s1, rv0) {\n return (\n run_stat_switch_with_default_A(s1, c, true, vi, rv0,\n scs_2, ts0, scs2));}));\n };\n if (found) {\n return (follow(s));\n } else {\n return (\n if_run(run_expr_get_value(s, c, e), function(s1, v1) {\n \n var b = strict_equality_test(v1, vi);\n if (b) {\n return (follow(s1));\n } else {\n return (\n run_stat_switch_with_default_A(s1, c, false, vi, rv,\n scs_2, ts0, scs2));\n }}));\n }\n }\n \n }\n \n};\n\nvar run_stat_switch = function (s, c, labs, e, sb) {\n return (\n if_run(run_expr_get_value(s, c, e), function(s1, vi) {\n \n var follow = function (w) {\n return (\n if_success(\n if_break(w, function(s2, r) {\n \n if (res_label_in(r, labs)) {\n return (\n result_out(Coq_out_ter(s2, res_normal(r.res_value))));\n } else {\n return (result_out(Coq_out_ter(s2, r)));\n }}), function(s0, r) { \n return (res_ter(s0, res_normal(r)));\n }));\n };\n switch (sb.tag) {\n case "Coq_switchbody_nodefault":\n var scs = sb.clauses;\n return (\n follow(\n run_stat_switch_no_default(s1, c, vi, Coq_resvalue_empty(),\n scs)));\n case "Coq_switchbody_withdefault":\n var scs1 = sb.clauses_before, ts = sb.clause_default,\n scs2 = sb.clauses_after;\n return (\n follow(\n run_stat_switch_with_default_A(s1, c, false, vi,\n Coq_resvalue_empty(), scs1, ts, scs2)));\n }\n }));\n};\n\nvar run_stat_do_while = function (s, c, rv, labs, e1, t2) {\n return (\n if_ter(run_stat(s, c, t2), function(s1, r) {\n \n if (resvalue_compare(r.res_value, Coq_resvalue_empty())) {\n var rv_2 = rv;\n } else {\n var rv_2 = r.res_value;\n }\n var loop = function (x) {\n return (\n if_run(run_expr_get_value(s1, c, e1), function(s2, v1) {\n \n var b = convert_value_to_boolean(v1);\n if (b) {\n return (run_stat_do_while(s2, c, rv_2, labs, e1, t2));\n } else {\n return (res_ter(s2, res_normal(rv_2)));\n }}));\n };\n if ((restype_compare(r.res_type, Coq_restype_continue())\n && res_label_in(r, labs))) {\n return (loop({}));\n } else {\n if ((restype_compare(r.res_type, Coq_restype_break())\n && res_label_in(r, labs))) {\n return (res_ter(s1, res_normal(rv_2)));\n } else {\n if (!(restype_compare(r.res_type, Coq_restype_normal()))) {\n return (res_ter(s1, r));\n } else {\n return (loop({}));\n }\n }\n }}));\n};\n\nvar run_stat_try = function (s, c, t1, t2o, t3o) {\n var finallycont = function (s1, r) {\n switch (t3o.tag) {\n case "Some":\n var t3 = t3o.value;\n return (\n if_success(run_stat(s1, c, t3), function(s2, rv_2) {\n \n return (res_ter(s2, r));}));\n case "None":\n return (res_ter(s1, r));\n }\n \n };\n return (\n ifx_any_or_throw(run_stat(s, c, t1), finallycont, function (s1, v) {\n switch (t2o.tag) {\n case "Some":\n var y = t2o.value;\n var x = y[0], t2 = y[1];\n var lex = c.execution_ctx_lexical_env;\n var p = lexical_env_alloc_decl(s1, lex);\n var lex_2 = p[0], s_2 = p[1];\n switch (lex_2.tag) {\n case "[]":\n return (\n function (s, m) {\n Debug.impossible_with_heap_because(__LOC__, s, m);\n return (Coq_result_impossible());}(s_2,\n "Empty lexical environnment in [run_stat_try]."));\n case "::":\n var l = lex_2.head, oldlex = lex_2.tail;\n return (\n if_void(\n env_record_create_set_mutable_binding(s_2, c, l, x,\n None(), v, throw_irrelevant), function(s2) {\n \n var c_2 = execution_ctx_with_lex(c, lex_2);\n return (\n if_ter(run_stat(s2, c_2, t2), function(s3, r) {\n \n return (finallycont(s3, r));}));}));\n }\n \n case "None":\n return (finallycont(s1, res_throw(Coq_resvalue_value(v))));\n }\n }));\n};\n\nvar run_stat_throw = function (s, c, e) {\n return (\n if_run(run_expr_get_value(s, c, e), function(s1, v1) {\n \n return (res_ter(s1, res_throw(Coq_resvalue_value(v1))));}));\n};\n\nvar run_stat_return = function (s, c, _foo_) {\n switch (_foo_.tag) {\n case "Some":\n var e = _foo_.value;\n return (\n if_run(run_expr_get_value(s, c, e), function(s1, v1) {\n \n return (res_ter(s1, res_return(Coq_resvalue_value(v1))));}));\n case "None":\n return (\n result_out(\n Coq_out_ter(s,\n res_return(Coq_resvalue_value(Coq_value_prim(Coq_prim_undef()))))));\n }\n \n};\n\nvar run_stat_for_loop = function (s, c, labs, rv, eo2, eo3, t) {\n var follows = function (s0) {\n return (\n if_ter(run_stat(s0, c, t), function(s1, r) {\n \n if (!(resvalue_compare(r.res_value, Coq_resvalue_empty()))) {\n var rv_2 = r.res_value;\n } else {\n var rv_2 = rv;\n }\n var loop = function (s2) {\n return (run_stat_for_loop(s2, c, labs, rv_2, eo2, eo3, t));\n };\n if ((restype_compare(r.res_type, Coq_restype_break())\n && res_label_in(r, labs))) {\n return (res_ter(s1, res_normal(rv_2)));\n } else {\n if ((restype_compare(r.res_type, Coq_restype_normal())\n || (restype_compare(r.res_type, Coq_restype_continue())\n && res_label_in(r, labs)))) {\n switch (eo3.tag) {\n case "Some":\n var e3 = eo3.value;\n return (\n if_run(run_expr_get_value(s1, c, e3), function(s2, v3) {\n \n return (loop(s2));}));\n case "None":\n return (loop(s1));\n }\n \n } else {\n return (res_ter(s1, r));\n }\n }}));\n };\n switch (eo2.tag) {\n case "Some":\n var e2 = eo2.value;\n return (\n if_run(run_expr_get_value(s, c, e2), function(s0, v2) {\n \n var b = convert_value_to_boolean(v2);\n if (b) {\n return (follows(s0));\n } else {\n return (res_ter(s0, res_normal(rv)));\n }}));\n case "None":\n return (follows(s));\n }\n \n};\n\nvar run_stat_for = function (s, c, labs, eo1, eo2, eo3, t) {\n var follows = function (s0) {\n return (\n run_stat_for_loop(s0, c, labs, Coq_resvalue_empty(), eo2, eo3, t));\n };\n switch (eo1.tag) {\n case "Some":\n var e1 = eo1.value;\n return (\n if_run(run_expr_get_value(s, c, e1), function(s0, v1) {\n \n return (follows(s0));}));\n case "None":\n return (follows(s));\n }\n \n};\n\nvar run_stat_for_var = function (s, c, labs, ds, eo2, eo3, t) {\n return (\n if_ter(run_stat(s, c, Coq_stat_var_decl(ds)), function(s0, r) {\n \n return (\n run_stat_for_loop(s0, c, labs, Coq_resvalue_empty(), eo2, eo3, t));\n }));\n};\n\nvar run_expr = function (s, c, _term_) {\n switch (_term_.tag) {\n case "Coq_expr_this":\n return (\n result_out(Coq_out_ter(s, res_val(c.execution_ctx_this_binding))));\n case "Coq_expr_identifier":\n var x = _term_.name;\n return (\n if_run(identifier_resolution(s, c, x), function(s0, r) {\n \n return (res_ter(s0, res_ref(r)));}));\n case "Coq_expr_literal":\n var i = _term_.value;\n return (\n result_out(\n Coq_out_ter(s, res_val(Coq_value_prim(convert_literal_to_prim(i))))));\n case "Coq_expr_object":\n var pds = _term_.fields;\n return (\n if_object(\n run_construct_prealloc(s, c, Coq_prealloc_object(), mk_nil()),\n function(s1, l) { \n return (init_object(s1, c, l, pds));}));\n case "Coq_expr_array":\n var oes = _term_.elements;\n return (\n if_object(\n run_construct_prealloc(s, c, Coq_prealloc_array(), mk_nil()),\n function(s1, l) { \n return (init_array(s1, c, l, oes));}));\n case "Coq_expr_function":\n var fo = _term_.func_name_opt, args = _term_.arg_names,\n bd = _term_.body;\n return (run_expr_function(s, c, fo, args, bd));\n case "Coq_expr_access":\n var e1 = _term_.obj, e2 = _term_.field;\n return (run_expr_access(s, c, e1, e2));\n case "Coq_expr_member":\n var e1 = _term_.obj, f = _term_.field_name;\n return (\n run_expr(s, c,\n Coq_expr_access(e1, Coq_expr_literal(Coq_literal_string(f)))));\n case "Coq_expr_new":\n var e1 = _term_.func, e2s = _term_.args;\n return (run_expr_new(s, c, e1, e2s));\n case "Coq_expr_call":\n var e1 = _term_.func, e2s = _term_.args;\n return (run_expr_call(s, c, e1, e2s));\n case "Coq_expr_unary_op":\n var op = _term_.op, e0 = _term_.arg;\n return (run_unary_op(s, c, op, e0));\n case "Coq_expr_binary_op":\n var e1 = _term_.arg1, op = _term_.op, e2 = _term_.arg2;\n return (run_expr_binary_op(s, c, op, e1, e2));\n case "Coq_expr_conditional":\n var e1 = _term_.cond, e2 = _term_.then_branch, e3 = _term_.else_branch;\n return (run_expr_conditionnal(s, c, e1, e2, e3));\n case "Coq_expr_assign":\n var e1 = _term_.left_expr, opo = _term_.op_opt, e2 = _term_.right_expr;\n return (run_expr_assign(s, c, opo, e1, e2));\n }\n \n};\n\nvar run_stat = function (s, c, _term_) {\n switch (_term_.tag) {\n case "Coq_stat_expr":\n var e = _term_.expr;\n return (\n if_run(run_expr_get_value(s, c, e), function(s0, r) {\n \n return (res_ter(s0, res_val(r)));}));\n case "Coq_stat_label":\n var lab = _term_.label, t0 = _term_.stat;\n return (run_stat_label(s, c, Coq_label_string(lab), t0));\n case "Coq_stat_block":\n var ts = _term_.stats;\n return (run_block(s, c, rev(ts)));\n case "Coq_stat_var_decl":\n var xeos = _term_.decls;\n return (run_var_decl(s, c, xeos));\n case "Coq_stat_if":\n var e1 = _term_.cond, t2 = _term_.then_branch,\n to0 = _term_.else_branch;\n return (run_stat_if(s, c, e1, t2, to0));\n case "Coq_stat_do_while":\n var ls = _term_.labels, t1 = _term_.body, e2 = _term_.cond;\n return (run_stat_do_while(s, c, Coq_resvalue_empty(), ls, e2, t1));\n case "Coq_stat_while":\n var ls = _term_.labels, e1 = _term_.cond, t2 = _term_.body;\n return (run_stat_while(s, c, Coq_resvalue_empty(), ls, e1, t2));\n case "Coq_stat_with":\n var e1 = _term_.obj, t2 = _term_.stat;\n return (run_stat_with(s, c, e1, t2));\n case "Coq_stat_throw":\n var e = _term_.arg;\n return (run_stat_throw(s, c, e));\n case "Coq_stat_return":\n var eo = _term_.arg_opt;\n return (run_stat_return(s, c, eo));\n case "Coq_stat_break":\n var so = _term_.label;\n return (result_out(Coq_out_ter(s, res_break(so))));\n case "Coq_stat_continue":\n var so = _term_.label;\n return (result_out(Coq_out_ter(s, res_continue(so))));\n case "Coq_stat_try":\n var t1 = _term_.body, t2o = _term_.catch_stats_opt,\n t3o = _term_.finally_opt;\n return (run_stat_try(s, c, t1, t2o, t3o));\n case "Coq_stat_for":\n var ls = _term_.labels, eo1 = _term_.init, eo2 = _term_.cond,\n eo3 = _term_.step, s0 = _term_.body;\n return (run_stat_for(s, c, ls, eo1, eo2, eo3, s0));\n case "Coq_stat_for_var":\n var ls = _term_.labels, ds = _term_.init, eo2 = _term_.cond,\n eo3 = _term_.step, s0 = _term_.body;\n return (run_stat_for_var(s, c, ls, ds, eo2, eo3, s0));\n case "Coq_stat_for_in":\n var ls = _term_.labels, e1 = _term_.id, e2 = _term_.obj,\n s0 = _term_.body;\n return (\n function (s) {\n Debug.not_yet_implemented_because(__LOC__, s);\n return (Coq_result_not_yet_implemented());}("stat_for_in"));\n case "Coq_stat_for_in_var":\n var ls = _term_.labels, x = _term_.id, e1o = _term_.init,\n e2 = _term_.obj, s0 = _term_.body;\n return (\n function (s) {\n Debug.not_yet_implemented_because(__LOC__, s);\n return (Coq_result_not_yet_implemented());}("stat_for_in_var"));\n case "Coq_stat_debugger":\n return (result_out(Coq_out_ter(s, res_empty)));\n case "Coq_stat_switch":\n var labs = _term_.labels, e = _term_.arg, sb = _term_.body;\n return (run_stat_switch(s, c, labs, e, sb));\n }\n \n};\n\nvar run_elements = function (s, c, _foo_) {\n switch (_foo_.tag) {\n case "[]":\n return (result_out(Coq_out_ter(s, res_normal(Coq_resvalue_empty()))));\n case "::":\n var el = _foo_.head, els_rev_2 = _foo_.tail;\n return (\n if_success(run_elements(s, c, els_rev_2), function(s0, rv0) {\n \n switch (el.tag) {\n case "Coq_element_stat":\n var t = el.stat;\n return (\n if_ter(run_stat(s0, c, t), function(s1, r1) {\n \n var r2 = res_overwrite_value_if_empty(rv0, r1);\n return (res_out(Coq_out_ter(s1, r2)));}));\n case "Coq_element_func_decl":\n var name = el.func_name, args = el.arg_names, bd = el.body;\n return (res_ter(s0, res_normal(rv0)));\n }\n }));\n }\n \n};\n\nvar run_prog = function (s, c, _term_) {\n switch (_term_.tag) {\n case "Coq_prog_intro":\n var str = _term_.strictness, els = _term_.elements;\n return (run_elements(s, c, rev(els)));\n }\n \n};\n\nvar push = function (s, c, l, args, ilen) {\n var vlen = ilen;\n switch (args.tag) {\n case "[]":\n return (\n if_not_throw(\n object_put(s, c, l, "length",\n Coq_value_prim(Coq_prim_number(vlen)), throw_true), function(s0,\n x) {\n \n return (\n result_out(\n Coq_out_ter(s0,\n res_val(Coq_value_prim(Coq_prim_number(vlen))))));}));\n case "::":\n var v = args.head, vs = args.tail;\n return (\n if_string(to_string(s, c, Coq_value_prim(Coq_prim_number(vlen))),\n function(s0, slen) {\n \n return (\n if_not_throw(object_put(s0, c, l, slen, v, throw_true),\n function(s1, x) { \n return (push(s1, c, l, vs, (ilen + 1.)));}));\n }));\n }\n \n};\n\nvar run_object_is_sealed = function (s, c, l, _foo_) {\n switch (_foo_.tag) {\n case "[]":\n return (\n if_some(run_object_method(object_extensible_, s, l), function(ext) {\n \n return (\n res_ter(s, res_val(Coq_value_prim(Coq_prim_bool(!(ext))))));}));\n case "::":\n var x = _foo_.head, xs_2 = _foo_.tail;\n return (\n if_run(run_object_get_own_prop(s, c, l, x), function(s0, d) {\n \n switch (d.tag) {\n case "Coq_full_descriptor_undef":\n return (\n function (s, m) {\n Debug.impossible_with_heap_because(__LOC__, s, m);\n return (Coq_result_impossible());}(s0,\n "[run_object_is_sealed]: Undefined descriptor found in a place where it shouldn\'t."));\n case "Coq_full_descriptor_some":\n var a = d.value;\n if (attributes_configurable(a)) {\n return (\n res_ter(s0,\n res_val(Coq_value_prim(Coq_prim_bool(false)))));\n } else {\n return (run_object_is_sealed(s0, c, l, xs_2));\n }\n }\n }));\n }\n \n};\n\nvar run_object_seal = function (s, c, l, _foo_) {\n switch (_foo_.tag) {\n case "[]":\n return (\n if_some(run_object_heap_set_extensible(false, s, l), function(s0) {\n \n return (res_ter(s0, res_val(Coq_value_object(l))));}));\n case "::":\n var x = _foo_.head, xs_2 = _foo_.tail;\n return (\n if_run(run_object_get_own_prop(s, c, l, x), function(s0, d) {\n \n switch (d.tag) {\n case "Coq_full_descriptor_undef":\n return (\n function (s, m) {\n Debug.impossible_with_heap_because(__LOC__, s, m);\n return (Coq_result_impossible());}(s0,\n "[run_object_seal]: Undefined descriptor found in a place where it shouldn\'t."));\n case "Coq_full_descriptor_some":\n var a = d.value;\n if (attributes_configurable(a)) {\n var desc = {\n descriptor_value: None(),\n descriptor_writable: None(),\n descriptor_get: None(),\n descriptor_set: None(),\n descriptor_enumerable: None(),\n descriptor_configurable: Some(false)\n };\n var a_2 = attributes_update(a, desc);\n } else {\n var a_2 = a;\n }\n return (\n if_bool(\n object_define_own_prop(s0, c, l, x,\n descriptor_of_attributes(a_2), true), function(s1,\n x0) { \n return (run_object_seal(s1, c, l, xs_2));}));\n }\n }));\n }\n \n};\n\nvar run_object_freeze = function (s, c, l, _foo_) {\n switch (_foo_.tag) {\n case "[]":\n return (\n if_some(run_object_heap_set_extensible(false, s, l), function(s0) {\n \n return (res_ter(s0, res_val(Coq_value_object(l))));}));\n case "::":\n var x = _foo_.head, xs_2 = _foo_.tail;\n return (\n if_run(run_object_get_own_prop(s, c, l, x), function(s0, d) {\n \n switch (d.tag) {\n case "Coq_full_descriptor_undef":\n return (\n function (s, m) {\n Debug.impossible_with_heap_because(__LOC__, s, m);\n return (Coq_result_impossible());}(s0,\n "[run_object_freeze]: Undefined descriptor found in a place where it shouldn\'t."));\n case "Coq_full_descriptor_some":\n var a = d.value;\n if ((attributes_is_data_dec(a) && attributes_writable(a))) {\n var desc = {\n descriptor_value: None(),\n descriptor_writable: Some(false),\n descriptor_get: None(),\n descriptor_set: None(),\n descriptor_enumerable: None(),\n descriptor_configurable: None()\n };\n var a_2 = attributes_update(a, desc);\n } else {\n var a_2 = a;\n }\n if (attributes_configurable(a_2)) {\n var desc = {\n descriptor_value: None(),\n descriptor_writable: None(),\n descriptor_get: None(),\n descriptor_set: None(),\n descriptor_enumerable: None(),\n descriptor_configurable: Some(false)\n };\n var a_3 = attributes_update(a_2, desc);\n } else {\n var a_3 = a_2;\n }\n return (\n if_bool(\n object_define_own_prop(s0, c, l, x,\n descriptor_of_attributes(a_3), true), function(s1,\n x0) { \n return (run_object_freeze(s1, c, l, xs_2));}));\n }\n }));\n }\n \n};\n\nvar run_object_is_frozen = function (s, c, l, _foo_) {\n switch (_foo_.tag) {\n case "[]":\n return (\n if_some(run_object_method(object_extensible_, s, l), function(ext) {\n \n return (\n res_ter(s, res_val(Coq_value_prim(Coq_prim_bool(!(ext))))));}));\n case "::":\n var x = _foo_.head, xs_2 = _foo_.tail;\n return (\n if_run(run_object_get_own_prop(s, c, l, x), function(s0, d) {\n \n var check_configurable = function (a) {\n if (attributes_configurable(a)) {\n return (\n res_ter(s0, res_val(Coq_value_prim(Coq_prim_bool(false)))));\n } else {\n return (run_object_is_frozen(s0, c, l, xs_2));\n }\n };\n switch (d.tag) {\n case "Coq_full_descriptor_undef":\n return (\n function (s, m) {\n Debug.impossible_with_heap_because(__LOC__, s, m);\n return (Coq_result_impossible());}(s0,\n "[run_object_is_frozen]: Undefined descriptor found in a place where it shouldn\'t."));\n case "Coq_full_descriptor_some":\n var a = d.value;\n switch (a.tag) {\n case "Coq_attributes_data_of":\n var ad = a.value;\n if (attributes_writable(Coq_attributes_data_of(ad))) {\n return (\n res_ter(s0,\n res_val(Coq_value_prim(Coq_prim_bool(false)))));\n } else {\n return (\n check_configurable(Coq_attributes_data_of(ad)));\n }\n case "Coq_attributes_accessor_of":\n var aa = a.value;\n return (\n check_configurable(Coq_attributes_accessor_of(aa)));\n }\n \n }\n }));\n }\n \n};\n\nvar run_get_args_for_apply = function (s, c, l, index, n) {\n if ((index < n)) {\n return (\n if_string(to_string(s, c, Coq_value_prim(Coq_prim_number(index))),\n function(s0, sindex) {\n \n return (\n if_value(run_object_get(s0, c, l, sindex), function(s1, v) {\n \n var tail_args = run_get_args_for_apply(s1, c, l,\n (index + 1.), n);\n return (\n if_run(tail_args, function(s2, tail) {\n \n return (res_spec(s2, mk_cons(v, tail)));}));}));}));\n } else {\n return (res_spec(s, mk_nil()));\n }\n};\n\nvar valueToStringForJoin = function (s, c, l, k) {\n return (\n if_string(to_string(s, c, Coq_value_prim(Coq_prim_number(k))),\n function(s0, prop) {\n \n return (\n if_value(run_object_get(s0, c, l, prop), function(s1, v) {\n \n switch (v.tag) {\n case "Coq_value_prim":\n var p = v.value;\n switch (p.tag) {\n case "Coq_prim_undef":\n return (res_spec(s1, ""));\n case "Coq_prim_null":\n return (res_spec(s1, ""));\n case "Coq_prim_bool":\n var b = p.value;\n return (\n if_string(to_string(s1, c, v), function(s2, s3) {\n \n return (res_spec(s2, s3));}));\n case "Coq_prim_number":\n var n = p.value;\n return (\n if_string(to_string(s1, c, v), function(s2, s3) {\n \n return (res_spec(s2, s3));}));\n case "Coq_prim_string":\n var s2 = p.value;\n return (\n if_string(to_string(s1, c, v), function(s3, s4) {\n \n return (res_spec(s3, s4));}));\n }\n \n case "Coq_value_object":\n var o = v.value;\n return (\n if_string(to_string(s1, c, v), function(s2, s3) {\n \n return (res_spec(s2, s3));}));\n }\n }));}));\n};\n\nvar run_array_join_elements = function (s, c, l, k, length0, sep, sR) {\n if ((k < length0)) {\n var ss = strappend(sR, sep);\n var sE = valueToStringForJoin(s, c, l, k);\n return (\n if_run(sE, function(s0, element) {\n \n var sR0 = strappend(ss, element);\n return (\n run_array_join_elements(s0, c, l, (k + 1.), length0, sep, sR0));\n }));\n } else {\n return (res_ter(s, res_val(Coq_value_prim(Coq_prim_string(sR)))));\n }\n};\n\nvar run_call_prealloc = function (s, c, b, vthis, args) {\n switch (b.tag) {\n case "Coq_prealloc_global_is_finite":\n var v = get_arg(0, args);\n return (\n if_number(to_number(s, c, v), function(s0, n) {\n \n return (\n res_ter(s0,\n res_val(\n Coq_value_prim(\n Coq_prim_bool(\n !(\n (JsNumber.isnan(n)\n || ((n === JsNumber.infinity)\n || (n === JsNumber.neg_infinity)))))))));}));\n case "Coq_prealloc_global_is_nan":\n var v = get_arg(0, args);\n return (\n if_number(to_number(s, c, v), function(s0, n) {\n \n return (\n res_ter(s0,\n res_val(Coq_value_prim(Coq_prim_bool(JsNumber.isnan(n))))));\n }));\n case "Coq_prealloc_object":\n var value0 = get_arg(0, args);\n switch (value0.tag) {\n case "Coq_value_prim":\n var p = value0.value;\n switch (p.tag) {\n case "Coq_prim_undef":\n return (run_construct_prealloc(s, c, b, args));\n case "Coq_prim_null":\n return (run_construct_prealloc(s, c, b, args));\n case "Coq_prim_bool":\n var b0 = p.value;\n return (to_object(s, value0));\n case "Coq_prim_number":\n var n = p.value;\n return (to_object(s, value0));\n case "Coq_prim_string":\n var s0 = p.value;\n return (to_object(s, value0));\n }\n \n case "Coq_value_object":\n var o = value0.value;\n return (to_object(s, value0));\n }\n \n case "Coq_prealloc_object_get_proto_of":\n var v = get_arg(0, args);\n switch (v.tag) {\n case "Coq_value_prim":\n var p = v.value;\n return (run_error(s, Coq_native_error_type()));\n case "Coq_value_object":\n var l = v.value;\n return (\n if_some(run_object_method(object_proto_, s, l), function(proto) {\n \n return (res_ter(s, res_val(proto)));}));\n }\n \n case "Coq_prealloc_object_get_own_prop_descriptor":\n var v = get_arg(0, args);\n switch (v.tag) {\n case "Coq_value_prim":\n var p = v.value;\n return (run_error(s, Coq_native_error_type()));\n case "Coq_value_object":\n var l = v.value;\n return (\n if_string(to_string(s, c, get_arg(1, args)), function(s1, x) {\n \n return (\n if_run(run_object_get_own_prop(s1, c, l, x), function(s2,\n d) { \n return (from_prop_descriptor(s2, c, d));}));}));\n }\n \n case "Coq_prealloc_object_define_prop":\n var o = get_arg(0, args);\n var p = get_arg(1, args);\n var attr = get_arg(2, args);\n switch (o.tag) {\n case "Coq_value_prim":\n var p0 = o.value;\n return (run_error(s, Coq_native_error_type()));\n case "Coq_value_object":\n var l = o.value;\n return (\n if_string(to_string(s, c, p), function(s1, name) {\n \n return (\n if_run(run_to_descriptor(s1, c, attr), function(s2, desc) {\n \n return (\n if_bool(\n object_define_own_prop(s2, c, l, name, desc, true),\n function(s3, x) {\n \n return (\n res_ter(s3, res_val(Coq_value_object(l))));}));\n }));}));\n }\n \n case "Coq_prealloc_object_seal":\n var v = get_arg(0, args);\n switch (v.tag) {\n case "Coq_value_prim":\n var p = v.value;\n return (run_error(s, Coq_native_error_type()));\n case "Coq_value_object":\n var l = v.value;\n return (\n if_some(object_properties_keys_as_list_pickable_option(s, l),\n function(_x_) { \n return (run_object_seal(s, c, l, _x_));}));\n }\n \n case "Coq_prealloc_object_freeze":\n var v = get_arg(0, args);\n switch (v.tag) {\n case "Coq_value_prim":\n var p = v.value;\n return (run_error(s, Coq_native_error_type()));\n case "Coq_value_object":\n var l = v.value;\n return (\n if_some(object_properties_keys_as_list_pickable_option(s, l),\n function(_x_) { \n return (run_object_freeze(s, c, l, _x_));}));\n }\n \n case "Coq_prealloc_object_prevent_extensions":\n var v = get_arg(0, args);\n switch (v.tag) {\n case "Coq_value_prim":\n var p = v.value;\n return (run_error(s, Coq_native_error_type()));\n case "Coq_value_object":\n var l = v.value;\n return (\n if_some(object_binds_pickable_option(s, l), function(o) {\n \n var o1 = object_with_extension(o, false);\n var s_2 = object_write(s, l, o1);\n return (res_ter(s_2, res_val(Coq_value_object(l))));}));\n }\n \n case "Coq_prealloc_object_is_sealed":\n var v = get_arg(0, args);\n switch (v.tag) {\n case "Coq_value_prim":\n var p = v.value;\n return (run_error(s, Coq_native_error_type()));\n case "Coq_value_object":\n var l = v.value;\n return (\n if_some(object_properties_keys_as_list_pickable_option(s, l),\n function(_x_) { \n return (run_object_is_sealed(s, c, l, _x_));}));\n }\n \n case "Coq_prealloc_object_is_frozen":\n var v = get_arg(0, args);\n switch (v.tag) {\n case "Coq_value_prim":\n var p = v.value;\n return (run_error(s, Coq_native_error_type()));\n case "Coq_value_object":\n var l = v.value;\n return (\n if_some(object_properties_keys_as_list_pickable_option(s, l),\n function(_x_) { \n return (run_object_is_frozen(s, c, l, _x_));}));\n }\n \n case "Coq_prealloc_object_is_extensible":\n var v = get_arg(0, args);\n switch (v.tag) {\n case "Coq_value_prim":\n var p = v.value;\n return (run_error(s, Coq_native_error_type()));\n case "Coq_value_object":\n var l = v.value;\n return (\n if_some(run_object_method(object_extensible_, s, l),\n function(r) {\n \n return (\n res_ter(s, res_val(Coq_value_prim(Coq_prim_bool(r)))));}));\n }\n \n case "Coq_prealloc_object_proto_to_string":\n switch (vthis.tag) {\n case "Coq_value_prim":\n var p = vthis.value;\n switch (p.tag) {\n case "Coq_prim_undef":\n return (\n result_out(\n Coq_out_ter(s,\n res_val(\n Coq_value_prim(Coq_prim_string("[object Undefined]"))))));\n case "Coq_prim_null":\n return (\n result_out(\n Coq_out_ter(s,\n res_val(Coq_value_prim(Coq_prim_string("[object Null]"))))));\n case "Coq_prim_bool":\n var b0 = p.value;\n return (\n if_object(to_object(s, vthis), function(s1, l) {\n \n return (\n if_some(run_object_method(object_class_, s1, l),\n function(s0) {\n \n return (\n res_ter(s1,\n res_val(\n Coq_value_prim(\n Coq_prim_string(\n strappend("[object ", strappend(s0, "]")))))));\n }));}));\n case "Coq_prim_number":\n var n = p.value;\n return (\n if_object(to_object(s, vthis), function(s1, l) {\n \n return (\n if_some(run_object_method(object_class_, s1, l),\n function(s0) {\n \n return (\n res_ter(s1,\n res_val(\n Coq_value_prim(\n Coq_prim_string(\n strappend("[object ", strappend(s0, "]")))))));\n }));}));\n case "Coq_prim_string":\n var s0 = p.value;\n return (\n if_object(to_object(s, vthis), function(s1, l) {\n \n return (\n if_some(run_object_method(object_class_, s1, l),\n function(s2) {\n \n return (\n res_ter(s1,\n res_val(\n Coq_value_prim(\n Coq_prim_string(\n strappend("[object ", strappend(s2, "]")))))));\n }));}));\n }\n \n case "Coq_value_object":\n var o = vthis.value;\n return (\n if_object(to_object(s, vthis), function(s1, l) {\n \n return (\n if_some(run_object_method(object_class_, s1, l),\n function(s0) {\n \n return (\n res_ter(s1,\n res_val(\n Coq_value_prim(\n Coq_prim_string(\n strappend("[object ", strappend(s0, "]")))))));\n }));}));\n }\n \n case "Coq_prealloc_object_proto_value_of":\n return (to_object(s, vthis));\n case "Coq_prealloc_object_proto_has_own_prop":\n var v = get_arg(0, args);\n return (\n if_string(to_string(s, c, v), function(s1, x) {\n \n return (\n if_object(to_object(s1, vthis), function(s2, l) {\n \n return (\n if_run(run_object_get_own_prop(s2, c, l, x), function(s3,\n d) {\n \n switch (d.tag) {\n case "Coq_full_descriptor_undef":\n return (\n res_ter(s3,\n res_val(Coq_value_prim(Coq_prim_bool(false)))));\n case "Coq_full_descriptor_some":\n var a = d.value;\n return (\n res_ter(s3,\n res_val(Coq_value_prim(Coq_prim_bool(true)))));\n }\n }));}));}));\n case "Coq_prealloc_object_proto_is_prototype_of":\n var v = get_arg(0, args);\n switch (v.tag) {\n case "Coq_value_prim":\n var p = v.value;\n return (\n result_out(\n Coq_out_ter(s, res_val(Coq_value_prim(Coq_prim_bool(false))))));\n case "Coq_value_object":\n var l = v.value;\n return (\n if_object(to_object(s, vthis), function(s1, lo) {\n \n return (object_proto_is_prototype_of(s1, lo, l));}));\n }\n \n case "Coq_prealloc_object_proto_prop_is_enumerable":\n var v = get_arg(0, args);\n return (\n if_string(to_string(s, c, v), function(s1, x) {\n \n return (\n if_object(to_object(s1, vthis), function(s2, l) {\n \n return (\n if_run(run_object_get_own_prop(s2, c, l, x), function(s3,\n d) {\n \n switch (d.tag) {\n case "Coq_full_descriptor_undef":\n return (\n res_ter(s3,\n res_val(Coq_value_prim(Coq_prim_bool(false)))));\n case "Coq_full_descriptor_some":\n var a = d.value;\n return (\n res_ter(s3,\n res_val(\n Coq_value_prim(\n Coq_prim_bool(attributes_enumerable(a))))));\n }\n }));}));}));\n case "Coq_prealloc_function_proto":\n return (\n result_out(Coq_out_ter(s, res_val(Coq_value_prim(Coq_prim_undef())))));\n case "Coq_prealloc_function_proto_to_string":\n if (is_callable_dec(s, vthis)) {\n return (\n function (s) {\n Debug.not_yet_implemented_because(__LOC__, s);\n return (Coq_result_not_yet_implemented());}(\n "Function.prototype.toString() is implementation dependent."));\n } else {\n return (run_error(s, Coq_native_error_type()));\n }\n case "Coq_prealloc_function_proto_apply":\n var thisArg = get_arg(0, args);\n var argArray = get_arg(1, args);\n if (is_callable_dec(s, vthis)) {\n switch (vthis.tag) {\n case "Coq_value_prim":\n var p = vthis.value;\n return (\n function (s, m) {\n Debug.impossible_with_heap_because(__LOC__, s, m);\n return (Coq_result_impossible());}(s,\n "Value is callable, but isn\'t an object."));\n case "Coq_value_object":\n var thisobj = vthis.value;\n switch (argArray.tag) {\n case "Coq_value_prim":\n var p = argArray.value;\n switch (p.tag) {\n case "Coq_prim_undef":\n return (run_call(s, c, thisobj, thisArg, mk_nil()));\n case "Coq_prim_null":\n return (run_call(s, c, thisobj, thisArg, mk_nil()));\n case "Coq_prim_bool":\n var b0 = p.value;\n return (run_error(s, Coq_native_error_type()));\n case "Coq_prim_number":\n var n = p.value;\n return (run_error(s, Coq_native_error_type()));\n case "Coq_prim_string":\n var s0 = p.value;\n return (run_error(s, Coq_native_error_type()));\n }\n \n case "Coq_value_object":\n var array = argArray.value;\n return (\n if_value(run_object_get(s, c, array, "length"),\n function(s0, v) {\n \n return (\n if_run(to_uint32(s0, c, v), function(s1, ilen) {\n \n return (\n if_run(\n run_get_args_for_apply(s1, c, array, 0.,\n ilen), function(s2, arguments_) {\n \n return (\n run_call(s2, c, thisobj, thisArg,\n arguments_));}));}));}));\n }\n \n }\n \n } else {\n return (run_error(s, Coq_native_error_type()));\n }\n case "Coq_prealloc_function_proto_call":\n if (is_callable_dec(s, vthis)) {\n switch (vthis.tag) {\n case "Coq_value_prim":\n var p = vthis.value;\n return (\n function (s, m) {\n Debug.impossible_with_heap_because(__LOC__, s, m);\n return (Coq_result_impossible());}(s,\n "Value is callable, but isn\'t an object."));\n case "Coq_value_object":\n var thisobj = vthis.value;\n var _tuple_arg_29 = get_arg_first_and_rest(args);\n var thisArg = _tuple_arg_29[0], a = _tuple_arg_29[1];\n return (run_call(s, c, thisobj, thisArg, a));\n }\n \n } else {\n return (run_error(s, Coq_native_error_type()));\n }\n case "Coq_prealloc_function_proto_bind":\n if (is_callable_dec(s, vthis)) {\n switch (vthis.tag) {\n case "Coq_value_prim":\n var p = vthis.value;\n return (\n function (s, m) {\n Debug.impossible_with_heap_because(__LOC__, s, m);\n return (Coq_result_impossible());}(s,\n "Value is callable, but isn\'t an object."));\n case "Coq_value_object":\n var thisobj = vthis.value;\n var _tuple_arg_30 = get_arg_first_and_rest(args);\n var vthisArg = _tuple_arg_30[0], a = _tuple_arg_30[1];\n var o1 = object_new(\n Coq_value_object(\n Coq_object_loc_prealloc(Coq_prealloc_object_proto())),\n "Object");\n var o2 = object_with_get(o1, Coq_builtin_get_function());\n var o3 = object_with_details(o2, None(), None(), None(),\n Some(thisobj), Some(vthisArg), Some(a), None());\n var o4 = object_set_class(o3, "Function");\n var o5 = object_set_proto(o4,\n Coq_value_object(\n Coq_object_loc_prealloc(\n Coq_prealloc_function_proto())));\n var o6 = object_with_invokation(o5,\n Some(Coq_construct_after_bind()),\n Some(Coq_call_after_bind()),\n Some(Coq_builtin_has_instance_after_bind()));\n var o7 = object_set_extensible(o6, true);\n var _tuple_arg_31 = object_alloc(s, o7);\n var l = _tuple_arg_31[0], s_2 = _tuple_arg_31[1];\n var vlength = if_some(\n run_object_method(object_class_, s_2, thisobj),\n function(class0) {\n \n if (string_eq(class0, "Function")) {\n return (\n if_number(\n run_object_get(s_2, c, thisobj, "length"),\n function(s10, n) {\n \n return (\n if_run(\n to_int32(s10, c,\n Coq_value_prim(\n Coq_prim_number(n))),\n function(s11, ilen) {\n \n if ((ilen\n < number_of_int(\n LibList.length(a)))) {\n return (res_spec(s11, 0.));\n } else {\n return (\n res_spec(s11,\n (ilen\n - number_of_int(\n LibList.length(a)))));\n }}));}));\n } else {\n return (res_spec(s_2, 0.));\n }});\n return (\n if_run(vlength, function(s10, length0) {\n \n var a0 = {\n attributes_data_value: Coq_value_prim(\n Coq_prim_number(length0)),\n attributes_data_writable: false,\n attributes_data_enumerable: false,\n attributes_data_configurable: false\n };\n return (\n if_some(\n object_heap_map_properties_pickable_option(s10, l,\n function (p) {\n return (\n HeapStr.write(p, "length",\n Coq_attributes_data_of(a0)));}),\n function(s11) {\n \n var vthrower = Coq_value_object(\n Coq_object_loc_prealloc(\n Coq_prealloc_throw_type_error()));\n var a1 = {\n attributes_accessor_get: vthrower,\n attributes_accessor_set: vthrower,\n attributes_accessor_enumerable: false,\n attributes_accessor_configurable: false\n };\n return (\n if_bool(\n object_define_own_prop(s11, c, l, "caller",\n descriptor_of_attributes(\n Coq_attributes_accessor_of(a1)), false),\n function(s12, x) {\n \n return (\n if_bool(\n object_define_own_prop(s12, c, l,\n "arguments",\n descriptor_of_attributes(\n Coq_attributes_accessor_of(a1)), false),\n function(s13, x0) {\n \n return (\n res_ter(s13,\n res_val(Coq_value_object(l))));}));}));\n }));}));\n }\n \n } else {\n return (run_error(s, Coq_native_error_type()));\n }\n case "Coq_prealloc_bool":\n return (\n result_out((function () {\n var v = get_arg(0, args);\n return (\n Coq_out_ter(s,\n res_val(\n Coq_value_prim(Coq_prim_bool(convert_value_to_boolean(v))))));\n }())));\n case "Coq_prealloc_bool_proto_to_string":\n switch (vthis.tag) {\n case "Coq_value_prim":\n var p = vthis.value;\n switch (p.tag) {\n case "Coq_prim_undef":\n return (run_error(s, Coq_native_error_type()));\n case "Coq_prim_null":\n return (run_error(s, Coq_native_error_type()));\n case "Coq_prim_bool":\n var b0 = p.value;\n return (\n res_ter(s,\n res_val(\n Coq_value_prim(\n Coq_prim_string(convert_bool_to_string(b0))))));\n case "Coq_prim_number":\n var n = p.value;\n return (run_error(s, Coq_native_error_type()));\n case "Coq_prim_string":\n var s0 = p.value;\n return (run_error(s, Coq_native_error_type()));\n }\n \n case "Coq_value_object":\n var l = vthis.value;\n return (\n ifx_some_or_default(run_object_method(object_class_, s, l),\n run_error(s, Coq_native_error_type()), function (s0) {\n if (string_eq(s0, "Boolean")) {\n return (\n ifx_some_or_default(\n run_object_method(object_prim_value_, s, l),\n run_error(s, Coq_native_error_type()), function (wo) {\n switch (wo.tag) {\n case "Some":\n var v = wo.value;\n switch (v.tag) {\n case "Coq_value_prim":\n var p = v.value;\n switch (p.tag) {\n case "Coq_prim_undef":\n return (\n run_error(s, Coq_native_error_type()));\n case "Coq_prim_null":\n return (\n run_error(s, Coq_native_error_type()));\n case "Coq_prim_bool":\n var b0 = p.value;\n return (\n res_ter(s,\n res_val(\n Coq_value_prim(\n Coq_prim_string(\n convert_bool_to_string(b0))))));\n case "Coq_prim_number":\n var n = p.value;\n return (\n run_error(s, Coq_native_error_type()));\n case "Coq_prim_string":\n var s1 = p.value;\n return (\n run_error(s, Coq_native_error_type()));\n }\n \n case "Coq_value_object":\n var o = v.value;\n return (\n run_error(s, Coq_native_error_type()));\n }\n \n case "None":\n return (run_error(s, Coq_native_error_type()));\n }\n }));\n } else {\n return (run_error(s, Coq_native_error_type()));\n }}));\n }\n \n case "Coq_prealloc_bool_proto_value_of":\n switch (vthis.tag) {\n case "Coq_value_prim":\n var p = vthis.value;\n switch (p.tag) {\n case "Coq_prim_undef":\n return (run_error(s, Coq_native_error_type()));\n case "Coq_prim_null":\n return (run_error(s, Coq_native_error_type()));\n case "Coq_prim_bool":\n var b0 = p.value;\n return (\n res_ter(s, res_val(Coq_value_prim(Coq_prim_bool(b0)))));\n case "Coq_prim_number":\n var n = p.value;\n return (run_error(s, Coq_native_error_type()));\n case "Coq_prim_string":\n var s0 = p.value;\n return (run_error(s, Coq_native_error_type()));\n }\n \n case "Coq_value_object":\n var l = vthis.value;\n return (\n ifx_some_or_default(run_object_method(object_class_, s, l),\n run_error(s, Coq_native_error_type()), function (s0) {\n if (string_eq(s0, "Boolean")) {\n return (\n ifx_some_or_default(\n run_object_method(object_prim_value_, s, l),\n run_error(s, Coq_native_error_type()), function (wo) {\n switch (wo.tag) {\n case "Some":\n var v = wo.value;\n switch (v.tag) {\n case "Coq_value_prim":\n var p = v.value;\n switch (p.tag) {\n case "Coq_prim_undef":\n return (\n run_error(s, Coq_native_error_type()));\n case "Coq_prim_null":\n return (\n run_error(s, Coq_native_error_type()));\n case "Coq_prim_bool":\n var b0 = p.value;\n return (\n res_ter(s,\n res_val(\n Coq_value_prim(Coq_prim_bool(b0)))));\n case "Coq_prim_number":\n var n = p.value;\n return (\n run_error(s, Coq_native_error_type()));\n case "Coq_prim_string":\n var s1 = p.value;\n return (\n run_error(s, Coq_native_error_type()));\n }\n \n case "Coq_value_object":\n var o = v.value;\n return (\n run_error(s, Coq_native_error_type()));\n }\n \n case "None":\n return (run_error(s, Coq_native_error_type()));\n }\n }));\n } else {\n return (run_error(s, Coq_native_error_type()));\n }}));\n }\n \n case "Coq_prealloc_number":\n if (list_eq_nil_decidable(args)) {\n return (\n result_out(\n Coq_out_ter(s,\n res_val(Coq_value_prim(Coq_prim_number(JsNumber.zero))))));\n } else {\n var v = get_arg(0, args);return (to_number(s, c, v));\n }\n case "Coq_prealloc_number_proto_value_of":\n switch (vthis.tag) {\n case "Coq_value_prim":\n var p = vthis.value;\n switch (p.tag) {\n case "Coq_prim_undef":\n return (run_error(s, Coq_native_error_type()));\n case "Coq_prim_null":\n return (run_error(s, Coq_native_error_type()));\n case "Coq_prim_bool":\n var b0 = p.value;\n return (run_error(s, Coq_native_error_type()));\n case "Coq_prim_number":\n var n = p.value;\n return (\n res_ter(s, res_val(Coq_value_prim(Coq_prim_number(n)))));\n case "Coq_prim_string":\n var s0 = p.value;\n return (run_error(s, Coq_native_error_type()));\n }\n \n case "Coq_value_object":\n var l = vthis.value;\n return (\n ifx_some_or_default(run_object_method(object_class_, s, l),\n run_error(s, Coq_native_error_type()), function (s0) {\n if (string_eq(s0, "Number")) {\n return (\n ifx_some_or_default(\n run_object_method(object_prim_value_, s, l),\n run_error(s, Coq_native_error_type()), function (wo) {\n switch (wo.tag) {\n case "Some":\n var v = wo.value;\n switch (v.tag) {\n case "Coq_value_prim":\n var p = v.value;\n switch (p.tag) {\n case "Coq_prim_undef":\n return (\n run_error(s, Coq_native_error_type()));\n case "Coq_prim_null":\n return (\n run_error(s, Coq_native_error_type()));\n case "Coq_prim_bool":\n var b0 = p.value;\n return (\n run_error(s, Coq_native_error_type()));\n case "Coq_prim_number":\n var n = p.value;\n return (\n res_ter(s,\n res_val(\n Coq_value_prim(Coq_prim_number(n)))));\n case "Coq_prim_string":\n var s1 = p.value;\n return (\n run_error(s, Coq_native_error_type()));\n }\n \n case "Coq_value_object":\n var o = v.value;\n return (\n run_error(s, Coq_native_error_type()));\n }\n \n case "None":\n return (run_error(s, Coq_native_error_type()));\n }\n }));\n } else {\n return (run_error(s, Coq_native_error_type()));\n }}));\n }\n \n case "Coq_prealloc_array":\n return (run_construct_prealloc(s, c, Coq_prealloc_array(), args));\n case "Coq_prealloc_array_is_array":\n var arg = get_arg(0, args);\n switch (arg.tag) {\n case "Coq_value_prim":\n var p = arg.value;\n return (res_ter(s, res_val(Coq_value_prim(Coq_prim_bool(false)))));\n case "Coq_value_object":\n var arg0 = arg.value;\n return (\n if_some(run_object_method(object_class_, s, arg0),\n function(class0) {\n \n if (string_eq(class0, "Array")) {\n return (\n res_ter(s, res_val(Coq_value_prim(Coq_prim_bool(true)))));\n } else {\n return (\n res_ter(s, res_val(Coq_value_prim(Coq_prim_bool(false)))));\n }}));\n }\n \n case "Coq_prealloc_array_proto_to_string":\n return (\n if_object(to_object(s, vthis), function(s0, array) {\n \n return (\n if_value(run_object_get(s0, c, array, "join"), function(s1,\n vfunc) {\n \n if (is_callable_dec(s1, vfunc)) {\n switch (vfunc.tag) {\n case "Coq_value_prim":\n var p = vfunc.value;\n return (\n function (s, m) {\n Debug.impossible_with_heap_because(__LOC__, s,\n m);\n return (Coq_result_impossible());}(s1,\n "Value is callable, but isn\'t an object."));\n case "Coq_value_object":\n var func = vfunc.value;\n return (\n run_call(s1, c, func, Coq_value_object(array),\n mk_nil()));\n }\n \n } else {\n return (\n run_call_prealloc(s1, c,\n Coq_prealloc_object_proto_to_string(),\n Coq_value_object(array), mk_nil()));\n }}));}));\n case "Coq_prealloc_array_proto_join":\n var vsep = get_arg(0, args);\n return (\n if_object(to_object(s, vthis), function(s0, l) {\n \n return (\n if_value(run_object_get(s0, c, l, "length"), function(s1,\n vlen) {\n \n return (\n if_run(to_uint32(s1, c, vlen), function(s2, ilen) {\n \n if (!(\n value_compare(vsep,\n Coq_value_prim(Coq_prim_undef())))) {\n var rsep = vsep;\n } else {\n var rsep = Coq_value_prim(Coq_prim_string(","));\n }\n return (\n if_string(to_string(s2, c, rsep), function(s3,\n sep) {\n \n if ((ilen == 0.0)) {\n return (\n res_ter(s3,\n res_val(\n Coq_value_prim(Coq_prim_string("")))));\n } else {\n var sR = valueToStringForJoin(s3, c, l, 0.);\n return (\n if_run(sR, function(s4, sR0) {\n \n return (\n run_array_join_elements(s4, c, l, 1.,\n ilen, sep, sR0));}));\n }}));}));}));}));\n case "Coq_prealloc_array_proto_pop":\n return (\n if_object(to_object(s, vthis), function(s0, l) {\n \n return (\n if_value(run_object_get(s0, c, l, "length"), function(s1,\n vlen) {\n \n return (\n if_run(to_uint32(s1, c, vlen), function(s2, ilen) {\n \n if ((ilen == 0.0)) {\n return (\n if_not_throw(\n object_put(s2, c, l, "length",\n Coq_value_prim(\n Coq_prim_number(JsNumber.zero)),\n throw_true), function(s3, x) {\n \n return (\n result_out(\n Coq_out_ter(s3,\n res_val(\n Coq_value_prim(Coq_prim_undef())))));\n }));\n } else {\n return (\n if_string(\n to_string(s2, c,\n Coq_value_prim(Coq_prim_number((ilen - 1.)))),\n function(s3, sindx) {\n \n return (\n if_value(run_object_get(s3, c, l, sindx),\n function(s4, velem) {\n \n return (\n if_not_throw(\n object_delete_default(s4, c, l,\n sindx, throw_true), function(s5,\n x) {\n \n return (\n if_not_throw(\n object_put(s5, c, l,\n "length",\n Coq_value_prim(\n Coq_prim_string(sindx)),\n throw_true), function(s6,\n x0) {\n \n return (\n result_out(\n Coq_out_ter(s6,\n res_val(velem))));}));\n }));}));}));\n }}));}));}));\n case "Coq_prealloc_array_proto_push":\n return (\n if_object(to_object(s, vthis), function(s0, l) {\n \n return (\n if_value(run_object_get(s0, c, l, "length"), function(s1,\n vlen) {\n \n return (\n if_run(to_uint32(s1, c, vlen), function(s2, ilen) {\n \n return (push(s2, c, l, args, ilen));}));}));}));\n case "Coq_prealloc_string":\n if (list_eq_nil_decidable(args)) {\n return (res_ter(s, res_val(Coq_value_prim(Coq_prim_string("")))));\n } else {\n var value0 = get_arg(0, args);\n return (\n if_string(to_string(s, c, value0), function(s0, s1) {\n \n return (\n res_ter(s0, res_val(Coq_value_prim(Coq_prim_string(s1)))));}));\n }\n case "Coq_prealloc_string_proto_to_string":\n switch (vthis.tag) {\n case "Coq_value_prim":\n var p = vthis.value;\n if (type_compare(type_of(vthis), Coq_type_string())) {\n return (res_ter(s, res_val(vthis)));\n } else {\n return (run_error(s, Coq_native_error_type()));\n }\n case "Coq_value_object":\n var l = vthis.value;\n return (\n if_some(run_object_method(object_class_, s, l), function(s0) {\n \n if (string_eq(s0, "String")) {\n return (run_object_prim_value(s, l));\n } else {\n return (run_error(s, Coq_native_error_type()));\n }}));\n }\n \n case "Coq_prealloc_string_proto_value_of":\n switch (vthis.tag) {\n case "Coq_value_prim":\n var p = vthis.value;\n if (type_compare(type_of(vthis), Coq_type_string())) {\n return (res_ter(s, res_val(vthis)));\n } else {\n return (run_error(s, Coq_native_error_type()));\n }\n case "Coq_value_object":\n var l = vthis.value;\n return (\n if_some(run_object_method(object_class_, s, l), function(s0) {\n \n if (string_eq(s0, "String")) {\n return (run_object_prim_value(s, l));\n } else {\n return (run_error(s, Coq_native_error_type()));\n }}));\n }\n \n case "Coq_prealloc_error":\n var v = get_arg(0, args);\n return (\n build_error(s,\n Coq_value_object(\n Coq_object_loc_prealloc(Coq_prealloc_error_proto())), v));\n case "Coq_prealloc_native_error":\n var ne = b.error;\n var v = get_arg(0, args);\n return (\n build_error(s,\n Coq_value_object(\n Coq_object_loc_prealloc(Coq_prealloc_native_error_proto(ne))), v));\n case "Coq_prealloc_throw_type_error":\n return (run_error(s, Coq_native_error_type()));\n default:\n return (\n function (s) {\n Debug.not_yet_implemented_because(__LOC__, s);\n return (Coq_result_not_yet_implemented());}(\n strappend("Call prealloc_",\n strappend(string_of_prealloc(b), " not yet implemented"))));\n }\n \n};\n\nvar run_call = function (s, c, l, vthis, args) {\n return (\n if_some(run_object_method(object_call_, s, l), function(co) {\n \n return (\n if_some(co, function(c0) {\n \n switch (c0.tag) {\n case "Coq_call_default":\n return (entering_func_code(s, c, l, vthis, args));\n case "Coq_call_after_bind":\n return (\n if_some(run_object_method(object_bound_args_, s, l),\n function(oarg) {\n \n return (\n if_some(oarg, function(boundArgs) {\n \n return (\n if_some(\n run_object_method(object_bound_this_, s, l),\n function(obnd) {\n \n return (\n if_some(obnd, function(boundThis) {\n \n return (\n if_some(\n run_object_method(\n object_target_function_, s,\n l), function(otrg) {\n \n return (\n if_some(otrg,\n function(target) {\n \n var arguments_ = \n LibList.append(\n boundArgs, args);\n return (\n run_call(s, c,\n target, boundThis,\n arguments_));}));}));\n }));}));}));}));\n case "Coq_call_prealloc":\n var b = c0.prealloc;\n return (run_call_prealloc(s, c, b, vthis, args));\n }\n }));}));\n};\n\nvar run_javascript_from_state = function (s, p) {\n var c = execution_ctx_initial(prog_intro_strictness(p));\n return (\n if_void(\n execution_ctx_binding_inst(s, c, Coq_codetype_global(), None(), p,\n mk_nil()), function(s_2) { \n return (run_prog(s_2, c, p));}));\n};\n\nvar run_javascript_from_result = function (w, p) {\n return (\n if_success(w, function(s, _pat_any_32) {\n \n return (run_javascript_from_state(s, p));}));\n};\n\nvar run_javascript = function (p) {\n return (run_javascript_from_state(state_initial, p));\n};\n}// end of with Datatypes\n}// end of with JsCommon\n}// end of with JsCommonAux\n}// end of with JsInit\n}// end of with JsInterpreterMonads\n}// end of with JsPreliminary\n}// end of with JsSyntax\n}// end of with JsSyntaxAux\n}// end of with LibList\n}// end of with LibOption\n}// end of with LibProd\n}// end of with Shared\n\nreturn {\n convert_number_to_bool: convert_number_to_bool, \n convert_string_to_bool: convert_string_to_bool, \n convert_prim_to_boolean: convert_prim_to_boolean, \n convert_value_to_boolean: convert_value_to_boolean, \n convert_prim_to_number: convert_prim_to_number, \n convert_number_to_integer: convert_number_to_integer, \n convert_bool_to_string: convert_bool_to_string, \n convert_prim_to_string: convert_prim_to_string, \n equality_test_for_same_type: equality_test_for_same_type, \n strict_equality_test: strict_equality_test, \n inequality_test_number: inequality_test_number, \n inequality_test_string: inequality_test_string, \n inequality_test_primitive: inequality_test_primitive, \n typeof_prim: typeof_prim, \n string_of_propname: string_of_propname, \n build_error: build_error, \n run_error: run_error, \n out_error_or_void: out_error_or_void, \n out_error_or_cst: out_error_or_cst, \n run_object_method: run_object_method, \n run_object_heap_set_extensible: run_object_heap_set_extensible, \n object_has_prop: object_has_prop, \n object_get_builtin: object_get_builtin, \n run_object_get: run_object_get, \n run_object_get_prop: run_object_get_prop, \n object_proto_is_prototype_of: object_proto_is_prototype_of, \n object_default_value: object_default_value, \n to_primitive: to_primitive, \n to_number: to_number, \n to_integer: to_integer, \n to_int32: to_int32, \n to_uint32: to_uint32, \n to_string: to_string, \n object_can_put: object_can_put, \n run_object_define_own_prop_array_loop: run_object_define_own_prop_array_loop, \n object_define_own_prop: object_define_own_prop, \n run_to_descriptor: run_to_descriptor, \n prim_new_object: prim_new_object, \n to_object: to_object, \n run_object_prim_value: run_object_prim_value, \n prim_value_get: prim_value_get, \n env_record_has_binding: env_record_has_binding, \n lexical_env_get_identifier_ref: lexical_env_get_identifier_ref, \n object_delete_default: object_delete_default, \n object_delete: object_delete, \n env_record_delete_binding: env_record_delete_binding, \n env_record_implicit_this_value: env_record_implicit_this_value, \n identifier_resolution: identifier_resolution, \n env_record_get_binding_value: env_record_get_binding_value, \n ref_get_value: ref_get_value, \n run_expr_get_value: run_expr_get_value, \n object_put_complete: object_put_complete, \n object_put: object_put, \n env_record_set_mutable_binding: env_record_set_mutable_binding, \n prim_value_put: prim_value_put, \n ref_put_value: ref_put_value, \n env_record_create_mutable_binding: env_record_create_mutable_binding, \n env_record_create_set_mutable_binding: env_record_create_set_mutable_binding, \n env_record_create_immutable_binding: env_record_create_immutable_binding, \n env_record_initialize_immutable_binding: env_record_initialize_immutable_binding, \n call_object_new: call_object_new, \n array_args_map_loop: array_args_map_loop, \n string_of_prealloc: string_of_prealloc, \n run_construct_prealloc: run_construct_prealloc, \n run_construct_default: run_construct_default, \n run_construct: run_construct, \n run_call_default: run_call_default, \n creating_function_object_proto: creating_function_object_proto, \n creating_function_object: creating_function_object, \n binding_inst_formal_params: binding_inst_formal_params, \n binding_inst_function_decls: binding_inst_function_decls, \n make_arg_getter: make_arg_getter, \n make_arg_setter: make_arg_setter, \n arguments_object_map_loop: arguments_object_map_loop, \n arguments_object_map: arguments_object_map, \n create_arguments_object: create_arguments_object, \n binding_inst_arg_obj: binding_inst_arg_obj, \n binding_inst_var_decls: binding_inst_var_decls, \n execution_ctx_binding_inst: execution_ctx_binding_inst, \n entering_func_code: entering_func_code, \n run_object_get_own_prop: run_object_get_own_prop, \n run_function_has_instance: run_function_has_instance, \n run_object_has_instance: run_object_has_instance, \n from_prop_descriptor: from_prop_descriptor, \n run_equal: run_equal, \n convert_twice: convert_twice, \n convert_twice_primitive: convert_twice_primitive, \n convert_twice_number: convert_twice_number, \n convert_twice_string: convert_twice_string, \n issome: issome, \n run_binary_op_add: run_binary_op_add, \n run_binary_op_arith: run_binary_op_arith, \n run_binary_op_shift: run_binary_op_shift, \n run_binary_op_bitwise: run_binary_op_bitwise, \n run_binary_op_compare: run_binary_op_compare, \n run_binary_op_instanceof: run_binary_op_instanceof, \n run_binary_op_in: run_binary_op_in, \n run_binary_op: run_binary_op, \n run_prepost_op: run_prepost_op, \n run_typeof_value: run_typeof_value, \n run_unary_op: run_unary_op, \n create_new_function_in: create_new_function_in, \n init_object: init_object, \n run_array_element_list: run_array_element_list, \n init_array: init_array, \n run_var_decl_item: run_var_decl_item, \n run_var_decl: run_var_decl, \n run_list_expr: run_list_expr, \n run_block: run_block, \n run_binary_op_and: run_binary_op_and, \n run_binary_op_or: run_binary_op_or, \n run_expr_binary_op: run_expr_binary_op, \n run_expr_access: run_expr_access, \n run_expr_assign: run_expr_assign, \n run_expr_function: run_expr_function, \n entering_eval_code: entering_eval_code, \n run_eval: run_eval, \n run_expr_call: run_expr_call, \n run_expr_conditionnal: run_expr_conditionnal, \n run_expr_new: run_expr_new, \n run_stat_label: run_stat_label, \n run_stat_with: run_stat_with, \n run_stat_if: run_stat_if, \n run_stat_while: run_stat_while, \n run_stat_switch_end: run_stat_switch_end, \n run_stat_switch_no_default: run_stat_switch_no_default, \n run_stat_switch_with_default_default: run_stat_switch_with_default_default, \n run_stat_switch_with_default_B: run_stat_switch_with_default_B, \n run_stat_switch_with_default_A: run_stat_switch_with_default_A, \n run_stat_switch: run_stat_switch, \n run_stat_do_while: run_stat_do_while, \n run_stat_try: run_stat_try, \n run_stat_throw: run_stat_throw, \n run_stat_return: run_stat_return, \n run_stat_for_loop: run_stat_for_loop, \n run_stat_for: run_stat_for, \n run_stat_for_var: run_stat_for_var, \n run_expr: run_expr, \n run_stat: run_stat, \n run_elements: run_elements, \n run_prog: run_prog, \n push: push, \n run_object_is_sealed: run_object_is_sealed, \n run_object_seal: run_object_seal, \n run_object_freeze: run_object_freeze, \n run_object_is_frozen: run_object_is_frozen, \n run_get_args_for_apply: run_get_args_for_apply, \n valueToStringForJoin: valueToStringForJoin, \n run_array_join_elements: run_array_join_elements, \n run_call_prealloc: run_call_prealloc, \n run_call: run_call, \n run_javascript_from_state: run_javascript_from_state, \n run_javascript_from_result: run_javascript_from_result, \n run_javascript: run_javascript};\n})();\n'}, + +/* --------------------- JsInterpreter.pseudo --------------------- */ + { file: 'JsInterpreter.pseudo', contents: 'var JsInterpreter = (function() {\nwith (Datatypes) {\nwith (JsCommon) {\nwith (JsCommonAux) {\nwith (JsInit) {\nwith (JsInterpreterMonads) {\nwith (JsPreliminary) {\nwith (JsSyntax) {\nwith (JsSyntaxAux) {\nwith (LibList) {\nwith (LibOption) {\nwith (LibProd) {\nwith (Shared) {\n\nvar convert_number_to_bool = function (n) {\n if ((JsNumber.isposzero(n) || (JsNumber.isnegzero(n) || JsNumber.isnan(n)))) {\n return (false);\n } else {\n return (true);\n }\n};\n\n\n\nvar convert_string_to_bool = function (s) {\n if (string_eq(s, "")) {\n return (false);\n } else {\n return (true);\n }\n};\n\n\n\nvar convert_prim_to_boolean = function (_foo_) {\n switch (_foo_) {\n case Coq_prim_undef:\n return (false);\n case Coq_prim_null:\n return (false);\n case Coq_prim_bool(b):\n return (b);\n case Coq_prim_number(n):\n return (convert_number_to_bool(n));\n case Coq_prim_string(s):\n return (convert_string_to_bool(s));\n }\n \n};\n\n\n\nvar convert_value_to_boolean = function (_foo_) {\n switch (_foo_) {\n case Coq_value_prim(p):\n return (convert_prim_to_boolean(p));\n case Coq_value_object(o):\n return (true);\n }\n \n};\n\n\n\nvar convert_prim_to_number = function (_foo_) {\n switch (_foo_) {\n case Coq_prim_undef:\n return (JsNumber.nan);\n case Coq_prim_null:\n return (JsNumber.zero);\n case Coq_prim_bool(b):\n if (b) {\n return (JsNumber.one);\n } else {\n return (JsNumber.zero);\n }\n case Coq_prim_number(n):\n return (n);\n case Coq_prim_string(s):\n return (JsNumber.from_string(s));\n }\n \n};\n\n\n\nvar convert_number_to_integer = function (n) {\n if (JsNumber.isnan(n)) {\n return (JsNumber.zero);\n } else {\n if ((JsNumber.isposzero(n)\n || (JsNumber.isnegzero(n)\n || ((n === JsNumber.infinity) || (n === JsNumber.neg_infinity))))) {\n return (n);\n } else {\n return ((JsNumber.sign(n) * JsNumber.floor(JsNumber.absolute(n))));\n }\n }\n};\n\n\n\nvar convert_bool_to_string = function (_foo_) {\n switch (_foo_) {\n case true:\n return ("true");\n case false:\n return ("false");\n }\n \n};\n\n\n\nvar convert_prim_to_string = function (_foo_) {\n switch (_foo_) {\n case Coq_prim_undef:\n return ("undefined");\n case Coq_prim_null:\n return ("null");\n case Coq_prim_bool(b):\n return (convert_bool_to_string(b));\n case Coq_prim_number(n):\n return (JsNumber.to_string(n));\n case Coq_prim_string(s):\n return (s);\n }\n \n};\n\n\n\nvar equality_test_for_same_type = function (ty, v1, v2) {\n switch (ty) {\n case Coq_type_undef:\n return (true);\n case Coq_type_null:\n return (true);\n case Coq_type_bool:\n return (value_compare(v1, v2));\n case Coq_type_number:\n switch (v1) {\n case Coq_value_prim(p):\n switch (p) {\n case Coq_prim_undef:\n return (false);\n case Coq_prim_null:\n return (false);\n case Coq_prim_bool(b):\n return (false);\n case Coq_prim_number(n1):\n switch (v2) {\n case Coq_value_prim(p0):\n switch (p0) {\n case Coq_prim_undef:\n return (false);\n case Coq_prim_null:\n return (false);\n case Coq_prim_bool(b):\n return (false);\n case Coq_prim_number(n2):\n if (JsNumber.isnan(n1)) {\n return (false);\n } else {\n if (JsNumber.isnan(n2)) {\n return (false);\n } else {\n if ((JsNumber.isposzero(n1)\n && JsNumber.isnegzero(n2))) {\n return (true);\n } else {\n if ((JsNumber.isnegzero(n1)\n && JsNumber.isposzero(n2))) {\n return (true);\n } else {\n return ((n1 === n2));\n }\n }\n }\n }\n case Coq_prim_string(s):\n return (false);\n }\n \n case Coq_value_object(o):\n return (false);\n }\n \n case Coq_prim_string(s):\n return (false);\n }\n \n case Coq_value_object(o):\n return (false);\n }\n \n case Coq_type_string:\n return (value_compare(v1, v2));\n case Coq_type_object:\n return (value_compare(v1, v2));\n }\n \n};\n\n\n\nvar strict_equality_test = function (v1, v2) {\n var ty1 = type_of(v1);\n var ty2 = type_of(v2);\n if (type_compare(ty1, ty2)) {\n return (equality_test_for_same_type(ty1, v1, v2));\n } else {\n return (false);\n }\n};\n\n\n\nvar inequality_test_number = function (n1, n2) {\n if ((JsNumber.isnan(n1) || JsNumber.isnan(n2))) {\n return (Prim_undef);\n } else {\n if ((n1 === n2)) {\n return (false);\n } else {\n if ((JsNumber.isposzero(n1) && JsNumber.isnegzero(n2))) {\n return (false);\n } else {\n if ((JsNumber.isnegzero(n1) && JsNumber.isposzero(n2))) {\n return (false);\n } else {\n if ((n1 === JsNumber.infinity)) {\n return (false);\n } else {\n if ((n2 === JsNumber.infinity)) {\n return (true);\n } else {\n if ((n2 === JsNumber.neg_infinity)) {\n return (false);\n } else {\n if ((n1 === JsNumber.neg_infinity)) {\n return (true);\n } else {\n return ((n1 < n2));\n }\n }\n }\n }\n }\n }\n }\n }\n};\n\n\n\nvar inequality_test_string = function (s1, s2) {\n return (string_lt(s1, s2));\n};\n\n\n\nvar inequality_test_primitive = function (w1, w2) {\n switch (w1) {\n case Coq_prim_undef:\n return (\n inequality_test_number(convert_prim_to_number(w1),\n convert_prim_to_number(w2)));\n case Coq_prim_null:\n return (\n inequality_test_number(convert_prim_to_number(w1),\n convert_prim_to_number(w2)));\n case Coq_prim_bool(b):\n return (\n inequality_test_number(convert_prim_to_number(w1),\n convert_prim_to_number(w2)));\n case Coq_prim_number(n):\n return (\n inequality_test_number(convert_prim_to_number(w1),\n convert_prim_to_number(w2)));\n case Coq_prim_string(s1):\n switch (w2) {\n case Coq_prim_undef:\n return (\n inequality_test_number(convert_prim_to_number(w1),\n convert_prim_to_number(w2)));\n case Coq_prim_null:\n return (\n inequality_test_number(convert_prim_to_number(w1),\n convert_prim_to_number(w2)));\n case Coq_prim_bool(b):\n return (\n inequality_test_number(convert_prim_to_number(w1),\n convert_prim_to_number(w2)));\n case Coq_prim_number(n):\n return (\n inequality_test_number(convert_prim_to_number(w1),\n convert_prim_to_number(w2)));\n case Coq_prim_string(s2):\n return (inequality_test_string(s1, s2));\n }\n \n }\n \n};\n\n\n\nvar typeof_prim = function (_foo_) {\n switch (_foo_) {\n case Coq_prim_undef:\n return ("undefined");\n case Coq_prim_null:\n return ("object");\n case Coq_prim_bool(b):\n return ("boolean");\n case Coq_prim_number(n):\n return ("number");\n case Coq_prim_string(s):\n return ("string");\n }\n \n};\n\n\n\nvar string_of_propname = function (_foo_) {\n switch (_foo_) {\n case Coq_propname_identifier(s):\n return (s);\n case Coq_propname_string(s):\n return (s);\n case Coq_propname_number(n):\n return (JsNumber.to_string(n));\n }\n \n};\n\n\n\nvar build_error = function (vproto, vmsg) {\n var o = object_new(vproto, "Error");\n var (l, s_2) = object_alloc(o);\n if (value_compare(vmsg, Prim_undef)) {\n return (l);\n } else {\n return (\n function (s) {\n Debug.not_yet_implemented_because(__LOC__, s);\n return (Result_not_yet_implemented);}(\n "Need [to_string] (this function shall be put in [runs_type].)"));\n }\n};\n\n\n\nvar run_error = function (ne) {\n var%object l = build_error(Prealloc_native_error_proto(ne), Prim_undef);\n return (Result_some(Specret_out(res_throw(l))));\n};\n\n\n\nvar out_error_or_void = function (str, ne) {\n if (str) {\n return (run_error(ne));\n } else {\n return (out_void());\n }\n};\n\n\n\nvar out_error_or_cst = function (str, ne, v) {\n if (str) {\n return (run_error(ne));\n } else {\n return (v);\n }\n};\n\n\n\nvar run_object_method = function (proj, l) {\n return (LibOption.map(proj, object_binds_pickable_option(l)));\n};\n\n\n\nvar run_object_heap_set_extensible = function (b, l) {\n return (\n LibOption.map(function (o) {\n return (object_write(l, object_set_extensible(o, b)));},\n object_binds_pickable_option(l)));\n};\n\n\n\nvar object_has_prop = function (l, x) {\n var%some b = run_object_method(object_has_prop_, l);\n switch (b) {\n case Coq_builtin_has_prop_default:\n var%run d = run_object_get_prop(l, x);\n return (!(full_descriptor_compare(d, Full_descriptor_undef)));\n }\n \n};\n\nvar object_get_builtin = function (b, vthis, l, x) {\n var def = function (l0) {\n var%run d = run_object_get_prop(l0, x);\n switch (d) {\n case Coq_full_descriptor_undef:\n return (Prim_undef);\n case Coq_full_descriptor_some(a):\n switch (a) {\n case Coq_attributes_data_of(ad):\n return (ad.attributes_data_value);\n case Coq_attributes_accessor_of(aa):\n switch (aa.attributes_accessor_get) {\n case Coq_value_prim(p):\n switch (p) {\n case Coq_prim_undef:\n return (Prim_undef);\n case Coq_prim_null:\n return (Result_impossible);\n case Coq_prim_bool(b0):\n return (Result_impossible);\n case Coq_prim_number(n):\n return (Result_impossible);\n case Coq_prim_string(s2):\n return (Result_impossible);\n }\n \n case Coq_value_object(lf):\n return (run_call(lf, vthis, mk_nil));\n }\n \n }\n \n }\n \n };\n var function0 = function () {\n var%value v = def(l);\n if (spec_function_get_error_case_dec(x, v)) {\n return (run_error(Native_error_type));\n } else {\n return (v);\n }\n };\n switch (b) {\n case Coq_builtin_get_default:\n return (def(l));\n case Coq_builtin_get_function:\n return (function0());\n case Coq_builtin_get_args_obj:\n var%some lmapo = run_object_method(object_parameter_map_, l);\n var%some lmap = lmapo;\n var%run d = run_object_get_own_prop(lmap, x);\n switch (d) {\n case Coq_full_descriptor_undef:\n return (function0());\n case Coq_full_descriptor_some(a):\n return (run_object_get(lmap, x));\n }\n \n }\n \n};\n\nvar run_object_get = function (l, x) {\n var%some b = run_object_method(object_get_, l);\n return (object_get_builtin(b, l, l, x));\n};\n\nvar run_object_get_prop = function (l, x) {\n var%some b = run_object_method(object_get_prop_, l);\n switch (b) {\n case Coq_builtin_get_prop_default:\n var%run d = run_object_get_own_prop(l, x);\n if (full_descriptor_compare(d, Full_descriptor_undef)) {\n var%some proto = run_object_method(object_proto_, l);\n switch (proto) {\n case Coq_value_prim(p):\n switch (p) {\n case Coq_prim_null:\n return (Full_descriptor_undef);\n default:\n return (\n function (m) {\n Debug.impossible_with_heap_because(__LOC__, m);\n return (Result_impossible);}(\n "Found a non-null primitive value as a prototype in [run_object_get_prop]."));\n }\n \n case Coq_value_object(lproto):\n return (run_object_get_prop(lproto, x));\n }\n \n } else {\n return (d);\n }\n }\n \n};\n\nvar object_proto_is_prototype_of = function (l0, l) {\n var%some b = run_object_method(object_proto_, l);\n switch (b) {\n case Coq_value_prim(p):\n switch (p) {\n case Coq_prim_null:\n return (false);\n default:\n return (\n function (m) {\n Debug.impossible_with_heap_because(__LOC__, m);\n return (Result_impossible);}(\n "[run_object_method] returned a primitive in [object_proto_is_prototype_of_body]."));\n }\n \n case Coq_value_object(l_2):\n if (object_loc_compare(l_2, l0)) {\n return (true);\n } else {\n return (object_proto_is_prototype_of(l0, l_2));\n }\n }\n \n};\n\nvar object_default_value = function (l, prefo) {\n var%some b = run_object_method(object_default_value_, l);\n switch (b) {\n case Coq_builtin_default_value_default:\n var gpref = unsome_default(Preftype_number, prefo);\n var lpref = other_preftypes(gpref);\n var sub0 = function (x, k) {\n var%value vfo = run_object_get(l, x);\n var%some co = run_callable(vfo);\n switch (co) {\n case Some(b0):\n var%object lfunc = vfo;\n var%value v = run_call(lfunc, l, mk_nil);\n switch (v) {\n case Coq_value_prim(w):\n return (w);\n case Coq_value_object(l0):\n return (k());\n }\n \n case None:\n return (k());\n }\n \n };\n var gmeth = method_of_preftype(gpref);\n return (\n sub0(gmeth, function () {\n var lmeth = method_of_preftype(lpref);\n return (\n sub0(lmeth, function () {\n return (run_error(Native_error_type));}));}));\n }\n \n};\n\nvar to_primitive = function (v, prefo) {\n switch (v) {\n case Coq_value_prim(w):\n return (w);\n case Coq_value_object(l):\n var%prim r = object_default_value(l, prefo);\n return (r);\n }\n \n};\n\nvar to_number = function (_foo_) {\n switch (_foo_) {\n case Coq_value_prim(w):\n return (convert_prim_to_number(w));\n case Coq_value_object(l):\n var%prim w = to_primitive(l, Some(Preftype_number));\n return (convert_prim_to_number(w));\n }\n \n};\n\nvar to_integer = function (v) {\n var%number n = to_number(v);\n return (convert_number_to_integer(n));\n};\n\nvar to_int32 = function (v) {\n var%number n = to_number(v);\n return (JsNumber.to_int32(n));\n};\n\nvar to_uint32 = function (v) {\n var%number n = to_number(v);\n return (JsNumber.to_uint32(n));\n};\n\nvar to_string = function (_foo_) {\n switch (_foo_) {\n case Coq_value_prim(w):\n return (convert_prim_to_string(w));\n case Coq_value_object(l):\n var%prim w = to_primitive(l, Some(Preftype_string));\n return (convert_prim_to_string(w));\n }\n \n};\n\nvar object_can_put = function (l, x) {\n var%some b = run_object_method(object_can_put_, l);\n switch (b) {\n case Coq_builtin_can_put_default:\n var%run d = run_object_get_own_prop(l, x);\n switch (d) {\n case Coq_full_descriptor_undef:\n var%some vproto = run_object_method(object_proto_, l);\n switch (vproto) {\n case Coq_value_prim(p):\n switch (p) {\n case Coq_prim_null:\n var%some b0 = run_object_method(object_extensible_, l);\n return (b0);\n default:\n return (\n function (m) {\n Debug.impossible_with_heap_because(__LOC__, m);\n return (Result_impossible);}(\n "Non-null primitive get as a prototype value in [object_can_put]."));\n }\n \n case Coq_value_object(lproto):\n var%run d_2 = run_object_get_prop(lproto, x);\n switch (d_2) {\n case Coq_full_descriptor_undef:\n var%some b0 = run_object_method(object_extensible_, l);\n return (b0);\n case Coq_full_descriptor_some(a):\n switch (a) {\n case Coq_attributes_data_of(ad):\n var%some ext = run_object_method(object_extensible_, l);\n return (\n (function () {\n if (ext) {\n return (ad.attributes_data_writable);\n } else {\n return (false);\n }\n }())\n );\n case Coq_attributes_accessor_of(aa):\n return (\n !(\n value_compare(aa.attributes_accessor_set,\n Prim_undef)));\n }\n \n }\n \n }\n \n case Coq_full_descriptor_some(a):\n switch (a) {\n case Coq_attributes_data_of(ad):\n return (ad.attributes_data_writable);\n case Coq_attributes_accessor_of(aa):\n return (\n !(value_compare(aa.attributes_accessor_set, Prim_undef)));\n }\n \n }\n \n }\n \n};\n\nvar run_object_define_own_prop_array_loop = function (l, newLen, oldLen, newLenDesc, newWritable, throwcont, def) {\n if ((newLen < oldLen)) {\n var oldLen_2 = (oldLen - 1.);\n var%string slen = to_string(oldLen_2);\n var%bool deleteSucceeded = object_delete(l, slen, false);\n if (!(deleteSucceeded)) {\n var newLenDesc0 = descriptor_with_value(newLenDesc,\n Some((oldLen_2 + 1.)));\n if (!(newWritable)) {\n var newLenDesc1 = descriptor_with_writable(newLenDesc0, Some(false));\n } else {\n var newLenDesc1 = newLenDesc0;\n }\n var%bool x = def("length", newLenDesc1, false);\n return (out_error_or_cst(throwcont, Native_error_type, false));\n } else {\n return (\n run_object_define_own_prop_array_loop(l, newLen, oldLen_2,\n newLenDesc, newWritable, throwcont, def));\n }\n } else {\n if (!(newWritable)) {\n return (\n def("length", {\n descriptor_value: None,\n descriptor_writable: Some(false),\n descriptor_get: None,\n descriptor_set: None,\n descriptor_enumerable: None,\n descriptor_configurable: None}, false));\n } else {\n return (true);\n }\n }\n};\n\nvar object_define_own_prop = function (l, x, desc, throwcont) {\n var reject = function (throwcont0) {\n return (out_error_or_cst(throwcont0, Native_error_type, false));\n };\n var def = function (x0, desc0, throwcont0) {\n var%run d = run_object_get_own_prop(l, x0);\n var%some ext = run_object_method(object_extensible_, l);\n switch (d) {\n case Coq_full_descriptor_undef:\n if (ext) {\n if ((descriptor_is_generic_dec(desc0)\n || descriptor_is_data_dec(desc0))) {\n var a = attributes_data_of_descriptor(desc0);\n } else {\n var a = attributes_accessor_of_descriptor(desc0);\n }\n var%some _ = object_heap_map_properties_pickable_option(l,\n function (p) { return (HeapStr.write(p, x0, a));});\n return (true);\n } else {\n return (reject(throwcont0));\n }\n case Coq_full_descriptor_some(a):\n var object_define_own_prop_write = function (a0) {\n var a_2 = attributes_update(a0, desc0);\n var%some _ = object_heap_map_properties_pickable_option(l,\n function (p) { return (HeapStr.write(p, x0, a_2));});\n return (true);\n };\n if (descriptor_contains_dec(descriptor_of_attributes(a), desc0)) {\n return (true);\n } else {\n if (attributes_change_enumerable_on_non_configurable_dec(a, desc0)) {\n return (reject(throwcont0));\n } else {\n if (descriptor_is_generic_dec(desc0)) {\n return (object_define_own_prop_write(a));\n } else {\n if (!(\n bool_eq(attributes_is_data_dec(a),\n descriptor_is_data_dec(desc0)))) {\n if (attributes_configurable(a)) {\n switch (a) {\n case Coq_attributes_data_of(ad):\n var a_2 = attributes_accessor_of_attributes_data(ad);\n break;\n case Coq_attributes_accessor_of(aa):\n var a_2 = attributes_data_of_attributes_accessor(aa);\n break;\n }\n \n var%some _ = object_heap_map_properties_pickable_option(l,\n function (p) {\n return (HeapStr.write(p, x0, a_2));});\n return (object_define_own_prop_write(a_2));\n } else {\n return (reject(throwcont0));\n }\n } else {\n if ((attributes_is_data_dec(a)\n && descriptor_is_data_dec(desc0))) {\n switch (a) {\n case Coq_attributes_data_of(ad):\n if (attributes_change_data_on_non_configurable_dec(ad,\n desc0)) {\n return (reject(throwcont0));\n } else {\n return (object_define_own_prop_write(a));\n }\n case Coq_attributes_accessor_of(a0):\n return (\n function (m) {\n Debug.impossible_with_heap_because(__LOC__, m);\n return (Result_impossible);}(\n "data is not accessor in [defineOwnProperty]"));\n }\n \n } else {\n if ((!(attributes_is_data_dec(a))\n && descriptor_is_accessor_dec(desc0))) {\n switch (a) {\n case Coq_attributes_data_of(a0):\n return (\n function (m) {\n Debug.impossible_with_heap_because(__LOC__, m);\n return (Result_impossible);}(\n "accessor is not data in [defineOwnProperty]"));\n case Coq_attributes_accessor_of(aa):\n if (attributes_change_accessor_on_non_configurable_dec(\n aa, desc0)) {\n return (reject(throwcont0));\n } else {\n return (object_define_own_prop_write(a));\n }\n }\n \n } else {\n return (\n function (m) {\n Debug.impossible_with_heap_because(__LOC__, m);\n return (Result_impossible);}(\n "cases are mutually exclusives in [defineOwnProperty]"));\n }\n }\n }\n }\n }\n }\n }\n \n };\n var%some b = run_object_method(object_define_own_prop_, l);\n switch (b) {\n case Coq_builtin_define_own_prop_default:\n return (def(x, desc, throwcont));\n case Coq_builtin_define_own_prop_array:\n var%run d = run_object_get_own_prop(l, "length");\n switch (d) {\n case Coq_full_descriptor_undef:\n return (\n function (m) {\n Debug.impossible_with_heap_because(__LOC__, m);\n return (Result_impossible);}(\n "Array length property descriptor cannot be undefined."));\n case Coq_full_descriptor_some(attr):\n switch (attr) {\n case Coq_attributes_data_of(a):\n var oldLen = a.attributes_data_value;\n switch (oldLen) {\n case Coq_value_prim(w):\n var oldLen0 = JsNumber.to_uint32(convert_prim_to_number(w));\n var descValueOpt = desc.descriptor_value;\n if (string_eq(x, "length")) {\n switch (descValueOpt) {\n case Some(descValue):\n var%run newLen = to_uint32(descValue);\n var%number newLenN = to_number(descValue);\n if (!((newLen === newLenN))) {\n return (run_error(Native_error_range));\n } else {\n var newLenDesc = descriptor_with_value(desc,\n Some(newLen));\n if (le_int_decidable(oldLen0, newLen)) {\n return (def("length", newLenDesc, throwcont));\n } else {\n if (!(a.attributes_data_writable)) {\n return (reject(throwcont));\n } else {\n switch (newLenDesc.descriptor_writable) {\n case Some(b0):\n if (b0) {\n var newWritable = true;\n } else {\n var newWritable = false;\n }\n break;\n case None:\n var newWritable = true;\n break;\n }\n \n if (!(newWritable)) {\n var newLenDesc0 = descriptor_with_writable(\n newLenDesc, Some(true));\n } else {\n var newLenDesc0 = newLenDesc;\n }\n var%bool succ = def("length", newLenDesc0,\n throwcont);\n if (!(succ)) {\n return (false);\n } else {\n return (\n run_object_define_own_prop_array_loop(l,\n newLen, oldLen0, newLenDesc0,\n newWritable, throwcont, def));\n }\n }\n }\n }\n case None:\n return (def("length", desc, throwcont));\n }\n \n } else {\n var%run ilen = to_uint32(x);\n var%string slen = to_string(ilen);\n if ((string_eq(x, slen) && !((ilen == 4294967295.)))) {\n var%run index = to_uint32(x);\n if ((le_int_decidable(oldLen0, index)\n && !(a.attributes_data_writable))) {\n return (reject(throwcont));\n } else {\n var%bool b0 = def(x, desc, false);\n if (!(b0)) {\n return (reject(throwcont));\n } else {\n if (le_int_decidable(oldLen0, index)) {\n var a0 = descriptor_with_value(\n descriptor_of_attributes(a),\n Some((index + 1.)));\n return (def("length", a0, false));\n } else {\n return (true);\n }\n }\n }\n } else {\n return (def(x, desc, throwcont));\n }\n }\n case Coq_value_object(l0):\n return (\n function (m) {\n Debug.impossible_with_heap_because(__LOC__, m);\n return (Result_impossible);}(\n "Spec asserts length of array is number."));\n }\n \n case Coq_attributes_accessor_of(a):\n return (\n function (m) {\n Debug.impossible_with_heap_because(__LOC__, m);\n return (Result_impossible);}(\n "Array length property descriptor cannot be accessor."));\n }\n \n }\n \n case Coq_builtin_define_own_prop_args_obj:\n var%some lmapo = run_object_method(object_parameter_map_, l);\n var%some lmap = lmapo;\n var%run d = run_object_get_own_prop(lmap, x);\n var%bool b0 = def(x, desc, false);\n if (b0) {\n var follow = function () {\n return (true);\n };\n switch (d) {\n case Coq_full_descriptor_undef:\n return (follow());\n case Coq_full_descriptor_some(a):\n if (descriptor_is_accessor_dec(desc)) {\n var%bool x0 = object_delete(lmap, x, false);\n return (follow());\n } else {\n var follow0 = function () {\n if (option_compare(bool_eq, desc.descriptor_writable,\n Some(false))) {\n var%bool x0 = object_delete(lmap, x, false);\n return (follow());\n } else {\n return (follow());\n }\n };\n switch (desc.descriptor_value) {\n case Some(v):\n var%void _ = object_put(lmap, x, v, throwcont);\n return (follow0());\n case None:\n return (follow0());\n }\n \n }\n }\n \n } else {\n return (reject(throwcont));\n }\n }\n \n};\n\nvar run_to_descriptor = function (_foo_) {\n switch (_foo_) {\n case Coq_value_prim(p):\n return (throw_result(run_error(Native_error_type)));\n case Coq_value_object(l):\n var sub0 = function (desc, name, conv, k) {\n var%bool has = object_has_prop(l, name);\n if (!(has)) {\n return (k(desc));\n } else {\n var%value v0 = run_object_get(l, name);\n var%run r = conv(v0, desc);\n return (k(r));\n }\n };\n return (\n sub0(descriptor_intro_empty, "enumerable", function (v1, desc) {\n var b = convert_value_to_boolean(v1);\n return (descriptor_with_enumerable(desc, Some(b)));},\n function (desc) {\n return (\n sub0(desc, "configurable", function (v2, desc0) {\n var b = convert_value_to_boolean(v2);\n return (descriptor_with_configurable(desc0, Some(b)));},\n function (desc0) {\n return (\n sub0(desc0, "value", function (v3, desc1) {\n return (descriptor_with_value(desc1, Some(v3)));},\n function (desc1) {\n return (\n sub0(desc1, "writable", function (v4, desc2) {\n var b = convert_value_to_boolean(v4);\n return (\n descriptor_with_writable(desc2, Some(b)));},\n function (desc2) {\n return (\n sub0(desc2, "get", function (v5, desc3) {\n if ((!(is_callable_dec(v5))\n && !(value_compare(v5, Prim_undef)))) {\n return (\n throw_result(\n run_error(Native_error_type)));\n } else {\n return (\n descriptor_with_get(desc3, Some(v5)));\n }}, function (desc3) {\n return (\n sub0(desc3, "set",\n function (v6, desc4) {\n if ((!(is_callable_dec(v6))\n && !(\n value_compare(v6,\n Prim_undef)))) {\n return (\n throw_result(\n run_error(Native_error_type)));\n } else {\n return (\n descriptor_with_set(desc4,\n Some(v6)));\n }}, function (desc4) {\n if (((!(\n option_compare(\n value_compare,\n desc4.descriptor_get,\n None))\n || !(\n option_compare(\n value_compare,\n desc4.descriptor_set,\n None)))\n && (!(\n option_compare(\n value_compare,\n desc4.descriptor_value,\n None))\n || !(\n option_compare(bool_eq,\n desc4.descriptor_writable,\n None))))) {\n return (\n throw_result(\n run_error(Native_error_type)));\n } else {\n return (desc4);\n }}));}));}));}));}));}));\n }\n \n};\n\nvar prim_new_object = function (_foo_) {\n switch (_foo_) {\n case Coq_prim_bool(b):\n return (\n (function () {\n var o1 = object_new(Prealloc_bool_proto, "Boolean");\n var o = object_with_primitive_value(o1, b);\n var (l, s1) = object_alloc(o);\n return (l);\n }())\n );\n case Coq_prim_number(n):\n return (\n (function () {\n var o1 = object_new(Prealloc_number_proto, "Number");\n var o = object_with_primitive_value(o1, n);\n var (l, s1) = object_alloc(o);\n return (l);\n }())\n );\n case Coq_prim_string(s0):\n var o2 = object_new(Prealloc_string_proto, "String");\n var o1 = object_with_get_own_property(o2, Builtin_get_own_prop_string);\n var o = object_with_primitive_value(o1, s0);\n var (l, s1) = object_alloc(o);\n var%some _ = object_heap_map_properties_pickable_option(l,\n function (p) {\n return (\n HeapStr.write(p, "length",\n attributes_data_intro_constant(strlength(s0))));});\n return (l);\n default:\n return (\n function (m) {\n Debug.impossible_with_heap_because(__LOC__, m);\n return (Result_impossible);}(\n "[prim_new_object] received an null or undef."));\n }\n \n};\n\nvar to_object = function (_foo_) {\n switch (_foo_) {\n case Coq_value_prim(w):\n switch (w) {\n case Coq_prim_undef:\n return (run_error(Native_error_type));\n case Coq_prim_null:\n return (run_error(Native_error_type));\n case Coq_prim_bool(b):\n return (prim_new_object(w));\n case Coq_prim_number(n):\n return (prim_new_object(w));\n case Coq_prim_string(s0):\n return (prim_new_object(w));\n }\n \n case Coq_value_object(l):\n return (l);\n }\n \n};\n\nvar run_object_prim_value = function (l) {\n var%some ov = run_object_method(object_prim_value_, l);\n var%some v = ov;\n return (v);\n};\n\nvar prim_value_get = function (v, x) {\n var%object l = to_object(v);\n return (object_get_builtin(Builtin_get_default, v, l, x));\n};\n\nvar env_record_has_binding = function (l, x) {\n var%some e = env_record_binds_pickable_option(l);\n switch (e) {\n case Coq_env_record_decl(ed):\n return (HeapStr.indom_dec(ed, x));\n case Coq_env_record_object(l0, pt):\n return (object_has_prop(l0, x));\n }\n \n};\n\nvar lexical_env_get_identifier_ref = function (x, x0, str) {\n switch (x) {\n case []:\n return (ref_create_value(Prim_undef, x0, str));\n case (l::x_2):\n var%bool has = env_record_has_binding(l, x0);\n if (has) {\n return (ref_create_env_loc(l, x0, str));\n } else {\n return (lexical_env_get_identifier_ref(x_2, x0, str));\n }\n }\n \n};\n\nvar object_delete_default = function (l, x, str) {\n var%run d = run_object_get_own_prop(l, x);\n switch (d) {\n case Coq_full_descriptor_undef:\n return (true);\n case Coq_full_descriptor_some(a):\n if (attributes_configurable(a)) {\n var%some _ = object_heap_map_properties_pickable_option(l,\n function (p) { return (HeapStr.rem(p, x));});\n return (true);\n } else {\n return (out_error_or_cst(str, Native_error_type, false));\n }\n }\n \n};\n\nvar object_delete = function (l, x, str) {\n var%some b = run_object_method(object_delete_, l);\n switch (b) {\n case Coq_builtin_delete_default:\n return (object_delete_default(l, x, str));\n case Coq_builtin_delete_args_obj:\n var%some mo = run_object_method(object_parameter_map_, l);\n var%some m = mo;\n var%run d = run_object_get_own_prop(m, x);\n var%bool b0 = object_delete_default(l, x, str);\n if (b0) {\n switch (d) {\n case Coq_full_descriptor_undef:\n return (b0);\n case Coq_full_descriptor_some(a):\n var%bool b_2 = object_delete(m, x, false);\n return (b0);\n }\n \n } else {\n return (b0);\n }\n }\n \n};\n\nvar env_record_delete_binding = function (l, x) {\n var%some e = env_record_binds_pickable_option(l);\n switch (e) {\n case Coq_env_record_decl(ed):\n switch (HeapStr.read_option(ed, x)) {\n case Some(p):\n var (mu, v) = p;\n switch (mu) {\n case Coq_mutability_uninitialized_immutable:\n return (false);\n case Coq_mutability_immutable:\n return (false);\n case Coq_mutability_nondeletable:\n return (false);\n case Coq_mutability_deletable:\n var s_2 = env_record_write(l, decl_env_record_rem(ed, x));\n return (true);\n }\n \n case None:\n return (true);\n }\n \n case Coq_env_record_object(l0, pt):\n return (object_delete(l0, x, throw_false));\n }\n \n};\n\nvar env_record_implicit_this_value = function (l) {\n return (\n ifx_some_or_default(env_record_binds_pickable_option(l), None,\n function (e) {\n return (\n Some((function () {\n switch (e) {\n case Coq_env_record_decl(ed):\n return (Prim_undef);\n case Coq_env_record_object(l0, provide_this):\n if (provide_this) {\n return (l0);\n } else {\n return (Prim_undef);\n }\n }\n }())));}));\n};\n\nvar identifier_resolution = function (x) {\n var x0 = c.execution_ctx_lexical_env;\n var str = c.execution_ctx_strict;\n return (lexical_env_get_identifier_ref(x0, x, str));\n};\n\nvar env_record_get_binding_value = function (l, x, str) {\n var%some e = env_record_binds_pickable_option(l);\n switch (e) {\n case Coq_env_record_decl(ed):\n var%some rm = HeapStr.read_option(ed, x);\n var (mu, v) = rm;\n if (mutability_compare(mu, Mutability_uninitialized_immutable)) {\n return (out_error_or_cst(str, Native_error_ref, Prim_undef));\n } else {\n return (v);\n }\n case Coq_env_record_object(l0, pt):\n var%bool has = object_has_prop(l0, x);\n if (has) {\n return (run_object_get(l0, x));\n } else {\n return (out_error_or_cst(str, Native_error_ref, Prim_undef));\n }\n }\n \n};\n\nvar ref_get_value = function (_foo_) {\n switch (_foo_) {\n case Coq_resvalue_empty:\n return (\n function (m) {\n Debug.impossible_with_heap_because(__LOC__, m);\n return (Result_impossible);}(\n "[ref_get_value] received an empty result."));\n case Coq_resvalue_value(v):\n return (v);\n case Coq_resvalue_ref(r):\n var for_base_or_object = function (tt) {\n switch (r.ref_base) {\n case Coq_ref_base_type_value(v):\n if (ref_kind_comparable(ref_kind_of(r), Ref_kind_primitive_base)) {\n var%value v = prim_value_get(v, r.ref_name);\n return (v);\n } else {\n switch (v) {\n case Coq_value_prim(p):\n return (\n function (m) {\n Debug.impossible_with_heap_because(__LOC__, m);\n return (Result_impossible);}(\n "[ref_get_value] received a primitive value whose kind is not primitive."));\n case Coq_value_object(l):\n var%value v = run_object_get(l, r.ref_name);\n return (v);\n }\n \n }\n case Coq_ref_base_type_env_loc(l):\n return (\n function (m) {\n Debug.impossible_with_heap_because(__LOC__, m);\n return (Result_impossible);}(\n "[ref_get_value] received a reference to a value whose base type is an environnment record."));\n }\n \n };\n switch (ref_kind_of(r)) {\n case Coq_ref_kind_null:\n return (\n function (m) {\n Debug.impossible_with_heap_because(__LOC__, m);\n return (Result_impossible);}(\n "[ref_get_value] received a reference whose base is [null]."));\n case Coq_ref_kind_undef:\n return (throw_result(run_error(Native_error_ref)));\n case Coq_ref_kind_primitive_base:\n return (for_base_or_object({}));\n case Coq_ref_kind_object:\n return (for_base_or_object({}));\n case Coq_ref_kind_env_record:\n switch (r.ref_base) {\n case Coq_ref_base_type_value(v):\n return (\n function (m) {\n Debug.impossible_with_heap_because(__LOC__, m);\n return (Result_impossible);}(\n "[ref_get_value] received a reference to an environnment record whose base type is a value."));\n case Coq_ref_base_type_env_loc(l):\n var%value v = env_record_get_binding_value(l, r.ref_name,\n r.ref_strict);\n return (v);\n }\n \n }\n \n }\n \n};\n\nvar run_expr_get_value = function (e) {\n var%success rv = run_expr(e);\n return (ref_get_value(rv));\n};\n\nvar object_put_complete = function (b, vthis, l, x, v, str) {\n switch (b) {\n case Coq_builtin_put_default:\n var%bool b0 = object_can_put(l, x);\n if (b0) {\n var%run d = run_object_get_own_prop(l, x);\n var follow = function (x0) {\n var%run d_2 = run_object_get_prop(l, x);\n var follow_2 = function (x1) {\n switch (vthis) {\n case Coq_value_prim(wthis):\n return (out_error_or_void(str, Native_error_type));\n case Coq_value_object(lthis):\n var desc = descriptor_intro_data(v, true, true, true);\n var%success rv = object_define_own_prop(l, x, desc, str);\n return (res_void());\n }\n \n };\n switch (d_2) {\n case Coq_full_descriptor_undef:\n return (follow_2({}));\n case Coq_full_descriptor_some(a):\n switch (a) {\n case Coq_attributes_data_of(a0):\n return (follow_2({}));\n case Coq_attributes_accessor_of(aa_2):\n switch (aa_2.attributes_accessor_set) {\n case Coq_value_prim(p):\n return (\n function (m) {\n Debug.impossible_with_heap_because(__LOC__, m);\n return (Result_impossible);}(\n "[object_put_complete] found a primitive in an `set\' accessor."));\n case Coq_value_object(lfsetter):\n var%success rv = run_call(lfsetter, vthis,\n mk_cons(v, mk_nil));\n return (res_void());\n }\n \n }\n \n }\n \n };\n switch (d) {\n case Coq_full_descriptor_undef:\n return (follow({}));\n case Coq_full_descriptor_some(a):\n switch (a) {\n case Coq_attributes_data_of(ad):\n switch (vthis) {\n case Coq_value_prim(wthis):\n return (out_error_or_void(str, Native_error_type));\n case Coq_value_object(lthis):\n var desc = {\n descriptor_value: Some(v),\n descriptor_writable: None,\n descriptor_get: None,\n descriptor_set: None,\n descriptor_enumerable: None,\n descriptor_configurable: None\n };\n var%success rv = object_define_own_prop(l, x, desc, str);\n return (res_void());\n }\n \n case Coq_attributes_accessor_of(a0):\n return (follow({}));\n }\n \n }\n \n } else {\n return (out_error_or_void(str, Native_error_type));\n }\n }\n \n};\n\nvar object_put = function (l, x, v, str) {\n var%some b = run_object_method(object_put_, l);\n return (object_put_complete(b, l, l, x, v, str));\n};\n\nvar env_record_set_mutable_binding = function (l, x, v, str) {\n var%some e = env_record_binds_pickable_option(l);\n switch (e) {\n case Coq_env_record_decl(ed):\n var%some rm = HeapStr.read_option(ed, x);\n var (mu, v_old) = rm;\n if (!(mutability_compare(mu, Mutability_immutable))) {\n return (res_void(env_record_write_decl_env(l, x, mu, v)));\n } else {\n return (out_error_or_void(str, Native_error_type));\n }\n case Coq_env_record_object(l0, pt):\n return (object_put(l0, x, v, str));\n }\n \n};\n\nvar prim_value_put = function (w, x, v, str) {\n var%object l = to_object(w);\n return (object_put_complete(Builtin_put_default, w, l, x, v, str));\n};\n\nvar ref_put_value = function (rv, v) {\n switch (rv) {\n case Coq_resvalue_empty:\n return (\n function (m) {\n Debug.impossible_with_heap_because(__LOC__, m);\n return (Result_impossible);}(\n "[ref_put_value] received an empty result."));\n case Coq_resvalue_value(v0):\n return (run_error(Native_error_ref));\n case Coq_resvalue_ref(r):\n if (ref_kind_comparable(ref_kind_of(r), Ref_kind_undef)) {\n if (r.ref_strict) {\n return (run_error(Native_error_ref));\n } else {\n return (object_put(Prealloc_global, r.ref_name, v, throw_false));\n }\n } else {\n if ((ref_kind_comparable(ref_kind_of(r), Ref_kind_primitive_base)\n || (ref_kind_comparable(ref_kind_of(r), Ref_kind_null)\n || ref_kind_comparable(ref_kind_of(r), Ref_kind_object)))) {\n switch (r.ref_base) {\n case Coq_ref_base_type_value(v_2):\n if (ref_kind_comparable(ref_kind_of(r),\n Ref_kind_primitive_base)) {\n switch (v_2) {\n case Coq_value_prim(w):\n return (prim_value_put(w, r.ref_name, v, r.ref_strict));\n case Coq_value_object(o):\n return (\n function (m) {\n Debug.impossible_with_heap_because(__LOC__, m);\n return (Result_impossible);}(\n "[ref_put_value] impossible case"));\n }\n \n } else {\n switch (v_2) {\n case Coq_value_prim(p):\n return (\n function (m) {\n Debug.impossible_with_heap_because(__LOC__, m);\n return (Result_impossible);}(\n "[ref_put_value] impossible case"));\n case Coq_value_object(l):\n return (object_put(l, r.ref_name, v, r.ref_strict));\n }\n \n }\n case Coq_ref_base_type_env_loc(l):\n return (\n function (m) {\n Debug.impossible_with_heap_because(__LOC__, m);\n return (Result_impossible);}(\n "[ref_put_value] contradicts ref_is_property"));\n }\n \n } else {\n switch (r.ref_base) {\n case Coq_ref_base_type_value(v0):\n return (\n function (m) {\n Debug.impossible_with_heap_because(__LOC__, m);\n return (Result_impossible);}(\n "[ref_put_value] impossible spec"));\n case Coq_ref_base_type_env_loc(l):\n return (\n env_record_set_mutable_binding(l, r.ref_name, v,\n r.ref_strict));\n }\n \n }\n }\n }\n \n};\n\nvar env_record_create_mutable_binding = function (l, x, deletable_opt) {\n var deletable = unsome_default(false, deletable_opt);\n var%some e = env_record_binds_pickable_option(l);\n switch (e) {\n case Coq_env_record_decl(ed):\n if (HeapStr.indom_dec(ed, x)) {\n return (\n function (m) {\n Debug.impossible_with_heap_because(__LOC__, m);\n return (Result_impossible);}(\n "Already declared environnment record in [env_record_create_mutable_binding]."));\n } else {\n var s_2 = env_record_write_decl_env(l, x,\n mutability_of_bool(deletable), Prim_undef);\n return (res_void());\n }\n case Coq_env_record_object(l0, pt):\n var%bool has = object_has_prop(l0, x);\n if (has) {\n return (\n function (m) {\n Debug.impossible_with_heap_because(__LOC__, m);\n return (Result_impossible);}(\n "Already declared binding in [env_record_create_mutable_binding]."));\n } else {\n var a = {\n attributes_data_value: Prim_undef,\n attributes_data_writable: true,\n attributes_data_enumerable: true,\n attributes_data_configurable: deletable\n };\n var%success rv = object_define_own_prop(l0, x,\n descriptor_of_attributes(a), throw_true);\n return (res_void());\n }\n }\n \n};\n\nvar env_record_create_set_mutable_binding = function (l, x, deletable_opt, v, str) {\n var%void _ = env_record_create_mutable_binding(l, x, deletable_opt);\n return (env_record_set_mutable_binding(l, x, v, str));\n};\n\nvar env_record_create_immutable_binding = function (l, x) {\n var%some e = env_record_binds_pickable_option(l);\n switch (e) {\n case Coq_env_record_decl(ed):\n if (HeapStr.indom_dec(ed, x)) {\n return (\n function (m) {\n Debug.impossible_with_heap_because(__LOC__, m);\n return (Result_impossible);}(\n "Already declared environnment record in [env_record_create_immutable_binding]."));\n } else {\n return (\n res_void(\n env_record_write_decl_env(l, x,\n Mutability_uninitialized_immutable, Prim_undef)));\n }\n case Coq_env_record_object(o, p):\n return (\n function (m) {\n Debug.impossible_with_heap_because(__LOC__, m);\n return (Result_impossible);}(\n "[env_record_create_immutable_binding] received an environnment record object."));\n }\n \n};\n\nvar env_record_initialize_immutable_binding = function (l, x, v) {\n var%some e = env_record_binds_pickable_option(l);\n switch (e) {\n case Coq_env_record_decl(ed):\n var%some evs = decl_env_record_pickable_option(ed, x);\n if (prod_compare(mutability_compare, value_compare, evs,\n [Mutability_uninitialized_immutable, Prim_undef])) {\n var s_2 = env_record_write_decl_env(l, x, Mutability_immutable, v);\n return (res_void());\n } else {\n return (\n function (m) {\n Debug.impossible_with_heap_because(__LOC__, m);\n return (Result_impossible);}(\n "Non suitable binding in [env_record_initialize_immutable_binding]."));\n }\n case Coq_env_record_object(o, p):\n return (\n function (m) {\n Debug.impossible_with_heap_because(__LOC__, m);\n return (Result_impossible);}(\n "[env_record_initialize_immutable_binding] received an environnment record object."));\n }\n \n};\n\nvar call_object_new = function (v) {\n switch (type_of(v)) {\n case Coq_type_undef:\n return (\n (function () {\n var o = object_new(Prealloc_object_proto, "Object");\n var p = object_alloc(o);\n var (l, s_2) = p;\n return (l);\n }())\n );\n case Coq_type_null:\n return (\n (function () {\n var o = object_new(Prealloc_object_proto, "Object");\n var p = object_alloc(o);\n var (l, s_2) = p;\n return (l);\n }())\n );\n case Coq_type_bool:\n return (to_object(v));\n case Coq_type_number:\n return (to_object(v));\n case Coq_type_string:\n return (to_object(v));\n case Coq_type_object:\n return (v);\n }\n \n};\n\nvar array_args_map_loop = function (l, args, ind) {\n switch (args) {\n case []:\n return (res_void());\n case (h::rest):\n var%some _ = object_heap_map_properties_pickable_option(l,\n function (p) {\n return (\n HeapStr.write(p, JsNumber.to_string(ind),\n attributes_data_intro_all_true(h)));});\n return (array_args_map_loop(l, rest, (ind + 1.)));\n }\n \n};\n\nvar string_of_prealloc = function (_foo_) {\n switch (_foo_) {\n case Coq_prealloc_global:\n return ("global");\n case Coq_prealloc_global_eval:\n return ("global_eval");\n case Coq_prealloc_global_parse_int:\n return ("global_parse_int");\n case Coq_prealloc_global_parse_float:\n return ("global_parse_float");\n case Coq_prealloc_global_is_finite:\n return ("global_is_finite");\n case Coq_prealloc_global_is_nan:\n return ("global_is_nan");\n case Coq_prealloc_global_decode_uri:\n return ("global_decode_uri");\n case Coq_prealloc_global_decode_uri_component:\n return ("global_decode_uri_component");\n case Coq_prealloc_global_encode_uri:\n return ("global_encode_uri");\n case Coq_prealloc_global_encode_uri_component:\n return ("global_encode_uri_component");\n case Coq_prealloc_object:\n return ("object");\n case Coq_prealloc_object_get_proto_of:\n return ("object_get_proto_of");\n case Coq_prealloc_object_get_own_prop_descriptor:\n return ("object_get_own_prop_descriptor");\n case Coq_prealloc_object_get_own_prop_name:\n return ("object_get_own_prop_name");\n case Coq_prealloc_object_create:\n return ("object_create");\n case Coq_prealloc_object_define_prop:\n return ("object_define_prop");\n case Coq_prealloc_object_define_props:\n return ("object_define_props");\n case Coq_prealloc_object_seal:\n return ("object_seal");\n case Coq_prealloc_object_freeze:\n return ("object_freeze");\n case Coq_prealloc_object_prevent_extensions:\n return ("object_prevent_extensions");\n case Coq_prealloc_object_is_sealed:\n return ("object_is_sealed");\n case Coq_prealloc_object_is_frozen:\n return ("object_is_frozen");\n case Coq_prealloc_object_is_extensible:\n return ("object_is_extensible");\n case Coq_prealloc_object_keys:\n return ("object_keys");\n case Coq_prealloc_object_keys_call:\n return ("object_keys_call");\n case Coq_prealloc_object_proto:\n return ("object_proto_");\n case Coq_prealloc_object_proto_to_string:\n return ("object_proto_to_string");\n case Coq_prealloc_object_proto_value_of:\n return ("object_proto_value_of");\n case Coq_prealloc_object_proto_has_own_prop:\n return ("object_proto_has_own_prop");\n case Coq_prealloc_object_proto_is_prototype_of:\n return ("object_proto_is_prototype_of");\n case Coq_prealloc_object_proto_prop_is_enumerable:\n return ("object_proto_prop_is_enumerable");\n case Coq_prealloc_function:\n return ("function");\n case Coq_prealloc_function_proto:\n return ("function_proto");\n case Coq_prealloc_function_proto_to_string:\n return ("function_proto_to_string");\n case Coq_prealloc_function_proto_apply:\n return ("function_proto_apply");\n case Coq_prealloc_function_proto_call:\n return ("function_proto_call");\n case Coq_prealloc_function_proto_bind:\n return ("function_proto_bind");\n case Coq_prealloc_bool:\n return ("bool");\n case Coq_prealloc_bool_proto:\n return ("bool_proto");\n case Coq_prealloc_bool_proto_to_string:\n return ("bool_proto_to_string");\n case Coq_prealloc_bool_proto_value_of:\n return ("bool_proto_value_of");\n case Coq_prealloc_number:\n return ("number");\n case Coq_prealloc_number_proto:\n return ("number_proto");\n case Coq_prealloc_number_proto_to_string:\n return ("number_proto_to_string");\n case Coq_prealloc_number_proto_value_of:\n return ("number_proto_value_of");\n case Coq_prealloc_number_proto_to_fixed:\n return ("number_proto_to_fixed");\n case Coq_prealloc_number_proto_to_exponential:\n return ("number_proto_to_exponential");\n case Coq_prealloc_number_proto_to_precision:\n return ("number_proto_to_precision");\n case Coq_prealloc_array:\n return ("array");\n case Coq_prealloc_array_is_array:\n return ("array_is_array");\n case Coq_prealloc_array_proto:\n return ("array_proto");\n case Coq_prealloc_array_proto_to_string:\n return ("array_proto_to_string");\n case Coq_prealloc_array_proto_join:\n return ("array_proto_join");\n case Coq_prealloc_array_proto_pop:\n return ("array_proto_pop");\n case Coq_prealloc_array_proto_push:\n return ("array_proto_push");\n case Coq_prealloc_string:\n return ("string");\n case Coq_prealloc_string_proto:\n return ("string_proto");\n case Coq_prealloc_string_proto_to_string:\n return ("string_proto_to_string");\n case Coq_prealloc_string_proto_value_of:\n return ("string_proto_value_of");\n case Coq_prealloc_string_proto_char_at:\n return ("string_proto_char_at");\n case Coq_prealloc_string_proto_char_code_at:\n return ("string_proto_char_code_at");\n case Coq_prealloc_math:\n return ("math");\n case Coq_prealloc_mathop(m):\n return ("mathop");\n case Coq_prealloc_date:\n return ("date");\n case Coq_prealloc_regexp:\n return ("regexp");\n case Coq_prealloc_error:\n return ("error");\n case Coq_prealloc_error_proto:\n return ("error_proto");\n case Coq_prealloc_native_error(n):\n return ("native_error");\n case Coq_prealloc_native_error_proto(n):\n return ("native_error_proto");\n case Coq_prealloc_error_proto_to_string:\n return ("error_proto_to_string");\n case Coq_prealloc_throw_type_error:\n return ("throw_type_error");\n case Coq_prealloc_json:\n return ("json");\n }\n \n};\n\nvar run_construct_prealloc = function (b, args) {\n switch (b) {\n case Coq_prealloc_object:\n var v = get_arg(0, args);\n return (call_object_new(v));\n case Coq_prealloc_bool:\n return (\n (function () {\n var v = get_arg(0, args);\n var b0 = convert_value_to_boolean(v);\n var o1 = object_new(Prealloc_bool_proto, "Boolean");\n var o = object_with_primitive_value(o1, b0);\n var p = object_alloc(o);\n var (l, s_2) = p;\n return (l);\n }())\n );\n case Coq_prealloc_number:\n var follow = function (v) {\n var o1 = object_new(Prealloc_number_proto, "Number");\n var o = object_with_primitive_value(o1, v);\n var (l, s1) = object_alloc(o);\n return (l);\n };\n if (list_eq_nil_decidable(args)) {\n return (follow(JsNumber.zero));\n } else {\n var v = get_arg(0, args);\n var%number x0 = to_number(v);\n return (follow(x0));\n }\n case Coq_prealloc_array:\n var o_2 = object_new(Prealloc_array_proto, "Array");\n var o = object_for_array(o_2, Builtin_define_own_prop_array);\n var p = object_alloc(o);\n var (l, s_2) = p;\n var follow = function (length0) {\n var%some _ = object_heap_map_properties_pickable_option(l,\n function (p0) {\n return (\n HeapStr.write(p0, "length", {\n attributes_data_value: length0,\n attributes_data_writable: true,\n attributes_data_enumerable: false,\n attributes_data_configurable: false}));});\n return (l);\n };\n var arg_len = LibList.length(args);\n if (nat_eq(arg_len, 1)) {\n var v = get_arg(0, args);\n switch (v) {\n case Coq_value_prim(p0):\n switch (p0) {\n case Coq_prim_undef:\n var%some _ = object_heap_map_properties_pickable_option(l,\n function (p1) {\n return (\n HeapStr.write(p1, "0",\n attributes_data_intro_all_true(v)));});\n return (follow(1.0));\n case Coq_prim_null:\n var%some _ = object_heap_map_properties_pickable_option(l,\n function (p1) {\n return (\n HeapStr.write(p1, "0",\n attributes_data_intro_all_true(v)));});\n return (follow(1.0));\n case Coq_prim_bool(b0):\n var%some _ = object_heap_map_properties_pickable_option(l,\n function (p1) {\n return (\n HeapStr.write(p1, "0",\n attributes_data_intro_all_true(v)));});\n return (follow(1.0));\n case Coq_prim_number(vlen):\n var%run ilen = to_uint32(vlen);\n if ((ilen === vlen)) {\n return (follow(ilen));\n } else {\n return (run_error(Native_error_range));\n }\n case Coq_prim_string(s0):\n var%some _ = object_heap_map_properties_pickable_option(l,\n function (p1) {\n return (\n HeapStr.write(p1, "0",\n attributes_data_intro_all_true(v)));});\n return (follow(1.0));\n }\n \n case Coq_value_object(o0):\n var%some _ = object_heap_map_properties_pickable_option(l,\n function (p0) {\n return (\n HeapStr.write(p0, "0",\n attributes_data_intro_all_true(v)));});\n return (follow(1.0));\n }\n \n } else {\n var%some _ = object_heap_map_properties_pickable_option(l,\n function (p0) {\n return (\n HeapStr.write(p0, "length", {\n attributes_data_value: arg_len,\n attributes_data_writable: true,\n attributes_data_enumerable: false,\n attributes_data_configurable: false}));});\n var%void _ = array_args_map_loop(l, args, 0.);\n return (l);\n }\n case Coq_prealloc_string:\n var o2 = object_new(Prealloc_string_proto, "String");\n var o1 = object_with_get_own_property(o2, Builtin_get_own_prop_string);\n var follow = function (s1) {\n var o = object_with_primitive_value(o1, s1);\n var (l, s2) = object_alloc(o);\n var lenDesc = attributes_data_intro_constant(strlength(s1));\n var%some _ = object_heap_map_properties_pickable_option(l,\n function (p) {\n return (HeapStr.write(p, "length", lenDesc));});\n return (l);\n };\n var arg_len = LibList.length(args);\n if (nat_eq(arg_len, 0)) {\n return (follow(""));\n } else {\n var arg = get_arg(0, args);\n var%string s1 = to_string(arg);\n return (follow(s1));\n }\n case Coq_prealloc_error:\n var v = get_arg(0, args);\n return (build_error(Prealloc_error_proto, v));\n case Coq_prealloc_native_error(ne):\n var v = get_arg(0, args);\n return (build_error(Prealloc_native_error_proto(ne), v));\n default:\n return (\n function (s) {\n Debug.not_yet_implemented_because(__LOC__, s);\n return (Result_not_yet_implemented);}(\n strappend("Construct prealloc_",\n strappend(string_of_prealloc(b), " not yet implemented."))));\n }\n \n};\n\nvar run_construct_default = function (l, args) {\n var%value v1 = run_object_get(l, "prototype");\n if (type_compare(type_of(v1), Type_object)) {\n var vproto = v1;\n } else {\n var vproto = Prealloc_object_proto;\n }\n var o = object_new(vproto, "Object");\n var p = object_alloc(o);\n var (l_2, s2) = p;\n var%value v2 = run_call(l, l_2, args);\n if (type_compare(type_of(v2), Type_object)) {\n var vr = v2;\n } else {\n var vr = l_2;\n }\n return (vr);\n};\n\nvar run_construct = function (co, l, args) {\n switch (co) {\n case Coq_construct_default:\n return (run_construct_default(l, args));\n case Coq_construct_after_bind:\n var%some otrg = run_object_method(object_target_function_, l);\n var%some target = otrg;\n var%some oco = run_object_method(object_construct_, target);\n switch (oco) {\n case Some(co0):\n var%some oarg = run_object_method(object_bound_args_, l);\n var%some boundArgs = oarg;\n var arguments_ = LibList.append(boundArgs, args);\n return (run_construct(co0, target, arguments_));\n case None:\n return (run_error(Native_error_type));\n }\n \n case Coq_construct_prealloc(b):\n return (run_construct_prealloc(b, args));\n }\n \n};\n\nvar run_call_default = function (lf) {\n var def = Prim_undef;\n var%some oC = run_object_method(object_code_, lf);\n switch (oC) {\n case Some(bd):\n if (list_eq_nil_decidable(prog_elements(funcbody_prog(bd)))) {\n return (def);\n } else {\n return (\n ifx_success_or_return(run_prog(funcbody_prog(bd)), function () {\n return (Prim_undef);}, function (rv) { return (rv);}));\n }\n case None:\n return (def);\n }\n \n};\n\nvar creating_function_object_proto = function (l) {\n var%object lproto = run_construct_prealloc(Prealloc_object, mk_nil);\n var a1 = {\n attributes_data_value: l,\n attributes_data_writable: true,\n attributes_data_enumerable: false,\n attributes_data_configurable: true\n };\n var%bool b = object_define_own_prop(lproto, "constructor",\n descriptor_of_attributes(a1), false);\n var a2 = {\n attributes_data_value: lproto,\n attributes_data_writable: true,\n attributes_data_enumerable: false,\n attributes_data_configurable: false\n };\n return (\n object_define_own_prop(l, "prototype", descriptor_of_attributes(a2),\n false));\n};\n\nvar creating_function_object = function (names, bd, x, str) {\n var o = object_new(Prealloc_function_proto, "Function");\n var o1 = object_with_get(o, Builtin_get_function);\n var o2 = object_with_invokation(o1, Some(Construct_default),\n Some(Call_default), Some(Builtin_has_instance_function));\n var o3 = object_with_details(o2, Some(x), Some(names), Some(bd), None,\n None, None, None);\n var p = object_alloc(o3);\n var (l, s1) = p;\n var a1 = {\n attributes_data_value: LibList.length(names),\n attributes_data_writable: false,\n attributes_data_enumerable: false,\n attributes_data_configurable: false\n };\n var%bool b2 = object_define_own_prop(l, "length",\n descriptor_of_attributes(a1), false);\n var%bool b3 = creating_function_object_proto(l);\n if (!(str)) {\n return (l);\n } else {\n var vthrower = Prealloc_throw_type_error;\n var a2 = {\n attributes_accessor_get: vthrower,\n attributes_accessor_set: vthrower,\n attributes_accessor_enumerable: false,\n attributes_accessor_configurable: false\n };\n var%bool b4 = object_define_own_prop(l, "caller",\n descriptor_of_attributes(a2), false);\n var%bool b5 = object_define_own_prop(l, "arguments",\n descriptor_of_attributes(a2), false);\n return (l);\n }\n};\n\nvar binding_inst_formal_params = function (l, args, names, str) {\n switch (names) {\n case []:\n return (res_void());\n case (argname::names_2):\n var v = hd(Prim_undef, args);\n var args_2 = tl(args);\n var%bool hb = env_record_has_binding(l, argname);\n var follow = function () {\n var%void _ = env_record_set_mutable_binding(l, argname, v, str);\n return (binding_inst_formal_params(l, args_2, names_2, str));\n };\n if (hb) {\n return (follow());\n } else {\n var%void _ = env_record_create_mutable_binding(l, argname, None);\n return (follow());\n }\n }\n \n};\n\nvar binding_inst_function_decls = function (l, fds, str, bconfig) {\n switch (fds) {\n case []:\n return (res_void());\n case (fd::fds_2):\n var fbd = fd.funcdecl_body;\n var str_fd = funcbody_is_strict(fbd);\n var fparams = fd.funcdecl_parameters;\n var fname = fd.funcdecl_name;\n var%object fo = creating_function_object(fparams, fbd,\n c.execution_ctx_variable_env, str_fd);\n var follow = function () {\n var%void _ = env_record_set_mutable_binding(l, fname, fo, str);\n return (binding_inst_function_decls(l, fds_2, str, bconfig));\n };\n var%bool has = env_record_has_binding(l, fname);\n if (has) {\n if (nat_eq(l, env_loc_global_env_record)) {\n var%run d = run_object_get_prop(Prealloc_global, fname);\n switch (d) {\n case Coq_full_descriptor_undef:\n return (\n function (m) {\n Debug.impossible_with_heap_because(__LOC__, m);\n return (Result_impossible);}(\n "Undefined full descriptor in [binding_inst_function_decls]."));\n case Coq_full_descriptor_some(a):\n if (attributes_configurable(a)) {\n var a_2 = {\n attributes_data_value: Prim_undef,\n attributes_data_writable: true,\n attributes_data_enumerable: true,\n attributes_data_configurable: bconfig\n };\n var%bool x = object_define_own_prop(Prealloc_global, fname,\n descriptor_of_attributes(a_2), true);\n return (follow());\n } else {\n if ((descriptor_is_accessor_dec(descriptor_of_attributes(a))\n || (!(attributes_writable(a))\n || !(attributes_enumerable(a))))) {\n return (run_error(Native_error_type));\n } else {\n return (follow());\n }\n }\n }\n \n } else {\n return (follow());\n }\n } else {\n var%void _ = env_record_create_mutable_binding(l, fname,\n Some(bconfig));\n return (follow());\n }\n }\n \n};\n\nvar make_arg_getter = function (x, x0) {\n var xbd = strappend("return ", strappend(x, ";"));\n var bd = Funcbody_intro(\n Prog_intro(true,\n mk_cons(Element_stat(Stat_return(Some(Expr_identifier(x)))),\n mk_nil)), xbd);\n return (creating_function_object(mk_nil, bd, x0, true));\n};\n\nvar make_arg_setter = function (x, x0) {\n var xparam = strappend(x, "_arg");\n var xbd = strappend(x, strappend(" = ", strappend(xparam, ";")));\n var bd = Funcbody_intro(\n Prog_intro(true,\n mk_cons(\n Element_stat(\n Stat_expr(\n Expr_assign(Expr_identifier(x), None,\n Expr_identifier(xparam)))), mk_nil)), xbd);\n return (creating_function_object(mk_cons(xparam, mk_nil), bd, x0, true));\n};\n\nvar arguments_object_map_loop = function (l, xs, len, args, x, str, lmap, xsmap) {\n return (\n function (fO, fS, n) {\n if (int_eq(n, 0)) {\n return (fO({}));\n } else {\n return (fS((n - 1)));\n }}(function (_pat_any_1) {\n if (list_eq_nil_decidable(xsmap)) {\n return (res_void());\n } else {\n var%some o = object_binds_pickable_option(l);\n var o_2 = object_for_args_object(o, lmap, Builtin_get_args_obj,\n Builtin_get_own_prop_args_obj,\n Builtin_define_own_prop_args_obj,\n Builtin_delete_args_obj);\n return (res_void(object_write(l, o_2)));\n }}, function (len_2) {\n var tdl = take_drop_last(args);\n var (rmlargs, largs) = tdl;\n var arguments_object_map_loop_2 = function (xsmap0) {\n return (\n arguments_object_map_loop(l, xs, len_2, rmlargs, x, str, lmap,\n xsmap0));\n };\n var a = attributes_data_intro_all_true(largs);\n var%bool b = object_define_own_prop(l, convert_prim_to_string(len_2),\n descriptor_of_attributes(a), false);\n if (ge_nat_decidable(len_2, LibList.length(xs))) {\n return (arguments_object_map_loop_2(xsmap));\n } else {\n var dummy = "";\n var x0 = nth_def(dummy, len_2, xs);\n if ((str || mem_decide(string_eq, x0, xsmap))) {\n return (arguments_object_map_loop_2(xsmap));\n } else {\n var%object lgetter = make_arg_getter(x0, x);\n var%object lsetter = make_arg_setter(x0, x);\n var a_2 = {\n attributes_accessor_get: lgetter,\n attributes_accessor_set: lsetter,\n attributes_accessor_enumerable: false,\n attributes_accessor_configurable: true\n };\n var%bool b_2 = object_define_own_prop(lmap,\n convert_prim_to_string(len_2),\n descriptor_of_attributes(a_2), false);\n return (arguments_object_map_loop_2(mk_cons(x0, xsmap)));\n }\n }}, len));\n};\n\nvar arguments_object_map = function (l, xs, args, x, str) {\n var%object lmap = run_construct_prealloc(Prealloc_object, mk_nil);\n return (\n arguments_object_map_loop(l, xs, LibList.length(args), args, x, str,\n lmap, mk_nil));\n};\n\nvar create_arguments_object = function (lf, xs, args, x, str) {\n var o = object_create_builtin(Prealloc_object_proto, "Arguments",\n Heap.empty);\n var p = object_alloc(o);\n var (l, s_2) = p;\n var a = {\n attributes_data_value: LibList.length(args),\n attributes_data_writable: true,\n attributes_data_enumerable: false,\n attributes_data_configurable: true\n };\n var%bool b = object_define_own_prop(l, "length",\n descriptor_of_attributes(a), false);\n var%void _ = arguments_object_map(l, xs, args, x, str);\n if (str) {\n var vthrower = Prealloc_throw_type_error;\n var a0 = {\n attributes_accessor_get: vthrower,\n attributes_accessor_set: vthrower,\n attributes_accessor_enumerable: false,\n attributes_accessor_configurable: false\n };\n var%bool b_2 = object_define_own_prop(l, "caller",\n descriptor_of_attributes(a0), false);\n var%bool b_3 = object_define_own_prop(l, "callee",\n descriptor_of_attributes(a0), false);\n return (l);\n } else {\n var a0 = {\n attributes_data_value: lf,\n attributes_data_writable: true,\n attributes_data_enumerable: false,\n attributes_data_configurable: true\n };\n var%bool b_2 = object_define_own_prop(l, "callee",\n descriptor_of_attributes(a0), false);\n return (l);\n }\n};\n\nvar binding_inst_arg_obj = function (lf, p, xs, args, l) {\n var arguments_ = "arguments";\n var str = prog_intro_strictness(p);\n var%object largs = create_arguments_object(lf, xs, args,\n c.execution_ctx_variable_env, str);\n if (str) {\n var%void _ = env_record_create_immutable_binding(l, arguments_);\n return (env_record_initialize_immutable_binding(l, arguments_, largs));\n } else {\n return (\n env_record_create_set_mutable_binding(l, arguments_, None, largs,\n false));\n }\n};\n\nvar binding_inst_var_decls = function (l, vds, bconfig, str) {\n switch (vds) {\n case []:\n return (res_void());\n case (vd::vds_2):\n var bivd = function () {\n return (binding_inst_var_decls(l, vds_2, bconfig, str));\n };\n var%bool has = env_record_has_binding(l, vd);\n if (has) {\n return (bivd());\n } else {\n var%void _ = env_record_create_set_mutable_binding(l, vd,\n Some(bconfig), Prim_undef, str);\n return (bivd());\n }\n }\n \n};\n\nvar execution_ctx_binding_inst = function (ct, funco, p, args) {\n switch (c.execution_ctx_variable_env) {\n case []:\n return (\n function (m) {\n Debug.impossible_with_heap_because(__LOC__, m);\n return (Result_impossible);}(\n "Empty [execution_ctx_variable_env] in [execution_ctx_binding_inst]."));\n case (l::l0):\n var str = prog_intro_strictness(p);\n var follow = function (names) {\n var bconfig = codetype_compare(ct, Codetype_eval);\n var fds = prog_funcdecl(p);\n var%void _ = binding_inst_function_decls(l, fds, str, bconfig);\n var%bool bdefined = env_record_has_binding(l, "arguments");\n var follow2 = function () {\n var vds = prog_vardecl(p);\n return (binding_inst_var_decls(l, vds, bconfig, str));\n };\n switch (ct) {\n case Coq_codetype_func:\n switch (funco) {\n case Some(func):\n if (bdefined) {\n return (follow2());\n } else {\n var%void _ = binding_inst_arg_obj(func, p, names, args, l);\n return (follow2());\n }\n case None:\n if (bdefined) {\n return (follow2());\n } else {\n return (\n function (m) {\n Debug.impossible_with_heap_because(__LOC__, m);\n return (Result_impossible);}(\n "Weird `arguments\' object in [execution_ctx_binding_inst]."));\n }\n }\n \n case Coq_codetype_global:\n return (follow2());\n case Coq_codetype_eval:\n return (follow2());\n }\n \n };\n switch (ct) {\n case Coq_codetype_func:\n switch (funco) {\n case Some(func):\n var%some nameso = run_object_method(object_formal_parameters_,\n func);\n var%some names = nameso;\n var%void _ = binding_inst_formal_params(l, args, names, str);\n return (follow(names));\n case None:\n return (\n function (m) {\n Debug.impossible_with_heap_because(__LOC__, m);\n return (Result_impossible);}(\n "Non coherent functionnal code type in [execution_ctx_binding_inst]."));\n }\n \n case Coq_codetype_global:\n switch (funco) {\n case Some(o):\n return (\n function (m) {\n Debug.impossible_with_heap_because(__LOC__, m);\n return (Result_impossible);}(\n "Non coherent non-functionnal code type in [execution_ctx_binding_inst]."));\n case None:\n return (follow(mk_nil));\n }\n \n case Coq_codetype_eval:\n switch (funco) {\n case Some(o):\n return (\n function (m) {\n Debug.impossible_with_heap_because(__LOC__, m);\n return (Result_impossible);}(\n "Non coherent non-functionnal code type in [execution_ctx_binding_inst]."));\n case None:\n return (follow(mk_nil));\n }\n \n }\n \n }\n \n};\n\nvar entering_func_code = function (lf, vthis, args) {\n var%some bdo = run_object_method(object_code_, lf);\n var%some bd = bdo;\n var str = funcbody_is_strict(bd);\n var follow = function (vthis_2) {\n var%some lexo = run_object_method(object_scope_, lf);\n var%some lex = lexo;\n var p = lexical_env_alloc_decl(lex);\n var (lex_2, s1) = p;\n var c_2 = execution_ctx_intro_same(lex_2, vthis_2, str);\n var%void _ = execution_ctx_binding_inst(Codetype_func, Some(lf),\n funcbody_prog(bd), args);\n return (run_call_default(lf));\n };\n if (str) {\n return (follow(vthis));\n } else {\n switch (vthis) {\n case Coq_value_prim(p):\n switch (p) {\n case Coq_prim_undef:\n return (follow(Prealloc_global));\n case Coq_prim_null:\n return (follow(Prealloc_global));\n case Coq_prim_bool(b):\n var%value v = to_object(vthis);\n return (follow(v));\n case Coq_prim_number(n):\n var%value v = to_object(vthis);\n return (follow(v));\n case Coq_prim_string(s0):\n var%value v = to_object(vthis);\n return (follow(v));\n }\n \n case Coq_value_object(lthis):\n return (follow(vthis));\n }\n \n }\n};\n\nvar run_object_get_own_prop = function (l, x) {\n var%some b = run_object_method(object_get_own_prop_, l);\n var def = function () {\n var%some p = run_object_method(object_properties_, l);\n return (\n ifx_some_or_default(\n convert_option_attributes(HeapStr.read_option(p, x)),\n Full_descriptor_undef, function (x) { return (x);}));\n };\n switch (b) {\n case Coq_builtin_get_own_prop_default:\n return (def());\n case Coq_builtin_get_own_prop_args_obj:\n var%run d = def();\n switch (d) {\n case Coq_full_descriptor_undef:\n return (Full_descriptor_undef);\n case Coq_full_descriptor_some(a):\n var%some lmapo = run_object_method(object_parameter_map_, l);\n var%some lmap = lmapo;\n var%run d0 = run_object_get_own_prop(lmap, x);\n var follow = function (a0) {\n return (a0);\n };\n switch (d0) {\n case Coq_full_descriptor_undef:\n return (follow(a));\n case Coq_full_descriptor_some(amap):\n var%value v = run_object_get(lmap, x);\n switch (a) {\n case Coq_attributes_data_of(ad):\n return (follow(attributes_data_with_value(ad, v)));\n case Coq_attributes_accessor_of(aa):\n return (\n function (m) {\n Debug.impossible_with_heap_because(__LOC__, m);\n return (Result_impossible);}(\n "[run_object_get_own_prop]: received an accessor property descriptor in a point where the specification suppose it never happens."));\n }\n \n }\n \n }\n \n case Coq_builtin_get_own_prop_string:\n var%run d = def();\n switch (d) {\n case Coq_full_descriptor_undef:\n var%run k = to_int32(x);\n var%string s3 = to_string(JsNumber.absolute(k));\n if (!(string_eq(x, s3))) {\n return (Full_descriptor_undef);\n } else {\n var%string str = run_object_prim_value(l);\n var%run k0 = to_int32(x);\n var len = strlength(str);\n if (le_int_decidable(len, k0)) {\n return (Full_descriptor_undef);\n } else {\n var resultStr = string_sub(str, int_of_number(k0), 1);\n var a = {\n attributes_data_value: resultStr,\n attributes_data_writable: false,\n attributes_data_enumerable: true,\n attributes_data_configurable: false\n };\n return (a);\n }\n }\n case Coq_full_descriptor_some(a):\n return (d);\n }\n \n }\n \n};\n\nvar run_function_has_instance = function (lv, _foo_) {\n switch (_foo_) {\n case Coq_value_prim(p):\n return (run_error(Native_error_type));\n case Coq_value_object(lo):\n var%some vproto = run_object_method(object_proto_, lv);\n switch (vproto) {\n case Coq_value_prim(p):\n switch (p) {\n case Coq_prim_null:\n return (false);\n default:\n return (\n function (m) {\n Debug.impossible_with_heap_because(__LOC__, m);\n return (Result_impossible);}(\n "Primitive found in the prototype chain in [run_object_has_instance_loop]."));\n }\n \n case Coq_value_object(proto):\n if (object_loc_compare(proto, lo)) {\n return (true);\n } else {\n return (run_function_has_instance(proto, lo));\n }\n }\n \n }\n \n};\n\nvar run_object_has_instance = function (b, l, v) {\n switch (b) {\n case Coq_builtin_has_instance_function:\n switch (v) {\n case Coq_value_prim(w):\n return (false);\n case Coq_value_object(lv):\n var%value vproto = run_object_get(l, "prototype");\n switch (vproto) {\n case Coq_value_prim(p):\n return (run_error(Native_error_type));\n case Coq_value_object(lproto):\n return (run_function_has_instance(lv, lproto));\n }\n \n }\n \n case Coq_builtin_has_instance_after_bind:\n var%some ol = run_object_method(object_target_function_, l);\n var%some l0 = ol;\n var%some ob = run_object_method(object_has_instance_, l0);\n switch (ob) {\n case Some(b0):\n return (run_object_has_instance(b0, l0, v));\n case None:\n return (run_error(Native_error_type));\n }\n \n }\n \n};\n\nvar from_prop_descriptor = function (_foo_) {\n switch (_foo_) {\n case Coq_full_descriptor_undef:\n return (Prim_undef);\n case Coq_full_descriptor_some(a):\n var%object l = run_construct_prealloc(Prealloc_object, mk_nil);\n var follow = function (x) {\n var a1 = attributes_data_intro_all_true(attributes_enumerable(a));\n var%bool x0 = object_define_own_prop(l, "enumerable",\n descriptor_of_attributes(a1), throw_false);\n var a2 = attributes_data_intro_all_true(attributes_configurable(a));\n var%bool x1 = object_define_own_prop(l, "configurable",\n descriptor_of_attributes(a2), throw_false);\n return (l);\n };\n switch (a) {\n case Coq_attributes_data_of(ad):\n var a1 = attributes_data_intro_all_true(ad.attributes_data_value);\n var%bool x = object_define_own_prop(l, "value",\n descriptor_of_attributes(a1), throw_false);\n var a2 = attributes_data_intro_all_true(\n ad.attributes_data_writable);\n var%bool v = object_define_own_prop(l, "writable",\n descriptor_of_attributes(a2), throw_false);\n return (follow(v));\n case Coq_attributes_accessor_of(aa):\n var a1 = attributes_data_intro_all_true(aa.attributes_accessor_get);\n var%bool x = object_define_own_prop(l, "get",\n descriptor_of_attributes(a1), throw_false);\n var a2 = attributes_data_intro_all_true(aa.attributes_accessor_set);\n var%bool v = object_define_own_prop(l, "set",\n descriptor_of_attributes(a2), throw_false);\n return (follow(v));\n }\n \n }\n \n};\n\nvar run_equal = function (v1, v2) {\n var conv_number = function (v) {\n return (to_number(v));\n };\n var conv_primitive = function (v) {\n return (to_primitive(v, None));\n };\n var checkTypesThen = function (v3, v4, k) {\n var ty1 = type_of(v3);\n var ty2 = type_of(v4);\n if (type_compare(ty1, ty2)) {\n return (equality_test_for_same_type(ty1, v3, v4));\n } else {\n return (k(ty1, ty2));\n }\n };\n return (\n checkTypesThen(v1, v2, function (ty1, ty2) {\n var dc_conv = function (v3, f, v4) {\n var%value v2_2 = f(v4);\n return (run_equal(v3, v2_2));\n };\n var so = function (b) {\n return (b);\n };\n if ((type_compare(ty1, Type_null) && type_compare(ty2, Type_undef))) {\n return (so(true));\n } else {\n if ((type_compare(ty1, Type_undef) && type_compare(ty2, Type_null))) {\n return (so(true));\n } else {\n if ((type_compare(ty1, Type_number)\n && type_compare(ty2, Type_string))) {\n return (dc_conv(v1, conv_number, v2));\n } else {\n if ((type_compare(ty1, Type_string)\n && type_compare(ty2, Type_number))) {\n return (dc_conv(v2, conv_number, v1));\n } else {\n if (type_compare(ty1, Type_bool)) {\n return (dc_conv(v2, conv_number, v1));\n } else {\n if (type_compare(ty2, Type_bool)) {\n return (dc_conv(v1, conv_number, v2));\n } else {\n if (((type_compare(ty1, Type_string)\n || type_compare(ty1, Type_number))\n && type_compare(ty2, Type_object))) {\n return (dc_conv(v1, conv_primitive, v2));\n } else {\n if ((type_compare(ty1, Type_object)\n && (type_compare(ty2, Type_string)\n || type_compare(ty2, Type_number)))) {\n return (dc_conv(v2, conv_primitive, v1));\n } else {\n return (so(false));\n }\n }\n }\n }\n }\n }\n }\n }}));\n};\n\nvar convert_twice = function (ifv, kC, v1, v2) {\n return (\n ifv(kC(v1), function (vc1) {\n return (ifv(kC(v2), function (vc2) { return ([vc1, vc2]);}));}));\n};\n\nvar convert_twice_primitive = function (v1, v2) {\n return (\n convert_twice(ifx_prim, function (v) { return (to_primitive(v, None));},\n v1, v2));\n};\n\nvar convert_twice_number = function (v1, v2) {\n return (\n convert_twice(ifx_number, function (v) { return (to_number(v));}, v1, v2));\n};\n\nvar convert_twice_string = function (v1, v2) {\n return (\n convert_twice(ifx_string, function (v) { return (to_string(v));}, v1, v2));\n};\n\nvar issome = function (_foo_) {\n switch (_foo_) {\n case Some(t):\n return (true);\n case None:\n return (false);\n }\n \n};\n\nvar run_binary_op_add = function (v1, v2) {\n var%run (w1, w2) = convert_twice_primitive(v1, v2);\n if ((type_compare(type_of(w1), Type_string)\n || type_compare(type_of(w2), Type_string))) {\n var%run (str1, str2) = convert_twice_string(w1, w2);\n return (strappend(str1, str2));\n } else {\n var%run (n1, n2) = convert_twice_number(w1, w2);return ((n1 + n2));\n }\n};\n\nvar run_binary_op_arith = function (mathop, v1, v2) {\n var%run nn = convert_twice_number(v1, v2);\n var (n1, n2) = nn;\n return (mathop(n1, n2));\n};\n\nvar run_binary_op_shift = function (b_unsigned, mathop, v1, v2) {\n if (b_unsigned) {\n var conv = to_uint32;\n } else {\n var conv = to_int32;\n }\n var%run k1 = conv(v1);\n var%run k2 = to_uint32(v2);\n var k2_2 = JsNumber.modulo_32(k2);\n return (mathop(k1, k2_2));\n};\n\nvar run_binary_op_bitwise = function (mathop, v1, v2) {\n var%run k1 = to_int32(v1);\n var%run k2 = to_int32(v2);\n return (mathop(k1, k2));\n};\n\nvar run_binary_op_compare = function (b_swap, b_neg, v1, v2) {\n var%run ww = convert_twice_primitive(v1, v2);\n var (w1, w2) = ww;\n if (b_swap) {\n var p = [w2, w1];\n } else {\n var p = [w1, w2];\n }\n var (wa, wb) = p;\n var wr = inequality_test_primitive(wa, wb);\n if (prim_compare(wr, Prim_undef)) {\n return (false);\n } else {\n if ((b_neg && prim_compare(wr, true))) {\n return (false);\n } else {\n if ((b_neg && prim_compare(wr, false))) {\n return (true);\n } else {\n return (wr);\n }\n }\n }\n};\n\nvar run_binary_op_instanceof = function (v1, v2) {\n switch (v2) {\n case Coq_value_prim(p):\n return (run_error(Native_error_type));\n case Coq_value_object(l):\n var%some b = run_object_method(object_has_instance_, l);\n switch (b) {\n case None:\n return (run_error(Native_error_type));\n case Some(has_instance_id):\n return (run_object_has_instance(has_instance_id, l, v1));\n }\n \n }\n \n};\n\nvar run_binary_op_in = function (v1, v2) {\n switch (v2) {\n case Coq_value_prim(p):\n return (run_error(Native_error_type));\n case Coq_value_object(l):\n var%string x = to_string(v1);\n return (object_has_prop(l, x));\n }\n \n};\n\nvar run_binary_op = function (op, v1, v2) {\n switch (op) {\n case Coq_binary_op_mult:\n return (\n run_binary_op_arith(function (x, y) { return ((x * y));}, v1, v2));\n case Coq_binary_op_div:\n return (\n run_binary_op_arith(function (x, y) { return ((x / y));}, v1, v2));\n case Coq_binary_op_mod:\n return (\n run_binary_op_arith(function (x, y) { return (JsNumber.fmod(x, y));},\n v1, v2));\n case Coq_binary_op_sub:\n return (\n run_binary_op_arith(function (x, y) { return ((x - y));}, v1, v2));\n case Coq_binary_op_lt:\n return (run_binary_op_compare(false, false, v1, v2));\n case Coq_binary_op_gt:\n return (run_binary_op_compare(true, false, v1, v2));\n case Coq_binary_op_le:\n return (run_binary_op_compare(true, true, v1, v2));\n case Coq_binary_op_ge:\n return (run_binary_op_compare(false, true, v1, v2));\n case Coq_binary_op_left_shift:\n return (run_binary_op_shift(false, JsNumber.int32_left_shift, v1, v2));\n case Coq_binary_op_right_shift:\n return (\n run_binary_op_shift(false, JsNumber.int32_right_shift, v1, v2));\n case Coq_binary_op_unsigned_right_shift:\n return (\n run_binary_op_shift(true, JsNumber.uint32_right_shift, v1, v2));\n case Coq_binary_op_bitwise_and:\n return (run_binary_op_bitwise(JsNumber.int32_bitwise_and, v1, v2));\n case Coq_binary_op_bitwise_or:\n return (run_binary_op_bitwise(JsNumber.int32_bitwise_or, v1, v2));\n case Coq_binary_op_bitwise_xor:\n return (run_binary_op_bitwise(JsNumber.int32_bitwise_xor, v1, v2));\n case Coq_binary_op_add:\n return (run_binary_op_add(v1, v2));\n case Coq_binary_op_instanceof:\n return (run_binary_op_instanceof(v1, v2));\n case Coq_binary_op_in:\n return (run_binary_op_in(v1, v2));\n case Coq_binary_op_equal:\n return (run_equal(v1, v2));\n case Coq_binary_op_disequal:\n var%bool b0 = run_equal(v1, v2);\n return (!(b0));\n case Coq_binary_op_strict_equal:\n return (strict_equality_test(v1, v2));\n case Coq_binary_op_strict_disequal:\n return (!(strict_equality_test(v1, v2)));\n case Coq_binary_op_coma:\n return (v2);\n case Coq_binary_op_and:\n return (Result_impossible);\n case Coq_binary_op_or:\n return (Result_impossible);\n }\n \n};\n\nvar run_prepost_op = function (_foo_) {\n switch (_foo_) {\n case Coq_unary_op_delete:\n return (None);\n case Coq_unary_op_void:\n return (None);\n case Coq_unary_op_typeof:\n return (None);\n case Coq_unary_op_post_incr:\n return (Some([add_one, false]));\n case Coq_unary_op_post_decr:\n return (Some([sub_one, false]));\n case Coq_unary_op_pre_incr:\n return (Some([add_one, true]));\n case Coq_unary_op_pre_decr:\n return (Some([sub_one, true]));\n case Coq_unary_op_add:\n return (None);\n case Coq_unary_op_neg:\n return (None);\n case Coq_unary_op_bitwise_not:\n return (None);\n case Coq_unary_op_not:\n return (None);\n }\n \n};\n\nvar run_typeof_value = function (_foo_) {\n switch (_foo_) {\n case Coq_value_prim(w):\n return (typeof_prim(w));\n case Coq_value_object(l):\n if (is_callable_dec(l)) {\n return ("function");\n } else {\n return ("object");\n }\n }\n \n};\n\nvar run_unary_op = function (op, e) {\n if (prepost_unary_op_dec(op)) {\n var%success rv1 = run_expr(e);\n var%run v2 = ref_get_value(rv1);\n var%number n1 = to_number(v2);\n var%some po = run_prepost_op(op);\n var (number_op, is_pre) = po;\n var n2 = number_op(n1);\n var v = (function () {\n if (is_pre) {\n return (n2);\n } else {\n return (n1);\n }\n }())\n ;\n var%void _ = ref_put_value(rv1, n2);\n return (v);\n } else {\n switch (op) {\n case Coq_unary_op_delete:\n var%success rv = run_expr(e);\n switch (rv) {\n case Coq_resvalue_empty:\n return (true);\n case Coq_resvalue_value(v):\n return (true);\n case Coq_resvalue_ref(r):\n if (ref_kind_comparable(ref_kind_of(r), Ref_kind_undef)) {\n if (r.ref_strict) {\n return (run_error(Native_error_syntax));\n } else {\n return (true);\n }\n } else {\n switch (r.ref_base) {\n case Coq_ref_base_type_value(v):\n var%object l = to_object(v);\n return (object_delete(l, r.ref_name, r.ref_strict));\n case Coq_ref_base_type_env_loc(l):\n if (r.ref_strict) {\n return (run_error(Native_error_syntax));\n } else {\n return (env_record_delete_binding(l, r.ref_name));\n }\n }\n \n }\n }\n \n case Coq_unary_op_typeof:\n var%success rv = run_expr(e);\n switch (rv) {\n case Coq_resvalue_empty:\n return (\n function (m) {\n Debug.impossible_with_heap_because(__LOC__, m);\n return (Result_impossible);}(\n "Empty result for a `typeof\' in [run_unary_op]."));\n case Coq_resvalue_value(v):\n return (run_typeof_value(v));\n case Coq_resvalue_ref(r):\n if (ref_kind_comparable(ref_kind_of(r), Ref_kind_undef)) {\n return ("undefined");\n } else {\n var%run v = ref_get_value(r);return (run_typeof_value(v));\n }\n }\n \n default:\n var%run v = run_expr_get_value(e);\n switch (op) {\n case Coq_unary_op_void:\n return (Prim_undef);\n case Coq_unary_op_add:\n return (to_number(v));\n case Coq_unary_op_neg:\n var%number n = to_number(v);\n return (JsNumber.neg(n));\n case Coq_unary_op_bitwise_not:\n var%run k = to_int32(v);\n return (JsNumber.int32_bitwise_not(k));\n case Coq_unary_op_not:\n return (!(convert_value_to_boolean(v)));\n default:\n return (\n function (m) {\n Debug.impossible_with_heap_because(__LOC__, m);\n return (Result_impossible);}(\n "Undealt regular operator in [run_unary_op]."));\n }\n \n }\n \n }\n};\n\nvar create_new_function_in = function (args, bd) {\n return (\n creating_function_object(args, bd, c.execution_ctx_lexical_env,\n c.execution_ctx_strict));\n};\n\nvar init_object = function (l, _foo_) {\n switch (_foo_) {\n case []:\n return (l);\n case (p::pds_2):\n var (pn, pb) = p;\n var x = string_of_propname(pn);\n var follows = function (desc) {\n var%success rv = object_define_own_prop(l, x, desc, false);\n return (init_object(l, pds_2));\n };\n switch (pb) {\n case Coq_propbody_val(e0):\n var%run v0 = run_expr_get_value(e0);\n var desc = {\n descriptor_value: Some(v0),\n descriptor_writable: Some(true),\n descriptor_get: None,\n descriptor_set: None,\n descriptor_enumerable: Some(true),\n descriptor_configurable: Some(true)\n };\n return (follows(desc));\n case Coq_propbody_get(bd):\n var%value v0 = create_new_function_in(mk_nil, bd);\n var desc = {\n descriptor_value: None,\n descriptor_writable: None,\n descriptor_get: Some(v0),\n descriptor_set: None,\n descriptor_enumerable: Some(true),\n descriptor_configurable: Some(true)\n };\n return (follows(desc));\n case Coq_propbody_set(args, bd):\n var%value v0 = create_new_function_in(args, bd);\n var desc = {\n descriptor_value: None,\n descriptor_writable: None,\n descriptor_get: None,\n descriptor_set: Some(v0),\n descriptor_enumerable: Some(true),\n descriptor_configurable: Some(true)\n };\n return (follows(desc));\n }\n \n }\n \n};\n\nvar run_array_element_list = function (l, oes, n) {\n switch (oes) {\n case []:\n return (l);\n case (o::oes_2):\n switch (o) {\n case Some(e):\n var loop_result = function () {\n return (run_array_element_list(l, oes_2, 0.));\n };\n var%run v = run_expr_get_value(e);\n var%value vlen = run_object_get(l, "length");\n var%run ilen = to_uint32(vlen);\n var%string slen = to_string((ilen + n));\n var desc = {\n attributes_data_value: v,\n attributes_data_writable: true,\n attributes_data_enumerable: true,\n attributes_data_configurable: true\n };\n var%bool x = object_define_own_prop(l, slen,\n descriptor_of_attributes(desc), false);\n var%object l0 = loop_result();\n return (l0);\n case None:\n var firstIndex = elision_head_count(mk_cons(None, oes_2));\n return (\n run_array_element_list(l,\n elision_head_remove(mk_cons(None, oes_2)), firstIndex));\n }\n \n }\n \n};\n\nvar init_array = function (l, oes) {\n var elementList = elision_tail_remove(oes);\n var elisionLength = elision_tail_count(oes);\n var%object l0 = run_array_element_list(l, elementList, 0.);\n var%value vlen = run_object_get(l0, "length");\n var%run ilen = to_uint32(vlen);\n var%run len = to_uint32((ilen + elisionLength));\n var%not_throw x = object_put(l0, "length", len, throw_false);\n return (l0);\n};\n\nvar run_var_decl_item = function (x, _foo_) {\n switch (_foo_) {\n case Some(e):\n var%run ir = identifier_resolution(x);\n var%run v = run_expr_get_value(e);\n var%void _ = ref_put_value(ir, v);\n return (x);\n case None:\n return (x);\n }\n \n};\n\nvar run_var_decl = function (_foo_) {\n switch (_foo_) {\n case []:\n return (res_empty);\n case (y::xeos_2):\n var (x, eo) = y;\n var%value vname = run_var_decl_item(x, eo);\n return (run_var_decl(xeos_2));\n }\n \n};\n\nvar run_list_expr = function (vs, _foo_) {\n switch (_foo_) {\n case []:\n return (rev(vs));\n case (e::es_2):\n var%run v = run_expr_get_value(e);\n return (run_list_expr(mk_cons(v, vs), es_2));\n }\n \n};\n\nvar run_block = function (_foo_) {\n switch (_foo_) {\n case []:\n return (Resvalue_empty);\n case (t::ts_rev_2):\n var%success rv0 = run_block(ts_rev_2);\n return (\n ifx_success_state(rv0, run_stat(t), function (x0) { return (x0);}));\n }\n \n};\n\nvar run_binary_op_and = function (e1, e2) {\n var%run v1 = run_expr_get_value(e1);\n var b1 = convert_value_to_boolean(v1);\n if (!(b1)) {\n return (v1);\n } else {\n var%run v = run_expr_get_value(e2);return (v);\n }\n};\n\nvar run_binary_op_or = function (e1, e2) {\n var%run v1 = run_expr_get_value(e1);\n var b1 = convert_value_to_boolean(v1);\n if (b1) {\n return (v1);\n } else {\n var%run v = run_expr_get_value(e2);return (v);\n }\n};\n\nvar run_expr_binary_op = function (op, e1, e2) {\n switch (op) {\n case Coq_binary_op_and:\n return (run_binary_op_and(e1, e2));\n case Coq_binary_op_or:\n return (run_binary_op_or(e1, e2));\n default:\n var%run v1 = run_expr_get_value(e1);\n var%run v2 = run_expr_get_value(e2);\n return (run_binary_op(op, v1, v2));\n }\n \n};\n\nvar run_expr_access = function (e1, e2) {\n var%run v1 = run_expr_get_value(e1);\n var%run v2 = run_expr_get_value(e2);\n if ((value_compare(v1, Prim_undef) || value_compare(v1, Prim_null))) {\n return (run_error(Native_error_type));\n } else {\n var%string x = to_string(v2);\n return (ref_create_value(v1, x, c.execution_ctx_strict));\n }\n};\n\nvar run_expr_assign = function (opo, e1, e2) {\n var%success rv1 = run_expr(e1);\n var follow = function (rv_2) {\n switch (rv_2) {\n case Coq_resvalue_empty:\n return (\n function (m) {\n Debug.impossible_with_heap_because(__LOC__, m);\n return (Result_impossible);}(\n "Non-value result in [run_expr_assign]."));\n case Coq_resvalue_value(v):\n var%void _ = ref_put_value(rv1, v);\n return (v);\n case Coq_resvalue_ref(r):\n return (\n function (m) {\n Debug.impossible_with_heap_because(__LOC__, m);\n return (Result_impossible);}(\n "Non-value result in [run_expr_assign]."));\n }\n \n };\n switch (opo) {\n case Some(op):\n var%run v1 = ref_get_value(rv1);\n var%run v2 = run_expr_get_value(e2);\n var%success v = run_binary_op(op, v1, v2);\n return (follow(v));\n case None:\n var%run x0 = run_expr_get_value(e2);\n return (follow(x0));\n }\n \n};\n\nvar run_expr_function = function (fo, args, bd) {\n switch (fo) {\n case Some(fn):\n var p = lexical_env_alloc_decl(c.execution_ctx_lexical_env);\n var (lex_2, s_2) = p;\n var follow = function (l) {\n var%some e = env_record_binds_pickable_option(l);\n var%void _ = env_record_create_immutable_binding(l, fn);\n var%object l0 = creating_function_object(args, bd, lex_2,\n funcbody_is_strict(bd));\n var%void _ = env_record_initialize_immutable_binding(l, fn, l0);\n return (l0);\n };\n return (\n destr_list(lex_2, function (x) {\n return (\n function (m) {\n Debug.impossible_with_heap_because(__LOC__, m);\n return (Result_impossible);}(\n "Empty lexical environnment allocated in [run_expr_function]."));\n }, function (l, x) { return (follow(l));}, {}));\n case None:\n var lex = c.execution_ctx_lexical_env;\n return (\n creating_function_object(args, bd, lex, funcbody_is_strict(bd)));\n }\n \n};\n\nvar entering_eval_code = function (direct, bd, k) {\n var str = (funcbody_is_strict(bd) || (direct && c.execution_ctx_strict));\n if (direct) {\n var c_2 = c;\n } else {\n var c_2 = execution_ctx_initial(str);\n }\n if (str) {\n var p = lexical_env_alloc_decl(c_2.execution_ctx_lexical_env);\n } else {\n var p = [c_2.execution_ctx_lexical_env, s];\n }\n var (lex, s_2) = p;\n if (str) {\n var c1 = execution_ctx_with_lex_same(lex);\n } else {\n var c1 = c_2;\n }\n var p0 = funcbody_prog(bd);\n var%void _ = execution_ctx_binding_inst(Codetype_eval, None, p0, mk_nil);\n return (k());\n};\n\nvar run_eval = function (is_direct_call, vs) {\n switch (get_arg(0, vs)) {\n case Coq_value_prim(p):\n switch (p) {\n case Coq_prim_undef:\n return (Prim_undef);\n case Coq_prim_null:\n return (Prim_null);\n case Coq_prim_bool(b):\n return (b);\n case Coq_prim_number(n):\n return (n);\n case Coq_prim_string(s0):\n var str = (is_direct_call && c.execution_ctx_strict);\n switch (parse_pickable(s0, str)) {\n case Some(p0):\n return (\n entering_eval_code(is_direct_call, Funcbody_intro(p0, s0),\n function () {\n var%ter r = run_prog(p0);\n switch (r.res_type) {\n case Coq_restype_normal:\n return (\n ifx_empty_label(r, function (x) {\n switch (r.res_value) {\n case Coq_resvalue_empty:\n return (Prim_undef);\n case Coq_resvalue_value(v):\n return (v);\n case Coq_resvalue_ref(r0):\n return (\n function (m) {\n Debug.impossible_with_heap_because(\n __LOC__, m);\n return (Result_impossible);}(\n "Reference found in the result of an `eval\' in [run_eval]."));\n }\n }));\n case Coq_restype_throw:\n return (res_throw(r.res_value));\n default:\n return (\n function (m) {\n Debug.impossible_with_heap_because(__LOC__, m);\n return (Result_impossible);}(\n "Forbidden result type returned by an `eval\' in [run_eval]."));\n }\n }));\n case None:\n return (run_error(Native_error_syntax));\n }\n \n }\n \n case Coq_value_object(o):\n return (o);\n }\n \n};\n\nvar run_expr_call = function (e1, e2s) {\n var is_eval_direct = is_syntactic_eval(e1);\n var%success rv = run_expr(e1);\n var%run f = ref_get_value(rv);\n var%run vs = run_list_expr(mk_nil, e2s);\n switch (f) {\n case Coq_value_prim(p):\n return (run_error(Native_error_type));\n case Coq_value_object(l):\n if (is_callable_dec(l)) {\n var follow = function (vthis) {\n if (object_loc_compare(l, Prealloc_global_eval)) {\n return (run_eval(is_eval_direct, vs));\n } else {\n return (run_call(l, vthis, vs));\n }\n };\n switch (rv) {\n case Coq_resvalue_empty:\n return (\n function (m) {\n Debug.impossible_with_heap_because(__LOC__, m);\n return (Result_impossible);}(\n "[run_expr_call] unable to call an empty result."));\n case Coq_resvalue_value(v):\n return (follow(Prim_undef));\n case Coq_resvalue_ref(r):\n switch (r.ref_base) {\n case Coq_ref_base_type_value(v):\n if ((ref_kind_comparable(ref_kind_of(r),\n Ref_kind_primitive_base)\n || (ref_kind_comparable(ref_kind_of(r), Ref_kind_null)\n || ref_kind_comparable(ref_kind_of(r),\n Ref_kind_object)))) {\n return (follow(v));\n } else {\n return (\n function (m) {\n Debug.impossible_with_heap_because(__LOC__, m);\n return (Result_impossible);}(\n "[run_expr_call] unable to call a non-property function."));\n }\n case Coq_ref_base_type_env_loc(l0):\n var%some v = env_record_implicit_this_value(l0);\n return (follow(v));\n }\n \n }\n \n } else {\n return (run_error(Native_error_type));\n }\n }\n \n};\n\nvar run_expr_conditionnal = function (e1, e2, e3) {\n var%run v1 = run_expr_get_value(e1);\n var b = convert_value_to_boolean(v1);\n if (b) {\n var e = e2;\n } else {\n var e = e3;\n }\n var%run r = run_expr_get_value(e);\n return (r);\n};\n\nvar run_expr_new = function (e1, e2s) {\n var%run v = run_expr_get_value(e1);\n var%run args = run_list_expr(mk_nil, e2s);\n switch (v) {\n case Coq_value_prim(p):\n return (run_error(Native_error_type));\n case Coq_value_object(l):\n var%some coo = run_object_method(object_construct_, l);\n switch (coo) {\n case Some(co):\n return (run_construct(co, l, args));\n case None:\n return (run_error(Native_error_type));\n }\n \n }\n \n};\n\nvar run_stat_label = function (lab, t) {\n var%break r1 = run_stat(t);\n return (\n (function () {\n if (label_compare(r1.res_label, lab)) {\n return (r1.res_value);\n } else {\n return (r1);\n }\n }())\n );\n};\n\nvar run_stat_with = function (e1, t2) {\n var%run v1 = run_expr_get_value(e1);\n var%object l = to_object(v1);\n var lex = c.execution_ctx_lexical_env;\n var p = lexical_env_alloc_object(lex, l, provide_this_true);\n var (lex_2, s3) = p;\n var c_2 = execution_ctx_with_lex(lex_2);\n return (run_stat(t2));\n};\n\nvar run_stat_if = function (e1, t2, to0) {\n var%run v1 = run_expr_get_value(e1);\n var b = convert_value_to_boolean(v1);\n if (b) {\n return (run_stat(t2));\n } else {\n switch (to0) {\n case Some(t3):\n return (run_stat(t3));\n case None:\n return (Resvalue_empty);\n }\n \n }\n};\n\nvar run_stat_while = function (rv, labs, e1, t2) {\n var%run v1 = run_expr_get_value(e1);\n var b = convert_value_to_boolean(v1);\n if (b) {\n var%ter r = run_stat(t2);\n if (!(resvalue_compare(r.res_value, Resvalue_empty))) {\n var rv_2 = r.res_value;\n } else {\n var rv_2 = rv;\n }\n var loop = function (x) {\n return (run_stat_while(rv_2, labs, e1, t2));\n };\n if ((!(restype_compare(r.res_type, Restype_continue))\n || !(res_label_in(r, labs)))) {\n if ((restype_compare(r.res_type, Restype_break)\n && res_label_in(r, labs))) {\n return (rv_2);\n } else {\n if (!(restype_compare(r.res_type, Restype_normal))) {\n return (r);\n } else {\n return (loop({}));\n }\n }\n } else {\n return (loop({}));\n }\n } else {\n return (rv);\n }\n};\n\nvar run_stat_switch_end = function (rv, _foo_) {\n switch (_foo_) {\n case []:\n return (rv);\n case (y::scs_2):\n switch (y) {\n case Coq_switchclause_intro(e, ts):\n return (\n ifx_success_state(rv, run_block(rev(ts)), function (rv1) {\n return (run_stat_switch_end(rv1, scs_2));}));\n }\n \n }\n \n};\n\nvar run_stat_switch_no_default = function (vi, rv, _foo_) {\n switch (_foo_) {\n case []:\n return (rv);\n case (y::scs_2):\n switch (y) {\n case Coq_switchclause_intro(e, ts):\n var%run v1 = run_expr_get_value(e);\n var b = strict_equality_test(v1, vi);\n if (b) {\n var%success rv2 = run_block(rev(ts));\n return (run_stat_switch_end(rv2, scs_2));\n } else {\n return (run_stat_switch_no_default(vi, rv, scs_2));\n }\n }\n \n }\n \n};\n\nvar run_stat_switch_with_default_default = function (ts, scs) {\n var%success rv = run_block(rev(ts));\n return (run_stat_switch_end(rv, scs));\n};\n\nvar run_stat_switch_with_default_B = function (vi, rv, ts0, scs) {\n switch (scs) {\n case []:\n return (run_stat_switch_with_default_default(ts0, scs));\n case (y::scs_2):\n switch (y) {\n case Coq_switchclause_intro(e, ts):\n var%run v1 = run_expr_get_value(e);\n var b = strict_equality_test(v1, vi);\n if (b) {\n var%success rv2 = run_block(rev(ts));\n return (run_stat_switch_end(rv2, scs_2));\n } else {\n return (run_stat_switch_with_default_B(vi, rv, ts0, scs_2));\n }\n }\n \n }\n \n};\n\nvar run_stat_switch_with_default_A = function (found, vi, rv, scs1, ts0, scs2) {\n switch (scs1) {\n case []:\n if (found) {\n return (run_stat_switch_with_default_default(ts0, scs2));\n } else {\n return (run_stat_switch_with_default_B(vi, rv, ts0, scs2));\n }\n case (y::scs_2):\n switch (y) {\n case Coq_switchclause_intro(e, ts):\n var follow = function () {\n return (\n ifx_success_state(rv, run_block(rev(ts)), function (rv0) {\n return (\n run_stat_switch_with_default_A(true, vi, rv0, scs_2, ts0,\n scs2));}));\n };\n if (found) {\n return (follow());\n } else {\n var%run v1 = run_expr_get_value(e);\n var b = strict_equality_test(v1, vi);\n if (b) {\n return (follow());\n } else {\n return (\n run_stat_switch_with_default_A(false, vi, rv, scs_2, ts0,\n scs2));\n }\n }\n }\n \n }\n \n};\n\nvar run_stat_switch = function (labs, e, sb) {\n var%run vi = run_expr_get_value(e);\n var follow = function (w) {\n var%success r = var%break r = w;\n if (res_label_in(r, labs)) {\n return (r.res_value);\n } else {\n return (r);\n };\n return (r);\n };\n switch (sb) {\n case Coq_switchbody_nodefault(scs):\n return (follow(run_stat_switch_no_default(vi, Resvalue_empty, scs)));\n case Coq_switchbody_withdefault(scs1, ts, scs2):\n return (\n follow(\n run_stat_switch_with_default_A(false, vi, Resvalue_empty, scs1, ts,\n scs2)));\n }\n \n};\n\nvar run_stat_do_while = function (rv, labs, e1, t2) {\n var%ter r = run_stat(t2);\n if (resvalue_compare(r.res_value, Resvalue_empty)) {\n var rv_2 = rv;\n } else {\n var rv_2 = r.res_value;\n }\n var loop = function (x) {\n var%run v1 = run_expr_get_value(e1);\n var b = convert_value_to_boolean(v1);\n if (b) {\n return (run_stat_do_while(rv_2, labs, e1, t2));\n } else {\n return (rv_2);\n }\n };\n if ((restype_compare(r.res_type, Restype_continue)\n && res_label_in(r, labs))) {\n return (loop({}));\n } else {\n if ((restype_compare(r.res_type, Restype_break) && res_label_in(r, labs))) {\n return (rv_2);\n } else {\n if (!(restype_compare(r.res_type, Restype_normal))) {\n return (r);\n } else {\n return (loop({}));\n }\n }\n }\n};\n\nvar run_stat_try = function (t1, t2o, t3o) {\n var finallycont = function (r) {\n switch (t3o) {\n case Some(t3):\n var%success rv_2 = run_stat(t3);\n return (r);\n case None:\n return (r);\n }\n \n };\n return (\n ifx_any_or_throw(run_stat(t1), finallycont, function (v) {\n switch (t2o) {\n case Some(y):\n var (x, t2) = y;\n var lex = c.execution_ctx_lexical_env;\n var p = lexical_env_alloc_decl(lex);\n var (lex_2, s_2) = p;\n switch (lex_2) {\n case []:\n return (\n function (m) {\n Debug.impossible_with_heap_because(__LOC__, m);\n return (Result_impossible);}(\n "Empty lexical environnment in [run_stat_try]."));\n case (l::oldlex):\n var%void _ = env_record_create_set_mutable_binding(l, x,\n None, v, throw_irrelevant);\n var c_2 = execution_ctx_with_lex(lex_2);\n var%ter r = run_stat(t2);\n return (finallycont(r));\n }\n \n case None:\n return (finallycont(res_throw(v)));\n }\n }));\n};\n\nvar run_stat_throw = function (e) {\n var%run v1 = run_expr_get_value(e);\n return (res_throw(v1));\n};\n\nvar run_stat_return = function (_foo_) {\n switch (_foo_) {\n case Some(e):\n var%run v1 = run_expr_get_value(e);\n return (res_return(v1));\n case None:\n return (res_return(Prim_undef));\n }\n \n};\n\nvar run_stat_for_loop = function (labs, rv, eo2, eo3, t) {\n var follows = function () {\n var%ter r = run_stat(t);\n if (!(resvalue_compare(r.res_value, Resvalue_empty))) {\n var rv_2 = r.res_value;\n } else {\n var rv_2 = rv;\n }\n var loop = function () {\n return (run_stat_for_loop(labs, rv_2, eo2, eo3, t));\n };\n if ((restype_compare(r.res_type, Restype_break) && res_label_in(r, labs))) {\n return (rv_2);\n } else {\n if ((restype_compare(r.res_type, Restype_normal)\n || (restype_compare(r.res_type, Restype_continue)\n && res_label_in(r, labs)))) {\n switch (eo3) {\n case Some(e3):\n var%run v3 = run_expr_get_value(e3);\n return (loop());\n case None:\n return (loop());\n }\n \n } else {\n return (r);\n }\n }\n };\n switch (eo2) {\n case Some(e2):\n var%run v2 = run_expr_get_value(e2);\n var b = convert_value_to_boolean(v2);\n if (b) {\n return (follows());\n } else {\n return (rv);\n }\n case None:\n return (follows());\n }\n \n};\n\nvar run_stat_for = function (labs, eo1, eo2, eo3, t) {\n var follows = function () {\n return (run_stat_for_loop(labs, Resvalue_empty, eo2, eo3, t));\n };\n switch (eo1) {\n case Some(e1):\n var%run v1 = run_expr_get_value(e1);\n return (follows());\n case None:\n return (follows());\n }\n \n};\n\nvar run_stat_for_var = function (labs, ds, eo2, eo3, t) {\n var%ter r = run_stat(Stat_var_decl(ds));\n return (run_stat_for_loop(labs, Resvalue_empty, eo2, eo3, t));\n};\n\nvar run_expr = function (_term_) {\n switch (_term_) {\n case Coq_expr_this:\n return (c.execution_ctx_this_binding);\n case Coq_expr_identifier(x):\n var%run r = identifier_resolution(x);\n return (r);\n case Coq_expr_literal(i):\n return (convert_literal_to_prim(i));\n case Coq_expr_object(pds):\n var%object l = run_construct_prealloc(Prealloc_object, mk_nil);\n return (init_object(l, pds));\n case Coq_expr_array(oes):\n var%object l = run_construct_prealloc(Prealloc_array, mk_nil);\n return (init_array(l, oes));\n case Coq_expr_function(fo, args, bd):\n return (run_expr_function(fo, args, bd));\n case Coq_expr_access(e1, e2):\n return (run_expr_access(e1, e2));\n case Coq_expr_member(e1, f):\n return (run_expr(Expr_access(e1, Expr_literal(Literal_string(f)))));\n case Coq_expr_new(e1, e2s):\n return (run_expr_new(e1, e2s));\n case Coq_expr_call(e1, e2s):\n return (run_expr_call(e1, e2s));\n case Coq_expr_unary_op(op, e0):\n return (run_unary_op(op, e0));\n case Coq_expr_binary_op(e1, op, e2):\n return (run_expr_binary_op(op, e1, e2));\n case Coq_expr_conditional(e1, e2, e3):\n return (run_expr_conditionnal(e1, e2, e3));\n case Coq_expr_assign(e1, opo, e2):\n return (run_expr_assign(opo, e1, e2));\n }\n \n};\n\nvar run_stat = function (_term_) {\n switch (_term_) {\n case Coq_stat_expr(e):\n var%run r = run_expr_get_value(e);\n return (r);\n case Coq_stat_label(lab, t0):\n return (run_stat_label(Label_string(lab), t0));\n case Coq_stat_block(ts):\n return (run_block(rev(ts)));\n case Coq_stat_var_decl(xeos):\n return (run_var_decl(xeos));\n case Coq_stat_if(e1, t2, to0):\n return (run_stat_if(e1, t2, to0));\n case Coq_stat_do_while(ls, t1, e2):\n return (run_stat_do_while(Resvalue_empty, ls, e2, t1));\n case Coq_stat_while(ls, e1, t2):\n return (run_stat_while(Resvalue_empty, ls, e1, t2));\n case Coq_stat_with(e1, t2):\n return (run_stat_with(e1, t2));\n case Coq_stat_throw(e):\n return (run_stat_throw(e));\n case Coq_stat_return(eo):\n return (run_stat_return(eo));\n case Coq_stat_break(so):\n return (res_break(so));\n case Coq_stat_continue(so):\n return (res_continue(so));\n case Coq_stat_try(t1, t2o, t3o):\n return (run_stat_try(t1, t2o, t3o));\n case Coq_stat_for(ls, eo1, eo2, eo3, s0):\n return (run_stat_for(ls, eo1, eo2, eo3, s0));\n case Coq_stat_for_var(ls, ds, eo2, eo3, s0):\n return (run_stat_for_var(ls, ds, eo2, eo3, s0));\n case Coq_stat_for_in(ls, e1, e2, s0):\n return (\n function (s) {\n Debug.not_yet_implemented_because(__LOC__, s);\n return (Result_not_yet_implemented);}("stat_for_in"));\n case Coq_stat_for_in_var(ls, x, e1o, e2, s0):\n return (\n function (s) {\n Debug.not_yet_implemented_because(__LOC__, s);\n return (Result_not_yet_implemented);}("stat_for_in_var"));\n case Coq_stat_debugger:\n return (res_empty);\n case Coq_stat_switch(labs, e, sb):\n return (run_stat_switch(labs, e, sb));\n }\n \n};\n\nvar run_elements = function (_foo_) {\n switch (_foo_) {\n case []:\n return (Resvalue_empty);\n case (el::els_rev_2):\n var%success rv0 = run_elements(els_rev_2);\n switch (el) {\n case Coq_element_stat(t):\n var%ter r1 = run_stat(t);\n var r2 = res_overwrite_value_if_empty(rv0, r1);\n return (r2);\n case Coq_element_func_decl(name, args, bd):\n return (rv0);\n }\n \n }\n \n};\n\nvar run_prog = function (_term_) {\n switch (_term_) {\n case Coq_prog_intro(str, els):\n return (run_elements(rev(els)));\n }\n \n};\n\nvar push = function (l, args, ilen) {\n var vlen = ilen;\n switch (args) {\n case []:\n var%not_throw x = object_put(l, "length", vlen, throw_true);\n return (vlen);\n case (v::vs):\n var%string slen = to_string(vlen);\n var%not_throw x = object_put(l, slen, v, throw_true);\n return (push(l, vs, (ilen + 1.)));\n }\n \n};\n\nvar run_object_is_sealed = function (l, _foo_) {\n switch (_foo_) {\n case []:\n var%some ext = run_object_method(object_extensible_, l);\n return (!(ext));\n case (x::xs_2):\n var%run d = run_object_get_own_prop(l, x);\n switch (d) {\n case Coq_full_descriptor_undef:\n return (\n function (m) {\n Debug.impossible_with_heap_because(__LOC__, m);\n return (Result_impossible);}(\n "[run_object_is_sealed]: Undefined descriptor found in a place where it shouldn\'t."));\n case Coq_full_descriptor_some(a):\n if (attributes_configurable(a)) {\n return (false);\n } else {\n return (run_object_is_sealed(l, xs_2));\n }\n }\n \n }\n \n};\n\nvar run_object_seal = function (l, _foo_) {\n switch (_foo_) {\n case []:\n var%some _ = run_object_heap_set_extensible(false, l);\n return (l);\n case (x::xs_2):\n var%run d = run_object_get_own_prop(l, x);\n switch (d) {\n case Coq_full_descriptor_undef:\n return (\n function (m) {\n Debug.impossible_with_heap_because(__LOC__, m);\n return (Result_impossible);}(\n "[run_object_seal]: Undefined descriptor found in a place where it shouldn\'t."));\n case Coq_full_descriptor_some(a):\n if (attributes_configurable(a)) {\n var desc = {\n descriptor_value: None,\n descriptor_writable: None,\n descriptor_get: None,\n descriptor_set: None,\n descriptor_enumerable: None,\n descriptor_configurable: Some(false)\n };\n var a_2 = attributes_update(a, desc);\n } else {\n var a_2 = a;\n }\n var%bool x0 = object_define_own_prop(l, x,\n descriptor_of_attributes(a_2), true);\n return (run_object_seal(l, xs_2));\n }\n \n }\n \n};\n\nvar run_object_freeze = function (l, _foo_) {\n switch (_foo_) {\n case []:\n var%some _ = run_object_heap_set_extensible(false, l);\n return (l);\n case (x::xs_2):\n var%run d = run_object_get_own_prop(l, x);\n switch (d) {\n case Coq_full_descriptor_undef:\n return (\n function (m) {\n Debug.impossible_with_heap_because(__LOC__, m);\n return (Result_impossible);}(\n "[run_object_freeze]: Undefined descriptor found in a place where it shouldn\'t."));\n case Coq_full_descriptor_some(a):\n if ((attributes_is_data_dec(a) && attributes_writable(a))) {\n var desc = {\n descriptor_value: None,\n descriptor_writable: Some(false),\n descriptor_get: None,\n descriptor_set: None,\n descriptor_enumerable: None,\n descriptor_configurable: None\n };\n var a_2 = attributes_update(a, desc);\n } else {\n var a_2 = a;\n }\n if (attributes_configurable(a_2)) {\n var desc = {\n descriptor_value: None,\n descriptor_writable: None,\n descriptor_get: None,\n descriptor_set: None,\n descriptor_enumerable: None,\n descriptor_configurable: Some(false)\n };\n var a_3 = attributes_update(a_2, desc);\n } else {\n var a_3 = a_2;\n }\n var%bool x0 = object_define_own_prop(l, x,\n descriptor_of_attributes(a_3), true);\n return (run_object_freeze(l, xs_2));\n }\n \n }\n \n};\n\nvar run_object_is_frozen = function (l, _foo_) {\n switch (_foo_) {\n case []:\n var%some ext = run_object_method(object_extensible_, l);\n return (!(ext));\n case (x::xs_2):\n var%run d = run_object_get_own_prop(l, x);\n var check_configurable = function (a) {\n if (attributes_configurable(a)) {\n return (false);\n } else {\n return (run_object_is_frozen(l, xs_2));\n }\n };\n switch (d) {\n case Coq_full_descriptor_undef:\n return (\n function (m) {\n Debug.impossible_with_heap_because(__LOC__, m);\n return (Result_impossible);}(\n "[run_object_is_frozen]: Undefined descriptor found in a place where it shouldn\'t."));\n case Coq_full_descriptor_some(a):\n switch (a) {\n case Coq_attributes_data_of(ad):\n if (attributes_writable(ad)) {\n return (false);\n } else {\n return (check_configurable(ad));\n }\n case Coq_attributes_accessor_of(aa):\n return (check_configurable(aa));\n }\n \n }\n \n }\n \n};\n\nvar run_get_args_for_apply = function (l, index, n) {\n if ((index < n)) {\n var%string sindex = to_string(index);\n var%value v = run_object_get(l, sindex);\n var tail_args = run_get_args_for_apply(l, (index + 1.), n);\n var%run tail = tail_args;\n return (mk_cons(v, tail));\n } else {\n return (mk_nil);\n }\n};\n\nvar valueToStringForJoin = function (l, k) {\n var%string prop = to_string(k);\n var%value v = run_object_get(l, prop);\n switch (v) {\n case Coq_value_prim(p):\n switch (p) {\n case Coq_prim_undef:\n return ("");\n case Coq_prim_null:\n return ("");\n case Coq_prim_bool(b):\n var%string s3 = to_string(v);\n return (s3);\n case Coq_prim_number(n):\n var%string s3 = to_string(v);\n return (s3);\n case Coq_prim_string(s2):\n var%string s4 = to_string(v);\n return (s4);\n }\n \n case Coq_value_object(o):\n var%string s3 = to_string(v);\n return (s3);\n }\n \n};\n\nvar run_array_join_elements = function (l, k, length0, sep, sR) {\n if ((k < length0)) {\n var ss = strappend(sR, sep);\n var sE = valueToStringForJoin(l, k);\n var%run element = sE;\n var sR0 = strappend(ss, element);\n return (run_array_join_elements(l, (k + 1.), length0, sep, sR0));\n } else {\n return (sR);\n }\n};\n\nvar run_call_prealloc = function (b, vthis, args) {\n switch (b) {\n case Coq_prealloc_global_is_finite:\n var v = get_arg(0, args);\n var%number n = to_number(v);\n return (\n !(\n (JsNumber.isnan(n)\n || ((n === JsNumber.infinity) || (n === JsNumber.neg_infinity)))));\n case Coq_prealloc_global_is_nan:\n var v = get_arg(0, args);\n var%number n = to_number(v);\n return (JsNumber.isnan(n));\n case Coq_prealloc_object:\n var value0 = get_arg(0, args);\n switch (value0) {\n case Coq_value_prim(p):\n switch (p) {\n case Coq_prim_undef:\n return (run_construct_prealloc(b, args));\n case Coq_prim_null:\n return (run_construct_prealloc(b, args));\n case Coq_prim_bool(b0):\n return (to_object(value0));\n case Coq_prim_number(n):\n return (to_object(value0));\n case Coq_prim_string(s0):\n return (to_object(value0));\n }\n \n case Coq_value_object(o):\n return (to_object(value0));\n }\n \n case Coq_prealloc_object_get_proto_of:\n var v = get_arg(0, args);\n switch (v) {\n case Coq_value_prim(p):\n return (run_error(Native_error_type));\n case Coq_value_object(l):\n var%some proto = run_object_method(object_proto_, l);\n return (proto);\n }\n \n case Coq_prealloc_object_get_own_prop_descriptor:\n var v = get_arg(0, args);\n switch (v) {\n case Coq_value_prim(p):\n return (run_error(Native_error_type));\n case Coq_value_object(l):\n var%string x = to_string(get_arg(1, args));\n var%run d = run_object_get_own_prop(l, x);\n return (from_prop_descriptor(d));\n }\n \n case Coq_prealloc_object_define_prop:\n var o = get_arg(0, args);\n var p = get_arg(1, args);\n var attr = get_arg(2, args);\n switch (o) {\n case Coq_value_prim(p0):\n return (run_error(Native_error_type));\n case Coq_value_object(l):\n var%string name = to_string(p);\n var%run desc = run_to_descriptor(attr);\n var%bool x = object_define_own_prop(l, name, desc, true);\n return (l);\n }\n \n case Coq_prealloc_object_seal:\n var v = get_arg(0, args);\n switch (v) {\n case Coq_value_prim(p):\n return (run_error(Native_error_type));\n case Coq_value_object(l):\n var%some _x_ = object_properties_keys_as_list_pickable_option(l);\n return (run_object_seal(l, _x_));\n }\n \n case Coq_prealloc_object_freeze:\n var v = get_arg(0, args);\n switch (v) {\n case Coq_value_prim(p):\n return (run_error(Native_error_type));\n case Coq_value_object(l):\n var%some _x_ = object_properties_keys_as_list_pickable_option(l);\n return (run_object_freeze(l, _x_));\n }\n \n case Coq_prealloc_object_prevent_extensions:\n var v = get_arg(0, args);\n switch (v) {\n case Coq_value_prim(p):\n return (run_error(Native_error_type));\n case Coq_value_object(l):\n var%some o = object_binds_pickable_option(l);\n var o1 = object_with_extension(o, false);\n var s_2 = object_write(l, o1);\n return (l);\n }\n \n case Coq_prealloc_object_is_sealed:\n var v = get_arg(0, args);\n switch (v) {\n case Coq_value_prim(p):\n return (run_error(Native_error_type));\n case Coq_value_object(l):\n var%some _x_ = object_properties_keys_as_list_pickable_option(l);\n return (run_object_is_sealed(l, _x_));\n }\n \n case Coq_prealloc_object_is_frozen:\n var v = get_arg(0, args);\n switch (v) {\n case Coq_value_prim(p):\n return (run_error(Native_error_type));\n case Coq_value_object(l):\n var%some _x_ = object_properties_keys_as_list_pickable_option(l);\n return (run_object_is_frozen(l, _x_));\n }\n \n case Coq_prealloc_object_is_extensible:\n var v = get_arg(0, args);\n switch (v) {\n case Coq_value_prim(p):\n return (run_error(Native_error_type));\n case Coq_value_object(l):\n var%some r = run_object_method(object_extensible_, l);\n return (r);\n }\n \n case Coq_prealloc_object_proto_to_string:\n switch (vthis) {\n case Coq_value_prim(p):\n switch (p) {\n case Coq_prim_undef:\n return ("[object Undefined]");\n case Coq_prim_null:\n return ("[object Null]");\n case Coq_prim_bool(b0):\n var%object l = to_object(vthis);\n var%some s0 = run_object_method(object_class_, l);\n return (strappend("[object ", strappend(s0, "]")));\n case Coq_prim_number(n):\n var%object l = to_object(vthis);\n var%some s0 = run_object_method(object_class_, l);\n return (strappend("[object ", strappend(s0, "]")));\n case Coq_prim_string(s0):\n var%object l = to_object(vthis);\n var%some s2 = run_object_method(object_class_, l);\n return (strappend("[object ", strappend(s2, "]")));\n }\n \n case Coq_value_object(o):\n var%object l = to_object(vthis);\n var%some s0 = run_object_method(object_class_, l);\n return (strappend("[object ", strappend(s0, "]")));\n }\n \n case Coq_prealloc_object_proto_value_of:\n return (to_object(vthis));\n case Coq_prealloc_object_proto_has_own_prop:\n var v = get_arg(0, args);\n var%string x = to_string(v);\n var%object l = to_object(vthis);\n var%run d = run_object_get_own_prop(l, x);\n switch (d) {\n case Coq_full_descriptor_undef:\n return (false);\n case Coq_full_descriptor_some(a):\n return (true);\n }\n \n case Coq_prealloc_object_proto_is_prototype_of:\n var v = get_arg(0, args);\n switch (v) {\n case Coq_value_prim(p):\n return (false);\n case Coq_value_object(l):\n var%object lo = to_object(vthis);\n return (object_proto_is_prototype_of(lo, l));\n }\n \n case Coq_prealloc_object_proto_prop_is_enumerable:\n var v = get_arg(0, args);\n var%string x = to_string(v);\n var%object l = to_object(vthis);\n var%run d = run_object_get_own_prop(l, x);\n switch (d) {\n case Coq_full_descriptor_undef:\n return (false);\n case Coq_full_descriptor_some(a):\n return (attributes_enumerable(a));\n }\n \n case Coq_prealloc_function_proto:\n return (Prim_undef);\n case Coq_prealloc_function_proto_to_string:\n if (is_callable_dec(vthis)) {\n return (\n function (s) {\n Debug.not_yet_implemented_because(__LOC__, s);\n return (Result_not_yet_implemented);}(\n "Function.prototype.toString() is implementation dependent."));\n } else {\n return (run_error(Native_error_type));\n }\n case Coq_prealloc_function_proto_apply:\n var thisArg = get_arg(0, args);\n var argArray = get_arg(1, args);\n if (is_callable_dec(vthis)) {\n switch (vthis) {\n case Coq_value_prim(p):\n return (\n function (m) {\n Debug.impossible_with_heap_because(__LOC__, m);\n return (Result_impossible);}(\n "Value is callable, but isn\'t an object."));\n case Coq_value_object(thisobj):\n switch (argArray) {\n case Coq_value_prim(p):\n switch (p) {\n case Coq_prim_undef:\n return (run_call(thisobj, thisArg, mk_nil));\n case Coq_prim_null:\n return (run_call(thisobj, thisArg, mk_nil));\n case Coq_prim_bool(b0):\n return (run_error(Native_error_type));\n case Coq_prim_number(n):\n return (run_error(Native_error_type));\n case Coq_prim_string(s0):\n return (run_error(Native_error_type));\n }\n \n case Coq_value_object(array):\n var%value v = run_object_get(array, "length");\n var%run ilen = to_uint32(v);\n var%run arguments_ = run_get_args_for_apply(array, 0., ilen);\n return (run_call(thisobj, thisArg, arguments_));\n }\n \n }\n \n } else {\n return (run_error(Native_error_type));\n }\n case Coq_prealloc_function_proto_call:\n if (is_callable_dec(vthis)) {\n switch (vthis) {\n case Coq_value_prim(p):\n return (\n function (m) {\n Debug.impossible_with_heap_because(__LOC__, m);\n return (Result_impossible);}(\n "Value is callable, but isn\'t an object."));\n case Coq_value_object(thisobj):\n var (thisArg, a) = get_arg_first_and_rest(args);\n return (run_call(thisobj, thisArg, a));\n }\n \n } else {\n return (run_error(Native_error_type));\n }\n case Coq_prealloc_function_proto_bind:\n if (is_callable_dec(vthis)) {\n switch (vthis) {\n case Coq_value_prim(p):\n return (\n function (m) {\n Debug.impossible_with_heap_because(__LOC__, m);\n return (Result_impossible);}(\n "Value is callable, but isn\'t an object."));\n case Coq_value_object(thisobj):\n var (vthisArg, a) = get_arg_first_and_rest(args);\n var o1 = object_new(Prealloc_object_proto, "Object");\n var o2 = object_with_get(o1, Builtin_get_function);\n var o3 = object_with_details(o2, None, None, None, Some(thisobj),\n Some(vthisArg), Some(a), None);\n var o4 = object_set_class(o3, "Function");\n var o5 = object_set_proto(o4, Prealloc_function_proto);\n var o6 = object_with_invokation(o5, Some(Construct_after_bind),\n Some(Call_after_bind),\n Some(Builtin_has_instance_after_bind));\n var o7 = object_set_extensible(o6, true);\n var (l, s_2) = object_alloc(o7);\n var vlength = (function () {\n var%some class0 = run_object_method(object_class_, thisobj);\n if (string_eq(class0, "Function")) {\n var%number n = run_object_get(thisobj, "length");\n var%run ilen = to_int32(n);\n if ((ilen < LibList.length(a))) {\n return (0.);\n } else {\n return ((ilen - LibList.length(a)));\n }\n } else {\n return (0.);\n }\n }())\n ;\n var%run length0 = vlength;\n var a0 = {\n attributes_data_value: length0,\n attributes_data_writable: false,\n attributes_data_enumerable: false,\n attributes_data_configurable: false\n };\n var%some _ = object_heap_map_properties_pickable_option(l,\n function (p) {\n return (HeapStr.write(p, "length", a0));});\n var vthrower = Prealloc_throw_type_error;\n var a1 = {\n attributes_accessor_get: vthrower,\n attributes_accessor_set: vthrower,\n attributes_accessor_enumerable: false,\n attributes_accessor_configurable: false\n };\n var%bool x = object_define_own_prop(l, "caller",\n descriptor_of_attributes(a1), false);\n var%bool x0 = object_define_own_prop(l, "arguments",\n descriptor_of_attributes(a1), false);\n return (l);\n }\n \n } else {\n return (run_error(Native_error_type));\n }\n case Coq_prealloc_bool:\n return (\n (function () {\n var v = get_arg(0, args);\n return (convert_value_to_boolean(v));\n }())\n );\n case Coq_prealloc_bool_proto_to_string:\n switch (vthis) {\n case Coq_value_prim(p):\n switch (p) {\n case Coq_prim_undef:\n return (run_error(Native_error_type));\n case Coq_prim_null:\n return (run_error(Native_error_type));\n case Coq_prim_bool(b0):\n return (convert_bool_to_string(b0));\n case Coq_prim_number(n):\n return (run_error(Native_error_type));\n case Coq_prim_string(s0):\n return (run_error(Native_error_type));\n }\n \n case Coq_value_object(l):\n return (\n ifx_some_or_default(run_object_method(object_class_, l),\n run_error(Native_error_type), function (s0) {\n if (string_eq(s0, "Boolean")) {\n return (\n ifx_some_or_default(\n run_object_method(object_prim_value_, l),\n run_error(Native_error_type), function (wo) {\n switch (wo) {\n case Some(v):\n switch (v) {\n case Coq_value_prim(p):\n switch (p) {\n case Coq_prim_undef:\n return (run_error(Native_error_type));\n case Coq_prim_null:\n return (run_error(Native_error_type));\n case Coq_prim_bool(b0):\n return (convert_bool_to_string(b0));\n case Coq_prim_number(n):\n return (run_error(Native_error_type));\n case Coq_prim_string(s1):\n return (run_error(Native_error_type));\n }\n \n case Coq_value_object(o):\n return (run_error(Native_error_type));\n }\n \n case None:\n return (run_error(Native_error_type));\n }\n }));\n } else {\n return (run_error(Native_error_type));\n }}));\n }\n \n case Coq_prealloc_bool_proto_value_of:\n switch (vthis) {\n case Coq_value_prim(p):\n switch (p) {\n case Coq_prim_undef:\n return (run_error(Native_error_type));\n case Coq_prim_null:\n return (run_error(Native_error_type));\n case Coq_prim_bool(b0):\n return (b0);\n case Coq_prim_number(n):\n return (run_error(Native_error_type));\n case Coq_prim_string(s0):\n return (run_error(Native_error_type));\n }\n \n case Coq_value_object(l):\n return (\n ifx_some_or_default(run_object_method(object_class_, l),\n run_error(Native_error_type), function (s0) {\n if (string_eq(s0, "Boolean")) {\n return (\n ifx_some_or_default(\n run_object_method(object_prim_value_, l),\n run_error(Native_error_type), function (wo) {\n switch (wo) {\n case Some(v):\n switch (v) {\n case Coq_value_prim(p):\n switch (p) {\n case Coq_prim_undef:\n return (run_error(Native_error_type));\n case Coq_prim_null:\n return (run_error(Native_error_type));\n case Coq_prim_bool(b0):\n return (b0);\n case Coq_prim_number(n):\n return (run_error(Native_error_type));\n case Coq_prim_string(s1):\n return (run_error(Native_error_type));\n }\n \n case Coq_value_object(o):\n return (run_error(Native_error_type));\n }\n \n case None:\n return (run_error(Native_error_type));\n }\n }));\n } else {\n return (run_error(Native_error_type));\n }}));\n }\n \n case Coq_prealloc_number:\n if (list_eq_nil_decidable(args)) {\n return (JsNumber.zero);\n } else {\n var v = get_arg(0, args);return (to_number(v));\n }\n case Coq_prealloc_number_proto_value_of:\n switch (vthis) {\n case Coq_value_prim(p):\n switch (p) {\n case Coq_prim_undef:\n return (run_error(Native_error_type));\n case Coq_prim_null:\n return (run_error(Native_error_type));\n case Coq_prim_bool(b0):\n return (run_error(Native_error_type));\n case Coq_prim_number(n):\n return (n);\n case Coq_prim_string(s0):\n return (run_error(Native_error_type));\n }\n \n case Coq_value_object(l):\n return (\n ifx_some_or_default(run_object_method(object_class_, l),\n run_error(Native_error_type), function (s0) {\n if (string_eq(s0, "Number")) {\n return (\n ifx_some_or_default(\n run_object_method(object_prim_value_, l),\n run_error(Native_error_type), function (wo) {\n switch (wo) {\n case Some(v):\n switch (v) {\n case Coq_value_prim(p):\n switch (p) {\n case Coq_prim_undef:\n return (run_error(Native_error_type));\n case Coq_prim_null:\n return (run_error(Native_error_type));\n case Coq_prim_bool(b0):\n return (run_error(Native_error_type));\n case Coq_prim_number(n):\n return (n);\n case Coq_prim_string(s1):\n return (run_error(Native_error_type));\n }\n \n case Coq_value_object(o):\n return (run_error(Native_error_type));\n }\n \n case None:\n return (run_error(Native_error_type));\n }\n }));\n } else {\n return (run_error(Native_error_type));\n }}));\n }\n \n case Coq_prealloc_array:\n return (run_construct_prealloc(Prealloc_array, args));\n case Coq_prealloc_array_is_array:\n var arg = get_arg(0, args);\n switch (arg) {\n case Coq_value_prim(p):\n return (false);\n case Coq_value_object(arg0):\n var%some class0 = run_object_method(object_class_, arg0);\n if (string_eq(class0, "Array")) {\n return (true);\n } else {\n return (false);\n }\n }\n \n case Coq_prealloc_array_proto_to_string:\n var%object array = to_object(vthis);\n var%value vfunc = run_object_get(array, "join");\n if (is_callable_dec(vfunc)) {\n switch (vfunc) {\n case Coq_value_prim(p):\n return (\n function (m) {\n Debug.impossible_with_heap_because(__LOC__, m);\n return (Result_impossible);}(\n "Value is callable, but isn\'t an object."));\n case Coq_value_object(func):\n return (run_call(func, array, mk_nil));\n }\n \n } else {\n return (\n run_call_prealloc(Prealloc_object_proto_to_string, array, mk_nil));\n }\n case Coq_prealloc_array_proto_join:\n var vsep = get_arg(0, args);\n var%object l = to_object(vthis);\n var%value vlen = run_object_get(l, "length");\n var%run ilen = to_uint32(vlen);\n if (!(value_compare(vsep, Prim_undef))) {\n var rsep = vsep;\n } else {\n var rsep = ",";\n }\n var%string sep = to_string(rsep);\n if ((ilen == 0.0)) {\n return ("");\n } else {\n var sR = valueToStringForJoin(l, 0.);\n var%run sR0 = sR;\n return (run_array_join_elements(l, 1., ilen, sep, sR0));\n }\n case Coq_prealloc_array_proto_pop:\n var%object l = to_object(vthis);\n var%value vlen = run_object_get(l, "length");\n var%run ilen = to_uint32(vlen);\n if ((ilen == 0.0)) {\n var%not_throw x = object_put(l, "length", JsNumber.zero, throw_true);\n return (Prim_undef);\n } else {\n var%string sindx = to_string((ilen - 1.));\n var%value velem = run_object_get(l, sindx);\n var%not_throw x = object_delete_default(l, sindx, throw_true);\n var%not_throw x0 = object_put(l, "length", sindx, throw_true);\n return (velem);\n }\n case Coq_prealloc_array_proto_push:\n var%object l = to_object(vthis);\n var%value vlen = run_object_get(l, "length");\n var%run ilen = to_uint32(vlen);\n return (push(l, args, ilen));\n case Coq_prealloc_string:\n if (list_eq_nil_decidable(args)) {\n return ("");\n } else {\n var value0 = get_arg(0, args);\n var%string s1 = to_string(value0);\n return (s1);\n }\n case Coq_prealloc_string_proto_to_string:\n switch (vthis) {\n case Coq_value_prim(p):\n if (type_compare(type_of(vthis), Type_string)) {\n return (vthis);\n } else {\n return (run_error(Native_error_type));\n }\n case Coq_value_object(l):\n var%some s0 = run_object_method(object_class_, l);\n if (string_eq(s0, "String")) {\n return (run_object_prim_value(l));\n } else {\n return (run_error(Native_error_type));\n }\n }\n \n case Coq_prealloc_string_proto_value_of:\n switch (vthis) {\n case Coq_value_prim(p):\n if (type_compare(type_of(vthis), Type_string)) {\n return (vthis);\n } else {\n return (run_error(Native_error_type));\n }\n case Coq_value_object(l):\n var%some s0 = run_object_method(object_class_, l);\n if (string_eq(s0, "String")) {\n return (run_object_prim_value(l));\n } else {\n return (run_error(Native_error_type));\n }\n }\n \n case Coq_prealloc_error:\n var v = get_arg(0, args);\n return (build_error(Prealloc_error_proto, v));\n case Coq_prealloc_native_error(ne):\n var v = get_arg(0, args);\n return (build_error(Prealloc_native_error_proto(ne), v));\n case Coq_prealloc_throw_type_error:\n return (run_error(Native_error_type));\n default:\n return (\n function (s) {\n Debug.not_yet_implemented_because(__LOC__, s);\n return (Result_not_yet_implemented);}(\n strappend("Call prealloc_",\n strappend(string_of_prealloc(b), " not yet implemented"))));\n }\n \n};\n\nvar run_call = function (l, vthis, args) {\n var%some co = run_object_method(object_call_, l);\n var%some c0 = co;\n switch (c0) {\n case Coq_call_default:\n return (entering_func_code(l, vthis, args));\n case Coq_call_after_bind:\n var%some oarg = run_object_method(object_bound_args_, l);\n var%some boundArgs = oarg;\n var%some obnd = run_object_method(object_bound_this_, l);\n var%some boundThis = obnd;\n var%some otrg = run_object_method(object_target_function_, l);\n var%some target = otrg;\n var arguments_ = LibList.append(boundArgs, args);\n return (run_call(target, boundThis, arguments_));\n case Coq_call_prealloc(b):\n return (run_call_prealloc(b, vthis, args));\n }\n \n};\n\nvar run_javascript_from_state = function (p) {\n var c = execution_ctx_initial(prog_intro_strictness(p));\n var%void _ = execution_ctx_binding_inst(Codetype_global, None, p, mk_nil);\n return (run_prog(p));\n};\n\nvar run_javascript_from_result = function (w, p) {\n var%success _pat_any_5 = w;\n return (run_javascript_from_state(p));\n};\n\nvar run_javascript = function (p) {\n return (run_javascript_from_state(p));\n};\n}// end of with Datatypes\n}// end of with JsCommon\n}// end of with JsCommonAux\n}// end of with JsInit\n}// end of with JsInterpreterMonads\n}// end of with JsPreliminary\n}// end of with JsSyntax\n}// end of with JsSyntaxAux\n}// end of with LibList\n}// end of with LibOption\n}// end of with LibProd\n}// end of with Shared\n\nreturn {\n convert_number_to_bool: convert_number_to_bool, \n convert_string_to_bool: convert_string_to_bool, \n convert_prim_to_boolean: convert_prim_to_boolean, \n convert_value_to_boolean: convert_value_to_boolean, \n convert_prim_to_number: convert_prim_to_number, \n convert_number_to_integer: convert_number_to_integer, \n convert_bool_to_string: convert_bool_to_string, \n convert_prim_to_string: convert_prim_to_string, \n equality_test_for_same_type: equality_test_for_same_type, \n strict_equality_test: strict_equality_test, \n inequality_test_number: inequality_test_number, \n inequality_test_string: inequality_test_string, \n inequality_test_primitive: inequality_test_primitive, \n typeof_prim: typeof_prim, \n string_of_propname: string_of_propname, \n build_error: build_error, \n run_error: run_error, \n out_error_or_void: out_error_or_void, \n out_error_or_cst: out_error_or_cst, \n run_object_method: run_object_method, \n run_object_heap_set_extensible: run_object_heap_set_extensible, \n object_has_prop: object_has_prop, \n object_get_builtin: object_get_builtin, \n run_object_get: run_object_get, \n run_object_get_prop: run_object_get_prop, \n object_proto_is_prototype_of: object_proto_is_prototype_of, \n object_default_value: object_default_value, \n to_primitive: to_primitive, \n to_number: to_number, \n to_integer: to_integer, \n to_int32: to_int32, \n to_uint32: to_uint32, \n to_string: to_string, \n object_can_put: object_can_put, \n run_object_define_own_prop_array_loop: run_object_define_own_prop_array_loop, \n object_define_own_prop: object_define_own_prop, \n run_to_descriptor: run_to_descriptor, \n prim_new_object: prim_new_object, \n to_object: to_object, \n run_object_prim_value: run_object_prim_value, \n prim_value_get: prim_value_get, \n env_record_has_binding: env_record_has_binding, \n lexical_env_get_identifier_ref: lexical_env_get_identifier_ref, \n object_delete_default: object_delete_default, \n object_delete: object_delete, \n env_record_delete_binding: env_record_delete_binding, \n env_record_implicit_this_value: env_record_implicit_this_value, \n identifier_resolution: identifier_resolution, \n env_record_get_binding_value: env_record_get_binding_value, \n ref_get_value: ref_get_value, \n run_expr_get_value: run_expr_get_value, \n object_put_complete: object_put_complete, \n object_put: object_put, \n env_record_set_mutable_binding: env_record_set_mutable_binding, \n prim_value_put: prim_value_put, \n ref_put_value: ref_put_value, \n env_record_create_mutable_binding: env_record_create_mutable_binding, \n env_record_create_set_mutable_binding: env_record_create_set_mutable_binding, \n env_record_create_immutable_binding: env_record_create_immutable_binding, \n env_record_initialize_immutable_binding: env_record_initialize_immutable_binding, \n call_object_new: call_object_new, \n array_args_map_loop: array_args_map_loop, \n string_of_prealloc: string_of_prealloc, \n run_construct_prealloc: run_construct_prealloc, \n run_construct_default: run_construct_default, \n run_construct: run_construct, \n run_call_default: run_call_default, \n creating_function_object_proto: creating_function_object_proto, \n creating_function_object: creating_function_object, \n binding_inst_formal_params: binding_inst_formal_params, \n binding_inst_function_decls: binding_inst_function_decls, \n make_arg_getter: make_arg_getter, \n make_arg_setter: make_arg_setter, \n arguments_object_map_loop: arguments_object_map_loop, \n arguments_object_map: arguments_object_map, \n create_arguments_object: create_arguments_object, \n binding_inst_arg_obj: binding_inst_arg_obj, \n binding_inst_var_decls: binding_inst_var_decls, \n execution_ctx_binding_inst: execution_ctx_binding_inst, \n entering_func_code: entering_func_code, \n run_object_get_own_prop: run_object_get_own_prop, \n run_function_has_instance: run_function_has_instance, \n run_object_has_instance: run_object_has_instance, \n from_prop_descriptor: from_prop_descriptor, \n run_equal: run_equal, \n convert_twice: convert_twice, \n convert_twice_primitive: convert_twice_primitive, \n convert_twice_number: convert_twice_number, \n convert_twice_string: convert_twice_string, \n issome: issome, \n run_binary_op_add: run_binary_op_add, \n run_binary_op_arith: run_binary_op_arith, \n run_binary_op_shift: run_binary_op_shift, \n run_binary_op_bitwise: run_binary_op_bitwise, \n run_binary_op_compare: run_binary_op_compare, \n run_binary_op_instanceof: run_binary_op_instanceof, \n run_binary_op_in: run_binary_op_in, \n run_binary_op: run_binary_op, \n run_prepost_op: run_prepost_op, \n run_typeof_value: run_typeof_value, \n run_unary_op: run_unary_op, \n create_new_function_in: create_new_function_in, \n init_object: init_object, \n run_array_element_list: run_array_element_list, \n init_array: init_array, \n run_var_decl_item: run_var_decl_item, \n run_var_decl: run_var_decl, \n run_list_expr: run_list_expr, \n run_block: run_block, \n run_binary_op_and: run_binary_op_and, \n run_binary_op_or: run_binary_op_or, \n run_expr_binary_op: run_expr_binary_op, \n run_expr_access: run_expr_access, \n run_expr_assign: run_expr_assign, \n run_expr_function: run_expr_function, \n entering_eval_code: entering_eval_code, \n run_eval: run_eval, \n run_expr_call: run_expr_call, \n run_expr_conditionnal: run_expr_conditionnal, \n run_expr_new: run_expr_new, \n run_stat_label: run_stat_label, \n run_stat_with: run_stat_with, \n run_stat_if: run_stat_if, \n run_stat_while: run_stat_while, \n run_stat_switch_end: run_stat_switch_end, \n run_stat_switch_no_default: run_stat_switch_no_default, \n run_stat_switch_with_default_default: run_stat_switch_with_default_default, \n run_stat_switch_with_default_B: run_stat_switch_with_default_B, \n run_stat_switch_with_default_A: run_stat_switch_with_default_A, \n run_stat_switch: run_stat_switch, \n run_stat_do_while: run_stat_do_while, \n run_stat_try: run_stat_try, \n run_stat_throw: run_stat_throw, \n run_stat_return: run_stat_return, \n run_stat_for_loop: run_stat_for_loop, \n run_stat_for: run_stat_for, \n run_stat_for_var: run_stat_for_var, \n run_expr: run_expr, \n run_stat: run_stat, \n run_elements: run_elements, \n run_prog: run_prog, \n push: push, \n run_object_is_sealed: run_object_is_sealed, \n run_object_seal: run_object_seal, \n run_object_freeze: run_object_freeze, \n run_object_is_frozen: run_object_is_frozen, \n run_get_args_for_apply: run_get_args_for_apply, \n valueToStringForJoin: valueToStringForJoin, \n run_array_join_elements: run_array_join_elements, \n run_call_prealloc: run_call_prealloc, \n run_call: run_call, \n run_javascript_from_state: run_javascript_from_state, \n run_javascript_from_result: run_javascript_from_result, \n run_javascript: run_javascript};\n})();\n'}, + +/* --------------------- JsInterpreter.ml --------------------- */ + { file: 'JsInterpreter.ml', contents: 'open Datatypes\nopen JsCommon\nopen JsCommonAux\nopen JsInit\nopen JsInterpreterMonads\nopen JsPreliminary\nopen JsSyntax\nopen JsSyntaxAux\nopen LibList\nopen LibOption\nopen LibProd\nopen Shared\n\n(*------------JS preliminary -----------*)\n\n(** val convert_number_to_bool : number -> bool **)\n\nlet convert_number_to_bool n =\n if (JsNumber.isposzero n)\n || (JsNumber.isnegzero n)\n || (JsNumber.isnan n)\n then false\n else true\n\n(** val convert_string_to_bool : string -> bool **)\n\nlet convert_string_to_bool s =\n if string_eq s "" then false else true\n (* Arthur hack string.empty *)\n\n(** val convert_prim_to_boolean : prim -> bool **)\n\nlet convert_prim_to_boolean _foo_ = match _foo_ with\n| Coq_prim_undef -> false\n| Coq_prim_null -> false\n| Coq_prim_bool b -> b\n| Coq_prim_number n -> convert_number_to_bool n\n| Coq_prim_string s -> convert_string_to_bool s\n\n(** val convert_value_to_boolean : value -> bool **)\n\nlet convert_value_to_boolean _foo_ = match _foo_ with\n| Coq_value_prim p -> convert_prim_to_boolean p\n| Coq_value_object o -> true\n\n(** val convert_prim_to_number : prim -> number **)\n\nlet convert_prim_to_number _foo_ = match _foo_ with\n| Coq_prim_undef -> JsNumber.nan\n| Coq_prim_null -> JsNumber.zero\n| Coq_prim_bool b -> if b then JsNumber.one else JsNumber.zero\n| Coq_prim_number n -> n\n| Coq_prim_string s -> JsNumber.from_string s\n\n(** val convert_number_to_integer : number -> number **)\n\nlet convert_number_to_integer n =\n if JsNumber.isnan n\n then JsNumber.zero\n else if (JsNumber.isposzero n)\n || (JsNumber.isnegzero n)\n || (n === JsNumber.infinity)\n || (n === JsNumber.neg_infinity)\n then n\n else (JsNumber.sign n) *. (JsNumber.floor (JsNumber.absolute n))\n\n(** val convert_bool_to_string : bool -> string **)\n\nlet convert_bool_to_string _foo_ = match _foo_ with\n| true -> "true"\n| false -> "false"\n\n(** val convert_prim_to_string : prim -> string **)\n\nlet convert_prim_to_string _foo_ = match _foo_ with\n| Coq_prim_undef ->\n "undefined"\n| Coq_prim_null -> "null"\n| Coq_prim_bool b -> convert_bool_to_string b\n| Coq_prim_number n -> JsNumber.to_string n\n| Coq_prim_string s -> s\n\n(** val equality_test_for_same_type : coq_type -> value -> value -> bool **)\n\nlet equality_test_for_same_type ty v1 v2 =\n match ty with\n | Coq_type_undef -> true\n | Coq_type_null -> true\n | Coq_type_bool -> value_compare v1 v2\n | Coq_type_number ->\n (match v1 with\n | Coq_value_prim p ->\n (match p with\n | Coq_prim_undef -> false\n | Coq_prim_null -> false\n | Coq_prim_bool b -> false\n | Coq_prim_number n1 ->\n (match v2 with\n | Coq_value_prim p0 ->\n (match p0 with\n | Coq_prim_undef -> false\n | Coq_prim_null -> false\n | Coq_prim_bool b -> false\n | Coq_prim_number n2 ->\n if JsNumber.isnan n1\n then false\n else if JsNumber.isnan n2\n then false\n else if (JsNumber.isposzero n1)\n && (JsNumber.isnegzero n2)\n then true\n else if (JsNumber.isnegzero n1)\n && (JsNumber.isposzero n2)\n then true\n else n1 === n2\n | Coq_prim_string s -> false)\n | Coq_value_object o -> false)\n | Coq_prim_string s -> false)\n | Coq_value_object o -> false)\n | Coq_type_string -> value_compare v1 v2\n | Coq_type_object -> value_compare v1 v2\n\n(** val strict_equality_test : value -> value -> bool **)\n\nlet strict_equality_test v1 v2 =\n let ty1 = type_of v1 in\n let ty2 = type_of v2 in\n if type_compare ty1 ty2\n then equality_test_for_same_type ty1 v1 v2\n else false\n\n(** val inequality_test_number : number -> number -> prim **)\n\nlet inequality_test_number n1 n2 =\n if (JsNumber.isnan n1) || (JsNumber.isnan n2)\n then Coq_prim_undef\n else if n1 === n2\n then Coq_prim_bool false\n else if (JsNumber.isposzero n1)\n && (JsNumber.isnegzero n2)\n then Coq_prim_bool false\n else if (JsNumber.isnegzero n1)\n && (JsNumber.isposzero n2)\n then Coq_prim_bool false\n else if n1 === JsNumber.infinity\n then Coq_prim_bool false\n else if n2 === JsNumber.infinity\n then Coq_prim_bool true\n else if n2 === JsNumber.neg_infinity\n then Coq_prim_bool false\n else if n1 === JsNumber.neg_infinity\n then Coq_prim_bool true\n else Coq_prim_bool (n1 < n2)\n\n(** val inequality_test_string : string -> string -> bool **)\n\n(* ARTHUR hack \nlet rec inequality_test_string s1 s2 =\n match s1 with\n | [] ->\n (match s2 with\n | [] -> false\n | a::s -> true)\n | c1::s1_2 ->\n (match s2 with\n | [] -> false\n | c2::s2_2 ->\n if ascii_comparable c1 c2\n then inequality_test_string s1_2 s2_2\n else lt_int_decidable (int_of_char c1) (int_of_char c2))\n*)\nlet inequality_test_string s1 s2 = string_lt s1 s2\n\n\n(** val inequality_test_primitive : prim -> prim -> prim **)\n\nlet inequality_test_primitive w1 w2 =\n match w1 with\n | Coq_prim_undef ->\n inequality_test_number (convert_prim_to_number w1)\n (convert_prim_to_number w2)\n | Coq_prim_null ->\n inequality_test_number (convert_prim_to_number w1)\n (convert_prim_to_number w2)\n | Coq_prim_bool b ->\n inequality_test_number (convert_prim_to_number w1)\n (convert_prim_to_number w2)\n | Coq_prim_number n ->\n inequality_test_number (convert_prim_to_number w1)\n (convert_prim_to_number w2)\n | Coq_prim_string s1 ->\n (match w2 with\n | Coq_prim_undef ->\n inequality_test_number (convert_prim_to_number w1)\n (convert_prim_to_number w2)\n | Coq_prim_null ->\n inequality_test_number (convert_prim_to_number w1)\n (convert_prim_to_number w2)\n | Coq_prim_bool b ->\n inequality_test_number (convert_prim_to_number w1)\n (convert_prim_to_number w2)\n | Coq_prim_number n ->\n inequality_test_number (convert_prim_to_number w1)\n (convert_prim_to_number w2)\n | Coq_prim_string s2 -> Coq_prim_bool (inequality_test_string s1 s2))\n\n(** val typeof_prim : prim -> string **)\n\nlet typeof_prim _foo_ = match _foo_ with\n| Coq_prim_undef ->\n "undefined"\n| Coq_prim_null -> "object"\n| Coq_prim_bool b -> "boolean"\n| Coq_prim_number n -> "number"\n| Coq_prim_string s -> "string"\n\n(** val string_of_propname : propname -> prop_name **)\n\nlet string_of_propname _foo_ = match _foo_ with\n| Coq_propname_identifier s -> s\n| Coq_propname_string s -> s\n| Coq_propname_number n -> JsNumber.to_string n\n\n(*---------------------------------*)\n\n(** val build_error : state -> value -> value -> result **)\n\nlet build_error s vproto vmsg =\n let o = object_new vproto ("Error") in\n let (l, s_2) = object_alloc s o in\n if value_compare vmsg (Coq_value_prim Coq_prim_undef)\n then result_out (Coq_out_ter (s_2, (res_val (Coq_value_object l))))\n else (fun s -> Debug.not_yet_implemented_because __LOC__ s; Coq_result_not_yet_implemented)\n ("Need [to_string] (this function shall be put in [runs_type].)")\n\n(** val run_error : state -> native_error -> \'a1 specres **)\n\nlet run_error s ne =\n let%object (s_2, l) = (build_error s (Coq_value_object (Coq_object_loc_prealloc\n (Coq_prealloc_native_error_proto ne))) (Coq_value_prim Coq_prim_undef)) in\n Coq_result_some (Coq_specret_out (Coq_out_ter (s_2,\n (res_throw (Coq_resvalue_value (Coq_value_object l))))))\n\n(** val out_error_or_void :\n state -> strictness_flag -> native_error -> result **)\n\nlet out_error_or_void s str ne =\n if str then run_error s ne else result_out (out_void s)\n\n(** val out_error_or_cst :\n state -> strictness_flag -> native_error -> value -> result **)\n\nlet out_error_or_cst s str ne v =\n if str then run_error s ne else result_out (Coq_out_ter (s, (res_val v)))\n\n(** val run_object_method :\n (coq_object -> \'a1) -> state -> object_loc -> \'a1 option **)\n\nlet run_object_method proj s l =\n LibOption.map proj (object_binds_pickable_option s l)\n\n(*---DEBUG\n let run_object_method proj s l =\n let opt = object_binds_pickable_option s l in\n begin match opt with\n | None -> Debug.run_object_method l\n | _ -> ()\n end;\n LibOption.map proj opt\n*)\n\n\n(** val run_object_heap_set_extensible :\n bool -> state -> object_loc -> state option **)\n\nlet run_object_heap_set_extensible b s l =\n LibOption.map (fun o -> object_write s l (object_set_extensible o b))\n (object_binds_pickable_option s l)\n\n(* DEBUG\n let run_object_heap_set_extensible b s l =\n let opt = object_binds_pickable_option s l in\n begin match opt with\n | None -> Debug.run_object_heap_set_extensible l\n | _ -> ()\n end;\n LibOption.map (fun o -> object_write s l (object_set_extensible o b)) opt\n*)\n\n(** val object_has_prop :\n state -> execution_ctx -> object_loc -> prop_name -> result **)\n\nlet rec object_has_prop s c l x =\n let%some b = (run_object_method object_has_prop_ s l) in\n match b with Coq_builtin_has_prop_default ->\n let%run (s1, d) = (run_object_get_prop s c l x) in\n res_ter s1\n (res_val (Coq_value_prim (Coq_prim_bool\n (not\n (full_descriptor_compare d Coq_full_descriptor_undef)))))\n\n(** val object_get_builtin :\n state -> execution_ctx -> builtin_get -> value -> object_loc\n -> prop_name -> result **)\n\nand object_get_builtin s c b vthis l x =\n let def s0 l0 =\n let%run (s1, d) = (run_object_get_prop s0 c l0 x) in\n match d with\n | Coq_full_descriptor_undef ->\n res_ter s1 (res_val (Coq_value_prim Coq_prim_undef))\n | Coq_full_descriptor_some a ->\n (match a with\n | Coq_attributes_data_of ad ->\n res_ter s1 (res_val ad.attributes_data_value)\n | Coq_attributes_accessor_of aa ->\n (match aa.attributes_accessor_get with\n | Coq_value_prim p ->\n (match p with\n | Coq_prim_undef ->\n res_ter s1 (res_val (Coq_value_prim Coq_prim_undef))\n | Coq_prim_null -> Coq_result_impossible\n | Coq_prim_bool b0 -> Coq_result_impossible\n | Coq_prim_number n -> Coq_result_impossible\n | Coq_prim_string s2 -> Coq_result_impossible)\n | Coq_value_object lf -> run_call s1 c lf vthis [])) in\n let function0 s0 =\n let%value (s_2, v) = (def s0 l) in\n if spec_function_get_error_case_dec s_2 x v\n then run_error s_2 Coq_native_error_type\n else res_ter s_2 (res_val v) in\n match b with\n | Coq_builtin_get_default -> def s l\n | Coq_builtin_get_function -> function0 s\n | Coq_builtin_get_args_obj ->\n let%some lmapo = (run_object_method object_parameter_map_ s l) in\n let%some lmap = (lmapo) in\n let%run (s0, d) = (run_object_get_own_prop s c lmap x) in\n match d with\n | Coq_full_descriptor_undef -> function0 s0\n | Coq_full_descriptor_some a -> run_object_get s0 c lmap x\n\n(** val run_object_get :\n state -> execution_ctx -> object_loc -> prop_name -> result **)\n\nand run_object_get s c l x =\n let%some b = (run_object_method object_get_ s l) in\n object_get_builtin s c b (Coq_value_object l) l x\n\n(** val run_object_get_prop :\n state -> execution_ctx -> object_loc -> prop_name ->\n full_descriptor specres **)\n\nand run_object_get_prop s c l x =\n let%some b = (run_object_method object_get_prop_ s l) in\n match b with Coq_builtin_get_prop_default ->\n let%run (s1, d) = (run_object_get_own_prop s c l x) in\n if full_descriptor_compare d Coq_full_descriptor_undef\n then let%some proto = (run_object_method object_proto_ s1 l) in\n match proto with\n | Coq_value_prim p ->\n (match p with\n | Coq_prim_null -> res_spec s1 Coq_full_descriptor_undef\n | _ ->\n (fun s m -> Debug.impossible_with_heap_because __LOC__ s m; Coq_result_impossible)\n s1\n ("Found a non-null primitive value as a prototype in [run_object_get_prop]."))\n | Coq_value_object lproto ->\n run_object_get_prop s1 c lproto x\n else res_spec s1 d\n\n(** val object_proto_is_prototype_of :\n state -> object_loc -> object_loc -> result **)\n\nand object_proto_is_prototype_of s l0 l =\n let%some b = (run_object_method object_proto_ s l) in\n match b with\n | Coq_value_prim p ->\n (match p with\n | Coq_prim_null ->\n result_out (Coq_out_ter (s,\n (res_val (Coq_value_prim (Coq_prim_bool false)))))\n | _ ->\n (fun s m -> Debug.impossible_with_heap_because __LOC__ s m; Coq_result_impossible)\n s\n ("[run_object_method] returned a primitive in [object_proto_is_prototype_of_body]."))\n | Coq_value_object l_2 ->\n if object_loc_compare l_2 l0\n then result_out (Coq_out_ter (s,\n (res_val (Coq_value_prim (Coq_prim_bool true)))))\n else object_proto_is_prototype_of s l0 l_2\n\n(** val object_default_value :\n state -> execution_ctx -> object_loc -> preftype option ->\n result **)\n\nand object_default_value s c l prefo =\n let%some b = (run_object_method object_default_value_ s l) in\n match b with Coq_builtin_default_value_default ->\n let gpref = unsome_default Coq_preftype_number prefo in\n let lpref = other_preftypes gpref in\n let sub0 s_2 x k =\n let%value (s1, vfo) = (run_object_get s_2 c l x) in\n let%some co = (run_callable s1 vfo) in\n match co with\n | Some b0 ->\n let%object (s2, lfunc) = (result_out (Coq_out_ter (s1, (res_val vfo)))) in\n let%value (s3, v) = (run_call s2 c lfunc (Coq_value_object l) []) in begin\n match v with\n | Coq_value_prim w ->\n result_out (Coq_out_ter (s3, (res_val (Coq_value_prim w))))\n | Coq_value_object l0 -> k s3\n end\n | None -> k s1 in\n let gmeth = (method_of_preftype gpref) in\n sub0 s gmeth (fun s_2 ->\n let lmeth = method_of_preftype lpref in\n sub0 s_2 lmeth (fun s_3 -> run_error s_3 Coq_native_error_type))\n\n(** val to_primitive :\n state -> execution_ctx -> value -> preftype option -> result **)\n\nand to_primitive s c v prefo =\n match v with\n | Coq_value_prim w ->\n result_out (Coq_out_ter (s, (res_val (Coq_value_prim w))))\n | Coq_value_object l ->\n let%prim (s0, r) = (object_default_value s c l prefo) in\n res_ter s0 (res_val (Coq_value_prim r))\n\n(** val to_number :\n state -> execution_ctx -> value -> result **)\n\nand to_number s c _foo_ = match _foo_ with\n | Coq_value_prim w ->\n result_out (Coq_out_ter (s, (res_val (Coq_value_prim (Coq_prim_number (convert_prim_to_number w))))))\n | Coq_value_object l ->\n let%prim (s1, w) = (to_primitive s c (Coq_value_object l) (Some Coq_preftype_number)) in\n res_ter s1 (res_val (Coq_value_prim (Coq_prim_number (convert_prim_to_number w))))\n\n(** val to_integer :\n state -> execution_ctx -> value -> result **)\n\nand to_integer s c v =\n let%number (s1, n) = to_number s c v in\n res_ter s1\n (res_val (Coq_value_prim (Coq_prim_number\n (convert_number_to_integer n))))\n\n(** val to_int32 :\n state -> execution_ctx -> value -> float specres **)\n\nand to_int32 s c v =\n let%number (s_2, n) = to_number s c v in res_spec s_2 (JsNumber.to_int32 n)\n\n(** val to_uint32 :\n state -> execution_ctx -> value -> float specres **)\n\nand to_uint32 s c v =\n let%number (s_2, n) = to_number s c v in res_spec s_2 (JsNumber.to_uint32 n)\n\n(** val to_string :\n state -> execution_ctx -> value -> result **)\n\nand to_string s c _foo_ = match _foo_ with\n | Coq_value_prim w ->\n result_out (Coq_out_ter (s,\n (res_val (Coq_value_prim (Coq_prim_string (convert_prim_to_string w))))))\n | Coq_value_object l ->\n let%prim (s1, w) = (to_primitive s c (Coq_value_object l) (Some Coq_preftype_string)) in\n res_ter s1\n (res_val (Coq_value_prim (Coq_prim_string (convert_prim_to_string w))))\n\n(** val object_can_put :\n state -> execution_ctx -> object_loc -> prop_name -> result **)\n\nand object_can_put s c l x =\n let%some b = (run_object_method object_can_put_ s l) in\n match b with Coq_builtin_can_put_default ->\n let%run (s1, d) = (run_object_get_own_prop s c l x) in begin\n match d with\n | Coq_full_descriptor_undef ->\n let%some vproto = (run_object_method object_proto_ s1 l) in begin\n match vproto with\n | Coq_value_prim p ->\n (match p with\n | Coq_prim_null ->\n let%some b0= (run_object_method object_extensible_ s1 l) in\n res_ter s1 (res_val (Coq_value_prim (Coq_prim_bool b0)))\n | _ ->\n (fun s m -> Debug.impossible_with_heap_because __LOC__ s m; Coq_result_impossible)\n s1\n ("Non-null primitive get as a prototype value in [object_can_put]."))\n | Coq_value_object lproto ->\n let%run (s2, d_2) = (run_object_get_prop s1 c lproto x) in\n match d_2 with\n | Coq_full_descriptor_undef ->\n let%some b0= (run_object_method object_extensible_ s2 l) in\n res_ter s2 (res_val (Coq_value_prim (Coq_prim_bool b0)))\n | Coq_full_descriptor_some a ->\n (match a with\n | Coq_attributes_data_of ad ->\n let%some ext = (run_object_method object_extensible_ s2 l) in\n res_ter s2\n (if ext\n then res_val (Coq_value_prim (Coq_prim_bool\n ad.attributes_data_writable))\n else res_val (Coq_value_prim (Coq_prim_bool false)))\n | Coq_attributes_accessor_of aa ->\n res_ter s2\n (res_val (Coq_value_prim (Coq_prim_bool\n (not\n (value_compare aa.attributes_accessor_set\n (Coq_value_prim Coq_prim_undef)))))))\n end\n | Coq_full_descriptor_some a ->\n (match a with\n | Coq_attributes_data_of ad ->\n res_ter s1\n (res_val (Coq_value_prim (Coq_prim_bool\n ad.attributes_data_writable)))\n | Coq_attributes_accessor_of aa ->\n res_ter s1\n (res_val (Coq_value_prim (Coq_prim_bool\n (not\n (value_compare aa.attributes_accessor_set (Coq_value_prim\n Coq_prim_undef)))))))\n end\n\n(** val run_object_define_own_prop_array_loop :\n state -> execution_ctx -> object_loc -> float -> float ->\n descriptor -> bool -> bool -> (state -> prop_name -> descriptor ->\n strictness_flag -> __ specres) -> result **)\n\nand run_object_define_own_prop_array_loop s c l newLen oldLen newLenDesc newWritable throwcont def =\n if newLen < oldLen\n then let oldLen_2 = (oldLen -. 1.) in\n let%string (s0, slen) = (to_string s c (Coq_value_prim (Coq_prim_number oldLen_2))) in\n let%bool (s1, deleteSucceeded) = (object_delete s0 c l slen false) in\n if not deleteSucceeded\n then let newLenDesc0 =\n (descriptor_with_value\n newLenDesc\n (Some (Coq_value_prim\n (Coq_prim_number (oldLen_2 +. 1.))))) in\n let newLenDesc1 = (if not newWritable\n then descriptor_with_writable newLenDesc0 (Some false)\n else newLenDesc0) in\n let%bool (s2, x) = (def s1 ("length")\n newLenDesc1 false) in\n out_error_or_cst s2 throwcont Coq_native_error_type\n (Coq_value_prim (Coq_prim_bool false))\n else run_object_define_own_prop_array_loop s1 c l\n newLen oldLen_2 newLenDesc newWritable throwcont def\n else if not newWritable\n then def s ("length")\n { descriptor_value = None; descriptor_writable = (Some false);\n descriptor_get = None; descriptor_set = None;\n descriptor_enumerable = None; descriptor_configurable = None }\n false\n else res_ter s (res_val (Coq_value_prim (Coq_prim_bool true)))\n\n(** val object_define_own_prop :\n state -> execution_ctx -> object_loc -> prop_name ->\n descriptor -> strictness_flag -> result **)\n\nand object_define_own_prop s c l x desc throwcont =\n let reject s0 throwcont0 =\n out_error_or_cst\n s0 throwcont0 Coq_native_error_type (Coq_value_prim\n (Coq_prim_bool false)) in\n let def s0 x0 desc0 throwcont0 =\n let%run (s1, d) = (run_object_get_own_prop s0 c l x0) in\n let%some ext = (run_object_method object_extensible_ s1 l) in\n match d with\n | Coq_full_descriptor_undef ->\n if ext\n then let a = (if (descriptor_is_generic_dec desc0) || (descriptor_is_data_dec desc0)\n then Coq_attributes_data_of\n (attributes_data_of_descriptor desc0)\n else Coq_attributes_accessor_of\n (attributes_accessor_of_descriptor desc0)) in\n let%some s2 = (object_heap_map_properties_pickable_option s1 l\n (fun p -> HeapStr.write p x0 a)) in\n res_ter s2\n (res_val (Coq_value_prim (Coq_prim_bool true)))\n else reject s1 throwcont0\n | Coq_full_descriptor_some a ->\n let object_define_own_prop_write s2 a0 =\n let a_2 = attributes_update a0 desc0 in\n let%some s3 = (object_heap_map_properties_pickable_option s2 l (fun p -> HeapStr.write p x0 a_2)) in\n res_ter s3 (res_val (Coq_value_prim (Coq_prim_bool true))) in\n if descriptor_contains_dec (descriptor_of_attributes a) desc0\n then res_ter s1 (res_val (Coq_value_prim (Coq_prim_bool true)))\n else if attributes_change_enumerable_on_non_configurable_dec a desc0\n then reject s1 throwcont0\n else if descriptor_is_generic_dec desc0\n then object_define_own_prop_write s1 a\n else if not (bool_eq (attributes_is_data_dec a) (descriptor_is_data_dec desc0))\n then if attributes_configurable a\n then let a_2 = (match a with\n | Coq_attributes_data_of ad ->\n Coq_attributes_accessor_of (attributes_accessor_of_attributes_data ad)\n | Coq_attributes_accessor_of aa ->\n Coq_attributes_data_of (attributes_data_of_attributes_accessor aa)) in\n let%some s2 = (object_heap_map_properties_pickable_option\n s1 l (fun p -> HeapStr.write p x0 a_2)) in\n object_define_own_prop_write s2 a_2\n else reject s1 throwcont0\n else if (attributes_is_data_dec a) && (descriptor_is_data_dec desc0)\n then (match a with\n | Coq_attributes_data_of ad ->\n if attributes_change_data_on_non_configurable_dec ad desc0\n then reject s1 throwcont0\n else object_define_own_prop_write s1 a\n | Coq_attributes_accessor_of a0 ->\n (fun s m -> Debug.impossible_with_heap_because __LOC__ s m; Coq_result_impossible)\n s0\n ("data is not accessor in [defineOwnProperty]"))\n else if (not (attributes_is_data_dec a)) && (descriptor_is_accessor_dec desc0)\n then (match a with\n | Coq_attributes_data_of a0 ->\n (fun s m -> Debug.impossible_with_heap_because __LOC__ s m; Coq_result_impossible)\n s0\n ("accessor is not data in [defineOwnProperty]")\n | Coq_attributes_accessor_of aa ->\n if attributes_change_accessor_on_non_configurable_dec aa desc0\n then reject s1 throwcont0\n else object_define_own_prop_write s1 a)\n else (fun s m -> Debug.impossible_with_heap_because __LOC__ s m; Coq_result_impossible)\n s0\n ("cases are mutually exclusives in [defineOwnProperty]") in\n let%some b = (run_object_method object_define_own_prop_ s l) in\n match b with\n | Coq_builtin_define_own_prop_default -> def s x desc throwcont\n | Coq_builtin_define_own_prop_array ->\n let%run (s0, d) = (run_object_get_own_prop s c l ("length")) in begin\n match d with\n | Coq_full_descriptor_undef ->\n (fun s m -> Debug.impossible_with_heap_because __LOC__ s m; Coq_result_impossible)\n s0\n ("Array length property descriptor cannot be undefined.")\n | Coq_full_descriptor_some attr ->\n (match attr with\n | Coq_attributes_data_of a ->\n let oldLen = (a.attributes_data_value) in begin\n match oldLen with\n | Coq_value_prim w ->\n let oldLen0 = (JsNumber.to_uint32 (convert_prim_to_number w)) in\n let descValueOpt = (desc.descriptor_value) in\n if string_eq x ("length")\n then (match descValueOpt with\n | Some descValue ->\n let%run (s1, newLen) = (to_uint32 s0 c descValue) in\n let%number (s2, newLenN) = to_number s1 c descValue in\n if not (newLen === newLenN)\n then run_error s2 Coq_native_error_range\n else let newLenDesc =\n (descriptor_with_value desc (Some (Coq_value_prim (Coq_prim_number newLen)))) in\n if le_int_decidable oldLen0 newLen\n then def s2 ("length") newLenDesc throwcont\n else if not a.attributes_data_writable\n then reject s2 throwcont\n else let newWritable = (match newLenDesc.descriptor_writable with\n | Some b0 -> if b0 then true else false\n | None -> true) in\n let newLenDesc0 = (if not newWritable\n then descriptor_with_writable newLenDesc (Some true)\n else newLenDesc) in\n let%bool (s3, succ) = (def s2 ("length") newLenDesc0 throwcont) in\n if not succ\n then res_ter s3 (res_val (Coq_value_prim (Coq_prim_bool false)))\n else run_object_define_own_prop_array_loop s3 c l newLen oldLen0 newLenDesc0 newWritable throwcont def\n | None -> def s0 ("length") desc throwcont)\n else let%run (s1, ilen) = (to_uint32 s0 c (Coq_value_prim (Coq_prim_string x))) in\n let%string (s2, slen) = (to_string s1 c (Coq_value_prim (Coq_prim_number ilen))) in\n if (string_eq x slen) && (not ( ilen = 4294967295.))\n then let%run (s3, index) = (to_uint32 s2 c (Coq_value_prim (Coq_prim_string x))) in\n if (le_int_decidable oldLen0 index) && (not a.attributes_data_writable)\n then reject s3 throwcont\n else let%bool (s4, b0) = (def s3 x desc false) in\n if not b0\n then reject s4 throwcont\n else if le_int_decidable oldLen0 index\n then let a0 =\n descriptor_with_value (descriptor_of_attributes (Coq_attributes_data_of a))\n (Some (Coq_value_prim (Coq_prim_number (index +. 1.)))) in\n def s4 ("length") a0 false\n else res_ter s4 (res_val (Coq_value_prim (Coq_prim_bool true)))\n else def s2 x desc throwcont\n | Coq_value_object l0 ->\n (fun s m -> Debug.impossible_with_heap_because __LOC__ s m; Coq_result_impossible)\n s0\n ("Spec asserts length of array is number.")\n end\n | Coq_attributes_accessor_of a ->\n (fun s m -> Debug.impossible_with_heap_because __LOC__ s m; Coq_result_impossible)\n s0\n ("Array length property descriptor cannot be accessor."))\n end\n | Coq_builtin_define_own_prop_args_obj ->\n let%some lmapo = (run_object_method object_parameter_map_ s l) in\n let%some lmap = (lmapo) in\n let%run (s0, d) = (run_object_get_own_prop s c lmap x) in\n let%bool (s1, b0) = (def s0 x desc false) in\n if b0\n then let follow s2 = res_ter s2 (res_val (Coq_value_prim (Coq_prim_bool true))) in\n match d with\n | Coq_full_descriptor_undef -> follow s1\n | Coq_full_descriptor_some a ->\n if descriptor_is_accessor_dec desc\n then let%bool (s2, x0) = (object_delete s1 c lmap x false) in follow s2\n else let follow0 s2 =\n if option_compare bool_eq desc.descriptor_writable (Some false)\n then let%bool (s3, x0) = (object_delete s2 c lmap x false) in\n follow s3\n else follow s2 in\n match desc.descriptor_value with\n | Some v ->\n let%void s2 = (object_put s1 c lmap x v throwcont) in follow0 s2\n | None -> follow0 s1\n else reject s1 throwcont\n\n(** val run_to_descriptor :\n state -> execution_ctx -> value -> descriptor specres **)\n\nand run_to_descriptor s c _foo_ = match _foo_ with\n | Coq_value_prim p -> throw_result (run_error s Coq_native_error_type)\n | Coq_value_object l ->\n let sub0 s0 desc name conv k =\n let%bool (s1, has) = object_has_prop s0 c l name in\n if not has\n then k s1 desc\n else let%value (s2, v0) = run_object_get s1 c l name in\n let%run (s3, r) = conv s2 v0 desc in k s3 r\n in\n sub0 s descriptor_intro_empty ("enumerable")\n (fun s1 v1 desc ->\n let b = convert_value_to_boolean v1 in\n res_spec s1 (descriptor_with_enumerable desc (Some b))) (fun s1_2 desc ->\n sub0 s1_2 desc ("configurable")\n (fun s2 v2 desc0 ->\n let b = convert_value_to_boolean v2 in\n res_spec s2 (descriptor_with_configurable desc0 (Some b)))\n (fun s2_2 desc0 ->\n sub0 s2_2 desc0 ("value")\n (fun s3 v3 desc1 ->\n res_spec s3 (descriptor_with_value desc1 (Some v3)))\n (fun s3_2 desc1 ->\n sub0 s3_2 desc1\n ("writable")\n (fun s4 v4 desc2 ->\n let b = convert_value_to_boolean v4 in\n res_spec s4 (descriptor_with_writable desc2 (Some b)))\n (fun s4_2 desc2 ->\n sub0 s4_2 desc2 ("get") (fun s5 v5 desc3 ->\n if (not (is_callable_dec s5 v5))\n && (not (value_compare v5 (Coq_value_prim Coq_prim_undef)))\n then throw_result (run_error s5 Coq_native_error_type)\n else res_spec s5 (descriptor_with_get desc3 (Some v5)))\n (fun s5_2 desc3 ->\n sub0 s5_2 desc3 ("set") (fun s6 v6 desc4 ->\n if (not (is_callable_dec s6 v6))\n && (not (value_compare v6 (Coq_value_prim Coq_prim_undef)))\n then throw_result (run_error s6 Coq_native_error_type)\n else res_spec s6 (descriptor_with_set desc4 (Some v6)))\n (fun s7 desc4 ->\n if ((not (option_compare value_compare desc4.descriptor_get None))\n ||\n (not (option_compare value_compare desc4.descriptor_set None)))\n &&\n ((not (option_compare value_compare desc4.descriptor_value None))\n ||\n (not (option_compare bool_eq desc4.descriptor_writable None)))\n then throw_result (run_error s7 Coq_native_error_type)\n else res_spec s7 desc4))))))\n\n(** val prim_new_object : state -> prim -> result **)\n\nand prim_new_object s _foo_ = match _foo_ with\n | Coq_prim_bool b ->\n result_out\n (let o1 = (object_new (Coq_value_object (Coq_object_loc_prealloc Coq_prealloc_bool_proto)) ("Boolean")) in\n let o = (object_with_primitive_value o1 (Coq_value_prim (Coq_prim_bool b))) in\n let (l, s1) = object_alloc s o in\n Coq_out_ter (s1, (res_val (Coq_value_object l))))\n | Coq_prim_number n ->\n result_out\n (let o1 = (object_new (Coq_value_object (Coq_object_loc_prealloc Coq_prealloc_number_proto)) ("Number")) in\n let o = (object_with_primitive_value o1 (Coq_value_prim (Coq_prim_number n))) in\n let (l, s1) = object_alloc s o in\n Coq_out_ter (s1, (res_val (Coq_value_object l))))\n | Coq_prim_string s0 ->\n let o2 = (object_new (Coq_value_object (Coq_object_loc_prealloc Coq_prealloc_string_proto)) ("String")) in\n let o1 = (object_with_get_own_property o2 Coq_builtin_get_own_prop_string) in\n let o = (object_with_primitive_value o1 (Coq_value_prim (Coq_prim_string s0))) in\n let (l, s1) = object_alloc s o in\n let%some s_2 = (object_heap_map_properties_pickable_option\n s1 l\n (fun p ->\n HeapStr.write p ("length")\n (Coq_attributes_data_of\n (attributes_data_intro_constant\n (Coq_value_prim\n (Coq_prim_number (number_of_int (strlength s0)))))))) in\n res_ter s_2 (res_val (Coq_value_object l))\n | _ ->\n (fun s m -> Debug.impossible_with_heap_because __LOC__ s m; Coq_result_impossible)\n s\n ("[prim_new_object] received an null or undef.")\n\n(** val to_object : state -> value -> result **)\n\nand to_object s _foo_ = match _foo_ with\n | Coq_value_prim w ->\n (match w with\n | Coq_prim_undef -> run_error s Coq_native_error_type\n | Coq_prim_null -> run_error s Coq_native_error_type\n | Coq_prim_bool b -> prim_new_object s w\n | Coq_prim_number n -> prim_new_object s w\n | Coq_prim_string s0 -> prim_new_object s w)\n | Coq_value_object l ->\n result_out (Coq_out_ter (s, (res_val (Coq_value_object l))))\n\n(** val run_object_prim_value : state -> object_loc -> result **)\n\nand run_object_prim_value s l =\n let%some ov = (run_object_method object_prim_value_ s l) in\n let%some v = (ov) in res_ter s (res_val v)\n\n(** val prim_value_get :\n state -> execution_ctx -> value -> prop_name -> result **)\n\nand prim_value_get s c v x =\n let%object (s_2, l) = (to_object s v) in\n object_get_builtin s_2 c Coq_builtin_get_default v l x\n\n(** val env_record_has_binding :\n state -> execution_ctx -> env_loc -> prop_name -> result **)\n\nand env_record_has_binding s c l x =\n let%some e = (env_record_binds_pickable_option s l) in\n match e with\n | Coq_env_record_decl ed ->\n result_out (Coq_out_ter (s,\n (res_val (Coq_value_prim (Coq_prim_bool\n (HeapStr.indom_dec ed x))))))\n | Coq_env_record_object (l0, pt) -> object_has_prop s c l0 x\n\n(** val lexical_env_get_identifier_ref :\n state -> execution_ctx -> lexical_env -> prop_name ->\n strictness_flag -> ref specres **)\n\nand lexical_env_get_identifier_ref s c x x0 str =\n match x with\n | [] ->\n res_spec s (ref_create_value (Coq_value_prim Coq_prim_undef) x0 str)\n | l :: x_2 ->\n let%bool (s1, has) = (env_record_has_binding s c l x0) in\n if has\n then res_spec s1 (ref_create_env_loc l x0 str)\n else lexical_env_get_identifier_ref s1 c x_2 x0 str\n\n(** val object_delete_default :\n state -> execution_ctx -> object_loc -> prop_name ->\n strictness_flag -> result **)\n\nand object_delete_default s c l x str =\n let%run (s1, d) = (run_object_get_own_prop s c l x) in\n match d with\n | Coq_full_descriptor_undef ->\n res_ter s1 (res_val (Coq_value_prim (Coq_prim_bool true)))\n | Coq_full_descriptor_some a ->\n if attributes_configurable a\n then let%some\n s_2 = (object_heap_map_properties_pickable_option s1 l (fun p ->\n HeapStr.rem p x)) in\n res_ter s_2 (res_val (Coq_value_prim (Coq_prim_bool true)))\n else out_error_or_cst s1 str Coq_native_error_type (Coq_value_prim\n (Coq_prim_bool false))\n\n(** val object_delete :\n state -> execution_ctx -> object_loc -> prop_name ->\n strictness_flag -> result **)\n\nand object_delete s c l x str =\n let%some b = (run_object_method object_delete_ s l) in\n match b with\n | Coq_builtin_delete_default -> object_delete_default s c l x str\n | Coq_builtin_delete_args_obj ->\n let%some mo = (run_object_method object_parameter_map_ s l) in\n let%some m = (mo) in\n let%run (s1, d) = (run_object_get_own_prop s c m x) in\n let%bool (s2, b0) = (object_delete_default s1 c l x str) in\n if b0\n then (match d with\n | Coq_full_descriptor_undef ->\n res_ter s2\n (res_val (Coq_value_prim (Coq_prim_bool b0)))\n | Coq_full_descriptor_some a ->\n let%bool \n (s3, b_2) = (object_delete s2 c m x false) in\n res_ter s3\n (res_val (Coq_value_prim (Coq_prim_bool b0))))\n else res_ter s2 (res_val (Coq_value_prim (Coq_prim_bool b0)))\n\n(** val env_record_delete_binding :\n state -> execution_ctx -> env_loc -> prop_name -> result **)\n\nand env_record_delete_binding s c l x =\n let%some e = (env_record_binds_pickable_option s l) in\n match e with\n | Coq_env_record_decl ed ->\n (match HeapStr.read_option ed x with\n | Some p ->\n let (mu, v) = p in\n (match mu with\n | Coq_mutability_uninitialized_immutable ->\n result_out (Coq_out_ter (s,\n (res_val (Coq_value_prim (Coq_prim_bool false)))))\n | Coq_mutability_immutable ->\n result_out (Coq_out_ter (s,\n (res_val (Coq_value_prim (Coq_prim_bool false)))))\n | Coq_mutability_nondeletable ->\n result_out (Coq_out_ter (s,\n (res_val (Coq_value_prim (Coq_prim_bool false)))))\n | Coq_mutability_deletable ->\n let s_2 =\n env_record_write s l (Coq_env_record_decl\n (decl_env_record_rem ed x))\n in\n result_out (Coq_out_ter (s_2,\n (res_val (Coq_value_prim (Coq_prim_bool true))))))\n | None ->\n result_out (Coq_out_ter (s,\n (res_val (Coq_value_prim (Coq_prim_bool true))))))\n | Coq_env_record_object (l0, pt) ->\n object_delete s c l0 x throw_false\n\n(** val env_record_implicit_this_value : state -> env_loc -> value option **)\n\nand env_record_implicit_this_value s l =\n ifx_some_or_default (env_record_binds_pickable_option s l) None (fun e ->\n Some\n (match e with\n | Coq_env_record_decl ed -> Coq_value_prim Coq_prim_undef\n | Coq_env_record_object (l0, provide_this) ->\n if provide_this\n then Coq_value_object l0\n else Coq_value_prim Coq_prim_undef))\n\n(** val identifier_resolution :\n state -> execution_ctx -> prop_name -> ref specres **)\n\nand identifier_resolution s c x =\n let x0 = c.execution_ctx_lexical_env in\n let str = c.execution_ctx_strict in\n lexical_env_get_identifier_ref s c x0 x str\n\n(** val env_record_get_binding_value :\n state -> execution_ctx -> env_loc -> prop_name ->\n strictness_flag -> result **)\n\nand env_record_get_binding_value s c l x str =\n let%some e = (env_record_binds_pickable_option s l) in\n match e with\n | Coq_env_record_decl ed ->\n let%some rm = (HeapStr.read_option ed x) in\n let (mu, v) = rm in\n if mutability_compare mu Coq_mutability_uninitialized_immutable\n then out_error_or_cst s str Coq_native_error_ref (Coq_value_prim\n Coq_prim_undef)\n else res_ter s (res_val v)\n | Coq_env_record_object (l0, pt) ->\n let%bool (s1, has) = (object_has_prop s c l0 x) in\n if has\n then run_object_get s1 c l0 x\n else out_error_or_cst s1 str Coq_native_error_ref (Coq_value_prim\n Coq_prim_undef)\n\n(** val ref_get_value :\n state -> execution_ctx -> resvalue -> value specres **)\n\nand ref_get_value s c _foo_ = match _foo_ with\n | Coq_resvalue_empty ->\n (fun s m -> Debug.impossible_with_heap_because __LOC__ s m; Coq_result_impossible)\n s\n ("[ref_get_value] received an empty result.")\n | Coq_resvalue_value v -> res_spec s v\n | Coq_resvalue_ref r ->\n let \n for_base_or_object = (fun tt ->\n match r.ref_base with\n | Coq_ref_base_type_value v ->\n if ref_kind_comparable (ref_kind_of r) Coq_ref_kind_primitive_base\n then let%value (s2, v) = (prim_value_get s c v r.ref_name) in res_spec s2 v\n else (match v with\n | Coq_value_prim p ->\n (fun s m -> Debug.impossible_with_heap_because __LOC__ s m; Coq_result_impossible)\n s\n ("[ref_get_value] received a primitive value whose kind is not primitive.")\n | Coq_value_object l ->\n let%value (s2, v) = (run_object_get s c l r.ref_name) in res_spec s2 v)\n | Coq_ref_base_type_env_loc l ->\n (fun s m -> Debug.impossible_with_heap_because __LOC__ s m; Coq_result_impossible)\n s\n ("[ref_get_value] received a reference to a value whose base type is an environnment record.")) in\n match ref_kind_of r with\n | Coq_ref_kind_null ->\n (fun s m -> Debug.impossible_with_heap_because __LOC__ s m; Coq_result_impossible)\n s\n ("[ref_get_value] received a reference whose base is [null].")\n | Coq_ref_kind_undef -> throw_result (run_error s Coq_native_error_ref)\n | Coq_ref_kind_primitive_base -> for_base_or_object ()\n | Coq_ref_kind_object -> for_base_or_object ()\n | Coq_ref_kind_env_record ->\n (match r.ref_base with\n | Coq_ref_base_type_value v ->\n (fun s m -> Debug.impossible_with_heap_because __LOC__ s m; Coq_result_impossible)\n s\n ("[ref_get_value] received a reference to an environnment record whose base type is a value.")\n | Coq_ref_base_type_env_loc l ->\n let%value\n \n (s2, v) = (env_record_get_binding_value s c l r.ref_name r.ref_strict) in res_spec s2 v)\n\n(* DEBUG\n and ref_get_value runs s c r =\n let res = ref_get_value runs s c r in match res with\n | JsInterpreterMonads.Coq_result_some crs ->\n begin match crs with\n | (Coq_specret_val (_,rs)) ->\n begin match rs with\n | Coq_value_prim cvp ->\n begin match cvp with\n | Coq_prim_undef -> Debug.ref_get_value_2 r; res\n | _ -> res\n end\n | _ -> res\n end\n | _ -> res\n end\n | _ -> res\n*)\n\n\n(** val run_expr_get_value :\n state -> execution_ctx -> expr -> value specres **)\n\nand run_expr_get_value s c e =\n let%success (s0, rv) = (run_expr s c e) in\n ref_get_value s0 c rv\n\n(** val object_put_complete :\n builtin_put -> state -> execution_ctx -> value -> object_loc\n -> prop_name -> value -> strictness_flag -> result_void **)\n\nand object_put_complete b s c vthis l x v str =\n match b with Coq_builtin_put_default ->\n let%bool (s1, b0) = (object_can_put s c l x) in\n if b0\n then let%run (s2, d) = (run_object_get_own_prop s1 c l x) in\n let \n follow = (fun x0 ->\n let%run (s3, d_2) = (run_object_get_prop s2 c l x) in\n let follow_2 = (fun x1 ->\n match vthis with\n | Coq_value_prim wthis ->\n out_error_or_void s3 str Coq_native_error_type\n | Coq_value_object lthis ->\n let \n desc = (descriptor_intro_data v true true true) in\n let%success\n \n (s4, rv) = (object_define_own_prop s3 c l x desc str) in res_void s4) in\n match d_2 with\n | Coq_full_descriptor_undef -> follow_2 ()\n | Coq_full_descriptor_some a ->\n (match a with\n | Coq_attributes_data_of a0 -> follow_2 ()\n | Coq_attributes_accessor_of aa_2 ->\n (match aa_2.attributes_accessor_set with\n | Coq_value_prim p ->\n (fun s m -> Debug.impossible_with_heap_because __LOC__ s m; Coq_result_impossible)\n s3\n ("[object_put_complete] found a primitive in an `set\\\' accessor.")\n | Coq_value_object lfsetter ->\n let%success\n (s4, rv) = (run_call s3 c lfsetter vthis\n (v :: [])) in res_void s4))) in\n match d with\n | Coq_full_descriptor_undef -> follow ()\n | Coq_full_descriptor_some a ->\n (match a with\n | Coq_attributes_data_of ad ->\n (match vthis with\n | Coq_value_prim wthis ->\n out_error_or_void s2 str Coq_native_error_type\n | Coq_value_object lthis ->\n let desc = ({ descriptor_value = (Some v);\n descriptor_writable = None; descriptor_get = None;\n descriptor_set = None; descriptor_enumerable = None;\n descriptor_configurable = None }) in\n let%success\n \n (s3, rv) = (object_define_own_prop s2 c l x desc str) in res_void s3)\n | Coq_attributes_accessor_of a0 -> follow ())\n else out_error_or_void s1 str Coq_native_error_type\n\n(** val object_put :\n state -> execution_ctx -> object_loc -> prop_name -> value\n -> strictness_flag -> result_void **)\n\nand object_put s c l x v str =\n let%some b = (run_object_method object_put_ s l) in\n object_put_complete b s c (Coq_value_object l) l x v str\n\n(** val env_record_set_mutable_binding :\n state -> execution_ctx -> env_loc -> prop_name -> value ->\n strictness_flag -> result_void **)\n\nand env_record_set_mutable_binding s c l x v str =\n let%some e = (env_record_binds_pickable_option s l) in\n match e with\n | Coq_env_record_decl ed ->\n let%some rm = (HeapStr.read_option ed x) in\n let (mu, v_old) = rm in\n if not (mutability_compare mu Coq_mutability_immutable)\n then res_void (env_record_write_decl_env s l x mu v)\n else out_error_or_void s str Coq_native_error_type\n | Coq_env_record_object (l0, pt) -> object_put s c l0 x v str\n\n(** val prim_value_put :\n state -> execution_ctx -> prim -> prop_name -> value ->\n strictness_flag -> result_void **)\n\nand prim_value_put s c w x v str =\n let%object (s1, l) = (to_object s (Coq_value_prim w)) in\n object_put_complete Coq_builtin_put_default s1 c (Coq_value_prim w)\n l x v str\n\n(** val ref_put_value :\n state -> execution_ctx -> resvalue -> value -> result_void **)\n\nand ref_put_value s c rv v =\n match rv with\n | Coq_resvalue_empty ->\n (fun s m -> Debug.impossible_with_heap_because __LOC__ s m; Coq_result_impossible)\n s\n ("[ref_put_value] received an empty result.")\n | Coq_resvalue_value v0 -> run_error s Coq_native_error_ref\n | Coq_resvalue_ref r ->\n if ref_kind_comparable (ref_kind_of r) Coq_ref_kind_undef\n then if r.ref_strict\n then run_error s Coq_native_error_ref\n else object_put s c (Coq_object_loc_prealloc\n Coq_prealloc_global) r.ref_name v throw_false\n else if \n (ref_kind_comparable (ref_kind_of r) Coq_ref_kind_primitive_base)\n || (ref_kind_comparable (ref_kind_of r) Coq_ref_kind_null)\n || (ref_kind_comparable (ref_kind_of r) Coq_ref_kind_object)\n then (match r.ref_base with\n | Coq_ref_base_type_value v_2 ->\n if ref_kind_comparable (ref_kind_of r)\n Coq_ref_kind_primitive_base\n then (match v_2 with\n | Coq_value_prim w ->\n prim_value_put s c w r.ref_name v r.ref_strict\n | Coq_value_object o ->\n (fun s m -> Debug.impossible_with_heap_because __LOC__ s m; Coq_result_impossible)\n s\n ("[ref_put_value] impossible case"))\n else (match v_2 with\n | Coq_value_prim p ->\n (fun s m -> Debug.impossible_with_heap_because __LOC__ s m; Coq_result_impossible)\n s\n ("[ref_put_value] impossible case")\n | Coq_value_object l ->\n object_put s c l r.ref_name v r.ref_strict)\n | Coq_ref_base_type_env_loc l ->\n (fun s m -> Debug.impossible_with_heap_because __LOC__ s m; Coq_result_impossible)\n s\n ("[ref_put_value] contradicts ref_is_property"))\n else (match r.ref_base with\n | Coq_ref_base_type_value v0 ->\n (fun s m -> Debug.impossible_with_heap_because __LOC__ s m; Coq_result_impossible)\n s\n ("[ref_put_value] impossible spec")\n | Coq_ref_base_type_env_loc l ->\n env_record_set_mutable_binding s c l r.ref_name v\n r.ref_strict)\n\n(** val env_record_create_mutable_binding :\n state -> execution_ctx -> env_loc -> prop_name -> bool\n option -> result_void **)\n\nand env_record_create_mutable_binding s c l x deletable_opt =\n let deletable = (unsome_default false deletable_opt) in\n let%some e = (env_record_binds_pickable_option s l) in\n match e with\n | Coq_env_record_decl ed ->\n if HeapStr.indom_dec ed x\n then (fun s m -> Debug.impossible_with_heap_because __LOC__ s m; Coq_result_impossible)\n s\n ("Already declared environnment record in [env_record_create_mutable_binding].")\n else let\n s_2 = (env_record_write_decl_env s l x\n (mutability_of_bool deletable) (Coq_value_prim\n Coq_prim_undef)) in res_void s_2\n | Coq_env_record_object (l0, pt) ->\n let%bool (s1, has) = (object_has_prop s c l0 x) in\n if has\n then (fun s m -> Debug.impossible_with_heap_because __LOC__ s m; Coq_result_impossible)\n s1\n ("Already declared binding in [env_record_create_mutable_binding].")\n else let a = ({ attributes_data_value = (Coq_value_prim\n Coq_prim_undef); attributes_data_writable = true;\n attributes_data_enumerable = true;\n attributes_data_configurable = deletable }) in\n let%success\n (s2, rv) = (object_define_own_prop s1 c l0 x\n (descriptor_of_attributes (Coq_attributes_data_of a))\n throw_true) in res_void s2\n\n(** val env_record_create_set_mutable_binding :\n state -> execution_ctx -> env_loc -> prop_name -> bool\n option -> value -> strictness_flag -> result_void **)\n\nand env_record_create_set_mutable_binding s c l x deletable_opt v str =\n let%void \n s0 = (env_record_create_mutable_binding s c l x deletable_opt) in env_record_set_mutable_binding s0 c l x v str\n\n(** val env_record_create_immutable_binding :\n state -> env_loc -> prop_name -> result_void **)\n\nand env_record_create_immutable_binding s l x =\n let%some e = (env_record_binds_pickable_option s l) in\n match e with\n | Coq_env_record_decl ed ->\n if HeapStr.indom_dec ed x\n then (fun s m -> Debug.impossible_with_heap_because __LOC__ s m; Coq_result_impossible)\n s\n ("Already declared environnment record in [env_record_create_immutable_binding].")\n else res_void\n (env_record_write_decl_env s l x\n Coq_mutability_uninitialized_immutable (Coq_value_prim\n Coq_prim_undef))\n | Coq_env_record_object (o, p) ->\n (fun s m -> Debug.impossible_with_heap_because __LOC__ s m; Coq_result_impossible)\n s\n ("[env_record_create_immutable_binding] received an environnment record object.")\n\n(** val env_record_initialize_immutable_binding :\n state -> env_loc -> prop_name -> value -> result_void **)\n\nand env_record_initialize_immutable_binding s l x v =\n let%some e = (env_record_binds_pickable_option s l) in\n match e with\n | Coq_env_record_decl ed ->\n let%some evs = (decl_env_record_pickable_option ed x) in\n if prod_compare mutability_compare value_compare evs\n (Coq_mutability_uninitialized_immutable, (Coq_value_prim\n Coq_prim_undef))\n then let s_2 = (env_record_write_decl_env s l x Coq_mutability_immutable v) in res_void s_2\n else (fun s m -> Debug.impossible_with_heap_because __LOC__ s m; Coq_result_impossible)\n s\n ("Non suitable binding in [env_record_initialize_immutable_binding].")\n | Coq_env_record_object (o, p) ->\n (fun s m -> Debug.impossible_with_heap_because __LOC__ s m; Coq_result_impossible)\n s\n ("[env_record_initialize_immutable_binding] received an environnment record object.")\n\n(** val call_object_new : state -> value -> result **)\n\nand call_object_new s v =\n match type_of v with\n | Coq_type_undef ->\n result_out\n (let o = (object_new (Coq_value_object (Coq_object_loc_prealloc\n Coq_prealloc_object_proto))\n ("Object")) in\n let p = (object_alloc s o) in\n let (l, s_2) = p in Coq_out_ter (s_2, (res_val (Coq_value_object l))))\n | Coq_type_null ->\n result_out\n (let o = (object_new (Coq_value_object (Coq_object_loc_prealloc\n Coq_prealloc_object_proto))\n ("Object")) in\n let p = (object_alloc s o) in\n let (l, s_2) = p in Coq_out_ter (s_2, (res_val (Coq_value_object l))))\n | Coq_type_bool -> to_object s v\n | Coq_type_number -> to_object s v\n | Coq_type_string -> to_object s v\n | Coq_type_object -> result_out (Coq_out_ter (s, (res_val v)))\n\n(** val array_args_map_loop :\n state -> execution_ctx -> object_loc -> value list -> float\n -> result_void **)\n\nand array_args_map_loop s c l args ind =\n match args with\n | [] -> res_void s\n | h :: rest ->\n let%some s_2 = (object_heap_map_properties_pickable_option s l (fun p ->\n HeapStr.write p (JsNumber.to_string ind)\n (Coq_attributes_data_of (attributes_data_intro_all_true h)))) in\n array_args_map_loop s_2 c l rest (ind +. 1.)\n\n(** val string_of_prealloc : prealloc -> string **)\n\nand string_of_prealloc _foo_ = match _foo_ with\n | Coq_prealloc_global -> "global"\n | Coq_prealloc_global_eval ->\n "global_eval"\n | Coq_prealloc_global_parse_int ->\n "global_parse_int"\n | Coq_prealloc_global_parse_float ->\n "global_parse_float"\n | Coq_prealloc_global_is_finite ->\n "global_is_finite"\n | Coq_prealloc_global_is_nan ->\n "global_is_nan"\n | Coq_prealloc_global_decode_uri ->\n "global_decode_uri"\n | Coq_prealloc_global_decode_uri_component ->\n "global_decode_uri_component"\n | Coq_prealloc_global_encode_uri ->\n "global_encode_uri"\n | Coq_prealloc_global_encode_uri_component ->\n "global_encode_uri_component"\n | Coq_prealloc_object -> "object"\n | Coq_prealloc_object_get_proto_of ->\n "object_get_proto_of"\n | Coq_prealloc_object_get_own_prop_descriptor ->\n "object_get_own_prop_descriptor"\n | Coq_prealloc_object_get_own_prop_name ->\n "object_get_own_prop_name"\n | Coq_prealloc_object_create ->\n "object_create"\n | Coq_prealloc_object_define_prop ->\n "object_define_prop"\n | Coq_prealloc_object_define_props ->\n "object_define_props"\n | Coq_prealloc_object_seal ->\n "object_seal"\n | Coq_prealloc_object_freeze ->\n "object_freeze"\n | Coq_prealloc_object_prevent_extensions ->\n "object_prevent_extensions"\n | Coq_prealloc_object_is_sealed ->\n "object_is_sealed"\n | Coq_prealloc_object_is_frozen ->\n "object_is_frozen"\n | Coq_prealloc_object_is_extensible ->\n "object_is_extensible"\n | Coq_prealloc_object_keys ->\n "object_keys"\n | Coq_prealloc_object_keys_call ->\n "object_keys_call"\n | Coq_prealloc_object_proto ->\n "object_proto_"\n | Coq_prealloc_object_proto_to_string ->\n "object_proto_to_string"\n | Coq_prealloc_object_proto_value_of ->\n "object_proto_value_of"\n | Coq_prealloc_object_proto_has_own_prop ->\n "object_proto_has_own_prop"\n | Coq_prealloc_object_proto_is_prototype_of ->\n "object_proto_is_prototype_of"\n | Coq_prealloc_object_proto_prop_is_enumerable ->\n "object_proto_prop_is_enumerable"\n | Coq_prealloc_function ->\n "function"\n | Coq_prealloc_function_proto ->\n "function_proto"\n | Coq_prealloc_function_proto_to_string ->\n "function_proto_to_string"\n | Coq_prealloc_function_proto_apply ->\n "function_proto_apply"\n | Coq_prealloc_function_proto_call ->\n "function_proto_call"\n | Coq_prealloc_function_proto_bind ->\n "function_proto_bind"\n | Coq_prealloc_bool -> "bool"\n | Coq_prealloc_bool_proto ->\n "bool_proto"\n | Coq_prealloc_bool_proto_to_string ->\n "bool_proto_to_string"\n | Coq_prealloc_bool_proto_value_of ->\n "bool_proto_value_of"\n | Coq_prealloc_number -> "number"\n | Coq_prealloc_number_proto ->\n "number_proto"\n | Coq_prealloc_number_proto_to_string ->\n "number_proto_to_string"\n | Coq_prealloc_number_proto_value_of ->\n "number_proto_value_of"\n | Coq_prealloc_number_proto_to_fixed ->\n "number_proto_to_fixed"\n | Coq_prealloc_number_proto_to_exponential ->\n "number_proto_to_exponential"\n | Coq_prealloc_number_proto_to_precision ->\n "number_proto_to_precision"\n | Coq_prealloc_array -> "array"\n | Coq_prealloc_array_is_array ->\n "array_is_array"\n | Coq_prealloc_array_proto ->\n "array_proto"\n | Coq_prealloc_array_proto_to_string ->\n "array_proto_to_string"\n | Coq_prealloc_array_proto_join ->\n "array_proto_join"\n | Coq_prealloc_array_proto_pop ->\n "array_proto_pop"\n | Coq_prealloc_array_proto_push ->\n "array_proto_push"\n | Coq_prealloc_string -> "string"\n | Coq_prealloc_string_proto ->\n "string_proto"\n | Coq_prealloc_string_proto_to_string ->\n "string_proto_to_string"\n | Coq_prealloc_string_proto_value_of ->\n "string_proto_value_of"\n | Coq_prealloc_string_proto_char_at ->\n "string_proto_char_at"\n | Coq_prealloc_string_proto_char_code_at ->\n "string_proto_char_code_at"\n | Coq_prealloc_math -> "math"\n | Coq_prealloc_mathop m -> "mathop"\n | Coq_prealloc_date -> "date"\n | Coq_prealloc_regexp -> "regexp"\n | Coq_prealloc_error -> "error"\n | Coq_prealloc_error_proto ->\n "error_proto"\n | Coq_prealloc_native_error n ->\n "native_error"\n | Coq_prealloc_native_error_proto n ->\n "native_error_proto"\n | Coq_prealloc_error_proto_to_string ->\n "error_proto_to_string"\n | Coq_prealloc_throw_type_error ->\n "throw_type_error"\n | Coq_prealloc_json -> "json"\n\n(** val run_construct_prealloc :\n state -> execution_ctx -> prealloc -> value list -> result **)\n\nand run_construct_prealloc s c b args =\n match b with\n | Coq_prealloc_object ->\n let v = (get_arg 0 args) in call_object_new s v\n | Coq_prealloc_bool ->\n result_out\n (let v = (get_arg 0 args) in\n let b0 = (convert_value_to_boolean v) in\n let\n o1 = (object_new (Coq_value_object (Coq_object_loc_prealloc\n Coq_prealloc_bool_proto))\n ("Boolean")) in\n let\n o = (object_with_primitive_value o1 (Coq_value_prim (Coq_prim_bool\n b0))) in\n let p = (object_alloc s o) in\n let (l, s_2) = p in\n Coq_out_ter (s_2, (res_val (Coq_value_object l))))\n | Coq_prealloc_number ->\n let \n follow = (fun s_2 v ->\n let\n o1 = (object_new (Coq_value_object (Coq_object_loc_prealloc\n Coq_prealloc_number_proto))\n ("Number")) in\n let o = (object_with_primitive_value o1 v) in\n let (l, s1) = object_alloc s_2 o in\n result_out (Coq_out_ter (s1, (res_val (Coq_value_object l))))) in\n if list_eq_nil_decidable args\n then follow s (Coq_value_prim (Coq_prim_number JsNumber.zero))\n else let v = (get_arg 0 args) in\n let%number (x, x0) = (to_number s c v) in\n follow x (Coq_value_prim (Coq_prim_number x0))\n | Coq_prealloc_array ->\n let\n \n o_2 = (object_new (Coq_value_object (Coq_object_loc_prealloc\n Coq_prealloc_array_proto)) ("Array")) in\n let \n o = (object_for_array o_2 Coq_builtin_define_own_prop_array) in\n let p = (object_alloc s o) in\n let (l, s_2) = p in\n let follow = (fun s_3 length0 ->\n let%some\n s0 = (object_heap_map_properties_pickable_option s_3 l (fun p0 ->\n HeapStr.write p0 ("length")\n (Coq_attributes_data_of { attributes_data_value =\n (Coq_value_prim (Coq_prim_number length0));\n attributes_data_writable = true;\n attributes_data_enumerable = false;\n attributes_data_configurable = false }))) in\n res_ter s0 (res_val (Coq_value_object l))) in\n let arg_len = (LibList.length args) in\n if nat_eq arg_len 1\n then let v = (get_arg 0 args) in\n match v with\n | Coq_value_prim p0 ->\n (match p0 with\n | Coq_prim_undef ->\n let%some\n \n s0 = (object_heap_map_properties_pickable_option s_2 l\n (fun p1 ->\n HeapStr.write p1 ("0") (Coq_attributes_data_of\n (attributes_data_intro_all_true v)))) in\n follow s0 1.0\n | Coq_prim_null ->\n let%some\n \n s0 = (object_heap_map_properties_pickable_option s_2 l\n (fun p1 ->\n HeapStr.write p1 ("0") (Coq_attributes_data_of\n (attributes_data_intro_all_true v)))) in\n follow s0 1.0\n | Coq_prim_bool b0 ->\n let%some\n \n s0 = (object_heap_map_properties_pickable_option s_2 l\n (fun p1 ->\n HeapStr.write p1 ("0") (Coq_attributes_data_of\n (attributes_data_intro_all_true v)))) in\n follow s0 1.0\n | Coq_prim_number vlen ->\n let%run\n (s0, ilen) = (to_uint32 s_2 c (Coq_value_prim\n (Coq_prim_number vlen))) in\n if ilen === vlen\n then follow s0 ilen\n else run_error s0 Coq_native_error_range\n | Coq_prim_string s0 ->\n let%some\n \n s1 = (object_heap_map_properties_pickable_option s_2 l\n (fun p1 ->\n HeapStr.write p1 ("0") (Coq_attributes_data_of\n (attributes_data_intro_all_true v)))) in\n follow s1 1.0)\n | Coq_value_object o0 ->\n let%some\n s0 = (object_heap_map_properties_pickable_option s_2 l\n (fun p0 ->\n HeapStr.write p0 ("0") (Coq_attributes_data_of\n (attributes_data_intro_all_true v)))) in\n follow s0 1.0\n else let%some\n s0 = (object_heap_map_properties_pickable_option s_2 l\n (fun p0 ->\n HeapStr.write p0\n ("length")\n (Coq_attributes_data_of { attributes_data_value =\n (Coq_value_prim (Coq_prim_number\n (number_of_int arg_len)));\n attributes_data_writable = true;\n attributes_data_enumerable = false;\n attributes_data_configurable = false }))) in\n let%void \n s1 = (array_args_map_loop s0 c l args 0.) in res_ter s1 (res_val (Coq_value_object l))\n | Coq_prealloc_string ->\n let\n o2 = (object_new (Coq_value_object (Coq_object_loc_prealloc\n Coq_prealloc_string_proto))\n ("String")) in\n let\n \n o1 = (object_with_get_own_property o2 Coq_builtin_get_own_prop_string) in\n let follow = (fun s0 s1 ->\n let\n o = (object_with_primitive_value o1 (Coq_value_prim (Coq_prim_string\n s1))) in\n let (l, s2) = object_alloc s0 o in\n let\n \n lenDesc = (attributes_data_intro_constant (Coq_value_prim\n (Coq_prim_number (number_of_int (strlength s1))))) in\n let%some\n s_2 = (object_heap_map_properties_pickable_option s2 l (fun p ->\n HeapStr.write p ("length")\n (Coq_attributes_data_of lenDesc))) in\n res_ter s_2 (res_val (Coq_value_object l))) in\n let arg_len = (LibList.length args) in\n if nat_eq arg_len 0\n then follow s ""\n else let arg = (get_arg 0 args) in\n let%string (s0, s1) = (to_string s c arg) in\n follow s0 s1\n | Coq_prealloc_error ->\n let v = (get_arg 0 args) in\n build_error s (Coq_value_object (Coq_object_loc_prealloc\n Coq_prealloc_error_proto)) v\n | Coq_prealloc_native_error ne ->\n let v = (get_arg 0 args) in\n build_error s (Coq_value_object (Coq_object_loc_prealloc\n (Coq_prealloc_native_error_proto ne))) v\n | _ ->\n (fun s -> Debug.not_yet_implemented_because __LOC__ s; Coq_result_not_yet_implemented)\n (strappend\n ("Construct prealloc_")\n (strappend (string_of_prealloc b)\n (" not yet implemented.")))\n\n(** val run_construct_default :\n state -> execution_ctx -> object_loc -> value list -> __\n specres **)\n\nand run_construct_default s c l args =\n let%value\n \n (s1, v1) = (run_object_get s c l\n ("prototype")) in\n let\n vproto = (if type_compare (type_of v1) Coq_type_object\n then v1\n else Coq_value_object (Coq_object_loc_prealloc\n Coq_prealloc_object_proto)) in\n let\n \n o = (object_new vproto ("Object")) in\n let p = (object_alloc s1 o) in\n let (l_2, s2) = p in\n let%value \n (s3, v2) = (run_call s2 c l (Coq_value_object l_2) args) in\n let\n vr = (if type_compare (type_of v2) Coq_type_object\n then v2\n else Coq_value_object l_2) in res_ter s3 (res_val vr)\n\n(** val run_construct :\n state -> execution_ctx -> construct -> object_loc -> value\n list -> result **)\n\nand run_construct s c co l args =\n match co with\n | Coq_construct_default -> run_construct_default s c l args\n | Coq_construct_after_bind ->\n let%some otrg = run_object_method object_target_function_ s l in\n let%some target = (otrg) in\n let%some oco = run_object_method object_construct_ s target in begin\n match oco with\n | Some co0 ->\n let%some oarg = run_object_method object_bound_args_ s l in\n let%some boundArgs = oarg in\n let arguments_ = (LibList.append boundArgs args) in\n run_construct s c co0 target arguments_\n | None -> run_error s Coq_native_error_type\n end\n | Coq_construct_prealloc b -> run_construct_prealloc s c b args\n\n(** val run_call_default :\n state -> execution_ctx -> object_loc -> result **)\n\nand run_call_default s c lf =\n let\n \n def = (result_out (Coq_out_ter (s, (res_val (Coq_value_prim Coq_prim_undef))))) in\n let%some oC = (run_object_method object_code_ s lf) in\n match oC with\n | Some bd ->\n if list_eq_nil_decidable (prog_elements (funcbody_prog bd))\n then def\n else ifx_success_or_return\n (run_prog s c (funcbody_prog bd)) (fun s_2 ->\n result_out (Coq_out_ter (s_2,\n (res_val (Coq_value_prim Coq_prim_undef))))) (fun s_2 rv ->\n result_out (Coq_out_ter (s_2, (res_normal rv))))\n | None -> def\n\n(** val creating_function_object_proto :\n state -> execution_ctx -> object_loc -> result **)\n\nand creating_function_object_proto s c l =\n let%object \n (s1, lproto) = (run_construct_prealloc s c Coq_prealloc_object []) in\n let a1 = ({ attributes_data_value = (Coq_value_object l);\n attributes_data_writable = true; attributes_data_enumerable = false;\n attributes_data_configurable = true }) in\n let%bool\n \n (s2, b) = (object_define_own_prop s1 c lproto\n ("constructor")\n (descriptor_of_attributes (Coq_attributes_data_of a1)) false) in\n let a2 = ({ attributes_data_value = (Coq_value_object lproto);\n attributes_data_writable = true; attributes_data_enumerable =\n false; attributes_data_configurable = false }) in\n object_define_own_prop s2 c l\n ("prototype")\n (descriptor_of_attributes (Coq_attributes_data_of a2)) false\n\n(** val creating_function_object :\n state -> execution_ctx -> string list -> funcbody ->\n lexical_env -> strictness_flag -> result **)\n\nand creating_function_object s c names bd x str =\n let\n o = (object_new (Coq_value_object (Coq_object_loc_prealloc\n Coq_prealloc_function_proto))\n ("Function")) in\n let o1 = (object_with_get o Coq_builtin_get_function) in\n let\n \n o2 = (object_with_invokation o1 (Some Coq_construct_default) (Some\n Coq_call_default) (Some Coq_builtin_has_instance_function)) in\n let\n o3 = (object_with_details o2 (Some x) (Some names) (Some bd) None None\n None None) in\n let p = (object_alloc s o3) in\n let (l, s1) = p in\n let a1 = ({ attributes_data_value = (Coq_value_prim\n (Coq_prim_number\n (number_of_int (LibList.length names))));\n attributes_data_writable = false; attributes_data_enumerable =\n false; attributes_data_configurable = false }) in\n let%bool\n (s2, b2) = (object_define_own_prop s1 c l\n ("length")\n (descriptor_of_attributes (Coq_attributes_data_of a1))\n false) in\n let%bool \n (s3, b3) = (creating_function_object_proto s2 c l) in\n if not str\n then res_ter s3 (res_val (Coq_value_object l))\n else let vthrower = (Coq_value_object (Coq_object_loc_prealloc\n Coq_prealloc_throw_type_error)) in\n let \n a2 = ({ attributes_accessor_get = vthrower;\n attributes_accessor_set = vthrower;\n attributes_accessor_enumerable = false;\n attributes_accessor_configurable = false }) in\n let%bool\n \n (s4, b4) = (object_define_own_prop s3 c l\n ("caller")\n (descriptor_of_attributes\n (Coq_attributes_accessor_of a2)) false) in\n let%bool\n \n (s5, b5) = (object_define_own_prop s4 c l\n ("arguments")\n (descriptor_of_attributes\n (Coq_attributes_accessor_of a2)) false) in\n res_ter s5 (res_val (Coq_value_object l))\n\n(** val binding_inst_formal_params :\n state -> execution_ctx -> env_loc -> value list -> string\n list -> strictness_flag -> result_void **)\n\nand binding_inst_formal_params s c l args names str =\n match names with\n | [] -> res_void s\n | argname :: names_2 ->\n let v = (hd (Coq_value_prim Coq_prim_undef) args) in\n let args_2 = (tl args) in\n let%bool (s1, hb) = (env_record_has_binding s c l argname) in\n let \n follow = (fun s_2 ->\n let%void\n \n s_3= (env_record_set_mutable_binding s_2 c l argname v str) in\n binding_inst_formal_params s_3 c l args_2 names_2 str) in\n if hb\n then follow s1\n else let%void\n s2 = (env_record_create_mutable_binding s1 c l argname\n None) in follow s2\n\n(** val binding_inst_function_decls :\n state -> execution_ctx -> env_loc -> funcdecl list ->\n strictness_flag -> bool -> result_void **)\n\nand binding_inst_function_decls s c l fds str bconfig =\n\n match fds with\n | [] -> res_void s\n | fd :: fds_2 ->\n let fbd = (fd.funcdecl_body) in\n let str_fd = (funcbody_is_strict fbd) in\n let fparams = (fd.funcdecl_parameters) in\n let fname = (fd.funcdecl_name) in\n let%object\n (s1, fo) = (creating_function_object s c fparams fbd\n c.execution_ctx_variable_env str_fd) in\n let \n follow = (fun s2 ->\n let%void\n s3= (env_record_set_mutable_binding s2 c l fname\n (Coq_value_object fo) str) in\n binding_inst_function_decls s3 c l fds_2 str bconfig) in\n let%bool \n (s2, has) = (env_record_has_binding s1 c l fname) in\n if has\n then if nat_eq l env_loc_global_env_record\n then let%run\n (s3, d) = (run_object_get_prop s2 c\n (Coq_object_loc_prealloc Coq_prealloc_global)\n fname) in\n match d with\n | Coq_full_descriptor_undef ->\n (fun s m -> Debug.impossible_with_heap_because __LOC__ s m; Coq_result_impossible)\n s3\n ("Undefined full descriptor in [binding_inst_function_decls].")\n | Coq_full_descriptor_some a ->\n if attributes_configurable a\n then let a_2 = ({ attributes_data_value =\n (Coq_value_prim Coq_prim_undef);\n attributes_data_writable = true;\n attributes_data_enumerable = true;\n attributes_data_configurable =\n bconfig }) in\n let%bool\n (s0, x) = (object_define_own_prop s3 c\n (Coq_object_loc_prealloc\n Coq_prealloc_global) fname\n (descriptor_of_attributes\n (Coq_attributes_data_of a_2))\n true) in follow s0\n else if \n (descriptor_is_accessor_dec (descriptor_of_attributes a)) \n || (not (attributes_writable a))\n || (not (attributes_enumerable a))\n then run_error s3 Coq_native_error_type\n else follow s3\n else follow s2\n else let%void\n s3 = (env_record_create_mutable_binding s2 c l\n fname (Some bconfig)) in follow s3\n\n(** val make_arg_getter :\n state -> execution_ctx -> prop_name -> lexical_env -> result **)\n\nand make_arg_getter s c x x0 =\n let xbd =\n strappend ("return ")\n (strappend x (";"))\n in\n let bd = Coq_funcbody_intro ((Coq_prog_intro (true, ((Coq_element_stat\n (Coq_stat_return (Some (Coq_expr_identifier x)))) :: []))), xbd)\n in\n creating_function_object s c [] bd x0 true\n\n(** val make_arg_setter :\n state -> execution_ctx -> prop_name -> lexical_env -> result **)\n\nand make_arg_setter s c x x0 =\n let xparam = strappend x ("_arg") in\n let xbd =\n strappend x (strappend (" = ") (strappend xparam ";"))\n in\n let bd = Coq_funcbody_intro ((Coq_prog_intro (true, ((Coq_element_stat\n (Coq_stat_expr (Coq_expr_assign ((Coq_expr_identifier x), None,\n (Coq_expr_identifier xparam))))) :: []))), xbd)\n in\n creating_function_object s c (xparam :: []) bd x0 true\n\n(** val arguments_object_map_loop :\n state -> execution_ctx -> object_loc -> string list ->\n int -> value list -> lexical_env -> strictness_flag -> object_loc ->\n string list -> result_void **)\n\nand arguments_object_map_loop s c l xs len args x str lmap xsmap =\n (fun fO fS n -> if int_eq n 0 then fO () else fS (n-1))\n (fun _ ->\n if list_eq_nil_decidable xsmap\n then res_void s\n else let%some o = (object_binds_pickable_option s l) in\n let\n o_2 = (object_for_args_object o lmap Coq_builtin_get_args_obj\n Coq_builtin_get_own_prop_args_obj\n Coq_builtin_define_own_prop_args_obj\n Coq_builtin_delete_args_obj) in\n res_void (object_write s l o_2))\n (fun len_2 ->\n let tdl = (take_drop_last args) in\n let (rmlargs, largs) = tdl in\n let arguments_object_map_loop_2 = (fun s0 xsmap0 ->\n arguments_object_map_loop s0 c l xs len_2 rmlargs x str lmap\n xsmap0) in\n let a = (attributes_data_intro_all_true largs) in\n let%bool\n \n (s1, b) = (object_define_own_prop s c l\n (convert_prim_to_string (Coq_prim_number\n (number_of_int len_2)))\n (descriptor_of_attributes (Coq_attributes_data_of a)) false) in\n if ge_nat_decidable len_2 (LibList.length xs)\n then arguments_object_map_loop_2 s1 xsmap\n else let dummy = "" in\n let x0 = (nth_def dummy len_2 xs) in\n if (str)\n || (mem_decide string_eq x0 xsmap)\n then arguments_object_map_loop_2 s1 xsmap\n else let%object \n (s2, lgetter) = (make_arg_getter s1 c x0 x) in\n let%object \n (s3, lsetter) = (make_arg_setter s2 c x0 x) in\n let a_2 = ({ attributes_accessor_get =\n (Coq_value_object lgetter);\n attributes_accessor_set = (Coq_value_object\n lsetter); attributes_accessor_enumerable =\n false; attributes_accessor_configurable =\n true }) in\n let%bool\n \n (s4, b_2) = (object_define_own_prop s3 c lmap\n (convert_prim_to_string (Coq_prim_number\n (number_of_int len_2)))\n (descriptor_of_attributes\n (Coq_attributes_accessor_of a_2)) false) in\n arguments_object_map_loop_2 s4 (x0 :: xsmap))\n len\n\n(** val arguments_object_map :\n state -> execution_ctx -> object_loc -> string list ->\n value list -> lexical_env -> strictness_flag -> result_void **)\n\nand arguments_object_map s c l xs args x str =\n let%object \n (s_2, lmap) = (run_construct_prealloc s c Coq_prealloc_object []) in\n arguments_object_map_loop s_2 c l xs (LibList.length args) args x\n str lmap []\n\n(** val create_arguments_object :\n state -> execution_ctx -> object_loc -> string list ->\n value list -> lexical_env -> strictness_flag -> result **)\n\nand create_arguments_object s c lf xs args x str =\n let\n o = (object_create_builtin (Coq_value_object (Coq_object_loc_prealloc\n Coq_prealloc_object_proto))\n ("Arguments")\n Heap.empty) in\n let p = (object_alloc s o) in\n let (l, s_2) = p in\n let a = ({ attributes_data_value = (Coq_value_prim (Coq_prim_number\n (number_of_int (LibList.length args))));\n attributes_data_writable = true; attributes_data_enumerable = false;\n attributes_data_configurable = true }) in\n let%bool\n \n (s1, b) = (object_define_own_prop s_2 c l\n ("length")\n (descriptor_of_attributes (Coq_attributes_data_of a)) false) in\n let%void \n s2= (arguments_object_map s1 c l xs args x str) in\n if str\n then let vthrower = (Coq_value_object (Coq_object_loc_prealloc\n Coq_prealloc_throw_type_error)) in\n let a0 = ({ attributes_accessor_get = vthrower;\n attributes_accessor_set = vthrower;\n attributes_accessor_enumerable = false;\n attributes_accessor_configurable = false }) in\n let%bool\n \n (s3, b_2) = (object_define_own_prop s2 c l\n ("caller")\n (descriptor_of_attributes\n (Coq_attributes_accessor_of a0)) false) in\n let%bool\n \n (s4, b_3) = (object_define_own_prop s3 c l\n ("callee")\n (descriptor_of_attributes\n (Coq_attributes_accessor_of a0)) false) in\n res_ter s4 (res_val (Coq_value_object l))\n else let a0 = ({ attributes_data_value = (Coq_value_object lf);\n attributes_data_writable = true;\n attributes_data_enumerable = false;\n attributes_data_configurable = true }) in\n let%bool\n (s3, b_2) = (object_define_own_prop s2 c l\n ("callee")\n (descriptor_of_attributes (Coq_attributes_data_of a0))\n false) in\n res_ter s3 (res_val (Coq_value_object l))\n\n(** val binding_inst_arg_obj :\n state -> execution_ctx -> object_loc -> prog -> string\n list -> value list -> env_loc -> result_void **)\n\nand binding_inst_arg_obj s c lf p xs args l =\n let arguments_ =\n "arguments"\n in\n let str = (prog_intro_strictness p) in\n let%object\n (s1, largs) = (create_arguments_object s c lf xs args\n c.execution_ctx_variable_env str) in\n if str\n then let%void \n s2= (env_record_create_immutable_binding s1 l arguments_) in\n env_record_initialize_immutable_binding s2 l arguments_\n (Coq_value_object largs)\n else env_record_create_set_mutable_binding s1 c l arguments_ None\n (Coq_value_object largs) false\n\n(** val binding_inst_var_decls :\n state -> execution_ctx -> env_loc -> string list -> bool\n -> strictness_flag -> result_void **)\n\nand binding_inst_var_decls s c l vds bconfig str =\n match vds with\n | [] -> res_void s\n | vd :: vds_2 ->\n let bivd = (fun s0 ->\n binding_inst_var_decls s0 c l vds_2 bconfig str) in\n let%bool (s1, has) = (env_record_has_binding s c l vd) in\n if has\n then bivd s1\n else let%void\n s2 = (env_record_create_set_mutable_binding s1 c l vd (Some\n bconfig) (Coq_value_prim Coq_prim_undef) str) in bivd s2\n\n(** val execution_ctx_binding_inst :\n state -> execution_ctx -> codetype -> object_loc option ->\n prog -> value list -> result_void **)\n\nand execution_ctx_binding_inst s c ct funco p args =\n match c.execution_ctx_variable_env with\n | [] ->\n (fun s m -> Debug.impossible_with_heap_because __LOC__ s m; Coq_result_impossible)\n s\n ("Empty [execution_ctx_variable_env] in [execution_ctx_binding_inst].")\n | l :: l0 ->\n let str = (prog_intro_strictness p) in\n let follow = (fun s_2 names ->\n let \n bconfig = (codetype_compare ct Coq_codetype_eval) in\n let fds = (prog_funcdecl p) in\n let%void\n \n s1= (binding_inst_function_decls s_2 c l fds str bconfig) in\n let%bool\n \n (s2, bdefined) = (env_record_has_binding s1 c l\n ("arguments")) in\n let \n follow2 = (fun s10 ->\n let vds = prog_vardecl p in\n binding_inst_var_decls s10 c l vds bconfig str) in\n match ct with\n | Coq_codetype_func ->\n (match funco with\n | Some func ->\n if bdefined\n then follow2 s2\n else let%void\n s3 = (binding_inst_arg_obj s2 c func p names\n args l) in follow2 s3\n | None ->\n if bdefined\n then follow2 s2\n else (fun s m -> Debug.impossible_with_heap_because __LOC__ s m; Coq_result_impossible)\n s2\n ("Weird `arguments\\\' object in [execution_ctx_binding_inst]."))\n | Coq_codetype_global -> follow2 s2\n | Coq_codetype_eval -> follow2 s2) in\n match ct with\n | Coq_codetype_func ->\n (match funco with\n | Some func ->\n let%some \n nameso = (run_object_method object_formal_parameters_ s func) in\n let%some names = (nameso) in\n let%void\n \n s_2 = (binding_inst_formal_params s c l args names str) in follow s_2 names\n | None ->\n (fun s m -> Debug.impossible_with_heap_because __LOC__ s m; Coq_result_impossible)\n s\n ("Non coherent functionnal code type in [execution_ctx_binding_inst]."))\n | Coq_codetype_global ->\n (match funco with\n | Some o ->\n (fun s m -> Debug.impossible_with_heap_because __LOC__ s m; Coq_result_impossible)\n s\n ("Non coherent non-functionnal code type in [execution_ctx_binding_inst].")\n | None -> follow s [])\n | Coq_codetype_eval ->\n (match funco with\n | Some o ->\n (fun s m -> Debug.impossible_with_heap_because __LOC__ s m; Coq_result_impossible)\n s\n ("Non coherent non-functionnal code type in [execution_ctx_binding_inst].")\n | None -> follow s [])\n\n(** val entering_func_code :\n state -> execution_ctx -> object_loc -> value -> value list\n -> result **)\n\nand entering_func_code s c lf vthis args =\n let%some bdo = (run_object_method object_code_ s lf) in\n let%some bd = (bdo) in\n let str = (funcbody_is_strict bd) in\n let follow = (fun s_2 vthis_2 ->\n let%some lexo = (run_object_method object_scope_ s_2 lf) in\n let%some lex = (lexo) in\n let p = (lexical_env_alloc_decl s_2 lex) in\n let (lex_2, s1) = p in\n let \n c_2 = (execution_ctx_intro_same lex_2 vthis_2 str) in\n let%void\n s2= (execution_ctx_binding_inst s1 c_2 Coq_codetype_func\n (Some lf) (funcbody_prog bd) args) in\n run_call_default s2 c_2 lf) in\n if str\n then follow s vthis\n else (match vthis with\n | Coq_value_prim p ->\n (match p with\n | Coq_prim_undef ->\n follow s (Coq_value_object (Coq_object_loc_prealloc\n Coq_prealloc_global))\n | Coq_prim_null ->\n follow s (Coq_value_object (Coq_object_loc_prealloc\n Coq_prealloc_global))\n | Coq_prim_bool b -> let%value (s2, v) = (to_object s vthis) in follow s2 v\n | Coq_prim_number n -> let%value (s2, v) = (to_object s vthis) in follow s2 v\n | Coq_prim_string s0 ->\n let%value (s2, v) = (to_object s vthis) in follow s2 v)\n | Coq_value_object lthis -> follow s vthis)\n\n(** val run_object_get_own_prop :\n state -> execution_ctx -> object_loc -> prop_name ->\n full_descriptor specres **)\n\nand run_object_get_own_prop s c l x =\n let%some b = (run_object_method object_get_own_prop_ s l) in\n let def = (fun s_2 ->\n let%some p = (run_object_method object_properties_ s_2 l) in\n res_spec s_2\n (ifx_some_or_default\n (convert_option_attributes\n (HeapStr.read_option p x))\n Coq_full_descriptor_undef (fun x -> x))) in\n match b with\n | Coq_builtin_get_own_prop_default -> def s\n | Coq_builtin_get_own_prop_args_obj ->\n let%run (s1, d) = (def s) in begin\n match d with\n | Coq_full_descriptor_undef ->\n res_spec s1 Coq_full_descriptor_undef\n | Coq_full_descriptor_some a ->\n let%some \n lmapo = (run_object_method object_parameter_map_ s1 l) in\n let%some lmap = (lmapo) in\n let%run \n (s2, d0) = (run_object_get_own_prop s1 c lmap x) in\n let follow = (fun s_2 a0 ->\n res_spec s_2 (Coq_full_descriptor_some a0)) in\n match d0 with\n | Coq_full_descriptor_undef -> follow s2 a\n | Coq_full_descriptor_some amap ->\n let%value \n (s3, v) = (run_object_get s2 c lmap x) in\n match a with\n | Coq_attributes_data_of ad ->\n follow s3 (Coq_attributes_data_of\n (attributes_data_with_value ad v))\n | Coq_attributes_accessor_of aa ->\n (fun s m -> Debug.impossible_with_heap_because __LOC__ s m; Coq_result_impossible)\n s3\n ("[run_object_get_own_prop]: received an accessor property descriptor in a point where the specification suppose it never happens.")\n end\n | Coq_builtin_get_own_prop_string ->\n let%run (s0, d) = (def s) in\n match d with\n | Coq_full_descriptor_undef ->\n let%run\n \n (s1, k) = (to_int32 s0 c (Coq_value_prim (Coq_prim_string x))) in\n let%string\n \n (s2, s3) = (to_string s1 c (Coq_value_prim\n (Coq_prim_number (JsNumber.absolute k)))) in\n if not (string_eq x s3)\n then res_spec s2 Coq_full_descriptor_undef\n else let%string (s4, str) = (run_object_prim_value s2 l) in\n let%run\n (s5, k0) = (to_int32 s4 c (Coq_value_prim\n (Coq_prim_string x))) in\n let len = (number_of_int (strlength str)) in\n if le_int_decidable len k0\n then res_spec s5 Coq_full_descriptor_undef\n else let resultStr =\n string_sub str (int_of_number k0) 1\n (* TODO: check k0 is not negative *)\n in\n let a = { attributes_data_value =\n (Coq_value_prim (Coq_prim_string\n resultStr)); attributes_data_writable =\n false; attributes_data_enumerable = true;\n attributes_data_configurable = false }\n in\n res_spec s5 (Coq_full_descriptor_some\n (Coq_attributes_data_of a))\n | Coq_full_descriptor_some a -> res_spec s0 d\n\n(** val run_function_has_instance :\n state -> object_loc -> value -> result **)\n\nand run_function_has_instance s lv _foo_ = match _foo_ with\n | Coq_value_prim p -> run_error s Coq_native_error_type\n | Coq_value_object lo ->\n let%some vproto = (run_object_method object_proto_ s lv) in\n match vproto with\n | Coq_value_prim p ->\n (match p with\n | Coq_prim_null ->\n res_ter s (res_val (Coq_value_prim (Coq_prim_bool false)))\n | _ ->\n (fun s m -> Debug.impossible_with_heap_because __LOC__ s m; Coq_result_impossible)\n s\n ("Primitive found in the prototype chain in [run_object_has_instance_loop]."))\n | Coq_value_object proto ->\n if object_loc_compare proto lo\n then res_ter s (res_val (Coq_value_prim (Coq_prim_bool true)))\n else run_function_has_instance s proto (Coq_value_object\n lo)\n\n(** val run_object_has_instance :\n state -> execution_ctx -> builtin_has_instance -> object_loc\n -> value -> result **)\n\nand run_object_has_instance s c b l v =\n match b with\n | Coq_builtin_has_instance_function ->\n (match v with\n | Coq_value_prim w ->\n result_out (Coq_out_ter (s,\n (res_val (Coq_value_prim (Coq_prim_bool false)))))\n | Coq_value_object lv ->\n let%value\n \n (s1, vproto) = (run_object_get s c l\n ("prototype")) in\n match vproto with\n | Coq_value_prim p -> run_error s1 Coq_native_error_type\n | Coq_value_object lproto ->\n run_function_has_instance s1 lv (Coq_value_object\n lproto))\n | Coq_builtin_has_instance_after_bind ->\n let%some ol = (run_object_method object_target_function_ s l) in\n let%some l0= (ol) in\n let%some ob = (run_object_method object_has_instance_ s l0) in\n match ob with\n | Some b0 -> run_object_has_instance s c b0 l0 v\n | None -> run_error s Coq_native_error_type\n\n(** val from_prop_descriptor :\n state -> execution_ctx -> full_descriptor -> result **)\n\nand from_prop_descriptor s c _foo_ = match _foo_ with\n | Coq_full_descriptor_undef ->\n result_out (Coq_out_ter (s, (res_val (Coq_value_prim Coq_prim_undef))))\n | Coq_full_descriptor_some a ->\n let%object \n (s1, l) = (run_construct_prealloc s c Coq_prealloc_object []) in\n let follow = (fun s0 x ->\n let\n a1 = (attributes_data_intro_all_true (Coq_value_prim (Coq_prim_bool\n (attributes_enumerable a)))) in\n let%bool\n (s0_2, x0) = (object_define_own_prop s0 c l\n ("enumerable")\n (descriptor_of_attributes (Coq_attributes_data_of a1))\n throw_false) in\n let\n a2 = (attributes_data_intro_all_true (Coq_value_prim (Coq_prim_bool\n (attributes_configurable a)))) in\n let%bool\n (s_2, x1) = (object_define_own_prop s0_2 c l\n ("configurable")\n (descriptor_of_attributes (Coq_attributes_data_of a2))\n throw_false) in\n res_ter s_2 (res_val (Coq_value_object l))) in\n match a with\n | Coq_attributes_data_of ad ->\n let \n a1 = (attributes_data_intro_all_true ad.attributes_data_value) in\n let%bool\n (s2, x) = (object_define_own_prop s1 c l\n ("value")\n (descriptor_of_attributes (Coq_attributes_data_of a1))\n throw_false) in\n let\n a2 = (attributes_data_intro_all_true (Coq_value_prim (Coq_prim_bool\n ad.attributes_data_writable))) in\n let%bool\n (s3, v) = (object_define_own_prop s2 c l\n ("writable")\n (descriptor_of_attributes (Coq_attributes_data_of a2))\n throw_false) in follow s3 v\n | Coq_attributes_accessor_of aa ->\n let\n \n a1 = (attributes_data_intro_all_true aa.attributes_accessor_get) in\n let%bool\n (s2, x) = (object_define_own_prop s1 c l ("get")\n (descriptor_of_attributes (Coq_attributes_data_of a1))\n throw_false) in\n let\n \n a2 = (attributes_data_intro_all_true aa.attributes_accessor_set) in\n let%bool\n (s3, v) = (object_define_own_prop s2 c l ("set")\n (descriptor_of_attributes (Coq_attributes_data_of a2))\n throw_false) in follow s3 v\n\n(** val run_equal :\n state -> execution_ctx -> value -> value -> result **)\n\nand run_equal s c v1 v2 =\n let conv_number = fun s0 v -> to_number s0 c v in\n let conv_primitive = fun s0 v -> to_primitive s0 c v None in\n let checkTypesThen = (fun s0 v3 v4 k ->\n let ty1 = type_of v3 in\n let ty2 = type_of v4 in\n if type_compare ty1 ty2\n then result_out (Coq_out_ter (s0,\n (res_val (Coq_value_prim (Coq_prim_bool\n (equality_test_for_same_type ty1 v3 v4))))))\n else k ty1 ty2) in\n checkTypesThen s v1 v2 (fun ty1 ty2 ->\n let \n dc_conv = (fun v3 f v4 ->\n let%value (s0, v2_2) = (f s v4) in run_equal s0 c v3 v2_2) in\n let so = fun b ->\n result_out (Coq_out_ter (s,\n (res_val (Coq_value_prim (Coq_prim_bool b)))))\n in\n if (type_compare ty1 Coq_type_null)\n && (type_compare ty2 Coq_type_undef)\n then so true\n else if (type_compare ty1 Coq_type_undef)\n && (type_compare ty2 Coq_type_null)\n then so true\n else if (type_compare ty1 Coq_type_number)\n && (type_compare ty2 Coq_type_string)\n then dc_conv v1 conv_number v2\n else if \n (type_compare ty1 Coq_type_string)\n && (type_compare ty2 Coq_type_number)\n then dc_conv v2 conv_number v1\n else if type_compare ty1 Coq_type_bool\n then dc_conv v2 conv_number v1\n else if type_compare ty2 Coq_type_bool\n then dc_conv v1 conv_number v2\n else if \n ( (type_compare ty1 Coq_type_string)\n || (type_compare ty1 Coq_type_number))\n &&\n (type_compare ty2 Coq_type_object)\n then dc_conv v1 conv_primitive v2\n else if \n (type_compare ty1 Coq_type_object)\n && ( (type_compare ty2 Coq_type_string)\n || (type_compare ty2 Coq_type_number))\n then dc_conv v2 conv_primitive v1\n else so false)\n\n(** val convert_twice :\n (\'a2 resultof -> (state -> \'a1 -> (\'a1 * \'a1) specres) -> (\'a1 * \'a1)\n specres) -> (state -> value -> \'a2 resultof) -> state -> value -> value\n -> (\'a1 * \'a1) specres **)\n\nand convert_twice :\n \'a1 \'a2 . (\'a2 resultof -> (state -> \'a1 -> (\'a1 * \'a1) specres) -> (\'a1 * \'a1) specres) ->\n (state -> value -> \'a2 resultof) -> state -> value -> value -> (\'a1 * \'a1) specres\n = fun ifv kC s v1 v2 ->\n ifv (kC s v1) (fun s1 vc1 ->\n ifv (kC s1 v2) (fun s2 vc2 -> res_spec s2 (vc1, vc2)))\n\n(** val convert_twice_primitive :\n state -> execution_ctx -> value -> value -> (prim * prim)\n specres **)\n\nand convert_twice_primitive s c v1 v2 =\n convert_twice ifx_prim (fun s0 v -> to_primitive s0 c v None) s v1 v2\n\n(** val convert_twice_number :\n state -> execution_ctx -> value -> value ->\n (number * number) specres **)\n\nand convert_twice_number s c v1 v2 =\n convert_twice ifx_number (fun s0 v -> to_number s0 c v) s v1 v2\n\n(** val convert_twice_string :\n state -> execution_ctx -> value -> value ->\n (string * string) specres **)\n\nand convert_twice_string s c v1 v2 =\n convert_twice ifx_string (fun s0 v -> to_string s0 c v) s v1 v2\n\n(** val issome : \'a1 option -> bool **)\n\nand issome : \'a1 . \'a1 option -> bool = fun _foo_ ->\n match _foo_ with\n | Some t -> true\n | None -> false\n\nand run_binary_op_add s c v1 v2 =\n let%run (s1, (w1, w2)) = (convert_twice_primitive s c v1 v2) in\n if (type_compare (type_of (Coq_value_prim w1)) Coq_type_string)\n || (type_compare (type_of (Coq_value_prim w2)) Coq_type_string)\n then let%run (s2, (str1, str2)) = (convert_twice_string s1 c (Coq_value_prim w1) (Coq_value_prim w2)) in\n res_out (Coq_out_ter (s2, (res_val (Coq_value_prim (Coq_prim_string (strappend str1 str2))))))\n else let%run (s2, (n1, n2)) = (convert_twice_number s1 c (Coq_value_prim w1) (Coq_value_prim w2)) in\n res_out (Coq_out_ter (s2, (res_val (Coq_value_prim (Coq_prim_number (n1 +. n2))))))\n\nand run_binary_op_arith mathop s c v1 v2 =\n let%run (s1, nn) = (convert_twice_number s c v1 v2) in\n let (n1, n2) = nn in\n res_out (Coq_out_ter (s1, (res_val (Coq_value_prim (Coq_prim_number (mathop n1 n2))))))\n\nand run_binary_op_shift b_unsigned mathop s c v1 v2 =\n let conv = (if b_unsigned then to_uint32 else to_int32) in\n let%run (s1, k1) = (conv s c v1) in\n let%run (s2, k2) = (to_uint32 s1 c v2) in\n let k2_2 = JsNumber.modulo_32 k2 in\n res_ter s2 (res_val (Coq_value_prim (Coq_prim_number (mathop k1 k2_2))))\n\nand run_binary_op_bitwise mathop s c v1 v2 =\n let%run (s1, k1) = (to_int32 s c v1) in\n let%run (s2, k2) = (to_int32 s1 c v2) in\n res_ter s2 (res_val (Coq_value_prim (Coq_prim_number (mathop k1 k2))))\n\nand run_binary_op_compare b_swap b_neg s c v1 v2 =\n let%run (s1, ww) = convert_twice_primitive s c v1 v2 in\n let (w1, w2) = ww in\n let p = if b_swap then (w2, w1) else (w1, w2) in\n let (wa, wb) = p in\n let wr = inequality_test_primitive wa wb in\n if prim_compare wr Coq_prim_undef\n then res_out (Coq_out_ter (s1, res_val (Coq_value_prim (Coq_prim_bool false))))\n else if (b_neg) && (prim_compare wr (Coq_prim_bool true))\n then res_out (Coq_out_ter (s1,res_val (Coq_value_prim (Coq_prim_bool false))))\n else if (b_neg) && (prim_compare wr (Coq_prim_bool false))\n then res_out (Coq_out_ter (s1,res_val (Coq_value_prim (Coq_prim_bool true))))\n else res_out (Coq_out_ter (s1,res_val (Coq_value_prim wr)))\n\nand run_binary_op_instanceof s c v1 v2 =\n match v2 with\n | Coq_value_prim p -> run_error s Coq_native_error_type\n | Coq_value_object l ->\n let%some b = (run_object_method object_has_instance_ s l) in\n match b with\n | None -> run_error s Coq_native_error_type\n | Some has_instance_id -> run_object_has_instance s c has_instance_id l v1\n\nand run_binary_op_in s c v1 v2 =\n match v2 with\n | Coq_value_prim p -> run_error s Coq_native_error_type\n | Coq_value_object l ->\n let%string (s2, x) = (to_string s c v1) in\n object_has_prop s2 c l x\n\n(** val run_binary_op :\n state -> execution_ctx -> binary_op -> value -> value ->\n result **)\n\nand run_binary_op s c op v1 v2 =\n match op with\n | Coq_binary_op_mult -> run_binary_op_arith (fun x y -> x *. y) s c v1 v2\n | Coq_binary_op_div -> run_binary_op_arith (fun x y -> x /. y) s c v1 v2\n | Coq_binary_op_mod -> run_binary_op_arith (fun x y -> JsNumber.fmod x y) s c v1 v2\n | Coq_binary_op_sub -> run_binary_op_arith (fun x y -> x -. y) s c v1 v2\n | Coq_binary_op_lt -> run_binary_op_compare false false s c v1 v2\n | Coq_binary_op_gt -> run_binary_op_compare true false s c v1 v2\n | Coq_binary_op_le -> run_binary_op_compare true true s c v1 v2\n | Coq_binary_op_ge -> run_binary_op_compare false true s c v1 v2\n | Coq_binary_op_left_shift -> run_binary_op_shift false JsNumber.int32_left_shift s c v1 v2\n | Coq_binary_op_right_shift -> run_binary_op_shift false JsNumber.int32_right_shift s c v1 v2\n | Coq_binary_op_unsigned_right_shift -> run_binary_op_shift true JsNumber.uint32_right_shift s c v1 v2\n | Coq_binary_op_bitwise_and -> run_binary_op_bitwise JsNumber.int32_bitwise_and s c v1 v2\n | Coq_binary_op_bitwise_or -> run_binary_op_bitwise JsNumber.int32_bitwise_or s c v1 v2\n | Coq_binary_op_bitwise_xor -> run_binary_op_bitwise JsNumber.int32_bitwise_xor s c v1 v2\n | Coq_binary_op_add -> run_binary_op_add s c v1 v2\n | Coq_binary_op_instanceof -> run_binary_op_instanceof s c v1 v2\n | Coq_binary_op_in -> run_binary_op_in s c v1 v2\n | Coq_binary_op_equal -> run_equal s c v1 v2\n | Coq_binary_op_disequal ->\n let%bool (s0, b0) = (run_equal s c v1 v2) in\n res_ter s0 (res_val (Coq_value_prim (Coq_prim_bool (not b0))))\n | Coq_binary_op_strict_equal ->\n result_out (Coq_out_ter (s, (res_val (Coq_value_prim (Coq_prim_bool (strict_equality_test v1 v2))))))\n | Coq_binary_op_strict_disequal ->\n result_out (Coq_out_ter (s, (res_val (Coq_value_prim (Coq_prim_bool (not (strict_equality_test v1 v2)))))))\n | Coq_binary_op_coma -> result_out (Coq_out_ter (s, (res_val v2)))\n | Coq_binary_op_and -> Coq_result_impossible\n | Coq_binary_op_or -> Coq_result_impossible\n\n(** val run_prepost_op : unary_op -> ((number -> number) * bool) option **)\n\nand run_prepost_op _foo_ = match _foo_ with\n | Coq_unary_op_delete -> None\n | Coq_unary_op_void -> None\n | Coq_unary_op_typeof -> None\n | Coq_unary_op_post_incr -> Some (add_one, false)\n | Coq_unary_op_post_decr -> Some (sub_one, false)\n | Coq_unary_op_pre_incr -> Some (add_one, true)\n | Coq_unary_op_pre_decr -> Some (sub_one, true)\n | Coq_unary_op_add -> None\n | Coq_unary_op_neg -> None\n | Coq_unary_op_bitwise_not -> None\n | Coq_unary_op_not -> None\n\n(** val run_typeof_value : state -> value -> string **)\n\nand run_typeof_value s _foo_ = match _foo_ with\n | Coq_value_prim w -> typeof_prim w\n | Coq_value_object l ->\n if is_callable_dec s (Coq_value_object l)\n then "function"\n else "object"\n\n(** val run_unary_op :\n state -> execution_ctx -> unary_op -> expr -> result **)\n\nand run_unary_op s c op e =\n if prepost_unary_op_dec op\n then let%success (s1, rv1)= (run_expr s c e) in\n let%run (s2, v2) = (ref_get_value s1 c rv1) in\n let%number (s3, n1) = (to_number s2 c v2) in\n let%some po = (run_prepost_op op) in\n let (number_op, is_pre) = po in\n let n2 = (number_op n1) in\n let \n v = (Coq_prim_number (if is_pre then n2 else n1)) in\n let%void\n s4= (ref_put_value s3 c rv1 (Coq_value_prim\n (Coq_prim_number n2))) in\n result_out (Coq_out_ter (s4,\n (res_val (Coq_value_prim v))))\n else (match op with\n | Coq_unary_op_delete ->\n let%success (s0, rv)= (run_expr s c e) in begin\n match rv with\n | Coq_resvalue_empty ->\n res_ter s0 (res_val (Coq_value_prim (Coq_prim_bool true)))\n | Coq_resvalue_value v ->\n res_ter s0 (res_val (Coq_value_prim (Coq_prim_bool true)))\n | Coq_resvalue_ref r ->\n if ref_kind_comparable (ref_kind_of r) Coq_ref_kind_undef\n then if r.ref_strict\n then run_error s0 Coq_native_error_syntax\n else res_ter s0\n (res_val (Coq_value_prim (Coq_prim_bool true)))\n else (match r.ref_base with\n | Coq_ref_base_type_value v ->\n let%object (s1, l) = (to_object s0 v) in\n object_delete s1 c l r.ref_name\n r.ref_strict\n | Coq_ref_base_type_env_loc l ->\n if r.ref_strict\n then run_error s0 Coq_native_error_syntax\n else env_record_delete_binding s0 c l r.ref_name)\n end\n | Coq_unary_op_typeof ->\n let%success (s1, rv)= (run_expr s c e) in begin\n match rv with\n | Coq_resvalue_empty ->\n (fun s m -> Debug.impossible_with_heap_because __LOC__ s m; Coq_result_impossible)\n s1\n ("Empty result for a `typeof\\\' in [run_unary_op].")\n | Coq_resvalue_value v ->\n res_ter s1\n (res_val (Coq_value_prim (Coq_prim_string\n (run_typeof_value s1 v))))\n | Coq_resvalue_ref r ->\n if ref_kind_comparable (ref_kind_of r) Coq_ref_kind_undef\n then res_ter s1\n (res_val (Coq_value_prim (Coq_prim_string\n ("undefined"))))\n else let%run \n (s2, v) = (ref_get_value s1 c (Coq_resvalue_ref r)) in\n res_ter s2\n (res_val (Coq_value_prim (Coq_prim_string\n (run_typeof_value s2 v))))\n end\n | _ ->\n let%run (s1, v) = (run_expr_get_value s c e) in\n match op with\n | Coq_unary_op_void ->\n res_ter s1 (res_val (Coq_value_prim Coq_prim_undef))\n | Coq_unary_op_add -> to_number s1 c v\n | Coq_unary_op_neg ->\n let%number (s2, n) = (to_number s1 c v) in\n res_ter s2\n (res_val (Coq_value_prim (Coq_prim_number\n (JsNumber.neg n))))\n | Coq_unary_op_bitwise_not ->\n let%run (s2, k) = (to_int32 s1 c v) in\n res_ter s2\n (res_val (Coq_value_prim (Coq_prim_number (JsNumber.int32_bitwise_not k))))\n | Coq_unary_op_not ->\n res_ter s1\n (res_val (Coq_value_prim (Coq_prim_bool\n (not (convert_value_to_boolean v)))))\n | _ ->\n (fun s m -> Debug.impossible_with_heap_because __LOC__ s m; Coq_result_impossible)\n s1\n ("Undealt regular operator in [run_unary_op]."))\n\n(** val create_new_function_in :\n state -> execution_ctx -> string list -> funcbody ->\n result **)\n\nand create_new_function_in s c args bd =\n creating_function_object s c args bd c.execution_ctx_lexical_env\n c.execution_ctx_strict\n\n(** val init_object :\n state -> execution_ctx -> object_loc -> propdefs -> result **)\n\nand init_object s c l _foo_ = match _foo_ with\n | [] -> result_out (Coq_out_ter (s, (res_val (Coq_value_object l))))\n | p :: pds_2 ->\n let (pn, pb) = p in\n let x = (string_of_propname pn) in\n let follows = (fun s1 desc ->\n let%success \n (s2, rv) = (object_define_own_prop s1 c l x desc false) in init_object s2 c l pds_2) in\n match pb with\n | Coq_propbody_val e0 ->\n let%run (s1, v0) = (run_expr_get_value s c e0) in\n let desc = { descriptor_value = (Some v0); descriptor_writable =\n (Some true); descriptor_get = None; descriptor_set = None;\n descriptor_enumerable = (Some true); descriptor_configurable =\n (Some true) }\n in\n follows s1 desc\n | Coq_propbody_get bd ->\n let%value (s1, v0) = (create_new_function_in s c [] bd) in\n let desc = { descriptor_value = None; descriptor_writable = None;\n descriptor_get = (Some v0); descriptor_set = None;\n descriptor_enumerable = (Some true); descriptor_configurable =\n (Some true) }\n in\n follows s1 desc\n | Coq_propbody_set (args, bd) ->\n let%value (s1, v0) = (create_new_function_in s c args bd) in\n let desc = { descriptor_value = None; descriptor_writable = None;\n descriptor_get = None; descriptor_set = (Some v0);\n descriptor_enumerable = (Some true); descriptor_configurable =\n (Some true) }\n in\n follows s1 desc\n\n(** val run_array_element_list :\n state -> execution_ctx -> object_loc -> expr option list ->\n float -> result **)\n\nand run_array_element_list s c l oes n =\n match oes with\n | [] -> result_out (Coq_out_ter (s, (res_val (Coq_value_object l))))\n | o :: oes_2 ->\n (match o with\n | Some e ->\n let \n loop_result = (fun s0 ->\n run_array_element_list s0 c l oes_2 0.) in\n let%run (s0, v) = (run_expr_get_value s c e) in\n let%value\n (s1, vlen) = (run_object_get s0 c l\n ("length")) in\n let%run (s2, ilen) = (to_uint32 s1 c vlen) in\n let%string\n (s3, slen) = (to_string s2 c (Coq_value_prim (Coq_prim_number\n (ilen +. n)))) in\n let desc = ({ attributes_data_value = v;\n attributes_data_writable = true;\n attributes_data_enumerable = true;\n attributes_data_configurable = true }) in\n let%bool\n (s4, x) = (object_define_own_prop s3 c l slen\n (descriptor_of_attributes (Coq_attributes_data_of\n desc)) false) in\n let%object (s5, l0) = (loop_result s4) in\n res_ter s5 (res_val (Coq_value_object l0))\n | None ->\n let firstIndex = (elision_head_count (None :: oes_2)) in\n run_array_element_list s c l\n (elision_head_remove (None :: oes_2)) (number_of_int firstIndex))\n\n(** val init_array :\n state -> execution_ctx -> object_loc -> expr option list ->\n result **)\n\nand init_array s c l oes =\n let elementList = (elision_tail_remove oes) in\n let elisionLength = (elision_tail_count oes) in\n let%object \n (s0, l0) = (run_array_element_list s c l elementList 0.) in\n let%value\n (s1, vlen) = (run_object_get s0 c l0\n ("length")) in\n let%run (s2, ilen) = (to_uint32 s1 c vlen) in\n let%run\n \n (s3, len) = (to_uint32 s2 c (Coq_value_prim (Coq_prim_number\n (ilen +. number_of_int elisionLength)))) in\n let%not_throw\n (s4, x) = (object_put s3 c l0\n ("length")\n (Coq_value_prim (Coq_prim_number len))\n throw_false) in\n result_out (Coq_out_ter (s4,\n (res_val (Coq_value_object l0))))\n\n(** val run_var_decl_item :\n state -> execution_ctx -> prop_name -> expr option -> result **)\n\nand run_var_decl_item s c x _foo_ = match _foo_ with\n | Some e ->\n let%run (s1, ir) = (identifier_resolution s c x) in\n let%run (s2, v) = (run_expr_get_value s1 c e) in\n let%void s3= (ref_put_value s2 c (Coq_resvalue_ref ir) v) in\n result_out (Coq_out_ter (s3,\n (res_val (Coq_value_prim (Coq_prim_string x)))))\n | None ->\n result_out (Coq_out_ter (s,\n (res_val (Coq_value_prim (Coq_prim_string x)))))\n\n(** val run_var_decl :\n state -> execution_ctx -> (prop_name * expr option) list ->\n result **)\n\nand run_var_decl s c _foo_ = match _foo_ with\n | [] -> result_out (Coq_out_ter (s, res_empty))\n | y :: xeos_2 ->\n let (x, eo) = y in\n let%value (s1, vname) = (run_var_decl_item s c x eo) in\n run_var_decl s1 c xeos_2\n\n(** val run_list_expr :\n state -> execution_ctx -> value list -> expr list -> value\n list specres **)\n\nand run_list_expr s1 c vs _foo_ = match _foo_ with\n | [] -> res_spec s1 (rev vs)\n | e :: es_2 ->\n let%run (s2, v) = (run_expr_get_value s1 c e) in\n run_list_expr s2 c (v :: vs) es_2\n\n(** val run_block :\n state -> execution_ctx -> stat list -> result **)\n\nand run_block s c _foo_ = match _foo_ with\n | [] -> res_ter s (res_normal Coq_resvalue_empty)\n | t :: ts_rev_2 ->\n let%success (s0, rv0)= (run_block s c ts_rev_2) in\n ifx_success_state rv0 (run_stat s0 c t) (fun x x0 ->\n result_out (Coq_out_ter (x, (res_normal x0))))\n\nand run_binary_op_and s c e1 e2 =\n let%run (s1, v1) = (run_expr_get_value s c e1) in\n let b1 = (convert_value_to_boolean v1) in\n if not b1\n then res_ter s1 (res_val v1)\n else let%run (s2, v) = (run_expr_get_value s1 c e2) in\n res_ter s2 (res_val v)\n\nand run_binary_op_or s c e1 e2 =\n let%run (s1, v1) = (run_expr_get_value s c e1) in\n let b1 = (convert_value_to_boolean v1) in\n if b1 \n then res_ter s1 (res_val v1)\n else let%run (s2, v) = (run_expr_get_value s1 c e2) in\n res_ter s2 (res_val v)\n\n(** val run_expr_binary_op :\n state -> execution_ctx -> binary_op -> expr -> expr ->\n result **)\n\nand run_expr_binary_op s c op e1 e2 =\n match op with\n | Coq_binary_op_and -> run_binary_op_and s c e1 e2\n | Coq_binary_op_or -> run_binary_op_or s c e1 e2\n | _ ->\n let%run (s1,v1) = run_expr_get_value s c e1 in\n let%run (s2,v2) = run_expr_get_value s1 c e2 in\n run_binary_op s2 c op v1 v2\n\n(** val run_expr_access :\n state -> execution_ctx -> expr -> expr -> result **)\n\n(* TODO DEPRECATEd\n and run_expr_access s c e1 e2 =\n let%run (s1, v1) = (run_expr_get_value s c e1) in\n let%run (s2, v2) = (run_expr_get_value s1 c e2) in\n if or_decidable (value_compare v1 (Coq_value_prim Coq_prim_undef))\n (value_compare v1 (Coq_value_prim Coq_prim_null))\n then run_error s2 Coq_native_error_type\n else let%string (s3, x) = (to_string s2 c v2) in\n res_ter s3\n (res_ref (ref_create_value v1 x c.execution_ctx_strict))\n*)\n\nand run_expr_access s c e1 e2 =\n let%run (s1,v1) = run_expr_get_value s c e1 in\n let%run (s2,v2) = run_expr_get_value s1 c e2 in\n if (value_compare v1 (Coq_value_prim Coq_prim_undef))\n || (value_compare v1 (Coq_value_prim Coq_prim_null))\n then run_error s2 Coq_native_error_type\n else let%string (s3,x) = to_string s2 c v2 in\n res_ter s3 (res_ref (ref_create_value v1 x c.execution_ctx_strict))\n\n(** val run_expr_assign :\n state -> execution_ctx -> binary_op option -> expr -> expr\n -> result **)\n\nand run_expr_assign s c opo e1 e2 =\n let%success (s1, rv1)= (run_expr s c e1) in\n let \n follow = (fun s0 rv_2 ->\n match rv_2 with\n | Coq_resvalue_empty ->\n (fun s m -> Debug.impossible_with_heap_because __LOC__ s m; Coq_result_impossible)\n s0\n ("Non-value result in [run_expr_assign].")\n | Coq_resvalue_value v ->\n let%void s_2= (ref_put_value s0 c rv1 v) in\n result_out (Coq_out_ter (s_2, (res_val v)))\n | Coq_resvalue_ref r ->\n (fun s m -> Debug.impossible_with_heap_because __LOC__ s m; Coq_result_impossible)\n s0\n ("Non-value result in [run_expr_assign].")) in\n match opo with\n | Some op ->\n let%run (s2, v1) = (ref_get_value s1 c rv1) in\n let%run (s3, v2) = (run_expr_get_value s2 c e2) in\n let%success (s4, v) = (run_binary_op s3 c op v1 v2) in follow s4 v\n | None ->\n let%run (x, x0 )= (run_expr_get_value s1 c e2) in\n follow x (Coq_resvalue_value x0)\n\n(** val run_expr_function :\n state -> execution_ctx -> prop_name option -> string list\n -> funcbody -> result **)\n\nand run_expr_function s c fo args bd =\n match fo with\n | Some fn ->\n let \n p = (lexical_env_alloc_decl s c.execution_ctx_lexical_env) in\n let (lex_2, s_2) = p in\n let follow = fun l ->\n let%some e = (env_record_binds_pickable_option s_2 l) in\n let%void s1= (env_record_create_immutable_binding s_2 l fn) in\n let%object\n (s2, l0) = (creating_function_object s1 c args bd lex_2\n (funcbody_is_strict bd)) in\n let%void\n s3= (env_record_initialize_immutable_binding s2 l fn\n (Coq_value_object l0)) in\n result_out (Coq_out_ter (s3,\n (res_val (Coq_value_object l0))))\n in\n destr_list lex_2 (fun x ->\n (fun s m -> Debug.impossible_with_heap_because __LOC__ s m; Coq_result_impossible)\n s_2\n ("Empty lexical environnment allocated in [run_expr_function]."))\n (fun l x -> follow l) ()\n | None ->\n let lex = c.execution_ctx_lexical_env in\n creating_function_object s c args bd lex (funcbody_is_strict bd)\n\n(** val entering_eval_code :\n state -> execution_ctx -> bool -> funcbody -> (state ->\n execution_ctx -> result) -> result **)\n\nand entering_eval_code s c direct bd k =\n let str = ((funcbody_is_strict bd) || (direct && c.execution_ctx_strict)) in\n let c_2 = (if direct then c else execution_ctx_initial str) in\n let p = (if str\n then lexical_env_alloc_decl s c_2.execution_ctx_lexical_env\n else (c_2.execution_ctx_lexical_env, s)) in\n let (lex, s_2) = p in\n let c1 = (if str then execution_ctx_with_lex_same c_2 lex else c_2) in\n let p0 = (funcbody_prog bd) in\n let%void\n s1 = (execution_ctx_binding_inst s_2 c1 Coq_codetype_eval None\n p0 []) in k s1 c1\n\n(** val run_eval :\n state -> execution_ctx -> bool -> value list -> result **)\n\nand run_eval s c is_direct_call vs =\n match get_arg 0 vs with\n | Coq_value_prim p ->\n (match p with\n | Coq_prim_undef ->\n result_out (Coq_out_ter (s,\n (res_val (Coq_value_prim Coq_prim_undef))))\n | Coq_prim_null ->\n result_out (Coq_out_ter (s, (res_val (Coq_value_prim Coq_prim_null))))\n | Coq_prim_bool b ->\n result_out (Coq_out_ter (s,\n (res_val (Coq_value_prim (Coq_prim_bool b)))))\n | Coq_prim_number n ->\n result_out (Coq_out_ter (s,\n (res_val (Coq_value_prim (Coq_prim_number n)))))\n | Coq_prim_string s0 ->\n let str = (is_direct_call && c.execution_ctx_strict) in\n match parse_pickable s0 str with\n | Some p0 ->\n entering_eval_code s c is_direct_call (Coq_funcbody_intro\n (p0, s0)) (fun s1 c_2 ->\n let%ter (s2, r) = (run_prog s1 c_2 p0) in\n match r.res_type with\n | Coq_restype_normal ->\n ifx_empty_label s2 r (fun x ->\n match r.res_value with\n | Coq_resvalue_empty ->\n res_ter s2 (res_val (Coq_value_prim Coq_prim_undef))\n | Coq_resvalue_value v -> res_ter s2 (res_val v)\n | Coq_resvalue_ref r0 ->\n (fun s m -> Debug.impossible_with_heap_because __LOC__ s m; Coq_result_impossible)\n s2\n ("Reference found in the result of an `eval\\\' in [run_eval]."))\n | Coq_restype_throw -> res_ter s2 (res_throw r.res_value)\n | _ ->\n (fun s m -> Debug.impossible_with_heap_because __LOC__ s m; Coq_result_impossible)\n s2\n ("Forbidden result type returned by an `eval\\\' in [run_eval]."))\n | None -> run_error s Coq_native_error_syntax)\n | Coq_value_object o ->\n result_out (Coq_out_ter (s, (res_val (Coq_value_object o))))\n\n(** val run_expr_call :\n state -> execution_ctx -> expr -> expr list -> result **)\n\nand run_expr_call s c e1 e2s =\n let is_eval_direct = (is_syntactic_eval e1) in\n let%success (s1, rv)= (run_expr s c e1) in\n let%run (s2, f) = (ref_get_value s1 c rv) in\n let%run (s3, vs) = (run_list_expr s2 c [] e2s) in\n match f with\n | Coq_value_prim p -> run_error s3 Coq_native_error_type\n | Coq_value_object l ->\n if is_callable_dec s3 (Coq_value_object l)\n then let follow = (fun vthis ->\n if object_loc_compare l (Coq_object_loc_prealloc\n Coq_prealloc_global_eval)\n then run_eval s3 c is_eval_direct vs\n else run_call s3 c l vthis vs) in\n match rv with\n | Coq_resvalue_empty ->\n (fun s m -> Debug.impossible_with_heap_because __LOC__ s m; Coq_result_impossible)\n s3\n ("[run_expr_call] unable to call an empty result.")\n | Coq_resvalue_value v ->\n follow (Coq_value_prim Coq_prim_undef)\n | Coq_resvalue_ref r ->\n (match r.ref_base with\n | Coq_ref_base_type_value v ->\n if (ref_kind_comparable (ref_kind_of r) Coq_ref_kind_primitive_base)\n || (ref_kind_comparable (ref_kind_of r) Coq_ref_kind_null)\n || (ref_kind_comparable (ref_kind_of r) Coq_ref_kind_object)\n then follow v\n else (fun s m -> Debug.impossible_with_heap_because __LOC__ s m; Coq_result_impossible)\n s3\n ("[run_expr_call] unable to call a non-property function.")\n | Coq_ref_base_type_env_loc l0 ->\n let%some v = (env_record_implicit_this_value s3 l0) in follow v)\n else run_error s3 Coq_native_error_type\n\n(** val run_expr_conditionnal :\n state -> execution_ctx -> expr -> expr -> expr -> result **)\n\nand run_expr_conditionnal s c e1 e2 e3 =\n let%run (s1, v1) = (run_expr_get_value s c e1) in\n let b = (convert_value_to_boolean v1) in\n let e = (if b then e2 else e3) in\n let%run (s0, r) = (run_expr_get_value s1 c e) in\n res_ter s0 (res_val r)\n\n(** val run_expr_new :\n state -> execution_ctx -> expr -> expr list -> result **)\n\nand run_expr_new s c e1 e2s =\n let%run (s1, v) = (run_expr_get_value s c e1) in\n let%run (s2, args) = (run_list_expr s1 c [] e2s) in\n match v with\n | Coq_value_prim p -> run_error s2 Coq_native_error_type\n | Coq_value_object l ->\n let%some coo = (run_object_method object_construct_ s2 l) in\n match coo with\n | Some co -> run_construct s2 c co l args\n | None -> run_error s2 Coq_native_error_type\n\n(** val run_stat_label :\n state -> execution_ctx -> label -> stat -> result **)\n\nand run_stat_label s c lab t =\n let%break (s1, r1) = run_stat s c t in\n result_out (Coq_out_ter (s1,\n (if label_compare r1.res_label lab\n then res_normal r1.res_value\n else r1)))\n\n(** val run_stat_with :\n state -> execution_ctx -> expr -> stat -> result **)\n\nand run_stat_with s c e1 t2 =\n let%run (s1, v1) = (run_expr_get_value s c e1) in\n let%object (s2, l) = (to_object s1 v1) in\n let lex = (c.execution_ctx_lexical_env) in\n let \n p = (lexical_env_alloc_object s2 lex l provide_this_true) in\n let (lex_2, s3) = p in\n let c_2 = (execution_ctx_with_lex c lex_2) in\n run_stat s3 c_2 t2\n\n(** val run_stat_if :\n state -> execution_ctx -> expr -> stat -> stat option ->\n result **)\n\nand run_stat_if s c e1 t2 to0 =\n let%run (s1, v1) = (run_expr_get_value s c e1) in\n let b = (convert_value_to_boolean v1) in\n if b\n then run_stat s1 c t2\n else (match to0 with\n | Some t3 -> run_stat s1 c t3\n | None ->\n result_out (Coq_out_ter (s1, (res_normal Coq_resvalue_empty))))\n\n(** val run_stat_while :\n state -> execution_ctx -> resvalue -> label_set -> expr ->\n stat -> result **)\n\nand run_stat_while s c rv labs e1 t2 =\n let%run (s1, v1) = (run_expr_get_value s c e1) in\n let b = (convert_value_to_boolean v1) in\n if b\n then let%ter (s2, r) = (run_stat s1 c t2) in\n let\n rv_2 = (if not\n (resvalue_compare r.res_value Coq_resvalue_empty)\n then r.res_value\n else rv) in\n let loop = (fun x ->\n run_stat_while s2 c rv_2 labs e1 t2) in\n if (not (restype_compare r.res_type Coq_restype_continue))\n || (not (res_label_in r labs))\n then if \n (restype_compare r.res_type Coq_restype_break)\n && (res_label_in r labs)\n then res_ter s2 (res_normal rv_2)\n else if not\n (restype_compare r.res_type\n Coq_restype_normal)\n then res_ter s2 r\n else loop ()\n else loop ()\n else res_ter s1 (res_normal rv)\n\n(** val run_stat_switch_end :\n state -> execution_ctx -> resvalue -> switchclause list ->\n result **)\n\nand run_stat_switch_end s c rv _foo_ = match _foo_ with\n | [] -> result_out (Coq_out_ter (s, (res_normal rv)))\n | y :: scs_2 ->\n match y with Coq_switchclause_intro (e, ts) ->\n ifx_success_state rv (run_block s c (rev ts)) (fun s1 rv1 ->\n run_stat_switch_end s1 c rv1 scs_2)\n\n(** val run_stat_switch_no_default :\n state -> execution_ctx -> value -> resvalue -> switchclause\n list -> result **)\n\nand run_stat_switch_no_default s c vi rv _foo_ = match _foo_ with\n | [] -> result_out (Coq_out_ter (s, (res_normal rv)))\n | y :: scs_2 ->\n match y with Coq_switchclause_intro (e, ts) ->\n let%run (s1, v1) = (run_expr_get_value s c e) in\n let b = (strict_equality_test v1 vi) in\n if b\n then let%success (s2, rv2)= (run_block s1 c (rev ts)) in\n run_stat_switch_end s2 c rv2 scs_2\n else run_stat_switch_no_default s1 c vi rv scs_2\n\n(** val run_stat_switch_with_default_default :\n state -> execution_ctx -> stat list -> switchclause list ->\n result **)\n\nand run_stat_switch_with_default_default s c ts scs =\n let%success (s1, rv)= (run_block s c (rev ts)) in\n run_stat_switch_end s1 c rv scs\n\n(** val run_stat_switch_with_default_B :\n state -> execution_ctx -> value -> resvalue -> stat list ->\n switchclause list -> result **)\n\nand run_stat_switch_with_default_B s c vi rv ts0 scs = match scs with\n | [] -> run_stat_switch_with_default_default s c ts0 scs\n | y :: scs_2 ->\n match y with Coq_switchclause_intro (e, ts) ->\n let%run (s1, v1) = (run_expr_get_value s c e) in\n let b = (strict_equality_test v1 vi) in\n if b\n then let%success (s2, rv2)= (run_block s1 c (rev ts)) in\n run_stat_switch_end s2 c rv2 scs_2\n else run_stat_switch_with_default_B s1 c vi rv ts0 scs_2\n\n(** val run_stat_switch_with_default_A :\n state -> execution_ctx -> bool -> value -> resvalue ->\n switchclause list -> stat list -> switchclause list -> result **)\n\nand run_stat_switch_with_default_A s c found vi rv scs1 ts0 scs2 =\n match scs1 with\n | [] ->\n if found\n then run_stat_switch_with_default_default s c ts0 scs2\n else run_stat_switch_with_default_B s c vi rv ts0 scs2\n | y :: scs_2 ->\n match y with Coq_switchclause_intro (e, ts) ->\n let \n follow = (fun s0 ->\n ifx_success_state rv (run_block s0 c (rev ts)) (fun s1 rv0 ->\n run_stat_switch_with_default_A s1 c true vi rv0 scs_2 ts0 scs2)) in\n if found\n then follow s\n else let%run (s1, v1) = (run_expr_get_value s c e) in\n let b = (strict_equality_test v1 vi) in\n if b\n then follow s1\n else run_stat_switch_with_default_A s1 c false vi rv\n scs_2 ts0 scs2\n\n(** val run_stat_switch :\n state -> execution_ctx -> label_set -> expr -> switchbody ->\n result **)\n\n(* ALTERNATIVE VERSION, WITH LESS FACTORIZATION\nand run_stat_switch s c labs e sb =\n let%run (s1, vi) = run_expr_get_value s c e in\n match sb with\n | Coq_switchbody_nodefault scs ->\n let%success (s0, r) = begin\n let%break (s2, r) =\n run_stat_switch_no_default s1 c vi \n Coq_resvalue_empty scs in\n if res_label_in r labs\n then result_out (Coq_out_ter (s2, (res_normal r.res_value)))\n else result_out (Coq_out_ter (s2, r))\n end in\n res_ter s0 (res_normal r)\n | Coq_switchbody_withdefault (scs1, ts, scs2) ->\n let%success (s0, r) = begin\n let%break (s2, r) = \n run_stat_switch_with_default_A s1 c false vi\n Coq_resvalue_empty scs1 ts scs2 in\n if res_label_in r labs\n then result_out (Coq_out_ter (s2, (res_normal r.res_value)))\n else result_out (Coq_out_ter (s2, r)) end in\n res_ter s0 (res_normal r)\n*)\n\nand run_stat_switch s c labs e sb =\n let%run (s1, vi) = run_expr_get_value s c e in\n let follow = (fun w ->\n let%success (s0, r) =\n let%break (s2, r) = w in\n if res_label_in r labs\n then result_out (Coq_out_ter (s2, (res_normal r.res_value)))\n else result_out (Coq_out_ter (s2, r)) in\n res_ter s0 (res_normal r)) in\n match sb with\n | Coq_switchbody_nodefault scs ->\n follow (run_stat_switch_no_default s1 c vi \n Coq_resvalue_empty scs)\n | Coq_switchbody_withdefault (scs1, ts, scs2) ->\n follow (run_stat_switch_with_default_A s1 c false vi\n Coq_resvalue_empty scs1 ts scs2)\n\n(** val run_stat_do_while :\n state -> execution_ctx -> resvalue -> label_set -> expr ->\n stat -> result **)\n\nand run_stat_do_while s c rv labs e1 t2 =\n let%ter (s1, r) = (run_stat s c t2) in\n let\n rv_2 = (if resvalue_compare r.res_value Coq_resvalue_empty\n then rv\n else r.res_value) in\n let loop = (fun x ->\n let%run (s2, v1) = (run_expr_get_value s1 c e1) in\n let b = (convert_value_to_boolean v1) in\n if b\n then run_stat_do_while s2 c rv_2 labs e1 t2\n else res_ter s2 (res_normal rv_2)) in\n if (restype_compare r.res_type Coq_restype_continue)\n && (res_label_in r labs)\n then loop ()\n else if \n (restype_compare r.res_type Coq_restype_break)\n && (res_label_in r labs)\n then res_ter s1 (res_normal rv_2)\n else if not\n (restype_compare r.res_type Coq_restype_normal)\n then res_ter s1 r\n else loop ()\n\n(** val run_stat_try :\n state -> execution_ctx -> stat -> (prop_name * stat) option\n -> stat option -> result **)\n\nand run_stat_try s c t1 t2o t3o =\n let finallycont = (fun s1 r ->\n match t3o with\n | Some t3 ->\n let%success (s2, rv_2) = (run_stat s1 c t3) in res_ter s2 r\n | None -> res_ter s1 r) in\n ifx_any_or_throw (run_stat s c t1) finallycont (fun s1 v ->\n match t2o with\n | Some y ->\n let (x, t2) = y in\n let lex = (c.execution_ctx_lexical_env) in\n let p = (lexical_env_alloc_decl s1 lex) in\n let (lex_2, s_2) = p in\n (match lex_2 with\n | [] ->\n (fun s m -> Debug.impossible_with_heap_because __LOC__ s m; Coq_result_impossible)\n s_2\n ("Empty lexical environnment in [run_stat_try].")\n | l :: oldlex ->\n let%void\n s2= (env_record_create_set_mutable_binding s_2 c l x None v\n throw_irrelevant) in\n let c_2 = execution_ctx_with_lex c lex_2 in\n let%ter (s3, r) = (run_stat s2 c_2 t2) in finallycont s3 r)\n | None -> finallycont s1 (res_throw (Coq_resvalue_value v)))\n\n(** val run_stat_throw :\n state -> execution_ctx -> expr -> result **)\n\nand run_stat_throw s c e =\n let%run (s1, v1) = (run_expr_get_value s c e) in\n res_ter s1 (res_throw (Coq_resvalue_value v1))\n\n(** val run_stat_return :\n state -> execution_ctx -> expr option -> result **)\n\nand run_stat_return s c _foo_ = match _foo_ with\n | Some e ->\n let%run (s1, v1) = (run_expr_get_value s c e) in\n res_ter s1 (res_return (Coq_resvalue_value v1))\n | None ->\n result_out (Coq_out_ter (s,\n (res_return (Coq_resvalue_value (Coq_value_prim Coq_prim_undef)))))\n\n(** val run_stat_for_loop :\n state -> execution_ctx -> label_set -> resvalue -> expr\n option -> expr option -> stat -> result **)\n\nand run_stat_for_loop s c labs rv eo2 eo3 t =\n let follows = (fun s0 ->\n let%ter (s1, r) = (run_stat s0 c t) in\n let\n rv_2 = (if not\n (resvalue_compare r.res_value Coq_resvalue_empty)\n then r.res_value\n else rv) in\n let loop = (fun s2 ->\n run_stat_for_loop s2 c labs rv_2 eo2 eo3 t) in\n if (restype_compare r.res_type Coq_restype_break)\n && (res_label_in r labs)\n then res_ter s1 (res_normal rv_2)\n else if \n (restype_compare r.res_type Coq_restype_normal)\n || ( (restype_compare r.res_type Coq_restype_continue)\n && (res_label_in r labs))\n then (match eo3 with\n | Some e3 ->\n let%run \n (s2, v3) = (run_expr_get_value s1 c e3) in loop s2\n | None -> loop s1)\n else res_ter s1 r) in\n match eo2 with\n | Some e2 ->\n let%run (s0, v2) = (run_expr_get_value s c e2) in\n let b = (convert_value_to_boolean v2) in\n if b then follows s0 else res_ter s0 (res_normal rv)\n | None -> follows s\n\n(** val run_stat_for :\n state -> execution_ctx -> label_set -> expr option -> expr\n option -> expr option -> stat -> result **)\n\nand run_stat_for s c labs eo1 eo2 eo3 t =\n let follows = fun s0 ->\n run_stat_for_loop s0 c labs Coq_resvalue_empty eo2 eo3 t\n in\n (match eo1 with\n | Some e1 ->\n let%run (s0, v1) = (run_expr_get_value s c e1) in follows s0\n | None -> follows s)\n\n(** val run_stat_for_var :\n state -> execution_ctx -> label_set -> (string * expr\n option) list -> expr option -> expr option -> stat -> result **)\n\nand run_stat_for_var s c labs ds eo2 eo3 t =\n let%ter (s0, r) = (run_stat s c (Coq_stat_var_decl ds)) in\n run_stat_for_loop s0 c labs Coq_resvalue_empty eo2 eo3 t\n\n(** val run_expr : state -> execution_ctx -> expr -> result **)\n\nand run_expr s c _term_ = match _term_ with\n | Coq_expr_this ->\n result_out (Coq_out_ter (s, (res_val c.execution_ctx_this_binding)))\n | Coq_expr_identifier x ->\n let%run (s0, r) = (identifier_resolution s c x) in\n res_ter s0 (res_ref r)\n | Coq_expr_literal i ->\n result_out (Coq_out_ter (s,\n (res_val (Coq_value_prim (convert_literal_to_prim i)))))\n | Coq_expr_object pds ->\n let%object \n (s1, l) = (run_construct_prealloc s c Coq_prealloc_object []) in init_object s1 c l pds\n | Coq_expr_array oes ->\n let%object \n (s1, l) = (run_construct_prealloc s c Coq_prealloc_array []) in init_array s1 c l oes\n | Coq_expr_function (fo, args, bd) -> run_expr_function s c fo args bd\n | Coq_expr_access (e1, e2) -> run_expr_access s c e1 e2\n | Coq_expr_member (e1, f) ->\n run_expr s c (Coq_expr_access (e1, (Coq_expr_literal\n (Coq_literal_string f))))\n | Coq_expr_new (e1, e2s) -> run_expr_new s c e1 e2s\n | Coq_expr_call (e1, e2s) -> run_expr_call s c e1 e2s\n | Coq_expr_unary_op (op, e0) -> run_unary_op s c op e0\n | Coq_expr_binary_op (e1, op, e2) -> run_expr_binary_op s c op e1 e2\n | Coq_expr_conditional (e1, e2, e3) ->\n run_expr_conditionnal s c e1 e2 e3\n | Coq_expr_assign (e1, opo, e2) -> run_expr_assign s c opo e1 e2\n\n(** val run_stat : state -> execution_ctx -> stat -> result **)\n\nand run_stat s c _term_ = match _term_ with\n | Coq_stat_expr e ->\n let%run (s0, r) = (run_expr_get_value s c e) in\n res_ter s0 (res_val r)\n | Coq_stat_label (lab, t0) ->\n run_stat_label s c (Coq_label_string lab) t0\n | Coq_stat_block ts -> run_block s c (rev ts)\n | Coq_stat_var_decl xeos -> run_var_decl s c xeos\n | Coq_stat_if (e1, t2, to0) -> run_stat_if s c e1 t2 to0\n | Coq_stat_do_while (ls, t1, e2) ->\n run_stat_do_while s c Coq_resvalue_empty ls e2 t1\n | Coq_stat_while (ls, e1, t2) ->\n run_stat_while s c Coq_resvalue_empty ls e1 t2\n | Coq_stat_with (e1, t2) -> run_stat_with s c e1 t2\n | Coq_stat_throw e -> run_stat_throw s c e\n | Coq_stat_return eo -> run_stat_return s c eo\n | Coq_stat_break so -> result_out (Coq_out_ter (s, (res_break so)))\n | Coq_stat_continue so -> result_out (Coq_out_ter (s, (res_continue so)))\n | Coq_stat_try (t1, t2o, t3o) -> run_stat_try s c t1 t2o t3o\n | Coq_stat_for (ls, eo1, eo2, eo3, s0) ->\n run_stat_for s c ls eo1 eo2 eo3 s0\n | Coq_stat_for_var (ls, ds, eo2, eo3, s0) ->\n run_stat_for_var s c ls ds eo2 eo3 s0\n | Coq_stat_for_in (ls, e1, e2, s0) ->\n (fun s -> Debug.not_yet_implemented_because __LOC__ s; Coq_result_not_yet_implemented)\n ("stat_for_in")\n | Coq_stat_for_in_var (ls, x, e1o, e2, s0) ->\n (fun s -> Debug.not_yet_implemented_because __LOC__ s; Coq_result_not_yet_implemented)\n ("stat_for_in_var")\n | Coq_stat_debugger -> result_out (Coq_out_ter (s, res_empty))\n | Coq_stat_switch (labs, e, sb) -> run_stat_switch s c labs e sb\n\n(** val run_elements :\n state -> execution_ctx -> elements -> result **)\n\nand run_elements s c _foo_ = match _foo_ with\n | [] -> result_out (Coq_out_ter (s, (res_normal Coq_resvalue_empty)))\n | el :: els_rev_2 ->\n let%success (s0, rv0)= (run_elements s c els_rev_2) in\n match el with\n | Coq_element_stat t ->\n let%ter (s1, r1) = (run_stat s0 c t) in\n let r2 = res_overwrite_value_if_empty rv0 r1 in\n res_out (Coq_out_ter (s1, r2))\n | Coq_element_func_decl (name, args, bd) -> res_ter s0 (res_normal rv0)\n\n(** val run_prog : state -> execution_ctx -> prog -> result **)\n\nand run_prog s c _term_ = match _term_ with\n | Coq_prog_intro (str, els) -> run_elements s c (rev els)\n\n(** val push :\n state -> execution_ctx -> object_loc -> value list -> float\n -> result **)\n\nand push s c l args ilen =\n let vlen = ilen in\n match args with\n | [] ->\n let%not_throw\n (s0, x) = (object_put s c l ("length")\n (Coq_value_prim (Coq_prim_number vlen)) throw_true) in\n result_out (Coq_out_ter (s0,\n (res_val (Coq_value_prim (Coq_prim_number vlen)))))\n | v :: vs ->\n let%string \n (s0, slen) = (to_string s c (Coq_value_prim (Coq_prim_number vlen))) in\n let%not_throw (s1, x) = (object_put s0 c l slen v throw_true) in\n push s1 c l vs (ilen +. 1.)\n\n(** val run_object_is_sealed :\n state -> execution_ctx -> object_loc -> prop_name list ->\n result **)\n\nand run_object_is_sealed s c l _foo_ = match _foo_ with\n | [] ->\n let%some ext = (run_object_method object_extensible_ s l) in\n res_ter s (res_val (Coq_value_prim (Coq_prim_bool (not ext))))\n | x :: xs_2 ->\n let%run (s0, d) = (run_object_get_own_prop s c l x) in\n match d with\n | Coq_full_descriptor_undef ->\n (fun s m -> Debug.impossible_with_heap_because __LOC__ s m; Coq_result_impossible)\n s0\n ("[run_object_is_sealed]: Undefined descriptor found in a place where it shouldn\\\'t.")\n | Coq_full_descriptor_some a ->\n if attributes_configurable a\n then res_ter s0 (res_val (Coq_value_prim (Coq_prim_bool false)))\n else run_object_is_sealed s0 c l xs_2\n\n(** val run_object_seal :\n state -> execution_ctx -> object_loc -> prop_name list ->\n result **)\n\nand run_object_seal s c l _foo_ = match _foo_ with\n | [] ->\n let%some s0= (run_object_heap_set_extensible false s l) in\n res_ter s0 (res_val (Coq_value_object l))\n | x :: xs_2 ->\n let%run (s0, d) = (run_object_get_own_prop s c l x) in\n match d with\n | Coq_full_descriptor_undef ->\n (fun s m -> Debug.impossible_with_heap_because __LOC__ s m; Coq_result_impossible)\n s0\n ("[run_object_seal]: Undefined descriptor found in a place where it shouldn\\\'t.")\n | Coq_full_descriptor_some a ->\n let a_2 =\n if attributes_configurable a\n then let desc = { descriptor_value = None; descriptor_writable =\n None; descriptor_get = None; descriptor_set = None;\n descriptor_enumerable = None; descriptor_configurable = (Some\n false) }\n in\n attributes_update a desc\n else a\n in\n let%bool\n (s1, x0) = (object_define_own_prop s0 c l x (descriptor_of_attributes a_2)\n true) in run_object_seal s1 c l xs_2\n\n(** val run_object_freeze :\n state -> execution_ctx -> object_loc -> prop_name list ->\n result **)\n\nand run_object_freeze s c l _foo_ = match _foo_ with\n | [] ->\n let%some s0= (run_object_heap_set_extensible false s l) in\n res_ter s0 (res_val (Coq_value_object l))\n | x :: xs_2 ->\n let%run (s0, d) = (run_object_get_own_prop s c l x) in\n match d with\n | Coq_full_descriptor_undef ->\n (fun s m -> Debug.impossible_with_heap_because __LOC__ s m; Coq_result_impossible)\n s0\n ("[run_object_freeze]: Undefined descriptor found in a place where it shouldn\\\'t.")\n | Coq_full_descriptor_some a ->\n let a_2 =\n if (attributes_is_data_dec a) && (attributes_writable a)\n then let desc = { descriptor_value = None; descriptor_writable =\n (Some false); descriptor_get = None; descriptor_set = None;\n descriptor_enumerable = None; descriptor_configurable = None }\n in\n attributes_update a desc\n else a\n in\n let a_3 =\n if attributes_configurable a_2\n then let desc = { descriptor_value = None; descriptor_writable =\n None; descriptor_get = None; descriptor_set = None;\n descriptor_enumerable = None; descriptor_configurable = (Some\n false) }\n in\n attributes_update a_2 desc\n else a_2\n in\n let%bool\n (s1, x0) = (object_define_own_prop s0 c l x (descriptor_of_attributes a_3)\n true) in run_object_freeze s1 c l xs_2\n\n(** val run_object_is_frozen :\n state -> execution_ctx -> object_loc -> prop_name list ->\n result **)\n\nand run_object_is_frozen s c l _foo_ = match _foo_ with\n | [] ->\n let%some ext = (run_object_method object_extensible_ s l) in\n res_ter s (res_val (Coq_value_prim (Coq_prim_bool (not ext))))\n | x :: xs_2 ->\n let%run (s0, d) = (run_object_get_own_prop s c l x) in\n let check_configurable = (fun a ->\n if attributes_configurable a\n then res_ter s0 (res_val (Coq_value_prim (Coq_prim_bool false)))\n else run_object_is_frozen s0 c l xs_2) in\n match d with\n | Coq_full_descriptor_undef ->\n (fun s m -> Debug.impossible_with_heap_because __LOC__ s m; Coq_result_impossible)\n s0\n ("[run_object_is_frozen]: Undefined descriptor found in a place where it shouldn\\\'t.")\n | Coq_full_descriptor_some a ->\n (match a with\n | Coq_attributes_data_of ad ->\n if attributes_writable (Coq_attributes_data_of ad)\n then res_ter s0 (res_val (Coq_value_prim (Coq_prim_bool false)))\n else check_configurable (Coq_attributes_data_of ad)\n | Coq_attributes_accessor_of aa ->\n check_configurable (Coq_attributes_accessor_of aa))\n\n(** val run_get_args_for_apply :\n state -> execution_ctx -> object_loc -> float -> float ->\n value list specres **)\n\nand run_get_args_for_apply s c l index n =\n if index < n\n then let%string\n (s0, sindex) = (to_string s c (Coq_value_prim (Coq_prim_number index))) in\n let%value (s1, v) = (run_object_get s0 c l sindex) in\n let\n \n tail_args = (run_get_args_for_apply s1 c l (index +. 1.) n) in\n let%run (s2, tail) = (tail_args) in res_spec s2 (v :: tail)\n else res_spec s []\n\n(** val valueToStringForJoin :\n state -> execution_ctx -> object_loc -> float -> string\n specres **)\n\nand valueToStringForJoin s c l k =\n let%string\n \n (s0, prop) = (to_string s c (Coq_value_prim (Coq_prim_number k))) in\n let%value (s1, v) = (run_object_get s0 c l prop) in\n match v with\n | Coq_value_prim p ->\n (match p with\n | Coq_prim_undef -> res_spec s1 ""\n | Coq_prim_null -> res_spec s1 ""\n | Coq_prim_bool b ->\n let%string (s2, s3) = (to_string s1 c v) in res_spec s2 s3\n | Coq_prim_number n ->\n let%string (s2, s3) = (to_string s1 c v) in res_spec s2 s3\n | Coq_prim_string s2 ->\n let%string (s3, s4) = (to_string s1 c v) in res_spec s3 s4)\n | Coq_value_object o ->\n let%string (s2, s3) = (to_string s1 c v) in res_spec s2 s3\n\n(** val run_array_join_elements :\n state -> execution_ctx -> object_loc -> float -> float ->\n string -> string -> result **)\n\nand run_array_join_elements s c l k length0 sep sR =\n if k < length0\n then let ss = (strappend sR sep) in\n let sE = (valueToStringForJoin s c l k) in\n let%run (s0, element) = (sE) in\n let sR0 = (strappend ss element) in\n run_array_join_elements s0 c l (k +. 1.)\n length0 sep sR0\n else res_ter s (res_val (Coq_value_prim (Coq_prim_string sR)))\n\n(** val run_call_prealloc :\n state -> execution_ctx -> prealloc -> value -> value list ->\n result **)\n\nand run_call_prealloc s c b vthis args =\n match b with\n | Coq_prealloc_global_is_finite ->\n let v = (get_arg 0 args) in\n let%number (s0, n) = (to_number s c v) in\n res_ter s0\n (res_val (Coq_value_prim (Coq_prim_bool\n (not\n ( (JsNumber.isnan n)\n || (n === JsNumber.infinity)\n || (n === JsNumber.neg_infinity))))))\n | Coq_prealloc_global_is_nan ->\n let v = (get_arg 0 args) in\n let%number (s0, n) = (to_number s c v) in\n res_ter s0\n (res_val (Coq_value_prim (Coq_prim_bool\n (JsNumber.isnan n))))\n | Coq_prealloc_object ->\n let value0 = (get_arg 0 args) in begin\n match value0 with\n | Coq_value_prim p ->\n (match p with\n | Coq_prim_undef -> run_construct_prealloc s c b args\n | Coq_prim_null -> run_construct_prealloc s c b args\n | Coq_prim_bool b0 -> to_object s value0\n | Coq_prim_number n -> to_object s value0\n | Coq_prim_string s0 -> to_object s value0)\n | Coq_value_object o -> to_object s value0\n end\n | Coq_prealloc_object_get_proto_of ->\n let v = (get_arg 0 args) in begin\n match v with\n | Coq_value_prim p -> run_error s Coq_native_error_type\n | Coq_value_object l ->\n let%some proto = (run_object_method object_proto_ s l) in\n res_ter s (res_val proto)\n end\n | Coq_prealloc_object_get_own_prop_descriptor ->\n let v = (get_arg 0 args) in begin\n match v with\n | Coq_value_prim p -> run_error s Coq_native_error_type\n | Coq_value_object l ->\n let%string \n (s1, x) = (to_string s c (get_arg 1 args)) in\n let%run (s2, d) = (run_object_get_own_prop s1 c l x) in\n from_prop_descriptor s2 c d\n end\n | Coq_prealloc_object_define_prop ->\n let o = (get_arg 0 args) in\n let p = (get_arg 1 args) in\n let \n attr = (get_arg 2 args) in begin\n match o with\n | Coq_value_prim p0 -> run_error s Coq_native_error_type\n | Coq_value_object l ->\n let%string (s1, name) = (to_string s c p) in\n let%run (s2, desc) = (run_to_descriptor s1 c attr) in\n let%bool \n (s3, x) = (object_define_own_prop s2 c l name desc true) in res_ter s3 (res_val (Coq_value_object l))\n end\n | Coq_prealloc_object_seal ->\n let v = (get_arg 0 args) in begin\n match v with\n | Coq_value_prim p -> run_error s Coq_native_error_type\n | Coq_value_object l ->\n let%some \n _x_ = (object_properties_keys_as_list_pickable_option s l) in run_object_seal s c l _x_\n end\n | Coq_prealloc_object_freeze ->\n let v = (get_arg 0 args) in begin\n match v with\n | Coq_value_prim p -> run_error s Coq_native_error_type\n | Coq_value_object l ->\n let%some \n _x_ = (object_properties_keys_as_list_pickable_option s l) in run_object_freeze s c l _x_\n end\n | Coq_prealloc_object_prevent_extensions ->\n let v = (get_arg 0 args) in begin\n match v with\n | Coq_value_prim p -> run_error s Coq_native_error_type\n | Coq_value_object l ->\n let%some o = (object_binds_pickable_option s l) in\n let o1 = object_with_extension o false in\n let s_2 = object_write s l o1 in\n res_ter s_2 (res_val (Coq_value_object l))\n end\n | Coq_prealloc_object_is_sealed ->\n let v = (get_arg 0 args) in begin\n match v with\n | Coq_value_prim p -> run_error s Coq_native_error_type\n | Coq_value_object l ->\n let%some \n _x_ = (object_properties_keys_as_list_pickable_option s l) in run_object_is_sealed s c l _x_\n end\n | Coq_prealloc_object_is_frozen ->\n let v = (get_arg 0 args) in begin\n match v with\n | Coq_value_prim p -> run_error s Coq_native_error_type\n | Coq_value_object l ->\n let%some \n _x_ = (object_properties_keys_as_list_pickable_option s l) in run_object_is_frozen s c l _x_\n end\n | Coq_prealloc_object_is_extensible ->\n let v = (get_arg 0 args) in begin\n match v with\n | Coq_value_prim p -> run_error s Coq_native_error_type\n | Coq_value_object l ->\n let%some r = (run_object_method object_extensible_ s l) in\n res_ter s (res_val (Coq_value_prim (Coq_prim_bool r)))\n end\n | Coq_prealloc_object_proto_to_string ->\n (match vthis with\n | Coq_value_prim p ->\n (match p with\n | Coq_prim_undef ->\n result_out (Coq_out_ter (s,\n (res_val (Coq_value_prim (Coq_prim_string\n ("[object Undefined]"))))))\n | Coq_prim_null ->\n result_out (Coq_out_ter (s,\n (res_val (Coq_value_prim (Coq_prim_string\n ("[object Null]"))))))\n | Coq_prim_bool b0 ->\n let%object (s1, l) = (to_object s vthis) in\n let%some s0= (run_object_method object_class_ s1 l) in\n res_ter s1\n (res_val (Coq_value_prim (Coq_prim_string\n (strappend\n ("[object ")\n (strappend s0 ("]"))))))\n | Coq_prim_number n ->\n let%object (s1, l) = (to_object s vthis) in\n let%some s0= (run_object_method object_class_ s1 l) in\n res_ter s1\n (res_val (Coq_value_prim (Coq_prim_string\n (strappend\n ("[object ")\n (strappend s0 ("]"))))))\n | Coq_prim_string s0 ->\n let%object (s1, l) = (to_object s vthis) in\n let%some s2= (run_object_method object_class_ s1 l) in\n res_ter s1\n (res_val (Coq_value_prim (Coq_prim_string\n (strappend\n ("[object ")\n (strappend s2 ("]")))))))\n | Coq_value_object o ->\n let%object (s1, l) = (to_object s vthis) in\n let%some s0= (run_object_method object_class_ s1 l) in\n res_ter s1\n (res_val (Coq_value_prim (Coq_prim_string\n (strappend\n ("[object ")\n (strappend s0 ("]")))))))\n | Coq_prealloc_object_proto_value_of -> to_object s vthis\n | Coq_prealloc_object_proto_has_own_prop ->\n let v = (get_arg 0 args) in\n let%string (s1, x) = (to_string s c v) in\n let%object (s2, l) = (to_object s1 vthis) in\n let%run (s3, d) = (run_object_get_own_prop s2 c l x) in begin\n match d with\n | Coq_full_descriptor_undef ->\n res_ter s3 (res_val (Coq_value_prim (Coq_prim_bool false)))\n | Coq_full_descriptor_some a ->\n res_ter s3 (res_val (Coq_value_prim (Coq_prim_bool true)))\n end\n | Coq_prealloc_object_proto_is_prototype_of ->\n let v = (get_arg 0 args) in begin\n match v with\n | Coq_value_prim p ->\n result_out (Coq_out_ter (s,\n (res_val (Coq_value_prim (Coq_prim_bool false)))))\n | Coq_value_object l ->\n let%object (s1, lo) = (to_object s vthis) in\n object_proto_is_prototype_of s1 lo l\n end\n | Coq_prealloc_object_proto_prop_is_enumerable ->\n let v = (get_arg 0 args) in\n let%string (s1, x) = (to_string s c v) in\n let%object (s2, l) = (to_object s1 vthis) in\n let%run (s3, d) = (run_object_get_own_prop s2 c l x) in begin\n match d with\n | Coq_full_descriptor_undef ->\n res_ter s3 (res_val (Coq_value_prim (Coq_prim_bool false)))\n | Coq_full_descriptor_some a ->\n res_ter s3\n (res_val (Coq_value_prim (Coq_prim_bool\n (attributes_enumerable a))))\n end\n | Coq_prealloc_function_proto ->\n result_out (Coq_out_ter (s, (res_val (Coq_value_prim Coq_prim_undef))))\n | Coq_prealloc_function_proto_to_string ->\n if is_callable_dec s vthis\n then (fun s -> Debug.not_yet_implemented_because __LOC__ s; Coq_result_not_yet_implemented)\n ("Function.prototype.toString() is implementation dependent.")\n else run_error s Coq_native_error_type\n | Coq_prealloc_function_proto_apply ->\n let thisArg = (get_arg 0 args) in\n let argArray = (get_arg 1 args) in\n if is_callable_dec s vthis\n then (match vthis with\n | Coq_value_prim p ->\n (fun s m -> Debug.impossible_with_heap_because __LOC__ s m; Coq_result_impossible)\n s\n ("Value is callable, but isn\\\'t an object.")\n | Coq_value_object thisobj ->\n (match argArray with\n | Coq_value_prim p ->\n (match p with\n | Coq_prim_undef ->\n run_call s c thisobj thisArg []\n | Coq_prim_null ->\n run_call s c thisobj thisArg []\n | Coq_prim_bool b0 -> run_error s Coq_native_error_type\n | Coq_prim_number n -> run_error s Coq_native_error_type\n | Coq_prim_string s0 -> run_error s Coq_native_error_type)\n | Coq_value_object array ->\n let%value\n (s0, v) = (run_object_get s c array\n ("length")) in\n let%run (s1, ilen) = (to_uint32 s0 c v) in\n let%run\n (s2, arguments_) = (run_get_args_for_apply s1 c array 0. ilen) in\n run_call s2 c thisobj thisArg arguments_))\n else run_error s Coq_native_error_type\n | Coq_prealloc_function_proto_call ->\n if is_callable_dec s vthis\n then (match vthis with\n | Coq_value_prim p ->\n (fun s m -> Debug.impossible_with_heap_because __LOC__ s m; Coq_result_impossible)\n s\n ("Value is callable, but isn\\\'t an object.")\n | Coq_value_object thisobj ->\n let (thisArg, a) = get_arg_first_and_rest args in\n run_call s c thisobj thisArg a)\n else run_error s Coq_native_error_type\n | Coq_prealloc_function_proto_bind ->\n if is_callable_dec s vthis\n then (match vthis with\n | Coq_value_prim p ->\n (fun s m -> Debug.impossible_with_heap_because __LOC__ s m; Coq_result_impossible)\n s\n ("Value is callable, but isn\\\'t an object.")\n | Coq_value_object thisobj ->\n let (vthisArg, a) = get_arg_first_and_rest args in\n let\n o1 = (object_new (Coq_value_object (Coq_object_loc_prealloc\n Coq_prealloc_object_proto))\n ("Object")) in\n let \n o2 = (object_with_get o1 Coq_builtin_get_function) in\n let\n o3 = (object_with_details o2 None None None (Some thisobj) (Some\n vthisArg) (Some a) None) in\n let\n \n o4 = (object_set_class o3\n ("Function")) in\n let\n o5 = (object_set_proto o4 (Coq_value_object\n (Coq_object_loc_prealloc\n Coq_prealloc_function_proto))) in\n let\n o6 = (object_with_invokation o5 (Some\n Coq_construct_after_bind) (Some\n Coq_call_after_bind) (Some\n Coq_builtin_has_instance_after_bind)) in\n let \n o7 = (object_set_extensible o6 true) in\n let (l, s_2) = object_alloc s o7 in\n let\n vlength = (let%some\n class0 = (run_object_method object_class_ s_2 thisobj) in\n if string_eq class0\n ("Function")\n then let%number\n (s10, n) = (run_object_get s_2 c thisobj\n ("length")) in\n let%run\n (s11, ilen) = (to_int32 s10 c (Coq_value_prim\n (Coq_prim_number n))) in\n if ilen <\n (number_of_int (LibList.length a))\n then res_spec s11 0.\n else res_spec s11\n (ilen -.\n (number_of_int (LibList.length a)))\n else res_spec s_2 0.) in\n let%run (s10, length0) = (vlength) in\n let \n a0 = ({ attributes_data_value =\n (Coq_value_prim (Coq_prim_number length0));\n attributes_data_writable = false;\n attributes_data_enumerable = false;\n attributes_data_configurable = false }) in\n let%some\n s11 = (object_heap_map_properties_pickable_option\n s10 l (fun p ->\n HeapStr.write p\n ("length")\n (Coq_attributes_data_of a0))) in\n let \n vthrower = (Coq_value_object\n (Coq_object_loc_prealloc\n Coq_prealloc_throw_type_error)) in\n let a1 = ({ attributes_accessor_get =\n vthrower; attributes_accessor_set =\n vthrower;\n attributes_accessor_enumerable = false;\n attributes_accessor_configurable =\n false }) in\n let%bool\n (s12, x) = (object_define_own_prop s11 c l\n ("caller")\n (descriptor_of_attributes\n (Coq_attributes_accessor_of a1))\n false) in\n let%bool\n (s13, x0) = (object_define_own_prop s12 c\n l\n ("arguments")\n (descriptor_of_attributes\n (Coq_attributes_accessor_of\n a1)) false) in\n res_ter s13\n (res_val (Coq_value_object l)))\n else run_error s Coq_native_error_type\n | Coq_prealloc_bool ->\n result_out\n (let v = (get_arg 0 args) in Coq_out_ter (s,\n (res_val (Coq_value_prim (Coq_prim_bool\n (convert_value_to_boolean v))))))\n | Coq_prealloc_bool_proto_to_string ->\n (match vthis with\n | Coq_value_prim p ->\n (match p with\n | Coq_prim_undef -> run_error s Coq_native_error_type\n | Coq_prim_null -> run_error s Coq_native_error_type\n | Coq_prim_bool b0 ->\n res_ter s\n (res_val (Coq_value_prim (Coq_prim_string\n (convert_bool_to_string b0))))\n | Coq_prim_number n -> run_error s Coq_native_error_type\n | Coq_prim_string s0 -> run_error s Coq_native_error_type)\n | Coq_value_object l ->\n ifx_some_or_default (run_object_method object_class_ s l)\n (run_error s Coq_native_error_type) (fun s0 ->\n if string_eq s0\n ("Boolean")\n then ifx_some_or_default (run_object_method object_prim_value_ s l)\n (run_error s Coq_native_error_type) (fun wo ->\n match wo with\n | Some v ->\n (match v with\n | Coq_value_prim p ->\n (match p with\n | Coq_prim_undef -> run_error s Coq_native_error_type\n | Coq_prim_null -> run_error s Coq_native_error_type\n | Coq_prim_bool b0 ->\n res_ter s\n (res_val (Coq_value_prim (Coq_prim_string\n (convert_bool_to_string b0))))\n | Coq_prim_number n ->\n run_error s Coq_native_error_type\n | Coq_prim_string s1 ->\n run_error s Coq_native_error_type)\n | Coq_value_object o -> run_error s Coq_native_error_type)\n | None -> run_error s Coq_native_error_type)\n else run_error s Coq_native_error_type))\n | Coq_prealloc_bool_proto_value_of ->\n (match vthis with\n | Coq_value_prim p ->\n (match p with\n | Coq_prim_undef -> run_error s Coq_native_error_type\n | Coq_prim_null -> run_error s Coq_native_error_type\n | Coq_prim_bool b0 ->\n res_ter s (res_val (Coq_value_prim (Coq_prim_bool b0)))\n | Coq_prim_number n -> run_error s Coq_native_error_type\n | Coq_prim_string s0 -> run_error s Coq_native_error_type)\n | Coq_value_object l ->\n ifx_some_or_default (run_object_method object_class_ s l)\n (run_error s Coq_native_error_type) (fun s0 ->\n if string_eq s0\n ("Boolean")\n then ifx_some_or_default (run_object_method object_prim_value_ s l)\n (run_error s Coq_native_error_type) (fun wo ->\n match wo with\n | Some v ->\n (match v with\n | Coq_value_prim p ->\n (match p with\n | Coq_prim_undef -> run_error s Coq_native_error_type\n | Coq_prim_null -> run_error s Coq_native_error_type\n | Coq_prim_bool b0 ->\n res_ter s\n (res_val (Coq_value_prim (Coq_prim_bool b0)))\n | Coq_prim_number n ->\n run_error s Coq_native_error_type\n | Coq_prim_string s1 ->\n run_error s Coq_native_error_type)\n | Coq_value_object o -> run_error s Coq_native_error_type)\n | None -> run_error s Coq_native_error_type)\n else run_error s Coq_native_error_type))\n | Coq_prealloc_number ->\n if list_eq_nil_decidable args\n then result_out (Coq_out_ter (s,\n (res_val (Coq_value_prim (Coq_prim_number JsNumber.zero)))))\n else let v = get_arg 0 args in to_number s c v\n | Coq_prealloc_number_proto_value_of ->\n (match vthis with\n | Coq_value_prim p ->\n (match p with\n | Coq_prim_undef -> run_error s Coq_native_error_type\n | Coq_prim_null -> run_error s Coq_native_error_type\n | Coq_prim_bool b0 -> run_error s Coq_native_error_type\n | Coq_prim_number n ->\n res_ter s (res_val (Coq_value_prim (Coq_prim_number n)))\n | Coq_prim_string s0 -> run_error s Coq_native_error_type)\n | Coq_value_object l ->\n ifx_some_or_default (run_object_method object_class_ s l)\n (run_error s Coq_native_error_type) (fun s0 ->\n if string_eq s0 ("Number")\n then ifx_some_or_default (run_object_method object_prim_value_ s l)\n (run_error s Coq_native_error_type) (fun wo ->\n match wo with\n | Some v ->\n (match v with\n | Coq_value_prim p ->\n (match p with\n | Coq_prim_undef -> run_error s Coq_native_error_type\n | Coq_prim_null -> run_error s Coq_native_error_type\n | Coq_prim_bool b0 -> run_error s Coq_native_error_type\n | Coq_prim_number n ->\n res_ter s\n (res_val (Coq_value_prim (Coq_prim_number n)))\n | Coq_prim_string s1 ->\n run_error s Coq_native_error_type)\n | Coq_value_object o -> run_error s Coq_native_error_type)\n | None -> run_error s Coq_native_error_type)\n else run_error s Coq_native_error_type))\n | Coq_prealloc_array ->\n run_construct_prealloc s c Coq_prealloc_array args\n | Coq_prealloc_array_is_array ->\n let arg = (get_arg 0 args) in begin\n match arg with\n | Coq_value_prim p ->\n res_ter s (res_val (Coq_value_prim (Coq_prim_bool false)))\n | Coq_value_object arg0 ->\n let%some class0= (run_object_method object_class_ s arg0) in\n if string_eq class0 ("Array")\n then res_ter s (res_val (Coq_value_prim (Coq_prim_bool true)))\n else res_ter s (res_val (Coq_value_prim (Coq_prim_bool false)))\n end\n | Coq_prealloc_array_proto_to_string ->\n let%object (s0, array) = (to_object s vthis) in\n let%value\n (s1, vfunc) = (run_object_get s0 c array ("join")) in\n if is_callable_dec s1 vfunc\n then (match vfunc with\n | Coq_value_prim p ->\n (fun s m -> Debug.impossible_with_heap_because __LOC__ s m; Coq_result_impossible)\n s1\n ("Value is callable, but isn\\\'t an object.")\n | Coq_value_object func ->\n run_call s1 c func (Coq_value_object array) [])\n else run_call_prealloc s1 c\n Coq_prealloc_object_proto_to_string (Coq_value_object array)\n []\n | Coq_prealloc_array_proto_join ->\n let vsep = (get_arg 0 args) in\n let%object (s0, l) = (to_object s vthis) in\n let%value\n (s1, vlen) = (run_object_get s0 c l\n ("length")) in\n let%run (s2, ilen) = (to_uint32 s1 c vlen) in\n let\n rsep = (if not\n (value_compare vsep (Coq_value_prim Coq_prim_undef))\n then vsep\n else Coq_value_prim (Coq_prim_string (","))) in\n let%string (s3, sep) = (to_string s2 c rsep) in\n if ilen = 0.0\n then res_ter s3\n (res_val (Coq_value_prim (Coq_prim_string "")))\n else let \n sR = (valueToStringForJoin s3 c l 0.) in\n let%run (s4, sR0) = (sR) in\n run_array_join_elements s4 c l 1. ilen sep sR0\n | Coq_prealloc_array_proto_pop ->\n let%object (s0, l) = (to_object s vthis) in\n let%value\n (s1, vlen) = (run_object_get s0 c l\n ("length")) in\n let%run (s2, ilen) = (to_uint32 s1 c vlen) in\n if ilen = 0.0\n then let%not_throw\n (s3, x) = (object_put s2 c l\n ("length")\n (Coq_value_prim (Coq_prim_number JsNumber.zero)) throw_true) in\n result_out (Coq_out_ter (s3,\n (res_val (Coq_value_prim Coq_prim_undef))))\n else let%string\n (s3, sindx) = (to_string s2 c (Coq_value_prim (Coq_prim_number\n (ilen -. 1.)))) in\n let%value \n (s4, velem) = (run_object_get s3 c l sindx) in\n let%not_throw\n (s5, x) = (object_delete_default s4 c l sindx throw_true) in\n let%not_throw\n (s6, x0) = (object_put s5 c l\n ("length")\n (Coq_value_prim (Coq_prim_string sindx)) throw_true) in\n result_out (Coq_out_ter (s6, (res_val velem)))\n | Coq_prealloc_array_proto_push ->\n let%object (s0, l) = (to_object s vthis) in\n let%value\n (s1, vlen) = (run_object_get s0 c l\n ("length")) in\n let%run (s2, ilen) = (to_uint32 s1 c vlen) in\n push s2 c l args ilen\n | Coq_prealloc_string ->\n if list_eq_nil_decidable args\n then res_ter s (res_val (Coq_value_prim (Coq_prim_string "")))\n else let value0 = (get_arg 0 args) in\n let%string (s0, s1) = (to_string s c value0) in\n res_ter s0 (res_val (Coq_value_prim (Coq_prim_string s1)))\n | Coq_prealloc_string_proto_to_string ->\n (match vthis with\n | Coq_value_prim p ->\n if type_compare (type_of vthis) Coq_type_string\n then res_ter s (res_val vthis)\n else run_error s Coq_native_error_type\n | Coq_value_object l ->\n let%some s0= (run_object_method object_class_ s l) in\n if string_eq s0 ("String")\n then run_object_prim_value s l\n else run_error s Coq_native_error_type)\n | Coq_prealloc_string_proto_value_of ->\n (match vthis with\n | Coq_value_prim p ->\n if type_compare (type_of vthis) Coq_type_string\n then res_ter s (res_val vthis)\n else run_error s Coq_native_error_type\n | Coq_value_object l ->\n let%some s0= (run_object_method object_class_ s l) in\n if string_eq s0 ("String")\n then run_object_prim_value s l\n else run_error s Coq_native_error_type)\n | Coq_prealloc_error ->\n let v = (get_arg 0 args) in\n build_error s (Coq_value_object (Coq_object_loc_prealloc\n Coq_prealloc_error_proto)) v\n | Coq_prealloc_native_error ne ->\n let v = (get_arg 0 args) in\n build_error s (Coq_value_object (Coq_object_loc_prealloc\n (Coq_prealloc_native_error_proto ne))) v\n | Coq_prealloc_throw_type_error -> run_error s Coq_native_error_type\n | _ ->\n (fun s -> Debug.not_yet_implemented_because __LOC__ s; Coq_result_not_yet_implemented)\n (strappend ("Call prealloc_") (strappend (string_of_prealloc b) (" not yet implemented")))\n\n(** val run_call :\n state -> execution_ctx -> object_loc -> value -> value list\n -> result **)\n\nand run_call s c l vthis args =\n let%some co = run_object_method object_call_ s l in\n let%some c0 = co in\n match c0 with\n | Coq_call_default -> entering_func_code s c l vthis args\n | Coq_call_after_bind ->\n let%some oarg = run_object_method object_bound_args_ s l in\n let%some boundArgs = oarg in\n let%some obnd = run_object_method object_bound_this_ s l in\n let%some boundThis = obnd in\n let%some otrg = run_object_method object_target_function_ s l in\n let%some target = otrg in\n let arguments_ = (LibList.append boundArgs args) in run_call s c target boundThis arguments_\n | Coq_call_prealloc b -> run_call_prealloc s c b vthis args\n\n(** val run_javascript_from_state : state -> prog -> result **)\n\nand run_javascript_from_state s p =\n let c = execution_ctx_initial (prog_intro_strictness p) in\n let%void s_2 =\n execution_ctx_binding_inst s c Coq_codetype_global None p [] in\n run_prog s_2 c p\n\n(** val run_javascript_from_result : result -> prog -> result **)\n\nand run_javascript_from_result w p =\n if_success w (fun s _ -> run_javascript_from_state s p)\n\n(** val run_javascript : prog -> result **)\n\nand run_javascript p =\n run_javascript_from_state state_initial p\n'}, +]; diff --git a/branch/4.04/jsref/lineof.js b/branch/4.04/jsref/lineof.js new file mode 100644 index 0000000000000000000000000000000000000000..44bba4ecc1f494f8f874c70eb63738b969ba0cb5 --- /dev/null +++ b/branch/4.04/jsref/lineof.js @@ -0,0 +1,22154 @@ +var lineof_data = {}; +var lineof_temp; + lineof_temp = []; + lineof_temp[5225] = [3048,20,3061,36]; + lineof_temp[3510] = [2097,6,2125,65]; + lineof_temp[1566] = [858,4,858,12]; + lineof_temp[5226] = [3043,14,3061,36]; + lineof_temp[3435] = [2105,38,2105,82]; + lineof_temp[29] = [37,23,37,47]; + lineof_temp[6814] = [3946,47,3946,80]; + lineof_temp[4770] = [2823,12,2825,56]; + lineof_temp[3651] = [2169,12,2169,43]; + lineof_temp[1611] = [897,30,897,55]; + lineof_temp[6668] = [3817,9,3824,41]; + lineof_temp[6437] = [3723,18,3727,75]; + lineof_temp[3399] = [2079,17,2081,94]; + lineof_temp[6072] = [3556,17,3556,69]; + lineof_temp[2896] = [1704,8,1747,102]; + lineof_temp[3885] = [2363,20,2363,48]; + lineof_temp[1353] = [759,34,759,83]; + lineof_temp[3396] = [2079,29,2079,75]; + lineof_temp[4942] = [2918,28,2925,94]; + lineof_temp[1938] = [1062,13,1107,65]; + lineof_temp[4417] = [2530,18,2538,88]; + lineof_temp[771] = [495,12,514,90]; + lineof_temp[7220] = [4120,12,4120,37]; + lineof_temp[1210] = [722,9,722,28]; + lineof_temp[2449] = [1451,32,1451,51]; + lineof_temp[895] = [591,10,592,68]; + lineof_temp[486] = [336,4,341,62]; + lineof_temp[1103] = [676,17,690,45]; + lineof_temp[7024] = [4030,4,4030,22]; + lineof_temp[4183] = [2481,33,2481,91]; + lineof_temp[3438] = [2107,42,2108,74]; + lineof_temp[2190] = [1238,6,1251,91]; + lineof_temp[1910] = [1092,19,1092,44]; + lineof_temp[7211] = [4113,9,4115,70]; + lineof_temp[5433] = [3200,20,3201,43]; + lineof_temp[2482] = [1479,34,1479,51]; + lineof_temp[6040] = [3515,4,3532,68]; + lineof_temp[5345] = [3128,14,3128,76]; + lineof_temp[4595] = [2695,2,2713,94]; + lineof_temp[5330] = [3102,55,3111,70]; + lineof_temp[2238] = [1279,15,1281,23]; + lineof_temp[5459] = [3220,33,3220,51]; + lineof_temp[97] = [77,2,77,13]; + lineof_temp[3816] = [2306,26,2312,63]; + lineof_temp[1078] = [686,50,686,103]; + lineof_temp[961] = [614,17,614,37]; + lineof_temp[5570] = [3285,34,3285,41]; + lineof_temp[1102] = [677,17,690,45]; + lineof_temp[775] = [483,8,515,11]; + lineof_temp[6878] = [3970,27,3970,64]; + lineof_temp[5360] = [3134,24,3134,33]; + lineof_temp[3296] = [2025,16,2025,62]; + lineof_temp[4263] = [2516,4,2516,22]; + lineof_temp[2307] = [1320,4,1320,22]; + lineof_temp[1990] = [1138,23,1138,55]; + lineof_temp[5544] = [3273,20,3273,62]; + lineof_temp[1492] = [818,7,818,20]; + lineof_temp[3175] = [1923,18,1923,69]; + lineof_temp[5491] = [3239,71,3239,87]; + lineof_temp[4751] = [2809,7,2809,41]; + lineof_temp[6997] = [4017,26,4017,42]; + lineof_temp[6676] = [3830,70,3830,91]; + lineof_temp[5505] = [3226,12,3239,88]; + lineof_temp[267] = [186,4,187,33]; + lineof_temp[6731] = [3902,92,3906,89]; + lineof_temp[4670] = [2761,21,2761,48]; + lineof_temp[4488] = [2625,8,2652,33]; + lineof_temp[1329] = [739,9,740,63]; + lineof_temp[6752] = [3878,55,3915,122]; + lineof_temp[2567] = [1515,35,1521,53]; + lineof_temp[471] = [340,35,340,47]; + lineof_temp[3745] = [2265,21,2266,94]; + lineof_temp[1681] = [946,37,946,66]; + lineof_temp[1000] = [601,13,608,45]; + lineof_temp[3576] = [2151,27,2167,180]; + lineof_temp[3284] = [2013,17,2013,24]; + lineof_temp[5845] = [3414,13,3415,44]; + lineof_temp[3999] = [2407,2,2413,87]; + lineof_temp[5494] = [3239,29,3239,87]; + lineof_temp[4276] = [2548,17,2548,71]; + lineof_temp[2715] = [1602,14,1602,57]; + lineof_temp[1017] = [574,4,632,66]; + lineof_temp[549] = [381,7,382,82]; + lineof_temp[1953] = [1115,2,1116,62]; + lineof_temp[1775] = [1005,70,1005,91]; + lineof_temp[5818] = [3382,29,3391,79]; + lineof_temp[1665] = [935,11,936,85]; + lineof_temp[670] = [445,23,445,38]; + lineof_temp[5672] = [3332,40,3332,72]; + lineof_temp[2547] = [1513,40,1513,53]; + lineof_temp[2113] = [1203,29,1203,75]; + lineof_temp[5868] = [3426,22,3426,55]; + lineof_temp[1861] = [1075,91,1075,102]; + lineof_temp[992] = [606,24,607,66]; + lineof_temp[5476] = [3231,35,3231,81]; + lineof_temp[4173] = [2478,4,2478,38]; + lineof_temp[2859] = [1725,50,1725,89]; + lineof_temp[132] = [105,19,105,36]; + lineof_temp[5647] = [3325,54,3325,81]; + lineof_temp[3739] = [2259,4,2259,75]; + lineof_temp[6433] = [3727,51,3727,71]; + lineof_temp[2120] = [1211,33,1211,59]; + lineof_temp[4790] = [2821,10,2832,56]; + lineof_temp[1603] = [891,22,891,67]; + lineof_temp[3287] = [2011,8,2016,125]; + lineof_temp[1245] = [719,12,719,18]; + lineof_temp[5264] = [3088,19,3088,62]; + lineof_temp[7007] = [4028,23,4028,27]; + lineof_temp[5789] = [3377,37,3377,66]; + lineof_temp[1253] = [712,33,712,66]; + lineof_temp[6075] = [3557,27,3557,55]; + lineof_temp[5595] = [3289,8,3291,68]; + lineof_temp[3218] = [1963,39,1969,85]; + lineof_temp[3217] = [1969,44,1969,85]; + lineof_temp[5289] = [3095,24,3095,48]; + lineof_temp[3131] = [1901,42,1914,95]; + lineof_temp[6330] = [3658,4,3658,30]; + lineof_temp[5600] = [3292,16,3292,25]; + lineof_temp[5558] = [3286,25,3286,37]; + lineof_temp[3803] = [2308,33,2308,92]; + lineof_temp[2820] = [1662,7,1672,24]; + lineof_temp[734] = [491,15,493,85]; + lineof_temp[5562] = [3284,71,3284,78]; + lineof_temp[5441] = [3210,21,3210,28]; + lineof_temp[3418] = [2089,25,2089,36]; + lineof_temp[1619] = [900,30,900,56]; + lineof_temp[5366] = [3131,16,3136,37]; + lineof_temp[1819] = [1025,90,1025,103]; + lineof_temp[6769] = [3826,4,3826,36]; + lineof_temp[6418] = [3717,48,3719,72]; + lineof_temp[3552] = [2156,67,2156,78]; + lineof_temp[3044] = [1778,2,1831,78]; + lineof_temp[4876] = [2849,4,2868,35]; + lineof_temp[4648] = [2747,4,2748,41]; + lineof_temp[2151] = [1199,6,1223,52]; + lineof_temp[711] = [470,4,472,77]; + lineof_temp[6480] = [3737,7,3743,72]; + lineof_temp[6109] = [3570,13,3570,71]; + lineof_temp[1040] = [639,8,639,33]; + lineof_temp[4754] = [2807,2,2811,71]; + lineof_temp[4420] = [2529,14,2538,88]; + lineof_temp[3078] = [1876,17,1876,48]; + lineof_temp[3250] = [1996,19,1997,45]; + lineof_temp[1321] = [731,6,735,51]; + lineof_temp[4470] = [2639,18,2644,33]; + lineof_temp[5162] = [3011,2,3018,41]; + lineof_temp[3640] = [2173,18,2200,86]; + lineof_temp[3369] = [2071,88,2071,104]; + lineof_temp[2676] = [1592,31,1592,43]; + lineof_temp[3813] = [2309,31,2312,63]; + lineof_temp[2912] = [1765,25,1765,78]; + lineof_temp[4217] = [2492,77,2492,105]; + lineof_temp[3303] = [2033,28,2033,45]; + lineof_temp[646] = [429,4,429,43]; + lineof_temp[6909] = [3980,26,3989,63]; + lineof_temp[5219] = [3060,31,3060,38]; + lineof_temp[2531] = [1552,31,1564,123]; + lineof_temp[6037] = [3516,8,3532,68]; + lineof_temp[5253] = [3070,4,3070,14]; + lineof_temp[2959] = [1795,45,1795,82]; + lineof_temp[236] = [138,12,138,31]; + lineof_temp[5028] = [2964,34,2964,91]; + lineof_temp[7161] = [4085,23,4090,93]; + lineof_temp[6836] = [3956,48,3956,81]; + lineof_temp[3822] = [2298,15,2298,44]; + lineof_temp[3601] = [2178,36,2179,85]; + lineof_temp[1301] = [734,32,734,58]; + lineof_temp[848] = [569,4,571,67]; + lineof_temp[3126] = [1914,51,1914,95]; + lineof_temp[2066] = [1170,28,1170,74]; + lineof_temp[870] = [584,35,584,55]; + lineof_temp[6893] = [3981,47,3981,80]; + lineof_temp[2643] = [1482,4,1564,123]; + lineof_temp[203] = [140,17,140,40]; + lineof_temp[1251] = [713,13,721,30]; + lineof_temp[2486] = [1480,17,1480,63]; + lineof_temp[341] = [230,17,230,33]; + lineof_temp[164] = [117,13,117,31]; + lineof_temp[7353] = [4156,2,4168,61]; + lineof_temp[704] = [470,23,470,89]; + lineof_temp[4807] = [2836,17,2837,88]; + lineof_temp[1748] = [995,13,995,76]; + lineof_temp[3199] = [1977,35,1977,89]; + lineof_temp[796] = [478,2,528,7]; + lineof_temp[4405] = [2533,69,2533,71]; + lineof_temp[5255] = [3068,39,3073,45]; + lineof_temp[4822] = [2839,13,2840,49]; + lineof_temp[2279] = [1306,37,1306,71]; + lineof_temp[6609] = [3804,45,3804,78]; + lineof_temp[6264] = [3643,40,3643,73]; + lineof_temp[3896] = [2351,20,2364,28]; + lineof_temp[3669] = [2216,25,2216,71]; + lineof_temp[869] = [584,35,584,55]; + lineof_temp[7295] = [4148,4,4149,96]; + lineof_temp[4853] = [2854,15,2862,89]; + lineof_temp[3530] = [2135,14,2139,58]; + lineof_temp[6722] = [3888,73,3890,102]; + lineof_temp[4194] = [2484,24,2484,50]; + lineof_temp[5634] = [3312,2,3313,62]; + lineof_temp[1592] = [869,2,880,84]; + lineof_temp[6504] = [3749,16,3755,7]; + lineof_temp[6302] = [3656,75,3656,100]; + lineof_temp[4437] = [2614,2,2615,26]; + lineof_temp[3684] = [2209,4,2223,55]; + lineof_temp[6301] = [3656,75,3656,100]; + lineof_temp[5916] = [3454,12,3461,18]; + lineof_temp[2668] = [1587,34,1587,55]; + lineof_temp[130] = [103,16,103,31]; + lineof_temp[5979] = [3502,10,3504,53]; + lineof_temp[6714] = [3865,62,3876,109]; + lineof_temp[6663] = [3824,10,3824,40]; + lineof_temp[6208] = [3617,32,3617,50]; + lineof_temp[5808] = [3388,10,3390,44]; + lineof_temp[5380] = [3172,9,3172,28]; + lineof_temp[129] = [103,35,103,40]; + lineof_temp[2883] = [1724,37,1747,102]; + lineof_temp[7304] = [4159,24,4159,59]; + lineof_temp[4723] = [2787,4,2787,31]; + lineof_temp[6842] = [3957,31,3957,64]; + lineof_temp[4298] = [2550,21,2550,57]; + lineof_temp[886] = [591,83,591,105]; + lineof_temp[5954] = [3479,10,3481,96]; + lineof_temp[4846] = [2855,19,2862,89]; + lineof_temp[5035] = [2966,46,2966,92]; + lineof_temp[3135] = [1899,37,1914,95]; + lineof_temp[2583] = [1523,35,1529,53]; + lineof_temp[4339] = [2574,14,2574,32]; + lineof_temp[3332] = [2057,58,2057,104]; + lineof_temp[2375] = [1386,4,1386,16]; + lineof_temp[88] = [59,7,59,20]; + lineof_temp[7293] = [4148,14,4148,57]; + lineof_temp[7066] = [4047,13,4057,19]; + lineof_temp[4024] = [2424,2,2425,74]; + lineof_temp[819] = [545,40,545,56]; + lineof_temp[5529] = [3255,8,3255,55]; + lineof_temp[136] = [109,31,109,54]; + lineof_temp[4974] = [2908,7,2908,25]; + lineof_temp[3036] = [1785,20,1831,78]; + lineof_temp[661] = [439,57,439,83]; + lineof_temp[361] = [239,2,242,105]; + lineof_temp[6990] = [4023,29,4024,77]; + lineof_temp[5183] = [3025,2,3032,79]; + lineof_temp[763] = [510,17,514,89]; + lineof_temp[6427] = [3713,10,3719,75]; + lineof_temp[4549] = [2687,11,2688,77]; + lineof_temp[2101] = [1202,15,1202,37]; + lineof_temp[5385] = [3171,6,3174,43]; + lineof_temp[3735] = [2247,4,2252,59]; + lineof_temp[1743] = [989,28,989,40]; + lineof_temp[5583] = [3266,6,3286,37]; + lineof_temp[4086] = [2453,30,2453,78]; + lineof_temp[233] = [142,17,153,65]; + lineof_temp[7067] = [4045,8,4057,19]; + lineof_temp[6377] = [3690,18,3690,70]; + lineof_temp[6028] = [3528,17,3530,68]; + lineof_temp[1721] = [977,17,977,41]; + lineof_temp[5102] = [2990,32,2990,66]; + lineof_temp[338] = [219,31,222,47]; + lineof_temp[7182] = [4108,35,4108,56]; + lineof_temp[3282] = [2014,17,2016,125]; + lineof_temp[7033] = [4041,19,4041,77]; + lineof_temp[394] = [296,22,296,51]; + lineof_temp[6906] = [3989,29,3989,62]; + lineof_temp[1304] = [735,26,735,41]; + lineof_temp[4106] = [2460,4,2460,28]; + lineof_temp[4165] = [2476,4,2476,28]; + lineof_temp[1978] = [1125,8,1125,30]; + lineof_temp[424] = [324,15,324,32]; + lineof_temp[6693] = [3863,60,3864,73]; + lineof_temp[3042] = [1781,4,1831,78]; + lineof_temp[423] = [324,36,324,57]; + lineof_temp[2911] = [1765,25,1765,78]; + lineof_temp[2079] = [1181,22,1181,91]; + lineof_temp[1821] = [1023,14,1025,103]; + lineof_temp[4979] = [2894,2,2933,64]; + lineof_temp[2083] = [1180,10,1180,37]; + lineof_temp[7095] = [4077,43,4077,89]; + lineof_temp[6407] = [3705,10,3707,90]; + lineof_temp[3691] = [2234,7,2235,82]; + lineof_temp[1473] = [794,4,806,46]; + lineof_temp[5956] = [3484,15,3484,41]; + lineof_temp[4439] = [2614,2,2615,26]; + lineof_temp[6674] = [3916,9,3916,42]; + lineof_temp[3961] = [2397,2,2397,65]; + lineof_temp[3703] = [2241,12,2245,56]; + lineof_temp[3437] = [2107,42,2108,74]; + lineof_temp[708] = [471,4,472,77]; + lineof_temp[4608] = [2721,8,2724,89]; + lineof_temp[2665] = [1577,25,1586,78]; + lineof_temp[4891] = [2879,17,2879,66]; + lineof_temp[2174] = [1241,25,1241,71]; + lineof_temp[7219] = [4121,12,4121,45]; + lineof_temp[5749] = [3361,24,3361,44]; + lineof_temp[5270] = [3087,18,3087,52]; + lineof_temp[4825] = [2819,6,2840,49]; + lineof_temp[2581] = [1523,35,1529,53]; + lineof_temp[418] = [320,15,320,29]; + lineof_temp[5921] = [3465,24,3465,51]; + lineof_temp[1936] = [1062,13,1107,65]; + lineof_temp[1246] = [721,20,721,30]; + lineof_temp[1109] = [675,20,690,45]; + lineof_temp[815] = [540,7,540,26]; + lineof_temp[751] = [503,32,503,75]; + lineof_temp[3489] = [2124,70,2124,81]; + lineof_temp[6380] = [3690,75,3690,105]; + lineof_temp[3504] = [2111,23,2111,37]; + lineof_temp[6066] = [3540,7,3546,78]; + lineof_temp[2674] = [1591,49,1591,68]; + lineof_temp[2020] = [1160,31,1160,46]; + lineof_temp[137] = [110,31,110,54]; + lineof_temp[2590] = [1536,46,1536,81]; + lineof_temp[1447] = [790,7,792,55]; + lineof_temp[405] = [295,2,300,94]; + lineof_temp[5991] = [3475,4,3475,13]; + lineof_temp[4341] = [2564,8,2584,11]; + lineof_temp[4250] = [2510,24,2510,28]; + lineof_temp[2092] = [1154,9,1157,74]; + lineof_temp[244] = [172,35,172,50]; + lineof_temp[4812] = [2835,13,2837,88]; + lineof_temp[2496] = [1467,4,1480,63]; + lineof_temp[912] = [599,14,599,85]; + lineof_temp[4172] = [2478,42,2478,104]; + lineof_temp[2684] = [1589,28,1589,39]; + lineof_temp[2203] = [1265,29,1265,75]; + lineof_temp[4416] = [2531,18,2538,88]; + lineof_temp[2124] = [1221,34,1223,36]; + lineof_temp[117] = [89,21,89,40]; + lineof_temp[6193] = [3614,33,3614,51]; + lineof_temp[4690] = [2761,2,2766,26]; + lineof_temp[269] = [189,27,189,54]; + lineof_temp[5478] = [3231,35,3231,104]; + lineof_temp[1402] = [768,35,776,57]; + lineof_temp[606] = [404,6,414,20]; + lineof_temp[6898] = [3982,29,3982,42]; + lineof_temp[1266] = [705,4,722,28]; + lineof_temp[454] = [328,4,331,32]; + lineof_temp[5750] = [3361,4,3361,20]; + lineof_temp[5074] = [2940,6,2971,59]; + lineof_temp[3792] = [2285,20,2297,64]; + lineof_temp[5812] = [3386,8,3391,79]; + lineof_temp[2952] = [1793,36,1793,88]; + lineof_temp[2762] = [1649,26,1649,57]; + lineof_temp[2832] = [1693,22,1693,76]; + lineof_temp[7084] = [4066,36,4067,80]; + lineof_temp[6236] = [3630,10,3630,26]; + lineof_temp[3292] = [2008,4,2008,15]; + lineof_temp[1385] = [772,44,772,102]; + lineof_temp[5479] = [3231,23,3233,74]; + lineof_temp[4035] = [2428,21,2428,38]; + lineof_temp[2708] = [1605,20,1605,42]; + lineof_temp[2119] = [1201,12,1201,34]; + lineof_temp[1928] = [1107,55,1107,64]; + lineof_temp[1379] = [770,44,770,100]; + lineof_temp[3918] = [2329,10,2364,28]; + lineof_temp[2249] = [1289,22,1289,40]; + lineof_temp[5747] = [3361,24,3361,44]; + lineof_temp[7060] = [4049,19,4049,35]; + lineof_temp[225] = [151,37,153,65]; + lineof_temp[435] = [313,6,326,62]; + lineof_temp[296] = [201,9,201,36]; + lineof_temp[3957] = [2397,40,2397,56]; + lineof_temp[4823] = [2838,13,2838,17]; + lineof_temp[3343] = [2046,38,2046,55]; + lineof_temp[3247] = [1995,20,1995,73]; + lineof_temp[1002] = [599,11,632,66]; + lineof_temp[26] = [36,2,36,17]; + lineof_temp[7080] = [4062,28,4063,28]; + lineof_temp[2416] = [1422,4,1422,38]; + lineof_temp[1879] = [1084,44,1084,90]; + lineof_temp[876] = [583,8,586,57]; + lineof_temp[5280] = [3083,6,3088,62]; + lineof_temp[684] = [454,43,454,77]; + lineof_temp[5576] = [3274,20,3286,37]; + lineof_temp[6378] = [3690,18,3690,70]; + lineof_temp[5034] = [2966,94,2966,115]; + lineof_temp[5883] = [3433,10,3435,47]; + lineof_temp[996] = [606,10,608,45]; + lineof_temp[4009] = [2416,2,2418,89]; + lineof_temp[1855] = [1072,35,1072,75]; + lineof_temp[5187] = [3039,21,3039,48]; + lineof_temp[7359] = [4173,10,4173,57]; + lineof_temp[2755] = [1640,4,1640,25]; + lineof_temp[608] = [404,6,414,20]; + lineof_temp[5221] = [3056,31,3060,38]; + lineof_temp[3190] = [1937,17,1937,35]; + lineof_temp[6793] = [3932,10,3932,27]; + lineof_temp[1903] = [1065,16,1090,65]; + lineof_temp[947] = [629,17,629,50]; + lineof_temp[656] = [436,4,436,105]; + lineof_temp[1051] = [677,20,677,38]; + lineof_temp[6765] = [3834,10,3915,122]; + lineof_temp[2304] = [1315,4,1315,33]; + lineof_temp[4101] = [2457,4,2457,20]; + lineof_temp[2592] = [1535,46,1535,60]; + lineof_temp[2229] = [1258,6,1271,95]; + lineof_temp[5393] = [3170,4,3175,29]; + lineof_temp[882] = [576,6,576,31]; + lineof_temp[6060] = [3546,19,3546,78]; + lineof_temp[4274] = [2548,37,2548,52]; + lineof_temp[3515] = [2096,2,2125,65]; + lineof_temp[1789] = [1010,23,1010,69]; + lineof_temp[2775] = [1647,8,1650,51]; + lineof_temp[1446] = [791,7,792,55]; + lineof_temp[4784] = [2830,24,2830,70]; + lineof_temp[4513] = [2680,49,2682,83]; + lineof_temp[2958] = [1795,45,1795,82]; + lineof_temp[731] = [491,27,491,73]; + lineof_temp[5899] = [3443,4,3444,49]; + lineof_temp[1436] = [785,7,786,55]; + lineof_temp[7336] = [4162,4,4167,96]; + lineof_temp[2247] = [1286,15,1288,23]; + lineof_temp[1841] = [1051,2,1052,27]; + lineof_temp[7103] = [4070,28,4077,89]; + lineof_temp[5309] = [3111,19,3111,70]; + lineof_temp[2570] = [1528,66,1528,100]; + lineof_temp[4190] = [2483,32,2483,66]; + lineof_temp[2946] = [1786,34,1787,61]; + lineof_temp[7292] = [4148,14,4148,57]; + lineof_temp[6706] = [3875,73,3876,109]; + lineof_temp[4302] = [2548,14,2561,69]; + lineof_temp[2039] = [1190,10,1191,24]; + lineof_temp[6934] = [3994,7,3994,33]; + lineof_temp[3820] = [2302,20,2312,63]; + lineof_temp[2947] = [1786,34,1787,61]; + lineof_temp[2585] = [1532,51,1533,81]; + lineof_temp[2215] = [1261,12,1267,86]; + lineof_temp[768] = [495,12,514,90]; + lineof_temp[5365] = [3131,16,3136,37]; + lineof_temp[3602] = [2178,36,2179,85]; + lineof_temp[6703] = [3876,89,3876,107]; + lineof_temp[2460] = [1465,31,1465,80]; + lineof_temp[2194] = [1237,2,1251,91]; + lineof_temp[1179] = [692,27,692,96]; + lineof_temp[275] = [189,4,190,33]; + lineof_temp[929] = [630,23,630,69]; + lineof_temp[743] = [498,27,498,70]; + lineof_temp[1318] = [733,11,733,20]; + lineof_temp[7096] = [4076,39,4077,89]; + lineof_temp[5373] = [3124,17,3124,47]; + lineof_temp[1234] = [714,15,717,29]; + lineof_temp[1031] = [637,22,637,64]; + lineof_temp[4410] = [2537,33,2538,88]; + lineof_temp[4099] = [2457,24,2457,57]; + lineof_temp[3392] = [2072,17,2072,21]; + lineof_temp[1793] = [1010,11,1012,75]; + lineof_temp[1079] = [687,69,687,82]; + lineof_temp[6505] = [3749,16,3755,7]; + lineof_temp[5872] = [3429,22,3429,91]; + lineof_temp[7312] = [4165,20,4165,65]; + lineof_temp[4594] = [2696,6,2713,94]; + lineof_temp[1351] = [759,47,759,83]; + lineof_temp[4808] = [2836,17,2837,88]; + lineof_temp[726] = [488,15,489,71]; + lineof_temp[6387] = [3685,33,3691,7]; + lineof_temp[4828] = [2818,2,2840,49]; + lineof_temp[4090] = [2451,4,2453,78]; + lineof_temp[3641] = [2173,18,2200,86]; + lineof_temp[7148] = [4096,31,4102,87]; + lineof_temp[2185] = [1249,20,1249,89]; + lineof_temp[6468] = [3737,28,3737,47]; + lineof_temp[1659] = [932,14,933,88]; + lineof_temp[301] = [203,30,203,57]; + lineof_temp[3473] = [2121,46,2121,100]; + lineof_temp[6846] = [3941,21,3957,64]; + lineof_temp[6234] = [3630,30,3630,63]; + lineof_temp[3186] = [1922,2,1925,20]; + lineof_temp[589] = [412,35,412,39]; + lineof_temp[464] = [334,4,334,28]; + lineof_temp[5127] = [2987,2,2995,60]; + lineof_temp[3528] = [2136,16,2139,58]; + lineof_temp[3395] = [2079,77,2079,98]; + lineof_temp[1345] = [757,32,757,61]; + lineof_temp[7317] = [4167,56,4167,96]; + lineof_temp[6833] = [3945,26,3955,63]; + lineof_temp[6081] = [3564,38,3564,56]; + lineof_temp[4732] = [2785,4,2787,31]; + lineof_temp[4492] = [2620,30,2652,33]; + lineof_temp[1783] = [993,8,1007,106]; + lineof_temp[1486] = [817,25,817,58]; + lineof_temp[1080] = [687,69,687,82]; + lineof_temp[811] = [538,28,538,87]; + lineof_temp[7233] = [4124,11,4126,49]; + lineof_temp[4467] = [2644,18,2644,33]; + lineof_temp[3972] = [2407,27,2407,62]; + lineof_temp[1456] = [805,68,805,82]; + lineof_temp[3939] = [2375,4,2376,62]; + lineof_temp[1605] = [893,34,893,67]; + lineof_temp[677] = [445,2,448,64]; + lineof_temp[6214] = [3620,13,3620,29]; + lineof_temp[4160] = [2475,24,2475,66]; + lineof_temp[2028] = [1160,10,1161,67]; + lineof_temp[736] = [491,15,493,85]; + lineof_temp[6767] = [3828,9,3915,123]; + lineof_temp[631] = [415,4,418,72]; + lineof_temp[6487] = [3744,42,3744,59]; + lineof_temp[5525] = [3246,2,3247,52]; + lineof_temp[4350] = [2590,34,2590,50]; + lineof_temp[7307] = [4161,20,4161,60]; + lineof_temp[7260] = [4134,7,4137,49]; + lineof_temp[2709] = [1605,9,1606,38]; + lineof_temp[6085] = [3564,16,3564,74]; + lineof_temp[3067] = [1854,2,1858,56]; + lineof_temp[6062] = [3542,10,3546,78]; + lineof_temp[3400] = [2079,17,2081,94]; + lineof_temp[1180] = [692,15,694,60]; + lineof_temp[1060] = [690,22,690,45]; + lineof_temp[782] = [525,41,527,109]; + lineof_temp[1356] = [757,29,760,83]; + lineof_temp[4243] = [2506,4,2506,25]; + lineof_temp[3827] = [2261,4,2312,63]; + lineof_temp[1863] = [1073,31,1075,102]; + lineof_temp[2617] = [1505,32,1544,54]; + lineof_temp[4368] = [2598,18,2599,95]; + lineof_temp[6972] = [4029,18,4029,51]; + lineof_temp[5718] = [3352,4,3352,48]; + lineof_temp[5420] = [3199,29,3199,57]; + lineof_temp[3483] = [2122,48,2122,102]; + lineof_temp[2773] = [1647,8,1650,51]; + lineof_temp[2740] = [1627,22,1632,83]; + lineof_temp[6578] = [3782,4,3785,42]; + lineof_temp[5835] = [3405,8,3405,10]; + lineof_temp[1294] = [728,24,728,72]; + lineof_temp[6926] = [3972,13,3992,51]; + lineof_temp[6029] = [3527,17,3527,42]; + lineof_temp[3185] = [1922,2,1925,20]; + lineof_temp[5338] = [3120,4,3122,58]; + lineof_temp[4449] = [2626,12,2627,98]; + lineof_temp[3149] = [1890,24,1914,95]; + lineof_temp[2440] = [1441,4,1441,33]; + lineof_temp[2042] = [1189,10,1189,37]; + lineof_temp[1383] = [768,38,770,102]; + lineof_temp[4835] = [2854,28,2854,74]; + lineof_temp[4174] = [2479,33,2479,91]; + lineof_temp[4167] = [2477,33,2477,95]; + lineof_temp[3596] = [2170,30,2170,37]; + lineof_temp[3083] = [1870,12,1876,48]; + lineof_temp[6297] = [3653,30,3653,63]; + lineof_temp[2008] = [1151,29,1151,61]; + lineof_temp[1088] = [683,26,683,45]; + lineof_temp[5894] = [3443,17,3443,59]; + lineof_temp[5042] = [2965,34,2965,42]; + lineof_temp[3419] = [2089,25,2089,36]; + lineof_temp[3031] = [1794,31,1831,78]; + lineof_temp[4149] = [2472,4,2472,20]; + lineof_temp[74] = [61,12,63,41]; + lineof_temp[505] = [355,15,355,55]; + lineof_temp[6033] = [3531,17,3531,46]; + lineof_temp[1945] = [1059,15,1059,38]; + lineof_temp[7361] = [4175,4,4175,64]; + lineof_temp[256] = [184,6,184,33]; + lineof_temp[5530] = [3254,4,3255,55]; + lineof_temp[4719] = [2785,22,2785,47]; + lineof_temp[2188] = [1249,8,1251,91]; + lineof_temp[1202] = [636,4,636,37]; + lineof_temp[1019] = [574,4,632,66]; + lineof_temp[5151] = [3018,23,3018,41]; + lineof_temp[7081] = [4062,28,4063,28]; + lineof_temp[5454] = [3189,2,3210,28]; + lineof_temp[1307] = [735,45,735,51]; + lineof_temp[530] = [360,6,369,41]; + lineof_temp[2088] = [1156,11,1157,74]; + lineof_temp[6541] = [3770,34,3770,68]; + lineof_temp[4230] = [2500,27,2500,31]; + lineof_temp[4192] = [2483,32,2483,66]; + lineof_temp[7179] = [4104,25,4104,44]; + lineof_temp[6] = [21,8,21,26]; + lineof_temp[6799] = [3924,7,3924,23]; + lineof_temp[5769] = [3369,4,3369,41]; + lineof_temp[5396] = [3178,4,3179,37]; + lineof_temp[314] = [191,4,191,22]; + lineof_temp[779] = [519,11,521,71]; + lineof_temp[4740] = [2807,8,2808,57]; + lineof_temp[3470] = [2121,89,2121,100]; + lineof_temp[4777] = [2827,12,2828,59]; + lineof_temp[4345] = [2563,8,2563,27]; + lineof_temp[2457] = [1457,23,1459,32]; + lineof_temp[2068] = [1170,28,1170,97]; + lineof_temp[5055] = [2969,29,2969,57]; + lineof_temp[3723] = [2250,16,2252,59]; + lineof_temp[3060] = [1852,16,1852,58]; + lineof_temp[1636] = [891,8,905,85]; + lineof_temp[3344] = [2060,61,2060,71]; + lineof_temp[1874] = [1080,58,1080,69]; + lineof_temp[599] = [407,8,413,11]; + lineof_temp[5775] = [3371,4,3372,21]; + lineof_temp[4615] = [2720,4,2724,89]; + lineof_temp[4596] = [2695,2,2713,94]; + lineof_temp[388] = [277,2,278,38]; + lineof_temp[693] = [460,56,460,78]; + lineof_temp[5313] = [3109,42,3109,67]; + lineof_temp[965] = [617,72,617,93]; + lineof_temp[7254] = [4137,16,4137,49]; + lineof_temp[3089] = [1868,7,1876,48]; + lineof_temp[2967] = [1829,41,1831,78]; + lineof_temp[1844] = [1108,13,1108,59]; + lineof_temp[6497] = [3749,34,3749,68]; + lineof_temp[6299] = [3656,18,3656,70]; + lineof_temp[7137] = [4097,43,4097,90]; + lineof_temp[6411] = [3713,31,3713,50]; + lineof_temp[5802] = [3389,23,3389,58]; + lineof_temp[4523] = [2679,36,2684,88]; + lineof_temp[3533] = [2134,10,2139,58]; + lineof_temp[2862] = [1739,56,1740,91]; + lineof_temp[2339] = [1351,4,1351,22]; + lineof_temp[2191] = [1237,2,1251,91]; + lineof_temp[6730] = [3902,92,3906,89]; + lineof_temp[2187] = [1249,8,1251,91]; + lineof_temp[2852] = [1716,86,1716,108]; + lineof_temp[2107] = [1209,73,1209,85]; + lineof_temp[3878] = [2361,20,2362,59]; + lineof_temp[3430] = [2096,17,2096,54]; + lineof_temp[518] = [365,23,365,69]; + lineof_temp[2608] = [1540,42,1543,103]; + lineof_temp[2350] = [1360,4,1360,29]; + lineof_temp[344] = [233,17,233,60]; + lineof_temp[4444] = [2627,25,2627,69]; + lineof_temp[4045] = [2429,2,2430,72]; + lineof_temp[6403] = [3696,10,3696,28]; + lineof_temp[4450] = [2626,12,2627,98]; + lineof_temp[4113] = [2456,2,2460,28]; + lineof_temp[3955] = [2390,2,2390,65]; + lineof_temp[1418] = [746,15,776,61]; + lineof_temp[7093] = [4077,43,4077,89]; + lineof_temp[6315] = [3661,30,3661,63]; + lineof_temp[2640] = [1489,18,1564,123]; + lineof_temp[4717] = [2783,4,2783,20]; + lineof_temp[3038] = [1785,20,1831,78]; + lineof_temp[2503] = [1493,29,1498,96]; + lineof_temp[975] = [600,14,600,39]; + lineof_temp[5047] = [2970,42,2970,80]; + lineof_temp[4998] = [2951,29,2951,53]; + lineof_temp[1272] = [704,4,722,28]; + lineof_temp[4399] = [2528,32,2528,51]; + lineof_temp[507] = [357,22,357,55]; + lineof_temp[2394] = [1402,4,1402,42]; + lineof_temp[798] = [478,2,528,7]; + lineof_temp[407] = [294,2,300,94]; + lineof_temp[167] = [118,31,118,36]; + lineof_temp[3618] = [2190,49,2190,84]; + lineof_temp[1831] = [984,30,1025,104]; + lineof_temp[1374] = [768,44,768,100]; + lineof_temp[7357] = [4156,2,4168,61]; + lineof_temp[6254] = [3631,10,3631,28]; + lineof_temp[3443] = [2106,35,2109,67]; + lineof_temp[2734] = [1630,52,1630,64]; + lineof_temp[6543] = [3773,22,3773,81]; + lineof_temp[2061] = [1168,16,1168,62]; + lineof_temp[2344] = [1354,4,1354,37]; + lineof_temp[1029] = [635,43,635,65]; + lineof_temp[3485] = [2122,27,2122,44]; + lineof_temp[2214] = [1264,17,1264,103]; + lineof_temp[273] = [189,4,190,33]; + lineof_temp[5487] = [3239,47,3239,67]; + lineof_temp[4996] = [2971,25,2971,59]; + lineof_temp[3412] = [2086,29,2086,98]; + lineof_temp[3176] = [1923,18,1923,69]; + lineof_temp[3952] = [2390,40,2390,56]; + lineof_temp[6108] = [3570,57,3570,71]; + lineof_temp[4063] = [2441,7,2441,80]; + lineof_temp[1806] = [1015,34,1015,55]; + lineof_temp[303] = [204,9,204,36]; + lineof_temp[476] = [341,6,341,32]; + lineof_temp[7194] = [4105,8,4109,39]; + lineof_temp[4669] = [2753,26,2758,58]; + lineof_temp[7339] = [4161,4,4167,96]; + lineof_temp[4268] = [2541,30,2541,46]; + lineof_temp[5671] = [3332,40,3332,72]; + lineof_temp[3727] = [2249,12,2252,59]; + lineof_temp[2520] = [1555,36,1562,103]; + lineof_temp[2029] = [1159,10,1161,67]; + lineof_temp[3726] = [2249,12,2252,59]; + lineof_temp[1416] = [746,15,776,61]; + lineof_temp[6265] = [3643,40,3643,73]; + lineof_temp[2792] = [1642,4,1652,7]; + lineof_temp[7303] = [4159,24,4159,59]; + lineof_temp[7063] = [4054,19,4054,65]; + lineof_temp[5068] = [2941,10,2971,59]; + lineof_temp[4747] = [2810,7,2811,71]; + lineof_temp[4656] = [2757,30,2757,47]; + lineof_temp[2050] = [1175,28,1175,74]; + lineof_temp[573] = [398,15,398,60]; + lineof_temp[2714] = [1602,14,1602,57]; + lineof_temp[1745] = [995,33,995,48]; + lineof_temp[6911] = [3990,48,3990,81]; + lineof_temp[6619] = [3808,33,3809,37]; + lineof_temp[3274] = [2015,22,2016,113]; + lineof_temp[4131] = [2470,57,2470,74]; + lineof_temp[4178] = [2480,33,2480,90]; + lineof_temp[1882] = [1084,32,1086,100]; + lineof_temp[6955] = [4004,30,4004,63]; + lineof_temp[1954] = [1115,2,1116,62]; + lineof_temp[4242] = [2506,29,2506,49]; + lineof_temp[1965] = [1130,17,1130,62]; + lineof_temp[1240] = [720,66,720,76]; + lineof_temp[1098] = [678,22,689,84]; + lineof_temp[5996] = [3513,58,3513,67]; + lineof_temp[5195] = [3044,24,3047,25]; + lineof_temp[3162] = [1866,51,1866,56]; + lineof_temp[6125] = [3577,6,3577,17]; + lineof_temp[5887] = [3426,4,3435,47]; + lineof_temp[4868] = [2868,23,2868,31]; + lineof_temp[4321] = [2573,44,2573,67]; + lineof_temp[626] = [417,8,418,71]; + lineof_temp[7358] = [4173,10,4173,57]; + lineof_temp[6659] = [3819,10,3821,56]; + lineof_temp[5704] = [3343,37,3343,66]; + lineof_temp[6966] = [4009,27,4009,64]; + lineof_temp[3117] = [1900,55,1900,82]; + lineof_temp[1118] = [656,24,656,48]; + lineof_temp[939] = [623,12,625,61]; + lineof_temp[371] = [254,14,254,28]; + lineof_temp[5070] = [2941,10,2971,59]; + lineof_temp[4673] = [2762,11,2762,40]; + lineof_temp[4017] = [2423,21,2423,40]; + lineof_temp[6274] = [3648,89,3648,130]; + lineof_temp[5025] = [2963,34,2963,89]; + lineof_temp[2143] = [1211,12,1223,52]; + lineof_temp[7239] = [4117,4,4126,50]; + lineof_temp[6886] = [3992,18,3992,51]; + lineof_temp[1902] = [1065,16,1090,65]; + lineof_temp[2479] = [1476,12,1476,38]; + lineof_temp[5781] = [3374,14,3374,57]; + lineof_temp[4844] = [2858,25,2862,89]; + lineof_temp[2529] = [1563,34,1564,123]; + lineof_temp[2089] = [1155,11,1155,43]; + lineof_temp[498] = [348,2,348,51]; + lineof_temp[4997] = [2971,25,2971,59]; + lineof_temp[5597] = [3289,8,3291,68]; + lineof_temp[5287] = [3095,39,3095,47]; + lineof_temp[5699] = [3342,4,3342,38]; + lineof_temp[2240] = [1282,22,1282,40]; + lineof_temp[6226] = [3624,10,3625,39]; + lineof_temp[4452] = [2626,12,2627,98]; + lineof_temp[2641] = [1488,14,1564,123]; + lineof_temp[885] = [591,83,591,105]; + lineof_temp[5784] = [3374,4,3375,25]; + lineof_temp[6397] = [3697,23,3697,65]; + lineof_temp[7193] = [4105,8,4109,39]; + lineof_temp[6988] = [4021,49,4021,82]; + lineof_temp[986] = [601,23,605,81]; + lineof_temp[4330] = [2583,51,2583,74]; + lineof_temp[292] = [196,7,196,20]; + lineof_temp[3104] = [1890,50,1890,69]; + lineof_temp[2184] = [1249,20,1249,66]; + lineof_temp[906] = [599,27,599,53]; + lineof_temp[5729] = [3354,30,3354,51]; + lineof_temp[2013] = [1153,7,1153,61]; + lineof_temp[7279] = [4143,4,4145,79]; + lineof_temp[6149] = [3594,29,3594,46]; + lineof_temp[1281] = [702,4,722,28]; + lineof_temp[3174] = [1866,2,1915,7]; + lineof_temp[3747] = [2270,24,2270,78]; + lineof_temp[2146] = [1210,12,1210,42]; + lineof_temp[1983] = [1124,6,1131,67]; + lineof_temp[1582] = [876,19,877,34]; + lineof_temp[1003] = [598,11,598,44]; + lineof_temp[2278] = [1305,27,1305,51]; + lineof_temp[813] = [539,37,539,70]; + lineof_temp[286] = [197,30,197,57]; + lineof_temp[3155] = [1880,11,1914,95]; + lineof_temp[6590] = [3792,30,3792,76]; + lineof_temp[6230] = [3619,4,3619,36]; + lineof_temp[4193] = [2483,4,2483,28]; + lineof_temp[169] = [93,7,118,37]; + lineof_temp[330] = [220,2,220,27]; + lineof_temp[3655] = [2132,2,2201,61]; + lineof_temp[2971] = [1828,43,1828,52]; + lineof_temp[6626] = [3813,35,3813,75]; + lineof_temp[6421] = [3714,14,3719,75]; + lineof_temp[5342] = [3127,31,3127,56]; + lineof_temp[6960] = [4007,32,4007,65]; + lineof_temp[3493] = [2124,27,2124,81]; + lineof_temp[2885] = [1724,37,1747,102]; + lineof_temp[2438] = [1439,4,1439,38]; + lineof_temp[2263] = [1292,23,1292,36]; + lineof_temp[1414] = [750,20,776,60]; + lineof_temp[6132] = [3581,25,3581,47]; + lineof_temp[6099] = [3568,16,3568,74]; + lineof_temp[5911] = [3454,15,3454,40]; + lineof_temp[5155] = [3013,10,3018,41]; + lineof_temp[2695] = [1595,8,1596,71]; + lineof_temp[3963] = [2397,2,2397,65]; + lineof_temp[389] = [277,2,278,38]; + lineof_temp[2597] = [1531,35,1536,81]; + lineof_temp[6762] = [3841,21,3915,122]; + lineof_temp[4188] = [2482,25,2482,52]; + lineof_temp[3534] = [2134,10,2139,58]; + lineof_temp[2855] = [1722,36,1722,90]; + lineof_temp[381] = [277,26,277,70]; + lineof_temp[6699] = [3872,88,3872,106]; + lineof_temp[6031] = [3532,17,3532,67]; + lineof_temp[5702] = [3341,4,3341,37]; + lineof_temp[4627] = [2738,8,2738,32]; + lineof_temp[187] = [129,7,129,44]; + lineof_temp[6436] = [3725,48,3727,72]; + lineof_temp[5389] = [3170,4,3175,29]; + lineof_temp[3072] = [1868,10,1868,37]; + lineof_temp[7265] = [4128,4,4137,50]; + lineof_temp[353] = [229,2,234,74]; + lineof_temp[6857] = [3922,4,3922,37]; + lineof_temp[3198] = [1949,27,1949,70]; + lineof_temp[1020] = [573,4,632,66]; + lineof_temp[5268] = [3086,42,3086,67]; + lineof_temp[3112] = [1894,36,1895,67]; + lineof_temp[1063] = [678,44,678,97]; + lineof_temp[792] = [479,15,479,42]; + lineof_temp[6434] = [3727,51,3727,71]; + lineof_temp[6366] = [3681,10,3682,105]; + lineof_temp[5537] = [3252,32,3258,96]; + lineof_temp[3539] = [2141,12,2141,44]; + lineof_temp[3497] = [2113,24,2113,40]; + lineof_temp[1613] = [902,44,902,74]; + lineof_temp[1419] = [746,15,776,61]; + lineof_temp[199] = [137,10,137,19]; + lineof_temp[7258] = [4136,16,4136,41]; + lineof_temp[4743] = [2810,27,2810,44]; + lineof_temp[2357] = [1369,4,1369,34]; + lineof_temp[349] = [233,7,234,74]; + lineof_temp[6182] = [3601,4,3601,30]; + lineof_temp[5449] = [3202,21,3202,28]; + lineof_temp[3322] = [2051,46,2053,70]; + lineof_temp[1865] = [1073,31,1075,102]; + lineof_temp[999] = [606,10,608,45]; + lineof_temp[5838] = [3414,38,3414,75]; + lineof_temp[569] = [376,2,391,46]; + lineof_temp[3630] = [2182,33,2200,86]; + lineof_temp[7245] = [4132,12,4132,45]; + lineof_temp[1524] = [835,24,835,39]; + lineof_temp[7168] = [4083,14,4102,87]; + lineof_temp[5756] = [3363,4,3363,21]; + lineof_temp[812] = [539,37,539,70]; + lineof_temp[3843] = [2322,16,2322,26]; + lineof_temp[5468] = [3221,8,3221,12]; + lineof_temp[4789] = [2829,12,2829,30]; + lineof_temp[6689] = [3859,64,3859,81]; + lineof_temp[5346] = [3128,14,3128,76]; + lineof_temp[4273] = [2545,14,2545,34]; + lineof_temp[2733] = [1628,35,1628,80]; + lineof_temp[1025] = [633,15,633,62]; + lineof_temp[5504] = [3227,16,3239,88]; + lineof_temp[4945] = [2917,24,2925,95]; + lineof_temp[4015] = [2422,21,2422,34]; + lineof_temp[650] = [428,4,429,43]; + lineof_temp[1519] = [828,2,829,49]; + lineof_temp[7333] = [4163,4,4167,96]; + lineof_temp[871] = [584,35,584,55]; + lineof_temp[6673] = [3916,9,3916,42]; + lineof_temp[5399] = [3177,4,3177,32]; + lineof_temp[5269] = [3087,18,3087,52]; + lineof_temp[5686] = [3337,4,3337,26]; + lineof_temp[4757] = [2806,2,2811,71]; + lineof_temp[2830] = [1685,23,1687,77]; + lineof_temp[85] = [65,13,65,72]; + lineof_temp[3548] = [2154,36,2154,78]; + lineof_temp[1970] = [1129,17,1129,64]; + lineof_temp[1360] = [763,37,763,66]; + lineof_temp[3216] = [1965,53,1968,86]; + lineof_temp[4079] = [2448,4,2448,20]; + lineof_temp[2658] = [1583,39,1585,73]; + lineof_temp[1684] = [949,16,949,35]; + lineof_temp[6726] = [3886,72,3890,104]; + lineof_temp[5985] = [3482,10,3482,36]; + lineof_temp[6093] = [3566,16,3566,74]; + lineof_temp[2516] = [1501,29,1501,45]; + lineof_temp[1556] = [862,13,862,59]; + lineof_temp[2221] = [1269,68,1269,89]; + lineof_temp[2920] = [1769,31,1770,33]; + lineof_temp[1985] = [1123,2,1131,67]; + lineof_temp[995] = [608,10,608,45]; + lineof_temp[2463] = [1460,21,1465,80]; + lineof_temp[7272] = [4139,4,4141,71]; + lineof_temp[140] = [109,31,110,54]; + lineof_temp[1107] = [675,20,690,45]; + lineof_temp[2561] = [1521,40,1521,53]; + lineof_temp[3841] = [2321,16,2321,26]; + lineof_temp[3670] = [2216,25,2216,94]; + lineof_temp[4526] = [2672,26,2684,88]; + lineof_temp[4225] = [2494,4,2494,21]; + lineof_temp[4041] = [2430,2,2430,72]; + lineof_temp[3205] = [1974,30,1979,77]; + lineof_temp[6147] = [3593,13,3593,29]; + lineof_temp[4094] = [2450,4,2453,78]; + lineof_temp[4096] = [2447,2,2453,78]; + lineof_temp[1037] = [640,8,642,67]; + lineof_temp[4480] = [2652,18,2652,33]; + lineof_temp[4006] = [2418,70,2418,84]; + lineof_temp[3639] = [2173,18,2200,86]; + lineof_temp[2603] = [1542,43,1543,101]; + lineof_temp[4304] = [2541,50,2562,11]; + lineof_temp[2664] = [1578,25,1586,78]; + lineof_temp[1923] = [1104,29,1106,100]; + lineof_temp[5163] = [3011,2,3018,41]; + lineof_temp[1897] = [1081,29,1081,60]; + lineof_temp[221] = [153,56,153,65]; + lineof_temp[5514] = [3222,6,3240,70]; + lineof_temp[5717] = [3352,4,3352,48]; + lineof_temp[1503] = [821,29,821,48]; + lineof_temp[5140] = [3001,2,3005,42]; + lineof_temp[2826] = [1679,19,1679,70]; + lineof_temp[2430] = [1432,4,1432,22]; + lineof_temp[2228] = [1268,8,1268,36]; + lineof_temp[2003] = [1148,4,1150,51]; + lineof_temp[604] = [414,8,414,12]; + lineof_temp[4115] = [2468,58,2468,64]; + lineof_temp[4487] = [2628,12,2652,33]; + lineof_temp[5397] = [3178,4,3179,37]; + lineof_temp[2745] = [1622,13,1632,83]; + lineof_temp[6488] = [3744,42,3744,59]; + lineof_temp[3424] = [2030,8,2089,37]; + lineof_temp[3355] = [2037,26,2061,69]; + lineof_temp[2139] = [1213,21,1215,88]; + lineof_temp[6456] = [3730,14,3735,75]; + lineof_temp[3946] = [2383,2,2383,71]; + lineof_temp[778] = [482,8,482,33]; + lineof_temp[964] = [612,12,612,37]; + lineof_temp[7165] = [4083,14,4102,87]; + lineof_temp[4471] = [2638,14,2644,33]; + lineof_temp[4264] = [2514,31,2519,17]; + lineof_temp[1443] = [791,21,791,37]; + lineof_temp[2351] = [1363,4,1363,28]; + lineof_temp[5629] = [3313,6,3313,62]; + lineof_temp[3059] = [1852,35,1852,57]; + lineof_temp[7325] = [4165,4,4167,96]; + lineof_temp[7085] = [4066,36,4067,80]; + lineof_temp[4850] = [2854,15,2862,89]; + lineof_temp[664] = [438,4,439,86]; + lineof_temp[3465] = [2118,27,2118,40]; + lineof_temp[5875] = [3429,10,3431,99]; + lineof_temp[1310] = [735,8,735,51]; + lineof_temp[1316] = [733,11,733,20]; + lineof_temp[6306] = [3655,10,3656,100]; + lineof_temp[4237] = [2503,4,2503,26]; + lineof_temp[4028] = [2423,2,2425,74]; + lineof_temp[1754] = [999,16,1001,93]; + lineof_temp[1648] = [914,15,914,39]; + lineof_temp[909] = [599,54,599,84]; + lineof_temp[2574] = [1527,43,1528,101]; + lineof_temp[1828] = [991,4,1025,104]; + lineof_temp[5400] = [3181,11,3182,46]; + lineof_temp[3330] = [2057,106,2057,127]; + lineof_temp[5173] = [3032,16,3032,78]; + lineof_temp[1564] = [859,4,862,59]; + lineof_temp[4175] = [2479,33,2479,91]; + lineof_temp[1516] = [829,6,829,49]; + lineof_temp[5886] = [3426,4,3435,47]; + lineof_temp[5201] = [3050,28,3050,83]; + lineof_temp[854] = [574,19,574,62]; + lineof_temp[716] = [478,15,478,54]; + lineof_temp[4912] = [2878,2,2888,49]; + lineof_temp[3595] = [2170,30,2170,37]; + lineof_temp[6051] = [3542,30,3542,60]; + lineof_temp[5295] = [3095,2,3096,37]; + lineof_temp[4200] = [2485,27,2485,46]; + lineof_temp[2637] = [1501,26,1564,123]; + lineof_temp[5474] = [3227,25,3227,56]; + lineof_temp[5372] = [3125,6,3136,37]; + lineof_temp[5147] = [3017,30,3017,62]; + lineof_temp[2077] = [1181,22,1181,68]; + lineof_temp[680] = [454,24,454,39]; + lineof_temp[969] = [617,12,619,61]; + lineof_temp[7206] = [4115,12,4115,70]; + lineof_temp[6753] = [3878,55,3915,122]; + lineof_temp[3902] = [2348,20,2348,45]; + lineof_temp[6948] = [4002,10,4002,24]; + lineof_temp[2026] = [1161,10,1161,67]; + lineof_temp[3719] = [2252,26,2252,59]; + lineof_temp[2600] = [1530,35,1530,55]; + lineof_temp[5830] = [3409,14,3410,90]; + lineof_temp[2787] = [1643,4,1652,7]; + lineof_temp[408] = [294,2,300,94]; + lineof_temp[282] = [194,7,195,36]; + lineof_temp[2929] = [1767,26,1767,35]; + lineof_temp[1957] = [1115,2,1116,62]; + lineof_temp[1846] = [1108,13,1108,59]; + lineof_temp[5796] = [3383,4,3383,6]; + lineof_temp[820] = [545,40,545,56]; + lineof_temp[3361] = [2034,21,2061,69]; + lineof_temp[442] = [308,4,326,62]; + lineof_temp[173] = [91,4,119,35]; + lineof_temp[5622] = [3305,13,3305,22]; + lineof_temp[6122] = [3554,2,3570,71]; + lineof_temp[3724] = [2249,12,2252,59]; + lineof_temp[1829] = [990,4,990,22]; + lineof_temp[2513] = [1491,22,1499,69]; + lineof_temp[4913] = [2878,2,2888,49]; + lineof_temp[2128] = [1223,41,1223,52]; + lineof_temp[2846] = [1678,2,1693,82]; + lineof_temp[6371] = [3685,13,3685,29]; + lineof_temp[4545] = [2686,25,2686,61]; + lineof_temp[1370] = [765,39,765,88]; + lineof_temp[6073] = [3556,17,3556,69]; + lineof_temp[1232] = [715,20,716,26]; + lineof_temp[584] = [408,28,408,73]; + lineof_temp[4157] = [2474,4,2474,20]; + lineof_temp[5181] = [3025,2,3032,79]; + lineof_temp[2201] = [1261,15,1263,76]; + lineof_temp[1455] = [805,68,805,82]; + lineof_temp[575] = [400,16,400,56]; + lineof_temp[7337] = [4162,4,4167,96]; + lineof_temp[2495] = [1476,9,1480,63]; + lineof_temp[158] = [104,16,104,34]; + lineof_temp[6155] = [3600,49,3600,78]; + lineof_temp[2134] = [1213,81,1213,102]; + lineof_temp[6223] = [3624,10,3625,39]; + lineof_temp[5061] = [2945,20,2945,38]; + lineof_temp[6582] = [3788,24,3788,40]; + lineof_temp[4394] = [2539,7,2607,64]; + lineof_temp[6707] = [3874,74,3876,109]; + lineof_temp[6123] = [3554,2,3570,71]; + lineof_temp[3588] = [2147,18,2147,44]; + lineof_temp[5923] = [3465,24,3465,51]; + lineof_temp[4182] = [2481,33,2481,91]; + lineof_temp[1912] = [1098,25,1098,71]; + lineof_temp[5355] = [3132,24,3132,52]; + lineof_temp[466] = [336,21,336,66]; + lineof_temp[5618] = [3304,5,3304,65]; + lineof_temp[165] = [98,10,117,41]; + lineof_temp[6556] = [3769,12,3778,7]; + lineof_temp[5030] = [2963,34,2964,91]; + lineof_temp[1399] = [775,40,775,89]; + lineof_temp[657] = [435,4,435,20]; + lineof_temp[6502] = [3753,22,3753,48]; + lineof_temp[2462] = [1463,27,1465,80]; + lineof_temp[4981] = [2939,24,2939,46]; + lineof_temp[4805] = [2836,17,2837,88]; + lineof_temp[6021] = [3521,14,3521,39]; + lineof_temp[55] = [53,23,53,45]; + lineof_temp[4893] = [2881,19,2881,73]; + lineof_temp[4334] = [2579,19,2583,77]; + lineof_temp[2136] = [1213,33,1213,79]; + lineof_temp[3305] = [2036,27,2036,80]; + lineof_temp[3099] = [1887,24,1888,74]; + lineof_temp[4224] = [2494,25,2494,46]; + lineof_temp[1034] = [640,20,640,66]; + lineof_temp[2770] = [1648,8,1650,51]; + lineof_temp[322] = [213,2,213,17]; + lineof_temp[4897] = [2884,26,2884,84]; + lineof_temp[3499] = [2125,50,2125,64]; + lineof_temp[6354] = [3679,30,3679,63]; + lineof_temp[4139] = [2471,57,2471,63]; + lineof_temp[1975] = [1126,8,1130,62]; + lineof_temp[6876] = [3962,7,3968,66]; + lineof_temp[2766] = [1650,12,1650,51]; + lineof_temp[2712] = [1603,6,1606,39]; + lineof_temp[6778] = [3926,28,3926,61]; + lineof_temp[5854] = [3404,6,3415,44]; + lineof_temp[5387] = [3171,6,3174,43]; + lineof_temp[2838] = [1683,11,1693,82]; + lineof_temp[146] = [112,36,113,59]; + lineof_temp[7213] = [4111,4,4115,70]; + lineof_temp[1716] = [975,29,975,55]; + lineof_temp[6896] = [3982,46,3982,79]; + lineof_temp[5752] = [3362,26,3362,48]; + lineof_temp[2922] = [1770,38,1770,47]; + lineof_temp[2635] = [1503,30,1551,51]; + lineof_temp[2286] = [1304,19,1306,74]; + lineof_temp[1341] = [753,25,754,78]; + lineof_temp[6065] = [3542,10,3546,78]; + lineof_temp[5667] = [3330,4,3331,91]; + lineof_temp[1639] = [888,6,905,85]; + lineof_temp[6589] = [3792,78,3792,99]; + lineof_temp[5333] = [3122,9,3122,58]; + lineof_temp[3263] = [1986,2,1999,46]; + lineof_temp[4802] = [2837,21,2837,88]; + lineof_temp[1527] = [836,6,836,60]; + lineof_temp[5414] = [3189,20,3189,37]; + lineof_temp[5371] = [3129,11,3136,37]; + lineof_temp[6469] = [3738,24,3738,62]; + lineof_temp[5751] = [3362,26,3362,48]; + lineof_temp[5726] = [3353,4,3353,21]; + lineof_temp[3429] = [2096,17,2096,54]; + lineof_temp[2646] = [1567,12,1569,20]; + lineof_temp[5307] = [3111,19,3111,70]; + lineof_temp[4229] = [2467,2,2495,46]; + lineof_temp[2254] = [1286,6,1290,87]; + lineof_temp[4205] = [2488,55,2488,63]; + lineof_temp[1822] = [1023,14,1025,103]; + lineof_temp[351] = [231,2,234,74]; + lineof_temp[6253] = [3632,10,3635,46]; + lineof_temp[337] = [219,31,222,47]; + lineof_temp[6408] = [3704,10,3704,24]; + lineof_temp[4336] = [2579,19,2583,77]; + lineof_temp[4191] = [2483,32,2483,66]; + lineof_temp[6917] = [3991,31,3991,64]; + lineof_temp[6025] = [3530,22,3530,68]; + lineof_temp[5347] = [3128,14,3128,76]; + lineof_temp[5603] = [3287,6,3292,25]; + lineof_temp[2266] = [1293,23,1293,36]; + lineof_temp[5651] = [3328,16,3328,67]; + lineof_temp[3916] = [2336,15,2364,28]; + lineof_temp[3713] = [2249,26,2249,71]; + lineof_temp[3900] = [2349,20,2364,28]; + lineof_temp[3720] = [2252,26,2252,59]; + lineof_temp[1717] = [978,17,979,80]; + lineof_temp[7068] = [4045,8,4057,19]; + lineof_temp[3141] = [1896,35,1896,71]; + lineof_temp[4143] = [2471,25,2471,74]; + lineof_temp[45] = [49,20,49,32]; + lineof_temp[1630] = [892,12,905,85]; + lineof_temp[956] = [613,15,613,70]; + lineof_temp[844] = [537,7,554,60]; + lineof_temp[346] = [233,17,233,92]; + lineof_temp[1708] = [970,12,973,38]; + lineof_temp[6124] = [3577,6,3577,17]; + lineof_temp[1536] = [847,61,847,85]; + lineof_temp[840] = [538,4,554,60]; + lineof_temp[6184] = [3608,18,3608,34]; + lineof_temp[919] = [610,14,610,74]; + lineof_temp[4856] = [2853,11,2862,89]; + lineof_temp[4280] = [2556,24,2557,38]; + lineof_temp[1352] = [759,47,759,83]; + lineof_temp[5915] = [3455,17,3460,38]; + lineof_temp[4902] = [2888,42,2888,49]; + lineof_temp[2253] = [1289,13,1290,86]; + lineof_temp[1094] = [680,24,680,43]; + lineof_temp[967] = [617,24,617,70]; + lineof_temp[732] = [491,27,491,73]; + lineof_temp[4455] = [2630,33,2630,60]; + lineof_temp[443] = [328,25,328,35]; + lineof_temp[6064] = [3542,10,3546,78]; + lineof_temp[1161] = [655,21,673,127]; + lineof_temp[6389] = [3684,4,3684,33]; + lineof_temp[5457] = [3189,2,3210,28]; + lineof_temp[2774] = [1647,8,1650,51]; + lineof_temp[6308] = [3654,10,3654,28]; + lineof_temp[1560] = [861,13,861,54]; + lineof_temp[6102] = [3568,16,3568,74]; + lineof_temp[5306] = [3107,19,3107,47]; + lineof_temp[2819] = [1663,11,1672,24]; + lineof_temp[6200] = [3615,13,3615,30]; + lineof_temp[1116] = [656,28,656,48]; + lineof_temp[2145] = [1211,12,1223,52]; + lineof_temp[688] = [454,2,454,77]; + lineof_temp[6197] = [3615,34,3615,52]; + lineof_temp[5186] = [3039,21,3039,48]; + lineof_temp[4166] = [2477,33,2477,95]; + lineof_temp[1640] = [887,2,905,85]; + lineof_temp[2167] = [1240,11,1240,33]; + lineof_temp[284] = [193,7,193,21]; + lineof_temp[7237] = [4123,7,4126,49]; + lineof_temp[3498] = [2125,50,2125,64]; + lineof_temp[2368] = [1378,4,1378,37]; + lineof_temp[1571] = [872,8,872,66]; + lineof_temp[3467] = [2121,66,2121,85]; + lineof_temp[3423] = [2062,12,2089,37]; + lineof_temp[2738] = [1629,27,1632,83]; + lineof_temp[2246] = [1277,4,1277,18]; + lineof_temp[49] = [51,49,51,62]; + lineof_temp[3881] = [2360,20,2362,59]; + lineof_temp[1848] = [1062,31,1062,65]; + lineof_temp[5194] = [3044,28,3045,69]; + lineof_temp[1989] = [1138,23,1138,55]; + lineof_temp[1347] = [758,32,758,88]; + lineof_temp[5357] = [3135,24,3136,37]; + lineof_temp[1412] = [750,20,776,60]; + lineof_temp[3242] = [1991,23,1992,44]; + lineof_temp[1435] = [786,7,786,55]; + lineof_temp[4214] = [2490,4,2490,105]; + lineof_temp[3160] = [1866,21,1866,31]; + lineof_temp[2656] = [1584,37,1585,71]; + lineof_temp[1504] = [821,7,821,25]; + lineof_temp[20] = [28,2,28,40]; + lineof_temp[3153] = [1884,19,1914,95]; + lineof_temp[2227] = [1269,8,1271,95]; + lineof_temp[1676] = [911,2,938,42]; + lineof_temp[655] = [436,74,436,100]; + lineof_temp[1448] = [789,6,792,56]; + lineof_temp[5926] = [3463,10,3465,51]; + lineof_temp[4857] = [2853,11,2862,89]; + lineof_temp[3982] = [2413,72,2413,82]; + lineof_temp[2461] = [1464,31,1465,80]; + lineof_temp[7088] = [4070,51,4070,72]; + lineof_temp[3672] = [2216,13,2218,92]; + lineof_temp[6127] = [3578,17,3578,35]; + lineof_temp[6053] = [3545,59,3545,72]; + lineof_temp[1772] = [996,15,996,85]; + lineof_temp[6698] = [3869,80,3870,106]; + lineof_temp[5932] = [3446,4,3465,51]; + lineof_temp[2769] = [1648,8,1650,51]; + lineof_temp[1047] = [675,41,675,94]; + lineof_temp[6980] = [4019,47,4019,80]; + lineof_temp[5228] = [3042,15,3061,36]; + lineof_temp[6998] = [4027,48,4027,81]; + lineof_temp[4862] = [2865,25,2865,94]; + lineof_temp[1403] = [768,35,776,57]; + lineof_temp[5271] = [3087,18,3087,52]; + lineof_temp[3259] = [1990,6,1999,46]; + lineof_temp[2763] = [1649,26,1649,57]; + lineof_temp[2297] = [1301,2,1307,57]; + lineof_temp[2001] = [1148,16,1148,62]; + lineof_temp[4085] = [2452,6,2452,10]; + lineof_temp[2137] = [1213,33,1213,102]; + lineof_temp[2277] = [1305,27,1305,51]; + lineof_temp[93] = [71,11,71,18]; + lineof_temp[5000] = [2951,29,2951,53]; + lineof_temp[4518] = [2683,42,2684,88]; + lineof_temp[4928] = [2914,36,2914,56]; + lineof_temp[5938] = [3473,17,3473,59]; + lineof_temp[4291] = [2560,25,2560,61]; + lineof_temp[5973] = [3503,57,3503,87]; + lineof_temp[2236] = [1276,8,1276,17]; + lineof_temp[184] = [127,12,127,22]; + lineof_temp[6982] = [4020,46,4020,79]; + lineof_temp[6483] = [3737,7,3743,72]; + lineof_temp[4463] = [2630,14,2636,33]; + lineof_temp[6018] = [3522,14,3524,103]; + lineof_temp[3521] = [2134,23,2134,67]; + lineof_temp[5528] = [3254,23,3254,49]; + lineof_temp[3979] = [2412,32,2412,99]; + lineof_temp[1899] = [1078,26,1078,52]; + lineof_temp[1291] = [728,37,728,72]; + lineof_temp[28] = [37,23,37,47]; + lineof_temp[998] = [606,10,608,45]; + lineof_temp[4148] = [2472,24,2472,67]; + lineof_temp[576] = [400,16,400,56]; + lineof_temp[5213] = [3053,29,3054,51]; + lineof_temp[4367] = [2599,62,2599,92]; + lineof_temp[2578] = [1529,40,1529,53]; + lineof_temp[4507] = [2674,63,2674,74]; + lineof_temp[1276] = [703,4,722,28]; + lineof_temp[855] = [587,11,587,31]; + lineof_temp[614] = [403,6,414,20]; + lineof_temp[127] = [102,33,102,38]; + lineof_temp[1265] = [706,4,722,28]; + lineof_temp[3264] = [2007,10,2007,20]; + lineof_temp[2321] = [1333,4,1333,25]; + lineof_temp[6474] = [3741,45,3743,69]; + lineof_temp[5964] = [3485,17,3489,38]; + lineof_temp[5096] = [2987,20,2987,47]; + lineof_temp[1565] = [859,4,862,59]; + lineof_temp[4346] = [2586,26,2586,52]; + lineof_temp[5473] = [3227,25,3227,56]; + lineof_temp[4042] = [2429,2,2430,72]; + lineof_temp[3490] = [2124,70,2124,81]; + lineof_temp[2719] = [1602,4,1606,39]; + lineof_temp[5809] = [3387,10,3387,28]; + lineof_temp[5859] = [3424,58,3424,67]; + lineof_temp[5198] = [3049,24,3049,59]; + lineof_temp[3856] = [2331,49,2331,71]; + lineof_temp[1450] = [787,4,787,21]; + lineof_temp[702] = [467,4,468,102]; + lineof_temp[6935] = [3994,7,3994,33]; + lineof_temp[5519] = [3246,21,3246,47]; + lineof_temp[1459] = [801,25,805,87]; + lineof_temp[144] = [113,36,113,59]; + lineof_temp[3991] = [2411,72,2411,93]; + lineof_temp[7078] = [4060,29,4060,48]; + lineof_temp[5664] = [3331,70,3331,91]; + lineof_temp[5177] = [3028,15,3028,31]; + lineof_temp[4486] = [2645,14,2645,41]; + lineof_temp[4475] = [2637,14,2637,33]; + lineof_temp[1502] = [821,29,821,48]; + lineof_temp[5188] = [3040,15,3040,44]; + lineof_temp[6150] = [3594,29,3594,46]; + lineof_temp[5559] = [3284,39,3284,67]; + lineof_temp[4966] = [2912,14,2930,90]; + lineof_temp[4849] = [2855,19,2862,89]; + lineof_temp[2138] = [1213,21,1215,88]; + lineof_temp[3481] = [2122,48,2122,102]; + lineof_temp[3121] = [1912,51,1913,87]; + lineof_temp[7204] = [4114,30,4114,52]; + lineof_temp[4689] = [2761,2,2766,26]; + lineof_temp[3998] = [2407,2,2413,87]; + lineof_temp[3558] = [2162,45,2163,92]; + lineof_temp[2975] = [1799,53,1801,51]; + lineof_temp[5171] = [3030,27,3030,43]; + lineof_temp[1261] = [711,8,721,30]; + lineof_temp[4921] = [2902,7,2902,22]; + lineof_temp[3128] = [1907,46,1914,95]; + lineof_temp[2388] = [1396,4,1396,38]; + lineof_temp[5563] = [3284,71,3284,78]; + lineof_temp[4043] = [2429,2,2430,72]; + lineof_temp[3319] = [2053,60,2053,70]; + lineof_temp[7294] = [4148,14,4148,89]; + lineof_temp[1870] = [1077,55,1077,66]; + lineof_temp[1478] = [808,16,808,85]; + lineof_temp[6375] = [3687,30,3687,63]; + lineof_temp[2241] = [1283,37,1283,86]; + lineof_temp[6131] = [3581,25,3581,47]; + lineof_temp[4320] = [2573,44,2573,67]; + lineof_temp[3830] = [2257,37,2312,63]; + lineof_temp[4438] = [2614,2,2615,26]; + lineof_temp[4116] = [2468,58,2468,64]; + lineof_temp[513] = [359,26,359,64]; + lineof_temp[463] = [334,32,334,43]; + lineof_temp[7171] = [4080,8,4102,87]; + lineof_temp[2793] = [1642,4,1652,7]; + lineof_temp[2178] = [1241,13,1243,94]; + lineof_temp[658] = [438,23,438,89]; + lineof_temp[4964] = [2912,14,2930,90]; + lineof_temp[4688] = [2761,2,2766,26]; + lineof_temp[3677] = [2222,15,2223,55]; + lineof_temp[2147] = [1200,10,1223,52]; + lineof_temp[1422] = [741,10,776,62]; + lineof_temp[4158] = [2475,24,2475,66]; + lineof_temp[3378] = [2068,22,2071,104]; + lineof_temp[1849] = [1065,36,1065,66]; + lineof_temp[6610] = [3804,45,3804,78]; + lineof_temp[4248] = [2509,32,2509,36]; + lineof_temp[2096] = [1146,2,1191,25]; + lineof_temp[2805] = [1668,17,1668,50]; + lineof_temp[7378] = [4181,2,4181,57]; + lineof_temp[7372] = [4181,27,4181,56]; + lineof_temp[6685] = [3834,30,3834,57]; + lineof_temp[6542] = [3770,34,3770,68]; + lineof_temp[4538] = [2667,12,2684,88]; + lineof_temp[4530] = [2671,22,2684,88]; + lineof_temp[7136] = [4097,43,4097,90]; + lineof_temp[6248] = [3634,15,3635,46]; + lineof_temp[5879] = [3435,15,3435,47]; + lineof_temp[5578] = [3267,10,3286,37]; + lineof_temp[1909] = [1092,48,1092,57]; + lineof_temp[1411] = [756,25,776,59]; + lineof_temp[4483] = [2646,14,2652,33]; + lineof_temp[3517] = [2096,2,2125,65]; + lineof_temp[717] = [478,15,478,54]; + lineof_temp[5822] = [3396,33,3396,59]; + lineof_temp[5290] = [3095,24,3095,48]; + lineof_temp[4763] = [2805,2,2811,71]; + lineof_temp[2934] = [1759,12,1770,47]; + lineof_temp[7038] = [4038,10,4041,77]; + lineof_temp[5817] = [3384,4,3384,19]; + lineof_temp[4671] = [2761,21,2761,48]; + lineof_temp[1627] = [893,16,905,85]; + lineof_temp[6644] = [3789,12,3814,50]; + lineof_temp[4490] = [2623,4,2652,33]; + lineof_temp[4314] = [2567,26,2567,72]; + lineof_temp[2686] = [1589,28,1589,39]; + lineof_temp[2181] = [1239,8,1239,30]; + lineof_temp[4428] = [2527,6,2538,88]; + lineof_temp[2688] = [1587,19,1592,43]; + lineof_temp[2385] = [1395,4,1395,28]; + lineof_temp[1263] = [708,6,721,30]; + lineof_temp[332] = [221,2,221,23]; + lineof_temp[2220] = [1259,8,1259,30]; + lineof_temp[5548] = [3275,25,3275,46]; + lineof_temp[5415] = [3191,16,3193,26]; + lineof_temp[4311] = [2564,30,2564,46]; + lineof_temp[7274] = [4143,13,4143,29]; + lineof_temp[5636] = [3312,2,3313,62]; + lineof_temp[124] = [96,10,96,25]; + lineof_temp[6188] = [3612,13,3612,27]; + lineof_temp[7037] = [4038,10,4041,77]; + lineof_temp[4442] = [2624,13,2624,36]; + lineof_temp[3251] = [1996,19,1997,45]; + lineof_temp[5410] = [3168,2,3182,46]; + lineof_temp[3702] = [2243,14,2243,37]; + lineof_temp[4806] = [2836,17,2837,88]; + lineof_temp[4324] = [2575,37,2575,52]; + lineof_temp[6597] = [3800,24,3800,55]; + lineof_temp[5282] = [3082,17,3082,47]; + lineof_temp[5105] = [2992,27,2992,69]; + lineof_temp[3420] = [2089,17,2089,21]; + lineof_temp[1097] = [679,19,689,84]; + lineof_temp[4481] = [2647,18,2652,33]; + lineof_temp[3246] = [1998,17,1999,46]; + lineof_temp[6894] = [3981,29,3981,43]; + lineof_temp[4271] = [2543,14,2543,32]; + lineof_temp[3567] = [2164,45,2164,74]; + lineof_temp[4565] = [2702,42,2702,63]; + lineof_temp[3407] = [2077,14,2082,37]; + lineof_temp[141] = [112,36,112,59]; + lineof_temp[5935] = [3445,4,3445,13]; + lineof_temp[2409] = [1417,27,1417,35]; + lineof_temp[7152] = [4094,26,4102,87]; + lineof_temp[5924] = [3463,10,3465,51]; + lineof_temp[5687] = [3338,31,3338,55]; + lineof_temp[4619] = [2718,36,2727,77]; + lineof_temp[4440] = [2621,10,2621,70]; + lineof_temp[2655] = [1584,37,1585,71]; + lineof_temp[6247] = [3634,15,3635,46]; + lineof_temp[5485] = [3238,39,3238,69]; + lineof_temp[4326] = [2575,17,2575,71]; + lineof_temp[3157] = [1878,7,1914,95]; + lineof_temp[1125] = [666,29,666,33]; + lineof_temp[400] = [296,4,300,94]; + lineof_temp[3758] = [2276,46,2279,48]; + lineof_temp[5204] = [3051,28,3051,55]; + lineof_temp[4665] = [2756,4,2758,58]; + lineof_temp[4940] = [2923,30,2925,94]; + lineof_temp[2166] = [1240,11,1240,33]; + lineof_temp[984] = [605,37,605,80]; + lineof_temp[4396] = [2526,30,2526,46]; + lineof_temp[3200] = [1977,35,1977,89]; + lineof_temp[2872] = [1741,56,1747,102]; + lineof_temp[7354] = [4156,2,4168,61]; + lineof_temp[5734] = [3355,4,3355,29]; + lineof_temp[4879] = [2871,4,2871,68]; + lineof_temp[2434] = [1435,4,1435,31]; + lineof_temp[1682] = [946,11,946,33]; + lineof_temp[3928] = [2375,8,2375,17]; + lineof_temp[2841] = [1683,11,1693,82]; + lineof_temp[453] = [328,4,331,32]; + lineof_temp[1545] = [842,2,848,66]; + lineof_temp[1690] = [943,2,950,47]; + lineof_temp[797] = [478,2,528,7]; + lineof_temp[5616] = [3304,5,3304,65]; + lineof_temp[3075] = [1876,26,1876,48]; + lineof_temp[5526] = [3246,2,3247,52]; + lineof_temp[5377] = [3118,2,3136,37]; + lineof_temp[2610] = [1544,40,1544,53]; + lineof_temp[2098] = [1198,19,1198,55]; + lineof_temp[3977] = [2408,6,2409,66]; + lineof_temp[5010] = [2954,26,2956,80]; + lineof_temp[4621] = [2734,10,2734,49]; + lineof_temp[1273] = [704,4,722,28]; + lineof_temp[1268] = [705,4,722,28]; + lineof_temp[6874] = [3968,32,3968,65]; + lineof_temp[4904] = [2886,26,2888,49]; + lineof_temp[2716] = [1602,14,1602,89]; + lineof_temp[3527] = [2139,55,2139,56]; + lineof_temp[2175] = [1241,25,1241,71]; + lineof_temp[6628] = [3811,30,3813,75]; + lineof_temp[1787] = [1010,71,1010,92]; + lineof_temp[5527] = [3254,23,3254,49]; + lineof_temp[4982] = [2939,24,2939,46]; + lineof_temp[2969] = [1797,44,1797,78]; + lineof_temp[5129] = [2987,2,2995,60]; + lineof_temp[2717] = [1602,4,1606,39]; + lineof_temp[2466] = [1454,6,1465,81]; + lineof_temp[1877] = [1080,29,1080,54]; + lineof_temp[6885] = [3992,18,3992,51]; + lineof_temp[6653] = [3819,70,3819,91]; + lineof_temp[3408] = [2076,14,2076,33]; + lineof_temp[2953] = [1790,30,1793,88]; + lineof_temp[1424] = [737,4,776,63]; + lineof_temp[6098] = [3568,60,3568,74]; + lineof_temp[4858] = [2853,11,2862,89]; + lineof_temp[2799] = [1639,2,1653,65]; + lineof_temp[283] = [194,7,195,36]; + lineof_temp[5077] = [2977,21,2977,48]; + lineof_temp[4123] = [2469,57,2469,63]; + lineof_temp[1926] = [1096,22,1106,101]; + lineof_temp[4589] = [2699,15,2713,94]; + lineof_temp[4343] = [2564,8,2584,11]; + lineof_temp[1559] = [861,25,861,54]; + lineof_temp[4918] = [2901,7,2901,77]; + lineof_temp[4023] = [2425,2,2425,74]; + lineof_temp[1484] = [780,30,810,54]; + lineof_temp[6608] = [3803,24,3803,40]; + lineof_temp[4614] = [2720,4,2724,89]; + lineof_temp[6508] = [3748,12,3755,7]; + lineof_temp[4170] = [2478,42,2478,104]; + lineof_temp[842] = [538,4,554,60]; + lineof_temp[3171] = [1866,2,1915,7]; + lineof_temp[7111] = [4064,18,4077,89]; + lineof_temp[7034] = [4040,19,4040,76]; + lineof_temp[5748] = [3361,24,3361,44]; + lineof_temp[6103] = [3567,16,3567,34]; + lineof_temp[851] = [573,22,573,57]; + lineof_temp[2459] = [1463,36,1463,54]; + lineof_temp[752] = [508,25,508,71]; + lineof_temp[3978] = [2408,6,2409,66]; + lineof_temp[2671] = [1588,26,1588,42]; + lineof_temp[867] = [580,24,580,61]; + lineof_temp[4662] = [2757,8,2758,58]; + lineof_temp[4453] = [2626,12,2627,98]; + lineof_temp[1604] = [891,22,891,67]; + lineof_temp[6933] = [3959,4,3959,36]; + lineof_temp[1738] = [986,16,986,85]; + lineof_temp[2748] = [1613,2,1632,83]; + lineof_temp[7000] = [4027,48,4027,81]; + lineof_temp[1164] = [654,21,673,127]; + lineof_temp[1400] = [775,40,775,89]; + lineof_temp[4576] = [2707,30,2713,94]; + lineof_temp[3544] = [2149,28,2149,74]; + lineof_temp[5989] = [3476,4,3504,53]; + lineof_temp[3235] = [1943,16,1979,77]; + lineof_temp[7352] = [4157,2,4168,61]; + lineof_temp[6630] = [3811,30,3813,75]; + lineof_temp[3923] = [2320,2,2364,29]; + lineof_temp[1192] = [697,11,699,69]; + lineof_temp[945] = [629,17,629,50]; + lineof_temp[5814] = [3385,4,3391,79]; + lineof_temp[4398] = [2527,25,2527,49]; + lineof_temp[3563] = [2165,57,2165,126]; + lineof_temp[6809] = [3939,38,3939,80]; + lineof_temp[5567] = [3283,26,3284,78]; + lineof_temp[592] = [408,8,413,11]; + lineof_temp[5166] = [3025,21,3025,48]; + lineof_temp[1766] = [996,35,996,68]; + lineof_temp[308] = [202,7,202,24]; + lineof_temp[7379] = [4186,2,4186,43]; + lineof_temp[7350] = [4157,2,4168,61]; + lineof_temp[2359] = [1371,4,1371,37]; + lineof_temp[762] = [512,47,514,86]; + lineof_temp[4753] = [2809,7,2809,41]; + lineof_temp[4582] = [2702,21,2713,94]; + lineof_temp[6014] = [3522,74,3522,95]; + lineof_temp[3807] = [2310,44,2312,48]; + lineof_temp[738] = [486,12,493,86]; + lineof_temp[7291] = [4148,59,4148,89]; + lineof_temp[6077] = [3561,16,3561,30]; + lineof_temp[6620] = [3808,33,3809,37]; + lineof_temp[6536] = [3767,13,3767,29]; + lineof_temp[4894] = [2880,19,2882,54]; + lineof_temp[4529] = [2672,26,2684,88]; + lineof_temp[6270] = [3646,44,3646,73]; + lineof_temp[3346] = [2060,61,2060,71]; + lineof_temp[2593] = [1535,46,1535,60]; + lineof_temp[2536] = [1502,40,1502,56]; + lineof_temp[1333] = [743,15,744,72]; + lineof_temp[7276] = [4144,4,4145,79]; + lineof_temp[6237] = [3633,37,3633,53]; + lineof_temp[4776] = [2828,16,2828,59]; + lineof_temp[4718] = [2785,22,2785,47]; + lineof_temp[4283] = [2555,20,2557,38]; + lineof_temp[4359] = [2592,14,2595,67]; + lineof_temp[3753] = [2273,33,2274,108]; + lineof_temp[2273] = [1302,10,1302,20]; + lineof_temp[390] = [277,2,278,38]; + lineof_temp[4826] = [2818,2,2840,49]; + lineof_temp[3380] = [2066,17,2071,104]; + lineof_temp[6742] = [3901,78,3915,122]; + lineof_temp[3337] = [2056,46,2056,56]; + lineof_temp[1628] = [893,16,905,85]; + lineof_temp[5418] = [3196,29,3196,58]; + lineof_temp[5394] = [3178,11,3179,37]; + lineof_temp[2898] = [1700,2,1747,102]; + lineof_temp[3795] = [2283,15,2297,64]; + lineof_temp[6606] = [3803,44,3803,77]; + lineof_temp[1421] = [741,10,776,62]; + lineof_temp[5918] = [3464,57,3464,87]; + lineof_temp[899] = [593,33,593,61]; + lineof_temp[1785] = [1008,15,1008,28]; + lineof_temp[6243] = [3635,19,3635,46]; + lineof_temp[1430] = [727,34,776,63]; + lineof_temp[610] = [403,6,414,20]; + lineof_temp[1442] = [789,16,789,110]; + lineof_temp[6773] = [3921,87,3921,115]; + lineof_temp[4652] = [2754,10,2754,51]; + lineof_temp[4252] = [2499,27,2510,28]; + lineof_temp[109] = [81,23,81,24]; + lineof_temp[94] = [71,2,71,7]; + lineof_temp[7143] = [4098,36,4102,87]; + lineof_temp[2776] = [1646,8,1646,16]; + lineof_temp[1534] = [842,15,842,53]; + lineof_temp[3297] = [2025,16,2025,62]; + lineof_temp[5263] = [3088,19,3088,62]; + lineof_temp[3061] = [1852,16,1852,58]; + lineof_temp[2476] = [1469,8,1475,79]; + lineof_temp[7347] = [4168,4,4168,23]; + lineof_temp[4544] = [2686,25,2686,61]; + lineof_temp[1026] = [633,15,633,62]; + lineof_temp[2568] = [1514,35,1514,48]; + lineof_temp[2498] = [1484,12,1485,76]; + lineof_temp[6944] = [3993,4,3993,23]; + lineof_temp[5065] = [2942,14,2971,59]; + lineof_temp[3064] = [1858,2,1858,56]; + lineof_temp[3645] = [2201,18,2201,44]; + lineof_temp[2594] = [1535,46,1535,60]; + lineof_temp[2085] = [1158,9,1191,25]; + lineof_temp[7323] = [4165,4,4167,96]; + lineof_temp[7200] = [4111,7,4111,33]; + lineof_temp[3660] = [2207,24,2207,57]; + lineof_temp[6725] = [3888,73,3890,102]; + lineof_temp[1837] = [1051,2,1052,27]; + lineof_temp[1177] = [692,27,692,73]; + lineof_temp[2957] = [1790,30,1793,88]; + lineof_temp[1106] = [676,17,690,45]; + lineof_temp[4984] = [2940,28,2940,45]; + lineof_temp[2106] = [1207,23,1209,69]; + lineof_temp[1434] = [785,21,785,37]; + lineof_temp[2093] = [1153,4,1191,25]; + lineof_temp[3676] = [2211,10,2211,26]; + lineof_temp[2757] = [1642,20,1642,65]; + lineof_temp[4781] = [2826,12,2826,32]; + lineof_temp[3699] = [2244,14,2245,56]; + lineof_temp[5764] = [3367,4,3367,38]; + lineof_temp[12] = [22,7,22,12]; + lineof_temp[7185] = [4109,18,4109,39]; + lineof_temp[5363] = [3132,15,3136,37]; + lineof_temp[5083] = [2980,32,2980,59]; + lineof_temp[6594] = [3792,18,3794,64]; + lineof_temp[4900] = [2888,42,2888,49]; + lineof_temp[4710] = [2782,25,2782,52]; + lineof_temp[3413] = [2086,17,2088,94]; + lineof_temp[3076] = [1876,26,1876,48]; + lineof_temp[857] = [587,11,587,31]; + lineof_temp[270] = [189,27,189,54]; + lineof_temp[6003] = [3511,4,3511,6]; + lineof_temp[2347] = [1359,4,1359,22]; + lineof_temp[977] = [609,13,609,33]; + lineof_temp[534] = [359,9,369,41]; + lineof_temp[2102] = [1202,15,1202,37]; + lineof_temp[1706] = [971,17,972,79]; + lineof_temp[3471] = [2121,46,2121,100]; + lineof_temp[1074] = [684,29,684,59]; + lineof_temp[82] = [65,34,65,72]; + lineof_temp[1980] = [1131,42,1131,67]; + lineof_temp[2444] = [1311,31,1443,31]; + lineof_temp[2415] = [1423,4,1423,27]; + lineof_temp[6895] = [3982,46,3982,79]; + lineof_temp[5029] = [2964,34,2964,91]; + lineof_temp[4078] = [2448,24,2448,57]; + lineof_temp[2477] = [1469,8,1475,79]; + lineof_temp[1482] = [807,4,807,5]; + lineof_temp[950] = [628,17,628,37]; + lineof_temp[3228] = [1950,26,1979,77]; + lineof_temp[6329] = [3659,4,3665,7]; + lineof_temp[4179] = [2480,33,2480,90]; + lineof_temp[7249] = [4134,20,4134,57]; + lineof_temp[5493] = [3239,29,3239,87]; + lineof_temp[4580] = [2703,25,2713,94]; + lineof_temp[185] = [130,7,130,12]; + lineof_temp[5185] = [3025,2,3032,79]; + lineof_temp[1242] = [720,12,720,76]; + lineof_temp[5961] = [3484,15,3484,68]; + lineof_temp[2341] = [1353,4,1353,22]; + lineof_temp[1677] = [911,2,938,42]; + lineof_temp[4888] = [2878,12,2878,75]; + lineof_temp[1728] = [974,8,974,38]; + lineof_temp[4741] = [2807,8,2808,57]; + lineof_temp[4609] = [2721,8,2724,89]; + lineof_temp[1059] = [690,22,690,45]; + lineof_temp[6547] = [3775,22,3777,80]; + lineof_temp[310] = [205,43,205,73]; + lineof_temp[4556] = [2659,2,2688,78]; + lineof_temp[108] = [80,2,80,19]; + lineof_temp[7318] = [4167,4,4167,96]; + lineof_temp[877] = [583,8,586,57]; + lineof_temp[5331] = [3102,55,3111,70]; + lineof_temp[4246] = [2508,24,2508,28]; + lineof_temp[6358] = [3682,18,3682,70]; + lineof_temp[4830] = [2818,2,2840,49]; + lineof_temp[2474] = [1474,18,1475,79]; + lineof_temp[294] = [200,30,200,57]; + lineof_temp[6416] = [3719,51,3719,71]; + lineof_temp[6671] = [3827,7,3827,30]; + lineof_temp[5303] = [3106,25,3106,51]; + lineof_temp[7278] = [4144,4,4145,79]; + lineof_temp[5920] = [3464,24,3465,20]; + lineof_temp[6045] = [3539,6,3539,15]; + lineof_temp[3642] = [2173,18,2200,86]; + lineof_temp[605] = [405,6,414,20]; + lineof_temp[7202] = [4113,23,4113,39]; + lineof_temp[1209] = [722,9,722,28]; + lineof_temp[4025] = [2423,2,2425,74]; + lineof_temp[3543] = [2145,18,2145,43]; + lineof_temp[6992] = [4026,29,4026,62]; + lineof_temp[6831] = [3955,29,3955,62]; + lineof_temp[6269] = [3645,43,3645,60]; + lineof_temp[2851] = [1712,32,1712,51]; + lineof_temp[1313] = [734,11,735,51]; + lineof_temp[5585] = [3289,27,3289,54]; + lineof_temp[5481] = [3231,23,3233,74]; + lineof_temp[3617] = [2190,49,2190,84]; + lineof_temp[1667] = [914,8,936,86]; + lineof_temp[2425] = [1430,25,1430,31]; + lineof_temp[3777] = [2291,34,2292,109]; + lineof_temp[7127] = [4083,35,4083,56]; + lineof_temp[2310] = [1321,4,1321,30]; + lineof_temp[4780] = [2827,12,2828,59]; + lineof_temp[6107] = [3570,35,3570,53]; + lineof_temp[5648] = [3325,54,3325,81]; + lineof_temp[4458] = [2636,18,2636,33]; + lineof_temp[3711] = [2247,18,2247,65]; + lineof_temp[6728] = [3904,83,3905,118]; + lineof_temp[6261] = [3639,17,3639,33]; + lineof_temp[1085] = [684,26,689,84]; + lineof_temp[33] = [38,23,38,47]; + lineof_temp[6524] = [3764,14,3764,50]; + lineof_temp[5551] = [3274,25,3275,46]; + lineof_temp[1579] = [877,17,877,32]; + lineof_temp[933] = [630,11,632,66]; + lineof_temp[2669] = [1587,34,1587,55]; + lineof_temp[5258] = [3083,25,3083,51]; + lineof_temp[1312] = [734,11,735,51]; + lineof_temp[829] = [549,6,552,46]; + lineof_temp[5164] = [3011,2,3018,41]; + lineof_temp[4713] = [2782,4,2782,21]; + lineof_temp[2251] = [1290,37,1290,86]; + lineof_temp[1090] = [681,24,689,84]; + lineof_temp[5014] = [2958,26,2958,64]; + lineof_temp[3519] = [2132,15,2132,59]; + lineof_temp[3482] = [2122,48,2122,102]; + lineof_temp[3012] = [1816,65,1821,62]; + lineof_temp[987] = [607,42,607,64]; + lineof_temp[3145] = [1892,29,1914,95]; + lineof_temp[6245] = [3635,19,3635,46]; + lineof_temp[2796] = [1653,32,1653,65]; + lineof_temp[364] = [248,14,248,28]; + lineof_temp[5207] = [3050,28,3051,55]; + lineof_temp[5153] = [3016,19,3018,41]; + lineof_temp[4147] = [2472,24,2472,67]; + lineof_temp[6657] = [3819,10,3821,56]; + lineof_temp[5657] = [3327,4,3328,93]; + lineof_temp[1518] = [828,2,829,49]; + lineof_temp[2907] = [1759,32,1759,70]; + lineof_temp[2271] = [1276,2,1294,64]; + lineof_temp[3169] = [1866,18,1866,56]; + lineof_temp[3516] = [2096,2,2125,65]; + lineof_temp[2413] = [1421,4,1421,28]; + lineof_temp[7065] = [4048,18,4054,66]; + lineof_temp[7021] = [4031,4,4031,54]; + lineof_temp[3707] = [2237,7,2245,56]; + lineof_temp[416] = [314,9,314,34]; + lineof_temp[142] = [112,36,112,59]; + lineof_temp[7177] = [4078,4,4078,32]; + lineof_temp[3111] = [1895,36,1895,67]; + lineof_temp[2078] = [1181,22,1181,68]; + lineof_temp[1200] = [637,4,700,7]; + lineof_temp[550] = [380,7,380,20]; + lineof_temp[6278] = [3647,27,3648,130]; + lineof_temp[3866] = [2336,18,2337,54]; + lineof_temp[1526] = [836,6,836,60]; + lineof_temp[4593] = [2697,10,2713,94]; + lineof_temp[4231] = [2500,4,2500,23]; + lineof_temp[787] = [480,59,528,7]; + lineof_temp[7104] = [4070,28,4077,89]; + lineof_temp[6579] = [3781,4,3781,41]; + lineof_temp[5076] = [2939,2,2971,59]; + lineof_temp[2756] = [1642,20,1642,65]; + lineof_temp[1539] = [848,42,848,66]; + lineof_temp[6987] = [4021,49,4021,82]; + lineof_temp[6195] = [3614,33,3614,51]; + lineof_temp[930] = [630,23,630,69]; + lineof_temp[6812] = [3940,17,3940,52]; + lineof_temp[6727] = [3886,72,3890,104]; + lineof_temp[5765] = [3367,4,3367,38]; + lineof_temp[6470] = [3738,24,3738,62]; + lineof_temp[3623] = [2187,42,2200,86]; + lineof_temp[5218] = [3060,31,3060,38]; + lineof_temp[5128] = [2987,2,2995,60]; + lineof_temp[4958] = [2915,22,2930,89]; + lineof_temp[3449] = [2101,22,2109,67]; + lineof_temp[5895] = [3444,8,3444,49]; + lineof_temp[2242] = [1283,17,1283,86]; + lineof_temp[1646] = [911,15,911,53]; + lineof_temp[7120] = [4059,4,4077,89]; + lineof_temp[4509] = [2673,42,2674,77]; + lineof_temp[1546] = [842,2,848,66]; + lineof_temp[3439] = [2109,41,2109,67]; + lineof_temp[5791] = [3377,37,3377,66]; + lineof_temp[4583] = [2702,21,2713,94]; + lineof_temp[2954] = [1790,30,1793,88]; + lineof_temp[6320] = [3664,75,3664,102]; + lineof_temp[5016] = [2958,26,2958,64]; + lineof_temp[3210] = [1961,39,1962,74]; + lineof_temp[3156] = [1879,11,1914,95]; + lineof_temp[5472] = [3222,23,3222,40]; + lineof_temp[1388] = [774,44,774,99]; + lineof_temp[4768] = [2823,24,2823,70]; + lineof_temp[1984] = [1123,2,1131,67]; + lineof_temp[563] = [391,9,391,46]; + lineof_temp[4517] = [2683,42,2684,88]; + lineof_temp[2790] = [1642,4,1652,7]; + lineof_temp[1349] = [757,32,758,88]; + lineof_temp[3090] = [1878,18,1878,39]; + lineof_temp[4847] = [2855,19,2862,89]; + lineof_temp[2815] = [1665,13,1671,69]; + lineof_temp[2722] = [1449,2,1606,39]; + lineof_temp[1227] = [716,17,716,26]; + lineof_temp[1119] = [660,26,660,57]; + lineof_temp[6369] = [3677,4,3683,7]; + lineof_temp[7059] = [4050,19,4052,65]; + lineof_temp[6044] = [3510,39,3532,68]; + lineof_temp[5406] = [3176,2,3182,46]; + lineof_temp[2196] = [1257,15,1257,53]; + lineof_temp[1338] = [753,33,753,60]; + lineof_temp[3989] = [2410,36,2410,103]; + lineof_temp[21] = [34,20,34,25]; + lineof_temp[4073] = [2433,2,2444,61]; + lineof_temp[2172] = [1244,13,1247,73]; + lineof_temp[3] = [20,8,20,30]; + lineof_temp[3629] = [2182,33,2200,86]; + lineof_temp[2384] = [1392,4,1392,29]; + lineof_temp[2818] = [1672,13,1672,17]; + lineof_temp[2562] = [1521,40,1521,53]; + lineof_temp[1550] = [857,15,857,72]; + lineof_temp[1215] = [709,37,709,46]; + lineof_temp[7282] = [4146,37,4146,70]; + lineof_temp[7169] = [4080,8,4102,87]; + lineof_temp[5815] = [3385,4,3391,79]; + lineof_temp[756] = [503,17,508,72]; + lineof_temp[622] = [418,35,418,70]; + lineof_temp[305] = [203,7,204,36]; + lineof_temp[1554] = [859,25,859,58]; + lineof_temp[1396] = [776,40,776,57]; + lineof_temp[7183] = [4108,35,4108,56]; + lineof_temp[7246] = [4131,12,4131,37]; + lineof_temp[3890] = [2358,20,2358,48]; + lineof_temp[4163] = [2476,32,2476,93]; + lineof_temp[3379] = [2068,22,2071,104]; + lineof_temp[2281] = [1305,11,1306,72]; + lineof_temp[246] = [180,27,180,54]; + lineof_temp[4338] = [2575,14,2583,77]; + lineof_temp[160] = [116,16,116,33]; + lineof_temp[4270] = [2544,14,2544,72]; + lineof_temp[3565] = [2165,45,2167,180]; + lineof_temp[2403] = [1412,4,1412,22]; + lineof_temp[1077] = [686,50,686,103]; + lineof_temp[5543] = [3268,20,3271,21]; + lineof_temp[5469] = [3218,6,3221,28]; + lineof_temp[2186] = [1249,8,1251,91]; + lineof_temp[1529] = [835,2,836,60]; + lineof_temp[1238] = [720,66,720,76]; + lineof_temp[1206] = [704,22,704,58]; + lineof_temp[3804] = [2308,33,2308,92]; + lineof_temp[2807] = [1669,21,1670,89]; + lineof_temp[2553] = [1520,66,1520,100]; + lineof_temp[2366] = [1376,4,1376,41]; + lineof_temp[5963] = [3489,14,3489,38]; + lineof_temp[3930] = [2376,12,2376,22]; + lineof_temp[1288] = [572,2,722,28]; + lineof_temp[7047] = [4046,24,4046,60]; + lineof_temp[5009] = [2954,38,2954,107]; + lineof_temp[4731] = [2785,4,2787,31]; + lineof_temp[1827] = [1008,9,1025,104]; + lineof_temp[5876] = [3428,10,3428,35]; + lineof_temp[4919] = [2900,7,2900,20]; + lineof_temp[913] = [599,14,599,85]; + lineof_temp[4247] = [2508,4,2508,20]; + lineof_temp[4500] = [2667,30,2667,56]; + lineof_temp[3114] = [1898,50,1898,77]; + lineof_temp[188] = [129,7,129,44]; + lineof_temp[5710] = [3349,22,3349,48]; + lineof_temp[4375] = [2603,49,2603,77]; + lineof_temp[2997] = [1825,55,1825,86]; + lineof_temp[7012] = [4012,18,4028,65]; + lineof_temp[6153] = [3599,49,3599,74]; + lineof_temp[3254] = [1994,17,1997,45]; + lineof_temp[80] = [65,50,65,71]; + lineof_temp[6250] = [3632,10,3635,46]; + lineof_temp[1392] = [772,38,774,101]; + lineof_temp[6460] = [3729,10,3735,75]; + lineof_temp[1569] = [869,20,869,53]; + lineof_temp[4941] = [2922,30,2922,49]; + lineof_temp[86] = [64,12,64,13]; + lineof_temp[1067] = [679,59,679,91]; + lineof_temp[238] = [136,7,136,21]; + lineof_temp[6684] = [3834,30,3834,57]; + lineof_temp[1760] = [1003,16,1003,86]; + lineof_temp[263] = [187,6,187,33]; + lineof_temp[5853] = [3411,8,3411,15]; + lineof_temp[2352] = [1362,4,1362,39]; + lineof_temp[4661] = [2757,8,2758,58]; + lineof_temp[6152] = [3598,49,3598,67]; + lineof_temp[2052] = [1175,16,1177,53]; + lineof_temp[5458] = [3189,2,3210,28]; + lineof_temp[891] = [592,10,592,68]; + lineof_temp[4872] = [2864,9,2868,35]; + lineof_temp[936] = [623,24,623,70]; + lineof_temp[4370] = [2597,14,2599,95]; + lineof_temp[3119] = [1910,51,1911,101]; + lineof_temp[2346] = [1356,4,1356,28]; + lineof_temp[6637] = [3807,21,3813,75]; + lineof_temp[5591] = [3291,26,3291,36]; + lineof_temp[1763] = [1003,16,1003,86]; + lineof_temp[6587] = [3814,17,3814,50]; + lineof_temp[6074] = [3557,27,3557,55]; + lineof_temp[6079] = [3562,16,3562,29]; + lineof_temp[2377] = [1388,4,1388,26]; + lineof_temp[1689] = [944,6,950,46]; + lineof_temp[2283] = [1305,11,1306,72]; + lineof_temp[1859] = [1075,91,1075,102]; + lineof_temp[99] = [78,19,78,25]; + lineof_temp[7155] = [4091,23,4102,87]; + lineof_temp[5135] = [3002,6,3005,42]; + lineof_temp[1610] = [898,30,899,77]; + lineof_temp[2886] = [1724,37,1747,102]; + lineof_temp[7074] = [4044,4,4057,19]; + lineof_temp[2729] = [1624,19,1624,49]; + lineof_temp[2537] = [1512,66,1512,100]; + lineof_temp[91] = [70,10,70,16]; + lineof_temp[5241] = [3072,42,3072,50]; + lineof_temp[4127] = [2469,25,2469,74]; + lineof_temp[47] = [50,19,50,32]; + lineof_temp[4522] = [2679,36,2684,88]; + lineof_temp[3253] = [1994,17,1997,45]; + lineof_temp[3192] = [1940,84,1940,105]; + lineof_temp[2411] = [1419,4,1419,18]; + lineof_temp[6882] = [3972,16,3973,28]; + lineof_temp[5843] = [3415,17,3415,44]; + lineof_temp[3327] = [2050,46,2050,56]; + lineof_temp[2149] = [1199,6,1223,52]; + lineof_temp[455] = [328,4,331,32]; + lineof_temp[3095] = [1881,15,1882,23]; + lineof_temp[6680] = [3830,10,3832,56]; + lineof_temp[4032] = [2422,2,2425,74]; + lineof_temp[71] = [62,12,63,41]; + lineof_temp[6862] = [3964,27,3964,60]; + lineof_temp[2877] = [1735,51,1747,102]; + lineof_temp[1166] = [653,21,653,35]; + lineof_temp[1759] = [1003,73,1003,86]; + lineof_temp[4633] = [2735,4,2735,15]; + lineof_temp[5322] = [3107,10,3111,70]; + lineof_temp[4708] = [2769,2,2774,26]; + lineof_temp[3353] = [2041,31,2061,69]; + lineof_temp[2007] = [1151,29,1151,61]; + lineof_temp[6438] = [3722,14,3727,75]; + lineof_temp[4578] = [2703,25,2713,94]; + lineof_temp[4325] = [2575,37,2575,52]; + lineof_temp[531] = [359,9,369,41]; + lineof_temp[4797] = [2837,43,2837,72]; + lineof_temp[4566] = [2702,42,2702,63]; + lineof_temp[4282] = [2556,24,2557,38]; + lineof_temp[6665] = [3824,10,3824,40]; + lineof_temp[6808] = [3958,18,3958,51]; + lineof_temp[6453] = [3733,48,3735,72]; + lineof_temp[5513] = [3223,10,3240,69]; + lineof_temp[154] = [108,26,108,31]; + lineof_temp[6344] = [3671,10,3674,56]; + lineof_temp[5557] = [3278,25,3280,52]; + lineof_temp[4034] = [2421,2,2425,74]; + lineof_temp[4144] = [2471,25,2471,74]; + lineof_temp[915] = [610,14,610,40]; + lineof_temp[5003] = [2950,29,2950,60]; + lineof_temp[3152] = [1884,19,1914,95]; + lineof_temp[3386] = [2073,29,2073,75]; + lineof_temp[4564] = [2700,31,2701,31]; + lineof_temp[4020] = [2424,13,2424,34]; + lineof_temp[2405] = [1414,4,1414,21]; + lineof_temp[2084] = [1162,9,1183,60]; + lineof_temp[5832] = [3406,8,3410,90]; + lineof_temp[960] = [614,17,614,37]; + lineof_temp[659] = [438,23,438,89]; + lineof_temp[193] = [135,5,135,24]; + lineof_temp[7257] = [4136,16,4136,41]; + lineof_temp[5793] = [3347,26,3377,66]; + lineof_temp[1750] = [999,28,999,74]; + lineof_temp[6166] = [3594,8,3600,83]; + lineof_temp[5711] = [3350,8,3350,30]; + lineof_temp[4473] = [2638,14,2644,33]; + lineof_temp[1409] = [756,25,776,59]; + lineof_temp[6790] = [3932,31,3932,64]; + lineof_temp[1231] = [715,20,716,26]; + lineof_temp[2840] = [1683,11,1693,82]; + lineof_temp[5831] = [3406,8,3410,90]; + lineof_temp[2938] = [1757,4,1770,47]; + lineof_temp[822] = [546,28,546,43]; + lineof_temp[6173] = [3603,29,3603,46]; + lineof_temp[1595] = [869,2,880,84]; + lineof_temp[5609] = [3300,4,3300,60]; + lineof_temp[3741] = [2262,16,2262,67]; + lineof_temp[904] = [597,14,597,45]; + lineof_temp[5778] = [3370,4,3370,36]; + lineof_temp[2662] = [1582,30,1586,78]; + lineof_temp[1104] = [676,17,690,45]; + lineof_temp[612] = [403,6,414,20]; + lineof_temp[2275] = [1302,10,1302,20]; + lineof_temp[1401] = [775,40,775,89]; + lineof_temp[5619] = [3303,5,3303,12]; + lineof_temp[107] = [80,23,80,43]; + lineof_temp[1719] = [978,17,979,80]; + lineof_temp[2710] = [1605,9,1606,38]; + lineof_temp[450] = [330,9,330,44]; + lineof_temp[4969] = [2931,22,2931,57]; + lineof_temp[3425] = [2029,4,2089,37]; + lineof_temp[1892] = [1088,32,1090,63]; + lineof_temp[7377] = [4181,2,4181,57]; + lineof_temp[6751] = [3879,59,3915,122]; + lineof_temp[4223] = [2493,4,2493,22]; + lineof_temp[2431] = [1434,4,1434,17]; + lineof_temp[4219] = [2492,72,2492,106]; + lineof_temp[6386] = [3688,10,3688,28]; + lineof_temp[5790] = [3377,37,3377,66]; + lineof_temp[4222] = [2493,26,2493,68]; + lineof_temp[2706] = [1597,4,1597,32]; + lineof_temp[1398] = [775,53,775,89]; + lineof_temp[6902] = [3987,29,3987,62]; + lineof_temp[4310] = [2564,30,2564,46]; + lineof_temp[3054] = [1837,2,1844,44]; + lineof_temp[4162] = [2476,32,2476,93]; + lineof_temp[6277] = [3647,27,3648,130]; + lineof_temp[5112] = [2995,26,2995,60]; + lineof_temp[952] = [626,12,626,41]; + lineof_temp[6822] = [3951,59,3951,86]; + lineof_temp[5777] = [3371,4,3372,21]; + lineof_temp[4756] = [2806,2,2811,71]; + lineof_temp[2452] = [1454,16,1454,32]; + lineof_temp[6940] = [3997,35,3997,50]; + lineof_temp[5662] = [3331,16,3331,66]; + lineof_temp[1578] = [877,17,877,32]; + lineof_temp[6422] = [3714,14,3719,75]; + lineof_temp[4976] = [2895,4,2895,20]; + lineof_temp[5193] = [3044,28,3045,69]; + lineof_temp[2471] = [1474,32,1474,50]; + lineof_temp[2123] = [1222,25,1222,78]; + lineof_temp[118] = [89,4,89,17]; + lineof_temp[3266] = [2007,10,2007,20]; + lineof_temp[4466] = [2638,35,2638,69]; + lineof_temp[2011] = [1153,27,1153,42]; + lineof_temp[1729] = [966,6,979,80]; + lineof_temp[4746] = [2811,4,2811,71]; + lineof_temp[4146] = [2472,24,2472,67]; + lineof_temp[4138] = [2471,57,2471,63]; + lineof_temp[7015] = [4009,7,4029,52]; + lineof_temp[5675] = [3333,32,3333,57]; + lineof_temp[69] = [63,12,63,41]; + lineof_temp[3125] = [1914,51,1914,95]; + lineof_temp[101] = [79,21,79,45]; + lineof_temp[718] = [480,22,480,55]; + lineof_temp[2108] = [1209,73,1209,85]; + lineof_temp[5361] = [3134,24,3134,33]; + lineof_temp[3441] = [2109,41,2109,67]; + lineof_temp[3440] = [2109,41,2109,67]; + lineof_temp[3225] = [1957,34,1969,85]; + lineof_temp[991] = [606,24,607,66]; + lineof_temp[951] = [627,12,629,50]; + lineof_temp[7022] = [4031,4,4031,54]; + lineof_temp[5381] = [3172,9,3172,28]; + lineof_temp[2572] = [1527,43,1528,101]; + lineof_temp[3806] = [2311,36,2311,90]; + lineof_temp[1802] = [1014,42,1014,63]; + lineof_temp[3356] = [2037,26,2061,69]; + lineof_temp[3214] = [1967,44,1968,79]; + lineof_temp[6892] = [3981,47,3981,80]; + lineof_temp[7217] = [4121,12,4121,45]; + lineof_temp[3502] = [2112,23,2125,65]; + lineof_temp[7144] = [4098,36,4102,87]; + lineof_temp[4136] = [2470,25,2470,85]; + lineof_temp[5116] = [2992,12,2995,60]; + lineof_temp[1657] = [929,16,930,67]; + lineof_temp[1458] = [803,30,805,86]; + lineof_temp[3363] = [2031,12,2061,69]; + lineof_temp[2979] = [1804,60,1804,129]; + lineof_temp[6941] = [3997,9,3997,50]; + lineof_temp[6853] = [3935,7,3958,52]; + lineof_temp[436] = [312,6,312,32]; + lineof_temp[3096] = [1883,24,1883,62]; + lineof_temp[925] = [620,50,620,84]; + lineof_temp[632] = [402,4,418,72]; + lineof_temp[2314] = [1325,4,1325,44]; + lineof_temp[6445] = [3721,10,3727,75]; + lineof_temp[3055] = [1837,2,1844,44]; + lineof_temp[1776] = [1005,22,1005,68]; + lineof_temp[7077] = [4059,16,4059,32]; + lineof_temp[4818] = [2840,17,2840,49]; + lineof_temp[5293] = [3096,6,3096,37]; + lineof_temp[6611] = [3804,45,3804,78]; + lineof_temp[397] = [299,34,300,91]; + lineof_temp[6439] = [3722,14,3727,75]; + lineof_temp[3015] = [1821,66,1821,75]; + lineof_temp[5115] = [2992,12,2995,60]; + lineof_temp[352] = [230,2,234,74]; + lineof_temp[3050] = [1844,2,1844,44]; + lineof_temp[1480] = [808,4,810,54]; + lineof_temp[6531] = [3762,10,3762,28]; + lineof_temp[2874] = [1741,56,1747,102]; + lineof_temp[367] = [248,2,248,57]; + lineof_temp[174] = [90,4,90,19]; + lineof_temp[6789] = [3928,10,3928,26]; + lineof_temp[3212] = [1959,48,1962,81]; + lineof_temp[6341] = [3674,14,3674,56]; + lineof_temp[1878] = [1084,92,1084,113]; + lineof_temp[1525] = [836,6,836,60]; + lineof_temp[1404] = [762,30,776,58]; + lineof_temp[6142] = [3580,10,3583,35]; + lineof_temp[4430] = [2526,7,2538,88]; + lineof_temp[4241] = [2505,4,2505,25]; + lineof_temp[5315] = [3110,18,3110,52]; + lineof_temp[1939] = [1062,13,1107,65]; + lineof_temp[6545] = [3777,52,3777,77]; + lineof_temp[5059] = [2947,25,2970,94]; + lineof_temp[1346] = [758,32,758,88]; + lineof_temp[4798] = [2837,77,2837,88]; + lineof_temp[2274] = [1302,10,1302,20]; + lineof_temp[4533] = [2671,22,2684,88]; + lineof_temp[2360] = [1370,4,1370,48]; + lineof_temp[119] = [94,28,94,33]; + lineof_temp[6221] = [3624,27,3624,64]; + lineof_temp[1006] = [597,11,632,66]; + lineof_temp[6285] = [3645,19,3648,130]; + lineof_temp[2587] = [1534,44,1534,57]; + lineof_temp[5594] = [3289,8,3291,68]; + lineof_temp[5419] = [3196,29,3196,58]; + lineof_temp[7010] = [4012,18,4028,65]; + lineof_temp[4840] = [2859,32,2860,52]; + lineof_temp[1050] = [676,41,676,97]; + lineof_temp[6467] = [3737,28,3737,47]; + lineof_temp[5160] = [3011,2,3018,41]; + lineof_temp[1250] = [718,10,721,30]; + lineof_temp[148] = [115,36,115,45]; + lineof_temp[1572] = [871,8,871,33]; + lineof_temp[890] = [591,24,591,107]; + lineof_temp[1994] = [1138,2,1140,17]; + lineof_temp[788] = [480,4,528,7]; + lineof_temp[6034] = [3526,14,3532,68]; + lineof_temp[5229] = [3042,15,3061,36]; + lineof_temp[5024] = [2963,34,2963,89]; + lineof_temp[5969] = [3499,14,3499,40]; + lineof_temp[5283] = [3082,4,3088,62]; + lineof_temp[413] = [311,6,311,58]; + lineof_temp[4397] = [2527,25,2527,49]; + lineof_temp[2002] = [1148,16,1148,85]; + lineof_temp[4620] = [2718,36,2727,77]; + lineof_temp[1911] = [1098,25,1098,71]; + lineof_temp[281] = [194,7,195,36]; + lineof_temp[5311] = [3109,58,3109,66]; + lineof_temp[7008] = [4014,21,4028,64]; + lineof_temp[5456] = [3189,2,3210,28]; + lineof_temp[3995] = [2410,7,2411,98]; + lineof_temp[2853] = [1716,86,1716,108]; + lineof_temp[2082] = [1181,10,1183,59]; + lineof_temp[1336] = [748,20,748,71]; + lineof_temp[1086] = [683,26,683,45]; + lineof_temp[183] = [127,12,127,22]; + lineof_temp[84] = [65,13,65,72]; + lineof_temp[4046] = [2428,2,2430,72]; + lineof_temp[7262] = [4134,7,4137,49]; + lineof_temp[6100] = [3568,16,3568,74]; + lineof_temp[5046] = [2970,42,2970,80]; + lineof_temp[7125] = [4081,24,4082,24]; + lineof_temp[6577] = [3783,9,3784,70]; + lineof_temp[4186] = [2482,25,2482,52]; + lineof_temp[5421] = [3198,29,3198,67]; + lineof_temp[4485] = [2646,14,2652,33]; + lineof_temp[5404] = [3181,4,3182,46]; + lineof_temp[3661] = [2207,24,2207,57]; + lineof_temp[2663] = [1582,30,1586,78]; + lineof_temp[6775] = [3919,6,3921,120]; + lineof_temp[4527] = [2672,26,2684,88]; + lineof_temp[161] = [100,13,116,43]; + lineof_temp[5084] = [2981,18,2981,40]; + lineof_temp[525] = [361,8,361,24]; + lineof_temp[2758] = [1644,19,1644,63]; + lineof_temp[1712] = [968,8,973,38]; + lineof_temp[4953] = [2928,36,2928,105]; + lineof_temp[3272] = [2011,29,2011,62]; + lineof_temp[2880] = [1728,47,1747,102]; + lineof_temp[4704] = [2770,2,2774,26]; + lineof_temp[935] = [623,72,623,93]; + lineof_temp[4592] = [2697,10,2713,94]; + lineof_temp[3675] = [2212,10,2218,93]; + lineof_temp[2491] = [1478,14,1480,63]; + lineof_temp[6756] = [3860,49,3915,122]; + lineof_temp[2666] = [1574,19,1586,78]; + lineof_temp[4091] = [2450,4,2453,78]; + lineof_temp[4766] = [2823,72,2823,93]; + lineof_temp[2517] = [1501,29,1501,45]; + lineof_temp[542] = [355,2,370,22]; + lineof_temp[6143] = [3579,6,3583,35]; + lineof_temp[5800] = [3388,29,3388,46]; + lineof_temp[5411] = [3168,2,3182,46]; + lineof_temp[2563] = [1521,40,1521,53]; + lineof_temp[676] = [445,2,448,64]; + lineof_temp[515] = [363,11,363,24]; + lineof_temp[7041] = [4033,35,4042,7]; + lineof_temp[3765] = [2267,19,2280,79]; + lineof_temp[2821] = [1662,7,1672,24]; + lineof_temp[2867] = [1745,61,1746,96]; + lineof_temp[1755] = [999,16,1001,93]; + lineof_temp[6005] = [3515,22,3515,55]; + lineof_temp[5133] = [3004,37,3004,60]; + lineof_temp[2544] = [1509,42,1512,103]; + lineof_temp[2041] = [1190,10,1191,24]; + lineof_temp[6919] = [3991,31,3991,64]; + lineof_temp[2231] = [1257,2,1271,95]; + lineof_temp[6216] = [3622,30,3622,63]; + lineof_temp[6621] = [3810,47,3810,65]; + lineof_temp[5579] = [3266,6,3286,37]; + lineof_temp[2504] = [1493,29,1498,96]; + lineof_temp[6305] = [3655,10,3656,100]; + lineof_temp[4433] = [2526,7,2538,88]; + lineof_temp[1387] = [772,39,772,103]; + lineof_temp[5721] = [3353,39,3353,47]; + lineof_temp[3278] = [2016,118,2016,125]; + lineof_temp[2478] = [1476,12,1476,38]; + lineof_temp[1354] = [759,34,759,83]; + lineof_temp[5254] = [3068,39,3073,45]; + lineof_temp[402] = [296,4,300,94]; + lineof_temp[4448] = [2627,74,2627,98]; + lineof_temp[5783] = [3374,4,3375,25]; + lineof_temp[4816] = [2840,17,2840,49]; + lineof_temp[181] = [126,12,126,22]; + lineof_temp[5450] = [3202,21,3202,28]; + lineof_temp[6092] = [3566,16,3566,74]; + lineof_temp[4081] = [2450,17,2450,61]; + lineof_temp[3824] = [2263,9,2312,63]; + lineof_temp[1971] = [1129,17,1129,64]; + lineof_temp[6291] = [3638,4,3649,7]; + lineof_temp[2302] = [1313,4,1313,28]; + lineof_temp[5795] = [3383,10,3383,71]; + lineof_temp[5267] = [3086,42,3086,67]; + lineof_temp[5208] = [3061,29,3061,36]; + lineof_temp[4374] = [2603,49,2603,77]; + lineof_temp[506] = [355,15,355,55]; + lineof_temp[7251] = [4135,14,4135,37]; + lineof_temp[2527] = [1563,34,1564,123]; + lineof_temp[2369] = [1381,4,1381,25]; + lineof_temp[6496] = [3748,33,3748,53]; + lineof_temp[5602] = [3292,8,3292,12]; + lineof_temp[2857] = [1720,45,1723,42]; + lineof_temp[1692] = [943,2,950,47]; + lineof_temp[1469] = [798,4,806,46]; + lineof_temp[343] = [233,62,233,92]; + lineof_temp[5495] = [3239,29,3239,87]; + lineof_temp[2216] = [1260,8,1267,86]; + lineof_temp[5999] = [3512,4,3513,70]; + lineof_temp[5465] = [3220,8,3220,68]; + lineof_temp[1] = [19,8,19,30]; + lineof_temp[1191] = [697,11,699,69]; + lineof_temp[5572] = [3285,26,3285,30]; + lineof_temp[5156] = [3012,6,3018,41]; + lineof_temp[4385] = [2605,14,2607,63]; + lineof_temp[3348] = [2061,59,2061,69]; + lineof_temp[1726] = [975,8,979,80]; + lineof_temp[1133] = [671,28,671,36]; + lineof_temp[5224] = [3050,24,3061,36]; + lineof_temp[1588] = [875,13,878,75]; + lineof_temp[475] = [341,36,341,62]; + lineof_temp[431] = [326,35,326,60]; + lineof_temp[4443] = [2624,13,2624,36]; + lineof_temp[3927] = [2375,8,2375,17]; + lineof_temp[6286] = [3645,19,3648,130]; + lineof_temp[4721] = [2786,22,2786,48]; + lineof_temp[1101] = [678,22,689,84]; + lineof_temp[5409] = [3168,2,3182,46]; + lineof_temp[3848] = [2326,64,2326,103]; + lineof_temp[489] = [336,4,341,62]; + lineof_temp[6186] = [3612,31,3612,64]; + lineof_temp[520] = [365,11,367,90]; + lineof_temp[216] = [147,30,147,54]; + lineof_temp[2685] = [1589,28,1589,39]; + lineof_temp[6159] = [3598,45,3600,79]; + lineof_temp[5401] = [3181,11,3182,46]; + lineof_temp[4782] = [2830,72,2830,93]; + lineof_temp[2051] = [1175,28,1175,97]; + lineof_temp[3538] = [2141,48,2141,53]; + lineof_temp[1960] = [1126,22,1126,48]; + lineof_temp[6841] = [3957,31,3957,64]; + lineof_temp[6154] = [3599,49,3599,74]; + lineof_temp[6047] = [3547,7,3547,20]; + lineof_temp[3580] = [2150,23,2167,180]; + lineof_temp[879] = [583,8,586,57]; + lineof_temp[2923] = [1770,38,1770,47]; + lineof_temp[477] = [339,4,341,62]; + lineof_temp[544] = [355,2,370,22]; + lineof_temp[2653] = [1584,37,1585,71]; + lineof_temp[4961] = [2914,18,2930,89]; + lineof_temp[3823] = [2281,13,2312,63]; + lineof_temp[189] = [128,2,130,12]; + lineof_temp[5124] = [2988,6,2995,60]; + lineof_temp[1249] = [721,12,721,16]; + lineof_temp[897] = [590,10,592,68]; + lineof_temp[5246] = [3073,10,3073,44]; + lineof_temp[4] = [20,8,20,30]; + lineof_temp[7140] = [4102,41,4102,87]; + lineof_temp[5867] = [3426,22,3426,55]; + lineof_temp[1254] = [712,70,712,79]; + lineof_temp[537] = [357,4,370,22]; + lineof_temp[1757] = [1003,36,1003,69]; + lineof_temp[4076] = [2448,24,2448,57]; + lineof_temp[4557] = [2695,21,2695,46]; + lineof_temp[3123] = [1909,60,1913,94]; + lineof_temp[1425] = [737,4,776,63]; + lineof_temp[4277] = [2548,17,2548,71]; + lineof_temp[737] = [490,15,490,16]; + lineof_temp[6446] = [3720,10,3720,27]; + lineof_temp[4244] = [2507,24,2507,28]; + lineof_temp[1328] = [739,9,740,63]; + lineof_temp[4994] = [2946,23,2946,62]; + lineof_temp[3614] = [2187,45,2187,68]; + lineof_temp[795] = [478,2,528,7]; + lineof_temp[6963] = [4001,7,4007,66]; + lineof_temp[6335] = [3669,30,3669,63]; + lineof_temp[6111] = [3570,13,3570,71]; + lineof_temp[4632] = [2736,4,2738,32]; + lineof_temp[2296] = [1303,4,1303,13]; + lineof_temp[2364] = [1374,4,1374,31]; + lineof_temp[1471] = [796,4,806,46]; + lineof_temp[5639] = [3321,22,3321,51]; + lineof_temp[5119] = [2991,12,2991,30]; + lineof_temp[4511] = [2681,41,2682,76]; + lineof_temp[3472] = [2121,46,2121,100]; + lineof_temp[3326] = [2050,46,2050,56]; + lineof_temp[3933] = [2376,8,2376,61]; + lineof_temp[3280] = [2014,17,2016,125]; + lineof_temp[745] = [498,14,499,70]; + lineof_temp[340] = [229,10,229,37]; + lineof_temp[6639] = [3807,21,3813,75]; + lineof_temp[1598] = [887,15,887,53]; + lineof_temp[4054] = [2437,11,2437,42]; + lineof_temp[4056] = [2440,10,2440,59]; + lineof_temp[2892] = [1713,27,1747,102]; + lineof_temp[447] = [331,9,331,32]; + lineof_temp[4896] = [2884,39,2884,74]; + lineof_temp[3666] = [2213,13,2213,26]; + lineof_temp[5730] = [3354,4,3354,26]; + lineof_temp[3549] = [2154,36,2154,78]; + lineof_temp[1826] = [1016,11,1016,34]; + lineof_temp[5632] = [3312,2,3313,62]; + lineof_temp[3624] = [2186,38,2200,86]; + lineof_temp[1145] = [663,28,663,47]; + lineof_temp[2507] = [1492,30,1498,98]; + lineof_temp[660] = [439,57,439,83]; + lineof_temp[5364] = [3131,16,3136,37]; + lineof_temp[1979] = [1131,42,1131,67]; + lineof_temp[1413] = [750,20,776,60]; + lineof_temp[6130] = [3579,16,3579,46]; + lineof_temp[1372] = [763,34,766,88]; + lineof_temp[6891] = [3981,47,3981,80]; + lineof_temp[1428] = [729,4,729,22]; + lineof_temp[4181] = [2480,4,2480,28]; + lineof_temp[368] = [248,2,248,57]; + lineof_temp[5666] = [3330,4,3331,91]; + lineof_temp[4975] = [2896,4,2931,58]; + lineof_temp[4906] = [2886,26,2888,49]; + lineof_temp[3389] = [2073,17,2075,90]; + lineof_temp[1217] = [709,8,709,33]; + lineof_temp[4829] = [2818,2,2840,49]; + lineof_temp[163] = [117,35,117,40]; + lineof_temp[1615] = [901,30,904,82]; + lineof_temp[1181] = [692,15,694,60]; + lineof_temp[2810] = [1671,21,1671,68]; + lineof_temp[2349] = [1361,4,1361,19]; + lineof_temp[6562] = [3767,4,3778,7]; + lineof_temp[6012] = [3517,12,3519,49]; + lineof_temp[2456] = [1457,23,1459,32]; + lineof_temp[2856] = [1720,45,1723,42]; + lineof_temp[5086] = [2980,14,2981,40]; + lineof_temp[380] = [260,2,260,55]; + lineof_temp[5392] = [3170,4,3175,29]; + lineof_temp[3431] = [2100,34,2100,74]; + lineof_temp[2794] = [1641,4,1641,28]; + lineof_temp[1015] = [575,4,632,66]; + lineof_temp[234] = [141,17,141,36]; + lineof_temp[4551] = [2686,7,2688,77]; + lineof_temp[7345] = [4168,27,4168,61]; + lineof_temp[4413] = [2534,27,2538,88]; + lineof_temp[6951] = [4003,27,4003,60]; + lineof_temp[2398] = [1405,4,1405,31]; + lineof_temp[3717] = [2251,29,2251,64]; + lineof_temp[1280] = [702,4,722,28]; + lineof_temp[3339] = [2056,46,2056,56]; + lineof_temp[4647] = [2747,4,2748,41]; + lineof_temp[4454] = [2630,33,2630,60]; + lineof_temp[6292] = [3637,4,3637,35]; + lineof_temp[6168] = [3593,4,3600,83]; + lineof_temp[1022] = [573,4,632,66]; + lineof_temp[675] = [445,2,448,64]; + lineof_temp[2168] = [1245,12,1247,73]; + lineof_temp[1853] = [1069,26,1069,72]; + lineof_temp[5492] = [3239,29,3239,87]; + lineof_temp[931] = [630,23,630,92]; + lineof_temp[5053] = [2970,29,2970,93]; + lineof_temp[2940] = [1754,2,1770,47]; + lineof_temp[3323] = [2051,46,2053,70]; + lineof_temp[2125] = [1221,34,1223,36]; + lineof_temp[6661] = [3823,29,3823,56]; + lineof_temp[4184] = [2481,33,2481,91]; + lineof_temp[3352] = [2045,36,2061,69]; + lineof_temp[3833] = [2318,32,2318,48]; + lineof_temp[6417] = [3717,48,3719,72]; + lineof_temp[4152] = [2473,24,2473,66]; + lineof_temp[331] = [221,27,221,28]; + lineof_temp[7116] = [4060,8,4077,89]; + lineof_temp[4140] = [2471,57,2471,63]; + lineof_temp[725] = [488,15,489,71]; + lineof_temp[457] = [333,31,333,38]; + lineof_temp[2901] = [1755,10,1755,20]; + lineof_temp[6636] = [3807,21,3813,75]; + lineof_temp[2206] = [1265,17,1267,86]; + lineof_temp[5477] = [3231,35,3231,81]; + lineof_temp[4169] = [2477,4,2477,29]; + lineof_temp[1501] = [821,29,821,48]; + lineof_temp[6683] = [3829,10,3829,26]; + lineof_temp[6013] = [3517,12,3519,49]; + lineof_temp[3582] = [2150,23,2167,180]; + lineof_temp[6537] = [3768,29,3768,46]; + lineof_temp[6332] = [3667,13,3667,29]; + lineof_temp[1780] = [1005,10,1007,106]; + lineof_temp[1001] = [600,11,609,33]; + lineof_temp[1326] = [739,17,739,44]; + lineof_temp[4597] = [2720,23,2720,52]; + lineof_temp[2891] = [1714,27,1747,102]; + lineof_temp[1995] = [1138,2,1140,17]; + lineof_temp[2584] = [1522,35,1522,51]; + lineof_temp[6126] = [3584,7,3584,64]; + lineof_temp[5298] = [3095,2,3096,37]; + lineof_temp[3546] = [2152,40,2152,77]; + lineof_temp[7261] = [4134,7,4137,49]; + lineof_temp[6233] = [3630,30,3630,63]; + lineof_temp[6134] = [3582,49,3582,58]; + lineof_temp[917] = [610,44,610,74]; + lineof_temp[830] = [549,6,552,46]; + lineof_temp[245] = [180,27,180,54]; + lineof_temp[5367] = [3131,16,3136,37]; + lineof_temp[2016] = [1159,31,1159,46]; + lineof_temp[415] = [315,9,315,54]; + lineof_temp[6163] = [3595,12,3600,83]; + lineof_temp[3997] = [2408,2,2413,87]; + lineof_temp[1172] = [651,15,690,45]; + lineof_temp[5685] = [3337,30,3337,53]; + lineof_temp[24] = [35,2,35,15]; + lineof_temp[509] = [358,7,358,58]; + lineof_temp[134] = [107,24,107,41]; + lineof_temp[4542] = [2664,7,2684,88]; + lineof_temp[7072] = [4044,4,4057,19]; + lineof_temp[6702] = [3871,73,3872,107]; + lineof_temp[4156] = [2474,24,2474,65]; + lineof_temp[4281] = [2556,24,2557,38]; + lineof_temp[2699] = [1593,4,1593,22]; + lineof_temp[2483] = [1479,34,1479,51]; + lineof_temp[81] = [65,34,65,72]; + lineof_temp[4537] = [2668,16,2684,88]; + lineof_temp[6345] = [3671,10,3674,56]; + lineof_temp[6739] = [3907,84,3915,122]; + lineof_temp[3920] = [2328,6,2364,29]; + lineof_temp[5165] = [3025,21,3025,48]; + lineof_temp[3553] = [2156,38,2156,63]; + lineof_temp[2427] = [1431,27,1431,35]; + lineof_temp[5901] = [3446,22,3446,55]; + lineof_temp[4907] = [2885,22,2888,49]; + lineof_temp[1948] = [1115,15,1115,50]; + lineof_temp[6213] = [3607,4,3607,23]; + lineof_temp[699] = [460,2,460,78]; + lineof_temp[6489] = [3744,42,3744,59]; + lineof_temp[4403] = [2531,28,2531,42]; + lineof_temp[6379] = [3690,75,3690,105]; + lineof_temp[1683] = [950,16,950,45]; + lineof_temp[217] = [149,35,149,63]; + lineof_temp[5471] = [3222,23,3222,40]; + lineof_temp[3845] = [2327,11,2327,20]; + lineof_temp[2817] = [1672,21,1672,24]; + lineof_temp[5654] = [3328,71,3328,93]; + lineof_temp[2423] = [1429,29,1429,37]; + lineof_temp[5605] = [3265,2,3292,25]; + lineof_temp[4234] = [2502,27,2502,31]; + lineof_temp[6118] = [3557,7,3570,71]; + lineof_temp[5369] = [3130,16,3130,24]; + lineof_temp[2012] = [1153,27,1153,42]; + lineof_temp[1872] = [1077,55,1077,66]; + lineof_temp[4605] = [2722,12,2724,89]; + lineof_temp[1284] = [633,2,722,28]; + lineof_temp[446] = [329,7,329,47]; + lineof_temp[4077] = [2448,24,2448,57]; + lineof_temp[2577] = [1529,40,1529,53]; + lineof_temp[2037] = [1186,10,1188,47]; + lineof_temp[1433] = [785,21,785,37]; + lineof_temp[1093] = [681,24,689,84]; + lineof_temp[6738] = [3907,84,3915,122]; + lineof_temp[6481] = [3737,7,3743,72]; + lineof_temp[5262] = [3088,19,3088,62]; + lineof_temp[2605] = [1542,43,1543,101]; + lineof_temp[250] = [180,4,181,33]; + lineof_temp[5695] = [3340,39,3340,70]; + lineof_temp[4348] = [2589,14,2589,66]; + lineof_temp[1408] = [756,25,776,59]; + lineof_temp[785] = [517,8,527,113]; + lineof_temp[6267] = [3643,19,3643,36]; + lineof_temp[6266] = [3643,40,3643,73]; + lineof_temp[4745] = [2811,24,2811,70]; + lineof_temp[1815] = [1019,14,1021,110]; + lineof_temp[868] = [578,19,582,66]; + lineof_temp[3027] = [1798,43,1827,62]; + lineof_temp[2930] = [1767,26,1767,35]; + lineof_temp[7101] = [4072,37,4073,83]; + lineof_temp[6967] = [4010,9,4010,44]; + lineof_temp[2860] = [1726,45,1726,52]; + lineof_temp[3071] = [1868,10,1868,37]; + lineof_temp[7315] = [4167,56,4167,96]; + lineof_temp[7056] = [4050,31,4050,100]; + lineof_temp[5169] = [3030,27,3030,43]; + lineof_temp[2667] = [1574,19,1586,78]; + lineof_temp[5850] = [3412,8,3415,44]; + lineof_temp[5214] = [3053,29,3054,51]; + lineof_temp[3863] = [2331,14,2331,71]; + lineof_temp[3240] = [1932,2,1979,77]; + lineof_temp[3889] = [2358,20,2358,48]; + lineof_temp[3165] = [1866,48,1866,56]; + lineof_temp[2650] = [1581,94,1581,108]; + lineof_temp[1382] = [768,38,770,102]; + lineof_temp[878] = [583,8,586,57]; + lineof_temp[6171] = [3602,13,3602,29]; + lineof_temp[4590] = [2697,10,2713,94]; + lineof_temp[1987] = [1123,2,1131,67]; + lineof_temp[1290] = [568,2,722,28]; + lineof_temp[1274] = [703,4,722,28]; + lineof_temp[1543] = [843,6,848,66]; + lineof_temp[6938] = [3997,35,3997,50]; + lineof_temp[4027] = [2423,2,2425,74]; + lineof_temp[1528] = [835,2,836,60]; + lineof_temp[853] = [574,19,574,62]; + lineof_temp[6766] = [3833,10,3833,34]; + lineof_temp[7124] = [4081,24,4082,24]; + lineof_temp[3591] = [2143,12,2168,15]; + lineof_temp[2311] = [1324,4,1324,23]; + lineof_temp[2569] = [1528,66,1528,100]; + lineof_temp[1699] = [956,2,958,45]; + lineof_temp[5917] = [3464,57,3464,87]; + lineof_temp[2827] = [1679,19,1679,70]; + lineof_temp[1678] = [911,2,938,42]; + lineof_temp[276] = [188,4,188,21]; + lineof_temp[6202] = [3616,35,3616,53]; + lineof_temp[5736] = [3357,4,3357,53]; + lineof_temp[2295] = [1304,4,1307,57]; + lineof_temp[5324] = [3106,6,3111,70]; + lineof_temp[4603] = [2723,16,2724,89]; + lineof_temp[6370] = [3676,4,3676,33]; + lineof_temp[7036] = [4038,10,4041,77]; + lineof_temp[5673] = [3332,40,3332,72]; + lineof_temp[1893] = [1088,32,1090,63]; + lineof_temp[120] = [94,10,94,24]; + lineof_temp[7201] = [4111,7,4111,33]; + lineof_temp[4259] = [2517,7,2517,45]; + lineof_temp[3583] = [2150,23,2167,180]; + lineof_temp[44] = [42,37,44,28]; + lineof_temp[1144] = [664,28,673,127]; + lineof_temp[1955] = [1115,2,1116,62]; + lineof_temp[6566] = [3782,7,3782,30]; + lineof_temp[1114] = [655,48,655,72]; + lineof_temp[355] = [239,24,240,131]; + lineof_temp[4347] = [2586,26,2586,52]; + lineof_temp[5158] = [3012,6,3018,41]; + lineof_temp[5108] = [2994,29,2994,57]; + lineof_temp[2873] = [1741,56,1747,102]; + lineof_temp[317] = [211,2,211,13]; + lineof_temp[6128] = [3578,17,3578,35]; + lineof_temp[5121] = [2988,6,2995,60]; + lineof_temp[480] = [338,4,341,62]; + lineof_temp[5132] = [3005,37,3005,39]; + lineof_temp[241] = [172,35,172,50]; + lineof_temp[2408] = [1415,4,1415,33]; + lineof_temp[1671] = [938,8,938,42]; + lineof_temp[6779] = [3926,28,3926,61]; + lineof_temp[4185] = [2481,4,2481,29]; + lineof_temp[1563] = [859,4,862,59]; + lineof_temp[2539] = [1511,43,1512,101]; + lineof_temp[982] = [602,14,602,39]; + lineof_temp[1213] = [707,25,707,83]; + lineof_temp[3391] = [2073,17,2075,90]; + lineof_temp[3039] = [1784,16,1831,78]; + lineof_temp[1300] = [732,9,732,16]; + lineof_temp[730] = [491,75,491,96]; + lineof_temp[6140] = [3580,10,3583,35]; + lineof_temp[5952] = [3479,10,3481,96]; + lineof_temp[6441] = [3722,14,3727,75]; + lineof_temp[490] = [335,4,335,28]; + lineof_temp[7087] = [4070,51,4070,72]; + lineof_temp[6602] = [3802,24,3802,55]; + lineof_temp[5823] = [3396,33,3396,59]; + lineof_temp[2788] = [1643,4,1652,7]; + lineof_temp[5623] = [3305,5,3305,9]; + lineof_temp[3980] = [2412,32,2412,99]; + lineof_temp[2847] = [1678,2,1693,82]; + lineof_temp[2315] = [1328,4,1328,23]; + lineof_temp[1653] = [925,14,926,89]; + lineof_temp[3836] = [2319,35,2319,59]; + lineof_temp[2318] = [1329,4,1329,44]; + lineof_temp[4724] = [2787,4,2787,31]; + lineof_temp[3288] = [2011,8,2016,125]; + lineof_temp[6539] = [3769,33,3769,53]; + lineof_temp[2488] = [1479,13,1480,63]; + lineof_temp[6461] = [3729,10,3735,75]; + lineof_temp[5827] = [3395,26,3396,59]; + lineof_temp[5498] = [3235,23,3239,87]; + lineof_temp[4936] = [2923,42,2923,88]; + lineof_temp[4307] = [2541,8,2562,11]; + lineof_temp[6523] = [3763,32,3763,51]; + lineof_temp[5437] = [3204,20,3205,41]; + lineof_temp[1739] = [986,4,988,51]; + lineof_temp[264] = [187,6,187,33]; + lineof_temp[7040] = [4037,10,4037,31]; + lineof_temp[5967] = [3493,15,3493,42]; + lineof_temp[5779] = [3374,59,3374,89]; + lineof_temp[1919] = [1106,89,1106,100]; + lineof_temp[1027] = [635,43,635,65]; + lineof_temp[434] = [316,9,316,38]; + lineof_temp[4880] = [2871,4,2871,68]; + lineof_temp[3304] = [2033,28,2033,45]; + lineof_temp[962] = [614,17,614,37]; + lineof_temp[944] = [627,15,627,74]; + lineof_temp[4524] = [2679,36,2684,88]; + lineof_temp[4084] = [2452,14,2452,47]; + lineof_temp[4036] = [2428,21,2428,38]; + lineof_temp[6743] = [3901,78,3915,122]; + lineof_temp[6070] = [3539,2,3547,20]; + lineof_temp[5720] = [3351,4,3351,28]; + lineof_temp[6337] = [3671,23,3671,57]; + lineof_temp[2356] = [1366,4,1366,42]; + lineof_temp[4643] = [2748,8,2748,41]; + lineof_temp[1120] = [660,26,660,57]; + lineof_temp[786] = [516,8,516,34]; + lineof_temp[555] = [384,7,386,93]; + lineof_temp[5885] = [3427,8,3435,47]; + lineof_temp[5774] = [3371,14,3371,89]; + lineof_temp[1735] = [986,64,986,85]; + lineof_temp[3350] = [2061,59,2061,69]; + lineof_temp[2702] = [1599,8,1600,83]; + lineof_temp[5586] = [3290,21,3290,50]; + lineof_temp[4644] = [2748,8,2748,41]; + lineof_temp[63] = [60,12,60,34]; + lineof_temp[5698] = [3340,4,3340,35]; + lineof_temp[4610] = [2721,8,2724,89]; + lineof_temp[2937] = [1758,8,1770,47]; + lineof_temp[1319] = [732,6,735,51]; + lineof_temp[6788] = [3929,10,3931,70]; + lineof_temp[2632] = [1546,32,1551,51]; + lineof_temp[1297] = [731,27,731,54]; + lineof_temp[5900] = [3442,4,3442,6]; + lineof_temp[2731] = [1625,27,1625,46]; + lineof_temp[1662] = [917,11,933,89]; + lineof_temp[1535] = [847,61,847,85]; + lineof_temp[5085] = [2980,14,2981,40]; + lineof_temp[7344] = [4168,27,4168,61]; + lineof_temp[2407] = [1416,4,1416,22]; + lineof_temp[1736] = [986,16,986,62]; + lineof_temp[1247] = [721,20,721,30]; + lineof_temp[5980] = [3502,10,3504,53]; + lineof_temp[5332] = [3122,9,3122,58]; + lineof_temp[1835] = [1052,6,1052,27]; + lineof_temp[6901] = [3987,29,3987,62]; + lineof_temp[4759] = [2805,2,2811,71]; + lineof_temp[3763] = [2275,31,2280,79]; + lineof_temp[5446] = [3206,21,3206,49]; + lineof_temp[5370] = [3130,16,3130,24]; + lineof_temp[5291] = [3096,6,3096,37]; + lineof_temp[7044] = [4044,29,4044,48]; + lineof_temp[5820] = [3396,50,3396,59]; + lineof_temp[3373] = [2069,26,2071,104]; + lineof_temp[6041] = [3515,4,3532,68]; + lineof_temp[4725] = [2786,4,2787,31]; + lineof_temp[1713] = [968,8,973,38]; + lineof_temp[953] = [621,11,629,51]; + lineof_temp[5538] = [3252,32,3258,96]; + lineof_temp[5386] = [3171,6,3174,43]; + lineof_temp[2114] = [1203,29,1203,98]; + lineof_temp[16] = [28,5,28,19]; + lineof_temp[6455] = [3731,18,3735,75]; + lineof_temp[2526] = [1564,82,1564,123]; + lineof_temp[2458] = [1463,36,1463,54]; + lineof_temp[5801] = [3389,23,3389,58]; + lineof_temp[4901] = [2888,42,2888,49]; + lineof_temp[3773] = [2288,25,2288,79]; + lineof_temp[3140] = [1896,35,1896,71]; + lineof_temp[720] = [483,26,483,64]; + lineof_temp[4813] = [2834,13,2834,20]; + lineof_temp[2335] = [1347,4,1347,19]; + lineof_temp[5566] = [3283,26,3284,78]; + lineof_temp[5056] = [2960,26,2970,94]; + lineof_temp[3221] = [1963,39,1969,85]; + lineof_temp[3587] = [2148,18,2167,180]; + lineof_temp[3562] = [2165,57,2165,103]; + lineof_temp[2053] = [1175,16,1177,53]; + lineof_temp[1688] = [944,6,950,46]; + lineof_temp[5184] = [3025,2,3032,79]; + lineof_temp[3234] = [1943,16,1979,77]; + lineof_temp[2209] = [1264,27,1264,87]; + lineof_temp[4962] = [2914,18,2930,89]; + lineof_temp[437] = [309,4,326,62]; + lineof_temp[4380] = [2605,74,2605,95]; + lineof_temp[2576] = [1525,42,1528,103]; + lineof_temp[1487] = [817,25,817,58]; + lineof_temp[429] = [326,35,326,60]; + lineof_temp[2473] = [1475,18,1475,79]; + lineof_temp[1452] = [794,13,794,107]; + lineof_temp[7100] = [4074,37,4077,89]; + lineof_temp[5977] = [3504,24,3504,53]; + lineof_temp[152] = [111,31,111,35]; + lineof_temp[6618] = [3797,21,3797,37]; + lineof_temp[6485] = [3701,4,3743,73]; + lineof_temp[1673] = [912,6,938,42]; + lineof_temp[5286] = [3079,49,3088,62]; + lineof_temp[740] = [495,32,495,67]; + lineof_temp[6043] = [3510,39,3532,68]; + lineof_temp[7102] = [4071,32,4077,89]; + lineof_temp[4832] = [2850,10,2850,64]; + lineof_temp[1707] = [971,17,972,79]; + lineof_temp[1054] = [677,47,677,68]; + lineof_temp[5693] = [3339,34,3339,56]; + lineof_temp[7370] = [4173,2,4176,18]; + lineof_temp[6414] = [3714,27,3714,65]; + lineof_temp[2660] = [1582,30,1586,78]; + lineof_temp[2636] = [1502,31,1551,51]; + lineof_temp[6129] = [3579,16,3579,46]; + lineof_temp[4572] = [2708,43,2711,47]; + lineof_temp[15] = [28,5,28,19]; + lineof_temp[3831] = [2257,37,2312,63]; + lineof_temp[7244] = [4132,12,4132,45]; + lineof_temp[5259] = [3083,25,3083,51]; + lineof_temp[4335] = [2579,19,2583,77]; + lineof_temp[1315] = [734,11,735,51]; + lineof_temp[1057] = [677,20,677,69]; + lineof_temp[1771] = [996,15,996,85]; + lineof_temp[7191] = [4105,8,4109,39]; + lineof_temp[145] = [112,36,113,59]; + lineof_temp[7212] = [4112,9,4112,66]; + lineof_temp[6229] = [3620,4,3626,7]; + lineof_temp[3033] = [1794,31,1831,78]; + lineof_temp[272] = [190,6,190,33]; + lineof_temp[6881] = [3971,9,3971,44]; + lineof_temp[5763] = [3367,4,3367,38]; + lineof_temp[5144] = [3012,27,3012,44]; + lineof_temp[777] = [483,8,515,11]; + lineof_temp[459] = [333,31,333,38]; + lineof_temp[2086] = [1156,11,1157,74]; + lineof_temp[1117] = [656,24,656,48]; + lineof_temp[4068] = [2436,2,2444,61]; + lineof_temp[3271] = [2010,8,2010,55]; + lineof_temp[2469] = [1470,16,1472,24]; + lineof_temp[1666] = [934,11,934,15]; + lineof_temp[1491] = [818,24,818,57]; + lineof_temp[1124] = [665,29,665,36]; + lineof_temp[557] = [384,7,386,93]; + lineof_temp[354] = [229,2,234,74]; + lineof_temp[1112] = [654,44,654,70]; + lineof_temp[7259] = [4135,11,4137,49]; + lineof_temp[2746] = [1617,7,1632,83]; + lineof_temp[1981] = [1131,42,1131,67]; + lineof_temp[6549] = [3770,72,3778,7]; + lineof_temp[3191] = [1940,84,1940,105]; + lineof_temp[1052] = [677,20,677,38]; + lineof_temp[7184] = [4109,18,4109,39]; + lineof_temp[5990] = [3476,4,3504,53]; + lineof_temp[5902] = [3446,22,3446,55]; + lineof_temp[427] = [319,12,325,59]; + lineof_temp[6058] = [3546,19,3546,78]; + lineof_temp[1869] = [1067,24,1075,102]; + lineof_temp[6440] = [3722,14,3727,75]; + lineof_temp[4821] = [2839,13,2840,49]; + lineof_temp[3411] = [2086,29,2086,75]; + lineof_temp[2720] = [1601,4,1601,5]; + lineof_temp[5694] = [3339,4,3339,30]; + lineof_temp[4535] = [2668,16,2684,88]; + lineof_temp[2579] = [1529,40,1529,53]; + lineof_temp[3954] = [2390,2,2390,65]; + lineof_temp[1168] = [674,29,674,61]; + lineof_temp[4611] = [2721,8,2724,89]; + lineof_temp[2004] = [1148,4,1150,51]; + lineof_temp[46] = [49,2,49,16]; + lineof_temp[6921] = [3976,21,3991,64]; + lineof_temp[6117] = [3557,7,3570,71]; + lineof_temp[3032] = [1794,31,1831,78]; + lineof_temp[2621] = [1549,40,1550,98]; + lineof_temp[2265] = [1293,23,1293,36]; + lineof_temp[983] = [605,37,605,80]; + lineof_temp[3354] = [2037,26,2061,69]; + lineof_temp[4008] = [2417,2,2418,89]; + lineof_temp[1451] = [794,13,794,107]; + lineof_temp[3007] = [1826,53,1826,87]; + lineof_temp[6215] = [3620,13,3620,29]; + lineof_temp[3943] = [2383,38,2383,62]; + lineof_temp[4215] = [2489,4,2489,30]; + lineof_temp[7003] = [4015,23,4015,29]; + lineof_temp[4988] = [2942,33,2942,60]; + lineof_temp[2204] = [1265,29,1265,75]; + lineof_temp[6258] = [3638,13,3638,29]; + lineof_temp[3320] = [2053,60,2053,70]; + lineof_temp[3634] = [2180,28,2200,86]; + lineof_temp[3547] = [2152,40,2152,77]; + lineof_temp[1069] = [679,23,679,91]; + lineof_temp[873] = [583,22,584,57]; + lineof_temp[5344] = [3128,14,3128,76]; + lineof_temp[3526] = [2139,55,2139,56]; + lineof_temp[3286] = [2012,12,2016,125]; + lineof_temp[6498] = [3749,34,3749,68]; + lineof_temp[6106] = [3570,35,3570,53]; + lineof_temp[5137] = [3001,2,3005,42]; + lineof_temp[1439] = [782,4,786,56]; + lineof_temp[5452] = [3194,12,3210,28]; + lineof_temp[4100] = [2457,24,2457,57]; + lineof_temp[5987] = [3476,4,3504,53]; + lineof_temp[1951] = [1116,6,1116,62]; + lineof_temp[4748] = [2810,7,2811,71]; + lineof_temp[6827] = [3953,29,3953,62]; + lineof_temp[6374] = [3687,30,3687,63]; + lineof_temp[2140] = [1213,21,1215,88]; + lineof_temp[1222] = [717,20,717,29]; + lineof_temp[5484] = [3236,30,3237,45]; + lineof_temp[6843] = [3957,31,3957,64]; + lineof_temp[6052] = [3545,59,3545,72]; + lineof_temp[4654] = [2756,27,2756,51]; + lineof_temp[3177] = [1924,44,1924,65]; + lineof_temp[2692] = [1565,4,1565,23]; + lineof_temp[1100] = [678,22,689,84]; + lineof_temp[5949] = [3479,22,3479,68]; + lineof_temp[5073] = [2940,6,2971,59]; + lineof_temp[2382] = [1391,4,1391,23]; + lineof_temp[2171] = [1244,13,1247,73]; + lineof_temp[4761] = [2805,2,2811,71]; + lineof_temp[4119] = [2468,26,2468,75]; + lineof_temp[3958] = [2397,40,2397,56]; + lineof_temp[2158] = [1231,71,1231,116]; + lineof_temp[1607] = [894,40,894,76]; + lineof_temp[468] = [338,22,338,58]; + lineof_temp[3513] = [2096,2,2125,65]; + lineof_temp[3422] = [2083,14,2083,31]; + lineof_temp[5740] = [3359,4,3359,50]; + lineof_temp[1244] = [720,12,720,76]; + lineof_temp[170] = [92,7,92,23]; + lineof_temp[3912] = [2339,20,2364,28]; + lineof_temp[278] = [194,30,194,57]; + lineof_temp[3428] = [2023,2,2089,37]; + lineof_temp[6546] = [3777,52,3777,77]; + lineof_temp[6283] = [3645,19,3648,130]; + lineof_temp[5797] = [3385,27,3385,55]; + lineof_temp[4460] = [2630,14,2636,33]; + lineof_temp[2627] = [1551,38,1551,51]; + lineof_temp[3014] = [1821,66,1821,75]; + lineof_temp[6535] = [3767,13,3767,29]; + lineof_temp[1816] = [1018,14,1018,39]; + lineof_temp[151] = [112,31,115,45]; + lineof_temp[4874] = [2852,9,2868,35]; + lineof_temp[4696] = [2773,27,2773,55]; + lineof_temp[3731] = [2248,8,2252,59]; + lineof_temp[3668] = [2216,25,2216,71]; + lineof_temp[300] = [199,7,199,22]; + lineof_temp[5863] = [3423,4,3424,70]; + lineof_temp[934] = [630,11,632,66]; + lineof_temp[438] = [308,4,326,62]; + lineof_temp[2506] = [1492,30,1498,98]; + lineof_temp[2465] = [1455,11,1465,80]; + lineof_temp[609] = [404,6,414,20]; + lineof_temp[5405] = [3180,4,3180,47]; + lineof_temp[3604] = [2180,35,2180,51]; + lineof_temp[698] = [460,2,460,78]; + lineof_temp[445] = [329,7,329,47]; + lineof_temp[4588] = [2699,15,2713,94]; + lineof_temp[4406] = [2533,61,2533,63]; + lineof_temp[5628] = [3312,20,3312,57]; + lineof_temp[6509] = [3748,12,3755,7]; + lineof_temp[6691] = [3862,63,3862,108]; + lineof_temp[3393] = [2064,14,2075,91]; + lineof_temp[3063] = [1852,4,1852,58]; + lineof_temp[6479] = [3738,11,3743,72]; + lineof_temp[5857] = [3423,19,3423,61]; + lineof_temp[4873] = [2864,9,2868,35]; + lineof_temp[4419] = [2529,14,2538,88]; + lineof_temp[6493] = [3747,29,3747,46]; + lineof_temp[2365] = [1377,4,1377,30]; + lineof_temp[3215] = [1965,53,1968,86]; + lineof_temp[5994] = [3512,19,3512,61]; + lineof_temp[4881] = [2870,4,2871,68]; + lineof_temp[1239] = [720,66,720,76]; + lineof_temp[5889] = [3426,4,3435,47]; + lineof_temp[4995] = [2971,25,2971,59]; + lineof_temp[5211] = [3054,30,3054,51]; + lineof_temp[1508] = [822,4,822,22]; + lineof_temp[938] = [623,24,623,93]; + lineof_temp[3680] = [2221,15,2221,72]; + lineof_temp[6818] = [3947,46,3947,79]; + lineof_temp[6803] = [3936,9,3936,44]; + lineof_temp[5051] = [2970,29,2970,93]; + lineof_temp[5017] = [2957,26,2957,46]; + lineof_temp[3571] = [2158,38,2167,180]; + lineof_temp[852] = [573,22,573,57]; + lineof_temp[4322] = [2571,14,2573,70]; + lineof_temp[347] = [233,7,234,74]; + lineof_temp[4401] = [2529,28,2529,47]; + lineof_temp[2156] = [1231,71,1231,116]; + lineof_temp[6146] = [3577,2,3584,64]; + lineof_temp[5643] = [3321,4,3322,30]; + lineof_temp[4639] = [2745,4,2745,6]; + lineof_temp[7154] = [4091,23,4102,87]; + lineof_temp[6695] = [3866,72,3867,75]; + lineof_temp[4882] = [2869,4,2869,8]; + lineof_temp[719] = [480,22,480,55]; + lineof_temp[5167] = [3026,15,3026,44]; + lineof_temp[1638] = [890,8,890,35]; + lineof_temp[4604] = [2722,12,2724,89]; + lineof_temp[7052] = [4055,18,4057,19]; + lineof_temp[7030] = [4038,27,4038,67]; + lineof_temp[4570] = [2705,39,2706,102]; + lineof_temp[3819] = [2302,20,2312,63]; + lineof_temp[5658] = [3327,4,3328,93]; + lineof_temp[1972] = [1128,12,1130,62]; + lineof_temp[1795] = [1013,46,1013,80]; + lineof_temp[2566] = [1515,35,1521,53]; + lineof_temp[6840] = [3942,23,3942,29]; + lineof_temp[6255] = [3628,33,3636,7]; + lineof_temp[526] = [369,8,369,41]; + lineof_temp[360] = [239,2,242,105]; + lineof_temp[4993] = [2946,23,2946,62]; + lineof_temp[3732] = [2247,4,2252,59]; + lineof_temp[2713] = [1602,59,1602,89]; + lineof_temp[1614] = [903,35,904,82]; + lineof_temp[197] = [135,5,135,47]; + lineof_temp[5222] = [3055,31,3055,59]; + lineof_temp[4600] = [2721,26,2721,53]; + lineof_temp[393] = [296,22,296,51]; + lineof_temp[1159] = [655,21,673,127]; + lineof_temp[3598] = [2175,30,2175,82]; + lineof_temp[7342] = [4161,4,4167,96]; + lineof_temp[5744] = [3360,30,3360,53]; + lineof_temp[5480] = [3231,23,3233,74]; + lineof_temp[2333] = [1345,4,1345,17]; + lineof_temp[1305] = [735,45,735,51]; + lineof_temp[3787] = [2293,32,2297,64]; + lineof_temp[6978] = [4019,47,4019,80]; + lineof_temp[1631] = [892,12,905,85]; + lineof_temp[6087] = [3563,16,3563,31]; + lineof_temp[5232] = [3040,6,3062,41]; + lineof_temp[1024] = [573,4,632,66]; + lineof_temp[3115] = [1898,50,1898,77]; + lineof_temp[966] = [617,24,617,70]; + lineof_temp[7311] = [4165,20,4165,65]; + lineof_temp[3971] = [2407,27,2407,62]; + lineof_temp[6947] = [4002,28,4002,61]; + lineof_temp[3142] = [1896,35,1896,71]; + lineof_temp[4018] = [2423,21,2423,40]; + lineof_temp[1573] = [874,11,874,36]; + lineof_temp[6181] = [3602,4,3606,63]; + lineof_temp[4465] = [2638,35,2638,69]; + lineof_temp[2614] = [1538,35,1544,53]; + lineof_temp[3766] = [2267,19,2280,79]; + lineof_temp[1306] = [735,45,735,51]; + lineof_temp[3899] = [2350,20,2350,45]; + lineof_temp[3116] = [1900,55,1900,82]; + lineof_temp[1335] = [748,20,748,71]; + lineof_temp[574] = [398,15,398,60]; + lineof_temp[6238] = [3633,37,3633,53]; + lineof_temp[3097] = [1883,24,1883,62]; + lineof_temp[7108] = [4064,18,4077,89]; + lineof_temp[5604] = [3265,2,3292,25]; + lineof_temp[5196] = [3049,24,3049,59]; + lineof_temp[2472] = [1474,32,1474,50]; + lineof_temp[2795] = [1653,32,1653,65]; + lineof_temp[1557] = [862,13,862,59]; + lineof_temp[6486] = [3700,4,3700,39]; + lineof_temp[3079] = [1876,17,1876,48]; + lineof_temp[2232] = [1257,2,1271,95]; + lineof_temp[1299] = [732,9,732,16]; + lineof_temp[5378] = [3168,21,3168,45]; + lineof_temp[5416] = [3195,35,3195,63]; + lineof_temp[5337] = [3121,9,3121,58]; + lineof_temp[914] = [610,14,610,40]; + lineof_temp[493] = [307,2,341,62]; + lineof_temp[7366] = [4174,2,4176,18]; + lineof_temp[6785] = [3927,10,3927,23]; + lineof_temp[6008] = [3519,17,3519,49]; + lineof_temp[1854] = [1068,26,1068,46]; + lineof_temp[5149] = [3018,23,3018,41]; + lineof_temp[4908] = [2884,17,2888,49]; + lineof_temp[6444] = [3721,10,3727,75]; + lineof_temp[4376] = [2603,44,2603,78]; + lineof_temp[2963] = [1831,69,1831,78]; + lineof_temp[5951] = [3479,22,3479,91]; + lineof_temp[2160] = [1230,2,1231,116]; + lineof_temp[106] = [80,23,80,43]; + lineof_temp[5844] = [3415,17,3415,44]; + lineof_temp[6825] = [3953,29,3953,62]; + lineof_temp[6071] = [3539,2,3547,20]; + lineof_temp[1203] = [702,21,702,66]; + lineof_temp[6867] = [3965,10,3965,26]; + lineof_temp[6009] = [3519,17,3519,49]; + lineof_temp[2210] = [1264,27,1264,87]; + lineof_temp[3004] = [1827,53,1827,62]; + lineof_temp[2768] = [1648,8,1650,51]; + lineof_temp[4216] = [2492,77,2492,105]; + lineof_temp[2121] = [1211,33,1211,59]; + lineof_temp[1438] = [783,6,786,56]; + lineof_temp[376] = [260,21,260,55]; + lineof_temp[6692] = [3863,60,3864,73]; + lineof_temp[5873] = [3429,10,3431,99]; + lineof_temp[1895] = [1087,32,1087,57]; + lineof_temp[409] = [294,2,300,94]; + lineof_temp[1405] = [762,30,776,58]; + lineof_temp[3611] = [2186,64,2186,79]; + lineof_temp[6112] = [3570,13,3570,71]; + lineof_temp[5168] = [3026,15,3026,44]; + lineof_temp[3129] = [1907,46,1914,95]; + lineof_temp[4815] = [2839,31,2839,59]; + lineof_temp[4371] = [2597,14,2599,95]; + lineof_temp[5841] = [3415,32,3415,44]; + lineof_temp[989] = [607,42,607,64]; + lineof_temp[5467] = [3221,16,3221,28]; + lineof_temp[3951] = [2390,40,2390,56]; + lineof_temp[3261] = [1989,2,1999,46]; + lineof_temp[4767] = [2823,24,2823,70]; + lineof_temp[1852] = [1069,26,1069,72]; + lineof_temp[1407] = [762,30,776,58]; + lineof_temp[5424] = [3197,24,3199,57]; + lineof_temp[832] = [549,6,552,46]; + lineof_temp[4694] = [2770,11,2770,40]; + lineof_temp[4153] = [2473,4,2473,20]; + lineof_temp[6328] = [3659,33,3665,7]; + lineof_temp[2118] = [1202,12,1209,85]; + lineof_temp[1791] = [1010,11,1012,75]; + lineof_temp[1625] = [894,20,905,85]; + lineof_temp[2515] = [1500,37,1500,58]; + lineof_temp[6929] = [3970,7,3992,52]; + lineof_temp[1917] = [1106,89,1106,100]; + lineof_temp[5012] = [2954,26,2956,80]; + lineof_temp[261] = [186,27,186,54]; + lineof_temp[72] = [62,12,63,41]; + lineof_temp[7222] = [4118,7,4118,23]; + lineof_temp[6979] = [4019,47,4019,80]; + lineof_temp[5117] = [2992,12,2995,60]; + lineof_temp[2064] = [1167,16,1167,32]; + lineof_temp[2055] = [1174,16,1174,32]; + lineof_temp[1905] = [1065,16,1090,65]; + lineof_temp[6880] = [3971,9,3971,44]; + lineof_temp[976] = [600,14,600,39]; + lineof_temp[1552] = [856,4,856,6]; + lineof_temp[4014] = [2421,13,2421,57]; + lineof_temp[5581] = [3266,6,3286,37]; + lineof_temp[4287] = [2554,20,2554,45]; + lineof_temp[3213] = [1967,44,1968,79]; + lineof_temp[2447] = [1451,32,1451,51]; + lineof_temp[4932] = [2921,54,2921,76]; + lineof_temp[4793] = [2835,32,2835,56]; + lineof_temp[4701] = [2773,9,2774,26]; + lineof_temp[4586] = [2699,15,2713,94]; + lineof_temp[1136] = [673,30,673,127]; + lineof_temp[3577] = [2151,27,2167,180]; + lineof_temp[6950] = [4003,27,4003,60]; + lineof_temp[4048] = [2428,2,2430,72]; + lineof_temp[3227] = [1951,31,1969,85]; + lineof_temp[5668] = [3330,4,3331,91]; + lineof_temp[2933] = [1759,12,1770,47]; + lineof_temp[3650] = [2170,12,2201,61]; + lineof_temp[5178] = [3028,15,3028,31]; + lineof_temp[171] = [119,29,119,34]; + lineof_temp[5767] = [3369,4,3369,41]; + lineof_temp[2122] = [1222,25,1222,78]; + lineof_temp[6977] = [4013,17,4013,52]; + lineof_temp[6629] = [3811,30,3813,75]; + lineof_temp[5735] = [3357,4,3357,53]; + lineof_temp[4948] = [2926,45,2926,79]; + lineof_temp[1470] = [797,4,806,46]; + lineof_temp[6704] = [3876,89,3876,107]; + lineof_temp[2308] = [1319,4,1319,33]; + lineof_temp[6088] = [3566,38,3566,56]; + lineof_temp[3839] = [2319,35,2319,59]; + lineof_temp[6257] = [3627,4,3627,47]; + lineof_temp[2500] = [1488,23,1488,41]; + lineof_temp[6175] = [3606,42,3606,60]; + lineof_temp[2978] = [1804,60,1804,106]; + lineof_temp[7188] = [4108,14,4109,39]; + lineof_temp[2742] = [1627,22,1632,83]; + lineof_temp[6584] = [3789,15,3789,38]; + lineof_temp[5682] = [3334,4,3334,27]; + lineof_temp[5561] = [3284,71,3284,78]; + lineof_temp[4947] = [2916,24,2916,42]; + lineof_temp[2330] = [1340,4,1340,35]; + lineof_temp[1115] = [656,28,656,48]; + lineof_temp[4499] = [2666,11,2666,49]; + lineof_temp[1873] = [1077,26,1077,51]; + lineof_temp[7061] = [4054,19,4054,65]; + lineof_temp[6823] = [3949,29,3951,89]; + lineof_temp[7221] = [4119,7,4121,45]; + lineof_temp[6228] = [3620,33,3626,7]; + lineof_temp[5661] = [3331,16,3331,66]; + lineof_temp[3962] = [2397,2,2397,65]; + lineof_temp[3891] = [2358,20,2358,48]; + lineof_temp[2069] = [1170,16,1172,53]; + lineof_temp[5824] = [3396,33,3396,59]; + lineof_temp[7151] = [4094,26,4102,87]; + lineof_temp[3233] = [1943,16,1979,77]; + lineof_temp[228] = [148,32,148,50]; + lineof_temp[6912] = [3990,48,3990,81]; + lineof_temp[2870] = [1747,61,1747,102]; + lineof_temp[1823] = [1023,14,1025,103]; + lineof_temp[32] = [38,23,38,47]; + lineof_temp[1185] = [646,11,695,14]; + lineof_temp[1070] = [681,44,681,65]; + lineof_temp[5772] = [3371,14,3371,57]; + lineof_temp[6654] = [3819,22,3819,68]; + lineof_temp[3183] = [1922,2,1925,20]; + lineof_temp[2651] = [1580,37,1581,112]; + lineof_temp[2208] = [1265,17,1267,86]; + lineof_temp[192] = [126,2,130,12]; + lineof_temp[6964] = [4000,7,4000,23]; + lineof_temp[5018] = [2962,55,2962,70]; + lineof_temp[3301] = [2025,4,2027,77]; + lineof_temp[4121] = [2468,4,2468,22]; + lineof_temp[2693] = [1594,13,1594,29]; + lineof_temp[1733] = [965,2,979,80]; + lineof_temp[4769] = [2823,24,2823,93]; + lineof_temp[4316] = [2567,14,2569,67]; + lineof_temp[3551] = [2156,67,2156,78]; + lineof_temp[4297] = [2551,21,2552,67]; + lineof_temp[307] = [203,7,204,36]; + lineof_temp[5787] = [3376,25,3376,64]; + lineof_temp[4631] = [2737,4,2738,32]; + lineof_temp[3658] = [2132,2,2201,61]; + lineof_temp[6314] = [3661,30,3661,63]; + lineof_temp[2260] = [1291,4,1291,17]; + lineof_temp[2771] = [1648,8,1650,51]; + lineof_temp[1602] = [889,8,889,34]; + lineof_temp[412] = [308,22,308,53]; + lineof_temp[1626] = [893,16,905,85]; + lineof_temp[2268] = [1293,4,1293,19]; + lineof_temp[1154] = [657,26,657,61]; + lineof_temp[3037] = [1785,20,1831,78]; + lineof_temp[2000] = [1148,16,1148,62]; + lineof_temp[306] = [203,7,204,36]; + lineof_temp[5312] = [3109,42,3109,67]; + lineof_temp[2245] = [1278,4,1283,87]; + lineof_temp[5506] = [3225,12,3239,88]; + lineof_temp[4418] = [2529,14,2538,88]; + lineof_temp[3376] = [2068,22,2071,104]; + lineof_temp[981] = [603,41,603,84]; + lineof_temp[5041] = [2965,34,2965,42]; + lineof_temp[3310] = [2043,45,2043,59]; + lineof_temp[1809] = [1019,74,1019,95]; + lineof_temp[5626] = [3299,2,3305,23]; + lineof_temp[2354] = [1364,4,1364,38]; + lineof_temp[5757] = [3364,28,3364,75]; + lineof_temp[3134] = [1899,37,1914,95]; + lineof_temp[7238] = [4122,7,4122,25]; + lineof_temp[2944] = [1779,10,1779,20]; + lineof_temp[1553] = [859,25,859,58]; + lineof_temp[1258] = [712,13,712,79]; + lineof_temp[6708] = [3873,74,3873,89]; + lineof_temp[5612] = [3304,55,3304,65]; + lineof_temp[5013] = [2953,26,2953,44]; + lineof_temp[4204] = [2488,55,2488,63]; + lineof_temp[2927] = [1768,26,1770,47]; + lineof_temp[6795] = [3933,32,3933,65]; + lineof_temp[3347] = [2060,38,2060,57]; + lineof_temp[2850] = [1712,32,1712,51]; + lineof_temp[5546] = [3273,20,3273,62]; + lineof_temp[814] = [540,7,540,26]; + lineof_temp[3136] = [1897,35,1914,95]; + lineof_temp[1644] = [887,2,905,85]; + lineof_temp[7376] = [4181,2,4181,57]; + lineof_temp[6294] = [3651,13,3651,29]; + lineof_temp[2711] = [1603,6,1606,39]; + lineof_temp[1343] = [757,37,757,60]; + lineof_temp[3206] = [1974,30,1979,77]; + lineof_temp[2604] = [1542,43,1543,101]; + lineof_temp[6634] = [3810,26,3813,75]; + lineof_temp[3124] = [1914,51,1914,95]; + lineof_temp[2445] = [1451,12,1451,28]; + lineof_temp[502] = [347,2,348,51]; + lineof_temp[204] = [140,17,140,40]; + lineof_temp[8] = [20,8,21,26]; + lineof_temp[5237] = [3039,2,3062,41]; + lineof_temp[3181] = [1924,7,1925,20]; + lineof_temp[6268] = [3645,43,3645,60]; + lineof_temp[5881] = [3435,15,3435,47]; + lineof_temp[4678] = [2766,4,2766,26]; + lineof_temp[3511] = [2097,6,2125,65]; + lineof_temp[5436] = [3205,20,3205,41]; + lineof_temp[6239] = [3633,22,3633,54]; + lineof_temp[3508] = [2098,10,2125,65]; + lineof_temp[1703] = [968,22,968,48]; + lineof_temp[690] = [460,24,460,39]; + lineof_temp[7094] = [4077,43,4077,89]; + lineof_temp[5174] = [3031,16,3031,20]; + lineof_temp[4272] = [2546,14,2546,72]; + lineof_temp[4007] = [2418,2,2418,89]; + lineof_temp[3990] = [2411,72,2411,93]; + lineof_temp[2043] = [1184,9,1191,25]; + lineof_temp[4382] = [2605,26,2605,72]; + lineof_temp[6473] = [3741,45,3743,69]; + lineof_temp[6758] = [3857,44,3915,122]; + lineof_temp[5138] = [3001,2,3005,42]; + lineof_temp[2306] = [1317,4,1317,35]; + lineof_temp[1998] = [1138,2,1140,17]; + lineof_temp[1376] = [768,39,768,101]; + lineof_temp[6017] = [3522,26,3522,95]; + lineof_temp[3372] = [2069,26,2071,104]; + lineof_temp[1481] = [808,4,810,54]; + lineof_temp[1255] = [712,70,712,79]; + lineof_temp[6875] = [3968,10,3968,28]; + lineof_temp[4852] = [2854,15,2862,89]; + lineof_temp[2687] = [1588,23,1592,43]; + lineof_temp[4097] = [2447,2,2453,78]; + lineof_temp[3204] = [1974,30,1979,77]; + lineof_temp[444] = [328,25,328,35]; + lineof_temp[7289] = [4149,6,4149,96]; + lineof_temp[1758] = [1003,36,1003,69]; + lineof_temp[5614] = [3304,55,3304,65]; + lineof_temp[4911] = [2879,7,2888,49]; + lineof_temp[862] = [578,23,578,90]; + lineof_temp[103] = [79,21,79,45]; + lineof_temp[6384] = [3689,10,3690,105]; + lineof_temp[5236] = [3039,2,3062,41]; + lineof_temp[1218] = [711,11,711,42]; + lineof_temp[1068] = [679,23,679,91]; + lineof_temp[6080] = [3564,38,3564,56]; + lineof_temp[2945] = [1779,4,1779,6]; + lineof_temp[568] = [376,2,391,46]; + lineof_temp[3648] = [2170,12,2201,61]; + lineof_temp[6333] = [3669,30,3669,63]; + lineof_temp[3132] = [1899,37,1914,95]; + lineof_temp[6962] = [4007,10,4007,28]; + lineof_temp[6325] = [3663,10,3664,102]; + lineof_temp[4550] = [2687,11,2688,77]; + lineof_temp[2199] = [1260,23,1260,61]; + lineof_temp[823] = [546,24,548,42]; + lineof_temp[6388] = [3685,4,3691,7]; + lineof_temp[4074] = [2433,2,2444,61]; + lineof_temp[3295] = [2025,64,2025,85]; + lineof_temp[2992] = [1824,55,1824,84]; + lineof_temp[318] = [210,2,210,16]; + lineof_temp[5939] = [3473,17,3473,59]; + lineof_temp[5143] = [3012,27,3012,44]; + lineof_temp[2586] = [1532,51,1533,81]; + lineof_temp[7367] = [4174,2,4176,18]; + lineof_temp[3300] = [2025,4,2027,77]; + lineof_temp[2951] = [1793,36,1793,88]; + lineof_temp[2599] = [1531,35,1536,81]; + lineof_temp[928] = [630,71,630,92]; + lineof_temp[6183] = [3608,18,3608,34]; + lineof_temp[1415] = [750,20,776,60]; + lineof_temp[6282] = [3646,23,3648,130]; + lineof_temp[5982] = [3502,10,3504,53]; + lineof_temp[3045] = [1778,2,1831,78]; + lineof_temp[1993] = [1139,6,1140,17]; + lineof_temp[3283] = [2013,17,2013,24]; + lineof_temp[1365] = [763,37,764,93]; + lineof_temp[3100] = [1889,24,1889,77]; + lineof_temp[766] = [500,14,500,40]; + lineof_temp[3349] = [2061,59,2061,69]; + lineof_temp[1375] = [768,44,768,100]; + lineof_temp[42] = [44,2,44,20]; + lineof_temp[2074] = [1164,10,1179,59]; + lineof_temp[7302] = [4156,16,4156,50]; + lineof_temp[1871] = [1077,55,1077,66]; + lineof_temp[874] = [583,22,584,57]; + lineof_temp[95] = [69,35,71,18]; + lineof_temp[7163] = [4085,23,4090,93]; + lineof_temp[1906] = [1065,16,1090,65]; + lineof_temp[647] = [428,4,429,43]; + lineof_temp[6983] = [4020,46,4020,79]; + lineof_temp[5314] = [3110,18,3110,52]; + lineof_temp[3752] = [2274,78,2274,105]; + lineof_temp[6120] = [3554,2,3570,71]; + lineof_temp[4236] = [2503,30,2503,51]; + lineof_temp[2829] = [1687,16,1687,70]; + lineof_temp[765] = [501,14,514,90]; + lineof_temp[7197] = [4104,4,4109,39]; + lineof_temp[5564] = [3283,26,3284,78]; + lineof_temp[6281] = [3646,23,3648,130]; + lineof_temp[4262] = [2517,4,2519,17]; + lineof_temp[3402] = [2078,17,2078,23]; + lineof_temp[4484] = [2646,14,2652,33]; + lineof_temp[2764] = [1650,12,1650,51]; + lineof_temp[1160] = [655,21,673,127]; + lineof_temp[4693] = [2770,11,2770,40]; + lineof_temp[4114] = [2468,58,2468,64]; + lineof_temp[3870] = [2342,23,2343,55]; + lineof_temp[2814] = [1666,18,1666,21]; + lineof_temp[1867] = [1070,26,1070,48]; + lineof_temp[1593] = [869,2,880,84]; + lineof_temp[3842] = [2322,16,2322,26]; + lineof_temp[1764] = [1002,16,1002,34]; + lineof_temp[5278] = [3083,6,3088,62]; + lineof_temp[4546] = [2688,13,2688,50]; + lineof_temp[4400] = [2528,32,2528,51]; + lineof_temp[1660] = [928,14,933,88]; + lineof_temp[7374] = [4181,2,4181,57]; + lineof_temp[6571] = [3783,64,3783,94]; + lineof_temp[147] = [115,36,115,45]; + lineof_temp[4155] = [2474,24,2474,65]; + lineof_temp[5540] = [3266,24,3266,41]; + lineof_temp[1898] = [1079,26,1090,65]; + lineof_temp[921] = [620,19,620,45]; + lineof_temp[558] = [383,7,383,8]; + lineof_temp[2602] = [1543,66,1543,100]; + lineof_temp[1609] = [905,29,905,85]; + lineof_temp[178] = [121,4,121,19]; + lineof_temp[5760] = [3365,35,3365,62]; + lineof_temp[7234] = [4123,7,4126,49]; + lineof_temp[7035] = [4039,14,4041,77]; + lineof_temp[5340] = [3127,47,3127,55]; + lineof_temp[940] = [623,12,625,61]; + lineof_temp[4653] = [2754,4,2754,6]; + lineof_temp[4031] = [2422,2,2425,74]; + lineof_temp[3370] = [2071,88,2071,104]; + lineof_temp[6110] = [3570,13,3570,71]; + lineof_temp[5799] = [3388,29,3388,46]; + lineof_temp[6969] = [4011,16,4011,39]; + lineof_temp[6572] = [3783,19,3783,62]; + lineof_temp[4910] = [2880,11,2888,49]; + lineof_temp[384] = [277,26,277,70]; + lineof_temp[1737] = [986,16,986,62]; + lineof_temp[7189] = [4108,14,4109,39]; + lineof_temp[7167] = [4083,14,4102,87]; + lineof_temp[2038] = [1185,10,1185,36]; + lineof_temp[3146] = [1891,29,1891,65]; + lineof_temp[4640] = [2747,22,2747,49]; + lineof_temp[2401] = [1410,4,1410,27]; + lineof_temp[1423] = [741,10,776,62]; + lineof_temp[2973] = [1828,43,1828,52]; + lineof_temp[6219] = [3622,10,3622,26]; + lineof_temp[5819] = [3382,29,3391,79]; + lineof_temp[5580] = [3266,6,3286,37]; + lineof_temp[2073] = [1166,15,1172,54]; + lineof_temp[1509] = [814,24,823,64]; + lineof_temp[7348] = [4158,2,4168,61]; + lineof_temp[6412] = [3713,31,3713,50]; + lineof_temp[339] = [229,10,229,37]; + lineof_temp[6642] = [3795,18,3795,42]; + lineof_temp[6361] = [3682,75,3682,105]; + lineof_temp[5281] = [3083,6,3088,62]; + lineof_temp[4771] = [2823,12,2825,56]; + lineof_temp[1813] = [1019,14,1021,110]; + lineof_temp[6796] = [3933,32,3933,65]; + lineof_temp[3457] = [2100,18,2109,67]; + lineof_temp[3782] = [2294,45,2297,49]; + lineof_temp[2548] = [1507,35,1513,53]; + lineof_temp[2094] = [1152,4,1152,22]; + lineof_temp[4739] = [2806,20,2806,46]; + lineof_temp[3147] = [1891,29,1891,65]; + lineof_temp[821] = [546,28,546,43]; + lineof_temp[5442] = [3210,21,3210,28]; + lineof_temp[4012] = [2416,2,2418,89]; + lineof_temp[3945] = [2383,2,2383,71]; + lineof_temp[5737] = [3357,4,3357,53]; + lineof_temp[4935] = [2923,42,2923,88]; + lineof_temp[4685] = [2762,2,2766,26]; + lineof_temp[6672] = [3827,7,3827,30]; + lineof_temp[3371] = [2071,88,2071,104]; + lineof_temp[7128] = [4084,21,4084,31]; + lineof_temp[7051] = [4055,18,4057,19]; + lineof_temp[3456] = [2100,18,2109,67]; + lineof_temp[3452] = [2101,22,2109,67]; + lineof_temp[5893] = [3443,17,3443,59]; + lineof_temp[3671] = [2216,13,2218,92]; + lineof_temp[3189] = [1937,17,1937,35]; + lineof_temp[2804] = [1665,16,1665,72]; + lineof_temp[6476] = [3738,11,3743,72]; + lineof_temp[3381] = [2066,17,2071,104]; + lineof_temp[2752] = [1640,29,1640,61]; + lineof_temp[2329] = [1341,4,1341,24]; + lineof_temp[1199] = [637,4,700,7]; + lineof_temp[535] = [358,4,370,22]; + lineof_temp[485] = [337,4,341,62]; + lineof_temp[11] = [23,7,23,11]; + lineof_temp[5615] = [3304,5,3304,65]; + lineof_temp[1173] = [650,15,690,45]; + lineof_temp[6678] = [3830,22,3830,68]; + lineof_temp[6339] = [3673,24,3673,43]; + lineof_temp[3805] = [2311,36,2311,90]; + lineof_temp[3101] = [1889,24,1889,77]; + lineof_temp[2262] = [1292,23,1292,36]; + lineof_temp[2163] = [1230,2,1231,116]; + lineof_temp[7210] = [4114,8,4115,70]; + lineof_temp[7365] = [4174,2,4176,18]; + lineof_temp[7241] = [4130,23,4130,38]; + lineof_temp[2811] = [1667,18,1671,69]; + lineof_temp[2682] = [1591,27,1592,43]; + lineof_temp[1887] = [1089,46,1090,47]; + lineof_temp[902] = [595,14,595,74]; + lineof_temp[1142] = [670,25,673,127]; + lineof_temp[922] = [620,14,620,46]; + lineof_temp[4088] = [2453,30,2453,78]; + lineof_temp[1153] = [658,26,673,127]; + lineof_temp[5866] = [3422,4,3422,6]; + lineof_temp[5180] = [3026,6,3032,79]; + lineof_temp[2560] = [1517,42,1520,103]; + lineof_temp[1544] = [842,2,848,66]; + lineof_temp[5945] = [3472,4,3472,6]; + lineof_temp[4983] = [2940,28,2940,45]; + lineof_temp[5970] = [3494,17,3499,40]; + lineof_temp[4559] = [2696,27,2696,51]; + lineof_temp[4464] = [2629,14,2629,33]; + lineof_temp[2983] = [1803,48,1803,73]; + lineof_temp[1944] = [1060,4,1108,59]; + lineof_temp[128] = [102,16,102,29]; + lineof_temp[4833] = [2853,24,2853,64]; + lineof_temp[3277] = [2016,118,2016,125]; + lineof_temp[1812] = [1019,26,1019,95]; + lineof_temp[6700] = [3872,88,3872,106]; + lineof_temp[3988] = [2410,36,2410,103]; + lineof_temp[2060] = [1173,15,1179,59]; + lineof_temp[642] = [426,4,426,62]; + lineof_temp[3273] = [2011,29,2011,62]; + lineof_temp[3084] = [1870,12,1876,48]; + lineof_temp[1064] = [679,23,679,55]; + lineof_temp[3291] = [2009,4,2016,125]; + lineof_temp[3182] = [1922,2,1925,20]; + lineof_temp[6888] = [3974,38,3974,80]; + lineof_temp[1431] = [783,16,783,109]; + lineof_temp[5861] = [3424,8,3424,70]; + lineof_temp[1876] = [1080,58,1080,69]; + lineof_temp[6443] = [3721,10,3727,75]; + lineof_temp[4547] = [2688,13,2688,50]; + lineof_temp[2724] = [1615,15,1616,21]; + lineof_temp[6368] = [3677,33,3683,7]; + lineof_temp[2323] = [1335,4,1335,36]; + lineof_temp[4197] = [2484,4,2484,20]; + lineof_temp[1687] = [945,8,950,46]; + lineof_temp[5130] = [3001,23,3001,37]; + lineof_temp[6510] = [3748,12,3755,7]; + lineof_temp[5265] = [3086,58,3086,66]; + lineof_temp[2919] = [1769,31,1770,33]; + lineof_temp[578] = [401,16,401,37]; + lineof_temp[6477] = [3738,11,3743,72]; + lineof_temp[2429] = [1432,26,1432,33]; + lineof_temp[920] = [620,19,620,45]; + lineof_temp[487] = [336,4,341,62]; + lineof_temp[7029] = [4038,27,4038,67]; + lineof_temp[3760] = [2275,31,2280,79]; + lineof_temp[3211] = [1959,48,1962,81]; + lineof_temp[729] = [487,15,487,28]; + lineof_temp[5575] = [3276,25,3276,53]; + lineof_temp[4029] = [2422,2,2425,74]; + lineof_temp[6177] = [3603,8,3606,63]; + lineof_temp[2441] = [1443,25,1443,31]; + lineof_temp[4441] = [2621,4,2621,6]; + lineof_temp[4317] = [2567,14,2569,67]; + lineof_temp[3815] = [2309,31,2312,63]; + lineof_temp[14] = [19,2,23,11]; + lineof_temp[4066] = [2438,2,2444,61]; + lineof_temp[6311] = [3650,4,3650,28]; + lineof_temp[883] = [590,20,590,46]; + lineof_temp[565] = [388,4,391,46]; + lineof_temp[2317] = [1330,4,1330,33]; + lineof_temp[2025] = [1161,10,1161,67]; + lineof_temp[6104] = [3560,13,3568,75]; + lineof_temp[3262] = [1986,2,1999,46]; + lineof_temp[2611] = [1544,40,1544,53]; + lineof_temp[1723] = [976,12,979,80]; + lineof_temp[2941] = [1754,2,1770,47]; + lineof_temp[7324] = [4165,4,4167,96]; + lineof_temp[2661] = [1582,30,1586,78]; + lineof_temp[2104] = [1208,19,1208,49]; + lineof_temp[1650] = [918,14,918,52]; + lineof_temp[6696] = [3866,72,3867,75]; + lineof_temp[5997] = [3513,58,3513,67]; + lineof_temp[4142] = [2471,25,2471,74]; + lineof_temp[2960] = [1830,46,1831,64]; + lineof_temp[1907] = [1092,48,1092,57]; + lineof_temp[3871] = [2342,23,2343,55]; + lineof_temp[5943] = [3473,4,3474,49]; + lineof_temp[5653] = [3328,71,3328,93]; + lineof_temp[5326] = [3106,6,3111,70]; + lineof_temp[5590] = [3291,26,3291,36]; + lineof_temp[5317] = [3109,19,3110,52]; + lineof_temp[3973] = [2408,20,2408,49]; + lineof_temp[2622] = [1549,40,1550,98]; + lineof_temp[2115] = [1203,17,1205,96]; + lineof_temp[2009] = [1151,29,1151,61]; + lineof_temp[7180] = [4106,24,4107,24]; + lineof_temp[1808] = [1015,11,1015,30]; + lineof_temp[6435] = [3725,48,3727,72]; + lineof_temp[3231] = [1948,21,1979,77]; + lineof_temp[671] = [445,23,445,38]; + lineof_temp[5488] = [3239,47,3239,67]; + lineof_temp[1150] = [661,28,661,66]; + lineof_temp[6406] = [3692,4,3692,37]; + lineof_temp[4180] = [2480,33,2480,90]; + lineof_temp[1941] = [1060,4,1108,59]; + lineof_temp[727] = [488,15,489,71]; + lineof_temp[7308] = [4161,20,4161,60]; + lineof_temp[6658] = [3819,10,3821,56]; + lineof_temp[5630] = [3313,6,3313,62]; + lineof_temp[804] = [556,7,560,11]; + lineof_temp[3898] = [2350,20,2350,45]; + lineof_temp[3460] = [2116,27,2117,78]; + lineof_temp[2269] = [1294,23,1294,64]; + lineof_temp[3474] = [2121,46,2121,100]; + lineof_temp[3383] = [2066,17,2071,104]; + lineof_temp[10] = [19,8,21,26]; + lineof_temp[1039] = [640,8,642,67]; + lineof_temp[3801] = [2303,33,2305,37]; + lineof_temp[3421] = [2084,14,2089,37]; + lineof_temp[2132] = [1220,20,1223,52]; + lineof_temp[7263] = [4134,7,4137,49]; + lineof_temp[3555] = [2159,50,2159,78]; + lineof_temp[1747] = [995,13,995,76]; + lineof_temp[1836] = [1052,6,1052,27]; + lineof_temp[1292] = [728,37,728,72]; + lineof_temp[6078] = [3562,33,3562,47]; + lineof_temp[3859] = [2331,14,2331,71]; + lineof_temp[1506] = [815,4,815,20]; + lineof_temp[3109] = [1893,36,1893,60]; + lineof_temp[7270] = [4140,8,4141,71]; + lineof_temp[7016] = [4009,7,4029,52]; + lineof_temp[5422] = [3198,29,3198,67]; + lineof_temp[993] = [608,10,608,45]; + lineof_temp[5569] = [3285,34,3285,41]; + lineof_temp[1282] = [701,4,701,40]; + lineof_temp[2749] = [1613,2,1632,83]; + lineof_temp[4431] = [2526,7,2538,88]; + lineof_temp[4541] = [2667,12,2684,88]; + lineof_temp[7208] = [4114,8,4115,70]; + lineof_temp[6709] = [3871,69,3876,109]; + lineof_temp[482] = [337,4,341,62]; + lineof_temp[4616] = [2719,4,2719,10]; + lineof_temp[1230] = [715,20,716,26]; + lineof_temp[5509] = [3240,20,3240,69]; + lineof_temp[4482] = [2646,14,2652,33]; + lineof_temp[6819] = [3947,46,3947,79]; + lineof_temp[6686] = [3836,18,3838,26]; + lineof_temp[3775] = [2286,33,2289,37]; + lineof_temp[5706] = [3343,4,3343,33]; + lineof_temp[5334] = [3122,9,3122,58]; + lineof_temp[4228] = [2467,2,2495,46]; + lineof_temp[4164] = [2476,32,2476,93]; + lineof_temp[1800] = [1013,11,1013,29]; + lineof_temp[562] = [391,9,391,46]; + lineof_temp[5189] = [3040,15,3040,44]; + lineof_temp[3545] = [2149,28,2149,74]; + lineof_temp[432] = [326,12,326,31]; + lineof_temp[251] = [180,4,181,33]; + lineof_temp[7039] = [4038,10,4041,77]; + lineof_temp[5684] = [3337,30,3337,53]; + lineof_temp[4293] = [2560,25,2560,61]; + lineof_temp[2355] = [1367,4,1367,31]; + lineof_temp[5869] = [3429,70,3429,91]; + lineof_temp[5136] = [3001,2,3005,42]; + lineof_temp[3882] = [2364,20,2364,28]; + lineof_temp[5339] = [3119,4,3119,6]; + lineof_temp[3993] = [2410,7,2411,98]; + lineof_temp[2785] = [1644,4,1652,7]; + lineof_temp[2694] = [1594,13,1594,29]; + lineof_temp[5974] = [3503,24,3504,20]; + lineof_temp[1933] = [1093,19,1093,45]; + lineof_temp[3294] = [2006,2,2016,125]; + lineof_temp[2338] = [1348,4,1348,42]; + lineof_temp[2292] = [1304,4,1307,57]; + lineof_temp[6185] = [3612,31,3612,64]; + lineof_temp[5502] = [3229,20,3239,88]; + lineof_temp[755] = [504,17,508,72]; + lineof_temp[3657] = [2132,2,2201,61]; + lineof_temp[6190] = [3613,30,3613,63]; + lineof_temp[5719] = [3352,4,3352,48]; + lineof_temp[4141] = [2471,57,2471,63]; + lineof_temp[5584] = [3289,27,3289,54]; + lineof_temp[4801] = [2837,21,2837,88]; + lineof_temp[6679] = [3830,22,3830,91]; + lineof_temp[4427] = [2527,6,2538,88]; + lineof_temp[6783] = [3927,27,3927,60]; + lineof_temp[5007] = [2954,38,2954,84]; + lineof_temp[6495] = [3748,33,3748,53]; + lineof_temp[5715] = [3349,4,3350,30]; + lineof_temp[5239] = [3069,4,3069,6]; + lineof_temp[3041] = [1782,8,1831,78]; + lineof_temp[5110] = [2995,26,2995,60]; + lineof_temp[6945] = [4002,28,4002,61]; + lineof_temp[4854] = [2853,11,2862,89]; + lineof_temp[1788] = [1010,23,1010,69]; + lineof_temp[1612] = [902,44,902,74]; + lineof_temp[3950] = [2390,40,2390,56]; + lineof_temp[6996] = [4018,26,4026,63]; + lineof_temp[627] = [417,8,418,71]; + lineof_temp[6145] = [3577,2,3584,64]; + lineof_temp[5927] = [3463,10,3465,51]; + lineof_temp[6271] = [3646,44,3646,73]; + lineof_temp[7369] = [4173,2,4176,18]; + lineof_temp[5888] = [3426,4,3435,47]; + lineof_temp[4265] = [2514,31,2519,17]; + lineof_temp[634] = [400,4,418,72]; + lineof_temp[211] = [142,20,143,43]; + lineof_temp[6515] = [3747,8,3755,7]; + lineof_temp[4525] = [2675,32,2684,88]; + lineof_temp[7326] = [4165,4,4167,96]; + lineof_temp[1586] = [875,13,878,75]; + lineof_temp[668] = [434,26,439,86]; + lineof_temp[7296] = [4148,4,4149,96]; + lineof_temp[5374] = [3124,4,3136,37]; + lineof_temp[3208] = [1970,31,1979,77]; + lineof_temp[176] = [120,4,120,19]; + lineof_temp[3258] = [1990,6,1999,46]; + lineof_temp[776] = [483,8,515,11]; + lineof_temp[7157] = [4086,32,4088,85]; + lineof_temp[619] = [418,35,418,70]; + lineof_temp[6519] = [3757,13,3757,29]; + lineof_temp[2631] = [1546,32,1551,51]; + lineof_temp[3938] = [2375,4,2376,62]; + lineof_temp[2564] = [1515,35,1521,53]; + lineof_temp[7105] = [4070,28,4077,89]; + lineof_temp[7019] = [3999,4,4029,53]; + lineof_temp[1969] = [1129,17,1129,64]; + lineof_temp[3313] = [2044,35,2044,81]; + lineof_temp[2170] = [1244,13,1247,73]; + lineof_temp[5043] = [2965,34,2965,42]; + lineof_temp[4055] = [2437,11,2437,42]; + lineof_temp[4493] = [2620,30,2652,33]; + lineof_temp[2783] = [1644,4,1652,7]; + lineof_temp[7138] = [4099,49,4101,93]; + lineof_temp[6971] = [4029,18,4029,51]; + lineof_temp[4622] = [2734,4,2734,6]; + lineof_temp[6284] = [3645,19,3648,130]; + lineof_temp[3867] = [2336,18,2337,54]; + lineof_temp[1655] = [930,40,930,66]; + lineof_temp[7248] = [4129,7,4129,23]; + lineof_temp[1964] = [1130,17,1130,62]; + lineof_temp[77] = [65,13,65,30]; + lineof_temp[7277] = [4144,4,4145,79]; + lineof_temp[4886] = [2878,40,2878,74]; + lineof_temp[3846] = [2327,11,2327,20]; + lineof_temp[2828] = [1687,16,1687,70]; + lineof_temp[791] = [480,4,528,7]; + lineof_temp[3903] = [2348,20,2348,45]; + lineof_temp[3814] = [2309,31,2312,63]; + lineof_temp[2836] = [1691,20,1693,82]; + lineof_temp[7329] = [4164,4,4167,96]; + lineof_temp[5986] = [3477,8,3504,53]; + lineof_temp[4312] = [2567,74,2567,95]; + lineof_temp[1377] = [768,39,768,101]; + lineof_temp[1018] = [574,4,632,66]; + lineof_temp[5080] = [2978,15,2978,44]; + lineof_temp[4837] = [2856,33,2857,48]; + lineof_temp[4799] = [2837,77,2837,88]; + lineof_temp[2400] = [1407,4,1407,28]; + lineof_temp[4915] = [2894,8,2894,20]; + lineof_temp[1967] = [1129,26,1129,64]; + lineof_temp[5933] = [3446,4,3465,51]; + lineof_temp[5707] = [3317,26,3343,66]; + lineof_temp[2744] = [1625,18,1632,83]; + lineof_temp[2222] = [1269,20,1269,66]; + lineof_temp[5088] = [2980,14,2981,40]; + lineof_temp[2833] = [1693,22,1693,76]; + lineof_temp[2612] = [1538,35,1544,53]; + lineof_temp[385] = [278,4,278,38]; + lineof_temp[5336] = [3121,9,3121,58]; + lineof_temp[3976] = [2409,20,2409,49]; + lineof_temp[1585] = [875,13,878,75]; + lineof_temp[3868] = [2339,23,2340,54]; + lineof_temp[780] = [518,11,518,36]; + lineof_temp[425] = [325,37,325,58]; + lineof_temp[7382] = [4186,2,4186,43]; + lineof_temp[4161] = [2475,4,2475,20]; + lineof_temp[1091] = [681,24,689,84]; + lineof_temp[746] = [498,14,499,70]; + lineof_temp[465] = [336,21,336,66]; + lineof_temp[5256] = [3080,10,3080,55]; + lineof_temp[7057] = [4050,19,4052,65]; + lineof_temp[6459] = [3730,14,3735,75]; + lineof_temp[585] = [411,12,411,71]; + lineof_temp[5663] = [3331,70,3331,91]; + lineof_temp[3316] = [2052,51,2053,55]; + lineof_temp[7290] = [4149,6,4149,96]; + lineof_temp[7121] = [4058,4,4058,33]; + lineof_temp[4251] = [2510,4,2510,20]; + lineof_temp[2135] = [1213,33,1213,79]; + lineof_temp[834] = [541,9,552,46]; + lineof_temp[6905] = [3989,29,3989,62]; + lineof_temp[5677] = [3333,32,3333,57]; + lineof_temp[4469] = [2644,18,2644,33]; + lineof_temp[6764] = [3835,10,3915,122]; + lineof_temp[6712] = [3868,64,3876,109]; + lineof_temp[488] = [336,4,341,62]; + lineof_temp[4377] = [2603,44,2603,78]; + lineof_temp[5842] = [3415,17,3415,44]; + lineof_temp[1241] = [720,12,720,76]; + lineof_temp[988] = [607,42,607,64]; + lineof_temp[5182] = [3025,2,3032,79]; + lineof_temp[2439] = [1442,4,1442,22]; + lineof_temp[4889] = [2879,40,2879,65]; + lineof_temp[2391] = [1401,4,1401,33]; + lineof_temp[6032] = [3532,17,3532,67]; + lineof_temp[588] = [412,35,412,39]; + lineof_temp[1460] = [801,25,805,87]; + lineof_temp[6162] = [3597,42,3600,80]; + lineof_temp[5724] = [3353,25,3353,47]; + lineof_temp[6420] = [3714,14,3719,75]; + lineof_temp[5700] = [3342,4,3342,38]; + lineof_temp[4369] = [2597,14,2599,95]; + lineof_temp[3445] = [2106,35,2109,67]; + lineof_temp[2] = [19,8,19,30]; + lineof_temp[5870] = [3429,22,3429,68]; + lineof_temp[4294] = [2559,20,2561,68]; + lineof_temp[1698] = [956,2,958,45]; + lineof_temp[6851] = [3937,13,3958,51]; + lineof_temp[3384] = [2065,17,2065,26]; + lineof_temp[3578] = [2151,27,2167,180]; + lineof_temp[3333] = [2057,58,2057,127]; + lineof_temp[621] = [418,35,418,70]; + lineof_temp[5517] = [3217,2,3240,70]; + lineof_temp[336] = [222,2,222,23]; + lineof_temp[2906] = [1758,22,1758,31]; + lineof_temp[2169] = [1245,12,1247,73]; + lineof_temp[6419] = [3715,18,3719,75]; + lineof_temp[4744] = [2811,24,2811,70]; + lineof_temp[2955] = [1790,30,1793,88]; + lineof_temp[6848] = [3939,18,3957,65]; + lineof_temp[3342] = [2047,38,2059,108]; + lineof_temp[177] = [121,23,121,42]; + lineof_temp[5118] = [2992,12,2995,60]; + lineof_temp[3047] = [1839,6,1839,25]; + lineof_temp[469] = [340,35,340,47]; + lineof_temp[4676] = [2765,27,2765,55]; + lineof_temp[3674] = [2215,13,2215,14]; + lineof_temp[2595] = [1534,41,1536,81]; + lineof_temp[6713] = [3868,64,3876,109]; + lineof_temp[2542] = [1511,43,1512,101]; + lineof_temp[2154] = [1231,9,1231,66]; + lineof_temp[6638] = [3807,21,3813,75]; + lineof_temp[5531] = [3254,4,3255,55]; + lineof_temp[3922] = [2328,6,2364,29]; + lineof_temp[3798] = [2301,22,2301,81]; + lineof_temp[1935] = [1063,12,1107,65]; + lineof_temp[3382] = [2066,17,2071,104]; + lineof_temp[957] = [615,17,615,50]; + lineof_temp[2996] = [1825,55,1825,86]; + lineof_temp[2076] = [1181,70,1181,91]; + lineof_temp[41] = [44,24,44,28]; + lineof_temp[4890] = [2879,40,2879,65]; + lineof_temp[327] = [209,24,215,31]; + lineof_temp[4047] = [2428,2,2430,72]; + lineof_temp[3085] = [1869,12,1869,22]; + lineof_temp[4432] = [2526,7,2538,88]; + lineof_temp[2659] = [1586,36,1586,78]; + lineof_temp[6754] = [3878,55,3915,122]; + lineof_temp[594] = [408,8,413,11]; + lineof_temp[510] = [358,7,358,58]; + lineof_temp[5680] = [3335,4,3336,67]; + lineof_temp[5071] = [2940,6,2971,59]; + lineof_temp[4587] = [2699,15,2713,94]; + lineof_temp[3619] = [2199,44,2200,86]; + lineof_temp[3529] = [2136,16,2139,58]; + lineof_temp[7142] = [4098,36,4102,87]; + lineof_temp[6749] = [3885,64,3915,122]; + lineof_temp[6343] = [3672,14,3674,56]; + lineof_temp[3594] = [2142,12,2142,45]; + lineof_temp[1105] = [676,17,690,45]; + lineof_temp[1839] = [1051,2,1052,27]; + lineof_temp[1685] = [948,11,950,45]; + lineof_temp[1825] = [1017,11,1025,104]; + lineof_temp[7071] = [4044,4,4057,19]; + lineof_temp[6400] = [3697,10,3698,68]; + lineof_temp[5058] = [2952,24,2970,94]; + lineof_temp[6568] = [3785,9,3785,42]; + lineof_temp[4478] = [2652,18,2652,33]; + lineof_temp[5356] = [3135,24,3136,37]; + lineof_temp[4758] = [2806,2,2811,71]; + lineof_temp[3767] = [2267,19,2280,79]; + lineof_temp[524] = [362,8,367,91]; + lineof_temp[4089] = [2453,6,2453,26]; + lineof_temp[4392] = [2586,8,2607,63]; + lineof_temp[1634] = [891,8,905,85]; + lineof_temp[5862] = [3423,4,3424,70]; + lineof_temp[4986] = [2941,28,2941,51]; + lineof_temp[3695] = [2242,34,2242,68]; + lineof_temp[5988] = [3476,4,3504,53]; + lineof_temp[4618] = [2725,4,2725,8]; + lineof_temp[3401] = [2079,17,2081,94]; + lineof_temp[112] = [75,35,81,24]; + lineof_temp[709] = [470,4,472,77]; + lineof_temp[1805] = [1015,34,1015,55]; + lineof_temp[1420] = [741,10,776,62]; + lineof_temp[1170] = [674,21,674,25]; + lineof_temp[5388] = [3175,4,3175,29]; + lineof_temp[3908] = [2342,20,2364,28]; + lineof_temp[2282] = [1305,11,1306,72]; + lineof_temp[113] = [87,22,87,26]; + lineof_temp[4711] = [2782,25,2782,52]; + lineof_temp[4532] = [2671,22,2684,88]; + lineof_temp[3818] = [2302,20,2312,63]; + lineof_temp[6548] = [3774,22,3774,48]; + lineof_temp[6394] = [3695,30,3695,63]; + lineof_temp[2924] = [1768,26,1770,47]; + lineof_temp[1686] = [947,11,947,51]; + lineof_temp[1498] = [820,28,820,47]; + lineof_temp[595] = [408,8,413,11]; + lineof_temp[472] = [340,6,340,31]; + lineof_temp[61] = [58,5,58,21]; + lineof_temp[5753] = [3362,26,3362,48]; + lineof_temp[5565] = [3283,26,3284,78]; + lineof_temp[5093] = [2977,2,2981,40]; + lineof_temp[3359] = [2034,21,2061,69]; + lineof_temp[3506] = [2110,18,2125,65]; + lineof_temp[3328] = [2049,41,2053,70]; + lineof_temp[6352] = [3677,13,3677,29]; + lineof_temp[6205] = [3611,10,3616,54]; + lineof_temp[4800] = [2837,77,2837,88]; + lineof_temp[4201] = [2485,4,2485,23]; + lineof_temp[679] = [445,2,448,64]; + lineof_temp[410] = [294,2,300,94]; + lineof_temp[6056] = [3546,55,3546,78]; + lineof_temp[3599] = [2179,61,2179,82]; + lineof_temp[1221] = [714,18,714,78]; + lineof_temp[3633] = [2181,33,2181,70]; + lineof_temp[6178] = [3603,8,3606,63]; + lineof_temp[4980] = [2894,2,2933,64]; + lineof_temp[4898] = [2887,34,2888,37]; + lineof_temp[4476] = [2646,35,2646,71]; + lineof_temp[6861] = [3963,10,3963,24]; + lineof_temp[5349] = [3127,10,3128,77]; + lineof_temp[4937] = [2923,42,2923,111]; + lineof_temp[3570] = [2158,38,2167,180]; + lineof_temp[2765] = [1650,12,1650,51]; + lineof_temp[2494] = [1477,14,1477,71]; + lineof_temp[4260] = [2519,9,2519,17]; + lineof_temp[5379] = [3168,21,3168,45]; + lineof_temp[5321] = [3108,14,3111,70]; + lineof_temp[3716] = [2251,29,2251,64]; + lineof_temp[2848] = [1701,9,1703,20]; + lineof_temp[1137] = [672,30,672,89]; + lineof_temp[598] = [407,8,413,11]; + lineof_temp[6351] = [3666,4,3666,42]; + lineof_temp[5742] = [3358,4,3358,31]; + lineof_temp[2530] = [1563,34,1564,123]; + lineof_temp[6135] = [3582,18,3583,35]; + lineof_temp[4389] = [2586,8,2607,63]; + lineof_temp[3107] = [1890,27,1890,69]; + lineof_temp[5608] = [3300,4,3300,60]; + lineof_temp[4814] = [2839,31,2839,59]; + lineof_temp[3024] = [1798,43,1827,62]; + lineof_temp[6989] = [4021,29,4021,45]; + lineof_temp[6529] = [3763,10,3764,50]; + lineof_temp[473] = [341,36,341,62]; + lineof_temp[6981] = [4019,29,4019,43]; + lineof_temp[5395] = [3178,11,3179,37]; + lineof_temp[4510] = [2681,41,2682,76]; + lineof_temp[2555] = [1519,43,1520,101]; + lineof_temp[2248] = [1286,15,1288,23]; + lineof_temp[1531] = [835,2,836,60]; + lineof_temp[3166] = [1866,37,1866,42]; + lineof_temp[5534] = [3253,4,3253,10]; + lineof_temp[4699] = [2773,9,2774,26]; + lineof_temp[5929] = [3452,10,3452,36]; + lineof_temp[1515] = [829,6,829,49]; + lineof_temp[4730] = [2785,4,2787,31]; + lineof_temp[1931] = [1107,22,1107,51]; + lineof_temp[769] = [495,12,514,90]; + lineof_temp[6866] = [3966,10,3966,65]; + lineof_temp[1921] = [1104,29,1106,100]; + lineof_temp[1796] = [1013,46,1013,80]; + lineof_temp[630] = [416,4,418,72]; + lineof_temp[214] = [145,25,145,49]; + lineof_temp[98] = [76,2,76,16]; + lineof_temp[2835] = [1691,20,1693,82]; + lineof_temp[2521] = [1555,36,1562,103]; + lineof_temp[299] = [200,7,201,36]; + lineof_temp[3593] = [2143,12,2168,15]; + lineof_temp[3219] = [1963,39,1969,85]; + lineof_temp[6551] = [3770,16,3778,7]; + lineof_temp[1324] = [731,6,735,51]; + lineof_temp[847] = [569,4,571,67]; + lineof_temp[663] = [438,4,439,86]; + lineof_temp[1991] = [1139,6,1140,17]; + lineof_temp[2177] = [1241,13,1243,94]; + lineof_temp[4168] = [2477,33,2477,95]; + lineof_temp[4118] = [2468,26,2468,75]; + lineof_temp[2619] = [1550,63,1550,97]; + lineof_temp[1008] = [596,11,596,31]; + lineof_temp[4877] = [2848,4,2848,11]; + lineof_temp[7135] = [4095,42,4095,71]; + lineof_temp[6954] = [4004,30,4004,63]; + lineof_temp[4543] = [2663,7,2663,13]; + lineof_temp[6395] = [3695,10,3695,26]; + lineof_temp[2418] = [1424,4,1424,37]; + lineof_temp[7240] = [4116,4,4116,39]; + lineof_temp[6616] = [3805,24,3805,42]; + lineof_temp[2180] = [1240,8,1247,73]; + lineof_temp[1045] = [651,18,651,40]; + lineof_temp[3913] = [2338,20,2338,27]; + lineof_temp[2508] = [1499,28,1499,69]; + lineof_temp[5500] = [3235,23,3239,87]; + lineof_temp[4666] = [2756,4,2758,58]; + lineof_temp[3789] = [2293,32,2297,64]; + lineof_temp[2540] = [1511,43,1512,101]; + lineof_temp[2057] = [1179,16,1179,58]; + lineof_temp[1924] = [1100,25,1106,100]; + lineof_temp[96] = [69,35,71,18]; + lineof_temp[674] = [446,2,448,64]; + lineof_temp[4848] = [2855,19,2862,89]; + lineof_temp[2559] = [1517,42,1520,103]; + lineof_temp[6750] = [3885,64,3915,122]; + lineof_temp[2116] = [1203,17,1205,96]; + lineof_temp[6540] = [3769,33,3769,53]; + lineof_temp[6326] = [3663,10,3664,102]; + lineof_temp[5483] = [3236,30,3237,45]; + lineof_temp[3237] = [1939,12,1979,77]; + lineof_temp[2045] = [1164,33,1164,48]; + lineof_temp[6321] = [3664,75,3664,102]; + lineof_temp[3130] = [1907,46,1914,95]; + lineof_temp[6732] = [3911,89,3913,99]; + lineof_temp[2244] = [1279,6,1283,87]; + lineof_temp[1259] = [712,13,712,79]; + lineof_temp[6317] = [3661,10,3661,26]; + lineof_temp[4819] = [2839,13,2840,49]; + lineof_temp[825] = [549,25,550,46]; + lineof_temp[3770] = [2264,13,2280,79]; + lineof_temp[1932] = [1094,19,1107,65]; + lineof_temp[864] = [582,24,582,65]; + lineof_temp[4497] = [2666,11,2666,49]; + lineof_temp[2918] = [1762,20,1765,78]; + lineof_temp[3314] = [2043,35,2044,81]; + lineof_temp[760] = [502,17,502,42]; + lineof_temp[5250] = [3072,6,3073,45]; + lineof_temp[4561] = [2698,23,2698,68]; + lineof_temp[5423] = [3198,29,3198,67]; + lineof_temp[3335] = [2057,46,2059,107]; + lineof_temp[6359] = [3682,18,3682,70]; + lineof_temp[4049] = [2428,2,2430,72]; + lineof_temp[4022] = [2425,55,2425,71]; + lineof_temp[2972] = [1828,43,1828,52]; + lineof_temp[2890] = [1719,31,1747,102]; + lineof_temp[6401] = [3697,10,3698,68]; + lineof_temp[2200] = [1261,15,1263,76]; + lineof_temp[2033] = [1186,22,1186,68]; + lineof_temp[1616] = [901,30,904,82]; + lineof_temp[1986] = [1123,2,1131,67]; + lineof_temp[1779] = [1005,10,1007,106]; + lineof_temp[910] = [599,18,599,85]; + lineof_temp[3886] = [2363,20,2363,48]; + lineof_temp[3161] = [1866,51,1866,56]; + lineof_temp[25] = [36,21,36,22]; + lineof_temp[6834] = [3944,26,3944,42]; + lineof_temp[5417] = [3195,35,3195,63]; + lineof_temp[2235] = [1276,8,1276,17]; + lineof_temp[6348] = [3670,10,3670,28]; + lineof_temp[6393] = [3695,30,3695,63]; + lineof_temp[2512] = [1491,22,1499,69]; + lineof_temp[5697] = [3340,39,3340,70]; + lineof_temp[3749] = [2268,35,2271,36]; + lineof_temp[2197] = [1257,15,1257,53]; + lineof_temp[6458] = [3730,14,3735,75]; + lineof_temp[4520] = [2683,42,2684,88]; + lineof_temp[3566] = [2165,45,2167,180]; + lineof_temp[2237] = [1279,15,1281,23]; + lineof_temp[1746] = [995,33,995,48]; + lineof_temp[1214] = [709,37,709,46]; + lineof_temp[692] = [460,56,460,78]; + lineof_temp[6165] = [3594,8,3600,83]; + lineof_temp[2218] = [1260,8,1267,86]; + lineof_temp[5019] = [2962,55,2962,70]; + lineof_temp[4562] = [2698,23,2698,68]; + lineof_temp[5154] = [3014,14,3018,41]; + lineof_temp[6565] = [3779,4,3779,31]; + lineof_temp[3737] = [2230,2,2252,59]; + lineof_temp[3780] = [2296,37,2296,91]; + lineof_temp[1331] = [743,23,743,50]; + lineof_temp[1204] = [702,21,702,66]; + lineof_temp[2989] = [1823,55,1823,112]; + lineof_temp[2909] = [1764,27,1764,81]; + lineof_temp[571] = [376,2,391,46]; + lineof_temp[5038] = [2966,34,2968,92]; + lineof_temp[4058] = [2442,10,2442,60]; + lineof_temp[6627] = [3813,35,3813,75]; + lineof_temp[5033] = [2962,34,2964,91]; + lineof_temp[924] = [620,50,620,84]; + lineof_temp[2417] = [1425,4,1425,26]; + lineof_temp[5837] = [3413,23,3413,78]; + lineof_temp[1193] = [697,11,699,69]; + lineof_temp[6199] = [3615,34,3615,52]; + lineof_temp[4683] = [2764,9,2764,32]; + lineof_temp[4553] = [2662,4,2688,78]; + lineof_temp[1862] = [1073,31,1075,102]; + lineof_temp[2557] = [1519,43,1520,101]; + lineof_temp[1507] = [823,4,823,64]; + lineof_temp[6652] = [3825,9,3825,42]; + lineof_temp[6295] = [3653,30,3653,63]; + lineof_temp[6830] = [3955,29,3955,62]; + lineof_temp[6600] = [3799,24,3799,38]; + lineof_temp[3974] = [2408,20,2408,49]; + lineof_temp[3500] = [2125,50,2125,64]; + lineof_temp[1096] = [680,24,680,43]; + lineof_temp[4787] = [2830,12,2832,56]; + lineof_temp[3861] = [2331,14,2331,71]; + lineof_temp[2157] = [1231,71,1231,116]; + lineof_temp[5645] = [3321,4,3322,30]; + lineof_temp[5522] = [3246,2,3247,52]; + lineof_temp[4686] = [2761,2,2766,26]; + lineof_temp[3077] = [1876,17,1876,48]; + lineof_temp[5635] = [3312,2,3313,62]; + lineof_temp[705] = [470,23,470,89]; + lineof_temp[5072] = [2940,6,2971,59]; + lineof_temp[4955] = [2928,24,2930,89]; + lineof_temp[1744] = [989,4,989,24]; + lineof_temp[2976] = [1804,108,1804,129]; + lineof_temp[4628] = [2737,4,2738,32]; + lineof_temp[1243] = [720,12,720,76]; + lineof_temp[5455] = [3189,2,3210,28]; + lineof_temp[87] = [60,7,65,72]; + lineof_temp[6952] = [4003,10,4003,23]; + lineof_temp[6649] = [3816,7,3816,30]; + lineof_temp[5305] = [3107,19,3107,47]; + lineof_temp[194] = [135,5,135,24]; + lineof_temp[6640] = [3806,21,3806,43]; + lineof_temp[2289] = [1307,13,1307,57]; + lineof_temp[7064] = [4053,19,4053,40]; + lineof_temp[6835] = [3956,48,3956,81]; + lineof_temp[6612] = [3804,24,3804,41]; + lineof_temp[1691] = [943,2,950,47]; + lineof_temp[7207] = [4114,8,4115,70]; + lineof_temp[3965] = [2403,14,2403,18]; + lineof_temp[607] = [404,6,414,20]; + lineof_temp[4003] = [2416,21,2416,53]; + lineof_temp[150] = [114,36,114,40]; + lineof_temp[2863] = [1739,56,1740,91]; + lineof_temp[546] = [355,2,370,22]; + lineof_temp[7004] = [4028,31,4028,64]; + lineof_temp[6194] = [3614,33,3614,51]; + lineof_temp[3531] = [2134,10,2139,58]; + lineof_temp[5359] = [3134,24,3134,33]; + lineof_temp[4373] = [2596,14,2596,38]; + lineof_temp[1219] = [711,11,711,42]; + lineof_temp[6747] = [3885,64,3915,122]; + lineof_temp[5762] = [3365,4,3365,31]; + lineof_temp[5192] = [3042,33,3042,51]; + lineof_temp[5496] = [3238,29,3239,87]; + lineof_temp[2378] = [1387,4,1387,37]; + lineof_temp[5965] = [3484,12,3490,18]; + lineof_temp[227] = [149,32,153,65]; + lineof_temp[6961] = [4007,32,4007,65]; + lineof_temp[6580] = [3787,19,3787,35]; + lineof_temp[2327] = [1339,4,1339,19]; + lineof_temp[1514] = [829,6,829,49]; + lineof_temp[5652] = [3328,16,3328,67]; + lineof_temp[3966] = [2403,4,2403,10]; + lineof_temp[1042] = [649,49,649,75]; + lineof_temp[973] = [611,11,619,62]; + lineof_temp[125] = [101,34,101,39]; + lineof_temp[7340] = [4161,4,4167,96]; + lineof_temp[7322] = [4166,4,4167,96]; + lineof_temp[6086] = [3564,16,3564,74]; + lineof_temp[6187] = [3612,31,3612,64]; + lineof_temp[3817] = [2302,20,2312,63]; + lineof_temp[4030] = [2422,2,2425,74]; + lineof_temp[881] = [577,6,587,31]; + lineof_temp[3043] = [1780,4,1780,15]; + lineof_temp[6837] = [3956,48,3956,81]; + lineof_temp[4795] = [2836,36,2836,64]; + lineof_temp[4125] = [2469,57,2469,63]; + lineof_temp[850] = [569,4,571,67]; + lineof_temp[6139] = [3580,10,3583,35]; + lineof_temp[135] = [109,31,109,54]; + lineof_temp[4203] = [2487,24,2487,45]; + lineof_temp[2932] = [1760,16,1770,47]; + lineof_temp[875] = [585,8,586,57]; + lineof_temp[5541] = [3268,24,3269,65]; + lineof_temp[2956] = [1790,30,1793,88]; + lineof_temp[2689] = [1573,15,1592,43]; + lineof_temp[6864] = [3964,27,3964,60]; + lineof_temp[6382] = [3689,10,3690,105]; + lineof_temp[1033] = [640,68,640,89]; + lineof_temp[5703] = [3343,37,3343,66]; + lineof_temp[3311] = [2044,35,2044,81]; + lineof_temp[5026] = [2964,55,2964,70]; + lineof_temp[5574] = [3277,25,3286,37]; + lineof_temp[5097] = [2987,20,2987,47]; + lineof_temp[2225] = [1269,8,1271,95]; + lineof_temp[4256] = [2515,24,2515,37]; + lineof_temp[2543] = [1509,42,1512,103]; + lineof_temp[6615] = [3805,46,3805,79]; + lineof_temp[5310] = [3109,58,3109,66]; + lineof_temp[4038] = [2429,21,2429,39]; + lineof_temp[1449] = [788,4,792,56]; + lineof_temp[213] = [145,25,145,49]; + lineof_temp[6995] = [4025,29,4025,47]; + lineof_temp[4944] = [2917,24,2925,95]; + lineof_temp[4349] = [2588,14,2588,31]; + lineof_temp[3158] = [1878,7,1914,95]; + lineof_temp[1695] = [958,2,958,45]; + lineof_temp[36] = [33,36,38,47]; + lineof_temp[5761] = [3365,35,3365,62]; + lineof_temp[1228] = [716,17,716,26]; + lineof_temp[1770] = [996,15,996,85]; + lineof_temp[7133] = [4092,37,4093,72]; + lineof_temp[5403] = [3181,4,3182,46]; + lineof_temp[1600] = [889,38,889,71]; + lineof_temp[1073] = [682,24,682,30]; + lineof_temp[6174] = [3606,42,3606,60]; + lineof_temp[1252] = [712,33,712,66]; + lineof_temp[6362] = [3682,75,3682,105]; + lineof_temp[6293] = [3651,13,3651,29]; + lineof_temp[3653] = [2133,6,2201,61]; + lineof_temp[3540] = [2143,30,2143,37]; + lineof_temp[3464] = [2119,27,2120,78]; + lineof_temp[7232] = [4125,16,4125,41]; + lineof_temp[5428] = [3195,16,3199,57]; + lineof_temp[2193] = [1237,2,1251,91]; + lineof_temp[3761] = [2275,31,2280,79]; + lineof_temp[4794] = [2836,36,2836,64]; + lineof_temp[4778] = [2827,12,2828,59]; + lineof_temp[504] = [347,2,348,51]; + lineof_temp[6925] = [3974,18,3991,65]; + lineof_temp[1167] = [674,29,674,61]; + lineof_temp[831] = [549,6,552,46]; + lineof_temp[7264] = [4133,7,4133,25]; + lineof_temp[7069] = [4045,8,4057,19]; + lineof_temp[4624] = [2737,28,2737,56]; + lineof_temp[2141] = [1212,16,1223,52]; + lineof_temp[6913] = [3990,48,3990,81]; + lineof_temp[6019] = [3522,14,3524,103]; + lineof_temp[2492] = [1477,14,1477,71]; + lineof_temp[1538] = [844,8,844,30]; + lineof_temp[4843] = [2858,25,2862,89]; + lineof_temp[3981] = [2413,72,2413,82]; + lineof_temp[3592] = [2143,12,2168,15]; + lineof_temp[682] = [454,56,454,77]; + lineof_temp[414] = [310,6,310,31]; + lineof_temp[2090] = [1155,11,1155,43]; + lineof_temp[1023] = [573,4,632,66]; + lineof_temp[6503] = [3749,72,3755,7]; + lineof_temp[2683] = [1590,28,1592,43]; + lineof_temp[818] = [553,9,554,60]; + lineof_temp[4412] = [2534,27,2538,88]; + lineof_temp[7109] = [4064,18,4077,89]; + lineof_temp[6598] = [3800,24,3800,55]; + lineof_temp[2155] = [1231,9,1231,66]; + lineof_temp[4735] = [2781,2,2787,31]; + lineof_temp[478] = [338,4,341,62]; + lineof_temp[1549] = [857,15,857,72]; + lineof_temp[7187] = [4108,14,4109,39]; + lineof_temp[6084] = [3564,16,3564,74]; + lineof_temp[3744] = [2266,66,2266,91]; + lineof_temp[5713] = [3349,4,3350,30]; + lineof_temp[2533] = [1552,31,1564,123]; + lineof_temp[2931] = [1766,21,1770,47]; + lineof_temp[7042] = [4033,4,4042,7]; + lineof_temp[2779] = [1651,16,1651,49]; + lineof_temp[3345] = [2060,61,2060,71]; + lineof_temp[2450] = [1451,4,1451,51]; + lineof_temp[258] = [183,4,184,33]; + lineof_temp[4496] = [2666,11,2666,49]; + lineof_temp[3664] = [2209,22,2209,60]; + lineof_temp[5725] = [3353,25,3353,47]; + lineof_temp[2854] = [1722,36,1722,90]; + lineof_temp[3873] = [2346,21,2347,55]; + lineof_temp[3883] = [2364,20,2364,28]; + lineof_temp[3808] = [2310,44,2312,48]; + lineof_temp[3507] = [2099,14,2125,65]; + lineof_temp[7306] = [4159,4,4159,20]; + lineof_temp[3622] = [2188,47,2188,84]; + lineof_temp[3662] = [2207,4,2207,20]; + lineof_temp[7305] = [4159,24,4159,59]; + lineof_temp[5434] = [3200,20,3201,43]; + lineof_temp[5292] = [3096,6,3096,37]; + lineof_temp[2797] = [1653,32,1653,65]; + lineof_temp[18] = [28,25,28,30]; + lineof_temp[6501] = [3754,22,3754,80]; + lineof_temp[3252] = [1994,17,1997,45]; + lineof_temp[2974] = [1799,53,1801,51]; + lineof_temp[2747] = [1613,2,1632,83]; + lineof_temp[1858] = [1075,44,1075,86]; + lineof_temp[949] = [628,17,628,37]; + lineof_temp[5247] = [3073,10,3073,44]; + lineof_temp[2392] = [1400,4,1400,44]; + lineof_temp[2091] = [1155,11,1155,43]; + lineof_temp[1207] = [705,24,705,45]; + lineof_temp[4950] = [2928,84,2928,105]; + lineof_temp[1840] = [1051,2,1052,27]; + lineof_temp[3487] = [2124,47,2124,66]; + lineof_temp[7275] = [4143,13,4143,29]; + lineof_temp[5319] = [3109,19,3110,52]; + lineof_temp[1794] = [1009,11,1009,28]; + lineof_temp[4536] = [2668,16,2684,88]; + lineof_temp[3325] = [2050,46,2050,56]; + lineof_temp[6492] = [3746,13,3746,29]; + lineof_temp[1811] = [1019,26,1019,72]; + lineof_temp[6733] = [3911,89,3913,99]; + lineof_temp[1461] = [801,25,805,87]; + lineof_temp[636] = [399,2,418,72]; + lineof_temp[538] = [357,4,370,22]; + lineof_temp[7227] = [4126,16,4126,49]; + lineof_temp[6211] = [3608,38,3618,7]; + lineof_temp[5284] = [3081,4,3081,14]; + lineof_temp[4925] = [2909,17,2909,59]; + lineof_temp[2760] = [1647,24,1647,64]; + lineof_temp[4120] = [2468,26,2468,75]; + lineof_temp[1373] = [763,34,766,88]; + lineof_temp[547] = [376,15,376,52]; + lineof_temp[7159] = [4089,25,4090,93]; + lineof_temp[252] = [179,4,179,18]; + lineof_temp[5738] = [3356,4,3356,34]; + lineof_temp[1868] = [1067,24,1075,102]; + lineof_temp[2801] = [1662,21,1662,58]; + lineof_temp[114] = [87,4,87,18]; + lineof_temp[7055] = [4050,31,4050,77]; + lineof_temp[3022] = [1807,48,1807,74]; + lineof_temp[1635] = [891,8,905,85]; + lineof_temp[230] = [146,27,146,46]; + lineof_temp[6810] = [3939,38,3939,80]; + lineof_temp[3173] = [1866,2,1915,7]; + lineof_temp[6365] = [3681,10,3682,105]; + lineof_temp[5776] = [3371,4,3372,21]; + lineof_temp[4959] = [2914,18,2930,89]; + lineof_temp[6806] = [3958,18,3958,51]; + lineof_temp[1256] = [712,70,712,79]; + lineof_temp[7141] = [4098,36,4102,87]; + lineof_temp[293] = [200,30,200,57]; + lineof_temp[7176] = [4079,4,4102,87]; + lineof_temp[6847] = [3939,18,3957,65]; + lineof_temp[3070] = [1850,2,1858,56]; + lineof_temp[4342] = [2564,8,2584,11]; + lineof_temp[1357] = [757,29,760,83]; + lineof_temp[6717] = [3865,62,3876,109]; + lineof_temp[2348] = [1358,4,1358,33]; + lineof_temp[1847] = [1062,31,1062,65]; + lineof_temp[7160] = [4085,23,4090,93]; + lineof_temp[1929] = [1107,55,1107,64]; + lineof_temp[2882] = [1726,42,1747,102]; + lineof_temp[801] = [555,10,555,25]; + lineof_temp[3514] = [2096,2,2125,65]; + lineof_temp[3894] = [2352,20,2352,45]; + lineof_temp[1675] = [911,2,938,42]; + lineof_temp[6450] = [3730,27,3730,65]; + lineof_temp[3201] = [1975,45,1978,41]; + lineof_temp[4684] = [2763,2,2766,26]; + lineof_temp[2625] = [1547,40,1550,100]; + lineof_temp[2525] = [1564,41,1564,77]; + lineof_temp[1522] = [828,2,829,49]; + lineof_temp[342] = [230,17,230,33]; + lineof_temp[3405] = [2082,25,2082,36]; + lineof_temp[2300] = [1312,4,1312,23]; + lineof_temp[6782] = [3927,27,3927,60]; + lineof_temp[5953] = [3479,10,3481,96]; + lineof_temp[2813] = [1667,18,1671,69]; + lineof_temp[2642] = [1486,9,1564,123]; + lineof_temp[2596] = [1531,35,1536,81]; + lineof_temp[5054] = [2970,29,2970,93]; + lineof_temp[4451] = [2626,12,2627,98]; + lineof_temp[1988] = [1123,2,1131,67]; + lineof_temp[7028] = [4035,10,4035,26]; + lineof_temp[6385] = [3689,10,3690,105]; + lineof_temp[6353] = [3677,13,3677,29]; + lineof_temp[2645] = [1567,12,1569,20]; + lineof_temp[2345] = [1357,4,1357,17]; + lineof_temp[7218] = [4121,12,4121,45]; + lineof_temp[3638] = [2176,23,2200,86]; + lineof_temp[5489] = [3239,71,3239,87]; + lineof_temp[2726] = [1618,36,1618,48]; + lineof_temp[1725] = [975,8,979,80]; + lineof_temp[3810] = [2312,52,2312,63]; + lineof_temp[1099] = [678,22,689,84]; + lineof_temp[67] = [62,12,62,37]; + lineof_temp[7229] = [4126,16,4126,49]; + lineof_temp[3082] = [1870,12,1876,48]; + lineof_temp[4516] = [2684,46,2684,88]; + lineof_temp[1731] = [965,2,979,80]; + lineof_temp[6256] = [3628,4,3636,7]; + lineof_temp[3238] = [1938,12,1979,77]; + lineof_temp[2777] = [1651,16,1651,49]; + lineof_temp[6920] = [3991,23,3991,27]; + lineof_temp[4151] = [2473,24,2473,66]; + lineof_temp[1146] = [663,28,663,47]; + lineof_temp[4057] = [2440,10,2440,59]; + lineof_temp[2843] = [1678,2,1693,82]; + lineof_temp[2616] = [1537,35,1537,53]; + lineof_temp[7089] = [4071,35,4071,45]; + lineof_temp[1702] = [968,22,968,48]; + lineof_temp[971] = [617,12,619,61]; + lineof_temp[1818] = [1025,26,1025,86]; + lineof_temp[517] = [365,23,365,69]; + lineof_temp[1963] = [1128,15,1128,67]; + lineof_temp[7273] = [4138,4,4138,22]; + lineof_temp[4820] = [2839,13,2840,49]; + lineof_temp[4402] = [2529,28,2529,47]; + lineof_temp[3368] = [2071,34,2071,83]; + lineof_temp[2509] = [1491,22,1499,69]; + lineof_temp[4650] = [2744,34,2748,41]; + lineof_temp[3034] = [1788,26,1831,78]; + lineof_temp[941] = [623,12,625,61]; + lineof_temp[4978] = [2932,4,2932,22]; + lineof_temp[4752] = [2809,7,2809,41]; + lineof_temp[4379] = [2600,14,2600,30]; + lineof_temp[1866] = [1071,26,1075,102]; + lineof_temp[2404] = [1411,4,1411,33]; + lineof_temp[2261] = [1292,23,1292,36]; + lineof_temp[156] = [106,21,106,26]; + lineof_temp[1792] = [1010,11,1012,75]; + lineof_temp[4461] = [2630,14,2636,33]; + lineof_temp[6592] = [3792,30,3792,99]; + lineof_temp[5466] = [3219,8,3219,15]; + lineof_temp[4933] = [2921,30,2921,50]; + lineof_temp[1087] = [683,26,683,45]; + lineof_temp[3984] = [2412,7,2413,87]; + lineof_temp[3901] = [2348,20,2348,45]; + lineof_temp[5523] = [3246,2,3247,52]; + lineof_temp[5057] = [2959,26,2959,44]; + lineof_temp[3243] = [1991,23,1992,44]; + lineof_temp[6101] = [3568,16,3568,74]; + lineof_temp[3048] = [1838,4,1839,25]; + lineof_temp[4938] = [2923,30,2925,94]; + lineof_temp[4447] = [2627,74,2627,98]; + lineof_temp[672] = [448,32,448,61]; + lineof_temp[6958] = [4005,10,4005,27]; + lineof_temp[6824] = [3948,29,3948,45]; + lineof_temp[4598] = [2720,23,2720,52]; + lineof_temp[3122] = [1909,60,1913,94]; + lineof_temp[1065] = [679,23,679,55]; + lineof_temp[6218] = [3622,30,3622,63]; + lineof_temp[3698] = [2242,14,2242,30]; + lineof_temp[3309] = [2043,45,2043,59]; + lineof_temp[3307] = [2039,45,2040,45]; + lineof_temp[2903] = [1757,13,1757,54]; + lineof_temp[2442] = [1443,4,1443,21]; + lineof_temp[4728] = [2786,4,2787,31]; + lineof_temp[4352] = [2590,34,2590,50]; + lineof_temp[1547] = [842,2,848,66]; + lineof_temp[5640] = [3321,22,3321,51]; + lineof_temp[3631] = [2182,33,2200,86]; + lineof_temp[6241] = [3634,33,3634,67]; + lineof_temp[3362] = [2033,17,2061,69]; + lineof_temp[2735] = [1630,52,1630,64]; + lineof_temp[590] = [412,12,412,31]; + lineof_temp[6968] = [4010,9,4010,44]; + lineof_temp[6757] = [3859,49,3915,122]; + lineof_temp[1718] = [978,17,979,80]; + lineof_temp[2899] = [1755,10,1755,20]; + lineof_temp[1322] = [731,6,735,51]; + lineof_temp[715] = [465,26,472,77]; + lineof_temp[666] = [438,4,439,86]; + lineof_temp[6449] = [3730,27,3730,65]; + lineof_temp[4284] = [2555,20,2557,38]; + lineof_temp[1669] = [938,8,938,42]; + lineof_temp[3829] = [2260,4,2260,30]; + lineof_temp[833] = [546,6,552,46]; + lineof_temp[470] = [340,35,340,47]; + lineof_temp[79] = [65,50,65,71]; + lineof_temp[1061] = [690,22,690,45]; + lineof_temp[291] = [197,7,198,36]; + lineof_temp[89] = [58,2,65,72]; + lineof_temp[3931] = [2376,38,2376,60]; + lineof_temp[4663] = [2756,4,2758,58]; + lineof_temp[3906] = [2344,20,2344,45]; + lineof_temp[3524] = [2137,19,2138,48]; + lineof_temp[1651] = [922,14,923,89]; + lineof_temp[277] = [194,30,194,57]; + lineof_temp[6792] = [3932,31,3932,64]; + lineof_temp[6525] = [3764,14,3764,50]; + lineof_temp[6026] = [3530,22,3530,68]; + lineof_temp[6741] = [3901,78,3915,122]; + lineof_temp[6356] = [3679,30,3679,63]; + lineof_temp[3486] = [2124,47,2124,66]; + lineof_temp[7117] = [4060,8,4077,89]; + lineof_temp[3893] = [2352,20,2352,45]; + lineof_temp[783] = [523,11,527,112]; + lineof_temp[3785] = [2297,53,2297,64]; + lineof_temp[2219] = [1260,8,1267,86]; + lineof_temp[4052] = [2433,21,2433,54]; + lineof_temp[6604] = [3801,24,3801,37]; + lineof_temp[6883] = [3972,16,3973,28]; + lineof_temp[1741] = [986,4,988,51]; + lineof_temp[1701] = [965,15,965,53]; + lineof_temp[491] = [332,2,341,62]; + lineof_temp[5486] = [3238,39,3238,69]; + lineof_temp[1632] = [892,12,905,85]; + lineof_temp[4366] = [2599,62,2599,92]; + lineof_temp[4839] = [2859,32,2860,52]; + lineof_temp[5248] = [3072,6,3073,45]; + lineof_temp[5890] = [3425,4,3425,13]; + lineof_temp[6838] = [3956,26,3956,44]; + lineof_temp[6442] = [3721,10,3727,75]; + lineof_temp[6137] = [3582,18,3583,35]; + lineof_temp[6067] = [3540,7,3546,78]; + lineof_temp[4838] = [2856,33,2857,48]; + lineof_temp[5606] = [3300,4,3300,60]; + lineof_temp[4845] = [2858,25,2862,89]; + lineof_temp[2626] = [1547,40,1550,100]; + lineof_temp[721] = [483,26,483,64]; + lineof_temp[5966] = [3493,15,3493,42]; + lineof_temp[4337] = [2576,19,2578,62]; + lineof_temp[3434] = [2102,35,2102,67]; + lineof_temp[2070] = [1170,16,1172,53]; + lineof_temp[4344] = [2564,8,2584,11]; + lineof_temp[3469] = [2121,89,2121,100]; + lineof_temp[3610] = [2184,46,2185,73]; + lineof_temp[2159] = [1230,2,1231,116]; + lineof_temp[387] = [277,2,278,38]; + lineof_temp[1886] = [1089,46,1090,47]; + lineof_temp[1163] = [654,21,673,127]; + lineof_temp[1038] = [640,8,642,67]; + lineof_temp[5771] = [3371,59,3371,89]; + lineof_temp[3665] = [2214,13,2214,71]; + lineof_temp[2546] = [1513,40,1513,53]; + lineof_temp[2437] = [1440,4,1440,27]; + lineof_temp[1369] = [765,39,765,88]; + lineof_temp[3426] = [2028,4,2028,11]; + lineof_temp[6858] = [3963,28,3963,61]; + lineof_temp[7338] = [4162,4,4167,96]; + lineof_temp[1798] = [1013,33,1013,80]; + lineof_temp[1355] = [759,34,759,83]; + lineof_temp[841] = [538,4,554,60]; + lineof_temp[6811] = [3940,17,3940,52]; + lineof_temp[2782] = [1644,4,1652,7]; + lineof_temp[593] = [408,8,413,11]; + lineof_temp[6991] = [4022,29,4022,46]; + lineof_temp[6097] = [3568,38,3568,56]; + lineof_temp[3144] = [1893,26,1914,95]; + lineof_temp[5223] = [3052,29,3060,38]; + lineof_temp[4917] = [2897,7,2897,21]; + lineof_temp[3052] = [1844,2,1844,44]; + lineof_temp[1714] = [967,8,967,30]; + lineof_temp[1479] = [808,4,810,54]; + lineof_temp[7331] = [4163,4,4167,96]; + lineof_temp[6288] = [3641,41,3649,7]; + lineof_temp[5005] = [2948,24,2951,53]; + lineof_temp[539] = [357,4,370,22]; + lineof_temp[6164] = [3594,8,3600,83]; + lineof_temp[4301] = [2549,19,2552,67]; + lineof_temp[2914] = [1762,20,1765,78]; + lineof_temp[4842] = [2858,25,2862,89]; + lineof_temp[4210] = [2487,4,2488,66]; + lineof_temp[3725] = [2249,12,2252,59]; + lineof_temp[3646] = [2171,16,2201,61]; + lineof_temp[816] = [553,9,554,60]; + lineof_temp[6392] = [3695,30,3695,63]; + lineof_temp[5197] = [3049,24,3049,59]; + lineof_temp[4318] = [2567,14,2569,67]; + lineof_temp[3388] = [2073,29,2073,98]; + lineof_temp[837] = [539,4,554,60]; + lineof_temp[6555] = [3769,12,3778,7]; + lineof_temp[3163] = [1866,48,1866,56]; + lineof_temp[600] = [406,8,406,15]; + lineof_temp[65] = [61,12,61,34]; + lineof_temp[5906] = [3449,22,3449,91]; + lineof_temp[5243] = [3072,27,3072,51]; + lineof_temp[2728] = [1624,19,1624,49]; + lineof_temp[1594] = [869,2,880,84]; + lineof_temp[7362] = [4176,2,4176,18]; + lineof_temp[5091] = [2977,2,2981,40]; + lineof_temp[4355] = [2592,35,2592,53]; + lineof_temp[3869] = [2339,23,2340,54]; + lineof_temp[2802] = [1662,21,1662,58]; + lineof_temp[215] = [147,30,147,54]; + lineof_temp[5325] = [3106,6,3111,70]; + lineof_temp[1851] = [1069,26,1069,72]; + lineof_temp[4657] = [2757,30,2757,47]; + lineof_temp[2681] = [1591,27,1592,43]; + lineof_temp[2545] = [1513,40,1513,53]; + lineof_temp[2024] = [1161,31,1161,46]; + lineof_temp[6973] = [4029,18,4029,51]; + lineof_temp[2183] = [1249,20,1249,66]; + lineof_temp[5805] = [3388,10,3390,44]; + lineof_temp[1302] = [734,32,734,58]; + lineof_temp[4954] = [2928,24,2930,89]; + lineof_temp[4809] = [2835,13,2837,88]; + lineof_temp[1885] = [1083,32,1083,48]; + lineof_temp[1575] = [879,13,880,84]; + lineof_temp[6755] = [3878,55,3915,122]; + lineof_temp[5782] = [3374,14,3374,89]; + lineof_temp[5536] = [3256,4,3256,8]; + lineof_temp[2202] = [1265,77,1265,98]; + lineof_temp[3230] = [1948,21,1979,77]; + lineof_temp[3013] = [1821,66,1821,75]; + lineof_temp[7170] = [4080,8,4102,87]; + lineof_temp[6682] = [3830,10,3832,56]; + lineof_temp[3935] = [2376,8,2376,61]; + lineof_temp[5134] = [3003,31,3005,40]; + lineof_temp[2888] = [1719,31,1747,102]; + lineof_temp[2133] = [1216,21,1223,52]; + lineof_temp[289] = [197,7,198,36]; + lineof_temp[7158] = [4086,32,4088,85]; + lineof_temp[7126] = [4083,35,4083,56]; + lineof_temp[5834] = [3406,8,3410,90]; + lineof_temp[4117] = [2468,58,2468,64]; + lineof_temp[5092] = [2977,2,2981,40]; + lineof_temp[4362] = [2592,14,2595,67]; + lineof_temp[3960] = [2397,40,2397,56]; + lineof_temp[1130] = [670,47,670,88]; + lineof_temp[511] = [370,9,370,22]; + lineof_temp[4569] = [2705,39,2706,102]; + lineof_temp[3351] = [2061,38,2061,55]; + lineof_temp[1378] = [770,44,770,100]; + lineof_temp[587] = [412,35,412,39]; + lineof_temp[3700] = [2244,14,2245,56]; + lineof_temp[1314] = [734,11,735,51]; + lineof_temp[499] = [348,2,348,51]; + lineof_temp[2629] = [1551,38,1551,51]; + lineof_temp[6872] = [3968,32,3968,65]; + lineof_temp[1427] = [730,4,776,63]; + lineof_temp[754] = [505,19,508,72]; + lineof_temp[4985] = [2941,28,2941,51]; + lineof_temp[4712] = [2782,25,2782,52]; + lineof_temp[4498] = [2666,11,2666,49]; + lineof_temp[4071] = [2433,2,2444,61]; + lineof_temp[2127] = [1223,41,1223,52]; + lineof_temp[2176] = [1241,25,1241,94]; + lineof_temp[2524] = [1564,41,1564,77]; + lineof_temp[4914] = [2894,8,2894,20]; + lineof_temp[3334] = [2057,46,2059,107]; + lineof_temp[2858] = [1725,50,1725,89]; + lineof_temp[1722] = [977,17,977,41]; + lineof_temp[5244] = [3073,10,3073,44]; + lineof_temp[4585] = [2702,21,2713,94]; + lineof_temp[5323] = [3106,6,3111,70]; + lineof_temp[5190] = [3062,15,3062,41]; + lineof_temp[3561] = [2165,57,2165,103]; + lineof_temp[1454] = [797,18,797,34]; + lineof_temp[6463] = [3729,10,3735,75]; + lineof_temp[6262] = [3641,21,3641,37]; + lineof_temp[5439] = [3207,24,3208,67]; + lineof_temp[4213] = [2490,72,2490,100]; + lineof_temp[2499] = [1484,12,1485,76]; + lineof_temp[6068] = [3540,7,3546,78]; + lineof_temp[5976] = [3504,24,3504,53]; + lineof_temp[3358] = [2034,21,2061,69]; + lineof_temp[2005] = [1148,4,1150,51]; + lineof_temp[3778] = [2291,34,2292,109]; + lineof_temp[3589] = [2143,41,2168,15]; + lineof_temp[1883] = [1084,32,1086,100]; + lineof_temp[615] = [415,16,415,42]; + lineof_temp[7045] = [4044,29,4044,48]; + lineof_temp[3742] = [2262,16,2262,67]; + lineof_temp[3572] = [2158,38,2167,180]; + lineof_temp[1510] = [814,24,823,64]; + lineof_temp[297] = [200,7,201,36]; + lineof_temp[6532] = [3757,33,3765,7]; + lineof_temp[764] = [509,17,509,46]; + lineof_temp[357] = [241,2,242,105]; + lineof_temp[4135] = [2470,25,2470,85]; + lineof_temp[2298] = [1301,2,1307,57]; + lineof_temp[4354] = [2592,35,2592,53]; + lineof_temp[2361] = [1373,4,1373,14]; + lineof_temp[3840] = [2321,16,2321,26]; + lineof_temp[6399] = [3697,10,3698,68]; + lineof_temp[4577] = [2707,30,2713,94]; + lineof_temp[4211] = [2486,4,2486,26]; + lineof_temp[6161] = [3597,42,3600,80]; + lineof_temp[105] = [80,23,80,43]; + lineof_temp[1270] = [704,4,722,28]; + lineof_temp[1194] = [696,11,696,39]; + lineof_temp[5475] = [3231,83,3231,104]; + lineof_temp[4232] = [2501,25,2501,29]; + lineof_temp[808] = [537,22,537,36]; + lineof_temp[4384] = [2605,14,2607,63]; + lineof_temp[3172] = [1866,2,1915,7]; + lineof_temp[68] = [62,12,62,37]; + lineof_temp[2962] = [1831,69,1831,78]; + lineof_temp[1599] = [889,38,889,71]; + lineof_temp[6871] = [3967,10,3967,27]; + lineof_temp[2332] = [1342,4,1342,36]; + lineof_temp[5592] = [3291,16,3291,68]; + lineof_temp[4887] = [2878,12,2878,75]; + lineof_temp[4075] = [2433,2,2444,61]; + lineof_temp[2987] = [1823,83,1823,111]; + lineof_temp[4295] = [2558,20,2558,47]; + lineof_temp[3959] = [2397,40,2397,56]; + lineof_temp[1661] = [927,14,927,38]; + lineof_temp[3255] = [1994,17,1997,45]; + lineof_temp[2743] = [1626,22,1632,83]; + lineof_temp[1028] = [635,43,635,65]; + lineof_temp[4531] = [2671,22,2684,88]; + lineof_temp[7186] = [4109,18,4109,39]; + lineof_temp[7099] = [4076,39,4077,89]; + lineof_temp[6690] = [3862,63,3862,108]; + lineof_temp[449] = [330,9,330,44]; + lineof_temp[5811] = [3391,10,3391,48]; + lineof_temp[3491] = [2124,27,2124,81]; + lineof_temp[2142] = [1211,12,1223,52]; + lineof_temp[628] = [416,4,418,72]; + lineof_temp[5813] = [3385,4,3391,79]; + lineof_temp[5940] = [3474,8,3474,49]; + lineof_temp[5402] = [3181,4,3182,46]; + lineof_temp[6720] = [3861,63,3877,77]; + lineof_temp[3654] = [2132,2,2201,61]; + lineof_temp[1121] = [662,31,662,61]; + lineof_temp[579] = [403,28,403,54]; + lineof_temp[5728] = [3354,30,3354,51]; + lineof_temp[4474] = [2638,14,2644,33]; + lineof_temp[6632] = [3810,26,3813,75]; + lineof_temp[4479] = [2652,18,2652,33]; + lineof_temp[3541] = [2143,30,2143,37]; + lineof_temp[7139] = [4099,49,4101,93]; + lineof_temp[5125] = [2987,2,2995,60]; + lineof_temp[2935] = [1759,12,1770,47]; + lineof_temp[548] = [376,15,376,52]; + lineof_temp[2299] = [1312,27,1312,35]; + lineof_temp[2639] = [1490,18,1564,123]; + lineof_temp[121] = [95,27,95,32]; + lineof_temp[3774] = [2288,25,2288,79]; + lineof_temp[2047] = [1164,13,1165,41]; + lineof_temp[4574] = [2707,30,2713,94]; + lineof_temp[2690] = [1570,10,1592,43]; + lineof_temp[6552] = [3770,16,3778,7]; + lineof_temp[5413] = [3189,20,3189,37]; + lineof_temp[3170] = [1866,18,1866,56]; + lineof_temp[6252] = [3632,10,3635,46]; + lineof_temp[5159] = [3012,6,3018,41]; + lineof_temp[3781] = [2294,45,2297,49]; + lineof_temp[3447] = [2103,30,2109,67]; + lineof_temp[1532] = [835,2,836,60]; + lineof_temp[6635] = [3810,26,3813,75]; + lineof_temp[5438] = [3204,20,3205,41]; + lineof_temp[1730] = [965,2,979,80]; + lineof_temp[5064] = [2942,14,2971,59]; + lineof_temp[4722] = [2787,4,2787,31]; + lineof_temp[789] = [480,4,528,7]; + lineof_temp[5274] = [3086,19,3087,52]; + lineof_temp[2287] = [1307,46,1307,57]; + lineof_temp[799] = [536,5,536,20]; + lineof_temp[624] = [418,8,418,71]; + lineof_temp[4278] = [2555,41,2555,57]; + lineof_temp[3281] = [2014,17,2016,125]; + lineof_temp[219] = [151,40,151,68]; + lineof_temp[5560] = [3284,39,3284,67]; + lineof_temp[2865] = [1737,64,1740,98]; + lineof_temp[7075] = [4043,4,4043,38]; + lineof_temp[2428] = [1431,4,1431,23]; + lineof_temp[3612] = [2186,64,2186,79]; + lineof_temp[5896] = [3443,4,3444,49]; + lineof_temp[4742] = [2810,27,2810,44]; + lineof_temp[6710] = [3868,64,3876,109]; + lineof_temp[3194] = [1947,21,1947,74]; + lineof_temp[1269] = [705,4,722,28]; + lineof_temp[3073] = [1870,25,1870,59]; + lineof_temp[1128] = [667,47,667,62]; + lineof_temp[4956] = [2928,24,2930,89]; + lineof_temp[2534] = [1552,31,1564,123]; + lineof_temp[2432] = [1433,4,1433,28]; + lineof_temp[5554] = [3279,25,3280,52]; + lineof_temp[43] = [42,37,44,28]; + lineof_temp[4575] = [2707,30,2713,94]; + lineof_temp[451] = [329,4,331,32]; + lineof_temp[5126] = [2987,2,2995,60]; + lineof_temp[3826] = [2261,4,2312,63]; + lineof_temp[1606] = [893,34,893,67]; + lineof_temp[1196] = [643,8,643,37]; + lineof_temp[6448] = [3729,31,3729,50]; + lineof_temp[4109] = [2459,4,2460,28]; + lineof_temp[2305] = [1318,4,1318,24]; + lineof_temp[2006] = [1147,4,1147,22]; + lineof_temp[6046] = [3539,6,3539,15]; + lineof_temp[4154] = [2474,24,2474,65]; + lineof_temp[2034] = [1186,22,1186,91]; + lineof_temp[1111] = [654,44,654,70]; + lineof_temp[597] = [407,8,413,11]; + lineof_temp[5015] = [2958,26,2958,64]; + lineof_temp[3887] = [2363,20,2363,48]; + lineof_temp[742] = [498,27,498,70]; + lineof_temp[290] = [197,7,198,36]; + lineof_temp[6662] = [3823,29,3823,56]; + lineof_temp[1952] = [1116,6,1116,62]; + lineof_temp[198] = [135,5,135,47]; + lineof_temp[7046] = [4046,24,4046,60]; + lineof_temp[6777] = [3917,4,3917,21]; + lineof_temp[6338] = [3671,23,3671,57]; + lineof_temp[2014] = [1153,7,1153,61]; + lineof_temp[6854] = [3935,7,3958,52]; + lineof_temp[5040] = [2966,34,2968,92]; + lineof_temp[7050] = [4055,18,4057,19]; + lineof_temp[6198] = [3615,34,3615,52]; + lineof_temp[1126] = [664,46,666,42]; + lineof_temp[1134] = [673,30,673,127]; + lineof_temp[4462] = [2630,14,2636,33]; + lineof_temp[516] = [365,71,365,92]; + lineof_temp[5944] = [3473,4,3474,49]; + lineof_temp[4866] = [2865,13,2867,79]; + lineof_temp[1753] = [999,16,1001,93]; + lineof_temp[4356] = [2595,48,2595,64]; + lineof_temp[1189] = [697,23,697,69]; + lineof_temp[4502] = [2669,32,2670,32]; + lineof_temp[2150] = [1199,6,1223,52]; + lineof_temp[586] = [410,12,410,28]; + lineof_temp[5825] = [3396,4,3396,29]; + lineof_temp[5451] = [3200,16,3210,28]; + lineof_temp[4360] = [2592,14,2595,67]; + lineof_temp[4783] = [2830,24,2830,70]; + lineof_temp[3788] = [2293,32,2297,64]; + lineof_temp[2252] = [1290,17,1290,86]; + lineof_temp[1974] = [1126,8,1130,62]; + lineof_temp[536] = [357,4,370,22]; + lineof_temp[5806] = [3388,10,3390,44]; + lineof_temp[3852] = [2321,6,2327,20]; + lineof_temp[3733] = [2247,4,2252,59]; + lineof_temp[1517] = [829,6,829,49]; + lineof_temp[7284] = [4146,4,4146,33]; + lineof_temp[963] = [613,12,615,50]; + lineof_temp[2839] = [1683,11,1693,82]; + lineof_temp[2633] = [1546,32,1551,51]; + lineof_temp[7090] = [4071,35,4071,45]; + lineof_temp[6204] = [3616,13,3616,31]; + lineof_temp[255] = [184,6,184,33]; + lineof_temp[5032] = [2962,34,2964,91]; + lineof_temp[2023] = [1161,31,1161,46]; + lineof_temp[4409] = [2535,34,2536,78]; + lineof_temp[3505] = [2111,23,2111,37]; + lineof_temp[3385] = [2073,77,2073,98]; + lineof_temp[6791] = [3932,31,3932,64]; + lineof_temp[5788] = [3376,4,3376,21]; + lineof_temp[7110] = [4064,18,4077,89]; + lineof_temp[5039] = [2966,34,2968,92]; + lineof_temp[4737] = [2805,20,2805,45]; + lineof_temp[138] = [110,31,110,54]; + lineof_temp[4726] = [2786,4,2787,31]; + lineof_temp[3628] = [2183,32,2200,86]; + lineof_temp[5891] = [3421,39,3435,47]; + lineof_temp[4435] = [2525,2,2607,64]; + lineof_temp[4949] = [2926,24,2926,41]; + lineof_temp[7214] = [4110,4,4110,23]; + lineof_temp[6410] = [3708,10,3708,23]; + lineof_temp[5993] = [3471,36,3504,53]; + lineof_temp[2340] = [1350,4,1350,33]; + lineof_temp[6049] = [3541,22,3541,78]; + lineof_temp[1914] = [1097,25,1097,45]; + lineof_temp[1790] = [1010,23,1010,92]; + lineof_temp[5172] = [3030,16,3030,23]; + lineof_temp[3148] = [1891,29,1891,65]; + lineof_temp[5992] = [3471,36,3504,53]; + lineof_temp[3446] = [2104,30,2109,67]; + lineof_temp[809] = [537,22,537,36]; + lineof_temp[7236] = [4123,7,4126,49]; + lineof_temp[3709] = [2232,4,2245,57]; + lineof_temp[990] = [607,42,607,64]; + lineof_temp[7287] = [4149,36,4149,95]; + lineof_temp[7198] = [4104,4,4109,39]; + lineof_temp[7313] = [4167,21,4167,52]; + lineof_temp[6022] = [3528,20,3528,67]; + lineof_temp[5839] = [3414,38,3414,75]; + lineof_temp[3453] = [2100,18,2109,67]; + lineof_temp[1804] = [1014,11,1014,38]; + lineof_temp[4834] = [2853,24,2853,64]; + lineof_temp[1195] = [644,8,699,70]; + lineof_temp[856] = [587,11,587,31]; + lineof_temp[773] = [483,68,515,11]; + lineof_temp[7255] = [4137,16,4137,49]; + lineof_temp[2371] = [1383,4,1383,25]; + lineof_temp[1996] = [1138,2,1140,17]; + lineof_temp[5620] = [3305,13,3305,22]; + lineof_temp[3821] = [2299,15,2312,63]; + lineof_temp[5874] = [3429,10,3431,99]; + lineof_temp[2894] = [1709,17,1747,102]; + lineof_temp[582] = [404,20,404,41]; + lineof_temp[304] = [204,9,204,36]; + lineof_temp[7129] = [4084,21,4084,31]; + lineof_temp[3682] = [2219,10,2219,32]; + lineof_temp[1081] = [688,23,688,49]; + lineof_temp[5348] = [3127,10,3128,77]; + lineof_temp[4680] = [2765,9,2766,26]; + lineof_temp[2319] = [1331,27,1331,35]; + lineof_temp[6868] = [3967,31,3967,64]; + lineof_temp[4255] = [2515,24,2515,37]; + lineof_temp[3187] = [1933,9,1936,18]; + lineof_temp[2443] = [1311,31,1443,31]; + lineof_temp[1183] = [691,15,691,34]; + lineof_temp[735] = [491,15,493,85]; + lineof_temp[4903] = [2886,26,2888,49]; + lineof_temp[2528] = [1563,34,1564,123]; + lineof_temp[1860] = [1075,91,1075,102]; + lineof_temp[312] = [205,7,205,25]; + lineof_temp[1976] = [1126,8,1130,62]; + lineof_temp[5683] = [3337,30,3337,53]; + lineof_temp[220] = [151,40,151,68]; + lineof_temp[3688] = [2208,4,2208,23]; + lineof_temp[1499] = [820,28,820,47]; + lineof_temp[1021] = [573,4,632,66]; + lineof_temp[9] = [19,8,21,26]; + lineof_temp[7145] = [4096,31,4102,87]; + lineof_temp[2022] = [1160,10,1160,65]; + lineof_temp[202] = [139,17,139,40]; + lineof_temp[6372] = [3685,13,3685,29]; + lineof_temp[1262] = [710,8,710,34]; + lineof_temp[1752] = [999,28,999,97]; + lineof_temp[2654] = [1584,37,1585,71]; + lineof_temp[6603] = [3802,24,3802,55]; + lineof_temp[6538] = [3768,29,3768,46]; + lineof_temp[5113] = [2995,18,2995,22]; + lineof_temp[1568] = [855,2,862,59]; + lineof_temp[6624] = [3812,51,3812,94]; + lineof_temp[3746] = [2265,21,2266,94]; + lineof_temp[2705] = [1598,4,1600,83]; + lineof_temp[2402] = [1409,4,1409,38]; + lineof_temp[1389] = [774,44,774,99]; + lineof_temp[6322] = [3664,75,3664,102]; + lineof_temp[3762] = [2275,31,2280,79]; + lineof_temp[1968] = [1129,26,1129,64]; + lineof_temp[5230] = [3042,15,3061,36]; + lineof_temp[4705] = [2769,2,2774,26]; + lineof_temp[3010] = [1819,57,1820,89]; + lineof_temp[5709] = [3349,22,3349,48]; + lineof_temp[5358] = [3135,24,3136,37]; + lineof_temp[5260] = [3084,19,3084,47]; + lineof_temp[696] = [460,2,460,78]; + lineof_temp[6196] = [3614,13,3614,29]; + lineof_temp[4340] = [2564,50,2584,11]; + lineof_temp[4033] = [2421,2,2425,74]; + lineof_temp[3685] = [2209,4,2223,55]; + lineof_temp[2949] = [1791,37,1792,61]; + lineof_temp[6010] = [3519,17,3519,49]; + lineof_temp[4659] = [2758,12,2758,57]; + lineof_temp[3844] = [2327,11,2327,20]; + lineof_temp[1014] = [588,6,588,32]; + lineof_temp[78] = [65,13,65,30]; + lineof_temp[7172] = [4080,8,4102,87]; + lineof_temp[4916] = [2898,7,2899,75]; + lineof_temp[3106] = [1890,27,1890,69]; + lineof_temp[2234] = [1257,2,1271,95]; + lineof_temp[5722] = [3353,39,3353,47]; + lineof_temp[2390] = [1398,4,1398,38]; + lineof_temp[828] = [551,6,552,46]; + lineof_temp[6924] = [3974,18,3991,65]; + lineof_temp[6095] = [3565,16,3565,33]; + lineof_temp[2697] = [1595,8,1596,71]; + lineof_temp[7053] = [4050,79,4050,100]; + lineof_temp[4922] = [2906,7,2907,80]; + lineof_temp[3872] = [2346,21,2347,55]; + lineof_temp[2165] = [1237,15,1237,53]; + lineof_temp[849] = [569,4,571,67]; + lineof_temp[6953] = [4004,30,4004,63]; + lineof_temp[3706] = [2237,7,2245,56]; + lineof_temp[2905] = [1758,22,1758,31]; + lineof_temp[2806] = [1668,17,1668,50]; + lineof_temp[6599] = [3800,24,3800,55]; + lineof_temp[4059] = [2442,10,2442,60]; + lineof_temp[3864] = [2333,17,2334,88]; + lineof_temp[772] = [494,12,494,35]; + lineof_temp[6563] = [3766,4,3766,48]; + lineof_temp[6471] = [3743,48,3743,68]; + lineof_temp[5589] = [3291,26,3291,36]; + lineof_temp[1832] = [1051,25,1051,41]; + lineof_temp[422] = [323,15,323,31]; + lineof_temp[5445] = [3207,21,3210,28]; + lineof_temp[1580] = [877,17,877,32]; + lineof_temp[56] = [53,23,53,45]; + lineof_temp[3058] = [1852,35,1852,57]; + lineof_temp[1918] = [1106,89,1106,100]; + lineof_temp[6217] = [3622,30,3622,63]; + lineof_temp[3892] = [2353,20,2364,28]; + lineof_temp[5362] = [3133,19,3136,37]; + lineof_temp[1010] = [595,11,632,66]; + lineof_temp[4082] = [2452,14,2452,47]; + lineof_temp[4069] = [2435,2,2444,61]; + lineof_temp[3924] = [2319,2,2364,29]; + lineof_temp[2993] = [1824,55,1824,84]; + lineof_temp[5001] = [2950,29,2950,60]; + lineof_temp[3715] = [2251,29,2251,64]; + lineof_temp[6349] = [3667,33,3675,7]; + lineof_temp[6999] = [4027,48,4027,81]; + lineof_temp[3188] = [1933,9,1936,18]; + lineof_temp[5836] = [3413,23,3413,78]; + lineof_temp[2453] = [1454,16,1454,32]; + lineof_temp[1696] = [958,2,958,45]; + lineof_temp[6930] = [3970,7,3992,52]; + lineof_temp[1362] = [764,37,764,93]; + lineof_temp[3911] = [2341,20,2341,27]; + lineof_temp[1521] = [828,2,829,49]; + lineof_temp[1236] = [720,26,720,62]; + lineof_temp[6904] = [3986,29,3986,46]; + lineof_temp[166] = [97,10,97,28]; + lineof_temp[4934] = [2923,90,2923,111]; + lineof_temp[1009] = [596,11,596,31]; + lineof_temp[2990] = [1824,60,1824,83]; + lineof_temp[625] = [418,8,418,71]; + lineof_temp[6669] = [3816,4,3825,42]; + lineof_temp[3537] = [2141,48,2141,53]; + lineof_temp[2396] = [1404,4,1404,22]; + lineof_temp[5611] = [3304,24,3304,51]; + lineof_temp[3585] = [2148,18,2167,180]; + lineof_temp[2657] = [1583,39,1585,73]; + lineof_temp[2505] = [1493,29,1498,96]; + lineof_temp[6334] = [3669,30,3669,63]; + lineof_temp[3236] = [1943,16,1979,77]; + lineof_temp[7283] = [4146,37,4146,70]; + lineof_temp[7131] = [4093,57,4093,69]; + lineof_temp[2422] = [1428,4,1428,21]; + lineof_temp[4571] = [2708,43,2711,47]; + lineof_temp[456] = [328,4,331,32]; + lineof_temp[207] = [142,20,142,43]; + lineof_temp[4634] = [2733,29,2738,32]; + lineof_temp[2080] = [1181,10,1183,59]; + lineof_temp[1520] = [828,2,829,49]; + lineof_temp[817] = [553,9,554,60]; + lineof_temp[254] = [183,27,183,54]; + lineof_temp[6475] = [3739,15,3743,72]; + lineof_temp[2759] = [1644,19,1644,63]; + lineof_temp[2739] = [1627,22,1632,83]; + lineof_temp[1108] = [675,20,690,45]; + lineof_temp[3550] = [2156,67,2156,78]; + lineof_temp[7166] = [4083,14,4102,87]; + lineof_temp[6697] = [3869,80,3870,106]; + lineof_temp[3455] = [2100,18,2109,67]; + lineof_temp[970] = [617,12,619,61]; + lineof_temp[5913] = [3460,14,3460,38]; + lineof_temp[2374] = [1384,4,1384,21]; + lineof_temp[1850] = [1065,36,1065,66]; + lineof_temp[7360] = [4175,4,4175,64]; + lineof_temp[3809] = [2312,52,2312,63]; + lineof_temp[6774] = [3919,35,3921,119]; + lineof_temp[3450] = [2101,22,2109,67]; + lineof_temp[1709] = [969,12,973,38]; + lineof_temp[5031] = [2963,34,2964,91]; + lineof_temp[4667] = [2755,4,2755,17]; + lineof_temp[2099] = [1199,19,1199,57]; + lineof_temp[4658] = [2758,12,2758,57]; + lineof_temp[3934] = [2376,8,2376,61]; + lineof_temp[440] = [308,4,326,62]; + lineof_temp[5114] = [2993,16,2995,60]; + lineof_temp[379] = [260,2,260,55]; + lineof_temp[325] = [215,23,215,31]; + lineof_temp[2750] = [1613,2,1632,83]; + lineof_temp[903] = [595,14,595,74]; + lineof_temp[4102] = [2459,25,2459,43]; + lineof_temp[3224] = [1957,34,1969,85]; + lineof_temp[7209] = [4114,8,4115,70]; + lineof_temp[2148] = [1199,6,1223,52]; + lineof_temp[1589] = [874,8,880,84]; + lineof_temp[3968] = [2404,4,2404,8]; + lineof_temp[1463] = [798,19,805,89]; + lineof_temp[1364] = [763,37,764,93]; + lineof_temp[1286] = [633,2,722,28]; + lineof_temp[6398] = [3698,14,3698,68]; + lineof_temp[6057] = [3546,19,3546,78]; + lineof_temp[1296] = [728,4,728,20]; + lineof_temp[748] = [498,14,499,70]; + lineof_temp[6914] = [3990,26,3990,44]; + lineof_temp[3794] = [2285,20,2297,64]; + lineof_temp[2387] = [1397,4,1397,27]; + lineof_temp[2535] = [1502,40,1502,56]; + lineof_temp[1235] = [714,15,717,29]; + lineof_temp[7199] = [4103,4,4103,33]; + lineof_temp[3776] = [2286,33,2289,37]; + lineof_temp[1734] = [965,2,979,80]; + lineof_temp[1445] = [792,7,792,55]; + lineof_temp[3080] = [1871,11,1876,48]; + lineof_temp[6915] = [3978,23,3990,82]; + lineof_temp[6415] = [3719,51,3719,71]; + lineof_temp[5909] = [3449,10,3451,94]; + lineof_temp[5846] = [3414,13,3415,44]; + lineof_temp[6617] = [3798,21,3805,80]; + lineof_temp[1186] = [645,11,645,35]; + lineof_temp[6350] = [3667,4,3675,7]; + lineof_temp[4218] = [2492,72,2492,106]; + lineof_temp[3207] = [1974,30,1979,77]; + lineof_temp[1617] = [901,30,904,82]; + lineof_temp[4408] = [2535,34,2536,78]; + lineof_temp[741] = [495,32,495,67]; + lineof_temp[1694] = [958,2,958,45]; + lineof_temp[1043] = [649,29,649,76]; + lineof_temp[5975] = [3503,24,3504,20]; + lineof_temp[3854] = [2331,37,2331,45]; + lineof_temp[3705] = [2237,7,2245,56]; + lineof_temp[759] = [503,17,508,72]; + lineof_temp[3983] = [2413,4,2413,87]; + lineof_temp[5593] = [3290,12,3291,68]; + lineof_temp[4779] = [2827,12,2828,59]; + lineof_temp[5199] = [3049,24,3049,59]; + lineof_temp[3722] = [2252,18,2252,22]; + lineof_temp[60] = [48,35,53,45]; + lineof_temp[3877] = [2354,19,2357,53]; + lineof_temp[6240] = [3633,22,3633,54]; + lineof_temp[5646] = [3320,4,3320,25]; + lineof_temp[3796] = [2282,15,2282,40]; + lineof_temp[1959] = [1123,15,1123,53]; + lineof_temp[514] = [363,28,363,65]; + lineof_temp[6839] = [3943,23,3956,82]; + lineof_temp[2309] = [1322,4,1322,19]; + lineof_temp[1046] = [651,18,651,40]; + lineof_temp[497] = [348,2,348,51]; + lineof_temp[172] = [119,7,119,25]; + lineof_temp[5518] = [3217,2,3240,70]; + lineof_temp[5447] = [3203,21,3210,28]; + lineof_temp[19] = [28,2,28,40]; + lineof_temp[6533] = [3757,4,3765,7]; + lineof_temp[3374] = [2069,26,2071,104]; + lineof_temp[3308] = [2039,45,2040,45]; + lineof_temp[7181] = [4106,24,4107,24]; + lineof_temp[2195] = [1237,2,1251,91]; + lineof_temp[259] = [183,4,184,33]; + lineof_temp[5856] = [3403,2,3415,44]; + lineof_temp[2397] = [1406,4,1406,20]; + lineof_temp[6829] = [3955,29,3955,62]; + lineof_temp[6526] = [3764,14,3764,50]; + lineof_temp[4503] = [2669,32,2670,32]; + lineof_temp[4016] = [2422,21,2422,34]; + lineof_temp[1966] = [1130,17,1130,62]; + lineof_temp[6316] = [3661,30,3661,63]; + lineof_temp[6015] = [3522,26,3522,72]; + lineof_temp[5613] = [3304,55,3304,65]; + lineof_temp[5261] = [3084,19,3084,47]; + lineof_temp[6761] = [3844,27,3915,122]; + lineof_temp[6675] = [3916,9,3916,42]; + lineof_temp[4286] = [2555,20,2557,38]; + lineof_temp[4005] = [2418,70,2418,84]; + lineof_temp[6090] = [3566,60,3566,74]; + lineof_temp[2316] = [1327,4,1327,34]; + lineof_temp[6900] = [3983,29,3983,45]; + lineof_temp[6055] = [3545,28,3545,75]; + lineof_temp[100] = [78,2,78,15]; + lineof_temp[6232] = [3628,13,3628,29]; + lineof_temp[5063] = [2942,14,2971,59]; + lineof_temp[3293] = [2006,2,2016,125]; + lineof_temp[2879] = [1730,46,1747,102]; + lineof_temp[3600] = [2179,61,2179,82]; + lineof_temp[382] = [277,26,277,70]; + lineof_temp[1833] = [1051,25,1051,41]; + lineof_temp[644] = [428,23,428,57]; + lineof_temp[4206] = [2488,4,2488,66]; + lineof_temp[5203] = [3051,33,3051,54]; + lineof_temp[4212] = [2490,72,2490,100]; + lineof_temp[1035] = [640,20,640,66]; + lineof_temp[843] = [538,4,554,60]; + lineof_temp[419] = [322,32,322,53]; + lineof_temp[3232] = [1948,21,1979,77]; + lineof_temp[1799] = [1013,33,1013,80]; + lineof_temp[6249] = [3634,15,3635,46]; + lineof_temp[7363] = [4176,2,4176,18]; + lineof_temp[1581] = [877,17,877,32]; + lineof_temp[757] = [503,17,508,72]; + lineof_temp[6800] = [3935,27,3935,64]; + lineof_temp[4104] = [2460,4,2460,28]; + lineof_temp[4601] = [2722,25,2722,69]; + lineof_temp[2926] = [1768,26,1770,47]; + lineof_temp[985] = [604,14,604,43]; + lineof_temp[370] = [254,14,254,28]; + lineof_temp[5027] = [2964,55,2964,70]; + lineof_temp[553] = [384,19,384,65]; + lineof_temp[7195] = [4104,4,4109,39]; + lineof_temp[6402] = [3697,10,3698,68]; + lineof_temp[4328] = [2580,28,2580,69]; + lineof_temp[4514] = [2683,64,2683,80]; + lineof_temp[2054] = [1175,16,1177,53]; + lineof_temp[959] = [615,17,615,50]; + lineof_temp[6280] = [3646,23,3648,130]; + lineof_temp[774] = [483,8,515,11]; + lineof_temp[4456] = [2636,18,2636,33]; + lineof_temp[2189] = [1248,8,1248,36]; + lineof_temp[4177] = [2479,4,2479,29]; + lineof_temp[3479] = [2122,91,2122,102]; + lineof_temp[6724] = [3888,73,3890,102]; + lineof_temp[4602] = [2722,25,2722,69]; + lineof_temp[523] = [364,11,364,12]; + lineof_temp[6889] = [3975,17,3975,52]; + lineof_temp[5304] = [3106,25,3106,51]; + lineof_temp[6020] = [3522,14,3524,103]; + lineof_temp[4736] = [2805,20,2805,45]; + lineof_temp[1999] = [1148,64,1148,85]; + lineof_temp[1381] = [770,39,770,101]; + lineof_temp[6591] = [3792,30,3792,76]; + lineof_temp[6296] = [3653,30,3653,63]; + lineof_temp[4434] = [2525,2,2607,64]; + lineof_temp[5242] = [3072,27,3072,51]; + lineof_temp[2343] = [1355,4,1355,26]; + lineof_temp[1982] = [1131,8,1131,38]; + lineof_temp[7006] = [4028,31,4028,64]; + lineof_temp[2968] = [1829,41,1831,78]; + lineof_temp[2925] = [1768,26,1770,47]; + lineof_temp[1397] = [775,53,775,89]; + lineof_temp[6452] = [3735,51,3735,71]; + lineof_temp[1406] = [762,30,776,58]; + lineof_temp[1845] = [1108,13,1108,59]; + lineof_temp[4363] = [2591,14,2591,30]; + lineof_temp[3811] = [2312,52,2312,63]; + lineof_temp[3066] = [1858,2,1858,56]; + lineof_temp[2522] = [1553,36,1562,105]; + lineof_temp[863] = [578,23,578,90]; + lineof_temp[5995] = [3512,19,3512,61]; + lineof_temp[1358] = [763,42,763,65]; + lineof_temp[7243] = [4132,12,4132,45]; + lineof_temp[7097] = [4076,39,4077,89]; + lineof_temp[5936] = [3441,34,3465,51]; + lineof_temp[3667] = [2216,73,2216,94]; + lineof_temp[3102] = [1886,31,1889,84]; + lineof_temp[1561] = [860,8,862,59]; + lineof_temp[496] = [347,15,347,50]; + lineof_temp[4309] = [2540,8,2540,27]; + lineof_temp[3643] = [2172,18,2172,43]; + lineof_temp[2105] = [1207,23,1209,69]; + lineof_temp[3480] = [2122,91,2122,102]; + lineof_temp[806] = [556,7,560,11]; + lineof_temp[2767] = [1649,8,1650,51]; + lineof_temp[239] = [135,2,153,65]; + lineof_temp[4646] = [2747,4,2748,41]; + lineof_temp[2552] = [1506,35,1506,49]; + lineof_temp[6363] = [3681,10,3682,105]; + lineof_temp[4760] = [2805,2,2811,71]; + lineof_temp[7330] = [4164,4,4167,96]; + lineof_temp[3858] = [2331,49,2331,71]; + lineof_temp[4425] = [2528,10,2538,88]; + lineof_temp[3884] = [2364,20,2364,28]; + lineof_temp[5971] = [3493,12,3500,20]; + lineof_temp[6705] = [3875,73,3876,109]; + lineof_temp[4391] = [2586,8,2607,63]; + lineof_temp[3769] = [2264,13,2280,79]; + lineof_temp[1542] = [848,8,848,38]; + lineof_temp[3492] = [2124,27,2124,81]; + lineof_temp[3414] = [2086,17,2088,94]; + lineof_temp[4145] = [2471,4,2471,21]; + lineof_temp[5599] = [3292,16,3292,25]; + lineof_temp[461] = [334,32,334,43]; + lineof_temp[6207] = [3617,32,3617,50]; + lineof_temp[1151] = [661,28,661,66]; + lineof_temp[4095] = [2449,4,2449,22]; + lineof_temp[5461] = [3220,56,3220,68]; + lineof_temp[3608] = [2182,56,2182,84]; + lineof_temp[1053] = [677,47,677,68]; + lineof_temp[5625] = [3299,2,3305,23]; + lineof_temp[3478] = [2122,91,2122,102]; + lineof_temp[5644] = [3321,4,3322,30]; + lineof_temp[7205] = [4114,30,4114,52]; + lineof_temp[373] = [254,2,254,75]; + lineof_temp[4378] = [2601,14,2603,81]; + lineof_temp[1248] = [721,20,721,30]; + lineof_temp[53] = [52,23,52,24]; + lineof_temp[4606] = [2722,12,2724,89]; + lineof_temp[2109] = [1209,73,1209,85]; + lineof_temp[1257] = [712,13,712,79]; + lineof_temp[6048] = [3541,22,3541,78]; + lineof_temp[2825] = [1659,2,1672,24]; + lineof_temp[2680] = [1591,27,1592,43]; + lineof_temp[2256] = [1284,4,1284,17]; + lineof_temp[7253] = [4137,16,4137,49]; + lineof_temp[4977] = [2933,4,2933,64]; + lineof_temp[7320] = [4166,4,4167,96]; + lineof_temp[2320] = [1331,4,1331,23]; + lineof_temp[139] = [109,31,110,54]; + lineof_temp[3967] = [2404,12,2404,17]; + lineof_temp[3944] = [2383,38,2383,62]; + lineof_temp[3159] = [1866,21,1866,31]; + lineof_temp[2995] = [1825,60,1825,85]; + lineof_temp[1371] = [765,39,765,88]; + lineof_temp[800] = [536,5,536,20]; + lineof_temp[4257] = [2515,4,2515,20]; + lineof_temp[5020] = [2962,34,2962,99]; + lineof_temp[1672] = [937,8,937,38]; + lineof_temp[75] = [60,12,63,41]; + lineof_temp[5573] = [3281,25,3285,42]; + lineof_temp[3138] = [1897,35,1914,95]; + lineof_temp[6869] = [3967,31,3967,64]; + lineof_temp[2672] = [1590,39,1590,55]; + lineof_temp[2677] = [1592,31,1592,43]; + lineof_temp[2502] = [1493,29,1498,96]; + lineof_temp[4107] = [2459,4,2460,28]; + lineof_temp[6574] = [3783,19,3783,94]; + lineof_temp[5688] = [3338,31,3338,55]; + lineof_temp[3209] = [1961,39,1962,74]; + lineof_temp[907] = [599,27,599,53]; + lineof_temp[6413] = [3714,27,3714,65]; + lineof_temp[4625] = [2738,8,2738,32]; + lineof_temp[2464] = [1456,15,1465,80]; + lineof_temp[5427] = [3195,16,3199,57]; + lineof_temp[3195] = [1945,28,1947,81]; + lineof_temp[5425] = [3196,20,3199,57]; + lineof_temp[3484] = [2122,48,2122,102]; + lineof_temp[681] = [454,24,454,39]; + lineof_temp[6718] = [3863,57,3877,77]; + lineof_temp[6115] = [3557,7,3570,71]; + lineof_temp[667] = [437,4,437,22]; + lineof_temp[6527] = [3763,10,3764,50]; + lineof_temp[5903] = [3449,70,3449,91]; + lineof_temp[4414] = [2534,27,2538,88]; + lineof_temp[2737] = [1632,60,1632,83]; + lineof_temp[6719] = [3861,63,3877,77]; + lineof_temp[4528] = [2672,26,2684,88]; + lineof_temp[6860] = [3963,28,3963,61]; + lineof_temp[6759] = [3852,38,3915,122]; + lineof_temp[3336] = [2057,46,2059,107]; + lineof_temp[827] = [551,6,552,46]; + lineof_temp[5440] = [3207,24,3208,67]; + lineof_temp[685] = [454,2,454,77]; + lineof_temp[6121] = [3554,2,3570,71]; + lineof_temp[3001] = [1823,55,1825,86]; + lineof_temp[6622] = [3810,47,3810,65]; + lineof_temp[4093] = [2450,4,2453,78]; + lineof_temp[1171] = [652,20,674,62]; + lineof_temp[3929] = [2376,12,2376,22]; + lineof_temp[3790] = [2290,26,2297,64]; + lineof_temp[4132] = [2470,57,2470,74]; + lineof_temp[6942] = [3995,9,3996,94]; + lineof_temp[3609] = [2184,46,2185,73]; + lineof_temp[1881] = [1084,44,1084,113]; + lineof_temp[1768] = [996,72,996,85]; + lineof_temp[1801] = [1014,42,1014,63]; + lineof_temp[1720] = [977,17,977,41]; + lineof_temp[5582] = [3266,6,3286,37]; + lineof_temp[3023] = [1802,46,1827,62]; + lineof_temp[2984] = [1808,51,1808,76]; + lineof_temp[5106] = [2994,29,2994,57]; + lineof_temp[4967] = [2911,14,2911,21]; + lineof_temp[375] = [260,21,260,55]; + lineof_temp[5959] = [3484,45,3484,68]; + lineof_temp[6160] = [3598,45,3600,79]; + lineof_temp[5257] = [3080,4,3080,6]; + lineof_temp[5877] = [3433,13,3433,38]; + lineof_temp[5296] = [3095,2,3096,37]; + lineof_temp[5075] = [2939,2,2971,59]; + lineof_temp[1184] = [646,54,695,14]; + lineof_temp[6794] = [3933,32,3933,65]; + lineof_temp[1732] = [965,2,979,80]; + lineof_temp[1621] = [895,24,905,85]; + lineof_temp[932] = [630,11,632,66]; + lineof_temp[4539] = [2667,12,2684,88]; + lineof_temp[3536] = [2141,48,2141,53]; + lineof_temp[6586] = [3814,17,3814,50]; + lineof_temp[4554] = [2661,4,2661,14]; + lineof_temp[3009] = [1819,57,1820,89]; + lineof_temp[6625] = [3813,35,3813,75]; + lineof_temp[4720] = [2786,22,2786,48]; + lineof_temp[1834] = [1052,6,1052,27]; + lineof_temp[1668] = [913,8,913,30]; + lineof_temp[3696] = [2242,34,2242,68]; + lineof_temp[6144] = [3578,7,3583,35]; + lineof_temp[7114] = [4061,12,4077,89]; + lineof_temp[4039] = [2430,55,2430,69]; + lineof_temp[4965] = [2912,14,2930,90]; + lineof_temp[1283] = [634,2,722,28]; + lineof_temp[7164] = [4084,18,4102,87]; + lineof_temp[5161] = [3011,2,3018,41]; + lineof_temp[3649] = [2170,12,2201,61]; + lineof_temp[2541] = [1511,43,1512,101]; + lineof_temp[6260] = [3639,17,3639,33]; + lineof_temp[4803] = [2837,21,2837,88]; + lineof_temp[4126] = [2469,25,2469,74]; + lineof_temp[2887] = [1719,31,1747,102]; + lineof_temp[7156] = [4091,23,4102,87]; + lineof_temp[6464] = [3728,10,3728,28]; + lineof_temp[4534] = [2668,16,2684,88]; + lineof_temp[3986] = [2412,7,2413,87]; + lineof_temp[3093] = [1881,15,1882,23]; + lineof_temp[556] = [384,7,386,93]; + lineof_temp[2111] = [1203,77,1203,98]; + lineof_temp[835] = [540,4,554,60]; + lineof_temp[5555] = [3279,25,3280,52]; + lineof_temp[3324] = [2051,46,2053,70]; + lineof_temp[4920] = [2903,7,2904,78]; + lineof_temp[7223] = [4123,20,4123,57]; + lineof_temp[1641] = [887,2,905,85]; + lineof_temp[2312] = [1323,4,1323,34]; + lineof_temp[2243] = [1282,13,1283,86]; + lineof_temp[366] = [248,14,248,28]; + lineof_temp[5884] = [3432,10,3432,36]; + lineof_temp[1992] = [1139,6,1140,17]; + lineof_temp[2259] = [1291,21,1291,34]; + lineof_temp[4519] = [2683,42,2684,88]; + lineof_temp[4279] = [2555,41,2555,57]; + lineof_temp[31] = [38,23,38,47]; + lineof_temp[4895] = [2884,39,2884,74]; + lineof_temp[2761] = [1647,24,1647,64]; + lineof_temp[1674] = [911,2,938,42]; + lineof_temp[810] = [538,28,538,87]; + lineof_temp[5089] = [2979,10,2981,40]; + lineof_temp[4796] = [2837,43,2837,72]; + lineof_temp[1513] = [829,28,829,49]; + lineof_temp[5962] = [3489,14,3489,38]; + lineof_temp[5210] = [3061,29,3061,36]; + lineof_temp[2270] = [1294,4,1294,19]; + lineof_temp[1658] = [929,16,930,67]; + lineof_temp[4388] = [2587,12,2607,63]; + lineof_temp[1123] = [665,40,665,66]; + lineof_temp[5316] = [3110,18,3110,52]; + lineof_temp[3554] = [2159,50,2159,78]; + lineof_temp[5878] = [3433,13,3433,38]; + lineof_temp[2582] = [1523,35,1529,53]; + lineof_temp[728] = [488,15,489,71]; + lineof_temp[6570] = [3785,9,3785,42]; + lineof_temp[4459] = [2631,18,2636,33]; + lineof_temp[4269] = [2541,30,2541,46]; + lineof_temp[5714] = [3349,4,3350,30]; + lineof_temp[4788] = [2830,12,2832,56]; + lineof_temp[4308] = [2541,8,2562,11]; + lineof_temp[7321] = [4166,4,4167,96]; + lineof_temp[4235] = [2502,4,2502,23]; + lineof_temp[894] = [591,10,592,68]; + lineof_temp[2031] = [1186,70,1186,91]; + lineof_temp[6364] = [3681,10,3682,105]; + lineof_temp[2487] = [1479,13,1480,63]; + lineof_temp[7224] = [4123,20,4123,57]; + lineof_temp[5384] = [3172,6,3174,43]; + lineof_temp[4560] = [2696,27,2696,51]; + lineof_temp[2030] = [1159,10,1161,67]; + lineof_temp[1224] = [717,20,717,29]; + lineof_temp[3020] = [1809,53,1821,75]; + lineof_temp[6310] = [3651,4,3657,7]; + lineof_temp[2798] = [1653,4,1653,28]; + lineof_temp[1229] = [716,17,716,26]; + lineof_temp[4864] = [2865,13,2867,79]; + lineof_temp[315] = [178,2,205,74]; + lineof_temp[2211] = [1264,91,1264,103]; + lineof_temp[126] = [101,16,101,30]; + lineof_temp[7319] = [4166,4,4167,96]; + lineof_temp[4080] = [2450,17,2450,61]; + lineof_temp[826] = [551,6,552,46]; + lineof_temp[968] = [617,24,617,93]; + lineof_temp[2410] = [1417,4,1417,23]; + lineof_temp[1380] = [770,39,770,101]; + lineof_temp[39] = [43,22,43,47]; + lineof_temp[4645] = [2747,4,2748,41]; + lineof_temp[3586] = [2148,18,2167,180]; + lineof_temp[2126] = [1223,41,1223,52]; + lineof_temp[1198] = [637,4,700,7]; + lineof_temp[1476] = [808,16,808,62]; + lineof_temp[3338] = [2056,46,2056,56]; + lineof_temp[1082] = [688,23,688,49]; + lineof_temp[846] = [536,2,561,64]; + lineof_temp[6716] = [3865,62,3876,109]; + lineof_temp[5919] = [3464,24,3465,20]; + lineof_temp[1875] = [1080,58,1080,69]; + lineof_temp[1512] = [828,16,828,58]; + lineof_temp[5810] = [3391,52,3391,79]; + lineof_temp[4899] = [2887,34,2888,37]; + lineof_temp[3133] = [1899,37,1914,95]; + lineof_temp[1904] = [1065,16,1090,65]; + lineof_temp[6355] = [3679,30,3679,63]; + lineof_temp[4103] = [2459,25,2459,43]; + lineof_temp[651] = [427,4,427,22]; + lineof_temp[6607] = [3803,44,3803,77]; + lineof_temp[3748] = [2270,24,2270,78]; + lineof_temp[5947] = [3476,22,3476,55]; + lineof_temp[5011] = [2954,26,2956,80]; + lineof_temp[4501] = [2667,30,2667,56]; + lineof_temp[1390] = [774,39,774,100]; + lineof_temp[5329] = [3104,4,3104,14]; + lineof_temp[3632] = [2182,33,2200,86]; + lineof_temp[6313] = [3659,13,3659,29]; + lineof_temp[5470] = [3218,6,3221,28]; + lineof_temp[673] = [448,32,448,61]; + lineof_temp[5503] = [3228,20,3239,88]; + lineof_temp[1645] = [911,15,911,53]; + lineof_temp[7023] = [4031,4,4031,54]; + lineof_temp[2644] = [1481,4,1481,22]; + lineof_temp[6879] = [3970,27,3970,64]; + lineof_temp[5240] = [3072,42,3072,50]; + lineof_temp[4429] = [2527,6,2538,88]; + lineof_temp[3180] = [1924,7,1925,20]; + lineof_temp[5] = [21,8,21,26]; + lineof_temp[5679] = [3335,4,3336,67]; + lineof_temp[943] = [627,15,627,74]; + lineof_temp[5849] = [3412,8,3415,44]; + lineof_temp[5037] = [2966,46,2966,115]; + lineof_temp[4512] = [2680,49,2682,83]; + lineof_temp[2751] = [1613,2,1632,83]; + lineof_temp[892] = [591,10,592,68]; + lineof_temp[5733] = [3355,33,3355,58]; + lineof_temp[2781] = [1644,67,1652,7]; + lineof_temp[6801] = [3935,27,3935,64]; + lineof_temp[2226] = [1269,8,1271,95]; + lineof_temp[7091] = [4075,41,4075,73]; + lineof_temp[617] = [417,20,417,44]; + lineof_temp[2523] = [1553,36,1562,105]; + lineof_temp[580] = [403,28,403,54]; + lineof_temp[222] = [153,56,153,65]; + lineof_temp[7146] = [4096,31,4102,87]; + lineof_temp[7086] = [4066,32,4069,69]; + lineof_temp[5145] = [3015,20,3015,73]; + lineof_temp[3298] = [2025,16,2025,85]; + lineof_temp[2455] = [1455,21,1455,49]; + lineof_temp[5773] = [3371,14,3371,57]; + lineof_temp[4638] = [2745,10,2745,30]; + lineof_temp[5847] = [3414,13,3415,44]; + lineof_temp[946] = [629,17,629,50]; + lineof_temp[5907] = [3449,10,3451,94]; + lineof_temp[4436] = [2614,2,2615,26]; + lineof_temp[3985] = [2412,7,2413,87]; + lineof_temp[2741] = [1627,22,1632,83]; + lineof_temp[4296] = [2553,19,2561,69]; + lineof_temp[2421] = [1428,25,1428,31]; + lineof_temp[4108] = [2459,4,2460,28]; + lineof_temp[3729] = [2248,8,2252,59]; + lineof_temp[3575] = [2153,32,2167,180]; + lineof_temp[6466] = [3702,7,3702,23]; + lineof_temp[1334] = [743,15,744,72]; + lineof_temp[7346] = [4168,27,4168,61]; + lineof_temp[6985] = [4020,29,4020,42]; + lineof_temp[4682] = [2765,9,2766,26]; + lineof_temp[3241] = [1932,2,1979,77]; + lineof_temp[3855] = [2331,37,2331,45]; + lineof_temp[3692] = [2233,7,2233,23]; + lineof_temp[460] = [333,4,333,27]; + lineof_temp[212] = [142,20,143,43]; + lineof_temp[4841] = [2861,31,2862,89]; + lineof_temp[4697] = [2774,4,2774,26]; + lineof_temp[4387] = [2604,14,2604,15]; + lineof_temp[27] = [37,23,37,47]; + lineof_temp[4423] = [2528,10,2538,88]; + lineof_temp[7299] = [3591,2,4149,96]; + lineof_temp[3003] = [1827,53,1827,62]; + lineof_temp[911] = [599,18,599,85]; + lineof_temp[3018] = [1815,52,1821,75]; + lineof_temp[2179] = [1241,13,1243,94]; + lineof_temp[4637] = [2745,22,2745,30]; + lineof_temp[3876] = [2354,19,2357,53]; + lineof_temp[2303] = [1316,4,1316,22]; + lineof_temp[6303] = [3656,75,3656,100]; + lineof_temp[1330] = [743,23,743,50]; + lineof_temp[7031] = [4039,17,4039,43]; + lineof_temp[2591] = [1536,46,1536,81]; + lineof_temp[2212] = [1264,91,1264,103]; + lineof_temp[2173] = [1241,73,1241,94]; + lineof_temp[1340] = [753,25,754,78]; + lineof_temp[5069] = [2941,10,2971,59]; + lineof_temp[3448] = [2102,26,2109,67]; + lineof_temp[6158] = [3599,49,3600,78]; + lineof_temp[4573] = [2712,36,2713,94]; + lineof_temp[1541] = [848,42,848,66]; + lineof_temp[7328] = [4164,4,4167,96]; + lineof_temp[5482] = [3230,23,3230,25]; + lineof_temp[4613] = [2720,4,2724,89]; + lineof_temp[2725] = [1618,36,1618,48]; + lineof_temp[2095] = [1146,2,1191,25]; + lineof_temp[295] = [201,9,201,36]; + lineof_temp[5755] = [3363,25,3363,69]; + lineof_temp[5103] = [2990,12,2990,28]; + lineof_temp[2803] = [1665,16,1665,72]; + lineof_temp[1474] = [793,4,793,22]; + lineof_temp[313] = [192,4,205,74]; + lineof_temp[3026] = [1798,43,1827,62]; + lineof_temp[1110] = [675,20,690,45]; + lineof_temp[640] = [398,2,418,72]; + lineof_temp[6932] = [3960,4,3992,53]; + lineof_temp[6192] = [3613,13,3613,26]; + lineof_temp[686] = [454,2,454,77]; + lineof_temp[17] = [28,36,28,40]; + lineof_temp[2943] = [1779,10,1779,20]; + lineof_temp[430] = [326,35,326,60]; + lineof_temp[392] = [294,15,294,55]; + lineof_temp[6797] = [3933,10,3933,28]; + lineof_temp[2800] = [1639,2,1653,65]; + lineof_temp[6688] = [3859,64,3859,81]; + lineof_temp[6447] = [3729,31,3729,50]; + lineof_temp[6428] = [3712,10,3712,26]; + lineof_temp[2207] = [1265,17,1267,86]; + lineof_temp[7119] = [4060,8,4077,89]; + lineof_temp[6677] = [3830,22,3830,68]; + lineof_temp[6424] = [3713,10,3719,75]; + lineof_temp[2258] = [1291,21,1291,34]; + lineof_temp[433] = [317,9,326,61]; + lineof_temp[4426] = [2527,6,2538,88]; + lineof_temp[7005] = [4028,31,4028,64]; + lineof_temp[4415] = [2532,22,2538,88]; + lineof_temp[2588] = [1534,44,1534,57]; + lineof_temp[186] = [129,7,129,44]; + lineof_temp[923] = [620,14,620,46]; + lineof_temp[6263] = [3641,21,3641,37]; + lineof_temp[5227] = [3042,15,3061,36]; + lineof_temp[2994] = [1825,60,1825,85]; + lineof_temp[2376] = [1385,4,1385,27]; + lineof_temp[2363] = [1375,4,1375,20]; + lineof_temp[1742] = [985,4,985,22]; + lineof_temp[7235] = [4123,7,4126,49]; + lineof_temp[6327] = [3662,10,3662,28]; + lineof_temp[5972] = [3503,57,3503,87]; + lineof_temp[3006] = [1826,53,1826,87]; + lineof_temp[7310] = [4163,20,4163,60]; + lineof_temp[237] = [137,7,153,65]; + lineof_temp[6890] = [3975,17,3975,52]; + lineof_temp[7215] = [4119,23,4119,38]; + lineof_temp[484] = [337,4,341,62]; + lineof_temp[4972] = [2910,12,2931,57]; + lineof_temp[1309] = [735,8,735,51]; + lineof_temp[3377] = [2068,22,2071,104]; + lineof_temp[5701] = [3342,4,3342,38]; + lineof_temp[2615] = [1538,35,1544,53]; + lineof_temp[2152] = [1198,2,1223,52]; + lineof_temp[4909] = [2883,17,2888,49]; + lineof_temp[3560] = [2165,105,2165,126]; + lineof_temp[1511] = [828,16,828,58]; + lineof_temp[6114] = [3558,11,3570,71]; + lineof_temp[7173] = [4079,4,4102,87]; + lineof_temp[4521] = [2679,36,2684,88]; + lineof_temp[3512] = [2097,6,2125,65]; + lineof_temp[4361] = [2592,14,2595,67]; + lineof_temp[3771] = [2284,22,2284,79]; + lineof_temp[3681] = [2220,10,2223,55]; + lineof_temp[7079] = [4060,29,4060,48]; + lineof_temp[4927] = [2910,18,2910,39]; + lineof_temp[1880] = [1084,44,1084,90]; + lineof_temp[6027] = [3529,22,3529,81]; + lineof_temp[3458] = [2116,27,2117,78]; + lineof_temp[2213] = [1264,91,1264,103]; + lineof_temp[1465] = [806,4,806,46]; + lineof_temp[1395] = [768,38,774,101]; + lineof_temp[4134] = [2470,25,2470,85]; + lineof_temp[1323] = [731,6,735,51]; + lineof_temp[5200] = [3050,28,3050,83]; + lineof_temp[5008] = [2954,38,2954,84]; + lineof_temp[4679] = [2765,9,2766,26]; + lineof_temp[2998] = [1824,55,1825,86]; + lineof_temp[1344] = [757,32,757,61]; + lineof_temp[901] = [593,9,593,67]; + lineof_temp[4698] = [2773,9,2774,26]; + lineof_temp[7381] = [4186,2,4186,43]; + lineof_temp[3030] = [1794,31,1831,78]; + lineof_temp[6729] = [3904,83,3905,118]; + lineof_temp[5851] = [3412,8,3415,44]; + lineof_temp[5804] = [3389,14,3390,44]; + lineof_temp[744] = [499,14,499,70]; + lineof_temp[4990] = [2944,40,2944,74]; + lineof_temp[2609] = [1544,40,1544,53]; + lineof_temp[559] = [379,4,386,94]; + lineof_temp[439] = [308,4,326,62]; + lineof_temp[6701] = [3871,73,3872,107]; + lineof_temp[4568] = [2706,62,2706,99]; + lineof_temp[2313] = [1326,4,1326,33]; + lineof_temp[2081] = [1181,10,1183,59]; + lineof_temp[6189] = [3613,30,3613,63]; + lineof_temp[2424] = [1429,4,1429,25]; + lineof_temp[2044] = [1164,33,1164,48]; + lineof_temp[1072] = [682,24,682,30]; + lineof_temp[7364] = [4176,2,4176,18]; + lineof_temp[6815] = [3946,47,3946,80]; + lineof_temp[5510] = [3240,20,3240,69]; + lineof_temp[4791] = [2821,10,2832,56]; + lineof_temp[3410] = [2086,29,2086,75]; + lineof_temp[1190] = [697,23,697,92]; + lineof_temp[6091] = [3566,16,3566,74]; + lineof_temp[5780] = [3374,14,3374,57]; + lineof_temp[4612] = [2720,4,2724,89]; + lineof_temp[5272] = [3086,19,3087,52]; + lineof_temp[6390] = [3693,13,3693,29]; + lineof_temp[1317] = [733,11,733,20]; + lineof_temp[302] = [203,30,203,57]; + lineof_temp[6042] = [3514,4,3514,13]; + lineof_temp[2406] = [1413,4,1413,32]; + lineof_temp[2250] = [1289,22,1289,40]; + lineof_temp[1774] = [994,10,994,35]; + lineof_temp[6039] = [3515,4,3532,68]; + lineof_temp[5431] = [3201,22,3201,43]; + lineof_temp[4353] = [2590,14,2590,30]; + lineof_temp[1113] = [655,48,655,72]; + lineof_temp[6887] = [3974,38,3974,80]; + lineof_temp[386] = [278,4,278,38]; + lineof_temp[5191] = [3042,33,3042,51]; + lineof_temp[3049] = [1838,4,1839,25]; + lineof_temp[620] = [418,35,418,70]; + lineof_temp[2362] = [1372,4,1372,25]; + lineof_temp[1359] = [763,42,763,65]; + lineof_temp[6771] = [3919,15,3919,31]; + lineof_temp[6596] = [3791,18,3791,34]; + lineof_temp[1540] = [848,42,848,66]; + lineof_temp[2551] = [1507,35,1513,53]; + lineof_temp[5490] = [3239,71,3239,87]; + lineof_temp[83] = [65,13,65,72]; + lineof_temp[6179] = [3603,8,3606,63]; + lineof_temp[3597] = [2175,30,2175,82]; + lineof_temp[2789] = [1643,4,1652,7]; + lineof_temp[6845] = [3941,21,3957,64]; + lineof_temp[4960] = [2914,18,2930,89]; + lineof_temp[1761] = [1003,16,1003,86]; + lineof_temp[5320] = [3109,19,3110,52]; + lineof_temp[287] = [198,9,198,36]; + lineof_temp[3874] = [2354,19,2355,58]; + lineof_temp[6956] = [4004,10,4004,26]; + lineof_temp[6513] = [3747,8,3755,7]; + lineof_temp[714] = [465,26,472,77]; + lineof_temp[115] = [88,21,88,25]; + lineof_temp[7380] = [4186,2,4186,43]; + lineof_temp[6059] = [3546,19,3546,78]; + lineof_temp[927] = [620,14,620,84]; + lineof_temp[232] = [144,22,144,41]; + lineof_temp[2267] = [1293,23,1293,36]; + lineof_temp[643] = [425,4,425,20]; + lineof_temp[1810] = [1019,26,1019,72]; + lineof_temp[1348] = [757,32,758,88]; + lineof_temp[5998] = [3513,8,3513,70]; + lineof_temp[248] = [181,6,181,33]; + lineof_temp[7190] = [4108,14,4109,39]; + lineof_temp[7049] = [4047,16,4047,40]; + lineof_temp[6931] = [3969,7,3969,25]; + lineof_temp[5864] = [3423,4,3424,70]; + lineof_temp[872] = [584,35,584,55]; + lineof_temp[652] = [424,2,429,43]; + lineof_temp[6331] = [3667,13,3667,29]; + lineof_temp[37] = [43,22,43,47]; + lineof_temp[6760] = [3848,32,3915,122]; + lineof_temp[4885] = [2878,40,2878,74]; + lineof_temp[4000] = [2407,2,2413,87]; + lineof_temp[3088] = [1868,7,1876,48]; + lineof_temp[5464] = [3220,8,3220,68]; + lineof_temp[4923] = [2905,7,2905,24]; + lineof_temp[739] = [485,12,485,28]; + lineof_temp[1942] = [1060,4,1108,59]; + lineof_temp[6426] = [3713,10,3719,75]; + lineof_temp[1927] = [1095,22,1095,47]; + lineof_temp[5983] = [3492,10,3504,53]; + lineof_temp[722] = [488,28,488,71]; + lineof_temp[311] = [205,29,205,73]; + lineof_temp[191] = [126,2,130,12]; + lineof_temp[1410] = [756,25,776,59]; + lineof_temp[6309] = [3651,33,3657,7]; + lineof_temp[3239] = [1937,8,1979,77]; + lineof_temp[972] = [616,12,616,41]; + lineof_temp[4733] = [2784,4,2784,5]; + lineof_temp[1943] = [1060,4,1108,59]; + lineof_temp[7083] = [4064,39,4064,60]; + lineof_temp[5826] = [3395,26,3396,59]; + lineof_temp[1901] = [1066,20,1090,65]; + lineof_temp[462] = [334,32,334,43]; + lineof_temp[2046] = [1164,13,1165,41]; + lineof_temp[494] = [307,2,341,62]; + lineof_temp[5100] = [2990,32,2990,66]; + lineof_temp[3463] = [2119,27,2120,78]; + lineof_temp[2980] = [1804,48,1806,113]; + lineof_temp[3743] = [2266,66,2266,91]; + lineof_temp[6828] = [3952,29,3952,46]; + lineof_temp[1141] = [670,25,673,127]; + lineof_temp[1916] = [1106,42,1106,84]; + lineof_temp[1727] = [975,8,979,80]; + lineof_temp[5391] = [3170,4,3175,29]; + lineof_temp[2964] = [1831,69,1831,78]; + lineof_temp[770] = [495,12,514,90]; + lineof_temp[406] = [294,2,300,94]; + lineof_temp[6852] = [3935,7,3958,52]; + lineof_temp[6849] = [3939,18,3957,65]; + lineof_temp[1162] = [654,21,673,127]; + lineof_temp[7174] = [4079,4,4102,87]; + lineof_temp[467] = [338,22,338,58]; + lineof_temp[383] = [277,26,277,70]; + lineof_temp[4327] = [2575,17,2575,71]; + lineof_temp[3786] = [2293,32,2297,64]; + lineof_temp[2691] = [1566,4,1592,43]; + lineof_temp[1083] = [688,23,688,49]; + lineof_temp[4871] = [2864,9,2868,35]; + lineof_temp[4240] = [2505,29,2505,49]; + lineof_temp[1620] = [896,29,904,83]; + lineof_temp[6593] = [3792,18,3794,64]; + lineof_temp[6564] = [3780,4,3780,75]; + lineof_temp[5656] = [3327,4,3328,93]; + lineof_temp[3557] = [2162,45,2163,92]; + lineof_temp[1149] = [661,28,661,66]; + lineof_temp[3888] = [2359,20,2364,28]; + lineof_temp[527] = [369,8,369,41]; + lineof_temp[4810] = [2835,13,2837,88]; + lineof_temp[3417] = [2089,25,2089,36]; + lineof_temp[2977] = [1804,60,1804,106]; + lineof_temp[2493] = [1477,14,1477,71]; + lineof_temp[3118] = [1910,51,1911,101]; + lineof_temp[6318] = [3664,18,3664,70]; + lineof_temp[6786] = [3931,40,3931,67]; + lineof_temp[2703] = [1599,8,1600,83]; + lineof_temp[601] = [414,16,414,20]; + lineof_temp[90] = [58,2,65,72]; + lineof_temp[3581] = [2150,23,2167,180]; + lineof_temp[648] = [428,4,429,43]; + lineof_temp[7002] = [4016,23,4027,82]; + lineof_temp[5607] = [3300,4,3300,60]; + lineof_temp[5297] = [3095,2,3096,37]; + lineof_temp[4098] = [2457,24,2457,57]; + lineof_temp[3704] = [2237,7,2245,56]; + lineof_temp[1778] = [1005,22,1005,91]; + lineof_temp[611] = [403,6,414,20]; + lineof_temp[836] = [539,4,554,60]; + lineof_temp[3970] = [2402,2,2404,17]; + lineof_temp[6976] = [4013,17,4013,52]; + lineof_temp[6319] = [3664,18,3664,70]; + lineof_temp[3223] = [1957,34,1969,85]; + lineof_temp[2723] = [1615,15,1616,21]; + lineof_temp[2634] = [1545,32,1545,51]; + lineof_temp[51] = [51,21,51,62]; + lineof_temp[5803] = [3390,14,3390,44]; + lineof_temp[7009] = [4014,21,4028,64]; + lineof_temp[6928] = [3970,7,3992,52]; + lineof_temp[13] = [19,2,23,11]; + lineof_temp[6670] = [3815,4,3815,36]; + lineof_temp[2131] = [1220,20,1223,52]; + lineof_temp[6517] = [3745,4,3745,42]; + lineof_temp[3340] = [2055,41,2059,107]; + lineof_temp[1915] = [1106,42,1106,84]; + lineof_temp[5432] = [3201,22,3201,43]; + lineof_temp[2087] = [1156,11,1157,74]; + lineof_temp[1697] = [957,2,958,45]; + lineof_temp[7115] = [4061,12,4077,89]; + lineof_temp[4494] = [2660,10,2660,70]; + lineof_temp[4331] = [2583,51,2583,74]; + lineof_temp[2264] = [1292,4,1292,19]; + lineof_temp[1537] = [845,8,847,90]; + lineof_temp[858] = [578,23,578,56]; + lineof_temp[3940] = [2375,4,2376,62]; + lineof_temp[3366] = [2067,28,2067,80]; + lineof_temp[76] = [60,12,63,41]; + lineof_temp[3793] = [2285,20,2297,64]; + lineof_temp[2915] = [1762,20,1765,78]; + lineof_temp[2280] = [1306,37,1306,71]; + lineof_temp[1327] = [740,9,740,63]; + lineof_temp[190] = [127,2,130,12]; + lineof_temp[3494] = [2124,27,2124,81]; + lineof_temp[4952] = [2928,36,2928,82]; + lineof_temp[1036] = [640,20,640,89]; + lineof_temp[6138] = [3581,14,3583,35]; + lineof_temp[5712] = [3349,4,3350,30]; + lineof_temp[5249] = [3072,6,3073,45]; + lineof_temp[4636] = [2745,22,2745,30]; + lineof_temp[7256] = [4136,16,4136,41]; + lineof_temp[4892] = [2881,19,2881,73]; + lineof_temp[2556] = [1519,43,1520,101]; + lineof_temp[2217] = [1260,8,1267,86]; + lineof_temp[572] = [376,2,391,46]; + lineof_temp[411] = [308,22,308,53]; + lineof_temp[3203] = [1979,36,1979,77]; + lineof_temp[7268] = [4139,13,4139,29]; + lineof_temp[6826] = [3953,29,3953,62]; + lineof_temp[6802] = [3936,9,3936,44]; + lineof_temp[1925] = [1099,25,1099,47]; + lineof_temp[1368] = [765,52,765,88]; + lineof_temp[396] = [300,37,300,90]; + lineof_temp[6432] = [3722,27,3722,65]; + lineof_temp[5288] = [3095,39,3095,47]; + lineof_temp[3964] = [2397,2,2397,65]; + lineof_temp[4332] = [2581,21,2583,77]; + lineof_temp[6641] = [3796,18,3813,76]; + lineof_temp[5848] = [3414,13,3415,44]; + lineof_temp[6500] = [3751,22,3751,47]; + lineof_temp[5681] = [3335,4,3336,67]; + lineof_temp[4831] = [2850,10,2850,64]; + lineof_temp[3229] = [1948,21,1979,77]; + lineof_temp[2103] = [1208,19,1208,49]; + lineof_temp[2100] = [1199,19,1199,57]; + lineof_temp[1842] = [1060,24,1060,48]; + lineof_temp[1940] = [1061,8,1108,59]; + lineof_temp[5453] = [3190,6,3210,28]; + lineof_temp[3028] = [1797,41,1828,52]; + lineof_temp[1287] = [633,2,722,28]; + lineof_temp[618] = [417,20,417,44]; + lineof_temp[5833] = [3406,8,3410,90]; + lineof_temp[5150] = [3018,23,3018,41]; + lineof_temp[4393] = [2585,8,2585,9]; + lineof_temp[2754] = [1640,29,1640,61]; + lineof_temp[5550] = [3274,25,3275,46]; + lineof_temp[133] = [107,24,107,41]; + lineof_temp[5146] = [3015,20,3015,73]; + lineof_temp[3656] = [2132,2,2201,61]; + lineof_temp[978] = [609,13,609,33]; + lineof_temp[4716] = [2783,24,2783,50]; + lineof_temp[4668] = [2753,26,2758,58]; + lineof_temp[6304] = [3655,10,3656,100]; + lineof_temp[6813] = [3946,47,3946,80]; + lineof_temp[5448] = [3202,21,3202,28]; + lineof_temp[1279] = [702,4,722,28]; + lineof_temp[6994] = [4026,29,4026,62]; + lineof_temp[5676] = [3333,32,3333,57]; + lineof_temp[200] = [137,10,137,19]; + lineof_temp[2518] = [1555,36,1562,103]; + lineof_temp[1817] = [1025,26,1025,86]; + lineof_temp[369] = [254,34,254,75]; + lineof_temp[1583] = [876,19,877,34]; + lineof_temp[6943] = [3994,4,3997,50]; + lineof_temp[3942] = [2383,38,2383,62]; + lineof_temp[2928] = [1767,26,1767,35]; + lineof_temp[5499] = [3235,23,3239,87]; + lineof_temp[358] = [239,2,242,105]; + lineof_temp[6605] = [3803,44,3803,77]; + lineof_temp[1710] = [968,8,973,38]; + lineof_temp[5497] = [3235,23,3239,87]; + lineof_temp[4238] = [2504,30,2504,51]; + lineof_temp[6957] = [4006,10,4006,66]; + lineof_temp[3590] = [2143,12,2168,15]; + lineof_temp[3360] = [2034,21,2061,69]; + lineof_temp[2164] = [1237,15,1237,53]; + lineof_temp[2902] = [1755,4,1755,6]; + lineof_temp[350] = [232,7,232,69]; + lineof_temp[329] = [220,31,220,32]; + lineof_temp[3098] = [1887,24,1888,74]; + lineof_temp[2999] = [1824,55,1825,86]; + lineof_temp[1176] = [692,75,692,96]; + lineof_temp[179] = [86,2,121,42]; + lineof_temp[6462] = [3729,10,3735,75]; + lineof_temp[2849] = [1701,9,1703,20]; + lineof_temp[5094] = [2977,2,2981,40]; + lineof_temp[4051] = [2433,21,2433,54]; + lineof_temp[3738] = [2230,2,2252,59]; + lineof_temp[3475] = [2121,27,2121,42]; + lineof_temp[4786] = [2830,12,2832,56]; + lineof_temp[2223] = [1269,20,1269,66]; + lineof_temp[1637] = [891,8,905,85]; + lineof_temp[501] = [347,2,348,51]; + lineof_temp[6036] = [3520,12,3532,68]; + lineof_temp[1147] = [663,28,663,47]; + lineof_temp[3178] = [1924,44,1924,65]; + lineof_temp[1574] = [874,11,874,36]; + lineof_temp[1495] = [819,26,819,45]; + lineof_temp[5958] = [3484,45,3484,68]; + lineof_temp[4775] = [2827,26,2827,52]; + lineof_temp[7371] = [4181,27,4181,56]; + lineof_temp[4681] = [2765,9,2766,26]; + lineof_temp[2514] = [1500,37,1500,58]; + lineof_temp[1679] = [943,22,943,60]; + lineof_temp[633] = [401,4,418,72]; + lineof_temp[2991] = [1824,60,1824,83]; + lineof_temp[309] = [205,43,205,73]; + lineof_temp[6975] = [4012,38,4012,80]; + lineof_temp[4792] = [2835,32,2835,56]; + lineof_temp[4061] = [2443,7,2443,79]; + lineof_temp[2325] = [1337,4,1337,30]; + lineof_temp[6516] = [3746,4,3755,7]; + lineof_temp[6222] = [3625,14,3625,39]; + lineof_temp[5120] = [2989,10,2995,60]; + lineof_temp[1440] = [781,4,781,19]; + lineof_temp[6681] = [3830,10,3832,56]; + lineof_temp[5463] = [3220,8,3220,68]; + lineof_temp[6613] = [3805,46,3805,79]; + lineof_temp[5910] = [3448,10,3448,35]; + lineof_temp[3496] = [2114,24,2124,82]; + lineof_temp[6585] = [3789,15,3789,38]; + lineof_temp[5786] = [3373,4,3373,44]; + lineof_temp[5062] = [2943,18,2971,59]; + lineof_temp[7018] = [4008,7,4008,25]; + lineof_temp[5984] = [3483,10,3504,53]; + lineof_temp[5588] = [3291,42,3291,68]; + lineof_temp[5060] = [2946,20,2971,59]; + lineof_temp[1188] = [697,23,697,69]; + lineof_temp[5946] = [3476,22,3476,55]; + lineof_temp[1220] = [714,18,714,78]; + lineof_temp[884] = [590,20,590,46]; + lineof_temp[6023] = [3528,20,3528,67]; + lineof_temp[5078] = [2977,21,2977,48]; + lineof_temp[3139] = [1897,35,1914,95]; + lineof_temp[3880] = [2360,20,2362,59]; + lineof_temp[700] = [468,71,468,97]; + lineof_temp[6721] = [3861,63,3877,77]; + lineof_temp[2808] = [1669,21,1670,89]; + lineof_temp[2205] = [1265,29,1265,98]; + lineof_temp[805] = [556,7,560,11]; + lineof_temp[4970] = [2931,22,2931,57]; + lineof_temp[2678] = [1592,31,1592,43]; + lineof_temp[5052] = [2970,29,2970,93]; + lineof_temp[3905] = [2344,20,2344,45]; + lineof_temp[3915] = [2338,20,2338,27]; + lineof_temp[6817] = [3947,46,3947,79]; + lineof_temp[1165] = [654,21,673,127]; + lineof_temp[4884] = [2847,2,2871,68]; + lineof_temp[4189] = [2482,4,2482,21]; + lineof_temp[3501] = [2125,24,2125,46]; + lineof_temp[274] = [189,4,190,33]; + lineof_temp[6307] = [3655,10,3656,100]; + lineof_temp[2670] = [1588,26,1588,42]; + lineof_temp[5036] = [2966,46,2966,92]; + lineof_temp[4124] = [2469,57,2469,63]; + lineof_temp[683] = [454,56,454,77]; + lineof_temp[3860] = [2331,14,2331,71]; + lineof_temp[319] = [212,19,212,27]; + lineof_temp[6820] = [3947,29,3947,42]; + lineof_temp[3329] = [2048,41,2048,50]; + lineof_temp[243] = [172,35,172,50]; + lineof_temp[6472] = [3743,48,3743,68]; + lineof_temp[3110] = [1895,36,1895,67]; + lineof_temp[1530] = [835,2,836,60]; + lineof_temp[4489] = [2624,4,2652,33]; + lineof_temp[3784] = [2297,53,2297,64]; + lineof_temp[3625] = [2183,32,2200,86]; + lineof_temp[7343] = [4160,4,4160,23]; + lineof_temp[6210] = [3617,10,3617,28]; + lineof_temp[5081] = [2979,19,2979,41]; + lineof_temp[6772] = [3921,87,3921,115]; + lineof_temp[4285] = [2555,20,2557,38]; + lineof_temp[4199] = [2485,27,2485,46]; + lineof_temp[5276] = [3085,14,3088,62]; + lineof_temp[5880] = [3435,15,3435,47]; + lineof_temp[4855] = [2853,11,2862,89]; + lineof_temp[4208] = [2487,4,2488,66]; + lineof_temp[3862] = [2331,14,2331,71]; + lineof_temp[3222] = [1957,34,1969,85]; + lineof_temp[3019] = [1815,52,1821,75]; + lineof_temp[3065] = [1858,2,1858,56]; + lineof_temp[1092] = [681,24,689,84]; + lineof_temp[208] = [142,20,142,43]; + lineof_temp[4303] = [2547,14,2547,32]; + lineof_temp[3154] = [1883,15,1914,95]; + lineof_temp[2058] = [1179,16,1179,58]; + lineof_temp[1156] = [657,26,657,61]; + lineof_temp[6561] = [3768,8,3778,7]; + lineof_temp[6259] = [3638,13,3638,29]; + lineof_temp[4971] = [2931,14,2931,18]; + lineof_temp[3220] = [1963,39,1969,85]; + lineof_temp[2700] = [1598,13,1598,29]; + lineof_temp[6575] = [3783,9,3784,70]; + lineof_temp[4581] = [2703,25,2713,94]; + lineof_temp[3367] = [2071,34,2071,83]; + lineof_temp[1394] = [768,38,774,101]; + lineof_temp[5521] = [3247,6,3247,52]; + lineof_temp[5209] = [3061,29,3061,36]; + lineof_temp[2027] = [1160,10,1161,67]; + lineof_temp[6089] = [3566,38,3566,56]; + lineof_temp[1095] = [680,24,680,43]; + lineof_temp[7122] = [4079,25,4079,44]; + lineof_temp[5216] = [3056,34,3058,52]; + lineof_temp[4422] = [2528,10,2538,88]; + lineof_temp[1437] = [784,7,786,55]; + lineof_temp[5273] = [3086,19,3087,52]; + lineof_temp[1260] = [712,13,712,79]; + lineof_temp[4421] = [2529,14,2538,88]; + lineof_temp[1920] = [1104,29,1106,100]; + lineof_temp[5798] = [3385,27,3385,55]; + lineof_temp[1587] = [875,13,878,75]; + lineof_temp[955] = [613,15,613,70]; + lineof_temp[7098] = [4076,39,4077,89]; + lineof_temp[5109] = [2994,18,2994,25]; + lineof_temp[6910] = [3979,26,3979,42]; + lineof_temp[3772] = [2284,22,2284,79]; + lineof_temp[7149] = [4094,26,4102,87]; + lineof_temp[6381] = [3690,75,3690,105]; + lineof_temp[3728] = [2248,8,2252,59]; + lineof_temp[4764] = [2818,25,2818,42]; + lineof_temp[3734] = [2247,4,2252,59]; + lineof_temp[861] = [578,60,578,90]; + lineof_temp[3357] = [2037,26,2061,69]; + lineof_temp[3105] = [1890,50,1890,69]; + lineof_temp[5006] = [2954,86,2954,107]; + lineof_temp[4275] = [2548,37,2548,52]; + lineof_temp[1216] = [709,37,709,46]; + lineof_temp[6289] = [3640,12,3649,7]; + lineof_temp[3690] = [2206,43,2223,55]; + lineof_temp[3834] = [2318,32,2318,48]; + lineof_temp[1475] = [808,64,808,85]; + lineof_temp[5352] = [3131,35,3131,61]; + lineof_temp[2549] = [1507,35,1513,53]; + lineof_temp[4555] = [2659,2,2688,78]; + lineof_temp[6225] = [3624,10,3625,39]; + lineof_temp[4468] = [2644,18,2644,33]; + lineof_temp[602] = [414,16,414,20]; + lineof_temp[7228] = [4126,16,4126,49]; + lineof_temp[1212] = [707,25,707,83]; + lineof_temp[541] = [356,2,370,22]; + lineof_temp[2845] = [1678,2,1693,82]; + lineof_temp[4021] = [2425,55,2425,71]; + lineof_temp[3164] = [1866,48,1866,56]; + lineof_temp[448] = [330,9,330,44]; + lineof_temp[5627] = [3312,20,3312,57]; + lineof_temp[5004] = [2948,24,2951,53]; + lineof_temp[3275] = [2015,22,2016,113]; + lineof_temp[6946] = [4002,28,4002,61]; + lineof_temp[4629] = [2737,4,2738,32]; + lineof_temp[1693] = [943,2,950,47]; + lineof_temp[1467] = [798,4,806,46]; + lineof_temp[860] = [578,60,578,90]; + lineof_temp[5898] = [3443,4,3444,49]; + lineof_temp[3477] = [2122,68,2122,87]; + lineof_temp[6740] = [3907,84,3915,122]; + lineof_temp[5745] = [3360,30,3360,53]; + lineof_temp[5696] = [3340,39,3340,70]; + lineof_temp[3949] = [2390,40,2390,56]; + lineof_temp[3750] = [2268,35,2271,36]; + lineof_temp[1267] = [705,4,722,28]; + lineof_temp[6863] = [3964,27,3964,60]; + lineof_temp[4567] = [2706,62,2706,99]; + lineof_temp[3167] = [1866,37,1866,42]; + lineof_temp[2950] = [1793,36,1793,88]; + lineof_temp[2489] = [1479,13,1480,63]; + lineof_temp[1129] = [667,43,669,60]; + lineof_temp[1084] = [685,26,688,49]; + lineof_temp[7280] = [4142,4,4142,32]; + lineof_temp[2470] = [1470,16,1472,24]; + lineof_temp[6573] = [3783,19,3783,62]; + lineof_temp[3832] = [2318,32,2318,48]; + lineof_temp[2571] = [1527,43,1528,101]; + lineof_temp[1488] = [817,7,817,21]; + lineof_temp[4333] = [2579,19,2583,77]; + lineof_temp[426] = [325,15,325,33]; + lineof_temp[1182] = [692,15,694,60]; + lineof_temp[6576] = [3783,9,3784,70]; + lineof_temp[5251] = [3071,17,3071,47]; + lineof_temp[3068] = [1851,2,1858,56]; + lineof_temp[4951] = [2928,36,2928,82]; + lineof_temp[3663] = [2209,22,2209,60]; + lineof_temp[1032] = [637,22,637,64]; + lineof_temp[168] = [118,10,118,27]; + lineof_temp[4288] = [2561,25,2561,68]; + lineof_temp[3318] = [2053,60,2053,70]; + lineof_temp[2367] = [1379,4,1379,26]; + lineof_temp[4973] = [2909,7,2931,57]; + lineof_temp[2866] = [1745,61,1746,96]; + lineof_temp[528] = [369,8,369,41]; + lineof_temp[2732] = [1628,35,1628,80]; + lineof_temp[1298] = [731,27,731,54]; + lineof_temp[1278] = [702,4,722,28]; + lineof_temp[428] = [318,12,318,28]; + lineof_temp[4258] = [2517,7,2517,45]; + lineof_temp[6650] = [3825,9,3825,42]; + lineof_temp[6007] = [3517,15,3517,40]; + lineof_temp[3904] = [2345,20,2364,28]; + lineof_temp[7147] = [4096,31,4102,87]; + lineof_temp[4773] = [2822,12,2822,30]; + lineof_temp[3718] = [2251,18,2251,25]; + lineof_temp[1913] = [1098,25,1098,71]; + lineof_temp[5770] = [3368,4,3368,43]; + lineof_temp[4674] = [2763,5,2763,11]; + lineof_temp[2822] = [1662,7,1672,24]; + lineof_temp[5981] = [3502,10,3504,53]; + lineof_temp[3693] = [2239,24,2240,26]; + lineof_temp[3267] = [2007,4,2007,6]; + lineof_temp[3321] = [2051,46,2053,70]; + lineof_temp[2965] = [1829,41,1831,78]; + lineof_temp[508] = [357,22,357,55]; + lineof_temp[7349] = [4157,2,4168,61]; + lineof_temp[3802] = [2303,33,2305,37]; + lineof_temp[1208] = [705,24,705,45]; + lineof_temp[942] = [622,12,622,37]; + lineof_temp[694] = [460,43,460,78]; + lineof_temp[7288] = [4149,36,4149,95]; + lineof_temp[4695] = [2773,27,2773,55]; + lineof_temp[2889] = [1719,31,1747,102]; + lineof_temp[532] = [359,9,369,41]; + lineof_temp[1169] = [674,29,674,61]; + lineof_temp[1122] = [662,31,662,61]; + lineof_temp[452] = [328,4,331,32]; + lineof_temp[3520] = [2134,23,2134,67]; + lineof_temp[3987] = [2412,7,2413,87]; + lineof_temp[2435] = [1438,4,1438,24]; + lineof_temp[905] = [597,14,597,45]; + lineof_temp[6119] = [3554,2,3570,71]; + lineof_temp[5152] = [3017,19,3018,41]; + lineof_temp[4869] = [2868,23,2868,31]; + lineof_temp[3427] = [2023,2,2089,37]; + lineof_temp[2736] = [1630,35,1632,56]; + lineof_temp[5904] = [3449,22,3449,68]; + lineof_temp[5354] = [3132,24,3132,52]; + lineof_temp[4070] = [2434,2,2444,61]; + lineof_temp[2900] = [1755,10,1755,20]; + lineof_temp[865] = [582,24,582,65]; + lineof_temp[6340] = [3673,24,3673,43]; + lineof_temp[4112] = [2456,2,2460,28]; + lineof_temp[678] = [445,2,448,64]; + lineof_temp[2881] = [1727,47,1727,88]; + lineof_temp[1493] = [819,26,819,45]; + lineof_temp[7132] = [4092,37,4093,72]; + lineof_temp[5079] = [2978,15,2978,44]; + lineof_temp[2824] = [1659,2,1672,24]; + lineof_temp[6209] = [3617,32,3617,50]; + lineof_temp[363] = [248,34,248,57]; + lineof_temp[66] = [61,12,61,34]; + lineof_temp[3620] = [2193,44,2200,86]; + lineof_temp[4319] = [2566,14,2566,32]; + lineof_temp[3008] = [1822,53,1827,62]; + lineof_temp[2936] = [1759,12,1770,47]; + lineof_temp[1773] = [995,10,1003,87]; + lineof_temp[7335] = [4162,4,4167,96]; + lineof_temp[3800] = [2304,25,2304,79]; + lineof_temp[324] = [214,2,214,19]; + lineof_temp[4504] = [2671,43,2671,64]; + lineof_temp[4013] = [2416,2,2418,89]; + lineof_temp[1293] = [728,24,728,72]; + lineof_temp[5215] = [3056,34,3058,52]; + lineof_temp[4591] = [2697,10,2713,94]; + lineof_temp[3559] = [2161,45,2161,70]; + lineof_temp[2433] = [1436,4,1436,18]; + lineof_temp[533] = [359,9,369,41]; + lineof_temp[1664] = [915,11,915,17]; + lineof_temp[5655] = [3328,71,3328,93]; + lineof_temp[3697] = [2242,34,2242,68]; + lineof_temp[6558] = [3768,8,3778,7]; + lineof_temp[5099] = [2988,27,2988,54]; + lineof_temp[4617] = [2726,4,2727,77]; + lineof_temp[1633] = [892,12,905,85]; + lineof_temp[1558] = [861,25,861,54]; + lineof_temp[7250] = [4134,20,4134,57]; + lineof_temp[1700] = [965,15,965,53]; + lineof_temp[7269] = [4140,8,4141,71]; + lineof_temp[6588] = [3814,17,3814,50]; + lineof_temp[4558] = [2695,21,2695,46]; + lineof_temp[2326] = [1336,4,1336,41]; + lineof_temp[1652] = [921,14,921,38]; + lineof_temp[1391] = [774,39,774,100]; + lineof_temp[2373] = [1384,25,1384,31]; + lineof_temp[5670] = [3329,4,3329,22]; + lineof_temp[1155] = [657,26,657,61]; + lineof_temp[4563] = [2700,31,2701,31]; + lineof_temp[723] = [488,28,488,71]; + lineof_temp[6167] = [3594,8,3600,83]; + lineof_temp[3137] = [1897,35,1914,95]; + lineof_temp[802] = [555,10,555,25]; + lineof_temp[218] = [149,35,149,63]; + lineof_temp[3143] = [1894,30,1914,95]; + lineof_temp[240] = [135,2,153,65]; + lineof_temp[2233] = [1257,2,1271,95]; + lineof_temp[1308] = [735,8,735,51]; + lineof_temp[1158] = [655,21,673,127]; + lineof_temp[6176] = [3604,12,3606,63]; + lineof_temp[6116] = [3557,7,3570,71]; + lineof_temp[5533] = [3254,4,3255,55]; + lineof_temp[1889] = [1090,52,1090,63]; + lineof_temp[713] = [469,4,469,22]; + lineof_temp[2386] = [1394,4,1394,39]; + lineof_temp[724] = [489,15,489,71]; + lineof_temp[3290] = [2011,8,2016,125]; + lineof_temp[1472] = [795,4,806,46]; + lineof_temp[3091] = [1878,18,1878,39]; + lineof_temp[1786] = [1008,15,1008,28]; + lineof_temp[6242] = [3634,33,3634,67]; + lineof_temp[6530] = [3763,10,3764,50]; + lineof_temp[5727] = [3354,30,3354,51]; + lineof_temp[2380] = [1389,4,1389,36]; + lineof_temp[123] = [96,29,96,34]; + lineof_temp[4865] = [2865,13,2867,79]; + lineof_temp[3921] = [2328,6,2364,29]; + lineof_temp[3302] = [2024,4,2024,6]; + lineof_temp[2707] = [1605,20,1605,42]; + lineof_temp[495] = [347,15,347,50]; + lineof_temp[5950] = [3479,22,3479,68]; + lineof_temp[3522] = [2138,22,2138,47]; + lineof_temp[1649] = [919,14,920,89]; + lineof_temp[374] = [254,2,254,75]; + lineof_temp[6061] = [3543,14,3546,78]; + lineof_temp[4290] = [2561,25,2561,68]; + lineof_temp[3679] = [2222,15,2223,55]; + lineof_temp[3040] = [1783,12,1831,78]; + lineof_temp[1444] = [791,21,791,37]; + lineof_temp[5621] = [3305,13,3305,22]; + lineof_temp[4642] = [2748,8,2748,41]; + lineof_temp[1071] = [681,44,681,65]; + lineof_temp[6780] = [3926,28,3926,61]; + lineof_temp[3740] = [2258,4,2258,29]; + lineof_temp[4446] = [2627,74,2627,98]; + lineof_temp[1934] = [1091,17,1107,65]; + lineof_temp[5829] = [3407,21,3408,64]; + lineof_temp[5754] = [3362,4,3362,22]; + lineof_temp[1030] = [635,4,635,39]; + lineof_temp[483] = [337,4,341,62]; + lineof_temp[155] = [107,21,115,45]; + lineof_temp[3969] = [2402,2,2404,17]; + lineof_temp[1012] = [593,6,632,66]; + lineof_temp[994] = [608,10,608,45]; + lineof_temp[7341] = [4161,4,4167,96]; + lineof_temp[3021] = [1808,48,1827,62]; + lineof_temp[4159] = [2475,24,2475,66]; + lineof_temp[110] = [81,2,81,19]; + lineof_temp[5212] = [3054,30,3054,51]; + lineof_temp[4111] = [2458,4,2458,22]; + lineof_temp[3532] = [2134,10,2139,58]; + lineof_temp[3451] = [2101,22,2109,67]; + lineof_temp[2353] = [1365,4,1365,27]; + lineof_temp[2110] = [1206,17,1209,85]; + lineof_temp[6908] = [3988,29,3988,47]; + lineof_temp[5066] = [2942,14,2971,59]; + lineof_temp[4867] = [2868,23,2868,31]; + lineof_temp[2230] = [1257,2,1271,95]; + lineof_temp[40] = [43,2,43,18]; + lineof_temp[2730] = [1625,27,1625,46]; + lineof_temp[2485] = [1480,17,1480,63]; + lineof_temp[2097] = [1198,19,1198,55]; + lineof_temp[887] = [591,83,591,105]; + lineof_temp[1384] = [772,44,772,102]; + lineof_temp[5104] = [2992,27,2992,69]; + lineof_temp[1724] = [975,8,979,80]; + lineof_temp[1765] = [997,15,1003,87]; + lineof_temp[3948] = [2383,2,2383,71]; + lineof_temp[1856] = [1072,35,1072,75]; + lineof_temp[997] = [606,10,608,45]; + lineof_temp[5123] = [2988,6,2995,60]; + lineof_temp[2895] = [1705,12,1747,102]; + lineof_temp[2475] = [1473,14,1475,79]; + lineof_temp[6231] = [3628,13,3628,29]; + lineof_temp[6054] = [3545,28,3545,75]; + lineof_temp[3256] = [1993,12,1999,46]; + lineof_temp[2112] = [1203,29,1203,75]; + lineof_temp[1629] = [893,16,905,85]; + lineof_temp[1361] = [763,37,763,66]; + lineof_temp[7092] = [4075,41,4075,73]; + lineof_temp[7026] = [4033,15,4033,31]; + lineof_temp[1500] = [820,7,820,24]; + lineof_temp[4827] = [2818,2,2840,49]; + lineof_temp[4729] = [2785,4,2787,31]; + lineof_temp[4641] = [2747,22,2747,49]; + lineof_temp[3069] = [1850,2,1858,56]; + lineof_temp[6798] = [3925,7,3933,66]; + lineof_temp[5758] = [3364,4,3364,24]; + lineof_temp[3092] = [1881,15,1882,23]; + lineof_temp[552] = [384,19,384,65]; + lineof_temp[4762] = [2805,2,2811,71]; + lineof_temp[4649] = [2746,4,2746,13]; + lineof_temp[420] = [322,15,322,28]; + lineof_temp[7001] = [4027,26,4027,44]; + lineof_temp[6491] = [3746,13,3746,29]; + lineof_temp[6715] = [3865,62,3876,109]; + lineof_temp[6312] = [3659,13,3659,29]; + lineof_temp[669] = [434,26,439,86]; + lineof_temp[6482] = [3737,7,3743,72]; + lineof_temp[6965] = [4009,27,4009,64]; + lineof_temp[6425] = [3713,10,3719,75]; + lineof_temp[2864] = [1737,64,1740,98]; + lineof_temp[57] = [53,23,53,45]; + lineof_temp[750] = [503,32,503,75]; + lineof_temp[5642] = [3321,4,3322,30]; + lineof_temp[2239] = [1282,22,1282,40]; + lineof_temp[6949] = [4003,27,4003,60]; + lineof_temp[2272] = [1276,2,1294,64]; + lineof_temp[3626] = [2183,32,2200,86]; + lineof_temp[6534] = [3756,4,3756,45]; + lineof_temp[6511] = [3748,12,3755,7]; + lineof_temp[4824] = [2833,11,2840,49]; + lineof_temp[4692] = [2769,21,2769,48]; + lineof_temp[3857] = [2331,49,2331,71]; + lineof_temp[3568] = [2160,43,2167,180]; + lineof_temp[898] = [593,33,593,61]; + lineof_temp[3564] = [2165,45,2167,180]; + lineof_temp[70] = [63,12,63,41]; + lineof_temp[4495] = [2660,4,2660,6]; + lineof_temp[4253] = [2499,27,2510,28]; + lineof_temp[5328] = [3105,4,3111,70]; + lineof_temp[7316] = [4167,56,4167,96]; + lineof_temp[7271] = [4140,8,4141,71]; + lineof_temp[6113] = [3569,13,3569,31]; + lineof_temp[5792] = [3377,4,3377,33]; + lineof_temp[356] = [239,24,240,131]; + lineof_temp[7082] = [4064,39,4064,60]; + lineof_temp[2049] = [1175,28,1175,74]; + lineof_temp[712] = [470,4,472,77]; + lineof_temp[6082] = [3564,60,3564,74]; + lineof_temp[5865] = [3423,4,3424,70]; + lineof_temp[5633] = [3312,2,3313,62]; + lineof_temp[5170] = [3030,27,3030,43]; + lineof_temp[6993] = [4026,29,4026,62]; + lineof_temp[5275] = [3086,19,3087,52]; + lineof_temp[5048] = [2970,85,2970,93]; + lineof_temp[3046] = [1839,6,1839,25]; + lineof_temp[4226] = [2495,25,2495,46]; + lineof_temp[665] = [438,4,439,86]; + lineof_temp[4875] = [2851,9,2868,35]; + lineof_temp[3768] = [2267,19,2280,79]; + lineof_temp[2868] = [1743,69,1746,103]; + lineof_temp[6560] = [3768,8,3778,7]; + lineof_temp[6076] = [3561,34,3561,48]; + lineof_temp[3925] = [2318,2,2364,29]; + lineof_temp[4386] = [2605,14,2607,63]; + lineof_temp[4176] = [2479,33,2479,91]; + lineof_temp[5925] = [3463,10,3465,51]; + lineof_temp[6030] = [3532,17,3532,67]; + lineof_temp[3736] = [2246,4,2246,39]; + lineof_temp[5601] = [3292,16,3292,25]; + lineof_temp[1548] = [842,2,848,66]; + lineof_temp[866] = [580,24,580,61]; + lineof_temp[6646] = [3787,4,3814,50]; + lineof_temp[695] = [460,2,460,78]; + lineof_temp[5023] = [2963,55,2963,70]; + lineof_temp[1950] = [1116,6,1116,62]; + lineof_temp[4664] = [2756,4,2758,58]; + lineof_temp[3113] = [1894,36,1895,67]; + lineof_temp[2290] = [1307,13,1307,57]; + lineof_temp[6903] = [3987,29,3987,62]; + lineof_temp[2412] = [1418,4,1418,29]; + lineof_temp[6723] = [3888,73,3890,102]; + lineof_temp[937] = [623,24,623,70]; + lineof_temp[4261] = [2518,9,2518,19]; + lineof_temp[206] = [139,17,140,40]; + lineof_temp[1441] = [789,16,789,110]; + lineof_temp[30] = [37,2,37,19]; + lineof_temp[6651] = [3825,9,3825,42]; + lineof_temp[5520] = [3246,21,3246,47]; + lineof_temp[4905] = [2886,26,2888,49]; + lineof_temp[5631] = [3313,6,3313,62]; + lineof_temp[4004] = [2416,21,2416,53]; + lineof_temp[3249] = [1996,19,1997,45]; + lineof_temp[1178] = [692,27,692,73]; + lineof_temp[703] = [466,4,466,20]; + lineof_temp[333] = [222,27,222,47]; + lineof_temp[4930] = [2920,30,2920,82]; + lineof_temp[52] = [51,2,51,17]; + lineof_temp[6856] = [3923,4,3958,53]; + lineof_temp[6643] = [3790,17,3813,77]; + lineof_temp[4863] = [2865,13,2867,79]; + lineof_temp[4579] = [2703,25,2713,94]; + lineof_temp[2575] = [1525,42,1528,103]; + lineof_temp[2381] = [1391,27,1391,35]; + lineof_temp[4883] = [2847,2,2871,68]; + lineof_temp[577] = [401,16,401,37]; + lineof_temp[3573] = [2157,38,2157,67]; + lineof_temp[1590] = [873,8,873,34]; + lineof_temp[5515] = [3222,6,3240,70]; + lineof_temp[7285] = [4149,47,4149,69]; + lineof_temp[6172] = [3603,29,3603,46]; + lineof_temp[1489] = [818,24,818,57]; + lineof_temp[637] = [398,2,418,72]; + lineof_temp[4774] = [2827,26,2827,52]; + lineof_temp[6664] = [3824,10,3824,40]; + lineof_temp[6544] = [3772,22,3772,47]; + lineof_temp[2878] = [1735,51,1747,102]; + lineof_temp[2753] = [1640,29,1640,61]; + lineof_temp[1367] = [765,52,765,88]; + lineof_temp[583] = [408,28,408,73]; + lineof_temp[3168] = [1866,37,1866,42]; + lineof_temp[2778] = [1651,16,1651,49]; + lineof_temp[398] = [299,34,300,91]; + lineof_temp[3415] = [2086,17,2088,94]; + lineof_temp[4675] = [2763,5,2763,11]; + lineof_temp[2606] = [1542,43,1543,101]; + lineof_temp[2538] = [1512,66,1512,100]; + lineof_temp[7356] = [4156,2,4168,61]; + lineof_temp[6324] = [3663,10,3664,102]; + lineof_temp[540] = [356,15,356,43]; + lineof_temp[2336] = [1346,4,1346,30]; + lineof_temp[2129] = [1220,20,1223,52]; + lineof_temp[7178] = [4104,25,4104,44]; + lineof_temp[5294] = [3095,2,3096,37]; + lineof_temp[3244] = [1998,17,1999,46]; + lineof_temp[1494] = [819,26,819,45]; + lineof_temp[1140] = [670,25,673,127]; + lineof_temp[5739] = [3359,4,3359,50]; + lineof_temp[2921] = [1770,38,1770,47]; + lineof_temp[4677] = [2765,27,2765,55]; + lineof_temp[4630] = [2737,4,2738,32]; + lineof_temp[5716] = [3348,4,3348,19]; + lineof_temp[64] = [60,12,60,34]; + lineof_temp[3196] = [1945,28,1947,81]; + lineof_temp[2601] = [1543,66,1543,100]; + lineof_temp[1089] = [682,21,689,84]; + lineof_temp[845] = [536,2,561,64]; + lineof_temp[4050] = [2428,2,2430,72]; + lineof_temp[7267] = [4139,13,4139,29]; + lineof_temp[7106] = [4070,28,4077,89]; + lineof_temp[6235] = [3630,30,3630,63]; + lineof_temp[6191] = [3613,30,3613,63]; + lineof_temp[5641] = [3322,8,3322,30]; + lineof_temp[3245] = [1998,17,1999,46]; + lineof_temp[1596] = [869,2,880,84]; + lineof_temp[6507] = [3749,16,3755,7]; + lineof_temp[6648] = [3816,7,3816,30]; + lineof_temp[280] = [195,9,195,36]; + lineof_temp[5689] = [3338,31,3338,55]; + lineof_temp[2021] = [1160,10,1160,65]; + lineof_temp[1041] = [649,49,649,75]; + lineof_temp[458] = [333,31,333,38]; + lineof_temp[2869] = [1743,69,1746,103]; + lineof_temp[1049] = [676,41,676,97]; + lineof_temp[3257] = [1990,6,1999,46]; + lineof_temp[22] = [34,2,34,16]; + lineof_temp[2871] = [1741,56,1747,102]; + lineof_temp[6850] = [3937,13,3958,51]; + lineof_temp[1751] = [999,28,999,74]; + lineof_temp[2257] = [1291,21,1291,34]; + lineof_temp[6373] = [3687,30,3687,63]; + lineof_temp[5905] = [3449,22,3449,68]; + lineof_temp[4472] = [2638,14,2644,33]; + lineof_temp[3270] = [2010,8,2010,55]; + lineof_temp[2395] = [1404,26,1404,33]; + lineof_temp[2161] = [1230,2,1231,116]; + lineof_temp[2015] = [1159,31,1159,46]; + lineof_temp[1223] = [717,20,717,29]; + lineof_temp[5206] = [3050,28,3051,55]; + lineof_temp[1044] = [649,29,649,76]; + lineof_temp[4087] = [2453,30,2453,78]; + lineof_temp[1555] = [862,13,862,59]; + lineof_temp[7225] = [4124,14,4124,37]; + lineof_temp[5220] = [3059,31,3059,43]; + lineof_temp[6170] = [3602,13,3602,29]; + lineof_temp[157] = [105,16,115,45]; + lineof_temp[6939] = [3997,35,3997,50]; + lineof_temp[6169] = [3592,4,3592,33]; + lineof_temp[4991] = [2944,40,2944,74]; + lineof_temp[4351] = [2590,34,2590,50]; + lineof_temp[1643] = [887,2,905,85]; + lineof_temp[6916] = [3977,23,3977,29]; + lineof_temp[2985] = [1808,51,1808,76]; + lineof_temp[2075] = [1163,10,1163,37]; + lineof_temp[3851] = [2322,6,2327,20]; + lineof_temp[2834] = [1691,20,1693,82]; + lineof_temp[2342] = [1352,4,1352,33]; + lineof_temp[5516] = [3222,6,3240,70]; + lineof_temp[7027] = [4036,10,4036,68]; + lineof_temp[2649] = [1581,94,1581,108]; + lineof_temp[3712] = [2247,18,2247,65]; + lineof_temp[1663] = [916,11,933,89]; + lineof_temp[328] = [209,24,215,31]; + lineof_temp[5828] = [3407,21,3408,64]; + lineof_temp[1711] = [968,8,973,38]; + lineof_temp[6157] = [3599,49,3600,78]; + lineof_temp[6342] = [3673,14,3674,56]; + lineof_temp[710] = [470,4,472,77]; + lineof_temp[6136] = [3582,18,3583,35]; + lineof_temp[3659] = [2207,24,2207,57]; + lineof_temp[2607] = [1540,42,1543,103]; + lineof_temp[4999] = [2951,29,2951,53]; + lineof_temp[3056] = [1850,15,1850,35]; + lineof_temp[6323] = [3663,10,3664,102]; + lineof_temp[3151] = [1884,19,1914,95]; + lineof_temp[2831] = [1685,23,1687,77]; + lineof_temp[7216] = [4119,23,4119,38]; + lineof_temp[4037] = [2429,21,2429,39]; + lineof_temp[2059] = [1178,16,1178,34]; + lineof_temp[2017] = [1159,10,1159,75]; + lineof_temp[1890] = [1090,52,1090,63]; + lineof_temp[6583] = [3788,24,3788,40]; + lineof_temp[5179] = [3027,10,3032,79]; + lineof_temp[5142] = [3011,21,3011,48]; + lineof_temp[3721] = [2252,26,2252,59]; + lineof_temp[2620] = [1550,63,1550,97]; + lineof_temp[2652] = [1580,37,1581,112]; + lineof_temp[880] = [578,11,586,57]; + lineof_temp[7196] = [4104,4,4109,39]; + lineof_temp[3108] = [1893,36,1893,60]; + lineof_temp[377] = [260,2,260,55]; + lineof_temp[247] = [181,6,181,33]; + lineof_temp[5759] = [3365,35,3365,62]; + lineof_temp[4836] = [2854,28,2854,74]; + lineof_temp[6907] = [3989,29,3989,62]; + lineof_temp[519] = [365,23,365,92]; + lineof_temp[3799] = [2304,25,2304,79]; + lineof_temp[3730] = [2248,8,2252,59]; + lineof_temp[3518] = [2132,15,2132,59]; + lineof_temp[6844] = [3957,23,3957,27]; + lineof_temp[6300] = [3656,18,3656,70]; + lineof_temp[2379] = [1390,4,1390,25]; + lineof_temp[1393] = [772,38,774,101]; + lineof_temp[231] = [145,22,153,65]; + lineof_temp[131] = [105,19,105,36]; + lineof_temp[6884] = [3992,18,3992,51]; + lineof_temp[3057] = [1850,15,1850,35]; + lineof_temp[2467] = [1453,4,1465,81]; + lineof_temp[5598] = [3288,8,3288,15]; + lineof_temp[3835] = [2318,32,2318,48]; + lineof_temp[7247] = [4130,7,4132,45]; + lineof_temp[6357] = [3679,10,3679,26]; + lineof_temp[3755] = [2278,36,2278,90]; + lineof_temp[3584] = [2148,18,2167,180]; + lineof_temp[1584] = [878,16,878,75]; + lineof_temp[954] = [620,11,632,66]; + lineof_temp[6666] = [3823,10,3824,40]; + lineof_temp[6105] = [3559,13,3559,29]; + lineof_temp[5279] = [3083,6,3088,62]; + lineof_temp[3837] = [2319,35,2319,59]; + lineof_temp[2276] = [1302,4,1302,6]; + lineof_temp[5277] = [3084,10,3088,62]; + lineof_temp[2675] = [1591,49,1591,68]; + lineof_temp[2040] = [1190,10,1191,24]; + lineof_temp[6768] = [3827,4,3916,42]; + lineof_temp[6004] = [3515,22,3515,55]; + lineof_temp[5691] = [3339,34,3339,56]; + lineof_temp[4171] = [2478,42,2478,104]; + lineof_temp[3005] = [1826,53,1826,87]; + lineof_temp[2981] = [1804,48,1806,113]; + lineof_temp[2910] = [1764,27,1764,81]; + lineof_temp[6484] = [3736,7,3736,25]; + lineof_temp[581] = [404,20,404,41]; + lineof_temp[4651] = [2744,34,2748,41]; + lineof_temp[54] = [52,2,52,19]; + lineof_temp[5690] = [3338,4,3338,27]; + lineof_temp[5511] = [3240,12,3240,16]; + lineof_temp[2884] = [1724,37,1747,102]; + lineof_temp[1464] = [798,19,805,89]; + lineof_temp[6290] = [3639,8,3649,7]; + lineof_temp[6279] = [3646,23,3648,130]; + lineof_temp[6024] = [3530,22,3530,68]; + lineof_temp[2490] = [1479,13,1480,63]; + lineof_temp[1756] = [998,16,998,32]; + lineof_temp[918] = [610,14,610,74]; + lineof_temp[205] = [139,17,140,40]; + lineof_temp[6287] = [3644,19,3644,37]; + lineof_temp[2224] = [1269,20,1269,89]; + lineof_temp[5408] = [3168,2,3182,46]; + lineof_temp[2393] = [1403,4,1403,31]; + lineof_temp[639] = [398,2,418,72]; + lineof_temp[3936] = [2376,8,2376,61]; + lineof_temp[2532] = [1552,31,1564,123]; + lineof_temp[2035] = [1186,10,1188,47]; + lineof_temp[1843] = [1060,24,1060,48]; + lineof_temp[2048] = [1175,76,1175,97]; + lineof_temp[7252] = [4135,14,4135,37]; + lineof_temp[5542] = [3268,24,3269,65]; + lineof_temp[6807] = [3958,18,3958,51]; + lineof_temp[5308] = [3111,19,3111,70]; + lineof_temp[5082] = [2980,32,2980,59]; + lineof_temp[3285] = [2013,17,2013,24]; + lineof_temp[1466] = [798,4,806,46]; + lineof_temp[3910] = [2341,20,2341,27]; + lineof_temp[6506] = [3749,16,3755,7]; + lineof_temp[2780] = [1651,8,1651,12]; + lineof_temp[2451] = [1450,4,1450,23]; + lineof_temp[5462] = [3220,8,3220,68]; + lineof_temp[5552] = [3280,30,3280,51]; + lineof_temp[1062] = [678,44,678,97]; + lineof_temp[6927] = [3972,13,3992,51]; + lineof_temp[4687] = [2761,2,2766,26]; + lineof_temp[3937] = [2375,4,2376,62]; + lineof_temp[7231] = [4125,16,4125,41]; + lineof_temp[5235] = [3039,2,3062,41]; + lineof_temp[4943] = [2918,28,2925,94]; + lineof_temp[3569] = [2158,38,2167,180]; + lineof_temp[2331] = [1343,4,1343,25]; + lineof_temp[4209] = [2487,4,2488,66]; + lineof_temp[5914] = [3460,14,3460,38]; + lineof_temp[4128] = [2469,25,2469,74]; + lineof_temp[6557] = [3769,12,3778,7]; + lineof_temp[2010] = [1151,4,1151,25]; + lineof_temp[182] = [126,12,126,22]; + lineof_temp[3710] = [2231,4,2231,37]; + lineof_temp[6494] = [3747,29,3747,46]; + lineof_temp[5705] = [3343,37,3343,66]; + lineof_temp[6734] = [3908,99,3913,106]; + lineof_temp[2897] = [1700,2,1747,102]; + lineof_temp[2823] = [1662,7,1672,24]; + lineof_temp[603] = [414,16,414,20]; + lineof_temp[35] = [33,36,38,47]; + lineof_temp[6376] = [3687,10,3687,26]; + lineof_temp[1152] = [660,23,673,127]; + lineof_temp[1058] = [677,20,677,69]; + lineof_temp[6959] = [4007,32,4007,65]; + lineof_temp[4672] = [2762,11,2762,40]; + lineof_temp[4198] = [2485,27,2485,46]; + lineof_temp[4859] = [2865,73,2865,94]; + lineof_temp[1891] = [1088,32,1090,63]; + lineof_temp[6804] = [3937,16,3938,28]; + lineof_temp[5746] = [3360,4,3360,26]; + lineof_temp[4187] = [2482,25,2482,52]; + lineof_temp[4623] = [2737,28,2737,56]; + lineof_temp[1947] = [1059,2,1108,59]; + lineof_temp[7355] = [4156,2,4168,61]; + lineof_temp[3226] = [1953,30,1969,85]; + lineof_temp[3074] = [1870,25,1870,59]; + lineof_temp[4931] = [2919,30,2919,48]; + lineof_temp[2809] = [1671,21,1671,68]; + lineof_temp[641] = [398,2,418,72]; + lineof_temp[7203] = [4113,23,4113,39]; + lineof_temp[6805] = [3937,16,3938,28]; + lineof_temp[5444] = [3209,21,3209,33]; + lineof_temp[2144] = [1211,12,1223,52]; + lineof_temp[1656] = [930,40,930,66]; + lineof_temp[1908] = [1092,48,1092,57]; + lineof_temp[687] = [454,2,454,77]; + lineof_temp[6251] = [3632,10,3635,46]; + lineof_temp[265] = [186,4,187,33]; + lineof_temp[979] = [609,13,609,33]; + lineof_temp[4289] = [2561,25,2561,68]; + lineof_temp[567] = [377,2,391,46]; + lineof_temp[6918] = [3991,31,3991,64]; + lineof_temp[6206] = [3610,10,3610,26]; + lineof_temp[4929] = [2914,36,2914,56]; + lineof_temp[1325] = [739,17,739,44]; + lineof_temp[5022] = [2963,55,2963,70]; + lineof_temp[1961] = [1126,22,1126,48]; + lineof_temp[5649] = [3324,4,3325,85]; + lineof_temp[6647] = [3786,4,3786,37]; + lineof_temp[3907] = [2344,20,2344,45]; + lineof_temp[1820] = [1023,14,1025,103]; + lineof_temp[7153] = [4091,23,4102,87]; + lineof_temp[5285] = [3079,49,3088,62]; + lineof_temp[2062] = [1168,16,1168,62]; + lineof_temp[6923] = [3974,18,3991,65]; + lineof_temp[260] = [182,4,182,17]; + lineof_temp[7327] = [4164,4,4167,96]; + lineof_temp[1237] = [720,26,720,62]; + lineof_temp[5596] = [3289,8,3291,68]; + lineof_temp[3390] = [2073,17,2075,90]; + lineof_temp[2550] = [1507,35,1513,53]; + lineof_temp[1570] = [869,20,869,53]; + lineof_temp[1949] = [1115,15,1115,50]; + lineof_temp[48] = [50,2,50,15]; + lineof_temp[5930] = [3447,8,3465,51]; + lineof_temp[5650] = [3323,4,3323,22]; + lineof_temp[1797] = [1013,33,1013,80]; + lineof_temp[4540] = [2667,12,2684,88]; + lineof_temp[5176] = [3028,15,3028,31]; + lineof_temp[58] = [53,2,53,19]; + lineof_temp[7309] = [4163,20,4163,60]; + lineof_temp[6550] = [3770,16,3778,7]; + lineof_temp[6518] = [3757,13,3757,29]; + lineof_temp[697] = [460,2,460,78]; + lineof_temp[1295] = [728,24,728,72]; + lineof_temp[3150] = [1884,19,1914,95]; + lineof_temp[7375] = [4181,2,4181,57]; + lineof_temp[7373] = [4181,27,4181,56]; + lineof_temp[4299] = [2550,21,2550,57]; + lineof_temp[3708] = [2236,7,2236,26]; + lineof_temp[2630] = [1546,32,1551,51]; + lineof_temp[3462] = [2119,27,2120,78]; + lineof_temp[401] = [296,4,300,94]; + lineof_temp[223] = [153,42,153,65]; + lineof_temp[3432] = [2100,34,2100,74]; + lineof_temp[4707] = [2769,2,2774,26]; + lineof_temp[3606] = [2180,31,2180,51]; + lineof_temp[59] = [48,35,53,45]; + lineof_temp[4878] = [2871,4,2871,68]; + lineof_temp[4365] = [2597,32,2597,49]; + lineof_temp[2322] = [1332,4,1332,36]; + lineof_temp[2018] = [1159,10,1159,75]; + lineof_temp[4963] = [2914,18,2930,89]; + lineof_temp[5871] = [3429,22,3429,68]; + lineof_temp[4548] = [2687,11,2688,77]; + lineof_temp[1429] = [727,34,776,63]; + lineof_temp[1066] = [679,59,679,91]; + lineof_temp[5107] = [2994,29,2994,57]; + lineof_temp[4727] = [2786,4,2787,31]; + lineof_temp[2618] = [1504,32,1504,49]; + lineof_temp[2182] = [1249,68,1249,89]; + lineof_temp[6559] = [3768,8,3778,7]; + lineof_temp[268] = [185,4,185,19]; + lineof_temp[5660] = [3326,4,3326,23]; + lineof_temp[5122] = [2988,6,2995,60]; + lineof_temp[3919] = [2329,10,2364,28]; + lineof_temp[4804] = [2837,21,2837,88]; + lineof_temp[3523] = [2138,22,2138,47]; + lineof_temp[1342] = [757,37,757,60]; + lineof_temp[6273] = [3648,39,3648,85]; + lineof_temp[5922] = [3465,24,3465,51]; + lineof_temp[316] = [178,2,205,74]; + lineof_temp[3838] = [2319,35,2319,59]; + lineof_temp[1622] = [894,20,905,85]; + lineof_temp[500] = [347,2,348,51]; + lineof_temp[1386] = [772,39,772,103]; + lineof_temp[1784] = [993,8,1007,106]; + lineof_temp[888] = [591,83,591,105]; + lineof_temp[2056] = [1179,16,1179,58]; + lineof_temp[4313] = [2567,26,2567,72]; + lineof_temp[4323] = [2570,14,2570,34]; + lineof_temp[1135] = [673,30,673,127]; + lineof_temp[5375] = [3123,4,3123,14]; + lineof_temp[2580] = [1523,35,1529,53]; + lineof_temp[1011] = [594,11,594,69]; + lineof_temp[4851] = [2854,15,2862,89]; + lineof_temp[794] = [478,2,528,7]; + lineof_temp[747] = [498,14,499,70]; + lineof_temp[5050] = [2970,85,2970,93]; + lineof_temp[1567] = [855,2,862,59]; + lineof_temp[839] = [539,4,554,60]; + lineof_temp[566] = [387,4,387,24]; + lineof_temp[6660] = [3818,10,3818,26]; + lineof_temp[5731] = [3355,33,3355,58]; + lineof_temp[5539] = [3266,24,3266,41]; + lineof_temp[1654] = [924,14,924,41]; + lineof_temp[2948] = [1791,37,1792,61]; + lineof_temp[5669] = [3330,4,3331,91]; + lineof_temp[5858] = [3423,19,3423,61]; + lineof_temp[1303] = [735,26,735,41]; + lineof_temp[6011] = [3518,17,3518,76]; + lineof_temp[3404] = [2082,25,2082,36]; + lineof_temp[6083] = [3564,16,3564,74]; + lineof_temp[5785] = [3374,4,3375,25]; + lineof_temp[1148] = [662,28,673,127]; + lineof_temp[3635] = [2176,23,2200,86]; + lineof_temp[1432] = [783,16,783,109]; + lineof_temp[5692] = [3339,34,3339,56]; + lineof_temp[6212] = [3608,4,3618,7]; + lineof_temp[2988] = [1823,55,1823,112]; + lineof_temp[1601] = [889,38,889,71]; + lineof_temp[23] = [35,19,35,24]; + lineof_temp[616] = [415,16,415,42]; + lineof_temp[6687] = [3836,18,3838,26]; + lineof_temp[6429] = [3721,31,3721,50]; + lineof_temp[6050] = [3542,30,3542,60]; + lineof_temp[761] = [512,47,514,86]; + lineof_temp[1139] = [670,25,673,127]; + lineof_temp[288] = [198,9,198,36]; + lineof_temp[5426] = [3195,16,3199,57]; + lineof_temp[5341] = [3127,47,3127,55]; + lineof_temp[6656] = [3819,22,3819,91]; + lineof_temp[4407] = [2533,45,2533,72]; + lineof_temp[2291] = [1307,13,1307,57]; + lineof_temp[5376] = [3118,2,3136,37]; + lineof_temp[2501] = [1488,23,1488,41]; + lineof_temp[201] = [139,17,139,40]; + lineof_temp[6244] = [3635,19,3635,46]; + lineof_temp[3865] = [2333,17,2334,88]; + lineof_temp[3053] = [1841,2,1844,44]; + lineof_temp[2497] = [1466,4,1466,23]; + lineof_temp[1366] = [766,39,766,88]; + lineof_temp[5807] = [3388,10,3390,44]; + lineof_temp[3476] = [2122,68,2122,87]; + lineof_temp[2816] = [1664,13,1664,20]; + lineof_temp[1922] = [1104,29,1106,100]; + lineof_temp[4772] = [2823,12,2825,56]; + lineof_temp[4715] = [2783,24,2783,50]; + lineof_temp[3306] = [2036,27,2036,80]; + lineof_temp[2837] = [1688,16,1693,82]; + lineof_temp[6063] = [3542,10,3546,78]; + lineof_temp[4703] = [2771,2,2774,26]; + lineof_temp[3996] = [2410,7,2411,98]; + lineof_temp[3783] = [2297,53,2297,64]; + lineof_temp[2372] = [1382,4,1382,36]; + lineof_temp[7300] = [3591,2,4149,96]; + lineof_temp[6298] = [3653,10,3653,26]; + lineof_temp[4245] = [2507,4,2507,20]; + lineof_temp[5948] = [3479,70,3479,91]; + lineof_temp[2721] = [1449,2,1606,39]; + lineof_temp[3853] = [2321,6,2327,20]; + lineof_temp[3403] = [2082,25,2082,36]; + lineof_temp[266] = [186,4,187,33]; + lineof_temp[4053] = [2435,10,2435,47]; + lineof_temp[3673] = [2216,13,2218,92]; + lineof_temp[1055] = [677,42,677,69]; + lineof_temp[1608] = [894,40,894,76]; + lineof_temp[62] = [58,5,58,21]; + lineof_temp[6038] = [3515,4,3532,68]; + lineof_temp[3406] = [2082,17,2082,21]; + lineof_temp[3409] = [2086,77,2086,98]; + lineof_temp[2036] = [1186,10,1188,47]; + lineof_temp[908] = [599,54,599,84]; + lineof_temp[5300] = [3103,10,3103,58]; + lineof_temp[4989] = [2944,40,2944,74]; + lineof_temp[4133] = [2470,57,2470,74]; + lineof_temp[3615] = [2190,64,2190,82]; + lineof_temp[2480] = [1478,23,1478,39]; + lineof_temp[2288] = [1307,46,1307,57]; + lineof_temp[1426] = [737,4,776,63]; + lineof_temp[5412] = [3168,2,3182,46]; + lineof_temp[1803] = [1014,42,1014,63]; + lineof_temp[1004] = [598,11,598,44]; + lineof_temp[653] = [424,2,429,43]; + lineof_temp[479] = [338,4,341,62]; + lineof_temp[5638] = [3318,4,3318,17]; + lineof_temp[5587] = [3290,21,3290,50]; + lineof_temp[1225] = [715,40,715,73]; + lineof_temp[5044] = [2962,29,2968,92]; + lineof_temp[6203] = [3616,35,3616,53]; + lineof_temp[4506] = [2674,63,2674,74]; + lineof_temp[2383] = [1393,4,1393,18]; + lineof_temp[6094] = [3566,16,3566,74]; + lineof_temp[5637] = [3319,4,3319,72]; + lineof_temp[2065] = [1170,76,1170,97]; + lineof_temp[1642] = [887,2,905,85]; + lineof_temp[3975] = [2409,20,2409,49]; + lineof_temp[6859] = [3963,28,3963,61]; + lineof_temp[3992] = [2411,4,2411,98]; + lineof_temp[1320] = [731,6,735,51]; + lineof_temp[5766] = [3366,4,3366,40]; + lineof_temp[5571] = [3285,34,3285,41]; + lineof_temp[2908] = [1759,32,1759,70]; + lineof_temp[1962] = [1128,15,1128,67]; + lineof_temp[5327] = [3105,17,3105,47]; + lineof_temp[7] = [20,8,21,26]; + lineof_temp[4749] = [2810,7,2811,71]; + lineof_temp[3120] = [1912,51,1913,87]; + lineof_temp[3525] = [2137,19,2138,48]; + lineof_temp[3416] = [2085,17,2085,23]; + lineof_temp[3103] = [1886,31,1889,84]; + lineof_temp[3542] = [2146,18,2146,55]; + lineof_temp[4064] = [2440,7,2444,61]; + lineof_temp[6151] = [3598,49,3598,67]; + lineof_temp[5532] = [3254,4,3255,55]; + lineof_temp[2328] = [1338,4,1338,30]; + lineof_temp[701] = [468,71,468,97]; + lineof_temp[5937] = [3441,34,3465,51]; + lineof_temp[4065] = [2439,7,2439,81]; + lineof_temp[3016] = [1815,52,1821,75]; + lineof_temp[2876] = [1735,51,1747,102]; + lineof_temp[6865] = [3964,10,3964,23]; + lineof_temp[6937] = [3997,17,3997,31]; + lineof_temp[4946] = [2917,24,2925,95]; + lineof_temp[1505] = [816,4,821,49]; + lineof_temp[5351] = [3127,10,3128,77]; + lineof_temp[5049] = [2970,85,2970,93]; + lineof_temp[6667] = [3822,10,3822,34]; + lineof_temp[974] = [610,11,632,66]; + lineof_temp[4552] = [2685,7,2685,11]; + lineof_temp[3397] = [2079,29,2079,75]; + lineof_temp[6736] = [3914,90,3915,122]; + lineof_temp[5343] = [3127,31,3127,56]; + lineof_temp[3268] = [2010,8,2010,55]; + lineof_temp[2648] = [1577,39,1577,56]; + lineof_temp[298] = [200,7,201,36]; + lineof_temp[5157] = [3012,6,3018,41]; + lineof_temp[2613] = [1538,35,1544,53]; + lineof_temp[7368] = [4174,2,4176,18]; + lineof_temp[3994] = [2410,7,2411,98]; + lineof_temp[3535] = [2134,10,2139,58]; + lineof_temp[1838] = [1051,2,1052,27]; + lineof_temp[2942] = [1779,10,1779,20]; + lineof_temp[2565] = [1515,35,1521,53]; + lineof_temp[5301] = [3103,10,3103,58]; + lineof_temp[6002] = [3512,4,3513,70]; + lineof_temp[4137] = [2470,4,2470,21]; + lineof_temp[4130] = [2470,57,2470,74]; + lineof_temp[3127] = [1907,46,1914,95]; + lineof_temp[5148] = [3017,30,3017,62]; + lineof_temp[1285] = [633,2,722,28]; + lineof_temp[34] = [38,2,38,19]; + lineof_temp[1576] = [879,13,880,84]; + lineof_temp[6877] = [3961,7,3961,23]; + lineof_temp[3179] = [1924,7,1925,20]; + lineof_temp[2844] = [1678,2,1693,82]; + lineof_temp[2786] = [1643,4,1652,7]; + lineof_temp[7242] = [4130,23,4130,38]; + lineof_temp[1597] = [887,15,887,53]; + lineof_temp[629] = [416,4,418,72]; + lineof_temp[3644] = [2201,48,2201,61]; + lineof_temp[2337] = [1349,4,1349,31]; + lineof_temp[1075] = [684,29,684,59]; + lineof_temp[6180] = [3603,8,3606,63]; + lineof_temp[1824] = [1022,14,1022,41]; + lineof_temp[706] = [472,48,472,74]; + lineof_temp[5928] = [3453,10,3465,51]; + lineof_temp[4691] = [2769,21,2769,48]; + lineof_temp[4626] = [2738,8,2738,32]; + lineof_temp[2334] = [1344,4,1344,28]; + lineof_temp[1997] = [1138,2,1140,17]; + lineof_temp[3315] = [2043,35,2044,81]; + lineof_temp[2673] = [1590,39,1590,55]; + lineof_temp[5002] = [2950,29,2950,60]; + lineof_temp[1814] = [1019,14,1021,110]; + lineof_temp[1704] = [973,17,973,38]; + lineof_temp[4390] = [2586,8,2607,63]; + lineof_temp[3689] = [2206,43,2223,55]; + lineof_temp[838] = [539,4,554,60]; + lineof_temp[2904] = [1757,13,1757,54]; + lineof_temp[503] = [347,2,348,51]; + lineof_temp[3051] = [1844,2,1844,44]; + lineof_temp[1618] = [901,30,904,82]; + lineof_temp[4300] = [2550,21,2550,57]; + lineof_temp[6227] = [3623,10,3623,28]; + lineof_temp[545] = [355,2,370,22]; + lineof_temp[3269] = [2010,8,2010,55]; + lineof_temp[2727] = [1618,19,1621,62]; + lineof_temp[6478] = [3738,11,3743,72]; + lineof_temp[143] = [113,36,113,59]; + lineof_temp[2558] = [1519,43,1520,101]; + lineof_temp[1277] = [703,4,722,28]; + lineof_temp[5860] = [3424,58,3424,67]; + lineof_temp[4505] = [2671,43,2671,64]; + lineof_temp[2419] = [1427,4,1427,31]; + lineof_temp[320] = [212,2,212,15]; + lineof_temp[5202] = [3051,33,3051,54]; + lineof_temp[561] = [391,9,391,46]; + lineof_temp[271] = [190,6,190,33]; + lineof_temp[4305] = [2541,8,2562,11]; + lineof_temp[2198] = [1260,23,1260,61]; + lineof_temp[2698] = [1594,4,1596,71]; + lineof_temp[980] = [603,41,603,84]; + lineof_temp[5549] = [3275,25,3275,46]; + lineof_temp[3488] = [2124,70,2124,81]; + lineof_temp[2510] = [1491,22,1499,69]; + lineof_temp[793] = [479,2,528,7]; + lineof_temp[6347] = [3671,10,3674,56]; + lineof_temp[4755] = [2806,2,2811,71]; + lineof_temp[4381] = [2605,26,2605,72]; + lineof_temp[2446] = [1451,12,1451,28]; + lineof_temp[2358] = [1368,4,1368,45]; + lineof_temp[2481] = [1478,23,1478,39]; + lineof_temp[1143] = [667,25,673,127]; + lineof_temp[1477] = [808,16,808,62]; + lineof_temp[6735] = [3908,99,3913,106]; + lineof_temp[4195] = [2484,24,2484,50]; + lineof_temp[3495] = [2123,27,2123,45]; + lineof_temp[638] = [398,2,418,72]; + lineof_temp[122] = [95,10,95,23]; + lineof_temp[1591] = [870,6,880,84]; + lineof_temp[1233] = [715,20,716,26]; + lineof_temp[323] = [214,23,214,31]; + lineof_temp[3387] = [2073,29,2073,75]; + lineof_temp[1131] = [670,47,670,88]; + lineof_temp[4477] = [2646,35,2646,71]; + lineof_temp[4129] = [2469,4,2469,21]; + lineof_temp[4110] = [2459,4,2460,28]; + lineof_temp[3365] = [2067,28,2067,80]; + lineof_temp[2414] = [1420,4,1420,39]; + lineof_temp[4249] = [2509,4,2509,28]; + lineof_temp[3636] = [2176,23,2200,86]; + lineof_temp[1807] = [1015,34,1015,55]; + lineof_temp[5553] = [3280,30,3280,51]; + lineof_temp[4315] = [2567,26,2567,95]; + lineof_temp[753] = [506,25,507,81]; + lineof_temp[6763] = [3839,16,3915,122]; + lineof_temp[1453] = [797,18,797,34]; + lineof_temp[7017] = [4009,7,4029,52]; + lineof_temp[4861] = [2865,25,2865,71]; + lineof_temp[4599] = [2721,26,2721,53]; + lineof_temp[613] = [403,6,414,20]; + lineof_temp[6016] = [3522,26,3522,72]; + lineof_temp[3574] = [2155,36,2167,180]; + lineof_temp[1205] = [704,22,704,58]; + lineof_temp[6096] = [3568,38,3568,56]; + lineof_temp[3687] = [2209,4,2223,55]; + lineof_temp[1749] = [999,76,999,97]; + lineof_temp[803] = [561,7,561,64]; + lineof_temp[6781] = [3926,10,3926,24]; + lineof_temp[4968] = [2931,22,2931,57]; + lineof_temp[1762] = [1003,16,1003,86]; + lineof_temp[474] = [341,36,341,62]; + lineof_temp[4372] = [2597,14,2599,95]; + lineof_temp[1894] = [1088,32,1090,63]; + lineof_temp[4709] = [2769,2,2774,26]; + lineof_temp[4207] = [2487,4,2488,66]; + lineof_temp[3011] = [1816,65,1821,62]; + lineof_temp[2067] = [1170,28,1170,74]; + lineof_temp[6528] = [3763,10,3764,50]; + lineof_temp[195] = [135,28,135,47]; + lineof_temp[3849] = [2324,11,2326,108]; + lineof_temp[3248] = [1995,20,1995,73]; + lineof_temp[2153] = [1198,2,1223,52]; + lineof_temp[6391] = [3693,13,3693,29]; + lineof_temp[4358] = [2593,18,2595,67]; + lineof_temp[3087] = [1869,12,1869,22]; + lineof_temp[560] = [378,4,378,20]; + lineof_temp[335] = [222,27,222,47]; + lineof_temp[4607] = [2722,12,2724,89]; + lineof_temp[2589] = [1536,46,1536,81]; + lineof_temp[1830] = [984,30,1025,104]; + lineof_temp[3394] = [2063,14,2063,31]; + lineof_temp[3000] = [1823,55,1825,86]; + lineof_temp[6405] = [3693,4,3699,7]; + lineof_temp[4040] = [2430,55,2430,69]; + lineof_temp[5175] = [3029,15,3032,79]; + lineof_temp[3694] = [2239,24,2240,26]; + lineof_temp[3025] = [1798,43,1827,62]; + lineof_temp[481] = [338,4,341,62]; + lineof_temp[2072] = [1169,16,1169,34]; + lineof_temp[6069] = [3540,7,3546,78]; + lineof_temp[2389] = [1399,4,1399,27]; + lineof_temp[180] = [86,2,121,42]; + lineof_temp[4002] = [2407,2,2413,87]; + lineof_temp[3184] = [1922,2,1925,20]; + lineof_temp[6970] = [4011,16,4011,39]; + lineof_temp[6001] = [3512,4,3513,70]; + lineof_temp[4306] = [2541,8,2562,11]; + lineof_temp[6514] = [3747,8,3755,7]; + lineof_temp[2324] = [1334,4,1334,47]; + lineof_temp[6569] = [3785,9,3785,42]; + lineof_temp[6156] = [3600,49,3600,78]; + lineof_temp[5353] = [3131,35,3131,61]; + lineof_temp[1670] = [938,8,938,42]; + lineof_temp[2647] = [1577,39,1577,56]; + lineof_temp[733] = [491,27,491,96]; + lineof_temp[5382] = [3174,11,3174,43]; + lineof_temp[2638] = [1500,22,1564,123]; + lineof_temp[900] = [593,9,593,67]; + lineof_temp[378] = [260,2,260,55]; + lineof_temp[6821] = [3951,59,3951,86]; + lineof_temp[6521] = [3759,10,3759,26]; + lineof_temp[4011] = [2416,2,2418,89]; + lineof_temp[1946] = [1059,2,1108,59]; + lineof_temp[749] = [497,14,497,39]; + lineof_temp[3454] = [2100,18,2109,67]; + lineof_temp[1884] = [1084,32,1086,100]; + lineof_temp[5299] = [3103,10,3103,58]; + lineof_temp[4083] = [2452,14,2452,47]; + lineof_temp[6553] = [3770,16,3778,7]; + lineof_temp[512] = [359,26,359,64]; + lineof_temp[3579] = [2151,27,2167,180]; + lineof_temp[3375] = [2069,26,2071,104]; + lineof_temp[104] = [79,2,79,17]; + lineof_temp[50] = [51,31,51,43]; + lineof_temp[5840] = [3415,32,3415,44]; + lineof_temp[5443] = [3210,21,3210,28]; + lineof_temp[5087] = [2980,14,2981,40]; + lineof_temp[1705] = [971,17,972,79]; + lineof_temp[6936] = [3997,17,3997,31]; + lineof_temp[3847] = [2326,64,2326,103]; + lineof_temp[4060] = [2444,7,2444,61]; + lineof_temp[3341] = [2054,41,2054,45]; + lineof_temp[6855] = [3934,7,3934,25]; + lineof_temp[6431] = [3722,27,3722,65]; + lineof_temp[4987] = [2942,33,2942,60]; + lineof_temp[3607] = [2182,56,2182,84]; + lineof_temp[784] = [522,11,522,40]; + lineof_temp[570] = [376,2,391,46]; + lineof_temp[7192] = [4105,8,4109,39]; + lineof_temp[5882] = [3434,15,3434,74]; + lineof_temp[2718] = [1602,4,1606,39]; + lineof_temp[5111] = [2995,26,2995,60]; + lineof_temp[6512] = [3747,8,3755,7]; + lineof_temp[4860] = [2865,25,2865,71]; + lineof_temp[662] = [439,4,439,86]; + lineof_temp[6832] = [3954,29,3954,47]; + lineof_temp[2130] = [1220,20,1223,52]; + lineof_temp[4700] = [2773,9,2774,26]; + lineof_temp[5960] = [3484,15,3484,68]; + lineof_temp[229] = [147,27,153,65]; + lineof_temp[4635] = [2733,29,2738,32]; + lineof_temp[4364] = [2597,32,2597,49]; + lineof_temp[7058] = [4050,19,4052,65]; + lineof_temp[3652] = [2140,10,2201,61]; + lineof_temp[3459] = [2116,27,2117,78]; + lineof_temp[253] = [183,27,183,54]; + lineof_temp[6711] = [3868,64,3876,109]; + lineof_temp[3956] = [2390,2,2390,65]; + lineof_temp[3917] = [2332,15,2364,28]; + lineof_temp[1201] = [637,4,700,7]; + lineof_temp[149] = [115,36,115,45]; + lineof_temp[7298] = [4147,4,4147,5]; + lineof_temp[3197] = [1949,27,1949,70]; + lineof_temp[7286] = [4149,47,4149,69]; + lineof_temp[6595] = [3792,18,3794,64]; + lineof_temp[3941] = [2383,38,2383,62]; + lineof_temp[1048] = [675,41,675,94]; + lineof_temp[7113] = [4061,12,4077,89]; + lineof_temp[6201] = [3616,35,3616,53]; + lineof_temp[1363] = [764,37,764,93]; + lineof_temp[7162] = [4085,23,4090,93]; + lineof_temp[5545] = [3273,20,3273,62]; + lineof_temp[4734] = [2781,2,2787,31]; + lineof_temp[4239] = [2504,4,2504,26]; + lineof_temp[2784] = [1644,4,1652,7]; + lineof_temp[2454] = [1455,21,1455,49]; + lineof_temp[3603] = [2180,35,2180,51]; + lineof_temp[1138] = [671,25,673,127]; + lineof_temp[1417] = [746,15,776,61]; + lineof_temp[1337] = [753,33,753,60]; + lineof_temp[896] = [590,10,592,68]; + lineof_temp[6360] = [3682,75,3682,105]; + lineof_temp[4714] = [2783,24,2783,50]; + lineof_temp[4010] = [2416,2,2418,89]; + lineof_temp[4424] = [2528,10,2538,88]; + lineof_temp[1857] = [1075,44,1075,86]; + lineof_temp[73] = [61,12,63,41]; + lineof_temp[5067] = [2941,10,2971,59]; + lineof_temp[6974] = [4012,38,4012,80]; + lineof_temp[3017] = [1815,52,1821,75]; + lineof_temp[2284] = [1305,11,1306,72]; + lineof_temp[859] = [578,23,578,56]; + lineof_temp[372] = [254,14,254,28]; + lineof_temp[5908] = [3449,10,3451,94]; + lineof_temp[5098] = [2988,27,2988,54]; + lineof_temp[1005] = [598,11,598,44]; + lineof_temp[649] = [428,4,429,43]; + lineof_temp[6554] = [3769,12,3778,7]; + lineof_temp[5350] = [3127,10,3128,77]; + lineof_temp[3279] = [2014,17,2016,125]; + lineof_temp[6633] = [3810,26,3813,75]; + lineof_temp[4655] = [2756,27,2756,51]; + lineof_temp[1562] = [859,4,862,59]; + lineof_temp[3616] = [2190,64,2190,82]; + lineof_temp[1007] = [596,11,596,31]; + lineof_temp[7070] = [4045,8,4057,19]; + lineof_temp[4508] = [2673,42,2674,77]; + lineof_temp[3686] = [2209,4,2223,55]; + lineof_temp[2019] = [1160,31,1160,46]; + lineof_temp[362] = [239,2,242,105]; + lineof_temp[5390] = [3170,4,3175,29]; + lineof_temp[3364] = [2031,12,2061,69]; + lineof_temp[2399] = [1408,4,1408,17]; + lineof_temp[1767] = [996,35,996,68]; + lineof_temp[635] = [399,15,399,48]; + lineof_temp[4026] = [2423,2,2425,74]; + lineof_temp[3678] = [2222,15,2223,55]; + lineof_temp[5507] = [3224,12,3224,18]; + lineof_temp[4067] = [2437,2,2444,61]; + lineof_temp[2624] = [1549,40,1550,98]; + lineof_temp[7032] = [4039,17,4039,43]; + lineof_temp[2436] = [1437,4,1437,37]; + lineof_temp[522] = [365,11,367,90]; + lineof_temp[5741] = [3359,4,3359,50]; + lineof_temp[6984] = [4020,46,4020,79]; + lineof_temp[3503] = [2111,23,2111,37]; + lineof_temp[2913] = [1765,25,1765,78]; + lineof_temp[5205] = [3051,28,3051,55]; + lineof_temp[1127] = [667,47,667,62]; + lineof_temp[38] = [43,22,43,47]; + lineof_temp[6770] = [3919,15,3919,31]; + lineof_temp[348] = [233,7,234,74]; + lineof_temp[2285] = [1304,19,1306,74]; + lineof_temp[116] = [88,4,88,17]; + lineof_temp[6006] = [3517,15,3517,40]; + lineof_temp[5665] = [3331,70,3331,91]; + lineof_temp[4738] = [2806,20,2806,46]; + lineof_temp[4122] = [2469,57,2469,63]; + lineof_temp[7175] = [4079,4,4102,87]; + lineof_temp[5610] = [3304,24,3304,51]; + lineof_temp[196] = [135,28,135,47]; + lineof_temp[7301] = [4156,16,4156,50]; + lineof_temp[5090] = [2978,6,2981,40]; + lineof_temp[1211] = [722,9,722,28]; + lineof_temp[321] = [213,21,213,30]; + lineof_temp[6141] = [3580,10,3583,35]; + lineof_temp[4001] = [2407,2,2413,87]; + lineof_temp[3914] = [2338,20,2338,27]; + lineof_temp[2939] = [1756,4,1756,22]; + lineof_temp[5131] = [3001,23,3001,37]; + lineof_temp[345] = [233,17,233,60]; + lineof_temp[3828] = [2261,4,2312,63]; + lineof_temp[210] = [143,20,143,43]; + lineof_temp[4750] = [2810,7,2811,71]; + lineof_temp[4220] = [2492,4,2492,111]; + lineof_temp[5821] = [3396,50,3396,59]; + lineof_temp[2704] = [1599,8,1600,83]; + lineof_temp[1056] = [677,42,677,69]; + lineof_temp[6396] = [3697,23,3697,65]; + lineof_temp[3444] = [2106,35,2109,67]; + lineof_temp[824] = [549,25,550,46]; + lineof_temp[2301] = [1314,4,1314,17]; + lineof_temp[6748] = [3885,64,3915,122]; + lineof_temp[5892] = [3421,39,3435,47]; + lineof_temp[3897] = [2350,20,2350,45]; + lineof_temp[2598] = [1531,35,1536,81]; + lineof_temp[1013] = [589,6,632,66]; + lineof_temp[249] = [180,4,181,33]; + lineof_temp[6873] = [3968,32,3968,65]; + lineof_temp[5659] = [3327,4,3328,93]; + lineof_temp[2961] = [1830,46,1831,64]; + lineof_temp[1016] = [574,4,632,66]; + lineof_temp[1485] = [817,25,817,58]; + lineof_temp[6776] = [3918,4,3921,120]; + lineof_temp[1187] = [697,71,697,92]; + lineof_temp[2982] = [1804,48,1806,113]; + lineof_temp[7073] = [4044,4,4057,19]; + lineof_temp[4233] = [2501,4,2501,21]; + lineof_temp[6899] = [3984,29,3985,76]; + lineof_temp[3779] = [2296,37,2296,91]; + lineof_temp[2966] = [1829,41,1831,78]; + lineof_temp[5678] = [3333,4,3333,28]; + lineof_temp[5430] = [3195,16,3199,57]; + lineof_temp[1647] = [914,15,914,39]; + lineof_temp[1076] = [689,26,689,84]; + lineof_temp[5021] = [2962,34,2962,99]; + lineof_temp[3850] = [2323,6,2327,20]; + lineof_temp[1490] = [818,24,818,57]; + lineof_temp[529] = [368,8,368,31]; + lineof_temp[6454] = [3733,48,3735,72]; + lineof_temp[257] = [183,4,184,33]; + lineof_temp[421] = [323,35,323,56]; + lineof_temp[2842] = [1680,7,1693,82]; + lineof_temp[6631] = [3811,30,3813,75]; + lineof_temp[4044] = [2429,2,2430,72]; + lineof_temp[1496] = [819,7,819,22]; + lineof_temp[543] = [355,2,370,22]; + lineof_temp[6737] = [3907,84,3915,122]; + lineof_temp[5429] = [3195,16,3199,57]; + lineof_temp[6490] = [3744,4,3744,38]; + lineof_temp[3825] = [2261,4,2312,63]; + lineof_temp[3556] = [2162,45,2163,92]; + lineof_temp[3276] = [2016,118,2016,125]; + lineof_temp[2772] = [1647,8,1650,51]; + lineof_temp[1332] = [744,15,744,72]; + lineof_temp[399] = [297,4,300,94]; + lineof_temp[1275] = [703,4,722,28]; + lineof_temp[1577] = [879,13,880,84]; + lineof_temp[1462] = [801,25,805,87]; + lineof_temp[958] = [615,17,615,50]; + lineof_temp[7112] = [4061,12,4077,89]; + lineof_temp[5931] = [3446,4,3465,51]; + lineof_temp[285] = [197,30,197,57]; + lineof_temp[6275] = [3647,27,3648,130]; + lineof_temp[5368] = [3130,16,3130,24]; + lineof_temp[4329] = [2580,28,2580,69]; + lineof_temp[2893] = [1712,23,1747,102]; + lineof_temp[5460] = [3220,33,3220,51]; + lineof_temp[7226] = [4124,14,4124,37]; + lineof_temp[4019] = [2424,13,2424,34]; + lineof_temp[1264] = [707,9,721,30]; + lineof_temp[6035] = [3525,14,3525,40]; + lineof_temp[1781] = [1005,10,1007,106]; + lineof_temp[7048] = [4047,16,4047,40]; + lineof_temp[5547] = [3273,20,3273,62]; + lineof_temp[4491] = [2622,4,2622,14]; + lineof_temp[3812] = [2309,31,2312,63]; + lineof_temp[2970] = [1797,44,1797,78]; + lineof_temp[4765] = [2818,25,2818,42]; + lineof_temp[4457] = [2636,18,2636,33]; + lineof_temp[7297] = [4148,4,4149,96]; + lineof_temp[7054] = [4050,31,4050,77]; + lineof_temp[3331] = [2057,58,2057,104]; + lineof_temp[2861] = [1726,45,1726,52]; + lineof_temp[209] = [143,20,143,43]; + lineof_temp[2162] = [1230,2,1231,116]; + lineof_temp[893] = [591,10,592,68]; + lineof_temp[554] = [384,19,384,88]; + lineof_temp[4196] = [2484,24,2484,50]; + lineof_temp[7332] = [4163,4,4167,96]; + lineof_temp[2573] = [1527,43,1528,101]; + lineof_temp[5233] = [3039,2,3062,41]; + lineof_temp[1311] = [735,8,735,51]; + lineof_temp[3398] = [2079,29,2079,98]; + lineof_temp[1483] = [780,30,810,54]; + lineof_temp[1339] = [754,25,754,78]; + lineof_temp[3035] = [1785,20,1831,78]; + lineof_temp[1777] = [1005,22,1005,68]; + lineof_temp[5407] = [3169,2,3182,46]; + lineof_temp[4092] = [2450,4,2453,78]; + lineof_temp[551] = [384,67,384,88]; + lineof_temp[6784] = [3927,27,3927,60]; + lineof_temp[4870] = [2868,23,2868,31]; + lineof_temp[4785] = [2830,24,2830,93]; + lineof_temp[7134] = [4095,42,4095,71]; + lineof_temp[4515] = [2683,64,2683,80]; + lineof_temp[111] = [75,35,81,24]; + lineof_temp[4706] = [2769,2,2774,26]; + lineof_temp[2420] = [1426,4,1426,42]; + lineof_temp[1174] = [649,15,690,45]; + lineof_temp[3895] = [2352,20,2352,45]; + lineof_temp[3029] = [1796,36,1831,78]; + lineof_temp[1350] = [760,34,760,83]; + lineof_temp[707] = [472,48,472,74]; + lineof_temp[7281] = [4146,37,4146,70]; + lineof_temp[5535] = [3257,4,3258,96]; + lineof_temp[6986] = [4021,49,4021,82]; + lineof_temp[3436] = [2105,38,2105,82]; + lineof_temp[6922] = [3976,21,3991,64]; + lineof_temp[5955] = [3478,10,3478,35]; + lineof_temp[3701] = [2244,14,2245,56]; + lineof_temp[6601] = [3802,24,3802,55]; + lineof_temp[5508] = [3240,20,3240,69]; + lineof_temp[623] = [418,8,418,71]; + lineof_temp[7123] = [4079,25,4079,44]; + lineof_temp[4267] = [2525,5,2525,28]; + lineof_temp[2293] = [1304,4,1307,57]; + lineof_temp[1551] = [857,4,857,72]; + lineof_temp[5912] = [3454,15,3454,40]; + lineof_temp[3260] = [1990,6,1999,46]; + lineof_temp[6133] = [3582,49,3582,58]; + lineof_temp[5708] = [3317,26,3343,66]; + lineof_temp[2255] = [1285,4,1290,87]; + lineof_temp[492] = [327,2,341,62]; + lineof_temp[7043] = [4032,4,4032,31]; + lineof_temp[6645] = [3788,8,3814,50]; + lineof_temp[5245] = [3073,10,3073,44]; + lineof_temp[2916] = [1762,20,1765,78]; + lineof_temp[1973] = [1127,12,1130,62]; + lineof_temp[807] = [555,7,561,64]; + lineof_temp[4584] = [2702,21,2713,94]; + lineof_temp[1956] = [1115,2,1116,62]; + lineof_temp[1157] = [656,21,673,127]; + lineof_temp[591] = [408,77,413,11]; + lineof_temp[4254] = [2515,24,2515,37]; + lineof_temp[689] = [454,2,454,77]; + lineof_temp[1864] = [1073,31,1075,102]; + lineof_temp[948] = [628,17,628,37]; + lineof_temp[2484] = [1480,17,1480,63]; + lineof_temp[7230] = [4125,16,4125,41]; + lineof_temp[3433] = [2102,35,2102,67]; + lineof_temp[2063] = [1168,16,1168,62]; + lineof_temp[6897] = [3982,46,3982,79]; + lineof_temp[3953] = [2390,2,2390,65]; + lineof_temp[3947] = [2383,2,2383,71]; + lineof_temp[2696] = [1595,8,1596,71]; + lineof_temp[153] = [109,26,115,45]; + lineof_temp[4924] = [2909,17,2909,59]; + lineof_temp[1523] = [835,24,835,39]; + lineof_temp[417] = [321,15,321,67]; + lineof_temp[3466] = [2121,66,2121,85]; + lineof_temp[1533] = [842,15,842,53]; + lineof_temp[6404] = [3693,33,3699,7]; + lineof_temp[5302] = [3103,4,3103,6]; + lineof_temp[224] = [152,42,152,60]; + lineof_temp[7266] = [4127,4,4127,38]; + lineof_temp[1900] = [1076,24,1090,65]; + lineof_temp[916] = [610,44,610,74]; + lineof_temp[3764] = [2272,25,2280,79]; + lineof_temp[790] = [480,4,528,7]; + lineof_temp[92] = [70,2,70,6]; + lineof_temp[3756] = [2278,36,2278,90]; + lineof_temp[3062] = [1852,4,1852,58]; + lineof_temp[1896] = [1082,29,1090,64]; + lineof_temp[3081] = [1870,12,1876,48]; + lineof_temp[3442] = [2106,35,2109,67]; + lineof_temp[175] = [120,23,120,42]; + lineof_temp[4411] = [2534,27,2538,88]; + lineof_temp[1769] = [996,15,996,85]; + lineof_temp[564] = [389,9,390,83]; + lineof_temp[6430] = [3721,31,3721,50]; + lineof_temp[4992] = [2944,20,2944,36]; + lineof_temp[1680] = [943,22,943,60]; + lineof_temp[162] = [99,13,99,30]; + lineof_temp[5743] = [3360,30,3360,53]; + lineof_temp[365] = [248,14,248,28]; + lineof_temp[5577] = [3272,16,3286,37]; + lineof_temp[3468] = [2121,89,2121,100]; + lineof_temp[596] = [407,8,413,11]; + lineof_temp[7014] = [4011,13,4029,51]; + lineof_temp[4227] = [2495,4,2495,20]; + lineof_temp[3909] = [2341,20,2341,27]; + lineof_temp[3637] = [2176,23,2200,86]; + lineof_temp[5266] = [3086,58,3086,66]; + lineof_temp[2623] = [1549,40,1550,98]; + lineof_temp[1226] = [715,40,715,73]; + lineof_temp[5968] = [3499,14,3499,40]; + lineof_temp[5238] = [3069,10,3069,55]; + lineof_temp[3879] = [2361,20,2362,59]; + lineof_temp[441] = [308,4,326,62]; + lineof_temp[1888] = [1090,52,1090,63]; + lineof_temp[1623] = [894,20,905,85]; + lineof_temp[5941] = [3473,4,3474,49]; + lineof_temp[6745] = [3895,74,3915,122]; + lineof_temp[4221] = [2491,4,2491,33]; + lineof_temp[3926] = [2318,2,2364,29]; + lineof_temp[1782] = [1004,10,1004,37]; + lineof_temp[7025] = [4033,15,4033,31]; + lineof_temp[3202] = [1975,45,1978,41]; + lineof_temp[2468] = [1452,4,1452,21]; + lineof_temp[359] = [239,2,242,105]; + lineof_temp[6614] = [3805,46,3805,79]; + lineof_temp[5139] = [3001,2,3005,42]; + lineof_temp[1977] = [1126,8,1130,62]; + lineof_temp[2628] = [1551,38,1551,51]; + lineof_temp[5816] = [3385,4,3391,79]; + lineof_temp[6465] = [3703,7,3735,76]; + lineof_temp[5794] = [3347,26,3377,66]; + lineof_temp[5501] = [3234,23,3234,34]; + lineof_temp[6409] = [3709,10,3711,85]; + lineof_temp[3714] = [2249,26,2249,71]; + lineof_temp[2554] = [1520,66,1520,100]; + lineof_temp[395] = [300,37,300,90]; + lineof_temp[6746] = [3891,69,3915,122]; + lineof_temp[6346] = [3671,10,3674,56]; + lineof_temp[3757] = [2276,46,2279,48]; + lineof_temp[334] = [222,27,222,47]; + lineof_temp[645] = [428,23,428,57]; + lineof_temp[5723] = [3353,25,3353,47]; + lineof_temp[2032] = [1186,22,1186,68]; + lineof_temp[262] = [186,27,186,54]; + lineof_temp[6655] = [3819,22,3819,68]; + lineof_temp[3605] = [2180,31,2180,51]; + lineof_temp[926] = [620,14,620,84]; + lineof_temp[1624] = [894,20,905,85]; + lineof_temp[1197] = [637,68,700,7]; + lineof_temp[404] = [295,15,295,43]; + lineof_temp[4939] = [2923,30,2925,94]; + lineof_temp[4702] = [2772,9,2772,32]; + lineof_temp[1132] = [671,28,671,36]; + lineof_temp[3932] = [2376,38,2376,60]; + lineof_temp[7130] = [4093,57,4093,69]; + lineof_temp[2812] = [1667,18,1671,69]; + lineof_temp[4926] = [2910,18,2910,39]; + lineof_temp[4105] = [2460,4,2460,28]; + lineof_temp[7020] = [3998,4,3998,38]; + lineof_temp[1937] = [1062,13,1107,65]; + lineof_temp[1468] = [798,4,806,46]; + lineof_temp[7013] = [4011,13,4029,51]; + lineof_temp[6581] = [3787,19,3787,35]; + lineof_temp[6276] = [3647,27,3648,130]; + lineof_temp[6787] = [3931,40,3931,67]; + lineof_temp[6520] = [3760,10,3761,85]; + lineof_temp[2701] = [1598,13,1598,29]; + lineof_temp[889] = [591,24,591,107]; + lineof_temp[758] = [503,17,508,72]; + lineof_temp[226] = [150,37,150,56]; + lineof_temp[7011] = [4012,18,4028,65]; + lineof_temp[3193] = [1947,21,1947,74]; + lineof_temp[391] = [294,15,294,55]; + lineof_temp[5335] = [3121,9,3121,58]; + lineof_temp[4266] = [2525,5,2525,28]; + lineof_temp[326] = [215,2,215,19]; + lineof_temp[6870] = [3967,31,3967,64]; + lineof_temp[6383] = [3689,10,3690,105]; + lineof_temp[3797] = [2301,22,2301,81]; + lineof_temp[1175] = [648,15,648,31]; + lineof_temp[5674] = [3332,4,3332,36]; + lineof_temp[5934] = [3446,4,3465,51]; + lineof_temp[2519] = [1555,36,1562,103]; + lineof_temp[1958] = [1123,15,1123,53]; + lineof_temp[1289] = [568,2,722,28]; + lineof_temp[5732] = [3355,33,3355,58]; + lineof_temp[5512] = [3223,10,3240,69]; + lineof_temp[3461] = [2115,27,2115,41]; + lineof_temp[2294] = [1304,4,1307,57]; + lineof_temp[279] = [195,9,195,36]; + lineof_temp[6220] = [3624,27,3624,64]; + lineof_temp[5234] = [3039,2,3062,41]; + lineof_temp[3299] = [2025,4,2027,77]; + lineof_temp[5897] = [3443,4,3444,49]; + lineof_temp[4445] = [2627,25,2627,69]; + lineof_temp[1497] = [820,28,820,47]; + lineof_temp[7118] = [4060,8,4077,89]; + lineof_temp[3751] = [2274,78,2274,105]; + lineof_temp[7150] = [4094,26,4102,87]; + lineof_temp[6567] = [3782,7,3782,30]; + lineof_temp[4383] = [2605,26,2605,95]; + lineof_temp[3647] = [2170,12,2201,61]; + lineof_temp[3317] = [2052,51,2053,55]; + lineof_temp[2986] = [1823,83,1823,111]; + lineof_temp[2917] = [1762,20,1765,78]; + lineof_temp[6816] = [3946,29,3946,43]; + lineof_temp[5095] = [2977,2,2981,40]; + lineof_temp[4817] = [2840,17,2840,49]; + lineof_temp[767] = [496,12,514,90]; + lineof_temp[7107] = [4065,22,4077,89]; + lineof_temp[6457] = [3730,14,3735,75]; + lineof_temp[6423] = [3714,14,3719,75]; + lineof_temp[5217] = [3060,31,3060,38]; + lineof_temp[2679] = [1591,27,1592,43]; + lineof_temp[1271] = [704,4,722,28]; + lineof_temp[521] = [365,11,367,90]; + lineof_temp[4072] = [2433,2,2444,61]; + lineof_temp[5524] = [3246,2,3247,52]; + lineof_temp[3094] = [1881,15,1882,23]; + lineof_temp[5568] = [3282,26,3282,33]; + lineof_temp[3759] = [2280,37,2280,79]; + lineof_temp[781] = [525,41,527,109]; + lineof_temp[5435] = [3205,20,3205,41]; + lineof_temp[3621] = [2189,47,2200,86]; + lineof_temp[159] = [116,37,116,42]; + lineof_temp[3002] = [1827,53,1827,62]; + lineof_temp[242] = [172,35,172,50]; + lineof_temp[5942] = [3473,4,3474,49]; + lineof_temp[5624] = [3302,2,3305,23]; + lineof_temp[6499] = [3752,22,3752,81]; + lineof_temp[5101] = [2990,32,2990,66]; + lineof_temp[4404] = [2531,28,2531,42]; + lineof_temp[2448] = [1451,32,1451,51]; + lineof_temp[2426] = [1430,4,1430,21]; + lineof_temp[6148] = [3593,13,3593,29]; + lineof_temp[1930] = [1107,55,1107,64]; + lineof_temp[691] = [460,24,460,39]; + lineof_temp[3875] = [2354,19,2355,58]; + lineof_temp[403] = [296,4,300,94]; + lineof_temp[7351] = [4157,2,4168,61]; + lineof_temp[2791] = [1642,4,1652,7]; + lineof_temp[5617] = [3304,5,3304,65]; + lineof_temp[6694] = [3877,62,3877,77]; + lineof_temp[5318] = [3109,19,3110,52]; + lineof_temp[5231] = [3041,10,3062,41]; + lineof_temp[3613] = [2187,45,2187,68]; + lineof_temp[7334] = [4163,4,4167,96]; + lineof_temp[4357] = [2595,48,2595,64]; + lineof_temp[4292] = [2560,25,2560,61]; + lineof_temp[3754] = [2273,33,2274,108]; + lineof_temp[7076] = [4059,16,4059,32]; + lineof_temp[5383] = [3173,11,3173,66]; + lineof_temp[5141] = [3011,21,3011,48]; + lineof_temp[4202] = [2487,24,2487,45]; + lineof_temp[3627] = [2183,32,2200,86]; + lineof_temp[235] = [139,12,153,65]; + lineof_temp[3791] = [2285,20,2297,64]; + lineof_temp[2192] = [1237,2,1251,91]; + lineof_temp[7062] = [4054,19,4054,65]; + lineof_temp[3312] = [2044,35,2044,81]; + lineof_temp[2511] = [1491,22,1499,69]; + lineof_temp[5768] = [3369,4,3369,41]; + lineof_temp[4660] = [2757,8,2758,58]; + lineof_temp[6451] = [3735,51,3735,71]; + lineof_temp[2370] = [1380,4,1380,36]; + lineof_temp[6336] = [3669,10,3669,26]; + lineof_temp[3265] = [2007,10,2007,20]; + lineof_temp[3509] = [2097,6,2125,65]; + lineof_temp[2117] = [1203,17,1205,96]; + lineof_temp[5252] = [3071,4,3073,45]; + lineof_temp[1740] = [986,4,988,51]; + lineof_temp[7314] = [4167,21,4167,52]; + lineof_temp[6000] = [3512,4,3513,70]; + lineof_temp[4957] = [2927,24,2927,25]; + lineof_temp[6744] = [3901,78,3915,122]; + lineof_temp[6623] = [3812,51,3812,94]; + lineof_temp[5045] = [2961,29,2961,54]; + lineof_temp[3086] = [1869,12,1869,22]; + lineof_temp[1715] = [975,29,975,55]; + lineof_temp[5556] = [3278,25,3280,52]; + lineof_temp[6272] = [3648,39,3648,85]; + lineof_temp[4150] = [2473,24,2473,66]; + lineof_temp[4395] = [2526,30,2526,46]; + lineof_temp[654] = [436,74,436,100]; + lineof_temp[6246] = [3634,15,3635,46]; + lineof_temp[6224] = [3624,10,3625,39]; + lineof_temp[102] = [79,21,79,45]; + lineof_temp[5855] = [3403,2,3415,44]; + lineof_temp[4811] = [2835,13,2837,88]; + lineof_temp[3289] = [2011,8,2016,125]; + lineof_temp[6522] = [3763,32,3763,51]; + lineof_temp[6367] = [3680,10,3680,28]; + lineof_temp[1457] = [803,30,805,86]; + lineof_temp[4062] = [2442,7,2444,61]; + lineof_temp[5978] = [3504,24,3504,53]; + lineof_temp[5398] = [3178,4,3179,37]; + lineof_temp[2875] = [1735,51,1747,102]; + lineof_temp[2071] = [1170,16,1172,53]; + lineof_temp[5957] = [3484,15,3484,41]; + lineof_temp[3683] = [2210,8,2223,55]; + lineof_temp[5852] = [3412,8,3415,44]; +lineof_data["JsInterpreter.ml"] = lineof_temp; + lineof_temp = []; + lineof_temp[5852] = [3963,6,3965,40]; + lineof_temp[3683] = [2581,14,2581,20]; + lineof_temp[5957] = [4048,15,4048,40]; + lineof_temp[2071] = [1516,20,1520,60]; + lineof_temp[2875] = [2115,18,2116,56]; + lineof_temp[5398] = [3679,6,3679,75]; + lineof_temp[5978] = [4076,10,4076,46]; + lineof_temp[4062] = [2826,10,2826,44]; + lineof_temp[1457] = [1112,27,1112,72]; + lineof_temp[6367] = [4280,8,4280,33]; + lineof_temp[6522] = [4353,26,4353,42]; + lineof_temp[3289] = [2349,6,2349,18]; + lineof_temp[4811] = [3284,6,3284,16]; + lineof_temp[5855] = [3957,2,3957,18]; + lineof_temp[102] = [122,14,122,39]; + lineof_temp[6224] = [4214,19,4214,24]; + lineof_temp[6246] = [4225,22,4225,51]; + lineof_temp[654] = [583,14,583,39]; + lineof_temp[4395] = [2969,22,2969,33]; + lineof_temp[4150] = [2881,14,2881,56]; + lineof_temp[6272] = [4239,23,4239,66]; + lineof_temp[5556] = [3791,10,3793,39]; + lineof_temp[1715] = [1292,21,1292,43]; + lineof_temp[3086] = [2236,18,2236,28]; + lineof_temp[5045] = [3435,14,3435,46]; + lineof_temp[6623] = [4411,37,4411,76]; + lineof_temp[6744] = [4491,12,4495,23]; + lineof_temp[4957] = [3387,22,3387,30]; + lineof_temp[6000] = [4086,15,4086,18]; + lineof_temp[7314] = [4825,23,4825,54]; + lineof_temp[1740] = [1306,8,1309,54]; + lineof_temp[5252] = [3571,14,3571,15]; + lineof_temp[2117] = [1570,8,1574,93]; + lineof_temp[3509] = [2458,16,2458,19]; + lineof_temp[3265] = [2344,14,2344,24]; + lineof_temp[6336] = [4266,8,4266,31]; + lineof_temp[2370] = [1779,4,1779,42]; + lineof_temp[6451] = [4324,44,4324,62]; + lineof_temp[4660] = [3210,8,3210,74]; + lineof_temp[5768] = [3910,14,3910,52]; + lineof_temp[2511] = [1894,8,1894,18]; + lineof_temp[3312] = [2378,18,2378,62]; + lineof_temp[7062] = [4707,20,4707,49]; + lineof_temp[2192] = [1609,11,1609,12]; + lineof_temp[3791] = [2656,23,2657,67]; + lineof_temp[235] = [226,10,226,60]; + lineof_temp[3627] = [2552,12,2552,22]; + lineof_temp[4202] = [2909,20,2909,37]; + lineof_temp[5141] = [3508,15,3508,37]; + lineof_temp[5383] = [3671,8,3671,29]; + lineof_temp[7076] = [4715,17,4715,33]; + lineof_temp[3754] = [2648,17,2648,75]; + lineof_temp[4292] = [3008,28,3008,58]; + lineof_temp[4357] = [3045,20,3045,35]; + lineof_temp[7334] = [4821,6,4826,55]; + lineof_temp[3613] = [2554,16,2554,41]; + lineof_temp[5231] = [3536,6,3536,7]; + lineof_temp[5318] = [3618,24,3618,27]; + lineof_temp[6694] = [4470,16,4470,28]; + lineof_temp[5617] = [3828,6,3828,16]; + lineof_temp[2791] = [2029,15,2029,19]; + lineof_temp[7351] = [4814,2,4814,13]; + lineof_temp[403] = [403,6,404,68]; + lineof_temp[3875] = [2722,25,2723,59]; + lineof_temp[691] = [602,17,602,29]; + lineof_temp[1930] = [1448,16,1448,36]; + lineof_temp[6148] = [4177,14,4177,30]; + lineof_temp[2426] = [1835,4,1835,27]; + lineof_temp[2448] = [1861,14,1861,32]; + lineof_temp[4404] = [2974,13,2974,26]; + lineof_temp[5101] = [3480,14,3480,42]; + lineof_temp[6499] = [4342,10,4342,25]; + lineof_temp[5624] = [3826,10,3826,13]; + lineof_temp[5942] = [4036,15,4036,16]; + lineof_temp[242] = [258,10,258,27]; + lineof_temp[3002] = [2188,26,2188,34]; + lineof_temp[159] = [182,22,182,37]; + lineof_temp[3621] = [2557,14,2557,68]; + lineof_temp[5435] = [3709,55,3709,76]; + lineof_temp[781] = [675,16,675,72]; + lineof_temp[3759] = [2651,8,2651,19]; + lineof_temp[5568] = [3795,10,3795,24]; + lineof_temp[3094] = [2248,10,2250,23]; + lineof_temp[5524] = [3762,2,3762,12]; + lineof_temp[4072] = [2811,10,2811,12]; + lineof_temp[521] = [491,18,494,96]; + lineof_temp[1271] = [952,14,952,15]; + lineof_temp[2679] = [1985,24,1985,38]; + lineof_temp[5217] = [3555,18,3555,26]; + lineof_temp[6423] = [4315,14,4316,65]; + lineof_temp[6457] = [4323,23,4323,25]; + lineof_temp[7107] = [4719,6,4723,7]; + lineof_temp[767] = [641,22,641,25]; + lineof_temp[4817] = [3290,14,3290,24]; + lineof_temp[5095] = [3463,28,3463,49]; + lineof_temp[6816] = [4538,34,4538,54]; + lineof_temp[2917] = [2132,8,2133,69]; + lineof_temp[2986] = [2183,48,2183,75]; + lineof_temp[3317] = [2387,31,2387,76]; + lineof_temp[3647] = [2543,18,2543,23]; + lineof_temp[4383] = [3053,14,3053,26]; + lineof_temp[6567] = [4372,10,4372,32]; + lineof_temp[7150] = [4741,18,4741,23]; + lineof_temp[3751] = [2648,48,2648,74]; + lineof_temp[7118] = [4716,6,4716,18]; + lineof_temp[1497] = [1135,18,1135,36]; + lineof_temp[4445] = [3078,25,3078,66]; + lineof_temp[5897] = [3999,15,3999,16]; + lineof_temp[3299] = [2365,8,2368,80]; + lineof_temp[5234] = [3534,10,3534,12]; + lineof_temp[6220] = [4214,27,4214,62]; + lineof_temp[279] = [286,14,286,40]; + lineof_temp[2294] = [1697,6,1697,16]; + lineof_temp[3461] = [2476,10,2476,30]; + lineof_temp[5512] = [3734,16,3734,19]; + lineof_temp[5732] = [3890,14,3890,38]; + lineof_temp[1289] = [721,2,723,4]; + lineof_temp[1958] = [1466,15,1466,50]; + lineof_temp[2519] = [1960,27,1964,68]; + lineof_temp[5934] = [4002,6,4028,6]; + lineof_temp[5674] = [3856,4,3856,41]; + lineof_temp[1175] = [849,16,849,39]; + lineof_temp[3797] = [2664,19,2664,77]; + lineof_temp[6383] = [4291,19,4291,22]; + lineof_temp[6870] = [4574,14,4574,52]; + lineof_temp[326] = [319,4,319,28]; + lineof_temp[4266] = [2968,6,2968,30]; + lineof_temp[5335] = [3633,16,3633,63]; + lineof_temp[391] = [400,15,400,53]; + lineof_temp[3193] = [2298,17,2298,44]; + lineof_temp[7011] = [4646,20,4673,26]; + lineof_temp[226] = [239,16,239,31]; + lineof_temp[758] = [648,22,648,34]; + lineof_temp[889] = [745,23,746,77]; + lineof_temp[2701] = [1992,14,1992,30]; + lineof_temp[6520] = [4351,10,4351,25]; + lineof_temp[6787] = [4517,22,4517,48]; + lineof_temp[6276] = [4239,19,4239,20]; + lineof_temp[6581] = [4382,20,4382,36]; + lineof_temp[7013] = [4644,20,4644,43]; + lineof_temp[1468] = [1108,6,1108,16]; + lineof_temp[1937] = [1385,16,1385,17]; + lineof_temp[7020] = [4624,4,4624,44]; + lineof_temp[4105] = [2858,14,2858,35]; + lineof_temp[4926] = [3361,18,3361,41]; + lineof_temp[2812] = [2057,10,2058,67]; + lineof_temp[7130] = [4740,37,4740,48]; + lineof_temp[3932] = [2746,28,2746,42]; + lineof_temp[1132] = [889,34,889,41]; + lineof_temp[4702] = [3229,4,3229,16]; + lineof_temp[4939] = [3378,36,3382,98]; + lineof_temp[404] = [402,4,402,38]; + lineof_temp[1197] = [837,14,837,15]; + lineof_temp[1624] = [1209,6,1209,17]; + lineof_temp[926] = [798,22,799,59]; + lineof_temp[3605] = [2548,14,2548,33]; + lineof_temp[6655] = [4426,18,4426,64]; + lineof_temp[262] = [275,31,275,57]; + lineof_temp[2032] = [1549,20,1549,66]; + lineof_temp[5723] = [3886,14,3886,32]; + lineof_temp[645] = [574,19,574,49]; + lineof_temp[334] = [334,14,334,35]; + lineof_temp[3757] = [2649,22,2650,66]; + lineof_temp[6346] = [4269,10,4269,20]; + lineof_temp[6746] = [4484,12,4484,53]; + lineof_temp[395] = [404,16,404,65]; + lineof_temp[2554] = [1922,37,1922,70]; + lineof_temp[3714] = [2626,20,2626,63]; + lineof_temp[6409] = [4312,14,4312,39]; + lineof_temp[5501] = [3747,14,3747,31]; + lineof_temp[5794] = [3878,15,3878,32]; + lineof_temp[6465] = [4308,18,4308,19]; + lineof_temp[5816] = [3934,6,3943,6]; + lineof_temp[2628] = [1953,20,1953,31]; + lineof_temp[1977] = [1469,6,1475,7]; + lineof_temp[5139] = [3495,2,3504,6]; + lineof_temp[6614] = [4405,28,4405,56]; + lineof_temp[359] = [358,13,358,14]; + lineof_temp[2468] = [1862,4,1862,27]; + lineof_temp[3202] = [2320,19,2321,57]; + lineof_temp[7025] = [4682,16,4682,32]; + lineof_temp[1782] = [1333,10,1333,44]; + lineof_temp[3926] = [2677,16,2677,33]; + lineof_temp[4221] = [2913,4,2913,39]; + lineof_temp[6745] = [4485,12,4490,14]; + lineof_temp[5941] = [4036,19,4036,59]; + lineof_temp[1623] = [1209,15,1209,17]; + lineof_temp[1888] = [1417,30,1417,40]; + lineof_temp[441] = [411,4,442,4]; + lineof_temp[3879] = [2728,29,2729,63]; + lineof_temp[5238] = [3569,6,3569,18]; + lineof_temp[5968] = [4070,22,4070,50]; + lineof_temp[1226] = [969,32,969,61]; + lineof_temp[2623] = [1950,29,1952,69]; + lineof_temp[5266] = [3592,40,3592,47]; + lineof_temp[3637] = [2547,10,2547,23]; + lineof_temp[3909] = [2706,20,2706,28]; + lineof_temp[4227] = [2919,4,2919,26]; + lineof_temp[7014] = [4643,44,4643,57]; + lineof_temp[596] = [544,31,544,34]; + lineof_temp[3468] = [2482,20,2482,29]; + lineof_temp[5577] = [3785,4,3787,6]; + lineof_temp[365] = [366,12,366,25]; + lineof_temp[5743] = [3896,14,3896,35]; + lineof_temp[162] = [153,16,153,40]; + lineof_temp[1680] = [1257,24,1257,59]; + lineof_temp[4992] = [3413,4,3413,27]; + lineof_temp[6430] = [4318,29,4318,45]; + lineof_temp[564] = [525,8,525,22]; + lineof_temp[1769] = [1317,28,1317,57]; + lineof_temp[4411] = [2983,17,2983,39]; + lineof_temp[175] = [198,6,198,37]; + lineof_temp[3442] = [2466,17,2467,43]; + lineof_temp[3081] = [2238,23,2238,54]; + lineof_temp[1896] = [1407,26,1407,54]; + lineof_temp[3062] = [2216,12,2216,66]; + lineof_temp[3756] = [2650,24,2650,52]; + lineof_temp[92] = [105,4,105,14]; + lineof_temp[790] = [621,6,621,15]; + lineof_temp[3764] = [2648,8,2648,76]; + lineof_temp[916] = [780,23,780,52]; + lineof_temp[1900] = [1399,18,1399,21]; + lineof_temp[7266] = [4776,4,4776,44]; + lineof_temp[224] = [242,18,242,32]; + lineof_temp[5302] = [3610,4,3610,12]; + lineof_temp[6404] = [4297,14,4297,15]; + lineof_temp[1533] = [1158,15,1158,50]; + lineof_temp[3466] = [2481,26,2481,42]; + lineof_temp[417] = [424,20,424,40]; + lineof_temp[1523] = [1153,17,1153,29]; + lineof_temp[4924] = [3360,20,3360,62]; + lineof_temp[153] = [168,30,169,56]; + lineof_temp[2696] = [1990,14,1990,50]; + lineof_temp[3947] = [2750,2,2752,15]; + lineof_temp[3953] = [2757,4,2757,77]; + lineof_temp[6897] = [4596,36,4596,74]; + lineof_temp[2063] = [1514,20,1514,76]; + lineof_temp[3433] = [2463,12,2463,39]; + lineof_temp[7230] = [4770,20,4770,44]; + lineof_temp[2484] = [1886,16,1886,26]; + lineof_temp[948] = [810,34,810,52]; + lineof_temp[1864] = [1394,16,1394,30]; + lineof_temp[689] = [596,15,596,27]; + lineof_temp[4254] = [2956,14,2956,28]; + lineof_temp[591] = [546,20,546,21]; + lineof_temp[1157] = [857,28,857,51]; + lineof_temp[1956] = [1461,2,1462,51]; + lineof_temp[4584] = [3161,2,3161,14]; + lineof_temp[807] = [705,8,705,22]; + lineof_temp[1973] = [1470,6,1470,27]; + lineof_temp[2916] = [2132,8,2132,18]; + lineof_temp[5245] = [3575,24,3575,55]; + lineof_temp[6645] = [4383,6,4383,38]; + lineof_temp[7043] = [4681,4,4681,37]; + lineof_temp[492] = [444,2,451,4]; + lineof_temp[2255] = [1672,6,1679,10]; + lineof_temp[5708] = [3841,15,3841,32]; + lineof_temp[6133] = [4168,39,4168,47]; + lineof_temp[3260] = [2329,2,2338,3]; + lineof_temp[5912] = [4011,14,4011,40]; + lineof_temp[1551] = [1171,6,1171,53]; + lineof_temp[2293] = [1697,15,1697,16]; + lineof_temp[4267] = [2968,6,2968,30]; + lineof_temp[7123] = [4733,21,4733,37]; + lineof_temp[623] = [563,14,564,58]; + lineof_temp[5508] = [3756,20,3756,45]; + lineof_temp[6601] = [4399,28,4399,62]; + lineof_temp[3701] = [2618,14,2618,61]; + lineof_temp[5955] = [4041,8,4041,39]; + lineof_temp[6922] = [4587,52,4587,65]; + lineof_temp[3436] = [2465,14,2465,59]; + lineof_temp[6986] = [4659,44,4659,72]; + lineof_temp[5535] = [3772,6,3772,38]; + lineof_temp[7281] = [4800,14,4800,42]; + lineof_temp[707] = [612,14,612,39]; + lineof_temp[1350] = [1036,38,1037,78]; + lineof_temp[3029] = [2161,10,2161,13]; + lineof_temp[3895] = [2720,20,2720,58]; + lineof_temp[1174] = [850,18,850,78]; + lineof_temp[2420] = [1829,4,1829,48]; + lineof_temp[4706] = [3226,10,3226,12]; + lineof_temp[111] = [116,10,116,15]; + lineof_temp[4515] = [3143,26,3143,39]; + lineof_temp[7134] = [4741,26,4741,50]; + lineof_temp[4785] = [3275,10,3275,22]; + lineof_temp[4870] = [3315,13,3315,28]; + lineof_temp[6784] = [4515,14,4515,52]; + lineof_temp[551] = [519,16,519,43]; + lineof_temp[4092] = [2840,15,2840,16]; + lineof_temp[5407] = [3668,2,3676,4]; + lineof_temp[1777] = [1336,18,1336,64]; + lineof_temp[3035] = [2154,22,2155,61]; + lineof_temp[1339] = [1025,30,1026,74]; + lineof_temp[1483] = [1084,10,1084,15]; + lineof_temp[3398] = [2430,16,2430,28]; + lineof_temp[1311] = [1004,10,1005,24]; + lineof_temp[5233] = [3534,15,3534,37]; + lineof_temp[2573] = [1927,33,1929,73]; + lineof_temp[7332] = [4821,15,4821,19]; + lineof_temp[4196] = [2905,6,2905,40]; + lineof_temp[554] = [517,12,517,24]; + lineof_temp[893] = [745,19,745,20]; + lineof_temp[2162] = [1604,2,1605,56]; + lineof_temp[209] = [229,39,229,61]; + lineof_temp[2861] = [2105,6,2105,12]; + lineof_temp[3331] = [2396,24,2396,70]; + lineof_temp[7054] = [4703,18,4703,64]; + lineof_temp[7297] = [4802,6,4807,72]; + lineof_temp[4457] = [3092,18,3092,31]; + lineof_temp[4765] = [3261,20,3261,32]; + lineof_temp[2970] = [2162,12,2162,48]; + lineof_temp[3812] = [2668,23,2669,67]; + lineof_temp[4491] = [3074,4,3074,20]; + lineof_temp[5547] = [3785,15,3785,26]; + lineof_temp[7048] = [4698,10,4698,32]; + lineof_temp[1781] = [1334,12,1338,111]; + lineof_temp[6035] = [4104,8,4104,41]; + lineof_temp[1264] = [955,8,957,10]; + lineof_temp[4019] = [2800,13,2800,35]; + lineof_temp[7226] = [4769,14,4769,37]; + lineof_temp[5460] = [3725,27,3725,39]; + lineof_temp[2893] = [2094,2,2094,27]; + lineof_temp[4329] = [3032,26,3032,42]; + lineof_temp[5368] = [3648,20,3648,28]; + lineof_temp[6275] = [4239,23,4239,66]; + lineof_temp[285] = [289,35,289,61]; + lineof_temp[5931] = [4002,18,4002,47]; + lineof_temp[7112] = [4717,23,4717,50]; + lineof_temp[958] = [787,32,787,63]; + lineof_temp[1462] = [1109,21,1109,33]; + lineof_temp[1577] = [1194,8,1194,65]; + lineof_temp[1275] = [951,15,951,19]; + lineof_temp[399] = [404,6,404,68]; + lineof_temp[1332] = [1016,18,1016,72]; + lineof_temp[2772] = [2034,26,2034,66]; + lineof_temp[3276] = [2355,16,2355,22]; + lineof_temp[3556] = [2529,26,2529,67]; + lineof_temp[3825] = [2643,21,2643,68]; + lineof_temp[6490] = [4333,4,4333,44]; + lineof_temp[5429] = [3697,4,3703,5]; + lineof_temp[6737] = [4493,26,4494,64]; + lineof_temp[543] = [478,11,478,12]; + lineof_temp[1496] = [1132,8,1132,30]; + lineof_temp[4044] = [2806,2,2806,12]; + lineof_temp[6631] = [4411,16,4412,64]; + lineof_temp[2842] = [2068,2,2073,4]; + lineof_temp[421] = [428,20,428,47]; + lineof_temp[257] = [271,8,272,37]; + lineof_temp[6454] = [4324,22,4324,63]; + lineof_temp[529] = [497,10,497,40]; + lineof_temp[1490] = [1131,18,1131,46]; + lineof_temp[3850] = [2687,8,2687,30]; + lineof_temp[5021] = [3436,21,3437,47]; + lineof_temp[1076] = [923,28,923,42]; + lineof_temp[1647] = [1230,14,1230,40]; + lineof_temp[5430] = [3696,13,3696,25]; + lineof_temp[5678] = [3858,4,3858,33]; + lineof_temp[2966] = [2197,17,2197,18]; + lineof_temp[3779] = [2661,25,2661,53]; + lineof_temp[6899] = [4598,36,4598,48]; + lineof_temp[4233] = [2929,4,2929,27]; + lineof_temp[7073] = [4696,6,4696,22]; + lineof_temp[2982] = [2166,14,2170,82]; + lineof_temp[1187] = [943,20,943,47]; + lineof_temp[6776] = [4502,6,4507,10]; + lineof_temp[1485] = [1129,18,1129,46]; + lineof_temp[1016] = [726,19,726,59]; + lineof_temp[2961] = [2197,21,2198,37]; + lineof_temp[5659] = [3851,6,3852,35]; + lineof_temp[6873] = [4576,22,4576,50]; + lineof_temp[249] = [267,8,268,37]; + lineof_temp[1013] = [743,8,748,10]; + lineof_temp[2598] = [1932,16,1932,28]; + lineof_temp[3897] = [2717,26,2717,54]; + lineof_temp[5892] = [3970,27,3970,46]; + lineof_temp[6748] = [4481,21,4481,22]; + lineof_temp[2301] = [1712,6,1712,29]; + lineof_temp[824] = [697,19,697,52]; + lineof_temp[3444] = [2466,4,2466,14]; + lineof_temp[6396] = [4301,23,4301,63]; + lineof_temp[1056] = [907,47,907,71]; + lineof_temp[2704] = [1993,6,1993,63]; + lineof_temp[5821] = [3951,27,3951,35]; + lineof_temp[4220] = [2914,6,2914,47]; + lineof_temp[4750] = [3255,4,3256,61]; + lineof_temp[210] = [229,39,229,61]; + lineof_temp[3828] = [2643,6,2672,6]; + lineof_temp[345] = [349,10,349,55]; + lineof_temp[5131] = [3495,17,3495,28]; + lineof_temp[2939] = [2127,4,2127,28]; + lineof_temp[3914] = [2703,18,2703,26]; + lineof_temp[4001] = [2776,2,2783,3]; + lineof_temp[6141] = [4166,4,4166,19]; + lineof_temp[321] = [316,6,316,25]; + lineof_temp[1211] = [987,8,987,35]; + lineof_temp[5090] = [3465,2,3465,39]; + lineof_temp[7301] = [4813,16,4813,50]; + lineof_temp[196] = [220,29,220,47]; + lineof_temp[5610] = [3828,19,3828,41]; + lineof_temp[7175] = [4733,6,4733,18]; + lineof_temp[4122] = [2870,54,2870,61]; + lineof_temp[4738] = [3251,15,3251,37]; + lineof_temp[5665] = [3855,6,3855,34]; + lineof_temp[6006] = [4091,12,4091,38]; + lineof_temp[116] = [137,4,137,23]; + lineof_temp[2285] = [1697,19,1701,65]; + lineof_temp[348] = [348,6,351,72]; + lineof_temp[6770] = [4504,18,4504,34]; + lineof_temp[38] = [56,14,56,40]; + lineof_temp[1127] = [881,34,881,48]; + lineof_temp[5205] = [3547,11,3547,35]; + lineof_temp[2913] = [2133,8,2133,69]; + lineof_temp[3503] = [2471,12,2471,25]; + lineof_temp[6984] = [4657,36,4657,74]; + lineof_temp[5741] = [3894,6,3894,58]; + lineof_temp[522] = [490,16,494,98]; + lineof_temp[2436] = [1845,4,1845,44]; + lineof_temp[7032] = [4688,14,4688,40]; + lineof_temp[2624] = [1949,27,1949,40]; + lineof_temp[4067] = [2819,2,2819,45]; + lineof_temp[5507] = [3735,10,3735,23]; + lineof_temp[3678] = [2598,20,2598,56]; + lineof_temp[4026] = [2799,10,2799,12]; + lineof_temp[635] = [536,4,536,43]; + lineof_temp[1767] = [1317,28,1317,57]; + lineof_temp[2399] = [1810,6,1810,29]; + lineof_temp[3364] = [2371,19,2371,35]; + lineof_temp[5390] = [3669,16,3669,17]; + lineof_temp[362] = [357,16,357,29]; + lineof_temp[2019] = [1506,36,1506,50]; + lineof_temp[3686] = [2580,6,2580,21]; + lineof_temp[4508] = [3134,28,3134,49]; + lineof_temp[7070] = [4697,6,4713,7]; + lineof_temp[1007] = [753,20,753,38]; + lineof_temp[3616] = [2557,46,2557,63]; + lineof_temp[1562] = [1173,21,1173,50]; + lineof_temp[4655] = [3208,24,3208,43]; + lineof_temp[6633] = [4410,24,4410,28]; + lineof_temp[3279] = [2353,21,2354,54]; + lineof_temp[5350] = [3641,12,3645,33]; + lineof_temp[6554] = [4360,21,4360,37]; + lineof_temp[649] = [574,6,574,16]; + lineof_temp[1005] = [756,14,756,55]; + lineof_temp[5098] = [3477,17,3477,43]; + lineof_temp[5908] = [4006,12,4009,94]; + lineof_temp[372] = [376,4,376,27]; + lineof_temp[859] = [730,15,730,47]; + lineof_temp[2284] = [1698,21,1698,33]; + lineof_temp[3017] = [2179,25,2179,26]; + lineof_temp[6974] = [4647,22,4647,62]; + lineof_temp[5067] = [3410,14,3410,31]; + lineof_temp[73] = [92,11,93,75]; + lineof_temp[1857] = [1394,33,1394,72]; + lineof_temp[4424] = [2971,4,2971,17]; + lineof_temp[4010] = [2787,10,2787,12]; + lineof_temp[4714] = [3240,14,3240,38]; + lineof_temp[6360] = [4282,18,4282,46]; + lineof_temp[896] = [744,10,744,49]; + lineof_temp[1417] = [1019,20,1078,57]; + lineof_temp[1337] = [1024,38,1024,66]; + lineof_temp[1138] = [889,34,889,41]; + lineof_temp[3603] = [2548,16,2548,32]; + lineof_temp[2454] = [1866,19,1866,46]; + lineof_temp[2784] = [2031,6,2031,18]; + lineof_temp[4239] = [2935,4,2935,32]; + lineof_temp[4734] = [3236,10,3236,12]; + lineof_temp[5545] = [3786,14,3786,56]; + lineof_temp[7162] = [4737,8,4737,23]; + lineof_temp[1363] = [1043,49,1045,65]; + lineof_temp[6201] = [4201,22,4201,39]; + lineof_temp[7113] = [4717,16,4717,20]; + lineof_temp[1048] = [905,35,905,47]; + lineof_temp[3941] = [2751,51,2751,72]; + lineof_temp[6595] = [4387,12,4391,60]; + lineof_temp[7286] = [4807,22,4807,43]; + lineof_temp[3197] = [2299,15,2299,56]; + lineof_temp[7298] = [4801,4,4801,12]; + lineof_temp[149] = [176,30,176,51]; + lineof_temp[1201] = [836,6,948,6]; + lineof_temp[3917] = [2699,8,2701,10]; + lineof_temp[3956] = [2755,27,2755,44]; + lineof_temp[6711] = [4463,24,4463,28]; + lineof_temp[253] = [271,31,271,57]; + lineof_temp[3459] = [2477,20,2477,43]; + lineof_temp[3652] = [2507,10,2507,11]; + lineof_temp[7058] = [4702,14,4705,58]; + lineof_temp[4364] = [3047,24,3047,35]; + lineof_temp[4635] = [3180,19,3180,35]; + lineof_temp[229] = [235,16,235,42]; + lineof_temp[5960] = [4048,14,4048,67]; + lineof_temp[4700] = [3231,4,3231,13]; + lineof_temp[2130] = [1595,20,1595,22]; + lineof_temp[6832] = [4546,34,4546,59]; + lineof_temp[662] = [586,6,586,41]; + lineof_temp[4860] = [3312,18,3312,64]; + lineof_temp[6512] = [4337,21,4337,33]; + lineof_temp[5111] = [3487,18,3487,46]; + lineof_temp[2718] = [1996,8,2000,71]; + lineof_temp[5882] = [3986,12,3986,27]; + lineof_temp[7192] = [4748,16,4748,20]; + lineof_temp[570] = [509,2,509,12]; + lineof_temp[784] = [673,12,673,48]; + lineof_temp[3607] = [2551,29,2551,53]; + lineof_temp[4987] = [3411,15,3411,41]; + lineof_temp[6431] = [4319,28,4319,63]; + lineof_temp[6855] = [4524,8,4524,33]; + lineof_temp[3341] = [2390,14,2390,24]; + lineof_temp[4060] = [2829,8,2829,20]; + lineof_temp[3847] = [2688,14,2688,54]; + lineof_temp[6936] = [4622,16,4622,32]; + lineof_temp[1705] = [1287,16,1287,67]; + lineof_temp[5087] = [3471,2,3471,11]; + lineof_temp[5443] = [3715,8,3715,26]; + lineof_temp[5840] = [3965,26,3965,37]; + lineof_temp[50] = [73,8,73,30]; + lineof_temp[104] = [121,4,121,26]; + lineof_temp[3375] = [2416,14,2417,37]; + lineof_temp[3579] = [2518,10,2539,10]; + lineof_temp[512] = [483,25,483,60]; + lineof_temp[6553] = [4361,6,4368,6]; + lineof_temp[4083] = [2843,18,2843,46]; + lineof_temp[5299] = [3611,14,3611,60]; + lineof_temp[1884] = [1409,22,1413,92]; + lineof_temp[3454] = [2461,13,2461,17]; + lineof_temp[749] = [642,16,642,47]; + lineof_temp[1946] = [1381,10,1381,11]; + lineof_temp[4011] = [2787,2,2787,12]; + lineof_temp[6521] = [4350,8,4350,31]; + lineof_temp[6821] = [4543,44,4543,70]; + lineof_temp[378] = [385,10,385,62]; + lineof_temp[900] = [749,12,749,71]; + lineof_temp[2638] = [1904,6,1904,41]; + lineof_temp[5382] = [3673,8,3673,19]; + lineof_temp[733] = [633,20,633,32]; + lineof_temp[2647] = [1973,22,1973,37]; + lineof_temp[1670] = [1250,14,1250,47]; + lineof_temp[5353] = [3650,25,3650,46]; + lineof_temp[6156] = [4182,43,4182,72]; + lineof_temp[6569] = [4379,16,4379,44]; + lineof_temp[2324] = [1733,4,1733,53]; + lineof_temp[6514] = [4337,6,4337,18]; + lineof_temp[4306] = [2988,20,2988,22]; + lineof_temp[6001] = [4086,6,4086,18]; + lineof_temp[6970] = [4644,20,4644,43]; + lineof_temp[3184] = [2280,2,2280,17]; + lineof_temp[4002] = [2775,24,2775,41]; + lineof_temp[180] = [133,34,133,55]; + lineof_temp[2389] = [1800,6,1800,39]; + lineof_temp[6069] = [4124,4,4128,30]; + lineof_temp[2072] = [1515,18,1515,43]; + lineof_temp[481] = [460,6,467,6]; + lineof_temp[3025] = [2163,18,2163,19]; + lineof_temp[3694] = [2613,29,2613,59]; + lineof_temp[5175] = [3523,12,3523,15]; + lineof_temp[4040] = [2807,10,2807,24]; + lineof_temp[6405] = [4296,6,4296,31]; + lineof_temp[3000] = [2183,20,2185,55]; + lineof_temp[3394] = [2410,8,2410,31]; + lineof_temp[1830] = [1303,10,1303,15]; + lineof_temp[2589] = [1936,26,1936,55]; + lineof_temp[4607] = [3172,6,3173,17]; + lineof_temp[335] = [334,6,334,37]; + lineof_temp[560] = [511,4,511,27]; + lineof_temp[3087] = [2236,10,2236,30]; + lineof_temp[4358] = [3045,12,3045,37]; + lineof_temp[6391] = [4296,14,4296,30]; + lineof_temp[2153] = [1564,40,1564,70]; + lineof_temp[3248] = [2332,17,2332,67]; + lineof_temp[3849] = [2688,6,2688,56]; + lineof_temp[195] = [220,29,220,47]; + lineof_temp[6528] = [4353,21,4353,23]; + lineof_temp[2067] = [1518,26,1518,72]; + lineof_temp[3011] = [2179,29,2180,67]; + lineof_temp[4207] = [2909,20,2909,37]; + lineof_temp[4709] = [3225,23,3225,40]; + lineof_temp[1894] = [1415,22,1417,42]; + lineof_temp[4372] = [3047,12,3048,51]; + lineof_temp[474] = [465,18,465,41]; + lineof_temp[1762] = [1328,18,1328,29]; + lineof_temp[4968] = [3396,22,3396,52]; + lineof_temp[6781] = [4512,12,4512,32]; + lineof_temp[803] = [715,6,715,20]; + lineof_temp[1749] = [1325,24,1325,51]; + lineof_temp[3687] = [2580,6,2601,6]; + lineof_temp[6096] = [4151,26,4151,38]; + lineof_temp[1205] = [952,18,952,50]; + lineof_temp[3574] = [2522,18,2522,20]; + lineof_temp[6016] = [4101,16,4101,62]; + lineof_temp[613] = [540,8,556,8]; + lineof_temp[4599] = [3171,18,3171,39]; + lineof_temp[4861] = [3312,18,3312,64]; + lineof_temp[7017] = [4641,10,4676,21]; + lineof_temp[1453] = [1107,20,1107,35]; + lineof_temp[6763] = [4449,12,4449,63]; + lineof_temp[753] = [652,28,652,65]; + lineof_temp[4315] = [3022,14,3022,26]; + lineof_temp[5553] = [3793,16,3793,37]; + lineof_temp[1807] = [1354,10,1354,42]; + lineof_temp[3636] = [2547,21,2547,23]; + lineof_temp[4249] = [2945,4,2945,34]; + lineof_temp[2414] = [1823,4,1823,45]; + lineof_temp[3365] = [2413,32,2414,39]; + lineof_temp[4110] = [2857,6,2858,37]; + lineof_temp[4129] = [2868,4,2868,27]; + lineof_temp[4477] = [3105,25,3105,57]; + lineof_temp[1131] = [887,46,888,58]; + lineof_temp[3387] = [2421,20,2421,66]; + lineof_temp[323] = [318,6,318,24]; + lineof_temp[1233] = [969,18,970,36]; + lineof_temp[1591] = [1185,10,1185,11]; + lineof_temp[122] = [147,12,147,31]; + lineof_temp[638] = [534,11,534,12]; + lineof_temp[3495] = [2486,10,2486,35]; + lineof_temp[4195] = [2905,14,2905,38]; + lineof_temp[6735] = [4493,26,4494,64]; + lineof_temp[1477] = [1117,12,1117,58]; + lineof_temp[1143] = [881,30,886,31]; + lineof_temp[2481] = [1884,16,1884,32]; + lineof_temp[2358] = [1767,4,1767,51]; + lineof_temp[2446] = [1860,14,1860,30]; + lineof_temp[4381] = [3054,18,3054,64]; + lineof_temp[4755] = [3251,15,3251,37]; + lineof_temp[6347] = [4269,10,4272,21]; + lineof_temp[793] = [619,10,619,11]; + lineof_temp[2510] = [1894,17,1894,18]; + lineof_temp[3488] = [2488,20,2488,29]; + lineof_temp[5549] = [3788,55,3788,76]; + lineof_temp[980] = [764,32,764,74]; + lineof_temp[2698] = [1989,6,1989,31]; + lineof_temp[2198] = [1638,21,1638,59]; + lineof_temp[4305] = [2988,25,2988,36]; + lineof_temp[271] = [280,10,280,36]; + lineof_temp[561] = [527,16,527,53]; + lineof_temp[5202] = [3547,13,3547,34]; + lineof_temp[320] = [313,4,313,23]; + lineof_temp[2419] = [1830,6,1830,43]; + lineof_temp[4505] = [3133,25,3133,40]; + lineof_temp[5860] = [3974,14,3974,20]; + lineof_temp[1277] = [951,6,988,7]; + lineof_temp[2558] = [1919,31,1919,44]; + lineof_temp[143] = [173,35,173,57]; + lineof_temp[6478] = [4329,10,4329,21]; + lineof_temp[2727] = [2007,6,2007,44]; + lineof_temp[3269] = [2347,16,2347,62]; + lineof_temp[545] = [478,2,505,2]; + lineof_temp[6227] = [4213,8,4213,33]; + lineof_temp[4300] = [2997,16,2997,56]; + lineof_temp[1618] = [1215,12,1216,24]; + lineof_temp[3051] = [2211,10,2211,56]; + lineof_temp[503] = [473,2,474,42]; + lineof_temp[2904] = [2128,14,2128,34]; + lineof_temp[838] = [688,4,688,28]; + lineof_temp[3689] = [2576,10,2576,15]; + lineof_temp[4390] = [3037,16,3037,17]; + lineof_temp[1704] = [1289,8,1289,19]; + lineof_temp[1814] = [1359,16,1362,111]; + lineof_temp[5002] = [3419,20,3419,48]; + lineof_temp[2673] = [1984,18,1984,34]; + lineof_temp[3315] = [2376,22,2376,33]; + lineof_temp[1997] = [1483,2,1484,69]; + lineof_temp[2334] = [1743,4,1743,34]; + lineof_temp[4626] = [3187,14,3187,34]; + lineof_temp[4691] = [3226,15,3226,37]; + lineof_temp[5928] = [4011,10,4023,11]; + lineof_temp[706] = [612,14,612,39]; + lineof_temp[1824] = [1363,12,1363,46]; + lineof_temp[6180] = [4185,6,4186,33]; + lineof_temp[1075] = [917,30,917,62]; + lineof_temp[2337] = [1748,6,1748,43]; + lineof_temp[3644] = [2568,10,2568,21]; + lineof_temp[629] = [560,8,564,62]; + lineof_temp[1597] = [1201,15,1201,51]; + lineof_temp[7242] = [4779,27,4779,41]; + lineof_temp[2786] = [2030,24,2030,28]; + lineof_temp[2844] = [2067,13,2067,19]; + lineof_temp[3179] = [2282,4,2283,19]; + lineof_temp[6877] = [4565,8,4565,31]; + lineof_temp[1576] = [1194,16,1194,63]; + lineof_temp[34] = [45,4,45,28]; + lineof_temp[1285] = [831,11,831,12]; + lineof_temp[5148] = [3513,12,3513,41]; + lineof_temp[3127] = [2271,27,2273,66]; + lineof_temp[4137] = [2871,4,2871,27]; + lineof_temp[4130] = [2873,54,2873,73]; + lineof_temp[6002] = [4086,6,4087,22]; + lineof_temp[5301] = [3611,6,3611,62]; + lineof_temp[2565] = [1918,25,1918,26]; + lineof_temp[2942] = [2148,14,2148,24]; + lineof_temp[1838] = [1376,14,1376,16]; + lineof_temp[3535] = [2500,12,2500,23]; + lineof_temp[3994] = [2779,12,2779,24]; + lineof_temp[7368] = [4835,2,4836,23]; + lineof_temp[2613] = [1939,25,1939,26]; + lineof_temp[5157] = [3509,13,3509,14]; + lineof_temp[298] = [293,12,294,41]; + lineof_temp[2648] = [1973,22,1973,37]; + lineof_temp[3268] = [2347,16,2347,62]; + lineof_temp[5343] = [3642,36,3642,54]; + lineof_temp[6736] = [4495,12,4495,23]; + lineof_temp[3397] = [2431,20,2431,66]; + lineof_temp[4552] = [3145,8,3145,18]; + lineof_temp[974] = [779,20,780,53]; + lineof_temp[6667] = [4429,10,4429,41]; + lineof_temp[5049] = [3451,24,3451,33]; + lineof_temp[5351] = [3640,23,3640,34]; + lineof_temp[1505] = [1127,14,1127,15]; + lineof_temp[4946] = [3369,24,3384,34]; + lineof_temp[6937] = [4622,16,4622,32]; + lineof_temp[6865] = [4569,12,4569,31]; + lineof_temp[2876] = [2115,13,2115,15]; + lineof_temp[3016] = [2179,29,2180,67]; + lineof_temp[4065] = [2821,4,2821,19]; + lineof_temp[5937] = [3996,22,3996,41]; + lineof_temp[701] = [609,14,609,39]; + lineof_temp[2328] = [1737,4,1737,36]; + lineof_temp[5532] = [3769,6,3769,16]; + lineof_temp[6151] = [4181,11,4181,28]; + lineof_temp[4064] = [2823,8,2823,41]; + lineof_temp[3542] = [2514,10,2514,41]; + lineof_temp[3103] = [2253,21,2254,58]; + lineof_temp[3416] = [2440,12,2440,25]; + lineof_temp[3525] = [2504,8,2504,60]; + lineof_temp[3120] = [2273,29,2273,58]; + lineof_temp[4749] = [3255,4,3255,16]; + lineof_temp[7] = [16,32,16,76]; + lineof_temp[5327] = [3614,8,3614,43]; + lineof_temp[1962] = [1471,10,1471,57]; + lineof_temp[2908] = [2130,20,2130,54]; + lineof_temp[5571] = [3799,12,3799,28]; + lineof_temp[5766] = [3907,4,3907,45]; + lineof_temp[1320] = [999,23,999,47]; + lineof_temp[3992] = [2780,4,2780,35]; + lineof_temp[6859] = [4568,22,4568,50]; + lineof_temp[3975] = [2778,22,2778,33]; + lineof_temp[1642] = [1201,2,1201,12]; + lineof_temp[2065] = [1519,26,1519,53]; + lineof_temp[5637] = [3844,6,3844,44]; + lineof_temp[6094] = [4148,10,4149,22]; + lineof_temp[2383] = [1794,6,1794,30]; + lineof_temp[4506] = [3134,38,3134,48]; + lineof_temp[6203] = [4201,14,4201,41]; + lineof_temp[5044] = [3436,20,3440,46]; + lineof_temp[1225] = [969,32,969,61]; + lineof_temp[5587] = [3810,14,3810,42]; + lineof_temp[5638] = [3843,4,3843,23]; + lineof_temp[479] = [460,14,460,15]; + lineof_temp[653] = [569,19,569,38]; + lineof_temp[1004] = [756,22,756,53]; + lineof_temp[1803] = [1352,10,1352,42]; + lineof_temp[5412] = [3666,22,3666,44]; + lineof_temp[1426] = [1008,6,1078,67]; + lineof_temp[2288] = [1702,43,1702,53]; + lineof_temp[2480] = [1884,16,1884,32]; + lineof_temp[3615] = [2557,46,2557,63]; + lineof_temp[4133] = [2873,28,2873,43]; + lineof_temp[4989] = [3414,14,3414,42]; + lineof_temp[5300] = [3611,14,3611,60]; + lineof_temp[908] = [760,22,760,51]; + lineof_temp[2036] = [1548,16,1551,52]; + lineof_temp[3409] = [2444,20,2444,47]; + lineof_temp[3406] = [2434,12,2434,22]; + lineof_temp[6038] = [4089,18,4089,47]; + lineof_temp[62] = [88,6,88,23]; + lineof_temp[1608] = [1209,20,1209,52]; + lineof_temp[1055] = [907,47,907,71]; + lineof_temp[3673] = [2587,14,2591,96]; + lineof_temp[4053] = [2813,6,2813,12]; + lineof_temp[266] = [275,8,276,37]; + lineof_temp[3403] = [2435,22,2435,36]; + lineof_temp[3853] = [2684,23,2684,43]; + lineof_temp[2721] = [1858,10,1858,11]; + lineof_temp[5948] = [4045,16,4045,43]; + lineof_temp[4245] = [2941,4,2941,26]; + lineof_temp[7300] = [4174,24,4174,49]; + lineof_temp[6298] = [4246,8,4246,31]; + lineof_temp[2372] = [1781,4,1781,42]; + lineof_temp[3783] = [2662,18,2662,27]; + lineof_temp[3996] = [2779,4,2780,35]; + lineof_temp[4703] = [3228,6,3228,8]; + lineof_temp[6063] = [4125,14,4125,15]; + lineof_temp[2837] = [2076,2,2081,4]; + lineof_temp[3306] = [2374,21,2374,70]; + lineof_temp[4715] = [3240,14,3240,38]; + lineof_temp[4772] = [3265,8,3269,55]; + lineof_temp[1922] = [1443,20,1443,34]; + lineof_temp[2816] = [2052,4,2052,18]; + lineof_temp[3476] = [2484,26,2484,42]; + lineof_temp[5807] = [3937,10,3937,20]; + lineof_temp[1366] = [1050,44,1052,59]; + lineof_temp[2497] = [1874,4,1874,29]; + lineof_temp[3053] = [2207,2,2210,32]; + lineof_temp[3865] = [2699,17,2699,29]; + lineof_temp[6244] = [4226,18,4226,41]; + lineof_temp[201] = [226,11,226,33]; + lineof_temp[2501] = [1891,14,1891,29]; + lineof_temp[5376] = [3630,10,3630,14]; + lineof_temp[2291] = [1702,6,1702,56]; + lineof_temp[4407] = [2976,10,2976,16]; + lineof_temp[6656] = [4425,14,4425,26]; + lineof_temp[5341] = [3642,46,3642,53]; + lineof_temp[5426] = [3697,17,3697,39]; + lineof_temp[288] = [290,14,290,40]; + lineof_temp[1139] = [887,46,888,58]; + lineof_temp[761] = [660,24,662,40]; + lineof_temp[6050] = [4125,18,4125,43]; + lineof_temp[6429] = [4318,29,4318,45]; + lineof_temp[6687] = [4448,21,4448,64]; + lineof_temp[616] = [558,18,558,43]; + lineof_temp[23] = [40,6,40,21]; + lineof_temp[1601] = [1204,6,1204,48]; + lineof_temp[2988] = [2183,21,2183,76]; + lineof_temp[6212] = [4188,6,4188,36]; + lineof_temp[5692] = [3867,14,3867,34]; + lineof_temp[1432] = [1088,19,1088,61]; + lineof_temp[3635] = [2547,26,2547,57]; + lineof_temp[1148] = [865,32,865,61]; + lineof_temp[5785] = [3917,6,3920,70]; + lineof_temp[6083] = [4145,26,4145,38]; + lineof_temp[3404] = [2435,22,2435,36]; + lineof_temp[6011] = [4092,10,4092,25]; + lineof_temp[1303] = [1004,22,1004,36]; + lineof_temp[5858] = [3973,21,3973,61]; + lineof_temp[5669] = [3854,6,3855,34]; + lineof_temp[2948] = [2157,21,2157,70]; + lineof_temp[1654] = [1238,12,1238,45]; + lineof_temp[5539] = [3779,16,3779,27]; + lineof_temp[5731] = [3890,14,3890,38]; + lineof_temp[6660] = [4423,10,4423,33]; + lineof_temp[566] = [523,4,523,31]; + lineof_temp[839] = [688,4,703,5]; + lineof_temp[1567] = [1169,10,1169,11]; + lineof_temp[5050] = [3451,16,3451,35]; + lineof_temp[794] = [618,15,618,52]; + lineof_temp[747] = [643,18,643,29]; + lineof_temp[4851] = [3302,17,3302,18]; + lineof_temp[1011] = [750,10,750,24]; + lineof_temp[2580] = [1925,29,1929,75]; + lineof_temp[5375] = [3637,4,3637,20]; + lineof_temp[1135] = [893,34,895,64]; + lineof_temp[4323] = [3026,10,3026,37]; + lineof_temp[4313] = [3023,18,3023,64]; + lineof_temp[2056] = [1532,28,1532,70]; + lineof_temp[888] = [746,25,746,37]; + lineof_temp[1784] = [1313,31,1313,44]; + lineof_temp[1386] = [1064,50,1068,60]; + lineof_temp[500] = [473,15,473,48]; + lineof_temp[1622] = [1209,20,1209,52]; + lineof_temp[3838] = [2682,4,2682,35]; + lineof_temp[316] = [263,32,263,49]; + lineof_temp[5922] = [4026,18,4026,42]; + lineof_temp[6273] = [4239,23,4239,66]; + lineof_temp[1342] = [1030,43,1030,62]; + lineof_temp[3523] = [2504,34,2504,59]; + lineof_temp[4804] = [3286,6,3287,25]; + lineof_temp[3919] = [2694,27,2694,46]; + lineof_temp[5122] = [3477,10,3477,14]; + lineof_temp[5660] = [3850,4,3850,30]; + lineof_temp[268] = [273,4,273,26]; + lineof_temp[6559] = [4359,17,4359,18]; + lineof_temp[2182] = [1628,12,1628,39]; + lineof_temp[2618] = [1908,10,1908,34]; + lineof_temp[4727] = [3243,6,3243,16]; + lineof_temp[5107] = [3485,18,3485,44]; + lineof_temp[1066] = [910,29,910,58]; + lineof_temp[1429] = [994,10,994,15]; + lineof_temp[4548] = [3148,12,3149,68]; + lineof_temp[5871] = [3981,16,3981,62]; + lineof_temp[4963] = [3365,18,3365,29]; + lineof_temp[2018] = [1505,13,1505,73]; + lineof_temp[2322] = [1731,4,1731,42]; + lineof_temp[4365] = [3047,24,3047,35]; + lineof_temp[4878] = [3319,8,3319,71]; + lineof_temp[59] = [66,10,66,15]; + lineof_temp[3606] = [2548,14,2548,33]; + lineof_temp[4707] = [3226,2,3226,12]; + lineof_temp[3432] = [2461,20,2461,56]; + lineof_temp[223] = [244,18,244,37]; + lineof_temp[401] = [403,14,403,15]; + lineof_temp[3462] = [2479,20,2479,43]; + lineof_temp[2630] = [1948,25,1952,71]; + lineof_temp[3708] = [2612,8,2612,34]; + lineof_temp[4299] = [2997,24,2997,54]; + lineof_temp[7375] = [4840,14,4840,24]; + lineof_temp[7373] = [4841,2,4841,40]; + lineof_temp[3150] = [2253,21,2254,58]; + lineof_temp[1295] = [996,6,996,58]; + lineof_temp[697] = [602,2,602,14]; + lineof_temp[6518] = [4348,14,4348,30]; + lineof_temp[6550] = [4361,18,4361,47]; + lineof_temp[7309] = [4821,22,4821,62]; + lineof_temp[58] = [79,4,79,28]; + lineof_temp[5176] = [3521,12,3521,24]; + lineof_temp[4540] = [3131,10,3131,19]; + lineof_temp[1797] = [1350,18,1350,59]; + lineof_temp[5650] = [3848,4,3848,29]; + lineof_temp[5930] = [4003,14,4003,15]; + lineof_temp[48] = [69,4,69,23]; + lineof_temp[1949] = [1461,15,1461,48]; + lineof_temp[1570] = [1184,14,1184,43]; + lineof_temp[2550] = [1911,16,1911,26]; + lineof_temp[3390] = [2420,16,2423,88]; + lineof_temp[5596] = [3809,6,3809,16]; + lineof_temp[1237] = [977,31,977,64]; + lineof_temp[7327] = [4822,27,4822,31]; + lineof_temp[260] = [269,4,269,23]; + lineof_temp[6923] = [4585,20,4612,26]; + lineof_temp[2062] = [1514,28,1514,74]; + lineof_temp[5285] = [3583,10,3583,15]; + lineof_temp[7153] = [4740,27,4740,49]; + lineof_temp[1820] = [1364,28,1365,43]; + lineof_temp[3907] = [2710,14,2710,52]; + lineof_temp[6647] = [4381,4,4381,43]; + lineof_temp[5649] = [3849,6,3849,42]; + lineof_temp[1961] = [1469,20,1469,46]; + lineof_temp[5022] = [3438,44,3438,58]; + lineof_temp[1325] = [1010,20,1010,48]; + lineof_temp[4929] = [3366,32,3366,44]; + lineof_temp[6206] = [4190,8,4190,31]; + lineof_temp[6918] = [4610,36,4610,64]; + lineof_temp[567] = [510,10,510,11]; + lineof_temp[4289] = [3010,28,3010,68]; + lineof_temp[979] = [776,18,776,46]; + lineof_temp[265] = [275,8,276,37]; + lineof_temp[6251] = [4224,21,4224,22]; + lineof_temp[687] = [597,2,597,14]; + lineof_temp[1908] = [1427,20,1427,30]; + lineof_temp[1656] = [1241,44,1241,70]; + lineof_temp[2144] = [1581,6,1581,18]; + lineof_temp[5444] = [3713,8,3713,19]; + lineof_temp[6805] = [4528,20,4528,44]; + lineof_temp[7203] = [4755,21,4755,37]; + lineof_temp[641] = [533,27,533,46]; + lineof_temp[2809] = [2058,53,2058,65]; + lineof_temp[4931] = [3372,32,3372,56]; + lineof_temp[3074] = [2238,23,2238,54]; + lineof_temp[3226] = [2302,4,2307,6]; + lineof_temp[7355] = [4813,2,4813,13]; + lineof_temp[1947] = [1380,26,1380,59]; + lineof_temp[4623] = [3186,24,3186,48]; + lineof_temp[4187] = [2901,14,2901,39]; + lineof_temp[5746] = [3895,4,3895,31]; + lineof_temp[6804] = [4528,20,4528,44]; + lineof_temp[1891] = [1415,39,1416,60]; + lineof_temp[4859] = [3313,18,3313,45]; + lineof_temp[4198] = [2907,14,2907,31]; + lineof_temp[4672] = [3217,11,3217,39]; + lineof_temp[6959] = [4637,22,4637,50]; + lineof_temp[1152] = [862,30,862,63]; + lineof_temp[1058] = [907,24,907,72]; + lineof_temp[6376] = [4288,8,4288,31]; + lineof_temp[35] = [36,10,36,15]; + lineof_temp[603] = [554,12,554,25]; + lineof_temp[2823] = [2050,2,2063,2]; + lineof_temp[2897] = [2088,2,2088,58]; + lineof_temp[6734] = [4493,26,4494,64]; + lineof_temp[5705] = [3873,6,3873,44]; + lineof_temp[6494] = [4337,21,4337,33]; + lineof_temp[3710] = [2608,4,2608,43]; + lineof_temp[182] = [208,12,208,23]; + lineof_temp[2010] = [1495,4,1495,32]; + lineof_temp[6557] = [4360,6,4368,6]; + lineof_temp[4128] = [2869,6,2870,75]; + lineof_temp[5914] = [4020,22,4020,48]; + lineof_temp[4209] = [2909,6,2909,17]; + lineof_temp[2331] = [1742,6,1742,37]; + lineof_temp[3569] = [2526,28,2526,51]; + lineof_temp[4943] = [3370,45,3370,57]; + lineof_temp[5235] = [3534,2,3534,12]; + lineof_temp[7231] = [4770,20,4770,44]; + lineof_temp[3937] = [2745,4,2746,71]; + lineof_temp[4687] = [3216,10,3216,12]; + lineof_temp[6927] = [4582,44,4582,57]; + lineof_temp[1062] = [908,38,908,50]; + lineof_temp[5552] = [3793,16,3793,37]; + lineof_temp[5462] = [3725,27,3725,39]; + lineof_temp[2451] = [1859,4,1859,29]; + lineof_temp[2780] = [2038,8,2038,18]; + lineof_temp[6506] = [4339,6,4339,15]; + lineof_temp[3910] = [2706,20,2706,28]; + lineof_temp[1466] = [1108,19,1112,77]; + lineof_temp[3285] = [2351,8,2351,24]; + lineof_temp[5082] = [3471,14,3471,35]; + lineof_temp[5308] = [3621,20,3621,70]; + lineof_temp[6807] = [4559,26,4559,54]; + lineof_temp[5542] = [3780,8,3780,56]; + lineof_temp[7252] = [4786,14,4786,37]; + lineof_temp[2048] = [1529,26,1529,53]; + lineof_temp[1843] = [1383,20,1383,40]; + lineof_temp[2035] = [1548,16,1551,52]; + lineof_temp[2532] = [1957,17,1957,18]; + lineof_temp[3936] = [2745,16,2745,30]; + lineof_temp[639] = [534,2,534,12]; + lineof_temp[2393] = [1804,6,1804,43]; + lineof_temp[5408] = [3667,15,3667,36]; + lineof_temp[2224] = [1652,8,1652,20]; + lineof_temp[6287] = [4236,8,4236,33]; + lineof_temp[205] = [226,10,226,60]; + lineof_temp[918] = [779,20,780,53]; + lineof_temp[1756] = [1321,16,1321,39]; + lineof_temp[2490] = [1885,8,1886,28]; + lineof_temp[6024] = [4110,24,4110,46]; + lineof_temp[6279] = [4238,25,4238,48]; + lineof_temp[6290] = [4231,6,4231,31]; + lineof_temp[1464] = [1108,19,1112,77]; + lineof_temp[2884] = [2104,11,2104,13]; + lineof_temp[5511] = [3755,10,3755,20]; + lineof_temp[5690] = [3864,4,3864,32]; + lineof_temp[54] = [77,4,77,28]; + lineof_temp[4651] = [3192,20,3192,40]; + lineof_temp[581] = [541,22,541,39]; + lineof_temp[6484] = [4327,8,4327,33]; + lineof_temp[2910] = [2132,21,2132,71]; + lineof_temp[2981] = [2167,16,2170,80]; + lineof_temp[3005] = [2186,26,2186,54]; + lineof_temp[4171] = [2893,8,2893,70]; + lineof_temp[5691] = [3867,14,3867,34]; + lineof_temp[6004] = [4089,18,4089,47]; + lineof_temp[6768] = [4438,10,4438,32]; + lineof_temp[2040] = [1554,16,1555,31]; + lineof_temp[2675] = [1985,24,1985,38]; + lineof_temp[5277] = [3590,10,3590,47]; + lineof_temp[2276] = [1694,4,1694,12]; + lineof_temp[3837] = [2682,12,2682,33]; + lineof_temp[5279] = [3589,18,3589,20]; + lineof_temp[6105] = [4138,4,4138,27]; + lineof_temp[6666] = [4430,12,4430,60]; + lineof_temp[954] = [798,22,799,59]; + lineof_temp[1584] = [1192,8,1192,22]; + lineof_temp[3584] = [2516,27,2516,70]; + lineof_temp[3755] = [2650,24,2650,52]; + lineof_temp[6357] = [4278,8,4278,31]; + lineof_temp[7247] = [4779,14,4779,55]; + lineof_temp[3835] = [2678,20,2678,32]; + lineof_temp[5598] = [3808,4,3808,18]; + lineof_temp[2467] = [1863,6,1873,10]; + lineof_temp[3057] = [2215,15,2215,35]; + lineof_temp[6884] = [4614,26,4614,54]; + lineof_temp[131] = [162,26,162,44]; + lineof_temp[231] = [232,14,232,40]; + lineof_temp[1393] = [1064,49,1072,63]; + lineof_temp[2379] = [1790,6,1790,37]; + lineof_temp[6300] = [4249,25,4249,74]; + lineof_temp[6844] = [4554,26,4554,36]; + lineof_temp[3518] = [2499,15,2499,57]; + lineof_temp[3730] = [2625,6,2625,17]; + lineof_temp[3799] = [2666,25,2666,53]; + lineof_temp[519] = [491,18,491,30]; + lineof_temp[6907] = [4602,36,4602,74]; + lineof_temp[4836] = [3302,21,3302,63]; + lineof_temp[5759] = [3906,14,3906,40]; + lineof_temp[247] = [268,10,268,36]; + lineof_temp[377] = [385,10,385,62]; + lineof_temp[3108] = [2259,19,2259,44]; + lineof_temp[7196] = [4747,17,4747,18]; + lineof_temp[880] = [730,10,735,11]; + lineof_temp[2652] = [1974,22,1974,67]; + lineof_temp[2620] = [1952,33,1952,66]; + lineof_temp[3721] = [2631,10,2631,48]; + lineof_temp[5142] = [3508,15,3508,37]; + lineof_temp[5179] = [3520,6,3520,7]; + lineof_temp[6583] = [4383,21,4383,37]; + lineof_temp[1890] = [1417,22,1417,42]; + lineof_temp[2017] = [1505,13,1505,73]; + lineof_temp[2059] = [1531,18,1531,43]; + lineof_temp[4037] = [2806,15,2806,27]; + lineof_temp[7216] = [4762,27,4762,41]; + lineof_temp[2831] = [2074,15,2075,53]; + lineof_temp[3151] = [2253,17,2253,18]; + lineof_temp[6323] = [4259,25,4259,74]; + lineof_temp[3056] = [2215,15,2215,35]; + lineof_temp[4999] = [3421,20,3421,42]; + lineof_temp[2607] = [1939,29,1943,75]; + lineof_temp[3659] = [2578,14,2578,42]; + lineof_temp[6136] = [4168,12,4168,67]; + lineof_temp[710] = [611,15,611,16]; + lineof_temp[6342] = [4271,10,4271,40]; + lineof_temp[6157] = [4182,13,4182,73]; + lineof_temp[1711] = [1284,15,1284,17]; + lineof_temp[5828] = [3960,24,3960,65]; + lineof_temp[328] = [309,18,309,34]; + lineof_temp[1663] = [1232,10,1232,26]; + lineof_temp[3712] = [2624,20,2624,65]; + lineof_temp[2649] = [1974,53,1974,66]; + lineof_temp[7027] = [4685,10,4685,25]; + lineof_temp[5516] = [3732,2,3758,12]; + lineof_temp[2342] = [1751,4,1751,39]; + lineof_temp[2834] = [2083,4,2084,12]; + lineof_temp[3851] = [2686,4,2686,26]; + lineof_temp[2075] = [1509,12,1509,46]; + lineof_temp[2985] = [2172,18,2172,44]; + lineof_temp[6916] = [4589,26,4589,39]; + lineof_temp[1643] = [1201,2,1223,2]; + lineof_temp[4351] = [3042,20,3042,32]; + lineof_temp[4991] = [3414,6,3414,44]; + lineof_temp[6169] = [4176,4,4176,39]; + lineof_temp[6939] = [4622,41,4622,53]; + lineof_temp[157] = [162,26,162,44]; + lineof_temp[6170] = [4184,14,4184,30]; + lineof_temp[5220] = [3553,10,3553,21]; + lineof_temp[7225] = [4769,14,4769,37]; + lineof_temp[1555] = [1177,16,1177,60]; + lineof_temp[4087] = [2845,18,2845,65]; + lineof_temp[1044] = [850,32,850,77]; + lineof_temp[5206] = [3546,8,3547,36]; + lineof_temp[1223] = [972,26,972,34]; + lineof_temp[2015] = [1505,33,1505,47]; + lineof_temp[2161] = [1604,2,1604,12]; + lineof_temp[2395] = [1806,6,1806,23]; + lineof_temp[3270] = [2347,8,2347,64]; + lineof_temp[4472] = [3094,20,3094,22]; + lineof_temp[5905] = [4007,16,4007,62]; + lineof_temp[6373] = [4289,18,4289,46]; + lineof_temp[2257] = [1681,14,1681,26]; + lineof_temp[1751] = [1324,24,1324,70]; + lineof_temp[6850] = [4528,20,4528,44]; + lineof_temp[2871] = [2117,18,2118,56]; + lineof_temp[22] = [37,4,37,24]; + lineof_temp[3257] = [2329,21,2330,57]; + lineof_temp[1049] = [906,38,906,53]; + lineof_temp[2869] = [2117,18,2118,56]; + lineof_temp[458] = [454,14,454,20]; + lineof_temp[1041] = [850,51,850,76]; + lineof_temp[2021] = [1506,16,1506,66]; + lineof_temp[5689] = [3865,6,3865,38]; + lineof_temp[280] = [286,14,286,40]; + lineof_temp[6648] = [4421,10,4421,32]; + lineof_temp[6507] = [4339,6,4346,6]; + lineof_temp[1596] = [1183,28,1183,48]; + lineof_temp[3245] = [2336,6,2337,14]; + lineof_temp[5641] = [3847,6,3847,17]; + lineof_temp[6191] = [4195,14,4195,55]; + lineof_temp[6235] = [4222,10,4222,48]; + lineof_temp[7106] = [4724,6,4731,7]; + lineof_temp[7267] = [4794,14,4794,30]; + lineof_temp[4050] = [2804,28,2804,53]; + lineof_temp[845] = [685,6,685,23]; + lineof_temp[1089] = [914,28,914,33]; + lineof_temp[2601] = [1943,37,1943,70]; + lineof_temp[3196] = [2297,15,2298,52]; + lineof_temp[64] = [91,9,91,30]; + lineof_temp[5716] = [3880,4,3880,26]; + lineof_temp[4630] = [3186,6,3186,21]; + lineof_temp[4677] = [3221,16,3221,38]; + lineof_temp[2921] = [2139,16,2139,24]; + lineof_temp[5739] = [3894,14,3894,56]; + lineof_temp[1140] = [887,39,887,43]; + lineof_temp[1494] = [1133,18,1133,36]; + lineof_temp[3244] = [2336,6,2337,14]; + lineof_temp[5294] = [3604,19,3604,37]; + lineof_temp[7178] = [4747,21,4747,37]; + lineof_temp[2129] = [1595,25,1596,67]; + lineof_temp[2336] = [1745,4,1745,36]; + lineof_temp[540] = [480,4,480,38]; + lineof_temp[6324] = [4259,19,4259,22]; + lineof_temp[7356] = [4813,2,4830,2]; + lineof_temp[2538] = [1915,37,1915,70]; + lineof_temp[2606] = [1940,31,1940,44]; + lineof_temp[4675] = [3218,6,3218,11]; + lineof_temp[3415] = [2441,14,2445,94]; + lineof_temp[398] = [404,14,404,66]; + lineof_temp[2778] = [2039,18,2039,46]; + lineof_temp[3168] = [2231,10,2231,26]; + lineof_temp[583] = [545,26,545,52]; + lineof_temp[1367] = [1048,48,1048,76]; + lineof_temp[2753] = [2027,14,2027,44]; + lineof_temp[2878] = [2115,4,2119,15]; + lineof_temp[6544] = [4363,8,4363,39]; + lineof_temp[6664] = [4431,20,4431,49]; + lineof_temp[4774] = [3271,21,3271,42]; + lineof_temp[637] = [534,15,534,58]; + lineof_temp[1489] = [1131,18,1131,46]; + lineof_temp[6172] = [4185,21,4185,33]; + lineof_temp[7285] = [4807,22,4807,43]; + lineof_temp[5515] = [3733,4,3758,10]; + lineof_temp[1590] = [1188,4,1188,37]; + lineof_temp[3573] = [2525,12,2525,48]; + lineof_temp[577] = [538,18,538,40]; + lineof_temp[4883] = [3296,10,3296,12]; + lineof_temp[2381] = [1792,6,1792,24]; + lineof_temp[2575] = [1925,29,1929,75]; + lineof_temp[4579] = [3162,10,3162,13]; + lineof_temp[4863] = [3311,14,3314,79]; + lineof_temp[6643] = [4385,16,4385,21]; + lineof_temp[6856] = [4509,14,4509,19]; + lineof_temp[52] = [71,4,71,26]; + lineof_temp[4930] = [3373,34,3373,54]; + lineof_temp[333] = [334,14,334,35]; + lineof_temp[703] = [608,4,608,27]; + lineof_temp[1178] = [934,24,934,70]; + lineof_temp[3249] = [2333,12,2333,73]; + lineof_temp[4004] = [2787,15,2787,43]; + lineof_temp[5631] = [3838,2,3838,64]; + lineof_temp[4905] = [3343,2,3343,12]; + lineof_temp[5520] = [3762,15,3762,36]; + lineof_temp[6651] = [4435,16,4435,44]; + lineof_temp[30] = [43,4,43,28]; + lineof_temp[1441] = [1097,19,1097,62]; + lineof_temp[206] = [226,10,226,60]; + lineof_temp[4261] = [2959,8,2959,28]; + lineof_temp[937] = [804,30,804,76]; + lineof_temp[6723] = [4483,37,4483,67]; + lineof_temp[2412] = [1821,4,1821,35]; + lineof_temp[6903] = [4600,36,4600,74]; + lineof_temp[2290] = [1702,14,1702,54]; + lineof_temp[3113] = [2260,14,2260,55]; + lineof_temp[4664] = [3208,18,3208,21]; + lineof_temp[1950] = [1462,10,1462,49]; + lineof_temp[5023] = [3438,44,3438,58]; + lineof_temp[695] = [602,17,602,29]; + lineof_temp[6646] = [4382,6,4382,37]; + lineof_temp[866] = [732,20,732,56]; + lineof_temp[1548] = [1157,29,1157,44]; + lineof_temp[5601] = [3817,6,3817,25]; + lineof_temp[3736] = [2623,4,2623,45]; + lineof_temp[6030] = [4113,22,4113,44]; + lineof_temp[5925] = [4024,19,4024,21]; + lineof_temp[4176] = [2895,6,2895,73]; + lineof_temp[4386] = [3052,12,3056,64]; + lineof_temp[3925] = [2678,2,2680,4]; + lineof_temp[6076] = [4141,10,4141,22]; + lineof_temp[6560] = [4359,6,4359,18]; + lineof_temp[2868] = [2117,18,2118,56]; + lineof_temp[3768] = [2646,8,2651,19]; + lineof_temp[4875] = [3299,6,3299,27]; + lineof_temp[665] = [585,6,585,16]; + lineof_temp[4226] = [2920,6,2920,33]; + lineof_temp[3046] = [2206,33,2206,50]; + lineof_temp[5048] = [3451,24,3451,33]; + lineof_temp[5275] = [3592,12,3593,53]; + lineof_temp[6993] = [4663,44,4663,72]; + lineof_temp[5170] = [3525,16,3525,28]; + lineof_temp[5633] = [3837,10,3837,11]; + lineof_temp[5865] = [3973,6,3974,22]; + lineof_temp[6082] = [4146,10,4146,22]; + lineof_temp[712] = [611,6,612,41]; + lineof_temp[2049] = [1528,26,1528,72]; + lineof_temp[7082] = [4718,21,4718,36]; + lineof_temp[356] = [358,17,358,73]; + lineof_temp[5792] = [3923,4,3923,38]; + lineof_temp[6113] = [4155,4,4155,29]; + lineof_temp[7271] = [4795,6,4795,52]; + lineof_temp[7316] = [4826,14,4826,53]; + lineof_temp[5328] = [3613,14,3613,15]; + lineof_temp[4253] = [2925,21,2925,37]; + lineof_temp[4495] = [3123,4,3123,12]; + lineof_temp[70] = [93,44,93,73]; + lineof_temp[3564] = [2532,20,2535,154]; + lineof_temp[898] = [749,36,749,63]; + lineof_temp[3568] = [2527,22,2527,23]; + lineof_temp[3857] = [2697,18,2697,37]; + lineof_temp[4692] = [3226,15,3226,37]; + lineof_temp[4824] = [3282,10,3282,13]; + lineof_temp[6511] = [4338,6,4346,6]; + lineof_temp[6534] = [4347,4,4347,51]; + lineof_temp[3626] = [2552,20,2552,22]; + lineof_temp[2272] = [1660,22,1660,34]; + lineof_temp[6949] = [4631,22,4631,50]; + lineof_temp[2239] = [1666,18,1666,33]; + lineof_temp[5642] = [3846,18,3846,42]; + lineof_temp[750] = [648,37,648,77]; + lineof_temp[57] = [80,6,80,39]; + lineof_temp[2864] = [2115,18,2116,56]; + lineof_temp[6425] = [4314,25,4314,26]; + lineof_temp[6965] = [4642,32,4642,67]; + lineof_temp[6482] = [4328,10,4328,22]; + lineof_temp[669] = [580,16,580,32]; + lineof_temp[6312] = [4254,14,4254,30]; + lineof_temp[6715] = [4462,27,4462,28]; + lineof_temp[6491] = [4336,14,4336,30]; + lineof_temp[7001] = [4666,30,4666,55]; + lineof_temp[420] = [425,18,425,37]; + lineof_temp[4649] = [3196,4,3196,19]; + lineof_temp[4762] = [3250,2,3257,3]; + lineof_temp[552] = [518,16,518,62]; + lineof_temp[3092] = [2249,12,2250,21]; + lineof_temp[5758] = [3903,4,3903,31]; + lineof_temp[6798] = [4511,18,4511,19]; + lineof_temp[3069] = [2215,2,2215,36]; + lineof_temp[4641] = [3197,18,3197,39]; + lineof_temp[4729] = [3242,19,3242,41]; + lineof_temp[4827] = [3261,14,3261,17]; + lineof_temp[1500] = [1134,8,1134,32]; + lineof_temp[7026] = [4682,16,4682,32]; + lineof_temp[7092] = [4728,17,4728,44]; + lineof_temp[1361] = [1042,47,1042,69]; + lineof_temp[1629] = [1208,6,1221,7]; + lineof_temp[2112] = [1572,14,1572,60]; + lineof_temp[3256] = [2331,6,2331,9]; + lineof_temp[6054] = [4126,20,4126,62]; + lineof_temp[6231] = [4219,14,4219,30]; + lineof_temp[2475] = [1877,8,1877,51]; + lineof_temp[2895] = [2090,2,2091,70]; + lineof_temp[5123] = [3477,2,3477,14]; + lineof_temp[997] = [771,27,771,28]; + lineof_temp[1856] = [1393,27,1393,69]; + lineof_temp[3948] = [2749,30,2749,47]; + lineof_temp[1765] = [1320,22,1320,23]; + lineof_temp[1724] = [1292,21,1292,43]; + lineof_temp[5104] = [3482,21,3482,60]; + lineof_temp[1384] = [1065,52,1068,59]; + lineof_temp[887] = [746,40,746,75]; + lineof_temp[2097] = [1565,18,1565,54]; + lineof_temp[2485] = [1886,16,1886,26]; + lineof_temp[2730] = [2013,10,2013,25]; + lineof_temp[40] = [55,4,55,27]; + lineof_temp[2230] = [1635,15,1635,50]; + lineof_temp[4867] = [3315,39,3315,48]; + lineof_temp[5066] = [3411,2,3460,2]; + lineof_temp[6908] = [4601,34,4601,59]; + lineof_temp[2110] = [1576,8,1577,63]; + lineof_temp[2353] = [1764,6,1764,39]; + lineof_temp[3451] = [2462,4,2462,16]; + lineof_temp[3532] = [2501,13,2501,14]; + lineof_temp[4111] = [2856,4,2856,29]; + lineof_temp[5212] = [3549,13,3549,34]; + lineof_temp[110] = [125,4,125,28]; + lineof_temp[4159] = [2885,14,2885,56]; + lineof_temp[3021] = [2172,18,2172,44]; + lineof_temp[7341] = [4819,6,4819,19]; + lineof_temp[994] = [774,26,774,59]; + lineof_temp[1012] = [749,12,749,71]; + lineof_temp[3969] = [2766,10,2766,15]; + lineof_temp[155] = [165,28,165,46]; + lineof_temp[483] = [459,15,459,19]; + lineof_temp[1030] = [833,4,833,45]; + lineof_temp[5754] = [3899,4,3899,29]; + lineof_temp[5829] = [3960,24,3960,65]; + lineof_temp[1934] = [1425,16,1425,17]; + lineof_temp[4446] = [3079,16,3079,37]; + lineof_temp[3740] = [2640,4,2640,35]; + lineof_temp[6780] = [4513,14,4513,52]; + lineof_temp[1071] = [913,38,913,57]; + lineof_temp[4642] = [3198,14,3198,49]; + lineof_temp[5621] = [3831,14,3831,23]; + lineof_temp[1444] = [1099,24,1099,39]; + lineof_temp[3040] = [2152,6,2152,43]; + lineof_temp[3679] = [2598,12,2598,58]; + lineof_temp[4290] = [3010,20,3010,70]; + lineof_temp[6061] = [4126,4,4126,63]; + lineof_temp[374] = [374,23,374,44]; + lineof_temp[1649] = [1235,14,1235,29]; + lineof_temp[3522] = [2504,34,2504,59]; + lineof_temp[5950] = [4044,16,4044,62]; + lineof_temp[495] = [473,15,473,48]; + lineof_temp[2707] = [2000,22,2000,43]; + lineof_temp[3302] = [2363,4,2363,12]; + lineof_temp[3921] = [2694,4,2740,11]; + lineof_temp[4865] = [3310,12,3314,81]; + lineof_temp[123] = [150,14,150,29]; + lineof_temp[2380] = [1789,4,1789,42]; + lineof_temp[5727] = [3888,14,3888,32]; + lineof_temp[6530] = [4353,10,4354,55]; + lineof_temp[6242] = [4225,22,4225,51]; + lineof_temp[1786] = [1342,14,1342,28]; + lineof_temp[3091] = [2245,18,2245,38]; + lineof_temp[1472] = [1105,6,1105,77]; + lineof_temp[3290] = [2349,6,2356,7]; + lineof_temp[724] = [630,18,630,30]; + lineof_temp[2386] = [1795,4,1795,45]; + lineof_temp[713] = [610,4,610,29]; + lineof_temp[1889] = [1417,30,1417,40]; + lineof_temp[5533] = [3769,6,3770,30]; + lineof_temp[6116] = [4136,12,4136,13]; + lineof_temp[6176] = [4186,6,4186,33]; + lineof_temp[1158] = [856,45,856,65]; + lineof_temp[1308] = [1004,22,1004,36]; + lineof_temp[2233] = [1635,2,1657,2]; + lineof_temp[240] = [219,29,219,46]; + lineof_temp[3143] = [2260,14,2260,55]; + lineof_temp[218] = [238,18,238,48]; + lineof_temp[802] = [705,8,705,22]; + lineof_temp[3137] = [2263,23,2263,30]; + lineof_temp[6167] = [4178,6,4182,77]; + lineof_temp[723] = [629,32,629,72]; + lineof_temp[4563] = [3160,19,3160,47]; + lineof_temp[1155] = [858,34,858,63]; + lineof_temp[5670] = [3853,4,3853,29]; + lineof_temp[2373] = [1784,6,1784,22]; + lineof_temp[1391] = [1069,52,1072,62]; + lineof_temp[1652] = [1236,12,1236,42]; + lineof_temp[2326] = [1735,4,1735,47]; + lineof_temp[4558] = [3157,20,3157,44]; + lineof_temp[6588] = [4418,8,4418,46]; + lineof_temp[7269] = [4795,14,4795,50]; + lineof_temp[1700] = [1281,15,1281,50]; + lineof_temp[7250] = [4785,24,4785,59]; + lineof_temp[1558] = [1175,16,1175,46]; + lineof_temp[1633] = [1207,6,1221,7]; + lineof_temp[4617] = [3175,6,3175,17]; + lineof_temp[5099] = [3477,17,3477,43]; + lineof_temp[6558] = [4359,21,4359,33]; + lineof_temp[3697] = [2616,14,2616,52]; + lineof_temp[5655] = [3852,6,3852,35]; + lineof_temp[1664] = [1231,8,1231,21]; + lineof_temp[533] = [483,8,483,22]; + lineof_temp[2433] = [1844,6,1844,30]; + lineof_temp[3559] = [2528,16,2528,48]; + lineof_temp[4591] = [3159,13,3159,15]; + lineof_temp[5215] = [3552,12,3552,58]; + lineof_temp[1293] = [996,14,996,56]; + lineof_temp[4013] = [2786,26,2786,51]; + lineof_temp[4504] = [3133,25,3133,40]; + lineof_temp[324] = [317,4,317,28]; + lineof_temp[3800] = [2666,25,2666,53]; + lineof_temp[7335] = [4820,27,4820,31]; + lineof_temp[1773] = [1316,16,1316,76]; + lineof_temp[2936] = [2130,6,2140,7]; + lineof_temp[3008] = [2183,20,2185,55]; + lineof_temp[4319] = [3020,10,3020,34]; + lineof_temp[3620] = [2558,14,2563,16]; + lineof_temp[66] = [92,12,92,33]; + lineof_temp[363] = [368,4,368,24]; + lineof_temp[6209] = [4205,10,4205,37]; + lineof_temp[2824] = [2049,2,2049,23]; + lineof_temp[5079] = [3465,10,3465,38]; + lineof_temp[7132] = [4740,27,4740,49]; + lineof_temp[1493] = [1133,18,1133,36]; + lineof_temp[2881] = [2106,4,2106,15]; + lineof_temp[678] = [592,2,593,40]; + lineof_temp[4112] = [2853,10,2853,12]; + lineof_temp[6340] = [4271,20,4271,39]; + lineof_temp[865] = [734,20,734,60]; + lineof_temp[2900] = [2126,14,2126,24]; + lineof_temp[4070] = [2812,2,2812,20]; + lineof_temp[5354] = [3651,20,3651,48]; + lineof_temp[5904] = [4007,16,4007,62]; + lineof_temp[2736] = [2016,6,2016,44]; + lineof_temp[3427] = [2362,10,2362,38]; + lineof_temp[4869] = [3315,31,3315,50]; + lineof_temp[5152] = [3513,2,3513,42]; + lineof_temp[6119] = [4135,20,4135,32]; + lineof_temp[905] = [755,16,755,48]; + lineof_temp[2435] = [1846,6,1846,36]; + lineof_temp[3987] = [2782,4,2782,71]; + lineof_temp[3520] = [2501,17,2501,57]; + lineof_temp[452] = [445,18,445,24]; + lineof_temp[1122] = [865,32,865,61]; + lineof_temp[1169] = [901,24,901,64]; + lineof_temp[532] = [483,17,483,22]; + lineof_temp[2889] = [2102,2,2102,13]; + lineof_temp[4695] = [3231,16,3231,38]; + lineof_temp[7288] = [4807,12,4807,68]; + lineof_temp[694] = [603,2,603,33]; + lineof_temp[942] = [801,22,801,54]; + lineof_temp[1208] = [953,20,953,39]; + lineof_temp[3802] = [2665,23,2666,67]; + lineof_temp[7349] = [4814,16,4814,18]; + lineof_temp[508] = [481,18,481,47]; + lineof_temp[2965] = [2197,21,2198,37]; + lineof_temp[3321] = [2387,31,2387,76]; + lineof_temp[3267] = [2343,4,2343,12]; + lineof_temp[3693] = [2613,29,2613,59]; + lineof_temp[5981] = [4074,10,4074,21]; + lineof_temp[2822] = [2050,2,2050,13]; + lineof_temp[4674] = [3218,6,3218,11]; + lineof_temp[5770] = [3909,4,3909,48]; + lineof_temp[1913] = [1433,20,1433,71]; + lineof_temp[3718] = [2628,8,2628,22]; + lineof_temp[4773] = [3264,6,3264,30]; + lineof_temp[7147] = [4742,8,4742,23]; + lineof_temp[3904] = [2712,18,2713,52]; + lineof_temp[6007] = [4091,12,4091,38]; + lineof_temp[6650] = [4435,16,4435,44]; + lineof_temp[4258] = [2958,10,2958,28]; + lineof_temp[428] = [421,14,421,37]; + lineof_temp[1278] = [950,23,950,66]; + lineof_temp[1298] = [999,23,999,47]; + lineof_temp[2732] = [2015,17,2015,39]; + lineof_temp[528] = [498,12,498,52]; + lineof_temp[2866] = [2118,20,2118,48]; + lineof_temp[4973] = [3360,10,3360,63]; + lineof_temp[2367] = [1778,6,1778,38]; + lineof_temp[3318] = [2388,26,2388,35]; + lineof_temp[4288] = [3010,28,3010,68]; + lineof_temp[168] = [189,12,189,36]; + lineof_temp[1032] = [836,18,836,54]; + lineof_temp[3663] = [2580,24,2580,60]; + lineof_temp[4951] = [3390,30,3390,76]; + lineof_temp[3068] = [2216,2,2216,67]; + lineof_temp[5251] = [3572,8,3572,43]; + lineof_temp[6576] = [4374,10,4377,73]; + lineof_temp[1182] = [932,18,936,66]; + lineof_temp[426] = [431,18,431,43]; + lineof_temp[4333] = [3032,26,3032,42]; + lineof_temp[1488] = [1128,8,1128,28]; + lineof_temp[2571] = [1928,35,1929,71]; + lineof_temp[3832] = [2679,12,2679,24]; + lineof_temp[6573] = [4375,14,4375,59]; + lineof_temp[2470] = [1876,17,1876,60]; + lineof_temp[7280] = [4796,4,4796,39]; + lineof_temp[1129] = [881,34,881,48]; + lineof_temp[1084] = [918,28,920,59]; + lineof_temp[2489] = [1885,8,1885,21]; + lineof_temp[2950] = [2158,16,2158,67]; + lineof_temp[3167] = [2231,18,2231,24]; + lineof_temp[4567] = [3162,26,3162,48]; + lineof_temp[6863] = [4570,22,4570,50]; + lineof_temp[1267] = [953,15,953,17]; + lineof_temp[3750] = [2646,22,2647,66]; + lineof_temp[3949] = [2757,53,2757,65]; + lineof_temp[5696] = [3869,14,3869,44]; + lineof_temp[5745] = [3896,6,3896,37]; + lineof_temp[6740] = [4493,12,4495,23]; + lineof_temp[3477] = [2484,26,2484,42]; + lineof_temp[5898] = [3999,6,3999,16]; + lineof_temp[860] = [731,17,731,46]; + lineof_temp[1467] = [1108,15,1108,16]; + lineof_temp[1693] = [1255,37,1255,49]; + lineof_temp[4629] = [3186,16,3186,21]; + lineof_temp[6946] = [4629,22,4629,50]; + lineof_temp[3275] = [2353,21,2354,54]; + lineof_temp[5004] = [3418,14,3418,57]; + lineof_temp[5627] = [3837,14,3837,41]; + lineof_temp[448] = [447,14,447,42]; + lineof_temp[3164] = [2233,18,2233,29]; + lineof_temp[4021] = [2801,10,2801,26]; + lineof_temp[2845] = [2067,2,2067,19]; + lineof_temp[541] = [479,10,479,11]; + lineof_temp[1212] = [956,10,956,24]; + lineof_temp[7228] = [4772,20,4772,48]; + lineof_temp[602] = [554,20,554,23]; + lineof_temp[4468] = [3103,18,3103,31]; + lineof_temp[6225] = [4214,10,4214,24]; + lineof_temp[4555] = [3122,10,3122,13]; + lineof_temp[2549] = [1911,25,1911,26]; + lineof_temp[5352] = [3650,25,3650,46]; + lineof_temp[1475] = [1118,12,1118,39]; + lineof_temp[3834] = [2679,4,2679,26]; + lineof_temp[3690] = [2575,32,2575,52]; + lineof_temp[6289] = [4232,6,4232,34]; + lineof_temp[1216] = [960,12,960,30]; + lineof_temp[4275] = [2995,36,2995,50]; + lineof_temp[5006] = [3429,18,3429,45]; + lineof_temp[3105] = [2255,36,2255,54]; + lineof_temp[3357] = [2375,8,2407,8]; + lineof_temp[861] = [731,17,731,46]; + lineof_temp[3734] = [2624,6,2624,17]; + lineof_temp[4764] = [3261,20,3261,32]; + lineof_temp[3728] = [2625,20,2625,22]; + lineof_temp[6381] = [4292,10,4292,48]; + lineof_temp[7149] = [4741,26,4741,50]; + lineof_temp[3772] = [2655,19,2655,75]; + lineof_temp[6910] = [4591,30,4591,53]; + lineof_temp[5109] = [3484,8,3484,22]; + lineof_temp[7098] = [4729,8,4729,19]; + lineof_temp[955] = [783,26,784,34]; + lineof_temp[1587] = [1190,8,1190,18]; + lineof_temp[5798] = [3934,24,3934,47]; + lineof_temp[1920] = [1443,37,1443,76]; + lineof_temp[4421] = [2972,4,2984,15]; + lineof_temp[1260] = [963,14,964,32]; + lineof_temp[5273] = [3592,24,3592,27]; + lineof_temp[1437] = [1089,10,1089,53]; + lineof_temp[4422] = [2971,20,2971,33]; + lineof_temp[5216] = [3552,12,3552,58]; + lineof_temp[7122] = [4733,21,4733,37]; + lineof_temp[1095] = [911,32,911,49]; + lineof_temp[6089] = [4148,26,4148,38]; + lineof_temp[2027] = [1506,15,1507,71]; + lineof_temp[5209] = [3559,14,3559,22]; + lineof_temp[5521] = [3763,2,3763,25]; + lineof_temp[1394] = [1054,46,1072,64]; + lineof_temp[3367] = [2416,27,2416,74]; + lineof_temp[4581] = [3162,2,3164,14]; + lineof_temp[6575] = [4374,10,4377,73]; + lineof_temp[2700] = [1992,14,1992,30]; + lineof_temp[3220] = [2310,4,2310,16]; + lineof_temp[4971] = [3395,12,3395,22]; + lineof_temp[6259] = [4230,14,4230,30]; + lineof_temp[6561] = [4359,6,4368,6]; + lineof_temp[1156] = [858,26,858,65]; + lineof_temp[2058] = [1532,20,1532,72]; + lineof_temp[3154] = [2252,8,2252,54]; + lineof_temp[4303] = [2994,10,2994,35]; + lineof_temp[208] = [229,13,229,35]; + lineof_temp[1092] = [913,24,913,35]; + lineof_temp[3065] = [2224,10,2224,73]; + lineof_temp[3019] = [2179,16,2181,34]; + lineof_temp[3222] = [2308,19,2309,57]; + lineof_temp[3862] = [2696,10,2697,39]; + lineof_temp[4208] = [2909,15,2909,17]; + lineof_temp[4855] = [3301,17,3301,18]; + lineof_temp[5880] = [3988,20,3988,49]; + lineof_temp[5276] = [3591,14,3591,15]; + lineof_temp[4199] = [2907,14,2907,31]; + lineof_temp[4285] = [3004,18,3004,30]; + lineof_temp[6772] = [4505,18,4505,45]; + lineof_temp[5081] = [3466,6,3466,7]; + lineof_temp[6210] = [4204,8,4204,33]; + lineof_temp[7343] = [4818,4,4818,29]; + lineof_temp[3625] = [2552,25,2552,36]; + lineof_temp[3784] = [2662,18,2662,27]; + lineof_temp[4489] = [3076,6,3076,37]; + lineof_temp[1530] = [1153,2,1153,14]; + lineof_temp[3110] = [2260,22,2260,54]; + lineof_temp[6472] = [4330,40,4330,58]; + lineof_temp[243] = [258,2,258,29]; + lineof_temp[3329] = [2383,14,2383,30]; + lineof_temp[6820] = [4540,34,4540,53]; + lineof_temp[319] = [314,6,314,24]; + lineof_temp[3860] = [2696,20,2696,24]; + lineof_temp[683] = [598,10,598,30]; + lineof_temp[4124] = [2870,46,2870,63]; + lineof_temp[5036] = [3445,24,3445,70]; + lineof_temp[2670] = [1981,10,1981,28]; + lineof_temp[6307] = [4249,10,4250,43]; + lineof_temp[274] = [279,8,280,37]; + lineof_temp[3501] = [2491,6,2491,35]; + lineof_temp[4189] = [2900,4,2900,27]; + lineof_temp[4884] = [3295,24,3295,47]; + lineof_temp[1165] = [855,24,899,25]; + lineof_temp[6817] = [4541,44,4541,72]; + lineof_temp[3915] = [2703,10,2703,28]; + lineof_temp[3905] = [2710,22,2710,50]; + lineof_temp[5052] = [3450,25,3450,26]; + lineof_temp[2678] = [1986,8,1986,28]; + lineof_temp[4970] = [3396,14,3396,54]; + lineof_temp[805] = [707,8,713,50]; + lineof_temp[2205] = [1645,10,1645,22]; + lineof_temp[2808] = [2057,61,2057,72]; + lineof_temp[6721] = [4460,14,4460,29]; + lineof_temp[700] = [609,14,609,39]; + lineof_temp[3880] = [2727,26,2729,64]; + lineof_temp[3139] = [2263,12,2274,69]; + lineof_temp[5078] = [3464,15,3464,37]; + lineof_temp[6023] = [4107,18,4107,41]; + lineof_temp[884] = [744,20,744,48]; + lineof_temp[1220] = [967,20,968,34]; + lineof_temp[5946] = [4039,18,4039,47]; + lineof_temp[1188] = [942,20,942,66]; + lineof_temp[5060] = [3416,10,3416,28]; + lineof_temp[5588] = [3814,8,3814,20]; + lineof_temp[5984] = [4048,10,4060,11]; + lineof_temp[7018] = [4640,8,4640,33]; + lineof_temp[5062] = [3412,10,3412,11]; + lineof_temp[5786] = [3916,4,3916,49]; + lineof_temp[6585] = [4384,10,4384,32]; + lineof_temp[3496] = [2475,16,2475,17]; + lineof_temp[5910] = [4004,8,4004,39]; + lineof_temp[6613] = [4405,28,4405,56]; + lineof_temp[5463] = [3725,20,3725,24]; + lineof_temp[6681] = [4442,14,4445,58]; + lineof_temp[1440] = [1085,4,1085,26]; + lineof_temp[5120] = [3478,10,3478,11]; + lineof_temp[6222] = [4215,10,4215,25]; + lineof_temp[6516] = [4336,6,4336,31]; + lineof_temp[2325] = [1736,6,1736,42]; + lineof_temp[4061] = [2827,8,2827,22]; + lineof_temp[4792] = [3284,19,3284,37]; + lineof_temp[6975] = [4647,22,4647,62]; + lineof_temp[309] = [300,18,300,48]; + lineof_temp[2991] = [2184,26,2184,48]; + lineof_temp[633] = [538,6,538,41]; + lineof_temp[1679] = [1257,24,1257,59]; + lineof_temp[2514] = [1904,20,1904,40]; + lineof_temp[4681] = [3221,4,3221,13]; + lineof_temp[7371] = [4841,10,4841,38]; + lineof_temp[4775] = [3271,21,3271,42]; + lineof_temp[5958] = [4048,44,4048,66]; + lineof_temp[1495] = [1133,10,1133,38]; + lineof_temp[1574] = [1189,10,1189,36]; + lineof_temp[3178] = [2282,37,2282,57]; + lineof_temp[1147] = [866,30,866,57]; + lineof_temp[6036] = [4097,14,4097,15]; + lineof_temp[501] = [473,11,473,12]; + lineof_temp[1637] = [1206,6,1221,7]; + lineof_temp[2223] = [1653,12,1653,58]; + lineof_temp[4786] = [3275,10,3278,53]; + lineof_temp[3475] = [2480,10,2480,32]; + lineof_temp[3738] = [2606,30,2606,48]; + lineof_temp[4051] = [2811,15,2811,46]; + lineof_temp[5094] = [3464,2,3472,13]; + lineof_temp[2849] = [2088,10,2088,57]; + lineof_temp[6462] = [4322,14,4322,26]; + lineof_temp[179] = [134,10,134,12]; + lineof_temp[1176] = [935,24,935,51]; + lineof_temp[2999] = [2184,23,2185,54]; + lineof_temp[3098] = [2253,47,2253,76]; + lineof_temp[329] = [330,6,330,17]; + lineof_temp[350] = [345,4,345,15]; + lineof_temp[2902] = [2125,4,2125,12]; + lineof_temp[2164] = [1609,15,1609,50]; + lineof_temp[3360] = [2374,8,2374,18]; + lineof_temp[3590] = [2511,18,2511,23]; + lineof_temp[6957] = [4635,14,4635,25]; + lineof_temp[4238] = [2936,6,2936,38]; + lineof_temp[5497] = [3748,29,3749,57]; + lineof_temp[1710] = [1284,20,1284,46]; + lineof_temp[6605] = [4401,28,4401,56]; + lineof_temp[358] = [358,17,358,73]; + lineof_temp[5499] = [3748,16,3748,26]; + lineof_temp[2928] = [2136,16,2136,24]; + lineof_temp[3942] = [2751,51,2751,72]; + lineof_temp[6943] = [4619,10,4619,37]; + lineof_temp[1583] = [1190,21,1191,67]; + lineof_temp[369] = [378,4,378,15]; + lineof_temp[1817] = [1364,28,1365,43]; + lineof_temp[2518] = [1960,27,1964,68]; + lineof_temp[200] = [223,8,223,19]; + lineof_temp[5676] = [3859,14,3859,37]; + lineof_temp[6994] = [4663,36,4663,74]; + lineof_temp[1279] = [950,15,950,20]; + lineof_temp[5448] = [3707,12,3707,20]; + lineof_temp[6813] = [4539,44,4539,72]; + lineof_temp[6304] = [4249,25,4249,74]; + lineof_temp[4668] = [3204,10,3204,15]; + lineof_temp[4716] = [3240,6,3240,40]; + lineof_temp[978] = [776,26,776,44]; + lineof_temp[3656] = [2499,2,2499,12]; + lineof_temp[5146] = [3511,10,3511,61]; + lineof_temp[133] = [165,28,165,46]; + lineof_temp[5550] = [3788,8,3788,77]; + lineof_temp[2754] = [2027,6,2027,46]; + lineof_temp[4393] = [3036,6,3036,14]; + lineof_temp[5150] = [3514,10,3514,22]; + lineof_temp[5833] = [3960,6,3960,21]; + lineof_temp[618] = [561,24,561,49]; + lineof_temp[1287] = [831,2,990,2]; + lineof_temp[3028] = [2162,12,2162,48]; + lineof_temp[5453] = [3691,2,3695,3]; + lineof_temp[1940] = [1384,10,1384,12]; + lineof_temp[1842] = [1383,20,1383,40]; + lineof_temp[2100] = [1566,15,1566,50]; + lineof_temp[2103] = [1577,20,1577,49]; + lineof_temp[3229] = [2299,15,2299,56]; + lineof_temp[4831] = [3298,14,3298,65]; + lineof_temp[5681] = [3861,6,3861,74]; + lineof_temp[6500] = [4341,8,4341,39]; + lineof_temp[5848] = [3964,6,3965,40]; + lineof_temp[6641] = [4393,20,4393,28]; + lineof_temp[4332] = [3032,43,3032,72]; + lineof_temp[3964] = [2760,27,2760,44]; + lineof_temp[5288] = [3604,29,3604,36]; + lineof_temp[6432] = [4319,28,4319,63]; + lineof_temp[396] = [404,16,404,65]; + lineof_temp[1368] = [1048,48,1048,76]; + lineof_temp[1925] = [1434,18,1434,47]; + lineof_temp[6802] = [4527,14,4527,42]; + lineof_temp[6826] = [4545,44,4545,72]; + lineof_temp[7268] = [4794,14,4794,30]; + lineof_temp[3203] = [2322,4,2322,15]; + lineof_temp[411] = [411,16,411,42]; + lineof_temp[572] = [508,35,508,51]; + lineof_temp[2217] = [1638,15,1638,18]; + lineof_temp[2556] = [1921,35,1922,71]; + lineof_temp[4892] = [3332,12,3332,65]; + lineof_temp[7256] = [4787,20,4787,44]; + lineof_temp[4636] = [3195,14,3195,21]; + lineof_temp[5249] = [3574,12,3575,59]; + lineof_temp[5712] = [3881,18,3881,39]; + lineof_temp[6138] = [4167,4,4167,37]; + lineof_temp[1036] = [840,12,840,24]; + lineof_temp[4952] = [3390,30,3390,76]; + lineof_temp[3494] = [2487,12,2488,31]; + lineof_temp[190] = [209,2,209,24]; + lineof_temp[1327] = [1011,12,1011,63]; + lineof_temp[2280] = [1701,27,1701,60]; + lineof_temp[2915] = [2132,17,2132,18]; + lineof_temp[3793] = [2656,10,2656,20]; + lineof_temp[76] = [91,8,93,76]; + lineof_temp[3366] = [2413,32,2414,39]; + lineof_temp[3940] = [2743,20,2743,46]; + lineof_temp[858] = [730,15,730,47]; + lineof_temp[1537] = [1161,6,1161,40]; + lineof_temp[2264] = [1682,4,1682,25]; + lineof_temp[4331] = [3032,51,3032,70]; + lineof_temp[4494] = [3124,6,3124,17]; + lineof_temp[7115] = [4717,6,4731,7]; + lineof_temp[1697] = [1276,2,1276,35]; + lineof_temp[2087] = [1502,18,1502,73]; + lineof_temp[5432] = [3706,9,3706,30]; + lineof_temp[1915] = [1443,37,1443,76]; + lineof_temp[3340] = [2391,20,2391,28]; + lineof_temp[6517] = [4335,4,4335,48]; + lineof_temp[2131] = [1595,8,1595,22]; + lineof_temp[6670] = [4420,4,4420,42]; + lineof_temp[13] = [16,6,16,77]; + lineof_temp[6928] = [4581,12,4615,19]; + lineof_temp[7009] = [4648,52,4648,65]; + lineof_temp[5803] = [3939,10,3939,22]; + lineof_temp[51] = [72,10,72,11]; + lineof_temp[2634] = [1947,10,1947,36]; + lineof_temp[2723] = [2006,17,2006,47]; + lineof_temp[3223] = [2308,13,2308,16]; + lineof_temp[6319] = [4259,25,4259,74]; + lineof_temp[6976] = [4648,22,4648,50]; + lineof_temp[3970] = [2765,13,2765,29]; + lineof_temp[836] = [688,31,688,60]; + lineof_temp[611] = [540,18,540,21]; + lineof_temp[1778] = [1335,14,1335,26]; + lineof_temp[3704] = [2613,29,2613,59]; + lineof_temp[4098] = [2855,14,2855,42]; + lineof_temp[5297] = [3604,2,3605,40]; + lineof_temp[5607] = [3824,12,3824,64]; + lineof_temp[7002] = [4651,36,4651,37]; + lineof_temp[648] = [574,15,574,16]; + lineof_temp[3581] = [2517,19,2517,23]; + lineof_temp[90] = [87,32,87,44]; + lineof_temp[601] = [554,20,554,23]; + lineof_temp[2703] = [1993,14,1993,61]; + lineof_temp[6786] = [4517,22,4517,48]; + lineof_temp[6318] = [4259,25,4259,74]; + lineof_temp[3118] = [2272,29,2272,58]; + lineof_temp[2493] = [1882,16,1882,37]; + lineof_temp[2977] = [2168,20,2168,66]; + lineof_temp[3417] = [2447,22,2447,36]; + lineof_temp[4810] = [3284,14,3284,16]; + lineof_temp[527] = [498,20,498,50]; + lineof_temp[3888] = [2727,26,2729,64]; + lineof_temp[1149] = [863,36,863,72]; + lineof_temp[3557] = [2529,26,2529,67]; + lineof_temp[5656] = [3851,21,3851,68]; + lineof_temp[6564] = [4370,6,4370,26]; + lineof_temp[6593] = [4388,14,4391,58]; + lineof_temp[1620] = [1211,16,1211,17]; + lineof_temp[4240] = [2938,6,2938,37]; + lineof_temp[4871] = [3309,8,3315,56]; + lineof_temp[1083] = [921,28,921,62]; + lineof_temp[2691] = [1969,6,1969,59]; + lineof_temp[3786] = [2660,23,2661,67]; + lineof_temp[4327] = [3029,16,3029,67]; + lineof_temp[383] = [393,8,393,62]; + lineof_temp[467] = [460,18,460,50]; + lineof_temp[7174] = [4733,17,4733,18]; + lineof_temp[1162] = [855,41,855,61]; + lineof_temp[6852] = [4526,12,4560,19]; + lineof_temp[6849] = [4529,18,4557,28]; + lineof_temp[406] = [400,15,400,53]; + lineof_temp[770] = [640,14,640,25]; + lineof_temp[2964] = [2199,8,2199,26]; + lineof_temp[5391] = [3669,4,3669,17]; + lineof_temp[1727] = [1292,6,1297,7]; + lineof_temp[1916] = [1443,37,1443,76]; + lineof_temp[1141] = [887,30,887,43]; + lineof_temp[6828] = [4544,34,4544,58]; + lineof_temp[3743] = [2645,48,2645,72]; + lineof_temp[2980] = [2167,16,2170,80]; + lineof_temp[3463] = [2479,20,2479,43]; + lineof_temp[5100] = [3480,14,3480,42]; + lineof_temp[494] = [409,25,409,50]; + lineof_temp[2046] = [1510,18,1511,44]; + lineof_temp[462] = [456,14,456,25]; + lineof_temp[1901] = [1388,10,1398,12]; + lineof_temp[5826] = [3949,10,3949,16]; + lineof_temp[7083] = [4718,21,4718,36]; + lineof_temp[1943] = [1383,6,1383,17]; + lineof_temp[4733] = [3241,4,3241,12]; + lineof_temp[972] = [789,20,789,56]; + lineof_temp[3239] = [2289,2,2289,26]; + lineof_temp[6309] = [4245,14,4245,15]; + lineof_temp[1410] = [1028,30,1078,51]; + lineof_temp[191] = [208,2,208,24]; + lineof_temp[311] = [300,10,300,50]; + lineof_temp[722] = [629,32,629,72]; + lineof_temp[5983] = [4061,10,4073,11]; + lineof_temp[1927] = [1430,14,1430,46]; + lineof_temp[6426] = [4314,14,4314,26]; + lineof_temp[1942] = [1383,15,1383,17]; + lineof_temp[739] = [626,12,626,35]; + lineof_temp[4923] = [3357,8,3357,32]; + lineof_temp[5464] = [3725,8,3725,24]; + lineof_temp[3088] = [2235,12,2235,40]; + lineof_temp[4000] = [2776,2,2776,18]; + lineof_temp[4885] = [3325,39,3325,73]; + lineof_temp[6760] = [4453,12,4453,67]; + lineof_temp[37] = [56,14,56,40]; + lineof_temp[6331] = [4264,14,4264,30]; + lineof_temp[652] = [570,10,570,11]; + lineof_temp[872] = [737,25,737,37]; + lineof_temp[5864] = [3973,6,3973,18]; + lineof_temp[6931] = [4579,8,4579,33]; + lineof_temp[7049] = [4698,10,4698,32]; + lineof_temp[7190] = [4749,6,4750,35]; + lineof_temp[248] = [268,10,268,36]; + lineof_temp[5998] = [4087,6,4087,22]; + lineof_temp[1348] = [1030,40,1031,76]; + lineof_temp[1810] = [1360,20,1360,66]; + lineof_temp[643] = [571,4,571,27]; + lineof_temp[2267] = [1685,6,1685,28]; + lineof_temp[232] = [230,10,230,25]; + lineof_temp[927] = [798,22,799,59]; + lineof_temp[6059] = [4127,4,4127,16]; + lineof_temp[7380] = [4845,10,4845,38]; + lineof_temp[115] = [138,6,138,20]; + lineof_temp[714] = [607,10,607,15]; + lineof_temp[6513] = [4337,17,4337,18]; + lineof_temp[6956] = [4632,12,4632,35]; + lineof_temp[3874] = [2722,25,2723,59]; + lineof_temp[287] = [290,14,290,40]; + lineof_temp[5320] = [3618,12,3619,53]; + lineof_temp[1761] = [1328,28,1328,29]; + lineof_temp[4960] = [3366,28,3366,29]; + lineof_temp[6845] = [4533,32,4533,34]; + lineof_temp[2789] = [2030,6,2041,6]; + lineof_temp[3597] = [2546,22,2546,33]; + lineof_temp[6179] = [4185,6,4185,18]; + lineof_temp[83] = [96,14,96,71]; + lineof_temp[5490] = [3752,24,3752,38]; + lineof_temp[2551] = [1911,16,1916,37]; + lineof_temp[1540] = [1163,14,1163,36]; + lineof_temp[6596] = [4386,10,4386,33]; + lineof_temp[6771] = [4504,18,4504,34]; + lineof_temp[1359] = [1042,49,1042,68]; + lineof_temp[2362] = [1771,4,1771,31]; + lineof_temp[620] = [564,26,564,54]; + lineof_temp[3049] = [2206,12,2206,51]; + lineof_temp[5191] = [3537,16,3537,28]; + lineof_temp[386] = [394,6,394,37]; + lineof_temp[6887] = [4586,22,4586,62]; + lineof_temp[1113] = [856,45,856,65]; + lineof_temp[4353] = [3041,10,3041,32]; + lineof_temp[5431] = [3706,9,3706,30]; + lineof_temp[6039] = [4089,14,4089,15]; + lineof_temp[1774] = [1315,10,1315,42]; + lineof_temp[2250] = [1675,18,1675,33]; + lineof_temp[2406] = [1815,4,1815,38]; + lineof_temp[6042] = [4088,4,4088,19]; + lineof_temp[302] = [297,35,297,61]; + lineof_temp[1317] = [1001,18,1001,25]; + lineof_temp[6390] = [4296,14,4296,30]; + lineof_temp[5272] = [3592,30,3592,48]; + lineof_temp[4612] = [3170,19,3170,43]; + lineof_temp[5780] = [3919,12,3919,57]; + lineof_temp[6091] = [4148,26,4148,38]; + lineof_temp[1190] = [941,16,941,28]; + lineof_temp[3410] = [2443,20,2443,66]; + lineof_temp[4791] = [3262,15,3262,30]; + lineof_temp[5510] = [3756,12,3756,47]; + lineof_temp[6815] = [4539,36,4539,74]; + lineof_temp[7364] = [4836,2,4836,23]; + lineof_temp[1072] = [914,28,914,33]; + lineof_temp[2044] = [1510,38,1510,52]; + lineof_temp[2424] = [1833,4,1833,32]; + lineof_temp[6189] = [4195,22,4195,53]; + lineof_temp[2081] = [1538,16,1541,64]; + lineof_temp[2313] = [1724,6,1724,45]; + lineof_temp[4568] = [3162,26,3162,48]; + lineof_temp[6701] = [4464,20,4464,46]; + lineof_temp[439] = [411,12,411,13]; + lineof_temp[559] = [512,14,512,15]; + lineof_temp[2609] = [1944,24,1944,35]; + lineof_temp[4990] = [3414,14,3414,42]; + lineof_temp[744] = [644,18,644,30]; + lineof_temp[5804] = [3938,10,3938,57]; + lineof_temp[5851] = [3963,6,3963,21]; + lineof_temp[6729] = [4492,27,4492,55]; + lineof_temp[3030] = [2160,21,2160,53]; + lineof_temp[7381] = [4845,2,4845,40]; + lineof_temp[4698] = [3231,16,3231,38]; + lineof_temp[901] = [749,12,749,71]; + lineof_temp[1344] = [1030,41,1030,63]; + lineof_temp[2998] = [2184,23,2185,54]; + lineof_temp[4679] = [3221,16,3221,38]; + lineof_temp[5008] = [3428,18,3428,64]; + lineof_temp[5200] = [3546,9,3546,57]; + lineof_temp[1323] = [999,8,1006,9]; + lineof_temp[4134] = [2873,8,2874,17]; + lineof_temp[1395] = [1054,46,1072,64]; + lineof_temp[1465] = [1113,6,1113,17]; + lineof_temp[2213] = [1642,8,1642,28]; + lineof_temp[3458] = [2477,20,2477,43]; + lineof_temp[6027] = [4108,16,4108,31]; + lineof_temp[1880] = [1411,28,1411,74]; + lineof_temp[4927] = [3361,18,3361,41]; + lineof_temp[7079] = [4716,21,4716,37]; + lineof_temp[3681] = [2595,14,2595,43]; + lineof_temp[3771] = [2655,19,2655,75]; + lineof_temp[4361] = [3044,12,3044,24]; + lineof_temp[3512] = [2458,2,2495,3]; + lineof_temp[4521] = [3141,23,3142,63]; + lineof_temp[7173] = [4733,21,4733,37]; + lineof_temp[6114] = [4137,10,4137,11]; + lineof_temp[1511] = [1147,16,1147,56]; + lineof_temp[3560] = [2534,24,2534,51]; + lineof_temp[4909] = [3336,2,3336,21]; + lineof_temp[2152] = [1565,2,1565,55]; + lineof_temp[2615] = [1939,16,1944,37]; + lineof_temp[5701] = [3871,6,3871,49]; + lineof_temp[3377] = [2415,23,2415,28]; + lineof_temp[1309] = [1004,18,1004,19]; + lineof_temp[4972] = [3361,18,3361,41]; + lineof_temp[484] = [459,6,459,19]; + lineof_temp[7215] = [4762,27,4762,41]; + lineof_temp[6890] = [4587,22,4587,50]; + lineof_temp[237] = [223,8,223,19]; + lineof_temp[7310] = [4821,22,4821,62]; + lineof_temp[3006] = [2186,26,2186,54]; + lineof_temp[5972] = [4075,26,4075,55]; + lineof_temp[6327] = [4258,8,4258,33]; + lineof_temp[7235] = [4768,19,4768,21]; + lineof_temp[1742] = [1304,4,1304,28]; + lineof_temp[2363] = [1774,6,1774,32]; + lineof_temp[2376] = [1785,4,1785,33]; + lineof_temp[2994] = [2185,28,2185,52]; + lineof_temp[5227] = [3537,16,3537,28]; + lineof_temp[6263] = [4232,17,4232,33]; + lineof_temp[923] = [798,23,798,51]; + lineof_temp[186] = [211,12,211,52]; + lineof_temp[2588] = [1933,20,1933,35]; + lineof_temp[4415] = [2975,4,2982,5]; + lineof_temp[7005] = [4671,36,4671,64]; + lineof_temp[4426] = [2970,17,2970,35]; + lineof_temp[433] = [420,20,420,46]; + lineof_temp[2258] = [1681,14,1681,26]; + lineof_temp[6424] = [4314,29,4314,45]; + lineof_temp[6677] = [4443,18,4443,64]; + lineof_temp[7119] = [4716,6,4731,7]; + lineof_temp[2207] = [1645,10,1648,81]; + lineof_temp[6428] = [4313,12,4313,35]; + lineof_temp[6447] = [4322,29,4322,45]; + lineof_temp[6688] = [4458,27,4458,43]; + lineof_temp[2800] = [2024,20,2024,42]; + lineof_temp[6797] = [4520,12,4520,37]; + lineof_temp[392] = [400,15,400,53]; + lineof_temp[430] = [436,24,436,51]; + lineof_temp[2943] = [2148,14,2148,24]; + lineof_temp[17] = [29,4,29,18]; + lineof_temp[686] = [597,13,597,14]; + lineof_temp[6192] = [4194,12,4194,31]; + lineof_temp[6932] = [4564,14,4564,19]; + lineof_temp[640] = [534,2,566,2]; + lineof_temp[1110] = [905,20,929,21]; + lineof_temp[3026] = [2163,10,2163,19]; + lineof_temp[313] = [282,14,282,16]; + lineof_temp[1474] = [1103,4,1103,29]; + lineof_temp[2803] = [2053,10,2053,65]; + lineof_temp[5103] = [3479,4,3479,27]; + lineof_temp[5755] = [3902,6,3902,29]; + lineof_temp[295] = [294,14,294,40]; + lineof_temp[2095] = [1488,10,1488,12]; + lineof_temp[2725] = [2007,19,2007,30]; + lineof_temp[4613] = [3170,14,3170,16]; + lineof_temp[5482] = [3741,14,3741,22]; + lineof_temp[7328] = [4822,15,4822,24]; + lineof_temp[1541] = [1163,6,1163,38]; + lineof_temp[4573] = [3164,2,3164,14]; + lineof_temp[6158] = [4182,13,4182,73]; + lineof_temp[3448] = [2463,4,2463,40]; + lineof_temp[5069] = [3410,2,3410,11]; + lineof_temp[1340] = [1024,30,1024,67]; + lineof_temp[2173] = [1616,14,1616,41]; + lineof_temp[2212] = [1642,16,1642,26]; + lineof_temp[2591] = [1936,18,1936,57]; + lineof_temp[7031] = [4688,14,4688,40]; + lineof_temp[1330] = [1015,26,1015,54]; + lineof_temp[6303] = [4250,10,4250,43]; + lineof_temp[2303] = [1714,6,1714,34]; + lineof_temp[3876] = [2722,24,2724,58]; + lineof_temp[4637] = [3195,14,3195,21]; + lineof_temp[2179] = [1613,8,1617,95]; + lineof_temp[3018] = [2179,16,2179,26]; + lineof_temp[911] = [759,20,760,52]; + lineof_temp[3003] = [2188,26,2188,34]; + lineof_temp[7299] = [4175,10,4175,11]; + lineof_temp[4423] = [2971,15,2971,17]; + lineof_temp[27] = [44,14,44,39]; + lineof_temp[4387] = [3051,10,3051,18]; + lineof_temp[4697] = [3231,39,3231,50]; + lineof_temp[4841] = [3306,8,3306,20]; + lineof_temp[212] = [229,12,229,62]; + lineof_temp[460] = [453,4,453,33]; + lineof_temp[3692] = [2610,8,2610,31]; + lineof_temp[3855] = [2696,27,2696,32]; + lineof_temp[3241] = [2286,30,2286,61]; + lineof_temp[4682] = [3221,4,3221,50]; + lineof_temp[6985] = [4656,34,4656,53]; + lineof_temp[7346] = [4828,6,4828,49]; + lineof_temp[1334] = [1014,41,1014,61]; + lineof_temp[6466] = [4307,8,4307,31]; + lineof_temp[3575] = [2519,10,2521,12]; + lineof_temp[3729] = [2625,15,2625,17]; + lineof_temp[4108] = [2857,17,2857,18]; + lineof_temp[2421] = [1832,6,1832,22]; + lineof_temp[4296] = [3002,22,3002,32]; + lineof_temp[2741] = [2015,2,2015,14]; + lineof_temp[3985] = [2782,12,2782,20]; + lineof_temp[4436] = [3066,4,3067,29]; + lineof_temp[5907] = [4006,12,4009,94]; + lineof_temp[946] = [812,34,812,65]; + lineof_temp[5847] = [3964,6,3964,21]; + lineof_temp[4638] = [3195,6,3195,23]; + lineof_temp[5773] = [3914,12,3914,57]; + lineof_temp[2455] = [1866,19,1866,46]; + lineof_temp[3298] = [2365,8,2365,20]; + lineof_temp[5145] = [3511,10,3511,61]; + lineof_temp[7086] = [4719,10,4719,44]; + lineof_temp[7146] = [4742,22,4742,23]; + lineof_temp[222] = [244,26,244,35]; + lineof_temp[580] = [540,24,540,44]; + lineof_temp[2523] = [1957,21,1964,72]; + lineof_temp[617] = [561,24,561,49]; + lineof_temp[7091] = [4728,17,4728,44]; + lineof_temp[2226] = [1652,8,1655,94]; + lineof_temp[6801] = [4526,32,4526,67]; + lineof_temp[2781] = [2032,14,2032,17]; + lineof_temp[5733] = [3890,6,3890,40]; + lineof_temp[892] = [745,23,746,77]; + lineof_temp[2751] = [2005,28,2005,46]; + lineof_temp[4512] = [3141,23,3142,63]; + lineof_temp[5037] = [3444,20,3444,32]; + lineof_temp[5849] = [3963,24,3963,39]; + lineof_temp[943] = [808,28,809,40]; + lineof_temp[5679] = [3861,14,3861,72]; + lineof_temp[5] = [16,58,16,75]; + lineof_temp[3180] = [2282,4,2283,19]; + lineof_temp[4429] = [2970,4,2984,15]; + lineof_temp[5240] = [3574,44,3574,51]; + lineof_temp[6879] = [4581,32,4581,67]; + lineof_temp[2644] = [1888,4,1888,28]; + lineof_temp[7023] = [4680,6,4680,60]; + lineof_temp[1645] = [1227,15,1227,50]; + lineof_temp[5503] = [3739,12,3739,33]; + lineof_temp[673] = [593,10,593,38]; + lineof_temp[5470] = [3722,20,3722,32]; + lineof_temp[6313] = [4254,14,4254,30]; + lineof_temp[3632] = [2551,12,2565,13]; + lineof_temp[5329] = [3612,4,3612,20]; + lineof_temp[1390] = [1069,52,1072,62]; + lineof_temp[4501] = [3131,22,3131,43]; + lineof_temp[5011] = [3427,14,3430,67]; + lineof_temp[5947] = [4039,18,4039,47]; + lineof_temp[3748] = [2647,24,2647,52]; + lineof_temp[6607] = [4401,20,4401,58]; + lineof_temp[651] = [573,4,573,29]; + lineof_temp[4103] = [2857,21,2857,34]; + lineof_temp[6355] = [4279,18,4279,46]; + lineof_temp[1904] = [1387,10,1387,21]; + lineof_temp[3133] = [2264,23,2264,30]; + lineof_temp[4899] = [3343,15,3343,74]; + lineof_temp[5810] = [3941,10,3941,23]; + lineof_temp[1512] = [1147,16,1147,56]; + lineof_temp[1875] = [1405,26,1405,38]; + lineof_temp[5919] = [4024,24,4025,62]; + lineof_temp[6716] = [4462,16,4462,28]; + lineof_temp[846] = [684,44,684,113]; + lineof_temp[1082] = [921,36,921,60]; + lineof_temp[3338] = [2392,26,2392,35]; + lineof_temp[1476] = [1117,12,1117,58]; + lineof_temp[1198] = [836,18,836,54]; + lineof_temp[2126] = [1597,16,1597,26]; + lineof_temp[3586] = [2516,10,2516,24]; + lineof_temp[4645] = [3197,18,3197,39]; + lineof_temp[39] = [56,6,56,42]; + lineof_temp[1380] = [1059,50,1063,60]; + lineof_temp[2410] = [1819,4,1819,29]; + lineof_temp[968] = [791,24,791,36]; + lineof_temp[826] = [698,14,698,67]; + lineof_temp[4080] = [2840,19,2840,61]; + lineof_temp[7319] = [4824,24,4824,28]; + lineof_temp[126] = [155,20,155,40]; + lineof_temp[2211] = [1642,16,1642,26]; + lineof_temp[315] = [264,10,264,12]; + lineof_temp[4864] = [3311,14,3314,79]; + lineof_temp[1229] = [970,18,970,36]; + lineof_temp[2798] = [2042,4,2042,35]; + lineof_temp[6310] = [4244,6,4244,31]; + lineof_temp[3020] = [2173,16,2178,18]; + lineof_temp[1224] = [972,18,972,36]; + lineof_temp[2030] = [1505,12,1507,72]; + lineof_temp[4560] = [3158,22,3158,45]; + lineof_temp[5384] = [3670,10,3670,31]; + lineof_temp[7224] = [4768,24,4768,59]; + lineof_temp[2487] = [1885,24,1885,36]; + lineof_temp[6364] = [4281,19,4281,22]; + lineof_temp[2031] = [1550,20,1550,47]; + lineof_temp[894] = [745,10,745,20]; + lineof_temp[4235] = [2931,4,2931,29]; + lineof_temp[7321] = [4824,6,4824,21]; + lineof_temp[4308] = [2988,8,3016,8]; + lineof_temp[4788] = [3274,8,3278,55]; + lineof_temp[5714] = [3881,6,3881,15]; + lineof_temp[4269] = [2988,25,2988,36]; + lineof_temp[4459] = [3084,10,3091,12]; + lineof_temp[6570] = [4379,8,4379,46]; + lineof_temp[728] = [629,18,630,30]; + lineof_temp[2582] = [1925,16,1925,26]; + lineof_temp[5878] = [3985,14,3985,40]; + lineof_temp[3554] = [2526,28,2526,51]; + lineof_temp[5316] = [3619,12,3619,53]; + lineof_temp[1123] = [870,38,870,40]; + lineof_temp[4388] = [3038,16,3038,18]; + lineof_temp[1658] = [1241,24,1241,71]; + lineof_temp[2270] = [1686,4,1686,25]; + lineof_temp[5210] = [3559,6,3559,24]; + lineof_temp[5962] = [4057,22,4057,48]; + lineof_temp[1513] = [1149,2,1149,13]; + lineof_temp[4796] = [3286,22,3286,47]; + lineof_temp[5089] = [3466,2,3470,3]; + lineof_temp[810] = [687,22,687,41]; + lineof_temp[1674] = [1227,15,1227,50]; + lineof_temp[2761] = [2034,26,2034,66]; + lineof_temp[4895] = [3338,13,3338,45]; + lineof_temp[31] = [46,14,46,39]; + lineof_temp[4279] = [3004,33,3004,45]; + lineof_temp[4519] = [3143,10,3143,23]; + lineof_temp[2259] = [1681,6,1681,28]; + lineof_temp[1992] = [1484,10,1484,67]; + lineof_temp[5884] = [3984,8,3984,41]; + lineof_temp[366] = [366,4,366,27]; + lineof_temp[2243] = [1666,10,1666,34]; + lineof_temp[2312] = [1721,4,1721,40]; + lineof_temp[1641] = [1201,11,1201,12]; + lineof_temp[7223] = [4768,24,4768,59]; + lineof_temp[4920] = [3356,10,3356,21]; + lineof_temp[3324] = [2387,18,2388,37]; + lineof_temp[5555] = [3792,13,3793,38]; + lineof_temp[835] = [689,8,689,26]; + lineof_temp[2111] = [1573,14,1573,41]; + lineof_temp[556] = [517,12,520,97]; + lineof_temp[3093] = [2249,12,2250,21]; + lineof_temp[3986] = [2782,4,2782,20]; + lineof_temp[4534] = [3132,27,3132,54]; + lineof_temp[6464] = [4321,12,4321,37]; + lineof_temp[7156] = [4740,8,4744,23]; + lineof_temp[2887] = [2102,16,2103,54]; + lineof_temp[4126] = [2870,8,2870,73]; + lineof_temp[4803] = [3286,6,3286,19]; + lineof_temp[6260] = [4231,14,4231,30]; + lineof_temp[2541] = [1913,33,1915,73]; + lineof_temp[3649] = [2543,6,2543,15]; + lineof_temp[5161] = [3508,10,3508,12]; + lineof_temp[7164] = [4736,10,4736,23]; + lineof_temp[1283] = [832,10,832,11]; + lineof_temp[4965] = [3364,16,3394,22]; + lineof_temp[4039] = [2807,10,2807,24]; + lineof_temp[7114] = [4717,6,4717,20]; + lineof_temp[6144] = [4164,4,4164,32]; + lineof_temp[3696] = [2616,22,2616,50]; + lineof_temp[1668] = [1229,4,1229,33]; + lineof_temp[1834] = [1377,10,1377,27]; + lineof_temp[4720] = [3243,19,3243,41]; + lineof_temp[6625] = [4412,24,4412,62]; + lineof_temp[3009] = [2180,31,2180,60]; + lineof_temp[4554] = [3125,4,3125,20]; + lineof_temp[6586] = [4418,16,4418,44]; + lineof_temp[3536] = [2509,14,2509,19]; + lineof_temp[4539] = [3131,18,3131,19]; + lineof_temp[932] = [818,22,821,79]; + lineof_temp[1621] = [1210,10,1210,12]; + lineof_temp[1732] = [1281,2,1281,12]; + lineof_temp[6794] = [4521,22,4521,50]; + lineof_temp[1184] = [848,22,848,28]; + lineof_temp[5075] = [3408,2,3408,45]; + lineof_temp[5296] = [3604,2,3604,16]; + lineof_temp[5877] = [3985,14,3985,40]; + lineof_temp[5257] = [3584,4,3584,12]; + lineof_temp[6160] = [4181,10,4182,74]; + lineof_temp[5959] = [4048,44,4048,66]; + lineof_temp[375] = [385,30,385,61]; + lineof_temp[4967] = [3362,12,3362,26]; + lineof_temp[5106] = [3485,18,3485,44]; + lineof_temp[3023] = [2164,18,2164,19]; + lineof_temp[2984] = [2172,18,2172,44]; + lineof_temp[5582] = [3779,4,3805,5]; + lineof_temp[1720] = [1294,16,1294,37]; + lineof_temp[1801] = [1352,18,1352,40]; + lineof_temp[1768] = [1318,14,1318,25]; + lineof_temp[1881] = [1410,24,1410,36]; + lineof_temp[3609] = [2552,25,2552,36]; + lineof_temp[6942] = [4620,8,4620,31]; + lineof_temp[4132] = [2873,46,2873,75]; + lineof_temp[3790] = [2658,10,2659,50]; + lineof_temp[3929] = [2746,20,2746,26]; + lineof_temp[1171] = [853,28,853,40]; + lineof_temp[4093] = [2840,6,2840,16]; + lineof_temp[6622] = [4410,31,4410,43]; + lineof_temp[3001] = [2183,20,2185,55]; + lineof_temp[6121] = [4135,2,4135,17]; + lineof_temp[685] = [597,17,597,29]; + lineof_temp[5440] = [3712,10,3712,56]; + lineof_temp[827] = [698,14,698,67]; + lineof_temp[3336] = [2394,18,2398,84]; + lineof_temp[6759] = [4454,12,4456,62]; + lineof_temp[6860] = [4568,14,4568,52]; + lineof_temp[4528] = [3134,10,3134,25]; + lineof_temp[6719] = [4460,32,4460,73]; + lineof_temp[2737] = [2021,2,2021,14]; + lineof_temp[4414] = [2983,4,2984,15]; + lineof_temp[5903] = [4008,16,4008,43]; + lineof_temp[6527] = [4353,26,4353,42]; + lineof_temp[667] = [584,4,584,29]; + lineof_temp[6115] = [4136,16,4136,39]; + lineof_temp[6718] = [4461,18,4461,47]; + lineof_temp[681] = [597,17,597,29]; + lineof_temp[3484] = [2484,12,2485,31]; + lineof_temp[5425] = [3698,4,3698,41]; + lineof_temp[3195] = [2297,15,2298,52]; + lineof_temp[5427] = [3697,12,3697,14]; + lineof_temp[2464] = [1867,10,1867,62]; + lineof_temp[4625] = [3187,14,3187,34]; + lineof_temp[6413] = [4315,28,4315,63]; + lineof_temp[907] = [759,28,759,53]; + lineof_temp[3209] = [2309,21,2309,49]; + lineof_temp[5688] = [3865,14,3865,36]; + lineof_temp[6574] = [4374,10,4374,22]; + lineof_temp[4107] = [2857,21,2857,34]; + lineof_temp[2502] = [1897,27,1901,68]; + lineof_temp[2677] = [1986,16,1986,26]; + lineof_temp[2672] = [1984,18,1984,34]; + lineof_temp[6869] = [4574,22,4574,50]; + lineof_temp[3138] = [2263,12,2263,30]; + lineof_temp[5573] = [3794,16,3794,19]; + lineof_temp[75] = [91,8,93,76]; + lineof_temp[1672] = [1249,4,1249,39]; + lineof_temp[5020] = [3436,21,3437,47]; + lineof_temp[4257] = [2955,4,2955,27]; + lineof_temp[800] = [685,6,685,23]; + lineof_temp[1371] = [1046,44,1048,79]; + lineof_temp[2995] = [2185,28,2185,52]; + lineof_temp[3159] = [2230,12,2230,24]; + lineof_temp[3944] = [2751,28,2751,40]; + lineof_temp[3967] = [2770,6,2770,21]; + lineof_temp[139] = [168,30,169,56]; + lineof_temp[2320] = [1729,4,1729,29]; + lineof_temp[7320] = [4824,15,4824,21]; + lineof_temp[4977] = [3402,6,3402,17]; + lineof_temp[7253] = [4789,20,4789,48]; + lineof_temp[2256] = [1671,4,1671,23]; + lineof_temp[2680] = [1985,19,1985,21]; + lineof_temp[2825] = [2048,23,2048,36]; + lineof_temp[6048] = [4124,24,4124,40]; + lineof_temp[1257] = [963,28,963,57]; + lineof_temp[2109] = [1578,8,1578,28]; + lineof_temp[4606] = [3172,6,3172,16]; + lineof_temp[53] = [78,6,78,17]; + lineof_temp[1248] = [980,18,980,37]; + lineof_temp[4378] = [3050,12,3050,52]; + lineof_temp[373] = [375,6,375,9]; + lineof_temp[7205] = [4756,24,4756,41]; + lineof_temp[5644] = [3846,6,3846,15]; + lineof_temp[3478] = [2485,20,2485,29]; + lineof_temp[5625] = [3823,2,3825,4]; + lineof_temp[1053] = [907,49,907,70]; + lineof_temp[3608] = [2551,29,2551,53]; + lineof_temp[5461] = [3726,8,3726,19]; + lineof_temp[4095] = [2839,4,2839,29]; + lineof_temp[1151] = [863,28,863,74]; + lineof_temp[6207] = [4205,18,4205,35]; + lineof_temp[461] = [456,14,456,25]; + lineof_temp[5599] = [3817,14,3817,23]; + lineof_temp[4145] = [2875,4,2875,27]; + lineof_temp[3414] = [2442,16,2445,92]; + lineof_temp[3492] = [2487,22,2487,23]; + lineof_temp[1542] = [1162,4,1162,39]; + lineof_temp[3769] = [2645,8,2645,74]; + lineof_temp[4391] = [3037,8,3037,17]; + lineof_temp[6705] = [4467,26,4467,52]; + lineof_temp[5971] = [4061,14,4061,42]; + lineof_temp[3884] = [2732,24,2732,43]; + lineof_temp[4425] = [2971,4,2984,15]; + lineof_temp[3858] = [2697,10,2697,39]; + lineof_temp[7330] = [4822,6,4826,55]; + lineof_temp[4760] = [3250,10,3250,12]; + lineof_temp[6363] = [4281,25,4281,74]; + lineof_temp[2552] = [1910,14,1910,34]; + lineof_temp[4646] = [3197,14,3197,15]; + lineof_temp[239] = [220,6,220,48]; + lineof_temp[2767] = [2036,10,2036,59]; + lineof_temp[806] = [706,6,713,52]; + lineof_temp[3480] = [2485,12,2485,31]; + lineof_temp[2105] = [1576,18,1577,62]; + lineof_temp[3643] = [2545,8,2545,39]; + lineof_temp[4309] = [2987,6,2987,31]; + lineof_temp[496] = [473,15,473,48]; + lineof_temp[1561] = [1174,10,1174,13]; + lineof_temp[3102] = [2253,21,2254,58]; + lineof_temp[3667] = [2590,20,2590,47]; + lineof_temp[5936] = [3997,10,3997,15]; + lineof_temp[7097] = [4729,16,4729,19]; + lineof_temp[7243] = [4782,20,4782,48]; + lineof_temp[1358] = [1042,49,1042,68]; + lineof_temp[5995] = [4086,21,4086,61]; + lineof_temp[863] = [730,14,731,47]; + lineof_temp[2522] = [1957,21,1964,72]; + lineof_temp[3066] = [2224,2,2224,75]; + lineof_temp[3811] = [2670,10,2670,29]; + lineof_temp[4363] = [3043,10,3043,32]; + lineof_temp[1845] = [1454,16,1454,57]; + lineof_temp[1406] = [1039,36,1078,47]; + lineof_temp[6452] = [4324,44,4324,62]; + lineof_temp[1397] = [1075,48,1075,76]; + lineof_temp[2925] = [2138,17,2138,18]; + lineof_temp[2968] = [2197,8,2199,26]; + lineof_temp[7006] = [4671,28,4671,66]; + lineof_temp[1982] = [1476,4,1476,39]; + lineof_temp[2343] = [1754,6,1754,38]; + lineof_temp[5242] = [3574,34,3574,52]; + lineof_temp[4434] = [2968,6,2968,30]; + lineof_temp[6296] = [4247,18,4247,46]; + lineof_temp[6591] = [4389,18,4389,64]; + lineof_temp[1381] = [1059,50,1063,60]; + lineof_temp[1999] = [1493,12,1493,39]; + lineof_temp[4736] = [3250,15,3250,37]; + lineof_temp[6020] = [4099,10,4103,101]; + lineof_temp[5304] = [3615,23,3615,44]; + lineof_temp[6889] = [4587,22,4587,50]; + lineof_temp[523] = [489,14,489,22]; + lineof_temp[4602] = [3172,19,3172,39]; + lineof_temp[6724] = [4483,29,4483,69]; + lineof_temp[3479] = [2485,20,2485,29]; + lineof_temp[4177] = [2894,4,2894,35]; + lineof_temp[2189] = [1624,4,1624,37]; + lineof_temp[4456] = [3092,18,3092,31]; + lineof_temp[774] = [624,28,624,63]; + lineof_temp[6280] = [4238,18,4238,22]; + lineof_temp[959] = [787,24,787,65]; + lineof_temp[2054] = [1526,20,1530,60]; + lineof_temp[4514] = [3143,26,3143,39]; + lineof_temp[4328] = [3032,26,3032,42]; + lineof_temp[6402] = [4301,10,4302,21]; + lineof_temp[7195] = [4747,21,4747,37]; + lineof_temp[553] = [518,16,518,62]; + lineof_temp[5027] = [3439,46,3439,60]; + lineof_temp[370] = [376,12,376,25]; + lineof_temp[985] = [766,20,766,56]; + lineof_temp[2926] = [2138,8,2138,18]; + lineof_temp[4601] = [3172,19,3172,39]; + lineof_temp[4104] = [2858,14,2858,35]; + lineof_temp[6800] = [4526,32,4526,67]; + lineof_temp[757] = [648,31,648,34]; + lineof_temp[1581] = [1191,23,1191,35]; + lineof_temp[7363] = [4836,10,4836,21]; + lineof_temp[6249] = [4225,10,4226,43]; + lineof_temp[1799] = [1350,10,1350,61]; + lineof_temp[3232] = [2299,2,2323,3]; + lineof_temp[419] = [426,20,426,47]; + lineof_temp[843] = [687,4,703,5]; + lineof_temp[1035] = [841,16,841,62]; + lineof_temp[4212] = [2912,14,2912,42]; + lineof_temp[5203] = [3547,13,3547,34]; + lineof_temp[4206] = [2910,6,2910,21]; + lineof_temp[644] = [574,19,574,49]; + lineof_temp[1833] = [1376,19,1376,30]; + lineof_temp[382] = [393,16,393,60]; + lineof_temp[3600] = [2547,36,2547,56]; + lineof_temp[2879] = [2109,4,2114,6]; + lineof_temp[3293] = [2342,10,2342,13]; + lineof_temp[5063] = [3411,15,3411,41]; + lineof_temp[6232] = [4219,14,4219,30]; + lineof_temp[100] = [119,4,119,23]; + lineof_temp[6055] = [4126,20,4126,62]; + lineof_temp[6900] = [4597,34,4597,57]; + lineof_temp[2316] = [1725,4,1725,40]; + lineof_temp[6090] = [4149,10,4149,22]; + lineof_temp[4005] = [2789,10,2789,24]; + lineof_temp[4286] = [3004,18,3005,70]; + lineof_temp[6761] = [4452,12,4452,54]; + lineof_temp[6675] = [4499,8,4499,46]; + lineof_temp[5261] = [3590,18,3590,46]; + lineof_temp[5613] = [3829,14,3829,23]; + lineof_temp[6015] = [4101,16,4101,62]; + lineof_temp[6316] = [4257,10,4257,48]; + lineof_temp[1966] = [1474,8,1474,59]; + lineof_temp[4016] = [2798,15,2798,23]; + lineof_temp[4503] = [3132,27,3132,54]; + lineof_temp[6526] = [4354,10,4354,55]; + lineof_temp[6829] = [4547,44,4547,72]; + lineof_temp[2397] = [1808,6,1808,32]; + lineof_temp[5856] = [3956,11,3956,35]; + lineof_temp[259] = [270,6,272,39]; + lineof_temp[2195] = [1608,42,1608,57]; + lineof_temp[7181] = [4748,23,4748,50]; + lineof_temp[3308] = [2375,28,2375,66]; + lineof_temp[3374] = [2416,14,2416,24]; + lineof_temp[6533] = [4348,6,4348,31]; + lineof_temp[19] = [26,6,26,22]; + lineof_temp[5447] = [3709,8,3709,77]; + lineof_temp[5518] = [3721,19,3721,42]; + lineof_temp[172] = [193,8,193,33]; + lineof_temp[497] = [474,10,474,40]; + lineof_temp[1046] = [852,22,852,44]; + lineof_temp[2309] = [1720,6,1720,31]; + lineof_temp[6839] = [4535,36,4535,37]; + lineof_temp[514] = [488,16,488,47]; + lineof_temp[1959] = [1466,15,1466,50]; + lineof_temp[3796] = [2654,8,2654,40]; + lineof_temp[5646] = [3845,4,3845,32]; + lineof_temp[6240] = [4224,25,4224,52]; + lineof_temp[3877] = [2722,24,2724,58]; + lineof_temp[60] = [65,29,65,45]; + lineof_temp[3722] = [2630,8,2630,18]; + lineof_temp[5199] = [3543,15,3543,27]; + lineof_temp[4779] = [3271,8,3271,18]; + lineof_temp[5593] = [3810,6,3810,43]; + lineof_temp[3983] = [2782,52,2782,71]; + lineof_temp[759] = [648,22,657,26]; + lineof_temp[3705] = [2613,20,2613,26]; + lineof_temp[3854] = [2696,27,2696,32]; + lineof_temp[5975] = [4074,24,4075,62]; + lineof_temp[1043] = [850,32,850,77]; + lineof_temp[1694] = [1277,10,1277,52]; + lineof_temp[741] = [640,28,640,58]; + lineof_temp[4408] = [2983,17,2983,39]; + lineof_temp[1617] = [1215,12,1215,24]; + lineof_temp[3207] = [2320,4,2322,15]; + lineof_temp[4218] = [2914,14,2914,45]; + lineof_temp[6350] = [4264,6,4264,31]; + lineof_temp[1186] = [846,12,846,43]; + lineof_temp[6617] = [4395,24,4395,25]; + lineof_temp[5846] = [3964,20,3964,21]; + lineof_temp[5909] = [4005,10,4009,96]; + lineof_temp[6415] = [4316,44,4316,62]; + lineof_temp[6915] = [4590,36,4590,37]; + lineof_temp[3080] = [2239,10,2242,47]; + lineof_temp[1445] = [1100,10,1100,21]; + lineof_temp[1734] = [1280,35,1280,55]; + lineof_temp[3776] = [2656,23,2657,67]; + lineof_temp[7199] = [4746,4,4746,39]; + lineof_temp[1235] = [966,28,966,39]; + lineof_temp[2535] = [1906,16,1906,32]; + lineof_temp[2387] = [1798,6,1798,39]; + lineof_temp[3794] = [2656,10,2662,29]; + lineof_temp[6914] = [4605,30,4605,55]; + lineof_temp[748] = [643,18,644,30]; + lineof_temp[1296] = [995,4,995,27]; + lineof_temp[6057] = [4127,19,4127,28]; + lineof_temp[6398] = [4302,10,4302,21]; + lineof_temp[1286] = [831,2,831,12]; + lineof_temp[1364] = [1042,46,1045,66]; + lineof_temp[1463] = [1108,19,1112,77]; + lineof_temp[3968] = [2769,4,2769,14]; + lineof_temp[1589] = [1189,10,1189,36]; + lineof_temp[2148] = [1566,15,1566,50]; + lineof_temp[7209] = [4756,8,4756,21]; + lineof_temp[3224] = [2308,4,2308,16]; + lineof_temp[4102] = [2857,21,2857,34]; + lineof_temp[903] = [752,14,752,76]; + lineof_temp[2750] = [2006,2,2021,14]; + lineof_temp[325] = [320,6,320,24]; + lineof_temp[379] = [385,2,385,64]; + lineof_temp[5114] = [3483,14,3483,17]; + lineof_temp[440] = [411,4,411,13]; + lineof_temp[3934] = [2746,16,2746,67]; + lineof_temp[4658] = [3210,60,3210,72]; + lineof_temp[2099] = [1566,15,1566,50]; + lineof_temp[4667] = [3207,4,3207,23]; + lineof_temp[5031] = [3438,23,3440,45]; + lineof_temp[1709] = [1285,6,1285,23]; + lineof_temp[3450] = [2462,13,2462,16]; + lineof_temp[6774] = [4505,10,4505,47]; + lineof_temp[3809] = [2670,18,2670,27]; + lineof_temp[7360] = [4835,15,4835,75]; + lineof_temp[1850] = [1387,24,1387,49]; + lineof_temp[2374] = [1783,4,1783,27]; + lineof_temp[5913] = [4020,22,4020,48]; + lineof_temp[970] = [791,24,794,72]; + lineof_temp[3455] = [2461,4,2461,17]; + lineof_temp[6697] = [4463,31,4463,42]; + lineof_temp[7166] = [4735,14,4735,18]; + lineof_temp[3550] = [2524,22,2524,31]; + lineof_temp[1108] = [905,28,905,32]; + lineof_temp[2739] = [2015,17,2015,39]; + lineof_temp[2759] = [2031,21,2031,65]; + lineof_temp[6475] = [4330,10,4330,61]; + lineof_temp[254] = [271,31,271,57]; + lineof_temp[817] = [701,8,702,50]; + lineof_temp[1520] = [1147,2,1147,13]; + lineof_temp[2080] = [1538,16,1541,64]; + lineof_temp[4634] = [3181,10,3181,15]; + lineof_temp[207] = [229,13,229,35]; + lineof_temp[456] = [444,18,444,29]; + lineof_temp[4571] = [3163,20,3163,62]; + lineof_temp[2422] = [1831,4,1831,27]; + lineof_temp[7131] = [4740,37,4740,48]; + lineof_temp[7283] = [4800,6,4800,44]; + lineof_temp[3236] = [2297,2,2323,3]; + lineof_temp[6334] = [4267,18,4267,46]; + lineof_temp[2505] = [1895,23,1895,36]; + lineof_temp[2657] = [1975,21,1977,72]; + lineof_temp[3585] = [2516,19,2516,24]; + lineof_temp[5611] = [3828,19,3828,41]; + lineof_temp[2396] = [1805,4,1805,28]; + lineof_temp[3537] = [2509,14,2509,19]; + lineof_temp[6669] = [4421,10,4421,32]; + lineof_temp[625] = [562,12,564,60]; + lineof_temp[2990] = [2184,26,2184,48]; + lineof_temp[1009] = [753,12,753,40]; + lineof_temp[4934] = [3381,40,3381,67]; + lineof_temp[166] = [151,12,151,37]; + lineof_temp[6904] = [4599,34,4599,58]; + lineof_temp[1236] = [977,31,977,64]; + lineof_temp[1521] = [1147,2,1149,13]; + lineof_temp[3911] = [2706,12,2706,30]; + lineof_temp[1362] = [1043,49,1045,65]; + lineof_temp[6930] = [4580,10,4615,21]; + lineof_temp[1696] = [1277,2,1277,54]; + lineof_temp[2453] = [1865,18,1865,34]; + lineof_temp[5836] = [3963,24,3963,39]; + lineof_temp[3188] = [2287,10,2288,23]; + lineof_temp[6999] = [4667,40,4667,68]; + lineof_temp[6349] = [4265,14,4265,15]; + lineof_temp[3715] = [2629,18,2629,52]; + lineof_temp[5001] = [3419,20,3419,48]; + lineof_temp[2993] = [2184,24,2184,49]; + lineof_temp[3924] = [2681,2,2683,4]; + lineof_temp[4069] = [2813,2,2817,3]; + lineof_temp[4082] = [2843,18,2843,46]; + lineof_temp[1010] = [752,14,752,76]; + lineof_temp[5362] = [3652,16,3652,17]; + lineof_temp[3892] = [2722,24,2724,58]; + lineof_temp[6217] = [4212,18,4212,46]; + lineof_temp[1918] = [1444,28,1444,38]; + lineof_temp[3058] = [2216,42,2216,64]; + lineof_temp[56] = [80,14,80,37]; + lineof_temp[1580] = [1191,38,1191,65]; + lineof_temp[5445] = [3712,10,3712,56]; + lineof_temp[422] = [427,18,427,41]; + lineof_temp[1832] = [1376,19,1376,30]; + lineof_temp[5589] = [3812,16,3812,25]; + lineof_temp[6471] = [4330,40,4330,58]; + lineof_temp[6563] = [4357,4,4357,54]; + lineof_temp[772] = [639,12,639,42]; + lineof_temp[3864] = [2700,10,2700,21]; + lineof_temp[4059] = [2826,10,2826,44]; + lineof_temp[6599] = [4397,20,4397,64]; + lineof_temp[2806] = [2057,32,2057,59]; + lineof_temp[2905] = [2129,19,2129,27]; + lineof_temp[3706] = [2613,10,2613,26]; + lineof_temp[6953] = [4633,22,4633,50]; + lineof_temp[849] = [722,4,722,68]; + lineof_temp[2165] = [1609,15,1609,50]; + lineof_temp[3872] = [2712,18,2713,52]; + lineof_temp[4922] = [3358,10,3358,21]; + lineof_temp[7053] = [4704,18,4704,45]; + lineof_temp[2697] = [1990,6,1990,52]; + lineof_temp[6095] = [4147,8,4147,32]; + lineof_temp[6924] = [4585,20,4612,26]; + lineof_temp[828] = [698,6,698,69]; + lineof_temp[2390] = [1799,4,1799,44]; + lineof_temp[5722] = [3886,24,3886,31]; + lineof_temp[2234] = [1634,46,1634,64]; + lineof_temp[3106] = [2255,12,2255,55]; + lineof_temp[4916] = [3352,10,3352,30]; + lineof_temp[7172] = [4734,6,4745,7]; + lineof_temp[78] = [96,15,96,31]; + lineof_temp[1014] = [742,6,742,39]; + lineof_temp[3844] = [2690,14,2690,25]; + lineof_temp[4659] = [3210,44,3210,57]; + lineof_temp[6010] = [4094,10,4094,49]; + lineof_temp[2949] = [2157,21,2157,70]; + lineof_temp[3685] = [2580,15,2580,21]; + lineof_temp[4033] = [2793,2,2797,3]; + lineof_temp[4340] = [3019,16,3019,18]; + lineof_temp[6196] = [4196,12,4196,35]; + lineof_temp[696] = [602,13,602,14]; + lineof_temp[5260] = [3590,18,3590,46]; + lineof_temp[5358] = [3655,14,3657,25]; + lineof_temp[5709] = [3881,18,3881,39]; + lineof_temp[3010] = [2180,31,2180,60]; + lineof_temp[4705] = [3226,15,3226,37]; + lineof_temp[5230] = [3537,4,3560,5]; + lineof_temp[1968] = [1472,25,1472,63]; + lineof_temp[3762] = [2649,8,2649,19]; + lineof_temp[6322] = [4260,10,4260,45]; + lineof_temp[1389] = [1070,54,1072,61]; + lineof_temp[2402] = [1811,4,1811,44]; + lineof_temp[2705] = [1992,6,1992,31]; + lineof_temp[3746] = [2645,17,2645,73]; + lineof_temp[6624] = [4411,37,4411,76]; + lineof_temp[1568] = [1168,37,1168,58]; + lineof_temp[5113] = [3486,8,3486,18]; + lineof_temp[6538] = [4359,21,4359,33]; + lineof_temp[6603] = [4399,20,4399,64]; + lineof_temp[2654] = [1977,33,1977,68]; + lineof_temp[1752] = [1323,20,1323,32]; + lineof_temp[1262] = [961,10,961,43]; + lineof_temp[6372] = [4286,14,4286,30]; + lineof_temp[202] = [226,11,226,33]; + lineof_temp[2022] = [1506,16,1506,66]; + lineof_temp[7145] = [4742,26,4742,69]; + lineof_temp[9] = [16,6,16,77]; + lineof_temp[1021] = [725,12,725,13]; + lineof_temp[1499] = [1135,10,1135,38]; + lineof_temp[3688] = [2579,4,2579,30]; + lineof_temp[220] = [241,20,241,50]; + lineof_temp[5683] = [3863,14,3863,35]; + lineof_temp[1976] = [1469,6,1469,17]; + lineof_temp[312] = [299,8,299,33]; + lineof_temp[1860] = [1395,24,1395,34]; + lineof_temp[2528] = [1965,17,1965,18]; + lineof_temp[4903] = [3343,15,3343,74]; + lineof_temp[735] = [633,20,636,89]; + lineof_temp[1183] = [931,16,931,42]; + lineof_temp[2443] = [1708,10,1708,15]; + lineof_temp[3187] = [2287,10,2288,23]; + lineof_temp[4255] = [2956,14,2956,28]; + lineof_temp[6868] = [4574,22,4574,50]; + lineof_temp[2319] = [1730,6,1730,24]; + lineof_temp[4680] = [3221,12,3221,13]; + lineof_temp[5348] = [3642,14,3645,31]; + lineof_temp[1081] = [921,36,921,60]; + lineof_temp[3682] = [2594,8,2594,37]; + lineof_temp[7129] = [4736,10,4736,23]; + lineof_temp[304] = [298,14,298,40]; + lineof_temp[582] = [541,22,541,39]; + lineof_temp[2894] = [2092,2,2093,31]; + lineof_temp[5874] = [3980,12,3983,99]; + lineof_temp[3821] = [2664,10,2664,78]; + lineof_temp[5620] = [3831,14,3831,23]; + lineof_temp[1996] = [1483,2,1483,14]; + lineof_temp[2371] = [1782,6,1782,37]; + lineof_temp[7255] = [4789,12,4789,50]; + lineof_temp[773] = [625,18,625,24]; + lineof_temp[856] = [740,18,740,36]; + lineof_temp[1195] = [845,18,845,22]; + lineof_temp[4834] = [3301,21,3301,56]; + lineof_temp[1804] = [1351,8,1351,41]; + lineof_temp[3453] = [2461,20,2461,56]; + lineof_temp[5839] = [3964,24,3964,58]; + lineof_temp[6022] = [4107,18,4107,41]; + lineof_temp[7313] = [4825,23,4825,54]; + lineof_temp[7198] = [4747,6,4750,35]; + lineof_temp[7287] = [4807,12,4807,68]; + lineof_temp[990] = [772,33,772,45]; + lineof_temp[3709] = [2609,14,2609,15]; + lineof_temp[7236] = [4768,10,4768,21]; + lineof_temp[809] = [686,19,686,32]; + lineof_temp[3446] = [2465,4,2465,60]; + lineof_temp[5992] = [4034,10,4034,15]; + lineof_temp[3148] = [2256,10,2256,54]; + lineof_temp[5172] = [3524,6,3524,20]; + lineof_temp[1790] = [1345,12,1345,24]; + lineof_temp[1914] = [1432,18,1432,45]; + lineof_temp[6049] = [4124,24,4124,40]; + lineof_temp[2340] = [1749,4,1749,39]; + lineof_temp[5993] = [4033,24,4033,43]; + lineof_temp[6410] = [4311,12,4311,31]; + lineof_temp[7214] = [4751,4,4751,29]; + lineof_temp[4949] = [3385,22,3385,45]; + lineof_temp[4435] = [2967,19,2967,35]; + lineof_temp[5891] = [3971,10,3971,15]; + lineof_temp[3628] = [2552,12,2565,13]; + lineof_temp[4726] = [3243,14,3243,16]; + lineof_temp[138] = [169,33,169,55]; + lineof_temp[4737] = [3250,15,3250,37]; + lineof_temp[5039] = [3444,20,3447,80]; + lineof_temp[7110] = [4718,6,4718,18]; + lineof_temp[5788] = [3921,4,3921,27]; + lineof_temp[6791] = [4519,22,4519,50]; + lineof_temp[3385] = [2422,20,2422,47]; + lineof_temp[3505] = [2471,4,2471,27]; + lineof_temp[4409] = [2983,17,2983,39]; + lineof_temp[2023] = [1507,38,1507,52]; + lineof_temp[5032] = [3436,20,3440,46]; + lineof_temp[255] = [272,10,272,36]; + lineof_temp[6204] = [4200,12,4200,37]; + lineof_temp[7090] = [4725,10,4725,23]; + lineof_temp[2633] = [1948,12,1953,33]; + lineof_temp[2839] = [2074,11,2074,12]; + lineof_temp[963] = [783,26,784,34]; + lineof_temp[7284] = [4799,4,4799,39]; + lineof_temp[1517] = [1148,2,1149,13]; + lineof_temp[3733] = [2624,15,2624,17]; + lineof_temp[3852] = [2685,4,2685,26]; + lineof_temp[5806] = [3937,18,3937,20]; + lineof_temp[536] = [481,18,481,47]; + lineof_temp[1974] = [1469,20,1469,46]; + lineof_temp[2252] = [1676,10,1676,27]; + lineof_temp[3788] = [2660,10,2660,20]; + lineof_temp[4783] = [3276,14,3276,60]; + lineof_temp[4360] = [3044,23,3044,24]; + lineof_temp[5451] = [3705,6,3706,31]; + lineof_temp[5825] = [3950,4,3950,34]; + lineof_temp[586] = [547,14,547,37]; + lineof_temp[2150] = [1566,2,1566,12]; + lineof_temp[4502] = [3132,27,3132,54]; + lineof_temp[1189] = [942,20,942,66]; + lineof_temp[4356] = [3045,20,3045,35]; + lineof_temp[1753] = [1323,20,1326,96]; + lineof_temp[4866] = [3309,26,3309,38]; + lineof_temp[5944] = [4036,6,4037,17]; + lineof_temp[516] = [493,22,493,49]; + lineof_temp[4462] = [3083,10,3083,20]; + lineof_temp[1134] = [893,34,895,64]; + lineof_temp[1126] = [868,38,868,68]; + lineof_temp[6198] = [4199,22,4199,39]; + lineof_temp[7050] = [4712,10,4712,75]; + lineof_temp[5040] = [3443,18,3447,82]; + lineof_temp[6854] = [4525,10,4560,21]; + lineof_temp[2014] = [1498,10,1498,61]; + lineof_temp[6338] = [4269,23,4269,54]; + lineof_temp[6777] = [4501,4,4501,27]; + lineof_temp[7046] = [4697,24,4697,53]; + lineof_temp[198] = [220,6,220,48]; + lineof_temp[1952] = [1462,2,1462,51]; + lineof_temp[6662] = [4430,31,4430,59]; + lineof_temp[290] = [289,12,290,41]; + lineof_temp[742] = [643,32,643,72]; + lineof_temp[3887] = [2730,24,2730,65]; + lineof_temp[5015] = [3432,20,3432,38]; + lineof_temp[597] = [544,23,544,28]; + lineof_temp[1111] = [855,41,855,61]; + lineof_temp[2034] = [1548,16,1548,28]; + lineof_temp[4154] = [2883,14,2883,55]; + lineof_temp[6046] = [4123,6,4123,17]; + lineof_temp[2006] = [1489,4,1489,28]; + lineof_temp[2305] = [1716,6,1716,36]; + lineof_temp[4109] = [2857,6,2857,18]; + lineof_temp[6448] = [4322,29,4322,45]; + lineof_temp[1196] = [844,8,844,44]; + lineof_temp[1606] = [1208,18,1208,47]; + lineof_temp[3826] = [2643,17,2643,18]; + lineof_temp[5126] = [3476,10,3476,11]; + lineof_temp[451] = [446,8,446,46]; + lineof_temp[4575] = [3163,16,3163,17]; + lineof_temp[43] = [54,10,54,15]; + lineof_temp[5554] = [3792,13,3793,38]; + lineof_temp[2432] = [1841,4,1841,34]; + lineof_temp[2534] = [1957,8,1966,19]; + lineof_temp[4956] = [3388,24,3392,91]; + lineof_temp[1128] = [881,34,881,48]; + lineof_temp[3073] = [2238,23,2238,54]; + lineof_temp[1269] = [953,6,988,7]; + lineof_temp[3194] = [2298,17,2298,44]; + lineof_temp[6710] = [4463,31,4463,42]; + lineof_temp[4742] = [3255,19,3255,32]; + lineof_temp[5896] = [3999,19,3999,59]; + lineof_temp[3612] = [2553,22,2553,36]; + lineof_temp[2428] = [1837,4,1837,29]; + lineof_temp[7075] = [4695,4,4695,44]; + lineof_temp[2865] = [2115,18,2116,56]; + lineof_temp[5560] = [3796,25,3796,47]; + lineof_temp[219] = [241,20,241,50]; + lineof_temp[3281] = [2353,8,2353,18]; + lineof_temp[4278] = [3004,33,3004,45]; + lineof_temp[624] = [563,14,564,58]; + lineof_temp[799] = [685,6,685,23]; + lineof_temp[2287] = [1702,43,1702,53]; + lineof_temp[5274] = [3592,12,3592,27]; + lineof_temp[789] = [621,14,621,15]; + lineof_temp[4722] = [3244,14,3244,39]; + lineof_temp[5064] = [3411,10,3411,12]; + lineof_temp[1730] = [1281,15,1281,50]; + lineof_temp[5438] = [3709,8,3709,77]; + lineof_temp[6635] = [4410,16,4412,64]; + lineof_temp[1532] = [1152,21,1152,36]; + lineof_temp[3447] = [2464,4,2464,24]; + lineof_temp[3781] = [2660,23,2661,67]; + lineof_temp[5159] = [3509,2,3514,24]; + lineof_temp[6252] = [4224,10,4224,22]; + lineof_temp[3170] = [2229,4,2229,24]; + lineof_temp[5413] = [3690,14,3690,26]; + lineof_temp[6552] = [4361,6,4361,15]; + lineof_temp[2690] = [1970,6,1970,77]; + lineof_temp[4574] = [3163,20,3163,62]; + lineof_temp[2047] = [1510,18,1511,44]; + lineof_temp[3774] = [2657,25,2657,53]; + lineof_temp[121] = [148,14,148,29]; + lineof_temp[2639] = [1893,6,1903,8]; + lineof_temp[2299] = [1710,6,1710,24]; + lineof_temp[548] = [509,15,509,50]; + lineof_temp[2935] = [2130,6,2130,17]; + lineof_temp[5125] = [3476,14,3476,36]; + lineof_temp[7139] = [4743,27,4743,69]; + lineof_temp[3541] = [2511,18,2511,23]; + lineof_temp[4479] = [3114,18,3114,31]; + lineof_temp[6632] = [4410,31,4410,43]; + lineof_temp[4474] = [3094,10,3103,33]; + lineof_temp[5728] = [3888,14,3888,32]; + lineof_temp[579] = [540,24,540,44]; + lineof_temp[1121] = [865,32,865,61]; + lineof_temp[3654] = [2499,15,2499,57]; + lineof_temp[6720] = [4460,23,4460,29]; + lineof_temp[5402] = [3682,8,3684,18]; + lineof_temp[5940] = [4037,6,4037,17]; + lineof_temp[5813] = [3934,24,3934,47]; + lineof_temp[628] = [560,8,564,62]; + lineof_temp[2142] = [1581,21,1581,43]; + lineof_temp[3491] = [2487,26,2487,42]; + lineof_temp[5811] = [3940,8,3940,51]; + lineof_temp[449] = [447,14,447,42]; + lineof_temp[6690] = [4460,32,4460,73]; + lineof_temp[7099] = [4729,8,4730,64]; + lineof_temp[7186] = [4750,6,4750,35]; + lineof_temp[4531] = [3133,18,3133,22]; + lineof_temp[1028] = [834,14,834,37]; + lineof_temp[2743] = [2014,2,2014,20]; + lineof_temp[3255] = [2332,4,2333,75]; + lineof_temp[1661] = [1240,12,1240,42]; + lineof_temp[3959] = [2762,45,2762,67]; + lineof_temp[4295] = [3006,16,3006,50]; + lineof_temp[2987] = [2183,48,2183,75]; + lineof_temp[4075] = [2810,28,2810,60]; + lineof_temp[4887] = [3325,12,3325,74]; + lineof_temp[5592] = [3811,10,3811,11]; + lineof_temp[2332] = [1741,4,1741,42]; + lineof_temp[6871] = [4573,12,4573,36]; + lineof_temp[1599] = [1204,14,1204,46]; + lineof_temp[2962] = [2199,16,2199,24]; + lineof_temp[68] = [93,15,93,40]; + lineof_temp[3172] = [2229,4,2276,16]; + lineof_temp[4384] = [3053,14,3056,62]; + lineof_temp[808] = [686,19,686,32]; + lineof_temp[4232] = [2930,6,2930,20]; + lineof_temp[5475] = [3745,22,3745,49]; + lineof_temp[1194] = [939,12,939,47]; + lineof_temp[1270] = [952,18,952,50]; + lineof_temp[105] = [124,14,124,35]; + lineof_temp[6161] = [4180,8,4182,75]; + lineof_temp[4211] = [2908,4,2908,32]; + lineof_temp[4577] = [3163,2,3164,14]; + lineof_temp[6399] = [4301,23,4301,63]; + lineof_temp[3840] = [2685,14,2685,25]; + lineof_temp[2361] = [1772,6,1772,26]; + lineof_temp[4354] = [3044,27,3044,39]; + lineof_temp[2298] = [1692,26,1692,49]; + lineof_temp[4135] = [2873,8,2874,17]; + lineof_temp[357] = [359,2,359,50]; + lineof_temp[764] = [658,20,658,56]; + lineof_temp[6532] = [4349,14,4349,15]; + lineof_temp[297] = [293,12,294,41]; + lineof_temp[1510] = [1124,16,1124,32]; + lineof_temp[3572] = [2526,14,2537,14]; + lineof_temp[3742] = [2643,21,2643,68]; + lineof_temp[7045] = [4696,25,4696,41]; + lineof_temp[615] = [558,18,558,43]; + lineof_temp[1883] = [1410,24,1413,90]; + lineof_temp[3589] = [2512,14,2512,15]; + lineof_temp[3778] = [2658,19,2659,49]; + lineof_temp[2005] = [1490,6,1494,56]; + lineof_temp[3358] = [2374,21,2374,70]; + lineof_temp[5976] = [4076,18,4076,44]; + lineof_temp[6068] = [4124,4,4124,21]; + lineof_temp[2499] = [1889,16,1889,57]; + lineof_temp[4213] = [2912,14,2912,42]; + lineof_temp[5439] = [3712,10,3712,56]; + lineof_temp[6262] = [4232,17,4232,33]; + lineof_temp[6463] = [4322,14,4324,65]; + lineof_temp[1454] = [1107,20,1107,35]; + lineof_temp[3561] = [2533,24,2533,70]; + lineof_temp[5190] = [3562,4,3562,16]; + lineof_temp[5323] = [3615,23,3615,44]; + lineof_temp[4585] = [3161,2,3164,14]; + lineof_temp[5244] = [3575,24,3575,55]; + lineof_temp[1722] = [1294,8,1294,39]; + lineof_temp[2858] = [2104,16,2104,49]; + lineof_temp[3334] = [2395,20,2398,82]; + lineof_temp[4914] = [3348,10,3348,24]; + lineof_temp[2524] = [1965,21,1965,53]; + lineof_temp[2176] = [1614,10,1614,22]; + lineof_temp[2127] = [1597,16,1597,26]; + lineof_temp[4071] = [2811,15,2811,46]; + lineof_temp[4498] = [3129,12,3129,58]; + lineof_temp[4712] = [3238,6,3238,41]; + lineof_temp[4985] = [3410,14,3410,31]; + lineof_temp[754] = [651,30,651,33]; + lineof_temp[1427] = [998,6,1007,8]; + lineof_temp[6872] = [4576,22,4576,50]; + lineof_temp[2629] = [1953,12,1953,33]; + lineof_temp[499] = [474,2,474,42]; + lineof_temp[1314] = [1003,10,1003,22]; + lineof_temp[3700] = [2618,22,2618,59]; + lineof_temp[587] = [550,24,550,27]; + lineof_temp[1378] = [1060,52,1063,59]; + lineof_temp[3351] = [2404,10,2404,33]; + lineof_temp[4569] = [3162,16,3162,49]; + lineof_temp[511] = [502,8,502,19]; + lineof_temp[1130] = [887,46,888,58]; + lineof_temp[3960] = [2762,30,2762,42]; + lineof_temp[4362] = [3044,12,3045,37]; + lineof_temp[5092] = [3464,10,3464,12]; + lineof_temp[4117] = [2867,28,2867,43]; + lineof_temp[5834] = [3960,6,3961,20]; + lineof_temp[7126] = [4735,21,4735,36]; + lineof_temp[7158] = [4737,26,4737,76]; + lineof_temp[289] = [289,12,290,41]; + lineof_temp[2133] = [1589,8,1594,10]; + lineof_temp[2888] = [2102,11,2102,13]; + lineof_temp[5134] = [3498,10,3498,42]; + lineof_temp[3935] = [2746,8,2746,69]; + lineof_temp[6682] = [4441,12,4445,60]; + lineof_temp[7170] = [4734,16,4734,20]; + lineof_temp[3013] = [2181,24,2181,32]; + lineof_temp[3230] = [2299,11,2299,12]; + lineof_temp[2202] = [1647,14,1647,41]; + lineof_temp[5536] = [3771,4,3771,14]; + lineof_temp[5782] = [3918,8,3918,20]; + lineof_temp[6755] = [4474,12,4495,23]; + lineof_temp[1575] = [1194,16,1194,63]; + lineof_temp[1885] = [1408,20,1408,43]; + lineof_temp[4809] = [3284,19,3284,37]; + lineof_temp[4954] = [3389,26,3392,89]; + lineof_temp[1302] = [1003,25,1003,48]; + lineof_temp[5805] = [3937,23,3937,34]; + lineof_temp[2183] = [1627,12,1627,58]; + lineof_temp[6973] = [4675,18,4675,56]; + lineof_temp[2024] = [1507,38,1507,52]; + lineof_temp[2545] = [1916,24,1916,35]; + lineof_temp[2681] = [1985,8,1985,21]; + lineof_temp[4657] = [3210,31,3210,42]; + lineof_temp[1851] = [1391,24,1391,65]; + lineof_temp[5325] = [3615,10,3615,20]; + lineof_temp[215] = [235,16,235,42]; + lineof_temp[2802] = [2050,16,2050,51]; + lineof_temp[3869] = [2705,14,2705,77]; + lineof_temp[4355] = [3044,27,3044,39]; + lineof_temp[5091] = [3464,15,3464,37]; + lineof_temp[7362] = [4836,10,4836,21]; + lineof_temp[1594] = [1184,2,1184,11]; + lineof_temp[2728] = [2012,10,2012,38]; + lineof_temp[5243] = [3574,34,3574,52]; + lineof_temp[5906] = [4006,12,4006,24]; + lineof_temp[65] = [92,12,92,33]; + lineof_temp[600] = [543,10,543,24]; + lineof_temp[3163] = [2233,18,2233,29]; + lineof_temp[6555] = [4360,17,4360,18]; + lineof_temp[837] = [688,13,688,28]; + lineof_temp[3388] = [2420,16,2420,28]; + lineof_temp[4318] = [3021,12,3025,67]; + lineof_temp[5197] = [3544,14,3544,48]; + lineof_temp[6392] = [4299,18,4299,46]; + lineof_temp[816] = [701,8,702,50]; + lineof_temp[3646] = [2544,14,2544,15]; + lineof_temp[3725] = [2626,15,2626,17]; + lineof_temp[4210] = [2909,6,2910,21]; + lineof_temp[4842] = [3305,21,3305,71]; + lineof_temp[2914] = [2132,21,2132,71]; + lineof_temp[4301] = [2996,18,2996,30]; + lineof_temp[6164] = [4178,21,4178,33]; + lineof_temp[539] = [481,6,503,7]; + lineof_temp[5005] = [3417,21,3417,37]; + lineof_temp[6288] = [4233,14,4233,15]; + lineof_temp[7331] = [4821,22,4821,62]; + lineof_temp[1479] = [1116,8,1119,57]; + lineof_temp[1714] = [1283,4,1283,33]; + lineof_temp[3052] = [2211,2,2211,58]; + lineof_temp[4917] = [3351,8,3351,28]; + lineof_temp[5223] = [3548,10,3549,35]; + lineof_temp[3144] = [2259,10,2259,45]; + lineof_temp[6097] = [4151,26,4151,38]; + lineof_temp[6991] = [4660,34,4660,58]; + lineof_temp[593] = [545,22,545,23]; + lineof_temp[2782] = [2031,21,2031,65]; + lineof_temp[6811] = [4532,22,4532,50]; + lineof_temp[841] = [687,15,687,19]; + lineof_temp[1355] = [1032,38,1034,73]; + lineof_temp[1798] = [1350,18,1350,59]; + lineof_temp[7338] = [4820,6,4826,55]; + lineof_temp[6858] = [4568,22,4568,50]; + lineof_temp[3426] = [2369,4,2369,17]; + lineof_temp[1369] = [1047,46,1048,77]; + lineof_temp[2437] = [1848,6,1848,39]; + lineof_temp[2546] = [1916,24,1916,35]; + lineof_temp[3665] = [2585,14,2585,29]; + lineof_temp[5771] = [3915,12,3915,48]; + lineof_temp[1038] = [840,12,843,70]; + lineof_temp[1163] = [855,32,855,38]; + lineof_temp[1886] = [1415,39,1416,60]; + lineof_temp[387] = [392,4,394,38]; + lineof_temp[2159] = [1604,15,1604,69]; + lineof_temp[3610] = [2552,25,2552,36]; + lineof_temp[3469] = [2482,20,2482,29]; + lineof_temp[4344] = [3018,8,3035,8]; + lineof_temp[2070] = [1517,22,1520,58]; + lineof_temp[3434] = [2463,12,2463,39]; + lineof_temp[4337] = [3030,14,3030,35]; + lineof_temp[5966] = [4061,14,4061,42]; + lineof_temp[721] = [624,28,624,63]; + lineof_temp[2626] = [1948,25,1952,71]; + lineof_temp[4845] = [3305,8,3306,20]; + lineof_temp[5606] = [3824,12,3824,64]; + lineof_temp[4838] = [3303,24,3304,49]; + lineof_temp[6067] = [4124,15,4124,21]; + lineof_temp[6137] = [4168,4,4168,69]; + lineof_temp[6442] = [4318,29,4318,45]; + lineof_temp[6838] = [4550,30,4550,55]; + lineof_temp[5890] = [3975,4,3975,19]; + lineof_temp[5248] = [3574,12,3575,59]; + lineof_temp[4839] = [3305,21,3305,71]; + lineof_temp[4366] = [3048,20,3048,49]; + lineof_temp[1632] = [1207,6,1207,16]; + lineof_temp[5486] = [3750,26,3750,55]; + lineof_temp[491] = [452,10,452,11]; + lineof_temp[1701] = [1281,15,1281,50]; + lineof_temp[1741] = [1305,6,1309,56]; + lineof_temp[6883] = [4583,20,4583,44]; + lineof_temp[6604] = [4398,18,4398,37]; + lineof_temp[4052] = [2811,15,2811,46]; + lineof_temp[2219] = [1638,6,1649,7]; + lineof_temp[3785] = [2662,10,2662,29]; + lineof_temp[783] = [674,14,675,74]; + lineof_temp[3893] = [2720,28,2720,56]; + lineof_temp[7117] = [4716,17,4716,18]; + lineof_temp[3486] = [2487,26,2487,42]; + lineof_temp[6356] = [4279,10,4279,48]; + lineof_temp[6741] = [4491,25,4492,63]; + lineof_temp[6026] = [4110,16,4110,48]; + lineof_temp[6525] = [4354,18,4354,53]; + lineof_temp[6792] = [4519,14,4519,52]; + lineof_temp[277] = [285,35,285,61]; + lineof_temp[1651] = [1237,14,1237,29]; + lineof_temp[3524] = [2504,8,2504,60]; + lineof_temp[3906] = [2710,22,2710,50]; + lineof_temp[4663] = [3208,24,3208,43]; + lineof_temp[3931] = [2746,45,2746,65]; + lineof_temp[89] = [88,6,88,23]; + lineof_temp[291] = [288,10,290,43]; + lineof_temp[1061] = [928,22,928,55]; + lineof_temp[79] = [96,49,96,69]; + lineof_temp[470] = [463,18,463,29]; + lineof_temp[833] = [692,6,696,7]; + lineof_temp[3829] = [2642,4,2642,37]; + lineof_temp[1669] = [1250,14,1250,47]; + lineof_temp[4284] = [3004,29,3004,30]; + lineof_temp[6449] = [4323,28,4323,63]; + lineof_temp[666] = [585,6,586,41]; + lineof_temp[715] = [606,16,606,32]; + lineof_temp[1322] = [999,8,999,20]; + lineof_temp[2899] = [2126,14,2126,24]; + lineof_temp[1718] = [1296,16,1296,67]; + lineof_temp[6757] = [4458,12,4458,44]; + lineof_temp[6968] = [4643,14,4643,42]; + lineof_temp[590] = [549,14,549,40]; + lineof_temp[2735] = [2016,19,2016,30]; + lineof_temp[3362] = [2373,8,2373,35]; + lineof_temp[6241] = [4225,22,4225,51]; + lineof_temp[3631] = [2551,12,2551,26]; + lineof_temp[5640] = [3846,18,3846,42]; + lineof_temp[1547] = [1158,2,1165,2]; + lineof_temp[4352] = [3042,12,3042,34]; + lineof_temp[4728] = [3243,6,3244,41]; + lineof_temp[2442] = [1851,4,1851,27]; + lineof_temp[2903] = [2128,14,2128,34]; + lineof_temp[3307] = [2375,28,2375,66]; + lineof_temp[3309] = [2377,20,2377,35]; + lineof_temp[3698] = [2615,12,2615,35]; + lineof_temp[6218] = [4212,10,4212,48]; + lineof_temp[1065] = [909,27,909,59]; + lineof_temp[3122] = [2271,27,2273,66]; + lineof_temp[4598] = [3170,19,3170,43]; + lineof_temp[6824] = [4542,34,4542,57]; + lineof_temp[6958] = [4634,12,4634,36]; + lineof_temp[672] = [593,10,593,38]; + lineof_temp[4447] = [3079,16,3079,37]; + lineof_temp[4938] = [3378,36,3382,98]; + lineof_temp[3048] = [2206,12,2206,51]; + lineof_temp[6101] = [4151,10,4151,23]; + lineof_temp[3243] = [2329,21,2330,57]; + lineof_temp[5057] = [3433,10,3433,35]; + lineof_temp[5523] = [3762,10,3762,12]; + lineof_temp[3901] = [2714,24,2714,52]; + lineof_temp[3984] = [2782,23,2782,51]; + lineof_temp[1087] = [915,34,915,51]; + lineof_temp[4933] = [3374,32,3374,59]; + lineof_temp[5466] = [3724,6,3724,20]; + lineof_temp[6592] = [4388,14,4388,26]; + lineof_temp[4461] = [3083,18,3083,20]; + lineof_temp[1792] = [1345,12,1348,75]; + lineof_temp[156] = [163,24,163,39]; + lineof_temp[2261] = [1683,14,1683,26]; + lineof_temp[2404] = [1813,4,1813,39]; + lineof_temp[1866] = [1393,16,1393,70]; + lineof_temp[4379] = [3049,10,3049,32]; + lineof_temp[4752] = [3253,12,3253,40]; + lineof_temp[4978] = [3401,4,3401,29]; + lineof_temp[941] = [802,24,806,76]; + lineof_temp[3034] = [2156,6,2159,8]; + lineof_temp[4650] = [3193,10,3193,15]; + lineof_temp[2509] = [1894,21,1901,72]; + lineof_temp[3368] = [2416,27,2416,74]; + lineof_temp[4402] = [2972,18,2972,36]; + lineof_temp[4820] = [3289,14,3289,16]; + lineof_temp[7273] = [4793,4,4793,28]; + lineof_temp[1963] = [1471,10,1471,57]; + lineof_temp[517] = [492,22,492,68]; + lineof_temp[1818] = [1364,28,1365,43]; + lineof_temp[971] = [790,22,794,74]; + lineof_temp[1702] = [1284,20,1284,46]; + lineof_temp[7089] = [4725,10,4725,23]; + lineof_temp[2616] = [1938,14,1938,39]; + lineof_temp[2843] = [2067,22,2067,69]; + lineof_temp[4057] = [2823,8,2823,41]; + lineof_temp[1146] = [866,38,866,55]; + lineof_temp[4151] = [2881,14,2881,56]; + lineof_temp[6920] = [4609,26,4609,36]; + lineof_temp[2777] = [2039,18,2039,46]; + lineof_temp[3238] = [2290,2,2290,19]; + lineof_temp[6256] = [4219,6,4219,31]; + lineof_temp[1731] = [1281,11,1281,12]; + lineof_temp[4516] = [3144,10,3144,22]; + lineof_temp[3082] = [2238,19,2238,20]; + lineof_temp[7229] = [4772,12,4772,50]; + lineof_temp[67] = [93,15,93,40]; + lineof_temp[1099] = [908,30,908,35]; + lineof_temp[3810] = [2670,18,2670,27]; + lineof_temp[1725] = [1292,15,1292,18]; + lineof_temp[2726] = [2007,19,2007,30]; + lineof_temp[5489] = [3752,24,3752,38]; + lineof_temp[3638] = [2547,10,2566,11]; + lineof_temp[7218] = [4765,20,4765,48]; + lineof_temp[2345] = [1756,6,1756,29]; + lineof_temp[2645] = [1969,15,1969,58]; + lineof_temp[6353] = [4276,14,4276,30]; + lineof_temp[6385] = [4291,10,4292,48]; + lineof_temp[7028] = [4684,8,4684,31]; + lineof_temp[1988] = [1465,37,1465,60]; + lineof_temp[4451] = [3078,8,3078,22]; + lineof_temp[5054] = [3450,16,3451,35]; + lineof_temp[2642] = [1890,6,1890,67]; + lineof_temp[2596] = [1932,31,1932,46]; + lineof_temp[2813] = [2056,8,2058,69]; + lineof_temp[5953] = [4043,12,4046,96]; + lineof_temp[6782] = [4515,22,4515,50]; + lineof_temp[2300] = [1709,4,1709,29]; + lineof_temp[3405] = [2435,14,2435,38]; + lineof_temp[342] = [343,17,343,32]; + lineof_temp[1522] = [1146,28,1146,40]; + lineof_temp[2625] = [1948,25,1952,71]; + lineof_temp[2525] = [1965,21,1965,53]; + lineof_temp[4684] = [3218,6,3218,11]; + lineof_temp[3201] = [2320,19,2321,57]; + lineof_temp[6450] = [4323,28,4323,63]; + lineof_temp[1675] = [1227,11,1227,12]; + lineof_temp[3894] = [2720,28,2720,56]; + lineof_temp[3514] = [2457,11,2457,14]; + lineof_temp[801] = [705,8,705,22]; + lineof_temp[2882] = [2105,6,2105,12]; + lineof_temp[1929] = [1448,24,1448,34]; + lineof_temp[7160] = [4737,26,4737,76]; + lineof_temp[1847] = [1385,20,1385,49]; + lineof_temp[2348] = [1757,4,1757,39]; + lineof_temp[6717] = [4462,16,4468,17]; + lineof_temp[1357] = [1029,51,1029,71]; + lineof_temp[4342] = [3018,20,3018,22]; + lineof_temp[3070] = [2214,22,2214,38]; + lineof_temp[6847] = [4530,20,4557,26]; + lineof_temp[7176] = [4733,6,4745,7]; + lineof_temp[293] = [293,35,293,61]; + lineof_temp[7141] = [4743,27,4743,69]; + lineof_temp[1256] = [964,14,964,32]; + lineof_temp[6806] = [4559,26,4559,54]; + lineof_temp[4959] = [3366,32,3366,44]; + lineof_temp[5776] = [3913,8,3915,64]; + lineof_temp[6365] = [4281,10,4281,22]; + lineof_temp[3173] = [2228,2,2276,18]; + lineof_temp[6810] = [4531,22,4531,62]; + lineof_temp[230] = [233,12,233,27]; + lineof_temp[1635] = [1206,15,1206,17]; + lineof_temp[3022] = [2171,12,2171,45]; + lineof_temp[7055] = [4703,18,4703,64]; + lineof_temp[114] = [135,4,135,24]; + lineof_temp[2801] = [2050,16,2050,51]; + lineof_temp[1868] = [1389,20,1389,25]; + lineof_temp[5738] = [3891,4,3891,39]; + lineof_temp[252] = [265,4,265,24]; + lineof_temp[7159] = [4738,8,4738,28]; + lineof_temp[547] = [509,15,509,50]; + lineof_temp[1373] = [1041,40,1041,60]; + lineof_temp[4120] = [2866,6,2867,75]; + lineof_temp[2760] = [2034,26,2034,66]; + lineof_temp[4925] = [3360,20,3360,62]; + lineof_temp[5284] = [3586,4,3586,20]; + lineof_temp[6211] = [4189,14,4189,20]; + lineof_temp[7227] = [4772,20,4772,48]; + lineof_temp[538] = [481,6,481,15]; + lineof_temp[636] = [535,10,535,11]; + lineof_temp[1461] = [1110,23,1112,75]; + lineof_temp[6733] = [4494,28,4494,56]; + lineof_temp[1811] = [1360,20,1360,66]; + lineof_temp[6492] = [4336,14,4336,30]; + lineof_temp[3325] = [2385,26,2385,35]; + lineof_temp[4536] = [3132,10,3132,24]; + lineof_temp[1794] = [1343,8,1343,31]; + lineof_temp[5319] = [3618,12,3618,27]; + lineof_temp[7275] = [4797,14,4797,30]; + lineof_temp[3487] = [2487,26,2487,42]; + lineof_temp[1840] = [1376,2,1377,29]; + lineof_temp[4950] = [3391,30,3391,57]; + lineof_temp[1207] = [953,20,953,39]; + lineof_temp[2091] = [1500,10,1500,47]; + lineof_temp[2392] = [1801,4,1801,50]; + lineof_temp[5247] = [3574,54,3574,68]; + lineof_temp[949] = [810,34,810,52]; + lineof_temp[1858] = [1394,33,1394,72]; + lineof_temp[2747] = [2006,17,2006,47]; + lineof_temp[2974] = [2163,22,2163,65]; + lineof_temp[3252] = [2332,17,2332,67]; + lineof_temp[6501] = [4344,10,4344,24]; + lineof_temp[18] = [27,4,27,19]; + lineof_temp[2797] = [2043,6,2043,47]; + lineof_temp[5292] = [3605,10,3605,38]; + lineof_temp[5434] = [3705,6,3706,31]; + lineof_temp[7305] = [4817,6,4817,50]; + lineof_temp[3662] = [2577,4,2577,27]; + lineof_temp[3622] = [2555,14,2555,45]; + lineof_temp[7306] = [4816,4,4816,26]; + lineof_temp[3507] = [2460,2,2469,4]; + lineof_temp[3808] = [2668,23,2669,67]; + lineof_temp[3883] = [2732,32,2732,41]; + lineof_temp[3873] = [2712,18,2713,52]; + lineof_temp[2854] = [2103,18,2103,46]; + lineof_temp[5725] = [3886,6,3886,34]; + lineof_temp[3664] = [2580,24,2580,60]; + lineof_temp[4496] = [3129,20,3129,56]; + lineof_temp[258] = [271,8,272,37]; + lineof_temp[2450] = [1860,6,1860,31]; + lineof_temp[3345] = [2403,20,2403,29]; + lineof_temp[2779] = [2039,10,2039,48]; + lineof_temp[7042] = [4682,6,4682,33]; + lineof_temp[2931] = [2135,10,2135,12]; + lineof_temp[2533] = [1957,8,1957,18]; + lineof_temp[5713] = [3881,14,3881,15]; + lineof_temp[3744] = [2645,48,2645,72]; + lineof_temp[6084] = [4145,21,4145,23]; + lineof_temp[7187] = [4749,21,4749,36]; + lineof_temp[1549] = [1171,14,1171,51]; + lineof_temp[478] = [460,18,460,50]; + lineof_temp[4735] = [3235,25,3235,46]; + lineof_temp[2155] = [1604,15,1604,69]; + lineof_temp[6598] = [4397,28,4397,62]; + lineof_temp[7109] = [4718,14,4718,18]; + lineof_temp[4412] = [2983,13,2983,14]; + lineof_temp[818] = [700,6,702,52]; + lineof_temp[2683] = [1984,8,1984,35]; + lineof_temp[6503] = [4340,14,4340,15]; + lineof_temp[1023] = [725,4,829,4]; + lineof_temp[2090] = [1500,18,1500,45]; + lineof_temp[414] = [413,6,413,37]; + lineof_temp[682] = [598,10,598,30]; + lineof_temp[3592] = [2511,6,2511,15]; + lineof_temp[3981] = [2782,60,2782,69]; + lineof_temp[4843] = [3305,17,3305,18]; + lineof_temp[1538] = [1160,4,1160,33]; + lineof_temp[2492] = [1882,16,1882,37]; + lineof_temp[6019] = [4100,12,4103,99]; + lineof_temp[6913] = [4606,32,4606,70]; + lineof_temp[2141] = [1582,10,1582,13]; + lineof_temp[4624] = [3186,24,3186,48]; + lineof_temp[7069] = [4697,6,4697,21]; + lineof_temp[7264] = [4784,8,4784,33]; + lineof_temp[831] = [697,6,697,16]; + lineof_temp[1167] = [901,32,901,62]; + lineof_temp[6925] = [4584,18,4612,28]; + lineof_temp[504] = [472,21,472,36]; + lineof_temp[4778] = [3271,17,3271,18]; + lineof_temp[4794] = [3285,19,3285,41]; + lineof_temp[3761] = [2649,17,2649,19]; + lineof_temp[2193] = [1609,2,1609,12]; + lineof_temp[5428] = [3697,4,3697,14]; + lineof_temp[7232] = [4770,12,4770,46]; + lineof_temp[3464] = [2479,12,2479,45]; + lineof_temp[3653] = [2500,2,2506,4]; + lineof_temp[3540] = [2511,18,2511,23]; + lineof_temp[6293] = [4244,14,4244,30]; + lineof_temp[6362] = [4282,10,4282,48]; + lineof_temp[1252] = [963,28,963,57]; + lineof_temp[6174] = [4186,14,4186,31]; + lineof_temp[1073] = [914,28,914,33]; + lineof_temp[1600] = [1204,14,1204,46]; + lineof_temp[5403] = [3682,8,3684,18]; + lineof_temp[7133] = [4740,27,4740,49]; + lineof_temp[1770] = [1317,24,1317,25]; + lineof_temp[1228] = [970,26,970,34]; + lineof_temp[5761] = [3906,6,3906,42]; + lineof_temp[36] = [35,30,35,46]; + lineof_temp[1695] = [1277,10,1277,52]; + lineof_temp[3158] = [2244,12,2244,28]; + lineof_temp[4349] = [3039,10,3039,33]; + lineof_temp[4944] = [3370,26,3384,32]; + lineof_temp[6995] = [4662,34,4662,59]; + lineof_temp[213] = [232,14,232,40]; + lineof_temp[1449] = [1095,6,1102,10]; + lineof_temp[4038] = [2806,15,2806,27]; + lineof_temp[5310] = [3618,40,3618,47]; + lineof_temp[6615] = [4405,20,4405,58]; + lineof_temp[2543] = [1911,29,1915,75]; + lineof_temp[4256] = [2956,6,2956,30]; + lineof_temp[2225] = [1652,8,1655,94]; + lineof_temp[5097] = [3476,14,3476,36]; + lineof_temp[5574] = [3791,10,3793,39]; + lineof_temp[5026] = [3439,46,3439,60]; + lineof_temp[3311] = [2378,18,2378,62]; + lineof_temp[5703] = [3873,14,3873,42]; + lineof_temp[1033] = [842,16,842,43]; + lineof_temp[6382] = [4291,25,4291,74]; + lineof_temp[6864] = [4570,14,4570,52]; + lineof_temp[2689] = [1971,6,1979,8]; + lineof_temp[2956] = [2157,8,2158,69]; + lineof_temp[5541] = [3780,8,3780,56]; + lineof_temp[875] = [738,10,738,24]; + lineof_temp[2932] = [2131,6,2134,8]; + lineof_temp[4203] = [2909,20,2909,37]; + lineof_temp[135] = [168,31,168,53]; + lineof_temp[6139] = [4166,22,4166,24]; + lineof_temp[850] = [721,15,721,36]; + lineof_temp[4125] = [2870,28,2870,43]; + lineof_temp[4795] = [3285,19,3285,41]; + lineof_temp[6837] = [4551,32,4551,70]; + lineof_temp[3043] = [2149,4,2149,21]; + lineof_temp[881] = [729,12,729,15]; + lineof_temp[4030] = [2798,10,2798,12]; + lineof_temp[3817] = [2665,23,2666,67]; + lineof_temp[6187] = [4193,14,4193,55]; + lineof_temp[6086] = [4145,10,4146,22]; + lineof_temp[7340] = [4819,15,4819,19]; + lineof_temp[7322] = [4824,6,4826,55]; + lineof_temp[125] = [156,22,156,37]; + lineof_temp[973] = [781,26,781,27]; + lineof_temp[1042] = [850,51,850,76]; + lineof_temp[3966] = [2767,4,2767,17]; + lineof_temp[5652] = [3851,21,3851,68]; + lineof_temp[1514] = [1148,15,1148,17]; + lineof_temp[2327] = [1738,6,1738,31]; + lineof_temp[6580] = [4382,20,4382,36]; + lineof_temp[6961] = [4637,14,4637,52]; + lineof_temp[227] = [238,18,238,48]; + lineof_temp[5965] = [4048,14,4048,67]; + lineof_temp[2378] = [1787,4,1787,43]; + lineof_temp[5496] = [3750,16,3750,56]; + lineof_temp[5192] = [3537,16,3537,28]; + lineof_temp[5762] = [3905,4,3905,36]; + lineof_temp[6747] = [4481,25,4483,71]; + lineof_temp[1219] = [962,16,962,48]; + lineof_temp[4373] = [3046,10,3046,40]; + lineof_temp[5359] = [3653,22,3653,30]; + lineof_temp[3531] = [2501,17,2501,57]; + lineof_temp[6194] = [4197,22,4197,39]; + lineof_temp[7004] = [4671,36,4671,64]; + lineof_temp[546] = [477,26,477,41]; + lineof_temp[2863] = [2116,20,2116,48]; + lineof_temp[150] = [174,30,174,44]; + lineof_temp[4003] = [2787,15,2787,43]; + lineof_temp[607] = [541,17,541,19]; + lineof_temp[3965] = [2768,6,2768,20]; + lineof_temp[7207] = [4756,24,4756,41]; + lineof_temp[1691] = [1257,4,1271,23]; + lineof_temp[6612] = [4402,18,4402,42]; + lineof_temp[6835] = [4551,40,4551,68]; + lineof_temp[7064] = [4706,10,4706,38]; + lineof_temp[2289] = [1702,14,1702,54]; + lineof_temp[6640] = [4408,14,4408,43]; + lineof_temp[194] = [220,7,220,25]; + lineof_temp[5305] = [3616,18,3616,46]; + lineof_temp[6649] = [4421,10,4421,32]; + lineof_temp[6952] = [4630,12,4630,31]; + lineof_temp[87] = [91,8,93,76]; + lineof_temp[5455] = [3690,10,3690,11]; + lineof_temp[1243] = [977,18,977,28]; + lineof_temp[4628] = [3186,24,3186,48]; + lineof_temp[2976] = [2169,20,2169,47]; + lineof_temp[1744] = [1310,4,1310,31]; + lineof_temp[4955] = [3389,26,3392,89]; + lineof_temp[5072] = [3409,14,3409,16]; + lineof_temp[705] = [611,19,611,57]; + lineof_temp[5635] = [3837,2,3838,64]; + lineof_temp[3077] = [2243,18,2243,48]; + lineof_temp[4686] = [3216,15,3216,37]; + lineof_temp[5522] = [3762,15,3762,36]; + lineof_temp[5645] = [3846,6,3847,17]; + lineof_temp[2157] = [1605,10,1605,54]; + lineof_temp[3861] = [2696,10,2696,24]; + lineof_temp[4787] = [3275,10,3278,53]; + lineof_temp[1096] = [911,24,911,51]; + lineof_temp[3500] = [2492,8,2492,31]; + lineof_temp[3974] = [2777,20,2777,31]; + lineof_temp[6600] = [4396,18,4396,38]; + lineof_temp[6830] = [4547,44,4547,72]; + lineof_temp[6295] = [4247,18,4247,46]; + lineof_temp[6652] = [4435,8,4435,46]; + lineof_temp[1507] = [1141,6,1141,17]; + lineof_temp[2557] = [1920,33,1922,73]; + lineof_temp[1862] = [1394,33,1394,72]; + lineof_temp[4553] = [3126,14,3126,15]; + lineof_temp[4683] = [3219,4,3219,16]; + lineof_temp[6199] = [4199,14,4199,41]; + lineof_temp[1193] = [940,14,944,75]; + lineof_temp[5837] = [3963,24,3963,39]; + lineof_temp[2417] = [1828,6,1828,38]; + lineof_temp[924] = [799,25,799,58]; + lineof_temp[5033] = [3436,20,3440,46]; + lineof_temp[6627] = [4412,16,4412,64]; + lineof_temp[4058] = [2826,10,2826,44]; + lineof_temp[5038] = [3444,20,3447,80]; + lineof_temp[571] = [509,2,530,2]; + lineof_temp[2909] = [2132,21,2132,71]; + lineof_temp[2989] = [2183,21,2183,76]; + lineof_temp[1204] = [950,23,950,66]; + lineof_temp[1331] = [1015,26,1015,54]; + lineof_temp[3780] = [2661,25,2661,53]; + lineof_temp[3737] = [2607,10,2607,11]; + lineof_temp[6565] = [4369,4,4369,37]; + lineof_temp[5154] = [3511,2,3511,62]; + lineof_temp[4562] = [3159,18,3159,60]; + lineof_temp[5019] = [3436,41,3436,55]; + lineof_temp[2218] = [1638,6,1638,18]; + lineof_temp[6165] = [4178,17,4178,18]; + lineof_temp[692] = [603,10,603,31]; + lineof_temp[1214] = [960,20,960,28]; + lineof_temp[1746] = [1316,36,1316,50]; + lineof_temp[2237] = [1665,18,1665,61]; + lineof_temp[3566] = [2531,18,2535,156]; + lineof_temp[4520] = [3143,10,3144,22]; + lineof_temp[6458] = [4323,14,4323,25]; + lineof_temp[2197] = [1635,15,1635,50]; + lineof_temp[3749] = [2646,22,2647,66]; + lineof_temp[5697] = [3869,6,3869,46]; + lineof_temp[2512] = [1894,8,1902,19]; + lineof_temp[6393] = [4299,18,4299,46]; + lineof_temp[6348] = [4268,8,4268,33]; + lineof_temp[2235] = [1661,10,1661,20]; + lineof_temp[5417] = [3697,17,3697,39]; + lineof_temp[6834] = [4536,30,4536,53]; + lineof_temp[25] = [42,6,42,17]; + lineof_temp[3161] = [2233,21,2233,28]; + lineof_temp[3886] = [2730,32,2730,63]; + lineof_temp[910] = [759,20,760,52]; + lineof_temp[1779] = [1335,14,1338,109]; + lineof_temp[1986] = [1466,2,1466,12]; + lineof_temp[1616] = [1215,21,1215,24]; + lineof_temp[2033] = [1549,20,1549,66]; + lineof_temp[2200] = [1639,10,1640,61]; + lineof_temp[6401] = [4301,10,4301,20]; + lineof_temp[2890] = [2102,2,2120,3]; + lineof_temp[2972] = [2194,18,2194,26]; + lineof_temp[4022] = [2801,10,2801,26]; + lineof_temp[4049] = [2805,2,2807,26]; + lineof_temp[6359] = [4281,25,4281,74]; + lineof_temp[3335] = [2395,20,2398,82]; + lineof_temp[5423] = [3700,6,3700,53]; + lineof_temp[4561] = [3159,18,3159,60]; + lineof_temp[5250] = [3573,10,3575,61]; + lineof_temp[760] = [647,20,647,52]; + lineof_temp[3314] = [2377,10,2377,36]; + lineof_temp[2918] = [2131,19,2131,30]; + lineof_temp[4497] = [3129,20,3129,56]; + lineof_temp[864] = [734,20,734,60]; + lineof_temp[1932] = [1429,20,1429,21]; + lineof_temp[3770] = [2644,19,2644,31]; + lineof_temp[825] = [697,19,697,52]; + lineof_temp[4819] = [3289,19,3289,41]; + lineof_temp[6317] = [4256,8,4256,31]; + lineof_temp[1259] = [963,14,963,25]; + lineof_temp[2244] = [1665,10,1665,62]; + lineof_temp[6732] = [4494,28,4494,56]; + lineof_temp[3130] = [2271,12,2274,69]; + lineof_temp[6321] = [4260,18,4260,43]; + lineof_temp[2045] = [1510,38,1510,52]; + lineof_temp[3237] = [2291,2,2296,4]; + lineof_temp[5483] = [3748,29,3749,57]; + lineof_temp[6326] = [4259,10,4260,45]; + lineof_temp[6540] = [4360,21,4360,37]; + lineof_temp[2116] = [1571,10,1574,91]; + lineof_temp[6750] = [4481,12,4495,23]; + lineof_temp[2559] = [1918,29,1922,75]; + lineof_temp[4848] = [3303,8,3303,21]; + lineof_temp[674] = [593,2,593,40]; + lineof_temp[96] = [103,29,103,45]; + lineof_temp[1924] = [1435,20,1442,22]; + lineof_temp[2057] = [1532,28,1532,70]; + lineof_temp[2540] = [1914,35,1915,71]; + lineof_temp[3789] = [2660,10,2662,29]; + lineof_temp[4666] = [3208,6,3210,76]; + lineof_temp[5500] = [3748,16,3752,40]; + lineof_temp[2508] = [1902,8,1902,19]; + lineof_temp[3913] = [2703,18,2703,26]; + lineof_temp[1045] = [852,22,852,44]; + lineof_temp[2180] = [1612,10,1612,34]; + lineof_temp[6616] = [4404,18,4404,43]; + lineof_temp[7240] = [4759,4,4759,45]; + lineof_temp[2418] = [1827,4,1827,43]; + lineof_temp[6395] = [4298,8,4298,31]; + lineof_temp[4543] = [3127,8,3127,21]; + lineof_temp[6954] = [4633,22,4633,50]; + lineof_temp[7135] = [4741,26,4741,50]; + lineof_temp[4877] = [3297,4,3297,18]; + lineof_temp[1008] = [753,20,753,38]; + lineof_temp[2619] = [1952,33,1952,66]; + lineof_temp[4118] = [2867,8,2867,73]; + lineof_temp[4168] = [2889,6,2890,72]; + lineof_temp[2177] = [1614,10,1617,93]; + lineof_temp[1991] = [1484,10,1484,67]; + lineof_temp[663] = [585,19,585,57]; + lineof_temp[847] = [722,12,722,66]; + lineof_temp[1324] = [998,17,998,47]; + lineof_temp[6551] = [4361,14,4361,15]; + lineof_temp[3219] = [2310,13,2310,16]; + lineof_temp[3593] = [2511,6,2541,6]; + lineof_temp[299] = [292,10,294,43]; + lineof_temp[2521] = [1958,23,1958,36]; + lineof_temp[2835] = [2083,4,2084,12]; + lineof_temp[98] = [117,4,117,24]; + lineof_temp[214] = [232,14,232,40]; + lineof_temp[630] = [559,6,564,64]; + lineof_temp[1796] = [1350,31,1350,58]; + lineof_temp[1921] = [1443,32,1443,34]; + lineof_temp[6866] = [4572,14,4572,26]; + lineof_temp[769] = [640,22,640,25]; + lineof_temp[1931] = [1447,14,1447,50]; + lineof_temp[4730] = [3242,14,3242,16]; + lineof_temp[1515] = [1148,11,1148,12]; + lineof_temp[5929] = [4010,8,4010,41]; + lineof_temp[4699] = [3231,12,3231,13]; + lineof_temp[5534] = [3768,4,3768,17]; + lineof_temp[3166] = [2231,18,2231,24]; + lineof_temp[1531] = [1153,2,1154,60]; + lineof_temp[2248] = [1674,18,1674,61]; + lineof_temp[2555] = [1921,35,1922,71]; + lineof_temp[4510] = [3142,25,3142,55]; + lineof_temp[5395] = [3679,21,3679,72]; + lineof_temp[6981] = [4654,34,4654,54]; + lineof_temp[473] = [465,18,465,41]; + lineof_temp[6529] = [4353,10,4353,23]; + lineof_temp[6989] = [4658,34,4658,57]; + lineof_temp[3024] = [2163,22,2163,65]; + lineof_temp[4814] = [3289,19,3289,41]; + lineof_temp[5608] = [3824,4,3824,66]; + lineof_temp[3107] = [2255,12,2255,55]; + lineof_temp[4389] = [3037,20,3037,41]; + lineof_temp[6135] = [4168,12,4168,67]; + lineof_temp[2530] = [1965,8,1966,19]; + lineof_temp[5742] = [3893,4,3893,36]; + lineof_temp[6351] = [4263,4,4263,48]; + lineof_temp[598] = [544,12,544,28]; + lineof_temp[1137] = [890,32,890,47]; + lineof_temp[2848] = [2088,10,2088,57]; + lineof_temp[3716] = [2629,18,2629,52]; + lineof_temp[5321] = [3617,14,3617,15]; + lineof_temp[5379] = [3667,15,3667,36]; + lineof_temp[4260] = [2961,8,2961,26]; + lineof_temp[2494] = [1882,8,1882,39]; + lineof_temp[2765] = [2037,18,2037,56]; + lineof_temp[3570] = [2526,24,2526,25]; + lineof_temp[4937] = [3378,36,3378,48]; + lineof_temp[5349] = [3642,14,3645,31]; + lineof_temp[6861] = [4567,12,4567,32]; + lineof_temp[4476] = [3105,25,3105,57]; + lineof_temp[4898] = [3343,15,3343,74]; + lineof_temp[4980] = [3347,15,3347,44]; + lineof_temp[6178] = [4185,17,4185,18]; + lineof_temp[3633] = [2549,12,2549,43]; + lineof_temp[1221] = [967,20,968,34]; + lineof_temp[3599] = [2547,36,2547,56]; + lineof_temp[6056] = [4128,4,4128,30]; + lineof_temp[410] = [399,22,399,37]; + lineof_temp[679] = [591,17,591,29]; + lineof_temp[4201] = [2906,4,2906,29]; + lineof_temp[4800] = [3287,6,3287,25]; + lineof_temp[6205] = [4191,18,4191,19]; + lineof_temp[6352] = [4276,14,4276,30]; + lineof_temp[3328] = [2384,20,2384,28]; + lineof_temp[3506] = [2470,6,2470,9]; + lineof_temp[3359] = [2374,17,2374,18]; + lineof_temp[5093] = [3464,2,3464,12]; + lineof_temp[5565] = [3796,20,3796,22]; + lineof_temp[5753] = [3900,6,3900,35]; + lineof_temp[61] = [88,6,88,23]; + lineof_temp[472] = [462,8,462,39]; + lineof_temp[595] = [545,12,552,12]; + lineof_temp[1498] = [1135,18,1135,36]; + lineof_temp[1686] = [1264,16,1264,61]; + lineof_temp[2924] = [2138,21,2138,72]; + lineof_temp[6394] = [4299,10,4299,48]; + lineof_temp[6548] = [4365,8,4365,41]; + lineof_temp[3818] = [2665,19,2665,20]; + lineof_temp[4532] = [3133,10,3133,22]; + lineof_temp[4711] = [3238,14,3238,39]; + lineof_temp[113] = [136,6,136,20]; + lineof_temp[2282] = [1700,25,1701,61]; + lineof_temp[3908] = [2708,16,2709,50]; + lineof_temp[5388] = [3675,4,3675,15]; + lineof_temp[1170] = [900,22,900,32]; + lineof_temp[1420] = [1014,14,1078,61]; + lineof_temp[1805] = [1354,18,1354,40]; + lineof_temp[709] = [611,19,611,57]; + lineof_temp[112] = [115,29,115,45]; + lineof_temp[3401] = [2429,14,2433,94]; + lineof_temp[4618] = [3174,4,3174,14]; + lineof_temp[5988] = [4039,14,4039,15]; + lineof_temp[3695] = [2616,22,2616,50]; + lineof_temp[4986] = [3410,14,3410,31]; + lineof_temp[5862] = [3973,21,3973,61]; + lineof_temp[1634] = [1206,20,1206,63]; + lineof_temp[4392] = [3037,8,3058,8]; + lineof_temp[4089] = [2844,8,2844,35]; + lineof_temp[524] = [486,20,486,21]; + lineof_temp[3767] = [2646,8,2646,19]; + lineof_temp[4758] = [3251,2,3257,3]; + lineof_temp[5356] = [3656,16,3657,23]; + lineof_temp[4478] = [3114,18,3114,31]; + lineof_temp[6568] = [4379,16,4379,44]; + lineof_temp[5058] = [3424,16,3424,18]; + lineof_temp[6400] = [4301,19,4301,20]; + lineof_temp[7071] = [4696,25,4696,41]; + lineof_temp[1825] = [1356,18,1356,28]; + lineof_temp[1685] = [1265,22,1265,34]; + lineof_temp[1839] = [1376,2,1376,16]; + lineof_temp[1105] = [906,20,906,35]; + lineof_temp[3594] = [2510,4,2510,43]; + lineof_temp[6343] = [4270,10,4270,51]; + lineof_temp[6749] = [4481,12,4481,22]; + lineof_temp[7142] = [4743,22,4743,24]; + lineof_temp[3529] = [2503,6,2505,59]; + lineof_temp[3619] = [2564,14,2564,25]; + lineof_temp[4587] = [3160,12,3160,16]; + lineof_temp[5071] = [3409,19,3409,31]; + lineof_temp[5680] = [3861,14,3861,72]; + lineof_temp[510] = [482,10,482,59]; + lineof_temp[594] = [545,12,545,23]; + lineof_temp[6754] = [4474,12,4474,27]; + lineof_temp[2659] = [1978,8,1978,19]; + lineof_temp[4432] = [2969,4,2969,19]; + lineof_temp[3085] = [2236,18,2236,28]; + lineof_temp[4047] = [2805,10,2805,12]; + lineof_temp[327] = [310,10,310,15]; + lineof_temp[4890] = [3329,14,3329,40]; + lineof_temp[41] = [58,6,58,20]; + lineof_temp[2076] = [1540,20,1540,47]; + lineof_temp[2996] = [2185,26,2185,53]; + lineof_temp[957] = [787,32,787,63]; + lineof_temp[3382] = [2413,14,2413,29]; + lineof_temp[1935] = [1386,8,1424,10]; + lineof_temp[3798] = [2664,19,2664,77]; + lineof_temp[3922] = [2693,2,2740,13]; + lineof_temp[5531] = [3769,14,3769,16]; + lineof_temp[6638] = [4409,16,4409,27]; + lineof_temp[2154] = [1604,15,1604,69]; + lineof_temp[2542] = [1912,31,1912,44]; + lineof_temp[6713] = [4463,16,4468,17]; + lineof_temp[2595] = [1933,20,1933,35]; + lineof_temp[3674] = [2586,12,2586,20]; + lineof_temp[4676] = [3221,16,3221,38]; + lineof_temp[469] = [463,18,463,29]; + lineof_temp[3047] = [2206,33,2206,50]; + lineof_temp[5118] = [3482,6,3489,6]; + lineof_temp[177] = [200,6,200,37]; + lineof_temp[3342] = [2382,20,2382,25]; + lineof_temp[6848] = [4530,20,4557,26]; + lineof_temp[2955] = [2157,8,2157,18]; + lineof_temp[4744] = [3256,12,3256,59]; + lineof_temp[6419] = [4316,14,4316,65]; + lineof_temp[2169] = [1621,12,1622,61]; + lineof_temp[2906] = [2129,19,2129,27]; + lineof_temp[336] = [333,4,333,32]; + lineof_temp[5517] = [3722,2,3731,4]; + lineof_temp[621] = [564,18,564,56]; + lineof_temp[3333] = [2395,20,2395,32]; + lineof_temp[3578] = [2518,10,2518,20]; + lineof_temp[3384] = [2412,12,2412,28]; + lineof_temp[6851] = [4527,44,4527,57]; + lineof_temp[1698] = [1275,2,1275,39]; + lineof_temp[4294] = [3007,22,3007,34]; + lineof_temp[5870] = [3981,16,3981,62]; + lineof_temp[2] = [16,7,16,28]; + lineof_temp[3445] = [2466,4,2468,34]; + lineof_temp[4369] = [3047,24,3047,35]; + lineof_temp[5700] = [3871,14,3871,47]; + lineof_temp[6420] = [4315,28,4315,63]; + lineof_temp[5724] = [3886,14,3886,32]; + lineof_temp[6162] = [4180,8,4182,75]; + lineof_temp[1460] = [1111,25,1112,73]; + lineof_temp[588] = [550,24,550,27]; + lineof_temp[6032] = [4113,14,4113,46]; + lineof_temp[2391] = [1802,6,1802,45]; + lineof_temp[4889] = [3329,14,3329,40]; + lineof_temp[2439] = [1850,6,1850,34]; + lineof_temp[5182] = [3518,10,3518,12]; + lineof_temp[988] = [773,43,773,68]; + lineof_temp[1241] = [977,31,977,64]; + lineof_temp[5842] = [3965,14,3965,38]; + lineof_temp[4377] = [3050,20,3050,50]; + lineof_temp[488] = [458,6,458,20]; + lineof_temp[6764] = [4448,12,4448,65]; + lineof_temp[6712] = [4463,16,4463,28]; + lineof_temp[4469] = [3103,10,3103,33]; + lineof_temp[5677] = [3859,6,3859,39]; + lineof_temp[6905] = [4602,44,4602,72]; + lineof_temp[834] = [690,6,691,49]; + lineof_temp[2135] = [1585,14,1585,60]; + lineof_temp[4251] = [2947,4,2947,26]; + lineof_temp[7121] = [4714,4,4714,39]; + lineof_temp[7290] = [4806,10,4807,69]; + lineof_temp[3316] = [2387,31,2387,76]; + lineof_temp[5663] = [3855,14,3855,32]; + lineof_temp[585] = [548,16,548,27]; + lineof_temp[6459] = [4323,14,4324,65]; + lineof_temp[7057] = [4702,14,4705,58]; + lineof_temp[5256] = [3585,6,3585,18]; + lineof_temp[465] = [458,23,458,66]; + lineof_temp[746] = [643,27,643,29]; + lineof_temp[1091] = [913,33,913,35]; + lineof_temp[4161] = [2884,4,2884,26]; + lineof_temp[7382] = [4844,21,4844,33]; + lineof_temp[425] = [432,20,432,47]; + lineof_temp[780] = [671,12,671,44]; + lineof_temp[3868] = [2705,14,2705,77]; + lineof_temp[1585] = [1190,21,1191,67]; + lineof_temp[3976] = [2778,22,2778,33]; + lineof_temp[5336] = [3633,16,3633,63]; + lineof_temp[385] = [394,6,394,37]; + lineof_temp[2612] = [1939,29,1943,75]; + lineof_temp[2833] = [2083,43,2083,71]; + lineof_temp[5088] = [3471,2,3472,13]; + lineof_temp[2222] = [1653,12,1653,58]; + lineof_temp[2744] = [2013,2,2013,26]; + lineof_temp[5707] = [3842,10,3842,16]; + lineof_temp[5933] = [4002,6,4002,15]; + lineof_temp[1967] = [1472,25,1472,63]; + lineof_temp[4915] = [3348,10,3348,24]; + lineof_temp[2400] = [1809,4,1809,34]; + lineof_temp[4799] = [3287,14,3287,23]; + lineof_temp[4837] = [3303,24,3304,49]; + lineof_temp[5080] = [3465,10,3465,38]; + lineof_temp[1018] = [726,4,726,16]; + lineof_temp[1377] = [1054,48,1058,58]; + lineof_temp[4312] = [3024,18,3024,45]; + lineof_temp[5986] = [4040,14,4040,15]; + lineof_temp[7329] = [4822,6,4822,24]; + lineof_temp[2836] = [2082,2,2084,14]; + lineof_temp[3814] = [2668,10,2668,20]; + lineof_temp[3903] = [2714,16,2714,54]; + lineof_temp[791] = [621,6,679,6]; + lineof_temp[2828] = [2075,17,2075,45]; + lineof_temp[3846] = [2690,6,2690,27]; + lineof_temp[4886] = [3325,39,3325,73]; + lineof_temp[7277] = [4798,14,4798,61]; + lineof_temp[77] = [96,15,96,31]; + lineof_temp[1964] = [1474,16,1474,57]; + lineof_temp[7248] = [4778,8,4778,31]; + lineof_temp[1655] = [1241,44,1241,70]; + lineof_temp[3867] = [2702,12,2702,75]; + lineof_temp[6284] = [4237,21,4237,25]; + lineof_temp[4622] = [3182,4,3182,12]; + lineof_temp[6971] = [4675,26,4675,54]; + lineof_temp[7138] = [4743,27,4743,69]; + lineof_temp[2783] = [2031,15,2031,18]; + lineof_temp[4493] = [3070,18,3070,37]; + lineof_temp[4055] = [2819,11,2819,44]; + lineof_temp[5043] = [3441,18,3441,37]; + lineof_temp[2170] = [1620,10,1622,62]; + lineof_temp[3313] = [2378,10,2378,64]; + lineof_temp[1969] = [1472,16,1472,64]; + lineof_temp[7019] = [4625,14,4625,19]; + lineof_temp[7105] = [4724,6,4724,20]; + lineof_temp[2564] = [1918,29,1922,75]; + lineof_temp[3938] = [2745,4,2746,71]; + lineof_temp[2631] = [1948,21,1948,22]; + lineof_temp[6519] = [4348,14,4348,30]; + lineof_temp[619] = [564,26,564,54]; + lineof_temp[7157] = [4737,26,4737,76]; + lineof_temp[776] = [624,10,624,25]; + lineof_temp[3258] = [2329,13,2329,18]; + lineof_temp[176] = [197,4,197,25]; + lineof_temp[3208] = [2314,4,2319,6]; + lineof_temp[5374] = [3638,14,3638,15]; + lineof_temp[7296] = [4803,8,4807,70]; + lineof_temp[668] = [581,10,581,15]; + lineof_temp[1586] = [1190,17,1190,18]; + lineof_temp[7326] = [4823,6,4826,55]; + lineof_temp[4525] = [3135,10,3140,12]; + lineof_temp[6515] = [4337,6,4346,6]; + lineof_temp[211] = [229,12,229,62]; + lineof_temp[634] = [537,6,537,57]; + lineof_temp[4265] = [2953,23,2953,39]; + lineof_temp[5888] = [3976,6,3976,15]; + lineof_temp[7369] = [4834,2,4834,58]; + lineof_temp[6271] = [4238,25,4238,48]; + lineof_temp[5927] = [4024,10,4026,44]; + lineof_temp[6145] = [4163,6,4163,19]; + lineof_temp[627] = [560,20,560,31]; + lineof_temp[6996] = [4653,40,4653,41]; + lineof_temp[3950] = [2757,53,2757,65]; + lineof_temp[1612] = [1215,27,1215,53]; + lineof_temp[1788] = [1346,16,1346,62]; + lineof_temp[4854] = [3301,21,3301,56]; + lineof_temp[6945] = [4629,22,4629,50]; + lineof_temp[5110] = [3487,18,3487,46]; + lineof_temp[3041] = [2151,6,2151,43]; + lineof_temp[5239] = [3568,4,3568,12]; + lineof_temp[5715] = [3881,6,3882,17]; + lineof_temp[6495] = [4338,21,4338,37]; + lineof_temp[5007] = [3428,18,3428,64]; + lineof_temp[6783] = [4515,22,4515,50]; + lineof_temp[4427] = [2970,12,2970,14]; + lineof_temp[6679] = [4442,14,4442,26]; + lineof_temp[4801] = [3286,22,3286,47]; + lineof_temp[5584] = [3809,19,3809,41]; + lineof_temp[4141] = [2877,28,2877,43]; + lineof_temp[5719] = [3884,6,3884,53]; + lineof_temp[6190] = [4195,22,4195,53]; + lineof_temp[3657] = [2499,2,2572,2]; + lineof_temp[755] = [649,22,657,26]; + lineof_temp[5502] = [3740,20,3740,25]; + lineof_temp[6185] = [4193,22,4193,53]; + lineof_temp[2292] = [1697,19,1701,65]; + lineof_temp[2338] = [1747,4,1747,48]; + lineof_temp[3294] = [2341,29,2341,60]; + lineof_temp[1933] = [1428,10,1428,43]; + lineof_temp[5974] = [4074,24,4075,62]; + lineof_temp[2694] = [1989,14,1989,30]; + lineof_temp[2785] = [2031,6,2041,6]; + lineof_temp[3993] = [2779,27,2779,55]; + lineof_temp[5339] = [3631,4,3631,12]; + lineof_temp[3882] = [2732,32,2732,41]; + lineof_temp[5136] = [3495,17,3495,28]; + lineof_temp[5869] = [3982,16,3982,43]; + lineof_temp[2355] = [1766,6,1766,43]; + lineof_temp[4293] = [3008,20,3008,60]; + lineof_temp[5684] = [3863,14,3863,35]; + lineof_temp[7039] = [4687,10,4692,11]; + lineof_temp[251] = [266,6,268,39]; + lineof_temp[432] = [435,14,435,40]; + lineof_temp[3545] = [2516,27,2516,70]; + lineof_temp[5189] = [3535,10,3535,38]; + lineof_temp[562] = [527,16,527,53]; + lineof_temp[1800] = [1349,8,1349,32]; + lineof_temp[4228] = [2864,10,2864,12]; + lineof_temp[4164] = [2887,6,2887,77]; + lineof_temp[5334] = [3635,8,3635,67]; + lineof_temp[5706] = [3872,4,3872,38]; + lineof_temp[3775] = [2656,23,2657,67]; + lineof_temp[6686] = [4448,21,4448,64]; + lineof_temp[6819] = [4541,36,4541,74]; + lineof_temp[4482] = [3105,25,3105,57]; + lineof_temp[5509] = [3756,20,3756,45]; + lineof_temp[1230] = [969,32,969,61]; + lineof_temp[4616] = [3169,4,3169,17]; + lineof_temp[482] = [459,22,459,27]; + lineof_temp[6709] = [4464,20,4464,46]; + lineof_temp[7208] = [4756,19,4756,21]; + lineof_temp[4541] = [3131,10,3144,22]; + lineof_temp[4431] = [2969,16,2969,19]; + lineof_temp[2749] = [2006,2,2006,14]; + lineof_temp[1282] = [949,4,949,46]; + lineof_temp[5569] = [3799,20,3799,26]; + lineof_temp[993] = [774,26,774,59]; + lineof_temp[5422] = [3700,14,3700,51]; + lineof_temp[7016] = [4642,12,4676,19]; + lineof_temp[7270] = [4795,14,4795,50]; + lineof_temp[3109] = [2259,19,2259,44]; + lineof_temp[1506] = [1126,4,1126,27]; + lineof_temp[3859] = [2696,27,2696,32]; + lineof_temp[6078] = [4143,10,4143,22]; + lineof_temp[1292] = [996,27,996,55]; + lineof_temp[1836] = [1377,2,1377,29]; + lineof_temp[1747] = [1316,16,1316,76]; + lineof_temp[3555] = [2526,28,2526,51]; + lineof_temp[7263] = [4785,10,4790,11]; + lineof_temp[2132] = [1595,8,1597,28]; + lineof_temp[3421] = [2439,18,2439,23]; + lineof_temp[3801] = [2665,23,2666,67]; + lineof_temp[1039] = [839,10,843,72]; + lineof_temp[10] = [16,6,16,77]; + lineof_temp[3383] = [2413,14,2417,37]; + lineof_temp[3474] = [2481,12,2482,31]; + lineof_temp[2269] = [1687,6,1687,17]; + lineof_temp[3460] = [2477,12,2477,45]; + lineof_temp[3898] = [2717,26,2717,54]; + lineof_temp[804] = [707,8,713,50]; + lineof_temp[5630] = [3838,10,3838,62]; + lineof_temp[6658] = [4425,14,4428,58]; + lineof_temp[7308] = [4819,22,4819,62]; + lineof_temp[727] = [629,18,629,29]; + lineof_temp[1941] = [1383,20,1383,40]; + lineof_temp[4180] = [2897,6,2897,72]; + lineof_temp[6406] = [4295,4,4295,43]; + lineof_temp[1150] = [863,36,863,72]; + lineof_temp[5488] = [3751,28,3751,40]; + lineof_temp[671] = [592,17,592,29]; + lineof_temp[3231] = [2299,2,2299,12]; + lineof_temp[6435] = [4320,22,4320,63]; + lineof_temp[1808] = [1353,8,1353,33]; + lineof_temp[7180] = [4748,23,4748,50]; + lineof_temp[2009] = [1496,6,1496,43]; + lineof_temp[2115] = [1571,10,1574,91]; + lineof_temp[2622] = [1951,31,1952,67]; + lineof_temp[3973] = [2777,20,2777,31]; + lineof_temp[5317] = [3618,30,3618,48]; + lineof_temp[5590] = [3812,16,3812,25]; + lineof_temp[5326] = [3615,10,3622,11]; + lineof_temp[5653] = [3852,14,3852,33]; + lineof_temp[5943] = [4036,6,4036,16]; + lineof_temp[3871] = [2708,16,2709,50]; + lineof_temp[1907] = [1427,20,1427,30]; + lineof_temp[2960] = [2197,21,2198,37]; + lineof_temp[4142] = [2877,8,2877,73]; + lineof_temp[5997] = [4087,14,4087,20]; + lineof_temp[6696] = [4462,31,4462,64]; + lineof_temp[1650] = [1234,12,1234,56]; + lineof_temp[2104] = [1577,20,1577,49]; + lineof_temp[2661] = [1975,17,1975,18]; + lineof_temp[7324] = [4823,15,4823,19]; + lineof_temp[2941] = [2123,33,2123,63]; + lineof_temp[1723] = [1293,10,1293,13]; + lineof_temp[2611] = [1944,16,1944,37]; + lineof_temp[3262] = [2327,2,2327,31]; + lineof_temp[6104] = [4139,14,4139,15]; + lineof_temp[2025] = [1507,18,1507,70]; + lineof_temp[2317] = [1728,6,1728,45]; + lineof_temp[565] = [524,10,524,37]; + lineof_temp[883] = [744,20,744,48]; + lineof_temp[6311] = [4243,4,4243,34]; + lineof_temp[4066] = [2820,6,2820,34]; + lineof_temp[14] = [15,29,15,41]; + lineof_temp[3815] = [2668,10,2670,29]; + lineof_temp[4317] = [3022,14,3025,65]; + lineof_temp[4441] = [3072,4,3072,12]; + lineof_temp[2441] = [1852,6,1852,22]; + lineof_temp[6177] = [4185,21,4185,33]; + lineof_temp[4029] = [2798,15,2798,23]; + lineof_temp[5575] = [3789,6,3789,20]; + lineof_temp[729] = [628,16,628,35]; + lineof_temp[3211] = [2308,19,2309,57]; + lineof_temp[3760] = [2649,22,2650,66]; + lineof_temp[7029] = [4687,28,4687,66]; + lineof_temp[487] = [458,15,458,20]; + lineof_temp[920] = [798,25,798,50]; + lineof_temp[2429] = [1840,6,1840,23]; + lineof_temp[6477] = [4329,19,4329,21]; + lineof_temp[578] = [538,18,538,40]; + lineof_temp[2919] = [2138,21,2138,72]; + lineof_temp[5265] = [3592,40,3592,47]; + lineof_temp[6510] = [4338,6,4338,18]; + lineof_temp[5130] = [3495,17,3495,28]; + lineof_temp[1687] = [1261,22,1261,23]; + lineof_temp[4197] = [2904,4,2904,26]; + lineof_temp[2323] = [1734,6,1734,48]; + lineof_temp[6368] = [4277,14,4277,15]; + lineof_temp[2724] = [2006,17,2006,47]; + lineof_temp[4547] = [3149,14,3149,55]; + lineof_temp[6443] = [4318,25,4318,26]; + lineof_temp[1876] = [1405,18,1405,40]; + lineof_temp[5861] = [3974,6,3974,22]; + lineof_temp[1431] = [1088,19,1088,61]; + lineof_temp[6888] = [4586,22,4586,62]; + lineof_temp[3182] = [2280,20,2280,67]; + lineof_temp[3291] = [2346,6,2348,8]; + lineof_temp[1064] = [909,27,909,59]; + lineof_temp[3084] = [2238,10,2243,50]; + lineof_temp[3273] = [2349,21,2349,50]; + lineof_temp[642] = [572,6,572,17]; + lineof_temp[2060] = [1524,24,1524,27]; + lineof_temp[3988] = [2779,27,2779,55]; + lineof_temp[6700] = [4464,28,4464,45]; + lineof_temp[1812] = [1359,16,1359,28]; + lineof_temp[3277] = [2355,16,2355,22]; + lineof_temp[4833] = [3301,21,3301,56]; + lineof_temp[128] = [157,20,157,39]; + lineof_temp[1944] = [1383,6,1455,7]; + lineof_temp[2983] = [2165,12,2165,43]; + lineof_temp[4464] = [3082,8,3082,34]; + lineof_temp[4559] = [3158,22,3158,45]; + lineof_temp[5970] = [4062,12,4069,14]; + lineof_temp[4983] = [3409,19,3409,31]; + lineof_temp[5945] = [4035,4,4035,12]; + lineof_temp[1544] = [1158,15,1158,50]; + lineof_temp[2560] = [1918,29,1922,75]; + lineof_temp[5180] = [3519,2,3519,39]; + lineof_temp[5866] = [3972,4,3972,12]; + lineof_temp[1153] = [860,26,861,59]; + lineof_temp[4088] = [2845,10,2845,67]; + lineof_temp[922] = [798,23,798,51]; + lineof_temp[1142] = [887,30,896,31]; + lineof_temp[902] = [752,14,752,76]; + lineof_temp[1887] = [1415,39,1416,60]; + lineof_temp[2682] = [1985,8,1986,28]; + lineof_temp[2811] = [2057,10,2058,67]; + lineof_temp[7241] = [4779,27,4779,41]; + lineof_temp[7365] = [4835,15,4835,75]; + lineof_temp[7210] = [4756,8,4757,20]; + lineof_temp[2163] = [1603,44,1603,82]; + lineof_temp[2262] = [1683,14,1683,26]; + lineof_temp[3101] = [2254,23,2254,50]; + lineof_temp[3805] = [2669,25,2669,53]; + lineof_temp[6339] = [4271,20,4271,39]; + lineof_temp[6678] = [4443,18,4443,64]; + lineof_temp[1173] = [851,18,851,59]; + lineof_temp[5615] = [3828,19,3828,41]; + lineof_temp[11] = [19,4,19,18]; + lineof_temp[485] = [459,6,467,6]; + lineof_temp[535] = [482,10,482,59]; + lineof_temp[1199] = [836,14,836,15]; + lineof_temp[2329] = [1740,6,1740,36]; + lineof_temp[2752] = [2027,14,2027,44]; + lineof_temp[3381] = [2413,23,2413,29]; + lineof_temp[6476] = [4329,24,4329,59]; + lineof_temp[2804] = [2053,10,2053,65]; + lineof_temp[3189] = [2289,10,2289,25]; + lineof_temp[3671] = [2588,16,2591,94]; + lineof_temp[5893] = [3999,19,3999,59]; + lineof_temp[3452] = [2462,4,2468,34]; + lineof_temp[3456] = [2461,4,2468,34]; + lineof_temp[7051] = [4712,10,4712,75]; + lineof_temp[7128] = [4736,10,4736,23]; + lineof_temp[3371] = [2417,14,2417,37]; + lineof_temp[6672] = [4438,10,4438,32]; + lineof_temp[4685] = [3217,2,3217,40]; + lineof_temp[4935] = [3379,40,3380,53]; + lineof_temp[5737] = [3892,6,3892,61]; + lineof_temp[3945] = [2751,4,2752,13]; + lineof_temp[4012] = [2787,2,2789,26]; + lineof_temp[5442] = [3715,16,3715,24]; + lineof_temp[821] = [692,10,692,24]; + lineof_temp[3147] = [2256,18,2256,52]; + lineof_temp[4739] = [3251,15,3251,37]; + lineof_temp[2094] = [1497,4,1497,29]; + lineof_temp[2548] = [1911,29,1915,75]; + lineof_temp[3782] = [2660,23,2661,67]; + lineof_temp[3457] = [2460,15,2460,33]; + lineof_temp[6796] = [4521,14,4521,52]; + lineof_temp[1813] = [1359,16,1362,111]; + lineof_temp[4771] = [3266,10,3269,53]; + lineof_temp[5281] = [3589,10,3596,11]; + lineof_temp[6361] = [4282,18,4282,46]; + lineof_temp[6642] = [4392,10,4392,41]; + lineof_temp[339] = [342,10,342,37]; + lineof_temp[6412] = [4314,29,4314,45]; + lineof_temp[7348] = [4815,10,4815,12]; + lineof_temp[1509] = [1125,10,1125,15]; + lineof_temp[2073] = [1512,24,1512,27]; + lineof_temp[5580] = [3779,12,3779,13]; + lineof_temp[5819] = [3929,19,3929,35]; + lineof_temp[6219] = [4211,8,4211,31]; + lineof_temp[2973] = [2194,10,2194,28]; + lineof_temp[1423] = [1012,10,1012,25]; + lineof_temp[2401] = [1812,6,1812,39]; + lineof_temp[4640] = [3197,18,3197,39]; + lineof_temp[3146] = [2256,18,2256,52]; + lineof_temp[2038] = [1546,12,1546,45]; + lineof_temp[7167] = [4735,6,4735,18]; + lineof_temp[7189] = [4749,6,4749,18]; + lineof_temp[1737] = [1307,12,1307,58]; + lineof_temp[384] = [392,18,392,30]; + lineof_temp[4910] = [3331,2,3335,3]; + lineof_temp[6572] = [4375,14,4375,59]; + lineof_temp[6969] = [4644,20,4644,43]; + lineof_temp[5799] = [3937,23,3937,34]; + lineof_temp[6110] = [4156,17,4156,19]; + lineof_temp[3370] = [2417,22,2417,35]; + lineof_temp[4031] = [2798,2,2798,12]; + lineof_temp[4653] = [3205,4,3205,12]; + lineof_temp[940] = [803,26,806,74]; + lineof_temp[5340] = [3642,46,3642,53]; + lineof_temp[7035] = [4688,14,4688,40]; + lineof_temp[7234] = [4768,24,4768,59]; + lineof_temp[5760] = [3906,14,3906,40]; + lineof_temp[178] = [199,4,199,25]; + lineof_temp[1609] = [1220,8,1220,20]; + lineof_temp[2602] = [1943,37,1943,70]; + lineof_temp[558] = [515,8,515,16]; + lineof_temp[921] = [798,25,798,50]; + lineof_temp[1898] = [1403,22,1403,23]; + lineof_temp[5540] = [3779,16,3779,27]; + lineof_temp[4155] = [2883,14,2883,55]; + lineof_temp[147] = [176,38,176,49]; + lineof_temp[6571] = [4376,14,4376,50]; + lineof_temp[7374] = [4840,27,4840,28]; + lineof_temp[1660] = [1241,14,1241,72]; + lineof_temp[4400] = [2971,20,2971,33]; + lineof_temp[4546] = [3149,14,3149,55]; + lineof_temp[5278] = [3589,23,3589,44]; + lineof_temp[1764] = [1327,16,1327,41]; + lineof_temp[3842] = [2686,14,2686,25]; + lineof_temp[1593] = [1184,10,1184,11]; + lineof_temp[1867] = [1392,14,1392,43]; + lineof_temp[2814] = [2054,8,2054,21]; + lineof_temp[3870] = [2708,16,2709,50]; + lineof_temp[4114] = [2867,54,2867,61]; + lineof_temp[4693] = [3227,11,3227,39]; + lineof_temp[1160] = [856,24,856,42]; + lineof_temp[2764] = [2037,18,2037,56]; + lineof_temp[4484] = [3105,10,3105,22]; + lineof_temp[3402] = [2428,12,2428,25]; + lineof_temp[4262] = [2958,10,2958,28]; + lineof_temp[6281] = [4238,10,4238,22]; + lineof_temp[5564] = [3796,25,3796,47]; + lineof_temp[7197] = [4747,6,4747,18]; + lineof_temp[765] = [646,26,646,27]; + lineof_temp[2829] = [2075,17,2075,45]; + lineof_temp[4236] = [2934,6,2934,38]; + lineof_temp[6120] = [4135,13,4135,17]; + lineof_temp[3752] = [2648,48,2648,74]; + lineof_temp[5314] = [3619,20,3619,51]; + lineof_temp[6983] = [4657,44,4657,72]; + lineof_temp[647] = [574,19,574,49]; + lineof_temp[1906] = [1386,21,1386,34]; + lineof_temp[7163] = [4737,8,4738,28]; + lineof_temp[95] = [104,10,104,15]; + lineof_temp[874] = [736,23,737,75]; + lineof_temp[1871] = [1401,22,1401,34]; + lineof_temp[7302] = [4813,16,4813,50]; + lineof_temp[2074] = [1510,18,1511,44]; + lineof_temp[42] = [57,4,57,29]; + lineof_temp[1375] = [1055,50,1058,57]; + lineof_temp[3349] = [2405,20,2405,29]; + lineof_temp[766] = [645,16,645,49]; + lineof_temp[3100] = [2254,23,2254,50]; + lineof_temp[1365] = [1042,46,1045,66]; + lineof_temp[3283] = [2351,16,2351,22]; + lineof_temp[1993] = [1484,2,1484,69]; + lineof_temp[3045] = [2145,34,2145,65]; + lineof_temp[5982] = [4074,10,4076,46]; + lineof_temp[6282] = [4238,10,4240,21]; + lineof_temp[1415] = [1021,22,1021,38]; + lineof_temp[6183] = [4188,19,4188,35]; + lineof_temp[928] = [820,26,820,53]; + lineof_temp[2599] = [1932,16,1937,17]; + lineof_temp[2951] = [2158,16,2158,67]; + lineof_temp[3300] = [2365,8,2368,80]; + lineof_temp[7367] = [4835,2,4835,12]; + lineof_temp[2586] = [1932,31,1932,46]; + lineof_temp[5143] = [3509,17,3509,30]; + lineof_temp[5939] = [4036,19,4036,59]; + lineof_temp[318] = [311,4,311,24]; + lineof_temp[2992] = [2184,24,2184,49]; + lineof_temp[3295] = [2367,12,2367,39]; + lineof_temp[4074] = [2811,2,2832,3]; + lineof_temp[6388] = [4286,6,4286,31]; + lineof_temp[823] = [692,10,692,24]; + lineof_temp[2199] = [1638,21,1638,59]; + lineof_temp[4550] = [3147,10,3149,70]; + lineof_temp[6325] = [4259,10,4259,22]; + lineof_temp[6962] = [4636,12,4636,37]; + lineof_temp[3132] = [2264,33,2264,55]; + lineof_temp[6333] = [4267,18,4267,46]; + lineof_temp[3648] = [2543,14,2543,15]; + lineof_temp[568] = [509,15,509,50]; + lineof_temp[2945] = [2147,4,2147,12]; + lineof_temp[6080] = [4145,26,4145,38]; + lineof_temp[1068] = [909,26,910,59]; + lineof_temp[1218] = [962,16,962,48]; + lineof_temp[5236] = [3534,2,3563,3]; + lineof_temp[6384] = [4291,10,4291,22]; + lineof_temp[103] = [122,6,122,41]; + lineof_temp[862] = [730,14,731,47]; + lineof_temp[4911] = [3326,2,3330,3]; + lineof_temp[5614] = [3829,6,3829,25]; + lineof_temp[1758] = [1328,32,1328,61]; + lineof_temp[7289] = [4806,10,4807,69]; + lineof_temp[444] = [445,18,445,24]; + lineof_temp[3204] = [2320,19,2321,57]; + lineof_temp[4097] = [2835,31,2835,48]; + lineof_temp[2687] = [1981,10,1981,28]; + lineof_temp[4852] = [3302,8,3302,18]; + lineof_temp[6875] = [4575,12,4575,37]; + lineof_temp[1255] = [964,22,964,30]; + lineof_temp[1481] = [1115,6,1119,59]; + lineof_temp[3372] = [2416,27,2416,74]; + lineof_temp[6017] = [4100,12,4100,24]; + lineof_temp[1376] = [1054,48,1058,58]; + lineof_temp[1998] = [1482,21,1482,44]; + lineof_temp[2306] = [1715,4,1715,41]; + lineof_temp[5138] = [3495,2,3495,14]; + lineof_temp[6758] = [4457,12,4457,53]; + lineof_temp[6473] = [4330,18,4330,59]; + lineof_temp[4382] = [3054,18,3054,64]; + lineof_temp[2043] = [1545,18,1545,28]; + lineof_temp[3990] = [2780,12,2780,33]; + lineof_temp[4007] = [2789,2,2789,26]; + lineof_temp[4272] = [2993,12,2993,26]; + lineof_temp[5174] = [3526,6,3526,16]; + lineof_temp[7094] = [4730,16,4730,62]; + lineof_temp[690] = [602,17,602,29]; + lineof_temp[1703] = [1284,20,1284,46]; + lineof_temp[3508] = [2459,2,2459,35]; + lineof_temp[6239] = [4224,25,4224,52]; + lineof_temp[5436] = [3709,55,3709,76]; + lineof_temp[3511] = [2458,2,2458,13]; + lineof_temp[4678] = [3221,39,3221,50]; + lineof_temp[5881] = [3988,12,3988,51]; + lineof_temp[6268] = [4237,28,4237,40]; + lineof_temp[3181] = [2281,2,2283,21]; + lineof_temp[5237] = [3533,21,3533,48]; + lineof_temp[8] = [16,32,16,76]; + lineof_temp[204] = [226,37,226,59]; + lineof_temp[502] = [473,2,473,12]; + lineof_temp[2445] = [1860,14,1860,30]; + lineof_temp[3124] = [2274,20,2274,67]; + lineof_temp[6634] = [4410,16,4410,28]; + lineof_temp[2604] = [1942,35,1943,71]; + lineof_temp[3206] = [2320,4,2320,16]; + lineof_temp[1343] = [1030,43,1030,62]; + lineof_temp[2711] = [1999,10,2000,70]; + lineof_temp[6294] = [4244,14,4244,30]; + lineof_temp[7376] = [4840,2,4840,24]; + lineof_temp[1644] = [1200,20,1200,40]; + lineof_temp[3136] = [2263,33,2263,55]; + lineof_temp[814] = [689,8,689,26]; + lineof_temp[5546] = [3786,6,3786,58]; + lineof_temp[2850] = [2094,10,2094,26]; + lineof_temp[3347] = [2402,10,2402,35]; + lineof_temp[6795] = [4521,22,4521,50]; + lineof_temp[2927] = [2138,8,2139,26]; + lineof_temp[4204] = [2910,14,2910,19]; + lineof_temp[5013] = [3425,10,3425,34]; + lineof_temp[5612] = [3829,14,3829,23]; + lineof_temp[6708] = [4465,18,4465,30]; + lineof_temp[1258] = [963,23,963,25]; + lineof_temp[1553] = [1173,21,1173,50]; + lineof_temp[2944] = [2148,6,2148,26]; + lineof_temp[7238] = [4767,8,4767,33]; + lineof_temp[3134] = [2264,12,2264,30]; + lineof_temp[5757] = [3904,6,3904,32]; + lineof_temp[2354] = [1763,4,1763,44]; + lineof_temp[5626] = [3822,19,3822,52]; + lineof_temp[1809] = [1361,20,1361,47]; + lineof_temp[3310] = [2377,20,2377,35]; + lineof_temp[5041] = [3441,26,3441,35]; + lineof_temp[981] = [764,32,764,74]; + lineof_temp[3376] = [2415,31,2415,37]; + lineof_temp[4418] = [2972,18,2972,36]; + lineof_temp[5506] = [3736,12,3736,28]; + lineof_temp[2245] = [1663,6,1670,10]; + lineof_temp[5312] = [3618,30,3618,48]; + lineof_temp[306] = [297,12,298,41]; + lineof_temp[2000] = [1492,12,1492,58]; + lineof_temp[3037] = [2154,6,2154,19]; + lineof_temp[1154] = [858,34,858,63]; + lineof_temp[2268] = [1684,4,1684,25]; + lineof_temp[1626] = [1208,18,1208,47]; + lineof_temp[412] = [411,16,411,42]; + lineof_temp[1602] = [1203,4,1203,36]; + lineof_temp[2771] = [2035,10,2037,58]; + lineof_temp[2260] = [1680,4,1680,23]; + lineof_temp[6314] = [4257,18,4257,46]; + lineof_temp[3658] = [2498,30,2498,45]; + lineof_temp[4631] = [3186,6,3187,36]; + lineof_temp[5787] = [3922,6,3922,25]; + lineof_temp[307] = [296,10,298,43]; + lineof_temp[4297] = [2999,16,2999,30]; + lineof_temp[3551] = [2524,22,2524,31]; + lineof_temp[4316] = [3022,14,3025,65]; + lineof_temp[4769] = [3266,10,3266,22]; + lineof_temp[1733] = [1281,2,1299,2]; + lineof_temp[2693] = [1989,14,1989,30]; + lineof_temp[4121] = [2865,4,2865,28]; + lineof_temp[3301] = [2364,6,2368,82]; + lineof_temp[5018] = [3436,41,3436,55]; + lineof_temp[6964] = [4626,8,4626,31]; + lineof_temp[192] = [207,27,207,44]; + lineof_temp[2208] = [1644,8,1648,83]; + lineof_temp[2651] = [1974,22,1974,67]; + lineof_temp[3183] = [2280,13,2280,17]; + lineof_temp[6654] = [4426,18,4426,64]; + lineof_temp[5772] = [3914,12,3914,57]; + lineof_temp[1185] = [847,14,847,51]; + lineof_temp[1070] = [913,38,913,57]; + lineof_temp[32] = [46,14,46,39]; + lineof_temp[1823] = [1364,14,1366,25]; + lineof_temp[2870] = [2119,4,2119,15]; + lineof_temp[6912] = [4606,40,4606,68]; + lineof_temp[228] = [236,14,236,28]; + lineof_temp[3233] = [2297,15,2298,52]; + lineof_temp[7151] = [4741,8,4741,23]; + lineof_temp[5824] = [3951,6,3951,38]; + lineof_temp[2069] = [1517,22,1520,58]; + lineof_temp[3891] = [2725,22,2725,63]; + lineof_temp[3962] = [2762,4,2762,77]; + lineof_temp[5661] = [3854,21,3854,67]; + lineof_temp[6228] = [4210,14,4210,15]; + lineof_temp[7221] = [4762,14,4762,55]; + lineof_temp[6823] = [4543,36,4543,72]; + lineof_temp[7061] = [4707,20,4707,49]; + lineof_temp[1873] = [1400,12,1400,43]; + lineof_temp[4499] = [3128,28,3128,39]; + lineof_temp[1115] = [857,30,857,50]; + lineof_temp[2330] = [1739,4,1739,41]; + lineof_temp[4947] = [3368,22,3368,46]; + lineof_temp[5561] = [3797,20,3797,26]; + lineof_temp[5682] = [3860,4,3860,32]; + lineof_temp[6584] = [4384,10,4384,32]; + lineof_temp[2742] = [2015,2,2021,14]; + lineof_temp[7188] = [4749,14,4749,18]; + lineof_temp[2978] = [2168,20,2168,66]; + lineof_temp[6175] = [4186,14,4186,31]; + lineof_temp[2500] = [1891,14,1891,29]; + lineof_temp[6257] = [4218,4,4218,53]; + lineof_temp[3839] = [2681,23,2681,35]; + lineof_temp[6088] = [4148,26,4148,38]; + lineof_temp[2308] = [1717,4,1717,39]; + lineof_temp[6704] = [4467,34,4467,51]; + lineof_temp[1470] = [1107,6,1107,36]; + lineof_temp[4948] = [3386,24,3386,56]; + lineof_temp[5735] = [3892,14,3892,59]; + lineof_temp[6629] = [4411,24,4411,34]; + lineof_temp[6977] = [4648,22,4648,50]; + lineof_temp[2122] = [1596,27,1596,54]; + lineof_temp[5767] = [3910,14,3910,52]; + lineof_temp[171] = [194,10,194,25]; + lineof_temp[5178] = [3521,4,3521,26]; + lineof_temp[3650] = [2543,6,2570,6]; + lineof_temp[2933] = [2130,20,2130,54]; + lineof_temp[5668] = [3854,6,3854,18]; + lineof_temp[3227] = [2301,4,2301,45]; + lineof_temp[4048] = [2805,2,2805,12]; + lineof_temp[6950] = [4631,22,4631,50]; + lineof_temp[3577] = [2518,18,2518,20]; + lineof_temp[1136] = [892,32,895,66]; + lineof_temp[4586] = [3160,19,3160,47]; + lineof_temp[4701] = [3231,4,3231,50]; + lineof_temp[4793] = [3284,19,3284,37]; + lineof_temp[4932] = [3375,34,3375,45]; + lineof_temp[2447] = [1861,14,1861,32]; + lineof_temp[3213] = [2311,21,2311,49]; + lineof_temp[4287] = [3003,16,3003,48]; + lineof_temp[5581] = [3779,4,3779,13]; + lineof_temp[4014] = [2793,6,2793,16]; + lineof_temp[1552] = [1170,4,1170,12]; + lineof_temp[976] = [761,20,761,46]; + lineof_temp[6880] = [4582,14,4582,42]; + lineof_temp[1905] = [1387,10,1423,10]; + lineof_temp[2064] = [1513,18,1513,41]; + lineof_temp[2055] = [1525,18,1525,41]; + lineof_temp[5117] = [3482,6,3482,18]; + lineof_temp[6979] = [4655,44,4655,72]; + lineof_temp[7222] = [4761,8,4761,31]; + lineof_temp[72] = [93,14,93,74]; + lineof_temp[261] = [275,31,275,57]; + lineof_temp[5012] = [3426,12,3430,69]; + lineof_temp[1917] = [1444,28,1444,38]; + lineof_temp[6929] = [4581,12,4615,19]; + lineof_temp[2515] = [1904,20,1904,40]; + lineof_temp[1625] = [1209,6,1221,7]; + lineof_temp[1791] = [1345,12,1348,75]; + lineof_temp[2118] = [1569,10,1569,34]; + lineof_temp[6328] = [4255,14,4255,15]; + lineof_temp[4153] = [2880,4,2880,26]; + lineof_temp[4694] = [3227,11,3227,39]; + lineof_temp[832] = [697,6,698,69]; + lineof_temp[5424] = [3699,8,3699,9]; + lineof_temp[1407] = [1038,40,1038,56]; + lineof_temp[1852] = [1391,24,1391,65]; + lineof_temp[4767] = [3267,14,3267,60]; + lineof_temp[3261] = [2328,2,2328,37]; + lineof_temp[3951] = [2757,45,2757,67]; + lineof_temp[5467] = [3728,8,3728,19]; + lineof_temp[989] = [773,35,773,70]; + lineof_temp[5841] = [3965,26,3965,37]; + lineof_temp[4371] = [3047,12,3047,21]; + lineof_temp[4815] = [3289,19,3289,41]; + lineof_temp[3129] = [2271,12,2271,24]; + lineof_temp[5168] = [3519,10,3519,38]; + lineof_temp[6112] = [4156,6,4157,18]; + lineof_temp[3611] = [2553,22,2553,36]; + lineof_temp[1405] = [1040,38,1078,45]; + lineof_temp[409] = [400,2,406,2]; + lineof_temp[1895] = [1414,20,1414,52]; + lineof_temp[5873] = [3980,12,3983,99]; + lineof_temp[6692] = [4461,18,4461,47]; + lineof_temp[376] = [385,30,385,61]; + lineof_temp[1438] = [1088,10,1088,62]; + lineof_temp[2121] = [1581,21,1581,43]; + lineof_temp[4216] = [2914,16,2914,44]; + lineof_temp[2768] = [2035,31,2035,35]; + lineof_temp[3004] = [2188,18,2188,36]; + lineof_temp[2210] = [1641,18,1641,74]; + lineof_temp[6009] = [4094,18,4094,47]; + lineof_temp[6867] = [4571,12,4571,35]; + lineof_temp[1203] = [950,23,950,66]; + lineof_temp[6071] = [4122,29,4122,51]; + lineof_temp[6825] = [4545,44,4545,72]; + lineof_temp[5844] = [3965,6,3965,40]; + lineof_temp[106] = [124,14,124,35]; + lineof_temp[2160] = [1604,11,1604,12]; + lineof_temp[5951] = [4043,12,4043,24]; + lineof_temp[2963] = [2199,16,2199,24]; + lineof_temp[4376] = [3050,20,3050,50]; + lineof_temp[6444] = [4318,14,4318,26]; + lineof_temp[4908] = [3337,2,3341,3]; + lineof_temp[5149] = [3514,10,3514,22]; + lineof_temp[1854] = [1390,14,1390,41]; + lineof_temp[6008] = [4094,18,4094,47]; + lineof_temp[6785] = [4514,12,4514,31]; + lineof_temp[7366] = [4835,11,4835,12]; + lineof_temp[493] = [410,2,443,4]; + lineof_temp[914] = [779,21,779,46]; + lineof_temp[5337] = [3633,8,3633,65]; + lineof_temp[5416] = [3697,17,3697,39]; + lineof_temp[5378] = [3667,15,3667,36]; + lineof_temp[1299] = [1000,12,1000,18]; + lineof_temp[2232] = [1635,2,1635,12]; + lineof_temp[3079] = [2243,10,2243,50]; + lineof_temp[6486] = [4305,4,4305,45]; + lineof_temp[1557] = [1177,8,1177,62]; + lineof_temp[2795] = [2043,14,2043,45]; + lineof_temp[2472] = [1878,22,1878,37]; + lineof_temp[5196] = [3544,14,3544,48]; + lineof_temp[5604] = [3778,2,3806,4]; + lineof_temp[7108] = [4718,21,4718,36]; + lineof_temp[3097] = [2252,16,2252,53]; + lineof_temp[6238] = [4224,35,4224,51]; + lineof_temp[574] = [534,15,534,58]; + lineof_temp[1335] = [1020,24,1020,72]; + lineof_temp[3116] = [2264,33,2264,55]; + lineof_temp[3899] = [2717,18,2717,56]; + lineof_temp[1306] = [1005,18,1005,22]; + lineof_temp[3766] = [2646,17,2646,19]; + lineof_temp[2614] = [1939,16,1939,26]; + lineof_temp[4465] = [3094,25,3094,59]; + lineof_temp[6181] = [4184,6,4184,31]; + lineof_temp[1573] = [1189,10,1189,36]; + lineof_temp[4018] = [2799,15,2799,28]; + lineof_temp[3142] = [2261,12,2261,56]; + lineof_temp[6947] = [4629,14,4629,52]; + lineof_temp[3971] = [2776,21,2776,52]; + lineof_temp[7311] = [4823,22,4823,67]; + lineof_temp[966] = [792,28,792,74]; + lineof_temp[3115] = [2263,33,2263,55]; + lineof_temp[1024] = [724,12,724,44]; + lineof_temp[5232] = [3535,2,3535,39]; + lineof_temp[6087] = [4144,8,4144,30]; + lineof_temp[1631] = [1207,15,1207,16]; + lineof_temp[6978] = [4655,44,4655,72]; + lineof_temp[3787] = [2660,19,2660,20]; + lineof_temp[1305] = [1005,18,1005,22]; + lineof_temp[2333] = [1744,6,1744,29]; + lineof_temp[5480] = [3743,18,3746,68]; + lineof_temp[5744] = [3896,14,3896,35]; + lineof_temp[7342] = [4819,6,4826,55]; + lineof_temp[3598] = [2546,22,2546,33]; + lineof_temp[1159] = [856,35,856,42]; + lineof_temp[393] = [403,18,403,43]; + lineof_temp[4600] = [3171,18,3171,39]; + lineof_temp[5222] = [3550,8,3550,22]; + lineof_temp[197] = [220,6,220,48]; + lineof_temp[1614] = [1216,12,1216,24]; + lineof_temp[2713] = [1998,12,1998,48]; + lineof_temp[3732] = [2624,20,2624,65]; + lineof_temp[4993] = [3416,10,3416,28]; + lineof_temp[360] = [358,2,358,14]; + lineof_temp[526] = [498,20,498,50]; + lineof_temp[6255] = [4220,14,4220,15]; + lineof_temp[6840] = [4534,26,4534,39]; + lineof_temp[2566] = [1918,16,1918,26]; + lineof_temp[1795] = [1350,31,1350,58]; + lineof_temp[1972] = [1471,10,1471,57]; + lineof_temp[5658] = [3851,6,3851,18]; + lineof_temp[3819] = [2665,10,2665,20]; + lineof_temp[4570] = [3162,16,3162,49]; + lineof_temp[7030] = [4687,28,4687,66]; + lineof_temp[7052] = [4711,8,4712,77]; + lineof_temp[4604] = [3172,19,3172,39]; + lineof_temp[1638] = [1205,4,1205,37]; + lineof_temp[5167] = [3519,10,3519,38]; + lineof_temp[719] = [621,18,621,47]; + lineof_temp[4882] = [3316,4,3316,14]; + lineof_temp[6695] = [4462,31,4462,64]; + lineof_temp[7154] = [4740,19,4740,24]; + lineof_temp[4639] = [3194,4,3194,12]; + lineof_temp[5643] = [3846,14,3846,15]; + lineof_temp[6146] = [4162,30,4162,63]; + lineof_temp[2156] = [1605,10,1605,54]; + lineof_temp[4401] = [2972,18,2972,36]; + lineof_temp[347] = [348,6,351,72]; + lineof_temp[4322] = [3027,12,3027,41]; + lineof_temp[852] = [725,16,725,46]; + lineof_temp[3571] = [2526,14,2526,25]; + lineof_temp[5017] = [3431,10,3431,37]; + lineof_temp[5051] = [3450,29,3450,63]; + lineof_temp[6803] = [4527,14,4527,42]; + lineof_temp[6818] = [4541,44,4541,72]; + lineof_temp[3680] = [2596,12,2596,26]; + lineof_temp[938] = [803,26,803,38]; + lineof_temp[1508] = [1140,4,1140,29]; + lineof_temp[5211] = [3549,13,3549,34]; + lineof_temp[4995] = [3457,16,3457,44]; + lineof_temp[5889] = [3976,6,3991,6]; + lineof_temp[1239] = [978,26,978,35]; + lineof_temp[4881] = [3317,6,3317,44]; + lineof_temp[5994] = [4086,21,4086,61]; + lineof_temp[3215] = [2310,19,2311,57]; + lineof_temp[2365] = [1776,6,1776,42]; + lineof_temp[6493] = [4337,21,4337,33]; + lineof_temp[4419] = [2972,13,2972,15]; + lineof_temp[4873] = [3308,6,3315,58]; + lineof_temp[5857] = [3973,21,3973,61]; + lineof_temp[6479] = [4329,10,4330,61]; + lineof_temp[3063] = [2216,12,2216,66]; + lineof_temp[3393] = [2411,18,2411,23]; + lineof_temp[6691] = [4460,32,4460,73]; + lineof_temp[6509] = [4338,17,4338,18]; + lineof_temp[5628] = [3837,14,3837,41]; + lineof_temp[4406] = [2977,8,2977,20]; + lineof_temp[4588] = [3160,2,3160,16]; + lineof_temp[445] = [446,8,446,46]; + lineof_temp[698] = [602,2,603,33]; + lineof_temp[3604] = [2548,16,2548,32]; + lineof_temp[5405] = [3680,4,3680,52]; + lineof_temp[609] = [541,8,556,8]; + lineof_temp[2465] = [1866,10,1866,47]; + lineof_temp[2506] = [1894,21,1901,72]; + lineof_temp[438] = [411,16,411,42]; + lineof_temp[934] = [817,20,821,81]; + lineof_temp[5863] = [3973,15,3973,18]; + lineof_temp[300] = [291,8,291,30]; + lineof_temp[3668] = [2589,20,2589,66]; + lineof_temp[3731] = [2625,6,2633,6]; + lineof_temp[4696] = [3231,16,3231,38]; + lineof_temp[4874] = [3300,6,3307,8]; + lineof_temp[151] = [172,32,173,58]; + lineof_temp[1816] = [1357,12,1357,44]; + lineof_temp[6535] = [4358,14,4358,30]; + lineof_temp[3014] = [2181,24,2181,32]; + lineof_temp[2627] = [1953,20,1953,31]; + lineof_temp[4460] = [3083,23,3083,45]; + lineof_temp[5797] = [3934,24,3934,47]; + lineof_temp[6283] = [4237,28,4237,40]; + lineof_temp[6546] = [4366,18,4366,42]; + lineof_temp[3428] = [2361,33,2361,62]; + lineof_temp[278] = [285,35,285,61]; + lineof_temp[3912] = [2705,14,2705,77]; + lineof_temp[170] = [143,8,143,31]; + lineof_temp[1244] = [977,18,978,37]; + lineof_temp[5740] = [3894,14,3894,56]; + lineof_temp[3422] = [2438,8,2438,31]; + lineof_temp[3513] = [2457,17,2457,52]; + lineof_temp[468] = [460,18,460,50]; + lineof_temp[1607] = [1209,20,1209,52]; + lineof_temp[2158] = [1605,2,1605,56]; + lineof_temp[3958] = [2762,53,2762,65]; + lineof_temp[4119] = [2867,8,2867,73]; + lineof_temp[4761] = [3250,2,3250,12]; + lineof_temp[2171] = [1620,10,1622,62]; + lineof_temp[2382] = [1791,4,1791,29]; + lineof_temp[5073] = [3409,2,3409,16]; + lineof_temp[5949] = [4044,16,4044,62]; + lineof_temp[1100] = [908,22,908,35]; + lineof_temp[2692] = [1968,4,1968,29]; + lineof_temp[3177] = [2282,37,2282,57]; + lineof_temp[4654] = [3208,24,3208,43]; + lineof_temp[6052] = [4126,46,4126,58]; + lineof_temp[6843] = [4555,28,4555,66]; + lineof_temp[5484] = [3748,29,3749,57]; + lineof_temp[1222] = [972,26,972,34]; + lineof_temp[2140] = [1583,8,1587,81]; + lineof_temp[6374] = [4289,18,4289,46]; + lineof_temp[6827] = [4545,36,4545,74]; + lineof_temp[4748] = [3255,15,3255,16]; + lineof_temp[1951] = [1462,10,1462,49]; + lineof_temp[5987] = [4039,18,4039,47]; + lineof_temp[4100] = [2855,6,2855,44]; + lineof_temp[5452] = [3696,2,3704,4]; + lineof_temp[1439] = [1086,6,1093,10]; + lineof_temp[5137] = [3495,12,3495,14]; + lineof_temp[6106] = [4156,22,4156,34]; + lineof_temp[6498] = [4339,18,4339,47]; + lineof_temp[3286] = [2350,10,2350,13]; + lineof_temp[3526] = [2505,46,2505,57]; + lineof_temp[5344] = [3644,20,3645,27]; + lineof_temp[873] = [736,23,737,75]; + lineof_temp[1069] = [909,26,910,59]; + lineof_temp[3547] = [2518,23,2518,55]; + lineof_temp[3634] = [2548,14,2548,33]; + lineof_temp[3320] = [2388,18,2388,37]; + lineof_temp[6258] = [4230,14,4230,30]; + lineof_temp[2204] = [1646,14,1646,60]; + lineof_temp[4988] = [3411,15,3411,41]; + lineof_temp[7003] = [4650,26,4650,39]; + lineof_temp[4215] = [2911,4,2911,36]; + lineof_temp[3943] = [2751,43,2751,74]; + lineof_temp[6215] = [4209,14,4209,30]; + lineof_temp[3007] = [2186,18,2186,56]; + lineof_temp[1451] = [1104,15,1104,58]; + lineof_temp[4008] = [2788,2,2788,20]; + lineof_temp[3354] = [2375,28,2375,66]; + lineof_temp[983] = [767,32,767,74]; + lineof_temp[2265] = [1685,14,1685,26]; + lineof_temp[2621] = [1951,31,1952,67]; + lineof_temp[3032] = [2160,6,2160,18]; + lineof_temp[6117] = [4136,2,4136,13]; + lineof_temp[6921] = [4588,32,4588,34]; + lineof_temp[46] = [67,4,67,24]; + lineof_temp[2004] = [1491,8,1494,54]; + lineof_temp[4611] = [3171,6,3173,17]; + lineof_temp[1168] = [901,32,901,62]; + lineof_temp[3954] = [2757,4,2757,77]; + lineof_temp[2579] = [1930,16,1930,37]; + lineof_temp[4535] = [3132,20,3132,24]; + lineof_temp[5694] = [3866,4,3866,35]; + lineof_temp[2720] = [1994,4,1994,12]; + lineof_temp[3411] = [2443,20,2443,66]; + lineof_temp[4821] = [3289,6,3289,16]; + lineof_temp[6440] = [4319,14,4319,25]; + lineof_temp[1869] = [1388,25,1388,38]; + lineof_temp[6058] = [4127,12,4127,16]; + lineof_temp[427] = [422,24,422,25]; + lineof_temp[5902] = [4002,18,4002,47]; + lineof_temp[5990] = [4039,6,4078,6]; + lineof_temp[7184] = [4750,14,4750,33]; + lineof_temp[1052] = [907,25,907,43]; + lineof_temp[3191] = [2292,27,2292,47]; + lineof_temp[6549] = [4362,14,4362,15]; + lineof_temp[1981] = [1477,6,1477,41]; + lineof_temp[2746] = [2007,2,2011,3]; + lineof_temp[7259] = [4786,14,4786,37]; + lineof_temp[1112] = [855,41,855,61]; + lineof_temp[354] = [341,18,341,41]; + lineof_temp[557] = [516,10,520,99]; + lineof_temp[1124] = [869,32,869,46]; + lineof_temp[1491] = [1131,10,1131,48]; + lineof_temp[1666] = [1245,8,1245,18]; + lineof_temp[2469] = [1876,17,1876,60]; + lineof_temp[3271] = [2346,17,2346,28]; + lineof_temp[4068] = [2818,2,2818,19]; + lineof_temp[1117] = [857,28,857,51]; + lineof_temp[2086] = [1502,18,1502,73]; + lineof_temp[459] = [454,6,454,22]; + lineof_temp[777] = [624,10,668,10]; + lineof_temp[5144] = [3509,17,3509,30]; + lineof_temp[5763] = [3908,14,3908,49]; + lineof_temp[6881] = [4582,14,4582,42]; + lineof_temp[272] = [280,10,280,36]; + lineof_temp[3033] = [2160,6,2200,7]; + lineof_temp[6229] = [4209,6,4209,31]; + lineof_temp[7212] = [4753,8,4753,20]; + lineof_temp[145] = [172,32,173,58]; + lineof_temp[7191] = [4748,23,4748,50]; + lineof_temp[1771] = [1317,14,1317,25]; + lineof_temp[1057] = [907,24,907,72]; + lineof_temp[1315] = [1003,10,1005,24]; + lineof_temp[4335] = [3032,14,3032,23]; + lineof_temp[5259] = [3589,23,3589,44]; + lineof_temp[7244] = [4782,20,4782,48]; + lineof_temp[3831] = [2638,27,2638,43]; + lineof_temp[15] = [26,6,26,22]; + lineof_temp[4572] = [3163,20,3163,62]; + lineof_temp[6129] = [4165,13,4165,39]; + lineof_temp[2636] = [1906,8,1906,33]; + lineof_temp[2660] = [1975,21,1977,72]; + lineof_temp[6414] = [4315,28,4315,63]; + lineof_temp[7370] = [4833,32,4833,44]; + lineof_temp[5693] = [3867,6,3867,36]; + lineof_temp[1054] = [907,49,907,70]; + lineof_temp[1707] = [1287,8,1287,69]; + lineof_temp[4832] = [3298,14,3298,65]; + lineof_temp[7102] = [4725,10,4725,23]; + lineof_temp[6043] = [4084,10,4084,15]; + lineof_temp[740] = [640,28,640,58]; + lineof_temp[5286] = [3582,33,3582,57]; + lineof_temp[1673] = [1228,10,1228,11]; + lineof_temp[6485] = [4306,14,4306,19]; + lineof_temp[6618] = [4394,14,4394,37]; + lineof_temp[152] = [170,28,170,42]; + lineof_temp[5977] = [4076,18,4076,44]; + lineof_temp[7100] = [4728,8,4728,45]; + lineof_temp[1452] = [1104,15,1104,58]; + lineof_temp[2473] = [1879,8,1879,19]; + lineof_temp[429] = [436,24,436,51]; + lineof_temp[1487] = [1129,10,1129,48]; + lineof_temp[2576] = [1925,29,1929,75]; + lineof_temp[4380] = [3055,18,3055,45]; + lineof_temp[437] = [412,12,412,13]; + lineof_temp[4962] = [3366,20,3394,20]; + lineof_temp[2209] = [1641,18,1641,74]; + lineof_temp[3234] = [2297,11,2297,12]; + lineof_temp[5184] = [3518,2,3530,3]; + lineof_temp[1688] = [1259,8,1271,21]; + lineof_temp[2053] = [1527,22,1530,58]; + lineof_temp[3587] = [2516,10,2539,10]; + lineof_temp[3562] = [2533,24,2533,70]; + lineof_temp[3221] = [2310,4,2312,15]; + lineof_temp[5056] = [3434,20,3434,30]; + lineof_temp[5566] = [3796,12,3796,22]; + lineof_temp[2335] = [1746,6,1746,31]; + lineof_temp[4813] = [3283,4,3283,18]; + lineof_temp[720] = [624,28,624,63]; + lineof_temp[3140] = [2261,20,2261,54]; + lineof_temp[3773] = [2657,25,2657,53]; + lineof_temp[4901] = [3344,10,3344,13]; + lineof_temp[5801] = [3938,19,3938,56]; + lineof_temp[2458] = [1869,18,1869,33]; + lineof_temp[2526] = [1966,8,1966,19]; + lineof_temp[6455] = [4324,14,4324,65]; + lineof_temp[16] = [26,6,26,22]; + lineof_temp[2114] = [1571,10,1571,22]; + lineof_temp[5386] = [3669,30,3669,31]; + lineof_temp[5538] = [3766,22,3766,38]; + lineof_temp[953] = [800,28,800,29]; + lineof_temp[1713] = [1284,6,1290,7]; + lineof_temp[4725] = [3243,19,3243,41]; + lineof_temp[6041] = [4089,6,4117,6]; + lineof_temp[3373] = [2416,23,2416,24]; + lineof_temp[5820] = [3951,27,3951,35]; + lineof_temp[7044] = [4696,25,4696,41]; + lineof_temp[5291] = [3605,10,3605,38]; + lineof_temp[5370] = [3648,12,3648,30]; + lineof_temp[5446] = [3710,6,3710,20]; + lineof_temp[3763] = [2649,8,2651,19]; + lineof_temp[4759] = [3250,15,3250,37]; + lineof_temp[6901] = [4600,44,4600,72]; + lineof_temp[1835] = [1377,10,1377,27]; + lineof_temp[5332] = [3635,16,3635,65]; + lineof_temp[5980] = [4074,19,4074,21]; + lineof_temp[1247] = [980,26,980,35]; + lineof_temp[1736] = [1307,12,1307,58]; + lineof_temp[2407] = [1818,6,1818,34]; + lineof_temp[7344] = [4828,14,4828,47]; + lineof_temp[5085] = [3471,14,3471,35]; + lineof_temp[1535] = [1161,14,1161,38]; + lineof_temp[1662] = [1233,18,1233,20]; + lineof_temp[2731] = [2013,10,2013,25]; + lineof_temp[5900] = [3998,4,3998,12]; + lineof_temp[1297] = [999,23,999,47]; + lineof_temp[2632] = [1948,12,1948,22]; + lineof_temp[6788] = [4517,14,4517,50]; + lineof_temp[1319] = [1000,12,1000,18]; + lineof_temp[2937] = [2129,6,2129,28]; + lineof_temp[4610] = [3171,6,3171,15]; + lineof_temp[5698] = [3868,4,3868,40]; + lineof_temp[63] = [91,9,91,30]; + lineof_temp[4644] = [3198,6,3198,51]; + lineof_temp[5586] = [3810,14,3810,42]; + lineof_temp[2702] = [1993,14,1993,61]; + lineof_temp[3350] = [2405,12,2405,31]; + lineof_temp[1735] = [1308,12,1308,39]; + lineof_temp[5774] = [3913,8,3913,20]; + lineof_temp[5885] = [3977,14,3977,15]; + lineof_temp[555] = [517,12,520,97]; + lineof_temp[786] = [669,8,669,41]; + lineof_temp[1120] = [862,30,862,63]; + lineof_temp[4643] = [3198,14,3198,49]; + lineof_temp[2356] = [1765,4,1765,48]; + lineof_temp[6337] = [4269,23,4269,54]; + lineof_temp[5720] = [3883,4,3883,33]; + lineof_temp[6070] = [4123,6,4123,17]; + lineof_temp[6743] = [4491,12,4491,22]; + lineof_temp[4036] = [2805,15,2805,27]; + lineof_temp[4084] = [2843,10,2843,48]; + lineof_temp[4524] = [3141,10,3144,22]; + lineof_temp[962] = [785,24,785,52]; + lineof_temp[944] = [808,28,809,40]; + lineof_temp[3304] = [2373,18,2373,34]; + lineof_temp[4880] = [3318,6,3319,73]; + lineof_temp[434] = [419,10,419,46]; + lineof_temp[1027] = [834,14,834,37]; + lineof_temp[1919] = [1444,20,1444,40]; + lineof_temp[5779] = [3920,12,3920,48]; + lineof_temp[5967] = [4061,14,4061,42]; + lineof_temp[7040] = [4686,8,4686,36]; + lineof_temp[264] = [276,10,276,36]; + lineof_temp[1739] = [1306,8,1309,54]; + lineof_temp[5437] = [3709,8,3709,77]; + lineof_temp[6523] = [4353,26,4353,42]; + lineof_temp[4307] = [2988,8,2988,22]; + lineof_temp[4936] = [3379,40,3380,53]; + lineof_temp[5498] = [3748,25,3748,26]; + lineof_temp[5827] = [3948,15,3948,32]; + lineof_temp[6461] = [4322,25,4322,26]; + lineof_temp[2488] = [1885,19,1885,21]; + lineof_temp[6539] = [4360,21,4360,37]; + lineof_temp[3288] = [2349,15,2349,18]; + lineof_temp[4724] = [3244,6,3244,41]; + lineof_temp[2318] = [1727,4,1727,50]; + lineof_temp[3836] = [2682,12,2682,33]; + lineof_temp[1653] = [1239,14,1239,29]; + lineof_temp[2315] = [1726,6,1726,35]; + lineof_temp[2847] = [2066,37,2066,49]; + lineof_temp[3980] = [2782,23,2782,51]; + lineof_temp[5623] = [3830,4,3830,14]; + lineof_temp[2788] = [2030,6,2030,21]; + lineof_temp[5823] = [3951,14,3951,36]; + lineof_temp[6602] = [4399,28,4399,62]; + lineof_temp[7087] = [4724,23,4724,38]; + lineof_temp[490] = [457,4,457,34]; + lineof_temp[6441] = [4319,14,4320,65]; + lineof_temp[5952] = [4043,12,4046,96]; + lineof_temp[6140] = [4166,12,4166,19]; + lineof_temp[730] = [635,24,635,51]; + lineof_temp[1300] = [1000,12,1000,18]; + lineof_temp[3039] = [2153,6,2153,35]; + lineof_temp[3391] = [2419,14,2423,90]; + lineof_temp[1213] = [955,21,955,32]; + lineof_temp[982] = [763,20,763,52]; + lineof_temp[2539] = [1914,35,1915,71]; + lineof_temp[1563] = [1173,15,1173,18]; + lineof_temp[4185] = [2898,4,2898,35]; + lineof_temp[6779] = [4513,22,4513,50]; + lineof_temp[1671] = [1250,6,1250,49]; + lineof_temp[2408] = [1817,4,1817,39]; + lineof_temp[241] = [258,10,258,27]; + lineof_temp[5132] = [3501,8,3501,20]; + lineof_temp[480] = [460,6,460,15]; + lineof_temp[5121] = [3477,17,3477,43]; + lineof_temp[6128] = [4164,13,4164,31]; + lineof_temp[317] = [312,6,312,27]; + lineof_temp[2873] = [2117,4,2117,15]; + lineof_temp[5108] = [3485,10,3485,46]; + lineof_temp[5158] = [3509,2,3509,14]; + lineof_temp[4347] = [3037,20,3037,41]; + lineof_temp[355] = [358,17,358,73]; + lineof_temp[1114] = [856,45,856,65]; + lineof_temp[6566] = [4372,10,4372,32]; + lineof_temp[1955] = [1461,2,1461,12]; + lineof_temp[1144] = [868,30,880,30]; + lineof_temp[44] = [53,31,53,47]; + lineof_temp[3583] = [2517,10,2539,10]; + lineof_temp[4259] = [2958,10,2958,28]; + lineof_temp[7201] = [4752,10,4752,37]; + lineof_temp[120] = [145,12,145,32]; + lineof_temp[1893] = [1415,22,1415,36]; + lineof_temp[5673] = [3857,6,3857,47]; + lineof_temp[7036] = [4687,28,4687,66]; + lineof_temp[6370] = [4275,4,4275,39]; + lineof_temp[4603] = [3173,6,3173,17]; + lineof_temp[5324] = [3615,18,3615,20]; + lineof_temp[2295] = [1697,6,1702,56]; + lineof_temp[5736] = [3892,14,3892,59]; + lineof_temp[6202] = [4201,22,4201,39]; + lineof_temp[276] = [277,4,277,28]; + lineof_temp[1678] = [1226,32,1226,47]; + lineof_temp[2827] = [2067,22,2067,69]; + lineof_temp[5917] = [4025,26,4025,55]; + lineof_temp[1699] = [1274,28,1274,40]; + lineof_temp[2569] = [1929,37,1929,70]; + lineof_temp[2311] = [1722,6,1722,35]; + lineof_temp[3591] = [2511,14,2511,15]; + lineof_temp[7124] = [4734,23,4734,50]; + lineof_temp[6766] = [4446,10,4446,41]; + lineof_temp[853] = [726,19,726,59]; + lineof_temp[1528] = [1153,17,1153,29]; + lineof_temp[4027] = [2799,2,2799,12]; + lineof_temp[6938] = [4622,41,4622,53]; + lineof_temp[1543] = [1159,10,1159,11]; + lineof_temp[1290] = [720,29,720,61]; + lineof_temp[1274] = [951,22,951,27]; + lineof_temp[1987] = [1466,2,1479,2]; + lineof_temp[4590] = [3159,18,3159,60]; + lineof_temp[6171] = [4184,14,4184,30]; + lineof_temp[878] = [736,10,736,20]; + lineof_temp[1382] = [1054,47,1063,61]; + lineof_temp[2650] = [1974,53,1974,66]; + lineof_temp[3165] = [2233,10,2233,31]; + lineof_temp[3889] = [2725,30,2725,61]; + lineof_temp[3240] = [2287,2,2288,24]; + lineof_temp[3863] = [2695,22,2695,42]; + lineof_temp[5214] = [3548,10,3549,35]; + lineof_temp[5850] = [3963,17,3963,21]; + lineof_temp[2667] = [1971,19,1971,32]; + lineof_temp[5169] = [3525,16,3525,28]; + lineof_temp[7056] = [4702,14,4702,26]; + lineof_temp[7315] = [4826,14,4826,53]; + lineof_temp[3071] = [2235,12,2235,40]; + lineof_temp[2860] = [2105,6,2105,12]; + lineof_temp[6967] = [4643,14,4643,42]; + lineof_temp[7101] = [4726,8,4726,20]; + lineof_temp[2930] = [2136,8,2136,26]; + lineof_temp[3027] = [2163,10,2192,10]; + lineof_temp[868] = [730,14,731,47]; + lineof_temp[1815] = [1358,14,1362,113]; + lineof_temp[4745] = [3256,12,3256,59]; + lineof_temp[6267] = [4234,8,4234,32]; + lineof_temp[6266] = [4235,10,4235,48]; + lineof_temp[785] = [670,18,670,19]; + lineof_temp[1408] = [1029,32,1078,49]; + lineof_temp[4348] = [3040,12,3040,32]; + lineof_temp[5695] = [3869,14,3869,44]; + lineof_temp[250] = [267,8,268,37]; + lineof_temp[2605] = [1941,33,1943,73]; + lineof_temp[5262] = [3595,20,3595,61]; + lineof_temp[6481] = [4328,21,4328,22]; + lineof_temp[6738] = [4493,21,4493,23]; + lineof_temp[1093] = [913,24,925,25]; + lineof_temp[1433] = [1090,24,1090,39]; + lineof_temp[2037] = [1547,14,1551,54]; + lineof_temp[2577] = [1930,24,1930,35]; + lineof_temp[4077] = [2838,14,2838,42]; + lineof_temp[446] = [446,8,446,46]; + lineof_temp[1284] = [831,15,831,60]; + lineof_temp[4605] = [3172,15,3172,16]; + lineof_temp[1872] = [1401,14,1401,36]; + lineof_temp[2012] = [1498,30,1498,44]; + lineof_temp[5369] = [3648,20,3648,28]; + lineof_temp[6118] = [4136,2,4159,2]; + lineof_temp[4234] = [2932,6,2932,20]; + lineof_temp[5605] = [3777,24,3777,56]; + lineof_temp[2423] = [1834,6,1834,24]; + lineof_temp[5654] = [3852,14,3852,33]; + lineof_temp[2817] = [2061,6,2061,19]; + lineof_temp[3845] = [2690,14,2690,25]; + lineof_temp[5471] = [3733,21,3733,33]; + lineof_temp[217] = [238,18,238,48]; + lineof_temp[1683] = [1268,20,1268,40]; + lineof_temp[6379] = [4292,18,4292,46]; + lineof_temp[4403] = [2974,13,2974,26]; + lineof_temp[6489] = [4334,6,4334,32]; + lineof_temp[699] = [601,16,601,28]; + lineof_temp[6213] = [4187,4,4187,29]; + lineof_temp[1948] = [1461,15,1461,48]; + lineof_temp[4907] = [3342,2,3342,29]; + lineof_temp[5901] = [4002,18,4002,47]; + lineof_temp[2427] = [1838,6,1838,24]; + lineof_temp[3553] = [2523,12,2523,43]; + lineof_temp[5165] = [3518,15,3518,37]; + lineof_temp[3920] = [2694,4,2740,11]; + lineof_temp[6739] = [4493,12,4493,23]; + lineof_temp[6345] = [4269,19,4269,20]; + lineof_temp[4537] = [3132,10,3144,22]; + lineof_temp[81] = [96,34,96,70]; + lineof_temp[2483] = [1885,24,1885,36]; + lineof_temp[2699] = [1988,4,1988,28]; + lineof_temp[4281] = [3005,26,3005,68]; + lineof_temp[4156] = [2883,6,2883,57]; + lineof_temp[6702] = [4464,20,4464,46]; + lineof_temp[7072] = [4696,17,4696,22]; + lineof_temp[4542] = [3128,10,3130,12]; + lineof_temp[134] = [165,28,165,46]; + lineof_temp[509] = [482,10,482,59]; + lineof_temp[24] = [39,4,39,23]; + lineof_temp[5685] = [3863,6,3863,37]; + lineof_temp[1172] = [852,22,852,44]; + lineof_temp[3997] = [2777,6,2778,48]; + lineof_temp[6163] = [4179,6,4182,77]; + lineof_temp[415] = [418,12,418,46]; + lineof_temp[2016] = [1505,33,1505,47]; + lineof_temp[5367] = [3650,12,3658,13]; + lineof_temp[245] = [267,31,267,57]; + lineof_temp[830] = [697,15,697,16]; + lineof_temp[917] = [780,23,780,52]; + lineof_temp[6134] = [4168,39,4168,47]; + lineof_temp[6233] = [4222,18,4222,46]; + lineof_temp[7261] = [4785,19,4785,21]; + lineof_temp[3546] = [2518,23,2518,55]; + lineof_temp[5298] = [3603,43,3603,61]; + lineof_temp[6126] = [4170,4,4170,16]; + lineof_temp[2584] = [1924,14,1924,37]; + lineof_temp[1995] = [1483,13,1483,14]; + lineof_temp[2891] = [2096,2,2101,4]; + lineof_temp[4597] = [3170,19,3170,43]; + lineof_temp[1326] = [1010,20,1010,48]; + lineof_temp[1001] = [761,20,761,46]; + lineof_temp[1780] = [1335,14,1338,109]; + lineof_temp[6332] = [4264,14,4264,30]; + lineof_temp[6537] = [4359,21,4359,33]; + lineof_temp[3582] = [2517,10,2517,23]; + lineof_temp[6013] = [4090,31,4090,43]; + lineof_temp[6683] = [4440,10,4440,33]; + lineof_temp[1501] = [1137,18,1137,36]; + lineof_temp[4169] = [2888,4,2888,35]; + lineof_temp[5477] = [3744,22,3744,68]; + lineof_temp[2206] = [1645,10,1648,81]; + lineof_temp[6636] = [4409,30,4409,61]; + lineof_temp[2901] = [2126,6,2126,26]; + lineof_temp[457] = [454,14,454,20]; + lineof_temp[725] = [629,32,629,72]; + lineof_temp[4140] = [2877,46,2877,63]; + lineof_temp[7116] = [4716,21,4716,37]; + lineof_temp[331] = [332,6,332,17]; + lineof_temp[4152] = [2881,6,2881,58]; + lineof_temp[6417] = [4316,22,4316,63]; + lineof_temp[3833] = [2679,12,2679,24]; + lineof_temp[3352] = [2380,16,2380,18]; + lineof_temp[4184] = [2899,6,2899,73]; + lineof_temp[6661] = [4430,31,4430,59]; + lineof_temp[2125] = [1595,25,1596,67]; + lineof_temp[3323] = [2387,18,2387,28]; + lineof_temp[2940] = [2124,10,2124,15]; + lineof_temp[5053] = [3450,16,3450,26]; + lineof_temp[931] = [818,22,818,34]; + lineof_temp[5492] = [3751,28,3751,40]; + lineof_temp[1853] = [1391,16,1391,67]; + lineof_temp[2168] = [1621,12,1622,61]; + lineof_temp[675] = [592,17,592,29]; + lineof_temp[1022] = [725,4,725,13]; + lineof_temp[6168] = [4177,6,4177,31]; + lineof_temp[6292] = [4229,4,4229,41]; + lineof_temp[4454] = [3083,23,3083,45]; + lineof_temp[4647] = [3197,6,3197,15]; + lineof_temp[3339] = [2392,18,2392,37]; + lineof_temp[1280] = [950,6,950,20]; + lineof_temp[3717] = [2629,10,2629,54]; + lineof_temp[2398] = [1807,4,1807,37]; + lineof_temp[6951] = [4631,14,4631,52]; + lineof_temp[4413] = [2983,4,2983,14]; + lineof_temp[7345] = [4828,14,4828,47]; + lineof_temp[4551] = [3146,10,3146,68]; + lineof_temp[234] = [227,8,227,23]; + lineof_temp[1015] = [727,12,727,13]; + lineof_temp[2794] = [2028,4,2028,34]; + lineof_temp[3431] = [2461,20,2461,56]; + lineof_temp[5392] = [3669,4,3675,15]; + lineof_temp[380] = [384,24,384,42]; + lineof_temp[5086] = [3471,10,3471,11]; + lineof_temp[2856] = [2102,16,2103,54]; + lineof_temp[2456] = [1867,19,1867,61]; + lineof_temp[6012] = [4091,12,4091,38]; + lineof_temp[6562] = [4358,6,4358,31]; + lineof_temp[2349] = [1760,6,1760,31]; + lineof_temp[2810] = [2058,37,2058,50]; + lineof_temp[1181] = [933,20,936,64]; + lineof_temp[1615] = [1215,27,1215,53]; + lineof_temp[163] = [186,18,186,33]; + lineof_temp[4829] = [3261,2,3292,2]; + lineof_temp[1217] = [959,10,959,41]; + lineof_temp[3389] = [2420,16,2423,88]; + lineof_temp[4906] = [3343,2,3344,15]; + lineof_temp[4975] = [3350,14,3350,15]; + lineof_temp[5666] = [3854,21,3854,67]; + lineof_temp[368] = [364,24,364,42]; + lineof_temp[4181] = [2896,4,2896,34]; + lineof_temp[1428] = [997,4,997,29]; + lineof_temp[6891] = [4594,44,4594,72]; + lineof_temp[1372] = [1042,46,1045,66]; + lineof_temp[6130] = [4165,13,4165,39]; + lineof_temp[1413] = [1023,26,1078,53]; + lineof_temp[1979] = [1477,14,1477,39]; + lineof_temp[5364] = [3650,25,3650,46]; + lineof_temp[660] = [586,14,586,39]; + lineof_temp[2507] = [1894,21,1901,72]; + lineof_temp[1145] = [866,38,866,55]; + lineof_temp[3624] = [2553,12,2553,37]; + lineof_temp[5632] = [3837,14,3837,41]; + lineof_temp[1826] = [1355,8,1355,37]; + lineof_temp[3549] = [2519,23,2519,36]; + lineof_temp[5730] = [3887,4,3887,33]; + lineof_temp[3666] = [2584,12,2584,31]; + lineof_temp[4896] = [3338,13,3338,45]; + lineof_temp[447] = [449,6,449,17]; + lineof_temp[2892] = [2095,2,2095,18]; + lineof_temp[4056] = [2823,8,2823,41]; + lineof_temp[4054] = [2819,11,2819,44]; + lineof_temp[1598] = [1201,15,1201,51]; + lineof_temp[6639] = [4409,16,4412,64]; + lineof_temp[340] = [342,10,342,37]; + lineof_temp[745] = [643,32,643,72]; + lineof_temp[3280] = [2353,17,2353,18]; + lineof_temp[3933] = [2746,16,2746,67]; + lineof_temp[3326] = [2385,26,2385,35]; + lineof_temp[3472] = [2481,22,2481,23]; + lineof_temp[4511] = [3142,25,3142,55]; + lineof_temp[5119] = [3481,4,3481,29]; + lineof_temp[5639] = [3846,18,3846,42]; + lineof_temp[1471] = [1106,6,1106,50]; + lineof_temp[2364] = [1773,4,1773,37]; + lineof_temp[2296] = [1696,4,1696,19]; + lineof_temp[4632] = [3185,6,3185,22]; + lineof_temp[6111] = [4156,6,4156,19]; + lineof_temp[6335] = [4267,10,4267,48]; + lineof_temp[6963] = [4627,18,4627,19]; + lineof_temp[795] = [618,11,618,12]; + lineof_temp[3614] = [2554,16,2554,41]; + lineof_temp[4994] = [3416,10,3416,28]; + lineof_temp[1328] = [1010,12,1010,49]; + lineof_temp[4244] = [2942,6,2942,20]; + lineof_temp[6446] = [4317,12,4317,36]; + lineof_temp[737] = [631,16,631,24]; + lineof_temp[4277] = [2995,16,2995,67]; + lineof_temp[1425] = [1009,8,1078,65]; + lineof_temp[3123] = [2271,27,2273,66]; + lineof_temp[4557] = [3157,20,3157,44]; + lineof_temp[4076] = [2838,14,2838,42]; + lineof_temp[1757] = [1328,32,1328,61]; + lineof_temp[537] = [481,14,481,15]; + lineof_temp[1254] = [964,22,964,30]; + lineof_temp[5867] = [3976,18,3976,47]; + lineof_temp[7140] = [4744,8,4744,23]; + lineof_temp[4] = [16,33,16,54]; + lineof_temp[5246] = [3575,16,3575,57]; + lineof_temp[897] = [743,43,743,56]; + lineof_temp[1249] = [979,16,979,26]; + lineof_temp[5124] = [3477,2,3491,2]; + lineof_temp[189] = [210,6,210,28]; + lineof_temp[3823] = [2653,14,2653,15]; + lineof_temp[4961] = [3366,20,3366,29]; + lineof_temp[2653] = [1977,33,1977,68]; + lineof_temp[544] = [478,2,478,12]; + lineof_temp[477] = [461,14,461,15]; + lineof_temp[2923] = [2139,8,2139,26]; + lineof_temp[879] = [736,10,738,24]; + lineof_temp[3580] = [2517,26,2517,31]; + lineof_temp[6047] = [4130,4,4130,20]; + lineof_temp[6154] = [4182,14,4182,39]; + lineof_temp[6841] = [4555,36,4555,64]; + lineof_temp[1960] = [1469,20,1469,46]; + lineof_temp[3538] = [2509,6,2509,21]; + lineof_temp[2051] = [1527,22,1527,34]; + lineof_temp[4782] = [3277,14,3277,41]; + lineof_temp[5401] = [3683,10,3684,17]; + lineof_temp[6159] = [4181,10,4182,74]; + lineof_temp[2685] = [1982,16,1982,26]; + lineof_temp[216] = [235,16,235,42]; + lineof_temp[520] = [491,18,494,96]; + lineof_temp[6186] = [4193,22,4193,53]; + lineof_temp[489] = [458,6,467,6]; + lineof_temp[3848] = [2688,14,2688,54]; + lineof_temp[5409] = [3667,10,3667,12]; + lineof_temp[1101] = [908,22,926,23]; + lineof_temp[4721] = [3243,19,3243,41]; + lineof_temp[6286] = [4237,10,4240,21]; + lineof_temp[3927] = [2745,8,2745,14]; + lineof_temp[4443] = [3076,14,3076,36]; + lineof_temp[431] = [436,16,436,53]; + lineof_temp[475] = [465,10,465,43]; + lineof_temp[1588] = [1190,8,1192,22]; + lineof_temp[5224] = [3546,8,3547,36]; + lineof_temp[1133] = [889,34,889,41]; + lineof_temp[1726] = [1292,6,1292,18]; + lineof_temp[3348] = [2405,20,2405,29]; + lineof_temp[4385] = [3053,14,3056,62]; + lineof_temp[5156] = [3509,17,3509,30]; + lineof_temp[5572] = [3798,10,3798,20]; + lineof_temp[1191] = [941,16,944,73]; + lineof_temp[1] = [16,7,16,28]; + lineof_temp[5465] = [3725,8,3726,19]; + lineof_temp[5999] = [4086,21,4086,61]; + lineof_temp[2216] = [1638,21,1638,59]; + lineof_temp[5495] = [3751,16,3752,40]; + lineof_temp[343] = [350,10,350,46]; + lineof_temp[1469] = [1108,6,1113,17]; + lineof_temp[1692] = [1256,2,1271,25]; + lineof_temp[2857] = [2102,16,2103,54]; + lineof_temp[5602] = [3816,4,3816,14]; + lineof_temp[6496] = [4338,21,4338,37]; + lineof_temp[2369] = [1780,6,1780,37]; + lineof_temp[2527] = [1965,21,1965,53]; + lineof_temp[7251] = [4786,14,4786,37]; + lineof_temp[506] = [478,15,478,53]; + lineof_temp[4374] = [3050,22,3050,49]; + lineof_temp[5208] = [3559,14,3559,22]; + lineof_temp[5267] = [3592,30,3592,48]; + lineof_temp[5795] = [3932,6,3932,30]; + lineof_temp[2302] = [1711,4,1711,34]; + lineof_temp[6291] = [4230,6,4230,31]; + lineof_temp[1971] = [1472,8,1472,66]; + lineof_temp[3824] = [2644,6,2652,8]; + lineof_temp[4081] = [2840,19,2840,61]; + lineof_temp[6092] = [4148,21,4148,23]; + lineof_temp[5450] = [3707,4,3707,22]; + lineof_temp[181] = [208,12,208,23]; + lineof_temp[4816] = [3290,14,3290,24]; + lineof_temp[5783] = [3918,8,3920,68]; + lineof_temp[4448] = [3079,8,3079,39]; + lineof_temp[402] = [403,6,403,15]; + lineof_temp[5254] = [3567,10,3567,15]; + lineof_temp[1354] = [1033,40,1034,71]; + lineof_temp[2478] = [1881,10,1881,37]; + lineof_temp[3278] = [2355,8,2355,24]; + lineof_temp[5721] = [3886,24,3886,31]; + lineof_temp[1387] = [1064,50,1068,60]; + lineof_temp[4433] = [2969,4,2984,15]; + lineof_temp[6305] = [4249,19,4249,22]; + lineof_temp[2504] = [1896,25,1901,70]; + lineof_temp[5579] = [3779,16,3779,27]; + lineof_temp[6621] = [4410,31,4410,43]; + lineof_temp[6216] = [4212,18,4212,46]; + lineof_temp[2231] = [1635,11,1635,12]; + lineof_temp[6919] = [4610,28,4610,66]; + lineof_temp[2041] = [1553,14,1555,33]; + lineof_temp[2544] = [1911,29,1915,75]; + lineof_temp[5133] = [3499,8,3499,30]; + lineof_temp[6005] = [4089,18,4089,47]; + lineof_temp[1755] = [1322,18,1326,98]; + lineof_temp[2867] = [2118,20,2118,48]; + lineof_temp[2821] = [2050,11,2050,13]; + lineof_temp[3765] = [2646,22,2647,66]; + lineof_temp[7041] = [4683,14,4683,17]; + lineof_temp[515] = [487,14,487,33]; + lineof_temp[676] = [592,13,592,14]; + lineof_temp[2563] = [1923,16,1923,37]; + lineof_temp[5411] = [3667,2,3686,2]; + lineof_temp[5800] = [3937,23,3937,34]; + lineof_temp[6143] = [4165,4,4165,40]; + lineof_temp[542] = [478,15,478,53]; + lineof_temp[2517] = [1905,10,1905,28]; + lineof_temp[4766] = [3268,14,3268,41]; + lineof_temp[4091] = [2840,19,2840,61]; + lineof_temp[2666] = [1972,8,1972,52]; + lineof_temp[6756] = [4459,12,4473,13]; + lineof_temp[2491] = [1884,8,1884,33]; + lineof_temp[3675] = [2583,18,2583,19]; + lineof_temp[4592] = [3159,2,3159,15]; + lineof_temp[935] = [805,30,805,57]; + lineof_temp[4704] = [3227,2,3227,40]; + lineof_temp[2880] = [2108,4,2108,45]; + lineof_temp[3272] = [2349,21,2349,50]; + lineof_temp[4953] = [3389,26,3389,38]; + lineof_temp[1712] = [1284,6,1284,17]; + lineof_temp[2758] = [2031,21,2031,65]; + lineof_temp[525] = [485,10,485,33]; + lineof_temp[5084] = [3472,2,3472,13]; + lineof_temp[161] = [154,26,154,28]; + lineof_temp[4527] = [3134,21,3134,25]; + lineof_temp[6775] = [4504,10,4504,35]; + lineof_temp[2663] = [1975,8,1978,19]; + lineof_temp[3661] = [2578,6,2578,44]; + lineof_temp[5404] = [3681,6,3684,20]; + lineof_temp[4485] = [3105,10,3114,33]; + lineof_temp[5421] = [3700,14,3700,51]; + lineof_temp[4186] = [2901,14,2901,39]; + lineof_temp[6577] = [4373,8,4377,75]; + lineof_temp[7125] = [4734,23,4734,50]; + lineof_temp[5046] = [3450,29,3450,63]; + lineof_temp[6100] = [4151,21,4151,23]; + lineof_temp[7262] = [4785,10,4785,21]; + lineof_temp[4046] = [2805,15,2805,27]; + lineof_temp[84] = [96,14,96,71]; + lineof_temp[183] = [209,12,209,23]; + lineof_temp[1086] = [915,34,915,51]; + lineof_temp[1336] = [1019,41,1019,61]; + lineof_temp[2082] = [1537,14,1541,66]; + lineof_temp[2853] = [2097,27,2097,48]; + lineof_temp[3995] = [2779,4,2779,24]; + lineof_temp[5456] = [3690,2,3690,11]; + lineof_temp[7008] = [4649,32,4649,34]; + lineof_temp[5311] = [3618,40,3618,47]; + lineof_temp[281] = [285,12,286,41]; + lineof_temp[1911] = [1433,28,1433,69]; + lineof_temp[4620] = [3167,24,3167,43]; + lineof_temp[2002] = [1491,8,1491,20]; + lineof_temp[4397] = [2970,17,2970,35]; + lineof_temp[413] = [414,8,414,28]; + lineof_temp[5283] = [3587,14,3587,15]; + lineof_temp[5969] = [4070,22,4070,50]; + lineof_temp[5024] = [3438,24,3438,74]; + lineof_temp[5229] = [3537,4,3537,13]; + lineof_temp[6034] = [4105,18,4105,19]; + lineof_temp[788] = [621,18,621,47]; + lineof_temp[1994] = [1483,17,1483,29]; + lineof_temp[890] = [745,23,746,77]; + lineof_temp[1572] = [1186,4,1186,35]; + lineof_temp[148] = [176,38,176,49]; + lineof_temp[1250] = [975,22,975,43]; + lineof_temp[5160] = [3508,15,3508,37]; + lineof_temp[6467] = [4328,25,4328,41]; + lineof_temp[1050] = [906,38,906,53]; + lineof_temp[4840] = [3305,21,3305,71]; + lineof_temp[7010] = [4646,20,4673,26]; + lineof_temp[5419] = [3698,12,3698,40]; + lineof_temp[5594] = [3809,19,3809,41]; + lineof_temp[2587] = [1933,20,1933,35]; + lineof_temp[6285] = [4237,10,4237,25]; + lineof_temp[1006] = [755,16,755,48]; + lineof_temp[6221] = [4214,27,4214,62]; + lineof_temp[119] = [146,14,146,29]; + lineof_temp[2360] = [1769,4,1769,54]; + lineof_temp[4533] = [3133,10,3144,22]; + lineof_temp[2274] = [1695,14,1695,24]; + lineof_temp[4798] = [3287,14,3287,23]; + lineof_temp[1346] = [1031,43,1031,75]; + lineof_temp[5059] = [3417,8,3423,10]; + lineof_temp[6545] = [4366,18,4366,42]; + lineof_temp[1939] = [1385,8,1452,8]; + lineof_temp[5315] = [3619,20,3619,51]; + lineof_temp[4241] = [2937,4,2937,31]; + lineof_temp[4430] = [2969,22,2969,33]; + lineof_temp[6142] = [4166,4,4168,69]; + lineof_temp[1404] = [1040,38,1078,45]; + lineof_temp[1525] = [1154,10,1154,58]; + lineof_temp[1878] = [1412,28,1412,55]; + lineof_temp[6341] = [4272,10,4272,21]; + lineof_temp[3212] = [2308,19,2309,57]; + lineof_temp[6789] = [4516,12,4516,35]; + lineof_temp[174] = [141,4,141,25]; + lineof_temp[367] = [365,6,365,9]; + lineof_temp[2874] = [2117,4,2119,15]; + lineof_temp[6531] = [4352,8,4352,33]; + lineof_temp[1480] = [1116,8,1119,57]; + lineof_temp[3050] = [2211,10,2211,56]; + lineof_temp[352] = [343,2,343,33]; + lineof_temp[5115] = [3482,21,3482,60]; + lineof_temp[3015] = [2181,16,2181,34]; + lineof_temp[6439] = [4319,23,4319,25]; + lineof_temp[397] = [404,14,404,66]; + lineof_temp[6611] = [4403,20,4403,58]; + lineof_temp[5293] = [3605,2,3605,40]; + lineof_temp[4818] = [3290,6,3290,26]; + lineof_temp[7077] = [4715,17,4715,33]; + lineof_temp[1776] = [1336,18,1336,64]; + lineof_temp[3055] = [2205,22,2205,38]; + lineof_temp[6445] = [4318,14,4320,65]; + lineof_temp[2314] = [1723,4,1723,50]; + lineof_temp[632] = [539,6,557,8]; + lineof_temp[925] = [799,25,799,58]; + lineof_temp[3096] = [2252,16,2252,53]; + lineof_temp[436] = [415,6,415,39]; + lineof_temp[6853] = [4526,12,4560,19]; + lineof_temp[6941] = [4622,8,4622,33]; + lineof_temp[2979] = [2167,16,2167,28]; + lineof_temp[3363] = [2372,8,2372,58]; + lineof_temp[1458] = [1112,27,1112,72]; + lineof_temp[1657] = [1241,24,1241,71]; + lineof_temp[5116] = [3482,15,3482,18]; + lineof_temp[4136] = [2872,6,2874,19]; + lineof_temp[7144] = [4743,8,4744,23]; + lineof_temp[3502] = [2473,12,2473,17]; + lineof_temp[7217] = [4765,20,4765,48]; + lineof_temp[6892] = [4594,44,4594,72]; + lineof_temp[3214] = [2311,21,2311,49]; + lineof_temp[3356] = [2375,8,2375,25]; + lineof_temp[1802] = [1352,18,1352,40]; + lineof_temp[3806] = [2669,25,2669,53]; + lineof_temp[2572] = [1928,35,1929,71]; + lineof_temp[5381] = [3670,10,3670,31]; + lineof_temp[7022] = [4680,14,4680,58]; + lineof_temp[991] = [771,31,773,72]; + lineof_temp[951] = [808,28,809,40]; + lineof_temp[3225] = [2308,4,2312,15]; + lineof_temp[3441] = [2468,4,2468,34]; + lineof_temp[3440] = [2468,12,2468,32]; + lineof_temp[5361] = [3653,14,3653,32]; + lineof_temp[2108] = [1578,16,1578,26]; + lineof_temp[718] = [621,18,621,47]; + lineof_temp[101] = [122,14,122,39]; + lineof_temp[3125] = [2274,20,2274,67]; + lineof_temp[69] = [93,44,93,73]; + lineof_temp[5675] = [3859,14,3859,37]; + lineof_temp[7015] = [4642,12,4676,19]; + lineof_temp[4138] = [2877,54,2877,61]; + lineof_temp[4146] = [2879,14,2879,57]; + lineof_temp[4746] = [3256,4,3256,61]; + lineof_temp[1729] = [1282,10,1282,11]; + lineof_temp[2011] = [1498,30,1498,44]; + lineof_temp[4466] = [3094,25,3094,59]; + lineof_temp[3266] = [2344,6,2344,26]; + lineof_temp[118] = [139,4,139,23]; + lineof_temp[2123] = [1596,27,1596,54]; + lineof_temp[2471] = [1878,22,1878,37]; + lineof_temp[5193] = [3538,8,3538,56]; + lineof_temp[4976] = [3349,4,3349,27]; + lineof_temp[6422] = [4315,14,4315,25]; + lineof_temp[1578] = [1191,46,1191,63]; + lineof_temp[5662] = [3854,21,3854,67]; + lineof_temp[6940] = [4622,33,4622,55]; + lineof_temp[2452] = [1865,18,1865,34]; + lineof_temp[4756] = [3251,10,3251,12]; + lineof_temp[5777] = [3912,6,3915,66]; + lineof_temp[6822] = [4543,44,4543,70]; + lineof_temp[952] = [807,22,807,58]; + lineof_temp[5112] = [3487,10,3487,48]; + lineof_temp[6277] = [4239,10,4239,20]; + lineof_temp[4162] = [2887,14,2887,75]; + lineof_temp[3054] = [2206,2,2206,52]; + lineof_temp[4310] = [3018,25,3018,36]; + lineof_temp[6902] = [4600,44,4600,72]; + lineof_temp[1398] = [1075,48,1075,76]; + lineof_temp[2706] = [1991,4,1991,39]; + lineof_temp[4222] = [2916,6,2916,18]; + lineof_temp[5790] = [3924,14,3924,42]; + lineof_temp[6386] = [4290,8,4290,33]; + lineof_temp[4219] = [2914,14,2914,45]; + lineof_temp[2431] = [1842,6,1842,29]; + lineof_temp[4223] = [2915,4,2915,28]; + lineof_temp[6751] = [4475,12,4480,14]; + lineof_temp[7377] = [4840,2,4841,40]; + lineof_temp[1892] = [1415,34,1415,36]; + lineof_temp[3425] = [2370,6,2370,41]; + lineof_temp[4969] = [3396,22,3396,52]; + lineof_temp[450] = [447,6,447,44]; + lineof_temp[2710] = [2000,12,2000,69]; + lineof_temp[1719] = [1296,8,1296,69]; + lineof_temp[107] = [124,6,124,37]; + lineof_temp[5619] = [3827,4,3827,18]; + lineof_temp[1401] = [1073,44,1075,79]; + lineof_temp[2275] = [1695,6,1695,26]; + lineof_temp[612] = [540,8,540,21]; + lineof_temp[1104] = [906,31,906,35]; + lineof_temp[2662] = [1975,8,1975,18]; + lineof_temp[5778] = [3911,4,3911,41]; + lineof_temp[904] = [755,16,755,48]; + lineof_temp[3741] = [2643,21,2643,68]; + lineof_temp[5609] = [3823,16,3823,27]; + lineof_temp[1595] = [1184,2,1197,2]; + lineof_temp[6173] = [4185,21,4185,33]; + lineof_temp[822] = [692,10,692,24]; + lineof_temp[2938] = [2128,6,2128,35]; + lineof_temp[5831] = [3960,24,3960,65]; + lineof_temp[2840] = [2074,2,2074,12]; + lineof_temp[1231] = [969,27,969,29]; + lineof_temp[6790] = [4519,22,4519,50]; + lineof_temp[1409] = [1029,32,1078,49]; + lineof_temp[4473] = [3094,10,3094,22]; + lineof_temp[5711] = [3882,6,3882,17]; + lineof_temp[6166] = [4178,6,4178,18]; + lineof_temp[1750] = [1324,24,1324,70]; + lineof_temp[5793] = [3879,10,3879,16]; + lineof_temp[7257] = [4787,20,4787,44]; + lineof_temp[193] = [220,7,220,25]; + lineof_temp[659] = [585,19,585,57]; + lineof_temp[960] = [785,32,785,50]; + lineof_temp[5832] = [3960,20,3960,21]; + lineof_temp[2084] = [1508,18,1508,28]; + lineof_temp[2405] = [1816,6,1816,33]; + lineof_temp[4020] = [2800,13,2800,35]; + lineof_temp[4564] = [3160,19,3160,47]; + lineof_temp[3386] = [2421,20,2421,66]; + lineof_temp[3152] = [2253,8,2253,18]; + lineof_temp[5003] = [3419,12,3419,50]; + lineof_temp[915] = [779,21,779,46]; + lineof_temp[4144] = [2876,6,2877,75]; + lineof_temp[4034] = [2792,26,2792,63]; + lineof_temp[5557] = [3791,10,3793,39]; + lineof_temp[6344] = [4269,23,4269,54]; + lineof_temp[154] = [166,26,166,41]; + lineof_temp[5513] = [3733,48,3733,60]; + lineof_temp[6453] = [4324,22,4324,63]; + lineof_temp[6808] = [4559,18,4559,56]; + lineof_temp[6665] = [4431,12,4431,51]; + lineof_temp[4282] = [3005,18,3005,70]; + lineof_temp[4566] = [3161,17,3161,32]; + lineof_temp[4797] = [3286,22,3286,47]; + lineof_temp[531] = [483,25,483,60]; + lineof_temp[4325] = [3029,36,3029,50]; + lineof_temp[4578] = [3162,16,3162,49]; + lineof_temp[6438] = [4319,28,4319,63]; + lineof_temp[2007] = [1496,14,1496,41]; + lineof_temp[3353] = [2376,8,2379,10]; + lineof_temp[4708] = [3226,2,3232,3]; + lineof_temp[5322] = [3616,10,3616,47]; + lineof_temp[4633] = [3184,4,3184,21]; + lineof_temp[1759] = [1329,18,1329,29]; + lineof_temp[1166] = [854,22,854,43]; + lineof_temp[2877] = [2115,4,2115,15]; + lineof_temp[6862] = [4570,22,4570,50]; + lineof_temp[71] = [93,14,93,74]; + lineof_temp[4032] = [2798,2,2801,28]; + lineof_temp[6680] = [4442,14,4445,58]; + lineof_temp[3095] = [2247,42,2247,59]; + lineof_temp[455] = [445,4,450,5]; + lineof_temp[2149] = [1566,11,1566,12]; + lineof_temp[3327] = [2385,18,2385,37]; + lineof_temp[5843] = [3965,14,3965,38]; + lineof_temp[6882] = [4583,20,4583,44]; + lineof_temp[2411] = [1822,6,1822,30]; + lineof_temp[3192] = [2292,27,2292,47]; + lineof_temp[3253] = [2332,13,2332,14]; + lineof_temp[4522] = [3141,19,3141,20]; + lineof_temp[47] = [70,6,70,29]; + lineof_temp[4127] = [2870,8,2870,73]; + lineof_temp[5241] = [3574,44,3574,51]; + lineof_temp[91] = [106,6,106,22]; + lineof_temp[2537] = [1915,37,1915,70]; + lineof_temp[2729] = [2012,10,2012,38]; + lineof_temp[7074] = [4696,6,4713,7]; + lineof_temp[2886] = [2104,2,2120,3]; + lineof_temp[1610] = [1213,12,1213,24]; + lineof_temp[5135] = [3496,2,3504,6]; + lineof_temp[7155] = [4740,8,4740,24]; + lineof_temp[99] = [120,6,120,22]; + lineof_temp[1859] = [1395,24,1395,34]; + lineof_temp[2283] = [1699,23,1701,63]; + lineof_temp[1689] = [1258,6,1258,18]; + lineof_temp[2377] = [1788,6,1788,38]; + lineof_temp[6079] = [4142,8,4142,27]; + lineof_temp[6074] = [4136,16,4136,39]; + lineof_temp[6587] = [4418,16,4418,44]; + lineof_temp[1763] = [1328,18,1329,29]; + lineof_temp[5591] = [3812,8,3812,27]; + lineof_temp[6637] = [4409,26,4409,27]; + lineof_temp[2346] = [1755,4,1755,34]; + lineof_temp[3119] = [2272,29,2272,58]; + lineof_temp[4370] = [3047,20,3047,21]; + lineof_temp[936] = [804,30,804,76]; + lineof_temp[4872] = [3309,8,3315,56]; + lineof_temp[891] = [747,10,747,24]; + lineof_temp[5458] = [3689,24,3689,51]; + lineof_temp[2052] = [1527,22,1530,58]; + lineof_temp[6152] = [4181,11,4181,28]; + lineof_temp[4661] = [3210,8,3210,74]; + lineof_temp[2352] = [1761,4,1761,45]; + lineof_temp[5853] = [3962,4,3962,17]; + lineof_temp[263] = [276,10,276,36]; + lineof_temp[1760] = [1328,32,1328,61]; + lineof_temp[6684] = [4447,32,4447,60]; + lineof_temp[238] = [221,4,221,24]; + lineof_temp[1067] = [910,29,910,58]; + lineof_temp[86] = [94,6,94,17]; + lineof_temp[4941] = [3376,32,3376,58]; + lineof_temp[1569] = [1184,14,1184,43]; + lineof_temp[6460] = [4322,29,4322,45]; + lineof_temp[1392] = [1064,49,1072,63]; + lineof_temp[6250] = [4224,25,4224,52]; + lineof_temp[80] = [96,49,96,69]; + lineof_temp[3254] = [2332,4,2332,14]; + lineof_temp[6153] = [4182,14,4182,39]; + lineof_temp[7012] = [4645,18,4673,28]; + lineof_temp[2997] = [2185,26,2185,53]; + lineof_temp[4375] = [3050,22,3050,49]; + lineof_temp[5710] = [3881,18,3881,39]; + lineof_temp[188] = [211,4,211,54]; + lineof_temp[3114] = [2263,33,2263,55]; + lineof_temp[4500] = [3131,22,3131,43]; + lineof_temp[4247] = [2943,4,2943,26]; + lineof_temp[913] = [758,18,760,53]; + lineof_temp[4919] = [3353,8,3353,27]; + lineof_temp[5876] = [3978,8,3978,39]; + lineof_temp[1827] = [1342,14,1342,28]; + lineof_temp[4731] = [3242,6,3242,16]; + lineof_temp[5009] = [3427,14,3427,26]; + lineof_temp[7047] = [4697,24,4697,53]; + lineof_temp[1288] = [724,2,830,4]; + lineof_temp[3930] = [2746,20,2746,26]; + lineof_temp[5963] = [4057,22,4057,48]; + lineof_temp[2366] = [1775,4,1775,47]; + lineof_temp[2553] = [1922,37,1922,70]; + lineof_temp[2807] = [2058,14,2058,34]; + lineof_temp[3804] = [2667,19,2667,77]; + lineof_temp[1206] = [952,18,952,50]; + lineof_temp[1238] = [978,26,978,35]; + lineof_temp[1529] = [1153,13,1153,14]; + lineof_temp[2186] = [1626,8,1629,90]; + lineof_temp[5469] = [3723,12,3723,15]; + lineof_temp[5543] = [3780,8,3780,56]; + lineof_temp[1077] = [919,39,919,66]; + lineof_temp[2403] = [1814,6,1814,34]; + lineof_temp[3565] = [2532,20,2535,154]; + lineof_temp[4270] = [2991,12,2991,26]; + lineof_temp[160] = [181,20,181,44]; + lineof_temp[4338] = [3029,16,3029,67]; + lineof_temp[246] = [267,31,267,57]; + lineof_temp[2281] = [1700,25,1701,61]; + lineof_temp[3379] = [2415,14,2417,37]; + lineof_temp[4163] = [2887,14,2887,75]; + lineof_temp[3890] = [2725,30,2725,61]; + lineof_temp[7246] = [4780,12,4780,27]; + lineof_temp[7183] = [4749,21,4749,36]; + lineof_temp[1396] = [1077,44,1077,59]; + lineof_temp[1554] = [1173,21,1173,50]; + lineof_temp[305] = [297,12,298,41]; + lineof_temp[622] = [563,26,563,37]; + lineof_temp[756] = [648,37,648,77]; + lineof_temp[5815] = [3934,6,3934,21]; + lineof_temp[7169] = [4734,23,4734,50]; + lineof_temp[7282] = [4800,14,4800,42]; + lineof_temp[1215] = [960,20,960,28]; + lineof_temp[1550] = [1171,14,1171,51]; + lineof_temp[2562] = [1923,24,1923,35]; + lineof_temp[2818] = [2060,4,2060,14]; + lineof_temp[2384] = [1793,4,1793,35]; + lineof_temp[3629] = [2551,29,2551,53]; + lineof_temp[3] = [16,33,16,54]; + lineof_temp[2172] = [1619,8,1622,64]; + lineof_temp[4073] = [2811,2,2811,12]; + lineof_temp[21] = [38,6,38,21]; + lineof_temp[3989] = [2779,27,2779,55]; + lineof_temp[1338] = [1024,38,1024,66]; + lineof_temp[2196] = [1635,15,1635,50]; + lineof_temp[5406] = [3677,10,3677,12]; + lineof_temp[6044] = [4083,27,4083,46]; + lineof_temp[7059] = [4701,12,4705,60]; + lineof_temp[6369] = [4276,6,4276,31]; + lineof_temp[1119] = [862,30,862,63]; + lineof_temp[1227] = [970,26,970,34]; + lineof_temp[2722] = [1857,29,1857,47]; + lineof_temp[2815] = [2053,10,2053,65]; + lineof_temp[4847] = [3303,19,3303,21]; + lineof_temp[3090] = [2245,18,2245,38]; + lineof_temp[1349] = [1030,40,1031,76]; + lineof_temp[2790] = [2029,22,2029,67]; + lineof_temp[4517] = [3143,26,3143,39]; + lineof_temp[563] = [527,8,527,55]; + lineof_temp[1984] = [1466,15,1466,50]; + lineof_temp[4768] = [3267,14,3267,60]; + lineof_temp[1388] = [1070,54,1072,61]; + lineof_temp[5472] = [3733,21,3733,33]; + lineof_temp[3156] = [2246,8,2246,35]; + lineof_temp[3210] = [2309,21,2309,49]; + lineof_temp[5016] = [3432,12,3432,40]; + lineof_temp[6320] = [4260,18,4260,43]; + lineof_temp[2954] = [2157,17,2157,18]; + lineof_temp[4583] = [3161,10,3161,14]; + lineof_temp[5791] = [3924,6,3924,44]; + lineof_temp[3439] = [2468,12,2468,32]; + lineof_temp[1546] = [1158,2,1158,12]; + lineof_temp[4509] = [3134,28,3134,49]; + lineof_temp[7120] = [4715,6,4715,34]; + lineof_temp[1646] = [1227,15,1227,50]; + lineof_temp[2242] = [1667,10,1667,27]; + lineof_temp[5895] = [4000,6,4000,17]; + lineof_temp[3449] = [2462,19,2462,23]; + lineof_temp[4958] = [3367,28,3367,38]; + lineof_temp[5128] = [3476,2,3491,2]; + lineof_temp[5218] = [3555,18,3555,26]; + lineof_temp[3623] = [2554,16,2554,41]; + lineof_temp[6470] = [4329,24,4329,59]; + lineof_temp[5765] = [3908,6,3908,51]; + lineof_temp[6727] = [4481,25,4483,71]; + lineof_temp[6812] = [4532,22,4532,50]; + lineof_temp[930] = [819,26,819,72]; + lineof_temp[6195] = [4197,14,4197,41]; + lineof_temp[6987] = [4659,44,4659,72]; + lineof_temp[1539] = [1163,14,1163,36]; + lineof_temp[2756] = [2029,22,2029,67]; + lineof_temp[5076] = [3407,20,3407,38]; + lineof_temp[6579] = [4371,4,4371,47]; + lineof_temp[7104] = [4724,17,4724,20]; + lineof_temp[787] = [622,14,622,15]; + lineof_temp[4231] = [2927,4,2927,29]; + lineof_temp[4593] = [3159,2,3164,14]; + lineof_temp[1526] = [1154,10,1154,58]; + lineof_temp[3866] = [2702,12,2702,75]; + lineof_temp[6278] = [4239,10,4240,21]; + lineof_temp[550] = [513,8,513,27]; + lineof_temp[1200] = [836,6,836,15]; + lineof_temp[2078] = [1539,20,1539,66]; + lineof_temp[3111] = [2260,22,2260,54]; + lineof_temp[7177] = [4732,4,4732,38]; + lineof_temp[142] = [172,33,172,55]; + lineof_temp[416] = [417,10,417,42]; + lineof_temp[3707] = [2613,10,2620,10]; + lineof_temp[7021] = [4680,14,4680,58]; + lineof_temp[7065] = [4699,16,4699,21]; + lineof_temp[2413] = [1824,6,1824,40]; + lineof_temp[3516] = [2457,2,2495,3]; + lineof_temp[3169] = [2230,12,2230,24]; + lineof_temp[2271] = [1661,10,1661,20]; + lineof_temp[2907] = [2130,20,2130,54]; + lineof_temp[1518] = [1147,16,1147,56]; + lineof_temp[5657] = [3851,17,3851,18]; + lineof_temp[6657] = [4425,14,4428,58]; + lineof_temp[4147] = [2879,14,2879,57]; + lineof_temp[5153] = [3512,2,3512,22]; + lineof_temp[5207] = [3546,8,3547,36]; + lineof_temp[364] = [366,12,366,25]; + lineof_temp[2796] = [2043,14,2043,45]; + lineof_temp[6245] = [4226,10,4226,43]; + lineof_temp[3145] = [2258,10,2258,25]; + lineof_temp[987] = [773,43,773,68]; + lineof_temp[3012] = [2179,29,2180,67]; + lineof_temp[3482] = [2484,22,2484,23]; + lineof_temp[3519] = [2499,15,2499,57]; + lineof_temp[5014] = [3432,20,3432,38]; + lineof_temp[1090] = [913,38,913,57]; + lineof_temp[2251] = [1677,10,1677,21]; + lineof_temp[4713] = [3237,4,3237,27]; + lineof_temp[5164] = [3507,20,3507,37]; + lineof_temp[829] = [697,19,697,52]; + lineof_temp[1312] = [1003,25,1003,48]; + lineof_temp[5258] = [3589,23,3589,44]; + lineof_temp[2669] = [1980,20,1980,40]; + lineof_temp[933] = [818,22,821,79]; + lineof_temp[1579] = [1191,46,1191,63]; + lineof_temp[5551] = [3788,8,3788,77]; + lineof_temp[6524] = [4354,18,4354,53]; + lineof_temp[33] = [46,6,46,41]; + lineof_temp[1085] = [917,30,917,62]; + lineof_temp[6261] = [4231,14,4231,30]; + lineof_temp[6728] = [4492,27,4492,55]; + lineof_temp[3711] = [2624,20,2624,65]; + lineof_temp[4458] = [3092,10,3092,33]; + lineof_temp[5648] = [3849,14,3849,40]; + lineof_temp[6107] = [4156,22,4156,34]; + lineof_temp[4780] = [3271,8,3272,19]; + lineof_temp[2310] = [1719,4,1719,36]; + lineof_temp[7127] = [4735,21,4735,36]; + lineof_temp[3777] = [2658,19,2659,49]; + lineof_temp[2425] = [1836,6,1836,22]; + lineof_temp[1667] = [1230,14,1230,40]; + lineof_temp[3617] = [2557,30,2557,67]; + lineof_temp[5481] = [3742,16,3746,70]; + lineof_temp[5585] = [3809,19,3809,41]; + lineof_temp[1313] = [1003,20,1003,22]; + lineof_temp[2851] = [2094,10,2094,26]; + lineof_temp[6269] = [4237,28,4237,40]; + lineof_temp[6831] = [4547,36,4547,74]; + lineof_temp[6992] = [4663,44,4663,72]; + lineof_temp[3543] = [2513,8,2513,39]; + lineof_temp[4025] = [2799,15,2799,28]; + lineof_temp[1209] = [987,16,987,33]; + lineof_temp[7202] = [4755,21,4755,37]; + lineof_temp[605] = [542,16,542,18]; + lineof_temp[3642] = [2546,10,2566,11]; + lineof_temp[6045] = [4123,6,4123,17]; + lineof_temp[5920] = [4024,24,4025,62]; + lineof_temp[7278] = [4798,6,4798,63]; + lineof_temp[5303] = [3615,23,3615,44]; + lineof_temp[6671] = [4438,10,4438,32]; + lineof_temp[6416] = [4316,44,4316,62]; + lineof_temp[294] = [293,35,293,61]; + lineof_temp[2474] = [1878,8,1878,38]; + lineof_temp[4830] = [3260,22,3260,44]; + lineof_temp[6358] = [4281,25,4281,74]; + lineof_temp[4246] = [2944,6,2944,20]; + lineof_temp[5331] = [3608,37,3608,64]; + lineof_temp[877] = [736,19,736,20]; + lineof_temp[7318] = [4825,6,4825,55]; + lineof_temp[108] = [123,4,123,28]; + lineof_temp[4556] = [3121,29,3121,49]; + lineof_temp[310] = [300,18,300,48]; + lineof_temp[6547] = [4366,10,4366,44]; + lineof_temp[1059] = [928,30,928,53]; + lineof_temp[4609] = [3171,14,3171,15]; + lineof_temp[4741] = [3252,6,3252,69]; + lineof_temp[1728] = [1291,4,1291,39]; + lineof_temp[4888] = [3325,12,3325,74]; + lineof_temp[1677] = [1227,2,1252,2]; + lineof_temp[2341] = [1752,6,1752,34]; + lineof_temp[5961] = [4048,14,4048,67]; + lineof_temp[1242] = [977,27,977,28]; + lineof_temp[5185] = [3517,18,3517,40]; + lineof_temp[185] = [213,4,213,19]; + lineof_temp[4580] = [3162,2,3162,13]; + lineof_temp[5493] = [3751,24,3751,25]; + lineof_temp[7249] = [4785,24,4785,59]; + lineof_temp[4179] = [2897,14,2897,70]; + lineof_temp[6329] = [4254,6,4254,31]; + lineof_temp[3228] = [2300,6,2300,9]; + lineof_temp[950] = [810,26,810,54]; + lineof_temp[1482] = [1114,4,1114,12]; + lineof_temp[2477] = [1875,19,1875,31]; + lineof_temp[4078] = [2838,6,2838,44]; + lineof_temp[5029] = [3439,26,3440,44]; + lineof_temp[6895] = [4596,44,4596,72]; + lineof_temp[2444] = [1707,25,1707,41]; + lineof_temp[2415] = [1826,6,1826,39]; + lineof_temp[1980] = [1477,14,1477,39]; + lineof_temp[82] = [96,34,96,70]; + lineof_temp[1074] = [917,30,917,62]; + lineof_temp[3471] = [2481,26,2481,42]; + lineof_temp[1706] = [1287,16,1287,67]; + lineof_temp[2102] = [1569,10,1569,34]; + lineof_temp[534] = [483,8,500,8]; + lineof_temp[977] = [776,26,776,44]; + lineof_temp[2347] = [1758,6,1758,34]; + lineof_temp[6003] = [4085,4,4085,12]; + lineof_temp[270] = [279,31,279,57]; + lineof_temp[857] = [740,10,740,38]; + lineof_temp[3076] = [2243,27,2243,47]; + lineof_temp[3413] = [2442,16,2445,92]; + lineof_temp[4710] = [3238,14,3238,39]; + lineof_temp[4900] = [3344,10,3344,13]; + lineof_temp[6594] = [4388,14,4391,58]; + lineof_temp[5083] = [3471,14,3471,35]; + lineof_temp[5363] = [3651,12,3651,49]; + lineof_temp[7185] = [4750,14,4750,33]; + lineof_temp[12] = [17,4,17,19]; + lineof_temp[5764] = [3908,14,3908,49]; + lineof_temp[3699] = [2618,22,2618,59]; + lineof_temp[4781] = [3270,6,3270,33]; + lineof_temp[2757] = [2029,22,2029,67]; + lineof_temp[3676] = [2582,8,2582,31]; + lineof_temp[2093] = [1498,10,1498,61]; + lineof_temp[1434] = [1090,24,1090,39]; + lineof_temp[2106] = [1576,18,1577,62]; + lineof_temp[4984] = [3409,19,3409,31]; + lineof_temp[1106] = [906,20,929,21]; + lineof_temp[2957] = [2156,19,2156,30]; + lineof_temp[1177] = [934,24,934,70]; + lineof_temp[1837] = [1376,19,1376,30]; + lineof_temp[6725] = [4482,27,4482,39]; + lineof_temp[3660] = [2578,14,2578,42]; + lineof_temp[7200] = [4752,10,4752,37]; + lineof_temp[7323] = [4823,22,4823,67]; + lineof_temp[2085] = [1505,12,1507,72]; + lineof_temp[2594] = [1934,18,1934,40]; + lineof_temp[3645] = [2567,8,2567,41]; + lineof_temp[3064] = [2224,10,2224,73]; + lineof_temp[5065] = [3411,2,3411,12]; + lineof_temp[6944] = [4618,4,4618,29]; + lineof_temp[2498] = [1889,16,1889,57]; + lineof_temp[2568] = [1917,14,1917,33]; + lineof_temp[1026] = [831,15,831,60]; + lineof_temp[4544] = [3146,27,3146,67]; + lineof_temp[7347] = [4827,4,4827,30]; + lineof_temp[2476] = [1876,8,1876,61]; + lineof_temp[3061] = [2216,25,2216,65]; + lineof_temp[5263] = [3595,20,3595,61]; + lineof_temp[3297] = [2366,12,2366,58]; + lineof_temp[1534] = [1158,15,1158,50]; + lineof_temp[2776] = [2033,8,2033,23]; + lineof_temp[7143] = [4743,8,4743,24]; + lineof_temp[94] = [107,4,107,15]; + lineof_temp[109] = [126,6,126,17]; + lineof_temp[4252] = [2926,10,2926,15]; + lineof_temp[4652] = [3206,6,3206,30]; + lineof_temp[6773] = [4505,18,4505,45]; + lineof_temp[1442] = [1097,19,1097,62]; + lineof_temp[610] = [540,24,540,44]; + lineof_temp[1430] = [993,24,993,40]; + lineof_temp[6243] = [4226,18,4226,41]; + lineof_temp[1785] = [1342,14,1342,28]; + lineof_temp[899] = [749,36,749,63]; + lineof_temp[5918] = [4025,26,4025,55]; + lineof_temp[1421] = [1014,14,1078,61]; + lineof_temp[6606] = [4401,28,4401,56]; + lineof_temp[3795] = [2655,10,2655,76]; + lineof_temp[2898] = [2087,31,2087,59]; + lineof_temp[5394] = [3679,21,3679,72]; + lineof_temp[5418] = [3698,12,3698,40]; + lineof_temp[1628] = [1208,6,1208,15]; + lineof_temp[3337] = [2392,26,2392,35]; + lineof_temp[6742] = [4491,21,4491,22]; + lineof_temp[3380] = [2413,32,2414,39]; + lineof_temp[4826] = [3261,20,3261,32]; + lineof_temp[390] = [390,37,390,52]; + lineof_temp[2273] = [1695,14,1695,24]; + lineof_temp[3753] = [2648,17,2648,75]; + lineof_temp[4359] = [3044,27,3044,39]; + lineof_temp[4283] = [3004,33,3004,45]; + lineof_temp[4718] = [3242,19,3242,41]; + lineof_temp[4776] = [3272,8,3272,19]; + lineof_temp[6237] = [4224,35,4224,51]; + lineof_temp[7276] = [4798,14,4798,61]; + lineof_temp[1333] = [1015,18,1015,55]; + lineof_temp[2536] = [1906,16,1906,32]; + lineof_temp[2593] = [1934,26,1934,38]; + lineof_temp[3346] = [2403,12,2403,31]; + lineof_temp[6270] = [4238,25,4238,48]; + lineof_temp[4529] = [3134,10,3144,22]; + lineof_temp[4894] = [3331,6,3331,9]; + lineof_temp[6536] = [4358,14,4358,30]; + lineof_temp[6620] = [4409,30,4409,61]; + lineof_temp[6077] = [4140,8,4140,28]; + lineof_temp[7291] = [4805,12,4805,48]; + lineof_temp[738] = [627,22,627,23]; + lineof_temp[3807] = [2668,23,2669,67]; + lineof_temp[6014] = [4102,16,4102,43]; + lineof_temp[4582] = [3161,17,3161,32]; + lineof_temp[4753] = [3253,4,3253,42]; + lineof_temp[762] = [660,24,662,40]; + lineof_temp[2359] = [1770,6,1770,49]; + lineof_temp[7350] = [4814,11,4814,13]; + lineof_temp[7379] = [4845,10,4845,38]; + lineof_temp[308] = [295,8,295,32]; + lineof_temp[1766] = [1317,28,1317,57]; + lineof_temp[5166] = [3518,15,3518,37]; + lineof_temp[592] = [545,26,545,52]; + lineof_temp[5567] = [3796,12,3797,28]; + lineof_temp[6809] = [4531,22,4531,62]; + lineof_temp[3563] = [2532,20,2532,32]; + lineof_temp[4398] = [2970,17,2970,35]; + lineof_temp[5814] = [3934,18,3934,21]; + lineof_temp[945] = [812,34,812,65]; + lineof_temp[1192] = [941,16,944,73]; + lineof_temp[3923] = [2684,2,2692,4]; + lineof_temp[6630] = [4411,16,4411,34]; + lineof_temp[7352] = [4814,2,4830,2]; + lineof_temp[3235] = [2297,2,2297,12]; + lineof_temp[5989] = [4039,6,4039,15]; + lineof_temp[3544] = [2516,27,2516,70]; + lineof_temp[4576] = [3163,2,3163,17]; + lineof_temp[1400] = [1074,46,1075,77]; + lineof_temp[1164] = [855,24,855,38]; + lineof_temp[7000] = [4667,32,4667,70]; + lineof_temp[2748] = [2006,12,2006,14]; + lineof_temp[1738] = [1306,8,1306,20]; + lineof_temp[6933] = [4563,4,4563,42]; + lineof_temp[1604] = [1206,20,1206,63]; + lineof_temp[4453] = [3077,20,3077,35]; + lineof_temp[4662] = [3209,6,3210,76]; + lineof_temp[867] = [732,20,732,56]; + lineof_temp[2671] = [1981,10,1981,28]; + lineof_temp[3978] = [2777,6,2778,48]; + lineof_temp[752] = [654,28,654,43]; + lineof_temp[2459] = [1869,18,1869,33]; + lineof_temp[851] = [725,16,725,46]; + lineof_temp[6103] = [4150,8,4150,33]; + lineof_temp[5748] = [3898,14,3898,31]; + lineof_temp[7034] = [4689,12,4689,26]; + lineof_temp[7111] = [4718,6,4731,7]; + lineof_temp[3171] = [2229,4,2276,16]; + lineof_temp[842] = [687,4,687,19]; + lineof_temp[4170] = [2893,8,2893,70]; + lineof_temp[6508] = [4338,21,4338,37]; + lineof_temp[4614] = [3170,6,3170,16]; + lineof_temp[6608] = [4400,18,4400,41]; + lineof_temp[1484] = [1083,22,1083,38]; + lineof_temp[4023] = [2801,2,2801,28]; + lineof_temp[4918] = [3354,10,3354,29]; + lineof_temp[1559] = [1175,16,1175,46]; + lineof_temp[4343] = [3018,8,3018,22]; + lineof_temp[4589] = [3160,2,3164,14]; + lineof_temp[1926] = [1431,24,1431,29]; + lineof_temp[4123] = [2870,54,2870,61]; + lineof_temp[5077] = [3464,15,3464,37]; + lineof_temp[283] = [284,10,286,43]; + lineof_temp[2799] = [2025,10,2025,12]; + lineof_temp[4858] = [3300,19,3300,31]; + lineof_temp[6098] = [4152,10,4152,22]; + lineof_temp[1424] = [1009,8,1078,65]; + lineof_temp[2953] = [2157,21,2157,70]; + lineof_temp[3408] = [2426,8,2426,33]; + lineof_temp[6653] = [4427,18,4427,45]; + lineof_temp[6885] = [4614,26,4614,54]; + lineof_temp[1877] = [1404,16,1404,48]; + lineof_temp[2466] = [1865,10,1865,35]; + lineof_temp[2717] = [1996,8,2000,71]; + lineof_temp[5129] = [3475,19,3475,37]; + lineof_temp[2969] = [2162,12,2162,48]; + lineof_temp[4982] = [3408,23,3408,44]; + lineof_temp[5527] = [3769,19,3769,40]; + lineof_temp[1787] = [1347,16,1347,43]; + lineof_temp[6628] = [4411,37,4411,76]; + lineof_temp[2175] = [1615,14,1615,60]; + lineof_temp[3527] = [2505,31,2505,43]; + lineof_temp[2716] = [1996,8,1996,20]; + lineof_temp[4904] = [3343,11,3343,12]; + lineof_temp[6874] = [4576,14,4576,52]; + lineof_temp[1273] = [952,6,988,7]; + lineof_temp[1268] = [953,6,953,17]; + lineof_temp[4621] = [3183,6,3183,25]; + lineof_temp[5010] = [3427,14,3430,67]; + lineof_temp[3977] = [2777,6,2778,48]; + lineof_temp[2098] = [1565,18,1565,54]; + lineof_temp[2610] = [1944,24,1944,35]; + lineof_temp[5377] = [3629,37,3629,78]; + lineof_temp[5526] = [3761,21,3761,33]; + lineof_temp[3075] = [2243,27,2243,47]; + lineof_temp[5616] = [3828,14,3828,16]; + lineof_temp[797] = [618,2,681,2]; + lineof_temp[1690] = [1257,4,1271,23]; + lineof_temp[1545] = [1158,11,1158,12]; + lineof_temp[453] = [445,14,445,15]; + lineof_temp[2841] = [2074,2,2084,14]; + lineof_temp[3928] = [2745,8,2745,14]; + lineof_temp[1682] = [1262,16,1262,45]; + lineof_temp[2434] = [1843,4,1843,38]; + lineof_temp[4879] = [3319,8,3319,71]; + lineof_temp[5734] = [3889,4,3889,34]; + lineof_temp[7354] = [4813,11,4813,13]; + lineof_temp[2872] = [2117,13,2117,15]; + lineof_temp[3200] = [2321,21,2321,49]; + lineof_temp[4396] = [2969,22,2969,33]; + lineof_temp[984] = [767,32,767,74]; + lineof_temp[2166] = [1612,10,1612,34]; + lineof_temp[4940] = [3377,34,3382,100]; + lineof_temp[4665] = [3208,6,3208,21]; + lineof_temp[5204] = [3547,11,3547,35]; + lineof_temp[3758] = [2649,22,2650,66]; + lineof_temp[400] = [403,18,403,43]; + lineof_temp[1125] = [876,32,876,42]; + lineof_temp[3157] = [2245,8,2245,39]; + lineof_temp[4326] = [3029,16,3029,67]; + lineof_temp[5485] = [3750,26,3750,55]; + lineof_temp[6247] = [4225,18,4225,19]; + lineof_temp[2655] = [1977,25,1977,70]; + lineof_temp[4440] = [3073,6,3073,17]; + lineof_temp[4619] = [3168,10,3168,15]; + lineof_temp[5687] = [3865,14,3865,36]; + lineof_temp[5924] = [4024,24,4025,62]; + lineof_temp[7152] = [4741,8,4744,23]; + lineof_temp[2409] = [1820,6,1820,24]; + lineof_temp[5935] = [4001,4,4001,19]; + lineof_temp[141] = [172,33,172,55]; + lineof_temp[3407] = [2427,18,2427,23]; + lineof_temp[4565] = [3161,17,3161,32]; + lineof_temp[3567] = [2530,16,2530,52]; + lineof_temp[4271] = [2990,10,2990,34]; + lineof_temp[6894] = [4593,34,4593,54]; + lineof_temp[3246] = [2335,4,2337,16]; + lineof_temp[4481] = [3106,10,3113,12]; + lineof_temp[1097] = [909,26,910,59]; + lineof_temp[3420] = [2446,12,2446,22]; + lineof_temp[5105] = [3482,21,3482,60]; + lineof_temp[5282] = [3588,8,3588,43]; + lineof_temp[6597] = [4397,28,4397,62]; + lineof_temp[4324] = [3029,36,3029,50]; + lineof_temp[4806] = [3285,14,3285,16]; + lineof_temp[3702] = [2617,12,2617,42]; + lineof_temp[5410] = [3667,2,3667,12]; + lineof_temp[3251] = [2333,4,2333,75]; + lineof_temp[4442] = [3076,14,3076,36]; + lineof_temp[7037] = [4687,19,4687,25]; + lineof_temp[6188] = [4192,12,4192,32]; + lineof_temp[124] = [149,12,149,34]; + lineof_temp[5636] = [3836,23,3836,55]; + lineof_temp[7274] = [4797,14,4797,30]; + lineof_temp[4311] = [3018,25,3018,36]; + lineof_temp[5415] = [3691,6,3691,51]; + lineof_temp[5548] = [3788,55,3788,76]; + lineof_temp[2220] = [1637,4,1637,33]; + lineof_temp[332] = [331,4,331,32]; + lineof_temp[1263] = [958,16,958,17]; + lineof_temp[2385] = [1796,6,1796,40]; + lineof_temp[2688] = [1980,6,1980,41]; + lineof_temp[4428] = [2970,4,2970,14]; + lineof_temp[2181] = [1611,4,1611,33]; + lineof_temp[2686] = [1982,8,1982,28]; + lineof_temp[4314] = [3023,18,3023,64]; + lineof_temp[4490] = [3075,6,3075,23]; + lineof_temp[6644] = [4384,10,4384,32]; + lineof_temp[1627] = [1208,14,1208,15]; + lineof_temp[4671] = [3216,15,3216,37]; + lineof_temp[5817] = [3933,4,3933,25]; + lineof_temp[7038] = [4687,10,4687,25]; + lineof_temp[2934] = [2130,15,2130,17]; + lineof_temp[4763] = [3249,22,3249,39]; + lineof_temp[5290] = [3604,19,3604,37]; + lineof_temp[5822] = [3951,14,3951,36]; + lineof_temp[717] = [618,15,618,52]; + lineof_temp[3517] = [2456,25,2456,51]; + lineof_temp[4483] = [3105,20,3105,22]; + lineof_temp[1411] = [1027,28,1027,44]; + lineof_temp[1909] = [1427,12,1427,32]; + lineof_temp[5578] = [3780,4,3784,5]; + lineof_temp[5879] = [3988,20,3988,49]; + lineof_temp[6248] = [4225,10,4225,19]; + lineof_temp[7136] = [4742,26,4742,69]; + lineof_temp[4530] = [3133,25,3133,40]; + lineof_temp[4538] = [3131,22,3131,43]; + lineof_temp[6542] = [4361,18,4361,47]; + lineof_temp[6685] = [4447,32,4447,60]; + lineof_temp[7378] = [4839,33,4839,48]; + lineof_temp[7372] = [4841,10,4841,38]; + lineof_temp[2805] = [2057,32,2057,59]; + lineof_temp[2096] = [1487,20,1487,36]; + lineof_temp[4248] = [2946,6,2946,20]; + lineof_temp[6610] = [4403,28,4403,56]; + lineof_temp[1849] = [1387,24,1387,49]; + lineof_temp[3378] = [2415,14,2415,28]; + lineof_temp[4158] = [2885,14,2885,56]; + lineof_temp[1422] = [1013,12,1078,63]; + lineof_temp[2147] = [1567,10,1567,11]; + lineof_temp[3677] = [2598,20,2598,56]; + lineof_temp[4688] = [3216,2,3216,12]; + lineof_temp[4964] = [3364,16,3394,22]; + lineof_temp[658] = [585,19,585,57]; + lineof_temp[2178] = [1614,10,1617,93]; + lineof_temp[2793] = [2029,6,2041,6]; + lineof_temp[7171] = [4734,6,4734,20]; + lineof_temp[463] = [456,6,456,27]; + lineof_temp[513] = [483,25,483,60]; + lineof_temp[4116] = [2867,46,2867,63]; + lineof_temp[4438] = [3065,2,3067,31]; + lineof_temp[3830] = [2639,10,2639,15]; + lineof_temp[4320] = [3027,20,3027,39]; + lineof_temp[6131] = [4167,14,4167,36]; + lineof_temp[2241] = [1668,10,1668,21]; + lineof_temp[6375] = [4289,10,4289,48]; + lineof_temp[1478] = [1116,8,1116,20]; + lineof_temp[1870] = [1401,22,1401,34]; + lineof_temp[7294] = [4803,8,4803,20]; + lineof_temp[3319] = [2388,26,2388,35]; + lineof_temp[4043] = [2806,10,2806,12]; + lineof_temp[5563] = [3797,12,3797,28]; + lineof_temp[2388] = [1797,4,1797,44]; + lineof_temp[3128] = [2271,21,2271,24]; + lineof_temp[4921] = [3355,8,3355,30]; + lineof_temp[1261] = [962,16,962,48]; + lineof_temp[5171] = [3525,8,3525,30]; + lineof_temp[2975] = [2163,22,2163,65]; + lineof_temp[3558] = [2529,18,2529,69]; + lineof_temp[3998] = [2776,21,2776,52]; + lineof_temp[4689] = [3216,2,3222,3]; + lineof_temp[7204] = [4756,24,4756,41]; + lineof_temp[3121] = [2273,29,2273,58]; + lineof_temp[3481] = [2484,26,2484,42]; + lineof_temp[2138] = [1584,10,1587,79]; + lineof_temp[4849] = [3303,8,3306,20]; + lineof_temp[4966] = [3363,14,3394,24]; + lineof_temp[5559] = [3796,25,3796,47]; + lineof_temp[6150] = [4178,21,4178,33]; + lineof_temp[5188] = [3535,10,3535,38]; + lineof_temp[1502] = [1137,18,1137,36]; + lineof_temp[4475] = [3093,8,3093,34]; + lineof_temp[4486] = [3104,8,3104,40]; + lineof_temp[5177] = [3521,12,3521,24]; + lineof_temp[5664] = [3855,14,3855,32]; + lineof_temp[7078] = [4716,21,4716,37]; + lineof_temp[3991] = [2780,12,2780,33]; + lineof_temp[144] = [173,35,173,57]; + lineof_temp[1459] = [1111,25,1112,73]; + lineof_temp[5519] = [3762,15,3762,36]; + lineof_temp[6935] = [4619,10,4619,37]; + lineof_temp[702] = [609,6,609,41]; + lineof_temp[1450] = [1094,4,1094,28]; + lineof_temp[3856] = [2697,18,2697,37]; + lineof_temp[5198] = [3544,6,3544,50]; + lineof_temp[5859] = [3974,14,3974,20]; + lineof_temp[5809] = [3936,8,3936,33]; + lineof_temp[2719] = [1995,6,2000,73]; + lineof_temp[3490] = [2488,12,2488,31]; + lineof_temp[4042] = [2806,15,2806,27]; + lineof_temp[5473] = [3738,20,3738,47]; + lineof_temp[4346] = [3037,20,3037,41]; + lineof_temp[1565] = [1173,6,1178,7]; + lineof_temp[5096] = [3476,14,3476,36]; + lineof_temp[5964] = [4049,12,4056,14]; + lineof_temp[6474] = [4330,18,4330,59]; + lineof_temp[2321] = [1732,6,1732,37]; + lineof_temp[3264] = [2344,14,2344,24]; + lineof_temp[1265] = [954,10,954,12]; + lineof_temp[127] = [158,22,158,37]; + lineof_temp[614] = [539,17,539,32]; + lineof_temp[855] = [740,18,740,36]; + lineof_temp[1276] = [951,6,951,19]; + lineof_temp[4507] = [3134,38,3134,48]; + lineof_temp[2578] = [1930,24,1930,35]; + lineof_temp[4367] = [3048,20,3048,49]; + lineof_temp[5213] = [3548,10,3549,35]; + lineof_temp[576] = [537,18,537,56]; + lineof_temp[4148] = [2879,6,2879,59]; + lineof_temp[998] = [771,18,771,28]; + lineof_temp[28] = [44,14,44,39]; + lineof_temp[1291] = [996,27,996,55]; + lineof_temp[1899] = [1402,12,1402,45]; + lineof_temp[3979] = [2782,23,2782,51]; + lineof_temp[5528] = [3769,19,3769,40]; + lineof_temp[3521] = [2501,17,2501,57]; + lineof_temp[6018] = [4100,12,4103,99]; + lineof_temp[4463] = [3083,10,3092,33]; + lineof_temp[6483] = [4328,10,4330,61]; + lineof_temp[6982] = [4657,44,4657,72]; + lineof_temp[184] = [209,12,209,23]; + lineof_temp[2236] = [1661,10,1661,20]; + lineof_temp[5973] = [4075,26,4075,55]; + lineof_temp[4291] = [3008,28,3008,58]; + lineof_temp[5938] = [4036,19,4036,59]; + lineof_temp[4928] = [3366,32,3366,44]; + lineof_temp[4518] = [3143,21,3143,23]; + lineof_temp[5000] = [3421,12,3421,44]; + lineof_temp[93] = [108,6,108,23]; + lineof_temp[2277] = [1700,42,1700,65]; + lineof_temp[2137] = [1584,10,1584,22]; + lineof_temp[4085] = [2842,8,2842,18]; + lineof_temp[2001] = [1492,12,1492,58]; + lineof_temp[2297] = [1693,10,1693,14]; + lineof_temp[2763] = [2036,27,2036,58]; + lineof_temp[3259] = [2329,2,2329,18]; + lineof_temp[5271] = [3593,12,3593,53]; + lineof_temp[1403] = [1053,46,1053,62]; + lineof_temp[4862] = [3311,14,3311,26]; + lineof_temp[6998] = [4667,40,4667,68]; + lineof_temp[5228] = [3537,12,3537,13]; + lineof_temp[6980] = [4655,36,4655,74]; + lineof_temp[1047] = [905,35,905,47]; + lineof_temp[2769] = [2035,19,2035,28]; + lineof_temp[5932] = [4002,14,4002,15]; + lineof_temp[6698] = [4463,31,4463,42]; + lineof_temp[1772] = [1317,14,1318,25]; + lineof_temp[6053] = [4126,46,4126,58]; + lineof_temp[6127] = [4164,13,4164,31]; + lineof_temp[3672] = [2588,16,2591,94]; + lineof_temp[7088] = [4724,23,4724,38]; + lineof_temp[2461] = [1870,10,1870,27]; + lineof_temp[3982] = [2782,60,2782,69]; + lineof_temp[4857] = [3301,8,3306,20]; + lineof_temp[5926] = [4024,10,4024,21]; + lineof_temp[1448] = [1097,10,1097,63]; + lineof_temp[655] = [583,14,583,39]; + lineof_temp[1676] = [1227,2,1227,12]; + lineof_temp[2227] = [1651,6,1655,96]; + lineof_temp[3153] = [2253,8,2276,9]; + lineof_temp[20] = [25,29,25,41]; + lineof_temp[1504] = [1136,8,1136,33]; + lineof_temp[2656] = [1976,23,1976,35]; + lineof_temp[3160] = [2230,12,2230,24]; + lineof_temp[4214] = [2912,6,2912,44]; + lineof_temp[1435] = [1091,10,1091,21]; + lineof_temp[3242] = [2329,21,2330,57]; + lineof_temp[1412] = [1023,26,1078,53]; + lineof_temp[5357] = [3656,16,3657,23]; + lineof_temp[1347] = [1031,43,1031,75]; + lineof_temp[1989] = [1483,17,1483,29]; + lineof_temp[5194] = [3538,8,3538,56]; + lineof_temp[1848] = [1385,20,1385,49]; + lineof_temp[3881] = [2727,26,2729,64]; + lineof_temp[49] = [75,8,75,31]; + lineof_temp[2246] = [1662,4,1662,24]; + lineof_temp[2738] = [2016,2,2020,3]; + lineof_temp[3423] = [2409,14,2409,16]; + lineof_temp[3467] = [2481,26,2481,42]; + lineof_temp[1571] = [1187,6,1187,20]; + lineof_temp[2368] = [1777,4,1777,43]; + lineof_temp[3498] = [2492,16,2492,29]; + lineof_temp[7237] = [4768,10,4773,11]; + lineof_temp[284] = [283,8,283,28]; + lineof_temp[2167] = [1612,10,1612,34]; + lineof_temp[1640] = [1201,15,1201,51]; + lineof_temp[4166] = [2890,8,2890,70]; + lineof_temp[5186] = [3534,15,3534,37]; + lineof_temp[6197] = [4199,22,4199,39]; + lineof_temp[688] = [597,2,598,32]; + lineof_temp[2145] = [1581,6,1598,7]; + lineof_temp[1116] = [857,30,857,50]; + lineof_temp[6200] = [4198,12,4198,36]; + lineof_temp[2819] = [2051,10,2051,12]; + lineof_temp[5306] = [3616,18,3616,46]; + lineof_temp[6102] = [4151,10,4152,22]; + lineof_temp[1560] = [1175,8,1175,48]; + lineof_temp[6308] = [4248,8,4248,33]; + lineof_temp[2774] = [2034,10,2034,23]; + lineof_temp[5457] = [3690,2,3718,3]; + lineof_temp[6389] = [4285,4,4285,39]; + lineof_temp[1161] = [856,24,899,25]; + lineof_temp[6064] = [4125,4,4125,15]; + lineof_temp[443] = [445,18,445,24]; + lineof_temp[4455] = [3083,23,3083,45]; + lineof_temp[732] = [634,24,634,70]; + lineof_temp[967] = [792,28,792,74]; + lineof_temp[1094] = [911,32,911,49]; + lineof_temp[2253] = [1675,10,1675,34]; + lineof_temp[4902] = [3344,2,3344,15]; + lineof_temp[5915] = [4012,12,4019,14]; + lineof_temp[1352] = [1034,42,1034,70]; + lineof_temp[4280] = [3005,26,3005,68]; + lineof_temp[4856] = [3301,8,3301,18]; + lineof_temp[919] = [779,20,780,53]; + lineof_temp[6184] = [4188,19,4188,35]; + lineof_temp[840] = [687,22,687,41]; + lineof_temp[1536] = [1161,14,1161,38]; + lineof_temp[6124] = [4163,6,4163,19]; + lineof_temp[1708] = [1286,10,1286,68]; + lineof_temp[346] = [348,6,348,18]; + lineof_temp[844] = [686,4,686,33]; + lineof_temp[956] = [783,26,784,34]; + lineof_temp[1630] = [1207,19,1207,21]; + lineof_temp[45] = [68,6,68,28]; + lineof_temp[4143] = [2877,8,2877,73]; + lineof_temp[3141] = [2261,20,2261,54]; + lineof_temp[7068] = [4697,16,4697,21]; + lineof_temp[1717] = [1296,16,1296,67]; + lineof_temp[3720] = [2631,18,2631,46]; + lineof_temp[3900] = [2716,20,2716,48]; + lineof_temp[3713] = [2626,20,2626,63]; + lineof_temp[3916] = [2702,12,2702,75]; + lineof_temp[5651] = [3851,21,3851,68]; + lineof_temp[2266] = [1685,14,1685,26]; + lineof_temp[5603] = [3807,10,3807,13]; + lineof_temp[5347] = [3642,56,3642,70]; + lineof_temp[6025] = [4110,24,4110,46]; + lineof_temp[6917] = [4610,36,4610,64]; + lineof_temp[4191] = [2903,14,2903,46]; + lineof_temp[4336] = [3032,14,3032,72]; + lineof_temp[6408] = [4309,12,4309,32]; + lineof_temp[337] = [328,10,328,15]; + lineof_temp[6253] = [4224,10,4226,43]; + lineof_temp[351] = [344,6,344,37]; + lineof_temp[1822] = [1364,14,1364,25]; + lineof_temp[4205] = [2910,14,2910,19]; + lineof_temp[2254] = [1674,10,1674,62]; + lineof_temp[4229] = [2863,20,2863,41]; + lineof_temp[5307] = [3621,20,3621,70]; + lineof_temp[2646] = [1969,15,1969,58]; + lineof_temp[3429] = [2457,17,2457,52]; + lineof_temp[5726] = [3885,4,3885,28]; + lineof_temp[5751] = [3900,14,3900,33]; + lineof_temp[6469] = [4329,24,4329,59]; + lineof_temp[5371] = [3647,14,3647,19]; + lineof_temp[5414] = [3690,14,3690,26]; + lineof_temp[1527] = [1154,2,1154,60]; + lineof_temp[4802] = [3286,18,3286,19]; + lineof_temp[3263] = [2326,27,2326,56]; + lineof_temp[5333] = [3635,16,3635,65]; + lineof_temp[6589] = [4390,18,4390,45]; + lineof_temp[1639] = [1202,10,1202,11]; + lineof_temp[5667] = [3854,17,3854,18]; + lineof_temp[6065] = [4125,4,4128,30]; + lineof_temp[1341] = [1023,50,1023,70]; + lineof_temp[2286] = [1697,19,1701,65]; + lineof_temp[2635] = [1907,16,1907,17]; + lineof_temp[2922] = [2139,16,2139,24]; + lineof_temp[5752] = [3900,14,3900,33]; + lineof_temp[6896] = [4596,44,4596,72]; + lineof_temp[1716] = [1292,21,1292,43]; + lineof_temp[7213] = [4752,10,4752,37]; + lineof_temp[146] = [172,32,173,58]; + lineof_temp[2838] = [2074,15,2075,53]; + lineof_temp[5387] = [3669,20,3669,31]; + lineof_temp[5854] = [3958,10,3958,14]; + lineof_temp[6778] = [4513,22,4513,50]; + lineof_temp[2712] = [1999,10,2000,70]; + lineof_temp[2766] = [2037,10,2037,58]; + lineof_temp[6876] = [4566,18,4566,19]; + lineof_temp[1975] = [1469,15,1469,17]; + lineof_temp[4139] = [2877,54,2877,61]; + lineof_temp[6354] = [4279,18,4279,46]; + lineof_temp[3499] = [2492,16,2492,29]; + lineof_temp[4897] = [3337,6,3337,9]; + lineof_temp[322] = [315,4,315,26]; + lineof_temp[2770] = [2035,10,2035,28]; + lineof_temp[1034] = [841,16,841,62]; + lineof_temp[4224] = [2918,6,2918,33]; + lineof_temp[3099] = [2253,47,2253,76]; + lineof_temp[3305] = [2374,21,2374,70]; + lineof_temp[2136] = [1585,14,1585,60]; + lineof_temp[4334] = [3032,22,3032,23]; + lineof_temp[4893] = [3332,12,3332,65]; + lineof_temp[55] = [80,14,80,37]; + lineof_temp[6021] = [4098,8,4098,39]; + lineof_temp[4805] = [3285,19,3285,41]; + lineof_temp[4981] = [3408,23,3408,44]; + lineof_temp[2462] = [1869,10,1869,34]; + lineof_temp[6502] = [4343,8,4343,41]; + lineof_temp[657] = [582,4,582,27]; + lineof_temp[1399] = [1074,46,1075,77]; + lineof_temp[5030] = [3438,23,3440,45]; + lineof_temp[6556] = [4360,6,4360,18]; + lineof_temp[165] = [152,22,152,24]; + lineof_temp[5618] = [3828,6,3829,25]; + lineof_temp[466] = [458,23,458,66]; + lineof_temp[5355] = [3651,20,3651,48]; + lineof_temp[1912] = [1433,28,1433,69]; + lineof_temp[4182] = [2899,14,2899,71]; + lineof_temp[5923] = [4026,10,4026,44]; + lineof_temp[3588] = [2515,8,2515,41]; + lineof_temp[6123] = [4134,27,4134,42]; + lineof_temp[6707] = [4467,18,4467,54]; + lineof_temp[4394] = [2986,12,2986,14]; + lineof_temp[6582] = [4383,21,4383,37]; + lineof_temp[5061] = [3415,4,3415,29]; + lineof_temp[6223] = [4214,27,4214,62]; + lineof_temp[2134] = [1586,14,1586,41]; + lineof_temp[6155] = [4182,43,4182,72]; + lineof_temp[158] = [161,20,161,45]; + lineof_temp[2495] = [1881,10,1881,37]; + lineof_temp[7337] = [4820,6,4820,24]; + lineof_temp[575] = [537,18,537,56]; + lineof_temp[1455] = [1112,58,1112,71]; + lineof_temp[2201] = [1639,10,1640,61]; + lineof_temp[5181] = [3518,15,3518,37]; + lineof_temp[4157] = [2882,4,2882,26]; + lineof_temp[584] = [545,26,545,52]; + lineof_temp[1232] = [969,18,969,29]; + lineof_temp[6073] = [4135,20,4135,32]; + lineof_temp[1370] = [1047,46,1048,77]; + lineof_temp[4545] = [3146,27,3146,67]; + lineof_temp[6371] = [4286,14,4286,30]; + lineof_temp[2846] = [2067,2,2084,14]; + lineof_temp[2128] = [1597,8,1597,28]; + lineof_temp[4913] = [3324,25,3324,49]; + lineof_temp[2513] = [1893,19,1893,37]; + lineof_temp[1829] = [1312,4,1312,29]; + lineof_temp[3724] = [2626,20,2626,63]; + lineof_temp[6122] = [4135,2,4159,2]; + lineof_temp[5622] = [3831,6,3831,25]; + lineof_temp[173] = [142,14,142,16]; + lineof_temp[442] = [410,12,410,25]; + lineof_temp[3361] = [2374,8,2407,8]; + lineof_temp[820] = [691,31,691,46]; + lineof_temp[5796] = [3931,4,3931,12]; + lineof_temp[1846] = [1454,8,1454,59]; + lineof_temp[1957] = [1460,17,1460,40]; + lineof_temp[2929] = [2136,16,2136,24]; + lineof_temp[282] = [285,12,286,41]; + lineof_temp[408] = [400,2,400,12]; + lineof_temp[2787] = [2030,15,2030,21]; + lineof_temp[5830] = [3961,6,3961,20]; + lineof_temp[2600] = [1931,14,1931,41]; + lineof_temp[3719] = [2631,18,2631,46]; + lineof_temp[2026] = [1507,18,1507,70]; + lineof_temp[6948] = [4628,12,4628,32]; + lineof_temp[3902] = [2714,24,2714,52]; + lineof_temp[6753] = [4474,20,4474,27]; + lineof_temp[7206] = [4757,8,4757,20]; + lineof_temp[969] = [791,24,794,72]; + lineof_temp[680] = [597,17,597,29]; + lineof_temp[2077] = [1539,20,1539,66]; + lineof_temp[5147] = [3513,12,3513,41]; + lineof_temp[5372] = [3640,10,3646,12]; + lineof_temp[5474] = [3738,20,3738,47]; + lineof_temp[2637] = [1905,10,1905,28]; + lineof_temp[4200] = [2907,6,2907,33]; + lineof_temp[5295] = [3604,14,3604,16]; + lineof_temp[6051] = [4125,18,4125,43]; + lineof_temp[3595] = [2543,18,2543,23]; + lineof_temp[4912] = [3325,2,3325,75]; + lineof_temp[716] = [618,15,618,52]; + lineof_temp[854] = [726,19,726,59]; + lineof_temp[5201] = [3546,9,3546,57]; + lineof_temp[5886] = [3976,18,3976,47]; + lineof_temp[1516] = [1148,2,1148,12]; + lineof_temp[4175] = [2895,14,2895,71]; + lineof_temp[1564] = [1173,6,1173,18]; + lineof_temp[5173] = [3527,8,3527,32]; + lineof_temp[3330] = [2397,24,2397,51]; + lineof_temp[5400] = [3683,10,3684,17]; + lineof_temp[1828] = [1313,6,1341,8]; + lineof_temp[2574] = [1926,31,1926,44]; + lineof_temp[909] = [760,22,760,51]; + lineof_temp[1648] = [1230,14,1230,40]; + lineof_temp[1754] = [1323,20,1326,96]; + lineof_temp[4028] = [2799,2,2801,28]; + lineof_temp[4237] = [2933,4,2933,32]; + lineof_temp[6306] = [4249,10,4249,22]; + lineof_temp[1316] = [1001,18,1001,25]; + lineof_temp[1310] = [1004,10,1004,19]; + lineof_temp[5875] = [3979,10,3983,101]; + lineof_temp[3465] = [2478,10,2478,29]; + lineof_temp[664] = [585,15,585,16]; + lineof_temp[4850] = [3302,21,3302,63]; + lineof_temp[7085] = [4719,10,4719,44]; + lineof_temp[7325] = [4823,6,4823,19]; + lineof_temp[3059] = [2216,42,2216,64]; + lineof_temp[5629] = [3838,10,3838,62]; + lineof_temp[2351] = [1762,6,1762,40]; + lineof_temp[1443] = [1099,24,1099,39]; + lineof_temp[4264] = [2954,10,2954,15]; + lineof_temp[4471] = [3094,25,3094,59]; + lineof_temp[7165] = [4735,21,4735,36]; + lineof_temp[964] = [782,20,782,52]; + lineof_temp[778] = [623,8,623,39]; + lineof_temp[3946] = [2751,4,2752,13]; + lineof_temp[6456] = [4323,28,4323,63]; + lineof_temp[2139] = [1584,10,1587,79]; + lineof_temp[3424] = [2371,6,2408,8]; + lineof_temp[3355] = [2375,17,2375,25]; + lineof_temp[6488] = [4334,14,4334,30]; + lineof_temp[2745] = [2012,2,2012,39]; + lineof_temp[5397] = [3679,14,3679,73]; + lineof_temp[4487] = [3081,14,3081,16]; + lineof_temp[4115] = [2867,54,2867,61]; + lineof_temp[604] = [553,10,553,20]; + lineof_temp[2003] = [1491,8,1494,54]; + lineof_temp[2228] = [1650,4,1650,37]; + lineof_temp[2430] = [1839,4,1839,28]; + lineof_temp[2826] = [2067,22,2067,69]; + lineof_temp[5140] = [3494,21,3494,38]; + lineof_temp[1503] = [1137,10,1137,38]; + lineof_temp[5717] = [3884,14,3884,51]; + lineof_temp[5514] = [3733,4,3758,10]; + lineof_temp[221] = [244,26,244,35]; + lineof_temp[1897] = [1406,16,1406,54]; + lineof_temp[5163] = [3508,2,3514,24]; + lineof_temp[1923] = [1443,20,1444,40]; + lineof_temp[2664] = [1974,8,1974,68]; + lineof_temp[4304] = [2989,16,2989,18]; + lineof_temp[2603] = [1942,35,1943,71]; + lineof_temp[3639] = [2546,22,2546,33]; + lineof_temp[4006] = [2789,10,2789,24]; + lineof_temp[4480] = [3114,10,3114,33]; + lineof_temp[1037] = [840,12,843,70]; + lineof_temp[4096] = [2836,10,2836,12]; + lineof_temp[4094] = [2840,6,2847,6]; + lineof_temp[6147] = [4177,14,4177,30]; + lineof_temp[3205] = [2320,13,2320,16]; + lineof_temp[4041] = [2807,2,2807,26]; + lineof_temp[4225] = [2917,4,2917,27]; + lineof_temp[4526] = [3134,28,3134,49]; + lineof_temp[3670] = [2588,16,2588,28]; + lineof_temp[3841] = [2685,14,2685,25]; + lineof_temp[2561] = [1923,24,1923,35]; + lineof_temp[1107] = [905,35,905,47]; + lineof_temp[140] = [168,30,169,56]; + lineof_temp[7272] = [4794,6,4794,31]; + lineof_temp[2463] = [1868,10,1868,54]; + lineof_temp[995] = [774,18,774,61]; + lineof_temp[1985] = [1466,11,1466,12]; + lineof_temp[2920] = [2138,21,2138,72]; + lineof_temp[2221] = [1654,12,1654,39]; + lineof_temp[1556] = [1177,16,1177,60]; + lineof_temp[2516] = [1905,10,1905,28]; + lineof_temp[6093] = [4148,10,4148,23]; + lineof_temp[5985] = [4047,8,4047,41]; + lineof_temp[6726] = [4481,25,4483,71]; + lineof_temp[1684] = [1266,20,1266,32]; + lineof_temp[2658] = [1975,21,1977,72]; + lineof_temp[4079] = [2837,4,2837,27]; + lineof_temp[3216] = [2310,19,2311,57]; + lineof_temp[1360] = [1042,47,1042,69]; + lineof_temp[1970] = [1472,16,1472,64]; + lineof_temp[3548] = [2520,12,2520,24]; + lineof_temp[85] = [96,6,96,73]; + lineof_temp[2830] = [2074,15,2075,53]; + lineof_temp[4757] = [3251,2,3251,12]; + lineof_temp[5686] = [3862,4,3862,31]; + lineof_temp[5269] = [3593,20,3593,51]; + lineof_temp[5399] = [3678,4,3678,39]; + lineof_temp[6673] = [4499,16,4499,44]; + lineof_temp[871] = [737,40,737,73]; + lineof_temp[7333] = [4821,6,4821,19]; + lineof_temp[1519] = [1147,11,1147,13]; + lineof_temp[650] = [574,6,575,17]; + lineof_temp[4015] = [2798,15,2798,23]; + lineof_temp[4945] = [3370,26,3384,32]; + lineof_temp[5504] = [3738,12,3738,48]; + lineof_temp[1025] = [831,15,831,60]; + lineof_temp[2733] = [2015,17,2015,39]; + lineof_temp[4273] = [2992,10,2992,37]; + lineof_temp[5346] = [3643,18,3645,29]; + lineof_temp[6689] = [4458,27,4458,43]; + lineof_temp[4789] = [3273,6,3273,31]; + lineof_temp[5468] = [3727,6,3727,16]; + lineof_temp[3843] = [2686,14,2686,25]; + lineof_temp[812] = [688,31,688,60]; + lineof_temp[5756] = [3901,4,3901,28]; + lineof_temp[7168] = [4735,6,4745,7]; + lineof_temp[1524] = [1153,17,1153,29]; + lineof_temp[7245] = [4782,12,4782,50]; + lineof_temp[3630] = [2551,23,2551,26]; + lineof_temp[569] = [509,11,509,12]; + lineof_temp[5838] = [3964,24,3964,58]; + lineof_temp[999] = [771,18,774,61]; + lineof_temp[1865] = [1394,16,1395,36]; + lineof_temp[3322] = [2387,27,2387,28]; + lineof_temp[5449] = [3707,12,3707,20]; + lineof_temp[6182] = [4183,4,4183,36]; + lineof_temp[349] = [347,4,351,74]; + lineof_temp[2357] = [1768,6,1768,46]; + lineof_temp[4743] = [3255,19,3255,32]; + lineof_temp[7258] = [4787,12,4787,46]; + lineof_temp[199] = [223,8,223,19]; + lineof_temp[1419] = [1017,16,1017,32]; + lineof_temp[1613] = [1215,27,1215,53]; + lineof_temp[3497] = [2474,6,2474,29]; + lineof_temp[3539] = [2508,4,2508,42]; + lineof_temp[5537] = [3767,10,3767,15]; + lineof_temp[6366] = [4281,10,4282,48]; + lineof_temp[6434] = [4320,44,4320,62]; + lineof_temp[792] = [620,4,620,37]; + lineof_temp[1063] = [908,38,908,50]; + lineof_temp[3112] = [2260,14,2260,55]; + lineof_temp[5268] = [3592,30,3592,48]; + lineof_temp[1020] = [725,16,725,46]; + lineof_temp[3198] = [2299,15,2299,56]; + lineof_temp[6857] = [4508,4,4508,43]; + lineof_temp[353] = [342,2,342,38]; + lineof_temp[7265] = [4777,14,4777,19]; + lineof_temp[3072] = [2235,12,2235,40]; + lineof_temp[5389] = [3669,20,3674,7]; + lineof_temp[6436] = [4320,22,4320,63]; + lineof_temp[187] = [211,12,211,52]; + lineof_temp[4627] = [3187,6,3187,36]; + lineof_temp[5702] = [3870,4,3870,42]; + lineof_temp[6031] = [4113,22,4113,44]; + lineof_temp[6699] = [4464,28,4464,45]; + lineof_temp[381] = [393,16,393,60]; + lineof_temp[2855] = [2103,18,2103,46]; + lineof_temp[3534] = [2501,4,2505,61]; + lineof_temp[4188] = [2901,6,2901,41]; + lineof_temp[6762] = [4450,12,4451,54]; + lineof_temp[2597] = [1932,24,1932,28]; + lineof_temp[389] = [391,2,394,40]; + lineof_temp[3963] = [2761,2,2762,79]; + lineof_temp[2695] = [1990,14,1990,50]; + lineof_temp[5155] = [3510,2,3510,40]; + lineof_temp[5911] = [4011,14,4011,40]; + lineof_temp[6099] = [4151,26,4151,38]; + lineof_temp[6132] = [4167,14,4167,36]; + lineof_temp[1414] = [1022,24,1078,55]; + lineof_temp[2263] = [1683,6,1683,28]; + lineof_temp[2438] = [1847,4,1847,44]; + lineof_temp[2885] = [2104,2,2104,13]; + lineof_temp[3493] = [2487,12,2487,23]; + lineof_temp[6960] = [4637,22,4637,50]; + lineof_temp[5342] = [3642,36,3642,54]; + lineof_temp[6421] = [4315,23,4315,25]; + lineof_temp[6626] = [4412,24,4412,62]; + lineof_temp[2971] = [2194,18,2194,26]; + lineof_temp[3655] = [2499,11,2499,12]; + lineof_temp[330] = [329,4,329,36]; + lineof_temp[169] = [144,18,144,19]; + lineof_temp[4193] = [2902,4,2902,34]; + lineof_temp[6230] = [4208,4,4208,42]; + lineof_temp[6590] = [4389,18,4389,64]; + lineof_temp[3155] = [2247,8,2251,10]; + lineof_temp[286] = [289,35,289,61]; + lineof_temp[813] = [688,31,688,60]; + lineof_temp[2278] = [1700,42,1700,65]; + lineof_temp[1003] = [756,22,756,53]; + lineof_temp[1582] = [1190,21,1191,67]; + lineof_temp[1983] = [1467,10,1467,11]; + lineof_temp[2146] = [1580,4,1580,39]; + lineof_temp[3747] = [2647,24,2647,52]; + lineof_temp[3174] = [2227,32,2227,80]; + lineof_temp[1281] = [950,6,988,7]; + lineof_temp[6149] = [4178,21,4178,33]; + lineof_temp[7279] = [4797,6,4797,31]; + lineof_temp[2013] = [1498,10,1498,61]; + lineof_temp[5729] = [3888,6,3888,34]; + lineof_temp[906] = [759,28,759,53]; + lineof_temp[2184] = [1627,12,1627,58]; + lineof_temp[3104] = [2255,36,2255,54]; + lineof_temp[292] = [287,8,287,27]; + lineof_temp[4330] = [3032,51,3032,70]; + lineof_temp[986] = [762,26,762,27]; + lineof_temp[6988] = [4659,36,4659,74]; + lineof_temp[7193] = [4748,6,4748,20]; + lineof_temp[6397] = [4301,23,4301,63]; + lineof_temp[5784] = [3918,8,3920,68]; + lineof_temp[885] = [746,48,746,73]; + lineof_temp[2641] = [1891,6,1891,30]; + lineof_temp[4452] = [3078,8,3079,39]; + lineof_temp[6226] = [4214,10,4215,25]; + lineof_temp[2240] = [1666,18,1666,33]; + lineof_temp[5699] = [3871,14,3871,47]; + lineof_temp[5287] = [3604,29,3604,36]; + lineof_temp[5597] = [3809,6,3815,7]; + lineof_temp[4997] = [3457,8,3457,46]; + lineof_temp[498] = [474,10,474,40]; + lineof_temp[2089] = [1500,18,1500,45]; + lineof_temp[2529] = [1965,8,1965,18]; + lineof_temp[4844] = [3305,8,3305,18]; + lineof_temp[5781] = [3919,12,3919,57]; + lineof_temp[2479] = [1881,10,1881,37]; + lineof_temp[1902] = [1387,24,1387,49]; + lineof_temp[6886] = [4614,18,4614,56]; + lineof_temp[7239] = [4760,14,4760,19]; + lineof_temp[2143] = [1581,15,1581,18]; + lineof_temp[5025] = [3438,24,3438,74]; + lineof_temp[6274] = [4240,10,4240,21]; + lineof_temp[4017] = [2799,15,2799,28]; + lineof_temp[4673] = [3217,11,3217,39]; + lineof_temp[5070] = [3410,2,3460,2]; + lineof_temp[371] = [376,12,376,25]; + lineof_temp[939] = [803,26,806,74]; + lineof_temp[1118] = [857,28,857,51]; + lineof_temp[3117] = [2264,33,2264,55]; + lineof_temp[6966] = [4642,32,4642,67]; + lineof_temp[5704] = [3873,14,3873,42]; + lineof_temp[6659] = [4424,12,4428,60]; + lineof_temp[7358] = [4834,10,4834,57]; + lineof_temp[626] = [561,12,561,50]; + lineof_temp[4321] = [3027,20,3027,39]; + lineof_temp[4868] = [3315,39,3315,48]; + lineof_temp[5887] = [3976,14,3976,15]; + lineof_temp[6125] = [4163,6,4163,19]; + lineof_temp[3162] = [2233,21,2233,28]; + lineof_temp[5195] = [3538,8,3538,56]; + lineof_temp[5996] = [4087,14,4087,20]; + lineof_temp[1098] = [908,38,908,50]; + lineof_temp[1240] = [978,18,978,37]; + lineof_temp[1965] = [1474,16,1474,57]; + lineof_temp[4242] = [2940,6,2940,37]; + lineof_temp[1954] = [1461,11,1461,12]; + lineof_temp[6955] = [4633,14,4633,52]; + lineof_temp[1882] = [1410,24,1413,90]; + lineof_temp[4178] = [2897,14,2897,70]; + lineof_temp[4131] = [2873,54,2873,73]; + lineof_temp[3274] = [2353,21,2354,54]; + lineof_temp[6619] = [4409,30,4409,61]; + lineof_temp[6911] = [4606,40,4606,68]; + lineof_temp[1745] = [1316,36,1316,50]; + lineof_temp[2714] = [1997,12,1997,57]; + lineof_temp[573] = [534,15,534,58]; + lineof_temp[2050] = [1528,26,1528,72]; + lineof_temp[4656] = [3210,31,3210,42]; + lineof_temp[4747] = [3255,19,3255,32]; + lineof_temp[5068] = [3410,10,3410,11]; + lineof_temp[7063] = [4707,12,4707,51]; + lineof_temp[7303] = [4817,14,4817,48]; + lineof_temp[2792] = [2029,6,2029,19]; + lineof_temp[6265] = [4235,18,4235,46]; + lineof_temp[1416] = [1019,20,1078,57]; + lineof_temp[3726] = [2626,6,2626,17]; + lineof_temp[2029] = [1505,12,1507,72]; + lineof_temp[2520] = [1959,25,1964,70]; + lineof_temp[3727] = [2626,6,2633,6]; + lineof_temp[5671] = [3857,14,3857,45]; + lineof_temp[4268] = [2988,25,2988,36]; + lineof_temp[7339] = [4819,22,4819,62]; + lineof_temp[4669] = [3203,16,3203,32]; + lineof_temp[7194] = [4748,6,4750,35]; + lineof_temp[476] = [464,8,464,41]; + lineof_temp[303] = [298,14,298,40]; + lineof_temp[1806] = [1354,18,1354,40]; + lineof_temp[4063] = [2824,6,2824,21]; + lineof_temp[6108] = [4157,6,4157,18]; + lineof_temp[3952] = [2757,30,2757,42]; + lineof_temp[3176] = [2280,20,2280,67]; + lineof_temp[3412] = [2442,16,2442,28]; + lineof_temp[4996] = [3457,16,3457,44]; + lineof_temp[5487] = [3751,28,3751,40]; + lineof_temp[273] = [279,8,280,37]; + lineof_temp[2214] = [1641,8,1641,75]; + lineof_temp[3485] = [2483,10,2483,34]; + lineof_temp[1029] = [834,6,834,39]; + lineof_temp[2344] = [1753,4,1753,43]; + lineof_temp[2061] = [1514,28,1514,74]; + lineof_temp[6543] = [4364,10,4364,25]; + lineof_temp[2734] = [2016,19,2016,30]; + lineof_temp[3443] = [2466,13,2466,14]; + lineof_temp[6254] = [4223,8,4223,33]; + lineof_temp[7357] = [4812,15,4812,40]; + lineof_temp[1374] = [1055,50,1058,57]; + lineof_temp[1831] = [1302,20,1302,36]; + lineof_temp[3618] = [2557,30,2557,67]; + lineof_temp[167] = [190,14,190,29]; + lineof_temp[407] = [400,11,400,12]; + lineof_temp[798] = [617,21,617,36]; + lineof_temp[2394] = [1803,4,1803,48]; + lineof_temp[507] = [481,18,481,47]; + lineof_temp[4399] = [2971,20,2971,33]; + lineof_temp[1272] = [952,6,952,15]; + lineof_temp[4998] = [3421,20,3421,42]; + lineof_temp[5047] = [3450,29,3450,63]; + lineof_temp[975] = [761,20,761,46]; + lineof_temp[2503] = [1897,27,1901,68]; + lineof_temp[3038] = [2154,6,2200,7]; + lineof_temp[4717] = [3239,4,3239,26]; + lineof_temp[2640] = [1892,6,1892,23]; + lineof_temp[6315] = [4257,18,4257,46]; + lineof_temp[7093] = [4730,16,4730,62]; + lineof_temp[1418] = [1018,18,1078,59]; + lineof_temp[3955] = [2756,2,2757,79]; + lineof_temp[4113] = [2852,23,2852,40]; + lineof_temp[4450] = [3078,20,3078,22]; + lineof_temp[6403] = [4300,8,4300,33]; + lineof_temp[4045] = [2806,2,2807,26]; + lineof_temp[4444] = [3078,25,3078,66]; + lineof_temp[344] = [349,10,349,55]; + lineof_temp[2350] = [1759,4,1759,35]; + lineof_temp[2608] = [1939,29,1943,75]; + lineof_temp[518] = [492,22,492,68]; + lineof_temp[3430] = [2457,17,2457,52]; + lineof_temp[3878] = [2728,29,2729,63]; + lineof_temp[2107] = [1578,16,1578,26]; + lineof_temp[2852] = [2097,27,2097,48]; + lineof_temp[2187] = [1626,8,1629,90]; + lineof_temp[6730] = [4491,25,4492,63]; + lineof_temp[2191] = [1609,15,1609,50]; + lineof_temp[2339] = [1750,6,1750,34]; + lineof_temp[2862] = [2116,20,2116,48]; + lineof_temp[3533] = [2501,4,2501,14]; + lineof_temp[4523] = [3141,10,3141,20]; + lineof_temp[5802] = [3938,19,3938,56]; + lineof_temp[6411] = [4314,29,4314,45]; + lineof_temp[7137] = [4742,26,4742,69]; + lineof_temp[6299] = [4249,25,4249,74]; + lineof_temp[6497] = [4339,18,4339,47]; + lineof_temp[1844] = [1454,16,1454,57]; + lineof_temp[2967] = [2197,8,2197,18]; + lineof_temp[3089] = [2234,11,2234,32]; + lineof_temp[7254] = [4789,20,4789,48]; + lineof_temp[965] = [793,28,793,55]; + lineof_temp[5313] = [3618,30,3618,48]; + lineof_temp[693] = [603,10,603,31]; + lineof_temp[388] = [392,4,394,38]; + lineof_temp[4596] = [3156,17,3156,34]; + lineof_temp[4615] = [3170,6,3173,17]; + lineof_temp[5775] = [3913,8,3915,64]; + lineof_temp[599] = [544,12,552,12]; + lineof_temp[1874] = [1405,26,1405,38]; + lineof_temp[3344] = [2403,20,2403,29]; + lineof_temp[1636] = [1206,6,1206,17]; + lineof_temp[3060] = [2216,25,2216,65]; + lineof_temp[3723] = [2627,14,2627,16]; + lineof_temp[5055] = [3449,14,3449,49]; + lineof_temp[2068] = [1517,22,1517,34]; + lineof_temp[2457] = [1867,19,1867,61]; + lineof_temp[4345] = [3017,6,3017,31]; + lineof_temp[4777] = [3271,21,3271,42]; + lineof_temp[3470] = [2482,12,2482,31]; + lineof_temp[4740] = [3252,6,3252,69]; + lineof_temp[779] = [672,14,672,51]; + lineof_temp[314] = [281,4,281,29]; + lineof_temp[5396] = [3679,14,3679,73]; + lineof_temp[5769] = [3910,6,3910,54]; + lineof_temp[6799] = [4510,8,4510,31]; + lineof_temp[6] = [16,58,16,75]; + lineof_temp[7179] = [4747,21,4747,37]; + lineof_temp[4192] = [2903,6,2903,48]; + lineof_temp[4230] = [2928,6,2928,20]; + lineof_temp[6541] = [4361,18,4361,47]; + lineof_temp[2088] = [1502,10,1502,75]; + lineof_temp[530] = [484,16,484,21]; + lineof_temp[1307] = [1005,10,1005,24]; + lineof_temp[5454] = [3690,14,3690,26]; + lineof_temp[7081] = [4717,23,4717,50]; + lineof_temp[5151] = [3514,2,3514,24]; + lineof_temp[1019] = [726,4,829,4]; + lineof_temp[1202] = [835,4,835,43]; + lineof_temp[2188] = [1625,6,1629,92]; + lineof_temp[4719] = [3242,19,3242,41]; + lineof_temp[5530] = [3769,19,3769,40]; + lineof_temp[256] = [272,10,272,36]; + lineof_temp[7361] = [4835,15,4835,75]; + lineof_temp[1945] = [1382,4,1382,33]; + lineof_temp[6033] = [4112,12,4112,48]; + lineof_temp[505] = [478,15,478,53]; + lineof_temp[74] = [92,11,93,75]; + lineof_temp[4149] = [2878,4,2878,26]; + lineof_temp[3031] = [2160,15,2160,18]; + lineof_temp[3419] = [2447,14,2447,38]; + lineof_temp[5042] = [3441,26,3441,35]; + lineof_temp[5894] = [3999,19,3999,59]; + lineof_temp[1088] = [915,26,915,53]; + lineof_temp[2008] = [1496,14,1496,41]; + lineof_temp[6297] = [4247,10,4247,48]; + lineof_temp[3083] = [2238,10,2238,20]; + lineof_temp[3596] = [2543,18,2543,23]; + lineof_temp[4167] = [2890,8,2890,70]; + lineof_temp[4174] = [2895,14,2895,71]; + lineof_temp[4835] = [3302,21,3302,63]; + lineof_temp[1383] = [1054,47,1063,61]; + lineof_temp[2042] = [1552,12,1552,46]; + lineof_temp[2440] = [1849,4,1849,39]; + lineof_temp[3149] = [2255,12,2255,55]; + lineof_temp[4449] = [3078,25,3078,66]; + lineof_temp[5338] = [3632,10,3632,15]; + lineof_temp[3185] = [2280,2,2283,21]; + lineof_temp[6029] = [4106,12,4106,44]; + lineof_temp[6926] = [4583,20,4583,44]; + lineof_temp[1294] = [996,14,996,56]; + lineof_temp[5835] = [3959,4,3959,12]; + lineof_temp[6578] = [4372,10,4372,32]; + lineof_temp[2740] = [2015,12,2015,14]; + lineof_temp[2773] = [2034,19,2034,23]; + lineof_temp[3483] = [2484,12,2484,23]; + lineof_temp[5420] = [3702,6,3702,20]; + lineof_temp[5718] = [3884,14,3884,51]; + lineof_temp[6972] = [4675,26,4675,54]; + lineof_temp[4368] = [3048,12,3048,51]; + lineof_temp[2617] = [1909,20,1909,22]; + lineof_temp[1863] = [1394,28,1394,30]; + lineof_temp[3827] = [2643,6,2643,18]; + lineof_temp[4243] = [2939,4,2939,31]; + lineof_temp[1356] = [1030,40,1031,76]; + lineof_temp[782] = [675,16,675,72]; + lineof_temp[1060] = [928,30,928,53]; + lineof_temp[1180] = [933,20,936,64]; + lineof_temp[3400] = [2430,16,2433,92]; + lineof_temp[6062] = [4125,18,4125,43]; + lineof_temp[3067] = [2217,2,2223,66]; + lineof_temp[6085] = [4145,10,4145,23]; + lineof_temp[2709] = [2000,12,2000,69]; + lineof_temp[7260] = [4785,24,4785,59]; + lineof_temp[7307] = [4819,22,4819,62]; + lineof_temp[4350] = [3042,20,3042,32]; + lineof_temp[5525] = [3762,2,3763,25]; + lineof_temp[6487] = [4334,14,4334,30]; + lineof_temp[631] = [558,6,558,44]; + lineof_temp[6767] = [4439,16,4439,21]; + lineof_temp[736] = [632,18,636,91]; + lineof_temp[2028] = [1506,15,1507,71]; + lineof_temp[4160] = [2885,6,2885,58]; + lineof_temp[6214] = [4209,14,4209,30]; + lineof_temp[677] = [592,2,592,14]; + lineof_temp[1605] = [1208,18,1208,47]; + lineof_temp[3939] = [2744,2,2746,73]; + lineof_temp[1456] = [1112,58,1112,71]; + lineof_temp[3972] = [2776,21,2776,52]; + lineof_temp[4467] = [3103,18,3103,31]; + lineof_temp[7233] = [4769,14,4769,37]; + lineof_temp[811] = [687,22,687,41]; + lineof_temp[1080] = [920,44,920,56]; + lineof_temp[1486] = [1129,18,1129,46]; + lineof_temp[1783] = [1314,16,1314,26]; + lineof_temp[4492] = [3071,10,3071,15]; + lineof_temp[4732] = [3242,6,3244,41]; + lineof_temp[6081] = [4145,26,4145,38]; + lineof_temp[6833] = [4537,40,4537,41]; + lineof_temp[7317] = [4826,6,4826,55]; + lineof_temp[1345] = [1030,41,1030,63]; + lineof_temp[3395] = [2432,20,2432,47]; + lineof_temp[3528] = [2503,6,2505,59]; + lineof_temp[5127] = [3476,2,3476,11]; + lineof_temp[464] = [455,4,455,34]; + lineof_temp[589] = [550,16,550,29]; + lineof_temp[3186] = [2279,27,2279,57]; + lineof_temp[6234] = [4222,18,4222,46]; + lineof_temp[6846] = [4532,52,4532,65]; + lineof_temp[3473] = [2481,12,2481,23]; + lineof_temp[301] = [297,35,297,61]; + lineof_temp[1659] = [1242,14,1242,28]; + lineof_temp[6468] = [4328,25,4328,41]; + lineof_temp[2185] = [1626,8,1626,20]; + lineof_temp[7148] = [4742,8,4744,23]; + lineof_temp[3641] = [2546,10,2546,19]; + lineof_temp[4090] = [2841,14,2841,15]; + lineof_temp[4828] = [3261,2,3261,17]; + lineof_temp[6387] = [4287,14,4287,15]; + lineof_temp[726] = [629,27,629,29]; + lineof_temp[4808] = [3285,6,3287,25]; + lineof_temp[1351] = [1034,42,1034,70]; + lineof_temp[4594] = [3158,2,3158,46]; + lineof_temp[7312] = [4823,22,4823,67]; + lineof_temp[5872] = [3980,12,3980,24]; + lineof_temp[6505] = [4339,14,4339,15]; + lineof_temp[1079] = [920,44,920,56]; + lineof_temp[1793] = [1344,10,1348,77]; + lineof_temp[3392] = [2418,12,2418,22]; + lineof_temp[4099] = [2855,14,2855,42]; + lineof_temp[4410] = [2984,4,2984,15]; + lineof_temp[1031] = [836,18,836,54]; + lineof_temp[1234] = [967,20,968,34]; + lineof_temp[5373] = [3639,8,3639,43]; + lineof_temp[7096] = [4729,22,4729,24]; + lineof_temp[1318] = [1001,10,1001,27]; + lineof_temp[743] = [643,32,643,72]; + lineof_temp[929] = [819,26,819,72]; + lineof_temp[275] = [278,6,280,39]; + lineof_temp[1179] = [933,20,933,32]; + lineof_temp[2194] = [1609,2,1631,2]; + lineof_temp[2460] = [1871,10,1871,21]; + lineof_temp[6703] = [4467,34,4467,51]; + lineof_temp[3602] = [2547,26,2547,57]; + lineof_temp[5365] = [3650,20,3650,22]; + lineof_temp[768] = [640,28,640,58]; + lineof_temp[2215] = [1639,10,1640,61]; + lineof_temp[2585] = [1932,31,1932,46]; + lineof_temp[2947] = [2154,22,2155,61]; + lineof_temp[3820] = [2665,10,2670,29]; + lineof_temp[6934] = [4619,10,4619,37]; + lineof_temp[2039] = [1554,16,1555,31]; + lineof_temp[4302] = [2995,16,2995,67]; + lineof_temp[6706] = [4467,26,4467,52]; + lineof_temp[7292] = [4804,12,4804,57]; + lineof_temp[2946] = [2154,22,2155,61]; + lineof_temp[4190] = [2903,14,2903,46]; + lineof_temp[2570] = [1929,37,1929,70]; + lineof_temp[5309] = [3621,12,3621,72]; + lineof_temp[7103] = [4724,23,4724,38]; + lineof_temp[1841] = [1375,25,1375,37]; + lineof_temp[2247] = [1674,18,1674,61]; + lineof_temp[7336] = [4820,15,4820,24]; + lineof_temp[1436] = [1090,10,1090,40]; + lineof_temp[5899] = [3999,6,4000,17]; + lineof_temp[731] = [634,24,634,70]; + lineof_temp[2958] = [2160,21,2160,53]; + lineof_temp[4513] = [3141,23,3142,63]; + lineof_temp[4784] = [3276,14,3276,60]; + lineof_temp[1446] = [1099,10,1099,40]; + lineof_temp[2775] = [2034,10,2037,58]; + lineof_temp[1789] = [1346,16,1346,62]; + lineof_temp[3515] = [2457,2,2457,14]; + lineof_temp[4274] = [2995,36,2995,50]; + lineof_temp[6060] = [4127,4,4128,30]; + lineof_temp[882] = [728,6,728,37]; + lineof_temp[5393] = [3668,15,3668,27]; + lineof_temp[2229] = [1636,10,1636,11]; + lineof_temp[2592] = [1934,26,1934,38]; + lineof_temp[4101] = [2854,4,2854,27]; + lineof_temp[2304] = [1713,4,1713,39]; + lineof_temp[6765] = [4447,12,4447,61]; + lineof_temp[1051] = [907,25,907,43]; + lineof_temp[656] = [583,6,583,41]; + lineof_temp[947] = [812,26,812,67]; + lineof_temp[1903] = [1387,18,1387,21]; + lineof_temp[6793] = [4518,12,4518,36]; + lineof_temp[3190] = [2289,10,2289,25]; + lineof_temp[5221] = [3552,12,3552,58]; + lineof_temp[608] = [541,8,541,19]; + lineof_temp[2755] = [2026,4,2026,31]; + lineof_temp[7359] = [4834,10,4834,57]; + lineof_temp[5187] = [3534,15,3534,37]; + lineof_temp[1855] = [1393,27,1393,69]; + lineof_temp[4009] = [2787,15,2787,43]; + lineof_temp[996] = [771,31,773,72]; + lineof_temp[5883] = [3985,14,3985,40]; + lineof_temp[5034] = [3446,24,3446,51]; + lineof_temp[6378] = [4291,25,4291,74]; + lineof_temp[5576] = [3788,8,3788,77]; + lineof_temp[684] = [598,2,598,32]; + lineof_temp[5280] = [3589,10,3589,20]; + lineof_temp[876] = [736,23,737,75]; + lineof_temp[1879] = [1411,28,1411,74]; + lineof_temp[2416] = [1825,4,1825,44]; + lineof_temp[7080] = [4717,23,4717,50]; + lineof_temp[26] = [41,4,41,26]; + lineof_temp[1002] = [758,18,760,53]; + lineof_temp[3247] = [2332,17,2332,67]; + lineof_temp[3343] = [2381,10,2381,33]; + lineof_temp[4823] = [3288,4,3288,14]; + lineof_temp[3957] = [2762,53,2762,65]; + lineof_temp[296] = [294,14,294,40]; + lineof_temp[435] = [416,16,416,17]; + lineof_temp[225] = [241,20,241,50]; + lineof_temp[7060] = [4700,10,4700,33]; + lineof_temp[5747] = [3898,14,3898,31]; + lineof_temp[2249] = [1675,18,1675,33]; + lineof_temp[3918] = [2695,8,2698,10]; + lineof_temp[1379] = [1060,52,1063,59]; + lineof_temp[1928] = [1448,24,1448,34]; + lineof_temp[2119] = [1568,4,1568,33]; + lineof_temp[2708] = [2000,22,2000,43]; + lineof_temp[4035] = [2805,15,2805,27]; + lineof_temp[5479] = [3743,18,3746,68]; + lineof_temp[1385] = [1065,52,1068,59]; + lineof_temp[3292] = [2345,4,2345,21]; + lineof_temp[6236] = [4221,8,4221,31]; + lineof_temp[7084] = [4719,10,4719,44]; + lineof_temp[2832] = [2083,43,2083,71]; + lineof_temp[2762] = [2036,27,2036,58]; + lineof_temp[2952] = [2158,8,2158,69]; + lineof_temp[5812] = [3935,14,3935,16]; + lineof_temp[3792] = [2656,19,2656,20]; + lineof_temp[5074] = [3409,2,3460,2]; + lineof_temp[5750] = [3897,4,3897,27]; + lineof_temp[454] = [445,4,445,15]; + lineof_temp[1266] = [953,20,953,39]; + lineof_temp[6898] = [4595,34,4595,53]; + lineof_temp[606] = [541,22,541,39]; + lineof_temp[1402] = [1054,46,1072,64]; + lineof_temp[5478] = [3743,18,3743,30]; + lineof_temp[269] = [279,31,279,57]; + lineof_temp[4690] = [3215,24,3215,41]; + lineof_temp[6193] = [4197,22,4197,39]; + lineof_temp[117] = [140,6,140,37]; + lineof_temp[2124] = [1595,25,1596,67]; + lineof_temp[4416] = [2974,4,2974,27]; + lineof_temp[2203] = [1646,14,1646,60]; + lineof_temp[2684] = [1982,16,1982,26]; + lineof_temp[4172] = [2892,6,2893,72]; + lineof_temp[912] = [758,18,760,53]; + lineof_temp[2496] = [1875,6,1880,8]; + lineof_temp[4812] = [3284,6,3287,25]; + lineof_temp[244] = [257,29,257,46]; + lineof_temp[2092] = [1499,12,1499,24]; + lineof_temp[4250] = [2948,6,2948,20]; + lineof_temp[4341] = [3018,25,3018,36]; + lineof_temp[5991] = [4038,4,4038,19]; + lineof_temp[405] = [401,10,401,11]; + lineof_temp[1447] = [1098,10,1098,53]; + lineof_temp[2590] = [1936,26,1936,55]; + lineof_temp[137] = [169,33,169,55]; + lineof_temp[2020] = [1506,36,1506,50]; + lineof_temp[2674] = [1985,24,1985,38]; + lineof_temp[6066] = [4124,24,4124,40]; + lineof_temp[3504] = [2471,12,2471,25]; + lineof_temp[6380] = [4292,18,4292,46]; + lineof_temp[3489] = [2488,20,2488,29]; + lineof_temp[751] = [648,37,648,77]; + lineof_temp[815] = [689,8,689,26]; + lineof_temp[1109] = [905,20,905,32]; + lineof_temp[1246] = [980,26,980,35]; + lineof_temp[1936] = [1385,20,1385,49]; + lineof_temp[5921] = [4026,18,4026,42]; + lineof_temp[418] = [423,18,423,38]; + lineof_temp[2581] = [1925,25,1925,26]; + lineof_temp[4825] = [3262,2,3281,4]; + lineof_temp[5270] = [3593,20,3593,51]; + lineof_temp[5749] = [3898,6,3898,33]; + lineof_temp[7219] = [4765,12,4765,50]; + lineof_temp[2174] = [1615,14,1615,60]; + lineof_temp[4891] = [3326,6,3326,12]; + lineof_temp[2665] = [1973,8,1973,38]; + lineof_temp[4608] = [3171,18,3171,39]; + lineof_temp[708] = [612,6,612,41]; + lineof_temp[3437] = [2466,17,2467,43]; + lineof_temp[3703] = [2614,18,2614,24]; + lineof_temp[3961] = [2762,4,2762,77]; + lineof_temp[6674] = [4499,16,4499,44]; + lineof_temp[4439] = [3064,29,3064,48]; + lineof_temp[5956] = [4048,15,4048,40]; + lineof_temp[1473] = [1104,6,1104,59]; + lineof_temp[3691] = [2611,10,2611,25]; + lineof_temp[6407] = [4310,14,4310,44]; + lineof_temp[7095] = [4730,8,4730,64]; + lineof_temp[2083] = [1536,12,1536,46]; + lineof_temp[4979] = [3348,10,3348,24]; + lineof_temp[1821] = [1364,24,1364,25]; + lineof_temp[2079] = [1538,16,1538,28]; + lineof_temp[2911] = [2133,16,2133,67]; + lineof_temp[423] = [430,20,430,47]; + lineof_temp[3042] = [2150,6,2150,33]; + lineof_temp[6693] = [4461,18,4461,47]; + lineof_temp[424] = [429,18,429,42]; + lineof_temp[1978] = [1468,4,1468,33]; + lineof_temp[4165] = [2886,4,2886,34]; + lineof_temp[4106] = [2858,6,2858,37]; + lineof_temp[1304] = [1004,22,1004,36]; + lineof_temp[6906] = [4602,44,4602,72]; + lineof_temp[394] = [403,18,403,43]; + lineof_temp[7033] = [4691,12,4691,27]; + lineof_temp[3282] = [2353,8,2355,24]; + lineof_temp[7182] = [4749,21,4749,36]; + lineof_temp[338] = [327,25,327,41]; + lineof_temp[5102] = [3480,6,3480,44]; + lineof_temp[1721] = [1294,16,1294,37]; + lineof_temp[6028] = [4107,18,4107,41]; + lineof_temp[6377] = [4291,25,4291,74]; + lineof_temp[7067] = [4697,24,4697,53]; + lineof_temp[233] = [229,12,229,62]; + lineof_temp[4086] = [2845,18,2845,65]; + lineof_temp[5583] = [3778,16,3778,27]; + lineof_temp[1743] = [1311,6,1311,17]; + lineof_temp[3735] = [2624,6,2633,6]; + lineof_temp[5385] = [3669,34,3669,35]; + lineof_temp[2101] = [1569,10,1569,34]; + lineof_temp[4549] = [3148,12,3149,68]; + lineof_temp[6427] = [4314,14,4316,65]; + lineof_temp[763] = [659,22,662,42]; + lineof_temp[5183] = [3518,2,3518,12]; + lineof_temp[6990] = [4661,36,4661,47]; + lineof_temp[361] = [358,2,359,50]; + lineof_temp[661] = [586,14,586,39]; + lineof_temp[3036] = [2154,17,2154,19]; + lineof_temp[4974] = [3359,8,3359,33]; + lineof_temp[136] = [168,31,168,53]; + lineof_temp[5529] = [3770,6,3770,30]; + lineof_temp[819] = [691,31,691,46]; + lineof_temp[4024] = [2800,2,2800,36]; + lineof_temp[7066] = [4698,10,4698,32]; + lineof_temp[7293] = [4804,12,4804,57]; + lineof_temp[88] = [89,4,89,27]; + lineof_temp[2375] = [1786,6,1786,28]; + lineof_temp[3332] = [2396,24,2396,70]; + lineof_temp[4339] = [3028,10,3028,35]; + lineof_temp[2583] = [1925,16,1930,37]; + lineof_temp[3135] = [2264,12,2274,69]; + lineof_temp[5035] = [3445,24,3445,70]; + lineof_temp[4846] = [3303,24,3304,49]; + lineof_temp[5954] = [4042,10,4046,98]; + lineof_temp[886] = [746,48,746,73]; + lineof_temp[4298] = [2997,24,2997,54]; + lineof_temp[6842] = [4555,36,4555,64]; + lineof_temp[4723] = [3244,14,3244,39]; + lineof_temp[7304] = [4817,14,4817,48]; + lineof_temp[2883] = [2104,16,2104,49]; + lineof_temp[129] = [160,22,160,37]; + lineof_temp[5380] = [3670,10,3670,31]; + lineof_temp[5808] = [3937,10,3939,22]; + lineof_temp[6208] = [4205,18,4205,35]; + lineof_temp[6663] = [4431,20,4431,49]; + lineof_temp[6714] = [4462,31,4462,64]; + lineof_temp[5979] = [4074,24,4075,62]; + lineof_temp[130] = [159,20,159,42]; + lineof_temp[2668] = [1980,20,1980,40]; + lineof_temp[5916] = [4011,14,4011,40]; + lineof_temp[6301] = [4250,18,4250,41]; + lineof_temp[3684] = [2580,24,2580,60]; + lineof_temp[4437] = [3066,4,3067,29]; + lineof_temp[6302] = [4250,18,4250,41]; + lineof_temp[6504] = [4339,18,4339,47]; + lineof_temp[1592] = [1184,14,1184,43]; + lineof_temp[5634] = [3837,2,3837,11]; + lineof_temp[4194] = [2905,14,2905,38]; + lineof_temp[6722] = [4483,37,4483,67]; + lineof_temp[3530] = [2502,4,2505,61]; + lineof_temp[4853] = [3302,8,3306,20]; + lineof_temp[7295] = [4803,8,4807,70]; + lineof_temp[869] = [737,48,737,71]; + lineof_temp[3669] = [2589,20,2589,66]; + lineof_temp[3896] = [2719,22,2719,50]; + lineof_temp[6264] = [4235,18,4235,46]; + lineof_temp[6609] = [4403,28,4403,56]; + lineof_temp[2279] = [1701,27,1701,60]; + lineof_temp[4822] = [3289,6,3290,26]; + lineof_temp[5255] = [3566,26,3566,46]; + lineof_temp[4405] = [2979,8,2979,20]; + lineof_temp[796] = [618,2,618,12]; + lineof_temp[3199] = [2321,21,2321,49]; + lineof_temp[1748] = [1316,16,1316,76]; + lineof_temp[4807] = [3285,6,3285,16]; + lineof_temp[704] = [611,19,611,57]; + lineof_temp[7353] = [4813,16,4813,50]; + lineof_temp[164] = [185,16,185,41]; + lineof_temp[341] = [343,17,343,32]; + lineof_temp[2486] = [1886,8,1886,28]; + lineof_temp[1251] = [966,14,974,16]; + lineof_temp[203] = [226,37,226,59]; + lineof_temp[2643] = [1889,6,1889,58]; + lineof_temp[6893] = [4594,36,4594,74]; + lineof_temp[870] = [737,48,737,71]; + lineof_temp[2066] = [1518,26,1518,72]; + lineof_temp[3126] = [2274,12,2274,69]; + lineof_temp[848] = [722,12,722,66]; + lineof_temp[1301] = [1003,25,1003,48]; + lineof_temp[3601] = [2547,26,2547,57]; + lineof_temp[3822] = [2663,8,2663,44]; + lineof_temp[6836] = [4551,40,4551,68]; + lineof_temp[7161] = [4737,22,4737,23]; + lineof_temp[5028] = [3439,26,3440,44]; + lineof_temp[236] = [224,6,224,21]; + lineof_temp[2959] = [2160,21,2160,53]; + lineof_temp[5253] = [3570,4,3570,20]; + lineof_temp[6037] = [4090,6,4096,8]; + lineof_temp[2531] = [1957,21,1964,72]; + lineof_temp[5219] = [3555,10,3555,28]; + lineof_temp[6909] = [4592,40,4592,41]; + lineof_temp[646] = [575,6,575,17]; + lineof_temp[3303] = [2373,18,2373,34]; + lineof_temp[4217] = [2914,16,2914,44]; + lineof_temp[2912] = [2133,16,2133,67]; + lineof_temp[3813] = [2668,19,2668,20]; + lineof_temp[2676] = [1986,16,1986,26]; + lineof_temp[3369] = [2417,22,2417,35]; + lineof_temp[3640] = [2546,18,2546,19]; + lineof_temp[5162] = [3508,2,3508,12]; + lineof_temp[4470] = [3095,10,3102,12]; + lineof_temp[1321] = [999,17,999,20]; + lineof_temp[3250] = [2333,12,2333,73]; + lineof_temp[3078] = [2243,18,2243,48]; + lineof_temp[4420] = [2972,4,2972,15]; + lineof_temp[4754] = [3252,6,3252,69]; + lineof_temp[1040] = [838,8,838,39]; + lineof_temp[6109] = [4156,22,4156,34]; + lineof_temp[6480] = [4328,25,4328,41]; + lineof_temp[711] = [611,6,611,16]; + lineof_temp[2151] = [1566,2,1600,2]; + lineof_temp[4648] = [3197,6,3198,51]; + lineof_temp[4876] = [3298,6,3298,66]; + lineof_temp[3044] = [2146,10,2146,13]; + lineof_temp[3552] = [2524,14,2524,33]; + lineof_temp[6418] = [4316,22,4316,63]; + lineof_temp[6769] = [4437,4,4437,42]; + lineof_temp[1819] = [1366,14,1366,25]; + lineof_temp[5366] = [3650,12,3650,22]; + lineof_temp[1619] = [1214,10,1214,43]; + lineof_temp[3418] = [2447,22,2447,36]; + lineof_temp[5441] = [3715,16,3715,24]; + lineof_temp[5562] = [3797,20,3797,26]; + lineof_temp[734] = [633,20,636,89]; + lineof_temp[2820] = [2050,16,2050,51]; + lineof_temp[3803] = [2667,19,2667,77]; + lineof_temp[5558] = [3803,8,3803,19]; + lineof_temp[5600] = [3817,14,3817,23]; + lineof_temp[6330] = [4253,4,4253,36]; + lineof_temp[3131] = [2265,12,2270,14]; + lineof_temp[5289] = [3604,19,3604,37]; + lineof_temp[3218] = [2310,19,2311,57]; + lineof_temp[3217] = [2312,4,2312,15]; + lineof_temp[5595] = [3809,14,3809,16]; + lineof_temp[6075] = [4136,16,4136,39]; + lineof_temp[1253] = [963,28,963,57]; + lineof_temp[5789] = [3924,14,3924,42]; + lineof_temp[7007] = [4670,26,4670,36]; + lineof_temp[5264] = [3595,12,3595,63]; + lineof_temp[1245] = [976,16,976,29]; + lineof_temp[3287] = [2349,21,2349,50]; + lineof_temp[1603] = [1206,20,1206,63]; + lineof_temp[4790] = [3263,12,3263,16]; + lineof_temp[2120] = [1581,21,1581,43]; + lineof_temp[6433] = [4320,44,4320,62]; + lineof_temp[3739] = [2641,6,2641,26]; + lineof_temp[5647] = [3849,14,3849,40]; + lineof_temp[132] = [162,26,162,44]; + lineof_temp[2859] = [2104,16,2104,49]; + lineof_temp[4173] = [2891,4,2891,44]; + lineof_temp[5476] = [3744,22,3744,68]; + lineof_temp[992] = [771,31,773,72]; + lineof_temp[1861] = [1395,16,1395,36]; + lineof_temp[5868] = [3976,18,3976,47]; + lineof_temp[2113] = [1572,14,1572,60]; + lineof_temp[2547] = [1916,16,1916,37]; + lineof_temp[5672] = [3857,14,3857,45]; + lineof_temp[670] = [592,17,592,29]; + lineof_temp[1665] = [1246,10,1246,24]; + lineof_temp[5818] = [3930,10,3930,15]; + lineof_temp[1775] = [1337,18,1337,45]; + lineof_temp[1953] = [1461,15,1461,48]; + lineof_temp[549] = [514,10,514,25]; + lineof_temp[1017] = [726,13,726,16]; + lineof_temp[2715] = [1997,12,1997,57]; + lineof_temp[4276] = [2995,16,2995,67]; + lineof_temp[5494] = [3751,16,3751,25]; + lineof_temp[3999] = [2776,10,2776,18]; + lineof_temp[5845] = [3964,24,3964,58]; + lineof_temp[3284] = [2351,16,2351,22]; + lineof_temp[3576] = [2518,23,2518,55]; + lineof_temp[1000] = [762,18,770,18]; + lineof_temp[1681] = [1263,18,1263,38]; + lineof_temp[3745] = [2645,17,2645,73]; + lineof_temp[471] = [463,10,463,31]; + lineof_temp[2567] = [1918,16,1923,37]; + lineof_temp[6752] = [4474,30,4474,37]; + lineof_temp[1329] = [1009,51,1009,70]; + lineof_temp[4488] = [3077,6,3080,8]; + lineof_temp[4670] = [3216,15,3216,37]; + lineof_temp[6731] = [4491,25,4492,63]; + lineof_temp[267] = [274,6,276,39]; + lineof_temp[5505] = [3737,12,3737,50]; + lineof_temp[6676] = [4444,18,4444,45]; + lineof_temp[6997] = [4652,30,4652,53]; + lineof_temp[4751] = [3253,12,3253,40]; + lineof_temp[5491] = [3752,16,3752,40]; + lineof_temp[3175] = [2280,20,2280,67]; + lineof_temp[1492] = [1130,8,1130,27]; + lineof_temp[5544] = [3786,14,3786,56]; + lineof_temp[1990] = [1483,17,1483,29]; + lineof_temp[2307] = [1718,6,1718,34]; + lineof_temp[4263] = [2957,4,2957,29]; + lineof_temp[3296] = [2366,12,2366,58]; + lineof_temp[5360] = [3653,22,3653,30]; + lineof_temp[6878] = [4581,32,4581,67]; + lineof_temp[775] = [624,19,624,25]; + lineof_temp[1102] = [907,24,907,72]; + lineof_temp[5570] = [3799,20,3799,26]; + lineof_temp[961] = [785,32,785,50]; + lineof_temp[1078] = [919,39,919,66]; + lineof_temp[3816] = [2667,10,2667,78]; + lineof_temp[97] = [118,6,118,27]; + lineof_temp[5459] = [3725,27,3725,39]; + lineof_temp[2238] = [1665,18,1665,61]; + lineof_temp[5330] = [3609,10,3609,13]; + lineof_temp[4595] = [3157,2,3157,45]; + lineof_temp[5345] = [3644,20,3645,27]; + lineof_temp[6040] = [4089,6,4089,15]; + lineof_temp[2482] = [1885,24,1885,36]; + lineof_temp[5433] = [3705,6,3706,31]; + lineof_temp[7211] = [4755,8,4755,38]; + lineof_temp[1910] = [1426,10,1426,41]; + lineof_temp[2190] = [1610,10,1610,11]; + lineof_temp[3438] = [2466,17,2467,43]; + lineof_temp[4183] = [2899,14,2899,71]; + lineof_temp[7024] = [4679,4,4679,28]; + lineof_temp[1103] = [906,38,906,53]; + lineof_temp[486] = [458,23,458,66]; + lineof_temp[895] = [745,10,747,24]; + lineof_temp[2449] = [1861,6,1861,34]; + lineof_temp[1210] = [987,16,987,33]; + lineof_temp[7220] = [4763,12,4763,27]; + lineof_temp[771] = [640,14,666,14]; + lineof_temp[4417] = [2973,4,2973,33]; + lineof_temp[1938] = [1385,8,1385,17]; + lineof_temp[4942] = [3371,38,3371,49]; + lineof_temp[3396] = [2431,20,2431,66]; + lineof_temp[1353] = [1033,40,1034,71]; + lineof_temp[3885] = [2730,32,2730,63]; + lineof_temp[2896] = [2089,2,2089,52]; + lineof_temp[6072] = [4135,20,4135,32]; + lineof_temp[3399] = [2430,16,2433,92]; + lineof_temp[6437] = [4320,14,4320,65]; + lineof_temp[6668] = [4422,16,4422,21]; + lineof_temp[1611] = [1212,10,1212,41]; + lineof_temp[3651] = [2542,4,2542,41]; + lineof_temp[4770] = [3266,10,3269,53]; + lineof_temp[6814] = [4539,44,4539,72]; + lineof_temp[29] = [44,6,44,41]; + lineof_temp[3435] = [2465,14,2465,59]; + lineof_temp[5226] = [3538,4,3542,5]; + lineof_temp[1566] = [1172,4,1172,18]; + lineof_temp[3510] = [2458,11,2458,13]; + lineof_temp[5225] = [3543,4,3545,6]; +lineof_data["JsInterpreter.pseudo"] = lineof_temp; + lineof_temp = []; + lineof_temp[5852] = [5707,6,5715,14]; + lineof_temp[3683] = [3708,20,3708,30]; + lineof_temp[5957] = [5822,21,5822,46]; + lineof_temp[2071] = [2196,20,2200,60]; + lineof_temp[2875] = [2977,20,2979,63]; + lineof_temp[5398] = [5308,12,5311,25]; + lineof_temp[5978] = [5853,26,5853,69]; + lineof_temp[4062] = [4089,16,4089,65]; + lineof_temp[1457] = [1596,20,1598,71]; + lineof_temp[6367] = [6153,8,6154,26]; + lineof_temp[6522] = [6312,22,6312,41]; + lineof_temp[3289] = [3336,12,3336,12]; + lineof_temp[4811] = [4774,18,4774,18]; + lineof_temp[5855] = [5692,2,5692,18]; + lineof_temp[102] = [131,14,131,39]; + lineof_temp[6224] = [6055,69,6055,74]; + lineof_temp[6246] = [6072,25,6072,61]; + lineof_temp[654] = [719,45,719,70]; + lineof_temp[4395] = [4266,17,4266,34]; + lineof_temp[4150] = [4160,14,4160,62]; + lineof_temp[6272] = [6095,26,6095,76]; + lineof_temp[5556] = [5451,16,5453,45]; + lineof_temp[1715] = [1882,22,1882,50]; + lineof_temp[3086] = [3156,18,3156,29]; + lineof_temp[5045] = [4997,32,4998,63]; + lineof_temp[6623] = [6400,32,6401,39]; + lineof_temp[6744] = [6525,24,6542,79]; + lineof_temp[4957] = [4931,28,4931,36]; + lineof_temp[6000] = [5864,70,5864,73]; + lineof_temp[7314] = [7072,71,7074,72]; + lineof_temp[1740] = [1899,8,1902,54]; + lineof_temp[5252] = [5170,14,5170,19]; + lineof_temp[2117] = [2260,14,2264,99]; + lineof_temp[3509] = [3478,18,3478,21]; + lineof_temp[3265] = [3328,14,3328,25]; + lineof_temp[6336] = [6134,8,6135,26]; + lineof_temp[2370] = [2501,4,2501,44]; + lineof_temp[6451] = [6253,58,6253,76]; + lineof_temp[4660] = [4665,14,4666,72]; + lineof_temp[5768] = [5632,14,5632,58]; + lineof_temp[2511] = [2643,14,2643,14]; + lineof_temp[3312] = [3377,24,3377,76]; + lineof_temp[7062] = [6841,26,6842,37]; + lineof_temp[2192] = [2311,61,2311,62]; + lineof_temp[3791] = [3835,20,3837,34]; + lineof_temp[235] = [247,10,247,60]; + lineof_temp[3627] = [3660,48,3660,48]; + lineof_temp[4202] = [4193,16,4193,39]; + lineof_temp[5141] = [5095,11,5095,39]; + lineof_temp[5383] = [5297,20,5298,76]; + lineof_temp[7076] = [6852,17,6852,33]; + lineof_temp[3754] = [3814,29,3816,76]; + lineof_temp[4292] = [4335,34,4335,74]; + lineof_temp[4357] = [4402,48,4402,63]; + lineof_temp[7334] = [7054,30,7079,48]; + lineof_temp[3613] = [3663,52,3663,77]; + lineof_temp[5231] = [5132,12,5132,13]; + lineof_temp[5318] = [5232,67,5232,74]; + lineof_temp[6694] = [6495,32,6495,59]; + lineof_temp[5617] = [5498,12,5498,12]; + lineof_temp[2791] = [2839,19,2839,23]; + lineof_temp[7351] = [7042,14,7042,14]; + lineof_temp[403] = [449,12,459,71]; + lineof_temp[3875] = [3930,25,3931,65]; + lineof_temp[691] = [756,14,756,32]; + lineof_temp[1930] = [2103,28,2103,48]; + lineof_temp[6148] = [5998,14,5998,30]; + lineof_temp[2426] = [2558,4,2558,29]; + lineof_temp[2448] = [2586,14,2586,35]; + lineof_temp[4404] = [4278,37,4278,50]; + lineof_temp[5101] = [5060,26,5060,64]; + lineof_temp[6499] = [6291,28,6293,80]; + lineof_temp[5624] = [5493,10,5493,17]; + lineof_temp[5942] = [5805,70,5805,72]; + lineof_temp[242] = [279,10,279,27]; + lineof_temp[3002] = [3102,44,3102,54]; + lineof_temp[159] = [200,22,200,37]; + lineof_temp[3621] = [3669,50,3672,76]; + lineof_temp[5435] = [5348,17,5348,38]; + lineof_temp[781] = [910,36,913,74]; + lineof_temp[3759] = [3824,26,3825,72]; + lineof_temp[5568] = [5455,16,5456,37]; + lineof_temp[3094] = [3171,10,3173,29]; + lineof_temp[5524] = [5413,8,5413,8]; + lineof_temp[4072] = [4068,59,4068,65]; + lineof_temp[521] = [582,36,587,114]; + lineof_temp[1271] = [1366,37,1366,42]; + lineof_temp[2679] = [2779,20,2779,40]; + lineof_temp[5217] = [5153,30,5153,38]; + lineof_temp[6423] = [6212,20,6222,28]; + lineof_temp[6457] = [6246,33,6246,35]; + lineof_temp[7107] = [6863,24,6869,25]; + lineof_temp[767] = [833,46,833,53]; + lineof_temp[4817] = [4787,26,4787,59]; + lineof_temp[5095] = [5034,28,5034,55]; + lineof_temp[6816] = [6599,34,6599,56]; + lineof_temp[2917] = [3007,14,3014,34]; + lineof_temp[2986] = [3096,41,3096,68]; + lineof_temp[3317] = [3389,34,3390,44]; + lineof_temp[3647] = [3629,21,3629,27]; + lineof_temp[4383] = [4421,20,4421,35]; + lineof_temp[6567] = [6347,10,6347,35]; + lineof_temp[7150] = [6922,45,6922,54]; + lineof_temp[3751] = [3816,47,3816,73]; + lineof_temp[7118] = [6855,12,6855,12]; + lineof_temp[1497] = [1626,18,1626,39]; + lineof_temp[4445] = [4448,21,4448,69]; + lineof_temp[5897] = [5759,70,5759,72]; + lineof_temp[3299] = [3356,8,3359,80]; + lineof_temp[5234] = [5129,50,5129,56]; + lineof_temp[6220] = [6055,20,6055,58]; + lineof_temp[279] = [310,14,310,40]; + lineof_temp[2294] = [2423,12,2423,12]; + lineof_temp[3461] = [3509,22,3509,44]; + lineof_temp[5512] = [5376,16,5376,23]; + lineof_temp[5732] = [5599,14,5599,44]; + lineof_temp[1289] = [974,2,978,4]; + lineof_temp[1958] = [2125,12,2125,50]; + lineof_temp[2519] = [2733,18,2740,62]; + lineof_temp[5934] = [5764,6,5796,16]; + lineof_temp[5674] = [5545,4,5547,25]; + lineof_temp[1175] = [1161,28,1162,51]; + lineof_temp[3797] = [3851,25,3852,54]; + lineof_temp[6383] = [6171,23,6171,26]; + lineof_temp[6870] = [6653,14,6653,61]; + lineof_temp[326] = [348,4,349,26]; + lineof_temp[4266] = [4264,6,4264,30]; + lineof_temp[5335] = [5249,16,5249,69]; + lineof_temp[391] = [445,12,445,53]; + lineof_temp[3193] = [3251,8,3251,59]; + lineof_temp[7011] = [6750,20,6791,26]; + lineof_temp[226] = [260,16,260,46]; + lineof_temp[758] = [857,52,857,52]; + lineof_temp[889] = [1017,26,1019,67]; + lineof_temp[2701] = [2791,14,2791,30]; + lineof_temp[6520] = [6306,10,6308,78]; + lineof_temp[6787] = [6573,38,6573,64]; + lineof_temp[6276] = [6096,35,6096,40]; + lineof_temp[6581] = [6357,20,6357,36]; + lineof_temp[7013] = [6748,20,6748,43]; + lineof_temp[1468] = [1600,12,1600,12]; + lineof_temp[1937] = [2002,70,2003,19]; + lineof_temp[7020] = [6722,4,6722,46]; + lineof_temp[4105] = [4134,20,4134,48]; + lineof_temp[4926] = [4891,31,4891,54]; + lineof_temp[2812] = [2888,16,2895,76]; + lineof_temp[7130] = [6917,63,6917,74]; + lineof_temp[3932] = [3955,26,3955,44]; + lineof_temp[1132] = [1234,64,1234,71]; + lineof_temp[4702] = [4692,10,4692,44]; + lineof_temp[4939] = [4920,42,4926,104]; + lineof_temp[404] = [448,10,448,46]; + lineof_temp[1197] = [1147,26,1147,31]; + lineof_temp[1624] = [1747,36,1747,36]; + lineof_temp[926] = [1097,34,1098,71]; + lineof_temp[3605] = [3645,38,3645,57]; + lineof_temp[6655] = [6420,18,6420,67]; + lineof_temp[262] = [297,31,297,57]; + lineof_temp[2032] = [2235,20,2235,69]; + lineof_temp[5723] = [5592,14,5592,38]; + lineof_temp[645] = [704,16,704,52]; + lineof_temp[334] = [367,14,367,35]; + lineof_temp[3757] = [3819,24,3821,69]; + lineof_temp[6346] = [6141,16,6141,16]; + lineof_temp[6746] = [6516,24,6518,77]; + lineof_temp[395] = [458,30,459,60]; + lineof_temp[2554] = [2672,30,2672,63]; + lineof_temp[3714] = [3776,28,3776,74]; + lineof_temp[6409] = [6203,14,6206,81]; + lineof_temp[5501] = [5390,14,5391,56]; + lineof_temp[5794] = [5579,15,5579,38]; + lineof_temp[6465] = [6195,18,6195,23]; + lineof_temp[5816] = [5662,6,5677,16]; + lineof_temp[2628] = [2724,39,2724,54]; + lineof_temp[1977] = [2130,12,2140,23]; + lineof_temp[5139] = [5080,2,5090,29]; + lineof_temp[6614] = [6386,28,6386,65]; + lineof_temp[359] = [397,52,397,58]; + lineof_temp[2468] = [2587,4,2587,29]; + lineof_temp[3202] = [3294,20,3296,28]; + lineof_temp[7025] = [6800,16,6800,32]; + lineof_temp[1782] = [1937,10,1938,40]; + lineof_temp[3926] = [3874,16,3874,39]; + lineof_temp[4221] = [4203,4,4203,41]; + lineof_temp[6745] = [6519,24,6524,26]; + lineof_temp[5941] = [5805,16,5805,59]; + lineof_temp[1623] = [1746,43,1746,49]; + lineof_temp[1888] = [2061,54,2061,66]; + lineof_temp[441] = [466,4,511,14]; + lineof_temp[3879] = [3936,29,3937,69]; + lineof_temp[5238] = [5167,6,5167,58]; + lineof_temp[5968] = [5844,28,5844,56]; + lineof_temp[1226] = [1400,52,1401,69]; + lineof_temp[2623] = [2719,20,2722,63]; + lineof_temp[5266] = [5198,48,5198,55]; + lineof_temp[3637] = [3644,34,3644,34]; + lineof_temp[3909] = [3914,20,3914,28]; + lineof_temp[4227] = [4213,4,4213,28]; + lineof_temp[7014] = [6747,53,6747,66]; + lineof_temp[596] = [657,34,657,75]; + lineof_temp[3468] = [3524,38,3524,51]; + lineof_temp[5577] = [5444,10,5446,12]; + lineof_temp[365] = [410,12,410,28]; + lineof_temp[5743] = [5608,14,5608,41]; + lineof_temp[162] = [167,16,168,36]; + lineof_temp[1680] = [1835,24,1835,62]; + lineof_temp[4992] = [4966,22,4967,40]; + lineof_temp[6430] = [6226,26,6226,45]; + lineof_temp[564] = [626,14,629,68]; + lineof_temp[1769] = [1916,25,1916,60]; + lineof_temp[4411] = [4287,32,4288,70]; + lineof_temp[175] = [219,6,219,37]; + lineof_temp[3442] = [3495,32,3497,58]; + lineof_temp[3081] = [3159,20,3159,54]; + lineof_temp[1896] = [2042,44,2042,62]; + lineof_temp[3062] = [3135,12,3135,66]; + lineof_temp[3756] = [3820,26,3821,55]; + lineof_temp[92] = [113,4,113,14]; + lineof_temp[790] = [794,18,794,18]; + lineof_temp[3764] = [3814,20,3816,77]; + lineof_temp[916] = [1074,35,1074,64]; + lineof_temp[1900] = [2030,36,2030,43]; + lineof_temp[7266] = [6989,4,6989,46]; + lineof_temp[224] = [263,18,263,47]; + lineof_temp[5302] = [5219,4,5219,14]; + lineof_temp[6404] = [6177,14,6177,19]; + lineof_temp[1533] = [1658,12,1658,50]; + lineof_temp[3466] = [3522,35,3522,54]; + lineof_temp[417] = [487,26,489,74]; + lineof_temp[1523] = [1650,14,1650,29]; + lineof_temp[4924] = [4890,20,4890,62]; + lineof_temp[153] = [185,30,186,56]; + lineof_temp[2696] = [2786,8,2788,68]; + lineof_temp[3947] = [3960,2,3962,63]; + lineof_temp[3953] = [3967,4,3968,50]; + lineof_temp[6897] = [6680,36,6681,77]; + lineof_temp[2063] = [2192,20,2193,76]; + lineof_temp[3433] = [3489,36,3489,68]; + lineof_temp[7230] = [6983,26,6983,53]; + lineof_temp[2484] = [2619,22,2619,68]; + lineof_temp[948] = [1113,46,1113,68]; + lineof_temp[1864] = [2025,40,2025,40]; + lineof_temp[689] = [747,15,747,33]; + lineof_temp[4254] = [4251,14,4251,28]; + lineof_temp[591] = [666,50,666,55]; + lineof_temp[1157] = [1179,52,1179,75]; + lineof_temp[1956] = [2116,2,2120,79]; + lineof_temp[4584] = [4577,20,4577,20]; + lineof_temp[807] = [958,8,958,22]; + lineof_temp[1973] = [2133,18,2133,48]; + lineof_temp[2916] = [3011,20,3011,20]; + lineof_temp[5245] = [5176,24,5176,62]; + lineof_temp[6645] = [6358,6,6358,38]; + lineof_temp[7043] = [6799,4,6799,39]; + lineof_temp[492] = [513,2,522,4]; + lineof_temp[2255] = [2389,6,2397,75]; + lineof_temp[5708] = [5515,15,5515,38]; + lineof_temp[6133] = [5988,46,5988,54]; + lineof_temp[3260] = [3305,2,3322,13]; + lineof_temp[5912] = [5776,20,5776,46]; + lineof_temp[1551] = [1678,6,1680,72]; + lineof_temp[2293] = [2422,25,2422,28]; + lineof_temp[4267] = [4264,6,4264,30]; + lineof_temp[7123] = [6890,18,6890,37]; + lineof_temp[623] = [689,20,690,75]; + lineof_temp[5508] = [5405,20,5405,69]; + lineof_temp[6601] = [6377,28,6377,70]; + lineof_temp[3701] = [3760,20,3762,51]; + lineof_temp[5955] = [5814,14,5814,47]; + lineof_temp[6922] = [6668,61,6668,74]; + lineof_temp[3436] = [3491,38,3492,53]; + lineof_temp[6986] = [6769,38,6769,75]; + lineof_temp[5535] = [5426,6,5429,80]; + lineof_temp[7281] = [7024,14,7024,51]; + lineof_temp[707] = [780,49,780,74]; + lineof_temp[1350] = [1497,38,1500,56]; + lineof_temp[3029] = [3058,22,3058,25]; + lineof_temp[3895] = [3928,20,3928,58]; + lineof_temp[1174] = [1163,30,1164,73]; + lineof_temp[2420] = [2551,4,2551,50]; + lineof_temp[4706] = [4688,50,4688,56]; + lineof_temp[111] = [124,10,124,19]; + lineof_temp[4515] = [4545,52,4545,67]; + lineof_temp[7134] = [6921,43,6921,74]; + lineof_temp[4785] = [4762,16,4762,31]; + lineof_temp[4870] = [4829,13,4829,28]; + lineof_temp[6784] = [6566,14,6566,61]; + lineof_temp[551] = [619,22,619,55]; + lineof_temp[4092] = [4109,72,4109,73]; + lineof_temp[5407] = [5291,8,5304,10]; + lineof_temp[1777] = [1941,18,1941,67]; + lineof_temp[3035] = [3041,10,3042,49]; + lineof_temp[1339] = [1480,30,1482,77]; + lineof_temp[1483] = [1551,10,1551,19]; + lineof_temp[3398] = [3446,16,3446,31]; + lineof_temp[1311] = [1451,22,1454,50]; + lineof_temp[5233] = [5129,11,5129,39]; + lineof_temp[2573] = [2681,24,2684,67]; + lineof_temp[7332] = [7057,43,7057,47]; + lineof_temp[4196] = [4188,6,4188,46]; + lineof_temp[554] = [617,18,617,33]; + lineof_temp[893] = [1020,35,1020,37]; + lineof_temp[2162] = [2302,2,2306,73]; + lineof_temp[209] = [250,39,250,61]; + lineof_temp[2861] = [2963,18,2963,24]; + lineof_temp[3331] = [3400,36,3401,52]; + lineof_temp[7054] = [6834,30,6835,34]; + lineof_temp[7297] = [7026,6,7031,72]; + lineof_temp[4457] = [4466,24,4466,41]; + lineof_temp[4765] = [4743,15,4743,33]; + lineof_temp[2970] = [3059,24,3059,60]; + lineof_temp[3812] = [3863,26,3865,71]; + lineof_temp[4491] = [4442,4,4443,45]; + lineof_temp[5547] = [5444,21,5444,34]; + lineof_temp[7048] = [6828,22,6828,48]; + lineof_temp[1781] = [1939,12,1943,111]; + lineof_temp[6035] = [5888,14,5889,32]; + lineof_temp[1264] = [1373,38,1379,40]; + lineof_temp[4019] = [4046,25,4046,47]; + lineof_temp[7226] = [6982,20,6982,43]; + lineof_temp[5460] = [5366,21,5366,40]; + lineof_temp[2893] = [2943,2,2943,30]; + lineof_temp[4329] = [4372,29,4372,70]; + lineof_temp[5368] = [5267,20,5267,29]; + lineof_temp[6275] = [6095,26,6095,76]; + lineof_temp[285] = [313,35,313,61]; + lineof_temp[5931] = [5765,15,5765,50]; + lineof_temp[7112] = [6857,23,6857,57]; + lineof_temp[958] = [1083,38,1083,73]; + lineof_temp[1462] = [1592,60,1592,72]; + lineof_temp[1577] = [1716,14,1718,57]; + lineof_temp[1275] = [1362,44,1362,48]; + lineof_temp[399] = [452,18,459,67]; + lineof_temp[1332] = [1466,18,1468,69]; + lineof_temp[2772] = [2853,32,2853,75]; + lineof_temp[3276] = [3345,41,3345,49]; + lineof_temp[3556] = [3607,56,3610,70]; + lineof_temp[3825] = [3801,10,3801,71]; + lineof_temp[6490] = [6275,4,6275,46]; + lineof_temp[5429] = [5333,10,5341,21]; + lineof_temp[6737] = [6534,34,6537,77]; + lineof_temp[543] = [561,64,561,65]; + lineof_temp[1496] = [1621,8,1622,26]; + lineof_temp[4044] = [4059,14,4059,14]; + lineof_temp[6631] = [6398,28,6405,55]; + lineof_temp[2842] = [2908,8,2913,10]; + lineof_temp[421] = [494,26,494,59]; + lineof_temp[257] = [292,8,293,37]; + lineof_temp[6454] = [6253,36,6253,77]; + lineof_temp[529] = [590,28,591,55]; + lineof_temp[1490] = [1620,18,1620,55]; + lineof_temp[3850] = [3884,8,3884,30]; + lineof_temp[5021] = [4999,39,5000,71]; + lineof_temp[1076] = [1320,64,1325,78]; + lineof_temp[1647] = [1788,32,1788,58]; + lineof_temp[5430] = [5332,19,5332,31]; + lineof_temp[5678] = [5549,4,5550,45]; + lineof_temp[2966] = [3114,51,3114,53]; + lineof_temp[3779] = [3845,28,3846,57]; + lineof_temp[6899] = [6684,36,6687,79]; + lineof_temp[4233] = [4223,4,4223,29]; + lineof_temp[7073] = [6823,12,6823,12]; + lineof_temp[2982] = [3068,32,3073,100]; + lineof_temp[1187] = [1350,32,1350,65]; + lineof_temp[6776] = [6550,6,6557,17]; + lineof_temp[1485] = [1618,18,1618,55]; + lineof_temp[1016] = [984,20,984,64]; + lineof_temp[2961] = [3113,24,3114,40]; + lineof_temp[5659] = [5533,6,5537,68]; + lineof_temp[6873] = [6656,22,6656,59]; + lineof_temp[249] = [288,8,289,37]; + lineof_temp[1013] = [1013,20,1026,22]; + lineof_temp[2598] = [2693,22,2693,22]; + lineof_temp[3897] = [3925,26,3925,54]; + lineof_temp[5892] = [5720,27,5720,52]; + lineof_temp[6748] = [6514,31,6514,34]; + lineof_temp[2301] = [2434,6,2434,29]; + lineof_temp[824] = [945,28,945,65]; + lineof_temp[3444] = [3498,34,3498,34]; + lineof_temp[6396] = [6184,20,6184,63]; + lineof_temp[1056] = [1275,51,1275,75]; + lineof_temp[2704] = [2792,6,2795,79]; + lineof_temp[5821] = [5686,33,5686,41]; + lineof_temp[4220] = [4204,6,4208,81]; + lineof_temp[4750] = [4730,16,4737,24]; + lineof_temp[210] = [250,39,250,61]; + lineof_temp[3828] = [3799,6,3869,16]; + lineof_temp[345] = [383,10,383,55]; + lineof_temp[5131] = [5081,13,5081,30]; + lineof_temp[2939] = [2999,4,3000,53]; + lineof_temp[3914] = [3910,18,3910,26]; + lineof_temp[4001] = [3989,2,4020,13]; + lineof_temp[6141] = [5985,10,5985,10]; + lineof_temp[321] = [344,6,344,25]; + lineof_temp[1211] = [1428,38,1428,69]; + lineof_temp[5090] = [5038,8,5038,45]; + lineof_temp[7301] = [7038,12,7038,49]; + lineof_temp[196] = [241,29,241,47]; + lineof_temp[5610] = [5497,15,5497,43]; + lineof_temp[7175] = [6891,12,6891,12]; + lineof_temp[4122] = [4147,54,4147,61]; + lineof_temp[4738] = [4724,17,4724,46]; + lineof_temp[5665] = [5544,28,5544,63]; + lineof_temp[6006] = [5874,18,5874,44]; + lineof_temp[116] = [148,4,148,25]; + lineof_temp[2285] = [2418,10,2422,14]; + lineof_temp[348] = [382,6,385,72]; + lineof_temp[6770] = [6552,20,6552,36]; + lineof_temp[38] = [60,14,60,40]; + lineof_temp[1127] = [1218,58,1218,72]; + lineof_temp[5205] = [5145,23,5145,47]; + lineof_temp[2913] = [3012,20,3014,30]; + lineof_temp[3503] = [3503,24,3503,40]; + lineof_temp[6984] = [6764,36,6765,77]; + lineof_temp[5741] = [5605,6,5605,70]; + lineof_temp[522] = [581,34,587,116]; + lineof_temp[2436] = [2569,4,2570,26]; + lineof_temp[7032] = [6811,20,6811,46]; + lineof_temp[2624] = [2718,18,2718,31]; + lineof_temp[4067] = [4077,8,4077,51]; + lineof_temp[5507] = [5377,10,5378,30]; + lineof_temp[3678] = [3731,20,3731,77]; + lineof_temp[4026] = [4044,48,4044,54]; + lineof_temp[635] = [642,10,642,51]; + lineof_temp[1767] = [1916,25,1916,60]; + lineof_temp[2399] = [2532,6,2532,29]; + lineof_temp[3364] = [3363,19,3363,40]; + lineof_temp[5390] = [5301,32,5301,37]; + lineof_temp[362] = [391,16,391,32]; + lineof_temp[2019] = [2181,36,2181,50]; + lineof_temp[3686] = [3707,12,3707,12]; + lineof_temp[4508] = [4527,32,4528,78]; + lineof_temp[7070] = [6824,12,6850,23]; + lineof_temp[1007] = [1035,32,1035,54]; + lineof_temp[3616] = [3671,68,3672,71]; + lineof_temp[1562] = [1684,16,1684,51]; + lineof_temp[4655] = [4662,19,4662,44]; + lineof_temp[6633] = [6396,61,6396,69]; + lineof_temp[3279] = [3342,18,3343,73]; + lineof_temp[5350] = [5259,12,5264,45]; + lineof_temp[6554] = [6323,24,6323,44]; + lineof_temp[649] = [705,12,705,12]; + lineof_temp[1005] = [1038,26,1038,71]; + lineof_temp[5098] = [5055,17,5055,52]; + lineof_temp[5908] = [5770,18,5773,100]; + lineof_temp[372] = [420,4,420,30]; + lineof_temp[859] = [990,27,990,59]; + lineof_temp[2284] = [2418,59,2418,71]; + lineof_temp[3017] = [3091,47,3091,52]; + lineof_temp[6974] = [6751,22,6751,65]; + lineof_temp[5067] = [4959,17,4959,41]; + lineof_temp[73] = [100,11,101,75]; + lineof_temp[1857] = [2023,38,2024,50]; + lineof_temp[4424] = [4273,22,4273,22]; + lineof_temp[4010] = [4025,56,4025,62]; + lineof_temp[4714] = [4706,14,4706,44]; + lineof_temp[6360] = [6158,38,6158,72]; + lineof_temp[896] = [1014,22,1014,61]; + lineof_temp[1417] = [1471,20,1545,57]; + lineof_temp[1337] = [1479,38,1479,66]; + lineof_temp[1138] = [1234,64,1234,71]; + lineof_temp[3603] = [3645,40,3645,56]; + lineof_temp[2454] = [2591,21,2591,48]; + lineof_temp[2784] = [2847,24,2847,24]; + lineof_temp[4239] = [4229,4,4229,34]; + lineof_temp[4734] = [4702,10,4702,16]; + lineof_temp[5545] = [5445,20,5445,69]; + lineof_temp[7162] = [6906,32,6906,32]; + lineof_temp[1363] = [1506,49,1509,74]; + lineof_temp[6201] = [6038,22,6038,42]; + lineof_temp[7113] = [6857,68,6858,20]; + lineof_temp[1048] = [1263,36,1264,73]; + lineof_temp[3941] = [3962,16,3962,46]; + lineof_temp[6595] = [6363,12,6367,60]; + lineof_temp[7286] = [7031,22,7031,43]; + lineof_temp[3197] = [3255,18,3255,66]; + lineof_temp[7298] = [7025,4,7025,12]; + lineof_temp[149] = [193,30,193,51]; + lineof_temp[1201] = [1143,12,1355,22]; + lineof_temp[3917] = [3903,8,3907,10]; + lineof_temp[3956] = [3965,27,3965,50]; + lineof_temp[6711] = [6481,51,6481,60]; + lineof_temp[253] = [292,31,292,57]; + lineof_temp[3459] = [3511,26,3513,78]; + lineof_temp[3652] = [3563,16,3563,21]; + lineof_temp[7058] = [6833,26,6837,70]; + lineof_temp[4364] = [4405,27,4405,45]; + lineof_temp[4635] = [4626,19,4626,41]; + lineof_temp[229] = [256,16,256,42]; + lineof_temp[5960] = [5822,20,5822,73]; + lineof_temp[4700] = [4696,16,4696,16]; + lineof_temp[2130] = [2293,48,2293,54]; + lineof_temp[6832] = [6617,34,6618,53]; + lineof_temp[662] = [727,12,730,80]; + lineof_temp[4860] = [4826,18,4826,67]; + lineof_temp[6512] = [6280,18,6280,36]; + lineof_temp[5111] = [5072,36,5072,74]; + lineof_temp[2718] = [2798,8,2802,71]; + lineof_temp[5882] = [5743,18,5745,70]; + lineof_temp[7192] = [6950,68,6951,20]; + lineof_temp[570] = [605,8,605,8]; + lineof_temp[784] = [903,24,904,43]; + lineof_temp[3607] = [3651,48,3651,76]; + lineof_temp[4987] = [4962,23,4962,58]; + lineof_temp[6431] = [6229,30,6229,69]; + lineof_temp[6855] = [6582,8,6583,30]; + lineof_temp[3341] = [3394,26,3394,38]; + lineof_temp[4060] = [4095,14,4095,77]; + lineof_temp[3847] = [3890,30,3890,70]; + lineof_temp[6936] = [6720,16,6720,32]; + lineof_temp[1705] = [1874,22,1875,57]; + lineof_temp[5087] = [5046,14,5046,14]; + lineof_temp[5443] = [5354,14,5354,32]; + lineof_temp[5840] = [5714,61,5714,72]; + lineof_temp[50] = [79,8,79,30]; + lineof_temp[104] = [129,4,130,26]; + lineof_temp[3375] = [3427,26,3432,64]; + lineof_temp[3579] = [3583,34,3624,44]; + lineof_temp[512] = [570,30,570,69]; + lineof_temp[6553] = [6325,18,6342,28]; + lineof_temp[4083] = [4113,24,4113,61]; + lineof_temp[5299] = [5220,14,5220,66]; + lineof_temp[1884] = [2045,40,2052,110]; + lineof_temp[3454] = [3484,29,3484,33]; + lineof_temp[749] = [834,40,834,73]; + lineof_temp[1946] = [1995,10,1995,15]; + lineof_temp[4011] = [4026,8,4026,8]; + lineof_temp[6521] = [6304,8,6305,26]; + lineof_temp[6821] = [6612,46,6612,72]; + lineof_temp[378] = [429,10,429,65]; + lineof_temp[900] = [1027,24,1028,32]; + lineof_temp[2638] = [2646,6,2646,41]; + lineof_temp[5382] = [5300,20,5300,60]; + lineof_temp[733] = [818,38,818,53]; + lineof_temp[2647] = [2759,28,2759,47]; + lineof_temp[1670] = [1828,20,1828,59]; + lineof_temp[5353] = [5270,21,5270,48]; + lineof_temp[6156] = [6010,30,6010,59]; + lineof_temp[6569] = [6354,16,6354,53]; + lineof_temp[2324] = [2455,4,2455,55]; + lineof_temp[6514] = [6281,12,6281,12]; + lineof_temp[4306] = [4300,49,4300,55]; + lineof_temp[6001] = [5865,12,5865,12]; + lineof_temp[6970] = [6748,20,6748,43]; + lineof_temp[3184] = [3227,8,3227,8]; + lineof_temp[4002] = [3988,24,3988,47]; + lineof_temp[180] = [144,34,144,55]; + lineof_temp[2389] = [2522,6,2522,39]; + lineof_temp[6069] = [5915,4,5927,74]; + lineof_temp[2072] = [2194,18,2195,38]; + lineof_temp[481] = [536,18,547,28]; + lineof_temp[3025] = [3064,45,3064,50]; + lineof_temp[3694] = [3751,21,3751,57]; + lineof_temp[5175] = [5115,18,5115,25]; + lineof_temp[4040] = [4062,57,4062,71]; + lineof_temp[6405] = [6176,6,6176,31]; + lineof_temp[3000] = [3095,38,3098,73]; + lineof_temp[3394] = [3415,8,3415,33]; + lineof_temp[1830] = [1896,10,1896,19]; + lineof_temp[2589] = [2697,32,2697,71]; + lineof_temp[4607] = [4609,18,4617,26]; + lineof_temp[335] = [367,6,367,37]; + lineof_temp[560] = [607,10,608,28]; + lineof_temp[3087] = [3156,10,3156,31]; + lineof_temp[4358] = [4398,24,4402,69]; + lineof_temp[6391] = [6176,14,6176,30]; + lineof_temp[2153] = [2251,40,2251,76]; + lineof_temp[3248] = [3312,20,3312,74]; + lineof_temp[3849] = [3885,6,3890,77]; + lineof_temp[195] = [241,29,241,47]; + lineof_temp[6528] = [6312,52,6312,58]; + lineof_temp[2067] = [2198,26,2198,75]; + lineof_temp[3011] = [3086,38,3090,77]; + lineof_temp[4207] = [4193,16,4193,39]; + lineof_temp[4709] = [4686,23,4686,46]; + lineof_temp[1894] = [2055,40,2061,72]; + lineof_temp[4372] = [4404,18,4412,73]; + lineof_temp[474] = [545,36,545,66]; + lineof_temp[1762] = [1932,40,1932,40]; + lineof_temp[4968] = [4941,22,4941,61]; + lineof_temp[6781] = [6563,12,6563,34]; + lineof_temp[803] = [968,6,968,72]; + lineof_temp[1749] = [1926,24,1926,57]; + lineof_temp[3687] = [3705,6,3734,16]; + lineof_temp[6096] = [5964,34,5964,53]; + lineof_temp[1205] = [1365,33,1365,71]; + lineof_temp[3574] = [3593,48,3593,54]; + lineof_temp[6016] = [5885,22,5885,71]; + lineof_temp[613] = [646,14,682,34]; + lineof_temp[4599] = [4607,21,4607,49]; + lineof_temp[4861] = [4826,18,4826,67]; + lineof_temp[7017] = [6745,10,6794,21]; + lineof_temp[1453] = [1588,25,1588,43]; + lineof_temp[6763] = [6451,12,6451,69]; + lineof_temp[753] = [862,60,866,100]; + lineof_temp[4315] = [4352,20,4352,35]; + lineof_temp[5553] = [5453,22,5453,43]; + lineof_temp[1807] = [1960,10,1960,42]; + lineof_temp[3636] = [3643,41,3643,47]; + lineof_temp[4249] = [4239,4,4239,36]; + lineof_temp[2414] = [2545,4,2545,47]; + lineof_temp[3365] = [3421,18,3421,71]; + lineof_temp[4110] = [4131,6,4134,54]; + lineof_temp[4129] = [4145,4,4145,29]; + lineof_temp[4477] = [4485,21,4485,59]; + lineof_temp[1131] = [1228,58,1230,70]; + lineof_temp[3387] = [3436,20,3436,69]; + lineof_temp[323] = [347,6,347,24]; + lineof_temp[1233] = [1398,48,1404,78]; + lineof_temp[1591] = [1699,16,1699,21]; + lineof_temp[122] = [159,12,159,33]; + lineof_temp[638] = [639,69,639,70]; + lineof_temp[3495] = [3531,22,3532,41]; + lineof_temp[4195] = [4188,14,4188,44]; + lineof_temp[6735] = [6534,34,6537,77]; + lineof_temp[1477] = [1605,12,1605,61]; + lineof_temp[1143] = [1218,54,1225,55]; + lineof_temp[2481] = [2615,16,2615,32]; + lineof_temp[2358] = [2489,4,2489,53]; + lineof_temp[2446] = [2585,14,2585,30]; + lineof_temp[4381] = [4422,24,4422,73]; + lineof_temp[4755] = [4724,17,4724,46]; + lineof_temp[6347] = [6139,10,6144,72]; + lineof_temp[793] = [790,16,790,21]; + lineof_temp[2510] = [2642,21,2642,23]; + lineof_temp[3488] = [3536,38,3536,51]; + lineof_temp[5549] = [5448,17,5448,38]; + lineof_temp[980] = [1048,46,1049,51]; + lineof_temp[2698] = [2784,6,2784,31]; + lineof_temp[2198] = [2348,22,2348,60]; + lineof_temp[4305] = [4300,21,4300,38]; + lineof_temp[271] = [303,10,303,36]; + lineof_temp[561] = [631,22,631,62]; + lineof_temp[5202] = [5145,25,5145,46]; + lineof_temp[320] = [340,4,340,25]; + lineof_temp[2419] = [2552,6,2552,43]; + lineof_temp[4505] = [4523,31,4523,53]; + lineof_temp[5860] = [5727,62,5727,68]; + lineof_temp[1277] = [1361,18,1429,49]; + lineof_temp[2558] = [2668,22,2668,35]; + lineof_temp[143] = [190,35,190,57]; + lineof_temp[6478] = [6265,22,6265,22]; + lineof_temp[2727] = [2811,12,2811,56]; + lineof_temp[3269] = [3332,16,3332,69]; + lineof_temp[545] = [560,2,599,12]; + lineof_temp[6227] = [6052,8,6053,26]; + lineof_temp[4300] = [4315,22,4315,72]; + lineof_temp[1618] = [1758,42,1768,50]; + lineof_temp[3051] = [3130,10,3130,64]; + lineof_temp[503] = [553,2,556,76]; + lineof_temp[2904] = [3001,14,3001,56]; + lineof_temp[838] = [932,16,932,16]; + lineof_temp[3689] = [3699,10,3699,19]; + lineof_temp[4390] = [4386,55,4386,60]; + lineof_temp[1704] = [1877,20,1877,52]; + lineof_temp[1814] = [1967,16,1970,111]; + lineof_temp[5002] = [4976,38,4976,73]; + lineof_temp[2673] = [2777,18,2777,34]; + lineof_temp[3315] = [3374,34,3374,48]; + lineof_temp[1997] = [2149,2,2154,50]; + lineof_temp[2334] = [2465,4,2465,36]; + lineof_temp[4626] = [4636,20,4636,47]; + lineof_temp[4691] = [4688,11,4688,39]; + lineof_temp[5928] = [5776,16,5788,17]; + lineof_temp[706] = [780,49,780,74]; + lineof_temp[1824] = [1971,12,1972,43]; + lineof_temp[6180] = [6013,6,6019,14]; + lineof_temp[1075] = [1301,66,1303,74]; + lineof_temp[2337] = [2470,6,2470,43]; + lineof_temp[3644] = [3691,22,3691,47]; + lineof_temp[629] = [686,14,691,18]; + lineof_temp[1597] = [1726,12,1726,51]; + lineof_temp[7242] = [6993,27,6993,41]; + lineof_temp[2786] = [2842,22,2842,26]; + lineof_temp[2844] = [2906,15,2906,25]; + lineof_temp[3179] = [3229,10,3230,41]; + lineof_temp[6877] = [6640,8,6641,30]; + lineof_temp[1576] = [1717,16,1718,55]; + lineof_temp[34] = [47,4,48,26]; + lineof_temp[1285] = [1137,71,1137,72]; + lineof_temp[5148] = [5103,24,5103,56]; + lineof_temp[3127] = [3209,34,3214,42]; + lineof_temp[4137] = [4149,4,4149,29]; + lineof_temp[4130] = [4151,54,4151,73]; + lineof_temp[6002] = [5863,6,5867,78]; + lineof_temp[5301] = [5220,6,5220,68]; + lineof_temp[2565] = [2673,29,2673,31]; + lineof_temp[2942] = [3032,14,3032,25]; + lineof_temp[1838] = [1989,43,1989,49]; + lineof_temp[3535] = [3551,18,3551,32]; + lineof_temp[3994] = [3999,46,3999,63]; + lineof_temp[7368] = [7089,2,7093,68]; + lineof_temp[2613] = [2709,29,2709,31]; + lineof_temp[5157] = [5098,48,5098,53]; + lineof_temp[298] = [318,12,319,41]; + lineof_temp[2648] = [2759,28,2759,47]; + lineof_temp[3268] = [3332,16,3332,69]; + lineof_temp[5343] = [5260,36,5260,61]; + lineof_temp[6736] = [6540,36,6542,71]; + lineof_temp[3397] = [3447,20,3447,69]; + lineof_temp[4552] = [4553,8,4553,20]; + lineof_temp[974] = [1073,32,1074,65]; + lineof_temp[6667] = [6423,10,6424,38]; + lineof_temp[5049] = [5022,60,5022,69]; + lineof_temp[5351] = [5258,23,5258,36]; + lineof_temp[1505] = [1616,14,1616,19]; + lineof_temp[4946] = [4904,30,4928,40]; + lineof_temp[6937] = [6720,16,6720,32]; + lineof_temp[6865] = [6645,12,6645,33]; + lineof_temp[2876] = [2979,74,2980,22]; + lineof_temp[3016] = [3086,38,3090,77]; + lineof_temp[4065] = [4079,10,4081,79]; + lineof_temp[5937] = [5755,22,5755,47]; + lineof_temp[701] = [769,45,769,70]; + lineof_temp[2328] = [2459,4,2459,38]; + lineof_temp[5532] = [5423,12,5423,12]; + lineof_temp[6151] = [6008,25,6008,42]; + lineof_temp[4064] = [4083,14,4083,62]; + lineof_temp[3542] = [3572,22,3572,73]; + lineof_temp[3103] = [3178,12,3180,73]; + lineof_temp[3416] = [3456,12,3457,34]; + lineof_temp[3525] = [3559,22,3559,74]; + lineof_temp[3120] = [3212,36,3213,70]; + lineof_temp[4749] = [4732,22,4732,22]; + lineof_temp[7] = [16,32,16,76]; + lineof_temp[5327] = [5224,8,5225,38]; + lineof_temp[1962] = [2134,22,2134,75]; + lineof_temp[2908] = [3004,16,3004,56]; + lineof_temp[5571] = [5462,18,5462,36]; + lineof_temp[5766] = [5625,4,5627,44]; + lineof_temp[1320] = [1443,18,1443,49]; + lineof_temp[3992] = [4002,16,4007,70]; + lineof_temp[6859] = [6644,22,6644,59]; + lineof_temp[3975] = [3995,28,3995,55]; + lineof_temp[1642] = [1727,8,1727,8]; + lineof_temp[2065] = [2199,26,2199,59]; + lineof_temp[5637] = [5518,6,5519,75]; + lineof_temp[6094] = [5957,22,5960,58]; + lineof_temp[2383] = [2516,6,2516,30]; + lineof_temp[4506] = [4528,65,4528,75]; + lineof_temp[6203] = [6038,14,6038,44]; + lineof_temp[5044] = [4999,38,5005,70]; + lineof_temp[1225] = [1400,52,1401,69]; + lineof_temp[5587] = [5476,20,5476,48]; + lineof_temp[5638] = [5517,4,5517,25]; + lineof_temp[479] = [538,31,538,36]; + lineof_temp[653] = [696,19,696,44]; + lineof_temp[1004] = [1038,34,1038,69]; + lineof_temp[1803] = [1958,10,1958,42]; + lineof_temp[5412] = [5287,22,5287,50]; + lineof_temp[1426] = [1457,6,1545,67]; + lineof_temp[2288] = [2424,57,2424,67]; + lineof_temp[2480] = [2615,16,2615,32]; + lineof_temp[3615] = [3671,68,3672,71]; + lineof_temp[4133] = [4151,28,4151,43]; + lineof_temp[4989] = [4968,32,4968,70]; + lineof_temp[5300] = [5220,14,5220,66]; + lineof_temp[908] = [1042,34,1042,63]; + lineof_temp[2036] = [2234,16,2237,52]; + lineof_temp[3409] = [3461,20,3461,53]; + lineof_temp[3406] = [3450,12,3450,24]; + lineof_temp[6038] = [5871,15,5871,50]; + lineof_temp[62] = [96,6,96,23]; + lineof_temp[1608] = [1745,34,1745,73]; + lineof_temp[1055] = [1275,51,1275,75]; + lineof_temp[3673] = [3717,20,3721,102]; + lineof_temp[4053] = [4071,12,4071,18]; + lineof_temp[266] = [297,8,298,37]; + lineof_temp[3403] = [3451,22,3451,41]; + lineof_temp[3853] = [3881,23,3881,47]; + lineof_temp[2721] = [2583,10,2583,15]; + lineof_temp[5948] = [5818,22,5818,55]; + lineof_temp[4245] = [4235,4,4235,28]; + lineof_temp[7300] = [5995,24,5995,55]; + lineof_temp[6298] = [6106,8,6107,26]; + lineof_temp[2372] = [2503,4,2503,44]; + lineof_temp[3783] = [3848,52,3848,65]; + lineof_temp[3996] = [3996,10,4007,74]; + lineof_temp[4703] = [4691,12,4691,14]; + lineof_temp[6063] = [5920,64,5920,69]; + lineof_temp[2837] = [2920,14,2925,16]; + lineof_temp[3306] = [3367,18,3367,75]; + lineof_temp[4715] = [4706,14,4706,44]; + lineof_temp[4772] = [4748,14,4752,61]; + lineof_temp[1922] = [2097,38,2097,38]; + lineof_temp[2816] = [2882,10,2883,30]; + lineof_temp[3476] = [3528,35,3528,54]; + lineof_temp[5807] = [5670,22,5670,22]; + lineof_temp[1366] = [1515,44,1518,62]; + lineof_temp[2497] = [2601,4,2601,31]; + lineof_temp[3053] = [3124,2,3129,18]; + lineof_temp[3865] = [3903,17,3903,29]; + lineof_temp[6244] = [6074,33,6074,63]; + lineof_temp[201] = [247,11,247,33]; + lineof_temp[2501] = [2627,14,2627,32]; + lineof_temp[5376] = [5246,10,5246,18]; + lineof_temp[2291] = [2424,12,2424,70]; + lineof_temp[4407] = [4280,44,4280,50]; + lineof_temp[6656] = [6419,14,6419,29]; + lineof_temp[5341] = [5260,53,5260,60]; + lineof_temp[5426] = [5334,19,5334,48]; + lineof_temp[288] = [314,14,314,40]; + lineof_temp[1139] = [1228,58,1230,70]; + lineof_temp[761] = [881,56,886,68]; + lineof_temp[6050] = [5920,21,5920,53]; + lineof_temp[6429] = [6226,26,6226,45]; + lineof_temp[6687] = [6447,21,6450,32]; + lineof_temp[616] = [684,24,684,49]; + lineof_temp[23] = [40,6,40,21]; + lineof_temp[1601] = [1730,12,1730,60]; + lineof_temp[2988] = [3095,39,3096,69]; + lineof_temp[6212] = [6021,6,6021,36]; + lineof_temp[5692] = [5565,14,5565,40]; + lineof_temp[1432] = [1556,21,1559,33]; + lineof_temp[3635] = [3640,32,3642,75]; + lineof_temp[1148] = [1198,56,1199,85]; + lineof_temp[5785] = [5643,6,5646,76]; + lineof_temp[6083] = [5952,34,5952,53]; + lineof_temp[3404] = [3451,22,3451,41]; + lineof_temp[6011] = [5875,16,5876,78]; + lineof_temp[1303] = [1452,31,1452,49]; + lineof_temp[5858] = [5724,16,5724,59]; + lineof_temp[5669] = [5540,6,5544,67]; + lineof_temp[2948] = [3047,18,3048,46]; + lineof_temp[1654] = [1804,18,1804,53]; + lineof_temp[5539] = [5437,13,5437,31]; + lineof_temp[5731] = [5599,14,5599,44]; + lineof_temp[6660] = [6416,10,6417,32]; + lineof_temp[566] = [623,10,624,30]; + lineof_temp[839] = [929,10,956,21]; + lineof_temp[1567] = [1676,10,1676,15]; + lineof_temp[5050] = [5022,52,5022,71]; + lineof_temp[794] = [788,12,788,52]; + lineof_temp[747] = [840,48,840,48]; + lineof_temp[4851] = [4804,27,4804,29]; + lineof_temp[1011] = [1029,22,1031,73]; + lineof_temp[2580] = [2679,20,2684,69]; + lineof_temp[5375] = [5253,4,5254,43]; + lineof_temp[1135] = [1243,64,1250,70]; + lineof_temp[4323] = [4356,16,4357,35]; + lineof_temp[4313] = [4353,24,4353,73]; + lineof_temp[2056] = [2215,22,2215,70]; + lineof_temp[888] = [1018,28,1018,40]; + lineof_temp[1784] = [1908,31,1908,44]; + lineof_temp[1386] = [1530,50,1534,62]; + lineof_temp[500] = [554,12,554,48]; + lineof_temp[1622] = [1745,34,1745,73]; + lineof_temp[3838] = [3879,4,3879,44]; + lineof_temp[316] = [284,32,284,49]; + lineof_temp[5922] = [5794,34,5794,65]; + lineof_temp[6273] = [6095,26,6095,76]; + lineof_temp[1342] = [1487,43,1487,66]; + lineof_temp[3523] = [3559,48,3559,73]; + lineof_temp[4804] = [4778,24,4781,73]; + lineof_temp[3919] = [3896,30,3896,49]; + lineof_temp[5122] = [5055,63,5055,71]; + lineof_temp[5660] = [5531,4,5532,30]; + lineof_temp[268] = [294,4,295,23]; + lineof_temp[6559] = [6320,47,6320,52]; + lineof_temp[2182] = [2334,18,2334,51]; + lineof_temp[2618] = [2650,10,2651,29]; + lineof_temp[4727] = [4713,18,4713,18]; + lineof_temp[5107] = [5070,36,5070,69]; + lineof_temp[1066] = [1285,59,1286,88]; + lineof_temp[1429] = [1435,10,1435,19]; + lineof_temp[4548] = [4556,12,4558,40]; + lineof_temp[5871] = [5737,22,5737,71]; + lineof_temp[4963] = [4897,46,4897,64]; + lineof_temp[2018] = [2179,13,2180,45]; + lineof_temp[2322] = [2453,4,2453,44]; + lineof_temp[4365] = [4405,27,4405,45]; + lineof_temp[4878] = [4833,8,4833,77]; + lineof_temp[59] = [71,10,71,19]; + lineof_temp[3606] = [3645,38,3645,57]; + lineof_temp[4707] = [4689,8,4689,8]; + lineof_temp[3432] = [3483,26,3483,67]; + lineof_temp[223] = [265,18,265,52]; + lineof_temp[401] = [450,63,450,68]; + lineof_temp[3462] = [3516,26,3518,78]; + lineof_temp[2630] = [2717,16,2722,65]; + lineof_temp[3708] = [3748,8,3749,27]; + lineof_temp[4299] = [4315,30,4315,70]; + lineof_temp[7375] = [7098,27,7098,41]; + lineof_temp[7373] = [7100,8,7100,49]; + lineof_temp[3150] = [3178,12,3180,73]; + lineof_temp[1295] = [1438,6,1438,67]; + lineof_temp[697] = [757,8,757,8]; + lineof_temp[6518] = [6302,14,6302,30]; + lineof_temp[6550] = [6326,27,6326,63]; + lineof_temp[7309] = [7056,34,7056,77]; + lineof_temp[58] = [86,4,87,26]; + lineof_temp[5176] = [5113,18,5113,37]; + lineof_temp[4540] = [4517,16,4517,16]; + lineof_temp[1797] = [1956,18,1956,68]; + lineof_temp[5650] = [5526,4,5527,27]; + lineof_temp[5930] = [5767,20,5767,25]; + lineof_temp[48] = [74,4,74,25]; + lineof_temp[1949] = [2117,12,2117,48]; + lineof_temp[1570] = [1697,11,1697,46]; + lineof_temp[2550] = [2662,35,2662,35]; + lineof_temp[3390] = [3435,16,3438,88]; + lineof_temp[5596] = [5475,12,5475,12]; + lineof_temp[1237] = [1415,52,1416,70]; + lineof_temp[7327] = [7060,46,7060,50]; + lineof_temp[260] = [290,4,290,25]; + lineof_temp[6923] = [6666,20,6707,26]; + lineof_temp[2062] = [2193,22,2193,74]; + lineof_temp[5285] = [5184,10,5184,19]; + lineof_temp[7153] = [6916,30,6917,77]; + lineof_temp[1820] = [1975,18,1976,33]; + lineof_temp[3907] = [3918,14,3918,52]; + lineof_temp[6647] = [6356,4,6356,45]; + lineof_temp[5649] = [5528,6,5530,80]; + lineof_temp[1961] = [2131,22,2131,48]; + lineof_temp[5022] = [5001,62,5001,76]; + lineof_temp[1325] = [1460,20,1460,48]; + lineof_temp[4929] = [4899,29,4899,50]; + lineof_temp[6206] = [6023,8,6024,31]; + lineof_temp[6918] = [6705,36,6705,73]; + lineof_temp[567] = [606,16,606,21]; + lineof_temp[4289] = [4338,28,4338,75]; + lineof_temp[979] = [1070,30,1070,62]; + lineof_temp[265] = [297,8,298,37]; + lineof_temp[6251] = [6069,66,6069,71]; + lineof_temp[687] = [750,8,750,8]; + lineof_temp[1908] = [2071,32,2071,42]; + lineof_temp[1656] = [1812,34,1812,60]; + lineof_temp[2144] = [2275,18,2275,18]; + lineof_temp[5444] = [5352,14,5352,38]; + lineof_temp[6805] = [6587,20,6587,44]; + lineof_temp[7203] = [6961,21,6961,37]; + lineof_temp[641] = [637,27,637,52]; + lineof_temp[2809] = [2895,20,2895,74]; + lineof_temp[4931] = [4908,38,4908,64]; + lineof_temp[3074] = [3159,20,3159,54]; + lineof_temp[3226] = [3262,16,3267,18]; + lineof_temp[7355] = [7039,8,7039,8]; + lineof_temp[1947] = [1994,26,1994,65]; + lineof_temp[4623] = [4634,17,4634,47]; + lineof_temp[4187] = [4184,14,4184,45]; + lineof_temp[5746] = [5606,4,5607,44]; + lineof_temp[6804] = [6587,20,6587,44]; + lineof_temp[1891] = [2057,44,2058,67]; + lineof_temp[4859] = [4827,18,4827,51]; + lineof_temp[4198] = [4190,14,4190,37]; + lineof_temp[4672] = [4675,17,4675,45]; + lineof_temp[6959] = [6740,22,6740,59]; + lineof_temp[1152] = [1191,54,1192,72]; + lineof_temp[1058] = [1274,48,1275,76]; + lineof_temp[6376] = [6164,8,6165,26]; + lineof_temp[35] = [36,10,36,19]; + lineof_temp[603] = [680,30,680,45]; + lineof_temp[2823] = [2878,2,2900,12]; + lineof_temp[2897] = [2933,2,2936,24]; + lineof_temp[6734] = [6534,34,6537,77]; + lineof_temp[5705] = [5574,6,5574,50]; + lineof_temp[6494] = [6280,18,6280,36]; + lineof_temp[3710] = [3741,4,3741,45]; + lineof_temp[182] = [229,12,229,23]; + lineof_temp[2010] = [2165,4,2166,24]; + lineof_temp[6557] = [6322,12,6342,32]; + lineof_temp[4128] = [4146,6,4148,15]; + lineof_temp[5914] = [5785,28,5785,54]; + lineof_temp[4209] = [4194,12,4194,12]; + lineof_temp[2331] = [2464,6,2464,37]; + lineof_temp[3569] = [3600,48,3601,52]; + lineof_temp[4943] = [4905,55,4905,67]; + lineof_temp[5235] = [5130,8,5130,8]; + lineof_temp[7231] = [6983,26,6983,53]; + lineof_temp[3937] = [3953,4,3956,54]; + lineof_temp[4687] = [4673,50,4673,56]; + lineof_temp[6927] = [6663,53,6663,66]; + lineof_temp[1062] = [1278,50,1280,74]; + lineof_temp[5552] = [5453,22,5453,43]; + lineof_temp[5462] = [5366,21,5366,40]; + lineof_temp[2451] = [2584,4,2584,31]; + lineof_temp[2780] = [2864,26,2864,38]; + lineof_temp[6506] = [6288,24,6288,24]; + lineof_temp[3910] = [3914,20,3914,28]; + lineof_temp[1466] = [1592,10,1598,77]; + lineof_temp[3285] = [3338,14,3338,32]; + lineof_temp[5082] = [5045,17,5045,45]; + lineof_temp[5308] = [5237,20,5237,77]; + lineof_temp[6807] = [6634,26,6634,63]; + lineof_temp[5542] = [5439,14,5439,68]; + lineof_temp[7252] = [7003,20,7003,43]; + lineof_temp[2048] = [2210,26,2210,59]; + lineof_temp[1843] = [1998,16,1998,42]; + lineof_temp[2035] = [2234,16,2237,52]; + lineof_temp[2532] = [2741,21,2741,23]; + lineof_temp[3936] = [3953,19,3953,37]; + lineof_temp[639] = [640,8,640,8]; + lineof_temp[2393] = [2526,6,2526,43]; + lineof_temp[5408] = [5289,11,5289,38]; + lineof_temp[2224] = [2367,14,2367,29]; + lineof_temp[6287] = [6085,8,6086,26]; + lineof_temp[205] = [247,10,247,60]; + lineof_temp[918] = [1073,32,1074,65]; + lineof_temp[1756] = [1921,16,1922,34]; + lineof_temp[2490] = [2616,8,2619,74]; + lineof_temp[6024] = [5899,24,5899,70]; + lineof_temp[6279] = [6091,25,6091,55]; + lineof_temp[6290] = [6079,6,6079,31]; + lineof_temp[1464] = [1592,10,1598,77]; + lineof_temp[2884] = [2960,69,2961,14]; + lineof_temp[5511] = [5404,10,5404,22]; + lineof_temp[5690] = [5560,4,5561,46]; + lineof_temp[54] = [83,4,84,26]; + lineof_temp[4651] = [4641,20,4641,47]; + lineof_temp[581] = [650,30,650,51]; + lineof_temp[6484] = [6257,8,6258,30]; + lineof_temp[2910] = [3009,18,3009,76]; + lineof_temp[2981] = [3069,34,3073,98]; + lineof_temp[3005] = [3100,38,3100,76]; + lineof_temp[4171] = [4173,8,4173,76]; + lineof_temp[5691] = [5565,14,5565,40]; + lineof_temp[6004] = [5871,15,5871,50]; + lineof_temp[6768] = [6434,10,6434,35]; + lineof_temp[2040] = [2241,16,2242,31]; + lineof_temp[2675] = [2779,20,2779,40]; + lineof_temp[5277] = [5195,16,5195,53]; + lineof_temp[2276] = [2412,4,2412,14]; + lineof_temp[3837] = [3879,12,3879,42]; + lineof_temp[5279] = [5193,57,5193,63]; + lineof_temp[6105] = [5942,16,5943,34]; + lineof_temp[6666] = [6425,12,6426,65]; + lineof_temp[954] = [1097,34,1098,71]; + lineof_temp[1584] = [1712,20,1714,71]; + lineof_temp[3584] = [3577,26,3577,73]; + lineof_temp[3755] = [3820,26,3821,55]; + lineof_temp[6357] = [6150,8,6151,26]; + lineof_temp[7247] = [6993,14,6993,61]; + lineof_temp[3835] = [3875,20,3875,36]; + lineof_temp[5598] = [5471,4,5472,25]; + lineof_temp[2467] = [2588,6,2600,75]; + lineof_temp[3057] = [3134,15,3134,35]; + lineof_temp[6884] = [6709,26,6709,63]; + lineof_temp[131] = [179,26,179,44]; + lineof_temp[231] = [253,14,253,40]; + lineof_temp[1393] = [1530,49,1538,65]; + lineof_temp[2379] = [2512,6,2512,37]; + lineof_temp[6300] = [6112,20,6112,72]; + lineof_temp[6844] = [6629,26,6629,38]; + lineof_temp[3518] = [3549,12,3549,57]; + lineof_temp[3730] = [3774,18,3774,18]; + lineof_temp[3799] = [3856,22,3856,74]; + lineof_temp[519] = [582,36,582,51]; + lineof_temp[6907] = [6694,36,6695,77]; + lineof_temp[4836] = [4803,24,4803,71]; + lineof_temp[5759] = [5624,14,5624,46]; + lineof_temp[247] = [289,10,289,36]; + lineof_temp[377] = [429,10,429,65]; + lineof_temp[3108] = [3187,25,3187,50]; + lineof_temp[7196] = [6947,48,6947,53]; + lineof_temp[880] = [990,22,997,23]; + lineof_temp[2652] = [2761,22,2763,73]; + lineof_temp[2620] = [2722,26,2722,59]; + lineof_temp[3721] = [3785,28,3785,75]; + lineof_temp[5142] = [5095,11,5095,39]; + lineof_temp[5179] = [5112,12,5112,13]; + lineof_temp[6583] = [6358,21,6358,37]; + lineof_temp[1890] = [2061,46,2061,68]; + lineof_temp[2017] = [2179,13,2180,45]; + lineof_temp[2059] = [2212,18,2213,38]; + lineof_temp[4037] = [4058,17,4058,36]; + lineof_temp[7216] = [6972,27,6972,41]; + lineof_temp[2831] = [2916,12,2917,74]; + lineof_temp[3151] = [3181,21,3181,26]; + lineof_temp[6323] = [6126,20,6126,72]; + lineof_temp[3056] = [3134,15,3134,35]; + lineof_temp[4999] = [4978,38,4978,67]; + lineof_temp[2607] = [2703,20,2708,69]; + lineof_temp[3659] = [3702,14,3702,51]; + lineof_temp[6136] = [5988,12,5988,74]; + lineof_temp[710] = [775,51,775,56]; + lineof_temp[6342] = [6143,16,6143,49]; + lineof_temp[6157] = [6009,27,6010,60]; + lineof_temp[1711] = [1868,59,1868,61]; + lineof_temp[5828] = [5697,10,5698,62]; + lineof_temp[328] = [336,18,336,34]; + lineof_temp[1663] = [1792,16,1792,40]; + lineof_temp[3712] = [3769,16,3769,64]; + lineof_temp[2649] = [2763,56,2763,69]; + lineof_temp[7027] = [6804,10,6804,77]; + lineof_temp[5516] = [5374,2,5407,12]; + lineof_temp[2342] = [2473,4,2473,41]; + lineof_temp[2834] = [2927,16,2929,24]; + lineof_temp[3851] = [3883,4,3883,26]; + lineof_temp[2075] = [2185,12,2186,45]; + lineof_temp[2985] = [3076,36,3076,62]; + lineof_temp[6916] = [6670,26,6671,45]; + lineof_temp[1643] = [1725,2,1778,12]; + lineof_temp[4351] = [4393,26,4393,45]; + lineof_temp[4991] = [4968,24,4968,72]; + lineof_temp[6169] = [5997,4,5997,41]; + lineof_temp[6939] = [6720,41,6720,59]; + lineof_temp[157] = [179,26,179,44]; + lineof_temp[6170] = [6012,14,6012,30]; + lineof_temp[5220] = [5151,22,5151,46]; + lineof_temp[7225] = [6982,20,6982,43]; + lineof_temp[1555] = [1689,22,1689,73]; + lineof_temp[4087] = [4117,18,4117,71]; + lineof_temp[1044] = [1163,44,1164,72]; + lineof_temp[5206] = [5144,20,5145,48]; + lineof_temp[1223] = [1406,56,1406,66]; + lineof_temp[2015] = [2179,33,2179,47]; + lineof_temp[2161] = [2305,8,2305,8]; + lineof_temp[2395] = [2528,6,2528,23]; + lineof_temp[3270] = [3332,8,3332,71]; + lineof_temp[4472] = [4470,74,4471,16]; + lineof_temp[5905] = [5771,22,5771,71]; + lineof_temp[6373] = [6166,18,6166,55]; + lineof_temp[2257] = [2399,14,2399,29]; + lineof_temp[1751] = [1925,24,1925,73]; + lineof_temp[6850] = [6587,20,6587,44]; + lineof_temp[2871] = [2984,26,2986,69]; + lineof_temp[22] = [37,4,37,26]; + lineof_temp[3257] = [3307,6,3308,42]; + lineof_temp[1049] = [1269,42,1271,69]; + lineof_temp[2869] = [2984,26,2986,69]; + lineof_temp[458] = [525,14,525,23]; + lineof_temp[1041] = [1164,46,1164,71]; + lineof_temp[2021] = [2181,16,2181,72]; + lineof_temp[5689] = [5562,6,5562,44]; + lineof_temp[280] = [310,14,310,40]; + lineof_temp[6648] = [6414,10,6414,35]; + lineof_temp[6507] = [6285,18,6300,28]; + lineof_temp[1596] = [1695,28,1695,54]; + lineof_temp[3245] = [3320,12,3321,53]; + lineof_temp[5641] = [5525,12,5525,45]; + lineof_temp[6191] = [6029,14,6029,61]; + lineof_temp[6235] = [6065,10,6065,57]; + lineof_temp[7106] = [6870,24,6887,35]; + lineof_temp[7267] = [7011,14,7011,30]; + lineof_temp[4050] = [4053,28,4053,59]; + lineof_temp[845] = [923,6,923,23]; + lineof_temp[1089] = [1296,64,1296,69]; + lineof_temp[2601] = [2708,30,2708,63]; + lineof_temp[3196] = [3250,6,3251,67]; + lineof_temp[64] = [99,9,99,30]; + lineof_temp[5716] = [5581,4,5582,26]; + lineof_temp[4630] = [4635,12,4635,12]; + lineof_temp[4677] = [4680,19,4680,48]; + lineof_temp[2921] = [3023,52,3023,62]; + lineof_temp[5739] = [5605,14,5605,68]; + lineof_temp[1140] = [1231,67,1232,62]; + lineof_temp[1494] = [1623,18,1623,39]; + lineof_temp[3244] = [3320,12,3321,53]; + lineof_temp[5294] = [5212,15,5212,39]; + lineof_temp[7178] = [6947,18,6947,37]; + lineof_temp[2129] = [2291,24,2293,37]; + lineof_temp[2336] = [2467,4,2467,38]; + lineof_temp[540] = [564,10,564,46]; + lineof_temp[6324] = [6127,23,6127,26]; + lineof_temp[7356] = [7037,2,7084,22]; + lineof_temp[2538] = [2661,30,2661,63]; + lineof_temp[2606] = [2704,22,2704,35]; + lineof_temp[4675] = [4676,12,4676,17]; + lineof_temp[3415] = [3458,14,3462,94]; + lineof_temp[398] = [457,28,459,61]; + lineof_temp[2778] = [2865,36,2865,73]; + lineof_temp[3168] = [3151,10,3151,26]; + lineof_temp[583] = [662,40,663,72]; + lineof_temp[1367] = [1512,48,1513,74]; + lineof_temp[2753] = [2835,14,2835,50]; + lineof_temp[2878] = [2975,16,2991,24]; + lineof_temp[6544] = [6330,26,6330,59]; + lineof_temp[6664] = [6427,20,6427,55]; + lineof_temp[4774] = [4756,24,4756,52]; + lineof_temp[637] = [639,12,639,58]; + lineof_temp[1489] = [1620,18,1620,55]; + lineof_temp[6172] = [6014,18,6014,36]; + lineof_temp[7285] = [7031,22,7031,43]; + lineof_temp[5515] = [5375,4,5407,10]; + lineof_temp[1590] = [1703,10,1704,28]; + lineof_temp[3573] = [3596,42,3597,64]; + lineof_temp[577] = [644,24,644,46]; + lineof_temp[4883] = [4793,10,4793,16]; + lineof_temp[2381] = [2514,6,2514,24]; + lineof_temp[2575] = [2679,20,2684,69]; + lineof_temp[4579] = [4584,33,4584,40]; + lineof_temp[4863] = [4825,14,4828,79]; + lineof_temp[6643] = [6360,16,6360,25]; + lineof_temp[6856] = [6559,14,6559,23]; + lineof_temp[52] = [76,4,77,26]; + lineof_temp[4930] = [4909,40,4913,69]; + lineof_temp[333] = [367,14,367,35]; + lineof_temp[703] = [763,4,764,26]; + lineof_temp[1178] = [1338,36,1339,52]; + lineof_temp[3249] = [3316,18,3317,44]; + lineof_temp[4004] = [4025,11,4025,45]; + lineof_temp[5631] = [5510,8,5511,77]; + lineof_temp[4905] = [4860,34,4860,34]; + lineof_temp[5520] = [5412,11,5412,38]; + lineof_temp[6651] = [6431,16,6431,53]; + lineof_temp[30] = [44,4,45,26]; + lineof_temp[1441] = [1569,21,1572,32]; + lineof_temp[206] = [247,10,247,60]; + lineof_temp[4261] = [4255,8,4255,28]; + lineof_temp[937] = [1104,42,1105,58]; + lineof_temp[6723] = [6512,28,6513,57]; + lineof_temp[2412] = [2543,4,2543,37]; + lineof_temp[6903] = [6690,36,6691,77]; + lineof_temp[2290] = [2424,20,2424,68]; + lineof_temp[3113] = [3188,20,3188,61]; + lineof_temp[4664] = [4662,55,4662,62]; + lineof_temp[1950] = [2120,10,2120,73]; + lineof_temp[5023] = [5001,62,5001,76]; + lineof_temp[695] = [756,14,756,32]; + lineof_temp[6646] = [6357,6,6357,37]; + lineof_temp[866] = [993,34,993,70]; + lineof_temp[1548] = [1656,29,1656,50]; + lineof_temp[5601] = [5483,6,5483,26]; + lineof_temp[3736] = [3767,4,3767,47]; + lineof_temp[6030] = [5904,22,5904,72]; + lineof_temp[5925] = [5792,69,5793,22]; + lineof_temp[4176] = [4175,6,4176,73]; + lineof_temp[4386] = [4420,18,4424,70]; + lineof_temp[3925] = [3875,2,3877,4]; + lineof_temp[6076] = [5946,22,5946,48]; + lineof_temp[6560] = [6321,12,6321,12]; + lineof_temp[2868] = [2984,26,2986,69]; + lineof_temp[3768] = [3808,14,3826,22]; + lineof_temp[4875] = [4797,6,4797,35]; + lineof_temp[665] = [726,12,726,12]; + lineof_temp[4226] = [4214,6,4214,39]; + lineof_temp[3046] = [3123,33,3123,50]; + lineof_temp[5048] = [5022,60,5022,69]; + lineof_temp[5275] = [5197,18,5200,76]; + lineof_temp[6993] = [6779,38,6779,75]; + lineof_temp[5170] = [5118,22,5118,41]; + lineof_temp[5633] = [5508,59,5508,64]; + lineof_temp[5865] = [5723,6,5727,78]; + lineof_temp[6082] = [5954,28,5954,54]; + lineof_temp[712] = [772,6,781,14]; + lineof_temp[2049] = [2209,26,2209,75]; + lineof_temp[7082] = [6861,27,6861,49]; + lineof_temp[356] = [394,6,397,41]; + lineof_temp[5792] = [5649,4,5650,65]; + lineof_temp[6113] = [5969,16,5970,34]; + lineof_temp[7271] = [7012,6,7015,70]; + lineof_temp[7316] = [7076,56,7078,69]; + lineof_temp[5328] = [5223,14,5223,19]; + lineof_temp[4253] = [4219,21,4219,37]; + lineof_temp[4495] = [4505,4,4505,14]; + lineof_temp[70] = [101,44,101,73]; + lineof_temp[3564] = [3614,56,3620,190]; + lineof_temp[898] = [1027,48,1027,75]; + lineof_temp[3568] = [3603,58,3603,63]; + lineof_temp[3857] = [3901,24,3901,50]; + lineof_temp[4692] = [4688,11,4688,39]; + lineof_temp[4824] = [4769,16,4769,23]; + lineof_temp[6511] = [6282,12,6300,32]; + lineof_temp[6534] = [6301,4,6301,53]; + lineof_temp[3626] = [3659,55,3659,61]; + lineof_temp[2272] = [2375,22,2375,37]; + lineof_temp[6949] = [6730,22,6730,59]; + lineof_temp[2239] = [2385,20,2385,38]; + lineof_temp[5642] = [5523,15,5523,45]; + lineof_temp[750] = [854,50,856,54]; + lineof_temp[57] = [88,6,88,39]; + lineof_temp[2864] = [2977,20,2979,63]; + lineof_temp[6425] = [6210,56,6210,61]; + lineof_temp[6965] = [6746,32,6746,70]; + lineof_temp[6482] = [6261,16,6261,16]; + lineof_temp[669] = [711,16,711,38]; + lineof_temp[6312] = [6118,14,6118,30]; + lineof_temp[6715] = [6474,45,6474,51]; + lineof_temp[6491] = [6278,14,6278,30]; + lineof_temp[7001] = [6782,30,6783,48]; + lineof_temp[420] = [490,24,490,45]; + lineof_temp[4649] = [4645,4,4646,44]; + lineof_temp[4762] = [4720,2,4738,23]; + lineof_temp[552] = [618,22,618,71]; + lineof_temp[3092] = [3172,12,3173,27]; + lineof_temp[5758] = [5618,4,5619,28]; + lineof_temp[6798] = [6562,18,6562,23]; + lineof_temp[3069] = [3134,2,3134,36]; + lineof_temp[4641] = [4648,15,4648,43]; + lineof_temp[4729] = [4709,15,4709,43]; + lineof_temp[4827] = [4743,44,4743,51]; + lineof_temp[1500] = [1624,8,1625,26]; + lineof_temp[7026] = [6800,16,6800,32]; + lineof_temp[7092] = [6880,41,6880,75]; + lineof_temp[1361] = [1505,47,1505,73]; + lineof_temp[1629] = [1739,24,1776,45]; + lineof_temp[2112] = [2262,20,2262,69]; + lineof_temp[3256] = [3310,12,3310,15]; + lineof_temp[6054] = [5922,32,5923,50]; + lineof_temp[6231] = [6061,14,6061,30]; + lineof_temp[2475] = [2607,8,2607,51]; + lineof_temp[2895] = [2938,2,2940,56]; + lineof_temp[5123] = [5056,14,5056,14]; + lineof_temp[997] = [1064,43,1064,45]; + lineof_temp[1856] = [2019,45,2020,58]; + lineof_temp[3948] = [3959,30,3959,53]; + lineof_temp[1765] = [1920,22,1920,27]; + lineof_temp[1724] = [1882,22,1882,50]; + lineof_temp[5104] = [5064,28,5064,71]; + lineof_temp[1384] = [1531,52,1534,61]; + lineof_temp[887] = [1019,30,1019,65]; + lineof_temp[2097] = [2252,18,2252,54]; + lineof_temp[2485] = [2619,22,2619,68]; + lineof_temp[2730] = [2818,16,2818,35]; + lineof_temp[40] = [58,4,59,26]; + lineof_temp[2230] = [2342,12,2342,50]; + lineof_temp[4867] = [4829,39,4829,48]; + lineof_temp[5066] = [4961,14,5031,24]; + lineof_temp[6908] = [6692,34,6693,53]; + lineof_temp[2110] = [2266,14,2268,60]; + lineof_temp[2353] = [2486,6,2486,39]; + lineof_temp[3451] = [3488,28,3488,28]; + lineof_temp[3532] = [3554,23,3554,24]; + lineof_temp[4111] = [4129,4,4130,23]; + lineof_temp[5212] = [5147,25,5147,46]; + lineof_temp[110] = [135,4,136,26]; + lineof_temp[4159] = [4164,14,4164,62]; + lineof_temp[3021] = [3076,36,3076,62]; + lineof_temp[7341] = [7050,24,7050,24]; + lineof_temp[994] = [1067,38,1067,75]; + lineof_temp[1012] = [1027,24,1028,32]; + lineof_temp[3969] = [3978,10,3978,19]; + lineof_temp[155] = [182,28,182,46]; + lineof_temp[483] = [534,38,534,42]; + lineof_temp[1030] = [1140,10,1140,53]; + lineof_temp[5754] = [5612,4,5613,30]; + lineof_temp[5829] = [5697,10,5698,62]; + lineof_temp[1934] = [2069,28,2069,33]; + lineof_temp[4446] = [4450,39,4450,67]; + lineof_temp[3740] = [3794,4,3794,37]; + lineof_temp[6780] = [6564,14,6564,61]; + lineof_temp[1071] = [1292,58,1293,66]; + lineof_temp[4642] = [4650,20,4650,62]; + lineof_temp[5621] = [5501,14,5501,24]; + lineof_temp[1444] = [1575,31,1575,49]; + lineof_temp[3040] = [3037,6,3037,43]; + lineof_temp[3679] = [3730,18,3731,79]; + lineof_temp[4290] = [4337,26,4338,77]; + lineof_temp[6061] = [5922,16,5923,51]; + lineof_temp[374] = [418,23,418,47]; + lineof_temp[1649] = [1795,20,1798,75]; + lineof_temp[3522] = [3559,48,3559,73]; + lineof_temp[5950] = [5817,22,5817,71]; + lineof_temp[495] = [554,12,554,48]; + lineof_temp[2707] = [2802,22,2802,43]; + lineof_temp[3302] = [3354,4,3354,14]; + lineof_temp[3921] = [3896,4,3948,11]; + lineof_temp[4865] = [4824,12,4828,81]; + lineof_temp[123] = [163,14,163,29]; + lineof_temp[2380] = [2511,4,2511,44]; + lineof_temp[5727] = [5595,14,5595,38]; + lineof_temp[6530] = [6311,10,6314,69]; + lineof_temp[6242] = [6072,25,6072,61]; + lineof_temp[1786] = [1947,27,1947,41]; + lineof_temp[3091] = [3168,18,3168,38]; + lineof_temp[1472] = [1584,6,1585,52]; + lineof_temp[3290] = [3334,6,3346,17]; + lineof_temp[724] = [811,42,815,72]; + lineof_temp[2386] = [2517,4,2517,47]; + lineof_temp[713] = [770,4,771,26]; + lineof_temp[1889] = [2061,54,2061,66]; + lineof_temp[5533] = [5421,6,5424,73]; + lineof_temp[6116] = [5939,60,5939,65]; + lineof_temp[6176] = [6016,12,6018,76]; + lineof_temp[1158] = [1176,46,1176,73]; + lineof_temp[1308] = [1452,31,1452,49]; + lineof_temp[2233] = [2341,2,2372,12]; + lineof_temp[240] = [240,29,240,46]; + lineof_temp[3143] = [3188,20,3188,61]; + lineof_temp[218] = [259,18,259,48]; + lineof_temp[802] = [958,8,958,22]; + lineof_temp[3137] = [3192,70,3193,29]; + lineof_temp[6167] = [5999,6,6010,72]; + lineof_temp[723] = [808,40,809,48]; + lineof_temp[4563] = [4573,19,4573,54]; + lineof_temp[1155] = [1181,52,1183,58]; + lineof_temp[5670] = [5538,4,5539,32]; + lineof_temp[2373] = [2506,6,2506,22]; + lineof_temp[1391] = [1535,52,1538,64]; + lineof_temp[1652] = [1799,18,1799,50]; + lineof_temp[2326] = [2457,4,2457,49]; + lineof_temp[4558] = [4566,20,4566,44]; + lineof_temp[6588] = [6411,8,6411,55]; + lineof_temp[7269] = [7013,8,7015,68]; + lineof_temp[1700] = [1862,12,1862,50]; + lineof_temp[7250] = [7001,20,7001,58]; + lineof_temp[1558] = [1687,35,1687,65]; + lineof_temp[1633] = [1736,18,1776,49]; + lineof_temp[4617] = [4619,6,4621,72]; + lineof_temp[5099] = [5055,17,5055,52]; + lineof_temp[6558] = [6320,18,6320,36]; + lineof_temp[3697] = [3757,20,3757,68]; + lineof_temp[5655] = [5537,28,5537,64]; + lineof_temp[1664] = [1790,14,1791,44]; + lineof_temp[533] = [572,26,572,26]; + lineof_temp[2433] = [2568,6,2568,30]; + lineof_temp[3559] = [3604,52,3605,71]; + lineof_temp[4591] = [4569,73,4570,8]; + lineof_temp[5215] = [5150,24,5150,76]; + lineof_temp[1293] = [1438,14,1438,65]; + lineof_temp[4013] = [4023,26,4023,57]; + lineof_temp[4504] = [4523,31,4523,53]; + lineof_temp[324] = [345,4,346,26]; + lineof_temp[3800] = [3856,22,3856,74]; + lineof_temp[7335] = [7052,34,7052,38]; + lineof_temp[1773] = [1913,16,1914,48]; + lineof_temp[2936] = [3003,6,3024,17]; + lineof_temp[3008] = [3095,38,3098,73]; + lineof_temp[4319] = [4350,16,4350,42]; + lineof_temp[3620] = [3673,50,3681,52]; + lineof_temp[66] = [100,12,100,33]; + lineof_temp[363] = [412,4,412,37]; + lineof_temp[6209] = [6043,10,6043,40]; + lineof_temp[2824] = [2876,2,2877,73]; + lineof_temp[5079] = [5038,16,5038,44]; + lineof_temp[7132] = [6916,30,6917,77]; + lineof_temp[1493] = [1623,18,1623,39]; + lineof_temp[2881] = [2964,16,2964,67]; + lineof_temp[678] = [737,2,744,10]; + lineof_temp[4112] = [4125,10,4125,16]; + lineof_temp[6340] = [6143,26,6143,48]; + lineof_temp[865] = [996,34,996,74]; + lineof_temp[2900] = [2998,14,2998,25]; + lineof_temp[4070] = [4070,8,4070,35]; + lineof_temp[5354] = [5272,26,5272,54]; + lineof_temp[5904] = [5771,22,5771,71]; + lineof_temp[2736] = [2824,18,2824,62]; + lineof_temp[3427] = [3353,10,3353,28]; + lineof_temp[4869] = [4829,31,4829,50]; + lineof_temp[5152] = [5103,14,5103,57]; + lineof_temp[6119] = [5935,14,5935,65]; + lineof_temp[905] = [1037,28,1037,60]; + lineof_temp[2435] = [2571,6,2571,36]; + lineof_temp[3987] = [4009,10,4019,18]; + lineof_temp[3520] = [3553,20,3553,65]; + lineof_temp[452] = [515,15,515,25]; + lineof_temp[1122] = [1198,56,1199,85]; + lineof_temp[1169] = [1256,36,1257,74]; + lineof_temp[532] = [571,33,571,38]; + lineof_temp[2889] = [2958,8,2958,8]; + lineof_temp[4695] = [4695,19,4695,48]; + lineof_temp[7288] = [7031,12,7031,68]; + lineof_temp[694] = [758,8,758,54]; + lineof_temp[942] = [1100,34,1101,53]; + lineof_temp[1208] = [1369,40,1369,63]; + lineof_temp[3802] = [3855,20,3857,34]; + lineof_temp[7349] = [7041,18,7041,20]; + lineof_temp[508] = [566,21,566,56]; + lineof_temp[2965] = [3113,24,3114,40]; + lineof_temp[3321] = [3389,34,3390,44]; + lineof_temp[3267] = [3327,4,3327,14]; + lineof_temp[3693] = [3751,21,3751,57]; + lineof_temp[5981] = [5852,26,5852,26]; + lineof_temp[2822] = [2880,8,2880,8]; + lineof_temp[4674] = [4676,12,4676,17]; + lineof_temp[5770] = [5629,4,5631,44]; + lineof_temp[1913] = [2080,32,2082,62]; + lineof_temp[3718] = [3780,26,3781,46]; + lineof_temp[4773] = [4747,12,4747,38]; + lineof_temp[7147] = [6929,44,6929,44]; + lineof_temp[3904] = [3920,18,3921,58]; + lineof_temp[6007] = [5874,18,5874,44]; + lineof_temp[6650] = [6431,16,6431,53]; + lineof_temp[4258] = [4254,10,4254,49]; + lineof_temp[428] = [483,20,484,50]; + lineof_temp[1278] = [1358,22,1358,68]; + lineof_temp[1298] = [1443,18,1443,49]; + lineof_temp[2732] = [2821,19,2821,66]; + lineof_temp[528] = [592,30,592,77]; + lineof_temp[2866] = [2985,28,2986,61]; + lineof_temp[4973] = [4890,10,4890,63]; + lineof_temp[2367] = [2500,6,2500,38]; + lineof_temp[3318] = [3392,44,3392,55]; + lineof_temp[4288] = [4338,28,4338,75]; + lineof_temp[168] = [208,12,209,30]; + lineof_temp[1032] = [1144,21,1144,63]; + lineof_temp[3663] = [3706,16,3706,55]; + lineof_temp[4951] = [4934,36,4935,52]; + lineof_temp[3068] = [3135,2,3135,67]; + lineof_temp[5251] = [5171,8,5172,38]; + lineof_temp[6576] = [6349,10,6352,73]; + lineof_temp[1182] = [1336,30,1341,78]; + lineof_temp[426] = [498,24,499,43]; + lineof_temp[4333] = [4372,29,4372,70]; + lineof_temp[1488] = [1617,8,1617,30]; + lineof_temp[2571] = [2682,26,2684,65]; + lineof_temp[3832] = [3876,12,3876,31]; + lineof_temp[6573] = [6350,14,6350,59]; + lineof_temp[2470] = [2603,17,2606,28]; + lineof_temp[7280] = [7016,4,7017,23]; + lineof_temp[1129] = [1218,58,1218,72]; + lineof_temp[1084] = [1304,64,1313,78]; + lineof_temp[2489] = [2618,14,2618,14]; + lineof_temp[2950] = [3051,22,3052,32]; + lineof_temp[3167] = [3151,18,3151,24]; + lineof_temp[4567] = [4583,30,4583,67]; + lineof_temp[6863] = [6646,22,6646,59]; + lineof_temp[1267] = [1369,74,1370,36]; + lineof_temp[3750] = [3810,18,3812,32]; + lineof_temp[3949] = [3968,16,3968,35]; + lineof_temp[5696] = [5568,14,5568,50]; + lineof_temp[5745] = [5608,6,5608,43]; + lineof_temp[6740] = [6532,30,6542,75]; + lineof_temp[3477] = [3528,35,3528,54]; + lineof_temp[5898] = [5760,12,5760,12]; + lineof_temp[860] = [991,29,991,58]; + lineof_temp[1467] = [1599,19,1599,22]; + lineof_temp[1693] = [1833,37,1833,52]; + lineof_temp[4629] = [4634,58,4634,67]; + lineof_temp[6946] = [6728,22,6728,59]; + lineof_temp[3275] = [3342,18,3343,73]; + lineof_temp[5004] = [4973,32,4975,64]; + lineof_temp[5627] = [5508,11,5508,48]; + lineof_temp[448] = [518,20,518,59]; + lineof_temp[3164] = [3153,18,3153,29]; + lineof_temp[4021] = [4049,57,4049,73]; + lineof_temp[2845] = [2907,8,2907,8]; + lineof_temp[541] = [563,16,563,21]; + lineof_temp[1212] = [1374,40,1378,72]; + lineof_temp[7228] = [6985,26,6985,63]; + lineof_temp[602] = [680,38,680,43]; + lineof_temp[4468] = [4481,24,4481,41]; + lineof_temp[6225] = [6056,16,6056,16]; + lineof_temp[4555] = [4504,10,4504,17]; + lineof_temp[2549] = [2662,29,2662,31]; + lineof_temp[5352] = [5270,21,5270,48]; + lineof_temp[1475] = [1606,12,1606,45]; + lineof_temp[3834] = [3876,4,3876,33]; + lineof_temp[3690] = [3698,32,3698,55]; + lineof_temp[6289] = [6080,6,6080,34]; + lineof_temp[1216] = [1382,42,1382,62]; + lineof_temp[4275] = [4312,42,4312,56]; + lineof_temp[5006] = [4987,36,4987,69]; + lineof_temp[3105] = [3183,42,3183,60]; + lineof_temp[3357] = [3370,14,3412,24]; + lineof_temp[861] = [991,29,991,58]; + lineof_temp[3734] = [3771,12,3771,12]; + lineof_temp[4764] = [4743,15,4743,33]; + lineof_temp[3728] = [3773,22,3773,24]; + lineof_temp[6381] = [6172,30,6172,74]; + lineof_temp[7149] = [6921,43,6921,74]; + lineof_temp[3772] = [3831,25,3832,52]; + lineof_temp[6910] = [6673,30,6674,48]; + lineof_temp[5109] = [5068,26,5069,47]; + lineof_temp[7098] = [6883,38,6883,38]; + lineof_temp[955] = [1078,38,1079,50]; + lineof_temp[1587] = [1711,20,1711,20]; + lineof_temp[5798] = [5663,19,5663,48]; + lineof_temp[1920] = [2095,36,2096,42]; + lineof_temp[4421] = [4274,22,4294,78]; + lineof_temp[1260] = [1387,44,1392,74]; + lineof_temp[5273] = [5198,67,5198,74]; + lineof_temp[1437] = [1560,12,1561,56]; + lineof_temp[4422] = [4272,28,4272,48]; + lineof_temp[5216] = [5150,24,5150,76]; + lineof_temp[7122] = [6890,18,6890,37]; + lineof_temp[1095] = [1288,56,1288,77]; + lineof_temp[6089] = [5958,34,5958,53]; + lineof_temp[2027] = [2181,15,2182,77]; + lineof_temp[5209] = [5157,26,5157,34]; + lineof_temp[5521] = [5414,8,5414,64]; + lineof_temp[1394] = [1520,46,1538,66]; + lineof_temp[3367] = [3429,30,3430,43]; + lineof_temp[4581] = [4578,20,4595,79]; + lineof_temp[6575] = [6349,10,6352,73]; + lineof_temp[2700] = [2791,14,2791,30]; + lineof_temp[3220] = [3281,28,3281,28]; + lineof_temp[4971] = [4940,12,4940,24]; + lineof_temp[6259] = [6078,14,6078,30]; + lineof_temp[6561] = [6319,6,6342,36]; + lineof_temp[1156] = [1180,50,1183,60]; + lineof_temp[2058] = [2214,20,2215,72]; + lineof_temp[3154] = [3175,8,3175,54]; + lineof_temp[4303] = [4310,16,4311,33]; + lineof_temp[208] = [250,13,250,35]; + lineof_temp[1092] = [1295,60,1295,60]; + lineof_temp[3065] = [3144,4,3144,75]; + lineof_temp[3019] = [3084,34,3093,42]; + lineof_temp[3222] = [3270,20,3272,63]; + lineof_temp[3862] = [3898,10,3901,56]; + lineof_temp[4208] = [4193,50,4193,56]; + lineof_temp[4855] = [4800,69,4800,70]; + lineof_temp[5880] = [5747,26,5747,62]; + lineof_temp[5276] = [5196,20,5196,21]; + lineof_temp[4199] = [4190,14,4190,37]; + lineof_temp[4285] = [4328,30,4328,30]; + lineof_temp[6772] = [6556,47,6556,74]; + lineof_temp[5081] = [5039,12,5039,13]; + lineof_temp[6210] = [6041,8,6042,31]; + lineof_temp[7343] = [7046,16,7046,43]; + lineof_temp[3625] = [3656,46,3658,70]; + lineof_temp[3784] = [3848,52,3848,65]; + lineof_temp[4489] = [4445,6,4445,37]; + lineof_temp[1530] = [1651,8,1651,8]; + lineof_temp[3110] = [3188,28,3188,60]; + lineof_temp[6472] = [6271,54,6271,72]; + lineof_temp[243] = [279,2,279,29]; + lineof_temp[3329] = [3382,26,3383,51]; + lineof_temp[6820] = [6602,34,6602,55]; + lineof_temp[319] = [341,6,341,24]; + lineof_temp[3860] = [3899,40,3899,48]; + lineof_temp[683] = [751,30,751,50]; + lineof_temp[4124] = [4147,46,4147,63]; + lineof_temp[5036] = [5010,42,5011,58]; + lineof_temp[2670] = [2774,10,2774,28]; + lineof_temp[6307] = [6111,10,6114,73]; + lineof_temp[274] = [302,8,303,37]; + lineof_temp[3501] = [3539,18,3540,44]; + lineof_temp[4189] = [4183,4,4183,29]; + lineof_temp[4884] = [4792,24,4792,53]; + lineof_temp[1165] = [1170,36,1254,57]; + lineof_temp[6817] = [6604,38,6604,75]; + lineof_temp[3915] = [3910,10,3910,28]; + lineof_temp[3905] = [3918,22,3918,50]; + lineof_temp[5052] = [5021,47,5021,48]; + lineof_temp[2678] = [2781,14,2781,38]; + lineof_temp[4970] = [4941,14,4941,63]; + lineof_temp[805] = [960,8,966,52]; + lineof_temp[2205] = [2359,22,2359,37]; + lineof_temp[2808] = [2889,18,2889,32]; + lineof_temp[6721] = [6469,30,6469,30]; + lineof_temp[700] = [769,45,769,70]; + lineof_temp[3880] = [3935,26,3937,70]; + lineof_temp[3139] = [3191,18,3218,73]; + lineof_temp[5078] = [5036,11,5036,39]; + lineof_temp[6023] = [5893,24,5893,71]; + lineof_temp[884] = [1014,32,1014,60]; + lineof_temp[1220] = [1395,50,1397,64]; + lineof_temp[5946] = [5811,15,5811,50]; + lineof_temp[1188] = [1348,32,1349,39]; + lineof_temp[5060] = [4971,28,4971,68]; + lineof_temp[5588] = [5480,14,5480,51]; + lineof_temp[5984] = [5822,16,5834,17]; + lineof_temp[7018] = [6743,8,6744,30]; + lineof_temp[5062] = [4965,28,4965,33]; + lineof_temp[5786] = [5640,4,5642,42]; + lineof_temp[6585] = [6359,10,6359,35]; + lineof_temp[3496] = [3508,28,3508,33]; + lineof_temp[5910] = [5768,14,5768,47]; + lineof_temp[6613] = [6386,28,6386,65]; + lineof_temp[5463] = [5366,51,5366,59]; + lineof_temp[6681] = [6439,14,6442,58]; + lineof_temp[1440] = [1552,4,1553,26]; + lineof_temp[5120] = [5057,22,5057,27]; + lineof_temp[6222] = [6057,16,6057,52]; + lineof_temp[6516] = [6278,6,6278,31]; + lineof_temp[2325] = [2458,6,2458,42]; + lineof_temp[4061] = [4090,14,4093,68]; + lineof_temp[4792] = [4773,21,4773,46]; + lineof_temp[6975] = [6751,22,6751,65]; + lineof_temp[309] = [327,32,327,62]; + lineof_temp[2991] = [3097,44,3097,66]; + lineof_temp[633] = [644,12,644,47]; + lineof_temp[1679] = [1835,24,1835,62]; + lineof_temp[2514] = [2646,20,2646,40]; + lineof_temp[4681] = [4681,16,4681,16]; + lineof_temp[7371] = [7100,16,7100,47]; + lineof_temp[4775] = [4756,24,4756,52]; + lineof_temp[5958] = [5822,50,5822,72]; + lineof_temp[1495] = [1623,10,1623,41]; + lineof_temp[1574] = [1705,16,1705,42]; + lineof_temp[3178] = [3229,51,3229,71]; + lineof_temp[1147] = [1200,54,1201,79]; + lineof_temp[6036] = [5881,20,5881,25]; + lineof_temp[501] = [554,59,554,60]; + lineof_temp[1637] = [1732,12,1776,53]; + lineof_temp[2223] = [2368,18,2368,67]; + lineof_temp[4786] = [4762,16,4765,59]; + lineof_temp[3475] = [3519,22,3520,40]; + lineof_temp[3738] = [3739,30,3739,54]; + lineof_temp[4051] = [4068,11,4068,48]; + lineof_temp[5094] = [5035,2,5047,55]; + lineof_temp[2849] = [2933,10,2936,23]; + lineof_temp[6462] = [6243,20,6243,20]; + lineof_temp[179] = [145,10,145,16]; + lineof_temp[1176] = [1340,36,1340,69]; + lineof_temp[2999] = [3097,41,3098,72]; + lineof_temp[3098] = [3179,14,3179,75]; + lineof_temp[329] = [361,6,361,17]; + lineof_temp[350] = [379,4,379,72]; + lineof_temp[2902] = [2997,4,2997,14]; + lineof_temp[2164] = [2311,12,2311,50]; + lineof_temp[3360] = [3369,14,3369,14]; + lineof_temp[3590] = [3568,21,3568,27]; + lineof_temp[6957] = [6736,14,6737,73]; + lineof_temp[4238] = [4230,6,4230,38]; + lineof_temp[5497] = [5394,20,5395,50]; + lineof_temp[1710] = [1868,22,1868,48]; + lineof_temp[6605] = [6380,28,6380,65]; + lineof_temp[358] = [394,6,397,41]; + lineof_temp[5499] = [5396,22,5396,22]; + lineof_temp[2928] = [3017,22,3017,32]; + lineof_temp[3942] = [3962,16,3962,46]; + lineof_temp[6943] = [6714,10,6714,37]; + lineof_temp[1583] = [1708,18,1709,64]; + lineof_temp[369] = [422,4,422,52]; + lineof_temp[1817] = [1975,18,1976,33]; + lineof_temp[2518] = [2733,18,2740,62]; + lineof_temp[200] = [244,8,244,19]; + lineof_temp[5676] = [5551,14,5551,43]; + lineof_temp[6994] = [6778,36,6779,77]; + lineof_temp[1279] = [1359,25,1359,30]; + lineof_temp[5448] = [5345,18,5345,26]; + lineof_temp[6813] = [6601,38,6601,75]; + lineof_temp[6304] = [6112,20,6112,72]; + lineof_temp[4668] = [4656,10,4656,19]; + lineof_temp[4716] = [4706,6,4706,46]; + lineof_temp[978] = [1070,38,1070,60]; + lineof_temp[3656] = [3550,8,3550,8]; + lineof_temp[5146] = [5101,22,5101,77]; + lineof_temp[133] = [182,28,182,46]; + lineof_temp[5550] = [5447,14,5448,39]; + lineof_temp[2754] = [2835,6,2835,52]; + lineof_temp[4393] = [4384,6,4384,14]; + lineof_temp[5150] = [5104,22,5104,43]; + lineof_temp[5833] = [5700,12,5700,12]; + lineof_temp[618] = [687,30,687,55]; + lineof_temp[1287] = [1136,2,1431,12]; + lineof_temp[3028] = [3059,24,3059,60]; + lineof_temp[5453] = [5327,8,5331,9]; + lineof_temp[1940] = [2000,16,2000,18]; + lineof_temp[1842] = [1998,16,1998,42]; + lineof_temp[2100] = [2254,12,2254,50]; + lineof_temp[2103] = [2267,26,2267,55]; + lineof_temp[3229] = [3255,18,3255,66]; + lineof_temp[4831] = [4796,14,4796,68]; + lineof_temp[5681] = [5554,6,5556,73]; + lineof_temp[6500] = [6290,26,6290,59]; + lineof_temp[5848] = [5711,12,5714,79]; + lineof_temp[6641] = [6370,20,6370,32]; + lineof_temp[4332] = [4375,26,4379,79]; + lineof_temp[3964] = [3971,27,3971,50]; + lineof_temp[5288] = [5212,31,5212,38]; + lineof_temp[6432] = [6229,30,6229,69]; + lineof_temp[396] = [458,30,459,60]; + lineof_temp[1368] = [1512,48,1513,74]; + lineof_temp[1925] = [2083,30,2084,56]; + lineof_temp[6802] = [6586,14,6586,51]; + lineof_temp[6826] = [6616,38,6616,75]; + lineof_temp[7268] = [7011,14,7011,30]; + lineof_temp[3203] = [3298,22,3298,73]; + lineof_temp[411] = [467,13,467,46]; + lineof_temp[572] = [602,35,602,54]; + lineof_temp[2217] = [2348,71,2348,74]; + lineof_temp[2556] = [2670,26,2672,65]; + lineof_temp[4892] = [4846,12,4846,68]; + lineof_temp[7256] = [7004,26,7004,53]; + lineof_temp[4636] = [4644,27,4644,34]; + lineof_temp[5249] = [5174,12,5176,66]; + lineof_temp[5712] = [5584,15,5584,42]; + lineof_temp[6138] = [5986,10,5986,43]; + lineof_temp[1036] = [1150,24,1150,39]; + lineof_temp[4952] = [4934,36,4935,52]; + lineof_temp[3494] = [3533,24,3536,57]; + lineof_temp[190] = [230,2,230,24]; + lineof_temp[1327] = [1461,12,1461,77]; + lineof_temp[2280] = [2421,41,2421,74]; + lineof_temp[2915] = [3010,27,3010,30]; + lineof_temp[3793] = [3838,22,3838,22]; + lineof_temp[76] = [99,8,101,76]; + lineof_temp[3366] = [3421,18,3421,71]; + lineof_temp[3940] = [3951,20,3951,49]; + lineof_temp[858] = [990,27,990,59]; + lineof_temp[1537] = [1663,12,1667,80]; + lineof_temp[2264] = [2400,4,2400,27]; + lineof_temp[4331] = [4379,50,4379,73]; + lineof_temp[4494] = [4506,6,4506,72]; + lineof_temp[7115] = [6856,12,6887,43]; + lineof_temp[1697] = [1856,2,1856,35]; + lineof_temp[2087] = [2175,12,2176,41]; + lineof_temp[5432] = [5344,15,5344,36]; + lineof_temp[1915] = [2095,36,2096,42]; + lineof_temp[3340] = [3395,32,3395,40]; + lineof_temp[6517] = [6277,4,6277,50]; + lineof_temp[2131] = [2294,26,2294,26]; + lineof_temp[6670] = [6413,4,6413,44]; + lineof_temp[13] = [16,6,16,77]; + lineof_temp[6928] = [6662,12,6710,19]; + lineof_temp[7009] = [6752,61,6752,74]; + lineof_temp[5803] = [5672,22,5672,60]; + lineof_temp[51] = [78,10,78,11]; + lineof_temp[2634] = [2713,10,2714,29]; + lineof_temp[2723] = [2809,13,2809,49]; + lineof_temp[3223] = [3272,74,3273,23]; + lineof_temp[6319] = [6126,20,6126,72]; + lineof_temp[6976] = [6752,22,6752,59]; + lineof_temp[3970] = [3977,13,3977,29]; + lineof_temp[836] = [930,20,930,56]; + lineof_temp[611] = [647,64,647,71]; + lineof_temp[1778] = [1940,14,1940,29]; + lineof_temp[3704] = [3751,21,3751,57]; + lineof_temp[4098] = [4128,14,4128,51]; + lineof_temp[5297] = [5211,2,5214,57]; + lineof_temp[5607] = [5491,6,5491,71]; + lineof_temp[7002] = [6756,36,6756,41]; + lineof_temp[648] = [704,63,704,68]; + lineof_temp[3581] = [3581,54,3581,58]; + lineof_temp[90] = [95,32,95,44]; + lineof_temp[601] = [680,38,680,43]; + lineof_temp[2703] = [2793,8,2795,77]; + lineof_temp[6786] = [6573,38,6573,64]; + lineof_temp[6318] = [6126,20,6126,72]; + lineof_temp[3118] = [3210,36,3211,76]; + lineof_temp[2493] = [2613,16,2613,73]; + lineof_temp[2977] = [3070,38,3071,54]; + lineof_temp[3417] = [3464,22,3464,41]; + lineof_temp[4810] = [4773,57,4773,63]; + lineof_temp[527] = [592,38,592,75]; + lineof_temp[3888] = [3935,26,3937,70]; + lineof_temp[1149] = [1194,54,1196,66]; + lineof_temp[3557] = [3607,56,3610,70]; + lineof_temp[5656] = [5535,10,5535,71]; + lineof_temp[6564] = [6344,6,6345,79]; + lineof_temp[6593] = [6364,14,6367,58]; + lineof_temp[1620] = [1749,46,1749,51]; + lineof_temp[4240] = [4232,6,4232,37]; + lineof_temp[4871] = [4823,8,4829,56]; + lineof_temp[1083] = [1314,64,1318,76]; + lineof_temp[2691] = [2750,6,2753,27]; + lineof_temp[3786] = [3844,26,3846,71]; + lineof_temp[4327] = [4365,22,4366,45]; + lineof_temp[383] = [437,8,437,65]; + lineof_temp[467] = [537,27,537,65]; + lineof_temp[7174] = [6890,48,6890,53]; + lineof_temp[1162] = [1171,45,1171,72]; + lineof_temp[6852] = [6585,12,6635,19]; + lineof_temp[6849] = [6588,18,6632,28]; + lineof_temp[406] = [445,12,445,53]; + lineof_temp[770] = [832,38,832,38]; + lineof_temp[2964] = [3115,57,3115,77]; + lineof_temp[5391] = [5301,41,5301,41]; + lineof_temp[1727] = [1881,12,1890,23]; + lineof_temp[1916] = [2095,36,2096,42]; + lineof_temp[1141] = [1233,60,1233,60]; + lineof_temp[6828] = [6613,34,6614,52]; + lineof_temp[3743] = [3807,41,3807,65]; + lineof_temp[2980] = [3069,34,3073,98]; + lineof_temp[3463] = [3516,26,3518,78]; + lineof_temp[5100] = [5060,26,5060,64]; + lineof_temp[494] = [464,25,464,56]; + lineof_temp[2046] = [2187,18,2188,50]; + lineof_temp[462] = [527,14,527,26]; + lineof_temp[1901] = [2010,28,2029,30]; + lineof_temp[5826] = [5683,10,5683,20]; + lineof_temp[7083] = [6861,27,6861,49]; + lineof_temp[1943] = [1999,12,1999,12]; + lineof_temp[4733] = [4707,4,4707,12]; + lineof_temp[972] = [1085,32,1086,51]; + lineof_temp[3239] = [3238,2,3238,29]; + lineof_temp[6309] = [6105,14,6105,19]; + lineof_temp[1410] = [1484,30,1545,51]; + lineof_temp[191] = [229,2,229,24]; + lineof_temp[311] = [327,10,327,65]; + lineof_temp[722] = [808,40,809,48]; + lineof_temp[5983] = [5835,16,5847,17]; + lineof_temp[1927] = [2075,26,2076,45]; + lineof_temp[6426] = [6211,20,6211,20]; + lineof_temp[1942] = [1998,53,1998,59]; + lineof_temp[739] = [802,30,803,53]; + lineof_temp[4923] = [4883,8,4884,26]; + lineof_temp[5464] = [5367,14,5367,14]; + lineof_temp[3088] = [3155,12,3155,40]; + lineof_temp[4000] = [3993,8,3993,8]; + lineof_temp[4885] = [4839,39,4839,73]; + lineof_temp[6760] = [6455,12,6458,60]; + lineof_temp[37] = [60,14,60,40]; + lineof_temp[6331] = [6132,14,6132,30]; + lineof_temp[652] = [697,10,697,15]; + lineof_temp[872] = [1001,28,1001,40]; + lineof_temp[5864] = [5725,12,5725,12]; + lineof_temp[6931] = [6659,8,6660,30]; + lineof_temp[7049] = [6828,22,6828,48]; + lineof_temp[7190] = [6953,18,6956,64]; + lineof_temp[248] = [289,10,289,36]; + lineof_temp[5998] = [5866,12,5867,74]; + lineof_temp[1348] = [1487,40,1491,69]; + lineof_temp[1810] = [1968,20,1968,69]; + lineof_temp[643] = [698,4,699,22]; + lineof_temp[2267] = [2403,6,2403,31]; + lineof_temp[232] = [251,10,251,40]; + lineof_temp[927] = [1097,34,1098,71]; + lineof_temp[6059] = [5926,22,5926,22]; + lineof_temp[7380] = [7104,10,7104,53]; + lineof_temp[115] = [149,6,149,20]; + lineof_temp[714] = [762,10,762,19]; + lineof_temp[6513] = [6280,47,6280,52]; + lineof_temp[6956] = [6731,12,6732,31]; + lineof_temp[3874] = [3930,25,3931,65]; + lineof_temp[287] = [314,14,314,40]; + lineof_temp[5320] = [5231,18,5234,76]; + lineof_temp[1761] = [1932,31,1932,36]; + lineof_temp[4960] = [4899,61,4899,66]; + lineof_temp[6845] = [6592,32,6592,38]; + lineof_temp[2789] = [2841,12,2867,32]; + lineof_temp[3597] = [3635,26,3635,77]; + lineof_temp[6179] = [6015,12,6015,12]; + lineof_temp[83] = [104,14,104,71]; + lineof_temp[5490] = [5401,36,5401,54]; + lineof_temp[2551] = [2654,16,2663,64]; + lineof_temp[1540] = [1670,20,1670,48]; + lineof_temp[6596] = [6361,10,6362,32]; + lineof_temp[6771] = [6552,20,6552,36]; + lineof_temp[1359] = [1505,49,1505,72]; + lineof_temp[2362] = [2493,4,2493,33]; + lineof_temp[620] = [690,32,690,71]; + lineof_temp[3049] = [3123,12,3123,51]; + lineof_temp[5191] = [5134,19,5134,38]; + lineof_temp[386] = [438,6,438,40]; + lineof_temp[6887] = [6667,22,6667,65]; + lineof_temp[1113] = [1176,46,1176,73]; + lineof_temp[4353] = [4392,16,4392,40]; + lineof_temp[5431] = [5344,15,5344,36]; + lineof_temp[6039] = [5871,61,5871,66]; + lineof_temp[1774] = [1911,10,1912,40]; + lineof_temp[2250] = [2395,20,2395,38]; + lineof_temp[2406] = [2537,4,2537,40]; + lineof_temp[6042] = [5868,4,5869,44]; + lineof_temp[302] = [323,35,323,61]; + lineof_temp[1317] = [1446,24,1446,35]; + lineof_temp[6390] = [6176,14,6176,30]; + lineof_temp[5272] = [5198,31,5198,56]; + lineof_temp[4612] = [4604,15,4604,45]; + lineof_temp[5780] = [5645,12,5645,57]; + lineof_temp[6091] = [5958,34,5958,53]; + lineof_temp[1190] = [1347,28,1347,43]; + lineof_temp[3410] = [3460,20,3460,69]; + lineof_temp[4791] = [4745,21,4745,40]; + lineof_temp[5510] = [5405,12,5405,71]; + lineof_temp[6815] = [6600,36,6601,77]; + lineof_temp[7364] = [7093,35,7093,64]; + lineof_temp[1072] = [1296,64,1296,69]; + lineof_temp[2044] = [2187,38,2187,52]; + lineof_temp[2424] = [2555,4,2556,27]; + lineof_temp[6189] = [6029,22,6029,59]; + lineof_temp[2081] = [2222,16,2225,64]; + lineof_temp[2313] = [2446,6,2446,45]; + lineof_temp[4568] = [4583,30,4583,67]; + lineof_temp[6701] = [6483,48,6485,71]; + lineof_temp[439] = [467,57,467,62]; + lineof_temp[559] = [609,20,609,25]; + lineof_temp[2609] = [2710,43,2710,58]; + lineof_temp[4990] = [4968,32,4968,70]; + lineof_temp[744] = [841,48,845,78]; + lineof_temp[5804] = [5671,22,5671,69]; + lineof_temp[5851] = [5710,12,5710,12]; + lineof_temp[6729] = [6528,30,6529,63]; + lineof_temp[3030] = [3055,22,3055,61]; + lineof_temp[7381] = [7104,2,7104,55]; + lineof_temp[4698] = [4695,19,4695,48]; + lineof_temp[901] = [1027,24,1028,32]; + lineof_temp[1344] = [1487,41,1487,67]; + lineof_temp[2998] = [3097,41,3098,72]; + lineof_temp[4679] = [4680,19,4680,48]; + lineof_temp[5008] = [4985,36,4986,52]; + lineof_temp[5200] = [5144,21,5144,75]; + lineof_temp[1323] = [1442,8,1455,19]; + lineof_temp[4134] = [4151,8,4152,23]; + lineof_temp[1395] = [1520,46,1538,66]; + lineof_temp[1465] = [1601,12,1601,64]; + lineof_temp[2213] = [2356,20,2356,43]; + lineof_temp[3458] = [3511,26,3513,78]; + lineof_temp[6027] = [5894,22,5896,74]; + lineof_temp[1880] = [2047,46,2048,62]; + lineof_temp[4927] = [4891,31,4891,54]; + lineof_temp[7079] = [6854,18,6854,37]; + lineof_temp[3681] = [3726,20,3726,49]; + lineof_temp[3771] = [3831,25,3832,52]; + lineof_temp[4361] = [4397,24,4397,24]; + lineof_temp[3512] = [3477,8,3544,19]; + lineof_temp[4521] = [4539,38,4542,46]; + lineof_temp[7173] = [6890,18,6890,37]; + lineof_temp[6114] = [5941,22,5941,27]; + lineof_temp[1511] = [1641,12,1641,55]; + lineof_temp[3560] = [3617,60,3619,67]; + lineof_temp[4909] = [4850,2,4850,29]; + lineof_temp[2152] = [2252,2,2252,55]; + lineof_temp[2615] = [2701,16,2710,64]; + lineof_temp[5701] = [5571,6,5571,55]; + lineof_temp[3377] = [3425,47,3425,52]; + lineof_temp[1309] = [1452,60,1452,65]; + lineof_temp[4972] = [4892,18,4892,36]; + lineof_temp[484] = [535,18,535,18]; + lineof_temp[7215] = [6972,27,6972,41]; + lineof_temp[6890] = [6668,22,6668,59]; + lineof_temp[237] = [244,8,244,19]; + lineof_temp[7310] = [7056,34,7056,77]; + lineof_temp[3006] = [3100,38,3100,76]; + lineof_temp[5972] = [5851,22,5851,51]; + lineof_temp[6327] = [6123,8,6124,26]; + lineof_temp[7235] = [6980,69,6980,71]; + lineof_temp[1742] = [1897,4,1897,30]; + lineof_temp[2363] = [2496,6,2496,32]; + lineof_temp[2376] = [2507,4,2507,35]; + lineof_temp[2994] = [3098,46,3098,70]; + lineof_temp[5227] = [5134,19,5134,38]; + lineof_temp[6263] = [6080,17,6080,33]; + lineof_temp[923] = [1097,35,1097,63]; + lineof_temp[186] = [232,12,232,52]; + lineof_temp[2588] = [2694,26,2694,41]; + lineof_temp[4415] = [4279,28,4284,47]; + lineof_temp[7005] = [6789,36,6789,73]; + lineof_temp[4426] = [4269,19,4269,44]; + lineof_temp[433] = [482,26,482,43]; + lineof_temp[2258] = [2399,14,2399,29]; + lineof_temp[6424] = [6210,26,6210,45]; + lineof_temp[6677] = [6440,18,6440,67]; + lineof_temp[7119] = [6853,6,6887,47]; + lineof_temp[2207] = [2359,22,2362,93]; + lineof_temp[6428] = [6207,12,6208,31]; + lineof_temp[6447] = [6242,26,6242,45]; + lineof_temp[6688] = [6464,32,6464,51]; + lineof_temp[2800] = [2832,20,2832,48]; + lineof_temp[6797] = [6577,12,6578,31]; + lineof_temp[392] = [445,12,445,53]; + lineof_temp[430] = [505,30,505,66]; + lineof_temp[2943] = [3032,14,3032,25]; + lineof_temp[17] = [29,4,29,18]; + lineof_temp[686] = [749,43,749,49]; + lineof_temp[6192] = [6028,12,6028,33]; + lineof_temp[6932] = [6639,14,6639,23]; + lineof_temp[640] = [638,2,693,12]; + lineof_temp[1110] = [1261,32,1332,53]; + lineof_temp[3026] = [3065,28,3065,28]; + lineof_temp[313] = [306,14,306,20]; + lineof_temp[1474] = [1578,4,1579,27]; + lineof_temp[2803] = [2884,16,2884,71]; + lineof_temp[5103] = [5058,16,5059,34]; + lineof_temp[5755] = [5617,6,5617,57]; + lineof_temp[295] = [319,14,319,40]; + lineof_temp[2095] = [2158,10,2158,16]; + lineof_temp[2725] = [2811,25,2811,36]; + lineof_temp[4613] = [4604,56,4604,62]; + lineof_temp[5482] = [5384,14,5384,24]; + lineof_temp[7328] = [7060,61,7060,70]; + lineof_temp[1541] = [1670,12,1670,50]; + lineof_temp[4573] = [4592,32,4595,71]; + lineof_temp[6158] = [6009,27,6010,60]; + lineof_temp[3448] = [3489,28,3489,69]; + lineof_temp[5069] = [4960,14,4960,14]; + lineof_temp[1340] = [1479,30,1479,67]; + lineof_temp[2173] = [2320,20,2320,53]; + lineof_temp[2212] = [2356,28,2356,41]; + lineof_temp[2591] = [2697,24,2697,73]; + lineof_temp[7031] = [6811,20,6811,46]; + lineof_temp[1330] = [1465,26,1465,54]; + lineof_temp[6303] = [6114,30,6114,69]; + lineof_temp[2303] = [2436,6,2436,34]; + lineof_temp[3876] = [3930,24,3932,64]; + lineof_temp[4637] = [4644,27,4644,34]; + lineof_temp[2179] = [2317,14,2321,101]; + lineof_temp[3018] = [3091,56,3091,56]; + lineof_temp[911] = [1041,32,1042,64]; + lineof_temp[3003] = [3102,44,3102,54]; + lineof_temp[7299] = [5996,10,5996,15]; + lineof_temp[4423] = [4272,59,4272,65]; + lineof_temp[27] = [46,14,46,39]; + lineof_temp[4387] = [4419,16,4419,24]; + lineof_temp[4697] = [4697,16,4697,49]; + lineof_temp[4841] = [4816,32,4819,71]; + lineof_temp[212] = [250,12,250,62]; + lineof_temp[460] = [524,4,524,35]; + lineof_temp[3692] = [3743,8,3744,26]; + lineof_temp[3855] = [3899,21,3899,29]; + lineof_temp[3241] = [3233,30,3233,67]; + lineof_temp[4682] = [4679,10,4682,53]; + lineof_temp[6985] = [6763,34,6763,55]; + lineof_temp[7346] = [7082,18,7082,67]; + lineof_temp[1334] = [1464,47,1464,71]; + lineof_temp[6466] = [6193,8,6194,30]; + lineof_temp[3575] = [3588,40,3592,42]; + lineof_temp[3729] = [3773,35,3773,37]; + lineof_temp[4108] = [4132,48,4132,53]; + lineof_temp[2421] = [2554,6,2554,22]; + lineof_temp[4296] = [4323,28,4323,46]; + lineof_temp[2741] = [2823,14,2823,14]; + lineof_temp[3985] = [4012,46,4012,63]; + lineof_temp[4436] = [4434,4,4435,29]; + lineof_temp[5907] = [5770,18,5773,100]; + lineof_temp[946] = [1116,40,1116,75]; + lineof_temp[5847] = [5713,34,5713,34]; + lineof_temp[4638] = [4644,6,4644,37]; + lineof_temp[5773] = [5638,12,5638,57]; + lineof_temp[2455] = [2591,21,2591,48]; + lineof_temp[3298] = [3356,8,3356,23]; + lineof_temp[5145] = [5101,22,5101,77]; + lineof_temp[7086] = [6863,28,6865,66]; + lineof_temp[7146] = [6927,73,6928,43]; + lineof_temp[222] = [265,40,265,49]; + lineof_temp[580] = [647,25,647,53]; + lineof_temp[2523] = [2730,12,2740,66]; + lineof_temp[617] = [687,30,687,55]; + lineof_temp[7091] = [6880,41,6880,75]; + lineof_temp[2226] = [2367,14,2370,100]; + lineof_temp[6801] = [6585,32,6585,70]; + lineof_temp[2781] = [2848,32,2848,39]; + lineof_temp[5733] = [5599,6,5599,46]; + lineof_temp[892] = [1017,26,1019,67]; + lineof_temp[2751] = [2807,28,2807,52]; + lineof_temp[4512] = [4539,38,4542,46]; + lineof_temp[5037] = [5009,38,5009,53]; + lineof_temp[5849] = [5708,18,5708,72]; + lineof_temp[943] = [1111,40,1112,52]; + lineof_temp[5679] = [5555,8,5556,71]; + lineof_temp[5] = [16,58,16,75]; + lineof_temp[3180] = [3229,10,3230,41]; + lineof_temp[4429] = [4268,10,4295,28]; + lineof_temp[5240] = [5174,50,5174,57]; + lineof_temp[6879] = [6662,32,6662,70]; + lineof_temp[2644] = [2621,4,2621,30]; + lineof_temp[7023] = [6798,6,6798,72]; + lineof_temp[1645] = [1783,12,1783,50]; + lineof_temp[5503] = [5382,12,5382,41]; + lineof_temp[673] = [743,45,743,73]; + lineof_temp[5470] = [5361,20,5361,36]; + lineof_temp[6313] = [6118,14,6118,30]; + lineof_temp[3632] = [3650,36,3687,57]; + lineof_temp[5329] = [5221,4,5222,41]; + lineof_temp[1390] = [1535,52,1538,64]; + lineof_temp[4501] = [4516,19,4516,46]; + lineof_temp[5011] = [4984,32,4988,85]; + lineof_temp[5947] = [5811,15,5811,50]; + lineof_temp[3748] = [3811,20,3811,72]; + lineof_temp[6607] = [6380,20,6380,67]; + lineof_temp[651] = [701,4,702,22]; + lineof_temp[4103] = [4132,18,4132,37]; + lineof_temp[6355] = [6152,18,6152,55]; + lineof_temp[1904] = [2009,28,2009,28]; + lineof_temp[3133] = [3197,37,3197,48]; + lineof_temp[4899] = [4859,6,4860,17]; + lineof_temp[5810] = [5675,16,5675,54]; + lineof_temp[1512] = [1641,12,1641,55]; + lineof_temp[1875] = [2038,44,2038,56]; + lineof_temp[5919] = [5791,20,5792,58]; + lineof_temp[6716] = [6475,38,6475,38]; + lineof_temp[846] = [922,44,922,119]; + lineof_temp[1082] = [1315,66,1318,74]; + lineof_temp[3338] = [3396,38,3396,49]; + lineof_temp[1476] = [1605,12,1605,61]; + lineof_temp[1198] = [1144,21,1144,63]; + lineof_temp[2126] = [2295,34,2295,46]; + lineof_temp[3586] = [3579,28,3579,28]; + lineof_temp[4645] = [4648,15,4648,43]; + lineof_temp[39] = [60,6,60,42]; + lineof_temp[1380] = [1525,50,1529,62]; + lineof_temp[2410] = [2541,4,2541,31]; + lineof_temp[968] = [1088,36,1088,51]; + lineof_temp[826] = [949,26,951,65]; + lineof_temp[4080] = [4109,16,4109,61]; + lineof_temp[7319] = [7069,58,7069,62]; + lineof_temp[126] = [170,20,170,42]; + lineof_temp[2211] = [2356,28,2356,41]; + lineof_temp[315] = [285,10,285,16]; + lineof_temp[4864] = [4825,14,4828,79]; + lineof_temp[1229] = [1404,54,1404,74]; + lineof_temp[2798] = [2868,4,2869,26]; + lineof_temp[6310] = [6104,6,6104,31]; + lineof_temp[3020] = [3077,34,3083,36]; + lineof_temp[1224] = [1406,48,1406,68]; + lineof_temp[2030] = [2179,12,2182,78]; + lineof_temp[4560] = [4567,22,4567,45]; + lineof_temp[5384] = [5296,22,5296,43]; + lineof_temp[7224] = [6980,20,6980,58]; + lineof_temp[2487] = [2617,20,2617,38]; + lineof_temp[6364] = [6157,23,6157,26]; + lineof_temp[2031] = [2236,20,2236,53]; + lineof_temp[894] = [1021,28,1021,28]; + lineof_temp[4235] = [4225,4,4225,31]; + lineof_temp[7321] = [7071,54,7071,54]; + lineof_temp[4308] = [4299,8,4344,18]; + lineof_temp[4788] = [4761,14,4765,61]; + lineof_temp[5714] = [5585,12,5585,12]; + lineof_temp[4269] = [4300,21,4300,38]; + lineof_temp[4459] = [4458,16,4465,18]; + lineof_temp[6570] = [6354,8,6354,55]; + lineof_temp[728] = [806,36,815,76]; + lineof_temp[2582] = [2685,35,2685,35]; + lineof_temp[5878] = [5742,20,5742,46]; + lineof_temp[3554] = [3600,48,3601,52]; + lineof_temp[5316] = [5234,24,5234,72]; + lineof_temp[1123] = [1207,62,1207,64]; + lineof_temp[4388] = [4388,22,4388,28]; + lineof_temp[1658] = [1810,30,1812,62]; + lineof_temp[2270] = [2404,4,2404,27]; + lineof_temp[5210] = [5157,18,5157,36]; + lineof_temp[5962] = [5831,28,5831,54]; + lineof_temp[1513] = [1645,36,1645,68]; + lineof_temp[4796] = [4779,37,4779,69]; + lineof_temp[5089] = [5039,8,5043,9]; + lineof_temp[810] = [926,16,926,74]; + lineof_temp[1674] = [1783,12,1783,50]; + lineof_temp[2761] = [2853,32,2853,75]; + lineof_temp[4895] = [4852,13,4852,50]; + lineof_temp[31] = [49,14,49,39]; + lineof_temp[4279] = [4327,36,4327,52]; + lineof_temp[4519] = [4547,46,4547,46]; + lineof_temp[2259] = [2399,6,2399,31]; + lineof_temp[1992] = [2153,10,2154,44]; + lineof_temp[5884] = [5740,14,5741,32]; + lineof_temp[366] = [410,4,410,30]; + lineof_temp[2243] = [2385,12,2385,39]; + lineof_temp[2312] = [2443,4,2443,42]; + lineof_temp[1641] = [1726,62,1726,63]; + lineof_temp[7223] = [6980,20,6980,58]; + lineof_temp[4920] = [4880,10,4882,74]; + lineof_temp[3324] = [3387,30,3392,61]; + lineof_temp[5555] = [5452,19,5453,44]; + lineof_temp[835] = [933,20,933,38]; + lineof_temp[2111] = [2263,20,2263,53]; + lineof_temp[556] = [617,18,620,103]; + lineof_temp[3093] = [3172,12,3173,27]; + lineof_temp[3986] = [4014,16,4014,16]; + lineof_temp[4534] = [4519,27,4519,61]; + lineof_temp[6464] = [6239,12,6240,31]; + lineof_temp[7156] = [6914,26,6943,54]; + lineof_temp[2887] = [2955,6,2956,68]; + lineof_temp[4126] = [4147,8,4148,13]; + lineof_temp[4803] = [4780,46,4780,46]; + lineof_temp[6260] = [6079,14,6079,30]; + lineof_temp[2541] = [2658,24,2661,67]; + lineof_temp[3649] = [3630,18,3630,18]; + lineof_temp[5161] = [5095,50,5095,56]; + lineof_temp[7164] = [6899,28,6899,41]; + lineof_temp[1283] = [1139,16,1139,21]; + lineof_temp[4965] = [4896,16,4939,32]; + lineof_temp[4039] = [4062,57,4062,71]; + lineof_temp[7114] = [6859,18,6859,18]; + lineof_temp[6144] = [5981,4,5981,32]; + lineof_temp[3696] = [3757,28,3757,66]; + lineof_temp[1668] = [1786,10,1787,29]; + lineof_temp[1834] = [1991,16,1991,40]; + lineof_temp[4720] = [4712,21,4712,50]; + lineof_temp[6625] = [6404,36,6405,49]; + lineof_temp[3009] = [3089,40,3090,70]; + lineof_temp[4554] = [4507,4,4508,41]; + lineof_temp[6586] = [6411,16,6411,53]; + lineof_temp[3536] = [3565,20,3565,26]; + lineof_temp[4539] = [4516,57,4516,62]; + lineof_temp[932] = [1122,34,1126,91]; + lineof_temp[1621] = [1748,40,1748,42]; + lineof_temp[1732] = [1863,8,1863,8]; + lineof_temp[6794] = [6579,22,6579,59]; + lineof_temp[1184] = [1160,34,1160,44]; + lineof_temp[5075] = [4954,2,4954,45]; + lineof_temp[5296] = [5213,8,5213,8]; + lineof_temp[5877] = [5742,20,5742,46]; + lineof_temp[5257] = [5185,4,5185,14]; + lineof_temp[6160] = [6008,24,6010,61]; + lineof_temp[5959] = [5822,50,5822,72]; + lineof_temp[375] = [429,30,429,64]; + lineof_temp[4967] = [4893,12,4894,44]; + lineof_temp[5106] = [5070,36,5070,69]; + lineof_temp[3023] = [3066,36,3066,41]; + lineof_temp[2984] = [3076,36,3076,62]; + lineof_temp[5582] = [5436,4,5468,15]; + lineof_temp[1720] = [1885,28,1885,56]; + lineof_temp[1801] = [1958,18,1958,40]; + lineof_temp[1768] = [1918,23,1918,48]; + lineof_temp[1881] = [2046,42,2046,57]; + lineof_temp[3609] = [3656,46,3658,70]; + lineof_temp[6942] = [6715,8,6718,73]; + lineof_temp[4132] = [4151,46,4151,75]; + lineof_temp[3790] = [3839,22,3841,80]; + lineof_temp[3929] = [3955,14,3955,24]; + lineof_temp[1171] = [1167,40,1167,56]; + lineof_temp[4093] = [4110,12,4110,12]; + lineof_temp[6622] = [6396,31,6396,50]; + lineof_temp[3001] = [3095,38,3098,73]; + lineof_temp[6121] = [5937,8,5937,8]; + lineof_temp[685] = [749,14,749,32]; + lineof_temp[5440] = [5351,16,5351,68]; + lineof_temp[827] = [949,26,951,65]; + lineof_temp[3336] = [3398,30,3403,96]; + lineof_temp[6759] = [6459,12,6462,68]; + lineof_temp[6860] = [6644,14,6644,61]; + lineof_temp[4528] = [4530,34,4530,34]; + lineof_temp[6719] = [6467,28,6467,74]; + lineof_temp[2737] = [2829,14,2829,48]; + lineof_temp[4414] = [4285,28,4294,74]; + lineof_temp[5903] = [5772,22,5772,55]; + lineof_temp[6527] = [6312,22,6312,41]; + lineof_temp[667] = [720,4,721,26]; + lineof_temp[6115] = [5939,19,5939,49]; + lineof_temp[6718] = [6470,34,6470,63]; + lineof_temp[681] = [749,14,749,32]; + lineof_temp[3484] = [3527,24,3530,57]; + lineof_temp[5425] = [5336,16,5336,53]; + lineof_temp[3195] = [3250,6,3251,67]; + lineof_temp[5427] = [5334,59,5334,65]; + lineof_temp[2464] = [2592,12,2595,34]; + lineof_temp[4625] = [4636,20,4636,47]; + lineof_temp[6413] = [6213,30,6213,69]; + lineof_temp[907] = [1041,40,1041,65]; + lineof_temp[3209] = [3271,22,3272,55]; + lineof_temp[5688] = [5562,14,5562,42]; + lineof_temp[6574] = [6349,10,6349,22]; + lineof_temp[4107] = [4132,18,4132,37]; + lineof_temp[2502] = [2635,18,2641,62]; + lineof_temp[2677] = [2781,22,2781,36]; + lineof_temp[2672] = [2777,18,2777,34]; + lineof_temp[6869] = [6653,22,6653,59]; + lineof_temp[3138] = [3194,24,3194,24]; + lineof_temp[5573] = [5454,22,5454,29]; + lineof_temp[75] = [99,8,101,76]; + lineof_temp[1672] = [1826,10,1827,50]; + lineof_temp[5020] = [4999,39,5000,71]; + lineof_temp[4257] = [4249,4,4250,26]; + lineof_temp[800] = [923,6,923,23]; + lineof_temp[1371] = [1510,44,1513,77]; + lineof_temp[2995] = [3098,46,3098,70]; + lineof_temp[3159] = [3150,12,3150,24]; + lineof_temp[3944] = [3961,28,3961,44]; + lineof_temp[3967] = [3983,6,3983,21]; + lineof_temp[139] = [185,30,186,56]; + lineof_temp[2320] = [2451,4,2451,31]; + lineof_temp[7320] = [7070,61,7070,67]; + lineof_temp[4977] = [4948,6,4948,72]; + lineof_temp[7253] = [7006,26,7006,63]; + lineof_temp[2256] = [2388,4,2388,25]; + lineof_temp[2680] = [2779,51,2779,57]; + lineof_temp[2825] = [2875,23,2875,42]; + lineof_temp[6048] = [5916,16,5916,71]; + lineof_temp[1257] = [1389,48,1390,56]; + lineof_temp[2109] = [2269,14,2269,37]; + lineof_temp[4606] = [4612,24,4612,24]; + lineof_temp[53] = [85,6,85,17]; + lineof_temp[1248] = [1421,48,1421,69]; + lineof_temp[4378] = [4414,18,4418,76]; + lineof_temp[373] = [419,6,419,9]; + lineof_temp[7205] = [6963,20,6963,43]; + lineof_temp[5644] = [5524,12,5524,12]; + lineof_temp[3478] = [3530,38,3530,51]; + lineof_temp[5625] = [5489,2,5492,4]; + lineof_temp[1053] = [1275,53,1275,74]; + lineof_temp[3608] = [3651,48,3651,76]; + lineof_temp[5461] = [5368,14,5368,38]; + lineof_temp[4095] = [4106,4,4107,23]; + lineof_temp[1151] = [1193,52,1196,68]; + lineof_temp[6207] = [6043,18,6043,38]; + lineof_temp[461] = [527,14,527,26]; + lineof_temp[5599] = [5483,14,5483,24]; + lineof_temp[4145] = [4153,4,4153,29]; + lineof_temp[3414] = [3459,16,3462,92]; + lineof_temp[3492] = [3534,65,3534,70]; + lineof_temp[1542] = [1668,10,1669,50]; + lineof_temp[3769] = [3805,14,3807,69]; + lineof_temp[4391] = [4387,14,4387,14]; + lineof_temp[6705] = [6490,50,6492,73]; + lineof_temp[5971] = [5835,20,5835,48]; + lineof_temp[3884] = [3940,24,3940,43]; + lineof_temp[4425] = [4271,16,4295,24]; + lineof_temp[3858] = [3901,16,3901,52]; + lineof_temp[7330] = [7059,36,7079,44]; + lineof_temp[4760] = [4721,50,4721,56]; + lineof_temp[6363] = [6156,20,6156,72]; + lineof_temp[2552] = [2653,14,2653,36]; + lineof_temp[4646] = [4648,54,4648,59]; + lineof_temp[239] = [241,6,241,48]; + lineof_temp[2767] = [2859,40,2860,76]; + lineof_temp[806] = [959,6,966,54]; + lineof_temp[3480] = [3530,30,3530,53]; + lineof_temp[2105] = [2266,24,2268,59]; + lineof_temp[3643] = [3632,20,3632,53]; + lineof_temp[4309] = [4298,6,4298,33]; + lineof_temp[496] = [554,12,554,48]; + lineof_temp[1561] = [1686,16,1686,19]; + lineof_temp[3102] = [3178,12,3180,73]; + lineof_temp[3667] = [3720,26,3720,59]; + lineof_temp[5936] = [5756,10,5756,19]; + lineof_temp[7097] = [6882,54,6882,61]; + lineof_temp[7243] = [6996,20,6996,57]; + lineof_temp[1358] = [1505,49,1505,72]; + lineof_temp[5995] = [5864,16,5864,59]; + lineof_temp[863] = [990,26,991,59]; + lineof_temp[2522] = [2730,12,2740,66]; + lineof_temp[3066] = [3143,2,3144,77]; + lineof_temp[3811] = [3867,44,3867,67]; + lineof_temp[4363] = [4394,16,4394,40]; + lineof_temp[1845] = [2109,22,2109,73]; + lineof_temp[1406] = [1502,36,1545,47]; + lineof_temp[6452] = [6253,58,6253,76]; + lineof_temp[1397] = [1541,48,1542,74]; + lineof_temp[2925] = [3022,38,3022,40]; + lineof_temp[2968] = [3111,20,3116,28]; + lineof_temp[7006] = [6789,28,6789,75]; + lineof_temp[1982] = [2141,10,2142,50]; + lineof_temp[2343] = [2476,6,2476,38]; + lineof_temp[5242] = [5174,34,5174,58]; + lineof_temp[4434] = [4264,6,4264,30]; + lineof_temp[6296] = [6108,18,6108,55]; + lineof_temp[6591] = [6365,18,6365,67]; + lineof_temp[1381] = [1525,50,1529,62]; + lineof_temp[1999] = [2163,12,2163,45]; + lineof_temp[4736] = [4721,11,4721,39]; + lineof_temp[6020] = [5883,16,5887,107]; + lineof_temp[5304] = [5227,19,5227,46]; + lineof_temp[6889] = [6668,22,6668,59]; + lineof_temp[523] = [580,32,580,40]; + lineof_temp[4602] = [4610,28,4610,73]; + lineof_temp[6724] = [6511,26,6513,59]; + lineof_temp[3479] = [3530,38,3530,51]; + lineof_temp[4177] = [4174,4,4174,37]; + lineof_temp[2189] = [2329,10,2330,48]; + lineof_temp[4456] = [4466,24,4466,41]; + lineof_temp[774] = [798,32,798,71]; + lineof_temp[6280] = [6091,66,6091,74]; + lineof_temp[959] = [1082,36,1083,75]; + lineof_temp[2054] = [2207,20,2211,60]; + lineof_temp[4514] = [4545,52,4545,67]; + lineof_temp[4328] = [4372,29,4372,70]; + lineof_temp[6402] = [6183,10,6188,77]; + lineof_temp[7195] = [6947,18,6947,37]; + lineof_temp[553] = [618,22,618,71]; + lineof_temp[5027] = [5004,46,5004,60]; + lineof_temp[370] = [420,12,420,28]; + lineof_temp[985] = [1051,32,1052,51]; + lineof_temp[2926] = [3022,44,3022,44]; + lineof_temp[4601] = [4610,28,4610,73]; + lineof_temp[4104] = [4134,20,4134,48]; + lineof_temp[6800] = [6585,32,6585,70]; + lineof_temp[757] = [856,65,856,68]; + lineof_temp[1581] = [1709,20,1709,32]; + lineof_temp[7363] = [7093,43,7093,62]; + lineof_temp[6249] = [6071,16,6074,69]; + lineof_temp[1799] = [1956,10,1956,70]; + lineof_temp[3232] = [3254,8,3299,19]; + lineof_temp[419] = [491,26,491,59]; + lineof_temp[843] = [925,4,956,25]; + lineof_temp[1035] = [1151,28,1151,77]; + lineof_temp[4212] = [4202,43,4202,71]; + lineof_temp[5203] = [5145,25,5145,46]; + lineof_temp[4206] = [4195,12,4196,74]; + lineof_temp[644] = [704,16,704,52]; + lineof_temp[1833] = [1989,15,1989,32]; + lineof_temp[382] = [437,16,437,63]; + lineof_temp[3600] = [3642,52,3642,72]; + lineof_temp[2879] = [2969,16,2974,18]; + lineof_temp[3293] = [3326,10,3326,17]; + lineof_temp[5063] = [4962,23,4962,58]; + lineof_temp[6232] = [6061,14,6061,30]; + lineof_temp[100] = [127,4,127,25]; + lineof_temp[6055] = [5922,32,5923,50]; + lineof_temp[6900] = [6682,34,6683,53]; + lineof_temp[2316] = [2447,4,2447,42]; + lineof_temp[6090] = [5960,28,5960,54]; + lineof_temp[4005] = [4031,53,4031,67]; + lineof_temp[4286] = [4326,24,4331,53]; + lineof_temp[6761] = [6454,12,6454,54]; + lineof_temp[6675] = [6547,8,6547,55]; + lineof_temp[5261] = [5195,24,5195,52]; + lineof_temp[5613] = [5499,20,5499,31]; + lineof_temp[6015] = [5885,22,5885,71]; + lineof_temp[6316] = [6122,10,6122,57]; + lineof_temp[1966] = [2138,20,2139,74]; + lineof_temp[4016] = [4041,11,4041,25]; + lineof_temp[4503] = [4519,27,4519,61]; + lineof_temp[6526] = [6314,16,6314,65]; + lineof_temp[6829] = [6620,38,6620,75]; + lineof_temp[2397] = [2530,6,2530,32]; + lineof_temp[5856] = [5691,11,5691,41]; + lineof_temp[259] = [291,6,293,39]; + lineof_temp[2195] = [2309,42,2309,60]; + lineof_temp[7181] = [6950,23,6950,57]; + lineof_temp[3308] = [3371,24,3371,69]; + lineof_temp[3374] = [3431,32,3431,32]; + lineof_temp[6533] = [6302,6,6302,31]; + lineof_temp[19] = [26,6,26,22]; + lineof_temp[5447] = [5347,14,5348,39]; + lineof_temp[5518] = [5360,19,5360,48]; + lineof_temp[172] = [213,8,214,27]; + lineof_temp[497] = [556,16,556,70]; + lineof_temp[1046] = [1166,34,1166,56]; + lineof_temp[2309] = [2442,6,2442,31]; + lineof_temp[6839] = [6595,36,6595,41]; + lineof_temp[514] = [578,34,579,79]; + lineof_temp[1959] = [2125,12,2125,50]; + lineof_temp[3796] = [3829,14,3830,33]; + lineof_temp[5646] = [5520,4,5521,26]; + lineof_temp[6240] = [6069,22,6069,55]; + lineof_temp[3877] = [3930,24,3932,64]; + lineof_temp[60] = [70,29,70,45]; + lineof_temp[3722] = [3784,26,3784,38]; + lineof_temp[5199] = [5141,27,5141,39]; + lineof_temp[4779] = [4757,20,4757,20]; + lineof_temp[5593] = [5476,12,5476,49]; + lineof_temp[3983] = [4015,16,4018,77]; + lineof_temp[759] = [852,46,873,70]; + lineof_temp[3705] = [3751,68,3752,20]; + lineof_temp[3854] = [3899,21,3899,29]; + lineof_temp[5975] = [5850,20,5851,58]; + lineof_temp[1043] = [1163,44,1164,72]; + lineof_temp[1694] = [1857,10,1857,58]; + lineof_temp[741] = [830,36,830,73]; + lineof_temp[4408] = [4287,32,4288,70]; + lineof_temp[1617] = [1762,48,1762,48]; + lineof_temp[3207] = [3292,16,3298,77]; + lineof_temp[4218] = [4208,43,4208,74]; + lineof_temp[6350] = [6132,6,6132,31]; + lineof_temp[1186] = [1157,24,1158,45]; + lineof_temp[6617] = [6373,24,6373,29]; + lineof_temp[5846] = [5713,25,5713,30]; + lineof_temp[5909] = [5769,16,5773,102]; + lineof_temp[6415] = [6221,58,6221,76]; + lineof_temp[6915] = [6672,36,6672,41]; + lineof_temp[3080] = [3161,16,3165,59]; + lineof_temp[1445] = [1577,12,1577,67]; + lineof_temp[1734] = [1860,35,1860,61]; + lineof_temp[3776] = [3835,20,3837,34]; + lineof_temp[7199] = [6945,4,6945,41]; + lineof_temp[1235] = [1394,58,1394,71]; + lineof_temp[2535] = [2648,16,2648,32]; + lineof_temp[2387] = [2520,6,2520,39]; + lineof_temp[3794] = [3833,16,3848,75]; + lineof_temp[6914] = [6698,30,6699,48]; + lineof_temp[748] = [835,42,846,50]; + lineof_temp[1296] = [1436,4,1437,26]; + lineof_temp[6057] = [5925,25,5925,34]; + lineof_temp[6398] = [6187,16,6188,73]; + lineof_temp[1286] = [1138,8,1138,8]; + lineof_temp[1364] = [1505,46,1509,75]; + lineof_temp[1463] = [1592,10,1598,77]; + lineof_temp[3968] = [3982,4,3982,16]; + lineof_temp[1589] = [1705,16,1705,42]; + lineof_temp[2148] = [2254,12,2254,50]; + lineof_temp[7209] = [6964,14,6964,14]; + lineof_temp[3224] = [3274,22,3274,22]; + lineof_temp[4102] = [4132,18,4132,37]; + lineof_temp[903] = [1033,26,1034,37]; + lineof_temp[2750] = [2808,2,2829,56]; + lineof_temp[325] = [350,6,350,24]; + lineof_temp[379] = [429,2,429,67]; + lineof_temp[5114] = [5067,32,5067,39]; + lineof_temp[440] = [468,10,468,10]; + lineof_temp[3934] = [3955,10,3956,50]; + lineof_temp[4658] = [4666,18,4666,70]; + lineof_temp[2099] = [2254,12,2254,50]; + lineof_temp[4667] = [4659,4,4660,48]; + lineof_temp[5031] = [5001,41,5005,69]; + lineof_temp[1709] = [1870,18,1870,44]; + lineof_temp[3450] = [3487,47,3487,50]; + lineof_temp[6774] = [6553,12,6556,80]; + lineof_temp[3809] = [3867,52,3867,65]; + lineof_temp[7360] = [7091,6,7092,17]; + lineof_temp[1850] = [2007,31,2007,63]; + lineof_temp[2374] = [2505,4,2505,29]; + lineof_temp[5913] = [5785,28,5785,54]; + lineof_temp[970] = [1088,36,1093,84]; + lineof_temp[3455] = [3485,22,3485,22]; + lineof_temp[6697] = [6478,42,6480,66]; + lineof_temp[7166] = [6897,60,6897,68]; + lineof_temp[3550] = [3595,52,3595,65]; + lineof_temp[1108] = [1265,45,1265,53]; + lineof_temp[2739] = [2821,19,2821,66]; + lineof_temp[2759] = [2845,28,2845,75]; + lineof_temp[6475] = [6266,22,6271,79]; + lineof_temp[254] = [292,31,292,57]; + lineof_temp[817] = [954,20,955,72]; + lineof_temp[1520] = [1642,8,1642,8]; + lineof_temp[2080] = [2222,16,2225,64]; + lineof_temp[4634] = [4627,10,4627,19]; + lineof_temp[207] = [250,13,250,35]; + lineof_temp[456] = [513,18,513,31]; + lineof_temp[4571] = [4588,30,4590,44]; + lineof_temp[2422] = [2553,4,2553,29]; + lineof_temp[7131] = [6917,63,6917,74]; + lineof_temp[7283] = [7024,6,7024,53]; + lineof_temp[3236] = [3248,2,3299,23]; + lineof_temp[6334] = [6136,18,6136,55]; + lineof_temp[2505] = [2633,14,2633,27]; + lineof_temp[2657] = [2766,12,2769,16]; + lineof_temp[3585] = [3578,35,3578,40]; + lineof_temp[5611] = [5497,15,5497,43]; + lineof_temp[2396] = [2527,4,2527,30]; + lineof_temp[3537] = [3565,20,3565,26]; + lineof_temp[6669] = [6414,10,6414,35]; + lineof_temp[625] = [688,18,690,77]; + lineof_temp[2990] = [3097,44,3097,66]; + lineof_temp[1009] = [1035,24,1035,56]; + lineof_temp[4934] = [4923,46,4924,73]; + lineof_temp[166] = [164,12,165,31]; + lineof_temp[6904] = [6688,34,6689,52]; + lineof_temp[1236] = [1415,52,1416,70]; + lineof_temp[1521] = [1640,2,1645,76]; + lineof_temp[3911] = [3914,12,3914,30]; + lineof_temp[1362] = [1506,49,1509,74]; + lineof_temp[6930] = [6661,10,6710,21]; + lineof_temp[1696] = [1857,2,1857,60]; + lineof_temp[2453] = [2590,20,2590,36]; + lineof_temp[5836] = [5708,18,5708,72]; + lineof_temp[3188] = [3234,10,3237,36]; + lineof_temp[6999] = [6785,34,6785,71]; + lineof_temp[6349] = [6133,14,6133,19]; + lineof_temp[3715] = [3783,30,3783,70]; + lineof_temp[5001] = [4976,38,4976,73]; + lineof_temp[2993] = [3097,42,3097,67]; + lineof_temp[3924] = [3878,2,3880,4]; + lineof_temp[4069] = [4071,8,4075,9]; + lineof_temp[4082] = [4113,24,4113,61]; + lineof_temp[1010] = [1033,26,1034,37]; + lineof_temp[5362] = [5273,22,5273,23]; + lineof_temp[3892] = [3930,24,3932,64]; + lineof_temp[6217] = [6051,18,6051,55]; + lineof_temp[1918] = [2098,46,2098,58]; + lineof_temp[3058] = [3135,42,3135,64]; + lineof_temp[56] = [88,14,88,37]; + lineof_temp[1580] = [1709,35,1709,62]; + lineof_temp[5445] = [5351,16,5351,68]; + lineof_temp[422] = [492,24,493,43]; + lineof_temp[1832] = [1989,15,1989,32]; + lineof_temp[5589] = [5478,22,5478,33]; + lineof_temp[6471] = [6271,54,6271,72]; + lineof_temp[6563] = [6317,4,6317,56]; + lineof_temp[772] = [826,30,827,58]; + lineof_temp[3864] = [3904,10,3906,74]; + lineof_temp[4059] = [4089,16,4089,65]; + lineof_temp[6599] = [6375,20,6375,72]; + lineof_temp[2806] = [2888,38,2888,71]; + lineof_temp[2905] = [3002,19,3002,27]; + lineof_temp[3706] = [3753,16,3753,16]; + lineof_temp[6953] = [6733,22,6733,59]; + lineof_temp[849] = [975,4,977,47]; + lineof_temp[2165] = [2311,12,2311,50]; + lineof_temp[3872] = [3920,18,3921,58]; + lineof_temp[4922] = [4885,10,4887,76]; + lineof_temp[7053] = [6836,30,6836,63]; + lineof_temp[2697] = [2785,6,2788,70]; + lineof_temp[6095] = [5955,20,5956,38]; + lineof_temp[6924] = [6666,20,6707,26]; + lineof_temp[828] = [948,24,951,67]; + lineof_temp[2390] = [2521,4,2521,46]; + lineof_temp[5722] = [5592,30,5592,37]; + lineof_temp[2234] = [2340,46,2340,67]; + lineof_temp[3106] = [3183,18,3183,61]; + lineof_temp[4916] = [4871,10,4873,74]; + lineof_temp[7172] = [6892,12,6944,33]; + lineof_temp[78] = [104,15,104,31]; + lineof_temp[1014] = [1011,18,1012,36]; + lineof_temp[3844] = [3892,14,3892,25]; + lineof_temp[4659] = [4665,57,4665,73]; + lineof_temp[6010] = [5878,16,5878,62]; + lineof_temp[2949] = [3047,18,3048,46]; + lineof_temp[3685] = [3706,66,3706,72]; + lineof_temp[4033] = [4035,2,4039,3]; + lineof_temp[4340] = [4349,22,4349,28]; + lineof_temp[6196] = [6030,12,6031,31]; + lineof_temp[696] = [756,43,756,49]; + lineof_temp[5260] = [5195,24,5195,52]; + lineof_temp[5358] = [5276,20,5278,43]; + lineof_temp[5709] = [5584,15,5584,42]; + lineof_temp[3010] = [3089,40,3090,70]; + lineof_temp[4705] = [4688,11,4688,39]; + lineof_temp[5230] = [5133,10,5158,21]; + lineof_temp[1968] = [2136,31,2136,72]; + lineof_temp[3762] = [3823,26,3823,26]; + lineof_temp[6322] = [6128,30,6128,71]; + lineof_temp[1389] = [1536,54,1538,63]; + lineof_temp[2402] = [2533,4,2533,46]; + lineof_temp[2705] = [2791,6,2791,31]; + lineof_temp[3746] = [3805,23,3807,68]; + lineof_temp[6624] = [6400,32,6401,39]; + lineof_temp[1568] = [1675,37,1675,64]; + lineof_temp[5113] = [5071,26,5071,38]; + lineof_temp[6538] = [6320,18,6320,36]; + lineof_temp[6603] = [6377,20,6377,72]; + lineof_temp[2654] = [2768,18,2768,77]; + lineof_temp[1752] = [1924,20,1924,35]; + lineof_temp[1262] = [1383,40,1384,58]; + lineof_temp[6372] = [6162,14,6162,30]; + lineof_temp[202] = [247,11,247,33]; + lineof_temp[2022] = [2181,16,2181,72]; + lineof_temp[7145] = [6926,42,6927,62]; + lineof_temp[9] = [16,6,16,77]; + lineof_temp[1021] = [981,61,981,66]; + lineof_temp[1499] = [1626,10,1626,41]; + lineof_temp[3688] = [3703,4,3704,27]; + lineof_temp[220] = [262,20,262,50]; + lineof_temp[5683] = [5559,14,5559,41]; + lineof_temp[1976] = [2132,18,2132,18]; + lineof_temp[312] = [325,8,326,28]; + lineof_temp[1860] = [2026,48,2026,60]; + lineof_temp[2528] = [2745,27,2745,29]; + lineof_temp[4903] = [4859,6,4860,17]; + lineof_temp[735] = [818,38,823,107]; + lineof_temp[1183] = [1334,28,1335,52]; + lineof_temp[2443] = [2430,10,2430,19]; + lineof_temp[3187] = [3234,10,3237,36]; + lineof_temp[4255] = [4251,14,4251,28]; + lineof_temp[6868] = [6653,22,6653,59]; + lineof_temp[2319] = [2452,6,2452,24]; + lineof_temp[4680] = [4680,59,4680,64]; + lineof_temp[5348] = [5260,14,5264,43]; + lineof_temp[1081] = [1315,66,1318,74]; + lineof_temp[3682] = [3724,14,3725,41]; + lineof_temp[7129] = [6899,28,6899,41]; + lineof_temp[304] = [324,14,324,40]; + lineof_temp[582] = [650,30,650,51]; + lineof_temp[2894] = [2941,2,2942,37]; + lineof_temp[5874] = [5736,18,5739,105]; + lineof_temp[3821] = [3851,16,3852,55]; + lineof_temp[5620] = [5501,14,5501,24]; + lineof_temp[1996] = [2151,8,2151,8]; + lineof_temp[2371] = [2504,6,2504,37]; + lineof_temp[7255] = [7006,18,7006,65]; + lineof_temp[773] = [801,36,801,46]; + lineof_temp[856] = [1009,30,1009,52]; + lineof_temp[1195] = [1156,30,1156,38]; + lineof_temp[4834] = [4800,18,4800,58]; + lineof_temp[1804] = [1957,8,1957,43]; + lineof_temp[3453] = [3483,26,3483,67]; + lineof_temp[5839] = [5712,27,5712,68]; + lineof_temp[6022] = [5893,24,5893,71]; + lineof_temp[7313] = [7072,71,7074,72]; + lineof_temp[7198] = [6946,6,6956,72]; + lineof_temp[7287] = [7031,12,7031,68]; + lineof_temp[990] = [1062,43,1062,55]; + lineof_temp[3709] = [3742,14,3742,19]; + lineof_temp[7236] = [6981,16,6981,16]; + lineof_temp[809] = [924,19,924,32]; + lineof_temp[3446] = [3491,28,3492,54]; + lineof_temp[5992] = [5802,10,5802,19]; + lineof_temp[3148] = [3184,16,3184,64]; + lineof_temp[5172] = [5116,12,5117,33]; + lineof_temp[1790] = [1951,12,1951,27]; + lineof_temp[1914] = [2078,30,2079,56]; + lineof_temp[6049] = [5916,16,5916,71]; + lineof_temp[2340] = [2471,4,2471,41]; + lineof_temp[5993] = [5801,24,5801,49]; + lineof_temp[6410] = [6202,12,6202,33]; + lineof_temp[7214] = [6957,4,6957,31]; + lineof_temp[4949] = [4929,28,4929,53]; + lineof_temp[4435] = [4263,19,4263,41]; + lineof_temp[5891] = [5721,10,5721,19]; + lineof_temp[3628] = [3654,42,3687,53]; + lineof_temp[4726] = [4712,61,4712,67]; + lineof_temp[138] = [186,33,186,55]; + lineof_temp[4737] = [4721,11,4721,39]; + lineof_temp[5039] = [5009,38,5014,98]; + lineof_temp[7110] = [6862,24,6862,24]; + lineof_temp[5788] = [5647,4,5647,29]; + lineof_temp[6791] = [6576,22,6576,59]; + lineof_temp[3385] = [3437,20,3437,53]; + lineof_temp[3505] = [3503,16,3503,42]; + lineof_temp[4409] = [4287,32,4288,70]; + lineof_temp[2023] = [2182,38,2182,52]; + lineof_temp[5032] = [4999,38,5005,70]; + lineof_temp[255] = [293,10,293,36]; + lineof_temp[6204] = [6036,12,6037,31]; + lineof_temp[7090] = [6874,34,6874,47]; + lineof_temp[2633] = [2715,12,2724,60]; + lineof_temp[2839] = [2918,21,2918,26]; + lineof_temp[963] = [1078,38,1079,50]; + lineof_temp[7284] = [7023,4,7023,41]; + lineof_temp[1517] = [1643,8,1645,72]; + lineof_temp[3733] = [3770,19,3770,21]; + lineof_temp[3852] = [3882,4,3882,26]; + lineof_temp[5806] = [5669,54,5669,60]; + lineof_temp[536] = [566,21,566,56]; + lineof_temp[1974] = [2131,22,2131,48]; + lineof_temp[2252] = [2396,12,2396,37]; + lineof_temp[3788] = [3847,44,3847,44]; + lineof_temp[4783] = [4763,20,4763,69]; + lineof_temp[4360] = [4396,60,4396,65]; + lineof_temp[5451] = [5343,12,5344,37]; + lineof_temp[5825] = [5684,4,5685,57]; + lineof_temp[586] = [667,44,668,62]; + lineof_temp[2150] = [2255,8,2255,8]; + lineof_temp[4502] = [4519,27,4519,61]; + lineof_temp[1189] = [1348,32,1349,39]; + lineof_temp[4356] = [4402,48,4402,63]; + lineof_temp[1753] = [1924,20,1927,96]; + lineof_temp[4866] = [4823,26,4823,38]; + lineof_temp[5944] = [5804,6,5807,67]; + lineof_temp[516] = [585,40,585,73]; + lineof_temp[4462] = [4457,16,4457,16]; + lineof_temp[1134] = [1243,64,1250,70]; + lineof_temp[1126] = [1204,62,1204,79]; + lineof_temp[6198] = [6035,22,6035,42]; + lineof_temp[7050] = [6847,22,6849,58]; + lineof_temp[5040] = [5008,36,5014,100]; + lineof_temp[6854] = [6584,10,6635,21]; + lineof_temp[2014] = [2170,10,2170,67]; + lineof_temp[6338] = [6140,20,6140,54]; + lineof_temp[6777] = [6549,4,6549,29]; + lineof_temp[7046] = [6825,23,6825,59]; + lineof_temp[198] = [241,6,241,48]; + lineof_temp[1952] = [2119,8,2120,75]; + lineof_temp[6662] = [6425,32,6425,60]; + lineof_temp[290] = [313,12,314,41]; + lineof_temp[742] = [837,46,838,74]; + lineof_temp[3887] = [3938,24,3938,65]; + lineof_temp[5015] = [4992,32,4992,72]; + lineof_temp[597] = [658,43,658,52]; + lineof_temp[1111] = [1171,45,1171,72]; + lineof_temp[2034] = [2234,16,2234,31]; + lineof_temp[4154] = [4162,14,4162,61]; + lineof_temp[6046] = [5914,6,5914,17]; + lineof_temp[2006] = [2159,4,2159,30]; + lineof_temp[2305] = [2438,6,2438,36]; + lineof_temp[4109] = [4133,12,4133,12]; + lineof_temp[6448] = [6242,26,6242,45]; + lineof_temp[1196] = [1154,20,1155,41]; + lineof_temp[1606] = [1740,33,1740,68]; + lineof_temp[3826] = [3802,19,3802,24]; + lineof_temp[5126] = [5052,50,5052,55]; + lineof_temp[451] = [517,14,517,57]; + lineof_temp[4575] = [4590,55,4590,60]; + lineof_temp[43] = [57,10,57,19]; + lineof_temp[5554] = [5452,19,5453,44]; + lineof_temp[2432] = [2564,4,2564,36]; + lineof_temp[2534] = [2728,8,2747,79]; + lineof_temp[4956] = [4932,30,4937,97]; + lineof_temp[1128] = [1218,58,1218,72]; + lineof_temp[3073] = [3159,20,3159,54]; + lineof_temp[1269] = [1368,30,1429,41]; + lineof_temp[3194] = [3251,8,3251,59]; + lineof_temp[6710] = [6478,42,6480,66]; + lineof_temp[4742] = [4731,28,4731,48]; + lineof_temp[5896] = [5759,16,5759,59]; + lineof_temp[3612] = [3662,60,3662,74]; + lineof_temp[2428] = [2560,4,2560,31]; + lineof_temp[7075] = [6820,4,6820,46]; + lineof_temp[2865] = [2977,20,2979,63]; + lineof_temp[5560] = [5458,27,5458,56]; + lineof_temp[219] = [262,20,262,50]; + lineof_temp[3281] = [3344,33,3344,33]; + lineof_temp[4278] = [4327,36,4327,52]; + lineof_temp[624] = [689,20,690,75]; + lineof_temp[799] = [923,6,923,23]; + lineof_temp[2287] = [2424,57,2424,67]; + lineof_temp[5274] = [5199,24,5199,24]; + lineof_temp[789] = [793,67,793,72]; + lineof_temp[4722] = [4714,26,4714,58]; + lineof_temp[5064] = [4962,69,4963,20]; + lineof_temp[1730] = [1862,12,1862,50]; + lineof_temp[5438] = [5347,14,5348,39]; + lineof_temp[6635] = [6395,22,6405,59]; + lineof_temp[1532] = [1648,21,1648,42]; + lineof_temp[3447] = [3490,28,3490,56]; + lineof_temp[3781] = [3844,26,3846,71]; + lineof_temp[5159] = [5097,8,5104,49]; + lineof_temp[6252] = [6070,16,6070,16]; + lineof_temp[3170] = [3149,4,3149,24]; + lineof_temp[5413] = [5325,11,5325,29]; + lineof_temp[6552] = [6328,24,6328,24]; + lineof_temp[2690] = [2754,6,2755,52]; + lineof_temp[4574] = [4588,30,4590,44]; + lineof_temp[2047] = [2187,18,2188,50]; + lineof_temp[3774] = [3836,22,3836,74]; + lineof_temp[121] = [160,14,160,29]; + lineof_temp[2639] = [2629,6,2645,8]; + lineof_temp[2299] = [2432,6,2432,24]; + lineof_temp[548] = [604,12,604,50]; + lineof_temp[2935] = [3005,12,3005,12]; + lineof_temp[5125] = [5052,11,5052,39]; + lineof_temp[7139] = [6932,48,6936,61]; + lineof_temp[3541] = [3568,21,3568,27]; + lineof_temp[4479] = [4496,24,4496,41]; + lineof_temp[6632] = [6396,31,6396,50]; + lineof_temp[4474] = [4469,10,4481,47]; + lineof_temp[5728] = [5595,14,5595,38]; + lineof_temp[579] = [647,25,647,53]; + lineof_temp[1121] = [1198,56,1199,85]; + lineof_temp[3654] = [3549,12,3549,57]; + lineof_temp[6720] = [6468,37,6468,43]; + lineof_temp[5402] = [5316,14,5318,56]; + lineof_temp[5940] = [5807,12,5807,63]; + lineof_temp[5813] = [5663,19,5663,48]; + lineof_temp[628] = [686,14,691,18]; + lineof_temp[2142] = [2274,22,2274,50]; + lineof_temp[3491] = [3534,35,3534,54]; + lineof_temp[5811] = [5673,14,5674,75]; + lineof_temp[449] = [518,20,518,59]; + lineof_temp[6690] = [6467,28,6467,74]; + lineof_temp[7099] = [6881,32,6886,63]; + lineof_temp[7186] = [6956,24,6956,60]; + lineof_temp[4531] = [4523,64,4523,72]; + lineof_temp[1028] = [1141,20,1141,46]; + lineof_temp[2743] = [2819,8,2819,34]; + lineof_temp[3255] = [3311,10,3317,50]; + lineof_temp[1661] = [1809,18,1809,50]; + lineof_temp[3959] = [3974,8,3974,37]; + lineof_temp[4295] = [4332,22,4333,53]; + lineof_temp[2987] = [3096,41,3096,68]; + lineof_temp[4075] = [4066,28,4066,66]; + lineof_temp[4887] = [4839,12,4839,74]; + lineof_temp[5592] = [5477,16,5477,17]; + lineof_temp[2332] = [2463,4,2463,44]; + lineof_temp[6871] = [6651,12,6652,30]; + lineof_temp[1599] = [1730,20,1730,58]; + lineof_temp[2962] = [3115,65,3115,75]; + lineof_temp[68] = [101,15,101,40]; + lineof_temp[3172] = [3149,4,3220,26]; + lineof_temp[4384] = [4421,20,4424,68]; + lineof_temp[808] = [924,19,924,32]; + lineof_temp[4232] = [4224,6,4224,22]; + lineof_temp[5475] = [5388,22,5388,55]; + lineof_temp[1194] = [1344,24,1345,45]; + lineof_temp[1270] = [1365,33,1365,71]; + lineof_temp[105] = [134,14,134,35]; + lineof_temp[6161] = [6007,22,6010,62]; + lineof_temp[4211] = [4191,4,4191,34]; + lineof_temp[4577] = [4586,26,4595,75]; + lineof_temp[6399] = [6184,20,6184,63]; + lineof_temp[3840] = [3882,14,3882,25]; + lineof_temp[2361] = [2494,6,2494,26]; + lineof_temp[4354] = [4396,30,4396,49]; + lineof_temp[2298] = [2410,26,2410,55]; + lineof_temp[4135] = [4151,8,4152,23]; + lineof_temp[357] = [399,8,403,71]; + lineof_temp[764] = [874,44,875,63]; + lineof_temp[6532] = [6303,14,6303,19]; + lineof_temp[297] = [318,12,319,41]; + lineof_temp[1510] = [1612,16,1612,35]; + lineof_temp[3572] = [3598,44,3622,54]; + lineof_temp[3742] = [3801,10,3801,71]; + lineof_temp[7045] = [6822,18,6822,37]; + lineof_temp[615] = [684,24,684,49]; + lineof_temp[1883] = [2046,42,2052,108]; + lineof_temp[3589] = [3570,26,3570,31]; + lineof_temp[3778] = [3839,31,3841,79]; + lineof_temp[2005] = [2160,6,2164,56]; + lineof_temp[3358] = [3367,18,3367,75]; + lineof_temp[5976] = [5853,34,5853,67]; + lineof_temp[6068] = [5918,10,5918,10]; + lineof_temp[2499] = [2622,16,2625,26]; + lineof_temp[4213] = [4202,43,4202,71]; + lineof_temp[5439] = [5351,16,5351,68]; + lineof_temp[6262] = [6080,17,6080,33]; + lineof_temp[6463] = [6241,14,6254,32]; + lineof_temp[1454] = [1588,25,1588,43]; + lineof_temp[3561] = [3615,60,3616,76]; + lineof_temp[5190] = [5160,10,5160,47]; + lineof_temp[5323] = [5227,19,5227,46]; + lineof_temp[4585] = [4575,14,4596,22]; + lineof_temp[5244] = [5176,24,5176,62]; + lineof_temp[1722] = [1885,20,1885,58]; + lineof_temp[2858] = [2960,18,2960,58]; + lineof_temp[3334] = [3399,32,3403,94]; + lineof_temp[4914] = [4865,23,4865,37]; + lineof_temp[2524] = [2744,24,2744,63]; + lineof_temp[2176] = [2318,16,2318,31]; + lineof_temp[2127] = [2295,34,2295,46]; + lineof_temp[4071] = [4068,11,4068,48]; + lineof_temp[4498] = [4513,12,4513,65]; + lineof_temp[4712] = [4704,6,4704,47]; + lineof_temp[4985] = [4959,17,4959,41]; + lineof_temp[754] = [861,62,861,65]; + lineof_temp[1427] = [1441,6,1456,8]; + lineof_temp[6872] = [6656,22,6656,59]; + lineof_temp[2629] = [2724,31,2724,56]; + lineof_temp[499] = [556,8,556,72]; + lineof_temp[1314] = [1450,22,1450,22]; + lineof_temp[3700] = [3761,22,3762,49]; + lineof_temp[587] = [676,54,676,59]; + lineof_temp[1378] = [1526,52,1529,61]; + lineof_temp[3351] = [3409,22,3409,47]; + lineof_temp[4569] = [4580,24,4583,70]; + lineof_temp[511] = [596,20,596,45]; + lineof_temp[1130] = [1228,58,1230,70]; + lineof_temp[3960] = [3973,30,3973,46]; + lineof_temp[4362] = [4395,18,4402,73]; + lineof_temp[5092] = [5036,50,5036,56]; + lineof_temp[4117] = [4143,28,4143,43]; + lineof_temp[5834] = [5695,6,5704,72]; + lineof_temp[7126] = [6897,27,6897,49]; + lineof_temp[7158] = [6902,30,6905,43]; + lineof_temp[289] = [313,12,314,41]; + lineof_temp[2133] = [2283,20,2288,22]; + lineof_temp[2888] = [2957,15,2957,21]; + lineof_temp[5134] = [5086,20,5086,52]; + lineof_temp[3935] = [3954,8,3956,52]; + lineof_temp[6682] = [6438,12,6442,60]; + lineof_temp[7170] = [6893,68,6894,20]; + lineof_temp[3013] = [3092,64,3092,74]; + lineof_temp[3230] = [3256,21,3256,23]; + lineof_temp[2202] = [2361,26,2361,59]; + lineof_temp[5536] = [5425,4,5425,16]; + lineof_temp[5782] = [5644,8,5644,20]; + lineof_temp[6755] = [6497,12,6543,30]; + lineof_temp[1575] = [1717,16,1718,55]; + lineof_temp[1885] = [2043,38,2044,69]; + lineof_temp[4809] = [4773,21,4773,46]; + lineof_temp[4954] = [4933,32,4937,95]; + lineof_temp[1302] = [1449,27,1449,57]; + lineof_temp[5805] = [5669,25,5669,43]; + lineof_temp[2183] = [2333,18,2333,67]; + lineof_temp[6973] = [6793,18,6793,65]; + lineof_temp[2024] = [2182,38,2182,52]; + lineof_temp[2545] = [2663,43,2663,58]; + lineof_temp[2681] = [2780,14,2780,14]; + lineof_temp[4657] = [4665,37,4665,55]; + lineof_temp[1851] = [2015,36,2016,62]; + lineof_temp[5325] = [5228,16,5228,16]; + lineof_temp[215] = [256,16,256,42]; + lineof_temp[2802] = [2879,12,2879,50]; + lineof_temp[3869] = [3912,14,3913,52]; + lineof_temp[4355] = [4396,30,4396,49]; + lineof_temp[5091] = [5036,11,5036,39]; + lineof_temp[7362] = [7093,43,7093,62]; + lineof_temp[1594] = [1698,8,1698,8]; + lineof_temp[2728] = [2817,16,2817,44]; + lineof_temp[5243] = [5174,34,5174,58]; + lineof_temp[5906] = [5770,18,5770,33]; + lineof_temp[65] = [100,12,100,33]; + lineof_temp[600] = [653,28,654,48]; + lineof_temp[3163] = [3153,18,3153,29]; + lineof_temp[6555] = [6323,55,6323,60]; + lineof_temp[837] = [930,67,931,29]; + lineof_temp[3388] = [3435,16,3435,31]; + lineof_temp[4318] = [4351,18,4355,73]; + lineof_temp[5197] = [5142,26,5142,67]; + lineof_temp[6392] = [6180,18,6180,55]; + lineof_temp[816] = [954,20,955,72]; + lineof_temp[3646] = [3631,26,3631,31]; + lineof_temp[3725] = [3777,31,3777,33]; + lineof_temp[4210] = [4192,6,4196,78]; + lineof_temp[4842] = [4813,30,4814,57]; + lineof_temp[2914] = [3009,18,3009,76]; + lineof_temp[4301] = [4314,24,4314,36]; + lineof_temp[6164] = [6000,18,6000,36]; + lineof_temp[539] = [565,12,597,23]; + lineof_temp[5005] = [4972,39,4972,55]; + lineof_temp[6288] = [6081,14,6081,19]; + lineof_temp[7331] = [7056,34,7056,77]; + lineof_temp[1479] = [1604,8,1607,57]; + lineof_temp[1714] = [1865,10,1866,29]; + lineof_temp[3052] = [3130,2,3130,66]; + lineof_temp[4917] = [4870,8,4870,30]; + lineof_temp[5223] = [5146,22,5147,47]; + lineof_temp[3144] = [3187,16,3187,51]; + lineof_temp[6097] = [5964,34,5964,53]; + lineof_temp[6991] = [6770,34,6771,52]; + lineof_temp[593] = [664,49,664,54]; + lineof_temp[2782] = [2845,28,2845,75]; + lineof_temp[6811] = [6591,22,6591,59]; + lineof_temp[841] = [927,17,927,25]; + lineof_temp[1355] = [1492,38,1495,71]; + lineof_temp[1798] = [1956,18,1956,68]; + lineof_temp[7338] = [7051,24,7079,52]; + lineof_temp[6858] = [6644,22,6644,59]; + lineof_temp[3426] = [3360,4,3361,60]; + lineof_temp[1369] = [1511,46,1513,75]; + lineof_temp[2437] = [2573,6,2573,39]; + lineof_temp[2546] = [2663,43,2663,58]; + lineof_temp[3665] = [3713,20,3715,72]; + lineof_temp[5771] = [5639,12,5639,54]; + lineof_temp[1038] = [1150,24,1153,82]; + lineof_temp[1163] = [1172,49,1172,59]; + lineof_temp[1886] = [2057,44,2058,67]; + lineof_temp[387] = [436,4,438,41]; + lineof_temp[2159] = [2303,12,2303,72]; + lineof_temp[3610] = [3656,46,3658,70]; + lineof_temp[3469] = [3524,38,3524,51]; + lineof_temp[4344] = [4346,8,4383,18]; + lineof_temp[2070] = [2197,22,2200,58]; + lineof_temp[3434] = [3489,36,3489,68]; + lineof_temp[4337] = [4367,20,4369,80]; + lineof_temp[5966] = [5835,20,5835,48]; + lineof_temp[721] = [798,32,798,71]; + lineof_temp[2626] = [2717,16,2722,65]; + lineof_temp[4845] = [4811,26,4819,75]; + lineof_temp[5606] = [5491,6,5491,71]; + lineof_temp[4838] = [4808,24,4809,49]; + lineof_temp[6067] = [5917,17,5917,27]; + lineof_temp[6137] = [5987,10,5988,76]; + lineof_temp[6442] = [6226,26,6226,45]; + lineof_temp[6838] = [6623,30,6624,48]; + lineof_temp[5890] = [5728,4,5729,44]; + lineof_temp[5248] = [5174,12,5176,66]; + lineof_temp[4839] = [4813,30,4814,57]; + lineof_temp[4366] = [4412,34,4412,63]; + lineof_temp[1632] = [1738,24,1738,24]; + lineof_temp[5486] = [5397,32,5397,64]; + lineof_temp[491] = [523,10,523,15]; + lineof_temp[1701] = [1862,12,1862,50]; + lineof_temp[1741] = [1898,6,1902,56]; + lineof_temp[6883] = [6664,20,6664,44]; + lineof_temp[6604] = [6376,18,6376,39]; + lineof_temp[4052] = [4068,11,4068,48]; + lineof_temp[2219] = [2347,12,2363,23]; + lineof_temp[3785] = [3848,44,3848,67]; + lineof_temp[783] = [905,26,913,80]; + lineof_temp[3893] = [3928,28,3928,56]; + lineof_temp[7117] = [6854,48,6854,53]; + lineof_temp[3486] = [3534,35,3534,54]; + lineof_temp[6356] = [6152,10,6152,57]; + lineof_temp[6741] = [6527,28,6529,71]; + lineof_temp[6026] = [5898,22,5899,72]; + lineof_temp[6525] = [6314,24,6314,63]; + lineof_temp[6792] = [6576,14,6576,61]; + lineof_temp[277] = [309,35,309,61]; + lineof_temp[1651] = [1800,20,1803,75]; + lineof_temp[3524] = [3559,22,3559,74]; + lineof_temp[3906] = [3918,22,3918,50]; + lineof_temp[4663] = [4662,19,4662,44]; + lineof_temp[3931] = [3956,14,3956,48]; + lineof_temp[89] = [96,6,96,23]; + lineof_temp[291] = [312,10,314,43]; + lineof_temp[1061] = [1330,46,1331,77]; + lineof_temp[79] = [104,49,104,69]; + lineof_temp[470] = [542,36,542,49]; + lineof_temp[833] = [938,18,943,19]; + lineof_temp[3829] = [3797,4,3798,26]; + lineof_temp[1669] = [1828,20,1828,59]; + lineof_temp[4284] = [4327,63,4327,68]; + lineof_temp[6449] = [6245,30,6245,69]; + lineof_temp[666] = [722,6,731,14]; + lineof_temp[715] = [761,16,761,38]; + lineof_temp[1322] = [1444,14,1444,14]; + lineof_temp[2899] = [2998,14,2998,25]; + lineof_temp[1718] = [1888,22,1889,57]; + lineof_temp[6757] = [6464,12,6465,61]; + lineof_temp[6968] = [6747,14,6747,51]; + lineof_temp[590] = [674,44,675,63]; + lineof_temp[2735] = [2824,31,2824,42]; + lineof_temp[3362] = [3365,8,3365,35]; + lineof_temp[6241] = [6072,25,6072,61]; + lineof_temp[3631] = [3653,42,3653,42]; + lineof_temp[5640] = [5523,15,5523,45]; + lineof_temp[1547] = [1657,2,1672,12]; + lineof_temp[4352] = [4393,18,4393,47]; + lineof_temp[4728] = [4711,12,4714,64]; + lineof_temp[2442] = [2576,4,2576,29]; + lineof_temp[2903] = [3001,14,3001,56]; + lineof_temp[3307] = [3371,24,3371,69]; + lineof_temp[3309] = [3375,32,3375,47]; + lineof_temp[3698] = [3755,18,3756,41]; + lineof_temp[6218] = [6051,10,6051,57]; + lineof_temp[1065] = [1283,57,1284,74]; + lineof_temp[3122] = [3209,34,3214,42]; + lineof_temp[4598] = [4604,15,4604,45]; + lineof_temp[6824] = [6605,34,6606,53]; + lineof_temp[6958] = [6734,12,6735,30]; + lineof_temp[672] = [743,45,743,73]; + lineof_temp[4447] = [4450,39,4450,67]; + lineof_temp[4938] = [4920,42,4926,104]; + lineof_temp[3048] = [3123,12,3123,51]; + lineof_temp[6101] = [5965,28,5965,28]; + lineof_temp[3243] = [3307,6,3308,42]; + lineof_temp[5057] = [4993,28,4994,45]; + lineof_temp[5523] = [5412,49,5412,55]; + lineof_temp[3901] = [3922,24,3922,52]; + lineof_temp[3984] = [4011,14,4012,35]; + lineof_temp[1087] = [1298,64,1299,76]; + lineof_temp[4933] = [4914,38,4915,69]; + lineof_temp[5466] = [5363,6,5364,27]; + lineof_temp[6592] = [6364,14,6364,29]; + lineof_temp[4461] = [4456,58,4456,64]; + lineof_temp[1792] = [1951,12,1954,75]; + lineof_temp[156] = [180,24,180,39]; + lineof_temp[2261] = [2401,14,2401,29]; + lineof_temp[2404] = [2535,4,2535,41]; + lineof_temp[1866] = [2019,34,2020,59]; + lineof_temp[4379] = [4413,16,4413,40]; + lineof_temp[4752] = [4728,24,4728,62]; + lineof_temp[4978] = [4946,4,4947,35]; + lineof_temp[941] = [1102,36,1108,88]; + lineof_temp[3034] = [3044,12,3053,14]; + lineof_temp[4650] = [4642,10,4642,19]; + lineof_temp[2509] = [2632,12,2641,66]; + lineof_temp[3368] = [3429,30,3430,43]; + lineof_temp[4402] = [4275,32,4275,50]; + lineof_temp[4820] = [4785,61,4785,66]; + lineof_temp[7273] = [7010,4,7010,30]; + lineof_temp[1963] = [2134,22,2134,75]; + lineof_temp[517] = [583,40,584,56]; + lineof_temp[1818] = [1975,18,1976,33]; + lineof_temp[971] = [1087,34,1093,86]; + lineof_temp[1702] = [1868,22,1868,48]; + lineof_temp[7089] = [6874,34,6874,47]; + lineof_temp[2616] = [2699,14,2700,34]; + lineof_temp[2843] = [2905,14,2905,75]; + lineof_temp[4057] = [4083,14,4083,62]; + lineof_temp[1146] = [1201,56,1201,77]; + lineof_temp[4151] = [4160,14,4160,62]; + lineof_temp[6920] = [6704,26,6704,38]; + lineof_temp[2777] = [2865,36,2865,73]; + lineof_temp[3238] = [3239,2,3239,27]; + lineof_temp[6256] = [6061,6,6061,31]; + lineof_temp[1731] = [1862,61,1862,62]; + lineof_temp[4516] = [4548,46,4551,76]; + lineof_temp[3082] = [3159,65,3159,66]; + lineof_temp[7229] = [6985,18,6985,65]; + lineof_temp[67] = [101,15,101,40]; + lineof_temp[1099] = [1281,59,1281,68]; + lineof_temp[3810] = [3867,52,3867,65]; + lineof_temp[1725] = [1882,61,1882,68]; + lineof_temp[2726] = [2811,25,2811,36]; + lineof_temp[5489] = [5401,36,5401,54]; + lineof_temp[3638] = [3638,28,3688,39]; + lineof_temp[7218] = [6975,20,6975,57]; + lineof_temp[2345] = [2478,6,2478,29]; + lineof_temp[2645] = [2750,15,2753,26]; + lineof_temp[6353] = [6148,14,6148,30]; + lineof_temp[6385] = [6169,10,6172,78]; + lineof_temp[7028] = [6802,8,6803,28]; + lineof_temp[1988] = [2123,37,2123,66]; + lineof_temp[4451] = [4449,31,4449,31]; + lineof_temp[5054] = [5018,34,5022,75]; + lineof_temp[2642] = [2626,6,2626,73]; + lineof_temp[2596] = [2691,20,2691,76]; + lineof_temp[2813] = [2887,14,2895,78]; + lineof_temp[5953] = [5816,18,5819,102]; + lineof_temp[6782] = [6566,22,6566,59]; + lineof_temp[2300] = [2431,4,2431,31]; + lineof_temp[3405] = [3451,14,3451,43]; + lineof_temp[342] = [376,21,376,39]; + lineof_temp[1522] = [1639,28,1639,43]; + lineof_temp[2625] = [2717,16,2722,65]; + lineof_temp[2525] = [2744,24,2744,63]; + lineof_temp[4684] = [4676,12,4676,17]; + lineof_temp[3201] = [3294,20,3296,28]; + lineof_temp[6450] = [6245,30,6245,69]; + lineof_temp[1675] = [1783,61,1783,62]; + lineof_temp[3894] = [3928,28,3928,56]; + lineof_temp[3514] = [3475,61,3475,64]; + lineof_temp[801] = [958,8,958,22]; + lineof_temp[2882] = [2963,18,2963,24]; + lineof_temp[1929] = [2103,36,2103,46]; + lineof_temp[7160] = [6902,30,6905,43]; + lineof_temp[1847] = [2002,23,2002,59]; + lineof_temp[2348] = [2479,4,2479,41]; + lineof_temp[6717] = [6471,32,6493,53]; + lineof_temp[1357] = [1486,34,1486,58]; + lineof_temp[4342] = [4347,49,4347,55]; + lineof_temp[3070] = [3133,22,3133,44]; + lineof_temp[6847] = [6589,20,6632,26]; + lineof_temp[7176] = [6889,6,6944,37]; + lineof_temp[293] = [318,35,318,61]; + lineof_temp[7141] = [6932,48,6936,61]; + lineof_temp[1256] = [1392,50,1392,70]; + lineof_temp[6806] = [6634,26,6634,63]; + lineof_temp[4959] = [4899,29,4899,50]; + lineof_temp[5776] = [5637,8,5639,70]; + lineof_temp[6365] = [6157,30,6157,30]; + lineof_temp[3173] = [3148,2,3220,28]; + lineof_temp[6810] = [6590,22,6590,65]; + lineof_temp[230] = [254,12,254,42]; + lineof_temp[1635] = [1734,25,1734,27]; + lineof_temp[3022] = [3074,30,3075,48]; + lineof_temp[7055] = [6834,30,6835,34]; + lineof_temp[114] = [146,4,146,26]; + lineof_temp[2801] = [2879,12,2879,50]; + lineof_temp[1868] = [2011,38,2011,47]; + lineof_temp[5738] = [5600,4,5601,65]; + lineof_temp[252] = [286,4,286,26]; + lineof_temp[7159] = [6907,32,6911,77]; + lineof_temp[547] = [604,12,604,50]; + lineof_temp[1373] = [1504,40,1504,64]; + lineof_temp[4120] = [4142,6,4144,15]; + lineof_temp[2760] = [2853,32,2853,75]; + lineof_temp[4925] = [4890,20,4890,62]; + lineof_temp[5284] = [5187,4,5188,45]; + lineof_temp[6211] = [6022,14,6022,24]; + lineof_temp[7227] = [6985,26,6985,63]; + lineof_temp[538] = [567,18,567,18]; + lineof_temp[636] = [641,16,641,21]; + lineof_temp[1461] = [1593,14,1598,75]; + lineof_temp[6733] = [6536,36,6537,69]; + lineof_temp[1811] = [1968,20,1968,69]; + lineof_temp[6492] = [6278,14,6278,30]; + lineof_temp[3325] = [3385,38,3385,49]; + lineof_temp[4536] = [4521,22,4521,22]; + lineof_temp[1794] = [1949,8,1949,33]; + lineof_temp[5319] = [5233,24,5233,24]; + lineof_temp[7275] = [7018,14,7018,30]; + lineof_temp[3487] = [3534,35,3534,54]; + lineof_temp[1840] = [1988,2,1991,46]; + lineof_temp[4950] = [4936,36,4936,69]; + lineof_temp[1207] = [1369,40,1369,63]; + lineof_temp[2091] = [2172,10,2172,56]; + lineof_temp[2392] = [2523,4,2523,52]; + lineof_temp[5247] = [5175,14,5175,32]; + lineof_temp[949] = [1113,46,1113,68]; + lineof_temp[1858] = [2023,38,2024,50]; + lineof_temp[2747] = [2809,13,2809,49]; + lineof_temp[2974] = [3062,26,3064,34]; + lineof_temp[3252] = [3312,20,3312,74]; + lineof_temp[6501] = [6296,28,6298,79]; + lineof_temp[18] = [27,4,27,19]; + lineof_temp[2797] = [2870,6,2870,53]; + lineof_temp[5292] = [5214,16,5214,51]; + lineof_temp[5434] = [5343,12,5344,37]; + lineof_temp[7305] = [7045,18,7045,68]; + lineof_temp[3662] = [3700,4,3701,26]; + lineof_temp[3622] = [3664,50,3667,60]; + lineof_temp[7306] = [7044,16,7044,40]; + lineof_temp[3507] = [3481,14,3501,16]; + lineof_temp[3808] = [3863,26,3865,71]; + lineof_temp[3883] = [3940,32,3940,41]; + lineof_temp[3873] = [3920,18,3921,58]; + lineof_temp[2854] = [2956,8,2956,60]; + lineof_temp[5725] = [5592,6,5592,40]; + lineof_temp[3664] = [3706,16,3706,55]; + lineof_temp[4496] = [4513,20,4513,63]; + lineof_temp[258] = [292,8,293,37]; + lineof_temp[2450] = [2585,6,2585,31]; + lineof_temp[3345] = [3408,32,3408,43]; + lineof_temp[2779] = [2865,28,2865,75]; + lineof_temp[7042] = [6800,6,6800,33]; + lineof_temp[2931] = [3016,16,3016,18]; + lineof_temp[2533] = [2742,14,2742,14]; + lineof_temp[5713] = [5584,53,5584,58]; + lineof_temp[3744] = [3807,41,3807,65]; + lineof_temp[6084] = [5952,64,5952,70]; + lineof_temp[7187] = [6954,27,6954,49]; + lineof_temp[1549] = [1680,10,1680,69]; + lineof_temp[478] = [537,27,537,65]; + lineof_temp[4735] = [4701,25,4701,52]; + lineof_temp[2155] = [2303,12,2303,72]; + lineof_temp[6598] = [6375,28,6375,70]; + lineof_temp[7109] = [6861,60,6861,68]; + lineof_temp[4412] = [4289,41,4289,43]; + lineof_temp[818] = [953,18,955,74]; + lineof_temp[2683] = [2777,8,2777,35]; + lineof_temp[6503] = [6289,32,6289,37]; + lineof_temp[1023] = [980,4,1134,24]; + lineof_temp[2090] = [2172,18,2172,54]; + lineof_temp[414] = [470,12,470,45]; + lineof_temp[682] = [751,30,751,50]; + lineof_temp[3592] = [3569,18,3569,18]; + lineof_temp[3981] = [4018,61,4018,70]; + lineof_temp[4843] = [4814,68,4814,70]; + lineof_temp[1538] = [1661,10,1662,29]; + lineof_temp[2492] = [2613,16,2613,73]; + lineof_temp[6019] = [5884,18,5887,105]; + lineof_temp[6913] = [6700,32,6701,73]; + lineof_temp[2141] = [2276,22,2276,25]; + lineof_temp[4624] = [4634,17,4634,47]; + lineof_temp[7069] = [6827,18,6827,18]; + lineof_temp[7264] = [6998,8,6999,30]; + lineof_temp[831] = [947,24,947,24]; + lineof_temp[1167] = [1257,38,1257,72]; + lineof_temp[6925] = [6665,18,6707,28]; + lineof_temp[504] = [552,21,552,42]; + lineof_temp[4778] = [4756,63,4756,66]; + lineof_temp[4794] = [4776,27,4776,56]; + lineof_temp[3761] = [3822,33,3822,40]; + lineof_temp[2193] = [2312,8,2312,8]; + lineof_temp[5428] = [5335,16,5335,16]; + lineof_temp[7232] = [6983,18,6983,55]; + lineof_temp[3464] = [3515,24,3518,80]; + lineof_temp[3653] = [3551,8,3562,10]; + lineof_temp[3540] = [3568,21,3568,27]; + lineof_temp[6293] = [6104,14,6104,30]; + lineof_temp[6362] = [6158,30,6158,74]; + lineof_temp[1252] = [1389,48,1390,56]; + lineof_temp[6174] = [6018,53,6018,70]; + lineof_temp[1073] = [1296,64,1296,69]; + lineof_temp[1600] = [1730,20,1730,58]; + lineof_temp[5403] = [5316,14,5318,56]; + lineof_temp[7133] = [6916,30,6917,77]; + lineof_temp[1770] = [1916,71,1917,19]; + lineof_temp[1228] = [1404,62,1404,72]; + lineof_temp[5761] = [5624,6,5624,48]; + lineof_temp[36] = [35,30,35,46]; + lineof_temp[1695] = [1857,10,1857,58]; + lineof_temp[3158] = [3167,12,3167,28]; + lineof_temp[4349] = [4389,16,4389,41]; + lineof_temp[4944] = [4905,32,4928,38]; + lineof_temp[6995] = [6776,34,6777,53]; + lineof_temp[213] = [253,14,253,40]; + lineof_temp[1449] = [1567,6,1577,74]; + lineof_temp[4038] = [4058,17,4058,36]; + lineof_temp[5310] = [5232,48,5232,55]; + lineof_temp[6615] = [6386,20,6386,67]; + lineof_temp[2543] = [2656,20,2661,69]; + lineof_temp[4256] = [4251,6,4251,30]; + lineof_temp[2225] = [2367,14,2370,100]; + lineof_temp[5097] = [5052,11,5052,39]; + lineof_temp[5574] = [5451,16,5453,45]; + lineof_temp[5026] = [5004,46,5004,60]; + lineof_temp[3311] = [3377,24,3377,76]; + lineof_temp[5703] = [5574,14,5574,48]; + lineof_temp[1033] = [1152,28,1152,61]; + lineof_temp[6382] = [6170,20,6170,72]; + lineof_temp[6864] = [6646,14,6646,61]; + lineof_temp[2689] = [2756,6,2772,8]; + lineof_temp[2956] = [3045,14,3052,38]; + lineof_temp[5541] = [5439,14,5439,68]; + lineof_temp[875] = [1004,28,1006,79]; + lineof_temp[2932] = [3006,12,3015,14]; + lineof_temp[4203] = [4193,16,4193,39]; + lineof_temp[135] = [185,31,185,53]; + lineof_temp[6139] = [5984,13,5984,15]; + lineof_temp[850] = [974,15,974,40]; + lineof_temp[4125] = [4147,28,4147,43]; + lineof_temp[4795] = [4776,27,4776,56]; + lineof_temp[6837] = [6625,32,6626,73]; + lineof_temp[3043] = [3033,4,3034,42]; + lineof_temp[881] = [989,24,989,27]; + lineof_temp[4030] = [4041,36,4041,42]; + lineof_temp[3817] = [3855,20,3857,34]; + lineof_temp[6187] = [6027,14,6027,61]; + lineof_temp[6086] = [5951,22,5954,58]; + lineof_temp[7340] = [7049,31,7049,35]; + lineof_temp[7322] = [7068,48,7078,75]; + lineof_temp[125] = [171,22,171,37]; + lineof_temp[973] = [1075,38,1075,43]; + lineof_temp[1042] = [1164,46,1164,71]; + lineof_temp[3966] = [3979,4,3980,26]; + lineof_temp[5652] = [5535,10,5535,71]; + lineof_temp[1514] = [1644,18,1644,20]; + lineof_temp[2327] = [2460,6,2460,31]; + lineof_temp[6580] = [6357,20,6357,36]; + lineof_temp[6961] = [6740,14,6740,61]; + lineof_temp[227] = [259,18,259,48]; + lineof_temp[5965] = [5822,20,5822,73]; + lineof_temp[2378] = [2509,4,2509,45]; + lineof_temp[5496] = [5397,22,5397,65]; + lineof_temp[5192] = [5134,19,5134,38]; + lineof_temp[5762] = [5621,4,5623,33]; + lineof_temp[6747] = [6509,22,6513,61]; + lineof_temp[1219] = [1385,46,1386,53]; + lineof_temp[4373] = [4403,16,4403,48]; + lineof_temp[5359] = [5274,28,5274,38]; + lineof_temp[3531] = [3553,20,3553,65]; + lineof_temp[6194] = [6032,22,6032,42]; + lineof_temp[7004] = [6789,36,6789,73]; + lineof_temp[546] = [559,26,559,47]; + lineof_temp[2863] = [2978,22,2979,55]; + lineof_temp[150] = [191,30,191,44]; + lineof_temp[4003] = [4025,11,4025,45]; + lineof_temp[607] = [650,62,650,64]; + lineof_temp[3965] = [3981,6,3981,20]; + lineof_temp[7207] = [6963,20,6963,43]; + lineof_temp[1691] = [1835,4,1851,23]; + lineof_temp[6612] = [6381,18,6382,36]; + lineof_temp[6835] = [6626,34,6626,71]; + lineof_temp[7064] = [6838,22,6839,47]; + lineof_temp[2289] = [2424,20,2424,68]; + lineof_temp[6640] = [6389,14,6390,43]; + lineof_temp[194] = [241,7,241,25]; + lineof_temp[5305] = [5229,24,5229,52]; + lineof_temp[6649] = [6414,10,6414,35]; + lineof_temp[6952] = [6729,12,6729,33]; + lineof_temp[87] = [99,8,101,76]; + lineof_temp[5455] = [5325,40,5325,45]; + lineof_temp[1243] = [1418,54,1418,54]; + lineof_temp[4628] = [4634,17,4634,47]; + lineof_temp[2976] = [3072,38,3072,71]; + lineof_temp[1744] = [1903,4,1904,26]; + lineof_temp[4955] = [4933,32,4937,95]; + lineof_temp[5072] = [4956,44,4956,50]; + lineof_temp[705] = [774,10,775,40]; + lineof_temp[5635] = [5507,2,5512,10]; + lineof_temp[3077] = [3166,24,3166,57]; + lineof_temp[4686] = [4673,11,4673,39]; + lineof_temp[5522] = [5412,11,5412,38]; + lineof_temp[5645] = [5522,6,5525,49]; + lineof_temp[2157] = [2306,16,2306,67]; + lineof_temp[3861] = [3900,16,3900,16]; + lineof_temp[4787] = [4762,16,4765,59]; + lineof_temp[1096] = [1287,54,1288,79]; + lineof_temp[3500] = [3541,20,3541,46]; + lineof_temp[3974] = [3994,26,3994,53]; + lineof_temp[6600] = [6374,18,6374,40]; + lineof_temp[6830] = [6620,38,6620,75]; + lineof_temp[6295] = [6108,18,6108,55]; + lineof_temp[6652] = [6431,8,6431,55]; + lineof_temp[1507] = [1634,6,1634,72]; + lineof_temp[2557] = [2669,24,2672,67]; + lineof_temp[1862] = [2023,38,2024,50]; + lineof_temp[4553] = [4509,14,4509,19]; + lineof_temp[4683] = [4677,10,4677,44]; + lineof_temp[6199] = [6035,14,6035,44]; + lineof_temp[1193] = [1346,26,1351,87]; + lineof_temp[5837] = [5708,18,5708,72]; + lineof_temp[2417] = [2550,6,2550,38]; + lineof_temp[924] = [1098,37,1098,70]; + lineof_temp[5033] = [4999,38,5005,70]; + lineof_temp[6627] = [6403,34,6405,51]; + lineof_temp[4058] = [4089,16,4089,65]; + lineof_temp[5038] = [5009,38,5014,98]; + lineof_temp[571] = [603,2,634,12]; + lineof_temp[2909] = [3009,18,3009,76]; + lineof_temp[2989] = [3095,39,3096,69]; + lineof_temp[1204] = [1358,22,1358,68]; + lineof_temp[1331] = [1465,26,1465,54]; + lineof_temp[3780] = [3845,28,3846,57]; + lineof_temp[3737] = [3740,10,3740,15]; + lineof_temp[6565] = [6343,4,6343,39]; + lineof_temp[5154] = [5101,14,5101,78]; + lineof_temp[4562] = [4569,14,4569,62]; + lineof_temp[5019] = [4999,59,4999,73]; + lineof_temp[2218] = [2349,18,2349,18]; + lineof_temp[6165] = [6000,47,6000,52]; + lineof_temp[692] = [758,30,758,51]; + lineof_temp[1214] = [1382,50,1382,60]; + lineof_temp[1746] = [1913,36,1913,50]; + lineof_temp[2237] = [2381,20,2384,31]; + lineof_temp[3566] = [3613,54,3620,192]; + lineof_temp[4520] = [4544,40,4552,48]; + lineof_temp[6458] = [6247,26,6247,26]; + lineof_temp[2197] = [2342,12,2342,50]; + lineof_temp[3749] = [3810,18,3812,32]; + lineof_temp[5697] = [5568,6,5568,52]; + lineof_temp[2512] = [2630,8,2644,69]; + lineof_temp[6393] = [6180,18,6180,55]; + lineof_temp[6348] = [6137,8,6138,26]; + lineof_temp[2235] = [2376,23,2376,33]; + lineof_temp[5417] = [5334,19,5334,48]; + lineof_temp[6834] = [6596,30,6597,48]; + lineof_temp[25] = [43,6,43,17]; + lineof_temp[3161] = [3153,21,3153,28]; + lineof_temp[3886] = [3938,32,3938,63]; + lineof_temp[910] = [1041,32,1042,64]; + lineof_temp[1779] = [1940,14,1943,109]; + lineof_temp[1986] = [2126,8,2126,8]; + lineof_temp[1616] = [1761,65,1761,72]; + lineof_temp[2033] = [2235,20,2235,69]; + lineof_temp[2200] = [2350,22,2353,72]; + lineof_temp[6401] = [6186,16,6186,16]; + lineof_temp[2890] = [2953,2,2992,23]; + lineof_temp[2972] = [3108,30,3108,40]; + lineof_temp[4022] = [4049,57,4049,73]; + lineof_temp[4049] = [4054,2,4063,20]; + lineof_temp[6359] = [6156,20,6156,72]; + lineof_temp[3335] = [3399,32,3403,94]; + lineof_temp[5423] = [5338,18,5338,72]; + lineof_temp[4561] = [4569,14,4569,62]; + lineof_temp[5250] = [5173,10,5176,68]; + lineof_temp[760] = [850,44,851,63]; + lineof_temp[3314] = [3375,22,3375,48]; + lineof_temp[2918] = [3006,25,3006,39]; + lineof_temp[4497] = [4513,20,4513,63]; + lineof_temp[864] = [996,34,996,74]; + lineof_temp[1932] = [2074,32,2074,37]; + lineof_temp[3770] = [3804,25,3804,41]; + lineof_temp[825] = [945,28,945,65]; + lineof_temp[4819] = [4785,21,4785,50]; + lineof_temp[6317] = [6120,8,6121,26]; + lineof_temp[1259] = [1391,50,1391,50]; + lineof_temp[2244] = [2381,12,2384,32]; + lineof_temp[6732] = [6536,36,6537,69]; + lineof_temp[3130] = [3207,30,3218,65]; + lineof_temp[6321] = [6128,38,6128,69]; + lineof_temp[2045] = [2187,38,2187,52]; + lineof_temp[3237] = [3240,2,3247,4]; + lineof_temp[5483] = [5394,20,5395,50]; + lineof_temp[6326] = [6125,10,6128,75]; + lineof_temp[6540] = [6323,24,6323,44]; + lineof_temp[2116] = [2261,16,2264,97]; + lineof_temp[6750] = [6507,18,6543,26]; + lineof_temp[2559] = [2667,20,2672,69]; + lineof_temp[4848] = [4810,26,4810,26]; + lineof_temp[674] = [740,8,743,79]; + lineof_temp[96] = [111,29,111,45]; + lineof_temp[1924] = [2085,32,2092,34]; + lineof_temp[2057] = [2215,22,2215,70]; + lineof_temp[2540] = [2659,26,2661,65]; + lineof_temp[3789] = [3842,22,3848,71]; + lineof_temp[4666] = [4661,6,4666,78]; + lineof_temp[5500] = [5392,16,5401,64]; + lineof_temp[2508] = [2644,14,2644,65]; + lineof_temp[3913] = [3910,18,3910,26]; + lineof_temp[1045] = [1166,34,1166,56]; + lineof_temp[2180] = [2316,16,2316,40]; + lineof_temp[6616] = [6384,18,6385,37]; + lineof_temp[7240] = [6968,4,6968,47]; + lineof_temp[2418] = [2549,4,2549,45]; + lineof_temp[6395] = [6178,8,6179,26]; + lineof_temp[4543] = [4510,8,4511,26]; + lineof_temp[6954] = [6733,22,6733,59]; + lineof_temp[7135] = [6921,43,6921,74]; + lineof_temp[4877] = [4794,4,4795,24]; + lineof_temp[1008] = [1035,32,1035,54]; + lineof_temp[2619] = [2722,26,2722,59]; + lineof_temp[4118] = [4143,8,4144,13]; + lineof_temp[4168] = [4169,6,4170,78]; + lineof_temp[2177] = [2318,16,2321,99]; + lineof_temp[1991] = [2153,10,2154,44]; + lineof_temp[663] = [724,10,725,40]; + lineof_temp[847] = [976,6,977,45]; + lineof_temp[1324] = [1441,17,1441,51]; + lineof_temp[6551] = [6326,74,6327,23]; + lineof_temp[3219] = [3280,35,3280,42]; + lineof_temp[3593] = [3567,12,3626,22]; + lineof_temp[299] = [317,10,319,43]; + lineof_temp[2521] = [2731,14,2731,27]; + lineof_temp[2835] = [2927,16,2929,24]; + lineof_temp[98] = [125,4,125,26]; + lineof_temp[214] = [253,14,253,40]; + lineof_temp[630] = [685,12,691,20]; + lineof_temp[1796] = [1956,31,1956,67]; + lineof_temp[1921] = [2096,53,2096,59]; + lineof_temp[6866] = [6649,14,6650,72]; + lineof_temp[769] = [831,45,831,52]; + lineof_temp[1931] = [2101,26,2102,45]; + lineof_temp[4730] = [4709,54,4709,60]; + lineof_temp[1515] = [1644,31,1644,32]; + lineof_temp[5929] = [5774,14,5775,32]; + lineof_temp[4699] = [4695,59,4695,64]; + lineof_temp[5534] = [5419,4,5420,26]; + lineof_temp[3166] = [3151,18,3151,24]; + lineof_temp[1531] = [1649,2,1653,78]; + lineof_temp[2248] = [2391,20,2394,31]; + lineof_temp[2555] = [2670,26,2672,65]; + lineof_temp[4510] = [4540,40,4541,71]; + lineof_temp[5395] = [5310,16,5311,22]; + lineof_temp[6981] = [6760,34,6760,56]; + lineof_temp[473] = [545,36,545,66]; + lineof_temp[6529] = [6313,16,6313,16]; + lineof_temp[6989] = [6766,34,6767,53]; + lineof_temp[3024] = [3062,26,3064,34]; + lineof_temp[4814] = [4785,21,4785,50]; + lineof_temp[5608] = [5490,4,5491,73]; + lineof_temp[3107] = [3183,18,3183,61]; + lineof_temp[4389] = [4386,17,4386,44]; + lineof_temp[6135] = [5988,12,5988,74]; + lineof_temp[2530] = [2743,14,2747,75]; + lineof_temp[5742] = [5603,4,5604,65]; + lineof_temp[6351] = [6131,4,6131,50]; + lineof_temp[598] = [659,36,659,36]; + lineof_temp[1137] = [1235,62,1240,79]; + lineof_temp[2848] = [2933,10,2936,23]; + lineof_temp[3716] = [3783,30,3783,70]; + lineof_temp[5321] = [5230,20,5230,21]; + lineof_temp[5379] = [5289,11,5289,38]; + lineof_temp[4260] = [4257,8,4257,26]; + lineof_temp[2494] = [2613,8,2613,75]; + lineof_temp[2765] = [2862,42,2863,55]; + lineof_temp[3570] = [3601,63,3601,68]; + lineof_temp[4937] = [4920,42,4920,57]; + lineof_temp[5349] = [5260,14,5264,43]; + lineof_temp[6861] = [6643,12,6643,34]; + lineof_temp[4476] = [4485,21,4485,59]; + lineof_temp[4898] = [4859,6,4860,17]; + lineof_temp[4980] = [4864,15,4864,50]; + lineof_temp[6178] = [6014,47,6014,52]; + lineof_temp[3633] = [3646,36,3648,70]; + lineof_temp[1221] = [1395,50,1397,64]; + lineof_temp[3599] = [3642,52,3642,72]; + lineof_temp[6056] = [5927,22,5927,62]; + lineof_temp[410] = [443,22,443,43]; + lineof_temp[679] = [736,17,736,35]; + lineof_temp[4201] = [4189,4,4189,31]; + lineof_temp[4800] = [4781,46,4781,69]; + lineof_temp[6205] = [6025,18,6025,23]; + lineof_temp[6352] = [6148,14,6148,30]; + lineof_temp[3328] = [3384,32,3384,40]; + lineof_temp[3506] = [3502,18,3502,21]; + lineof_temp[3359] = [3368,21,3368,23]; + lineof_temp[5093] = [5037,8,5037,8]; + lineof_temp[5565] = [5458,67,5458,73]; + lineof_temp[5753] = [5614,6,5614,41]; + lineof_temp[61] = [96,6,96,23]; + lineof_temp[472] = [541,26,541,59]; + lineof_temp[595] = [660,36,678,46]; + lineof_temp[1498] = [1626,18,1626,39]; + lineof_temp[1686] = [1843,16,1844,66]; + lineof_temp[2924] = [3021,18,3022,27]; + lineof_temp[6394] = [6180,10,6180,57]; + lineof_temp[6548] = [6334,26,6335,44]; + lineof_temp[3818] = [3857,45,3857,50]; + lineof_temp[4532] = [4524,28,4524,28]; + lineof_temp[4711] = [4704,14,4704,45]; + lineof_temp[113] = [147,6,147,20]; + lineof_temp[2282] = [2420,16,2421,76]; + lineof_temp[3908] = [3916,16,3917,56]; + lineof_temp[5388] = [5302,41,5302,77]; + lineof_temp[1170] = [1255,34,1255,46]; + lineof_temp[1420] = [1464,14,1545,61]; + lineof_temp[1805] = [1960,18,1960,40]; + lineof_temp[709] = [774,10,775,40]; + lineof_temp[112] = [123,29,123,45]; + lineof_temp[3401] = [3445,14,3449,94]; + lineof_temp[4618] = [4618,4,4618,16]; + lineof_temp[5988] = [5811,61,5811,66]; + lineof_temp[3695] = [3757,28,3757,66]; + lineof_temp[4986] = [4959,17,4959,41]; + lineof_temp[5862] = [5724,16,5724,59]; + lineof_temp[1634] = [1733,22,1733,68]; + lineof_temp[4392] = [4385,8,4426,18]; + lineof_temp[4089] = [4114,14,4115,46]; + lineof_temp[524] = [576,38,576,43]; + lineof_temp[3767] = [3813,20,3813,20]; + lineof_temp[4758] = [4723,8,4738,19]; + lineof_temp[5356] = [5277,22,5278,41]; + lineof_temp[4478] = [4496,24,4496,41]; + lineof_temp[6568] = [6354,16,6354,53]; + lineof_temp[5058] = [4981,34,4981,40]; + lineof_temp[6400] = [6185,23,6185,24]; + lineof_temp[7071] = [6822,18,6822,37]; + lineof_temp[1825] = [1963,18,1963,36]; + lineof_temp[1685] = [1845,22,1845,34]; + lineof_temp[1839] = [1990,8,1990,8]; + lineof_temp[1105] = [1273,44,1273,44]; + lineof_temp[3594] = [3566,10,3566,51]; + lineof_temp[6343] = [6142,16,6142,57]; + lineof_temp[6749] = [6515,24,6515,24]; + lineof_temp[7142] = [6936,72,6937,50]; + lineof_temp[3529] = [3558,20,3561,24]; + lineof_temp[3619] = [3682,50,3686,64]; + lineof_temp[4587] = [4573,65,4573,73]; + lineof_temp[5071] = [4956,15,4956,33]; + lineof_temp[5680] = [5555,8,5556,71]; + lineof_temp[510] = [568,22,568,77]; + lineof_temp[594] = [665,42,665,42]; + lineof_temp[6754] = [6499,18,6499,18]; + lineof_temp[2659] = [2771,14,2771,66]; + lineof_temp[4432] = [4267,10,4267,10]; + lineof_temp[3085] = [3156,18,3156,29]; + lineof_temp[4047] = [4055,40,4055,46]; + lineof_temp[327] = [337,10,337,19]; + lineof_temp[4890] = [4843,14,4843,40]; + lineof_temp[41] = [63,6,63,20]; + lineof_temp[2076] = [2224,20,2224,53]; + lineof_temp[2996] = [3098,44,3098,71]; + lineof_temp[957] = [1083,38,1083,73]; + lineof_temp[3382] = [3423,20,3423,20]; + lineof_temp[1935] = [2005,20,2068,22]; + lineof_temp[3798] = [3851,25,3852,54]; + lineof_temp[3922] = [3895,2,3948,13]; + lineof_temp[5531] = [5422,53,5422,59]; + lineof_temp[6638] = [6394,22,6394,22]; + lineof_temp[2154] = [2303,12,2303,72]; + lineof_temp[2542] = [2657,22,2657,35]; + lineof_temp[6713] = [6476,38,6493,49]; + lineof_temp[2595] = [2694,26,2694,41]; + lineof_temp[3674] = [3716,18,3716,26]; + lineof_temp[4676] = [4680,19,4680,48]; + lineof_temp[469] = [542,36,542,49]; + lineof_temp[3047] = [3123,33,3123,50]; + lineof_temp[5118] = [5063,18,5074,28]; + lineof_temp[177] = [221,6,221,37]; + lineof_temp[3342] = [3381,32,3381,41]; + lineof_temp[6848] = [6589,20,6632,26]; + lineof_temp[2955] = [3049,20,3049,20]; + lineof_temp[4744] = [4736,28,4736,75]; + lineof_temp[6419] = [6216,26,6221,83]; + lineof_temp[2169] = [2325,18,2327,53]; + lineof_temp[2906] = [3002,19,3002,27]; + lineof_temp[336] = [365,4,366,26]; + lineof_temp[5517] = [5361,2,5373,4]; + lineof_temp[621] = [690,24,690,73]; + lineof_temp[3333] = [3399,32,3399,47]; + lineof_temp[3578] = [3587,40,3587,40]; + lineof_temp[3384] = [3417,12,3418,37]; + lineof_temp[6851] = [6586,53,6586,66]; + lineof_temp[1698] = [1855,2,1855,39]; + lineof_temp[4294] = [4334,28,4334,40]; + lineof_temp[5870] = [5737,22,5737,71]; + lineof_temp[2] = [16,7,16,28]; + lineof_temp[3445] = [3493,28,3499,77]; + lineof_temp[4369] = [4405,27,4405,45]; + lineof_temp[5700] = [5571,14,5571,53]; + lineof_temp[6420] = [6213,30,6213,69]; + lineof_temp[5724] = [5592,14,5592,38]; + lineof_temp[6162] = [6007,22,6010,62]; + lineof_temp[1460] = [1594,16,1598,73]; + lineof_temp[588] = [676,54,676,59]; + lineof_temp[6032] = [5903,20,5904,74]; + lineof_temp[2391] = [2524,6,2524,45]; + lineof_temp[4889] = [4843,14,4843,40]; + lineof_temp[2439] = [2575,6,2575,34]; + lineof_temp[5182] = [5109,50,5109,56]; + lineof_temp[988] = [1063,46,1063,71]; + lineof_temp[1241] = [1415,52,1416,70]; + lineof_temp[5842] = [5714,42,5714,73]; + lineof_temp[4377] = [4418,40,4418,70]; + lineof_temp[488] = [532,12,532,12]; + lineof_temp[6764] = [6447,12,6450,33]; + lineof_temp[6712] = [6482,44,6482,44]; + lineof_temp[4469] = [4481,16,4481,43]; + lineof_temp[5677] = [5551,6,5551,45]; + lineof_temp[6905] = [6695,38,6695,75]; + lineof_temp[834] = [934,18,937,78]; + lineof_temp[2135] = [2279,26,2279,75]; + lineof_temp[4251] = [4241,4,4241,28]; + lineof_temp[7121] = [6851,4,6851,41]; + lineof_temp[7290] = [7030,10,7031,69]; + lineof_temp[3316] = [3389,34,3390,44]; + lineof_temp[5663] = [5544,36,5544,61]; + lineof_temp[585] = [669,46,673,76]; + lineof_temp[6459] = [6244,20,6254,28]; + lineof_temp[7057] = [6833,26,6837,70]; + lineof_temp[5256] = [5186,6,5186,58]; + lineof_temp[465] = [530,16,530,62]; + lineof_temp[746] = [839,55,839,57]; + lineof_temp[1091] = [1294,67,1294,73]; + lineof_temp[4161] = [4163,4,4163,28]; + lineof_temp[7382] = [7103,21,7103,33]; + lineof_temp[425] = [500,26,500,59]; + lineof_temp[780] = [896,24,897,43]; + lineof_temp[3868] = [3912,14,3913,52]; + lineof_temp[1585] = [1708,18,1709,64]; + lineof_temp[3976] = [3995,28,3995,55]; + lineof_temp[5336] = [5249,16,5249,69]; + lineof_temp[385] = [438,6,438,40]; + lineof_temp[2612] = [2703,20,2708,69]; + lineof_temp[2833] = [2928,18,2928,70]; + lineof_temp[5088] = [5044,8,5047,51]; + lineof_temp[2222] = [2368,18,2368,67]; + lineof_temp[2744] = [2818,8,2818,36]; + lineof_temp[5707] = [5516,10,5516,20]; + lineof_temp[5933] = [5766,12,5766,12]; + lineof_temp[1967] = [2136,31,2136,72]; + lineof_temp[4915] = [4865,23,4865,37]; + lineof_temp[2400] = [2531,4,2531,36]; + lineof_temp[4799] = [4781,54,4781,67]; + lineof_temp[4837] = [4808,24,4809,49]; + lineof_temp[5080] = [5038,16,5038,44]; + lineof_temp[1018] = [986,16,986,16]; + lineof_temp[1377] = [1520,48,1524,60]; + lineof_temp[4312] = [4354,24,4354,57]; + lineof_temp[5986] = [5813,20,5813,25]; + lineof_temp[7329] = [7061,42,7061,42]; + lineof_temp[2836] = [2926,14,2929,26]; + lineof_temp[3814] = [3866,44,3866,44]; + lineof_temp[3903] = [3922,16,3922,54]; + lineof_temp[791] = [792,12,917,22]; + lineof_temp[2828] = [2917,14,2917,66]; + lineof_temp[3846] = [3892,6,3892,27]; + lineof_temp[4886] = [4839,39,4839,73]; + lineof_temp[7277] = [7020,8,7022,77]; + lineof_temp[77] = [104,15,104,31]; + lineof_temp[1964] = [2139,22,2139,72]; + lineof_temp[7248] = [6991,8,6992,30]; + lineof_temp[1655] = [1812,34,1812,60]; + lineof_temp[3867] = [3908,12,3909,51]; + lineof_temp[6284] = [6088,51,6088,59]; + lineof_temp[4622] = [4628,4,4628,14]; + lineof_temp[6971] = [6793,26,6793,63]; + lineof_temp[7138] = [6932,48,6936,61]; + lineof_temp[2783] = [2846,31,2846,34]; + lineof_temp[4493] = [4438,18,4438,43]; + lineof_temp[4055] = [4077,17,4077,50]; + lineof_temp[5043] = [5006,36,5006,55]; + lineof_temp[2170] = [2324,16,2327,54]; + lineof_temp[3313] = [3376,22,3377,78]; + lineof_temp[1969] = [2136,22,2136,73]; + lineof_temp[7019] = [6723,14,6723,23]; + lineof_temp[7105] = [6873,30,6873,30]; + lineof_temp[2564] = [2667,20,2672,69]; + lineof_temp[3938] = [3953,4,3956,54]; + lineof_temp[2631] = [2723,25,2723,27]; + lineof_temp[6519] = [6302,14,6302,30]; + lineof_temp[619] = [690,32,690,71]; + lineof_temp[7157] = [6902,30,6905,43]; + lineof_temp[776] = [800,28,800,28]; + lineof_temp[3258] = [3308,53,3308,62]; + lineof_temp[176] = [218,4,218,27]; + lineof_temp[3208] = [3286,16,3291,18]; + lineof_temp[5374] = [5255,14,5255,19]; + lineof_temp[7296] = [7027,8,7031,70]; + lineof_temp[668] = [712,10,712,19]; + lineof_temp[1586] = [1710,27,1710,30]; + lineof_temp[7326] = [7062,42,7078,79]; + lineof_temp[4525] = [4531,34,4536,36]; + lineof_temp[6515] = [6279,6,6300,36]; + lineof_temp[211] = [250,12,250,62]; + lineof_temp[634] = [643,12,643,69]; + lineof_temp[4265] = [4247,23,4247,42]; + lineof_temp[5888] = [5732,12,5732,12]; + lineof_temp[7369] = [7088,2,7088,58]; + lineof_temp[6271] = [6091,25,6091,55]; + lineof_temp[5927] = [5789,16,5794,71]; + lineof_temp[6145] = [5980,6,5980,19]; + lineof_temp[627] = [686,29,686,43]; + lineof_temp[6996] = [6759,40,6759,45]; + lineof_temp[3950] = [3968,16,3968,35]; + lineof_temp[1612] = [1760,46,1761,54]; + lineof_temp[1788] = [1952,16,1952,65]; + lineof_temp[4854] = [4800,18,4800,58]; + lineof_temp[6945] = [6728,22,6728,59]; + lineof_temp[5110] = [5072,36,5072,74]; + lineof_temp[3041] = [3036,6,3036,43]; + lineof_temp[5239] = [5166,4,5166,14]; + lineof_temp[5715] = [5583,6,5586,49]; + lineof_temp[6495] = [6283,24,6283,44]; + lineof_temp[5007] = [4985,36,4986,52]; + lineof_temp[6783] = [6566,22,6566,59]; + lineof_temp[4427] = [4269,55,4269,61]; + lineof_temp[6679] = [6439,14,6439,29]; + lineof_temp[4801] = [4779,37,4779,69]; + lineof_temp[5584] = [5474,15,5474,43]; + lineof_temp[4141] = [4155,28,4155,43]; + lineof_temp[5719] = [5589,6,5589,63]; + lineof_temp[6190] = [6029,22,6029,59]; + lineof_temp[3657] = [3548,2,3695,12]; + lineof_temp[755] = [858,52,873,66]; + lineof_temp[5502] = [5383,20,5383,29]; + lineof_temp[6185] = [6027,22,6027,59]; + lineof_temp[2292] = [2418,10,2422,14]; + lineof_temp[2338] = [2469,4,2469,50]; + lineof_temp[3294] = [3325,29,3325,66]; + lineof_temp[1933] = [2072,22,2073,40]; + lineof_temp[5974] = [5850,20,5851,58]; + lineof_temp[2694] = [2784,14,2784,30]; + lineof_temp[2785] = [2844,18,2867,28]; + lineof_temp[3993] = [3998,14,3999,35]; + lineof_temp[5339] = [5247,4,5247,14]; + lineof_temp[3882] = [3940,32,3940,41]; + lineof_temp[5136] = [5081,13,5081,30]; + lineof_temp[5869] = [5738,22,5738,55]; + lineof_temp[2355] = [2488,6,2488,43]; + lineof_temp[4293] = [4335,26,4335,76]; + lineof_temp[5684] = [5559,14,5559,41]; + lineof_temp[7039] = [6807,10,6817,21]; + lineof_temp[251] = [287,6,289,39]; + lineof_temp[432] = [503,20,504,51]; + lineof_temp[3545] = [3577,26,3577,73]; + lineof_temp[5189] = [5131,16,5131,44]; + lineof_temp[562] = [631,22,631,62]; + lineof_temp[1800] = [1955,8,1955,34]; + lineof_temp[4228] = [4140,10,4140,16]; + lineof_temp[4164] = [4166,6,4167,77]; + lineof_temp[5334] = [5251,8,5251,73]; + lineof_temp[5706] = [5572,4,5573,77]; + lineof_temp[3775] = [3835,20,3837,34]; + lineof_temp[6686] = [6447,21,6450,32]; + lineof_temp[6819] = [6603,36,6604,77]; + lineof_temp[4482] = [4485,21,4485,59]; + lineof_temp[5509] = [5405,20,5405,69]; + lineof_temp[1230] = [1400,52,1401,69]; + lineof_temp[4616] = [4601,4,4602,26]; + lineof_temp[482] = [534,22,534,27]; + lineof_temp[6709] = [6483,48,6485,71]; + lineof_temp[7208] = [6963,54,6963,60]; + lineof_temp[4541] = [4515,10,4552,68]; + lineof_temp[4431] = [4266,45,4266,52]; + lineof_temp[2749] = [2810,8,2810,8]; + lineof_temp[1282] = [1356,10,1356,54]; + lineof_temp[5569] = [5462,26,5462,34]; + lineof_temp[993] = [1067,38,1067,75]; + lineof_temp[5422] = [5338,26,5338,70]; + lineof_temp[7016] = [6746,12,6794,19]; + lineof_temp[7270] = [7013,8,7015,68]; + lineof_temp[3109] = [3187,25,3187,50]; + lineof_temp[1506] = [1614,4,1615,26]; + lineof_temp[3859] = [3899,21,3899,29]; + lineof_temp[6078] = [5948,22,5948,48]; + lineof_temp[1292] = [1438,27,1438,64]; + lineof_temp[1836] = [1991,8,1991,42]; + lineof_temp[1747] = [1913,16,1914,48]; + lineof_temp[3555] = [3600,48,3601,52]; + lineof_temp[7263] = [7000,10,7007,21]; + lineof_temp[2132] = [2289,20,2295,52]; + lineof_temp[3421] = [3455,18,3455,27]; + lineof_temp[3801] = [3855,20,3857,34]; + lineof_temp[1039] = [1149,22,1153,84]; + lineof_temp[10] = [16,6,16,77]; + lineof_temp[3383] = [3419,14,3432,72]; + lineof_temp[3474] = [3521,24,3524,57]; + lineof_temp[2269] = [2405,6,2405,54]; + lineof_temp[3460] = [3510,24,3513,80]; + lineof_temp[3898] = [3925,26,3925,54]; + lineof_temp[804] = [960,8,966,52]; + lineof_temp[5630] = [5511,10,5511,75]; + lineof_temp[6658] = [6419,14,6422,58]; + lineof_temp[7308] = [7048,28,7048,71]; + lineof_temp[727] = [810,42,810,42]; + lineof_temp[1941] = [1998,16,1998,42]; + lineof_temp[4180] = [4178,6,4179,72]; + lineof_temp[6406] = [6175,4,6175,45]; + lineof_temp[1150] = [1194,54,1196,66]; + lineof_temp[5488] = [5399,31,5399,52]; + lineof_temp[671] = [738,14,738,32]; + lineof_temp[3231] = [3257,14,3257,14]; + lineof_temp[6435] = [6237,36,6237,77]; + lineof_temp[1808] = [1959,8,1959,35]; + lineof_temp[7180] = [6950,23,6950,57]; + lineof_temp[2009] = [2167,6,2167,52]; + lineof_temp[2115] = [2261,16,2264,97]; + lineof_temp[2622] = [2720,22,2722,61]; + lineof_temp[3973] = [3994,26,3994,53]; + lineof_temp[5317] = [5232,31,5232,56]; + lineof_temp[5590] = [5478,22,5478,33]; + lineof_temp[5326] = [5226,10,5238,21]; + lineof_temp[5653] = [5537,36,5537,62]; + lineof_temp[5943] = [5806,12,5806,12]; + lineof_temp[3871] = [3916,16,3917,56]; + lineof_temp[1907] = [2071,32,2071,42]; + lineof_temp[2960] = [3113,24,3114,40]; + lineof_temp[4142] = [4155,8,4156,13]; + lineof_temp[5997] = [5867,62,5867,68]; + lineof_temp[6696] = [6473,36,6473,77]; + lineof_temp[1650] = [1794,18,1794,64]; + lineof_temp[2104] = [2267,26,2267,55]; + lineof_temp[2661] = [2769,27,2769,30]; + lineof_temp[7324] = [7066,61,7066,65]; + lineof_temp[2941] = [2995,33,2995,69]; + lineof_temp[1723] = [1884,22,1884,25]; + lineof_temp[2611] = [2710,35,2710,60]; + lineof_temp[3262] = [3303,2,3303,31]; + lineof_temp[6104] = [5944,26,5944,31]; + lineof_temp[2025] = [2182,18,2182,76]; + lineof_temp[2317] = [2450,6,2450,45]; + lineof_temp[565] = [625,16,625,43]; + lineof_temp[883] = [1014,32,1014,60]; + lineof_temp[6311] = [6103,4,6103,36]; + lineof_temp[4066] = [4078,12,4078,46]; + lineof_temp[14] = [15,29,15,41]; + lineof_temp[3815] = [3861,22,3867,71]; + lineof_temp[4317] = [4352,20,4355,71]; + lineof_temp[4441] = [4440,4,4440,14]; + lineof_temp[2441] = [2577,6,2577,22]; + lineof_temp[6177] = [6014,18,6014,36]; + lineof_temp[4029] = [4041,11,4041,25]; + lineof_temp[5575] = [5449,12,5449,51]; + lineof_temp[729] = [805,34,805,55]; + lineof_temp[3211] = [3270,20,3272,63]; + lineof_temp[3760] = [3819,24,3821,69]; + lineof_temp[7029] = [6808,20,6808,61]; + lineof_temp[487] = [531,19,531,24]; + lineof_temp[920] = [1097,37,1097,62]; + lineof_temp[2429] = [2563,6,2563,23]; + lineof_temp[6477] = [6264,29,6264,31]; + lineof_temp[578] = [644,24,644,46]; + lineof_temp[2919] = [3021,18,3022,27]; + lineof_temp[5265] = [5198,48,5198,55]; + lineof_temp[6510] = [6284,18,6284,18]; + lineof_temp[5130] = [5081,13,5081,30]; + lineof_temp[1687] = [1839,22,1839,27]; + lineof_temp[4197] = [4187,4,4187,28]; + lineof_temp[2323] = [2456,6,2456,48]; + lineof_temp[6368] = [6149,14,6149,19]; + lineof_temp[2724] = [2809,13,2809,49]; + lineof_temp[4547] = [4557,14,4557,57]; + lineof_temp[6443] = [6226,56,6226,61]; + lineof_temp[1876] = [2038,36,2038,58]; + lineof_temp[5861] = [5726,12,5727,74]; + lineof_temp[1431] = [1556,21,1559,33]; + lineof_temp[6888] = [6667,22,6667,65]; + lineof_temp[3182] = [3225,14,3225,75]; + lineof_temp[3291] = [3331,6,3333,8]; + lineof_temp[1064] = [1283,57,1284,74]; + lineof_temp[3084] = [3158,10,3166,63]; + lineof_temp[3273] = [3335,16,3335,51]; + lineof_temp[642] = [700,6,700,70]; + lineof_temp[2060] = [2204,24,2204,31]; + lineof_temp[3988] = [3998,14,3999,35]; + lineof_temp[6700] = [6485,52,6485,69]; + lineof_temp[1812] = [1967,16,1967,31]; + lineof_temp[3277] = [3345,41,3345,49]; + lineof_temp[4833] = [4800,18,4800,58]; + lineof_temp[128] = [172,20,172,41]; + lineof_temp[1944] = [1997,6,2110,17]; + lineof_temp[2983] = [3067,30,3067,63]; + lineof_temp[4464] = [4453,8,4454,27]; + lineof_temp[4559] = [4567,22,4567,45]; + lineof_temp[5970] = [5836,18,5843,20]; + lineof_temp[4983] = [4956,15,4956,33]; + lineof_temp[5945] = [5803,4,5803,14]; + lineof_temp[1544] = [1658,12,1658,50]; + lineof_temp[2560] = [2667,20,2672,69]; + lineof_temp[5180] = [5111,8,5111,45]; + lineof_temp[5866] = [5722,4,5722,14]; + lineof_temp[1153] = [1185,50,1190,79]; + lineof_temp[4088] = [4116,16,4117,73]; + lineof_temp[922] = [1097,35,1097,63]; + lineof_temp[1142] = [1226,54,1251,65]; + lineof_temp[902] = [1033,26,1034,37]; + lineof_temp[1887] = [2057,44,2058,67]; + lineof_temp[2682] = [2778,8,2781,42]; + lineof_temp[2811] = [2888,16,2895,76]; + lineof_temp[7241] = [6993,27,6993,41]; + lineof_temp[7365] = [7091,6,7092,17]; + lineof_temp[7210] = [6962,8,6966,79]; + lineof_temp[2163] = [2301,44,2301,88]; + lineof_temp[2262] = [2401,14,2401,29]; + lineof_temp[3101] = [3180,14,3180,65]; + lineof_temp[3805] = [3864,28,3865,57]; + lineof_temp[6339] = [6143,26,6143,48]; + lineof_temp[6678] = [6440,18,6440,67]; + lineof_temp[1173] = [1165,30,1165,71]; + lineof_temp[5615] = [5497,15,5497,43]; + lineof_temp[11] = [19,4,19,18]; + lineof_temp[485] = [533,12,547,32]; + lineof_temp[535] = [568,22,568,77]; + lineof_temp[1199] = [1144,74,1145,17]; + lineof_temp[2329] = [2462,6,2462,36]; + lineof_temp[2752] = [2835,14,2835,50]; + lineof_temp[3381] = [3422,27,3422,33]; + lineof_temp[6476] = [6263,26,6263,65]; + lineof_temp[2804] = [2884,16,2884,71]; + lineof_temp[3189] = [3238,10,3238,28]; + lineof_temp[3671] = [3718,22,3721,100]; + lineof_temp[5893] = [5759,16,5759,59]; + lineof_temp[3452] = [3486,22,3500,30]; + lineof_temp[3456] = [3482,16,3500,34]; + lineof_temp[7051] = [6847,22,6849,58]; + lineof_temp[7128] = [6899,28,6899,41]; + lineof_temp[3371] = [3432,32,3432,60]; + lineof_temp[6672] = [6434,10,6434,35]; + lineof_temp[4685] = [4675,8,4675,46]; + lineof_temp[4935] = [4921,46,4922,62]; + lineof_temp[5737] = [5602,6,5602,73]; + lineof_temp[3945] = [3961,4,3962,61]; + lineof_temp[4012] = [4024,2,4031,78]; + lineof_temp[5442] = [5354,22,5354,30]; + lineof_temp[821] = [938,22,938,36]; + lineof_temp[3147] = [3184,24,3184,62]; + lineof_temp[4739] = [4724,17,4724,46]; + lineof_temp[2094] = [2168,4,2169,21]; + lineof_temp[2548] = [2656,20,2661,69]; + lineof_temp[3782] = [3844,26,3846,71]; + lineof_temp[3457] = [3481,27,3481,50]; + lineof_temp[6796] = [6579,14,6579,61]; + lineof_temp[1813] = [1967,16,1970,111]; + lineof_temp[4771] = [4749,16,4752,59]; + lineof_temp[5281] = [5192,10,5203,21]; + lineof_temp[6361] = [6158,38,6158,72]; + lineof_temp[6642] = [6368,10,6369,38]; + lineof_temp[339] = [375,10,375,37]; + lineof_temp[6412] = [6210,26,6210,45]; + lineof_temp[7348] = [7043,22,7043,28]; + lineof_temp[1509] = [1613,10,1613,19]; + lineof_temp[2073] = [2189,24,2189,31]; + lineof_temp[5580] = [5437,42,5437,47]; + lineof_temp[5819] = [5656,19,5656,41]; + lineof_temp[6219] = [6049,8,6050,26]; + lineof_temp[2973] = [3108,22,3108,42]; + lineof_temp[1423] = [1462,13,1462,34]; + lineof_temp[2401] = [2534,6,2534,39]; + lineof_temp[4640] = [4648,15,4648,43]; + lineof_temp[3146] = [3184,24,3184,62]; + lineof_temp[2038] = [2231,12,2232,44]; + lineof_temp[7167] = [6898,24,6898,24]; + lineof_temp[7189] = [6955,24,6955,24]; + lineof_temp[1737] = [1900,12,1900,61]; + lineof_temp[384] = [436,18,436,30]; + lineof_temp[4910] = [4845,2,4849,3]; + lineof_temp[6572] = [6350,14,6350,59]; + lineof_temp[6969] = [6748,20,6748,43]; + lineof_temp[5799] = [5669,25,5669,43]; + lineof_temp[6110] = [5972,60,5972,66]; + lineof_temp[3370] = [3432,40,3432,58]; + lineof_temp[4031] = [4042,8,4042,8]; + lineof_temp[4653] = [4657,4,4657,14]; + lineof_temp[940] = [1103,38,1108,86]; + lineof_temp[5340] = [5260,53,5260,60]; + lineof_temp[7035] = [6811,20,6811,46]; + lineof_temp[7234] = [6980,20,6980,58]; + lineof_temp[5760] = [5624,14,5624,46]; + lineof_temp[178] = [220,4,220,27]; + lineof_temp[1609] = [1772,38,1775,81]; + lineof_temp[2602] = [2708,30,2708,63]; + lineof_temp[558] = [615,14,615,22]; + lineof_temp[921] = [1097,37,1097,62]; + lineof_temp[1898] = [2035,40,2035,45]; + lineof_temp[5540] = [5437,13,5437,31]; + lineof_temp[4155] = [4162,14,4162,61]; + lineof_temp[147] = [193,38,193,49]; + lineof_temp[6571] = [6351,14,6351,56]; + lineof_temp[7374] = [7098,15,7098,16]; + lineof_temp[1660] = [1810,20,1812,63]; + lineof_temp[4400] = [4272,28,4272,48]; + lineof_temp[4546] = [4557,14,4557,57]; + lineof_temp[5278] = [5193,19,5193,46]; + lineof_temp[1764] = [1928,16,1929,34]; + lineof_temp[3842] = [3883,14,3883,25]; + lineof_temp[1593] = [1697,57,1697,62]; + lineof_temp[1867] = [2017,32,2018,58]; + lineof_temp[2814] = [2885,14,2885,27]; + lineof_temp[3870] = [3916,16,3917,56]; + lineof_temp[4114] = [4143,54,4143,61]; + lineof_temp[4693] = [4690,17,4690,45]; + lineof_temp[1160] = [1178,48,1178,48]; + lineof_temp[2764] = [2862,42,2863,55]; + lineof_temp[4484] = [4487,16,4487,16]; + lineof_temp[3402] = [3443,12,3444,34]; + lineof_temp[4262] = [4254,10,4254,49]; + lineof_temp[6281] = [6092,22,6092,22]; + lineof_temp[5564] = [5458,27,5458,56]; + lineof_temp[7197] = [6948,12,6948,12]; + lineof_temp[765] = [849,50,849,55]; + lineof_temp[2829] = [2917,14,2917,66]; + lineof_temp[4236] = [4228,6,4228,38]; + lineof_temp[6120] = [5936,15,5936,23]; + lineof_temp[3752] = [3816,47,3816,73]; + lineof_temp[5314] = [5234,32,5234,70]; + lineof_temp[6983] = [6765,38,6765,75]; + lineof_temp[647] = [704,16,704,52]; + lineof_temp[1906] = [2005,33,2005,46]; + lineof_temp[7163] = [6900,26,6912,34]; + lineof_temp[95] = [112,10,112,15]; + lineof_temp[874] = [1000,26,1002,30]; + lineof_temp[1871] = [2032,40,2032,52]; + lineof_temp[7302] = [7038,12,7038,49]; + lineof_temp[2074] = [2187,18,2188,50]; + lineof_temp[42] = [61,4,62,26]; + lineof_temp[1375] = [1521,50,1524,59]; + lineof_temp[3349] = [3410,32,3410,43]; + lineof_temp[766] = [847,40,848,60]; + lineof_temp[3100] = [3180,14,3180,65]; + lineof_temp[1365] = [1505,46,1509,75]; + lineof_temp[3283] = [3338,22,3338,30]; + lineof_temp[1993] = [2152,8,2154,46]; + lineof_temp[3045] = [3029,34,3029,71]; + lineof_temp[5982] = [5848,16,5853,73]; + lineof_temp[6282] = [6090,16,6100,24]; + lineof_temp[1415] = [1475,22,1475,44]; + lineof_temp[6183] = [6021,19,6021,35]; + lineof_temp[928] = [1125,38,1125,71]; + lineof_temp[2599] = [2689,16,2698,27]; + lineof_temp[2951] = [3051,22,3052,32]; + lineof_temp[3300] = [3356,8,3359,80]; + lineof_temp[7367] = [7092,35,7092,35]; + lineof_temp[2586] = [2691,20,2691,76]; + lineof_temp[5143] = [5098,20,5098,37]; + lineof_temp[5939] = [5805,16,5805,59]; + lineof_temp[318] = [338,4,338,26]; + lineof_temp[2992] = [3097,42,3097,67]; + lineof_temp[3295] = [3358,12,3358,45]; + lineof_temp[4074] = [4067,2,4098,13]; + lineof_temp[6388] = [6162,6,6162,31]; + lineof_temp[823] = [938,22,938,36]; + lineof_temp[2199] = [2348,22,2348,60]; + lineof_temp[4550] = [4555,10,4558,42]; + lineof_temp[6325] = [6127,30,6127,30]; + lineof_temp[6962] = [6738,12,6739,31]; + lineof_temp[3132] = [3196,36,3196,65]; + lineof_temp[6333] = [6136,18,6136,55]; + lineof_temp[3648] = [3629,38,3629,43]; + lineof_temp[568] = [604,12,604,50]; + lineof_temp[2945] = [3031,4,3031,14]; + lineof_temp[6080] = [5952,34,5952,53]; + lineof_temp[1068] = [1283,56,1286,89]; + lineof_temp[1218] = [1385,46,1386,53]; + lineof_temp[5236] = [5128,2,5161,13]; + lineof_temp[6384] = [6171,30,6171,30]; + lineof_temp[103] = [131,6,131,41]; + lineof_temp[862] = [990,26,991,59]; + lineof_temp[4911] = [4840,2,4844,3]; + lineof_temp[5614] = [5499,12,5499,33]; + lineof_temp[1758] = [1931,29,1931,64]; + lineof_temp[7289] = [7030,10,7031,69]; + lineof_temp[444] = [515,15,515,25]; + lineof_temp[3204] = [3294,20,3296,28]; + lineof_temp[4097] = [4101,31,4101,54]; + lineof_temp[2687] = [2774,10,2774,28]; + lineof_temp[4852] = [4805,20,4805,20]; + lineof_temp[6875] = [6654,12,6655,31]; + lineof_temp[1255] = [1392,58,1392,68]; + lineof_temp[1481] = [1603,6,1607,59]; + lineof_temp[3372] = [3429,30,3430,43]; + lineof_temp[6017] = [5884,18,5884,33]; + lineof_temp[1376] = [1520,48,1524,60]; + lineof_temp[1998] = [2148,21,2148,50]; + lineof_temp[2306] = [2437,4,2437,43]; + lineof_temp[5138] = [5082,8,5082,8]; + lineof_temp[6758] = [6463,12,6463,53]; + lineof_temp[6473] = [6271,32,6271,73]; + lineof_temp[4382] = [4422,24,4422,73]; + lineof_temp[2043] = [2230,18,2230,36]; + lineof_temp[3990] = [4007,42,4007,63]; + lineof_temp[4007] = [4028,8,4031,74]; + lineof_temp[4272] = [4308,18,4309,79]; + lineof_temp[5174] = [5119,12,5119,24]; + lineof_temp[7094] = [6885,40,6886,57]; + lineof_temp[690] = [756,14,756,32]; + lineof_temp[1703] = [1868,22,1868,48]; + lineof_temp[3508] = [3480,14,3480,47]; + lineof_temp[6239] = [6069,22,6069,55]; + lineof_temp[5436] = [5348,17,5348,38]; + lineof_temp[3511] = [3479,14,3479,14]; + lineof_temp[4678] = [4682,16,4682,49]; + lineof_temp[5881] = [5747,18,5747,64]; + lineof_temp[6268] = [6088,22,6088,40]; + lineof_temp[3181] = [3228,8,3230,43]; + lineof_temp[5237] = [5127,21,5127,54]; + lineof_temp[8] = [16,32,16,76]; + lineof_temp[204] = [247,37,247,59]; + lineof_temp[502] = [555,8,555,8]; + lineof_temp[2445] = [2585,14,2585,30]; + lineof_temp[3124] = [3217,38,3218,59]; + lineof_temp[6634] = [6397,28,6397,28]; + lineof_temp[2604] = [2706,26,2708,65]; + lineof_temp[3206] = [3297,22,3297,22]; + lineof_temp[1343] = [1487,43,1487,66]; + lineof_temp[2711] = [2801,10,2802,70]; + lineof_temp[6294] = [6104,14,6104,30]; + lineof_temp[7376] = [7099,8,7099,8]; + lineof_temp[1644] = [1724,20,1724,46]; + lineof_temp[3136] = [3192,30,3192,59]; + lineof_temp[814] = [933,20,933,38]; + lineof_temp[5546] = [5445,12,5445,71]; + lineof_temp[2850] = [2943,10,2943,29]; + lineof_temp[3347] = [3407,22,3407,49]; + lineof_temp[6795] = [6579,22,6579,59]; + lineof_temp[2927] = [3019,14,3023,68]; + lineof_temp[4204] = [4196,63,4196,68]; + lineof_temp[5013] = [4982,28,4982,54]; + lineof_temp[5612] = [5499,20,5499,31]; + lineof_temp[6708] = [6486,46,6486,73]; + lineof_temp[1258] = [1390,67,1390,73]; + lineof_temp[1553] = [1684,16,1684,51]; + lineof_temp[2944] = [3032,6,3032,27]; + lineof_temp[7238] = [6977,8,6978,30]; + lineof_temp[3134] = [3198,30,3198,30]; + lineof_temp[5757] = [5620,6,5620,60]; + lineof_temp[2354] = [2485,4,2485,46]; + lineof_temp[5626] = [5488,19,5488,58]; + lineof_temp[1809] = [1969,20,1969,53]; + lineof_temp[3310] = [3375,32,3375,47]; + lineof_temp[5041] = [5006,44,5006,53]; + lineof_temp[981] = [1048,46,1049,51]; + lineof_temp[3376] = [3425,30,3425,36]; + lineof_temp[4418] = [4275,32,4275,50]; + lineof_temp[5506] = [5379,12,5379,36]; + lineof_temp[2245] = [2379,6,2387,75]; + lineof_temp[5312] = [5232,31,5232,56]; + lineof_temp[306] = [323,12,324,41]; + lineof_temp[2000] = [2162,12,2162,61]; + lineof_temp[3037] = [3043,12,3043,12]; + lineof_temp[1154] = [1181,52,1183,58]; + lineof_temp[2268] = [2402,4,2402,27]; + lineof_temp[1626] = [1740,33,1740,68]; + lineof_temp[412] = [467,13,467,46]; + lineof_temp[1602] = [1729,10,1729,44]; + lineof_temp[2771] = [2856,34,2863,61]; + lineof_temp[2260] = [2398,4,2398,25]; + lineof_temp[6314] = [6122,18,6122,55]; + lineof_temp[3658] = [3547,30,3547,51]; + lineof_temp[4631] = [4633,6,4636,53]; + lineof_temp[5787] = [5648,6,5648,53]; + lineof_temp[307] = [322,10,324,43]; + lineof_temp[4297] = [4317,22,4319,73]; + lineof_temp[3551] = [3595,52,3595,65]; + lineof_temp[4316] = [4352,20,4355,71]; + lineof_temp[4769] = [4749,16,4749,31]; + lineof_temp[1733] = [1861,2,1892,12]; + lineof_temp[2693] = [2784,14,2784,30]; + lineof_temp[4121] = [4141,4,4141,30]; + lineof_temp[3301] = [3355,6,3359,82]; + lineof_temp[5018] = [4999,59,4999,73]; + lineof_temp[6964] = [6724,8,6725,30]; + lineof_temp[192] = [228,27,228,44]; + lineof_temp[2208] = [2358,20,2362,95]; + lineof_temp[2651] = [2761,22,2763,73]; + lineof_temp[3183] = [3226,15,3226,24]; + lineof_temp[6654] = [6420,18,6420,67]; + lineof_temp[5772] = [5638,12,5638,57]; + lineof_temp[1185] = [1159,26,1159,63]; + lineof_temp[1070] = [1292,58,1293,66]; + lineof_temp[32] = [49,14,49,39]; + lineof_temp[1823] = [1973,14,1978,49]; + lineof_temp[2870] = [2989,28,2990,73]; + lineof_temp[6912] = [6701,34,6701,71]; + lineof_temp[228] = [257,14,257,43]; + lineof_temp[3233] = [3250,6,3251,67]; + lineof_temp[7151] = [6923,38,6923,38]; + lineof_temp[5824] = [5686,6,5686,44]; + lineof_temp[2069] = [2197,22,2200,58]; + lineof_temp[3891] = [3933,22,3933,63]; + lineof_temp[3962] = [3973,4,3974,50]; + lineof_temp[5661] = [5542,10,5542,70]; + lineof_temp[6228] = [6048,14,6048,19]; + lineof_temp[7221] = [6972,14,6972,61]; + lineof_temp[6823] = [6607,36,6612,78]; + lineof_temp[7061] = [6841,26,6842,37]; + lineof_temp[1873] = [2031,30,2031,63]; + lineof_temp[4499] = [4512,28,4512,41]; + lineof_temp[1115] = [1179,54,1179,74]; + lineof_temp[2330] = [2461,4,2461,43]; + lineof_temp[4947] = [4903,28,4903,54]; + lineof_temp[5561] = [5460,32,5460,40]; + lineof_temp[5682] = [5552,4,5553,49]; + lineof_temp[6584] = [6359,10,6359,35]; + lineof_temp[2742] = [2820,8,2829,52]; + lineof_temp[7188] = [6954,60,6954,68]; + lineof_temp[2978] = [3070,38,3071,54]; + lineof_temp[6175] = [6018,53,6018,70]; + lineof_temp[2500] = [2627,14,2627,32]; + lineof_temp[6257] = [6060,4,6060,55]; + lineof_temp[3839] = [3878,23,3878,39]; + lineof_temp[6088] = [5958,34,5958,53]; + lineof_temp[2308] = [2439,4,2439,41]; + lineof_temp[6704] = [6492,54,6492,71]; + lineof_temp[1470] = [1588,6,1589,52]; + lineof_temp[4948] = [4930,30,4930,75]; + lineof_temp[5735] = [5602,14,5602,71]; + lineof_temp[6629] = [6401,50,6401,64]; + lineof_temp[6977] = [6752,22,6752,59]; + lineof_temp[2122] = [2292,26,2292,77]; + lineof_temp[5767] = [5632,14,5632,58]; + lineof_temp[171] = [215,10,215,25]; + lineof_temp[5178] = [5113,10,5113,39]; + lineof_temp[3650] = [3628,12,3693,22]; + lineof_temp[2933] = [3004,16,3004,56]; + lineof_temp[5668] = [5543,28,5543,28]; + lineof_temp[3227] = [3259,16,3261,69]; + lineof_temp[4048] = [4056,8,4056,8]; + lineof_temp[6950] = [6730,22,6730,59]; + lineof_temp[3577] = [3586,47,3586,53]; + lineof_temp[1136] = [1242,62,1250,72]; + lineof_temp[4586] = [4573,19,4573,54]; + lineof_temp[4701] = [4694,10,4697,53]; + lineof_temp[4793] = [4773,21,4773,46]; + lineof_temp[4932] = [4916,40,4916,73]; + lineof_temp[2447] = [2586,14,2586,35]; + lineof_temp[3213] = [3278,28,3279,61]; + lineof_temp[4287] = [4324,22,4325,53]; + lineof_temp[5581] = [5438,10,5438,10]; + lineof_temp[4014] = [4035,6,4035,16]; + lineof_temp[1552] = [1677,4,1677,14]; + lineof_temp[976] = [1043,32,1043,58]; + lineof_temp[6880] = [6663,14,6663,51]; + lineof_temp[1905] = [2006,22,2067,32]; + lineof_temp[2064] = [2190,18,2191,38]; + lineof_temp[2055] = [2205,18,2206,38]; + lineof_temp[5117] = [5066,24,5066,24]; + lineof_temp[6979] = [6762,38,6762,75]; + lineof_temp[7222] = [6970,8,6971,30]; + lineof_temp[72] = [101,14,101,74]; + lineof_temp[261] = [297,31,297,57]; + lineof_temp[5012] = [4983,30,4988,87]; + lineof_temp[1917] = [2098,46,2098,58]; + lineof_temp[6929] = [6662,12,6710,19]; + lineof_temp[2515] = [2646,20,2646,40]; + lineof_temp[1625] = [1743,30,1776,41]; + lineof_temp[1791] = [1951,12,1954,75]; + lineof_temp[2118] = [2259,16,2259,40]; + lineof_temp[6328] = [6119,14,6119,19]; + lineof_temp[4153] = [4159,4,4159,28]; + lineof_temp[4694] = [4690,17,4690,45]; + lineof_temp[832] = [944,18,951,71]; + lineof_temp[5424] = [5337,20,5337,21]; + lineof_temp[1407] = [1501,40,1501,62]; + lineof_temp[1852] = [2015,36,2016,62]; + lineof_temp[4767] = [4750,20,4750,69]; + lineof_temp[3261] = [3304,2,3304,37]; + lineof_temp[3951] = [3968,8,3968,37]; + lineof_temp[5467] = [5370,8,5370,32]; + lineof_temp[989] = [1063,38,1063,73]; + lineof_temp[5841] = [5714,61,5714,72]; + lineof_temp[4371] = [4406,24,4406,24]; + lineof_temp[4815] = [4785,21,4785,50]; + lineof_temp[3129] = [3215,36,3215,36]; + lineof_temp[5168] = [5111,16,5111,44]; + lineof_temp[6112] = [5971,18,5974,54]; + lineof_temp[3611] = [3662,60,3662,74]; + lineof_temp[1405] = [1503,38,1545,45]; + lineof_temp[409] = [444,2,461,12]; + lineof_temp[1895] = [2053,38,2054,76]; + lineof_temp[5873] = [5736,18,5739,105]; + lineof_temp[6692] = [6470,34,6470,63]; + lineof_temp[376] = [429,30,429,64]; + lineof_temp[1438] = [1556,12,1559,34]; + lineof_temp[2121] = [2274,22,2274,50]; + lineof_temp[4216] = [4208,45,4208,73]; + lineof_temp[2768] = [2857,44,2857,48]; + lineof_temp[3004] = [3102,36,3102,56]; + lineof_temp[2210] = [2354,30,2355,62]; + lineof_temp[6009] = [5878,24,5878,60]; + lineof_temp[6867] = [6647,12,6648,31]; + lineof_temp[1203] = [1358,22,1358,68]; + lineof_temp[6071] = [5913,29,5913,57]; + lineof_temp[6825] = [6616,38,6616,75]; + lineof_temp[5844] = [5714,34,5714,75]; + lineof_temp[106] = [134,14,134,35]; + lineof_temp[2160] = [2304,15,2304,17]; + lineof_temp[5951] = [5816,18,5816,33]; + lineof_temp[2963] = [3115,65,3115,75]; + lineof_temp[4376] = [4418,40,4418,70]; + lineof_temp[6444] = [6227,20,6227,20]; + lineof_temp[4908] = [4851,2,4855,3]; + lineof_temp[5149] = [5104,22,5104,43]; + lineof_temp[1854] = [2012,32,2013,58]; + lineof_temp[6008] = [5878,24,5878,60]; + lineof_temp[6785] = [6565,12,6565,33]; + lineof_temp[7366] = [7092,28,7092,31]; + lineof_temp[493] = [465,2,512,4]; + lineof_temp[914] = [1073,33,1073,58]; + lineof_temp[5337] = [5249,8,5249,71]; + lineof_temp[5416] = [5334,19,5334,48]; + lineof_temp[5378] = [5289,11,5289,38]; + lineof_temp[1299] = [1445,18,1445,24]; + lineof_temp[2232] = [2343,8,2343,8]; + lineof_temp[3079] = [3166,16,3166,59]; + lineof_temp[6486] = [6191,4,6191,47]; + lineof_temp[1557] = [1689,14,1689,75]; + lineof_temp[2795] = [2870,14,2870,51]; + lineof_temp[2472] = [2608,28,2608,48]; + lineof_temp[5196] = [5142,26,5142,67]; + lineof_temp[5604] = [5435,2,5469,4]; + lineof_temp[7108] = [6861,27,6861,49]; + lineof_temp[3097] = [3175,16,3175,53]; + lineof_temp[6238] = [6069,38,6069,54]; + lineof_temp[574] = [639,12,639,58]; + lineof_temp[1335] = [1472,24,1474,69]; + lineof_temp[3116] = [3196,36,3196,65]; + lineof_temp[3899] = [3925,18,3925,56]; + lineof_temp[1306] = [1454,36,1454,44]; + lineof_temp[3766] = [3812,43,3812,51]; + lineof_temp[2614] = [2709,35,2709,35]; + lineof_temp[4465] = [4470,21,4470,63]; + lineof_temp[6181] = [6012,6,6012,31]; + lineof_temp[1573] = [1705,16,1705,42]; + lineof_temp[4018] = [4044,17,4044,37]; + lineof_temp[3142] = [3189,18,3189,66]; + lineof_temp[6947] = [6728,14,6728,61]; + lineof_temp[3971] = [3990,11,3990,48]; + lineof_temp[7311] = [7064,46,7066,50]; + lineof_temp[966] = [1089,40,1090,56]; + lineof_temp[3115] = [3192,30,3192,59]; + lineof_temp[1024] = [979,12,979,48]; + lineof_temp[5232] = [5131,8,5131,45]; + lineof_temp[6087] = [5949,20,5950,38]; + lineof_temp[1631] = [1737,41,1737,42]; + lineof_temp[6978] = [6762,38,6762,75]; + lineof_temp[3787] = [3847,35,3847,40]; + lineof_temp[1305] = [1454,36,1454,44]; + lineof_temp[2333] = [2466,6,2466,29]; + lineof_temp[5480] = [5386,18,5389,68]; + lineof_temp[5744] = [5608,14,5608,41]; + lineof_temp[7342] = [7047,18,7079,56]; + lineof_temp[3598] = [3635,26,3635,77]; + lineof_temp[1159] = [1177,55,1177,66]; + lineof_temp[393] = [450,21,450,52]; + lineof_temp[4600] = [4607,21,4607,49]; + lineof_temp[5222] = [5148,20,5148,59]; + lineof_temp[197] = [241,6,241,48]; + lineof_temp[1614] = [1763,48,1767,78]; + lineof_temp[2713] = [2800,12,2800,54]; + lineof_temp[3732] = [3769,16,3769,64]; + lineof_temp[4993] = [4971,28,4971,68]; + lineof_temp[360] = [398,8,398,8]; + lineof_temp[526] = [592,38,592,75]; + lineof_temp[6255] = [6062,14,6062,19]; + lineof_temp[6840] = [6593,26,6594,45]; + lineof_temp[2566] = [2673,35,2673,35]; + lineof_temp[1795] = [1956,31,1956,67]; + lineof_temp[1972] = [2134,22,2134,75]; + lineof_temp[5658] = [5536,28,5536,28]; + lineof_temp[3819] = [3858,22,3858,22]; + lineof_temp[4570] = [4580,24,4583,70]; + lineof_temp[7030] = [6808,20,6808,61]; + lineof_temp[7052] = [6846,20,6849,60]; + lineof_temp[4604] = [4610,28,4610,73]; + lineof_temp[1638] = [1731,10,1731,45]; + lineof_temp[5167] = [5111,16,5111,44]; + lineof_temp[719] = [793,21,793,56]; + lineof_temp[4882] = [4830,4,4830,16]; + lineof_temp[6695] = [6473,36,6473,77]; + lineof_temp[7154] = [6918,39,6918,48]; + lineof_temp[4639] = [4643,4,4643,14]; + lineof_temp[5643] = [5523,56,5523,61]; + lineof_temp[6146] = [5979,30,5979,69]; + lineof_temp[2156] = [2306,16,2306,67]; + lineof_temp[4401] = [4275,32,4275,50]; + lineof_temp[347] = [382,6,385,72]; + lineof_temp[4322] = [4358,18,4362,71]; + lineof_temp[852] = [981,13,981,50]; + lineof_temp[3571] = [3602,50,3602,50]; + lineof_temp[5017] = [4989,28,4990,47]; + lineof_temp[5051] = [5020,38,5020,76]; + lineof_temp[6803] = [6586,14,6586,51]; + lineof_temp[6818] = [6604,38,6604,75]; + lineof_temp[3680] = [3727,18,3728,78]; + lineof_temp[938] = [1103,38,1103,53]; + lineof_temp[1508] = [1632,4,1633,26]; + lineof_temp[5211] = [5147,25,5147,46]; + lineof_temp[4995] = [5028,34,5028,72]; + lineof_temp[5889] = [5730,6,5750,16]; + lineof_temp[1239] = [1419,62,1419,73]; + lineof_temp[4881] = [4831,6,4831,44]; + lineof_temp[5994] = [5864,16,5864,59]; + lineof_temp[3215] = [3277,26,3279,69]; + lineof_temp[2365] = [2498,6,2498,42]; + lineof_temp[6493] = [6280,18,6280,36]; + lineof_temp[4419] = [4275,61,4275,63]; + lineof_temp[4873] = [4822,6,4829,58]; + lineof_temp[5857] = [5724,16,5724,59]; + lineof_temp[6479] = [6262,16,6272,24]; + lineof_temp[3063] = [3135,12,3135,66]; + lineof_temp[3393] = [3416,18,3416,27]; + lineof_temp[6691] = [6467,28,6467,74]; + lineof_temp[6509] = [6283,55,6283,60]; + lineof_temp[5628] = [5508,11,5508,48]; + lineof_temp[4406] = [4281,42,4281,54]; + lineof_temp[4588] = [4574,14,4574,14]; + lineof_temp[445] = [517,14,517,57]; + lineof_temp[698] = [755,2,758,58]; + lineof_temp[3604] = [3645,40,3645,56]; + lineof_temp[5405] = [5312,10,5314,38]; + lineof_temp[609] = [649,20,682,30]; + lineof_temp[2465] = [2591,12,2591,49]; + lineof_temp[2506] = [2632,12,2641,66]; + lineof_temp[438] = [467,13,467,46]; + lineof_temp[934] = [1121,32,1126,93]; + lineof_temp[5863] = [5724,70,5724,73]; + lineof_temp[300] = [315,8,316,27]; + lineof_temp[3668] = [3719,26,3719,75]; + lineof_temp[3731] = [3772,12,3787,32]; + lineof_temp[4696] = [4695,19,4695,48]; + lineof_temp[4874] = [4798,6,4821,8]; + lineof_temp[151] = [189,32,190,58]; + lineof_temp[1816] = [1964,12,1965,43]; + lineof_temp[6535] = [6318,14,6318,30]; + lineof_temp[3014] = [3092,64,3092,74]; + lineof_temp[2627] = [2724,39,2724,54]; + lineof_temp[4460] = [4456,19,4456,47]; + lineof_temp[5797] = [5663,19,5663,48]; + lineof_temp[6283] = [6088,22,6088,40]; + lineof_temp[6546] = [6340,50,6340,74]; + lineof_temp[3428] = [3351,33,3351,68]; + lineof_temp[278] = [309,35,309,61]; + lineof_temp[3912] = [3912,14,3913,52]; + lineof_temp[170] = [154,8,155,27]; + lineof_temp[1244] = [1413,48,1419,79]; + lineof_temp[5740] = [5605,14,5605,68]; + lineof_temp[3422] = [3454,8,3454,33]; + lineof_temp[3513] = [3475,12,3475,50]; + lineof_temp[468] = [537,27,537,65]; + lineof_temp[1607] = [1745,34,1745,73]; + lineof_temp[2158] = [2306,8,2306,69]; + lineof_temp[3958] = [3974,16,3974,35]; + lineof_temp[4119] = [4143,8,4144,13]; + lineof_temp[4761] = [4722,8,4722,8]; + lineof_temp[2171] = [2324,16,2327,54]; + lineof_temp[2382] = [2513,4,2513,31]; + lineof_temp[5073] = [4957,8,4957,8]; + lineof_temp[5949] = [5817,22,5817,71]; + lineof_temp[1100] = [1282,52,1282,52]; + lineof_temp[2692] = [2749,4,2749,31]; + lineof_temp[3177] = [3229,51,3229,71]; + lineof_temp[4654] = [4662,19,4662,44]; + lineof_temp[6052] = [5923,34,5923,46]; + lineof_temp[6843] = [6630,28,6630,75]; + lineof_temp[5484] = [5394,20,5395,50]; + lineof_temp[1222] = [1406,56,1406,66]; + lineof_temp[2140] = [2277,20,2281,93]; + lineof_temp[6374] = [6166,18,6166,55]; + lineof_temp[6827] = [6615,36,6616,77]; + lineof_temp[4748] = [4731,59,4731,64]; + lineof_temp[1951] = [2120,10,2120,73]; + lineof_temp[5987] = [5811,15,5811,50]; + lineof_temp[4100] = [4128,6,4128,53]; + lineof_temp[5452] = [5332,8,5342,10]; + lineof_temp[1439] = [1554,6,1564,74]; + lineof_temp[5137] = [5081,41,5081,47]; + lineof_temp[6106] = [5972,30,5972,49]; + lineof_temp[6498] = [6286,27,6286,63]; + lineof_temp[3286] = [3337,16,3337,19]; + lineof_temp[3526] = [3560,66,3560,77]; + lineof_temp[5344] = [5263,20,5264,39]; + lineof_temp[873] = [1000,26,1002,30]; + lineof_temp[1069] = [1283,56,1286,89]; + lineof_temp[3547] = [3585,38,3585,77]; + lineof_temp[3634] = [3645,38,3645,57]; + lineof_temp[3320] = [3392,36,3392,57]; + lineof_temp[6258] = [6078,14,6078,30]; + lineof_temp[2204] = [2360,26,2360,75]; + lineof_temp[4988] = [4962,23,4962,58]; + lineof_temp[7003] = [6754,26,6755,45]; + lineof_temp[4215] = [4197,4,4197,38]; + lineof_temp[3943] = [3962,8,3962,48]; + lineof_temp[6215] = [6047,14,6047,30]; + lineof_temp[3007] = [3099,36,3100,78]; + lineof_temp[1451] = [1580,15,1583,26]; + lineof_temp[4008] = [4027,8,4027,35]; + lineof_temp[3354] = [3371,24,3371,69]; + lineof_temp[983] = [1054,46,1055,51]; + lineof_temp[2265] = [2403,14,2403,29]; + lineof_temp[2621] = [2720,22,2722,61]; + lineof_temp[3032] = [3057,18,3057,18]; + lineof_temp[6117] = [5940,14,5940,14]; + lineof_temp[6921] = [6669,32,6669,38]; + lineof_temp[46] = [72,4,72,26]; + lineof_temp[2004] = [2161,8,2164,54]; + lineof_temp[4611] = [4606,12,4617,30]; + lineof_temp[1168] = [1257,38,1257,72]; + lineof_temp[3954] = [3967,4,3968,50]; + lineof_temp[2579] = [2686,35,2686,60]; + lineof_temp[4535] = [4519,72,4520,24]; + lineof_temp[5694] = [5563,4,5564,42]; + lineof_temp[2720] = [2796,4,2796,12]; + lineof_temp[3411] = [3460,20,3460,69]; + lineof_temp[4821] = [4786,18,4786,18]; + lineof_temp[6440] = [6231,26,6231,26]; + lineof_temp[1869] = [2010,43,2010,56]; + lineof_temp[6058] = [5925,45,5925,53]; + lineof_temp[427] = [485,30,485,35]; + lineof_temp[5902] = [5765,15,5765,50]; + lineof_temp[5990] = [5810,6,5855,16]; + lineof_temp[7184] = [6956,32,6956,58]; + lineof_temp[1052] = [1274,49,1274,67]; + lineof_temp[3191] = [3243,45,3243,65]; + lineof_temp[6549] = [6329,32,6329,37]; + lineof_temp[1981] = [2143,12,2143,53]; + lineof_temp[2746] = [2811,8,2816,9]; + lineof_temp[7259] = [7003,20,7003,43]; + lineof_temp[1112] = [1171,45,1171,72]; + lineof_temp[354] = [374,18,374,44]; + lineof_temp[557] = [616,16,620,105]; + lineof_temp[1124] = [1205,56,1206,87]; + lineof_temp[1491] = [1620,10,1620,57]; + lineof_temp[1666] = [1819,14,1819,26]; + lineof_temp[2469] = [2603,17,2606,28]; + lineof_temp[3271] = [3331,17,3331,30]; + lineof_temp[4068] = [4076,8,4076,33]; + lineof_temp[1117] = [1179,52,1179,75]; + lineof_temp[2086] = [2175,12,2176,41]; + lineof_temp[459] = [525,6,525,25]; + lineof_temp[777] = [797,22,892,32]; + lineof_temp[5144] = [5098,20,5098,37]; + lineof_temp[5763] = [5628,14,5628,55]; + lineof_temp[6881] = [6663,14,6663,51]; + lineof_temp[272] = [303,10,303,36]; + lineof_temp[3033] = [3054,12,3117,23]; + lineof_temp[6229] = [6047,6,6047,31]; + lineof_temp[7212] = [6959,8,6959,74]; + lineof_temp[145] = [189,32,190,58]; + lineof_temp[7191] = [6950,23,6950,57]; + lineof_temp[1771] = [1917,23,1917,23]; + lineof_temp[1057] = [1274,48,1275,76]; + lineof_temp[1315] = [1448,16,1454,54]; + lineof_temp[4335] = [4374,26,4374,26]; + lineof_temp[5259] = [5193,19,5193,46]; + lineof_temp[7244] = [6996,20,6996,57]; + lineof_temp[3831] = [3792,27,3792,49]; + lineof_temp[15] = [26,6,26,22]; + lineof_temp[4572] = [4588,30,4590,44]; + lineof_temp[6129] = [5982,13,5982,45]; + lineof_temp[2636] = [2648,8,2648,33]; + lineof_temp[2660] = [2766,12,2769,16]; + lineof_temp[6414] = [6213,30,6213,69]; + lineof_temp[7370] = [7087,32,7087,47]; + lineof_temp[5693] = [5565,6,5565,42]; + lineof_temp[1054] = [1275,53,1275,74]; + lineof_temp[1707] = [1873,20,1875,59]; + lineof_temp[4832] = [4796,14,4796,68]; + lineof_temp[7102] = [6874,34,6874,47]; + lineof_temp[6043] = [5861,10,5861,19]; + lineof_temp[740] = [830,36,830,73]; + lineof_temp[5286] = [5183,33,5183,63]; + lineof_temp[1673] = [1785,16,1785,21]; + lineof_temp[6485] = [6192,14,6192,23]; + lineof_temp[6618] = [6371,14,6372,39]; + lineof_temp[152] = [187,28,187,42]; + lineof_temp[5977] = [5853,34,5853,67]; + lineof_temp[7100] = [6880,32,6880,76]; + lineof_temp[1452] = [1580,15,1583,26]; + lineof_temp[2473] = [2610,8,2610,75]; + lineof_temp[429] = [505,30,505,66]; + lineof_temp[1487] = [1618,10,1618,57]; + lineof_temp[2576] = [2679,20,2684,69]; + lineof_temp[4380] = [4423,24,4423,57]; + lineof_temp[437] = [469,18,469,23]; + lineof_temp[4962] = [4898,20,4939,30]; + lineof_temp[2209] = [2354,30,2355,62]; + lineof_temp[3234] = [3252,15,3252,20]; + lineof_temp[5184] = [5108,2,5124,13]; + lineof_temp[1688] = [1837,8,1851,21]; + lineof_temp[2053] = [2208,22,2211,58]; + lineof_temp[3587] = [3575,22,3624,52]; + lineof_temp[3562] = [3615,60,3616,76]; + lineof_temp[3221] = [3275,22,3283,77]; + lineof_temp[5056] = [4996,38,4996,56]; + lineof_temp[5566] = [5459,24,5459,24]; + lineof_temp[2335] = [2468,6,2468,31]; + lineof_temp[4813] = [4770,10,4771,31]; + lineof_temp[720] = [798,32,798,71]; + lineof_temp[3140] = [3189,26,3189,64]; + lineof_temp[3773] = [3836,22,3836,74]; + lineof_temp[4901] = [4861,42,4861,51]; + lineof_temp[5801] = [5671,31,5671,68]; + lineof_temp[2458] = [2598,20,2598,38]; + lineof_temp[2526] = [2747,20,2747,71]; + lineof_temp[6455] = [6248,26,6253,83]; + lineof_temp[16] = [26,6,26,22]; + lineof_temp[2114] = [2261,16,2261,31]; + lineof_temp[5386] = [5294,35,5294,40]; + lineof_temp[5538] = [5417,22,5417,44]; + lineof_temp[953] = [1099,40,1099,45]; + lineof_temp[1713] = [1867,12,1878,23]; + lineof_temp[4725] = [4712,21,4712,50]; + lineof_temp[6041] = [5870,6,5908,16]; + lineof_temp[3373] = [3430,54,3430,57]; + lineof_temp[5820] = [5686,33,5686,41]; + lineof_temp[7044] = [6822,18,6822,37]; + lineof_temp[5291] = [5214,16,5214,51]; + lineof_temp[5370] = [5267,12,5267,31]; + lineof_temp[5446] = [5349,12,5349,51]; + lineof_temp[3763] = [3817,20,3825,76]; + lineof_temp[4759] = [4721,11,4721,39]; + lineof_temp[6901] = [6691,38,6691,75]; + lineof_temp[1835] = [1991,16,1991,40]; + lineof_temp[5332] = [5251,16,5251,71]; + lineof_temp[5980] = [5851,69,5852,22]; + lineof_temp[1247] = [1421,56,1421,67]; + lineof_temp[1736] = [1900,12,1900,61]; + lineof_temp[2407] = [2540,6,2540,34]; + lineof_temp[7344] = [7082,26,7082,65]; + lineof_temp[5085] = [5045,17,5045,45]; + lineof_temp[1535] = [1667,49,1667,73]; + lineof_temp[1662] = [1793,24,1793,30]; + lineof_temp[2731] = [2818,16,2818,35]; + lineof_temp[5900] = [5757,4,5757,14]; + lineof_temp[1297] = [1443,18,1443,49]; + lineof_temp[2632] = [2723,31,2723,31]; + lineof_temp[6788] = [6569,14,6573,70]; + lineof_temp[1319] = [1445,18,1445,24]; + lineof_temp[2937] = [3002,6,3002,28]; + lineof_temp[4610] = [4608,18,4608,18]; + lineof_temp[5698] = [5566,4,5567,61]; + lineof_temp[63] = [99,9,99,30]; + lineof_temp[4644] = [4650,12,4650,64]; + lineof_temp[5586] = [5476,20,5476,48]; + lineof_temp[2702] = [2793,8,2795,77]; + lineof_temp[3350] = [3410,24,3410,45]; + lineof_temp[1735] = [1901,12,1901,45]; + lineof_temp[5774] = [5637,8,5637,20]; + lineof_temp[5885] = [5733,20,5733,25]; + lineof_temp[555] = [617,18,620,103]; + lineof_temp[786] = [893,20,894,38]; + lineof_temp[1120] = [1191,54,1192,72]; + lineof_temp[4643] = [4650,20,4650,62]; + lineof_temp[2356] = [2487,4,2487,50]; + lineof_temp[6337] = [6140,20,6140,54]; + lineof_temp[5720] = [5587,4,5588,47]; + lineof_temp[6070] = [5914,6,5914,17]; + lineof_temp[6743] = [6531,30,6531,30]; + lineof_temp[4036] = [4055,11,4055,29]; + lineof_temp[4084] = [4113,16,4113,63]; + lineof_temp[4524] = [4537,34,4552,52]; + lineof_temp[962] = [1080,36,1080,68]; + lineof_temp[944] = [1111,40,1112,52]; + lineof_temp[3304] = [3365,18,3365,34]; + lineof_temp[4880] = [4832,6,4833,79]; + lineof_temp[434] = [479,16,480,35]; + lineof_temp[1027] = [1141,20,1141,46]; + lineof_temp[1919] = [2098,38,2098,60]; + lineof_temp[5779] = [5646,12,5646,54]; + lineof_temp[5967] = [5835,20,5835,48]; + lineof_temp[7040] = [6805,8,6806,31]; + lineof_temp[264] = [298,10,298,36]; + lineof_temp[1739] = [1899,8,1902,54]; + lineof_temp[5437] = [5347,14,5348,39]; + lineof_temp[6523] = [6312,22,6312,41]; + lineof_temp[4307] = [4301,14,4301,14]; + lineof_temp[4936] = [4921,46,4922,62]; + lineof_temp[5498] = [5395,61,5395,63]; + lineof_temp[5827] = [5682,15,5682,38]; + lineof_temp[6461] = [6242,56,6242,61]; + lineof_temp[2488] = [2617,49,2617,54]; + lineof_temp[6539] = [6323,24,6323,44]; + lineof_temp[3288] = [3335,62,3335,69]; + lineof_temp[4724] = [4714,18,4714,60]; + lineof_temp[2318] = [2449,4,2449,52]; + lineof_temp[3836] = [3879,12,3879,42]; + lineof_temp[1653] = [1805,20,1808,75]; + lineof_temp[2315] = [2448,6,2448,35]; + lineof_temp[2847] = [2903,37,2903,55]; + lineof_temp[3980] = [4011,14,4012,35]; + lineof_temp[5623] = [5500,4,5500,16]; + lineof_temp[2788] = [2843,18,2843,18]; + lineof_temp[5823] = [5686,14,5686,42]; + lineof_temp[6602] = [6377,28,6377,70]; + lineof_temp[7087] = [6871,36,6871,58]; + lineof_temp[490] = [528,4,528,36]; + lineof_temp[6441] = [6228,20,6238,28]; + lineof_temp[5952] = [5816,18,5819,102]; + lineof_temp[6140] = [5984,26,5984,37]; + lineof_temp[730] = [821,42,821,75]; + lineof_temp[1300] = [1445,18,1445,24]; + lineof_temp[3039] = [3038,6,3038,35]; + lineof_temp[3391] = [3434,14,3438,90]; + lineof_temp[1213] = [1373,51,1373,64]; + lineof_temp[982] = [1045,32,1046,51]; + lineof_temp[2539] = [2659,26,2661,65]; + lineof_temp[1563] = [1684,62,1684,69]; + lineof_temp[4185] = [4180,4,4180,37]; + lineof_temp[6779] = [6564,22,6564,59]; + lineof_temp[1671] = [1828,12,1828,61]; + lineof_temp[2408] = [2539,4,2539,41]; + lineof_temp[241] = [279,10,279,27]; + lineof_temp[5132] = [5089,18,5089,30]; + lineof_temp[480] = [539,24,539,24]; + lineof_temp[5121] = [5055,17,5055,52]; + lineof_temp[6128] = [5981,13,5981,31]; + lineof_temp[317] = [339,6,339,27]; + lineof_temp[2873] = [2988,28,2988,28]; + lineof_temp[5108] = [5070,28,5070,71]; + lineof_temp[5158] = [5099,14,5099,14]; + lineof_temp[4347] = [4386,17,4386,44]; + lineof_temp[355] = [394,6,397,41]; + lineof_temp[1114] = [1176,46,1176,73]; + lineof_temp[6566] = [6347,10,6347,35]; + lineof_temp[1955] = [2118,8,2118,8]; + lineof_temp[1144] = [1203,54,1217,54]; + lineof_temp[44] = [56,31,56,47]; + lineof_temp[3583] = [3580,28,3624,48]; + lineof_temp[4259] = [4254,10,4254,49]; + lineof_temp[7201] = [6958,10,6958,37]; + lineof_temp[120] = [157,12,157,34]; + lineof_temp[1893] = [2060,46,2060,46]; + lineof_temp[5673] = [5548,6,5548,53]; + lineof_temp[7036] = [6808,20,6808,61]; + lineof_temp[6370] = [6147,4,6147,41]; + lineof_temp[4603] = [4613,24,4616,77]; + lineof_temp[5324] = [5227,57,5227,63]; + lineof_temp[2295] = [2416,6,2424,74]; + lineof_temp[5736] = [5602,14,5602,71]; + lineof_temp[6202] = [6038,22,6038,42]; + lineof_temp[276] = [299,4,300,23]; + lineof_temp[1678] = [1781,32,1781,53]; + lineof_temp[2827] = [2905,14,2905,75]; + lineof_temp[5917] = [5792,22,5792,51]; + lineof_temp[1699] = [1854,28,1854,46]; + lineof_temp[2569] = [2684,30,2684,63]; + lineof_temp[2311] = [2444,6,2444,35]; + lineof_temp[3591] = [3568,38,3568,43]; + lineof_temp[7124] = [6893,23,6893,57]; + lineof_temp[6766] = [6443,10,6444,38]; + lineof_temp[853] = [984,20,984,64]; + lineof_temp[1528] = [1650,14,1650,29]; + lineof_temp[4027] = [4045,14,4045,14]; + lineof_temp[6938] = [6720,41,6720,59]; + lineof_temp[1543] = [1660,16,1660,21]; + lineof_temp[1290] = [973,29,973,67]; + lineof_temp[1274] = [1362,28,1362,33]; + lineof_temp[1987] = [2124,2,2145,12]; + lineof_temp[4590] = [4569,14,4569,62]; + lineof_temp[6171] = [6012,14,6012,30]; + lineof_temp[878] = [1003,28,1003,28]; + lineof_temp[1382] = [1520,47,1529,63]; + lineof_temp[2650] = [2763,56,2763,69]; + lineof_temp[3165] = [3153,10,3153,31]; + lineof_temp[3889] = [3933,30,3933,61]; + lineof_temp[3240] = [3234,2,3237,37]; + lineof_temp[3863] = [3897,22,3897,42]; + lineof_temp[5214] = [5146,22,5147,47]; + lineof_temp[5850] = [5709,19,5709,27]; + lineof_temp[2667] = [2756,19,2756,36]; + lineof_temp[5169] = [5118,22,5118,41]; + lineof_temp[7056] = [6833,26,6833,41]; + lineof_temp[7315] = [7076,56,7078,69]; + lineof_temp[3071] = [3155,12,3155,40]; + lineof_temp[2860] = [2963,18,2963,24]; + lineof_temp[6967] = [6747,14,6747,51]; + lineof_temp[7101] = [6875,32,6878,77]; + lineof_temp[2930] = [3017,14,3017,34]; + lineof_temp[3027] = [3060,22,3106,32]; + lineof_temp[868] = [990,26,991,59]; + lineof_temp[1815] = [1966,14,1970,113]; + lineof_temp[4745] = [4736,28,4736,75]; + lineof_temp[6267] = [6082,8,6083,27]; + lineof_temp[6266] = [6084,10,6084,57]; + lineof_temp[785] = [895,30,895,35]; + lineof_temp[1408] = [1485,32,1545,49]; + lineof_temp[4348] = [4390,18,4391,76]; + lineof_temp[5695] = [5568,14,5568,50]; + lineof_temp[250] = [288,8,289,37]; + lineof_temp[2605] = [2705,24,2708,67]; + lineof_temp[5262] = [5202,26,5202,74]; + lineof_temp[6481] = [6260,52,6260,57]; + lineof_temp[6738] = [6538,43,6538,50]; + lineof_temp[1093] = [1290,54,1327,65]; + lineof_temp[1433] = [1562,31,1562,49]; + lineof_temp[2037] = [2233,14,2237,54]; + lineof_temp[2577] = [2686,43,2686,58]; + lineof_temp[4077] = [4105,14,4105,51]; + lineof_temp[446] = [517,14,517,57]; + lineof_temp[1284] = [1137,12,1137,60]; + lineof_temp[4605] = [4611,31,4611,33]; + lineof_temp[1872] = [2032,32,2032,54]; + lineof_temp[2012] = [2170,30,2170,44]; + lineof_temp[5369] = [5267,20,5267,29]; + lineof_temp[6118] = [5938,8,5976,18]; + lineof_temp[4234] = [4226,6,4226,22]; + lineof_temp[5605] = [5434,24,5434,62]; + lineof_temp[2423] = [2557,6,2557,24]; + lineof_temp[5654] = [5537,36,5537,62]; + lineof_temp[2817] = [2898,12,2898,25]; + lineof_temp[3845] = [3892,14,3892,25]; + lineof_temp[5471] = [5375,21,5375,39]; + lineof_temp[217] = [259,18,259,48]; + lineof_temp[1683] = [1848,20,1848,62]; + lineof_temp[6379] = [6172,38,6172,72]; + lineof_temp[4403] = [4278,37,4278,50]; + lineof_temp[6489] = [6276,6,6276,35]; + lineof_temp[699] = [754,16,754,34]; + lineof_temp[6213] = [6020,4,6020,31]; + lineof_temp[1948] = [2117,12,2117,48]; + lineof_temp[4907] = [4856,2,4856,29]; + lineof_temp[5901] = [5765,15,5765,50]; + lineof_temp[2427] = [2561,6,2561,24]; + lineof_temp[3553] = [3594,42,3594,75]; + lineof_temp[5165] = [5109,11,5109,39]; + lineof_temp[3920] = [3896,4,3948,11]; + lineof_temp[6739] = [6539,36,6539,36]; + lineof_temp[6345] = [6140,65,6140,66]; + lineof_temp[4537] = [4518,16,4552,64]; + lineof_temp[81] = [104,34,104,70]; + lineof_temp[2483] = [2617,20,2617,38]; + lineof_temp[2699] = [2783,4,2783,30]; + lineof_temp[4281] = [4330,32,4331,47]; + lineof_temp[4156] = [4162,6,4162,63]; + lineof_temp[6702] = [6483,48,6485,71]; + lineof_temp[7072] = [6822,48,6822,57]; + lineof_temp[4542] = [4512,10,4514,12]; + lineof_temp[134] = [182,28,182,46]; + lineof_temp[509] = [568,22,568,77]; + lineof_temp[24] = [39,4,39,25]; + lineof_temp[5685] = [5559,6,5559,43]; + lineof_temp[1172] = [1166,34,1166,56]; + lineof_temp[3997] = [3994,12,3995,76]; + lineof_temp[6163] = [6002,12,6010,68]; + lineof_temp[415] = [478,18,478,74]; + lineof_temp[2016] = [2179,33,2179,47]; + lineof_temp[5367] = [5269,12,5279,23]; + lineof_temp[245] = [288,31,288,57]; + lineof_temp[830] = [946,31,946,36]; + lineof_temp[917] = [1074,35,1074,64]; + lineof_temp[6134] = [5988,46,5988,54]; + lineof_temp[6233] = [6065,18,6065,55]; + lineof_temp[7261] = [7001,69,7001,71]; + lineof_temp[3546] = [3585,38,3585,77]; + lineof_temp[5298] = [5210,43,5210,67]; + lineof_temp[6126] = [5991,4,5991,70]; + lineof_temp[2584] = [2675,14,2676,34]; + lineof_temp[1995] = [2150,56,2150,61]; + lineof_temp[2891] = [2945,2,2952,4]; + lineof_temp[4597] = [4604,15,4604,45]; + lineof_temp[1326] = [1460,20,1460,48]; + lineof_temp[1001] = [1043,32,1043,58]; + lineof_temp[1780] = [1940,14,1943,109]; + lineof_temp[6332] = [6132,14,6132,30]; + lineof_temp[6537] = [6320,18,6320,36]; + lineof_temp[3582] = [3582,34,3582,34]; + lineof_temp[6013] = [5873,37,5873,49]; + lineof_temp[6683] = [6436,10,6437,32]; + lineof_temp[1501] = [1629,18,1629,39]; + lineof_temp[4169] = [4168,4,4168,37]; + lineof_temp[5477] = [5387,22,5387,71]; + lineof_temp[2206] = [2359,22,2362,93]; + lineof_temp[6636] = [6392,27,6392,64]; + lineof_temp[2901] = [2998,6,2998,27]; + lineof_temp[457] = [525,14,525,23]; + lineof_temp[725] = [808,40,809,48]; + lineof_temp[4140] = [4155,46,4155,63]; + lineof_temp[7116] = [6854,18,6854,37]; + lineof_temp[331] = [364,6,364,17]; + lineof_temp[4152] = [4160,6,4160,64]; + lineof_temp[6417] = [6221,36,6221,77]; + lineof_temp[3833] = [3876,12,3876,31]; + lineof_temp[3352] = [3379,28,3379,34]; + lineof_temp[4184] = [4181,6,4182,73]; + lineof_temp[6661] = [6425,32,6425,60]; + lineof_temp[2125] = [2291,24,2293,37]; + lineof_temp[3323] = [3391,36,3391,36]; + lineof_temp[2940] = [2996,10,2996,19]; + lineof_temp[5053] = [5021,52,5021,52]; + lineof_temp[931] = [1122,34,1122,49]; + lineof_temp[5492] = [5399,31,5399,52]; + lineof_temp[1853] = [2014,34,2016,64]; + lineof_temp[2168] = [2325,18,2327,53]; + lineof_temp[675] = [738,14,738,32]; + lineof_temp[1022] = [982,10,982,10]; + lineof_temp[6168] = [5998,6,5998,31]; + lineof_temp[6292] = [6077,4,6077,43]; + lineof_temp[4454] = [4456,19,4456,47]; + lineof_temp[4647] = [4649,12,4649,12]; + lineof_temp[3339] = [3396,30,3396,51]; + lineof_temp[1280] = [1360,18,1360,18]; + lineof_temp[3717] = [3782,28,3783,72]; + lineof_temp[2398] = [2529,4,2529,39]; + lineof_temp[6951] = [6730,14,6730,61]; + lineof_temp[4413] = [4290,34,4290,34]; + lineof_temp[7345] = [7082,26,7082,65]; + lineof_temp[4551] = [4554,10,4554,70]; + lineof_temp[234] = [248,8,248,38]; + lineof_temp[1015] = [987,24,987,29]; + lineof_temp[2794] = [2836,4,2836,36]; + lineof_temp[3431] = [3483,26,3483,67]; + lineof_temp[5392] = [5292,10,5303,18]; + lineof_temp[380] = [428,24,428,45]; + lineof_temp[5086] = [5045,56,5045,61]; + lineof_temp[2856] = [2955,6,2956,68]; + lineof_temp[2456] = [2592,21,2595,33]; + lineof_temp[6012] = [5874,18,5874,44]; + lineof_temp[6562] = [6318,6,6318,31]; + lineof_temp[2349] = [2482,6,2482,31]; + lineof_temp[2810] = [2894,18,2894,36]; + lineof_temp[1181] = [1337,32,1341,76]; + lineof_temp[1615] = [1760,46,1761,54]; + lineof_temp[163] = [205,18,205,33]; + lineof_temp[4829] = [4742,2,4789,12]; + lineof_temp[1217] = [1381,40,1381,73]; + lineof_temp[3389] = [3435,16,3438,88]; + lineof_temp[4906] = [4857,2,4861,57]; + lineof_temp[4975] = [4869,14,4869,19]; + lineof_temp[5666] = [5542,10,5542,70]; + lineof_temp[368] = [408,24,408,45]; + lineof_temp[4181] = [4177,4,4177,36]; + lineof_temp[1428] = [1439,4,1440,26]; + lineof_temp[6891] = [6678,38,6678,75]; + lineof_temp[1372] = [1505,46,1509,75]; + lineof_temp[6130] = [5982,13,5982,45]; + lineof_temp[1413] = [1477,26,1545,53]; + lineof_temp[1979] = [2143,20,2143,51]; + lineof_temp[5364] = [5270,21,5270,48]; + lineof_temp[660] = [730,49,730,74]; + lineof_temp[2507] = [2632,12,2641,66]; + lineof_temp[1145] = [1201,56,1201,77]; + lineof_temp[3624] = [3661,48,3662,76]; + lineof_temp[5632] = [5508,11,5508,48]; + lineof_temp[1826] = [1961,8,1961,39]; + lineof_temp[3549] = [3588,53,3588,71]; + lineof_temp[5730] = [5593,4,5594,30]; + lineof_temp[3666] = [3712,18,3712,39]; + lineof_temp[4896] = [4852,13,4852,50]; + lineof_temp[447] = [520,12,520,46]; + lineof_temp[2892] = [2944,2,2944,26]; + lineof_temp[4056] = [4083,14,4083,62]; + lineof_temp[4054] = [4077,17,4077,50]; + lineof_temp[1598] = [1726,12,1726,51]; + lineof_temp[6639] = [6391,16,6405,63]; + lineof_temp[340] = [375,10,375,37]; + lineof_temp[745] = [837,46,838,74]; + lineof_temp[3280] = [3344,27,3344,29]; + lineof_temp[3933] = [3955,10,3956,50]; + lineof_temp[3326] = [3385,38,3385,49]; + lineof_temp[3472] = [3522,65,3522,70]; + lineof_temp[4511] = [4540,40,4541,71]; + lineof_temp[5119] = [5061,16,5062,34]; + lineof_temp[5639] = [5523,15,5523,45]; + lineof_temp[1471] = [1586,6,1587,53]; + lineof_temp[2364] = [2495,4,2495,39]; + lineof_temp[2296] = [2414,4,2415,42]; + lineof_temp[4632] = [4632,6,4632,30]; + lineof_temp[6111] = [5973,24,5973,24]; + lineof_temp[6335] = [6136,10,6136,57]; + lineof_temp[6963] = [6726,18,6726,23]; + lineof_temp[795] = [788,63,788,64]; + lineof_temp[3614] = [3663,52,3663,77]; + lineof_temp[4994] = [4971,28,4971,68]; + lineof_temp[1328] = [1460,12,1460,49]; + lineof_temp[4244] = [4236,6,4236,22]; + lineof_temp[6446] = [6223,12,6224,30]; + lineof_temp[737] = [816,34,816,42]; + lineof_temp[4277] = [4312,22,4313,45]; + lineof_temp[1425] = [1458,8,1545,65]; + lineof_temp[3123] = [3209,34,3214,42]; + lineof_temp[4557] = [4566,20,4566,44]; + lineof_temp[4076] = [4105,14,4105,51]; + lineof_temp[1757] = [1931,29,1931,64]; + lineof_temp[537] = [566,67,566,72]; + lineof_temp[1254] = [1392,58,1392,68]; + lineof_temp[5867] = [5731,15,5731,50]; + lineof_temp[7140] = [6939,50,6942,74]; + lineof_temp[4] = [16,33,16,54]; + lineof_temp[5246] = [5176,16,5176,64]; + lineof_temp[897] = [1013,55,1013,72]; + lineof_temp[1249] = [1420,46,1420,58]; + lineof_temp[5124] = [5054,8,5076,18]; + lineof_temp[189] = [231,6,231,28]; + lineof_temp[3823] = [3828,20,3828,25]; + lineof_temp[4961] = [4900,26,4900,26]; + lineof_temp[2653] = [2768,18,2768,77]; + lineof_temp[544] = [562,8,562,8]; + lineof_temp[477] = [540,32,540,37]; + lineof_temp[2923] = [3023,44,3023,64]; + lineof_temp[879] = [998,22,1007,30]; + lineof_temp[3580] = [3581,38,3581,43]; + lineof_temp[6047] = [5929,4,5929,35]; + lineof_temp[6154] = [6009,28,6009,53]; + lineof_temp[6841] = [6630,36,6630,73]; + lineof_temp[1960] = [2131,22,2131,48]; + lineof_temp[3538] = [3565,12,3565,28]; + lineof_temp[2051] = [2208,22,2208,37]; + lineof_temp[4782] = [4764,20,4764,53]; + lineof_temp[5401] = [5317,16,5318,55]; + lineof_temp[6159] = [6008,24,6010,61]; + lineof_temp[2685] = [2775,16,2775,29]; + lineof_temp[216] = [256,16,256,42]; + lineof_temp[520] = [582,36,587,114]; + lineof_temp[6186] = [6027,22,6027,59]; + lineof_temp[489] = [529,6,547,36]; + lineof_temp[3848] = [3890,30,3890,70]; + lineof_temp[5409] = [5289,49,5289,55]; + lineof_temp[1101] = [1276,46,1328,57]; + lineof_temp[4721] = [4712,21,4712,50]; + lineof_temp[6286] = [6087,10,6100,28]; + lineof_temp[3927] = [3953,8,3953,17]; + lineof_temp[4443] = [4445,14,4445,36]; + lineof_temp[431] = [505,22,505,68]; + lineof_temp[475] = [545,28,545,68]; + lineof_temp[1588] = [1706,14,1714,75]; + lineof_temp[5224] = [5144,20,5145,48]; + lineof_temp[1133] = [1234,64,1234,71]; + lineof_temp[1726] = [1883,18,1883,18]; + lineof_temp[3348] = [3410,32,3410,43]; + lineof_temp[4385] = [4421,20,4424,68]; + lineof_temp[5156] = [5098,20,5098,37]; + lineof_temp[5572] = [5461,16,5461,28]; + lineof_temp[1191] = [1347,28,1351,85]; + lineof_temp[1] = [16,7,16,28]; + lineof_temp[5465] = [5365,8,5368,42]; + lineof_temp[5999] = [5864,16,5864,59]; + lineof_temp[2216] = [2348,22,2348,60]; + lineof_temp[5495] = [5398,22,5401,60]; + lineof_temp[343] = [384,10,384,52]; + lineof_temp[1469] = [1590,6,1601,68]; + lineof_temp[1692] = [1834,2,1851,25]; + lineof_temp[2857] = [2955,6,2956,68]; + lineof_temp[5602] = [5482,4,5482,16]; + lineof_temp[6496] = [6283,24,6283,44]; + lineof_temp[2369] = [2502,6,2502,37]; + lineof_temp[2527] = [2744,24,2744,63]; + lineof_temp[7251] = [7003,20,7003,43]; + lineof_temp[506] = [561,12,561,53]; + lineof_temp[4374] = [4418,42,4418,69]; + lineof_temp[5208] = [5157,26,5157,34]; + lineof_temp[5267] = [5198,31,5198,56]; + lineof_temp[5795] = [5659,6,5659,76]; + lineof_temp[2302] = [2433,4,2433,36]; + lineof_temp[6291] = [6078,6,6078,31]; + lineof_temp[1971] = [2135,20,2136,75]; + lineof_temp[3824] = [3804,12,3827,14]; + lineof_temp[4081] = [4109,16,4109,61]; + lineof_temp[6092] = [5958,64,5958,70]; + lineof_temp[5450] = [5345,10,5345,28]; + lineof_temp[181] = [229,12,229,23]; + lineof_temp[4816] = [4787,26,4787,59]; + lineof_temp[5783] = [5644,8,5646,74]; + lineof_temp[4448] = [4450,31,4450,69]; + lineof_temp[402] = [451,18,451,18]; + lineof_temp[5254] = [5165,10,5165,19]; + lineof_temp[1354] = [1493,40,1495,69]; + lineof_temp[2478] = [2612,10,2612,37]; + lineof_temp[3278] = [3345,33,3345,51]; + lineof_temp[5721] = [5592,30,5592,37]; + lineof_temp[1387] = [1530,50,1534,62]; + lineof_temp[4433] = [4265,4,4295,32]; + lineof_temp[6305] = [6113,23,6113,26]; + lineof_temp[2504] = [2634,16,2641,64]; + lineof_temp[5579] = [5437,13,5437,31]; + lineof_temp[6621] = [6396,31,6396,50]; + lineof_temp[6216] = [6051,18,6051,55]; + lineof_temp[2231] = [2342,61,2342,62]; + lineof_temp[6919] = [6705,28,6705,75]; + lineof_temp[2041] = [2240,14,2242,33]; + lineof_temp[2544] = [2656,20,2661,69]; + lineof_temp[5133] = [5087,18,5087,52]; + lineof_temp[6005] = [5871,15,5871,50]; + lineof_temp[1755] = [1923,18,1927,98]; + lineof_temp[2867] = [2985,28,2986,61]; + lineof_temp[2821] = [2879,61,2879,63]; + lineof_temp[3765] = [3810,18,3812,32]; + lineof_temp[7041] = [6801,14,6801,21]; + lineof_temp[515] = [577,32,577,53]; + lineof_temp[676] = [738,43,738,48]; + lineof_temp[2563] = [2674,35,2674,60]; + lineof_temp[5411] = [5288,2,5320,12]; + lineof_temp[5800] = [5669,25,5669,43]; + lineof_temp[6143] = [5982,4,5982,46]; + lineof_temp[542] = [561,12,561,53]; + lineof_temp[2517] = [2647,10,2647,28]; + lineof_temp[4766] = [4751,20,4751,53]; + lineof_temp[4091] = [4109,16,4109,61]; + lineof_temp[2666] = [2757,8,2758,55]; + lineof_temp[6756] = [6466,12,6496,34]; + lineof_temp[2491] = [2615,8,2615,33]; + lineof_temp[3675] = [3711,24,3711,29]; + lineof_temp[4592] = [4571,8,4571,8]; + lineof_temp[935] = [1106,42,1106,75]; + lineof_temp[4704] = [4690,8,4690,46]; + lineof_temp[2880] = [2966,16,2968,69]; + lineof_temp[3272] = [3335,16,3335,51]; + lineof_temp[4953] = [4933,32,4933,47]; + lineof_temp[1712] = [1869,18,1869,18]; + lineof_temp[2758] = [2845,28,2845,75]; + lineof_temp[525] = [574,28,575,50]; + lineof_temp[5084] = [5047,14,5047,47]; + lineof_temp[161] = [169,26,169,32]; + lineof_temp[4527] = [4529,41,4529,49]; + lineof_temp[6775] = [6552,12,6552,37]; + lineof_temp[2663] = [2764,8,2771,70]; + lineof_temp[3661] = [3702,6,3702,53]; + lineof_temp[5404] = [5315,12,5318,58]; + lineof_temp[4485] = [4484,10,4496,47]; + lineof_temp[5421] = [5338,26,5338,70]; + lineof_temp[4186] = [4184,14,4184,45]; + lineof_temp[6577] = [6348,8,6352,75]; + lineof_temp[7125] = [6893,23,6893,57]; + lineof_temp[5046] = [5020,38,5020,76]; + lineof_temp[6100] = [5964,64,5964,70]; + lineof_temp[7262] = [7002,16,7002,16]; + lineof_temp[4046] = [4055,11,4055,29]; + lineof_temp[84] = [104,14,104,71]; + lineof_temp[183] = [230,12,230,23]; + lineof_temp[1086] = [1298,64,1299,76]; + lineof_temp[1336] = [1471,47,1471,71]; + lineof_temp[2082] = [2221,14,2225,66]; + lineof_temp[2853] = [2948,45,2948,66]; + lineof_temp[3995] = [4001,16,4001,16]; + lineof_temp[5456] = [5326,8,5326,8]; + lineof_temp[7008] = [6753,32,6753,38]; + lineof_temp[5311] = [5232,48,5232,55]; + lineof_temp[281] = [309,12,310,41]; + lineof_temp[1911] = [2081,34,2082,60]; + lineof_temp[4620] = [4599,24,4599,49]; + lineof_temp[2002] = [2161,8,2161,23]; + lineof_temp[4397] = [4269,19,4269,44]; + lineof_temp[413] = [471,14,472,72]; + lineof_temp[5283] = [5189,14,5189,19]; + lineof_temp[5969] = [5844,28,5844,56]; + lineof_temp[5024] = [5001,42,5002,64]; + lineof_temp[5229] = [5135,16,5135,16]; + lineof_temp[6034] = [5890,24,5890,29]; + lineof_temp[788] = [793,21,793,56]; + lineof_temp[1994] = [2150,14,2150,45]; + lineof_temp[890] = [1017,26,1019,67]; + lineof_temp[1572] = [1700,10,1700,43]; + lineof_temp[148] = [193,38,193,49]; + lineof_temp[1250] = [1410,52,1410,69]; + lineof_temp[5160] = [5095,11,5095,39]; + lineof_temp[6467] = [6260,22,6260,41]; + lineof_temp[1050] = [1269,42,1271,69]; + lineof_temp[4840] = [4813,30,4814,57]; + lineof_temp[7010] = [6750,20,6791,26]; + lineof_temp[5419] = [5336,24,5336,52]; + lineof_temp[5594] = [5474,15,5474,43]; + lineof_temp[2587] = [2694,26,2694,41]; + lineof_temp[6285] = [6089,16,6089,16]; + lineof_temp[1006] = [1037,28,1037,60]; + lineof_temp[6221] = [6055,20,6055,58]; + lineof_temp[119] = [158,14,158,29]; + lineof_temp[2360] = [2491,4,2491,56]; + lineof_temp[4533] = [4522,22,4552,60]; + lineof_temp[2274] = [2413,14,2413,25]; + lineof_temp[4798] = [4781,54,4781,67]; + lineof_temp[1346] = [1488,43,1491,68]; + lineof_temp[5059] = [4972,26,4980,28]; + lineof_temp[6545] = [6340,50,6340,74]; + lineof_temp[1939] = [2001,14,2107,24]; + lineof_temp[5315] = [5234,32,5234,70]; + lineof_temp[4241] = [4231,4,4231,33]; + lineof_temp[4430] = [4266,17,4266,34]; + lineof_temp[6142] = [5983,4,5989,12]; + lineof_temp[1404] = [1503,38,1545,45]; + lineof_temp[1525] = [1653,10,1653,72]; + lineof_temp[1878] = [2049,46,2050,73]; + lineof_temp[6341] = [6144,16,6144,68]; + lineof_temp[3212] = [3270,20,3272,63]; + lineof_temp[6789] = [6567,12,6568,31]; + lineof_temp[174] = [152,4,152,27]; + lineof_temp[367] = [409,6,409,9]; + lineof_temp[2874] = [2982,22,2990,77]; + lineof_temp[6531] = [6309,8,6310,26]; + lineof_temp[1480] = [1604,8,1607,57]; + lineof_temp[3050] = [3130,10,3130,64]; + lineof_temp[352] = [376,2,377,49]; + lineof_temp[5115] = [5064,28,5064,71]; + lineof_temp[3015] = [3092,56,3092,76]; + lineof_temp[6439] = [6230,33,6230,35]; + lineof_temp[397] = [457,28,459,61]; + lineof_temp[6611] = [6383,20,6383,67]; + lineof_temp[5293] = [5214,8,5214,53]; + lineof_temp[4818] = [4787,18,4787,61]; + lineof_temp[7077] = [6852,17,6852,33]; + lineof_temp[1776] = [1941,18,1941,67]; + lineof_temp[3055] = [3122,22,3122,44]; + lineof_temp[6445] = [6225,14,6238,32]; + lineof_temp[2314] = [2445,4,2445,52]; + lineof_temp[632] = [645,12,683,14]; + lineof_temp[925] = [1098,37,1098,70]; + lineof_temp[3096] = [3175,16,3175,53]; + lineof_temp[436] = [473,12,474,30]; + lineof_temp[6853] = [6585,12,6635,19]; + lineof_temp[6941] = [6720,8,6720,33]; + lineof_temp[2979] = [3069,34,3069,49]; + lineof_temp[3363] = [3364,8,3364,64]; + lineof_temp[1458] = [1596,20,1598,71]; + lineof_temp[1657] = [1810,30,1812,62]; + lineof_temp[5116] = [5065,31,5065,34]; + lineof_temp[4136] = [4150,6,4152,25]; + lineof_temp[7144] = [6930,44,6942,78]; + lineof_temp[3502] = [3505,24,3505,33]; + lineof_temp[7217] = [6975,20,6975,57]; + lineof_temp[6892] = [6678,38,6678,75]; + lineof_temp[3214] = [3278,28,3279,61]; + lineof_temp[3356] = [3373,20,3373,20]; + lineof_temp[1802] = [1958,18,1958,40]; + lineof_temp[3806] = [3864,28,3865,57]; + lineof_temp[2572] = [2682,26,2684,65]; + lineof_temp[5381] = [5296,22,5296,43]; + lineof_temp[7022] = [6798,14,6798,70]; + lineof_temp[991] = [1061,34,1063,75]; + lineof_temp[951] = [1111,40,1112,52]; + lineof_temp[3225] = [3268,16,3284,24]; + lineof_temp[3441] = [3499,34,3499,73]; + lineof_temp[3440] = [3499,42,3499,71]; + lineof_temp[5361] = [5274,20,5274,40]; + lineof_temp[2108] = [2269,22,2269,35]; + lineof_temp[718] = [793,21,793,56]; + lineof_temp[101] = [131,14,131,39]; + lineof_temp[3125] = [3217,38,3218,59]; + lineof_temp[69] = [101,44,101,73]; + lineof_temp[5675] = [5551,14,5551,43]; + lineof_temp[7015] = [6746,12,6794,19]; + lineof_temp[4138] = [4155,54,4155,61]; + lineof_temp[4146] = [4158,14,4158,63]; + lineof_temp[4746] = [4733,22,4736,79]; + lineof_temp[1729] = [1864,16,1864,21]; + lineof_temp[2011] = [2170,30,2170,44]; + lineof_temp[4466] = [4470,21,4470,63]; + lineof_temp[3266] = [3328,6,3328,27]; + lineof_temp[118] = [150,4,150,25]; + lineof_temp[2123] = [2292,26,2292,77]; + lineof_temp[2471] = [2608,28,2608,48]; + lineof_temp[5193] = [5136,20,5136,74]; + lineof_temp[4976] = [4867,4,4868,35]; + lineof_temp[6422] = [6215,26,6215,26]; + lineof_temp[1578] = [1709,43,1709,60]; + lineof_temp[5662] = [5542,10,5542,70]; + lineof_temp[6940] = [6720,33,6720,61]; + lineof_temp[2452] = [2590,20,2590,36]; + lineof_temp[4756] = [4724,57,4724,63]; + lineof_temp[5777] = [5636,6,5639,72]; + lineof_temp[6822] = [6612,46,6612,72]; + lineof_temp[952] = [1109,34,1110,53]; + lineof_temp[5112] = [5072,28,5072,76]; + lineof_temp[6277] = [6097,28,6097,28]; + lineof_temp[4162] = [4167,8,4167,75]; + lineof_temp[3054] = [3123,2,3123,52]; + lineof_temp[4310] = [4347,21,4347,38]; + lineof_temp[6902] = [6691,38,6691,75]; + lineof_temp[1398] = [1541,48,1542,74]; + lineof_temp[2706] = [2789,4,2790,23]; + lineof_temp[4222] = [4210,6,4210,55]; + lineof_temp[5790] = [5651,14,5651,48]; + lineof_temp[6386] = [6167,8,6168,26]; + lineof_temp[4219] = [4208,43,4208,74]; + lineof_temp[2431] = [2565,6,2565,29]; + lineof_temp[4223] = [4209,4,4209,30]; + lineof_temp[6751] = [6500,18,6506,20]; + lineof_temp[7377] = [7097,2,7100,53]; + lineof_temp[1892] = [2059,53,2059,59]; + lineof_temp[3425] = [3362,6,3362,41]; + lineof_temp[4969] = [4941,22,4941,61]; + lineof_temp[450] = [518,12,518,61]; + lineof_temp[2710] = [2802,12,2802,69]; + lineof_temp[1719] = [1887,20,1889,59]; + lineof_temp[107] = [134,6,134,37]; + lineof_temp[5619] = [5494,4,5495,25]; + lineof_temp[1401] = [1539,44,1542,77]; + lineof_temp[2275] = [2413,6,2413,27]; + lineof_temp[612] = [648,20,648,20]; + lineof_temp[1104] = [1272,51,1272,59]; + lineof_temp[2662] = [2770,14,2770,14]; + lineof_temp[5778] = [5633,4,5635,25]; + lineof_temp[904] = [1037,28,1037,60]; + lineof_temp[3741] = [3801,10,3801,71]; + lineof_temp[5609] = [5489,16,5489,29]; + lineof_temp[1595] = [1696,2,1721,12]; + lineof_temp[6173] = [6014,18,6014,36]; + lineof_temp[822] = [938,22,938,36]; + lineof_temp[2938] = [3001,6,3001,57]; + lineof_temp[5831] = [5697,10,5698,62]; + lineof_temp[2840] = [2919,14,2919,14]; + lineof_temp[1231] = [1402,61,1402,67]; + lineof_temp[6790] = [6576,22,6576,59]; + lineof_temp[1409] = [1485,32,1545,49]; + lineof_temp[4473] = [4472,16,4472,16]; + lineof_temp[5711] = [5586,12,5586,45]; + lineof_temp[6166] = [6001,12,6001,12]; + lineof_temp[1750] = [1925,24,1925,73]; + lineof_temp[5793] = [5580,10,5580,20]; + lineof_temp[7257] = [7004,26,7004,53]; + lineof_temp[193] = [241,7,241,25]; + lineof_temp[659] = [724,10,725,40]; + lineof_temp[960] = [1080,44,1080,66]; + lineof_temp[5832] = [5698,73,5699,11]; + lineof_temp[2084] = [2184,18,2184,36]; + lineof_temp[2405] = [2538,6,2538,33]; + lineof_temp[4020] = [4046,25,4046,47]; + lineof_temp[4564] = [4573,19,4573,54]; + lineof_temp[3386] = [3436,20,3436,69]; + lineof_temp[3152] = [3182,14,3182,14]; + lineof_temp[5003] = [4976,30,4976,75]; + lineof_temp[915] = [1073,33,1073,58]; + lineof_temp[4144] = [4154,6,4156,15]; + lineof_temp[4034] = [4034,26,4034,69]; + lineof_temp[5557] = [5451,16,5453,45]; + lineof_temp[6344] = [6140,20,6140,54]; + lineof_temp[154] = [183,26,183,41]; + lineof_temp[5513] = [5375,54,5375,70]; + lineof_temp[6453] = [6253,36,6253,77]; + lineof_temp[6808] = [6634,18,6634,65]; + lineof_temp[6665] = [6427,12,6427,57]; + lineof_temp[4282] = [4329,30,4331,49]; + lineof_temp[4566] = [4576,23,4576,45]; + lineof_temp[4797] = [4779,37,4779,69]; + lineof_temp[531] = [570,30,570,69]; + lineof_temp[4325] = [4365,42,4365,56]; + lineof_temp[4578] = [4580,24,4583,70]; + lineof_temp[6438] = [6229,30,6229,69]; + lineof_temp[2007] = [2167,14,2167,50]; + lineof_temp[3353] = [3374,20,3378,22]; + lineof_temp[4708] = [4687,2,4698,13]; + lineof_temp[5322] = [5229,16,5229,53]; + lineof_temp[4633] = [4630,4,4631,46]; + lineof_temp[1759] = [1933,40,1933,65]; + lineof_temp[1166] = [1168,34,1169,71]; + lineof_temp[2877] = [2981,22,2981,22]; + lineof_temp[6862] = [6646,22,6646,59]; + lineof_temp[71] = [101,14,101,74]; + lineof_temp[4032] = [4040,2,4050,20]; + lineof_temp[6680] = [6439,14,6442,58]; + lineof_temp[3095] = [3170,42,3170,63]; + lineof_temp[455] = [514,4,521,15]; + lineof_temp[2149] = [2254,61,2254,62]; + lineof_temp[3327] = [3385,30,3385,51]; + lineof_temp[5843] = [5714,42,5714,73]; + lineof_temp[6882] = [6664,20,6664,44]; + lineof_temp[2411] = [2544,6,2544,30]; + lineof_temp[3192] = [3243,45,3243,65]; + lineof_temp[3253] = [3313,23,3313,25]; + lineof_temp[4522] = [4542,57,4542,62]; + lineof_temp[47] = [75,6,75,29]; + lineof_temp[4127] = [4147,8,4148,13]; + lineof_temp[5241] = [5174,50,5174,57]; + lineof_temp[91] = [114,6,114,22]; + lineof_temp[2537] = [2661,30,2661,63]; + lineof_temp[2729] = [2817,16,2817,44]; + lineof_temp[7074] = [6821,6,6850,27]; + lineof_temp[2886] = [2959,8,2992,19]; + lineof_temp[1610] = [1751,42,1755,72]; + lineof_temp[5135] = [5083,8,5090,25]; + lineof_temp[7155] = [6919,32,6919,32]; + lineof_temp[99] = [128,6,128,22]; + lineof_temp[1859] = [2026,48,2026,60]; + lineof_temp[2283] = [2419,14,2421,78]; + lineof_temp[1689] = [1836,6,1836,18]; + lineof_temp[2377] = [2510,6,2510,38]; + lineof_temp[6079] = [5947,20,5947,41]; + lineof_temp[6074] = [5939,19,5939,49]; + lineof_temp[6587] = [6411,16,6411,53]; + lineof_temp[1763] = [1930,18,1933,69]; + lineof_temp[5591] = [5478,14,5478,35]; + lineof_temp[6637] = [6393,29,6393,34]; + lineof_temp[2346] = [2477,4,2477,36]; + lineof_temp[3119] = [3210,36,3211,76]; + lineof_temp[4370] = [4405,56,4405,61]; + lineof_temp[936] = [1104,42,1105,58]; + lineof_temp[4872] = [4823,8,4829,56]; + lineof_temp[891] = [1022,28,1024,79]; + lineof_temp[5458] = [5323,24,5323,57]; + lineof_temp[2052] = [2208,22,2211,58]; + lineof_temp[6152] = [6008,25,6008,42]; + lineof_temp[4661] = [4665,14,4666,72]; + lineof_temp[2352] = [2483,4,2483,47]; + lineof_temp[5853] = [5705,4,5706,40]; + lineof_temp[263] = [298,10,298,36]; + lineof_temp[1760] = [1931,29,1931,64]; + lineof_temp[6684] = [6445,32,6445,60]; + lineof_temp[238] = [242,4,242,30]; + lineof_temp[1067] = [1285,59,1286,88]; + lineof_temp[86] = [102,6,102,17]; + lineof_temp[4941] = [4917,38,4918,68]; + lineof_temp[1569] = [1697,11,1697,46]; + lineof_temp[6460] = [6242,26,6242,45]; + lineof_temp[1392] = [1530,49,1538,65]; + lineof_temp[6250] = [6069,22,6069,55]; + lineof_temp[80] = [104,49,104,69]; + lineof_temp[3254] = [3314,16,3314,16]; + lineof_temp[6153] = [6009,28,6009,53]; + lineof_temp[7012] = [6749,18,6791,28]; + lineof_temp[2997] = [3098,44,3098,71]; + lineof_temp[4375] = [4418,42,4418,69]; + lineof_temp[5710] = [5584,15,5584,42]; + lineof_temp[188] = [232,4,232,54]; + lineof_temp[3114] = [3192,30,3192,59]; + lineof_temp[4500] = [4516,19,4516,46]; + lineof_temp[4247] = [4237,4,4237,28]; + lineof_temp[913] = [1040,30,1042,65]; + lineof_temp[4919] = [4874,8,4874,29]; + lineof_temp[5876] = [5734,14,5734,47]; + lineof_temp[1827] = [1948,14,1948,32]; + lineof_temp[4731] = [4710,12,4710,12]; + lineof_temp[5009] = [4984,32,4984,47]; + lineof_temp[7047] = [6825,23,6825,59]; + lineof_temp[1288] = [979,2,1135,4]; + lineof_temp[3930] = [3955,14,3955,24]; + lineof_temp[5963] = [5831,28,5831,54]; + lineof_temp[2366] = [2497,4,2497,49]; + lineof_temp[2553] = [2672,30,2672,63]; + lineof_temp[2807] = [2890,20,2893,71]; + lineof_temp[3804] = [3859,31,3860,60]; + lineof_temp[1206] = [1365,33,1365,71]; + lineof_temp[1238] = [1419,62,1419,73]; + lineof_temp[1529] = [1650,40,1650,46]; + lineof_temp[2186] = [2332,14,2335,96]; + lineof_temp[5469] = [5362,12,5362,19]; + lineof_temp[5543] = [5439,14,5439,68]; + lineof_temp[1077] = [1306,66,1308,71]; + lineof_temp[2403] = [2536,6,2536,34]; + lineof_temp[3565] = [3614,56,3620,190]; + lineof_temp[4270] = [4304,18,4305,79]; + lineof_temp[160] = [198,20,199,39]; + lineof_temp[4338] = [4365,22,4366,45]; + lineof_temp[246] = [288,31,288,57]; + lineof_temp[2281] = [2420,16,2421,76]; + lineof_temp[3379] = [3424,20,3432,68]; + lineof_temp[4163] = [4167,8,4167,75]; + lineof_temp[3890] = [3933,30,3933,61]; + lineof_temp[7246] = [6994,12,6994,48]; + lineof_temp[7183] = [6954,27,6954,49]; + lineof_temp[1396] = [1544,44,1544,73]; + lineof_temp[1554] = [1684,16,1684,51]; + lineof_temp[305] = [323,12,324,41]; + lineof_temp[622] = [689,37,689,51]; + lineof_temp[756] = [854,50,856,54]; + lineof_temp[5815] = [5664,12,5664,12]; + lineof_temp[7169] = [6893,23,6893,57]; + lineof_temp[7282] = [7024,14,7024,51]; + lineof_temp[1215] = [1382,50,1382,60]; + lineof_temp[1550] = [1680,10,1680,69]; + lineof_temp[2562] = [2674,43,2674,58]; + lineof_temp[2818] = [2897,10,2897,22]; + lineof_temp[2384] = [2515,4,2515,37]; + lineof_temp[3629] = [3651,48,3651,76]; + lineof_temp[3] = [16,33,16,54]; + lineof_temp[2172] = [2323,14,2327,56]; + lineof_temp[4073] = [4069,8,4069,8]; + lineof_temp[21] = [38,6,38,21]; + lineof_temp[3989] = [3998,14,3999,35]; + lineof_temp[1338] = [1479,38,1479,66]; + lineof_temp[2196] = [2342,12,2342,50]; + lineof_temp[5406] = [5305,16,5305,22]; + lineof_temp[6044] = [5860,27,5860,52]; + lineof_temp[7059] = [6832,24,6837,72]; + lineof_temp[6369] = [6148,6,6148,31]; + lineof_temp[1119] = [1191,54,1192,72]; + lineof_temp[1227] = [1404,62,1404,72]; + lineof_temp[2722] = [2582,29,2582,53]; + lineof_temp[2815] = [2884,16,2884,71]; + lineof_temp[4847] = [4809,60,4809,66]; + lineof_temp[3090] = [3168,18,3168,38]; + lineof_temp[1349] = [1487,40,1491,69]; + lineof_temp[2790] = [2838,16,2838,64]; + lineof_temp[4517] = [4545,52,4545,67]; + lineof_temp[563] = [631,14,631,64]; + lineof_temp[1984] = [2125,12,2125,50]; + lineof_temp[4768] = [4750,20,4750,69]; + lineof_temp[1388] = [1536,54,1538,63]; + lineof_temp[5472] = [5375,21,5375,39]; + lineof_temp[3156] = [3169,8,3169,45]; + lineof_temp[3210] = [3271,22,3272,55]; + lineof_temp[5016] = [4991,30,4992,74]; + lineof_temp[6320] = [6128,38,6128,69]; + lineof_temp[2954] = [3048,57,3048,59]; + lineof_temp[4583] = [4576,56,4576,64]; + lineof_temp[5791] = [5651,6,5651,50]; + lineof_temp[3439] = [3499,42,3499,71]; + lineof_temp[1546] = [1659,8,1659,8]; + lineof_temp[4509] = [4527,32,4528,78]; + lineof_temp[7120] = [6852,6,6852,34]; + lineof_temp[1646] = [1783,12,1783,50]; + lineof_temp[2242] = [2386,12,2386,37]; + lineof_temp[5895] = [5761,12,5761,63]; + lineof_temp[3449] = [3487,32,3487,36]; + lineof_temp[4958] = [4902,34,4902,52]; + lineof_temp[5128] = [5051,2,5076,22]; + lineof_temp[5218] = [5153,30,5153,38]; + lineof_temp[3623] = [3663,52,3663,77]; + lineof_temp[6470] = [6263,26,6263,65]; + lineof_temp[5765] = [5628,6,5628,57]; + lineof_temp[6727] = [6509,22,6513,61]; + lineof_temp[6812] = [6591,22,6591,59]; + lineof_temp[930] = [1123,38,1124,54]; + lineof_temp[6195] = [6032,14,6032,44]; + lineof_temp[6987] = [6769,38,6769,75]; + lineof_temp[1539] = [1670,20,1670,48]; + lineof_temp[2756] = [2838,16,2838,64]; + lineof_temp[5076] = [4953,20,4953,44]; + lineof_temp[6579] = [6346,4,6346,49]; + lineof_temp[7104] = [6871,69,6872,31]; + lineof_temp[787] = [795,26,795,31]; + lineof_temp[4231] = [4221,4,4221,31]; + lineof_temp[4593] = [4568,2,4596,30]; + lineof_temp[1526] = [1653,10,1653,72]; + lineof_temp[3866] = [3908,12,3909,51]; + lineof_temp[6278] = [6093,22,6099,77]; + lineof_temp[550] = [610,14,610,35]; + lineof_temp[1200] = [1146,18,1146,18]; + lineof_temp[2078] = [2223,20,2223,69]; + lineof_temp[3111] = [3188,28,3188,60]; + lineof_temp[7177] = [6888,4,6888,40]; + lineof_temp[142] = [189,33,189,55]; + lineof_temp[416] = [476,16,477,35]; + lineof_temp[3707] = [3750,10,3764,20]; + lineof_temp[7021] = [6798,14,6798,70]; + lineof_temp[7065] = [6829,28,6829,37]; + lineof_temp[2413] = [2546,6,2546,40]; + lineof_temp[3516] = [3474,2,3544,23]; + lineof_temp[3169] = [3150,12,3150,24]; + lineof_temp[2271] = [2377,10,2377,28]; + lineof_temp[2907] = [3004,16,3004,56]; + lineof_temp[1518] = [1641,12,1641,55]; + lineof_temp[5657] = [5536,19,5536,24]; + lineof_temp[6657] = [6419,14,6422,58]; + lineof_temp[4147] = [4158,14,4158,63]; + lineof_temp[5153] = [5102,14,5102,42]; + lineof_temp[5207] = [5144,20,5145,48]; + lineof_temp[364] = [410,12,410,28]; + lineof_temp[2796] = [2870,14,2870,51]; + lineof_temp[6245] = [6074,25,6074,65]; + lineof_temp[3145] = [3186,16,3186,31]; + lineof_temp[987] = [1063,46,1063,71]; + lineof_temp[3012] = [3086,38,3090,77]; + lineof_temp[3482] = [3528,65,3528,70]; + lineof_temp[3519] = [3549,12,3549,57]; + lineof_temp[5014] = [4992,32,4992,72]; + lineof_temp[1090] = [1292,58,1293,66]; + lineof_temp[2251] = [2397,12,2397,68]; + lineof_temp[4713] = [4703,4,4703,29]; + lineof_temp[5164] = [5093,20,5093,43]; + lineof_temp[829] = [945,28,945,65]; + lineof_temp[1312] = [1449,27,1449,57]; + lineof_temp[5258] = [5193,19,5193,46]; + lineof_temp[2669] = [2773,20,2773,40]; + lineof_temp[933] = [1122,34,1126,91]; + lineof_temp[1579] = [1709,43,1709,60]; + lineof_temp[5551] = [5447,14,5448,39]; + lineof_temp[6524] = [6314,24,6314,63]; + lineof_temp[33] = [49,6,49,41]; + lineof_temp[1085] = [1301,66,1303,74]; + lineof_temp[6261] = [6079,14,6079,30]; + lineof_temp[6728] = [6528,30,6529,63]; + lineof_temp[3711] = [3769,16,3769,64]; + lineof_temp[4458] = [4466,16,4466,43]; + lineof_temp[5648] = [5530,48,5530,74]; + lineof_temp[6107] = [5972,30,5972,49]; + lineof_temp[4780] = [4755,14,4758,74]; + lineof_temp[2310] = [2441,4,2441,38]; + lineof_temp[7127] = [6897,27,6897,49]; + lineof_temp[3777] = [3839,31,3841,79]; + lineof_temp[2425] = [2559,6,2559,22]; + lineof_temp[1667] = [1789,20,1789,37]; + lineof_temp[3617] = [3669,66,3672,75]; + lineof_temp[5481] = [5385,16,5389,70]; + lineof_temp[5585] = [5474,15,5474,43]; + lineof_temp[1313] = [1449,68,1449,74]; + lineof_temp[2851] = [2943,10,2943,29]; + lineof_temp[6269] = [6088,22,6088,40]; + lineof_temp[6831] = [6619,36,6620,77]; + lineof_temp[6992] = [6779,38,6779,75]; + lineof_temp[3543] = [3571,20,3571,53]; + lineof_temp[4025] = [4044,17,4044,37]; + lineof_temp[1209] = [1428,46,1428,67]; + lineof_temp[7202] = [6961,21,6961,37]; + lineof_temp[605] = [652,34,652,40]; + lineof_temp[3642] = [3633,22,3688,43]; + lineof_temp[6045] = [5914,6,5914,17]; + lineof_temp[5920] = [5791,20,5792,58]; + lineof_temp[7278] = [7019,6,7022,79]; + lineof_temp[5303] = [5227,19,5227,46]; + lineof_temp[6671] = [6434,10,6434,35]; + lineof_temp[6416] = [6221,58,6221,76]; + lineof_temp[294] = [318,35,318,61]; + lineof_temp[2474] = [2608,8,2609,56]; + lineof_temp[4830] = [4741,22,4741,50]; + lineof_temp[6358] = [6156,20,6156,72]; + lineof_temp[4246] = [4238,6,4238,22]; + lineof_temp[5331] = [5217,37,5217,70]; + lineof_temp[877] = [1002,41,1002,43]; + lineof_temp[7318] = [7072,54,7074,73]; + lineof_temp[108] = [132,4,133,26]; + lineof_temp[4556] = [4503,29,4503,55]; + lineof_temp[310] = [327,32,327,62]; + lineof_temp[6547] = [6336,28,6340,80]; + lineof_temp[1059] = [1331,48,1331,75]; + lineof_temp[4609] = [4607,60,4607,65]; + lineof_temp[4741] = [4726,18,4727,72]; + lineof_temp[1728] = [1879,10,1880,50]; + lineof_temp[4888] = [4839,12,4839,74]; + lineof_temp[1677] = [1782,2,1830,12]; + lineof_temp[2341] = [2474,6,2474,34]; + lineof_temp[5961] = [5822,20,5822,73]; + lineof_temp[1242] = [1417,61,1417,63]; + lineof_temp[5185] = [5107,18,5107,46]; + lineof_temp[185] = [234,4,234,19]; + lineof_temp[4580] = [4585,26,4585,26]; + lineof_temp[5493] = [5399,63,5399,68]; + lineof_temp[7249] = [7001,20,7001,58]; + lineof_temp[4179] = [4179,8,4179,70]; + lineof_temp[6329] = [6118,6,6118,31]; + lineof_temp[3228] = [3258,18,3258,21]; + lineof_temp[950] = [1113,38,1113,70]; + lineof_temp[1482] = [1602,4,1602,12]; + lineof_temp[2477] = [2602,19,2602,36]; + lineof_temp[4078] = [4105,6,4105,53]; + lineof_temp[5029] = [5003,44,5005,68]; + lineof_temp[6895] = [6681,38,6681,75]; + lineof_temp[2444] = [2429,25,2429,41]; + lineof_temp[2415] = [2548,6,2548,39]; + lineof_temp[1980] = [2143,20,2143,51]; + lineof_temp[82] = [104,34,104,70]; + lineof_temp[1074] = [1301,66,1303,74]; + lineof_temp[3471] = [3522,35,3522,54]; + lineof_temp[1706] = [1874,22,1875,57]; + lineof_temp[2102] = [2259,16,2259,40]; + lineof_temp[534] = [569,20,594,30]; + lineof_temp[977] = [1070,38,1070,60]; + lineof_temp[2347] = [2480,6,2480,34]; + lineof_temp[6003] = [5862,4,5862,14]; + lineof_temp[270] = [302,31,302,57]; + lineof_temp[857] = [1009,22,1009,54]; + lineof_temp[3076] = [3166,33,3166,56]; + lineof_temp[3413] = [3459,16,3462,92]; + lineof_temp[4710] = [4704,14,4704,45]; + lineof_temp[4900] = [4861,42,4861,51]; + lineof_temp[6594] = [6364,14,6367,58]; + lineof_temp[5083] = [5045,17,5045,45]; + lineof_temp[5363] = [5272,18,5272,55]; + lineof_temp[7185] = [6956,32,6956,58]; + lineof_temp[12] = [17,4,17,19]; + lineof_temp[5764] = [5628,14,5628,55]; + lineof_temp[3699] = [3761,22,3762,49]; + lineof_temp[4781] = [4753,12,4754,33]; + lineof_temp[2757] = [2838,16,2838,64]; + lineof_temp[3676] = [3709,14,3710,37]; + lineof_temp[2093] = [2170,10,2170,67]; + lineof_temp[1434] = [1562,31,1562,49]; + lineof_temp[2106] = [2266,24,2268,59]; + lineof_temp[4984] = [4956,15,4956,33]; + lineof_temp[1106] = [1267,38,1332,49]; + lineof_temp[2957] = [3044,25,3044,38]; + lineof_temp[1177] = [1338,36,1339,52]; + lineof_temp[1837] = [1989,15,1989,32]; + lineof_temp[6725] = [6510,24,6510,36]; + lineof_temp[3660] = [3702,14,3702,51]; + lineof_temp[7200] = [6958,10,6958,37]; + lineof_temp[7323] = [7064,46,7066,50]; + lineof_temp[2085] = [2179,12,2182,78]; + lineof_temp[2594] = [2695,24,2695,50]; + lineof_temp[3645] = [3689,20,3690,38]; + lineof_temp[3064] = [3144,4,3144,75]; + lineof_temp[5065] = [4964,20,4964,20]; + lineof_temp[6944] = [6713,4,6713,31]; + lineof_temp[2498] = [2622,16,2625,26]; + lineof_temp[2568] = [2664,14,2664,35]; + lineof_temp[1026] = [1137,12,1137,60]; + lineof_temp[4544] = [4554,27,4554,69]; + lineof_temp[7347] = [7080,16,7081,38]; + lineof_temp[2476] = [2603,8,2606,29]; + lineof_temp[3061] = [3135,25,3135,65]; + lineof_temp[5263] = [5202,26,5202,74]; + lineof_temp[3297] = [3357,12,3357,61]; + lineof_temp[1534] = [1658,12,1658,50]; + lineof_temp[2776] = [2849,26,2850,48]; + lineof_temp[7143] = [6938,50,6938,50]; + lineof_temp[94] = [115,4,115,15]; + lineof_temp[109] = [137,6,137,17]; + lineof_temp[4252] = [4220,10,4220,19]; + lineof_temp[4652] = [4658,6,4658,60]; + lineof_temp[6773] = [6556,47,6556,74]; + lineof_temp[1442] = [1569,21,1572,32]; + lineof_temp[610] = [647,25,647,53]; + lineof_temp[1430] = [1434,24,1434,46]; + lineof_temp[6243] = [6074,33,6074,63]; + lineof_temp[1785] = [1947,27,1947,41]; + lineof_temp[899] = [1027,48,1027,75]; + lineof_temp[5918] = [5792,22,5792,51]; + lineof_temp[1421] = [1464,14,1545,61]; + lineof_temp[6606] = [6380,28,6380,65]; + lineof_temp[3795] = [3831,16,3832,53]; + lineof_temp[2898] = [2932,31,2932,65]; + lineof_temp[5394] = [5310,16,5311,22]; + lineof_temp[5418] = [5336,24,5336,52]; + lineof_temp[1628] = [1742,30,1742,30]; + lineof_temp[3337] = [3396,38,3396,49]; + lineof_temp[6742] = [6530,37,6530,43]; + lineof_temp[3380] = [3421,18,3421,71]; + lineof_temp[4826] = [4743,15,4743,33]; + lineof_temp[390] = [434,37,434,55]; + lineof_temp[2273] = [2413,14,2413,25]; + lineof_temp[3753] = [3814,29,3816,76]; + lineof_temp[4359] = [4396,30,4396,49]; + lineof_temp[4283] = [4327,36,4327,52]; + lineof_temp[4718] = [4709,15,4709,43]; + lineof_temp[4776] = [4758,20,4758,70]; + lineof_temp[6237] = [6069,38,6069,54]; + lineof_temp[7276] = [7020,8,7022,77]; + lineof_temp[1333] = [1465,18,1465,55]; + lineof_temp[2536] = [2648,16,2648,32]; + lineof_temp[2593] = [2695,32,2695,48]; + lineof_temp[3346] = [3408,24,3408,45]; + lineof_temp[6270] = [6091,25,6091,55]; + lineof_temp[4529] = [4525,28,4552,56]; + lineof_temp[4894] = [4845,6,4845,9]; + lineof_temp[6536] = [6318,14,6318,30]; + lineof_temp[6620] = [6392,27,6392,64]; + lineof_temp[6077] = [5945,20,5945,42]; + lineof_temp[7291] = [7029,12,7029,54]; + lineof_temp[738] = [804,40,804,45]; + lineof_temp[3807] = [3863,26,3865,71]; + lineof_temp[6014] = [5886,22,5886,55]; + lineof_temp[4582] = [4576,23,4576,45]; + lineof_temp[4753] = [4728,16,4728,64]; + lineof_temp[762] = [881,56,886,68]; + lineof_temp[2359] = [2492,6,2492,49]; + lineof_temp[7350] = [7041,31,7041,33]; + lineof_temp[7379] = [7104,10,7104,53]; + lineof_temp[308] = [320,8,321,27]; + lineof_temp[1766] = [1916,25,1916,60]; + lineof_temp[5166] = [5109,11,5109,39]; + lineof_temp[592] = [662,40,663,72]; + lineof_temp[5567] = [5457,18,5460,46]; + lineof_temp[6809] = [6590,22,6590,65]; + lineof_temp[3563] = [3614,56,3614,71]; + lineof_temp[4398] = [4269,19,4269,44]; + lineof_temp[5814] = [5663,59,5663,66]; + lineof_temp[945] = [1116,40,1116,75]; + lineof_temp[1192] = [1347,28,1351,85]; + lineof_temp[3923] = [3881,2,3894,4]; + lineof_temp[6630] = [6402,34,6402,34]; + lineof_temp[7352] = [7040,8,7084,18]; + lineof_temp[3235] = [3253,8,3253,8]; + lineof_temp[5989] = [5812,12,5812,12]; + lineof_temp[3544] = [3577,26,3577,73]; + lineof_temp[4576] = [4591,32,4591,32]; + lineof_temp[1400] = [1540,46,1542,75]; + lineof_temp[1164] = [1173,42,1173,42]; + lineof_temp[7000] = [6784,32,6785,73]; + lineof_temp[2748] = [2809,60,2809,66]; + lineof_temp[1738] = [1899,8,1899,23]; + lineof_temp[6933] = [6638,4,6638,44]; + lineof_temp[1604] = [1733,22,1733,68]; + lineof_temp[4453] = [4446,20,4446,39]; + lineof_temp[4662] = [4664,12,4666,74]; + lineof_temp[867] = [993,34,993,70]; + lineof_temp[2671] = [2774,10,2774,28]; + lineof_temp[3978] = [3994,12,3995,76]; + lineof_temp[752] = [868,60,872,78]; + lineof_temp[2459] = [2598,20,2598,38]; + lineof_temp[851] = [981,13,981,50]; + lineof_temp[6103] = [5961,20,5962,39]; + lineof_temp[5748] = [5611,14,5611,37]; + lineof_temp[7034] = [6812,18,6813,78]; + lineof_temp[7111] = [6860,18,6887,39]; + lineof_temp[3171] = [3149,4,3220,26]; + lineof_temp[842] = [928,10,928,10]; + lineof_temp[4170] = [4173,8,4173,76]; + lineof_temp[6508] = [6283,24,6283,44]; + lineof_temp[4614] = [4605,12,4605,12]; + lineof_temp[6608] = [6378,18,6379,37]; + lineof_temp[1484] = [1550,22,1550,41]; + lineof_temp[4023] = [4047,14,4049,79]; + lineof_temp[4918] = [4875,10,4877,73]; + lineof_temp[1559] = [1687,35,1687,65]; + lineof_temp[4343] = [4348,14,4348,14]; + lineof_temp[4589] = [4572,8,4596,26]; + lineof_temp[1926] = [2077,36,2077,45]; + lineof_temp[4123] = [4147,54,4147,61]; + lineof_temp[5077] = [5036,11,5036,39]; + lineof_temp[283] = [308,10,310,43]; + lineof_temp[2799] = [2833,10,2833,16]; + lineof_temp[4858] = [4798,19,4798,31]; + lineof_temp[6098] = [5966,28,5966,54]; + lineof_temp[1424] = [1458,8,1545,65]; + lineof_temp[2953] = [3047,18,3048,46]; + lineof_temp[3408] = [3441,8,3441,35]; + lineof_temp[6653] = [6421,18,6421,51]; + lineof_temp[6885] = [6709,26,6709,63]; + lineof_temp[1877] = [2036,34,2037,53]; + lineof_temp[2466] = [2590,12,2590,37]; + lineof_temp[2717] = [2798,8,2802,71]; + lineof_temp[5129] = [5050,19,5050,43]; + lineof_temp[2969] = [3059,24,3059,60]; + lineof_temp[4982] = [4954,23,4954,44]; + lineof_temp[5527] = [5422,15,5422,42]; + lineof_temp[1787] = [1953,16,1953,49]; + lineof_temp[6628] = [6400,32,6401,39]; + lineof_temp[2175] = [2319,20,2319,69]; + lineof_temp[3527] = [3560,51,3560,63]; + lineof_temp[2716] = [2798,8,2798,20]; + lineof_temp[4904] = [4860,28,4860,30]; + lineof_temp[6874] = [6656,14,6656,61]; + lineof_temp[1273] = [1364,24,1429,45]; + lineof_temp[1268] = [1371,36,1371,36]; + lineof_temp[4621] = [4629,6,4629,53]; + lineof_temp[5010] = [4984,32,4988,85]; + lineof_temp[3977] = [3994,12,3995,76]; + lineof_temp[2098] = [2252,18,2252,54]; + lineof_temp[2610] = [2710,43,2710,58]; + lineof_temp[5377] = [5245,37,5245,84]; + lineof_temp[5526] = [5410,21,5410,39]; + lineof_temp[3075] = [3166,33,3166,56]; + lineof_temp[5616] = [5497,54,5497,60]; + lineof_temp[797] = [787,2,919,12]; + lineof_temp[1690] = [1835,4,1851,23]; + lineof_temp[1545] = [1658,61,1658,62]; + lineof_temp[453] = [515,36,515,42]; + lineof_temp[2841] = [2914,8,2929,30]; + lineof_temp[3928] = [3953,8,3953,17]; + lineof_temp[1682] = [1840,16,1841,35]; + lineof_temp[2434] = [2566,4,2567,26]; + lineof_temp[4879] = [4833,8,4833,77]; + lineof_temp[5734] = [5596,4,5598,33]; + lineof_temp[7354] = [7038,60,7038,62]; + lineof_temp[2872] = [2987,35,2987,41]; + lineof_temp[3200] = [3295,22,3295,74]; + lineof_temp[4396] = [4266,17,4266,34]; + lineof_temp[984] = [1054,46,1055,51]; + lineof_temp[2166] = [2316,16,2316,40]; + lineof_temp[4940] = [4919,40,4926,106]; + lineof_temp[4665] = [4663,12,4663,12]; + lineof_temp[5204] = [5145,23,5145,47]; + lineof_temp[3758] = [3819,24,3821,69]; + lineof_temp[400] = [450,21,450,52]; + lineof_temp[1125] = [1213,56,1213,68]; + lineof_temp[3157] = [3168,8,3168,39]; + lineof_temp[4326] = [4365,22,4366,45]; + lineof_temp[5485] = [5397,32,5397,64]; + lineof_temp[6247] = [6072,72,6073,21]; + lineof_temp[2655] = [2767,16,2768,79]; + lineof_temp[4440] = [4441,6,4441,72]; + lineof_temp[4619] = [4600,10,4600,19]; + lineof_temp[5687] = [5562,14,5562,42]; + lineof_temp[5924] = [5791,20,5792,58]; + lineof_temp[7152] = [6920,32,6943,50]; + lineof_temp[2409] = [2542,6,2542,24]; + lineof_temp[5935] = [5762,4,5763,44]; + lineof_temp[141] = [189,33,189,55]; + lineof_temp[3407] = [3442,18,3442,27]; + lineof_temp[4565] = [4576,23,4576,45]; + lineof_temp[3567] = [3611,52,3612,71]; + lineof_temp[4271] = [4303,16,4303,42]; + lineof_temp[6894] = [6676,34,6676,56]; + lineof_temp[3246] = [3319,10,3321,55]; + lineof_temp[4481] = [4488,16,4495,18]; + lineof_temp[1097] = [1283,56,1286,89]; + lineof_temp[3420] = [3463,12,3463,24]; + lineof_temp[5105] = [5064,28,5064,71]; + lineof_temp[5282] = [5190,8,5191,38]; + lineof_temp[6597] = [6375,28,6375,70]; + lineof_temp[4324] = [4365,42,4365,56]; + lineof_temp[4806] = [4776,67,4776,73]; + lineof_temp[3702] = [3758,18,3759,46]; + lineof_temp[5410] = [5290,8,5290,8]; + lineof_temp[3251] = [3315,16,3317,46]; + lineof_temp[4442] = [4445,14,4445,36]; + lineof_temp[7037] = [6809,23,6809,29]; + lineof_temp[6188] = [6026,12,6026,34]; + lineof_temp[124] = [161,12,162,30]; + lineof_temp[5636] = [5506,23,5506,61]; + lineof_temp[7274] = [7018,14,7018,30]; + lineof_temp[4311] = [4347,21,4347,38]; + lineof_temp[5415] = [5327,12,5327,63]; + lineof_temp[5548] = [5448,17,5448,38]; + lineof_temp[2220] = [2345,10,2346,29]; + lineof_temp[332] = [362,4,363,26]; + lineof_temp[1263] = [1380,46,1380,51]; + lineof_temp[2385] = [2518,6,2518,40]; + lineof_temp[2688] = [2773,6,2773,41]; + lineof_temp[4428] = [4270,16,4270,16]; + lineof_temp[2181] = [2314,10,2315,29]; + lineof_temp[2686] = [2775,8,2775,31]; + lineof_temp[4314] = [4353,24,4353,73]; + lineof_temp[4490] = [4444,6,4444,31]; + lineof_temp[6644] = [6359,10,6359,35]; + lineof_temp[1627] = [1741,37,1741,42]; + lineof_temp[4671] = [4673,11,4673,39]; + lineof_temp[5817] = [5660,4,5661,50]; + lineof_temp[7038] = [6810,16,6810,16]; + lineof_temp[2934] = [3004,67,3004,73]; + lineof_temp[4763] = [4719,22,4719,45]; + lineof_temp[5290] = [5212,15,5212,39]; + lineof_temp[5822] = [5686,14,5686,42]; + lineof_temp[717] = [788,12,788,52]; + lineof_temp[3517] = [3473,25,3473,57]; + lineof_temp[4483] = [4485,70,4486,16]; + lineof_temp[1411] = [1483,31,1483,53]; + lineof_temp[1909] = [2071,24,2071,44]; + lineof_temp[5578] = [5439,10,5443,11]; + lineof_temp[5879] = [5747,26,5747,62]; + lineof_temp[6248] = [6073,25,6073,25]; + lineof_temp[7136] = [6926,42,6927,62]; + lineof_temp[4530] = [4523,31,4523,53]; + lineof_temp[4538] = [4516,19,4516,46]; + lineof_temp[6542] = [6326,27,6326,63]; + lineof_temp[6685] = [6445,32,6445,60]; + lineof_temp[7378] = [7096,33,7096,48]; + lineof_temp[7372] = [7100,16,7100,47]; + lineof_temp[2805] = [2888,38,2888,71]; + lineof_temp[2096] = [2157,20,2157,42]; + lineof_temp[4248] = [4240,6,4240,22]; + lineof_temp[6610] = [6383,28,6383,65]; + lineof_temp[1849] = [2007,31,2007,63]; + lineof_temp[3378] = [3426,26,3426,26]; + lineof_temp[4158] = [4164,14,4164,62]; + lineof_temp[1422] = [1463,12,1545,63]; + lineof_temp[2147] = [2256,16,2256,21]; + lineof_temp[3677] = [3731,20,3731,77]; + lineof_temp[4688] = [4674,8,4674,8]; + lineof_temp[4964] = [4896,16,4939,32]; + lineof_temp[658] = [724,10,725,40]; + lineof_temp[2178] = [2318,16,2321,99]; + lineof_temp[2793] = [2837,6,2867,36]; + lineof_temp[7171] = [6895,18,6895,18]; + lineof_temp[463] = [527,6,527,28]; + lineof_temp[513] = [570,30,570,69]; + lineof_temp[4116] = [4143,46,4143,63]; + lineof_temp[4438] = [4433,2,4435,31]; + lineof_temp[3830] = [3793,10,3793,19]; + lineof_temp[4320] = [4362,42,4362,65]; + lineof_temp[6131] = [5986,20,5986,42]; + lineof_temp[2241] = [2387,12,2387,68]; + lineof_temp[6375] = [6166,10,6166,57]; + lineof_temp[1478] = [1604,8,1604,23]; + lineof_temp[1870] = [2032,40,2032,52]; + lineof_temp[7294] = [7027,8,7027,20]; + lineof_temp[3319] = [3392,44,3392,55]; + lineof_temp[4043] = [4058,47,4058,53]; + lineof_temp[5563] = [5460,24,5460,42]; + lineof_temp[2388] = [2519,4,2519,46]; + lineof_temp[3128] = [3214,53,3214,60]; + lineof_temp[4921] = [4878,8,4879,26]; + lineof_temp[1261] = [1385,46,1386,53]; + lineof_temp[5171] = [5118,14,5118,43]; + lineof_temp[2975] = [3062,26,3064,34]; + lineof_temp[3558] = [3606,54,3610,72]; + lineof_temp[3998] = [3990,11,3990,48]; + lineof_temp[4689] = [4672,2,4683,13]; + lineof_temp[7204] = [6963,20,6963,43]; + lineof_temp[3121] = [3212,36,3213,70]; + lineof_temp[3481] = [3528,35,3528,54]; + lineof_temp[2138] = [2278,22,2281,91]; + lineof_temp[4849] = [4806,20,4819,79]; + lineof_temp[4966] = [4895,14,4939,34]; + lineof_temp[5559] = [5458,27,5458,56]; + lineof_temp[6150] = [6000,18,6000,36]; + lineof_temp[5188] = [5131,16,5131,44]; + lineof_temp[1502] = [1629,18,1629,39]; + lineof_temp[4475] = [4467,8,4468,27]; + lineof_temp[4486] = [4482,8,4483,44]; + lineof_temp[5177] = [5113,18,5113,37]; + lineof_temp[5664] = [5544,36,5544,61]; + lineof_temp[7078] = [6854,18,6854,37]; + lineof_temp[3991] = [4007,42,4007,63]; + lineof_temp[144] = [190,35,190,57]; + lineof_temp[1459] = [1594,16,1598,73]; + lineof_temp[5519] = [5412,11,5412,38]; + lineof_temp[6935] = [6714,10,6714,37]; + lineof_temp[702] = [765,6,769,77]; + lineof_temp[1450] = [1565,4,1566,26]; + lineof_temp[3856] = [3901,24,3901,50]; + lineof_temp[5198] = [5142,18,5142,69]; + lineof_temp[5859] = [5727,62,5727,68]; + lineof_temp[5809] = [5666,14,5667,32]; + lineof_temp[2719] = [2797,6,2802,73]; + lineof_temp[3490] = [3536,30,3536,53]; + lineof_temp[4042] = [4058,17,4058,36]; + lineof_temp[5473] = [5381,20,5381,51]; + lineof_temp[4346] = [4386,17,4386,44]; + lineof_temp[1565] = [1683,6,1690,17]; + lineof_temp[5096] = [5052,11,5052,39]; + lineof_temp[5964] = [5823,18,5830,20]; + lineof_temp[6474] = [6271,32,6271,73]; + lineof_temp[2321] = [2454,6,2454,37]; + lineof_temp[3264] = [3328,14,3328,25]; + lineof_temp[1265] = [1372,40,1372,42]; + lineof_temp[127] = [173,22,173,37]; + lineof_temp[614] = [645,23,645,43]; + lineof_temp[855] = [1009,30,1009,52]; + lineof_temp[1276] = [1363,24,1363,24]; + lineof_temp[4507] = [4528,65,4528,75]; + lineof_temp[2578] = [2686,43,2686,58]; + lineof_temp[4367] = [4412,34,4412,63]; + lineof_temp[5213] = [5146,22,5147,47]; + lineof_temp[576] = [643,24,643,68]; + lineof_temp[4148] = [4158,6,4158,65]; + lineof_temp[998] = [1065,36,1065,36]; + lineof_temp[28] = [46,14,46,39]; + lineof_temp[1291] = [1438,27,1438,64]; + lineof_temp[1899] = [2033,30,2034,50]; + lineof_temp[3979] = [4011,14,4012,35]; + lineof_temp[5528] = [5422,15,5422,42]; + lineof_temp[3521] = [3553,20,3553,65]; + lineof_temp[6018] = [5884,18,5887,105]; + lineof_temp[4463] = [4455,10,4466,47]; + lineof_temp[6483] = [6259,10,6272,28]; + lineof_temp[6982] = [6765,38,6765,75]; + lineof_temp[184] = [230,12,230,23]; + lineof_temp[2236] = [2376,23,2376,33]; + lineof_temp[5973] = [5851,22,5851,51]; + lineof_temp[4291] = [4335,34,4335,74]; + lineof_temp[5938] = [5805,16,5805,59]; + lineof_temp[4928] = [4899,29,4899,50]; + lineof_temp[4518] = [4546,53,4546,59]; + lineof_temp[5000] = [4978,30,4978,69]; + lineof_temp[93] = [116,6,116,23]; + lineof_temp[2277] = [2420,33,2420,56]; + lineof_temp[2137] = [2278,22,2278,37]; + lineof_temp[4085] = [4112,14,4112,26]; + lineof_temp[2001] = [2162,12,2162,61]; + lineof_temp[2297] = [2411,10,2411,18]; + lineof_temp[2763] = [2859,57,2860,75]; + lineof_temp[3259] = [3309,8,3309,8]; + lineof_temp[5271] = [5200,24,5200,72]; + lineof_temp[1403] = [1519,46,1519,66]; + lineof_temp[4862] = [4825,14,4825,29]; + lineof_temp[6998] = [6785,34,6785,71]; + lineof_temp[5228] = [5134,49,5134,54]; + lineof_temp[6980] = [6761,36,6762,77]; + lineof_temp[1047] = [1263,36,1264,73]; + lineof_temp[2769] = [2857,59,2857,68]; + lineof_temp[5932] = [5765,61,5765,66]; + lineof_temp[6698] = [6478,42,6480,66]; + lineof_temp[1772] = [1915,14,1918,52]; + lineof_temp[6053] = [5923,34,5923,46]; + lineof_temp[6127] = [5981,13,5981,31]; + lineof_temp[3672] = [3718,22,3721,100]; + lineof_temp[7088] = [6871,36,6871,58]; + lineof_temp[2461] = [2599,12,2599,37]; + lineof_temp[3982] = [4018,61,4018,70]; + lineof_temp[4857] = [4799,8,4820,26]; + lineof_temp[5926] = [5793,26,5793,26]; + lineof_temp[1448] = [1569,12,1572,33]; + lineof_temp[655] = [719,45,719,70]; + lineof_temp[1676] = [1784,8,1784,8]; + lineof_temp[2227] = [2366,12,2370,102]; + lineof_temp[3153] = [3176,8,3220,19]; + lineof_temp[20] = [25,29,25,41]; + lineof_temp[1504] = [1627,8,1628,27]; + lineof_temp[2656] = [2766,62,2766,74]; + lineof_temp[3160] = [3150,12,3150,24]; + lineof_temp[4214] = [4198,6,4202,78]; + lineof_temp[1435] = [1564,12,1564,67]; + lineof_temp[3242] = [3307,6,3308,42]; + lineof_temp[1412] = [1477,26,1545,53]; + lineof_temp[5357] = [5277,22,5278,41]; + lineof_temp[1347] = [1488,43,1491,68]; + lineof_temp[1989] = [2150,14,2150,45]; + lineof_temp[5194] = [5136,20,5136,74]; + lineof_temp[1848] = [2002,23,2002,59]; + lineof_temp[3881] = [3935,26,3937,70]; + lineof_temp[49] = [81,8,81,31]; + lineof_temp[2246] = [2378,4,2378,26]; + lineof_temp[2738] = [2824,14,2828,15]; + lineof_temp[3423] = [3414,14,3414,20]; + lineof_temp[3467] = [3522,35,3522,54]; + lineof_temp[1571] = [1701,12,1702,73]; + lineof_temp[2368] = [2499,4,2499,45]; + lineof_temp[3498] = [3541,28,3541,44]; + lineof_temp[7237] = [6979,10,6986,21]; + lineof_temp[284] = [307,8,307,30]; + lineof_temp[2167] = [2316,16,2316,40]; + lineof_temp[1640] = [1726,12,1726,51]; + lineof_temp[4166] = [4170,8,4170,76]; + lineof_temp[5186] = [5129,11,5129,39]; + lineof_temp[6197] = [6035,22,6035,42]; + lineof_temp[688] = [748,2,751,57]; + lineof_temp[2145] = [2273,12,2296,23]; + lineof_temp[1116] = [1179,54,1179,74]; + lineof_temp[6200] = [6033,12,6034,30]; + lineof_temp[2819] = [2881,16,2881,22]; + lineof_temp[5306] = [5229,24,5229,52]; + lineof_temp[6102] = [5963,22,5966,58]; + lineof_temp[1560] = [1687,14,1687,68]; + lineof_temp[6308] = [6109,8,6110,26]; + lineof_temp[2774] = [2855,34,2855,34]; + lineof_temp[5457] = [5324,2,5357,13]; + lineof_temp[6389] = [6161,4,6161,41]; + lineof_temp[1161] = [1174,42,1254,53]; + lineof_temp[6064] = [5921,16,5921,16]; + lineof_temp[443] = [515,15,515,25]; + lineof_temp[4455] = [4456,19,4456,47]; + lineof_temp[732] = [819,42,820,58]; + lineof_temp[967] = [1089,40,1090,56]; + lineof_temp[1094] = [1288,56,1288,77]; + lineof_temp[2253] = [2395,12,2395,39]; + lineof_temp[4902] = [4861,34,4861,53]; + lineof_temp[5915] = [5777,18,5784,20]; + lineof_temp[1352] = [1494,42,1495,68]; + lineof_temp[4280] = [4330,32,4331,47]; + lineof_temp[4856] = [4801,14,4801,14]; + lineof_temp[919] = [1073,32,1074,65]; + lineof_temp[6184] = [6021,19,6021,35]; + lineof_temp[840] = [926,16,926,74]; + lineof_temp[1536] = [1667,49,1667,73]; + lineof_temp[6124] = [5980,6,5980,19]; + lineof_temp[1708] = [1871,22,1872,65]; + lineof_temp[346] = [382,6,382,18]; + lineof_temp[844] = [924,4,924,33]; + lineof_temp[956] = [1078,38,1079,50]; + lineof_temp[1630] = [1737,28,1737,30]; + lineof_temp[45] = [73,6,73,28]; + lineof_temp[4143] = [4155,8,4156,13]; + lineof_temp[3141] = [3189,26,3189,64]; + lineof_temp[7068] = [6825,70,6826,21]; + lineof_temp[1717] = [1888,22,1889,57]; + lineof_temp[3720] = [3785,36,3785,73]; + lineof_temp[3900] = [3924,20,3924,54]; + lineof_temp[3713] = [3776,28,3776,74]; + lineof_temp[3916] = [3908,12,3909,51]; + lineof_temp[5651] = [5535,10,5535,71]; + lineof_temp[2266] = [2403,14,2403,29]; + lineof_temp[5603] = [5470,10,5470,17]; + lineof_temp[5347] = [5261,16,5261,34]; + lineof_temp[6025] = [5899,24,5899,70]; + lineof_temp[6917] = [6705,36,6705,73]; + lineof_temp[4191] = [4186,14,4186,52]; + lineof_temp[4336] = [4371,20,4380,28]; + lineof_temp[6408] = [6196,12,6196,34]; + lineof_temp[337] = [358,10,358,19]; + lineof_temp[6253] = [6068,10,6074,73]; + lineof_temp[351] = [378,6,378,59]; + lineof_temp[1822] = [1977,20,1977,20]; + lineof_temp[4205] = [4196,63,4196,68]; + lineof_temp[2254] = [2391,12,2394,32]; + lineof_temp[4229] = [4139,20,4139,47]; + lineof_temp[5307] = [5237,20,5237,77]; + lineof_temp[2646] = [2750,15,2753,26]; + lineof_temp[3429] = [3475,12,3475,50]; + lineof_temp[5726] = [5590,4,5591,28]; + lineof_temp[5751] = [5614,14,5614,39]; + lineof_temp[6469] = [6263,26,6263,65]; + lineof_temp[5371] = [5266,14,5266,19]; + lineof_temp[5414] = [5325,11,5325,29]; + lineof_temp[1527] = [1652,8,1653,74]; + lineof_temp[4802] = [4780,37,4780,42]; + lineof_temp[3263] = [3302,27,3302,62]; + lineof_temp[5333] = [5251,16,5251,71]; + lineof_temp[6589] = [6366,18,6366,51]; + lineof_temp[1639] = [1728,16,1728,21]; + lineof_temp[5667] = [5543,19,5543,24]; + lineof_temp[6065] = [5919,10,5927,70]; + lineof_temp[1341] = [1478,28,1478,52]; + lineof_temp[2286] = [2418,10,2422,14]; + lineof_temp[2635] = [2649,16,2649,21]; + lineof_temp[2922] = [3023,52,3023,62]; + lineof_temp[5752] = [5614,14,5614,39]; + lineof_temp[6896] = [6681,38,6681,75]; + lineof_temp[1716] = [1882,22,1882,50]; + lineof_temp[7213] = [6958,10,6958,37]; + lineof_temp[146] = [189,32,190,58]; + lineof_temp[2838] = [2916,12,2917,74]; + lineof_temp[5387] = [5295,18,5295,18]; + lineof_temp[5854] = [5693,10,5693,18]; + lineof_temp[6778] = [6564,22,6564,59]; + lineof_temp[2712] = [2801,10,2802,70]; + lineof_temp[2766] = [2861,40,2863,57]; + lineof_temp[6876] = [6642,18,6642,23]; + lineof_temp[1975] = [2131,59,2131,61]; + lineof_temp[4139] = [4155,54,4155,61]; + lineof_temp[6354] = [6152,18,6152,55]; + lineof_temp[3499] = [3541,28,3541,44]; + lineof_temp[4897] = [4851,6,4851,9]; + lineof_temp[322] = [342,4,343,26]; + lineof_temp[2770] = [2858,40,2858,40]; + lineof_temp[1034] = [1151,28,1151,77]; + lineof_temp[4224] = [4212,6,4212,39]; + lineof_temp[3099] = [3179,14,3179,75]; + lineof_temp[3305] = [3367,18,3367,75]; + lineof_temp[2136] = [2279,26,2279,75]; + lineof_temp[4334] = [4373,33,4373,38]; + lineof_temp[4893] = [4846,12,4846,68]; + lineof_temp[55] = [88,14,88,37]; + lineof_temp[6021] = [5882,14,5882,47]; + lineof_temp[4805] = [4776,27,4776,56]; + lineof_temp[4981] = [4954,23,4954,44]; + lineof_temp[2462] = [2598,12,2598,39]; + lineof_temp[6502] = [6294,26,6295,44]; + lineof_temp[657] = [713,4,714,26]; + lineof_temp[1399] = [1540,46,1542,75]; + lineof_temp[5030] = [5001,41,5005,69]; + lineof_temp[6556] = [6324,18,6324,18]; + lineof_temp[165] = [166,22,166,28]; + lineof_temp[5618] = [5496,6,5499,37]; + lineof_temp[466] = [530,16,530,62]; + lineof_temp[5355] = [5272,26,5272,54]; + lineof_temp[1912] = [2081,34,2082,60]; + lineof_temp[4182] = [4182,8,4182,71]; + lineof_temp[5923] = [5794,26,5794,67]; + lineof_temp[3588] = [3573,20,3574,38]; + lineof_temp[6123] = [5933,27,5933,48]; + lineof_temp[6707] = [6488,46,6492,76]; + lineof_temp[4394] = [4297,12,4297,18]; + lineof_temp[6582] = [6358,21,6358,37]; + lineof_temp[5061] = [4969,22,4970,40]; + lineof_temp[6223] = [6055,20,6055,58]; + lineof_temp[2134] = [2280,26,2280,59]; + lineof_temp[6155] = [6010,30,6010,59]; + lineof_temp[158] = [177,20,178,40]; + lineof_temp[2495] = [2612,10,2612,37]; + lineof_temp[7337] = [7053,30,7053,30]; + lineof_temp[575] = [643,24,643,68]; + lineof_temp[1455] = [1598,54,1598,67]; + lineof_temp[2201] = [2350,22,2353,72]; + lineof_temp[5181] = [5109,11,5109,39]; + lineof_temp[4157] = [4161,4,4161,28]; + lineof_temp[584] = [662,40,663,72]; + lineof_temp[1232] = [1403,54,1403,54]; + lineof_temp[6073] = [5935,14,5935,65]; + lineof_temp[1370] = [1511,46,1513,75]; + lineof_temp[4545] = [4554,27,4554,69]; + lineof_temp[6371] = [6162,14,6162,30]; + lineof_temp[2846] = [2904,2,2929,34]; + lineof_temp[2128] = [2295,26,2295,48]; + lineof_temp[4913] = [4838,25,4838,55]; + lineof_temp[2513] = [2629,19,2629,42]; + lineof_temp[1829] = [1906,4,1907,24]; + lineof_temp[3724] = [3776,28,3776,74]; + lineof_temp[6122] = [5934,2,5976,22]; + lineof_temp[5622] = [5501,6,5501,26]; + lineof_temp[173] = [153,14,153,20]; + lineof_temp[442] = [465,12,465,29]; + lineof_temp[3361] = [3366,8,3412,28]; + lineof_temp[820] = [937,58,937,73]; + lineof_temp[5796] = [5658,4,5658,14]; + lineof_temp[1846] = [2109,14,2109,75]; + lineof_temp[1957] = [2115,17,2115,46]; + lineof_temp[2929] = [3017,22,3017,32]; + lineof_temp[282] = [309,12,310,41]; + lineof_temp[408] = [446,8,446,8]; + lineof_temp[2787] = [2842,37,2842,43]; + lineof_temp[5830] = [5701,12,5704,68]; + lineof_temp[2600] = [2687,14,2688,36]; + lineof_temp[3719] = [3785,36,3785,73]; + lineof_temp[2026] = [2182,18,2182,76]; + lineof_temp[6948] = [6727,12,6727,34]; + lineof_temp[3902] = [3922,24,3922,52]; + lineof_temp[6753] = [6498,39,6498,51]; + lineof_temp[7206] = [6965,14,6966,75]; + lineof_temp[969] = [1088,36,1093,84]; + lineof_temp[680] = [749,14,749,32]; + lineof_temp[2077] = [2223,20,2223,69]; + lineof_temp[5147] = [5103,24,5103,56]; + lineof_temp[5372] = [5258,10,5265,12]; + lineof_temp[5474] = [5381,20,5381,51]; + lineof_temp[2637] = [2647,10,2647,28]; + lineof_temp[4200] = [4190,6,4190,39]; + lineof_temp[5295] = [5212,50,5212,56]; + lineof_temp[6051] = [5920,21,5920,53]; + lineof_temp[3595] = [3629,21,3629,27]; + lineof_temp[4912] = [4839,2,4839,75]; + lineof_temp[716] = [788,12,788,52]; + lineof_temp[854] = [984,20,984,64]; + lineof_temp[5201] = [5144,21,5144,75]; + lineof_temp[5886] = [5731,15,5731,50]; + lineof_temp[1516] = [1644,36,1644,36]; + lineof_temp[4175] = [4176,8,4176,71]; + lineof_temp[1564] = [1685,12,1685,12]; + lineof_temp[5173] = [5120,14,5121,79]; + lineof_temp[3330] = [3402,36,3402,69]; + lineof_temp[5400] = [5317,16,5318,55]; + lineof_temp[1828] = [1908,6,1946,8]; + lineof_temp[2574] = [2680,22,2680,35]; + lineof_temp[909] = [1042,34,1042,63]; + lineof_temp[1648] = [1788,32,1788,58]; + lineof_temp[1754] = [1924,20,1927,96]; + lineof_temp[4028] = [4043,8,4050,16]; + lineof_temp[4237] = [4227,4,4227,34]; + lineof_temp[6306] = [6113,30,6113,30]; + lineof_temp[1316] = [1446,24,1446,35]; + lineof_temp[1310] = [1453,28,1453,28]; + lineof_temp[5875] = [5735,16,5739,107]; + lineof_temp[3465] = [3514,22,3514,43]; + lineof_temp[664] = [725,51,725,56]; + lineof_temp[4850] = [4803,24,4803,71]; + lineof_temp[7085] = [6863,28,6865,66]; + lineof_temp[7325] = [7067,48,7067,48]; + lineof_temp[3059] = [3135,42,3135,64]; + lineof_temp[5629] = [5511,10,5511,75]; + lineof_temp[2351] = [2484,6,2484,40]; + lineof_temp[1443] = [1575,31,1575,49]; + lineof_temp[4264] = [4248,10,4248,19]; + lineof_temp[4471] = [4470,21,4470,63]; + lineof_temp[7165] = [6897,27,6897,49]; + lineof_temp[964] = [1076,32,1077,51]; + lineof_temp[778] = [796,20,796,53]; + lineof_temp[3946] = [3961,4,3962,61]; + lineof_temp[6456] = [6245,30,6245,69]; + lineof_temp[2139] = [2278,22,2281,91]; + lineof_temp[3424] = [3363,6,3413,8]; + lineof_temp[3355] = [3372,27,3372,39]; + lineof_temp[6488] = [6276,14,6276,33]; + lineof_temp[2745] = [2817,8,2817,45]; + lineof_temp[5397] = [5309,14,5311,23]; + lineof_temp[4487] = [4452,14,4452,20]; + lineof_temp[4115] = [4143,54,4143,61]; + lineof_temp[604] = [679,28,679,40]; + lineof_temp[2003] = [2161,8,2164,54]; + lineof_temp[2228] = [2364,10,2365,48]; + lineof_temp[2430] = [2562,4,2562,30]; + lineof_temp[2826] = [2905,14,2905,75]; + lineof_temp[5140] = [5079,21,5079,44]; + lineof_temp[1503] = [1629,10,1629,41]; + lineof_temp[5717] = [5589,14,5589,61]; + lineof_temp[5514] = [5375,4,5407,10]; + lineof_temp[221] = [265,40,265,49]; + lineof_temp[1897] = [2039,34,2040,55]; + lineof_temp[5163] = [5094,2,5104,53]; + lineof_temp[1923] = [2093,32,2098,64]; + lineof_temp[2664] = [2761,8,2763,74]; + lineof_temp[4304] = [4302,22,4302,28]; + lineof_temp[2603] = [2706,26,2708,65]; + lineof_temp[3639] = [3635,26,3635,77]; + lineof_temp[4006] = [4031,53,4031,67]; + lineof_temp[4480] = [4496,16,4496,43]; + lineof_temp[1037] = [1150,24,1153,82]; + lineof_temp[4096] = [4102,10,4102,16]; + lineof_temp[4094] = [4108,6,4119,16]; + lineof_temp[6147] = [5998,14,5998,30]; + lineof_temp[3205] = [3296,39,3296,46]; + lineof_temp[4041] = [4060,14,4062,77]; + lineof_temp[4225] = [4211,4,4211,29]; + lineof_temp[4526] = [4527,32,4528,78]; + lineof_temp[3670] = [3718,22,3718,37]; + lineof_temp[3841] = [3882,14,3882,25]; + lineof_temp[2561] = [2674,43,2674,58]; + lineof_temp[1107] = [1263,36,1264,73]; + lineof_temp[140] = [185,30,186,56]; + lineof_temp[7272] = [7011,6,7011,31]; + lineof_temp[2463] = [2596,12,2597,57]; + lineof_temp[995] = [1066,36,1067,77]; + lineof_temp[1985] = [2125,61,2125,62]; + lineof_temp[2920] = [3021,18,3022,27]; + lineof_temp[2221] = [2369,18,2369,51]; + lineof_temp[1556] = [1689,22,1689,73]; + lineof_temp[2516] = [2647,10,2647,28]; + lineof_temp[6093] = [5959,28,5959,28]; + lineof_temp[5985] = [5820,14,5821,32]; + lineof_temp[6726] = [6509,22,6513,61]; + lineof_temp[1684] = [1846,20,1846,50]; + lineof_temp[2658] = [2766,12,2769,16]; + lineof_temp[4079] = [4103,4,4104,23]; + lineof_temp[3216] = [3277,26,3279,69]; + lineof_temp[1360] = [1505,47,1505,73]; + lineof_temp[1970] = [2136,22,2136,73]; + lineof_temp[3548] = [3589,42,3591,77]; + lineof_temp[85] = [104,6,104,73]; + lineof_temp[2830] = [2916,12,2917,74]; + lineof_temp[4757] = [4725,14,4725,14]; + lineof_temp[5686] = [5557,4,5558,46]; + lineof_temp[5269] = [5200,32,5200,70]; + lineof_temp[5399] = [5306,10,5307,33]; + lineof_temp[6673] = [6547,16,6547,53]; + lineof_temp[871] = [1001,43,1001,76]; + lineof_temp[7333] = [7058,36,7058,36]; + lineof_temp[1519] = [1641,66,1641,68]; + lineof_temp[650] = [703,6,706,65]; + lineof_temp[4015] = [4041,11,4041,25]; + lineof_temp[4945] = [4905,32,4928,38]; + lineof_temp[5504] = [5381,12,5381,52]; + lineof_temp[1025] = [1137,12,1137,60]; + lineof_temp[2733] = [2821,19,2821,66]; + lineof_temp[4273] = [4306,16,4307,35]; + lineof_temp[5346] = [5262,18,5264,41]; + lineof_temp[6689] = [6464,32,6464,51]; + lineof_temp[4789] = [4759,12,4760,31]; + lineof_temp[5468] = [5369,6,5369,18]; + lineof_temp[3843] = [3883,14,3883,25]; + lineof_temp[812] = [930,20,930,56]; + lineof_temp[5756] = [5615,4,5616,28]; + lineof_temp[7168] = [6896,18,6944,29]; + lineof_temp[1524] = [1650,14,1650,29]; + lineof_temp[7245] = [6996,12,6996,59]; + lineof_temp[3630] = [3652,49,3652,56]; + lineof_temp[569] = [604,61,604,62]; + lineof_temp[5838] = [5712,27,5712,68]; + lineof_temp[999] = [1059,30,1068,38]; + lineof_temp[1865] = [2021,34,2026,66]; + lineof_temp[3322] = [3390,55,3390,57]; + lineof_temp[5449] = [5345,18,5345,26]; + lineof_temp[6182] = [6011,4,6011,38]; + lineof_temp[349] = [381,4,385,74]; + lineof_temp[2357] = [2490,6,2490,46]; + lineof_temp[4743] = [4731,28,4731,48]; + lineof_temp[7258] = [7004,18,7004,55]; + lineof_temp[199] = [244,8,244,19]; + lineof_temp[1419] = [1469,16,1469,38]; + lineof_temp[1613] = [1760,46,1761,54]; + lineof_temp[3497] = [3506,18,3507,40]; + lineof_temp[3539] = [3564,10,3564,50]; + lineof_temp[5537] = [5418,10,5418,19]; + lineof_temp[6366] = [6155,10,6158,78]; + lineof_temp[6434] = [6237,58,6237,76]; + lineof_temp[792] = [791,10,791,45]; + lineof_temp[1063] = [1278,50,1280,74]; + lineof_temp[3112] = [3188,20,3188,61]; + lineof_temp[5268] = [5198,31,5198,56]; + lineof_temp[1020] = [981,13,981,50]; + lineof_temp[3198] = [3255,18,3255,66]; + lineof_temp[6857] = [6558,4,6558,45]; + lineof_temp[353] = [375,2,375,38]; + lineof_temp[7265] = [6990,14,6990,23]; + lineof_temp[3072] = [3155,12,3155,40]; + lineof_temp[5389] = [5294,14,5301,21]; + lineof_temp[6436] = [6237,36,6237,77]; + lineof_temp[187] = [232,12,232,52]; + lineof_temp[4627] = [4636,12,4636,49]; + lineof_temp[5702] = [5569,4,5570,77]; + lineof_temp[6031] = [5904,22,5904,72]; + lineof_temp[6699] = [6485,52,6485,69]; + lineof_temp[381] = [437,16,437,63]; + lineof_temp[2855] = [2956,8,2956,60]; + lineof_temp[3534] = [3552,10,3561,31]; + lineof_temp[4188] = [4184,6,4184,47]; + lineof_temp[6762] = [6452,12,6453,71]; + lineof_temp[2597] = [2692,29,2692,37]; + lineof_temp[389] = [435,2,438,43]; + lineof_temp[3963] = [3972,2,3974,52]; + lineof_temp[2695] = [2786,8,2788,68]; + lineof_temp[5155] = [5100,14,5100,52]; + lineof_temp[5911] = [5776,20,5776,46]; + lineof_temp[6099] = [5964,34,5964,53]; + lineof_temp[6132] = [5986,20,5986,42]; + lineof_temp[1414] = [1476,24,1545,55]; + lineof_temp[2263] = [2401,6,2401,31]; + lineof_temp[2438] = [2572,4,2572,46]; + lineof_temp[2885] = [2962,14,2962,14]; + lineof_temp[3493] = [3535,30,3535,30]; + lineof_temp[6960] = [6740,22,6740,59]; + lineof_temp[5342] = [5260,36,5260,61]; + lineof_temp[6421] = [6214,33,6214,35]; + lineof_temp[6626] = [6404,36,6405,49]; + lineof_temp[2971] = [3108,30,3108,40]; + lineof_temp[3655] = [3549,68,3549,69]; + lineof_temp[330] = [359,4,360,26]; + lineof_temp[169] = [156,18,156,23]; + lineof_temp[4193] = [4185,4,4185,36]; + lineof_temp[6230] = [6046,4,6046,44]; + lineof_temp[6590] = [6365,18,6365,67]; + lineof_temp[3155] = [3170,8,3174,10]; + lineof_temp[286] = [313,35,313,61]; + lineof_temp[813] = [930,20,930,56]; + lineof_temp[2278] = [2420,33,2420,56]; + lineof_temp[1003] = [1038,34,1038,69]; + lineof_temp[1582] = [1708,18,1709,64]; + lineof_temp[1983] = [2127,16,2127,21]; + lineof_temp[2146] = [2271,10,2272,50]; + lineof_temp[3747] = [3811,20,3811,72]; + lineof_temp[3174] = [3147,32,3147,86]; + lineof_temp[1281] = [1357,12,1429,53]; + lineof_temp[6149] = [6000,18,6000,36]; + lineof_temp[7279] = [7018,6,7018,31]; + lineof_temp[2013] = [2170,10,2170,67]; + lineof_temp[5729] = [5595,6,5595,40]; + lineof_temp[906] = [1041,40,1041,65]; + lineof_temp[2184] = [2333,18,2333,67]; + lineof_temp[3104] = [3183,42,3183,60]; + lineof_temp[292] = [311,8,311,29]; + lineof_temp[4330] = [4379,50,4379,73]; + lineof_temp[986] = [1044,38,1044,43]; + lineof_temp[6988] = [6768,36,6769,77]; + lineof_temp[7193] = [6952,18,6952,18]; + lineof_temp[6397] = [6184,20,6184,63]; + lineof_temp[5784] = [5644,8,5646,74]; + lineof_temp[885] = [1019,38,1019,63]; + lineof_temp[2641] = [2627,6,2627,33]; + lineof_temp[4452] = [4447,8,4450,73]; + lineof_temp[6226] = [6054,10,6057,56]; + lineof_temp[2240] = [2385,20,2385,38]; + lineof_temp[5699] = [5571,14,5571,53]; + lineof_temp[5287] = [5212,31,5212,38]; + lineof_temp[5597] = [5473,6,5481,17]; + lineof_temp[4997] = [5028,26,5028,74]; + lineof_temp[498] = [556,16,556,70]; + lineof_temp[2089] = [2172,18,2172,54]; + lineof_temp[2529] = [2746,20,2746,20]; + lineof_temp[4844] = [4815,32,4815,32]; + lineof_temp[5781] = [5645,12,5645,57]; + lineof_temp[2479] = [2612,10,2612,37]; + lineof_temp[1902] = [2007,31,2007,63]; + lineof_temp[6886] = [6709,18,6709,65]; + lineof_temp[7239] = [6969,14,6969,23]; + lineof_temp[2143] = [2274,61,2274,68]; + lineof_temp[5025] = [5001,42,5002,64]; + lineof_temp[6274] = [6098,28,6099,73]; + lineof_temp[4017] = [4044,17,4044,37]; + lineof_temp[4673] = [4675,17,4675,45]; + lineof_temp[5070] = [4958,8,5031,28]; + lineof_temp[371] = [420,12,420,28]; + lineof_temp[939] = [1103,38,1108,86]; + lineof_temp[1118] = [1179,52,1179,75]; + lineof_temp[3117] = [3196,36,3196,65]; + lineof_temp[6966] = [6746,32,6746,70]; + lineof_temp[5704] = [5574,14,5574,48]; + lineof_temp[6659] = [6418,12,6422,60]; + lineof_temp[7358] = [7088,10,7088,57]; + lineof_temp[626] = [687,18,687,56]; + lineof_temp[4321] = [4362,42,4362,65]; + lineof_temp[4868] = [4829,39,4829,48]; + lineof_temp[5887] = [5731,61,5731,66]; + lineof_temp[6125] = [5980,6,5980,19]; + lineof_temp[3162] = [3153,21,3153,28]; + lineof_temp[5195] = [5136,20,5136,74]; + lineof_temp[5996] = [5867,62,5867,68]; + lineof_temp[1098] = [1278,50,1280,74]; + lineof_temp[1240] = [1419,54,1419,75]; + lineof_temp[1965] = [2139,22,2139,72]; + lineof_temp[4242] = [4234,6,4234,37]; + lineof_temp[1954] = [2117,59,2117,60]; + lineof_temp[6955] = [6733,14,6733,61]; + lineof_temp[1882] = [2046,42,2052,108]; + lineof_temp[4178] = [4179,8,4179,70]; + lineof_temp[4131] = [4151,54,4151,73]; + lineof_temp[3274] = [3342,18,3343,73]; + lineof_temp[6619] = [6392,27,6392,64]; + lineof_temp[6911] = [6701,34,6701,71]; + lineof_temp[1745] = [1913,36,1913,50]; + lineof_temp[2714] = [2799,12,2799,57]; + lineof_temp[573] = [639,12,639,58]; + lineof_temp[2050] = [2209,26,2209,75]; + lineof_temp[4656] = [4665,37,4665,55]; + lineof_temp[4747] = [4731,28,4731,48]; + lineof_temp[5068] = [4959,52,4959,57]; + lineof_temp[7063] = [6840,24,6842,39]; + lineof_temp[7303] = [7045,26,7045,66]; + lineof_temp[2792] = [2840,12,2840,12]; + lineof_temp[6265] = [6084,18,6084,55]; + lineof_temp[1416] = [1471,20,1545,57]; + lineof_temp[3726] = [3778,24,3778,24]; + lineof_temp[2029] = [2179,12,2182,78]; + lineof_temp[2520] = [2732,16,2740,64]; + lineof_temp[3727] = [3775,18,3787,28]; + lineof_temp[5671] = [5548,14,5548,51]; + lineof_temp[4268] = [4300,21,4300,38]; + lineof_temp[7339] = [7048,28,7048,71]; + lineof_temp[4669] = [4655,16,4655,38]; + lineof_temp[7194] = [6949,12,6956,68]; + lineof_temp[476] = [543,26,544,44]; + lineof_temp[303] = [324,14,324,40]; + lineof_temp[1806] = [1960,18,1960,40]; + lineof_temp[4063] = [4084,12,4087,67]; + lineof_temp[6108] = [5974,24,5974,50]; + lineof_temp[3952] = [3967,30,3967,46]; + lineof_temp[3176] = [3225,14,3225,75]; + lineof_temp[3412] = [3459,16,3459,31]; + lineof_temp[4996] = [5028,34,5028,72]; + lineof_temp[5487] = [5399,31,5399,52]; + lineof_temp[273] = [302,8,303,37]; + lineof_temp[2214] = [2354,20,2355,63]; + lineof_temp[3485] = [3525,22,3526,40]; + lineof_temp[1029] = [1141,12,1141,48]; + lineof_temp[2344] = [2475,4,2475,45]; + lineof_temp[2061] = [2193,22,2193,74]; + lineof_temp[6543] = [6331,28,6333,80]; + lineof_temp[2734] = [2824,31,2824,42]; + lineof_temp[3443] = [3497,69,3497,71]; + lineof_temp[6254] = [6066,8,6067,26]; + lineof_temp[7357] = [7036,15,7036,46]; + lineof_temp[1374] = [1521,50,1524,59]; + lineof_temp[1831] = [1895,20,1895,42]; + lineof_temp[3618] = [3669,66,3672,75]; + lineof_temp[167] = [210,14,210,29]; + lineof_temp[407] = [445,64,445,65]; + lineof_temp[798] = [786,21,786,42]; + lineof_temp[2394] = [2525,4,2525,50]; + lineof_temp[507] = [566,21,566,56]; + lineof_temp[4399] = [4272,28,4272,48]; + lineof_temp[1272] = [1367,30,1367,30]; + lineof_temp[4998] = [4978,38,4978,67]; + lineof_temp[5047] = [5020,38,5020,76]; + lineof_temp[975] = [1043,32,1043,58]; + lineof_temp[2503] = [2635,18,2641,62]; + lineof_temp[3038] = [3039,6,3117,27]; + lineof_temp[4717] = [4705,4,4705,28]; + lineof_temp[2640] = [2628,6,2628,31]; + lineof_temp[6315] = [6122,18,6122,55]; + lineof_temp[7093] = [6885,40,6886,57]; + lineof_temp[1418] = [1470,18,1545,59]; + lineof_temp[3955] = [3966,2,3968,52]; + lineof_temp[4113] = [4124,23,4124,46]; + lineof_temp[4450] = [4449,21,4449,27]; + lineof_temp[6403] = [6181,8,6182,26]; + lineof_temp[4045] = [4057,8,4063,16]; + lineof_temp[4444] = [4448,21,4448,69]; + lineof_temp[344] = [383,10,383,55]; + lineof_temp[2350] = [2481,4,2481,37]; + lineof_temp[2608] = [2703,20,2708,69]; + lineof_temp[518] = [583,40,584,56]; + lineof_temp[3430] = [3475,12,3475,50]; + lineof_temp[3878] = [3936,29,3937,69]; + lineof_temp[2107] = [2269,22,2269,35]; + lineof_temp[2852] = [2948,45,2948,66]; + lineof_temp[2187] = [2332,14,2335,96]; + lineof_temp[6730] = [6527,28,6529,71]; + lineof_temp[2191] = [2311,12,2311,50]; + lineof_temp[2339] = [2472,6,2472,34]; + lineof_temp[2862] = [2978,22,2979,55]; + lineof_temp[3533] = [3555,16,3555,16]; + lineof_temp[4523] = [4543,40,4543,40]; + lineof_temp[5802] = [5671,31,5671,68]; + lineof_temp[6411] = [6210,26,6210,45]; + lineof_temp[7137] = [6926,42,6927,62]; + lineof_temp[6299] = [6112,20,6112,72]; + lineof_temp[6497] = [6286,27,6286,63]; + lineof_temp[1844] = [2109,22,2109,73]; + lineof_temp[2967] = [3114,57,3114,57]; + lineof_temp[3089] = [3154,11,3154,33]; + lineof_temp[7254] = [7006,26,7006,63]; + lineof_temp[965] = [1091,40,1091,73]; + lineof_temp[5313] = [5232,31,5232,56]; + lineof_temp[693] = [758,30,758,51]; + lineof_temp[388] = [436,4,438,41]; + lineof_temp[4596] = [4565,17,4565,40]; + lineof_temp[4615] = [4603,6,4617,34]; + lineof_temp[5775] = [5637,8,5639,70]; + lineof_temp[599] = [655,30,678,50]; + lineof_temp[1874] = [2038,44,2038,56]; + lineof_temp[3344] = [3408,32,3408,43]; + lineof_temp[1636] = [1735,18,1735,18]; + lineof_temp[3060] = [3135,25,3135,65]; + lineof_temp[3723] = [3779,32,3779,38]; + lineof_temp[5055] = [5016,32,5017,64]; + lineof_temp[2068] = [2197,22,2197,37]; + lineof_temp[2457] = [2592,21,2595,33]; + lineof_temp[4345] = [4345,6,4345,33]; + lineof_temp[4777] = [4756,24,4756,52]; + lineof_temp[3470] = [3524,30,3524,53]; + lineof_temp[4740] = [4726,18,4727,72]; + lineof_temp[779] = [898,26,902,81]; + lineof_temp[314] = [304,4,305,24]; + lineof_temp[5396] = [5309,14,5311,23]; + lineof_temp[5769] = [5632,6,5632,60]; + lineof_temp[6799] = [6560,8,6561,30]; + lineof_temp[6] = [16,58,16,75]; + lineof_temp[7179] = [6947,18,6947,37]; + lineof_temp[4192] = [4186,6,4186,54]; + lineof_temp[4230] = [4222,6,4222,22]; + lineof_temp[6541] = [6326,27,6326,63]; + lineof_temp[2088] = [2174,10,2176,43]; + lineof_temp[530] = [573,34,573,43]; + lineof_temp[1307] = [1454,28,1454,46]; + lineof_temp[5454] = [5325,11,5325,29]; + lineof_temp[7081] = [6857,23,6857,57]; + lineof_temp[5151] = [5104,14,5104,45]; + lineof_temp[1019] = [983,10,1134,20]; + lineof_temp[1202] = [1142,10,1142,51]; + lineof_temp[2188] = [2331,12,2335,98]; + lineof_temp[4719] = [4709,15,4709,43]; + lineof_temp[5530] = [5422,15,5422,42]; + lineof_temp[256] = [293,10,293,36]; + lineof_temp[7361] = [7091,6,7092,17]; + lineof_temp[1945] = [1996,4,1996,35]; + lineof_temp[6033] = [5901,18,5902,37]; + lineof_temp[505] = [561,12,561,53]; + lineof_temp[74] = [100,11,101,75]; + lineof_temp[4149] = [4157,4,4157,28]; + lineof_temp[3031] = [3055,72,3056,19]; + lineof_temp[3419] = [3464,14,3464,43]; + lineof_temp[5042] = [5006,44,5006,53]; + lineof_temp[5894] = [5759,16,5759,59]; + lineof_temp[1088] = [1297,62,1299,78]; + lineof_temp[2008] = [2167,14,2167,50]; + lineof_temp[6297] = [6108,10,6108,57]; + lineof_temp[3083] = [3160,16,3160,16]; + lineof_temp[3596] = [3629,21,3629,27]; + lineof_temp[4167] = [4170,8,4170,76]; + lineof_temp[4174] = [4176,8,4176,71]; + lineof_temp[4835] = [4803,24,4803,71]; + lineof_temp[1383] = [1520,47,1529,63]; + lineof_temp[2042] = [2238,12,2239,43]; + lineof_temp[2440] = [2574,4,2574,41]; + lineof_temp[3149] = [3183,18,3183,61]; + lineof_temp[4449] = [4448,21,4448,69]; + lineof_temp[5338] = [5248,10,5248,15]; + lineof_temp[3185] = [3224,2,3230,47]; + lineof_temp[6029] = [5891,18,5892,37]; + lineof_temp[6926] = [6664,20,6664,44]; + lineof_temp[1294] = [1438,14,1438,65]; + lineof_temp[5835] = [5694,4,5694,14]; + lineof_temp[6578] = [6347,10,6347,35]; + lineof_temp[2740] = [2822,21,2822,27]; + lineof_temp[2773] = [2854,41,2854,45]; + lineof_temp[3483] = [3529,30,3529,30]; + lineof_temp[5420] = [5340,18,5340,57]; + lineof_temp[5718] = [5589,14,5589,61]; + lineof_temp[6972] = [6793,26,6793,63]; + lineof_temp[4368] = [4407,24,4412,69]; + lineof_temp[2617] = [2652,20,2652,26]; + lineof_temp[1863] = [2024,61,2024,67]; + lineof_temp[3827] = [3803,12,3803,12]; + lineof_temp[4243] = [4233,4,4233,33]; + lineof_temp[1356] = [1487,40,1491,69]; + lineof_temp[782] = [910,36,913,74]; + lineof_temp[1060] = [1331,48,1331,75]; + lineof_temp[1180] = [1337,32,1341,76]; + lineof_temp[3400] = [3446,16,3449,92]; + lineof_temp[6062] = [5920,21,5920,53]; + lineof_temp[3067] = [3136,2,3142,72]; + lineof_temp[6085] = [5953,28,5953,28]; + lineof_temp[2709] = [2802,12,2802,69]; + lineof_temp[7260] = [7001,20,7001,58]; + lineof_temp[7307] = [7048,28,7048,71]; + lineof_temp[4350] = [4393,26,4393,45]; + lineof_temp[5525] = [5411,2,5414,68]; + lineof_temp[6487] = [6276,14,6276,33]; + lineof_temp[631] = [684,12,684,50]; + lineof_temp[6767] = [6435,16,6435,25]; + lineof_temp[736] = [817,36,823,109]; + lineof_temp[2028] = [2181,15,2182,77]; + lineof_temp[4160] = [4164,6,4164,64]; + lineof_temp[6214] = [6047,14,6047,30]; + lineof_temp[677] = [739,8,739,8]; + lineof_temp[1605] = [1740,33,1740,68]; + lineof_temp[3939] = [3952,2,3956,56]; + lineof_temp[1456] = [1598,54,1598,67]; + lineof_temp[3972] = [3990,11,3990,48]; + lineof_temp[4467] = [4481,24,4481,41]; + lineof_temp[7233] = [6982,20,6982,43]; + lineof_temp[811] = [926,16,926,74]; + lineof_temp[1080] = [1312,68,1313,73]; + lineof_temp[1486] = [1618,18,1618,55]; + lineof_temp[1783] = [1910,16,1910,33]; + lineof_temp[4492] = [4439,10,4439,19]; + lineof_temp[4732] = [4708,6,4714,68]; + lineof_temp[6081] = [5952,34,5952,53]; + lineof_temp[6833] = [6598,40,6598,45]; + lineof_temp[7317] = [7075,54,7078,71]; + lineof_temp[1345] = [1487,41,1487,67]; + lineof_temp[3395] = [3448,20,3448,53]; + lineof_temp[3528] = [3558,20,3561,24]; + lineof_temp[5127] = [5053,8,5053,8]; + lineof_temp[464] = [526,4,526,36]; + lineof_temp[589] = [676,46,676,61]; + lineof_temp[3186] = [3223,27,3223,63]; + lineof_temp[6234] = [6065,18,6065,55]; + lineof_temp[6846] = [6591,61,6591,74]; + lineof_temp[3473] = [3523,30,3523,30]; + lineof_temp[301] = [323,35,323,61]; + lineof_temp[1659] = [1813,20,1816,74]; + lineof_temp[6468] = [6260,22,6260,41]; + lineof_temp[2185] = [2332,14,2332,29]; + lineof_temp[7148] = [6924,38,6943,46]; + lineof_temp[3641] = [3637,28,3637,28]; + lineof_temp[4090] = [4111,20,4111,25]; + lineof_temp[4828] = [4744,8,4744,8]; + lineof_temp[6387] = [6163,14,6163,19]; + lineof_temp[726] = [809,59,809,61]; + lineof_temp[4808] = [4775,18,4781,77]; + lineof_temp[1351] = [1494,42,1495,68]; + lineof_temp[4594] = [4567,2,4567,46]; + lineof_temp[7312] = [7064,46,7066,50]; + lineof_temp[5872] = [5736,18,5736,33]; + lineof_temp[6505] = [6286,74,6287,23]; + lineof_temp[1079] = [1312,68,1313,73]; + lineof_temp[1793] = [1950,10,1954,77]; + lineof_temp[3392] = [3433,12,3433,24]; + lineof_temp[4099] = [4128,14,4128,51]; + lineof_temp[4410] = [4291,34,4294,70]; + lineof_temp[1031] = [1144,21,1144,63]; + lineof_temp[1234] = [1395,50,1397,64]; + lineof_temp[5373] = [5256,8,5257,38]; + lineof_temp[7096] = [6882,41,6882,43]; + lineof_temp[1318] = [1446,16,1446,37]; + lineof_temp[743] = [837,46,838,74]; + lineof_temp[929] = [1123,38,1124,54]; + lineof_temp[275] = [301,6,303,39]; + lineof_temp[1179] = [1337,32,1337,47]; + lineof_temp[2194] = [2310,2,2337,12]; + lineof_temp[2460] = [2600,12,2600,68]; + lineof_temp[6703] = [6492,54,6492,71]; + lineof_temp[3602] = [3640,32,3642,75]; + lineof_temp[5365] = [5270,59,5270,65]; + lineof_temp[768] = [830,36,830,73]; + lineof_temp[2215] = [2350,22,2353,72]; + lineof_temp[2585] = [2691,20,2691,76]; + lineof_temp[2947] = [3041,10,3042,49]; + lineof_temp[3820] = [3853,16,3867,75]; + lineof_temp[6934] = [6714,10,6714,37]; + lineof_temp[2039] = [2241,16,2242,31]; + lineof_temp[4302] = [4312,22,4313,45]; + lineof_temp[6706] = [6490,50,6492,73]; + lineof_temp[7292] = [7028,12,7028,57]; + lineof_temp[2946] = [3041,10,3042,49]; + lineof_temp[4190] = [4186,14,4186,52]; + lineof_temp[2570] = [2684,30,2684,63]; + lineof_temp[5309] = [5236,18,5237,79]; + lineof_temp[7103] = [6871,36,6871,58]; + lineof_temp[1841] = [1987,25,1987,43]; + lineof_temp[2247] = [2391,20,2394,31]; + lineof_temp[7336] = [7052,49,7052,58]; + lineof_temp[1436] = [1562,12,1563,58]; + lineof_temp[5899] = [5758,6,5761,67]; + lineof_temp[731] = [819,42,820,58]; + lineof_temp[2958] = [3055,22,3055,61]; + lineof_temp[4513] = [4539,38,4542,46]; + lineof_temp[4784] = [4763,20,4763,69]; + lineof_temp[1446] = [1575,12,1576,58]; + lineof_temp[2775] = [2851,28,2863,65]; + lineof_temp[1789] = [1952,16,1952,65]; + lineof_temp[3515] = [3476,8,3476,8]; + lineof_temp[4274] = [4312,42,4312,56]; + lineof_temp[6060] = [5924,16,5927,66]; + lineof_temp[882] = [988,18,988,51]; + lineof_temp[5393] = [5291,21,5291,33]; + lineof_temp[2229] = [2344,16,2344,21]; + lineof_temp[2592] = [2695,32,2695,48]; + lineof_temp[4101] = [4126,4,4127,23]; + lineof_temp[2304] = [2435,4,2435,41]; + lineof_temp[6765] = [6445,12,6446,66]; + lineof_temp[1051] = [1274,49,1274,67]; + lineof_temp[656] = [715,6,719,77]; + lineof_temp[947] = [1115,38,1116,77]; + lineof_temp[1903] = [2007,74,2008,29]; + lineof_temp[6793] = [6574,12,6575,30]; + lineof_temp[3190] = [3238,10,3238,28]; + lineof_temp[5221] = [5150,24,5150,76]; + lineof_temp[608] = [651,26,651,26]; + lineof_temp[2755] = [2834,4,2834,33]; + lineof_temp[7359] = [7088,10,7088,57]; + lineof_temp[5187] = [5129,11,5129,39]; + lineof_temp[1855] = [2019,45,2020,58]; + lineof_temp[4009] = [4025,11,4025,45]; + lineof_temp[996] = [1061,34,1063,75]; + lineof_temp[5883] = [5742,20,5742,46]; + lineof_temp[5034] = [5012,42,5012,75]; + lineof_temp[6378] = [6170,20,6170,72]; + lineof_temp[5576] = [5447,14,5448,39]; + lineof_temp[684] = [751,8,751,53]; + lineof_temp[5280] = [5194,16,5194,16]; + lineof_temp[876] = [1000,26,1002,30]; + lineof_temp[1879] = [2047,46,2048,62]; + lineof_temp[2416] = [2547,4,2547,46]; + lineof_temp[7080] = [6857,23,6857,57]; + lineof_temp[26] = [41,4,42,26]; + lineof_temp[1002] = [1040,30,1042,65]; + lineof_temp[3247] = [3312,20,3312,74]; + lineof_temp[3343] = [3380,22,3380,47]; + lineof_temp[4823] = [4783,10,4783,22]; + lineof_temp[3957] = [3974,16,3974,35]; + lineof_temp[296] = [319,14,319,40]; + lineof_temp[435] = [475,22,475,27]; + lineof_temp[225] = [262,20,262,50]; + lineof_temp[7060] = [6830,22,6831,44]; + lineof_temp[5747] = [5611,14,5611,37]; + lineof_temp[2249] = [2395,20,2395,38]; + lineof_temp[3918] = [3897,8,3902,10]; + lineof_temp[1379] = [1526,52,1529,61]; + lineof_temp[1928] = [2103,36,2103,46]; + lineof_temp[2119] = [2257,10,2258,29]; + lineof_temp[2708] = [2802,22,2802,43]; + lineof_temp[4035] = [4055,11,4055,29]; + lineof_temp[5479] = [5386,18,5389,68]; + lineof_temp[1385] = [1531,52,1534,61]; + lineof_temp[3292] = [3329,4,3330,42]; + lineof_temp[6236] = [6063,8,6064,26]; + lineof_temp[7084] = [6863,28,6865,66]; + lineof_temp[2832] = [2928,18,2928,70]; + lineof_temp[2762] = [2859,57,2860,75]; + lineof_temp[2952] = [3050,20,3052,34]; + lineof_temp[5812] = [5665,20,5665,26]; + lineof_temp[3792] = [3837,45,3837,50]; + lineof_temp[5074] = [4955,2,5031,32]; + lineof_temp[5750] = [5609,4,5610,25]; + lineof_temp[454] = [516,10,516,10]; + lineof_temp[1266] = [1369,40,1369,63]; + lineof_temp[6898] = [6679,34,6679,55]; + lineof_temp[606] = [650,30,650,51]; + lineof_temp[1402] = [1520,46,1538,66]; + lineof_temp[5478] = [5386,18,5386,33]; + lineof_temp[269] = [302,31,302,57]; + lineof_temp[4690] = [4671,24,4671,47]; + lineof_temp[6193] = [6032,22,6032,42]; + lineof_temp[117] = [151,6,151,37]; + lineof_temp[2124] = [2291,24,2293,37]; + lineof_temp[4416] = [4278,28,4278,51]; + lineof_temp[2203] = [2360,26,2360,75]; + lineof_temp[2684] = [2775,16,2775,29]; + lineof_temp[4172] = [4172,6,4173,78]; + lineof_temp[912] = [1040,30,1042,65]; + lineof_temp[2496] = [2602,6,2611,8]; + lineof_temp[4812] = [4772,12,4782,20]; + lineof_temp[244] = [278,29,278,46]; + lineof_temp[2092] = [2171,12,2171,24]; + lineof_temp[4250] = [4242,6,4242,22]; + lineof_temp[4341] = [4347,21,4347,38]; + lineof_temp[5991] = [5808,4,5809,44]; + lineof_temp[405] = [447,16,447,21]; + lineof_temp[1447] = [1573,12,1574,58]; + lineof_temp[2590] = [2697,32,2697,71]; + lineof_temp[137] = [186,33,186,55]; + lineof_temp[2020] = [2181,36,2181,50]; + lineof_temp[2674] = [2779,20,2779,40]; + lineof_temp[6066] = [5916,16,5916,71]; + lineof_temp[3504] = [3503,24,3503,40]; + lineof_temp[6380] = [6172,38,6172,72]; + lineof_temp[3489] = [3536,38,3536,51]; + lineof_temp[751] = [854,50,856,54]; + lineof_temp[815] = [933,20,933,38]; + lineof_temp[1109] = [1266,38,1266,38]; + lineof_temp[1246] = [1421,56,1421,67]; + lineof_temp[1936] = [2002,23,2002,59]; + lineof_temp[5921] = [5794,34,5794,65]; + lineof_temp[418] = [486,24,486,46]; + lineof_temp[2581] = [2685,29,2685,31]; + lineof_temp[4825] = [4745,8,4768,10]; + lineof_temp[5270] = [5200,32,5200,70]; + lineof_temp[5749] = [5611,6,5611,39]; + lineof_temp[7219] = [6975,12,6975,59]; + lineof_temp[2174] = [2319,20,2319,69]; + lineof_temp[4891] = [4840,6,4840,12]; + lineof_temp[2665] = [2759,8,2760,56]; + lineof_temp[4608] = [4607,21,4607,49]; + lineof_temp[708] = [777,12,780,80]; + lineof_temp[3437] = [3495,32,3497,58]; + lineof_temp[3703] = [3754,24,3754,34]; + lineof_temp[3961] = [3973,4,3974,50]; + lineof_temp[6674] = [6547,16,6547,53]; + lineof_temp[4439] = [4432,29,4432,54]; + lineof_temp[5956] = [5822,21,5822,46]; + lineof_temp[1473] = [1580,6,1583,27]; + lineof_temp[3691] = [3745,10,3747,78]; + lineof_temp[6407] = [6197,14,6201,80]; + lineof_temp[7095] = [6884,38,6886,59]; + lineof_temp[2083] = [2219,12,2220,43]; + lineof_temp[4979] = [4866,10,4866,28]; + lineof_temp[1821] = [1976,44,1976,49]; + lineof_temp[2079] = [2222,16,2222,31]; + lineof_temp[2911] = [3013,22,3014,28]; + lineof_temp[423] = [497,26,497,59]; + lineof_temp[3042] = [3035,6,3035,33]; + lineof_temp[6693] = [6470,34,6470,63]; + lineof_temp[424] = [495,24,496,42]; + lineof_temp[1978] = [2128,10,2129,29]; + lineof_temp[4165] = [4165,4,4165,36]; + lineof_temp[4106] = [4134,12,4134,50]; + lineof_temp[1304] = [1452,31,1452,49]; + lineof_temp[6906] = [6695,38,6695,75]; + lineof_temp[394] = [450,21,450,52]; + lineof_temp[7033] = [6815,18,6816,79]; + lineof_temp[3282] = [3340,14,3345,55]; + lineof_temp[7182] = [6954,27,6954,49]; + lineof_temp[338] = [357,25,357,41]; + lineof_temp[5102] = [5060,18,5060,66]; + lineof_temp[1721] = [1885,28,1885,56]; + lineof_temp[6028] = [5893,24,5893,71]; + lineof_temp[6377] = [6170,20,6170,72]; + lineof_temp[7067] = [6825,23,6825,59]; + lineof_temp[233] = [250,12,250,62]; + lineof_temp[4086] = [4117,18,4117,71]; + lineof_temp[5583] = [5435,16,5435,29]; + lineof_temp[1743] = [1905,6,1905,30]; + lineof_temp[3735] = [3768,6,3787,36]; + lineof_temp[5385] = [5294,23,5294,24]; + lineof_temp[2101] = [2259,16,2259,40]; + lineof_temp[4549] = [4556,12,4558,40]; + lineof_temp[6427] = [6209,14,6222,32]; + lineof_temp[763] = [876,46,886,74]; + lineof_temp[5183] = [5110,8,5110,8]; + lineof_temp[6990] = [6772,36,6775,80]; + lineof_temp[361] = [392,2,403,75]; + lineof_temp[661] = [730,49,730,74]; + lineof_temp[3036] = [3042,60,3042,66]; + lineof_temp[4974] = [4888,8,4889,27]; + lineof_temp[136] = [185,31,185,53]; + lineof_temp[5529] = [5424,12,5424,69]; + lineof_temp[819] = [937,58,937,73]; + lineof_temp[4024] = [4046,14,4046,48]; + lineof_temp[7066] = [6828,22,6828,48]; + lineof_temp[7293] = [7028,12,7028,57]; + lineof_temp[88] = [97,4,97,27]; + lineof_temp[2375] = [2508,6,2508,28]; + lineof_temp[3332] = [3400,36,3401,52]; + lineof_temp[4339] = [4363,16,4364,33]; + lineof_temp[2583] = [2677,16,2686,64]; + lineof_temp[3135] = [3195,24,3218,69]; + lineof_temp[5035] = [5010,42,5011,58]; + lineof_temp[4846] = [4808,24,4809,49]; + lineof_temp[5954] = [5815,16,5819,104]; + lineof_temp[886] = [1019,38,1019,63]; + lineof_temp[4298] = [4315,30,4315,70]; + lineof_temp[6842] = [6630,36,6630,73]; + lineof_temp[4723] = [4714,26,4714,58]; + lineof_temp[7304] = [7045,26,7045,66]; + lineof_temp[2883] = [2960,18,2960,58]; + lineof_temp[129] = [176,22,176,37]; + lineof_temp[5380] = [5296,22,5296,43]; + lineof_temp[5808] = [5668,16,5672,64]; + lineof_temp[6208] = [6043,18,6043,38]; + lineof_temp[6663] = [6427,20,6427,55]; + lineof_temp[6714] = [6473,36,6473,77]; + lineof_temp[5979] = [5850,20,5851,58]; + lineof_temp[130] = [174,20,175,39]; + lineof_temp[2668] = [2773,20,2773,40]; + lineof_temp[5916] = [5776,20,5776,46]; + lineof_temp[6301] = [6114,38,6114,67]; + lineof_temp[3684] = [3706,16,3706,55]; + lineof_temp[4437] = [4434,4,4435,29]; + lineof_temp[6302] = [6114,38,6114,67]; + lineof_temp[6504] = [6286,27,6286,63]; + lineof_temp[1592] = [1697,11,1697,46]; + lineof_temp[5634] = [5509,8,5509,8]; + lineof_temp[4194] = [4188,14,4188,44]; + lineof_temp[6722] = [6512,28,6513,57]; + lineof_temp[3530] = [3556,16,3561,27]; + lineof_temp[4853] = [4802,14,4820,22]; + lineof_temp[7295] = [7027,8,7031,70]; + lineof_temp[869] = [1001,51,1001,74]; + lineof_temp[3669] = [3719,26,3719,75]; + lineof_temp[3896] = [3927,22,3927,56]; + lineof_temp[6264] = [6084,18,6084,55]; + lineof_temp[6609] = [6383,28,6383,65]; + lineof_temp[2279] = [2421,41,2421,74]; + lineof_temp[4822] = [4784,12,4787,65]; + lineof_temp[5255] = [5164,26,5164,52]; + lineof_temp[4405] = [4283,42,4283,54]; + lineof_temp[796] = [789,8,789,8]; + lineof_temp[3199] = [3295,22,3295,74]; + lineof_temp[1748] = [1913,16,1914,48]; + lineof_temp[4807] = [4777,24,4777,24]; + lineof_temp[704] = [774,10,775,40]; + lineof_temp[7353] = [7038,12,7038,49]; + lineof_temp[164] = [203,16,204,35]; + lineof_temp[341] = [376,21,376,39]; + lineof_temp[2486] = [2619,14,2619,70]; + lineof_temp[1251] = [1394,44,1408,46]; + lineof_temp[203] = [247,37,247,59]; + lineof_temp[2643] = [2622,6,2625,27]; + lineof_temp[6893] = [6677,36,6678,77]; + lineof_temp[870] = [1001,51,1001,74]; + lineof_temp[2066] = [2198,26,2198,75]; + lineof_temp[3126] = [3216,36,3218,61]; + lineof_temp[848] = [976,6,977,45]; + lineof_temp[1301] = [1449,27,1449,57]; + lineof_temp[3601] = [3640,32,3642,75]; + lineof_temp[3822] = [3849,14,3850,33]; + lineof_temp[6836] = [6626,34,6626,71]; + lineof_temp[7161] = [6905,54,6905,59]; + lineof_temp[5028] = [5003,44,5005,68]; + lineof_temp[236] = [245,6,245,36]; + lineof_temp[2959] = [3055,22,3055,61]; + lineof_temp[5253] = [5168,4,5169,45]; + lineof_temp[6037] = [5873,12,5880,14]; + lineof_temp[2531] = [2730,12,2740,66]; + lineof_temp[5219] = [5153,22,5153,40]; + lineof_temp[6909] = [6675,40,6675,45]; + lineof_temp[646] = [706,12,706,61]; + lineof_temp[3303] = [3365,18,3365,34]; + lineof_temp[4217] = [4208,45,4208,73]; + lineof_temp[2912] = [3013,22,3014,28]; + lineof_temp[3813] = [3866,35,3866,40]; + lineof_temp[2676] = [2781,22,2781,36]; + lineof_temp[3369] = [3432,40,3432,58]; + lineof_temp[3640] = [3636,35,3636,40]; + lineof_temp[5162] = [5096,8,5096,8]; + lineof_temp[4470] = [4473,16,4480,18]; + lineof_temp[1321] = [1443,60,1443,67]; + lineof_temp[3250] = [3316,18,3317,44]; + lineof_temp[3078] = [3166,24,3166,57]; + lineof_temp[4420] = [4276,28,4276,28]; + lineof_temp[4754] = [4726,18,4727,72]; + lineof_temp[1040] = [1148,20,1148,53]; + lineof_temp[6109] = [5972,30,5972,49]; + lineof_temp[6480] = [6260,22,6260,41]; + lineof_temp[711] = [776,12,776,12]; + lineof_temp[2151] = [2253,2,2298,12]; + lineof_temp[4648] = [4647,6,4650,68]; + lineof_temp[4876] = [4796,6,4796,69]; + lineof_temp[3044] = [3030,10,3030,17]; + lineof_temp[3552] = [3595,44,3595,67]; + lineof_temp[6418] = [6221,36,6221,77]; + lineof_temp[6769] = [6433,4,6433,44]; + lineof_temp[1819] = [1978,20,1978,45]; + lineof_temp[5366] = [5271,18,5271,18]; + lineof_temp[1619] = [1756,40,1757,58]; + lineof_temp[3418] = [3464,22,3464,41]; + lineof_temp[5441] = [5354,22,5354,30]; + lineof_temp[5562] = [5460,32,5460,40]; + lineof_temp[734] = [818,38,823,107]; + lineof_temp[2820] = [2879,12,2879,50]; + lineof_temp[3803] = [3859,31,3860,60]; + lineof_temp[5558] = [5466,14,5466,38]; + lineof_temp[5600] = [5483,14,5483,24]; + lineof_temp[6330] = [6117,4,6117,38]; + lineof_temp[3131] = [3199,30,3206,32]; + lineof_temp[5289] = [5212,15,5212,39]; + lineof_temp[3218] = [3277,26,3279,69]; + lineof_temp[3217] = [3282,28,3283,73]; + lineof_temp[5595] = [5474,54,5474,60]; + lineof_temp[6075] = [5939,19,5939,49]; + lineof_temp[1253] = [1389,48,1390,56]; + lineof_temp[5789] = [5651,14,5651,48]; + lineof_temp[7007] = [6788,26,6788,38]; + lineof_temp[5264] = [5202,18,5202,76]; + lineof_temp[1245] = [1411,46,1412,76]; + lineof_temp[3287] = [3335,16,3335,51]; + lineof_temp[1603] = [1733,22,1733,68]; + lineof_temp[4790] = [4746,18,4746,26]; + lineof_temp[2120] = [2274,22,2274,50]; + lineof_temp[6433] = [6237,58,6237,76]; + lineof_temp[3739] = [3795,6,3796,79]; + lineof_temp[5647] = [5530,48,5530,74]; + lineof_temp[132] = [179,26,179,44]; + lineof_temp[2859] = [2960,18,2960,58]; + lineof_temp[4173] = [4171,4,4171,46]; + lineof_temp[5476] = [5387,22,5387,71]; + lineof_temp[992] = [1061,34,1063,75]; + lineof_temp[1861] = [2026,40,2026,62]; + lineof_temp[5868] = [5731,15,5731,50]; + lineof_temp[2113] = [2262,20,2262,69]; + lineof_temp[2547] = [2663,35,2663,60]; + lineof_temp[5672] = [5548,14,5548,51]; + lineof_temp[670] = [738,14,738,32]; + lineof_temp[1665] = [1820,16,1823,70]; + lineof_temp[5818] = [5657,10,5657,19]; + lineof_temp[1775] = [1942,18,1942,51]; + lineof_temp[1953] = [2117,12,2117,48]; + lineof_temp[549] = [611,16,614,71]; + lineof_temp[1017] = [985,23,985,26]; + lineof_temp[2715] = [2799,12,2799,57]; + lineof_temp[4276] = [4312,22,4313,45]; + lineof_temp[5494] = [5400,28,5400,28]; + lineof_temp[3999] = [3990,59,3991,19]; + lineof_temp[5845] = [5712,27,5712,68]; + lineof_temp[3284] = [3338,22,3338,30]; + lineof_temp[3576] = [3585,38,3585,77]; + lineof_temp[1000] = [1044,30,1058,30]; + lineof_temp[1681] = [1842,18,1842,60]; + lineof_temp[3745] = [3805,23,3807,68]; + lineof_temp[471] = [542,28,542,51]; + lineof_temp[2567] = [2665,16,2674,64]; + lineof_temp[6752] = [6498,21,6498,28]; + lineof_temp[1329] = [1459,10,1459,33]; + lineof_temp[4488] = [4446,6,4451,8]; + lineof_temp[4670] = [4673,11,4673,39]; + lineof_temp[6731] = [6527,28,6529,71]; + lineof_temp[267] = [296,6,298,39]; + lineof_temp[5505] = [5380,12,5380,50]; + lineof_temp[6676] = [6441,18,6441,51]; + lineof_temp[6997] = [6757,30,6758,48]; + lineof_temp[4751] = [4728,24,4728,62]; + lineof_temp[5491] = [5401,28,5401,56]; + lineof_temp[3175] = [3225,14,3225,75]; + lineof_temp[1492] = [1619,8,1619,29]; + lineof_temp[5544] = [5445,20,5445,69]; + lineof_temp[1990] = [2150,14,2150,45]; + lineof_temp[2307] = [2440,6,2440,34]; + lineof_temp[4263] = [4252,4,4253,26]; + lineof_temp[3296] = [3357,12,3357,61]; + lineof_temp[5360] = [5274,28,5274,38]; + lineof_temp[6878] = [6662,32,6662,70]; + lineof_temp[775] = [799,35,799,41]; + lineof_temp[1102] = [1274,48,1275,76]; + lineof_temp[5570] = [5462,26,5462,34]; + lineof_temp[961] = [1080,44,1080,66]; + lineof_temp[1078] = [1306,66,1308,71]; + lineof_temp[3816] = [3859,22,3860,61]; + lineof_temp[97] = [126,6,126,27]; + lineof_temp[5459] = [5366,21,5366,40]; + lineof_temp[2238] = [2381,20,2384,31]; + lineof_temp[5330] = [5218,10,5218,17]; + lineof_temp[4595] = [4566,2,4566,45]; + lineof_temp[5345] = [5263,20,5264,39]; + lineof_temp[6040] = [5872,12,5872,12]; + lineof_temp[2482] = [2617,20,2617,38]; + lineof_temp[5433] = [5343,12,5344,37]; + lineof_temp[7211] = [6961,8,6961,38]; + lineof_temp[1910] = [2070,22,2070,55]; + lineof_temp[2190] = [2313,16,2313,21]; + lineof_temp[3438] = [3495,32,3497,58]; + lineof_temp[4183] = [4182,8,4182,71]; + lineof_temp[7024] = [6797,4,6797,30]; + lineof_temp[1103] = [1269,42,1271,69]; + lineof_temp[486] = [530,16,530,62]; + lineof_temp[895] = [1015,22,1025,30]; + lineof_temp[2449] = [2586,6,2586,37]; + lineof_temp[1210] = [1428,46,1428,67]; + lineof_temp[7220] = [6973,12,6973,48]; + lineof_temp[771] = [828,32,890,42]; + lineof_temp[4417] = [4277,28,4277,66]; + lineof_temp[1938] = [2004,20,2004,20]; + lineof_temp[4942] = [4907,44,4907,62]; + lineof_temp[3396] = [3447,20,3447,69]; + lineof_temp[1353] = [1493,40,1495,69]; + lineof_temp[3885] = [3938,32,3938,63]; + lineof_temp[2896] = [2937,2,2937,58]; + lineof_temp[6072] = [5935,14,5935,65]; + lineof_temp[3399] = [3446,16,3449,92]; + lineof_temp[6437] = [6232,26,6237,83]; + lineof_temp[6668] = [6415,16,6415,25]; + lineof_temp[1611] = [1750,40,1750,73]; + lineof_temp[3651] = [3627,10,3627,49]; + lineof_temp[4770] = [4749,16,4752,59]; + lineof_temp[6814] = [6601,38,6601,75]; + lineof_temp[29] = [46,6,46,41]; + lineof_temp[3435] = [3491,38,3492,53]; + lineof_temp[5226] = [5136,16,5140,17]; + lineof_temp[1566] = [1681,4,1682,35]; + lineof_temp[3510] = [3478,32,3478,34]; + lineof_temp[5225] = [5141,16,5143,18]; +lineof_data["JsInterpreter.js"] = lineof_temp; diff --git a/branch/4.04/libraries/codemirror/lib/codemirror.css b/branch/4.04/libraries/codemirror/lib/codemirror.css new file mode 100644 index 0000000000000000000000000000000000000000..1cf66a9fa9004e9c4d9ce3c00104ae9854931289 --- /dev/null +++ b/branch/4.04/libraries/codemirror/lib/codemirror.css @@ -0,0 +1,338 @@ +/* BASICS */ + +.CodeMirror { + /* Set height, width, borders, and global font properties here */ + font-family: monospace; + height: 300px; + color: black; +} + +/* PADDING */ + +.CodeMirror-lines { + padding: 4px 0; /* Vertical padding around content */ +} +.CodeMirror pre { + padding: 0 4px; /* Horizontal padding of content */ +} + +.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler { + background-color: white; /* The little square between H and V scrollbars */ +} + +/* GUTTER */ + +.CodeMirror-gutters { + border-right: 1px solid #ddd; + background-color: #f7f7f7; + white-space: nowrap; +} +.CodeMirror-linenumbers {} +.CodeMirror-linenumber { + padding: 0 3px 0 5px; + min-width: 20px; + text-align: right; + color: #999; + white-space: nowrap; +} + +.CodeMirror-guttermarker { color: black; } +.CodeMirror-guttermarker-subtle { color: #999; } + +/* CURSOR */ + +.CodeMirror-cursor { + border-left: 1px solid black; + border-right: none; + width: 0; +} +/* Shown when moving in bi-directional text */ +.CodeMirror div.CodeMirror-secondarycursor { + border-left: 1px solid silver; +} +.cm-fat-cursor .CodeMirror-cursor { + width: auto; + border: 0; + background: #7e7; +} +.cm-fat-cursor div.CodeMirror-cursors { + z-index: 1; +} + +.cm-animate-fat-cursor { + width: auto; + border: 0; + -webkit-animation: blink 1.06s steps(1) infinite; + -moz-animation: blink 1.06s steps(1) infinite; + animation: blink 1.06s steps(1) infinite; + background-color: #7e7; +} +@-moz-keyframes blink { + 0% {} + 50% { background-color: transparent; } + 100% {} +} +@-webkit-keyframes blink { + 0% {} + 50% { background-color: transparent; } + 100% {} +} +@keyframes blink { + 0% {} + 50% { background-color: transparent; } + 100% {} +} + +/* Can style cursor different in overwrite (non-insert) mode */ +.CodeMirror-overwrite .CodeMirror-cursor {} + +.cm-tab { display: inline-block; text-decoration: inherit; } + +.CodeMirror-ruler { + border-left: 1px solid #ccc; + position: absolute; +} + +/* DEFAULT THEME */ + +.cm-s-default .cm-header {color: blue;} +.cm-s-default .cm-quote {color: #090;} +.cm-negative {color: #d44;} +.cm-positive {color: #292;} +.cm-header, .cm-strong {font-weight: bold;} +.cm-em {font-style: italic;} +.cm-link {text-decoration: underline;} +.cm-strikethrough {text-decoration: line-through;} + +.cm-s-default .cm-keyword {color: #708;} +.cm-s-default .cm-atom {color: #219;} +.cm-s-default .cm-number {color: #164;} +.cm-s-default .cm-def {color: #00f;} +.cm-s-default .cm-variable, +.cm-s-default .cm-punctuation, +.cm-s-default .cm-property, +.cm-s-default .cm-operator {} +.cm-s-default .cm-variable-2 {color: #05a;} +.cm-s-default .cm-variable-3 {color: #085;} +.cm-s-default .cm-comment {color: #a50;} +.cm-s-default .cm-string {color: #a11;} +.cm-s-default .cm-string-2 {color: #f50;} +.cm-s-default .cm-meta {color: #555;} +.cm-s-default .cm-qualifier {color: #555;} +.cm-s-default .cm-builtin {color: #30a;} +.cm-s-default .cm-bracket {color: #997;} +.cm-s-default .cm-tag {color: #170;} +.cm-s-default .cm-attribute {color: #00c;} +.cm-s-default .cm-hr {color: #999;} +.cm-s-default .cm-link {color: #00c;} + +.cm-s-default .cm-error {color: #f00;} +.cm-invalidchar {color: #f00;} + +.CodeMirror-composing { border-bottom: 2px solid; } + +/* Default styles for common addons */ + +div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;} +div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;} +.CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); } +.CodeMirror-activeline-background {background: #e8f2ff;} + +/* STOP */ + +/* The rest of this file contains styles related to the mechanics of + the editor. You probably shouldn't touch them. */ + +.CodeMirror { + position: relative; + overflow: hidden; + background: white; +} + +.CodeMirror-scroll { + overflow: scroll !important; /* Things will break if this is overridden */ + /* 30px is the magic margin used to hide the element's real scrollbars */ + /* See overflow: hidden in .CodeMirror */ + margin-bottom: -30px; margin-right: -30px; + padding-bottom: 30px; + height: 100%; + outline: none; /* Prevent dragging from highlighting the element */ + position: relative; +} +.CodeMirror-sizer { + position: relative; + border-right: 30px solid transparent; +} + +/* The fake, visible scrollbars. Used to force redraw during scrolling + before actual scrolling happens, thus preventing shaking and + flickering artifacts. */ +.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler { + position: absolute; + z-index: 6; + display: none; +} +.CodeMirror-vscrollbar { + right: 0; top: 0; + overflow-x: hidden; + overflow-y: scroll; +} +.CodeMirror-hscrollbar { + bottom: 0; left: 0; + overflow-y: hidden; + overflow-x: scroll; +} +.CodeMirror-scrollbar-filler { + right: 0; bottom: 0; +} +.CodeMirror-gutter-filler { + left: 0; bottom: 0; +} + +.CodeMirror-gutters { + position: absolute; left: 0; top: 0; + min-height: 100%; + z-index: 3; +} +.CodeMirror-gutter { + white-space: normal; + height: 100%; + display: inline-block; + vertical-align: top; + margin-bottom: -30px; + /* Hack to make IE7 behave */ + *zoom:1; + *display:inline; +} +.CodeMirror-gutter-wrapper { + position: absolute; + z-index: 4; + background: none !important; + border: none !important; +} +.CodeMirror-gutter-background { + position: absolute; + top: 0; bottom: 0; + z-index: 4; +} +.CodeMirror-gutter-elt { + position: absolute; + cursor: default; + z-index: 4; +} +.CodeMirror-gutter-wrapper { + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; +} + +.CodeMirror-lines { + cursor: text; + min-height: 1px; /* prevents collapsing before first draw */ +} +.CodeMirror pre { + /* Reset some styles that the rest of the page might have set */ + -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0; + border-width: 0; + background: transparent; + font-family: inherit; + font-size: inherit; + margin: 0; + white-space: pre; + word-wrap: normal; + line-height: inherit; + color: inherit; + z-index: 2; + position: relative; + overflow: visible; + -webkit-tap-highlight-color: transparent; + -webkit-font-variant-ligatures: none; + font-variant-ligatures: none; +} +.CodeMirror-wrap pre { + word-wrap: break-word; + white-space: pre-wrap; + word-break: normal; +} + +.CodeMirror-linebackground { + position: absolute; + left: 0; right: 0; top: 0; bottom: 0; + z-index: 0; +} + +.CodeMirror-linewidget { + position: relative; + z-index: 2; + overflow: auto; +} + +.CodeMirror-widget {} + +.CodeMirror-code { + outline: none; +} + +/* Force content-box sizing for the elements where we expect it */ +.CodeMirror-scroll, +.CodeMirror-sizer, +.CodeMirror-gutter, +.CodeMirror-gutters, +.CodeMirror-linenumber { + -moz-box-sizing: content-box; + box-sizing: content-box; +} + +.CodeMirror-measure { + position: absolute; + width: 100%; + height: 0; + overflow: hidden; + visibility: hidden; +} + +.CodeMirror-cursor { position: absolute; } +.CodeMirror-measure pre { position: static; } + +div.CodeMirror-cursors { + visibility: hidden; + position: relative; + z-index: 3; +} +div.CodeMirror-dragcursors { + visibility: visible; +} + +.CodeMirror-focused div.CodeMirror-cursors { + visibility: visible; +} + +.CodeMirror-selected { background: #d9d9d9; } +.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; } +.CodeMirror-crosshair { cursor: crosshair; } +.CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection { background: #d7d4f0; } +.CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { background: #d7d4f0; } + +.cm-searching { + background: #ffa; + background: rgba(255, 255, 0, .4); +} + +/* IE7 hack to prevent it from returning funny offsetTops on the spans */ +.CodeMirror span { *vertical-align: text-bottom; } + +/* Used to force a border model for a node */ +.cm-force-border { padding-right: .1px; } + +@media print { + /* Hide the cursor when printing */ + .CodeMirror div.CodeMirror-cursors { + visibility: hidden; + } +} + +/* See issue #2901 */ +.cm-tab-wrap-hack:after { content: ''; } + +/* Help users use markselection to safely style text background */ +span.CodeMirror-selectedtext { background: none; } diff --git a/branch/4.04/libraries/codemirror/lib/codemirror.js b/branch/4.04/libraries/codemirror/lib/codemirror.js new file mode 100644 index 0000000000000000000000000000000000000000..33928bc8ea791279537b93430d63ec959457dd84 --- /dev/null +++ b/branch/4.04/libraries/codemirror/lib/codemirror.js @@ -0,0 +1,8898 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: http://codemirror.net/LICENSE + +// This is CodeMirror (http://codemirror.net), a code editor +// implemented in JavaScript on top of the browser's DOM. +// +// You can find some technical background for some of the code below +// at http://marijnhaverbeke.nl/blog/#cm-internals . + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + module.exports = mod(); + else if (typeof define == "function" && define.amd) // AMD + return define([], mod); + else // Plain browser env + (this || window).CodeMirror = mod(); +})(function() { + "use strict"; + + // BROWSER SNIFFING + + // Kludges for bugs and behavior differences that can't be feature + // detected are enabled based on userAgent etc sniffing. + var userAgent = navigator.userAgent; + var platform = navigator.platform; + + var gecko = /gecko\/\d/i.test(userAgent); + var ie_upto10 = /MSIE \d/.test(userAgent); + var ie_11up = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(userAgent); + var ie = ie_upto10 || ie_11up; + var ie_version = ie && (ie_upto10 ? document.documentMode || 6 : ie_11up[1]); + var webkit = /WebKit\//.test(userAgent); + var qtwebkit = webkit && /Qt\/\d+\.\d+/.test(userAgent); + var chrome = /Chrome\//.test(userAgent); + var presto = /Opera\//.test(userAgent); + var safari = /Apple Computer/.test(navigator.vendor); + var mac_geMountainLion = /Mac OS X 1\d\D([8-9]|\d\d)\D/.test(userAgent); + var phantom = /PhantomJS/.test(userAgent); + + var ios = /AppleWebKit/.test(userAgent) && /Mobile\/\w+/.test(userAgent); + // This is woefully incomplete. Suggestions for alternative methods welcome. + var mobile = ios || /Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(userAgent); + var mac = ios || /Mac/.test(platform); + var chromeOS = /\bCrOS\b/.test(userAgent); + var windows = /win/i.test(platform); + + var presto_version = presto && userAgent.match(/Version\/(\d*\.\d*)/); + if (presto_version) presto_version = Number(presto_version[1]); + if (presto_version && presto_version >= 15) { presto = false; webkit = true; } + // Some browsers use the wrong event properties to signal cmd/ctrl on OS X + var flipCtrlCmd = mac && (qtwebkit || presto && (presto_version == null || presto_version < 12.11)); + var captureRightClick = gecko || (ie && ie_version >= 9); + + // Optimize some code when these features are not used. + var sawReadOnlySpans = false, sawCollapsedSpans = false; + + // EDITOR CONSTRUCTOR + + // A CodeMirror instance represents an editor. This is the object + // that user code is usually dealing with. + + function CodeMirror(place, options) { + if (!(this instanceof CodeMirror)) return new CodeMirror(place, options); + + this.options = options = options ? copyObj(options) : {}; + // Determine effective options based on given values and defaults. + copyObj(defaults, options, false); + setGuttersForLineNumbers(options); + + var doc = options.value; + if (typeof doc == "string") doc = new Doc(doc, options.mode, null, options.lineSeparator); + this.doc = doc; + + var input = new CodeMirror.inputStyles[options.inputStyle](this); + var display = this.display = new Display(place, doc, input); + display.wrapper.CodeMirror = this; + updateGutters(this); + themeChanged(this); + if (options.lineWrapping) + this.display.wrapper.className += " CodeMirror-wrap"; + if (options.autofocus && !mobile) display.input.focus(); + initScrollbars(this); + + this.state = { + keyMaps: [], // stores maps added by addKeyMap + overlays: [], // highlighting overlays, as added by addOverlay + modeGen: 0, // bumped when mode/overlay changes, used to invalidate highlighting info + overwrite: false, + delayingBlurEvent: false, + focused: false, + suppressEdits: false, // used to disable editing during key handlers when in readOnly mode + pasteIncoming: false, cutIncoming: false, // help recognize paste/cut edits in input.poll + selectingText: false, + draggingText: false, + highlight: new Delayed(), // stores highlight worker timeout + keySeq: null, // Unfinished key sequence + specialChars: null + }; + + var cm = this; + + // Override magic textarea content restore that IE sometimes does + // on our hidden textarea on reload + if (ie && ie_version < 11) setTimeout(function() { cm.display.input.reset(true); }, 20); + + registerEventHandlers(this); + ensureGlobalHandlers(); + + startOperation(this); + this.curOp.forceUpdate = true; + attachDoc(this, doc); + + if ((options.autofocus && !mobile) || cm.hasFocus()) + setTimeout(bind(onFocus, this), 20); + else + onBlur(this); + + for (var opt in optionHandlers) if (optionHandlers.hasOwnProperty(opt)) + optionHandlers[opt](this, options[opt], Init); + maybeUpdateLineNumberWidth(this); + if (options.finishInit) options.finishInit(this); + for (var i = 0; i < initHooks.length; ++i) initHooks[i](this); + endOperation(this); + // Suppress optimizelegibility in Webkit, since it breaks text + // measuring on line wrapping boundaries. + if (webkit && options.lineWrapping && + getComputedStyle(display.lineDiv).textRendering == "optimizelegibility") + display.lineDiv.style.textRendering = "auto"; + } + + // DISPLAY CONSTRUCTOR + + // The display handles the DOM integration, both for input reading + // and content drawing. It holds references to DOM nodes and + // display-related state. + + function Display(place, doc, input) { + var d = this; + this.input = input; + + // Covers bottom-right square when both scrollbars are present. + d.scrollbarFiller = elt("div", null, "CodeMirror-scrollbar-filler"); + d.scrollbarFiller.setAttribute("cm-not-content", "true"); + // Covers bottom of gutter when coverGutterNextToScrollbar is on + // and h scrollbar is present. + d.gutterFiller = elt("div", null, "CodeMirror-gutter-filler"); + d.gutterFiller.setAttribute("cm-not-content", "true"); + // Will contain the actual code, positioned to cover the viewport. + d.lineDiv = elt("div", null, "CodeMirror-code"); + // Elements are added to these to represent selection and cursors. + d.selectionDiv = elt("div", null, null, "position: relative; z-index: 1"); + d.cursorDiv = elt("div", null, "CodeMirror-cursors"); + // A visibility: hidden element used to find the size of things. + d.measure = elt("div", null, "CodeMirror-measure"); + // When lines outside of the viewport are measured, they are drawn in this. + d.lineMeasure = elt("div", null, "CodeMirror-measure"); + // Wraps everything that needs to exist inside the vertically-padded coordinate system + d.lineSpace = elt("div", [d.measure, d.lineMeasure, d.selectionDiv, d.cursorDiv, d.lineDiv], + null, "position: relative; outline: none"); + // Moved around its parent to cover visible view. + d.mover = elt("div", [elt("div", [d.lineSpace], "CodeMirror-lines")], null, "position: relative"); + // Set to the height of the document, allowing scrolling. + d.sizer = elt("div", [d.mover], "CodeMirror-sizer"); + d.sizerWidth = null; + // Behavior of elts with overflow: auto and padding is + // inconsistent across browsers. This is used to ensure the + // scrollable area is big enough. + d.heightForcer = elt("div", null, null, "position: absolute; height: " + scrollerGap + "px; width: 1px;"); + // Will contain the gutters, if any. + d.gutters = elt("div", null, "CodeMirror-gutters"); + d.lineGutter = null; + // Actual scrollable element. + d.scroller = elt("div", [d.sizer, d.heightForcer, d.gutters], "CodeMirror-scroll"); + d.scroller.setAttribute("tabIndex", "-1"); + // The element in which the editor lives. + d.wrapper = elt("div", [d.scrollbarFiller, d.gutterFiller, d.scroller], "CodeMirror"); + + // Work around IE7 z-index bug (not perfect, hence IE7 not really being supported) + if (ie && ie_version < 8) { d.gutters.style.zIndex = -1; d.scroller.style.paddingRight = 0; } + if (!webkit && !(gecko && mobile)) d.scroller.draggable = true; + + if (place) { + if (place.appendChild) place.appendChild(d.wrapper); + else place(d.wrapper); + } + + // Current rendered range (may be bigger than the view window). + d.viewFrom = d.viewTo = doc.first; + d.reportedViewFrom = d.reportedViewTo = doc.first; + // Information about the rendered lines. + d.view = []; + d.renderedView = null; + // Holds info about a single rendered line when it was rendered + // for measurement, while not in view. + d.externalMeasured = null; + // Empty space (in pixels) above the view + d.viewOffset = 0; + d.lastWrapHeight = d.lastWrapWidth = 0; + d.updateLineNumbers = null; + + d.nativeBarWidth = d.barHeight = d.barWidth = 0; + d.scrollbarsClipped = false; + + // Used to only resize the line number gutter when necessary (when + // the amount of lines crosses a boundary that makes its width change) + d.lineNumWidth = d.lineNumInnerWidth = d.lineNumChars = null; + // Set to true when a non-horizontal-scrolling line widget is + // added. As an optimization, line widget aligning is skipped when + // this is false. + d.alignWidgets = false; + + d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null; + + // Tracks the maximum line length so that the horizontal scrollbar + // can be kept static when scrolling. + d.maxLine = null; + d.maxLineLength = 0; + d.maxLineChanged = false; + + // Used for measuring wheel scrolling granularity + d.wheelDX = d.wheelDY = d.wheelStartX = d.wheelStartY = null; + + // True when shift is held down. + d.shift = false; + + // Used to track whether anything happened since the context menu + // was opened. + d.selForContextMenu = null; + + d.activeTouch = null; + + input.init(d); + } + + // STATE UPDATES + + // Used to get the editor into a consistent state again when options change. + + function loadMode(cm) { + cm.doc.mode = CodeMirror.getMode(cm.options, cm.doc.modeOption); + resetModeState(cm); + } + + function resetModeState(cm) { + cm.doc.iter(function(line) { + if (line.stateAfter) line.stateAfter = null; + if (line.styles) line.styles = null; + }); + cm.doc.frontier = cm.doc.first; + startWorker(cm, 100); + cm.state.modeGen++; + if (cm.curOp) regChange(cm); + } + + function wrappingChanged(cm) { + if (cm.options.lineWrapping) { + addClass(cm.display.wrapper, "CodeMirror-wrap"); + cm.display.sizer.style.minWidth = ""; + cm.display.sizerWidth = null; + } else { + rmClass(cm.display.wrapper, "CodeMirror-wrap"); + findMaxLine(cm); + } + estimateLineHeights(cm); + regChange(cm); + clearCaches(cm); + setTimeout(function(){updateScrollbars(cm);}, 100); + } + + // Returns a function that estimates the height of a line, to use as + // first approximation until the line becomes visible (and is thus + // properly measurable). + function estimateHeight(cm) { + var th = textHeight(cm.display), wrapping = cm.options.lineWrapping; + var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3); + return function(line) { + if (lineIsHidden(cm.doc, line)) return 0; + + var widgetsHeight = 0; + if (line.widgets) for (var i = 0; i < line.widgets.length; i++) { + if (line.widgets[i].height) widgetsHeight += line.widgets[i].height; + } + + if (wrapping) + return widgetsHeight + (Math.ceil(line.text.length / perLine) || 1) * th; + else + return widgetsHeight + th; + }; + } + + function estimateLineHeights(cm) { + var doc = cm.doc, est = estimateHeight(cm); + doc.iter(function(line) { + var estHeight = est(line); + if (estHeight != line.height) updateLineHeight(line, estHeight); + }); + } + + function themeChanged(cm) { + cm.display.wrapper.className = cm.display.wrapper.className.replace(/\s*cm-s-\S+/g, "") + + cm.options.theme.replace(/(^|\s)\s*/g, " cm-s-"); + clearCaches(cm); + } + + function guttersChanged(cm) { + updateGutters(cm); + regChange(cm); + setTimeout(function(){alignHorizontally(cm);}, 20); + } + + // Rebuild the gutter elements, ensure the margin to the left of the + // code matches their width. + function updateGutters(cm) { + var gutters = cm.display.gutters, specs = cm.options.gutters; + removeChildren(gutters); + for (var i = 0; i < specs.length; ++i) { + var gutterClass = specs[i]; + var gElt = gutters.appendChild(elt("div", null, "CodeMirror-gutter " + gutterClass)); + if (gutterClass == "CodeMirror-linenumbers") { + cm.display.lineGutter = gElt; + gElt.style.width = (cm.display.lineNumWidth || 1) + "px"; + } + } + gutters.style.display = i ? "" : "none"; + updateGutterSpace(cm); + } + + function updateGutterSpace(cm) { + var width = cm.display.gutters.offsetWidth; + cm.display.sizer.style.marginLeft = width + "px"; + } + + // Compute the character length of a line, taking into account + // collapsed ranges (see markText) that might hide parts, and join + // other lines onto it. + function lineLength(line) { + if (line.height == 0) return 0; + var len = line.text.length, merged, cur = line; + while (merged = collapsedSpanAtStart(cur)) { + var found = merged.find(0, true); + cur = found.from.line; + len += found.from.ch - found.to.ch; + } + cur = line; + while (merged = collapsedSpanAtEnd(cur)) { + var found = merged.find(0, true); + len -= cur.text.length - found.from.ch; + cur = found.to.line; + len += cur.text.length - found.to.ch; + } + return len; + } + + // Find the longest line in the document. + function findMaxLine(cm) { + var d = cm.display, doc = cm.doc; + d.maxLine = getLine(doc, doc.first); + d.maxLineLength = lineLength(d.maxLine); + d.maxLineChanged = true; + doc.iter(function(line) { + var len = lineLength(line); + if (len > d.maxLineLength) { + d.maxLineLength = len; + d.maxLine = line; + } + }); + } + + // Make sure the gutters options contains the element + // "CodeMirror-linenumbers" when the lineNumbers option is true. + function setGuttersForLineNumbers(options) { + var found = indexOf(options.gutters, "CodeMirror-linenumbers"); + if (found == -1 && options.lineNumbers) { + options.gutters = options.gutters.concat(["CodeMirror-linenumbers"]); + } else if (found > -1 && !options.lineNumbers) { + options.gutters = options.gutters.slice(0); + options.gutters.splice(found, 1); + } + } + + // SCROLLBARS + + // Prepare DOM reads needed to update the scrollbars. Done in one + // shot to minimize update/measure roundtrips. + function measureForScrollbars(cm) { + var d = cm.display, gutterW = d.gutters.offsetWidth; + var docH = Math.round(cm.doc.height + paddingVert(cm.display)); + return { + clientHeight: d.scroller.clientHeight, + viewHeight: d.wrapper.clientHeight, + scrollWidth: d.scroller.scrollWidth, clientWidth: d.scroller.clientWidth, + viewWidth: d.wrapper.clientWidth, + barLeft: cm.options.fixedGutter ? gutterW : 0, + docHeight: docH, + scrollHeight: docH + scrollGap(cm) + d.barHeight, + nativeBarWidth: d.nativeBarWidth, + gutterWidth: gutterW + }; + } + + function NativeScrollbars(place, scroll, cm) { + this.cm = cm; + var vert = this.vert = elt("div", [elt("div", null, null, "min-width: 1px")], "CodeMirror-vscrollbar"); + var horiz = this.horiz = elt("div", [elt("div", null, null, "height: 100%; min-height: 1px")], "CodeMirror-hscrollbar"); + place(vert); place(horiz); + + on(vert, "scroll", function() { + if (vert.clientHeight) scroll(vert.scrollTop, "vertical"); + }); + on(horiz, "scroll", function() { + if (horiz.clientWidth) scroll(horiz.scrollLeft, "horizontal"); + }); + + this.checkedZeroWidth = false; + // Need to set a minimum width to see the scrollbar on IE7 (but must not set it on IE8). + if (ie && ie_version < 8) this.horiz.style.minHeight = this.vert.style.minWidth = "18px"; + } + + NativeScrollbars.prototype = copyObj({ + update: function(measure) { + var needsH = measure.scrollWidth > measure.clientWidth + 1; + var needsV = measure.scrollHeight > measure.clientHeight + 1; + var sWidth = measure.nativeBarWidth; + + if (needsV) { + this.vert.style.display = "block"; + this.vert.style.bottom = needsH ? sWidth + "px" : "0"; + var totalHeight = measure.viewHeight - (needsH ? sWidth : 0); + // A bug in IE8 can cause this value to be negative, so guard it. + this.vert.firstChild.style.height = + Math.max(0, measure.scrollHeight - measure.clientHeight + totalHeight) + "px"; + } else { + this.vert.style.display = ""; + this.vert.firstChild.style.height = "0"; + } + + if (needsH) { + this.horiz.style.display = "block"; + this.horiz.style.right = needsV ? sWidth + "px" : "0"; + this.horiz.style.left = measure.barLeft + "px"; + var totalWidth = measure.viewWidth - measure.barLeft - (needsV ? sWidth : 0); + this.horiz.firstChild.style.width = + (measure.scrollWidth - measure.clientWidth + totalWidth) + "px"; + } else { + this.horiz.style.display = ""; + this.horiz.firstChild.style.width = "0"; + } + + if (!this.checkedZeroWidth && measure.clientHeight > 0) { + if (sWidth == 0) this.zeroWidthHack(); + this.checkedZeroWidth = true; + } + + return {right: needsV ? sWidth : 0, bottom: needsH ? sWidth : 0}; + }, + setScrollLeft: function(pos) { + if (this.horiz.scrollLeft != pos) this.horiz.scrollLeft = pos; + if (this.disableHoriz) this.enableZeroWidthBar(this.horiz, this.disableHoriz); + }, + setScrollTop: function(pos) { + if (this.vert.scrollTop != pos) this.vert.scrollTop = pos; + if (this.disableVert) this.enableZeroWidthBar(this.vert, this.disableVert); + }, + zeroWidthHack: function() { + var w = mac && !mac_geMountainLion ? "12px" : "18px"; + this.horiz.style.height = this.vert.style.width = w; + this.horiz.style.pointerEvents = this.vert.style.pointerEvents = "none"; + this.disableHoriz = new Delayed; + this.disableVert = new Delayed; + }, + enableZeroWidthBar: function(bar, delay) { + bar.style.pointerEvents = "auto"; + function maybeDisable() { + // To find out whether the scrollbar is still visible, we + // check whether the element under the pixel in the bottom + // left corner of the scrollbar box is the scrollbar box + // itself (when the bar is still visible) or its filler child + // (when the bar is hidden). If it is still visible, we keep + // it enabled, if it's hidden, we disable pointer events. + var box = bar.getBoundingClientRect(); + var elt = document.elementFromPoint(box.left + 1, box.bottom - 1); + if (elt != bar) bar.style.pointerEvents = "none"; + else delay.set(1000, maybeDisable); + } + delay.set(1000, maybeDisable); + }, + clear: function() { + var parent = this.horiz.parentNode; + parent.removeChild(this.horiz); + parent.removeChild(this.vert); + } + }, NativeScrollbars.prototype); + + function NullScrollbars() {} + + NullScrollbars.prototype = copyObj({ + update: function() { return {bottom: 0, right: 0}; }, + setScrollLeft: function() {}, + setScrollTop: function() {}, + clear: function() {} + }, NullScrollbars.prototype); + + CodeMirror.scrollbarModel = {"native": NativeScrollbars, "null": NullScrollbars}; + + function initScrollbars(cm) { + if (cm.display.scrollbars) { + cm.display.scrollbars.clear(); + if (cm.display.scrollbars.addClass) + rmClass(cm.display.wrapper, cm.display.scrollbars.addClass); + } + + cm.display.scrollbars = new CodeMirror.scrollbarModel[cm.options.scrollbarStyle](function(node) { + cm.display.wrapper.insertBefore(node, cm.display.scrollbarFiller); + // Prevent clicks in the scrollbars from killing focus + on(node, "mousedown", function() { + if (cm.state.focused) setTimeout(function() { cm.display.input.focus(); }, 0); + }); + node.setAttribute("cm-not-content", "true"); + }, function(pos, axis) { + if (axis == "horizontal") setScrollLeft(cm, pos); + else setScrollTop(cm, pos); + }, cm); + if (cm.display.scrollbars.addClass) + addClass(cm.display.wrapper, cm.display.scrollbars.addClass); + } + + function updateScrollbars(cm, measure) { + if (!measure) measure = measureForScrollbars(cm); + var startWidth = cm.display.barWidth, startHeight = cm.display.barHeight; + updateScrollbarsInner(cm, measure); + for (var i = 0; i < 4 && startWidth != cm.display.barWidth || startHeight != cm.display.barHeight; i++) { + if (startWidth != cm.display.barWidth && cm.options.lineWrapping) + updateHeightsInViewport(cm); + updateScrollbarsInner(cm, measureForScrollbars(cm)); + startWidth = cm.display.barWidth; startHeight = cm.display.barHeight; + } + } + + // Re-synchronize the fake scrollbars with the actual size of the + // content. + function updateScrollbarsInner(cm, measure) { + var d = cm.display; + var sizes = d.scrollbars.update(measure); + + d.sizer.style.paddingRight = (d.barWidth = sizes.right) + "px"; + d.sizer.style.paddingBottom = (d.barHeight = sizes.bottom) + "px"; + d.heightForcer.style.borderBottom = sizes.bottom + "px solid transparent" + + if (sizes.right && sizes.bottom) { + d.scrollbarFiller.style.display = "block"; + d.scrollbarFiller.style.height = sizes.bottom + "px"; + d.scrollbarFiller.style.width = sizes.right + "px"; + } else d.scrollbarFiller.style.display = ""; + if (sizes.bottom && cm.options.coverGutterNextToScrollbar && cm.options.fixedGutter) { + d.gutterFiller.style.display = "block"; + d.gutterFiller.style.height = sizes.bottom + "px"; + d.gutterFiller.style.width = measure.gutterWidth + "px"; + } else d.gutterFiller.style.display = ""; + } + + // Compute the lines that are visible in a given viewport (defaults + // the the current scroll position). viewport may contain top, + // height, and ensure (see op.scrollToPos) properties. + function visibleLines(display, doc, viewport) { + var top = viewport && viewport.top != null ? Math.max(0, viewport.top) : display.scroller.scrollTop; + top = Math.floor(top - paddingTop(display)); + var bottom = viewport && viewport.bottom != null ? viewport.bottom : top + display.wrapper.clientHeight; + + var from = lineAtHeight(doc, top), to = lineAtHeight(doc, bottom); + // Ensure is a {from: {line, ch}, to: {line, ch}} object, and + // forces those lines into the viewport (if possible). + if (viewport && viewport.ensure) { + var ensureFrom = viewport.ensure.from.line, ensureTo = viewport.ensure.to.line; + if (ensureFrom < from) { + from = ensureFrom; + to = lineAtHeight(doc, heightAtLine(getLine(doc, ensureFrom)) + display.wrapper.clientHeight); + } else if (Math.min(ensureTo, doc.lastLine()) >= to) { + from = lineAtHeight(doc, heightAtLine(getLine(doc, ensureTo)) - display.wrapper.clientHeight); + to = ensureTo; + } + } + return {from: from, to: Math.max(to, from + 1)}; + } + + // LINE NUMBERS + + // Re-align line numbers and gutter marks to compensate for + // horizontal scrolling. + function alignHorizontally(cm) { + var display = cm.display, view = display.view; + if (!display.alignWidgets && (!display.gutters.firstChild || !cm.options.fixedGutter)) return; + var comp = compensateForHScroll(display) - display.scroller.scrollLeft + cm.doc.scrollLeft; + var gutterW = display.gutters.offsetWidth, left = comp + "px"; + for (var i = 0; i < view.length; i++) if (!view[i].hidden) { + if (cm.options.fixedGutter && view[i].gutter) + view[i].gutter.style.left = left; + var align = view[i].alignable; + if (align) for (var j = 0; j < align.length; j++) + align[j].style.left = left; + } + if (cm.options.fixedGutter) + display.gutters.style.left = (comp + gutterW) + "px"; + } + + // Used to ensure that the line number gutter is still the right + // size for the current document size. Returns true when an update + // is needed. + function maybeUpdateLineNumberWidth(cm) { + if (!cm.options.lineNumbers) return false; + var doc = cm.doc, last = lineNumberFor(cm.options, doc.first + doc.size - 1), display = cm.display; + if (last.length != display.lineNumChars) { + var test = display.measure.appendChild(elt("div", [elt("div", last)], + "CodeMirror-linenumber CodeMirror-gutter-elt")); + var innerW = test.firstChild.offsetWidth, padding = test.offsetWidth - innerW; + display.lineGutter.style.width = ""; + display.lineNumInnerWidth = Math.max(innerW, display.lineGutter.offsetWidth - padding) + 1; + display.lineNumWidth = display.lineNumInnerWidth + padding; + display.lineNumChars = display.lineNumInnerWidth ? last.length : -1; + display.lineGutter.style.width = display.lineNumWidth + "px"; + updateGutterSpace(cm); + return true; + } + return false; + } + + function lineNumberFor(options, i) { + return String(options.lineNumberFormatter(i + options.firstLineNumber)); + } + + // Computes display.scroller.scrollLeft + display.gutters.offsetWidth, + // but using getBoundingClientRect to get a sub-pixel-accurate + // result. + function compensateForHScroll(display) { + return display.scroller.getBoundingClientRect().left - display.sizer.getBoundingClientRect().left; + } + + // DISPLAY DRAWING + + function DisplayUpdate(cm, viewport, force) { + var display = cm.display; + + this.viewport = viewport; + // Store some values that we'll need later (but don't want to force a relayout for) + this.visible = visibleLines(display, cm.doc, viewport); + this.editorIsHidden = !display.wrapper.offsetWidth; + this.wrapperHeight = display.wrapper.clientHeight; + this.wrapperWidth = display.wrapper.clientWidth; + this.oldDisplayWidth = displayWidth(cm); + this.force = force; + this.dims = getDimensions(cm); + this.events = []; + } + + DisplayUpdate.prototype.signal = function(emitter, type) { + if (hasHandler(emitter, type)) + this.events.push(arguments); + }; + DisplayUpdate.prototype.finish = function() { + for (var i = 0; i < this.events.length; i++) + signal.apply(null, this.events[i]); + }; + + function maybeClipScrollbars(cm) { + var display = cm.display; + if (!display.scrollbarsClipped && display.scroller.offsetWidth) { + display.nativeBarWidth = display.scroller.offsetWidth - display.scroller.clientWidth; + display.heightForcer.style.height = scrollGap(cm) + "px"; + display.sizer.style.marginBottom = -display.nativeBarWidth + "px"; + display.sizer.style.borderRightWidth = scrollGap(cm) + "px"; + display.scrollbarsClipped = true; + } + } + + // Does the actual updating of the line display. Bails out + // (returning false) when there is nothing to be done and forced is + // false. + function updateDisplayIfNeeded(cm, update) { + var display = cm.display, doc = cm.doc; + + if (update.editorIsHidden) { + resetView(cm); + return false; + } + + // Bail out if the visible area is already rendered and nothing changed. + if (!update.force && + update.visible.from >= display.viewFrom && update.visible.to <= display.viewTo && + (display.updateLineNumbers == null || display.updateLineNumbers >= display.viewTo) && + display.renderedView == display.view && countDirtyView(cm) == 0) + return false; + + if (maybeUpdateLineNumberWidth(cm)) { + resetView(cm); + update.dims = getDimensions(cm); + } + + // Compute a suitable new viewport (from & to) + var end = doc.first + doc.size; + var from = Math.max(update.visible.from - cm.options.viewportMargin, doc.first); + var to = Math.min(end, update.visible.to + cm.options.viewportMargin); + if (display.viewFrom < from && from - display.viewFrom < 20) from = Math.max(doc.first, display.viewFrom); + if (display.viewTo > to && display.viewTo - to < 20) to = Math.min(end, display.viewTo); + if (sawCollapsedSpans) { + from = visualLineNo(cm.doc, from); + to = visualLineEndNo(cm.doc, to); + } + + var different = from != display.viewFrom || to != display.viewTo || + display.lastWrapHeight != update.wrapperHeight || display.lastWrapWidth != update.wrapperWidth; + adjustView(cm, from, to); + + display.viewOffset = heightAtLine(getLine(cm.doc, display.viewFrom)); + // Position the mover div to align with the current scroll position + cm.display.mover.style.top = display.viewOffset + "px"; + + var toUpdate = countDirtyView(cm); + if (!different && toUpdate == 0 && !update.force && display.renderedView == display.view && + (display.updateLineNumbers == null || display.updateLineNumbers >= display.viewTo)) + return false; + + // For big changes, we hide the enclosing element during the + // update, since that speeds up the operations on most browsers. + var focused = activeElt(); + if (toUpdate > 4) display.lineDiv.style.display = "none"; + patchDisplay(cm, display.updateLineNumbers, update.dims); + if (toUpdate > 4) display.lineDiv.style.display = ""; + display.renderedView = display.view; + // There might have been a widget with a focused element that got + // hidden or updated, if so re-focus it. + if (focused && activeElt() != focused && focused.offsetHeight) focused.focus(); + + // Prevent selection and cursors from interfering with the scroll + // width and height. + removeChildren(display.cursorDiv); + removeChildren(display.selectionDiv); + display.gutters.style.height = display.sizer.style.minHeight = 0; + + if (different) { + display.lastWrapHeight = update.wrapperHeight; + display.lastWrapWidth = update.wrapperWidth; + startWorker(cm, 400); + } + + display.updateLineNumbers = null; + + return true; + } + + function postUpdateDisplay(cm, update) { + var viewport = update.viewport; + + for (var first = true;; first = false) { + if (!first || !cm.options.lineWrapping || update.oldDisplayWidth == displayWidth(cm)) { + // Clip forced viewport to actual scrollable area. + if (viewport && viewport.top != null) + viewport = {top: Math.min(cm.doc.height + paddingVert(cm.display) - displayHeight(cm), viewport.top)}; + // Updated line heights might result in the drawn area not + // actually covering the viewport. Keep looping until it does. + update.visible = visibleLines(cm.display, cm.doc, viewport); + if (update.visible.from >= cm.display.viewFrom && update.visible.to <= cm.display.viewTo) + break; + } + if (!updateDisplayIfNeeded(cm, update)) break; + updateHeightsInViewport(cm); + var barMeasure = measureForScrollbars(cm); + updateSelection(cm); + updateScrollbars(cm, barMeasure); + setDocumentHeight(cm, barMeasure); + } + + update.signal(cm, "update", cm); + if (cm.display.viewFrom != cm.display.reportedViewFrom || cm.display.viewTo != cm.display.reportedViewTo) { + update.signal(cm, "viewportChange", cm, cm.display.viewFrom, cm.display.viewTo); + cm.display.reportedViewFrom = cm.display.viewFrom; cm.display.reportedViewTo = cm.display.viewTo; + } + } + + function updateDisplaySimple(cm, viewport) { + var update = new DisplayUpdate(cm, viewport); + if (updateDisplayIfNeeded(cm, update)) { + updateHeightsInViewport(cm); + postUpdateDisplay(cm, update); + var barMeasure = measureForScrollbars(cm); + updateSelection(cm); + updateScrollbars(cm, barMeasure); + setDocumentHeight(cm, barMeasure); + update.finish(); + } + } + + function setDocumentHeight(cm, measure) { + cm.display.sizer.style.minHeight = measure.docHeight + "px"; + cm.display.heightForcer.style.top = measure.docHeight + "px"; + cm.display.gutters.style.height = (measure.docHeight + cm.display.barHeight + scrollGap(cm)) + "px"; + } + + // Read the actual heights of the rendered lines, and update their + // stored heights to match. + function updateHeightsInViewport(cm) { + var display = cm.display; + var prevBottom = display.lineDiv.offsetTop; + for (var i = 0; i < display.view.length; i++) { + var cur = display.view[i], height; + if (cur.hidden) continue; + if (ie && ie_version < 8) { + var bot = cur.node.offsetTop + cur.node.offsetHeight; + height = bot - prevBottom; + prevBottom = bot; + } else { + var box = cur.node.getBoundingClientRect(); + height = box.bottom - box.top; + } + var diff = cur.line.height - height; + if (height < 2) height = textHeight(display); + if (diff > .001 || diff < -.001) { + updateLineHeight(cur.line, height); + updateWidgetHeight(cur.line); + if (cur.rest) for (var j = 0; j < cur.rest.length; j++) + updateWidgetHeight(cur.rest[j]); + } + } + } + + // Read and store the height of line widgets associated with the + // given line. + function updateWidgetHeight(line) { + if (line.widgets) for (var i = 0; i < line.widgets.length; ++i) + line.widgets[i].height = line.widgets[i].node.parentNode.offsetHeight; + } + + // Do a bulk-read of the DOM positions and sizes needed to draw the + // view, so that we don't interleave reading and writing to the DOM. + function getDimensions(cm) { + var d = cm.display, left = {}, width = {}; + var gutterLeft = d.gutters.clientLeft; + for (var n = d.gutters.firstChild, i = 0; n; n = n.nextSibling, ++i) { + left[cm.options.gutters[i]] = n.offsetLeft + n.clientLeft + gutterLeft; + width[cm.options.gutters[i]] = n.clientWidth; + } + return {fixedPos: compensateForHScroll(d), + gutterTotalWidth: d.gutters.offsetWidth, + gutterLeft: left, + gutterWidth: width, + wrapperWidth: d.wrapper.clientWidth}; + } + + // Sync the actual display DOM structure with display.view, removing + // nodes for lines that are no longer in view, and creating the ones + // that are not there yet, and updating the ones that are out of + // date. + function patchDisplay(cm, updateNumbersFrom, dims) { + var display = cm.display, lineNumbers = cm.options.lineNumbers; + var container = display.lineDiv, cur = container.firstChild; + + function rm(node) { + var next = node.nextSibling; + // Works around a throw-scroll bug in OS X Webkit + if (webkit && mac && cm.display.currentWheelTarget == node) + node.style.display = "none"; + else + node.parentNode.removeChild(node); + return next; + } + + var view = display.view, lineN = display.viewFrom; + // Loop over the elements in the view, syncing cur (the DOM nodes + // in display.lineDiv) with the view as we go. + for (var i = 0; i < view.length; i++) { + var lineView = view[i]; + if (lineView.hidden) { + } else if (!lineView.node || lineView.node.parentNode != container) { // Not drawn yet + var node = buildLineElement(cm, lineView, lineN, dims); + container.insertBefore(node, cur); + } else { // Already drawn + while (cur != lineView.node) cur = rm(cur); + var updateNumber = lineNumbers && updateNumbersFrom != null && + updateNumbersFrom <= lineN && lineView.lineNumber; + if (lineView.changes) { + if (indexOf(lineView.changes, "gutter") > -1) updateNumber = false; + updateLineForChanges(cm, lineView, lineN, dims); + } + if (updateNumber) { + removeChildren(lineView.lineNumber); + lineView.lineNumber.appendChild(document.createTextNode(lineNumberFor(cm.options, lineN))); + } + cur = lineView.node.nextSibling; + } + lineN += lineView.size; + } + while (cur) cur = rm(cur); + } + + // When an aspect of a line changes, a string is added to + // lineView.changes. This updates the relevant part of the line's + // DOM structure. + function updateLineForChanges(cm, lineView, lineN, dims) { + for (var j = 0; j < lineView.changes.length; j++) { + var type = lineView.changes[j]; + if (type == "text") updateLineText(cm, lineView); + else if (type == "gutter") updateLineGutter(cm, lineView, lineN, dims); + else if (type == "class") updateLineClasses(lineView); + else if (type == "widget") updateLineWidgets(cm, lineView, dims); + } + lineView.changes = null; + } + + // Lines with gutter elements, widgets or a background class need to + // be wrapped, and have the extra elements added to the wrapper div + function ensureLineWrapped(lineView) { + if (lineView.node == lineView.text) { + lineView.node = elt("div", null, null, "position: relative"); + if (lineView.text.parentNode) + lineView.text.parentNode.replaceChild(lineView.node, lineView.text); + lineView.node.appendChild(lineView.text); + if (ie && ie_version < 8) lineView.node.style.zIndex = 2; + } + return lineView.node; + } + + function updateLineBackground(lineView) { + var cls = lineView.bgClass ? lineView.bgClass + " " + (lineView.line.bgClass || "") : lineView.line.bgClass; + if (cls) cls += " CodeMirror-linebackground"; + if (lineView.background) { + if (cls) lineView.background.className = cls; + else { lineView.background.parentNode.removeChild(lineView.background); lineView.background = null; } + } else if (cls) { + var wrap = ensureLineWrapped(lineView); + lineView.background = wrap.insertBefore(elt("div", null, cls), wrap.firstChild); + } + } + + // Wrapper around buildLineContent which will reuse the structure + // in display.externalMeasured when possible. + function getLineContent(cm, lineView) { + var ext = cm.display.externalMeasured; + if (ext && ext.line == lineView.line) { + cm.display.externalMeasured = null; + lineView.measure = ext.measure; + return ext.built; + } + return buildLineContent(cm, lineView); + } + + // Redraw the line's text. Interacts with the background and text + // classes because the mode may output tokens that influence these + // classes. + function updateLineText(cm, lineView) { + var cls = lineView.text.className; + var built = getLineContent(cm, lineView); + if (lineView.text == lineView.node) lineView.node = built.pre; + lineView.text.parentNode.replaceChild(built.pre, lineView.text); + lineView.text = built.pre; + if (built.bgClass != lineView.bgClass || built.textClass != lineView.textClass) { + lineView.bgClass = built.bgClass; + lineView.textClass = built.textClass; + updateLineClasses(lineView); + } else if (cls) { + lineView.text.className = cls; + } + } + + function updateLineClasses(lineView) { + updateLineBackground(lineView); + if (lineView.line.wrapClass) + ensureLineWrapped(lineView).className = lineView.line.wrapClass; + else if (lineView.node != lineView.text) + lineView.node.className = ""; + var textClass = lineView.textClass ? lineView.textClass + " " + (lineView.line.textClass || "") : lineView.line.textClass; + lineView.text.className = textClass || ""; + } + + function updateLineGutter(cm, lineView, lineN, dims) { + if (lineView.gutter) { + lineView.node.removeChild(lineView.gutter); + lineView.gutter = null; + } + if (lineView.gutterBackground) { + lineView.node.removeChild(lineView.gutterBackground); + lineView.gutterBackground = null; + } + if (lineView.line.gutterClass) { + var wrap = ensureLineWrapped(lineView); + lineView.gutterBackground = elt("div", null, "CodeMirror-gutter-background " + lineView.line.gutterClass, + "left: " + (cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) + + "px; width: " + dims.gutterTotalWidth + "px"); + wrap.insertBefore(lineView.gutterBackground, lineView.text); + } + var markers = lineView.line.gutterMarkers; + if (cm.options.lineNumbers || markers) { + var wrap = ensureLineWrapped(lineView); + var gutterWrap = lineView.gutter = elt("div", null, "CodeMirror-gutter-wrapper", "left: " + + (cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) + "px"); + cm.display.input.setUneditable(gutterWrap); + wrap.insertBefore(gutterWrap, lineView.text); + if (lineView.line.gutterClass) + gutterWrap.className += " " + lineView.line.gutterClass; + if (cm.options.lineNumbers && (!markers || !markers["CodeMirror-linenumbers"])) + lineView.lineNumber = gutterWrap.appendChild( + elt("div", lineNumberFor(cm.options, lineN), + "CodeMirror-linenumber CodeMirror-gutter-elt", + "left: " + dims.gutterLeft["CodeMirror-linenumbers"] + "px; width: " + + cm.display.lineNumInnerWidth + "px")); + if (markers) for (var k = 0; k < cm.options.gutters.length; ++k) { + var id = cm.options.gutters[k], found = markers.hasOwnProperty(id) && markers[id]; + if (found) + gutterWrap.appendChild(elt("div", [found], "CodeMirror-gutter-elt", "left: " + + dims.gutterLeft[id] + "px; width: " + dims.gutterWidth[id] + "px")); + } + } + } + + function updateLineWidgets(cm, lineView, dims) { + if (lineView.alignable) lineView.alignable = null; + for (var node = lineView.node.firstChild, next; node; node = next) { + var next = node.nextSibling; + if (node.className == "CodeMirror-linewidget") + lineView.node.removeChild(node); + } + insertLineWidgets(cm, lineView, dims); + } + + // Build a line's DOM representation from scratch + function buildLineElement(cm, lineView, lineN, dims) { + var built = getLineContent(cm, lineView); + lineView.text = lineView.node = built.pre; + if (built.bgClass) lineView.bgClass = built.bgClass; + if (built.textClass) lineView.textClass = built.textClass; + + updateLineClasses(lineView); + updateLineGutter(cm, lineView, lineN, dims); + insertLineWidgets(cm, lineView, dims); + return lineView.node; + } + + // A lineView may contain multiple logical lines (when merged by + // collapsed spans). The widgets for all of them need to be drawn. + function insertLineWidgets(cm, lineView, dims) { + insertLineWidgetsFor(cm, lineView.line, lineView, dims, true); + if (lineView.rest) for (var i = 0; i < lineView.rest.length; i++) + insertLineWidgetsFor(cm, lineView.rest[i], lineView, dims, false); + } + + function insertLineWidgetsFor(cm, line, lineView, dims, allowAbove) { + if (!line.widgets) return; + var wrap = ensureLineWrapped(lineView); + for (var i = 0, ws = line.widgets; i < ws.length; ++i) { + var widget = ws[i], node = elt("div", [widget.node], "CodeMirror-linewidget"); + if (!widget.handleMouseEvents) node.setAttribute("cm-ignore-events", "true"); + positionLineWidget(widget, node, lineView, dims); + cm.display.input.setUneditable(node); + if (allowAbove && widget.above) + wrap.insertBefore(node, lineView.gutter || lineView.text); + else + wrap.appendChild(node); + signalLater(widget, "redraw"); + } + } + + function positionLineWidget(widget, node, lineView, dims) { + if (widget.noHScroll) { + (lineView.alignable || (lineView.alignable = [])).push(node); + var width = dims.wrapperWidth; + node.style.left = dims.fixedPos + "px"; + if (!widget.coverGutter) { + width -= dims.gutterTotalWidth; + node.style.paddingLeft = dims.gutterTotalWidth + "px"; + } + node.style.width = width + "px"; + } + if (widget.coverGutter) { + node.style.zIndex = 5; + node.style.position = "relative"; + if (!widget.noHScroll) node.style.marginLeft = -dims.gutterTotalWidth + "px"; + } + } + + // POSITION OBJECT + + // A Pos instance represents a position within the text. + var Pos = CodeMirror.Pos = function(line, ch) { + if (!(this instanceof Pos)) return new Pos(line, ch); + this.line = line; this.ch = ch; + }; + + // Compare two positions, return 0 if they are the same, a negative + // number when a is less, and a positive number otherwise. + var cmp = CodeMirror.cmpPos = function(a, b) { return a.line - b.line || a.ch - b.ch; }; + + function copyPos(x) {return Pos(x.line, x.ch);} + function maxPos(a, b) { return cmp(a, b) < 0 ? b : a; } + function minPos(a, b) { return cmp(a, b) < 0 ? a : b; } + + // INPUT HANDLING + + function ensureFocus(cm) { + if (!cm.state.focused) { cm.display.input.focus(); onFocus(cm); } + } + + // This will be set to an array of strings when copying, so that, + // when pasting, we know what kind of selections the copied text + // was made out of. + var lastCopied = null; + + function applyTextInput(cm, inserted, deleted, sel, origin) { + var doc = cm.doc; + cm.display.shift = false; + if (!sel) sel = doc.sel; + + var paste = cm.state.pasteIncoming || origin == "paste"; + var textLines = doc.splitLines(inserted), multiPaste = null; + // When pasing N lines into N selections, insert one line per selection + if (paste && sel.ranges.length > 1) { + if (lastCopied && lastCopied.join("\n") == inserted) { + if (sel.ranges.length % lastCopied.length == 0) { + multiPaste = []; + for (var i = 0; i < lastCopied.length; i++) + multiPaste.push(doc.splitLines(lastCopied[i])); + } + } else if (textLines.length == sel.ranges.length) { + multiPaste = map(textLines, function(l) { return [l]; }); + } + } + + // Normal behavior is to insert the new text into every selection + for (var i = sel.ranges.length - 1; i >= 0; i--) { + var range = sel.ranges[i]; + var from = range.from(), to = range.to(); + if (range.empty()) { + if (deleted && deleted > 0) // Handle deletion + from = Pos(from.line, from.ch - deleted); + else if (cm.state.overwrite && !paste) // Handle overwrite + to = Pos(to.line, Math.min(getLine(doc, to.line).text.length, to.ch + lst(textLines).length)); + } + var updateInput = cm.curOp.updateInput; + var changeEvent = {from: from, to: to, text: multiPaste ? multiPaste[i % multiPaste.length] : textLines, + origin: origin || (paste ? "paste" : cm.state.cutIncoming ? "cut" : "+input")}; + makeChange(cm.doc, changeEvent); + signalLater(cm, "inputRead", cm, changeEvent); + } + if (inserted && !paste) + triggerElectric(cm, inserted); + + ensureCursorVisible(cm); + cm.curOp.updateInput = updateInput; + cm.curOp.typing = true; + cm.state.pasteIncoming = cm.state.cutIncoming = false; + } + + function handlePaste(e, cm) { + var pasted = e.clipboardData && e.clipboardData.getData("text/plain"); + if (pasted) { + e.preventDefault(); + if (!cm.isReadOnly() && !cm.options.disableInput) + runInOp(cm, function() { applyTextInput(cm, pasted, 0, null, "paste"); }); + return true; + } + } + + function triggerElectric(cm, inserted) { + // When an 'electric' character is inserted, immediately trigger a reindent + if (!cm.options.electricChars || !cm.options.smartIndent) return; + var sel = cm.doc.sel; + + for (var i = sel.ranges.length - 1; i >= 0; i--) { + var range = sel.ranges[i]; + if (range.head.ch > 100 || (i && sel.ranges[i - 1].head.line == range.head.line)) continue; + var mode = cm.getModeAt(range.head); + var indented = false; + if (mode.electricChars) { + for (var j = 0; j < mode.electricChars.length; j++) + if (inserted.indexOf(mode.electricChars.charAt(j)) > -1) { + indented = indentLine(cm, range.head.line, "smart"); + break; + } + } else if (mode.electricInput) { + if (mode.electricInput.test(getLine(cm.doc, range.head.line).text.slice(0, range.head.ch))) + indented = indentLine(cm, range.head.line, "smart"); + } + if (indented) signalLater(cm, "electricInput", cm, range.head.line); + } + } + + function copyableRanges(cm) { + var text = [], ranges = []; + for (var i = 0; i < cm.doc.sel.ranges.length; i++) { + var line = cm.doc.sel.ranges[i].head.line; + var lineRange = {anchor: Pos(line, 0), head: Pos(line + 1, 0)}; + ranges.push(lineRange); + text.push(cm.getRange(lineRange.anchor, lineRange.head)); + } + return {text: text, ranges: ranges}; + } + + function disableBrowserMagic(field) { + field.setAttribute("autocorrect", "off"); + field.setAttribute("autocapitalize", "off"); + field.setAttribute("spellcheck", "false"); + } + + // TEXTAREA INPUT STYLE + + function TextareaInput(cm) { + this.cm = cm; + // See input.poll and input.reset + this.prevInput = ""; + + // Flag that indicates whether we expect input to appear real soon + // now (after some event like 'keypress' or 'input') and are + // polling intensively. + this.pollingFast = false; + // Self-resetting timeout for the poller + this.polling = new Delayed(); + // Tracks when input.reset has punted to just putting a short + // string into the textarea instead of the full selection. + this.inaccurateSelection = false; + // Used to work around IE issue with selection being forgotten when focus moves away from textarea + this.hasSelection = false; + this.composing = null; + }; + + function hiddenTextarea() { + var te = elt("textarea", null, null, "position: absolute; padding: 0; width: 1px; height: 1em; outline: none"); + var div = elt("div", [te], null, "overflow: hidden; position: relative; width: 3px; height: 0px;"); + // The textarea is kept positioned near the cursor to prevent the + // fact that it'll be scrolled into view on input from scrolling + // our fake cursor out of view. On webkit, when wrap=off, paste is + // very slow. So make the area wide instead. + if (webkit) te.style.width = "1000px"; + else te.setAttribute("wrap", "off"); + // If border: 0; -- iOS fails to open keyboard (issue #1287) + if (ios) te.style.border = "1px solid black"; + disableBrowserMagic(te); + return div; + } + + TextareaInput.prototype = copyObj({ + init: function(display) { + var input = this, cm = this.cm; + + // Wraps and hides input textarea + var div = this.wrapper = hiddenTextarea(); + // The semihidden textarea that is focused when the editor is + // focused, and receives input. + var te = this.textarea = div.firstChild; + display.wrapper.insertBefore(div, display.wrapper.firstChild); + + // Needed to hide big blue blinking cursor on Mobile Safari (doesn't seem to work in iOS 8 anymore) + if (ios) te.style.width = "0px"; + + on(te, "input", function() { + if (ie && ie_version >= 9 && input.hasSelection) input.hasSelection = null; + input.poll(); + }); + + on(te, "paste", function(e) { + if (signalDOMEvent(cm, e) || handlePaste(e, cm)) return + + cm.state.pasteIncoming = true; + input.fastPoll(); + }); + + function prepareCopyCut(e) { + if (signalDOMEvent(cm, e)) return + if (cm.somethingSelected()) { + lastCopied = cm.getSelections(); + if (input.inaccurateSelection) { + input.prevInput = ""; + input.inaccurateSelection = false; + te.value = lastCopied.join("\n"); + selectInput(te); + } + } else if (!cm.options.lineWiseCopyCut) { + return; + } else { + var ranges = copyableRanges(cm); + lastCopied = ranges.text; + if (e.type == "cut") { + cm.setSelections(ranges.ranges, null, sel_dontScroll); + } else { + input.prevInput = ""; + te.value = ranges.text.join("\n"); + selectInput(te); + } + } + if (e.type == "cut") cm.state.cutIncoming = true; + } + on(te, "cut", prepareCopyCut); + on(te, "copy", prepareCopyCut); + + on(display.scroller, "paste", function(e) { + if (eventInWidget(display, e) || signalDOMEvent(cm, e)) return; + cm.state.pasteIncoming = true; + input.focus(); + }); + + // Prevent normal selection in the editor (we handle our own) + on(display.lineSpace, "selectstart", function(e) { + if (!eventInWidget(display, e)) e_preventDefault(e); + }); + + on(te, "compositionstart", function() { + var start = cm.getCursor("from"); + if (input.composing) input.composing.range.clear() + input.composing = { + start: start, + range: cm.markText(start, cm.getCursor("to"), {className: "CodeMirror-composing"}) + }; + }); + on(te, "compositionend", function() { + if (input.composing) { + input.poll(); + input.composing.range.clear(); + input.composing = null; + } + }); + }, + + prepareSelection: function() { + // Redraw the selection and/or cursor + var cm = this.cm, display = cm.display, doc = cm.doc; + var result = prepareSelection(cm); + + // Move the hidden textarea near the cursor to prevent scrolling artifacts + if (cm.options.moveInputWithCursor) { + var headPos = cursorCoords(cm, doc.sel.primary().head, "div"); + var wrapOff = display.wrapper.getBoundingClientRect(), lineOff = display.lineDiv.getBoundingClientRect(); + result.teTop = Math.max(0, Math.min(display.wrapper.clientHeight - 10, + headPos.top + lineOff.top - wrapOff.top)); + result.teLeft = Math.max(0, Math.min(display.wrapper.clientWidth - 10, + headPos.left + lineOff.left - wrapOff.left)); + } + + return result; + }, + + showSelection: function(drawn) { + var cm = this.cm, display = cm.display; + removeChildrenAndAdd(display.cursorDiv, drawn.cursors); + removeChildrenAndAdd(display.selectionDiv, drawn.selection); + if (drawn.teTop != null) { + this.wrapper.style.top = drawn.teTop + "px"; + this.wrapper.style.left = drawn.teLeft + "px"; + } + }, + + // Reset the input to correspond to the selection (or to be empty, + // when not typing and nothing is selected) + reset: function(typing) { + if (this.contextMenuPending) return; + var minimal, selected, cm = this.cm, doc = cm.doc; + if (cm.somethingSelected()) { + this.prevInput = ""; + var range = doc.sel.primary(); + minimal = hasCopyEvent && + (range.to().line - range.from().line > 100 || (selected = cm.getSelection()).length > 1000); + var content = minimal ? "-" : selected || cm.getSelection(); + this.textarea.value = content; + if (cm.state.focused) selectInput(this.textarea); + if (ie && ie_version >= 9) this.hasSelection = content; + } else if (!typing) { + this.prevInput = this.textarea.value = ""; + if (ie && ie_version >= 9) this.hasSelection = null; + } + this.inaccurateSelection = minimal; + }, + + getField: function() { return this.textarea; }, + + supportsTouch: function() { return false; }, + + focus: function() { + if (this.cm.options.readOnly != "nocursor" && (!mobile || activeElt() != this.textarea)) { + try { this.textarea.focus(); } + catch (e) {} // IE8 will throw if the textarea is display: none or not in DOM + } + }, + + blur: function() { this.textarea.blur(); }, + + resetPosition: function() { + this.wrapper.style.top = this.wrapper.style.left = 0; + }, + + receivedFocus: function() { this.slowPoll(); }, + + // Poll for input changes, using the normal rate of polling. This + // runs as long as the editor is focused. + slowPoll: function() { + var input = this; + if (input.pollingFast) return; + input.polling.set(this.cm.options.pollInterval, function() { + input.poll(); + if (input.cm.state.focused) input.slowPoll(); + }); + }, + + // When an event has just come in that is likely to add or change + // something in the input textarea, we poll faster, to ensure that + // the change appears on the screen quickly. + fastPoll: function() { + var missed = false, input = this; + input.pollingFast = true; + function p() { + var changed = input.poll(); + if (!changed && !missed) {missed = true; input.polling.set(60, p);} + else {input.pollingFast = false; input.slowPoll();} + } + input.polling.set(20, p); + }, + + // Read input from the textarea, and update the document to match. + // When something is selected, it is present in the textarea, and + // selected (unless it is huge, in which case a placeholder is + // used). When nothing is selected, the cursor sits after previously + // seen text (can be empty), which is stored in prevInput (we must + // not reset the textarea when typing, because that breaks IME). + poll: function() { + var cm = this.cm, input = this.textarea, prevInput = this.prevInput; + // Since this is called a *lot*, try to bail out as cheaply as + // possible when it is clear that nothing happened. hasSelection + // will be the case when there is a lot of text in the textarea, + // in which case reading its value would be expensive. + if (this.contextMenuPending || !cm.state.focused || + (hasSelection(input) && !prevInput && !this.composing) || + cm.isReadOnly() || cm.options.disableInput || cm.state.keySeq) + return false; + + var text = input.value; + // If nothing changed, bail. + if (text == prevInput && !cm.somethingSelected()) return false; + // Work around nonsensical selection resetting in IE9/10, and + // inexplicable appearance of private area unicode characters on + // some key combos in Mac (#2689). + if (ie && ie_version >= 9 && this.hasSelection === text || + mac && /[\uf700-\uf7ff]/.test(text)) { + cm.display.input.reset(); + return false; + } + + if (cm.doc.sel == cm.display.selForContextMenu) { + var first = text.charCodeAt(0); + if (first == 0x200b && !prevInput) prevInput = "\u200b"; + if (first == 0x21da) { this.reset(); return this.cm.execCommand("undo"); } + } + // Find the part of the input that is actually new + var same = 0, l = Math.min(prevInput.length, text.length); + while (same < l && prevInput.charCodeAt(same) == text.charCodeAt(same)) ++same; + + var self = this; + runInOp(cm, function() { + applyTextInput(cm, text.slice(same), prevInput.length - same, + null, self.composing ? "*compose" : null); + + // Don't leave long text in the textarea, since it makes further polling slow + if (text.length > 1000 || text.indexOf("\n") > -1) input.value = self.prevInput = ""; + else self.prevInput = text; + + if (self.composing) { + self.composing.range.clear(); + self.composing.range = cm.markText(self.composing.start, cm.getCursor("to"), + {className: "CodeMirror-composing"}); + } + }); + return true; + }, + + ensurePolled: function() { + if (this.pollingFast && this.poll()) this.pollingFast = false; + }, + + onKeyPress: function() { + if (ie && ie_version >= 9) this.hasSelection = null; + this.fastPoll(); + }, + + onContextMenu: function(e) { + var input = this, cm = input.cm, display = cm.display, te = input.textarea; + var pos = posFromMouse(cm, e), scrollPos = display.scroller.scrollTop; + if (!pos || presto) return; // Opera is difficult. + + // Reset the current text selection only if the click is done outside of the selection + // and 'resetSelectionOnContextMenu' option is true. + var reset = cm.options.resetSelectionOnContextMenu; + if (reset && cm.doc.sel.contains(pos) == -1) + operation(cm, setSelection)(cm.doc, simpleSelection(pos), sel_dontScroll); + + var oldCSS = te.style.cssText, oldWrapperCSS = input.wrapper.style.cssText; + input.wrapper.style.cssText = "position: absolute" + var wrapperBox = input.wrapper.getBoundingClientRect() + te.style.cssText = "position: absolute; width: 30px; height: 30px; top: " + (e.clientY - wrapperBox.top - 5) + + "px; left: " + (e.clientX - wrapperBox.left - 5) + "px; z-index: 1000; background: " + + (ie ? "rgba(255, 255, 255, .05)" : "transparent") + + "; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);"; + if (webkit) var oldScrollY = window.scrollY; // Work around Chrome issue (#2712) + display.input.focus(); + if (webkit) window.scrollTo(null, oldScrollY); + display.input.reset(); + // Adds "Select all" to context menu in FF + if (!cm.somethingSelected()) te.value = input.prevInput = " "; + input.contextMenuPending = true; + display.selForContextMenu = cm.doc.sel; + clearTimeout(display.detectingSelectAll); + + // Select-all will be greyed out if there's nothing to select, so + // this adds a zero-width space so that we can later check whether + // it got selected. + function prepareSelectAllHack() { + if (te.selectionStart != null) { + var selected = cm.somethingSelected(); + var extval = "\u200b" + (selected ? te.value : ""); + te.value = "\u21da"; // Used to catch context-menu undo + te.value = extval; + input.prevInput = selected ? "" : "\u200b"; + te.selectionStart = 1; te.selectionEnd = extval.length; + // Re-set this, in case some other handler touched the + // selection in the meantime. + display.selForContextMenu = cm.doc.sel; + } + } + function rehide() { + input.contextMenuPending = false; + input.wrapper.style.cssText = oldWrapperCSS + te.style.cssText = oldCSS; + if (ie && ie_version < 9) display.scrollbars.setScrollTop(display.scroller.scrollTop = scrollPos); + + // Try to detect the user choosing select-all + if (te.selectionStart != null) { + if (!ie || (ie && ie_version < 9)) prepareSelectAllHack(); + var i = 0, poll = function() { + if (display.selForContextMenu == cm.doc.sel && te.selectionStart == 0 && + te.selectionEnd > 0 && input.prevInput == "\u200b") + operation(cm, commands.selectAll)(cm); + else if (i++ < 10) display.detectingSelectAll = setTimeout(poll, 500); + else display.input.reset(); + }; + display.detectingSelectAll = setTimeout(poll, 200); + } + } + + if (ie && ie_version >= 9) prepareSelectAllHack(); + if (captureRightClick) { + e_stop(e); + var mouseup = function() { + off(window, "mouseup", mouseup); + setTimeout(rehide, 20); + }; + on(window, "mouseup", mouseup); + } else { + setTimeout(rehide, 50); + } + }, + + readOnlyChanged: function(val) { + if (!val) this.reset(); + }, + + setUneditable: nothing, + + needsContentAttribute: false + }, TextareaInput.prototype); + + // CONTENTEDITABLE INPUT STYLE + + function ContentEditableInput(cm) { + this.cm = cm; + this.lastAnchorNode = this.lastAnchorOffset = this.lastFocusNode = this.lastFocusOffset = null; + this.polling = new Delayed(); + this.gracePeriod = false; + } + + ContentEditableInput.prototype = copyObj({ + init: function(display) { + var input = this, cm = input.cm; + var div = input.div = display.lineDiv; + disableBrowserMagic(div); + + on(div, "paste", function(e) { + if (!signalDOMEvent(cm, e)) handlePaste(e, cm); + }) + + on(div, "compositionstart", function(e) { + var data = e.data; + input.composing = {sel: cm.doc.sel, data: data, startData: data}; + if (!data) return; + var prim = cm.doc.sel.primary(); + var line = cm.getLine(prim.head.line); + var found = line.indexOf(data, Math.max(0, prim.head.ch - data.length)); + if (found > -1 && found <= prim.head.ch) + input.composing.sel = simpleSelection(Pos(prim.head.line, found), + Pos(prim.head.line, found + data.length)); + }); + on(div, "compositionupdate", function(e) { + input.composing.data = e.data; + }); + on(div, "compositionend", function(e) { + var ours = input.composing; + if (!ours) return; + if (e.data != ours.startData && !/\u200b/.test(e.data)) + ours.data = e.data; + // Need a small delay to prevent other code (input event, + // selection polling) from doing damage when fired right after + // compositionend. + setTimeout(function() { + if (!ours.handled) + input.applyComposition(ours); + if (input.composing == ours) + input.composing = null; + }, 50); + }); + + on(div, "touchstart", function() { + input.forceCompositionEnd(); + }); + + on(div, "input", function() { + if (input.composing) return; + if (cm.isReadOnly() || !input.pollContent()) + runInOp(input.cm, function() {regChange(cm);}); + }); + + function onCopyCut(e) { + if (signalDOMEvent(cm, e)) return + if (cm.somethingSelected()) { + lastCopied = cm.getSelections(); + if (e.type == "cut") cm.replaceSelection("", null, "cut"); + } else if (!cm.options.lineWiseCopyCut) { + return; + } else { + var ranges = copyableRanges(cm); + lastCopied = ranges.text; + if (e.type == "cut") { + cm.operation(function() { + cm.setSelections(ranges.ranges, 0, sel_dontScroll); + cm.replaceSelection("", null, "cut"); + }); + } + } + // iOS exposes the clipboard API, but seems to discard content inserted into it + if (e.clipboardData && !ios) { + e.preventDefault(); + e.clipboardData.clearData(); + e.clipboardData.setData("text/plain", lastCopied.join("\n")); + } else { + // Old-fashioned briefly-focus-a-textarea hack + var kludge = hiddenTextarea(), te = kludge.firstChild; + cm.display.lineSpace.insertBefore(kludge, cm.display.lineSpace.firstChild); + te.value = lastCopied.join("\n"); + var hadFocus = document.activeElement; + selectInput(te); + setTimeout(function() { + cm.display.lineSpace.removeChild(kludge); + hadFocus.focus(); + }, 50); + } + } + on(div, "copy", onCopyCut); + on(div, "cut", onCopyCut); + }, + + prepareSelection: function() { + var result = prepareSelection(this.cm, false); + result.focus = this.cm.state.focused; + return result; + }, + + showSelection: function(info, takeFocus) { + if (!info || !this.cm.display.view.length) return; + if (info.focus || takeFocus) this.showPrimarySelection(); + this.showMultipleSelections(info); + }, + + showPrimarySelection: function() { + var sel = window.getSelection(), prim = this.cm.doc.sel.primary(); + var curAnchor = domToPos(this.cm, sel.anchorNode, sel.anchorOffset); + var curFocus = domToPos(this.cm, sel.focusNode, sel.focusOffset); + if (curAnchor && !curAnchor.bad && curFocus && !curFocus.bad && + cmp(minPos(curAnchor, curFocus), prim.from()) == 0 && + cmp(maxPos(curAnchor, curFocus), prim.to()) == 0) + return; + + var start = posToDOM(this.cm, prim.from()); + var end = posToDOM(this.cm, prim.to()); + if (!start && !end) return; + + var view = this.cm.display.view; + var old = sel.rangeCount && sel.getRangeAt(0); + if (!start) { + start = {node: view[0].measure.map[2], offset: 0}; + } else if (!end) { // FIXME dangerously hacky + var measure = view[view.length - 1].measure; + var map = measure.maps ? measure.maps[measure.maps.length - 1] : measure.map; + end = {node: map[map.length - 1], offset: map[map.length - 2] - map[map.length - 3]}; + } + + try { var rng = range(start.node, start.offset, end.offset, end.node); } + catch(e) {} // Our model of the DOM might be outdated, in which case the range we try to set can be impossible + if (rng) { + if (!gecko && this.cm.state.focused) { + sel.collapse(start.node, start.offset); + if (!rng.collapsed) sel.addRange(rng); + } else { + sel.removeAllRanges(); + sel.addRange(rng); + } + if (old && sel.anchorNode == null) sel.addRange(old); + else if (gecko) this.startGracePeriod(); + } + this.rememberSelection(); + }, + + startGracePeriod: function() { + var input = this; + clearTimeout(this.gracePeriod); + this.gracePeriod = setTimeout(function() { + input.gracePeriod = false; + if (input.selectionChanged()) + input.cm.operation(function() { input.cm.curOp.selectionChanged = true; }); + }, 20); + }, + + showMultipleSelections: function(info) { + removeChildrenAndAdd(this.cm.display.cursorDiv, info.cursors); + removeChildrenAndAdd(this.cm.display.selectionDiv, info.selection); + }, + + rememberSelection: function() { + var sel = window.getSelection(); + this.lastAnchorNode = sel.anchorNode; this.lastAnchorOffset = sel.anchorOffset; + this.lastFocusNode = sel.focusNode; this.lastFocusOffset = sel.focusOffset; + }, + + selectionInEditor: function() { + var sel = window.getSelection(); + if (!sel.rangeCount) return false; + var node = sel.getRangeAt(0).commonAncestorContainer; + return contains(this.div, node); + }, + + focus: function() { + if (this.cm.options.readOnly != "nocursor") this.div.focus(); + }, + blur: function() { this.div.blur(); }, + getField: function() { return this.div; }, + + supportsTouch: function() { return true; }, + + receivedFocus: function() { + var input = this; + if (this.selectionInEditor()) + this.pollSelection(); + else + runInOp(this.cm, function() { input.cm.curOp.selectionChanged = true; }); + + function poll() { + if (input.cm.state.focused) { + input.pollSelection(); + input.polling.set(input.cm.options.pollInterval, poll); + } + } + this.polling.set(this.cm.options.pollInterval, poll); + }, + + selectionChanged: function() { + var sel = window.getSelection(); + return sel.anchorNode != this.lastAnchorNode || sel.anchorOffset != this.lastAnchorOffset || + sel.focusNode != this.lastFocusNode || sel.focusOffset != this.lastFocusOffset; + }, + + pollSelection: function() { + if (!this.composing && !this.gracePeriod && this.selectionChanged()) { + var sel = window.getSelection(), cm = this.cm; + this.rememberSelection(); + var anchor = domToPos(cm, sel.anchorNode, sel.anchorOffset); + var head = domToPos(cm, sel.focusNode, sel.focusOffset); + if (anchor && head) runInOp(cm, function() { + setSelection(cm.doc, simpleSelection(anchor, head), sel_dontScroll); + if (anchor.bad || head.bad) cm.curOp.selectionChanged = true; + }); + } + }, + + pollContent: function() { + var cm = this.cm, display = cm.display, sel = cm.doc.sel.primary(); + var from = sel.from(), to = sel.to(); + if (from.line < display.viewFrom || to.line > display.viewTo - 1) return false; + + var fromIndex; + if (from.line == display.viewFrom || (fromIndex = findViewIndex(cm, from.line)) == 0) { + var fromLine = lineNo(display.view[0].line); + var fromNode = display.view[0].node; + } else { + var fromLine = lineNo(display.view[fromIndex].line); + var fromNode = display.view[fromIndex - 1].node.nextSibling; + } + var toIndex = findViewIndex(cm, to.line); + if (toIndex == display.view.length - 1) { + var toLine = display.viewTo - 1; + var toNode = display.lineDiv.lastChild; + } else { + var toLine = lineNo(display.view[toIndex + 1].line) - 1; + var toNode = display.view[toIndex + 1].node.previousSibling; + } + + var newText = cm.doc.splitLines(domTextBetween(cm, fromNode, toNode, fromLine, toLine)); + var oldText = getBetween(cm.doc, Pos(fromLine, 0), Pos(toLine, getLine(cm.doc, toLine).text.length)); + while (newText.length > 1 && oldText.length > 1) { + if (lst(newText) == lst(oldText)) { newText.pop(); oldText.pop(); toLine--; } + else if (newText[0] == oldText[0]) { newText.shift(); oldText.shift(); fromLine++; } + else break; + } + + var cutFront = 0, cutEnd = 0; + var newTop = newText[0], oldTop = oldText[0], maxCutFront = Math.min(newTop.length, oldTop.length); + while (cutFront < maxCutFront && newTop.charCodeAt(cutFront) == oldTop.charCodeAt(cutFront)) + ++cutFront; + var newBot = lst(newText), oldBot = lst(oldText); + var maxCutEnd = Math.min(newBot.length - (newText.length == 1 ? cutFront : 0), + oldBot.length - (oldText.length == 1 ? cutFront : 0)); + while (cutEnd < maxCutEnd && + newBot.charCodeAt(newBot.length - cutEnd - 1) == oldBot.charCodeAt(oldBot.length - cutEnd - 1)) + ++cutEnd; + + newText[newText.length - 1] = newBot.slice(0, newBot.length - cutEnd); + newText[0] = newText[0].slice(cutFront); + + var chFrom = Pos(fromLine, cutFront); + var chTo = Pos(toLine, oldText.length ? lst(oldText).length - cutEnd : 0); + if (newText.length > 1 || newText[0] || cmp(chFrom, chTo)) { + replaceRange(cm.doc, newText, chFrom, chTo, "+input"); + return true; + } + }, + + ensurePolled: function() { + this.forceCompositionEnd(); + }, + reset: function() { + this.forceCompositionEnd(); + }, + forceCompositionEnd: function() { + if (!this.composing || this.composing.handled) return; + this.applyComposition(this.composing); + this.composing.handled = true; + this.div.blur(); + this.div.focus(); + }, + applyComposition: function(composing) { + if (this.cm.isReadOnly()) + operation(this.cm, regChange)(this.cm) + else if (composing.data && composing.data != composing.startData) + operation(this.cm, applyTextInput)(this.cm, composing.data, 0, composing.sel); + }, + + setUneditable: function(node) { + node.contentEditable = "false" + }, + + onKeyPress: function(e) { + e.preventDefault(); + if (!this.cm.isReadOnly()) + operation(this.cm, applyTextInput)(this.cm, String.fromCharCode(e.charCode == null ? e.keyCode : e.charCode), 0); + }, + + readOnlyChanged: function(val) { + this.div.contentEditable = String(val != "nocursor") + }, + + onContextMenu: nothing, + resetPosition: nothing, + + needsContentAttribute: true + }, ContentEditableInput.prototype); + + function posToDOM(cm, pos) { + var view = findViewForLine(cm, pos.line); + if (!view || view.hidden) return null; + var line = getLine(cm.doc, pos.line); + var info = mapFromLineView(view, line, pos.line); + + var order = getOrder(line), side = "left"; + if (order) { + var partPos = getBidiPartAt(order, pos.ch); + side = partPos % 2 ? "right" : "left"; + } + var result = nodeAndOffsetInLineMap(info.map, pos.ch, side); + result.offset = result.collapse == "right" ? result.end : result.start; + return result; + } + + function badPos(pos, bad) { if (bad) pos.bad = true; return pos; } + + function domToPos(cm, node, offset) { + var lineNode; + if (node == cm.display.lineDiv) { + lineNode = cm.display.lineDiv.childNodes[offset]; + if (!lineNode) return badPos(cm.clipPos(Pos(cm.display.viewTo - 1)), true); + node = null; offset = 0; + } else { + for (lineNode = node;; lineNode = lineNode.parentNode) { + if (!lineNode || lineNode == cm.display.lineDiv) return null; + if (lineNode.parentNode && lineNode.parentNode == cm.display.lineDiv) break; + } + } + for (var i = 0; i < cm.display.view.length; i++) { + var lineView = cm.display.view[i]; + if (lineView.node == lineNode) + return locateNodeInLineView(lineView, node, offset); + } + } + + function locateNodeInLineView(lineView, node, offset) { + var wrapper = lineView.text.firstChild, bad = false; + if (!node || !contains(wrapper, node)) return badPos(Pos(lineNo(lineView.line), 0), true); + if (node == wrapper) { + bad = true; + node = wrapper.childNodes[offset]; + offset = 0; + if (!node) { + var line = lineView.rest ? lst(lineView.rest) : lineView.line; + return badPos(Pos(lineNo(line), line.text.length), bad); + } + } + + var textNode = node.nodeType == 3 ? node : null, topNode = node; + if (!textNode && node.childNodes.length == 1 && node.firstChild.nodeType == 3) { + textNode = node.firstChild; + if (offset) offset = textNode.nodeValue.length; + } + while (topNode.parentNode != wrapper) topNode = topNode.parentNode; + var measure = lineView.measure, maps = measure.maps; + + function find(textNode, topNode, offset) { + for (var i = -1; i < (maps ? maps.length : 0); i++) { + var map = i < 0 ? measure.map : maps[i]; + for (var j = 0; j < map.length; j += 3) { + var curNode = map[j + 2]; + if (curNode == textNode || curNode == topNode) { + var line = lineNo(i < 0 ? lineView.line : lineView.rest[i]); + var ch = map[j] + offset; + if (offset < 0 || curNode != textNode) ch = map[j + (offset ? 1 : 0)]; + return Pos(line, ch); + } + } + } + } + var found = find(textNode, topNode, offset); + if (found) return badPos(found, bad); + + // FIXME this is all really shaky. might handle the few cases it needs to handle, but likely to cause problems + for (var after = topNode.nextSibling, dist = textNode ? textNode.nodeValue.length - offset : 0; after; after = after.nextSibling) { + found = find(after, after.firstChild, 0); + if (found) + return badPos(Pos(found.line, found.ch - dist), bad); + else + dist += after.textContent.length; + } + for (var before = topNode.previousSibling, dist = offset; before; before = before.previousSibling) { + found = find(before, before.firstChild, -1); + if (found) + return badPos(Pos(found.line, found.ch + dist), bad); + else + dist += after.textContent.length; + } + } + + function domTextBetween(cm, from, to, fromLine, toLine) { + var text = "", closing = false, lineSep = cm.doc.lineSeparator(); + function recognizeMarker(id) { return function(marker) { return marker.id == id; }; } + function walk(node) { + if (node.nodeType == 1) { + var cmText = node.getAttribute("cm-text"); + if (cmText != null) { + if (cmText == "") cmText = node.textContent.replace(/\u200b/g, ""); + text += cmText; + return; + } + var markerID = node.getAttribute("cm-marker"), range; + if (markerID) { + var found = cm.findMarks(Pos(fromLine, 0), Pos(toLine + 1, 0), recognizeMarker(+markerID)); + if (found.length && (range = found[0].find())) + text += getBetween(cm.doc, range.from, range.to).join(lineSep); + return; + } + if (node.getAttribute("contenteditable") == "false") return; + for (var i = 0; i < node.childNodes.length; i++) + walk(node.childNodes[i]); + if (/^(pre|div|p)$/i.test(node.nodeName)) + closing = true; + } else if (node.nodeType == 3) { + var val = node.nodeValue; + if (!val) return; + if (closing) { + text += lineSep; + closing = false; + } + text += val; + } + } + for (;;) { + walk(from); + if (from == to) break; + from = from.nextSibling; + } + return text; + } + + CodeMirror.inputStyles = {"textarea": TextareaInput, "contenteditable": ContentEditableInput}; + + // SELECTION / CURSOR + + // Selection objects are immutable. A new one is created every time + // the selection changes. A selection is one or more non-overlapping + // (and non-touching) ranges, sorted, and an integer that indicates + // which one is the primary selection (the one that's scrolled into + // view, that getCursor returns, etc). + function Selection(ranges, primIndex) { + this.ranges = ranges; + this.primIndex = primIndex; + } + + Selection.prototype = { + primary: function() { return this.ranges[this.primIndex]; }, + equals: function(other) { + if (other == this) return true; + if (other.primIndex != this.primIndex || other.ranges.length != this.ranges.length) return false; + for (var i = 0; i < this.ranges.length; i++) { + var here = this.ranges[i], there = other.ranges[i]; + if (cmp(here.anchor, there.anchor) != 0 || cmp(here.head, there.head) != 0) return false; + } + return true; + }, + deepCopy: function() { + for (var out = [], i = 0; i < this.ranges.length; i++) + out[i] = new Range(copyPos(this.ranges[i].anchor), copyPos(this.ranges[i].head)); + return new Selection(out, this.primIndex); + }, + somethingSelected: function() { + for (var i = 0; i < this.ranges.length; i++) + if (!this.ranges[i].empty()) return true; + return false; + }, + contains: function(pos, end) { + if (!end) end = pos; + for (var i = 0; i < this.ranges.length; i++) { + var range = this.ranges[i]; + if (cmp(end, range.from()) >= 0 && cmp(pos, range.to()) <= 0) + return i; + } + return -1; + } + }; + + function Range(anchor, head) { + this.anchor = anchor; this.head = head; + } + + Range.prototype = { + from: function() { return minPos(this.anchor, this.head); }, + to: function() { return maxPos(this.anchor, this.head); }, + empty: function() { + return this.head.line == this.anchor.line && this.head.ch == this.anchor.ch; + } + }; + + // Take an unsorted, potentially overlapping set of ranges, and + // build a selection out of it. 'Consumes' ranges array (modifying + // it). + function normalizeSelection(ranges, primIndex) { + var prim = ranges[primIndex]; + ranges.sort(function(a, b) { return cmp(a.from(), b.from()); }); + primIndex = indexOf(ranges, prim); + for (var i = 1; i < ranges.length; i++) { + var cur = ranges[i], prev = ranges[i - 1]; + if (cmp(prev.to(), cur.from()) >= 0) { + var from = minPos(prev.from(), cur.from()), to = maxPos(prev.to(), cur.to()); + var inv = prev.empty() ? cur.from() == cur.head : prev.from() == prev.head; + if (i <= primIndex) --primIndex; + ranges.splice(--i, 2, new Range(inv ? to : from, inv ? from : to)); + } + } + return new Selection(ranges, primIndex); + } + + function simpleSelection(anchor, head) { + return new Selection([new Range(anchor, head || anchor)], 0); + } + + // Most of the external API clips given positions to make sure they + // actually exist within the document. + function clipLine(doc, n) {return Math.max(doc.first, Math.min(n, doc.first + doc.size - 1));} + function clipPos(doc, pos) { + if (pos.line < doc.first) return Pos(doc.first, 0); + var last = doc.first + doc.size - 1; + if (pos.line > last) return Pos(last, getLine(doc, last).text.length); + return clipToLen(pos, getLine(doc, pos.line).text.length); + } + function clipToLen(pos, linelen) { + var ch = pos.ch; + if (ch == null || ch > linelen) return Pos(pos.line, linelen); + else if (ch < 0) return Pos(pos.line, 0); + else return pos; + } + function isLine(doc, l) {return l >= doc.first && l < doc.first + doc.size;} + function clipPosArray(doc, array) { + for (var out = [], i = 0; i < array.length; i++) out[i] = clipPos(doc, array[i]); + return out; + } + + // SELECTION UPDATES + + // The 'scroll' parameter given to many of these indicated whether + // the new cursor position should be scrolled into view after + // modifying the selection. + + // If shift is held or the extend flag is set, extends a range to + // include a given position (and optionally a second position). + // Otherwise, simply returns the range between the given positions. + // Used for cursor motion and such. + function extendRange(doc, range, head, other) { + if (doc.cm && doc.cm.display.shift || doc.extend) { + var anchor = range.anchor; + if (other) { + var posBefore = cmp(head, anchor) < 0; + if (posBefore != (cmp(other, anchor) < 0)) { + anchor = head; + head = other; + } else if (posBefore != (cmp(head, other) < 0)) { + head = other; + } + } + return new Range(anchor, head); + } else { + return new Range(other || head, head); + } + } + + // Extend the primary selection range, discard the rest. + function extendSelection(doc, head, other, options) { + setSelection(doc, new Selection([extendRange(doc, doc.sel.primary(), head, other)], 0), options); + } + + // Extend all selections (pos is an array of selections with length + // equal the number of selections) + function extendSelections(doc, heads, options) { + for (var out = [], i = 0; i < doc.sel.ranges.length; i++) + out[i] = extendRange(doc, doc.sel.ranges[i], heads[i], null); + var newSel = normalizeSelection(out, doc.sel.primIndex); + setSelection(doc, newSel, options); + } + + // Updates a single range in the selection. + function replaceOneSelection(doc, i, range, options) { + var ranges = doc.sel.ranges.slice(0); + ranges[i] = range; + setSelection(doc, normalizeSelection(ranges, doc.sel.primIndex), options); + } + + // Reset the selection to a single range. + function setSimpleSelection(doc, anchor, head, options) { + setSelection(doc, simpleSelection(anchor, head), options); + } + + // Give beforeSelectionChange handlers a change to influence a + // selection update. + function filterSelectionChange(doc, sel, options) { + var obj = { + ranges: sel.ranges, + update: function(ranges) { + this.ranges = []; + for (var i = 0; i < ranges.length; i++) + this.ranges[i] = new Range(clipPos(doc, ranges[i].anchor), + clipPos(doc, ranges[i].head)); + }, + origin: options && options.origin + }; + signal(doc, "beforeSelectionChange", doc, obj); + if (doc.cm) signal(doc.cm, "beforeSelectionChange", doc.cm, obj); + if (obj.ranges != sel.ranges) return normalizeSelection(obj.ranges, obj.ranges.length - 1); + else return sel; + } + + function setSelectionReplaceHistory(doc, sel, options) { + var done = doc.history.done, last = lst(done); + if (last && last.ranges) { + done[done.length - 1] = sel; + setSelectionNoUndo(doc, sel, options); + } else { + setSelection(doc, sel, options); + } + } + + // Set a new selection. + function setSelection(doc, sel, options) { + setSelectionNoUndo(doc, sel, options); + addSelectionToHistory(doc, doc.sel, doc.cm ? doc.cm.curOp.id : NaN, options); + } + + function setSelectionNoUndo(doc, sel, options) { + if (hasHandler(doc, "beforeSelectionChange") || doc.cm && hasHandler(doc.cm, "beforeSelectionChange")) + sel = filterSelectionChange(doc, sel, options); + + var bias = options && options.bias || + (cmp(sel.primary().head, doc.sel.primary().head) < 0 ? -1 : 1); + setSelectionInner(doc, skipAtomicInSelection(doc, sel, bias, true)); + + if (!(options && options.scroll === false) && doc.cm) + ensureCursorVisible(doc.cm); + } + + function setSelectionInner(doc, sel) { + if (sel.equals(doc.sel)) return; + + doc.sel = sel; + + if (doc.cm) { + doc.cm.curOp.updateInput = doc.cm.curOp.selectionChanged = true; + signalCursorActivity(doc.cm); + } + signalLater(doc, "cursorActivity", doc); + } + + // Verify that the selection does not partially select any atomic + // marked ranges. + function reCheckSelection(doc) { + setSelectionInner(doc, skipAtomicInSelection(doc, doc.sel, null, false), sel_dontScroll); + } + + // Return a selection that does not partially select any atomic + // ranges. + function skipAtomicInSelection(doc, sel, bias, mayClear) { + var out; + for (var i = 0; i < sel.ranges.length; i++) { + var range = sel.ranges[i]; + var old = sel.ranges.length == doc.sel.ranges.length && doc.sel.ranges[i]; + var newAnchor = skipAtomic(doc, range.anchor, old && old.anchor, bias, mayClear); + var newHead = skipAtomic(doc, range.head, old && old.head, bias, mayClear); + if (out || newAnchor != range.anchor || newHead != range.head) { + if (!out) out = sel.ranges.slice(0, i); + out[i] = new Range(newAnchor, newHead); + } + } + return out ? normalizeSelection(out, sel.primIndex) : sel; + } + + function skipAtomicInner(doc, pos, oldPos, dir, mayClear) { + var line = getLine(doc, pos.line); + if (line.markedSpans) for (var i = 0; i < line.markedSpans.length; ++i) { + var sp = line.markedSpans[i], m = sp.marker; + if ((sp.from == null || (m.inclusiveLeft ? sp.from <= pos.ch : sp.from < pos.ch)) && + (sp.to == null || (m.inclusiveRight ? sp.to >= pos.ch : sp.to > pos.ch))) { + if (mayClear) { + signal(m, "beforeCursorEnter"); + if (m.explicitlyCleared) { + if (!line.markedSpans) break; + else {--i; continue;} + } + } + if (!m.atomic) continue; + + if (oldPos) { + var near = m.find(dir < 0 ? 1 : -1), diff; + if (dir < 0 ? m.inclusiveRight : m.inclusiveLeft) + near = movePos(doc, near, -dir, near && near.line == pos.line ? line : null); + if (near && near.line == pos.line && (diff = cmp(near, oldPos)) && (dir < 0 ? diff < 0 : diff > 0)) + return skipAtomicInner(doc, near, pos, dir, mayClear); + } + + var far = m.find(dir < 0 ? -1 : 1); + if (dir < 0 ? m.inclusiveLeft : m.inclusiveRight) + far = movePos(doc, far, dir, far.line == pos.line ? line : null); + return far ? skipAtomicInner(doc, far, pos, dir, mayClear) : null; + } + } + return pos; + } + + // Ensure a given position is not inside an atomic range. + function skipAtomic(doc, pos, oldPos, bias, mayClear) { + var dir = bias || 1; + var found = skipAtomicInner(doc, pos, oldPos, dir, mayClear) || + (!mayClear && skipAtomicInner(doc, pos, oldPos, dir, true)) || + skipAtomicInner(doc, pos, oldPos, -dir, mayClear) || + (!mayClear && skipAtomicInner(doc, pos, oldPos, -dir, true)); + if (!found) { + doc.cantEdit = true; + return Pos(doc.first, 0); + } + return found; + } + + function movePos(doc, pos, dir, line) { + if (dir < 0 && pos.ch == 0) { + if (pos.line > doc.first) return clipPos(doc, Pos(pos.line - 1)); + else return null; + } else if (dir > 0 && pos.ch == (line || getLine(doc, pos.line)).text.length) { + if (pos.line < doc.first + doc.size - 1) return Pos(pos.line + 1, 0); + else return null; + } else { + return new Pos(pos.line, pos.ch + dir); + } + } + + // SELECTION DRAWING + + function updateSelection(cm) { + cm.display.input.showSelection(cm.display.input.prepareSelection()); + } + + function prepareSelection(cm, primary) { + var doc = cm.doc, result = {}; + var curFragment = result.cursors = document.createDocumentFragment(); + var selFragment = result.selection = document.createDocumentFragment(); + + for (var i = 0; i < doc.sel.ranges.length; i++) { + if (primary === false && i == doc.sel.primIndex) continue; + var range = doc.sel.ranges[i]; + if (range.from().line >= cm.display.viewTo || range.to().line < cm.display.viewFrom) continue; + var collapsed = range.empty(); + if (collapsed || cm.options.showCursorWhenSelecting) + drawSelectionCursor(cm, range.head, curFragment); + if (!collapsed) + drawSelectionRange(cm, range, selFragment); + } + return result; + } + + // Draws a cursor for the given range + function drawSelectionCursor(cm, head, output) { + var pos = cursorCoords(cm, head, "div", null, null, !cm.options.singleCursorHeightPerLine); + + var cursor = output.appendChild(elt("div", "\u00a0", "CodeMirror-cursor")); + cursor.style.left = pos.left + "px"; + cursor.style.top = pos.top + "px"; + cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + "px"; + + if (pos.other) { + // Secondary cursor, shown when on a 'jump' in bi-directional text + var otherCursor = output.appendChild(elt("div", "\u00a0", "CodeMirror-cursor CodeMirror-secondarycursor")); + otherCursor.style.display = ""; + otherCursor.style.left = pos.other.left + "px"; + otherCursor.style.top = pos.other.top + "px"; + otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + "px"; + } + } + + // Draws the given range as a highlighted selection + function drawSelectionRange(cm, range, output) { + var display = cm.display, doc = cm.doc; + var fragment = document.createDocumentFragment(); + var padding = paddingH(cm.display), leftSide = padding.left; + var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right; + + function add(left, top, width, bottom) { + if (top < 0) top = 0; + top = Math.round(top); + bottom = Math.round(bottom); + fragment.appendChild(elt("div", null, "CodeMirror-selected", "position: absolute; left: " + left + + "px; top: " + top + "px; width: " + (width == null ? rightSide - left : width) + + "px; height: " + (bottom - top) + "px")); + } + + function drawForLine(line, fromArg, toArg) { + var lineObj = getLine(doc, line); + var lineLen = lineObj.text.length; + var start, end; + function coords(ch, bias) { + return charCoords(cm, Pos(line, ch), "div", lineObj, bias); + } + + iterateBidiSections(getOrder(lineObj), fromArg || 0, toArg == null ? lineLen : toArg, function(from, to, dir) { + var leftPos = coords(from, "left"), rightPos, left, right; + if (from == to) { + rightPos = leftPos; + left = right = leftPos.left; + } else { + rightPos = coords(to - 1, "right"); + if (dir == "rtl") { var tmp = leftPos; leftPos = rightPos; rightPos = tmp; } + left = leftPos.left; + right = rightPos.right; + } + if (fromArg == null && from == 0) left = leftSide; + if (rightPos.top - leftPos.top > 3) { // Different lines, draw top part + add(left, leftPos.top, null, leftPos.bottom); + left = leftSide; + if (leftPos.bottom < rightPos.top) add(left, leftPos.bottom, null, rightPos.top); + } + if (toArg == null && to == lineLen) right = rightSide; + if (!start || leftPos.top < start.top || leftPos.top == start.top && leftPos.left < start.left) + start = leftPos; + if (!end || rightPos.bottom > end.bottom || rightPos.bottom == end.bottom && rightPos.right > end.right) + end = rightPos; + if (left < leftSide + 1) left = leftSide; + add(left, rightPos.top, right - left, rightPos.bottom); + }); + return {start: start, end: end}; + } + + var sFrom = range.from(), sTo = range.to(); + if (sFrom.line == sTo.line) { + drawForLine(sFrom.line, sFrom.ch, sTo.ch); + } else { + var fromLine = getLine(doc, sFrom.line), toLine = getLine(doc, sTo.line); + var singleVLine = visualLine(fromLine) == visualLine(toLine); + var leftEnd = drawForLine(sFrom.line, sFrom.ch, singleVLine ? fromLine.text.length + 1 : null).end; + var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start; + if (singleVLine) { + if (leftEnd.top < rightStart.top - 2) { + add(leftEnd.right, leftEnd.top, null, leftEnd.bottom); + add(leftSide, rightStart.top, rightStart.left, rightStart.bottom); + } else { + add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom); + } + } + if (leftEnd.bottom < rightStart.top) + add(leftSide, leftEnd.bottom, null, rightStart.top); + } + + output.appendChild(fragment); + } + + // Cursor-blinking + function restartBlink(cm) { + if (!cm.state.focused) return; + var display = cm.display; + clearInterval(display.blinker); + var on = true; + display.cursorDiv.style.visibility = ""; + if (cm.options.cursorBlinkRate > 0) + display.blinker = setInterval(function() { + display.cursorDiv.style.visibility = (on = !on) ? "" : "hidden"; + }, cm.options.cursorBlinkRate); + else if (cm.options.cursorBlinkRate < 0) + display.cursorDiv.style.visibility = "hidden"; + } + + // HIGHLIGHT WORKER + + function startWorker(cm, time) { + if (cm.doc.mode.startState && cm.doc.frontier < cm.display.viewTo) + cm.state.highlight.set(time, bind(highlightWorker, cm)); + } + + function highlightWorker(cm) { + var doc = cm.doc; + if (doc.frontier < doc.first) doc.frontier = doc.first; + if (doc.frontier >= cm.display.viewTo) return; + var end = +new Date + cm.options.workTime; + var state = copyState(doc.mode, getStateBefore(cm, doc.frontier)); + var changedLines = []; + + doc.iter(doc.frontier, Math.min(doc.first + doc.size, cm.display.viewTo + 500), function(line) { + if (doc.frontier >= cm.display.viewFrom) { // Visible + var oldStyles = line.styles, tooLong = line.text.length > cm.options.maxHighlightLength; + var highlighted = highlightLine(cm, line, tooLong ? copyState(doc.mode, state) : state, true); + line.styles = highlighted.styles; + var oldCls = line.styleClasses, newCls = highlighted.classes; + if (newCls) line.styleClasses = newCls; + else if (oldCls) line.styleClasses = null; + var ischange = !oldStyles || oldStyles.length != line.styles.length || + oldCls != newCls && (!oldCls || !newCls || oldCls.bgClass != newCls.bgClass || oldCls.textClass != newCls.textClass); + for (var i = 0; !ischange && i < oldStyles.length; ++i) ischange = oldStyles[i] != line.styles[i]; + if (ischange) changedLines.push(doc.frontier); + line.stateAfter = tooLong ? state : copyState(doc.mode, state); + } else { + if (line.text.length <= cm.options.maxHighlightLength) + processLine(cm, line.text, state); + line.stateAfter = doc.frontier % 5 == 0 ? copyState(doc.mode, state) : null; + } + ++doc.frontier; + if (+new Date > end) { + startWorker(cm, cm.options.workDelay); + return true; + } + }); + if (changedLines.length) runInOp(cm, function() { + for (var i = 0; i < changedLines.length; i++) + regLineChange(cm, changedLines[i], "text"); + }); + } + + // Finds the line to start with when starting a parse. Tries to + // find a line with a stateAfter, so that it can start with a + // valid state. If that fails, it returns the line with the + // smallest indentation, which tends to need the least context to + // parse correctly. + function findStartLine(cm, n, precise) { + var minindent, minline, doc = cm.doc; + var lim = precise ? -1 : n - (cm.doc.mode.innerMode ? 1000 : 100); + for (var search = n; search > lim; --search) { + if (search <= doc.first) return doc.first; + var line = getLine(doc, search - 1); + if (line.stateAfter && (!precise || search <= doc.frontier)) return search; + var indented = countColumn(line.text, null, cm.options.tabSize); + if (minline == null || minindent > indented) { + minline = search - 1; + minindent = indented; + } + } + return minline; + } + + function getStateBefore(cm, n, precise) { + var doc = cm.doc, display = cm.display; + if (!doc.mode.startState) return true; + var pos = findStartLine(cm, n, precise), state = pos > doc.first && getLine(doc, pos-1).stateAfter; + if (!state) state = startState(doc.mode); + else state = copyState(doc.mode, state); + doc.iter(pos, n, function(line) { + processLine(cm, line.text, state); + var save = pos == n - 1 || pos % 5 == 0 || pos >= display.viewFrom && pos < display.viewTo; + line.stateAfter = save ? copyState(doc.mode, state) : null; + ++pos; + }); + if (precise) doc.frontier = pos; + return state; + } + + // POSITION MEASUREMENT + + function paddingTop(display) {return display.lineSpace.offsetTop;} + function paddingVert(display) {return display.mover.offsetHeight - display.lineSpace.offsetHeight;} + function paddingH(display) { + if (display.cachedPaddingH) return display.cachedPaddingH; + var e = removeChildrenAndAdd(display.measure, elt("pre", "x")); + var style = window.getComputedStyle ? window.getComputedStyle(e) : e.currentStyle; + var data = {left: parseInt(style.paddingLeft), right: parseInt(style.paddingRight)}; + if (!isNaN(data.left) && !isNaN(data.right)) display.cachedPaddingH = data; + return data; + } + + function scrollGap(cm) { return scrollerGap - cm.display.nativeBarWidth; } + function displayWidth(cm) { + return cm.display.scroller.clientWidth - scrollGap(cm) - cm.display.barWidth; + } + function displayHeight(cm) { + return cm.display.scroller.clientHeight - scrollGap(cm) - cm.display.barHeight; + } + + // Ensure the lineView.wrapping.heights array is populated. This is + // an array of bottom offsets for the lines that make up a drawn + // line. When lineWrapping is on, there might be more than one + // height. + function ensureLineHeights(cm, lineView, rect) { + var wrapping = cm.options.lineWrapping; + var curWidth = wrapping && displayWidth(cm); + if (!lineView.measure.heights || wrapping && lineView.measure.width != curWidth) { + var heights = lineView.measure.heights = []; + if (wrapping) { + lineView.measure.width = curWidth; + var rects = lineView.text.firstChild.getClientRects(); + for (var i = 0; i < rects.length - 1; i++) { + var cur = rects[i], next = rects[i + 1]; + if (Math.abs(cur.bottom - next.bottom) > 2) + heights.push((cur.bottom + next.top) / 2 - rect.top); + } + } + heights.push(rect.bottom - rect.top); + } + } + + // Find a line map (mapping character offsets to text nodes) and a + // measurement cache for the given line number. (A line view might + // contain multiple lines when collapsed ranges are present.) + function mapFromLineView(lineView, line, lineN) { + if (lineView.line == line) + return {map: lineView.measure.map, cache: lineView.measure.cache}; + for (var i = 0; i < lineView.rest.length; i++) + if (lineView.rest[i] == line) + return {map: lineView.measure.maps[i], cache: lineView.measure.caches[i]}; + for (var i = 0; i < lineView.rest.length; i++) + if (lineNo(lineView.rest[i]) > lineN) + return {map: lineView.measure.maps[i], cache: lineView.measure.caches[i], before: true}; + } + + // Render a line into the hidden node display.externalMeasured. Used + // when measurement is needed for a line that's not in the viewport. + function updateExternalMeasurement(cm, line) { + line = visualLine(line); + var lineN = lineNo(line); + var view = cm.display.externalMeasured = new LineView(cm.doc, line, lineN); + view.lineN = lineN; + var built = view.built = buildLineContent(cm, view); + view.text = built.pre; + removeChildrenAndAdd(cm.display.lineMeasure, built.pre); + return view; + } + + // Get a {top, bottom, left, right} box (in line-local coordinates) + // for a given character. + function measureChar(cm, line, ch, bias) { + return measureCharPrepared(cm, prepareMeasureForLine(cm, line), ch, bias); + } + + // Find a line view that corresponds to the given line number. + function findViewForLine(cm, lineN) { + if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo) + return cm.display.view[findViewIndex(cm, lineN)]; + var ext = cm.display.externalMeasured; + if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size) + return ext; + } + + // Measurement can be split in two steps, the set-up work that + // applies to the whole line, and the measurement of the actual + // character. Functions like coordsChar, that need to do a lot of + // measurements in a row, can thus ensure that the set-up work is + // only done once. + function prepareMeasureForLine(cm, line) { + var lineN = lineNo(line); + var view = findViewForLine(cm, lineN); + if (view && !view.text) { + view = null; + } else if (view && view.changes) { + updateLineForChanges(cm, view, lineN, getDimensions(cm)); + cm.curOp.forceUpdate = true; + } + if (!view) + view = updateExternalMeasurement(cm, line); + + var info = mapFromLineView(view, line, lineN); + return { + line: line, view: view, rect: null, + map: info.map, cache: info.cache, before: info.before, + hasHeights: false + }; + } + + // Given a prepared measurement object, measures the position of an + // actual character (or fetches it from the cache). + function measureCharPrepared(cm, prepared, ch, bias, varHeight) { + if (prepared.before) ch = -1; + var key = ch + (bias || ""), found; + if (prepared.cache.hasOwnProperty(key)) { + found = prepared.cache[key]; + } else { + if (!prepared.rect) + prepared.rect = prepared.view.text.getBoundingClientRect(); + if (!prepared.hasHeights) { + ensureLineHeights(cm, prepared.view, prepared.rect); + prepared.hasHeights = true; + } + found = measureCharInner(cm, prepared, ch, bias); + if (!found.bogus) prepared.cache[key] = found; + } + return {left: found.left, right: found.right, + top: varHeight ? found.rtop : found.top, + bottom: varHeight ? found.rbottom : found.bottom}; + } + + var nullRect = {left: 0, right: 0, top: 0, bottom: 0}; + + function nodeAndOffsetInLineMap(map, ch, bias) { + var node, start, end, collapse; + // First, search the line map for the text node corresponding to, + // or closest to, the target character. + for (var i = 0; i < map.length; i += 3) { + var mStart = map[i], mEnd = map[i + 1]; + if (ch < mStart) { + start = 0; end = 1; + collapse = "left"; + } else if (ch < mEnd) { + start = ch - mStart; + end = start + 1; + } else if (i == map.length - 3 || ch == mEnd && map[i + 3] > ch) { + end = mEnd - mStart; + start = end - 1; + if (ch >= mEnd) collapse = "right"; + } + if (start != null) { + node = map[i + 2]; + if (mStart == mEnd && bias == (node.insertLeft ? "left" : "right")) + collapse = bias; + if (bias == "left" && start == 0) + while (i && map[i - 2] == map[i - 3] && map[i - 1].insertLeft) { + node = map[(i -= 3) + 2]; + collapse = "left"; + } + if (bias == "right" && start == mEnd - mStart) + while (i < map.length - 3 && map[i + 3] == map[i + 4] && !map[i + 5].insertLeft) { + node = map[(i += 3) + 2]; + collapse = "right"; + } + break; + } + } + return {node: node, start: start, end: end, collapse: collapse, coverStart: mStart, coverEnd: mEnd}; + } + + function measureCharInner(cm, prepared, ch, bias) { + var place = nodeAndOffsetInLineMap(prepared.map, ch, bias); + var node = place.node, start = place.start, end = place.end, collapse = place.collapse; + + var rect; + if (node.nodeType == 3) { // If it is a text node, use a range to retrieve the coordinates. + for (var i = 0; i < 4; i++) { // Retry a maximum of 4 times when nonsense rectangles are returned + while (start && isExtendingChar(prepared.line.text.charAt(place.coverStart + start))) --start; + while (place.coverStart + end < place.coverEnd && isExtendingChar(prepared.line.text.charAt(place.coverStart + end))) ++end; + if (ie && ie_version < 9 && start == 0 && end == place.coverEnd - place.coverStart) { + rect = node.parentNode.getBoundingClientRect(); + } else if (ie && cm.options.lineWrapping) { + var rects = range(node, start, end).getClientRects(); + if (rects.length) + rect = rects[bias == "right" ? rects.length - 1 : 0]; + else + rect = nullRect; + } else { + rect = range(node, start, end).getBoundingClientRect() || nullRect; + } + if (rect.left || rect.right || start == 0) break; + end = start; + start = start - 1; + collapse = "right"; + } + if (ie && ie_version < 11) rect = maybeUpdateRectForZooming(cm.display.measure, rect); + } else { // If it is a widget, simply get the box for the whole widget. + if (start > 0) collapse = bias = "right"; + var rects; + if (cm.options.lineWrapping && (rects = node.getClientRects()).length > 1) + rect = rects[bias == "right" ? rects.length - 1 : 0]; + else + rect = node.getBoundingClientRect(); + } + if (ie && ie_version < 9 && !start && (!rect || !rect.left && !rect.right)) { + var rSpan = node.parentNode.getClientRects()[0]; + if (rSpan) + rect = {left: rSpan.left, right: rSpan.left + charWidth(cm.display), top: rSpan.top, bottom: rSpan.bottom}; + else + rect = nullRect; + } + + var rtop = rect.top - prepared.rect.top, rbot = rect.bottom - prepared.rect.top; + var mid = (rtop + rbot) / 2; + var heights = prepared.view.measure.heights; + for (var i = 0; i < heights.length - 1; i++) + if (mid < heights[i]) break; + var top = i ? heights[i - 1] : 0, bot = heights[i]; + var result = {left: (collapse == "right" ? rect.right : rect.left) - prepared.rect.left, + right: (collapse == "left" ? rect.left : rect.right) - prepared.rect.left, + top: top, bottom: bot}; + if (!rect.left && !rect.right) result.bogus = true; + if (!cm.options.singleCursorHeightPerLine) { result.rtop = rtop; result.rbottom = rbot; } + + return result; + } + + // Work around problem with bounding client rects on ranges being + // returned incorrectly when zoomed on IE10 and below. + function maybeUpdateRectForZooming(measure, rect) { + if (!window.screen || screen.logicalXDPI == null || + screen.logicalXDPI == screen.deviceXDPI || !hasBadZoomedRects(measure)) + return rect; + var scaleX = screen.logicalXDPI / screen.deviceXDPI; + var scaleY = screen.logicalYDPI / screen.deviceYDPI; + return {left: rect.left * scaleX, right: rect.right * scaleX, + top: rect.top * scaleY, bottom: rect.bottom * scaleY}; + } + + function clearLineMeasurementCacheFor(lineView) { + if (lineView.measure) { + lineView.measure.cache = {}; + lineView.measure.heights = null; + if (lineView.rest) for (var i = 0; i < lineView.rest.length; i++) + lineView.measure.caches[i] = {}; + } + } + + function clearLineMeasurementCache(cm) { + cm.display.externalMeasure = null; + removeChildren(cm.display.lineMeasure); + for (var i = 0; i < cm.display.view.length; i++) + clearLineMeasurementCacheFor(cm.display.view[i]); + } + + function clearCaches(cm) { + clearLineMeasurementCache(cm); + cm.display.cachedCharWidth = cm.display.cachedTextHeight = cm.display.cachedPaddingH = null; + if (!cm.options.lineWrapping) cm.display.maxLineChanged = true; + cm.display.lineNumChars = null; + } + + function pageScrollX() { return window.pageXOffset || (document.documentElement || document.body).scrollLeft; } + function pageScrollY() { return window.pageYOffset || (document.documentElement || document.body).scrollTop; } + + // Converts a {top, bottom, left, right} box from line-local + // coordinates into another coordinate system. Context may be one of + // "line", "div" (display.lineDiv), "local"/null (editor), "window", + // or "page". + function intoCoordSystem(cm, lineObj, rect, context) { + if (lineObj.widgets) for (var i = 0; i < lineObj.widgets.length; ++i) if (lineObj.widgets[i].above) { + var size = widgetHeight(lineObj.widgets[i]); + rect.top += size; rect.bottom += size; + } + if (context == "line") return rect; + if (!context) context = "local"; + var yOff = heightAtLine(lineObj); + if (context == "local") yOff += paddingTop(cm.display); + else yOff -= cm.display.viewOffset; + if (context == "page" || context == "window") { + var lOff = cm.display.lineSpace.getBoundingClientRect(); + yOff += lOff.top + (context == "window" ? 0 : pageScrollY()); + var xOff = lOff.left + (context == "window" ? 0 : pageScrollX()); + rect.left += xOff; rect.right += xOff; + } + rect.top += yOff; rect.bottom += yOff; + return rect; + } + + // Coverts a box from "div" coords to another coordinate system. + // Context may be "window", "page", "div", or "local"/null. + function fromCoordSystem(cm, coords, context) { + if (context == "div") return coords; + var left = coords.left, top = coords.top; + // First move into "page" coordinate system + if (context == "page") { + left -= pageScrollX(); + top -= pageScrollY(); + } else if (context == "local" || !context) { + var localBox = cm.display.sizer.getBoundingClientRect(); + left += localBox.left; + top += localBox.top; + } + + var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect(); + return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top}; + } + + function charCoords(cm, pos, context, lineObj, bias) { + if (!lineObj) lineObj = getLine(cm.doc, pos.line); + return intoCoordSystem(cm, lineObj, measureChar(cm, lineObj, pos.ch, bias), context); + } + + // Returns a box for a given cursor position, which may have an + // 'other' property containing the position of the secondary cursor + // on a bidi boundary. + function cursorCoords(cm, pos, context, lineObj, preparedMeasure, varHeight) { + lineObj = lineObj || getLine(cm.doc, pos.line); + if (!preparedMeasure) preparedMeasure = prepareMeasureForLine(cm, lineObj); + function get(ch, right) { + var m = measureCharPrepared(cm, preparedMeasure, ch, right ? "right" : "left", varHeight); + if (right) m.left = m.right; else m.right = m.left; + return intoCoordSystem(cm, lineObj, m, context); + } + function getBidi(ch, partPos) { + var part = order[partPos], right = part.level % 2; + if (ch == bidiLeft(part) && partPos && part.level < order[partPos - 1].level) { + part = order[--partPos]; + ch = bidiRight(part) - (part.level % 2 ? 0 : 1); + right = true; + } else if (ch == bidiRight(part) && partPos < order.length - 1 && part.level < order[partPos + 1].level) { + part = order[++partPos]; + ch = bidiLeft(part) - part.level % 2; + right = false; + } + if (right && ch == part.to && ch > part.from) return get(ch - 1); + return get(ch, right); + } + var order = getOrder(lineObj), ch = pos.ch; + if (!order) return get(ch); + var partPos = getBidiPartAt(order, ch); + var val = getBidi(ch, partPos); + if (bidiOther != null) val.other = getBidi(ch, bidiOther); + return val; + } + + // Used to cheaply estimate the coordinates for a position. Used for + // intermediate scroll updates. + function estimateCoords(cm, pos) { + var left = 0, pos = clipPos(cm.doc, pos); + if (!cm.options.lineWrapping) left = charWidth(cm.display) * pos.ch; + var lineObj = getLine(cm.doc, pos.line); + var top = heightAtLine(lineObj) + paddingTop(cm.display); + return {left: left, right: left, top: top, bottom: top + lineObj.height}; + } + + // Positions returned by coordsChar contain some extra information. + // xRel is the relative x position of the input coordinates compared + // to the found position (so xRel > 0 means the coordinates are to + // the right of the character position, for example). When outside + // is true, that means the coordinates lie outside the line's + // vertical range. + function PosWithInfo(line, ch, outside, xRel) { + var pos = Pos(line, ch); + pos.xRel = xRel; + if (outside) pos.outside = true; + return pos; + } + + // Compute the character position closest to the given coordinates. + // Input must be lineSpace-local ("div" coordinate system). + function coordsChar(cm, x, y) { + var doc = cm.doc; + y += cm.display.viewOffset; + if (y < 0) return PosWithInfo(doc.first, 0, true, -1); + var lineN = lineAtHeight(doc, y), last = doc.first + doc.size - 1; + if (lineN > last) + return PosWithInfo(doc.first + doc.size - 1, getLine(doc, last).text.length, true, 1); + if (x < 0) x = 0; + + var lineObj = getLine(doc, lineN); + for (;;) { + var found = coordsCharInner(cm, lineObj, lineN, x, y); + var merged = collapsedSpanAtEnd(lineObj); + var mergedPos = merged && merged.find(0, true); + if (merged && (found.ch > mergedPos.from.ch || found.ch == mergedPos.from.ch && found.xRel > 0)) + lineN = lineNo(lineObj = mergedPos.to.line); + else + return found; + } + } + + function coordsCharInner(cm, lineObj, lineNo, x, y) { + var innerOff = y - heightAtLine(lineObj); + var wrongLine = false, adjust = 2 * cm.display.wrapper.clientWidth; + var preparedMeasure = prepareMeasureForLine(cm, lineObj); + + function getX(ch) { + var sp = cursorCoords(cm, Pos(lineNo, ch), "line", lineObj, preparedMeasure); + wrongLine = true; + if (innerOff > sp.bottom) return sp.left - adjust; + else if (innerOff < sp.top) return sp.left + adjust; + else wrongLine = false; + return sp.left; + } + + var bidi = getOrder(lineObj), dist = lineObj.text.length; + var from = lineLeft(lineObj), to = lineRight(lineObj); + var fromX = getX(from), fromOutside = wrongLine, toX = getX(to), toOutside = wrongLine; + + if (x > toX) return PosWithInfo(lineNo, to, toOutside, 1); + // Do a binary search between these bounds. + for (;;) { + if (bidi ? to == from || to == moveVisually(lineObj, from, 1) : to - from <= 1) { + var ch = x < fromX || x - fromX <= toX - x ? from : to; + var xDiff = x - (ch == from ? fromX : toX); + while (isExtendingChar(lineObj.text.charAt(ch))) ++ch; + var pos = PosWithInfo(lineNo, ch, ch == from ? fromOutside : toOutside, + xDiff < -1 ? -1 : xDiff > 1 ? 1 : 0); + return pos; + } + var step = Math.ceil(dist / 2), middle = from + step; + if (bidi) { + middle = from; + for (var i = 0; i < step; ++i) middle = moveVisually(lineObj, middle, 1); + } + var middleX = getX(middle); + if (middleX > x) {to = middle; toX = middleX; if (toOutside = wrongLine) toX += 1000; dist = step;} + else {from = middle; fromX = middleX; fromOutside = wrongLine; dist -= step;} + } + } + + var measureText; + // Compute the default text height. + function textHeight(display) { + if (display.cachedTextHeight != null) return display.cachedTextHeight; + if (measureText == null) { + measureText = elt("pre"); + // Measure a bunch of lines, for browsers that compute + // fractional heights. + for (var i = 0; i < 49; ++i) { + measureText.appendChild(document.createTextNode("x")); + measureText.appendChild(elt("br")); + } + measureText.appendChild(document.createTextNode("x")); + } + removeChildrenAndAdd(display.measure, measureText); + var height = measureText.offsetHeight / 50; + if (height > 3) display.cachedTextHeight = height; + removeChildren(display.measure); + return height || 1; + } + + // Compute the default character width. + function charWidth(display) { + if (display.cachedCharWidth != null) return display.cachedCharWidth; + var anchor = elt("span", "xxxxxxxxxx"); + var pre = elt("pre", [anchor]); + removeChildrenAndAdd(display.measure, pre); + var rect = anchor.getBoundingClientRect(), width = (rect.right - rect.left) / 10; + if (width > 2) display.cachedCharWidth = width; + return width || 10; + } + + // OPERATIONS + + // Operations are used to wrap a series of changes to the editor + // state in such a way that each change won't have to update the + // cursor and display (which would be awkward, slow, and + // error-prone). Instead, display updates are batched and then all + // combined and executed at once. + + var operationGroup = null; + + var nextOpId = 0; + // Start a new operation. + function startOperation(cm) { + cm.curOp = { + cm: cm, + viewChanged: false, // Flag that indicates that lines might need to be redrawn + startHeight: cm.doc.height, // Used to detect need to update scrollbar + forceUpdate: false, // Used to force a redraw + updateInput: null, // Whether to reset the input textarea + typing: false, // Whether this reset should be careful to leave existing text (for compositing) + changeObjs: null, // Accumulated changes, for firing change events + cursorActivityHandlers: null, // Set of handlers to fire cursorActivity on + cursorActivityCalled: 0, // Tracks which cursorActivity handlers have been called already + selectionChanged: false, // Whether the selection needs to be redrawn + updateMaxLine: false, // Set when the widest line needs to be determined anew + scrollLeft: null, scrollTop: null, // Intermediate scroll position, not pushed to DOM yet + scrollToPos: null, // Used to scroll to a specific position + focus: false, + id: ++nextOpId // Unique ID + }; + if (operationGroup) { + operationGroup.ops.push(cm.curOp); + } else { + cm.curOp.ownsGroup = operationGroup = { + ops: [cm.curOp], + delayedCallbacks: [] + }; + } + } + + function fireCallbacksForOps(group) { + // Calls delayed callbacks and cursorActivity handlers until no + // new ones appear + var callbacks = group.delayedCallbacks, i = 0; + do { + for (; i < callbacks.length; i++) + callbacks[i].call(null); + for (var j = 0; j < group.ops.length; j++) { + var op = group.ops[j]; + if (op.cursorActivityHandlers) + while (op.cursorActivityCalled < op.cursorActivityHandlers.length) + op.cursorActivityHandlers[op.cursorActivityCalled++].call(null, op.cm); + } + } while (i < callbacks.length); + } + + // Finish an operation, updating the display and signalling delayed events + function endOperation(cm) { + var op = cm.curOp, group = op.ownsGroup; + if (!group) return; + + try { fireCallbacksForOps(group); } + finally { + operationGroup = null; + for (var i = 0; i < group.ops.length; i++) + group.ops[i].cm.curOp = null; + endOperations(group); + } + } + + // The DOM updates done when an operation finishes are batched so + // that the minimum number of relayouts are required. + function endOperations(group) { + var ops = group.ops; + for (var i = 0; i < ops.length; i++) // Read DOM + endOperation_R1(ops[i]); + for (var i = 0; i < ops.length; i++) // Write DOM (maybe) + endOperation_W1(ops[i]); + for (var i = 0; i < ops.length; i++) // Read DOM + endOperation_R2(ops[i]); + for (var i = 0; i < ops.length; i++) // Write DOM (maybe) + endOperation_W2(ops[i]); + for (var i = 0; i < ops.length; i++) // Read DOM + endOperation_finish(ops[i]); + } + + function endOperation_R1(op) { + var cm = op.cm, display = cm.display; + maybeClipScrollbars(cm); + if (op.updateMaxLine) findMaxLine(cm); + + op.mustUpdate = op.viewChanged || op.forceUpdate || op.scrollTop != null || + op.scrollToPos && (op.scrollToPos.from.line < display.viewFrom || + op.scrollToPos.to.line >= display.viewTo) || + display.maxLineChanged && cm.options.lineWrapping; + op.update = op.mustUpdate && + new DisplayUpdate(cm, op.mustUpdate && {top: op.scrollTop, ensure: op.scrollToPos}, op.forceUpdate); + } + + function endOperation_W1(op) { + op.updatedDisplay = op.mustUpdate && updateDisplayIfNeeded(op.cm, op.update); + } + + function endOperation_R2(op) { + var cm = op.cm, display = cm.display; + if (op.updatedDisplay) updateHeightsInViewport(cm); + + op.barMeasure = measureForScrollbars(cm); + + // If the max line changed since it was last measured, measure it, + // and ensure the document's width matches it. + // updateDisplay_W2 will use these properties to do the actual resizing + if (display.maxLineChanged && !cm.options.lineWrapping) { + op.adjustWidthTo = measureChar(cm, display.maxLine, display.maxLine.text.length).left + 3; + cm.display.sizerWidth = op.adjustWidthTo; + op.barMeasure.scrollWidth = + Math.max(display.scroller.clientWidth, display.sizer.offsetLeft + op.adjustWidthTo + scrollGap(cm) + cm.display.barWidth); + op.maxScrollLeft = Math.max(0, display.sizer.offsetLeft + op.adjustWidthTo - displayWidth(cm)); + } + + if (op.updatedDisplay || op.selectionChanged) + op.preparedSelection = display.input.prepareSelection(op.focus); + } + + function endOperation_W2(op) { + var cm = op.cm; + + if (op.adjustWidthTo != null) { + cm.display.sizer.style.minWidth = op.adjustWidthTo + "px"; + if (op.maxScrollLeft < cm.doc.scrollLeft) + setScrollLeft(cm, Math.min(cm.display.scroller.scrollLeft, op.maxScrollLeft), true); + cm.display.maxLineChanged = false; + } + + var takeFocus = op.focus && op.focus == activeElt() && (!document.hasFocus || document.hasFocus()) + if (op.preparedSelection) + cm.display.input.showSelection(op.preparedSelection, takeFocus); + if (op.updatedDisplay || op.startHeight != cm.doc.height) + updateScrollbars(cm, op.barMeasure); + if (op.updatedDisplay) + setDocumentHeight(cm, op.barMeasure); + + if (op.selectionChanged) restartBlink(cm); + + if (cm.state.focused && op.updateInput) + cm.display.input.reset(op.typing); + if (takeFocus) ensureFocus(op.cm); + } + + function endOperation_finish(op) { + var cm = op.cm, display = cm.display, doc = cm.doc; + + if (op.updatedDisplay) postUpdateDisplay(cm, op.update); + + // Abort mouse wheel delta measurement, when scrolling explicitly + if (display.wheelStartX != null && (op.scrollTop != null || op.scrollLeft != null || op.scrollToPos)) + display.wheelStartX = display.wheelStartY = null; + + // Propagate the scroll position to the actual DOM scroller + if (op.scrollTop != null && (display.scroller.scrollTop != op.scrollTop || op.forceScroll)) { + doc.scrollTop = Math.max(0, Math.min(display.scroller.scrollHeight - display.scroller.clientHeight, op.scrollTop)); + display.scrollbars.setScrollTop(doc.scrollTop); + display.scroller.scrollTop = doc.scrollTop; + } + if (op.scrollLeft != null && (display.scroller.scrollLeft != op.scrollLeft || op.forceScroll)) { + doc.scrollLeft = Math.max(0, Math.min(display.scroller.scrollWidth - display.scroller.clientWidth, op.scrollLeft)); + display.scrollbars.setScrollLeft(doc.scrollLeft); + display.scroller.scrollLeft = doc.scrollLeft; + alignHorizontally(cm); + } + // If we need to scroll a specific position into view, do so. + if (op.scrollToPos) { + var coords = scrollPosIntoView(cm, clipPos(doc, op.scrollToPos.from), + clipPos(doc, op.scrollToPos.to), op.scrollToPos.margin); + if (op.scrollToPos.isCursor && cm.state.focused) maybeScrollWindow(cm, coords); + } + + // Fire events for markers that are hidden/unidden by editing or + // undoing + var hidden = op.maybeHiddenMarkers, unhidden = op.maybeUnhiddenMarkers; + if (hidden) for (var i = 0; i < hidden.length; ++i) + if (!hidden[i].lines.length) signal(hidden[i], "hide"); + if (unhidden) for (var i = 0; i < unhidden.length; ++i) + if (unhidden[i].lines.length) signal(unhidden[i], "unhide"); + + if (display.wrapper.offsetHeight) + doc.scrollTop = cm.display.scroller.scrollTop; + + // Fire change events, and delayed event handlers + if (op.changeObjs) + signal(cm, "changes", cm, op.changeObjs); + if (op.update) + op.update.finish(); + } + + // Run the given function in an operation + function runInOp(cm, f) { + if (cm.curOp) return f(); + startOperation(cm); + try { return f(); } + finally { endOperation(cm); } + } + // Wraps a function in an operation. Returns the wrapped function. + function operation(cm, f) { + return function() { + if (cm.curOp) return f.apply(cm, arguments); + startOperation(cm); + try { return f.apply(cm, arguments); } + finally { endOperation(cm); } + }; + } + // Used to add methods to editor and doc instances, wrapping them in + // operations. + function methodOp(f) { + return function() { + if (this.curOp) return f.apply(this, arguments); + startOperation(this); + try { return f.apply(this, arguments); } + finally { endOperation(this); } + }; + } + function docMethodOp(f) { + return function() { + var cm = this.cm; + if (!cm || cm.curOp) return f.apply(this, arguments); + startOperation(cm); + try { return f.apply(this, arguments); } + finally { endOperation(cm); } + }; + } + + // VIEW TRACKING + + // These objects are used to represent the visible (currently drawn) + // part of the document. A LineView may correspond to multiple + // logical lines, if those are connected by collapsed ranges. + function LineView(doc, line, lineN) { + // The starting line + this.line = line; + // Continuing lines, if any + this.rest = visualLineContinued(line); + // Number of logical lines in this visual line + this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1; + this.node = this.text = null; + this.hidden = lineIsHidden(doc, line); + } + + // Create a range of LineView objects for the given lines. + function buildViewArray(cm, from, to) { + var array = [], nextPos; + for (var pos = from; pos < to; pos = nextPos) { + var view = new LineView(cm.doc, getLine(cm.doc, pos), pos); + nextPos = pos + view.size; + array.push(view); + } + return array; + } + + // Updates the display.view data structure for a given change to the + // document. From and to are in pre-change coordinates. Lendiff is + // the amount of lines added or subtracted by the change. This is + // used for changes that span multiple lines, or change the way + // lines are divided into visual lines. regLineChange (below) + // registers single-line changes. + function regChange(cm, from, to, lendiff) { + if (from == null) from = cm.doc.first; + if (to == null) to = cm.doc.first + cm.doc.size; + if (!lendiff) lendiff = 0; + + var display = cm.display; + if (lendiff && to < display.viewTo && + (display.updateLineNumbers == null || display.updateLineNumbers > from)) + display.updateLineNumbers = from; + + cm.curOp.viewChanged = true; + + if (from >= display.viewTo) { // Change after + if (sawCollapsedSpans && visualLineNo(cm.doc, from) < display.viewTo) + resetView(cm); + } else if (to <= display.viewFrom) { // Change before + if (sawCollapsedSpans && visualLineEndNo(cm.doc, to + lendiff) > display.viewFrom) { + resetView(cm); + } else { + display.viewFrom += lendiff; + display.viewTo += lendiff; + } + } else if (from <= display.viewFrom && to >= display.viewTo) { // Full overlap + resetView(cm); + } else if (from <= display.viewFrom) { // Top overlap + var cut = viewCuttingPoint(cm, to, to + lendiff, 1); + if (cut) { + display.view = display.view.slice(cut.index); + display.viewFrom = cut.lineN; + display.viewTo += lendiff; + } else { + resetView(cm); + } + } else if (to >= display.viewTo) { // Bottom overlap + var cut = viewCuttingPoint(cm, from, from, -1); + if (cut) { + display.view = display.view.slice(0, cut.index); + display.viewTo = cut.lineN; + } else { + resetView(cm); + } + } else { // Gap in the middle + var cutTop = viewCuttingPoint(cm, from, from, -1); + var cutBot = viewCuttingPoint(cm, to, to + lendiff, 1); + if (cutTop && cutBot) { + display.view = display.view.slice(0, cutTop.index) + .concat(buildViewArray(cm, cutTop.lineN, cutBot.lineN)) + .concat(display.view.slice(cutBot.index)); + display.viewTo += lendiff; + } else { + resetView(cm); + } + } + + var ext = display.externalMeasured; + if (ext) { + if (to < ext.lineN) + ext.lineN += lendiff; + else if (from < ext.lineN + ext.size) + display.externalMeasured = null; + } + } + + // Register a change to a single line. Type must be one of "text", + // "gutter", "class", "widget" + function regLineChange(cm, line, type) { + cm.curOp.viewChanged = true; + var display = cm.display, ext = cm.display.externalMeasured; + if (ext && line >= ext.lineN && line < ext.lineN + ext.size) + display.externalMeasured = null; + + if (line < display.viewFrom || line >= display.viewTo) return; + var lineView = display.view[findViewIndex(cm, line)]; + if (lineView.node == null) return; + var arr = lineView.changes || (lineView.changes = []); + if (indexOf(arr, type) == -1) arr.push(type); + } + + // Clear the view. + function resetView(cm) { + cm.display.viewFrom = cm.display.viewTo = cm.doc.first; + cm.display.view = []; + cm.display.viewOffset = 0; + } + + // Find the view element corresponding to a given line. Return null + // when the line isn't visible. + function findViewIndex(cm, n) { + if (n >= cm.display.viewTo) return null; + n -= cm.display.viewFrom; + if (n < 0) return null; + var view = cm.display.view; + for (var i = 0; i < view.length; i++) { + n -= view[i].size; + if (n < 0) return i; + } + } + + function viewCuttingPoint(cm, oldN, newN, dir) { + var index = findViewIndex(cm, oldN), diff, view = cm.display.view; + if (!sawCollapsedSpans || newN == cm.doc.first + cm.doc.size) + return {index: index, lineN: newN}; + for (var i = 0, n = cm.display.viewFrom; i < index; i++) + n += view[i].size; + if (n != oldN) { + if (dir > 0) { + if (index == view.length - 1) return null; + diff = (n + view[index].size) - oldN; + index++; + } else { + diff = n - oldN; + } + oldN += diff; newN += diff; + } + while (visualLineNo(cm.doc, newN) != newN) { + if (index == (dir < 0 ? 0 : view.length - 1)) return null; + newN += dir * view[index - (dir < 0 ? 1 : 0)].size; + index += dir; + } + return {index: index, lineN: newN}; + } + + // Force the view to cover a given range, adding empty view element + // or clipping off existing ones as needed. + function adjustView(cm, from, to) { + var display = cm.display, view = display.view; + if (view.length == 0 || from >= display.viewTo || to <= display.viewFrom) { + display.view = buildViewArray(cm, from, to); + display.viewFrom = from; + } else { + if (display.viewFrom > from) + display.view = buildViewArray(cm, from, display.viewFrom).concat(display.view); + else if (display.viewFrom < from) + display.view = display.view.slice(findViewIndex(cm, from)); + display.viewFrom = from; + if (display.viewTo < to) + display.view = display.view.concat(buildViewArray(cm, display.viewTo, to)); + else if (display.viewTo > to) + display.view = display.view.slice(0, findViewIndex(cm, to)); + } + display.viewTo = to; + } + + // Count the number of lines in the view whose DOM representation is + // out of date (or nonexistent). + function countDirtyView(cm) { + var view = cm.display.view, dirty = 0; + for (var i = 0; i < view.length; i++) { + var lineView = view[i]; + if (!lineView.hidden && (!lineView.node || lineView.changes)) ++dirty; + } + return dirty; + } + + // EVENT HANDLERS + + // Attach the necessary event handlers when initializing the editor + function registerEventHandlers(cm) { + var d = cm.display; + on(d.scroller, "mousedown", operation(cm, onMouseDown)); + // Older IE's will not fire a second mousedown for a double click + if (ie && ie_version < 11) + on(d.scroller, "dblclick", operation(cm, function(e) { + if (signalDOMEvent(cm, e)) return; + var pos = posFromMouse(cm, e); + if (!pos || clickInGutter(cm, e) || eventInWidget(cm.display, e)) return; + e_preventDefault(e); + var word = cm.findWordAt(pos); + extendSelection(cm.doc, word.anchor, word.head); + })); + else + on(d.scroller, "dblclick", function(e) { signalDOMEvent(cm, e) || e_preventDefault(e); }); + // Some browsers fire contextmenu *after* opening the menu, at + // which point we can't mess with it anymore. Context menu is + // handled in onMouseDown for these browsers. + if (!captureRightClick) on(d.scroller, "contextmenu", function(e) {onContextMenu(cm, e);}); + + // Used to suppress mouse event handling when a touch happens + var touchFinished, prevTouch = {end: 0}; + function finishTouch() { + if (d.activeTouch) { + touchFinished = setTimeout(function() {d.activeTouch = null;}, 1000); + prevTouch = d.activeTouch; + prevTouch.end = +new Date; + } + }; + function isMouseLikeTouchEvent(e) { + if (e.touches.length != 1) return false; + var touch = e.touches[0]; + return touch.radiusX <= 1 && touch.radiusY <= 1; + } + function farAway(touch, other) { + if (other.left == null) return true; + var dx = other.left - touch.left, dy = other.top - touch.top; + return dx * dx + dy * dy > 20 * 20; + } + on(d.scroller, "touchstart", function(e) { + if (!signalDOMEvent(cm, e) && !isMouseLikeTouchEvent(e)) { + clearTimeout(touchFinished); + var now = +new Date; + d.activeTouch = {start: now, moved: false, + prev: now - prevTouch.end <= 300 ? prevTouch : null}; + if (e.touches.length == 1) { + d.activeTouch.left = e.touches[0].pageX; + d.activeTouch.top = e.touches[0].pageY; + } + } + }); + on(d.scroller, "touchmove", function() { + if (d.activeTouch) d.activeTouch.moved = true; + }); + on(d.scroller, "touchend", function(e) { + var touch = d.activeTouch; + if (touch && !eventInWidget(d, e) && touch.left != null && + !touch.moved && new Date - touch.start < 300) { + var pos = cm.coordsChar(d.activeTouch, "page"), range; + if (!touch.prev || farAway(touch, touch.prev)) // Single tap + range = new Range(pos, pos); + else if (!touch.prev.prev || farAway(touch, touch.prev.prev)) // Double tap + range = cm.findWordAt(pos); + else // Triple tap + range = new Range(Pos(pos.line, 0), clipPos(cm.doc, Pos(pos.line + 1, 0))); + cm.setSelection(range.anchor, range.head); + cm.focus(); + e_preventDefault(e); + } + finishTouch(); + }); + on(d.scroller, "touchcancel", finishTouch); + + // Sync scrolling between fake scrollbars and real scrollable + // area, ensure viewport is updated when scrolling. + on(d.scroller, "scroll", function() { + if (d.scroller.clientHeight) { + setScrollTop(cm, d.scroller.scrollTop); + setScrollLeft(cm, d.scroller.scrollLeft, true); + signal(cm, "scroll", cm); + } + }); + + // Listen to wheel events in order to try and update the viewport on time. + on(d.scroller, "mousewheel", function(e){onScrollWheel(cm, e);}); + on(d.scroller, "DOMMouseScroll", function(e){onScrollWheel(cm, e);}); + + // Prevent wrapper from ever scrolling + on(d.wrapper, "scroll", function() { d.wrapper.scrollTop = d.wrapper.scrollLeft = 0; }); + + d.dragFunctions = { + enter: function(e) {if (!signalDOMEvent(cm, e)) e_stop(e);}, + over: function(e) {if (!signalDOMEvent(cm, e)) { onDragOver(cm, e); e_stop(e); }}, + start: function(e){onDragStart(cm, e);}, + drop: operation(cm, onDrop), + leave: function(e) {if (!signalDOMEvent(cm, e)) { clearDragCursor(cm); }} + }; + + var inp = d.input.getField(); + on(inp, "keyup", function(e) { onKeyUp.call(cm, e); }); + on(inp, "keydown", operation(cm, onKeyDown)); + on(inp, "keypress", operation(cm, onKeyPress)); + on(inp, "focus", bind(onFocus, cm)); + on(inp, "blur", bind(onBlur, cm)); + } + + function dragDropChanged(cm, value, old) { + var wasOn = old && old != CodeMirror.Init; + if (!value != !wasOn) { + var funcs = cm.display.dragFunctions; + var toggle = value ? on : off; + toggle(cm.display.scroller, "dragstart", funcs.start); + toggle(cm.display.scroller, "dragenter", funcs.enter); + toggle(cm.display.scroller, "dragover", funcs.over); + toggle(cm.display.scroller, "dragleave", funcs.leave); + toggle(cm.display.scroller, "drop", funcs.drop); + } + } + + // Called when the window resizes + function onResize(cm) { + var d = cm.display; + if (d.lastWrapHeight == d.wrapper.clientHeight && d.lastWrapWidth == d.wrapper.clientWidth) + return; + // Might be a text scaling operation, clear size caches. + d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null; + d.scrollbarsClipped = false; + cm.setSize(); + } + + // MOUSE EVENTS + + // Return true when the given mouse event happened in a widget + function eventInWidget(display, e) { + for (var n = e_target(e); n != display.wrapper; n = n.parentNode) { + if (!n || (n.nodeType == 1 && n.getAttribute("cm-ignore-events") == "true") || + (n.parentNode == display.sizer && n != display.mover)) + return true; + } + } + + // Given a mouse event, find the corresponding position. If liberal + // is false, it checks whether a gutter or scrollbar was clicked, + // and returns null if it was. forRect is used by rectangular + // selections, and tries to estimate a character position even for + // coordinates beyond the right of the text. + function posFromMouse(cm, e, liberal, forRect) { + var display = cm.display; + if (!liberal && e_target(e).getAttribute("cm-not-content") == "true") return null; + + var x, y, space = display.lineSpace.getBoundingClientRect(); + // Fails unpredictably on IE[67] when mouse is dragged around quickly. + try { x = e.clientX - space.left; y = e.clientY - space.top; } + catch (e) { return null; } + var coords = coordsChar(cm, x, y), line; + if (forRect && coords.xRel == 1 && (line = getLine(cm.doc, coords.line).text).length == coords.ch) { + var colDiff = countColumn(line, line.length, cm.options.tabSize) - line.length; + coords = Pos(coords.line, Math.max(0, Math.round((x - paddingH(cm.display).left) / charWidth(cm.display)) - colDiff)); + } + return coords; + } + + // A mouse down can be a single click, double click, triple click, + // start of selection drag, start of text drag, new cursor + // (ctrl-click), rectangle drag (alt-drag), or xwin + // middle-click-paste. Or it might be a click on something we should + // not interfere with, such as a scrollbar or widget. + function onMouseDown(e) { + var cm = this, display = cm.display; + if (signalDOMEvent(cm, e) || display.activeTouch && display.input.supportsTouch()) return; + display.shift = e.shiftKey; + + if (eventInWidget(display, e)) { + if (!webkit) { + // Briefly turn off draggability, to allow widgets to do + // normal dragging things. + display.scroller.draggable = false; + setTimeout(function(){display.scroller.draggable = true;}, 100); + } + return; + } + if (clickInGutter(cm, e)) return; + var start = posFromMouse(cm, e); + window.focus(); + + switch (e_button(e)) { + case 1: + // #3261: make sure, that we're not starting a second selection + if (cm.state.selectingText) + cm.state.selectingText(e); + else if (start) + leftButtonDown(cm, e, start); + else if (e_target(e) == display.scroller) + e_preventDefault(e); + break; + case 2: + if (webkit) cm.state.lastMiddleDown = +new Date; + if (start) extendSelection(cm.doc, start); + setTimeout(function() {display.input.focus();}, 20); + e_preventDefault(e); + break; + case 3: + if (captureRightClick) onContextMenu(cm, e); + else delayBlurEvent(cm); + break; + } + } + + var lastClick, lastDoubleClick; + function leftButtonDown(cm, e, start) { + if (ie) setTimeout(bind(ensureFocus, cm), 0); + else cm.curOp.focus = activeElt(); + + var now = +new Date, type; + if (lastDoubleClick && lastDoubleClick.time > now - 400 && cmp(lastDoubleClick.pos, start) == 0) { + type = "triple"; + } else if (lastClick && lastClick.time > now - 400 && cmp(lastClick.pos, start) == 0) { + type = "double"; + lastDoubleClick = {time: now, pos: start}; + } else { + type = "single"; + lastClick = {time: now, pos: start}; + } + + var sel = cm.doc.sel, modifier = mac ? e.metaKey : e.ctrlKey, contained; + if (cm.options.dragDrop && dragAndDrop && !cm.isReadOnly() && + type == "single" && (contained = sel.contains(start)) > -1 && + (cmp((contained = sel.ranges[contained]).from(), start) < 0 || start.xRel > 0) && + (cmp(contained.to(), start) > 0 || start.xRel < 0)) + leftButtonStartDrag(cm, e, start, modifier); + else + leftButtonSelect(cm, e, start, type, modifier); + } + + // Start a text drag. When it ends, see if any dragging actually + // happen, and treat as a click if it didn't. + function leftButtonStartDrag(cm, e, start, modifier) { + var display = cm.display, startTime = +new Date; + var dragEnd = operation(cm, function(e2) { + if (webkit) display.scroller.draggable = false; + cm.state.draggingText = false; + off(document, "mouseup", dragEnd); + off(display.scroller, "drop", dragEnd); + if (Math.abs(e.clientX - e2.clientX) + Math.abs(e.clientY - e2.clientY) < 10) { + e_preventDefault(e2); + if (!modifier && +new Date - 200 < startTime) + extendSelection(cm.doc, start); + // Work around unexplainable focus problem in IE9 (#2127) and Chrome (#3081) + if (webkit || ie && ie_version == 9) + setTimeout(function() {document.body.focus(); display.input.focus();}, 20); + else + display.input.focus(); + } + }); + // Let the drag handler handle this. + if (webkit) display.scroller.draggable = true; + cm.state.draggingText = dragEnd; + // IE's approach to draggable + if (display.scroller.dragDrop) display.scroller.dragDrop(); + on(document, "mouseup", dragEnd); + on(display.scroller, "drop", dragEnd); + } + + // Normal selection, as opposed to text dragging. + function leftButtonSelect(cm, e, start, type, addNew) { + var display = cm.display, doc = cm.doc; + e_preventDefault(e); + + var ourRange, ourIndex, startSel = doc.sel, ranges = startSel.ranges; + if (addNew && !e.shiftKey) { + ourIndex = doc.sel.contains(start); + if (ourIndex > -1) + ourRange = ranges[ourIndex]; + else + ourRange = new Range(start, start); + } else { + ourRange = doc.sel.primary(); + ourIndex = doc.sel.primIndex; + } + + if (chromeOS ? e.shiftKey && e.metaKey : e.altKey) { + type = "rect"; + if (!addNew) ourRange = new Range(start, start); + start = posFromMouse(cm, e, true, true); + ourIndex = -1; + } else if (type == "double") { + var word = cm.findWordAt(start); + if (cm.display.shift || doc.extend) + ourRange = extendRange(doc, ourRange, word.anchor, word.head); + else + ourRange = word; + } else if (type == "triple") { + var line = new Range(Pos(start.line, 0), clipPos(doc, Pos(start.line + 1, 0))); + if (cm.display.shift || doc.extend) + ourRange = extendRange(doc, ourRange, line.anchor, line.head); + else + ourRange = line; + } else { + ourRange = extendRange(doc, ourRange, start); + } + + if (!addNew) { + ourIndex = 0; + setSelection(doc, new Selection([ourRange], 0), sel_mouse); + startSel = doc.sel; + } else if (ourIndex == -1) { + ourIndex = ranges.length; + setSelection(doc, normalizeSelection(ranges.concat([ourRange]), ourIndex), + {scroll: false, origin: "*mouse"}); + } else if (ranges.length > 1 && ranges[ourIndex].empty() && type == "single" && !e.shiftKey) { + setSelection(doc, normalizeSelection(ranges.slice(0, ourIndex).concat(ranges.slice(ourIndex + 1)), 0), + {scroll: false, origin: "*mouse"}); + startSel = doc.sel; + } else { + replaceOneSelection(doc, ourIndex, ourRange, sel_mouse); + } + + var lastPos = start; + function extendTo(pos) { + if (cmp(lastPos, pos) == 0) return; + lastPos = pos; + + if (type == "rect") { + var ranges = [], tabSize = cm.options.tabSize; + var startCol = countColumn(getLine(doc, start.line).text, start.ch, tabSize); + var posCol = countColumn(getLine(doc, pos.line).text, pos.ch, tabSize); + var left = Math.min(startCol, posCol), right = Math.max(startCol, posCol); + for (var line = Math.min(start.line, pos.line), end = Math.min(cm.lastLine(), Math.max(start.line, pos.line)); + line <= end; line++) { + var text = getLine(doc, line).text, leftPos = findColumn(text, left, tabSize); + if (left == right) + ranges.push(new Range(Pos(line, leftPos), Pos(line, leftPos))); + else if (text.length > leftPos) + ranges.push(new Range(Pos(line, leftPos), Pos(line, findColumn(text, right, tabSize)))); + } + if (!ranges.length) ranges.push(new Range(start, start)); + setSelection(doc, normalizeSelection(startSel.ranges.slice(0, ourIndex).concat(ranges), ourIndex), + {origin: "*mouse", scroll: false}); + cm.scrollIntoView(pos); + } else { + var oldRange = ourRange; + var anchor = oldRange.anchor, head = pos; + if (type != "single") { + if (type == "double") + var range = cm.findWordAt(pos); + else + var range = new Range(Pos(pos.line, 0), clipPos(doc, Pos(pos.line + 1, 0))); + if (cmp(range.anchor, anchor) > 0) { + head = range.head; + anchor = minPos(oldRange.from(), range.anchor); + } else { + head = range.anchor; + anchor = maxPos(oldRange.to(), range.head); + } + } + var ranges = startSel.ranges.slice(0); + ranges[ourIndex] = new Range(clipPos(doc, anchor), head); + setSelection(doc, normalizeSelection(ranges, ourIndex), sel_mouse); + } + } + + var editorSize = display.wrapper.getBoundingClientRect(); + // Used to ensure timeout re-tries don't fire when another extend + // happened in the meantime (clearTimeout isn't reliable -- at + // least on Chrome, the timeouts still happen even when cleared, + // if the clear happens after their scheduled firing time). + var counter = 0; + + function extend(e) { + var curCount = ++counter; + var cur = posFromMouse(cm, e, true, type == "rect"); + if (!cur) return; + if (cmp(cur, lastPos) != 0) { + cm.curOp.focus = activeElt(); + extendTo(cur); + var visible = visibleLines(display, doc); + if (cur.line >= visible.to || cur.line < visible.from) + setTimeout(operation(cm, function(){if (counter == curCount) extend(e);}), 150); + } else { + var outside = e.clientY < editorSize.top ? -20 : e.clientY > editorSize.bottom ? 20 : 0; + if (outside) setTimeout(operation(cm, function() { + if (counter != curCount) return; + display.scroller.scrollTop += outside; + extend(e); + }), 50); + } + } + + function done(e) { + cm.state.selectingText = false; + counter = Infinity; + e_preventDefault(e); + display.input.focus(); + off(document, "mousemove", move); + off(document, "mouseup", up); + doc.history.lastSelOrigin = null; + } + + var move = operation(cm, function(e) { + if (!e_button(e)) done(e); + else extend(e); + }); + var up = operation(cm, done); + cm.state.selectingText = up; + on(document, "mousemove", move); + on(document, "mouseup", up); + } + + // Determines whether an event happened in the gutter, and fires the + // handlers for the corresponding event. + function gutterEvent(cm, e, type, prevent) { + try { var mX = e.clientX, mY = e.clientY; } + catch(e) { return false; } + if (mX >= Math.floor(cm.display.gutters.getBoundingClientRect().right)) return false; + if (prevent) e_preventDefault(e); + + var display = cm.display; + var lineBox = display.lineDiv.getBoundingClientRect(); + + if (mY > lineBox.bottom || !hasHandler(cm, type)) return e_defaultPrevented(e); + mY -= lineBox.top - display.viewOffset; + + for (var i = 0; i < cm.options.gutters.length; ++i) { + var g = display.gutters.childNodes[i]; + if (g && g.getBoundingClientRect().right >= mX) { + var line = lineAtHeight(cm.doc, mY); + var gutter = cm.options.gutters[i]; + signal(cm, type, cm, line, gutter, e); + return e_defaultPrevented(e); + } + } + } + + function clickInGutter(cm, e) { + return gutterEvent(cm, e, "gutterClick", true); + } + + // Kludge to work around strange IE behavior where it'll sometimes + // re-fire a series of drag-related events right after the drop (#1551) + var lastDrop = 0; + + function onDrop(e) { + var cm = this; + clearDragCursor(cm); + if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e)) + return; + e_preventDefault(e); + if (ie) lastDrop = +new Date; + var pos = posFromMouse(cm, e, true), files = e.dataTransfer.files; + if (!pos || cm.isReadOnly()) return; + // Might be a file drop, in which case we simply extract the text + // and insert it. + if (files && files.length && window.FileReader && window.File) { + var n = files.length, text = Array(n), read = 0; + var loadFile = function(file, i) { + if (cm.options.allowDropFileTypes && + indexOf(cm.options.allowDropFileTypes, file.type) == -1) + return; + + var reader = new FileReader; + reader.onload = operation(cm, function() { + var content = reader.result; + if (/[\x00-\x08\x0e-\x1f]{2}/.test(content)) content = ""; + text[i] = content; + if (++read == n) { + pos = clipPos(cm.doc, pos); + var change = {from: pos, to: pos, + text: cm.doc.splitLines(text.join(cm.doc.lineSeparator())), + origin: "paste"}; + makeChange(cm.doc, change); + setSelectionReplaceHistory(cm.doc, simpleSelection(pos, changeEnd(change))); + } + }); + reader.readAsText(file); + }; + for (var i = 0; i < n; ++i) loadFile(files[i], i); + } else { // Normal drop + // Don't do a replace if the drop happened inside of the selected text. + if (cm.state.draggingText && cm.doc.sel.contains(pos) > -1) { + cm.state.draggingText(e); + // Ensure the editor is re-focused + setTimeout(function() {cm.display.input.focus();}, 20); + return; + } + try { + var text = e.dataTransfer.getData("Text"); + if (text) { + if (cm.state.draggingText && !(mac ? e.altKey : e.ctrlKey)) + var selected = cm.listSelections(); + setSelectionNoUndo(cm.doc, simpleSelection(pos, pos)); + if (selected) for (var i = 0; i < selected.length; ++i) + replaceRange(cm.doc, "", selected[i].anchor, selected[i].head, "drag"); + cm.replaceSelection(text, "around", "paste"); + cm.display.input.focus(); + } + } + catch(e){} + } + } + + function onDragStart(cm, e) { + if (ie && (!cm.state.draggingText || +new Date - lastDrop < 100)) { e_stop(e); return; } + if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e)) return; + + e.dataTransfer.setData("Text", cm.getSelection()); + e.dataTransfer.effectAllowed = "copyMove" + + // Use dummy image instead of default browsers image. + // Recent Safari (~6.0.2) have a tendency to segfault when this happens, so we don't do it there. + if (e.dataTransfer.setDragImage && !safari) { + var img = elt("img", null, null, "position: fixed; left: 0; top: 0;"); + img.src = "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="; + if (presto) { + img.width = img.height = 1; + cm.display.wrapper.appendChild(img); + // Force a relayout, or Opera won't use our image for some obscure reason + img._top = img.offsetTop; + } + e.dataTransfer.setDragImage(img, 0, 0); + if (presto) img.parentNode.removeChild(img); + } + } + + function onDragOver(cm, e) { + var pos = posFromMouse(cm, e); + if (!pos) return; + var frag = document.createDocumentFragment(); + drawSelectionCursor(cm, pos, frag); + if (!cm.display.dragCursor) { + cm.display.dragCursor = elt("div", null, "CodeMirror-cursors CodeMirror-dragcursors"); + cm.display.lineSpace.insertBefore(cm.display.dragCursor, cm.display.cursorDiv); + } + removeChildrenAndAdd(cm.display.dragCursor, frag); + } + + function clearDragCursor(cm) { + if (cm.display.dragCursor) { + cm.display.lineSpace.removeChild(cm.display.dragCursor); + cm.display.dragCursor = null; + } + } + + // SCROLL EVENTS + + // Sync the scrollable area and scrollbars, ensure the viewport + // covers the visible area. + function setScrollTop(cm, val) { + if (Math.abs(cm.doc.scrollTop - val) < 2) return; + cm.doc.scrollTop = val; + if (!gecko) updateDisplaySimple(cm, {top: val}); + if (cm.display.scroller.scrollTop != val) cm.display.scroller.scrollTop = val; + cm.display.scrollbars.setScrollTop(val); + if (gecko) updateDisplaySimple(cm); + startWorker(cm, 100); + } + // Sync scroller and scrollbar, ensure the gutter elements are + // aligned. + function setScrollLeft(cm, val, isScroller) { + if (isScroller ? val == cm.doc.scrollLeft : Math.abs(cm.doc.scrollLeft - val) < 2) return; + val = Math.min(val, cm.display.scroller.scrollWidth - cm.display.scroller.clientWidth); + cm.doc.scrollLeft = val; + alignHorizontally(cm); + if (cm.display.scroller.scrollLeft != val) cm.display.scroller.scrollLeft = val; + cm.display.scrollbars.setScrollLeft(val); + } + + // Since the delta values reported on mouse wheel events are + // unstandardized between browsers and even browser versions, and + // generally horribly unpredictable, this code starts by measuring + // the scroll effect that the first few mouse wheel events have, + // and, from that, detects the way it can convert deltas to pixel + // offsets afterwards. + // + // The reason we want to know the amount a wheel event will scroll + // is that it gives us a chance to update the display before the + // actual scrolling happens, reducing flickering. + + var wheelSamples = 0, wheelPixelsPerUnit = null; + // Fill in a browser-detected starting value on browsers where we + // know one. These don't have to be accurate -- the result of them + // being wrong would just be a slight flicker on the first wheel + // scroll (if it is large enough). + if (ie) wheelPixelsPerUnit = -.53; + else if (gecko) wheelPixelsPerUnit = 15; + else if (chrome) wheelPixelsPerUnit = -.7; + else if (safari) wheelPixelsPerUnit = -1/3; + + var wheelEventDelta = function(e) { + var dx = e.wheelDeltaX, dy = e.wheelDeltaY; + if (dx == null && e.detail && e.axis == e.HORIZONTAL_AXIS) dx = e.detail; + if (dy == null && e.detail && e.axis == e.VERTICAL_AXIS) dy = e.detail; + else if (dy == null) dy = e.wheelDelta; + return {x: dx, y: dy}; + }; + CodeMirror.wheelEventPixels = function(e) { + var delta = wheelEventDelta(e); + delta.x *= wheelPixelsPerUnit; + delta.y *= wheelPixelsPerUnit; + return delta; + }; + + function onScrollWheel(cm, e) { + var delta = wheelEventDelta(e), dx = delta.x, dy = delta.y; + + var display = cm.display, scroll = display.scroller; + // Quit if there's nothing to scroll here + var canScrollX = scroll.scrollWidth > scroll.clientWidth; + var canScrollY = scroll.scrollHeight > scroll.clientHeight; + if (!(dx && canScrollX || dy && canScrollY)) return; + + // Webkit browsers on OS X abort momentum scrolls when the target + // of the scroll event is removed from the scrollable element. + // This hack (see related code in patchDisplay) makes sure the + // element is kept around. + if (dy && mac && webkit) { + outer: for (var cur = e.target, view = display.view; cur != scroll; cur = cur.parentNode) { + for (var i = 0; i < view.length; i++) { + if (view[i].node == cur) { + cm.display.currentWheelTarget = cur; + break outer; + } + } + } + } + + // On some browsers, horizontal scrolling will cause redraws to + // happen before the gutter has been realigned, causing it to + // wriggle around in a most unseemly way. When we have an + // estimated pixels/delta value, we just handle horizontal + // scrolling entirely here. It'll be slightly off from native, but + // better than glitching out. + if (dx && !gecko && !presto && wheelPixelsPerUnit != null) { + if (dy && canScrollY) + setScrollTop(cm, Math.max(0, Math.min(scroll.scrollTop + dy * wheelPixelsPerUnit, scroll.scrollHeight - scroll.clientHeight))); + setScrollLeft(cm, Math.max(0, Math.min(scroll.scrollLeft + dx * wheelPixelsPerUnit, scroll.scrollWidth - scroll.clientWidth))); + // Only prevent default scrolling if vertical scrolling is + // actually possible. Otherwise, it causes vertical scroll + // jitter on OSX trackpads when deltaX is small and deltaY + // is large (issue #3579) + if (!dy || (dy && canScrollY)) + e_preventDefault(e); + display.wheelStartX = null; // Abort measurement, if in progress + return; + } + + // 'Project' the visible viewport to cover the area that is being + // scrolled into view (if we know enough to estimate it). + if (dy && wheelPixelsPerUnit != null) { + var pixels = dy * wheelPixelsPerUnit; + var top = cm.doc.scrollTop, bot = top + display.wrapper.clientHeight; + if (pixels < 0) top = Math.max(0, top + pixels - 50); + else bot = Math.min(cm.doc.height, bot + pixels + 50); + updateDisplaySimple(cm, {top: top, bottom: bot}); + } + + if (wheelSamples < 20) { + if (display.wheelStartX == null) { + display.wheelStartX = scroll.scrollLeft; display.wheelStartY = scroll.scrollTop; + display.wheelDX = dx; display.wheelDY = dy; + setTimeout(function() { + if (display.wheelStartX == null) return; + var movedX = scroll.scrollLeft - display.wheelStartX; + var movedY = scroll.scrollTop - display.wheelStartY; + var sample = (movedY && display.wheelDY && movedY / display.wheelDY) || + (movedX && display.wheelDX && movedX / display.wheelDX); + display.wheelStartX = display.wheelStartY = null; + if (!sample) return; + wheelPixelsPerUnit = (wheelPixelsPerUnit * wheelSamples + sample) / (wheelSamples + 1); + ++wheelSamples; + }, 200); + } else { + display.wheelDX += dx; display.wheelDY += dy; + } + } + } + + // KEY EVENTS + + // Run a handler that was bound to a key. + function doHandleBinding(cm, bound, dropShift) { + if (typeof bound == "string") { + bound = commands[bound]; + if (!bound) return false; + } + // Ensure previous input has been read, so that the handler sees a + // consistent view of the document + cm.display.input.ensurePolled(); + var prevShift = cm.display.shift, done = false; + try { + if (cm.isReadOnly()) cm.state.suppressEdits = true; + if (dropShift) cm.display.shift = false; + done = bound(cm) != Pass; + } finally { + cm.display.shift = prevShift; + cm.state.suppressEdits = false; + } + return done; + } + + function lookupKeyForEditor(cm, name, handle) { + for (var i = 0; i < cm.state.keyMaps.length; i++) { + var result = lookupKey(name, cm.state.keyMaps[i], handle, cm); + if (result) return result; + } + return (cm.options.extraKeys && lookupKey(name, cm.options.extraKeys, handle, cm)) + || lookupKey(name, cm.options.keyMap, handle, cm); + } + + var stopSeq = new Delayed; + function dispatchKey(cm, name, e, handle) { + var seq = cm.state.keySeq; + if (seq) { + if (isModifierKey(name)) return "handled"; + stopSeq.set(50, function() { + if (cm.state.keySeq == seq) { + cm.state.keySeq = null; + cm.display.input.reset(); + } + }); + name = seq + " " + name; + } + var result = lookupKeyForEditor(cm, name, handle); + + if (result == "multi") + cm.state.keySeq = name; + if (result == "handled") + signalLater(cm, "keyHandled", cm, name, e); + + if (result == "handled" || result == "multi") { + e_preventDefault(e); + restartBlink(cm); + } + + if (seq && !result && /\'$/.test(name)) { + e_preventDefault(e); + return true; + } + return !!result; + } + + // Handle a key from the keydown event. + function handleKeyBinding(cm, e) { + var name = keyName(e, true); + if (!name) return false; + + if (e.shiftKey && !cm.state.keySeq) { + // First try to resolve full name (including 'Shift-'). Failing + // that, see if there is a cursor-motion command (starting with + // 'go') bound to the keyname without 'Shift-'. + return dispatchKey(cm, "Shift-" + name, e, function(b) {return doHandleBinding(cm, b, true);}) + || dispatchKey(cm, name, e, function(b) { + if (typeof b == "string" ? /^go[A-Z]/.test(b) : b.motion) + return doHandleBinding(cm, b); + }); + } else { + return dispatchKey(cm, name, e, function(b) { return doHandleBinding(cm, b); }); + } + } + + // Handle a key from the keypress event + function handleCharBinding(cm, e, ch) { + return dispatchKey(cm, "'" + ch + "'", e, + function(b) { return doHandleBinding(cm, b, true); }); + } + + var lastStoppedKey = null; + function onKeyDown(e) { + var cm = this; + cm.curOp.focus = activeElt(); + if (signalDOMEvent(cm, e)) return; + // IE does strange things with escape. + if (ie && ie_version < 11 && e.keyCode == 27) e.returnValue = false; + var code = e.keyCode; + cm.display.shift = code == 16 || e.shiftKey; + var handled = handleKeyBinding(cm, e); + if (presto) { + lastStoppedKey = handled ? code : null; + // Opera has no cut event... we try to at least catch the key combo + if (!handled && code == 88 && !hasCopyEvent && (mac ? e.metaKey : e.ctrlKey)) + cm.replaceSelection("", null, "cut"); + } + + // Turn mouse into crosshair when Alt is held on Mac. + if (code == 18 && !/\bCodeMirror-crosshair\b/.test(cm.display.lineDiv.className)) + showCrossHair(cm); + } + + function showCrossHair(cm) { + var lineDiv = cm.display.lineDiv; + addClass(lineDiv, "CodeMirror-crosshair"); + + function up(e) { + if (e.keyCode == 18 || !e.altKey) { + rmClass(lineDiv, "CodeMirror-crosshair"); + off(document, "keyup", up); + off(document, "mouseover", up); + } + } + on(document, "keyup", up); + on(document, "mouseover", up); + } + + function onKeyUp(e) { + if (e.keyCode == 16) this.doc.sel.shift = false; + signalDOMEvent(this, e); + } + + function onKeyPress(e) { + var cm = this; + if (eventInWidget(cm.display, e) || signalDOMEvent(cm, e) || e.ctrlKey && !e.altKey || mac && e.metaKey) return; + var keyCode = e.keyCode, charCode = e.charCode; + if (presto && keyCode == lastStoppedKey) {lastStoppedKey = null; e_preventDefault(e); return;} + if ((presto && (!e.which || e.which < 10)) && handleKeyBinding(cm, e)) return; + var ch = String.fromCharCode(charCode == null ? keyCode : charCode); + if (handleCharBinding(cm, e, ch)) return; + cm.display.input.onKeyPress(e); + } + + // FOCUS/BLUR EVENTS + + function delayBlurEvent(cm) { + cm.state.delayingBlurEvent = true; + setTimeout(function() { + if (cm.state.delayingBlurEvent) { + cm.state.delayingBlurEvent = false; + onBlur(cm); + } + }, 100); + } + + function onFocus(cm) { + if (cm.state.delayingBlurEvent) cm.state.delayingBlurEvent = false; + + if (cm.options.readOnly == "nocursor") return; + if (!cm.state.focused) { + signal(cm, "focus", cm); + cm.state.focused = true; + addClass(cm.display.wrapper, "CodeMirror-focused"); + // This test prevents this from firing when a context + // menu is closed (since the input reset would kill the + // select-all detection hack) + if (!cm.curOp && cm.display.selForContextMenu != cm.doc.sel) { + cm.display.input.reset(); + if (webkit) setTimeout(function() { cm.display.input.reset(true); }, 20); // Issue #1730 + } + cm.display.input.receivedFocus(); + } + restartBlink(cm); + } + function onBlur(cm) { + if (cm.state.delayingBlurEvent) return; + + if (cm.state.focused) { + signal(cm, "blur", cm); + cm.state.focused = false; + rmClass(cm.display.wrapper, "CodeMirror-focused"); + } + clearInterval(cm.display.blinker); + setTimeout(function() {if (!cm.state.focused) cm.display.shift = false;}, 150); + } + + // CONTEXT MENU HANDLING + + // To make the context menu work, we need to briefly unhide the + // textarea (making it as unobtrusive as possible) to let the + // right-click take effect on it. + function onContextMenu(cm, e) { + if (eventInWidget(cm.display, e) || contextMenuInGutter(cm, e)) return; + if (signalDOMEvent(cm, e, "contextmenu")) return; + cm.display.input.onContextMenu(e); + } + + function contextMenuInGutter(cm, e) { + if (!hasHandler(cm, "gutterContextMenu")) return false; + return gutterEvent(cm, e, "gutterContextMenu", false); + } + + // UPDATING + + // Compute the position of the end of a change (its 'to' property + // refers to the pre-change end). + var changeEnd = CodeMirror.changeEnd = function(change) { + if (!change.text) return change.to; + return Pos(change.from.line + change.text.length - 1, + lst(change.text).length + (change.text.length == 1 ? change.from.ch : 0)); + }; + + // Adjust a position to refer to the post-change position of the + // same text, or the end of the change if the change covers it. + function adjustForChange(pos, change) { + if (cmp(pos, change.from) < 0) return pos; + if (cmp(pos, change.to) <= 0) return changeEnd(change); + + var line = pos.line + change.text.length - (change.to.line - change.from.line) - 1, ch = pos.ch; + if (pos.line == change.to.line) ch += changeEnd(change).ch - change.to.ch; + return Pos(line, ch); + } + + function computeSelAfterChange(doc, change) { + var out = []; + for (var i = 0; i < doc.sel.ranges.length; i++) { + var range = doc.sel.ranges[i]; + out.push(new Range(adjustForChange(range.anchor, change), + adjustForChange(range.head, change))); + } + return normalizeSelection(out, doc.sel.primIndex); + } + + function offsetPos(pos, old, nw) { + if (pos.line == old.line) + return Pos(nw.line, pos.ch - old.ch + nw.ch); + else + return Pos(nw.line + (pos.line - old.line), pos.ch); + } + + // Used by replaceSelections to allow moving the selection to the + // start or around the replaced test. Hint may be "start" or "around". + function computeReplacedSel(doc, changes, hint) { + var out = []; + var oldPrev = Pos(doc.first, 0), newPrev = oldPrev; + for (var i = 0; i < changes.length; i++) { + var change = changes[i]; + var from = offsetPos(change.from, oldPrev, newPrev); + var to = offsetPos(changeEnd(change), oldPrev, newPrev); + oldPrev = change.to; + newPrev = to; + if (hint == "around") { + var range = doc.sel.ranges[i], inv = cmp(range.head, range.anchor) < 0; + out[i] = new Range(inv ? to : from, inv ? from : to); + } else { + out[i] = new Range(from, from); + } + } + return new Selection(out, doc.sel.primIndex); + } + + // Allow "beforeChange" event handlers to influence a change + function filterChange(doc, change, update) { + var obj = { + canceled: false, + from: change.from, + to: change.to, + text: change.text, + origin: change.origin, + cancel: function() { this.canceled = true; } + }; + if (update) obj.update = function(from, to, text, origin) { + if (from) this.from = clipPos(doc, from); + if (to) this.to = clipPos(doc, to); + if (text) this.text = text; + if (origin !== undefined) this.origin = origin; + }; + signal(doc, "beforeChange", doc, obj); + if (doc.cm) signal(doc.cm, "beforeChange", doc.cm, obj); + + if (obj.canceled) return null; + return {from: obj.from, to: obj.to, text: obj.text, origin: obj.origin}; + } + + // Apply a change to a document, and add it to the document's + // history, and propagating it to all linked documents. + function makeChange(doc, change, ignoreReadOnly) { + if (doc.cm) { + if (!doc.cm.curOp) return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly); + if (doc.cm.state.suppressEdits) return; + } + + if (hasHandler(doc, "beforeChange") || doc.cm && hasHandler(doc.cm, "beforeChange")) { + change = filterChange(doc, change, true); + if (!change) return; + } + + // Possibly split or suppress the update based on the presence + // of read-only spans in its range. + var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to); + if (split) { + for (var i = split.length - 1; i >= 0; --i) + makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [""] : change.text}); + } else { + makeChangeInner(doc, change); + } + } + + function makeChangeInner(doc, change) { + if (change.text.length == 1 && change.text[0] == "" && cmp(change.from, change.to) == 0) return; + var selAfter = computeSelAfterChange(doc, change); + addChangeToHistory(doc, change, selAfter, doc.cm ? doc.cm.curOp.id : NaN); + + makeChangeSingleDoc(doc, change, selAfter, stretchSpansOverChange(doc, change)); + var rebased = []; + + linkedDocs(doc, function(doc, sharedHist) { + if (!sharedHist && indexOf(rebased, doc.history) == -1) { + rebaseHist(doc.history, change); + rebased.push(doc.history); + } + makeChangeSingleDoc(doc, change, null, stretchSpansOverChange(doc, change)); + }); + } + + // Revert a change stored in a document's history. + function makeChangeFromHistory(doc, type, allowSelectionOnly) { + if (doc.cm && doc.cm.state.suppressEdits) return; + + var hist = doc.history, event, selAfter = doc.sel; + var source = type == "undo" ? hist.done : hist.undone, dest = type == "undo" ? hist.undone : hist.done; + + // Verify that there is a useable event (so that ctrl-z won't + // needlessly clear selection events) + for (var i = 0; i < source.length; i++) { + event = source[i]; + if (allowSelectionOnly ? event.ranges && !event.equals(doc.sel) : !event.ranges) + break; + } + if (i == source.length) return; + hist.lastOrigin = hist.lastSelOrigin = null; + + for (;;) { + event = source.pop(); + if (event.ranges) { + pushSelectionToHistory(event, dest); + if (allowSelectionOnly && !event.equals(doc.sel)) { + setSelection(doc, event, {clearRedo: false}); + return; + } + selAfter = event; + } + else break; + } + + // Build up a reverse change object to add to the opposite history + // stack (redo when undoing, and vice versa). + var antiChanges = []; + pushSelectionToHistory(selAfter, dest); + dest.push({changes: antiChanges, generation: hist.generation}); + hist.generation = event.generation || ++hist.maxGeneration; + + var filter = hasHandler(doc, "beforeChange") || doc.cm && hasHandler(doc.cm, "beforeChange"); + + for (var i = event.changes.length - 1; i >= 0; --i) { + var change = event.changes[i]; + change.origin = type; + if (filter && !filterChange(doc, change, false)) { + source.length = 0; + return; + } + + antiChanges.push(historyChangeFromChange(doc, change)); + + var after = i ? computeSelAfterChange(doc, change) : lst(source); + makeChangeSingleDoc(doc, change, after, mergeOldSpans(doc, change)); + if (!i && doc.cm) doc.cm.scrollIntoView({from: change.from, to: changeEnd(change)}); + var rebased = []; + + // Propagate to the linked documents + linkedDocs(doc, function(doc, sharedHist) { + if (!sharedHist && indexOf(rebased, doc.history) == -1) { + rebaseHist(doc.history, change); + rebased.push(doc.history); + } + makeChangeSingleDoc(doc, change, null, mergeOldSpans(doc, change)); + }); + } + } + + // Sub-views need their line numbers shifted when text is added + // above or below them in the parent document. + function shiftDoc(doc, distance) { + if (distance == 0) return; + doc.first += distance; + doc.sel = new Selection(map(doc.sel.ranges, function(range) { + return new Range(Pos(range.anchor.line + distance, range.anchor.ch), + Pos(range.head.line + distance, range.head.ch)); + }), doc.sel.primIndex); + if (doc.cm) { + regChange(doc.cm, doc.first, doc.first - distance, distance); + for (var d = doc.cm.display, l = d.viewFrom; l < d.viewTo; l++) + regLineChange(doc.cm, l, "gutter"); + } + } + + // More lower-level change function, handling only a single document + // (not linked ones). + function makeChangeSingleDoc(doc, change, selAfter, spans) { + if (doc.cm && !doc.cm.curOp) + return operation(doc.cm, makeChangeSingleDoc)(doc, change, selAfter, spans); + + if (change.to.line < doc.first) { + shiftDoc(doc, change.text.length - 1 - (change.to.line - change.from.line)); + return; + } + if (change.from.line > doc.lastLine()) return; + + // Clip the change to the size of this doc + if (change.from.line < doc.first) { + var shift = change.text.length - 1 - (doc.first - change.from.line); + shiftDoc(doc, shift); + change = {from: Pos(doc.first, 0), to: Pos(change.to.line + shift, change.to.ch), + text: [lst(change.text)], origin: change.origin}; + } + var last = doc.lastLine(); + if (change.to.line > last) { + change = {from: change.from, to: Pos(last, getLine(doc, last).text.length), + text: [change.text[0]], origin: change.origin}; + } + + change.removed = getBetween(doc, change.from, change.to); + + if (!selAfter) selAfter = computeSelAfterChange(doc, change); + if (doc.cm) makeChangeSingleDocInEditor(doc.cm, change, spans); + else updateDoc(doc, change, spans); + setSelectionNoUndo(doc, selAfter, sel_dontScroll); + } + + // Handle the interaction of a change to a document with the editor + // that this document is part of. + function makeChangeSingleDocInEditor(cm, change, spans) { + var doc = cm.doc, display = cm.display, from = change.from, to = change.to; + + var recomputeMaxLength = false, checkWidthStart = from.line; + if (!cm.options.lineWrapping) { + checkWidthStart = lineNo(visualLine(getLine(doc, from.line))); + doc.iter(checkWidthStart, to.line + 1, function(line) { + if (line == display.maxLine) { + recomputeMaxLength = true; + return true; + } + }); + } + + if (doc.sel.contains(change.from, change.to) > -1) + signalCursorActivity(cm); + + updateDoc(doc, change, spans, estimateHeight(cm)); + + if (!cm.options.lineWrapping) { + doc.iter(checkWidthStart, from.line + change.text.length, function(line) { + var len = lineLength(line); + if (len > display.maxLineLength) { + display.maxLine = line; + display.maxLineLength = len; + display.maxLineChanged = true; + recomputeMaxLength = false; + } + }); + if (recomputeMaxLength) cm.curOp.updateMaxLine = true; + } + + // Adjust frontier, schedule worker + doc.frontier = Math.min(doc.frontier, from.line); + startWorker(cm, 400); + + var lendiff = change.text.length - (to.line - from.line) - 1; + // Remember that these lines changed, for updating the display + if (change.full) + regChange(cm); + else if (from.line == to.line && change.text.length == 1 && !isWholeLineUpdate(cm.doc, change)) + regLineChange(cm, from.line, "text"); + else + regChange(cm, from.line, to.line + 1, lendiff); + + var changesHandler = hasHandler(cm, "changes"), changeHandler = hasHandler(cm, "change"); + if (changeHandler || changesHandler) { + var obj = { + from: from, to: to, + text: change.text, + removed: change.removed, + origin: change.origin + }; + if (changeHandler) signalLater(cm, "change", cm, obj); + if (changesHandler) (cm.curOp.changeObjs || (cm.curOp.changeObjs = [])).push(obj); + } + cm.display.selForContextMenu = null; + } + + function replaceRange(doc, code, from, to, origin) { + if (!to) to = from; + if (cmp(to, from) < 0) { var tmp = to; to = from; from = tmp; } + if (typeof code == "string") code = doc.splitLines(code); + makeChange(doc, {from: from, to: to, text: code, origin: origin}); + } + + // SCROLLING THINGS INTO VIEW + + // If an editor sits on the top or bottom of the window, partially + // scrolled out of view, this ensures that the cursor is visible. + function maybeScrollWindow(cm, coords) { + if (signalDOMEvent(cm, "scrollCursorIntoView")) return; + + var display = cm.display, box = display.sizer.getBoundingClientRect(), doScroll = null; + if (coords.top + box.top < 0) doScroll = true; + else if (coords.bottom + box.top > (window.innerHeight || document.documentElement.clientHeight)) doScroll = false; + if (doScroll != null && !phantom) { + var scrollNode = elt("div", "\u200b", null, "position: absolute; top: " + + (coords.top - display.viewOffset - paddingTop(cm.display)) + "px; height: " + + (coords.bottom - coords.top + scrollGap(cm) + display.barHeight) + "px; left: " + + coords.left + "px; width: 2px;"); + cm.display.lineSpace.appendChild(scrollNode); + scrollNode.scrollIntoView(doScroll); + cm.display.lineSpace.removeChild(scrollNode); + } + } + + // Scroll a given position into view (immediately), verifying that + // it actually became visible (as line heights are accurately + // measured, the position of something may 'drift' during drawing). + function scrollPosIntoView(cm, pos, end, margin) { + if (margin == null) margin = 0; + for (var limit = 0; limit < 5; limit++) { + var changed = false, coords = cursorCoords(cm, pos); + var endCoords = !end || end == pos ? coords : cursorCoords(cm, end); + var scrollPos = calculateScrollPos(cm, Math.min(coords.left, endCoords.left), + Math.min(coords.top, endCoords.top) - margin, + Math.max(coords.left, endCoords.left), + Math.max(coords.bottom, endCoords.bottom) + margin); + var startTop = cm.doc.scrollTop, startLeft = cm.doc.scrollLeft; + if (scrollPos.scrollTop != null) { + setScrollTop(cm, scrollPos.scrollTop); + if (Math.abs(cm.doc.scrollTop - startTop) > 1) changed = true; + } + if (scrollPos.scrollLeft != null) { + setScrollLeft(cm, scrollPos.scrollLeft); + if (Math.abs(cm.doc.scrollLeft - startLeft) > 1) changed = true; + } + if (!changed) break; + } + return coords; + } + + // Scroll a given set of coordinates into view (immediately). + function scrollIntoView(cm, x1, y1, x2, y2) { + var scrollPos = calculateScrollPos(cm, x1, y1, x2, y2); + if (scrollPos.scrollTop != null) setScrollTop(cm, scrollPos.scrollTop); + if (scrollPos.scrollLeft != null) setScrollLeft(cm, scrollPos.scrollLeft); + } + + // Calculate a new scroll position needed to scroll the given + // rectangle into view. Returns an object with scrollTop and + // scrollLeft properties. When these are undefined, the + // vertical/horizontal position does not need to be adjusted. + function calculateScrollPos(cm, x1, y1, x2, y2) { + var display = cm.display, snapMargin = textHeight(cm.display); + if (y1 < 0) y1 = 0; + var screentop = cm.curOp && cm.curOp.scrollTop != null ? cm.curOp.scrollTop : display.scroller.scrollTop; + var screen = displayHeight(cm), result = {}; + if (y2 - y1 > screen) y2 = y1 + screen; + var docBottom = cm.doc.height + paddingVert(display); + var atTop = y1 < snapMargin, atBottom = y2 > docBottom - snapMargin; + if (y1 < screentop) { + result.scrollTop = atTop ? 0 : y1; + } else if (y2 > screentop + screen) { + var newTop = Math.min(y1, (atBottom ? docBottom : y2) - screen); + if (newTop != screentop) result.scrollTop = newTop; + } + + var screenleft = cm.curOp && cm.curOp.scrollLeft != null ? cm.curOp.scrollLeft : display.scroller.scrollLeft; + var screenw = displayWidth(cm) - (cm.options.fixedGutter ? display.gutters.offsetWidth : 0); + var tooWide = x2 - x1 > screenw; + if (tooWide) x2 = x1 + screenw; + if (x1 < 10) + result.scrollLeft = 0; + else if (x1 < screenleft) + result.scrollLeft = Math.max(0, x1 - (tooWide ? 0 : 10)); + else if (x2 > screenw + screenleft - 3) + result.scrollLeft = x2 + (tooWide ? 0 : 10) - screenw; + return result; + } + + // Store a relative adjustment to the scroll position in the current + // operation (to be applied when the operation finishes). + function addToScrollPos(cm, left, top) { + if (left != null || top != null) resolveScrollToPos(cm); + if (left != null) + cm.curOp.scrollLeft = (cm.curOp.scrollLeft == null ? cm.doc.scrollLeft : cm.curOp.scrollLeft) + left; + if (top != null) + cm.curOp.scrollTop = (cm.curOp.scrollTop == null ? cm.doc.scrollTop : cm.curOp.scrollTop) + top; + } + + // Make sure that at the end of the operation the current cursor is + // shown. + function ensureCursorVisible(cm) { + resolveScrollToPos(cm); + var cur = cm.getCursor(), from = cur, to = cur; + if (!cm.options.lineWrapping) { + from = cur.ch ? Pos(cur.line, cur.ch - 1) : cur; + to = Pos(cur.line, cur.ch + 1); + } + cm.curOp.scrollToPos = {from: from, to: to, margin: cm.options.cursorScrollMargin, isCursor: true}; + } + + // When an operation has its scrollToPos property set, and another + // scroll action is applied before the end of the operation, this + // 'simulates' scrolling that position into view in a cheap way, so + // that the effect of intermediate scroll commands is not ignored. + function resolveScrollToPos(cm) { + var range = cm.curOp.scrollToPos; + if (range) { + cm.curOp.scrollToPos = null; + var from = estimateCoords(cm, range.from), to = estimateCoords(cm, range.to); + var sPos = calculateScrollPos(cm, Math.min(from.left, to.left), + Math.min(from.top, to.top) - range.margin, + Math.max(from.right, to.right), + Math.max(from.bottom, to.bottom) + range.margin); + cm.scrollTo(sPos.scrollLeft, sPos.scrollTop); + } + } + + // API UTILITIES + + // Indent the given line. The how parameter can be "smart", + // "add"/null, "subtract", or "prev". When aggressive is false + // (typically set to true for forced single-line indents), empty + // lines are not indented, and places where the mode returns Pass + // are left alone. + function indentLine(cm, n, how, aggressive) { + var doc = cm.doc, state; + if (how == null) how = "add"; + if (how == "smart") { + // Fall back to "prev" when the mode doesn't have an indentation + // method. + if (!doc.mode.indent) how = "prev"; + else state = getStateBefore(cm, n); + } + + var tabSize = cm.options.tabSize; + var line = getLine(doc, n), curSpace = countColumn(line.text, null, tabSize); + if (line.stateAfter) line.stateAfter = null; + var curSpaceString = line.text.match(/^\s*/)[0], indentation; + if (!aggressive && !/\S/.test(line.text)) { + indentation = 0; + how = "not"; + } else if (how == "smart") { + indentation = doc.mode.indent(state, line.text.slice(curSpaceString.length), line.text); + if (indentation == Pass || indentation > 150) { + if (!aggressive) return; + how = "prev"; + } + } + if (how == "prev") { + if (n > doc.first) indentation = countColumn(getLine(doc, n-1).text, null, tabSize); + else indentation = 0; + } else if (how == "add") { + indentation = curSpace + cm.options.indentUnit; + } else if (how == "subtract") { + indentation = curSpace - cm.options.indentUnit; + } else if (typeof how == "number") { + indentation = curSpace + how; + } + indentation = Math.max(0, indentation); + + var indentString = "", pos = 0; + if (cm.options.indentWithTabs) + for (var i = Math.floor(indentation / tabSize); i; --i) {pos += tabSize; indentString += "\t";} + if (pos < indentation) indentString += spaceStr(indentation - pos); + + if (indentString != curSpaceString) { + replaceRange(doc, indentString, Pos(n, 0), Pos(n, curSpaceString.length), "+input"); + line.stateAfter = null; + return true; + } else { + // Ensure that, if the cursor was in the whitespace at the start + // of the line, it is moved to the end of that space. + for (var i = 0; i < doc.sel.ranges.length; i++) { + var range = doc.sel.ranges[i]; + if (range.head.line == n && range.head.ch < curSpaceString.length) { + var pos = Pos(n, curSpaceString.length); + replaceOneSelection(doc, i, new Range(pos, pos)); + break; + } + } + } + } + + // Utility for applying a change to a line by handle or number, + // returning the number and optionally registering the line as + // changed. + function changeLine(doc, handle, changeType, op) { + var no = handle, line = handle; + if (typeof handle == "number") line = getLine(doc, clipLine(doc, handle)); + else no = lineNo(handle); + if (no == null) return null; + if (op(line, no) && doc.cm) regLineChange(doc.cm, no, changeType); + return line; + } + + // Helper for deleting text near the selection(s), used to implement + // backspace, delete, and similar functionality. + function deleteNearSelection(cm, compute) { + var ranges = cm.doc.sel.ranges, kill = []; + // Build up a set of ranges to kill first, merging overlapping + // ranges. + for (var i = 0; i < ranges.length; i++) { + var toKill = compute(ranges[i]); + while (kill.length && cmp(toKill.from, lst(kill).to) <= 0) { + var replaced = kill.pop(); + if (cmp(replaced.from, toKill.from) < 0) { + toKill.from = replaced.from; + break; + } + } + kill.push(toKill); + } + // Next, remove those actual ranges. + runInOp(cm, function() { + for (var i = kill.length - 1; i >= 0; i--) + replaceRange(cm.doc, "", kill[i].from, kill[i].to, "+delete"); + ensureCursorVisible(cm); + }); + } + + // Used for horizontal relative motion. Dir is -1 or 1 (left or + // right), unit can be "char", "column" (like char, but doesn't + // cross line boundaries), "word" (across next word), or "group" (to + // the start of next group of word or non-word-non-whitespace + // chars). The visually param controls whether, in right-to-left + // text, direction 1 means to move towards the next index in the + // string, or towards the character to the right of the current + // position. The resulting position will have a hitSide=true + // property if it reached the end of the document. + function findPosH(doc, pos, dir, unit, visually) { + var line = pos.line, ch = pos.ch, origDir = dir; + var lineObj = getLine(doc, line); + function findNextLine() { + var l = line + dir; + if (l < doc.first || l >= doc.first + doc.size) return false + line = l; + return lineObj = getLine(doc, l); + } + function moveOnce(boundToLine) { + var next = (visually ? moveVisually : moveLogically)(lineObj, ch, dir, true); + if (next == null) { + if (!boundToLine && findNextLine()) { + if (visually) ch = (dir < 0 ? lineRight : lineLeft)(lineObj); + else ch = dir < 0 ? lineObj.text.length : 0; + } else return false + } else ch = next; + return true; + } + + if (unit == "char") { + moveOnce() + } else if (unit == "column") { + moveOnce(true) + } else if (unit == "word" || unit == "group") { + var sawType = null, group = unit == "group"; + var helper = doc.cm && doc.cm.getHelper(pos, "wordChars"); + for (var first = true;; first = false) { + if (dir < 0 && !moveOnce(!first)) break; + var cur = lineObj.text.charAt(ch) || "\n"; + var type = isWordChar(cur, helper) ? "w" + : group && cur == "\n" ? "n" + : !group || /\s/.test(cur) ? null + : "p"; + if (group && !first && !type) type = "s"; + if (sawType && sawType != type) { + if (dir < 0) {dir = 1; moveOnce();} + break; + } + + if (type) sawType = type; + if (dir > 0 && !moveOnce(!first)) break; + } + } + var result = skipAtomic(doc, Pos(line, ch), pos, origDir, true); + if (!cmp(pos, result)) result.hitSide = true; + return result; + } + + // For relative vertical movement. Dir may be -1 or 1. Unit can be + // "page" or "line". The resulting position will have a hitSide=true + // property if it reached the end of the document. + function findPosV(cm, pos, dir, unit) { + var doc = cm.doc, x = pos.left, y; + if (unit == "page") { + var pageSize = Math.min(cm.display.wrapper.clientHeight, window.innerHeight || document.documentElement.clientHeight); + y = pos.top + dir * (pageSize - (dir < 0 ? 1.5 : .5) * textHeight(cm.display)); + } else if (unit == "line") { + y = dir > 0 ? pos.bottom + 3 : pos.top - 3; + } + for (;;) { + var target = coordsChar(cm, x, y); + if (!target.outside) break; + if (dir < 0 ? y <= 0 : y >= doc.height) { target.hitSide = true; break; } + y += dir * 5; + } + return target; + } + + // EDITOR METHODS + + // The publicly visible API. Note that methodOp(f) means + // 'wrap f in an operation, performed on its `this` parameter'. + + // This is not the complete set of editor methods. Most of the + // methods defined on the Doc type are also injected into + // CodeMirror.prototype, for backwards compatibility and + // convenience. + + CodeMirror.prototype = { + constructor: CodeMirror, + focus: function(){window.focus(); this.display.input.focus();}, + + setOption: function(option, value) { + var options = this.options, old = options[option]; + if (options[option] == value && option != "mode") return; + options[option] = value; + if (optionHandlers.hasOwnProperty(option)) + operation(this, optionHandlers[option])(this, value, old); + }, + + getOption: function(option) {return this.options[option];}, + getDoc: function() {return this.doc;}, + + addKeyMap: function(map, bottom) { + this.state.keyMaps[bottom ? "push" : "unshift"](getKeyMap(map)); + }, + removeKeyMap: function(map) { + var maps = this.state.keyMaps; + for (var i = 0; i < maps.length; ++i) + if (maps[i] == map || maps[i].name == map) { + maps.splice(i, 1); + return true; + } + }, + + addOverlay: methodOp(function(spec, options) { + var mode = spec.token ? spec : CodeMirror.getMode(this.options, spec); + if (mode.startState) throw new Error("Overlays may not be stateful."); + this.state.overlays.push({mode: mode, modeSpec: spec, opaque: options && options.opaque}); + this.state.modeGen++; + regChange(this); + }), + removeOverlay: methodOp(function(spec) { + var overlays = this.state.overlays; + for (var i = 0; i < overlays.length; ++i) { + var cur = overlays[i].modeSpec; + if (cur == spec || typeof spec == "string" && cur.name == spec) { + overlays.splice(i, 1); + this.state.modeGen++; + regChange(this); + return; + } + } + }), + + indentLine: methodOp(function(n, dir, aggressive) { + if (typeof dir != "string" && typeof dir != "number") { + if (dir == null) dir = this.options.smartIndent ? "smart" : "prev"; + else dir = dir ? "add" : "subtract"; + } + if (isLine(this.doc, n)) indentLine(this, n, dir, aggressive); + }), + indentSelection: methodOp(function(how) { + var ranges = this.doc.sel.ranges, end = -1; + for (var i = 0; i < ranges.length; i++) { + var range = ranges[i]; + if (!range.empty()) { + var from = range.from(), to = range.to(); + var start = Math.max(end, from.line); + end = Math.min(this.lastLine(), to.line - (to.ch ? 0 : 1)) + 1; + for (var j = start; j < end; ++j) + indentLine(this, j, how); + var newRanges = this.doc.sel.ranges; + if (from.ch == 0 && ranges.length == newRanges.length && newRanges[i].from().ch > 0) + replaceOneSelection(this.doc, i, new Range(from, newRanges[i].to()), sel_dontScroll); + } else if (range.head.line > end) { + indentLine(this, range.head.line, how, true); + end = range.head.line; + if (i == this.doc.sel.primIndex) ensureCursorVisible(this); + } + } + }), + + // Fetch the parser token for a given character. Useful for hacks + // that want to inspect the mode state (say, for completion). + getTokenAt: function(pos, precise) { + return takeToken(this, pos, precise); + }, + + getLineTokens: function(line, precise) { + return takeToken(this, Pos(line), precise, true); + }, + + getTokenTypeAt: function(pos) { + pos = clipPos(this.doc, pos); + var styles = getLineStyles(this, getLine(this.doc, pos.line)); + var before = 0, after = (styles.length - 1) / 2, ch = pos.ch; + var type; + if (ch == 0) type = styles[2]; + else for (;;) { + var mid = (before + after) >> 1; + if ((mid ? styles[mid * 2 - 1] : 0) >= ch) after = mid; + else if (styles[mid * 2 + 1] < ch) before = mid + 1; + else { type = styles[mid * 2 + 2]; break; } + } + var cut = type ? type.indexOf("cm-overlay ") : -1; + return cut < 0 ? type : cut == 0 ? null : type.slice(0, cut - 1); + }, + + getModeAt: function(pos) { + var mode = this.doc.mode; + if (!mode.innerMode) return mode; + return CodeMirror.innerMode(mode, this.getTokenAt(pos).state).mode; + }, + + getHelper: function(pos, type) { + return this.getHelpers(pos, type)[0]; + }, + + getHelpers: function(pos, type) { + var found = []; + if (!helpers.hasOwnProperty(type)) return found; + var help = helpers[type], mode = this.getModeAt(pos); + if (typeof mode[type] == "string") { + if (help[mode[type]]) found.push(help[mode[type]]); + } else if (mode[type]) { + for (var i = 0; i < mode[type].length; i++) { + var val = help[mode[type][i]]; + if (val) found.push(val); + } + } else if (mode.helperType && help[mode.helperType]) { + found.push(help[mode.helperType]); + } else if (help[mode.name]) { + found.push(help[mode.name]); + } + for (var i = 0; i < help._global.length; i++) { + var cur = help._global[i]; + if (cur.pred(mode, this) && indexOf(found, cur.val) == -1) + found.push(cur.val); + } + return found; + }, + + getStateAfter: function(line, precise) { + var doc = this.doc; + line = clipLine(doc, line == null ? doc.first + doc.size - 1: line); + return getStateBefore(this, line + 1, precise); + }, + + cursorCoords: function(start, mode) { + var pos, range = this.doc.sel.primary(); + if (start == null) pos = range.head; + else if (typeof start == "object") pos = clipPos(this.doc, start); + else pos = start ? range.from() : range.to(); + return cursorCoords(this, pos, mode || "page"); + }, + + charCoords: function(pos, mode) { + return charCoords(this, clipPos(this.doc, pos), mode || "page"); + }, + + coordsChar: function(coords, mode) { + coords = fromCoordSystem(this, coords, mode || "page"); + return coordsChar(this, coords.left, coords.top); + }, + + lineAtHeight: function(height, mode) { + height = fromCoordSystem(this, {top: height, left: 0}, mode || "page").top; + return lineAtHeight(this.doc, height + this.display.viewOffset); + }, + heightAtLine: function(line, mode) { + var end = false, lineObj; + if (typeof line == "number") { + var last = this.doc.first + this.doc.size - 1; + if (line < this.doc.first) line = this.doc.first; + else if (line > last) { line = last; end = true; } + lineObj = getLine(this.doc, line); + } else { + lineObj = line; + } + return intoCoordSystem(this, lineObj, {top: 0, left: 0}, mode || "page").top + + (end ? this.doc.height - heightAtLine(lineObj) : 0); + }, + + defaultTextHeight: function() { return textHeight(this.display); }, + defaultCharWidth: function() { return charWidth(this.display); }, + + setGutterMarker: methodOp(function(line, gutterID, value) { + return changeLine(this.doc, line, "gutter", function(line) { + var markers = line.gutterMarkers || (line.gutterMarkers = {}); + markers[gutterID] = value; + if (!value && isEmpty(markers)) line.gutterMarkers = null; + return true; + }); + }), + + clearGutter: methodOp(function(gutterID) { + var cm = this, doc = cm.doc, i = doc.first; + doc.iter(function(line) { + if (line.gutterMarkers && line.gutterMarkers[gutterID]) { + line.gutterMarkers[gutterID] = null; + regLineChange(cm, i, "gutter"); + if (isEmpty(line.gutterMarkers)) line.gutterMarkers = null; + } + ++i; + }); + }), + + lineInfo: function(line) { + if (typeof line == "number") { + if (!isLine(this.doc, line)) return null; + var n = line; + line = getLine(this.doc, line); + if (!line) return null; + } else { + var n = lineNo(line); + if (n == null) return null; + } + return {line: n, handle: line, text: line.text, gutterMarkers: line.gutterMarkers, + textClass: line.textClass, bgClass: line.bgClass, wrapClass: line.wrapClass, + widgets: line.widgets}; + }, + + getViewport: function() { return {from: this.display.viewFrom, to: this.display.viewTo};}, + + addWidget: function(pos, node, scroll, vert, horiz) { + var display = this.display; + pos = cursorCoords(this, clipPos(this.doc, pos)); + var top = pos.bottom, left = pos.left; + node.style.position = "absolute"; + node.setAttribute("cm-ignore-events", "true"); + this.display.input.setUneditable(node); + display.sizer.appendChild(node); + if (vert == "over") { + top = pos.top; + } else if (vert == "above" || vert == "near") { + var vspace = Math.max(display.wrapper.clientHeight, this.doc.height), + hspace = Math.max(display.sizer.clientWidth, display.lineSpace.clientWidth); + // Default to positioning above (if specified and possible); otherwise default to positioning below + if ((vert == 'above' || pos.bottom + node.offsetHeight > vspace) && pos.top > node.offsetHeight) + top = pos.top - node.offsetHeight; + else if (pos.bottom + node.offsetHeight <= vspace) + top = pos.bottom; + if (left + node.offsetWidth > hspace) + left = hspace - node.offsetWidth; + } + node.style.top = top + "px"; + node.style.left = node.style.right = ""; + if (horiz == "right") { + left = display.sizer.clientWidth - node.offsetWidth; + node.style.right = "0px"; + } else { + if (horiz == "left") left = 0; + else if (horiz == "middle") left = (display.sizer.clientWidth - node.offsetWidth) / 2; + node.style.left = left + "px"; + } + if (scroll) + scrollIntoView(this, left, top, left + node.offsetWidth, top + node.offsetHeight); + }, + + triggerOnKeyDown: methodOp(onKeyDown), + triggerOnKeyPress: methodOp(onKeyPress), + triggerOnKeyUp: onKeyUp, + + execCommand: function(cmd) { + if (commands.hasOwnProperty(cmd)) + return commands[cmd].call(null, this); + }, + + triggerElectric: methodOp(function(text) { triggerElectric(this, text); }), + + findPosH: function(from, amount, unit, visually) { + var dir = 1; + if (amount < 0) { dir = -1; amount = -amount; } + for (var i = 0, cur = clipPos(this.doc, from); i < amount; ++i) { + cur = findPosH(this.doc, cur, dir, unit, visually); + if (cur.hitSide) break; + } + return cur; + }, + + moveH: methodOp(function(dir, unit) { + var cm = this; + cm.extendSelectionsBy(function(range) { + if (cm.display.shift || cm.doc.extend || range.empty()) + return findPosH(cm.doc, range.head, dir, unit, cm.options.rtlMoveVisually); + else + return dir < 0 ? range.from() : range.to(); + }, sel_move); + }), + + deleteH: methodOp(function(dir, unit) { + var sel = this.doc.sel, doc = this.doc; + if (sel.somethingSelected()) + doc.replaceSelection("", null, "+delete"); + else + deleteNearSelection(this, function(range) { + var other = findPosH(doc, range.head, dir, unit, false); + return dir < 0 ? {from: other, to: range.head} : {from: range.head, to: other}; + }); + }), + + findPosV: function(from, amount, unit, goalColumn) { + var dir = 1, x = goalColumn; + if (amount < 0) { dir = -1; amount = -amount; } + for (var i = 0, cur = clipPos(this.doc, from); i < amount; ++i) { + var coords = cursorCoords(this, cur, "div"); + if (x == null) x = coords.left; + else coords.left = x; + cur = findPosV(this, coords, dir, unit); + if (cur.hitSide) break; + } + return cur; + }, + + moveV: methodOp(function(dir, unit) { + var cm = this, doc = this.doc, goals = []; + var collapse = !cm.display.shift && !doc.extend && doc.sel.somethingSelected(); + doc.extendSelectionsBy(function(range) { + if (collapse) + return dir < 0 ? range.from() : range.to(); + var headPos = cursorCoords(cm, range.head, "div"); + if (range.goalColumn != null) headPos.left = range.goalColumn; + goals.push(headPos.left); + var pos = findPosV(cm, headPos, dir, unit); + if (unit == "page" && range == doc.sel.primary()) + addToScrollPos(cm, null, charCoords(cm, pos, "div").top - headPos.top); + return pos; + }, sel_move); + if (goals.length) for (var i = 0; i < doc.sel.ranges.length; i++) + doc.sel.ranges[i].goalColumn = goals[i]; + }), + + // Find the word at the given position (as returned by coordsChar). + findWordAt: function(pos) { + var doc = this.doc, line = getLine(doc, pos.line).text; + var start = pos.ch, end = pos.ch; + if (line) { + var helper = this.getHelper(pos, "wordChars"); + if ((pos.xRel < 0 || end == line.length) && start) --start; else ++end; + var startChar = line.charAt(start); + var check = isWordChar(startChar, helper) + ? function(ch) { return isWordChar(ch, helper); } + : /\s/.test(startChar) ? function(ch) {return /\s/.test(ch);} + : function(ch) {return !/\s/.test(ch) && !isWordChar(ch);}; + while (start > 0 && check(line.charAt(start - 1))) --start; + while (end < line.length && check(line.charAt(end))) ++end; + } + return new Range(Pos(pos.line, start), Pos(pos.line, end)); + }, + + toggleOverwrite: function(value) { + if (value != null && value == this.state.overwrite) return; + if (this.state.overwrite = !this.state.overwrite) + addClass(this.display.cursorDiv, "CodeMirror-overwrite"); + else + rmClass(this.display.cursorDiv, "CodeMirror-overwrite"); + + signal(this, "overwriteToggle", this, this.state.overwrite); + }, + hasFocus: function() { return this.display.input.getField() == activeElt(); }, + isReadOnly: function() { return !!(this.options.readOnly || this.doc.cantEdit); }, + + scrollTo: methodOp(function(x, y) { + if (x != null || y != null) resolveScrollToPos(this); + if (x != null) this.curOp.scrollLeft = x; + if (y != null) this.curOp.scrollTop = y; + }), + getScrollInfo: function() { + var scroller = this.display.scroller; + return {left: scroller.scrollLeft, top: scroller.scrollTop, + height: scroller.scrollHeight - scrollGap(this) - this.display.barHeight, + width: scroller.scrollWidth - scrollGap(this) - this.display.barWidth, + clientHeight: displayHeight(this), clientWidth: displayWidth(this)}; + }, + + scrollIntoView: methodOp(function(range, margin) { + if (range == null) { + range = {from: this.doc.sel.primary().head, to: null}; + if (margin == null) margin = this.options.cursorScrollMargin; + } else if (typeof range == "number") { + range = {from: Pos(range, 0), to: null}; + } else if (range.from == null) { + range = {from: range, to: null}; + } + if (!range.to) range.to = range.from; + range.margin = margin || 0; + + if (range.from.line != null) { + resolveScrollToPos(this); + this.curOp.scrollToPos = range; + } else { + var sPos = calculateScrollPos(this, Math.min(range.from.left, range.to.left), + Math.min(range.from.top, range.to.top) - range.margin, + Math.max(range.from.right, range.to.right), + Math.max(range.from.bottom, range.to.bottom) + range.margin); + this.scrollTo(sPos.scrollLeft, sPos.scrollTop); + } + }), + + setSize: methodOp(function(width, height) { + var cm = this; + function interpret(val) { + return typeof val == "number" || /^\d+$/.test(String(val)) ? val + "px" : val; + } + if (width != null) cm.display.wrapper.style.width = interpret(width); + if (height != null) cm.display.wrapper.style.height = interpret(height); + if (cm.options.lineWrapping) clearLineMeasurementCache(this); + var lineNo = cm.display.viewFrom; + cm.doc.iter(lineNo, cm.display.viewTo, function(line) { + if (line.widgets) for (var i = 0; i < line.widgets.length; i++) + if (line.widgets[i].noHScroll) { regLineChange(cm, lineNo, "widget"); break; } + ++lineNo; + }); + cm.curOp.forceUpdate = true; + signal(cm, "refresh", this); + }), + + operation: function(f){return runInOp(this, f);}, + + refresh: methodOp(function() { + var oldHeight = this.display.cachedTextHeight; + regChange(this); + this.curOp.forceUpdate = true; + clearCaches(this); + this.scrollTo(this.doc.scrollLeft, this.doc.scrollTop); + updateGutterSpace(this); + if (oldHeight == null || Math.abs(oldHeight - textHeight(this.display)) > .5) + estimateLineHeights(this); + signal(this, "refresh", this); + }), + + swapDoc: methodOp(function(doc) { + var old = this.doc; + old.cm = null; + attachDoc(this, doc); + clearCaches(this); + this.display.input.reset(); + this.scrollTo(doc.scrollLeft, doc.scrollTop); + this.curOp.forceScroll = true; + signalLater(this, "swapDoc", this, old); + return old; + }), + + getInputField: function(){return this.display.input.getField();}, + getWrapperElement: function(){return this.display.wrapper;}, + getScrollerElement: function(){return this.display.scroller;}, + getGutterElement: function(){return this.display.gutters;} + }; + eventMixin(CodeMirror); + + // OPTION DEFAULTS + + // The default configuration options. + var defaults = CodeMirror.defaults = {}; + // Functions to run when options are changed. + var optionHandlers = CodeMirror.optionHandlers = {}; + + function option(name, deflt, handle, notOnInit) { + CodeMirror.defaults[name] = deflt; + if (handle) optionHandlers[name] = + notOnInit ? function(cm, val, old) {if (old != Init) handle(cm, val, old);} : handle; + } + + // Passed to option handlers when there is no old value. + var Init = CodeMirror.Init = {toString: function(){return "CodeMirror.Init";}}; + + // These two are, on init, called from the constructor because they + // have to be initialized before the editor can start at all. + option("value", "", function(cm, val) { + cm.setValue(val); + }, true); + option("mode", null, function(cm, val) { + cm.doc.modeOption = val; + loadMode(cm); + }, true); + + option("indentUnit", 2, loadMode, true); + option("indentWithTabs", false); + option("smartIndent", true); + option("tabSize", 4, function(cm) { + resetModeState(cm); + clearCaches(cm); + regChange(cm); + }, true); + option("lineSeparator", null, function(cm, val) { + cm.doc.lineSep = val; + if (!val) return; + var newBreaks = [], lineNo = cm.doc.first; + cm.doc.iter(function(line) { + for (var pos = 0;;) { + var found = line.text.indexOf(val, pos); + if (found == -1) break; + pos = found + val.length; + newBreaks.push(Pos(lineNo, found)); + } + lineNo++; + }); + for (var i = newBreaks.length - 1; i >= 0; i--) + replaceRange(cm.doc, val, newBreaks[i], Pos(newBreaks[i].line, newBreaks[i].ch + val.length)) + }); + option("specialChars", /[\u0000-\u001f\u007f\u00ad\u200b-\u200f\u2028\u2029\ufeff]/g, function(cm, val, old) { + cm.state.specialChars = new RegExp(val.source + (val.test("\t") ? "" : "|\t"), "g"); + if (old != CodeMirror.Init) cm.refresh(); + }); + option("specialCharPlaceholder", defaultSpecialCharPlaceholder, function(cm) {cm.refresh();}, true); + option("electricChars", true); + option("inputStyle", mobile ? "contenteditable" : "textarea", function() { + throw new Error("inputStyle can not (yet) be changed in a running editor"); // FIXME + }, true); + option("rtlMoveVisually", !windows); + option("wholeLineUpdateBefore", true); + + option("theme", "default", function(cm) { + themeChanged(cm); + guttersChanged(cm); + }, true); + option("keyMap", "default", function(cm, val, old) { + var next = getKeyMap(val); + var prev = old != CodeMirror.Init && getKeyMap(old); + if (prev && prev.detach) prev.detach(cm, next); + if (next.attach) next.attach(cm, prev || null); + }); + option("extraKeys", null); + + option("lineWrapping", false, wrappingChanged, true); + option("gutters", [], function(cm) { + setGuttersForLineNumbers(cm.options); + guttersChanged(cm); + }, true); + option("fixedGutter", true, function(cm, val) { + cm.display.gutters.style.left = val ? compensateForHScroll(cm.display) + "px" : "0"; + cm.refresh(); + }, true); + option("coverGutterNextToScrollbar", false, function(cm) {updateScrollbars(cm);}, true); + option("scrollbarStyle", "native", function(cm) { + initScrollbars(cm); + updateScrollbars(cm); + cm.display.scrollbars.setScrollTop(cm.doc.scrollTop); + cm.display.scrollbars.setScrollLeft(cm.doc.scrollLeft); + }, true); + option("lineNumbers", false, function(cm) { + setGuttersForLineNumbers(cm.options); + guttersChanged(cm); + }, true); + option("firstLineNumber", 1, guttersChanged, true); + option("lineNumberFormatter", function(integer) {return integer;}, guttersChanged, true); + option("showCursorWhenSelecting", false, updateSelection, true); + + option("resetSelectionOnContextMenu", true); + option("lineWiseCopyCut", true); + + option("readOnly", false, function(cm, val) { + if (val == "nocursor") { + onBlur(cm); + cm.display.input.blur(); + cm.display.disabled = true; + } else { + cm.display.disabled = false; + } + cm.display.input.readOnlyChanged(val) + }); + option("disableInput", false, function(cm, val) {if (!val) cm.display.input.reset();}, true); + option("dragDrop", true, dragDropChanged); + option("allowDropFileTypes", null); + + option("cursorBlinkRate", 530); + option("cursorScrollMargin", 0); + option("cursorHeight", 1, updateSelection, true); + option("singleCursorHeightPerLine", true, updateSelection, true); + option("workTime", 100); + option("workDelay", 100); + option("flattenSpans", true, resetModeState, true); + option("addModeClass", false, resetModeState, true); + option("pollInterval", 100); + option("undoDepth", 200, function(cm, val){cm.doc.history.undoDepth = val;}); + option("historyEventDelay", 1250); + option("viewportMargin", 10, function(cm){cm.refresh();}, true); + option("maxHighlightLength", 10000, resetModeState, true); + option("moveInputWithCursor", true, function(cm, val) { + if (!val) cm.display.input.resetPosition(); + }); + + option("tabindex", null, function(cm, val) { + cm.display.input.getField().tabIndex = val || ""; + }); + option("autofocus", null); + + // MODE DEFINITION AND QUERYING + + // Known modes, by name and by MIME + var modes = CodeMirror.modes = {}, mimeModes = CodeMirror.mimeModes = {}; + + // Extra arguments are stored as the mode's dependencies, which is + // used by (legacy) mechanisms like loadmode.js to automatically + // load a mode. (Preferred mechanism is the require/define calls.) + CodeMirror.defineMode = function(name, mode) { + if (!CodeMirror.defaults.mode && name != "null") CodeMirror.defaults.mode = name; + if (arguments.length > 2) + mode.dependencies = Array.prototype.slice.call(arguments, 2); + modes[name] = mode; + }; + + CodeMirror.defineMIME = function(mime, spec) { + mimeModes[mime] = spec; + }; + + // Given a MIME type, a {name, ...options} config object, or a name + // string, return a mode config object. + CodeMirror.resolveMode = function(spec) { + if (typeof spec == "string" && mimeModes.hasOwnProperty(spec)) { + spec = mimeModes[spec]; + } else if (spec && typeof spec.name == "string" && mimeModes.hasOwnProperty(spec.name)) { + var found = mimeModes[spec.name]; + if (typeof found == "string") found = {name: found}; + spec = createObj(found, spec); + spec.name = found.name; + } else if (typeof spec == "string" && /^[\w\-]+\/[\w\-]+\+xml$/.test(spec)) { + return CodeMirror.resolveMode("application/xml"); + } + if (typeof spec == "string") return {name: spec}; + else return spec || {name: "null"}; + }; + + // Given a mode spec (anything that resolveMode accepts), find and + // initialize an actual mode object. + CodeMirror.getMode = function(options, spec) { + var spec = CodeMirror.resolveMode(spec); + var mfactory = modes[spec.name]; + if (!mfactory) return CodeMirror.getMode(options, "text/plain"); + var modeObj = mfactory(options, spec); + if (modeExtensions.hasOwnProperty(spec.name)) { + var exts = modeExtensions[spec.name]; + for (var prop in exts) { + if (!exts.hasOwnProperty(prop)) continue; + if (modeObj.hasOwnProperty(prop)) modeObj["_" + prop] = modeObj[prop]; + modeObj[prop] = exts[prop]; + } + } + modeObj.name = spec.name; + if (spec.helperType) modeObj.helperType = spec.helperType; + if (spec.modeProps) for (var prop in spec.modeProps) + modeObj[prop] = spec.modeProps[prop]; + + return modeObj; + }; + + // Minimal default mode. + CodeMirror.defineMode("null", function() { + return {token: function(stream) {stream.skipToEnd();}}; + }); + CodeMirror.defineMIME("text/plain", "null"); + + // This can be used to attach properties to mode objects from + // outside the actual mode definition. + var modeExtensions = CodeMirror.modeExtensions = {}; + CodeMirror.extendMode = function(mode, properties) { + var exts = modeExtensions.hasOwnProperty(mode) ? modeExtensions[mode] : (modeExtensions[mode] = {}); + copyObj(properties, exts); + }; + + // EXTENSIONS + + CodeMirror.defineExtension = function(name, func) { + CodeMirror.prototype[name] = func; + }; + CodeMirror.defineDocExtension = function(name, func) { + Doc.prototype[name] = func; + }; + CodeMirror.defineOption = option; + + var initHooks = []; + CodeMirror.defineInitHook = function(f) {initHooks.push(f);}; + + var helpers = CodeMirror.helpers = {}; + CodeMirror.registerHelper = function(type, name, value) { + if (!helpers.hasOwnProperty(type)) helpers[type] = CodeMirror[type] = {_global: []}; + helpers[type][name] = value; + }; + CodeMirror.registerGlobalHelper = function(type, name, predicate, value) { + CodeMirror.registerHelper(type, name, value); + helpers[type]._global.push({pred: predicate, val: value}); + }; + + // MODE STATE HANDLING + + // Utility functions for working with state. Exported because nested + // modes need to do this for their inner modes. + + var copyState = CodeMirror.copyState = function(mode, state) { + if (state === true) return state; + if (mode.copyState) return mode.copyState(state); + var nstate = {}; + for (var n in state) { + var val = state[n]; + if (val instanceof Array) val = val.concat([]); + nstate[n] = val; + } + return nstate; + }; + + var startState = CodeMirror.startState = function(mode, a1, a2) { + return mode.startState ? mode.startState(a1, a2) : true; + }; + + // Given a mode and a state (for that mode), find the inner mode and + // state at the position that the state refers to. + CodeMirror.innerMode = function(mode, state) { + while (mode.innerMode) { + var info = mode.innerMode(state); + if (!info || info.mode == mode) break; + state = info.state; + mode = info.mode; + } + return info || {mode: mode, state: state}; + }; + + // STANDARD COMMANDS + + // Commands are parameter-less actions that can be performed on an + // editor, mostly used for keybindings. + var commands = CodeMirror.commands = { + selectAll: function(cm) {cm.setSelection(Pos(cm.firstLine(), 0), Pos(cm.lastLine()), sel_dontScroll);}, + singleSelection: function(cm) { + cm.setSelection(cm.getCursor("anchor"), cm.getCursor("head"), sel_dontScroll); + }, + killLine: function(cm) { + deleteNearSelection(cm, function(range) { + if (range.empty()) { + var len = getLine(cm.doc, range.head.line).text.length; + if (range.head.ch == len && range.head.line < cm.lastLine()) + return {from: range.head, to: Pos(range.head.line + 1, 0)}; + else + return {from: range.head, to: Pos(range.head.line, len)}; + } else { + return {from: range.from(), to: range.to()}; + } + }); + }, + deleteLine: function(cm) { + deleteNearSelection(cm, function(range) { + return {from: Pos(range.from().line, 0), + to: clipPos(cm.doc, Pos(range.to().line + 1, 0))}; + }); + }, + delLineLeft: function(cm) { + deleteNearSelection(cm, function(range) { + return {from: Pos(range.from().line, 0), to: range.from()}; + }); + }, + delWrappedLineLeft: function(cm) { + deleteNearSelection(cm, function(range) { + var top = cm.charCoords(range.head, "div").top + 5; + var leftPos = cm.coordsChar({left: 0, top: top}, "div"); + return {from: leftPos, to: range.from()}; + }); + }, + delWrappedLineRight: function(cm) { + deleteNearSelection(cm, function(range) { + var top = cm.charCoords(range.head, "div").top + 5; + var rightPos = cm.coordsChar({left: cm.display.lineDiv.offsetWidth + 100, top: top}, "div"); + return {from: range.from(), to: rightPos }; + }); + }, + undo: function(cm) {cm.undo();}, + redo: function(cm) {cm.redo();}, + undoSelection: function(cm) {cm.undoSelection();}, + redoSelection: function(cm) {cm.redoSelection();}, + goDocStart: function(cm) {cm.extendSelection(Pos(cm.firstLine(), 0));}, + goDocEnd: function(cm) {cm.extendSelection(Pos(cm.lastLine()));}, + goLineStart: function(cm) { + cm.extendSelectionsBy(function(range) { return lineStart(cm, range.head.line); }, + {origin: "+move", bias: 1}); + }, + goLineStartSmart: function(cm) { + cm.extendSelectionsBy(function(range) { + return lineStartSmart(cm, range.head); + }, {origin: "+move", bias: 1}); + }, + goLineEnd: function(cm) { + cm.extendSelectionsBy(function(range) { return lineEnd(cm, range.head.line); }, + {origin: "+move", bias: -1}); + }, + goLineRight: function(cm) { + cm.extendSelectionsBy(function(range) { + var top = cm.charCoords(range.head, "div").top + 5; + return cm.coordsChar({left: cm.display.lineDiv.offsetWidth + 100, top: top}, "div"); + }, sel_move); + }, + goLineLeft: function(cm) { + cm.extendSelectionsBy(function(range) { + var top = cm.charCoords(range.head, "div").top + 5; + return cm.coordsChar({left: 0, top: top}, "div"); + }, sel_move); + }, + goLineLeftSmart: function(cm) { + cm.extendSelectionsBy(function(range) { + var top = cm.charCoords(range.head, "div").top + 5; + var pos = cm.coordsChar({left: 0, top: top}, "div"); + if (pos.ch < cm.getLine(pos.line).search(/\S/)) return lineStartSmart(cm, range.head); + return pos; + }, sel_move); + }, + goLineUp: function(cm) {cm.moveV(-1, "line");}, + goLineDown: function(cm) {cm.moveV(1, "line");}, + goPageUp: function(cm) {cm.moveV(-1, "page");}, + goPageDown: function(cm) {cm.moveV(1, "page");}, + goCharLeft: function(cm) {cm.moveH(-1, "char");}, + goCharRight: function(cm) {cm.moveH(1, "char");}, + goColumnLeft: function(cm) {cm.moveH(-1, "column");}, + goColumnRight: function(cm) {cm.moveH(1, "column");}, + goWordLeft: function(cm) {cm.moveH(-1, "word");}, + goGroupRight: function(cm) {cm.moveH(1, "group");}, + goGroupLeft: function(cm) {cm.moveH(-1, "group");}, + goWordRight: function(cm) {cm.moveH(1, "word");}, + delCharBefore: function(cm) {cm.deleteH(-1, "char");}, + delCharAfter: function(cm) {cm.deleteH(1, "char");}, + delWordBefore: function(cm) {cm.deleteH(-1, "word");}, + delWordAfter: function(cm) {cm.deleteH(1, "word");}, + delGroupBefore: function(cm) {cm.deleteH(-1, "group");}, + delGroupAfter: function(cm) {cm.deleteH(1, "group");}, + indentAuto: function(cm) {cm.indentSelection("smart");}, + indentMore: function(cm) {cm.indentSelection("add");}, + indentLess: function(cm) {cm.indentSelection("subtract");}, + insertTab: function(cm) {cm.replaceSelection("\t");}, + insertSoftTab: function(cm) { + var spaces = [], ranges = cm.listSelections(), tabSize = cm.options.tabSize; + for (var i = 0; i < ranges.length; i++) { + var pos = ranges[i].from(); + var col = countColumn(cm.getLine(pos.line), pos.ch, tabSize); + spaces.push(spaceStr(tabSize - col % tabSize)); + } + cm.replaceSelections(spaces); + }, + defaultTab: function(cm) { + if (cm.somethingSelected()) cm.indentSelection("add"); + else cm.execCommand("insertTab"); + }, + transposeChars: function(cm) { + runInOp(cm, function() { + var ranges = cm.listSelections(), newSel = []; + for (var i = 0; i < ranges.length; i++) { + var cur = ranges[i].head, line = getLine(cm.doc, cur.line).text; + if (line) { + if (cur.ch == line.length) cur = new Pos(cur.line, cur.ch - 1); + if (cur.ch > 0) { + cur = new Pos(cur.line, cur.ch + 1); + cm.replaceRange(line.charAt(cur.ch - 1) + line.charAt(cur.ch - 2), + Pos(cur.line, cur.ch - 2), cur, "+transpose"); + } else if (cur.line > cm.doc.first) { + var prev = getLine(cm.doc, cur.line - 1).text; + if (prev) + cm.replaceRange(line.charAt(0) + cm.doc.lineSeparator() + + prev.charAt(prev.length - 1), + Pos(cur.line - 1, prev.length - 1), Pos(cur.line, 1), "+transpose"); + } + } + newSel.push(new Range(cur, cur)); + } + cm.setSelections(newSel); + }); + }, + newlineAndIndent: function(cm) { + runInOp(cm, function() { + var len = cm.listSelections().length; + for (var i = 0; i < len; i++) { + var range = cm.listSelections()[i]; + cm.replaceRange(cm.doc.lineSeparator(), range.anchor, range.head, "+input"); + cm.indentLine(range.from().line + 1, null, true); + } + ensureCursorVisible(cm); + }); + }, + toggleOverwrite: function(cm) {cm.toggleOverwrite();} + }; + + + // STANDARD KEYMAPS + + var keyMap = CodeMirror.keyMap = {}; + + keyMap.basic = { + "Left": "goCharLeft", "Right": "goCharRight", "Up": "goLineUp", "Down": "goLineDown", + "End": "goLineEnd", "Home": "goLineStartSmart", "PageUp": "goPageUp", "PageDown": "goPageDown", + "Delete": "delCharAfter", "Backspace": "delCharBefore", "Shift-Backspace": "delCharBefore", + "Tab": "defaultTab", "Shift-Tab": "indentAuto", + "Enter": "newlineAndIndent", "Insert": "toggleOverwrite", + "Esc": "singleSelection" + }; + // Note that the save and find-related commands aren't defined by + // default. User code or addons can define them. Unknown commands + // are simply ignored. + keyMap.pcDefault = { + "Ctrl-A": "selectAll", "Ctrl-D": "deleteLine", "Ctrl-Z": "undo", "Shift-Ctrl-Z": "redo", "Ctrl-Y": "redo", + "Ctrl-Home": "goDocStart", "Ctrl-End": "goDocEnd", "Ctrl-Up": "goLineUp", "Ctrl-Down": "goLineDown", + "Ctrl-Left": "goGroupLeft", "Ctrl-Right": "goGroupRight", "Alt-Left": "goLineStart", "Alt-Right": "goLineEnd", + "Ctrl-Backspace": "delGroupBefore", "Ctrl-Delete": "delGroupAfter", "Ctrl-S": "save", "Ctrl-F": "find", + "Ctrl-G": "findNext", "Shift-Ctrl-G": "findPrev", "Shift-Ctrl-F": "replace", "Shift-Ctrl-R": "replaceAll", + "Ctrl-[": "indentLess", "Ctrl-]": "indentMore", + "Ctrl-U": "undoSelection", "Shift-Ctrl-U": "redoSelection", "Alt-U": "redoSelection", + fallthrough: "basic" + }; + // Very basic readline/emacs-style bindings, which are standard on Mac. + keyMap.emacsy = { + "Ctrl-F": "goCharRight", "Ctrl-B": "goCharLeft", "Ctrl-P": "goLineUp", "Ctrl-N": "goLineDown", + "Alt-F": "goWordRight", "Alt-B": "goWordLeft", "Ctrl-A": "goLineStart", "Ctrl-E": "goLineEnd", + "Ctrl-V": "goPageDown", "Shift-Ctrl-V": "goPageUp", "Ctrl-D": "delCharAfter", "Ctrl-H": "delCharBefore", + "Alt-D": "delWordAfter", "Alt-Backspace": "delWordBefore", "Ctrl-K": "killLine", "Ctrl-T": "transposeChars" + }; + keyMap.macDefault = { + "Cmd-A": "selectAll", "Cmd-D": "deleteLine", "Cmd-Z": "undo", "Shift-Cmd-Z": "redo", "Cmd-Y": "redo", + "Cmd-Home": "goDocStart", "Cmd-Up": "goDocStart", "Cmd-End": "goDocEnd", "Cmd-Down": "goDocEnd", "Alt-Left": "goGroupLeft", + "Alt-Right": "goGroupRight", "Cmd-Left": "goLineLeft", "Cmd-Right": "goLineRight", "Alt-Backspace": "delGroupBefore", + "Ctrl-Alt-Backspace": "delGroupAfter", "Alt-Delete": "delGroupAfter", "Cmd-S": "save", "Cmd-F": "find", + "Cmd-G": "findNext", "Shift-Cmd-G": "findPrev", "Cmd-Alt-F": "replace", "Shift-Cmd-Alt-F": "replaceAll", + "Cmd-[": "indentLess", "Cmd-]": "indentMore", "Cmd-Backspace": "delWrappedLineLeft", "Cmd-Delete": "delWrappedLineRight", + "Cmd-U": "undoSelection", "Shift-Cmd-U": "redoSelection", "Ctrl-Up": "goDocStart", "Ctrl-Down": "goDocEnd", + fallthrough: ["basic", "emacsy"] + }; + keyMap["default"] = mac ? keyMap.macDefault : keyMap.pcDefault; + + // KEYMAP DISPATCH + + function normalizeKeyName(name) { + var parts = name.split(/-(?!$)/), name = parts[parts.length - 1]; + var alt, ctrl, shift, cmd; + for (var i = 0; i < parts.length - 1; i++) { + var mod = parts[i]; + if (/^(cmd|meta|m)$/i.test(mod)) cmd = true; + else if (/^a(lt)?$/i.test(mod)) alt = true; + else if (/^(c|ctrl|control)$/i.test(mod)) ctrl = true; + else if (/^s(hift)$/i.test(mod)) shift = true; + else throw new Error("Unrecognized modifier name: " + mod); + } + if (alt) name = "Alt-" + name; + if (ctrl) name = "Ctrl-" + name; + if (cmd) name = "Cmd-" + name; + if (shift) name = "Shift-" + name; + return name; + } + + // This is a kludge to keep keymaps mostly working as raw objects + // (backwards compatibility) while at the same time support features + // like normalization and multi-stroke key bindings. It compiles a + // new normalized keymap, and then updates the old object to reflect + // this. + CodeMirror.normalizeKeyMap = function(keymap) { + var copy = {}; + for (var keyname in keymap) if (keymap.hasOwnProperty(keyname)) { + var value = keymap[keyname]; + if (/^(name|fallthrough|(de|at)tach)$/.test(keyname)) continue; + if (value == "...") { delete keymap[keyname]; continue; } + + var keys = map(keyname.split(" "), normalizeKeyName); + for (var i = 0; i < keys.length; i++) { + var val, name; + if (i == keys.length - 1) { + name = keys.join(" "); + val = value; + } else { + name = keys.slice(0, i + 1).join(" "); + val = "..."; + } + var prev = copy[name]; + if (!prev) copy[name] = val; + else if (prev != val) throw new Error("Inconsistent bindings for " + name); + } + delete keymap[keyname]; + } + for (var prop in copy) keymap[prop] = copy[prop]; + return keymap; + }; + + var lookupKey = CodeMirror.lookupKey = function(key, map, handle, context) { + map = getKeyMap(map); + var found = map.call ? map.call(key, context) : map[key]; + if (found === false) return "nothing"; + if (found === "...") return "multi"; + if (found != null && handle(found)) return "handled"; + + if (map.fallthrough) { + if (Object.prototype.toString.call(map.fallthrough) != "[object Array]") + return lookupKey(key, map.fallthrough, handle, context); + for (var i = 0; i < map.fallthrough.length; i++) { + var result = lookupKey(key, map.fallthrough[i], handle, context); + if (result) return result; + } + } + }; + + // Modifier key presses don't count as 'real' key presses for the + // purpose of keymap fallthrough. + var isModifierKey = CodeMirror.isModifierKey = function(value) { + var name = typeof value == "string" ? value : keyNames[value.keyCode]; + return name == "Ctrl" || name == "Alt" || name == "Shift" || name == "Mod"; + }; + + // Look up the name of a key as indicated by an event object. + var keyName = CodeMirror.keyName = function(event, noShift) { + if (presto && event.keyCode == 34 && event["char"]) return false; + var base = keyNames[event.keyCode], name = base; + if (name == null || event.altGraphKey) return false; + if (event.altKey && base != "Alt") name = "Alt-" + name; + if ((flipCtrlCmd ? event.metaKey : event.ctrlKey) && base != "Ctrl") name = "Ctrl-" + name; + if ((flipCtrlCmd ? event.ctrlKey : event.metaKey) && base != "Cmd") name = "Cmd-" + name; + if (!noShift && event.shiftKey && base != "Shift") name = "Shift-" + name; + return name; + }; + + function getKeyMap(val) { + return typeof val == "string" ? keyMap[val] : val; + } + + // FROMTEXTAREA + + CodeMirror.fromTextArea = function(textarea, options) { + options = options ? copyObj(options) : {}; + options.value = textarea.value; + if (!options.tabindex && textarea.tabIndex) + options.tabindex = textarea.tabIndex; + if (!options.placeholder && textarea.placeholder) + options.placeholder = textarea.placeholder; + // Set autofocus to true if this textarea is focused, or if it has + // autofocus and no other element is focused. + if (options.autofocus == null) { + var hasFocus = activeElt(); + options.autofocus = hasFocus == textarea || + textarea.getAttribute("autofocus") != null && hasFocus == document.body; + } + + function save() {textarea.value = cm.getValue();} + if (textarea.form) { + on(textarea.form, "submit", save); + // Deplorable hack to make the submit method do the right thing. + if (!options.leaveSubmitMethodAlone) { + var form = textarea.form, realSubmit = form.submit; + try { + var wrappedSubmit = form.submit = function() { + save(); + form.submit = realSubmit; + form.submit(); + form.submit = wrappedSubmit; + }; + } catch(e) {} + } + } + + options.finishInit = function(cm) { + cm.save = save; + cm.getTextArea = function() { return textarea; }; + cm.toTextArea = function() { + cm.toTextArea = isNaN; // Prevent this from being ran twice + save(); + textarea.parentNode.removeChild(cm.getWrapperElement()); + textarea.style.display = ""; + if (textarea.form) { + off(textarea.form, "submit", save); + if (typeof textarea.form.submit == "function") + textarea.form.submit = realSubmit; + } + }; + }; + + textarea.style.display = "none"; + var cm = CodeMirror(function(node) { + textarea.parentNode.insertBefore(node, textarea.nextSibling); + }, options); + return cm; + }; + + // STRING STREAM + + // Fed to the mode parsers, provides helper functions to make + // parsers more succinct. + + var StringStream = CodeMirror.StringStream = function(string, tabSize) { + this.pos = this.start = 0; + this.string = string; + this.tabSize = tabSize || 8; + this.lastColumnPos = this.lastColumnValue = 0; + this.lineStart = 0; + }; + + StringStream.prototype = { + eol: function() {return this.pos >= this.string.length;}, + sol: function() {return this.pos == this.lineStart;}, + peek: function() {return this.string.charAt(this.pos) || undefined;}, + next: function() { + if (this.pos < this.string.length) + return this.string.charAt(this.pos++); + }, + eat: function(match) { + var ch = this.string.charAt(this.pos); + if (typeof match == "string") var ok = ch == match; + else var ok = ch && (match.test ? match.test(ch) : match(ch)); + if (ok) {++this.pos; return ch;} + }, + eatWhile: function(match) { + var start = this.pos; + while (this.eat(match)){} + return this.pos > start; + }, + eatSpace: function() { + var start = this.pos; + while (/[\s\u00a0]/.test(this.string.charAt(this.pos))) ++this.pos; + return this.pos > start; + }, + skipToEnd: function() {this.pos = this.string.length;}, + skipTo: function(ch) { + var found = this.string.indexOf(ch, this.pos); + if (found > -1) {this.pos = found; return true;} + }, + backUp: function(n) {this.pos -= n;}, + column: function() { + if (this.lastColumnPos < this.start) { + this.lastColumnValue = countColumn(this.string, this.start, this.tabSize, this.lastColumnPos, this.lastColumnValue); + this.lastColumnPos = this.start; + } + return this.lastColumnValue - (this.lineStart ? countColumn(this.string, this.lineStart, this.tabSize) : 0); + }, + indentation: function() { + return countColumn(this.string, null, this.tabSize) - + (this.lineStart ? countColumn(this.string, this.lineStart, this.tabSize) : 0); + }, + match: function(pattern, consume, caseInsensitive) { + if (typeof pattern == "string") { + var cased = function(str) {return caseInsensitive ? str.toLowerCase() : str;}; + var substr = this.string.substr(this.pos, pattern.length); + if (cased(substr) == cased(pattern)) { + if (consume !== false) this.pos += pattern.length; + return true; + } + } else { + var match = this.string.slice(this.pos).match(pattern); + if (match && match.index > 0) return null; + if (match && consume !== false) this.pos += match[0].length; + return match; + } + }, + current: function(){return this.string.slice(this.start, this.pos);}, + hideFirstChars: function(n, inner) { + this.lineStart += n; + try { return inner(); } + finally { this.lineStart -= n; } + } + }; + + // TEXTMARKERS + + // Created with markText and setBookmark methods. A TextMarker is a + // handle that can be used to clear or find a marked position in the + // document. Line objects hold arrays (markedSpans) containing + // {from, to, marker} object pointing to such marker objects, and + // indicating that such a marker is present on that line. Multiple + // lines may point to the same marker when it spans across lines. + // The spans will have null for their from/to properties when the + // marker continues beyond the start/end of the line. Markers have + // links back to the lines they currently touch. + + var nextMarkerId = 0; + + var TextMarker = CodeMirror.TextMarker = function(doc, type) { + this.lines = []; + this.type = type; + this.doc = doc; + this.id = ++nextMarkerId; + }; + eventMixin(TextMarker); + + // Clear the marker. + TextMarker.prototype.clear = function() { + if (this.explicitlyCleared) return; + var cm = this.doc.cm, withOp = cm && !cm.curOp; + if (withOp) startOperation(cm); + if (hasHandler(this, "clear")) { + var found = this.find(); + if (found) signalLater(this, "clear", found.from, found.to); + } + var min = null, max = null; + for (var i = 0; i < this.lines.length; ++i) { + var line = this.lines[i]; + var span = getMarkedSpanFor(line.markedSpans, this); + if (cm && !this.collapsed) regLineChange(cm, lineNo(line), "text"); + else if (cm) { + if (span.to != null) max = lineNo(line); + if (span.from != null) min = lineNo(line); + } + line.markedSpans = removeMarkedSpan(line.markedSpans, span); + if (span.from == null && this.collapsed && !lineIsHidden(this.doc, line) && cm) + updateLineHeight(line, textHeight(cm.display)); + } + if (cm && this.collapsed && !cm.options.lineWrapping) for (var i = 0; i < this.lines.length; ++i) { + var visual = visualLine(this.lines[i]), len = lineLength(visual); + if (len > cm.display.maxLineLength) { + cm.display.maxLine = visual; + cm.display.maxLineLength = len; + cm.display.maxLineChanged = true; + } + } + + if (min != null && cm && this.collapsed) regChange(cm, min, max + 1); + this.lines.length = 0; + this.explicitlyCleared = true; + if (this.atomic && this.doc.cantEdit) { + this.doc.cantEdit = false; + if (cm) reCheckSelection(cm.doc); + } + if (cm) signalLater(cm, "markerCleared", cm, this); + if (withOp) endOperation(cm); + if (this.parent) this.parent.clear(); + }; + + // Find the position of the marker in the document. Returns a {from, + // to} object by default. Side can be passed to get a specific side + // -- 0 (both), -1 (left), or 1 (right). When lineObj is true, the + // Pos objects returned contain a line object, rather than a line + // number (used to prevent looking up the same line twice). + TextMarker.prototype.find = function(side, lineObj) { + if (side == null && this.type == "bookmark") side = 1; + var from, to; + for (var i = 0; i < this.lines.length; ++i) { + var line = this.lines[i]; + var span = getMarkedSpanFor(line.markedSpans, this); + if (span.from != null) { + from = Pos(lineObj ? line : lineNo(line), span.from); + if (side == -1) return from; + } + if (span.to != null) { + to = Pos(lineObj ? line : lineNo(line), span.to); + if (side == 1) return to; + } + } + return from && {from: from, to: to}; + }; + + // Signals that the marker's widget changed, and surrounding layout + // should be recomputed. + TextMarker.prototype.changed = function() { + var pos = this.find(-1, true), widget = this, cm = this.doc.cm; + if (!pos || !cm) return; + runInOp(cm, function() { + var line = pos.line, lineN = lineNo(pos.line); + var view = findViewForLine(cm, lineN); + if (view) { + clearLineMeasurementCacheFor(view); + cm.curOp.selectionChanged = cm.curOp.forceUpdate = true; + } + cm.curOp.updateMaxLine = true; + if (!lineIsHidden(widget.doc, line) && widget.height != null) { + var oldHeight = widget.height; + widget.height = null; + var dHeight = widgetHeight(widget) - oldHeight; + if (dHeight) + updateLineHeight(line, line.height + dHeight); + } + }); + }; + + TextMarker.prototype.attachLine = function(line) { + if (!this.lines.length && this.doc.cm) { + var op = this.doc.cm.curOp; + if (!op.maybeHiddenMarkers || indexOf(op.maybeHiddenMarkers, this) == -1) + (op.maybeUnhiddenMarkers || (op.maybeUnhiddenMarkers = [])).push(this); + } + this.lines.push(line); + }; + TextMarker.prototype.detachLine = function(line) { + this.lines.splice(indexOf(this.lines, line), 1); + if (!this.lines.length && this.doc.cm) { + var op = this.doc.cm.curOp; + (op.maybeHiddenMarkers || (op.maybeHiddenMarkers = [])).push(this); + } + }; + + // Collapsed markers have unique ids, in order to be able to order + // them, which is needed for uniquely determining an outer marker + // when they overlap (they may nest, but not partially overlap). + var nextMarkerId = 0; + + // Create a marker, wire it up to the right lines, and + function markText(doc, from, to, options, type) { + // Shared markers (across linked documents) are handled separately + // (markTextShared will call out to this again, once per + // document). + if (options && options.shared) return markTextShared(doc, from, to, options, type); + // Ensure we are in an operation. + if (doc.cm && !doc.cm.curOp) return operation(doc.cm, markText)(doc, from, to, options, type); + + var marker = new TextMarker(doc, type), diff = cmp(from, to); + if (options) copyObj(options, marker, false); + // Don't connect empty markers unless clearWhenEmpty is false + if (diff > 0 || diff == 0 && marker.clearWhenEmpty !== false) + return marker; + if (marker.replacedWith) { + // Showing up as a widget implies collapsed (widget replaces text) + marker.collapsed = true; + marker.widgetNode = elt("span", [marker.replacedWith], "CodeMirror-widget"); + if (!options.handleMouseEvents) marker.widgetNode.setAttribute("cm-ignore-events", "true"); + if (options.insertLeft) marker.widgetNode.insertLeft = true; + } + if (marker.collapsed) { + if (conflictingCollapsedRange(doc, from.line, from, to, marker) || + from.line != to.line && conflictingCollapsedRange(doc, to.line, from, to, marker)) + throw new Error("Inserting collapsed marker partially overlapping an existing one"); + sawCollapsedSpans = true; + } + + if (marker.addToHistory) + addChangeToHistory(doc, {from: from, to: to, origin: "markText"}, doc.sel, NaN); + + var curLine = from.line, cm = doc.cm, updateMaxLine; + doc.iter(curLine, to.line + 1, function(line) { + if (cm && marker.collapsed && !cm.options.lineWrapping && visualLine(line) == cm.display.maxLine) + updateMaxLine = true; + if (marker.collapsed && curLine != from.line) updateLineHeight(line, 0); + addMarkedSpan(line, new MarkedSpan(marker, + curLine == from.line ? from.ch : null, + curLine == to.line ? to.ch : null)); + ++curLine; + }); + // lineIsHidden depends on the presence of the spans, so needs a second pass + if (marker.collapsed) doc.iter(from.line, to.line + 1, function(line) { + if (lineIsHidden(doc, line)) updateLineHeight(line, 0); + }); + + if (marker.clearOnEnter) on(marker, "beforeCursorEnter", function() { marker.clear(); }); + + if (marker.readOnly) { + sawReadOnlySpans = true; + if (doc.history.done.length || doc.history.undone.length) + doc.clearHistory(); + } + if (marker.collapsed) { + marker.id = ++nextMarkerId; + marker.atomic = true; + } + if (cm) { + // Sync editor state + if (updateMaxLine) cm.curOp.updateMaxLine = true; + if (marker.collapsed) + regChange(cm, from.line, to.line + 1); + else if (marker.className || marker.title || marker.startStyle || marker.endStyle || marker.css) + for (var i = from.line; i <= to.line; i++) regLineChange(cm, i, "text"); + if (marker.atomic) reCheckSelection(cm.doc); + signalLater(cm, "markerAdded", cm, marker); + } + return marker; + } + + // SHARED TEXTMARKERS + + // A shared marker spans multiple linked documents. It is + // implemented as a meta-marker-object controlling multiple normal + // markers. + var SharedTextMarker = CodeMirror.SharedTextMarker = function(markers, primary) { + this.markers = markers; + this.primary = primary; + for (var i = 0; i < markers.length; ++i) + markers[i].parent = this; + }; + eventMixin(SharedTextMarker); + + SharedTextMarker.prototype.clear = function() { + if (this.explicitlyCleared) return; + this.explicitlyCleared = true; + for (var i = 0; i < this.markers.length; ++i) + this.markers[i].clear(); + signalLater(this, "clear"); + }; + SharedTextMarker.prototype.find = function(side, lineObj) { + return this.primary.find(side, lineObj); + }; + + function markTextShared(doc, from, to, options, type) { + options = copyObj(options); + options.shared = false; + var markers = [markText(doc, from, to, options, type)], primary = markers[0]; + var widget = options.widgetNode; + linkedDocs(doc, function(doc) { + if (widget) options.widgetNode = widget.cloneNode(true); + markers.push(markText(doc, clipPos(doc, from), clipPos(doc, to), options, type)); + for (var i = 0; i < doc.linked.length; ++i) + if (doc.linked[i].isParent) return; + primary = lst(markers); + }); + return new SharedTextMarker(markers, primary); + } + + function findSharedMarkers(doc) { + return doc.findMarks(Pos(doc.first, 0), doc.clipPos(Pos(doc.lastLine())), + function(m) { return m.parent; }); + } + + function copySharedMarkers(doc, markers) { + for (var i = 0; i < markers.length; i++) { + var marker = markers[i], pos = marker.find(); + var mFrom = doc.clipPos(pos.from), mTo = doc.clipPos(pos.to); + if (cmp(mFrom, mTo)) { + var subMark = markText(doc, mFrom, mTo, marker.primary, marker.primary.type); + marker.markers.push(subMark); + subMark.parent = marker; + } + } + } + + function detachSharedMarkers(markers) { + for (var i = 0; i < markers.length; i++) { + var marker = markers[i], linked = [marker.primary.doc];; + linkedDocs(marker.primary.doc, function(d) { linked.push(d); }); + for (var j = 0; j < marker.markers.length; j++) { + var subMarker = marker.markers[j]; + if (indexOf(linked, subMarker.doc) == -1) { + subMarker.parent = null; + marker.markers.splice(j--, 1); + } + } + } + } + + // TEXTMARKER SPANS + + function MarkedSpan(marker, from, to) { + this.marker = marker; + this.from = from; this.to = to; + } + + // Search an array of spans for a span matching the given marker. + function getMarkedSpanFor(spans, marker) { + if (spans) for (var i = 0; i < spans.length; ++i) { + var span = spans[i]; + if (span.marker == marker) return span; + } + } + // Remove a span from an array, returning undefined if no spans are + // left (we don't store arrays for lines without spans). + function removeMarkedSpan(spans, span) { + for (var r, i = 0; i < spans.length; ++i) + if (spans[i] != span) (r || (r = [])).push(spans[i]); + return r; + } + // Add a span to a line. + function addMarkedSpan(line, span) { + line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span]; + span.marker.attachLine(line); + } + + // Used for the algorithm that adjusts markers for a change in the + // document. These functions cut an array of spans at a given + // character position, returning an array of remaining chunks (or + // undefined if nothing remains). + function markedSpansBefore(old, startCh, isInsert) { + if (old) for (var i = 0, nw; i < old.length; ++i) { + var span = old[i], marker = span.marker; + var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= startCh : span.from < startCh); + if (startsBefore || span.from == startCh && marker.type == "bookmark" && (!isInsert || !span.marker.insertLeft)) { + var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= startCh : span.to > startCh); + (nw || (nw = [])).push(new MarkedSpan(marker, span.from, endsAfter ? null : span.to)); + } + } + return nw; + } + function markedSpansAfter(old, endCh, isInsert) { + if (old) for (var i = 0, nw; i < old.length; ++i) { + var span = old[i], marker = span.marker; + var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= endCh : span.to > endCh); + if (endsAfter || span.from == endCh && marker.type == "bookmark" && (!isInsert || span.marker.insertLeft)) { + var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= endCh : span.from < endCh); + (nw || (nw = [])).push(new MarkedSpan(marker, startsBefore ? null : span.from - endCh, + span.to == null ? null : span.to - endCh)); + } + } + return nw; + } + + // Given a change object, compute the new set of marker spans that + // cover the line in which the change took place. Removes spans + // entirely within the change, reconnects spans belonging to the + // same marker that appear on both sides of the change, and cuts off + // spans partially within the change. Returns an array of span + // arrays with one element for each line in (after) the change. + function stretchSpansOverChange(doc, change) { + if (change.full) return null; + var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans; + var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans; + if (!oldFirst && !oldLast) return null; + + var startCh = change.from.ch, endCh = change.to.ch, isInsert = cmp(change.from, change.to) == 0; + // Get the spans that 'stick out' on both sides + var first = markedSpansBefore(oldFirst, startCh, isInsert); + var last = markedSpansAfter(oldLast, endCh, isInsert); + + // Next, merge those two ends + var sameLine = change.text.length == 1, offset = lst(change.text).length + (sameLine ? startCh : 0); + if (first) { + // Fix up .to properties of first + for (var i = 0; i < first.length; ++i) { + var span = first[i]; + if (span.to == null) { + var found = getMarkedSpanFor(last, span.marker); + if (!found) span.to = startCh; + else if (sameLine) span.to = found.to == null ? null : found.to + offset; + } + } + } + if (last) { + // Fix up .from in last (or move them into first in case of sameLine) + for (var i = 0; i < last.length; ++i) { + var span = last[i]; + if (span.to != null) span.to += offset; + if (span.from == null) { + var found = getMarkedSpanFor(first, span.marker); + if (!found) { + span.from = offset; + if (sameLine) (first || (first = [])).push(span); + } + } else { + span.from += offset; + if (sameLine) (first || (first = [])).push(span); + } + } + } + // Make sure we didn't create any zero-length spans + if (first) first = clearEmptySpans(first); + if (last && last != first) last = clearEmptySpans(last); + + var newMarkers = [first]; + if (!sameLine) { + // Fill gap with whole-line-spans + var gap = change.text.length - 2, gapMarkers; + if (gap > 0 && first) + for (var i = 0; i < first.length; ++i) + if (first[i].to == null) + (gapMarkers || (gapMarkers = [])).push(new MarkedSpan(first[i].marker, null, null)); + for (var i = 0; i < gap; ++i) + newMarkers.push(gapMarkers); + newMarkers.push(last); + } + return newMarkers; + } + + // Remove spans that are empty and don't have a clearWhenEmpty + // option of false. + function clearEmptySpans(spans) { + for (var i = 0; i < spans.length; ++i) { + var span = spans[i]; + if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false) + spans.splice(i--, 1); + } + if (!spans.length) return null; + return spans; + } + + // Used for un/re-doing changes from the history. Combines the + // result of computing the existing spans with the set of spans that + // existed in the history (so that deleting around a span and then + // undoing brings back the span). + function mergeOldSpans(doc, change) { + var old = getOldSpans(doc, change); + var stretched = stretchSpansOverChange(doc, change); + if (!old) return stretched; + if (!stretched) return old; + + for (var i = 0; i < old.length; ++i) { + var oldCur = old[i], stretchCur = stretched[i]; + if (oldCur && stretchCur) { + spans: for (var j = 0; j < stretchCur.length; ++j) { + var span = stretchCur[j]; + for (var k = 0; k < oldCur.length; ++k) + if (oldCur[k].marker == span.marker) continue spans; + oldCur.push(span); + } + } else if (stretchCur) { + old[i] = stretchCur; + } + } + return old; + } + + // Used to 'clip' out readOnly ranges when making a change. + function removeReadOnlyRanges(doc, from, to) { + var markers = null; + doc.iter(from.line, to.line + 1, function(line) { + if (line.markedSpans) for (var i = 0; i < line.markedSpans.length; ++i) { + var mark = line.markedSpans[i].marker; + if (mark.readOnly && (!markers || indexOf(markers, mark) == -1)) + (markers || (markers = [])).push(mark); + } + }); + if (!markers) return null; + var parts = [{from: from, to: to}]; + for (var i = 0; i < markers.length; ++i) { + var mk = markers[i], m = mk.find(0); + for (var j = 0; j < parts.length; ++j) { + var p = parts[j]; + if (cmp(p.to, m.from) < 0 || cmp(p.from, m.to) > 0) continue; + var newParts = [j, 1], dfrom = cmp(p.from, m.from), dto = cmp(p.to, m.to); + if (dfrom < 0 || !mk.inclusiveLeft && !dfrom) + newParts.push({from: p.from, to: m.from}); + if (dto > 0 || !mk.inclusiveRight && !dto) + newParts.push({from: m.to, to: p.to}); + parts.splice.apply(parts, newParts); + j += newParts.length - 1; + } + } + return parts; + } + + // Connect or disconnect spans from a line. + function detachMarkedSpans(line) { + var spans = line.markedSpans; + if (!spans) return; + for (var i = 0; i < spans.length; ++i) + spans[i].marker.detachLine(line); + line.markedSpans = null; + } + function attachMarkedSpans(line, spans) { + if (!spans) return; + for (var i = 0; i < spans.length; ++i) + spans[i].marker.attachLine(line); + line.markedSpans = spans; + } + + // Helpers used when computing which overlapping collapsed span + // counts as the larger one. + function extraLeft(marker) { return marker.inclusiveLeft ? -1 : 0; } + function extraRight(marker) { return marker.inclusiveRight ? 1 : 0; } + + // Returns a number indicating which of two overlapping collapsed + // spans is larger (and thus includes the other). Falls back to + // comparing ids when the spans cover exactly the same range. + function compareCollapsedMarkers(a, b) { + var lenDiff = a.lines.length - b.lines.length; + if (lenDiff != 0) return lenDiff; + var aPos = a.find(), bPos = b.find(); + var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b); + if (fromCmp) return -fromCmp; + var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b); + if (toCmp) return toCmp; + return b.id - a.id; + } + + // Find out whether a line ends or starts in a collapsed span. If + // so, return the marker for that span. + function collapsedSpanAtSide(line, start) { + var sps = sawCollapsedSpans && line.markedSpans, found; + if (sps) for (var sp, i = 0; i < sps.length; ++i) { + sp = sps[i]; + if (sp.marker.collapsed && (start ? sp.from : sp.to) == null && + (!found || compareCollapsedMarkers(found, sp.marker) < 0)) + found = sp.marker; + } + return found; + } + function collapsedSpanAtStart(line) { return collapsedSpanAtSide(line, true); } + function collapsedSpanAtEnd(line) { return collapsedSpanAtSide(line, false); } + + // Test whether there exists a collapsed span that partially + // overlaps (covers the start or end, but not both) of a new span. + // Such overlap is not allowed. + function conflictingCollapsedRange(doc, lineNo, from, to, marker) { + var line = getLine(doc, lineNo); + var sps = sawCollapsedSpans && line.markedSpans; + if (sps) for (var i = 0; i < sps.length; ++i) { + var sp = sps[i]; + if (!sp.marker.collapsed) continue; + var found = sp.marker.find(0); + var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker); + var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker); + if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) continue; + if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) || + fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0)) + return true; + } + } + + // A visual line is a line as drawn on the screen. Folding, for + // example, can cause multiple logical lines to appear on the same + // visual line. This finds the start of the visual line that the + // given line is part of (usually that is the line itself). + function visualLine(line) { + var merged; + while (merged = collapsedSpanAtStart(line)) + line = merged.find(-1, true).line; + return line; + } + + // Returns an array of logical lines that continue the visual line + // started by the argument, or undefined if there are no such lines. + function visualLineContinued(line) { + var merged, lines; + while (merged = collapsedSpanAtEnd(line)) { + line = merged.find(1, true).line; + (lines || (lines = [])).push(line); + } + return lines; + } + + // Get the line number of the start of the visual line that the + // given line number is part of. + function visualLineNo(doc, lineN) { + var line = getLine(doc, lineN), vis = visualLine(line); + if (line == vis) return lineN; + return lineNo(vis); + } + // Get the line number of the start of the next visual line after + // the given line. + function visualLineEndNo(doc, lineN) { + if (lineN > doc.lastLine()) return lineN; + var line = getLine(doc, lineN), merged; + if (!lineIsHidden(doc, line)) return lineN; + while (merged = collapsedSpanAtEnd(line)) + line = merged.find(1, true).line; + return lineNo(line) + 1; + } + + // Compute whether a line is hidden. Lines count as hidden when they + // are part of a visual line that starts with another line, or when + // they are entirely covered by collapsed, non-widget span. + function lineIsHidden(doc, line) { + var sps = sawCollapsedSpans && line.markedSpans; + if (sps) for (var sp, i = 0; i < sps.length; ++i) { + sp = sps[i]; + if (!sp.marker.collapsed) continue; + if (sp.from == null) return true; + if (sp.marker.widgetNode) continue; + if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp)) + return true; + } + } + function lineIsHiddenInner(doc, line, span) { + if (span.to == null) { + var end = span.marker.find(1, true); + return lineIsHiddenInner(doc, end.line, getMarkedSpanFor(end.line.markedSpans, span.marker)); + } + if (span.marker.inclusiveRight && span.to == line.text.length) + return true; + for (var sp, i = 0; i < line.markedSpans.length; ++i) { + sp = line.markedSpans[i]; + if (sp.marker.collapsed && !sp.marker.widgetNode && sp.from == span.to && + (sp.to == null || sp.to != span.from) && + (sp.marker.inclusiveLeft || span.marker.inclusiveRight) && + lineIsHiddenInner(doc, line, sp)) return true; + } + } + + // LINE WIDGETS + + // Line widgets are block elements displayed above or below a line. + + var LineWidget = CodeMirror.LineWidget = function(doc, node, options) { + if (options) for (var opt in options) if (options.hasOwnProperty(opt)) + this[opt] = options[opt]; + this.doc = doc; + this.node = node; + }; + eventMixin(LineWidget); + + function adjustScrollWhenAboveVisible(cm, line, diff) { + if (heightAtLine(line) < ((cm.curOp && cm.curOp.scrollTop) || cm.doc.scrollTop)) + addToScrollPos(cm, null, diff); + } + + LineWidget.prototype.clear = function() { + var cm = this.doc.cm, ws = this.line.widgets, line = this.line, no = lineNo(line); + if (no == null || !ws) return; + for (var i = 0; i < ws.length; ++i) if (ws[i] == this) ws.splice(i--, 1); + if (!ws.length) line.widgets = null; + var height = widgetHeight(this); + updateLineHeight(line, Math.max(0, line.height - height)); + if (cm) runInOp(cm, function() { + adjustScrollWhenAboveVisible(cm, line, -height); + regLineChange(cm, no, "widget"); + }); + }; + LineWidget.prototype.changed = function() { + var oldH = this.height, cm = this.doc.cm, line = this.line; + this.height = null; + var diff = widgetHeight(this) - oldH; + if (!diff) return; + updateLineHeight(line, line.height + diff); + if (cm) runInOp(cm, function() { + cm.curOp.forceUpdate = true; + adjustScrollWhenAboveVisible(cm, line, diff); + }); + }; + + function widgetHeight(widget) { + if (widget.height != null) return widget.height; + var cm = widget.doc.cm; + if (!cm) return 0; + if (!contains(document.body, widget.node)) { + var parentStyle = "position: relative;"; + if (widget.coverGutter) + parentStyle += "margin-left: -" + cm.display.gutters.offsetWidth + "px;"; + if (widget.noHScroll) + parentStyle += "width: " + cm.display.wrapper.clientWidth + "px;"; + removeChildrenAndAdd(cm.display.measure, elt("div", [widget.node], null, parentStyle)); + } + return widget.height = widget.node.parentNode.offsetHeight; + } + + function addLineWidget(doc, handle, node, options) { + var widget = new LineWidget(doc, node, options); + var cm = doc.cm; + if (cm && widget.noHScroll) cm.display.alignWidgets = true; + changeLine(doc, handle, "widget", function(line) { + var widgets = line.widgets || (line.widgets = []); + if (widget.insertAt == null) widgets.push(widget); + else widgets.splice(Math.min(widgets.length - 1, Math.max(0, widget.insertAt)), 0, widget); + widget.line = line; + if (cm && !lineIsHidden(doc, line)) { + var aboveVisible = heightAtLine(line) < doc.scrollTop; + updateLineHeight(line, line.height + widgetHeight(widget)); + if (aboveVisible) addToScrollPos(cm, null, widget.height); + cm.curOp.forceUpdate = true; + } + return true; + }); + return widget; + } + + // LINE DATA STRUCTURE + + // Line objects. These hold state related to a line, including + // highlighting info (the styles array). + var Line = CodeMirror.Line = function(text, markedSpans, estimateHeight) { + this.text = text; + attachMarkedSpans(this, markedSpans); + this.height = estimateHeight ? estimateHeight(this) : 1; + }; + eventMixin(Line); + Line.prototype.lineNo = function() { return lineNo(this); }; + + // Change the content (text, markers) of a line. Automatically + // invalidates cached information and tries to re-estimate the + // line's height. + function updateLine(line, text, markedSpans, estimateHeight) { + line.text = text; + if (line.stateAfter) line.stateAfter = null; + if (line.styles) line.styles = null; + if (line.order != null) line.order = null; + detachMarkedSpans(line); + attachMarkedSpans(line, markedSpans); + var estHeight = estimateHeight ? estimateHeight(line) : 1; + if (estHeight != line.height) updateLineHeight(line, estHeight); + } + + // Detach a line from the document tree and its markers. + function cleanUpLine(line) { + line.parent = null; + detachMarkedSpans(line); + } + + function extractLineClasses(type, output) { + if (type) for (;;) { + var lineClass = type.match(/(?:^|\s+)line-(background-)?(\S+)/); + if (!lineClass) break; + type = type.slice(0, lineClass.index) + type.slice(lineClass.index + lineClass[0].length); + var prop = lineClass[1] ? "bgClass" : "textClass"; + if (output[prop] == null) + output[prop] = lineClass[2]; + else if (!(new RegExp("(?:^|\s)" + lineClass[2] + "(?:$|\s)")).test(output[prop])) + output[prop] += " " + lineClass[2]; + } + return type; + } + + function callBlankLine(mode, state) { + if (mode.blankLine) return mode.blankLine(state); + if (!mode.innerMode) return; + var inner = CodeMirror.innerMode(mode, state); + if (inner.mode.blankLine) return inner.mode.blankLine(inner.state); + } + + function readToken(mode, stream, state, inner) { + for (var i = 0; i < 10; i++) { + if (inner) inner[0] = CodeMirror.innerMode(mode, state).mode; + var style = mode.token(stream, state); + if (stream.pos > stream.start) return style; + } + throw new Error("Mode " + mode.name + " failed to advance stream."); + } + + // Utility for getTokenAt and getLineTokens + function takeToken(cm, pos, precise, asArray) { + function getObj(copy) { + return {start: stream.start, end: stream.pos, + string: stream.current(), + type: style || null, + state: copy ? copyState(doc.mode, state) : state}; + } + + var doc = cm.doc, mode = doc.mode, style; + pos = clipPos(doc, pos); + var line = getLine(doc, pos.line), state = getStateBefore(cm, pos.line, precise); + var stream = new StringStream(line.text, cm.options.tabSize), tokens; + if (asArray) tokens = []; + while ((asArray || stream.pos < pos.ch) && !stream.eol()) { + stream.start = stream.pos; + style = readToken(mode, stream, state); + if (asArray) tokens.push(getObj(true)); + } + return asArray ? tokens : getObj(); + } + + // Run the given mode's parser over a line, calling f for each token. + function runMode(cm, text, mode, state, f, lineClasses, forceToEnd) { + var flattenSpans = mode.flattenSpans; + if (flattenSpans == null) flattenSpans = cm.options.flattenSpans; + var curStart = 0, curStyle = null; + var stream = new StringStream(text, cm.options.tabSize), style; + var inner = cm.options.addModeClass && [null]; + if (text == "") extractLineClasses(callBlankLine(mode, state), lineClasses); + while (!stream.eol()) { + if (stream.pos > cm.options.maxHighlightLength) { + flattenSpans = false; + if (forceToEnd) processLine(cm, text, state, stream.pos); + stream.pos = text.length; + style = null; + } else { + style = extractLineClasses(readToken(mode, stream, state, inner), lineClasses); + } + if (inner) { + var mName = inner[0].name; + if (mName) style = "m-" + (style ? mName + " " + style : mName); + } + if (!flattenSpans || curStyle != style) { + while (curStart < stream.start) { + curStart = Math.min(stream.start, curStart + 50000); + f(curStart, curStyle); + } + curStyle = style; + } + stream.start = stream.pos; + } + while (curStart < stream.pos) { + // Webkit seems to refuse to render text nodes longer than 57444 characters + var pos = Math.min(stream.pos, curStart + 50000); + f(pos, curStyle); + curStart = pos; + } + } + + // Compute a style array (an array starting with a mode generation + // -- for invalidation -- followed by pairs of end positions and + // style strings), which is used to highlight the tokens on the + // line. + function highlightLine(cm, line, state, forceToEnd) { + // A styles array always starts with a number identifying the + // mode/overlays that it is based on (for easy invalidation). + var st = [cm.state.modeGen], lineClasses = {}; + // Compute the base array of styles + runMode(cm, line.text, cm.doc.mode, state, function(end, style) { + st.push(end, style); + }, lineClasses, forceToEnd); + + // Run overlays, adjust style array. + for (var o = 0; o < cm.state.overlays.length; ++o) { + var overlay = cm.state.overlays[o], i = 1, at = 0; + runMode(cm, line.text, overlay.mode, true, function(end, style) { + var start = i; + // Ensure there's a token end at the current position, and that i points at it + while (at < end) { + var i_end = st[i]; + if (i_end > end) + st.splice(i, 1, end, st[i+1], i_end); + i += 2; + at = Math.min(end, i_end); + } + if (!style) return; + if (overlay.opaque) { + st.splice(start, i - start, end, "cm-overlay " + style); + i = start + 2; + } else { + for (; start < i; start += 2) { + var cur = st[start+1]; + st[start+1] = (cur ? cur + " " : "") + "cm-overlay " + style; + } + } + }, lineClasses); + } + + return {styles: st, classes: lineClasses.bgClass || lineClasses.textClass ? lineClasses : null}; + } + + function getLineStyles(cm, line, updateFrontier) { + if (!line.styles || line.styles[0] != cm.state.modeGen) { + var state = getStateBefore(cm, lineNo(line)); + var result = highlightLine(cm, line, line.text.length > cm.options.maxHighlightLength ? copyState(cm.doc.mode, state) : state); + line.stateAfter = state; + line.styles = result.styles; + if (result.classes) line.styleClasses = result.classes; + else if (line.styleClasses) line.styleClasses = null; + if (updateFrontier === cm.doc.frontier) cm.doc.frontier++; + } + return line.styles; + } + + // Lightweight form of highlight -- proceed over this line and + // update state, but don't save a style array. Used for lines that + // aren't currently visible. + function processLine(cm, text, state, startAt) { + var mode = cm.doc.mode; + var stream = new StringStream(text, cm.options.tabSize); + stream.start = stream.pos = startAt || 0; + if (text == "") callBlankLine(mode, state); + while (!stream.eol()) { + readToken(mode, stream, state); + stream.start = stream.pos; + } + } + + // Convert a style as returned by a mode (either null, or a string + // containing one or more styles) to a CSS style. This is cached, + // and also looks for line-wide styles. + var styleToClassCache = {}, styleToClassCacheWithMode = {}; + function interpretTokenStyle(style, options) { + if (!style || /^\s*$/.test(style)) return null; + var cache = options.addModeClass ? styleToClassCacheWithMode : styleToClassCache; + return cache[style] || + (cache[style] = style.replace(/\S+/g, "cm-$&")); + } + + // Render the DOM representation of the text of a line. Also builds + // up a 'line map', which points at the DOM nodes that represent + // specific stretches of text, and is used by the measuring code. + // The returned object contains the DOM node, this map, and + // information about line-wide styles that were set by the mode. + function buildLineContent(cm, lineView) { + // The padding-right forces the element to have a 'border', which + // is needed on Webkit to be able to get line-level bounding + // rectangles for it (in measureChar). + var content = elt("span", null, null, webkit ? "padding-right: .1px" : null); + var builder = {pre: elt("pre", [content], "CodeMirror-line"), content: content, + col: 0, pos: 0, cm: cm, + splitSpaces: (ie || webkit) && cm.getOption("lineWrapping")}; + lineView.measure = {}; + + // Iterate over the logical lines that make up this visual line. + for (var i = 0; i <= (lineView.rest ? lineView.rest.length : 0); i++) { + var line = i ? lineView.rest[i - 1] : lineView.line, order; + builder.pos = 0; + builder.addToken = buildToken; + // Optionally wire in some hacks into the token-rendering + // algorithm, to deal with browser quirks. + if (hasBadBidiRects(cm.display.measure) && (order = getOrder(line))) + builder.addToken = buildTokenBadBidi(builder.addToken, order); + builder.map = []; + var allowFrontierUpdate = lineView != cm.display.externalMeasured && lineNo(line); + insertLineContent(line, builder, getLineStyles(cm, line, allowFrontierUpdate)); + if (line.styleClasses) { + if (line.styleClasses.bgClass) + builder.bgClass = joinClasses(line.styleClasses.bgClass, builder.bgClass || ""); + if (line.styleClasses.textClass) + builder.textClass = joinClasses(line.styleClasses.textClass, builder.textClass || ""); + } + + // Ensure at least a single node is present, for measuring. + if (builder.map.length == 0) + builder.map.push(0, 0, builder.content.appendChild(zeroWidthElement(cm.display.measure))); + + // Store the map and a cache object for the current logical line + if (i == 0) { + lineView.measure.map = builder.map; + lineView.measure.cache = {}; + } else { + (lineView.measure.maps || (lineView.measure.maps = [])).push(builder.map); + (lineView.measure.caches || (lineView.measure.caches = [])).push({}); + } + } + + // See issue #2901 + if (webkit && /\bcm-tab\b/.test(builder.content.lastChild.className)) + builder.content.className = "cm-tab-wrap-hack"; + + signal(cm, "renderLine", cm, lineView.line, builder.pre); + if (builder.pre.className) + builder.textClass = joinClasses(builder.pre.className, builder.textClass || ""); + + return builder; + } + + function defaultSpecialCharPlaceholder(ch) { + var token = elt("span", "\u2022", "cm-invalidchar"); + token.title = "\\u" + ch.charCodeAt(0).toString(16); + token.setAttribute("aria-label", token.title); + return token; + } + + // Build up the DOM representation for a single token, and add it to + // the line map. Takes care to render special characters separately. + function buildToken(builder, text, style, startStyle, endStyle, title, css) { + if (!text) return; + var displayText = builder.splitSpaces ? text.replace(/ {3,}/g, splitSpaces) : text; + var special = builder.cm.state.specialChars, mustWrap = false; + if (!special.test(text)) { + builder.col += text.length; + var content = document.createTextNode(displayText); + builder.map.push(builder.pos, builder.pos + text.length, content); + if (ie && ie_version < 9) mustWrap = true; + builder.pos += text.length; + } else { + var content = document.createDocumentFragment(), pos = 0; + while (true) { + special.lastIndex = pos; + var m = special.exec(text); + var skipped = m ? m.index - pos : text.length - pos; + if (skipped) { + var txt = document.createTextNode(displayText.slice(pos, pos + skipped)); + if (ie && ie_version < 9) content.appendChild(elt("span", [txt])); + else content.appendChild(txt); + builder.map.push(builder.pos, builder.pos + skipped, txt); + builder.col += skipped; + builder.pos += skipped; + } + if (!m) break; + pos += skipped + 1; + if (m[0] == "\t") { + var tabSize = builder.cm.options.tabSize, tabWidth = tabSize - builder.col % tabSize; + var txt = content.appendChild(elt("span", spaceStr(tabWidth), "cm-tab")); + txt.setAttribute("role", "presentation"); + txt.setAttribute("cm-text", "\t"); + builder.col += tabWidth; + } else if (m[0] == "\r" || m[0] == "\n") { + var txt = content.appendChild(elt("span", m[0] == "\r" ? "\u240d" : "\u2424", "cm-invalidchar")); + txt.setAttribute("cm-text", m[0]); + builder.col += 1; + } else { + var txt = builder.cm.options.specialCharPlaceholder(m[0]); + txt.setAttribute("cm-text", m[0]); + if (ie && ie_version < 9) content.appendChild(elt("span", [txt])); + else content.appendChild(txt); + builder.col += 1; + } + builder.map.push(builder.pos, builder.pos + 1, txt); + builder.pos++; + } + } + if (style || startStyle || endStyle || mustWrap || css) { + var fullStyle = style || ""; + if (startStyle) fullStyle += startStyle; + if (endStyle) fullStyle += endStyle; + var token = elt("span", [content], fullStyle, css); + if (title) token.title = title; + return builder.content.appendChild(token); + } + builder.content.appendChild(content); + } + + function splitSpaces(old) { + var out = " "; + for (var i = 0; i < old.length - 2; ++i) out += i % 2 ? " " : "\u00a0"; + out += " "; + return out; + } + + // Work around nonsense dimensions being reported for stretches of + // right-to-left text. + function buildTokenBadBidi(inner, order) { + return function(builder, text, style, startStyle, endStyle, title, css) { + style = style ? style + " cm-force-border" : "cm-force-border"; + var start = builder.pos, end = start + text.length; + for (;;) { + // Find the part that overlaps with the start of this text + for (var i = 0; i < order.length; i++) { + var part = order[i]; + if (part.to > start && part.from <= start) break; + } + if (part.to >= end) return inner(builder, text, style, startStyle, endStyle, title, css); + inner(builder, text.slice(0, part.to - start), style, startStyle, null, title, css); + startStyle = null; + text = text.slice(part.to - start); + start = part.to; + } + }; + } + + function buildCollapsedSpan(builder, size, marker, ignoreWidget) { + var widget = !ignoreWidget && marker.widgetNode; + if (widget) builder.map.push(builder.pos, builder.pos + size, widget); + if (!ignoreWidget && builder.cm.display.input.needsContentAttribute) { + if (!widget) + widget = builder.content.appendChild(document.createElement("span")); + widget.setAttribute("cm-marker", marker.id); + } + if (widget) { + builder.cm.display.input.setUneditable(widget); + builder.content.appendChild(widget); + } + builder.pos += size; + } + + // Outputs a number of spans to make up a line, taking highlighting + // and marked text into account. + function insertLineContent(line, builder, styles) { + var spans = line.markedSpans, allText = line.text, at = 0; + if (!spans) { + for (var i = 1; i < styles.length; i+=2) + builder.addToken(builder, allText.slice(at, at = styles[i]), interpretTokenStyle(styles[i+1], builder.cm.options)); + return; + } + + var len = allText.length, pos = 0, i = 1, text = "", style, css; + var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, title, collapsed; + for (;;) { + if (nextChange == pos) { // Update current marker set + spanStyle = spanEndStyle = spanStartStyle = title = css = ""; + collapsed = null; nextChange = Infinity; + var foundBookmarks = [], endStyles + for (var j = 0; j < spans.length; ++j) { + var sp = spans[j], m = sp.marker; + if (m.type == "bookmark" && sp.from == pos && m.widgetNode) { + foundBookmarks.push(m); + } else if (sp.from <= pos && (sp.to == null || sp.to > pos || m.collapsed && sp.to == pos && sp.from == pos)) { + if (sp.to != null && sp.to != pos && nextChange > sp.to) { + nextChange = sp.to; + spanEndStyle = ""; + } + if (m.className) spanStyle += " " + m.className; + if (m.css) css = (css ? css + ";" : "") + m.css; + if (m.startStyle && sp.from == pos) spanStartStyle += " " + m.startStyle; + if (m.endStyle && sp.to == nextChange) (endStyles || (endStyles = [])).push(m.endStyle, sp.to) + if (m.title && !title) title = m.title; + if (m.collapsed && (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0)) + collapsed = sp; + } else if (sp.from > pos && nextChange > sp.from) { + nextChange = sp.from; + } + } + if (endStyles) for (var j = 0; j < endStyles.length; j += 2) + if (endStyles[j + 1] == nextChange) spanEndStyle += " " + endStyles[j] + + if (!collapsed || collapsed.from == pos) for (var j = 0; j < foundBookmarks.length; ++j) + buildCollapsedSpan(builder, 0, foundBookmarks[j]); + if (collapsed && (collapsed.from || 0) == pos) { + buildCollapsedSpan(builder, (collapsed.to == null ? len + 1 : collapsed.to) - pos, + collapsed.marker, collapsed.from == null); + if (collapsed.to == null) return; + if (collapsed.to == pos) collapsed = false; + } + } + if (pos >= len) break; + + var upto = Math.min(len, nextChange); + while (true) { + if (text) { + var end = pos + text.length; + if (!collapsed) { + var tokenText = end > upto ? text.slice(0, upto - pos) : text; + builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle, + spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : "", title, css); + } + if (end >= upto) {text = text.slice(upto - pos); pos = upto; break;} + pos = end; + spanStartStyle = ""; + } + text = allText.slice(at, at = styles[i++]); + style = interpretTokenStyle(styles[i++], builder.cm.options); + } + } + } + + // DOCUMENT DATA STRUCTURE + + // By default, updates that start and end at the beginning of a line + // are treated specially, in order to make the association of line + // widgets and marker elements with the text behave more intuitive. + function isWholeLineUpdate(doc, change) { + return change.from.ch == 0 && change.to.ch == 0 && lst(change.text) == "" && + (!doc.cm || doc.cm.options.wholeLineUpdateBefore); + } + + // Perform a change on the document data structure. + function updateDoc(doc, change, markedSpans, estimateHeight) { + function spansFor(n) {return markedSpans ? markedSpans[n] : null;} + function update(line, text, spans) { + updateLine(line, text, spans, estimateHeight); + signalLater(line, "change", line, change); + } + function linesFor(start, end) { + for (var i = start, result = []; i < end; ++i) + result.push(new Line(text[i], spansFor(i), estimateHeight)); + return result; + } + + var from = change.from, to = change.to, text = change.text; + var firstLine = getLine(doc, from.line), lastLine = getLine(doc, to.line); + var lastText = lst(text), lastSpans = spansFor(text.length - 1), nlines = to.line - from.line; + + // Adjust the line structure + if (change.full) { + doc.insert(0, linesFor(0, text.length)); + doc.remove(text.length, doc.size - text.length); + } else if (isWholeLineUpdate(doc, change)) { + // This is a whole-line replace. Treated specially to make + // sure line objects move the way they are supposed to. + var added = linesFor(0, text.length - 1); + update(lastLine, lastLine.text, lastSpans); + if (nlines) doc.remove(from.line, nlines); + if (added.length) doc.insert(from.line, added); + } else if (firstLine == lastLine) { + if (text.length == 1) { + update(firstLine, firstLine.text.slice(0, from.ch) + lastText + firstLine.text.slice(to.ch), lastSpans); + } else { + var added = linesFor(1, text.length - 1); + added.push(new Line(lastText + firstLine.text.slice(to.ch), lastSpans, estimateHeight)); + update(firstLine, firstLine.text.slice(0, from.ch) + text[0], spansFor(0)); + doc.insert(from.line + 1, added); + } + } else if (text.length == 1) { + update(firstLine, firstLine.text.slice(0, from.ch) + text[0] + lastLine.text.slice(to.ch), spansFor(0)); + doc.remove(from.line + 1, nlines); + } else { + update(firstLine, firstLine.text.slice(0, from.ch) + text[0], spansFor(0)); + update(lastLine, lastText + lastLine.text.slice(to.ch), lastSpans); + var added = linesFor(1, text.length - 1); + if (nlines > 1) doc.remove(from.line + 1, nlines - 1); + doc.insert(from.line + 1, added); + } + + signalLater(doc, "change", doc, change); + } + + // The document is represented as a BTree consisting of leaves, with + // chunk of lines in them, and branches, with up to ten leaves or + // other branch nodes below them. The top node is always a branch + // node, and is the document object itself (meaning it has + // additional methods and properties). + // + // All nodes have parent links. The tree is used both to go from + // line numbers to line objects, and to go from objects to numbers. + // It also indexes by height, and is used to convert between height + // and line object, and to find the total height of the document. + // + // See also http://marijnhaverbeke.nl/blog/codemirror-line-tree.html + + function LeafChunk(lines) { + this.lines = lines; + this.parent = null; + for (var i = 0, height = 0; i < lines.length; ++i) { + lines[i].parent = this; + height += lines[i].height; + } + this.height = height; + } + + LeafChunk.prototype = { + chunkSize: function() { return this.lines.length; }, + // Remove the n lines at offset 'at'. + removeInner: function(at, n) { + for (var i = at, e = at + n; i < e; ++i) { + var line = this.lines[i]; + this.height -= line.height; + cleanUpLine(line); + signalLater(line, "delete"); + } + this.lines.splice(at, n); + }, + // Helper used to collapse a small branch into a single leaf. + collapse: function(lines) { + lines.push.apply(lines, this.lines); + }, + // Insert the given array of lines at offset 'at', count them as + // having the given height. + insertInner: function(at, lines, height) { + this.height += height; + this.lines = this.lines.slice(0, at).concat(lines).concat(this.lines.slice(at)); + for (var i = 0; i < lines.length; ++i) lines[i].parent = this; + }, + // Used to iterate over a part of the tree. + iterN: function(at, n, op) { + for (var e = at + n; at < e; ++at) + if (op(this.lines[at])) return true; + } + }; + + function BranchChunk(children) { + this.children = children; + var size = 0, height = 0; + for (var i = 0; i < children.length; ++i) { + var ch = children[i]; + size += ch.chunkSize(); height += ch.height; + ch.parent = this; + } + this.size = size; + this.height = height; + this.parent = null; + } + + BranchChunk.prototype = { + chunkSize: function() { return this.size; }, + removeInner: function(at, n) { + this.size -= n; + for (var i = 0; i < this.children.length; ++i) { + var child = this.children[i], sz = child.chunkSize(); + if (at < sz) { + var rm = Math.min(n, sz - at), oldHeight = child.height; + child.removeInner(at, rm); + this.height -= oldHeight - child.height; + if (sz == rm) { this.children.splice(i--, 1); child.parent = null; } + if ((n -= rm) == 0) break; + at = 0; + } else at -= sz; + } + // If the result is smaller than 25 lines, ensure that it is a + // single leaf node. + if (this.size - n < 25 && + (this.children.length > 1 || !(this.children[0] instanceof LeafChunk))) { + var lines = []; + this.collapse(lines); + this.children = [new LeafChunk(lines)]; + this.children[0].parent = this; + } + }, + collapse: function(lines) { + for (var i = 0; i < this.children.length; ++i) this.children[i].collapse(lines); + }, + insertInner: function(at, lines, height) { + this.size += lines.length; + this.height += height; + for (var i = 0; i < this.children.length; ++i) { + var child = this.children[i], sz = child.chunkSize(); + if (at <= sz) { + child.insertInner(at, lines, height); + if (child.lines && child.lines.length > 50) { + while (child.lines.length > 50) { + var spilled = child.lines.splice(child.lines.length - 25, 25); + var newleaf = new LeafChunk(spilled); + child.height -= newleaf.height; + this.children.splice(i + 1, 0, newleaf); + newleaf.parent = this; + } + this.maybeSpill(); + } + break; + } + at -= sz; + } + }, + // When a node has grown, check whether it should be split. + maybeSpill: function() { + if (this.children.length <= 10) return; + var me = this; + do { + var spilled = me.children.splice(me.children.length - 5, 5); + var sibling = new BranchChunk(spilled); + if (!me.parent) { // Become the parent node + var copy = new BranchChunk(me.children); + copy.parent = me; + me.children = [copy, sibling]; + me = copy; + } else { + me.size -= sibling.size; + me.height -= sibling.height; + var myIndex = indexOf(me.parent.children, me); + me.parent.children.splice(myIndex + 1, 0, sibling); + } + sibling.parent = me.parent; + } while (me.children.length > 10); + me.parent.maybeSpill(); + }, + iterN: function(at, n, op) { + for (var i = 0; i < this.children.length; ++i) { + var child = this.children[i], sz = child.chunkSize(); + if (at < sz) { + var used = Math.min(n, sz - at); + if (child.iterN(at, used, op)) return true; + if ((n -= used) == 0) break; + at = 0; + } else at -= sz; + } + } + }; + + var nextDocId = 0; + var Doc = CodeMirror.Doc = function(text, mode, firstLine, lineSep) { + if (!(this instanceof Doc)) return new Doc(text, mode, firstLine, lineSep); + if (firstLine == null) firstLine = 0; + + BranchChunk.call(this, [new LeafChunk([new Line("", null)])]); + this.first = firstLine; + this.scrollTop = this.scrollLeft = 0; + this.cantEdit = false; + this.cleanGeneration = 1; + this.frontier = firstLine; + var start = Pos(firstLine, 0); + this.sel = simpleSelection(start); + this.history = new History(null); + this.id = ++nextDocId; + this.modeOption = mode; + this.lineSep = lineSep; + this.extend = false; + + if (typeof text == "string") text = this.splitLines(text); + updateDoc(this, {from: start, to: start, text: text}); + setSelection(this, simpleSelection(start), sel_dontScroll); + }; + + Doc.prototype = createObj(BranchChunk.prototype, { + constructor: Doc, + // Iterate over the document. Supports two forms -- with only one + // argument, it calls that for each line in the document. With + // three, it iterates over the range given by the first two (with + // the second being non-inclusive). + iter: function(from, to, op) { + if (op) this.iterN(from - this.first, to - from, op); + else this.iterN(this.first, this.first + this.size, from); + }, + + // Non-public interface for adding and removing lines. + insert: function(at, lines) { + var height = 0; + for (var i = 0; i < lines.length; ++i) height += lines[i].height; + this.insertInner(at - this.first, lines, height); + }, + remove: function(at, n) { this.removeInner(at - this.first, n); }, + + // From here, the methods are part of the public interface. Most + // are also available from CodeMirror (editor) instances. + + getValue: function(lineSep) { + var lines = getLines(this, this.first, this.first + this.size); + if (lineSep === false) return lines; + return lines.join(lineSep || this.lineSeparator()); + }, + setValue: docMethodOp(function(code) { + var top = Pos(this.first, 0), last = this.first + this.size - 1; + makeChange(this, {from: top, to: Pos(last, getLine(this, last).text.length), + text: this.splitLines(code), origin: "setValue", full: true}, true); + setSelection(this, simpleSelection(top)); + }), + replaceRange: function(code, from, to, origin) { + from = clipPos(this, from); + to = to ? clipPos(this, to) : from; + replaceRange(this, code, from, to, origin); + }, + getRange: function(from, to, lineSep) { + var lines = getBetween(this, clipPos(this, from), clipPos(this, to)); + if (lineSep === false) return lines; + return lines.join(lineSep || this.lineSeparator()); + }, + + getLine: function(line) {var l = this.getLineHandle(line); return l && l.text;}, + + getLineHandle: function(line) {if (isLine(this, line)) return getLine(this, line);}, + getLineNumber: function(line) {return lineNo(line);}, + + getLineHandleVisualStart: function(line) { + if (typeof line == "number") line = getLine(this, line); + return visualLine(line); + }, + + lineCount: function() {return this.size;}, + firstLine: function() {return this.first;}, + lastLine: function() {return this.first + this.size - 1;}, + + clipPos: function(pos) {return clipPos(this, pos);}, + + getCursor: function(start) { + var range = this.sel.primary(), pos; + if (start == null || start == "head") pos = range.head; + else if (start == "anchor") pos = range.anchor; + else if (start == "end" || start == "to" || start === false) pos = range.to(); + else pos = range.from(); + return pos; + }, + listSelections: function() { return this.sel.ranges; }, + somethingSelected: function() {return this.sel.somethingSelected();}, + + setCursor: docMethodOp(function(line, ch, options) { + setSimpleSelection(this, clipPos(this, typeof line == "number" ? Pos(line, ch || 0) : line), null, options); + }), + setSelection: docMethodOp(function(anchor, head, options) { + setSimpleSelection(this, clipPos(this, anchor), clipPos(this, head || anchor), options); + }), + extendSelection: docMethodOp(function(head, other, options) { + extendSelection(this, clipPos(this, head), other && clipPos(this, other), options); + }), + extendSelections: docMethodOp(function(heads, options) { + extendSelections(this, clipPosArray(this, heads), options); + }), + extendSelectionsBy: docMethodOp(function(f, options) { + var heads = map(this.sel.ranges, f); + extendSelections(this, clipPosArray(this, heads), options); + }), + setSelections: docMethodOp(function(ranges, primary, options) { + if (!ranges.length) return; + for (var i = 0, out = []; i < ranges.length; i++) + out[i] = new Range(clipPos(this, ranges[i].anchor), + clipPos(this, ranges[i].head)); + if (primary == null) primary = Math.min(ranges.length - 1, this.sel.primIndex); + setSelection(this, normalizeSelection(out, primary), options); + }), + addSelection: docMethodOp(function(anchor, head, options) { + var ranges = this.sel.ranges.slice(0); + ranges.push(new Range(clipPos(this, anchor), clipPos(this, head || anchor))); + setSelection(this, normalizeSelection(ranges, ranges.length - 1), options); + }), + + getSelection: function(lineSep) { + var ranges = this.sel.ranges, lines; + for (var i = 0; i < ranges.length; i++) { + var sel = getBetween(this, ranges[i].from(), ranges[i].to()); + lines = lines ? lines.concat(sel) : sel; + } + if (lineSep === false) return lines; + else return lines.join(lineSep || this.lineSeparator()); + }, + getSelections: function(lineSep) { + var parts = [], ranges = this.sel.ranges; + for (var i = 0; i < ranges.length; i++) { + var sel = getBetween(this, ranges[i].from(), ranges[i].to()); + if (lineSep !== false) sel = sel.join(lineSep || this.lineSeparator()); + parts[i] = sel; + } + return parts; + }, + replaceSelection: function(code, collapse, origin) { + var dup = []; + for (var i = 0; i < this.sel.ranges.length; i++) + dup[i] = code; + this.replaceSelections(dup, collapse, origin || "+input"); + }, + replaceSelections: docMethodOp(function(code, collapse, origin) { + var changes = [], sel = this.sel; + for (var i = 0; i < sel.ranges.length; i++) { + var range = sel.ranges[i]; + changes[i] = {from: range.from(), to: range.to(), text: this.splitLines(code[i]), origin: origin}; + } + var newSel = collapse && collapse != "end" && computeReplacedSel(this, changes, collapse); + for (var i = changes.length - 1; i >= 0; i--) + makeChange(this, changes[i]); + if (newSel) setSelectionReplaceHistory(this, newSel); + else if (this.cm) ensureCursorVisible(this.cm); + }), + undo: docMethodOp(function() {makeChangeFromHistory(this, "undo");}), + redo: docMethodOp(function() {makeChangeFromHistory(this, "redo");}), + undoSelection: docMethodOp(function() {makeChangeFromHistory(this, "undo", true);}), + redoSelection: docMethodOp(function() {makeChangeFromHistory(this, "redo", true);}), + + setExtending: function(val) {this.extend = val;}, + getExtending: function() {return this.extend;}, + + historySize: function() { + var hist = this.history, done = 0, undone = 0; + for (var i = 0; i < hist.done.length; i++) if (!hist.done[i].ranges) ++done; + for (var i = 0; i < hist.undone.length; i++) if (!hist.undone[i].ranges) ++undone; + return {undo: done, redo: undone}; + }, + clearHistory: function() {this.history = new History(this.history.maxGeneration);}, + + markClean: function() { + this.cleanGeneration = this.changeGeneration(true); + }, + changeGeneration: function(forceSplit) { + if (forceSplit) + this.history.lastOp = this.history.lastSelOp = this.history.lastOrigin = null; + return this.history.generation; + }, + isClean: function (gen) { + return this.history.generation == (gen || this.cleanGeneration); + }, + + getHistory: function() { + return {done: copyHistoryArray(this.history.done), + undone: copyHistoryArray(this.history.undone)}; + }, + setHistory: function(histData) { + var hist = this.history = new History(this.history.maxGeneration); + hist.done = copyHistoryArray(histData.done.slice(0), null, true); + hist.undone = copyHistoryArray(histData.undone.slice(0), null, true); + }, + + addLineClass: docMethodOp(function(handle, where, cls) { + return changeLine(this, handle, where == "gutter" ? "gutter" : "class", function(line) { + var prop = where == "text" ? "textClass" + : where == "background" ? "bgClass" + : where == "gutter" ? "gutterClass" : "wrapClass"; + if (!line[prop]) line[prop] = cls; + else if (classTest(cls).test(line[prop])) return false; + else line[prop] += " " + cls; + return true; + }); + }), + removeLineClass: docMethodOp(function(handle, where, cls) { + return changeLine(this, handle, where == "gutter" ? "gutter" : "class", function(line) { + var prop = where == "text" ? "textClass" + : where == "background" ? "bgClass" + : where == "gutter" ? "gutterClass" : "wrapClass"; + var cur = line[prop]; + if (!cur) return false; + else if (cls == null) line[prop] = null; + else { + var found = cur.match(classTest(cls)); + if (!found) return false; + var end = found.index + found[0].length; + line[prop] = cur.slice(0, found.index) + (!found.index || end == cur.length ? "" : " ") + cur.slice(end) || null; + } + return true; + }); + }), + + addLineWidget: docMethodOp(function(handle, node, options) { + return addLineWidget(this, handle, node, options); + }), + removeLineWidget: function(widget) { widget.clear(); }, + + markText: function(from, to, options) { + return markText(this, clipPos(this, from), clipPos(this, to), options, options && options.type || "range"); + }, + setBookmark: function(pos, options) { + var realOpts = {replacedWith: options && (options.nodeType == null ? options.widget : options), + insertLeft: options && options.insertLeft, + clearWhenEmpty: false, shared: options && options.shared, + handleMouseEvents: options && options.handleMouseEvents}; + pos = clipPos(this, pos); + return markText(this, pos, pos, realOpts, "bookmark"); + }, + findMarksAt: function(pos) { + pos = clipPos(this, pos); + var markers = [], spans = getLine(this, pos.line).markedSpans; + if (spans) for (var i = 0; i < spans.length; ++i) { + var span = spans[i]; + if ((span.from == null || span.from <= pos.ch) && + (span.to == null || span.to >= pos.ch)) + markers.push(span.marker.parent || span.marker); + } + return markers; + }, + findMarks: function(from, to, filter) { + from = clipPos(this, from); to = clipPos(this, to); + var found = [], lineNo = from.line; + this.iter(from.line, to.line + 1, function(line) { + var spans = line.markedSpans; + if (spans) for (var i = 0; i < spans.length; i++) { + var span = spans[i]; + if (!(span.to != null && lineNo == from.line && from.ch >= span.to || + span.from == null && lineNo != from.line || + span.from != null && lineNo == to.line && span.from >= to.ch) && + (!filter || filter(span.marker))) + found.push(span.marker.parent || span.marker); + } + ++lineNo; + }); + return found; + }, + getAllMarks: function() { + var markers = []; + this.iter(function(line) { + var sps = line.markedSpans; + if (sps) for (var i = 0; i < sps.length; ++i) + if (sps[i].from != null) markers.push(sps[i].marker); + }); + return markers; + }, + + posFromIndex: function(off) { + var ch, lineNo = this.first, sepSize = this.lineSeparator().length; + this.iter(function(line) { + var sz = line.text.length + sepSize; + if (sz > off) { ch = off; return true; } + off -= sz; + ++lineNo; + }); + return clipPos(this, Pos(lineNo, ch)); + }, + indexFromPos: function (coords) { + coords = clipPos(this, coords); + var index = coords.ch; + if (coords.line < this.first || coords.ch < 0) return 0; + var sepSize = this.lineSeparator().length; + this.iter(this.first, coords.line, function (line) { + index += line.text.length + sepSize; + }); + return index; + }, + + copy: function(copyHistory) { + var doc = new Doc(getLines(this, this.first, this.first + this.size), + this.modeOption, this.first, this.lineSep); + doc.scrollTop = this.scrollTop; doc.scrollLeft = this.scrollLeft; + doc.sel = this.sel; + doc.extend = false; + if (copyHistory) { + doc.history.undoDepth = this.history.undoDepth; + doc.setHistory(this.getHistory()); + } + return doc; + }, + + linkedDoc: function(options) { + if (!options) options = {}; + var from = this.first, to = this.first + this.size; + if (options.from != null && options.from > from) from = options.from; + if (options.to != null && options.to < to) to = options.to; + var copy = new Doc(getLines(this, from, to), options.mode || this.modeOption, from, this.lineSep); + if (options.sharedHist) copy.history = this.history; + (this.linked || (this.linked = [])).push({doc: copy, sharedHist: options.sharedHist}); + copy.linked = [{doc: this, isParent: true, sharedHist: options.sharedHist}]; + copySharedMarkers(copy, findSharedMarkers(this)); + return copy; + }, + unlinkDoc: function(other) { + if (other instanceof CodeMirror) other = other.doc; + if (this.linked) for (var i = 0; i < this.linked.length; ++i) { + var link = this.linked[i]; + if (link.doc != other) continue; + this.linked.splice(i, 1); + other.unlinkDoc(this); + detachSharedMarkers(findSharedMarkers(this)); + break; + } + // If the histories were shared, split them again + if (other.history == this.history) { + var splitIds = [other.id]; + linkedDocs(other, function(doc) {splitIds.push(doc.id);}, true); + other.history = new History(null); + other.history.done = copyHistoryArray(this.history.done, splitIds); + other.history.undone = copyHistoryArray(this.history.undone, splitIds); + } + }, + iterLinkedDocs: function(f) {linkedDocs(this, f);}, + + getMode: function() {return this.mode;}, + getEditor: function() {return this.cm;}, + + splitLines: function(str) { + if (this.lineSep) return str.split(this.lineSep); + return splitLinesAuto(str); + }, + lineSeparator: function() { return this.lineSep || "\n"; } + }); + + // Public alias. + Doc.prototype.eachLine = Doc.prototype.iter; + + // Set up methods on CodeMirror's prototype to redirect to the editor's document. + var dontDelegate = "iter insert remove copy getEditor constructor".split(" "); + for (var prop in Doc.prototype) if (Doc.prototype.hasOwnProperty(prop) && indexOf(dontDelegate, prop) < 0) + CodeMirror.prototype[prop] = (function(method) { + return function() {return method.apply(this.doc, arguments);}; + })(Doc.prototype[prop]); + + eventMixin(Doc); + + // Call f for all linked documents. + function linkedDocs(doc, f, sharedHistOnly) { + function propagate(doc, skip, sharedHist) { + if (doc.linked) for (var i = 0; i < doc.linked.length; ++i) { + var rel = doc.linked[i]; + if (rel.doc == skip) continue; + var shared = sharedHist && rel.sharedHist; + if (sharedHistOnly && !shared) continue; + f(rel.doc, shared); + propagate(rel.doc, doc, shared); + } + } + propagate(doc, null, true); + } + + // Attach a document to an editor. + function attachDoc(cm, doc) { + if (doc.cm) throw new Error("This document is already in use."); + cm.doc = doc; + doc.cm = cm; + estimateLineHeights(cm); + loadMode(cm); + if (!cm.options.lineWrapping) findMaxLine(cm); + cm.options.mode = doc.modeOption; + regChange(cm); + } + + // LINE UTILITIES + + // Find the line object corresponding to the given line number. + function getLine(doc, n) { + n -= doc.first; + if (n < 0 || n >= doc.size) throw new Error("There is no line " + (n + doc.first) + " in the document."); + for (var chunk = doc; !chunk.lines;) { + for (var i = 0;; ++i) { + var child = chunk.children[i], sz = child.chunkSize(); + if (n < sz) { chunk = child; break; } + n -= sz; + } + } + return chunk.lines[n]; + } + + // Get the part of a document between two positions, as an array of + // strings. + function getBetween(doc, start, end) { + var out = [], n = start.line; + doc.iter(start.line, end.line + 1, function(line) { + var text = line.text; + if (n == end.line) text = text.slice(0, end.ch); + if (n == start.line) text = text.slice(start.ch); + out.push(text); + ++n; + }); + return out; + } + // Get the lines between from and to, as array of strings. + function getLines(doc, from, to) { + var out = []; + doc.iter(from, to, function(line) { out.push(line.text); }); + return out; + } + + // Update the height of a line, propagating the height change + // upwards to parent nodes. + function updateLineHeight(line, height) { + var diff = height - line.height; + if (diff) for (var n = line; n; n = n.parent) n.height += diff; + } + + // Given a line object, find its line number by walking up through + // its parent links. + function lineNo(line) { + if (line.parent == null) return null; + var cur = line.parent, no = indexOf(cur.lines, line); + for (var chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) { + for (var i = 0;; ++i) { + if (chunk.children[i] == cur) break; + no += chunk.children[i].chunkSize(); + } + } + return no + cur.first; + } + + // Find the line at the given vertical position, using the height + // information in the document tree. + function lineAtHeight(chunk, h) { + var n = chunk.first; + outer: do { + for (var i = 0; i < chunk.children.length; ++i) { + var child = chunk.children[i], ch = child.height; + if (h < ch) { chunk = child; continue outer; } + h -= ch; + n += child.chunkSize(); + } + return n; + } while (!chunk.lines); + for (var i = 0; i < chunk.lines.length; ++i) { + var line = chunk.lines[i], lh = line.height; + if (h < lh) break; + h -= lh; + } + return n + i; + } + + + // Find the height above the given line. + function heightAtLine(lineObj) { + lineObj = visualLine(lineObj); + + var h = 0, chunk = lineObj.parent; + for (var i = 0; i < chunk.lines.length; ++i) { + var line = chunk.lines[i]; + if (line == lineObj) break; + else h += line.height; + } + for (var p = chunk.parent; p; chunk = p, p = chunk.parent) { + for (var i = 0; i < p.children.length; ++i) { + var cur = p.children[i]; + if (cur == chunk) break; + else h += cur.height; + } + } + return h; + } + + // Get the bidi ordering for the given line (and cache it). Returns + // false for lines that are fully left-to-right, and an array of + // BidiSpan objects otherwise. + function getOrder(line) { + var order = line.order; + if (order == null) order = line.order = bidiOrdering(line.text); + return order; + } + + // HISTORY + + function History(startGen) { + // Arrays of change events and selections. Doing something adds an + // event to done and clears undo. Undoing moves events from done + // to undone, redoing moves them in the other direction. + this.done = []; this.undone = []; + this.undoDepth = Infinity; + // Used to track when changes can be merged into a single undo + // event + this.lastModTime = this.lastSelTime = 0; + this.lastOp = this.lastSelOp = null; + this.lastOrigin = this.lastSelOrigin = null; + // Used by the isClean() method + this.generation = this.maxGeneration = startGen || 1; + } + + // Create a history change event from an updateDoc-style change + // object. + function historyChangeFromChange(doc, change) { + var histChange = {from: copyPos(change.from), to: changeEnd(change), text: getBetween(doc, change.from, change.to)}; + attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1); + linkedDocs(doc, function(doc) {attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1);}, true); + return histChange; + } + + // Pop all selection events off the end of a history array. Stop at + // a change event. + function clearSelectionEvents(array) { + while (array.length) { + var last = lst(array); + if (last.ranges) array.pop(); + else break; + } + } + + // Find the top change event in the history. Pop off selection + // events that are in the way. + function lastChangeEvent(hist, force) { + if (force) { + clearSelectionEvents(hist.done); + return lst(hist.done); + } else if (hist.done.length && !lst(hist.done).ranges) { + return lst(hist.done); + } else if (hist.done.length > 1 && !hist.done[hist.done.length - 2].ranges) { + hist.done.pop(); + return lst(hist.done); + } + } + + // Register a change in the history. Merges changes that are within + // a single operation, ore are close together with an origin that + // allows merging (starting with "+") into a single event. + function addChangeToHistory(doc, change, selAfter, opId) { + var hist = doc.history; + hist.undone.length = 0; + var time = +new Date, cur; + + if ((hist.lastOp == opId || + hist.lastOrigin == change.origin && change.origin && + ((change.origin.charAt(0) == "+" && doc.cm && hist.lastModTime > time - doc.cm.options.historyEventDelay) || + change.origin.charAt(0) == "*")) && + (cur = lastChangeEvent(hist, hist.lastOp == opId))) { + // Merge this change into the last event + var last = lst(cur.changes); + if (cmp(change.from, change.to) == 0 && cmp(change.from, last.to) == 0) { + // Optimized case for simple insertion -- don't want to add + // new changesets for every character typed + last.to = changeEnd(change); + } else { + // Add new sub-event + cur.changes.push(historyChangeFromChange(doc, change)); + } + } else { + // Can not be merged, start a new event. + var before = lst(hist.done); + if (!before || !before.ranges) + pushSelectionToHistory(doc.sel, hist.done); + cur = {changes: [historyChangeFromChange(doc, change)], + generation: hist.generation}; + hist.done.push(cur); + while (hist.done.length > hist.undoDepth) { + hist.done.shift(); + if (!hist.done[0].ranges) hist.done.shift(); + } + } + hist.done.push(selAfter); + hist.generation = ++hist.maxGeneration; + hist.lastModTime = hist.lastSelTime = time; + hist.lastOp = hist.lastSelOp = opId; + hist.lastOrigin = hist.lastSelOrigin = change.origin; + + if (!last) signal(doc, "historyAdded"); + } + + function selectionEventCanBeMerged(doc, origin, prev, sel) { + var ch = origin.charAt(0); + return ch == "*" || + ch == "+" && + prev.ranges.length == sel.ranges.length && + prev.somethingSelected() == sel.somethingSelected() && + new Date - doc.history.lastSelTime <= (doc.cm ? doc.cm.options.historyEventDelay : 500); + } + + // Called whenever the selection changes, sets the new selection as + // the pending selection in the history, and pushes the old pending + // selection into the 'done' array when it was significantly + // different (in number of selected ranges, emptiness, or time). + function addSelectionToHistory(doc, sel, opId, options) { + var hist = doc.history, origin = options && options.origin; + + // A new event is started when the previous origin does not match + // the current, or the origins don't allow matching. Origins + // starting with * are always merged, those starting with + are + // merged when similar and close together in time. + if (opId == hist.lastSelOp || + (origin && hist.lastSelOrigin == origin && + (hist.lastModTime == hist.lastSelTime && hist.lastOrigin == origin || + selectionEventCanBeMerged(doc, origin, lst(hist.done), sel)))) + hist.done[hist.done.length - 1] = sel; + else + pushSelectionToHistory(sel, hist.done); + + hist.lastSelTime = +new Date; + hist.lastSelOrigin = origin; + hist.lastSelOp = opId; + if (options && options.clearRedo !== false) + clearSelectionEvents(hist.undone); + } + + function pushSelectionToHistory(sel, dest) { + var top = lst(dest); + if (!(top && top.ranges && top.equals(sel))) + dest.push(sel); + } + + // Used to store marked span information in the history. + function attachLocalSpans(doc, change, from, to) { + var existing = change["spans_" + doc.id], n = 0; + doc.iter(Math.max(doc.first, from), Math.min(doc.first + doc.size, to), function(line) { + if (line.markedSpans) + (existing || (existing = change["spans_" + doc.id] = {}))[n] = line.markedSpans; + ++n; + }); + } + + // When un/re-doing restores text containing marked spans, those + // that have been explicitly cleared should not be restored. + function removeClearedSpans(spans) { + if (!spans) return null; + for (var i = 0, out; i < spans.length; ++i) { + if (spans[i].marker.explicitlyCleared) { if (!out) out = spans.slice(0, i); } + else if (out) out.push(spans[i]); + } + return !out ? spans : out.length ? out : null; + } + + // Retrieve and filter the old marked spans stored in a change event. + function getOldSpans(doc, change) { + var found = change["spans_" + doc.id]; + if (!found) return null; + for (var i = 0, nw = []; i < change.text.length; ++i) + nw.push(removeClearedSpans(found[i])); + return nw; + } + + // Used both to provide a JSON-safe object in .getHistory, and, when + // detaching a document, to split the history in two + function copyHistoryArray(events, newGroup, instantiateSel) { + for (var i = 0, copy = []; i < events.length; ++i) { + var event = events[i]; + if (event.ranges) { + copy.push(instantiateSel ? Selection.prototype.deepCopy.call(event) : event); + continue; + } + var changes = event.changes, newChanges = []; + copy.push({changes: newChanges}); + for (var j = 0; j < changes.length; ++j) { + var change = changes[j], m; + newChanges.push({from: change.from, to: change.to, text: change.text}); + if (newGroup) for (var prop in change) if (m = prop.match(/^spans_(\d+)$/)) { + if (indexOf(newGroup, Number(m[1])) > -1) { + lst(newChanges)[prop] = change[prop]; + delete change[prop]; + } + } + } + } + return copy; + } + + // Rebasing/resetting history to deal with externally-sourced changes + + function rebaseHistSelSingle(pos, from, to, diff) { + if (to < pos.line) { + pos.line += diff; + } else if (from < pos.line) { + pos.line = from; + pos.ch = 0; + } + } + + // Tries to rebase an array of history events given a change in the + // document. If the change touches the same lines as the event, the + // event, and everything 'behind' it, is discarded. If the change is + // before the event, the event's positions are updated. Uses a + // copy-on-write scheme for the positions, to avoid having to + // reallocate them all on every rebase, but also avoid problems with + // shared position objects being unsafely updated. + function rebaseHistArray(array, from, to, diff) { + for (var i = 0; i < array.length; ++i) { + var sub = array[i], ok = true; + if (sub.ranges) { + if (!sub.copied) { sub = array[i] = sub.deepCopy(); sub.copied = true; } + for (var j = 0; j < sub.ranges.length; j++) { + rebaseHistSelSingle(sub.ranges[j].anchor, from, to, diff); + rebaseHistSelSingle(sub.ranges[j].head, from, to, diff); + } + continue; + } + for (var j = 0; j < sub.changes.length; ++j) { + var cur = sub.changes[j]; + if (to < cur.from.line) { + cur.from = Pos(cur.from.line + diff, cur.from.ch); + cur.to = Pos(cur.to.line + diff, cur.to.ch); + } else if (from <= cur.to.line) { + ok = false; + break; + } + } + if (!ok) { + array.splice(0, i + 1); + i = 0; + } + } + } + + function rebaseHist(hist, change) { + var from = change.from.line, to = change.to.line, diff = change.text.length - (to - from) - 1; + rebaseHistArray(hist.done, from, to, diff); + rebaseHistArray(hist.undone, from, to, diff); + } + + // EVENT UTILITIES + + // Due to the fact that we still support jurassic IE versions, some + // compatibility wrappers are needed. + + var e_preventDefault = CodeMirror.e_preventDefault = function(e) { + if (e.preventDefault) e.preventDefault(); + else e.returnValue = false; + }; + var e_stopPropagation = CodeMirror.e_stopPropagation = function(e) { + if (e.stopPropagation) e.stopPropagation(); + else e.cancelBubble = true; + }; + function e_defaultPrevented(e) { + return e.defaultPrevented != null ? e.defaultPrevented : e.returnValue == false; + } + var e_stop = CodeMirror.e_stop = function(e) {e_preventDefault(e); e_stopPropagation(e);}; + + function e_target(e) {return e.target || e.srcElement;} + function e_button(e) { + var b = e.which; + if (b == null) { + if (e.button & 1) b = 1; + else if (e.button & 2) b = 3; + else if (e.button & 4) b = 2; + } + if (mac && e.ctrlKey && b == 1) b = 3; + return b; + } + + // EVENT HANDLING + + // Lightweight event framework. on/off also work on DOM nodes, + // registering native DOM handlers. + + var on = CodeMirror.on = function(emitter, type, f) { + if (emitter.addEventListener) + emitter.addEventListener(type, f, false); + else if (emitter.attachEvent) + emitter.attachEvent("on" + type, f); + else { + var map = emitter._handlers || (emitter._handlers = {}); + var arr = map[type] || (map[type] = []); + arr.push(f); + } + }; + + var noHandlers = [] + function getHandlers(emitter, type, copy) { + var arr = emitter._handlers && emitter._handlers[type] + if (copy) return arr && arr.length > 0 ? arr.slice() : noHandlers + else return arr || noHandlers + } + + var off = CodeMirror.off = function(emitter, type, f) { + if (emitter.removeEventListener) + emitter.removeEventListener(type, f, false); + else if (emitter.detachEvent) + emitter.detachEvent("on" + type, f); + else { + var handlers = getHandlers(emitter, type, false) + for (var i = 0; i < handlers.length; ++i) + if (handlers[i] == f) { handlers.splice(i, 1); break; } + } + }; + + var signal = CodeMirror.signal = function(emitter, type /*, values...*/) { + var handlers = getHandlers(emitter, type, true) + if (!handlers.length) return; + var args = Array.prototype.slice.call(arguments, 2); + for (var i = 0; i < handlers.length; ++i) handlers[i].apply(null, args); + }; + + var orphanDelayedCallbacks = null; + + // Often, we want to signal events at a point where we are in the + // middle of some work, but don't want the handler to start calling + // other methods on the editor, which might be in an inconsistent + // state or simply not expect any other events to happen. + // signalLater looks whether there are any handlers, and schedules + // them to be executed when the last operation ends, or, if no + // operation is active, when a timeout fires. + function signalLater(emitter, type /*, values...*/) { + var arr = getHandlers(emitter, type, false) + if (!arr.length) return; + var args = Array.prototype.slice.call(arguments, 2), list; + if (operationGroup) { + list = operationGroup.delayedCallbacks; + } else if (orphanDelayedCallbacks) { + list = orphanDelayedCallbacks; + } else { + list = orphanDelayedCallbacks = []; + setTimeout(fireOrphanDelayed, 0); + } + function bnd(f) {return function(){f.apply(null, args);};}; + for (var i = 0; i < arr.length; ++i) + list.push(bnd(arr[i])); + } + + function fireOrphanDelayed() { + var delayed = orphanDelayedCallbacks; + orphanDelayedCallbacks = null; + for (var i = 0; i < delayed.length; ++i) delayed[i](); + } + + // The DOM events that CodeMirror handles can be overridden by + // registering a (non-DOM) handler on the editor for the event name, + // and preventDefault-ing the event in that handler. + function signalDOMEvent(cm, e, override) { + if (typeof e == "string") + e = {type: e, preventDefault: function() { this.defaultPrevented = true; }}; + signal(cm, override || e.type, cm, e); + return e_defaultPrevented(e) || e.codemirrorIgnore; + } + + function signalCursorActivity(cm) { + var arr = cm._handlers && cm._handlers.cursorActivity; + if (!arr) return; + var set = cm.curOp.cursorActivityHandlers || (cm.curOp.cursorActivityHandlers = []); + for (var i = 0; i < arr.length; ++i) if (indexOf(set, arr[i]) == -1) + set.push(arr[i]); + } + + function hasHandler(emitter, type) { + return getHandlers(emitter, type).length > 0 + } + + // Add on and off methods to a constructor's prototype, to make + // registering events on such objects more convenient. + function eventMixin(ctor) { + ctor.prototype.on = function(type, f) {on(this, type, f);}; + ctor.prototype.off = function(type, f) {off(this, type, f);}; + } + + // MISC UTILITIES + + // Number of pixels added to scroller and sizer to hide scrollbar + var scrollerGap = 30; + + // Returned or thrown by various protocols to signal 'I'm not + // handling this'. + var Pass = CodeMirror.Pass = {toString: function(){return "CodeMirror.Pass";}}; + + // Reused option objects for setSelection & friends + var sel_dontScroll = {scroll: false}, sel_mouse = {origin: "*mouse"}, sel_move = {origin: "+move"}; + + function Delayed() {this.id = null;} + Delayed.prototype.set = function(ms, f) { + clearTimeout(this.id); + this.id = setTimeout(f, ms); + }; + + // Counts the column offset in a string, taking tabs into account. + // Used mostly to find indentation. + var countColumn = CodeMirror.countColumn = function(string, end, tabSize, startIndex, startValue) { + if (end == null) { + end = string.search(/[^\s\u00a0]/); + if (end == -1) end = string.length; + } + for (var i = startIndex || 0, n = startValue || 0;;) { + var nextTab = string.indexOf("\t", i); + if (nextTab < 0 || nextTab >= end) + return n + (end - i); + n += nextTab - i; + n += tabSize - (n % tabSize); + i = nextTab + 1; + } + }; + + // The inverse of countColumn -- find the offset that corresponds to + // a particular column. + var findColumn = CodeMirror.findColumn = function(string, goal, tabSize) { + for (var pos = 0, col = 0;;) { + var nextTab = string.indexOf("\t", pos); + if (nextTab == -1) nextTab = string.length; + var skipped = nextTab - pos; + if (nextTab == string.length || col + skipped >= goal) + return pos + Math.min(skipped, goal - col); + col += nextTab - pos; + col += tabSize - (col % tabSize); + pos = nextTab + 1; + if (col >= goal) return pos; + } + } + + var spaceStrs = [""]; + function spaceStr(n) { + while (spaceStrs.length <= n) + spaceStrs.push(lst(spaceStrs) + " "); + return spaceStrs[n]; + } + + function lst(arr) { return arr[arr.length-1]; } + + var selectInput = function(node) { node.select(); }; + if (ios) // Mobile Safari apparently has a bug where select() is broken. + selectInput = function(node) { node.selectionStart = 0; node.selectionEnd = node.value.length; }; + else if (ie) // Suppress mysterious IE10 errors + selectInput = function(node) { try { node.select(); } catch(_e) {} }; + + function indexOf(array, elt) { + for (var i = 0; i < array.length; ++i) + if (array[i] == elt) return i; + return -1; + } + function map(array, f) { + var out = []; + for (var i = 0; i < array.length; i++) out[i] = f(array[i], i); + return out; + } + + function nothing() {} + + function createObj(base, props) { + var inst; + if (Object.create) { + inst = Object.create(base); + } else { + nothing.prototype = base; + inst = new nothing(); + } + if (props) copyObj(props, inst); + return inst; + }; + + function copyObj(obj, target, overwrite) { + if (!target) target = {}; + for (var prop in obj) + if (obj.hasOwnProperty(prop) && (overwrite !== false || !target.hasOwnProperty(prop))) + target[prop] = obj[prop]; + return target; + } + + function bind(f) { + var args = Array.prototype.slice.call(arguments, 1); + return function(){return f.apply(null, args);}; + } + + var nonASCIISingleCaseWordChar = /[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/; + var isWordCharBasic = CodeMirror.isWordChar = function(ch) { + return /\w/.test(ch) || ch > "\x80" && + (ch.toUpperCase() != ch.toLowerCase() || nonASCIISingleCaseWordChar.test(ch)); + }; + function isWordChar(ch, helper) { + if (!helper) return isWordCharBasic(ch); + if (helper.source.indexOf("\\w") > -1 && isWordCharBasic(ch)) return true; + return helper.test(ch); + } + + function isEmpty(obj) { + for (var n in obj) if (obj.hasOwnProperty(n) && obj[n]) return false; + return true; + } + + // Extending unicode characters. A series of a non-extending char + + // any number of extending chars is treated as a single unit as far + // as editing and measuring is concerned. This is not fully correct, + // since some scripts/fonts/browsers also treat other configurations + // of code points as a group. + var extendingChars = /[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/; + function isExtendingChar(ch) { return ch.charCodeAt(0) >= 768 && extendingChars.test(ch); } + + // DOM UTILITIES + + function elt(tag, content, className, style) { + var e = document.createElement(tag); + if (className) e.className = className; + if (style) e.style.cssText = style; + if (typeof content == "string") e.appendChild(document.createTextNode(content)); + else if (content) for (var i = 0; i < content.length; ++i) e.appendChild(content[i]); + return e; + } + + var range; + if (document.createRange) range = function(node, start, end, endNode) { + var r = document.createRange(); + r.setEnd(endNode || node, end); + r.setStart(node, start); + return r; + }; + else range = function(node, start, end) { + var r = document.body.createTextRange(); + try { r.moveToElementText(node.parentNode); } + catch(e) { return r; } + r.collapse(true); + r.moveEnd("character", end); + r.moveStart("character", start); + return r; + }; + + function removeChildren(e) { + for (var count = e.childNodes.length; count > 0; --count) + e.removeChild(e.firstChild); + return e; + } + + function removeChildrenAndAdd(parent, e) { + return removeChildren(parent).appendChild(e); + } + + var contains = CodeMirror.contains = function(parent, child) { + if (child.nodeType == 3) // Android browser always returns false when child is a textnode + child = child.parentNode; + if (parent.contains) + return parent.contains(child); + do { + if (child.nodeType == 11) child = child.host; + if (child == parent) return true; + } while (child = child.parentNode); + }; + + function activeElt() { + var activeElement = document.activeElement; + while (activeElement && activeElement.root && activeElement.root.activeElement) + activeElement = activeElement.root.activeElement; + return activeElement; + } + // Older versions of IE throws unspecified error when touching + // document.activeElement in some cases (during loading, in iframe) + if (ie && ie_version < 11) activeElt = function() { + try { return document.activeElement; } + catch(e) { return document.body; } + }; + + function classTest(cls) { return new RegExp("(^|\\s)" + cls + "(?:$|\\s)\\s*"); } + var rmClass = CodeMirror.rmClass = function(node, cls) { + var current = node.className; + var match = classTest(cls).exec(current); + if (match) { + var after = current.slice(match.index + match[0].length); + node.className = current.slice(0, match.index) + (after ? match[1] + after : ""); + } + }; + var addClass = CodeMirror.addClass = function(node, cls) { + var current = node.className; + if (!classTest(cls).test(current)) node.className += (current ? " " : "") + cls; + }; + function joinClasses(a, b) { + var as = a.split(" "); + for (var i = 0; i < as.length; i++) + if (as[i] && !classTest(as[i]).test(b)) b += " " + as[i]; + return b; + } + + // WINDOW-WIDE EVENTS + + // These must be handled carefully, because naively registering a + // handler for each editor will cause the editors to never be + // garbage collected. + + function forEachCodeMirror(f) { + if (!document.body.getElementsByClassName) return; + var byClass = document.body.getElementsByClassName("CodeMirror"); + for (var i = 0; i < byClass.length; i++) { + var cm = byClass[i].CodeMirror; + if (cm) f(cm); + } + } + + var globalsRegistered = false; + function ensureGlobalHandlers() { + if (globalsRegistered) return; + registerGlobalHandlers(); + globalsRegistered = true; + } + function registerGlobalHandlers() { + // When the window resizes, we need to refresh active editors. + var resizeTimer; + on(window, "resize", function() { + if (resizeTimer == null) resizeTimer = setTimeout(function() { + resizeTimer = null; + forEachCodeMirror(onResize); + }, 100); + }); + // When the window loses focus, we want to show the editor as blurred + on(window, "blur", function() { + forEachCodeMirror(onBlur); + }); + } + + // FEATURE DETECTION + + // Detect drag-and-drop + var dragAndDrop = function() { + // There is *some* kind of drag-and-drop support in IE6-8, but I + // couldn't get it to work yet. + if (ie && ie_version < 9) return false; + var div = elt('div'); + return "draggable" in div || "dragDrop" in div; + }(); + + var zwspSupported; + function zeroWidthElement(measure) { + if (zwspSupported == null) { + var test = elt("span", "\u200b"); + removeChildrenAndAdd(measure, elt("span", [test, document.createTextNode("x")])); + if (measure.firstChild.offsetHeight != 0) + zwspSupported = test.offsetWidth <= 1 && test.offsetHeight > 2 && !(ie && ie_version < 8); + } + var node = zwspSupported ? elt("span", "\u200b") : + elt("span", "\u00a0", null, "display: inline-block; width: 1px; margin-right: -1px"); + node.setAttribute("cm-text", ""); + return node; + } + + // Feature-detect IE's crummy client rect reporting for bidi text + var badBidiRects; + function hasBadBidiRects(measure) { + if (badBidiRects != null) return badBidiRects; + var txt = removeChildrenAndAdd(measure, document.createTextNode("A\u062eA")); + var r0 = range(txt, 0, 1).getBoundingClientRect(); + if (!r0 || r0.left == r0.right) return false; // Safari returns null in some cases (#2780) + var r1 = range(txt, 1, 2).getBoundingClientRect(); + return badBidiRects = (r1.right - r0.right < 3); + } + + // See if "".split is the broken IE version, if so, provide an + // alternative way to split lines. + var splitLinesAuto = CodeMirror.splitLines = "\n\nb".split(/\n/).length != 3 ? function(string) { + var pos = 0, result = [], l = string.length; + while (pos <= l) { + var nl = string.indexOf("\n", pos); + if (nl == -1) nl = string.length; + var line = string.slice(pos, string.charAt(nl - 1) == "\r" ? nl - 1 : nl); + var rt = line.indexOf("\r"); + if (rt != -1) { + result.push(line.slice(0, rt)); + pos += rt + 1; + } else { + result.push(line); + pos = nl + 1; + } + } + return result; + } : function(string){return string.split(/\r\n?|\n/);}; + + var hasSelection = window.getSelection ? function(te) { + try { return te.selectionStart != te.selectionEnd; } + catch(e) { return false; } + } : function(te) { + try {var range = te.ownerDocument.selection.createRange();} + catch(e) {} + if (!range || range.parentElement() != te) return false; + return range.compareEndPoints("StartToEnd", range) != 0; + }; + + var hasCopyEvent = (function() { + var e = elt("div"); + if ("oncopy" in e) return true; + e.setAttribute("oncopy", "return;"); + return typeof e.oncopy == "function"; + })(); + + var badZoomedRects = null; + function hasBadZoomedRects(measure) { + if (badZoomedRects != null) return badZoomedRects; + var node = removeChildrenAndAdd(measure, elt("span", "x")); + var normal = node.getBoundingClientRect(); + var fromRange = range(node, 0, 1).getBoundingClientRect(); + return badZoomedRects = Math.abs(normal.left - fromRange.left) > 1; + } + + // KEY NAMES + + var keyNames = CodeMirror.keyNames = { + 3: "Enter", 8: "Backspace", 9: "Tab", 13: "Enter", 16: "Shift", 17: "Ctrl", 18: "Alt", + 19: "Pause", 20: "CapsLock", 27: "Esc", 32: "Space", 33: "PageUp", 34: "PageDown", 35: "End", + 36: "Home", 37: "Left", 38: "Up", 39: "Right", 40: "Down", 44: "PrintScrn", 45: "Insert", + 46: "Delete", 59: ";", 61: "=", 91: "Mod", 92: "Mod", 93: "Mod", + 106: "*", 107: "=", 109: "-", 110: ".", 111: "/", 127: "Delete", + 173: "-", 186: ";", 187: "=", 188: ",", 189: "-", 190: ".", 191: "/", 192: "`", 219: "[", 220: "\\", + 221: "]", 222: "'", 63232: "Up", 63233: "Down", 63234: "Left", 63235: "Right", 63272: "Delete", + 63273: "Home", 63275: "End", 63276: "PageUp", 63277: "PageDown", 63302: "Insert" + }; + (function() { + // Number keys + for (var i = 0; i < 10; i++) keyNames[i + 48] = keyNames[i + 96] = String(i); + // Alphabetic keys + for (var i = 65; i <= 90; i++) keyNames[i] = String.fromCharCode(i); + // Function keys + for (var i = 1; i <= 12; i++) keyNames[i + 111] = keyNames[i + 63235] = "F" + i; + })(); + + // BIDI HELPERS + + function iterateBidiSections(order, from, to, f) { + if (!order) return f(from, to, "ltr"); + var found = false; + for (var i = 0; i < order.length; ++i) { + var part = order[i]; + if (part.from < to && part.to > from || from == to && part.to == from) { + f(Math.max(part.from, from), Math.min(part.to, to), part.level == 1 ? "rtl" : "ltr"); + found = true; + } + } + if (!found) f(from, to, "ltr"); + } + + function bidiLeft(part) { return part.level % 2 ? part.to : part.from; } + function bidiRight(part) { return part.level % 2 ? part.from : part.to; } + + function lineLeft(line) { var order = getOrder(line); return order ? bidiLeft(order[0]) : 0; } + function lineRight(line) { + var order = getOrder(line); + if (!order) return line.text.length; + return bidiRight(lst(order)); + } + + function lineStart(cm, lineN) { + var line = getLine(cm.doc, lineN); + var visual = visualLine(line); + if (visual != line) lineN = lineNo(visual); + var order = getOrder(visual); + var ch = !order ? 0 : order[0].level % 2 ? lineRight(visual) : lineLeft(visual); + return Pos(lineN, ch); + } + function lineEnd(cm, lineN) { + var merged, line = getLine(cm.doc, lineN); + while (merged = collapsedSpanAtEnd(line)) { + line = merged.find(1, true).line; + lineN = null; + } + var order = getOrder(line); + var ch = !order ? line.text.length : order[0].level % 2 ? lineLeft(line) : lineRight(line); + return Pos(lineN == null ? lineNo(line) : lineN, ch); + } + function lineStartSmart(cm, pos) { + var start = lineStart(cm, pos.line); + var line = getLine(cm.doc, start.line); + var order = getOrder(line); + if (!order || order[0].level == 0) { + var firstNonWS = Math.max(0, line.text.search(/\S/)); + var inWS = pos.line == start.line && pos.ch <= firstNonWS && pos.ch; + return Pos(start.line, inWS ? 0 : firstNonWS); + } + return start; + } + + function compareBidiLevel(order, a, b) { + var linedir = order[0].level; + if (a == linedir) return true; + if (b == linedir) return false; + return a < b; + } + var bidiOther; + function getBidiPartAt(order, pos) { + bidiOther = null; + for (var i = 0, found; i < order.length; ++i) { + var cur = order[i]; + if (cur.from < pos && cur.to > pos) return i; + if ((cur.from == pos || cur.to == pos)) { + if (found == null) { + found = i; + } else if (compareBidiLevel(order, cur.level, order[found].level)) { + if (cur.from != cur.to) bidiOther = found; + return i; + } else { + if (cur.from != cur.to) bidiOther = i; + return found; + } + } + } + return found; + } + + function moveInLine(line, pos, dir, byUnit) { + if (!byUnit) return pos + dir; + do pos += dir; + while (pos > 0 && isExtendingChar(line.text.charAt(pos))); + return pos; + } + + // This is needed in order to move 'visually' through bi-directional + // text -- i.e., pressing left should make the cursor go left, even + // when in RTL text. The tricky part is the 'jumps', where RTL and + // LTR text touch each other. This often requires the cursor offset + // to move more than one unit, in order to visually move one unit. + function moveVisually(line, start, dir, byUnit) { + var bidi = getOrder(line); + if (!bidi) return moveLogically(line, start, dir, byUnit); + var pos = getBidiPartAt(bidi, start), part = bidi[pos]; + var target = moveInLine(line, start, part.level % 2 ? -dir : dir, byUnit); + + for (;;) { + if (target > part.from && target < part.to) return target; + if (target == part.from || target == part.to) { + if (getBidiPartAt(bidi, target) == pos) return target; + part = bidi[pos += dir]; + return (dir > 0) == part.level % 2 ? part.to : part.from; + } else { + part = bidi[pos += dir]; + if (!part) return null; + if ((dir > 0) == part.level % 2) + target = moveInLine(line, part.to, -1, byUnit); + else + target = moveInLine(line, part.from, 1, byUnit); + } + } + } + + function moveLogically(line, start, dir, byUnit) { + var target = start + dir; + if (byUnit) while (target > 0 && isExtendingChar(line.text.charAt(target))) target += dir; + return target < 0 || target > line.text.length ? null : target; + } + + // Bidirectional ordering algorithm + // See http://unicode.org/reports/tr9/tr9-13.html for the algorithm + // that this (partially) implements. + + // One-char codes used for character types: + // L (L): Left-to-Right + // R (R): Right-to-Left + // r (AL): Right-to-Left Arabic + // 1 (EN): European Number + // + (ES): European Number Separator + // % (ET): European Number Terminator + // n (AN): Arabic Number + // , (CS): Common Number Separator + // m (NSM): Non-Spacing Mark + // b (BN): Boundary Neutral + // s (B): Paragraph Separator + // t (S): Segment Separator + // w (WS): Whitespace + // N (ON): Other Neutrals + + // Returns null if characters are ordered as they appear + // (left-to-right), or an array of sections ({from, to, level} + // objects) in the order in which they occur visually. + var bidiOrdering = (function() { + // Character types for codepoints 0 to 0xff + var lowTypes = "bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN"; + // Character types for codepoints 0x600 to 0x6ff + var arabicTypes = "rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmm"; + function charType(code) { + if (code <= 0xf7) return lowTypes.charAt(code); + else if (0x590 <= code && code <= 0x5f4) return "R"; + else if (0x600 <= code && code <= 0x6ed) return arabicTypes.charAt(code - 0x600); + else if (0x6ee <= code && code <= 0x8ac) return "r"; + else if (0x2000 <= code && code <= 0x200b) return "w"; + else if (code == 0x200c) return "b"; + else return "L"; + } + + var bidiRE = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/; + var isNeutral = /[stwN]/, isStrong = /[LRr]/, countsAsLeft = /[Lb1n]/, countsAsNum = /[1n]/; + // Browsers seem to always treat the boundaries of block elements as being L. + var outerType = "L"; + + function BidiSpan(level, from, to) { + this.level = level; + this.from = from; this.to = to; + } + + return function(str) { + if (!bidiRE.test(str)) return false; + var len = str.length, types = []; + for (var i = 0, type; i < len; ++i) + types.push(type = charType(str.charCodeAt(i))); + + // W1. Examine each non-spacing mark (NSM) in the level run, and + // change the type of the NSM to the type of the previous + // character. If the NSM is at the start of the level run, it will + // get the type of sor. + for (var i = 0, prev = outerType; i < len; ++i) { + var type = types[i]; + if (type == "m") types[i] = prev; + else prev = type; + } + + // W2. Search backwards from each instance of a European number + // until the first strong type (R, L, AL, or sor) is found. If an + // AL is found, change the type of the European number to Arabic + // number. + // W3. Change all ALs to R. + for (var i = 0, cur = outerType; i < len; ++i) { + var type = types[i]; + if (type == "1" && cur == "r") types[i] = "n"; + else if (isStrong.test(type)) { cur = type; if (type == "r") types[i] = "R"; } + } + + // W4. A single European separator between two European numbers + // changes to a European number. A single common separator between + // two numbers of the same type changes to that type. + for (var i = 1, prev = types[0]; i < len - 1; ++i) { + var type = types[i]; + if (type == "+" && prev == "1" && types[i+1] == "1") types[i] = "1"; + else if (type == "," && prev == types[i+1] && + (prev == "1" || prev == "n")) types[i] = prev; + prev = type; + } + + // W5. A sequence of European terminators adjacent to European + // numbers changes to all European numbers. + // W6. Otherwise, separators and terminators change to Other + // Neutral. + for (var i = 0; i < len; ++i) { + var type = types[i]; + if (type == ",") types[i] = "N"; + else if (type == "%") { + for (var end = i + 1; end < len && types[end] == "%"; ++end) {} + var replace = (i && types[i-1] == "!") || (end < len && types[end] == "1") ? "1" : "N"; + for (var j = i; j < end; ++j) types[j] = replace; + i = end - 1; + } + } + + // W7. Search backwards from each instance of a European number + // until the first strong type (R, L, or sor) is found. If an L is + // found, then change the type of the European number to L. + for (var i = 0, cur = outerType; i < len; ++i) { + var type = types[i]; + if (cur == "L" && type == "1") types[i] = "L"; + else if (isStrong.test(type)) cur = type; + } + + // N1. A sequence of neutrals takes the direction of the + // surrounding strong text if the text on both sides has the same + // direction. European and Arabic numbers act as if they were R in + // terms of their influence on neutrals. Start-of-level-run (sor) + // and end-of-level-run (eor) are used at level run boundaries. + // N2. Any remaining neutrals take the embedding direction. + for (var i = 0; i < len; ++i) { + if (isNeutral.test(types[i])) { + for (var end = i + 1; end < len && isNeutral.test(types[end]); ++end) {} + var before = (i ? types[i-1] : outerType) == "L"; + var after = (end < len ? types[end] : outerType) == "L"; + var replace = before || after ? "L" : "R"; + for (var j = i; j < end; ++j) types[j] = replace; + i = end - 1; + } + } + + // Here we depart from the documented algorithm, in order to avoid + // building up an actual levels array. Since there are only three + // levels (0, 1, 2) in an implementation that doesn't take + // explicit embedding into account, we can build up the order on + // the fly, without following the level-based algorithm. + var order = [], m; + for (var i = 0; i < len;) { + if (countsAsLeft.test(types[i])) { + var start = i; + for (++i; i < len && countsAsLeft.test(types[i]); ++i) {} + order.push(new BidiSpan(0, start, i)); + } else { + var pos = i, at = order.length; + for (++i; i < len && types[i] != "L"; ++i) {} + for (var j = pos; j < i;) { + if (countsAsNum.test(types[j])) { + if (pos < j) order.splice(at, 0, new BidiSpan(1, pos, j)); + var nstart = j; + for (++j; j < i && countsAsNum.test(types[j]); ++j) {} + order.splice(at, 0, new BidiSpan(2, nstart, j)); + pos = j; + } else ++j; + } + if (pos < i) order.splice(at, 0, new BidiSpan(1, pos, i)); + } + } + if (order[0].level == 1 && (m = str.match(/^\s+/))) { + order[0].from = m[0].length; + order.unshift(new BidiSpan(0, 0, m[0].length)); + } + if (lst(order).level == 1 && (m = str.match(/\s+$/))) { + lst(order).to -= m[0].length; + order.push(new BidiSpan(0, len - m[0].length, len)); + } + if (order[0].level == 2) + order.unshift(new BidiSpan(1, order[0].to, order[0].to)); + if (order[0].level != lst(order).level) + order.push(new BidiSpan(order[0].level, len, len)); + + return order; + }; + })(); + + // THE END + + CodeMirror.version = "5.14.3"; + + return CodeMirror; +}); diff --git a/branch/4.04/libraries/codemirror/lib/javascript.js b/branch/4.04/libraries/codemirror/lib/javascript.js new file mode 100644 index 0000000000000000000000000000000000000000..fa5721d5d09208b5017d5d43c21a3dd1befbedef --- /dev/null +++ b/branch/4.04/libraries/codemirror/lib/javascript.js @@ -0,0 +1,742 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: http://codemirror.net/LICENSE + +// TODO actually recognize syntax of TypeScript constructs + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +function expressionAllowed(stream, state, backUp) { + return /^(?:operator|sof|keyword c|case|new|[\[{}\(,;:]|=>)$/.test(state.lastType) || + (state.lastType == "quasi" && /\{\s*$/.test(stream.string.slice(0, stream.pos - (backUp || 0)))) +} + +CodeMirror.defineMode("javascript", function(config, parserConfig) { + var indentUnit = config.indentUnit; + var statementIndent = parserConfig.statementIndent; + var jsonldMode = parserConfig.jsonld; + var jsonMode = parserConfig.json || jsonldMode; + var isTS = parserConfig.typescript; + var wordRE = parserConfig.wordCharacters || /[\w$\xa1-\uffff]/; + + // Tokenizer + + var keywords = function(){ + function kw(type) {return {type: type, style: "keyword"};} + var A = kw("keyword a"), B = kw("keyword b"), C = kw("keyword c"); + var operator = kw("operator"), atom = {type: "atom", style: "atom"}; + + var jsKeywords = { + "if": kw("if"), "while": A, "with": A, "else": B, "do": B, "try": B, "finally": B, + "return": C, "break": C, "continue": C, "new": kw("new"), "delete": C, "throw": C, "debugger": C, + "var": kw("var"), "const": kw("var"), "let": kw("var"), + "function": kw("function"), "catch": kw("catch"), + "for": kw("for"), "switch": kw("switch"), "case": kw("case"), "default": kw("default"), + "in": operator, "typeof": operator, "instanceof": operator, + "true": atom, "false": atom, "null": atom, "undefined": atom, "NaN": atom, "Infinity": atom, + "this": kw("this"), "class": kw("class"), "super": kw("atom"), + "yield": C, "export": kw("export"), "import": kw("import"), "extends": C + }; + + // Extend the 'normal' keywords with the TypeScript language extensions + if (isTS) { + var type = {type: "variable", style: "variable-3"}; + var tsKeywords = { + // object-like things + "interface": kw("class"), + "implements": C, + "namespace": C, + "module": kw("module"), + "enum": kw("module"), + + // scope modifiers + "public": kw("modifier"), + "private": kw("modifier"), + "protected": kw("modifier"), + "abstract": kw("modifier"), + + // operators + "as": operator, + + // types + "string": type, "number": type, "boolean": type, "any": type + }; + + for (var attr in tsKeywords) { + jsKeywords[attr] = tsKeywords[attr]; + } + } + + return jsKeywords; + }(); + + var isOperatorChar = /[+\-*&%=<>!?|~^]/; + var isJsonldKeyword = /^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/; + + function readRegexp(stream) { + var escaped = false, next, inSet = false; + while ((next = stream.next()) != null) { + if (!escaped) { + if (next == "/" && !inSet) return; + if (next == "[") inSet = true; + else if (inSet && next == "]") inSet = false; + } + escaped = !escaped && next == "\\"; + } + } + + // Used as scratch variables to communicate multiple values without + // consing up tons of objects. + var type, content; + function ret(tp, style, cont) { + type = tp; content = cont; + return style; + } + function tokenBase(stream, state) { + var ch = stream.next(); + if (ch == '"' || ch == "'") { + state.tokenize = tokenString(ch); + return state.tokenize(stream, state); + } else if (ch == "." && stream.match(/^\d+(?:[eE][+\-]?\d+)?/)) { + return ret("number", "number"); + } else if (ch == "." && stream.match("..")) { + return ret("spread", "meta"); + } else if (/[\[\]{}\(\),;\:\.]/.test(ch)) { + return ret(ch); + } else if (ch == "=" && stream.eat(">")) { + return ret("=>", "operator"); + } else if (ch == "0" && stream.eat(/x/i)) { + stream.eatWhile(/[\da-f]/i); + return ret("number", "number"); + } else if (ch == "0" && stream.eat(/o/i)) { + stream.eatWhile(/[0-7]/i); + return ret("number", "number"); + } else if (ch == "0" && stream.eat(/b/i)) { + stream.eatWhile(/[01]/i); + return ret("number", "number"); + } else if (/\d/.test(ch)) { + stream.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/); + return ret("number", "number"); + } else if (ch == "/") { + if (stream.eat("*")) { + state.tokenize = tokenComment; + return tokenComment(stream, state); + } else if (stream.eat("/")) { + stream.skipToEnd(); + return ret("comment", "comment"); + } else if (expressionAllowed(stream, state, 1)) { + readRegexp(stream); + stream.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/); + return ret("regexp", "string-2"); + } else { + stream.eatWhile(isOperatorChar); + return ret("operator", "operator", stream.current()); + } + } else if (ch == "`") { + state.tokenize = tokenQuasi; + return tokenQuasi(stream, state); + } else if (ch == "#") { + stream.skipToEnd(); + return ret("error", "error"); + } else if (isOperatorChar.test(ch)) { + stream.eatWhile(isOperatorChar); + return ret("operator", "operator", stream.current()); + } else if (wordRE.test(ch)) { + stream.eatWhile(wordRE); + var word = stream.current(), known = keywords.propertyIsEnumerable(word) && keywords[word]; + return (known && state.lastType != ".") ? ret(known.type, known.style, word) : + ret("variable", "variable", word); + } + } + + function tokenString(quote) { + return function(stream, state) { + var escaped = false, next; + if (jsonldMode && stream.peek() == "@" && stream.match(isJsonldKeyword)){ + state.tokenize = tokenBase; + return ret("jsonld-keyword", "meta"); + } + while ((next = stream.next()) != null) { + if (next == quote && !escaped) break; + escaped = !escaped && next == "\\"; + } + if (!escaped) state.tokenize = tokenBase; + return ret("string", "string"); + }; + } + + function tokenComment(stream, state) { + var maybeEnd = false, ch; + while (ch = stream.next()) { + if (ch == "/" && maybeEnd) { + state.tokenize = tokenBase; + break; + } + maybeEnd = (ch == "*"); + } + return ret("comment", "comment"); + } + + function tokenQuasi(stream, state) { + var escaped = false, next; + while ((next = stream.next()) != null) { + if (!escaped && (next == "`" || next == "$" && stream.eat("{"))) { + state.tokenize = tokenBase; + break; + } + escaped = !escaped && next == "\\"; + } + return ret("quasi", "string-2", stream.current()); + } + + var brackets = "([{}])"; + // This is a crude lookahead trick to try and notice that we're + // parsing the argument patterns for a fat-arrow function before we + // actually hit the arrow token. It only works if the arrow is on + // the same line as the arguments and there's no strange noise + // (comments) in between. Fallback is to only notice when we hit the + // arrow, and not declare the arguments as locals for the arrow + // body. + function findFatArrow(stream, state) { + if (state.fatArrowAt) state.fatArrowAt = null; + var arrow = stream.string.indexOf("=>", stream.start); + if (arrow < 0) return; + + var depth = 0, sawSomething = false; + for (var pos = arrow - 1; pos >= 0; --pos) { + var ch = stream.string.charAt(pos); + var bracket = brackets.indexOf(ch); + if (bracket >= 0 && bracket < 3) { + if (!depth) { ++pos; break; } + if (--depth == 0) break; + } else if (bracket >= 3 && bracket < 6) { + ++depth; + } else if (wordRE.test(ch)) { + sawSomething = true; + } else if (/["'\/]/.test(ch)) { + return; + } else if (sawSomething && !depth) { + ++pos; + break; + } + } + if (sawSomething && !depth) state.fatArrowAt = pos; + } + + // Parser + + var atomicTypes = {"atom": true, "number": true, "variable": true, "string": true, "regexp": true, "this": true, "jsonld-keyword": true}; + + function JSLexical(indented, column, type, align, prev, info) { + this.indented = indented; + this.column = column; + this.type = type; + this.prev = prev; + this.info = info; + if (align != null) this.align = align; + } + + function inScope(state, varname) { + for (var v = state.localVars; v; v = v.next) + if (v.name == varname) return true; + for (var cx = state.context; cx; cx = cx.prev) { + for (var v = cx.vars; v; v = v.next) + if (v.name == varname) return true; + } + } + + function parseJS(state, style, type, content, stream) { + var cc = state.cc; + // Communicate our context to the combinators. + // (Less wasteful than consing up a hundred closures on every call.) + cx.state = state; cx.stream = stream; cx.marked = null, cx.cc = cc; cx.style = style; + + if (!state.lexical.hasOwnProperty("align")) + state.lexical.align = true; + + while(true) { + var combinator = cc.length ? cc.pop() : jsonMode ? expression : statement; + if (combinator(type, content)) { + while(cc.length && cc[cc.length - 1].lex) + cc.pop()(); + if (cx.marked) return cx.marked; + if (type == "variable" && inScope(state, content)) return "variable-2"; + return style; + } + } + } + + // Combinator utils + + var cx = {state: null, column: null, marked: null, cc: null}; + function pass() { + for (var i = arguments.length - 1; i >= 0; i--) cx.cc.push(arguments[i]); + } + function cont() { + pass.apply(null, arguments); + return true; + } + function register(varname) { + function inList(list) { + for (var v = list; v; v = v.next) + if (v.name == varname) return true; + return false; + } + var state = cx.state; + cx.marked = "def"; + if (state.context) { + if (inList(state.localVars)) return; + state.localVars = {name: varname, next: state.localVars}; + } else { + if (inList(state.globalVars)) return; + if (parserConfig.globalVars) + state.globalVars = {name: varname, next: state.globalVars}; + } + } + + // Combinators + + var defaultVars = {name: "this", next: {name: "arguments"}}; + function pushcontext() { + cx.state.context = {prev: cx.state.context, vars: cx.state.localVars}; + cx.state.localVars = defaultVars; + } + function popcontext() { + cx.state.localVars = cx.state.context.vars; + cx.state.context = cx.state.context.prev; + } + function pushlex(type, info) { + var result = function() { + var state = cx.state, indent = state.indented; + if (state.lexical.type == "stat") indent = state.lexical.indented; + else for (var outer = state.lexical; outer && outer.type == ")" && outer.align; outer = outer.prev) + indent = outer.indented; + state.lexical = new JSLexical(indent, cx.stream.column(), type, null, state.lexical, info); + }; + result.lex = true; + return result; + } + function poplex() { + var state = cx.state; + if (state.lexical.prev) { + if (state.lexical.type == ")") + state.indented = state.lexical.indented; + state.lexical = state.lexical.prev; + } + } + poplex.lex = true; + + function expect(wanted) { + function exp(type) { + if (type == wanted) return cont(); + else if (wanted == ";") return pass(); + else return cont(exp); + }; + return exp; + } + + function statement(type, value) { + if (type == "var") return cont(pushlex("vardef", value.length), vardef, expect(";"), poplex); + if (type == "keyword a") return cont(pushlex("form"), expression, statement, poplex); + if (type == "keyword b") return cont(pushlex("form"), statement, poplex); + if (type == "{") return cont(pushlex("}"), block, poplex); + if (type == ";") return cont(); + if (type == "if") { + if (cx.state.lexical.info == "else" && cx.state.cc[cx.state.cc.length - 1] == poplex) + cx.state.cc.pop()(); + return cont(pushlex("form"), expression, statement, poplex, maybeelse); + } + if (type == "function") return cont(functiondef); + if (type == "for") return cont(pushlex("form"), forspec, statement, poplex); + if (type == "variable") return cont(pushlex("stat"), maybelabel); + if (type == "switch") return cont(pushlex("form"), expression, pushlex("}", "switch"), expect("{"), + block, poplex, poplex); + if (type == "case") return cont(expression, expect(":")); + if (type == "default") return cont(expect(":")); + if (type == "catch") return cont(pushlex("form"), pushcontext, expect("("), funarg, expect(")"), + statement, poplex, popcontext); + if (type == "class") return cont(pushlex("form"), className, poplex); + if (type == "export") return cont(pushlex("stat"), afterExport, poplex); + if (type == "import") return cont(pushlex("stat"), afterImport, poplex); + if (type == "module") return cont(pushlex("form"), pattern, pushlex("}"), expect("{"), block, poplex, poplex) + return pass(pushlex("stat"), expression, expect(";"), poplex); + } + function expression(type) { + return expressionInner(type, false); + } + function expressionNoComma(type) { + return expressionInner(type, true); + } + function expressionInner(type, noComma) { + if (cx.state.fatArrowAt == cx.stream.start) { + var body = noComma ? arrowBodyNoComma : arrowBody; + if (type == "(") return cont(pushcontext, pushlex(")"), commasep(pattern, ")"), poplex, expect("=>"), body, popcontext); + else if (type == "variable") return pass(pushcontext, pattern, expect("=>"), body, popcontext); + } + + var maybeop = noComma ? maybeoperatorNoComma : maybeoperatorComma; + if (atomicTypes.hasOwnProperty(type)) return cont(maybeop); + if (type == "function") return cont(functiondef, maybeop); + if (type == "keyword c") return cont(noComma ? maybeexpressionNoComma : maybeexpression); + if (type == "(") return cont(pushlex(")"), maybeexpression, comprehension, expect(")"), poplex, maybeop); + if (type == "operator" || type == "spread") return cont(noComma ? expressionNoComma : expression); + if (type == "[") return cont(pushlex("]"), arrayLiteral, poplex, maybeop); + if (type == "{") return contCommasep(objprop, "}", null, maybeop); + if (type == "quasi") return pass(quasi, maybeop); + if (type == "new") return cont(maybeTarget(noComma)); + return cont(); + } + function maybeexpression(type) { + if (type.match(/[;\}\)\],]/)) return pass(); + return pass(expression); + } + function maybeexpressionNoComma(type) { + if (type.match(/[;\}\)\],]/)) return pass(); + return pass(expressionNoComma); + } + + function maybeoperatorComma(type, value) { + if (type == ",") return cont(expression); + return maybeoperatorNoComma(type, value, false); + } + function maybeoperatorNoComma(type, value, noComma) { + var me = noComma == false ? maybeoperatorComma : maybeoperatorNoComma; + var expr = noComma == false ? expression : expressionNoComma; + if (type == "=>") return cont(pushcontext, noComma ? arrowBodyNoComma : arrowBody, popcontext); + if (type == "operator") { + if (/\+\+|--/.test(value)) return cont(me); + if (value == "?") return cont(expression, expect(":"), expr); + return cont(expr); + } + if (type == "quasi") { return pass(quasi, me); } + if (type == ";") return; + if (type == "(") return contCommasep(expressionNoComma, ")", "call", me); + if (type == ".") return cont(property, me); + if (type == "[") return cont(pushlex("]"), maybeexpression, expect("]"), poplex, me); + } + function quasi(type, value) { + if (type != "quasi") return pass(); + if (value.slice(value.length - 2) != "${") return cont(quasi); + return cont(expression, continueQuasi); + } + function continueQuasi(type) { + if (type == "}") { + cx.marked = "string-2"; + cx.state.tokenize = tokenQuasi; + return cont(quasi); + } + } + function arrowBody(type) { + findFatArrow(cx.stream, cx.state); + return pass(type == "{" ? statement : expression); + } + function arrowBodyNoComma(type) { + findFatArrow(cx.stream, cx.state); + return pass(type == "{" ? statement : expressionNoComma); + } + function maybeTarget(noComma) { + return function(type) { + if (type == ".") return cont(noComma ? targetNoComma : target); + else return pass(noComma ? expressionNoComma : expression); + }; + } + function target(_, value) { + if (value == "target") { cx.marked = "keyword"; return cont(maybeoperatorComma); } + } + function targetNoComma(_, value) { + if (value == "target") { cx.marked = "keyword"; return cont(maybeoperatorNoComma); } + } + function maybelabel(type) { + if (type == ":") return cont(poplex, statement); + return pass(maybeoperatorComma, expect(";"), poplex); + } + function property(type) { + if (type == "variable") {cx.marked = "property"; return cont();} + } + function objprop(type, value) { + if (type == "variable" || cx.style == "keyword") { + cx.marked = "property"; + if (value == "get" || value == "set") return cont(getterSetter); + return cont(afterprop); + } else if (type == "number" || type == "string") { + cx.marked = jsonldMode ? "property" : (cx.style + " property"); + return cont(afterprop); + } else if (type == "jsonld-keyword") { + return cont(afterprop); + } else if (type == "modifier") { + return cont(objprop) + } else if (type == "[") { + return cont(expression, expect("]"), afterprop); + } else if (type == "spread") { + return cont(expression); + } + } + function getterSetter(type) { + if (type != "variable") return pass(afterprop); + cx.marked = "property"; + return cont(functiondef); + } + function afterprop(type) { + if (type == ":") return cont(expressionNoComma); + if (type == "(") return pass(functiondef); + } + function commasep(what, end) { + function proceed(type) { + if (type == ",") { + var lex = cx.state.lexical; + if (lex.info == "call") lex.pos = (lex.pos || 0) + 1; + return cont(what, proceed); + } + if (type == end) return cont(); + return cont(expect(end)); + } + return function(type) { + if (type == end) return cont(); + return pass(what, proceed); + }; + } + function contCommasep(what, end, info) { + for (var i = 3; i < arguments.length; i++) + cx.cc.push(arguments[i]); + return cont(pushlex(end, info), commasep(what, end), poplex); + } + function block(type) { + if (type == "}") return cont(); + return pass(statement, block); + } + function maybetype(type) { + if (isTS && type == ":") return cont(typedef); + } + function maybedefault(_, value) { + if (value == "=") return cont(expressionNoComma); + } + function typedef(type) { + if (type == "variable") {cx.marked = "variable-3"; return cont();} + } + function vardef() { + return pass(pattern, maybetype, maybeAssign, vardefCont); + } + function pattern(type, value) { + if (type == "modifier") return cont(pattern) + if (type == "variable") { register(value); return cont(); } + if (type == "spread") return cont(pattern); + if (type == "[") return contCommasep(pattern, "]"); + if (type == "{") return contCommasep(proppattern, "}"); + } + function proppattern(type, value) { + if (type == "variable" && !cx.stream.match(/^\s*:/, false)) { + register(value); + return cont(maybeAssign); + } + if (type == "variable") cx.marked = "property"; + if (type == "spread") return cont(pattern); + if (type == "}") return pass(); + return cont(expect(":"), pattern, maybeAssign); + } + function maybeAssign(_type, value) { + if (value == "=") return cont(expressionNoComma); + } + function vardefCont(type) { + if (type == ",") return cont(vardef); + } + function maybeelse(type, value) { + if (type == "keyword b" && value == "else") return cont(pushlex("form", "else"), statement, poplex); + } + function forspec(type) { + if (type == "(") return cont(pushlex(")"), forspec1, expect(")"), poplex); + } + function forspec1(type) { + if (type == "var") return cont(vardef, expect(";"), forspec2); + if (type == ";") return cont(forspec2); + if (type == "variable") return cont(formaybeinof); + return pass(expression, expect(";"), forspec2); + } + function formaybeinof(_type, value) { + if (value == "in" || value == "of") { cx.marked = "keyword"; return cont(expression); } + return cont(maybeoperatorComma, forspec2); + } + function forspec2(type, value) { + if (type == ";") return cont(forspec3); + if (value == "in" || value == "of") { cx.marked = "keyword"; return cont(expression); } + return pass(expression, expect(";"), forspec3); + } + function forspec3(type) { + if (type != ")") cont(expression); + } + function functiondef(type, value) { + if (value == "*") {cx.marked = "keyword"; return cont(functiondef);} + if (type == "variable") {register(value); return cont(functiondef);} + if (type == "(") return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, statement, popcontext); + } + function funarg(type) { + if (type == "spread") return cont(funarg); + return pass(pattern, maybetype, maybedefault); + } + function className(type, value) { + if (type == "variable") {register(value); return cont(classNameAfter);} + } + function classNameAfter(type, value) { + if (value == "extends") return cont(expression, classNameAfter); + if (type == "{") return cont(pushlex("}"), classBody, poplex); + } + function classBody(type, value) { + if (type == "variable" || cx.style == "keyword") { + if (value == "static") { + cx.marked = "keyword"; + return cont(classBody); + } + cx.marked = "property"; + if (value == "get" || value == "set") return cont(classGetterSetter, functiondef, classBody); + return cont(functiondef, classBody); + } + if (value == "*") { + cx.marked = "keyword"; + return cont(classBody); + } + if (type == ";") return cont(classBody); + if (type == "}") return cont(); + } + function classGetterSetter(type) { + if (type != "variable") return pass(); + cx.marked = "property"; + return cont(); + } + function afterExport(_type, value) { + if (value == "*") { cx.marked = "keyword"; return cont(maybeFrom, expect(";")); } + if (value == "default") { cx.marked = "keyword"; return cont(expression, expect(";")); } + return pass(statement); + } + function afterImport(type) { + if (type == "string") return cont(); + return pass(importSpec, maybeFrom); + } + function importSpec(type, value) { + if (type == "{") return contCommasep(importSpec, "}"); + if (type == "variable") register(value); + if (value == "*") cx.marked = "keyword"; + return cont(maybeAs); + } + function maybeAs(_type, value) { + if (value == "as") { cx.marked = "keyword"; return cont(importSpec); } + } + function maybeFrom(_type, value) { + if (value == "from") { cx.marked = "keyword"; return cont(expression); } + } + function arrayLiteral(type) { + if (type == "]") return cont(); + return pass(expressionNoComma, maybeArrayComprehension); + } + function maybeArrayComprehension(type) { + if (type == "for") return pass(comprehension, expect("]")); + if (type == ",") return cont(commasep(maybeexpressionNoComma, "]")); + return pass(commasep(expressionNoComma, "]")); + } + function comprehension(type) { + if (type == "for") return cont(forspec, comprehension); + if (type == "if") return cont(expression, comprehension); + } + + function isContinuedStatement(state, textAfter) { + return state.lastType == "operator" || state.lastType == "," || + isOperatorChar.test(textAfter.charAt(0)) || + /[,.]/.test(textAfter.charAt(0)); + } + + // Interface + + return { + startState: function(basecolumn) { + var state = { + tokenize: tokenBase, + lastType: "sof", + cc: [], + lexical: new JSLexical((basecolumn || 0) - indentUnit, 0, "block", false), + localVars: parserConfig.localVars, + context: parserConfig.localVars && {vars: parserConfig.localVars}, + indented: basecolumn || 0 + }; + if (parserConfig.globalVars && typeof parserConfig.globalVars == "object") + state.globalVars = parserConfig.globalVars; + return state; + }, + + token: function(stream, state) { + if (stream.sol()) { + if (!state.lexical.hasOwnProperty("align")) + state.lexical.align = false; + state.indented = stream.indentation(); + findFatArrow(stream, state); + } + if (state.tokenize != tokenComment && stream.eatSpace()) return null; + var style = state.tokenize(stream, state); + if (type == "comment") return style; + state.lastType = type == "operator" && (content == "++" || content == "--") ? "incdec" : type; + return parseJS(state, style, type, content, stream); + }, + + indent: function(state, textAfter) { + if (state.tokenize == tokenComment) return CodeMirror.Pass; + if (state.tokenize != tokenBase) return 0; + var firstChar = textAfter && textAfter.charAt(0), lexical = state.lexical; + // Kludge to prevent 'maybelse' from blocking lexical scope pops + if (!/^\s*else\b/.test(textAfter)) for (var i = state.cc.length - 1; i >= 0; --i) { + var c = state.cc[i]; + if (c == poplex) lexical = lexical.prev; + else if (c != maybeelse) break; + } + if (lexical.type == "stat" && firstChar == "}") lexical = lexical.prev; + if (statementIndent && lexical.type == ")" && lexical.prev.type == "stat") + lexical = lexical.prev; + var type = lexical.type, closing = firstChar == type; + + if (type == "vardef") return lexical.indented + (state.lastType == "operator" || state.lastType == "," ? lexical.info + 1 : 0); + else if (type == "form" && firstChar == "{") return lexical.indented; + else if (type == "form") return lexical.indented + indentUnit; + else if (type == "stat") + return lexical.indented + (isContinuedStatement(state, textAfter) ? statementIndent || indentUnit : 0); + else if (lexical.info == "switch" && !closing && parserConfig.doubleIndentSwitch != false) + return lexical.indented + (/^(?:case|default)\b/.test(textAfter) ? indentUnit : 2 * indentUnit); + else if (lexical.align) return lexical.column + (closing ? 0 : 1); + else return lexical.indented + (closing ? 0 : indentUnit); + }, + + electricInput: /^\s*(?:case .*?:|default:|\{|\})$/, + blockCommentStart: jsonMode ? null : "/*", + blockCommentEnd: jsonMode ? null : "*/", + lineComment: jsonMode ? null : "//", + fold: "brace", + closeBrackets: "()[]{}''\"\"``", + + helperType: jsonMode ? "json" : "javascript", + jsonldMode: jsonldMode, + jsonMode: jsonMode, + + expressionAllowed: expressionAllowed, + skipExpression: function(state) { + var top = state.cc[state.cc.length - 1] + if (top == expression || top == expressionNoComma) state.cc.pop() + } + }; +}); + +CodeMirror.registerHelper("wordChars", "javascript", /[\w$]/); + +CodeMirror.defineMIME("text/javascript", "javascript"); +CodeMirror.defineMIME("text/ecmascript", "javascript"); +CodeMirror.defineMIME("application/javascript", "javascript"); +CodeMirror.defineMIME("application/x-javascript", "javascript"); +CodeMirror.defineMIME("application/ecmascript", "javascript"); +CodeMirror.defineMIME("application/json", {name: "javascript", json: true}); +CodeMirror.defineMIME("application/x-json", {name: "javascript", json: true}); +CodeMirror.defineMIME("application/ld+json", {name: "javascript", jsonld: true}); +CodeMirror.defineMIME("text/typescript", { name: "javascript", typescript: true }); +CodeMirror.defineMIME("application/typescript", { name: "javascript", typescript: true }); + +}); diff --git a/branch/4.04/libraries/codemirror/lib/mllike.js b/branch/4.04/libraries/codemirror/lib/mllike.js new file mode 100644 index 0000000000000000000000000000000000000000..bf0b8a674f531a3acd1c2b9e217ed6ee9804d01e --- /dev/null +++ b/branch/4.04/libraries/codemirror/lib/mllike.js @@ -0,0 +1,205 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: http://codemirror.net/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +CodeMirror.defineMode('mllike', function(_config, parserConfig) { + var words = { + 'let': 'keyword', + 'rec': 'keyword', + 'in': 'keyword', + 'of': 'keyword', + 'and': 'keyword', + 'if': 'keyword', + 'then': 'keyword', + 'else': 'keyword', + 'for': 'keyword', + 'to': 'keyword', + 'while': 'keyword', + 'do': 'keyword', + 'done': 'keyword', + 'fun': 'keyword', + 'function': 'keyword', + 'val': 'keyword', + 'type': 'keyword', + 'mutable': 'keyword', + 'match': 'keyword', + 'with': 'keyword', + 'try': 'keyword', + 'open': 'builtin', + 'ignore': 'builtin', + 'begin': 'keyword', + 'end': 'keyword' + }; + + var extraWords = parserConfig.extraWords || {}; + for (var prop in extraWords) { + if (extraWords.hasOwnProperty(prop)) { + words[prop] = parserConfig.extraWords[prop]; + } + } + + function tokenBase(stream, state) { + var ch = stream.next(); + + if (ch === '"') { + state.tokenize = tokenString; + return state.tokenize(stream, state); + } + if (ch === '(') { + if (stream.eat('*')) { + state.commentLevel++; + state.tokenize = tokenComment; + return state.tokenize(stream, state); + } + } + if (ch === '~') { + stream.eatWhile(/\w/); + return 'variable-2'; + } + if (ch === '`') { + stream.eatWhile(/\w/); + return 'quote'; + } + if (ch === '/' && parserConfig.slashComments && stream.eat('/')) { + stream.skipToEnd(); + return 'comment'; + } + if (/\d/.test(ch)) { + stream.eatWhile(/[\d]/); + if (stream.eat('.')) { + stream.eatWhile(/[\d]/); + } + return 'number'; + } + if ( /[+\-*&%=<>!?|]/.test(ch)) { + return 'operator'; + } + stream.eatWhile(/\w/); + var cur = stream.current(); + return words.hasOwnProperty(cur) ? words[cur] : 'variable'; + } + + function tokenString(stream, state) { + var next, end = false, escaped = false; + while ((next = stream.next()) != null) { + if (next === '"' && !escaped) { + end = true; + break; + } + escaped = !escaped && next === '\\'; + } + if (end && !escaped) { + state.tokenize = tokenBase; + } + return 'string'; + }; + + function tokenComment(stream, state) { + var prev, next; + while(state.commentLevel > 0 && (next = stream.next()) != null) { + if (prev === '(' && next === '*') state.commentLevel++; + if (prev === '*' && next === ')') state.commentLevel--; + prev = next; + } + if (state.commentLevel <= 0) { + state.tokenize = tokenBase; + } + return 'comment'; + } + + return { + startState: function() {return {tokenize: tokenBase, commentLevel: 0};}, + token: function(stream, state) { + if (stream.eatSpace()) return null; + return state.tokenize(stream, state); + }, + + blockCommentStart: "(*", + blockCommentEnd: "*)", + lineComment: parserConfig.slashComments ? "//" : null + }; +}); + +CodeMirror.defineMIME('text/x-ocaml', { + name: 'mllike', + extraWords: { + 'succ': 'keyword', + 'trace': 'builtin', + 'exit': 'builtin', + 'print_string': 'builtin', + 'print_endline': 'builtin', + 'true': 'atom', + 'false': 'atom', + 'raise': 'keyword' + } +}); + +CodeMirror.defineMIME('text/x-fsharp', { + name: 'mllike', + extraWords: { + 'abstract': 'keyword', + 'as': 'keyword', + 'assert': 'keyword', + 'base': 'keyword', + 'class': 'keyword', + 'default': 'keyword', + 'delegate': 'keyword', + 'downcast': 'keyword', + 'downto': 'keyword', + 'elif': 'keyword', + 'exception': 'keyword', + 'extern': 'keyword', + 'finally': 'keyword', + 'global': 'keyword', + 'inherit': 'keyword', + 'inline': 'keyword', + 'interface': 'keyword', + 'internal': 'keyword', + 'lazy': 'keyword', + 'let!': 'keyword', + 'member' : 'keyword', + 'module': 'keyword', + 'namespace': 'keyword', + 'new': 'keyword', + 'null': 'keyword', + 'override': 'keyword', + 'private': 'keyword', + 'public': 'keyword', + 'return': 'keyword', + 'return!': 'keyword', + 'select': 'keyword', + 'static': 'keyword', + 'struct': 'keyword', + 'upcast': 'keyword', + 'use': 'keyword', + 'use!': 'keyword', + 'val': 'keyword', + 'when': 'keyword', + 'yield': 'keyword', + 'yield!': 'keyword', + + 'List': 'builtin', + 'Seq': 'builtin', + 'Map': 'builtin', + 'Set': 'builtin', + 'int': 'builtin', + 'string': 'builtin', + 'raise': 'builtin', + 'failwith': 'builtin', + 'not': 'builtin', + 'true': 'builtin', + 'false': 'builtin' + }, + slashComments: true +}); + +}); diff --git a/branch/4.04/libraries/jquery-2.1.1.min.js b/branch/4.04/libraries/jquery-2.1.1.min.js new file mode 100644 index 0000000000000000000000000000000000000000..e5ace116b6f53cfec96eb5175ecd36f727ad4047 --- /dev/null +++ b/branch/4.04/libraries/jquery-2.1.1.min.js @@ -0,0 +1,4 @@ +/*! jQuery v2.1.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */ +!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m="2.1.1",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return!n.isArray(a)&&a-parseFloat(a)>=0},isPlainObject:function(a){return"object"!==n.type(a)||a.nodeType||n.isWindow(a)?!1:a.constructor&&!j.call(a.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=l.createElement("script"),b.text=a,l.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:g.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(e=d.call(arguments,2),f=function(){return a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:k}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+-new Date,v=a.document,w=0,x=0,y=gb(),z=gb(),A=gb(),B=function(a,b){return a===b&&(l=!0),0},C="undefined",D=1<<31,E={}.hasOwnProperty,F=[],G=F.pop,H=F.push,I=F.push,J=F.slice,K=F.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",N="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=N.replace("w","w#"),P="\\["+M+"*("+N+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+O+"))|)"+M+"*\\]",Q=":("+N+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+P+")*)|.*)\\)|)",R=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),S=new RegExp("^"+M+"*,"+M+"*"),T=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp("="+M+"*([^\\]'\"]*?)"+M+"*\\]","g"),V=new RegExp(Q),W=new RegExp("^"+O+"$"),X={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\.("+N+")"),TAG:new RegExp("^("+N.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+Q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{I.apply(F=J.call(v.childNodes),v.childNodes),F[v.childNodes.length].nodeType}catch(eb){I={apply:F.length?function(a,b){H.apply(a,J.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],!a||"string"!=typeof a)return d;if(1!==(k=b.nodeType)&&9!==k)return[];if(p&&!e){if(f=_.exec(a))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return I.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return I.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=9===k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+qb(o[l]);w=ab.test(a)&&ob(b.parentNode)||b,x=o.join(",")}if(x)try{return I.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function gb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function hb(a){return a[u]=!0,a}function ib(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function jb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function kb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||D)-(~a.sourceIndex||D);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function lb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function nb(a){return hb(function(b){return b=+b,hb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function ob(a){return a&&typeof a.getElementsByTagName!==C&&a}c=fb.support={},f=fb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fb.setDocument=function(a){var b,e=a?a.ownerDocument||a:v,g=e.defaultView;return e!==n&&9===e.nodeType&&e.documentElement?(n=e,o=e.documentElement,p=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){m()},!1):g.attachEvent&&g.attachEvent("onunload",function(){m()})),c.attributes=ib(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ib(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(e.getElementsByClassName)&&ib(function(a){return a.innerHTML="<div class='a'></div><div class='a i'></div>",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=ib(function(a){return o.appendChild(a).id=u,!e.getElementsByName||!e.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==C&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c=typeof a.getAttributeNode!==C&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==C?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==C&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(e.querySelectorAll))&&(ib(function(a){a.innerHTML="<select msallowclip=''><option selected=''></option></select>",a.querySelectorAll("[msallowclip^='']").length&&q.push("[*^$]="+M+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+M+"*(?:value|"+L+")"),a.querySelectorAll(":checked").length||q.push(":checked")}),ib(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+M+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ib(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",Q)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===v&&t(v,a)?-1:b===e||b.ownerDocument===v&&t(v,b)?1:k?K.call(k,a)-K.call(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],i=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:k?K.call(k,a)-K.call(k,b):0;if(f===g)return kb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?kb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},e):n},fb.matches=function(a,b){return fb(a,null,null,b)},fb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fb(b,n,null,[a]).length>0},fb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&E.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fb.selectors={cacheLength:50,createPseudo:hb,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+M+")"+a+"("+M+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==C&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?hb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=K.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:hb(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?hb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:hb(function(a){return function(b){return fb(a,b).length>0}}),contains:hb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:hb(function(a){return W.test(a||"")||fb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:nb(function(){return[0]}),last:nb(function(a,b){return[b-1]}),eq:nb(function(a,b,c){return[0>c?c+b:c]}),even:nb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:nb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:nb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:nb(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=lb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=mb(b);function pb(){}pb.prototype=d.filters=d.pseudos,d.setFilters=new pb,g=fb.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter)!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?fb.error(a):z(a,i).slice(0)};function qb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function rb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function sb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function tb(a,b,c){for(var d=0,e=b.length;e>d;d++)fb(a,b[d],c);return c}function ub(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function vb(a,b,c,d,e,f){return d&&!d[u]&&(d=vb(d)),e&&!e[u]&&(e=vb(e,f)),hb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||tb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ub(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ub(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?K.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ub(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):I.apply(g,r)})}function wb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=rb(function(a){return a===b},h,!0),l=rb(function(a){return K.call(b,a)>-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>i;i++)if(c=d.relative[a[i].type])m=[rb(sb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return vb(i>1&&sb(m),i>1&&qb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&wb(a.slice(i,e)),f>e&&wb(a=a.slice(e)),f>e&&qb(a))}m.push(c)}return sb(m)}function xb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=G.call(i));s=ub(s)}I.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&fb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?hb(f):f}return h=fb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xb(e,d)),f.selector=a}return f},i=fb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&ob(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qb(j),!a)return I.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&ob(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ib(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ib(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||jb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ib(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||jb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ib(function(a){return null==a.getAttribute("disabled")})||jb(L,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fb}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return g.call(b,a)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:l,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=l.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=l,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};A.prototype=n.fn,y=n(l);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?g.call(n(a),this[0]):g.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(C[a]||n.unique(e),B.test(a)&&e.reverse()),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return n.each(a.match(E)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(b=a.memory&&l,c=!0,g=e||0,e=0,f=h.length,d=!0;h&&f>g;g++)if(h[g].apply(l[0],l[1])===!1&&a.stopOnFalse){b=!1;break}d=!1,h&&(i?i.length&&j(i.shift()):b?h=[]:k.disable())},k={add:function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this},remove:function(){return h&&n.each(arguments,function(a,b){var c;while((c=n.inArray(b,h,c))>-1)h.splice(c,1),d&&(f>=c&&f--,g>=c&&g--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],f=0,this},disable:function(){return h=i=b=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,b||k.disable(),this},locked:function(){return!i},fireWith:function(a,b){return!h||c&&!i||(b=b||[],b=[a,b.slice?b.slice():b],d?i.push(b):j(b)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!c}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(H.resolveWith(l,[n]),n.fn.triggerHandler&&(n(l).triggerHandler("ready"),n(l).off("ready"))))}});function I(){l.removeEventListener("DOMContentLoaded",I,!1),a.removeEventListener("load",I,!1),n.ready()}n.ready.promise=function(b){return H||(H=n.Deferred(),"complete"===l.readyState?setTimeout(n.ready):(l.addEventListener("DOMContentLoaded",I,!1),a.addEventListener("load",I,!1))),H.promise(b)},n.ready.promise();var J=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f};n.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=n.expando+Math.random()}K.uid=1,K.accepts=n.acceptData,K.prototype={key:function(a){if(!K.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=K.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,n.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if("string"==typeof b)f[b]=c;else if(n.isEmptyObject(f))n.extend(this.cache[e],b);else for(d in b)f[d]=b[d];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(E)||[])),c=d.length;while(c--)delete g[d[c]]}},hasData:function(a){return!n.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var L=new K,M=new K,N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(O,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}M.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return M.hasData(a)||L.hasData(a)},data:function(a,b,c){return M.access(a,b,c)},removeData:function(a,b){M.remove(a,b) +},_data:function(a,b,c){return L.access(a,b,c)},_removeData:function(a,b){L.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=M.get(f),1===f.nodeType&&!L.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d])));L.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){M.set(this,a)}):J(this,function(b){var c,d=n.camelCase(a);if(f&&void 0===b){if(c=M.get(f,a),void 0!==c)return c;if(c=M.get(f,d),void 0!==c)return c;if(c=P(f,d,void 0),void 0!==c)return c}else this.each(function(){var c=M.get(this,d);M.set(this,d,b),-1!==a.indexOf("-")&&void 0!==c&&M.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){M.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=L.get(a,b),c&&(!d||n.isArray(c)?d=L.access(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return L.get(a,c)||L.access(a,c,{empty:n.Callbacks("once memory").add(function(){L.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=L.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var Q=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,R=["Top","Right","Bottom","Left"],S=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)},T=/^(?:checkbox|radio)$/i;!function(){var a=l.createDocumentFragment(),b=a.appendChild(l.createElement("div")),c=l.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="<textarea>x</textarea>",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var U="undefined";k.focusinBubbles="onfocusin"in a;var V=/^key/,W=/^(?:mouse|pointer|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,Y=/^([^.]*)(?:\.(.+)|)$/;function Z(){return!0}function $(){return!1}function _(){try{return l.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return typeof n!==U&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(E)||[""],j=b.length;while(j--)h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g,!1)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.hasData(a)&&L.get(a);if(r&&(i=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=i[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&(delete r.handle,L.remove(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,m,o,p=[d||l],q=j.call(b,"type")?b.type:b,r=j.call(b,"namespace")?b.namespace.split("."):[];if(g=h=d=d||l,3!==d.nodeType&&8!==d.nodeType&&!X.test(q+n.event.triggered)&&(q.indexOf(".")>=0&&(r=q.split("."),q=r.shift(),r.sort()),k=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=r.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),o=n.event.special[q]||{},e||!o.trigger||o.trigger.apply(d,c)!==!1)){if(!e&&!o.noBubble&&!n.isWindow(d)){for(i=o.delegateType||q,X.test(i+q)||(g=g.parentNode);g;g=g.parentNode)p.push(g),h=g;h===(d.ownerDocument||l)&&p.push(h.defaultView||h.parentWindow||a)}f=0;while((g=p[f++])&&!b.isPropagationStopped())b.type=f>1?i:o.bindType||q,m=(L.get(g,"events")||{})[b.type]&&L.get(g,"handle"),m&&m.apply(g,c),m=k&&g[k],m&&m.apply&&n.acceptData(g)&&(b.result=m.apply(g,c),b.result===!1&&b.preventDefault());return b.type=q,e||b.isDefaultPrevented()||o._default&&o._default.apply(p.pop(),c)!==!1||!n.acceptData(d)||k&&n.isFunction(d[q])&&!n.isWindow(d)&&(h=d[k],h&&(d[k]=null),n.event.triggered=q,d[q](),n.event.triggered=void 0,h&&(d[k]=h)),b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(L.get(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(g.namespace))&&(a.handleObj=g,a.data=g.data,e=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(a.result=e)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!==this;i=i.parentNode||this)if(i.disabled!==!0||"click"!==a.type){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>=0:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button;return null==a.pageX&&null!=b.clientX&&(c=a.target.ownerDocument||l,d=c.documentElement,e=c.body,a.pageX=b.clientX+(d&&d.scrollLeft||e&&e.scrollLeft||0)-(d&&d.clientLeft||e&&e.clientLeft||0),a.pageY=b.clientY+(d&&d.scrollTop||e&&e.scrollTop||0)-(d&&d.clientTop||e&&e.clientTop||0)),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},fix:function(a){if(a[n.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=W.test(e)?this.mouseHooks:V.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new n.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=l),3===a.target.nodeType&&(a.target=a.target.parentNode),g.filter?g.filter(a,f):a},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==_()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===_()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&n.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=n.extend(new n.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?n.event.trigger(e,null,b):n.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},n.removeEvent=function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?Z:$):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={isDefaultPrevented:$,isPropagationStopped:$,isImmediatePropagationStopped:$,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=Z,a&&a.preventDefault&&a.preventDefault()},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=Z,a&&a.stopPropagation&&a.stopPropagation()},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=Z,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!n.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),k.focusinBubbles||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a),!0)};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=L.access(d,b);e||d.addEventListener(a,c,!0),L.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=L.access(d,b)-1;e?L.access(d,b,e):(d.removeEventListener(a,c,!0),L.remove(d,b))}}}),n.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(g in a)this.on(g,b,c,a[g],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=$;else if(!d)return this;return 1===e&&(f=d,d=function(a){return n().off(a),f.apply(this,arguments)},d.guid=f.guid||(f.guid=n.guid++)),this.each(function(){n.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=$),this.each(function(){n.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}});var ab=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bb=/<([\w:]+)/,cb=/<|&#?\w+;/,db=/<(?:script|style|link)/i,eb=/checked\s*(?:[^=]|=\s*.checked.)/i,fb=/^$|\/(?:java|ecma)script/i,gb=/^true\/(.*)/,hb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,ib={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};ib.optgroup=ib.option,ib.tbody=ib.tfoot=ib.colgroup=ib.caption=ib.thead,ib.th=ib.td;function jb(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function kb(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function lb(a){var b=gb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function mb(a,b){for(var c=0,d=a.length;d>c;c++)L.set(a[c],"globalEval",!b||L.get(b[c],"globalEval"))}function nb(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(L.hasData(a)&&(f=L.access(a),g=L.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)n.event.add(b,e,j[e][c])}M.hasData(a)&&(h=M.access(a),i=n.extend({},h),M.set(b,i))}}function ob(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function pb(a,b){var c=b.nodeName.toLowerCase();"input"===c&&T.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}n.extend({clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=n.contains(a.ownerDocument,a);if(!(k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(g=ob(h),f=ob(a),d=0,e=f.length;e>d;d++)pb(f[d],g[d]);if(b)if(c)for(f=f||ob(a),g=g||ob(h),d=0,e=f.length;e>d;d++)nb(f[d],g[d]);else nb(a,h);return g=ob(h,"script"),g.length>0&&mb(g,!i&&ob(a,"script")),h},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k=b.createDocumentFragment(),l=[],m=0,o=a.length;o>m;m++)if(e=a[m],e||0===e)if("object"===n.type(e))n.merge(l,e.nodeType?[e]:e);else if(cb.test(e)){f=f||k.appendChild(b.createElement("div")),g=(bb.exec(e)||["",""])[1].toLowerCase(),h=ib[g]||ib._default,f.innerHTML=h[1]+e.replace(ab,"<$1></$2>")+h[2],j=h[0];while(j--)f=f.lastChild;n.merge(l,f.childNodes),f=k.firstChild,f.textContent=""}else l.push(b.createTextNode(e));k.textContent="",m=0;while(e=l[m++])if((!d||-1===n.inArray(e,d))&&(i=n.contains(e.ownerDocument,e),f=ob(k.appendChild(e),"script"),i&&mb(f),c)){j=0;while(e=f[j++])fb.test(e.type||"")&&c.push(e)}return k},cleanData:function(a){for(var b,c,d,e,f=n.event.special,g=0;void 0!==(c=a[g]);g++){if(n.acceptData(c)&&(e=c[L.expando],e&&(b=L.cache[e]))){if(b.events)for(d in b.events)f[d]?n.event.remove(c,d):n.removeEvent(c,d,b.handle);L.cache[e]&&delete L.cache[e]}delete M.cache[c[M.expando]]}}}),n.fn.extend({text:function(a){return J(this,function(a){return void 0===a?n.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=a)})},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(ob(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&mb(ob(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(n.cleanData(ob(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return J(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!db.test(a)&&!ib[(bb.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(ab,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(ob(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(ob(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,m=this,o=l-1,p=a[0],q=n.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&eb.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(c=n.buildFragment(a,this[0].ownerDocument,!1,this),d=c.firstChild,1===c.childNodes.length&&(c=d),d)){for(f=n.map(ob(c,"script"),kb),g=f.length;l>j;j++)h=c,j!==o&&(h=n.clone(h,!0,!0),g&&n.merge(f,ob(h,"script"))),b.call(this[j],h,j);if(g)for(i=f[f.length-1].ownerDocument,n.map(f,lb),j=0;g>j;j++)h=f[j],fb.test(h.type||"")&&!L.access(h,"globalEval")&&n.contains(i,h)&&(h.src?n._evalUrl&&n._evalUrl(h.src):n.globalEval(h.textContent.replace(hb,"")))}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=[],e=n(a),g=e.length-1,h=0;g>=h;h++)c=h===g?this:this.clone(!0),n(e[h])[b](c),f.apply(d,c.get());return this.pushStack(d)}});var qb,rb={};function sb(b,c){var d,e=n(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:n.css(e[0],"display");return e.detach(),f}function tb(a){var b=l,c=rb[a];return c||(c=sb(a,b),"none"!==c&&c||(qb=(qb||n("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=qb[0].contentDocument,b.write(),b.close(),c=sb(a,b),qb.detach()),rb[a]=c),c}var ub=/^margin/,vb=new RegExp("^("+Q+")(?!px)[a-z%]+$","i"),wb=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)};function xb(a,b,c){var d,e,f,g,h=a.style;return c=c||wb(a),c&&(g=c.getPropertyValue(b)||c[b]),c&&(""!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),vb.test(g)&&ub.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0!==g?g+"":g}function yb(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d=l.documentElement,e=l.createElement("div"),f=l.createElement("div");if(f.style){f.style.backgroundClip="content-box",f.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===f.style.backgroundClip,e.style.cssText="border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;position:absolute",e.appendChild(f);function g(){f.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",f.innerHTML="",d.appendChild(e);var g=a.getComputedStyle(f,null);b="1%"!==g.top,c="4px"===g.width,d.removeChild(e)}a.getComputedStyle&&n.extend(k,{pixelPosition:function(){return g(),b},boxSizingReliable:function(){return null==c&&g(),c},reliableMarginRight:function(){var b,c=f.appendChild(l.createElement("div"));return c.style.cssText=f.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",c.style.marginRight=c.style.width="0",f.style.width="1px",d.appendChild(e),b=!parseFloat(a.getComputedStyle(c,null).marginRight),d.removeChild(e),b}})}}(),n.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var zb=/^(none|table(?!-c[ea]).+)/,Ab=new RegExp("^("+Q+")(.*)$","i"),Bb=new RegExp("^([+-])=("+Q+")","i"),Cb={position:"absolute",visibility:"hidden",display:"block"},Db={letterSpacing:"0",fontWeight:"400"},Eb=["Webkit","O","Moz","ms"];function Fb(a,b){if(b in a)return b;var c=b[0].toUpperCase()+b.slice(1),d=b,e=Eb.length;while(e--)if(b=Eb[e]+c,b in a)return b;return d}function Gb(a,b,c){var d=Ab.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Hb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+R[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+R[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+R[f]+"Width",!0,e))):(g+=n.css(a,"padding"+R[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+R[f]+"Width",!0,e)));return g}function Ib(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=wb(a),g="border-box"===n.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=xb(a,b,f),(0>e||null==e)&&(e=a.style[b]),vb.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Hb(a,b,c||(g?"border":"content"),d,f)+"px"}function Jb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=L.get(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&S(d)&&(f[g]=L.access(d,"olddisplay",tb(d.nodeName)))):(e=S(d),"none"===c&&e||L.set(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=xb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;return b=n.cssProps[h]||(n.cssProps[h]=Fb(i,h)),g=n.cssHooks[b]||n.cssHooks[h],void 0===c?g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b]:(f=typeof c,"string"===f&&(e=Bb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(n.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||n.cssNumber[h]||(c+="px"),k.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),g&&"set"in g&&void 0===(c=g.set(a,c,d))||(i[b]=c)),void 0)}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=Fb(a.style,h)),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(e=g.get(a,!0,c)),void 0===e&&(e=xb(a,b,d)),"normal"===e&&b in Db&&(e=Db[b]),""===c||c?(f=parseFloat(e),c===!0||n.isNumeric(f)?f||0:e):e}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?zb.test(n.css(a,"display"))&&0===a.offsetWidth?n.swap(a,Cb,function(){return Ib(a,b,d)}):Ib(a,b,d):void 0},set:function(a,c,d){var e=d&&wb(a);return Gb(a,c,d?Hb(a,b,d,"border-box"===n.css(a,"boxSizing",!1,e),e):0)}}}),n.cssHooks.marginRight=yb(k.reliableMarginRight,function(a,b){return b?n.swap(a,{display:"inline-block"},xb,[a,"marginRight"]):void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+R[d]+b]=f[d]||f[d-2]||f[0];return e}},ub.test(a)||(n.cssHooks[a+b].set=Gb)}),n.fn.extend({css:function(a,b){return J(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=wb(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b)},a,b,arguments.length>1)},show:function(){return Jb(this,!0)},hide:function(){return Jb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){S(this)?n(this).show():n(this).hide()})}});function Kb(a,b,c,d,e){return new Kb.prototype.init(a,b,c,d,e)}n.Tween=Kb,Kb.prototype={constructor:Kb,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=Kb.propHooks[this.prop];return a&&a.get?a.get(this):Kb.propHooks._default.get(this)},run:function(a){var b,c=Kb.propHooks[this.prop];return this.pos=b=this.options.duration?n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Kb.propHooks._default.set(this),this}},Kb.prototype.init.prototype=Kb.prototype,Kb.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[n.cssProps[a.prop]]||n.cssHooks[a.prop])?n.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Kb.propHooks.scrollTop=Kb.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},n.fx=Kb.prototype.init,n.fx.step={};var Lb,Mb,Nb=/^(?:toggle|show|hide)$/,Ob=new RegExp("^(?:([+-])=|)("+Q+")([a-z%]*)$","i"),Pb=/queueHooks$/,Qb=[Vb],Rb={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=Ob.exec(b),f=e&&e[3]||(n.cssNumber[a]?"":"px"),g=(n.cssNumber[a]||"px"!==f&&+d)&&Ob.exec(n.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,n.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function Sb(){return setTimeout(function(){Lb=void 0}),Lb=n.now()}function Tb(a,b){var c,d=0,e={height:a};for(b=b?1:0;4>d;d+=2-b)c=R[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function Ub(a,b,c){for(var d,e=(Rb[b]||[]).concat(Rb["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function Vb(a,b,c){var d,e,f,g,h,i,j,k,l=this,m={},o=a.style,p=a.nodeType&&S(a),q=L.get(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,l.always(function(){l.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[o.overflow,o.overflowX,o.overflowY],j=n.css(a,"display"),k="none"===j?L.get(a,"olddisplay")||tb(a.nodeName):j,"inline"===k&&"none"===n.css(a,"float")&&(o.display="inline-block")),c.overflow&&(o.overflow="hidden",l.always(function(){o.overflow=c.overflow[0],o.overflowX=c.overflow[1],o.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],Nb.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(p?"hide":"show")){if("show"!==e||!q||void 0===q[d])continue;p=!0}m[d]=q&&q[d]||n.style(a,d)}else j=void 0;if(n.isEmptyObject(m))"inline"===("none"===j?tb(a.nodeName):j)&&(o.display=j);else{q?"hidden"in q&&(p=q.hidden):q=L.access(a,"fxshow",{}),f&&(q.hidden=!p),p?n(a).show():l.done(function(){n(a).hide()}),l.done(function(){var b;L.remove(a,"fxshow");for(b in m)n.style(a,b,m[b])});for(d in m)g=Ub(p?q[d]:0,d,l),d in q||(q[d]=g.start,p&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function Wb(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function Xb(a,b,c){var d,e,f=0,g=Qb.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=Lb||Sb(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:Lb||Sb(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(Wb(k,j.opts.specialEasing);g>f;f++)if(d=Qb[f].call(j,a,k,j.opts))return d;return n.map(k,Ub,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(Xb,{tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],Rb[c]=Rb[c]||[],Rb[c].unshift(b)},prefilter:function(a,b){b?Qb.unshift(a):Qb.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(S).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=Xb(this,n.extend({},a),f);(e||L.get(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=L.get(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&Pb.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=L.get(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(Tb(b,!0),a,d,e)}}),n.each({slideDown:Tb("show"),slideUp:Tb("hide"),slideToggle:Tb("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=0,c=n.timers;for(Lb=n.now();b<c.length;b++)a=c[b],a()||c[b]!==a||c.splice(b--,1);c.length||n.fx.stop(),Lb=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){Mb||(Mb=setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){clearInterval(Mb),Mb=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(a,b){return a=n.fx?n.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a=l.createElement("input"),b=l.createElement("select"),c=b.appendChild(l.createElement("option"));a.type="checkbox",k.checkOn=""!==a.value,k.optSelected=c.selected,b.disabled=!0,k.optDisabled=!c.disabled,a=l.createElement("input"),a.value="t",a.type="radio",k.radioValue="t"===a.value}();var Yb,Zb,$b=n.expr.attrHandle;n.fn.extend({attr:function(a,b){return J(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===U?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),d=n.attrHooks[b]||(n.expr.match.bool.test(b)?Zb:Yb)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=n.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void n.removeAttr(a,b)) +},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)&&(a[d]=!1),a.removeAttribute(c)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),Zb={set:function(a,b,c){return b===!1?n.removeAttr(a,c):a.setAttribute(c,c),c}},n.each(n.expr.match.bool.source.match(/\w+/g),function(a,b){var c=$b[b]||n.find.attr;$b[b]=function(a,b,d){var e,f;return d||(f=$b[b],$b[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,$b[b]=f),e}});var _b=/^(?:input|select|textarea|button)$/i;n.fn.extend({prop:function(a,b){return J(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[n.propFix[a]||a]})}}),n.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!n.isXMLDoc(a),f&&(b=n.propFix[b]||b,e=n.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){return a.hasAttribute("tabindex")||_b.test(a.nodeName)||a.href?a.tabIndex:-1}}}}),k.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this});var ac=/[\t\r\n\f]/g;n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h="string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ac," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=n.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0===arguments.length||"string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ac," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?n.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(n.isFunction(a)?function(c){n(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=n(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===U||"boolean"===c)&&(this.className&&L.set(this,"__className__",this.className),this.className=this.className||a===!1?"":L.get(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(ac," ").indexOf(b)>=0)return!0;return!1}});var bc=/\r/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(bc,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.trim(n.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)d=e[g],(d.selected=n.inArray(d.value,f)>=0)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>=0:void 0}},k.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})}),n.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var cc=n.now(),dc=/\?/;n.parseJSON=function(a){return JSON.parse(a+"")},n.parseXML=function(a){var b,c;if(!a||"string"!=typeof a)return null;try{c=new DOMParser,b=c.parseFromString(a,"text/xml")}catch(d){b=void 0}return(!b||b.getElementsByTagName("parsererror").length)&&n.error("Invalid XML: "+a),b};var ec,fc,gc=/#.*$/,hc=/([?&])_=[^&]*/,ic=/^(.*?):[ \t]*([^\r\n]*)$/gm,jc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,kc=/^(?:GET|HEAD)$/,lc=/^\/\//,mc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,nc={},oc={},pc="*/".concat("*");try{fc=location.href}catch(qc){fc=l.createElement("a"),fc.href="",fc=fc.href}ec=mc.exec(fc.toLowerCase())||[];function rc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(n.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function sc(a,b,c,d){var e={},f=a===oc;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function tc(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&n.extend(!0,a,d),a}function uc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function vc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:fc,type:"GET",isLocal:jc.test(ec[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":pc,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?tc(tc(a,n.ajaxSettings),b):tc(n.ajaxSettings,a)},ajaxPrefilter:rc(nc),ajaxTransport:rc(oc),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=n.ajaxSetup({},b),l=k.context||k,m=k.context&&(l.nodeType||l.jquery)?n(l):n.event,o=n.Deferred(),p=n.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!f){f={};while(b=ic.exec(e))f[b[1].toLowerCase()]=b[2]}b=f[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?e:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return c&&c.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||fc)+"").replace(gc,"").replace(lc,ec[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=n.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(h=mc.exec(k.url.toLowerCase()),k.crossDomain=!(!h||h[1]===ec[1]&&h[2]===ec[2]&&(h[3]||("http:"===h[1]?"80":"443"))===(ec[3]||("http:"===ec[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=n.param(k.data,k.traditional)),sc(nc,k,b,v),2===t)return v;i=k.global,i&&0===n.active++&&n.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!kc.test(k.type),d=k.url,k.hasContent||(k.data&&(d=k.url+=(dc.test(d)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=hc.test(d)?d.replace(hc,"$1_="+cc++):d+(dc.test(d)?"&":"?")+"_="+cc++)),k.ifModified&&(n.lastModified[d]&&v.setRequestHeader("If-Modified-Since",n.lastModified[d]),n.etag[d]&&v.setRequestHeader("If-None-Match",n.etag[d])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+pc+"; q=0.01":""):k.accepts["*"]);for(j in k.headers)v.setRequestHeader(j,k.headers[j]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(j in{success:1,error:1,complete:1})v[j](k[j]);if(c=sc(oc,k,b,v)){v.readyState=1,i&&m.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,c.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,f,h){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),c=void 0,e=h||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,f&&(u=uc(k,v,f)),u=vc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(n.lastModified[d]=w),w=v.getResponseHeader("etag"),w&&(n.etag[d]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,i&&m.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),i&&(m.trigger("ajaxComplete",[v,k]),--n.active||n.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){var b;return n.isFunction(a)?this.each(function(b){n(this).wrapAll(a.call(this,b))}):(this[0]&&(b=n(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this)},wrapInner:function(a){return this.each(n.isFunction(a)?function(b){n(this).wrapInner(a.call(this,b))}:function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}}),n.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0},n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var wc=/%20/g,xc=/\[\]$/,yc=/\r?\n/g,zc=/^(?:submit|button|image|reset|file)$/i,Ac=/^(?:input|select|textarea|keygen)/i;function Bc(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||xc.test(a)?d(a,e):Bc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)Bc(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)Bc(c,a[c],b,e);return d.join("&").replace(wc,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&Ac.test(this.nodeName)&&!zc.test(a)&&(this.checked||!T.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(yc,"\r\n")}}):{name:b.name,value:c.replace(yc,"\r\n")}}).get()}}),n.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(a){}};var Cc=0,Dc={},Ec={0:200,1223:204},Fc=n.ajaxSettings.xhr();a.ActiveXObject&&n(a).on("unload",function(){for(var a in Dc)Dc[a]()}),k.cors=!!Fc&&"withCredentials"in Fc,k.ajax=Fc=!!Fc,n.ajaxTransport(function(a){var b;return k.cors||Fc&&!a.crossDomain?{send:function(c,d){var e,f=a.xhr(),g=++Cc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)f.setRequestHeader(e,c[e]);b=function(a){return function(){b&&(delete Dc[g],b=f.onload=f.onerror=null,"abort"===a?f.abort():"error"===a?d(f.status,f.statusText):d(Ec[f.status]||f.status,f.statusText,"string"==typeof f.responseText?{text:f.responseText}:void 0,f.getAllResponseHeaders()))}},f.onload=b(),f.onerror=b("error"),b=Dc[g]=b("abort");try{f.send(a.hasContent&&a.data||null)}catch(h){if(b)throw h}},abort:function(){b&&b()}}:void 0}),n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(d,e){b=n("<script>").prop({async:!0,charset:a.scriptCharset,src:a.url}).on("load error",c=function(a){b.remove(),c=null,a&&e("error"===a.type?404:200,a.type)}),l.head.appendChild(b[0])},abort:function(){c&&c()}}}});var Gc=[],Hc=/(=)\?(?=&|$)|\?\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Gc.pop()||n.expando+"_"+cc++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(Hc.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&Hc.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(Hc,"$1"+e):b.jsonp!==!1&&(b.url+=(dc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,Gc.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||l;var d=v.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=n.buildFragment([a],b,e),e&&e.length&&n(e).remove(),n.merge([],d.childNodes))};var Ic=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&Ic)return Ic.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=n.trim(a.slice(h)),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&n.ajax({url:a,type:e,dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,f||[a.responseText,b,a])}),this},n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};var Jc=a.document.documentElement;function Kc(a){return n.isWindow(a)?a:9===a.nodeType&&a.defaultView}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&(f+i).indexOf("auto")>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.offset.setOffset(this,a,b)});var b,c,d=this[0],e={top:0,left:0},f=d&&d.ownerDocument;if(f)return b=f.documentElement,n.contains(b,d)?(typeof d.getBoundingClientRect!==U&&(e=d.getBoundingClientRect()),c=Kc(f),{top:e.top+c.pageYOffset-b.clientTop,left:e.left+c.pageXOffset-b.clientLeft}):e},position:function(){if(this[0]){var a,b,c=this[0],d={top:0,left:0};return"fixed"===n.css(c,"position")?b=c.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(d=a.offset()),d.top+=n.css(a[0],"borderTopWidth",!0),d.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-d.top-n.css(c,"marginTop",!0),left:b.left-d.left-n.css(c,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||Jc;while(a&&!n.nodeName(a,"html")&&"static"===n.css(a,"position"))a=a.offsetParent;return a||Jc})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(b,c){var d="pageYOffset"===c;n.fn[b]=function(e){return J(this,function(b,e,f){var g=Kc(b);return void 0===f?g?g[c]:b[e]:void(g?g.scrollTo(d?a.pageXOffset:f,d?f:a.pageYOffset):b[e]=f)},b,e,arguments.length,null)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=yb(k.pixelPosition,function(a,c){return c?(c=xb(a,b),vb.test(c)?n(a).position()[b]+"px":c):void 0})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return J(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.size=function(){return this.length},n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var Lc=a.jQuery,Mc=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=Mc),b&&a.jQuery===n&&(a.jQuery=Lc),n},typeof b===U&&(a.jQuery=a.$=n),n}); diff --git a/branch/4.04/navig-driver.js b/branch/4.04/navig-driver.js new file mode 100644 index 0000000000000000000000000000000000000000..cd86ef05a44b7e7150a40f80bfbe4fb847f6d77e --- /dev/null +++ b/branch/4.04/navig-driver.js @@ -0,0 +1,1493 @@ + +// ----------- Types ---------------- + +// type loc +// e.g. {file: "foo.js", start: {line: 12, column: 9}, end: {line: 13, column: 2} }; +// Locations are generated by the translation from the parser to the AST. +// Lines are numbered starting from "1", and columns are numbered starting from "0". + +// type event_type = 'enter' | 'return' | 'case' | 'let' +// Events are generated by the *.log.js files, themselves produced by the generator. + +// type ctx = {tag: "ctx_nil"} | {tag: "ctx_cons", next: ctx, bindings: bindings}; +// type bindings = [{key: string, val: any}] +// A context is a linked list of arrays, with the top of stack located at the +// head of the list, and where each array stores a set of bindings, with the +// more recent binding at the tail of the array. + +// type event_item = { type: event_type, loc: loc, ctx: ctx, +// state: JsSyntax.state, +// execution_ctx: JsSyntax.execution_ctx, +// source_loc: loc } +// Event items are created on every call to the "log_event" function. +// Such calls are located in the *.log.js files. +// Field "ctx" describes the state of the variables from the interpreter, +// and this description is constructed by the instrumented code in "*.log.js". +// Fields "state" and "execution_ctx" and "source_loc" fields are filled in +// by the function "assignExtraInfosInTrace". + +// type trace = [event_item] +// In this file, "datalog" and "tracer_items" have type trace. + + + + +// --------------- Representation for predicate evaluation ---------------- + +function env_to_jsobject(env) { + // TODO implement + throw "unimplemented env_to_jsobject"; +}; + +function ctx_to_jsobject(env) { + // TODO implement + throw "unimplemented ctx_to_jsobject"; +}; + + +// --------------- Handlers ---------------- + +// callback functions to open and close objects displayed in the environment +// view +var handlers = []; + +// --------------- Variables ---------------- + +// file currently displayed +var curfile = ''; + +// object of type loc describing the text currenctly selected +var source_loc_selected = undefined; + +// current trace being displayed + // TODO: do we need tracer_iterms in addition to datalog? +var tracer_items = []; +var tracer_length = 0; +var tracer_pos = 0; + +// Core Mirror objects +var source = null; +var interpreter = null; + +var source_docs = {}; +var initialSourceName = ""; + +// Initial source code + +var source_files = [ + // '', + 'var x = 1;\nx++;\nx', + 'var x = { a : { c : 1 } };\nx.a.b = 2;\nx.a.x = x;\nx', + 'var t = [];\nfor (var i = 0; i < 3; i++) {\n t[i] = function() { return i; } \n};\nt[0](); ', + 'var t = [];\nfor (var i = 0; i < 3; i++) {\n t[i] = (function(j) {\n return function() { return j; }; \n })(i); \n};\nt[0](); ', + '2+3', + 'var x = 2+"foo"', + '(+{}+[])[+!![]]', + 'var f = function() {return "f"}; eval("var g = function() {return \\"g\\"}; eval(\\"var h = function() {return \\\\\\"h\\\\\\"}; f(); g(); h()\\"); h();"); g(); h(); f();', + '(function (x) {return arguments;})(3)', + 'var s = "val(\\"++x\\")";\neval("x=0; e" + s)', + 'var x = 2;\nx', + '"use strict";\nvar x = 1;\ nx++;\nx', + '{} + {}', + 'x = [1]', + 'throw 3', + 'var x = { a : 1, b : 2 }; ', + 'var x = { a : 1 };\n x.b = 2;\nx', + 'var x = { a : { c: 1 } };\n x.a.b = 2;\nx', + '(function (x) {return 1;})()', + '(function (x) {\nreturn 1;\n})({a:{b:2}})', + 'eval("var x = { a : 1 };\\nx.b = 2;\\nx");', + 'var t = {};\nfor (var i = 0; i < 3; i++) {\n t[i] = eval("i + " + i); \n};\nt; ', + 'function f() {\n var x = 2;\n function g() { var x = 3; return x; };\n return g(); \n};\nf()', + '(2 < 3) && ((3 > 5) || (true || x.f))', + '2+2', + 'f()', + '2 === 2', +]; + +source_files.reduce((select, file_content) => { + var option = document.createElement('option'); + option.textContent = file_content; + option.value = file_content; + select.append(option); + return select; +}, $('#select_source_code')); + +function initSourceDocs() { + source_docs = {}; + Translate_syntax.eval_counter = 0; + $('#source_tabs').empty(); +} + +// Registers a new source doc +function newSourceDoc(name, text, readOnly) { + if (!source_docs.hasOwnProperty(name)) { + source_docs[name] = CodeMirror.Doc(text, 'js'); + var tab = $('<span>').addClass('file_item') + .text(name) + .click(e => selectSourceDoc(e.target.textContent)) + .appendTo('#source_tabs'); + if (name === '_eval_') { tab.hide(); } + source_docs[name].doc_name = name; + source_docs[name].tab = tab; + source_docs[name].readOnly = Boolean(readOnly); + } + return source_docs[name]; +} + +function selectSourceDocFromLoc(loc) { + var name = loc.file; + if (name === '_eval_') { + source_docs['_eval_'].tab.show(); + source_docs['_eval_'].setValue(loc.sourceText); + } + var old_doc = selectSourceDoc(loc.file); + if (old_doc.doc_name === "_eval_" && name !== "_eval_") { + source_docs['_eval_'].tab.hide(); + } +} + +// Switches current source doc +function selectSourceDoc(name) { + var old_doc = source.swapDoc(source_docs[name]); + if (old_doc.tab) old_doc.tab.removeClass('file_item_current'); + source_docs[name].tab.addClass('file_item_current'); + source.setOption('readOnly', source_docs[name].readOnly); + return old_doc; +} + +// Sets the initial source doc +function setInitialSourceCode(name, text) { + initSourceDocs(); + var doc = newSourceDoc(name, text); + initialSourceName = name; + + $("#source_code").val(text); + + selectSourceDoc(name); +} + +$('#select_source_code').change(e => { + setInitialSourceCode("example" + (e.target.selectedOptions[0].index - 1) + ".js", e.target.value); + buttonRunHandler(); +}); +$('#select_file').change(e => { + var f = e.target.files[0]; + var fr = new FileReader(); + fr.onload = function (e) { + setInitialSourceCode(f.name, e.target.result); + buttonRunHandler(); + }; + fr.readAsText(f); +}); + +function setExample(idx) { + $('#select_source_code option')[idx+1].selected = true; + $('#select_source_code').change(); +} + + +// --------------- Predicate search ---------------- + +function jsvalue_of_prim(v) { + switch (v.tag) { + case "Coq_prim_undef": + return undefined; + case "Coq_prim_null": + return null; + case "Coq_prim_bool": + return (v.value) ? true : false; + case "Coq_prim_number": + return v.value; + case "Coq_prim_string": + return v.value; + default: + throw "unrecognized tag in jsvalue_of_prim"; + } +} + +function jsvalue_of_value(v) { + switch (v.tag) { + case "Coq_value_prim": + return jsvalue_of_prim(v.value); + case "Coq_value_object": + return v.value; // TODO: reflect + default: + throw "unrecognized tag in jsvalue_of_value"; + } +} + +function lookup_var_in_record_decl(name, env_record_decl) { + var ro = HeapStr.read_option(env_record_decl, name); + switch (ro.tag) { + case "None": + return undefined; + case "Some": + var r = ro.value; + var mutability = r[0]; + var value = r[1]; + return value; + default: + throw "unrecognized tag in lookup_var_in_record_decl"; + } +} + /* DEPRECATED, naive code for lookup_var_in_record_decl: + var items_array = array_of_heap(env_record_decl); + for (var i = 0; i < items_array.length; i++) { + var var_name = items_array[i][0]; + // var mutability = items_array[i][1][0]; + var value = items_array[i][1][1]; + if (var_name === name) { + return value; + } + } + return undefined; + */ + +function lookup_var_in_object(state, name, loc) { + var obj_opt = JsCommonAux.object_binds_pickable_option(state, loc); + if (obj_opt.tag != "Some") throw "show_object: unbound object"; + var obj = obj_opt.value; + var props = obj.object_properties_; + var ro = HeapStr.read_option(props, name); + switch (ro.tag) { + case "None": + return undefined; + case "Some": + var attribute = ro.value; + switch (attribute.tag) { + case "Coq_attributes_data_of": + var attr = attribute.value; + var prop_value = attr.attributes_data_value; + return prop_value; + break; + case "Coq_attributes_accessor_of": + // raise error (?) + break; + default: + throw "invalid attribute.tag"; + } + break; + default: + throw "unrecognized tag in lookup_var_in_record_decl"; + } +} + /* DEPRECATED, naive code for lookup_var_in_object: + var key_value_pair_array = array_of_heap(props); + for (var i = 0; i < key_value_pair_array.length; i++) { + var prop_name = key_value_pair_array[i][0]; + if (prop_name !== name) { + continue; + } + var attribute = key_value_pair_array[i][1]; + */ + + + +// todo : handle objects +function lookup_var_in_lexical_env(state, name, lexical_env) { + // var env_record_heap = state.state_env_record_heap; + /* DEPRECATED: naive processing of the loop + var env_loc_array = encoded_list_to_array(lexical_env); + for (var i = 0; i < env_loc_array.length; i++) { + var env_loc = env_loc_array[i]; + */ + var list = lexical_env; + while (list.tag == "::") { + var env_loc = list.head; + list = list.tail; + var env_record_opt = JsCommonAux.env_record_binds_pickable_option(state, env_loc); + if (env_record_opt.tag != "Some") throw "show_object: unbound object"; + var env_record = env_record_opt.value; + + switch (env_record.tag) { + case "Coq_env_record_decl": + var env_record_decl = env_record.value; + var r = lookup_var_in_record_decl(name, env_record_decl); + if (r !== undefined) { + return r; + } + break; + case "Coq_env_record_object": + var object_loc = env_record.value; + var r = lookup_var_in_object(state, name, object_loc); + if (r !== undefined) { + return r; + } + /* + var obj_value = { tag: "Coq_value_object", value: object_loc }; + var provide_this = env_record.provide_this; + */ + break; + default: + throw "invalid env_record.tag"; + } + } + return undefined; +} + +function evalPred(item, pred) { + var I = function(name) { + var a = ctx_to_array(item.ctx); + for (var i = 0; i < a.length; i++) { + var key = a[i].key; + if (key !== name) { + continue; + } + var val = a[i].val; + return val; + } + return undefined; + } + /*var interp_val = function(name) { + return interp_raw(name); + }*/ + var I_line = function () { + var locByExt = item.locByExt; + if (locByExt === undefined) { + return -1; + } + var ext = get_file_extension(curfile); + var loc = locByExt[ext]; + if (loc === undefined) { + return -1; + } + return loc.start.line; + }; + var S_line = function () { + var loc = item.source_loc; + if (loc === undefined) { + return -1; + } + return loc.start.line; + }; + var S_core = function(name) { + var execution_ctx = item.execution_ctx; + var state = item.state; + if (execution_ctx === undefined || state === undefined) { + return undefined; + } + return lookup_var_in_lexical_env(state, name, execution_ctx.execution_ctx_lexical_env); + }; + var S_raw = function(name) { + var v = S_core(name); + return JSON.stringify(v); + }; + var S = function(name) { + var v = S_core(name); + if (v === undefined) { + return undefined; + } + return jsvalue_of_value(v); + }; + return eval(pred); +} + +function itemSatisfiesPred(item, pred) { + var ok = evalPred(item, pred); + return (ok === true) ? true : false; + // forces to return a boolean even if "pred" does not +} + +function goToPred(pred) { + for (var k = 1; k < tracer_length+1; k++) { + var i = (tracer_pos + k) % tracer_length; + if (itemSatisfiesPred(tracer_items[i], pred)) { + stepTo(i); + return; + } + } + $("#action_output").html("Could not find an event matching the reach condition."); + var timeoutID = window.setTimeout(function() { $("#action_output").html(""); }, 1000); +} + + +// --------------- Trace navigation buttons ---------------- + +function button_test_handler() { + var pred = $("#reach_condition").val(); + var r = evalPred(tracer_items[tracer_pos], pred); + console.log(r); + // $("#disp_infos").html(r); + /*if (r === undefined) { + r = "undefined"; + }*/ + $("#action_output").html("" + r); + var timeoutID = window.setTimeout(function() { $("#action_output").html(""); }, 3000); +} + +function button_reach_handler() { + var pred = $("#reach_condition").val(); + var res = goToPred(pred); + if (res !== true){ + $("#action_output").html(res); + var timeoutID = + window.setTimeout(function() { + $("#action_output").html(""); }, 3000); + } +}; + +$('#text_condition').keypress(function(e){ + var keycode = (e.keyCode ? e.keyCode : e.which); + if (keycode == '13') { + button_reach_handler(); + } +}); + +$("#button_reach_condition").click(button_reach_handler); +$("#button_test_condition").click(button_test_handler); + + +$("#navigation_step").change(function(e) { + var n = + $("#navigation_step").val(); + n = Math.max(0, Math.min(tracer_length - 1, n)); + stepTo(n); +}); + +function buttonRunHandler() { + initSourceDocs(); + var message = readSourceParseAndRun(); + $("#action_output").html(message); + var timeoutID = window.setTimeout(function() { $("#action_output").html(""); }, 1000); +}; + +$("#button_run").click(buttonRunHandler); + +$("#button_goto_begin").click(function() { goto_begin(); }); +$("#button_goto_end").click(function() { goto_end(); }); + // stepTo(0); +$("#button_backward").click(function() { backward(); }); + // stepTo(Math.max(0, tracer_pos-1)); +$("#button_forward").click(function() { forward() }); + // stepTo(Math.min(tracer_length-1, tracer_pos+1)); + +$("#button_srcprevious").click(function() { src_previous() }); +$("#button_srcnext").click(function() { src_next() }); + +$("#button_previous").click(function() { previous() }); +$("#button_next").click(function() { next() }); +$("#button_finish").click(function() { finish() }); + +$("#button_cursor").click(function() { cursor() }); +$("#button_selection").click(function() { selection() }); + + + +// --------------- Trace navigation methods ---------------- + + +// Assumes tracer_files to be an array of objects with two field: +// - file, containing the name of the file, +// - contents, a string containing its source code + +function tracer_valid_pos(i) { + return (i >= 0 && i < tracer_length); +} + +function stepTo(i) { + if (! tracer_valid_pos(i)) + return; + tracer_pos = i; + updateSelection(); +} + + +// dir is -1 or +1 +function shared_step(dir) { + var i = tracer_pos; + i += dir; + if (! tracer_valid_pos(i)) + return; // not found, we don’t update the tracer position. + stepTo(i); +} + +// dir is -1 or +1, +// target (= target depth) is 0 for (next/prev) or -1 (finish) +function shared_next(dir, target) { + var i = tracer_pos; + var depth = 0; + var ty = tracer_items[i].type; + // TODO check if this works + if (dir === +1 && ty === 'return') { + depth = 1; + } else if (dir === -1 && ty === 'enter') { + depth = -1; + } + while (true) { + if (! tracer_valid_pos(i)) { + stepTo(i - dir); // just before out of range + return; // not found + } + if (i !== tracer_pos && depth === target) { + stepTo(i); + return; + } + var ty = tracer_items[i].type; + if (ty === 'enter') { + depth++; + } else if (ty === 'return') { + depth--; + } + i += dir; + } +} + +function src_shared_next(dir) { + var cur_item = tracer_items[tracer_pos]; + var cur_loc = cur_item.source_loc; + var i = tracer_pos += dir; + // for (var k = 1; k < tracer_length; k++) { + // var i = (tracer_pos + tracer_length + dir * k) % tracer_length; + while (i >= 0 && i < tracer_length) { + var next_item = tracer_items[i]; + var next_loc = next_item.source_loc; + if (next_loc !== cur_loc) { + stepTo(i); + return; + } + i += dir; + } + // $("#action_output").html("Distinct loc event not found"); + // var timeoutID = window.setTimeout(function() { $("#action_output").html(""); }, 1000); +} + + +function goto_begin() { stepTo(0); } +function goto_end() { stepTo(tracer_length - 1); } +function forward() { shared_step(+1); } +function backward() { shared_step(-1); } + +function previous() { shared_next(-1, 0); } +function next() { shared_next(+1, 0); } +function finish() { shared_next(+1, -1); } + +function src_previous() { src_shared_next(-1); } +function src_next() { src_shared_next(+1); } + + +/* +function selection() { + // jump to the last event that contains the source location + var pos = source.getSelection(); + console.log(source); + var line = pos.line + 1; // adding 1 because Codemirror counts from 0 + var column = pos.ch; + // for (var i = 0; i < tracer_length; i++) { + for (var i = tracer_length-1; i >= 0; i--) { + var loc = tracer_items[i].source_loc; + if (loc === undefined) continue; + if (loc.start.line <= line && + loc.start.column <= column && + loc.end.line >= line && + loc.end.column >= column) { + stepTo(i); + return; + } + } + $("#action_output").html("Event covering cursor not found"); + var timeoutID = window.setTimeout(function() { $("#action_output").html(""); }, 1000); +}; +*/ + +function cursor() { + // jump to the last event that contains the source location + var pos = source.getCursor(); + var line = pos.line + 1; // adding 1 because Codemirror counts from 0 + var column = pos.ch; + // for (var i = 0; i < tracer_length; i++) { + for (var i = tracer_length-1; i >= 0; i--) { + var loc = tracer_items[i].source_loc; + if (loc === undefined) continue; + if (loc.start.line <= line && + loc.start.column <= column && + loc.end.line >= line && + loc.end.column >= column) { + stepTo(i); + return; + } + } + $("#action_output").html("Event covering cursor not found"); + var timeoutID = window.setTimeout(function() { $("#action_output").html(""); }, 1000); +}; + + + +// --------------- File Display ---------------- + +function get_file_extension(filename) { + var re = /(?:\.([^.]+))?$/; + var s = re.exec(filename)[1]; + // if (s == "pseudo") { return "js"; } + return s; +} + +// load files in CodeMirror view +var docs = {}; +for (var i = 0; i < tracer_files.length; i++) { + var file = tracer_files[i].file; + var ext = get_file_extension(file); + var txt = tracer_files[i].contents; + docs[file] = CodeMirror.Doc(txt, ext); +} + +function viewFile(file) { + if (curfile !== file) { + curfile = file; + if (docs[curfile] == undefined) { + console.log("Cannot view file " + curfile); + return; + } + interpreter.swapDoc(docs[curfile]); + interpreter.focus(); + updateFileList(); + updateSelection(); + } +} + +function updateFileList() { + var s = ''; + for (var i = 0; i < tracer_files.length; i++) { + var file = tracer_files[i].file; + s += "<span class=\"file_item" + ((curfile == file) ? '_current' : '') + "\" onclick=\"viewFile('" + file + "')\">" + file + "</span> "; + } + $('#file_list').html(s); +} + + + +// --------------- Tools for Views ---------------- + +// fresh name generated used for handlers of interactively-explorable values +var next_fresh_id = 0; +function fresh_id() { + return "fresh_id_" + (next_fresh_id++); +} + +function encoded_list_to_array(list) { + var r = []; + while (list.tag == "::") { + r.push(list.head); + list = list.tail; + } + return r; +} + + /* for reversed lists + var i = LibList.length(list) - 1; + while (i >= 0) { + if (list.tag != "::") throw "encoded_list_to_array: bug"; + r[i] = list.head; + list = list.tail; + i--; + } + */ + +function html_escape(stringToEncode) { + var entityMap = { + "&": "&", + "<": "<", + ">": ">", +/* '"': '"', + "'": ''', + "/": '/' */ }; + return String(stringToEncode).replace(/[&<>]/g, function (s) { + return entityMap[s]; }); // "'\/ +} + +function string_of_any(v) { + return "<pre style='margin:0; padding: 0; margin-left:1em'>" + JSON.stringify(v, null, 2) + "</pre>"; +} + +// --------------- Views for JS state/context ---------------- + +/* +function array_of_heap(compare, heap) { + var items_list = Heap.to_list(compare, heap); + return encoded_list_to_array(items_list); +} +*/ + + +function string_of_prealloc(prealloc) { + return (prealloc.tag).slice("Coq_prealloc_".length); + //TODO: + // Coq_prealloc_mathop [@f mathop] of mathop + // Coq_prealloc_native_error [@f error] of native_error + // Coq_prealloc_native_error_proto [@f error] of native_error +} + +function string_of_loc(loc) { + switch (loc.tag) { + case "Coq_object_loc_normal": + return loc.address; + case "Coq_object_loc_prealloc": + return string_of_prealloc(loc.prealloc); + default: + throw "unrecognized tag in string_of_loc"; + } +} + +function string_of_prim(v) { + switch (v.tag) { + case "Coq_prim_undef": + return "undefined"; + case "Coq_prim_null": + return "null"; + case "Coq_prim_bool": + return (v.value) ? "true" : "false"; + case "Coq_prim_number": + return "" + v.value; + case "Coq_prim_string": + return "\"" + html_escape(v.value) + "\""; + default: + throw "unrecognized tag in string_of_prim"; + } +} + +function string_of_option(string_of_elem, opt_elem) { + switch (opt_elem.tag) { + case "None": + return "None"; + case "Some": + return "Some (" + string_of_elem(opt_elem.value) + ")"; + default: + throw "unrecognized tag in string_of_option"; + } +} + +function string_of_mutability(mutability) { + return (mutability.tag).slice("Coq_mutability_".length); +} + + + /* + type coq_object = { object_proto_ : value; + object_class_ : class_name; + object_extensible_ : bool; + object_prim_value_ : value option; + object_properties_ : object_properties_type; + object_get_ : builtin_get; + object_get_own_prop_ : builtin_get_own_prop; + object_get_prop_ : builtin_get_prop; + object_put_ : builtin_put; + object_can_put_ : builtin_can_put; + object_has_prop_ : builtin_has_prop; + object_delete_ : builtin_delete; + object_default_value_ : builtin_default_value; + object_define_own_prop_ : builtin_define_own_prop; + object_construct_ : construct option; + object_call_ : call option; + object_has_instance_ : builtin_has_instance option; + object_scope_ : lexical_env option; + object_formal_parameters_ : string list option; + object_code_ : funcbody option; + object_target_function_ : object_loc option; + object_bound_this_ : value option; + object_bound_args_ : value list option; + object_parameter_map_ : object_loc option } + */ + // TODO for object_prim_value_, use string_of_option(show_elem, opt_elem) +/* + type attributes = + | Coq_attributes_data_of [@f value] of attributes_data + | Coq_attributes_accessor_of [@f value] of attributes_accessor + + + type attributes_data = { attributes_data_value : value; + attributes_data_writable : bool; + attributes_data_enumerable : bool; + attributes_data_configurable : bool } + + type attributes_accessor = { attributes_accessor_get : value; + attributes_accessor_set : value; + attributes_accessor_enumerable : bool; + attributes_accessor_configurable : bool } +*/ + +function show_object(state, loc, target, depth) { + var t = $("#" + target); + if (depth < 0) { + t.append("<hidden>"); + return; + } + var obj_opt = JsCommonAux.object_binds_pickable_option(state, loc); + if (obj_opt.tag != "Some") throw "show_object: unbound object"; + var obj = obj_opt.value; + var props = obj.object_properties_; + var key_value_pair_array = encoded_list_to_array(HeapStr.to_list(props)); + // + var is_global = (string_of_loc(loc) == "global"); + + key_value_pair_array.push(["[[Prototype]]", obj.object_proto_]); + + for (var j = 0; j < key_value_pair_array.length; j++) { + var i = key_value_pair_array.length-j-1; + var prop_name = key_value_pair_array[i][0]; + var attribute = key_value_pair_array[i][1]; + + var targetsub = fresh_id(); + t.append("<div style='margin-left:1em' id='" + targetsub + "'></div>"); + $("#" + targetsub).html("– " + html_escape(prop_name) + ": "); + + switch (attribute.tag) { + case "Coq_attributes_data_of": + var attr = attribute.value; + var prop_value = attr.attributes_data_value; + show_value(state, prop_value, targetsub, depth-1); + + break; + case "Coq_attributes_accessor_of": + var attr = attribute.value; + $("#" + targetsub).append(" <accessor> "); + // TODO: complete + + break; + case "Coq_value_prim": + case "Coq_value_object": + show_value(state, attribute, targetsub, depth-1); + break; + + default: + console.log(attribute); + throw "invalid attribute.tag"; + } + } + + // special display for empty objects + if (key_value_pair_array.length === 0) { + t.append("(empty object)"); + } + + // custom fields + var props = obj.object_code_; + if (obj.object_code_.tag == "Some") { + var targetfunc = fresh_id(); + t.append("<div style='margin-left:1em' id='" + targetfunc + "'>– <Function></div>"); + if (obj.object_scope_.tag == "Some") { + var func_lexical_env = obj.object_scope_.value; + var targetscope = fresh_id(); + $("#" + targetfunc).append("<div style='margin-left:1em'>– scope:<div style='margin-left:1em' id='" + targetscope + "'></div></div>"); + show_lexical_env(state, func_lexical_env, targetscope); + } + } +} + +function show_value(state, v, target, depth) { + var t = $("#" + target); + switch (v.tag) { + case "Coq_value_prim": + var s = string_of_prim(v.value); + t.append(s); + return; + case "Coq_value_object": + var loc = v.value; + var obj_target = fresh_id(); + t.append("<span class='heap_link'><a onclick=\"handlers['" + obj_target + "']()\" ><Object>(" + string_of_loc(loc) + ")</a><span id='" + obj_target + "'></span></span>"); + function handler_close() { + handlers[obj_target] = handler_open; + $("#" + obj_target).html(""); + interpreter.focus(); + } + function handler_open() { + handlers[obj_target] = handler_close; + show_object(state, loc, obj_target, 1); + interpreter.focus(); + }; + // initial opening of the object + if (depth > 0) { + handlers[obj_target] = handler_close; + show_object(state, loc, obj_target, depth); + } else { + handler_close(); + } + return; + default: + throw "unrecognized tag in show_value"; + } +} + +function show_decl_env_record(state, env_record_decl, target) { + // env_record_decl : (string, mutability * value) Heap.heap + var t = $("#" + target); + var items_array = encoded_list_to_array(HeapStr.to_list(env_record_decl)); + for (var i = 0; i < items_array.length; i++) { + var var_name = items_array[i][0]; + var mutability = items_array[i][1][0]; + var value = items_array[i][1][1]; + var value_target = fresh_id(); + t.append("<div id='" + value_target + "'> → " + html_escape(var_name) + ":</div>"); + // + " (" + string_of_mutability(mutability) + ")" + + show_value(state, value, value_target, 0); + } +} + +function show_lexical_env(state, lexical_env, target) { + var t = $("#" + target); + // var env_record_heap = state.state_env_record_heap; + var env_loc_array = encoded_list_to_array(lexical_env); + for (var i = 0; i < env_loc_array.length; i++) { + var env_loc = env_loc_array[i]; + var env_record_opt = JsCommonAux.env_record_binds_pickable_option(state, env_loc); + if (env_record_opt.tag != "Some") throw "show_object: unbound object"; + var env_record = env_record_opt.value; + + switch (env_record.tag) { + case "Coq_env_record_decl": + var env_record_decl = env_record.value; + var items_target = fresh_id(); + t.append("<div><b>• environment-record-declaration</b>: <div style='margin-left: 1em' id='" + items_target + "'></div></div>"); + show_decl_env_record(state, env_record_decl, items_target) + break; + case "Coq_env_record_object": + var object_loc = env_record.value; + var obj_value = { tag: "Coq_value_object", value: object_loc }; + var provide_this = env_record.provide_this; + var obj_target = fresh_id(); + t.append("<div id='" + obj_target + "'><b>• environment-record-object</b>:</div>"); + // (" + ((provide_this) ? "" : "not ") + "providing 'this'): + show_value(state, obj_value, obj_target, 0); + // show_object(state, object_loc, obj_target, 1); + break; + default: + throw "invalid env_record.tag"; + } + } +} + + +function show_execution_ctx(state, execution_ctx, target) { + var t = $("#" + target); + + // strictness + t.append("<div><b>strictness</b>: " + execution_ctx.execution_ctx_strict + " </div>"); + + // this object + var this_target = fresh_id(); + t.append("<div id='" + this_target + "'><b>this:</b> </div>"); + //TODO + show_value(state, execution_ctx.execution_ctx_this_binding, this_target, 0); + + // lexical env + var lexical_env_target = fresh_id(); + t.append("<div><b>lexical-env:</b> <div style='margin-left: 1em' id='" + lexical_env_target + "'></div></div>"); + show_lexical_env(state, execution_ctx.execution_ctx_lexical_env, lexical_env_target); + + // variable env -- TODO, like above + var variable_env_target = fresh_id(); + t.append("<div><b>variable-env:</b> <div style='margin-left: 1em' id='" + variable_env_target + "'></div></div>"); + show_lexical_env(state, execution_ctx.execution_ctx_variable_env, variable_env_target); +} + + + + +// --------------- Views for interpreter context ---------------- + +/* +function updateContext(targetid, state, env) { + $(targetid).html(""); + if (env === undefined) + return; + if (state === undefined) + return; + array_of_env(env).map(function(env){ + var target = fresh_id(); + $(targetid).append("<div id='" + target + "'></div>"); + $("#" + target).html(env.name + ": "); + var depth = 1; + show_value(state, env.val, target, depth); + }); +} +*/ + +function has_tag_in_set(value, array_tags) { + return (value.tag !== undefined && + array_tags.indexOf(value.tag) != -1); +} + +function interp_val_is_base_value(val) { + var t = typeof(val); + return t == "string" || + t == "number" || + t == "boolean" || + t == "undefined" || + t == "null"; +} + +function interp_val_is_js_prim(v) { + return has_tag_in_set(v, [ "Coq_prim_undef", "Coq_prim_null", "Coq_prim_bool", "Coq_prim_number", "Coq_prim_string" ]); +} + +function interp_val_is_js_value(v) { + return has_tag_in_set(v, ["Coq_value_prim", "Coq_value_object" ]); +} + +function interp_val_is_loc(v) { + return has_tag_in_set(v, [ "Coq_object_loc_normal", "Coq_object_loc_prealloc" ]); +} + +function interp_val_is_list(v) { + return has_tag_in_set(v, [ "::", "[]" ]); +} + +function interp_val_is_syntax(v) { + return has_tag_in_set(v, [ "Coq_expr_this", "Coq_expr_identifier", "Coq_expr_literal", "Coq_expr_object", "Coq_expr_array", "Coq_expr_function", "Coq_expr_access", "Coq_expr_member", "Coq_expr_new", "Coq_expr_call", "Coq_expr_unary_op", "Coq_expr_binary_op", "Coq_expr_conditional", "Coq_expr_assign", "Coq_propbody_val", "Coq_propbody_get", "Coq_propbody_set", "Coq_funcbody_intro", "Coq_stat_expr", "Coq_stat_label", "Coq_stat_block", "Coq_stat_var_decl", "Coq_stat_if", "Coq_stat_do_while", "Coq_stat_while", "Coq_stat_with", "Coq_stat_throw", "Coq_stat_return", "Coq_stat_break", "Coq_stat_continue", "Coq_stat_try", "Coq_stat_for", "Coq_stat_for_var", "Coq_stat_for_in", "Coq_stat_for_in_var", "Coq_stat_debugger", "Coq_stat_switch", "Coq_switchbody_nodefault", "Coq_switchbody_withdefault", "Coq_switchclause_intro", "Coq_prog_intro", "Coq_element_stat", "Coq_element_func_decl" ]); +} + +function interp_val_is_state(v) { + // Assume "has a state_object_heap" field iff "is a state" + return v.state_object_heap !== undefined; +} + +function interp_val_is_execution_ctx(v) { + // Assume "has a execution_ctx_lexical_env" field iff "is a state" + return v.execution_ctx_lexical_env !== undefined; +} + + +function show_interp_val(state, v, target, depth) { + if (depth == 0) { + t.append("< ... >"); + } + var t = $("#" + target); + if (interp_val_is_base_value(v)) { + if (typeof(v) === "string") { + v = "\"" + v + "\""; + } + t.append(html_escape("" + v)); + } else if (interp_val_is_loc(v)) { + show_object(state, v, target, 0); + } else if (interp_val_is_js_value(v)) { + show_value(state, v, target, 0); + } else if (interp_val_is_js_prim(v)) { + t.append(string_of_prim(v)); + } else if (interp_val_is_state(v)) { + t.append("<state-object>"); + } else if (interp_val_is_execution_ctx(v)) { + t.append("<execution-ctx-object>"); + } else if (interp_val_is_syntax(v)) { + t.append("<syntax-object>"); // + JSON.stringify(v) + } else if (interp_val_is_list(v)) { + var items = encoded_list_to_array(v) + t.append("List:"); + for (var i = 0; i < items.length; i++) { + var vi = items[i]; + var targetsub = fresh_id(); + t.append("<div style='margin-left:1em' id='" + targetsub + "'></div>"); + $("#" + targetsub).html("• "); + show_interp_val(state, vi, targetsub, depth-1); + } + } else if (v.tag !== undefined) { // data constructor + var constr = html_escape(v.tag); // TODO: rename constructor prefix + var hasArgs = (function() { + for (var key in v) { + if (key !== "tag") { + return true; + } + } + return false; + })(); + t.append(constr + ((hasArgs) ? " with:" : "")); + for (var key in v) { + if (key !== "tag") { + var targetsub = fresh_id(); + t.append("<div style='margin-left:1em' id='" + targetsub + "'></div>"); + $("#" + targetsub).html(html_escape(key) + ": "); + show_interp_val(state, v[key], targetsub, depth-1); + } + } + } else { // record + var items_target = fresh_id(); + t.append("Struct with:"); + for (var key in v) { + var targetsub = fresh_id(); + t.append("<div style='margin-left:1em' id='" + targetsub + "'></div>"); + $("#" + targetsub).html(html_escape(key) + ": "); + show_interp_val(state, v[key], targetsub, depth-1); + } + } + // t.append(string_of_any(v)); +} + +function show_interp_ctx(state, ctx, target) { + var depth = 1000; + var t = $("#" + target); + var a = ctx_to_array(ctx); + // for (var i = 0; i < a.length; i++) { + for (var i = a.length-1; i >= 0; i--) { + var key = a[i].key; + var val = a[i].val; + var targetsub = fresh_id(); + t.append("<div style='margin-left:1em' id='" + targetsub + "'></div>"); + $("#" + targetsub).html("<b>" + html_escape(key) + "</b>: "); + show_interp_val(state, val, targetsub, depth); + } +} + + +// --------------- Debugging view ---------------- + +function htmlDiv(s) { + return "<div>" + s + "</div>"; +} + +function ctxToHtml(ctx) { + var s = ''; + var a = ctx_to_array(ctx); + for (var i = 0; i < a.length; i++) { + var key = a[i].key; + var val = a[i].val; + // Uncomment next line for debug: + // s += "<div style='white-space: nowrap;'><b>" + b.key + "</b>: " + JSON.stringify(b.val) + "</div>"; + if (key == "#RETURN_VALUE#" && + val.value !== undefined && + val.value.out !== undefined && + val.value.out.res !== undefined) { + var res = val.value.out.res; + // Coq_result_some [@f value] of 't + // Coq_specret_out [@f value] of out + // Coq_out_ter [@f state, res] of state * res + s += "<div style='white-space: nowrap;'><b>#RES#</b>: " + JSON.stringify(res) + "</div>"; + if (res.res_value !== undefined && + res.res_value.value !== undefined) { + var value = res.res_value.value; + s += "<div style='white-space: nowrap;'><b>#RESVALUE#: " + JSON.stringify(value) + "</b></div>"; + } + } + } + return s; +} + +function itemToHtml(item) { + var s = ''; + s += htmlDiv("token: " + item.token + JSON.stringify(item.locByExt)); + s += htmlDiv("type: " + item.type); + s += ctxToHtml(item.ctx); + s += htmlDiv("execution_ctx: " + item.type); + // For debug, use: + // s += JSON.stringify(item.execution_ctx); + + // s += htmlDiv("state: " + item.type); + // s += JSON.stringify(item.state); + return s; +} + +// --------------- Selection view ---------------- + +function updateSelectionInCodeMirror(codeMirrorObj, loc) { + if (loc === undefined) { + return; + } + // Substracting 1 because Esprima counts from 1, and Codemirror from 0 + var anchor = {line: loc.start.line-1 , ch: loc.start.column }; + var head = {line: loc.end.line-1, ch: loc.end.column }; + codeMirrorObj.setSelection(anchor, head); +} + +function updateSelectionInCodeMirrorAccordingToExt(codeMirrorObj, locByExt) { + if (locByExt === undefined) { + return; + } + var ext = get_file_extension(curfile); + var loc = locByExt[ext]; + if (loc === undefined) { + console.log("Error: missing loc for " + curfile + " in:"); + console.log(locByExt); + return; + } + updateSelectionInCodeMirror(codeMirrorObj, loc); +} + +function clearFeedback() { + $("#disp_infos").html(""); + $("#disp_env").html(""); + $("#disp_ctx").html(""); +} + +function updateSelection() { + clearFeedback(); + var item = tracer_items[tracer_pos]; + source.setSelection({line: 0, ch:0}, {line: 0, ch:0}); // TODO: introduce a fct reset + + if (item !== undefined) { + // console.log(item); + // $("#disp_infos").html(itemToHtml(item)); + if (item.source_loc === undefined) { + console.log("Error: missing line in log event"); + + } else { + + // source panel + source_loc_selected = item.source_loc; + + selectSourceDocFromLoc(source_loc_selected); + updateSelectionInCodeMirror(source, source_loc_selected); + // console.log(source_loc_selected); + + // source heap/env panel + if (item.state === undefined || item.execution_ctx === undefined) { + $("#disp_env").html("<undefined state or context>"); + } else { + show_execution_ctx(item.state, item.execution_ctx, "disp_env"); + } + + // interpreter ctx panel + show_interp_ctx(item.state, item.ctx, "disp_ctx"); + + // interpreter code panel + // TEMPORARILY DISABLED BECAUSE ONLY SINGLE FILE TO TRACE + // viewFile(item.loc.file); + + var color = '#F3F781'; + // possible to use different colors depending on event type + // var color = (item.type === 'enter') ? '#F3F781' : '#CCCCCC'; + $('.CodeMirror-selected').css({ background: color }); + $('.CodeMirror-focused .CodeMirror-selected').css({ background: color }); + updateSelectionInCodeMirrorAccordingToExt(interpreter, item.locByExt); + } + + // navig panel + $("#navigation_step").val(tracer_pos); + } + updateFileList(); + interpreter.focus(); +} + +// --------------- CodeMirror ---------------- + +source = CodeMirror.fromTextArea(document.getElementById('source_code'), { + mode: 'text/javascript', + lineNumbers: true, + lineWrapping: true +}); +source.setSize(500, 150); + +setInitialSourceCode("source.js", "source code here"); + +interpreter = CodeMirror.fromTextArea(document.getElementById('interpreter_code'), { + mode: 'text/javascript', + lineNumbers: true, + lineWrapping: true, + readOnly: true, + extraKeys: { + 'R': function(cm) { goto_begin(); }, + 'F': function(cm) { forward();}, + '6': function(cm) { forward();}, + 'B': function(cm) { backward(); }, + '4': function(cm) { backward(); }, + 'P': function(cm) { previous(); }, + '8': function(cm) { previous(); }, + 'N': function(cm) { next(); }, + '2': function(cm) { next(); }, + 'H': function(cm) { finish(); }, + '3': function(cm) { finish(); } + }, +}); +interpreter.setSize(800,250); + + +/* ==> try in new version of codemirror*/ +try { + $(interpreter.getWrapperElement()).resizable({ + resize: function() { + interpreter.setSize($(this).width(), $(this).height()); + } + }); +} catch(e) { } +// TODO: factorize code below with the above +try { + $(source.getWrapperElement()).resizable({ + resize: function() { + source.setSize($(this).width(), $(this).height()); + } + }); +} catch(e) { } +try { + $("disp_env_pane").resizable({ + resize: function() { + disp_env_pane.setSize($(this).width(), $(this).height()); + } + }); +} catch(e) { } + + + + + +interpreter.on('dblclick', function() { + var line = interpreter.getCursor().line; + var txt = interpreter.getLine(line); + var prefix = "#sec-"; + var pos_start = txt.indexOf(prefix); + if (pos_start === -1) + return; + var pos_end = txt.indexOf("*", pos_start); + if (pos_end === -1) + return; + var sec = txt.substring(pos_start, pos_end); + var url = "http://www.ecma-international.org/ecma-262/5.1/" + sec; + window.open(url, '_blank'); +}); + +interpreter.focus(); + +// --------------- Main run method ---------------- + +// Functions run_prog, run_expr and run_stat have a last argument +// called "_term_"; we try to find items in the trace that correspond +// to the binding of this argument in the context, so as to extract +// the corresponding location from the piece of AST that corresponds. +// These locations are used for source highlighting. +function assignExtraInfosInTrace() { + var last_loc = program.loc; + var last_state = undefined; + var last_execution_ctx = undefined; + // { start: { line: 1, column: 0}, end: { line: 1, column: 1 } }; + for (var k = 0; k < tracer_items.length; k++) { + var item = tracer_items[k]; + if (item.ctx !== undefined && item.ctx.bindings !== undefined) { + var bindings = item.ctx.bindings; + for (var i = 0; i < bindings.length; i++) { + var binding = bindings[i]; + if (binding.val === undefined) { + continue; // might happen on run with errors + } + if (binding.key === "_term_") { + var t = binding.val; + if (t.loc != undefined) { + last_loc = t.loc; + /*console.log("found source loc: " + + last_loc.start.line + "," + + last_loc.start.column + " --> " + + last_loc.end.line + "," + + last_loc.end.column);*/ + } + } else if (interp_val_is_state(binding.val)) { + // assuming: 'is an state object' iff 'has a state_object_heap field' + last_state = binding.val; + } else if (interp_val_is_execution_ctx(binding.val)) { + // assuming: 'is an execution_ctx' iff 'has a execution_ctx_lexical_env field' + last_execution_ctx = binding.val; + } + } + } + item.source_loc = last_loc; + item.state = last_state; + item.execution_ctx = last_execution_ctx; + } +} + + + +function runDebug() { + reset_datalog(); + JsInterpreter.run_javascript(program); +} + +function run() { + reset_datalog(); + var success = true; + try { + JsInterpreter.run_javascript(program); + } catch (e) { + success = false; + // alert("Error during the run"); + console.log(e); + console.log("execute runDebug() to get the trace."); + // throw e; + // LATER: return "Error during the run."; + } + + tracer_items = datalog; + tracer_length = tracer_items.length; + assignExtraInfosInTrace(); + $("#navigation_total").html(tracer_length - 1); + // stepTo(tracer_length-1); + stepTo(0); + return (success) ? "Run successful!" : "Error during the run!"; +} + +function parseSource(source, name, readOnly) { + var tree = esprimaToAST(esprima.parse(source, {loc: true, range: true}), source, name); + newSourceDoc(name, source, readOnly); + return tree; +} + +function readSourceParseAndRun() { + var message = ""; + var code = source.getValue(); + //console.log(code); + // TODO handle parsing error + // TODO handle out of scope errors + try { + program = parseSource(code, initialSourceName); + } catch (e) { + return "Parse error"; + } + + return run(); +} + + +// --------------- Initialization, continuted ---------------- + + +// interpreter file displayed initially +// -- viewFile(tracer_files[0].file); +viewFile("JsInterpreter.pseudo"); + +//$timeout(function() {codeMirror.refresh();}); + + + +// -------------- Testing ---------------- + +// usage: testParse("var x = 3"); +function testParse(s) { + var p = esprima.parse(s,{loc: true, range: true}); + console.log(p); + console.log(esprimaToAST(p, s)); +} + +// usage: testLineof("Datatypes.js", 9); +function testLineof(filename, token) { + console.log(lineof(filename, token)); +} + +// for easy debugging, launch at startup: +// +// ---readSourceParseAndRun(); + +// stepTo(2466); + +// button_reach_handler(); +// $("#reach_condition").val("S_raw('x')"); +// button_test_handler(); + +// $("#reach_condition").val("I_line()"); +// button_test_handler(); + +//$("#reach_condition").val("S('x') == 2"); + +//stepTo(5873); +// setExample(20); +setExample(0); +// setExample(11); +$("#reach_condition").val("S_line() == 3 && S('i') == 1"); + + +function showCurrent() { + console.log(tracer_items[tracer_pos]); +}; + + +function findToken(token) { + for (var i = 0; i < tracer_items.length; i++) { + if (tracer_items[i].token == token) { + return i; + } + } + return -1; +}; + +//S_line() == 4 && S("j") == 2 diff --git a/branch/4.04/node_modules/esprima/esprima.js b/branch/4.04/node_modules/esprima/esprima.js new file mode 100644 index 0000000000000000000000000000000000000000..595a06602e5727fa100d2f72ca5255353b4e1c77 --- /dev/null +++ b/branch/4.04/node_modules/esprima/esprima.js @@ -0,0 +1,3772 @@ +/* + Copyright (C) 2013 Ariya Hidayat <ariya.hidayat@gmail.com> + Copyright (C) 2013 Thaddee Tyl <thaddee.tyl@gmail.com> + Copyright (C) 2013 Mathias Bynens <mathias@qiwi.be> + Copyright (C) 2012 Ariya Hidayat <ariya.hidayat@gmail.com> + Copyright (C) 2012 Mathias Bynens <mathias@qiwi.be> + Copyright (C) 2012 Joost-Wim Boekesteijn <joost-wim@boekesteijn.nl> + Copyright (C) 2012 Kris Kowal <kris.kowal@cixar.com> + Copyright (C) 2012 Yusuke Suzuki <utatane.tea@gmail.com> + Copyright (C) 2012 Arpad Borsos <arpad.borsos@googlemail.com> + Copyright (C) 2011 Ariya Hidayat <ariya.hidayat@gmail.com> + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/*jslint bitwise:true plusplus:true */ +/*global esprima:true, define:true, exports:true, window: true, +throwErrorTolerant: true, +throwError: true, generateStatement: true, peek: true, +parseAssignmentExpression: true, parseBlock: true, parseExpression: true, +parseFunctionDeclaration: true, parseFunctionExpression: true, +parseFunctionSourceElements: true, parseVariableIdentifier: true, +parseLeftHandSideExpression: true, +parseUnaryExpression: true, +parseStatement: true, parseSourceElement: true */ + +(function (root, factory) { + 'use strict'; + + // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, + // Rhino, and plain browser loading. + + /* istanbul ignore next */ + if (typeof define === 'function' && define.amd) { + define(['exports'], factory); + } else if (typeof exports !== 'undefined') { + factory(exports); + } else { + factory((root.esprima = {})); + } +}(this, function (exports) { + 'use strict'; + + var Token, + TokenName, + FnExprTokens, + Syntax, + PropertyKind, + Messages, + Regex, + SyntaxTreeDelegate, + source, + strict, + index, + lineNumber, + lineStart, + length, + delegate, + lookahead, + state, + extra; + + Token = { + BooleanLiteral: 1, + EOF: 2, + Identifier: 3, + Keyword: 4, + NullLiteral: 5, + NumericLiteral: 6, + Punctuator: 7, + StringLiteral: 8, + RegularExpression: 9 + }; + + TokenName = {}; + TokenName[Token.BooleanLiteral] = 'Boolean'; + TokenName[Token.EOF] = '<end>'; + TokenName[Token.Identifier] = 'Identifier'; + TokenName[Token.Keyword] = 'Keyword'; + TokenName[Token.NullLiteral] = 'Null'; + TokenName[Token.NumericLiteral] = 'Numeric'; + TokenName[Token.Punctuator] = 'Punctuator'; + TokenName[Token.StringLiteral] = 'String'; + TokenName[Token.RegularExpression] = 'RegularExpression'; + + // A function following one of those tokens is an expression. + FnExprTokens = ['(', '{', '[', 'in', 'typeof', 'instanceof', 'new', + 'return', 'case', 'delete', 'throw', 'void', + // assignment operators + '=', '+=', '-=', '*=', '/=', '%=', '<<=', '>>=', '>>>=', + '&=', '|=', '^=', ',', + // binary/unary operators + '+', '-', '*', '/', '%', '++', '--', '<<', '>>', '>>>', '&', + '|', '^', '!', '~', '&&', '||', '?', ':', '===', '==', '>=', + '<=', '<', '>', '!=', '!==']; + + Syntax = { + AssignmentExpression: 'AssignmentExpression', + ArrayExpression: 'ArrayExpression', + BlockStatement: 'BlockStatement', + BinaryExpression: 'BinaryExpression', + BreakStatement: 'BreakStatement', + CallExpression: 'CallExpression', + CatchClause: 'CatchClause', + ConditionalExpression: 'ConditionalExpression', + ContinueStatement: 'ContinueStatement', + DoWhileStatement: 'DoWhileStatement', + DebuggerStatement: 'DebuggerStatement', + EmptyStatement: 'EmptyStatement', + ExpressionStatement: 'ExpressionStatement', + ForStatement: 'ForStatement', + ForInStatement: 'ForInStatement', + FunctionDeclaration: 'FunctionDeclaration', + FunctionExpression: 'FunctionExpression', + Identifier: 'Identifier', + IfStatement: 'IfStatement', + Literal: 'Literal', + LabeledStatement: 'LabeledStatement', + LogicalExpression: 'LogicalExpression', + MemberExpression: 'MemberExpression', + NewExpression: 'NewExpression', + ObjectExpression: 'ObjectExpression', + Program: 'Program', + Property: 'Property', + ReturnStatement: 'ReturnStatement', + SequenceExpression: 'SequenceExpression', + SwitchStatement: 'SwitchStatement', + SwitchCase: 'SwitchCase', + ThisExpression: 'ThisExpression', + ThrowStatement: 'ThrowStatement', + TryStatement: 'TryStatement', + UnaryExpression: 'UnaryExpression', + UpdateExpression: 'UpdateExpression', + VariableDeclaration: 'VariableDeclaration', + VariableDeclarator: 'VariableDeclarator', + WhileStatement: 'WhileStatement', + WithStatement: 'WithStatement' + }; + + PropertyKind = { + Data: 1, + Get: 2, + Set: 4 + }; + + // Error messages should be identical to V8. + Messages = { + UnexpectedToken: 'Unexpected token %0', + UnexpectedNumber: 'Unexpected number', + UnexpectedString: 'Unexpected string', + UnexpectedIdentifier: 'Unexpected identifier', + UnexpectedReserved: 'Unexpected reserved word', + UnexpectedEOS: 'Unexpected end of input', + NewlineAfterThrow: 'Illegal newline after throw', + InvalidRegExp: 'Invalid regular expression', + UnterminatedRegExp: 'Invalid regular expression: missing /', + InvalidLHSInAssignment: 'Invalid left-hand side in assignment', + InvalidLHSInForIn: 'Invalid left-hand side in for-in', + MultipleDefaultsInSwitch: 'More than one default clause in switch statement', + NoCatchOrFinally: 'Missing catch or finally after try', + UnknownLabel: 'Undefined label \'%0\'', + Redeclaration: '%0 \'%1\' has already been declared', + IllegalContinue: 'Illegal continue statement', + IllegalBreak: 'Illegal break statement', + IllegalReturn: 'Illegal return statement', + StrictModeWith: 'Strict mode code may not include a with statement', + StrictCatchVariable: 'Catch variable may not be eval or arguments in strict mode', + StrictVarName: 'Variable name may not be eval or arguments in strict mode', + StrictParamName: 'Parameter name eval or arguments is not allowed in strict mode', + StrictParamDupe: 'Strict mode function may not have duplicate parameter names', + StrictFunctionName: 'Function name may not be eval or arguments in strict mode', + StrictOctalLiteral: 'Octal literals are not allowed in strict mode.', + StrictDelete: 'Delete of an unqualified identifier in strict mode.', + StrictDuplicateProperty: 'Duplicate data property in object literal not allowed in strict mode', + AccessorDataProperty: 'Object literal may not have data and accessor property with the same name', + AccessorGetSet: 'Object literal may not have multiple get/set accessors with the same name', + StrictLHSAssignment: 'Assignment to eval or arguments is not allowed in strict mode', + StrictLHSPostfix: 'Postfix increment/decrement may not have eval or arguments operand in strict mode', + StrictLHSPrefix: 'Prefix increment/decrement may not have eval or arguments operand in strict mode', + StrictReservedWord: 'Use of future reserved word in strict mode' + }; + + // See also tools/generate-unicode-regex.py. + Regex = { + NonAsciiIdentifierStart: new RegExp('[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F0\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]'), + NonAsciiIdentifierPart: new RegExp('[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0\u08A2-\u08AC\u08E4-\u08FE\u0900-\u0963\u0966-\u096F\u0971-\u0977\u0979-\u097F\u0981-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C01-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C82\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D02\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F0\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191C\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1D00-\u1DE6\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA697\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7B\uAA80-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE26\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]') + }; + + // Ensure the condition is true, otherwise throw an error. + // This is only to have a better contract semantic, i.e. another safety net + // to catch a logic error. The condition shall be fulfilled in normal case. + // Do NOT use this to enforce a certain condition on any user input. + + function assert(condition, message) { + /* istanbul ignore if */ + if (!condition) { + throw new Error('ASSERT: ' + message); + } + } + + function isDecimalDigit(ch) { + return (ch >= 48 && ch <= 57); // 0..9 + } + + function isHexDigit(ch) { + return '0123456789abcdefABCDEF'.indexOf(ch) >= 0; + } + + function isOctalDigit(ch) { + return '01234567'.indexOf(ch) >= 0; + } + + + // 7.2 White Space + + function isWhiteSpace(ch) { + return (ch === 0x20) || (ch === 0x09) || (ch === 0x0B) || (ch === 0x0C) || (ch === 0xA0) || + (ch >= 0x1680 && [0x1680, 0x180E, 0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, 0x2006, 0x2007, 0x2008, 0x2009, 0x200A, 0x202F, 0x205F, 0x3000, 0xFEFF].indexOf(ch) >= 0); + } + + // 7.3 Line Terminators + + function isLineTerminator(ch) { + return (ch === 0x0A) || (ch === 0x0D) || (ch === 0x2028) || (ch === 0x2029); + } + + // 7.6 Identifier Names and Identifiers + + function isIdentifierStart(ch) { + return (ch === 0x24) || (ch === 0x5F) || // $ (dollar) and _ (underscore) + (ch >= 0x41 && ch <= 0x5A) || // A..Z + (ch >= 0x61 && ch <= 0x7A) || // a..z + (ch === 0x5C) || // \ (backslash) + ((ch >= 0x80) && Regex.NonAsciiIdentifierStart.test(String.fromCharCode(ch))); + } + + function isIdentifierPart(ch) { + return (ch === 0x24) || (ch === 0x5F) || // $ (dollar) and _ (underscore) + (ch >= 0x41 && ch <= 0x5A) || // A..Z + (ch >= 0x61 && ch <= 0x7A) || // a..z + (ch >= 0x30 && ch <= 0x39) || // 0..9 + (ch === 0x5C) || // \ (backslash) + ((ch >= 0x80) && Regex.NonAsciiIdentifierPart.test(String.fromCharCode(ch))); + } + + // 7.6.1.2 Future Reserved Words + + function isFutureReservedWord(id) { + switch (id) { + case 'class': + case 'enum': + case 'export': + case 'extends': + case 'import': + case 'super': + return true; + default: + return false; + } + } + + function isStrictModeReservedWord(id) { + switch (id) { + case 'implements': + case 'interface': + case 'package': + case 'private': + case 'protected': + case 'public': + case 'static': + case 'yield': + case 'let': + return true; + default: + return false; + } + } + + function isRestrictedWord(id) { + return id === 'eval' || id === 'arguments'; + } + + // 7.6.1.1 Keywords + + function isKeyword(id) { + if (strict && isStrictModeReservedWord(id)) { + return true; + } + + // 'const' is specialized as Keyword in V8. + // 'yield' and 'let' are for compatiblity with SpiderMonkey and ES.next. + // Some others are from future reserved words. + + switch (id.length) { + case 2: + return (id === 'if') || (id === 'in') || (id === 'do'); + case 3: + return (id === 'var') || (id === 'for') || (id === 'new') || + (id === 'try') || (id === 'let'); + case 4: + return (id === 'this') || (id === 'else') || (id === 'case') || + (id === 'void') || (id === 'with') || (id === 'enum'); + case 5: + return (id === 'while') || (id === 'break') || (id === 'catch') || + (id === 'throw') || (id === 'const') || (id === 'yield') || + (id === 'class') || (id === 'super'); + case 6: + return (id === 'return') || (id === 'typeof') || (id === 'delete') || + (id === 'switch') || (id === 'export') || (id === 'import'); + case 7: + return (id === 'default') || (id === 'finally') || (id === 'extends'); + case 8: + return (id === 'function') || (id === 'continue') || (id === 'debugger'); + case 10: + return (id === 'instanceof'); + default: + return false; + } + } + + // 7.4 Comments + + function addComment(type, value, start, end, loc) { + var comment, attacher; + + assert(typeof start === 'number', 'Comment must have valid position'); + + // Because the way the actual token is scanned, often the comments + // (if any) are skipped twice during the lexical analysis. + // Thus, we need to skip adding a comment if the comment array already + // handled it. + if (state.lastCommentStart >= start) { + return; + } + state.lastCommentStart = start; + + comment = { + type: type, + value: value + }; + if (extra.range) { + comment.range = [start, end]; + } + if (extra.loc) { + comment.loc = loc; + } + extra.comments.push(comment); + if (extra.attachComment) { + extra.leadingComments.push(comment); + extra.trailingComments.push(comment); + } + } + + function skipSingleLineComment(offset) { + var start, loc, ch, comment; + + start = index - offset; + loc = { + start: { + line: lineNumber, + column: index - lineStart - offset + } + }; + + while (index < length) { + ch = source.charCodeAt(index); + ++index; + if (isLineTerminator(ch)) { + if (extra.comments) { + comment = source.slice(start + offset, index - 1); + loc.end = { + line: lineNumber, + column: index - lineStart - 1 + }; + addComment('Line', comment, start, index - 1, loc); + } + if (ch === 13 && source.charCodeAt(index) === 10) { + ++index; + } + ++lineNumber; + lineStart = index; + return; + } + } + + if (extra.comments) { + comment = source.slice(start + offset, index); + loc.end = { + line: lineNumber, + column: index - lineStart + }; + addComment('Line', comment, start, index, loc); + } + } + + function skipMultiLineComment() { + var start, loc, ch, comment; + + if (extra.comments) { + start = index - 2; + loc = { + start: { + line: lineNumber, + column: index - lineStart - 2 + } + }; + } + + while (index < length) { + ch = source.charCodeAt(index); + if (isLineTerminator(ch)) { + if (ch === 0x0D && source.charCodeAt(index + 1) === 0x0A) { + ++index; + } + ++lineNumber; + ++index; + lineStart = index; + if (index >= length) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + } else if (ch === 0x2A) { + // Block comment ends with '*/'. + if (source.charCodeAt(index + 1) === 0x2F) { + ++index; + ++index; + if (extra.comments) { + comment = source.slice(start + 2, index - 2); + loc.end = { + line: lineNumber, + column: index - lineStart + }; + addComment('Block', comment, start, index, loc); + } + return; + } + ++index; + } else { + ++index; + } + } + + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + + function skipComment() { + var ch, start; + + start = (index === 0); + while (index < length) { + ch = source.charCodeAt(index); + + if (isWhiteSpace(ch)) { + ++index; + } else if (isLineTerminator(ch)) { + ++index; + if (ch === 0x0D && source.charCodeAt(index) === 0x0A) { + ++index; + } + ++lineNumber; + lineStart = index; + start = true; + } else if (ch === 0x2F) { // U+002F is '/' + ch = source.charCodeAt(index + 1); + if (ch === 0x2F) { + ++index; + ++index; + skipSingleLineComment(2); + start = true; + } else if (ch === 0x2A) { // U+002A is '*' + ++index; + ++index; + skipMultiLineComment(); + } else { + break; + } + } else if (start && ch === 0x2D) { // U+002D is '-' + // U+003E is '>' + if ((source.charCodeAt(index + 1) === 0x2D) && (source.charCodeAt(index + 2) === 0x3E)) { + // '-->' is a single-line comment + index += 3; + skipSingleLineComment(3); + } else { + break; + } + } else if (ch === 0x3C) { // U+003C is '<' + if (source.slice(index + 1, index + 4) === '!--') { + ++index; // `<` + ++index; // `!` + ++index; // `-` + ++index; // `-` + skipSingleLineComment(4); + } else { + break; + } + } else { + break; + } + } + } + + function scanHexEscape(prefix) { + var i, len, ch, code = 0; + + len = (prefix === 'u') ? 4 : 2; + for (i = 0; i < len; ++i) { + if (index < length && isHexDigit(source[index])) { + ch = source[index++]; + code = code * 16 + '0123456789abcdef'.indexOf(ch.toLowerCase()); + } else { + return ''; + } + } + return String.fromCharCode(code); + } + + function getEscapedIdentifier() { + var ch, id; + + ch = source.charCodeAt(index++); + id = String.fromCharCode(ch); + + // '\u' (U+005C, U+0075) denotes an escaped character. + if (ch === 0x5C) { + if (source.charCodeAt(index) !== 0x75) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + ++index; + ch = scanHexEscape('u'); + if (!ch || ch === '\\' || !isIdentifierStart(ch.charCodeAt(0))) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + id = ch; + } + + while (index < length) { + ch = source.charCodeAt(index); + if (!isIdentifierPart(ch)) { + break; + } + ++index; + id += String.fromCharCode(ch); + + // '\u' (U+005C, U+0075) denotes an escaped character. + if (ch === 0x5C) { + id = id.substr(0, id.length - 1); + if (source.charCodeAt(index) !== 0x75) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + ++index; + ch = scanHexEscape('u'); + if (!ch || ch === '\\' || !isIdentifierPart(ch.charCodeAt(0))) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + id += ch; + } + } + + return id; + } + + function getIdentifier() { + var start, ch; + + start = index++; + while (index < length) { + ch = source.charCodeAt(index); + if (ch === 0x5C) { + // Blackslash (U+005C) marks Unicode escape sequence. + index = start; + return getEscapedIdentifier(); + } + if (isIdentifierPart(ch)) { + ++index; + } else { + break; + } + } + + return source.slice(start, index); + } + + function scanIdentifier() { + var start, id, type; + + start = index; + + // Backslash (U+005C) starts an escaped character. + id = (source.charCodeAt(index) === 0x5C) ? getEscapedIdentifier() : getIdentifier(); + + // There is no keyword or literal with only one character. + // Thus, it must be an identifier. + if (id.length === 1) { + type = Token.Identifier; + } else if (isKeyword(id)) { + type = Token.Keyword; + } else if (id === 'null') { + type = Token.NullLiteral; + } else if (id === 'true' || id === 'false') { + type = Token.BooleanLiteral; + } else { + type = Token.Identifier; + } + + return { + type: type, + value: id, + lineNumber: lineNumber, + lineStart: lineStart, + start: start, + end: index + }; + } + + + // 7.7 Punctuators + + function scanPunctuator() { + var start = index, + code = source.charCodeAt(index), + code2, + ch1 = source[index], + ch2, + ch3, + ch4; + + switch (code) { + + // Check for most common single-character punctuators. + case 0x2E: // . dot + case 0x28: // ( open bracket + case 0x29: // ) close bracket + case 0x3B: // ; semicolon + case 0x2C: // , comma + case 0x7B: // { open curly brace + case 0x7D: // } close curly brace + case 0x5B: // [ + case 0x5D: // ] + case 0x3A: // : + case 0x3F: // ? + case 0x7E: // ~ + ++index; + if (extra.tokenize) { + if (code === 0x28) { + extra.openParenToken = extra.tokens.length; + } else if (code === 0x7B) { + extra.openCurlyToken = extra.tokens.length; + } + } + return { + type: Token.Punctuator, + value: String.fromCharCode(code), + lineNumber: lineNumber, + lineStart: lineStart, + start: start, + end: index + }; + + default: + code2 = source.charCodeAt(index + 1); + + // '=' (U+003D) marks an assignment or comparison operator. + if (code2 === 0x3D) { + switch (code) { + case 0x2B: // + + case 0x2D: // - + case 0x2F: // / + case 0x3C: // < + case 0x3E: // > + case 0x5E: // ^ + case 0x7C: // | + case 0x25: // % + case 0x26: // & + case 0x2A: // * + index += 2; + return { + type: Token.Punctuator, + value: String.fromCharCode(code) + String.fromCharCode(code2), + lineNumber: lineNumber, + lineStart: lineStart, + start: start, + end: index + }; + + case 0x21: // ! + case 0x3D: // = + index += 2; + + // !== and === + if (source.charCodeAt(index) === 0x3D) { + ++index; + } + return { + type: Token.Punctuator, + value: source.slice(start, index), + lineNumber: lineNumber, + lineStart: lineStart, + start: start, + end: index + }; + } + } + } + + // 4-character punctuator: >>>= + + ch4 = source.substr(index, 4); + + if (ch4 === '>>>=') { + index += 4; + return { + type: Token.Punctuator, + value: ch4, + lineNumber: lineNumber, + lineStart: lineStart, + start: start, + end: index + }; + } + + // 3-character punctuators: === !== >>> <<= >>= + + ch3 = ch4.substr(0, 3); + + if (ch3 === '>>>' || ch3 === '<<=' || ch3 === '>>=') { + index += 3; + return { + type: Token.Punctuator, + value: ch3, + lineNumber: lineNumber, + lineStart: lineStart, + start: start, + end: index + }; + } + + // Other 2-character punctuators: ++ -- << >> && || + ch2 = ch3.substr(0, 2); + + if ((ch1 === ch2[1] && ('+-<>&|'.indexOf(ch1) >= 0)) || ch2 === '=>') { + index += 2; + return { + type: Token.Punctuator, + value: ch2, + lineNumber: lineNumber, + lineStart: lineStart, + start: start, + end: index + }; + } + + // 1-character punctuators: < > = ! + - * % & | ^ / + if ('<>=!+-*%&|^/'.indexOf(ch1) >= 0) { + ++index; + return { + type: Token.Punctuator, + value: ch1, + lineNumber: lineNumber, + lineStart: lineStart, + start: start, + end: index + }; + } + + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + + // 7.8.3 Numeric Literals + + function scanHexLiteral(start) { + var number = ''; + + while (index < length) { + if (!isHexDigit(source[index])) { + break; + } + number += source[index++]; + } + + if (number.length === 0) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + + if (isIdentifierStart(source.charCodeAt(index))) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + + return { + type: Token.NumericLiteral, + value: parseInt('0x' + number, 16), + lineNumber: lineNumber, + lineStart: lineStart, + start: start, + end: index + }; + } + + function scanOctalLiteral(start) { + var number = '0' + source[index++]; + while (index < length) { + if (!isOctalDigit(source[index])) { + break; + } + number += source[index++]; + } + + if (isIdentifierStart(source.charCodeAt(index)) || isDecimalDigit(source.charCodeAt(index))) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + + return { + type: Token.NumericLiteral, + value: parseInt(number, 8), + octal: true, + lineNumber: lineNumber, + lineStart: lineStart, + start: start, + end: index + }; + } + + function isImplicitOctalLiteral() { + var i, ch; + + // Implicit octal, unless there is a non-octal digit. + // (Annex B.1.1 on Numeric Literals) + for (i = index + 1; i < length; ++i) { + ch = source[i]; + if (ch === '8' || ch === '9') { + return false; + } + if (!isOctalDigit(ch)) { + return true; + } + } + + return true; + } + + function scanNumericLiteral() { + var number, start, ch; + + ch = source[index]; + assert(isDecimalDigit(ch.charCodeAt(0)) || (ch === '.'), + 'Numeric literal must start with a decimal digit or a decimal point'); + + start = index; + number = ''; + if (ch !== '.') { + number = source[index++]; + ch = source[index]; + + // Hex number starts with '0x'. + // Octal number starts with '0'. + if (number === '0') { + if (ch === 'x' || ch === 'X') { + ++index; + return scanHexLiteral(start); + } + if (isOctalDigit(ch)) { + if (isImplicitOctalLiteral()) { + return scanOctalLiteral(start); + } + } + } + + while (isDecimalDigit(source.charCodeAt(index))) { + number += source[index++]; + } + ch = source[index]; + } + + if (ch === '.') { + number += source[index++]; + while (isDecimalDigit(source.charCodeAt(index))) { + number += source[index++]; + } + ch = source[index]; + } + + if (ch === 'e' || ch === 'E') { + number += source[index++]; + + ch = source[index]; + if (ch === '+' || ch === '-') { + number += source[index++]; + } + if (isDecimalDigit(source.charCodeAt(index))) { + while (isDecimalDigit(source.charCodeAt(index))) { + number += source[index++]; + } + } else { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + } + + if (isIdentifierStart(source.charCodeAt(index))) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + + return { + type: Token.NumericLiteral, + value: parseFloat(number), + lineNumber: lineNumber, + lineStart: lineStart, + start: start, + end: index + }; + } + + // 7.8.4 String Literals + + function scanStringLiteral() { + var str = '', quote, start, ch, code, unescaped, restore, octal = false, startLineNumber, startLineStart; + startLineNumber = lineNumber; + startLineStart = lineStart; + + quote = source[index]; + assert((quote === '\'' || quote === '"'), + 'String literal must starts with a quote'); + + start = index; + ++index; + + while (index < length) { + ch = source[index++]; + + if (ch === quote) { + quote = ''; + break; + } else if (ch === '\\') { + ch = source[index++]; + if (!ch || !isLineTerminator(ch.charCodeAt(0))) { + switch (ch) { + case 'u': + case 'x': + restore = index; + unescaped = scanHexEscape(ch); + if (unescaped) { + str += unescaped; + } else { + index = restore; + str += ch; + } + break; + case 'n': + str += '\n'; + break; + case 'r': + str += '\r'; + break; + case 't': + str += '\t'; + break; + case 'b': + str += '\b'; + break; + case 'f': + str += '\f'; + break; + case 'v': + str += '\x0B'; + break; + + default: + if (isOctalDigit(ch)) { + code = '01234567'.indexOf(ch); + + // \0 is not octal escape sequence + if (code !== 0) { + octal = true; + } + + if (index < length && isOctalDigit(source[index])) { + octal = true; + code = code * 8 + '01234567'.indexOf(source[index++]); + + // 3 digits are only allowed when string starts + // with 0, 1, 2, 3 + if ('0123'.indexOf(ch) >= 0 && + index < length && + isOctalDigit(source[index])) { + code = code * 8 + '01234567'.indexOf(source[index++]); + } + } + str += String.fromCharCode(code); + } else { + str += ch; + } + break; + } + } else { + ++lineNumber; + if (ch === '\r' && source[index] === '\n') { + ++index; + } + lineStart = index; + } + } else if (isLineTerminator(ch.charCodeAt(0))) { + break; + } else { + str += ch; + } + } + + if (quote !== '') { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + + return { + type: Token.StringLiteral, + value: str, + octal: octal, + startLineNumber: startLineNumber, + startLineStart: startLineStart, + lineNumber: lineNumber, + lineStart: lineStart, + start: start, + end: index + }; + } + + function testRegExp(pattern, flags) { + var value; + try { + value = new RegExp(pattern, flags); + } catch (e) { + throwError({}, Messages.InvalidRegExp); + } + return value; + } + + function scanRegExpBody() { + var ch, str, classMarker, terminated, body; + + ch = source[index]; + assert(ch === '/', 'Regular expression literal must start with a slash'); + str = source[index++]; + + classMarker = false; + terminated = false; + while (index < length) { + ch = source[index++]; + str += ch; + if (ch === '\\') { + ch = source[index++]; + // ECMA-262 7.8.5 + if (isLineTerminator(ch.charCodeAt(0))) { + throwError({}, Messages.UnterminatedRegExp); + } + str += ch; + } else if (isLineTerminator(ch.charCodeAt(0))) { + throwError({}, Messages.UnterminatedRegExp); + } else if (classMarker) { + if (ch === ']') { + classMarker = false; + } + } else { + if (ch === '/') { + terminated = true; + break; + } else if (ch === '[') { + classMarker = true; + } + } + } + + if (!terminated) { + throwError({}, Messages.UnterminatedRegExp); + } + + // Exclude leading and trailing slash. + body = str.substr(1, str.length - 2); + return { + value: body, + literal: str + }; + } + + function scanRegExpFlags() { + var ch, str, flags, restore; + + str = ''; + flags = ''; + while (index < length) { + ch = source[index]; + if (!isIdentifierPart(ch.charCodeAt(0))) { + break; + } + + ++index; + if (ch === '\\' && index < length) { + ch = source[index]; + if (ch === 'u') { + ++index; + restore = index; + ch = scanHexEscape('u'); + if (ch) { + flags += ch; + for (str += '\\u'; restore < index; ++restore) { + str += source[restore]; + } + } else { + index = restore; + flags += 'u'; + str += '\\u'; + } + throwErrorTolerant({}, Messages.UnexpectedToken, 'ILLEGAL'); + } else { + str += '\\'; + throwErrorTolerant({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + } else { + flags += ch; + str += ch; + } + } + + return { + value: flags, + literal: str + }; + } + + function scanRegExp() { + var start, body, flags, pattern, value; + + lookahead = null; + skipComment(); + start = index; + + body = scanRegExpBody(); + flags = scanRegExpFlags(); + value = testRegExp(body.value, flags.value); + + if (extra.tokenize) { + return { + type: Token.RegularExpression, + value: value, + lineNumber: lineNumber, + lineStart: lineStart, + start: start, + end: index + }; + } + + return { + literal: body.literal + flags.literal, + value: value, + start: start, + end: index + }; + } + + function collectRegex() { + var pos, loc, regex, token; + + skipComment(); + + pos = index; + loc = { + start: { + line: lineNumber, + column: index - lineStart + } + }; + + regex = scanRegExp(); + loc.end = { + line: lineNumber, + column: index - lineStart + }; + + /* istanbul ignore next */ + if (!extra.tokenize) { + // Pop the previous token, which is likely '/' or '/=' + if (extra.tokens.length > 0) { + token = extra.tokens[extra.tokens.length - 1]; + if (token.range[0] === pos && token.type === 'Punctuator') { + if (token.value === '/' || token.value === '/=') { + extra.tokens.pop(); + } + } + } + + extra.tokens.push({ + type: 'RegularExpression', + value: regex.literal, + range: [pos, index], + loc: loc + }); + } + + return regex; + } + + function isIdentifierName(token) { + return token.type === Token.Identifier || + token.type === Token.Keyword || + token.type === Token.BooleanLiteral || + token.type === Token.NullLiteral; + } + + function advanceSlash() { + var prevToken, + checkToken; + // Using the following algorithm: + // https://github.com/mozilla/sweet.js/wiki/design + prevToken = extra.tokens[extra.tokens.length - 1]; + if (!prevToken) { + // Nothing before that: it cannot be a division. + return collectRegex(); + } + if (prevToken.type === 'Punctuator') { + if (prevToken.value === ']') { + return scanPunctuator(); + } + if (prevToken.value === ')') { + checkToken = extra.tokens[extra.openParenToken - 1]; + if (checkToken && + checkToken.type === 'Keyword' && + (checkToken.value === 'if' || + checkToken.value === 'while' || + checkToken.value === 'for' || + checkToken.value === 'with')) { + return collectRegex(); + } + return scanPunctuator(); + } + if (prevToken.value === '}') { + // Dividing a function by anything makes little sense, + // but we have to check for that. + if (extra.tokens[extra.openCurlyToken - 3] && + extra.tokens[extra.openCurlyToken - 3].type === 'Keyword') { + // Anonymous function. + checkToken = extra.tokens[extra.openCurlyToken - 4]; + if (!checkToken) { + return scanPunctuator(); + } + } else if (extra.tokens[extra.openCurlyToken - 4] && + extra.tokens[extra.openCurlyToken - 4].type === 'Keyword') { + // Named function. + checkToken = extra.tokens[extra.openCurlyToken - 5]; + if (!checkToken) { + return collectRegex(); + } + } else { + return scanPunctuator(); + } + // checkToken determines whether the function is + // a declaration or an expression. + if (FnExprTokens.indexOf(checkToken.value) >= 0) { + // It is an expression. + return scanPunctuator(); + } + // It is a declaration. + return collectRegex(); + } + return collectRegex(); + } + if (prevToken.type === 'Keyword' && prevToken.value !== 'this') { + return collectRegex(); + } + return scanPunctuator(); + } + + function advance() { + var ch; + + skipComment(); + + if (index >= length) { + return { + type: Token.EOF, + lineNumber: lineNumber, + lineStart: lineStart, + start: index, + end: index + }; + } + + ch = source.charCodeAt(index); + + if (isIdentifierStart(ch)) { + return scanIdentifier(); + } + + // Very common: ( and ) and ; + if (ch === 0x28 || ch === 0x29 || ch === 0x3B) { + return scanPunctuator(); + } + + // String literal starts with single quote (U+0027) or double quote (U+0022). + if (ch === 0x27 || ch === 0x22) { + return scanStringLiteral(); + } + + + // Dot (.) U+002E can also start a floating-point number, hence the need + // to check the next character. + if (ch === 0x2E) { + if (isDecimalDigit(source.charCodeAt(index + 1))) { + return scanNumericLiteral(); + } + return scanPunctuator(); + } + + if (isDecimalDigit(ch)) { + return scanNumericLiteral(); + } + + // Slash (/) U+002F can also start a regex. + if (extra.tokenize && ch === 0x2F) { + return advanceSlash(); + } + + return scanPunctuator(); + } + + function collectToken() { + var loc, token, range, value; + + skipComment(); + loc = { + start: { + line: lineNumber, + column: index - lineStart + } + }; + + token = advance(); + loc.end = { + line: lineNumber, + column: index - lineStart + }; + + if (token.type !== Token.EOF) { + value = source.slice(token.start, token.end); + extra.tokens.push({ + type: TokenName[token.type], + value: value, + range: [token.start, token.end], + loc: loc + }); + } + + return token; + } + + function lex() { + var token; + + token = lookahead; + index = token.end; + lineNumber = token.lineNumber; + lineStart = token.lineStart; + + lookahead = (typeof extra.tokens !== 'undefined') ? collectToken() : advance(); + + index = token.end; + lineNumber = token.lineNumber; + lineStart = token.lineStart; + + return token; + } + + function peek() { + var pos, line, start; + + pos = index; + line = lineNumber; + start = lineStart; + lookahead = (typeof extra.tokens !== 'undefined') ? collectToken() : advance(); + index = pos; + lineNumber = line; + lineStart = start; + } + + function Position(line, column) { + this.line = line; + this.column = column; + } + + function SourceLocation(startLine, startColumn, line, column) { + this.start = new Position(startLine, startColumn); + this.end = new Position(line, column); + } + + SyntaxTreeDelegate = { + + name: 'SyntaxTree', + + processComment: function (node) { + var lastChild, trailingComments; + + if (node.type === Syntax.Program) { + if (node.body.length > 0) { + return; + } + } + + if (extra.trailingComments.length > 0) { + if (extra.trailingComments[0].range[0] >= node.range[1]) { + trailingComments = extra.trailingComments; + extra.trailingComments = []; + } else { + extra.trailingComments.length = 0; + } + } else { + if (extra.bottomRightStack.length > 0 && + extra.bottomRightStack[extra.bottomRightStack.length - 1].trailingComments && + extra.bottomRightStack[extra.bottomRightStack.length - 1].trailingComments[0].range[0] >= node.range[1]) { + trailingComments = extra.bottomRightStack[extra.bottomRightStack.length - 1].trailingComments; + delete extra.bottomRightStack[extra.bottomRightStack.length - 1].trailingComments; + } + } + + // Eating the stack. + while (extra.bottomRightStack.length > 0 && extra.bottomRightStack[extra.bottomRightStack.length - 1].range[0] >= node.range[0]) { + lastChild = extra.bottomRightStack.pop(); + } + + if (lastChild) { + if (lastChild.leadingComments && lastChild.leadingComments[lastChild.leadingComments.length - 1].range[1] <= node.range[0]) { + node.leadingComments = lastChild.leadingComments; + delete lastChild.leadingComments; + } + } else if (extra.leadingComments.length > 0 && extra.leadingComments[extra.leadingComments.length - 1].range[1] <= node.range[0]) { + node.leadingComments = extra.leadingComments; + extra.leadingComments = []; + } + + + if (trailingComments) { + node.trailingComments = trailingComments; + } + + extra.bottomRightStack.push(node); + }, + + markEnd: function (node, startToken) { + if (extra.range) { + node.range = [startToken.start, index]; + } + if (extra.loc) { + node.loc = new SourceLocation( + startToken.startLineNumber === undefined ? startToken.lineNumber : startToken.startLineNumber, + startToken.start - (startToken.startLineStart === undefined ? startToken.lineStart : startToken.startLineStart), + lineNumber, + index - lineStart + ); + this.postProcess(node); + } + + if (extra.attachComment) { + this.processComment(node); + } + return node; + }, + + postProcess: function (node) { + if (extra.source) { + node.loc.source = extra.source; + } + return node; + }, + + createArrayExpression: function (elements) { + return { + type: Syntax.ArrayExpression, + elements: elements + }; + }, + + createAssignmentExpression: function (operator, left, right) { + return { + type: Syntax.AssignmentExpression, + operator: operator, + left: left, + right: right + }; + }, + + createBinaryExpression: function (operator, left, right) { + var type = (operator === '||' || operator === '&&') ? Syntax.LogicalExpression : + Syntax.BinaryExpression; + return { + type: type, + operator: operator, + left: left, + right: right + }; + }, + + createBlockStatement: function (body) { + return { + type: Syntax.BlockStatement, + body: body + }; + }, + + createBreakStatement: function (label) { + return { + type: Syntax.BreakStatement, + label: label + }; + }, + + createCallExpression: function (callee, args) { + return { + type: Syntax.CallExpression, + callee: callee, + 'arguments': args + }; + }, + + createCatchClause: function (param, body) { + return { + type: Syntax.CatchClause, + param: param, + body: body + }; + }, + + createConditionalExpression: function (test, consequent, alternate) { + return { + type: Syntax.ConditionalExpression, + test: test, + consequent: consequent, + alternate: alternate + }; + }, + + createContinueStatement: function (label) { + return { + type: Syntax.ContinueStatement, + label: label + }; + }, + + createDebuggerStatement: function () { + return { + type: Syntax.DebuggerStatement + }; + }, + + createDoWhileStatement: function (body, test) { + return { + type: Syntax.DoWhileStatement, + body: body, + test: test + }; + }, + + createEmptyStatement: function () { + return { + type: Syntax.EmptyStatement + }; + }, + + createExpressionStatement: function (expression) { + return { + type: Syntax.ExpressionStatement, + expression: expression + }; + }, + + createForStatement: function (init, test, update, body) { + return { + type: Syntax.ForStatement, + init: init, + test: test, + update: update, + body: body + }; + }, + + createForInStatement: function (left, right, body) { + return { + type: Syntax.ForInStatement, + left: left, + right: right, + body: body, + each: false + }; + }, + + createFunctionDeclaration: function (id, params, defaults, body) { + return { + type: Syntax.FunctionDeclaration, + id: id, + params: params, + defaults: defaults, + body: body, + rest: null, + generator: false, + expression: false + }; + }, + + createFunctionExpression: function (id, params, defaults, body) { + return { + type: Syntax.FunctionExpression, + id: id, + params: params, + defaults: defaults, + body: body, + rest: null, + generator: false, + expression: false + }; + }, + + createIdentifier: function (name) { + return { + type: Syntax.Identifier, + name: name + }; + }, + + createIfStatement: function (test, consequent, alternate) { + return { + type: Syntax.IfStatement, + test: test, + consequent: consequent, + alternate: alternate + }; + }, + + createLabeledStatement: function (label, body) { + return { + type: Syntax.LabeledStatement, + label: label, + body: body + }; + }, + + createLiteral: function (token) { + return { + type: Syntax.Literal, + value: token.value, + raw: source.slice(token.start, token.end) + }; + }, + + createMemberExpression: function (accessor, object, property) { + return { + type: Syntax.MemberExpression, + computed: accessor === '[', + object: object, + property: property + }; + }, + + createNewExpression: function (callee, args) { + return { + type: Syntax.NewExpression, + callee: callee, + 'arguments': args + }; + }, + + createObjectExpression: function (properties) { + return { + type: Syntax.ObjectExpression, + properties: properties + }; + }, + + createPostfixExpression: function (operator, argument) { + return { + type: Syntax.UpdateExpression, + operator: operator, + argument: argument, + prefix: false + }; + }, + + createProgram: function (body) { + return { + type: Syntax.Program, + body: body + }; + }, + + createProperty: function (kind, key, value) { + return { + type: Syntax.Property, + key: key, + value: value, + kind: kind + }; + }, + + createReturnStatement: function (argument) { + return { + type: Syntax.ReturnStatement, + argument: argument + }; + }, + + createSequenceExpression: function (expressions) { + return { + type: Syntax.SequenceExpression, + expressions: expressions + }; + }, + + createSwitchCase: function (test, consequent) { + return { + type: Syntax.SwitchCase, + test: test, + consequent: consequent + }; + }, + + createSwitchStatement: function (discriminant, cases) { + return { + type: Syntax.SwitchStatement, + discriminant: discriminant, + cases: cases + }; + }, + + createThisExpression: function () { + return { + type: Syntax.ThisExpression + }; + }, + + createThrowStatement: function (argument) { + return { + type: Syntax.ThrowStatement, + argument: argument + }; + }, + + createTryStatement: function (block, guardedHandlers, handlers, finalizer) { + return { + type: Syntax.TryStatement, + block: block, + guardedHandlers: guardedHandlers, + handlers: handlers, + finalizer: finalizer + }; + }, + + createUnaryExpression: function (operator, argument) { + if (operator === '++' || operator === '--') { + return { + type: Syntax.UpdateExpression, + operator: operator, + argument: argument, + prefix: true + }; + } + return { + type: Syntax.UnaryExpression, + operator: operator, + argument: argument, + prefix: true + }; + }, + + createVariableDeclaration: function (declarations, kind) { + return { + type: Syntax.VariableDeclaration, + declarations: declarations, + kind: kind + }; + }, + + createVariableDeclarator: function (id, init) { + return { + type: Syntax.VariableDeclarator, + id: id, + init: init + }; + }, + + createWhileStatement: function (test, body) { + return { + type: Syntax.WhileStatement, + test: test, + body: body + }; + }, + + createWithStatement: function (object, body) { + return { + type: Syntax.WithStatement, + object: object, + body: body + }; + } + }; + + // Return true if there is a line terminator before the next token. + + function peekLineTerminator() { + var pos, line, start, found; + + pos = index; + line = lineNumber; + start = lineStart; + skipComment(); + found = lineNumber !== line; + index = pos; + lineNumber = line; + lineStart = start; + + return found; + } + + // Throw an exception + + function throwError(token, messageFormat) { + var error, + args = Array.prototype.slice.call(arguments, 2), + msg = messageFormat.replace( + /%(\d)/g, + function (whole, index) { + assert(index < args.length, 'Message reference must be in range'); + return args[index]; + } + ); + + if (typeof token.lineNumber === 'number') { + error = new Error('Line ' + token.lineNumber + ': ' + msg); + error.index = token.start; + error.lineNumber = token.lineNumber; + error.column = token.start - lineStart + 1; + } else { + error = new Error('Line ' + lineNumber + ': ' + msg); + error.index = index; + error.lineNumber = lineNumber; + error.column = index - lineStart + 1; + } + + error.description = msg; + throw error; + } + + function throwErrorTolerant() { + try { + throwError.apply(null, arguments); + } catch (e) { + if (extra.errors) { + extra.errors.push(e); + } else { + throw e; + } + } + } + + + // Throw an exception because of the token. + + function throwUnexpected(token) { + if (token.type === Token.EOF) { + throwError(token, Messages.UnexpectedEOS); + } + + if (token.type === Token.NumericLiteral) { + throwError(token, Messages.UnexpectedNumber); + } + + if (token.type === Token.StringLiteral) { + throwError(token, Messages.UnexpectedString); + } + + if (token.type === Token.Identifier) { + throwError(token, Messages.UnexpectedIdentifier); + } + + if (token.type === Token.Keyword) { + if (isFutureReservedWord(token.value)) { + throwError(token, Messages.UnexpectedReserved); + } else if (strict && isStrictModeReservedWord(token.value)) { + throwErrorTolerant(token, Messages.StrictReservedWord); + return; + } + throwError(token, Messages.UnexpectedToken, token.value); + } + + // BooleanLiteral, NullLiteral, or Punctuator. + throwError(token, Messages.UnexpectedToken, token.value); + } + + // Expect the next token to match the specified punctuator. + // If not, an exception will be thrown. + + function expect(value) { + var token = lex(); + if (token.type !== Token.Punctuator || token.value !== value) { + throwUnexpected(token); + } + } + + // Expect the next token to match the specified keyword. + // If not, an exception will be thrown. + + function expectKeyword(keyword) { + var token = lex(); + if (token.type !== Token.Keyword || token.value !== keyword) { + throwUnexpected(token); + } + } + + // Return true if the next token matches the specified punctuator. + + function match(value) { + return lookahead.type === Token.Punctuator && lookahead.value === value; + } + + // Return true if the next token matches the specified keyword + + function matchKeyword(keyword) { + return lookahead.type === Token.Keyword && lookahead.value === keyword; + } + + // Return true if the next token is an assignment operator + + function matchAssign() { + var op; + + if (lookahead.type !== Token.Punctuator) { + return false; + } + op = lookahead.value; + return op === '=' || + op === '*=' || + op === '/=' || + op === '%=' || + op === '+=' || + op === '-=' || + op === '<<=' || + op === '>>=' || + op === '>>>=' || + op === '&=' || + op === '^=' || + op === '|='; + } + + function consumeSemicolon() { + var line, oldIndex = index, oldLineNumber = lineNumber, + oldLineStart = lineStart, oldLookahead = lookahead; + + // Catch the very common case first: immediately a semicolon (U+003B). + if (source.charCodeAt(index) === 0x3B || match(';')) { + lex(); + return; + } + + line = lineNumber; + skipComment(); + if (lineNumber !== line) { + index = oldIndex; + lineNumber = oldLineNumber; + lineStart = oldLineStart; + lookahead = oldLookahead; + return; + } + + if (lookahead.type !== Token.EOF && !match('}')) { + throwUnexpected(lookahead); + } + } + + // Return true if provided expression is LeftHandSideExpression + + function isLeftHandSide(expr) { + return expr.type === Syntax.Identifier || expr.type === Syntax.MemberExpression; + } + + // 11.1.4 Array Initialiser + + function parseArrayInitialiser() { + var elements = [], startToken; + + startToken = lookahead; + expect('['); + + while (!match(']')) { + if (match(',')) { + lex(); + elements.push(null); + } else { + elements.push(parseAssignmentExpression()); + + if (!match(']')) { + expect(','); + } + } + } + + lex(); + + return delegate.markEnd(delegate.createArrayExpression(elements), startToken); + } + + // 11.1.5 Object Initialiser + + function parsePropertyFunction(param, first) { + var previousStrict, body, startToken; + + previousStrict = strict; + startToken = lookahead; + body = parseFunctionSourceElements(); + if (first && strict && isRestrictedWord(param[0].name)) { + throwErrorTolerant(first, Messages.StrictParamName); + } + strict = previousStrict; + return delegate.markEnd(delegate.createFunctionExpression(null, param, [], body), startToken); + } + + function parseObjectPropertyKey() { + var token, startToken; + + startToken = lookahead; + token = lex(); + + // Note: This function is called only from parseObjectProperty(), where + // EOF and Punctuator tokens are already filtered out. + + if (token.type === Token.StringLiteral || token.type === Token.NumericLiteral) { + if (strict && token.octal) { + throwErrorTolerant(token, Messages.StrictOctalLiteral); + } + return delegate.markEnd(delegate.createLiteral(token), startToken); + } + + return delegate.markEnd(delegate.createIdentifier(token.value), startToken); + } + + function parseObjectProperty() { + var token, key, id, value, param, startToken; + + token = lookahead; + startToken = lookahead; + + if (token.type === Token.Identifier) { + + id = parseObjectPropertyKey(); + + // Property Assignment: Getter and Setter. + + if (token.value === 'get' && !match(':')) { + key = parseObjectPropertyKey(); + expect('('); + expect(')'); + value = parsePropertyFunction([]); + return delegate.markEnd(delegate.createProperty('get', key, value), startToken); + } + if (token.value === 'set' && !match(':')) { + key = parseObjectPropertyKey(); + expect('('); + token = lookahead; + if (token.type !== Token.Identifier) { + expect(')'); + throwErrorTolerant(token, Messages.UnexpectedToken, token.value); + value = parsePropertyFunction([]); + } else { + param = [ parseVariableIdentifier() ]; + expect(')'); + value = parsePropertyFunction(param, token); + } + return delegate.markEnd(delegate.createProperty('set', key, value), startToken); + } + expect(':'); + value = parseAssignmentExpression(); + return delegate.markEnd(delegate.createProperty('init', id, value), startToken); + } + if (token.type === Token.EOF || token.type === Token.Punctuator) { + throwUnexpected(token); + } else { + key = parseObjectPropertyKey(); + expect(':'); + value = parseAssignmentExpression(); + return delegate.markEnd(delegate.createProperty('init', key, value), startToken); + } + } + + function parseObjectInitialiser() { + var properties = [], property, name, key, kind, map = {}, toString = String, startToken; + + startToken = lookahead; + + expect('{'); + + while (!match('}')) { + property = parseObjectProperty(); + + if (property.key.type === Syntax.Identifier) { + name = property.key.name; + } else { + name = toString(property.key.value); + } + kind = (property.kind === 'init') ? PropertyKind.Data : (property.kind === 'get') ? PropertyKind.Get : PropertyKind.Set; + + key = '$' + name; + if (Object.prototype.hasOwnProperty.call(map, key)) { + if (map[key] === PropertyKind.Data) { + if (strict && kind === PropertyKind.Data) { + throwErrorTolerant({}, Messages.StrictDuplicateProperty); + } else if (kind !== PropertyKind.Data) { + throwErrorTolerant({}, Messages.AccessorDataProperty); + } + } else { + if (kind === PropertyKind.Data) { + throwErrorTolerant({}, Messages.AccessorDataProperty); + } else if (map[key] & kind) { + throwErrorTolerant({}, Messages.AccessorGetSet); + } + } + map[key] |= kind; + } else { + map[key] = kind; + } + + properties.push(property); + + if (!match('}')) { + expect(','); + } + } + + expect('}'); + + return delegate.markEnd(delegate.createObjectExpression(properties), startToken); + } + + // 11.1.6 The Grouping Operator + + function parseGroupExpression() { + var expr; + + expect('('); + + expr = parseExpression(); + + expect(')'); + + return expr; + } + + + // 11.1 Primary Expressions + + function parsePrimaryExpression() { + var type, token, expr, startToken; + + if (match('(')) { + return parseGroupExpression(); + } + + if (match('[')) { + return parseArrayInitialiser(); + } + + if (match('{')) { + return parseObjectInitialiser(); + } + + type = lookahead.type; + startToken = lookahead; + + if (type === Token.Identifier) { + expr = delegate.createIdentifier(lex().value); + } else if (type === Token.StringLiteral || type === Token.NumericLiteral) { + if (strict && lookahead.octal) { + throwErrorTolerant(lookahead, Messages.StrictOctalLiteral); + } + expr = delegate.createLiteral(lex()); + } else if (type === Token.Keyword) { + if (matchKeyword('function')) { + return parseFunctionExpression(); + } + if (matchKeyword('this')) { + lex(); + expr = delegate.createThisExpression(); + } else { + throwUnexpected(lex()); + } + } else if (type === Token.BooleanLiteral) { + token = lex(); + token.value = (token.value === 'true'); + expr = delegate.createLiteral(token); + } else if (type === Token.NullLiteral) { + token = lex(); + token.value = null; + expr = delegate.createLiteral(token); + } else if (match('/') || match('/=')) { + if (typeof extra.tokens !== 'undefined') { + expr = delegate.createLiteral(collectRegex()); + } else { + expr = delegate.createLiteral(scanRegExp()); + } + peek(); + } else { + throwUnexpected(lex()); + } + + return delegate.markEnd(expr, startToken); + } + + // 11.2 Left-Hand-Side Expressions + + function parseArguments() { + var args = []; + + expect('('); + + if (!match(')')) { + while (index < length) { + args.push(parseAssignmentExpression()); + if (match(')')) { + break; + } + expect(','); + } + } + + expect(')'); + + return args; + } + + function parseNonComputedProperty() { + var token, startToken; + + startToken = lookahead; + token = lex(); + + if (!isIdentifierName(token)) { + throwUnexpected(token); + } + + return delegate.markEnd(delegate.createIdentifier(token.value), startToken); + } + + function parseNonComputedMember() { + expect('.'); + + return parseNonComputedProperty(); + } + + function parseComputedMember() { + var expr; + + expect('['); + + expr = parseExpression(); + + expect(']'); + + return expr; + } + + function parseNewExpression() { + var callee, args, startToken; + + startToken = lookahead; + expectKeyword('new'); + callee = parseLeftHandSideExpression(); + args = match('(') ? parseArguments() : []; + + return delegate.markEnd(delegate.createNewExpression(callee, args), startToken); + } + + function parseLeftHandSideExpressionAllowCall() { + var expr, args, property, startToken, previousAllowIn = state.allowIn; + + startToken = lookahead; + state.allowIn = true; + expr = matchKeyword('new') ? parseNewExpression() : parsePrimaryExpression(); + + for (;;) { + if (match('.')) { + property = parseNonComputedMember(); + expr = delegate.createMemberExpression('.', expr, property); + } else if (match('(')) { + args = parseArguments(); + expr = delegate.createCallExpression(expr, args); + } else if (match('[')) { + property = parseComputedMember(); + expr = delegate.createMemberExpression('[', expr, property); + } else { + break; + } + delegate.markEnd(expr, startToken); + } + state.allowIn = previousAllowIn; + + return expr; + } + + function parseLeftHandSideExpression() { + var expr, property, startToken; + assert(state.allowIn, 'callee of new expression always allow in keyword.'); + + startToken = lookahead; + + expr = matchKeyword('new') ? parseNewExpression() : parsePrimaryExpression(); + + while (match('.') || match('[')) { + if (match('[')) { + property = parseComputedMember(); + expr = delegate.createMemberExpression('[', expr, property); + } else { + property = parseNonComputedMember(); + expr = delegate.createMemberExpression('.', expr, property); + } + delegate.markEnd(expr, startToken); + } + return expr; + } + + // 11.3 Postfix Expressions + + function parsePostfixExpression() { + var expr, token, startToken = lookahead; + + expr = parseLeftHandSideExpressionAllowCall(); + + if (lookahead.type === Token.Punctuator) { + if ((match('++') || match('--')) && !peekLineTerminator()) { + // 11.3.1, 11.3.2 + if (strict && expr.type === Syntax.Identifier && isRestrictedWord(expr.name)) { + throwErrorTolerant({}, Messages.StrictLHSPostfix); + } + + if (!isLeftHandSide(expr)) { + throwErrorTolerant({}, Messages.InvalidLHSInAssignment); + } + + token = lex(); + expr = delegate.markEnd(delegate.createPostfixExpression(token.value, expr), startToken); + } + } + + return expr; + } + + // 11.4 Unary Operators + + function parseUnaryExpression() { + var token, expr, startToken; + + if (lookahead.type !== Token.Punctuator && lookahead.type !== Token.Keyword) { + expr = parsePostfixExpression(); + } else if (match('++') || match('--')) { + startToken = lookahead; + token = lex(); + expr = parseUnaryExpression(); + // 11.4.4, 11.4.5 + if (strict && expr.type === Syntax.Identifier && isRestrictedWord(expr.name)) { + throwErrorTolerant({}, Messages.StrictLHSPrefix); + } + + if (!isLeftHandSide(expr)) { + throwErrorTolerant({}, Messages.InvalidLHSInAssignment); + } + + expr = delegate.createUnaryExpression(token.value, expr); + expr = delegate.markEnd(expr, startToken); + } else if (match('+') || match('-') || match('~') || match('!')) { + startToken = lookahead; + token = lex(); + expr = parseUnaryExpression(); + expr = delegate.createUnaryExpression(token.value, expr); + expr = delegate.markEnd(expr, startToken); + } else if (matchKeyword('delete') || matchKeyword('void') || matchKeyword('typeof')) { + startToken = lookahead; + token = lex(); + expr = parseUnaryExpression(); + expr = delegate.createUnaryExpression(token.value, expr); + expr = delegate.markEnd(expr, startToken); + if (strict && expr.operator === 'delete' && expr.argument.type === Syntax.Identifier) { + throwErrorTolerant({}, Messages.StrictDelete); + } + } else { + expr = parsePostfixExpression(); + } + + return expr; + } + + function binaryPrecedence(token, allowIn) { + var prec = 0; + + if (token.type !== Token.Punctuator && token.type !== Token.Keyword) { + return 0; + } + + switch (token.value) { + case '||': + prec = 1; + break; + + case '&&': + prec = 2; + break; + + case '|': + prec = 3; + break; + + case '^': + prec = 4; + break; + + case '&': + prec = 5; + break; + + case '==': + case '!=': + case '===': + case '!==': + prec = 6; + break; + + case '<': + case '>': + case '<=': + case '>=': + case 'instanceof': + prec = 7; + break; + + case 'in': + prec = allowIn ? 7 : 0; + break; + + case '<<': + case '>>': + case '>>>': + prec = 8; + break; + + case '+': + case '-': + prec = 9; + break; + + case '*': + case '/': + case '%': + prec = 11; + break; + + default: + break; + } + + return prec; + } + + // 11.5 Multiplicative Operators + // 11.6 Additive Operators + // 11.7 Bitwise Shift Operators + // 11.8 Relational Operators + // 11.9 Equality Operators + // 11.10 Binary Bitwise Operators + // 11.11 Binary Logical Operators + + function parseBinaryExpression() { + var marker, markers, expr, token, prec, stack, right, operator, left, i; + + marker = lookahead; + left = parseUnaryExpression(); + + token = lookahead; + prec = binaryPrecedence(token, state.allowIn); + if (prec === 0) { + return left; + } + token.prec = prec; + lex(); + + markers = [marker, lookahead]; + right = parseUnaryExpression(); + + stack = [left, token, right]; + + while ((prec = binaryPrecedence(lookahead, state.allowIn)) > 0) { + + // Reduce: make a binary expression from the three topmost entries. + while ((stack.length > 2) && (prec <= stack[stack.length - 2].prec)) { + right = stack.pop(); + operator = stack.pop().value; + left = stack.pop(); + expr = delegate.createBinaryExpression(operator, left, right); + markers.pop(); + marker = markers[markers.length - 1]; + delegate.markEnd(expr, marker); + stack.push(expr); + } + + // Shift. + token = lex(); + token.prec = prec; + stack.push(token); + markers.push(lookahead); + expr = parseUnaryExpression(); + stack.push(expr); + } + + // Final reduce to clean-up the stack. + i = stack.length - 1; + expr = stack[i]; + markers.pop(); + while (i > 1) { + expr = delegate.createBinaryExpression(stack[i - 1].value, stack[i - 2], expr); + i -= 2; + marker = markers.pop(); + delegate.markEnd(expr, marker); + } + + return expr; + } + + + // 11.12 Conditional Operator + + function parseConditionalExpression() { + var expr, previousAllowIn, consequent, alternate, startToken; + + startToken = lookahead; + + expr = parseBinaryExpression(); + + if (match('?')) { + lex(); + previousAllowIn = state.allowIn; + state.allowIn = true; + consequent = parseAssignmentExpression(); + state.allowIn = previousAllowIn; + expect(':'); + alternate = parseAssignmentExpression(); + + expr = delegate.createConditionalExpression(expr, consequent, alternate); + delegate.markEnd(expr, startToken); + } + + return expr; + } + + // 11.13 Assignment Operators + + function parseAssignmentExpression() { + var token, left, right, node, startToken; + + token = lookahead; + startToken = lookahead; + + node = left = parseConditionalExpression(); + + if (matchAssign()) { + // LeftHandSideExpression + if (!isLeftHandSide(left)) { + throwErrorTolerant({}, Messages.InvalidLHSInAssignment); + } + + // 11.13.1 + if (strict && left.type === Syntax.Identifier && isRestrictedWord(left.name)) { + throwErrorTolerant(token, Messages.StrictLHSAssignment); + } + + token = lex(); + right = parseAssignmentExpression(); + node = delegate.markEnd(delegate.createAssignmentExpression(token.value, left, right), startToken); + } + + return node; + } + + // 11.14 Comma Operator + + function parseExpression() { + var expr, startToken = lookahead; + + expr = parseAssignmentExpression(); + + if (match(',')) { + expr = delegate.createSequenceExpression([ expr ]); + + while (index < length) { + if (!match(',')) { + break; + } + lex(); + expr.expressions.push(parseAssignmentExpression()); + } + + delegate.markEnd(expr, startToken); + } + + return expr; + } + + // 12.1 Block + + function parseStatementList() { + var list = [], + statement; + + while (index < length) { + if (match('}')) { + break; + } + statement = parseSourceElement(); + if (typeof statement === 'undefined') { + break; + } + list.push(statement); + } + + return list; + } + + function parseBlock() { + var block, startToken; + + startToken = lookahead; + expect('{'); + + block = parseStatementList(); + + expect('}'); + + return delegate.markEnd(delegate.createBlockStatement(block), startToken); + } + + // 12.2 Variable Statement + + function parseVariableIdentifier() { + var token, startToken; + + startToken = lookahead; + token = lex(); + + if (token.type !== Token.Identifier) { + throwUnexpected(token); + } + + return delegate.markEnd(delegate.createIdentifier(token.value), startToken); + } + + function parseVariableDeclaration(kind) { + var init = null, id, startToken; + + startToken = lookahead; + id = parseVariableIdentifier(); + + // 12.2.1 + if (strict && isRestrictedWord(id.name)) { + throwErrorTolerant({}, Messages.StrictVarName); + } + + if (kind === 'const') { + expect('='); + init = parseAssignmentExpression(); + } else if (match('=')) { + lex(); + init = parseAssignmentExpression(); + } + + return delegate.markEnd(delegate.createVariableDeclarator(id, init), startToken); + } + + function parseVariableDeclarationList(kind) { + var list = []; + + do { + list.push(parseVariableDeclaration(kind)); + if (!match(',')) { + break; + } + lex(); + } while (index < length); + + return list; + } + + function parseVariableStatement() { + var declarations; + + expectKeyword('var'); + + declarations = parseVariableDeclarationList(); + + consumeSemicolon(); + + return delegate.createVariableDeclaration(declarations, 'var'); + } + + // kind may be `const` or `let` + // Both are experimental and not in the specification yet. + // see http://wiki.ecmascript.org/doku.php?id=harmony:const + // and http://wiki.ecmascript.org/doku.php?id=harmony:let + function parseConstLetDeclaration(kind) { + var declarations, startToken; + + startToken = lookahead; + + expectKeyword(kind); + + declarations = parseVariableDeclarationList(kind); + + consumeSemicolon(); + + return delegate.markEnd(delegate.createVariableDeclaration(declarations, kind), startToken); + } + + // 12.3 Empty Statement + + function parseEmptyStatement() { + expect(';'); + return delegate.createEmptyStatement(); + } + + // 12.4 Expression Statement + + function parseExpressionStatement() { + var expr = parseExpression(); + consumeSemicolon(); + return delegate.createExpressionStatement(expr); + } + + // 12.5 If statement + + function parseIfStatement() { + var test, consequent, alternate; + + expectKeyword('if'); + + expect('('); + + test = parseExpression(); + + expect(')'); + + consequent = parseStatement(); + + if (matchKeyword('else')) { + lex(); + alternate = parseStatement(); + } else { + alternate = null; + } + + return delegate.createIfStatement(test, consequent, alternate); + } + + // 12.6 Iteration Statements + + function parseDoWhileStatement() { + var body, test, oldInIteration; + + expectKeyword('do'); + + oldInIteration = state.inIteration; + state.inIteration = true; + + body = parseStatement(); + + state.inIteration = oldInIteration; + + expectKeyword('while'); + + expect('('); + + test = parseExpression(); + + expect(')'); + + if (match(';')) { + lex(); + } + + return delegate.createDoWhileStatement(body, test); + } + + function parseWhileStatement() { + var test, body, oldInIteration; + + expectKeyword('while'); + + expect('('); + + test = parseExpression(); + + expect(')'); + + oldInIteration = state.inIteration; + state.inIteration = true; + + body = parseStatement(); + + state.inIteration = oldInIteration; + + return delegate.createWhileStatement(test, body); + } + + function parseForVariableDeclaration() { + var token, declarations, startToken; + + startToken = lookahead; + token = lex(); + declarations = parseVariableDeclarationList(); + + return delegate.markEnd(delegate.createVariableDeclaration(declarations, token.value), startToken); + } + + function parseForStatement() { + var init, test, update, left, right, body, oldInIteration, previousAllowIn = state.allowIn; + + init = test = update = null; + + expectKeyword('for'); + + expect('('); + + if (match(';')) { + lex(); + } else { + if (matchKeyword('var') || matchKeyword('let')) { + state.allowIn = false; + init = parseForVariableDeclaration(); + state.allowIn = previousAllowIn; + + if (init.declarations.length === 1 && matchKeyword('in')) { + lex(); + left = init; + right = parseExpression(); + init = null; + } + } else { + state.allowIn = false; + init = parseExpression(); + state.allowIn = previousAllowIn; + + if (matchKeyword('in')) { + // LeftHandSideExpression + if (!isLeftHandSide(init)) { + throwErrorTolerant({}, Messages.InvalidLHSInForIn); + } + + lex(); + left = init; + right = parseExpression(); + init = null; + } + } + + if (typeof left === 'undefined') { + expect(';'); + } + } + + if (typeof left === 'undefined') { + + if (!match(';')) { + test = parseExpression(); + } + expect(';'); + + if (!match(')')) { + update = parseExpression(); + } + } + + expect(')'); + + oldInIteration = state.inIteration; + state.inIteration = true; + + body = parseStatement(); + + state.inIteration = oldInIteration; + + return (typeof left === 'undefined') ? + delegate.createForStatement(init, test, update, body) : + delegate.createForInStatement(left, right, body); + } + + // 12.7 The continue statement + + function parseContinueStatement() { + var label = null, key; + + expectKeyword('continue'); + + // Optimize the most common form: 'continue;'. + if (source.charCodeAt(index) === 0x3B) { + lex(); + + if (!state.inIteration) { + throwError({}, Messages.IllegalContinue); + } + + return delegate.createContinueStatement(null); + } + + if (peekLineTerminator()) { + if (!state.inIteration) { + throwError({}, Messages.IllegalContinue); + } + + return delegate.createContinueStatement(null); + } + + if (lookahead.type === Token.Identifier) { + label = parseVariableIdentifier(); + + key = '$' + label.name; + if (!Object.prototype.hasOwnProperty.call(state.labelSet, key)) { + throwError({}, Messages.UnknownLabel, label.name); + } + } + + consumeSemicolon(); + + if (label === null && !state.inIteration) { + throwError({}, Messages.IllegalContinue); + } + + return delegate.createContinueStatement(label); + } + + // 12.8 The break statement + + function parseBreakStatement() { + var label = null, key; + + expectKeyword('break'); + + // Catch the very common case first: immediately a semicolon (U+003B). + if (source.charCodeAt(index) === 0x3B) { + lex(); + + if (!(state.inIteration || state.inSwitch)) { + throwError({}, Messages.IllegalBreak); + } + + return delegate.createBreakStatement(null); + } + + if (peekLineTerminator()) { + if (!(state.inIteration || state.inSwitch)) { + throwError({}, Messages.IllegalBreak); + } + + return delegate.createBreakStatement(null); + } + + if (lookahead.type === Token.Identifier) { + label = parseVariableIdentifier(); + + key = '$' + label.name; + if (!Object.prototype.hasOwnProperty.call(state.labelSet, key)) { + throwError({}, Messages.UnknownLabel, label.name); + } + } + + consumeSemicolon(); + + if (label === null && !(state.inIteration || state.inSwitch)) { + throwError({}, Messages.IllegalBreak); + } + + return delegate.createBreakStatement(label); + } + + // 12.9 The return statement + + function parseReturnStatement() { + var argument = null; + + expectKeyword('return'); + + if (!state.inFunctionBody) { + throwErrorTolerant({}, Messages.IllegalReturn); + } + + // 'return' followed by a space and an identifier is very common. + if (source.charCodeAt(index) === 0x20) { + if (isIdentifierStart(source.charCodeAt(index + 1))) { + argument = parseExpression(); + consumeSemicolon(); + return delegate.createReturnStatement(argument); + } + } + + if (peekLineTerminator()) { + return delegate.createReturnStatement(null); + } + + if (!match(';')) { + if (!match('}') && lookahead.type !== Token.EOF) { + argument = parseExpression(); + } + } + + consumeSemicolon(); + + return delegate.createReturnStatement(argument); + } + + // 12.10 The with statement + + function parseWithStatement() { + var object, body; + + if (strict) { + // TODO(ikarienator): Should we update the test cases instead? + skipComment(); + throwErrorTolerant({}, Messages.StrictModeWith); + } + + expectKeyword('with'); + + expect('('); + + object = parseExpression(); + + expect(')'); + + body = parseStatement(); + + return delegate.createWithStatement(object, body); + } + + // 12.10 The swith statement + + function parseSwitchCase() { + var test, consequent = [], statement, startToken; + + startToken = lookahead; + if (matchKeyword('default')) { + lex(); + test = null; + } else { + expectKeyword('case'); + test = parseExpression(); + } + expect(':'); + + while (index < length) { + if (match('}') || matchKeyword('default') || matchKeyword('case')) { + break; + } + statement = parseStatement(); + consequent.push(statement); + } + + return delegate.markEnd(delegate.createSwitchCase(test, consequent), startToken); + } + + function parseSwitchStatement() { + var discriminant, cases, clause, oldInSwitch, defaultFound; + + expectKeyword('switch'); + + expect('('); + + discriminant = parseExpression(); + + expect(')'); + + expect('{'); + + cases = []; + + if (match('}')) { + lex(); + return delegate.createSwitchStatement(discriminant, cases); + } + + oldInSwitch = state.inSwitch; + state.inSwitch = true; + defaultFound = false; + + while (index < length) { + if (match('}')) { + break; + } + clause = parseSwitchCase(); + if (clause.test === null) { + if (defaultFound) { + throwError({}, Messages.MultipleDefaultsInSwitch); + } + defaultFound = true; + } + cases.push(clause); + } + + state.inSwitch = oldInSwitch; + + expect('}'); + + return delegate.createSwitchStatement(discriminant, cases); + } + + // 12.13 The throw statement + + function parseThrowStatement() { + var argument; + + expectKeyword('throw'); + + if (peekLineTerminator()) { + throwError({}, Messages.NewlineAfterThrow); + } + + argument = parseExpression(); + + consumeSemicolon(); + + return delegate.createThrowStatement(argument); + } + + // 12.14 The try statement + + function parseCatchClause() { + var param, body, startToken; + + startToken = lookahead; + expectKeyword('catch'); + + expect('('); + if (match(')')) { + throwUnexpected(lookahead); + } + + param = parseVariableIdentifier(); + // 12.14.1 + if (strict && isRestrictedWord(param.name)) { + throwErrorTolerant({}, Messages.StrictCatchVariable); + } + + expect(')'); + body = parseBlock(); + return delegate.markEnd(delegate.createCatchClause(param, body), startToken); + } + + function parseTryStatement() { + var block, handlers = [], finalizer = null; + + expectKeyword('try'); + + block = parseBlock(); + + if (matchKeyword('catch')) { + handlers.push(parseCatchClause()); + } + + if (matchKeyword('finally')) { + lex(); + finalizer = parseBlock(); + } + + if (handlers.length === 0 && !finalizer) { + throwError({}, Messages.NoCatchOrFinally); + } + + return delegate.createTryStatement(block, [], handlers, finalizer); + } + + // 12.15 The debugger statement + + function parseDebuggerStatement() { + expectKeyword('debugger'); + + consumeSemicolon(); + + return delegate.createDebuggerStatement(); + } + + // 12 Statements + + function parseStatement() { + var type = lookahead.type, + expr, + labeledBody, + key, + startToken; + + if (type === Token.EOF) { + throwUnexpected(lookahead); + } + + if (type === Token.Punctuator && lookahead.value === '{') { + return parseBlock(); + } + + startToken = lookahead; + + if (type === Token.Punctuator) { + switch (lookahead.value) { + case ';': + return delegate.markEnd(parseEmptyStatement(), startToken); + case '(': + return delegate.markEnd(parseExpressionStatement(), startToken); + default: + break; + } + } + + if (type === Token.Keyword) { + switch (lookahead.value) { + case 'break': + return delegate.markEnd(parseBreakStatement(), startToken); + case 'continue': + return delegate.markEnd(parseContinueStatement(), startToken); + case 'debugger': + return delegate.markEnd(parseDebuggerStatement(), startToken); + case 'do': + return delegate.markEnd(parseDoWhileStatement(), startToken); + case 'for': + return delegate.markEnd(parseForStatement(), startToken); + case 'function': + return delegate.markEnd(parseFunctionDeclaration(), startToken); + case 'if': + return delegate.markEnd(parseIfStatement(), startToken); + case 'return': + return delegate.markEnd(parseReturnStatement(), startToken); + case 'switch': + return delegate.markEnd(parseSwitchStatement(), startToken); + case 'throw': + return delegate.markEnd(parseThrowStatement(), startToken); + case 'try': + return delegate.markEnd(parseTryStatement(), startToken); + case 'var': + return delegate.markEnd(parseVariableStatement(), startToken); + case 'while': + return delegate.markEnd(parseWhileStatement(), startToken); + case 'with': + return delegate.markEnd(parseWithStatement(), startToken); + default: + break; + } + } + + expr = parseExpression(); + + // 12.12 Labelled Statements + if ((expr.type === Syntax.Identifier) && match(':')) { + lex(); + + key = '$' + expr.name; + if (Object.prototype.hasOwnProperty.call(state.labelSet, key)) { + throwError({}, Messages.Redeclaration, 'Label', expr.name); + } + + state.labelSet[key] = true; + labeledBody = parseStatement(); + delete state.labelSet[key]; + return delegate.markEnd(delegate.createLabeledStatement(expr, labeledBody), startToken); + } + + consumeSemicolon(); + + return delegate.markEnd(delegate.createExpressionStatement(expr), startToken); + } + + // 13 Function Definition + + function parseFunctionSourceElements() { + var sourceElement, sourceElements = [], token, directive, firstRestricted, + oldLabelSet, oldInIteration, oldInSwitch, oldInFunctionBody, startToken; + + startToken = lookahead; + expect('{'); + + while (index < length) { + if (lookahead.type !== Token.StringLiteral) { + break; + } + token = lookahead; + + sourceElement = parseSourceElement(); + sourceElements.push(sourceElement); + if (sourceElement.expression.type !== Syntax.Literal) { + // this is not directive + break; + } + directive = source.slice(token.start + 1, token.end - 1); + if (directive === 'use strict') { + strict = true; + if (firstRestricted) { + throwErrorTolerant(firstRestricted, Messages.StrictOctalLiteral); + } + } else { + if (!firstRestricted && token.octal) { + firstRestricted = token; + } + } + } + + oldLabelSet = state.labelSet; + oldInIteration = state.inIteration; + oldInSwitch = state.inSwitch; + oldInFunctionBody = state.inFunctionBody; + + state.labelSet = {}; + state.inIteration = false; + state.inSwitch = false; + state.inFunctionBody = true; + + while (index < length) { + if (match('}')) { + break; + } + sourceElement = parseSourceElement(); + if (typeof sourceElement === 'undefined') { + break; + } + sourceElements.push(sourceElement); + } + + expect('}'); + + state.labelSet = oldLabelSet; + state.inIteration = oldInIteration; + state.inSwitch = oldInSwitch; + state.inFunctionBody = oldInFunctionBody; + + return delegate.markEnd(delegate.createBlockStatement(sourceElements), startToken); + } + + function parseParams(firstRestricted) { + var param, params = [], token, stricted, paramSet, key, message; + expect('('); + + if (!match(')')) { + paramSet = {}; + while (index < length) { + token = lookahead; + param = parseVariableIdentifier(); + key = '$' + token.value; + if (strict) { + if (isRestrictedWord(token.value)) { + stricted = token; + message = Messages.StrictParamName; + } + if (Object.prototype.hasOwnProperty.call(paramSet, key)) { + stricted = token; + message = Messages.StrictParamDupe; + } + } else if (!firstRestricted) { + if (isRestrictedWord(token.value)) { + firstRestricted = token; + message = Messages.StrictParamName; + } else if (isStrictModeReservedWord(token.value)) { + firstRestricted = token; + message = Messages.StrictReservedWord; + } else if (Object.prototype.hasOwnProperty.call(paramSet, key)) { + firstRestricted = token; + message = Messages.StrictParamDupe; + } + } + params.push(param); + paramSet[key] = true; + if (match(')')) { + break; + } + expect(','); + } + } + + expect(')'); + + return { + params: params, + stricted: stricted, + firstRestricted: firstRestricted, + message: message + }; + } + + function parseFunctionDeclaration() { + var id, params = [], body, token, stricted, tmp, firstRestricted, message, previousStrict, startToken; + + startToken = lookahead; + + expectKeyword('function'); + token = lookahead; + id = parseVariableIdentifier(); + if (strict) { + if (isRestrictedWord(token.value)) { + throwErrorTolerant(token, Messages.StrictFunctionName); + } + } else { + if (isRestrictedWord(token.value)) { + firstRestricted = token; + message = Messages.StrictFunctionName; + } else if (isStrictModeReservedWord(token.value)) { + firstRestricted = token; + message = Messages.StrictReservedWord; + } + } + + tmp = parseParams(firstRestricted); + params = tmp.params; + stricted = tmp.stricted; + firstRestricted = tmp.firstRestricted; + if (tmp.message) { + message = tmp.message; + } + + previousStrict = strict; + body = parseFunctionSourceElements(); + if (strict && firstRestricted) { + throwError(firstRestricted, message); + } + if (strict && stricted) { + throwErrorTolerant(stricted, message); + } + strict = previousStrict; + + return delegate.markEnd(delegate.createFunctionDeclaration(id, params, [], body), startToken); + } + + function parseFunctionExpression() { + var token, id = null, stricted, firstRestricted, message, tmp, params = [], body, previousStrict, startToken; + + startToken = lookahead; + expectKeyword('function'); + + if (!match('(')) { + token = lookahead; + id = parseVariableIdentifier(); + if (strict) { + if (isRestrictedWord(token.value)) { + throwErrorTolerant(token, Messages.StrictFunctionName); + } + } else { + if (isRestrictedWord(token.value)) { + firstRestricted = token; + message = Messages.StrictFunctionName; + } else if (isStrictModeReservedWord(token.value)) { + firstRestricted = token; + message = Messages.StrictReservedWord; + } + } + } + + tmp = parseParams(firstRestricted); + params = tmp.params; + stricted = tmp.stricted; + firstRestricted = tmp.firstRestricted; + if (tmp.message) { + message = tmp.message; + } + + previousStrict = strict; + body = parseFunctionSourceElements(); + if (strict && firstRestricted) { + throwError(firstRestricted, message); + } + if (strict && stricted) { + throwErrorTolerant(stricted, message); + } + strict = previousStrict; + + return delegate.markEnd(delegate.createFunctionExpression(id, params, [], body), startToken); + } + + // 14 Program + + function parseSourceElement() { + if (lookahead.type === Token.Keyword) { + switch (lookahead.value) { + case 'const': + case 'let': + return parseConstLetDeclaration(lookahead.value); + case 'function': + return parseFunctionDeclaration(); + default: + return parseStatement(); + } + } + + if (lookahead.type !== Token.EOF) { + return parseStatement(); + } + } + + function parseSourceElements() { + var sourceElement, sourceElements = [], token, directive, firstRestricted; + + while (index < length) { + token = lookahead; + if (token.type !== Token.StringLiteral) { + break; + } + + sourceElement = parseSourceElement(); + sourceElements.push(sourceElement); + if (sourceElement.expression.type !== Syntax.Literal) { + // this is not directive + break; + } + directive = source.slice(token.start + 1, token.end - 1); + if (directive === 'use strict') { + strict = true; + if (firstRestricted) { + throwErrorTolerant(firstRestricted, Messages.StrictOctalLiteral); + } + } else { + if (!firstRestricted && token.octal) { + firstRestricted = token; + } + } + } + + while (index < length) { + sourceElement = parseSourceElement(); + /* istanbul ignore if */ + if (typeof sourceElement === 'undefined') { + break; + } + sourceElements.push(sourceElement); + } + return sourceElements; + } + + function parseProgram() { + var body, startToken; + + skipComment(); + peek(); + startToken = lookahead; + strict = false; + + body = parseSourceElements(); + return delegate.markEnd(delegate.createProgram(body), startToken); + } + + function filterTokenLocation() { + var i, entry, token, tokens = []; + + for (i = 0; i < extra.tokens.length; ++i) { + entry = extra.tokens[i]; + token = { + type: entry.type, + value: entry.value + }; + if (extra.range) { + token.range = entry.range; + } + if (extra.loc) { + token.loc = entry.loc; + } + tokens.push(token); + } + + extra.tokens = tokens; + } + + function tokenize(code, options) { + var toString, + token, + tokens; + + toString = String; + if (typeof code !== 'string' && !(code instanceof String)) { + code = toString(code); + } + + delegate = SyntaxTreeDelegate; + source = code; + index = 0; + lineNumber = (source.length > 0) ? 1 : 0; + lineStart = 0; + length = source.length; + lookahead = null; + state = { + allowIn: true, + labelSet: {}, + inFunctionBody: false, + inIteration: false, + inSwitch: false, + lastCommentStart: -1 + }; + + extra = {}; + + // Options matching. + options = options || {}; + + // Of course we collect tokens here. + options.tokens = true; + extra.tokens = []; + extra.tokenize = true; + // The following two fields are necessary to compute the Regex tokens. + extra.openParenToken = -1; + extra.openCurlyToken = -1; + + extra.range = (typeof options.range === 'boolean') && options.range; + extra.loc = (typeof options.loc === 'boolean') && options.loc; + + if (typeof options.comment === 'boolean' && options.comment) { + extra.comments = []; + } + if (typeof options.tolerant === 'boolean' && options.tolerant) { + extra.errors = []; + } + + try { + peek(); + if (lookahead.type === Token.EOF) { + return extra.tokens; + } + + token = lex(); + while (lookahead.type !== Token.EOF) { + try { + token = lex(); + } catch (lexError) { + token = lookahead; + if (extra.errors) { + extra.errors.push(lexError); + // We have to break on the first error + // to avoid infinite loops. + break; + } else { + throw lexError; + } + } + } + + filterTokenLocation(); + tokens = extra.tokens; + if (typeof extra.comments !== 'undefined') { + tokens.comments = extra.comments; + } + if (typeof extra.errors !== 'undefined') { + tokens.errors = extra.errors; + } + } catch (e) { + throw e; + } finally { + extra = {}; + } + return tokens; + } + + function parse(code, options) { + var program, toString; + + toString = String; + if (typeof code !== 'string' && !(code instanceof String)) { + code = toString(code); + } + + delegate = SyntaxTreeDelegate; + source = code; + index = 0; + lineNumber = (source.length > 0) ? 1 : 0; + lineStart = 0; + length = source.length; + lookahead = null; + state = { + allowIn: true, + labelSet: {}, + inFunctionBody: false, + inIteration: false, + inSwitch: false, + lastCommentStart: -1 + }; + + extra = {}; + if (typeof options !== 'undefined') { + extra.range = (typeof options.range === 'boolean') && options.range; + extra.loc = (typeof options.loc === 'boolean') && options.loc; + extra.attachComment = (typeof options.attachComment === 'boolean') && options.attachComment; + + if (extra.loc && options.source !== null && options.source !== undefined) { + extra.source = toString(options.source); + } + + if (typeof options.tokens === 'boolean' && options.tokens) { + extra.tokens = []; + } + if (typeof options.comment === 'boolean' && options.comment) { + extra.comments = []; + } + if (typeof options.tolerant === 'boolean' && options.tolerant) { + extra.errors = []; + } + if (extra.attachComment) { + extra.range = true; + extra.comments = []; + extra.bottomRightStack = []; + extra.trailingComments = []; + extra.leadingComments = []; + } + } + + try { + program = parseProgram(); + if (typeof extra.comments !== 'undefined') { + program.comments = extra.comments; + } + if (typeof extra.tokens !== 'undefined') { + filterTokenLocation(); + program.tokens = extra.tokens; + } + if (typeof extra.errors !== 'undefined') { + program.errors = extra.errors; + } + } catch (e) { + throw e; + } finally { + extra = {}; + } + + return program; + } + + // Sync with *.json manifests. + exports.version = '1.2.5'; + + exports.tokenize = tokenize; + + exports.parse = parse; + + // Deep copy. + /* istanbul ignore next */ + exports.Syntax = (function () { + var name, types = {}; + + if (typeof Object.create === 'function') { + types = Object.create(null); + } + + for (name in Syntax) { + if (Syntax.hasOwnProperty(name)) { + types[name] = Syntax[name]; + } + } + + if (typeof Object.freeze === 'function') { + Object.freeze(types); + } + + return types; + }()); + +})); +/* vim: set sw=4 ts=4 et tw=80 : */ diff --git a/branch/4.04/tools.js b/branch/4.04/tools.js new file mode 100644 index 0000000000000000000000000000000000000000..f898b8058543e2f39a0c5e8a3ede1fce7e61a443 --- /dev/null +++ b/branch/4.04/tools.js @@ -0,0 +1,102 @@ + +// ----------- Lineof ---------------- + +// see "generator/lineof.ml" and "lineof.js" +function lineof(filename, token) { + var f = lineof_data[filename]; + if (f == undefined) { + console.log("could not find lineof for " + filename); + return; + } + var d = f[token]; + if (d == undefined) { + console.log("could not find token " + token + " for " + filename); + return; + } + return { file: filename, + start: {line: d[0], column: d[1]}, + end: {line: d[2], column: d[3]} }; +}; + + +// ----------- Auxiliary -------------- + +String.prototype.replaceAt=function(index, character) { + return this.substr(0, index) + character + this.substr(index+character.length); +} + +// ----------- Datalog ---------------- + +var datalog = []; + +function reset_datalog() { + datalog = []; +} + +// filename assumed to be of js extension +function log_event(filename, token, ctx, type) { + // TODO populate state with object_heap, env_record_heap, fresh_locations, and populate env + + // compute "foo.ml" and "foo.pseudo" from "foo.js" + var len = filename.length; + var base = filename.substr(0, len-2); + var mlfilename = base + "ml"; + var pseudofilename = base + "pseudo"; + + // var len = filename.length; + // var mlfilename = filename.replaceAt(len-2, "m"); + // mlfilename = mlfilename.replaceAt(len-1, "l"); + + var jsloc = lineof(filename, token); + var mlloc = lineof(mlfilename, token); + var pseudoloc = lineof(pseudofilename, token); + + var event = { token: token, locByExt: { "ml": mlloc, "js": jsloc, "pseudo": pseudoloc }, + ctx : ctx, type : type, state: {}, env: {}}; + datalog.push(event); + + // for debug + if (event.type == "return" && + // event.ctx.bindings[0].key == "#RETURN_VALUE#" must be true + event.ctx.bindings[0].val === undefined) { + console.log("Return event carrying undefined"); + console.log(event); + } +} + + + +// ----------- Context ---------------- + + +function ctx_empty() { + return {tag: "ctx_nil"}; +} + +function ctx_push(ctx, bindings) { + // for debug + for (var i = 0; i < bindings.length; i++) { + if (bindings[i].val === undefined) { + console.log("ctx_push with undefined value"); + console.log(ctx); + console.log(bindings); + } + } + + return {tag: "ctx_cons", next: ctx, bindings: bindings}; +} + +function ctx_to_array(ctx) { + var a = []; + + while (ctx.tag === "ctx_cons") { + var b = ctx.bindings; + for (var i = b.length - 1; i >= 0; i--) { + a.push(b[i]); + } + ctx = ctx.next; + } + + return a; +} +