{"version":3,"sources":["webpack://ivprogCore/webpack/universalModuleDefinition","webpack://ivprogCore/webpack/bootstrap","webpack://ivprogCore/./grammar/en/ivprog.g4","webpack://ivprogCore/./grammar/en/langFunctions.js","webpack://ivprogCore/./grammar/en/langLibs.js","webpack://ivprogCore/./grammar/es/ivprog.g4","webpack://ivprogCore/./grammar/es/langFunctions.js","webpack://ivprogCore/./grammar/es/langLibs.js","webpack://ivprogCore/./grammar/index.js","webpack://ivprogCore/./grammar/pt/ivprog.g4","webpack://ivprogCore/./grammar/pt/langFunctions.js","webpack://ivprogCore/./grammar/pt/langLibs.js","webpack://ivprogCore/./i18n/error.csv","webpack://ivprogCore/./i18n/index.ts","webpack://ivprogCore/./i18n/message.csv","webpack://ivprogCore/./i18n/ui.csv","webpack://ivprogCore/./js/assessment/ivprogAssessment.js","webpack://ivprogCore/./js/assessment/output_matching/assessment_result.js","webpack://ivprogCore/./js/assessment/output_matching/output_matching.js","webpack://ivprogCore/./js/assessment/output_matching/output_result.js","webpack://ivprogCore/./js/ast/ast_helpers.js","webpack://ivprogCore/./js/ast/commands/arrayAssign.js","webpack://ivprogCore/./js/ast/commands/arrayDeclaration.js","webpack://ivprogCore/./js/ast/commands/assign.js","webpack://ivprogCore/./js/ast/commands/break.js","webpack://ivprogCore/./js/ast/commands/case.js","webpack://ivprogCore/./js/ast/commands/command.js","webpack://ivprogCore/./js/ast/commands/commandBlock.js","webpack://ivprogCore/./js/ast/commands/declaration.js","webpack://ivprogCore/./js/ast/commands/for.js","webpack://ivprogCore/./js/ast/commands/formalParameter.js","webpack://ivprogCore/./js/ast/commands/function.js","webpack://ivprogCore/./js/ast/commands/ifThenElse.js","webpack://ivprogCore/./js/ast/commands/index.js","webpack://ivprogCore/./js/ast/commands/repeatUntil.js","webpack://ivprogCore/./js/ast/commands/return.js","webpack://ivprogCore/./js/ast/commands/switch.js","webpack://ivprogCore/./js/ast/commands/sysCall.js","webpack://ivprogCore/./js/ast/commands/while.js","webpack://ivprogCore/./js/ast/error/syntaxError.js","webpack://ivprogCore/./js/ast/error/syntaxErrorFactory.js","webpack://ivprogCore/./js/ast/expressions/arrayAccess.js","webpack://ivprogCore/./js/ast/expressions/arrayLiteral.js","webpack://ivprogCore/./js/ast/expressions/boolLiteral.js","webpack://ivprogCore/./js/ast/expressions/expression.js","webpack://ivprogCore/./js/ast/expressions/functionCall.js","webpack://ivprogCore/./js/ast/expressions/index.js","webpack://ivprogCore/./js/ast/expressions/infixApp.js","webpack://ivprogCore/./js/ast/expressions/intLiteral.js","webpack://ivprogCore/./js/ast/expressions/literal.js","webpack://ivprogCore/./js/ast/expressions/realLiteral.js","webpack://ivprogCore/./js/ast/expressions/stringLiteral.js","webpack://ivprogCore/./js/ast/expressions/unaryApp.js","webpack://ivprogCore/./js/ast/expressions/variableLiteral.js","webpack://ivprogCore/./js/ast/ivprogParser.js","webpack://ivprogCore/./js/ast/operators.js","webpack://ivprogCore/./js/ast/sourceInfo.js","webpack://ivprogCore/./js/io/domConsole.js","webpack://ivprogCore/./js/io/input.js","webpack://ivprogCore/./js/io/output.js","webpack://ivprogCore/./js/main.js","webpack://ivprogCore/./js/memory/address.ts","webpack://ivprogCore/./js/memory/location.ts","webpack://ivprogCore/./js/processor/compatibilityTable.js","webpack://ivprogCore/./js/processor/context.ts","webpack://ivprogCore/./js/processor/definedFunctions.js","webpack://ivprogCore/./js/processor/error/processorErrorFactory.js","webpack://ivprogCore/./js/processor/error/runtimeError.js","webpack://ivprogCore/./js/processor/error/semanticError.js","webpack://ivprogCore/./js/processor/ivprogProcessor.js","webpack://ivprogCore/./js/processor/lib/arrays.js","webpack://ivprogCore/./js/processor/lib/io.js","webpack://ivprogCore/./js/processor/lib/lang.js","webpack://ivprogCore/./js/processor/lib/math.js","webpack://ivprogCore/./js/processor/lib/strings.js","webpack://ivprogCore/./js/processor/modes.ts","webpack://ivprogCore/./js/processor/semantic/semanticAnalyser.js","webpack://ivprogCore/./js/processor/store/store.ts","webpack://ivprogCore/./js/processor/store/storeObject.ts","webpack://ivprogCore/./js/processor/store/storeObjectArray.ts","webpack://ivprogCore/./js/processor/store/storeObjectRef.ts","webpack://ivprogCore/./js/processor/store/store_object_array_ref.ts","webpack://ivprogCore/./js/processor/store/value/array_store_value.ts","webpack://ivprogCore/./js/processor/store/value/array_store_value_ref.ts","webpack://ivprogCore/./js/processor/store/value/store_value.ts","webpack://ivprogCore/./js/processor/store/value/store_value_address.ts","webpack://ivprogCore/./js/processor/store/value/store_value_ref.ts","webpack://ivprogCore/./js/runner.js","webpack://ivprogCore/./js/services/i18nHelper.js","webpack://ivprogCore/./js/services/languageService.js","webpack://ivprogCore/./js/services/localizedStringsService.js","webpack://ivprogCore/./js/services/userLog.js","webpack://ivprogCore/./js/typeSystem/array_type.ts","webpack://ivprogCore/./js/typeSystem/multiType.ts","webpack://ivprogCore/./js/typeSystem/parsers.js","webpack://ivprogCore/./js/typeSystem/type.ts","webpack://ivprogCore/./js/typeSystem/types.ts","webpack://ivprogCore/./js/util/auto_gen_output.js","webpack://ivprogCore/./js/util/config.js","webpack://ivprogCore/./js/util/editorMode2.js","webpack://ivprogCore/./js/util/iassignHelpers.js","webpack://ivprogCore/./js/util/inputTest.js","webpack://ivprogCore/./js/util/input_assessment.js","webpack://ivprogCore/./js/util/maybe.ts","webpack://ivprogCore/./js/util/outputTest.js","webpack://ivprogCore/./js/util/string_diff.js","webpack://ivprogCore/./js/util/testConsole.js","webpack://ivprogCore/./js/util/utils.js","webpack://ivprogCore/./js/visualUI/algorithm.js","webpack://ivprogCore/./js/visualUI/code_generator.js","webpack://ivprogCore/./js/visualUI/commands.js","webpack://ivprogCore/./js/visualUI/commands/attribution.js","webpack://ivprogCore/./js/visualUI/commands/break.js","webpack://ivprogCore/./js/visualUI/commands/comment.js","webpack://ivprogCore/./js/visualUI/commands/conditional_expression.js","webpack://ivprogCore/./js/visualUI/commands/contextualized_menu.js","webpack://ivprogCore/./js/visualUI/commands/dowhiletrue.js","webpack://ivprogCore/./js/visualUI/commands/functioncall.js","webpack://ivprogCore/./js/visualUI/commands/generic_expression.js","webpack://ivprogCore/./js/visualUI/commands/iftrue.js","webpack://ivprogCore/./js/visualUI/commands/reader.js","webpack://ivprogCore/./js/visualUI/commands/repeatNtimes.js","webpack://ivprogCore/./js/visualUI/commands/return.js","webpack://ivprogCore/./js/visualUI/commands/switch.js","webpack://ivprogCore/./js/visualUI/commands/variable_value_menu.js","webpack://ivprogCore/./js/visualUI/commands/whiletrue.js","webpack://ivprogCore/./js/visualUI/commands/writer.js","webpack://ivprogCore/./js/visualUI/functions.js","webpack://ivprogCore/./js/visualUI/globals.js","webpack://ivprogCore/./js/visualUI/ivprog_elements.js","webpack://ivprogCore/./js/visualUI/text_editor.js","webpack://ivprogCore/./js/visualUI/types.js","webpack://ivprogCore/./js/visualUI/utils.js","webpack://ivprogCore/./js/visualUI/variables.js"],"names":["main_function","$read","$write","$numElements","$matrixLines","$matrixColumns","$substring","$length","$uppercase","$lowercase","$charAt","$isReal","$isInt","$isBool","$castReal","$castInt","$castBool","$castString","$sin","$cos","$tan","$sqrt","$pow","$log","$abs","$negate","$invert","$max","$min","$rand","$mathLib","$ioLib","$strLib","$arrayLib","$langLib","pt","lexer","PT","langFuncs","PTFuncs","langLibs","PTLibs","en","EN","ENFuncs","ENLibs","es","ES","ESFuncs","ESLibs","LocalizedStrings","LocalizedStringsService","StringTypes","line_i18n","AssessmentConfig","max_instruction_count","suspend_threshold","IVProgAssessment","ast_code","testCases","domConsole","old_config","JSON","parse","stringify","Config","setConfig","partialTests","map","t","name","OutputMatching","IVProgProcessor","input","output","testResult","om","eval","Promise","all","then","results","grade","i","length","result","writeToConsole","DOMConsole","INFO","MESSAGE","generateOutput","status","ERR","ERROR","error_msg","channel","toFixed","error","showErrorMessage","err","message","resolve","errorID","args","getError","msgID","info","getMessage","msgType","msg","getString","processString","USER","write","OutputAssessmentResult","inputs","store","time","template","DETAIL_TEMPLATE","replace","getUI","input_spans","prepareInputList","output_rows","type","formatString","formatNumber","formatBool","prepareOutputTable","failed_text","FAILED_TEMPLATE","input_list","list","INPUT_INFO_TEMPLATE","value","read","join","OUPUT_TABLE_TEMPLATE","assessment_result","prepareResults","page","PAGE_TEMPLATE","result_class","formatOutput","expected_class","generated_class","OUTPUT_TEMPLATE","expected_tmpl","expected","generated_tmpl","generated","EMPTY_OUTPUT_TEMPLATE","final_result","g_string","e_string","diff","StringDiff","diff_vec","part","getDiffStringStyle","diff_string","reduce","prev","actual","text","action","INSERT","DELETE","EQUAL","val","str","RegExp","program","expected_output","test_name","refThis","InputAssessment","gen_output","OutputTest","registerInput","registerOutput","start_time","Date","now","interpretAST","sto","final_time","isInputAvailable","getErrorMessage","g_out","OutputResult","getPotentialOutputType","outputMatch","e_out","push","NUM_REGEX","test","BOOLEAN_REGEX","g_output","e_output","checkStrings","g_num","Decimal","e_num","checkNumbers","g_bool","TypeParser","e_bool","checkBoolean","decimalPlaces","Math","min","dp","ROUND_FLOOR","eq","toNumber","g_bool_text","e_bool_text","e_ouput","assessmentList","e_output_clean","g_output_clean","NUM_IN_STRING_REGEX","expected_numbers","match","generated_numbers","g_val","e_val","trim","numberGrade","r","BOOLEAN_IN_STRING_REGEX","expected_bools","generated_bools","boolGrade","dist","levenshteinDistance","gradeDiff","max","Number","isNaN","assessment_size","gradeAcc","finalGrade","createNumberResult","OutputMatchResult","createBoolResult","createStringResult","recover","_","start","_tokenStartCharIndex","stop","_input","index","getText","getErrorDisplay","line","_tokenStartLine","column","_tokenStartColumn","SyntaxErrorFactory","invalid_character","ArrayIndexAssign","id","lineExpression","columnExpression","expression","Assign","ArrayDeclaration","lines","columns","initial","isConst","Declaration","Command","Break","Case","commands","_sourceInfo","sourceInfo","CommandBlock","variables","For","for_id","for_from","for_to","for_pass","commandBlock","FormalParameter","byRef","Function","returnType","formalParameters","isCompatible","Types","VOID","IfThenElse","condition","ifTrue","ifFalse","RepeatUntil","While","Return","Switch","cases","SysCall","langFunc","SyntaxError","Error","captureStackTrace","createError","message_id","context","Object","freeze","extra_lines","token_missing_one","token","token_missing_list","expectedList","getOR","id_missing","eos_missing","invalid_array_dimension","typeName","invalid_array_size","invalid_main_return","invalid_var_declaration","invalid_break_command","cmdName","invalid_terminal","invalid_type","const_not_init","invalid_id_format","duplicate_function","main_parameters","duplicate_variable","_column","annonymous_array_literal","invalid_matrix_literal_line","exp","cannot_infer_matrix_line","cannot_infer_matrix_column","cannot_infer_vector_size","matrix_to_vector_literal_attr","vector_to_matrix_literal_attr","array_init_not_literal","array_exceeds_2d","invalid_matrix_id_dimension","invalid_vector_init","invalid_matrix_init","ArrayAccess","strLine","toString","strColumn","parenthesis","Expression","ArrayLiteral","valid","strList","arrayLiteral","element","validateSize","validateType","Literal","BoolLiteral","BOOLEAN","convertBoolToString","_parenthesis","flag","FunctionCall","actualParameters","isMainCall","LanguageDefinedFunction","getMainFunctionName","getLocalName","params","strParams","v","InfixApp","op","left","right","l","IntLiteral","INTEGER","convertToString","RealLiteral","REAL","StringLiteral","STRING","UnaryApp","VariableLiteral","UNDEFINED","IVProgParser","lexerClass","LanguageService","getCurrentLexer","inputStream","InputStream","AstHelpers","bind","tokenStream","CommonTokenStream","fill","pos","variableTypes","RK_INTEGER","RK_REAL","RK_BOOLEAN","RK_STRING","functionTypes","concat","RK_VOID","parsingArrayDimension","scope","getCurrentLangFuncs","definedFuncsNameList","definedVariablesStack","parseProgram","LT","BASE","pop","getToken","fetchedEOF","consumeNewLines","globalVars","functions","RK_PROGRAM","checkOpenCurly","pushVariableStack","RK_CONST","isVariableType","parseGlobalVariables","RK_FUNCTION","parseFunction","popVariableStack","checkCloseCurly","isEOF","global","literalNames","attempt","OPEN_CURLY","CLOSE_CURLY","OPEN_BRACE","CLOSE_BRACE","OPEN_PARENTHESIS","CLOSE_PARENTHESIS","eosToken","EOS","functionID","funcIDToken","indexOf","variableID","getCurrentVariableStack","decl","parseMaybeConst","checkEOS","constToken","typeString","parseType","parseDeclaration","getTypeArray","dim1","dim2","dimensions","SourceInfo","createSourceInfo","idString","parseID","checkVariableDuplicate","checkOpenBrace","parseArrayDimension","checkCloseBrace","parseArrayDeclaration","equalsToken","parseExpressionOR","declaration","Commands","commaToken","COMMA","n_lines","n_columns","dim_is_id","Expressions","parseArrayLiteral","isVector","expString","toInt","ArrayType","find","dimToken","getIntLiteral","ID","parseVariable","toReal","toBool","openCurly","invalid_token","beginArray","data","maybeCurlyOpen","parseVectorList","parseExpressionList","endArray","createSourceInfoFromList","dataDim","console","log","lastSize","pushScope","FUNCTION","formalParams","funType","checkFunctionDuplicate","checkOpenParenthesis","checkCloseParenthesis","parseFormalParameters","commandsBlock","parseCommandBlock","func","isMain","popScope","reference","maybeIDToken","RK_REFERENCE","parameter","insideScope","LIB_ID","optionalCurly","variablesDecl","hasOpen","parsedCommand","cmd","parseCommand","Array","lastToken","varType","parseIDCommand","RK_RETURN","parseReturn","RK_WHILE","RK_WHILE_ALT","parseWhile","RK_FOR","RK_FOR_ALT","parseFor","RK_BREAK","BREAKABLE","parseBreak","RK_SWITCH","parseSwitchCase","RK_DO","parseRepeatUntil","RK_IF","parseIfThenElse","casesList","parseCases","whileToken","RK_DO_UNTIL","COMMAND","logicalExpression","cmdBlocks","maybeElse","RK_ELSE","maybeIf","elseBlock","for_token","id_token","parseForParameters","RK_FOR_FROM","RK_FOR_TO","maybePass","RK_FOR_PASS","refToken","isID","parseMaybeLibID","parseExpression","equalToken","equalOrParenthesis","funcCall","parseFunctionCallCommand","keyword_code","from_token","keyword","int_or_id","is_unary_op","SUM_OP","convertFromString","RK_CASE","nextToken","RK_DEFAULT","colonToken","COLON","block","defaultCase","setCommands","aCase","caseToken","exp1","parseExpressionAND","OR_OPERATOR","opToken","or","exp2","finalExp","parseExpressionNot","AND_OPERATOR","and","maybeNotToken","NOT_OPERATOR","not","parseExpressionRel","RELATIONAL_OPERATOR","relToken","rel","factor","parseFactor","sumOpToken","factor2","term","parseTerm","MULTI_OP","multOpToken","term2","getRealLiteral","getStringLiteral","RK_TRUE","RK_FALSE","getBoolLiteral","parseIDTerm","parseParenthesisExp","tokenA","tokenB","firstIndex","secondIndex","parseFunctionCallExpression","getInternalName","parseActualParameters","funcName","getFunctionName","maybeToken","types","x","Operators","ADD","ord","SUB","MULT","DIV","MOD","GT","GE","LE","EQ","NEQ","AND","OR","NOT","size","tokenIndex","elementID","disableMarginTop","cursorInterval","idleInterval","inputDiv","inputCMD","inputSpan","cursorRef","needInput","clearBtn","hideBtn","showBtn","termDiv","anyKey","actualID","substring","parent","document","getElementById","setup","inputListeners","hideInput","pending_writes","last_clear","_setupDom","_setupEvents","addEventListener","clearBtnClick","hideBtnClick","showBtnClick","event","keyCode","which","clearInterval","notifyListeners","_appendUserInput","innerHTML","bashNode","createElement","classList","add","BASH_TEMPLATE","querySelector","INPUT_CARET_TEMPLATE","setAttribute","append","_setupCursor","window","$","popup","content","blinkCaretAndFocus","updateSpanText","stopBlinkCaret","focus","setInterval","style","visibility","scheduleNotify","forEach","splice","_appendText","write_time","pending_write","setTimeout","shift","divClass","getClassForType","textDiv","getOutputText","insertBefore","scrollTerm","INPUT","getUserInputText","scrollTop","scrollHeight","display","top","marginTop","showInput","isElementInViewport","scrollIntoView","removeEventListener","cNode","cloneNode","parentNode","replaceChild","click","callback","split","clearTimeout","clearPendingWrites","parentElement","childNodes","removeChild","firstChild","clear","hide","notifyIdle","idle_input_interval","Input","Output","CodeEditor","initTextEditor","CodeEditorAll","setCode","getCode","updateEditor","disable","i18n","i18nHelper","buildInfixAddTable","table","buildInfixMultiDivSubTable","buildInfixEqualityInequalityTable","buildInfixRelationalTable","buildInfixAndOrTable","buildInfixModTable","buildUnarySumSubList","buildUnaryNegList","buildInfixCompatibilityTable","compatibilityMap","WeakMap","set","buildUnaryCompatibilityTable","infixMap","unaryMap","resultTypeAfterInfixOp","operator","leftExpressionType","rightExpressionType","MultiType","newMulti","typeA","j","typeB","filter","enable_type_casting","resultType","get","undefined","e","TypeError","resultTypeAfterUnaryOp","valueToKey","object","key","prototype","hasOwnProperty","call","concatObjects","obj","libsObject","createSinFun","createCosFun","createTanFun","createSqrtFun","createPowFun","createLogFun","createAbsFun","createNegateFun","createInvertFun","createMaxFun","createMinFun","createRandFun","createInputFun","createOutputFun","createSubstringFun","createLengthFun","createUppercaseFun","createLowercaseFun","createrCharAtFun","createNumElementsFun","createMatrixLinesFun","createMatrixColumnsFun","createIsRealFun","createIsIntFun","createIsBoolFun","createCastRealFun","createCastIntFun","createCastBoolFun","createCastStringFun","funcsObject","localName","names","lib","getCurrentLangLibs","internalName","getFunction","libName","funName","createRuntimeError","i18n_id","RuntimeError","createSemanticError","SemanticError","ProcessorErrorFactory","symbol_not_found_full","symbol_not_found","function_missing_full","function_missing","main_missing","array_dimension_not_int_full","array_dimension_not_int","unknown_command_full","unknown_command","incompatible_types_full","left_type","left_dim","right_type","right_dim","source_info","translateType","incompatible_types","incompatible_types_array_full","dim","incompatible_types_array","loop_condition_type_full","loop_condition_type","endless_loop_full","endless_loop","if_condition_type_full","if_condition_type","invalid_global_var","not_implemented","invalid_case_type_full","invalid_case_type","void_in_expression_full","void_in_expression","invalid_array_access_full","invalid_array_access","invalid_matrix_access_full","invalid_matrix_access","matrix_column_outbounds_full","matrix_column_outbounds","matrix_line_outbounds_full","matrix_line_outbounds","vector_line_outbounds_full","vector_line_outbounds","vector_not_matrix_full","vector_not_matrix","function_no_return","invalid_void_return_full","invalid_void_return","invalid_return_type_full","invalid_return_type","invalid_parameters_size_full","invalid_parameters_size","invalid_parameter_type_full","fun_name","invalid_parameter_type","invalid_ref_full","invalid_ref","unexpected_break_command_full","unexpected_break_command","invalid_array_literal_type_full","invalid_array_literal_type","invalid_array_literal_line_full","invalid_array_literal_line","invalid_array_literal_column_full","invalid_array_literal_column","invalid_unary_op_full","opName","translateOp","invalid_unary_op","invalid_infix_op_full","typeLeft","dimLeft","typeRight","dimRight","invalid_infix_op","array_dimension_not_positive_full","array_dimension_not_positive","invalid_type_conversion","invalid_read_type","invalid_read_type_array","typePos","dimPos","typeArray","dimArray","invalid_const_ref_full","invalid_const_ref","invalid_const_assignment_full","var_id","invalid_const_assignment","invalid_vector_assignment_full","left_id","left_size","right_id","right_size","invalid_vector_assignment","invalid_matrix_assignment_full","left_line","left_column","right_line","right_column","invalid_matrix_assignment","matrix_to_vector_attr","vector_to_matrix_attr","invalid_matrix_index_assign_full","mat_id","mat_line","mat_size","exp_size","invalid_matrix_index_assign","invalid_number_elements_vector","expected_num","actual_num","invalid_number_lines_matrix","divsion_by_zero_full","divsion_by_zero","undefined_tanget_value","negative_log_value","invalid_string_index","local_fun_name","negative_sqrt_value","exceeded_recursive_calls","invalid_for_variable","invalid_for_from","invalid_for_to","invalid_for_pass","exceed_max_instructions","ast","globalStore","Store","stores","Context","forceKill","mode","Modes","RUN","function_call_stack","instruction_count","function_call_count","RETURN","BREAK","prepareState","Location","initGlobal","mainFunc","findMainFunction","reject","runFunction","checkContext","executeCommands","MAIN_INTERNAL_ID","fun","funcStore","extendStore","run_lambda","newFuncStore$","associateParameters","variablesDeclarations","stoWithVars","finalSto","formal_params","effective_params","caller_store","callee_store","promises$","actual_param","evaluateExpression","values","sto_value","shouldTypeCast","formalParameter","canImplicitTypeCast","inStore","realObj","getStoreObject","ref","ArrayStoreValue","array_type","addresses","getLocAddressOf","ArrayStoreValueRef","StoreValueAddress","StoreValueRef","setReferenceDimension","locAddress","insertStore","realValue","doImplicitCasting","cmds","partial","lastCommand","next","nextCommand","executeCommand","command_lambda","PAUSE","ABORT","executeDeclaration","executeArrayIndexAssign","executeAssign","executeBreak","executeReturn","executeIfThenElse","executeRepeatUntil","executeWhile","executeFor","executeSwitch","executeFunctionCall","executeSysCall","findFunction","destroy","caseSequence","tuple","ignoreSwitchCases","isDefault","nSto","equalityInfixApp","stoObj","isEqual","newStore","initCmd","is_forward_exp","is_forward","pass_value","increment","whileBlock","forAsWhile","newCmdList","$newStore","$value","vl","funcType","real_value","stringInfo","applyStore","exp_type_string_info","exp_type_info","updateStore","mustBeArray","used_dims","line$","column$","value$","line_sv","column_sv","actualValue","canAccept","innerType","current_value","getAt","updateStoreArray","executeArrayDeclaration","temp","StoreValue","$lines","$columns","evaluateArrayLiteral","vector_list","expression_lambda","evaluateUnaryApp","evaluateInfixApp","evaluateArrayAccess","evaluateVariableLiteral","evaluateLiteral","evaluateFunctionCall","max_call_stack","$matrix","evaluateMatrix","vectorList","evaluateVector","exps","n_elements","actual_values","exp_str","new_value","vector","vec_type","$line","$column","isArray","c","readOnly","unaryApp","$left","negated","infixApp","$right","shouldImplicitCast","stringInfoLeft","infoLeft","stringInfoRight","infoRight","rightStr","leftStr","plus","minus","times","divToInt","div","leftValue","rightValue","trunc","modulo","gt","gte","lt","lte","numElementsFun","ALL","matrixLinesFun","matrix","matrixColumnsFun","writeFunction","sendOutput","readFunction","request","requestInput","typeToConvert","realObject","getReferenceDimension","arrayInfo","getRefObj","stoValue","isRealFun","parser","createParser","isIntFun","isBoolFun","castRealFun","typeStringInfoArray","typeInfo","castIntFun","floor","castBoolFun","castStringFun","convertToRadians","degrees","acos","sinFun","angle","mod","sin","cosFun","cos","tanFun","tan","sqrtFun","isNeg","sqrt","powFun","y","pow","logFun","isNegative","log10","absFun","abs","negateFun","invertFun","dividedBy","maxFun","numbers","sto_addrs","paramType","minFun","randFun","random","substringFun","end","lengthFun","uppercaseFun","toUpperCase","lowercaseFun","toLowerCase","charAtFun","idx","charAt","SemanticAnalyser","stringCode","semantic","parseTree","analyseTree","symbolMap","currentFunction","n","symbol_map","findSymbol","pushMap","assertDeclarations","f","assertFunction","assertDeclaration","assertArrayDeclaration","insertSymbol","evaluateExpressionType","result_string_info","result_info","lineType","columnType","finalResult","resultTypeLeft","resultTypeRight","evaluateLiteralType","assertParameters","arrayTypeInfo","arrType","literal","last","strInfo","strExp","arrayDeclaration","evaluateVectorLiteralType","line_literal","formalParam","optional","assertReturn","popMap","checkCommand","checkCommands","var_type","from_type","to_type","pass_type","sType","hasDefault","caseType","lineExp","columnExp","exp_type","access_type","compatible","access_type_string_info","access_type_info","getMainFunction","actualParametersList","param","variable","shared","expType","runner","ivprogLexer","editor","JsonEditor","analiser","semAna","proc","load","alert","a","identifier","opts","UI","warn","LanguageServiceExtended","iLMparameters","default_lang","lang","langInfo","Lexers","getLang","getDefaultLang","LanguageServiceNoLS","IVProgLocalizedStrings","langService","langsJsons","shouldListenToChange","type_string","category","Langs","_instance","getInstance","clicks","inRebuildMode","ActionTypes","INSERT_FUNCTION","REMOVE_FUNCTION","INSERT_GLOBAL_VAR","REMOVE_GLOBAL_VAR","RENAME_FUNCTION","RENAME_GLOBAL_VAR","SET_GLOBAL_CONST","CHANGE_FUNCTION_RETURN","CHANGE_GLOBAL_TYPE","CHANGE_GLOBAL_VALUE","INSERT_FUNCTION_PARAM","REMOVE_FUNCTION_PARAM","CHANGE_PARAM_TYPE","RENAME_FUNCTION_PARAM","INSERT_FUNCTION_VAR","REMOVE_FUNCTION_VAR","RENAME_FUNCTION_VAR","CHANGE_VAR_TYPE","CHANGE_VAR_VALUE","INSERT_COMMAND","REMOVE_COMMAND","CHANGE_COMMAND_EXP","CHANGE_ATTRIB_EXP","CHANGE_ATTRIB_VAR","MOVE_COMMAND","ENTER_CHANGE_VAR_NAME","ENTER_CHANGE_VAR_VALUE","ENTER_CHANGE_GLOBAL_NAME","ENTER_CHANGE_GLOBAL_VALUE","ENTER_CHANGE_PARAM_NAME","registerClick","details","registerUserEvent","command","registerEvent","registerSystemEvent","tag","getLogs","setRebuildMode","getLogsAsString","parseLogs","logData","instance","bool","autoGenerateTestCaseOutput","program_text","copyTestCases","assign","analyseFromSource","resultList","InputTest","exec","result_final","inputList","showAlert","outputGenerated","ConfigObject","intConvertRoundMode","MAX_SAFE_INTEGER","config","CodeEditorMode","CodeMirror","indented","align","pushContext","state","col","indent","popContext","typeBefore","stream","prevToken","string","slice","typeAtEndOfLine","indentation","isTopScope","contains","words","word","propertyIsEnumerable","tokenComment","maybeEnd","ch","tokenize","defineMode","parserConfig","indentUnit","statementIndentUnit","dontAlignCalls","keywords","switchKeyword","caseKeyword","defaultKeyword","caseRegex","builtin","blockKeywords","defKeywords","atoms","hooks","multiLineStrings","indentStatements","namespaceSeparator","isPunctuationChar","numberStart","number","isOperatorChar","isIdentifierChar","isReservedIdentifier","curPunc","isDefKeyword","tokenString","tokenBase","backUp","eat","skipToEnd","eatWhile","cur","current","quote","escaped","maybeEOL","typeFirstDefinitions","eol","startState","basecolumn","startOfLine","ctx","sol","eatSpace","styleDefs","textAfter","Pass","firstChar","closing","dontIndentStatements","hook","switchBlock","allmanIndentation","caseTestRegex","electricInput","blockCommentStart","blockCommentEnd","blockCommentContinue","lineComment","fold","codeConfig","getCodeEditorModeConfig","ivprogKeywords","basicTypes","ivprogTypes","ivprogBlockKeywords","blocks","ivprogDefKeywords","def","mimes","prop","helperType","registerHelper","defineMIME","switchString","case_default","modeProps","parseActivityData","algorithm_in_ilm","logs","Maybe","none","some","prepareActivityToStudentHelper","ilm_cont","maybe_content","testcases","setTestCases","prog_type","settings_programming_type","settingsProgrammingType","settingsDataTypes","settings_data_types","settingsCommands","settings_commands","settingsFunctions","settings_functions","algorithmInIlm","settingsFilter","settings_filter","compareArray","b","elementA","elementB","compareTestcases","original","student","elementO","elementS","autoEval","originalData","code","generate","getOrElse","getTestCases","autoAssessment","TestConsole","runTest","DIFF_DELETE","DIFF_INSERT","DIFF_EQUAL","diff_main","text1","text2","cursor_pos","_fix_unicode","editdiff","find_cursor_edit_diff","commonlength","diff_commonPrefix","commonprefix","diff_commonSuffix","commonsuffix","diffs","diff_compute_","unshift","diff_cleanupMerge","longtext","shorttext","hm","diff_halfMatch_","text1_a","text1_b","text2_a","text2_b","mid_common","diffs_a","diffs_b","diff_bisect_","text1_length","text2_length","max_d","ceil","v_offset","v_length","v1","v2","delta","front","k1start","k1end","k2start","k2end","d","k1","k1_offset","x1","y1","k2_offset","x2","diff_bisectSplit_","k2","y2","text1a","text2a","text1b","text2b","diffsb","pointermin","pointermax","pointermid","pointerstart","is_surrogate_pair_start","charCodeAt","pointerend","is_surrogate_pair_end","diff_halfMatchI_","seed","best_common","best_longtext_a","best_longtext_b","best_shorttext_a","best_shorttext_b","prefixLength","suffixLength","hm1","hm2","fix_unicode","pointer","count_delete","count_insert","text_delete","text_insert","previous_equality","ends_with_pair_start","stray","k","starts_with_pair_end","changes","charCode","remove_empty_tuples","tuples","ret","make_edit_splice","before","oldMiddle","newMiddle","after","oldText","newText","oldRange","newRange","oldLength","newLength","oldCursor","oldBefore","oldAfter","maybeNewCursor","editBefore","newCursor","newBefore","newAfter","oldPrefix","newPrefix","editAfter","cursor","oldSuffix","newSuffix","replaceRange","scrollIt","destination","duration","easing","easings","linear","easeInQuad","easeOutQuad","easeInOutQuad","easeInCubic","easeOutCubic","easeInOutCubic","easeInQuart","easeOutQuart","easeInOutQuart","easeInQuint","easeOutQuint","easeInOutQuint","pageYOffset","startTime","performance","getTime","documentHeight","body","offsetHeight","documentElement","clientHeight","windowHeight","innerHeight","getElementsByTagName","destinationOffset","offsetTop","destinationOffsetToScroll","round","scroll","timeFunction","requestAnimationFrame","el","rect","getBoundingClientRect","bottom","innerWidth","clientWidth","cacheMainList","cacheOp","fillCache","mainList","nullLexer","logicOpList","lOp","isKeyword","isValidIdentifier","identifier_str","validRegex","blockList","keywordsList","typeList","atomList","win","openAssessmentDetail","preventDefault","page_code","currentTarget","dataset","close","open","range","startAt","keys","block_render","renderAlgorithm","draging","children","off","empty","program_obj","FunctionsManagement","globals","GlobalsManagement","blockAllEditingOptions","remove","globalsCode","has_error","n_code","functionsCode","function_obj","return_type","TEXT","return_dimensions","parameters_list","parametersCode","variables_list","variablesCode","commandsCode","command_obj","Models","breaksCode","comment","commentsCode","reader","readersCode","writer","writersCode","functioncall","functioncallsCode","attribution","attributionsCode","whiletrue","whiletruesCode","dowhiletrue","doWhilesCode","iftrue","iftruesCode","repeatNtimes","repeatNtimesCode","switchsCode","returnsCode","variable_value_menu","elementExpressionCode","variableValueMenuCode","switchcasesCode","switchcase","commands_block","var_attribution","expression1","expression2","expression3","itens","Utils","dom_object","commands_else","logicExpressionCode","first_operand","exp_logic","exp_arithmetic","arithmeticExpressionCode","equals_to","not_equals_to","second_operand","greater_than","less_than","greater_than_or_equals_to","less_than_or_equals_to","expression_obj","type_op","item","multiplication","division","module","function_called","variable_obj","is_return","translateInternalFunction","row","comment_text","parameter_obj","is_constant","rows","removeCommand","dom_obj","function_container_active","createFloatingCommand","function_container","command_type","mouse_event","floatingObject","BreaksManagement","CommentsManagement","ReadersManagement","WritersManagement","AttributionsManagement","IftruesManagement","RepeatNtimesManagement","WhiletruesManagement","DowhiletruesManagement","SwitchesManagement","FunctioncallsManagement","ReturnsManagement","draggable","appendTo","mouseup","evt","manageCommand","hasClass","originalEvent","srcElement","closest","on","addGhostDiv","elementFromPoint","clientX","clientY","ghostDiv","css","target","pageX","divx","pageY","trigger","active_container","addGhostToEmptyBlock","container","addGhostToNotEmptyBlock","is","containerIf","containerElse","topIfDistance","bottomIfDistance","height","topElseDistance","bottomElseDistance","addGhostToFunctionArea","allfilhos","topDistances","bottomDistances","topD","botD","menorTop","apply","indiceTop","menorBot","indiceBot","insertAfter","undermouse","borderMouseDragCommand","each","removeClass","objLeft","offset","objTop","objRight","width","objBottom","addClass","renderCommand","element_reference","before_after_inside","createdElement","genericCreateCommand","VariableValueMenuManagement","only_value","only_variable","only_function","sc","variable_and_function","dragTrash","trash","fadeIn","fadeOut","findSingleElement","searching","query","findPathRecursive","starter_index","hierarquia_bottom_up","index_command","full_path","hier","parentsUntil","esta_correto","esta_na_div_correta","new_cmd","findNearbyCommandToAddInFunctionScope","hier_find","is_correct_context","sub_elemento","findBeforeOrAfterCommandToAdd","insertCommandInBlockHierar","all_str_path","hier_dom","hier_obj","el_jq","command_parent","recentComand","findNearbyCommandToAddInBlockScope","addCommandToSwitchCase","findBeforeOrAfterCommandToAddInsertBlock","node_list_commands","all_sub","menor_distancia","elemento_menor_distancia","antes","t_bot","t_top","borda_inferior","command_target","temp_parent","is_in_else","d_top","d_bot","findInBlockCorrectPlace","insertCommandInBlock","correct_div","is_in_if","which_case","case_div","findInBlockCorrectPlaceInSwitchCase","VariableValueMenu","addHandlers","ExpressionManagement","manageExpressionElements","ref_object","menu_var_or_value","selectedItem","expression_element","index_to_move","exp_op_exp","op_exp","par_exp_par","renderExpressionElements","expression_div","command_container","renderElement","renderOperator","temp_op","index_op","context_menu","dropdown","onChange","$selectedItem","renderMenuAddExpression","dom_append_menu","expression_append_new_expression","type_exp","temp_exp_1","temp_exp_2","temp_exp","temp_par_1","temp_par_2","renderExpression","menu_add_item","menu_add_item_seq","index_temp","addMenuItens","divs_expression","attribution_dom","CommandsManagement","renderMenuOperations","variable_selected","createExpressionAround","break_dom","renderTextComment","comment_dom","initial_el_to_render","renderStartMenu","main_div","renderLogicExpression","renderArithmeticExpression","restartMenu","renderArithmeticOperator","all_expression","expression_arithmetic","arithmetic_operator","element_to_append","menu_operator","selected","renderLogicOperator","expression_logic","logic_operator","exp_el_par_1","exp_el_expr_el_1","exp_el_expr_operand","exp_el_expr_el_2","exp_el_par_2","start_menu","html","selectOnKeydown","renderMenu","dom_where_render","dom_command","menu_div","addCaseToSwitch","SwitchManagement","ContextualizedMenu","GenericExpressionManagement","dowhiletrue_dom","functioncall_dom","timer","div_to_render","expression_array","WatchJS","unwatch","watch","m","s","types_included","exp_conditional","renderElements","open_or_close","lixeira","posX","posY","Sortable","create","animation","ghostClass","group","put","sort","onStart","onMove","onEnd","onAdd","removeElement","indice","first","opening","div_temp","renderFinalAddElements","renderParenthesis","renderStartAddOperator","renderOperatorMenu","renderAddParenthesis","parentheses_activate","addParentheses","delay","show","actual_target","renderGhostParentheses","floating","comando_que_esta","comando_certo","open_parentheses","close_parentheses","inserir_open","inserir_close","evts","is_correct","index_in_array","count_opened","count_closed","expression_content","position","ghost_parenthesis","menu_final","getArithmeticOperators","getLogicOperators","getRelationalOperators","div_higher","sera","is_last","button","arithmetic_operators","logic_operators","relational_operators","iftrue_dom","reader_dom","togglePasso","var_incrementation","cond_exp","manageClearExpressionElements","repeatNtimes_dom","return_dom","renderCase","casediv","switch_dom","VAR_OR_VALUE_TYPES","variable_and_value_opt","value_and_function","size_field","variable_and_value","addVariablesToMenu","addFunctionsToMenu","addIVProgFunctionsToMenu","variable_fun","isVarInProgram","renderPreviousContent","appendSelectText","ret_function","isFunctionInProgram","function_called_obj","system_functions","var_obj","var_fun","parameters_menu","AttribuitionsManagement","variable_render","openInputToValue","sub_menu","math","arrangement","conversion","is_there","include_constant","openInputToFunction","openInputToVariable","RepeatNTimesManagement","inputWidth","textWidth","tmpStr","function_selected","field","rendered","focusout","fn","font","fakeEl","attr","whiletrue_dom","addHandlersManager","writer_dom","item_div","content_element","handle","newIndex","oldIndex","replaceWith","addHandlerIconAdd","insert_after","after_which","icon_add_item","div_parent_with_handler","new_div_item","new_related_menu","addContent","ref_object_content","counter_new_functions","counter_new_parameters","ivprog_version","VersionInfo","version","globalChangeListeners","functionsChangeListeners","_testCases","isRunning","studentGrade","mainFunction","function_comment","addFunction","generator","CodeManagement","runCodeAssessment","AlgorithmManagement","insertContext","watchW","addFunctionHandler","new_function","renderFunction","addParameter","new_parameter","renderParameter","updateReturnType","new_type","new_dimensions","removeFunction","minimizeFunction","is_hidden","enableNameFunctionUpdate","VariablesManagement","toggle","slideToggle","renderFunctionReturn","function_element","tm","cont","appender","is_main","function_index","updateSequenceLocals","addSortableHandler","updateSequenceParameters","teste","sticky","scrollContext","observeChanges","onStick","onBottom","onUnstick","onReposition","onScroll","isVisible","onTop","elementTop","elementHeight","containerTop","containerHeight","evento_drag","updateProgramObjDrag","nodes","start_index","path_target","index_each","path_relative","indice_na_raiz","is_in_case_switch","command_start_point","block_to_insert","command_in_drag","prepareDragHandler","id_function","n_group","itemEl","to","from","initVisualUI","showStopButton","runCode","showRunButton","stopExecution","toggleVisualCoding","toggleTextualCoding","is_iassign","toggleConsole","full_screen","time_show","listWithHandle","updateSequenceFunction","listGlobalsHandle","updateSequenceGlobals","strCode","settingsProgrammingTypes","TextEditor","getEvaluationCallback","scheduleCall","is_running","removeParameter","parameter_container","updateParameterType","function_name","__","enableNameParameterUpdate","updateParameterName","parameter_var","new_name","parameter_obj_dom","variableNameAlreadyExists","name_var","updateFunctionName","function_var","function_obj_dom","functionNameAlreadyExists","opened_name_parameter","opened_input_parameter","parent_node","input_field","select","opened_name_function","opened_input","previousPadding","addFunctionChangeListener","addGlobalChangeListener","removeGlobalListener","removeFunctionListener","scheduled_call","cancelPendingInputRequests","counter_new_globals","addGlobal","is_from_click","new_global","newe","renderGlobal","toggleConstant","global_var","updateName","global_obj_dom","globalNameAlreadyExists","global_name","updateType","updateInitialValues","removeGlobal","global_container","alternateBooleanGlobalValue","value_container","alternateBooleanGlobalVectorValue","removeGlobalColumnVector","addGlobalColumnVector","removeColumnGlobalMatrix","addColumnGlobalMatrix","removeLineGlobalMatrix","addLineGlobalMatrix","n_l","alternateBooleanGlobalMatrixValue","renderValues","enableGlobalValueUpdate","enableGlobalVectorValueUpdate","enableGlobalMatrixValueUpdate","updateColumnsAndRowsText","enableNameUpdate","ff","complete_element","opened_name_value_matrix_global_v","opened_input_value_matrix_global_v","parseFloat","parseInt","opened_name_value_global_var","opened_input_value_global_ar","changed","opened_name_global","opened_input_global","input_name","opened_name_value_vector_global_","opened_input_value_vector_global_","COMMAND_TYPES","ARITHMETIC_TYPES","EXPRESSION_ELEMENTS","start_point","EXPRESSION_TYPES","ARITHMETIC_COMPARISON","LOGIC_COMPARISON","SYSTEM_FUNCTIONS_CATEGORIES","Variable","SystemFunction","Comment","Reader","Writer","Attribution","ExpressionOperator","ExpressionElement","ConditionalExpression","LogicExpression","has_neg","ArithmeticExpression","IfTrue","RepeatNTimes","WhileTrue","DoWhileTrue","SwitchCase","FunctionCallMenu","Program","function_to_add","function_to_receive","codeEditor","theme","lineNumbers","matchBrackets","autoCloseBrackets","fixedGutter","styleActiveLine","setOption","refresh","setValue","getValue","renderErrorMessage","dom_obj_target","message_text","transition","closable","movePopup","boundary","preserve","className","onHidden","$module","counter_new_variables","addVariable","is_in_click","new_var","renderVariable","variable_obj_dom","removeVariable","variable_container","function_associated","variable_var","alternateBooleanValue","enableValueUpdate","alternateBooleanVectorValue","enableVectorValueUpdate","removeColumnVector","addColumnVector","removeColumnMatrix","addColumnMatrix","removeLineMatrix","addLineMatrix","alternateBooleanMatrixValue","enableMatrixValueUpdate"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;QCVA;QACA;QACA;QACA;QACA;;QAEA;QACA;QACA;QACA,QAAQ,oBAAoB;QAC5B;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA,iBAAiB,4BAA4B;QAC7C;QACA;QACA,kBAAkB,2BAA2B;QAC7C;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;;QAEA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;QAEA;QACA;QACA;QACA;QACA,gBAAgB,uBAAuB;QACvC;;;QAGA;QACA;QACA;QACA;;;;;;;;;;;;;;;;;;;;;;;ACvJA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,cAAc;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,0BAA0B,EAAE;AAC/D,yCAAyC,eAAe;AACxD;AACA;AACA;AACA;AACA;AACA,8DAA8D,+DAA+D;AAC7H;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,GAAG;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oEAAoE;AACpE,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD;AACvD;AACA,6BAA6B,OAAO;AACpC;AACA,aAAa,qBAAqB;AAClC;AACA,yDAAyD;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,+BAA+B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE;AACrE,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,0BAA0B;AACzD,aAAa,0BAA0B;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;;AAEA,mEAAmE,sCAAsC,EAAE;;AAE3G;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A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BI;AA4BbC,MAAI,EAAE,SA5BO;AA6BbC,MAAI,EAAE,SA7BO;AA8BbC,OAAK,EAAE;AA9BM,CAAf,E;;;;;;;;;;;;ACFA;AAAA;;;AAGe;AACbC,UAAQ,EAAE,YADG;AAEbC,QAAM,EAAE,IAFK;AAGbC,SAAO,EAAE,MAHI;AAIbC,WAAS,EAAE,OAJE;AAKbC,UAAQ,EAAE;AALG,CAAf,E;;;;;;;;;;;ACHA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,cAAc;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,0BAA0B,EAAE;AAC/D,yCAAyC,eAAe;AACxD;AACA;AACA;AACA;AACA;AACA,8DAA8D,+DAA+D;AAC7H;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,gDAAgD;AAChD;AACA;AACA,8DAA8D;AAC9D,aAAa;AACb;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,oBAAoB,sBAAsB;AAC9D,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;;AAEA,mEAAmE,sCAAsC,EAAE;;AAE3G;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA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U;AACV;AACA;AACA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,GAAG;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,OAAO;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN,uDAAuD,OAAO;AAC9D;AACA,0CAA0C,qBAAqB;AAC/D;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oEAAoE;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,+BAA+B;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,0BAA0B;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,0BAA0B;AACtE,yBAAyB,0BAA0B;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;;AAEA,mEAAmE,sCAAsC,EAAE;;AAE3G;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,OAAO;AACjE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA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AAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,IAAMuc,UAAU,GAAG;AACjBC,gBAAc,EAAEC,oEADC;AAEjBC,SAAO,EAAED,6DAFQ;AAGjBE,SAAO,EAAEF,6DAHQ;AAIjBG,cAAY,EAAEH,kEAJG;AAKjBI,SAAO,EAAEJ,6DAAqBI;AALb,CAAnB;AAQA,IAAMC,IAAI,GAAGC,+DAAU,CAACD,IAAxB;AACA,IAAMltB,gBAAgB,GAAGC,6EAAA,EAAzB;;;;;;;;;;;;;ACrBa;AACb,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,EAAE;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACba;AACb,8CAA8C,cAAc;AAC5D,kBAAkB,mBAAO,CAAC,yCAAW;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,EAAE;AACjB,iBAAiB,OAAO;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,iBAAiB,QAAQ;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,iBAAiB,OAAO;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA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ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,GAAG;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,GAAG;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,cAAc,+BAA+B,cAAc;AAC1F;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,YAAY;AAC3B,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,GAAG;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,qBAAqB;AAC5D;AACA;AACA;AACA;AACA;AACA,uCAAuC,oBAAoB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA,0FAA0F,GAAG;AAC7F;AACA;AACA;AACA;AACA;AACA,0FAA0F,GAAG;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,cAAc,+BAA+B,cAAc;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,GAAG;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,2BAA2B;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,WAAW;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,GAAG;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACjQa;AACb,8CAA8C,cAAc;AAC5D,mBAAmB,mBAAO,CAAC,sDAAuB;AAClD;AACA;AACA;AACA,eAAe,KAAK;AACpB,eAAe,OAAO;AACtB,eAAe,QAAQ;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC5Da;AACb,8CAA8C,cAAc;AAC5D,sBAAsB,mBAAO,CAAC,0DAAe;AAC7C,4BAA4B,mBAAO,CAAC,kFAA2B;AAC/D,mBAAmB,mBAAO,CAAC,sDAAuB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD;AACvD;AACA;AACA;AACA,uBAAuB,2BAA2B;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,2BAA2B;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,oBAAoB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,oBAAoB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACpIa;AACb,8CAA8C,cAAc;AAC5D,sBAAsB,mBAAO,CAAC,0DAAe;AAC7C;AACA;AACA;AACA,eAAe,YAAY;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC1Ba;AACb,8CAA8C,cAAc;AAC5D,2BAA2B,mBAAO,CAAC,oEAAoB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AClBa;AACb,8CAA8C,cAAc;AAC5D,qBAAqB,mBAAO,CAAC,qEAAgC;AAC7D,8BAA8B,mBAAO,CAAC,gFAAuB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,oBAAoB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,kBAAkB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACpFa;AACb,8CAA8C,cAAc;AA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CvU,IAAzC,CAA8C46D,OAAO,CAAC18D,KAAR,CAAc2oD,GAAd,EAAmBnhD,KAAnB,CAA9C;AACA;;AACDo/D,iBAAW,CAACjjB,GAAZ;AACAijB,iBAAW,CAAC1iB,MAAZ,GAPc,CASd;;AACAwlB,uCAAiC,GAAG,KAApC;AACAC,wCAAkC,GAAG,KAArC;AACA;AACD,GAtDD;AAwDA/C,aAAW,CAACC,MAAZ;AACA,C","file":"main.953c46193185032c68f7.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"ivprogCore\"] = factory();\n\telse\n\t\troot[\"ivprogCore\"] = factory();\n})(window, function() {\nreturn "," \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t\"main\": 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \tvar jsonpArray = window[\"webpackJsonpivprogCore\"] = window[\"webpackJsonpivprogCore\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// add entry module to deferred list\n \tdeferredModules.push([\"./js/main.js\",\"vendors~main\"]);\n \t// run deferred modules when ready\n \treturn checkDeferredModules();\n","module.exports =\n/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// identity function for calling harmony imports with the correct context\n/******/ \t__webpack_require__.i = function(value) { return value; };\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 1);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// Generated from /tmp/tmp-405w9ojosQJhPnz/ivprog.g4 by ANTLR 4.7\n// jshint ignore: start\nvar antlr4 = __webpack_require__(2);\n\n\nvar serializedATN = [\"\\u0003\\u608b\\ua72a\\u8133\\ub9ed\\u417c\\u3be7\\u7786\\u5964\",\n \"\\u00026\\u0207\\b\\u0001\\u0004\\u0002\\t\\u0002\\u0004\\u0003\\t\\u0003\\u0004\",\n \"\\u0004\\t\\u0004\\u0004\\u0005\\t\\u0005\\u0004\\u0006\\t\\u0006\\u0004\\u0007\\t\",\n \"\\u0007\\u0004\\b\\t\\b\\u0004\\t\\t\\t\\u0004\\n\\t\\n\\u0004\\u000b\\t\\u000b\\u0004\",\n \"\\f\\t\\f\\u0004\\r\\t\\r\\u0004\\u000e\\t\\u000e\\u0004\\u000f\\t\\u000f\\u0004\\u0010\",\n \"\\t\\u0010\\u0004\\u0011\\t\\u0011\\u0004\\u0012\\t\\u0012\\u0004\\u0013\\t\\u0013\",\n \"\\u0004\\u0014\\t\\u0014\\u0004\\u0015\\t\\u0015\\u0004\\u0016\\t\\u0016\\u0004\\u0017\",\n \"\\t\\u0017\\u0004\\u0018\\t\\u0018\\u0004\\u0019\\t\\u0019\\u0004\\u001a\\t\\u001a\",\n \"\\u0004\\u001b\\t\\u001b\\u0004\\u001c\\t\\u001c\\u0004\\u001d\\t\\u001d\\u0004\\u001e\",\n \"\\t\\u001e\\u0004\\u001f\\t\\u001f\\u0004 \\t \\u0004!\\t!\\u0004\\\"\\t\\\"\\u0004#\",\n \"\\t#\\u0004$\\t$\\u0004%\\t%\\u0004&\\t&\\u0004\\'\\t\\'\\u0004(\\t(\\u0004)\\t)\\u0004\",\n \"*\\t*\\u0004+\\t+\\u0004,\\t,\\u0004-\\t-\\u0004.\\t.\\u0004/\\t/\\u00040\\t0\\u0004\",\n \"1\\t1\\u00042\\t2\\u00043\\t3\\u00044\\t4\\u00045\\t5\\u00046\\t6\\u00047\\t7\\u0004\",\n \"8\\t8\\u00049\\t9\\u0004:\\t:\\u0004;\\t;\\u0004<\\t<\\u0004=\\t=\\u0004>\\t>\\u0004\",\n \"?\\t?\\u0004@\\t@\\u0003\\u0002\\u0003\\u0002\\u0003\\u0002\\u0003\\u0002\\u0003\",\n \"\\u0002\\u0003\\u0002\\u0003\\u0002\\u0003\\u0002\\u0003\\u0003\\u0003\\u0003\\u0003\",\n \"\\u0003\\u0003\\u0003\\u0003\\u0003\\u0003\\u0004\\u0003\\u0004\\u0003\\u0004\\u0003\",\n \"\\u0004\\u0003\\u0004\\u0003\\u0005\\u0003\\u0005\\u0003\\u0005\\u0003\\u0005\\u0003\",\n \"\\u0005\\u0003\\u0006\\u0003\\u0006\\u0003\\u0006\\u0003\\u0006\\u0003\\u0006\\u0003\",\n \"\\u0006\\u0003\\u0006\\u0003\\u0007\\u0003\\u0007\\u0003\\u0007\\u0003\\u0007\\u0003\",\n \"\\b\\u0003\\b\\u0003\\b\\u0003\\b\\u0003\\b\\u0003\\t\\u0003\\t\\u0003\\t\\u0003\\t\\u0003\",\n \"\\t\\u0003\\t\\u0003\\t\\u0003\\n\\u0003\\n\\u0003\\n\\u0003\\n\\u0003\\n\\u0003\\u000b\",\n \"\\u0003\\u000b\\u0003\\u000b\\u0003\\u000b\\u0003\\u000b\\u0003\\u000b\\u0003\\u000b\",\n \"\\u0003\\u000b\\u0003\\u000b\\u0003\\u000b\\u0003\\f\\u0003\\f\\u0003\\f\\u0003\\f\",\n \"\\u0003\\f\\u0003\\f\\u0003\\r\\u0003\\r\\u0003\\r\\u0003\\r\\u0003\\r\\u0003\\r\\u0003\",\n \"\\r\\u0003\\r\\u0003\\r\\u0003\\u000e\\u0003\\u000e\\u0003\\u000e\\u0003\\u000e\\u0003\",\n \"\\u000e\\u0003\\u000e\\u0003\\u000e\\u0003\\u000f\\u0003\\u000f\\u0003\\u000f\\u0003\",\n \"\\u000f\\u0003\\u0010\\u0003\\u0010\\u0003\\u0010\\u0003\\u0010\\u0003\\u0010\\u0003\",\n \"\\u0010\\u0003\\u0010\\u0003\\u0010\\u0003\\u0010\\u0003\\u0010\\u0003\\u0010\\u0003\",\n \"\\u0011\\u0003\\u0011\\u0003\\u0011\\u0003\\u0011\\u0003\\u0011\\u0003\\u0012\\u0003\",\n \"\\u0012\\u0003\\u0012\\u0003\\u0013\\u0003\\u0013\\u0003\\u0013\\u0003\\u0013\\u0003\",\n \"\\u0013\\u0003\\u0014\\u0003\\u0014\\u0003\\u0014\\u0003\\u0014\\u0003\\u0014\\u0003\",\n \"\\u0014\\u0003\\u0015\\u0003\\u0015\\u0003\\u0015\\u0003\\u0015\\u0003\\u0015\\u0003\",\n \"\\u0015\\u0003\\u0015\\u0003\\u0016\\u0003\\u0016\\u0003\\u0016\\u0003\\u0016\\u0003\",\n \"\\u0016\\u0003\\u0016\\u0003\\u0017\\u0003\\u0017\\u0003\\u0017\\u0003\\u0017\\u0003\",\n \"\\u0017\\u0003\\u0017\\u0003\\u0018\\u0003\\u0018\\u0003\\u0018\\u0003\\u0018\\u0003\",\n \"\\u0018\\u0003\\u0018\\u0003\\u0018\\u0003\\u0018\\u0003\\u0018\\u0003\\u0018\\u0003\",\n \"\\u0018\\u0003\\u0018\\u0003\\u0018\\u0003\\u0019\\u0003\\u0019\\u0003\\u0019\\u0003\",\n \"\\u001a\\u0003\\u001a\\u0003\\u001a\\u0003\\u001a\\u0003\\u001a\\u0003\\u001b\\u0003\",\n \"\\u001b\\u0003\\u001b\\u0003\\u001b\\u0003\\u001b\\u0003\\u001b\\u0003\\u001c\\u0003\",\n \"\\u001c\\u0003\\u001c\\u0003\\u001c\\u0003\\u001c\\u0003\\u001d\\u0003\\u001d\\u0003\",\n \"\\u001d\\u0003\\u001d\\u0003\\u001e\\u0003\\u001e\\u0003\\u001e\\u0003\\u001e\\u0003\",\n \"\\u001f\\u0003\\u001f\\u0003\\u001f\\u0003 \\u0003 \\u0003!\\u0003!\\u0003\\\"\\u0003\",\n \"\\\"\\u0003#\\u0003#\\u0003$\\u0003$\\u0003%\\u0003%\\u0003&\\u0003&\\u0003\\'\\u0003\",\n \"\\'\\u0003(\\u0003(\\u0003(\\u0005(\\u0148\\n(\\u0003)\\u0003)\\u0003*\\u0003*\",\n \"\\u0003+\\u0003+\\u0003,\\u0003,\\u0003-\\u0003-\\u0003-\\u0003-\\u0003-\\u0003\",\n \"-\\u0003-\\u0003-\\u0003-\\u0005-\\u015b\\n-\\u0003.\\u0003.\\u0003/\\u0003/\\u0003\",\n \"0\\u00030\\u00070\\u0163\\n0\\f0\\u000e0\\u0166\\u000b0\\u00031\\u00031\\u0003\",\n \"1\\u00031\\u00032\\u00062\\u016d\\n2\\r2\\u000e2\\u016e\\u00032\\u00032\\u0003\",\n \"2\\u00032\\u00052\\u0175\\n2\\u00032\\u00062\\u0178\\n2\\r2\\u000e2\\u0179\\u0003\",\n \"2\\u00032\\u00032\\u00032\\u00052\\u0180\\n2\\u00032\\u00062\\u0183\\n2\\r2\\u000e\",\n \"2\\u0184\\u00052\\u0187\\n2\\u00033\\u00063\\u018a\\n3\\r3\\u000e3\\u018b\\u0003\",\n \"3\\u00033\\u00063\\u0190\\n3\\r3\\u000e3\\u0191\\u00033\\u00063\\u0195\\n3\\r3\\u000e\",\n \"3\\u0196\\u00033\\u00033\\u00073\\u019b\\n3\\f3\\u000e3\\u019e\\u000b3\\u00033\",\n \"\\u00053\\u01a1\\n3\\u00034\\u00034\\u00054\\u01a5\\n4\\u00034\\u00064\\u01a8\\n\",\n \"4\\r4\\u000e4\\u01a9\\u00035\\u00035\\u00075\\u01ae\\n5\\f5\\u000e5\\u01b1\\u000b\",\n \"5\\u00035\\u00035\\u00036\\u00036\\u00056\\u01b7\\n6\\u00037\\u00037\\u00037\\u0005\",\n \"7\\u01bc\\n7\\u00037\\u00037\\u00038\\u00038\\u00038\\u00038\\u00039\\u00039\\u0003\",\n \":\\u0006:\\u01c7\\n:\\r:\\u000e:\\u01c8\\u0003:\\u0005:\\u01cc\\n:\\u0003;\\u0003\",\n \";\\u0003<\\u0003<\\u0003=\\u0003=\\u0003=\\u0003=\\u0005=\\u01d6\\n=\\u0003>\\u0003\",\n \">\\u0003>\\u0003>\\u0003>\\u0003>\\u0003>\\u0003>\\u0003>\\u0003>\\u0003>\\u0005\",\n \">\\u01e3\\n>\\u0003?\\u0003?\\u0003?\\u0003?\\u0003?\\u0003?\\u0003?\\u0003@\\u0003\",\n \"@\\u0003@\\u0003@\\u0007@\\u01f0\\n@\\f@\\u000e@\\u01f3\\u000b@\\u0003@\\u0005\",\n \"@\\u01f6\\n@\\u0003@\\u0003@\\u0003@\\u0003@\\u0003@\\u0007@\\u01fd\\n@\\f@\\u000e\",\n \"@\\u0200\\u000b@\\u0003@\\u0003@\\u0005@\\u0204\\n@\\u0003@\\u0003@\\u0003\\u01fe\",\n \"\\u0002A\\u0003\\u0003\\u0005\\u0004\\u0007\\u0005\\t\\u0006\\u000b\\u0007\\r\\b\",\n \"\\u000f\\t\\u0011\\n\\u0013\\u000b\\u0015\\f\\u0017\\r\\u0019\\u000e\\u001b\\u000f\",\n \"\\u001d\\u0010\\u001f\\u0011!\\u0012#\\u0013%\\u0014\\'\\u0015)\\u0016+\\u0017\",\n \"-\\u0018/\\u00191\\u001a3\\u001b5\\u001c7\\u001d9\\u0002;\\u0002=\\u0002?\\u001e\",\n \"A\\u001fC E!G\\\"I#K$M%O&Q\\'S(U)W*Y+[,]-_.a/c0e1g\\u0002i2k\\u0002m3o4q\\u0002\",\n \"s5u\\u0002w\\u0002y\\u0002{\\u0002}\\u0002\\u007f6\\u0003\\u0002\\u0012\\u0004\",\n \"\\u0002--//\\u0005\\u0002\\'\\',,11\\u0004\\u0002>>@@\\u0005\\u0002C\\\\aac|\\u0006\",\n \"\\u00022;C\\\\aac|\\u0003\\u00022;\\u0003\\u000223\\u0004\\u0002GGgg\\u0006\\u0002\",\n \"\\f\\f\\u000f\\u000f$$^^\\u0006\\u0002\\f\\f\\u000f\\u000f))^^\\u0004\\u0002\\u000b\",\n \"\\u000b\\\"\\\"\\u0004\\u0002\\f\\f\\u000f\\u000f\\u0005\\u00022;CHch\\u0003\\u0002\",\n \"29\\n\\u0002$$))^^ddhhppttvv\\u0003\\u000225\\u0002\\u021c\\u0002\\u0003\\u0003\",\n \"\\u0002\\u0002\\u0002\\u0002\\u0005\\u0003\\u0002\\u0002\\u0002\\u0002\\u0007\\u0003\",\n \"\\u0002\\u0002\\u0002\\u0002\\t\\u0003\\u0002\\u0002\\u0002\\u0002\\u000b\\u0003\",\n \"\\u0002\\u0002\\u0002\\u0002\\r\\u0003\\u0002\\u0002\\u0002\\u0002\\u000f\\u0003\",\n \"\\u0002\\u0002\\u0002\\u0002\\u0011\\u0003\\u0002\\u0002\\u0002\\u0002\\u0013\\u0003\",\n \"\\u0002\\u0002\\u0002\\u0002\\u0015\\u0003\\u0002\\u0002\\u0002\\u0002\\u0017\\u0003\",\n \"\\u0002\\u0002\\u0002\\u0002\\u0019\\u0003\\u0002\\u0002\\u0002\\u0002\\u001b\\u0003\",\n \"\\u0002\\u0002\\u0002\\u0002\\u001d\\u0003\\u0002\\u0002\\u0002\\u0002\\u001f\\u0003\",\n \"\\u0002\\u0002\\u0002\\u0002!\\u0003\\u0002\\u0002\\u0002\\u0002#\\u0003\\u0002\",\n \"\\u0002\\u0002\\u0002%\\u0003\\u0002\\u0002\\u0002\\u0002\\'\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0002)\\u0003\\u0002\\u0002\\u0002\\u0002+\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0002-\\u0003\\u0002\\u0002\\u0002\\u0002/\\u0003\\u0002\\u0002\\u0002\\u0002\",\n \"1\\u0003\\u0002\\u0002\\u0002\\u00023\\u0003\\u0002\\u0002\\u0002\\u00025\\u0003\",\n \"\\u0002\\u0002\\u0002\\u00027\\u0003\\u0002\\u0002\\u0002\\u0002?\\u0003\\u0002\",\n \"\\u0002\\u0002\\u0002A\\u0003\\u0002\\u0002\\u0002\\u0002C\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0002E\\u0003\\u0002\\u0002\\u0002\\u0002G\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0002I\\u0003\\u0002\\u0002\\u0002\\u0002K\\u0003\\u0002\\u0002\\u0002\\u0002\",\n \"M\\u0003\\u0002\\u0002\\u0002\\u0002O\\u0003\\u0002\\u0002\\u0002\\u0002Q\\u0003\",\n \"\\u0002\\u0002\\u0002\\u0002S\\u0003\\u0002\\u0002\\u0002\\u0002U\\u0003\\u0002\",\n \"\\u0002\\u0002\\u0002W\\u0003\\u0002\\u0002\\u0002\\u0002Y\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0002[\\u0003\\u0002\\u0002\\u0002\\u0002]\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0002_\\u0003\\u0002\\u0002\\u0002\\u0002a\\u0003\\u0002\\u0002\\u0002\\u0002\",\n \"c\\u0003\\u0002\\u0002\\u0002\\u0002e\\u0003\\u0002\\u0002\\u0002\\u0002i\\u0003\",\n \"\\u0002\\u0002\\u0002\\u0002m\\u0003\\u0002\\u0002\\u0002\\u0002o\\u0003\\u0002\",\n \"\\u0002\\u0002\\u0002s\\u0003\\u0002\\u0002\\u0002\\u0002\\u007f\\u0003\\u0002\",\n \"\\u0002\\u0002\\u0003\\u0081\\u0003\\u0002\\u0002\\u0002\\u0005\\u0089\\u0003\\u0002\",\n \"\\u0002\\u0002\\u0007\\u008e\\u0003\\u0002\\u0002\\u0002\\t\\u0093\\u0003\\u0002\",\n \"\\u0002\\u0002\\u000b\\u0098\\u0003\\u0002\\u0002\\u0002\\r\\u009f\\u0003\\u0002\",\n \"\\u0002\\u0002\\u000f\\u00a3\\u0003\\u0002\\u0002\\u0002\\u0011\\u00a8\\u0003\\u0002\",\n \"\\u0002\\u0002\\u0013\\u00af\\u0003\\u0002\\u0002\\u0002\\u0015\\u00b4\\u0003\\u0002\",\n \"\\u0002\\u0002\\u0017\\u00be\\u0003\\u0002\\u0002\\u0002\\u0019\\u00c4\\u0003\\u0002\",\n \"\\u0002\\u0002\\u001b\\u00cd\\u0003\\u0002\\u0002\\u0002\\u001d\\u00d4\\u0003\\u0002\",\n \"\\u0002\\u0002\\u001f\\u00d8\\u0003\\u0002\\u0002\\u0002!\\u00e3\\u0003\\u0002\",\n \"\\u0002\\u0002#\\u00e8\\u0003\\u0002\\u0002\\u0002%\\u00eb\\u0003\\u0002\\u0002\",\n \"\\u0002\\'\\u00f0\\u0003\\u0002\\u0002\\u0002)\\u00f6\\u0003\\u0002\\u0002\\u0002\",\n \"+\\u00fd\\u0003\\u0002\\u0002\\u0002-\\u0103\\u0003\\u0002\\u0002\\u0002/\\u0109\",\n \"\\u0003\\u0002\\u0002\\u00021\\u0116\\u0003\\u0002\\u0002\\u00023\\u0119\\u0003\",\n \"\\u0002\\u0002\\u00025\\u011e\\u0003\\u0002\\u0002\\u00027\\u0124\\u0003\\u0002\",\n \"\\u0002\\u00029\\u0129\\u0003\\u0002\\u0002\\u0002;\\u012d\\u0003\\u0002\\u0002\",\n \"\\u0002=\\u0131\\u0003\\u0002\\u0002\\u0002?\\u0134\\u0003\\u0002\\u0002\\u0002\",\n \"A\\u0136\\u0003\\u0002\\u0002\\u0002C\\u0138\\u0003\\u0002\\u0002\\u0002E\\u013a\",\n \"\\u0003\\u0002\\u0002\\u0002G\\u013c\\u0003\\u0002\\u0002\\u0002I\\u013e\\u0003\",\n \"\\u0002\\u0002\\u0002K\\u0140\\u0003\\u0002\\u0002\\u0002M\\u0142\\u0003\\u0002\",\n \"\\u0002\\u0002O\\u0147\\u0003\\u0002\\u0002\\u0002Q\\u0149\\u0003\\u0002\\u0002\",\n \"\\u0002S\\u014b\\u0003\\u0002\\u0002\\u0002U\\u014d\\u0003\\u0002\\u0002\\u0002\",\n \"W\\u014f\\u0003\\u0002\\u0002\\u0002Y\\u015a\\u0003\\u0002\\u0002\\u0002[\\u015c\",\n \"\\u0003\\u0002\\u0002\\u0002]\\u015e\\u0003\\u0002\\u0002\\u0002_\\u0160\\u0003\",\n \"\\u0002\\u0002\\u0002a\\u0167\\u0003\\u0002\\u0002\\u0002c\\u0186\\u0003\\u0002\",\n \"\\u0002\\u0002e\\u01a0\\u0003\\u0002\\u0002\\u0002g\\u01a2\\u0003\\u0002\\u0002\",\n \"\\u0002i\\u01ab\\u0003\\u0002\\u0002\\u0002k\\u01b6\\u0003\\u0002\\u0002\\u0002\",\n \"m\\u01b8\\u0003\\u0002\\u0002\\u0002o\\u01bf\\u0003\\u0002\\u0002\\u0002q\\u01c3\",\n \"\\u0003\\u0002\\u0002\\u0002s\\u01cb\\u0003\\u0002\\u0002\\u0002u\\u01cd\\u0003\",\n \"\\u0002\\u0002\\u0002w\\u01cf\\u0003\\u0002\\u0002\\u0002y\\u01d5\\u0003\\u0002\",\n \"\\u0002\\u0002{\\u01e2\\u0003\\u0002\\u0002\\u0002}\\u01e4\\u0003\\u0002\\u0002\",\n \"\\u0002\\u007f\\u0203\\u0003\\u0002\\u0002\\u0002\\u0081\\u0082\\u0007r\\u0002\",\n \"\\u0002\\u0082\\u0083\\u0007t\\u0002\\u0002\\u0083\\u0084\\u0007q\\u0002\\u0002\",\n \"\\u0084\\u0085\\u0007i\\u0002\\u0002\\u0085\\u0086\\u0007t\\u0002\\u0002\\u0086\",\n \"\\u0087\\u0007c\\u0002\\u0002\\u0087\\u0088\\u0007o\\u0002\\u0002\\u0088\\u0004\",\n \"\\u0003\\u0002\\u0002\\u0002\\u0089\\u008a\\u0007t\\u0002\\u0002\\u008a\\u008b\",\n \"\\u0007g\\u0002\\u0002\\u008b\\u008c\\u0007c\\u0002\\u0002\\u008c\\u008d\\u0007\",\n \"n\\u0002\\u0002\\u008d\\u0006\\u0003\\u0002\\u0002\\u0002\\u008e\\u008f\\u0007\",\n \"x\\u0002\\u0002\\u008f\\u0090\\u0007q\\u0002\\u0002\\u0090\\u0091\\u0007k\\u0002\",\n \"\\u0002\\u0091\\u0092\\u0007f\\u0002\\u0002\\u0092\\b\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0093\\u0094\\u0007d\\u0002\\u0002\\u0094\\u0095\\u0007q\\u0002\\u0002\\u0095\",\n \"\\u0096\\u0007q\\u0002\\u0002\\u0096\\u0097\\u0007n\\u0002\\u0002\\u0097\\n\\u0003\",\n \"\\u0002\\u0002\\u0002\\u0098\\u0099\\u0007u\\u0002\\u0002\\u0099\\u009a\\u0007\",\n \"v\\u0002\\u0002\\u009a\\u009b\\u0007t\\u0002\\u0002\\u009b\\u009c\\u0007k\\u0002\",\n \"\\u0002\\u009c\\u009d\\u0007p\\u0002\\u0002\\u009d\\u009e\\u0007i\\u0002\\u0002\",\n \"\\u009e\\f\\u0003\\u0002\\u0002\\u0002\\u009f\\u00a0\\u0007k\\u0002\\u0002\\u00a0\",\n \"\\u00a1\\u0007p\\u0002\\u0002\\u00a1\\u00a2\\u0007v\\u0002\\u0002\\u00a2\\u000e\",\n \"\\u0003\\u0002\\u0002\\u0002\\u00a3\\u00a4\\u0007e\\u0002\\u0002\\u00a4\\u00a5\",\n \"\\u0007j\\u0002\\u0002\\u00a5\\u00a6\\u0007c\\u0002\\u0002\\u00a6\\u00a7\\u0007\",\n \"t\\u0002\\u0002\\u00a7\\u0010\\u0003\\u0002\\u0002\\u0002\\u00a8\\u00a9\\u0007\",\n \"u\\u0002\\u0002\\u00a9\\u00aa\\u0007y\\u0002\\u0002\\u00aa\\u00ab\\u0007k\\u0002\",\n \"\\u0002\\u00ab\\u00ac\\u0007v\\u0002\\u0002\\u00ac\\u00ad\\u0007e\\u0002\\u0002\",\n \"\\u00ad\\u00ae\\u0007j\\u0002\\u0002\\u00ae\\u0012\\u0003\\u0002\\u0002\\u0002\",\n \"\\u00af\\u00b0\\u0007e\\u0002\\u0002\\u00b0\\u00b1\\u0007c\\u0002\\u0002\\u00b1\",\n \"\\u00b2\\u0007u\\u0002\\u0002\\u00b2\\u00b3\\u0007g\\u0002\\u0002\\u00b3\\u0014\",\n \"\\u0003\\u0002\\u0002\\u0002\\u00b4\\u00b5\\u0007q\\u0002\\u0002\\u00b5\\u00b6\",\n \"\\u0007v\\u0002\\u0002\\u00b6\\u00b7\\u0007j\\u0002\\u0002\\u00b7\\u00b8\\u0007\",\n \"g\\u0002\\u0002\\u00b8\\u00b9\\u0007t\\u0002\\u0002\\u00b9\\u00ba\\u0007y\\u0002\",\n \"\\u0002\\u00ba\\u00bb\\u0007k\\u0002\\u0002\\u00bb\\u00bc\\u0007u\\u0002\\u0002\",\n \"\\u00bc\\u00bd\\u0007g\\u0002\\u0002\\u00bd\\u0016\\u0003\\u0002\\u0002\\u0002\",\n \"\\u00be\\u00bf\\u0007e\\u0002\\u0002\\u00bf\\u00c0\\u0007q\\u0002\\u0002\\u00c0\",\n \"\\u00c1\\u0007p\\u0002\\u0002\\u00c1\\u00c2\\u0007u\\u0002\\u0002\\u00c2\\u00c3\",\n \"\\u0007v\\u0002\\u0002\\u00c3\\u0018\\u0003\\u0002\\u0002\\u0002\\u00c4\\u00c5\",\n \"\\u0007h\\u0002\\u0002\\u00c5\\u00c6\\u0007w\\u0002\\u0002\\u00c6\\u00c7\\u0007\",\n \"p\\u0002\\u0002\\u00c7\\u00c8\\u0007e\\u0002\\u0002\\u00c8\\u00c9\\u0007v\\u0002\",\n \"\\u0002\\u00c9\\u00ca\\u0007k\\u0002\\u0002\\u00ca\\u00cb\\u0007q\\u0002\\u0002\",\n \"\\u00cb\\u00cc\\u0007p\\u0002\\u0002\\u00cc\\u001a\\u0003\\u0002\\u0002\\u0002\",\n \"\\u00cd\\u00ce\\u0007t\\u0002\\u0002\\u00ce\\u00cf\\u0007g\\u0002\\u0002\\u00cf\",\n \"\\u00d0\\u0007v\\u0002\\u0002\\u00d0\\u00d1\\u0007w\\u0002\\u0002\\u00d1\\u00d2\",\n \"\\u0007t\\u0002\\u0002\\u00d2\\u00d3\\u0007p\\u0002\\u0002\\u00d3\\u001c\\u0003\",\n \"\\u0002\\u0002\\u0002\\u00d4\\u00d5\\u0007h\\u0002\\u0002\\u00d5\\u00d6\\u0007\",\n \"q\\u0002\\u0002\\u00d6\\u00d7\\u0007t\\u0002\\u0002\\u00d7\\u001e\\u0003\\u0002\",\n \"\\u0002\\u0002\\u00d8\\u00d9\\u0007t\\u0002\\u0002\\u00d9\\u00da\\u0007g\\u0002\",\n \"\\u0002\\u00da\\u00db\\u0007r\\u0002\\u0002\\u00db\\u00dc\\u0007g\\u0002\\u0002\",\n \"\\u00dc\\u00dd\\u0007c\\u0002\\u0002\\u00dd\\u00de\\u0007v\\u0002\\u0002\\u00de\",\n \"\\u00df\\u0007a\\u0002\\u0002\\u00df\\u00e0\\u0007h\\u0002\\u0002\\u00e0\\u00e1\",\n \"\\u0007q\\u0002\\u0002\\u00e1\\u00e2\\u0007t\\u0002\\u0002\\u00e2 \\u0003\\u0002\",\n \"\\u0002\\u0002\\u00e3\\u00e4\\u0007h\\u0002\\u0002\\u00e4\\u00e5\\u0007t\\u0002\",\n \"\\u0002\\u00e5\\u00e6\\u0007q\\u0002\\u0002\\u00e6\\u00e7\\u0007o\\u0002\\u0002\",\n \"\\u00e7\\\"\\u0003\\u0002\\u0002\\u0002\\u00e8\\u00e9\\u0007v\\u0002\\u0002\\u00e9\",\n \"\\u00ea\\u0007q\\u0002\\u0002\\u00ea$\\u0003\\u0002\\u0002\\u0002\\u00eb\\u00ec\",\n \"\\u0007r\\u0002\\u0002\\u00ec\\u00ed\\u0007c\\u0002\\u0002\\u00ed\\u00ee\\u0007\",\n \"u\\u0002\\u0002\\u00ee\\u00ef\\u0007u\\u0002\\u0002\\u00ef&\\u0003\\u0002\\u0002\",\n \"\\u0002\\u00f0\\u00f1\\u0007d\\u0002\\u0002\\u00f1\\u00f2\\u0007t\\u0002\\u0002\",\n \"\\u00f2\\u00f3\\u0007g\\u0002\\u0002\\u00f3\\u00f4\\u0007c\\u0002\\u0002\\u00f4\",\n \"\\u00f5\\u0007m\\u0002\\u0002\\u00f5(\\u0003\\u0002\\u0002\\u0002\\u00f6\\u00f7\",\n \"\\u0007t\\u0002\\u0002\\u00f7\\u00f8\\u0007g\\u0002\\u0002\\u00f8\\u00f9\\u0007\",\n \"r\\u0002\\u0002\\u00f9\\u00fa\\u0007g\\u0002\\u0002\\u00fa\\u00fb\\u0007c\\u0002\",\n \"\\u0002\\u00fb\\u00fc\\u0007v\\u0002\\u0002\\u00fc*\\u0003\\u0002\\u0002\\u0002\",\n \"\\u00fd\\u00fe\\u0007w\\u0002\\u0002\\u00fe\\u00ff\\u0007p\\u0002\\u0002\\u00ff\",\n \"\\u0100\\u0007v\\u0002\\u0002\\u0100\\u0101\\u0007k\\u0002\\u0002\\u0101\\u0102\",\n \"\\u0007n\\u0002\\u0002\\u0102,\\u0003\\u0002\\u0002\\u0002\\u0103\\u0104\\u0007\",\n \"y\\u0002\\u0002\\u0104\\u0105\\u0007j\\u0002\\u0002\\u0105\\u0106\\u0007k\\u0002\",\n \"\\u0002\\u0106\\u0107\\u0007n\\u0002\\u0002\\u0107\\u0108\\u0007g\\u0002\\u0002\",\n \"\\u0108.\\u0003\\u0002\\u0002\\u0002\\u0109\\u010a\\u0007t\\u0002\\u0002\\u010a\",\n \"\\u010b\\u0007g\\u0002\\u0002\\u010b\\u010c\\u0007r\\u0002\\u0002\\u010c\\u010d\",\n \"\\u0007g\\u0002\\u0002\\u010d\\u010e\\u0007c\\u0002\\u0002\\u010e\\u010f\\u0007\",\n \"v\\u0002\\u0002\\u010f\\u0110\\u0007a\\u0002\\u0002\\u0110\\u0111\\u0007y\\u0002\",\n \"\\u0002\\u0111\\u0112\\u0007j\\u0002\\u0002\\u0112\\u0113\\u0007k\\u0002\\u0002\",\n \"\\u0113\\u0114\\u0007n\\u0002\\u0002\\u0114\\u0115\\u0007g\\u0002\\u0002\\u0115\",\n \"0\\u0003\\u0002\\u0002\\u0002\\u0116\\u0117\\u0007k\\u0002\\u0002\\u0117\\u0118\",\n \"\\u0007h\\u0002\\u0002\\u01182\\u0003\\u0002\\u0002\\u0002\\u0119\\u011a\\u0007\",\n \"g\\u0002\\u0002\\u011a\\u011b\\u0007n\\u0002\\u0002\\u011b\\u011c\\u0007u\\u0002\",\n \"\\u0002\\u011c\\u011d\\u0007g\\u0002\\u0002\\u011d4\\u0003\\u0002\\u0002\\u0002\",\n \"\\u011e\\u011f\\u0007h\\u0002\\u0002\\u011f\\u0120\\u0007c\\u0002\\u0002\\u0120\",\n \"\\u0121\\u0007n\\u0002\\u0002\\u0121\\u0122\\u0007u\\u0002\\u0002\\u0122\\u0123\",\n \"\\u0007g\\u0002\\u0002\\u01236\\u0003\\u0002\\u0002\\u0002\\u0124\\u0125\\u0007\",\n \"v\\u0002\\u0002\\u0125\\u0126\\u0007t\\u0002\\u0002\\u0126\\u0127\\u0007w\\u0002\",\n \"\\u0002\\u0127\\u0128\\u0007g\\u0002\\u0002\\u01288\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0129\\u012a\\u0007p\\u0002\\u0002\\u012a\\u012b\\u0007q\\u0002\\u0002\\u012b\",\n \"\\u012c\\u0007v\\u0002\\u0002\\u012c:\\u0003\\u0002\\u0002\\u0002\\u012d\\u012e\",\n \"\\u0007C\\u0002\\u0002\\u012e\\u012f\\u0007P\\u0002\\u0002\\u012f\\u0130\\u0007\",\n \"F\\u0002\\u0002\\u0130<\\u0003\\u0002\\u0002\\u0002\\u0131\\u0132\\u0007Q\\u0002\",\n \"\\u0002\\u0132\\u0133\\u0007T\\u0002\\u0002\\u0133>\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0134\\u0135\\u0007(\\u0002\\u0002\\u0135@\\u0003\\u0002\\u0002\\u0002\\u0136\",\n \"\\u0137\\u0007*\\u0002\\u0002\\u0137B\\u0003\\u0002\\u0002\\u0002\\u0138\\u0139\",\n \"\\u0007+\\u0002\\u0002\\u0139D\\u0003\\u0002\\u0002\\u0002\\u013a\\u013b\\u0007\",\n \"]\\u0002\\u0002\\u013bF\\u0003\\u0002\\u0002\\u0002\\u013c\\u013d\\u0007_\\u0002\",\n \"\\u0002\\u013dH\\u0003\\u0002\\u0002\\u0002\\u013e\\u013f\\u0007}\\u0002\\u0002\",\n \"\\u013fJ\\u0003\\u0002\\u0002\\u0002\\u0140\\u0141\\u0007\\u007f\\u0002\\u0002\",\n \"\\u0141L\\u0003\\u0002\\u0002\\u0002\\u0142\\u0143\\u0007.\\u0002\\u0002\\u0143\",\n \"N\\u0003\\u0002\\u0002\\u0002\\u0144\\u0145\\u0007>\\u0002\\u0002\\u0145\\u0148\",\n \"\\u0007/\\u0002\\u0002\\u0146\\u0148\\u0007\\u2192\\u0002\\u0002\\u0147\\u0144\",\n \"\\u0003\\u0002\\u0002\\u0002\\u0147\\u0146\\u0003\\u0002\\u0002\\u0002\\u0148P\",\n \"\\u0003\\u0002\\u0002\\u0002\\u0149\\u014a\\t\\u0002\\u0002\\u0002\\u014aR\\u0003\",\n \"\\u0002\\u0002\\u0002\\u014b\\u014c\\t\\u0003\\u0002\\u0002\\u014cT\\u0003\\u0002\",\n \"\\u0002\\u0002\\u014d\\u014e\\u0005;\\u001e\\u0002\\u014eV\\u0003\\u0002\\u0002\",\n \"\\u0002\\u014f\\u0150\\u0005=\\u001f\\u0002\\u0150X\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0151\\u0152\\u0007@\\u0002\\u0002\\u0152\\u015b\\u0007?\\u0002\\u0002\\u0153\",\n \"\\u0154\\u0007?\\u0002\\u0002\\u0154\\u015b\\u0007?\\u0002\\u0002\\u0155\\u0156\",\n \"\\u0007>\\u0002\\u0002\\u0156\\u015b\\u0007?\\u0002\\u0002\\u0157\\u015b\\t\\u0004\",\n \"\\u0002\\u0002\\u0158\\u0159\\u0007#\\u0002\\u0002\\u0159\\u015b\\u0007?\\u0002\",\n \"\\u0002\\u015a\\u0151\\u0003\\u0002\\u0002\\u0002\\u015a\\u0153\\u0003\\u0002\\u0002\",\n \"\\u0002\\u015a\\u0155\\u0003\\u0002\\u0002\\u0002\\u015a\\u0157\\u0003\\u0002\\u0002\",\n \"\\u0002\\u015a\\u0158\\u0003\\u0002\\u0002\\u0002\\u015bZ\\u0003\\u0002\\u0002\",\n \"\\u0002\\u015c\\u015d\\u0007<\\u0002\\u0002\\u015d\\\\\\u0003\\u0002\\u0002\\u0002\",\n \"\\u015e\\u015f\\u00059\\u001d\\u0002\\u015f^\\u0003\\u0002\\u0002\\u0002\\u0160\",\n \"\\u0164\\t\\u0005\\u0002\\u0002\\u0161\\u0163\\t\\u0006\\u0002\\u0002\\u0162\\u0161\",\n \"\\u0003\\u0002\\u0002\\u0002\\u0163\\u0166\\u0003\\u0002\\u0002\\u0002\\u0164\\u0162\",\n \"\\u0003\\u0002\\u0002\\u0002\\u0164\\u0165\\u0003\\u0002\\u0002\\u0002\\u0165`\",\n \"\\u0003\\u0002\\u0002\\u0002\\u0166\\u0164\\u0003\\u0002\\u0002\\u0002\\u0167\\u0168\",\n \"\\u0005_0\\u0002\\u0168\\u0169\\u00070\\u0002\\u0002\\u0169\\u016a\\u0005_0\\u0002\",\n \"\\u016ab\\u0003\\u0002\\u0002\\u0002\\u016b\\u016d\\t\\u0007\\u0002\\u0002\\u016c\",\n \"\\u016b\\u0003\\u0002\\u0002\\u0002\\u016d\\u016e\\u0003\\u0002\\u0002\\u0002\\u016e\",\n \"\\u016c\\u0003\\u0002\\u0002\\u0002\\u016e\\u016f\\u0003\\u0002\\u0002\\u0002\\u016f\",\n \"\\u0187\\u0003\\u0002\\u0002\\u0002\\u0170\\u0171\\u00072\\u0002\\u0002\\u0171\",\n \"\\u0175\\u0007z\\u0002\\u0002\\u0172\\u0173\\u00072\\u0002\\u0002\\u0173\\u0175\",\n \"\\u0007Z\\u0002\\u0002\\u0174\\u0170\\u0003\\u0002\\u0002\\u0002\\u0174\\u0172\",\n \"\\u0003\\u0002\\u0002\\u0002\\u0175\\u0177\\u0003\\u0002\\u0002\\u0002\\u0176\\u0178\",\n \"\\u0005u;\\u0002\\u0177\\u0176\\u0003\\u0002\\u0002\\u0002\\u0178\\u0179\\u0003\",\n \"\\u0002\\u0002\\u0002\\u0179\\u0177\\u0003\\u0002\\u0002\\u0002\\u0179\\u017a\\u0003\",\n \"\\u0002\\u0002\\u0002\\u017a\\u0187\\u0003\\u0002\\u0002\\u0002\\u017b\\u017c\\u0007\",\n \"2\\u0002\\u0002\\u017c\\u0180\\u0007d\\u0002\\u0002\\u017d\\u017e\\u00072\\u0002\",\n \"\\u0002\\u017e\\u0180\\u0007D\\u0002\\u0002\\u017f\\u017b\\u0003\\u0002\\u0002\",\n \"\\u0002\\u017f\\u017d\\u0003\\u0002\\u0002\\u0002\\u0180\\u0182\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0181\\u0183\\t\\b\\u0002\\u0002\\u0182\\u0181\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0183\\u0184\\u0003\\u0002\\u0002\\u0002\\u0184\\u0182\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0184\\u0185\\u0003\\u0002\\u0002\\u0002\\u0185\\u0187\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0186\\u016c\\u0003\\u0002\\u0002\\u0002\\u0186\\u0174\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0186\\u017f\\u0003\\u0002\\u0002\\u0002\\u0187d\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0188\\u018a\\t\\u0007\\u0002\\u0002\\u0189\\u0188\\u0003\\u0002\\u0002\\u0002\",\n \"\\u018a\\u018b\\u0003\\u0002\\u0002\\u0002\\u018b\\u0189\\u0003\\u0002\\u0002\\u0002\",\n \"\\u018b\\u018c\\u0003\\u0002\\u0002\\u0002\\u018c\\u018d\\u0003\\u0002\\u0002\\u0002\",\n \"\\u018d\\u018f\\u00070\\u0002\\u0002\\u018e\\u0190\\t\\u0007\\u0002\\u0002\\u018f\",\n \"\\u018e\\u0003\\u0002\\u0002\\u0002\\u0190\\u0191\\u0003\\u0002\\u0002\\u0002\\u0191\",\n \"\\u018f\\u0003\\u0002\\u0002\\u0002\\u0191\\u0192\\u0003\\u0002\\u0002\\u0002\\u0192\",\n \"\\u01a1\\u0003\\u0002\\u0002\\u0002\\u0193\\u0195\\t\\u0007\\u0002\\u0002\\u0194\",\n \"\\u0193\\u0003\\u0002\\u0002\\u0002\\u0195\\u0196\\u0003\\u0002\\u0002\\u0002\\u0196\",\n \"\\u0194\\u0003\\u0002\\u0002\\u0002\\u0196\\u0197\\u0003\\u0002\\u0002\\u0002\\u0197\",\n \"\\u0198\\u0003\\u0002\\u0002\\u0002\\u0198\\u019c\\u00070\\u0002\\u0002\\u0199\",\n \"\\u019b\\t\\u0007\\u0002\\u0002\\u019a\\u0199\\u0003\\u0002\\u0002\\u0002\\u019b\",\n \"\\u019e\\u0003\\u0002\\u0002\\u0002\\u019c\\u019a\\u0003\\u0002\\u0002\\u0002\\u019c\",\n \"\\u019d\\u0003\\u0002\\u0002\\u0002\\u019d\\u019f\\u0003\\u0002\\u0002\\u0002\\u019e\",\n \"\\u019c\\u0003\\u0002\\u0002\\u0002\\u019f\\u01a1\\u0005g4\\u0002\\u01a0\\u0189\",\n \"\\u0003\\u0002\\u0002\\u0002\\u01a0\\u0194\\u0003\\u0002\\u0002\\u0002\\u01a1f\",\n \"\\u0003\\u0002\\u0002\\u0002\\u01a2\\u01a4\\t\\t\\u0002\\u0002\\u01a3\\u01a5\\t\\u0002\",\n \"\\u0002\\u0002\\u01a4\\u01a3\\u0003\\u0002\\u0002\\u0002\\u01a4\\u01a5\\u0003\\u0002\",\n \"\\u0002\\u0002\\u01a5\\u01a7\\u0003\\u0002\\u0002\\u0002\\u01a6\\u01a8\\t\\u0007\",\n \"\\u0002\\u0002\\u01a7\\u01a6\\u0003\\u0002\\u0002\\u0002\\u01a8\\u01a9\\u0003\\u0002\",\n \"\\u0002\\u0002\\u01a9\\u01a7\\u0003\\u0002\\u0002\\u0002\\u01a9\\u01aa\\u0003\\u0002\",\n \"\\u0002\\u0002\\u01aah\\u0003\\u0002\\u0002\\u0002\\u01ab\\u01af\\u0007$\\u0002\",\n \"\\u0002\\u01ac\\u01ae\\u0005k6\\u0002\\u01ad\\u01ac\\u0003\\u0002\\u0002\\u0002\",\n \"\\u01ae\\u01b1\\u0003\\u0002\\u0002\\u0002\\u01af\\u01ad\\u0003\\u0002\\u0002\\u0002\",\n \"\\u01af\\u01b0\\u0003\\u0002\\u0002\\u0002\\u01b0\\u01b2\\u0003\\u0002\\u0002\\u0002\",\n \"\\u01b1\\u01af\\u0003\\u0002\\u0002\\u0002\\u01b2\\u01b3\\u0007$\\u0002\\u0002\",\n \"\\u01b3j\\u0003\\u0002\\u0002\\u0002\\u01b4\\u01b7\\n\\n\\u0002\\u0002\\u01b5\\u01b7\",\n \"\\u0005y=\\u0002\\u01b6\\u01b4\\u0003\\u0002\\u0002\\u0002\\u01b6\\u01b5\\u0003\",\n \"\\u0002\\u0002\\u0002\\u01b7l\\u0003\\u0002\\u0002\\u0002\\u01b8\\u01bb\\u0007\",\n \")\\u0002\\u0002\\u01b9\\u01bc\\u0005y=\\u0002\\u01ba\\u01bc\\n\\u000b\\u0002\\u0002\",\n \"\\u01bb\\u01b9\\u0003\\u0002\\u0002\\u0002\\u01bb\\u01ba\\u0003\\u0002\\u0002\\u0002\",\n \"\\u01bc\\u01bd\\u0003\\u0002\\u0002\\u0002\\u01bd\\u01be\\u0007)\\u0002\\u0002\",\n \"\\u01ben\\u0003\\u0002\\u0002\\u0002\\u01bf\\u01c0\\t\\f\\u0002\\u0002\\u01c0\\u01c1\",\n \"\\u0003\\u0002\\u0002\\u0002\\u01c1\\u01c2\\b8\\u0002\\u0002\\u01c2p\\u0003\\u0002\",\n \"\\u0002\\u0002\\u01c3\\u01c4\\u0007=\\u0002\\u0002\\u01c4r\\u0003\\u0002\\u0002\",\n \"\\u0002\\u01c5\\u01c7\\t\\r\\u0002\\u0002\\u01c6\\u01c5\\u0003\\u0002\\u0002\\u0002\",\n \"\\u01c7\\u01c8\\u0003\\u0002\\u0002\\u0002\\u01c8\\u01c6\\u0003\\u0002\\u0002\\u0002\",\n \"\\u01c8\\u01c9\\u0003\\u0002\\u0002\\u0002\\u01c9\\u01cc\\u0003\\u0002\\u0002\\u0002\",\n \"\\u01ca\\u01cc\\u0005q9\\u0002\\u01cb\\u01c6\\u0003\\u0002\\u0002\\u0002\\u01cb\",\n \"\\u01ca\\u0003\\u0002\\u0002\\u0002\\u01cct\\u0003\\u0002\\u0002\\u0002\\u01cd\",\n \"\\u01ce\\t\\u000e\\u0002\\u0002\\u01cev\\u0003\\u0002\\u0002\\u0002\\u01cf\\u01d0\",\n \"\\t\\u000f\\u0002\\u0002\\u01d0x\\u0003\\u0002\\u0002\\u0002\\u01d1\\u01d2\\u0007\",\n \"^\\u0002\\u0002\\u01d2\\u01d6\\t\\u0010\\u0002\\u0002\\u01d3\\u01d6\\u0005}?\\u0002\",\n \"\\u01d4\\u01d6\\u0005{>\\u0002\\u01d5\\u01d1\\u0003\\u0002\\u0002\\u0002\\u01d5\",\n \"\\u01d3\\u0003\\u0002\\u0002\\u0002\\u01d5\\u01d4\\u0003\\u0002\\u0002\\u0002\\u01d6\",\n \"z\\u0003\\u0002\\u0002\\u0002\\u01d7\\u01d8\\u0007^\\u0002\\u0002\\u01d8\\u01d9\",\n \"\\t\\u0011\\u0002\\u0002\\u01d9\\u01da\\u0005w<\\u0002\\u01da\\u01db\\u0005w<\\u0002\",\n \"\\u01db\\u01e3\\u0003\\u0002\\u0002\\u0002\\u01dc\\u01dd\\u0007^\\u0002\\u0002\",\n \"\\u01dd\\u01de\\u0005w<\\u0002\\u01de\\u01df\\u0005w<\\u0002\\u01df\\u01e3\\u0003\",\n \"\\u0002\\u0002\\u0002\\u01e0\\u01e1\\u0007^\\u0002\\u0002\\u01e1\\u01e3\\u0005\",\n \"w<\\u0002\\u01e2\\u01d7\\u0003\\u0002\\u0002\\u0002\\u01e2\\u01dc\\u0003\\u0002\",\n \"\\u0002\\u0002\\u01e2\\u01e0\\u0003\\u0002\\u0002\\u0002\\u01e3|\\u0003\\u0002\",\n \"\\u0002\\u0002\\u01e4\\u01e5\\u0007^\\u0002\\u0002\\u01e5\\u01e6\\u0007w\\u0002\",\n \"\\u0002\\u01e6\\u01e7\\u0005u;\\u0002\\u01e7\\u01e8\\u0005u;\\u0002\\u01e8\\u01e9\",\n \"\\u0005u;\\u0002\\u01e9\\u01ea\\u0005u;\\u0002\\u01ea~\\u0003\\u0002\\u0002\\u0002\",\n \"\\u01eb\\u01ec\\u00071\\u0002\\u0002\\u01ec\\u01ed\\u00071\\u0002\\u0002\\u01ed\",\n \"\\u01f1\\u0003\\u0002\\u0002\\u0002\\u01ee\\u01f0\\n\\r\\u0002\\u0002\\u01ef\\u01ee\",\n \"\\u0003\\u0002\\u0002\\u0002\\u01f0\\u01f3\\u0003\\u0002\\u0002\\u0002\\u01f1\\u01ef\",\n \"\\u0003\\u0002\\u0002\\u0002\\u01f1\\u01f2\\u0003\\u0002\\u0002\\u0002\\u01f2\\u01f5\",\n \"\\u0003\\u0002\\u0002\\u0002\\u01f3\\u01f1\\u0003\\u0002\\u0002\\u0002\\u01f4\\u01f6\",\n \"\\u0007\\u000f\\u0002\\u0002\\u01f5\\u01f4\\u0003\\u0002\\u0002\\u0002\\u01f5\\u01f6\",\n \"\\u0003\\u0002\\u0002\\u0002\\u01f6\\u01f7\\u0003\\u0002\\u0002\\u0002\\u01f7\\u0204\",\n \"\\u0007\\f\\u0002\\u0002\\u01f8\\u01f9\\u00071\\u0002\\u0002\\u01f9\\u01fa\\u0007\",\n \",\\u0002\\u0002\\u01fa\\u01fe\\u0003\\u0002\\u0002\\u0002\\u01fb\\u01fd\\u000b\",\n \"\\u0002\\u0002\\u0002\\u01fc\\u01fb\\u0003\\u0002\\u0002\\u0002\\u01fd\\u0200\\u0003\",\n \"\\u0002\\u0002\\u0002\\u01fe\\u01ff\\u0003\\u0002\\u0002\\u0002\\u01fe\\u01fc\\u0003\",\n \"\\u0002\\u0002\\u0002\\u01ff\\u0201\\u0003\\u0002\\u0002\\u0002\\u0200\\u01fe\\u0003\",\n \"\\u0002\\u0002\\u0002\\u0201\\u0202\\u0007,\\u0002\\u0002\\u0202\\u0204\\u0007\",\n \"1\\u0002\\u0002\\u0203\\u01eb\\u0003\\u0002\\u0002\\u0002\\u0203\\u01f8\\u0003\",\n \"\\u0002\\u0002\\u0002\\u0204\\u0205\\u0003\\u0002\\u0002\\u0002\\u0205\\u0206\\b\",\n \"@\\u0003\\u0002\\u0206\\u0080\\u0003\\u0002\\u0002\\u0002\\u001e\\u0002\\u0147\",\n \"\\u015a\\u0164\\u016e\\u0174\\u0179\\u017f\\u0184\\u0186\\u018b\\u0191\\u0196\\u019c\",\n \"\\u01a0\\u01a4\\u01a9\\u01af\\u01b6\\u01bb\\u01c8\\u01cb\\u01d5\\u01e2\\u01f1\\u01f5\",\n \"\\u01fe\\u0203\\u0004\\b\\u0002\\u0002\\u0002\\u0003\\u0002\"].join(\"\");\n\n\nvar atn = new antlr4.atn.ATNDeserializer().deserialize(serializedATN);\n\nvar decisionsToDFA = atn.decisionToState.map( function(ds, index) { return new antlr4.dfa.DFA(ds, index); });\n\nfunction ivprog(input) {\n\tantlr4.Lexer.call(this, input);\n this._interp = new antlr4.atn.LexerATNSimulator(this, atn, decisionsToDFA, new antlr4.PredictionContextCache());\n return this;\n}\n\nivprog.prototype = Object.create(antlr4.Lexer.prototype);\nivprog.prototype.constructor = ivprog;\n\nivprog.EOF = antlr4.Token.EOF;\nivprog.RK_PROGRAM = 1;\nivprog.RK_REAL = 2;\nivprog.RK_VOID = 3;\nivprog.RK_BOOLEAN = 4;\nivprog.RK_STRING = 5;\nivprog.RK_INTEGER = 6;\nivprog.RK_CHARACTER = 7;\nivprog.RK_SWITCH = 8;\nivprog.RK_CASE = 9;\nivprog.RK_DEFAULT = 10;\nivprog.RK_CONST = 11;\nivprog.RK_FUNCTION = 12;\nivprog.RK_RETURN = 13;\nivprog.RK_FOR = 14;\nivprog.RK_FOR_ALT = 15;\nivprog.RK_FOR_FROM = 16;\nivprog.RK_FOR_TO = 17;\nivprog.RK_FOR_PASS = 18;\nivprog.RK_BREAK = 19;\nivprog.RK_DO = 20;\nivprog.RK_DO_UNTIL = 21;\nivprog.RK_WHILE = 22;\nivprog.RK_WHILE_ALT = 23;\nivprog.RK_IF = 24;\nivprog.RK_ELSE = 25;\nivprog.RK_FALSE = 26;\nivprog.RK_TRUE = 27;\nivprog.RK_REFERENCE = 28;\nivprog.OPEN_PARENTHESIS = 29;\nivprog.CLOSE_PARENTHESIS = 30;\nivprog.OPEN_BRACE = 31;\nivprog.CLOSE_BRACE = 32;\nivprog.OPEN_CURLY = 33;\nivprog.CLOSE_CURLY = 34;\nivprog.COMMA = 35;\nivprog.EQUAL = 36;\nivprog.SUM_OP = 37;\nivprog.MULTI_OP = 38;\nivprog.AND_OPERATOR = 39;\nivprog.OR_OPERATOR = 40;\nivprog.RELATIONAL_OPERATOR = 41;\nivprog.COLON = 42;\nivprog.NOT_OPERATOR = 43;\nivprog.ID = 44;\nivprog.LIB_ID = 45;\nivprog.INTEGER = 46;\nivprog.REAL = 47;\nivprog.STRING = 48;\nivprog.CHARACTER = 49;\nivprog.WHITESPACE = 50;\nivprog.EOS = 51;\nivprog.COMMENTS = 52;\n\nivprog.prototype.channelNames = [ \"DEFAULT_TOKEN_CHANNEL\", \"HIDDEN\" ];\n\nivprog.prototype.modeNames = [ \"DEFAULT_MODE\" ];\n\nivprog.prototype.literalNames = [ null, \"'program'\", \"'real'\", \"'void'\", \n \"'bool'\", \"'string'\", \"'int'\", \"'char'\", \n \"'switch'\", \"'case'\", \"'otherwise'\", \"'const'\", \n \"'function'\", \"'return'\", \"'for'\", \"'repeat_for'\", \n \"'from'\", \"'to'\", \"'pass'\", \"'break'\", \n \"'repeat'\", \"'until'\", \"'while'\", \"'repeat_while'\", \n \"'if'\", \"'else'\", \"'false'\", \"'true'\", \n \"'&'\", \"'('\", \"')'\", \"'['\", \"']'\", \"'{'\", \n \"'}'\", \"','\", null, null, null, null, \n null, null, \"':'\" ];\n\nivprog.prototype.symbolicNames = [ null, \"RK_PROGRAM\", \"RK_REAL\", \"RK_VOID\", \n \"RK_BOOLEAN\", \"RK_STRING\", \"RK_INTEGER\", \n \"RK_CHARACTER\", \"RK_SWITCH\", \"RK_CASE\", \n \"RK_DEFAULT\", \"RK_CONST\", \"RK_FUNCTION\", \n \"RK_RETURN\", \"RK_FOR\", \"RK_FOR_ALT\", \n \"RK_FOR_FROM\", \"RK_FOR_TO\", \"RK_FOR_PASS\", \n \"RK_BREAK\", \"RK_DO\", \"RK_DO_UNTIL\", \"RK_WHILE\", \n \"RK_WHILE_ALT\", \"RK_IF\", \"RK_ELSE\", \"RK_FALSE\", \n \"RK_TRUE\", \"RK_REFERENCE\", \"OPEN_PARENTHESIS\", \n \"CLOSE_PARENTHESIS\", \"OPEN_BRACE\", \"CLOSE_BRACE\", \n \"OPEN_CURLY\", \"CLOSE_CURLY\", \"COMMA\", \n \"EQUAL\", \"SUM_OP\", \"MULTI_OP\", \"AND_OPERATOR\", \n \"OR_OPERATOR\", \"RELATIONAL_OPERATOR\", \n \"COLON\", \"NOT_OPERATOR\", \"ID\", \"LIB_ID\", \n \"INTEGER\", \"REAL\", \"STRING\", \"CHARACTER\", \n \"WHITESPACE\", \"EOS\", \"COMMENTS\" ];\n\nivprog.prototype.ruleNames = [ \"RK_PROGRAM\", \"RK_REAL\", \"RK_VOID\", \"RK_BOOLEAN\", \n \"RK_STRING\", \"RK_INTEGER\", \"RK_CHARACTER\", \n \"RK_SWITCH\", \"RK_CASE\", \"RK_DEFAULT\", \"RK_CONST\", \n \"RK_FUNCTION\", \"RK_RETURN\", \"RK_FOR\", \"RK_FOR_ALT\", \n \"RK_FOR_FROM\", \"RK_FOR_TO\", \"RK_FOR_PASS\", \n \"RK_BREAK\", \"RK_DO\", \"RK_DO_UNTIL\", \"RK_WHILE\", \n \"RK_WHILE_ALT\", \"RK_IF\", \"RK_ELSE\", \"RK_FALSE\", \n \"RK_TRUE\", \"RK_LOGICAL_NOT\", \"RK_LOGICAL_AND\", \n \"RK_LOGICAL_OR\", \"RK_REFERENCE\", \"OPEN_PARENTHESIS\", \n \"CLOSE_PARENTHESIS\", \"OPEN_BRACE\", \"CLOSE_BRACE\", \n \"OPEN_CURLY\", \"CLOSE_CURLY\", \"COMMA\", \"EQUAL\", \n \"SUM_OP\", \"MULTI_OP\", \"AND_OPERATOR\", \"OR_OPERATOR\", \n \"RELATIONAL_OPERATOR\", \"COLON\", \"NOT_OPERATOR\", \n \"ID\", \"LIB_ID\", \"INTEGER\", \"REAL\", \"ExponentPart\", \n \"STRING\", \"STRING_CHARACTER\", \"CHARACTER\", \n \"WHITESPACE\", \"SEMICOLON\", \"EOS\", \"HEX_DIGIT\", \n \"OCTAL_DIGIT\", \"ESC_SEQ\", \"ESC_OCTAL\", \"ESC_UNICODE\", \n \"COMMENTS\" ];\n\nivprog.prototype.grammarFileName = \"ivprog.g4\";\n\n\n\nexports.ivprog = ivprog;\n\n\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = {\nivprog: __webpack_require__(0).ivprog\n};\n\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"antlr4/index\");\n\n/***/ })\n/******/ ]);","/* This is a dictionary of the language defined functions\n**/\nexport default {\n main_function: \"main\",\n $read: \"read\",\n $write: \"write\",\n $numElements: \"total_of_elements\",\n $matrixLines: \"total_of_lines\",\n $matrixColumns: \"total_of_columns\",\n $substring: \"substring\",\n $length: \"length\",\n $uppercase: \"uppercase\",\n $lowercase: \"lowercase\",\n $charAt: \"char_at\",\n $isReal: \"is_real\",\n $isInt: \"is_integer\",\n $isBool: \"is_logic\",\n $castReal: \"to_real\",\n $castInt: \"to_integer\",\n $castBool: \"to_logic\",\n $castString: \"to_string\",\n $sin: \"sin\",\n $cos: \"cos\",\n $tan: \"tan\",\n $sqrt: \"sqrt\",\n $pow: \"pow\",\n $log: \"log\",\n $abs: \"abs\",\n $negate: \"negate\",\n $invert: \"invert\",\n $max: \"maximum\",\n $min: \"minimum\",\n $rand: \"random\"\n\n}","/**\n * This is the dictionary of the language defined libraries\n */\nexport default {\n $mathLib: \"Mathematic\",\n $ioLib: \"IO\",\n $strLib: \"Text\",\n $arrayLib: \"Array\",\n $langLib: \"Conversion\"\n}","module.exports =\n/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// identity function for calling harmony imports with the correct context\n/******/ \t__webpack_require__.i = function(value) { return value; };\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 1);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// Generated from /tmp/tmp-405uNNdAGGYDPmN/ivprog.g4 by ANTLR 4.7\n// jshint ignore: start\nvar antlr4 = __webpack_require__(2);\n\n\nvar serializedATN = [\"\\u0003\\u608b\\ua72a\\u8133\\ub9ed\\u417c\\u3be7\\u7786\\u5964\",\n \"\\u00020\\u01e3\\b\\u0001\\u0004\\u0002\\t\\u0002\\u0004\\u0003\\t\\u0003\\u0004\",\n \"\\u0004\\t\\u0004\\u0004\\u0005\\t\\u0005\\u0004\\u0006\\t\\u0006\\u0004\\u0007\\t\",\n \"\\u0007\\u0004\\b\\t\\b\\u0004\\t\\t\\t\\u0004\\n\\t\\n\\u0004\\u000b\\t\\u000b\\u0004\",\n \"\\f\\t\\f\\u0004\\r\\t\\r\\u0004\\u000e\\t\\u000e\\u0004\\u000f\\t\\u000f\\u0004\\u0010\",\n \"\\t\\u0010\\u0004\\u0011\\t\\u0011\\u0004\\u0012\\t\\u0012\\u0004\\u0013\\t\\u0013\",\n \"\\u0004\\u0014\\t\\u0014\\u0004\\u0015\\t\\u0015\\u0004\\u0016\\t\\u0016\\u0004\\u0017\",\n \"\\t\\u0017\\u0004\\u0018\\t\\u0018\\u0004\\u0019\\t\\u0019\\u0004\\u001a\\t\\u001a\",\n \"\\u0004\\u001b\\t\\u001b\\u0004\\u001c\\t\\u001c\\u0004\\u001d\\t\\u001d\\u0004\\u001e\",\n \"\\t\\u001e\\u0004\\u001f\\t\\u001f\\u0004 \\t \\u0004!\\t!\\u0004\\\"\\t\\\"\\u0004#\",\n \"\\t#\\u0004$\\t$\\u0004%\\t%\\u0004&\\t&\\u0004\\'\\t\\'\\u0004(\\t(\\u0004)\\t)\\u0004\",\n \"*\\t*\\u0004+\\t+\\u0004,\\t,\\u0004-\\t-\\u0004.\\t.\\u0004/\\t/\\u00040\\t0\\u0004\",\n \"1\\t1\\u00042\\t2\\u00043\\t3\\u00044\\t4\\u00045\\t5\\u00046\\t6\\u00047\\t7\\u0004\",\n \"8\\t8\\u00049\\t9\\u0004:\\t:\\u0003\\u0002\\u0003\\u0002\\u0003\\u0002\\u0003\\u0002\",\n \"\\u0003\\u0002\\u0003\\u0002\\u0003\\u0002\\u0003\\u0002\\u0003\\u0002\\u0003\\u0003\",\n \"\\u0003\\u0003\\u0003\\u0003\\u0003\\u0003\\u0003\\u0003\\u0003\\u0004\\u0003\\u0004\",\n \"\\u0003\\u0004\\u0003\\u0004\\u0003\\u0004\\u0003\\u0004\\u0003\\u0005\\u0003\\u0005\",\n \"\\u0003\\u0005\\u0003\\u0005\\u0003\\u0005\\u0003\\u0005\\u0003\\u0005\\u0003\\u0006\",\n \"\\u0003\\u0006\\u0003\\u0006\\u0003\\u0006\\u0003\\u0006\\u0003\\u0006\\u0003\\u0006\",\n \"\\u0003\\u0007\\u0003\\u0007\\u0003\\u0007\\u0003\\u0007\\u0003\\u0007\\u0003\\u0007\",\n \"\\u0003\\u0007\\u0003\\u0007\\u0003\\b\\u0003\\b\\u0003\\b\\u0003\\b\\u0003\\b\\u0003\",\n \"\\b\\u0003\\b\\u0003\\b\\u0003\\b\\u0003\\b\\u0003\\t\\u0003\\t\\u0003\\t\\u0003\\t\\u0003\",\n \"\\t\\u0003\\t\\u0003\\t\\u0003\\t\\u0003\\n\\u0003\\n\\u0003\\n\\u0003\\n\\u0003\\n\\u0003\",\n \"\\u000b\\u0003\\u000b\\u0003\\u000b\\u0003\\u000b\\u0003\\u000b\\u0003\\u000b\\u0003\",\n \"\\u000b\\u0003\\u000b\\u0003\\u000b\\u0003\\u000b\\u0003\\f\\u0003\\f\\u0003\\f\\u0003\",\n \"\\f\\u0003\\f\\u0003\\f\\u0003\\r\\u0003\\r\\u0003\\r\\u0003\\r\\u0003\\r\\u0003\\r\\u0003\",\n \"\\r\\u0003\\u000e\\u0003\\u000e\\u0003\\u000e\\u0003\\u000e\\u0003\\u000e\\u0003\",\n \"\\u000e\\u0003\\u000e\\u0003\\u000e\\u0003\\u000f\\u0003\\u000f\\u0003\\u000f\\u0003\",\n \"\\u000f\\u0003\\u000f\\u0003\\u0010\\u0003\\u0010\\u0003\\u0010\\u0003\\u0010\\u0003\",\n \"\\u0010\\u0003\\u0011\\u0003\\u0011\\u0003\\u0011\\u0003\\u0011\\u0003\\u0011\\u0003\",\n \"\\u0012\\u0003\\u0012\\u0003\\u0012\\u0003\\u0012\\u0003\\u0012\\u0003\\u0012\\u0003\",\n \"\\u0012\\u0003\\u0012\\u0003\\u0012\\u0003\\u0013\\u0003\\u0013\\u0003\\u0013\\u0003\",\n \"\\u0014\\u0003\\u0014\\u0003\\u0014\\u0003\\u0014\\u0003\\u0014\\u0003\\u0014\\u0003\",\n \"\\u0015\\u0003\\u0015\\u0003\\u0015\\u0003\\u0015\\u0003\\u0015\\u0003\\u0015\\u0003\",\n \"\\u0016\\u0003\\u0016\\u0003\\u0016\\u0003\\u0016\\u0003\\u0016\\u0003\\u0016\\u0003\",\n \"\\u0016\\u0003\\u0016\\u0003\\u0016\\u0003\\u0016\\u0003\\u0016\\u0003\\u0017\\u0003\",\n \"\\u0017\\u0003\\u0017\\u0003\\u0017\\u0003\\u0018\\u0003\\u0018\\u0003\\u0019\\u0003\",\n \"\\u0019\\u0003\\u0019\\u0003\\u001a\\u0003\\u001a\\u0003\\u001b\\u0003\\u001b\\u0003\",\n \"\\u001c\\u0003\\u001c\\u0003\\u001d\\u0003\\u001d\\u0003\\u001e\\u0003\\u001e\\u0003\",\n \"\\u001f\\u0003\\u001f\\u0003 \\u0003 \\u0003!\\u0003!\\u0003\\\"\\u0003\\\"\\u0003\",\n \"\\\"\\u0005\\\"\\u0124\\n\\\"\\u0003#\\u0003#\\u0003$\\u0003$\\u0003%\\u0003%\\u0003\",\n \"&\\u0003&\\u0003\\'\\u0003\\'\\u0003\\'\\u0003\\'\\u0003\\'\\u0003\\'\\u0003\\'\\u0003\",\n \"\\'\\u0003\\'\\u0005\\'\\u0137\\n\\'\\u0003(\\u0003(\\u0003)\\u0003)\\u0003*\\u0003\",\n \"*\\u0007*\\u013f\\n*\\f*\\u000e*\\u0142\\u000b*\\u0003+\\u0003+\\u0003+\\u0003\",\n \"+\\u0003,\\u0006,\\u0149\\n,\\r,\\u000e,\\u014a\\u0003,\\u0003,\\u0003,\\u0003\",\n \",\\u0005,\\u0151\\n,\\u0003,\\u0006,\\u0154\\n,\\r,\\u000e,\\u0155\\u0003,\\u0003\",\n \",\\u0003,\\u0003,\\u0005,\\u015c\\n,\\u0003,\\u0006,\\u015f\\n,\\r,\\u000e,\\u0160\",\n \"\\u0005,\\u0163\\n,\\u0003-\\u0006-\\u0166\\n-\\r-\\u000e-\\u0167\\u0003-\\u0003\",\n \"-\\u0006-\\u016c\\n-\\r-\\u000e-\\u016d\\u0003-\\u0006-\\u0171\\n-\\r-\\u000e-\\u0172\",\n \"\\u0003-\\u0003-\\u0007-\\u0177\\n-\\f-\\u000e-\\u017a\\u000b-\\u0003-\\u0005-\",\n \"\\u017d\\n-\\u0003.\\u0003.\\u0005.\\u0181\\n.\\u0003.\\u0006.\\u0184\\n.\\r.\\u000e\",\n \".\\u0185\\u0003/\\u0003/\\u0007/\\u018a\\n/\\f/\\u000e/\\u018d\\u000b/\\u0003/\",\n \"\\u0003/\\u00030\\u00030\\u00050\\u0193\\n0\\u00031\\u00031\\u00031\\u00051\\u0198\",\n \"\\n1\\u00031\\u00031\\u00032\\u00032\\u00032\\u00032\\u00033\\u00033\\u00034\\u0006\",\n \"4\\u01a3\\n4\\r4\\u000e4\\u01a4\\u00034\\u00054\\u01a8\\n4\\u00035\\u00035\\u0003\",\n \"6\\u00036\\u00037\\u00037\\u00037\\u00037\\u00057\\u01b2\\n7\\u00038\\u00038\\u0003\",\n \"8\\u00038\\u00038\\u00038\\u00038\\u00038\\u00038\\u00038\\u00038\\u00058\\u01bf\",\n \"\\n8\\u00039\\u00039\\u00039\\u00039\\u00039\\u00039\\u00039\\u0003:\\u0003:\\u0003\",\n \":\\u0003:\\u0007:\\u01cc\\n:\\f:\\u000e:\\u01cf\\u000b:\\u0003:\\u0005:\\u01d2\",\n \"\\n:\\u0003:\\u0003:\\u0003:\\u0003:\\u0003:\\u0007:\\u01d9\\n:\\f:\\u000e:\\u01dc\",\n \"\\u000b:\\u0003:\\u0003:\\u0005:\\u01e0\\n:\\u0003:\\u0003:\\u0003\\u01da\\u0002\",\n \";\\u0003\\u0003\\u0005\\u0004\\u0007\\u0005\\t\\u0006\\u000b\\u0007\\r\\b\\u000f\",\n \"\\t\\u0011\\n\\u0013\\u000b\\u0015\\f\\u0017\\r\\u0019\\u000e\\u001b\\u000f\\u001d\",\n \"\\u0010\\u001f\\u0011!\\u0012#\\u0013%\\u0014\\'\\u0015)\\u0016+\\u0017-\\u0002\",\n \"/\\u00021\\u00023\\u00185\\u00197\\u001a9\\u001b;\\u001c=\\u001d?\\u001eA\\u001f\",\n \"C E!G\\\"I#K$M%O&Q\\'S(U)W*Y+[\\u0002],_\\u0002a-c.e\\u0002g/i\\u0002k\\u0002\",\n \"m\\u0002o\\u0002q\\u0002s0\\u0003\\u0002\\u0012\\u0004\\u0002--//\\u0005\\u0002\",\n \"\\'\\',,11\\u0004\\u0002>>@@\\u0005\\u0002C\\\\aac|\\u0006\\u00022;C\\\\aac|\\u0003\",\n \"\\u00022;\\u0003\\u000223\\u0004\\u0002GGgg\\u0006\\u0002\\f\\f\\u000f\\u000f$\",\n \"$^^\\u0006\\u0002\\f\\f\\u000f\\u000f))^^\\u0004\\u0002\\u000b\\u000b\\\"\\\"\\u0004\",\n \"\\u0002\\f\\f\\u000f\\u000f\\u0005\\u00022;CHch\\u0003\\u000229\\n\\u0002$$))^\",\n \"^ddhhppttvv\\u0003\\u000225\\u0002\\u01f8\\u0002\\u0003\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0002\\u0005\\u0003\\u0002\\u0002\\u0002\\u0002\\u0007\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0002\\t\\u0003\\u0002\\u0002\\u0002\\u0002\\u000b\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0002\\r\\u0003\\u0002\\u0002\\u0002\\u0002\\u000f\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0002\\u0011\\u0003\\u0002\\u0002\\u0002\\u0002\\u0013\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0002\\u0015\\u0003\\u0002\\u0002\\u0002\\u0002\\u0017\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0002\\u0019\\u0003\\u0002\\u0002\\u0002\\u0002\\u001b\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0002\\u001d\\u0003\\u0002\\u0002\\u0002\\u0002\\u001f\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0002!\\u0003\\u0002\\u0002\\u0002\\u0002#\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0002%\\u0003\\u0002\\u0002\\u0002\\u0002\\'\\u0003\\u0002\\u0002\\u0002\\u0002\",\n \")\\u0003\\u0002\\u0002\\u0002\\u0002+\\u0003\\u0002\\u0002\\u0002\\u00023\\u0003\",\n \"\\u0002\\u0002\\u0002\\u00025\\u0003\\u0002\\u0002\\u0002\\u00027\\u0003\\u0002\",\n \"\\u0002\\u0002\\u00029\\u0003\\u0002\\u0002\\u0002\\u0002;\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0002=\\u0003\\u0002\\u0002\\u0002\\u0002?\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0002A\\u0003\\u0002\\u0002\\u0002\\u0002C\\u0003\\u0002\\u0002\\u0002\\u0002\",\n \"E\\u0003\\u0002\\u0002\\u0002\\u0002G\\u0003\\u0002\\u0002\\u0002\\u0002I\\u0003\",\n \"\\u0002\\u0002\\u0002\\u0002K\\u0003\\u0002\\u0002\\u0002\\u0002M\\u0003\\u0002\",\n \"\\u0002\\u0002\\u0002O\\u0003\\u0002\\u0002\\u0002\\u0002Q\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0002S\\u0003\\u0002\\u0002\\u0002\\u0002U\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0002W\\u0003\\u0002\\u0002\\u0002\\u0002Y\\u0003\\u0002\\u0002\\u0002\\u0002\",\n \"]\\u0003\\u0002\\u0002\\u0002\\u0002a\\u0003\\u0002\\u0002\\u0002\\u0002c\\u0003\",\n \"\\u0002\\u0002\\u0002\\u0002g\\u0003\\u0002\\u0002\\u0002\\u0002s\\u0003\\u0002\",\n \"\\u0002\\u0002\\u0003u\\u0003\\u0002\\u0002\\u0002\\u0005~\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0007\\u0083\\u0003\\u0002\\u0002\\u0002\\t\\u0089\\u0003\\u0002\\u0002\",\n \"\\u0002\\u000b\\u0090\\u0003\\u0002\\u0002\\u0002\\r\\u0097\\u0003\\u0002\\u0002\",\n \"\\u0002\\u000f\\u009f\\u0003\\u0002\\u0002\\u0002\\u0011\\u00a9\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0013\\u00b1\\u0003\\u0002\\u0002\\u0002\\u0015\\u00b6\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0017\\u00c0\\u0003\\u0002\\u0002\\u0002\\u0019\\u00c6\\u0003\\u0002\\u0002\",\n \"\\u0002\\u001b\\u00cd\\u0003\\u0002\\u0002\\u0002\\u001d\\u00d5\\u0003\\u0002\\u0002\",\n \"\\u0002\\u001f\\u00da\\u0003\\u0002\\u0002\\u0002!\\u00df\\u0003\\u0002\\u0002\",\n \"\\u0002#\\u00e4\\u0003\\u0002\\u0002\\u0002%\\u00ed\\u0003\\u0002\\u0002\\u0002\",\n \"\\'\\u00f0\\u0003\\u0002\\u0002\\u0002)\\u00f6\\u0003\\u0002\\u0002\\u0002+\\u00fc\",\n \"\\u0003\\u0002\\u0002\\u0002-\\u0107\\u0003\\u0002\\u0002\\u0002/\\u010b\\u0003\",\n \"\\u0002\\u0002\\u00021\\u010d\\u0003\\u0002\\u0002\\u00023\\u0110\\u0003\\u0002\",\n \"\\u0002\\u00025\\u0112\\u0003\\u0002\\u0002\\u00027\\u0114\\u0003\\u0002\\u0002\",\n \"\\u00029\\u0116\\u0003\\u0002\\u0002\\u0002;\\u0118\\u0003\\u0002\\u0002\\u0002\",\n \"=\\u011a\\u0003\\u0002\\u0002\\u0002?\\u011c\\u0003\\u0002\\u0002\\u0002A\\u011e\",\n \"\\u0003\\u0002\\u0002\\u0002C\\u0123\\u0003\\u0002\\u0002\\u0002E\\u0125\\u0003\",\n \"\\u0002\\u0002\\u0002G\\u0127\\u0003\\u0002\\u0002\\u0002I\\u0129\\u0003\\u0002\",\n \"\\u0002\\u0002K\\u012b\\u0003\\u0002\\u0002\\u0002M\\u0136\\u0003\\u0002\\u0002\",\n \"\\u0002O\\u0138\\u0003\\u0002\\u0002\\u0002Q\\u013a\\u0003\\u0002\\u0002\\u0002\",\n \"S\\u013c\\u0003\\u0002\\u0002\\u0002U\\u0143\\u0003\\u0002\\u0002\\u0002W\\u0162\",\n \"\\u0003\\u0002\\u0002\\u0002Y\\u017c\\u0003\\u0002\\u0002\\u0002[\\u017e\\u0003\",\n \"\\u0002\\u0002\\u0002]\\u0187\\u0003\\u0002\\u0002\\u0002_\\u0192\\u0003\\u0002\",\n \"\\u0002\\u0002a\\u0194\\u0003\\u0002\\u0002\\u0002c\\u019b\\u0003\\u0002\\u0002\",\n \"\\u0002e\\u019f\\u0003\\u0002\\u0002\\u0002g\\u01a7\\u0003\\u0002\\u0002\\u0002\",\n \"i\\u01a9\\u0003\\u0002\\u0002\\u0002k\\u01ab\\u0003\\u0002\\u0002\\u0002m\\u01b1\",\n \"\\u0003\\u0002\\u0002\\u0002o\\u01be\\u0003\\u0002\\u0002\\u0002q\\u01c0\\u0003\",\n \"\\u0002\\u0002\\u0002s\\u01df\\u0003\\u0002\\u0002\\u0002uv\\u0007r\\u0002\\u0002\",\n \"vw\\u0007t\\u0002\\u0002wx\\u0007q\\u0002\\u0002xy\\u0007i\\u0002\\u0002yz\\u0007\",\n \"t\\u0002\\u0002z{\\u0007c\\u0002\\u0002{|\\u0007o\\u0002\\u0002|}\\u0007c\\u0002\",\n \"\\u0002}\\u0004\\u0003\\u0002\\u0002\\u0002~\\u007f\\u0007t\\u0002\\u0002\\u007f\",\n \"\\u0080\\u0007g\\u0002\\u0002\\u0080\\u0081\\u0007c\\u0002\\u0002\\u0081\\u0082\",\n \"\\u0007n\\u0002\\u0002\\u0082\\u0006\\u0003\\u0002\\u0002\\u0002\\u0083\\u0084\",\n \"\\u0007x\\u0002\\u0002\\u0084\\u0085\\u0007c\\u0002\\u0002\\u0085\\u0086\\u0007\",\n \"|\\u0002\\u0002\\u0086\\u0087\\u0007k\\u0002\\u0002\\u0087\\u0088\\u0007q\\u0002\",\n \"\\u0002\\u0088\\b\\u0003\\u0002\\u0002\\u0002\\u0089\\u008a\\u0007n\\u0002\\u0002\",\n \"\\u008a\\u008b\\u0007q\\u0002\\u0002\\u008b\\u008c\\u0007i\\u0002\\u0002\\u008c\",\n \"\\u008d\\u0007k\\u0002\\u0002\\u008d\\u008e\\u0007e\\u0002\\u0002\\u008e\\u008f\",\n \"\\u0007q\\u0002\\u0002\\u008f\\n\\u0003\\u0002\\u0002\\u0002\\u0090\\u0091\\u0007\",\n \"e\\u0002\\u0002\\u0091\\u0092\\u0007c\\u0002\\u0002\\u0092\\u0093\\u0007f\\u0002\",\n \"\\u0002\\u0093\\u0094\\u0007g\\u0002\\u0002\\u0094\\u0095\\u0007k\\u0002\\u0002\",\n \"\\u0095\\u0096\\u0007c\\u0002\\u0002\\u0096\\f\\u0003\\u0002\\u0002\\u0002\\u0097\",\n \"\\u0098\\u0007k\\u0002\\u0002\\u0098\\u0099\\u0007p\\u0002\\u0002\\u0099\\u009a\",\n \"\\u0007v\\u0002\\u0002\\u009a\\u009b\\u0007g\\u0002\\u0002\\u009b\\u009c\\u0007\",\n \"k\\u0002\\u0002\\u009c\\u009d\\u0007t\\u0002\\u0002\\u009d\\u009e\\u0007q\\u0002\",\n \"\\u0002\\u009e\\u000e\\u0003\\u0002\\u0002\\u0002\\u009f\\u00a0\\u0007e\\u0002\",\n \"\\u0002\\u00a0\\u00a1\\u0007c\\u0002\\u0002\\u00a1\\u00a2\\u0007t\\u0002\\u0002\",\n \"\\u00a2\\u00a3\\u0007c\\u0002\\u0002\\u00a3\\u00a4\\u0007e\\u0002\\u0002\\u00a4\",\n \"\\u00a5\\u0007v\\u0002\\u0002\\u00a5\\u00a6\\u0007g\\u0002\\u0002\\u00a6\\u00a7\",\n \"\\u0007t\\u0002\\u0002\\u00a7\\u00a8\\u0007g\\u0002\\u0002\\u00a8\\u0010\\u0003\",\n \"\\u0002\\u0002\\u0002\\u00a9\\u00aa\\u0007g\\u0002\\u0002\\u00aa\\u00ab\\u0007\",\n \"u\\u0002\\u0002\\u00ab\\u00ac\\u0007e\\u0002\\u0002\\u00ac\\u00ad\\u0007q\\u0002\",\n \"\\u0002\\u00ad\\u00ae\\u0007n\\u0002\\u0002\\u00ae\\u00af\\u0007j\\u0002\\u0002\",\n \"\\u00af\\u00b0\\u0007c\\u0002\\u0002\\u00b0\\u0012\\u0003\\u0002\\u0002\\u0002\",\n \"\\u00b1\\u00b2\\u0007e\\u0002\\u0002\\u00b2\\u00b3\\u0007c\\u0002\\u0002\\u00b3\",\n \"\\u00b4\\u0007u\\u0002\\u0002\\u00b4\\u00b5\\u0007q\\u0002\\u0002\\u00b5\\u0014\",\n \"\\u0003\\u0002\\u0002\\u0002\\u00b6\\u00b7\\u0007e\\u0002\\u0002\\u00b7\\u00b8\",\n \"\\u0007q\\u0002\\u0002\\u00b8\\u00b9\\u0007p\\u0002\\u0002\\u00b9\\u00ba\\u0007\",\n \"v\\u0002\\u0002\\u00ba\\u00bb\\u0007t\\u0002\\u0002\\u00bb\\u00bc\\u0007c\\u0002\",\n \"\\u0002\\u00bc\\u00bd\\u0007t\\u0002\\u0002\\u00bd\\u00be\\u0007k\\u0002\\u0002\",\n \"\\u00be\\u00bf\\u0007q\\u0002\\u0002\\u00bf\\u0016\\u0003\\u0002\\u0002\\u0002\",\n \"\\u00c0\\u00c1\\u0007e\\u0002\\u0002\\u00c1\\u00c2\\u0007q\\u0002\\u0002\\u00c2\",\n \"\\u00c3\\u0007p\\u0002\\u0002\\u00c3\\u00c4\\u0007u\\u0002\\u0002\\u00c4\\u00c5\",\n \"\\u0007v\\u0002\\u0002\\u00c5\\u0018\\u0003\\u0002\\u0002\\u0002\\u00c6\\u00c7\",\n \"\\u0007h\\u0002\\u0002\\u00c7\\u00c8\\u0007w\\u0002\\u0002\\u00c8\\u00c9\\u0007\",\n \"p\\u0002\\u0002\\u00c9\\u00ca\\u0007e\\u0002\\u0002\\u00ca\\u00cb\\u0007c\\u0002\",\n \"\\u0002\\u00cb\\u00cc\\u0007q\\u0002\\u0002\\u00cc\\u001a\\u0003\\u0002\\u0002\",\n \"\\u0002\\u00cd\\u00ce\\u0007t\\u0002\\u0002\\u00ce\\u00cf\\u0007g\\u0002\\u0002\",\n \"\\u00cf\\u00d0\\u0007v\\u0002\\u0002\\u00d0\\u00d1\\u0007q\\u0002\\u0002\\u00d1\",\n \"\\u00d2\\u0007t\\u0002\\u0002\\u00d2\\u00d3\\u0007p\\u0002\\u0002\\u00d3\\u00d4\",\n \"\\u0007g\\u0002\\u0002\\u00d4\\u001c\\u0003\\u0002\\u0002\\u0002\\u00d5\\u00d6\",\n \"\\u0007r\\u0002\\u0002\\u00d6\\u00d7\\u0007c\\u0002\\u0002\\u00d7\\u00d8\\u0007\",\n \"t\\u0002\\u0002\\u00d8\\u00d9\\u0007c\\u0002\\u0002\\u00d9\\u001e\\u0003\\u0002\",\n \"\\u0002\\u0002\\u00da\\u00db\\u0007r\\u0002\\u0002\\u00db\\u00dc\\u0007c\\u0002\",\n \"\\u0002\\u00dc\\u00dd\\u0007t\\u0002\\u0002\\u00dd\\u00de\\u0007g\\u0002\\u0002\",\n \"\\u00de \\u0003\\u0002\\u0002\\u0002\\u00df\\u00e0\\u0007h\\u0002\\u0002\\u00e0\",\n \"\\u00e1\\u0007c\\u0002\\u0002\\u00e1\\u00e2\\u0007e\\u0002\\u0002\\u00e2\\u00e3\",\n \"\\u0007c\\u0002\\u0002\\u00e3\\\"\\u0003\\u0002\\u0002\\u0002\\u00e4\\u00e5\\u0007\",\n \"g\\u0002\\u0002\\u00e5\\u00e6\\u0007p\\u0002\\u0002\\u00e6\\u00e7\\u0007s\\u0002\",\n \"\\u0002\\u00e7\\u00e8\\u0007w\\u0002\\u0002\\u00e8\\u00e9\\u0007c\\u0002\\u0002\",\n \"\\u00e9\\u00ea\\u0007p\\u0002\\u0002\\u00ea\\u00eb\\u0007v\\u0002\\u0002\\u00eb\",\n \"\\u00ec\\u0007q\\u0002\\u0002\\u00ec$\\u0003\\u0002\\u0002\\u0002\\u00ed\\u00ee\",\n \"\\u0007u\\u0002\\u0002\\u00ee\\u00ef\\u0007g\\u0002\\u0002\\u00ef&\\u0003\\u0002\",\n \"\\u0002\\u0002\\u00f0\\u00f1\\u0007u\\u0002\\u0002\\u00f1\\u00f2\\u0007g\\u0002\",\n \"\\u0002\\u00f2\\u00f3\\u0007p\\u0002\\u0002\\u00f3\\u00f4\\u0007c\\u0002\\u0002\",\n \"\\u00f4\\u00f5\\u0007q\\u0002\\u0002\\u00f5(\\u0003\\u0002\\u0002\\u0002\\u00f6\",\n \"\\u00f7\\u0007h\\u0002\\u0002\\u00f7\\u00f8\\u0007c\\u0002\\u0002\\u00f8\\u00f9\",\n \"\\u0007n\\u0002\\u0002\\u00f9\\u00fa\\u0007u\\u0002\\u0002\\u00fa\\u00fb\\u0007\",\n \"q\\u0002\\u0002\\u00fb*\\u0003\\u0002\\u0002\\u0002\\u00fc\\u00fd\\u0007x\\u0002\",\n \"\\u0002\\u00fd\\u00fe\\u0007g\\u0002\\u0002\\u00fe\\u00ff\\u0007t\\u0002\\u0002\",\n \"\\u00ff\\u0100\\u0007f\\u0002\\u0002\\u0100\\u0101\\u0007c\\u0002\\u0002\\u0101\",\n \"\\u0102\\u0007f\\u0002\\u0002\\u0102\\u0103\\u0007g\\u0002\\u0002\\u0103\\u0104\",\n \"\\u0007k\\u0002\\u0002\\u0104\\u0105\\u0007t\\u0002\\u0002\\u0105\\u0106\\u0007\",\n \"q\\u0002\\u0002\\u0106,\\u0003\\u0002\\u0002\\u0002\\u0107\\u0108\\u0007p\\u0002\",\n \"\\u0002\\u0108\\u0109\\u0007c\\u0002\\u0002\\u0109\\u010a\\u0007q\\u0002\\u0002\",\n \"\\u010a.\\u0003\\u0002\\u0002\\u0002\\u010b\\u010c\\u0007G\\u0002\\u0002\\u010c\",\n \"0\\u0003\\u0002\\u0002\\u0002\\u010d\\u010e\\u0007Q\\u0002\\u0002\\u010e\\u010f\",\n \"\\u0007W\\u0002\\u0002\\u010f2\\u0003\\u0002\\u0002\\u0002\\u0110\\u0111\\u0007\",\n \"(\\u0002\\u0002\\u01114\\u0003\\u0002\\u0002\\u0002\\u0112\\u0113\\u0007*\\u0002\",\n \"\\u0002\\u01136\\u0003\\u0002\\u0002\\u0002\\u0114\\u0115\\u0007+\\u0002\\u0002\",\n \"\\u01158\\u0003\\u0002\\u0002\\u0002\\u0116\\u0117\\u0007]\\u0002\\u0002\\u0117\",\n \":\\u0003\\u0002\\u0002\\u0002\\u0118\\u0119\\u0007_\\u0002\\u0002\\u0119<\\u0003\",\n \"\\u0002\\u0002\\u0002\\u011a\\u011b\\u0007}\\u0002\\u0002\\u011b>\\u0003\\u0002\",\n \"\\u0002\\u0002\\u011c\\u011d\\u0007\\u007f\\u0002\\u0002\\u011d@\\u0003\\u0002\",\n \"\\u0002\\u0002\\u011e\\u011f\\u0007.\\u0002\\u0002\\u011fB\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0120\\u0121\\u0007>\\u0002\\u0002\\u0121\\u0124\\u0007/\\u0002\\u0002\",\n \"\\u0122\\u0124\\u0007\\u2192\\u0002\\u0002\\u0123\\u0120\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0123\\u0122\\u0003\\u0002\\u0002\\u0002\\u0124D\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0125\\u0126\\t\\u0002\\u0002\\u0002\\u0126F\\u0003\\u0002\\u0002\\u0002\\u0127\",\n \"\\u0128\\t\\u0003\\u0002\\u0002\\u0128H\\u0003\\u0002\\u0002\\u0002\\u0129\\u012a\",\n \"\\u0005/\\u0018\\u0002\\u012aJ\\u0003\\u0002\\u0002\\u0002\\u012b\\u012c\\u0005\",\n \"1\\u0019\\u0002\\u012cL\\u0003\\u0002\\u0002\\u0002\\u012d\\u012e\\u0007@\\u0002\",\n \"\\u0002\\u012e\\u0137\\u0007?\\u0002\\u0002\\u012f\\u0130\\u0007?\\u0002\\u0002\",\n \"\\u0130\\u0137\\u0007?\\u0002\\u0002\\u0131\\u0132\\u0007>\\u0002\\u0002\\u0132\",\n \"\\u0137\\u0007?\\u0002\\u0002\\u0133\\u0137\\t\\u0004\\u0002\\u0002\\u0134\\u0135\",\n \"\\u0007#\\u0002\\u0002\\u0135\\u0137\\u0007?\\u0002\\u0002\\u0136\\u012d\\u0003\",\n \"\\u0002\\u0002\\u0002\\u0136\\u012f\\u0003\\u0002\\u0002\\u0002\\u0136\\u0131\\u0003\",\n \"\\u0002\\u0002\\u0002\\u0136\\u0133\\u0003\\u0002\\u0002\\u0002\\u0136\\u0134\\u0003\",\n \"\\u0002\\u0002\\u0002\\u0137N\\u0003\\u0002\\u0002\\u0002\\u0138\\u0139\\u0007\",\n \"<\\u0002\\u0002\\u0139P\\u0003\\u0002\\u0002\\u0002\\u013a\\u013b\\u0005-\\u0017\",\n \"\\u0002\\u013bR\\u0003\\u0002\\u0002\\u0002\\u013c\\u0140\\t\\u0005\\u0002\\u0002\",\n \"\\u013d\\u013f\\t\\u0006\\u0002\\u0002\\u013e\\u013d\\u0003\\u0002\\u0002\\u0002\",\n \"\\u013f\\u0142\\u0003\\u0002\\u0002\\u0002\\u0140\\u013e\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0140\\u0141\\u0003\\u0002\\u0002\\u0002\\u0141T\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0142\\u0140\\u0003\\u0002\\u0002\\u0002\\u0143\\u0144\\u0005S*\\u0002\\u0144\",\n \"\\u0145\\u00070\\u0002\\u0002\\u0145\\u0146\\u0005S*\\u0002\\u0146V\\u0003\\u0002\",\n \"\\u0002\\u0002\\u0147\\u0149\\t\\u0007\\u0002\\u0002\\u0148\\u0147\\u0003\\u0002\",\n \"\\u0002\\u0002\\u0149\\u014a\\u0003\\u0002\\u0002\\u0002\\u014a\\u0148\\u0003\\u0002\",\n \"\\u0002\\u0002\\u014a\\u014b\\u0003\\u0002\\u0002\\u0002\\u014b\\u0163\\u0003\\u0002\",\n \"\\u0002\\u0002\\u014c\\u014d\\u00072\\u0002\\u0002\\u014d\\u0151\\u0007z\\u0002\",\n \"\\u0002\\u014e\\u014f\\u00072\\u0002\\u0002\\u014f\\u0151\\u0007Z\\u0002\\u0002\",\n \"\\u0150\\u014c\\u0003\\u0002\\u0002\\u0002\\u0150\\u014e\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0151\\u0153\\u0003\\u0002\\u0002\\u0002\\u0152\\u0154\\u0005i5\\u0002\\u0153\",\n \"\\u0152\\u0003\\u0002\\u0002\\u0002\\u0154\\u0155\\u0003\\u0002\\u0002\\u0002\\u0155\",\n \"\\u0153\\u0003\\u0002\\u0002\\u0002\\u0155\\u0156\\u0003\\u0002\\u0002\\u0002\\u0156\",\n \"\\u0163\\u0003\\u0002\\u0002\\u0002\\u0157\\u0158\\u00072\\u0002\\u0002\\u0158\",\n \"\\u015c\\u0007d\\u0002\\u0002\\u0159\\u015a\\u00072\\u0002\\u0002\\u015a\\u015c\",\n \"\\u0007D\\u0002\\u0002\\u015b\\u0157\\u0003\\u0002\\u0002\\u0002\\u015b\\u0159\",\n \"\\u0003\\u0002\\u0002\\u0002\\u015c\\u015e\\u0003\\u0002\\u0002\\u0002\\u015d\\u015f\",\n \"\\t\\b\\u0002\\u0002\\u015e\\u015d\\u0003\\u0002\\u0002\\u0002\\u015f\\u0160\\u0003\",\n \"\\u0002\\u0002\\u0002\\u0160\\u015e\\u0003\\u0002\\u0002\\u0002\\u0160\\u0161\\u0003\",\n \"\\u0002\\u0002\\u0002\\u0161\\u0163\\u0003\\u0002\\u0002\\u0002\\u0162\\u0148\\u0003\",\n \"\\u0002\\u0002\\u0002\\u0162\\u0150\\u0003\\u0002\\u0002\\u0002\\u0162\\u015b\\u0003\",\n \"\\u0002\\u0002\\u0002\\u0163X\\u0003\\u0002\\u0002\\u0002\\u0164\\u0166\\t\\u0007\",\n \"\\u0002\\u0002\\u0165\\u0164\\u0003\\u0002\\u0002\\u0002\\u0166\\u0167\\u0003\\u0002\",\n \"\\u0002\\u0002\\u0167\\u0165\\u0003\\u0002\\u0002\\u0002\\u0167\\u0168\\u0003\\u0002\",\n \"\\u0002\\u0002\\u0168\\u0169\\u0003\\u0002\\u0002\\u0002\\u0169\\u016b\\u00070\",\n \"\\u0002\\u0002\\u016a\\u016c\\t\\u0007\\u0002\\u0002\\u016b\\u016a\\u0003\\u0002\",\n \"\\u0002\\u0002\\u016c\\u016d\\u0003\\u0002\\u0002\\u0002\\u016d\\u016b\\u0003\\u0002\",\n \"\\u0002\\u0002\\u016d\\u016e\\u0003\\u0002\\u0002\\u0002\\u016e\\u017d\\u0003\\u0002\",\n \"\\u0002\\u0002\\u016f\\u0171\\t\\u0007\\u0002\\u0002\\u0170\\u016f\\u0003\\u0002\",\n \"\\u0002\\u0002\\u0171\\u0172\\u0003\\u0002\\u0002\\u0002\\u0172\\u0170\\u0003\\u0002\",\n \"\\u0002\\u0002\\u0172\\u0173\\u0003\\u0002\\u0002\\u0002\\u0173\\u0174\\u0003\\u0002\",\n \"\\u0002\\u0002\\u0174\\u0178\\u00070\\u0002\\u0002\\u0175\\u0177\\t\\u0007\\u0002\",\n \"\\u0002\\u0176\\u0175\\u0003\\u0002\\u0002\\u0002\\u0177\\u017a\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0178\\u0176\\u0003\\u0002\\u0002\\u0002\\u0178\\u0179\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0179\\u017b\\u0003\\u0002\\u0002\\u0002\\u017a\\u0178\\u0003\\u0002\\u0002\",\n \"\\u0002\\u017b\\u017d\\u0005[.\\u0002\\u017c\\u0165\\u0003\\u0002\\u0002\\u0002\",\n \"\\u017c\\u0170\\u0003\\u0002\\u0002\\u0002\\u017dZ\\u0003\\u0002\\u0002\\u0002\",\n \"\\u017e\\u0180\\t\\t\\u0002\\u0002\\u017f\\u0181\\t\\u0002\\u0002\\u0002\\u0180\\u017f\",\n \"\\u0003\\u0002\\u0002\\u0002\\u0180\\u0181\\u0003\\u0002\\u0002\\u0002\\u0181\\u0183\",\n \"\\u0003\\u0002\\u0002\\u0002\\u0182\\u0184\\t\\u0007\\u0002\\u0002\\u0183\\u0182\",\n \"\\u0003\\u0002\\u0002\\u0002\\u0184\\u0185\\u0003\\u0002\\u0002\\u0002\\u0185\\u0183\",\n \"\\u0003\\u0002\\u0002\\u0002\\u0185\\u0186\\u0003\\u0002\\u0002\\u0002\\u0186\\\\\",\n \"\\u0003\\u0002\\u0002\\u0002\\u0187\\u018b\\u0007$\\u0002\\u0002\\u0188\\u018a\",\n \"\\u0005_0\\u0002\\u0189\\u0188\\u0003\\u0002\\u0002\\u0002\\u018a\\u018d\\u0003\",\n \"\\u0002\\u0002\\u0002\\u018b\\u0189\\u0003\\u0002\\u0002\\u0002\\u018b\\u018c\\u0003\",\n \"\\u0002\\u0002\\u0002\\u018c\\u018e\\u0003\\u0002\\u0002\\u0002\\u018d\\u018b\\u0003\",\n \"\\u0002\\u0002\\u0002\\u018e\\u018f\\u0007$\\u0002\\u0002\\u018f^\\u0003\\u0002\",\n \"\\u0002\\u0002\\u0190\\u0193\\n\\n\\u0002\\u0002\\u0191\\u0193\\u0005m7\\u0002\\u0192\",\n \"\\u0190\\u0003\\u0002\\u0002\\u0002\\u0192\\u0191\\u0003\\u0002\\u0002\\u0002\\u0193\",\n \"`\\u0003\\u0002\\u0002\\u0002\\u0194\\u0197\\u0007)\\u0002\\u0002\\u0195\\u0198\",\n \"\\u0005m7\\u0002\\u0196\\u0198\\n\\u000b\\u0002\\u0002\\u0197\\u0195\\u0003\\u0002\",\n \"\\u0002\\u0002\\u0197\\u0196\\u0003\\u0002\\u0002\\u0002\\u0198\\u0199\\u0003\\u0002\",\n \"\\u0002\\u0002\\u0199\\u019a\\u0007)\\u0002\\u0002\\u019ab\\u0003\\u0002\\u0002\",\n \"\\u0002\\u019b\\u019c\\t\\f\\u0002\\u0002\\u019c\\u019d\\u0003\\u0002\\u0002\\u0002\",\n \"\\u019d\\u019e\\b2\\u0002\\u0002\\u019ed\\u0003\\u0002\\u0002\\u0002\\u019f\\u01a0\",\n \"\\u0007=\\u0002\\u0002\\u01a0f\\u0003\\u0002\\u0002\\u0002\\u01a1\\u01a3\\t\\r\\u0002\",\n \"\\u0002\\u01a2\\u01a1\\u0003\\u0002\\u0002\\u0002\\u01a3\\u01a4\\u0003\\u0002\\u0002\",\n \"\\u0002\\u01a4\\u01a2\\u0003\\u0002\\u0002\\u0002\\u01a4\\u01a5\\u0003\\u0002\\u0002\",\n \"\\u0002\\u01a5\\u01a8\\u0003\\u0002\\u0002\\u0002\\u01a6\\u01a8\\u0005e3\\u0002\",\n \"\\u01a7\\u01a2\\u0003\\u0002\\u0002\\u0002\\u01a7\\u01a6\\u0003\\u0002\\u0002\\u0002\",\n \"\\u01a8h\\u0003\\u0002\\u0002\\u0002\\u01a9\\u01aa\\t\\u000e\\u0002\\u0002\\u01aa\",\n \"j\\u0003\\u0002\\u0002\\u0002\\u01ab\\u01ac\\t\\u000f\\u0002\\u0002\\u01acl\\u0003\",\n \"\\u0002\\u0002\\u0002\\u01ad\\u01ae\\u0007^\\u0002\\u0002\\u01ae\\u01b2\\t\\u0010\",\n \"\\u0002\\u0002\\u01af\\u01b2\\u0005q9\\u0002\\u01b0\\u01b2\\u0005o8\\u0002\\u01b1\",\n \"\\u01ad\\u0003\\u0002\\u0002\\u0002\\u01b1\\u01af\\u0003\\u0002\\u0002\\u0002\\u01b1\",\n \"\\u01b0\\u0003\\u0002\\u0002\\u0002\\u01b2n\\u0003\\u0002\\u0002\\u0002\\u01b3\",\n \"\\u01b4\\u0007^\\u0002\\u0002\\u01b4\\u01b5\\t\\u0011\\u0002\\u0002\\u01b5\\u01b6\",\n \"\\u0005k6\\u0002\\u01b6\\u01b7\\u0005k6\\u0002\\u01b7\\u01bf\\u0003\\u0002\\u0002\",\n \"\\u0002\\u01b8\\u01b9\\u0007^\\u0002\\u0002\\u01b9\\u01ba\\u0005k6\\u0002\\u01ba\",\n \"\\u01bb\\u0005k6\\u0002\\u01bb\\u01bf\\u0003\\u0002\\u0002\\u0002\\u01bc\\u01bd\",\n \"\\u0007^\\u0002\\u0002\\u01bd\\u01bf\\u0005k6\\u0002\\u01be\\u01b3\\u0003\\u0002\",\n \"\\u0002\\u0002\\u01be\\u01b8\\u0003\\u0002\\u0002\\u0002\\u01be\\u01bc\\u0003\\u0002\",\n \"\\u0002\\u0002\\u01bfp\\u0003\\u0002\\u0002\\u0002\\u01c0\\u01c1\\u0007^\\u0002\",\n \"\\u0002\\u01c1\\u01c2\\u0007w\\u0002\\u0002\\u01c2\\u01c3\\u0005i5\\u0002\\u01c3\",\n \"\\u01c4\\u0005i5\\u0002\\u01c4\\u01c5\\u0005i5\\u0002\\u01c5\\u01c6\\u0005i5\\u0002\",\n \"\\u01c6r\\u0003\\u0002\\u0002\\u0002\\u01c7\\u01c8\\u00071\\u0002\\u0002\\u01c8\",\n \"\\u01c9\\u00071\\u0002\\u0002\\u01c9\\u01cd\\u0003\\u0002\\u0002\\u0002\\u01ca\",\n \"\\u01cc\\n\\r\\u0002\\u0002\\u01cb\\u01ca\\u0003\\u0002\\u0002\\u0002\\u01cc\\u01cf\",\n \"\\u0003\\u0002\\u0002\\u0002\\u01cd\\u01cb\\u0003\\u0002\\u0002\\u0002\\u01cd\\u01ce\",\n \"\\u0003\\u0002\\u0002\\u0002\\u01ce\\u01d1\\u0003\\u0002\\u0002\\u0002\\u01cf\\u01cd\",\n \"\\u0003\\u0002\\u0002\\u0002\\u01d0\\u01d2\\u0007\\u000f\\u0002\\u0002\\u01d1\\u01d0\",\n \"\\u0003\\u0002\\u0002\\u0002\\u01d1\\u01d2\\u0003\\u0002\\u0002\\u0002\\u01d2\\u01d3\",\n \"\\u0003\\u0002\\u0002\\u0002\\u01d3\\u01e0\\u0007\\f\\u0002\\u0002\\u01d4\\u01d5\",\n \"\\u00071\\u0002\\u0002\\u01d5\\u01d6\\u0007,\\u0002\\u0002\\u01d6\\u01da\\u0003\",\n \"\\u0002\\u0002\\u0002\\u01d7\\u01d9\\u000b\\u0002\\u0002\\u0002\\u01d8\\u01d7\\u0003\",\n \"\\u0002\\u0002\\u0002\\u01d9\\u01dc\\u0003\\u0002\\u0002\\u0002\\u01da\\u01db\\u0003\",\n \"\\u0002\\u0002\\u0002\\u01da\\u01d8\\u0003\\u0002\\u0002\\u0002\\u01db\\u01dd\\u0003\",\n \"\\u0002\\u0002\\u0002\\u01dc\\u01da\\u0003\\u0002\\u0002\\u0002\\u01dd\\u01de\\u0007\",\n \",\\u0002\\u0002\\u01de\\u01e0\\u00071\\u0002\\u0002\\u01df\\u01c7\\u0003\\u0002\",\n \"\\u0002\\u0002\\u01df\\u01d4\\u0003\\u0002\\u0002\\u0002\\u01e0\\u01e1\\u0003\\u0002\",\n \"\\u0002\\u0002\\u01e1\\u01e2\\b:\\u0003\\u0002\\u01e2t\\u0003\\u0002\\u0002\\u0002\",\n \"\\u001e\\u0002\\u0123\\u0136\\u0140\\u014a\\u0150\\u0155\\u015b\\u0160\\u0162\\u0167\",\n \"\\u016d\\u0172\\u0178\\u017c\\u0180\\u0185\\u018b\\u0192\\u0197\\u01a4\\u01a7\\u01b1\",\n \"\\u01be\\u01cd\\u01d1\\u01da\\u01df\\u0004\\b\\u0002\\u0002\\u0002\\u0003\\u0002\"].join(\"\");\n\n\nvar atn = new antlr4.atn.ATNDeserializer().deserialize(serializedATN);\n\nvar decisionsToDFA = atn.decisionToState.map( function(ds, index) { return new antlr4.dfa.DFA(ds, index); });\n\nfunction ivprog(input) {\n\tantlr4.Lexer.call(this, input);\n this._interp = new antlr4.atn.LexerATNSimulator(this, atn, decisionsToDFA, new antlr4.PredictionContextCache());\n return this;\n}\n\nivprog.prototype = Object.create(antlr4.Lexer.prototype);\nivprog.prototype.constructor = ivprog;\n\nivprog.EOF = antlr4.Token.EOF;\nivprog.RK_PROGRAM = 1;\nivprog.RK_REAL = 2;\nivprog.RK_VOID = 3;\nivprog.RK_BOOLEAN = 4;\nivprog.RK_STRING = 5;\nivprog.RK_INTEGER = 6;\nivprog.RK_CHARACTER = 7;\nivprog.RK_SWITCH = 8;\nivprog.RK_CASE = 9;\nivprog.RK_DEFAULT = 10;\nivprog.RK_CONST = 11;\nivprog.RK_FUNCTION = 12;\nivprog.RK_RETURN = 13;\nivprog.RK_FOR = 14;\nivprog.RK_BREAK = 15;\nivprog.RK_DO = 16;\nivprog.RK_WHILE = 17;\nivprog.RK_IF = 18;\nivprog.RK_ELSE = 19;\nivprog.RK_FALSE = 20;\nivprog.RK_TRUE = 21;\nivprog.RK_REFERENCE = 22;\nivprog.OPEN_PARENTHESIS = 23;\nivprog.CLOSE_PARENTHESIS = 24;\nivprog.OPEN_BRACE = 25;\nivprog.CLOSE_BRACE = 26;\nivprog.OPEN_CURLY = 27;\nivprog.CLOSE_CURLY = 28;\nivprog.COMMA = 29;\nivprog.EQUAL = 30;\nivprog.SUM_OP = 31;\nivprog.MULTI_OP = 32;\nivprog.AND_OPERATOR = 33;\nivprog.OR_OPERATOR = 34;\nivprog.RELATIONAL_OPERATOR = 35;\nivprog.COLON = 36;\nivprog.NOT_OPERATOR = 37;\nivprog.ID = 38;\nivprog.LIB_ID = 39;\nivprog.INTEGER = 40;\nivprog.REAL = 41;\nivprog.STRING = 42;\nivprog.CHARACTER = 43;\nivprog.WHITESPACE = 44;\nivprog.EOS = 45;\nivprog.COMMENTS = 46;\n\nivprog.prototype.channelNames = [ \"DEFAULT_TOKEN_CHANNEL\", \"HIDDEN\" ];\n\nivprog.prototype.modeNames = [ \"DEFAULT_MODE\" ];\n\nivprog.prototype.literalNames = [ null, \"'programa'\", \"'real'\", \"'vazio'\", \n \"'logico'\", \"'cadeia'\", \"'inteiro'\", \"'caractere'\", \n \"'escolha'\", \"'caso'\", \"'contrario'\", \n \"'const'\", \"'funcao'\", \"'retorne'\", \"'para'\", \n \"'pare'\", \"'faca'\", \"'enquanto'\", \"'se'\", \n \"'senao'\", \"'falso'\", \"'verdadeiro'\", \n \"'&'\", \"'('\", \"')'\", \"'['\", \"']'\", \"'{'\", \n \"'}'\", \"','\", null, null, null, null, \n null, null, \"':'\" ];\n\nivprog.prototype.symbolicNames = [ null, \"RK_PROGRAM\", \"RK_REAL\", \"RK_VOID\", \n \"RK_BOOLEAN\", \"RK_STRING\", \"RK_INTEGER\", \n \"RK_CHARACTER\", \"RK_SWITCH\", \"RK_CASE\", \n \"RK_DEFAULT\", \"RK_CONST\", \"RK_FUNCTION\", \n \"RK_RETURN\", \"RK_FOR\", \"RK_BREAK\", \"RK_DO\", \n \"RK_WHILE\", \"RK_IF\", \"RK_ELSE\", \"RK_FALSE\", \n \"RK_TRUE\", \"RK_REFERENCE\", \"OPEN_PARENTHESIS\", \n \"CLOSE_PARENTHESIS\", \"OPEN_BRACE\", \"CLOSE_BRACE\", \n \"OPEN_CURLY\", \"CLOSE_CURLY\", \"COMMA\", \n \"EQUAL\", \"SUM_OP\", \"MULTI_OP\", \"AND_OPERATOR\", \n \"OR_OPERATOR\", \"RELATIONAL_OPERATOR\", \n \"COLON\", \"NOT_OPERATOR\", \"ID\", \"LIB_ID\", \n \"INTEGER\", \"REAL\", \"STRING\", \"CHARACTER\", \n \"WHITESPACE\", \"EOS\", \"COMMENTS\" ];\n\nivprog.prototype.ruleNames = [ \"RK_PROGRAM\", \"RK_REAL\", \"RK_VOID\", \"RK_BOOLEAN\", \n \"RK_STRING\", \"RK_INTEGER\", \"RK_CHARACTER\", \n \"RK_SWITCH\", \"RK_CASE\", \"RK_DEFAULT\", \"RK_CONST\", \n \"RK_FUNCTION\", \"RK_RETURN\", \"RK_FOR\", \"RK_BREAK\", \n \"RK_DO\", \"RK_WHILE\", \"RK_IF\", \"RK_ELSE\", \n \"RK_FALSE\", \"RK_TRUE\", \"RK_LOGICAL_NOT\", \n \"RK_LOGICAL_AND\", \"RK_LOGICAL_OR\", \"RK_REFERENCE\", \n \"OPEN_PARENTHESIS\", \"CLOSE_PARENTHESIS\", \n \"OPEN_BRACE\", \"CLOSE_BRACE\", \"OPEN_CURLY\", \n \"CLOSE_CURLY\", \"COMMA\", \"EQUAL\", \"SUM_OP\", \n \"MULTI_OP\", \"AND_OPERATOR\", \"OR_OPERATOR\", \n \"RELATIONAL_OPERATOR\", \"COLON\", \"NOT_OPERATOR\", \n \"ID\", \"LIB_ID\", \"INTEGER\", \"REAL\", \"ExponentPart\", \n \"STRING\", \"STRING_CHARACTER\", \"CHARACTER\", \n \"WHITESPACE\", \"SEMICOLON\", \"EOS\", \"HEX_DIGIT\", \n \"OCTAL_DIGIT\", \"ESC_SEQ\", \"ESC_OCTAL\", \"ESC_UNICODE\", \n \"COMMENTS\" ];\n\nivprog.prototype.grammarFileName = \"ivprog.g4\";\n\n\n\nexports.ivprog = ivprog;\n\n\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = {\nivprog: __webpack_require__(0).ivprog\n};\n\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"antlr4/index\");\n\n/***/ })\n/******/ ]);","/* This is a dictionary of the language defined functions\n**/\nexport default {\n main_function: \"inicio\",\n $read: \"leia\",\n $write: \"escreva\",\n $numElements: \"total_of_elements\",\n $matrixLines: \"total_of_lines\",\n $matrixColumns: \"total_of_columns\",\n $substring: \"subcadeia\",\n $length: \"comprimento\",\n $uppercase: \"caixa_alta\",\n $lowercase: \"caixa_baixa\",\n $charAt: \"char_at\",\n $isReal: \"is_real\",\n $isInt: \"is_integer\",\n $isBool: \"is_logic\",\n $castReal: \"to_real\",\n $castInt: \"to_integer\",\n $castBool: \"to_logic\",\n $castString: \"to_string\",\n $sin: \"sin\",\n $cos: \"cos\",\n $tan: \"tan\",\n $sqrt: \"sqrt\",\n $pow: \"pow\",\n $log: \"log\",\n $abs: \"abs\",\n $negate: \"negate\",\n $invert: \"invert\",\n $max: \"maximum\",\n $min: \"minimum\"\n}\n","/**\n * This is the dictionary of the language defined libraries\n */\nexport default {\n $mathLib: \"Mathematic\",\n $ioLib: \"ES\",\n $strLib: \"Texto\",\n $arrayLib: \"Arranjo\",\n $langLib: \"Conversion\"\n}","import * as PT from './pt/ivprog.g4';\nimport PTFuncs from './pt/langFunctions';\nimport PTLibs from './pt/langLibs';\nimport * as EN from './en/ivprog.g4';\nimport ENFuncs from './en/langFunctions';\nimport ENLibs from './en/langLibs';\nimport * as ES from './es/ivprog.g4';\nimport ESFuncs from './es/langFunctions';\nimport ESLibs from './es/langLibs';\n\nexport default {\n pt: {lexer: PT.ivprog, langFuncs: PTFuncs, langLibs: PTLibs},\n en: {lexer: EN.ivprog, langFuncs: ENFuncs, langLibs: ENLibs},\n es: {lexer: ES.ivprog, langFuncs: ESFuncs, langLibs: ESLibs}\n}\n","module.exports =\n/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// identity function for calling harmony imports with the correct context\n/******/ \t__webpack_require__.i = function(value) { return value; };\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 1);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// Generated from /tmp/tmp-405N2hWcSyOQaIL/ivprog.g4 by ANTLR 4.7\n// jshint ignore: start\nvar antlr4 = __webpack_require__(2);\n\n\nvar serializedATN = [\"\\u0003\\u608b\\ua72a\\u8133\\ub9ed\\u417c\\u3be7\\u7786\\u5964\",\n \"\\u00026\\u0222\\b\\u0001\\u0004\\u0002\\t\\u0002\\u0004\\u0003\\t\\u0003\\u0004\",\n \"\\u0004\\t\\u0004\\u0004\\u0005\\t\\u0005\\u0004\\u0006\\t\\u0006\\u0004\\u0007\\t\",\n \"\\u0007\\u0004\\b\\t\\b\\u0004\\t\\t\\t\\u0004\\n\\t\\n\\u0004\\u000b\\t\\u000b\\u0004\",\n \"\\f\\t\\f\\u0004\\r\\t\\r\\u0004\\u000e\\t\\u000e\\u0004\\u000f\\t\\u000f\\u0004\\u0010\",\n \"\\t\\u0010\\u0004\\u0011\\t\\u0011\\u0004\\u0012\\t\\u0012\\u0004\\u0013\\t\\u0013\",\n \"\\u0004\\u0014\\t\\u0014\\u0004\\u0015\\t\\u0015\\u0004\\u0016\\t\\u0016\\u0004\\u0017\",\n \"\\t\\u0017\\u0004\\u0018\\t\\u0018\\u0004\\u0019\\t\\u0019\\u0004\\u001a\\t\\u001a\",\n \"\\u0004\\u001b\\t\\u001b\\u0004\\u001c\\t\\u001c\\u0004\\u001d\\t\\u001d\\u0004\\u001e\",\n \"\\t\\u001e\\u0004\\u001f\\t\\u001f\\u0004 \\t \\u0004!\\t!\\u0004\\\"\\t\\\"\\u0004#\",\n \"\\t#\\u0004$\\t$\\u0004%\\t%\\u0004&\\t&\\u0004\\'\\t\\'\\u0004(\\t(\\u0004)\\t)\\u0004\",\n \"*\\t*\\u0004+\\t+\\u0004,\\t,\\u0004-\\t-\\u0004.\\t.\\u0004/\\t/\\u00040\\t0\\u0004\",\n \"1\\t1\\u00042\\t2\\u00043\\t3\\u00044\\t4\\u00045\\t5\\u00046\\t6\\u00047\\t7\\u0004\",\n \"8\\t8\\u00049\\t9\\u0004:\\t:\\u0004;\\t;\\u0004<\\t<\\u0004=\\t=\\u0004>\\t>\\u0004\",\n \"?\\t?\\u0004@\\t@\\u0003\\u0002\\u0003\\u0002\\u0003\\u0002\\u0003\\u0002\\u0003\",\n \"\\u0002\\u0003\\u0002\\u0003\\u0002\\u0003\\u0002\\u0003\\u0002\\u0003\\u0003\\u0003\",\n \"\\u0003\\u0003\\u0003\\u0003\\u0003\\u0003\\u0003\\u0003\\u0004\\u0003\\u0004\\u0003\",\n \"\\u0004\\u0003\\u0004\\u0003\\u0004\\u0003\\u0004\\u0003\\u0005\\u0003\\u0005\\u0003\",\n \"\\u0005\\u0003\\u0005\\u0003\\u0005\\u0003\\u0005\\u0003\\u0005\\u0003\\u0006\\u0003\",\n \"\\u0006\\u0003\\u0006\\u0003\\u0006\\u0003\\u0006\\u0003\\u0006\\u0003\\u0006\\u0003\",\n \"\\u0007\\u0003\\u0007\\u0003\\u0007\\u0003\\u0007\\u0003\\u0007\\u0003\\u0007\\u0003\",\n \"\\u0007\\u0003\\u0007\\u0003\\b\\u0003\\b\\u0003\\b\\u0003\\b\\u0003\\b\\u0003\\b\\u0003\",\n \"\\b\\u0003\\b\\u0003\\b\\u0003\\b\\u0003\\t\\u0003\\t\\u0003\\t\\u0003\\t\\u0003\\t\\u0003\",\n \"\\t\\u0003\\t\\u0003\\t\\u0003\\n\\u0003\\n\\u0003\\n\\u0003\\n\\u0003\\n\\u0003\\u000b\",\n \"\\u0003\\u000b\\u0003\\u000b\\u0003\\u000b\\u0003\\u000b\\u0003\\u000b\\u0003\\u000b\",\n \"\\u0003\\u000b\\u0003\\u000b\\u0003\\u000b\\u0003\\f\\u0003\\f\\u0003\\f\\u0003\\f\",\n \"\\u0003\\f\\u0003\\f\\u0003\\r\\u0003\\r\\u0003\\r\\u0003\\r\\u0003\\r\\u0003\\r\\u0003\",\n \"\\r\\u0003\\u000e\\u0003\\u000e\\u0003\\u000e\\u0003\\u000e\\u0003\\u000e\\u0003\",\n \"\\u000e\\u0003\\u000e\\u0003\\u000e\\u0003\\u000f\\u0003\\u000f\\u0003\\u000f\\u0003\",\n \"\\u000f\\u0003\\u000f\\u0003\\u0010\\u0003\\u0010\\u0003\\u0010\\u0003\\u0010\\u0003\",\n \"\\u0010\\u0003\\u0010\\u0003\\u0010\\u0003\\u0010\\u0003\\u0010\\u0003\\u0010\\u0003\",\n \"\\u0010\\u0003\\u0010\\u0003\\u0011\\u0003\\u0011\\u0003\\u0011\\u0003\\u0012\\u0003\",\n \"\\u0012\\u0003\\u0012\\u0003\\u0012\\u0003\\u0013\\u0003\\u0013\\u0003\\u0013\\u0003\",\n \"\\u0013\\u0003\\u0013\\u0003\\u0013\\u0003\\u0014\\u0003\\u0014\\u0003\\u0014\\u0003\",\n \"\\u0014\\u0003\\u0014\\u0003\\u0015\\u0003\\u0015\\u0003\\u0015\\u0003\\u0015\\u0003\",\n \"\\u0015\\u0003\\u0015\\u0003\\u0015\\u0003\\u0016\\u0003\\u0016\\u0003\\u0016\\u0003\",\n \"\\u0016\\u0003\\u0016\\u0003\\u0016\\u0003\\u0016\\u0003\\u0016\\u0003\\u0017\\u0003\",\n \"\\u0017\\u0003\\u0017\\u0003\\u0017\\u0003\\u0017\\u0003\\u0017\\u0003\\u0017\\u0003\",\n \"\\u0017\\u0003\\u0017\\u0003\\u0018\\u0003\\u0018\\u0003\\u0018\\u0003\\u0018\\u0003\",\n \"\\u0018\\u0003\\u0018\\u0003\\u0018\\u0003\\u0018\\u0003\\u0018\\u0003\\u0018\\u0003\",\n \"\\u0018\\u0003\\u0018\\u0003\\u0018\\u0003\\u0018\\u0003\\u0018\\u0003\\u0018\\u0003\",\n \"\\u0019\\u0003\\u0019\\u0003\\u0019\\u0003\\u001a\\u0003\\u001a\\u0003\\u001a\\u0003\",\n \"\\u001a\\u0003\\u001a\\u0003\\u001a\\u0003\\u001b\\u0003\\u001b\\u0003\\u001b\\u0003\",\n \"\\u001b\\u0003\\u001b\\u0003\\u001b\\u0003\\u001c\\u0003\\u001c\\u0003\\u001c\\u0003\",\n \"\\u001c\\u0003\\u001c\\u0003\\u001c\\u0003\\u001c\\u0003\\u001c\\u0003\\u001c\\u0003\",\n \"\\u001c\\u0003\\u001c\\u0003\\u001d\\u0003\\u001d\\u0003\\u001d\\u0003\\u001d\\u0003\",\n \"\\u001e\\u0003\\u001e\\u0003\\u001f\\u0003\\u001f\\u0003\\u001f\\u0003 \\u0003\",\n \" \\u0003!\\u0003!\\u0003\\\"\\u0003\\\"\\u0003#\\u0003#\\u0003$\\u0003$\\u0003%\\u0003\",\n \"%\\u0003&\\u0003&\\u0003\\'\\u0003\\'\\u0003(\\u0003(\\u0003(\\u0005(\\u0163\\n\",\n \"(\\u0003)\\u0003)\\u0003*\\u0003*\\u0003+\\u0003+\\u0003,\\u0003,\\u0003-\\u0003\",\n \"-\\u0003-\\u0003-\\u0003-\\u0003-\\u0003-\\u0003-\\u0003-\\u0005-\\u0176\\n-\\u0003\",\n \".\\u0003.\\u0003/\\u0003/\\u00030\\u00030\\u00070\\u017e\\n0\\f0\\u000e0\\u0181\",\n \"\\u000b0\\u00031\\u00031\\u00031\\u00031\\u00032\\u00062\\u0188\\n2\\r2\\u000e\",\n \"2\\u0189\\u00032\\u00032\\u00032\\u00032\\u00052\\u0190\\n2\\u00032\\u00062\\u0193\",\n \"\\n2\\r2\\u000e2\\u0194\\u00032\\u00032\\u00032\\u00032\\u00052\\u019b\\n2\\u0003\",\n \"2\\u00062\\u019e\\n2\\r2\\u000e2\\u019f\\u00052\\u01a2\\n2\\u00033\\u00063\\u01a5\",\n \"\\n3\\r3\\u000e3\\u01a6\\u00033\\u00033\\u00063\\u01ab\\n3\\r3\\u000e3\\u01ac\\u0003\",\n \"3\\u00063\\u01b0\\n3\\r3\\u000e3\\u01b1\\u00033\\u00033\\u00073\\u01b6\\n3\\f3\\u000e\",\n \"3\\u01b9\\u000b3\\u00033\\u00053\\u01bc\\n3\\u00034\\u00034\\u00054\\u01c0\\n4\",\n \"\\u00034\\u00064\\u01c3\\n4\\r4\\u000e4\\u01c4\\u00035\\u00035\\u00075\\u01c9\\n\",\n \"5\\f5\\u000e5\\u01cc\\u000b5\\u00035\\u00035\\u00036\\u00036\\u00056\\u01d2\\n\",\n \"6\\u00037\\u00037\\u00037\\u00057\\u01d7\\n7\\u00037\\u00037\\u00038\\u00038\\u0003\",\n \"8\\u00038\\u00039\\u00039\\u0003:\\u0006:\\u01e2\\n:\\r:\\u000e:\\u01e3\\u0003\",\n \":\\u0005:\\u01e7\\n:\\u0003;\\u0003;\\u0003<\\u0003<\\u0003=\\u0003=\\u0003=\\u0003\",\n \"=\\u0005=\\u01f1\\n=\\u0003>\\u0003>\\u0003>\\u0003>\\u0003>\\u0003>\\u0003>\\u0003\",\n \">\\u0003>\\u0003>\\u0003>\\u0005>\\u01fe\\n>\\u0003?\\u0003?\\u0003?\\u0003?\\u0003\",\n \"?\\u0003?\\u0003?\\u0003@\\u0003@\\u0003@\\u0003@\\u0007@\\u020b\\n@\\f@\\u000e\",\n \"@\\u020e\\u000b@\\u0003@\\u0005@\\u0211\\n@\\u0003@\\u0003@\\u0003@\\u0003@\\u0003\",\n \"@\\u0007@\\u0218\\n@\\f@\\u000e@\\u021b\\u000b@\\u0003@\\u0003@\\u0005@\\u021f\",\n \"\\n@\\u0003@\\u0003@\\u0003\\u0219\\u0002A\\u0003\\u0003\\u0005\\u0004\\u0007\\u0005\",\n \"\\t\\u0006\\u000b\\u0007\\r\\b\\u000f\\t\\u0011\\n\\u0013\\u000b\\u0015\\f\\u0017\\r\",\n \"\\u0019\\u000e\\u001b\\u000f\\u001d\\u0010\\u001f\\u0011!\\u0012#\\u0013%\\u0014\",\n \"\\'\\u0015)\\u0016+\\u0017-\\u0018/\\u00191\\u001a3\\u001b5\\u001c7\\u001d9\\u0002\",\n \";\\u0002=\\u0002?\\u001eA\\u001fC E!G\\\"I#K$M%O&Q\\'S(U)W*Y+[,]-_.a/c0e1g\",\n \"\\u0002i2k\\u0002m3o4q\\u0002s5u\\u0002w\\u0002y\\u0002{\\u0002}\\u0002\\u007f\",\n \"6\\u0003\\u0002\\u0012\\u0004\\u0002--//\\u0005\\u0002\\'\\',,11\\u0004\\u0002\",\n \">>@@\\u0005\\u0002C\\\\aac|\\u0006\\u00022;C\\\\aac|\\u0003\\u00022;\\u0003\\u0002\",\n \"23\\u0004\\u0002GGgg\\u0006\\u0002\\f\\f\\u000f\\u000f$$^^\\u0006\\u0002\\f\\f\\u000f\",\n \"\\u000f))^^\\u0004\\u0002\\u000b\\u000b\\\"\\\"\\u0004\\u0002\\f\\f\\u000f\\u000f\\u0005\",\n \"\\u00022;CHch\\u0003\\u000229\\n\\u0002$$))^^ddhhppttvv\\u0003\\u000225\\u0002\",\n \"\\u0237\\u0002\\u0003\\u0003\\u0002\\u0002\\u0002\\u0002\\u0005\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0002\\u0007\\u0003\\u0002\\u0002\\u0002\\u0002\\t\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0002\\u000b\\u0003\\u0002\\u0002\\u0002\\u0002\\r\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0002\\u000f\\u0003\\u0002\\u0002\\u0002\\u0002\\u0011\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0002\\u0013\\u0003\\u0002\\u0002\\u0002\\u0002\\u0015\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0002\\u0017\\u0003\\u0002\\u0002\\u0002\\u0002\\u0019\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0002\\u001b\\u0003\\u0002\\u0002\\u0002\\u0002\\u001d\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0002\\u001f\\u0003\\u0002\\u0002\\u0002\\u0002!\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0002#\\u0003\\u0002\\u0002\\u0002\\u0002%\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0002\\'\\u0003\\u0002\\u0002\\u0002\\u0002)\\u0003\\u0002\\u0002\\u0002\\u0002\",\n \"+\\u0003\\u0002\\u0002\\u0002\\u0002-\\u0003\\u0002\\u0002\\u0002\\u0002/\\u0003\",\n \"\\u0002\\u0002\\u0002\\u00021\\u0003\\u0002\\u0002\\u0002\\u00023\\u0003\\u0002\",\n \"\\u0002\\u0002\\u00025\\u0003\\u0002\\u0002\\u0002\\u00027\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0002?\\u0003\\u0002\\u0002\\u0002\\u0002A\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0002C\\u0003\\u0002\\u0002\\u0002\\u0002E\\u0003\\u0002\\u0002\\u0002\\u0002\",\n \"G\\u0003\\u0002\\u0002\\u0002\\u0002I\\u0003\\u0002\\u0002\\u0002\\u0002K\\u0003\",\n \"\\u0002\\u0002\\u0002\\u0002M\\u0003\\u0002\\u0002\\u0002\\u0002O\\u0003\\u0002\",\n \"\\u0002\\u0002\\u0002Q\\u0003\\u0002\\u0002\\u0002\\u0002S\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0002U\\u0003\\u0002\\u0002\\u0002\\u0002W\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0002Y\\u0003\\u0002\\u0002\\u0002\\u0002[\\u0003\\u0002\\u0002\\u0002\\u0002\",\n \"]\\u0003\\u0002\\u0002\\u0002\\u0002_\\u0003\\u0002\\u0002\\u0002\\u0002a\\u0003\",\n \"\\u0002\\u0002\\u0002\\u0002c\\u0003\\u0002\\u0002\\u0002\\u0002e\\u0003\\u0002\",\n \"\\u0002\\u0002\\u0002i\\u0003\\u0002\\u0002\\u0002\\u0002m\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0002o\\u0003\\u0002\\u0002\\u0002\\u0002s\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0002\\u007f\\u0003\\u0002\\u0002\\u0002\\u0003\\u0081\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0005\\u008a\\u0003\\u0002\\u0002\\u0002\\u0007\\u008f\\u0003\\u0002\\u0002\\u0002\",\n \"\\t\\u0095\\u0003\\u0002\\u0002\\u0002\\u000b\\u009c\\u0003\\u0002\\u0002\\u0002\",\n \"\\r\\u00a3\\u0003\\u0002\\u0002\\u0002\\u000f\\u00ab\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0011\\u00b5\\u0003\\u0002\\u0002\\u0002\\u0013\\u00bd\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0015\\u00c2\\u0003\\u0002\\u0002\\u0002\\u0017\\u00cc\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0019\\u00d2\\u0003\\u0002\\u0002\\u0002\\u001b\\u00d9\\u0003\\u0002\\u0002\\u0002\",\n \"\\u001d\\u00e1\\u0003\\u0002\\u0002\\u0002\\u001f\\u00e6\\u0003\\u0002\\u0002\\u0002\",\n \"!\\u00f2\\u0003\\u0002\\u0002\\u0002#\\u00f5\\u0003\\u0002\\u0002\\u0002%\\u00f9\",\n \"\\u0003\\u0002\\u0002\\u0002\\'\\u00ff\\u0003\\u0002\\u0002\\u0002)\\u0104\\u0003\",\n \"\\u0002\\u0002\\u0002+\\u010b\\u0003\\u0002\\u0002\\u0002-\\u0113\\u0003\\u0002\",\n \"\\u0002\\u0002/\\u011c\\u0003\\u0002\\u0002\\u00021\\u012c\\u0003\\u0002\\u0002\",\n \"\\u00023\\u012f\\u0003\\u0002\\u0002\\u00025\\u0135\\u0003\\u0002\\u0002\\u0002\",\n \"7\\u013b\\u0003\\u0002\\u0002\\u00029\\u0146\\u0003\\u0002\\u0002\\u0002;\\u014a\",\n \"\\u0003\\u0002\\u0002\\u0002=\\u014c\\u0003\\u0002\\u0002\\u0002?\\u014f\\u0003\",\n \"\\u0002\\u0002\\u0002A\\u0151\\u0003\\u0002\\u0002\\u0002C\\u0153\\u0003\\u0002\",\n \"\\u0002\\u0002E\\u0155\\u0003\\u0002\\u0002\\u0002G\\u0157\\u0003\\u0002\\u0002\",\n \"\\u0002I\\u0159\\u0003\\u0002\\u0002\\u0002K\\u015b\\u0003\\u0002\\u0002\\u0002\",\n \"M\\u015d\\u0003\\u0002\\u0002\\u0002O\\u0162\\u0003\\u0002\\u0002\\u0002Q\\u0164\",\n \"\\u0003\\u0002\\u0002\\u0002S\\u0166\\u0003\\u0002\\u0002\\u0002U\\u0168\\u0003\",\n \"\\u0002\\u0002\\u0002W\\u016a\\u0003\\u0002\\u0002\\u0002Y\\u0175\\u0003\\u0002\",\n \"\\u0002\\u0002[\\u0177\\u0003\\u0002\\u0002\\u0002]\\u0179\\u0003\\u0002\\u0002\",\n \"\\u0002_\\u017b\\u0003\\u0002\\u0002\\u0002a\\u0182\\u0003\\u0002\\u0002\\u0002\",\n \"c\\u01a1\\u0003\\u0002\\u0002\\u0002e\\u01bb\\u0003\\u0002\\u0002\\u0002g\\u01bd\",\n \"\\u0003\\u0002\\u0002\\u0002i\\u01c6\\u0003\\u0002\\u0002\\u0002k\\u01d1\\u0003\",\n \"\\u0002\\u0002\\u0002m\\u01d3\\u0003\\u0002\\u0002\\u0002o\\u01da\\u0003\\u0002\",\n \"\\u0002\\u0002q\\u01de\\u0003\\u0002\\u0002\\u0002s\\u01e6\\u0003\\u0002\\u0002\",\n \"\\u0002u\\u01e8\\u0003\\u0002\\u0002\\u0002w\\u01ea\\u0003\\u0002\\u0002\\u0002\",\n \"y\\u01f0\\u0003\\u0002\\u0002\\u0002{\\u01fd\\u0003\\u0002\\u0002\\u0002}\\u01ff\",\n \"\\u0003\\u0002\\u0002\\u0002\\u007f\\u021e\\u0003\\u0002\\u0002\\u0002\\u0081\\u0082\",\n \"\\u0007r\\u0002\\u0002\\u0082\\u0083\\u0007t\\u0002\\u0002\\u0083\\u0084\\u0007\",\n \"q\\u0002\\u0002\\u0084\\u0085\\u0007i\\u0002\\u0002\\u0085\\u0086\\u0007t\\u0002\",\n \"\\u0002\\u0086\\u0087\\u0007c\\u0002\\u0002\\u0087\\u0088\\u0007o\\u0002\\u0002\",\n \"\\u0088\\u0089\\u0007c\\u0002\\u0002\\u0089\\u0004\\u0003\\u0002\\u0002\\u0002\",\n \"\\u008a\\u008b\\u0007t\\u0002\\u0002\\u008b\\u008c\\u0007g\\u0002\\u0002\\u008c\",\n \"\\u008d\\u0007c\\u0002\\u0002\\u008d\\u008e\\u0007n\\u0002\\u0002\\u008e\\u0006\",\n \"\\u0003\\u0002\\u0002\\u0002\\u008f\\u0090\\u0007x\\u0002\\u0002\\u0090\\u0091\",\n \"\\u0007c\\u0002\\u0002\\u0091\\u0092\\u0007|\\u0002\\u0002\\u0092\\u0093\\u0007\",\n \"k\\u0002\\u0002\\u0093\\u0094\\u0007q\\u0002\\u0002\\u0094\\b\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0095\\u0096\\u0007n\\u0002\\u0002\\u0096\\u0097\\u0007q\\u0002\\u0002\",\n \"\\u0097\\u0098\\u0007i\\u0002\\u0002\\u0098\\u0099\\u0007k\\u0002\\u0002\\u0099\",\n \"\\u009a\\u0007e\\u0002\\u0002\\u009a\\u009b\\u0007q\\u0002\\u0002\\u009b\\n\\u0003\",\n \"\\u0002\\u0002\\u0002\\u009c\\u009d\\u0007e\\u0002\\u0002\\u009d\\u009e\\u0007\",\n \"c\\u0002\\u0002\\u009e\\u009f\\u0007f\\u0002\\u0002\\u009f\\u00a0\\u0007g\\u0002\",\n \"\\u0002\\u00a0\\u00a1\\u0007k\\u0002\\u0002\\u00a1\\u00a2\\u0007c\\u0002\\u0002\",\n \"\\u00a2\\f\\u0003\\u0002\\u0002\\u0002\\u00a3\\u00a4\\u0007k\\u0002\\u0002\\u00a4\",\n \"\\u00a5\\u0007p\\u0002\\u0002\\u00a5\\u00a6\\u0007v\\u0002\\u0002\\u00a6\\u00a7\",\n \"\\u0007g\\u0002\\u0002\\u00a7\\u00a8\\u0007k\\u0002\\u0002\\u00a8\\u00a9\\u0007\",\n \"t\\u0002\\u0002\\u00a9\\u00aa\\u0007q\\u0002\\u0002\\u00aa\\u000e\\u0003\\u0002\",\n \"\\u0002\\u0002\\u00ab\\u00ac\\u0007e\\u0002\\u0002\\u00ac\\u00ad\\u0007c\\u0002\",\n \"\\u0002\\u00ad\\u00ae\\u0007t\\u0002\\u0002\\u00ae\\u00af\\u0007c\\u0002\\u0002\",\n \"\\u00af\\u00b0\\u0007e\\u0002\\u0002\\u00b0\\u00b1\\u0007v\\u0002\\u0002\\u00b1\",\n \"\\u00b2\\u0007g\\u0002\\u0002\\u00b2\\u00b3\\u0007t\\u0002\\u0002\\u00b3\\u00b4\",\n \"\\u0007g\\u0002\\u0002\\u00b4\\u0010\\u0003\\u0002\\u0002\\u0002\\u00b5\\u00b6\",\n \"\\u0007g\\u0002\\u0002\\u00b6\\u00b7\\u0007u\\u0002\\u0002\\u00b7\\u00b8\\u0007\",\n \"e\\u0002\\u0002\\u00b8\\u00b9\\u0007q\\u0002\\u0002\\u00b9\\u00ba\\u0007n\\u0002\",\n \"\\u0002\\u00ba\\u00bb\\u0007j\\u0002\\u0002\\u00bb\\u00bc\\u0007c\\u0002\\u0002\",\n \"\\u00bc\\u0012\\u0003\\u0002\\u0002\\u0002\\u00bd\\u00be\\u0007e\\u0002\\u0002\",\n \"\\u00be\\u00bf\\u0007c\\u0002\\u0002\\u00bf\\u00c0\\u0007u\\u0002\\u0002\\u00c0\",\n \"\\u00c1\\u0007q\\u0002\\u0002\\u00c1\\u0014\\u0003\\u0002\\u0002\\u0002\\u00c2\",\n \"\\u00c3\\u0007e\\u0002\\u0002\\u00c3\\u00c4\\u0007q\\u0002\\u0002\\u00c4\\u00c5\",\n \"\\u0007p\\u0002\\u0002\\u00c5\\u00c6\\u0007v\\u0002\\u0002\\u00c6\\u00c7\\u0007\",\n \"t\\u0002\\u0002\\u00c7\\u00c8\\u0007c\\u0002\\u0002\\u00c8\\u00c9\\u0007t\\u0002\",\n \"\\u0002\\u00c9\\u00ca\\u0007k\\u0002\\u0002\\u00ca\\u00cb\\u0007q\\u0002\\u0002\",\n \"\\u00cb\\u0016\\u0003\\u0002\\u0002\\u0002\\u00cc\\u00cd\\u0007e\\u0002\\u0002\",\n \"\\u00cd\\u00ce\\u0007q\\u0002\\u0002\\u00ce\\u00cf\\u0007p\\u0002\\u0002\\u00cf\",\n \"\\u00d0\\u0007u\\u0002\\u0002\\u00d0\\u00d1\\u0007v\\u0002\\u0002\\u00d1\\u0018\",\n \"\\u0003\\u0002\\u0002\\u0002\\u00d2\\u00d3\\u0007h\\u0002\\u0002\\u00d3\\u00d4\",\n \"\\u0007w\\u0002\\u0002\\u00d4\\u00d5\\u0007p\\u0002\\u0002\\u00d5\\u00d6\\u0007\",\n \"e\\u0002\\u0002\\u00d6\\u00d7\\u0007c\\u0002\\u0002\\u00d7\\u00d8\\u0007q\\u0002\",\n \"\\u0002\\u00d8\\u001a\\u0003\\u0002\\u0002\\u0002\\u00d9\\u00da\\u0007f\\u0002\",\n \"\\u0002\\u00da\\u00db\\u0007g\\u0002\\u0002\\u00db\\u00dc\\u0007x\\u0002\\u0002\",\n \"\\u00dc\\u00dd\\u0007q\\u0002\\u0002\\u00dd\\u00de\\u0007n\\u0002\\u0002\\u00de\",\n \"\\u00df\\u0007x\\u0002\\u0002\\u00df\\u00e0\\u0007c\\u0002\\u0002\\u00e0\\u001c\",\n \"\\u0003\\u0002\\u0002\\u0002\\u00e1\\u00e2\\u0007r\\u0002\\u0002\\u00e2\\u00e3\",\n \"\\u0007c\\u0002\\u0002\\u00e3\\u00e4\\u0007t\\u0002\\u0002\\u00e4\\u00e5\\u0007\",\n \"c\\u0002\\u0002\\u00e5\\u001e\\u0003\\u0002\\u0002\\u0002\\u00e6\\u00e7\\u0007\",\n \"t\\u0002\\u0002\\u00e7\\u00e8\\u0007g\\u0002\\u0002\\u00e8\\u00e9\\u0007r\\u0002\",\n \"\\u0002\\u00e9\\u00ea\\u0007k\\u0002\\u0002\\u00ea\\u00eb\\u0007v\\u0002\\u0002\",\n \"\\u00eb\\u00ec\\u0007c\\u0002\\u0002\\u00ec\\u00ed\\u0007a\\u0002\\u0002\\u00ed\",\n \"\\u00ee\\u0007r\\u0002\\u0002\\u00ee\\u00ef\\u0007c\\u0002\\u0002\\u00ef\\u00f0\",\n \"\\u0007t\\u0002\\u0002\\u00f0\\u00f1\\u0007c\\u0002\\u0002\\u00f1 \\u0003\\u0002\",\n \"\\u0002\\u0002\\u00f2\\u00f3\\u0007f\\u0002\\u0002\\u00f3\\u00f4\\u0007g\\u0002\",\n \"\\u0002\\u00f4\\\"\\u0003\\u0002\\u0002\\u0002\\u00f5\\u00f6\\u0007c\\u0002\\u0002\",\n \"\\u00f6\\u00f7\\u0007v\\u0002\\u0002\\u00f7\\u00f8\\u0007g\\u0002\\u0002\\u00f8\",\n \"$\\u0003\\u0002\\u0002\\u0002\\u00f9\\u00fa\\u0007r\\u0002\\u0002\\u00fa\\u00fb\",\n \"\\u0007c\\u0002\\u0002\\u00fb\\u00fc\\u0007u\\u0002\\u0002\\u00fc\\u00fd\\u0007\",\n \"u\\u0002\\u0002\\u00fd\\u00fe\\u0007q\\u0002\\u0002\\u00fe&\\u0003\\u0002\\u0002\",\n \"\\u0002\\u00ff\\u0100\\u0007r\\u0002\\u0002\\u0100\\u0101\\u0007c\\u0002\\u0002\",\n \"\\u0101\\u0102\\u0007t\\u0002\\u0002\\u0102\\u0103\\u0007g\\u0002\\u0002\\u0103\",\n \"(\\u0003\\u0002\\u0002\\u0002\\u0104\\u0105\\u0007t\\u0002\\u0002\\u0105\\u0106\",\n \"\\u0007g\\u0002\\u0002\\u0106\\u0107\\u0007r\\u0002\\u0002\\u0107\\u0108\\u0007\",\n \"k\\u0002\\u0002\\u0108\\u0109\\u0007v\\u0002\\u0002\\u0109\\u010a\\u0007c\\u0002\",\n \"\\u0002\\u010a*\\u0003\\u0002\\u0002\\u0002\\u010b\\u010c\\u0007c\\u0002\\u0002\",\n \"\\u010c\\u010d\\u0007v\\u0002\\u0002\\u010d\\u010e\\u0007g\\u0002\\u0002\\u010e\",\n \"\\u010f\\u0007a\\u0002\\u0002\\u010f\\u0110\\u0007s\\u0002\\u0002\\u0110\\u0111\",\n \"\\u0007w\\u0002\\u0002\\u0111\\u0112\\u0007g\\u0002\\u0002\\u0112,\\u0003\\u0002\",\n \"\\u0002\\u0002\\u0113\\u0114\\u0007g\\u0002\\u0002\\u0114\\u0115\\u0007p\\u0002\",\n \"\\u0002\\u0115\\u0116\\u0007s\\u0002\\u0002\\u0116\\u0117\\u0007w\\u0002\\u0002\",\n \"\\u0117\\u0118\\u0007c\\u0002\\u0002\\u0118\\u0119\\u0007p\\u0002\\u0002\\u0119\",\n \"\\u011a\\u0007v\\u0002\\u0002\\u011a\\u011b\\u0007q\\u0002\\u0002\\u011b.\\u0003\",\n \"\\u0002\\u0002\\u0002\\u011c\\u011d\\u0007t\\u0002\\u0002\\u011d\\u011e\\u0007\",\n \"g\\u0002\\u0002\\u011e\\u011f\\u0007r\\u0002\\u0002\\u011f\\u0120\\u0007k\\u0002\",\n \"\\u0002\\u0120\\u0121\\u0007v\\u0002\\u0002\\u0121\\u0122\\u0007c\\u0002\\u0002\",\n \"\\u0122\\u0123\\u0007a\\u0002\\u0002\\u0123\\u0124\\u0007g\\u0002\\u0002\\u0124\",\n \"\\u0125\\u0007p\\u0002\\u0002\\u0125\\u0126\\u0007s\\u0002\\u0002\\u0126\\u0127\",\n \"\\u0007w\\u0002\\u0002\\u0127\\u0128\\u0007c\\u0002\\u0002\\u0128\\u0129\\u0007\",\n \"p\\u0002\\u0002\\u0129\\u012a\\u0007v\\u0002\\u0002\\u012a\\u012b\\u0007q\\u0002\",\n \"\\u0002\\u012b0\\u0003\\u0002\\u0002\\u0002\\u012c\\u012d\\u0007u\\u0002\\u0002\",\n \"\\u012d\\u012e\\u0007g\\u0002\\u0002\\u012e2\\u0003\\u0002\\u0002\\u0002\\u012f\",\n \"\\u0130\\u0007u\\u0002\\u0002\\u0130\\u0131\\u0007g\\u0002\\u0002\\u0131\\u0132\",\n \"\\u0007p\\u0002\\u0002\\u0132\\u0133\\u0007c\\u0002\\u0002\\u0133\\u0134\\u0007\",\n \"q\\u0002\\u0002\\u01344\\u0003\\u0002\\u0002\\u0002\\u0135\\u0136\\u0007h\\u0002\",\n \"\\u0002\\u0136\\u0137\\u0007c\\u0002\\u0002\\u0137\\u0138\\u0007n\\u0002\\u0002\",\n \"\\u0138\\u0139\\u0007u\\u0002\\u0002\\u0139\\u013a\\u0007q\\u0002\\u0002\\u013a\",\n \"6\\u0003\\u0002\\u0002\\u0002\\u013b\\u013c\\u0007x\\u0002\\u0002\\u013c\\u013d\",\n \"\\u0007g\\u0002\\u0002\\u013d\\u013e\\u0007t\\u0002\\u0002\\u013e\\u013f\\u0007\",\n \"f\\u0002\\u0002\\u013f\\u0140\\u0007c\\u0002\\u0002\\u0140\\u0141\\u0007f\\u0002\",\n \"\\u0002\\u0141\\u0142\\u0007g\\u0002\\u0002\\u0142\\u0143\\u0007k\\u0002\\u0002\",\n \"\\u0143\\u0144\\u0007t\\u0002\\u0002\\u0144\\u0145\\u0007q\\u0002\\u0002\\u0145\",\n \"8\\u0003\\u0002\\u0002\\u0002\\u0146\\u0147\\u0007p\\u0002\\u0002\\u0147\\u0148\",\n \"\\u0007c\\u0002\\u0002\\u0148\\u0149\\u0007q\\u0002\\u0002\\u0149:\\u0003\\u0002\",\n \"\\u0002\\u0002\\u014a\\u014b\\u0007G\\u0002\\u0002\\u014b<\\u0003\\u0002\\u0002\",\n \"\\u0002\\u014c\\u014d\\u0007Q\\u0002\\u0002\\u014d\\u014e\\u0007W\\u0002\\u0002\",\n \"\\u014e>\\u0003\\u0002\\u0002\\u0002\\u014f\\u0150\\u0007(\\u0002\\u0002\\u0150\",\n \"@\\u0003\\u0002\\u0002\\u0002\\u0151\\u0152\\u0007*\\u0002\\u0002\\u0152B\\u0003\",\n \"\\u0002\\u0002\\u0002\\u0153\\u0154\\u0007+\\u0002\\u0002\\u0154D\\u0003\\u0002\",\n \"\\u0002\\u0002\\u0155\\u0156\\u0007]\\u0002\\u0002\\u0156F\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0157\\u0158\\u0007_\\u0002\\u0002\\u0158H\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0159\\u015a\\u0007}\\u0002\\u0002\\u015aJ\\u0003\\u0002\\u0002\\u0002\\u015b\",\n \"\\u015c\\u0007\\u007f\\u0002\\u0002\\u015cL\\u0003\\u0002\\u0002\\u0002\\u015d\",\n \"\\u015e\\u0007.\\u0002\\u0002\\u015eN\\u0003\\u0002\\u0002\\u0002\\u015f\\u0160\",\n \"\\u0007>\\u0002\\u0002\\u0160\\u0163\\u0007/\\u0002\\u0002\\u0161\\u0163\\u0007\",\n \"\\u2192\\u0002\\u0002\\u0162\\u015f\\u0003\\u0002\\u0002\\u0002\\u0162\\u0161\\u0003\",\n \"\\u0002\\u0002\\u0002\\u0163P\\u0003\\u0002\\u0002\\u0002\\u0164\\u0165\\t\\u0002\",\n \"\\u0002\\u0002\\u0165R\\u0003\\u0002\\u0002\\u0002\\u0166\\u0167\\t\\u0003\\u0002\",\n \"\\u0002\\u0167T\\u0003\\u0002\\u0002\\u0002\\u0168\\u0169\\u0005;\\u001e\\u0002\",\n \"\\u0169V\\u0003\\u0002\\u0002\\u0002\\u016a\\u016b\\u0005=\\u001f\\u0002\\u016b\",\n \"X\\u0003\\u0002\\u0002\\u0002\\u016c\\u016d\\u0007@\\u0002\\u0002\\u016d\\u0176\",\n \"\\u0007?\\u0002\\u0002\\u016e\\u016f\\u0007?\\u0002\\u0002\\u016f\\u0176\\u0007\",\n \"?\\u0002\\u0002\\u0170\\u0171\\u0007>\\u0002\\u0002\\u0171\\u0176\\u0007?\\u0002\",\n \"\\u0002\\u0172\\u0176\\t\\u0004\\u0002\\u0002\\u0173\\u0174\\u0007#\\u0002\\u0002\",\n \"\\u0174\\u0176\\u0007?\\u0002\\u0002\\u0175\\u016c\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0175\\u016e\\u0003\\u0002\\u0002\\u0002\\u0175\\u0170\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0175\\u0172\\u0003\\u0002\\u0002\\u0002\\u0175\\u0173\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0176Z\\u0003\\u0002\\u0002\\u0002\\u0177\\u0178\\u0007<\\u0002\\u0002\\u0178\",\n \"\\\\\\u0003\\u0002\\u0002\\u0002\\u0179\\u017a\\u00059\\u001d\\u0002\\u017a^\\u0003\",\n \"\\u0002\\u0002\\u0002\\u017b\\u017f\\t\\u0005\\u0002\\u0002\\u017c\\u017e\\t\\u0006\",\n \"\\u0002\\u0002\\u017d\\u017c\\u0003\\u0002\\u0002\\u0002\\u017e\\u0181\\u0003\\u0002\",\n \"\\u0002\\u0002\\u017f\\u017d\\u0003\\u0002\\u0002\\u0002\\u017f\\u0180\\u0003\\u0002\",\n \"\\u0002\\u0002\\u0180`\\u0003\\u0002\\u0002\\u0002\\u0181\\u017f\\u0003\\u0002\",\n \"\\u0002\\u0002\\u0182\\u0183\\u0005_0\\u0002\\u0183\\u0184\\u00070\\u0002\\u0002\",\n \"\\u0184\\u0185\\u0005_0\\u0002\\u0185b\\u0003\\u0002\\u0002\\u0002\\u0186\\u0188\",\n \"\\t\\u0007\\u0002\\u0002\\u0187\\u0186\\u0003\\u0002\\u0002\\u0002\\u0188\\u0189\",\n \"\\u0003\\u0002\\u0002\\u0002\\u0189\\u0187\\u0003\\u0002\\u0002\\u0002\\u0189\\u018a\",\n \"\\u0003\\u0002\\u0002\\u0002\\u018a\\u01a2\\u0003\\u0002\\u0002\\u0002\\u018b\\u018c\",\n \"\\u00072\\u0002\\u0002\\u018c\\u0190\\u0007z\\u0002\\u0002\\u018d\\u018e\\u0007\",\n \"2\\u0002\\u0002\\u018e\\u0190\\u0007Z\\u0002\\u0002\\u018f\\u018b\\u0003\\u0002\",\n \"\\u0002\\u0002\\u018f\\u018d\\u0003\\u0002\\u0002\\u0002\\u0190\\u0192\\u0003\\u0002\",\n \"\\u0002\\u0002\\u0191\\u0193\\u0005u;\\u0002\\u0192\\u0191\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0193\\u0194\\u0003\\u0002\\u0002\\u0002\\u0194\\u0192\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0194\\u0195\\u0003\\u0002\\u0002\\u0002\\u0195\\u01a2\\u0003\\u0002\\u0002\",\n \"\\u0002\\u0196\\u0197\\u00072\\u0002\\u0002\\u0197\\u019b\\u0007d\\u0002\\u0002\",\n \"\\u0198\\u0199\\u00072\\u0002\\u0002\\u0199\\u019b\\u0007D\\u0002\\u0002\\u019a\",\n \"\\u0196\\u0003\\u0002\\u0002\\u0002\\u019a\\u0198\\u0003\\u0002\\u0002\\u0002\\u019b\",\n \"\\u019d\\u0003\\u0002\\u0002\\u0002\\u019c\\u019e\\t\\b\\u0002\\u0002\\u019d\\u019c\",\n \"\\u0003\\u0002\\u0002\\u0002\\u019e\\u019f\\u0003\\u0002\\u0002\\u0002\\u019f\\u019d\",\n \"\\u0003\\u0002\\u0002\\u0002\\u019f\\u01a0\\u0003\\u0002\\u0002\\u0002\\u01a0\\u01a2\",\n \"\\u0003\\u0002\\u0002\\u0002\\u01a1\\u0187\\u0003\\u0002\\u0002\\u0002\\u01a1\\u018f\",\n \"\\u0003\\u0002\\u0002\\u0002\\u01a1\\u019a\\u0003\\u0002\\u0002\\u0002\\u01a2d\",\n \"\\u0003\\u0002\\u0002\\u0002\\u01a3\\u01a5\\t\\u0007\\u0002\\u0002\\u01a4\\u01a3\",\n \"\\u0003\\u0002\\u0002\\u0002\\u01a5\\u01a6\\u0003\\u0002\\u0002\\u0002\\u01a6\\u01a4\",\n \"\\u0003\\u0002\\u0002\\u0002\\u01a6\\u01a7\\u0003\\u0002\\u0002\\u0002\\u01a7\\u01a8\",\n \"\\u0003\\u0002\\u0002\\u0002\\u01a8\\u01aa\\u00070\\u0002\\u0002\\u01a9\\u01ab\",\n \"\\t\\u0007\\u0002\\u0002\\u01aa\\u01a9\\u0003\\u0002\\u0002\\u0002\\u01ab\\u01ac\",\n \"\\u0003\\u0002\\u0002\\u0002\\u01ac\\u01aa\\u0003\\u0002\\u0002\\u0002\\u01ac\\u01ad\",\n \"\\u0003\\u0002\\u0002\\u0002\\u01ad\\u01bc\\u0003\\u0002\\u0002\\u0002\\u01ae\\u01b0\",\n \"\\t\\u0007\\u0002\\u0002\\u01af\\u01ae\\u0003\\u0002\\u0002\\u0002\\u01b0\\u01b1\",\n \"\\u0003\\u0002\\u0002\\u0002\\u01b1\\u01af\\u0003\\u0002\\u0002\\u0002\\u01b1\\u01b2\",\n \"\\u0003\\u0002\\u0002\\u0002\\u01b2\\u01b3\\u0003\\u0002\\u0002\\u0002\\u01b3\\u01b7\",\n \"\\u00070\\u0002\\u0002\\u01b4\\u01b6\\t\\u0007\\u0002\\u0002\\u01b5\\u01b4\\u0003\",\n \"\\u0002\\u0002\\u0002\\u01b6\\u01b9\\u0003\\u0002\\u0002\\u0002\\u01b7\\u01b5\\u0003\",\n \"\\u0002\\u0002\\u0002\\u01b7\\u01b8\\u0003\\u0002\\u0002\\u0002\\u01b8\\u01ba\\u0003\",\n \"\\u0002\\u0002\\u0002\\u01b9\\u01b7\\u0003\\u0002\\u0002\\u0002\\u01ba\\u01bc\\u0005\",\n \"g4\\u0002\\u01bb\\u01a4\\u0003\\u0002\\u0002\\u0002\\u01bb\\u01af\\u0003\\u0002\",\n \"\\u0002\\u0002\\u01bcf\\u0003\\u0002\\u0002\\u0002\\u01bd\\u01bf\\t\\t\\u0002\\u0002\",\n \"\\u01be\\u01c0\\t\\u0002\\u0002\\u0002\\u01bf\\u01be\\u0003\\u0002\\u0002\\u0002\",\n \"\\u01bf\\u01c0\\u0003\\u0002\\u0002\\u0002\\u01c0\\u01c2\\u0003\\u0002\\u0002\\u0002\",\n \"\\u01c1\\u01c3\\t\\u0007\\u0002\\u0002\\u01c2\\u01c1\\u0003\\u0002\\u0002\\u0002\",\n \"\\u01c3\\u01c4\\u0003\\u0002\\u0002\\u0002\\u01c4\\u01c2\\u0003\\u0002\\u0002\\u0002\",\n \"\\u01c4\\u01c5\\u0003\\u0002\\u0002\\u0002\\u01c5h\\u0003\\u0002\\u0002\\u0002\",\n \"\\u01c6\\u01ca\\u0007$\\u0002\\u0002\\u01c7\\u01c9\\u0005k6\\u0002\\u01c8\\u01c7\",\n \"\\u0003\\u0002\\u0002\\u0002\\u01c9\\u01cc\\u0003\\u0002\\u0002\\u0002\\u01ca\\u01c8\",\n \"\\u0003\\u0002\\u0002\\u0002\\u01ca\\u01cb\\u0003\\u0002\\u0002\\u0002\\u01cb\\u01cd\",\n \"\\u0003\\u0002\\u0002\\u0002\\u01cc\\u01ca\\u0003\\u0002\\u0002\\u0002\\u01cd\\u01ce\",\n \"\\u0007$\\u0002\\u0002\\u01cej\\u0003\\u0002\\u0002\\u0002\\u01cf\\u01d2\\n\\n\\u0002\",\n \"\\u0002\\u01d0\\u01d2\\u0005y=\\u0002\\u01d1\\u01cf\\u0003\\u0002\\u0002\\u0002\",\n \"\\u01d1\\u01d0\\u0003\\u0002\\u0002\\u0002\\u01d2l\\u0003\\u0002\\u0002\\u0002\",\n \"\\u01d3\\u01d6\\u0007)\\u0002\\u0002\\u01d4\\u01d7\\u0005y=\\u0002\\u01d5\\u01d7\",\n \"\\n\\u000b\\u0002\\u0002\\u01d6\\u01d4\\u0003\\u0002\\u0002\\u0002\\u01d6\\u01d5\",\n \"\\u0003\\u0002\\u0002\\u0002\\u01d7\\u01d8\\u0003\\u0002\\u0002\\u0002\\u01d8\\u01d9\",\n \"\\u0007)\\u0002\\u0002\\u01d9n\\u0003\\u0002\\u0002\\u0002\\u01da\\u01db\\t\\f\\u0002\",\n \"\\u0002\\u01db\\u01dc\\u0003\\u0002\\u0002\\u0002\\u01dc\\u01dd\\b8\\u0002\\u0002\",\n \"\\u01ddp\\u0003\\u0002\\u0002\\u0002\\u01de\\u01df\\u0007=\\u0002\\u0002\\u01df\",\n \"r\\u0003\\u0002\\u0002\\u0002\\u01e0\\u01e2\\t\\r\\u0002\\u0002\\u01e1\\u01e0\\u0003\",\n \"\\u0002\\u0002\\u0002\\u01e2\\u01e3\\u0003\\u0002\\u0002\\u0002\\u01e3\\u01e1\\u0003\",\n \"\\u0002\\u0002\\u0002\\u01e3\\u01e4\\u0003\\u0002\\u0002\\u0002\\u01e4\\u01e7\\u0003\",\n \"\\u0002\\u0002\\u0002\\u01e5\\u01e7\\u0005q9\\u0002\\u01e6\\u01e1\\u0003\\u0002\",\n \"\\u0002\\u0002\\u01e6\\u01e5\\u0003\\u0002\\u0002\\u0002\\u01e7t\\u0003\\u0002\",\n \"\\u0002\\u0002\\u01e8\\u01e9\\t\\u000e\\u0002\\u0002\\u01e9v\\u0003\\u0002\\u0002\",\n \"\\u0002\\u01ea\\u01eb\\t\\u000f\\u0002\\u0002\\u01ebx\\u0003\\u0002\\u0002\\u0002\",\n \"\\u01ec\\u01ed\\u0007^\\u0002\\u0002\\u01ed\\u01f1\\t\\u0010\\u0002\\u0002\\u01ee\",\n \"\\u01f1\\u0005}?\\u0002\\u01ef\\u01f1\\u0005{>\\u0002\\u01f0\\u01ec\\u0003\\u0002\",\n \"\\u0002\\u0002\\u01f0\\u01ee\\u0003\\u0002\\u0002\\u0002\\u01f0\\u01ef\\u0003\\u0002\",\n \"\\u0002\\u0002\\u01f1z\\u0003\\u0002\\u0002\\u0002\\u01f2\\u01f3\\u0007^\\u0002\",\n \"\\u0002\\u01f3\\u01f4\\t\\u0011\\u0002\\u0002\\u01f4\\u01f5\\u0005w<\\u0002\\u01f5\",\n \"\\u01f6\\u0005w<\\u0002\\u01f6\\u01fe\\u0003\\u0002\\u0002\\u0002\\u01f7\\u01f8\",\n \"\\u0007^\\u0002\\u0002\\u01f8\\u01f9\\u0005w<\\u0002\\u01f9\\u01fa\\u0005w<\\u0002\",\n \"\\u01fa\\u01fe\\u0003\\u0002\\u0002\\u0002\\u01fb\\u01fc\\u0007^\\u0002\\u0002\",\n \"\\u01fc\\u01fe\\u0005w<\\u0002\\u01fd\\u01f2\\u0003\\u0002\\u0002\\u0002\\u01fd\",\n \"\\u01f7\\u0003\\u0002\\u0002\\u0002\\u01fd\\u01fb\\u0003\\u0002\\u0002\\u0002\\u01fe\",\n \"|\\u0003\\u0002\\u0002\\u0002\\u01ff\\u0200\\u0007^\\u0002\\u0002\\u0200\\u0201\",\n \"\\u0007w\\u0002\\u0002\\u0201\\u0202\\u0005u;\\u0002\\u0202\\u0203\\u0005u;\\u0002\",\n \"\\u0203\\u0204\\u0005u;\\u0002\\u0204\\u0205\\u0005u;\\u0002\\u0205~\\u0003\\u0002\",\n \"\\u0002\\u0002\\u0206\\u0207\\u00071\\u0002\\u0002\\u0207\\u0208\\u00071\\u0002\",\n \"\\u0002\\u0208\\u020c\\u0003\\u0002\\u0002\\u0002\\u0209\\u020b\\n\\r\\u0002\\u0002\",\n \"\\u020a\\u0209\\u0003\\u0002\\u0002\\u0002\\u020b\\u020e\\u0003\\u0002\\u0002\\u0002\",\n \"\\u020c\\u020a\\u0003\\u0002\\u0002\\u0002\\u020c\\u020d\\u0003\\u0002\\u0002\\u0002\",\n \"\\u020d\\u0210\\u0003\\u0002\\u0002\\u0002\\u020e\\u020c\\u0003\\u0002\\u0002\\u0002\",\n \"\\u020f\\u0211\\u0007\\u000f\\u0002\\u0002\\u0210\\u020f\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0210\\u0211\\u0003\\u0002\\u0002\\u0002\\u0211\\u0212\\u0003\\u0002\\u0002\\u0002\",\n \"\\u0212\\u021f\\u0007\\f\\u0002\\u0002\\u0213\\u0214\\u00071\\u0002\\u0002\\u0214\",\n \"\\u0215\\u0007,\\u0002\\u0002\\u0215\\u0219\\u0003\\u0002\\u0002\\u0002\\u0216\",\n \"\\u0218\\u000b\\u0002\\u0002\\u0002\\u0217\\u0216\\u0003\\u0002\\u0002\\u0002\\u0218\",\n \"\\u021b\\u0003\\u0002\\u0002\\u0002\\u0219\\u021a\\u0003\\u0002\\u0002\\u0002\\u0219\",\n \"\\u0217\\u0003\\u0002\\u0002\\u0002\\u021a\\u021c\\u0003\\u0002\\u0002\\u0002\\u021b\",\n \"\\u0219\\u0003\\u0002\\u0002\\u0002\\u021c\\u021d\\u0007,\\u0002\\u0002\\u021d\",\n \"\\u021f\\u00071\\u0002\\u0002\\u021e\\u0206\\u0003\\u0002\\u0002\\u0002\\u021e\",\n \"\\u0213\\u0003\\u0002\\u0002\\u0002\\u021f\\u0220\\u0003\\u0002\\u0002\\u0002\\u0220\",\n \"\\u0221\\b@\\u0003\\u0002\\u0221\\u0080\\u0003\\u0002\\u0002\\u0002\\u001e\\u0002\",\n \"\\u0162\\u0175\\u017f\\u0189\\u018f\\u0194\\u019a\\u019f\\u01a1\\u01a6\\u01ac\\u01b1\",\n \"\\u01b7\\u01bb\\u01bf\\u01c4\\u01ca\\u01d1\\u01d6\\u01e3\\u01e6\\u01f0\\u01fd\\u020c\",\n \"\\u0210\\u0219\\u021e\\u0004\\b\\u0002\\u0002\\u0002\\u0003\\u0002\"].join(\"\");\n\n\nvar atn = new antlr4.atn.ATNDeserializer().deserialize(serializedATN);\n\nvar decisionsToDFA = atn.decisionToState.map( function(ds, index) { return new antlr4.dfa.DFA(ds, index); });\n\nfunction ivprog(input) {\n\tantlr4.Lexer.call(this, input);\n this._interp = new antlr4.atn.LexerATNSimulator(this, atn, decisionsToDFA, new antlr4.PredictionContextCache());\n return this;\n}\n\nivprog.prototype = Object.create(antlr4.Lexer.prototype);\nivprog.prototype.constructor = ivprog;\n\nivprog.EOF = antlr4.Token.EOF;\nivprog.RK_PROGRAM = 1;\nivprog.RK_REAL = 2;\nivprog.RK_VOID = 3;\nivprog.RK_BOOLEAN = 4;\nivprog.RK_STRING = 5;\nivprog.RK_INTEGER = 6;\nivprog.RK_CHARACTER = 7;\nivprog.RK_SWITCH = 8;\nivprog.RK_CASE = 9;\nivprog.RK_DEFAULT = 10;\nivprog.RK_CONST = 11;\nivprog.RK_FUNCTION = 12;\nivprog.RK_RETURN = 13;\nivprog.RK_FOR = 14;\nivprog.RK_FOR_ALT = 15;\nivprog.RK_FOR_FROM = 16;\nivprog.RK_FOR_TO = 17;\nivprog.RK_FOR_PASS = 18;\nivprog.RK_BREAK = 19;\nivprog.RK_DO = 20;\nivprog.RK_DO_UNTIL = 21;\nivprog.RK_WHILE = 22;\nivprog.RK_WHILE_ALT = 23;\nivprog.RK_IF = 24;\nivprog.RK_ELSE = 25;\nivprog.RK_FALSE = 26;\nivprog.RK_TRUE = 27;\nivprog.RK_REFERENCE = 28;\nivprog.OPEN_PARENTHESIS = 29;\nivprog.CLOSE_PARENTHESIS = 30;\nivprog.OPEN_BRACE = 31;\nivprog.CLOSE_BRACE = 32;\nivprog.OPEN_CURLY = 33;\nivprog.CLOSE_CURLY = 34;\nivprog.COMMA = 35;\nivprog.EQUAL = 36;\nivprog.SUM_OP = 37;\nivprog.MULTI_OP = 38;\nivprog.AND_OPERATOR = 39;\nivprog.OR_OPERATOR = 40;\nivprog.RELATIONAL_OPERATOR = 41;\nivprog.COLON = 42;\nivprog.NOT_OPERATOR = 43;\nivprog.ID = 44;\nivprog.LIB_ID = 45;\nivprog.INTEGER = 46;\nivprog.REAL = 47;\nivprog.STRING = 48;\nivprog.CHARACTER = 49;\nivprog.WHITESPACE = 50;\nivprog.EOS = 51;\nivprog.COMMENTS = 52;\n\nivprog.prototype.channelNames = [ \"DEFAULT_TOKEN_CHANNEL\", \"HIDDEN\" ];\n\nivprog.prototype.modeNames = [ \"DEFAULT_MODE\" ];\n\nivprog.prototype.literalNames = [ null, \"'programa'\", \"'real'\", \"'vazio'\", \n \"'logico'\", \"'cadeia'\", \"'inteiro'\", \"'caractere'\", \n \"'escolha'\", \"'caso'\", \"'contrario'\", \n \"'const'\", \"'funcao'\", \"'devolva'\", \"'para'\", \n \"'repita_para'\", \"'de'\", \"'ate'\", \"'passo'\", \n \"'pare'\", \"'repita'\", \"'ate_que'\", \"'enquanto'\", \n \"'repita_enquanto'\", \"'se'\", \"'senao'\", \n \"'falso'\", \"'verdadeiro'\", \"'&'\", \"'('\", \n \"')'\", \"'['\", \"']'\", \"'{'\", \"'}'\", \"','\", \n null, null, null, null, null, null, \"':'\" ];\n\nivprog.prototype.symbolicNames = [ null, \"RK_PROGRAM\", \"RK_REAL\", \"RK_VOID\", \n \"RK_BOOLEAN\", \"RK_STRING\", \"RK_INTEGER\", \n \"RK_CHARACTER\", \"RK_SWITCH\", \"RK_CASE\", \n \"RK_DEFAULT\", \"RK_CONST\", \"RK_FUNCTION\", \n \"RK_RETURN\", \"RK_FOR\", \"RK_FOR_ALT\", \n \"RK_FOR_FROM\", \"RK_FOR_TO\", \"RK_FOR_PASS\", \n \"RK_BREAK\", \"RK_DO\", \"RK_DO_UNTIL\", \"RK_WHILE\", \n \"RK_WHILE_ALT\", \"RK_IF\", \"RK_ELSE\", \"RK_FALSE\", \n \"RK_TRUE\", \"RK_REFERENCE\", \"OPEN_PARENTHESIS\", \n \"CLOSE_PARENTHESIS\", \"OPEN_BRACE\", \"CLOSE_BRACE\", \n \"OPEN_CURLY\", \"CLOSE_CURLY\", \"COMMA\", \n \"EQUAL\", \"SUM_OP\", \"MULTI_OP\", \"AND_OPERATOR\", \n \"OR_OPERATOR\", \"RELATIONAL_OPERATOR\", \n \"COLON\", \"NOT_OPERATOR\", \"ID\", \"LIB_ID\", \n \"INTEGER\", \"REAL\", \"STRING\", \"CHARACTER\", \n \"WHITESPACE\", \"EOS\", \"COMMENTS\" ];\n\nivprog.prototype.ruleNames = [ \"RK_PROGRAM\", \"RK_REAL\", \"RK_VOID\", \"RK_BOOLEAN\", \n \"RK_STRING\", \"RK_INTEGER\", \"RK_CHARACTER\", \n \"RK_SWITCH\", \"RK_CASE\", \"RK_DEFAULT\", \"RK_CONST\", \n \"RK_FUNCTION\", \"RK_RETURN\", \"RK_FOR\", \"RK_FOR_ALT\", \n \"RK_FOR_FROM\", \"RK_FOR_TO\", \"RK_FOR_PASS\", \n \"RK_BREAK\", \"RK_DO\", \"RK_DO_UNTIL\", \"RK_WHILE\", \n \"RK_WHILE_ALT\", \"RK_IF\", \"RK_ELSE\", \"RK_FALSE\", \n \"RK_TRUE\", \"RK_LOGICAL_NOT\", \"RK_LOGICAL_AND\", \n \"RK_LOGICAL_OR\", \"RK_REFERENCE\", \"OPEN_PARENTHESIS\", \n \"CLOSE_PARENTHESIS\", \"OPEN_BRACE\", \"CLOSE_BRACE\", \n \"OPEN_CURLY\", \"CLOSE_CURLY\", \"COMMA\", \"EQUAL\", \n \"SUM_OP\", \"MULTI_OP\", \"AND_OPERATOR\", \"OR_OPERATOR\", \n \"RELATIONAL_OPERATOR\", \"COLON\", \"NOT_OPERATOR\", \n \"ID\", \"LIB_ID\", \"INTEGER\", \"REAL\", \"ExponentPart\", \n \"STRING\", \"STRING_CHARACTER\", \"CHARACTER\", \n \"WHITESPACE\", \"SEMICOLON\", \"EOS\", \"HEX_DIGIT\", \n \"OCTAL_DIGIT\", \"ESC_SEQ\", \"ESC_OCTAL\", \"ESC_UNICODE\", \n \"COMMENTS\" ];\n\nivprog.prototype.grammarFileName = \"ivprog.g4\";\n\n\n\nexports.ivprog = ivprog;\n\n\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = {\nivprog: __webpack_require__(0).ivprog\n};\n\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports) {\n\nmodule.exports = require(\"antlr4/index\");\n\n/***/ })\n/******/ ]);","/* This is a dictionary of the language defined functions\n**/\nexport default {\n main_function: \"inicio\",\n $read: \"leia\",\n $write: \"escreva\",\n $numElements: \"total_de_elementos\",\n $matrixLines: \"total_de_linhas\",\n $matrixColumns: \"total_de_colunas\",\n $substring: \"subcadeia\",\n $length: \"comprimento\",\n $uppercase: \"caixa_alta\",\n $lowercase: \"caixa_baixa\",\n $charAt: \"texto_na_posicao\",\n $isReal: \"e_real\",\n $isInt: \"e_inteiro\",\n $isBool: \"e_logico\",\n $castReal: \"como_real\",\n $castInt: \"como_inteiro\",\n $castBool: \"como_logico\",\n $castString: \"como_cadeia\",\n $sin: \"seno\",\n $cos: \"cosseno\",\n $tan: \"tangente\",\n $sqrt: \"raiz_quadrada\",\n $pow: \"potencia\",\n $log: \"logaritmo\",\n $abs: \"modulo\",\n $negate: \"trocar_sinal\",\n $invert: \"inverter_valor\",\n $max: \"maximo\",\n $min: \"minimo\",\n $rand: \"numero_aleatorio\"\n}","/**\n * This is the dictionary of the language defined libraries\n */\nexport default {\n $mathLib: \"Matematica\",\n $ioLib: \"ES\",\n $strLib: \"Texto\",\n $arrayLib: \"Arranjo\",\n $langLib: \"Conversao\"\n}","module.exports = {\"pt\":{\"token_missing_one\":\"Erro de sintaxe: Espera-se $0, mas encontrou-se $1 na linha:$2, coluna:$3\",\"token_missing_two\":\"Erro de sintaxe: Esperava-se $0 ou $1 mas encontrou-se $2 na liha:$3, coluna: $4\",\"eos_missing\":\"Falta uma nova linha ou ; na linha: $0, coluna: $1\",\"invalid_type\":\"$0 na linha: $1, coluna: $2 é um tipo inválido. Os tipos válidos são: $3\",\"invalid_array_dimension\":\"A dimensão inválida na linha: $0, coluna: $1. Insira um $2 ou identificador válido do mesmo tipo.\",\"invalid_array_size\":\"O tamnho do vetor/matriz excede o máximo de 2 na linha $0\",\"extra_lines\":\"Nenhum texto é permitido após '}' em 'programa {...}'\",\"invalid_main_return\":\"A função $0 declarada na linha $2 deve retornar $1.\",\"invalid_var_declaration\":\"Erro na linha $0: variáveis só podem ser declaradas no corpo principal da função e nas primeiras linhas, antes de qualquer comando.\",\"invalid_break_command\":\"Erro na linha $0. O comando $1 não pode ser usado fora de uma estrutura de repetição ou 'escolha...caso'\",\"invalid_terminal\":\"Não é possível utilizar $0 na expressão da linha: $1, coluna: $2. Tente um valor númerico, variável ou chamada de função.\",\"const_not_init\":\"Erro na linha: $0, coluna: $1. Uma variável declarada como const deve ser inicializada\",\"id_missing\":\"Esperava-se um identificador, mas encontrou-se $0 na linha: $1, coluna: $2\",\"invalid_id_format\":\"$0 na linha: $1, coluna: $2 não é um identificador válido. O símbolo '.' não é permitido neste contexto.\",\"main_missing\":\"A função principal não foi encontrada\",\"invalid_global_var\":\"Erro crítico: Chamada inválida da função initGlobal fora do contexto BASE\",\"not_implemented\":\"Erro interno crítico: A função definida pelo sistema $0 não foi implementada.\",\"function_missing\":\"A função $0 não foi encontrada\",\"function_missing_full\":\"A função $0 na linha: $1, coluna: $2 não foi encontrada\",\"invalid_parameters_size_full\":\"Erro na linha $0: a quantidade de parâmetros fornecidos à função $1 está incorreta. Esperava-se $2, encontrou-se $3.\",\"invalid_parameters_size\":\"A quantidade de parâmetros fornecidos à função $0 está incorreta. Esperava-se $1, encontrou-se $2\",\"invalid_ref_full\":\"A expressão $0 fornecida como parâmetro para a função $1 na linha $2 não é válida para esta função. Use uma variável ou posição de vetor.\",\"invalid_ref\":\"A expressão $0 fornecida como parâmetro para a função $1 não é válida para esta função. Use uma variável ou posição de vetor.\",\"invalid_parameter_type_full\":\"A expressão $0 fornecida como parâmetro para a função $1 na linha $2 não é compatível com o tipo esperado.\",\"invalid_parameter_type\":\"A expressão $0 fornecida como parâmetro para a função $1 não é compatível com o tipo esperado.\",\"unknown_command_full\":\"Erro interno crítico: comando desconhecido encontrado na linha $0\",\"unknown_command\":\"Erro interno crítico: comando desconhecido encontrado!\",\"loop_condition_type_full\":\"Erro na linha: $0, coluna $1: a condição $2 do laço de repetição deve ser do tipo lógico\",\"loop_condition_type\":\"A condição $0 do laço de repetição deve ser do tipo lógico\",\"endless_loop_full\":\"Possível laço infinito detectado no seu código. Verifique a linha $0\",\"endless_loop\":\"Possível laço infinito detectado no seu código.\",\"for_condition_type_full\":\"Erro na linha: $0, coluna $1: a condição de parada $2 do comando para(...) deve ser do tipo lógico\",\"for_condition_type\":\"A condição de parada $0 do comando para(...) deve ser do tipo lógico\",\"if_condition_type_full\":\"Erro na linha: $0, coluna $1: a condição $2 do comando se...senao deve ser do tipo lógico\",\"if_condition_type\":\"A condição $0 do comando se...senao deve ser do tipo lógico\",\"invalid_return_type_full\":\"Erro na linha $0: a expressão não produz um tipo compatível com a função $1. Tipo esperado: $2.\",\"invalid_return_type\":\"A expressão não produz um tipo compatível com a função $0. Tipo esperado: $1.\",\"invalid_void_return_full\":\"Erro na linha $0: a função $1 não pode retornar uma expressão vazia, use uma espressão do tipo $2\",\"invalid_void_return\":\"A função $0 não pode retornar uma expressão vazia, use uma espressão do tipo $1\",\"unexpected_break_command_full\":\"Erro interno crítico: comando pare encontrado fora do contexto de um laço/escolha..caso na linha $0\",\"unexpected_break_command\":\"Erro interno crítico: comando pare encontrado fora do contexto de um laço/escolha..caso\",\"invalid_dimension\":\"As dimensões de um vetor/matriz devem ser do tipo inteiro\",\"void_in_expression_full\":\"Erro na linha: $0, coluna: $1: a função $2 não pode ser utilizada em uma expressão pois seu tipo de retorno é vazio\",\"void_in_expression\":\"A função $0 não pode ser utilizada em uma expressão pois seu tipo de retorno é vazio\",\"invalid_array_access_full\":\"Identificador $0 na linha: $1, coluna: $2 não se refere a um vetor/matriz válido\",\"invalid_array_access\":\"Identificador $0 não se refere a um vetor/matriz válido\",\"invalid_matrix_access_full\":\"Identificador $0 na linha: $1, coluna: $2 não se refere a uma matriz válida\",\"invalid_matrix_access\":\"Identificador $0 não se refere a uma matriz válida\",\"matrix_column_outbounds_full\":\"Erro na linha $0: número de colunas $1 é inválido para a matriz $2 que possui $3 colunas\",\"matrix_column_outbounds\":\"Número de colunas $0 é inválido para a matriz $1 que possui $2 colunas\",\"matrix_line_outbounds_full\":\"Erro na linha $0: número de linhas $1 é inválido para a matriz $2 que possui $3 linhas\",\"matrix_line_outbounds\":\"Número de linhas $0 é inválido para a matriz $1 que possui $2 linhas\",\"vector_line_outbounds_full\":\"Erro na linha $0: O número de elementos $1 é inválido para a vetor $2 que possui $3 elementos.\",\"vector_line_outbounds\":\"O número de elementos $1 é inválido para a vetor $2 que possui $3 elementos.\",\"vector_not_matrix_full\":\"Erro na linha $0: $1 não é uma matriz\",\"vector_not_matrix\":\"$0 não é uma matriz\",\"invalid_infix_op_full\":\"Erro na linha $0: a expressão $1 é inválida, pois o operador $2 não pode ser aplicado aos tipos $3 e $4\",\"invalid_infix_op\":\"A expressão $0 é inválida, pois o operador $1 não pode ser aplicado aos tipos $2 e $3\",\"invalid_unary_op_full\":\"Erro na linha $0: a expressão $1 é inválida, pois o operador $2 não pode ser aplicado ao tipo $3\",\"invalid_unary_op\":\"A expressão $0 é inválida, pois o operador $1 não pode ser aplicado ao tipo $2\",\"unknown_op\":\"Erro interno crítico: Operação $0 desconhecida\",\"duplicate_function\":\"A função $0 na linha: $1, coluna: $2 já foi definida anteriormente.\",\"duplicate_variable\":\"A variável $0 na linha: $1, coluna: $2 já foi declarada anteriormente.\",\"main_parameters\":\"A função inicio não pode ter parâmetros.\",\"symbol_not_found_full\":\"A variável $0 na linha: $1, coluna: $2 não foi declarada\",\"symbol_not_found\":\"A variável $0 não foi declarada\",\"array_dimension_not_int_full\":\"As dimensões do arranjo (vetor ou matriz) na linha $0 devem ser do tipo inteiro.\",\"array_dimension_not_int\":\"As dimensões de um arranjo (vetor ou matriz) devem ser do tipo inteiro.\",\"array_dimension_not_positive_full\":\"As dimensões do arranjo (vetor ou matriz) na linha $0 devem ser valores positivos.\",\"array_dimension_not_positive\":\"As dimensões de um arranjo (vetor ou matriz) devem ser valores positivos.\",\"incompatible_types_full\":\"Era esperado um $0 mas a expressão $1 na linha $2 resulta em $3.\",\"incompatible_types\":\"Era esperado um $0 mas a expressão $1 resulta em $2.\",\"incompatible_types_array_full\":\"A expressão $0 na linha $2 é incompatível com o tipo $1.\",\"incompatible_types_array\":\"A expressão $0 é incompatível com o tipo $1.\",\"invalid_case_type_full\":\"O caso $0 na linha $1 é incompatível com o tipo $2.\",\"invalid_case_type\":\"O caso $0 é incompatível com o tipo $1.\",\"function_no_return\":\"A função $0 não possui um comando de devolução acessível. Toda função deve ter ao menos um comando 'devolva' no seu corpo principal.\",\"invalid_array_literal_type_full\":\"Erro na linha $0: a expressão $1 não resulta em um tipo compatível.\",\"invalid_array_literal_type\":\"A expressão $0 não resulta em um tipo compatível.\",\"invalid_array_literal_line_full\":\"Erro na linha $0: esperava-se $1 linhas mas encontrou $2.\",\"invalid_array_literal_line\":\"Esperava-se $0 linhas mas encontrou $1.\",\"invalid_array_literal_column_full\":\"Erro na linha $0: esperava-se $1 colunas mas encontrou $2.\",\"invalid_array_literal_column\":\"Esperava-se $0 colunas mas encontrou $1.\",\"exceeded_input_request\":\"A quantidade de leituras requisitadas execedeu a quantidade de entradas disponíveis.\",\"test_case_few_reads\":\"Caso de teste $0 falhou: ainda restam entradas!\",\"test_case_failed\":\"
Caso de teste $0 não executou com sucesso.
\",\"test_case_failed_exception\":\"
Caso de teste $0 falhou: $1\",\"test_case_exception\":\"Ocorreu uma exceção no caso de teste $0: $1\",\"invalid_type_conversion\":\"O valor $0 não pode ser convertido para o tipo $1\",\"invalid_read_type\":\"Erro na linha $0: A entrada \\\"$1\\\" não é do tipo $2, que é o tipo da variável $3.\",\"invalid_read_type_array\":\"Erro na linha $0: A entrada \\\"$1\\\" não é do tipo $2, que é o tipo aceito pela variável $3 que é um $4.\",\"inform_valid_identifier\":\"Informe um nome válido! O nome não pode ser uma palavra reservadas e deve começar com letras ou _ e conter apenas letras, números e _.\",\"inform_valid_global_duplicated\":\"Já existe uma variável global com o nome $0, você precisa de nomes distintos.\",\"inform_valid_variable_duplicated\":\"Já existe uma variável com o nome $0 na função $1, você precisa de nomes distintos.\",\"inform_valid_function_duplicated\":\"Já existe uma função com o nome $0, você precisa de nomes distintos.\",\"inform_valid_param_duplicated\":\"Já existe um parâmetro com o nome $0 na função $1, você precisa de nomes distintos.\",\"invalid_character\":\"O caractere $0 na linha $1 não pode ser utilizado neste contexto.\",\"annonymous_array_literal\":\"Erro na linha $0: a notação de vetor/matriz só permitida durante a inicialização de uma variável desse tipo. Ex: inteiro vec[3] ← {1,2,3}.\",\"invalid_matrix_literal_line\":\"A expressão $0 na linha $1 não possui um número de elementos igual a linha anterior. Todas as linhas de uma matriz devem ter a mesma quantidade de elementos.\",\"cannot_infer_matrix_line\":\"Não é possível inferir o número de linhas da matriz $0 na linha $1. É necessário que ela seja inicializada ou que o valor seja informado de forma explícita.\",\"cannot_infer_matrix_column\":\"Não é possível inferir o número de colunas da matriz $0 na linha $1. É necessário que ela seja inicializada ou que o valor seja informado de forma explícita.\",\"cannot_infer_vector_size\":\"Não é possível inferir o número de elementos do vetor $0 na linha $1. É necessário que ele seja inicializado ou que o valor seja informado de forma explícita\",\"matrix_to_vector_literal_attr\":\"Erro na linha $0: A expressão $1 representa uma matriz e não pode ser atribuída ao vetor $2.\",\"vector_to_matrix_literal_attr\":\"Erro na linha $0: A expressão $1 representa um vetor e não pode ser atribuído a matriz $2.\",\"invalid_const_ref_full\":\"A variável $0 fornecida como parâmetro para a função $1 na linha $2 é uma constante e não pode ser usada neste contexto. Use uma variável ou posição de vetor.\",\"invalid_const_ref\":\"A variável $0 fornecida como parâmetro para a função $1 é uma constante e não pode ser usada neste contexto. Use uma variável ou posição de vetor.\",\"invalid_const_assignment_full\":\"Erro na linha $0: $1 é uma constante e portanto não pode ter seu valor alterado\",\"invalid_const_assignment\":\"$0 é uma constante e portanto não pode ter seu valor alterado\",\"array_init_not_literal\":\"Erro na linha $0: Vetor/Matriz só pode ser inicializado por literal. Ex: real vetor[] <- {1,2,3}\",\"array_exceeds_2d\":\"Erro na linha $0: O número máximo de dimensões que um arranjo pode ter é 2. Elemento de 3 ou mais dimensões encontrado!\",\"invalid_matrix_id_dimension\":\"Erro na linha $0: Você deve definir todas as dimensões da matriz quando uma delas é definida por uma variável! Ex: real mat1[var][5], mat2[5][var]\",\"invalid_vector_init\":\"Erro na linha $0: Não se pode inicializar um vetor que teve seu tamanho declarado utilizando uma variável! Utilize uma atribuição de vetores ou use um laço de repetição.\",\"invalid_matrix_init\":\"Erro na linha $0: Não se pode inicializar uma matrix que teve ao menos uma das suas dimensões declaradas utilizando uma variável! Utilize uma atribuição de matrizes ou use um laço de repetição.\",\"invalid_vector_assignment_full\":\"Erro na linha $0: Só se pode atribuir um vetor a outro desde que eles comportem o mesmo número de elementos. $1 comporta $2 e $3 comporta $4!\",\"invalid_vector_assignment\":\"Só se pode atribuir um vetor a outro desde que eles comportem o mesmo número de elementos. $0 comporta $1 e $2 comporta $3!\",\"invalid_matrix_assignment_full\":\"Erro na linha $0: Só se pode atribuir uma matriz a outra desde que ambas possuam dimensões de mesmo tamanho. $1 tem $2 linhas e $3 colunas, enquanto $4 possui $5 linhas e $6 colunas!\",\"invalid_matrix_assignment\":\"Só se pode atribuir uma matriz a outra desde que ambas possuam dimensões de mesmo tamanho. $0 tem $1 linhas e $2 colunas, enquanto $3 possui $4 linhas e $5 colunas!\",\"matrix_to_vector_attr\":\"Erro na linha $0: $1 representa uma matriz e não pode ser atribuída ao vetor $2.\",\"vector_to_matrix_attr\":\"Erro na linha $0: $1 representa um vetor e não pode ser atribuído a matriz $2.\",\"invalid_matrix_index_assign_full\":\"Erro na linha $0: A posição $1 da matriz $2 aceita apenas vetores de tamanho $3, mas $4 tem tamanho $5\",\"invalid_matrix_index_assign\":\"A linha $0 da matriz $1 aceita apenas vetores de tamanho $2, mas $3 tem tamanho $4\",\"invalid_number_elements_vector\":\"Esperava-se por $0 elementos na linha $1 mas a expressão $2 possui $3 elementos.\",\"invalid_number_lines_matrix\":\"Esperava-se por uma matriz com $0 linhas na linha $1 mas a expressão $2 possui $3 linhas\",\"divsion_by_zero_full\":\"Erro na linha $0: A expressão $1 resulta em uma divisão por 0.\",\"divsion_by_zero\":\"A expressão $0 resulta em uma divisão por 0.\",\"undefined_tanget_value\":\"Erro na linha $0: A tangente de $1° não é indefinida.\",\"negative_log_value\":\"Erro na linha $0: Não se pode calcular o log de um valor negativo.\",\"invalid_string_index\":\"Erro na linha $0 durante a execução da função $1: $2 é um índice inválido para a cadeia de texto $3. Os valores válidos vão de 0 à $4\",\"negative_sqrt_value\":\"Erro na linha $0: Não é permitido calcular a raiz quadrada de um número negativo.\",\"exceeded_recursive_calls\":\"Erro na execução da linha $0: Número de chamadas recursivas execedeu o limite máximo definido!\",\"invalid_for_variable\":\"Erro na linha $0: A variavel $1 utilizada no comando repita_para deve ser do tipo inteiro.\",\"invalid_for_from\":\"Erro na linha $0: O valor $1 passado para o parâmetro 'de' do comando repita_para deve ser do tipo inteiro.\",\"invalid_for_to\":\"Erro na linha $0: O valor $1 passado para o parâmetro 'para' do comando repita_para deve ser do tipo inteiro.\",\"invalid_for_pass\":\"Erro na linha $0: O valor $1 passado para o parâmetro 'passo' do comando repita_para deve ser do tipo inteiro.\",\"exceed_max_instructions\":\"Número de instruções excedeu o limite definido. Certifique-se que seu código não possui laços infinitos ou muitas chamadas de funções recursivas.\"},\"en\":{\"token_missing_one\":\"Syntax error: Expected $0 but found $1 at line:$2, column:$3\",\"token_missing_two\":\"Syntax error: Expected $0 or $1 but found $2 at line:$3, column: $4\",\"eos_missing\":\"A new line or a ‘;’ is missing at line: $0, column: $1\",\"invalid_type\":\"$0 at line: $1, column: $2 is a invalid type. The valid types are: $3\",\"invalid_array_dimension\":\"Invalid dimension at line: $0, column: $1. Insert a $2 or a valid identifier of the same type.\",\"invalid_array_size\":\"The array at line $0 exceeds the maximum size of 2.\",\"extra_lines\":\"No text is allowed after '}' in 'program { … }'\",\"invalid_main_return\":\"The function $0 declared at line $2 must return $1.\",\"invalid_var_declaration\":\"Error at line $0: Variables can only be declared in the main body of a function and at the first lines, before any command.\",\"invalid_break_command\":\"Error at line $0. The command $1 cannot be used outside a loop command or ‘switch ...case’ structure.\",\"invalid_terminal\":\"It is not possible to use $0 in the expression at line: $1, column: $2. Try a numeric value, variable or function call.\",\"const_not_init\":\"Error at line: $0, column: $1. A variable declared as const must be initialized.\",\"id_missing\":\"Expected an identifier but found $0 at line: $1, column: $2.\",\"invalid_id_format\":\"$0 at line: $1, column: $2 is not a valid identifier. The symbol '.' is not permitted in this context.\",\"main_missing\":\"The main function was not found. You need to declare a function of return type void named main.\",\"invalid_global_var\":\"Critical Error: Invalid call of the function IVProgProcessor.initGlobal outside the BASE context.\",\"not_implemented\":\"Critial internal error: The system defined function $0 was not found.\",\"function_missing\":\"The function $0 was not found.\",\"function_missing_full\":\"The function $0 at line: $1, column: $2 was not found.\",\"invalid_parameters_size_full\":\"Error at line $0: The number of parameters provided to the function $1 is incorrect. It expected $2 but found $3.\",\"invalid_parameters_size\":\"The number of parameters provided to the function $0 is incorrect. It expected $1 but found $2.\",\"invalid_ref_full\":\"The expression $0 provided as a parameter to the function $1 at line $2 is not valid in this context. Use a variable or a position of a vector.\",\"invalid_ref\":\"The expression $0 provided as a parameter to the function $1 is not valid in this context. Use a variable or a position of a vector.\",\"invalid_parameter_type_full\":\"The expression $0 provided as a parameter to the function $1 at line $2 is not of the expected type.\",\"invalid_parameter_type\":\"The expression $0 provided as a parameter to the function $1 is not of the expected type.\",\"unknown_command_full\":\"Internal error: an unknown command found at line $0.\",\"unknown_command\":\"Internal error: an unknown command found.\",\"loop_condition_type_full\":\"Error at line: $0, column $1: the condition $2 of the loop must be of type bool (true or false).\",\"loop_condition_type\":\"The condition $0 of the loop must be of type bool (true or false).\",\"endless_loop_full\":\"Possible infinite loop detected in your code. Check line $0.\",\"endless_loop\":\"Possible infinite loop detected in your code.\",\"for_condition_type_full\":\"Erro na linha: $0, coluna $1: a condição de parada $2 do comando para(...) deve ser do tipo lógico\",\"for_condition_type\":\"A condição de parada $0 do comando para(...) deve ser do tipo lógico\",\"if_condition_type_full\":\"Error at line: $0, column $1: the condition $2 in the if … else command must result in a bool (true or false).\",\"if_condition_type\":\"The condition $0 in the if … else command must result in a bool (true or false).\",\"invalid_return_type_full\":\"Error at line $0: The expression doest not result in a type compatible with the function $1. Expected type: $2.\",\"invalid_return_type\":\"The expression doest not result in a type compatible with the function $0. Expected type: $1.\",\"invalid_void_return_full\":\"Error at line $0: The function $1 cannot return an empty expression, use an expression that results in a $2\",\"invalid_void_return\":\"The function $0 cannot return an empty expression, use an expression that results in a $1\",\"unexpected_break_command_full\":\"Critical error at line $0: a break command was found outside a valid context: loop or switch … case structure.\",\"unexpected_break_command\":\"Critical error: a break command was found outside a valid context: loop or switch … case structure.\",\"invalid_dimension\":\"Array (vector or matrix) dimensions must be of type int.\",\"void_in_expression_full\":\"Error at line: $0, column: $1: The function $2 cannot be used inside an expression since its return type is void.\",\"void_in_expression\":\"The function $0 cannot be used inside an expression since its return type is void.\",\"invalid_array_access_full\":\"Identifier $0 at line: $1, column: $2 does not identify a valid vector or matrix.\",\"invalid_array_access\":\"Identifier $0 does not identify a valid vector or matrix.\",\"invalid_matrix_access_full\":\"Identifier $0 at line: $1, column: $2 does not identify a valid matrix.\",\"invalid_matrix_access\":\"Identifier $0 does not identify a valid matrix.\",\"matrix_column_outbounds_full\":\"Error at line $0: The number of columns $1 is invalid for the matrix $2 which has $3 columns.\",\"matrix_column_outbounds\":\"The number of columns $0 is invalid for the matrix $1 which has $2 columns.\",\"matrix_line_outbounds_full\":\"Error at line $0: The number of lines $1 is invalid for matrix $2 which has $3 lines.\",\"matrix_line_outbounds\":\"The number of lines $0 is invalid for matrix $1 which has $2 lines.\",\"vector_line_outbounds_full\":\"Error at line $0: The number of elements $1 is invalid for vector $2 which has $3 elements.\",\"vector_line_outbounds\":\"Error at line $0: The number of elements $1 is invalid for vector $2 which has $3 elements.\",\"vector_not_matrix_full\":\"Error at line $0: $1 is not a matrix.\",\"vector_not_matrix\":\"$0 is not a matrix.\",\"invalid_infix_op_full\":\"Error at line $0: The expression $1 is not valid because the operator $2 cannot be applied to the types $3 and $4.\",\"invalid_infix_op\":\"The expression $0 is not valid because the operator $1 cannot be applied to the types $2 and $3.\",\"invalid_unary_op_full\":\"Error at line $0: The expression $1 is not valid because the operator $2 cannot be applied to the type $3.\",\"invalid_unary_op\":\"The expression $0 is not valid because the operator $1 cannot be applied to the type $2.\",\"unknown_op\":\"Critical error: Unknown operator $0.\",\"duplicate_function\":\"The function $0 at line: $1, column: $2 has already been declared.\",\"duplicate_variable\":\"The variable $0 at line: $1, column: $2 has already been declared.\",\"main_parameters\":\"The main function cannot have parameters.\",\"symbol_not_found_full\":\"The variable $0 at line: $1, column: $2 has not been declared.\",\"symbol_not_found\":\"The variable $0 has not been declared.\",\"array_dimension_not_int_full\":\"The array (vector or matrix) dimensions at line $0 must be of type int.\",\"array_dimension_not_int\":\"An array (vector or matrix) dimensions must be of type int.\",\"array_dimension_not_positive_full\":\"The array (vector or matrix) dimensions at line $0 must be positive.\",\"array_dimension_not_positive\":\"An array (vector or matrix) dimensions must be positive.\",\"incompatible_types_full\":\"It expected $0 but the expression $1 at line $2 results in $3.\",\"incompatible_types\":\"It expected $0 but the expression $1 results in $2.\",\"incompatible_types_array_full\":\"The expression $0 at line $2 is not compatible with type $1.\",\"incompatible_types_array\":\"The expression $0 is not compatible with type $1.\",\"invalid_case_type_full\":\"The case expression $0 at line $1 is not compatible with type $2.\",\"invalid_case_type\":\"The case expression $0 is not compatible with type $1.\",\"function_no_return\":\"The function $0 does not have a reacheable return command. Every function must have at least one return command in its main body.\",\"invalid_array_literal_type_full\":\"Error at line $0: the expression $1 does not result in a compatible type.\",\"invalid_array_literal_type\":\"The expression $0 does not result in a compatible type.\",\"invalid_array_literal_line_full\":\"Error at line $0: it expected $1 lines but found $2.\",\"invalid_array_literal_line\":\"It expected $0 lines but found $1.\",\"invalid_array_literal_column_full\":\"Error at line $0: it expected $1 column but found $2.\",\"invalid_array_literal_column\":\"It expected $0 column but found $1.\",\"exceeded_input_request\":\"The amount of reads requested exceeded the amount of inputs available.\",\"test_case_few_reads\":\"Teste case $0 failed: there are available inputs remaining.\",\"test_case_failed\":\"
Test case $0 did not executed successfully.
\",\"test_case_failed_exception\":\"
Test case $0 failed: $1\",\"test_case_exception\":\"An exception has ocurred during the execution of test case $0: $1\",\"invalid_type_conversion\":\"The value $0 cannot be converted to type $1.\",\"invalid_read_type\":\"Error at line $0: The input \\\"$1\\\" is not of type $2 which is the type of the variable $3.\",\"invalid_read_type_array\":\"Error at line $0: The input \\\"$1\\\" is not of type $2 which is the type accepted by the variable $3 of type $4.\",\"inform_valid_identifier\":\"Enter a valid identifier! The identifier cannot be a reserved word and it must begin with a letter or _, followed by numbers, letters and _ only.\",\"inform_valid_global_duplicated\":\"A global variable named $0 already exists, you need distinct names for each gloval variable.\",\"inform_valid_variable_duplicated\":\"A variable named $0 already exists, you need distinct names for each variable.\",\"inform_valid_function_duplicated\":\"A function named $0 already exists, you need distinct names for each function.\",\"inform_valid_param_duplicated\":\"A parameter named $0 already exists in function $1, you need distinc names for each parameter.\",\"invalid_character\":\"The character $0 at line $1 cannot be used in this context.\",\"annonymous_array_literal\":\"Error at line $0: the array notation is only permitted during initialization of an array variable. i. e.: int vec[3] ← {1, 2, 3}.\",\"invalid_matrix_literal_line\":\"The expression $0 at line $1 does not have the same number of elements as the last line. All lines of a matrix must have the same number of elements.\",\"cannot_infer_matrix_line\":\"It is not possible to infer the number of lines of matrix $0 at line $1. It must be initialized or have its lines explicitly declared.\",\"cannot_infer_matrix_column\":\"It is not possible to infer the number of columns of matrix $0 at line $1. It must be initialized or have its columns explicitly declared.\",\"cannot_infer_vector_size\":\"It is not possible to infer the number of elements of vector $0 at line $1. It must be initialized or have its size explicitly declard.\",\"matrix_to_vector_literal_attr\":\"Error at line $0: The expression $1 represents a matrix and cannot be assigned to the vector $2.\",\"vector_to_matrix_literal_attr\":\"Error at line $0: The expression $1 represents a vector and cannot be assigned to the matrix $2.\",\"invalid_const_ref_full\":\"The variable $0 provided as a parameter to the function $1 at line $2 is a constant and cannot be used in this context. Use a non-constant variable or vector position.\",\"invalid_const_ref\":\"The variable $0 provided as a parameter to the function $1 is a constant and cannot be used in this context. Use a non-constant variable or vector position.\",\"invalid_const_assignment_full\":\"Error at line $0: $1 is a constant e therefore cannot have its value changed.\",\"invalid_const_assignment\":\"$0 is a constant e therefore cannot have its value changed.\",\"array_init_not_literal\":\"Error at line $0: An array (vector or matrix) can only be initialized by an array literal. i.e : real vector[] <- {1,2,3}\",\"array_exceeds_2d\":\"Error at line $0: The maximum number of dimensions an array can have is 2. An element of 3 or dimensions was found.\",\"invalid_matrix_id_dimension\":\"Error at line $0: You must define all dimensions of the matrix when one of them is defined by a variable! i.e: real mat1[var][5], mat2[5][var]\",\"invalid_vector_init\":\"Error at line $0: You cannot initialize a vector when its size is defined by a variable. Use a vector assignment or loop command.\",\"invalid_matrix_init\":\"Error at line $0: You cannot initialize a matrix when one of its dimensions is defined by a variable. Use a matrix assignment or loop command.\",\"invalid_vector_assignment_full\":\"Error at line $0: You can only assign a vector to another when both have the same number of elements. $1 has $2 and $3 has $4 elements!\",\"invalid_vector_assignment\":\"You can only assign a vector to another when both have the same number of elements. $0 has $1 and $2 has $3 elements!\",\"invalid_matrix_assignment_full\":\"Error at line $0: You can only assign a matrix to another when both have dimensions of the same size. $1 has $2 lines e $3 columns while $4 has $5 lines and $6 columns!\",\"invalid_matrix_assignment\":\"You can only assign a matrix to another when both have dimensions of the same size. $0 has $1 lines e $2 columns while $3 has $4 lines and $5 columns!\",\"matrix_to_vector_attr\":\"Error at line $0: $1 represents a matrix and cannot be assigned to the vector $2.\",\"vector_to_matrix_attr\":\"Error at line $0: $1 represents a vector and cannot be assigned to the matrix $2.\",\"invalid_matrix_index_assign_full\":\"Error at line $0: The position $1 of the matrix $2 only accepts vectors of size $3 but $4 has size $5.\",\"invalid_matrix_index_assign\":\"The position $0 of the matrix $1 only accepts vectors of size $2 but $3 has size $4.\",\"invalid_number_elements_vector\":\"It expected $0 elements at line $1 but the expression $2 has $3 elements.\",\"invalid_number_lines_matrix\":\"It expected a matrix with $0 lines at line $1 but the expression $2 has $3 lines.\",\"divsion_by_zero_full\":\"Error at line $0: The expression $1 resuts in a division by zero.\",\"divsion_by_zero\":\"The expression $0 resuts in a division by zero.\",\"undefined_tanget_value\":\"Error at line $0: The tangent of $1° is undefined.\",\"negative_log_value\":\"Error at line $0: You cannot calculate the logarithm of a negative value.\",\"invalid_string_index\":\"Error at line $0 during the execution of the function $1: $2 is an invalid index for the text string $3. The valid indexes go from 0 to $4.\",\"negative_sqrt_value\":\"Error at line $0: It is not allowd to calculate the square root of a negative number.\",\"exceeded_recursive_calls\":\"Error during the execution of line $0: The number of recursive calls exceeded the allowed number of calls.\",\"invalid_for_variable\":\"Error at line $0: The variable $1 used in the repeat_for command must be of type int.\",\"invalid_for_from\":\"Error at line $0: The value $1 passed to the parameter 'from' of the repeat_for command must be of type int.\",\"invalid_for_to\":\"Error at line $0: The value $1 passed to the parameter 'to' of the repeat_for command must be of type int.\",\"invalid_for_pass\":\"Error at line $0: The value $1 passed to the parameter 'pass' of the repeat_for command must be of type int.\",\"exceed_max_instructions\":\"The number of instructions executed by your program exceed the defined limit. Check your code for infinite loops or excessive recursive functions calls.\"},\"es\":{\"token_missing_one\":\" \",\"token_missing_two\":\" \",\"eos_missing\":\" \",\"invalid_type\":\" \",\"invalid_array_dimension\":\" \",\"invalid_array_size\":\" \",\"extra_lines\":\" \",\"invalid_main_return\":\" \",\"invalid_var_declaration\":\" \",\"invalid_break_command\":\" \",\"invalid_terminal\":\" \",\"const_not_init\":\" \",\"id_missing\":\" \",\"invalid_id_format\":\" \",\"main_missing\":\" \",\"invalid_global_var\":\" \",\"not_implemented\":\" \",\"function_missing\":\" \",\"function_missing_full\":\" \",\"invalid_parameters_size_full\":\" \",\"invalid_parameters_size\":\" \",\"invalid_ref_full\":\" \",\"invalid_ref\":\" \",\"invalid_parameter_type_full\":\" \",\"invalid_parameter_type\":\" \",\"unknown_command_full\":\" \",\"unknown_command\":\" \",\"loop_condition_type_full\":\" \",\"loop_condition_type\":\" \",\"endless_loop_full\":\" \",\"endless_loop\":\" \",\"for_condition_type_full\":\" \",\"for_condition_type\":\" \",\"if_condition_type_full\":\" \",\"if_condition_type\":\" \",\"invalid_return_type_full\":\" \",\"invalid_return_type\":\" \",\"invalid_void_return_full\":\" \",\"invalid_void_return\":\" \",\"unexpected_break_command_full\":\" \",\"unexpected_break_command\":\" \",\"invalid_dimension\":\" \",\"void_in_expression_full\":\" \",\"void_in_expression\":\" \",\"invalid_array_access_full\":\" \",\"invalid_array_access\":\" \",\"invalid_matrix_access_full\":\" \",\"invalid_matrix_access\":\" \",\"matrix_column_outbounds_full\":\" \",\"matrix_column_outbounds\":\" \",\"matrix_line_outbounds_full\":\" \",\"matrix_line_outbounds\":\" \",\"vector_line_outbounds_full\":\" \",\"vector_line_outbounds\":\" \",\"vector_not_matrix_full\":\" \",\"vector_not_matrix\":\" \",\"invalid_infix_op_full\":\" \",\"invalid_infix_op\":\" \",\"invalid_unary_op_full\":\" \",\"invalid_unary_op\":\" \",\"unknown_op\":\" \",\"duplicate_function\":\" \",\"duplicate_variable\":\" \",\"main_parameters\":\" \",\"symbol_not_found_full\":\" \",\"symbol_not_found\":\" \",\"array_dimension_not_int_full\":\" \",\"array_dimension_not_int\":\" \",\"array_dimension_not_positive_full\":\" \",\"array_dimension_not_positive\":\" \",\"incompatible_types_full\":\" \",\"incompatible_types\":\" \",\"incompatible_types_array_full\":\" \",\"incompatible_types_array\":\" \",\"invalid_case_type_full\":\" \",\"invalid_case_type\":\" \",\"function_no_return\":\" \",\"invalid_array_literal_type_full\":\" \",\"invalid_array_literal_type\":\" \",\"invalid_array_literal_line_full\":\" \",\"invalid_array_literal_line\":\" \",\"invalid_array_literal_column_full\":\" \",\"invalid_array_literal_column\":\" \",\"exceeded_input_request\":\" \",\"test_case_few_reads\":\" \",\"test_case_failed\":\" \",\"test_case_failed_exception\":\" \",\"test_case_exception\":\" \",\"invalid_type_conversion\":\" \",\"invalid_read_type\":\" \",\"invalid_read_type_array\":\" \",\"inform_valid_identifier\":\" \",\"inform_valid_global_duplicated\":\" \",\"inform_valid_variable_duplicated\":\" \",\"inform_valid_function_duplicated\":\" \",\"inform_valid_param_duplicated\":\" \",\"invalid_character\":\" \",\"annonymous_array_literal\":\" \",\"invalid_matrix_literal_line\":\" \",\"cannot_infer_matrix_line\":\" \",\"cannot_infer_matrix_column\":\" \",\"cannot_infer_vector_size\":\" \",\"matrix_to_vector_literal_attr\":\" \",\"vector_to_matrix_literal_attr\":\" \",\"invalid_const_ref_full\":\" \",\"invalid_const_ref\":\" \",\"invalid_const_assignment_full\":\" \",\"invalid_const_assignment\":\" \",\"array_init_not_literal\":\" \",\"array_exceeds_2d\":\" \",\"invalid_matrix_id_dimension\":\" \",\"invalid_vector_init\":\" \",\"invalid_matrix_init\":\" \",\"invalid_vector_assignment_full\":\" \",\"invalid_vector_assignment\":\" \",\"invalid_matrix_assignment_full\":\" \",\"invalid_matrix_assignment\":\" \",\"matrix_to_vector_attr\":\" \",\"vector_to_matrix_attr\":\" \",\"invalid_matrix_index_assign_full\":\" \",\"invalid_matrix_index_assign\":\" \",\"invalid_number_elements_vector\":\" \",\"invalid_number_lines_matrix\":\" \",\"divsion_by_zero_full\":\" \",\"divsion_by_zero\":\" \",\"undefined_tanget_value\":\" \",\"negative_log_value\":\" \",\"invalid_string_index\":\" \",\"negative_sqrt_value\":\" \",\"exceeded_recursive_calls\":\" \",\"invalid_for_variable\":\"\",\"invalid_for_from\":\"\",\"invalid_for_to\":\"\",\"invalid_for_pass\":\"\",\"exceed_max_instructions\":\"\"}}","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/// \nconst Messages = require(\"./message.csv\");\nconst UI = require(\"./ui.csv\");\nconst Errors = require(\"./error.csv\");\nconst MessagesObj = Messages;\nconst UIObj = UI;\nconst ErrorsObj = Errors;\nconst i18n_data = {};\nfor (const key in UIObj) {\n const data = {};\n data['error'] = ErrorsObj[key];\n data['message'] = MessagesObj[key];\n data['ui'] = UIObj[key];\n i18n_data[key] = data;\n}\nexports.default = i18n_data;\n","module.exports = {\"pt\":{\"test_case_success\":\"
Caso de teste $0: OK
\",\"test_case_duration\":\"Levou $0ms\",\"test_suite_grade\":\"A sua solução alcançou $0% da nota.\",\"awaiting_input_message\":\"O seu programa está em execução e aguardando uma entrada! Digite algo e pressione ENTER...\",\"assessment-empty-expected-tooltip\":\"A saída gerada foi além do esperado\",\"assessment-empty-generated-tooltip\":\"O programa não gerou saídas suficientes\",\"testcase_autogen_unused_input\":\"O caso de teste $0 possui mais entradas do que as leituras feitas no programa.\",\"testcase_autogen_empty\":\"O caso de teste $0 não gerou qualquer saída.\",\"success_execution\":\"Programa executado com sucesso!\",\"aborted_execution\":\"A execução do programa foi interrompida!\",\"unexpected_execution_error\":\"Erro inesperado durante a execução do programa.\"},\"en\":{\"test_case_success\":\"
Test case $0: OK
\",\"test_case_duration\":\"Took $0ms\",\"test_suite_grade\":\"Your solution scored $0% of the grade.\",\"awaiting_input_message\":\"Your program is running and awaiting for an input. Type something and press ENTER…\",\"assessment-empty-expected-tooltip\":\"The generated output was beyond the amount expected\",\"assessment-empty-generated-tooltip\":\"The program did not generated enough outputs\",\"testcase_autogen_unused_input\":\"The test case $0 has more inputs than output than the number of reads present in the algorithm.\",\"testcase_autogen_empty\":\"The test case $0 did not generate any output.\",\"success_execution\":\"Program executed successfully!\",\"aborted_execution\":\"Program execution was aborted!\",\"unexpected_execution_error\":\"Unexpected error during program execution.\"},\"es\":{\"test_case_success\":\" \",\"test_case_duration\":\" \",\"test_suite_grade\":\" \",\"awaiting_input_message\":\" \",\"assessment-empty-expected-tooltip\":\" \",\"assessment-empty-generated-tooltip\":\" \",\"testcase_autogen_unused_input\":\" \",\"testcase_autogen_empty\":\" \",\"success_execution\":\"\",\"aborted_execution\":\"\",\"unexpected_execution_error\":\"\"}}","module.exports = {\"pt\":{\"function\":\"funcao\",\"btn_clear\":\"Limpar\",\"btn_function\":\"Função\",\"btn_arithmetic_plus\":\"Adição\",\"btn_arithmetic_minus\":\"Subtração\",\"btn_arithmetic_multiplication\":\"Multiplicação\",\"btn_arithmetic_division\":\"Divisão\",\"btn_arithmetic_module\":\"Módulo\",\"btn_break\":\"Pare\",\"btn_case\":\"Caso\",\"start\":\"inicio\",\"type_void\":\"vazio\",\"type_integer\":\"inteiro\",\"logic_operator_and\":\"E\",\"logic_operator_or\":\"OU\",\"logic_operator_not\":\"nao\",\"type_real\":\"real\",\"program\":\"programa\",\"type_text\":\"cadeia\",\"textvar_default_value\":\"texto\",\"type_boolean\":\"logico\",\"logic_value_true\":\"verdadeiro\",\"logic_value_false\":\"falso\",\"variable\":\"Variável\",\"command\":\"Comando\",\"new_parameter\":\"parametro\",\"new_variable\":\"variavel\",\"new_global\":\"global\",\"new_function\":\"nova_funcao\",\"matrix\":\"matriz\",\"vector\":\"vetor\",\"text_comment_start\":\"Comentário inicial da função...\",\"text_comment_main\":\"Esta é a função principal...\",\"text_read_var\":\"Entrada/Leitura de dados\",\"text_write_var\":\"Saída/Escrita de dados\",\"text_command_read\":\"leia\",\"text_command_write\":\"escreva\",\"text_return\":\"devolva\",\"text_btn_return\":\"Devolver\",\"text_comment\":\"Comentário\",\"string_join_or\":\"ou\",\"matrix_info_string\":\"matriz de $0\",\"vector_info_string\":\"vetor de $0\",\"text_attribution\":\"Atribuição\",\"text_if\":\"se\",\"text_break\":\"pare\",\"text_else\":\"senao\",\"text_for\":\"repita_para\",\"text_code_while\":\"repita_enquanto\",\"text_code_do\":\"repita\",\"text_code_do_until\":\"ate_que\",\"text_command_do\":\"repita\",\"text_command_while\":\"repita enquanto\",\"text_command_do_until\":\"até que\",\"text_code_switch\":\"escolha\",\"text_code_case\":\"caso\",\"text_config_programming\":\"Programação\",\"text_config_programming_both\":\"Visual e textual\",\"text_config_programming_textual\":\"Textual\",\"text_config_programming_visual\":\"Visual\",\"text_logic_expression\":\"Lógicos\",\"text_arithmetic_expression\":\"Aritméticos\",\"text_iftrue\":\"Se verdadeiro então\",\"text_message_error_activity_file\":\"Aconteceu um erro ao processar a atividade.
Recarregue a página para tentar novamente.\",\"text_message_error_activity_reload\":\"Recarregar\",\"text_repeatNtimes\":\"Repita N vezes\",\"text_receives\":\"recebe\",\"text_whiletrue\":\"Enquanto verdadeiro\",\"text_dowhiletrue\":\"Repita até que verdadeiro\",\"text_switch\":\"Escolha\",\"text_functioncall\":\"Chamada de função\",\"text_value\":\"Valor\",\"text_operator\":\"Operador\",\"text_parentheses\":\"Parênteses\",\"text_change\":\"Alterar\",\"text_teacher_algorithm\":\"Algoritmo\",\"text_teacher_algorithm_include\":\"Incluir o algoritmo abaixo no exercício\",\"text_teacher_test_case\":\"Casos de teste\",\"text_teacher_config\":\"Configurações\",\"text_teacher_data_types\":\"Tipos de dados\",\"text_teacher_commands\":\"Comandos\",\"text_teacher_functions\":\"Funções\",\"text_teacher_create_functions\":\"Criar novas funções\",\"text_teacher_create_movement_functions\":\"Movimentar funções\",\"text_teacher_test_case_input\":\"Entrada\",\"text_teacher_test_case_output\":\"Saída\",\"text_teacher_test_case_actions\":\"Ações\",\"text_teacher_test_case_add\":\"Adicionar caso de teste\",\"text_header_ivprog_functions\":\"Funções do iVProg\",\"text_menu_functions_math\":\"Matemática\",\"text_menu_functions_text\":\"Texto\",\"text_menu_functions_array\":\"Arranjo\",\"text_menu_functions_conversion\":\"Conversão\",\"text_no_variable\":\"Nenhuma variável declarada\",\"text_no_variable_instruction\":\"Antes de utilizar uma variável, é necessário criá-la\",\"text_ivprog_description\":\"Programação Visual interativa na Internet\",\"tooltip_visual\":\"Programação visual\",\"tooltip_textual\":\"Programação textual\",\"tooltip_upload\":\"Upload de código fonte\",\"tooltip_download\":\"Download do código fonte\",\"tooltip_undo\":\"Desfazer\",\"tooltip_redo\":\"Refazer\",\"tooltip_run\":\"Executar o programa\",\"tooltip_evaluate\":\"Avaliar o programa\",\"tooltip_help\":\"Ajuda\",\"tooltip_add_global\":\"Adicionar variável global\",\"tooltip_hide_function\":\"Ocultar os elementos da função\",\"var_menu_select_var\":\"Selecione uma variável\",\"var_menu_select_all\":\"Selecione\",\"var_menu_select_function\":\"Selecione uma função\",\"expression_menu_select\":\"Construir uma expressão lógica\",\"inform_valid_content\":\"Informe o conteúdo!\",\"inform_valid_expression\":\"Construa uma expressão lógica!\",\"tooltip_terminal_clear\":\"Limpa o terminal removendo todos os textos já escritos e os pendentes.\",\"tooltip_terminal_show\":\"Exibe o terminal caso esteja escondido\",\"tooltip_terminal_hide\":\"Esconde o terminal caso não esteja escondido\",\"text_ivprog_version\":\"Versão\",\"text_teacher_filter\":\"Filtro\",\"text_teacher_filter_active\":\"Ativado\",\"text_teacher_filter_help\":\"Ao ativar o filtro, as modificações do iVProg estarão bloqueadas.\",\"text_join_assessment_outputs\":\" ; \",\"assessment-detail-time-label\":\"Duração\",\"assessment-detail-grade-label\":\"Nota\",\"assessment-detail-input-label\":\"Entradas\",\"assessment-detail-output-label\":\"Saídas\",\"assessment-detail-expected-label\":\"Esperava\",\"assessment-detail-generated-label\":\"Gerou\",\"assessment-detail-result-label\":\"Resultado\",\"assessment-detail-title\":\"Caso de Teste $0\",\"text_teacher_generate_outputs\":\"Gerar saídas\",\"text_teacher_generate_outputs_algorithm\":\"Antes de gerar as saídas, elabore um algoritmo!\",\"text_code_for_from\":\"de\",\"text_code_for_to\":\"ate\",\"text_code_for_pass\":\"passo\",\"text_for_from\":\"de\",\"text_for_to\":\"até\",\"text_for_pass\":\"passo\",\"text_relational_expression\":\"Relacionais\",\"initial_program_code\":\"programa {\\\\n\\\\n\\\\t\\\\tfuncao vazio inicio () {\\\\n\\\\t\\\\t\\\\t// Inicie seu codigo aqui!\\\\n\\\\t\\\\t}\\\\n}\"},\"en\":{\"function\":\"function\",\"btn_clear\":\"Clean\",\"btn_function\":\"Function\",\"btn_arithmetic_plus\":\"Addition\",\"btn_arithmetic_minus\":\"Subtraction\",\"btn_arithmetic_multiplication\":\"Multiplication\",\"btn_arithmetic_division\":\"Division\",\"btn_arithmetic_module\":\"Remainder\",\"btn_break\":\"break\",\"btn_case\":\"Case\",\"start\":\"main\",\"type_void\":\"void\",\"type_integer\":\"int\",\"logic_operator_and\":\"AND\",\"logic_operator_or\":\"OR\",\"logic_operator_not\":\"not\",\"type_real\":\"real\",\"program\":\"program\",\"type_text\":\"string\",\"textvar_default_value\":\"text\",\"type_boolean\":\"bool\",\"logic_value_true\":\"true\",\"logic_value_false\":\"false\",\"variable\":\"Variable\",\"command\":\"Command\",\"new_parameter\":\"parameter\",\"new_variable\":\"variable\",\"new_global\":\"global\",\"new_function\":\"new_function\",\"matrix\":\"matrix\",\"vector\":\"vector\",\"text_comment_start\":\"Function initial comment\",\"text_comment_main\":\"This is the main funcion\",\"text_read_var\":\"Input/Read data\",\"text_write_var\":\"Output/Write data\",\"text_command_read\":\"read\",\"text_command_write\":\"write\",\"text_return\":\"return\",\"text_btn_return\":\"Return\",\"text_comment\":\"Comment\",\"string_join_or\":\"or\",\"matrix_info_string\":\"matrix of $0\",\"vector_info_string\":\"vector of $0\",\"text_attribution\":\"Assignment\",\"text_if\":\"if\",\"text_break\":\"break\",\"text_else\":\"else\",\"text_for\":\"repeat_for\",\"text_code_while\":\"repeat_while\",\"text_code_do\":\"repeat\",\"text_code_do_until\":\"until\",\"text_command_do\":\"repeat\",\"text_command_while\":\"repeat while\",\"text_command_do_until\":\"until\",\"text_code_switch\":\"switch\",\"text_code_case\":\"case\",\"text_config_programming\":\"Programming\",\"text_config_programming_both\":\"Visual & Textual\",\"text_config_programming_textual\":\"Textual\",\"text_config_programming_visual\":\"Visual\",\"text_logic_expression\":\"Logic\",\"text_arithmetic_expression\":\"Arithmetics\",\"text_iftrue\":\"If true then\",\"text_message_error_activity_file\":\"There was an error processing the activity.
Reload the page to try again.\",\"text_message_error_activity_reload\":\"Reload\",\"text_repeatNtimes\":\"Repeat N times\",\"text_receives\":\"receives\",\"text_whiletrue\":\"While true\",\"text_dowhiletrue\":\"Repeat until true\",\"text_switch\":\"Switch\",\"text_functioncall\":\"Function call\",\"text_value\":\"Value\",\"text_operator\":\"Operator\",\"text_parentheses\":\"Parentheses\",\"text_change\":\"Modify\",\"text_teacher_algorithm\":\"Algorithm\",\"text_teacher_algorithm_include\":\"Include the algorithm below in the activity\",\"text_teacher_test_case\":\"Test cases\",\"text_teacher_config\":\"Configurations\",\"text_teacher_data_types\":\"Data types\",\"text_teacher_commands\":\"Commands\",\"text_teacher_functions\":\"Functions\",\"text_teacher_create_functions\":\"Create new functions\",\"text_teacher_create_movement_functions\":\"Move functions\",\"text_teacher_test_case_input\":\"Input\",\"text_teacher_test_case_output\":\"Output\",\"text_teacher_test_case_actions\":\"Actions\",\"text_teacher_test_case_add\":\"Add test case\",\"text_header_ivprog_functions\":\"iVProg Functions\",\"text_menu_functions_math\":\"Math\",\"text_menu_functions_text\":\"Text\",\"text_menu_functions_array\":\"Array\",\"text_menu_functions_conversion\":\"Conversion\",\"text_no_variable\":\"No variable declared\",\"text_no_variable_instruction\":\"Before using a variable, you need to create it\",\"text_ivprog_description\":\"Interactive and Visual Programming on the Internet\",\"tooltip_visual\":\"Visual programming\",\"tooltip_textual\":\"Textual programming\",\"tooltip_upload\":\"Upload source code\",\"tooltip_download\":\"Download source code\",\"tooltip_undo\":\"Undo\",\"tooltip_redo\":\"Redo\",\"tooltip_run\":\"Run the program\",\"tooltip_evaluate\":\"Evaluate the program\",\"tooltip_help\":\"Help\",\"tooltip_add_global\":\"Add a global variable\",\"tooltip_hide_function\":\"Hide function elements\",\"var_menu_select_var\":\"Select a variable\",\"var_menu_select_all\":\"Select\",\"var_menu_select_function\":\"Select a function\",\"expression_menu_select\":\"Construct a logic expression\",\"inform_valid_content\":\"Provide some data\",\"inform_valid_expression\":\"Construct a logic expression\",\"tooltip_terminal_clear\":\"Clears the terminal by removing all wrriten and pending text.\",\"tooltip_terminal_show\":\"Shows the terminal if it is hidden\",\"tooltip_terminal_hide\":\"Hides the terminal if it is not on display\",\"text_ivprog_version\":\"Version\",\"text_teacher_filter\":\"Filter\",\"text_teacher_filter_active\":\"Activated\",\"text_teacher_filter_help\":\"By activating the filter modifications in iVProg will be blocked\",\"text_join_assessment_outputs\":\" ; \",\"assessment-detail-time-label\":\"Duration\",\"assessment-detail-grade-label\":\"Grade\",\"assessment-detail-input-label\":\"Inputs\",\"assessment-detail-output-label\":\"Outputs\",\"assessment-detail-expected-label\":\"Expected\",\"assessment-detail-generated-label\":\"Generated\",\"assessment-detail-result-label\":\"Result\",\"assessment-detail-title\":\"Test Case $0\",\"text_teacher_generate_outputs\":\"Generate outputs\",\"text_teacher_generate_outputs_algorithm\":\"Before generating the outputs you need to create an algorithm\",\"text_code_for_from\":\"from\",\"text_code_for_to\":\"to\",\"text_code_for_pass\":\"pass\",\"text_for_from\":\"from\",\"text_for_to\":\"to\",\"text_for_pass\":\"pass\",\"text_relational_expression\":\"Relational\",\"initial_program_code\":\"program {\\\\n\\\\n\\\\t\\\\tfunction void main () {\\\\n\\\\t\\\\t\\\\t// Start your code here!\\\\n\\\\t\\\\t}\\\\n}\"},\"es\":{\"function\":\"funccion\",\"btn_clear\":\"\",\"btn_function\":\"\",\"btn_arithmetic_plus\":\"\",\"btn_arithmetic_minus\":\"\",\"btn_arithmetic_multiplication\":\"\",\"btn_arithmetic_division\":\"\",\"btn_arithmetic_module\":\"\",\"btn_break\":\"\",\"btn_case\":\"\",\"start\":\"\",\"type_void\":\"\",\"type_integer\":\"\",\"logic_operator_and\":\"\",\"logic_operator_or\":\"\",\"logic_operator_not\":\"\",\"type_real\":\"\",\"program\":\"\",\"type_text\":\"\",\"textvar_default_value\":\"\",\"type_boolean\":\"\",\"logic_value_true\":\"\",\"logic_value_false\":\"\",\"variable\":\"\",\"command\":\"\",\"new_parameter\":\"\",\"new_variable\":\"\",\"new_global\":\"\",\"new_function\":\"\",\"matrix\":\"\",\"vector\":\"\",\"text_comment_start\":\"\",\"text_comment_main\":\"\",\"text_read_var\":\"\",\"text_write_var\":\"\",\"text_command_read\":\"\",\"text_command_write\":\"\",\"text_return\":\"\",\"text_btn_return\":\"\",\"text_comment\":\"\",\"string_join_or\":\"\",\"matrix_info_string\":\"\",\"vector_info_string\":\"\",\"text_attribution\":\"\",\"text_if\":\"\",\"text_break\":\"\",\"text_else\":\"\",\"text_for\":\"\",\"text_code_while\":\"\",\"text_code_do\":\"\",\"text_code_do_until\":\"\",\"text_command_do\":\"\",\"text_command_while\":\"\",\"text_command_do_until\":\"\",\"text_code_switch\":\"\",\"text_code_case\":\"\",\"text_config_programming\":\"\",\"text_config_programming_both\":\"\",\"text_config_programming_textual\":\"\",\"text_config_programming_visual\":\"\",\"text_logic_expression\":\"\",\"text_arithmetic_expression\":\"\",\"text_iftrue\":\"\",\"text_message_error_activity_file\":\"\",\"text_message_error_activity_reload\":\"\",\"text_repeatNtimes\":\"\",\"text_receives\":\"\",\"text_whiletrue\":\"\",\"text_dowhiletrue\":\"\",\"text_switch\":\"\",\"text_functioncall\":\"\",\"text_value\":\"\",\"text_operator\":\"\",\"text_parentheses\":\"\",\"text_change\":\"\",\"text_teacher_algorithm\":\"\",\"text_teacher_algorithm_include\":\"\",\"text_teacher_test_case\":\"\",\"text_teacher_config\":\"\",\"text_teacher_data_types\":\"\",\"text_teacher_commands\":\"\",\"text_teacher_functions\":\"\",\"text_teacher_create_functions\":\"\",\"text_teacher_create_movement_functions\":\"\",\"text_teacher_test_case_input\":\"\",\"text_teacher_test_case_output\":\"\",\"text_teacher_test_case_actions\":\"\",\"text_teacher_test_case_add\":\"\",\"text_header_ivprog_functions\":\"\",\"text_menu_functions_math\":\"\",\"text_menu_functions_text\":\"\",\"text_menu_functions_array\":\"\",\"text_menu_functions_conversion\":\"\",\"text_no_variable\":\"\",\"text_no_variable_instruction\":\"\",\"text_ivprog_description\":\"\",\"tooltip_visual\":\"\",\"tooltip_textual\":\"\",\"tooltip_upload\":\"\",\"tooltip_download\":\"\",\"tooltip_undo\":\"\",\"tooltip_redo\":\"\",\"tooltip_run\":\"\",\"tooltip_evaluate\":\"\",\"tooltip_help\":\"\",\"tooltip_add_global\":\"\",\"tooltip_hide_function\":\"\",\"var_menu_select_var\":\"\",\"var_menu_select_all\":\"\",\"var_menu_select_function\":\"\",\"expression_menu_select\":\"\",\"inform_valid_content\":\"\",\"inform_valid_expression\":\"\",\"tooltip_terminal_clear\":\"\",\"tooltip_terminal_show\":\"\",\"tooltip_terminal_hide\":\"\",\"text_ivprog_version\":\"\",\"text_teacher_filter\":\"\",\"text_teacher_filter_active\":\"\",\"text_teacher_filter_help\":\"\",\"text_join_assessment_outputs\":\"\",\"assessment-detail-time-label\":\"\",\"assessment-detail-grade-label\":\"\",\"assessment-detail-input-label\":\"\",\"assessment-detail-output-label\":\"\",\"assessment-detail-expected-label\":\"\",\"assessment-detail-generated-label\":\"\",\"assessment-detail-result-label\":\"\",\"assessment-detail-title\":\"\",\"text_teacher_generate_outputs\":\"\",\"text_teacher_generate_outputs_algorithm\":\"\",\"text_code_for_from\":\"\",\"text_code_for_to\":\"\",\"text_code_for_pass\":\"\",\"text_for_from\":\"\",\"text_for_to\":\"\",\"text_for_pass\":\"\",\"text_relational_expression\":\"\",\"initial_program_code\":\"\"}}","import line_i18n from 'line-i18n'\nimport { IVProgProcessor } from \"./../processor/ivprogProcessor\";\nimport { DOMConsole} from \"./../io/domConsole\";\nimport * as LocalizedStringsService from \"../services/localizedStringsService\";\nimport { OutputMatching } from './output_matching/output_matching';\nimport { Config } from '../util/config';\n\n\nconst LocalizedStrings = LocalizedStringsService.getInstance();\n\nconst StringTypes = line_i18n.StringTypes;\n\nconst AssessmentConfig = {\n max_instruction_count: 350250,\n suspend_threshold: 200\n}\n\nexport class IVProgAssessment {\n\n constructor (ast_code, testCases, domConsole) {\n this.ast_code = ast_code;\n this.testCases = testCases;\n this.domConsole = domConsole;\n this.old_config = JSON.parse(JSON.stringify(Config));\n Config.setConfig(AssessmentConfig);\n }\n\n runTest () {\n try {\n // loop test cases and show messages through domconsole\n const partialTests = this.testCases.map( (t, name) => {\n return new OutputMatching(new IVProgProcessor(this.ast_code), t.input, t.output, name);\n });\n const testResult = partialTests.map(om => om.eval());\n return Promise.all(testResult).then(results => {\n let grade = 0;\n for(let i = 0; i < results.length; i += 1) {\n const result = results[i];\n grade += result.grade;\n if(result.grade == 1) {\n this.writeToConsole(DOMConsole.INFO, StringTypes.MESSAGE,'test_case_success',\n result.name + 1, result.generateOutput());\n } else if (result.status == 1) {\n this.writeToConsole(DOMConsole.ERR, StringTypes.ERROR,'test_case_failed_exception',\n result.name + 1, result.error_msg, result.generateOutput());\n } else {\n this.writeToConsole(DOMConsole.ERR, StringTypes.ERROR,'test_case_failed',\n result.name + 1, result.generateOutput());\n }\n }\n grade /= results.length;\n const channel = grade == 1 ? DOMConsole.INFO : DOMConsole.ERR;\n this.writeToConsole(channel, StringTypes.MESSAGE, \"test_suite_grade\", (grade * 100).toFixed(2));\n return grade;\n });\n // return testResult.then(function (total) {\n // const grade = total / this.testCases.length;\n // const channel = grade == 1 ? DOMConsole.INFO : DOMConsole.ERR;\n // this.writeToConsole(channel, StringTypes.MESSAGE, \"test_suite_grade\", (grade * 100).toFixed(2));\n // return Promise.resolve(grade)\n // }).catch(err => {\n // this.domConsole.err(\"Erro inesperado durante o cálculo da nota.\");// try and show error messages through domconsole\n // this.domConsole.err(err.message);\n // return Promise.resolve(0);\n // });\n } catch (error) {\n this.showErrorMessage(DOMConsole.ERR, StringTypes.MESSAGE, \"unexpected_execution_error\");\n this.domConsole.err(error.message);\n return Promise.resolve(0);\n } finally {\n Config.setConfig(this.old_config);\n }\n }\n\n showErrorMessage (errorID, ...args) {\n this.domConsole.err(LocalizedStrings.getError(errorID, args));\n }\n\n showInfoMessage (msgID, ...args) {\n this.domConsole.info(LocalizedStrings.getMessage(msgID, args));\n }\n\n writeToConsole (channel, msgType, msgID, ...args) {\n let msg = LocalizedStrings.getString(msgID, msgType);\n msg = LocalizedStrings.processString(msg, args);\n switch(channel) {\n case DOMConsole.ERR: {\n this.domConsole.err(msg);\n break;\n }\n case DOMConsole.INFO: {\n this.domConsole.info(msg);\n break;\n }\n case DOMConsole.USER: {\n this.domConsole.write(msg);\n break;\n }\n }\n }\n}","import StringDiff from \"./../../util/string_diff\";\nimport { LocalizedStrings } from './../../services/localizedStringsService'\n\nexport class OutputAssessmentResult {\n\n static get PAGE_TEMPLATE () {\n return `\n \n \n \n \n \n \n :assessment-result:\n \n `;\n }\n\n static get DETAIL_TEMPLATE () {\n return `
\n
\n

:test-name:

\n

:time-label:: :time:ms

\n

:grade-label:: :grade:%

\n
\n
\n

:input-label:

\n
    \n
  • :input-list:
  • \n
\n
\n
\n

:output-label:

\n :output-result:\n
\n
`;\n }\n\n static get OUPUT_TABLE_TEMPLATE () {\n return `
\n \n \n \n \n \n \n :results:\n
:expected-label::generated-label::result-label:
\n
`;\n }\n\n static get OUTPUT_TEMPLATE () {\n return `$0\n $1\n $2`;\n }\n\n static get EMPTY_OUTPUT_TEMPLATE () {\n return `
\n $0
`;\n }\n\n static get FAILED_TEMPLATE () {\n return `

$0

`;\n }\n\n static get INPUT_INFO_TEMPLATE () {\n return `$1`;\n }\n\n // Status code - it is not grade related!\n // 0 - Succesful execution\n // 1 - failed execution\n constructor (name, status, inputs, result, store, time, error_msg = '') {\n this.name = name;\n this.status = status;\n this.inputs = inputs;\n this.results = result;\n this.store = store;\n this.time = time;\n this.error_msg = error_msg;\n }\n\n get grade () {\n if(this.results == null) {\n return 0;\n }\n return this.results.reduce((prev, val) => prev + val.grade, 0) / this.results.length;\n }\n\n prepareResults () {\n let template = OutputAssessmentResult.DETAIL_TEMPLATE;\n const grade = (this.grade * 100).toFixed(2);\n const time = this.time || \"-\";\n template = template.replace(':test-name:', LocalizedStrings.getUI('assessment-detail-title', [this.name + 1]));\n template = template.replace(':time-label:', LocalizedStrings.getUI('assessment-detail-time-label'));\n template = template.replace(':time:', time);\n template = template.replace(':grade-label:', LocalizedStrings.getUI('assessment-detail-grade-label'));\n template = template.replace(':grade:', grade);\n const input_spans = this.prepareInputList(this.inputs);\n template = template.replace(':input-label:', LocalizedStrings.getUI('assessment-detail-input-label'));\n template = template.replace(':input-list:', input_spans);\n template = template.replace(':output-label:', LocalizedStrings.getUI('assessment-detail-output-label'));\n if(this.status == 0) {\n const output_rows = this.results.map(result => {\n if(result.type == \"string\") {\n return this.formatString(result);\n } else if (result.type == \"number\") {\n return this.formatNumber(result);\n } else {\n return this.formatBool(result);\n }\n }, this);\n template = template.replace(':output-result:', this.prepareOutputTable(output_rows));\n } else {\n let failed_text = OutputAssessmentResult.FAILED_TEMPLATE;\n failed_text = failed_text.replace(\"$0\", this.error_msg);\n template = template.replace(\":output-result:\", failed_text);\n }\n return template;\n }\n\n prepareInputList (input_list) {\n const list = input_list.map(input => {\n let template = OutputAssessmentResult.INPUT_INFO_TEMPLATE;\n template = template.replace(\"$1\", input.value);\n if(input.read) {\n template = template.replace(\"$0\", \"assessment-input-read\");\n } else {\n template = template.replace(\"$0\", \"assessment-input-unread\");\n }\n return template;\n }, this);\n return list.join(LocalizedStrings.getUI('text_join_assessment_outputs'));\n }\n\n prepareOutputTable (output_rows) {\n let template = OutputAssessmentResult.OUPUT_TABLE_TEMPLATE;\n template = template.replace(':expected-label:', LocalizedStrings.getUI('assessment-detail-expected-label'));\n template = template.replace(':generated-label:', LocalizedStrings.getUI('assessment-detail-generated-label'));\n template = template.replace(':result-label:', LocalizedStrings.getUI('assessment-detail-result-label'));\n template = template.replace(':results:', output_rows.join(''));\n return template;\n }\n\n generateOutput () {\n const assessment_result = this.prepareResults();\n let page = OutputAssessmentResult.PAGE_TEMPLATE;\n page = page.replace(':assessment-result:', assessment_result);\n page = page.replace(/(\\r|\\n|\\t)/gm,'').replace(/> *<');\n return page;\n }\n\n formatNumber (result) {\n const result_class = result.grade == 1 ? 'assessment-number-result' : 'assessment-number-result-failed'; \n let template = this.formatOutput('assessment-number-expected',\n 'assessment-number-generated', result_class, result);\n return template\n }\n\n formatBool (result) {\n const result_class = result.grade == 1 ? 'assessment-bool-result' : 'assessment-bool-result-failed';\n let template = this.formatOutput('assessment-bool-expected',\n 'assessment-bool-generated', result_class, result);\n return template\n }\n\n formatOutput (expected_class, generated_class, result_class, result) {\n let template = OutputAssessmentResult.OUTPUT_TEMPLATE;\n template = template.replace(\":class-expected:\", expected_class);\n template = template.replace(\":class-generated:\", generated_class);\n template = template.replace(\":class-result:\", result_class);\n let expected_tmpl = result.expected;\n let generated_tmpl = result.generated;\n if(expected_tmpl == null) {\n expected_tmpl = OutputAssessmentResult.EMPTY_OUTPUT_TEMPLATE.replace('$0',\n LocalizedStrings.getMessage('assessment-empty-expected-tooltip'));\n } else if(generated_tmpl == null) {\n generated_tmpl = OutputAssessmentResult.EMPTY_OUTPUT_TEMPLATE.replace('$0',\n LocalizedStrings.getMessage('assessment-empty-generated-tooltip'));\n }\n template = template.replace(\"$0\", expected_tmpl);\n template = template.replace(\"$1\", generated_tmpl);\n const final_result = result.grade == 1 ? \"✓\" : \"✗\"\n template = template.replace(\"$2\", final_result);\n return template\n }\n\n formatString (result) {\n const expected_class = 'assessment-string-expected';\n const generated_class = 'assessment-string-generated';\n //const result_class = 'assessment-string-result';\n\n let template = OutputAssessmentResult.OUTPUT_TEMPLATE;\n template = template.replace(\":class-expected:\", expected_class);\n template = template.replace(\":class-generated:\", generated_class);\n //template = template.replace(\":class-result:\", result_class);\n\n const g_string = result.generated || \"\";\n const e_string = result.expected || \"\";\n template = template.replace(\"$0\", result.expected);\n template = template.replace(\"$1\", result.generated);\n if(result.grade == 1) {\n template = template.replace(\"$2\", \"✓\");\n template = template.replace(\":class-result:\", 'assessment-string-result');\n } else {\n const diff = StringDiff(g_string, e_string);\n const diff_vec = diff.map(part => this.getDiffStringStyle(part[1], part[0]), this);\n const diff_string = diff_vec.reduce((prev, actual) => prev + actual, \"\");\n template = template.replace(\"$2\", \"\" + diff_string);\n template = template.replace(\":class-result:\", \"assessment-string-diff\");\n }\n return template;\n }\n\n getDiffStringStyle (text, action) {\n const template = \"$1\"\n switch(action) {\n case StringDiff.INSERT:\n return template.replace(\"$0\", \"stringdiff-insert\").replace(\"$1\", text);\n case StringDiff.DELETE:\n return template.replace(\"$0\", \"stringdiff-delete\").replace(\"$1\", text);\n case StringDiff.EQUAL:\n return template.replace(\"$0\", \"stringdiff-equal\").replace(\"$1\", text);\n }\n }\n}\n","import { Decimal } from 'decimal.js';\nimport { InputAssessment } from \"../../util/input_assessment\";\nimport { OutputTest } from \"../../util/outputTest\";\nimport { Config } from \"../../util/config\";\nimport { levenshteinDistance } from \"../../util/utils\";\nimport { OutputAssessmentResult } from './assessment_result';\nimport * as TypeParser from \"./../../typeSystem/parsers\";\nimport * as LocalizedStringsService from \"../../services/localizedStringsService\";\nimport * as OutputResult from \"./output_result\";\n\nconst LocalizedStrings = LocalizedStringsService.getInstance();\n\nexport class OutputMatching {\n\n static get NUM_REGEX () {\n return /^[+-]?([0-9]+([.][0-9]*)?(e[+-]?[0-9]+)?)$/;\n } \n\n static get NUM_IN_STRING_REGEX () {\n return /[+-]?([0-9]+([.][0-9]*)?(e[+-]?[0-9]+)?)/g;\n }\n\n static get BOOLEAN_REGEX () {\n const str = `^(${LocalizedStrings.getUI(\"logic_value_true\")}|${LocalizedStrings.getUI(\"logic_value_false\")})$`;\n return new RegExp(str);\n }\n\n static get BOOLEAN_IN_STRING_REGEX () {\n const str = `(${LocalizedStrings.getUI(\"logic_value_true\")}|${LocalizedStrings.getUI(\"logic_value_false\")})`;\n return new RegExp(str, 'g');\n }\n \n constructor (program, input_list, expected_output, test_name) {\n this.program = program;\n this.name = test_name;\n this.input_list = input_list;\n this.expected_output = expected_output;\n }\n\n eval () {\n const refThis = this;\n const input = new InputAssessment(this.input_list);\n const gen_output = new OutputTest();\n this.program.registerInput(input);\n this.program.registerOutput(gen_output);\n const start_time = Date.now();\n return this.program.interpretAST().then( sto => {\n const final_time = Date.now() - start_time;\n if(input.isInputAvailable()) {\n return new OutputAssessmentResult(this.name, 1, input.input_list,\n null, sto, final_time, refThis.getErrorMessage('test_case_few_reads', this.name+1))\n }\n const result = gen_output.list.map((g_out, i) => {\n if(i >= this.expected_output.length) {\n return new OutputResult.OutputMatchResult(null, g_out, 0, this.getPotentialOutputType(g_out));\n }\n return this.outputMatch(g_out, this.expected_output[i]);\n }, this);\n if(this.expected_output.length > gen_output.list.length) {\n for(let i = gen_output.list.length; i < this.expected_output.length; ++i) {\n const e_out = this.expected_output[i];\n result.push(new OutputResult.OutputMatchResult(e_out, null, 0, this.getPotentialOutputType(e_out)));\n }\n }\n return new OutputAssessmentResult(this.name, 0, input.input_list, result, sto, final_time);\n }).catch(error => {\n return new OutputAssessmentResult(this.name, 1, input.input_list, null, null,\n null, refThis.getErrorMessage('test_case_exception', this.name + 1, error.message))\n });\n }\n\n getPotentialOutputType (output) {\n if(OutputMatching.NUM_REGEX.test(output)) {\n return \"number\";\n } else if (OutputMatching.BOOLEAN_REGEX.test(output)) {\n return \"bool\";\n } else {\n return \"string\";\n }\n }\n\n outputMatch (g_output, e_output) {\n if(OutputMatching.NUM_REGEX.test(e_output)) {\n if(!OutputMatching.NUM_REGEX.test(g_output)) {\n return this.checkStrings(g_output, e_output);\n }\n const g_num = new Decimal(g_output);\n const e_num = new Decimal(e_output);\n return this.checkNumbers(g_num, e_num);\n } else if (OutputMatching.BOOLEAN_REGEX.test(e_output)) {\n if (!OutputMatching.BOOLEAN_REGEX.test(g_output)) {\n return this.checkStrings(g_output, e_output)\n }\n const g_bool = TypeParser.toBool(g_output);\n const e_bool = TypeParser.toBool(e_output);\n return this.checkBoolean(g_bool, e_bool);\n } else {\n return this.checkStrings(g_output, e_output);\n }\n }\n\n checkNumbers (g_num, e_num) {\n const decimalPlaces = Math.min(e_num.dp(), Config.decimalPlaces);\n g_num = new Decimal(g_num.toFixed(decimalPlaces, Decimal.ROUND_FLOOR));\n e_num = new Decimal(e_num.toFixed(decimalPlaces, Decimal.ROUND_FLOOR));\n const result = g_num.eq(e_num);\n const grade = result ? 1 : 0;\n return OutputResult.createNumberResult(e_num.toNumber(), g_num.toNumber(), grade);\n }\n\n checkBoolean (g_bool, e_bool) {\n const grade = g_bool == e_bool ? 1 : 0;\n const g_bool_text = TypeParser.convertBoolToString(g_bool);\n const e_bool_text = TypeParser.convertBoolToString(e_bool);\n return OutputResult.createBoolResult(e_bool_text, g_bool_text, grade);\n }\n\n checkStrings (g_output, e_ouput) {\n const assessmentList = []\n let e_output_clean = e_ouput;\n let g_output_clean = g_output;\n if (OutputMatching.NUM_IN_STRING_REGEX.test(e_ouput)) {\n const expected_numbers = e_ouput.match(OutputMatching.NUM_IN_STRING_REGEX);\n const generated_numbers = g_output.match(OutputMatching.NUM_IN_STRING_REGEX) || [];\n const result = generated_numbers.map((val, i) => {\n if(i >= expected_numbers.length) {\n return OutputResult.createNumberResult(null, val, 0);\n }\n const g_val = new Decimal(val)\n const e_val = new Decimal(expected_numbers[i]);\n return this.checkNumbers(g_val, e_val);\n }, this);\n if(expected_numbers.length > generated_numbers.length) {\n for(let i = generated_numbers.length; i < expected_numbers.length; ++i) {\n result.push(OutputResult.createNumberResult(expected_numbers[i], null, 0));\n }\n }\n e_output_clean = e_output_clean.replace(OutputMatching.NUM_IN_STRING_REGEX, '').trim();\n g_output_clean = g_output_clean.replace(OutputMatching.NUM_IN_STRING_REGEX, '').trim();\n const numberGrade = result.reduce((prev, r) => prev + r.grade, 0) / result.length;\n assessmentList.push(numberGrade);\n } \n if(OutputMatching.BOOLEAN_IN_STRING_REGEX.test(e_ouput)) {\n const expected_bools = e_ouput.match(OutputMatching.BOOLEAN_IN_STRING_REGEX);\n const generated_bools = g_output.match(OutputMatching.BOOLEAN_IN_STRING_REGEX) || [];\n const result = generated_bools.map((val, i) => {\n if(i >= expected_bools.length) {\n return OutputResult.createBoolResult(null, val, 0);\n }\n const g_bool = TypeParser.toBool(val);\n const e_bool = TypeParser.toBool(expected_bools[i]);\n return this.checkBoolean(g_bool, e_bool );\n }, this);\n if(expected_bools.length > generated_bools.length) {\n for(let i = generated_bools.length; i < expected_bools.length; ++i) {\n result.push(OutputResult.createBoolResult(expected_bools[i], null, 0));\n }\n }\n e_output_clean = e_output_clean.replace(OutputMatching.BOOLEAN_IN_STRING_REGEX, '').trim();\n g_output_clean = g_output_clean.replace(OutputMatching.BOOLEAN_IN_STRING_REGEX, '').trim();\n const boolGrade = result.reduce((prev, r) => prev + r.grade, 0) / result.length;\n assessmentList.push(boolGrade);\n }\n const dist = levenshteinDistance(g_output_clean, e_output_clean);\n let gradeDiff = Math.max(0, e_output_clean.length - dist)/e_output_clean.length;\n gradeDiff = Number.isNaN(gradeDiff) ? 0 : gradeDiff;\n const assessment_size = assessmentList.length + 1;\n const gradeAcc = assessmentList.reduce((prev, val) => prev + val/assessment_size, 0);\n const finalGrade = 1 * (gradeDiff/assessment_size + gradeAcc);\n return OutputResult.createStringResult(e_ouput, g_output, finalGrade);\n }\n \n getErrorMessage (errorID, ...args) {\n return LocalizedStrings.getError(errorID, args);\n }\n}\n","\nexport function createNumberResult (expected, generated, grade) {\n return new OutputMatchResult(expected, generated, grade, \"number\");\n}\n\nexport function createBoolResult (expected, generated, grade) {\n return new OutputMatchResult(expected, generated, grade, \"bool\");\n}\n\nexport function createStringResult (expected, generated, grade) {\n return new OutputMatchResult(expected, generated, grade, \"string\");\n}\n\nexport class OutputMatchResult {\n\n constructor (expected, generated, grade, type) {\n this.expected = expected;\n this.generated = generated;\n this.grade = grade;\n this.type = type;\n }\n}","import { SyntaxErrorFactory } from \"./error/syntaxErrorFactory\";\n\nexport function recover (_) {\n const start = this._tokenStartCharIndex;\n const stop = this._input.index;\n let text = this._input.getText(start, stop);\n text = this.getErrorDisplay(text);\n const line = this._tokenStartLine;\n const column = this._tokenStartColumn;\n throw SyntaxErrorFactory.invalid_character(text, line, column);\n}\n","import { Assign } from './assign';\n\nexport class ArrayIndexAssign extends Assign {\n\n constructor (id, lineExpression, columnExpression, expression) {\n super(id, expression);\n this.line = lineExpression;\n this.column = columnExpression;\n }\n}\n","import { Declaration } from './declaration';\n\nexport class ArrayDeclaration extends Declaration {\n\n constructor (id, type, lines, columns, initial, isConst) {\n super(id, type, initial, isConst);\n this.lines = lines;\n this.columns = columns;\n }\n\n get isVector () {\n return this.columns == null;\n }\n}","import { Command } from './command';\n\nexport class Assign extends Command {\n \n constructor (id, expression) {\n super();\n this.id = id;\n this.expression = expression;\n }\n}","import { Command } from './command';\n\nexport class Break extends Command {\n\n constructor () {\n super();\n }\n}\n","import { Command } from './command';\n\nexport class Case extends Command {\n\n constructor (expression) {\n super();\n this.expression = expression;\n this.commands = [];\n }\n\n setCommands (commands) {\n this.commands = commands;\n }\n\n get isDefault () {\n return this.expression === null;\n }\n}","export class Command {\n\n constructor () {\n this._sourceInfo = null;\n }\n\n set sourceInfo (sourceInfo) {\n this._sourceInfo = sourceInfo;\n }\n\n get sourceInfo () {\n return this._sourceInfo;\n }\n}\n","export class CommandBlock {\n\t\n\tconstructor(variables, commands) {\n\t\tthis.variables = variables;\n\t\tthis.commands = commands;\n\t\tthis._sourceInfo = null;\n\t}\n\n\tset sourceInfo (sourceInfo) {\n\t\tthis._sourceInfo = sourceInfo;\n\t}\n\n\tget sourceInfo () {\n\t\treturn this._sourceInfo;\n\t}\n}","import { Command } from './command';\n\nexport class Declaration extends Command {\n \n constructor (id, type, initial, isConst) {\n super();\n this.id = id;\n this.type = type;\n this.initial = initial;\n this.isConst = isConst;\n }\n}\n","import { Command } from './command';\n\nexport class For extends Command {\n\n constructor (for_id, for_from, for_to, for_pass, commandBlock) {\n super();\n this.for_id = for_id;\n this.for_from = for_from;\n this.for_to = for_to;\n this.for_pass = for_pass;\n this.commandBlock = commandBlock;\n }\n\n get commands () {\n return this.commandBlock.commands;\n }\n}","export class FormalParameter {\n\n constructor (type, id, byRef = false) {\n this.type = type;\n this.id = id;\n this.byRef = byRef;\n this._sourceInfo = null;\n }\n\n set sourceInfo (sourceInfo) {\n\t\tthis._sourceInfo = sourceInfo;\n\t}\n\n\tget sourceInfo () {\n\t\treturn this._sourceInfo;\n\t}\n}","import { Types } from './../../typeSystem/types';\n\nexport class Function {\n\n constructor(name, returnType, formalParameters, commandBlock) {\n this.name = name;\n this.returnType = returnType;\n this.formalParameters = formalParameters;\n this.commandBlock = commandBlock;\n this._sourceInfo = null;\n }\n\n get isMain () {\n return this.name === null && this.returnType.isCompatible(Types.VOID);\n }\n\n get commands () {\n return this.commandBlock.commands;\n }\n\n get variablesDeclarations () {\n return this.commandBlock.variables;\n }\n\n set sourceInfo (sourceInfo) {\n\t\tthis._sourceInfo = sourceInfo;\n\t}\n\n\tget sourceInfo () {\n\t\treturn this._sourceInfo;\n\t}\n}","import { Command } from './command';\n\nexport class IfThenElse extends Command {\n\n constructor (condition, ifTrue, ifFalse) {\n super();\n this.condition = condition;\n this.ifTrue = ifTrue;\n this.ifFalse = ifFalse;\n }\n}","import { Break } from './break';\nimport { Return } from './return';\nimport { Assign } from './assign';\nimport { ArrayIndexAssign } from './arrayAssign';\nimport { Declaration } from './declaration';\nimport { ArrayDeclaration } from './arrayDeclaration';\nimport { While } from './while';\nimport { For } from './for';\nimport { Function } from './function';\nimport { IfThenElse } from './ifThenElse';\nimport { CommandBlock } from './commandBlock';\nimport { RepeatUntil } from './repeatUntil';\nimport { Switch } from './switch';\nimport { Case } from './case';\nimport { SysCall } from './sysCall';\nimport { FormalParameter } from './formalParameter';\nimport { FunctionCall } from './../expressions/functionCall'; //Proxy to expression since they do exatcly the same thing\n\nexport {\n Break,\n Return,\n Assign,\n ArrayIndexAssign,\n Declaration,\n ArrayDeclaration,\n While,\n For,\n Function,\n IfThenElse,\n CommandBlock,\n RepeatUntil,\n Switch,\n Case,\n SysCall,\n FormalParameter,\n FunctionCall\n};","import { While } from './while';\n\nexport class RepeatUntil extends While {\n\n constructor(condition, commandBlock) {\n super(condition, commandBlock);\n }\n\n get testFirst () {\n return false;\n }\n \n}","import { Command } from './command';\n\nexport class Return extends Command {\n\n constructor(expression) {\n super();\n this.expression = expression;\n }\n \n}","import { Command } from './command';\n\nexport class Switch extends Command {\n \n constructor (expression, cases) {\n super();\n this.expression = expression;\n this.cases = cases;\n }\n}","/**\n * This class represents all the language defined functions.\n * The language processor uses the id provided here to properly execute the desired function.\n * The function is actually implemented inside the language processor.\n * All the functions can be found at: js/processor/definedFunctions.js\n */\nexport class SysCall {\n\n constructor (langFunc) {\n this.langFunc = langFunc;\n }\n}","import { Command } from './command';\n\nexport class While extends Command {\n\n constructor (expression, commandBlock) {\n super();\n this.expression = expression;\n this.commandBlock = commandBlock;\n }\n\n get commands () {\n return this.commandBlock.commands;\n }\n\n get testFirst () {\n \treturn true;\n }\n}","export class SyntaxError extends Error {\n\n constructor (...msg) {\n super(...msg);\n if(Error.captureStackTrace)\n Error.captureStackTrace(this, SyntaxError);\n }\n}\n","import * as LocalizedStringsService from './../../services/localizedStringsService';\nimport { SyntaxError } from './syntaxError';\n\nconst LocalizedStrings = LocalizedStringsService.getInstance();\n\nfunction createError (message_id, context = []) {\n return new SyntaxError(LocalizedStrings.getError(message_id, context));\n}\n\nexport const SyntaxErrorFactory = Object.freeze({\n extra_lines: () => new SyntaxError(LocalizedStrings.getError(\"extra_lines\")),\n token_missing_one: (expected, token) => {\n const context = [expected, token.text, token.line, token.column];\n return createError(\"token_missing_one\", context);\n },\n token_missing_list: (expectedList, token) => {\n const line = expectedList.join(LocalizedStrings.getOR());\n return SyntaxErrorFactory.token_missing_one(line, token);\n },\n id_missing: (token) => {\n const context = [token.text, token.line, token.column];\n return createError(\"id_missing\", context);\n },\n eos_missing: (token) => {\n const context = [token.line, token.column];\n return createError(\"eos_missing\", context);\n },\n invalid_array_dimension: (typeName, token) => {\n const context = [token.line, token.column, typeName];\n return createError(\"invalid_array_dimension\", context);\n },\n invalid_array_size: (token) => {\n const context = [token.line];\n return createError(\"invalid_array_size\", context);\n },\n invalid_main_return: (name, typeName, token) => {\n const context = [name, typeName, token.line];\n return createError(\"invalid_main_return\", context);\n },\n invalid_var_declaration: (token) => {\n const context = [token.line];\n return createError(\"invalid_var_declaration\", context);\n },\n invalid_break_command: (cmdName, token) => {\n const context = [token.line, cmdName];\n return createError(\"invalid_break_command\", context);\n },\n invalid_terminal: (token) => {\n const context = [token.text, token.line, token.column];\n return createError('invalid_terminal', context);\n },\n invalid_type: (list, token) => {\n const line = list.join(LocalizedStrings.getOR());\n const context = [token.text, token.line, token.column, line]\n return createError(\"invalid_type\", context);\n },\n const_not_init: (token) => {\n const context = [token.line, token.column];\n return createError(\"const_not_init\", context);\n },\n invalid_id_format: (token) => {\n const context = [token.text, token.line, token.column];\n return createError(\"invalid_id_format\", context);\n },\n duplicate_function: (token) => {\n const context = [token.text, token.line, token.column];\n return createError(\"duplicate_function\", context);\n },\n main_parameters: () => {\n return createError(\"main_parameters\");\n },\n duplicate_variable: (token) => {\n const context = [token.text, token.line, token.column];\n return createError(\"duplicate_variable\", context);\n },\n invalid_character: (text, line, _column) => {\n const context = [text, line];\n return createError(\"invalid_character\", context);\n },\n annonymous_array_literal: (token) => {\n const context = [token.line];\n return createError(\"annonymous_array_literal\", context);\n },\n invalid_matrix_literal_line: (exp, sourceInfo) => {\n const context = [exp, sourceInfo.line];\n return createError(\"invalid_matrix_literal_line\", context);\n },\n cannot_infer_matrix_line: (name, sourceInfo) => {\n const context = [name, sourceInfo.line];\n return createError(\"cannot_infer_matrix_line\", context);\n },\n cannot_infer_matrix_column: (name, sourceInfo) => {\n const context = [name, sourceInfo.line];\n return createError(\"cannot_infer_matrix_column\", context);\n },\n cannot_infer_vector_size: (name, sourceInfo) => {\n const context = [name, sourceInfo.line];\n return createError(\"cannot_infer_vector_size\", context);\n },\n matrix_to_vector_literal_attr: (name, exp, sourceInfo) => {\n const context = [sourceInfo.line, exp, name];\n return createError(\"matrix_to_vector_literal_attr\", context);\n },\n vector_to_matrix_literal_attr: (name, exp, sourceInfo) => {\n const context = [sourceInfo.line, exp, name];\n return createError(\"vector_to_matrix_literal_attr\", context);\n },\n array_init_not_literal: (sourceInfo) => {\n const context = [sourceInfo.line];\n return createError(\"array_init_not_literal\", context);\n },\n array_exceeds_2d: (sourceInfo) => {\n const context = [sourceInfo.line];\n return createError(\"array_exceeds_2d\", context);\n },\n invalid_matrix_id_dimension: (sourceInfo) => {\n const context = [sourceInfo.line];\n return createError(\"invalid_matrix_id_dimension\", context);\n },\n invalid_vector_init: (sourceInfo) => {\n const context = [sourceInfo.line];\n return createError(\"invalid_vector_init\", context);\n },\n invalid_matrix_init: (sourceInfo) => {\n const context = [sourceInfo.line];\n return createError(\"invalid_matrix_init\", context);\n }\n});\n","import { Expression } from './expression';\n\nexport class ArrayAccess extends Expression {\n\t\n\tconstructor (id, line, column) {\n\t\tsuper();\n\t\tthis.id = id;\n\t\tthis.line = line;\n\t\tthis.column = column;\n\t}\n\n\ttoString () {\n\t\tconst strLine = this.line.toString();\n\t\tlet strColumn = null;\n\t\tif(this.column) {\n\t\t\tstrColumn = this.column.toString();\n\t\t}\n\t\tlet text = null;\n\t\tif(strColumn) {\n\t\t\ttext = `${this.id}[${strLine}][${strColumn}]`;\n\t\t} else {\n\t\t\ttext = `${this.id}[${strLine}]`;\n\t\t}\n\t\tif(this.parenthesis ){\n\t\t\treturn `(${text})`\n\t\t} else {\n\t\t\treturn text;\n\t\t}\n\t}\n}","import { Literal } from './literal';\n\nexport class ArrayLiteral extends Literal {\n \n constructor(type, value) {\n super(type);\n this.value = value;\n }\n\n get subtype () {\n const element = this.value[0];\n if (element instanceof ArrayLiteral) {\n return element.value[0].type;\n } else {\n return element.type;\n }\n }\n\n get lines () {\n return this.value.length;\n }\n\n get columns () {\n const element = this.value[0];\n if (!(element instanceof ArrayLiteral)){\n return null;\n } else {\n return element.value.length;\n }\n }\n\n get isVector () {\n return this.columns === null;\n }\n\n get isValid () {\n return this.validateSize() && this.validateType();\n }\n\n validateType () {\n const valid = true;\n // const subtype = this.subtype;\n // if(this.columns !== null) {\n // const len = this.lines;\n // const len2 = this.columns;\n // for (let i = len - 1; i >= 0 && valid; --i) {\n // for (let j = len2 - 1; j >= 0 && valid; --j) {\n // if(!this.value[i].value[j].type.isCompatilbe(subtype)) {\n // valid = false;\n // break;\n // }\n // }\n // }\n // } else {\n // const len = this.lines;\n // for (var i = len - 1; i >= 0 && valid; i--) {\n // if(!this.value[i].type.isCompatilbe(subtype)) {\n // valid = false;\n // break;\n // }\n // }\n // }\n // Cannot validate type since no information on variables literals are available\n return valid;\n }\n\n validateSize () {\n const valid = true;\n // if(this.columns !== null) {\n // const equalityTest = this.value.map(v => v.value.length)\n // .reduce((old, next) => {\n // console.log(next);\n // if (old == null) {\n // return next;\n // } else if (old === next) {\n // return old\n // } else {\n // return -1;\n // }\n // }, null);\n // valid = equalityTest !== -1;\n // }\n // check is now made inside IVProgParser.parseVectorList(...)\n return valid;\n }\n\n toString () {\n const strList = this.value.map(arrayLiteral => arrayLiteral.toString());\n const text = \"{\" + strList.join(',') + \"}\";\n if(this.parenthesis) {\n return `(${text})`;\n } else {\n return text;\n }\n }\n}\n","import { Literal } from './literal';\nimport { Types } from './../../typeSystem/types';\nimport { convertBoolToString } from \"./../../typeSystem/parsers\";\n\nexport class BoolLiteral extends Literal {\n \n constructor(value) {\n super(Types.BOOLEAN);\n this.value = value;\n }\n\n toString () {\n const text = convertBoolToString(this.value);\n if(this.parenthesis) {\n return `(${text})`\n } else {\n return text;\n }\n }\n}","export class Expression {\n\n constructor () {\n\t\tthis._sourceInfo = null;\n\t\tthis._parenthesis = false;\n }\n\n set sourceInfo (sourceInfo) {\n\t\tthis._sourceInfo = sourceInfo;\n\t}\n\n\tget sourceInfo () {\n\t\treturn this._sourceInfo;\n\t}\n\n\tset parenthesis (flag) {\n\t\tthis._parenthesis = flag;\n\t}\n\n\tget parenthesis () {\n\t\treturn this._parenthesis;\n\t}\n}","import { Expression } from './expression';\nimport { LanguageDefinedFunction } from '../../processor/definedFunctions';\n\nexport class FunctionCall extends Expression {\n\n\tconstructor (id, actualParameters) {\n\t\tsuper();\n\t\tthis.id = id;\n\t\tthis.actualParameters = actualParameters;\n\t}\n\n\tget isMainCall () {\n\t\treturn this.id === null;\n\t}\n\n\tget parametersSize () {\n\t\treturn this.actualParameters.length;\n\t}\n\n\ttoString () {\n\t\tlet name = null;\n\t\tif(this.isMainCall) {\n\t\t\tname = LanguageDefinedFunction.getMainFunctionName();\n\t\t} else {\n\t\t\tname = LanguageDefinedFunction.getLocalName(this.id);\n\t\t}\n\t\tlet params = null;\n\t\tif(this.actualParameters.length == 0) {\n\t\t\tparams = \"()\";\n\t\t} else {\n\t\t\tconst strParams = this.actualParameters.map(v => v.toString());\n\t\t\tparams = \"(\" + strParams.join(\",\") + \")\";\n\t\t}\n\t\tif(this.parenthesis) {\n\t\t\treturn `(${name + params})`;\n\t\t} else {\n\t\t\treturn name + params;\n\t\t}\n\t}\n}","import { ArrayAccess } from './arrayAccess';\nimport { FunctionCall } from './functionCall';\nimport { IntLiteral } from './intLiteral';\nimport { RealLiteral } from './realLiteral';\nimport { BoolLiteral } from './boolLiteral';\nimport { StringLiteral } from './stringLiteral';\nimport { ArrayLiteral } from './arrayLiteral';\nimport { VariableLiteral } from './variableLiteral';\nimport { InfixApp } from './infixApp';\nimport { UnaryApp } from './unaryApp';\n\nexport {\n\tArrayAccess,\n\tFunctionCall,\n IntLiteral,\n RealLiteral,\n BoolLiteral,\n StringLiteral,\n ArrayLiteral,\n VariableLiteral,\n InfixApp,\n UnaryApp\n};","import { Expression } from './expression';\n\nexport class InfixApp extends Expression {\n\n constructor(op, left, right) {\n super();\n this.op = op;\n this.left = left;\n this.right = right;\n }\n\n toString () {\n const l = this.left.toString();\n const op = this.op.value;\n const r = this.right.toString();\n if(this.parenthesis) {\n return `(${l + op + r})`;\n } else {\n return l + op + r;\n }\n }\n}","import { Literal } from './literal';\nimport { Types } from './../../typeSystem/types';\nimport { convertToString } from './../../typeSystem/parsers';\n\nexport class IntLiteral extends Literal {\n \n constructor(value) {\n super(Types.INTEGER);\n this.value = value;\n }\n\n toString() {\n const text = convertToString(this.value, this.type);\n if(this.parenthesis) {\n return `(${text})`;\n } else {\n return text;\n }\n }\n}","import { Expression } from './expression';\n\nexport class Literal extends Expression {\n \n constructor (type) {\n super();\n this.type = type;\n }\n}","import { Literal } from './literal';\nimport { Types } from './../../typeSystem/types';\nimport { convertToString } from './../../typeSystem/parsers';\n\nexport class RealLiteral extends Literal {\n \n constructor(value) {\n super(Types.REAL);\n this.value = value;\n }\n\n toString() {\n const text = convertToString(this.value, this.type);\n if (this.parenthesis) {\n return `(${text})`;\n } else {\n return text;\n }\n }\n}","import { Literal } from './literal';\nimport { Types } from './../../typeSystem/types';\n\nexport class StringLiteral extends Literal {\n \n constructor(value) {\n super(Types.STRING);\n this.value = value;\n }\n\n toString() {\n const text = '\"' + this.value + '\"';\n if(this.parenthesis) {\n return `(${text})`;\n } else {\n return text;\n }\n }\n}","import {InfixApp} from './infixApp';\n\nexport class UnaryApp extends InfixApp {\n \n constructor (op, left) {\n super(op, left, null);\n }\n\n toString () {\n const l = this.left.toString();\n const op = this.op.value;\n if(this.parenthesis) {\n return `(${op + l})`;\n } else {\n return op + l;\n }\n }\n}","import { Literal } from './literal';\nimport { Types } from './../../typeSystem/types';\n\nexport class VariableLiteral extends Literal {\n \n constructor(id) {\n super(Types.UNDEFINED);\n this.id = id;\n }\n\n toString () {\n if(this.parenthesis) {\n return `(${this.id})`;\n } else {\n return this.id;\n }\n }\n}","import { CommonTokenStream, InputStream } from 'antlr4/index';\nimport * as Expressions from './expressions';\nimport * as Commands from './commands';\nimport * as AstHelpers from \"./ast_helpers\";\nimport { toInt, toString, toBool, toReal } from '../typeSystem/parsers';\nimport { Types } from \"../typeSystem/types\";\nimport { ArrayType } from \"../typeSystem/array_type\";\nimport { SourceInfo } from './sourceInfo';\nimport { convertFromString } from './operators';\nimport { SyntaxErrorFactory } from './error/syntaxErrorFactory';\nimport { LanguageDefinedFunction } from '../processor/definedFunctions';\nimport { LanguageService } from '../services/languageService';\n\nexport class IVProgParser {\n\n static createParser (input) {\n const lexerClass = LanguageService.getCurrentLexer();\n return new IVProgParser(input, lexerClass);\n }\n\n // \n static get BASE () {\n return 0;\n }\n static get FUNCTION () {\n return 1;\n }\n static get COMMAND () {\n return 2;\n }\n static get BREAKABLE () {\n return 4;\n }\n // \n\n constructor (input, lexerClass) {\n this.lexerClass = lexerClass;\n this.inputStream = new InputStream(input)\n this.lexer = new lexerClass(this.inputStream);\n this.lexer.recover = AstHelpers.recover.bind(this.lexer);\n this.tokenStream = new CommonTokenStream(this.lexer);\n this.tokenStream.fill();\n this.pos = 1;\n this.variableTypes = [this.lexerClass.RK_INTEGER,\n this.lexerClass.RK_REAL,\n this.lexerClass.RK_BOOLEAN,\n this.lexerClass.RK_STRING\n ];\n this.functionTypes = this.variableTypes.concat(this.lexerClass.RK_VOID);\n this.parsingArrayDimension = 0;\n this.scope = [];\n this.langFuncs = LanguageService.getCurrentLangFuncs();\n this.definedFuncsNameList = [];\n this.definedVariablesStack = [];\n }\n\n parseTree () {\n return this.parseProgram();\n }\n\n getToken (index = this.pos) {\n // if(index === null)\n // index = this.pos;\n return this.tokenStream.LT(index);\n }\n\n insideScope (scope) {\n if(this.scope.length <= 0) {\n return IVProgParser.BASE === scope;\n } else {\n return this.scope[this.scope.length-1] === scope;\n }\n }\n\n pushScope (scope) {\n this.scope.push(scope);\n }\n\n pushVariableStack () {\n this.definedVariablesStack.push([]);\n }\n\n popScope () {\n return this.scope.pop();\n }\n\n popVariableStack () {\n return this.definedVariablesStack.pop();\n }\n\n getCurrentVariableStack () {\n return this.definedVariablesStack[this.definedVariablesStack.length - 1];\n }\n\n isEOF () {\n this.getToken(this.pos);\n return this.tokenStream.fetchedEOF;\n }\n\n parseProgram () {\n this.consumeNewLines();\n const token = this.getToken();\n let globalVars = [];\n let functions = [];\n\n if(this.lexerClass.RK_PROGRAM === token.type) {\n this.pos++;\n this.consumeNewLines();\n this.checkOpenCurly();\n this.pos++;\n this.pushVariableStack();\n for(;;) {\n this.consumeNewLines();\n const token = this.getToken();\n if (token.type === this.lexerClass.RK_CONST || this.isVariableType(token)) {\n globalVars = globalVars.concat(this.parseGlobalVariables());\n } else if (token.type === this.lexerClass.RK_FUNCTION) {\n this.pushVariableStack();\n functions = functions.concat(this.parseFunction());\n this.popVariableStack();\n } else {\n break;\n }\n }\n this.consumeNewLines();\n this.checkCloseCurly();\n this.pos++;\n this.consumeNewLines();\n if(!this.isEOF()) {\n throw SyntaxErrorFactory.extra_lines();\n }\n this.popVariableStack();\n return {global: globalVars, functions: functions};\n } else {\n throw SyntaxErrorFactory.token_missing_one(this.lexer.literalNames[this.lexerClass.RK_PROGRAM], token);\n }\n }\n\n checkOpenCurly (attempt = false) {\n const token = this.getToken();\n if(this.lexerClass.OPEN_CURLY !== token.type){\n if(!attempt)\n throw SyntaxErrorFactory.token_missing_one('{', token);\n else\n return false;\n }\n return true;\n }\n\n checkCloseCurly (attempt = false) {\n const token = this.getToken();\n if(this.lexerClass.CLOSE_CURLY !== token.type){\n if(!attempt)\n throw SyntaxErrorFactory.token_missing_one('}', token);\n else\n return false;\n }\n return true;\n }\n\n /* It checks if the current token at position pos is a ']'.\n * As a check function it doesn't increment pos.\n *\n * @params bool:attempt, indicates that the token is optional. Defaults: false\n *\n * @returns true if the attempt is true and current token is '[',\n * false is attempt is true and current token is not '['\n **/\n checkOpenBrace (attempt = false) {\n const token = this.getToken();\n if(this.lexerClass.OPEN_BRACE !== token.type){\n if (!attempt) {\n throw SyntaxErrorFactory.token_missing_one('[', token);\n } else {\n return false;\n }\n }\n return true;\n }\n\n checkCloseBrace (attempt = false) {\n const token = this.getToken();\n if(this.lexerClass.CLOSE_BRACE !== token.type){\n if (!attempt) {\n throw SyntaxErrorFactory.token_missing_one(']', token);\n } else {\n return false;\n }\n }\n return true;\n }\n\n checkOpenParenthesis (attempt = false) {\n const token = this.getToken();\n if(this.lexerClass.OPEN_PARENTHESIS !== token.type){\n if (!attempt) {\n throw SyntaxErrorFactory.token_missing_one('(', token);\n } else {\n return false;\n }\n }\n return true;\n }\n\n checkCloseParenthesis (attempt = false) {\n const token = this.getToken();\n if(this.lexerClass.CLOSE_PARENTHESIS !== token.type){\n if (!attempt) {\n throw SyntaxErrorFactory.token_missing_one(')', token);\n } else {\n return false;\n }\n }\n return true;\n }\n\n checkEOS (attempt = false) {\n const eosToken = this.getToken();\n if (eosToken.type !== this.lexerClass.EOS) {\n if (!attempt)\n throw SyntaxErrorFactory.eos_missing(eosToken);\n else\n return false;\n }\n return true;\n }\n\n checkFunctionDuplicate (functionID, funcIDToken) {\n const id = functionID === null ? \"$main\" : functionID;\n const index = this.definedFuncsNameList.indexOf(id);\n if(index !== -1) {\n throw SyntaxErrorFactory.duplicate_function(funcIDToken);\n }\n this.definedFuncsNameList.push(id);\n }\n\n checkVariableDuplicate (variableID, sourceInfo) {\n const index = this.getCurrentVariableStack().indexOf(variableID);\n if(index !== -1) {\n throw SyntaxErrorFactory.duplicate_variable(sourceInfo);\n }\n this.getCurrentVariableStack().push(variableID);\n }\n\n consumeForSemiColon () {\n const eosToken = this.getToken();\n if (eosToken.type === this.lexerClass.EOS && eosToken.text.match(';')) {\n this.pos++;\n return; \n }\n throw SyntaxErrorFactory.token_missing_one(';', eosToken);\n }\n\n parseGlobalVariables () {\n const decl = this.parseMaybeConst();\n this.checkEOS();\n this.pos++;\n return decl;\n }\n\n /*\n * Checks if the next token is PR_CONST. It's only available\n * at global variables declaration level\n * @returns Declararion(const, type, id, initVal?)\n **/\n parseMaybeConst () {\n const constToken = this.getToken();\n if(constToken.type === this.lexerClass.RK_CONST) {\n this.pos++;\n const typeString = this.parseType();\n return this.parseDeclaration(typeString, true);\n } else if(this.isVariableType(constToken)) {\n const typeString = this.parseType();\n return this.parseDeclaration(typeString);\n } else {\n throw SyntaxErrorFactory.token_missing_list(\n [this.lexer.literalNames[this.lexerClass.RK_CONST]].concat(this.getTypeArray()), constToken);\n }\n\n }\n\n /*\n * Parses a declarion of the form: type --- id --- (= --- EAnd)?\n * @returns a list of Declararion(const, type, id, initVal?)\n **/\n parseDeclaration (typeString, isConst = false) {\n let initial = null;\n let dim1 = null;\n let dim2 = null;\n let dimensions = 0;\n const sourceInfo = SourceInfo.createSourceInfo(this.getToken())\n const idString = this.parseID();\n this.checkVariableDuplicate(idString, sourceInfo);\n // Check for array or vector\n // ID[int/IDi?][int/IDj?]\n if (this.checkOpenBrace(true)) {\n this.pos += 1; \n this.consumeNewLines();\n dim1 = this.parseArrayDimension();\n this.consumeNewLines();\n this.checkCloseBrace();\n this.pos += 1;\n dimensions += 1\n if(this.checkOpenBrace(true)) {\n this.pos += 1;\n this.consumeNewLines();\n dim2 = this.parseArrayDimension();\n this.consumeNewLines();\n this.checkCloseBrace();\n this.pos += 1;\n dimensions += 1\n }\n return this.parseArrayDeclaration(typeString, isConst, idString, sourceInfo, dimensions, dim1, dim2);\n } else {\n const equalsToken = this.getToken();\n if(isConst && equalsToken.type !== this.lexerClass.EQUAL ) {\n throw SyntaxErrorFactory.const_not_init(sourceInfo);\n }\n if(equalsToken.type === this.lexerClass.EQUAL) {\n this.pos++;\n initial = this.parseExpressionOR();\n }\n const declaration = new Commands.Declaration(idString, typeString, initial, isConst);\n declaration.sourceInfo = sourceInfo;\n const commaToken = this.getToken();\n if(commaToken.type === this.lexerClass.COMMA) {\n this.pos++;\n this.consumeNewLines();\n return [declaration]\n .concat(this.parseDeclaration(typeString, isConst));\n } else {\n return [declaration]\n }\n }\n }\n\n parseArrayDeclaration (typeString, isConst, idString, sourceInfo, dimensions, dim1, dim2) {\n const equalsToken = this.getToken();\n let n_lines = dim1;\n let n_columns = dim2;\n let initial = null;\n let dim_is_id = false;\n if(dim1 instanceof Expressions.VariableLiteral || dim2 instanceof Expressions.VariableLiteral) {\n dim_is_id = true;\n if(dimensions > 1 && (dim1 == null || dim2 == null)) {\n throw SyntaxErrorFactory.invalid_matrix_id_dimension(SourceInfo.createSourceInfo(equalsToken));\n }\n }\n if(isConst && equalsToken.type !== this.lexerClass.EQUAL ) {\n throw SyntaxErrorFactory.const_not_init(sourceInfo);\n }\n if(equalsToken.type === this.lexerClass.EQUAL) {\n if(dim_is_id) {\n if(dimensions == 1) {\n throw SyntaxErrorFactory.invalid_vector_init(SourceInfo.createSourceInfo(equalsToken));\n } else {\n throw SyntaxErrorFactory.invalid_matrix_init(SourceInfo.createSourceInfo(equalsToken));\n }\n }\n this.pos += 1\n initial = this.parseArrayLiteral(typeString);\n }\n if(initial == null && dim1 == null) {\n if(dimensions > 1) {\n throw SyntaxErrorFactory.cannot_infer_matrix_line(idString, sourceInfo);\n }\n throw SyntaxErrorFactory.cannot_infer_vector_size(idString, sourceInfo);\n }\n if(dimensions > 1) {\n if(initial == null && dim2 == null) {\n throw SyntaxErrorFactory.cannot_infer_matrix_column(idString, sourceInfo);\n }\n }\n\n if(dimensions === 1 && initial != null && !initial.isVector) {\n const expString = initial.toString();\n throw SyntaxErrorFactory.matrix_to_vector_literal_attr(idString, expString, initial.sourceInfo);\n } else if (dimensions > 1 && initial != null && initial.isVector) {\n const expString = initial.toString();\n throw SyntaxErrorFactory.vector_to_matrix_literal_attr(idString, expString, initial.sourceInfo);\n }\n\n if(dim1 == null) {\n n_lines = new Expressions.IntLiteral(toInt(initial.lines));\n n_lines.sourceInfo = sourceInfo;\n }\n\n if (dimensions > 1) {\n if(dim2 == null) {\n n_columns = new Expressions.IntLiteral(toInt(initial.columns));\n n_columns.sourceInfo = sourceInfo;\n } \n }\n const declaration = new Commands.ArrayDeclaration(idString,\n new ArrayType(typeString, dimensions), n_lines, n_columns, initial, isConst);\n declaration.sourceInfo = sourceInfo;\n const commaToken = this.getToken();\n if(commaToken.type === this.lexerClass.COMMA) {\n this.pos++;\n this.consumeNewLines();\n return [declaration]\n .concat(this.parseDeclaration(typeString, isConst));\n } else {\n return [declaration]\n }\n }\n\n consumeNewLines () {\n let token = this.getToken();\n while(token.type === this.lexerClass.EOS && token.text.match('[\\r\\n]+')) {\n this.pos++;\n token = this.getToken();\n }\n }\n\n isVariableType (token) {\n return this.variableTypes.find(v => v === token.type);\n }\n\n /*\n * Reads the next token of the stream to check if it is a Integer or an ID.\n * @returns Integer | ID\n **/\n parseArrayDimension () {\n const dimToken = this.getToken();\n if(dimToken.type === this.lexerClass.INTEGER) {\n //parse as int literal\n this.pos++;\n return this.getIntLiteral(dimToken);\n } else if(dimToken.type === this.lexerClass.ID) {\n //parse as variable\n this.pos++;\n return this.parseVariable(dimToken);\n } else if(dimToken.type === this.lexerClass.CLOSE_BRACE) {\n return null;\n } else {\n throw SyntaxErrorFactory.invalid_array_dimension(this.lexer.literalNames[this.lexerClass.RK_INTEGER], dimToken);\n }\n }\n\n /*\n * Returns an object {type: 'int', value: value}.\n * It checks for binary and hexadecimal integers.\n * @returns object with fields type and value\n **/\n getIntLiteral (token) {\n const text = token.text;\n const sourceInfo = SourceInfo.createSourceInfo(token);\n const exp = new Expressions.IntLiteral(toInt(text));\n exp.sourceInfo = sourceInfo;\n return exp;\n }\n\n getRealLiteral (token) {\n const sourceInfo = SourceInfo.createSourceInfo(token);\n const exp = new Expressions.RealLiteral(toReal(token.text));\n exp.sourceInfo = sourceInfo;\n return exp;\n }\n\n getStringLiteral (token) {\n const text = token.text;\n const sourceInfo = SourceInfo.createSourceInfo(token);\n const exp = new Expressions.StringLiteral(toString(text));\n exp.sourceInfo = sourceInfo;\n return exp;\n }\n\n getBoolLiteral (token) {\n const val = toBool(token.text);\n const exp = new Expressions.BoolLiteral(val);\n exp.sourceInfo = SourceInfo.createSourceInfo(token);\n return exp;\n }\n\n parseArrayLiteral (typeString) {\n const openCurly = this.checkOpenCurly(true);\n if(!openCurly) {\n const invalid_token = this.getToken();\n throw SyntaxErrorFactory.array_init_not_literal(SourceInfo.createSourceInfo(invalid_token));\n }\n const beginArray = this.getToken();\n if (this.parsingArrayDimension >= 2) {\n throw SyntaxErrorFactory.array_exceeds_2d(SourceInfo.createSourceInfo(beginArray));\n }\n this.pos += 1;\n this.parsingArrayDimension += 1;\n this.consumeNewLines();\n let data = null;\n const maybeCurlyOpen = this.checkOpenCurly(true);\n if(maybeCurlyOpen) {\n // This is potentially a list of vectors\n data = this.parseVectorList(typeString);\n } else {\n data = this.parseExpressionList();\n }\n this.consumeNewLines();\n this.checkCloseCurly()\n const endArray = this.getToken();\n this.pos += 1;\n this.parsingArrayDimension -= 1;\n const sourceInfo = SourceInfo.createSourceInfoFromList(beginArray, endArray);\n let dataDim = 1;\n if(data[0] instanceof Expressions.ArrayLiteral) {\n dataDim += 1;\n } else if(data.length == 1) {\n console.log(\"Talvez uma variável seja uma melhor opção\");\n }\n const type = new ArrayType(typeString, dataDim);\n const exp = new Expressions.ArrayLiteral(type, data);\n exp.sourceInfo = sourceInfo;\n return exp;\n }\n\n /** \n * Returns a list of ArrayLiterals. Helper function for parsing matrices\n */\n parseVectorList (typeString) {\n const list = [];\n let lastSize = null;\n for(;;) {\n this.checkOpenCurly();\n const beginArray = this.getToken();\n if (this.parsingArrayDimension >= 2) {\n throw SyntaxErrorFactory.array_exceeds_2d(SourceInfo.createSourceInfo(beginArray));\n }\n this.pos += 1;\n this.parsingArrayDimension += 1;\n this.consumeNewLines();\n const data = this.parseExpressionList();\n this.consumeNewLines();\n this.checkCloseCurly()\n const endArray = this.getToken();\n this.pos += 1;\n this.parsingArrayDimension -= 1;\n const sourceInfo = SourceInfo.createSourceInfoFromList(beginArray, endArray);\n if(lastSize == null) {\n lastSize = data.length;\n } else if (lastSize !== data.length) {\n const expString = this.inputStream.getText(beginArray.start, endArray.stop);\n throw SyntaxErrorFactory.invalid_matrix_literal_line(expString, sourceInfo);\n }\n const type = new ArrayType(typeString, 1);\n const exp = new Expressions.ArrayLiteral(type, data);\n exp.sourceInfo = sourceInfo;\n list.push(exp);\n const commaToken = this.getToken();\n if(commaToken.type !== this.lexerClass.COMMA) {\n break;\n } \n this.pos += 1;\n this.consumeNewLines();\n }\n if(list.length == 1) {\n console.log(\"Talvez um vetor seja uma melhor opção\");\n }\n return list\n }\n\n /*\n * Returns an object {type: 'variable', value: value}.\n * @returns object with fields type and value\n **/\n parseVariable (token) {\n const sourceInfo = SourceInfo.createSourceInfo(token);\n const exp = new Expressions.VariableLiteral(token.text);\n exp.sourceInfo = sourceInfo;\n return exp;\n }\n\n /*\n * Returns an object representing a function. It has\n * four attributes: returnType, id, formalParams and block.\n * The block object has two attributes: declarations and commands\n **/\n parseFunction () {\n this.pushScope(IVProgParser.FUNCTION);\n let formalParams = [];\n const token = this.getToken();\n if(token.type !== this.lexerClass.RK_FUNCTION) {\n //throw SyntaxError.createError(this.lexer.literalNames[this.lexerClass.PR_FUNCAO], token);\n return null;\n }\n this.pos++;\n const funType = this.parseType();\n let dimensions = 0;\n if(this.checkOpenBrace(true)) {\n this.pos++;\n this.checkCloseBrace();\n this.pos++;\n dimensions++;\n if(this.checkOpenBrace(true)) {\n this.pos++;\n this.checkCloseBrace();\n this.pos++;\n dimensions++;\n }\n }\n const funcIDToken = this.getToken();\n const functionID = this.parseID();\n this.checkFunctionDuplicate(functionID, funcIDToken);\n this.checkOpenParenthesis();\n this.pos++;\n this.consumeNewLines();\n if (!this.checkCloseParenthesis(true)) {\n formalParams = this.parseFormalParameters(); // formal parameters \n this.consumeNewLines();\n this.checkCloseParenthesis();\n this.pos++;\n } else {\n this.pos++;\n }\n this.consumeNewLines();\n const commandsBlock = this.parseCommandBlock();\n let returnType = funType;\n if(dimensions > 0) {\n returnType = new ArrayType(funType, dimensions);\n }\n const func = new Commands.Function(functionID, returnType, formalParams, commandsBlock);\n if (functionID === null && !func.isMain) {\n throw SyntaxErrorFactory.invalid_main_return(LanguageDefinedFunction.getMainFunctionName(),\n this.lexer.literalNames[this.lexerClass.RK_VOID],\n token.line);\n } else if (func.isMain && formalParams.length !== 0) {\n throw SyntaxErrorFactory.main_parameters();\n }\n this.popScope();\n return func;\n }\n\n /*\n * Parse the formal parameters of a function.\n * @returns a list of objects with the following attributes: type, id and dimensions.\n **/\n parseFormalParameters () {\n const list = [];\n for(;;) {\n let dimensions = 0;\n let reference = false;\n const typeString = this.parseType();\n let maybeIDToken = this.getToken();\n if(maybeIDToken.type === this.lexerClass.RK_REFERENCE) {\n reference = true;\n this.pos += 1;\n maybeIDToken = this.getToken();\n }\n const idString = this.parseID();\n this.checkVariableDuplicate(idString, maybeIDToken);\n if (this.checkOpenBrace(true)) {\n this.pos += 1;\n dimensions += 1;\n this.checkCloseBrace();\n this.pos += 1;\n if(this.checkOpenBrace(true)) {\n this.pos += 1;\n dimensions += 1;\n this.checkCloseBrace();\n this.pos += 1;\n }\n }\n let type = null;\n if(dimensions > 0) {\n type = new ArrayType(typeString, dimensions);\n } else {\n type = typeString;\n }\n const parameter = new Commands.FormalParameter(type, idString, reference);\n parameter.sourceInfo = SourceInfo.createSourceInfo(maybeIDToken);\n list.push(parameter);\n const commaToken = this.getToken();\n if (commaToken.type !== this.lexerClass.COMMA)\n break;\n this.pos++;\n this.consumeNewLines();\n }\n return list;\n }\n\n parseID () {\n const token = this.getToken();\n if(token.type !== this.lexerClass.ID) {\n throw SyntaxErrorFactory.id_missing(token);\n }\n this.pos++;\n if (this.insideScope(IVProgParser.FUNCTION)) {\n if (token.text === LanguageDefinedFunction.getMainFunctionName()){\n return null;\n }\n }\n return token.text;\n }\n\n parseMaybeLibID () {\n const token = this.getToken();\n if(token.type !== this.lexerClass.ID && token.type !== this.lexerClass.LIB_ID) {\n throw SyntaxErrorFactory.id_missing(token);\n } \n this.pos++;\n return token.text;\n }\n\n parseType () {\n const token = this.getToken();\n if(token.type === this.lexerClass.ID && this.insideScope(IVProgParser.FUNCTION)) {\n return Types.VOID;\n } else if (token.type === this.lexerClass.RK_VOID && this.insideScope(IVProgParser.FUNCTION)) {\n this.pos++;\n return Types.VOID;\n } else if (this.isVariableType(token)) {\n this.pos++;\n switch(token.type) {\n case this.lexerClass.RK_INTEGER:\n return Types.INTEGER;\n case this.lexerClass.RK_BOOLEAN:\n return Types.BOOLEAN;\n case this.lexerClass.RK_REAL:\n return Types.REAL;\n case this.lexerClass.RK_STRING:\n return Types.STRING;\n default:\n break;\n }\n }\n \n throw SyntaxErrorFactory.invalid_type(this.getTypeArray(), token);\n }\n\n parseCommandBlock (optionalCurly = false) {\n let variablesDecl = [];\n const commands = [];\n let hasOpen = false;\n if (this.checkOpenCurly(optionalCurly)) {\n this.pos++;\n hasOpen = true;\n }\n this.consumeNewLines();\n let parsedCommand = false;\n for(;;) {\n\n const cmd = this.parseCommand();\n if (cmd === null)\n break;\n if(cmd !== -1) {\n if (cmd instanceof Array) {\n if(parsedCommand) {\n const lastToken = this.getToken(this.pos - 1);\n throw SyntaxErrorFactory.invalid_var_declaration(lastToken);\n }\n variablesDecl = variablesDecl.concat(cmd);\n } else {\n parsedCommand = true;\n commands.push(cmd);\n }\n }\n }\n this.consumeNewLines();\n if (hasOpen) {\n this.checkCloseCurly()\n this.pos++;\n this.consumeNewLines();\n }\n return new Commands.CommandBlock(variablesDecl, commands);\n }\n\n parseCommand () {\n const token = this.getToken();\n if (this.isVariableType(token)) {\n if(!this.insideScope(IVProgParser.FUNCTION)) {\n throw SyntaxErrorFactory.invalid_var_declaration(token);\n }\n this.pushScope(IVProgParser.BASE);\n const varType = this.parseType();\n this.popScope();\n const cmd = this.parseDeclaration(varType);\n this.checkEOS();\n this.pos++;\n return cmd;\n } else if (token.type === this.lexerClass.ID) {\n return this.parseIDCommand();\n } else if (token.type === this.lexerClass.LIB_ID) {\n return this.parseIDCommand();\n } else if (token.type === this.lexerClass.RK_RETURN) {\n return this.parseReturn();\n } else if (token.type === this.lexerClass.RK_WHILE || token.type === this.lexerClass.RK_WHILE_ALT) {\n return this.parseWhile();\n } else if (token.type === this.lexerClass.RK_FOR || token.type === this.lexerClass.RK_FOR_ALT) {\n return this.parseFor();\n } else if (token.type === this.lexerClass.RK_BREAK ) {\n if(!this.insideScope(IVProgParser.BREAKABLE)) {\n throw SyntaxErrorFactory.invalid_break_command(\n this.lexer.literalNames[this.lexerClass.RK_BREAK],\n token\n );\n }\n return this.parseBreak();\n } else if (token.type === this.lexerClass.RK_SWITCH) {\n return this.parseSwitchCase();\n } else if (token.type === this.lexerClass.RK_DO) {\n return this.parseRepeatUntil();\n } else if (token.type === this.lexerClass.RK_IF) {\n return this.parseIfThenElse();\n } else if (this.checkEOS(true)){\n this.pos++;\n return -1;\n } else {\n return null;\n }\n }\n\n parseSwitchCase () {\n this.pushScope(IVProgParser.BREAKABLE);\n this.pos++;\n this.checkOpenParenthesis();\n this.pos++;\n this.consumeNewLines();\n const exp = this.parseExpressionOR();\n this.consumeNewLines();\n this.checkCloseParenthesis();\n this.pos++;\n this.consumeNewLines();\n this.checkOpenCurly();\n this.pos++;\n this.consumeNewLines();\n const casesList = this.parseCases();\n this.consumeNewLines();\n this.checkCloseCurly();\n this.pos++;\n this.consumeNewLines();\n\n this.popScope();\n return new Commands.Switch(exp, casesList);\n }\n\n parseRepeatUntil () {\n this.pos++;\n this.consumeNewLines();\n this.pushScope(IVProgParser.BREAKABLE);\n const commandsBlock = this.parseCommandBlock();\n this.consumeNewLines(); //Maybe not...\n const whileToken = this.getToken();\n if (whileToken.type !== this.lexerClass.RK_DO_UNTIL) {\n throw SyntaxErrorFactory.token_missing_one(this.lexer.literalNames[this.lexerClass.RK_DO_UNTIL], whileToken);\n }\n this.pos++;\n this.checkOpenParenthesis();\n this.pos++;\n this.consumeNewLines();\n const condition = this.parseExpressionOR();\n this.consumeNewLines();\n this.checkCloseParenthesis();\n this.pos++;\n this.checkEOS();\n this.popScope();\n return new Commands.RepeatUntil(condition, commandsBlock);\n }\n\n parseIfThenElse () {\n if(this.insideScope(IVProgParser.BREAKABLE)) {\n this.pushScope(IVProgParser.BREAKABLE);\n } else {\n this.pushScope(IVProgParser.COMMAND);\n }\n const token = this.getToken();\n this.pos++;\n this.checkOpenParenthesis();\n this.pos++;\n this.consumeNewLines();\n const logicalExpression = this.parseExpressionOR();\n this.consumeNewLines();\n this.checkCloseParenthesis();\n this.pos++;\n this.consumeNewLines();\n const cmdBlocks = this.parseCommandBlock();\n\n const maybeElse = this.getToken();\n if(maybeElse.type === this.lexerClass.RK_ELSE) {\n this.pos++;\n this.consumeNewLines();\n const maybeIf = this.getToken();\n let elseBlock = null;\n if(this.checkOpenCurly(true)) {\n elseBlock = this.parseCommandBlock();\n } else if(maybeIf.type === this.lexerClass.RK_IF) {\n elseBlock = this.parseIfThenElse();\n } else {\n throw SyntaxErrorFactory.token_missing_list([this.lexer.literalNames[this.lexerClass.RK_IF], '{'], maybeIf);\n }\n this.popScope();\n const cmd = new Commands.IfThenElse(logicalExpression, cmdBlocks, elseBlock);\n cmd.sourceInfo = SourceInfo.createSourceInfo(token);\n return cmd;\n }\n this.popScope();\n\n const cmd = new Commands.IfThenElse(logicalExpression, cmdBlocks, null);\n cmd.sourceInfo = SourceInfo.createSourceInfo(token);\n return cmd;\n }\n\n parseFor () {\n this.pushScope(IVProgParser.BREAKABLE);\n const for_token = this.getToken();\n this.pos += 1;\n // parse ID\n const id_token = this.getToken();\n const id = this.parseID();\n const for_id = new Expressions.VariableLiteral(id);\n for_id.sourceInfo = SourceInfo.createSourceInfo(id_token);\n // END parse ID\n const for_from = this.parseForParameters(this.lexerClass.RK_FOR_FROM);\n const for_to = this.parseForParameters(this.lexerClass.RK_FOR_TO);\n const maybePass = this.parseForParameters(this.lexerClass.RK_FOR_PASS);\n this.consumeNewLines();\n const commandsBlock = this.parseCommandBlock();\n this.popScope();\n const cmd = new Commands.For(for_id, for_from, for_to, maybePass, commandsBlock);\n cmd.sourceInfo = SourceInfo.createSourceInfo(for_token);\n return cmd;\n }\n\n parseWhile () {\n this.pushScope(IVProgParser.BREAKABLE);\n const token = this.getToken();\n this.pos++;\n this.checkOpenParenthesis();\n this.pos++;\n this.consumeNewLines();\n const logicalExpression = this.parseExpressionOR();\n this.consumeNewLines();\n this.checkCloseParenthesis();\n this.pos++;\n this.consumeNewLines();\n const cmdBlocks = this.parseCommandBlock();\n this.popScope();\n const cmd = new Commands.While(logicalExpression, cmdBlocks);\n cmd.sourceInfo = SourceInfo.createSourceInfo(token);\n return cmd;\n }\n\n parseBreak () {\n this.pos++;\n this.checkEOS();\n this.pos++;\n return new Commands.Break();\n }\n\n parseReturn () {\n this.pos++;\n let exp = null;\n if(!this.checkEOS(true)) {\n exp = this.parseExpressionOR();\n this.checkEOS();\n }\n this.pos++;\n return new Commands.Return(exp);\n }\n\n parseIDCommand () {\n const refToken = this.getToken();\n const isID = refToken.type === this.lexerClass.ID;\n const id = this.parseMaybeLibID();\n if(this.checkOpenBrace(true)) {\n this.pos++;\n let lineExpression = null;\n let columnExpression = null;\n this.consumeNewLines();\n lineExpression = this.parseExpression()\n this.consumeNewLines();\n this.checkCloseBrace();\n this.pos++;\n if (this.checkOpenBrace(true)) {\n this.pos++\n this.consumeNewLines();\n columnExpression = this.parseExpression();\n this.consumeNewLines();\n this.checkCloseBrace();\n this.pos++;\n }\n const equalToken = this.getToken();\n if (equalToken.type !== this.lexerClass.EQUAL) {\n throw SyntaxErrorFactory.token_missing_one('=', equalToken);\n }\n this.pos++;\n const exp = this.parseExpressionOR();\n this.checkEOS();\n this.pos++;\n const cmd = new Commands.ArrayIndexAssign(id, lineExpression, columnExpression, exp);\n cmd.sourceInfo = SourceInfo.createSourceInfo(equalToken);\n return cmd;\n }\n const equalOrParenthesis = this.getToken();\n if (isID && equalOrParenthesis.type === this.lexerClass.EQUAL) {\n this.pos++\n const exp = this.parseExpressionOR();\n this.checkEOS();\n this.pos++;\n const cmd = new Commands.Assign(id, exp);\n cmd.sourceInfo = SourceInfo.createSourceInfo(equalOrParenthesis);\n return cmd;\n } else if (equalOrParenthesis.type === this.lexerClass.OPEN_PARENTHESIS) {\n const funcCall = this.parseFunctionCallCommand(id);\n this.checkEOS();\n this.pos++;\n return funcCall;\n } else if (isID) {\n throw SyntaxErrorFactory.token_missing_list(['=','('], equalOrParenthesis);\n } else {\n throw SyntaxErrorFactory.invalid_id_format(refToken);\n }\n }\n\n parseForParameters (keyword_code) {\n if(keyword_code === this.lexerClass.RK_FOR_PASS) {\n if(this.checkOpenCurly(true)) {\n return null;\n }\n }\n const from_token = this.getToken();\n if (from_token.type !== keyword_code) {\n // TODO better error message\n const keyword = this.lexer.literalNames[keyword_code];\n throw new Error(\"Error de sintaxe no comando repita_para: esperava-se \"+keyword+\" mas encontrou \"+from_token.text);\n }\n this.pos += 1;\n let int_or_id = this.getToken();\n let is_unary_op = false;\n let op = null;\n if(int_or_id.type === this.lexerClass.SUM_OP) {\n is_unary_op = true;\n op = int_or_id.text;\n this.pos += 1;\n int_or_id = this.getToken();\n }\n let for_from = null;\n if (int_or_id.type === this.lexerClass.ID) {\n for_from = new Expressions.VariableLiteral(this.parseID());\n for_from.sourceInfo = SourceInfo.createSourceInfo(int_or_id);\n } else if (int_or_id.type === this.lexerClass.INTEGER) {\n this.pos += 1;\n for_from = this.getIntLiteral(int_or_id);\n }\n if (for_from == null) {\n // TODO better error message\n const keyword = this.lexer.literalNames[keyword_code]; \n throw new Error(\"Error de sintaxe no comando repeita_para: \"+ int_or_id.text + \" não é compativel com o esperado para o paramentro \"+ keyword + \". O valor deve ser um inteiro ou variável.\");\n }\n if (is_unary_op) {\n for_from = new Expressions.UnaryApp(convertFromString(op), for_from);\n }\n return for_from;\n }\n\n parseCases () {\n const token = this.getToken();\n if(token.type !== this.lexerClass.RK_CASE) {\n throw SyntaxErrorFactory.token_missing_one(this.lexer.literalNames[this.lexerClass.RK_CASE], token);\n }\n this.pos++;\n const nextToken = this.getToken();\n if(nextToken.type === this.lexerClass.RK_DEFAULT) {\n this.pos++;\n const colonToken = this.getToken();\n if (colonToken.type !== this.lexerClass.COLON) {\n throw SyntaxErrorFactory.token_missing_one(':', colonToken);\n }\n this.pos++;\n this.consumeNewLines();\n const block = this.parseCommandBlock(true);\n const defaultCase = new Commands.Case(null);\n defaultCase.setCommands(block.commands);\n return [defaultCase];\n } else {\n const exp = this.parseExpressionOR();\n const colonToken = this.getToken();\n if (colonToken.type !== this.lexerClass.COLON) {\n throw SyntaxErrorFactory.token_missing_one(':', colonToken);\n }\n this.pos++;\n this.consumeNewLines();\n const block = this.parseCommandBlock(true);\n const aCase = new Commands.Case(exp);\n aCase.setCommands(block.commands);\n const caseToken = this.getToken();\n if(caseToken.type === this.lexerClass.RK_CASE) {\n return [aCase].concat(this.parseCases());\n } else {\n return [aCase];\n }\n }\n }\n\n /*\n * Parses an Expression following the structure:\n *\n * EOR => EAnd ( 'or' EOR)? #expression and\n *\n * EOR => ENot ('and' EOR)? #expression or\n *\n * ENot => 'not'? ER #expression not\n *\n * ER => E ((>=, <=, ==, >, <) E)? #expression relational\n *\n * E => factor ((+, -) E)? #expression\n *\n * factor=> term ((*, /, %) factor)?\n *\n * term => literal || arrayAccess || FuncCall || ID || '('EAnd')'\n **/\n parseExpressionOR () {\n let exp1 = this.parseExpressionAND();\n while (this.getToken().type === this.lexerClass.OR_OPERATOR) {\n const opToken = this.getToken();\n this.pos++;\n const or = convertFromString('or');\n this.consumeNewLines();\n const exp2 = this.parseExpressionAND();\n const finalExp = new Expressions.InfixApp(or, exp1, exp2);\n finalExp.sourceInfo = SourceInfo.createSourceInfo(opToken);\n exp1 = finalExp\n }\n return exp1;\n }\n\n parseExpressionAND () {\n let exp1 = this.parseExpressionNot();\n while (this.getToken().type === this.lexerClass.AND_OPERATOR) {\n const opToken = this.getToken();\n this.pos++;\n const and = convertFromString('and');\n this.consumeNewLines();\n const exp2 = this.parseExpressionNot();\n const finalExp = new Expressions.InfixApp(and, exp1, exp2);\n finalExp.sourceInfo = SourceInfo.createSourceInfo(opToken);\n exp1 = finalExp;\n }\n return exp1;\n }\n\n parseExpressionNot () {\n const maybeNotToken = this.getToken();\n if (maybeNotToken.type === this.lexerClass.NOT_OPERATOR) {\n const opToken = this.getToken();\n this.pos++;\n const not = convertFromString('not');\n const exp1 = this.parseExpressionRel();\n const finalExp = new Expressions.UnaryApp(not, exp1);\n finalExp.sourceInfo = SourceInfo.createSourceInfo(opToken);\n return finalExp;\n \n } else {\n return this.parseExpressionRel();\n }\n }\n\n parseExpressionRel () {\n let exp1 = this.parseExpression();\n while (this.getToken().type === this.lexerClass.RELATIONAL_OPERATOR) {\n const relToken = this.getToken();\n this.pos++;\n const rel = convertFromString(relToken.text);\n const exp2 = this.parseExpression();\n const finalExp = new Expressions.InfixApp(rel, exp1, exp2);\n finalExp.sourceInfo = SourceInfo.createSourceInfo(relToken);\n exp1 = finalExp;\n }\n return exp1;\n }\n\n parseExpression () {\n let factor = this.parseFactor();\n while (this.getToken().type === this.lexerClass.SUM_OP) {\n const sumOpToken = this.getToken();\n this.pos++;\n const op = convertFromString(sumOpToken.text);\n const factor2 = this.parseFactor();\n const finalExp = new Expressions.InfixApp(op, factor, factor2);\n finalExp.sourceInfo = SourceInfo.createSourceInfo(sumOpToken);\n factor = finalExp;\n }\n return factor;\n }\n\n parseFactor () {\n let term = this.parseTerm();\n while (this.getToken().type === this.lexerClass.MULTI_OP) {\n const multOpToken = this.getToken();\n this.pos++;\n const op = convertFromString(multOpToken.text);\n const term2 =this.parseTerm();\n const finalExp = new Expressions.InfixApp(op, term, term2);\n finalExp.sourceInfo = SourceInfo.createSourceInfo(multOpToken);\n term = finalExp;\n }\n return term;\n }\n\n parseTerm () {\n const token = this.getToken();\n let sourceInfo = null;\n let exp = null;\n switch(token.type) {\n case this.lexerClass.SUM_OP:\n this.pos++;\n sourceInfo = SourceInfo.createSourceInfo(token);\n exp = new Expressions.UnaryApp(convertFromString(token.text), this.parseTerm());\n exp.sourceInfo = sourceInfo;\n return exp;\n case this.lexerClass.INTEGER:\n this.pos++;\n return this.getIntLiteral(token);\n case this.lexerClass.REAL:\n this.pos++;\n return this.getRealLiteral(token);\n case this.lexerClass.STRING:\n this.pos++;\n return this.getStringLiteral(token);\n case this.lexerClass.RK_TRUE:\n case this.lexerClass.RK_FALSE:\n this.pos++;\n return this.getBoolLiteral(token);\n case this.lexerClass.OPEN_CURLY:\n // No more annonymous array\n // return this.parseArrayLiteral();\n throw SyntaxErrorFactory.annonymous_array_literal(token);\n case this.lexerClass.ID:\n case this.lexerClass.LIB_ID:\n return this.parseIDTerm();\n case this.lexerClass.OPEN_PARENTHESIS:\n return this.parseParenthesisExp();\n default:\n throw SyntaxErrorFactory.invalid_terminal(token);\n }\n }\n\n parseIDTerm () {\n const tokenA = this.getToken();\n const id = this.parseMaybeLibID();\n const isID = tokenA.type === this.lexerClass.ID;\n if(isID && this.checkOpenBrace(true)) {\n let tokenB = null;\n this.pos++;\n const firstIndex = this.parseExpression();\n let secondIndex = null;\n this.consumeNewLines();\n this.checkCloseBrace();\n tokenB = this.getToken();\n this.pos++;\n if(this.checkOpenBrace(true)){\n this.pos++;\n secondIndex = this.parseExpression();\n this.consumeNewLines();\n this.checkCloseBrace();\n tokenB = this.getToken();\n this.pos++;\n }\n const sourceInfo = SourceInfo.createSourceInfoFromList(tokenA, tokenB); \n const exp = new Expressions.ArrayAccess(id, firstIndex, secondIndex);\n exp.sourceInfo = sourceInfo;\n return exp;\n\n } else if (this.checkOpenParenthesis(true)) {\n return this.parseFunctionCallExpression(id);\n } else if (isID) {\n const sourceInfo = SourceInfo.createSourceInfo(tokenA);\n const exp = new Expressions.VariableLiteral(id);\n exp.sourceInfo = sourceInfo;\n return exp;\n } else {\n throw SyntaxErrorFactory.invalid_id_format(tokenA);\n }\n }\n\n getFunctionName (id) {\n const name = LanguageDefinedFunction.getInternalName(id);\n if (name === null) {\n if (id === LanguageDefinedFunction.getMainFunctionName()) {\n return null;\n }\n return id;\n } else {\n return name;\n }\n }\n\n parseFunctionCallExpression (id) {\n const tokenA = this.getToken(this.pos - 1);\n const actualParameters = this.parseActualParameters();\n const tokenB = this.getToken(this.pos - 1);\n const funcName = this.getFunctionName(id);\n const sourceInfo = SourceInfo.createSourceInfoFromList(tokenA, tokenB);\n const cmd = new Expressions.FunctionCall(funcName, actualParameters);\n cmd.sourceInfo = sourceInfo;\n return cmd;\n }\n\n parseFunctionCallCommand (id) {\n return this.parseFunctionCallExpression(id);\n }\n\n parseParenthesisExp () {\n this.checkOpenParenthesis();\n const tokenA = this.getToken();\n this.pos += 1;\n this.consumeNewLines();\n const exp = this.parseExpressionOR();\n this.consumeNewLines();\n this.checkCloseParenthesis();\n const tokenB = this.getToken();\n this.pos += 1;\n exp.sourceInfo = SourceInfo.createSourceInfoFromList(tokenA, tokenB);\n exp.parenthesis = true;\n return exp;\n }\n\n parseActualParameters () {\n this.checkOpenParenthesis();\n this.pos++;\n if(this.checkCloseParenthesis(true)) {\n this.pos++;\n return [];\n }\n this.consumeNewLines();\n const list = this.parseExpressionList();\n this.consumeNewLines();\n this.checkCloseParenthesis();\n this.pos++;\n return list;\n }\n\n parseExpressionList () {\n const list = [];\n for(;;) {\n const exp = this.parseExpressionOR();\n list.push(exp);\n const maybeToken = this.getToken();\n if (maybeToken.type !== this.lexerClass.COMMA) {\n break;\n } else {\n this.pos++;\n this.consumeNewLines();\n }\n }\n return list;\n }\n\n getTypeArray () {\n const types = this.insideScope(IVProgParser.FUNCTION) ? this.functionTypes : this.variableTypes;\n return types.map( x => this.lexer.literalNames[x]);\n }\n}\n","export const Operators = Object.freeze({\n ADD: {ord: 0, value: \"+\"},\n SUB: {ord: 1, value: \"-\"},\n MULT: {ord: 2, value: '*'},\n DIV: {ord: 3, value: '/'},\n MOD: {ord: 4, value: '%'},\n GT: {ord: 5, value: '>'},\n GE: {ord: 6, value: '>='},\n LT: {ord: 7, value: '<'},\n LE: {ord: 8, value: '<='},\n EQ: {ord: 9, value: '=='},\n NEQ: {ord: 10, value: '!='},\n AND: {ord: 11, value: 'and'},\n OR: {ord: 12, value: 'or'},\n NOT: {ord: 13, value: 'not'}\n});\n\nexport function convertFromString (op) {\n switch (op) {\n case '+' : return Operators.ADD;\n case '-' : return Operators.SUB;\n case '*' : return Operators.MULT;\n case '/' : return Operators.DIV;\n case '%' : return Operators.MOD;\n case '>' : return Operators.GT;\n case '>=' : return Operators.GE;\n case '<' : return Operators.LT;\n case '<=' : return Operators.LE;\n case '==' : return Operators.EQ;\n case '!=' : return Operators.NEQ;\n case 'and' : return Operators.AND;\n case 'or' : return Operators.OR;\n case 'not' : return Operators.NOT;\n }\n}","export class SourceInfo {\n\n static createSourceInfo (token) {\n return new SourceInfo(token.line, token.column, token.text, token.text.length);\n }\n\n static createSourceInfoFromList (tokenA, tokenB) {\n const line = tokenA.line;\n const column = tokenA.column;\n // adapted from https://github.com/UNIVALI-LITE/Portugol-Studio/blob/master/core/src/main/java/br/univali/portugol/nucleo/analise/sintatica/Portugol.g\n // No idea why...\n const size = tokenB.tokenIndex + 1 - tokenA.tokenIndex\n return new SourceInfo(line, column, \"\", size);\n }\n\n constructor (line, column, text, size) {\n this.line = line;\n this.column = column;\n this.text = text;\n this.size = size;\n }\n\n}","import { LocalizedStrings } from \"./../services/localizedStringsService\";\nimport { isElementInViewport } from \"./../util/utils\";\nimport { Config } from \"./../util/config\";\n\nexport class DOMConsole {\n\n static get BASH_TEMPLATE () {\n return `\n
\n \n Terminal\n \n \n
\n
`;\n }\n\n static get INPUT_CARET_TEMPLATE () {\n return `\n
\n \n
\n
`;\n }\n\n static get USER () {\n return 0;\n }\n\n static get INFO () {\n return 1;\n }\n\n static get ERR () {\n return 2;\n }\n\n static get INPUT () {\n return 3;\n }\n\n constructor (elementID, disableMarginTop = false) {\n this.disableMarginTop = disableMarginTop;\n this.input = null;\n this.cursorInterval = null;\n this.idleInterval = null;\n this.inputDiv = null;\n this.inputCMD = null;\n this.inputSpan = null;\n this.cursorRef = null;\n this.needInput = false;\n this.clearBtn = null;\n this.hideBtn = null;\n this.showBtn = null;\n this.termDiv = null;\n this.anyKey = false;\n let actualID = elementID\n if (elementID[0] === '#') {\n actualID = elementID.substring(1);\n }\n this.parent = document.getElementById(actualID)\n this.setup();\n this.inputListeners = [];\n this.hideInput();\n this.pending_writes = [];\n this.last_clear = -1;\n }\n\n setup () {\n this._setupDom();\n this._setupEvents();\n }\n\n _setupEvents () {\n this.input.addEventListener('keydown', this.registerInput.bind(this));\n this.clearBtn.addEventListener('click', this.clearBtnClick.bind(this));\n this.hideBtn.addEventListener('click', this.hideBtnClick.bind(this));\n this.showBtn.addEventListener('click', this.showBtnClick.bind(this));\n }\n\n registerInput (event) {\n if (!this.needInput) {\n return;\n }\n const keyCode = event.which;\n if (keyCode === 13 || this.anyKey) {\n if(this.idleInterval != null) {\n clearInterval(this.idleInterval);\n this.idleInterval = null;\n }\n let text = this.input.value;\n text = text.replace('[\\n\\r]+', '');\n this.notifyListeners(text);\n this._appendUserInput(text);\n this.input.value = '';\n this.inputSpan.innerHTML = '';\n }\n }\n\n _setupDom () {\n const bashNode = document.createElement('div');\n bashNode.classList.add('bash');\n bashNode.innerHTML = DOMConsole.BASH_TEMPLATE;\n this.termDiv = bashNode.querySelector(\"#ivprog-term\");\n this.termDiv.classList.add(\"ivprog-term-div\");\n this.inputDiv = document.createElement(\"div\");\n this.inputDiv.id = \"ivprog-terminal-inputdiv\";\n this.inputDiv.innerHTML = DOMConsole.INPUT_CARET_TEMPLATE;\n this.input = document.createElement(\"input\");\n this.input.setAttribute(\"name\", \"command\");\n this.input.setAttribute(\"value\", \"\");\n this.input.setAttribute(\"type\", \"text\");\n this.inputDiv.append(this.input);\n this.termDiv.append(this.inputDiv);\n bashNode.append(this.termDiv);\n this.parent.append(bashNode);\n this.inputCMD = this.inputDiv.querySelector(\"#cmd\");\n this.cursorRef = this.inputCMD.querySelector(\"#cursor\");\n this.inputSpan = this.inputCMD.querySelector('span');\n this.clearBtn = bashNode.querySelector('#ivprog-console-clearbtn');\n this.hideBtn = bashNode.querySelector('#ivprog-console-hidebtn');\n this.showBtn = bashNode.querySelector('#ivprog-console-showbtn');\n this._setupCursor();\n //Jquery tooltips....\n window.$(this.clearBtn).popup({content:LocalizedStrings.getUI(\"tooltip_terminal_clear\")});\n window.$(this.showBtn).popup({content:LocalizedStrings.getUI(\"tooltip_terminal_show\")});\n window.$(this.hideBtn).popup({content:LocalizedStrings.getUI(\"tooltip_terminal_hide\")});\n }\n\n _setupCursor () {\n this.inputCMD.addEventListener('click', this.blinkCaretAndFocus.bind(this));\n //this.inputCMD.click();\n \n this.input.addEventListener('keyup', this.updateSpanText.bind(this));\n this.input.addEventListener('blur', this.stopBlinkCaret.bind(this));\n }\n\n blinkCaretAndFocus () {\n if(this.cursorInterval != null) {\n return;\n }\n this.input.focus();\n this.cursorInterval = window.setInterval(() => {\n if (this.cursorRef.style.visibility === 'visible') {\n this.cursorRef.style.visibility = 'hidden';\n } else {\n this.cursorRef.style.visibility = 'visible';\n }\n }, 500);\n }\n\n updateSpanText () {\n this.inputSpan.innerHTML = this.input.value;\n if(this.idleInterval != null)\n window.clearInterval(this.idleInterval);\n this.scheduleNotify()\n }\n\n stopBlinkCaret () {\n clearInterval(this.cursorInterval);\n this.cursorInterval = null;\n this.cursorRef.style.visibility = 'visible';\n }\n\n notifyListeners (text) {\n this.inputListeners.forEach(resolve => resolve(text));\n this.inputListeners.splice(0, this.inputListeners.length);\n this.hideInput();\n this.anyKey = false;\n }\n\n write (text) {\n this._appendText(text, DOMConsole.USER);\n }\n\n info (text) {\n this._appendText(text, DOMConsole.INFO);\n }\n\n err (text) {\n this._appendText(text, DOMConsole.ERR);\n }\n\n _appendText (text, type) {\n const write_time = Date.now();\n const pending_write = setTimeout(() => {\n this.pending_writes.shift();\n if(this.last_clear >= write_time) {\n return;\n }\n const divClass = this.getClassForType(type);\n const textDiv = document.createElement('div');\n textDiv.classList.add(divClass);\n textDiv.innerHTML = this.getOutputText(text);\n this.termDiv.insertBefore(textDiv, this.inputDiv);\n this.scrollTerm();\n }, 5);\n this.pending_writes.push(pending_write);\n }\n\n _appendUserInput (text) {\n const write_time = Date.now();\n const pending_write = setTimeout(() => {\n this.pending_writes.shift();\n if(this.last_clear >= write_time) {\n return;\n }\n const divClass = this.getClassForType(DOMConsole.INPUT);\n const textDiv = document.createElement('div');\n textDiv.innerHTML = this.getUserInputText(text);\n textDiv.classList.add(divClass);\n this.termDiv.insertBefore(textDiv, this.inputDiv);\n this.scrollTerm();\n }, 5);\n this.pending_writes.push(pending_write);\n }\n\n getOutputText (text) {\n if(text.trim().length == 0) {\n text = \" \";\n }\n return `${text}`;\n }\n\n getUserInputText (text) {\n if(text.trim().length == 0) {\n text = \" \";\n }\n return `${text}`;\n }\n\n scrollTerm () {\n //scrollIt(this.inputDiv.previousSibling,200);\n this.termDiv.scrollTop = this.termDiv.scrollHeight;\n }\n\n focus () {\n this.termDiv.style.display = 'block';\n // Is in draggable mode?\n if(!this.disableMarginTop && this.parent.style.top.length == 0) {\n this.parent.style.marginTop = \"-160px\";\n }\n if(this.needInput) {\n this.showInput();\n this.scheduleNotify();\n }\n if(!isElementInViewport(this.termDiv))\n this.termDiv.scrollIntoView(false);\n this.scrollTerm();\n }\n\n hide () {\n if(this.needInput) {\n clearInterval(this.idleInterval);\n this.hideInput();\n this.needInput = true;\n }\n // Is in draggable mode?\n if(!this.disableMarginTop && this.parent.style.top.length == 0) {\n this.parent.style.marginTop = \"0\";\n }\n this.termDiv.style.display = 'none';\n }\n\n getClassForType (type) {\n switch (type) {\n case DOMConsole.INPUT:\n return \"ivprog-term-userInput\";\n case DOMConsole.USER:\n return \"ivprog-term-userText\";\n case DOMConsole.INFO:\n return \"ivprog-term-info\";\n case DOMConsole.ERR:\n return \"ivprog-term-error\";\n }\n }\n\n dispose () {\n this.input.removeEventListener('keyup', this.updateSpanText.bind(this));\n this.input.removeEventListener('blur', this.stopBlinkCaret.bind(this));\n this.input.removeEventListener('keydown', this.registerInput.bind(this));\n this.inputCMD.removeEventListener('click', this.blinkCaretAndFocus.bind(this));\n this.clearBtn.removeEventListener('click', this.clearBtnClick.bind(this));\n this.hideBtn.removeEventListener('click', this.hideBtnClick.bind(this));\n this.showBtn.removeEventListener('click', this.showBtnClick.bind(this));\n this.input = null;\n this.inputCMD = null;\n this.inputDiv = null;\n this.termDiv = null;\n this.inputSpan = null;\n this.cursorRef = null;\n this.clearBtn = null;\n this.hideBtn = null;\n this.showBtn = null;\n const cNode = this.parent.cloneNode(false);\n this.parent.parentNode.replaceChild(cNode, this.parent);\n if(this.cursorInterval != null) {\n clearInterval(this.cursorInterval);\n }\n if(this.idleInterval != null) {\n clearInterval(this.idleInterval);\n }\n }\n\n showInput () {\n this.needInput = true;\n this.inputDiv.style.display = 'block';\n this.inputCMD.click();\n //this.inputCMD.scrollIntoView();\n this.scrollTerm();\n }\n\n hideInput () {\n this.needInput = false;\n this.inputDiv.style.display = ' none';\n clearInterval(this.cursorInterval);\n this.cursorInterval = null;\n }\n\n requestInput (callback, anyKey = false) {\n this.inputListeners.push(callback);\n this.anyKey = anyKey;\n if(this.idleInterval == null)\n this.scheduleNotify();\n this.showInput();\n }\n\n sendOutput (text) {\n const output = \"\"+text;\n output.split(\"\\n\").forEach(t => {\n t = t.replace(/\\t/g,'  ');\n t = t.replace(/\\s/g,\" \");\n this.write(t)\n });\n }\n\n clearPendingWrites () {\n this.last_clear = Date.now();\n for(const id in this.pending_writes) {\n clearTimeout(id);\n }\n }\n\n clear () {\n this.clearPendingWrites();\n this.pending_writes = [];\n while(this.inputDiv.parentElement.childNodes.length > 1) {\n this.inputDiv.parentElement.removeChild(this.inputDiv.parentElement.firstChild);\n }\n this.input.value = \"\";\n this.inputSpan.innerHTML = '';\n }\n\n clearBtnClick () {\n this.clear();\n }\n\n showBtnClick () {\n this.focus();\n }\n\n hideBtnClick () {\n this.hide();\n }\n\n notifyIdle () {\n this.info(LocalizedStrings.getMessage('awaiting_input_message'));\n this.inputCMD.click();\n }\n \n scheduleNotify () {\n this.idleInterval = window.setInterval(this.notifyIdle.bind(this), Config.idle_input_interval);\n }\n\n cancelPendingInputRequests () {\n this.inputListeners.forEach(resolve => resolve(''));\n this.inputListeners.splice(0, this.inputListeners.length);\n if(this.idleInterval != null) {\n clearInterval(this.idleInterval);\n this.idleInterval = null;\n }\n this.input.value = '';\n this.inputSpan.innerHTML = '';\n this.hideInput();\n this.anyKey = false;\n }\n}","export class Input {\n\n requestInput (callback) {\n throw new Error(\"Must be implemented\");\n }\n\n cancelPendingInputRequests () {\n throw new Error(\"Must be implemented\");\n }\n}","export class Output {\n\n sendOutput (text) {\n throw new Error(\"Must be implemented\");\n }\n}","import { runner } from './runner';\nimport { initVisualUI, addFunctionChangeListener,\n addGlobalChangeListener, removeFunctionListener,\n removeGlobalListener, getTestCases } from './visualUI/functions';\nimport * as LocalizedStringsService from './services/localizedStringsService';\nimport { i18nHelper } from \"./services/i18nHelper\";\nimport { ActionTypes, getLogs, getLogsAsString, registerClick, registerUserEvent, parseLogs } from \"./services/userLog\";\nimport { prepareActivityToStudentHelper, autoEval } from \"./util/iassignHelpers\";\nimport { openAssessmentDetail } from \"./util/utils\";\nimport * as CodeEditorAll from \"./visualUI/text_editor\";\nimport {autoGenerateTestCaseOutput} from './util/auto_gen_output';\n\nconst CodeEditor = {\n initTextEditor: CodeEditorAll.initTextEditor,\n setCode: CodeEditorAll.setCode,\n getCode: CodeEditorAll.getCode,\n updateEditor: CodeEditorAll.updateEditor,\n disable: CodeEditorAll.disable\n};\n\nconst i18n = i18nHelper.i18n\nconst LocalizedStrings = LocalizedStringsService.getInstance();\n\nexport {\n runner,\n initVisualUI,\n addFunctionChangeListener,\n addGlobalChangeListener,\n removeFunctionListener,\n removeGlobalListener,\n getTestCases,\n autoEval,\n prepareActivityToStudentHelper,\n LocalizedStrings,\n i18n,\n getLogs,\n getLogsAsString,\n registerClick,\n registerUserEvent,\n parseLogs,\n ActionTypes,\n CodeEditor,\n openAssessmentDetail,\n autoGenerateTestCaseOutput\n}","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nclass Address {\n /**\n *\n * @param {Number} id the address id\n * @param {*} value the value stored at this address\n */\n constructor(id, value) {\n this.id = id;\n this.value = value;\n }\n}\nexports.Address = Address;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst address_1 = require(\"./address\");\nclass LocationHolder {\n constructor() {\n this.data = [];\n this.address_id = 0;\n }\n /**\n *\n * @param {*} value the value to be allocated\n * @returns {Number} - the address id\n */\n allocate(value) {\n const id = this.address_id;\n // console.log(\"Allocation address \"+ id);\n const address = new address_1.Address(id, value);\n this.data.push(address);\n this.address_id += 1;\n return id;\n }\n /**\n *\n * @param {Number} id\n */\n deallocate(id) {\n const index = this.findIndex(id);\n // console.log(\"Deallocation address \"+ id);\n if (index !== -1) {\n this.data.splice(index, 1);\n return true;\n }\n return false;\n }\n /**\n *\n * @param {Number} id\n * @returns {Address} the address identified by id\n */\n find(id) {\n let beg = 0;\n let end = this.data.length;\n // console.log(\"Finding address \"+id);\n while (beg < end) {\n const med = Math.floor((beg + end) / 2);\n const address = this.getAddressAt(med);\n if (address.id === id) {\n return address;\n }\n else if (id > address.id) {\n beg = med;\n }\n else {\n end = med;\n }\n }\n return undefined;\n }\n getAddressAt(pos) {\n return this.data[pos];\n }\n /**\n *\n * @param {Number} id address id\n * @returns {Number} the index of the address identified by id\n */\n findIndex(id) {\n let beg = 0;\n let end = this.data.length;\n while (beg < end) {\n const med = Math.floor((beg + end) / 2);\n const address = this.getAddressAt(med);\n if (address.id === id) {\n return med;\n }\n else if (id > address.id) {\n beg = med;\n }\n else {\n end = med;\n }\n }\n return -1;\n }\n updateAddress(id, value) {\n const index = this.findIndex(id);\n if (index === -1) {\n throw new Error(\"Invalid address...\" + id);\n }\n this.data[index].value = value;\n }\n clear() {\n for (let i = 0; i < this.data.length; i += 1) {\n delete this.data[i];\n }\n this.data = [];\n this.address_id = 0;\n }\n}\nconst inner_ref = new LocationHolder();\nexports.Location = Object.freeze({\n allocate: inner_ref.allocate.bind(inner_ref),\n deallocate: inner_ref.deallocate.bind(inner_ref),\n find: inner_ref.find.bind(inner_ref),\n updateAddress: inner_ref.updateAddress.bind(inner_ref),\n clear: inner_ref.clear.bind(inner_ref),\n size: () => inner_ref.data.length\n});\n","import { Types } from './../typeSystem/types';\nimport { Operators } from './../ast/operators';\nimport { MultiType } from '../typeSystem/multiType';\nimport { Config } from '../util/config';\n\nfunction buildInfixAddTable () {\n const table = [[], [], [], []];\n\n table[Types.INTEGER.ord][Types.INTEGER.ord] = Types.INTEGER;\n table[Types.INTEGER.ord][Types.REAL.ord] = Types.REAL;\n table[Types.INTEGER.ord][Types.STRING.ord] = Types.STRING;\n\n table[Types.REAL.ord][Types.INTEGER.ord] = Types.REAL;\n table[Types.REAL.ord][Types.REAL.ord] = Types.REAL;\n table[Types.REAL.ord][Types.STRING.ord] = Types.STRING;\n\n table[Types.STRING.ord][Types.INTEGER.ord] = Types.STRING;\n table[Types.STRING.ord][Types.REAL.ord] = Types.STRING;\n table[Types.STRING.ord][Types.STRING.ord] = Types.STRING;\n table[Types.STRING.ord][Types.BOOLEAN.ord] = Types.STRING;\n\n return table;\n}\n\nfunction buildInfixMultiDivSubTable () {\n const table = [[], [], [], []];\n\n table[Types.INTEGER.ord][Types.INTEGER.ord] = Types.INTEGER;\n table[Types.INTEGER.ord][Types.REAL.ord] = Types.REAL;\n\n table[Types.REAL.ord][Types.INTEGER.ord] = Types.REAL;\n table[Types.REAL.ord][Types.REAL.ord] = Types.REAL;\n\n return table;\n}\n\nfunction buildInfixEqualityInequalityTable () {\n const table = [[], [], [], []];\n\n table[Types.INTEGER.ord][Types.INTEGER.ord] = Types.BOOLEAN;\n\n table[Types.REAL.ord][Types.REAL.ord] = Types.BOOLEAN;\n\n table[Types.BOOLEAN.ord][Types.BOOLEAN.ord] = Types.BOOLEAN;\n\n table[Types.STRING.ord][Types.STRING.ord] = Types.BOOLEAN;\n\n return table;\n}\n\nfunction buildInfixRelationalTable () {\n const table = [[], [], [], []];\n\n table[Types.INTEGER.ord][Types.INTEGER.ord] = Types.BOOLEAN;\n\n table[Types.REAL.ord][Types.REAL.ord] = Types.BOOLEAN;\n\n table[Types.STRING.ord][Types.STRING.ord] = Types.BOOLEAN;\n\n return table;\n}\n\nfunction buildInfixAndOrTable () {\n const table = [[], [], [], []];\n\n table[Types.BOOLEAN.ord][Types.BOOLEAN.ord] = Types.BOOLEAN;\n\n return table;\n}\n\nfunction buildInfixModTable () {\n const table = [[], [], [], []];\n\n table[Types.INTEGER.ord][Types.INTEGER.ord] = Types.INTEGER;\n\n return table;\n}\n\nfunction buildUnarySumSubList () {\n const list = [];\n\n list[Types.INTEGER.ord] = Types.INTEGER;\n\n list[Types.REAL.ord] = Types.REAL;\n\n return list;\n}\n\nfunction buildUnaryNegList () {\n const list = [];\n\n list[Types.BOOLEAN.ord] = Types.BOOLEAN;\n\n return list;\n}\n\nfunction buildInfixCompatibilityTable () {\n const compatibilityMap = new WeakMap();\n compatibilityMap.set(Operators.ADD, buildInfixAddTable());\n compatibilityMap.set(Operators.SUB, buildInfixMultiDivSubTable());\n compatibilityMap.set(Operators.MULT, buildInfixMultiDivSubTable());\n compatibilityMap.set(Operators.DIV, buildInfixMultiDivSubTable());\n compatibilityMap.set(Operators.EQ, buildInfixEqualityInequalityTable());\n compatibilityMap.set(Operators.NEQ, buildInfixEqualityInequalityTable());\n compatibilityMap.set(Operators.GE, buildInfixRelationalTable());\n compatibilityMap.set(Operators.GT, buildInfixRelationalTable());\n compatibilityMap.set(Operators.LE, buildInfixRelationalTable());\n compatibilityMap.set(Operators.LT, buildInfixRelationalTable());\n compatibilityMap.set(Operators.OR, buildInfixAndOrTable());\n compatibilityMap.set(Operators.AND, buildInfixAndOrTable());\n compatibilityMap.set(Operators.MOD, buildInfixModTable());\n return compatibilityMap;\n}\n\nfunction buildUnaryCompatibilityTable () {\n const compatibilityMap = new WeakMap();\n compatibilityMap.set(Operators.ADD, buildUnarySumSubList());\n compatibilityMap.set(Operators.SUB, buildUnarySumSubList());\n compatibilityMap.set(Operators.NOT, buildUnaryNegList());\n return compatibilityMap;\n}\n\nconst infixMap = buildInfixCompatibilityTable();\nconst unaryMap = buildUnaryCompatibilityTable();\n\nexport function resultTypeAfterInfixOp (operator, leftExpressionType, rightExpressionType) {\n try {\n if(leftExpressionType instanceof MultiType && rightExpressionType instanceof MultiType) {\n let newMulti = [];\n for (let i = 0; i < leftExpressionType.types.length; ++i) {\n const typeA = leftExpressionType.types[i];\n for(let j = 0; j < rightExpressionType.types.length; ++i) {\n const typeB = rightExpressionType.types[j];\n newMulti.push(resultTypeAfterInfixOp(operator, typeA, typeB));\n }\n }\n newMulti = newMulti.filter(x => !x.isCompatible(Types.UNDEFINED));\n if(newMulti.length <= 0) {\n if(Config.enable_type_casting) {\n if(leftExpressionType.isCompatible(Types.INTEGER) || leftExpressionType.isCompatible(Types.REAL)) {\n if(rightExpressionType.isCompatible(Types.INTEGER) || rightExpressionType.isCompatible(Types.REAL)) {\n return new MultiType([Types.INTEGER, Types.REAL]);\n }\n }\n }\n return Types.UNDEFINED;\n } else {\n return new MultiType(newMulti)\n }\n } else if(leftExpressionType instanceof MultiType) {\n if(leftExpressionType.isCompatible(rightExpressionType)) {\n return resultTypeAfterInfixOp(operator, rightExpressionType, rightExpressionType);\n } else {\n if(Config.enable_type_casting) {\n if(leftExpressionType.isCompatible(Types.INTEGER) || leftExpressionType.isCompatible(Types.REAL)) {\n if(rightExpressionType.isCompatible(Types.INTEGER) || rightExpressionType.isCompatible(Types.REAL)) {\n return rightExpressionType;\n }\n }\n }\n return Types.UNDEFINED;\n }\n } else if(rightExpressionType instanceof MultiType) {\n if(rightExpressionType.isCompatible(leftExpressionType)) {\n return resultTypeAfterInfixOp(operator, leftExpressionType, leftExpressionType);\n } else {\n if(Config.enable_type_casting) {\n if(leftExpressionType.isCompatible(Types.INTEGER) || leftExpressionType.isCompatible(Types.REAL)) {\n if(rightExpressionType.isCompatible(Types.INTEGER) || rightExpressionType.isCompatible(Types.REAL)) {\n return leftExpressionType;\n }\n }\n }\n return Types.UNDEFINED;\n }\n }\n const resultType = infixMap.get(operator)[leftExpressionType.ord][rightExpressionType.ord];\n if (resultType === null || resultType === undefined) {\n if(Config.enable_type_casting) {\n if(leftExpressionType.isCompatible(Types.INTEGER) || leftExpressionType.isCompatible(Types.REAL)) {\n if(rightExpressionType.isCompatible(Types.INTEGER) || rightExpressionType.isCompatible(Types.REAL)) {\n if(operator === Operators.MOD) {\n return Types.INTEGER;\n } else if (operator.ord >= 5 && operator.ord <= 10){\n return Types.BOOLEAN;\n }\n }\n }\n }\n return Types.UNDEFINED\n }\n return resultType;\n } catch (e) {\n if (e instanceof TypeError) {\n return Types.UNDEFINED;\n } else {\n throw e;\n }\n }\n}\n\nexport function resultTypeAfterUnaryOp (operator, leftExpressionType) {\n try {\n if(leftExpressionType instanceof MultiType){\n return leftExpressionType;\n }\n const resultType = unaryMap.get(operator)[leftExpressionType.ord];\n if (resultType == null) {\n return Types.UNDEFINED;\n }\n return resultType;\n } catch (e) {\n if (e instanceof TypeError) {\n return Types.UNDEFINED;\n } else {\n throw e;\n } \n }\n}","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Context = Object.freeze({\n BASE: Symbol('context:base'),\n BREAKABLE: Symbol('context:breakable'),\n FUNCTION: Symbol('context:function')\n});\n","import { LanguageService } from '../services/languageService';\nimport {createInputFun, createOutputFun} from './lib/io';\nimport {createLengthFun, createLowercaseFun,\n createrCharAtFun, createSubstringFun,\n createUppercaseFun} from './lib/strings';\nimport {createMatrixColumnsFun, createMatrixLinesFun,\n createNumElementsFun} from './lib/arrays';\nimport {createCastBoolFun, createCastIntFun,\n createCastRealFun, createCastStringFun,\n createIsBoolFun, createIsIntFun,\n createIsRealFun} from './lib/lang';\nimport {createAbsFun, createCosFun,\n createInvertFun, createLogFun,\n createMaxFun, createMinFun,\n createNegateFun, createPowFun,\n createSinFun, createSqrtFun,\n createTanFun, createRandFun} from './lib/math';\n\nfunction valueToKey (value, object) {\n for (const key in object) {\n if(Object.prototype.hasOwnProperty.call(object, key)){\n if (object[key] === value) {\n return key;\n }\n }\n }\n return null;\n}\n\nfunction concatObjects (...objs) {\n let result = {};\n for (let i = 0; i < objs.length; i++) {\n const obj = objs[i];\n for(const key in obj) {\n if(Object.prototype.hasOwnProperty.call(obj, key)) {\n result[key] = obj[key];\n }\n }\n }\n return result;\n}\n\nconst libsObject = {\n $mathLib: {\n $sin: createSinFun(),\n $cos: createCosFun(),\n $tan: createTanFun(),\n $sqrt: createSqrtFun(),\n $pow: createPowFun(),\n $log: createLogFun(),\n $abs: createAbsFun(),\n $negate: createNegateFun(),\n $invert: createInvertFun(),\n $max: createMaxFun(),\n $min: createMinFun(),\n $rand: createRandFun()\n },\n $ioLib: {\n $read: createInputFun(),\n $write: createOutputFun()\n },\n $strLib: {\n $substring: createSubstringFun(),\n $length: createLengthFun(),\n $uppercase: createUppercaseFun(),\n $lowercase: createLowercaseFun(),\n $charAt: createrCharAtFun(),\n },\n $arrayLib: {\n $numElements: createNumElementsFun(),\n $matrixLines: createMatrixLinesFun(),\n $matrixColumns: createMatrixColumnsFun()\n },\n $langLib: {\n $isReal: createIsRealFun(),\n $isInt: createIsIntFun(),\n $isBool: createIsBoolFun(),\n $castReal: createCastRealFun(),\n $castInt: createCastIntFun(),\n $castBool: createCastBoolFun(),\n $castString: createCastStringFun()\n }\n}\n\nconst funcsObject = concatObjects(libsObject.$ioLib, libsObject.$langLib,\n libsObject.$strLib, libsObject.$arrayLib);\n\nexport const LanguageDefinedFunction = Object.freeze({\n getMainFunctionName: () => LanguageService.getCurrentLangFuncs().main_function,\n getInternalName: (localName) => {\n if (localName.indexOf(\".\") !== -1) {\n const names = localName.split(\".\");\n const lib = valueToKey(names[0], LanguageService.getCurrentLangLibs());\n const internalName = valueToKey(names[1], LanguageService.getCurrentLangFuncs());\n if (lib === null || internalName === null) {\n return null;\n }\n return lib + \".\" + internalName;\n }\n const funcName = valueToKey(localName, LanguageService.getCurrentLangFuncs());\n if(funcName !== null) {\n if(funcsObject[funcName]) {\n return funcName;\n }\n }\n return null;\n },\n getFunction: (internalName) => {\n if (internalName.indexOf(\".\") !== -1) {\n const names = internalName.split(\".\");\n const libName = names[0];\n const funName = names[1];\n return libsObject[libName][funName];\n }\n return funcsObject[internalName];\n },\n getLocalName: (internalName) => {\n if (internalName.indexOf(\".\") !== -1) {\n const names = internalName.split(\".\");\n const libName = LanguageService.getCurrentLangLibs()[names[0]];\n const funName = LanguageService.getCurrentLangFuncs()[names[1]];\n return `${libName}.${funName}`;\n } else if (LanguageService.getCurrentLangFuncs()[internalName]) {\n return LanguageService.getCurrentLangFuncs()[internalName];\n } else { \n return internalName\n }\n }\n});","import { RuntimeError } from './runtimeError';\nimport { SemanticError } from './semanticError';\nimport * as LocalizedStringsService from './../../services/localizedStringsService';\nimport { LanguageDefinedFunction } from '../definedFunctions';\n\nconst LocalizedStrings = LocalizedStringsService.getInstance();\n\nfunction createRuntimeError (i18n_id, context = []) {\n return new RuntimeError(LocalizedStrings.getError(i18n_id, context))\n}\n\nfunction createSemanticError (i18n_id, context = []) {\n return new SemanticError(LocalizedStrings.getError(i18n_id, context))\n}\n\nexport const ProcessorErrorFactory = Object.freeze({\n symbol_not_found_full: (id, sourceInfo) => {\n if(sourceInfo) {\n const context = [id, sourceInfo.line, sourceInfo.column];\n return createSemanticError(\"symbol_not_found_full\", context);\n } else {\n return ProcessorErrorFactory.symbol_not_found(id);\n }\n },\n symbol_not_found: (id) => {\n const context = [id];\n return createSemanticError(\"symbol_not_found\", context);\n },\n function_missing_full: (id, sourceInfo) => {\n if(sourceInfo) {\n const context = [id, sourceInfo.line, sourceInfo.column];\n return createSemanticError(\"function_missing_full\", context);\n } else {\n return ProcessorErrorFactory.function_missing(id);\n }\n },\n function_missing: (id) => {\n const context = [id];\n return createSemanticError(\"function_missing\", context);\n },\n main_missing: () => {\n return createSemanticError(\"main_missing\");\n },\n array_dimension_not_int_full: (sourceInfo) => {\n if(sourceInfo) {\n const context = [sourceInfo.line];\n return createSemanticError(\"array_dimension_not_int_full\", context);\n } else {\n return ProcessorErrorFactory.array_dimension_not_int();\n }\n },\n array_dimension_not_int: () => {\n return createSemanticError(\"array_dimension_not_int\");\n },\n unknown_command_full: (sourceInfo)=> {\n if(sourceInfo) {\n const context = [sourceInfo.line];\n return createRuntimeError(\"unknown_command_full\", context);\n } else {\n return ProcessorErrorFactory.unknown_command();\n }\n \n },\n unknown_command: ()=> {\n return createRuntimeError(\"unknown_command\");\n },\n incompatible_types_full: (left_type, left_dim, right_type, right_dim, exp, source_info) => {\n if(source_info) {\n const context = [LocalizedStrings.translateType(left_type, left_dim), exp, source_info.line,\n LocalizedStrings.translateType(right_type, right_dim)];\n return createSemanticError(\"incompatible_types_full\", context);\n } else {\n return ProcessorErrorFactory.incompatible_types(left_type, left_dim, right_type, right_dim, exp);\n }\n },\n incompatible_types: (left_type, left_dim, right_type, right_dim, exp) => {\n const context = [LocalizedStrings.translateType(left_type, left_dim), exp,\n LocalizedStrings.translateType(right_type, right_dim)];\n return createSemanticError(\"incompatible_types\", context);\n },\n incompatible_types_array_full: (exp, type, dim, sourceInfo) => {\n if(sourceInfo) {\n const context = [exp, LocalizedStrings.translateType(type, dim), sourceInfo.line, sourceInfo.column];\n return createSemanticError(\"incompatible_types_array_full\", context);\n } else {\n return ProcessorErrorFactory.incompatible_types_array(exp, type, dim);\n }\n },\n incompatible_types_array: (exp, type, dim) => {\n const context = [exp, LocalizedStrings.translateType(type, dim)];\n return createSemanticError(\"incompatible_types_array\", context);\n },\n loop_condition_type_full: (exp, sourceInfo) => {\n if(sourceInfo) {\n const context = [sourceInfo.line, sourceInfo.column, exp];\n return createSemanticError(\"loop_condition_type_full\", context);\n } else {\n return ProcessorErrorFactory.loop_condition_type(exp);\n }\n },\n loop_condition_type: (exp) => {\n const context = [exp];\n return createSemanticError(\"loop_condition_type\", context);\n },\n /**\n * @deprecated 01/10/2019\n */\n endless_loop_full: (sourceInfo) => {\n if(sourceInfo) {\n const context = [sourceInfo.line];\n return createSemanticError(\"endless_loop_full\", context);\n } else {\n return ProcessorErrorFactory.endless_loop();\n }\n },\n endless_loop: () => {\n return createSemanticError(\"endless_loop\");\n },\n if_condition_type_full: (exp, sourceInfo) => {\n if(sourceInfo) {\n const context = [sourceInfo.line, sourceInfo.column, exp];\n return createSemanticError(\"if_condition_type_full\", context);\n } else {\n return ProcessorErrorFactory.if_condition_type(exp);\n }\n },\n if_condition_type: (exp) => {\n const context = [exp];\n return createSemanticError(\"if_condition_type\", context);\n },\n invalid_global_var: () => {\n return createRuntimeError(\"invalid_global_var\")\n },\n not_implemented: (id) => {\n const context = [id]\n return createRuntimeError(\"not_implemented\", context)\n },\n invalid_case_type_full: (exp, type, dim, sourceInfo) => {\n if(sourceInfo) {\n const context = [exp, LocalizedStrings.translateType(type, dim), sourceInfo.line, sourceInfo.column];\n return createSemanticError(\"invalid_case_type_full\", context);\n } else {\n return ProcessorErrorFactory.invalid_case_type(exp, type, dim);\n }\n },\n invalid_case_type: (exp, type, dim) => {\n const context = [exp, LocalizedStrings.translateType(type, dim)];\n return createSemanticError(\"invalid_case_type\", context);\n },\n void_in_expression_full: (id, sourceInfo) => {\n if(sourceInfo) {\n const context = [sourceInfo.line, sourceInfo.column, id];\n return createSemanticError(\"void_in_expression_full\", context);\n } else {\n return ProcessorErrorFactory.void_in_expression(id);\n }\n },\n void_in_expression: (id) => {\n const context = [id];\n return createSemanticError(\"void_in_expression\", context);\n },\n invalid_array_access_full: (id, sourceInfo) => {\n if(sourceInfo) {\n const context = [id, sourceInfo.line, sourceInfo.column];\n return createSemanticError(\"invalid_array_access_full\", context);\n } else {\n return ProcessorErrorFactory.invalid_array_access(id);\n }\n },\n invalid_array_access: (id) => {\n const context = [id];\n return createSemanticError(\"invalid_array_access\", context);\n },\n invalid_matrix_access_full: (id, sourceInfo) => {\n if(sourceInfo) {\n const context = [id, sourceInfo.line, sourceInfo.column];\n return createSemanticError(\"invalid_matrix_access_full\", context);\n } else {\n return ProcessorErrorFactory.invalid_matrix_access(id);\n }\n },\n invalid_matrix_access: (id) => {\n const context = [id];\n return createSemanticError(\"invalid_matrix_access\", context);\n },\n matrix_column_outbounds_full: (id, value, columns, sourceInfo) => {\n if(sourceInfo) {\n const context = [sourceInfo.line, value, id, columns];\n return createRuntimeError(\"matrix_column_outbounds_full\", context);\n } else {\n return ProcessorErrorFactory.matrix_column_outbounds(id, value, columns);\n }\n },\n matrix_column_outbounds: (id, value, columns) => {\n const context = [value, id, columns];\n return createRuntimeError(\"matrix_column_outbounds\", context);\n },\n matrix_line_outbounds_full: (id, value, lines, sourceInfo) => {\n if(sourceInfo) {\n const context = [sourceInfo.line, value, id, lines];\n return createRuntimeError(\"matrix_line_outbounds_full\", context);\n } else {\n return ProcessorErrorFactory.matrix_line_outbounds(id, value, lines);\n }\n },\n matrix_line_outbounds: (id, value, lines) => {\n const context = [value, id, lines];\n return createRuntimeError(\"matrix_line_outbounds\", context);\n },\n vector_line_outbounds_full: (id, value, lines, sourceInfo) => {\n if(sourceInfo) {\n const context = [sourceInfo.line, value, id, lines];\n return createRuntimeError(\"vector_line_outbounds_full\", context);\n } else {\n return ProcessorErrorFactory.vector_line_outbounds(id, value, lines);\n }\n },\n vector_line_outbounds: (id, value, lines) => {\n const context = [value, id, lines];\n return createRuntimeError(\"vector_line_outbounds\", context);\n },\n vector_not_matrix_full: (id, sourceInfo) => {\n if(sourceInfo) {\n const context = [sourceInfo.line, id];\n return createRuntimeError(\"vector_not_matrix_full\", context);\n } else {\n return ProcessorErrorFactory.vector_not_matrix(id);\n }\n },\n vector_not_matrix: (id) => {\n const context = [id];\n return createRuntimeError(\"vector_not_matrix\", context);\n },\n function_no_return: (id) => {\n const context = [id];\n return createSemanticError(\"function_no_return\", context);\n },\n invalid_void_return_full: (id, type, dim, sourceInfo) => {\n if(sourceInfo) {\n const context = [sourceInfo.line, id, LocalizedStrings.translateType(type, dim)];\n return createSemanticError(\"invalid_void_return_full\", context);\n } else {\n return ProcessorErrorFactory.invalid_void_return(id, type, dim);\n }\n },\n invalid_void_return: (id, type, dim) => {\n const context = [id, LocalizedStrings.translateType(type, dim)];\n return createSemanticError(\"invalid_void_return_full\", context);\n },\n invalid_return_type_full: (id, type, dim, sourceInfo) => {\n if(sourceInfo) {\n const context = [sourceInfo.line, id, LocalizedStrings.translateType(type, dim)];\n return createSemanticError(\"invalid_return_type_full\", context);\n } else {\n return ProcessorErrorFactory.invalid_return_type(id, type, dim);\n }\n },\n invalid_return_type: (id, type, dim) => {\n const context = [id, LocalizedStrings.translateType(type, dim)];\n return createSemanticError(\"invalid_return_type\", context);\n },\n invalid_parameters_size_full: (id, expected, actual, sourceInfo) => {\n if(sourceInfo) {\n const context = [sourceInfo.line, id, expected, actual];\n return createSemanticError(\"invalid_parameters_size_full\", context);\n } else {\n return ProcessorErrorFactory.invalid_parameters_size(id, expected, actual);\n }\n },\n invalid_parameters_size: (id, expected, actual) => {\n const context = [id, expected, actual];\n return createSemanticError(\"invalid_parameters_size\", context);\n },\n invalid_parameter_type_full: (fun_name, exp, sourceInfo) => {\n if(sourceInfo) {\n const context = [exp, LanguageDefinedFunction.getLocalName(fun_name), sourceInfo.line];\n return createSemanticError(\"invalid_parameter_type_full\", context);\n } else {\n return ProcessorErrorFactory.invalid_parameter_type(fun_name, exp);\n }\n },\n invalid_parameter_type: (fun_name, exp) => {\n const context = [exp, LanguageDefinedFunction.getLocalName(fun_name)];\n return createSemanticError(\"invalid_parameter_type_full\", context);\n },\n invalid_ref_full: (id, exp, sourceInfo) => {\n if(sourceInfo) {\n const context = [exp, id , sourceInfo.line];\n return createSemanticError(\"invalid_ref_full\", context);\n } else {\n return ProcessorErrorFactory.invalid_ref(id, exp);\n }\n },\n invalid_ref: (id, exp) => {\n const context = [exp, id];\n return createSemanticError(\"invalid_ref\", context);\n },\n unexpected_break_command_full: (sourceInfo) => {\n if(sourceInfo) {\n const context = [sourceInfo.line];\n return createRuntimeError(\"unexpected_break_command_full\", context);\n } else {\n return ProcessorErrorFactory.unexpected_break_command();\n }\n },\n unexpected_break_command: () => {\n return createRuntimeError(\"unexpected_break_command\");\n },\n invalid_array_literal_type_full: (exp, sourceInfo) => {\n if(sourceInfo) {\n const context = [sourceInfo.line, exp];\n return createRuntimeError(\"invalid_array_literal_type_full\", context);\n } else {\n return ProcessorErrorFactory.invalid_array_literal_type(exp);\n }\n },\n invalid_array_literal_type: (exp) => {\n const context = [exp];\n return createRuntimeError(\"invalid_array_literal_type\", context);\n },\n invalid_array_literal_line_full: (expected, actual, sourceInfo) => {\n if(sourceInfo) {\n const context = [sourceInfo.line, expected, actual];\n return createRuntimeError(\"invalid_array_literal_line_full\", context);\n } else {\n return ProcessorErrorFactory.invalid_array_literal_type(expected, actual);\n }\n },\n invalid_array_literal_line: (expected, actual) => {\n const context = [expected, actual];\n return createRuntimeError(\"invalid_array_literal_line\", context);\n },\n invalid_array_literal_column_full: (expected, actual, sourceInfo) => {\n if(sourceInfo) {\n const context = [sourceInfo.line, expected, actual];\n return createRuntimeError(\"invalid_array_literal_column_full\", context);\n } else {\n return ProcessorErrorFactory.invalid_array_literal_column(expected, actual);\n }\n },\n invalid_array_literal_column: (expected, actual) => {\n const context = [expected, actual];\n return createRuntimeError(\"invalid_array_literal_column\", context);\n },\n invalid_unary_op_full: (expString, opName, type, dim, sourceInfo) => {\n if(sourceInfo) {\n const context = [sourceInfo.line, expString, LocalizedStrings.translateOp(opName), LocalizedStrings.translateType(type, dim)];\n return createRuntimeError(\"invalid_unary_op_full\", context);\n } else {\n return ProcessorErrorFactory.invalid_unary_op(opName, type, dim);\n }\n },\n invalid_unary_op: (expString, opName, type, dim) => {\n const context = [expString, LocalizedStrings.translateOp(opName), LocalizedStrings.translateType(type, dim)];\n return createRuntimeError(\"invalid_unary_op\", context);\n },\n invalid_infix_op_full: (expString, opName, typeLeft, dimLeft, typeRight, dimRight, sourceInfo) => {\n if(sourceInfo) {\n const context = [sourceInfo.line, expString, LocalizedStrings.translateOp(opName), LocalizedStrings.translateType(typeLeft, dimLeft), LocalizedStrings.translateType(typeRight, dimRight)];\n return createRuntimeError(\"invalid_infix_op_full\", context);\n } else {\n return ProcessorErrorFactory.invalid_infix_op(opName, typeLeft, dimLeft, typeRight, dimRight);\n }\n },\n invalid_infix_op: (expString, opName, typeLeft, dimLeft, typeRight, dimRight) => {\n const context = [expString, LocalizedStrings.translateOp(opName), LocalizedStrings.translateType(typeLeft, dimLeft), LocalizedStrings.translateType(typeRight, dimRight)];\n return createRuntimeError(\"invalid_infix_op\", context);\n },\n array_dimension_not_positive_full: (sourceInfo) => {\n if(sourceInfo) {\n const context = [sourceInfo.line];\n return createSemanticError(\"array_dimension_not_positive_full\", context);\n } else {\n return ProcessorErrorFactory.array_dimension_not_positive();\n }\n },\n array_dimension_not_positive: () => {\n return createSemanticError(\"array_dimension_not_positive\");\n },\n invalid_type_conversion: (value, type, dim) => {\n const context = [value, LocalizedStrings.translateType(type, dim)];\n return createRuntimeError(\"invalid_type_conversion\", context);\n },\n invalid_read_type: (exp, type, dim, name, source_info) => {\n const context = [source_info.line, exp, LocalizedStrings.translateType(type, dim), name];\n return createRuntimeError(\"invalid_read_type\", context)\n },\n invalid_read_type_array: (exp, typePos, dimPos, name, typeArray, dimArray, sourceInfo) => {\n const context = [sourceInfo.line, exp, LocalizedStrings.translateType(typePos, dimPos), name,LocalizedStrings.translateType(typeArray, dimArray)];\n return createRuntimeError(\"invalid_read_type_array\", context)\n },\n invalid_const_ref_full: (fun_name, exp, sourceInfo)=> {\n if(sourceInfo) {\n const context = [exp, LanguageDefinedFunction.getLocalName(fun_name), sourceInfo.line];\n return createSemanticError(\"invalid_const_ref_full\", context);\n } else {\n return ProcessorErrorFactory.invalid_const_ref(fun_name, exp);\n }\n },\n invalid_const_ref: (fun_name, exp) => {\n const context = [exp, LanguageDefinedFunction.getLocalName(fun_name)];\n return createSemanticError(\"invalid_const_ref\", context);\n },\n invalid_const_assignment_full: (var_id, source_info) => {\n if(source_info) {\n const context = [source_info.line, var_id];\n return createSemanticError(\"invalid_const_assignment_full\", context);\n } else {\n return ProcessorErrorFactory.invalid_const_assignment(var_id);\n }\n },\n invalid_const_assignment: (var_id) => {\n const context = [var_id];\n return createSemanticError(\"invalid_const_assignment\", context);\n },\n invalid_vector_assignment_full: (left_id, left_size, right_id, right_size, source_info) => {\n if(source_info) {\n const context = [source_info.line, left_id, left_size, right_id, right_size]\n return createRuntimeError(\"invalid_vector_assignment_full\", context);\n } else {\n return ProcessorErrorFactory.invalid_vector_assignment(left_id, left_size, right_id, right_size);\n }\n },\n invalid_vector_assignment: (left_id, left_size, right_id, right_size) => {\n const context = [left_id, left_size, right_id, right_size]\n return createRuntimeError(\"invalid_vector_assignment\", context);\n },\n invalid_matrix_assignment_full: (left_id, left_line, left_column, right_id, right_line, right_column, source_info) => {\n if(source_info) {\n const context = [source_info.line, left_id, left_line, left_column, right_id, right_line, right_column]\n return createRuntimeError(\"invalid_matrix_assignment_full\", context);\n } else {\n return ProcessorErrorFactory.invalid_matrix_assignment(left_id, left_line, left_column, right_id, right_line, right_column);\n }\n },\n invalid_matrix_assignment: (left_id, left_line, left_column, right_id, right_line, right_column) => {\n const context = [left_id, left_line, left_column, right_id, right_line, right_column]\n return createRuntimeError(\"invalid_matrix_assignment\", context);\n },\n matrix_to_vector_attr: (left_id, right_id, source_info) => {\n // SourceInfo have to be valid...\n const context = [source_info.line, right_id, left_id];\n return createSemanticError(\"matrix_to_vector_attr\", context);\n },\n vector_to_matrix_attr: (left_id, right_id, source_info) => {\n // SourceInfo have to be valid...\n const context = [source_info.line, right_id, left_id];\n return createSemanticError(\"vector_to_matrix_attr\", context);\n },\n invalid_matrix_index_assign_full: (mat_id, mat_line, mat_size, exp, exp_size, source_info) => {\n if(source_info){\n const context = [source_info.line, mat_line, mat_id, mat_size, exp, exp_size];\n return createRuntimeError(\"invalid_matrix_index_assign_full\", context);\n } else {\n return ProcessorErrorFactory.invalid_matrix_index_assign(mat_id, mat_line, mat_size, exp, exp_size)\n }\n },\n invalid_matrix_index_assign: (mat_id, mat_line, mat_size, exp, exp_size) =>{\n const context = [mat_line, mat_id, mat_size, exp, exp_size];\n return createRuntimeError(\"invalid_matrix_index_assign\", context);\n },\n invalid_number_elements_vector: (expected_num, exp, actual_num, source_info) => {\n // SourceInfo have to be valid...\n const context = [expected_num, source_info.line, exp, actual_num];\n return createRuntimeError(\"invalid_number_elements_vector\", context);\n },\n invalid_number_lines_matrix: (expected_num, exp, actual_num, source_info) => {\n // SourceInfo have to be valid...\n const context = [expected_num, source_info.line, exp, actual_num];\n return createRuntimeError(\"invalid_number_lines_matrix\", context);\n },\n divsion_by_zero_full: (exp, source_info) => {\n if(source_info) {\n const context = [source_info.line, exp];\n return createRuntimeError(\"divsion_by_zero_full\", context);\n } else {\n return ProcessorErrorFactory.divsion_by_zero(exp);\n }\n },\n divsion_by_zero: (exp) => {\n const context = [exp];\n return createRuntimeError(\"divsion_by_zero\", context);\n },\n undefined_tanget_value: (value, source_info) => {\n const context = [source_info.line, value];\n return createRuntimeError(\"undefined_tanget_value\", context);\n },\n negative_log_value: (source_info) => {\n return createRuntimeError(\"negative_log_value\",[source_info.line]);\n },\n invalid_string_index: (index, str, source_info) => {\n const local_fun_name = LanguageDefinedFunction.getLocalName(\"$charAt\");\n const context = [source_info.line, local_fun_name, index, str, str.length - 1];\n return createRuntimeError(\"invalid_string_index\", context);\n },\n negative_sqrt_value: (source_info) => {\n return createRuntimeError(\"negative_sqrt_value\",[source_info.line]);\n },\n /**\n * @deprecated 01/10/2019\n */\n exceeded_recursive_calls: (source_info) => {\n const context = [source_info.line];\n return createRuntimeError(\"exceeded_recursive_calls\", context);\n },\n invalid_for_variable: (id, source_info) => {\n const context = [source_info.line, id];\n return createSemanticError(\"invalid_for_variable\", context);\n },\n invalid_for_from: (exp, source_info) => {\n const context = [source_info.line, exp];\n return createSemanticError(\"invalid_for_from\", context);\n },\n invalid_for_to: (exp, source_info) => {\n const context = [source_info.line, exp];\n return createSemanticError(\"invalid_for_to\", context);\n },\n invalid_for_pass: (exp, source_info) => {\n const context = [source_info.line, exp];\n return createSemanticError(\"invalid_for_pass\", context);\n },\n exceed_max_instructions: () => {\n return createRuntimeError('exceed_max_instructions');\n }\n});","export class RuntimeError extends Error {\n\n constructor (...msg) {\n super(...msg);\n if(Error.captureStackTrace)\n Error.captureStackTrace(this, RuntimeError);\n }\n}","export class SemanticError extends Error {\n\n constructor (...msg) {\n super(...msg);\n if(Error.captureStackTrace)\n Error.captureStackTrace(this, SemanticError);\n }\n}","import { Store } from './store/store';\nimport { Modes } from './modes';\nimport { Context } from './context';\nimport { Types } from './../typeSystem/types';\nimport { Operators } from './../ast/operators';\nimport { LanguageDefinedFunction } from './definedFunctions';\nimport { resultTypeAfterInfixOp, resultTypeAfterUnaryOp } from './compatibilityTable';\nimport * as Commands from './../ast/commands/';\nimport * as Expressions from './../ast/expressions/';\nimport { ArrayType } from './../typeSystem/array_type';\nimport { convertToString, toInt } from '../typeSystem/parsers';\nimport { Config } from '../util/config';\nimport { ProcessorErrorFactory } from './error/processorErrorFactory';\nimport { RuntimeError } from './error/runtimeError';\nimport { Location } from '../memory/location';\nimport { StoreValue } from './store/value/store_value';\nimport { StoreValueRef } from './store/value/store_value_ref';\nimport { ArrayStoreValue } from './store/value/array_store_value';\nimport { ArrayStoreValueRef } from './store/value/array_store_value_ref';\nimport { StoreValueAddress } from './store/value/store_value_address';\nimport { LocalizedStrings } from '../services/localizedStringsService';\n\nexport class IVProgProcessor {\n\n static get MAIN_INTERNAL_ID () {\n return \"$main\";\n }\n\n constructor (ast) {\n this.ast = ast;\n this.globalStore = new Store(\"$global\");\n this.stores = [this.globalStore];\n this.context = [Context.BASE];\n this.input = null;\n this.forceKill = false;\n this.output = null;\n this.mode = Modes.RUN;\n /**\n * Stores the sourceInfo of every function call, command or expression\n */\n this.function_call_stack = [];\n this.instruction_count = 0;\n this.function_call_count = 0;\n }\n\n registerInput (input) {\n if(this.input !== null)\n this.input = null;\n this.input = input;\n }\n\n registerOutput (output) {\n if(this.output !== null)\n this.output = null;\n this.output = output;\n }\n\n checkContext(context) {\n return this.context[this.context.length - 1] === context;\n }\n\n ignoreSwitchCases (store) {\n if (store.mode === Modes.RETURN) {\n return true;\n } else if (store.mode === Modes.BREAK) {\n return true;\n } else {\n return false;\n }\n }\n\n prepareState () {\n if(this.stores !== null) {\n for (let i = 0; i < this.stores.length; i++) {\n delete this.stores[i];\n }\n this.stores = null;\n }\n if(this.globalStore !== null)\n this.globalStore = null;\n this.globalStore = new Store(\"$global\");\n this.stores = [this.globalStore];\n this.context = [Context.BASE];\n this.instruction_count = 0;\n this.mode = Modes.RUN;\n }\n\n interpretAST () {\n this.prepareState();\n Location.clear();\n return this.initGlobal().then( _ => {\n const mainFunc = this.findMainFunction();\n if(mainFunc === null) {\n return Promise.reject(ProcessorErrorFactory.main_missing())\n }\n return this.runFunction(mainFunc, [], this.globalStore);\n });\n }\n\n initGlobal () {\n if(!this.checkContext(Context.BASE)) {\n return Promise.reject(ProcessorErrorFactory.invalid_global_var())\n }\n return this.executeCommands(this.globalStore, this.ast.global);\n }\n\n findMainFunction () {\n return this.ast.functions.find(v => v.isMain);\n }\n\n findFunction (name) {\n if(name.match(/^\\$.+$/)) {\n if(name === IVProgProcessor.MAIN_INTERNAL_ID) {\n return this.findMainFunction();\n }\n const fun = LanguageDefinedFunction.getFunction(name);\n if(!fun) {\n throw ProcessorErrorFactory.not_implemented(name);\n }\n return fun;\n } else {\n const val = this.ast.functions.find( v => v.name === name);\n if (!val) {\n throw ProcessorErrorFactory.function_missing(name);\n }\n return val;\n }\n }\n\n runFunction (func, actualParameters, store) {\n const funcName = func.isMain ? IVProgProcessor.MAIN_INTERNAL_ID : func.name;\n const funcStore = new Store(funcName);\n funcStore.extendStore(this.globalStore);\n return new Promise((resolve, reject) => {\n const run_lambda = () => {\n const newFuncStore$ = this.associateParameters(func.formalParameters, actualParameters, store, funcStore);\n newFuncStore$.then(sto => {\n this.context.push(Context.FUNCTION);\n this.stores.push(sto);\n return this.executeCommands(sto, func.variablesDeclarations)\n .then(stoWithVars => this.executeCommands(stoWithVars, func.commands)).then(finalSto => {\n this.stores.pop();\n this.context.pop();\n return finalSto;\n });\n }).then(resolve)\n .catch(reject);\n }\n run_lambda();\n });\n \n }\n\n associateParameters (formal_params, effective_params, caller_store, callee_store) {\n const funcName = callee_store.name === IVProgProcessor.MAIN_INTERNAL_ID ? \n LanguageDefinedFunction.getMainFunctionName() : callee_store.name;\n\n if (formal_params.length != effective_params.length) {\n return Promise.reject(ProcessorErrorFactory.invalid_parameters_size(funcName, formal_params.length, effective_params.length))\n }\n const promises$ = effective_params.map(actual_param => this.evaluateExpression(caller_store, actual_param));\n return Promise.all(promises$).then(values => {\n for (let i = 0; i < values.length; i++) {\n const sto_value = values[i];\n // console.log(callee_store.name);\n // console.log(sto_value);\n const exp = effective_params[i];\n let shouldTypeCast = false;\n const formalParameter = formal_params[i];\n if(!formalParameter.type.isCompatible(sto_value.type)) {\n if (Config.enable_type_casting && !formalParameter.byRef\n && Store.canImplicitTypeCast(formalParameter.type, sto_value.type)) {\n shouldTypeCast = true;\n } else {\n return Promise.reject(ProcessorErrorFactory.invalid_parameter_type(funcName, exp.toString()))\n }\n }\n\n if(formalParameter.byRef && !sto_value.inStore()) {\n return Promise.reject(ProcessorErrorFactory.invalid_ref(funcName, exp.toString()))\n }\n\n if(formalParameter.byRef) {\n const realObj = caller_store.getStoreObject(sto_value.id);\n let ref = null;\n if(sto_value instanceof ArrayStoreValue) {\n // it's a vector or matrix...\n const values = sto_value.get();\n const array_type = sto_value.type;\n const addresses = values.map( v => realObj.getLocAddressOf(v.line, v.column));\n const columns = sto_value.isVector() ? 0 : sto_value.columns;\n ref = new ArrayStoreValueRef(array_type, values, addresses, sto_value.lines, columns, realObj.id);\n } else {\n if(sto_value instanceof StoreValueAddress) {\n const line = sto_value.line;\n const column = sto_value.column;\n ref = new StoreValueRef(sto_value.type, sto_value.get(),\n realObj.getLocAddressOf(line, column), realObj.id);\n ref.setReferenceDimension(realObj.type.dimensions);\n } else {\n ref = new StoreValueRef(sto_value.type, sto_value.get(), realObj.locAddress, realObj.id);\n }\n }\n callee_store.insertStore(formalParameter.id, ref);\n } else {\n let realValue = sto_value;\n if (shouldTypeCast) {\n realValue = Store.doImplicitCasting(formalParameter.type, realValue);\n }\n callee_store.insertStore(formalParameter.id, realValue);\n }\n }\n return callee_store;\n });\n }\n\n executeCommands (store, cmds) {\n // helper to partially apply a function, in this case executeCommand\n const partial = (fun, cmd) => (sto) => fun(sto, cmd);\n return cmds.reduce((lastCommand, next) => {\n const nextCommand = partial(this.executeCommand.bind(this), next);\n return lastCommand.then(nextCommand);\n }, Promise.resolve(store));\n }\n\n executeCommand (store, cmd) {\n this.instruction_count += 1;\n return new Promise((resolve, reject) => {\n const command_lambda = () => {\n if(this.instruction_count >= Config.max_instruction_count) {\n return reject(ProcessorErrorFactory.exceed_max_instructions());\n } else if(this.forceKill) {\n return reject(\"FORCED_KILL!\");\n } else if (store.mode === Modes.PAUSE) {\n return resolve(this.executeCommand(store, cmd));\n } else if(store.mode === Modes.RETURN) {\n return resolve(store);\n } else if(this.checkContext(Context.BREAKABLE) && store.mode === Modes.BREAK) {\n return resolve(store);\n } else if (this.mode === Modes.ABORT) {\n return reject(LocalizedStrings.getMessage('aborted_execution'));\n }\n if (cmd instanceof Commands.Declaration) {\n return resolve(this.executeDeclaration(store, cmd));\n } else if (cmd instanceof Commands.ArrayIndexAssign) {\n return resolve(this.executeArrayIndexAssign(store, cmd));\n } else if (cmd instanceof Commands.Assign) {\n return resolve(this.executeAssign(store, cmd));\n } else if (cmd instanceof Commands.Break) {\n return resolve(this.executeBreak(store, cmd));\n } else if (cmd instanceof Commands.Return) {\n return resolve(this.executeReturn(store, cmd));\n } else if (cmd instanceof Commands.IfThenElse) {\n return resolve(this.executeIfThenElse(store, cmd));\n } else if (cmd instanceof Commands.RepeatUntil) {\n return resolve(this.executeRepeatUntil(store, cmd));\n } else if (cmd instanceof Commands.While) {\n return resolve(this.executeWhile(store, cmd));\n } else if (cmd instanceof Commands.For) {\n return resolve(this.executeFor(store, cmd));\n } else if (cmd instanceof Commands.Switch) {\n return resolve(this.executeSwitch(store, cmd));\n } else if (cmd instanceof Expressions.FunctionCall) {\n return resolve(this.executeFunctionCall(store, cmd)); \n } else if (cmd instanceof Commands.SysCall) {\n return resolve(this.executeSysCall(store, cmd));\n } else {\n return reject(ProcessorErrorFactory.unknown_command(cmd.sourceInfo))\n }\n };\n if(this.instruction_count % Config.suspend_threshold == 0) {\n //every 100th command should briefly delay its execution in order to allow the browser to process other things\n setTimeout(command_lambda, 5);\n } else {\n command_lambda();\n }\n })\n }\n\n executeSysCall (store, cmd) {\n const func = cmd.langFunc.bind(this);\n return func(store, cmd);\n }\n\n executeFunctionCall (store, cmd) {\n let func = null;\n if(cmd.isMainCall) {\n func = this.findMainFunction();\n } else {\n func = this.findFunction(cmd.id);\n }\n // if(this.function_call_stack.length >= Config.max_call_stack) {\n // return Promise.reject(ProcessorErrorFactory.exceeded_recursive_calls(cmd.sourceInfo));\n // }\n this.function_call_stack.push(cmd.sourceInfo);\n return this.runFunction(func, cmd.actualParameters, store)\n .then(sto => {\n sto.destroy();\n if(!Types.VOID.isCompatible(func.returnType) && sto.mode !== Modes.RETURN) {\n const funcName = func.name === IVProgProcessor.MAIN_INTERNAL_ID ? \n LanguageDefinedFunction.getMainFunctionName() : func.name;\n return Promise.reject(ProcessorErrorFactory.function_no_return(funcName));\n } else {\n this.function_call_stack.pop();\n return store;\n }\n });\n }\n\n executeSwitch (store, cmd) {\n this.context.push(Context.BREAKABLE);\n const caseSequence = cmd.cases.reduce( (prev,next) => {\n return prev.then( tuple => {\n if(this.ignoreSwitchCases(tuple[1])) {\n return Promise.resolve(tuple);\n } else if(tuple[0] || next.isDefault) {\n return this.executeCommands(tuple[1], next.commands)\n .then(nSto => Promise.resolve([true, nSto]));\n } else {\n const equalityInfixApp = new Expressions.InfixApp(Operators.EQ, cmd.expression, next.expression);\n equalityInfixApp.sourceInfo = next.sourceInfo;\n return this.evaluateExpression(tuple[1],equalityInfixApp).then(stoObj => stoObj.get())\n .then(isEqual => {\n if (isEqual) {\n return this.executeCommands(tuple[1], next.commands)\n .then(nSto => Promise.resolve([true, nSto]));\n } else {\n return Promise.resolve(tuple);\n }\n });\n }\n });\n }, Promise.resolve([false, store]));\n return caseSequence.then(tuple => {\n this.context.pop();\n const newStore = tuple[1];\n if (newStore.mode === Modes.BREAK) {\n newStore.mode = Modes.RUN;\n }\n return newStore;\n });\n }\n\n /**\n * \n * @param {Store} store \n * @param {Commands.For} cmd \n */\n executeFor (store, cmd) {\n //BEGIN for -> while rewrite\n const initCmd = new Commands.Assign(cmd.for_id.id, cmd.for_from);\n initCmd.sourceInfo = cmd.sourceInfo;\n const is_forward_exp = new Expressions.InfixApp(Operators.GE, cmd.for_to, cmd.for_from);\n return this.evaluateExpression(store, is_forward_exp).then (result => {\n const is_forward = result.value;\n let condition = null;\n if (is_forward) {\n condition = new Expressions.InfixApp(Operators.LE, cmd.for_id, cmd.for_to);\n } else {\n condition = new Expressions.InfixApp(Operators.GE, cmd.for_id, cmd.for_to);\n }\n condition.sourceInfo = cmd.sourceInfo;\n let pass_value = cmd.for_pass;\n if(pass_value == null) {\n if(is_forward) {\n pass_value = new Expressions.IntLiteral(toInt(1));\n } else {\n pass_value = new Expressions.IntLiteral(toInt(-1));\n }\n }\n const increment = new Commands.Assign(cmd.for_id.id,\n new Expressions.InfixApp(Operators.ADD, cmd.for_id, pass_value));\n increment.sourceInfo = cmd.sourceInfo;\n const whileBlock = new Commands.CommandBlock([],\n cmd.commands.concat(increment));\n const forAsWhile = new Commands.While(condition, whileBlock);\n forAsWhile.sourceInfo = cmd.sourceInfo;\n //END for -> while rewrite\n const newCmdList = [initCmd,forAsWhile];\n return this.executeCommands(store, newCmdList);\n }).catch(error => Promise.reject(error));\n }\n\n executeRepeatUntil (store, cmd) {\n try {\n this.context.push(Context.BREAKABLE);\n const $newStore = this.executeCommands(store, cmd.commands);\n return $newStore.then(sto => {\n if(sto.mode === Modes.BREAK) {\n this.context.pop();\n sto.mode = Modes.RUN;\n return sto;\n }\n const $value = this.evaluateExpression(sto, cmd.expression);\n return $value.then(vl => {\n if (!vl.type.isCompatible(Types.BOOLEAN)) {\n return Promise.reject(ProcessorErrorFactory.loop_condition_type_full(cmd.sourceInfo));\n }\n if (!vl.get()) {\n this.context.pop();\n return this.executeCommand(sto, cmd);\n } else {\n this.context.pop();\n return sto;\n }\n })\n })\n } catch (error) {\n return Promise.reject(error);\n }\n }\n\n executeWhile (store, cmd) {\n try {\n this.context.push(Context.BREAKABLE);\n const $value = this.evaluateExpression(store, cmd.expression);\n return $value.then(vl => {\n if(vl.type.isCompatible(Types.BOOLEAN)) {\n if(vl.get()) {\n const $newStore = this.executeCommands(store, cmd.commands);\n return $newStore.then(sto => {\n this.context.pop();\n if (sto.mode === Modes.BREAK) {\n sto.mode = Modes.RUN;\n return sto;\n }\n return this.executeCommand(sto, cmd);\n });\n } else {\n this.context.pop();\n return store;\n }\n } else {\n return Promise.reject(ProcessorErrorFactory.loop_condition_type_full(cmd.expression.toString(), cmd.sourceInfo));\n }\n })\n \n } catch (error) {\n return Promise.reject(error);\n }\n }\n\n executeIfThenElse (store, cmd) {\n try {\n const $value = this.evaluateExpression(store, cmd.condition);\n return $value.then(vl => {\n if(vl.type.isCompatible(Types.BOOLEAN)) {\n if(vl.get()) {\n return this.executeCommands(store, cmd.ifTrue.commands);\n } else if( cmd.ifFalse !== null){\n if(cmd.ifFalse instanceof Commands.IfThenElse) {\n return this.executeCommand(store, cmd.ifFalse);\n } else {\n return this.executeCommands(store, cmd.ifFalse.commands);\n }\n } else {\n return Promise.resolve(store);\n }\n } else {\n return Promise.reject(ProcessorErrorFactory.if_condition_type_full(cmd.condition.toString(), cmd.sourceInfo));\n }\n });\n } catch (error) {\n return Promise.reject(error);\n }\n }\n\n executeReturn (store, cmd) {\n try {\n const funcName = store.name === IVProgProcessor.MAIN_INTERNAL_ID ? \n LanguageDefinedFunction.getMainFunctionName() : store.name;\n // console.log(funcName, store.name === IVProgProcessor.MAIN_INTERNAL_ID);\n const func = this.findFunction(store.name);\n const funcType = func.returnType;\n const $value = this.evaluateExpression(store, cmd.expression);\n \n return $value.then(value => {\n\n let real_value = value;\n if(value === null && funcType.isCompatible(Types.VOID)) {\n store.mode = Modes.RETURN;\n return Promise.resolve(store);\n }\n\n if (value === null || !funcType.isCompatible(value.type)) {\n if(!Config.enable_type_casting || !Store.canImplicitTypeCast(funcType, value.type)) {\n const stringInfo = funcType.stringInfo();\n const info = stringInfo[0];\n return Promise.reject(ProcessorErrorFactory.invalid_return_type_full(funcName, info.type, info.dim, cmd.sourceInfo));\n }\n real_value = Store.doImplicitCasting(funcType, value);\n } else {\n store.insertStore('$', real_value);\n store.mode = Modes.RETURN;\n return Promise.resolve(store);\n }\n });\n } catch (error) {\n return Promise.reject(error);\n }\n }\n\n executeBreak (store, cmd) {\n if(this.checkContext(Context.BREAKABLE)) {\n store.mode = Modes.BREAK;\n return Promise.resolve(store);\n } else {\n return Promise.reject(ProcessorErrorFactory.unexpected_break_command_full(cmd.sourceInfo));\n }\n }\n\n executeAssign (store, cmd) {\n try {\n const inStore = store.applyStore(cmd.id);\n if(inStore.isConst) {\n return Promise.reject(ProcessorErrorFactory.invalid_const_assignment_full(cmd.id, cmd.sourceInfo))\n }\n const $value = this.evaluateExpression(store, cmd.expression);\n return $value.then( vl => {\n let realValue = vl;\n if(!inStore.type.isCompatible(realValue.type)) {\n if(Config.enable_type_casting && Store.canImplicitTypeCast(inStore.type, vl.type)) {\n realValue = Store.doImplicitCasting(inStore.type, realValue);\n } else {\n const stringInfo = inStore.type.stringInfo()\n const info = stringInfo[0]\n const exp_type_string_info = vl.type.stringInfo();\n const exp_type_info = exp_type_string_info[0];\n const exp = cmd.expression.toString();\n return Promise.reject(ProcessorErrorFactory.incompatible_types_full(info.type, info.dim, exp_type_info.type, exp_type_info.dim, exp, cmd.sourceInfo));\n }\n }\n\n if(inStore instanceof ArrayStoreValue) {\n const columns = realValue.columns == null ? 0 : realValue.columns;\n if(inStore.lines !== realValue.lines || inStore.columns !== columns){\n const exp = cmd.expression.toString();\n if(inStore.isVector()) {\n return Promise.reject(ProcessorErrorFactory.invalid_vector_assignment_full(cmd.id, inStore.lines, exp, realValue.lines, cmd.sourceInfo));\n } else {\n return Promise.reject(ProcessorErrorFactory.invalid_matrix_assignment_full(cmd.id, inStore.lines, inStore.columns, exp, realValue.lines, realValue.columns, cmd.sourceInfo));\n } \n }\n }\n \n store.updateStore(cmd.id, realValue) \n return store;\n });\n } catch (error) {\n return Promise.reject(error);\n }\n }\n\n executeArrayIndexAssign (store, cmd) {\n const mustBeArray = store.applyStore(cmd.id);\n let used_dims = 0;\n if(mustBeArray.isConst) {\n return Promise.reject(ProcessorErrorFactory.invalid_const_assignment_full(cmd.id, cmd.sourceInfo))\n }\n if(!(mustBeArray.type instanceof ArrayType)) {\n return Promise.reject(ProcessorErrorFactory.invalid_array_access_full(cmd.id, cmd.sourceInfo));\n }\n const line$ = this.evaluateExpression(store, cmd.line);\n const column$ = this.evaluateExpression(store, cmd.column);\n const value$ = this.evaluateExpression(store, cmd.expression);\n return Promise.all([line$, column$, value$]).then(([line_sv, column_sv, value]) => {\n if(!Types.INTEGER.isCompatible(line_sv.type)) {\n return Promise.reject(ProcessorErrorFactory.array_dimension_not_int_full(cmd.sourceInfo));\n }\n const line = line_sv.get().toNumber();\n used_dims += 1;\n let column = undefined;\n if (column_sv != null) {\n if(!Types.INTEGER.isCompatible(column_sv.type)) {\n return Promise.reject(ProcessorErrorFactory.array_dimension_not_int_full(cmd.sourceInfo));\n }\n column = column_sv.get().toNumber();\n used_dims += 1;\n }\n let actualValue = value;\n if (line >= mustBeArray.lines) {\n if(mustBeArray.isVector) {\n return Promise.reject(ProcessorErrorFactory.vector_line_outbounds_full(cmd.id, line, mustBeArray.lines, cmd.sourceInfo));\n } else {\n return Promise.reject(ProcessorErrorFactory.matrix_line_outbounds_full(cmd.id, line, mustBeArray.lines, cmd.sourceInfo));\n }\n } else if (line < 0) {\n return Promise.reject(ProcessorErrorFactory.array_dimension_not_positive_full(cmd.sourceInfo))\n }\n if (column != null && mustBeArray.columns === 0 ){\n return Promise.reject(ProcessorErrorFactory.vector_not_matrix_full(cmd.id, cmd.sourceInfo));\n }\n if(column != null ) {\n if (column >= mustBeArray.columns) {\n return Promise.reject(ProcessorErrorFactory.matrix_column_outbounds_full(cmd.id, column,mustBeArray.columns, cmd.sourceInfo));\n } else if (column < 0) {\n return Promise.reject(ProcessorErrorFactory.array_dimension_not_positive_full(cmd.sourceInfo))\n }\n }\n\n if (!mustBeArray.type.canAccept(value.type, used_dims)) {\n if(!Config.enable_type_casting || !Store.canImplicitTypeCast(mustBeArray.type.innerType, value.type)) {\n const type = mustBeArray.type.innerType;\n const stringInfo = type.stringInfo();\n const info = stringInfo[0];\n const exp_type_string_info = value.type.stringInfo();\n const exp_type_info = exp_type_string_info[0];\n const exp = cmd.expression.toString();\n return Promise.reject(ProcessorErrorFactory.incompatible_types_full(info.type, info.dim, exp_type_info.type, exp_type_info.dim, exp, cmd.sourceInfo));\n }\n actualValue = Store.doImplicitCasting(mustBeArray.type.innerType, value);\n }\n\n const current_value = mustBeArray.getAt(line, column);\n if(current_value instanceof ArrayStoreValue) {\n if(current_value.lines !== actualValue.lines || current_value.columns !== actualValue.columns){\n const exp = cmd.expression.toString();\n return Promise.reject(ProcessorErrorFactory.invalid_matrix_index_assign_full(cmd.id, line, current_value.lines, exp, actualValue.lines, cmd.sourceInfo))\n }\n }\n\n // mustBeArray.setAt(actualValue, line, column);\n // store.updateStore(cmd.id, mustBeArray);\n return store.updateStoreArray(cmd.id, actualValue, line, column);\n });\n }\n\n /**\n * \n * @param {Store} store \n * @param {Commands.Declaration} cmd \n */\n executeDeclaration (store, cmd) {\n try {\n let $value = Promise.resolve(null);\n if(cmd instanceof Commands.ArrayDeclaration) {\n return this.executeArrayDeclaration(store, cmd);\n } else {\n if(cmd.initial !== null) {\n $value = this.evaluateExpression(store, cmd.initial);\n }\n return $value.then(vl => {\n let realValue = vl;\n let temp = null;\n if (vl !== null) {\n if(!vl.type.isCompatible(cmd.type)) {\n if(Config.enable_type_casting && Store.canImplicitTypeCast(cmd.type, vl.type)) {\n realValue = Store.doImplicitCasting(cmd.type, realValue);\n } else {\n const stringInfo = vl.type.stringInfo();\n const info = stringInfo[0];\n const exp_type_string_info = vl.type.stringInfo();\n const exp_type_info = exp_type_string_info[0];\n const exp = cmd.expression.toString();\n return Promise.reject(ProcessorErrorFactory.incompatible_types_full(info.type, info.dim, exp_type_info.type, exp_type_info.dim, exp, cmd.sourceInfo));\n }\n }\n temp = new StoreValue(cmd.type, realValue.get(), null, cmd.isConst);\n } else {\n temp = new StoreValue(cmd.type, null, null, cmd.isConst);\n }\n store.insertStore(cmd.id, temp);\n return store;\n });\n }\n } catch (e) {\n return Promise.reject(e);\n }\n }\n\n /**\n * \n * @param {Store} store \n * @param {Commands.ArrayDeclaration} cmd \n */\n executeArrayDeclaration (store, cmd) {\n const $lines = this.evaluateExpression(store, cmd.lines);\n const $columns = cmd.columns === null ? null: this.evaluateExpression(store, cmd.columns);\n return Promise.all([$lines, $columns]).then(([line_sv, column_sv]) => {\n if(!Types.INTEGER.isCompatible(line_sv.type)) {\n return Promise.reject(ProcessorErrorFactory.array_dimension_not_int_full(cmd.sourceInfo));\n }\n const line = line_sv.get().toNumber();\n if(line < 0) {\n return Promise.reject(ProcessorErrorFactory.array_dimension_not_positive_full(cmd.sourceInfo));\n }\n let column = null\n if (column_sv !== null) {\n if(!Types.INTEGER.isCompatible(column_sv.type)) {\n return Promise.reject(ProcessorErrorFactory.array_dimension_not_int_full(cmd.sourceInfo));\n }\n column = column_sv.get().toNumber();\n if(column < 0) {\n return Promise.reject(ProcessorErrorFactory.array_dimension_not_positive_full(cmd.sourceInfo));\n }\n }\n let $value = Promise.resolve(null);\n if(cmd.initial !== null) {\n // array can only be initialized by a literal....\n $value = this.evaluateArrayLiteral(store, cmd.initial, cmd.type, line, column);\n }\n return $value.then(vector_list => {\n let temp = null;\n if (vector_list !== null) {\n temp = new ArrayStoreValue(cmd.type, vector_list, line, column, null, cmd.isConst);\n } else {\n temp = new ArrayStoreValue(cmd.type, [], line, column, null, cmd.isConst);\n }\n store.insertStore(cmd.id, temp);\n return store;\n })\n });\n }\n\n evaluateExpression (store, exp) {\n this.instruction_count += 1;\n return new Promise((resolve, reject) => {\n const expression_lambda = () => {\n if (this.mode === Modes.ABORT) {\n return reject(LocalizedStrings.getMessage('aborted_execution'));\n }\n if(this.instruction_count >= Config.max_instruction_count) {\n return reject(new Error(\"Número de instruções excedeu o limite definido. Verifique se seu código não possui laços infinitos ou muitas chamadas de funções recursivas.\"))\n }\n if (exp instanceof Expressions.UnaryApp) {\n return resolve(this.evaluateUnaryApp(store, exp));\n } else if (exp instanceof Expressions.InfixApp) {\n return resolve(this.evaluateInfixApp(store, exp));\n } else if (exp instanceof Expressions.ArrayAccess) {\n return resolve(this.evaluateArrayAccess(store, exp));\n } else if (exp instanceof Expressions.VariableLiteral) {\n return resolve(this.evaluateVariableLiteral(store, exp));\n } else if (exp instanceof Expressions.IntLiteral) {\n return resolve(this.evaluateLiteral(store, exp));\n } else if (exp instanceof Expressions.RealLiteral) {\n return resolve(this.evaluateLiteral(store, exp));\n } else if (exp instanceof Expressions.BoolLiteral) {\n return resolve(this.evaluateLiteral(store, exp));\n } else if (exp instanceof Expressions.StringLiteral) {\n return resolve(this.evaluateLiteral(store, exp));\n } else if (exp instanceof Expressions.ArrayLiteral) {\n return reject(new Error(\"Internal Error: The system should not eval an array literal.\"))\n } else if (exp instanceof Expressions.FunctionCall) {\n return resolve(this.evaluateFunctionCall(store, exp));\n }\n return resolve(null);\n };\n if(this.instruction_count % Config.suspend_threshold == 0) {\n //every 100th command should briefly delay its execution in order to allow the browser to process other things\n setTimeout(expression_lambda, 5);\n } else {\n expression_lambda();\n }\n });\n \n }\n\n evaluateFunctionCall (store, exp) {\n if(exp.isMainCall) {\n return Promise.reject(ProcessorErrorFactory.void_in_expression_full(LanguageDefinedFunction.getMainFunctionName(), exp.sourceInfo));\n }\n const func = this.findFunction(exp.id);\n if(Types.VOID.isCompatible(func.returnType)) {\n return Promise.reject(ProcessorErrorFactory.void_in_expression_full(exp.id, exp.sourceInfo));\n }\n if(this.function_call_stack.length >= Config.max_call_stack) {\n return Promise.reject(ProcessorErrorFactory.exceeded_recursive_calls(exp.sourceInfo));\n }\n this.function_call_stack.push(exp.sourceInfo);\n const $newStore = this.runFunction(func, exp.actualParameters, store);\n return $newStore.then( sto => {\n if(sto.mode !== Modes.RETURN) {\n return Promise.reject(new Error(\"!!!Internal error: the function that was called did not have a return command or did not set the store mode properly -> \"+exp.id));\n }\n const val = sto.applyStore('$');\n sto.destroy();\n this.function_call_stack.pop();\n return Promise.resolve(val);\n });\n }\n\n /**\n * \n * @param {Store} store \n * @param {Expressions.ArrayLiteral} exp \n * @param {ArrayType} type \n */\n evaluateArrayLiteral (store, exp, type, lines, columns) {\n if(!exp.isVector) {\n if(columns == null) {\n return Promise.reject(new Error(\"This should never happen: Vector cannot be initialized by a matrix\"));\n }\n const $matrix = this.evaluateMatrix(store, exp, type, lines, columns);\n return Promise.all($matrix).then(vectorList => {\n const values = vectorList.reduce((prev, next) => prev.concat(next), []);\n return Promise.resolve(values);\n });\n } else {\n if(columns != null) {\n return Promise.reject(new Error(\"This should never happen: Matrix cannot be initialized by a vector\"));\n }\n return this.evaluateVector(store, exp, type, lines).then(list => {\n return Promise.resolve(list);\n });\n }\n }\n\n /**\n * Evalautes a list of literals and expression composing the vector\n * @param {Store} store \n * @param {Expressions.ArrayLiteral} exps \n * @param {ArrayType} type\n * @param {number} n_elements\n * @returns {Promise} store object list\n */\n evaluateVector (store, exps, type, n_elements) {\n const values = exps.value;\n if(n_elements !== values.length) {\n return Promise.reject(ProcessorErrorFactory.invalid_number_elements_vector(n_elements, exps.toString(), values.length, exps.sourceInfo));\n }\n const actual_values = Promise.all(values.map( exp => this.evaluateExpression(store, exp)));\n return actual_values.then( values => {\n return values.map((v, index) => {\n if(!type.canAccept(v.type, 1)) {\n if (!Config.enable_type_casting || !Store.canImplicitTypeCast(type.innerType, v.type)) {\n // const stringInfo = v.type.stringInfo();\n // const info = stringInfo[0];\n const exp_str = values[index].toString();\n // TODO - fix error message\n return Promise.reject(ProcessorErrorFactory.invalid_array_literal_type_full(exp_str, values[index].sourceInfo));\n }\n const new_value = Store.doImplicitCasting(type.innerType, v);\n return new_value;\n }\n return v;\n });\n });\n }\n\n /**\n * Evaluates a list of array literals composing the matrix\n * @param {Store} store \n * @param {Expressions.ArrayLiteral} exps \n * @param {ArrayType} type\n * @returns {Promise[]}\n */\n evaluateMatrix (store, exps, type, lines, columns) {\n const values = exps.value;\n if(values.length !== lines) {\n return Promise.reject(ProcessorErrorFactory.invalid_number_lines_matrix(lines,exps.toString(),values.length, exps.sourceInfo));\n }\n return values.map( vector => {\n const vec_type = new ArrayType(type.innerType, 1);\n return this.evaluateVector(store, vector, vec_type, columns);\n });\n }\n\n evaluateLiteral (_, exp) {\n return Promise.resolve(new StoreValue(exp.type, exp.value));\n }\n\n evaluateVariableLiteral (store, exp) {\n try {\n const val = store.applyStore(exp.id);\n return Promise.resolve(val);\n } catch (error) {\n return Promise.reject(error);\n }\n }\n\n evaluateArrayAccess (store, exp) {\n const mustBeArray = store.getStoreObject(exp.id);\n if (!(mustBeArray.type instanceof ArrayType)) {\n return Promise.reject(ProcessorErrorFactory.invalid_array_access_full(exp.id, exp.sourceInfo));\n }\n const $line = this.evaluateExpression(store, exp.line);\n const $column = this.evaluateExpression(store, exp.column);\n return Promise.all([$line, $column]).then(([line_sv, column_sv]) => {\n if(!Types.INTEGER.isCompatible(line_sv.type)) {\n return Promise.reject(ProcessorErrorFactory.array_dimension_not_int_full(exp.sourceInfo));\n }\n const line = line_sv.get().toNumber();\n let column = null;\n if(column_sv !== null) {\n if(!Types.INTEGER.isCompatible(column_sv.type)) {\n return Promise.reject(ProcessorErrorFactory.array_dimension_not_int_full(exp.sourceInfo));\n }\n column = column_sv.get().toNumber();\n }\n\n if (line >= mustBeArray.lines) {\n if(mustBeArray.isVector) {\n return Promise.reject(ProcessorErrorFactory.vector_line_outbounds_full(exp.id, line, mustBeArray.lines, exp.sourceInfo));\n } else {\n return Promise.reject(ProcessorErrorFactory.matrix_line_outbounds_full(exp.id, line, mustBeArray.lines, exp.sourceInfo));\n }\n } else if (line < 0) {\n return Promise.reject(ProcessorErrorFactory.array_dimension_not_positive_full(exp.sourceInfo));\n }\n if (column !== null && mustBeArray.columns === 0 ){\n return Promise.reject(ProcessorErrorFactory.vector_not_matrix_full(exp.id, exp.sourceInfo));\n }\n if(column !== null ) {\n if (column >= mustBeArray.columns) {\n return Promise.reject(ProcessorErrorFactory.matrix_column_outbounds_full(exp.id, column,mustBeArray.columns, exp.sourceInfo));\n } else if (column < 0) {\n return Promise.reject(ProcessorErrorFactory.array_dimension_not_positive_full(exp.sourceInfo));\n }\n }\n const result = mustBeArray.getAt(line, column);\n const type = mustBeArray.type.innerType;\n if(Array.isArray(result)) {\n const values = result.map((v, c) => {\n return new StoreValueAddress(type, v, line, c, mustBeArray.id, mustBeArray.readOnly);\n });\n return Promise.resolve(new ArrayStoreValue(new ArrayType(type, 1),\n values, mustBeArray.columns, null, mustBeArray.id, mustBeArray.readOnly))\n } else {\n return Promise.resolve(new StoreValueAddress(type, result, line, column, mustBeArray.id, mustBeArray.readOnly));\n }\n });\n }\n\n evaluateUnaryApp (store, unaryApp) {\n const $left = this.evaluateExpression(store, unaryApp.left);\n return $left.then( left => {\n const resultType = resultTypeAfterUnaryOp(unaryApp.op, left.type);\n if (Types.UNDEFINED.isCompatible(resultType)) {\n const stringInfo = left.type.stringInfo();\n const info = stringInfo[0];\n return Promise.reject(ProcessorErrorFactory.invalid_unary_op_full(unaryApp.op, info.type, info.dim, unaryApp.sourceInfo));\n }\n switch (unaryApp.op.ord) {\n case Operators.ADD.ord:\n return new StoreValue(resultType, left.get());\n case Operators.SUB.ord:\n return new StoreValue(resultType, left.get().negated());\n case Operators.NOT.ord:\n return new StoreValue(resultType, !left.get());\n default:\n return Promise.reject(new RuntimeError('!!!Critical Invalid UnaryApp '+ unaryApp.op));\n }\n });\n }\n\n evaluateInfixApp (store, infixApp) {\n const $left = this.evaluateExpression(store, infixApp.left);\n const $right = this.evaluateExpression(store, infixApp.right);\n return Promise.all([$left, $right]).then(values => {\n let shouldImplicitCast = false;\n const left = values[0];\n const right = values[1];\n let resultType = resultTypeAfterInfixOp(infixApp.op, left.type, right.type);\n if (Types.UNDEFINED.isCompatible(resultType)) {\n if (Config.enable_type_casting && Store.canImplicitTypeCast(left.type, right.type)) {\n shouldImplicitCast = true;\n } else {\n const stringInfoLeft = left.type.stringInfo();\n const infoLeft = stringInfoLeft[0];\n const stringInfoRight = right.type.stringInfo();\n const infoRight = stringInfoRight[0];\n return Promise.reject(ProcessorErrorFactory.invalid_infix_op_full(infixApp.op, infoLeft.type, infoLeft.dim,\n infoRight.type,infoRight.dim,infixApp.sourceInfo));\n }\n }\n let result = null;\n switch (infixApp.op.ord) {\n case Operators.ADD.ord: {\n if(Types.STRING.isCompatible(left.type)) {\n const rightStr = convertToString(right.get(), right.type);\n return new StoreValue(resultType, (left.get() + rightStr));\n } else if (Types.STRING.isCompatible(right.type)) {\n const leftStr = convertToString(left.get(), left.type);\n return new StoreValue(resultType, (leftStr + right.get()));\n } else {\n return new StoreValue(resultType, (left.get().plus(right.get())));\n }\n }\n case Operators.SUB.ord:\n return new StoreValue(resultType, (left.get().minus(right.get())));\n case Operators.MULT.ord: {\n result = left.get().times(right.get());\n return new StoreValue(resultType, result);\n }\n case Operators.DIV.ord: {\n if(right.get() == 0) {\n return Promise.reject(ProcessorErrorFactory.divsion_by_zero_full(infixApp.toString(), infixApp.sourceInfo));\n }\n if (Types.INTEGER.isCompatible(resultType))\n result = left.get().divToInt(right.get());\n else\n result = left.get().div(right.get());\n return new StoreValue(resultType, (result));\n }\n case Operators.MOD.ord: {\n let leftValue = left.get();\n let rightValue = right.get();\n if(shouldImplicitCast) {\n resultType = Types.INTEGER;\n leftValue = leftValue.trunc();\n rightValue = rightValue.trunc();\n }\n result = leftValue.modulo(rightValue);\n return new StoreValue(resultType, (result));\n } \n case Operators.GT.ord: {\n let leftValue = left.get();\n let rightValue = right.get();\n if (Types.STRING.isCompatible(left.type)) {\n result = leftValue.length > rightValue.length;\n } else {\n if (shouldImplicitCast) {\n resultType = Types.BOOLEAN;\n leftValue = leftValue.trunc();\n rightValue = rightValue.trunc();\n }\n result = leftValue.gt(rightValue);\n }\n return new StoreValue(resultType, result);\n }\n case Operators.GE.ord: {\n let leftValue = left.get();\n let rightValue = right.get();\n if (Types.STRING.isCompatible(left.type)) {\n result = leftValue.length >= rightValue.length;\n } else {\n if (shouldImplicitCast) {\n resultType = Types.BOOLEAN;\n leftValue = leftValue.trunc();\n rightValue = rightValue.trunc();\n }\n result = leftValue.gte(rightValue);\n }\n return new StoreValue(resultType, result);\n }\n case Operators.LT.ord: {\n let leftValue = left.get();\n let rightValue = right.get();\n if (Types.STRING.isCompatible(left.type)) {\n result = leftValue.length < rightValue.length;\n } else {\n if (shouldImplicitCast) {\n resultType = Types.BOOLEAN;\n leftValue = leftValue.trunc();\n rightValue = rightValue.trunc();\n }\n result = leftValue.lt(rightValue);\n }\n return new StoreValue(resultType, (result));\n }\n case Operators.LE.ord: {\n let leftValue = left.get();\n let rightValue = right.get();\n if (Types.STRING.isCompatible(left.type)) {\n result = leftValue.length <= rightValue.length;\n } else {\n if (shouldImplicitCast) {\n resultType = Types.BOOLEAN;\n leftValue = leftValue.trunc();\n rightValue = rightValue.trunc();\n }\n result = leftValue.lte(rightValue);\n }\n return new StoreValue(resultType, result);\n }\n case Operators.EQ.ord: {\n let leftValue = left.get();\n let rightValue = right.get();\n if (Types.INTEGER.isCompatible(left.type) || Types.REAL.isCompatible(left.type)) {\n if (shouldImplicitCast) {\n resultType = Types.BOOLEAN;\n leftValue = leftValue.trunc();\n rightValue = rightValue.trunc();\n }\n result = leftValue.eq(rightValue);\n } else {\n result = leftValue === rightValue;\n }\n return new StoreValue(resultType, result);\n }\n case Operators.NEQ.ord: {\n let leftValue = left.get();\n let rightValue = right.get();\n if (Types.INTEGER.isCompatible(left.type) || Types.REAL.isCompatible(left.type)) {\n if (shouldImplicitCast) {\n resultType = Types.BOOLEAN;\n leftValue = leftValue.trunc();\n rightValue = rightValue.trunc();\n }\n result = !leftValue.eq(rightValue);\n } else {\n result = leftValue !== rightValue;\n }\n return new StoreValue(resultType, result);\n }\n case Operators.AND.ord:\n return new StoreValue(resultType, (left.get() && right.get()));\n case Operators.OR.ord:\n return new StoreValue(resultType, (left.get() || right.get()));\n default:\n return Promise.reject(new RuntimeError('!!!Critical Invalid InfixApp '+ infixApp.op));\n }\n });\n }\n\n}","import * as Commands from './../../ast/commands';\nimport { Types } from './../../typeSystem/types';\nimport { toInt } from \"./../../typeSystem/parsers\";\nimport { ArrayType } from '../../typeSystem/array_type';\nimport { Modes } from '../modes';\nimport { StoreValue } from '../store/value/store_value';\n\n/**\n * num_elements\n * matrix_lines\n * matrix_columns\n */\n\nexport function createNumElementsFun () {\n const numElementsFun = (sto, _) => {\n const vector = sto.applyStore(\"vector\");\n const temp = new StoreValue(Types.INTEGER, toInt(vector.lines));\n sto.mode = Modes.RETURN;\n sto.insertStore(\"$\", temp);\n return Promise.resolve(sto);\n }\n\n const block = new Commands.CommandBlock([], [new Commands.SysCall(numElementsFun)]);\n const func = new Commands.Function('$numElements', Types.INTEGER,\n [new Commands.FormalParameter(new ArrayType(Types.ALL, 1), 'vector', false)],\n block);\n return func;\n }\n\nexport function createMatrixLinesFun () {\n const matrixLinesFun = (sto, _) => {\n const matrix = sto.applyStore(\"matrix\");\n const temp = new StoreValue(Types.INTEGER, toInt(matrix.lines));\n sto.mode = Modes.RETURN;\n sto.insertStore(\"$\", temp);\n return Promise.resolve(sto);\n }\n\n const block = new Commands.CommandBlock([], [new Commands.SysCall(matrixLinesFun)]);\n const func = new Commands.Function('$matrixLines', Types.INTEGER,\n [new Commands.FormalParameter(new ArrayType(Types.ALL, 2), 'matrix', false)],\n block);\n return func;\n }\n\nexport function createMatrixColumnsFun () {\n const matrixColumnsFun = (sto, _) => {\n const matrix = sto.applyStore(\"matrix\");\n const temp = new StoreValue(Types.INTEGER, toInt(matrix.columns));\n sto.mode = Modes.RETURN;\n sto.insertStore(\"$\", temp);\n return Promise.resolve(sto);\n }\n\n const block = new Commands.CommandBlock([], [new Commands.SysCall(matrixColumnsFun)]);\n const func = new Commands.Function('$matrixColumns', Types.INTEGER,\n [new Commands.FormalParameter(new ArrayType(Types.ALL, 2), 'matrix', false)],\n block);\n return func;\n }\n ","import * as Commands from './../../ast/commands';\nimport { Modes } from '../modes';\nimport {toInt, toString, toBool, toReal, convertToString} from './../../typeSystem/parsers';\nimport { Types } from './../../typeSystem/types';\nimport { ProcessorErrorFactory } from \"./../error/processorErrorFactory\";\nimport { StoreValue } from '../store/value/store_value';\n\nexport function createOutputFun () {\n const writeFunction = function (store, _) {\n const val = store.applyStore('p1');\n this.output.sendOutput(convertToString(val.get(), val.type));\n store.mode = Modes.RETURN;\n return Promise.resolve(store);\n }\n const block = new Commands.CommandBlock([], [new Commands.SysCall(writeFunction)]);\n const func = new Commands.Function('$write', Types.VOID,\n [new Commands.FormalParameter(Types.ALL, 'p1', false)],\n block);\n return func;\n}\n\nexport function createInputFun () {\n const readFunction = function (store, _) {\n const request = new Promise((resolve, _) => {\n this.input.requestInput(resolve);\n });\n return request.then(text => {\n const typeToConvert = store.applyStore('p1').type;\n let type = null\n let result = null;\n try {\n if (typeToConvert.isCompatible(Types.INTEGER)) {\n result = toInt(text).trunc();\n type = Types.INTEGER;\n } else if (typeToConvert.isCompatible(Types.REAL)) {\n result = toReal(text)\n type = Types.REAL;\n } else if (typeToConvert.isCompatible(Types.BOOLEAN)) {\n result = toBool(text)\n type = Types.BOOLEAN;\n } else if (typeToConvert.isCompatible(Types.STRING)) {\n result = toString(text)\n type = Types.STRING;\n } else {\n return Promise.reject(new Error(\"!!!!Critical error: Unknown type in readFunction!!!!\"));\n }\n } catch (_) {\n if(this.mode == Modes.ABORT) {\n store.mode = Modes.RETURN;\n return Promise.resolve(store);\n }\n const stringInfo = typeToConvert.stringInfo()[0]\n const realObject = store.getStoreObject(\"p1\");\n if (realObject.getReferenceDimension() > 0) {\n const arrayInfo = realObject.type.stringInfo()[0];\n const dim = realObject.getReferenceDimension();\n const error = ProcessorErrorFactory.invalid_read_type_array(text, stringInfo.type, stringInfo.dim, realObject.getRefObj(), arrayInfo.type, dim, this.function_call_stack.pop());\n return Promise.reject(error);\n }\n const error = ProcessorErrorFactory.invalid_read_type(text, stringInfo.type, stringInfo.dim, realObject.getRefObj(), this.function_call_stack.pop());\n return Promise.reject(error);\n }\n const stoValue = new StoreValue(type, result);\n store.updateStore('p1', stoValue);\n store.mode = Modes.RETURN;\n return Promise.resolve(store);\n });\n }\n const block = new Commands.CommandBlock([], [new Commands.SysCall(readFunction)]);\n const func = new Commands.Function('$read', Types.VOID,\n [new Commands.FormalParameter(Types.ALL, 'p1', true)],\n block);\n return func;\n}","import * as Commands from './../../ast/commands';\nimport { Types } from './../../typeSystem/types';\nimport { toReal, convertToString } from \"./../../typeSystem/parsers\";\nimport { IVProgParser } from '../../ast/ivprogParser';\nimport { RealLiteral, IntLiteral, BoolLiteral } from '../../ast/expressions';\nimport { Modes } from '../modes';\nimport { MultiType } from '../../typeSystem/multiType';\nimport { ProcessorErrorFactory } from '../error/processorErrorFactory';\nimport { StoreValue } from '../store/value/store_value';\n\n/**\n * \n * is_real\n * is_int\n * is_bool\n * cast_real\n * cast_int\n * cast_bool\n * cast_string\n */\n\nexport function createIsRealFun () {\n const isRealFun = (sto, _) => {\n const str = sto.applyStore(\"str\");\n const parser = IVProgParser.createParser(str.get());\n let result = false;\n try {\n const val = parser.parseTerm();\n if (val instanceof RealLiteral) {\n result = true;\n }\n } catch (error) {\n // ignore\n }\n const temp = new StoreValue(Types.BOOLEAN, result);\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return Promise.resolve(sto);\n }\n\n const block = new Commands.CommandBlock([], [new Commands.SysCall(isRealFun)]);\n const func = new Commands.Function('$isReal', Types.BOOLEAN,\n [new Commands.FormalParameter(Types.STRING, 'str', false)],\n block);\n return func;\n}\n\nexport function createIsIntFun () {\n const isIntFun = (sto, _) => {\n const str = sto.applyStore(\"str\");\n const parser = IVProgParser.createParser(str.get());\n let result = false;\n try {\n const val = parser.parseTerm();\n if (val instanceof IntLiteral) {\n result = true;\n }\n } catch { \n // ignore\n }\n const temp = new StoreValue(Types.BOOLEAN, result);\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return Promise.resolve(sto);\n }\n\n const block = new Commands.CommandBlock([], [new Commands.SysCall(isIntFun)]);\n const func = new Commands.Function('$isInt', Types.BOOLEAN,\n [new Commands.FormalParameter(Types.STRING, 'str', false)],\n block);\n return func;\n}\n\nexport function createIsBoolFun () {\n const isBoolFun = (sto, _) => {\n const str = sto.applyStore(\"str\");\n const parser = IVProgParser.createParser(str.get());\n let result = false;\n try {\n const val = parser.parseTerm();\n if (val instanceof BoolLiteral) {\n result = true;\n }\n } catch (error) { \n // ignore\n }\n const temp = new StoreValue(Types.BOOLEAN, result);\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return Promise.resolve(sto);\n }\n\n const block = new Commands.CommandBlock([], [new Commands.SysCall(isBoolFun)]);\n const func = new Commands.Function('$isBool', Types.BOOLEAN,\n [new Commands.FormalParameter(Types.STRING, 'str', false)],\n block);\n return func;\n}\n\nexport function createCastRealFun () {\n const castRealFun = (sto, _) => {\n const val = sto.applyStore(\"val\");\n let value = val.get();\n switch (val.type.ord) {\n case Types.INTEGER.ord: {\n value = value.toNumber();\n const temp = new StoreValue(Types.REAL, toReal(value));\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return Promise.resolve(sto);\n }\n case Types.STRING.ord: {\n const parser = IVProgParser.createParser(value);\n try {\n const result = parser.parseTerm();\n if (result instanceof RealLiteral) {\n const temp = new StoreValue(Types.REAL, result.value);\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return Promise.resolve(sto);\n }\n } catch (error) {\n // ignore\n }\n }\n }\n const typeStringInfoArray = Types.REAL.stringInfo();\n const typeInfo = typeStringInfoArray[0];\n return Promise.reject(ProcessorErrorFactory.invalid_type_conversion(value, typeInfo.type, typeInfo.dim));\n }\n\n const block = new Commands.CommandBlock([], [new Commands.SysCall(castRealFun)]);\n const func = new Commands.Function('$castReal', Types.REAL,\n [new Commands.FormalParameter(new MultiType([Types.INTEGER, Types.STRING]), 'val', false)],\n block);\n return func;\n}\n\nexport function createCastIntFun () {\n const castIntFun = (sto, _) => {\n const val = sto.applyStore(\"val\");\n let value = val.get();\n switch (val.type.ord) {\n case Types.REAL.ord: {\n value = value.toNumber();\n const temp = new StoreValue(Types.INTEGER, Math.floor(value));\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return Promise.resolve(sto);\n }\n case Types.STRING.ord: {\n const parser = IVProgParser.createParser(value);\n try {\n const result = parser.parseTerm();\n if (result instanceof IntLiteral) {\n const temp = new StoreValue(Types.INTEGER, result.value);\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return Promise.resolve(sto);\n }\n } catch (error) { \n // ignore\n }\n }\n }\n const typeStringInfoArray = Types.INTEGER.stringInfo();\n const typeInfo = typeStringInfoArray[0];\n return Promise.reject(ProcessorErrorFactory.invalid_type_conversion(value, typeInfo.type, typeInfo.dim));\n }\n\n const block = new Commands.CommandBlock([], [new Commands.SysCall(castIntFun)]);\n const func = new Commands.Function('$castInt', Types.INTEGER,\n [new Commands.FormalParameter(new MultiType([Types.REAL, Types.STRING]), 'val', false)],\n block);\n return func;\n}\n\nexport function createCastBoolFun () {\n const castBoolFun = (sto, _) => {\n const str = sto.applyStore(\"str\");\n const value = str.get(); \n const parser = IVProgParser.createParser(value);\n try {\n const val = parser.parseTerm();\n if (val instanceof BoolLiteral) {\n const temp = new StoreValue(Types.BOOLEAN, val.value);\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return Promise.resolve(sto);\n }\n } catch (error) { \n // ignore\n }\n const typeStringInfoArray = Types.BOOLEAN.stringInfo();\n const typeInfo = typeStringInfoArray[0];\n return Promise.reject(ProcessorErrorFactory.invalid_type_conversion(value, typeInfo.type, typeInfo.dim));\n }\n\n const block = new Commands.CommandBlock([], [new Commands.SysCall(castBoolFun)]);\n const func = new Commands.Function('$castBool', Types.BOOLEAN,\n [new Commands.FormalParameter(Types.STRING, 'str', false)],\n block);\n return func;\n}\n\nexport function createCastStringFun () {\n const castStringFun = function (store, _) {\n const val = store.applyStore('str');\n const result = convertToString(val.get(), val.type);\n const temp = new StoreValue(Types.STRING, result);\n store.insertStore(\"$\", temp);\n store.mode = Modes.RETURN;\n return Promise.resolve(store);\n }\n const block = new Commands.CommandBlock([], [new Commands.SysCall(castStringFun)]);\n const func = new Commands.Function('$castString', Types.STRING,\n [new Commands.FormalParameter(Types.ALL, 'str', false)],\n block);\n return func;\n}","import * as Commands from './../../ast/commands';\nimport { Types } from './../../typeSystem/types';\nimport { toReal } from \"./../../typeSystem/parsers\";\nimport { Decimal } from 'decimal.js';\nimport { MultiType } from '../../typeSystem/multiType';\nimport { ArrayType } from '../../typeSystem/array_type';\nimport { Modes } from '../modes';\nimport { StoreValue } from '../store/value/store_value';\nimport { ProcessorErrorFactory } from '../error/processorErrorFactory';\n\n/**\n * sin\n * cos\n * tan\n * sqrt\n * pow\n * log\n * abs\n * negate\n * invert\n * max\n * min\n */\n\nfunction convertToRadians (degrees) {\n return degrees.times(Decimal.acos(-1)).div(180);\n}\n\nexport function createSinFun () {\n const sinFun = (sto, _) => {\n const x = sto.applyStore('x');\n const angle = x.get().mod(360);\n let result = null;\n if(angle.eq(90)) {\n result = new Decimal(1);\n } else if (angle.eq(180)) {\n result = new Decimal(0);\n } else if (angle.eq(270)) {\n result = new Decimal(-1);\n } else {\n result = Decimal.sin(convertToRadians(angle));\n }\n const temp = new StoreValue(Types.REAL, result);\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return Promise.resolve(sto);\n };\n\n const block = new Commands.CommandBlock([], [new Commands.SysCall(sinFun)]);\n const func = new Commands.Function('$sin', Types.REAL,\n [new Commands.FormalParameter(new MultiType([Types.INTEGER, Types.REAL]), 'x', false)],\n block);\n return func;\n}\n\nexport function createCosFun () {\n const cosFun = (sto, _) => {\n const x = sto.applyStore('x');\n const angle = x.get().mod(360);\n let result = null;\n if(angle.eq(90)) {\n result = new Decimal(0);\n } else if (angle.eq(180)) {\n result = new Decimal(-1);\n } else if (angle.eq(270)) {\n result = new Decimal(0)\n }\n result = Decimal.cos(convertToRadians(angle));\n const temp = new StoreValue(Types.REAL, result);\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return Promise.resolve(sto);\n };\n\n const block = new Commands.CommandBlock([], [new Commands.SysCall(cosFun)]);\n const func = new Commands.Function('$cos', Types.REAL,\n [new Commands.FormalParameter(new MultiType([Types.INTEGER, Types.REAL]), 'x', false)],\n block);\n return func;\n}\n\nexport function createTanFun () {\n const tanFun = function (sto, _) {\n const x = sto.applyStore('x');\n const angle = x.get().mod(360);\n if(angle.eq(90) || angle.eq(270)) {\n return Promise.reject(ProcessorErrorFactory.undefined_tanget_value(x.get().toNumber(), this.function_call_stack.pop()));\n }\n const result = Decimal.tan(convertToRadians(angle));\n const temp = new StoreValue(Types.REAL, result);\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return Promise.resolve(sto);\n };\n\n const block = new Commands.CommandBlock([], [new Commands.SysCall(tanFun)]);\n const func = new Commands.Function('$tan', Types.REAL,\n [new Commands.FormalParameter(new MultiType([Types.INTEGER, Types.REAL]), 'x', false)],\n block);\n return func;\n}\n\nexport function createSqrtFun () {\n const sqrtFun = function (sto, _) {\n const x = sto.applyStore('x');\n if(x.get().isNeg()) {\n return Promise.reject(ProcessorErrorFactory.negative_sqrt_value(this.function_call_stack.pop()));\n }\n const result = x.get().sqrt();\n const temp = new StoreValue(Types.REAL, result);\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return Promise.resolve(sto);\n };\n\n const block = new Commands.CommandBlock([], [new Commands.SysCall(sqrtFun)]);\n const func = new Commands.Function('$sqrt', Types.REAL,\n [new Commands.FormalParameter(new MultiType([Types.INTEGER, Types.REAL]), 'x', false)],\n block);\n return func;\n}\n\nexport function createPowFun () {\n const powFun = (sto, _) => {\n const x = sto.applyStore('x');\n const y = sto.applyStore('y');\n const result = x.get().pow(y.get());\n const temp = new StoreValue(Types.REAL, result);\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return Promise.resolve(sto);\n };\n\n const block = new Commands.CommandBlock([], [new Commands.SysCall(powFun)]);\n const func = new Commands.Function('$pow', Types.REAL,\n [new Commands.FormalParameter(new MultiType([Types.INTEGER, Types.REAL]), 'x', false),\n new Commands.FormalParameter(new MultiType([Types.INTEGER, Types.REAL]), 'y', false)],\n block);\n return func;\n}\n\nexport function createLogFun () {\n const logFun = function (sto, _) {\n const x = sto.applyStore('x');\n if (x.get().isNegative()) {\n return Promise.reject(ProcessorErrorFactory.negative_log_value(this.function_call_stack.pop()));\n }\n const result = Decimal.log10(x.get());\n const temp = new StoreValue(Types.REAL, result);\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return Promise.resolve(sto);\n };\n\n const block = new Commands.CommandBlock([], [new Commands.SysCall(logFun)]);\n const func = new Commands.Function('$log', Types.REAL,\n [new Commands.FormalParameter(new MultiType([Types.INTEGER, Types.REAL]), 'x', false)],\n block);\n return func;\n}\n\nexport function createAbsFun () {\n const absFun = (sto, _) => {\n const x = sto.applyStore('x');\n const result = x.get().abs();\n const temp = new StoreValue(x.type, result);\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return Promise.resolve(sto);\n };\n\n const block = new Commands.CommandBlock([], [new Commands.SysCall(absFun)]);\n const func = new Commands.Function('$abs', new MultiType([Types.INTEGER, Types.REAL]),\n [new Commands.FormalParameter(new MultiType([Types.INTEGER, Types.REAL]), 'x', false)],\n block);\n return func;\n}\n\nexport function createNegateFun () {\n const negateFun = (sto, _) => {\n const x = sto.applyStore('x');\n const result = x.get().negated();\n const temp = new StoreValue(x.type, result);\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return Promise.resolve(sto);\n };\n\n const block = new Commands.CommandBlock([], [new Commands.SysCall(negateFun)]);\n const func = new Commands.Function('$negate', new MultiType([Types.INTEGER, Types.REAL]),\n [new Commands.FormalParameter(new MultiType([Types.INTEGER, Types.REAL]), 'x', false)],\n block);\n return func;\n}\n\nexport function createInvertFun () {\n const invertFun = (sto, _) => {\n const x = sto.applyStore('x');\n const result = toReal(1).dividedBy(x.get());\n const temp = new StoreValue(Types.REAL, result);\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return Promise.resolve(sto);\n };\n\n const block = new Commands.CommandBlock([], [new Commands.SysCall(invertFun)]);\n const func = new Commands.Function('$invert', Types.REAL,\n [new Commands.FormalParameter(new MultiType([Types.INTEGER, Types.REAL]), 'x', false)],\n block);\n return func;\n}\n\nexport function createMaxFun () {\n const maxFun = (sto, _) => {\n const x = sto.applyStore('x');\n const numbers = x.get().map(sto_addrs => sto_addrs.get());\n const result = Decimal.max(...numbers);\n const temp = new StoreValue(x.type.innerType, result);\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return Promise.resolve(sto);\n };\n const paramType = new ArrayType(new MultiType([Types.INTEGER, Types.REAL]), 1);\n const block = new Commands.CommandBlock([], [new Commands.SysCall(maxFun)]);\n const func = new Commands.Function('$max', new MultiType([Types.INTEGER, Types.REAL]),\n [new Commands.FormalParameter(paramType, 'x', false)],\n block);\n return func;\n}\n\nexport function createMinFun () {\n const minFun = (sto, _) => {\n const x = sto.applyStore('x');\n const numbers = x.get().map(sto_addrs => sto_addrs.get());\n const result = Decimal.min(...numbers);\n const temp = new StoreValue(x.type.innerType, result);\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return Promise.resolve(sto);\n };\n const paramType = new ArrayType(new MultiType([Types.INTEGER, Types.REAL]), 1);\n const block = new Commands.CommandBlock([], [new Commands.SysCall(minFun)]);\n const func = new Commands.Function('$min', new MultiType([Types.INTEGER, Types.REAL]),\n [new Commands.FormalParameter(paramType, 'x', false)],\n block);\n return func;\n}\n\nexport function createRandFun () {\n const randFun = (sto, _) => {\n const val = Math.random();\n const temp = new StoreValue(Types.REAL, new Decimal(val));\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return Promise.resolve(sto);\n };\n const block = new Commands.CommandBlock([], [new Commands.SysCall(randFun)]);\n const func = new Commands.Function('$rand', Types.REAL, [], block);\n return func;\n}\n","import * as Commands from './../../ast/commands';\nimport { Types } from './../../typeSystem/types';\nimport { toInt } from \"./../../typeSystem/parsers\";\nimport { Modes } from '../modes';\nimport { StoreValue } from '../store/value/store_value';\nimport { ProcessorErrorFactory } from '../error/processorErrorFactory';\n\n/*\n* substring\n* length\n* uppercase\n* lowercase\n* charAt\n**/\n\nexport function createSubstringFun () {\n const substringFun = (sto, _) => {\n const str = sto.applyStore(\"str\");\n const start = sto.applyStore(\"start\");\n const end = sto.applyStore(\"end\");\n const result = str.get().substring(start.get(), end.get());\n const temp = new StoreValue(Types.STRING, result);\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return Promise.resolve(sto);\n };\n\n const block = new Commands.CommandBlock([], [new Commands.SysCall(substringFun)]);\n const func = new Commands.Function('$substring', Types.STRING,\n [new Commands.FormalParameter(Types.STRING, 'str', false),\n new Commands.FormalParameter(Types.INTEGER, 'start', false),\n new Commands.FormalParameter(Types.INTEGER, 'end', false)],\n block);\n return func;\n}\n\nexport function createLengthFun () {\n const lengthFun = (sto, _) => {\n const str = sto.applyStore(\"str\");\n const temp = new StoreValue(Types.INTEGER, toInt(str.value.length));\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return Promise.resolve(sto);\n }\n const block = new Commands.CommandBlock([], [new Commands.SysCall(lengthFun)]);\n const func = new Commands.Function('$length', Types.INTEGER,\n [new Commands.FormalParameter(Types.STRING, 'str', false)],\n block);\n return func;\n}\n\nexport function createUppercaseFun () {\n const uppercaseFun = (sto, _) => {\n const str = sto.applyStore(\"str\");\n const temp = new StoreValue(Types.STRING, str.get().toUpperCase());\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return Promise.resolve(sto);\n }\n const block = new Commands.CommandBlock([], [new Commands.SysCall(uppercaseFun)]);\n const func = new Commands.Function('$uppercase', Types.STRING,\n [new Commands.FormalParameter(Types.STRING, 'str', false)],\n block);\n return func;\n}\n\nexport function createLowercaseFun () {\n const lowercaseFun = (sto, _) => {\n const str = sto.applyStore(\"str\");\n const temp = new StoreValue(Types.STRING, str.get().toLowerCase());\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return Promise.resolve(sto);\n }\n const block = new Commands.CommandBlock([], [new Commands.SysCall(lowercaseFun)]);\n const func = new Commands.Function('$lowercase', Types.STRING,\n [new Commands.FormalParameter(Types.STRING, 'str', false)],\n block);\n return func;\n}\n\nexport function createrCharAtFun () {\n const charAtFun = function (sto, _) {\n const str = sto.applyStore(\"str\");\n const idx = sto.applyStore(\"index\");\n if (idx.get().toNumber() < 0 || idx.get().toNumber() >= str.get().length) {\n return Promise.reject(ProcessorErrorFactory.invalid_string_index(idx.get().toNumber(), str.get(), this.function_call_stack.pop()));\n }\n const temp = new StoreValue(Types.STRING, str.get().charAt(idx.get().toNumber()));\n sto.insertStore(\"$\", temp);\n sto.mode = Modes.RETURN;\n return Promise.resolve(sto);\n }\n const block = new Commands.CommandBlock([], [new Commands.SysCall(charAtFun)]);\n const func = new Commands.Function('$charAt', Types.STRING,\n [new Commands.FormalParameter(Types.STRING, 'str', false),\n new Commands.FormalParameter(Types.INTEGER, 'index', false)],\n block);\n return func;\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Modes = Object.freeze({\n RETURN: Symbol('mode:return'),\n BREAK: Symbol('mode:break'),\n PAUSE: Symbol('mode:pause'),\n RUN: Symbol('mode:run'),\n ABORT: Symbol('mode:abort')\n});\n","import { ProcessorErrorFactory } from './../error/processorErrorFactory';\nimport { LanguageDefinedFunction } from './../definedFunctions';\nimport { LanguageService } from './../../services/languageService';\nimport { ArrayDeclaration, While, For, Switch, Assign, Break, IfThenElse, Return, ArrayIndexAssign } from '../../ast/commands';\nimport { InfixApp, UnaryApp, FunctionCall, IntLiteral, RealLiteral, StringLiteral, BoolLiteral, VariableLiteral, ArrayAccess } from '../../ast/expressions';\nimport { Literal } from '../../ast/expressions/literal';\nimport { resultTypeAfterInfixOp, resultTypeAfterUnaryOp } from '../compatibilityTable';\nimport { Types } from '../../typeSystem/types';\nimport { ArrayType } from '../../typeSystem/array_type';\nimport { MultiType } from '../../typeSystem/multiType';\nimport { Config } from '../../util/config';\nimport { Store } from '../store/store';\nimport { IVProgParser } from '../../ast/ivprogParser';\n\nexport class SemanticAnalyser {\n\n static analyseFromSource (stringCode) {\n const parser = IVProgParser.createParser(stringCode);\n const semantic = new SemanticAnalyser(parser.parseTree());\n return semantic.analyseTree();\n }\n\n constructor(ast) {\n this.ast = ast;\n this.lexerClass = LanguageService.getCurrentLexer();\n const lexer = new this.lexerClass(null);\n this.literalNames = lexer.literalNames;\n this.symbolMap = null;\n this.currentFunction = null;\n }\n\n pushMap () {\n if(this.symbolMap === null) {\n this.symbolMap = {map:{}, next: null};\n } else {\n const n = {map:{}, next: this.symbolMap};\n this.symbolMap = n;\n }\n }\n\n popMap () {\n if(this.symbolMap !== null) {\n this.symbolMap = this.symbolMap.next;\n }\n }\n\n insertSymbol (id, typeInfo) {\n this.symbolMap.map[id] = typeInfo;\n }\n\n findSymbol (id, symbol_map) {\n if(!symbol_map.map[id]) {\n if(symbol_map.next) {\n return this.findSymbol(id, symbol_map.next);\n }\n return null;\n } else {\n return symbol_map.map[id];\n }\n }\n\n getMainFunction () {\n return this.ast.functions.find(v => v.isMain);\n }\n\n findFunction (name) {\n if(name.match(/^\\$.+$/)) {\n const fun = LanguageDefinedFunction.getFunction(name);\n if(!fun) {\n throw ProcessorErrorFactory.not_implemented(name);\n }\n return fun;\n } else {\n const val = this.ast.functions.find( v => v.name === name);\n if (!val) {\n return null;\n }\n return val;\n }\n }\n\n analyseTree () {\n const globalVars = this.ast.global;\n this.pushMap();\n this.assertDeclarations(globalVars);\n const functions = this.ast.functions;\n const mainFunc = functions.filter((f) => f.name === null);\n if (mainFunc.length <= 0) {\n throw ProcessorErrorFactory.main_missing();\n }\n for (let i = 0; i < functions.length; i++) {\n const fun = functions[i];\n this.assertFunction(fun);\n }\n return this.ast;\n }\n\n assertDeclarations (list) {\n for (let i = 0; i < list.length; i++) {\n this.assertDeclaration(list[i]);\n }\n }\n\n assertDeclaration (declaration) {\n if (declaration instanceof ArrayDeclaration) {\n this.assertArrayDeclaration(declaration);\n this.insertSymbol(declaration.id, {id: declaration.id, lines: declaration.lines,\n columns: declaration.columns, type: declaration.type, isConst: declaration.isConst});\n\n } else {\n if(declaration.initial === null) {\n this.insertSymbol(declaration.id, {id: declaration.id, type: declaration.type, isConst: declaration.isConst});\n return;\n }\n const resultType = this.evaluateExpressionType(declaration.initial);\n if(resultType instanceof MultiType) {\n if(!resultType.isCompatible(declaration.type)) {\n const stringInfo = declaration.type.stringInfo();\n const info = stringInfo[0];\n const result_string_info = resultType.stringInfo();\n const result_info = result_string_info[0];\n const exp = declaration.initial;\n throw ProcessorErrorFactory.incompatible_types_full(info.type, info.dim, result_info.type, result_info.dim, exp.toString(), declaration.sourceInfo);\n }\n this.insertSymbol(declaration.id, {id: declaration.id, type: declaration.type, isConst: declaration.isConst})\n } else if((!declaration.type.isCompatible(resultType) && !Config.enable_type_casting)\n || (!declaration.type.isCompatible(resultType) && Config.enable_type_casting\n && !Store.canImplicitTypeCast(declaration.type, resultType))) {\n const stringInfo = declaration.type.stringInfo();\n const info = stringInfo[0];\n const result_string_info = resultType.stringInfo();\n const result_info = result_string_info[0];\n const exp = declaration.initial;\n throw ProcessorErrorFactory.incompatible_types_full(info.type, info.dim, result_info.type, result_info.dim, exp.toString(), declaration.sourceInfo);\n } else {\n this.insertSymbol(declaration.id, {id: declaration.id, type: declaration.type, isConst: declaration.isConst});\n }\n }\n }\n\n assertArrayDeclaration (declaration) {\n if(declaration.initial === null) {\n const lineType = this.evaluateExpressionType(declaration.lines);\n if (!lineType.isCompatible(Types.INTEGER)) {\n throw ProcessorErrorFactory.array_dimension_not_int_full(declaration.sourceInfo);\n }\n if (declaration.columns !== null) {\n const columnType = this.evaluateExpressionType(declaration.columns);\n if (!columnType.isCompatible(Types.INTEGER)) {\n throw ProcessorErrorFactory.array_dimension_not_int_full(declaration.sourceInfo);\n }\n } \n } else {\n this.evaluateArrayLiteral(declaration);\n }\n this.insertSymbol(declaration.id, {id: declaration.id, lines: declaration.lines, columns: declaration.columns, type: declaration.type});\n return;\n }\n\n evaluateExpressionType (expression) {\n // TODO: Throw operator error in case type == UNDEFINED\n if(expression instanceof UnaryApp) {\n const op = expression.op;\n const resultType = this.evaluateExpressionType(expression.left);\n const finalResult = resultTypeAfterUnaryOp(op, resultType);\n if (Types.UNDEFINED.isCompatible(finalResult)) {\n const stringInfo = resultType.stringInfo();\n const info = stringInfo[0];\n const expString = expression.toString();\n throw ProcessorErrorFactory.invalid_unary_op_full(expString, op, info.type, info.dim, expression.sourceInfo);\n }\n return finalResult;\n } else if (expression instanceof InfixApp) {\n const op = expression.op;\n const resultTypeLeft = this.evaluateExpressionType(expression.left);\n const resultTypeRight = this.evaluateExpressionType(expression.right);\n const finalResult = resultTypeAfterInfixOp(op, resultTypeLeft, resultTypeRight);\n if (Types.UNDEFINED.isCompatible(finalResult)) {\n const stringInfoLeft = resultTypeLeft.stringInfo();\n const infoLeft = stringInfoLeft[0];\n const stringInfoRight = resultTypeRight.stringInfo();\n const infoRight = stringInfoRight[0];\n const expString = expression.toString();\n throw ProcessorErrorFactory.invalid_infix_op_full(expString,op, infoLeft.type, infoLeft.dim, infoRight.type, infoRight.dim, expression.sourceInfo);\n }\n return finalResult;\n } else if (expression instanceof Literal) {\n return this.evaluateLiteralType(expression);\n } else if (expression instanceof FunctionCall) {\n if (expression.isMainCall) {\n throw ProcessorErrorFactory.void_in_expression_full(LanguageDefinedFunction.getMainFunctionName(), expression.sourceInfo);\n }\n const fun = this.findFunction(expression.id);\n if(fun === null) {\n throw ProcessorErrorFactory.function_missing_full(expression.id, expression.sourceInfo);\n }\n if (fun.returnType.isCompatible(Types.VOID)) {\n throw ProcessorErrorFactory.void_in_expression_full(expression.id, expression.sourceInfo);\n }\n this.assertParameters(fun, expression.actualParameters);\n return fun.returnType;\n } else if (expression instanceof ArrayAccess) {\n const arrayTypeInfo = this.findSymbol(expression.id, this.symbolMap);\n if(arrayTypeInfo === null) {\n throw ProcessorErrorFactory.symbol_not_found_full(expression.id, expression.sourceInfo);\n }\n if (!(arrayTypeInfo.type instanceof ArrayType)) {\n throw ProcessorErrorFactory.invalid_array_access_full(expression.id, expression.sourceInfo);\n }\n const lineType = this.evaluateExpressionType(expression.line);\n if (!lineType.isCompatible(Types.INTEGER)) {\n throw ProcessorErrorFactory.array_dimension_not_int_full(expression.sourceInfo);\n }\n if (expression.column !== null) {\n if (arrayTypeInfo.columns === null) {\n throw ProcessorErrorFactory.invalid_matrix_access_full(expression.id, expression.sourceInfo);\n }\n const columnType = this.evaluateExpressionType(expression.column);\n if(!columnType.isCompatible(Types.INTEGER)) {\n throw ProcessorErrorFactory.array_dimension_not_int_full(expression.sourceInfo);\n }\n }\n const arrType = arrayTypeInfo.type;\n if(expression.column !== null) {\n // indexing matrix\n return arrType.innerType;\n } else {\n if(arrayTypeInfo.columns === null) {\n return arrType.innerType;\n }\n return new ArrayType(arrType.innerType, 1);\n }\n }\n }\n\n evaluateLiteralType (literal) {\n if(literal instanceof IntLiteral) {\n return literal.type;\n } else if (literal instanceof RealLiteral) {\n return literal.type;\n } else if (literal instanceof StringLiteral) {\n return literal.type;\n } else if (literal instanceof BoolLiteral) {\n return literal.type;\n } else if (literal instanceof VariableLiteral) {\n const typeInfo = this.findSymbol(literal.id, this.symbolMap);\n if(typeInfo === null) {\n throw ProcessorErrorFactory.symbol_not_found_full(literal.id, literal.sourceInfo);\n }\n if (typeInfo.type instanceof ArrayType) {\n return typeInfo.type;\n }\n return typeInfo.type;\n } else {\n // console.warn(\"Evaluating type only for an array literal...\");\n let last = null;\n if(literal.value.length === 1) {\n last = this.evaluateExpressionType(literal.value[0]);\n } else {\n for (let i = 0; i < literal.value.length; i++) {\n const e = this.evaluateExpressionType(literal.value[i]);\n if(last === null) {\n last = e;\n } else if(!last.isCompatible(e)) {\n const strInfo = last.stringInfo();\n const info = strInfo[0];\n const strExp = literal.toString();\n throw ProcessorErrorFactory.incompatible_types_array_full(strExp,info.type, info.dim, literal.sourceInfo);\n }\n }\n }\n if(last instanceof ArrayType) {\n return new ArrayType(last.innerType, last.dimensions + 1);\n }\n return new ArrayType(last, 1);\n }\n }\n\n evaluateArrayLiteral (arrayDeclaration) {\n const type = arrayDeclaration.type;\n const literal = arrayDeclaration.initial;\n // console.log(arrayDeclaration);\n if(arrayDeclaration.isVector) {\n this.evaluateVectorLiteralType(literal, type);\n } else {\n // TODO matrix type check\n for(let i = 0; i < literal.lines; ++i) {\n const line_literal = literal.value[i];\n this.evaluateVectorLiteralType(line_literal, new ArrayType(type.innerType, 1));\n }\n }\n return true;\n }\n\n assertFunction (fun) {\n this.pushMap();\n this.currentFunction = fun;\n fun.formalParameters.forEach(formalParam => {\n if(formalParam.type instanceof ArrayType) {\n if(formalParam.type.dimensions > 1) {\n this.insertSymbol(formalParam.id, {id: formalParam.id, lines: -1, columns: -1, type: formalParam.type});\n } else {\n this.insertSymbol(formalParam.id, {id: formalParam.id, lines: -1, columns: null, type: formalParam.type});\n }\n } else {\n this.insertSymbol(formalParam.id, {id: formalParam.id, type: formalParam.type});\n }\n })\n this.assertDeclarations(fun.variablesDeclarations);\n const optional = fun.returnType.isCompatible(Types.VOID);\n const valid = this.assertReturn(fun, optional);\n if (!valid) {\n throw ProcessorErrorFactory.function_no_return(fun.name);\n }\n this.popMap();\n }\n\n assertReturn (fun, optional) {\n return fun.commands.reduce(\n (last, next) => this.checkCommand(fun.returnType, next, optional) || last, optional\n );\n }\n\n checkCommand (type, cmd, optional) {\n if (cmd instanceof While) {\n const resultType = this.evaluateExpressionType(cmd.expression);\n if (!resultType.isCompatible(Types.BOOLEAN)) {\n throw ProcessorErrorFactory.loop_condition_type_full(cmd.expression.toString(), cmd.sourceInfo);\n }\n this.checkCommands(type, cmd.commands, optional);\n return false;\n } else if (cmd instanceof For) {\n const var_type = this.evaluateExpressionType(cmd.for_id);\n if (!var_type.isCompatible(Types.INTEGER)) {\n throw ProcessorErrorFactory.invalid_for_variable(cmd.for_id, cmd.sourceInfo);\n }\n const from_type = this.evaluateExpressionType(cmd.for_from);\n if (!from_type.isCompatible(Types.INTEGER)) {\n throw ProcessorErrorFactory.invalid_for_from(cmd.for_from, cmd.sourceInfo);\n }\n const to_type = this.evaluateExpressionType(cmd.for_to);\n if (!to_type.isCompatible(Types.INTEGER)) {\n throw ProcessorErrorFactory.invalid_for_to(cmd.for_to, cmd.sourceInfo);\n }\n if (cmd.for_pass != null) {\n const pass_type = this.evaluateExpressionType(cmd.for_pass);\n if (!pass_type.isCompatible(Types.INTEGER)) {\n throw ProcessorErrorFactory.invalid_for_pass(cmd.for_pass, cmd.sourceInfo);\n }\n }\n this.checkCommands(type, cmd.commands, optional);\n return false;\n } else if (cmd instanceof Switch) {\n const sType = this.evaluateExpressionType(cmd.expression);\n let result = optional;\n let hasDefault = false;\n for (let i = 0; i < cmd.cases.length; i++) {\n const aCase = cmd.cases[i];\n if (aCase.expression !== null) {\n const caseType = this.evaluateExpressionType(aCase.expression);\n if (!sType.isCompatible(caseType)) {\n const strInfo = sType.stringInfo();\n const info = strInfo[0];\n const strExp = aCase.expression.toString();\n throw ProcessorErrorFactory.invalid_case_type_full(strExp, info.type, info.dim, aCase.sourceInfo);\n }\n } else {\n hasDefault = true;\n }\n result = result && this.checkCommands(type, aCase.commands, result); \n }\n return result && hasDefault;\n\n } else if (cmd instanceof ArrayIndexAssign) {\n // TODO - rework!!!!!\n let used_dims = 0;\n const typeInfo = this.findSymbol(cmd.id, this.symbolMap);\n if(typeInfo === null) {\n throw ProcessorErrorFactory.symbol_not_found_full(cmd.id, cmd.sourceInfo);\n }\n if(typeInfo.isConst) {\n throw ProcessorErrorFactory.invalid_const_assignment_full(cmd.id, cmd.sourceInfo);\n }\n if(!(typeInfo.type instanceof ArrayType)) {\n throw ProcessorErrorFactory.invalid_array_access_full(cmd.id, cmd.sourceInfo);\n }\n const exp = cmd.expression;\n const lineExp = cmd.line;\n const lineType = this.evaluateExpressionType(lineExp);\n if (!lineType.isCompatible(Types.INTEGER)) {\n throw ProcessorErrorFactory.array_dimension_not_int_full(cmd.sourceInfo);\n }\n used_dims += 1;\n const columnExp = cmd.column;\n if (typeInfo.columns === null && columnExp !== null) {\n throw ProcessorErrorFactory.invalid_matrix_access_full(cmd.id, cmd.sourceInfo);\n } else if (columnExp !== null) {\n const columnType = this.evaluateExpressionType(columnExp);\n if (!columnType.isCompatible(Types.INTEGER)) {\n throw ProcessorErrorFactory.array_dimension_not_int_full(cmd.sourceInfo);\n }\n used_dims += 1;\n }\n // exp a single value exp or an array access\n const exp_type = this.evaluateExpressionType(exp);\n const access_type = typeInfo.type;\n\n let compatible = false;\n if(exp_type instanceof MultiType) {\n let type = access_type;\n if(access_type.dimensions - used_dims == 0) {\n type = access_type.innerType\n } else {\n type = new ArrayType(access_type.innerType, Math.max(0, access_type.dimensions - used_dims));\n }\n compatible = exp_type.isCompatible(type);\n } else {\n compatible = access_type.canAccept(exp_type, used_dims);\n }\n if(!compatible) {\n if(!Config.enable_type_casting || !Store.canImplicitTypeCast(access_type, exp_type)) {\n const access_type_string_info = access_type.stringInfo();\n const access_type_info = access_type_string_info[0];\n const exp_type_string_info = exp_type.stringInfo();\n const exp_type_info = exp_type_string_info[0];\n throw ProcessorErrorFactory.incompatible_types_full(access_type_info.type, access_type_info.dim - used_dims, exp_type_info.type, exp_type_info.dim, exp.toString(), cmd.sourceInfo);\n }\n }\n return optional;\n } else if (cmd instanceof Assign) {\n // TODO - rework since there is no literal array assignment\n const typeInfo = this.findSymbol(cmd.id, this.symbolMap);\n if(typeInfo === null) {\n throw ProcessorErrorFactory.symbol_not_found_full(cmd.id, cmd.sourceInfo);\n }\n if(typeInfo.isConst) {\n throw ProcessorErrorFactory.invalid_const_assignment_full(cmd.id, cmd.sourceInfo);\n }\n const exp = cmd.expression;\n const exp_type = this.evaluateExpressionType(exp);\n if(exp_type instanceof ArrayType) {\n if(!(typeInfo.type instanceof ArrayType)) {\n // TODO better error message\n throw new Error(\"Cannot assign an array to a non-array variable \");\n } \n // Both are arrays...\n // if both don't have same dimensions and type, cannot perform assignment\n if(!exp_type.isCompatible(typeInfo.type)) {\n if(exp_type.dimensions === typeInfo.type.dimensions && !exp_type.innerType.isCompatible(typeInfo.type.innerType)) {\n if(!Config.enable_type_casting || !Store.canImplicitTypeCast(typeInfo.type.innerType, exp_type.innerType)) {\n const stringInfo = typeInfo.type.stringInfo();\n const info = stringInfo[0];\n const exp_type_string_info = exp_type.stringInfo();\n const exp_type_info = exp_type_string_info[0];\n throw ProcessorErrorFactory.incompatible_types_full(info.type, info.dim, exp_type_info.type, exp_type_info.dim, exp.toString(), cmd.sourceInfo);\n }\n } else {\n switch(exp_type.dimensions) {\n case 1: {\n throw ProcessorErrorFactory.vector_to_matrix_attr(cmd.id, exp.toString(),cmd.sourceInfo);\n }\n case 2: {\n throw ProcessorErrorFactory.matrix_to_vector_attr(cmd.id, exp.toString(),cmd.sourceInfo);\n }\n }\n }\n }\n } else if(!exp_type.isCompatible(typeInfo.type)) {\n if(!Config.enable_type_casting || !Store.canImplicitTypeCast(typeInfo.type, exp_type)) {\n const stringInfo = typeInfo.type.stringInfo();\n const info = stringInfo[0];\n const exp_type_string_info = exp_type.stringInfo();\n const exp_type_info = exp_type_string_info[0];\n throw ProcessorErrorFactory.incompatible_types_full(info.type, info.dim, exp_type_info.type, exp_type_info.dim, exp.toString(), cmd.sourceInfo);\n }\n }\n return optional;\n } else if (cmd instanceof Break) {\n return optional;\n } else if (cmd instanceof IfThenElse) {\n const resultType = this.evaluateExpressionType(cmd.condition);\n if (!resultType.isCompatible(Types.BOOLEAN)) {\n throw ProcessorErrorFactory.if_condition_type_full(cmd.condition.toString(), cmd.sourceInfo);\n }\n if(cmd.ifFalse instanceof IfThenElse) {\n return this.checkCommands(type, cmd.ifTrue.commands, optional) && this.checkCommand(type, cmd.ifFalse, optional);\n } else if(cmd.ifFalse != null) {\n return this.checkCommands(type, cmd.ifTrue.commands, optional) && this.checkCommands(type, cmd.ifFalse.commands,optional);\n } else {\n return this.checkCommands(type, cmd.ifTrue.commands, optional);\n }\n\n } else if (cmd instanceof FunctionCall) {\n let fun = null;\n if (cmd.isMainCall) {\n fun = this.getMainFunction();\n } else {\n fun = this.findFunction(cmd.id);\n }\n if(fun === null) {\n throw ProcessorErrorFactory.function_missing_full(cmd.id, cmd.sourceInfo);\n }\n this.assertParameters(fun, cmd.actualParameters);\n return optional;\n } else if (cmd instanceof Return) {\n const funcName = this.currentFunction.isMain ? LanguageDefinedFunction.getMainFunctionName() : this.currentFunction.name\n if (cmd.expression === null && !type.isCompatible(Types.VOID)) {\n const stringInfo = type.stringInfo();\n const info = stringInfo[0];\n throw ProcessorErrorFactory.invalid_void_return_full(funcName, info.type, info.dim, cmd.sourceInfo);\n } else if (cmd.expression !== null) {\n const resultType = this.evaluateExpressionType(cmd.expression);\n if (!type.isCompatible(resultType)) {\n const stringInfo = type.stringInfo();\n const info = stringInfo[0];\n throw ProcessorErrorFactory.invalid_return_type_full(funcName, info.type, info.dim, cmd.sourceInfo);\n } else {\n return true;\n }\n } else {\n return true;\n }\n }\n }\n\n checkCommands (type, cmds, optional) {\n return cmds.reduce(\n (last, next) => this.checkCommand(type, next, optional) || last, optional\n );\n }\n\n assertParameters (fun, actualParametersList) {\n if (fun.formalParameters.length !== actualParametersList.length) {\n throw ProcessorErrorFactory.invalid_parameters_size_full(fun.name, actualParametersList.length, fun.formalParameters.length, null);\n }\n for (let i = 0; i < actualParametersList.length; ++i) {\n const param = actualParametersList[i];\n const formalParam = fun.formalParameters[i];\n // const id = formalParam.id;\n if(formalParam.byRef) {\n if(param instanceof VariableLiteral) {\n const variable = this.findSymbol(param.id, this.symbolMap);\n if (variable.isConst) {\n throw ProcessorErrorFactory.invalid_const_ref_full(fun.name, param.toString(), param.sourceInfo); \n }\n } else if (!(param instanceof VariableLiteral || param instanceof ArrayAccess)) {\n throw ProcessorErrorFactory.invalid_parameter_type_full(fun.name, param.toString(), param.sourceInfo);\n }\n }\n const resultType = this.evaluateExpressionType(param);\n if(resultType instanceof MultiType && formalParam.type instanceof MultiType) {\n let shared = 0\n for (let j = 0; j < resultType.types.length; ++j) {\n const element = resultType.types[j];\n if(formalParam.type.types.indexOf(element) !== -1) {\n shared += 1;\n }\n }\n if(shared <= 0) {\n if(Config.enable_type_casting && !formalParam.byRef) {\n if(resultType.isCompatible(Types.INTEGER) || resultType.isCompatible(Types.REAL)) {\n if(formalParam.type.isCompatible(Types.INTEGER) || formalParam.type.isCompatible(Types.REAL)) {\n continue;\n }\n }\n }\n throw ProcessorErrorFactory.invalid_parameter_type_full(fun.name, param.toString(), param.sourceInfo);\n }\n } else if (resultType instanceof MultiType) {\n if(!resultType.isCompatible(formalParam.type)) {\n if(Config.enable_type_casting && !formalParam.byRef) {\n if(resultType.isCompatible(Types.INTEGER) || resultType.isCompatible(Types.REAL)) {\n if(formalParam.type.isCompatible(Types.INTEGER) || formalParam.type.isCompatible(Types.REAL)) {\n continue;\n }\n }\n }\n throw ProcessorErrorFactory.invalid_parameter_type_full(fun.name, param.toString(), param.sourceInfo);\n }\n } else if(!formalParam.type.isCompatible(resultType)) {\n if(Config.enable_type_casting && !formalParam.byRef) {\n if (Store.canImplicitTypeCast(formalParam.type, resultType)) {\n continue;\n }\n }\n throw ProcessorErrorFactory.invalid_parameter_type_full(fun.name, param.toString(), param.sourceInfo);\n }\n\n }\n }\n\n evaluateVectorLiteralType (literal, type) {\n // console.log(literal);\n for(let i = 0; i < literal.value.length; i+=1) {\n const exp = literal.value[i];\n const expType = this.evaluateExpressionType(exp);\n let compatible = false;\n if(expType instanceof MultiType) {\n compatible = expType.isCompatible(type.innerType);\n } else {\n compatible = type.canAccept(expType, 1);\n }\n if(!compatible) {\n if(!Config.enable_type_casting || !Store.canImplicitTypeCast(type.innerType, expType)) {\n const stringInfo = type.stringInfo();\n const info = stringInfo[0];\n const result_string_info = expType.stringInfo();\n const result_info = result_string_info[0];\n throw ProcessorErrorFactory.incompatible_types_full(info.type, 0, result_info.type, result_info.dim, exp.toString(), literal.sourceInfo);\n }\n }\n }\n return type;\n }\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst modes_1 = require(\"../modes\");\nconst types_1 = require(\"../../typeSystem/types\");\nconst storeObject_1 = require(\"./storeObject\");\nconst storeObjectRef_1 = require(\"./storeObjectRef\");\nconst array_type_1 = require(\"../../typeSystem/array_type\");\nconst array_store_value_1 = require(\"./value/array_store_value\");\nconst location_1 = require(\"../../memory/location\");\nconst storeObjectArray_1 = require(\"./storeObjectArray\");\nconst store_value_1 = require(\"./value/store_value\");\nconst store_value_address_1 = require(\"./value/store_value_address\");\nconst store_value_ref_1 = require(\"./value/store_value_ref\");\nconst array_store_value_ref_1 = require(\"./value/array_store_value_ref\");\nconst store_object_array_ref_1 = require(\"./store_object_array_ref\");\nclass Store {\n constructor(name) {\n this.name = name;\n this.store = new Map();\n this.mode = modes_1.Modes.RUN;\n }\n static canImplicitTypeCast(castType, sourceType) {\n if (castType.isCompatible(types_1.Types.INTEGER) || castType.isCompatible(types_1.Types.REAL)) {\n if (sourceType.isCompatible(types_1.Types.INTEGER) || sourceType.isCompatible(types_1.Types.REAL)) {\n return true;\n }\n }\n return false;\n }\n static doImplicitCasting(castType, stoObj) {\n if (!Store.canImplicitTypeCast(castType, stoObj.type)) {\n throw new Error(\"!!!Critical error: attempted to type cast invalid types\");\n }\n if (castType.isCompatible(types_1.Types.INTEGER)) {\n return new store_value_1.StoreValue(types_1.Types.INTEGER, stoObj.get().trunc());\n }\n else {\n return new store_value_1.StoreValue(types_1.Types.REAL, stoObj.get());\n }\n }\n extendStore(nextStore) {\n this.nextStore = nextStore;\n }\n applyStore(id) {\n if (!this.store.has(id)) {\n if (this.nextStore != null) {\n return this.nextStore.applyStore(id);\n }\n else {\n throw new Error(`Variable ${id} not found.`);\n }\n }\n const val = this.store.get(id);\n let result = null;\n if (val.type instanceof array_type_1.ArrayType) {\n const array = val;\n const array_type = array.type;\n let l = 0, c = 0;\n const values = array.value.map(v => {\n if (array.isVector) {\n return new store_value_address_1.StoreValueAddress(array_type.innerType, v, l++, undefined, array.id, array.readOnly);\n }\n else {\n if (c >= array.columns) {\n c = 0;\n l += 1;\n }\n return new store_value_address_1.StoreValueAddress(array_type.innerType, v, l, c++, array.id, array.readOnly);\n }\n });\n result = new array_store_value_1.ArrayStoreValue(array_type, values, array.lines, array.columns, val.id, val.readOnly);\n }\n else {\n result = new store_value_1.StoreValue(val.type, val.value, val.id, val.readOnly);\n }\n return result;\n }\n updateStore(id, stoValue) {\n if (!this.store.has(id)) {\n if (this.nextStore != null) {\n this.nextStore.updateStore(id, stoValue);\n return this;\n }\n else {\n // TODO: better error message\n throw new Error(`Variable ${id} not found.`);\n }\n }\n else {\n const oldObj = this.store.get(id);\n if (oldObj.readOnly) {\n // TODO: better error message\n throw new Error(\"Cannot change value of a read only variable: \" + id);\n }\n if (oldObj instanceof storeObjectArray_1.StoreObjectArray) {\n const array_value = stoValue;\n if (oldObj.isCompatible(array_value)) {\n if (oldObj.isVector) {\n array_value.get().forEach((val, index) => {\n oldObj.setAt(val, index, undefined);\n });\n }\n else {\n let line = 0;\n let column = 0;\n array_value.get().forEach((val) => {\n oldObj.setAt(val, line, column);\n column += 1;\n if (column >= oldObj.columns) {\n line += 1;\n column = 0;\n }\n });\n }\n return this;\n }\n }\n else if (oldObj.isCompatible(stoValue)) {\n const loc_address = oldObj.locAddress;\n location_1.Location.updateAddress(loc_address, stoValue.get());\n return this;\n }\n const oldType = oldObj.type;\n const stoType = stoValue.type;\n // TODO: better error message\n throw new Error(`${oldType.value} is not compatible with type ${stoType.value} given`);\n }\n }\n /**\n * Method used to update regions of an array (vector or matrix). The should only be used when update an specific\n * possition since it will only update the required addresses.\n * @param {string} id the variable id to be updated\n * @param {IStoreValue} sto_value the value to be used in the update process\n * @param {number} line the line address of the vector/matrix\n * @param {number} column the matrix column, which can be undefined\n */\n updateStoreArray(id, sto_value, line, column) {\n if (!this.store.has(id)) {\n if (this.nextStore != null) {\n this.nextStore.updateStoreArray(id, sto_value, line, column);\n return this;\n }\n else {\n // TODO: better error message\n throw new Error(`Variable ${id} not found.`);\n }\n }\n else {\n const oldObj = this.store.get(id);\n if (oldObj.readOnly) {\n // TODO: better error message\n throw new Error(\"Cannot change value of a read only variable: \" + id);\n }\n if (oldObj instanceof storeObjectArray_1.StoreObjectArray) {\n if (sto_value instanceof array_store_value_1.ArrayStoreValue) {\n // this must be a vector or matrix line update\n const actual_values = sto_value.get();\n if (oldObj.isVector && sto_value.isVector()) {\n for (let i = 0; i < sto_value.lines; i += 1) {\n const val = actual_values[i];\n oldObj.setAt(val, i, undefined);\n }\n }\n else if (!oldObj.isVector && column == null && sto_value.isVector()) {\n for (let i = 0; i < oldObj.columns; i += 1) {\n const val = actual_values[i];\n oldObj.setAt(val, line, i);\n }\n }\n else {\n // TODO: better error message\n throw new Error(`Attempting to assign an invalid value to array ${id}`);\n }\n }\n else {\n if (!oldObj.isVector && column == null) {\n // TODO: better error message\n throw new Error(`Attempting to assign an invalid value to array ${id}`);\n }\n oldObj.setAt(sto_value, line, column);\n }\n }\n else {\n throw new Error(\"Cannot update a non-array variable using updateStoreArray\");\n }\n // const oldType = oldObj.type;\n // const stoType = sto_value.type;\n // // TODO: better error message\n // throw new Error(`${oldType.value} is not compatible with type ${stoType.value} given`);\n return this;\n }\n }\n /**\n * Inserts a new variable into the Store. This method should be used when declaring a new variable,\n * including the special return variable $.\n * @param id variable id\n * @param stoValue the value to be used as the initial value of id\n */\n insertStore(id, stoValue) {\n if (this.store.has(id)) {\n // TODO: better error message\n throw new Error(`${id} is already defined`);\n }\n // TODO check for array....\n let newObj;\n if (stoValue instanceof store_value_ref_1.StoreValueRef) {\n newObj = new storeObjectRef_1.StoreObjectRef(stoValue);\n }\n else if (stoValue instanceof array_store_value_ref_1.ArrayStoreValueRef) {\n newObj = new store_object_array_ref_1.StoreObjectArrayRef(stoValue, stoValue.lines, stoValue.columns);\n }\n else if (stoValue instanceof array_store_value_1.ArrayStoreValue) {\n const columns = stoValue.isVector() ? 0 : stoValue.columns;\n const addresses = [];\n const all_values = stoValue.get();\n if (all_values.length > 0) {\n for (let i = 0; i < stoValue.get().length; i += 1) {\n const val = all_values[i].get();\n addresses.push(location_1.Location.allocate(val));\n }\n }\n else {\n let total = stoValue.lines;\n total = stoValue.isVector() ? total : total * columns;\n for (let i = 0; i < total; i += 1) {\n addresses.push(location_1.Location.allocate(null));\n }\n }\n newObj = new storeObjectArray_1.StoreObjectArray(stoValue.type, stoValue.lines, columns, addresses, stoValue.isConst);\n }\n else {\n const loc_address = location_1.Location.allocate(stoValue.get());\n newObj = new storeObject_1.StoreObject(stoValue.type, loc_address, stoValue.isConst);\n }\n newObj.setID(id);\n this.store.set(id, newObj);\n return this;\n }\n /**\n * Helper function similar to applyStore. But it returns the actual object in the store be it ref or not\n * applyStore will return the refferenced object if the object in the store is a ref\n */\n getStoreObject(id) {\n if (!this.store.has(id)) {\n if (this.nextStore != null) {\n return this.nextStore.getStoreObject(id);\n }\n else {\n throw new Error(`Variable ${id} not found.`);\n }\n }\n return this.store.get(id);\n }\n destroy() {\n this.store.forEach(sto => sto.destroy(), this);\n }\n}\nexports.Store = Store;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst location_1 = require(\"../../memory/location\");\nclass StoreObject {\n /**\n *\n * @param {Type} type\n * @param {Number} loc_address\n * @param {Boolean} readOnly\n */\n constructor(type, loc_address, readOnly = false) {\n this._loc_address = loc_address;\n this._type = type;\n this._readOnly = readOnly;\n this._id = undefined;\n }\n setID(id) {\n this._id = id;\n }\n get id() {\n return this._id;\n }\n get inStore() {\n return this.id !== null;\n }\n get type() {\n return this._type;\n }\n /**\n * Returns the actual value stored at the loccation address present in this object.\n * The returned value is compatible with @prop{StoreObject.type}\n */\n get value() {\n const address = location_1.Location.find(this._loc_address);\n if (address != null) {\n return address.value;\n }\n else {\n throw new Error(\"!!!Critical Error: variable \" + this.id + \" does not have a valid address. Loc-Address \" + this.locAddress);\n }\n }\n get number() {\n throw new Error(\"DOT NOT USE THIS PROPERTY!\");\n }\n get readOnly() {\n return this._readOnly;\n }\n set readOnly(value) {\n this._readOnly = value;\n }\n isCompatible(another) {\n return this.type.isCompatible(another.type);\n }\n destroy() {\n return location_1.Location.deallocate(this._loc_address);\n }\n get locAddress() {\n return this._loc_address;\n }\n}\nexports.StoreObject = StoreObject;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst storeObject_1 = require(\"./storeObject\");\nconst array_store_value_1 = require(\"./value/array_store_value\");\nconst location_1 = require(\"../../memory/location\");\nclass StoreObjectArray extends storeObject_1.StoreObject {\n constructor(type, _lines, _columns, loc_addresses, readOnly = false) {\n super(type, -1, readOnly);\n this._lines = _lines;\n this._columns = _columns;\n this.loc_addresses = loc_addresses;\n }\n get lines() {\n return this._lines;\n }\n get columns() {\n return this._columns;\n }\n isCompatible(another) {\n if (another instanceof array_store_value_1.ArrayStoreValue) {\n const cols = another.columns == null ? 0 : another.columns;\n if (this.lines === another.lines && this.columns === cols) {\n return super.isCompatible(another);\n }\n }\n return false;\n }\n get isVector() {\n return this.type.dimensions === 1;\n }\n /**@override\n * Returns the list of values stored by this array.\n * All returned values are compatible with @prop{StoreObject.type}\n */\n get value() {\n const values = [];\n for (let i = 0; i < this.addresses.length; i += 1) {\n const address = location_1.Location.find(this.addresses[i]);\n if (address != null) {\n values.push(address.value);\n }\n else {\n throw new Error(\"!!!Critical Error: variable \" + this.id + \" does not have a valid address. Loc-Address \" + this.locAddress);\n }\n }\n return values;\n }\n destroy() {\n let bool = true;\n for (let i = 0; i < this.addresses.length; i += 1) {\n bool = bool && location_1.Location.deallocate(this.addresses[i]);\n }\n return bool;\n }\n /**\n * @override\n *\n * Returns the address that contains a list of all addresses of the values present in the array\n */\n get locAddress() {\n throw new Error(\"!!!Internal Error: Cannot invoke locAddress on StoreObjectArray\");\n }\n get addresses() {\n return this.loc_addresses;\n }\n getAt(line, column) {\n if (this.isVector) {\n if (column != null) {\n throw new Error(this.id + \" is not a matrix!\");\n }\n column = line;\n line = 0;\n }\n else if (column == null) {\n // this is a whole line...\n const values = [];\n for (let col = 0; col < this.columns; col += 1) {\n const index = this.getIndexOf(line, col);\n const address = location_1.Location.find(this.addresses[index]);\n values.push(address.value);\n }\n return values;\n }\n const index = this.getIndexOf(line, column);\n const address = location_1.Location.find(this.addresses[index]);\n return address.value;\n }\n setAt(value, line, column) {\n let used_dims = 1;\n if (column != null) {\n used_dims += 1;\n }\n if (!this.type.canAccept(value.type, used_dims)) {\n throw new Error(\"!!!Internal Error: Attempting to insert an invalid value inside array \" + this.id);\n }\n if (this.isVector) {\n if (column != null) {\n throw new Error(this.id + \" is not a matrix!\");\n }\n column = line;\n line = 0;\n }\n else if (column == null) {\n throw new Error(\"!!!Internal Error: Attempting to insert a line into matrix \" + this.id);\n }\n const pos = this.getIndexOf(line, column);\n location_1.Location.updateAddress(this.addresses[pos], value.get());\n }\n getIndexOf(line, column) {\n return line * this.columns + column;\n }\n getLocAddressOf(line, column) {\n if (this.isVector) {\n if (column != null) {\n throw new Error(this.id + \" is not a matrix!\");\n }\n column = line;\n line = 0;\n }\n else if (column == null) {\n // this is a whole line...\n const values = [];\n for (let col = 0; col < this.columns; col += 1) {\n const index = this.getIndexOf(line, col);\n values.push(this.addresses[index]);\n }\n return values;\n }\n const index = this.getIndexOf(line, column);\n return this.addresses[index];\n }\n}\nexports.StoreObjectArray = StoreObjectArray;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst storeObject_1 = require(\"./storeObject\");\nclass StoreObjectRef extends storeObject_1.StoreObject {\n /**\n *\n * @param {StoreObject} stoValue\n */\n constructor(stoValue) {\n super(stoValue.type, stoValue.getRefAddress(), false);\n this.refObj = stoValue.id;\n this.reference_dimension = stoValue.getReferenceDimension();\n }\n get isRef() {\n return true;\n }\n getRefObj() {\n return this.refObj;\n }\n getReferenceDimension() {\n return this.reference_dimension;\n }\n destroy() {\n return false;\n }\n}\nexports.StoreObjectRef = StoreObjectRef;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst storeObjectArray_1 = require(\"./storeObjectArray\");\nclass StoreObjectArrayRef extends storeObjectArray_1.StoreObjectArray {\n constructor(stoValue, lines, columns) {\n super(stoValue.type, lines, columns, stoValue.getAddresses(), false);\n this.refObj = stoValue.id;\n }\n get isRef() {\n return true;\n }\n getRefObj() {\n return this.refObj;\n }\n destroy() {\n return false;\n }\n}\nexports.StoreObjectArrayRef = StoreObjectArrayRef;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst array_type_1 = require(\"../../../typeSystem/array_type\");\nconst store_value_address_1 = require(\"./store_value_address\");\nclass ArrayStoreValue {\n constructor(type, values, lines, columns, id, isConst = false) {\n this.type = type;\n this.id = id;\n this.isConst = isConst;\n this.values = values;\n this.lines = lines;\n this.columns = columns;\n }\n get() {\n return this.values;\n }\n /**\n * @deprecated\n * Potential not necessary since array access is occuring directly in the StoreObject\n * @param line\n * @param column\n */\n getAt(line, column) {\n console.log(\"Column \", column);\n if (this.isVector()) {\n if (column != null) {\n throw new Error(this.id + \" is not a matrix!\");\n }\n column = line;\n line = 0;\n }\n else if (column == null) {\n const values = [];\n for (let col = 0; col < this.columns; col += 1) {\n const index = line * this.lines + col;\n values.push(this.values[index]);\n }\n const array_type = this.type;\n const vector_type = new array_type_1.ArrayType(array_type.innerType, array_type.dimensions - 1);\n return new ArrayStoreValue(vector_type, values, this.columns, 0, this.id, this.isConst);\n }\n const index = line * this.lines + column;\n console.log(\"Get at: \", index);\n return this.values[index];\n }\n setAt(value, line, column) {\n let used_dims = 1;\n if (column != null) {\n used_dims += 1;\n }\n let actual_line = line;\n let actual_column = column;\n if (!this.type.canAccept(value.type, used_dims)) {\n throw new Error(\"!!!Internal Error: Attempting to insert an invalid value inside array \" + this.id);\n }\n if (this.isVector) {\n if (column != null) {\n throw new Error(this.id + \" is not a matrix!\");\n }\n actual_column = actual_line;\n actual_line = 0;\n }\n else if (column == null) {\n if (!(value instanceof ArrayStoreValue)) {\n throw new Error(\"Attempting to insert a single value as a line of matrix \" + this.id);\n }\n const actual_values = value.get();\n for (let i = 0; i < this.columns; i += 1) {\n const pos = actual_line * this.columns + i;\n const val = actual_values[i];\n this.values[pos] = new store_value_address_1.StoreValueAddress(value.type, val.get(), actual_line, i, this.id, this.isConst);\n }\n }\n const columns = this.columns == null ? 0 : this.columns;\n const pos = actual_line * columns + actual_column;\n this.values[pos] = new store_value_address_1.StoreValueAddress(value.type, value.get(), line, column, this.id, this.isConst);\n }\n inStore() {\n return this.id != null;\n }\n isVector() {\n return this.type.dimensions == 1;\n }\n}\nexports.ArrayStoreValue = ArrayStoreValue;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nclass ArrayStoreValueRef {\n constructor(type, values, addresses, lines, columns, id) {\n this.type = type;\n this.values = values;\n this.addresses = addresses;\n this.lines = lines;\n this.columns = columns;\n this.id = id;\n this.isConst = false;\n }\n get() {\n return this.values;\n }\n getAddresses() {\n return this.addresses;\n }\n inStore() {\n return this.id != null;\n }\n}\nexports.ArrayStoreValueRef = ArrayStoreValueRef;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nclass StoreValue {\n constructor(type, value, id, isConst = false) {\n this.type = type;\n this.id = id;\n this.isConst = isConst;\n this.value = value;\n }\n get() {\n return this.value;\n }\n inStore() {\n return this.id != null;\n }\n}\nexports.StoreValue = StoreValue;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst store_value_1 = require(\"./store_value\");\nclass StoreValueAddress extends store_value_1.StoreValue {\n constructor(type, value, line, column, id, isConst = false) {\n super(type, value, id, isConst);\n this.line = line;\n this.column = column;\n }\n}\nexports.StoreValueAddress = StoreValueAddress;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nclass StoreValueRef {\n constructor(type, value, loc_address, id) {\n this.type = type;\n this.value = value;\n this.loc_address = loc_address;\n this.id = id;\n this.isConst = false;\n this.reference_dimesion = 0;\n }\n get() {\n return this.value;\n }\n getRefAddress() {\n return this.loc_address;\n }\n inStore() {\n return this.id != null;\n }\n getReferenceDimension() {\n return this.reference_dimesion;\n }\n setReferenceDimension(dimension) {\n this.reference_dimesion = dimension;\n }\n}\nexports.StoreValueRef = StoreValueRef;\n","import { IVProgParser } from './ast/ivprogParser';\nimport { IVProgProcessor } from './processor/ivprogProcessor';\nimport {DOMConsole} from './io/domConsole';\nimport { LanguageService } from './services/languageService';\nimport { SemanticAnalyser } from './processor/semantic/semanticAnalyser';\nimport { Location } from \"./memory/location\";\n\nexport function runner () {\nconst ivprogLexer = LanguageService.getCurrentLexer();\n\n\n// const lexer = new ivprogLexer(new InputStream(input));\n// const stream = new CommonTokenStream(lexer);\n// stream.fill();\n// let i = 1;\n// let token = null;\n// while ((token = stream.LT(i)).type !== ivprogLexer.EOF && token.type !== ivprogLexer.WHITESPACE) {\n// console.log(`${token.type}-${token.text}`);\n// console.log('\\n')\n// i++;\n// }\n// const anaSin = new IVProgParser(input, ivprogLexer);\nconst editor = new window.JsonEditor('#json-renderer', {});\nconst domConsole = new DOMConsole(\"#console\", true);\ndomConsole.hide();\n// proc.interpretAST().then( sto => {\n// console.log(sto.applyStore('a'));\n// }).catch(e => console.log(e));\ntry {\n window.$('#btn').click( () => {\n const input = window.$('#input').val();\n const analiser = new IVProgParser(input, ivprogLexer);\n try {\n const data = analiser.parseTree();\n const semAna = new SemanticAnalyser(data);\n const proc = new IVProgProcessor(semAna.analyseTree());\n proc.registerInput(domConsole);\n domConsole.clear();\n proc.registerOutput(domConsole);\n proc.interpretAST().then(sto => {\n console.log(sto);\n editor.load(sto.store);\n console.log(Location.size());\n }).catch( e => {\n alert(e);\n console.log(e);\n console.log(Location.size());\n });\n } catch (error) {\n alert(error);\n console.log(error);\n console.log(Location.size());\n }\n \n });\n} catch(a) {\n console.log(a);\n}\n}\n","import line_i18n from \"line-i18n\";\nimport { LocalizedStrings } from \"./localizedStringsService\";\n\nconst StringTypes = line_i18n.StringTypes;\n\nexport const i18nHelper = Object.freeze({\n i18n: (identifier) => {\n var opts = identifier.split(':');\n var type = opts[0].toLowerCase();\n var id = opts[1];\n if (StringTypes.ERROR === type) {\n return LocalizedStrings.getError(id);\n } else if (StringTypes.MESSAGE === type) {\n return LocalizedStrings.getMessage(id); \n } else if (StringTypes.UI === type) {\n return LocalizedStrings.getUI(id);\n } else {\n console.warn(\"A string has been passed to the i18n helper function that was not in the form type:id -> \" + identifier);\n return LocalizedStrings.getString(identifier, type);\n }\n }\n});","import Lexers from './../../grammar/';\nimport line_i18n from 'line-i18n';\nimport { Config } from \"./../util/config\";\n\nclass LanguageServiceExtended extends line_i18n.LanguageServiceNoLS {\n\n constructor () {\n super(typeof(iLMparameters) === 'undefined' ? Config.default_lang : iLMparameters.lang);\n }\n\n getDefaultLang () {\n return \"pt\";\n }\n\n getCurrentLexer () {\n const langInfo = Lexers[this.getLang()];\n if(langInfo === null || langInfo === undefined) {\n return Lexers[this.getDefaultLang()].lexer;\n } else {\n return langInfo.lexer;\n }\n }\n\n getCurrentLangFuncs () {\n const langInfo = Lexers[this.getLang()];\n if(langInfo === null || langInfo === undefined) {\n return Lexers[this.getDefaultLang()].langFuncs;\n } else {\n return langInfo.langFuncs;\n }\n }\n\n getCurrentLangLibs () {\n const langInfo = Lexers[this.getLang()];\n if(langInfo === null || langInfo === undefined) {\n return Lexers[this.getDefaultLang()].langLibs;\n }\n return langInfo.langLibs;\n }\n}\n\nexport const LanguageService = new LanguageServiceExtended();\n","import line_i18n from 'line-i18n';\nimport { LanguageService } from \"./languageService\";\nimport { LanguageDefinedFunction } from \"./../processor/definedFunctions\";\nimport Langs from './../../i18n';\nimport { Operators } from \"./../ast/operators\";\n\nclass IVProgLocalizedStrings extends line_i18n.LocalizedStrings {\n\n constructor(langService, langsJsons, shouldListenToChange = false) {\n super(langService, langsJsons, shouldListenToChange);\n }\n\n translateType (type, dim) {\n const type_string = this.getUI(`type_${type}`);\n switch (dim) {\n case 0:\n return type_string;\n default:\n if(dim > 1)\n return this.getUI(\"matrix_info_string\", [type_string])\n else\n return this.getUI(\"vector_info_string\", [type_string])\n }\n }\n \n translateOp (op) {\n switch(op.ord) {\n case Operators.AND.ord:\n case Operators.OR.ord:\n case Operators.NOT.ord:\n return this.getUI(`logic_operator_${op.value}`);\n default:\n return op.value;\n }\n }\n\n translateInternalFunction (name, category = null) {\n if (category == null) {\n return LanguageDefinedFunction.getLocalName(name);\n } else {\n return LanguageDefinedFunction.getLocalName(`${category}.${name}`);\n }\n }\n}\n\nexport const LocalizedStrings = Object.freeze(new IVProgLocalizedStrings(LanguageService, Langs, true));\n\nlet _instance = null;\n\nexport function getInstance () {\n if(_instance == null) {\n _instance = new IVProgLocalizedStrings(LanguageService, Langs);\n }\n return _instance;\n}\n","let clicks = [];\nlet inRebuildMode = false;\n\nexport const ActionTypes = Object.freeze({\n // registerUserEvent payload:\n // (function_name, insert action)\n INSERT_FUNCTION:\"INSERT_FUNCTION\",\n // (function_name, remove action)\n REMOVE_FUNCTION:\"REMOVE_FUNCTION\",\n // (var_name,insert action, type, dim)\n INSERT_GLOBAL_VAR:\"INSERT_GLOBAL_VAR\",\n // (var name, remove action)\n REMOVE_GLOBAL_VAR:\"REMOVE_GLOBAL_VAR\",\n // (old function name, rename action, new function name)\n RENAME_FUNCTION:\"RENAME_FUNCTION\",\n // (old var name, rename action. new var name)\n RENAME_GLOBAL_VAR:\"RENAME_GLOBAL_VAR\",\n // (var name, set const action)\n SET_GLOBAL_CONST:\"SET_GLOBAL_CONST\",\n // (function name, change return action, type, dim)\n CHANGE_FUNCTION_RETURN:\"CHANGE_FUNCTION_RETURN\",\n // (var name, change type action, type, dim, rows?, columns?)\n CHANGE_GLOBAL_TYPE:\"CHANGE_GLOBAL_TYPE\",\n // (var name, change value action, value)\n CHANGE_GLOBAL_VALUE:\"CHANGE_GLOBAL_VALUE\",\n // (function name, insert param action, param varname, type, dim)\n INSERT_FUNCTION_PARAM:\"INSERT_FUNCTION_PARAM\",\n // (function name, remove param action, param varname)\n REMOVE_FUNCTION_PARAM:\"REMOVE_FUNCTION_PARAM\",\n // (function name, change param type action, type, dim)\n CHANGE_PARAM_TYPE:\"CHANGE_PARAM_TYPE\",\n // (function name, rename param action, old param name, new param name)\n RENAME_FUNCTION_PARAM:\"RENAME_FUNCTION_PARAM\",\n // (function name, insert var action, var name, type, dim)\n INSERT_FUNCTION_VAR:\"INSERT_FUCNTION_VAR\",\n // (function name, remove var action, var name)\n REMOVE_FUNCTION_VAR:\"REMOVE_FUNCTION_VAR\",\n // (function name, rename var action, old var name, new var name)\n RENAME_FUNCTION_VAR:\"RENAME_FUNCTION_VAR\",\n // (function name, change var type action, var name, type, dim, rows?, columns?)\n CHANGE_VAR_TYPE:\"CHANGE_VAR_TYPE\",\n // (function name, change var value action, var name, value)\n CHANGE_VAR_VALUE:\"CHANGE_VAR_VALUE\",\n // (function name, insert command action, command, path)\n INSERT_COMMAND:\"INSERT_COMMAND\",\n // (function name, remove command action, path)\n REMOVE_COMMAND:\"REMOVE_COMMAND\",\n // (function name, change command exp action, path, exp)\n CHANGE_COMMAND_EXP:\"CHANGE_COMMAND_EXP\",\n // (function name, change attrib exp action, path, exp)\n CHANGE_ATTRIB_EXP:\"CHANGE_ATTRIB_EXP\",\n // (function name, change attrib var action, path, var name, row_exp?, column_exp?)\n CHANGE_ATTRIB_VAR:\"CHANGE_ATTRIB_VAR\",\n // (function name, move command action, old path, new path)\n MOVE_COMMAND:\"MOVE_COMMAND\",\n // (function name, enter change name action, var name)\n ENTER_CHANGE_VAR_NAME:'ENTER_CHANGE_VAR_NAME',\n // (function name, enter change value action, var name)\n ENTER_CHANGE_VAR_VALUE:'ENTER_CHANGE_VAR_VALUE',\n // (var name, enter change name action)\n ENTER_CHANGE_GLOBAL_NAME:'ENTER_CHANGE_GLOBAL_NAME',\n // (var name, enter change value action)\n ENTER_CHANGE_GLOBAL_VALUE:'ENTER_CHANGE_GLOBAL_VALUE',\n // (function name, enter change name action, param name)\n ENTER_CHANGE_PARAM_NAME:'ENTER_CHANGE_PARAM_NAME',\n});\n\nexport function registerClick (x, y, details) {\n if (inRebuildMode) {\n return;\n }\n clicks.push([x, y, Date.now(), details]);\n}\n\nexport function registerUserEvent (command, action, ...params) {\n registerEvent('user_event', command, action, params);\n}\n\nexport function registerSystemEvent (command, action, ...params) {\n registerEvent('system_event', command, action, params);\n}\n\nfunction registerEvent (tag, command, action, params) {\n if (inRebuildMode) {\n return;\n }\n const event = {context: command, action: action, params:params};\n clicks.push([tag, Date.now(), event]);\n}\n\nexport function getLogs () {\n return clicks;\n}\n\nexport function setRebuildMode (flag) {\n inRebuildMode = flag;\n}\n\nexport function getLogsAsString () {\n return JSON.stringify(clicks);\n}\n\nexport function parseLogs (logData) {\n clicks = JSON.parse(logData);\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nclass ArrayType {\n constructor(type, dimensions) {\n this.dimensions = dimensions;\n this.innerType = type;\n }\n get isVector() {\n return this.dimensions == 1;\n }\n isCompatible(another) {\n if (another instanceof ArrayType) {\n if (this.dimensions !== another.dimensions) {\n return false;\n }\n return this.innerType.isCompatible(another.innerType);\n }\n return false;\n }\n stringInfo() {\n const list = this.innerType.stringInfo();\n list.forEach(v => {\n v.dim = this.dimensions;\n });\n return list;\n }\n get value() {\n return undefined;\n }\n get ord() {\n return undefined;\n }\n canAccept(another, used_dims) {\n const free_dims = this.dimensions - used_dims;\n if (another instanceof ArrayType) {\n return free_dims == another.dimensions && this.innerType.isCompatible(another.innerType);\n }\n else {\n return free_dims == 0 && this.innerType.isCompatible(another);\n }\n }\n}\nexports.ArrayType = ArrayType;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nclass MultiType {\n constructor(types) {\n this.types = types;\n }\n get value() {\n return undefined;\n }\n get ord() {\n return undefined;\n }\n stringInfo() {\n let list = [];\n for (let i = 0; i < this.types.length; i++) {\n const t = this.types[i];\n list = list.concat(t.stringInfo());\n }\n return list;\n }\n isCompatible(another) {\n for (let i = 0; i < this.types.length; i++) {\n const t = this.types[i];\n if (another.isCompatible(t)) {\n return true;\n }\n }\n return false;\n }\n}\nexports.MultiType = MultiType;\n","import { LanguageService } from \"../services/languageService\";\nimport { Types } from \"./types\";\nimport Decimal from \"decimal.js\";\nimport { Config } from \"../util/config\";\n\nexport function toInt (str) {\n return new Decimal(str);\n}\n\nexport function toString (str) {\n let value = str.replace(/^\"/, '');\n value = value.replace(/\"$/, '');\n value = value.replace(/\\\\b/g, \"\\b\");\n value = value.replace(/\\\\t/g, \"\\t\");\n value = value.replace(/\\\\n/g, \"\\n\");\n value = value.replace(/\\\\r/g, \"\\r\");\n value = value.replace(/\\\\\"/g, \"\\\"\");\n value = value.replace(/\\\\'/g, '\\'');\n value = value.replace(/\\\\\\\\/g, \"\\\\\");\n return value;\n}\n\nexport function toReal (value) {\n return new Decimal(value);\n}\n\nexport function toBool (str) {\n const val = \"'\" + str + \"'\";\n const lexer = LanguageService.getCurrentLexer();\n const instance = new lexer(null);\n if (instance.literalNames[lexer.RK_TRUE] === val) {\n return true;\n } else if (instance.literalNames[lexer.RK_FALSE] === val) {\n return false;\n } else {\n // TODO: better error message\n throw new Error(str + \"not a valid boolean\");\n }\n}\n\nexport function convertBoolToString (bool) {\n const lexer = LanguageService.getCurrentLexer();\n const instance = new lexer(null);\n let result = null;\n if (bool) {\n result = instance.literalNames[lexer.RK_TRUE];\n } else {\n result = instance.literalNames[lexer.RK_FALSE];\n }\n return result.replace(/'/g,\"\");\n}\n\nexport function convertToString(value, type) {\n switch (type.ord) {\n case Types.INTEGER.ord:\n return value.toString();\n case Types.REAL.ord: {\n if (value.dp() <= 0) {\n return value.toFixed(1); \n } else {\n return value.toFixed(Config.decimalPlaces);\n }\n }\n case Types.BOOLEAN.ord:\n return convertBoolToString(value);\n default:\n return value;\n }\n}","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nclass Type {\n constructor(value, ord) {\n this.value = value;\n this.ord = ord;\n }\n stringInfo() {\n return [{ type: this.value, dim: 0 }];\n }\n isCompatible(another) {\n return this.value === another.value && this.ord === another.ord;\n }\n}\nexports.Type = Type;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst type_1 = require(\"./type\");\nconst multiType_1 = require(\"./multiType\");\nconst maybe_1 = require(\"../util/maybe\");\nconst INTEGER = new type_1.Type(\"integer\", 0);\nconst REAL = new type_1.Type(\"real\", 1);\nconst STRING = new type_1.Type(\"text\", 2);\nconst BOOLEAN = new type_1.Type(\"boolean\", 3);\nconst VOID = new type_1.Type(\"void\", 4);\nconst UNDEFINED = new type_1.Type(\"undefined\", 5);\nconst ALL = new multiType_1.MultiType([INTEGER, REAL, STRING, BOOLEAN]);\nexports.Types = Object.freeze({\n INTEGER: INTEGER,\n REAL: REAL,\n STRING: STRING,\n BOOLEAN: BOOLEAN,\n VOID: VOID,\n UNDEFINED: UNDEFINED,\n ALL: ALL\n});\nfunction fromOrdToType(ord) {\n const typeMap = exports.Types;\n for (let t in typeMap) {\n if (typeMap[t].ord === ord) {\n return maybe_1.Maybe.some(typeMap[t]);\n }\n }\n return maybe_1.Maybe.none();\n}\nexports.fromOrdToType = fromOrdToType;\n","import {SemanticAnalyser} from './../processor/semantic/semanticAnalyser';\nimport {IVProgProcessor} from './../processor/ivprogProcessor';\nimport { InputTest } from './inputTest';\nimport { OutputTest } from './outputTest';\nimport { LocalizedStrings } from './../services/localizedStringsService'\n\nexport function autoGenerateTestCaseOutput (program_text, testCases) {\n let copyTestCases = testCases.map((test) => Object.assign({}, test));\n try {\n const program = SemanticAnalyser.analyseFromSource(program_text);\n const resultList = testCases.map((test, id) => {\n const input = new InputTest(test.input);\n const output = new OutputTest();\n const exec = new IVProgProcessor(program);\n exec.registerInput(input);\n exec.registerOutput(output);\n return exec.interpretAST().then(_ => {\n return {id: id, program: exec};\n });\n });\n return Promise.all(resultList).then(result_final => {\n for(let i = 0; i < result_final.length; ++i) {\n const result = result_final[i];\n const output = result.program.output.list;\n const input = result.program.input;\n if(input.index != input.inputList.length) {\n window.showAlert(LocalizedStrings.getMessage(\"testcase_autogen_unused_input\", [result.id+1]));\n return Promise.resolve(false);\n }\n if(output.length == 0) {\n window.showAlert(LocalizedStrings.getMessage(\"testcase_autogen_empty\", [result.id+1]));\n }\n copyTestCases[result.id].output = output;\n }\n window.outputGenerated(copyTestCases);\n return Promise.resolve(true);\n });\n }catch (error) {\n return Promise.reject(error)\n }\n}","class ConfigObject {\n\n constructor () {\n this.decimalPlaces = 8;\n this.intConvertRoundMode = 2;\n this.default_lang = 'pt';\n this.enable_type_casting = true;\n this.idle_input_interval = 5000;\n this.suspend_threshold = 100;\n // this.max_instruction_count = 350250; - automated evaluation limit\n this.max_instruction_count = Number.MAX_SAFE_INTEGER;\n }\n\n setConfig (opts) {\n for (const key in opts) {\n if(Object.prototype.hasOwnProperty.call(this, key)){\n this[key] = opts[key];\n }\n }\n }\n}\nconst config = new ConfigObject();\nexport const Config = config;","import { getCodeEditorModeConfig } from \"./utils\";\n\n/**\n * Source: https://raw.githubusercontent.com/codemirror/CodeMirror/master/mode/clike/clike.js\n * @author arijn Haverbeke and others\n * @author Lucas de Souza\n * @param {CodeMirror} CodeMirror \n */\nexport function CodeEditorMode (CodeMirror) {\n \"use strict\";\n\n function Context(indented, column, type, info, align, prev) {\n this.indented = indented;\n this.column = column;\n this.type = type;\n this.info = info;\n this.align = align;\n this.prev = prev;\n }\n\n function pushContext(state, col, type, info) {\n let indent = state.indented;\n if (state.context && state.context.type == \"statement\" && type != \"statement\")\n indent = state.context.indented;\n return state.context = new Context(indent, col, type, info, null, state.context);\n }\n \n function popContext(state) {\n const t = state.context.type;\n if (t == \")\" || t == \"]\" || t == \"}\")\n state.indented = state.context.indented;\n return state.context = state.context.prev;\n }\n\n function typeBefore(stream, state, pos) {\n if (state.prevToken == \"variable\" || state.prevToken == \"type\") return true;\n if (/\\S(?:[^- ]>|[*\\]])\\s*$|\\*$/.test(stream.string.slice(0, pos))) return true;\n if (state.typeAtEndOfLine && stream.column() == stream.indentation()) return true;\n }\n\n function isTopScope(context) {\n for (; ;) {\n if (!context || context.type == \"top\") return true;\n if (context.type == \"}\" && context.prev.info != \"namespace\") return false;\n context = context.prev;\n }\n }\n\n function contains(words, word) {\n if (typeof words === \"function\") {\n return words(word);\n } else {\n return Object.propertyIsEnumerable.call(words, word);\n }\n }\n\n function tokenComment(stream, state) {\n let maybeEnd = false, ch;\n while ((ch = stream.next())) {\n if (ch == \"/\" && maybeEnd) {\n state.tokenize = null;\n break;\n }\n maybeEnd = (ch == \"*\");\n }\n return \"comment\";\n }\n\n CodeMirror.defineMode(\"ivprog\", function (config, parserConfig) {\n const indentUnit = config.indentUnit,\n statementIndentUnit = parserConfig.statementIndentUnit || indentUnit,\n dontAlignCalls = parserConfig.dontAlignCalls,\n keywords = parserConfig.keywords || {},\n switchKeyword = parserConfig.switchKeyword,\n caseKeyword = parserConfig.caseKeyword,\n defaultKeyword = parserConfig.defaultKeyword,\n caseRegex = new RegExp(`^\\\\s*(?:${caseKeyword} .*?:|${defaultKeyword}:|\\\\{\\\\}?|\\\\})$`),////,\n types = parserConfig.types || {},\n builtin = parserConfig.builtin || {},\n blockKeywords = parserConfig.blockKeywords || {},\n defKeywords = parserConfig.defKeywords || {},\n atoms = parserConfig.atoms || {},\n hooks = parserConfig.hooks || {},\n multiLineStrings = parserConfig.multiLineStrings,\n indentStatements = false,\n namespaceSeparator = null,\n isPunctuationChar = /[[\\]{}(),;:\\n]/,\n numberStart = /[\\d.]/,\n number = /^(?:0x[a-f\\d]+|0b[01]+|(?:\\d+\\.?\\d*|\\.\\d+)(?:e[-+]?\\d+)?)$/i,\n isOperatorChar = /[+\\-*%=<>!/&]/,\n isIdentifierChar = /[a-zA-Z0-9_]/,\n // An optional function that takes a {string} token and returns true if it\n // should be treated as a builtin.\n isReservedIdentifier = parserConfig.isReservedIdentifier || false;\n\n let curPunc, isDefKeyword;\n let tokenString = function () { /*SKIP*/};\n function tokenBase(stream, state) {\n const ch = stream.next();\n if (hooks[ch]) {\n const result = hooks[ch](stream, state);\n if (result !== false) return result;\n }\n if (ch == '\"') {\n state.tokenize = tokenString(ch);\n return state.tokenize(stream, state);\n }\n if (isPunctuationChar.test(ch)) {\n curPunc = ch;\n return null;\n }\n if (numberStart.test(ch)) {\n stream.backUp(1)\n if (stream.match(number)) return \"number\"\n stream.next()\n }\n if (ch == \"/\") {\n if (stream.eat(\"*\")) {\n state.tokenize = tokenComment;\n return tokenComment(stream, state);\n }\n if (stream.eat(\"/\")) {\n stream.skipToEnd();\n return \"comment\";\n }\n }\n if (isOperatorChar.test(ch)) {\n while (!stream.match(/^\\/[/*]/, false) && stream.eat(isOperatorChar)) { /* SKIP */}\n return \"operator\";\n }\n stream.eatWhile(isIdentifierChar);\n if (namespaceSeparator) while (stream.match(namespaceSeparator))\n stream.eatWhile(isIdentifierChar);\n\n const cur = stream.current();\n if (contains(keywords, cur)) {\n if (contains(blockKeywords, cur)) curPunc = \"newstatement\";\n if (contains(defKeywords, cur)) isDefKeyword = true;\n return \"keyword\";\n }\n if (contains(types, cur)) return \"type\";\n if (contains(builtin, cur)\n || (isReservedIdentifier && isReservedIdentifier(cur))) {\n if (contains(blockKeywords, cur)) curPunc = \"newstatement\";\n return \"builtin\";\n }\n if (contains(atoms, cur)) return \"atom\";\n return \"variable\";\n }\n\n tokenString = function (quote) {\n return function (stream, state) {\n let escaped = false, next, end = false;\n while ((next = stream.next()) != null) {\n if (next == quote && !escaped) { end = true; break; }\n escaped = !escaped && next == \"\\\\\";\n }\n if (end || !(escaped || multiLineStrings))\n state.tokenize = null;\n return \"string\";\n };\n }\n\n function maybeEOL(stream, state) {\n if (parserConfig.typeFirstDefinitions && stream.eol() && isTopScope(state.context))\n state.typeAtEndOfLine = typeBefore(stream, state, stream.pos)\n }\n\n // Interface\n\n return {\n startState: function (basecolumn) {\n return {\n tokenize: null,\n context: new Context((basecolumn || 0) - indentUnit, 0, \"top\", null, false),\n indented: 0,\n startOfLine: true,\n prevToken: null\n };\n },\n\n token: function (stream, state) {\n let ctx = state.context;\n if (stream.sol()) {\n if (ctx.align == null) ctx.align = false;\n state.indented = stream.indentation();\n state.startOfLine = true;\n }\n if (stream.eatSpace()) { maybeEOL(stream, state); return null; }\n curPunc = isDefKeyword = null;\n let style = (state.tokenize || tokenBase)(stream, state);\n if (style == \"comment\" || style == \"meta\") return style;\n if (ctx.align == null) ctx.align = true;\n\n if (curPunc == \";\" || curPunc == \":\" || (curPunc == \",\" && stream.match(/^\\s*(?:\\/\\/.*)?$/, false)))\n while (state.context.type == \"statement\") popContext(state);\n else if (curPunc == \"{\") pushContext(state, stream.column(), \"}\");\n else if (curPunc == \"[\") pushContext(state, stream.column(), \"]\");\n else if (curPunc == \"(\") pushContext(state, stream.column(), \")\");\n else if (curPunc == \"}\") {\n while (ctx.type == \"statement\") ctx = popContext(state);\n if (ctx.type == \"}\") ctx = popContext(state);\n while (ctx.type == \"statement\") ctx = popContext(state);\n }\n else if (curPunc == ctx.type) popContext(state);\n else if (indentStatements &&\n (((ctx.type == \"}\" || ctx.type == \"top\") && curPunc != \";\") ||\n (ctx.type == \"statement\" && curPunc == \"newstatement\"))) {\n pushContext(state, stream.column(), \"statement\", stream.current());\n }\n\n if (style == \"variable\" &&\n ((state.prevToken == \"def\" ||\n (parserConfig.typeFirstDefinitions && typeBefore(stream, state, stream.start) &&\n isTopScope(state.context) && stream.match(/^\\s*\\(/, false)))))\n style = \"def\";\n\n if (hooks.token) {\n const result = hooks.token(stream, state, style);\n if (result !== undefined) style = result;\n }\n\n if (style == \"def\" && parserConfig.styleDefs === false) style = \"variable\";\n\n state.startOfLine = false;\n state.prevToken = isDefKeyword ? \"def\" : style || curPunc;\n maybeEOL(stream, state);\n return style;\n },\n\n indent: function (state, textAfter) {\n if (state.tokenize != tokenBase && state.tokenize != null || state.typeAtEndOfLine) return CodeMirror.Pass;\n let ctx = state.context;\n const firstChar = textAfter && textAfter.charAt(0)\n const closing = firstChar == ctx.type;\n if (ctx.type == \"statement\" && firstChar == \"}\") ctx = ctx.prev;\n if (parserConfig.dontIndentStatements)\n while (ctx.type == \"statement\" && parserConfig.dontIndentStatements.test(ctx.info))\n ctx = ctx.prev\n if (hooks.indent) {\n const hook = hooks.indent(state, ctx, textAfter, indentUnit);\n if (typeof hook == \"number\") return hook\n }\n const switchBlock = ctx.prev && ctx.prev.info == switchKeyword;\n if (parserConfig.allmanIndentation && /[{(]/.test(firstChar)) {\n while (ctx.type != \"top\" && ctx.type != \"}\") ctx = ctx.prev\n return ctx.indented\n }\n if (ctx.type == \"statement\")\n return ctx.indented + (firstChar == \"{\" ? 0 : statementIndentUnit);\n if (ctx.align && (!dontAlignCalls || ctx.type != \")\"))\n return ctx.column + (closing ? 0 : 1);\n if (ctx.type == \")\" && !closing)\n return ctx.indented + statementIndentUnit;\n const caseTestRegex = new RegExp(`^(?:${caseKeyword}|${defaultKeyword})\\b`)\n return ctx.indented + (closing ? 0 : indentUnit) +\n (!closing && switchBlock && !caseTestRegex.test(textAfter) ? indentUnit : 0);\n },\n\n electricInput: caseRegex,\n blockCommentStart: \"/*\",\n blockCommentEnd: \"*/\",\n blockCommentContinue: \" * \",\n lineComment: \"//\",\n fold: \"brace\"\n };\n });\n\n function words(str) {\n const obj = {}, words = str.split(\" \");\n for (let i = 0; i < words.length; ++i) obj[words[i]] = true;\n return obj;\n }\n \n const codeConfig = getCodeEditorModeConfig();\n\n const ivprogKeywords = codeConfig.keywords.join(\" \");\n\n const basicTypes = words(codeConfig.types.join(\" \"));\n\n function ivprogTypes(identifier) {\n return contains(basicTypes, identifier);\n }\n\n const ivprogBlockKeywords = codeConfig.blocks.join(\" \");\n const ivprogDefKeywords = \"funcao const\";\n\n function def(mimes, mode) {\n if (typeof mimes == \"string\") mimes = [mimes];\n const words = [];\n function add(obj) {\n if (obj) {\n for (const prop in obj) if (Object.hasOwnProperty.call(obj, prop)) {\n words.push(prop);\n }\n }\n }\n add(mode.keywords);\n add(mode.types);\n add(mode.builtin);\n add(mode.atoms);\n if (words.length) {\n mode.helperType = mimes[0];\n CodeMirror.registerHelper(\"hintWords\", mimes[0], words);\n }\n\n for (let i = 0; i < mimes.length; ++i)\n CodeMirror.defineMIME(mimes[i], mode);\n }\n \n def([\"text/x-ivprog\"], {\n name: \"ivprog\",\n keywords: words(ivprogKeywords),\n types: ivprogTypes,\n blockKeywords: words(ivprogBlockKeywords),\n defKeywords: words(ivprogDefKeywords),\n typeFirstDefinitions: true,\n atoms: words(codeConfig.atoms.join(\" \")),\n switchKeyword: codeConfig.switchString,\n caseKeyword: codeConfig.case_default[0],\n defaultKeyword: codeConfig.case_default[1],\n modeProps: { fold: [\"brace\"] }\n });\n\n}\n","import { setTestCases, getTestCases } from \"../visualUI/functions\";\nimport { generate } from \"../visualUI/code_generator\";\nimport { IVProgAssessment } from \"../assessment/ivprogAssessment\";\nimport { TestConsole } from \"./testConsole\";\nimport { parseLogs } from \"./../services/userLog\";\nimport { SemanticAnalyser } from \"../processor/semantic/semanticAnalyser\";\nimport { Maybe } from \"./maybe\";\n\nfunction parseActivityData (data) {\n let algorithm_in_ilm = null;\n if (data.split('\\n::algorithm::')[1]) {\n algorithm_in_ilm = data.split('\\n::algorithm::')[1].split('\\n::logs::')[0];\n const logs = data.split('\\n::algorithm::')[1].split('\\n::logs::')[1];\n if (logs != null) {\n parseLogs(logs);\n }\n }\n let content;\n try {\n content = JSON.parse(data.split('\\n::algorithm::')[0]);\n content['algorithm_in_ilm'] = algorithm_in_ilm;\n } catch (e) {\n console.error(e);\n return Maybe.none();\n }\n return Maybe.some(content);\n}\n\nexport function prepareActivityToStudentHelper (ilm_cont) {\n const maybe_content = parseActivityData(ilm_cont);\n return maybe_content.map(content => {\n const testCases = content.testcases;\n setTestCases(testCases);\n\n let prog_type = null;\n if (content.settings_programming_type) {\n prog_type = content.settings_programming_type[0].value;\n } else {\n prog_type = \"visual\";\n }\n\n return {\n settingsProgrammingType: prog_type,\n settingsDataTypes: content.settings_data_types,\n settingsCommands: content.settings_commands,\n settingsFunctions: content.settings_functions,\n algorithmInIlm: content.algorithm_in_ilm,\n settingsFilter: content.settings_filter\n }\n });\n}\n\nfunction compareArray (a, b) {\n for (let i = 0; i < a.length; ++i) {\n const elementA = a[i];\n const elementB = b[i];\n if (elementA != elementB) {\n return false;\n }\n }\n return true;\n}\n\nfunction compareTestcases (original, student) {\n if (original.length != student.length) {\n return false;\n }\n for (let i = 0; i < original.length; ++i) {\n const elementO = original[i];\n const elementS = student[i];\n if(!compareArray(elementO.input, elementS.input)) {\n return false;\n }\n if(!compareArray(elementO.output, elementS.output)) {\n return false;\n }\n }\n return true;\n}\n\nexport function autoEval (originalData, callback) {\n const code = generate();\n const original = parseActivityData(originalData).getOrElse(undefined);\n if(original == null) {\n alert(\"iAssign did not provide the original activity data!\");\n return callback(null);\n }\n if (code == null) {\n return callback(-1); // @FeedbackConvention Casos de teste vazios\n } else {\n if (!compareTestcases(original.testcases, getTestCases())) {\n return callback(-2); // @FeedbackConvention Casos de teste alterados pelo aluno\n }\n const ast_code = SemanticAnalyser.analyseFromSource(code);\n const autoAssessment = new IVProgAssessment(ast_code, getTestCases(), new TestConsole([]));\n autoAssessment.runTest().then( grade => callback(grade)).catch(err => {\n console.log(err);\n callback(0);\n });\n }\n}\n","import { Input } from './../io/input';\nimport { LocalizedStrings } from '../services/localizedStringsService';\n\nexport class InputTest extends Input {\n\n constructor (inputList) {\n super();\n this.index = 0;\n this.inputList = inputList;\n }\n\n requestInput (callback) {\n if(this.index < this.inputList.length) { \n callback(this.inputList[this.index]);\n this.index++;\n } else {\n throw new Error(LocalizedStrings.getError(\"exceeded_input_request\"));\n }\n }\n}","import { Input } from './../io/input';\nimport { LocalizedStrings } from '../services/localizedStringsService';\n\nexport class InputAssessment extends Input {\n\n constructor (input_list) {\n super();\n this.index = 0;\n this.input_list = input_list.map((val) => {\n return {\"value\": val, \"read\": false};\n });\n }\n\n requestInput (callback) {\n if(this.index < this.input_list.length) {\n const input = this.input_list[this.index];\n input.read = true;\n this.index += 1;\n callback(input.value);\n } else {\n throw new Error(LocalizedStrings.getError(\"exceeded_input_request\"));\n }\n }\n\n isInputAvailable () {\n return this.index < this.input_list.length;\n }\n}","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n*\n* Maybe Monad\n* @Source: https://codewithstyle.info/advanced-functional-programming-in-typescript-maybe-monad/\n* @Modified by: @lucascalion - 28/08/2019\n*\n**/\nclass Maybe {\n constructor(value) {\n this.value = value;\n }\n static some(value) {\n if (!value) {\n throw Error(\"Provided value must not be empty\");\n }\n return new Maybe(value);\n }\n static none() {\n return new Maybe(null);\n }\n static fromValue(value) {\n return value ? Maybe.some(value) : Maybe.none();\n }\n getOrElse(defaultValue) {\n return this.value === null ? defaultValue : this.value;\n }\n map(f) {\n if (this.value === null) {\n return Maybe.none();\n }\n else {\n return Maybe.fromValue(f(this.value));\n }\n }\n}\nexports.Maybe = Maybe;\n","import { Output } from './../io/output';\n\nexport class OutputTest extends Output {\n\n constructor () {\n super();\n this.list = [];\n }\n\n sendOutput (text) {\n const output = ''+text;\n output.split(\"\\n\").forEach(t => {\n t = t.replace(/\\t/g,' ');\n t = t.replace(/\\s/g,\" \");\n this.list.push(t);\n },this);\n \n }\n}","/**\n * Author: @jhchen - https://github.com/jhchen\n * Modified by: @lucascalion - 23/07/2019\n * This library modifies the diff-patch-match library by Neil Fraser\n * by removing the patch and match functionality and certain advanced\n * options in the diff function. The original license is as follows:\n *\n * ===\n *\n * Diff Match and Patch\n *\n * Copyright 2006 Google Inc.\n * http://code.google.com/p/google-diff-match-patch/\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n/**\n * The data structure representing a diff is an array of tuples:\n * [[DIFF_DELETE, 'Hello'], [DIFF_INSERT, 'Goodbye'], [DIFF_EQUAL, ' world.']]\n * which means: delete 'Hello', add 'Goodbye' and keep ' world.'\n */\nconst DIFF_DELETE = -1;\nconst DIFF_INSERT = 1;\nconst DIFF_EQUAL = 0;\n\n\n/**\n * Find the differences between two texts. Simplifies the problem by stripping\n * any common prefix or suffix off the texts before diffing.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @param {Int|Object} [cursor_pos] Edit position in text1 or object with more info\n * @return {Array} Array of diff tuples.\n */\nfunction diff_main(text1, text2, cursor_pos, _fix_unicode) {\n // Check for equality\n if (text1 === text2) {\n if (text1) {\n return [[DIFF_EQUAL, text1]];\n }\n return [];\n }\n\n if (cursor_pos != null) {\n const editdiff = find_cursor_edit_diff(text1, text2, cursor_pos);\n if (editdiff) {\n return editdiff;\n }\n }\n\n // Trim off common prefix (speedup).\n let commonlength = diff_commonPrefix(text1, text2);\n const commonprefix = text1.substring(0, commonlength);\n text1 = text1.substring(commonlength);\n text2 = text2.substring(commonlength);\n\n // Trim off common suffix (speedup).\n commonlength = diff_commonSuffix(text1, text2);\n const commonsuffix = text1.substring(text1.length - commonlength);\n text1 = text1.substring(0, text1.length - commonlength);\n text2 = text2.substring(0, text2.length - commonlength);\n\n // Compute the diff on the middle block.\n const diffs = diff_compute_(text1, text2);\n\n // Restore the prefix and suffix.\n if (commonprefix) {\n diffs.unshift([DIFF_EQUAL, commonprefix]);\n }\n if (commonsuffix) {\n diffs.push([DIFF_EQUAL, commonsuffix]);\n }\n diff_cleanupMerge(diffs, _fix_unicode);\n return diffs;\n}\n\n\n/**\n * Find the differences between two texts. Assumes that the texts do not\n * have any common prefix or suffix.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @return {Array} Array of diff tuples.\n */\nfunction diff_compute_(text1, text2) {\n let diffs;\n\n if (!text1) {\n // Just add some text (speedup).\n return [[DIFF_INSERT, text2]];\n }\n\n if (!text2) {\n // Just delete some text (speedup).\n return [[DIFF_DELETE, text1]];\n }\n\n const longtext = text1.length > text2.length ? text1 : text2;\n const shorttext = text1.length > text2.length ? text2 : text1;\n const i = longtext.indexOf(shorttext);\n if (i !== -1) {\n // Shorter text is inside the longer text (speedup).\n diffs = [\n [DIFF_INSERT, longtext.substring(0, i)],\n [DIFF_EQUAL, shorttext],\n [DIFF_INSERT, longtext.substring(i + shorttext.length)]\n ];\n // Swap insertions for deletions if diff is reversed.\n if (text1.length > text2.length) {\n diffs[0][0] = diffs[2][0] = DIFF_DELETE;\n }\n return diffs;\n }\n\n if (shorttext.length === 1) {\n // Single character string.\n // After the previous speedup, the character can't be an equality.\n return [[DIFF_DELETE, text1], [DIFF_INSERT, text2]];\n }\n\n // Check to see if the problem can be split in two.\n var hm = diff_halfMatch_(text1, text2);\n if (hm) {\n // A half-match was found, sort out the return data.\n var text1_a = hm[0];\n var text1_b = hm[1];\n var text2_a = hm[2];\n var text2_b = hm[3];\n var mid_common = hm[4];\n // Send both pairs off for separate processing.\n var diffs_a = diff_main(text1_a, text2_a);\n var diffs_b = diff_main(text1_b, text2_b);\n // Merge the results.\n return diffs_a.concat([[DIFF_EQUAL, mid_common]], diffs_b);\n }\n\n return diff_bisect_(text1, text2);\n}\n\n\n/**\n * Find the 'middle snake' of a diff, split the problem in two\n * and return the recursively constructed diff.\n * See Myers 1986 paper: An O(ND) Difference Algorithm and Its Variations.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @return {Array} Array of diff tuples.\n * @private\n */\nfunction diff_bisect_(text1, text2) {\n // Cache the text lengths to prevent multiple calls.\n const text1_length = text1.length;\n const text2_length = text2.length;\n const max_d = Math.ceil((text1_length + text2_length) / 2);\n const v_offset = max_d;\n const v_length = 2 * max_d;\n const v1 = new Array(v_length);\n const v2 = new Array(v_length);\n // Setting all elements to -1 is faster in Chrome & Firefox than mixing\n // integers and undefined.\n for (var x = 0; x < v_length; x++) {\n v1[x] = -1;\n v2[x] = -1;\n }\n v1[v_offset + 1] = 0;\n v2[v_offset + 1] = 0;\n const delta = text1_length - text2_length;\n // If the total number of characters is odd, then the front path will collide\n // with the reverse path.\n const front = (delta % 2 !== 0);\n // Offsets for start and end of k loop.\n // Prevents mapping of space beyond the grid.\n let k1start = 0;\n let k1end = 0;\n let k2start = 0;\n let k2end = 0;\n for (let d = 0; d < max_d; d++) {\n // Walk the front path one step.\n for (let k1 = -d + k1start; k1 <= d - k1end; k1 += 2) {\n const k1_offset = v_offset + k1;\n let x1;\n if (k1 === -d || (k1 !== d && v1[k1_offset - 1] < v1[k1_offset + 1])) {\n x1 = v1[k1_offset + 1];\n } else {\n x1 = v1[k1_offset - 1] + 1;\n }\n let y1 = x1 - k1;\n while (\n x1 < text1_length && y1 < text2_length &&\n text1.charAt(x1) === text2.charAt(y1)\n ) {\n x1++;\n y1++;\n }\n v1[k1_offset] = x1;\n if (x1 > text1_length) {\n // Ran off the right of the graph.\n k1end += 2;\n } else if (y1 > text2_length) {\n // Ran off the bottom of the graph.\n k1start += 2;\n } else if (front) {\n const k2_offset = v_offset + delta - k1;\n if (k2_offset >= 0 && k2_offset < v_length && v2[k2_offset] !== -1) {\n // Mirror x2 onto top-left coordinate system.\n const x2 = text1_length - v2[k2_offset];\n if (x1 >= x2) {\n // Overlap detfrontected.\n return diff_bisectSplit_(text1, text2, x1, y1);\n }\n }\n }\n }\n\n // Walk the reverse path one step.\n for (let k2 = -d + k2start; k2 <= d - k2end; k2 += 2) {\n const k2_offset = v_offset + k2;\n let x2;\n if (k2 === -d || (k2 !== d && v2[k2_offset - 1] < v2[k2_offset + 1])) {\n x2 = v2[k2_offset + 1];\n } else {\n x2 = v2[k2_offset - 1] + 1;\n }\n let y2 = x2 - k2;\n while (\n x2 < text1_length && y2 < text2_length &&\n text1.charAt(text1_length - x2 - 1) === text2.charAt(text2_length - y2 - 1)\n ) {\n x2++;\n y2++;\n }\n v2[k2_offset] = x2;\n if (x2 > text1_length) {\n // Ran off the left of the graph.\n k2end += 2;\n } else if (y2 > text2_length) {\n // Ran off the top of the graph.\n k2start += 2;\n } else if (!front) {\n const k1_offset = v_offset + delta - k2;\n if (k1_offset >= 0 && k1_offset < v_length && v1[k1_offset] !== -1) {\n const x1 = v1[k1_offset];\n const y1 = v_offset + x1 - k1_offset;\n // Mirror x2 onto top-left coordinate system.\n x2 = text1_length - x2;\n if (x1 >= x2) {\n // Overlap detected.\n return diff_bisectSplit_(text1, text2, x1, y1);\n }\n }\n }\n }\n }\n // Diff took too long and hit the deadline or\n // number of diffs equals number of characters, no commonality at all.\n return [[DIFF_DELETE, text1], [DIFF_INSERT, text2]];\n}\n\n\n/**\n * Given the location of the 'middle snake', split the diff in two parts\n * and recurse.\n * @param {string} text1 Old string to be diffed.\n * @param {string} text2 New string to be diffed.\n * @param {number} x Index of split point in text1.\n * @param {number} y Index of split point in text2.\n * @return {Array} Array of diff tuples.\n */\nfunction diff_bisectSplit_(text1, text2, x, y) {\n const text1a = text1.substring(0, x);\n const text2a = text2.substring(0, y);\n const text1b = text1.substring(x);\n const text2b = text2.substring(y);\n\n // Compute both diffs serially.\n const diffs = diff_main(text1a, text2a);\n const diffsb = diff_main(text1b, text2b);\n\n return diffs.concat(diffsb);\n}\n\n\n/**\n * Determine the common prefix of two strings.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {number} The number of characters common to the start of each\n * string.\n */\nfunction diff_commonPrefix(text1, text2) {\n // Quick check for common null cases.\n if (!text1 || !text2 || text1.charAt(0) !== text2.charAt(0)) {\n return 0;\n }\n // Binary search.\n // Performance analysis: http://neil.fraser.name/news/2007/10/09/\n let pointermin = 0;\n let pointermax = Math.min(text1.length, text2.length);\n let pointermid = pointermax;\n let pointerstart = 0;\n while (pointermin < pointermid) {\n if (\n text1.substring(pointerstart, pointermid) ==\n text2.substring(pointerstart, pointermid)\n ) {\n pointermin = pointermid;\n pointerstart = pointermin;\n } else {\n pointermax = pointermid;\n }\n pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin);\n }\n\n if (is_surrogate_pair_start(text1.charCodeAt(pointermid - 1))) {\n pointermid--;\n }\n\n return pointermid;\n}\n\n\n/**\n * Determine the common suffix of two strings.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {number} The number of characters common to the end of each string.\n */\nfunction diff_commonSuffix(text1, text2) {\n // Quick check for common null cases.\n if (!text1 || !text2 || text1.slice(-1) !== text2.slice(-1)) {\n return 0;\n }\n // Binary search.\n // Performance analysis: http://neil.fraser.name/news/2007/10/09/\n let pointermin = 0;\n let pointermax = Math.min(text1.length, text2.length);\n let pointermid = pointermax;\n let pointerend = 0;\n while (pointermin < pointermid) {\n if (\n text1.substring(text1.length - pointermid, text1.length - pointerend) ==\n text2.substring(text2.length - pointermid, text2.length - pointerend)\n ) {\n pointermin = pointermid;\n pointerend = pointermin;\n } else {\n pointermax = pointermid;\n }\n pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin);\n }\n\n if (is_surrogate_pair_end(text1.charCodeAt(text1.length - pointermid))) {\n pointermid--;\n }\n\n return pointermid;\n}\n\n\n/**\n * Do the two texts share a substring which is at least half the length of the\n * longer text?\n * This speedup can produce non-minimal diffs.\n * @param {string} text1 First string.\n * @param {string} text2 Second string.\n * @return {Array.} Five element Array, containing the prefix of\n * text1, the suffix of text1, the prefix of text2, the suffix of\n * text2 and the common middle. Or null if there was no match.\n */\nfunction diff_halfMatch_(text1, text2) {\n const longtext = text1.length > text2.length ? text1 : text2;\n const shorttext = text1.length > text2.length ? text2 : text1;\n if (longtext.length < 4 || shorttext.length * 2 < longtext.length) {\n return null; // Pointless.\n }\n\n /**\n * Does a substring of shorttext exist within longtext such that the substring\n * is at least half the length of longtext?\n * Closure, but does not reference any external variables.\n * @param {string} longtext Longer string.\n * @param {string} shorttext Shorter string.\n * @param {number} i Start index of quarter length substring within longtext.\n * @return {Array.} Five element Array, containing the prefix of\n * longtext, the suffix of longtext, the prefix of shorttext, the suffix\n * of shorttext and the common middle. Or null if there was no match.\n * @private\n */\n function diff_halfMatchI_(longtext, shorttext, i) {\n // Start with a 1/4 length substring at position i as a seed.\n const seed = longtext.substring(i, i + Math.floor(longtext.length / 4));\n let j = -1;\n let best_common = '';\n let best_longtext_a, best_longtext_b, best_shorttext_a, best_shorttext_b;\n while ((j = shorttext.indexOf(seed, j + 1)) !== -1) {\n const prefixLength = diff_commonPrefix(\n longtext.substring(i), shorttext.substring(j));\n const suffixLength = diff_commonSuffix(\n longtext.substring(0, i), shorttext.substring(0, j));\n if (best_common.length < suffixLength + prefixLength) {\n best_common = shorttext.substring(\n j - suffixLength, j) + shorttext.substring(j, j + prefixLength);\n best_longtext_a = longtext.substring(0, i - suffixLength);\n best_longtext_b = longtext.substring(i + prefixLength);\n best_shorttext_a = shorttext.substring(0, j - suffixLength);\n best_shorttext_b = shorttext.substring(j + prefixLength);\n }\n }\n if (best_common.length * 2 >= longtext.length) {\n return [\n best_longtext_a, best_longtext_b,\n best_shorttext_a, best_shorttext_b, best_common\n ];\n } else {\n return null;\n }\n }\n\n // First check if the second quarter is the seed for a half-match.\n const hm1 = diff_halfMatchI_(longtext, shorttext, Math.ceil(longtext.length / 4));\n // Check again based on the third quarter.\n const hm2 = diff_halfMatchI_(longtext, shorttext, Math.ceil(longtext.length / 2));\n let hm;\n if (!hm1 && !hm2) {\n return null;\n } else if (!hm2) {\n hm = hm1;\n } else if (!hm1) {\n hm = hm2;\n } else {\n // Both matched. Select the longest.\n hm = hm1[4].length > hm2[4].length ? hm1 : hm2;\n }\n\n // A half-match was found, sort out the return data.\n let text1_a, text1_b, text2_a, text2_b;\n if (text1.length > text2.length) {\n text1_a = hm[0];\n text1_b = hm[1];\n text2_a = hm[2];\n text2_b = hm[3];\n } else {\n text2_a = hm[0];\n text2_b = hm[1];\n text1_a = hm[2];\n text1_b = hm[3];\n }\n const mid_common = hm[4];\n return [text1_a, text1_b, text2_a, text2_b, mid_common];\n}\n\n\n/**\n * Reorder and merge like edit sections. Merge equalities.\n * Any edit section can move as long as it doesn't cross an equality.\n * @param {Array} diffs Array of diff tuples.\n * @param {boolean} fix_unicode Whether to normalize to a unicode-correct diff\n */\nfunction diff_cleanupMerge(diffs, fix_unicode) {\n diffs.push([DIFF_EQUAL, '']); // Add a dummy entry at the end.\n let pointer = 0;\n let count_delete = 0;\n let count_insert = 0;\n let text_delete = '';\n let text_insert = '';\n let commonlength;\n let previous_equality;\n while (pointer < diffs.length) {\n if (pointer < diffs.length - 1 && !diffs[pointer][1]) {\n diffs.splice(pointer, 1);\n continue;\n }\n switch (diffs[pointer][0]) {\n case DIFF_INSERT:\n count_insert++;\n text_insert += diffs[pointer][1];\n pointer++;\n break;\n case DIFF_DELETE:\n count_delete++;\n text_delete += diffs[pointer][1];\n pointer++;\n break;\n case DIFF_EQUAL:\n previous_equality = pointer - count_insert - count_delete - 1;\n if (fix_unicode) {\n // prevent splitting of unicode surrogate pairs. when fix_unicode is true,\n // we assume that the old and new text in the diff are complete and correct\n // unicode-encoded JS strings, but the tuple boundaries may fall between\n // surrogate pairs. we fix this by shaving off stray surrogates from the end\n // of the previous equality and the beginning of this equality. this may create\n // empty equalities or a common prefix or suffix. for example, if AB and AC are\n // emojis, `[[0, 'A'], [-1, 'BA'], [0, 'C']]` would turn into deleting 'ABAC' and\n // inserting 'AC', and then the common suffix 'AC' will be eliminated. in this\n // particular case, both equalities go away, we absorb any previous inequalities,\n // and we keep scanning for the next equality before rewriting the tuples.\n if (previous_equality >= 0 && ends_with_pair_start(diffs[previous_equality][1])) {\n const stray = diffs[previous_equality][1].slice(-1);\n diffs[previous_equality][1] = diffs[previous_equality][1].slice(0, -1);\n text_delete = stray + text_delete;\n text_insert = stray + text_insert;\n if (!diffs[previous_equality][1]) {\n // emptied out previous equality, so delete it and include previous delete/insert\n diffs.splice(previous_equality, 1);\n pointer--;\n var k = previous_equality - 1;\n if (diffs[k] && diffs[k][0] === DIFF_INSERT) {\n count_insert++;\n text_insert = diffs[k][1] + text_insert;\n k--;\n }\n if (diffs[k] && diffs[k][0] === DIFF_DELETE) {\n count_delete++;\n text_delete = diffs[k][1] + text_delete;\n k--;\n }\n previous_equality = k;\n }\n }\n if (starts_with_pair_end(diffs[pointer][1])) {\n const stray = diffs[pointer][1].charAt(0);\n diffs[pointer][1] = diffs[pointer][1].slice(1);\n text_delete += stray;\n text_insert += stray;\n }\n }\n if (pointer < diffs.length - 1 && !diffs[pointer][1]) {\n // for empty equality not at end, wait for next equality\n diffs.splice(pointer, 1);\n break;\n }\n if (text_delete.length > 0 || text_insert.length > 0) {\n // note that diff_commonPrefix and diff_commonSuffix are unicode-aware\n if (text_delete.length > 0 && text_insert.length > 0) {\n // Factor out any common prefixes.\n commonlength = diff_commonPrefix(text_insert, text_delete);\n if (commonlength !== 0) {\n if (previous_equality >= 0) {\n diffs[previous_equality][1] += text_insert.substring(0, commonlength);\n } else {\n diffs.splice(0, 0, [DIFF_EQUAL, text_insert.substring(0, commonlength)]);\n pointer++;\n }\n text_insert = text_insert.substring(commonlength);\n text_delete = text_delete.substring(commonlength);\n }\n // Factor out any common suffixes.\n commonlength = diff_commonSuffix(text_insert, text_delete);\n if (commonlength !== 0) {\n diffs[pointer][1] =\n text_insert.substring(text_insert.length - commonlength) + diffs[pointer][1];\n text_insert = text_insert.substring(0, text_insert.length - commonlength);\n text_delete = text_delete.substring(0, text_delete.length - commonlength);\n }\n }\n // Delete the offending records and add the merged ones.\n const n = count_insert + count_delete;\n if (text_delete.length === 0 && text_insert.length === 0) {\n diffs.splice(pointer - n, n);\n pointer = pointer - n;\n } else if (text_delete.length === 0) {\n diffs.splice(pointer - n, n, [DIFF_INSERT, text_insert]);\n pointer = pointer - n + 1;\n } else if (text_insert.length === 0) {\n diffs.splice(pointer - n, n, [DIFF_DELETE, text_delete]);\n pointer = pointer - n + 1;\n } else {\n diffs.splice(pointer - n, n, [DIFF_DELETE, text_delete], [DIFF_INSERT, text_insert]);\n pointer = pointer - n + 2;\n }\n }\n if (pointer !== 0 && diffs[pointer - 1][0] === DIFF_EQUAL) {\n // Merge this equality with the previous one.\n diffs[pointer - 1][1] += diffs[pointer][1];\n diffs.splice(pointer, 1);\n } else {\n pointer++;\n }\n count_insert = 0;\n count_delete = 0;\n text_delete = '';\n text_insert = '';\n break;\n }\n }\n if (diffs[diffs.length - 1][1] === '') {\n diffs.pop(); // Remove the dummy entry at the end.\n }\n\n // Second pass: look for single edits surrounded on both sides by equalities\n // which can be shifted sideways to eliminate an equality.\n // e.g: ABAC -> ABAC\n let changes = false;\n pointer = 1;\n // Intentionally ignore the first and last element (don't need checking).\n while (pointer < diffs.length - 1) {\n if (diffs[pointer - 1][0] === DIFF_EQUAL &&\n diffs[pointer + 1][0] === DIFF_EQUAL) {\n // This is a single edit surrounded by equalities.\n if (diffs[pointer][1].substring(diffs[pointer][1].length -\n diffs[pointer - 1][1].length) === diffs[pointer - 1][1]) {\n // Shift the edit over the previous equality.\n diffs[pointer][1] = diffs[pointer - 1][1] +\n diffs[pointer][1].substring(0, diffs[pointer][1].length -\n diffs[pointer - 1][1].length);\n diffs[pointer + 1][1] = diffs[pointer - 1][1] + diffs[pointer + 1][1];\n diffs.splice(pointer - 1, 1);\n changes = true;\n } else if (diffs[pointer][1].substring(0, diffs[pointer + 1][1].length) ==\n diffs[pointer + 1][1]) {\n // Shift the edit over the next equality.\n diffs[pointer - 1][1] += diffs[pointer + 1][1];\n diffs[pointer][1] =\n diffs[pointer][1].substring(diffs[pointer + 1][1].length) +\n diffs[pointer + 1][1];\n diffs.splice(pointer + 1, 1);\n changes = true;\n }\n }\n pointer++;\n }\n // If shifts were made, the diff needs reordering and another shift sweep.\n if (changes) {\n diff_cleanupMerge(diffs, fix_unicode);\n }\n}\n\nfunction is_surrogate_pair_start(charCode) {\n return charCode >= 0xD800 && charCode <= 0xDBFF;\n}\n\nfunction is_surrogate_pair_end(charCode) {\n return charCode >= 0xDC00 && charCode <= 0xDFFF;\n}\n\nfunction starts_with_pair_end(str) {\n return is_surrogate_pair_end(str.charCodeAt(0));\n}\n\nfunction ends_with_pair_start(str) {\n return is_surrogate_pair_start(str.charCodeAt(str.length - 1));\n}\n\nfunction remove_empty_tuples(tuples) {\n const ret = [];\n for (let i = 0; i < tuples.length; i++) {\n if (tuples[i][1].length > 0) {\n ret.push(tuples[i]);\n }\n }\n return ret;\n}\n\nfunction make_edit_splice(before, oldMiddle, newMiddle, after) {\n if (ends_with_pair_start(before) || starts_with_pair_end(after)) {\n return null;\n }\n return remove_empty_tuples([\n [DIFF_EQUAL, before],\n [DIFF_DELETE, oldMiddle],\n [DIFF_INSERT, newMiddle],\n [DIFF_EQUAL, after]\n ]);\n}\n\nfunction find_cursor_edit_diff(oldText, newText, cursor_pos) {\n // note: this runs after equality check has ruled out exact equality\n const oldRange = typeof cursor_pos === 'number' ?\n { index: cursor_pos, length: 0 } : cursor_pos.oldRange;\n const newRange = typeof cursor_pos === 'number' ?\n null : cursor_pos.newRange;\n // take into account the old and new selection to generate the best diff\n // possible for a text edit. for example, a text change from \"xxx\" to \"xx\"\n // could be a delete or forwards-delete of any one of the x's, or the\n // result of selecting two of the x's and typing \"x\".\n const oldLength = oldText.length;\n const newLength = newText.length;\n if (oldRange.length === 0 && (newRange === null || newRange.length === 0)) {\n // see if we have an insert or delete before or after cursor\n const oldCursor = oldRange.index;\n const oldBefore = oldText.slice(0, oldCursor);\n const oldAfter = oldText.slice(oldCursor);\n const maybeNewCursor = newRange ? newRange.index : null;\n editBefore: {\n // is this an insert or delete right before oldCursor?\n const newCursor = oldCursor + newLength - oldLength;\n if (maybeNewCursor !== null && maybeNewCursor !== newCursor) {\n break editBefore;\n }\n if (newCursor < 0 || newCursor > newLength) {\n break editBefore;\n }\n const newBefore = newText.slice(0, newCursor);\n const newAfter = newText.slice(newCursor);\n if (newAfter !== oldAfter) {\n break editBefore;\n }\n const prefixLength = Math.min(oldCursor, newCursor);\n const oldPrefix = oldBefore.slice(0, prefixLength);\n const newPrefix = newBefore.slice(0, prefixLength);\n if (oldPrefix !== newPrefix) {\n break editBefore;\n }\n const oldMiddle = oldBefore.slice(prefixLength);\n const newMiddle = newBefore.slice(prefixLength);\n return make_edit_splice(oldPrefix, oldMiddle, newMiddle, oldAfter);\n }\n editAfter: {\n // is this an insert or delete right after oldCursor?\n if (maybeNewCursor !== null && maybeNewCursor !== oldCursor) {\n break editAfter;\n }\n const cursor = oldCursor;\n const newBefore = newText.slice(0, cursor);\n const newAfter = newText.slice(cursor);\n if (newBefore !== oldBefore) {\n break editAfter;\n }\n const suffixLength = Math.min(oldLength - cursor, newLength - cursor);\n const oldSuffix = oldAfter.slice(oldAfter.length - suffixLength);\n const newSuffix = newAfter.slice(newAfter.length - suffixLength);\n if (oldSuffix !== newSuffix) {\n break editAfter;\n }\n const oldMiddle = oldAfter.slice(0, oldAfter.length - suffixLength);\n const newMiddle = newAfter.slice(0, newAfter.length - suffixLength);\n return make_edit_splice(oldBefore, oldMiddle, newMiddle, oldSuffix);\n }\n }\n if (oldRange.length > 0 && newRange && newRange.length === 0) {\n replaceRange: {\n // see if diff could be a splice of the old selection range\n const oldPrefix = oldText.slice(0, oldRange.index);\n const oldSuffix = oldText.slice(oldRange.index + oldRange.length);\n const prefixLength = oldPrefix.length;\n const suffixLength = oldSuffix.length;\n if (newLength < prefixLength + suffixLength) {\n break replaceRange;\n }\n const newPrefix = newText.slice(0, prefixLength);\n const newSuffix = newText.slice(newLength - suffixLength);\n if (oldPrefix !== newPrefix || oldSuffix !== newSuffix) {\n break replaceRange;\n }\n const oldMiddle = oldText.slice(prefixLength, oldLength - suffixLength);\n const newMiddle = newText.slice(prefixLength, newLength - suffixLength);\n return make_edit_splice(oldPrefix, oldMiddle, newMiddle, oldSuffix);\n }\n }\n\n return null;\n}\n\nfunction diff(text1, text2, cursor_pos) {\n // only pass fix_unicode=true at the top level, not when diff_main is\n // recursively invoked\n return diff_main(text1, text2, cursor_pos, true);\n}\n\ndiff.INSERT = DIFF_INSERT;\ndiff.DELETE = DIFF_DELETE;\ndiff.EQUAL = DIFF_EQUAL;\n\nexport default diff;\n","import { DOMConsole } from \"../io/domConsole\";\nimport { getInstance } from \"../services/localizedStringsService\";\n\nconst LocalizedStrings = getInstance();\n\nexport class TestConsole {\n\n\n constructor (inputList) {\n this.index = 0;\n this.inputList = inputList;\n this.list = [];\n }\n\n write (text) {\n this._appendText(text, DOMConsole.USER);\n }\n\n info (text) {\n this._appendText(text, DOMConsole.INFO);\n }\n\n err (text) {\n this._appendText(text, DOMConsole.ERR);\n }\n\n _appendText (text) {\n this.list.push(text);\n }\n\n\n getClassForType (type) {\n switch (type) {\n case DOMConsole.USER:\n return \"ivprog-term-userText\";\n case DOMConsole.INFO:\n return \"ivprog-term-info\";\n case DOMConsole.ERR:\n return \"ivprog-term-error\";\n }\n }\n\n requestInput (callback) {\n if(this.index < this.inputList.length) { \n callback(this.inputList[this.index]);\n this.index++;\n } else {\n throw new Error(LocalizedStrings.getError(\"exceeded_input_request\"));\n }\n }\n\n sendOutput (text) {\n const output = \"\"+text;\n output.split(\"\\n\").forEach(t => {\n t = t.replace(/\\t/g,' ');\n this.write(t)\n });\n }\n}","import { LanguageService } from \"./../services/languageService\";\nimport { LocalizedStrings } from \"./../services/localizedStringsService\";\nimport { Operators } from \"./../ast/operators\";\n\n/** \n * source: https://pawelgrzybek.com/page-scroll-in-vanilla-javascript/ \n * \n*/\nexport function scrollIt (destination, duration = 200, easing = 'linear', callback = null) {\n\n const easings = {\n linear(t) {\n return t;\n },\n easeInQuad(t) {\n return t * t;\n },\n easeOutQuad(t) {\n return t * (2 - t);\n },\n easeInOutQuad(t) {\n return t < 0.5 ? 2 * t * t : -1 + (4 - 2 * t) * t;\n },\n easeInCubic(t) {\n return t * t * t;\n },\n easeOutCubic(t) {\n return (--t) * t * t + 1;\n },\n easeInOutCubic(t) {\n return t < 0.5 ? 4 * t * t * t : (t - 1) * (2 * t - 2) * (2 * t - 2) + 1;\n },\n easeInQuart(t) {\n return t * t * t * t;\n },\n easeOutQuart(t) {\n return 1 - (--t) * t * t * t;\n },\n easeInOutQuart(t) {\n return t < 0.5 ? 8 * t * t * t * t : 1 - 8 * (--t) * t * t * t;\n },\n easeInQuint(t) {\n return t * t * t * t * t;\n },\n easeOutQuint(t) {\n return 1 + (--t) * t * t * t * t;\n },\n easeInOutQuint(t) {\n return t < 0.5 ? 16 * t * t * t * t * t : 1 + 16 * (--t) * t * t * t * t;\n }\n };\n\n const start = window.pageYOffset;\n const startTime = 'now' in window.performance ? performance.now() : new Date().getTime();\n\n const documentHeight = Math.max(document.body.scrollHeight, document.body.offsetHeight, document.documentElement.clientHeight, document.documentElement.scrollHeight, document.documentElement.offsetHeight);\n const windowHeight = window.innerHeight || document.documentElement.clientHeight || document.getElementsByTagName('body')[0].clientHeight;\n const destinationOffset = typeof destination === 'number' ? destination : destination.offsetTop;\n const destinationOffsetToScroll = Math.round(documentHeight - destinationOffset < windowHeight ? documentHeight - windowHeight : destinationOffset);\n\n if ('requestAnimationFrame' in window === false) {\n window.scroll(0, destinationOffsetToScroll);\n if (callback) {\n callback();\n }\n return;\n }\n\n function scroll() {\n const now = 'now' in window.performance ? performance.now() : new Date().getTime();\n const time = Math.min(1, ((now - startTime) / duration));\n const timeFunction = easings[easing](time);\n window.scroll(0, Math.ceil((timeFunction * (destinationOffsetToScroll - start)) + start));\n\n if (window.pageYOffset === destinationOffsetToScroll) {\n if (callback) {\n callback();\n }\n return;\n }\n\n requestAnimationFrame(scroll);\n }\n\n scroll();\n}\n\n/**\n * \n * source: https://stackoverflow.com/a/16270434\n */\nexport function isElementInViewport (el) {\n const rect = el.getBoundingClientRect();\n\n return rect.bottom > 0 &&\n rect.right > 0 &&\n rect.left < (window.innerWidth || document.documentElement.clientWidth) &&\n rect.top < (window.innerHeight || document.documentElement.clientHeight);\n}\n\nlet cacheMainList = null;\nlet cacheOp = null;\n\nfunction fillCache () {\n if(cacheMainList == null) {\n cacheMainList = [];\n const mainList = [\"RK_PROGRAM\",\"RK_REAL\",\"RK_VOID\",\"RK_BOOLEAN\",\"RK_STRING\",\n \"RK_INTEGER\",\"RK_CHARACTER\",\"RK_SWITCH\",\"RK_CASE\",\"RK_DEFAULT\",\"RK_CONST\",\n \"RK_FUNCTION\",\"RK_RETURN\",\"RK_FOR\",\"RK_BREAK\",\"RK_DO\",\"RK_WHILE\",\"RK_IF\",\n \"RK_ELSE\",\"RK_FALSE\",\"RK_TRUE\"];\n const lexerClass = LanguageService.getCurrentLexer();\n const nullLexer = new lexerClass();\n for (let key = 0; key < mainList.length; ++key) {\n const word = mainList[key];\n const keyword = nullLexer.literalNames[lexerClass[word]];\n cacheMainList.push(keyword.substring(1, keyword.length-1));\n }\n }\n if(cacheOp == null) {\n cacheOp = []\n const logicOpList = [Operators.AND.value, Operators.OR.value, Operators.NOT.value];\n for (let op = 0; op < logicOpList.length; ++op) {\n const lOp = `logic_operator_${logicOpList[op]}`;\n cacheOp.push(LocalizedStrings.getUI(lOp))\n }\n }\n}\n\nexport function isKeyword (text) {\n fillCache();\n for (let key = 0; key < cacheMainList.length; ++key) {\n const keyword = cacheMainList[key];\n if(keyword == text) {\n return true;\n }\n }\n // not in main list, check op\n for (let op = 0; op < cacheOp.length; op++) {\n const lOp = cacheOp[op];\n if(lOp == text) {\n return true;\n }\n }\n return false;\n}\n\nexport function isValidIdentifier (identifier_str) {\n const validRegex = /^[a-zA-Z_][a-zA-Z0-9_]*$/.test(identifier_str);\n if(!validRegex) {\n return false;\n }\n\treturn !isKeyword(identifier_str);\n}\n\nexport function getCodeEditorModeConfig () {\n const blockList = [\"RK_SWITCH\", \"RK_PROGRAM\",\"RK_CASE\",\"RK_DEFAULT\",\"RK_FOR\",\"RK_FOR_ALT\",\n \"RK_FUNCTION\",\"RK_DO\",\"RK_WHILE\",\"RK_WHILE_ALT\",\"RK_IF\",\"RK_ELSE\"]\n const keywordsList = [\"RK_CONST\",\"RK_RETURN\",\"RK_BREAK\",\"RK_FOR_FROM\",\"RK_FOR_TO\",\"RK_FOR_PASS\",\"RK_DO_UNTIL\"];\n const typeList = [\"RK_REAL\",\"RK_VOID\",\"RK_BOOLEAN\",\"RK_STRING\",\"RK_INTEGER\"];\n const atomList = [\"RK_FALSE\", \"RK_TRUE\"];\n\n const case_default = [];\n const blocks = [];\n const keywords = [];\n const types = [];\n const atoms = []\n let switchString = \"\";\n\n cacheMainList = [];\n const lexerClass = LanguageService.getCurrentLexer();\n const nullLexer = new lexerClass();\n blockList.forEach( v => {\n const keyword = nullLexer.literalNames[lexerClass[v]];\n const value = keyword.substring(1, keyword.length-1);\n cacheMainList.push(value);\n keywords.push(value);\n blocks.push(value);\n if(v == \"RK_SWITCH\") {\n switchString = value;\n } else if (v == \"RK_CASE\" || v == \"RK_DEFAULT\") {\n case_default.push(value);\n }\n });\n keywordsList.forEach( v => {\n const keyword = nullLexer.literalNames[lexerClass[v]];\n const value = keyword.substring(1, keyword.length-1);\n cacheMainList.push(value);\n keywords.push(value);\n });\n typeList.forEach(v => {\n const keyword = nullLexer.literalNames[lexerClass[v]];\n const value = keyword.substring(1, keyword.length-1);\n cacheMainList.push(value);\n types.push(value);\n })\n atomList.forEach( v => {\n const keyword = nullLexer.literalNames[lexerClass[v]];\n const value = keyword.substring(1, keyword.length-1);\n cacheMainList.push(value);\n atoms.push(value);\n })\n \n cacheOp = []\n const logicOpList = [Operators.AND.value, Operators.OR.value, Operators.NOT.value];\n for (let op = 0; op < logicOpList.length; ++op) {\n const lOp = `logic_operator_${logicOpList[op]}`;\n const value = LocalizedStrings.getUI(lOp);\n cacheOp.push(value)\n keywords.push(value);\n }\n return {\n case_default: case_default,\n atoms: atoms,\n keywords: keywords,\n switchString: switchString,\n types: types,\n blocks: blocks\n }\n}\n\n/**\n * Source: https://gist.github.com/andrei-m/982927\n * @param {string} a \n * @param {string} b \n */\nexport function levenshteinDistance (a, b) {\n if(a.length == 0) return b.length; \n if(b.length == 0) return a.length; \n\n const matrix = [];\n\n // increment along the first column of each row\n let i;\n for(i = 0; i <= b.length; i++){\n matrix[i] = [i];\n }\n\n // increment each column in the first row\n let j;\n for(j = 0; j <= a.length; j++){\n matrix[0][j] = j;\n }\n\n // Fill in the rest of the matrix\n for(i = 1; i <= b.length; i++){\n for(j = 1; j <= a.length; j++){\n if(b.charCodeAt(i-1) == a.charCodeAt(j-1)){\n matrix[i][j] = matrix[i-1][j-1];\n } else {\n matrix[i][j] = Math.min(matrix[i-1][j-1] + 1, // substitution\n Math.min(matrix[i][j-1] + 1, // insertion\n matrix[i-1][j] + 1)); // deletion\n }\n }\n }\n return matrix[b.length][a.length];\n}\n\nlet win = null\nexport function openAssessmentDetail (event) {\n event.preventDefault();\n const page_code = event.currentTarget.dataset.page;\n if(win != null) {\n win.close()\n }\n win = window.open(\"\", \"DetailWindow\", \"width=550,height=600\");\n win.document.open();\n win.document.write(page_code);\n win.document.close();\n}\n\nexport function range (size, startAt = 0) {\n return [...Array(size).keys()].map(i => i + startAt);\n}\n","import * as GlobalsManagement from './globals';\nimport * as FunctionsManagement from './functions';\n\nwindow.block_render = false;\n\nexport function renderAlgorithm () {\n\tif (window.block_render) {\n\t\treturn;\n\t}\n\tif (window.draging) {\n\t\treturn;\n\t}\n\twindow.block_render = true;\n\tconsole.log('rendering algorithm');\n\n \t$('.all_functions').children().off();\n\t$('.all_functions').empty();\n\n\t$('.list_globals').children().off();\n\t$('.list_globals').empty();\t\n\n\tfor (var i = 0; i < window.program_obj.functions.length; i++) {\n\t\tFunctionsManagement.renderFunction(window.program_obj.functions[i]);\n\t}\n\n\tfor (var i = 0; i < window.program_obj.globals.length; i++) {\n\t\tGlobalsManagement.renderGlobal(window.program_obj.globals[i]);\n\t}\t\n\n\tsetTimeout(function(){ window.block_render = false; }, 100);\n\tconsole.log('fim do render');\n\n\tif (settingsFilter && settingsFilter[0]) {\n blockAllEditingOptions();\n } \n}","import { Types } from './types';\nimport * as Models from './ivprog_elements';\nimport { LocalizedStrings } from './../services/localizedStringsService';\nimport * as Utils from './utils';\n\nexport function generate () {\n\n\t$('.ivprog_visual_panel').find('.error_icon').remove();\n\n\tvar code = LocalizedStrings.getUI('program') + ' { ';\n\n\tcode += globalsCode();\n\n\tcode += '\\n';\n\n\tvar has_error = false;\n\n\tfor (var i = 0; i < window.program_obj.functions.length; i ++) {\n\t\tvar n_code = functionsCode(window.program_obj.functions[i]);\n\t\tif (n_code == null) {\n\t\t\thas_error = true;\n\t\t}\n\t\tcode += n_code;\n\t\tcode += '\\n';\n\n\t}\n\n\tcode += '\\n}';\n\n\tif (has_error) {\n\t\treturn null;\n\t} else {\n\t\treturn code;\n\t}\n}\n\nfunction functionsCode (function_obj) {\n\tvar ret = '\\n\\t' + LocalizedStrings.getUI('function') + ' ';\n\n\tvar has_error = false;\n\n\tswitch (function_obj.return_type) {\n\t\tcase Types.INTEGER:\n\t\t\tret += LocalizedStrings.getUI('type_integer');\n\t\t\tbreak;\n\t\tcase Types.REAL:\n\t\t\tret += LocalizedStrings.getUI('type_real');\n\t\t\tbreak;\n\t\tcase Types.TEXT:\n\t\t\tret += LocalizedStrings.getUI('type_text');\n\t\t\tbreak;\n\t\tcase Types.BOOLEAN:\n\t\t\tret += LocalizedStrings.getUI('type_boolean');\n\t\t\tbreak;\n\t\tcase Types.VOID:\n\t\t\tret += LocalizedStrings.getUI('type_void');\n\t\t\tbreak;\n\t}\n\tret += ' ';\n\n\tif (function_obj.return_dimensions == 1) {\n\t\tret += '[] '\n\t} else if (function_obj.return_dimensions == 2) {\n\t\tret += '[][] '\n\t}\n\n\tret += function_obj.name + ' ( ';\n\n\tfor (var j = 0; j < function_obj.parameters_list.length; j++) {\n\t\tret += parametersCode(function_obj.parameters_list[j]);\n\t\tif ((j + 1) < function_obj.parameters_list.length) {\n\t\t\tret += ', ';\n\t\t}\n\t}\n\n\tret += ' ) {';\n\n\tfor (var j = 0; j < function_obj.variables_list.length; j++) {\n\t\tret += variablesCode(function_obj.variables_list[j]);\n\t}\n\n\tfor (var j = 0; j < function_obj.commands.length; j++) {\n\t\t//try {\n\t\t\tret += commandsCode(function_obj.commands[j]);\n\t\t/*} catch (err) {\n\n\t\t\thas_error = true;\n\n\t\t\tconsole.error(err.message);\n\n\t\t\tvar todos = $('body').find('.command_container');\n\n\t\t\tfor (var i = 0; i < todos.length; i++) {\n\t\t\t\tif ($(todos[i]).data('command') == function_obj.commands[j]) {\n\t\t\t\t\t$( todos[i] ).prepend( ' ' );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}*/\n\t\t\n\t}\n\n\tret += '\\n\\t}';\n\n\tif (has_error) {\n\t\treturn null;\n\t} else {\n\t\treturn ret;\n\t}\n}\n\nfunction commandsCode (command_obj, indentation = 2) {\n\tswitch (command_obj.type) {\n\t\tcase Models.COMMAND_TYPES.break:\n\t\t\treturn breaksCode(command_obj, indentation);\n\n\t\tcase Models.COMMAND_TYPES.comment:\n\t\t\treturn commentsCode(command_obj, indentation);\n\n\t\tcase Models.COMMAND_TYPES.reader:\n\t\t\treturn readersCode(command_obj, indentation);\n\n\t\tcase Models.COMMAND_TYPES.writer:\n\t\t\treturn writersCode(command_obj, indentation);\n\n\t\tcase Models.COMMAND_TYPES.functioncall:\n\t\t\treturn functioncallsCode(command_obj, indentation);\n\n\t\tcase Models.COMMAND_TYPES.attribution:\n\t\t\treturn attributionsCode(command_obj, indentation);\n\n\t\tcase Models.COMMAND_TYPES.whiletrue:\n\t\t\treturn whiletruesCode(command_obj, indentation);\n\n\t\tcase Models.COMMAND_TYPES.dowhiletrue:\n\t\t\treturn doWhilesCode(command_obj, indentation);\n\n\t\tcase Models.COMMAND_TYPES.iftrue:\n\t\t\treturn iftruesCode(command_obj, indentation);\n\n\t\tcase Models.COMMAND_TYPES.repeatNtimes:\n\t\t\treturn repeatNtimesCode(command_obj, indentation);\n\n\t\tcase Models.COMMAND_TYPES.switch:\n\t\t\treturn switchsCode(command_obj, indentation);\n\n\t\tcase Models.COMMAND_TYPES.return:\n\t\t\treturn returnsCode(command_obj, indentation);\n\t}\n}\n\nfunction returnsCode (command_obj, indentation) {\n\tvar ret = '\\n';\n\n\tfor (var i = 0; i < indentation; i++) {\n\t\tret += '\\t';\n\t}\n\n\tret += LocalizedStrings.getUI('text_return');\n\n\tif (command_obj.variable_value_menu) {\n\t\ttry {\n\t\t\tret += ' ' + elementExpressionCode(command_obj.variable_value_menu);\n\t\t\t//ret += ' ' + variableValueMenuCode(command_obj.variable_value_menu, true);\n\t\t} catch(err) {}\n\t}\n\n\treturn ret;\n}\n\nfunction breaksCode (command_obj, indentation) {\n\tvar ret = '\\n';\n\n\tfor (var i = 0; i < indentation; i++) {\n\t\tret += '\\t';\n\t}\n\n\tret += LocalizedStrings.getUI('text_break');\n\n\treturn ret;\n}\n\nfunction switchsCode (command_obj, indentation) {\n\tvar ret = '\\n';\n\n\tfor (var i = 0; i < indentation; i++) {\n\t\tret += '\\t';\n\t}\n\n\tret += LocalizedStrings.getUI('text_code_switch') + ' ( ';\n\n\tret += variableValueMenuCode(command_obj.variable);\n\n\tret += ' ) { ';\n\n\tif (command_obj.cases) {\n\t\tfor (var i = 0; i < command_obj.cases.length; i++) {\n\t\t\tret += switchcasesCode(command_obj.cases[i], (indentation + 1));\n\t\t}\n\t}\n\n\tret += '\\n';\n\tfor (var i = 0; i < indentation; i++) {\n\t\tret += '\\t';\n\t}\n\tret += '} ';\n\n\treturn ret;\n}\n\nfunction switchcasesCode (switchcase, indentation) {\n\tvar ret = '\\n';\n\n\tfor (var i = 0; i < indentation; i++) {\n\t\tret += '\\t';\n\t}\n\n\tret += LocalizedStrings.getUI('text_code_case') + ' ';\n\tret += variableValueMenuCode(switchcase.variable_value_menu);\n\tret += ' :';\n\n\tif (switchcase.commands_block) {\n\t\tfor (var i = 0; i < switchcase.commands_block.length; i++) {\n\t\t\tret += commandsCode(switchcase.commands_block[i], (indentation + 1));\n\t\t}\n\t}\n\n\treturn ret;\n\n}\n\nfunction repeatNtimesCode (command_obj, indentation) {\n\tvar ret = '\\n';\n\n\tfor (var i = 0; i < indentation; i++) {\n\t\tret += '\\t';\n\t}\n\n\tret += LocalizedStrings.getUI('text_for') + ' ';\n\n\tif (command_obj.var_attribution) {\n\t\tret += variableValueMenuCode(command_obj.var_attribution);\n\t\tret += ` ${LocalizedStrings.getUI('text_code_for_from')} `;\n\t\tret += variableValueMenuCode(command_obj.expression1);\n\t}\n\n\tif (command_obj.expression2) {\n\t\tret += ` ${LocalizedStrings.getUI('text_code_for_to')} `;\n\t\tret += variableValueMenuCode(command_obj.expression2);\n\t}\n\n\tif (command_obj.expression3) {\n\t\tret += ` ${LocalizedStrings.getUI('text_code_for_pass')} `;\n\t\tswitch (command_obj.expression3.itens[1]) {\n\t\t\tcase Models.ARITHMETIC_TYPES.plus:\n\t\t\t\tret += ' +';\n\t\t\t\tbreak;\n\t\t\tcase Models.ARITHMETIC_TYPES.minus:\n\t\t\t\tret += ' -';\n\t\t\t\tbreak;\n\t\t}\n\t\tret += variableValueMenuCode(command_obj.expression3.itens[2]);\n\t}\n\n\t/*if (command_obj.var_incrementation) {\n\t\tret += variableValueMenuCode(command_obj.var_incrementation);\n\t\tret += ' <- ';\n\t\tret += variableValueMenuCode(command_obj.expression3.itens[0]);\n\n\t\tswitch (command_obj.expression3.itens[1]) {\n\t\t\tcase Models.ARITHMETIC_TYPES.plus:\n\t\t\t\tret += ' + ';\n\t\t\t\tbreak;\n\t\t\tcase Models.ARITHMETIC_TYPES.minus:\n\t\t\t\tret += ' - ';\n\t\t\t\tbreak;\n\t\t\tcase Models.ARITHMETIC_TYPES.multiplication:\n\t\t\t\tret += ' * ';\n\t\t\t\tbreak;\n\t\t\tcase Models.ARITHMETIC_TYPES.division:\n\t\t\t\tret += ' / ';\n\t\t\t\tbreak;\n\t\t\tcase Models.ARITHMETIC_TYPES.module:\n\t\t\t\tret += ' % ';\n\t\t\t\tbreak;\n\t\t}\n\n\t\tret += variableValueMenuCode(command_obj.expression3.itens[2]);\t\t\n\t}*/\n\n\tret += ' { ';\n\n\tif (command_obj.commands_block) {\n\t\tfor (var i = 0; i < command_obj.commands_block.length; i++) {\n\t\t\tret += commandsCode(command_obj.commands_block[i], (indentation + 1));\n\t\t}\n\t}\n\n\tret += '\\n';\n\tfor (var i = 0; i < indentation; i++) {\n\t\tret += '\\t';\n\t}\n\n\tret += '}';\n\treturn ret;\n}\n\nfunction iftruesCode (command_obj, indentation) {\n\tvar ret = '\\n';\n\n\tfor (var i = 0; i < indentation; i++) {\n\t\tret += '\\t';\n\t}\n\n\tret += LocalizedStrings.getUI('text_if');\n\n\tif (!command_obj.expression) {\n\t\tUtils.renderErrorMessage(command_obj.expression.dom_object, LocalizedStrings.getUI('inform_valid_expression'));\n\t} else {\n\t\tret += ' ( ';\n\t\tret += elementExpressionCode(command_obj.expression);\n\t\tret += ' ) ';\n\t}\n\n\t/*switch (command_obj.expression.expression.type) {\n\t\tcase Models.EXPRESSION_TYPES.exp_logic:\n\t\t\tret += logicExpressionCode(command_obj.expression.expression);\n\t\t\tbreak;\n\t\tcase Models.EXPRESSION_TYPES.exp_arithmetic:\n\t\t\tret += arithmeticExpressionCode(command_obj.expression.expression);\n\t\t\tbreak;\n\t}*/\n\n\tret += ' { ';\n\n\tif (command_obj.commands_block) {\n\t\tfor (var i = 0; i < command_obj.commands_block.length; i++) {\n\t\t\tret += commandsCode(command_obj.commands_block[i], (indentation + 1));\n\t\t}\n\t}\n\n\tret += '\\n';\n\tfor (var i = 0; i < indentation; i++) {\n\t\tret += '\\t';\n\t}\n\n\tret += '} ' + LocalizedStrings.getUI('text_else') + ' {';\n\n\tif (command_obj.commands_else) {\n\t\tfor (var i = 0; i < command_obj.commands_else.length; i++) {\n\t\t\tret += commandsCode(command_obj.commands_else[i], (indentation + 1));\n\t\t}\n\t}\n\n\tret += '\\n';\n\tfor (var i = 0; i < indentation; i++) {\n\t\tret += '\\t';\n\t}\n\n\tret += '}';\n\n\treturn ret;\n}\n\n\nfunction doWhilesCode (command_obj, indentation) {\n\tvar ret = '\\n';\n\n\tfor (var i = 0; i < indentation; i++) {\n\t\tret += '\\t';\n\t}\n\n\tret += LocalizedStrings.getUI('text_code_do') + ' { ';\n\n\tif (command_obj.commands_block) {\n\t\tfor (var i = 0; i < command_obj.commands_block.length; i++) {\n\t\t\tret += commandsCode(command_obj.commands_block[i], (indentation + 1));\n\t\t}\n\t}\n\n\tret += '\\n';\n\tfor (var i = 0; i < indentation; i++) {\n\t\tret += '\\t';\n\t}\n\n\tret += '} ' + LocalizedStrings.getUI('text_code_do_until');\n\n\tif (!command_obj.expression) {\n\t\tUtils.renderErrorMessage(command_obj.expression.dom_object, LocalizedStrings.getUI('inform_valid_expression'));\n\t}\n\n\t/*switch (command_obj.expression.expression.type) {\n\t\tcase Models.EXPRESSION_TYPES.exp_logic:\n\t\t\tret += logicExpressionCode(command_obj.expression.expression);\n\t\t\tbreak;\n\t\tcase Models.EXPRESSION_TYPES.exp_arithmetic:\n\t\t\tret += arithmeticExpressionCode(command_obj.expression.expression);\n\t\t\tbreak;\n\t}*/\n\n\tif (command_obj.expression) {\n\t\tret += ' ( ';\n\t\tret += elementExpressionCode(command_obj.expression);\n\t\tret += ' ) ';\n\t}\n\n\treturn ret;\n}\n\n\nfunction whiletruesCode (command_obj, indentation) {\n\tvar ret = '\\n';\n\n\tfor (var i = 0; i < indentation; i++) {\n\t\tret += '\\t';\n\t}\n\n\tret += LocalizedStrings.getUI('text_code_while');\n\n\tif (!command_obj.expression) {\n\t\tUtils.renderErrorMessage(command_obj.expression.dom_object, LocalizedStrings.getUI('inform_valid_expression'));\n\t}\n\n\t/*switch (command_obj.expression.expression.type) {\n\t\tcase Models.EXPRESSION_TYPES.exp_logic:\n\t\t\tret += logicExpressionCode(command_obj.expression.expression);\n\t\t\tbreak;\n\t\tcase Models.EXPRESSION_TYPES.exp_arithmetic:\n\t\t\tret += arithmeticExpressionCode(command_obj.expression.expression);\n\t\t\tbreak;\n\t}*/\n\tif (command_obj.expression) {\n\t\tret += ' ( ';\n\t\tret += elementExpressionCode(command_obj.expression);\n\t\tret += ' ) ';\n\t}\n\n\tret += ' { ';\n\n\tif (command_obj.commands_block) {\n\t\tfor (var i = 0; i < command_obj.commands_block.length; i++) {\n\t\t\tret += commandsCode(command_obj.commands_block[i], (indentation + 1));\n\t\t}\n\t}\n\n\tret += '\\n';\n\tfor (var i = 0; i < indentation; i++) {\n\t\tret += '\\t';\n\t}\n\n\tret += '}';\n\n\treturn ret;\n}\n\nfunction logicExpressionCode (expression) {\n\tvar ret = ' ( ';\n\n\tif (expression.first_operand.type == Models.EXPRESSION_TYPES.exp_logic) {\n\t\tret += logicExpressionCode(expression.first_operand);\n\t} else if (expression.first_operand.type == Models.EXPRESSION_TYPES.exp_arithmetic) {\n\t\tret += arithmeticExpressionCode(expression.first_operand);\n\t} else {\n\t\tret += variableValueMenuCode(expression.first_operand);\n\t}\n\n\tif (expression.operator) {\n\t\tswitch (expression.operator) {\n\t case Models.LOGIC_COMPARISON.equals_to:\n\t \tret += ' == ';\n\t \tbreak;\n\t case Models.LOGIC_COMPARISON.not_equals_to:\n\t \tret += ' != ';\n\t \tbreak;\n\t case Models.LOGIC_COMPARISON.and:\n\t \tret += ' && ';\n\t \tbreak;\n\t case Models.LOGIC_COMPARISON.or:\n\t \tret += ' || ';\n\t \tbreak;\n\t\t}\n\n\t\tif (expression.second_operand.type == Models.EXPRESSION_TYPES.exp_logic) {\n\t\t\tret += logicExpressionCode(expression.second_operand);\n\t\t} else if (expression.second_operand.type == Models.EXPRESSION_TYPES.exp_arithmetic) {\n\t\t\tret += arithmeticExpressionCode(expression.second_operand);\n\t\t} else {\n\t\t\tret += variableValueMenuCode(expression.second_operand);\n\t\t}\n\n\t}\n\n\tret += ' ) ';\n\n\treturn ret;\n}\n\nfunction arithmeticExpressionCode (expression) {\n\tvar ret = ' ( ';\n\n\tif (expression.first_operand.type == Models.EXPRESSION_TYPES.exp_logic) {\n\t\tret += logicExpressionCode(expression.first_operand);\n\t} else if (expression.first_operand.type == Models.EXPRESSION_TYPES.exp_arithmetic) {\n\t\tret += arithmeticExpressionCode(expression.first_operand);\n\t} else {\n\t\tret += variableValueMenuCode(expression.first_operand);\n\t}\n\n\tswitch (expression.operator) {\n case Models.ARITHMETIC_COMPARISON.greater_than:\n \tret += ' > ';\n \tbreak;\n case Models.ARITHMETIC_COMPARISON.less_than:\n \tret += ' < ';\n \tbreak;\n case Models.ARITHMETIC_COMPARISON.equals_to:\n \tret += ' == ';\n \tbreak;\n case Models.ARITHMETIC_COMPARISON.not_equals_to:\n \tret += ' != ';\n \tbreak;\n case Models.ARITHMETIC_COMPARISON.greater_than_or_equals_to:\n \tret += ' >= ';\n \tbreak;\n case Models.ARITHMETIC_COMPARISON.less_than_or_equals_to:\n \tret += ' <= ';\n \tbreak;\n\t}\n\n\tif (expression.second_operand.type == Models.EXPRESSION_TYPES.exp_logic) {\n\t\tret += logicExpressionCode(expression.second_operand);\n\t} else if (expression.second_operand.type == Models.EXPRESSION_TYPES.exp_arithmetic) {\n\t\tret += arithmeticExpressionCode(expression.second_operand);\n\t} else {\n\t\tret += variableValueMenuCode(expression.second_operand);\n\t}\n\n\tret += ' ) ';\n\n\treturn ret;\n}\n\nfunction attributionsCode (command_obj, indentation) {\n\tvar ret = '\\n';\n\n\tfor (var i = 0; i < indentation; i++) {\n\t\tret += '\\t';\n\t}\n\n\tret += variableValueMenuCode(command_obj.variable) + ' <- ';\n\n\t/*for (var i = 0; i < command_obj.expression.length; i++) {\n\t\tret += elementExpressionCode(command_obj.expression[i]);\n\t}*/\n\tret += elementExpressionCode(command_obj.expression);\n\n\treturn ret;\n}\n\nfunction elementExpressionCode (expression_obj) {\n\n\tvar ret = ''; \n\n\tfor (var i = 0; i < expression_obj.length; i++) {\n\n\n\t\tif (expression_obj[i].type) {\n\n\t\t\tret += variableValueMenuCode(expression_obj[i]);\n\n\t\t} else if (expression_obj[i].type_op) {\n\n\t\t\tswitch(expression_obj[i].item) {\n\n\t\t\t\tcase Models.ARITHMETIC_TYPES.plus:\n\t\t\t\t\tret += ' + ';\n\t\t\t\t\tbreak;\n\t\t\t\tcase Models.ARITHMETIC_TYPES.minus:\n\t\t\t\t\tret += ' - ';\n\t\t\t\t\tbreak;\n\t\t\t\tcase Models.ARITHMETIC_TYPES.multiplication:\n\t\t\t\t\tret += ' * ';\n\t\t\t\t\tbreak;\n\t\t\t\tcase Models.ARITHMETIC_TYPES.division:\n\t\t\t\t\tret += ' / ';\n\t\t\t\t\tbreak;\n\t\t\t\tcase Models.ARITHMETIC_TYPES.module:\n\t\t\t\t\tret += ' % ';\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase Models.LOGIC_COMPARISON.equals_to:\n\t\t\t\t\tret += ' == ';\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase Models.LOGIC_COMPARISON.not_equals_to:\n\t\t\t\t\tret += ' != ';\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase Models.LOGIC_COMPARISON.and:\n\t\t\t\t\tret += ' ' + LocalizedStrings.getUI('logic_operator_and') + ' ';\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase Models.LOGIC_COMPARISON.or:\n\t\t\t\t\tret += ' ' + LocalizedStrings.getUI('logic_operator_or') + ' ';\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase Models.LOGIC_COMPARISON.not:\n\t\t\t\t\tret += ' ' + LocalizedStrings.getUI('logic_operator_not') + ' ';\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase Models.ARITHMETIC_COMPARISON.greater_than:\n\t\t\t\t\tret += ' > ';\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase Models.ARITHMETIC_COMPARISON.less_than:\n\t\t\t\t\tret += ' < ';\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase Models.ARITHMETIC_COMPARISON.greater_than_or_equals_to:\n\t\t\t\t\tret += ' >= ';\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase Models.ARITHMETIC_COMPARISON.less_than_or_equals_to:\n\t\t\t\t\tret += ' <= ';\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tret += ' ' + expression_obj[i] + ' ';\n\t\t\t\n\t\t}\n\n\t}\n\n\treturn ret;\n\n}\n\nfunction functioncallsCode (command_obj, indentation) {\n\n\tvar ret = '\\n';\n\n\tfor (var i = 0; i < indentation; i++) {\n\t\tret += '\\t';\n\t}\n\t\n\tret += variableValueMenuCode(command_obj.function_called);\n\n\treturn ret;\n}\n\nfunction readersCode (command_obj, indentation) {\n\tvar ret = '\\n';\n\t\n\tfor (var i = 0; i < indentation; i++) {\n\t\tret += '\\t';\n\t}\n\n\tret += LocalizedStrings.getUI('text_command_read') + ' ( ';\n\n\tret += variableValueMenuCode(command_obj.variable_value_menu);\n\n\tret += ' ) ';\n\treturn ret;\n}\n\nfunction variableValueMenuCode (variable_obj, is_return = false) {\n\tvar ret = '';\n\ttry {\n\t\tif (variable_obj.function_called) {\n\n\t\t\tif (variable_obj.function_called.name) {\n\t\t\t\tret += variable_obj.function_called.name + ' ( ';\n\t\t\t} else {\n\t\t\t\tret += LocalizedStrings.translateInternalFunction(variable_obj.function_called.identifier,variable_obj.function_called.category) + ' ( ';\n\t\t\t}\n\n\t\t\tif (variable_obj.parameters_list) {\n\t\t\t\tfor (var i = 0; i < variable_obj.parameters_list.length; i++) {\n\t\t\t\t\tret += variableValueMenuCode(variable_obj.parameters_list[i]);\n\t\t\t\t\tif ((i + 1) < variable_obj.parameters_list.length) {\n\t\t\t\t\t\tret += ', ';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tret += ' )';\n\t\t} else if (variable_obj.content.type) {\n\n\t\t\tret += variable_obj.content.name;\n\n\t\t\tif (variable_obj.content.dimensions == 1 && variable_obj.dimensions != 1) {\n\t\t\t\tret += ' [ ' + variableValueMenuCode(variable_obj.column) + ' ] ';\n\t\t\t}\n\n\t\t\tif (variable_obj.content.dimensions == 2 && variable_obj.dimensions != 2) {\n\t\t\t\tret += ' [ ' + variableValueMenuCode(variable_obj.row) + ' ] ';\n\t\t\t\tret += ' [ ' + variableValueMenuCode(variable_obj.column) + ' ] ';\n\t\t\t}\n\n\n\t\t} else {\n\t\t\tif (isNaN(variable_obj.content)) {\n\t\t\t\tret += '\"' + variable_obj.content + '\"';\n\t\t\t} else {\n\t\t\t\tret += variable_obj.content;\n\t\t\t}\n\t\t}\n\t} catch (err) {\n\n\t\tif (!is_return) {\n\t\t\tUtils.renderErrorMessage(variable_obj.dom_object, LocalizedStrings.getUI('inform_valid_content'));\n\t\t\tthrow err;\n\t\t}\n\t}\n\n\treturn ret;\n\n}\n\nfunction writersCode (command_obj, indentation) {\n\tvar ret = '\\n';\n\n\tfor (var i = 0; i < indentation; i++) {\n\t\tret += '\\t';\n\t}\n\t\n\tret += LocalizedStrings.getUI('text_command_write') + ' ( ';\n\n\t/*for (var i = 0; i < command_obj.content.length; i++) {\n\t\tret += variableValueMenuCode(command_obj.content[i]);\n\n\t\tif ((i + 1) < command_obj.content.length) {\n\t\t\tret += ' + ';\n\t\t}\n\t}*/\n\n\tret += elementExpressionCode(command_obj.content);\n\n\tret += ' ) ';\n\treturn ret;\n}\n\nfunction commentsCode (command_obj, indentation) {\n\tvar ret = '\\n';\n\n\tfor (var i = 0; i < indentation; i++) {\n\t\tret += '\\t';\n\t}\n\n\tret += '// ';\n\n\tret += command_obj.comment_text.content;\n\treturn ret;\n}\n\nfunction parametersCode (parameter_obj) {\n\tvar ret = '';\n\tswitch (parameter_obj.type) {\n\t\tcase Types.INTEGER:\n\t\t\tret += ' '+LocalizedStrings.getUI('type_integer')+' ';\n\t\t\tbreak;\n\t\tcase Types.REAL:\n\t\t\tret += ' '+LocalizedStrings.getUI('type_real')+' ';\n\t\t\tbreak;\n\t\tcase Types.TEXT:\n\t\t\tret += ' '+LocalizedStrings.getUI('type_text')+' ';\n\t\t\tbreak;\n\t\tcase Types.BOOLEAN:\n\t\t\tret += ' '+LocalizedStrings.getUI('type_boolean')+' ';\n\t\t\tbreak;\n\t}\n\tret += parameter_obj.name + '';\n\n\tif (parameter_obj.dimensions == 1) {\n\t\tret += ' []'\n\t} else if (parameter_obj.dimensions == 2) {\n\t\tret += ' [][]'\n\t}\n\treturn ret;\n}\n\nfunction variablesCode (variable_obj) {\n\tvar ret = '';\n\n\tvar temp = variable_obj;\n\n\tret += '\\n\\t\\t';\n\n\tif (temp.is_constant) {\n\t\tret += 'const ';\n\t}\n\tswitch (temp.type) {\n\t\tcase Types.INTEGER:\n\t\t\tret += LocalizedStrings.getUI('type_integer')+' ';\n\t\t\tbreak;\n\t\tcase Types.REAL:\n\t\t\tret += LocalizedStrings.getUI('type_real')+' ';\n\t\t\tbreak;\n\t\tcase Types.TEXT:\n\t\t\tret += LocalizedStrings.getUI('type_text')+' ';\n\t\t\tbreak;\n\t\tcase Types.BOOLEAN:\n\t\t\tret += LocalizedStrings.getUI('type_boolean')+' ';\n\t\t\tbreak;\n\t}\n\tret += temp.name + ' ';\n\n\tif (temp.dimensions == 1) {\n\t\tret += '[' + temp.columns + '] ';\n\n\t\tswitch (temp.type) {\n\t\t\tcase Types.INTEGER:\n\t\t\t\tret += '<- {';\n\t\t\t\tfor (var j = 0; j < temp.value.length; j++) {\n\t\t\t\t\tret += temp.value[j];\n\t\t\t\t\tif ((j + 1) < temp.value.length) {\n\t\t\t\t\t\tret += ', ';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tret += '}';\n\t\t\t\tbreak;\n\t\t\tcase Types.REAL:\n\t\t\t\tret += '<- {';\n\t\t\t\tfor (var j = 0; j < temp.value.length; j++) {\n\t\t\t\t\tret += temp.value[j].toFixed(2);\n\t\t\t\t\tif ((j + 1) < temp.value.length) {\n\t\t\t\t\t\tret += ', ';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tret += '}';\n\t\t\t\tbreak;\n\t\t\tcase Types.TEXT:\n\t\t\t\tret += '<- {';\n\t\t\t\tfor (var j = 0; j < temp.value.length; j++) {\n\t\t\t\t\tret += '\"'+temp.value[j]+'\"';\n\t\t\t\t\tif ((j + 1) < temp.value.length) {\n\t\t\t\t\t\tret += ', ';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tret += '}';\n\t\t\t\tbreak;\n\t\t\tcase Types.BOOLEAN:\n\t\t\t\tret += '<- {';\n\t\t\t\tfor (var j = 0; j < temp.value.length; j++) {\n\t\t\t\t\tif (temp.value[j]) {\n\t\t\t\t\t\tret += LocalizedStrings.getUI('logic_value_true');\n\t\t\t\t\t} else {\n\t\t\t\t\t\tret += LocalizedStrings.getUI('logic_value_false');\n\t\t\t\t\t}\n\t\t\t\t\tif ((j + 1) < temp.value.length) {\n\t\t\t\t\t\tret += ', ';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tret += '}';\n\t\t\t\tbreak;\n\t\t}\n\n\t} else if (temp.dimensions == 2) {\n\t\tret += '[' + temp.rows + '][' + temp.columns + '] ';\n\n\t\tswitch (temp.type) {\n\t\t\tcase Types.INTEGER:\n\t\t\t\tret += '<- {';\n\n\t\t\t\tfor (var j = 0; j < temp.rows; j++) {\n\t\t\t\t\tret += '{';\n\n\t\t\t\t\tfor (var k = 0; k < temp.columns; k++) {\n\t\t\t\t\t\tret += temp.value[j][k];\n\n\t\t\t\t\t\tif ((k + 1) < temp.columns) {\n\t\t\t\t\t\t\tret += ', ';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tret += '}';\n\t\t\t\t\tif ((j + 1) < temp.rows) {\n\t\t\t\t\t\tret += ', ';\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tret += '}';\n\t\t\t\tbreak;\n\t\t\tcase Types.REAL:\n\t\t\t\tret += '<- {';\n\n\t\t\t\tfor (var j = 0; j < temp.rows; j++) {\n\t\t\t\t\tret += '{';\n\n\t\t\t\t\tfor (var k = 0; k < temp.columns; k++) {\n\t\t\t\t\t\tret += temp.value[j][k].toFixed(2);\n\n\t\t\t\t\t\tif ((k + 1) < temp.columns) {\n\t\t\t\t\t\t\tret += ', ';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tret += '}';\n\t\t\t\t\tif ((j + 1) < temp.rows) {\n\t\t\t\t\t\tret += ', ';\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tret += '}';\n\t\t\t\tbreak;\n\t\t\tcase Types.TEXT:\n\t\t\t\tret += '<- {';\n\n\t\t\t\tfor (var j = 0; j < temp.rows; j++) {\n\t\t\t\t\tret += '{';\n\n\t\t\t\t\tfor (var k = 0; k < temp.columns; k++) {\n\t\t\t\t\t\tret += '\"' + temp.value[j][k] + '\"';\n\n\t\t\t\t\t\tif ((k + 1) < temp.columns) {\n\t\t\t\t\t\t\tret += ', ';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tret += '}';\n\t\t\t\t\tif ((j + 1) < temp.rows) {\n\t\t\t\t\t\tret += ', ';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tret += '}';\n\t\t\t\tbreak;\n\t\t\tcase Types.BOOLEAN:\n\t\t\t\tret += '<- {';\n\t\t\t\tfor (var j = 0; j < temp.rows; j++) {\n\t\t\t\t\tret += '{';\n\n\t\t\t\t\tfor (var k = 0; k < temp.columns; k++) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (temp.value[j][k]) {\n\t\t\t\t\t\t\tret += LocalizedStrings.getUI('logic_value_true');\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tret += LocalizedStrings.getUI('logic_value_false');\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ((k + 1) < temp.columns) {\n\t\t\t\t\t\t\tret += ', ';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tret += '}';\n\t\t\t\t\tif ((j + 1) < temp.rows) {\n\t\t\t\t\t\tret += ', ';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tret += '}';\n\t\t\t\tbreak;\n\t\t}\n\t} else {\n\n\t\tswitch (temp.type) {\n\t\t\tcase Types.INTEGER:\n\t\t\t\tret += '<- ' + temp.value;\n\t\t\t\tbreak;\n\t\t\tcase Types.REAL:\n\t\t\t\tret += '<- ' + temp.value.toFixed(2);\n\t\t\t\tbreak;\n\t\t\tcase Types.TEXT:\n\t\t\t\tret += '<- \"' + temp.value + '\"';\n\t\t\t\tbreak;\n\t\t\tcase Types.BOOLEAN:\n\t\t\t\tret += '<- ';\n\t\t\t\tif (temp.value) {\n\t\t\t\t\tret += LocalizedStrings.getUI('logic_value_true');\n\t\t\t\t} else {\n\t\t\t\t\tret += LocalizedStrings.getUI('logic_value_false');\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\n\t}\n\n\treturn ret;\n\n}\n\nfunction globalsCode () {\n\tvar ret = '';\n\n\tif (window.program_obj.globals) {\n\t\tfor (var i = 0; i < window.program_obj.globals.length; i++) {\n\t\t\tvar temp = window.program_obj.globals[i];\n\n\t\t\tret += '\\n\\t';\n\n\t\t\tif (temp.is_constant) {\n\t\t\t\tret += 'const ';\n\t\t\t}\n\t\t\tswitch (temp.type) {\n\t\t\t\tcase Types.INTEGER:\n\t\t\t\t\tret += LocalizedStrings.getUI('type_integer');\n\t\t\t\t\tbreak;\n\t\t\t\tcase Types.REAL:\n\t\t\t\t\tret += LocalizedStrings.getUI('type_real');\n\t\t\t\t\tbreak;\n\t\t\t\tcase Types.TEXT:\n\t\t\t\t\tret += LocalizedStrings.getUI('type_text');\n\t\t\t\t\tbreak;\n\t\t\t\tcase Types.BOOLEAN:\n\t\t\t\t\tret += LocalizedStrings.getUI('type_boolean');\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tret += ' ' + temp.name + ' ';\n\n\t\t\tif (temp.dimensions == 1) {\n\t\t\t\tret += '[' + temp.columns + '] ';\n\n\t\t\t\tswitch (temp.type) {\n\t\t\t\t\tcase Types.INTEGER:\n\t\t\t\t\t\tret += '<- {';\n\t\t\t\t\t\tfor (var j = 0; j < temp.value.length; j++) {\n\t\t\t\t\t\t\tret += temp.value[j];\n\t\t\t\t\t\t\tif ((j + 1) < temp.value.length) {\n\t\t\t\t\t\t\t\tret += ', ';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tret += '}';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Types.REAL:\n\t\t\t\t\t\tret += '<- {';\n\t\t\t\t\t\tfor (var j = 0; j < temp.value.length; j++) {\n\t\t\t\t\t\t\tret += temp.value[j].toFixed(2);\n\t\t\t\t\t\t\tif ((j + 1) < temp.value.length) {\n\t\t\t\t\t\t\t\tret += ', ';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tret += '}';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Types.TEXT:\n\t\t\t\t\t\tret += '<- {';\n\t\t\t\t\t\tfor (var j = 0; j < temp.value.length; j++) {\n\t\t\t\t\t\t\tret += '\"'+temp.value[j]+'\"';\n\t\t\t\t\t\t\tif ((j + 1) < temp.value.length) {\n\t\t\t\t\t\t\t\tret += ', ';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tret += '}';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Types.BOOLEAN:\n\t\t\t\t\t\tret += '<- {';\n\t\t\t\t\t\tfor (var j = 0; j < temp.value.length; j++) {\n\t\t\t\t\t\t\tif (temp.value[j]) {\n\t\t\t\t\t\t\t\tret += LocalizedStrings.getUI('logic_value_true');\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tret += LocalizedStrings.getUI('logic_value_false');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif ((j + 1) < temp.value.length) {\n\t\t\t\t\t\t\t\tret += ', ';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tret += '}';\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t} else if (temp.dimensions == 2) {\n\t\t\t\tret += '[' + temp.rows + '][' + temp.columns + '] ';\n\n\t\t\t\tswitch (temp.type) {\n\t\t\t\t\tcase Types.INTEGER:\n\t\t\t\t\t\tret += '<- {';\n\n\t\t\t\t\t\tfor (var j = 0; j < temp.rows; j++) {\n\t\t\t\t\t\t\tret += '{';\n\n\t\t\t\t\t\t\tfor (var k = 0; k < temp.columns; k++) {\n\t\t\t\t\t\t\t\tret += temp.value[j][k];\n\n\t\t\t\t\t\t\t\tif ((k + 1) < temp.columns) {\n\t\t\t\t\t\t\t\t\tret += ', ';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tret += '}';\n\t\t\t\t\t\t\tif ((j + 1) < temp.rows) {\n\t\t\t\t\t\t\t\tret += ', ';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tret += '}';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Types.REAL:\n\t\t\t\t\t\tret += '<- {';\n\n\t\t\t\t\t\tfor (var j = 0; j < temp.rows; j++) {\n\t\t\t\t\t\t\tret += '{';\n\n\t\t\t\t\t\t\tfor (var k = 0; k < temp.columns; k++) {\n\t\t\t\t\t\t\t\tret += temp.value[j][k].toFixed(2);\n\n\t\t\t\t\t\t\t\tif ((k + 1) < temp.columns) {\n\t\t\t\t\t\t\t\t\tret += ', ';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tret += '}';\n\t\t\t\t\t\t\tif ((j + 1) < temp.rows) {\n\t\t\t\t\t\t\t\tret += ', ';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tret += '}';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Types.TEXT:\n\t\t\t\t\t\tret += '<- {';\n\n\t\t\t\t\t\tfor (var j = 0; j < temp.rows; j++) {\n\t\t\t\t\t\t\tret += '{';\n\n\t\t\t\t\t\t\tfor (var k = 0; k < temp.columns; k++) {\n\t\t\t\t\t\t\t\tret += '\"' + temp.value[j][k] + '\"';\n\n\t\t\t\t\t\t\t\tif ((k + 1) < temp.columns) {\n\t\t\t\t\t\t\t\t\tret += ', ';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tret += '}';\n\t\t\t\t\t\t\tif ((j + 1) < temp.rows) {\n\t\t\t\t\t\t\t\tret += ', ';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tret += '}';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Types.BOOLEAN:\n\t\t\t\t\t\tret += '<- {';\n\t\t\t\t\t\tfor (var j = 0; j < temp.rows; j++) {\n\t\t\t\t\t\t\tret += '{';\n\n\t\t\t\t\t\t\tfor (var k = 0; k < temp.columns; k++) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif (temp.value[j][k]) {\n\t\t\t\t\t\t\t\t\tret += LocalizedStrings.getUI('logic_value_true');\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tret += LocalizedStrings.getUI('logic_value_false');\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif ((k + 1) < temp.columns) {\n\t\t\t\t\t\t\t\t\tret += ', ';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tret += '}';\n\t\t\t\t\t\t\tif ((j + 1) < temp.rows) {\n\t\t\t\t\t\t\t\tret += ', ';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tret += '}';\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t\tswitch (temp.type) {\n\t\t\t\t\tcase Types.INTEGER:\n\t\t\t\t\t\tret += '<- ' + temp.value;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Types.REAL:\n\t\t\t\t\t\tret += '<- ' + temp.value.toFixed(2);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Types.TEXT:\n\t\t\t\t\t\tret += '<- \"' + temp.value + '\"';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Types.BOOLEAN:\n\t\t\t\t\t\tret += '<- ';\n\t\t\t\t\t\tif (temp.value) {\n\t\t\t\t\t\t\tret += LocalizedStrings.getUI('logic_value_true');;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tret += LocalizedStrings.getUI('logic_value_false');;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t\n\n\t\t}\n\t}\n\n\treturn ret;\n}","import * as Models from './ivprog_elements';\nimport { LocalizedStrings } from './../services/localizedStringsService';\nimport * as CommentsManagement from './commands/comment';\nimport * as ReadersManagement from './commands/reader';\nimport * as WritersManagement from './commands/writer';\nimport * as AttributionsManagement from './commands/attribution';\nimport * as IftruesManagement from './commands/iftrue';\nimport * as RepeatNtimesManagement from './commands/repeatNtimes';\nimport * as WhiletruesManagement from './commands/whiletrue';\nimport * as DowhiletruesManagement from './commands/dowhiletrue';\nimport * as SwitchesManagement from './commands/switch';\nimport * as FunctioncallsManagement from './commands/functioncall';\nimport * as VariableValueMenuManagement from './commands/variable_value_menu';\nimport * as BreaksManagement from './commands/break';\nimport * as ReturnsManagement from './commands/return';\nimport { registerUserEvent, ActionTypes } from \"./../services/userLog\";\n\n// let has_element_created_draged = false;\n// let which_element_is_draged = null;\n\nexport function removeCommand (command, function_obj, dom_obj) {\n\n\tregisterUserEvent(function_obj.name, ActionTypes.REMOVE_COMMAND, command.type, '/', 0);\n\n\tif (function_obj.commands.indexOf(command) > -1) {\n\t\tfunction_obj.commands.splice(function_obj.commands.indexOf(command), 1);\n\t\treturn true;\n\t}\n\n\t// Utilize dois parantNode, pois o primeiro é o div de comandos\n\ttry {\n\t\tif (dom_obj.parent().parent().data('command').commands_block.indexOf(command) > -1) {\n\t\t\tdom_obj.parent().parent().data('command').commands_block.splice\n\t\t\t(dom_obj.parent().parent().data('command').commands_block.indexOf(command), 1);\n\t\t\treturn true;\n\t\t}\t\n\t} catch (err) {}\n\t\n\ttry {\n\t\tif (dom_obj.parent().parent().data('command').type == Models.COMMAND_TYPES.iftrue) {\n\t\t\tif (dom_obj.parent().parent().data('command').commands_else.indexOf(command) > -1) {\n\t\t\t\tdom_obj.parent().parent().data('command').commands_else.splice\n\t\t\t\t(dom_obj.parent().parent().data('command').commands_else.indexOf(command), 1);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t} catch (err) {}\n\n\tif (dom_obj.parent().data('switchcase')) {\n\t\tconsole.log(\"o que encontrei: \");\n\t\tconsole.log(dom_obj.parent().data('switchcase'));\n\t\tdom_obj.parent().data('switchcase').commands_block.splice(dom_obj.parent().data('switchcase').commands_block.indexOf(command), 1);\n\t\treturn true;\n\t}\n\n\treturn false;\n}\n\nwindow.function_container_active = null;\n\nexport function createFloatingCommand (function_obj, function_container, command_type, mouse_event) {\n\n\tvar floatingObject;\n\n\tswitch (command_type) {\n\t\tcase Models.COMMAND_TYPES.break:\n\t\t\tfloatingObject = BreaksManagement.createFloatingCommand();\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.comment:\n\t\t\tfloatingObject = CommentsManagement.createFloatingCommand();\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.reader:\n\t\t\tfloatingObject = ReadersManagement.createFloatingCommand();\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.writer:\n\t\t\tfloatingObject = WritersManagement.createFloatingCommand();\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.attribution:\n\t\t\tfloatingObject = AttributionsManagement.createFloatingCommand();\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.iftrue:\n\t\t\tfloatingObject = IftruesManagement.createFloatingCommand();\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.repeatNtimes:\n\t\t\tfloatingObject = RepeatNtimesManagement.createFloatingCommand();\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.whiletrue:\n\t\t\tfloatingObject = WhiletruesManagement.createFloatingCommand();\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.dowhiletrue:\n\t\t\tfloatingObject = DowhiletruesManagement.createFloatingCommand();\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.switch:\n\t\t\tfloatingObject = SwitchesManagement.createFloatingCommand();\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.functioncall:\n\t\t\tfloatingObject = FunctioncallsManagement.createFloatingCommand();\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.return:\n\t\t\tfloatingObject = ReturnsManagement.createFloatingCommand();\n\t\t\tbreak;\n\t}\n\n\tfloatingObject.draggable().appendTo(\"body\");\n\n\t$('body').mouseup(function(evt) {\n\t manageCommand(function_obj, function_container, evt, command_type);\n\t $('body').off('mouseup');\n\t $('body').off('mouseover');\n\t});\n\n\tif (!function_container.hasClass('function_div') || function_container.length < 1) {\n\t\twindow.mouse_event = mouse_event;\n\t\tfunction_container = $(mouse_event.originalEvent.srcElement.closest('.function_div'));\n\t}\n\n\tconsole.log('function_container', function_container);\n\n\tfunction_container_active = function_container;\n\n\tfunction_container.find('.commands_list_div').on('mousemove', function(evt) {\n\t addGhostDiv(evt);\n\t});\n\tfunction_container.find('.commands_list_div').find(\"*\").on('mousemove', function(evt) {\n\t addGhostDiv(evt);\n\t});\n\n\tfunction_container.on('mouseout', function(event) {\n\t\tvar el = $(document.elementFromPoint(event.clientX, event.clientY));\n\t\tif (el.closest('.commands_list_div').length < 1) {\n\t\t\twindow.ghostDiv.remove();\n\t\t}\n\t});\n\t\n\tfloatingObject.css(\"position\", \"absolute\");\n\tmouse_event.type = \"mousedown.draggable\";\n\tmouse_event.target = floatingObject[0];\n\tfloatingObject.css(\"left\", mouse_event.pageX - window.divx);\n\tfloatingObject.css(\"top\", mouse_event.pageY);\n\tfloatingObject.trigger(mouse_event);\n}\n\nwindow.divx = 100;\nwindow.ghostDiv = $('
');\nwindow.active_container = null;\n\nfunction addGhostToEmptyBlock (element, evt) {\n\n\t$('.ghost_div').remove();\n\n\tvar container = element.closest('.command_container');\n\n\tif (container.hasClass('switch')) {\n\t\tcontainer = $(evt.target).closest('.case_div');\t\t\n\t}\n\n\tif (!container.hasClass('dowhiletrue') && !container.hasClass('iftrue') && !container.hasClass('repeatNtimes') \n\t\t\t\t&& !container.hasClass('case_div') && !container.hasClass('whiletrue')) {\n\t\taddGhostToNotEmptyBlock(element, evt);\n\t\treturn;\n\t}\n\n\tif (window.active_container != null) {\n\t\tif (window.active_container.is(container)) {\n\t\t\tconsole.log('é o mesmo, não mudou!');\n\t\t} else {\n\t\t\tif (container.length < 1) {\n\t\t\t\tcontainer = element.closest('.commands_list_div');\n\t\t\t\tif (window.active_container.is(container)) {\n\t\t\t\t\tconsole.log('é o mesmo command list');\n\t\t\t\t} else {\n\t\t\t\t\tconsole.log('mudou para um command list');\n\t\t\t\t\twindow.active_container = container;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconsole.log('mudou para um outro container?');\n\t\t\t}\n\t\t}\n\t}\n\n\twindow.active_container = container;\n\tif (container.hasClass('iftrue')) {\n\t\tvar containerIf = container.find('.commands_if').get(0);\n\t\tvar containerElse = container.find('.commands_else').get(0);\n\t\tvar topIfDistance = Math.abs(evt.clientY - containerIf.getBoundingClientRect().top);\n\t\tvar bottomIfDistance = Math.abs(containerIf.getBoundingClientRect().top + containerIf.getBoundingClientRect().height - evt.clientY);\n\t\tvar topElseDistance = Math.abs(evt.clientY - containerElse.getBoundingClientRect().top);\n\t\tvar bottomElseDistance = Math.abs(containerElse.getBoundingClientRect().top + containerElse.getBoundingClientRect().height - evt.clientY);\n\n\t\tif (topIfDistance < topElseDistance && topIfDistance < bottomElseDistance) {\n\t\t\t$(containerIf).append(window.ghostDiv);\n\t\t} else {\n\t\t\t$(containerElse).append(window.ghostDiv);\n\t\t}\n\t} else if (container.hasClass('case_div')) {\n\t\tcontainer.find('.case_commands_block').append(window.ghostDiv);\n\t} else {\n\t\tcontainer.find('.block_commands').append(window.ghostDiv);\n\t}\n\t\n}\n\nfunction addGhostToNotEmptyBlock (element, evt) {\n\n\t$('.ghost_div').remove();\n\n\tvar container = element.closest('.dowhiletrue, .iftrue, .repeatNtimes, .case_div, .whiletrue');\n\n\t//console.log(\"\\n\\nNOT EMPTY: \", container);\n\n\t//if (window.active_container != null) {\n\t\t\n\t\t\n\t//}\n\n\tif (container.length < 1) {\n\t\tcontainer = element.closest('.commands_list_div');\n\t\twindow.active_container = container;\n\t\taddGhostToFunctionArea(element, evt);\n\t} else {\n\t\t//console.log('mudou para um outro container?');\n\t}\n\n\twindow.active_container = container;\n\n\t// quem está mais próximo? // Essa regra se aplica somente quando o over está sobre um comando\n\tvar allfilhos;\n\tconsole.log('olha o container: ', container);\n\tif (container.hasClass('iftrue')) {\n\t\t\n\t\tif ($(evt.target).closest('.data_block_if').length > 0) {\n\t\t\tallfilhos = container.find('.commands_if').children('.command_container');\n\t\t} else if ($(evt.target).closest('.data_block_else').length > 0) {\n\t\t\tallfilhos = container.find('.commands_else').children('.command_container');\n\t\t} else {\n\n\t\t\tvar containerIf = container.find('.commands_if').get(0);\n\t\t\tvar containerElse = container.find('.commands_else').get(0);\n\t\t\tvar topIfDistance = Math.abs(evt.clientY - containerIf.getBoundingClientRect().top);\n\t\t\tvar bottomIfDistance = Math.abs(containerIf.getBoundingClientRect().top + containerIf.getBoundingClientRect().height - evt.clientY);\n\t\t\tvar topElseDistance = Math.abs(evt.clientY - containerElse.getBoundingClientRect().top);\n\t\t\tvar bottomElseDistance = Math.abs(containerElse.getBoundingClientRect().top + containerElse.getBoundingClientRect().height - evt.clientY);\n\n\t\t\tif (topIfDistance < topElseDistance && topIfDistance < bottomElseDistance) {\n\t\t\t\tallfilhos = $(containerIf).children('.command_container');\n\t\t\t} else {\n\t\t\t\tallfilhos = $(containerElse).children('.command_container');\n\t\t\t}\n\t\t}\n\t} else if (container.hasClass('case_div')) {\n\t\tallfilhos = container.children('.case_commands_block').children('.command_container');\n\t} else if (container.hasClass('commands_list_div')) {\n\t\tallfilhos = container.children('.command_container');\n\t} else {\n\t\tallfilhos = container.children('.block_commands').children('.command_container');\n\t}\n\n\tvar topDistances = [];\n\tvar bottomDistances = [];\n\n\tfor (var i = 0; i < allfilhos.length; i++) {\n\t\tvar topD = Math.abs(evt.clientY - allfilhos.get(i).getBoundingClientRect().top);\n\t\ttopDistances.push(topD);\n\t\tvar botD = Math.abs(allfilhos.get(i).getBoundingClientRect().top + allfilhos.get(i).getBoundingClientRect().height - evt.clientY);\n\t\tbottomDistances.push(botD);\n\t}\n\n\tconsole.log('topDistances\\n', topDistances, '\\nbottomDistances\\n', bottomDistances)\n\n\tvar menorTop = Math.min.apply(null, topDistances);\n\tvar indiceTop = topDistances.indexOf(menorTop);\n\n\tvar menorBot = Math.min.apply(null, bottomDistances);\n\tvar indiceBot = bottomDistances.indexOf(menorBot);\n\n\tif (menorTop < menorBot) {\n\t\twindow.ghostDiv.insertBefore($(allfilhos.get(indiceTop)));\n\t} else {\n\t\twindow.ghostDiv.insertAfter($(allfilhos.get(indiceBot)));\n\t}\n\n\tconsole.log('distancias: menorTop ', menorTop, ' menorBot ', menorBot);\n}\n\nfunction addGhostToFunctionArea (undermouse, evt) {\n\t$('.ghost_div').remove();\n\tvar allfilhos = undermouse.closest('.commands_list_div').children('.command_container');\n\n\tvar topDistances = [];\n\tvar bottomDistances = [];\n\n\tfor (var i = 0; i < allfilhos.length; i++) {\n\t\tvar topD = Math.abs(evt.clientY - allfilhos.get(i).getBoundingClientRect().top);\n\t\ttopDistances.push(topD);\n\t\tvar botD = Math.abs(allfilhos.get(i).getBoundingClientRect().top + allfilhos.get(i).getBoundingClientRect().height - evt.clientY);\n\t\tbottomDistances.push(botD);\n\t}\n\n\tvar menorTop = Math.min.apply(null, topDistances);\n\tvar indiceTop = topDistances.indexOf(menorTop);\n\n\tvar menorBot = Math.min.apply(null, bottomDistances);\n\tvar indiceBot = bottomDistances.indexOf(menorBot);\n\n\tif (menorTop < menorBot) {\n\t\twindow.ghostDiv.insertBefore($(allfilhos.get(indiceTop)));\n\t} else {\n\t\twindow.ghostDiv.insertAfter($(allfilhos.get(indiceBot)));\n\t}\n\n}\n\nfunction addGhostDiv (evt) {\n\n\tvar undermouse = $(evt.target);\n\n\tif (undermouse.hasClass('ghost_div')) {\n\t\treturn;\n\t} else if (undermouse.hasClass('commands_list_div')) {\n\t\taddGhostToFunctionArea(undermouse, evt);\n\t\treturn;\n\t} else if (undermouse.hasClass('block_commands')) {\n\t\tif (undermouse.find('.command_container').length > 0) {\n\t\t\taddGhostToNotEmptyBlock(undermouse, evt);\n\t\t} else {\n\t\t\taddGhostToEmptyBlock(undermouse, evt);\n\t\t}\n\t} else if (undermouse.hasClass('case_div')) {\n\t\tif (undermouse.find('.case_commands_block').find('.command_container').length > 0) {\n\t\t\taddGhostToNotEmptyBlock(undermouse, evt);\n\t\t} else {\n\t\t\taddGhostToEmptyBlock(undermouse, evt);\n\t\t}\n\t} else {\n\t\t\n\t\taddGhostToNotEmptyBlock(undermouse, evt);\n\t\t\n\t} \n}\n\nfunction borderMouseDragCommand (function_obj, function_container, evt) {\n\n\tfunction_container.find('.over_command_drag').each(function( index ) {\n\t\t$(this).removeClass('over_command_drag');\n\t});\n\n\tvar prev = null;\n\n\tfunction_container.find('.commands_list_div').each(function( index ) { \n\t\tprev = $(this);\n\t\tif (prev) {\n\t\t\tvar objLeft = prev.offset().left;\n\t var objTop = prev.offset().top;\n\t var objRight = objLeft + prev.width();\n\t var objBottom = objTop + prev.height();\n\t if (evt.pageX > objLeft && evt.pageX < objRight && evt.pageY > objTop && evt.pageY < objBottom) {\n\t \tprev.addClass(\"over_command_drag\"); \n\t }\n\t }\n\t});\n\n\tfunction_container.find('.command_container').each(function( index ) { \n\t\tvar obj = $(this);\n\t\tvar objLeft = obj.offset().left;\n var objTop = obj.offset().top;\n var objRight = objLeft + obj.width();\n var objBottom = objTop + obj.height();\n if (evt.pageX > objLeft && evt.pageX < objRight && evt.pageY > objTop && evt.pageY < objBottom) {\n \tif (prev) {\n \t\tprev.removeClass('over_command_drag');\n \t}\n \tobj.addClass(\"over_command_drag\"); \n \treturn;\n }\n\t});\n}\n\n// before_after_inside: 1 -> before, 2 -> after, 3 -> inside\nexport function renderCommand (command, element_reference, before_after_inside, function_obj) {\n\tvar createdElement;\n\tswitch (command.type) {\n\t\tcase Models.COMMAND_TYPES.comment:\n\t\t\tcreatedElement = CommentsManagement.renderCommand(command, function_obj);\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.break:\n\t\t\tcreatedElement = BreaksManagement.renderCommand(command, function_obj);\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.reader:\n\t\t\tcreatedElement = ReadersManagement.renderCommand(command, function_obj);\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.writer:\n\t\t\tcreatedElement = WritersManagement.renderCommand(command, function_obj);\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.attribution:\n\t\t\tcreatedElement = AttributionsManagement.renderCommand(command, function_obj);\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.functioncall:\n\t\t\tcreatedElement = FunctioncallsManagement.renderCommand(command, function_obj);\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.iftrue:\n\t\t\tcreatedElement = IftruesManagement.renderCommand(command, function_obj);\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.repeatNtimes:\n\t\t\tcreatedElement = RepeatNtimesManagement.renderCommand(command, function_obj);\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.whiletrue:\n\t\t\tcreatedElement = WhiletruesManagement.renderCommand(command, function_obj);\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.dowhiletrue:\n\t\t\tcreatedElement = DowhiletruesManagement.renderCommand(command, function_obj);\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.switch:\n\t\t\tcreatedElement = SwitchesManagement.renderCommand(command, function_obj);\n\t\t\tbreak;\n\n\t\tcase Models.COMMAND_TYPES.return:\n\t\t\tcreatedElement = ReturnsManagement.renderCommand(command, function_obj);\n\t\t\tbreak;\n\t}\n\tswitch (before_after_inside) {\n\t\tcase 1:\n\t\t\tcreatedElement.insertBefore(element_reference);\n\t\t\tbreak;\n\n\t\tcase 2:\n\t\t\tcreatedElement.insertAfter(element_reference);\n\t\t\tbreak;\n\n\t\tcase 3: \n\t\t\telement_reference.append(createdElement);\n\t\t\tbreak;\n\t}\n\n}\n\nexport function genericCreateCommand (command_type) {\n\n\tswitch (command_type) {\n\n\t\tcase Models.COMMAND_TYPES.break:\n\t\t\treturn new Models.Break();\n\n\t\tcase Models.COMMAND_TYPES.comment:\n\t\t\treturn new Models.Comment(new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.only_value, LocalizedStrings.getUI('text_comment'), null, null, false));\n\n\t\tcase Models.COMMAND_TYPES.reader:\n\t\t\treturn new Models.Reader(new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.only_variable, null, null, null, false));\n\n\t\tcase Models.COMMAND_TYPES.writer:\n\t\t\treturn new Models.Writer([new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true)]);\n\n\t\tcase Models.COMMAND_TYPES.attribution:\n\t\t\treturn new Models.Attribution(new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.only_variable, null, null, null, false), \n\t\t\t\t[]);\n \n\t\tcase Models.COMMAND_TYPES.functioncall:\n\t\t\treturn new Models.FunctionCall(new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.only_function, null, null, null, false), null);\n\n\t\tcase Models.COMMAND_TYPES.iftrue:\n\t\t\treturn new Models.IfTrue([new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true)]);\n//(var_attribution, var_incrementation, expression1, expression2, expression3, commands_block)\n\t\tcase Models.COMMAND_TYPES.repeatNtimes:\n\t\t\treturn new Models.RepeatNTimes(new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.only_variable, null, null, null, false), \n\t\t\t\t\t\t\t\t\t\t\tnew Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.only_variable, null, null, null, false),\n\t\t\t\t\t\t\t\t\t\t null, new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true), null, null);\n\n\t\tcase Models.COMMAND_TYPES.whiletrue:\n\t\t\treturn new Models.WhileTrue([new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true)], null);\n\n\t\tcase Models.COMMAND_TYPES.dowhiletrue:\n\t\t\treturn new Models.DoWhileTrue([new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true)], null);\n\n\t\tcase Models.COMMAND_TYPES.switch:\n\n\t\t\tvar sc = [new Models.SwitchCase(new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true))];\n\n\t\t\treturn new Models.Switch(new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.variable_and_function, null, null, null, true), sc);\n\n\t\tcase Models.COMMAND_TYPES.return:\n\t\t\treturn new Models.Return([new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true)]);\n\t}\n}\n\nfunction dragTrash (event) {\n\n\t$('.ghost_div').remove();\n\n\tvar trash = $('');\n\t$('body').append(trash);\n\ttrash.css('position', 'absolute');\n\ttrash.css('top', event.clientY);\n\ttrash.css('left', event.clientX - 20);\n\ttrash.css('font-size', '3em');\n\ttrash.css('display', 'none');\n\n\tfunction_container_active.find('.commands_list_div').off('mousemove');\n\tfunction_container_active.find('.commands_list_div').find(\"*\").off('mousemove');\n\n\ttrash.fadeIn( 200, function() {\n\t\ttrash.fadeOut( 200, function() {\n\t\t\ttrash.remove();\n\t\t} );\n });\n}\n\nfunction findSingleElement (searching, query) {\n\n\tif (!searching || !query) {\n\t\treturn '';\n\t}\n\n\tif (searching.type == Models.COMMAND_TYPES.repeatNtimes || \n\t\tsearching.type == Models.COMMAND_TYPES.whiletrue ||\n\t\tsearching.type == Models.COMMAND_TYPES.dowhiletrue) {\n\n\t\tif (searching.commands_block) {\n\t\t\treturn '' + searching.commands_block.indexOf(query);\n\t\t} else {\n\t\t\treturn '0';\n\t\t}\n\n\t} else if (searching.type == Models.COMMAND_TYPES.iftrue) {\n\n\t\tif (searching.commands_block == null) {\n\t\t\tsearching.commands_block = [];\n\t\t}\n\t\tif (searching.commands_else == null) {\n\t\t\tsearching.commands_else = [];\n\t\t}\n\n\t\tconsole.log('\\n\\nveja onde: ', searching.commands_block, ' \\n\\nquery: ', query);\n\n\t\tif (searching.commands_block.indexOf(query) >= 0) {\n\t\t\treturn 'if[' + searching.commands_block.indexOf(query) + ']';\n\t\t} else {\n\t\t\treturn 'else[' + searching.commands_else.indexOf(query) + ']';\n\t\t}\n\n\t} else if (searching.type == Models.COMMAND_TYPES.switch) {\n\n\t\tfor (var i = 0; i < searching.cases.length; i++) {\n\t\t\tif (searching.cases[i].commands_block.indexOf(query) >= 0) {\n\t\t\t\treturn 'case[' + searching.cases[i].commands_block.indexOf(query) + ']';\n\t\t\t}\n\t\t}\n\n\t}\n\n}\n\nfunction findPathRecursive (starter_index, hierarquia_bottom_up, function_obj, index_command = -1, actual = null) {\n\tvar full_path = '';\n\t\n\tfor (var i = 0; i <= hierarquia_bottom_up.length; i ++) {\n\n\t\tconsole.log('\\n\\n:: ', i, ':\\n', hierarquia_bottom_up[i]);\n\n\t\tfull_path += findSingleElement(hierarquia_bottom_up[i], hierarquia_bottom_up[i + 1]) + '-';\n\t}\n\n\treturn full_path;\n}\n\nfunction manageCommand (function_obj, function_container, event, command_type) {\n\n\t$( \".created_element\" ).each(function( index ) { \n\t\t$(this).remove();\n\t});\n\n\tvar el = $(document.elementFromPoint(event.clientX, event.clientY));\n\n\tif (el.hasClass('ghost_div')) {\n\t\tif (el.closest('.command_container').length < 1) {\n\t\t\t\n\n\t\t\tconsole.log('\\n\\nvou tentar!!!!');\n\n\t\t\tconsole.log(el.closest('.commands_list_div'), '\\n\\n');\n\n\t\t\tel.closest('.commands_list_div').css('height', el.closest('.commands_list_div').css('height') + 30);\n\t\t\t\n\t\t\t//$('.ghost_div').remove();\n\n\t\t\tel = el.closest('.commands_list_div');\n\t\t}\n\t}\n\n\tconsole.log('soltou no: ');\n\tconsole.log(el);\n\tconsole.log(el.data('fun'));\n\n\t// Primeiro verificar se ele soltou no espaço da função correta:\n\tvar hier = el.parentsUntil(\".all_functions\");\n\tvar esta_correto = false;\n\tvar esta_na_div_correta = false;\n\tif (el.hasClass(\"commands_list_div\")) {\n\t\testa_na_div_correta = true;\n\t} \n\tfor (var i = 0; i < hier.length; i++) {\n\t\tvar temp = $(hier[i]);\n\t\tif (temp.hasClass(\"commands_list_div\")) {\n\t\t\testa_na_div_correta = true;\n\t\t} \n\t\tif (temp.data('fun') == function_obj) {\n\t\t\testa_correto = true;\n\t\t\tbreak;\n\t\t}\n\t}\n\tif (!esta_correto) {\n\t\t// has_element_created_draged = false;\n\t\t// which_element_is_draged = null;\n\t\tdragTrash(event);\n\t\treturn;\n\t} else {\n\t\tif (!esta_na_div_correta) {\n\t\t\t// has_element_created_draged = false;\n\t\t\t// which_element_is_draged = null;\n\t\t\tdragTrash(event);\n\t\t\treturn;\n\t\t}\n\t}\n\tvar hierarquia_bottom_up = null;\n\t// Agora é descobrir qual o escopo para adicionar o comando:\n\tconsole.log('ev0');\n\t// Se o elemento clicado possuir o atributo \"fun\", então, é direto na div dos comandos:\n\tif (typeof el.data('fun') !== 'undefined') {\n\n\t\t// Se a lista de comandos estiver vazia, então é o primeiro.\n\t\t// Portanto, ele deve soltar o elemento obrigatoriamente no objeto vazio\n\t\tif ((el.data('fun').commands == null) || (el.data('fun').commands.length == 0)) {\n\t\t\t\t// pode adicionar \n\t\t\t\tel.data('fun').commands = [];\n\n\t\t\t\tvar new_cmd = genericCreateCommand(command_type);\n\t\t\t\tregisterUserEvent(function_obj.name, ActionTypes.INSERT_COMMAND, command_type, '/', 0);\n\n\t\t\t\tel.data('fun').commands.push(new_cmd);\n\n\t\t\t\trenderCommand(new_cmd, $(function_container).find('.commands_list_div'), 3, function_obj);\n\t\t\t\n\t\t} else { // Entra nesse else, caso já existam outros comandos no bloco:\n\n\t\t\tfindNearbyCommandToAddInFunctionScope(el, event, $(function_container).find('.commands_list_div'), function_obj, command_type);\n\t\t}\n\n\t} else {\n\t\tconsole.log(\"soltou em um comando\");\n\t\t// descobrir em qual comando ele soltou: \n\t\tvar hier_find = el.parentsUntil(\".commands_list_div\");\n\t\thierarquia_bottom_up = [];\n\t\tif (typeof el.data('command') !== 'undefined') {\n\t\t\thierarquia_bottom_up.push(el.data('command'));\n\t\t}\n\t\tfor (var i = 0; i < hier_find.length; i++) {\n\t\t\tif (typeof $(hier_find[i]).data('command') !== 'undefined') {\n\t\t\t\thierarquia_bottom_up.push($(hier_find[i]).data('command'));\n\t\t\t}\n\t\t}\n\t\tconsole.log(\"comando em que soltou: \");\n\t\tconsole.log(hierarquia_bottom_up[0]);\n\t\tconsole.log(\"hierarquia de baixo para cima na árvore, de onde ele soltou: \");\n\t\tfor (var i = 0; i < hierarquia_bottom_up.length; i++) {\n\t\t\tconsole.log(hierarquia_bottom_up[i]);\n\t\t}\n\n\t\t// Se for do tipo break, verificar se está no contexto correto: \n\t\t// Caso não esteja no contexto, apenas retorna sem dar continuidade:\n\t\tvar is_correct_context = false;\n\t\tif (command_type == Models.COMMAND_TYPES.break) {\n\t\t\tfor (var i = 0; i < hierarquia_bottom_up.length; i++) {\n\t\t\t\tif ((hierarquia_bottom_up[i].type == Models.COMMAND_TYPES.repeatNtimes)\n\t\t\t\t\t|| (hierarquia_bottom_up[i].type == Models.COMMAND_TYPES.whiletrue)\n\t\t\t\t\t|| (hierarquia_bottom_up[i].type == Models.COMMAND_TYPES.dowhiletrue)\n\t\t\t\t\t|| (hierarquia_bottom_up[i].type == Models.COMMAND_TYPES.switch)) {\n\n\t\t\t\t\tis_correct_context = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!is_correct_context) {\n\t\t\t\tconsole.error(\"Context not allowed to insert BREAK COMMAND!\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\t// se a hierarquia possuir apenas um elemento, então está na raiz dos comandos: \n\t\tif (hierarquia_bottom_up.length == 1) {\n\t\t\tconsole.log('QQ1');\n\t\t\tvar sub_elemento = false;\n\t\t\tfor (var i = 0; i < hier_find.length; i++) {\n\t\t\t\tif (typeof $(hier_find[i]).data('command') !== 'undefined') {\n\t\t\t\t\tconsole.log('QQ2');\n\t\t\t\t\tfindBeforeOrAfterCommandToAdd(hier_find[i], event, function_obj, command_type);\n\t\t\t\t\tsub_elemento = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!sub_elemento) {\n\t\t\t\tconsole.log('QQ3');\n\t\t\t\tfindBeforeOrAfterCommandToAdd(el[0], event, function_obj, command_type);\n\t\t\t}\n\t\t} else {\n\t\t\tconsole.log('QQ4');\n\t\t\t// caso exista mais de um elemento na hierarquia:\n\t\t\tif (typeof $(el).data('command') !== 'undefined') {\n\t\t\t\tconsole.log('QQ5');\n\t\t\t\tconsole.log(\"PPP1\");\n\t\t\t\tinsertCommandInBlockHierar(el[0], event, function_obj, command_type, hier_find, hierarquia_bottom_up);\n\t\t\t} else {\n\t\t\t\tconsole.log('QQ6');\n\t\t\t\tvar sub_elemento = false;\n\t\t\t\tfor (var i = 0; i < hier_find.length; i++) {\n\t\t\t\t\tif (typeof $(hier_find[i]).data('command') !== 'undefined') {\n\t\t\t\t\t\tconsole.log('QQ7');\n\t\t\t\t\t\tinsertCommandInBlockHierar(hier_find[i], event, function_obj, command_type, hier_find, hierarquia_bottom_up);\n\t\t\t\t\t\tsub_elemento = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t}\n\t\n\t// has_element_created_draged = false;\n\t// which_element_is_draged = null;\n\n\tif (hierarquia_bottom_up) {\n\t\tconsole.log('\\n\\n:::índices::\\n\\n');\n\t\tvar i = hierarquia_bottom_up.length - 1;\n\t\tvar starter_index = window.program_obj.functions[window.program_obj.functions.indexOf(function_obj)].commands.indexOf(hierarquia_bottom_up[i]);\n\t\tvar all_str_path = starter_index + '-' + findPathRecursive(starter_index, hierarquia_bottom_up, function_obj);\n\t\tregisterUserEvent(function_obj.name, ActionTypes.INSERT_COMMAND, command_type, '/' , all_str_path);\n\t\tconsole.log('\\n\\nfull path: \\n\\n', all_str_path);\n\t\tconsole.log('fim dos índices');\n\t}\n\n\trenderAlgorithm();\n}\n\nfunction insertCommandInBlockHierar (el, event, function_obj, command_type, hier_dom, hier_obj) {\n\tvar el_jq = $(el);\n\tvar command_parent = el_jq.data('command');\n\t\n\tif ((el_jq.data('command').type == Models.COMMAND_TYPES.repeatNtimes) ||\n\t\t(el_jq.data('command').type == Models.COMMAND_TYPES.whiletrue) ||\n\t\t(el_jq.data('command').type == Models.COMMAND_TYPES.dowhiletrue) ||\n\t\t(el_jq.data('command').type == Models.COMMAND_TYPES.switch) ) {\n\n\t\tconsole.log('QQ17');\n\n\t\tif ((el_jq.data('command').type == Models.COMMAND_TYPES.repeatNtimes) ||\n\t\t\t(el_jq.data('command').type == Models.COMMAND_TYPES.whiletrue) ||\n\t\t\t(el_jq.data('command').type == Models.COMMAND_TYPES.dowhiletrue) ) {\n\n\t\t\tconsole.log('QQ18');\n\n\t\t\t// Se não tiver outro comando ainda no bloco, só adiciona: \n\t\t\tif (command_parent.commands_block == null || command_parent.commands_block.length == 0) {\n\t\t\t\tcommand_parent.commands_block = [];\n\n\t\t\t\tvar recentComand = genericCreateCommand(command_type);\n\t\t\t\tcommand_parent.commands_block.push(recentComand);\n\t\t\t\tregisterUserEvent(function_obj.name, ActionTypes.INSERT_COMMAND, command_type, '/' + el_jq.data('command').type, 0);\n\n\t\t\t\trenderCommand(recentComand, el_jq.find('.block_commands'), 3, function_obj);\n\t\t\t} else { // Se já tem algum comando no bloco:\n\t\t\t\tfindNearbyCommandToAddInBlockScope(el, event, el, function_obj, command_type, command_parent);\n\t\t\t}\n\n\t\t} else {\n\t\t\t// QUANDO FOR BLOCO DO TIPO IF OU SWITCH/CASE:\n\t\t\taddCommandToSwitchCase(event, function_obj, command_type);\n\t\t}\n\n\t} else {\n\t\tconsole.log('QQ19');\n\t\t// entra neste bloco, se soltou o comando sobre outro comando dentro de um subbloco:\n\t\tfindBeforeOrAfterCommandToAddInsertBlock(el, event, function_obj, command_type);\n\t}\n}\n\nfunction findNearbyCommandToAddInBlockScope (el, event, node_list_commands, function_obj, command_type, command_parent) {\n\n\tconsole.log(\"\\n\\n\\n::COMANDOS:\\n\\n\", el, event, node_list_commands, function_obj, command_type, command_parent);\n\n\tvar all_sub = $(node_list_commands).find('div.command_container');\n\n\tvar menor_distancia = 999999999;\n\tvar elemento_menor_distancia = null;\n\tvar antes = true;\n\n\tvar t_bot;\n\tvar t_top;\n\n\t// Descobrindo o elemento mais próximo:\n\tfor (var i = 0; i < all_sub.length; i++) {\n\t\n\t\tt_top = all_sub[i].getBoundingClientRect().top;\n\t\tt_bot = all_sub[i].getBoundingClientRect().top + all_sub[i].getBoundingClientRect().height;\n\n\t\tif ((t_top - event.clientY) < menor_distancia) {\n\t\t\tmenor_distancia = event.clientY - t_top;\n\t\t\telemento_menor_distancia = all_sub[i];\n\t\t}\n\t}\n\n\tvar borda_inferior = elemento_menor_distancia.parentNode.getBoundingClientRect().top + elemento_menor_distancia.parentNode.getBoundingClientRect().height;\n\t\n\t// Está mais próximo da borda de baixo, ou seja.. inserir por último:\n\tif ((borda_inferior - event.clientY) < menor_distancia) {\n\t\t\n\t\tvar recentComand = genericCreateCommand(command_type);\n\t\tcommand_parent.commands_block.push(recentComand);\n\t\t//\n\t\trenderCommand(recentComand, node_list_commands, 3, function_obj);\n\n\t} else {\n\n\t\tvar recentComand = genericCreateCommand(command_type);\n\n\t\tvar index = command_parent.commands_block.indexOf($(elemento_menor_distancia).data('command'));\n\n\t\tif (index > -1) {\n\t\t command_parent.commands_block.splice(index, 0, recentComand);\n\t\t}\n\n\t\trenderCommand(recentComand, elemento_menor_distancia, 1, function_obj);\n\t}\n}\n\nfunction findBeforeOrAfterCommandToAddInsertBlock (el, event, function_obj, command_type) {\n\n\tvar el_jq = $(el);\n\tvar command_parent = $(el.parentNode.parentNode).data('command');\n\tvar command_target = el_jq.data('command');\n\tvar temp_parent = $(el.parentNode.parentNode);\n\n\tvar is_in_else = false;\n\n\tif (!command_parent) {\n\t\tcommand_parent = el_jq.data('command');\n\t\ttemp_parent = el_jq;\n\t\tvar hier = el_jq.parentsUntil(\".command_container\");\n\n\t\tfor (var i = 0; i < hier.length; i++) {\n\t\t\tvar temp = $(hier[i]);\n\t\t\tif (typeof temp.data('else') != 'undefined') {\n\t\t\t\tis_in_else = true;\n\t\t\t}\n\t\t\tif (typeof temp.data('command') != 'undefined') {\n\t\t\t\tcommand_parent = temp.data('command');\n\t\t\t\ttemp_parent = temp;\n\t\t\t}\n\t\t}\n\t}\n\n\n\tvar hier = el_jq.parentsUntil(\".command_container\");\n\tfor (var i = 0; i < hier.length; i++) {\n\t\tvar temp = $(hier[i]);\n\t\tif (typeof temp.data('else') != 'undefined') {\n\t\t\tis_in_else = true;\n\t\t}\n\t}\n\n\tif (command_parent == command_target) {\n\t\tvar hier = el_jq.parentsUntil(\".command_container\");\n\n\t\tfor (var i = 0; i < hier.length; i++) {\n\t\t\tvar temp = $(hier[i]);\n\t\t\tif (typeof temp.data('else') !== 'undefined') {\n\t\t\t\tis_in_else = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tif ((command_parent.type != Models.COMMAND_TYPES.iftrue) && (command_parent.type != Models.COMMAND_TYPES.switch)) {\n\t\tvar hier = temp_parent.parentsUntil(\".all_cases_div\");\n\t\tconsole.log(\"vou procurar!!\");\n\t\tfor (var i = 0; i < hier.length; i++) {\n\t\t\tconsole.log(\"estou vasculhando...\");\n\t\t\tvar temp = $(hier[i]);\n\t\t\tif (typeof temp.data('switchcase') !== 'undefined') {\n\t\t\t\tconsole.log(\"encontrei\");\n\t\t\t\tcommand_parent = temp.data('switchcase');\n\t\t\t\tis_in_else = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tconsole.log('debugging:');\n\tconsole.log('el_jq');\n\tconsole.log(el_jq);\n\tconsole.log('command_parent');\n\tconsole.log(command_parent);\n\tconsole.log('command_target');\n\tconsole.log(command_target);\n\n\tvar menor_distancia = 999999999;\n\tvar antes = true;\n\n\tvar t_bot;\n\tvar t_top;\n\n\tt_top = el.getBoundingClientRect().top;\n\tt_bot = el.getBoundingClientRect().top + el.getBoundingClientRect().height;\n\n\tvar d_top = event.clientY - t_top; // distancia topo\n\tvar d_bot = t_bot - event.clientY; // distancia baixo\n\n\t// Está mais próximo da borda de baixo, ou seja.. inserir por último:\n\n\tif (d_top < d_bot) {\n\t\t\n\t\tvar recentComand = genericCreateCommand(command_type);\n\n\t\tconsole.log('MMM1');\n\n\t\tif (is_in_else) {\n\n\t\t\tconsole.log('MMM2');\n\n\t\t\tif (command_parent == command_target) {\n\t\t\t\tconsole.log('MMM3');\n\t\t\t\tif (command_parent.commands_else == null || command_parent.commands_else.length == 0) {\n\t\t\t\t\tcommand_parent.commands_else = [];\n\n\t\t\t\t\tvar recentComand = genericCreateCommand(command_type);\n\t\t\t\t\tcommand_parent.commands_else.push(recentComand);\n\n\t\t\t\t\trenderCommand(recentComand, el_jq, 3, function_obj);\n\t\t\t\t} else { // Se já tem algum comando no bloco:\n\t\t\t\t\tfindInBlockCorrectPlace(el_jq, event, function_obj, command_type, true);\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconsole.log('MMM7');\n\t\t\tvar index = command_parent.commands_else.indexOf(command_target);\n\n\t\t\tif (index > -1) {\n\t\t\t command_parent.commands_else.splice(index, 0, recentComand);\n\t\t\t}\n\n\t\t\trenderCommand(recentComand, el, 1, function_obj);\n\t\t} else {\n\t\t\tconsole.log('MMM4');\n\t\t\tif (command_parent == command_target) {\n\t\t\t\tconsole.log('Nxxxx5');\n\t\t\t\tif (command_parent.commands_block == null || command_parent.commands_block.length == 0) {\n\t\t\t\t\tcommand_parent.commands_block = [];\n\t\t\t\t\tconsole.log('SSS4');\n\t\t\t\t\tvar recentComand = genericCreateCommand(command_type);\n\t\t\t\t\tcommand_parent.commands_block.push(recentComand);\n\n\t\t\t\t\trenderCommand(recentComand, el_jq, 3, function_obj);\n\t\t\t\t} else {\n\t\t\t\t\tconsole.log('SSS5');\n\t\t\t\t\tfindInBlockCorrectPlace(el_jq, event, function_obj, command_type);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconsole.log('MMM6');\n\n\t\t\tvar index = command_parent.commands_block.indexOf(command_target);\n\n\t\t\tif (index > -1) {\n\t\t\t command_parent.commands_block.splice(index, 0, recentComand);\n\t\t\t}\n\n\t\t\trenderCommand(recentComand, el, 1, function_obj);\n\t\t}\n\n\t\t\n\n\t} else {\n\t\tconsole.log('XXX1');\n\t\tvar recentComand = genericCreateCommand(command_type);\n\n\t\tif (is_in_else) {\n\n\t\t\tif (command_parent == command_target) {\n\t\t\t\tconsole.log('MMM3');\n\t\t\t\tif (command_parent.commands_else == null || command_parent.commands_else.length == 0) {\n\t\t\t\t\tcommand_parent.commands_else = [];\n\t\t\t\t\tconsole.log('SSS1');\n\t\t\t\t\tvar recentComand = genericCreateCommand(command_type);\n\t\t\t\t\tcommand_parent.commands_else.push(recentComand);\n\n\t\t\t\t\trenderCommand(recentComand, el_jq, 3, function_obj);\n\t\t\t\t} else { // Se já tem algum comando no bloco:\n\t\t\t\t\tconsole.log('SSS2');\n\t\t\t\t\tfindInBlockCorrectPlace(el_jq, event, function_obj, command_type, true);\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconsole.log('XXX2');\n\t\t\tvar index = command_parent.commands_else.indexOf(command_target);\n\n\t\t\tif (index > -1) {\n\t\t\t command_parent.commands_else.splice((index + 1), 0, recentComand);\n\t\t\t}\n\n\t\t\trenderCommand(recentComand, el, 2, function_obj);\n\n\t\t} else {\n\n\t\t\tif (command_parent == command_target) {\n\t\t\t\tconsole.log('Nxxxx78');\n\t\t\t\tif (command_parent.commands_block == null || command_parent.commands_block.length == 0) {\n\t\t\t\t\tcommand_parent.commands_block = [];\n\n\t\t\t\t\tvar recentComand = genericCreateCommand(command_type);\n\t\t\t\t\tcommand_parent.commands_block.push(recentComand);\n\t\t\t\t\tconsole.log('SSS6');\n\t\t\t\t\trenderCommand(recentComand, el_jq, 3, function_obj);\n\t\t\t\t} else {\n\t\t\t\t\tconsole.log('SSS7');\n\t\t\t\t\tfindInBlockCorrectPlace(el_jq, event, function_obj, command_type);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconsole.log('XXX3');\n\t\t\tvar index = command_parent.commands_block.indexOf(command_target);\n\n\t\t\tif (index > -1) {\n\t\t\t command_parent.commands_block.splice((index + 1), 0, recentComand);\n\t\t\t}\n\n\t\t\trenderCommand(recentComand, el, 2, function_obj);\n\t\t}\n\n\t\t\n\t}\n}\n\nfunction insertCommandInBlock (el, event, function_obj, command_type) {\n\tvar el_jq = $(el);\n\tvar command_parent = el_jq.data('command');\n\n\tif ((el_jq.data('command').type == Models.COMMAND_TYPES.repeatNtimes) ||\n\t\t(el_jq.data('command').type == Models.COMMAND_TYPES.whiletrue) ||\n\t\t(el_jq.data('command').type == Models.COMMAND_TYPES.dowhiletrue) ) {\n\n\t\t// Se não tiver outro comando ainda no bloco, só adiciona: \n\t\tif (command_parent.commands_block == null || command_parent.commands_block.length == 0) {\n\t\t\tcommand_parent.commands_block = [];\n\n\t\t\tvar recentComand = genericCreateCommand(command_type);\n\t\t\tcommand_parent.commands_block.push(recentComand);\n\n\t\t\trenderCommand(recentComand, el_jq.find('.block_commands'), 3, function_obj);\n\t\t} else { // Se já tem algum comando no bloco:\n\t\t\tfindInBlockCorrectPlace(el, event, function_obj, command_type);\n\t\t}\n\n\t} else if (el_jq.data('command').type == Models.COMMAND_TYPES.iftrue) {\n\n\t\tconsole.log('QQ9');\n\t\t\n\t\t// no if ou no else?\n\t\tvar correct_div = $(document.elementFromPoint(event.pageX, event.pageY));\n\t\tvar is_in_if = true;\n\t\tif (correct_div.data('if')) {\n\t\t\tis_in_if = true;\n\t\t} else if (correct_div.data('else')) {\n\t\t\tis_in_if = false;\n\t\t} else {\n\t\t\tvar hier = correct_div.parentsUntil(\".command_container\");\n\t\t\tfor (var i = 0; i < hier.length; i++) {\n\t\t\t\tvar temp = $(hier[i]);\n\t\t\t\tif (typeof temp.data('if') !== 'undefined') {\n\t\t\t\t\tis_in_if = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif (typeof temp.data('else') !== 'undefined') {\n\t\t\t\t\tis_in_if = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (is_in_if) {\n\t\t\tif (command_parent.commands_block == null || command_parent.commands_block.length == 0) {\n\t\t\t\tcommand_parent.commands_block = [];\n\n\t\t\t\tvar recentComand = genericCreateCommand(command_type);\n\t\t\t\tcommand_parent.commands_block.push(recentComand);\n\n\t\t\t\trenderCommand(recentComand, el_jq.find('.commands_if'), 3, function_obj);\n\t\t\t} else { // Se já tem algum comando no bloco:\n\t\t\t\tfindInBlockCorrectPlace(el_jq.find('.commands_if'), event, function_obj, command_type);\n\t\t\t}\n\n\t\t} else {\n\t\t\tif (command_parent.commands_else == null || command_parent.commands_else.length == 0) {\n\t\t\t\tcommand_parent.commands_else = [];\n\n\t\t\t\tvar recentComand = genericCreateCommand(command_type);\n\t\t\t\tcommand_parent.commands_else.push(recentComand);\n\n\t\t\t\trenderCommand(recentComand, el_jq.find('.commands_else'), 3, function_obj);\n\t\t\t} else { // Se já tem algum comando no bloco:\n\t\t\t\tfindInBlockCorrectPlace(el_jq.find('.commands_else'), event, function_obj, command_type, true);\n\t\t\t}\n\n\t\t}\n\n\t} else { // é do tipo switch\n\t\tconsole.log(\"está tentando inserir em um switch que está na raiz!\");\n\t\taddCommandToSwitchCase(event, function_obj, command_type);\n\t}\n}\n\nfunction addCommandToSwitchCase (event, function_obj, command_type) {\n\n\tvar el = $(document.elementFromPoint(event.clientX, event.clientY));\n\n\tvar which_case = el.data('switchcase');\n\tvar case_div = el;\n\t\n\tif (!which_case) {\n\t\tvar hier_find = el.parentsUntil(\".all_cases_div\");\n\t\tfor (var i = 0; i < hier_find.length; i++) {\n\t\t\tif (typeof $(hier_find[i]).data('switchcase') !== 'undefined') {\n\t\t\t\twhich_case = $(hier_find[i]).data('switchcase');\n\t\t\t\tcase_div = $(hier_find[i]);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (which_case.commands_block == null || which_case.commands_block.length < 1) {\n\t\twhich_case.commands_block = [];\n\n\t\tvar recentComand = genericCreateCommand(command_type);\n\t\twhich_case.commands_block.push(recentComand);\n\t\trenderCommand(recentComand, case_div.find('.case_commands_block'), 3, function_obj);\n\t} else {\n\t\tfindInBlockCorrectPlaceInSwitchCase(which_case, case_div, event, function_obj, command_type);\n\t}\n\n}\n\n\n\n\nfunction findInBlockCorrectPlaceInSwitchCase (which_case, case_div, event, function_obj, command_type) {\n\n\tvar all_sub = case_div.find('div.command_container');\n\n\tvar menor_distancia = 999999999;\n\tvar elemento_menor_distancia = null;\n\tvar antes = true;\n\n\tvar t_bot;\n\tvar t_top;\n\n\t// Descobrindo o elemento mais próximo:\n\tfor (var i = 0; i < all_sub.length; i++) {\n\t\n\t\tt_top = all_sub[i].getBoundingClientRect().top;\n\t\tt_bot = all_sub[i].getBoundingClientRect().top + all_sub[i].getBoundingClientRect().height;\n\n\t\tif ((t_top - event.clientY) < menor_distancia) {\n\t\t\tmenor_distancia = event.clientY - t_top;\n\t\t\telemento_menor_distancia = all_sub[i];\n\t\t}\n\t}\n\n\tvar borda_inferior = elemento_menor_distancia.parentNode.getBoundingClientRect().top + elemento_menor_distancia.parentNode.getBoundingClientRect().height;\n\t\n\t// Está mais próximo da borda de baixo, ou seja.. inserir por último:\n\tif ((borda_inferior - event.clientY) < menor_distancia) {\n\t\tvar recentComand = genericCreateCommand(command_type);\n\n\t\twhich_case.commands_block.push(recentComand);\n\n\t\trenderCommand(recentComand, $(case_div.find('.case_commands_block')[0]), 3, function_obj);\n\n\t} else {\n\n\t\tvar recentComand = genericCreateCommand(command_type);\n\n\t\tvar index = which_case.commands_block.indexOf($(elemento_menor_distancia).data('command'));\n\n\t\tif (index > -1) {\n\t\t which_case.commands_block.splice(index, 0, recentComand);\n\t\t renderCommand(recentComand, elemento_menor_distancia, 1, function_obj);\n\t\t}\n\t}\n}\n\nfunction findInBlockCorrectPlace (el, event, function_obj, command_type, is_in_else = false) {\n\tvar el_jq = $(el);\n\tvar all_sub = el_jq.find('div.command_container');\n\n\tvar menor_distancia = 999999999;\n\tvar elemento_menor_distancia = null;\n\tvar antes = true;\n\n\tvar t_bot;\n\tvar t_top;\n\n\t// Descobrindo o elemento mais próximo:\n\tfor (var i = 0; i < all_sub.length; i++) {\n\t\n\t\tt_top = all_sub[i].getBoundingClientRect().top;\n\t\tt_bot = all_sub[i].getBoundingClientRect().top + all_sub[i].getBoundingClientRect().height;\n\n\t\tif ((t_top - event.clientY) < menor_distancia) {\n\t\t\tmenor_distancia = event.clientY - t_top;\n\t\t\telemento_menor_distancia = all_sub[i];\n\t\t}\n\t}\n\n\tvar borda_inferior = elemento_menor_distancia.parentNode.getBoundingClientRect().top + elemento_menor_distancia.parentNode.getBoundingClientRect().height;\n\n\tconsole.log(\"menor_distancia: \");\n\tconsole.log(elemento_menor_distancia);\n\t\n\t// Está mais próximo da borda de baixo, ou seja.. inserir por último:\n\tif ((borda_inferior - event.clientY) < menor_distancia) {\n\n\t\tconsole.log('QQ11');\n\t\t\n\t\tvar recentComand = genericCreateCommand(command_type);\n\n\t\tvar command_parent = el_jq.data('command');\n\n\t\tif (is_in_else) {\n\t\t\tconsole.log('QQ15');\n\t\t\tcommand_parent.commands_else.push(recentComand);\n\t\t\tconsole.log('el_jq');\n\t\t\tconsole.log(el_jq);\n\t\t\tconsole.log(\"$(el_jq.find('.commands_else')[0]):: \");\n\t\t\tconsole.log($(el_jq.find('.commands_else')[0]));\n\n\t\t\trenderCommand(recentComand, el_jq, 3, function_obj);\n\n\t\t} else {\n\t\t\tconsole.log('QQ16');\n\t\t\tcommand_parent.commands_block.push(recentComand);\n\n\t\t\trenderCommand(recentComand, $(el_jq.find('.block_commands')[0]), 3, function_obj);\n\t\t}\n\n\t} else {\n\n\t\tconsole.log('QQ12');\n\n\t\tvar recentComand = genericCreateCommand(command_type);\n\n\t\tvar command_parent = el_jq.data('command');\n\n\t\tif (is_in_else) {\n\n\t\t\tvar index = command_parent.commands_else.indexOf($(elemento_menor_distancia).data('command'));\n\n\t\t\tif (index > -1) {\n\t\t\t command_parent.commands_else.splice(index, 0, recentComand);\n\t\t\t renderCommand(recentComand, elemento_menor_distancia, 1, function_obj);\n\t\t\t}\n\n\t\t} else {\n\t\t\tvar index = command_parent.commands_block.indexOf($(elemento_menor_distancia).data('command'));\n\n\t\t\tif (index > -1) {\n\t\t\t command_parent.commands_block.splice(index, 0, recentComand);\n\t\t\t renderCommand(recentComand, elemento_menor_distancia, 1, function_obj);\n\t\t\t}\n\n\t\t}\n\t\t\n\t}\n}\n\nfunction findBeforeOrAfterCommandToAdd (el, event, function_obj, command_type) {\n\tswitch ($(el).data('command').type) {\n\t\tcase Models.COMMAND_TYPES.iftrue:\n\t\tcase Models.COMMAND_TYPES.switch:\n\t\tcase Models.COMMAND_TYPES.repeatNtimes:\n\t\tcase Models.COMMAND_TYPES.whiletrue:\n\t\tcase Models.COMMAND_TYPES.dowhiletrue:\n\t\t\tinsertCommandInBlock(el, event, function_obj, command_type);\n\t\t\treturn;\n\t}\n\n\tvar menor_distancia = 999999999;\n\tvar antes = true;\n\n\tvar t_bot;\n\tvar t_top;\n\n\tt_top = el.getBoundingClientRect().top;\n\tt_bot = el.getBoundingClientRect().top + el.getBoundingClientRect().height;\n\n\tvar d_top = event.clientY - t_top; // distancia topo\n\tvar d_bot = t_bot - event.clientY; // distancia baixo\n\n\t// Está mais próximo da borda de baixo, ou seja.. inserir por último:\n\tif (d_top < d_bot) {\n\t\t\n\t\tvar recentComand = genericCreateCommand(command_type);\n\n\t\tvar index = function_obj.commands.indexOf($(el).data('command'));\n\n\t\tif (index > -1) {\n\t\t function_obj.commands.splice(index, 0, recentComand);\n\t\t}\n\n\t\trenderCommand(recentComand, el, 1, function_obj);\n\t\tregisterUserEvent(function_obj.name, ActionTypes.INSERT_COMMAND, command_type, '/', index);\n\n\t} else {\n\t\tvar recentComand = genericCreateCommand(command_type);\n\n\t\tvar index = function_obj.commands.indexOf($(el).data('command'));\n\n\t\tif (index > -1) {\n\t\t function_obj.commands.splice((index + 1), 0, recentComand);\n\t\t}\n\n\t\trenderCommand(recentComand, el, 2, function_obj);\n\t\tregisterUserEvent(function_obj.name, ActionTypes.INSERT_COMMAND, command_type, '/', index);\n\t}\n}\n\nfunction findNearbyCommandToAddInFunctionScope (el, event, node_list_commands, function_obj, command_type) {\n\n\tvar all_sub = $(node_list_commands).find('div.command_container');\n\n\tvar menor_distancia = 999999999;\n\tvar elemento_menor_distancia = null;\n\tvar antes = true;\n\n\tvar t_bot;\n\tvar t_top;\n\n\t// Descobrindo o elemento mais próximo:\n\tfor (var i = 0; i < all_sub.length; i++) {\n\t\n\t\tt_top = all_sub[i].getBoundingClientRect().top;\n\t\tt_bot = all_sub[i].getBoundingClientRect().top + all_sub[i].getBoundingClientRect().height;\n\n\t\tif ((t_top - event.clientY) < menor_distancia) {\n\t\t\tmenor_distancia = event.clientY - t_top;\n\t\t\telemento_menor_distancia = all_sub[i];\n\t\t}\n\t}\n\n\tvar borda_inferior = elemento_menor_distancia.parentNode.getBoundingClientRect().top + elemento_menor_distancia.parentNode.getBoundingClientRect().height;\n\t\n\t// Está mais próximo da borda de baixo, ou seja.. inserir por último:\n\tif ((borda_inferior - event.clientY) < menor_distancia) {\n\t\t\n\t\tvar recentComand = genericCreateCommand(command_type);\n\t\tfunction_obj.commands.push(recentComand);\n\t\t//\n\t\trenderCommand(recentComand, node_list_commands, 3, function_obj);\n\t\tregisterUserEvent(function_obj.name, ActionTypes.INSERT_COMMAND, command_type, '/', function_obj.commands.length - 1);\n\n\t} else {\n\n\t\tvar recentComand = genericCreateCommand(command_type);\n\n\t\tvar index = function_obj.commands.indexOf($(elemento_menor_distancia).data('command'));\n\n\t\tif (index > -1) {\n\t\t function_obj.commands.splice(index, 0, recentComand);\n\t\t}\n\n\t\trenderCommand(recentComand, elemento_menor_distancia, 1, function_obj);\n\t\tregisterUserEvent(function_obj.name, ActionTypes.INSERT_COMMAND, command_type, '/', index);\n\t}\n}\n","import * as Models from '../ivprog_elements';\nimport { LocalizedStrings } from '../../services/localizedStringsService';\nimport * as VariableValueMenu from './variable_value_menu';\nimport * as VariableValueMenuManagement from './variable_value_menu';\nimport * as CommandsManagement from '../commands';\nimport * as ExpressionManagement from './generic_expression';\n\nexport function createFloatingCommand () {\n\treturn $('
x <— 1 + 1
');\n}\n\nexport function renderCommand (command, function_obj) {\n\t\n\tvar el = $('
'+LocalizedStrings.getUI('text_receives')+' '\n\t\t + '
');\n\tel.data('command', command);\n\n\tVariableValueMenu.renderMenu(command, command.variable, el.find('.var_attributed'), function_obj);\n\n\tif (!command.expression || command.expression.length < 1) {\n\t\tvar exp = new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true);\n\t\tcommand.expression.push(exp);\n\t}\n\n\taddHandlers(command, function_obj, el);\n\n\tExpressionManagement.renderExpression(command, function_obj, el.find('.expression_elements'), command.expression);\n\n\t//renderExpressionElements(command, function_obj, el);\n\n\treturn el;\n\n}\n\nexport function manageExpressionElements (command, ref_object, dom_object, menu_var_or_value, function_obj, selectedItem, expression_element) {\n\t\n\tvar index_to_move = expression_element.itens.indexOf(ref_object);\n\n\tswitch (selectedItem.data('exp')) {\n\t\tcase Models.EXPRESSION_ELEMENTS.exp_op_exp:\n\n\t\t\tvar exp = new Models.ExpressionElement(Models.EXPRESSION_ELEMENTS.exp_op_exp, [expression_element.itens[index_to_move],\n\t \t\tModels.ARITHMETIC_TYPES.plus, \n\t\t\t\tnew Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true)]);\n\n\t\t\texpression_element.itens[index_to_move] = exp;\n\n\t\t\tbreak;\n\n\t\tcase Models.EXPRESSION_ELEMENTS.op_exp:\n\n\t\t\tvar exp = new Models.ExpressionElement(Models.EXPRESSION_ELEMENTS.op_exp, [Models.ARITHMETIC_TYPES.plus, \n\t\t\t\texpression_element.itens[index_to_move] ]);\n\n\t\t\texpression_element.itens[index_to_move] = exp;\n\n\t\t\tbreak;\n\n\t\tcase Models.EXPRESSION_ELEMENTS.par_exp_par:\n\n\t\t\tvar exp = new Models.ExpressionElement(Models.EXPRESSION_ELEMENTS.par_exp_par, [expression_element.itens[index_to_move]]);\n\n\t\t\texpression_element.itens[index_to_move] = exp;\n\n\t\t\tbreak;\n\t}\n\n\trenderExpressionElements(command, function_obj, dom_object);\n\n}\n\nfunction renderExpressionElements (command, function_obj, el) {\n\tvar expression_div = el.find('.expression_elements');\n\tvar command_container;\n\n\tif (el.hasClass(\"command_container\") == false) {\n\t\tvar hier = el.parentsUntil(\".command_container\");\n\t\tfor (var i = 0; i < hier.length; i++) {\n\t\t\tif ($(hier[i]).hasClass(\"command_container\")) {\n\t\t\t\tcommand_container = $(hier[i]);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ($(hier[i]).hasClass(\"expression_elements\")) {\n\t\t\t\texpression_div = $(hier[i]);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (command_container) {\n\t\texpression_div = command_container.find('.expression_elements');\n\t}\n\n\texpression_div.text('');\n\n\tfor (var i = 0; i < command.expression.length; i++) {\n\n\t\tvar temp = $('
');\n\t\ttemp.data('ref_element', command.expression[i]);\n\t\ttemp.data('ref_index', i);\n\n\t\texpression_div.append(temp);\n\n\t\trenderElement(command, function_obj, temp, command.expression[i]);\n\t}\n}\n\nfunction renderOperator (command, function_obj, temp_op, expression_element, index_op) {\n\n\tvar context_menu = '
';\n\n\tswitch (expression_element.itens[index_op]) {\n\t\tcase Models.ARITHMETIC_TYPES.plus:\n\t\t\tcontext_menu += '+';\n\t\t\tbreak;\n\n\t\tcase Models.ARITHMETIC_TYPES.minus:\n\t\t\tcontext_menu += '-';\n\t\t\tbreak;\n\n\t\tcase Models.ARITHMETIC_TYPES.multiplication:\n\t\t\tcontext_menu += '*';\n\t\t\tbreak;\n\n\t\tcase Models.ARITHMETIC_TYPES.division:\n\t\t\tcontext_menu += '/';\n\t\t\tbreak;\n\n\t\tcase Models.ARITHMETIC_TYPES.module:\n\t\t\tcontext_menu += '%';\n\t\t\tbreak;\n\n\t\tcase Models.ARITHMETIC_TYPES.none:\n\t\t\tcontext_menu += '...';\n\t\t\tbreak;\n\t}\n\t\n\tcontext_menu += '
';\n\tcontext_menu += '
+
';\n\tcontext_menu += '
-
';\n\tcontext_menu += '
*
';\n\tcontext_menu += '
/
';\n\tcontext_menu += '
%
';\n\tcontext_menu += '
Nenhum
';\n\tcontext_menu += '
';\n\n\tcontext_menu = $(context_menu);\n\n\ttemp_op.append(context_menu);\n\n\tcontext_menu.dropdown({\n\t\tonChange: function(value, text, $selectedItem) {\n\t expression_element.itens[index_op] = value;\n }\n\t});\n\n}\n\nfunction renderMenuAddExpression (command, function_obj, el, dom_append_menu, expression_append_new_expression) {\n\n\tif (el.hasClass(\"command_container\") == false) {\n\t\tvar hier = el.parentsUntil(\".commands_list_div\");\n\n\t\tfor (var i = 0; i < hier.length; i++) {\n\t\t\tif ($(hier[i]).hasClass(\"command_container\")) {\n\t\t\t\tel = $(hier[i]);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (dom_append_menu.hasClass(\"expression_elements\") == false) {\n\t\tvar hier = el.parentsUntil(\".commands_list_div\");\n\n\t\tfor (var i = 0; i < hier.length; i++) {\n\t\t\tif ($(hier[i]).hasClass(\"expression_elements\")) {\n\t\t\t\tdom_append_menu = $(hier[i]);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tvar context_menu = '
';\n\tcontext_menu += '
EXP OP EXP
';\n\tcontext_menu += '
OP EXP
';\n\tcontext_menu += '
( EXP )
';\n\tcontext_menu += '
';\n\n\tcontext_menu = $(context_menu);\n\n\tdom_append_menu.append(context_menu);\n\n\tcontext_menu.dropdown({\n\t\tonChange: function(value, text, $selectedItem) {\n\t switch (value) {\n\t \tcase Models.EXPRESSION_ELEMENTS.exp_op_exp:\n\n\t \tvar exp = new Models.ExpressionElement(Models.EXPRESSION_ELEMENTS.exp_op_exp, [new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true),\n\t \t\tModels.ARITHMETIC_TYPES.plus, \n\t\t\t\tnew Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true)]);\n\n\t\t\texpression_append_new_expression.push(exp);\n\t\t\tbreak;\n\n\t\tcase Models.EXPRESSION_ELEMENTS.op_exp:\n\t\t\tvar exp = new Models.ExpressionElement(Models.EXPRESSION_ELEMENTS.op_exp, [Models.ARITHMETIC_TYPES.plus, \n\t\t\t\tnew Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true)]);\n\n\t\t\texpression_append_new_expression.push(exp);\n\t\t\tbreak;\n\n\t\tcase Models.EXPRESSION_ELEMENTS.par_exp_par:\n\n\t\t\tvar exp = new Models.ExpressionElement(Models.EXPRESSION_ELEMENTS.par_exp_par, [new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true)]);\n\n\t\t\texpression_append_new_expression.push(exp);\n\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\trenderExpressionElements(command, function_obj, el);\n }\n\t});\n\n}\n\nfunction renderElement (command, function_obj, el, expression_element) {\n\n\tswitch (expression_element.type_exp) {\n\t\tcase Models.EXPRESSION_ELEMENTS.exp_op_exp:\n\n\t\t\tvar temp_op = $('
');\n\t\t\tvar temp_exp_1 = $('
');\n\t\t\tvar temp_exp_2 = $('
');\n\n\t\t\tel.append(temp_exp_1);\n\t\t\tel.append(temp_op);\n\t\t\tel.append(temp_exp_2);\n\t\t\t\n\t\t\tif (expression_element.itens[0].type) {\n\t\t\t\tVariableValueMenu.renderMenu(command, expression_element.itens[0], temp_exp_1, function_obj, 2, expression_element);\n\t\t\t} else {\n\t\t\t\trenderElement(command, function_obj, temp_exp_1, expression_element.itens[0]);\n\t\t\t}\n\n\t\t\trenderOperator(command, function_obj, temp_op, expression_element, 1);\n\n\t\t\tif (expression_element.itens[2].type) {\n\t\t\t\tVariableValueMenu.renderMenu(command, expression_element.itens[2], temp_exp_2, function_obj, 2, expression_element);\n\t\t\t} else {\n\t\t\t\trenderElement(command, function_obj, temp_exp_2, expression_element.itens[2]);\n\t\t\t}\n\n\t\t\tbreak;\n\n\t\tcase Models.EXPRESSION_ELEMENTS.op_exp:\n\t\t\tvar temp_op = $('
');\n\t\t\tvar temp_exp = $('
');\n\n\t\t\tel.append(temp_op);\n\t\t\tel.append(temp_exp);\n\n\t\t\trenderOperator(command, function_obj, temp_op, expression_element, 0);\n\n\t\t\tif (expression_element.itens[1].type) {\n\t\t\t\tVariableValueMenu.renderMenu(command, expression_element.itens[1], temp_exp, function_obj, 2, expression_element);\n\t\t\t} else {\n\t\t\t\trenderElement(command, function_obj, temp_exp, expression_element.itens[1]);\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase Models.EXPRESSION_ELEMENTS.par_exp_par:\n\n\t\t\tvar temp_par_1 = $('
(
');\n\t\t\tvar temp_exp = $('
');\n\t\t\tvar temp_par_2 = $('
)
');\n\n\t\t\tel.append(temp_par_1);\n\t\t\tel.append(temp_exp);\n\n\t\t\tfor (var j = 0; j < expression_element.itens.length; j++) {\n\t\t\t\tif (expression_element.itens[j].type) {\n\t\t\t\t\tVariableValueMenu.renderMenu(command, expression_element.itens[j], temp_exp, function_obj, 2, expression_element);\n\t\t\t\t} else {\n\t\t\t\t\trenderElement(command, function_obj, temp_exp, expression_element.itens[j]);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\n\t\t\t//renderMenuAddExpression(command, function_obj, el, el, expression_element.itens);\n\n\t\t\tel.append(temp_par_2);\n\n\t\t\tbreak;\n\t}\n\n}\n\n\nfunction renderExpression (command, function_obj, el) {\n\n\tvar expression_div = el.find('.expression_elements');\n\texpression_div.text('');\n\n\tvar menu_add_item = $('
');\n\tmenu_add_item.data('index_add', 0);\n\n\texpression_div.append(menu_add_item);\n\t\n\tfor (var i = 0; i < command.expression.length; i++) {\n\n\t\tif (command.expression[i].type) {\n\n\t\t\tvar temp = $('
');\n\t\t\ttemp.data('ref_element', command.expression[i]);\n\t\t\ttemp.data('ref_index', i);\n\n\t\t\texpression_div.append(temp);\n\n\t\t\tVariableValueMenu.renderMenu(command, command.expression[i], temp, function_obj);\n\n\t\t} else if (command.expression[i] == \"(\" || command.expression[i] == \")\") {\n\n\t\t\tvar temp = $('
'+command.expression[i]+'
');\n\t\t\ttemp.data('ref_element', command.expression[i]);\n\t\t\ttemp.data('ref_index', i);\n\n\t\t\texpression_div.append(temp);\n\n\t\t} else {\n\n\t\t\tvar temp = '
';\n\n\t\t\tswitch(command.expression[i]) {\n\t\t\t\tcase Models.ARITHMETIC_TYPES.plus:\n\t\t\t\t\ttemp += '+';\n\t\t\t\t\tbreak;\n\t\t\t\tcase Models.ARITHMETIC_TYPES.minus:\n\t\t\t\t\ttemp += '-';\n\t\t\t\t\tbreak;\n\t\t\t\tcase Models.ARITHMETIC_TYPES.multiplication:\n\t\t\t\t\ttemp += '*';\n\t\t\t\t\tbreak;\n\t\t\t\tcase Models.ARITHMETIC_TYPES.division:\n\t\t\t\t\ttemp += '/';\n\t\t\t\t\tbreak;\n\t\t\t\tcase Models.ARITHMETIC_TYPES.module:\n\t\t\t\t\ttemp += '%';\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\ttemp += '
';\n\t\t\ttemp = $(temp);\n\t\t\ttemp.data('ref_element', command.expression[i]);\n\t\t\ttemp.data('ref_index', i);\n\n\t\t\texpression_div.append(temp);\n\n\t\t}\n\t\t\n\t\tvar menu_add_item_seq = $('
');\n\t\tvar index_temp = (i + 1);\n\t\tmenu_add_item_seq.data('index_add', index_temp);\n\t\texpression_div.append(menu_add_item_seq);\n\n\t}\n\n\taddMenuItens(command, function_obj, el);\n\n}\n\nfunction addMenuItens (command, function_obj, expression_div) {\n\tvar divs_expression = expression_div.find('.menu_add_item');\n\n\tfor (var i = 0; i < divs_expression.length; i++) {\n\n\t\tvar temp = $(divs_expression[i]).data('index_add');\n\n\t\tvar context_menu = '
';\n\t\tcontext_menu += '
'+LocalizedStrings.getUI('text_value')+'
';\n\t\tcontext_menu += '
'+LocalizedStrings.getUI('text_operator')+'
';\n\t\tcontext_menu += '
'+LocalizedStrings.getUI('text_parentheses')+'
';\n\t\tcontext_menu += '
';\n\n\t\tcontext_menu = $(context_menu);\n\n\t\t$(divs_expression[i]).append(context_menu);\n\n\t\tcontext_menu.dropdown({\n\t on: 'hover',\n\t onChange: function(value, text, $selectedItem) {\n \t\tswitch ($selectedItem.data('option')) {\n \t\t\tcase \"value\":\n \t\t\t\tcommand.expression.splice($selectedItem.data('index'), 0, new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true));\n \t\t\t\trenderExpression(command, function_obj, expression_div);\n \t\t\t\tbreak;\n \t\t\tcase \"operator\":\n \t\t\t\tcommand.expression.splice($selectedItem.data('index'), 0, Models.ARITHMETIC_TYPES.plus);\n \t\t\t\trenderExpression(command, function_obj, expression_div);\n \t\t\t\tbreak;\n \t\t\tcase \"parentheses\":\n \t\t\t\tcommand.expression.splice($selectedItem.data('index'), 0, \"(\");\n \t\t\t\tcommand.expression.splice($selectedItem.data('index') + 1, 0, new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true));\n \t\t\t\tcommand.expression.splice($selectedItem.data('index') + 2, 0, \")\");\n \t\t\t\trenderExpression(command, function_obj, expression_div);\n \t\t\t\tbreak;\n \t\t }\n \t}\n\t });\n\n\t}\n}\n\n\nfunction addHandlers (command, function_obj, attribution_dom) {\n\n\tattribution_dom.find('.button_remove_command').on('click', function() {\n\t\tif (CommandsManagement.removeCommand(command, function_obj, attribution_dom)) {\n\t\t\tattribution_dom.fadeOut(400, function() {\n\t\t\t\tattribution_dom.remove();\n\t\t\t});\n\t\t}\n\t});\n\n\tattribution_dom.find('.button_refresh_attribution').on('click', function() {\n\t\trenderExpressionElements(command, function_obj, attribution_dom);\n\t});\n}\n\nexport function renderMenuOperations (command, ref_object, dom_object, menu_var_or_value, function_obj, variable_selected) {\n\n\t/*console.log(\"recebido o seguinte DOM: \");\n\tconsole.log(dom_object);\n\n\tif (dom_object.hasClass('var_attributed')) {\n\t\treturn;\n\t} else {\n\t\tvar hier = dom_object.parentsUntil(\".command_container\");\n\t\tfor (var i = 0; i < hier.length; i++) {\n\t\t\tif ($(hier[i]).hasClass('var_attributed') || $(hier[i]).hasClass('parameters_function_called')) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\n\t\t\n\t}\n\n\tdom_object.find('.context_menu_clear').remove();\n\n\n\tvar menu_operations = '
';\n\n\tfor (var tm in Models.ARITHMETIC_TYPES) {\n\n\t\tmenu_operations += '
'+LocalizedStrings.getUI('btn_arithmetic_' + tm)+'
';\n }\n menu_operations += '
'+LocalizedStrings.getUI('btn_clear')+'
';\n\t\n menu_operations += '
';\n\n menu_operations = $(menu_operations);\n\n dom_object.append(menu_operations);\n\n menu_operations.dropdown({\n \tonChange: function(value, text, $selectedItem) {\n \t\tswitch ($($selectedItem).data('option')) {\n \t\t\tcase \"clear\":\n\t \t\t\t$(dom_object).text('');\n\t\t \t \tVariableValueMenu.renderMenu(command, ref_object, dom_object, function_obj);\n \t\t\t\tbreak;\n \t\t\tdefault:\n \t\t\t\tcreateExpressionAround(command, ref_object, dom_object, function_obj);\n \t\t\t\tmenu_operations.find('.text').text('');\n \t\t}\n }\n });*/\n}\n\nfunction createExpressionAround (command, ref_object, dom_object, function_obj) {\n\t$(' ( ').insertBefore(dom_object);\n\t$(' ) ').insertAfter(dom_object);\n\n\tVariableValueMenu.renderMenu(command, new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true), dom_object, function_obj);\n}\n\n","import { LocalizedStrings } from '../../services/localizedStringsService';\nimport * as CommandsManagement from '../commands';\n\nexport function createFloatingCommand () {\n\treturn $('
'+LocalizedStrings.getUI('text_break')+'
');\n}\n\nexport function renderCommand (command, function_obj) {\n\tvar el = $('
'+LocalizedStrings.getUI('text_break')+'
');\n\tel.data('command', command);\n\n\taddHandlers(command, function_obj, el);\n\n\treturn el;\n}\n\nfunction addHandlers (command, function_obj, break_dom) {\n\n\tbreak_dom.find('.button_remove_command').on('click', function() {\n\t\tif (CommandsManagement.removeCommand(command, function_obj, break_dom)) {\n\t\t\tbreak_dom.fadeOut(400, function() {\n\t\t\t\tbreak_dom.remove();\n\t\t\t});\n\t\t}\n\t});\n}\n","import { LocalizedStrings } from '../../services/localizedStringsService';\nimport * as VariableValueMenu from './variable_value_menu';\nimport * as CommandsManagement from '../commands';\n\nexport function createFloatingCommand () {\n\treturn $('
'+LocalizedStrings.getUI('text_comment')+'
');\n}\n\nexport function renderCommand (command, function_obj) {\n\tvar el = $('
'+'
');\n\tel.data('command', command);\n\n\taddHandlers(command, function_obj, el);\n\n\trenderTextComment(command, function_obj, el);\n\n\treturn el;\n}\n\nfunction renderTextComment (command, function_obj, el) {\n\tVariableValueMenu.renderMenu(command, command.comment_text, el.find('.var_value_menu_div'), function_obj, 20);\n}\n\nfunction addHandlers (command, function_obj, comment_dom) {\n\n\tcomment_dom.find('.button_remove_command').on('click', function() {\n\t\tif (CommandsManagement.removeCommand(command, function_obj, comment_dom)) {\n\t\t\tcomment_dom.fadeOut(400, function() {\n\t\t\t\tcomment_dom.remove();\n\t\t\t});\n\t\t}\n\t});\n}\n","import * as Models from '../ivprog_elements';\nimport { LocalizedStrings } from '../../services/localizedStringsService';\nimport * as VariableValueMenuManagement from './variable_value_menu';\n\n\nexport function renderExpression (command, expression, function_obj, initial_el_to_render) {\n\n\texpression.dom_object = initial_el_to_render;\n\n\tif (expression.expression == null || expression.expression.length < 1) {\n\n\t\trenderStartMenu(command, expression, function_obj, initial_el_to_render);\n\n\t} else {\n\t\t\n\t\tvar main_div = $('
');\n\n\t\tswitch (expression.expression.type) {\n\t\t\tcase Models.EXPRESSION_TYPES.exp_logic:\n\t\t\t\trenderLogicExpression(command, expression, expression.expression, function_obj, main_div, initial_el_to_render);\n\t\t\t\tbreak;\n\t\t\tcase Models.EXPRESSION_TYPES.exp_arithmetic:\n\t\t\t\trenderArithmeticExpression(command, expression, expression.expression, function_obj, main_div);\n\t\t\t\tbreak;\n\t\t}\n\n\t\tinitial_el_to_render.append(main_div);\t\n\t\tvar restartMenu = $('
');\n\t\tinitial_el_to_render.append(restartMenu);\t\n\t\trestartMenu.on('click', function(e){\n\t \texpression.expression = null;\n\t \tinitial_el_to_render.empty();\n\t \trenderExpression(command, expression, function_obj, initial_el_to_render);\n\t \t});\n\t}\n}\n\nfunction renderArithmeticOperator (command, all_expression, expression_arithmetic, arithmetic_operator, function_obj, element_to_append) {\n\n\tvar menu_operator = $('
');\n\tmenu_operator.dropdown({\n\t values: [\n\t {\n\t name : '>',\n\t value : Models.ARITHMETIC_COMPARISON.greater_than,\n\t selected : (arithmetic_operator == Models.ARITHMETIC_COMPARISON.greater_than)\n\t },\n\t {\n\t name : '<',\n\t value : Models.ARITHMETIC_COMPARISON.less_than,\n\t selected : (arithmetic_operator == Models.ARITHMETIC_COMPARISON.less_than)\n\t },\n\t {\n\t name : '==',\n\t value : Models.ARITHMETIC_COMPARISON.equals_to,\n\t selected : (arithmetic_operator == Models.ARITHMETIC_COMPARISON.equals_to)\n\t },\n\t {\n\t name : '!=',\n\t value : Models.ARITHMETIC_COMPARISON.not_equals_to,\n\t selected : (arithmetic_operator == Models.ARITHMETIC_COMPARISON.not_equals_to)\n\t },\n\t {\n\t name : '>=',\n\t value : Models.ARITHMETIC_COMPARISON.greater_than_or_equals_to,\n\t selected : (arithmetic_operator == Models.ARITHMETIC_COMPARISON.greater_than_or_equals_to)\n\t },\n\t {\n\t name : '<=',\n\t value : Models.ARITHMETIC_COMPARISON.less_than_or_equals_to,\n\t selected : (arithmetic_operator == Models.ARITHMETIC_COMPARISON.less_than_or_equals_to)\n\t }\n\t ],\n\t onChange: function(value, text, $selectedItem) {\n\t \texpression_arithmetic.operator = value;\n\t }\n\t })\n\t;\n\n\telement_to_append.append(menu_operator);\n}\n\nfunction renderLogicOperator (command, all_expression, expression_logic, logic_operator, function_obj, element_to_append, initial_el_to_render) {\n\n\tvar menu_operator = $('
');\n\tmenu_operator.dropdown({\n\t values: [\n\t {\n\t name : '==',\n\t value : Models.LOGIC_COMPARISON.equals_to,\n\t selected : (logic_operator == Models.LOGIC_COMPARISON.equals_to)\n\t },\n\t {\n\t name : '!=',\n\t value : Models.LOGIC_COMPARISON.not_equals_to,\n\t selected : (logic_operator == Models.LOGIC_COMPARISON.not_equals_to)\n\t },\n\t {\n\t name : '&&',\n\t value : Models.LOGIC_COMPARISON.and,\n\t selected : (logic_operator == Models.LOGIC_COMPARISON.and)\n\t },\n\t {\n\t name : '||',\n\t value : Models.LOGIC_COMPARISON.or,\n\t selected : (logic_operator == Models.LOGIC_COMPARISON.or)\n\t }\n\t ],\n\t onChange: function(value, text, $selectedItem) {\n\t \tif ($selectedItem) {\n\t\t \texpression_logic.operator = value;\n\t\t \tif (expression_logic.second_operand == null) {\n\t\t \t\texpression_logic.second_operand = new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true);\n\t\t \t\tinitial_el_to_render.empty();\n\t\t \t\trenderExpression(command, all_expression, function_obj, initial_el_to_render);\n\t\t \t}\n\t \t}\n\t }\n\t });\n\n\telement_to_append.append(menu_operator);\n\n}\n\n\nfunction renderLogicExpression (command, all_expression, expression_logic, function_obj, element_to_append, initial_el_to_render) {\n\n\tvar exp_el_par_1 = $(' ');\n\tvar exp_el_expr_el_1 = $('
');\n\tvar exp_el_expr_operand = $('
');\n\tvar exp_el_expr_el_2 = $('
');\n\tvar exp_el_par_2 = $(' ');\n\n\tif (expression_logic.first_operand.type == Models.EXPRESSION_TYPES.exp_logic) {\n\t\trenderLogicExpression(command, all_expression, expression_logic.first_operand, function_obj, exp_el_expr_el_1);\n\t} else if (expression_logic.first_operand.type == Models.EXPRESSION_TYPES.exp_arithmetic) {\n\t\trenderArithmeticExpression(command, all_expression, expression_logic.first_operand, function_obj, exp_el_expr_el_1);\n\t} else {\n\t\tVariableValueMenuManagement.renderMenu(command, expression_logic.first_operand, exp_el_expr_el_1, function_obj);\n\t}\n\n\telement_to_append.append(exp_el_par_1);\n\telement_to_append.append(exp_el_expr_el_1);\n\n\trenderLogicOperator(command, all_expression, expression_logic, expression_logic.operator, function_obj, exp_el_expr_operand, initial_el_to_render);\n\n\telement_to_append.append(exp_el_expr_operand);\n\n\tif (expression_logic.second_operand) {\n\t\tif (expression_logic.second_operand.type == Models.EXPRESSION_TYPES.exp_logic) {\n\t\t\trenderLogicExpression(command, all_expression, expression_logic.second_operand, function_obj, exp_el_expr_el_2);\n\t\t} else if (expression_logic.second_operand.type == Models.EXPRESSION_TYPES.exp_arithmetic) {\n\t\t\trenderArithmeticExpression(command, all_expression, expression_logic.second_operand, function_obj, exp_el_expr_el_2);\n\t\t} else {\n\t\t\tVariableValueMenuManagement.renderMenu(command, expression_logic.second_operand, exp_el_expr_el_2, function_obj);\n\t\t}\n\n\t\telement_to_append.append(exp_el_expr_el_2);\n\t}\n\n\telement_to_append.append(exp_el_par_2);\n\n}\n\nfunction renderArithmeticExpression (command, all_expression, expression_arithmetic, function_obj, element_to_append) {\n\n\tvar exp_el_par_1 = $(' ');\n\tvar exp_el_expr_el_1 = $('
');\n\tvar exp_el_expr_operand = $('
');\n\tvar exp_el_expr_el_2 = $('
');\n\tvar exp_el_par_2 = $(' ');\n\n\n\tif (expression_arithmetic.first_operand.type == Models.EXPRESSION_TYPES.exp_logic) {\n\t\trenderLogicExpression(command, all_expression, expression_arithmetic.first_operand, function_obj, exp_el_expr_el_1);\n\t} else if (expression_arithmetic.first_operand.type == Models.EXPRESSION_TYPES.exp_arithmetic) {\n\t\trenderArithmeticExpression(command, all_expression, expression_arithmetic.first_operand, function_obj, exp_el_expr_el_1);\n\t} else {\n\t\tVariableValueMenuManagement.renderMenu(command, expression_arithmetic.first_operand, exp_el_expr_el_1, function_obj);\n\t}\n\n\tif (expression_arithmetic.second_operand.type == Models.EXPRESSION_TYPES.exp_logic) {\n\t\trenderLogicExpression(command, all_expression, expression_arithmetic.second_operand, function_obj, exp_el_expr_el_2);\n\t} else if (expression_arithmetic.second_operand.type == Models.EXPRESSION_TYPES.exp_arithmetic) {\n\t\trenderArithmeticExpression(command, all_expression, expression_arithmetic.second_operand, function_obj, exp_el_expr_el_2);\n\t} else {\n\t\tVariableValueMenuManagement.renderMenu(command, expression_arithmetic.second_operand, exp_el_expr_el_2, function_obj);\n\t}\n\n\trenderArithmeticOperator(command, all_expression, expression_arithmetic, expression_arithmetic.operator, function_obj, exp_el_expr_operand);\n\n\telement_to_append.append(exp_el_par_1);\n\telement_to_append.append(exp_el_expr_el_1);\n\telement_to_append.append(exp_el_expr_operand);\n\telement_to_append.append(exp_el_expr_el_2);\n\telement_to_append.append(exp_el_par_2);\n}\n\nfunction renderStartMenu (command, expression, function_obj, initial_el_to_render) {\n\tvar start_menu = '';\n\tstart_menu += '
'+LocalizedStrings.getUI('expression_menu_select')+'
';\n\tstart_menu += '
'+LocalizedStrings.getUI('text_logic_expression')+' (EL == EL and EL)
';\n\tstart_menu += '
'+LocalizedStrings.getUI('text_arithmetic_expression')+' (EA < EA)
';\n\tstart_menu += '
';\n\tstart_menu = $(start_menu);\n\n\tstart_menu.dropdown({\n\t\tonChange: function(value, text, $selectedItem) {\n\t\t\tswitch ($selectedItem.data('exp')) {\n\t\t\t\tcase Models.EXPRESSION_TYPES.exp_logic:\n\t\t\t\t\texpression.expression = \n\t\t\t\t\t\tnew Models.LogicExpression(false, \n\t\t\t\t\t\t\tnew Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true));\n\t\t\t\t\tbreak;\n\t\t\t\tcase Models.EXPRESSION_TYPES.exp_arithmetic:\n\t\t\t\t\texpression.expression = \n\t\t\t\t\t\tnew Models.ArithmeticExpression(\n\t\t\t\t\t\t\tnew Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true), \n\t\t\t\t\t\t\tnew Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true), \n\t\t\t\t\t\t\tModels.ARITHMETIC_COMPARISON.less_than);\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tinitial_el_to_render.html('');\n\n\t\t\trenderExpression(command, expression, function_obj, initial_el_to_render);\n \t},\n \tselectOnKeydown: false\n\t});\n\n\tinitial_el_to_render.append(' ');\n\t\n\tinitial_el_to_render.append(start_menu);\n\n\tinitial_el_to_render.append(' ');\n}","import * as Models from '../ivprog_elements';\nimport { LocalizedStrings } from '../../services/localizedStringsService';\nimport * as CommandsManagement from '../commands';\nimport * as VariableValueMenuManagement from './variable_value_menu';\nimport * as SwitchManagement from './switch';\n\nexport function renderMenu (command, dom_where_render, function_obj, dom_command) {\n\n\tvar menu_div = '
';\n\n\tif ((command.type == Models.COMMAND_TYPES.repeatNtimes) \n\t\t|| (command.type == Models.COMMAND_TYPES.whiletrue) \n\t\t|| (command.type == Models.COMMAND_TYPES.dowhiletrue)) {\n\n\t\tmenu_div += ' '+LocalizedStrings.getUI('btn_break')+' ';\n\n\t} else {\n\n\t\tmenu_div += ' '+LocalizedStrings.getUI('btn_break')+' ';\n\t\tmenu_div += ' '+LocalizedStrings.getUI('btn_case')+' ';\n\n\t}\n\n\tmenu_div += '
';\n\n\tmenu_div = $(menu_div);\n \t\n\tdom_where_render.append(menu_div);\n\n\taddHandlers(command, dom_where_render, function_obj, dom_command);\n}\n\nfunction addHandlers (command, dom_where_render, function_obj, dom_command) {\n\n\tdom_where_render.find('.menu_commands').dropdown({\n on: 'hover'\n });\n\t\n\tdom_where_render.find('.menu_commands a').on('click', function(evt){\n\n\t\tif ((command.type == Models.COMMAND_TYPES.repeatNtimes) \n\t\t\t|| (command.type == Models.COMMAND_TYPES.whiletrue) \n\t\t\t|| (command.type == Models.COMMAND_TYPES.dowhiletrue)) {\n\n\t\t\t\tif (command.commands_block == null || command.commands_block.length == 0) {\n\n\t\t\t command.commands_block = [];\n\n\t\t\t var new_cmd = CommandsManagement.genericCreateCommand($(this).data('command'));\n\t\t\t command.commands_block.push(new_cmd);\n\n\t\t\t CommandsManagement.renderCommand(new_cmd, dom_command.find('.block_commands'), 3, function_obj);\n\n\t\t\t } else {\n\t\t\t CommandsManagement.createFloatingCommand(function_obj, dom_command.find('.block_commands'), $(this).data('command'), evt);\n\t\t\t }\n\n\t\t} else {\n\n\t\t\tswitch ($(this).data('command')) {\n\t\t\t\tcase Models.COMMAND_TYPES.break:\n\t\t\t\t\tCommandsManagement.createFloatingCommand(function_obj, dom_command.find('.block_commands'), $(this).data('command'), evt);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase Models.COMMAND_TYPES.switchcase:\n\t\t\t\t\taddCaseToSwitch(command, dom_where_render, function_obj, dom_command);\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}\n\n\t});\n}\n\nfunction addCaseToSwitch (command, dom_where_render, function_obj, dom_command) {\n\t\n\tif ((command.cases == null)) {\n\t\tcommand.cases = [];\n\t}\n\t\n\tvar sc = new Models.SwitchCase(new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true));\n\n\tcommand.cases.push(sc);\n\n\tSwitchManagement.renderCase(sc, command, function_obj, dom_command.find('.all_cases_div'));\n\n}\n\n\n\n","import { LocalizedStrings } from '../../services/localizedStringsService';\nimport * as CommandsManagement from '../commands';\nimport * as ConditionalExpressionManagement from './conditional_expression';\nimport * as ContextualizedMenu from './contextualized_menu';\nimport * as GenericExpressionManagement from './generic_expression';\n\nexport function createFloatingCommand () {\n\treturn $('
'+ LocalizedStrings.getUI('text_command_do') +'
' + LocalizedStrings.getUI('text_command_do_until') +'(x < 10)
');\n}\n\nexport function renderCommand (command, function_obj) {\n\tvar ret = '';\n\tret += '
' + LocalizedStrings.getUI('text_command_do') + ' ';\n\tret += '
';\n\tret += '
';\n\tret += ' ' + LocalizedStrings.getUI('text_command_do_until') + ' (
) ';\n\tret += '
';\n\n\tvar el = $(ret);\n\tel.data('command', command);\n\tel.find('.block_commands').data('command', command);\n\n\taddHandlers(command, function_obj, el);\n\n\tContextualizedMenu.renderMenu(command, el.find('.context_menu'), function_obj, el);\n\n\t//ConditionalExpressionManagement.renderExpression(command, command.expression, function_obj, el.find('.conditional_expression'));\n\n\tif (command.expression) {\n\t\tGenericExpressionManagement.renderExpression(command, function_obj, el.find('.conditional_expression'), command.expression);\n\t}\n\n\tif (command.commands_block) {\n\t\tfor (var j = 0; j < command.commands_block.length; j++) {\n\t\t CommandsManagement.renderCommand(command.commands_block[j], $(el.find('.block_commands')[0]), 3, function_obj);\n\t\t}\n\t}\n\n\treturn el;\n}\n\n\nfunction addHandlers (command, function_obj, dowhiletrue_dom) {\n\n\tdowhiletrue_dom.find('.button_remove_command').on('click', function() {\n\t\tif (CommandsManagement.removeCommand(command, function_obj, dowhiletrue_dom)) {\n\t\t\tdowhiletrue_dom.fadeOut(400, function() {\n\t\t\t\tdowhiletrue_dom.remove();\n\t\t\t});\n\t\t}\n\t});\n}","import * as VariableValueMenu from './variable_value_menu';\nimport * as CommandsManagement from '../commands';\n\nexport function createFloatingCommand () {\n\treturn $('
funcao()
');\n}\n\nexport function renderCommand (command, function_obj) {\n\tvar el = $('
');\n\tel.data('command', command);\n\n\tVariableValueMenu.renderMenu(command, command.function_called, el.find('.var_value_menu_div'), function_obj);\n\n\taddHandlers(command, function_obj, el);\n\n\treturn el;\n}\n\nfunction addHandlers (command, function_obj, functioncall_dom) {\n\n\tfunctioncall_dom.find('.button_remove_command').on('click', function() {\n\t\tif (CommandsManagement.removeCommand(command, function_obj, functioncall_dom)) {\n\t\t\tfunctioncall_dom.fadeOut(400, function() {\n\t\t\t\tfunctioncall_dom.remove();\n\t\t\t});\n\t\t}\n\t});\n}","import { Types } from '../types';\nimport * as Models from '../ivprog_elements';\nimport { LocalizedStrings } from '../../services/localizedStringsService';\nimport * as VariableValueMenuManagement from './variable_value_menu';\nimport { registerUserEvent, ActionTypes } from \"../../services/userLog\";\nimport WatchJS from 'melanke-watchjs';\n\nwindow.timer = false;\n\nexport function renderExpression (command, function_obj, div_to_render, expression_array) {\n\n\tdiv_to_render.empty();\n\n\tWatchJS.unwatch(command, \"expression\");\n\tWatchJS.watch(command, \"expression\", function(){\n\t\tif (window.timer)\n\t\t\treturn;\n\t\tvar m = div_to_render.find('.single_element_expression').not('.mouse_distance').not('.add_parentheses');\n\t\tvar s = \"\";\n\t\tm.each(function(e){\n\t\t if ($(this).hasClass('parentheses_in_expression')) {\n\t\t \t\ts += ($(this).text()) + \" \";\n\t\t } else {\n\t\t s += ($(this).find('.text').text());\n\t\t \n\t\t s += ($(this).find('.var_name').text());\n\n\t\t s += ($(this).find('.parameters_function_called').text());\n\n\t\t s += ($(this).find('.value_rendered').text());\n\n\t\t s += \" \";\n\t\t }\n\t\t});\n\t\tif (s) {\n\t\t\twindow.timer = true;\n\t\t} else {\n\t\t\treturn;\n\t\t}\n\t\tregisterUserEvent(function_obj.name, ActionTypes.CHANGE_COMMAND_EXP, command.type, '/', s);\n\t\tsetTimeout(function() {\n\t\t\twindow.timer = false;\n\t\t}, 200);\n\t}, 20, true);\n\n\tif (command.type === Models.COMMAND_TYPES.attribution) {\n\n\t\tWatchJS.unwatch(command.variable);\n\t\tWatchJS.watch(command.variable, function(){\n\t renderExpression(command, function_obj, div_to_render, expression_array);\n\t }, 0);\n\n\t\tif (command.variable.content) {\n\n\t\t\tvar types_included = [];\n\n\t\t\tif (command.variable.content.type == Types.INTEGER || command.variable.content.type == Types.REAL) {\n\t \t\ttypes_included.push(Models.EXPRESSION_TYPES.exp_arithmetic);\n\t\t } else if (command.variable.content.type == Types.BOOLEAN) {\n\t\t \ttypes_included.push(Models.EXPRESSION_TYPES.exp_conditional);\n\t\t \ttypes_included.push(Models.EXPRESSION_TYPES.exp_logic);\n\t\t \ttypes_included.push(Models.EXPRESSION_TYPES.exp_arithmetic);\n\t\t } else if (command.variable.content.type == Types.TEXT) {\n\t\t \ttypes_included.push(Models.EXPRESSION_TYPES.exp_conditional);\n\t\t \ttypes_included.push(Models.EXPRESSION_TYPES.exp_logic);\n\t\t \ttypes_included.push(Models.EXPRESSION_TYPES.exp_arithmetic);\n\t\t } else {\n\t\t \tconsole.log('NÃO RECONHECI! VEJA: ', command.variable.content.type);\n\t\t }\n\n\t\t renderElements(command, function_obj, div_to_render, expression_array, types_included);\n\t\t} else {\n\t\t\tdiv_to_render.text(LocalizedStrings.getUI('var_menu_select_var').toLowerCase());\n\t\t}\n\t} else {\n\t\tvar types_included = [];\n\t\ttypes_included.push(Models.EXPRESSION_TYPES.exp_conditional);\n\t\ttypes_included.push(Models.EXPRESSION_TYPES.exp_logic);\n\t\ttypes_included.push(Models.EXPRESSION_TYPES.exp_arithmetic);\n\t\trenderElements(command, function_obj, div_to_render, expression_array, types_included);\n\t}\n\n\tdiv_to_render.children('.mouse_distance').addClass('mouse_distance_hidden');\n\tdiv_to_render.children('.higher_element').on('mousemove', function(evt) {\n\t\tif (!window.open_or_close) {\n\t\t\t$(this).css('position', 'relative', '!important');\n\t\t\t$(this).children('.mouse_distance').css('opacity', '1');\n\t\t}\n\t});\n\tdiv_to_render.children('.higher_element').on('mouseout', function(evt) {\n\t\tif (!window.open_or_close) {\n\t\t\t$(this).css('position', 'absolute', '!important');\n\t\t\t$(this).children('.mouse_distance').css('opacity', '0');\n\t\t}\n\t});\n\tvar lixeira = $('
');\n\n\tdiv_to_render.find('.single_element_expression').on('mousedown', function (evt) {\n\t\twindow.posX = evt.clientX;\n\t\twindow.posY = evt.clientY;\n\t});\n\t\n\tSortable.create(div_to_render[0], {\n\t animation: 100,\n\t ghostClass: 'ghost',\n\t group: {\n\t name: 'shared',\n\t put: false // Do not allow items to be put into this list\n\t },\n\t draggable: '.single_element_expression',\n\t sort: false,\n\t filter: '.not_allowed',\n\t \n\t onStart: function() {\n\t \t$('body').append(lixeira);\n\t \tlixeira.css('display', 'block');\n\t\t\tlixeira.css('top', window.posY + 70, '!important');\n\t\t\tlixeira.css('left', window.posX - 20, '!important');\n\t },\n\t onMove: function() {\n\t \tlixeira.addClass('color_test');\n\t },\n\t onEnd: function() {\n\t \tlixeira.remove();\n\t \tdiv_to_render.find('.ghost').removeClass('ghost');\n\t }\n \t});\n \tnew Sortable(lixeira[0], {\n\t group: 'shared',\n\t animation: 150,\n\t onAdd: function (evt) {\n\t lixeira.css('display', 'none');\n\t lixeira.find('.single_element_expression').remove();\n\t lixeira.css('background-color', '');\n\t lixeira.remove();\n\t removeElement(evt, expression_array);\n\t renderExpression(command, function_obj, div_to_render, expression_array);\n\t }\n\t});\n}\n\nfunction removeElement (event, expression_array) {\n\tvar indice = $(event.item).data('index');\n\tvar first = expression_array[0];\n\tconsole.log('indice: ', indice);\n\tif (expression_array[indice].type) {\n\t\t// if is alone in expression:\n\t\tif (expression_array.length == 1) {\n\t\t\t//function_obj.commands.splice(function_obj.commands.indexOf(command), 1);\n\t\t\texpression_array.splice(0, 1);\n\t\t} else if (expression_array.length > 1) {\n\t\t\tif (indice > 0 && expression_array[indice - 1].type_op) {\n\t\t\t\tif (indice < (expression_array.length) \n\t\t\t\t\t&& expression_array[indice - 2] == '('\n\t\t\t\t\t&& expression_array[indice + 1].type_op) {\n\t\t\t\t\texpression_array.splice(indice + 1, 1);\n\t\t\t\t}\n\t\t\t\texpression_array.splice(indice, 1);\n\t\t\t\texpression_array.splice(indice - 1, 1);\n\t\t\t\tif (indice - 2 < (expression_array.length) \n\t\t\t\t\t&& expression_array[indice - 2] == '('\n\t\t\t\t\t&& expression_array[indice - 1] == ')') {\n\t\t\t\t\texpression_array.splice(indice - 1, 1);\n\t\t\t\t\texpression_array.splice(indice - 2, 1);\n\t\t\t\t\tif (indice - 3 >= 0 && indice - 3 < expression_array.length\n\t\t\t\t\t\t&& expression_array[indice - 3].type_op ) {\n\t\t\t\t\t\texpression_array.splice(indice - 3, 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (indice < (expression_array.length - 1) && expression_array[indice + 1].type_op) {\n\t\t\t\texpression_array.splice(indice + 1, 1);\n\t\t\t\texpression_array.splice(indice, 1);\n\t\t\t} else if (indice < (expression_array.length - 1) && indice > 0 \n\t\t\t\t&& expression_array[indice -1] == '(' && expression_array[indice +1] == ')') {\n\t\t\t\tif (indice > 1\n\t\t\t\t\t&& expression_array[indice - 2].type_op) {\n\t\t\t\t\texpression_array.splice(indice + 1, 1);\n\t\t\t\t\texpression_array.splice(indice, 1);\n\t\t\t\t\texpression_array.splice(indice - 1, 1);\n\t\t\t\t\texpression_array.splice(indice - 2, 1);\n\n\t\t\t\t} else if (indice < (expression_array.length - 2) \n\t\t\t\t\t&& expression_array[indice + 2].type_op) {\n\t\t\t\t\texpression_array.splice(indice + 1, 1);\n\t\t\t\t\texpression_array.splice(indice, 1);\n\t\t\t\t\texpression_array.splice(indice - 1, 1);\n\n\t\t\t\t} else {\n\t\t\t\t\texpression_array.splice(indice + 1, 1);\n\t\t\t\t\texpression_array.splice(indice, 1);\n\t\t\t\t\texpression_array.splice(indice - 1, 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t} else if (expression_array[indice].type_op) {\n\t\t// iVProg doesn't support operator remove\n\t} else {\n\t\t\n\t\tvar opening = -1;\n\t\tvar closing = -1;\n\n\t\tif (expression_array[indice] == '(') {\n\t\t\topening = indice;\n\t\t\tfor (var i = indice + 1; i < expression_array.length; i++) {\n\t\t\t\tif (expression_array[i] == ')') {\n\t\t\t\t\tclosing = i;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tclosing = indice;\n\t\t\tfor (var i = indice - 1; i >= 0; i--) {\n\t\t\t\tif (expression_array[i] == '(') {\n\t\t\t\t\topening = i;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (expression_array[opening + 1].type_op) {\n\t\t\texpression_array.splice(closing, 1);\n\t\t\texpression_array.splice(opening + 1, 1);\n\t\t\texpression_array.splice(opening, 1);\n\t\t} else {\n\t\t\texpression_array.splice(closing, 1);\n\t\t\texpression_array.splice(opening, 1);\n\t\t}\n\t}\n\t// if expression is empty, add a new var value:\n\tif (expression_array.length == 0) {\n\t\texpression_array.push(new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true));\n\t}\n\tif (first != expression_array[0] && expression_array[0].type_op) {\n\t\texpression_array.splice(0, 1);\n\t}\n}\n\nfunction renderElements (command, function_obj, div_to_render, expression_array, types_included) {\n\t/*if (expression_array.length > 0) {\n\t\tif (!expression_array[0].type_op) {\n\t\t\trenderStartAddOperator(div_to_render, types_included, expression_array, command, function_obj, 0);\n\t\t}\n\t}*/\n\n\tvar i = 0;\n\tfor (i = 0; i < expression_array.length; i++) {\n\t\tif (expression_array[i].type == \"var_value\") {\n\t\t\tvar div_temp = $('
');\n\t\t\tif (i == 0) {\n\t\t\t\tif (expression_array.length > 0 && !expression_array[0].type_op) {\n\n\t\t\t\t\t//renderStartAddOperator(div_to_render, types_included, expression_array, command, function_obj, 0);\n\t\t\t\t}\n\t\t\t}\n\t\t\tVariableValueMenuManagement.renderMenu(command, expression_array[i], div_temp, function_obj);\n\t\t\tdiv_to_render.append(div_temp);\n\t\t} else if (expression_array[i] == '(' || expression_array[i] == ')') {\n\t\t\tif (expression_array[i] == ')') {\n\t\t\t\trenderFinalAddElements(div_to_render, types_included, expression_array, command, function_obj, i);\n\t\t\t\trenderParenthesis(div_to_render, expression_array[i], command, function_obj, i, expression_array);\n\t\t\t} else if (expression_array[i] == '(' && !expression_array[i + 1].type_op) {\n\t\t\t\trenderParenthesis(div_to_render, expression_array[i], command, function_obj, i, expression_array);\n\t\t\t\trenderStartAddOperator(div_to_render, types_included, expression_array, command, function_obj, i + 1);\n\t\t\t} else {\n\t\t\t\trenderParenthesis(div_to_render, expression_array[i], command, function_obj, i, expression_array);\n\t\t\t}\n\n\t\t} else {\n\t\t\tif (i == 0) {\n\t\t\t\tconsole.log(\"NEGAÇÃO NO PRIMEIRO ELEMENTO\");\n\t\t\t} else if (expression_array[i - 1] == '(') {\n\t\t\t\tconsole.log(\"NEGAÇÃO APÓS O PARÊNTESES\");\n\t\t\t}\n\t\t\trenderOperatorMenu(command, function_obj, div_to_render, expression_array[i], types_included, i, expression_array);\n\t\t}\n\t}\n\n\trenderFinalAddElements(div_to_render, types_included, expression_array, command, function_obj, i, true);\n\n\trenderAddParenthesis(command, function_obj, div_to_render, expression_array, types_included);\n\n}\n\nwindow.parentheses_activate = false;\nwindow.open_or_close = null;\nfunction renderAddParenthesis (command, function_obj, div_to_render, expression_array, types_included) {\n\tvar addParentheses = $('
');\n\tdiv_to_render.append(addParentheses);\n\taddParentheses.popup({\n\t content : \"Adicionar parênteses\",\n\t delay: {\n\t show: 750,\n\t hide: 0\n\t\t}\n\t});\n\n\taddParentheses.on('click', function(mouse_event) {\n\n\t\t// verificar se já está ativado\n\t\tif (window.parentheses_activate) {\n\t\t\treturn;\n\t\t}\n\n\t\tdiv_to_render.find('.usepointer').off('click');\n\n\t\twindow.parentheses_activate = true;\n\n\t\twindow.open_or_close = \"open\";\n\n\t\tdiv_to_render.find('.dropdown').addClass('disabled');\n\n\t\tdiv_to_render.find('.ghost_element').addClass('temp_class');\n\t\tdiv_to_render.find('.ghost_element').removeClass('ghost_element');\n\n\t\tvar floatingObject = $('
(
');\n\t\tfloatingObject.draggable().appendTo(\"body\");\n\t\tfloatingObject.css(\"position\", \"absolute\");\n\t\tmouse_event.type = \"mousedown.draggable\";\n\t\tmouse_event.target = floatingObject[0];\n\t\tfloatingObject.css(\"left\", mouse_event.pageX + 10);\n\t\tfloatingObject.css(\"top\", mouse_event.pageY + 10);\n\t\tfloatingObject.trigger(mouse_event);\n\n\t\tdiv_to_render.on('mousemove', function(evt) {\n\t\t\tvar actual_target = null;\n\t\t\tif ($(evt.target).hasClass('single_element_expression')) {\n\t\t\t\tactual_target = $(evt.target);\n\t\t\t} else {\n\t\t\t\tactual_target = $(evt.target).closest('.single_element_expression');\n\t\t\t}\n\n\t\t\tif ($(evt.target).hasClass('temp_class') \n\t\t\t\t|| actual_target.length < 1 \n\t\t\t\t|| actual_target.hasClass('add_parentheses')\n\t\t\t\t|| actual_target.hasClass('rendered_parentheses')\n\t\t\t\t|| $(evt.target).hasClass('expression_elements')) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\trenderGhostParentheses(actual_target, command, function_obj, div_to_render, expression_array);\n\t\t});\n\n\t\tdiv_to_render.on('mouseleave', function() {\n\t\t\t/*window.open_parentheses.remove();\n\t\t\twindow.close_parentheses.remove();*/\n\t\t});\n\n\t\tvar floating;\n\n\t\t$('body').on('mouseup', function(evt) {\n\n\t\t\tif (window.open_or_close == \"open\") {\n\n\t\t\t\twindow.open_or_close = \"close\";\n\n\t\t\t\tfloatingObject.remove();\n\n\t\t\t\tvar comando_que_esta = $(evt.target).closest('.command_container');\n\t\t\t\tvar comando_certo = div_to_render.closest('.command_container');\n\t\t\t\tif (!comando_que_esta.is(comando_certo)) {\n\n\t\t\t\t\twindow.parentheses_activate = false;\n\t\t\t\t\tdiv_to_render.find('.temp_class').addClass('ghost_element');\n\t\t\t\t\tdiv_to_render.find('.temp_class').removeClass('temp_class');\n\t\t\t\t\tdiv_to_render.off('mousemove');\n\t\t\t\t\tdiv_to_render.off('mouseleave');\n\t\t\t\t\t$('body').off('mouseup');\n\t\t\t\t\twindow.open_parentheses.remove();\n\t\t\t\t\twindow.close_parentheses.remove();\n\t\t\t\t\twindow.inserir_open = -1;\n\t\t\t\t\twindow.inserir_close = -1;\n\t\t\t\t\twindow.open_or_close = null;\n\t\t\t\t\trenderExpression(command, function_obj, div_to_render, expression_array);\n\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\n\t\t\t\twindow.open_parentheses.addClass('parentheses_fixed');\n\n\t\t\t\tfloating = $('
)
');\n\t\t\t\tfloating.draggable().appendTo(\"body\");\n\t\t\t\tfloating.css(\"position\", \"absolute\");\n\t\t\t\tfloating.css(\"left\", evt.pageX + 10);\n\t\t\t\tfloating.css(\"top\", evt.pageY + 10);\n\n\t\t\t\t$('body').on('mousemove', function(evts) {\n\t\t\t\t\tfloating.css(\"left\", evts.pageX + 10);\n\t\t\t\t\tfloating.css(\"top\", evts.pageY + 10);\n\t\t\t\t});\t\t\t\t\n\n\t\t\t} else {\n\n\t\t\t\tfloating.remove();\n\n\t\t\t\twindow.open_parentheses.removeClass('parentheses_fixed');\n\t\t\t\t\n\t\t\t\tdiv_to_render.off('mousemove');\n\t\t\t\tdiv_to_render.off('mouseleave');\n\t\t\t\t$('body').off('mouseup');\n\n\t\t\t\tsetTimeout(function(){\n\t\t\t\t\twindow.parentheses_activate = false;\n\t\t\t\t}, 50);\n\n\t\t\t\tvar comando_que_esta = $(evt.target).closest('.command_container');\n\t\t\t\tvar comando_certo = div_to_render.closest('.command_container');\n\t\t\t\tvar is_correct = false;\n\t\t\t\tif (comando_que_esta.is(comando_certo)) {\n\t\t\t\t\tis_correct = true;\n\t\t\t\t}\n\n\t\t\t\tif (is_correct) {\n\t\t\t\t\texpression_array.splice(window.inserir_open, 0, '(');\n\t\t\t\t\texpression_array.splice(window.inserir_close, 0, ')');\n\t\t\t\t}\n\n\t\t\t\twindow.inserir_open = -1;\n\t\t\t\twindow.inserir_close = -1;\n\t\t\t\twindow.open_or_close = null;\n\n\t\t\t\trenderExpression(command, function_obj, div_to_render, expression_array);\n\n\t\t\t}\n\n\t\t});\n\t});\n}\n\nwindow.open_parentheses = $('
(
');\nwindow.close_parentheses = $('
)
');\nwindow.inserir_open = -1;\nwindow.inserir_close = -1;\nfunction renderGhostParentheses (actual_target, command, function_obj, div_to_render, expression_array) {\n\n\t/*window.open_parentheses.remove();\n\twindow.close_parentheses.remove();*/\n\n\tvar index_in_array = actual_target.data('index');\n\n\tif ((expression_array[index_in_array] == '(') || (expression_array[index_in_array] == ')')) {\n\t\treturn;\n\t}\n\n\tif (window.open_or_close == \"close\") {\n\t\tif (index_in_array < window.inserir_open) {\n\t\t\treturn;\n\t\t}\n\t}\n\n\t// Tratando a situação quando é na primeira posição:\n\n\tif (index_in_array == 0) {\n\t\tif (expression_array[index_in_array].type == \"var_value\") {\n\n\t\t\tif (window.open_or_close == \"open\") {\n\t\t\t\twindow.open_parentheses.insertBefore(actual_target);\n\t\t\t\twindow.inserir_open = index_in_array;\n\t\t\t}\n\n\t\t\t/*if (expression_array.length == 1) {\n\t\t\t\tif (window.open_or_close == \"close\") {\n\t\t\t\t\twindow.close_parentheses.insertAfter(actual_target);\n\t\t\t\t\twindow.inserir_close = index_in_array + 2;\n\t\t\t\t}*/\n\n\t\t\t//} else {\n\t\t\t\tvar count_opened = 0;\n\t\t\t\tvar count_closed = 0;\n\t\t\t\tfor (var i = 0; i < expression_array.length; i++) {\n\t\t\t\t\tif ((expression_array[i] == '(')) {\n\t\t\t\t\t\tcount_opened ++;\n\t\t\t\t\t}\n\t\t\t\t\tif (expression_array[i] == ')') {\n\t\t\t\t\t\tcount_closed ++;\n\t\t\t\t\t}\n\t\t\t\t\tif (count_opened != count_closed) {\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (count_opened > 0) {\n\t\t\t\t\t\t\tif (window.open_or_close == \"close\") {\n\t\t\t\t\t\t\t\twindow.close_parentheses.insertAfter(div_to_render.find('.single_element_expression[data-index=\"'+i+'\"]'));\n\t\t\t\t\t\t\t\twindow.inserir_close = i + 2;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (expression_array[i].type == \"var_value\") {\n\t\t\t\t\t\t\t\tif (window.open_or_close == \"close\") {\n\t\t\t\t\t\t\t\t\twindow.close_parentheses.insertAfter(div_to_render.find('.single_element_expression[data-index=\"'+i+'\"]'));\n\t\t\t\t\t\t\t\t\twindow.inserir_close = i + 2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t//}\n\n\t\t} else if (expression_array[index_in_array].type_op) {\n\n\t\t\tif (window.open_or_close == \"open\") {\n\t\t\t\twindow.open_parentheses.insertBefore(actual_target);\n\t\t\t\twindow.inserir_open = index_in_array;\n\t\t\t}\n\n\t\t\tvar count_opened = 0;\n\t\t\tvar count_closed = 0;\n\t\t\tfor (var i = 1; i < expression_array.length; i++) {\n\t\t\t\t// $('.slide-link[data-slide=\"0\"]')\n\t\t\t\tif ((expression_array[i] == '(')) {\n\t\t\t\t\tcount_opened ++;\n\t\t\t\t}\n\t\t\t\tif (expression_array[i] == ')') {\n\t\t\t\t\tcount_closed ++;\n\t\t\t\t}\n\t\t\t\tif (count_opened != count_closed) {\n\t\t\t\t} else {\n\t\t\t\t\tif (count_opened > 0) {\n\t\t\t\t\t\tif (expression_array[i].type == \"var_value\") {\n\t\t\t\t\t\t\twindow.close_parentheses.insertAfter(div_to_render.find('.single_element_expression[data-index=\"'+i+'\"]'));\n\t\t\t\t\t\t\twindow.inserir_close = i + 2;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (expression_array[i].type == \"var_value\") {\n\t\t\t\t\t\t\tif (expression_array[i].type == \"var_value\") {\n\t\t\t\t\t\t\t\twindow.close_parentheses.insertAfter(div_to_render.find('.single_element_expression[data-index=\"'+i+'\"]'));\n\t\t\t\t\t\t\t\twindow.inserir_close = i + 2;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}\n\n\t// Tratando quando não é no índice 0:\n\tif (expression_array[index_in_array].type == \"var_value\") {\n\t\tif (window.open_or_close == \"open\") {\n\t\t\twindow.open_parentheses.insertBefore(actual_target);\n\t\t\twindow.inserir_open = index_in_array;\n\t\t}\n\t\tif (window.open_or_close == \"close\") {\n\t\t\twindow.close_parentheses.insertAfter(actual_target);\n\t\t\twindow.inserir_close = index_in_array + 2;\n\t\t}\n\t\treturn;\n\t}\n\n\tif (expression_array[index_in_array].type_op) {\n\t\t// buscar para a esquerda primeiro:\n\t\tif (expression_array[index_in_array - 1] == '(') {\n\t\t\tif (window.open_or_close == \"open\") {\n\t\t\t\twindow.open_parentheses.insertBefore(actual_target);\n\t\t\t\twindow.inserir_open = index_in_array;\n\t\t\t}\n\t\t} else if (expression_array[index_in_array - 1] == ')') {\n\t\t\t// buscar a abertura\n\t\t\tvar count_opened = 0;\n\t\t\tvar count_closed = 0;\n\t\t\tfor (var j = index_in_array - 1; j >= 0; j--) {\n\t\t\t\tif ((expression_array[j] == '(')) {\n\t\t\t\t\tcount_opened ++;\n\t\t\t\t}\n\t\t\t\tif (expression_array[j] == ')') {\n\t\t\t\t\tcount_closed ++;\n\t\t\t\t}\n\n\t\t\t\tif (count_opened != count_closed) {\n\t\t\t\t} else {\n\t\t\t\t\tif (count_closed > 0) {\n\t\t\t\t\t\tif (window.open_or_close == \"open\") {\n\t\t\t\t\t\t\twindow.open_parentheses.insertBefore(div_to_render.find('.single_element_expression[data-index=\"'+j+'\"]'));\n\t\t\t\t\t\t\twindow.inserir_open = j;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} else if (expression_array[index_in_array - 1].type == \"var_value\") {\n\t\t\tif (window.open_or_close == \"open\") {\n\t\t\t\twindow.open_parentheses.insertBefore(div_to_render.find('.single_element_expression[data-index=\"'+(index_in_array - 1)+'\"]'));\n\t\t\t\twindow.inserir_open = index_in_array - 1;\n\t\t\t}\n\t\t}\n\n\t\t// buscar para a direita agora:\n\t\tif (expression_array[index_in_array + 1] == '(') {\n\t\t\t// buscar o fechamento:\n\n\t\t\tvar count_opened = 0;\n\t\t\tvar count_closed = 0;\n\t\t\tfor (var j = index_in_array + 1; j < expression_array.length; j ++) {\n\t\t\t\tif ((expression_array[j] == '(')) {\n\t\t\t\t\tcount_opened ++;\n\t\t\t\t}\n\t\t\t\tif (expression_array[j] == ')') {\n\t\t\t\t\tcount_closed ++;\n\t\t\t\t}\n\n\t\t\t\tif (count_opened != count_closed) {\n\t\t\t\t} else {\n\t\t\t\t\tif (count_opened > 0) {\n\t\t\t\t\t\tif (window.open_or_close == \"close\") {\n\t\t\t\t\t\t\twindow.close_parentheses.insertAfter(div_to_render.find('.single_element_expression[data-index=\"'+j+'\"]'));\n\t\t\t\t\t\t\twindow.inserir_close = j + 2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\n\n\t\t} else if (expression_array[index_in_array + 1].type == \"var_value\") {\n\t\t\tif (window.open_or_close == \"close\") {\n\t\t\t\twindow.close_parentheses.insertAfter(div_to_render.find('.single_element_expression[data-index=\"'+(index_in_array + 1)+'\"]'));\n\t\t\t\twindow.inserir_close = index_in_array + 3;\n\t\t\t}\n\t\t}\n\t}\n\n}\n\nfunction renderParenthesis (div_to_render, expression_content, command, function_obj, position, expression_array) {\n\tvar ghost_parenthesis = $('
'+expression_content+'
');\n\tdiv_to_render.append(ghost_parenthesis);\n}\n\nfunction renderStartAddOperator (div_to_render, types_included, expression_array, command, function_obj, position) {\n\tvar menu_final = '
+
';\n\tif (types_included.indexOf(Models.EXPRESSION_TYPES.exp_arithmetic) >= 0) {\n\t\tif (types_included.length > 1) {\n\t\t\tmenu_final += '
' + LocalizedStrings.getUI('text_arithmetic_expression') + '
';\n\t\t\tmenu_final += getArithmeticOperators();\n\t\t\tmenu_final += '
';\n\t\t} else {\n\t\t\tmenu_final += getArithmeticOperators();\n\t\t}\n\t}\n\tif (types_included.indexOf(Models.EXPRESSION_TYPES.exp_logic) >= 0) {\n\t\tif (types_included.length > 1) {\n\t\t\tmenu_final += '
'+ LocalizedStrings.getUI('text_logic_expression') +'
';\n\t\t\tmenu_final += getLogicOperators();\n\t\t\tmenu_final += '
';\n\t\t} else {\n\t\t\tmenu_final += getLogicOperators();\n\t\t}\n\t}\n\tif (types_included.indexOf(Models.EXPRESSION_TYPES.exp_conditional) >= 0) {\n\t\tif (types_included.length > 1) {\n\t\t\tmenu_final += '
'+ LocalizedStrings.getUI('text_relational_expression') +'
';\n\t\t\tmenu_final += getRelationalOperators();\n\t\t\tmenu_final += '
';\n\t\t} else {\n\t\t\tmenu_final += getRelationalOperators();\n\t\t}\n\t}\n\tmenu_final += '
';\n\n\tmenu_final = $(menu_final);\n\tvar div_temp = $('
');\n\tdiv_temp.append(menu_final);\n\tvar div_higher = $('
');\n\tdiv_higher.append(div_temp);\n\tdiv_to_render.append(div_higher);\n\tmenu_final.dropdown('set selected', Models.ARITHMETIC_TYPES.minus);\n\n\tdiv_temp.on('click', function() {\n\t\tif (!window.open_or_close) {\n\t\t\tvar sera = position;\n\n\t\t\tif (types_included.indexOf(Models.EXPRESSION_TYPES.exp_arithmetic) >= 0) {\n\t\t\t\tconsole.log('p1');\n\t\t\t\texpression_array.splice(sera, 0, new Models.ExpressionOperator(Models.EXPRESSION_TYPES.exp_arithmetic,Models.ARITHMETIC_TYPES.minus));\n\t\t\t} else if (types_included.indexOf(Models.EXPRESSION_TYPES.exp_logic) >= 0) {\n\t\t\t\tconsole.log('p2');\n\t\t\t\texpression_array.splice(sera, 0, new Models.ExpressionOperator(Models.EXPRESSION_TYPES.exp_logic,Models.LOGIC_COMPARISON.equals_to));\n\t\t\t} else if (types_included.indexOf(Models.EXPRESSION_TYPES.exp_conditional) >= 0) {\n\t\t\t\tconsole.log('p3');\n\t\t\t\texpression_array.splice(sera, 0, new Models.ExpressionOperator(Models.EXPRESSION_TYPES.exp_conditional,Models.ARITHMETIC_COMPARISON.greater_than));\n\t\t\t}\n\n\t\t\trenderExpression(command, function_obj, div_to_render, expression_array);\n\t\t}\n\t});\n}\n\nfunction renderFinalAddElements (div_to_render, types_included, expression_array, command, function_obj, position, is_last = false) {\n\n\tvar menu_final = '
+
';\n\tif (types_included.indexOf(Models.EXPRESSION_TYPES.exp_arithmetic) >= 0) {\n\t\tif (types_included.length > 1) {\n\t\t\tmenu_final += '
'+ LocalizedStrings.getUI('text_arithmetic_expression') +'
';\n\t\t\tmenu_final += getArithmeticOperators();\n\t\t\tmenu_final += '
';\n\t\t} else {\n\t\t\tmenu_final += getArithmeticOperators();\n\t\t}\n\t}\n\tif (types_included.indexOf(Models.EXPRESSION_TYPES.exp_logic) >= 0) {\n\t\tif (types_included.length > 1) {\n\t\t\tmenu_final += '
'+ LocalizedStrings.getUI('text_logic_expression') +'
';\n\t\t\tmenu_final += getLogicOperators();\n\t\t\tmenu_final += '
';\n\t\t} else {\n\t\t\tmenu_final += getLogicOperators();\n\t\t}\n\t}\n\tif (types_included.indexOf(Models.EXPRESSION_TYPES.exp_conditional) >= 0) {\n\t\tif (types_included.length > 1) {\n\t\t\tmenu_final += '
'+ LocalizedStrings.getUI('text_relational_expression') +'
';\n\t\t\tmenu_final += getRelationalOperators();\n\t\t\tmenu_final += '
';\n\t\t} else {\n\t\t\tmenu_final += getRelationalOperators();\n\t\t}\n\t}\n\tmenu_final += '
';\n\n\tmenu_final = $(menu_final);\n\tvar div_temp = $('
');\n\tvar div_higher = $('
');\n\n\tvar button = $('');\n\tdiv_temp.append(button);\n\n\tif (!is_last) {\n\t\tdiv_higher.append(div_temp);\n\t\tdiv_to_render.append(div_higher);\n\t\t//div_temp.append(menu_final);\n\t\tdiv_temp.css('opacity', '0', '!important');\n\t} else {\n\t\tdiv_temp.removeClass('mouse_distance');\n\t\tdiv_temp.css('opacity', '1', '!important');\n\t\t//div_temp.append(menu_final);\n\t\tdiv_to_render.append(div_temp);\n\t}\n\t\n\n\tmenu_final.dropdown('set selected', Models.ARITHMETIC_TYPES.plus);\n\n\tdiv_temp.on('click', function() {\n\t\tvar sera = position;\n\n\t\tif (expression_array[sera] == ')' && expression_array[sera - 1] == '(') {\n\t\t\texpression_array.splice(sera, 0, new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true));\n\t\t\trenderExpression(command, function_obj, div_to_render, expression_array);\n\t\t\treturn;\n\t\t}\n\n\t\tif (types_included.indexOf(Models.EXPRESSION_TYPES.exp_arithmetic) >= 0) {\n\t\t\texpression_array.splice(sera, 0, new Models.ExpressionOperator(Models.EXPRESSION_TYPES.exp_arithmetic,Models.ARITHMETIC_TYPES.plus));\n\t\t\texpression_array.splice(sera + 1, 0, new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true));\n\t\t} else if (types_included.indexOf(Models.EXPRESSION_TYPES.exp_logic) >= 0) {\n\t\t\texpression_array.splice(sera, 0, new Models.ExpressionOperator(Models.EXPRESSION_TYPES.exp_logic,Models.LOGIC_COMPARISON.equals_to));\n\t\t\texpression_array.splice(sera + 1, 0, new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true));\n\t\t} else if (types_included.indexOf(Models.EXPRESSION_TYPES.exp_conditional) >= 0) {\n\t\t\texpression_array.splice(sera, 0, new Models.ExpressionOperator(Models.EXPRESSION_TYPES.exp_conditional,Models.ARITHMETIC_COMPARISON.greater_than));\n\t\t\texpression_array.splice(sera + 1, 0, new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true));\n\t\t}\n\n\t\trenderExpression(command, function_obj, div_to_render, expression_array);\n\t});\n}\n\nfunction renderOperatorMenu (command, function_obj, div_to_render, expression_element, types_included, position, expression_array) {\n\n\tvar menu_final = '
+
';\n\tif (types_included.indexOf(Models.EXPRESSION_TYPES.exp_arithmetic) >= 0) {\n\t\tif (types_included.length > 1) {\n\t\t\tmenu_final += '
'+ LocalizedStrings.getUI('text_arithmetic_expression') +'
';\n\t\t\tmenu_final += getArithmeticOperators();\n\t\t\tmenu_final += '
';\n\t\t} else {\n\t\t\tmenu_final += getArithmeticOperators();\n\t\t}\n\t}\n\tif (types_included.indexOf(Models.EXPRESSION_TYPES.exp_logic) >= 0) {\n\t\tif (types_included.length > 1) {\n\t\t\tmenu_final += '
'+ LocalizedStrings.getUI('text_logic_expression') +'
';\n\t\t\tmenu_final += getLogicOperators();\n\t\t\tmenu_final += '
';\n\t\t} else {\n\t\t\tmenu_final += getLogicOperators();\n\t\t}\n\t}\n\tif (types_included.indexOf(Models.EXPRESSION_TYPES.exp_conditional) >= 0) {\n\t\tif (types_included.length > 1) {\n\t\t\tmenu_final += '
'+ LocalizedStrings.getUI('text_relational_expression') +'
';\n\t\t\tmenu_final += getRelationalOperators();\n\t\t\tmenu_final += '
';\n\t\t} else {\n\t\t\tmenu_final += getRelationalOperators();\n\t\t}\n\t}\n\tmenu_final += '
';\n\n\tmenu_final = $(menu_final);\n\tvar div_temp = $('
');\n\tdiv_temp.append(menu_final);\n\tdiv_to_render.append(div_temp);\n\tmenu_final.dropdown({\n\t\tonChange: function(value, text, $selectedItem) {\n \t\texpression_element.item = $selectedItem.data('value');\n \t\texpression_element.type_op = $selectedItem.data('type');\n \t}\n\t});\n\n\tmenu_final.dropdown('set selected', expression_element.item);\n}\n\nfunction getArithmeticOperators () {\n\tvar arithmetic_operators;\n\tarithmetic_operators = '
+
';\n\tarithmetic_operators += '
-
';\n\tarithmetic_operators += '
*
';\n\tarithmetic_operators += '
/
';\n\tarithmetic_operators += '
%
';\n\treturn arithmetic_operators;\n}\n\nfunction getLogicOperators () {\n\tvar logic_operators;\n\tlogic_operators = '
==
';\n\tlogic_operators += '
!=
';\n\tlogic_operators += '
'+LocalizedStrings.getUI('logic_operator_and')+'
';\n\tlogic_operators += '
'+LocalizedStrings.getUI('logic_operator_or')+'
';\n\tlogic_operators += '
'+LocalizedStrings.getUI('logic_operator_not')+'
';\n\treturn logic_operators;\n}\n\nfunction getRelationalOperators () {\n\tvar relational_operators;\n\trelational_operators = '
>
';\n\trelational_operators += '
<
';\n\trelational_operators += '
==
';\n\trelational_operators += '
!=
';\n\trelational_operators += '
>=
';\n\trelational_operators += '
<=
';\n\treturn relational_operators;\n}","import { LocalizedStrings } from '../../services/localizedStringsService';\nimport * as CommandsManagement from '../commands';\nimport * as ConditionalExpressionManagement from './conditional_expression';\nimport * as GenericExpressionManagement from './generic_expression';\n\nexport function createFloatingCommand () {\n\treturn $('
if (x < 1) { }
');\n}\n\nexport function renderCommand (command, function_obj) {\n\tvar ret = '';\n\tret += '
';\n\tret += ' ' + LocalizedStrings.getUI('text_if') + '';\n\tret += ' (
) ';\n\tret += ' ';\n\tret += '
';\n \tret += '
';\n\tret += '
' + LocalizedStrings.getUI('text_else') + ' ';\n\tret += '
';\n\tret += '
';\n\tret += '
';\n\tret += '
';\n\n\tvar el = $(ret);\n\tel.data('command', command);\n\tel.find('.block_commands').data('command', command);\n\tel.find('.data_block_if').data('command', command);\n\tel.find('.data_block_else').data('command', command);\n\tel.find('.commands_if').data('command', command);\n\n\taddHandlers(command, function_obj, el);\n\n\t//ConditionalExpressionManagement.renderExpression(command, command.expression, function_obj, el.find('.conditional_expression'));\n\n\tGenericExpressionManagement.renderExpression(command, function_obj, el.find('.conditional_expression'), command.expression);\n\n\tif (command.commands_block) {\n\t\tfor (var j = 0; j < command.commands_block.length; j++) {\n\t\t CommandsManagement.renderCommand(command.commands_block[j], $(el.find('.commands_if')[0]), 3, function_obj);\n\t\t}\n\t}\n\tif (command.commands_else) {\n\t\tfor (var j = 0; j < command.commands_else.length; j++) {\n\t\t CommandsManagement.renderCommand(command.commands_else[j], $(el.find('.commands_else')[0]), 3, function_obj);\n\t\t}\n\t}\n\n\treturn el;\n}\n\n\nfunction addHandlers (command, function_obj, iftrue_dom) {\n\n\tiftrue_dom.find('.button_remove_command').on('click', function() {\n\t\tif (CommandsManagement.removeCommand(command, function_obj, iftrue_dom)) {\n\t\t\tiftrue_dom.fadeOut(400, function() {\n\t\t\t\tiftrue_dom.remove();\n\t\t\t});\n\t\t}\n\t});\n}","import { LocalizedStrings } from '../../services/localizedStringsService';\nimport * as VariableValueMenu from './variable_value_menu';\nimport * as CommandsManagement from '../commands';\n\nexport function createFloatingCommand () {\n\treturn $('
'+LocalizedStrings.getUI('text_command_read')+' var
');\n}\n\nexport function renderCommand (command, function_obj) {\n\tvar el = '
'+LocalizedStrings.getUI('text_command_read')+' (
)
';\n\t\n\tel = $(el);\n\tel.data('command', command);\n\n\tVariableValueMenu.renderMenu(command, command.variable_value_menu, el.find('.var_value_menu_div'), function_obj);\n\n\taddHandlers(command, function_obj, el);\n\n\treturn el;\n}\n\nfunction addHandlers (command, function_obj, reader_dom) {\n\treader_dom.find('.button_remove_command').on('click', function() {\n\t\tif (CommandsManagement.removeCommand(command, function_obj, reader_dom)) {\n\t\t\treader_dom.fadeOut(400, function() {\n\t\t\t\treader_dom.remove();\n\t\t\t});\n\t\t}\n\t});\n}","import * as Models from '../ivprog_elements';\nimport { LocalizedStrings } from '../../services/localizedStringsService';\nimport * as CommandsManagement from '../commands';\nimport * as ConditionalExpressionManagement from './conditional_expression';\nimport * as VariableValueMenu from './variable_value_menu';\nimport * as ContextualizedMenu from './contextualized_menu';\nimport * as GenericExpressionManagement from './generic_expression';\n\nexport function createFloatingCommand () {\n\treturn $('
repita_para i de 0 ate 10 passo 1
');\n}\n\nexport function renderCommand (command, function_obj) {\n\tlet ret = `
\n\t\t\n\t\t\n\t\t
${LocalizedStrings.getUI('text_for')}\n\t\t
\n\t\t
\n\t\t\n\t\t
\n\t\t
\n\t\t\n\t\t${LocalizedStrings.getUI(\"text_for_to\")} \n\t\t
\n\t\t
\n\t\t
\n\t\t
'`;\n\tret += '
';\n\tret += '
';\n\tret += ' ';\n\tret += '
';\n\t\n\tvar el = $(ret);\n\tel.data('command', command);\n\tel.find('.block_commands').data('command', command);\n\n\taddHandlers(command, function_obj, el);\n\n\tContextualizedMenu.renderMenu(command, el.find('.context_menu'), function_obj, el);\n\n\tVariableValueMenu.renderMenu(command, command.var_attribution, el.find('.variable_attribution'), function_obj);\n\n\t//ConditionalExpressionManagement.renderExpression(command, command.expression2, function_obj, el.find('.conditional_expression'));\n\n\tVariableValueMenu.renderMenu(command, command.expression2, el.find('.conditional_expression'), function_obj);\t\n\t//GenericExpressionManagement.renderExpression(command, function_obj, el.find('.conditional_expression'), command.expression2);\n\n\t//VariableValueMenu.renderMenu(command, command.var_incrementation, el.find('.incrementation_variable'), function_obj);\t\n\t//angle double right\n\tif (!command.expression1) {\n\t\tcommand.expression1 = new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, \"0\", null, null, true);\n\t}\n\n\tel.find('.text_receives').text(LocalizedStrings.getUI(\"text_for_from\"));\n\tVariableValueMenu.renderMenu(command, command.expression1, el.find('.var_value_expression'), function_obj);\n\n\tif (!command.expression3) {\n\t\tel.find('.pass_button').html('');\n\t\tel.find('.pass_button').find('button').on('click', function() {\n\t\t\ttogglePasso(command);\n\t\t});\n\t\t/*var exp = new Models.ExpressionElement(Models.EXPRESSION_ELEMENTS.exp_op_exp, \n\t\t\t[command.var_attribution,\n \t\tModels.ARITHMETIC_TYPES.plus, \n\t\t\tnew Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, \"1\", null, null, true)]);\n\n\t\tcommand.expression3 = exp;\n\t\tcommand.var_incrementation = command.var_attribution;*/\n\t} else {\n\t\tel.find('.pass_button').html('');\n\t\tel.find('.pass_button').find('button').on('click', function() {\n\t\t\ttogglePasso(command);\n\t\t});\n\n\t\trenderOperator(command, function_obj, el.find('.operator'), command.expression3, 1);\n\t\tVariableValueMenu.renderMenu(command, command.expression3.itens[2], el.find('.second_operand'), function_obj);\n\t}\n\n\tif (command.commands_block) {\n\t\tfor (var j = 0; j < command.commands_block.length; j++) {\n\t\t CommandsManagement.renderCommand(command.commands_block[j], $(el.find('.block_commands')[0]), 3, function_obj);\n\t\t}\n\t}\n\n\treturn el;\n}\n\nfunction togglePasso (command) {\n\tif (!command.expression3) {\n\t\tvar exp = new Models.ExpressionElement(Models.EXPRESSION_ELEMENTS.exp_op_exp, \n\t\t\t[command.var_attribution,\n \t\tModels.ARITHMETIC_TYPES.plus, \n\t\t\tnew Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, \"1\", null, null, true)]);\n\n\t\tcommand.expression3 = exp;\n\t\tcommand.var_incrementation = command.var_attribution;\n\t} else {\n\t\tcommand.expression3 = null;\n\t}\n\trenderAlgorithm();\n}\n\nexport function manageExpressionElements (command, ref_object, dom_object, menu_var_or_value, function_obj, $selectedItem, expression_element) {\n\n\tif (dom_object.hasClass('variable_attribution')) {\n\t\tif (!command.expression3) {\n\t\t\tvar exp = new Models.ExpressionElement(Models.EXPRESSION_ELEMENTS.exp_op_exp, \n\t\t\t\t[command.var_attribution,\n\t \t\tModels.ARITHMETIC_TYPES.plus, \n\t\t\t\tnew Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, \"1\", null, null, true)]);\n\n\t\t\tcommand.expression3 = exp;\n\t\t\tcommand.var_incrementation = command.var_attribution;\n\n\t\t\tvar cond_exp = \n\t\t\t\t\t\tnew Models.ArithmeticExpression(\n\t\t\t\t\t\t\tcommand.var_attribution, \n\t\t\t\t\t\t\tnew Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true), \n\t\t\t\t\t\t\tModels.ARITHMETIC_COMPARISON.less_than);\n\n\t\t\tcommand.expression2.expression = cond_exp;\n\t\t}\n\n\t\tdom_object.parent().find('.text_receives').text('de');\n\n\t\tcommand.expression1 = new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, \"0\", null, null, true);\n\n\t\tdom_object.parent().find('.var_value_expression').empty();\n\t\t\n\t\tVariableValueMenu.renderMenu(command, command.expression1, dom_object.parent().find('.var_value_expression'), function_obj);\n\n\t\trenderAlgorithm();\n\t}\n\n\tif (dom_object.hasClass('incrementation_variable')) {\n\t\tdom_object.parent().find('.text_inc_receives').text('de');\n\t\t\n\t\tvar exp = new Models.ExpressionElement(Models.EXPRESSION_ELEMENTS.exp_op_exp, \n\t\t\t\t[new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true),\n\t \t\tModels.ARITHMETIC_TYPES.plus, \n\t\t\t\tnew Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)]);\n\n\t\tcommand.expression3 = exp;\n\n\t\tVariableValueMenu.renderMenu(command, command.expression3.itens[0], dom_object.parent().find('.first_operand'), function_obj);\n\n\t\trenderOperator(command, function_obj, dom_object.parent().find('.operator'), command.expression3, 1);\n\n\t\tVariableValueMenu.renderMenu(command, command.expression3.itens[2], dom_object.parent().find('.second_operand'), function_obj);\t\t\n\n\t}\n\n}\n\nexport function manageClearExpressionElements (command, ref_object, dom_object, menu_var_or_value, function_obj, $selectedItem, expression_element) {\n\tif (dom_object.hasClass('variable_attribution')) {\n\t\t$(dom_object).parent().find('.text_receives').text('');\n\t\tcommand.expression1 = null;\n\t\t$(dom_object).parent().find('.var_value_expression').empty();\n\t}\n\n\tif (dom_object.hasClass('incrementation_variable')) {\n\t\t$(dom_object).parent().find('.text_inc_receives').text('');\n\t\tcommand.expression3 = null;\n\t\t$(dom_object).parent().find('.first_operand').empty();\n\t\t$(dom_object).parent().find('.operator').empty();\n\t\t$(dom_object).parent().find('.second_operand').empty();\n\t}\n}\n\nfunction addHandlers (command, function_obj, repeatNtimes_dom) {\n\n\trepeatNtimes_dom.find('.button_remove_command').on('click', function() {\n\t\tif (CommandsManagement.removeCommand(command, function_obj, repeatNtimes_dom)) {\n\t\t\trepeatNtimes_dom.fadeOut(400, function() {\n\t\t\t\trepeatNtimes_dom.remove();\n\t\t\t});\n\t\t}\n\t});\n}\n\nfunction renderOperator (command, function_obj, temp_op, expression_element, index_op) {\n\n\tvar menu_operator = $('
');\n\tmenu_operator.dropdown({\n\t values: [\n\t {\n\t name : '+',\n\t value : Models.ARITHMETIC_TYPES.plus,\n\t selected : (expression_element.itens[index_op] == Models.ARITHMETIC_TYPES.plus)\n\t },\n\t {\n\t name : '-',\n\t value : Models.ARITHMETIC_TYPES.minus,\n\t selected : (expression_element.itens[index_op] == Models.ARITHMETIC_TYPES.minus)\n\t }\n\t ],\n\t onChange: function(value, text, $selectedItem) {\n\t \texpression_element.itens[index_op] = value;\n\t }\n\t });\n\ttemp_op.append(menu_operator);\n}","import { Types } from '../types';\nimport { LocalizedStrings } from '../../services/localizedStringsService';\nimport * as VariableValueMenu from './variable_value_menu';\nimport * as CommandsManagement from '../commands';\nimport * as GenericExpressionManagement from './generic_expression';\n\nexport function createFloatingCommand () {\n\treturn $('
'+LocalizedStrings.getUI('text_return')+'
');\n}\n\nexport function renderCommand (command, function_obj) {\n\tvar el = $('
'+LocalizedStrings.getUI('text_return')+'
');\n\tel.data('command', command);\n\n\taddHandlers(command, function_obj, el);\n\n\tif (function_obj.return_type != Types.VOID) {\n\t\t//VariableValueMenu.renderMenu(command, command.variable_value_menu, el.find('.var_value_menu_div'), function_obj);\n\t\tGenericExpressionManagement.renderExpression(command, function_obj, el.find('.expression_elements'), command.variable_value_menu);\n\t} else {\n\t\tel.find('.expression_elements').remove();\n\t\tcommand.variable_value_menu = null;\n\t}\n\t\n\treturn el;\n}\n\nfunction addHandlers (command, function_obj, return_dom) {\n\n\treturn_dom.find('.button_remove_command').on('click', function() {\n\t\tif (CommandsManagement.removeCommand(command, function_obj, return_dom)) {\n\t\t\treturn_dom.fadeOut(400, function() {\n\t\t\t\treturn_dom.remove();\n\t\t\t});\n\t\t}\n\t});\n}\n","import { LocalizedStrings } from '../../services/localizedStringsService';\nimport * as CommandsManagement from '../commands';\nimport * as VariableValueMenu from './variable_value_menu';\nimport * as ContextualizedMenu from './contextualized_menu';\n\nexport function createFloatingCommand () {\n\treturn $('
'+LocalizedStrings.getUI('text_code_switch')+' ( x ) {
'+LocalizedStrings.getUI('text_code_case')+' 1:
'+LocalizedStrings.getUI('text_code_case')+' 2:
}
');\n}\n\nexport function renderCommand (command, function_obj) {\n\tvar ret = '';\n\tret += '
'+LocalizedStrings.getUI('text_code_switch')+' (
)
';\n\tret += '
';\n\n\tvar el = $(ret);\n\tel.data('command', command);\n\n\taddHandlers(command, function_obj, el);\n\n\tContextualizedMenu.renderMenu(command, el.find('.context_menu'), function_obj, el);\n\n\tVariableValueMenu.renderMenu(command, command.variable, el.find('.variable_to_switch'), function_obj);\n\n\tif (command.cases) {\n\t\tfor (var i = 0; i < command.cases.length; i++) {\n\t\t\trenderCase(command.cases[i], command, function_obj, el.find('.all_cases_div'));\n\t\t}\n\t}\n\n\treturn el;\n}\n\nexport function renderCase (switchcase, command, function_obj, el) {\n\n\tvar casediv = $('
'+LocalizedStrings.getUI('text_code_case')+'
:
');\n\n\tVariableValueMenu.renderMenu(command, switchcase.variable_value_menu, casediv.find('.variable_case'), function_obj);\n\n\tcasediv.data('switchcase', switchcase);\n\tcasediv.find('.case_commands_block').data('switchcase', switchcase);\n\n\tel.append(casediv);\n\n\tif (switchcase.commands_block) {\n\t\tfor (var j = 0; j < switchcase.commands_block.length; j++) {\n\t\t CommandsManagement.renderCommand(switchcase.commands_block[j], $(casediv.find('.case_commands_block')[0]), 3, function_obj);\n\t\t}\n\t}\n\n\tcasediv.find('.button_remove_command').on('click', function() {\n\t\tfor (var i = 0; i < command.cases.length; i++) {\n\t\t\tif (switchcase == command.cases[i]) {\n\t\t\t\tdelete command.cases[i];\n\t\t\t\tcommand.cases.splice(i, 1);\n\t\t\t\tcasediv.remove();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t});\n\n}\n\nfunction addHandlers (command, function_obj, switch_dom) {\n\n\tswitch_dom.find('.button_remove_command').on('click', function() {\n\t\tif (CommandsManagement.removeCommand(command, function_obj, switch_dom)) {\n\t\t\tswitch_dom.fadeOut(400, function() {\n\t\t\t\tswitch_dom.remove();\n\t\t\t});\n\t\t}\n\t});\n}","import * as Models from '../ivprog_elements';\nimport { LocalizedStrings } from '../../services/localizedStringsService';\nimport * as AttribuitionsManagement from './attribution';\nimport * as RepeatNTimesManagement from './repeatNtimes';\n\nexport const VAR_OR_VALUE_TYPES = Object.freeze({only_variable: 1, only_value: 2, only_function: 3, variable_and_function: 4, variable_and_value_opt: 5,\n\tvalue_and_function: 6, all: 7});\n\nexport function renderMenu (command, ref_object, dom_object, function_obj, size_field = 2, expression_element) {\n\t// Verificar se o objeto atual trata-se de uma chamada de função e conferir se possui a quantidade correta de parâmetros\n\t// Caso não possua, tem que adicionar as variáveis que servirão de parâmetros:\n\tif (ref_object.function_called) {\n\t\tif (ref_object.function_called.parameters_list) {\n\n\t\t\twhile (ref_object.function_called.parameters_list.length != ref_object.parameters_list.length) {\n\t\t\t\tif (ref_object.parameters_list.length > ref_object.function_called.parameters_list.length) {\n\t\t\t\t\tref_object.parameters_list.pop();\n\t\t\t\t} else {\n\t\t\t\t\tref_object.parameters_list.push(new Models.VariableValueMenu(VAR_OR_VALUE_TYPES.all, null, null, null, true));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tvar menu_var_or_value = '
';\n\n\tif (ref_object.variable_and_value == VAR_OR_VALUE_TYPES.only_variable) {\n\n\t\tmenu_var_or_value = '
';\n\t\tmenu_var_or_value += '
';\n\t}\n\n\tif ((ref_object.variable_and_value == VAR_OR_VALUE_TYPES.variable_and_function) || (ref_object.variable_and_value == VAR_OR_VALUE_TYPES.variable_and_value_opt) || (ref_object.variable_and_value == VAR_OR_VALUE_TYPES.all)) {\n\t\t\n\t\tmenu_var_or_value += '
'+LocalizedStrings.getUI('variable');\n\t\tmenu_var_or_value += '
';\n\t\tmenu_var_or_value += '
';\n\t}\n\n\tif (ref_object.variable_and_value == VAR_OR_VALUE_TYPES.only_value) {\n\t\tmenu_var_or_value = '';\n\t}\n\n\tif ((ref_object.variable_and_value == VAR_OR_VALUE_TYPES.variable_and_value_opt) \n\t\t|| (ref_object.variable_and_value == VAR_OR_VALUE_TYPES.value_and_function) || (ref_object.variable_and_value == VAR_OR_VALUE_TYPES.all)) {\n\n\t\tmenu_var_or_value += '
'+LocalizedStrings.getUI('text_value')+'
';\n\n\t}\n\n\tif (ref_object.variable_and_value == VAR_OR_VALUE_TYPES.only_function) {\n\n\t\tmenu_var_or_value = '
';\n\t\tmenu_var_or_value += '
';\n\t} \n\n\tif ((ref_object.variable_and_value == VAR_OR_VALUE_TYPES.variable_and_function) \n\t\t|| (ref_object.variable_and_value == VAR_OR_VALUE_TYPES.value_and_function) || (ref_object.variable_and_value == VAR_OR_VALUE_TYPES.all)) {\n\t\t\n\t\tmenu_var_or_value += '
'+LocalizedStrings.getUI('btn_function');\n\t\tmenu_var_or_value += '
';\n\t\tmenu_var_or_value += '
';\n\n/*\t\tif (command.type == Models.COMMAND_TYPES.attribution) {\n\t\t\tmenu_var_or_value += '
' + LocalizedStrings.getUI('text_change');\n\t\t\tmenu_var_or_value += '
';\n\t\t\tmenu_var_or_value += '
EXP OP EXP
';\n\t\t\tmenu_var_or_value += '
OP EXP
';\n\t\t\tmenu_var_or_value += '
( EXP )
';\n\t\t\tmenu_var_or_value += '
';\n\t\t}*/\n\t}\n\n menu_var_or_value += '
';\n\n menu_var_or_value = $(menu_var_or_value);\n\n dom_object.append(menu_var_or_value);\n \n ref_object.dom_object = menu_var_or_value;\n\n addHandlers(command, ref_object, dom_object, menu_var_or_value, function_obj, expression_element);\n\n addVariablesToMenu(function_obj, menu_var_or_value, ref_object, expression_element);\n\n addFunctionsToMenu(function_obj, menu_var_or_value, ref_object, expression_element);\n\n\taddIVProgFunctionsToMenu(function_obj, menu_var_or_value, ref_object, expression_element);\n\n if (ref_object.content || ref_object.function_called) {\n \tif (ref_object.content) {\n \t\t// Verificar se a variável ainda existe:\n \t\tvar variable_fun = isVarInProgram(ref_object.content, function_obj);\n \t\tif (variable_fun) {\n \t\t\tref_object.content = variable_fun;\n \t\t\trenderPreviousContent(function_obj, menu_var_or_value, ref_object, dom_object, command, expression_element);\n\t \t} else {\n\t \t\tif (ref_object.content && ref_object.content.type) {\n\t \t\t\tref_object.content = null;\n\t \t\t\tappendSelectText(ref_object, menu_var_or_value);\n\t \t\t} else {\n\t \t\t\trenderPreviousContent(function_obj, menu_var_or_value, ref_object, dom_object, command, expression_element);\n\t \t\t}\n\t \t}\n \t} else if (ref_object.function_called) {\n \t\t// Verificar se a função ainda existe:\n \t\tvar ret_function = isFunctionInProgram(ref_object.function_called);\n \t\tif (ret_function) {\n \t\t\tref_object.function_called = ret_function;\n \t\t\trenderPreviousContent(function_obj, menu_var_or_value, ref_object, dom_object, command, expression_element);\n \t\t} else {\n \t\t\tref_object.content = null;\n\t\t \tref_object.row = null;\n\t\t \tref_object.column = null;\n\t\t \tdelete ref_object.function_called;\n\t\t \tdelete ref_object.parameters_list;\n \t\t\tappendSelectText(ref_object, menu_var_or_value);\n \t\t}\n \t}\n\n } else {\n \tappendSelectText(ref_object, menu_var_or_value);\n }\n\n}\n\nfunction appendSelectText (ref_object, menu_var_or_value) {\n\tswitch(ref_object.variable_and_value) {\n\t\tcase VAR_OR_VALUE_TYPES.only_variable:\n\t\t\tmenu_var_or_value.find('.text').append(''+LocalizedStrings.getUI('var_menu_select_var')+'');\n\t\t\tbreak;\n\t\tcase VAR_OR_VALUE_TYPES.all:\n\t\t\tmenu_var_or_value.find('.text').append(''+LocalizedStrings.getUI('var_menu_select_all')+'');\n\t\t\tbreak;\n\t\tcase VAR_OR_VALUE_TYPES.variable_and_function:\n\t\t\tmenu_var_or_value.find('.text').append(''+LocalizedStrings.getUI('var_menu_select_all')+'');\n\t\t\tbreak;\n\t\tcase VAR_OR_VALUE_TYPES.only_function:\n\t\t\tmenu_var_or_value.find('.text').append(''+LocalizedStrings.getUI('var_menu_select_function')+'');\n\t\t\tbreak;\n\t}\n}\n\nfunction isFunctionInProgram (function_called_obj) {\n\tif (function_called_obj.name) {\n\t\tif (window.program_obj.functions) {\n\t\t\tfor (var i = 0; i < window.program_obj.functions.length; i++) {\n\t\t\t\tif (window.program_obj.functions[i] == function_called_obj) {\n\t\t\t\t\treturn window.program_obj.functions[i];\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (var i = 0; i < window.program_obj.functions.length; i++) {\n\t\t\t\tif (window.program_obj.functions[i].name == function_called_obj.name) {\n\t\t\t\t\treturn window.program_obj.functions[i];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} else if (function_called_obj.identifier) {\n\t\tfor (var i = 0; i < window.system_functions.length; i++) {\n\t\t\tif (window.system_functions[i].identifier == function_called_obj.identifier) {\n\t\t\t\treturn window.system_functions[i];\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn null;\n}\n\nfunction isVarInProgram (var_obj, function_obj) {\n\t// Verify in locals:\n\tif (function_obj.variables_list) {\n\t\tfor (var i = 0; i < function_obj.variables_list.length; i++) {\n\t\t\tif (function_obj.variables_list[i] == var_obj) {\n\t\t\t\treturn function_obj.variables_list[i];\n\t\t\t}\n\t\t}\n\t}\n\t// Verify in parameters:\n\tif (function_obj.parameters_list) {\n\t\tfor (var i = 0; i < function_obj.parameters_list.length; i++) {\n\t\t\tif (function_obj.parameters_list[i] == var_obj) {\n\t\t\t\treturn function_obj.parameters_list[i];\n\t\t\t}\n\t\t}\n\t}\n\t// Verify in globals:\n\tif (window.program_obj.globals) {\n\t\tfor (var i = 0; i < window.program_obj.globals.length; i++) {\n\t\t\tif (window.program_obj.globals[i] == var_obj) {\n\t\t\t\treturn window.program_obj.globals[i];\n\t\t\t}\n\t\t}\n\t}\n\n\t// If not found, verify if the reference was lost\n\tif (var_obj) {\n\t\tif (function_obj.variables_list) {\n\t\t\tfor (var i = 0; i < function_obj.variables_list.length; i++) {\n\t\t\t\tif (function_obj.variables_list[i].name == var_obj.name) {\n\t\t\t\t\treturn function_obj.variables_list[i];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (function_obj.parameters_list) {\n\t\t\tfor (var i = 0; i < function_obj.parameters_list.length; i++) {\n\t\t\t\tif (function_obj.parameters_list[i].name == var_obj.name) {\n\t\t\t\t\treturn function_obj.parameters_list[i];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (window.program_obj.globals) {\n\t\t\tfor (var i = 0; i < window.program_obj.globals.length; i++) {\n\t\t\t\tif (window.program_obj.globals[i].name == var_obj.name) {\n\t\t\t\t\treturn window.program_obj.globals[i];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn null;\n}\n\nfunction renderPreviousContent (function_obj, menu_var_or_value, ref_object, dom_object, command, expression_element) {\n\n\t\n\tif (ref_object.function_called) {\n\n\t\tmenu_var_or_value.remove();\n\t\tvariableValueMenuCode(command, ref_object, dom_object, function_obj, menu_var_or_value, expression_element);\n\n\t} else if (ref_object.content.type) { \n\n\t\tmenu_var_or_value.remove();\n\t\tvariableValueMenuCode(command, ref_object, dom_object, function_obj, menu_var_or_value, expression_element);\n\n\t} else {\n\n\t\tmenu_var_or_value.remove();\n\t\tvariableValueMenuCode(command, ref_object, dom_object, function_obj, menu_var_or_value, expression_element);\n\n\t}\n}\n\nfunction variableValueMenuCode (command, variable_obj, dom_object, function_obj, menu_var_or_value, expression_element) {\n\t\n\tif (variable_obj.content || variable_obj.function_called) {\n \t// Verificar se a variável ainda existe:\n \tvar var_fun = isVarInProgram(variable_obj.content, function_obj);\n\n \tif (var_fun) {\n\t \tvariable_obj.content = var_fun;\n \t} else {\n \t\tif (variable_obj.content && variable_obj.content.type) {\n \t\t\tvariable_obj.content = null;\n \t\t\tappendSelectText(variable_obj, menu_var_or_value);\n \t\t}\n \t}\n } else {\n \tappendSelectText(variable_obj, menu_var_or_value);\n }\n\n\tif (variable_obj.content == null && variable_obj.function_called == null) {\n\t\trenderMenu(command, variable_obj, dom_object, function_obj, 2, expression_element);\n\t\treturn;\n\t}\n\n\tvar ret = '';\n\tif (variable_obj.function_called) {\n\n\t\tif (variable_obj.function_called.parameters_list == null || variable_obj.function_called.length == 0) {\n\n\t\t\tmenu_var_or_value.find('.text').text(' ');\n\t\t\tdom_object.find('.menu_var_or_value_dom').remove();\n\n\t\t\tvar parameters_menu;\n\t\t\t\n\t\t\tif (variable_obj.function_called.name) {\n\t\t\t\tparameters_menu = '
'+variable_obj.function_called.name+' ( ';\n\t\t\t} else {\n\t\t\t\tparameters_menu = '
'+ LocalizedStrings.translateInternalFunction(variable_obj.function_called.identifier, variable_obj.function_called.category)+' ( ';\n\t\t\t}\n\n\t\t\tparameters_menu += ' )
';\n\n\t\t\tparameters_menu = $(parameters_menu);\n\n\t\t\tdom_object.append(parameters_menu);\n\n\t\t\tvar context_menu = '
';\n\t\t\tcontext_menu += '
'+LocalizedStrings.getUI('btn_clear')+'
';\n\n\t\t\t/*if (command.type == Models.COMMAND_TYPES.attribution) {\n\t\t\t\tcontext_menu += '
' + LocalizedStrings.getUI('text_change');\n\t\t\t\tcontext_menu += '
';\n\t\t\t\tcontext_menu += '
EXP OP EXP
';\n\t\t\t\tcontext_menu += '
OP EXP
';\n\t\t\t\tcontext_menu += '
( EXP )
';\n\t\t\t\tcontext_menu += '
';\n\t\t\t}*/\n\n\t\t\tcontext_menu += '
';\n\n\t\t\tcontext_menu = $(context_menu);\n\n\t\t\tcontext_menu.insertAfter( dom_object.find('.parameters_function_called') );\n\n\t\t\tcontext_menu.dropdown({\n\t\t\t\tonChange: function(value, text, $selectedItem) {\n\t\t\t\t console.log('S1');\n\t\t\t if ($selectedItem.data('clear')) {\n\t\t\t \tconsole.log('PP1');\n\t\t\t \tdom_object.text('');\n\n\t\t\t \tvariable_obj.content = null;\n\t\t\t \tvariable_obj.row = null;\n\t\t\t \tvariable_obj.column = null;\n\t\t\t \tdelete variable_obj.function_called;\n\t\t\t \tdelete variable_obj.parameters_list;\n\n\t\t\t \trenderMenu(command, variable_obj, dom_object, function_obj, 2, expression_element);\n\t\t\t }\n\n\t\t\t if ($selectedItem.data('exp')) {\n\t\t\t \tAttribuitionsManagement.manageExpressionElements(command, variable_obj, dom_object, menu_var_or_value, function_obj, $selectedItem, expression_element);\n\t\t\t }\n\t\t },\n\t\t selectOnKeydown: false\n\t\t\t});\n\t\t} else {\n\n\t\t\tmenu_var_or_value.find('.text').text(' ');\n\t\t\tdom_object.find('.menu_var_or_value_dom').remove();\n\n\t\t\tvar parameters_menu;\n\n\t\t\tif (variable_obj.function_called.name) {\n\t\t\t\tparameters_menu = '
'+variable_obj.function_called.name+' ( ';\n\t\t\t} else {\n\t\t\t\tparameters_menu = '
'+LocalizedStrings.translateInternalFunction(variable_obj.function_called.identifier, variable_obj.function_called.category)+' ( ';\n\t\t\t}\n\n\t\t\tfor (var j = 0; j < variable_obj.function_called.parameters_list.length; j++) {\n\t\t\t\tparameters_menu += '
';\n\t\t\t\tif ((j + 1) != variable_obj.function_called.parameters_list.length) {\n\t\t\t\t\tparameters_menu += ' , ';\n\t\t\t\t}\n\t\t\t}\n\t\t\tparameters_menu += ' )
';\n\n\t\t\tparameters_menu = $(parameters_menu);\n\n\t\t\tdom_object.append(parameters_menu);\n\n\t\t\tfor (var j = 0; j < variable_obj.function_called.parameters_list.length; j++) {\n\t\t\t\trenderMenu(command, variable_obj.parameters_list[j], parameters_menu.find('.parameter_'+j), function_obj, 2, expression_element);\n\t\t\t}\n\n\n\t\t\tvar context_menu = '
';\n\t\t\tcontext_menu += '
'+LocalizedStrings.getUI('btn_clear')+'
';\n\n\t\t\t/*if (command.type == Models.COMMAND_TYPES.attribution) {\n\t\t\t\tcontext_menu += '
' + LocalizedStrings.getUI('text_change');\n\t\t\t\tcontext_menu += '
';\n\t\t\t\tcontext_menu += '
EXP OP EXP
';\n\t\t\t\tcontext_menu += '
OP EXP
';\n\t\t\t\tcontext_menu += '
( EXP )
';\n\t\t\t\tcontext_menu += '
';\n\t\t\t}*/\n\n\t\t\tcontext_menu += '
';\n\n\t\t\tcontext_menu = $(context_menu);\n\n\t\t\tcontext_menu.insertAfter( parameters_menu );\n\n\t\t\tcontext_menu.dropdown({\n\t\t\t\tonChange: function(value, text, $selectedItem) {\n\t\t\t\t\tconsole.log('S2');\n\t\t\t if ($selectedItem.data('clear')) {\n\t\t\t \tconsole.log('PP2');\n\t\t\t \tdom_object.text('');\n\n\t\t\t \tvariable_obj.content = null;\n\t\t\t \tvariable_obj.row = null;\n\t\t\t \tvariable_obj.column = null;\n\t\t\t \tdelete variable_obj.function_called;\n\t\t\t \tdelete variable_obj.parameters_list;\n\n\t\t\t \trenderMenu(command, variable_obj, dom_object, function_obj, 2, expression_element);\n\t\t\t }\n\n\t\t\t if ($selectedItem.data('exp')) {\n\t\t\t \tAttribuitionsManagement.manageExpressionElements(command, variable_obj, dom_object, menu_var_or_value, function_obj, $selectedItem, expression_element);\n\t\t\t }\n\t\t },\n\t\t selectOnKeydown: false\n\t\t\t});\n\t\t}\n\n\n\t} else if (variable_obj.content.type) {\n\n\t\tvar variable_render = \"\";\n\n\t\tif (variable_obj.content.dimensions == 1 && variable_obj.dimensions != 1) {\n\n\t\t\tvariable_render = '
'+variable_obj.content.name+'';\n\n\t\t\tvariable_render += ' [
]';\n\t\t\t\n\t\t\tvariable_render += '
';\n\n\t\t\tvariable_render = $(variable_render);\n\n\t\t\tdom_object.append(variable_render);\n\n\n\t\t\tvar context_menu = '
';\n\t\t\tcontext_menu += '
'+LocalizedStrings.getUI('btn_clear')+'
';\n\n\t\t\t/*if (command.type == Models.COMMAND_TYPES.attribution) {\n\t\t\t\tcontext_menu += '
' + LocalizedStrings.getUI('text_change');\n\t\t\t\tcontext_menu += '
';\n\t\t\t\tcontext_menu += '
EXP OP EXP
';\n\t\t\t\tcontext_menu += '
OP EXP
';\n\t\t\t\tcontext_menu += '
( EXP )
';\n\t\t\t\tcontext_menu += '
';\n\t\t\t}*/\n\n\t\t\tcontext_menu += '
';\n\n\t\t\tcontext_menu = $(context_menu);\n\n\t\t\tvariable_render.append(context_menu);\n\n\t\t\tcontext_menu.dropdown({\n\t\t\t\tonChange: function(value, text, $selectedItem) {\n\t\t\t\t\tconsole.log('S3');\n\t\t\t if ($selectedItem.data('clear')) {\n\t\t\t \tconsole.log('PP3');\n\t\t\t \tdom_object.text('');\n\n\t\t\t \tvariable_obj.content = null;\n\t\t\t \tvariable_obj.row = null;\n\t\t\t \tvariable_obj.column = null;\n\t\t\t \tdelete variable_obj.function_called;\n\t\t \t\tdelete variable_obj.parameters_list;\n\n\t\t\t \trenderMenu(command, variable_obj, dom_object, function_obj, 2, expression_element);\n\t\t\t }\n\n\t\t\t if ($selectedItem.data('exp')) {\n\t\t\t \tAttribuitionsManagement.manageExpressionElements(command, variable_obj, dom_object, menu_var_or_value, function_obj, $selectedItem, expression_element);\n\t\t\t }\n\t\t },\n\t\t selectOnKeydown: false\n\t\t\t});\n\n\t\t\tif (!variable_obj.column) {\n\t\t\t\tvariable_obj.column = new Models.VariableValueMenu(VAR_OR_VALUE_TYPES.all, null, null, null, true);\n\t\t\t}\n\n\t\t\tvariableValueMenuCode(command, variable_obj.column, $(variable_render.find('.column_container')), function_obj, menu_var_or_value, expression_element);\n\n\t\t} else if (variable_obj.content.dimensions == 2 && variable_obj.dimensions != 2) {\n\n\t\t\tvariable_render = '
'+variable_obj.content.name+'';\n\n\t\t\tvariable_render += ' [
]';\n\t\t\tvariable_render += ' [
] ';\n\t\t\t\n\t\t\tvariable_render += '
';\n\n\t\t\tvariable_render = $(variable_render);\n\n\t\t\tdom_object.append(variable_render);\n\n\n\t\t\tvar context_menu = '
';\n\t\t\tcontext_menu += '
'+LocalizedStrings.getUI('btn_clear')+'
';\n\n\t\t\t/*if (command.type == Models.COMMAND_TYPES.attribution) {\n\t\t\t\tcontext_menu += '
' + LocalizedStrings.getUI('text_change');\n\t\t\t\tcontext_menu += '
';\n\t\t\t\tcontext_menu += '
EXP OP EXP
';\n\t\t\t\tcontext_menu += '
OP EXP
';\n\t\t\t\tcontext_menu += '
( EXP )
';\n\t\t\t\tcontext_menu += '
';\n\t\t\t}*/\n\n\t\t\tcontext_menu += '
';\n\n\t\t\tcontext_menu = $(context_menu);\n\n\t\t\tvariable_render.append(context_menu);\n\n\t\t\tcontext_menu.dropdown({\n\t\t\t\tonChange: function(value, text, $selectedItem) {\n\t\t\t\t\tconsole.log('S4');\n\t\t\t if ($selectedItem.data('clear')) {\n\t\t\t \tconsole.log('PP4');\n\t\t\t \tdom_object.text('');\n\n\t\t\t \tvariable_obj.content = null;\n\t\t\t \tvariable_obj.row = null;\n\t\t\t \tvariable_obj.column = null;\n\t\t\t \tdelete variable_obj.function_called;\n\t\t \t\tdelete variable_obj.parameters_list;\n\n\t\t\t \trenderMenu(command, variable_obj, dom_object, function_obj, 2, expression_element);\n\t\t\t }\n\n\t\t\t if ($selectedItem.data('exp')) {\n\t\t\t \tAttribuitionsManagement.manageExpressionElements(command, variable_obj, dom_object, menu_var_or_value, function_obj, $selectedItem, expression_element);\n\t\t\t }\n\t\t },\n\t\t selectOnKeydown: false\n\t\t\t});\n\n\t\t\tif (!variable_obj.column) {\n\t\t\t\tvariable_obj.column = new Models.VariableValueMenu(VAR_OR_VALUE_TYPES.all, null, null, null, true);\n\t\t\t}\n\t\t\tif (!variable_obj.row) {\n\t\t\t\tvariable_obj.row = new Models.VariableValueMenu(VAR_OR_VALUE_TYPES.all, null, null, null, true);\n\t\t\t}\n\n\t\t\tvariableValueMenuCode(command, variable_obj.row, $(variable_render.find('.row_container')), function_obj, menu_var_or_value, expression_element);\n\t\t\tvariableValueMenuCode(command, variable_obj.column, $(variable_render.find('.column_container')), function_obj, menu_var_or_value, expression_element);\n\n\t\t} else {\n\n\t\t\tvariable_render = '
'+variable_obj.content.name+'';\n\n\t\t\tvariable_render += '
';\n\n\t\t\tvariable_render = $(variable_render);\n\n\t\t\tdom_object.append(variable_render);\n\n\n\t\t\tvar context_menu = '
';\n\t\t\tcontext_menu += '
'+LocalizedStrings.getUI('btn_clear')+'
';\n\n\t\t\t/*if (command.type == Models.COMMAND_TYPES.attribution && !dom_object.hasClass('var_attributed')) {\n\t\t\t\tconsole.log('dom_object6');\n\t\t\t\tconsole.log(dom_object);\n\t\t\t\tcontext_menu += '
' + LocalizedStrings.getUI('text_change');\n\t\t\t\tcontext_menu += '
';\n\t\t\t\tcontext_menu += '
EXP OP EXP
';\n\t\t\t\tcontext_menu += '
OP EXP
';\n\t\t\t\tcontext_menu += '
( EXP )
';\n\t\t\t\tcontext_menu += '
';\n\t\t\t}*/\n\n\t\t\tcontext_menu += '
';\n\n\t\t\tcontext_menu = $(context_menu);\n\n\t\t\tvariable_render.append(context_menu);\n\n\t\t\tcontext_menu.dropdown({\n\t\t\t\tonChange: function(value, text, $selectedItem) {\n\t\t\t\t\tconsole.log('S5');\n\t\t\t if ($selectedItem.data('clear')) {\n\t\t\t \tconsole.log('PP5');\n\t\t\t \tdom_object.text('');\n\n\t\t\t \tvariable_obj.content = null;\n\t\t\t \tvariable_obj.row = null;\n\t\t\t \tvariable_obj.column = null;\n\n\t\t\t \tdelete variable_obj.function_called;\n\t\t \t\tdelete variable_obj.parameters_list;\n\n\t\t\t \trenderMenu(command, variable_obj, dom_object, function_obj, 2, expression_element);\n\t\t\t }\n\n\t\t\t if ($selectedItem.data('exp')) {\n\t\t\t \tAttribuitionsManagement.manageExpressionElements(command, variable_obj, dom_object, menu_var_or_value, function_obj, $selectedItem, expression_element);\n\t\t\t }\n\t\t },\n\t\t selectOnKeydown: false\n\t\t\t});\n\n\t\t}\n\n\t} else {\n\n\t\tvar variable_render = '
'+variable_obj.content+'';\n\t\tvariable_render += '
';\n\n\t\tvariable_render = $(variable_render);\n\n\t\tdom_object.append(variable_render);\n\n\t\tvar context_menu = '
';\n\t\tcontext_menu += '
'+LocalizedStrings.getUI('btn_clear')+'
';\n\n\t\t/*if (command.type == Models.COMMAND_TYPES.attribution) {\n\t\t\tcontext_menu += '
' + LocalizedStrings.getUI('text_change');\n\t\t\tcontext_menu += '
';\n\t\t\tcontext_menu += '
EXP OP EXP
';\n\t\t\tcontext_menu += '
OP EXP
';\n\t\t\tcontext_menu += '
( EXP )
';\n\t\t\tcontext_menu += '
';\n\t\t}*/\n\n\t\tcontext_menu += '
';\n\n\t\tcontext_menu = $(context_menu);\n\n\t\tif (variable_obj.variable_and_value != VAR_OR_VALUE_TYPES.only_value) {\n\t\t\tcontext_menu.insertAfter( variable_render );\n\t\t}\n\n\t\tcontext_menu.dropdown({\n\t\t\tonChange: function(value, text, $selectedItem) {\n\t\t\t\tconsole.log('S6');\n\t\t if ($selectedItem.data('clear')) {\n\t\t \tconsole.log('PP6');\n\t\t \tdom_object.text('');\n\n \t\t\t\tvariable_obj.content = null;\n\t\t\t variable_obj.row = null;\n\t\t\t variable_obj.column = null;\n\n\t\t \tdelete variable_obj.function_called;\n\t\t \tdelete variable_obj.parameters_list;\n\n\t\t \tdom_object.find('.value_rendered').remove();\n\t\t\t\tdom_object.find('.context_menu_clear').remove();\n\t\t\t\tdom_object.find('.width-dynamic-minus').remove();\n\n\t\t \trenderMenu(command, variable_obj, dom_object, function_obj, 2, expression_element);\n\t\t }\n\n\t\t if ($selectedItem.data('exp')) {\n\t\t \tAttribuitionsManagement.manageExpressionElements(command, variable_obj, dom_object, menu_var_or_value, function_obj, $selectedItem, expression_element);\n\t\t }\n\t },\n\t\t selectOnKeydown: false\n\t\t});\n\n\t\tvariable_render.on('click', function(e) {\n\t\t\tvariable_render.remove();\n\t\t\tvariable_render.empty();\n\t\t\tvariable_render.remove();\n\t\t\tdom_object.empty();\n\t\t\tdom_object.append(' ');\n\t\t\t\n\t\t\topenInputToValue(command, variable_obj, dom_object, menu_var_or_value, function_obj, expression_element);\n\t\t});\n\t}\n}\n\nfunction addIVProgFunctionsToMenu (function_obj, menu_var_or_value, ref_object, expression_element) {\n\tvar sub_menu = menu_var_or_value.find('.menu_only_functions');\n\tsub_menu.append('
'+LocalizedStrings.getUI('text_header_ivprog_functions')+'
');\n\tsub_menu.append('
'+LocalizedStrings.getUI('text_menu_functions_math')+'
');\n\tsub_menu.append('
'+LocalizedStrings.getUI('text_menu_functions_text')+'
');\n\tsub_menu.append('
'+LocalizedStrings.getUI('text_menu_functions_array')+'
');\n\tsub_menu.append('
'+LocalizedStrings.getUI('text_menu_functions_conversion')+'
');\n\n\t// Insert Math functions:\n\tfor (var i = 0; i < window.system_functions.length; i++) {\n\t\tvar t = $('
');\n\t\tt.data('function_reference', window.system_functions[i]);\n\t\tt.data('option', VAR_OR_VALUE_TYPES.only_function);\n\t\tt.text(LocalizedStrings.translateInternalFunction(window.system_functions[i].identifier));\n\t\t\n\t\tswitch(window.system_functions[i].category) {\n\t\t\tcase Models.SYSTEM_FUNCTIONS_CATEGORIES.math:\n\t\t\t\tsub_menu.find('.menu_math_functions').append(t);\n\t\t\t\tbreak;\n\t\t\tcase Models.SYSTEM_FUNCTIONS_CATEGORIES.text:\n\t\t\t\tsub_menu.find('.menu_text_functions').append(t);\n\t\t\t\tbreak;\n\t\t\tcase Models.SYSTEM_FUNCTIONS_CATEGORIES.arrangement:\n\t\t\t\tsub_menu.find('.menu_arrangement_functions').append(t);\n\t\t\t\tbreak;\n\t\t\tcase Models.SYSTEM_FUNCTIONS_CATEGORIES.conversion:\n\t\t\t\tsub_menu.find('.menu_conversion_functions').append(t);\n\t\t\t\tbreak;\n\t\t}\t\n\t}\n}\n\nfunction addFunctionsToMenu (function_obj, menu_var_or_value, ref_object, expression_element) {\n\tvar sub_menu = menu_var_or_value.find('.menu_only_functions');\n\tsub_menu.text('');\n\n\tfor (var i = 0; i < window.program_obj.functions.length; i++) {\n\t\tvar temp = $('
' + window.program_obj.functions[i].name + '
');\n\t\ttemp.data('function_reference', window.program_obj.functions[i]);\n\t\tsub_menu.append(temp);\n\t}\n}\n\nfunction addVariablesToMenu (function_obj, menu_var_or_value, ref_object, expression_element) {\n\n\tvar sub_menu = menu_var_or_value.find('.menu_only_vars');\n\tsub_menu.text('');\n\tvar is_there = false;\n\n\tif (window.program_obj.globals) {\n\n\t\tif (ref_object.include_constant) {\n\t\t\tfor (var i = 0; i < window.program_obj.globals.length; i++) {\n\t\t\t\tvar temp = $('
' + window.program_obj.globals[i].name + '
');\n\t\t\t\ttemp.data('variable_reference', window.program_obj.globals[i]);\n\t\t\t\tsub_menu.append(temp);\n\t\t\t\tis_there = true;\n\t\t\t}\n\t\t} else {\n\t\t\tfor (var i = 0; i < window.program_obj.globals.length; i++) {\n\t\t\t\tif (!window.program_obj.globals[i].is_constant) {\n\t\t\t\t\tvar temp = $('
' + window.program_obj.globals[i].name + '
');\n\t\t\t\t\ttemp.data('variable_reference', window.program_obj.globals[i]);\n\t\t\t\t\tsub_menu.append(temp);\n\t\t\t\t\tis_there = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tif (function_obj.parameters_list) {\n\t\tfor (var i = 0; i < function_obj.parameters_list.length; i++) {\n\t\t\tvar temp = $('
' + function_obj.parameters_list[i].name + '
');\n\t\t\ttemp.data('variable_reference', function_obj.parameters_list[i]);\n\t\t\tsub_menu.append(temp);\n\t\t\tis_there = true;\n\t\t}\n\t}\n\n\tif (function_obj.variables_list) {\n\t\tfor (var i = 0; i < function_obj.variables_list.length; i++) {\n\t\t\tvar temp = $('
' + function_obj.variables_list[i].name + '
');\n\t\t\ttemp.data('variable_reference', function_obj.variables_list[i]);\n\t\t\tsub_menu.append(temp);\n\t\t\tis_there = true;\n\t\t}\n\t}\n\tif (!is_there) {\n\t\tsub_menu.append($('
'+LocalizedStrings.getUI('text_no_variable')+'
'));\n\t\tsub_menu.append($('
'+LocalizedStrings.getUI('text_no_variable_instruction')+'
'));\n\t}\n\n}\n\nfunction addHandlers (command, ref_object, dom_object, menu_var_or_value, function_obj, expression_element) {\n\n\tif (ref_object.variable_and_value != VAR_OR_VALUE_TYPES.only_value) {\n\t\tmenu_var_or_value.dropdown({\n\t\t onChange: function(value, text, $selectedItem) {\n\t\t \tconsole.log('S7');\n\t\t \tdom_object.find('.var_name').remove();\n\t\t switch ($selectedItem.data('option')) {\n\t\t \tcase VAR_OR_VALUE_TYPES.only_function:\n\t\t \t\topenInputToFunction(command, ref_object, dom_object, menu_var_or_value, function_obj, $($selectedItem).data('function_reference'), expression_element);\n\t\t \t\tbreak;\n\n\t\t \tcase VAR_OR_VALUE_TYPES.only_value:\n\t\t \t\topenInputToValue(command, ref_object, dom_object, menu_var_or_value, function_obj, expression_element);\n\t\t \t\tbreak;\n\n\t\t \tcase VAR_OR_VALUE_TYPES.only_variable:\n\t\t \t\topenInputToVariable(command, ref_object, dom_object, menu_var_or_value, function_obj, $($selectedItem).data('variable_reference'), expression_element);\n\t\t \t\tbreak;\n\t\t }\n\n\t\t if ($selectedItem.data('exp')) {\n\t\t \tAttribuitionsManagement.manageExpressionElements(command, ref_object, dom_object, menu_var_or_value, function_obj, $selectedItem, expression_element);\n\t\t }\n\n\t\t if (command.type == Models.COMMAND_TYPES.repeatNtimes) {\n\t\t \tRepeatNTimesManagement.manageExpressionElements(command, ref_object, dom_object, menu_var_or_value, function_obj, $selectedItem, expression_element);\n\t\t }\n\t },\n\t\t selectOnKeydown: false\n\t });\n\t}\n\n\tdom_object.find('.width-dynamic').on('input', function() {\n\t var inputWidth = $(this).textWidth()+10;\n\t $(this).focus();\n\n\t var tmpStr = $(this).val();\n\t\t$(this).val('');\n\t\t$(this).val(tmpStr);\n\n\t $(this).css({\n\t width: inputWidth\n\t })\n\t}).trigger('input');\n\n\n\tif (command.type == Models.COMMAND_TYPES.comment) {\n\t\tdom_object.parent().on('click', function(e) {\n\t\t\tdom_object.find('.value_rendered').remove();\n\t\t\tdom_object.find('.value_rendered').empty();\n\t\t\tdom_object.find('.value_rendered').remove();\n\t\t\tdom_object.empty();\n\t\t\tdom_object.append(' ');\n\t\t\t\n\t\t\topenInputToValue(command, ref_object, dom_object, menu_var_or_value, function_obj, expression_element)\n\t\t});\n\t}\n\t\n}\n\nfunction openInputToFunction (command, ref_object, dom_object, menu_var_or_value, function_obj, function_selected, expression_element) {\n\t\n\tref_object.function_called = function_selected;\n\tref_object.parameters_list = [];\n\n\n\tif (function_selected.parameters_list != null && function_selected.parameters_list.length > 0) {\n\n\t\tmenu_var_or_value.find('.text').text(' ');\n\t\tdom_object.find('.menu_var_or_value_dom').remove();\n\n\t\tvar parameters_menu;\n\t\tif (function_selected.name) {\n\t\t\tparameters_menu = '
'+function_selected.name+' ( ';\n\t\t} else {\n\t\t\tparameters_menu = '
'+LocalizedStrings.translateInternalFunction(function_selected.identifier, function_selected.category)+' ( ';\n\t\t}\n\t\tfor (var j = 0; j < function_selected.parameters_list.length; j++) {\n\t\t\tparameters_menu += '
';\n\t\t\tif ((j + 1) != function_selected.parameters_list.length) {\n\t\t\t\tparameters_menu += ' , ';\n\t\t\t}\n\t\t}\n\t\tparameters_menu += ' )
';\n\n\t\tparameters_menu = $(parameters_menu);\n\n\t\tdom_object.append(parameters_menu);\n\n\t\tfor (var j = 0; j < function_selected.parameters_list.length; j++) {\n\t\t\tvar temp;\n\t\t\tif (function_selected.parameters_list[j].dimensions > 0) {\n\t\t\t\ttemp = new Models.VariableValueMenu(VAR_OR_VALUE_TYPES.variable_and_function, null, null, null, true, function_selected.parameters_list[j].dimensions);\n\t\t\t} else {\n\t\t\t\ttemp = new Models.VariableValueMenu(VAR_OR_VALUE_TYPES.all, null, null, null, true);\n\t\t\t}\n\t\t\tref_object.parameters_list.push(temp);\n\t\t\trenderMenu(command, temp, parameters_menu.find('.parameter_'+j), function_obj, 2, expression_element);\n\t\t}\n\n\n\t\tvar context_menu = '
';\n\t\tcontext_menu += '
'+LocalizedStrings.getUI('btn_clear')+'
';\n\n\t\t/*if (command.type == Models.COMMAND_TYPES.attribution) {\n\t\t\tcontext_menu += '
' + LocalizedStrings.getUI('text_change');\n\t\t\tcontext_menu += '
';\n\t\t\tcontext_menu += '
EXP OP EXP
';\n\t\t\tcontext_menu += '
OP EXP
';\n\t\t\tcontext_menu += '
( EXP )
';\n\t\t\tcontext_menu += '
';\n\t\t}*/\n\n\t\tcontext_menu += '
';\n\n\t\tcontext_menu = $(context_menu);\n\n\t\tcontext_menu.insertAfter( dom_object.find('.parameters_function_called') );\n\n\t\tcontext_menu.dropdown({\n\t\t\tonChange: function(value, text, $selectedItem) {\n\t\t\t\tconsole.log('S8');\n\t\t if ($selectedItem.data('clear')) {\n\t\t \tconsole.log('PP7');\n\t\t \tdom_object.text('');\n\n\t\t \tref_object.content = null;\n\t\t \tref_object.row = null;\n\t\t \tref_object.column = null;\n\t\t \tdelete ref_object.function_called;\n\t\t \tdelete ref_object.parameters_list;\n\n\t\t \trenderMenu(command, ref_object, dom_object, function_obj, 2, expression_element);\n\t\t }\n\n\t\t if ($selectedItem.data('exp')) {\n\t\t \tAttribuitionsManagement.manageExpressionElements(command, ref_object, dom_object, menu_var_or_value, function_obj, $selectedItem, expression_element);\n\t\t }\n\t },\n\t\t selectOnKeydown: false\n\t\t});\n\n\t} else {\n\t\tmenu_var_or_value.find('.text').text(' ');\n\t\tdom_object.find('.menu_var_or_value_dom').remove();\n\n\t\tvar parameters_menu;\n\n\t\tif (function_selected.name) {\n\t\t\tparameters_menu = '
'+function_selected.name+' ( ';\n\t\t} else {\n\t\t\tparameters_menu = '
'+LocalizedStrings.translateInternalFunction(function_selected.identifier, function_selected.category)+' ( ';\n\t\t}\n\t\t\n\t\tparameters_menu += ' )
';\n\n\t\tparameters_menu = $(parameters_menu);\n\n\t\tdom_object.append(parameters_menu);\n\n\t\tvar context_menu = '
';\n\t\tcontext_menu += '
'+LocalizedStrings.getUI('btn_clear')+'
';\n\n\t\t/*if (command.type == Models.COMMAND_TYPES.attribution) {\n\t\t\tcontext_menu += '
' + LocalizedStrings.getUI('text_change');\n\t\t\tcontext_menu += '
';\n\t\t\tcontext_menu += '
EXP OP EXP
';\n\t\t\tcontext_menu += '
OP EXP
';\n\t\t\tcontext_menu += '
( EXP )
';\n\t\t\tcontext_menu += '
';\n\t\t}*/\n\n\t\tcontext_menu += '
';\n\n\t\tcontext_menu = $(context_menu);\n\n\t\tcontext_menu.insertAfter( dom_object.find('.parameters_function_called') );\n\n\t\tcontext_menu.dropdown({\n\t\t\tonChange: function(value, text, $selectedItem) {\n\t\t\t\tconsole.log('S9');\n\t\t if ($selectedItem.data('clear')) {\n\t\t \tconsole.log('PP8');\n\t\t \tdom_object.text('');\n\n\t\t \tref_object.content = null;\n\t\t \tref_object.row = null;\n\t\t \tref_object.column = null;\n\t\t \tdelete ref_object.function_called;\n\t\t \tdelete ref_object.parameters_list;\n\n\t\t \trenderMenu(command, ref_object, dom_object, function_obj, 2, expression_element);\n\t\t }\n\n\t\t if ($selectedItem.data('exp')) {\n\t\t \tAttribuitionsManagement.manageExpressionElements(command, ref_object, dom_object, menu_var_or_value, function_obj, $selectedItem, expression_element);\n\t\t }\n\t },\n\t\t selectOnKeydown: false\n\t\t});\n\t}\n\n\t/*if (command.type == Models.COMMAND_TYPES.attribution) {\n\t\tAttribuitionsManagement.renderMenuOperations(command, ref_object, dom_object, menu_var_or_value, function_obj);\n\t}*/\n}\n\nfunction openInputToVariable (command, ref_object, dom_object, menu_var_or_value, function_obj, variable_selected, expression_element) {\n\t\n\tref_object.content = variable_selected;\n\n\tmenu_var_or_value.find('.text').text(' ');\n\tdom_object.find('.menu_var_or_value_dom').remove();\n\n\tvar variable_render = '
'+variable_selected.name+'';\n\n\tif (variable_selected.dimensions == 1 && ref_object.dimensions != 1) {\n\t\tvariable_render += ' [
]';\n\t}\n\tif (variable_selected.dimensions == 2 && ref_object.dimensions != 2) {\n\t\tvariable_render += ' [
] ';\n\t\tvariable_render += ' [
]';\n\t}\n\n\n\tvariable_render += '
';\n\n\tvariable_render = $(variable_render);\n\n\tdom_object.append(variable_render);\n\n\tif (variable_selected.dimensions == 1 && ref_object.dimensions != 1) {\n\t\tref_object.column = new Models.VariableValueMenu(VAR_OR_VALUE_TYPES.all, null, null, null, true);\n\t\trenderMenu(command, ref_object.column, variable_render.find('.column_container'), function_obj, 2, expression_element);\n\t}\n\tif (variable_selected.dimensions == 2 && ref_object.dimensions != 2) {\n\t\tref_object.row = new Models.VariableValueMenu(VAR_OR_VALUE_TYPES.all, null, null, null, true);\n\t\trenderMenu(command, ref_object.row, variable_render.find('.row_container'), function_obj, 2, expression_element);\n\n\t\tref_object.column = new Models.VariableValueMenu(VAR_OR_VALUE_TYPES.all, null, null, null, true);\n\t\trenderMenu(command, ref_object.column, variable_render.find('.column_container'), function_obj, 2, expression_element);\n\t}\n\n\tvar context_menu = '
';\n\tcontext_menu += '
'+LocalizedStrings.getUI('btn_clear')+'
';\n\n\t/*if (command.type == Models.COMMAND_TYPES.attribution && !dom_object.hasClass('var_attributed')) {\n\t\tconsole.log(\"dom_object 10: \");\n\t\tconsole.log(dom_object);\n\t\tcontext_menu += '
' + LocalizedStrings.getUI('text_change');\n\t\tcontext_menu += '
';\n\t\tcontext_menu += '
EXP OP EXP
';\n\t\tcontext_menu += '
OP EXP
';\n\t\tcontext_menu += '
( EXP )
';\n\t\tcontext_menu += '
';\n\t}*/\n\n\tcontext_menu += '
';\n\n\tcontext_menu = $(context_menu);\n\n\tcontext_menu.insertAfter( dom_object.find('.variable_rendered') );\n\n\tcontext_menu.dropdown({\n\t\tonChange: function(value, text, $selectedItem) {\n\t\t\tconsole.log('S10');\n\t if ($selectedItem.data('clear')) {\n\t \tconsole.log('PP9');\n\t \tdom_object.text('');\n\n\t \tref_object.content = null;\n\t \tref_object.row = null;\n\t \tref_object.column = null;\n\n\t \tdelete ref_object.function_called;\n\t\t delete ref_object.parameters_list;\n\n\t \trenderMenu(command, ref_object, dom_object, function_obj, 2, expression_element);\n\t }\n\n\t if ($selectedItem.data('exp')) {\n\t \tAttribuitionsManagement.manageExpressionElements(command, ref_object, dom_object, menu_var_or_value, function_obj, $selectedItem, expression_element);\n\t }\n\n\t if (command.type == Models.COMMAND_TYPES.repeatNtimes) {\n\t \tRepeatNTimesManagement.manageClearExpressionElements(command, ref_object, dom_object, menu_var_or_value, function_obj, $selectedItem, expression_element);\n\t }\n },\n\t selectOnKeydown: false\n\t});\n\n\t/*if (command.type == Models.COMMAND_TYPES.attribution) {\n\t\tAttribuitionsManagement.renderMenuOperations(command, ref_object, dom_object, menu_var_or_value, function_obj, variable_selected);\n\t}*/\n}\n\n\nfunction openInputToValue (command, ref_object, dom_object, menu_var_or_value, function_obj, expression_element) {\n\n\tif (ref_object.content == null) {\n\t\tref_object.content = \"\";\n\t}\n\n\tmenu_var_or_value.find('.text').text(' ');\n\tvar field = $('');\n\tfield.insertBefore(dom_object.find('.menu_var_or_value_dom'));\n\tvar rendered = $('
');\n\trendered.insertBefore(field);\n\n\tfield.focus();\n\tfield.val(ref_object.content);\n\n\tvar context_menu = '
';\n\tcontext_menu += '
'+LocalizedStrings.getUI('btn_clear')+'
';\n\n\t/*if (command.type == Models.COMMAND_TYPES.attribution) {\n\t\tcontext_menu += '
' + LocalizedStrings.getUI('text_change');\n\t\tcontext_menu += '
';\n\t\tcontext_menu += '
EXP OP EXP
';\n\t\tcontext_menu += '
OP EXP
';\n\t\tcontext_menu += '
( EXP )
';\n\t\tcontext_menu += '
';\n\t}*/\n\n\tcontext_menu += '
';\n\n\tcontext_menu = $(context_menu);\n\n\tdom_object.find('.menu_var_or_value_dom').remove();\n\n\tif (ref_object.variable_and_value != VAR_OR_VALUE_TYPES.only_value) {\n\t\tcontext_menu.insertAfter( field );\n\t}\n\n\tcontext_menu.dropdown({\n\t\tonChange: function(value, text, $selectedItem) {\n\t\t\tconsole.log('S11');\n\t if ($selectedItem.data('clear')) {\n\t \tconsole.log('PP10');\n\t \tdom_object.text('');\n\n\t \tdom_object.find('.value_rendered').remove();\n\t\t\tdom_object.find('.context_menu_clear').remove();\n\t\t\tdom_object.find('.width-dynamic-minus').remove();\n\n\t\t\tref_object.content = null;\n\t\t ref_object.row = null;\n\t\t ref_object.column = null;\n\n\t\t\tdelete ref_object.function_called;\n\t\t delete ref_object.parameters_list;\n\n\t \trenderMenu(command, ref_object, dom_object, function_obj, 2, expression_element);\n\t }\n\n\t if ($selectedItem.data('exp')) {\n\t \tAttribuitionsManagement.manageExpressionElements(command, ref_object, dom_object, menu_var_or_value, function_obj, $selectedItem, expression_element);\n\t }\n },\n\t selectOnKeydown: false\n\t});\n\n\tdom_object.find('.width-dynamic-minus').focusout(function() {\n\t\tif ($(this).val().trim()) {\n\t\t\tref_object.content = $(this).val().trim();\n\t\t}\n\n\t\trendered.text(ref_object.content);\n\t\t$(this).remove();\n\n\t});\n\n\tdom_object.find('.width-dynamic-minus').on('keydown', function(e) {\n\t\tvar code = e.keyCode || e.which;\n\t\tif(code == 13) {\n\t\t\tif ($(this).val().trim()) {\n\t\t\t\tref_object.content = $(this).val().trim();\n\t\t\t}\n\t\t\trendered.text(ref_object.content);\n\n\t\t\t$(this).remove();\n\t\t}\n\t\tif(code == 27) {\n\t\t\trendered.text(ref_object.content);\n\n\t\t\t$(this).remove();\n\t\t}\n\t});\n\n\tif (command.type == Models.COMMAND_TYPES.comment) {\n\t\t/*rendered.parent().on('click', function(e) {\n\t\t\trendered.parent().off();\n\t\t\tconsole.log(\"TTT14\");\n\t\t\trendered.remove();\n\t\t\trendered.empty();\n\t\t\trendered.remove();\n\t\t\tdom_object.empty();\n\t\t\tdom_object.append(' ');\n\t\t\t\n\t\t\topenInputToValue(command, ref_object, dom_object, menu_var_or_value, function_obj, expression_element)\n\t\t});*/\n\t}\n\n\trendered.on('click', function(e) {\n\t\tconsole.log(\"TTT2\");\n\t\trendered.remove();\n\t\trendered.empty();\n\t\trendered.remove();\n\t\tdom_object.empty();\n\t\tdom_object.append(' ');\n\t\t\n\t\topenInputToValue(command, ref_object, dom_object, menu_var_or_value, function_obj, expression_element)\n\t});\n\n\t/*if (command.type == Models.COMMAND_TYPES.attribution) {\n\t\tAttribuitionsManagement.renderMenuOperations(command, ref_object, dom_object, menu_var_or_value, function_obj);\n\t}*/\n}\n\n\n$.fn.textWidth = function(text, font) {\n \n if (!$.fn.textWidth.fakeEl) $.fn.textWidth.fakeEl = $('').hide().appendTo(document.body);\n \n $.fn.textWidth.fakeEl.text(text || this.val() || this.text() || this.attr('placeholder')).css('font', font || this.css('font'));\n \n return $.fn.textWidth.fakeEl.width();\n};\n","import { LocalizedStrings } from '../../services/localizedStringsService';\nimport * as CommandsManagement from '../commands';\nimport * as ConditionalExpressionManagement from './conditional_expression';\nimport * as ContextualizedMenu from './contextualized_menu';\nimport * as GenericExpressionManagement from './generic_expression';\n\nexport function createFloatingCommand () {\n\treturn $('
' + LocalizedStrings.getUI('text_command_while') + ' ( x < 10 )
');\n}\n\nexport function renderCommand (command, function_obj) {\n\tvar ret = '';\n\tret += '
' + LocalizedStrings.getUI('text_command_while') + ' ';\n\tret += ' (
) ';\n\tret += ' ';\n\tret += '
';\n\tret += '
';\n\tret += ' ';\n\tret += '
';\n\n\tvar el = $(ret);\n\tel.data('command', command);\n\tel.find('.block_commands').data('command', command);\n\n\taddHandlers(command, function_obj, el);\n\n\tContextualizedMenu.renderMenu(command, el.find('.context_menu'), function_obj, el);\n\n\t//ConditionalExpressionManagement.renderExpression(command, command.expression, function_obj, el.find('.conditional_expression'));\n\n\tGenericExpressionManagement.renderExpression(command, function_obj, el.find('.conditional_expression'), command.expression);\n\n\tif (command.commands_block) {\n\t\tfor (var j = 0; j < command.commands_block.length; j++) {\n\t\t CommandsManagement.renderCommand(command.commands_block[j], $(el.find('.block_commands')[0]), 3, function_obj);\n\t\t}\n\t}\n\n\treturn el;\n}\n\nfunction addHandlers (command, function_obj, whiletrue_dom) {\n\n\twhiletrue_dom.find('.button_remove_command').on('click', function() {\n\t\tif (CommandsManagement.removeCommand(command, function_obj, whiletrue_dom)) {\n\t\t\twhiletrue_dom.fadeOut(400, function() {\n\t\t\t\twhiletrue_dom.remove();\n\t\t\t});\n\t\t}\n\t});\n}\n","import * as Models from '../ivprog_elements';\nimport { LocalizedStrings } from '../../services/localizedStringsService';\nimport * as VariableValueMenu from './variable_value_menu';\nimport * as VariableValueMenuManagement from './variable_value_menu';\nimport * as CommandsManagement from '../commands';\nimport * as GenericExpressionManagement from './generic_expression';\n\nexport function createFloatingCommand () {\n\treturn $('
'+LocalizedStrings.getUI('text_command_write')+' var
');\n}\n\nexport function renderCommand (command, function_obj) {\n\tvar ret = '';\n\tret += '
'+LocalizedStrings.getUI('text_command_write')+' (
)
';\n\n\tvar el = $(ret);\n\tel.data('command', command);\n\n\t//renderExpression (command, function_obj, div_to_render, expression_array)\n\n\tGenericExpressionManagement.renderExpression(command, function_obj, el.find('.all_elements_write'), command.content);\n\n\t/*for (var i = 0; i < command.content.length; i ++) {\n\t\tvar new_div_item = $( '
' );\n\t\tvar div_parent_with_handler = $( '
' );\n\t\tdiv_parent_with_handler.append($(''));\n\t\tdiv_parent_with_handler.append(new_div_item);\n\t\tdiv_parent_with_handler.append($(''));\n\n\t\tel.find('.all_elements_write').append(div_parent_with_handler);\n\t\tVariableValueMenu.renderMenu(command, command.content[i], new_div_item, function_obj);\n\n\t\taddHandlerIconAdd(el.find('.all_elements_write'), command, function_obj);\n\n\t\taddHandlersManager(command, function_obj, el, div_parent_with_handler, command.content[i]);\n\t}\n\n\tif (command.content.length == 0) {\n\t\taddHandlerIconAdd(el.find('.all_elements_write'), command, function_obj);\n\t}*/\n\n\taddHandlers(command, function_obj, el);\n\treturn el;\n}\n\nfunction addHandlersManager (command, function_obj, writer_dom, item_div, content_element) {\n\n\titem_div.find('.times').on('click', function() {\n\t\tfor (var i = 0; i < command.content.length; i++) {\n\t\t\tif (command.content[i] == content_element) {\n\t\t\t\tdelete command.content[i];\n\t \t\t\tcommand.content.splice(i, 1);\n\t\t\t\t\n\t\t\t\titem_div.children().off();\n\t\t\t\titem_div.off();\n\t\t\t\titem_div.fadeOut();\n\n\t\t\t\tif (command.content.length > 0) {\n\t\t\t\t\titem_div.next('.icon_add_item_to_writer').fadeOut();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t});\n}\n\nfunction addHandlers (command, function_obj, writer_dom) {\n\n\twriter_dom.find('.button_remove_command').on('click', function() {\n\t\tif (CommandsManagement.removeCommand(command, function_obj, writer_dom)) {\n\t\t\twriter_dom.fadeOut(400, function() {\n\t\t\t\twriter_dom.remove();\n\t\t\t});\n\t\t}\n\t});\n\n\tSortable.create(writer_dom.find(\".all_elements_write\")[0], {\n\t handle: '.ellipsis',\n\t animation: 100,\n\t ghostClass: 'ghost',\n\t group: 'writer_' + Math.floor(Math.random() * 10000000),\n\t draggable: '.div_parent_handler',\n\t onEnd: function (evt) {\n\t \t\n\t \tcommand.content.splice(evt.newIndex, 0, command.content.splice(evt.oldIndex, 1)[0]);\n\n\t \twriter_dom.empty();\n\t \twriter_dom.replaceWith(renderCommand(command, function_obj));\n\t }\n\t });\n\n\n}\n\nfunction addHandlerIconAdd (dom_object, command, function_obj, insert_after = false, after_which = null) {\n\tvar icon_add_item = $( ' ' );\n\tif (!insert_after) {\n\t\tdom_object.append(icon_add_item);\n\t} else {\n\t\ticon_add_item.insertAfter(after_which);\n\t}\n\t\n\ticon_add_item.on('click', function(e) {\n\t\tvar div_parent_with_handler = $( '
' );\n\t\tvar new_div_item = $( '
' );\n\t\tdiv_parent_with_handler.append($(''));\n\t\tdiv_parent_with_handler.append(new_div_item);\n\t\tdiv_parent_with_handler.append($(''));\n\t\tdiv_parent_with_handler.insertAfter(icon_add_item);\n\n\t\tvar new_related_menu = new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true);\n\n\t\tVariableValueMenu.renderMenu(command, new_related_menu, new_div_item, function_obj);\n\n\t\taddHandlerIconAdd(dom_object, command, function_obj, true, div_parent_with_handler);\n\n\t\taddHandlersManager(command, function_obj, dom_object, div_parent_with_handler, new_related_menu);\n\t\tvar pos = 1;\n\t\tdom_object.find('.icon_add_item_to_writer').each(function() {\n\t\t\tif ($(this).get(0) === icon_add_item.get(0)) {\n\t\t\t\tcommand.content.splice(pos, 0, new_related_menu);\n\t\t\t} else {\n\t\t\t\tpos ++;\n\t\t\t}\n\t\t});\n\t\tif (command.content.length == 1) {\n\t\t\ticon_add_item.remove();\n\t\t}\n\t\tdiv_parent_with_handler.fadeIn();\n\t});\n}\n\nexport function addContent (command, ref_object, dom_object, menu_var_or_value, function_obj, ref_object_content) {\n\t\n\tif (dom_object.hasClass('var_value_menu_div')) {\n\t\tvar icon_add_item = $( ' ' );\n\t\ticon_add_item.insertAfter(dom_object);\n\n\t\ticon_add_item.on('click', function(e) {\n\t\t\tvar div_parent_with_handler = $( '
' );\n\t\t\tdiv_parent_with_handler.append($(''));\n\t\t\tdiv_parent_with_handler.append(new_div_item);\n\t\t\tdiv_parent_with_handler.append($(''));\n\n\t\t\tdiv_parent_with_handler.insertAfter(icon_add_item);\n\t\t\tvar new_related_menu = new Models.VariableValueMenu(VariableValueMenuManagement.VAR_OR_VALUE_TYPES.all, null, null, null, true);\n\n\t\t\tVariableValueMenu.renderMenu(command, new_related_menu, new_div_item, function_obj);\n\n\t\t\taddHandlersManager(command, function_obj, dom_object, div_parent_with_handler, new_related_menu);\n\n\t\t\tcommand.content.push(new_related_menu);\n\n\t\t\tif (command.content.length == 1) {\n\t\t\t\ticon_add_item.remove();\n\t\t\t}\n\t\t});\n\t}\n}\n","import { Types } from './types';\nimport * as Models from './ivprog_elements';\nimport { LocalizedStrings } from './../services/localizedStringsService';\nimport * as GlobalsManagement from './globals';\nimport * as VariablesManagement from './variables';\nimport * as CommandsManagement from './commands';\nimport * as CodeManagement from './code_generator';\nimport * as VariableValueMenu from './commands/variable_value_menu';\nimport { DOMConsole } from './../io/domConsole';\nimport { IVProgProcessor } from './../processor/ivprogProcessor';\nimport WatchJS from 'melanke-watchjs';\nimport { SemanticAnalyser } from '../processor/semantic/semanticAnalyser';\nimport { IVProgAssessment } from '../assessment/ivprogAssessment';\nimport * as AlgorithmManagement from './algorithm';\nimport * as Utils from './utils';\nimport { registerUserEvent, ActionTypes } from \"./../services/userLog\";\nimport VersionInfo from './../../.ima_version.json';\nimport * as TextEditor from \"./text_editor\";\nimport { isValidIdentifier } from \"./../util/utils\";\nimport { Modes } from '../processor/modes';\n\nvar counter_new_functions = 0;\nvar counter_new_parameters = 0;\nvar ivprog_version = VersionInfo.version;\n\nconst globalChangeListeners = [];\nconst functionsChangeListeners = [];\nlet proc = null;\nlet domConsole = null;\nlet _testCases = [];\nlet isRunning = false;\nwindow.studentGrade = null;\nwindow.LocalizedStrings = LocalizedStrings;\nconst program = new Models.Program();\n\nwindow.system_functions = [];\n// Adding math functions:\nwindow.system_functions.push(new Models.SystemFunction('$sin', Types.REAL, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.math));\nwindow.system_functions.push(new Models.SystemFunction('$cos', Types.REAL, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.math));\nwindow.system_functions.push(new Models.SystemFunction('$tan', Types.REAL, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.math));\nwindow.system_functions.push(new Models.SystemFunction('$sqrt', Types.REAL, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.math));\nwindow.system_functions.push(new Models.SystemFunction('$pow', Types.REAL, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true), new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.math));\nwindow.system_functions.push(new Models.SystemFunction('$log', Types.REAL, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.math));\nwindow.system_functions.push(new Models.SystemFunction('$abs', Types.REAL, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.math));\nwindow.system_functions.push(new Models.SystemFunction('$negate', Types.REAL, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.math));\nwindow.system_functions.push(new Models.SystemFunction('$invert', Types.REAL, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.math));\nwindow.system_functions.push(new Models.SystemFunction('$max', Types.REAL, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.math));\nwindow.system_functions.push(new Models.SystemFunction('$min', Types.REAL, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.math));\nwindow.system_functions.push(new Models.SystemFunction('$rand', Types.REAL, 0, [],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.math));\n// Adding text functions:\nwindow.system_functions.push(new Models.SystemFunction('$substring', Types.TEXT, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true),\n new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true),new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.text));\nwindow.system_functions.push(new Models.SystemFunction('$length', Types.INTEGER, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.text));\nwindow.system_functions.push(new Models.SystemFunction('$uppercase', Types.TEXT, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.text));\nwindow.system_functions.push(new Models.SystemFunction('$lowercase', Types.TEXT, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.text));\nwindow.system_functions.push(new Models.SystemFunction('$charAt', Types.TEXT, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true), new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.text));\n// Adding arrangement functions:\nwindow.system_functions.push(new Models.SystemFunction('$numElements', Types.INTEGER, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.variable_and_function, null, null, null, true, 1)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.arrangement));\nwindow.system_functions.push(new Models.SystemFunction('$matrixLines', Types.INTEGER, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.variable_and_function, null, null, null, true, 2)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.arrangement));\nwindow.system_functions.push(new Models.SystemFunction('$matrixColumns', Types.INTEGER, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.variable_and_function, null, null, null, true, 2)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.arrangement));\n// Adding conversion functions:\nwindow.system_functions.push(new Models.SystemFunction('$isReal', Types.BOOLEAN, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.conversion));\nwindow.system_functions.push(new Models.SystemFunction('$isInt', Types.BOOLEAN, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.conversion));\nwindow.system_functions.push(new Models.SystemFunction('$isBool', Types.BOOLEAN, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.conversion));\nwindow.system_functions.push(new Models.SystemFunction('$castReal', Types.REAL, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.conversion));\nwindow.system_functions.push(new Models.SystemFunction('$castInt', Types.INTEGER, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.conversion));\nwindow.system_functions.push(new Models.SystemFunction('$castBool', Types.BOOLEAN, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.conversion));\nwindow.system_functions.push(new Models.SystemFunction('$castString', Types.TEXT, 0, [new Models.VariableValueMenu(VariableValueMenu.VAR_OR_VALUE_TYPES.all, null, null, null, true)],\n null, Models.SYSTEM_FUNCTIONS_CATEGORIES.conversion));\n\nconsole.log(' ___ ___ ________ \\n / / / / / ____/ \\n / / / / / / \\n / / / / ______ ___ / /__ \\n / / / / / \\\\ / / / ___/ \\n / /______ / / / /\\\\ \\\\/ / / / \\n / / / / / / \\\\ / / /____ \\n/__________/ /___/ /___/ \\\\___/ /________/ \\n\\n Laboratório de Informática na Educação\\n http://line.ime.usp.br');\n\nconst mainFunction = new Models.Function(LocalizedStrings.getUI(\"start\"), Types.VOID, 0, [], true, false);\nmainFunction.function_comment = new Models.Comment(LocalizedStrings.getUI('text_comment_main'));\nprogram.addFunction(mainFunction);\n\nwindow.program_obj = program;\n\nwindow.generator = CodeManagement.generate;\nwindow.runCodeAssessment = runCodeAssessment;\nwindow.renderAlgorithm = AlgorithmManagement.renderAlgorithm;\nwindow.insertContext = false;\nwindow.watchW = WatchJS;\n\nWatchJS.watch(window.program_obj.globals, function(){\n if (window.insertContext) {\n setTimeout(function() {\n AlgorithmManagement.renderAlgorithm();\n globalChangeListeners.forEach(x => x());\n }, 300);\n window.insertContext = false;\n } else {\n AlgorithmManagement.renderAlgorithm();\n globalChangeListeners.forEach(x => x());\n }\n}, 1);\n\nWatchJS.watch(window.program_obj.functions, function(){\n if (window.insertContext) {\n setTimeout(function(){\n AlgorithmManagement.renderAlgorithm();\n functionsChangeListeners.forEach( x => x());\n }, 300);\n window.insertContext = false;\n } else {\n AlgorithmManagement.renderAlgorithm();\n functionsChangeListeners.forEach( x => x());\n }\n}, 1);\n\nfunction addFunctionHandler () {\n\n\tconst new_function = new Models.Function(LocalizedStrings.getUI(\"new_function\") + \"_\" + counter_new_functions, Types.VOID, 0, [], false, false, [], new Models.Comment(LocalizedStrings.getUI('text_comment_start')));\n\tprogram.addFunction(new_function);\n\n\tcounter_new_functions ++;\n\n window.insertContext = true;\n registerUserEvent(new_function.name, ActionTypes.INSERT_FUNCTION);\n\n // var newe = renderFunction(new_function);\n renderFunction(new_function);\n /*newe.css('display', 'none');\n newe.fadeIn();*/\n}\n\nfunction addParameter (function_obj, function_container/*, is_from_click = false*/) {\n if (function_obj.parameters_list == null) {\n function_obj.parameters_list = [];\n }\n const new_parameter = new Models.Variable(Types.INTEGER, LocalizedStrings.getUI(\"new_parameter\") + \"_\" + counter_new_parameters);\n function_obj.parameters_list.push(new_parameter);\n counter_new_parameters ++;\n registerUserEvent(function_obj.name, ActionTypes.INSERT_FUNCTION_PARAM, new_parameter.name, Types.INTEGER, 0);\n //var newe = renderParameter(function_obj, new_parameter, function_container);\n renderParameter(function_obj, new_parameter, function_container);\n // if (is_from_click) {\n // newe.css('display', 'none');\n // newe.fadeIn();\n // }\n}\n\nfunction updateReturnType (function_obj, new_type, new_dimensions = 0) {\n registerUserEvent(function_obj.name, ActionTypes.CHANGE_FUNCTION_RETURN, new_type, new_dimensions);\n function_obj.return_type = new_type;\n function_obj.return_dimensions = new_dimensions;\n}\n\nfunction removeFunction (function_obj) {\n var index = program.functions.indexOf(function_obj);\n if (index > -1) {\n registerUserEvent(function_obj.name, ActionTypes.REMOVE_FUNCTION);\n program.functions.splice(index, 1);\n }\n}\n\nfunction minimizeFunction (function_obj) {\n function_obj.is_hidden = !function_obj.is_hidden;\n}\n\nfunction addHandlers (function_obj, function_container) {\n\n function_container.find('.ui.dropdown.function_return').dropdown({\n onChange: function(value, text, $selectedItem) {\n if ($selectedItem.data('dimensions')) {\n updateReturnType(function_obj, Types[$selectedItem.data('type')], $selectedItem.data('dimensions'));\n } else {\n updateReturnType(function_obj, Types[$selectedItem.data('type')]);\n }\n },\n selectOnKeydown: false\n });\n\n function_container.find( \".name_function_updated\" ).on('click', function(e){\n enableNameFunctionUpdate(function_obj, function_container);\n });\n\n function_container.find( \".add_parameter_button\" ).on('click', function(e){\n window.insertContext = true;\n addParameter(function_obj, function_container, true);\n });\n\n function_container.find('.menu_commands').dropdown({\n on: 'hover'\n });\n\n function_container.find('.menu_commands a').on('click', function(evt){\n if (function_obj.commands == null || function_obj.commands.length == 0) {\n function_obj.commands = [];\n var new_cmd = CommandsManagement.genericCreateCommand($(this).data('command'));\n function_obj.commands.push(new_cmd);\n\n CommandsManagement.renderCommand(new_cmd, function_container.find('.commands_list_div'), 3, function_obj);\n registerUserEvent(function_obj.name, ActionTypes.INSERT_COMMAND, $(this).data('command'), '/', 0);\n } else {\n CommandsManagement.createFloatingCommand(function_obj, function_container, $(this).data('command'), evt);\n }\n\n });\n\n function_container.find('.add_var_button_function').on('click', function(e){\n window.insertContext = true;\n VariablesManagement.addVariable(function_obj, function_container, true);\n });\n\n function_container.find('.remove_function_button').on('click', function(e){\n removeFunction(function_obj);\n function_container.fadeOut();\n });\n\n function_container.find('.minimize_function_button').on('click', function(e){\n minimizeFunction(function_obj);\n if (function_obj.is_hidden) {\n function_container.find(\".add_var_button_function\").toggle();\n function_container.find(\".inline_add_command\").toggle();\n function_container.find(\".function_area\").slideToggle();\n } else {\n function_container.find(\".function_area\").slideToggle(function(){\n function_container.find(\".add_var_button_function\").toggle();\n function_container.find(\".inline_add_command\").toggle();\n });\n }\n \n });\n}\n\n// Essa função imprime o tipo de retorno da função e cria o menu do tipo 'select' para alteração\nfunction renderFunctionReturn (function_obj, function_element) {\n\n var ret = '
';\n \n if (function_obj.return_dimensions == 1) {\n ret += '
'+ LocalizedStrings.getUI(\"vector\") +': '+ LocalizedStrings.getUI(`type_${function_obj.return_type.toLowerCase()}`);\n ret += ' [ ]
';\n } else if (function_obj.return_dimensions == 2) {\n ret += '
'+ LocalizedStrings.getUI(\"matrix\") +': '+ LocalizedStrings.getUI(`type_${function_obj.return_type.toLowerCase()}`);\n ret += ' [ ] [ ]
';\n } else {\n ret += '
'+LocalizedStrings.getUI(`type_${function_obj.return_type.toLowerCase()}`)+'
';\n }\n\n ret += '
';\n\n for (var tm in Types) {\n ret += '
'+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+'
';\n }\n\n ret += '
'\n + '' + LocalizedStrings.getUI('vector')\n + '
';\n\n for (var tm in Types) {\n if (tm == Types.VOID.toUpperCase()) {\n continue;\n }\n\n ret += '
'+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+'
';\n }\n ret += '
';\n\n\n ret += '
'\n + '' + LocalizedStrings.getUI('matrix')\n + '
';\n\n for (var tm in Types) {\n if (tm == Types.VOID.toUpperCase()) {\n continue;\n }\n\n ret += '
'+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+'
';\n }\n ret += '
';\n\n ret += '
';\n\n ret = $(ret);\n \n function_element.find('.function_return').append(ret);\n}\n\nvar cont = 0;\n\nexport function renderFunction (function_obj) {\n \n var appender = '
';\n\n if (function_obj.function_comment) {\n //appender += renderComment(function_obj.function_comment, sequence, true, -1);\n }\n \n appender += '';\n\n appender += (function_obj.is_main ? '
' : '')\n + '';\n\n appender += '
'+LocalizedStrings.getUI(\"function\")+' ';\n\n if (function_obj.is_main) {\n appender += '
      ' + LocalizedStrings.getUI('type_void') + '       '+function_obj.name+'
'\n + ' (
';\n } else {\n appender += '
';\n\n appender += '
'+function_obj.name+'
' \n + ' (
';\n }\n \n appender += '
)
'\n + (function_obj.is_hidden ? ' ';\n\n appender = $(appender);\n\n $('.all_functions').append(appender);\n\n appender.data('fun', function_obj);\n appender.find('.commands_list_div').data('fun', function_obj);\n\n renderFunctionReturn(function_obj, appender);\n\n addHandlers(function_obj, appender);\n\n // Rendering parameters: \n for (var j = 0; j < function_obj.parameters_list.length; j++) {\n renderParameter(function_obj, function_obj.parameters_list[j], appender);\n }\n\n // Rendering variables:\n for (var j = 0; j < function_obj.variables_list.length; j++) {\n VariablesManagement.renderVariable(appender, function_obj.variables_list[j], function_obj);\n }\n // Rendering commands:\n for (var j = 0; j < function_obj.commands.length; j++) {\n CommandsManagement.renderCommand(function_obj.commands[j], $(appender.find('.commands_list_div')[0]), 3, function_obj);\n }\n $('.minimize_function_button').popup({\n content : LocalizedStrings.getUI(\"tooltip_hide_function\"),\n delay: {\n show: 750,\n hide: 0\n }\n });\n\n var function_index = program.functions.indexOf(function_obj);\n\n Sortable.create(appender.find(\".variables_list_div\")[0], {\n handle: '.ellipsis',\n animation: 100,\n ghostClass: 'ghost',\n group: 'local_vars_drag_' + function_index,\n onEnd: function (evt) {\n updateSequenceLocals(evt.oldIndex, evt.newIndex, function_obj);\n }\n });\n\n addSortableHandler(appender.find(\".commands_list_div\")[0], function_index);\n\n if (!function_obj.is_main) {\n Sortable.create(appender.find(\".container_parameters_list\")[0], {\n handle: '.ellipsis',\n animation: 100,\n ghostClass: 'ghost',\n group: 'parameters_drag_' + program.functions.indexOf(function_obj),\n onEnd: function (evt) {\n updateSequenceParameters(evt.oldIndex, evt.newIndex, function_obj);\n }\n });\n }\n\n if (function_obj.commands.length > 0) {\n var teste = '.ui.sticky.sticky_cont_'+cont;\n $(teste).sticky({\n context: '.ui.bottom.attached.segment.commands_list_div.commands_cont_'+cont,\n scrollContext: '.ivprog_visual_panel',\n observeChanges: true,\n offset: 40,\n onStick: function (evt) {\n $(teste).css('top', '20px', 'important');\n }, \n onBottom: function (evt) {\n $(teste).css('top', '20px', 'important');\n },\n onUnstick: function (evt) {\n $(teste).css('top', '20px', 'important');\n },\n onReposition: function (evt) {\n $(teste).css('top', '20px', 'important');\n },\n onScroll: function (evt) {\n $(teste).css('top', '20px', 'important');\n if (!isVisible($(teste), $(teste).parent())) {\n $(teste).removeClass('fixed');\n }\n },\n onTop: function (evt) {\n $(teste).css('top', '20px', 'important');\n }\n });\n }\n \n cont ++;\n\n return appender;\n}\n\nfunction isVisible (element, container) {\n\n var elementTop = $(element).offset().top,\n elementHeight = $(element).height(),\n containerTop = $(container).offset().top,\n containerHeight = $(container).height() - 30;\n\n return ((((elementTop - containerTop) + elementHeight) > 0)\n && ((elementTop - containerTop) < containerHeight));\n}\n\n\nwindow.evento_drag;\n\nfunction updateProgramObjDrag () {\n const nodes = Array.prototype.slice.call( $('.all_functions').children() );\n let function_index;\n var start_index;\n let function_obj;\n $(evento_drag.item).parentsUntil(\".all_functions\").each(function (index) {\n const ref = $(this);\n if (ref.hasClass('function_div')) {\n function_index = nodes.indexOf(this);\n start_index = index;\n function_obj = ref;\n }\n });\n\n const path_target = [];\n $(evento_drag.item).parentsUntil(\".all_functions\").each(function () {\n if ($(this).hasClass('command_container')) {\n path_target.push(this);\n }\n });\n if (path_target.length == 0) {\n //console.log('soltou na raiz, na posição: ' + evento_drag.newIndex + ' mas ainda não sei de onde saiu ');\n } else {\n //console.log('soltou dentro de algum bloco, sequência vem logo abaixo (de baixo pra cima): ');\n //console.log(path_target);\n }\n\n var index_each = [];\n var path_relative = [];\n for (var i = path_target.length - 1; i >= 0; i --) {\n console.log('da vez', $(path_target[i + 1]));\n if (i == (path_target.length - 1)) { // está na raiz\n var indice_na_raiz = function_obj.find('.command_container').index(path_target[i]);\n console.log('índice na raiz: ', indice_na_raiz);\n } else {\n if ($(path_target[i + 1]).hasClass('iftrue')) {\n if ($(path_target[i]).parent().hasClass('commands_if')) {\n path_relative.push('if');\n index_each.push($(path_target[i]).parent().find('.command_container').index(path_target[i]));\n } else {\n path_relative.push('else');\n index_each.push($(path_target[i]).parent().find('.command_container').index(path_target[i]));\n }\n } else if ($(path_target[i + 1]).hasClass('dowhiletrue')) {\n path_relative.push('dowhiletrue');\n index_each.push($(path_target[i + 1]).find('.command_container').index(path_target[i]));\n } else if ($(path_target[i + 1]).hasClass('repeatNtimes')) {\n path_relative.push('repeatNtimes');\n index_each.push($(path_target[i + 1]).find('.command_container').index(path_target[i]));\n } else if ($(path_target[i + 1]).hasClass('whiletrue')) {\n path_relative.push('whiletrue');\n index_each.push($(path_target[i + 1]).find('.command_container').index(path_target[i]));\n } else if ($(path_target[i + 1]).hasClass('switch')) {\n path_relative.push('switch');\n //index_each.push($(path_target[i + 1]).find('.command_container').index(path_target[i]));\n }\n }\n }\n // var index_in_block = -1;\n const is_in_else = $(evento_drag.item).parent().hasClass('commands_else');\n\n // index_in_block = $(evento_drag.item).parent().find('.command_container').index(evento_drag.item);\n\n const is_in_case_switch = $(evento_drag.item).parent().hasClass('case_commands_block');\n // var index_case_of_switch = -1;\n // if (is_in_case_switch) {\n // index_case_of_switch = $(evento_drag.item).parent().parent().parent().find('.case_div').index($(evento_drag.item).parent().parent());\n // }\n\n /*console.log('path_relative:');\n console.log(path_relative);\n console.log('index_each:');\n console.log(index_each);\n console.log('index_in_block:');\n console.log(index_in_block);\n console.log('ele está em algum bloco de senão? ');\n console.log(is_in_else);\n console.log('ele está dentro de um case de switch?');\n console.log(is_in_case_switch);\n console.log('qual é o índice do case: ');\n console.log(index_case_of_switch);*/\n\n // encontrar o elemento na árvore:\n\n var command_start_point = window.program_obj.functions[function_index].commands[indice_na_raiz];\n var block_to_insert = command_start_point;\n for (var i = 0; i < index_each.length; i++) {\n if (path_relative[i] == \"else\") {\n block_to_insert = block_to_insert.commands_else[index_each[i]];\n } else if (path_relative[i] == \"switch\") {\n\n } else {\n block_to_insert = block_to_insert.commands_block[index_each[i]]\n }\n }\n\n //console.log('command_start_point', command_start_point);\n //console.log('block_to_insert', block_to_insert);\n\n // agora tem que alocar o comando na árvore, mas considerar as quatro situações:\n // (1) se está em um else ou (2) se está em switch ou (3) será um caso padrão ou (4) se será na raiz.\n \n if (path_target.length == 0) { // soltou na raiz:\n window.program_obj.functions[function_index].commands.splice(evento_drag.newIndex - 1, 0, command_in_drag);\n } else if (is_in_else) {\n if (block_to_insert.commands_else) {\n block_to_insert.commands_else.splice(evento_drag.newIndex, 0, command_in_drag);\n } else {\n block_to_insert.commands_else = [];\n block_to_insert.commands_else.push(command_in_drag);\n }\n } else if (is_in_case_switch) {\n\n } else {\n // verificar se tem alguma coisa no bloco:\n if (block_to_insert.commands_block) {\n console.log(\"existe alguma coisa dentro do bloco, index: \", evento_drag.newIndex);\n block_to_insert.commands_block.splice(evento_drag.newIndex, 0, command_in_drag);\n } else {\n block_to_insert.commands_block = [];\n block_to_insert.commands_block.push(command_in_drag);\n }\n }\n\n window.draging = false;\n renderAlgorithm();\n \n\n}\n\nfunction prepareDragHandler (evt) {\n window.draging = true;\n\n var nodes = Array.prototype.slice.call( $('.all_functions').children() );\n var function_index;\n var function_obj;\n $(evt.item).parentsUntil(\".all_functions\").each(function (index) {\n if ($(this).hasClass('function_div')) {\n function_index = nodes.indexOf(this);\n function_obj = window.program_obj.functions[function_index];\n }\n });\n\n command_in_drag = $(evt.item).data(\"command\");\n\n //console.log('$(evt.item).parent(): ');\n //console.log($(evt.item).parent());\n\n // descobrir qual das quatro situações:\n if ($(evt.item).parent().hasClass('commands_list_div')) { // está na raiz:\n if (function_obj.commands.indexOf(command_in_drag) > -1) {\n function_obj.commands.splice(function_obj.commands.indexOf(command_in_drag), 1);\n }\n } else if ($(evt.item).parent().hasClass('commands_else')) { // está no else:\n if ($(evt.item).parent().data('command').commands_else.indexOf(command_in_drag) > -1) {\n $(evt.item).parent().data('command').commands_else.splice($(evt.item).parent().data('command').commands_else.indexOf(command_in_drag), 1);\n }\n } else if ($(evt.item).parent().hasClass('case_commands_block')) { // está em um switch:\n\n } else { // caso padrão:\n if ($(evt.item).parent().data('command').commands_block.indexOf(command_in_drag) > -1) {\n $(evt.item).parent().data('command').commands_block.splice($(evt.item).parent().data('command').commands_block.indexOf(command_in_drag), 1);\n }\n }\n\n}\n\nvar command_in_drag;\n\nfunction addSortableHandler (element, id_function) {\n \n var n_group = 'commands_drag_' + id_function;\n Sortable.create(element, {\n handle: '.command_drag',\n ghostClass: 'ghost',\n animation: 300,\n group: {name: n_group},\n onEnd: function (evt) {\n\n var nodes = Array.prototype.slice.call( $('.all_functions').children() );\n var function_index;\n var function_obj;\n $(evt.item).parentsUntil(\".all_functions\").each(function (index) {\n if ($(this).hasClass('function_div')) {\n function_index = nodes.indexOf(this);\n function_obj = window.program_obj.functions[function_index];\n }\n });\n\n registerUserEvent(function_obj.name, ActionTypes.MOVE_COMMAND, $(evt.item).data('command').type, '/', 'from: ' + evt.oldIndex + ' to: ' + evt.newIndex);\n //updateSequenceLocals(evt.oldIndex, evt.newIndex, function_obj);\n var itemEl = evt.item; // dragged HTMLElement\n evt.to; // target list\n evt.from; // previous list\n evt.oldIndex; // element's old index within old parent\n evt.newIndex; // element's new index within new parent\n //console.log('::EVT::');\n //console.log(evt);\n\n window.evento_drag = evt;\n\n try {\n updateProgramObjDrag();\n } catch (e) {\n console.error(e);\n window.draging = false;\n }\n },\n onStart: function (evt) {\n //console.log(\"START::EVT::\");\n //console.log(evt);\n //console.log(\"\\n\\ncommand_in_drag\");\n try {\n prepareDragHandler(evt);\n } catch (e) {\n window.draging = false;\n }\n }\n });\n element = $(element);\n element.find(\".iftrue\").each(function( index ) {\n addSortableHandler($(this).find(\".block_commands\")[0], id_function);\n addSortableHandler($(this).find(\".block_commands\")[1], id_function);\n });\n\n element.find(\".repeatNtimes\").each(function( index ) {\n addSortableHandler($(this).find(\".block_commands\")[0], id_function);\n });\n\n element.find(\".dowhiletrue\").each(function( index ) {\n addSortableHandler($(this).find(\".block_commands\")[0], id_function);\n });\n\n element.find(\".whiletrue\").each(function( index ) {\n addSortableHandler($(this).find(\".block_commands\")[0], id_function);\n });\n\n element.find(\".switch\").each(function( index ) {\n\n $(this).find(\".case_div\").each(function( index ) {\n addSortableHandler($(this).find(\".case_commands_block\")[0], id_function);\n });\n\n }); \n}\n\nexport function initVisualUI () {\n // MUST USE CONST, LET, OR VAR !!!!!!\n // const mainDiv = $('#visual-main-div');\n // fill mainDiv with functions and globals...\n // renderAlgorithm()...\n domConsole = new DOMConsole(\"ivprog-term-div\");\n domConsole.hide();\n $(document.getElementById(\"ivprog-term-div\")).draggable()\n $('.add_function_button').on('click', () => {\n addFunctionHandler();\n });\n $('.add_global_button').on('click', () => {\n window.insertContext = true;\n GlobalsManagement.addGlobal(program, true);\n });\n\n $('#run_button').on('click', function () {\n showStopButton();\n runCode();\n });\n\n $('#stop_button').on('click', function () {\n showRunButton();\n stopExecution();\n });\n\n $('.visual_coding_button').on('click', () => {\n toggleVisualCoding();\n });\n\n $('.textual_coding_button').on('click', () => {\n toggleTextualCoding();\n });\n\n $('.assessment').on('click', () => {\n is_iassign = true;\n runCodeAssessment();\n });\n\n $('.div_toggle_console').on('click', () => {\n toggleConsole();\n });\n $('.expand_button').on('click', () => {\n full_screen();\n });\n $('.help_button').on('click', () => {\n window.open('https://www.usp.br/line/ivprog/', '_blank');\n });\n $('.main_title h2').prop('title', LocalizedStrings.getUI('text_ivprog_description'));\n\n var time_show = 750;\n $('.visual_coding_button').popup({\n content : LocalizedStrings.getUI(\"tooltip_visual\"),\n delay: {\n show: time_show,\n hide: 0\n }\n });\n $('.textual_coding_button').popup({\n content : LocalizedStrings.getUI(\"tooltip_textual\"),\n delay: {\n show: time_show,\n hide: 0\n }\n });\n $('.upload_file_button').popup({\n content : LocalizedStrings.getUI(\"tooltip_upload\"),\n delay: {\n show: time_show,\n hide: 0\n }\n });\n $('.download_file_button').popup({\n content : LocalizedStrings.getUI(\"tooltip_download\"),\n delay: {\n show: time_show,\n hide: 0\n }\n });\n $('.undo_button').popup({\n content : LocalizedStrings.getUI(\"tooltip_undo\"),\n delay: {\n show: time_show,\n hide: 0\n }\n });\n $('.redo_button').popup({\n content : LocalizedStrings.getUI(\"tooltip_redo\"),\n delay: {\n show: time_show,\n hide: 0\n }\n });\n $('.run_button').popup({\n content : LocalizedStrings.getUI(\"tooltip_run\"),\n delay: {\n show: time_show,\n hide: 0\n }\n });\n $('.assessment_button').popup({\n content : LocalizedStrings.getUI(\"tooltip_evaluate\"),\n delay: {\n show: time_show,\n hide: 0\n }\n });\n $('.help_button').popup({\n content : LocalizedStrings.getUI(\"tooltip_help\") + ' - ' + LocalizedStrings.getUI(\"text_ivprog_version\") + ' ' + ivprog_version,\n delay: {\n show: time_show,\n hide: 0\n }\n });\n $('.add_global_button').popup({\n content : LocalizedStrings.getUI(\"tooltip_add_global\"),\n delay: {\n show: time_show,\n hide: 0\n }\n });\n $('.div_toggle_console').popup({\n content : LocalizedStrings.getUI(\"tooltip_console\"),\n delay: {\n show: time_show,\n hide: 0\n }\n });\n\n Sortable.create(listWithHandle, {\n handle: '.glyphicon-move',\n animation: 100,\n ghostClass: 'ghost',\n group: 'functions_divs_drag',\n onEnd: function (evt) {\n updateSequenceFunction(evt.oldIndex, evt.newIndex);\n }\n });\n\n var listGlobalsHandle = document.getElementById(\"listGlobalsHandle\");\n Sortable.create(listGlobalsHandle, {\n handle: '.ellipsis',\n animation: 100,\n ghostClass: 'ghost',\n group: 'globals_divs_drag',\n onEnd: function (evt) {\n updateSequenceGlobals(evt.oldIndex, evt.newIndex);\n }\n });\n\n}\n\nexport function setTestCases (testCases) {\n _testCases = testCases;\n}\n\nexport function getTestCases () {\n // Deep clone of test cases to avoid unauthorized modification\n // TODO: It may be not possible to use this once custom test are fully implemented \n return JSON.parse(JSON.stringify(_testCases));\n}\n\nvar is_iassign = false;\n\nfunction updateSequenceParameters (oldIndex, newIndex, function_obj) {\n function_obj.parameters_list.splice(newIndex, 0, function_obj.parameters_list.splice(oldIndex, 1)[0]);\n}\n\nfunction updateSequenceLocals (oldIndex, newIndex, function_obj) {\n function_obj.variables_list.splice(newIndex, 0, function_obj.variables_list.splice(oldIndex, 1)[0]);\n}\n\nfunction updateSequenceGlobals (oldIndex, newIndex) {\n program_obj.globals.splice(newIndex, 0, program_obj.globals.splice(oldIndex, 1)[0]);\n}\n\nfunction updateSequenceFunction (oldIndex, newIndex) {\n program_obj.functions.splice(newIndex, 0, program_obj.functions.splice(oldIndex, 1)[0]);\n}\n\nfunction runCodeAssessment () {\n if (isRunning) {\n // cannot run assessment or it's already running\n return -1;\n }\n \n let strCode = null;\n\n window.studentGrade = null;\n\n if (settingsProgrammingTypes == \"textual\") {\n strCode = TextEditor.getCode();\n } else {\n strCode = CodeManagement.generate();\n }\n\n if (strCode == null) {\n // No code, so no assessment\n return -1;\n }\n\n toggleConsole(true);\n\n try {\n const data = SemanticAnalyser.analyseFromSource(strCode);\n isRunning = true;\n const runner = new IVProgAssessment(data, _testCases, domConsole);\n runner.runTest().then(grade => {\n if (!is_iassign) {\n parent.getEvaluationCallback(grade);\n } else {\n is_iassign = false;\n }\n isRunning = false;\n }).catch( err => {\n console.log(err);\n isRunning = false;\n });\n } catch (error) {\n isRunning = false;\n domConsole.err(error.message);\n console.log(error);\n if (!is_iassign) {\n parent.getEvaluationCallback(0);\n } else {\n is_iassign = false;\n }\n }\n return 0;\n}\n\nfunction runCode () {\n if (isRunning) {\n return;\n }\n let strCode = null;\n\n if (settingsProgrammingTypes == \"textual\") {\n strCode = TextEditor.getCode();\n } else {\n strCode = CodeManagement.generate();\n }\n\n if (strCode == null) {\n return;\n }\n \n toggleConsole(true);\n\n // if(domConsole == null)\n // domConsole = new DOMConsole(\"#ivprog-term\");\n //$(\"#ivprog-term\").slideDown(500);\n try {\n const data = SemanticAnalyser.analyseFromSource(strCode);\n proc = new IVProgProcessor(data);\n proc.registerInput(domConsole);\n proc.registerOutput(domConsole);\n $(\"#ivprog-term\").addClass('ivprog-term-active');\n isRunning = true;\n proc.interpretAST().then( _ => {\n scheduleCall(() => {\n if(domConsole.pending_writes.length == 0) {\n if(proc.mode === Modes.ABORT) {\n domConsole.info(LocalizedStrings.getMessage(\"aborted_execution\")); \n } else {\n domConsole.info(LocalizedStrings.getMessage(\"success_execution\"));\n }\n $(\"#ivprog-term\").removeClass('ivprog-term-active');\n isRunning = false;\n proc = null;\n showRunButton();\n return true;\n }\n return false;\n },100);\n }).catch(err => {\n scheduleCall(() => {\n if(domConsole.pending_writes.length == 0) {\n if(err instanceof Error) {\n domConsole.err(err.message);\n } else {\n domConsole.err(err);\n }\n $(\"#ivprog-term\").removeClass('ivprog-term-active');\n isRunning = false;\n proc = null;\n showRunButton();\n return true;\n }\n return false;\n },100);\n }) \n } catch (error) {\n scheduleCall(() => {\n if(domConsole.pending_writes.length == 0) {\n isRunning = false;\n proc = null;\n showRunButton();\n domConsole.err(error.message);\n console.log(error);\n return true;\n }\n return false;\n },100);\n }\n \n}\n\nfunction toggleConsole (is_running) {\n\n if (is_running) {\n $('.ivprog-term-div').css('display', 'block');\n $('#ivprog-term').css('min-height', '160px');\n if(domConsole != null)\n domConsole.focus();\n //$('#ivprog-term').css('margin-top', '-170px');\n return;\n } else {\n domConsole.hide();\n return;\n }\n\n if ($('#ivprog-term').css('min-height') == '160px') {\n // esconder\n $('.ivprog-term-div').css('display', 'none');\n $('#ivprog-term').css('min-height', '0');\n //$('#ivprog-term').css('margin-top', '-30px');\n //$('#ivprog-term').css('padding', '5px');\n } else {\n // mostrar\n $('.ivprog-term-div').css('display', 'block');\n $('#ivprog-term').css('min-height', '160px');\n //$('#ivprog-term').css('margin-top', '-170px');\n }\n}\n\n// function waitToCloseConsole () {\n// domConsole.info(\"Aperte qualquer tecla para fechar...\");\n// const p = new Promise((resolve, _) => {\n// domConsole.requestInput(resolve, true);\n// });\n// p.then( _ => {\n// domConsole.dispose();\n// domConsole = null;\n// $(\"#ivprog-term\").hide();\n// })\n// }\n\nfunction toggleTextualCoding () {\n let code = null;\n if (settingsProgrammingTypes != \"textual\") {\n code = CodeManagement.generate();\n if (code == null) {\n return;\n }\n }\n\n\n $('.ivprog_visual_panel').css('display', 'none');\n $('.ivprog_textual_panel').css('display', 'block');\n $('.ivprog_textual_panel').removeClass('loading');\n TextEditor.updateEditor();\n if (code != null)\n TextEditor.setCode(code);\n //$('.ivprog_textual_code').text(code);\n\n $('.visual_coding_button').removeClass('active');\n $('.textual_coding_button').addClass('active');\n}\n\nfunction toggleVisualCoding () {\n $('.ivprog_textual_panel').addClass('loading');\n $('.ivprog_textual_panel').css('display', 'none');\n $('.ivprog_visual_panel').css('display', 'block');\n\n $('.textual_coding_button').removeClass('active');\n $('.visual_coding_button').addClass('active');\n}\n\nfunction removeParameter (function_obj, parameter_obj, parameter_container) {\n registerUserEvent(parameter_obj.name, ActionTypes.REMOVE_FUNCTION_PARAM, function_obj.name);\n var index = function_obj.parameters_list.indexOf(parameter_obj);\n if (index > -1) {\n window.insertContext = true;\n function_obj.parameters_list.splice(index, 1);\n }\n $(parameter_container).fadeOut();\n}\n\nfunction updateParameterType (parameter_obj, new_type, function_name, new_dimensions = 0) {\n registerUserEvent(parameter_obj.name, ActionTypes.CHANGE_PARAM_TYPE, function_name, new_type, new_dimensions);\n parameter_obj.type = new_type;\n parameter_obj.dimensions = new_dimensions;\n\n if (new_dimensions > 0) {\n parameter_obj.rows = new_dimensions;\n parameter_obj.columns = 2;\n }\n\n}\n\nfunction renderParameter (function_obj, parameter_obj, function_container) {\n let ret = \"\";\n\n ret += '
';\n\n ret += '
';\n\n if (parameter_obj.dimensions > 0) {\n ret += '
'+ LocalizedStrings.getUI('vector')+':'+LocalizedStrings.getUI(`type_${parameter_obj.type.toLowerCase()}`);\n if (parameter_obj.dimensions == 1) {\n ret += ' [ ] ';\n } else {\n ret += ' [ ] [ ] ';\n }\n ret += '
';\n } else {\n ret += '
'+LocalizedStrings.getUI(`type_${parameter_obj.type.toLowerCase()}`)+'
';\n }\n\n ret += '
';\n\n \n for (const tm in Types) {\n if (tm == Types.VOID.toUpperCase()) {\n continue;\n }\n ret += '
'+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+'
';\n }\n\n\n ret += '
'\n + '' + LocalizedStrings.getUI('vector')\n + '
';\n\n for (var tm in Types) {\n if (tm == Types.VOID.toUpperCase()) {\n continue;\n }\n\n ret += '
'+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+'
';\n }\n ret += '
';\n\n\n ret += '
'\n + '' + LocalizedStrings.getUI('matrix')\n + '
';\n\n for (var tm in Types) {\n if (tm == Types.VOID.toUpperCase()) {\n continue;\n }\n\n ret += '
'+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+'
';\n }\n ret += '
';\n\n ret += '
';\n\n ret += '
'+parameter_obj.name+'
';\n\n ret += '
';\n\n ret = $(ret);\n \n function_container.find('.container_parameters_list').append(ret);\n\n ret.find('.remove_parameter').on('click', function(e){\n removeParameter(function_obj, parameter_obj, ret);\n });\n \n ret.find('.ui.dropdown.parameter_type').dropdown({\n onChange: function(_, __, $selectedItem) {\n if ($selectedItem.data('dimensions')) {\n updateParameterType(parameter_obj, Types[$selectedItem.data('type')], function_obj.name, $selectedItem.data('dimensions'));\n } else {\n updateParameterType(parameter_obj, Types[$selectedItem.data('type')], function_obj.name);\n }\n },\n selectOnKeydown: false\n });\n\n ret.find('.parameter_div_edit').on('click', function(e){\n registerUserEvent(function_obj.name, ActionTypes.ENTER_CHANGE_PARAM_NAME, parameter_obj.name);\n enableNameParameterUpdate(parameter_obj, ret, function_obj);\n });\n\n return ret;\n}\n\nfunction updateParameterName (parameter_var, new_name, parameter_obj_dom, function_obj) {\n \n if (parameter_var.name == new_name) {\n return;\n }\n\n if (isValidIdentifier(new_name)) {\n if (variableNameAlreadyExists(new_name, function_obj)) {\n Utils.renderErrorMessage(parameter_obj_dom.find('.parameter_div_edit'), LocalizedStrings.getError('inform_valid_param_duplicated', [new_name, function_obj.name]));\n } else {\n registerUserEvent(function_obj.name, ActionTypes.RENAME_FUNCTION_PARAM, parameter_var.name, new_name);\n parameter_var.name = new_name;\n }\n } else {\n Utils.renderErrorMessage(parameter_obj_dom.find('.parameter_div_edit'), LocalizedStrings.getError('inform_valid_identifier'));\n }\n}\n\nfunction variableNameAlreadyExists (name_var, function_obj) {\n\n if (function_obj.parameters_list) {\n for (var i = 0; i < function_obj.parameters_list.length; i++) {\n if (function_obj.parameters_list[i].name == name_var) {\n return true;\n }\n }\n }\n\n if (function_obj.variables_list) {\n for (var i = 0; i < function_obj.variables_list.length; i++) {\n if (function_obj.variables_list[i].name == name_var) {\n return true;\n }\n }\n }\n\n return false;\n}\n\nfunction updateFunctionName (function_var, new_name, function_obj_dom) {\n \n if (function_var.name == new_name) {\n return;\n }\n \n if (isValidIdentifier(new_name)) {\n if (functionNameAlreadyExists(new_name)) {\n Utils.renderErrorMessage(function_obj_dom.find('.function_name_div'), LocalizedStrings.getError('inform_valid_function_duplicated', [new_name]));\n } else {\n registerUserEvent(function_var.name, ActionTypes.RENAME_FUNCTION, new_name);\n function_var.name = new_name;\n }\n } else {\n Utils.renderErrorMessage(function_obj_dom.find('.function_name_div'), LocalizedStrings.getError('inform_valid_identifier'));\n }\n}\n\nfunction functionNameAlreadyExists (function_name) {\n for (var i = 0; i < window.program_obj.functions.length; i++) {\n if (window.program_obj.functions[i].name == function_name) {\n return true;\n }\n }\n return false;\n}\n\nvar opened_name_parameter = false;\nvar opened_input_parameter = null;\nfunction enableNameParameterUpdate (parameter_obj, parent_node, function_obj) {\n if (opened_name_parameter) {\n opened_input_parameter.focus();\n return;\n }\n opened_name_parameter = true;\n parent_node = $(parent_node);\n\n var input_field;\n\n parent_node.find('.span_name_parameter').text('');\n input_field = $( \"\" );\n input_field.insertBefore(parent_node.find('.span_name_parameter'));\n\n input_field.on('input', function() {\n var inputWidth = input_field.textWidth()+10;\n opened_input_parameter = input_field;\n input_field.focus();\n\n var tmpStr = input_field.val();\n input_field.val('');\n input_field.val(tmpStr);\n\n input_field.css({\n width: inputWidth\n })\n }).trigger('input');\n\n input_field.focusout(function() {\n /// update array:\n if (input_field.val().trim()) {\n updateParameterName(parameter_obj, input_field.val().trim(), parent_node, function_obj);\n parent_node.find('.span_name_parameter').text(parameter_obj.name);\n }\n input_field.off();\n input_field.remove();\n\n /// update elements:\n opened_name_parameter = false;\n opened_input_parameter = false;\n });\n\n input_field.on('keydown', function(e) {\n var code = e.keyCode || e.which;\n if(code == 13) {\n if (input_field.val().trim()) {\n updateParameterName(parameter_obj, input_field.val().trim(), parent_node, function_obj);\n parent_node.find('.span_name_parameter').text(parameter_obj.name);\n }\n input_field.off();\n input_field.remove();\n\n /// update elements:\n opened_name_parameter = false;\n opened_input_parameter = false;\n\n }\n if(code == 27) {\n parent_node.find('.span_name_parameter').text(parameter_obj.name);\n input_field.off();\n input_field.remove();\n\n /// update elements:\n opened_name_parameter = false;\n opened_input_parameter = false;\n }\n });\n input_field.select();\n}\n\nvar opened_name_function = false;\nvar opened_input = null;\nvar previousPadding = null;\nfunction enableNameFunctionUpdate (function_obj, parent_node) {\n if (opened_name_function) {\n opened_input.focus();\n return;\n }\n parent_node = $(parent_node);\n parent_node.find('.span_name_function').text('');\n var input_field;\n if (!previousPadding) {\n previousPadding = parent_node.find('.span_name_function').css('padding-left');\n }\n parent_node.find('.span_name_function').css('padding-left', '0');\n parent_node.find('.span_name_function').css('padding-right', '0');\n \n input_field = $( \"\" );\n input_field.insertBefore(parent_node.find('.span_name_function'));\n\n input_field.on('input', function() {\n var inputWidth = input_field.textWidth()+10;\n opened_input = input_field;\n input_field.focus();\n\n var tmpStr = input_field.val();\n input_field.val('');\n input_field.val(tmpStr);\n\n input_field.css({\n width: inputWidth\n })\n }).trigger('input');\n\n input_field.focusout(function() {\n /// update array:\n if (input_field.val().trim()) {\n updateFunctionName(function_obj, input_field.val().trim(), parent_node);\n }\n input_field.off();\n input_field.remove();\n parent_node.find('.span_name_function').css('padding-left', previousPadding);\n parent_node.find('.span_name_function').css('padding-right', previousPadding);\n parent_node.find('.span_name_function').text(function_obj.name);\n\n /// update elements:\n opened_name_function = false;\n opened_input = false;\n });\n\n input_field.on('keydown', function(e) {\n var code = e.keyCode || e.which;\n if(code == 13) {\n if (input_field.val().trim()) {\n updateFunctionName(function_obj, input_field.val().trim(), parent_node);\n }\n input_field.off();\n input_field.remove();\n parent_node.find('.span_name_function').css('padding-left', previousPadding);\n parent_node.find('.span_name_function').css('padding-right', previousPadding);\n parent_node.find('.span_name_function').text(function_obj.name);\n\n /// update elements:\n opened_name_function = false;\n opened_input = false;\n }\n if(code == 27) {\n\n input_field.off();\n input_field.remove();\n parent_node.find('.span_name_function').css('padding-left', previousPadding);\n parent_node.find('.span_name_function').css('padding-right', previousPadding);\n parent_node.find('.span_name_function').text(function_obj.name);\n\n /// update elements:\n opened_name_function = false;\n opened_input = false;\n }\n });\n input_field.select();\n \n}\n\nexport function addFunctionChangeListener (callback) {\n functionsChangeListeners.push(callback);\n return functionsChangeListeners.length - 1;\n}\n\nexport function addGlobalChangeListener (callback) {\n globalChangeListeners.push(callback);\n return globalChangeListeners.length - 1;\n}\n\nexport function removeGlobalListener (index) {\n globalChangeListeners.splice(index, 1);\n}\n\nexport function removeFunctionListener (index) {\n functionsChangeListeners.splice(index);\n}\n\nfunction scheduleCall (callback, time) {\n const scheduled_call = () => {\n const id = setInterval(() => {\n if(callback()) {\n clearInterval(id);\n }\n }, time)\n }\n scheduled_call();\n}\n\nfunction showRunButton () {\n document.getElementById('run_button').style.display = 'inline';\n document.getElementById('stop_button').style.display = 'none';\n}\n\nfunction showStopButton () {\n document.getElementById('run_button').style.display = 'none';\n document.getElementById('stop_button').style.display = 'inline';\n}\n\nfunction stopExecution () {\n domConsole.clearPendingWrites();\n domConsole.cancelPendingInputRequests();\n if(!isRunning) {\n return;\n }\n proc.mode = Modes.ABORT;\n}","import { Types } from './types';\nimport * as Models from './ivprog_elements';\nimport { LocalizedStrings } from './../services/localizedStringsService';\nimport * as Utils from './utils';\nimport { registerUserEvent, registerSystemEvent, ActionTypes } from \"./../services/userLog\";\n\nvar counter_new_globals = 0;\n\nexport function addGlobal (program, is_from_click = false) {\n\n\tvar new_global = new Models.Variable(Types.INTEGER, LocalizedStrings.getUI('new_global') + '_' + counter_new_globals, 0);\n\tcounter_new_globals ++;\n\n\tprogram.addGlobal(new_global);\n\n\tregisterUserEvent(new_global.name, ActionTypes.INSERT_GLOBAL_VAR);\n\tvar newe = renderGlobal(new_global);\n\n\tif (is_from_click) {\n\t\tnewe.css('display', 'none');\n\t\tnewe.fadeIn();\n\t}\n\n}\n\nfunction toggleConstant (global_var) {\n\tglobal_var.is_constant = !global_var.is_constant;\n\tregisterUserEvent(global_var.name, ActionTypes.SET_GLOBAL_CONST);\n}\n\nfunction updateName (global_var, new_name, global_obj_dom) {\n\n\tif (global_var.name == new_name) {\n\t\treturn;\n\t}\n\n\tif (isValidIdentifier(new_name)) {\n\t\tif (globalNameAlreadyExists(new_name)) {\n\t\t\tUtils.renderErrorMessage(global_obj_dom.find('.editing_name_var'), LocalizedStrings.getUI('inform_valid_global_duplicated'));\n\t\t} else {\n\t\t\tregisterUserEvent(global_var.name, ActionTypes.RENAME_GLOBAL_VAR, new_name);\n\t\t\tglobal_var.name = new_name;\n\t\t}\n\t} else {\n\t\tUtils.renderErrorMessage(global_obj_dom.find('.editing_name_var'), LocalizedStrings.getUI('inform_valid_name'));\n\t}\n}\n\nfunction globalNameAlreadyExists (global_name) {\n for (var i = 0; i < window.program_obj.globals.length; i++) {\n if (window.program_obj.globals[i].name == global_name) {\n return true;\n }\n }\n return false;\n}\n\nfunction isValidIdentifier (identifier_str) {\n\treturn /^[a-zA-Z_][a-zA-Z0-9_]*$/.test(identifier_str);\n}\n\nfunction updateType (global_var, new_type, new_dimensions = 0) {\n\tglobal_var.type = new_type;\n\tglobal_var.dimensions = new_dimensions;\n\n\tif (new_dimensions > 0) {\n\t\tglobal_var.rows = new_dimensions;\n\t\tglobal_var.columns = 2;\n\t}\n\tregisterUserEvent(global_var.name, ActionTypes.CHANGE_VAR_TYPE, new_type,\n\t\tnew_dimensions, global_var.rows, global_var.columns);\n\tupdateInitialValues(global_var);\n}\n\nfunction removeGlobal (global_var, global_container) {\n\tvar index = window.program_obj.globals.indexOf(global_var);\n\tif (index > -1) {\n\t\twindow.insertContext = true;\n\t window.program_obj.globals.splice(index, 1);\n\t}\n\tregisterUserEvent(global_var.name, ActionTypes.REMOVE_GLOBAL_VAR);\n\tglobal_container.children().off();\n\tglobal_container.off();\n\tglobal_container.fadeOut();\n}\n\nfunction updateInitialValues (global_var) {\n\tif (global_var.type == Types.INTEGER) {\n\t\tif (global_var.dimensions == 0) {\n\t\t\tglobal_var.value = 0;\n\t\t}\n\t\tif (global_var.dimensions == 1) {\n\t\t\tglobal_var.value = [0, 0];\n\t\t}\n\t\tif (global_var.dimensions == 2) {\n\t\t\tglobal_var.value = [[0, 0], [0, 0]];\n\t\t}\n\t}\n\n\tif (global_var.type == Types.REAL) {\n\t\tif (global_var.dimensions == 0) {\n\t\t\tglobal_var.value = 0.0;\n\t\t}\n\t\tif (global_var.dimensions == 1) {\n\t\t\tglobal_var.value = [0.0, 0.0];\n\t\t}\n\t\tif (global_var.dimensions == 2) {\n\t\t\tglobal_var.value = [[0.0, 0.0], [0.0, 0.0]];\n\t\t}\n\t}\n\n\tif (global_var.type == Types.TEXT) {\n\t\tif (global_var.dimensions == 0) {\n\t\t\tglobal_var.value = LocalizedStrings.getUI('textvar_default_value');\n\t\t}\n\t\tif (global_var.dimensions == 1) {\n\t\t\tglobal_var.value = [LocalizedStrings.getUI('textvar_default_value'), LocalizedStrings.getUI('textvar_default_value')];\n\t\t}\n\t\tif (global_var.dimensions == 2) {\n\t\t\tglobal_var.value = [[LocalizedStrings.getUI('textvar_default_value'), LocalizedStrings.getUI('textvar_default_value')], \n\t\t\t\t\t\t\t\t\t[LocalizedStrings.getUI('textvar_default_value'), LocalizedStrings.getUI('textvar_default_value')]];\n\t\t}\n\t}\n\n\tif (global_var.type == Types.BOOLEAN) {\n\t\tif (global_var.dimensions == 0) {\n\t\t\tglobal_var.value = true;\n\t\t}\n\t\tif (global_var.dimensions == 1) {\n\t\t\tglobal_var.value = [true, true];\n\t\t}\n\t\tif (global_var.dimensions == 2) {\n\t\t\tglobal_var.value = [[true, true], [true, true]];\n\t\t}\n\t}\n\tregisterSystemEvent(function_name, ActionTypes.CHANGE_GLOBAL_VALUE, global_var.name,\n\t\tglobal_var.value);\n}\n\nfunction alternateBooleanGlobalValue (global_var, value_container) {\n\tglobal_var.value = !global_var.value;\n\t$(value_container).find('.span_value_variable').text(LocalizedStrings.getUI(`logic_value_${global_var.value}`));\n}\n\nfunction alternateBooleanGlobalVectorValue (global_var, index, value_container) {\n\tglobal_var.value[index] = !global_var.value[index];\n\t$(value_container).find('.span_value_variable').text(LocalizedStrings.getUI(`logic_value_${global_var.value[index]}`));\n}\n\nfunction removeGlobalColumnVector (global_var) {\n\tif (global_var.columns == 0) {\n\t\treturn;\n\t}\n\n\tglobal_var.columns --;\n\tglobal_var.value.splice(global_var.value.length - 1, 1);\n}\n\nfunction addGlobalColumnVector (global_var) {\n\tglobal_var.columns ++;\n\n\tif (global_var.type == Types.INTEGER) {\n\t\tglobal_var.value.push(0);\n\t}\n\tif (global_var.type == Types.REAL) {\n\t\tglobal_var.value.push(0.0);\n\t}\n\tif (global_var.type == Types.TEXT) {\n\t\tglobal_var.value.push(LocalizedStrings.getUI('textvar_default_value'));\n\t}\n\tif (global_var.type == Types.BOOLEAN) {\n\t\tglobal_var.value.push(true);\n\t}\n}\n\nfunction removeColumnGlobalMatrix (global_var) {\n\tif (global_var.columns == 0) {\n\t\treturn;\n\t}\n\n\tglobal_var.columns --;\n\n\tfor (var i = 0; i < global_var.rows; i++) {\n\t\tglobal_var.value[i].splice(global_var.value[i].length - 1, 1);\n\t}\n}\n\nfunction addColumnGlobalMatrix (global_var) {\n\tglobal_var.columns ++;\n\n\tif (global_var.type == Types.INTEGER) {\n\t\tfor (var i = 0; i < global_var.rows; i++) {\n\t\t\tglobal_var.value[i].push(0);\n\t\t}\n\t}\n\tif (global_var.type == Types.REAL) {\n\t\tfor (var i = 0; i < global_var.rows; i++) {\n\t\t\tglobal_var.value[i].push(0.0);\n\t\t}\n\t}\n\tif (global_var.type == Types.TEXT) {\n\t\tfor (var i = 0; i < global_var.rows; i++) {\n\t\t\tglobal_var.value[i].push(LocalizedStrings.getUI('textvar_default_value'));\n\t\t}\n\t}\n\tif (global_var.type == Types.BOOLEAN) {\n\t\tfor (var i = 0; i < global_var.rows; i++) {\n\t\t\tglobal_var.value[i].push(true);\n\t\t}\n\t}\n}\n\nfunction removeLineGlobalMatrix (global_var) {\n\tif (global_var.rows == 0) {\n\t\treturn;\n\t}\n\n\tglobal_var.rows --;\n\tglobal_var.value.splice(global_var.value.length - 1, 1);\n}\n\nfunction addLineGlobalMatrix (global_var) {\n\tglobal_var.rows ++;\n\n\tif (global_var.type == Types.INTEGER) {\n\t\tvar n_l = [];\n\t\tfor (var i = 0; i < global_var.columns; i++) {\n\t\t\tn_l.push(0);\n\t\t}\n\t\tglobal_var.value.push(n_l);\n\t}\n\tif (global_var.type == Types.REAL) {\n\t\tvar n_l = [];\n\t\tfor (i = 0; i < global_var.columns; i++) {\n\t\t\tn_l.push(0.0);\n\t\t}\n\t\tglobal_var.value.push(n_l);\n\t}\n\n\tif (global_var.type == Types.TEXT) {\n\t\tvar n_l = [];\n\t\tfor (i = 0; i < global_var.columns; i++) {\n\t\t\tn_l.push(LocalizedStrings.getUI('textvar_default_value'));\n\t\t}\n\t\tglobal_var.value.push(n_l);\n\t}\n\n\tif (global_var.type == Types.BOOLEAN) {\n\t\tvar n_l = [];\n\t\tfor (i = 0; i < global_var.columns; i++) {\n\t\t\tn_l.push(true);\n\t\t}\n\t\tglobal_var.value.push(n_l);\n\t}\n}\n\nfunction alternateBooleanGlobalMatrixValue (global_var, row, index, value_container) {\n\tglobal_var.value[row][index] = !global_var.value[row][index];\n\t$(value_container).find('.span_value_variable').text(LocalizedStrings.getUI(`logic_value_${global_var.value[row][index]}`));\n}\n\nfunction renderValues (global_var, global_container) {\n\n\tvar ret = \"\";\n\tvar j = 0;\n\n\tif (global_var.dimensions == 0) {\n\t\tif (global_var.type == Types.REAL) {\n\t\t\tret += '
'+global_var.value.toFixed(1)+'
';\n\t\t} else {\n\t\t\tif (global_var.type == Types.BOOLEAN) {\n\t\t\t\tret += '
'+LocalizedStrings.getUI(`logic_value_${global_var.value}`)+'
';\n\t\t\t} else {\n\t\t\t\tret += '
'+global_var.value+'
';\n\t\t\t}\n\t\t}\n\t} else {\n\t\tret += '';\n\n\t\tif (global_var.dimensions == 1) {\n\t\t\tret += '';\n\t\t\tif (global_var.type == Types.REAL) {\n\t\t\t\tfor (var k = 0; k < global_var.columns; k++) {\n\t\t\t\t\tret += '';\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor (var k = 0; k < global_var.columns; k++) {\n\t\t\t\t\tif (global_var.type == Types.BOOLEAN) {\n\t\t\t\t\t\tret += '';\n\t\t\t\t\t} else {\n\t\t\t\t\t\tret += '';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tret += '';\n\t\t\tret += '
'+global_var.value[k].toFixed(1)+''+LocalizedStrings.getUI(`logic_value_${global_var.value[k]}`)+''+global_var.value[k]+''+'
';\n\n\t\t\tret += '
'\n\t\t \t+ '
';\n\t\t}\n\n\t\tif (global_var.dimensions == 2) {\n\t\t\tif (global_var.type == Types.REAL) {\n\t\t\t\tfor (var l = 0; l < global_var.rows; l++) {\n \t\t\t\tret += '';\n \t\t\t\tfor (var k = 0; k < global_var.columns; k++) {\n \t\t\t\t\tret += ''+global_var.value[l][k].toFixed(1)+''+'';\n \t\t\t\t} \n \t\t\t\tret += '';\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor (var l = 0; l < global_var.rows; l++) {\n \t\t\t\tret += '';\n \t\t\t\tfor (var k = 0; k < global_var.columns; k++) {\n \t\t\t\t\tif (global_var.type == Types.BOOLEAN) { \n \t\t\t\t\t\tret += ''+LocalizedStrings.getUI(`logic_value_${global_var.value[l][k]}`)+'';\n \t\t\t\t\t} else {\n \t\t\t\t\t\tret += ''+global_var.value[l][k]+'';\n \t\t\t\t\t}\n \t\t\t\t} \n \t\t\t\tret += '';\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (global_var.rows == 0) {\n\t\t\t\tret += '';\n\t\t\t}\n\t\t\tret += ''\n\t\t \t+ ' ';\n\t\t\tret += '';\n\n\t\t\tret += '
'\n\t\t \t+ '
';\n\t\t}\n\t\t\n\t}\n\n\tglobal_container.find( \".div_valor_var\" ).html('');\n\n\tret = $(ret);\n\n\tret.find('.span_value_variable').data('associatedOject', global_var);\n\n\tret.find( \".boolean_simple_type\" ).on('click', function(e){\n\t\talternateBooleanGlobalValue(global_var, this.parentNode);\n\t\tregisterUserEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_VALUE, global_var.value);\n\t});\n\tret.find( \".simple_var\" ).on('click', function(e){\n\t\tregisterUserEvent(global_var.name, ActionTypes.ENTER_CHANGE_GLOBAL_VALUE);\n\t\tenableGlobalValueUpdate(global_var, this.parentNode);\n\t});\n\n\tret.find( \".boolean_vector_var\" ).on('click', function(e){\n\t\talternateBooleanGlobalVectorValue(global_var, $(this).data('index'), this.parentNode);\n\t\tregisterUserEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_VALUE, global_var.value);\n\t});\n\tret.find( \".vector_var\" ).on('click', function(e){\n\t\tregisterUserEvent(global_var.name, ActionTypes.ENTER_CHANGE_GLOBAL_VALUE);\n\t\tenableGlobalVectorValueUpdate(global_var, $(this).data('index'), this.parentNode);\n\t});\n\tret.find( \".remove_global_vector_column\" ).on('click', function(e){\n\t\tremoveGlobalColumnVector(global_var);\n\t\tglobal_container.find( \".div_valor_var\" ).html('');\n\t\tregisterUserEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_TYPE,\n\t\t\tglobal_var.type, global_var.dimensions, global_var.rows, global_var.columns);\n\t\tregisterSystemEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_VALUE, global_var.value);\n\t\trenderValues(global_var, global_container);\n\t});\n\tret.find( \".add_global_vector_column\" ).on('click', function(e){\n\t\taddGlobalColumnVector(global_var);\n\t\tregisterUserEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_TYPE,\n\t\t\tglobal_var.type, global_var.dimensions, global_var.rows, global_var.columns);\n\t\tregisterSystemEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_VALUE, global_var.value);\n\t\tglobal_container.find( \".div_valor_var\" ).html('');\n\t\trenderValues(global_var, global_container);\n\t});\n\tret.find( \".remove_global_matrix_column\" ).on('click', function(e){\n\t\tremoveColumnGlobalMatrix(global_var);\n\t\tregisterUserEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_TYPE,\n\t\t\tglobal_var.type, global_var.dimensions, global_var.rows, global_var.columns);\n\t\tregisterSystemEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_VALUE, global_var.value);\n\t\tglobal_container.find( \".div_valor_var\" ).html('');\n\t\trenderValues(global_var, global_container);\n\t});\n\tret.find( \".add_global_matrix_column\" ).on('click', function(e){\n\t\taddColumnGlobalMatrix(global_var);\n\t\tregisterUserEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_TYPE,\n\t\t\tglobal_var.type, global_var.dimensions, global_var.rows, global_var.columns);\n\t\tregisterSystemEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_VALUE, global_var.value);\n\t\tglobal_container.find( \".div_valor_var\" ).html('');\n\t\trenderValues(global_var, global_container);\n\t});\n\tret.find( \".remove_global_matrix_line\" ).on('click', function(e){\n\t\tremoveLineGlobalMatrix(global_var);\n\t\tregisterUserEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_TYPE,\n\t\t\tglobal_var.type, global_var.dimensions, global_var.rows, global_var.columns);\n\t\tregisterSystemEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_VALUE, global_var.value);\n\t\tglobal_container.find( \".div_valor_var\" ).html('');\n\t\trenderValues(global_var, global_container);\n\t});\n\tret.find( \".add_global_matrix_line\" ).on('click', function(e){\n\t\taddLineGlobalMatrix(global_var);\n\t\tregisterUserEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_TYPE,\n\t\t\tglobal_var.type, global_var.dimensions, global_var.rows, global_var.columns);\n\t\tregisterSystemEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_VALUE, global_var.value);\n\t\tglobal_container.find( \".div_valor_var\" ).html('');\n\t\trenderValues(global_var, global_container);\n\t});\n\tret.find( \".boolean_matrix_var\" ).on('click', function(e){\n\t\talternateBooleanGlobalMatrixValue(global_var, $(this).data('row'), $(this).data('index'), this.parentNode);\n\t\tregisterUserEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_VALUE, global_var.value);\n\t});\n\tret.find( \".matrix_var\" ).on('click', function(e){\n\t\tregisterUserEvent(global_var.name, ActionTypes.ENTER_CHANGE_GLOBAL_VALUE);\n\t\tenableGlobalMatrixValueUpdate(global_var, $(this).data('row'), $(this).data('index'), this.parentNode);\n\t});\n\tglobal_container.find( \".div_valor_var\" ).append(ret);\n\n\n\tupdateColumnsAndRowsText(global_container, global_var);\n\n}\n\nfunction addHandlers (global_container) {\n\tvar global_var = global_container.data('associatedOject'); \n\t// Manage constant option:\n\tglobal_container.find( \".alternate_constant\" ).on('click', function(e){\n\t\ttoggleConstant(global_var);\n\n\t\t$( this ).removeClass( \"on off\" );\n\t\tif (global_var.is_constant) {\n\t\t\t$( this ).addClass( \"on\" );\n\t\t} else {\n\t\t\t$( this ).addClass( \"off\" );\n\t\t}\n\t});\n\n\t// Manage global name: \n\tglobal_container.find( \".editing_name_var\" ).on('click', function(e){\n\t\tregisterUserEvent(global_var.name, ActionTypes.ENTER_CHANGE_GLOBAL_NAME);\n\t\tenableNameUpdate(global_container);\n\t});\n\n\t// Menu to change type:\n\tglobal_container.find('.ui.dropdown.global_type').dropdown({\n\t onChange: function(_, __, $selectedItem) {\n\t \tif ($selectedItem.data('dimensions')) {\n\t \t\tupdateType(global_var, Types[$selectedItem.data('type')], $selectedItem.data('dimensions'));\n\t \t} else {\n\t \t\tupdateType(global_var, Types[$selectedItem.data('type')]);\n\t \t}\n\n\t \trenderValues(global_var, global_container);\n\n\t },\n\t selectOnKeydown: false\n\t});\n\n\t// Remove global: \n\tglobal_container.find( \".remove_global\" ).on('click', function(e){\n\t\tremoveGlobal(global_var, global_container);\n\t});\n\n}\n\nfunction updateColumnsAndRowsText (global_container, global_var) {\n\tvar prev = global_container.find('.text').text().split('[');\n\tif (prev.length == 2) {\n\t\tvar ff = prev[0] + '[ ' + global_var.columns + ' ] ';\n\t\tglobal_container.find('.text').empty();\n\t\tglobal_container.find('.text').text(ff);\n\t}\n\tif (prev.length == 3) {\n\t\tvar ff = prev[0] + '[ ' + global_var.columns + ' ] [ ' + global_var.rows + ' ] ';\n\t\tglobal_container.find('.text').empty();\n\t\tglobal_container.find('.text').text(ff);\n\t}\n}\n\nexport function renderGlobal (global_var) {\n\n\tvar element = '
const: ';\n\n\telement += '
';\n \t\n \telement += '
';\n\n \tif (global_var.dimensions == 1) {\n \t\telement += '
'+ LocalizedStrings.getUI('vector')+ ': ' + LocalizedStrings.getUI(`type_${global_var.type}`);\n \t\telement += ' [ ] ';\n \t\telement += '
';\n \t} else if (global_var.dimensions == 2) {\n \t\telement += '
'+ LocalizedStrings.getUI('matrix')+ ': ' + LocalizedStrings.getUI(`type_${global_var.type}`);\n \t\telement += ' [ ] [ ] ';\n \t\telement += '
';\n \t} else {\n \t\telement += '
' + LocalizedStrings.getUI(`type_${global_var.type.toLowerCase()}`) + '
';\n \t}\n\telement += '
';\n\n\tfor (var tm in Types) {\n \t\tif (tm == Types.VOID.toUpperCase()) {\n \t\t\tcontinue;\n \t\t}\n \t\telement += '
'+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+'
';\n\t}\n\n\n\telement += '
'\n\t\t+ '' + LocalizedStrings.getUI('vector')\n\t\t+ '
';\n\n\tfor (var tm in Types) {\n \t\tif (tm == Types.VOID.toUpperCase()) {\n \t\t\tcontinue;\n \t\t}\n\n \t\telement += '
'+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+'
';\n \t}\n\telement += '
';\n\n\n\telement += '
'\n\t\t+ '' + LocalizedStrings.getUI('matrix')\n\t\t+ '
';\n\n\tfor (var tm in Types) {\n \t\tif (tm == Types.VOID.toUpperCase()) {\n \t\t\tcontinue;\n \t\t}\n\n \t\telement += '
'+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+'
';\n \t}\n\telement += '
';\n\n element += '
'+global_var.name+'
<— ';\n\n\telement += '
'+global_var.value+'
'; \n\n\telement += '
';\n\n\tvar complete_element = $(element);\n\n\tcomplete_element.data('associatedOject', global_var);\n\n\t$('.list_globals').append(complete_element);\n\n\taddHandlers(complete_element);\n\n\trenderValues(global_var, complete_element);\n\n\tif (global_var.dimensions == 1) {\n\t\tcomplete_element.find('.dimensions_0').text(global_var.columns);\n\t}\n\tif (global_var.dimensions == 2) {\n\t\tcomplete_element.find('.dimensions_0').text(global_var.columns);\n\t\tcomplete_element.find('.dimensions_1').text(global_var.rows);\n\t}\n\n\treturn complete_element;\n}\n\nvar opened_name_value_matrix_global_v = false;\nvar opened_input_value_matrix_global_v = null;\nfunction enableGlobalMatrixValueUpdate (global_var, row, index, parent_node) {\n\tif (opened_name_value_matrix_global_v) {\n\t\topened_input_value_matrix_global_v.focus();\n\t\treturn;\n\t}\n\tparent_node = $(parent_node);\n\topened_name_value_matrix_global_v = true;\n\n\tparent_node.find('.span_value_variable').text('');\n\n\tvar input_field;\n\n\tif (global_var.type == Types.REAL) {\n\t\tinput_field = $( \"\" );\n\t\tinput_field.insertBefore(parent_node.find('.span_value_variable'));\n\t} else {\n\t\tinput_field = $( \"\" );\n\t\tinput_field.insertBefore(parent_node.find('.span_value_variable'));\n\t}\n\n\tinput_field.on('input', function() {\n\t var inputWidth = input_field.textWidth()+10;\n\t opened_input_value_matrix_global_v = input_field;\n\t input_field.focus();\n\n\t var tmpStr = input_field.val();\n\t\tinput_field.val('');\n\t\tinput_field.val(tmpStr);\n\n\t input_field.css({\n\t width: inputWidth\n\t })\n\t}).trigger('input');\n\n\tinput_field.focusout(function() {\n\t\t/// update array:\n\t\tif (input_field.val().trim()) {\n\t\t\tif (global_var.type == Types.REAL) {\n\t\t\t\tglobal_var.value[row][index] = parseFloat(input_field.val().trim());\n\n\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[row][index].toFixed(1));\n\t\t\t} else {\n\t\t\t\tif (global_var.type == Types.INTEGER) {\n\t\t\t\t\tglobal_var.value[row][index] = parseInt(input_field.val().trim());\n\t\t\t\t} else {\n\t\t\t\t\tglobal_var.value[row][index] = input_field.val().trim();\n\t\t\t\t}\n\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[row][index]);\n\t\t\t}\n\t\t\tregisterUserEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_VALUE, global_var.value);\n\t\t} else {\n\t\t\tif (global_var.type == Types.REAL) {\n\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[row][index].toFixed(1));\n\t\t\t} else {\n\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[row][index]);\n\t\t\t}\n\t\t}\n\t\tif (global_var.type == Types.TEXT) {\n\t\t\tglobal_var.value[row][index] = input_field.val();\n\t\t\tparent_node.find('.span_value_variable').text(global_var.value[row][index]);\n\t\t}\n\t\tinput_field.off();\n\t\tinput_field.remove();\n\n\t\t/// update elements:\n\t\topened_name_value_matrix_global_v = false;\n\t\topened_input_value_matrix_global_v = false;\n\t});\n\n\tinput_field.on('keydown', function(e) {\n\t\tvar code = e.keyCode || e.which;\n\t\tif(code == 13) {\n\t\t\tif (input_field.val().trim()) {\n\t\t\t\tif (global_var.type == Types.REAL) {\n\t\t\t\t\tglobal_var.value[row][index] = parseFloat(input_field.val().trim());\n\n\t\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[row][index].toFixed(1));\n\t\t\t\t} else {\n\t\t\t\t\tif (global_var.type == Types.INTEGER) {\n\t\t\t\t\t\tglobal_var.value[row][index] = parseInt(input_field.val().trim());\n\t\t\t\t\t} else {\n\t\t\t\t\t\tglobal_var.value[row][index] = input_field.val().trim();\n\t\t\t\t\t}\n\t\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[row][index]);\n\t\t\t\t}\n\t\t\t\tregisterUserEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_VALUE, global_var.value);\n\t\t\t} else {\n\t\t\t\tif (global_var.type == Types.REAL) {\n\t\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[row][index].toFixed(1));\n\t\t\t\t} else {\n\t\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[row][index]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (global_var.type == Types.TEXT) {\n\t\t\t\tglobal_var.value[row][index] = input_field.val();\n\t\t\t\tregisterUserEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_VALUE, global_var.value);\n\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[row][index]);\n\t\t\t}\n\t\t\tinput_field.off();\n\t\t\tinput_field.remove();\n\n\t\t\t/// update elements:\n\t\t\topened_name_value_matrix_global_v = false;\n\t\t\topened_input_value_matrix_global_v = false;\n\t\t}\n\t\tif(code == 27) {\n\t\t\tif (global_var.type == Types.REAL) {\n\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[row][index].toFixed(1));\n\t\t\t} else {\n\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[row][index]);\n\t\t\t}\n\t\t\tinput_field.off();\n\t\t\tinput_field.remove();\n\n\t\t\t/// update elements:\n\t\t\topened_name_value_matrix_global_v = false;\n\t\t\topened_input_value_matrix_global_v = false;\n\t\t}\n\t});\n\tinput_field.select();\n}\n\nvar opened_name_value_global_var = false;\nvar opened_input_value_global_ar = null;\nfunction enableGlobalValueUpdate (global_var, parent_node) {\n\tif (opened_name_value_global_var) {\n\t\topened_input_value_global_ar.focus();\n\t\treturn;\n\t}\n\tparent_node = $(parent_node);\n\topened_name_value_global_var = true;\n\n\tparent_node.find('.span_value_variable').text('');\n\n\tvar input_field;\n\n\tif (global_var.type == Types.REAL) {\n\t\tinput_field = $( \"\" );\n\t\tinput_field.insertBefore(parent_node.find('.span_value_variable'));\n\t} else {\n\t\tinput_field = $( \"\" );\n\t\tinput_field.insertBefore(parent_node.find('.span_value_variable'));\n\t}\n\n\tinput_field.on('input', function() {\n\t\tvar inputWidth = input_field.textWidth()+10;\n\t\topened_input_value_global_ar = input_field;\n\t\tinput_field.focus();\n\n\t var tmpStr = input_field.val();\n\t\tinput_field.val('');\n\t\tinput_field.val(tmpStr);\n\n\t\tinput_field.css({\n\t\t\t\twidth: inputWidth\n\t\t})\n\t}).trigger('input');\n\n\tinput_field.focusout(function() {\n\t\tlet changed = false;\n\t\t/// update array:\n\t\tif (input_field.val().trim()) {\n\t\t\tif (global_var.type == Types.REAL) {\n\t\t\t\tglobal_var.value = parseFloat(input_field.val().trim());\n\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value.toFixed(1));\n\t\t\t} else{\n\t\t\t\tif (global_var.type == Types.INTEGER) {\n\t\t\t\t\tglobal_var.value = parseInt(input_field.val().trim());\n\t\t\t\t} else {\n\t\t\t\t\tglobal_var.value = input_field.val().trim();\n\t\t\t\t}\n\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value);\n\t\t\t\t\n\t\t\t}\n\t\t\tchanged = true;\n\t\t} else {\n\t\t\tif (global_var.type == Types.REAL) {\n\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value.toFixed(1));\n\t\t\t} else {\n\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value);\n\t\t\t}\n\t\t}\n\t\tif (global_var.type == Types.TEXT) {\n\t\t\tglobal_var.value = input_field.val();\n\t\t\tchanged = true;\n\t\t\tparent_node.find('.span_value_variable').text(global_var.value);\n\t\t}\n\t\tif (changed) {\n\t\t\tregisterUserEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_VALUE, global_var.value);\n\t\t}\n\t\tinput_field.off();\n\t\tinput_field.remove();\n\n\t\t/// update elements:\n\t\topened_name_value_global_var = false;\n\t\topened_input_value_global_ar = false;\n\n\t});\n\n\tinput_field.on('keydown', function(e) {\n\t\tconst code = e.keyCode || e.which;\n\t\tlet changed = true;\n\t\tif(code == 13) {\n\t\t\tif (input_field.val().trim()) {\n\t\t\t\tif (global_var.type == Types.REAL) {\n\t\t\t\t\tglobal_var.value = parseFloat(input_field.val().trim());\n\t\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value.toFixed(1));\n\t\t\t\t} else {\n\t\t\t\t\tif (global_var.type == Types.INTEGER) {\n\t\t\t\t\t\tglobal_var.value = parseInt(input_field.val().trim());\n\t\t\t\t\t} else {\n\t\t\t\t\t\tglobal_var.value = input_field.val().trim();\n\t\t\t\t\t}\n\t\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value);\n\t\t\t\t}\n\t\t\t\tchanged = true;\n\t\t\t} else {\n\t\t\t\tif (global_var.type == Types.REAL) {\n\t\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value.toFixed(1));\n\t\t\t\t} else {\n\t\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (global_var.type == Types.TEXT) {\n\t\t\t\tglobal_var.value = input_field.val();\n\t\t\t\tchanged = true;\n\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value);\n\t\t\t}\n\t\t\tif (changed) {\n\t\t\t\tregisterUserEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_VALUE, global_var.value);\n\t\t\t}\n\t\t\tinput_field.off();\n\t\t\tinput_field.remove();\n\n\t\t\t/// update elements:\n\t\t\topened_name_value_global_var = false;\n\t\t\topened_input_value_global_ar = false;\n\n\t\t}\n\t\tif(code == 27) {\n\t\t\tif (global_var.type == Types.REAL) {\n\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value.toFixed(1));\n\t\t\t} else{\n\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value);\n\t\t\t}\n\t\t\tinput_field.off();\n\t\t\tinput_field.remove();\n\n\t\t\t/// update elements:\n\t\t\topened_name_value_global_var = false;\n\t\t\topened_input_value_global_ar = false;\n\t\t}\n\t});\n\n\tinput_field.select();\n}\n\n\nvar opened_name_global = false;\nvar opened_input_global = null;\nfunction enableNameUpdate (global_container) {\n\n\tvar global_var = global_container.data('associatedOject'); \n\n\tif (opened_name_global) {\n\t\topened_input_global.focus();\n\t\treturn;\n\t}\n\topened_name_global = true;\n\n\tglobal_container.find('.span_name_variable').text('');\n\tvar input_name = $( \"\" );\n\tinput_name.insertBefore(global_container.find('.span_name_variable'));\n\n\tinput_name.on('input', function() {\n\t var inputWidth = input_name.textWidth()+10;\n\t opened_input_global = input_name;\n\t opened_input_global.focus();\n\n\t opened_input_global.css({\n\t width: inputWidth\n\t })\n\t}).trigger('input');\n\n\tinput_name.focusout(function() {\n\t\t/// update array:\n\t\tif (input_name.val().trim().length > 0) {\n\t\t\tupdateName(global_var, input_name.val().trim(), global_container);\n\t\t\tglobal_container.find('.span_name_variable').text(global_var.name);\n\t\t} else {\n\t\t\tglobal_container.find('.span_name_variable').text(global_var.name);\n\t\t}\n\t\tinput_name.off();\n\t\tinput_name.remove();\n\n\t\t/// update elements:\n\t\topened_name_global = false;\n\t\topened_input_global = false;\n\t});\n\n\tinput_name.on('keydown', function(e) {\n\t\tvar code = e.keyCode || e.which;\n\t\tif(code == 13) {\n\t\t\tif (input_name.val().trim()) {\n\t\t\t\tupdateName(global_var, input_name.val().trim(), global_container);\n\t\t\t\tglobal_container.find('.span_name_variable').text(global_var.name);\n\t\t\t} else {\n\t\t\t\tglobal_container.find('.span_name_variable').text(global_var.name);\n\t\t\t}\n\t\t\tinput_name.off();\n\t\t\tinput_name.remove();\n\n\t\t\t/// update elements:\n\t\t\topened_name_global = false;\n\t\t\topened_input_global = false;\n\t\t}\n\t\tif(code == 27) {\n\n\t\t\tglobal_container.find('.span_name_variable').text(global_var.name);\n\t\t\tinput_name.off();\n\t\t\tinput_name.remove();\n\n\t\t\t/// update elements:\n\t\t\topened_name_global = false;\n\t\t\topened_input_global = false;\n\t\t}\n\t});\n\n\tinput_name.select();\n\t\n}\n\n\nvar opened_name_value_vector_global_ = false;\nvar opened_input_value_vector_global_ = null;\nfunction enableGlobalVectorValueUpdate (global_var, index, parent_node) {\n\tif (opened_name_value_vector_global_) {\n\t\topened_input_value_vector_global_.focus();\n\t\treturn;\n\t}\n\tparent_node = $(parent_node);\n\topened_name_value_vector_global_ = true;\n\n\tparent_node.find('.span_value_variable').text('');\n\n\tvar input_field;\n\n\tif (global_var.type == Types.REAL) {\n\t\tinput_field = $( \"\" );\n\t\tinput_field.insertBefore(parent_node.find('.span_value_variable'));\n\t} else {\n\t\tinput_field = $( \"\" );\n\t\tinput_field.insertBefore(parent_node.find('.span_value_variable'));\n\t}\n\n\tinput_field.on('input', function() {\n\t var inputWidth = input_field.textWidth()+10;\n\t opened_input_value_vector_global_ = input_field;\n\t input_field.focus();\n\n\t var tmpStr = input_field.val();\n\t\tinput_field.val('');\n\t\tinput_field.val(tmpStr);\n\n\t input_field.css({\n\t width: inputWidth\n\t })\n\t}).trigger('input');\n\n\tinput_field.focusout(function() {\n\t\tlet changed = false;\n\t\t/// update array:\n\t\tif (input_field.val().trim()) {\n\t\t\tif (global_var.type == Types.REAL) {\n\t\t\t\tglobal_var.value[index] = parseFloat(input_field.val().trim());\n\n\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[index].toFixed(1));\n\t\t\t} else {\n\n\t\t\t\tif (global_var.type == Types.INTEGER) {\n\t\t\t\t\tglobal_var.value[index] = parseInt(input_field.val().trim());\n\t\t\t\t} else {\n\t\t\t\t\tglobal_var.value[index] = input_field.val().trim();\n\t\t\t\t}\n\n\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[index]);\n\n\t\t\t}\n\t\t\tchanged = true;\n\t\t} else {\n\t\t\tif (global_var.type == Types.REAL) {\n\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[index].toFixed(1));\n\t\t\t} else {\n\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[index]);\n\t\t\t}\n\t\t}\n\t\tif (global_var.type == Types.TEXT) {\n\t\t\tglobal_var.value[index] = input_field.val();\n\t\t\tchanged = true;\n\t\t\tparent_node.find('.span_value_variable').text(global_var.value[index]);\n\t\t}\n\t\tif (changed) {\n\t\t\tregisterUserEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_VALUE, global_var.value);\n\t\t}\n\t\tinput_field.off();\n\t\tinput_field.remove();\n\n\t\t/// update elements:\n\t\topened_name_value_vector_global_ = false;\n\t\topened_input_value_vector_global_ = false;\n\t});\n\n\tinput_field.on('keydown', function(e) {\n\t\tconst code = e.keyCode || e.which;\n\t\tlet changed = false;\n\t\tif(code == 13) {\n\t\t\tif (input_field.val().trim()) {\n\t\t\t\tif (global_var.type == Types.REAL) {\n\t\t\t\t\tglobal_var.value[index] = parseFloat(input_field.val().trim());\n\n\t\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[index].toFixed(1));\n\t\t\t\t} else {\n\n\t\t\t\t\tif (global_var.type == Types.INTEGER) {\n\t\t\t\t\t\tglobal_var.value[index] = parseInt(input_field.val().trim());\n\t\t\t\t\t} else {\n\t\t\t\t\t\tglobal_var.value[index] = input_field.val().trim();\n\t\t\t\t\t}\n\n\t\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[index]);\n\n\t\t\t\t}\n\t\t\t\tchanged = true;\n\t\t\t} else {\n\t\t\t\tif (global_var.type == Types.REAL) {\n\t\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[index].toFixed(1));\n\t\t\t\t} else {\n\t\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[index]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (global_var.type == Types.TEXT) {\n\t\t\t\tglobal_var.value[index] = input_field.val();\n\t\t\t\tchanged = true;\n\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[index]);\n\t\t\t}\n\t\t\tif (changed) {\n\t\t\t\tregisterUserEvent(global_var.name, ActionTypes.CHANGE_GLOBAL_VALUE, global_var.value);\n\t\t\t}\n\t\t\tinput_field.off();\n\t\t\tinput_field.remove();\n\n\t\t\t/// update elements:\n\t\t\topened_name_value_vector_global_ = false;\n\t\t\topened_input_value_vector_global_ = false;\n\t\t}\n\t\tif(code == 27) {\n\t\t\tif (global_var.type == Types.REAL) {\n\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[index].toFixed(1));\n\t\t\t} else {\n\t\t\t\tparent_node.find('.span_value_variable').text(global_var.value[index]);\n\t\t\t}\n\t\t\tinput_field.off();\n\t\t\tinput_field.remove();\n\n\t\t\t/// update elements:\n\t\t\topened_name_value_vector_global_ = false;\n\t\t\topened_input_value_vector_global_ = false;\n\t\t}\n\t});\n\n\tinput_field.select();\n}\n\n\n$.fn.textWidth = function(text, font) {\n \n if (!$.fn.textWidth.fakeEl) $.fn.textWidth.fakeEl = $('').hide().appendTo(document.body);\n \n $.fn.textWidth.fakeEl.text(text || this.val() || this.text() || this.attr('placeholder')).css('font', font || this.css('font'));\n \n return $.fn.textWidth.fakeEl.width();\n};","import { Types } from './types';\nimport WatchJS from 'melanke-watchjs';\nimport * as AlgorithmManagement from './algorithm';\n\nexport const COMMAND_TYPES = Object.freeze({function:\"function\", comment:\"comment\", reader:\"reader\", writer:\"writer\", attribution:\"attribution\", iftrue:\"iftrue\",\n repeatNtimes:\"repeatNtimes\", whiletrue:\"whiletrue\", dowhiletrue:\"dowhiletrue\", switch:\"switch\", switchcase:\"switchcase\", functioncall:\"functioncall\", break:\"break\",\n return:\"return\"});\n\nexport const ARITHMETIC_TYPES = Object.freeze({plus:\"plus\", minus:\"minus\", multiplication:\"multiplication\", division:\"division\", module:\"module\", none:\"none\"});\n\nexport const EXPRESSION_ELEMENTS = Object.freeze({exp_op_exp:\"exp_op_exp\", op_exp:\"op_exp\", par_exp_par:\"par_exp_par\", start_point:\"start_point\"});\n\nexport const EXPRESSION_TYPES = Object.freeze({exp_conditional:\"exp_conditional\", exp_logic:\"exp_logic\", exp_arithmetic:\"exp_arithmetic\"});\n\nexport const ARITHMETIC_COMPARISON = Object.freeze({greater_than:\"greater_than\", less_than:\"less_than\", equals_to:\"equals_to\", not_equals_to:\"not_equals_to\", greater_than_or_equals_to:\"greater_than_or_equals_to\", less_than_or_equals_to:\"less_than_or_equals_to\"});\n\nexport const LOGIC_COMPARISON = Object.freeze({equals_to:\"equals_to\", not_equals_to:\"not_equals_to\", and:\"and\", or:\"or\", not:\"not\"});\n\nexport const SYSTEM_FUNCTIONS_CATEGORIES = Object.freeze({math:'$mathLib', text:'$strLib', arrangement:'$arrayLib', conversion:'$langLib'});\n\nexport class Variable {\n\n constructor (type, name, value, dimensions = 0, is_constant = false, rows = 0, columns = 0) {\n this.type = type;\n this.name = name;\n this.value = value;\n this.dimensions = dimensions;\n this.is_constant = is_constant;\n this.rows = rows;\n this.columns = columns;\n }\n}\n\nexport class Function {\n\n constructor (name, return_type = Types.VOID, return_dimensions = 0, parameters_list = [], is_main = false, is_hidden = false, variables_list = [], function_comment = null, commands = []) {\n this.type = COMMAND_TYPES.function;\n this.name = name;\n this.return_type = return_type;\n this.return_dimensions = return_dimensions;\n this.parameters_list = parameters_list;\n this.is_main = is_main;\n this.is_hidden = is_hidden;\n this.variables_list = variables_list;\n this.function_comment = function_comment;\n this.commands = commands;\n }\n}\n\nexport class SystemFunction {\n\n constructor (identifier, return_type, return_dimensions, parameters_list, function_comment = null, category) {\n this.type = COMMAND_TYPES.function;\n this.identifier = identifier;\n this.return_type = return_type;\n this.return_dimensions = return_dimensions;\n this.parameters_list = parameters_list;\n this.function_comment = function_comment;\n this.category = category;\n }\n}\n\nexport class Comment {\n \n constructor (comment_text) {\n this.type = COMMAND_TYPES.comment;\n this.comment_text = comment_text;\n }\n}\n\nexport class Break {\n \n constructor () {\n this.type = COMMAND_TYPES.break;\n }\n}\n\nexport class Reader {\n \n constructor (variable_value_menu = new VariableValueMenu()) {\n this.type = COMMAND_TYPES.reader;\n this.variable_value_menu = variable_value_menu;\n }\n}\n\nexport class Writer {\n\n constructor (content) {\n this.type = COMMAND_TYPES.writer;\n this.content = content;\n }\n}\n\nexport class Attribution {\n\n constructor (variable, expression = []) {\n this.type = COMMAND_TYPES.attribution;\n this.variable = variable;\n this.expression = expression;\n }\n}\n\nexport class ExpressionOperator {\n\n constructor (type_op, item) {\n this.type_op = type_op; // Logic, Arithmetic OR Relational\n this.item = item;\n }\n}\n\nexport class ExpressionElement {\n\n constructor (type_exp, itens = []) {\n this.type_exp = type_exp;\n this.itens = itens;\n }\n}\n\nexport class ConditionalExpression {\n\n constructor (expression) {\n this.type = EXPRESSION_TYPES.exp_conditional;\n this.expression = expression;\n }\n}\n\nexport class LogicExpression {\n\n constructor (has_neg, first_operand, second_operand, operator) {\n this.type = EXPRESSION_TYPES.exp_logic;\n this.has_neg = has_neg;\n this.first_operand = first_operand;\n this.second_operand = second_operand;\n this.operator = operator;\n }\n}\n\nexport class ArithmeticExpression {\n\n constructor (first_operand, second_operand, operator) {\n this.type = EXPRESSION_TYPES.exp_arithmetic;\n this.first_operand = first_operand;\n this.second_operand = second_operand;\n this.operator = operator;\n }\n}\n\nexport class IfTrue {\n\n constructor (expression, commands_block, commands_else) {\n this.type = COMMAND_TYPES.iftrue;\n this.expression = expression;\n this.commands_block = commands_block;\n this.commands_else = commands_else;\n }\n}\n\nexport class RepeatNTimes {\n\n constructor (var_attribution, var_incrementation, expression1, expression2, expression3, commands_block) {\n this.type = COMMAND_TYPES.repeatNtimes;\n this.var_attribution = var_attribution;\n this.var_incrementation = var_incrementation;\n this.expression1 = expression1;\n this.expression2 = expression2;\n this.expression3 = expression3;\n this.commands_block = commands_block;\n }\n}\n\nexport class WhileTrue {\n\n constructor (expression, commands_block) {\n this.type = COMMAND_TYPES.whiletrue;\n this.expression = expression;\n this.commands_block = commands_block;\n }\n}\n\nexport class DoWhileTrue {\n\n constructor (expression, commands_block) {\n this.type = COMMAND_TYPES.dowhiletrue;\n this.expression = expression;\n this.commands_block = commands_block;\n }\n}\n\nexport class Switch {\n\n constructor (variable, cases = []) {\n this.type = COMMAND_TYPES.switch;\n this.variable = variable;\n this.cases = cases;\n }\n}\n\nexport class Return {\n\n constructor (variable_value_menu) {\n this.type = COMMAND_TYPES.return;\n this.variable_value_menu = variable_value_menu;\n } \n}\n\nexport class SwitchCase {\n\n constructor (variable_value_menu, commands_block = []) {\n this.type = COMMAND_TYPES.switchcase;\n this.variable_value_menu = variable_value_menu;\n this.commands_block = commands_block;\n } \n}\n\nexport class FunctionCall {\n\n constructor (function_called, parameters_list) {\n this.type = COMMAND_TYPES.functioncall;\n this.function_called = function_called;\n this.parameters_list = parameters_list;\n }\n}\n\nexport class VariableValueMenu {\n\n constructor (variable_and_value = 7, content = null, row = null, column = null, include_constant = true, dimensions = 0) {\n this.type = \"var_value\";\n this.variable_and_value = variable_and_value;\n this.content = content;\n this.row = row;\n this.column = column;\n this.include_constant = include_constant;\n this.dimensions = dimensions;\n }\n}\n\nexport class FunctionCallMenu {\n \n constructor (function_called = null, parameters_list = []) {\n this.type = \"function_call\";\n this.function_called = function_called;\n this.parameters_list = parameters_list;\n }\n}\n\nexport class Program {\n\n constructor () {\n this.functions = [];\n this.globals = [];\n }\n\n addFunction (function_to_add) {\n\n WatchJS.watch(function_to_add.parameters_list, function(){\n if (window.insertContext) {\n setTimeout(function(){ AlgorithmManagement.renderAlgorithm(); }, 300);\n window.insertContext = false;\n } else {\n AlgorithmManagement.renderAlgorithm();\n }\n }, 1);\n\n WatchJS.watch(function_to_add.variables_list, function(){\n if (window.insertContext) {\n setTimeout(function(){ AlgorithmManagement.renderAlgorithm(); }, 300);\n window.insertContext = false;\n } else {\n AlgorithmManagement.renderAlgorithm();\n }\n }, 1);\n\n this.functions.push(function_to_add);\n }\n\n addVariable (function_to_receive, variable) {\n if (this.functions[function_to_receive].variable === null) {\n this.functions[function_to_receive].variables_list = [];\n }\n this.functions[function_to_receive].variables_list.push(variable);\n }\n\n addGlobal (variable) {\n this.globals.push(variable);\n }\n}\n","import * as CodeMirror from \"codemirror\";\nimport \"codemirror/addon/edit/closebrackets\";\nimport \"codemirror/addon/edit/matchbrackets\";\n// import \"codemirror/addon/hint/show-hint\";\n// import \"codemirror/addon/hint/anyword-hint\";\nimport \"codemirror/addon/selection/active-line\";\nimport { CodeEditorMode } from \"./../util/editorMode2\"\nCodeEditorMode(CodeMirror);\n\nlet codeEditor = null;\n\nexport function initTextEditor (element) {\n let id = element;\n if (element[0] == '#') {\n id = element.substring(1);\n }\n codeEditor = CodeMirror.fromTextArea(document.getElementById(id), {\n theme: \"ttcn\",\n value: \"\",\n mode: \"text/x-ivprog\",\n indentUnit: 4,\n lineNumbers: true,\n matchBrackets: true,\n autoCloseBrackets: true,\n fixedGutter: true,\n styleActiveLine: true,\n readOnly: true\n });\n}\n\nexport function disable (flag) {\n codeEditor.setOption(\"readOnly\", flag);\n updateEditor();\n}\n\nexport function updateEditor () {\n codeEditor.refresh();\n}\n\nexport function setCode (code) {\n codeEditor.setValue(code);\n}\n\nexport function getCode () {\n return codeEditor.getValue();\n}\n","export const Types = Object.freeze({\n INTEGER: \"integer\",\n REAL: \"real\",\n TEXT: \"text\",\n BOOLEAN: \"boolean\",\n VOID: \"void\"\n});","\nexport function renderErrorMessage (dom_obj_target, message_text) {\n\n\tdom_obj_target.popup({\n\t\thtml : '' + message_text,\n\t\ttransition : \"fade up\",\n\t\ton : 'click',\n \t\tclosable : true,\n \t\tmovePopup : true,\n \t\tboundary : window,\n \t\tpreserve : false,\n \t\ttarget : false,\n\t\tclassName : {\n\t\t popup : 'ui popup invalid-identifier'\n\t\t},\n\t\tonHidden : function($module) {\n\t\t\tdom_obj_target.popup('destroy');\n\t\t}\n\n\t}).popup('toggle');\n\n}","import { Types } from './types';\nimport * as Models from './ivprog_elements';\nimport { LocalizedStrings } from './../services/localizedStringsService';\nimport * as Utils from './utils';\nimport { registerUserEvent, registerSystemEvent, ActionTypes } from \"./../services/userLog\";\nimport { isValidIdentifier } from \"./../util/utils\";\n\nvar counter_new_variables = 0;\n\nexport function addVariable (function_obj, function_container, is_in_click = false) {\n\tvar new_var = new Models.Variable(Types.INTEGER, LocalizedStrings.getUI('new_variable') + '_' + counter_new_variables, 0);\n\tif (function_obj.variables_list == null) {\n\t\tfunction_obj.variables_list = [];\n\t}\n\tfunction_obj.variables_list.push(new_var);\n\n\tcounter_new_variables ++;\n\n\tregisterUserEvent(function_obj.name, ActionTypes.INSERT_FUNCTION_VAR, new_var.name, Types.INTEGER, 0);\n\tvar newe = renderVariable(function_container, new_var, function_obj);\n\n\tif (is_in_click) {\n\t\tnewe.css('display', 'none');\n\t\tnewe.fadeIn();\n\t}\n}\n\nfunction updateName (variable_obj, new_name, variable_obj_dom, function_obj) {\n\n\tif (variable_obj.name == new_name) {\n\t\treturn;\n\t}\n\n\tif (isValidIdentifier(new_name)) {\n\t\tif (variableNameAlreadyExists(new_name, function_obj)) {\n\t\t\tUtils.renderErrorMessage(variable_obj_dom.find('.editing_name_var'), LocalizedStrings.getError('inform_valid_variable_duplicated', [new_name, function_obj.name]));\n\t\t} else {\n\t\t\tregisterUserEvent(function_obj.name, ActionTypes.RENAME_FUNCTION_VAR, variable_obj.name, new_name);\n\t\t\tvariable_obj.name = new_name;\n\t\t}\n\t} else {\n\t\tUtils.renderErrorMessage(variable_obj_dom.find('.editing_name_var'), LocalizedStrings.getError('inform_valid_identifier'));\n\t}\n}\n\nfunction variableNameAlreadyExists (name_var, function_obj) {\n\n\tif (function_obj.parameters_list) {\n\t\tfor (var i = 0; i < function_obj.parameters_list.length; i++) {\n\t\t\tif (function_obj.parameters_list[i].name == name_var) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (function_obj.variables_list) {\n\t\tfor (var i = 0; i < function_obj.variables_list.length; i++) {\n\t\t\tif (function_obj.variables_list[i].name == name_var) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn false;\n}\n\nfunction removeVariable (variable_obj, variable_container, function_name) {\n\tvar function_associated = variable_container.data('associatedFunction');\n\tregisterUserEvent(function_name, ActionTypes.REMOVE_FUNCTION_VAR, variable_obj.name);\n\n\tvar index = function_associated.variables_list.indexOf(variable_obj);\n\tif (index > -1) {\n\t window.insertContext = true;\n\t delete function_associated.variables_list[index];\n\t function_associated.variables_list.splice(index, 1);\n\t}\n\tvariable_container.children().off();\n\tvariable_container.off();\n\tvariable_container.fadeOut();\n}\n\nfunction updateType (variable_obj, new_type, function_name, new_dimensions = 0) {\n\tvariable_obj.type = new_type;\t\t\n\tvariable_obj.dimensions = new_dimensions;\n\n\tif (new_dimensions > 0) {\n\t\tvariable_obj.rows = new_dimensions;\n\t\tvariable_obj.columns = 2;\n\t}\n\tregisterUserEvent(function_name, ActionTypes.CHANGE_VAR_TYPE, variable_obj.name,\n\t\tnew_type, new_dimensions, variable_obj.rows, variable_obj.columns);\n\n\tupdateInitialValues(variable_obj, function_name);\n}\n\nfunction addHandlers (variable_obj, variable_container, function_obj) {\n\n\t// Manage variable name: \n\tvariable_container.find( \".editing_name_var\" ).on('click', function(e){\n\t\tregisterUserEvent(function_obj.name, ActionTypes.ENTER_CHANGE_VAR_NAME, variable_obj.name);\n\t\tenableNameUpdate(variable_obj, variable_container, function_obj);\n\t});\n\n\t// Menu to change type:\n\tvariable_container.find('.ui.dropdown.variable_type').dropdown({\n\t onChange: function(_, __, $selectedItem) {\n\t \tif ($selectedItem.data('dimensions')) {\n\t \t\tupdateType(variable_obj, Types[$selectedItem.data('type')], function_obj.name, $selectedItem.data('dimensions'));\n\t \t} else {\n\t \t\tupdateType(variable_obj, Types[$selectedItem.data('type')], function_obj.name);\n\t \t}\n\n\t \trenderValues(variable_obj, variable_container, function_obj.name);\n\t },\n\t selectOnKeydown: false\n\t});\n\n\t// Remove variable: \n\tvariable_container.find( \".remove_variable\" ).on('click', function(e){\n\t\tremoveVariable(variable_obj, variable_container, function_obj.name);\n\t});\n\n}\n\nexport function renderVariable (function_container, new_var, function_obj) {\n\n\tvar element = '
';\n\n\telement += '
';\n\n \tif (new_var.dimensions == 1) {\n \t\telement += '
'+ LocalizedStrings.getUI('vector') + ': ' + LocalizedStrings.getUI(`type_${new_var.type.toLowerCase()}`);\n \t\telement += ' [ ]
';\n \t} else if (new_var.dimensions == 2) {\n \t\telement += '
'+ LocalizedStrings.getUI('matrix') + ': ' + LocalizedStrings.getUI(`type_${new_var.type.toLowerCase()}`);\n \t\telement += ' [ ] [ ]
';\n \t} else {\n \t\telement += '
' + LocalizedStrings.getUI(`type_${new_var.type.toLowerCase()}`) + '
';\n \t}\n\telement += '
';\n\n\tfor (var tm in Types) {\n \t\tif (tm == Types.VOID.toUpperCase()) {\n \t\t\tcontinue;\n \t\t}\n \t\telement += '
'+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+'
';\n\t}\n\n\n\telement += '
'\n\t\t+ '' + LocalizedStrings.getUI('vector')\n\t\t+ '
';\n\n\tfor (var tm in Types) {\n \t\tif (tm == Types.VOID.toUpperCase()) {\n \t\t\tcontinue;\n \t\t}\n\n \t\telement += '
'+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+'
';\n \t}\n\telement += '
';\n\n\n\telement += '
'\n\t\t+ '' + LocalizedStrings.getUI('matrix')\n\t\t+ '
';\n\n\tfor (var tm in Types) {\n \t\tif (tm == Types.VOID.toUpperCase()) {\n \t\t\tcontinue;\n \t\t}\n\n \t\telement += '
'+LocalizedStrings.getUI(`type_${tm.toLowerCase()}`)+'
';\n \t}\n\telement += '
';\n\n element += '
';\n\n element += '
'+new_var.name+'
';\n\n\telement += ' <—
'+new_var.value+'
'; \n\n\telement += '
';\n\n\telement = $(element);\n\n\telement.data('associatedFunction', function_obj);\n\n\tfunction_container.find('.variables_list_div').append(element);\n\n\taddHandlers(new_var, element, function_obj);\n\n\trenderValues(new_var, element, function_obj.name);\n\n\treturn element;\n}\n\nfunction updateColumnsAndRowsText (variable_container, variable_var) {\n\tvar prev = variable_container.find('.text').text().split('[');\n\tif (prev.length == 2) {\n\t\tvar ff = prev[0] + '[ ' + variable_var.columns + ' ] ';\n\t\tvariable_container.find('.text').empty();\n\t\tvariable_container.find('.text').text(ff);\n\t}\n\tif (prev.length == 3) {\n\t\tvar ff = prev[0] + '[ ' + variable_var.columns + ' ] [ ' + variable_var.rows + ' ] ';\n\t\tvariable_container.find('.text').empty();\n\t\tvariable_container.find('.text').text(ff);\n\t}\n}\n\nfunction renderValues (new_var, variable_container, function_name) {\n\n\tvar ret = \"\";\n\tvar j = 0;\n\t\t\n\tif (new_var.dimensions == 0) {\n\t\tif (new_var.type == Types.REAL) {\n\t\t\tret += '
'+new_var.value.toFixed(1)+'
';\n\t\t} else {\n\t\t\tif (new_var.type == Types.BOOLEAN) {\n\t\t\t\tret += '
'+LocalizedStrings.getUI(`logic_value_${new_var.value}`)+'
';\n\t\t\t} else {\n\t\t\t\tret += '
'+new_var.value+'
';\n\t\t\t}\n\t\t}\n\t} else {\n\t\tret += '';\n\n\t\tif (new_var.dimensions == 1) {\n\t\t\tret += '';\n\t\t\tif (new_var.type == Types.REAL) {\n\t\t\t\tfor (var k = 0; k < new_var.columns; k++) {\n\t\t\t\t\tret += '';\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor (var k = 0; k < new_var.columns; k++) {\n\t\t\t\t\tif (new_var.type == Types.BOOLEAN) {\n\t\t\t\t\t\tret += '';\n\t\t\t\t\t} else {\n\t\t\t\t\t\tret += '';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tret += '';\n\t\t\tret += '
'+new_var.value[k].toFixed(1)+''+LocalizedStrings.getUI(`logic_value_${new_var.value[k]}`)+''+new_var.value[k]+''+'
';\n\n\t\t\tret += '
'\n\t\t \t+ '
';\n\t\t}\n\n\t\tif (new_var.dimensions == 2) {\n\t\t\tif (new_var.type == Types.REAL) {\n\t\t\t\tfor (var l = 0; l < new_var.rows; l++) {\n \t\t\t\tret += '';\n \t\t\t\tfor (var k = 0; k < new_var.columns; k++) {\n \t\t\t\t\tret += ''+new_var.value[l][k].toFixed(1)+''+'';\n \t\t\t\t} \n \t\t\t\tret += '';\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor (var l = 0; l < new_var.rows; l++) {\n \t\t\t\tret += '';\n \t\t\t\tfor (var k = 0; k < new_var.columns; k++) {\n \t\t\t\t\tif (new_var.type == Types.BOOLEAN) { \n \t\t\t\t\t\tret += ''+LocalizedStrings.getUI(`logic_value_${new_var.value[l][k]}`)+'';\n \t\t\t\t\t} else {\n \t\t\t\t\t\tret += ''+new_var.value[l][k]+'';\n \t\t\t\t\t}\n \t\t\t\t} \n \t\t\t\tret += '';\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (new_var.rows == 0) {\n\t\t\t\tret += '';\n\t\t\t}\n\t\t\tret += ''\n\t\t \t+ ' ';\n\t\t\tret += '';\n\n\t\t\tret += '
'\n\t\t \t+ '
';\n\t\t}\n\t\t\n\t}\n\n\t$( variable_container ).find( \".div_valor_var\" ).html('');\n\n\tret = $(ret);\n\n\t$(ret).find('.span_value_variable').\t\tdata('associatedOject', new_var);\n\n\t$( ret ).find( \".boolean_simple_type\" ).on('click', function(e){\n\t\tregisterUserEvent(function_name, ActionTypes.CHANGE_VAR_VALUE, new_var.name, new_var.value);\n\t\talternateBooleanValue(new_var, this.parentNode);\n\t});\n\t$( ret ).find( \".simple_var\" ).on('click', function(e){\n\t\tregisterUserEvent(function_name, ActionTypes.ENTER_CHANGE_VAR_VALUE, new_var.name);\n\t\tenableValueUpdate(new_var, this.parentNode, function_name);\n\t});\n\n\t$( ret ).find( \".boolean_vector_var\" ).on('click', function(e){\n\t\talternateBooleanVectorValue(new_var, $(this).data('index'), this.parentNode);\n\t\tregisterUserEvent(function_name, ActionTypes.CHANGE_VAR_VALUE, new_var.name,\n\t\t\tnew_var.value);\n\t});\n\t$( ret ).find( \".vector_var\" ).on('click', function(e){\n\t\tenableVectorValueUpdate(new_var, $(this).data('index'), this.parentNode, function_name);\n\t});\n\t$( ret ).find( \".remove_global_vector_column\" ).on('click', function(e){\n\t\tremoveColumnVector(new_var);\n\t\tregisterUserEvent(function_name, ActionTypes.CHANGE_VAR_TYPE, new_var.name,\n\t\t\tnew_var.type, new_var.dimensions, new_var.rows, new_var.columns);\n\t\tregisterSystemEvent(function_name, ActionTypes.CHANGE_VAR_VALUE, new_var.name,\n\t\t\tnew_var.value);\n\t\t$( variable_container ).find( \".div_valor_var\" ).html('');\n\t\trenderValues(new_var, variable_container, function_name);\n\t});\n\t$( ret ).find( \".add_global_vector_column\" ).on('click', function(e){\n\t\taddColumnVector(new_var);\n\t\tregisterUserEvent(function_name, ActionTypes.CHANGE_VAR_TYPE, new_var.name,\n\t\t\tnew_var.type, new_var.dimensions, new_var.rows, new_var.columns);\n\t\tregisterSystemEvent(function_name, ActionTypes.CHANGE_VAR_VALUE, new_var.name,\n\t\t\tnew_var.value);\n\t\t$( variable_container ).find( \".div_valor_var\" ).html('');\n\t\trenderValues(new_var, variable_container, function_name);\n\t});\n\t$( ret ).find( \".remove_global_matrix_column\" ).on('click', function(e){\n\t\tremoveColumnMatrix(new_var);\n\t\tregisterUserEvent(function_name, ActionTypes.CHANGE_VAR_TYPE, new_var.name,\n\t\t\tnew_var.type, new_var.dimensions, new_var.rows, new_var.columns);\n\t\tregisterSystemEvent(function_name, ActionTypes.CHANGE_VAR_VALUE, new_var.name,\n\t\t\tnew_var.value);\n\t\t$( variable_container ).find( \".div_valor_var\" ).html('');\n\t\trenderValues(new_var, variable_container, function_name);\n\t});\n\t$( ret ).find( \".add_global_matrix_column\" ).on('click', function(e){\n\t\taddColumnMatrix(new_var);\n\t\tregisterUserEvent(function_name, ActionTypes.CHANGE_VAR_TYPE, new_var.name,\n\t\t\tnew_var.type, new_var.dimensions, new_var.rows, new_var.columns);\n\t\tregisterSystemEvent(function_name, ActionTypes.CHANGE_VAR_VALUE, new_var.name,\n\t\t\tnew_var.value);\n\t\t$( variable_container ).find( \".div_valor_var\" ).html('');\n\t\trenderValues(new_var, variable_container, function_name);\n\t});\n\t$( ret ).find( \".remove_global_matrix_line\" ).on('click', function(e){\n\t\tremoveLineMatrix(new_var);\n\t\tregisterUserEvent(function_name, ActionTypes.CHANGE_VAR_TYPE, new_var.name,\n\t\t\tnew_var.type, new_var.dimensions, new_var.rows, new_var.columns);\n\t\tregisterSystemEvent(function_name, ActionTypes.CHANGE_VAR_VALUE, new_var.name,\n\t\t\tnew_var.value);\n\t\t$( variable_container ).find( \".div_valor_var\" ).html('');\n\t\trenderValues(new_var, variable_container, function_name);\n\t});\n\t$( ret ).find( \".add_global_matrix_line\" ).on('click', function(e){\n\t\taddLineMatrix(new_var);\n\t\tregisterUserEvent(function_name, ActionTypes.CHANGE_VAR_TYPE, new_var.name,\n\t\t\tnew_var.type, new_var.dimensions, new_var.rows, new_var.columns);\n\t\tregisterSystemEvent(function_name, ActionTypes.CHANGE_VAR_VALUE, new_var.name,\n\t\t\tnew_var.value);\n\t\t$( variable_container ).find( \".div_valor_var\" ).html('');\n\t\trenderValues(new_var, variable_container, function_name);\n\t});\n\t$( ret ).find( \".boolean_matrix_var\" ).on('click', function(e){\n\t\talternateBooleanMatrixValue(new_var, $(this).data('row'), $(this).data('index'), this.parentNode);\n\t\tregisterUserEvent(function_name, ActionTypes.CHANGE_VAR_VALUE, new_var.name,\n\t\t\tnew_var.value);\n\t});\n\t$( ret ).find( \".matrix_var\" ).on('click', function(e){\n\t\tregisterUserEvent(function_name, ActionTypes.ENTER_CHANGE_VAR_VALUE, new_var.name);\n\t\tenableMatrixValueUpdate(new_var, $(this).data('row'), $(this).data('index'), this.parentNode, function_name);\n\t});\n\t$( variable_container ).find( \".div_valor_var\" ).append(ret);\n\n\tupdateColumnsAndRowsText(variable_container, new_var);\n\n}\n\nfunction alternateBooleanMatrixValue (var_obj, row, index, value_container) {\n\tvar_obj.value[row][index] = !var_obj.value[row][index];\n\t$(value_container).find('.span_value_variable').text(LocalizedStrings.getUI(`logic_value_${var_obj.value[row][index]}`));\n}\n\nfunction addLineMatrix (var_obj) {\n\tvar_obj.rows ++;\n\n\tif (var_obj.type == Types.INTEGER) {\n\t\tvar n_l = [];\n\t\tfor (var i = 0; i < var_obj.columns; i++) {\n\t\t\tn_l.push(0);\n\t\t}\n\t\tvar_obj.value.push(n_l);\n\t}\n\tif (var_obj.type == Types.REAL) {\n\t\tvar n_l = [];\n\t\tfor (i = 0; i < var_obj.columns; i++) {\n\t\t\tn_l.push(0.0);\n\t\t}\n\t\tvar_obj.value.push(n_l);\n\t}\n\n\tif (var_obj.type == Types.TEXT) {\n\t\tvar n_l = [];\n\t\tfor (i = 0; i < var_obj.columns; i++) {\n\t\t\tn_l.push(LocalizedStrings.getUI('textvar_default_value'));\n\t\t}\n\t\tvar_obj.value.push(n_l);\n\t}\n\n\tif (var_obj.type == Types.BOOLEAN) {\n\t\tvar n_l = [];\n\t\tfor (i = 0; i < var_obj.columns; i++) {\n\t\t\tn_l.push(true);\n\t\t}\n\t\tvar_obj.value.push(n_l);\n\t}\n}\n\nfunction removeLineMatrix (var_obj) {\n\tif (var_obj.rows == 0) {\n\t\treturn;\n\t}\n\n\tvar_obj.rows --;\n\tvar_obj.value.splice(var_obj.value.length - 1, 1);\n}\n\nfunction addColumnMatrix (var_obj) {\n\tvar_obj.columns ++;\n\n\tif (var_obj.type == Types.INTEGER) {\n\t\tfor (var i = 0; i < var_obj.rows; i++) {\n\t\t\tvar_obj.value[i].push(0);\n\t\t}\n\t}\n\tif (var_obj.type == Types.REAL) {\n\t\tfor (var i = 0; i < var_obj.rows; i++) {\n\t\t\tvar_obj.value[i].push(0.0);\n\t\t}\n\t}\n\tif (var_obj.type == Types.TEXT) {\n\t\tfor (var i = 0; i < var_obj.rows; i++) {\n\t\t\tvar_obj.value[i].push(LocalizedStrings.getUI('textvar_default_value'));\n\t\t}\n\t}\n\tif (var_obj.type == Types.BOOLEAN) {\n\t\tfor (var i = 0; i < var_obj.rows; i++) {\n\t\t\tvar_obj.value[i].push(true);\n\t\t}\n\t}\n}\n\nfunction removeColumnMatrix (var_obj) {\n\tif (var_obj.columns == 0) {\n\t\treturn;\n\t}\n\n\tvar_obj.columns --;\n\n\tfor (var i = 0; i < var_obj.rows; i++) {\n\t\tvar_obj.value[i].splice(var_obj.value[i].length - 1, 1);\n\t}\n}\n\nfunction addColumnVector (var_obj) {\n\tvar_obj.columns ++;\n\n\tif (var_obj.type == Types.INTEGER) {\n\t\tvar_obj.value.push(0);\n\t}\n\tif (var_obj.type == Types.REAL) {\n\t\tvar_obj.value.push(0.0);\n\t}\n\tif (var_obj.type == Types.TEXT) {\n\t\tvar_obj.value.push(LocalizedStrings.getUI('textvar_default_value'));\n\t}\n\tif (var_obj.type == Types.BOOLEAN) {\n\t\tvar_obj.value.push(true);\n\t}\n}\n\nfunction removeColumnVector (var_obj) {\n\tif (var_obj.columns == 0) {\n\t\treturn;\n\t}\n\n\tvar_obj.columns --;\n\tvar_obj.value.splice(var_obj.value.length - 1, 1);\n}\n\nfunction alternateBooleanValue (var_obj, value_container) {\n\tvar_obj.value = !var_obj.value;\n\t$(value_container).find('.span_value_variable').text(LocalizedStrings.getUI(`logic_value_${var_obj.value}`));\n}\n\nfunction alternateBooleanVectorValue (var_obj, index, value_container) {\n\tvar_obj.value[index] = !var_obj.value[index];\n\t$(value_container).find('.span_value_variable').text(LocalizedStrings.getUI(`logic_value_${var_obj.value[index]}`));\n}\n\nfunction updateInitialValues (variable_obj, function_name) {\n\tif (variable_obj.type == Types.INTEGER) {\n\t\tif (variable_obj.dimensions == 0) {\n\t\t\tvariable_obj.value = 0;\n\t\t}\n\t\tif (variable_obj.dimensions == 1) {\n\t\t\tvariable_obj.value = [0, 0];\n\t\t}\n\t\tif (variable_obj.dimensions == 2) {\n\t\t\tvariable_obj.value = [[0, 0], [0, 0]];\n\t\t}\n\t}\n\n\tif (variable_obj.type == Types.REAL) {\n\t\tif (variable_obj.dimensions == 0) {\n\t\t\tvariable_obj.value = 0.0;\n\t\t}\n\t\tif (variable_obj.dimensions == 1) {\n\t\t\tvariable_obj.value = [0.0, 0.0];\n\t\t}\n\t\tif (variable_obj.dimensions == 2) {\n\t\t\tvariable_obj.value = [[0.0, 0.0], [0.0, 0.0]];\n\t\t}\n\t}\n\n\tif (variable_obj.type == Types.TEXT) {\n\t\tif (variable_obj.dimensions == 0) {\n\t\t\tvariable_obj.value = LocalizedStrings.getUI('textvar_default_value');\n\t\t}\n\t\tif (variable_obj.dimensions == 1) {\n\t\t\tvariable_obj.value = [LocalizedStrings.getUI('textvar_default_value'), LocalizedStrings.getUI('textvar_default_value')];\n\t\t}\n\t\tif (variable_obj.dimensions == 2) {\n\t\t\tvariable_obj.value = [[LocalizedStrings.getUI('textvar_default_value'), LocalizedStrings.getUI('textvar_default_value')], \n\t\t\t\t\t\t\t\t\t[LocalizedStrings.getUI('textvar_default_value'), LocalizedStrings.getUI('textvar_default_value')]];\n\t\t}\n\t}\n\n\tif (variable_obj.type == Types.BOOLEAN) {\n\t\tif (variable_obj.dimensions == 0) {\n\t\t\tvariable_obj.value = true;\n\t\t}\n\t\tif (variable_obj.dimensions == 1) {\n\t\t\tvariable_obj.value = [true, true];\n\t\t}\n\t\tif (variable_obj.dimensions == 2) {\n\t\t\tvariable_obj.value = [[true, true], [true, true]];\n\t\t}\n\t}\n\tregisterSystemEvent(function_name, ActionTypes.CHANGE_VAR_VALUE, variable_obj.name, variable_obj.value);\n}\n\nvar opened_name_value_vector_global_ = false;\nvar opened_input_value_vector_global_ = null;\nfunction enableVectorValueUpdate (var_obj, index, parent_node, function_name) {\n\tif (opened_name_value_vector_global_) {\n\t\topened_input_value_vector_global_.focus();\n\t\treturn;\n\t}\n\tparent_node = $(parent_node);\n\topened_name_value_vector_global_ = true;\n\n\tparent_node.find('.span_value_variable').text('');\n\n\tvar input_field;\n\n\tif (var_obj.type == Types.REAL) {\n\t\tinput_field = $( \"\" );\n\t\tinput_field.insertBefore(parent_node.find('.span_value_variable'));\n\t} else {\n\t\tinput_field = $( \"\" );\n\t\tinput_field.insertBefore(parent_node.find('.span_value_variable'));\n\t}\n\n\tinput_field.on('input', function() {\n\t var inputWidth = input_field.textWidth()+10;\n\t opened_input_value_vector_global_ = input_field;\n\t input_field.focus();\n\n\t var tmpStr = input_field.val();\n\t\tinput_field.val('');\n\t\tinput_field.val(tmpStr);\n\n\t input_field.css({\n\t width: inputWidth\n\t })\n\t}).trigger('input');\n\n\tinput_field.focusout(function() {\n\t\tlet changed = false;\n\t\t/// update array:\n\t\tif (input_field.val().trim()) {\n\t\t\tif (var_obj.type == Types.REAL) {\n\t\t\t\tvar_obj.value[index] = parseFloat(input_field.val().trim());\n\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[index].toFixed(1));\n\t\t\t} else {\n\n\t\t\t\tif (var_obj.type == Types.INTEGER) {\n\t\t\t\t\tvar_obj.value[index] = parseInt(input_field.val().trim());\n\t\t\t\t} else {\n\t\t\t\t\tvar_obj.value[index] = input_field.val().trim();\n\t\t\t\t}\n\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[index]);\n\n\t\t\t}\n\t\t\tchanged = true;\n\t\t} else {\n\t\t\tif (var_obj.type == Types.REAL) {\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[index].toFixed(1));\n\t\t\t} else {\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[index]);\n\t\t\t}\n\t\t}\n\t\tif (var_obj.type == Types.TEXT) {\n\t\t\tvar_obj.value[index] = input_field.val();\n\t\t\tchanged = true;\n\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[index]);\n\t\t}\n\t\tif (changed) {\n\t\t\tregisterUserEvent(function_name, ActionTypes.CHANGE_VAR_VALUE, var_obj.name,\n\t\t\t\tvar_obj.value);\n\t\t}\n\t\tinput_field.off();\n\t\tinput_field.remove();\n\n\t\t/// update elements:\n\t\topened_name_value_vector_global_ = false;\n\t\topened_input_value_vector_global_ = false;\n\t});\n\n\tinput_field.on('keydown', function(e) {\n\t\tconst code = e.keyCode || e.which;\n\t\tlet changed = false;\n\t\tif(code == 13) {\n\t\t\tif (input_field.val().trim()) {\n\t\t\t\tif (var_obj.type == Types.REAL) {\n\t\t\t\t\tvar_obj.value[index] = parseFloat(input_field.val().trim());\n\n\t\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[index].toFixed(1));\n\t\t\t\t} else {\n\n\t\t\t\t\tif (var_obj.type == Types.INTEGER) {\n\t\t\t\t\t\tvar_obj.value[index] = parseInt(input_field.val().trim());\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvar_obj.value[index] = input_field.val().trim();\n\t\t\t\t\t}\n\n\t\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[index]);\n\n\t\t\t\t}\n\t\t\t\tchanged = true;\n\t\t\t} else {\n\t\t\t\tif (var_obj.type == Types.REAL) {\n\t\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[index].toFixed(1));\n\t\t\t\t} else {\n\t\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[index]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (var_obj.type == Types.TEXT) {\n\t\t\t\tvar_obj.value[index] = input_field.val();\n\t\t\t\tchanged = true;\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[index]);\n\t\t\t}\n\t\t\tif (changed) {\n\t\t\t\tregisterUserEvent(function_name, ActionTypes.CHANGE_VAR_VALUE, var_obj.name,\n\t\t\t\t\tvar_obj.value);\n\t\t\t}\n\t\t\tinput_field.off();\n\t\t\tinput_field.remove();\n\n\t\t\t/// update elements:\n\t\t\topened_name_value_vector_global_ = false;\n\t\t\topened_input_value_vector_global_ = false;\n\t\t}\n\t\tif(code == 27) {\n\t\t\tif (var_obj.type == Types.REAL) {\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[index].toFixed(1));\n\t\t\t} else {\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[index]);\n\t\t\t}\n\t\t\tinput_field.off();\n\t\t\tinput_field.remove();\n\n\t\t\t/// update elements:\n\t\t\topened_name_value_vector_global_ = false;\n\t\t\topened_input_value_vector_global_ = false;\n\t\t}\n\t});\n\n\tinput_field.select();\n}\n\nvar opened_name_value_global_var = false;\nvar opened_input_value_global_ar = null;\nfunction enableValueUpdate (var_obj, parent_node, function_name) {\n\tif (opened_name_value_global_var) {\n\t\topened_input_value_global_ar.focus();\n\t\treturn;\n\t}\n\tparent_node = $(parent_node);\n\topened_name_value_global_var = true;\n\n\tvar input_field;\n\n\tparent_node.find('.span_value_variable').text('');\n\tif (var_obj.type == Types.REAL) {\n\t\tinput_field = $( \"\" );\n\t\tinput_field.insertBefore(parent_node.find('.span_value_variable'));\n\t} else {\n\t\tinput_field = $( \"\" );\n\t\tinput_field.insertBefore(parent_node.find('.span_value_variable'));\n\t}\n\n\tinput_field.on('input', function() {\n\t var inputWidth = input_field.textWidth()+10;\n\t opened_input_value_global_ar = input_field;\n\t input_field.focus();\n\n\t var tmpStr = input_field.val();\n\t\tinput_field.val('');\n\t\tinput_field.val(tmpStr);\n\n\t input_field.css({\n\t width: inputWidth\n\t })\n\t}).trigger('input');\n\n\tinput_field.focusout(function() {\n\t\t/// update array:\n\t\tlet changed = false;\n\t\tif (input_field.val().trim()) {\n\t\t\tif (var_obj.type == Types.REAL) {\n\t\t\t\tvar_obj.value = parseFloat(input_field.val().trim());\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value.toFixed(1));\n\t\t\t} else{\n\t\t\t\tif (var_obj.type == Types.INTEGER) {\n\t\t\t\t\tvar_obj.value = parseInt(input_field.val().trim());\n\t\t\t\t} else {\n\t\t\t\t\tvar_obj.value = input_field.val().trim();\n\t\t\t\t}\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value);\n\t\t\t\t\n\t\t\t}\n\t\t\tchanged = true;\n\t\t} else {\n\t\t\tif (var_obj.type == Types.REAL) {\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value.toFixed(1));\n\t\t\t} else {\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value);\n\t\t\t}\n\t\t}\n\t\tif (var_obj.type == Types.TEXT) {\n\t\t\tvar_obj.value = input_field.val();\n\t\t\tchanged = true;\n\t\t\tparent_node.find('.span_value_variable').text(var_obj.value);\n\t\t}\n\t\tif (changed) {\n\t\t\tregisterUserEvent(function_name, ActionTypes.CHANGE_VAR_VALUE, var_obj.name,\n\t\t\t\tvar_obj.value);\n\t\t}\n\t\tinput_field.off();\n\t\tinput_field.remove();\n\n\t\t/// update elements:\n\t\topened_name_value_global_var = false;\n\t\topened_input_value_global_ar = false;\n\n\t});\n\n\tinput_field.on('keydown', function(e) {\n\t\tconst code = e.keyCode || e.which;\n\t\tlet changed = false;\n\t\tif(code == 13) {\n\t\t\tif (input_field.val().trim()) {\n\t\t\t\tif (var_obj.type == Types.REAL) {\n\t\t\t\t\tvar_obj.value = parseFloat(input_field.val().trim());\n\t\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value.toFixed(1));\n\t\t\t\t} else{\n\t\t\t\t\tif (var_obj.type == Types.INTEGER) {\n\t\t\t\t\t\tvar_obj.value = parseInt(input_field.val().trim());\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvar_obj.value = input_field.val().trim();\n\t\t\t\t\t}\n\t\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value);\n\t\t\t\t}\n\t\t\t\tchanged = true;\n\t\t\t} else {\n\t\t\t\tif (var_obj.type == Types.REAL) {\n\t\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value.toFixed(1));\n\t\t\t\t} else {\n\t\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (var_obj.type == Types.TEXT) {\n\t\t\t\tvar_obj.value = input_field.val();\n\t\t\t\tchanged = true;\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value);\n\t\t\t}\n\t\t\tif (changed) {\n\t\t\t\tregisterUserEvent(function_name, ActionTypes.CHANGE_VAR_VALUE, var_obj.name,\n\t\t\t\t\tvar_obj.value);\n\t\t\t}\n\t\t\tinput_field.off();\n\t\t\tinput_field.remove();\n\n\t\t\t/// update elements:\n\t\t\topened_name_value_global_var = false;\n\t\t\topened_input_value_global_ar = false;\n\n\t\t}\n\t\tif(code == 27) {\n\t\t\tif (var_obj.type == Types.REAL) {\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value.toFixed(1));\n\t\t\t} else{\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value);\n\t\t\t}\n\t\t\tinput_field.off();\n\t\t\tinput_field.remove();\n\n\t\t\t/// update elements:\n\t\t\topened_name_value_global_var = false;\n\t\t\topened_input_value_global_ar = false;\n\t\t}\n\t});\n\n\tinput_field.select();\n}\n\nvar opened_name_global = false;\nvar opened_input_global = null;\nfunction enableNameUpdate (variable_obj, variable_container, function_obj) {\n\n\tif (opened_name_global) {\n\t\topened_input_global.focus();\n\t\treturn;\n\t}\n\topened_name_global = true;\n\n\tvariable_container.find('.span_name_variable').text('');\n\n\tvar input_name;\n\n\tinput_name = $( \"\" );\n\tinput_name.insertBefore(variable_container.find('.span_name_variable'));\n\n\tinput_name.on('input', function() {\n\t var inputWidth = input_name.textWidth()+10;\n\t opened_input_global = input_name;\n\t input_name.focus();\t\t\t\t\t\n\n\t var tmpStr = input_name.val();\n\t\tinput_name.val('');\n\t\tinput_name.val(tmpStr);\n\n\t input_name.css({\n\t width: inputWidth\n\t })\n\t}).trigger('input');\n\n\tinput_name.focusout(function() {\n\t\t/// update array:\n\t\tif (input_name.val().trim().length > 0) {\n\t\t\tupdateName(variable_obj, input_name.val().trim(), variable_container, function_obj);\n\t\t\tvariable_container.find('.span_name_variable').text(variable_obj.name);\n\t\t} else {\n\t\t\tvariable_container.find('.span_name_variable').text(variable_obj.name);\n\t\t}\n\t\tinput_name.off();\n\t\tinput_name.remove();\n\n\t\t/// update elements:\n\t\topened_name_global = false;\n\t\topened_input_global = false;\n\t});\n\n\tinput_name.on('keydown', function(e) {\n\t\tvar code = e.keyCode || e.which;\n\t\tif(code == 13) {\n\t\t\tif (input_name.val().trim().length > 0) {\n\t\t\t\tupdateName(variable_obj, input_name.val().trim(), variable_container, function_obj);\n\t\t\t\tvariable_container.find('.span_name_variable').text(variable_obj.name);\n\t\t\t} else {\n\t\t\t\tvariable_container.find('.span_name_variable').text(variable_obj.name);\n\t\t\t}\n\t\t\tinput_name.off();\n\t\t\tinput_name.remove();\n\n\t\t\t/// update elements:\n\t\t\topened_name_global = false;\n\t\t\topened_input_global = false;\n\t\t}\n\t\tif(code == 27) {\n\n\t\t\tvariable_container.find('.span_name_variable').text(variable_obj.name);\n\t\t\tinput_name.off();\n\t\t\tinput_name.remove();\n\n\t\t\t/// update elements:\n\t\t\topened_name_global = false;\n\t\t\topened_input_global = false;\n\t\t}\n\t});\n\n\tinput_name.select();\n\t\n}\n\n\nvar opened_name_value_matrix_global_v = false;\nvar opened_input_value_matrix_global_v = null;\nfunction enableMatrixValueUpdate (var_obj, row, index, parent_node, function_name) {\n\tif (opened_name_value_matrix_global_v) {\n\t\topened_input_value_matrix_global_v.focus();\n\t\treturn;\n\t}\n\tparent_node = $(parent_node);\n\topened_name_value_matrix_global_v = true;\n\n\tparent_node.find('.span_value_variable').text('');\n\n\tvar input_field;\n\n\tif (var_obj.type == Types.REAL) {\n\t\tinput_field = $( \"\" );\n\t\tinput_field.insertBefore(parent_node.find('.span_value_variable'));\n\t} else {\n\t\tinput_field = $( \"\" );\n\t\tinput_field.insertBefore(parent_node.find('.span_value_variable'));\n\t}\n\n\tinput_field.on('input', function() {\n\t var inputWidth = input_field.textWidth()+10;\n\t opened_input_value_matrix_global_v = input_field;\n\t input_field.focus();\n\n\t var tmpStr = input_field.val();\n\t\tinput_field.val('');\n\t\tinput_field.val(tmpStr);\n\n\t input_field.css({\n\t width: inputWidth\n\t })\n\t}).trigger('input');\n\n\tinput_field.focusout(function() {\n\t\tlet changed = false;\n\t\t/// update array:\n\t\tif (input_field.val().trim()) {\n\t\t\tif (var_obj.type == Types.REAL) {\n\t\t\t\tvar_obj.value[row][index] = parseFloat(input_field.val().trim());\n\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[row][index].toFixed(1));\n\t\t\t} else {\t\t\t\t\t\n\t\t\t\tif (var_obj.type == Types.INTEGER) {\n\t\t\t\t\tvar_obj.value[row][index] = parseInt(input_field.val().trim());\n\t\t\t\t} else {\n\t\t\t\t\tvar_obj.value[row][index] = input_field.val().trim();\n\t\t\t\t}\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[row][index]);\n\t\t\t}\n\t\t\tchanged = true;\n\t\t} else {\n\t\t\tif (var_obj.type == Types.REAL) {\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[row][index].toFixed(1));\n\t\t\t} else {\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[row][index]);\n\t\t\t}\n\t\t}\n\t\tif (var_obj.type == Types.TEXT) {\n\t\t\tvar_obj.value[row][index] = input_field.val();\n\t\t\tchanged = true;\n\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[row][index]);\n\t\t}\n\t\tif (changed) {\n\t\t\tregisterUserEvent(function_name, ActionTypes.CHANGE_VAR_VALUE, var_obj.name,\n\t\t\t\tvar_obj.value);\n\t\t}\n\t\tinput_field.off();\n\t\tinput_field.remove();\n\n\t\t/// update elements:\n\t\topened_name_value_matrix_global_v = false;\n\t\topened_input_value_matrix_global_v = false;\n\t});\n\n\tinput_field.on('keydown', function(e) {\n\t\tconst code = e.keyCode || e.which;\n\t\tlet changed = false;\n\t\tif(code == 13) {\n\t\t\tif (input_field.val().trim()) {\n\t\t\t\tif (var_obj.type == Types.REAL) {\n\t\t\t\t\tvar_obj.value[row][index] = parseFloat(input_field.val().trim());\n\n\t\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[row][index].toFixed(1));\n\t\t\t\t} else {\n\t\t\t\t\tif (var_obj.type == Types.INTEGER) {\n\t\t\t\t\t\tvar_obj.value[row][index] = parseInt(input_field.val().trim());\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvar_obj.value[row][index] = input_field.val().trim();\n\t\t\t\t\t}\n\t\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[row][index]);\n\t\t\t\t}\n\t\t\t\tchanged = true;\n\t\t\t} else {\n\t\t\t\tif (var_obj.type == Types.REAL) {\n\t\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[row][index].toFixed(1));\n\t\t\t\t} else {\n\t\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[row][index]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (var_obj.type == Types.TEXT) {\n\t\t\t\tvar_obj.value[row][index] = input_field.val();\n\t\t\t\tchanged = true;\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[row][index]);\n\t\t\t}\n\t\t\tif (changed) {\n\t\t\t\tregisterUserEvent(function_name, ActionTypes.CHANGE_VAR_VALUE, var_obj.name,\n\t\t\t\t\tvar_obj.value);\n\t\t\t}\n\t\t\tinput_field.off();\n\t\t\tinput_field.remove();\n\n\t\t\t/// update elements:\n\t\t\topened_name_value_matrix_global_v = false;\n\t\t\topened_input_value_matrix_global_v = false;\n\t\t}\n\t\tif(code == 27) {\n\t\t\tif (var_obj.type == Types.REAL) {\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[row][index].toFixed(1));\n\t\t\t} else {\n\t\t\t\tparent_node.find('.span_value_variable').text(var_obj.value[row][index]);\n\t\t\t}\n\t\t\tinput_field.off();\n\t\t\tinput_field.remove();\n\n\t\t\t/// update elements:\n\t\t\topened_name_value_matrix_global_v = false;\n\t\t\topened_input_value_matrix_global_v = false;\n\t\t}\n\t});\n\n\tinput_field.select();\n}\n"],"sourceRoot":""}