diff --git a/.gitignore b/.gitignore index ed80f19..59dd37c 100644 --- a/.gitignore +++ b/.gitignore @@ -14,5 +14,5 @@ compiler/src/main/g4/input.txt compiler/src/main/resources/input.txt compiler/stringConstants.txt interpreter/test/main.html -ide/compiler -ide/public/javacripts/reference_ui \ No newline at end of file +ide/npm-debug.log + diff --git a/README.md b/README.md new file mode 100644 index 0000000..5ee4dca --- /dev/null +++ b/README.md @@ -0,0 +1,127 @@ +# MSL, a scripting language for online surveys +MSL is a scripting language to make surveys. Its like php for making web pages. + +This repo contains the code for +`compiler`, `vm`, and a web based `ide`. + +# How to use it? + +To create a basic survey, you can simply input a short simple script like this +![2](https://raw.githubusercontent.com/githubsheng/githubsheng.github.io/master/WSMSL/1.png) + +And you get a working web page like this + +![2](https://raw.githubusercontent.com/githubsheng/githubsheng.github.io/master/WSMSL/2.png) + +But the power of MSL is that you can incorporate very complex business logic into your survey and make the survey adjust itself based on time, location, user's answers, user's behaviors and even other random factors. This is what it looks like when you implant the logic into the survey + +![3](https://raw.githubusercontent.com/githubsheng/githubsheng.github.io/master/WSMSL/3.png) + +You can even define functions and reuse them + +![5](https://raw.githubusercontent.com/githubsheng/githubsheng.github.io/master/WSMSL/5.png) + +This is how it looks, given the above input + +![6](https://raw.githubusercontent.com/githubsheng/githubsheng.github.io/master/WSMSL/6.png) + +MSL is very flexible, not only in terms of business logic, but also appearance. It has many predefined styles which you can easily override. It even allows custom JS plugin. In this following example, we introduced a JS plugin and a custom stylesheet to change the appearance of the survey. You can watch the following link to see how it runs in action: https://www.youtube.com/watch?v=SO2FmCfGekA&t=125s + +Input: + +![7](https://raw.githubusercontent.com/githubsheng/githubsheng.github.io/master/WSMSL/7.png) + +Output: + +![8](https://raw.githubusercontent.com/githubsheng/githubsheng.github.io/master/WSMSL/8.png) + +MSL also features a web based IDE and provides: + +1. Syntax highlight +2. Syntax checking. It gives you compile error message +3. A debugger. You can set break points, pause and inspect the code. +4. A console, which you can use to evaluate expressions. + +To see how the above features in action, checkout the following video links :) + +https://www.youtube.com/watch?v=zXFadtfXpOs + +https://www.youtube.com/watch?v=qYwCDNgTRn4 + +# Project structure +Clone the repository. The repository contains 4 parts: +compiler +interpreter (vm) +reference-ui +ide + +This is the general workflow + +* user writes source code in ide +* compiler turns them into commands, commands reference Java byte code commands +* vm executes those commands, and determins how the first page looks like +* vm describes the looking of first page using json, and send the json to reference-ui +* reference-ui render the first page based on the json +* user answers questions on the first page +* reference-ui returns user's answer back to vm +* vm get the answers, continue executing the commands, and determins how the second page looks like +* vm describes the looking of the second page using json, and send the json to reference-ui +* ...... + +# How to try it +To try this (workflow) by yourself, install Node.js first. This is necessary to run the ide on my PC/Mac. +You can find Node.js here: https://nodejs.org/en/ + +For windows there is a one click installer. For mac i would recommend homebrew. + +Once you have Node installed, you can try `node --version`. + +Now navigate to ide folder in this repo. And type `npm install` This will install all the dependencies needed to run ide. The ide makes use +of compiler and reference-ui. We already have those two compiled and included in ide. + +After `npm install`, type `npm start`, and open your browser and try `localhost:3000`. You should be able to see the ide. For now, there is no +documentation about the code syntax....I will add it later. But I have prepared some sample scripts. You can paste them and click `run` button +in the ide run it. + +# Tips of using IDE +Here are some other tips about using the ide +1. You can click on line number to place breakpoints. But there are some restrictions about where you can place a breakpoints. For instance, it +does not make any sense to place a breakpoint on a [Row]tag, just like you cannot place a breakpoint on an XML. If you place a breakpoint at +a an inappropriate place, the breakpoints will be ingored. + +2. Sometimes you clicked resume debugging, and the scripts is still paused, thats probably because the survey requires you to provide some answer first. +Remember, there are two ways the scripts will stop executing. + a. it hits a breakpoints + b. it renders a page and it needs you to answer the questions on the page + +3. You can evaluate addhoc scripts in the console. In windows, click `Ctrl + Enter` to execute. + +# Sample scripts you can try +OK, thats enough talking, here are the sample scripts: + +* `MSL/ide/test-data/ppt-survey-3` (how you can use some basic logic to hide/show the questions) +* `MSL/ide/test-data/ppt-survey-4` (how to make function calls) +* `MSL/ide/test-data/demo-survey-4` (how to reuse the rows and columns) + +# Sample scripts with plugins +reference-ui adopts an open apis for you to make plugins. You can make plugins for a specific client (to satisfy his special requirements), +or make general purpose plugin (to change background, font size, or add a banner at the top). Here are some scripts that uses plugins + +* `MSL/ide/test-data/demo-survey` (a video plugin, **please wait for a while for the videos to load**. _Click on different options to see how it works_) +* `MSL/ide/test-data/demo-survey-2` (a dedicated plugin made for razer mouse, this customize the entire ui) +* `MSL/ide/test-data/demo-survey-3` (a plugin thats adds support for maps, drap the point to indicate where you take lunch break) + +# Files you might be interested +* `MSL/compiler/src/main/java/DLS/ParseTreeVisitor.java` (no docs though, it converts parse tree into abstract syntax tree) +* `MSL/compiler/src/main/java/DLS/CommandGenerator/Generator.java` (no docs though, generate commands based on abstract syntax tree) +* `MSL/interpreter/src/interpreter.ts` (with extensive comments, it execute the commands) + +# Commonly asked questions +* Q: How come the syntax has this ugly `end` statement everywhere +* A: After talking with some friends in BU, I realize people don't like `{ } && || !`. It scares them. So I use `and or end` instead, at least they read better. + +* Q: Why not an existing language like JS? +* A: Well, thats my first plan as well, but then it is very difficult to ensure security. If you allow people to write JS, two cases can happen: 1. they are experts and they can do very tricky and harmful things, like read the cookie, jump to another page. 2. they are beginners and they make very naive but bad code, like inifinite loops and so on. Also, it is very difficult to add syntax sugar, like `select q1.r1` (to programmatically change user's answer) or `rank r1->r2->r3` (to change the rankings in a ranking questions. Furthermore, it is very difficult to build debuggers. Finally, we don't need to squeeze the last drop of performance like Typescript. But maybe in the future we will build a transcompiler...so that vm is used in dev and if you need a production build, it compiles to JS... + +* Q: Whats next? +* A: So many things requires attention. To name some most important ones: docs, test cases, bug fixes, more features, built in support for multi languages and so on. diff --git a/compiler/src/main/g4/DLSLexer.g4 b/compiler/src/main/g4/DLSLexer.g4 index 785a3f8..91131f9 100644 --- a/compiler/src/main/g4/DLSLexer.g4 +++ b/compiler/src/main/g4/DLSLexer.g4 @@ -26,6 +26,10 @@ PageStart -> pushMode(ScriptMode), pushMode(TagMode) ; +EmptyPageStart +: '[EmptyPage]' +-> pushMode(ScriptMode) +; WS : [ \t\n\r]+ @@ -38,8 +42,6 @@ TagModeWS : WS -> skip; -//todo: should allow undercore between two characters -//todo: for instance: q2.row1_col1.isSelected Name: NameStartChar NameChar*; fragment NameStartChar: [a-zA-Z]; fragment NameChar: [a-zA-Z0-9]; @@ -115,6 +117,8 @@ Close RowStart: '[Row'; ColStart: '[Col'; +RowsStart: '[Rows'; +ColsStart: '[Cols'; mode TextAreaMode; @@ -127,6 +131,12 @@ TextArea: .*? TextAreaEnd { } else if (matched.endsWith("[Col")) { offSet = 4; pushMode(TagMode); + } else if (matched.endsWith("[Rows")) { + offSet = 5; + pushMode(TagMode); + } else if (matched.endsWith("[Cols")) { + offSet = 5; + pushMode(TagMode); } else if(matched.endsWith("[Submit")) { offSet = 7; popMode(); @@ -160,8 +170,10 @@ TextArea: .*? TextAreaEnd { }; TextAreaEnd -: '[Row' -| '[Col' +: RowStart +| ColStart +| RowsStart +| ColsStart | '[Submit' | '${' | SingleChoiceStart @@ -238,6 +250,7 @@ NewLine //built in commands Terminate: 'terminate'; Select: 'select'; +Deselect: 'deselect'; Rank: 'rank'; Print: 'print'; @@ -353,6 +366,11 @@ PageEnd -> popMode ; +EmptyPageEnd +: '[EmptyPageEnd]' +-> popMode +; + mode ScriptTextAreaMode; ScriptTextArea: ~[\r\n]+? ScriptTextAreaEnd { diff --git a/compiler/src/main/g4/DLSLexer.tokens b/compiler/src/main/g4/DLSLexer.tokens index 43415f6..11fda28 100644 --- a/compiler/src/main/g4/DLSLexer.tokens +++ b/compiler/src/main/g4/DLSLexer.tokens @@ -5,127 +5,137 @@ ImportUrl=4 PageGroupStart=5 PageGroupEnd=6 PageStart=7 -WS=8 -TagModeWS=9 -Name=10 -String=11 -BindingOpen=12 -AttributeAssign=13 -Close=14 -RowStart=15 -ColStart=16 -TextArea=17 -TextAreaEnd=18 -SubmitButton=19 -ScriptModeWS=20 -If=21 -Then=22 -Else=23 -End=24 -Def=25 -Global=26 -Each=27 -Chance=28 -Colon=29 -Percentage=30 -Func=31 -Return=32 -LeftParen=33 -RightParen=34 -LeftBracket=35 -RightBracket=36 -Comma=37 -Dot=38 -ScriptModeRowStart=39 -ScriptModeColStart=40 -ScriptModeInLineTagClose=41 -NewLine=42 -Terminate=43 -Select=44 -Rank=45 -Print=46 -Assign=47 -Not=48 -Plus=49 -Minus=50 -Multiply=51 -Divide=52 -Modulus=53 -LessThan=54 -MoreThan=55 -LessThanEquals=56 -MoreThanEquals=57 -Equals=58 -NotEquals=59 -And=60 -Or=61 -RankOrder=62 -DecimalLiteral=63 -Seconds=64 -Minutes=65 -Hours=66 -ClockUnit=67 -BooleanLiteral=68 -StringLiteral=69 -Clock=70 -Identifier=71 -TextInjectionStart=72 -BindingClose=73 -SingleChoiceStart=74 -MultipleChoiceStart=75 -SingleChoiceMatrixStart=76 -MultipleChoiceMatrixStart=77 -EmptyQuestionStart=78 -ScriptPageStart=79 -PageEnd=80 -ScriptTextArea=81 -ScriptTextAreaEnd=82 +EmptyPageStart=8 +WS=9 +TagModeWS=10 +Name=11 +String=12 +BindingOpen=13 +AttributeAssign=14 +Close=15 +RowStart=16 +ColStart=17 +RowsStart=18 +ColsStart=19 +TextArea=20 +TextAreaEnd=21 +SubmitButton=22 +ScriptModeWS=23 +If=24 +Then=25 +Else=26 +End=27 +Def=28 +Global=29 +Each=30 +Chance=31 +Colon=32 +Percentage=33 +Func=34 +Return=35 +LeftParen=36 +RightParen=37 +LeftBracket=38 +RightBracket=39 +Comma=40 +Dot=41 +ScriptModeRowStart=42 +ScriptModeColStart=43 +ScriptModeInLineTagClose=44 +NewLine=45 +Terminate=46 +Select=47 +Deselect=48 +Rank=49 +Print=50 +Assign=51 +Not=52 +Plus=53 +Minus=54 +Multiply=55 +Divide=56 +Modulus=57 +LessThan=58 +MoreThan=59 +LessThanEquals=60 +MoreThanEquals=61 +Equals=62 +NotEquals=63 +And=64 +Or=65 +RankOrder=66 +DecimalLiteral=67 +Seconds=68 +Minutes=69 +Hours=70 +ClockUnit=71 +BooleanLiteral=72 +StringLiteral=73 +Clock=74 +Identifier=75 +TextInjectionStart=76 +BindingClose=77 +SingleChoiceStart=78 +MultipleChoiceStart=79 +SingleChoiceMatrixStart=80 +MultipleChoiceMatrixStart=81 +EmptyQuestionStart=82 +ScriptPageStart=83 +PageEnd=84 +EmptyPageEnd=85 +ScriptTextArea=86 +ScriptTextAreaEnd=87 '###temp'=1 'JS'=2 'CSS'=3 '[PageGroupEnd]'=6 -'{'=12 -'[Row'=15 -'[Col'=16 -'[Submit]'=19 -'if'=21 -'then'=22 -'else'=23 -'end'=24 -'def'=25 -'global'=26 -'each'=27 -'chance'=28 -':'=29 -'function'=31 -'return'=32 -'('=33 -')'=34 -'['=35 -','=37 -'.'=38 -'[End]'=41 -'terminate'=43 -'select'=44 -'rank'=45 -'print'=46 -'!'=48 -'+'=49 -'-'=50 -'*'=51 -'/'=52 -'%'=53 -'<'=54 -'>'=55 -'<='=56 -'>='=57 -'=='=58 -'!='=59 -'and'=60 -'or'=61 -'->'=62 -'clock'=70 -'${'=72 -'}'=73 -'[Page'=79 -'[PageEnd]'=80 +'[EmptyPage]'=8 +'{'=13 +'[Row'=16 +'[Col'=17 +'[Rows'=18 +'[Cols'=19 +'[Submit]'=22 +'if'=24 +'then'=25 +'else'=26 +'end'=27 +'def'=28 +'global'=29 +'each'=30 +'chance'=31 +':'=32 +'function'=34 +'return'=35 +'('=36 +')'=37 +'['=38 +','=40 +'.'=41 +'[End]'=44 +'terminate'=46 +'select'=47 +'deselect'=48 +'rank'=49 +'print'=50 +'!'=52 +'+'=53 +'-'=54 +'*'=55 +'/'=56 +'%'=57 +'<'=58 +'>'=59 +'<='=60 +'>='=61 +'=='=62 +'!='=63 +'and'=64 +'or'=65 +'->'=66 +'clock'=74 +'${'=76 +'}'=77 +'[Page'=83 +'[PageEnd]'=84 +'[EmptyPageEnd]'=85 diff --git a/compiler/src/main/g4/DLSParser.g4 b/compiler/src/main/g4/DLSParser.g4 index 511c72a..610b687 100644 --- a/compiler/src/main/g4/DLSParser.g4 +++ b/compiler/src/main/g4/DLSParser.g4 @@ -14,13 +14,13 @@ element | pageGroup ; -//todo: allow script to be inside page group pageGroup : PageGroupStart attributes Close script page+ PageGroupEnd ; page : (PageStart|ScriptPageStart) attributes Close script question+ SubmitButton script PageEnd +| EmptyPageStart script EmptyPageEnd ; attributes @@ -126,6 +126,7 @@ possibility: Percentage Colon NewLine? statements; builtInCommandStatement : Terminate #TerminateCommand | Select expression #SelectCommand +| Deselect expression #DeselectCommand | Rank rankOrders #RankCommand | Print expression #PrintCommand ; @@ -178,10 +179,12 @@ emptyQuestion row : RowStart attributes Close textArea +| RowsStart attributes Close textArea //here textArea following [Rows] or [Cols] is used to match the line breaks. we will ignore the text area later when we walk the parse tree. ; col : ColStart attributes Close textArea +| ColsStart attributes Close textArea ; textArea: (TextArea | ('${' expression '}'))+; \ No newline at end of file diff --git a/compiler/src/main/g4/DLSParser.tokens b/compiler/src/main/g4/DLSParser.tokens index 43415f6..11fda28 100644 --- a/compiler/src/main/g4/DLSParser.tokens +++ b/compiler/src/main/g4/DLSParser.tokens @@ -5,127 +5,137 @@ ImportUrl=4 PageGroupStart=5 PageGroupEnd=6 PageStart=7 -WS=8 -TagModeWS=9 -Name=10 -String=11 -BindingOpen=12 -AttributeAssign=13 -Close=14 -RowStart=15 -ColStart=16 -TextArea=17 -TextAreaEnd=18 -SubmitButton=19 -ScriptModeWS=20 -If=21 -Then=22 -Else=23 -End=24 -Def=25 -Global=26 -Each=27 -Chance=28 -Colon=29 -Percentage=30 -Func=31 -Return=32 -LeftParen=33 -RightParen=34 -LeftBracket=35 -RightBracket=36 -Comma=37 -Dot=38 -ScriptModeRowStart=39 -ScriptModeColStart=40 -ScriptModeInLineTagClose=41 -NewLine=42 -Terminate=43 -Select=44 -Rank=45 -Print=46 -Assign=47 -Not=48 -Plus=49 -Minus=50 -Multiply=51 -Divide=52 -Modulus=53 -LessThan=54 -MoreThan=55 -LessThanEquals=56 -MoreThanEquals=57 -Equals=58 -NotEquals=59 -And=60 -Or=61 -RankOrder=62 -DecimalLiteral=63 -Seconds=64 -Minutes=65 -Hours=66 -ClockUnit=67 -BooleanLiteral=68 -StringLiteral=69 -Clock=70 -Identifier=71 -TextInjectionStart=72 -BindingClose=73 -SingleChoiceStart=74 -MultipleChoiceStart=75 -SingleChoiceMatrixStart=76 -MultipleChoiceMatrixStart=77 -EmptyQuestionStart=78 -ScriptPageStart=79 -PageEnd=80 -ScriptTextArea=81 -ScriptTextAreaEnd=82 +EmptyPageStart=8 +WS=9 +TagModeWS=10 +Name=11 +String=12 +BindingOpen=13 +AttributeAssign=14 +Close=15 +RowStart=16 +ColStart=17 +RowsStart=18 +ColsStart=19 +TextArea=20 +TextAreaEnd=21 +SubmitButton=22 +ScriptModeWS=23 +If=24 +Then=25 +Else=26 +End=27 +Def=28 +Global=29 +Each=30 +Chance=31 +Colon=32 +Percentage=33 +Func=34 +Return=35 +LeftParen=36 +RightParen=37 +LeftBracket=38 +RightBracket=39 +Comma=40 +Dot=41 +ScriptModeRowStart=42 +ScriptModeColStart=43 +ScriptModeInLineTagClose=44 +NewLine=45 +Terminate=46 +Select=47 +Deselect=48 +Rank=49 +Print=50 +Assign=51 +Not=52 +Plus=53 +Minus=54 +Multiply=55 +Divide=56 +Modulus=57 +LessThan=58 +MoreThan=59 +LessThanEquals=60 +MoreThanEquals=61 +Equals=62 +NotEquals=63 +And=64 +Or=65 +RankOrder=66 +DecimalLiteral=67 +Seconds=68 +Minutes=69 +Hours=70 +ClockUnit=71 +BooleanLiteral=72 +StringLiteral=73 +Clock=74 +Identifier=75 +TextInjectionStart=76 +BindingClose=77 +SingleChoiceStart=78 +MultipleChoiceStart=79 +SingleChoiceMatrixStart=80 +MultipleChoiceMatrixStart=81 +EmptyQuestionStart=82 +ScriptPageStart=83 +PageEnd=84 +EmptyPageEnd=85 +ScriptTextArea=86 +ScriptTextAreaEnd=87 '###temp'=1 'JS'=2 'CSS'=3 '[PageGroupEnd]'=6 -'{'=12 -'[Row'=15 -'[Col'=16 -'[Submit]'=19 -'if'=21 -'then'=22 -'else'=23 -'end'=24 -'def'=25 -'global'=26 -'each'=27 -'chance'=28 -':'=29 -'function'=31 -'return'=32 -'('=33 -')'=34 -'['=35 -','=37 -'.'=38 -'[End]'=41 -'terminate'=43 -'select'=44 -'rank'=45 -'print'=46 -'!'=48 -'+'=49 -'-'=50 -'*'=51 -'/'=52 -'%'=53 -'<'=54 -'>'=55 -'<='=56 -'>='=57 -'=='=58 -'!='=59 -'and'=60 -'or'=61 -'->'=62 -'clock'=70 -'${'=72 -'}'=73 -'[Page'=79 -'[PageEnd]'=80 +'[EmptyPage]'=8 +'{'=13 +'[Row'=16 +'[Col'=17 +'[Rows'=18 +'[Cols'=19 +'[Submit]'=22 +'if'=24 +'then'=25 +'else'=26 +'end'=27 +'def'=28 +'global'=29 +'each'=30 +'chance'=31 +':'=32 +'function'=34 +'return'=35 +'('=36 +')'=37 +'['=38 +','=40 +'.'=41 +'[End]'=44 +'terminate'=46 +'select'=47 +'deselect'=48 +'rank'=49 +'print'=50 +'!'=52 +'+'=53 +'-'=54 +'*'=55 +'/'=56 +'%'=57 +'<'=58 +'>'=59 +'<='=60 +'>='=61 +'=='=62 +'!='=63 +'and'=64 +'or'=65 +'->'=66 +'clock'=74 +'${'=76 +'}'=77 +'[Page'=83 +'[PageEnd]'=84 +'[EmptyPageEnd]'=85 diff --git a/compiler/src/main/g4/win_compile.bat b/compiler/src/main/g4/win_compile.bat index 519faae..5d89381 100644 --- a/compiler/src/main/g4/win_compile.bat +++ b/compiler/src/main/g4/win_compile.bat @@ -13,4 +13,5 @@ cp ../java/DLS/generated/*.tokens . javac ../java/DLS/generated/*.java rem classpath is set in system environments in control panel -rem java org.antlr.v4.gui.TestRig DLS.generated.DLS file -gui input.txt \ No newline at end of file +java org.antlr.v4.gui.TestRig DLS.generated.DLS file -gui input.txt +rem java org.antlr.v4.gui.TestRig DLS.generated.DLSLexer tokens -tokens input.txt \ No newline at end of file diff --git a/compiler/src/main/java/DLS/ASTNodes/enums/attributes/ColAttributes.java b/compiler/src/main/java/DLS/ASTNodes/enums/attributes/ColAttributes.java index 5586095..72f10df 100644 --- a/compiler/src/main/java/DLS/ASTNodes/enums/attributes/ColAttributes.java +++ b/compiler/src/main/java/DLS/ASTNodes/enums/attributes/ColAttributes.java @@ -2,7 +2,7 @@ public enum ColAttributes { - ID("id"), HIDE("hide"), FIXED("fixed"), XOR("xor"), TEXTBOX("textbox"); + ID("id"), HIDE("hide"), FIXED("fixed"), XOR("xor"), TEXTBOX("textbox"), USE("use"); private String name; ColAttributes(String name) { diff --git a/compiler/src/main/java/DLS/ASTNodes/enums/attributes/PageAttributes.java b/compiler/src/main/java/DLS/ASTNodes/enums/attributes/PageAttributes.java index 5aeb709..f53a9e7 100644 --- a/compiler/src/main/java/DLS/ASTNodes/enums/attributes/PageAttributes.java +++ b/compiler/src/main/java/DLS/ASTNodes/enums/attributes/PageAttributes.java @@ -2,7 +2,7 @@ public enum PageAttributes { - ID("id"), HIDE("hide"), RANDOMIZE("randomize"), ROTATE("rotate"); + ID("id"), HIDE("hide"), SHOW("show"), RANDOMIZE("randomize"), ROTATE("rotate"); private final String name; private final String attribIdentifierName; diff --git a/compiler/src/main/java/DLS/ASTNodes/enums/attributes/PageGroupAttribute.java b/compiler/src/main/java/DLS/ASTNodes/enums/attributes/PageGroupAttribute.java index 5931bd6..6efb5cf 100644 --- a/compiler/src/main/java/DLS/ASTNodes/enums/attributes/PageGroupAttribute.java +++ b/compiler/src/main/java/DLS/ASTNodes/enums/attributes/PageGroupAttribute.java @@ -2,7 +2,7 @@ //todo: come up with all attributes public enum PageGroupAttribute { - RANDOMIZE("randomize"), ROTATE("rotate"); + RANDOMIZE("randomize"), ROTATE("rotate"), SHOW("show"), HIDE("hide"); private final String name; private final String attribIdentifierName; diff --git a/compiler/src/main/java/DLS/ASTNodes/enums/attributes/RowAttributes.java b/compiler/src/main/java/DLS/ASTNodes/enums/attributes/RowAttributes.java index b444c82..e9433d6 100644 --- a/compiler/src/main/java/DLS/ASTNodes/enums/attributes/RowAttributes.java +++ b/compiler/src/main/java/DLS/ASTNodes/enums/attributes/RowAttributes.java @@ -2,7 +2,7 @@ public enum RowAttributes { - ID("id"), HIDE("hide"), FIXED("fixed"), XOR("xor"), TEXTBOX("textbox"); + ID("id"), HIDE("hide"), FIXED("fixed"), XOR("xor"), TEXTBOX("textbox"), USE("use"); private String name; RowAttributes(String name) { diff --git a/compiler/src/main/java/DLS/ASTNodes/enums/obj/props/OptionProps.java b/compiler/src/main/java/DLS/ASTNodes/enums/obj/props/OptionProps.java index df64386..cf78e34 100644 --- a/compiler/src/main/java/DLS/ASTNodes/enums/obj/props/OptionProps.java +++ b/compiler/src/main/java/DLS/ASTNodes/enums/obj/props/OptionProps.java @@ -2,7 +2,7 @@ //all the attributes defined in package DLS.ASTNodes.enums.attributes will also become properties public enum OptionProps { - TEXT("text"); + TEXT("text"), TYPE("type"), ID("id"); private String name; OptionProps(String name) { this.name = name; diff --git a/compiler/src/main/java/DLS/ASTNodes/statement/expression/AssignNode.java b/compiler/src/main/java/DLS/ASTNodes/statement/expression/AssignNode.java index 31198b3..95ef624 100644 --- a/compiler/src/main/java/DLS/ASTNodes/statement/expression/AssignNode.java +++ b/compiler/src/main/java/DLS/ASTNodes/statement/expression/AssignNode.java @@ -8,8 +8,10 @@ public class AssignNode extends ExpressionNode { public AssignNode(ExpressionNode target, ExpressionNode value) { this.target = target; this.value = value; + //todo: if(!(this.target instanceof DotNode) && !(this.target instanceof IdentifierNode)) + throw new RuntimeException(""); } diff --git a/compiler/src/main/java/DLS/ASTNodes/statement/expression/literal/ObjectLiteralNode.java b/compiler/src/main/java/DLS/ASTNodes/statement/expression/literal/ObjectLiteralNode.java index fa7304e..4592ae0 100644 --- a/compiler/src/main/java/DLS/ASTNodes/statement/expression/literal/ObjectLiteralNode.java +++ b/compiler/src/main/java/DLS/ASTNodes/statement/expression/literal/ObjectLiteralNode.java @@ -3,6 +3,7 @@ import DLS.ASTNodes.statement.expression.ExpressionNode; import java.util.List; +import java.util.Optional; public class ObjectLiteralNode extends ExpressionNode { @@ -16,6 +17,14 @@ public List getFields() { return fields; } + public Optional getFieldByName(String name){ + return fields.stream().filter(f -> f.getName().equals(name)).findAny(); + } + + public void addField(Field field) { + this.fields.add(field); + } + public static class Field { private final String name; private final ExpressionNode value; diff --git a/compiler/src/main/java/DLS/Main.java b/compiler/src/main/java/DLS/Main.java index e50b57e..3cd7196 100644 --- a/compiler/src/main/java/DLS/Main.java +++ b/compiler/src/main/java/DLS/Main.java @@ -12,6 +12,7 @@ import org.antlr.v4.runtime.tree.ParseTreeWalker; import java.io.*; +import java.nio.charset.StandardCharsets; import java.util.List; public class Main { @@ -84,8 +85,7 @@ public static void main(String[] args) throws IOException { PrintWriter out = null; try { - FileWriter fw = new FileWriter(commandsStrFileName, false); - BufferedWriter bw = new BufferedWriter(fw); + BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(commandsStrFileName, false), StandardCharsets.UTF_8)); out = new PrintWriter(bw); for (String cmdStr : ret.commands) out.println(cmdStr); } catch (IOException e) { @@ -97,8 +97,7 @@ public static void main(String[] args) throws IOException { } try { - FileWriter fw = new FileWriter(stringConstantsFileName, false); - BufferedWriter bw = new BufferedWriter(fw); + BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(stringConstantsFileName, false), StandardCharsets.UTF_8)); out = new PrintWriter(bw); for (String strConst : ret.stringConstants) out.println(strConst); } catch (IOException e) { @@ -110,8 +109,7 @@ public static void main(String[] args) throws IOException { } try { - FileWriter fw = new FileWriter(pluginImportsFileName, false); - BufferedWriter bw = new BufferedWriter(fw); + BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(pluginImportsFileName, false), StandardCharsets.UTF_8)); out = new PrintWriter(bw); for (String pi : ret.pluginImports) out.println(pi); } catch (IOException e) { diff --git a/compiler/src/main/java/DLS/ParseTreeVisitor.java b/compiler/src/main/java/DLS/ParseTreeVisitor.java index e828133..1610f8a 100644 --- a/compiler/src/main/java/DLS/ParseTreeVisitor.java +++ b/compiler/src/main/java/DLS/ParseTreeVisitor.java @@ -5,6 +5,7 @@ import DLS.ASTNodes.enums.built.in.fields.AnswerFields; import DLS.ASTNodes.enums.built.in.funcNames.BuiltInFuncNames; import DLS.ASTNodes.enums.built.in.specialObjNames.BuiltInSpecObjNames; +import DLS.ASTNodes.enums.obj.props.OptionProps; import DLS.ASTNodes.enums.obj.props.QuestionProps; import DLS.ASTNodes.plugin.CssPluginNode; import DLS.ASTNodes.plugin.JsPluginNode; @@ -75,10 +76,14 @@ class ParseTreeVisitor { //page group implicit attribute values pageGroupImplicitValues.put(PageGroupAttribute.RANDOMIZE.getName(), "true"); pageGroupImplicitValues.put(PageGroupAttribute.ROTATE.getName(), "true"); + pageGroupImplicitValues.put(PageGroupAttribute.HIDE.getName(), "true"); + pageGroupImplicitValues.put(PageGroupAttribute.SHOW.getName(), "true"); //page implicit attribute values pageImplicitValues.put(PageAttributes.RANDOMIZE.getName(), "true"); pageImplicitValues.put(PageAttributes.ROTATE.getName(), "true"); + pageImplicitValues.put(PageAttributes.HIDE.getName(), "true"); + pageImplicitValues.put(PageAttributes.SHOW.getName(), "true"); } private int randomIdentifierNameCounter = 1; @@ -94,9 +99,9 @@ private String generateRandomIdentifierName(String prefix) { //todo: here i need to add another entry point.... visitConsoleInput? to make use of all the methods i have coded here. List visitFile(DLSParser.FileContext ctx) { - if(ctx.Temp() == null) { + if (ctx.Temp() == null) { List rets = new ArrayList<>(); - List plugins = ctx.pluginImport() + List plugins = ctx.pluginImport() .stream() .map(this::getImportsNode) .collect(Collectors.toList()); @@ -114,7 +119,8 @@ List visitFile(DLSParser.FileContext ctx) { } else { List rootStatements = ctx.statement(); boolean returnStatementInRootStatements = rootStatements.stream().anyMatch(DLSParser.ReturnStatementContext.class::isInstance); - if(returnStatementInRootStatements) throw new RuntimeException("illegal statement: cannot evaluate return directly.."); + if (returnStatementInRootStatements) + throw new RuntimeException("illegal statement: cannot evaluate return directly.."); return rootStatements.stream() .map(this::getStatementNodes) .flatMap(List::stream) @@ -123,7 +129,7 @@ List visitFile(DLSParser.FileContext ctx) { } private StatementNode getImportsNode(DLSParser.PluginImportContext ctx) { - if(ctx.ImportJS() != null) { + if (ctx.ImportJS() != null) { return new JsPluginNode(util.removeDoubleQuotes(ctx.ImportUrl().getText())); } else { return new CssPluginNode(util.removeDoubleQuotes(ctx.ImportUrl().getText())); @@ -153,13 +159,12 @@ will live in a separated local scope. However, turning the page into a function this "page attribute object" from local variable space and pass it along with the question objects. */ List fields = getObjectLiteralFieldsFromAttributes(ctx.attributes(), pageGroupImplicitValues); + + pageGroupFuncBodyStatNodes.addAll(generateStatementsNodesForPageOrPageGroupShowHideProperties(fields)); + String specialPageGroupPropObjName = BuiltInSpecObjNames.PageGroupPropObject.getName(); pageGroupFuncBodyStatNodes.add(new DefNode(specialPageGroupPropObjName, new ObjectLiteralNode(fields))); -// -// List attribStats = getAttributeStatements(ctx.attributes(), pageGroupImplicitValues); -// pageGroupFuncBodyStatNodes.addAll(attribStats); - pageGroupFuncBodyStatNodes.addAll(getScriptStatements(ctx.script())); List pageDefFuncs = ctx.page().stream() @@ -260,7 +265,8 @@ private List getAttributeStatements(DLSParser.AttributeWithAssign ExpressionNode expNode = visitExpression(ac.expression()); if (expNode instanceof AssignNode) throw new RuntimeException("attribute expression cannot be an assignment"); //user cannot define objects. So objects must be either row literals or col literals. - if (expNode instanceof ObjectLiteralNode) throw new RuntimeException("attribute expression cannot be row / column literal"); + if (expNode instanceof ObjectLiteralNode) + throw new RuntimeException("attribute expression cannot be row / column literal"); IdentifierNode identifier = convertAttributeNameToIdentifier(ac.Name().getText()); DefNode def = new DefNode(identifier, expNode); @@ -292,6 +298,72 @@ private List getScriptStatements(DLSParser.ScriptContext scriptCt } private List visitPage(DLSParser.PageContext ctx) { + if (ctx.PageStart() != null || ctx.ScriptPageStart() != null) { + return visitNormalPage(ctx); + } else if (ctx.EmptyPageStart() != null) { + return visitEmptyPage(ctx); + } + throw new RuntimeException("unsupported page type"); + } + + private List visitEmptyPage(DLSParser.PageContext ctx) { + String pageId = this.generateRandomIdentifierName("page"); + List pageFuncBodyStatNodes = new ArrayList<>(); + + pageFuncBodyStatNodes.addAll(getScriptStatements(ctx.script(0))); + pageFuncBodyStatNodes.add(new ReturnNode()); + + IdentifierNode funcNameNode = new IdentifierNode(pageId); + + FuncDefNode pageFuncDef = new FuncDefNode(funcNameNode, pageFuncBodyStatNodes); + CallNode pageFuncCall = new CallNode(funcNameNode); + + List statements = new LinkedList<>(); + statements.add(pageFuncDef); + statements.add(new ExpressionStatementNode(pageFuncCall)); + + return statements; + } + + //checks a list of fields, and generates skip statements if show field evaluates to true or hide field evaluates to false + private List generateStatementsNodesForPageOrPageGroupShowHideProperties(List fields) { + List statements = new LinkedList<>(); + + //find the show / hide attribute, if show is false, or hide is true, then we return immediately, and do not try to execute the logic in the page. + //this will also cause the vm to continue to evaluate next page. + Optional maybeShowHideField = fields + .stream() + .filter(field -> field.getName().equals("show") || field.getName().equals("hide")) + .findFirst(); + + if (maybeShowHideField.isPresent()) { + ObjectLiteralNode.Field f = maybeShowHideField.get(); + if (f.getName().equals("show")) { + EqualsNode eq1 = new EqualsNode(f.getValue(), new StringNode("false")); + IfElseNode if1 = new IfElseNode(eq1, new ReturnNode()); + + EqualsNode eq2 = new EqualsNode(f.getValue(), new BooleanNode(false)); + IfElseNode if2 = new IfElseNode(eq2, new ReturnNode()); + + statements.add(if1); + statements.add(if2); + } else { + //must be hide attribute + EqualsNode eq1 = new EqualsNode(f.getValue(), new StringNode("true")); + IfElseNode if1 = new IfElseNode(eq1, new ReturnNode()); + + EqualsNode eq2 = new EqualsNode(f.getValue(), new BooleanNode(true)); + IfElseNode if2 = new IfElseNode(eq2, new ReturnNode()); + + statements.add(if1); + statements.add(if2); + } + } + + return statements; + } + + private List visitNormalPage(DLSParser.PageContext ctx) { //todo: question identifier should be its id attribute if there is //todo: id attributes can only be stringConstants //todo: verify the expressions.... @@ -313,7 +385,10 @@ will live in a separated local scope. However, turning the page into a function this "page attribute object" from local variable space and pass it along with the question objects. */ List fields = getObjectLiteralFieldsFromAttributes(ctx.attributes(), pageImplicitValues); - if(!maybeId.isPresent()) fields.add(new ObjectLiteralNode.Field("id", new StringNode(pageId))); + + pageFuncBodyStatNodes.addAll(generateStatementsNodesForPageOrPageGroupShowHideProperties(fields)); + + if (!maybeId.isPresent()) fields.add(new ObjectLiteralNode.Field("id", new StringNode(pageId))); pageFuncBodyStatNodes.add(new DefNode(BuiltInSpecObjNames.PagePropObject.getName(), new ObjectLiteralNode(fields))); DLSParser.ScriptContext preScript = ctx.script(0); @@ -341,6 +416,7 @@ will live in a separated local scope. However, turning the page into a function pageFuncBodyStatNodes.add(new ReturnNode()); + //define the page function and call it IdentifierNode funcNameNode = new IdentifierNode(pageId); FuncDefNode pageFuncDef = new FuncDefNode(funcNameNode, pageFuncBodyStatNodes); @@ -363,34 +439,34 @@ private StatementNode getQuestionStatements(DLSParser.QuestionContext questionCt } else if (questionCtx.singleMatrixQuestion() != null) { DLSParser.SingleMatrixQuestionContext sm = questionCtx.singleMatrixQuestion(); return getCommonQuestionStatements(sm.attributes(), sm.textArea(), getQuestionTypeField(sm), sm.rows, sm.cols); - } else if(questionCtx.multipleMatrixQuestion() != null) { + } else if (questionCtx.multipleMatrixQuestion() != null) { DLSParser.MultipleMatrixQuestionContext mm = questionCtx.multipleMatrixQuestion(); return getCommonQuestionStatements(mm.attributes(), mm.textArea(), getQuestionTypeField(mm), mm.rows, mm.cols); } else if (questionCtx.emptyQuestion() != null) { DLSParser.EmptyQuestionContext eq = questionCtx.emptyQuestion(); return getCommonQuestionStatements(eq.attributes(), eq.textArea(), getQuestionTypeField(eq), null, null); - }else { + } else { throw new RuntimeException("cannot generate question statements: unknown question types"); } } - private ObjectLiteralNode.Field getQuestionTypeField(@SuppressWarnings("unused")DLSParser.SingleChoiceQuestionContext sc) { + private ObjectLiteralNode.Field getQuestionTypeField(@SuppressWarnings("unused") DLSParser.SingleChoiceQuestionContext sc) { return new ObjectLiteralNode.Field(QuestionProps.TYPE.getName(), new StringNode(QuestionProps.SINGLE_CHOICE.getName())); } - private ObjectLiteralNode.Field getQuestionTypeField(@SuppressWarnings("unused")DLSParser.MultipleChoiceQuestionContext mc) { + private ObjectLiteralNode.Field getQuestionTypeField(@SuppressWarnings("unused") DLSParser.MultipleChoiceQuestionContext mc) { return new ObjectLiteralNode.Field(QuestionProps.TYPE.getName(), new StringNode(QuestionProps.MULTIPLE_CHOICE.getName())); } - private ObjectLiteralNode.Field getQuestionTypeField(@SuppressWarnings("unused")DLSParser.SingleMatrixQuestionContext smc) { + private ObjectLiteralNode.Field getQuestionTypeField(@SuppressWarnings("unused") DLSParser.SingleMatrixQuestionContext smc) { return new ObjectLiteralNode.Field(QuestionProps.TYPE.getName(), new StringNode(QuestionProps.SINGLE_MATRIX.getName())); } - private ObjectLiteralNode.Field getQuestionTypeField(@SuppressWarnings("unused")DLSParser.MultipleMatrixQuestionContext mm) { + private ObjectLiteralNode.Field getQuestionTypeField(@SuppressWarnings("unused") DLSParser.MultipleMatrixQuestionContext mm) { return new ObjectLiteralNode.Field(QuestionProps.TYPE.getName(), new StringNode(QuestionProps.MULTIPLE_MATRIX.getName())); } - private ObjectLiteralNode.Field getQuestionTypeField(@SuppressWarnings("unused")DLSParser.EmptyQuestionContext eq) { + private ObjectLiteralNode.Field getQuestionTypeField(@SuppressWarnings("unused") DLSParser.EmptyQuestionContext eq) { return new ObjectLiteralNode.Field(QuestionProps.TYPE.getName(), new StringNode(QuestionProps.EmptyQuestion.getName())); } @@ -402,7 +478,7 @@ private StatementNode getCommonQuestionStatements(DLSParser.AttributesContext at fields.add(questionType); fields.add(getTextField(textArea)); - if(rowCtxes != null && !rowCtxes.isEmpty()) { + if (rowCtxes != null && !rowCtxes.isEmpty()) { /* here we are creating an object whose property keys are row ids, and whose property values are rows, for instance: { @@ -429,7 +505,7 @@ private StatementNode getCommonQuestionStatements(DLSParser.AttributesContext at fields.add(rowsField); } - if(colCtxes != null && !colCtxes.isEmpty()) { + if (colCtxes != null && !colCtxes.isEmpty()) { ObjectLiteralNode cols = getQuestionColumnsField(colCtxes); ObjectLiteralNode.Field colsField = new ObjectLiteralNode.Field(QuestionProps.COLS.getName(), cols); fields.add(colsField); @@ -441,7 +517,7 @@ private StatementNode getCommonQuestionStatements(DLSParser.AttributesContext at .map(TerminalNode::getText) .map(util::removeDoubleQuotes); - if(maybeId.isPresent() && questionIds.contains(maybeId.get())) { + if (maybeId.isPresent() && questionIds.contains(maybeId.get())) { //ctx must exists then DLSParser.AttributeWithAssignedStringValueContext idCtx = maybeIdContext.get(); System.err.println("line " + idCtx.getStart().getLine() @@ -466,25 +542,57 @@ private ObjectLiteralNode getQuestionRowsField(List rows) Set rowIds = new HashSet<>(); List rowLiteralsAsFields = rows.stream().map(rc -> { - ObjectLiteralNode rowLiteral = getRowObjectLiteralFromRowTag(rc); - Optional maybeRowIdCtx = getIdAttribCtx(rc.attributes()); - Optional maybeRowId = maybeRowIdCtx.map(strValAttr -> strValAttr.String().getText()) - .map(util::removeDoubleQuotes); - - if(maybeRowId.isPresent() && rowIds.contains(maybeRowId.get())) { - DLSParser.AttributeWithAssignedStringValueContext rowIdCtx = maybeRowIdCtx.get(); - System.err.println("line " + rowIdCtx.getStart().getLine() - + ":" + rowIdCtx.getStart().getCharPositionInLine() - + " duplicated row id: " + maybeRowId.get() - + ". All rows inside the same question must have different ids" - ); - throw new RuntimeException("duplicated row id"); - } + if (rc.RowStart() != null) { + ObjectLiteralNode rowLiteral = getRowObjectLiteralFromRowTag(rc); + + Optional maybeRowIdCtx = getIdAttribCtx(rc.attributes()); + Optional maybeRowId = maybeRowIdCtx.map(strValAttr -> strValAttr.String().getText()) + .map(util::removeDoubleQuotes); + + if (maybeRowId.isPresent() && rowIds.contains(maybeRowId.get())) { + DLSParser.AttributeWithAssignedStringValueContext rowIdCtx = maybeRowIdCtx.get(); + System.err.println("line " + rowIdCtx.getStart().getLine() + + ":" + rowIdCtx.getStart().getCharPositionInLine() + + " duplicated row id: " + maybeRowId.get() + + ". All rows inside the same question must have different ids" + ); + throw new RuntimeException("duplicated row id"); + } + + String referenceName = maybeRowId.orElse(generateRandomIdentifierName()); + rowLiteral.addField(new ObjectLiteralNode.Field(OptionProps.ID.getName(), new StringNode(referenceName))); + rowIds.add(referenceName); - String referenceName = maybeRowId.orElse(generateRandomIdentifierName()); - rowIds.add(referenceName); - return new ObjectLiteralNode.Field(referenceName, rowLiteral); + //if the row has use={row1}, then we ignore all other row settings (except for id) and just replace the current row with row1 + Optional maybeUseRowObjField = rowLiteral.getFieldByName(RowAttributes.USE.getName()); + if (maybeUseRowObjField.isPresent()) { + ObjectLiteralNode.Field useRowObjField = maybeUseRowObjField.get(); + ExpressionNode useRowObj = useRowObjField.getValue(); + return new ObjectLiteralNode.Field(referenceName, useRowObj); + } + return new ObjectLiteralNode.Field(referenceName, rowLiteral); + } else if (rc.RowsStart() != null) { + //we ignore the ids in [Rows] + String referenceName = generateRandomIdentifierName(); + //we can use getRowObjectLiteralFromRowTag to gather the fields as well..although the name is not the best here. + ObjectLiteralNode rowsLiteral = getRowObjectLiteralFromRowTag(rc); + Optional maybeUseRowLists = rowsLiteral.getFieldByName(RowAttributes.USE.getName()); + if (maybeUseRowLists.isPresent()) { + ObjectLiteralNode.Field useRowList = maybeUseRowLists.get(); + ExpressionNode useRowObj = useRowList.getValue(); + return new ObjectLiteralNode.Field(referenceName, useRowObj); + } else { + //for [Rows], user must specify an use attribute. + System.err.println("line " + rc.getStart().getLine() + + ":" + rc.getStart().getCharPositionInLine() + + " must specify an use attribute: use = {listOfRows}" + ); + throw new RuntimeException("invalid rows tag"); + } + } else { + throw new RuntimeException("unsupported row type"); + } }).collect(Collectors.toList()); return new ObjectLiteralNode(rowLiteralsAsFields); } @@ -494,25 +602,56 @@ private ObjectLiteralNode getQuestionColumnsField(List col List colLiteralsAsFields = cols.stream().map(cc -> { - ObjectLiteralNode colLiteral = getColObjectLiteralFromColTag(cc); - - Optional maybeColIdCtx = getIdAttribCtx(cc.attributes()); - Optional maybeColId = maybeColIdCtx.map(strValAttr -> strValAttr.String().getText()) - .map(util::removeDoubleQuotes); - - if(maybeColId.isPresent() && colIds.contains(maybeColId.get())) { - DLSParser.AttributeWithAssignedStringValueContext colIdCtx = maybeColIdCtx.get(); - System.err.println("line " + colIdCtx.getStart().getLine() - + ":" + colIdCtx.getStart().getCharPositionInLine() - + " duplicated col id: " + maybeColId.get() - + ". All cols inside the same question must have different ids" - ); - throw new RuntimeException("duplicated col id"); + if (cc.ColStart() != null) { + ObjectLiteralNode colLiteral = getColObjectLiteralFromColTag(cc); + + Optional maybeColIdCtx = getIdAttribCtx(cc.attributes()); + Optional maybeColId = maybeColIdCtx.map(strValAttr -> strValAttr.String().getText()) + .map(util::removeDoubleQuotes); + + if (maybeColId.isPresent() && colIds.contains(maybeColId.get())) { + DLSParser.AttributeWithAssignedStringValueContext colIdCtx = maybeColIdCtx.get(); + System.err.println("line " + colIdCtx.getStart().getLine() + + ":" + colIdCtx.getStart().getCharPositionInLine() + + " duplicated col id: " + maybeColId.get() + + ". All cols inside the same question must have different ids" + ); + throw new RuntimeException("duplicated col id"); + } + + String referenceName = maybeColId.orElse(generateRandomIdentifierName()); + colLiteral.addField(new ObjectLiteralNode.Field(OptionProps.ID.getName(), new StringNode(referenceName))); + colIds.add(referenceName); + + //if the col has use={row1}, then we ignore all other col settings (except for id) and just replace the current row with row1 + Optional maybeUseColObjField = colLiteral.getFieldByName(ColAttributes.USE.getName()); + if (maybeUseColObjField.isPresent()) { + ObjectLiteralNode.Field useRowObjField = maybeUseColObjField.get(); + ExpressionNode useColObj = useRowObjField.getValue(); + return new ObjectLiteralNode.Field(referenceName, useColObj); + } + return new ObjectLiteralNode.Field(referenceName, colLiteral); + } else if (cc.ColsStart() != null) { + //we ignore the ids in [Rows] + String referenceName = generateRandomIdentifierName(); + //we can use getRowObjectLiteralFromRowTag to gather the fields as well..although the name is not the best here. + ObjectLiteralNode colsLiteral = getColObjectLiteralFromColTag(cc); + Optional maybeUseColLists = colsLiteral.getFieldByName(RowAttributes.USE.getName()); + if (maybeUseColLists.isPresent()) { + ObjectLiteralNode.Field useColList = maybeUseColLists.get(); + ExpressionNode useColsObj = useColList.getValue(); + return new ObjectLiteralNode.Field(referenceName, useColsObj); + } else { + //for [Rows], user must specify an use attribute. + System.err.println("line " + cc.getStart().getLine() + + ":" + cc.getStart().getCharPositionInLine() + + " must specify an use attribute: use = {listOfCols}" + ); + throw new RuntimeException("invalid cols tag"); + } + } else { + throw new RuntimeException("unsupported col type"); } - - String referenceName = maybeColId.orElse(generateRandomIdentifierName()); - colIds.add(referenceName); - return new ObjectLiteralNode.Field(referenceName, colLiteral); }).collect(Collectors.toList()); return new ObjectLiteralNode(colLiteralsAsFields); @@ -533,12 +672,12 @@ private ObjectLiteralNode getColObjectLiteralFromColTag(DLSParser.ColContext cc) } private List getStatementNodes(DLSParser.StatementContext ctx) { - if(ctx.emptyStatement() != null) return Collections.emptyList(); + if (ctx.emptyStatement() != null) return Collections.emptyList(); //try get single statement node Node node = tryGetSingleStatementNode(ctx); - if(node != null) return Collections.singletonList((StatementNode)node); + if (node != null) return Collections.singletonList((StatementNode) node); List nodes = tryGetMultipleStatementNodes(ctx); - if(nodes != null) return nodes; + if (nodes != null) return nodes; //try get multiple statement node throw new RuntimeException("unsupported statement type"); } @@ -548,6 +687,7 @@ private List getStatementNodes(DLSParser.StatementContext ctx) { * tries to get a single statement node from the provided statement context. * The statement context can also result in multiple statement nodes. so this method * should be followed by a call of `tryGetMultipleStatementNodes`. + * * @param ctx statement context * @return a single statement node */ @@ -564,6 +704,7 @@ private StatementNode tryGetSingleStatementNode(DLSParser.StatementContext ctx) /** * this is supposed to be used only by `getStatementNodes` methods. * see `tryGetSingleStatementNode` for more details + * * @param ctx statement context * @return a list of statement nodes. */ @@ -584,16 +725,16 @@ private List getStatementNodes(DLSParser.StatementsContext ctx) { private StatementNode visitVariableStatement(DLSParser.VariableStatementContext ctx) { IdentifierNode name = new IdentifierNode(ctx.Identifier().getText()); ExpressionNode initializer = null; - if(ctx.initialiser() != null) initializer = visitExpression(ctx.initialiser().expression()); + if (ctx.initialiser() != null) initializer = visitExpression(ctx.initialiser().expression()); boolean isGlobal = ctx.Global() != null; DefNode ret = new DefNode(isGlobal, name, initializer); - if(needsTokenAssociation)ret.setToken(ctx.getStart()); + if (needsTokenAssociation) ret.setToken(ctx.getStart()); return ret; } private StatementNode visitExpressionStatement(DLSParser.ExpressionStatementContext ctx) { ExpressionStatementNode est = new ExpressionStatementNode(visitExpression(ctx.expression())); - if(needsTokenAssociation) est.setToken(ctx.getStart()); + if (needsTokenAssociation) est.setToken(ctx.getStart()); return est; } @@ -630,7 +771,7 @@ private ExpressionNode visitExpression(DLSParser.ExpressionContext ctx) { //must be instance ParenthesizedExpression return visitParenthesizedExpression((DLSParser.ParenthesizedExpressionContext) ctx); } else if (ctx instanceof DLSParser.ClockExpressionContext) { - return visitClockExpression((DLSParser.ClockExpressionContext)ctx); + return visitClockExpression((DLSParser.ClockExpressionContext) ctx); } throw new RuntimeException("unsupported expression"); } @@ -639,7 +780,7 @@ private CallNode visitClockExpression(DLSParser.ClockExpressionContext ctx) { IdentifierNode funcNameIdentifier = new IdentifierNode(BuiltInFuncNames.CLOCK.getFuncName()); return new CallNode(funcNameIdentifier); } - + private ExpressionNode visitParenthesizedExpression(DLSParser.ParenthesizedExpressionContext ctx) { return visitExpression(ctx.expression()); } @@ -648,14 +789,32 @@ private ExpressionNode visitParenthesizedExpression(DLSParser.ParenthesizedExpre private ExpressionNode visitColumnLiteralExpression(DLSParser.ColumnLiteralExpressionContext ctx) { List fields = getObjectLiteralFieldsFromAttributes(ctx.colLiteral().attributes(), colImplicitValues); fields.add(getTextField(ctx.colLiteral().scriptTextArea())); - return new ObjectLiteralNode(fields); + //we use type: "col" to mark this object as a col object. + fields.add(new ObjectLiteralNode.Field(OptionProps.TYPE.getName(), new StringNode("col"))); + ObjectLiteralNode colObjLiteral = new ObjectLiteralNode(fields); + //if the row does not already have an id, then we give it an generated id. + String ID = OptionProps.ID.getName(); + if (!colObjLiteral.getFieldByName(ID).isPresent()) { + StringNode randomIdValue = new StringNode(this.generateRandomIdentifierName()); + colObjLiteral.addField(new ObjectLiteralNode.Field(ID, randomIdValue)); + } + return colObjLiteral; } private ExpressionNode visitRowLiteralExpression(DLSParser.RowLiteralExpressionContext ctx) { List fields = getObjectLiteralFieldsFromAttributes(ctx.rowLiteral().attributes(), rowImplicitValues); fields.add(getTextField(ctx.rowLiteral().scriptTextArea())); - return new ObjectLiteralNode(fields); + //we use type: "row" to mark this object as a row object. + fields.add(new ObjectLiteralNode.Field(OptionProps.TYPE.getName(), new StringNode("row"))); + ObjectLiteralNode rowObjLiteral = new ObjectLiteralNode(fields); + //if the row does not already have an id, then we give it an generated id. + String ID = OptionProps.ID.getName(); + if (!rowObjLiteral.getFieldByName(ID).isPresent()) { + StringNode randomIdValue = new StringNode(this.generateRandomIdentifierName()); + rowObjLiteral.addField(new ObjectLiteralNode.Field(ID, randomIdValue)); + } + return rowObjLiteral; } private List getObjectLiteralFieldsFromAttributes(DLSParser.AttributesContext ac, Map implicitValues) { @@ -679,7 +838,7 @@ private List getObjectLiteralFieldsFromAttributes(DLSPa }).collect(Collectors.toList()); } - + private ExpressionNode visitAdditiveExpression(DLSParser.AdditiveExpressionContext ctx) { ExpressionNode left = visitExpression(ctx.expression(0)); ExpressionNode right = visitExpression(ctx.expression(1)); @@ -727,7 +886,7 @@ private ExpressionNode visitLiteralExpression(DLSParser.LiteralExpressionContext String str = lctx.getText(); return new StringNode(util.removeDoubleQuotes(str)); } else if (lctx instanceof DLSParser.HoursLiteralContext) { - DLSParser.HoursLiteralContext hcx = (DLSParser.HoursLiteralContext)lctx; + DLSParser.HoursLiteralContext hcx = (DLSParser.HoursLiteralContext) lctx; int hours = hcx.Hours() != null ? removeLastCharacter(hcx.Hours().getText()) : 0; int minutes = hcx.Minutes() != null ? removeLastCharacter(hcx.Minutes().getText()) : 0; int seconds = hcx.Seconds() != null ? removeLastCharacter(hcx.Seconds().getText()) : 0; @@ -736,13 +895,13 @@ private ExpressionNode visitLiteralExpression(DLSParser.LiteralExpressionContext + seconds * 1000; return new NumberNode(totalMilliseconds); } else if (lctx instanceof DLSParser.MinutesLiteralContext) { - DLSParser.MinutesLiteralContext mcx = (DLSParser.MinutesLiteralContext)lctx; + DLSParser.MinutesLiteralContext mcx = (DLSParser.MinutesLiteralContext) lctx; int minutes = mcx.Minutes() != null ? removeLastCharacter(mcx.Minutes().getText()) : 0; int seconds = mcx.Seconds() != null ? removeLastCharacter(mcx.Seconds().getText()) : 0; int totalMilliseconds = minutes * 60 * 1000 + seconds * 1000; return new NumberNode(totalMilliseconds); } else if (lctx instanceof DLSParser.SecondsLiteralContext) { - DLSParser.SecondsLiteralContext mcx = (DLSParser.SecondsLiteralContext)lctx; + DLSParser.SecondsLiteralContext mcx = (DLSParser.SecondsLiteralContext) lctx; int seconds = removeLastCharacter(mcx.Seconds().getText()); int totalMilliseconds = seconds * 1000; return new NumberNode(totalMilliseconds); @@ -760,18 +919,19 @@ private int removeLastCharacter(String str) { /** * does the following conversion: - | 12am -> 0 - | [1-9]am -> 1 ~ 9 - | 10am -> 10 - | 11am -> 11 - | 12pm -> 12 - | [1-9]pm -> 13 ~ 21 - | 10pm -> 22 - | 11pm -> 23 + * | 12am -> 0 + * | [1-9]am -> 1 ~ 9 + * | 10am -> 10 + * | 11am -> 11 + * | 12pm -> 12 + * | [1-9]pm -> 13 ~ 21 + * | 10pm -> 22 + * | 11pm -> 23 + * * @param t the clock string (1am, 2am, 3pm....) * @return */ - private NumberNode convertClockUnitStringToNumber(String t){ + private NumberNode convertClockUnitStringToNumber(String t) { int c; switch (t) { case "12am": @@ -828,32 +988,32 @@ private ExpressionNode visitMemberExpression(DLSParser.MemberExpressionContext c return new DotNode(left, right); } - + private ExpressionNode visitAssignmentExpression(DLSParser.AssignmentExpressionContext ctx) { ExpressionNode target = visitExpression(ctx.expression(0)); ExpressionNode value = visitExpression(ctx.expression(1)); return new AssignNode(target, value); } - + private ExpressionNode visitEqualityExpression(DLSParser.EqualityExpressionContext ctx) { ExpressionNode left = visitExpression(ctx.expression(0)); ExpressionNode right = visitExpression(ctx.expression(1)); - if(ctx.Equals() != null) { + if (ctx.Equals() != null) { return new EqualsNode(left, right); } else { return new NotEqualsNode(left, right); } } - + private ExpressionNode visitMultiplicativeExpression(DLSParser.MultiplicativeExpressionContext ctx) { ExpressionNode left = visitExpression(ctx.expression(0)); ExpressionNode right = visitExpression(ctx.expression(1)); return new MultiplyNode(left, right); } - + private ExpressionNode visitCallExpression(DLSParser.CallExpressionContext ctx) { DLSParser.ExpressionContext e = ctx.expression(); List args; @@ -874,7 +1034,7 @@ private ExpressionNode visitCallExpression(DLSParser.CallExpressionContext ctx) } } - + private StatementNode visitIfStatement(DLSParser.IfStatementContext ctx) { List branches = new ArrayList<>(); createBranchFromNoEndingIfStatement(ctx.noEndingIfStatement(), branches); @@ -886,7 +1046,7 @@ private void createBranchFromNoEndingIfStatement(DLSParser.NoEndingIfStatementCo ExpressionNode condition = visitExpression(ctx.expression()); List statements = createListOfStatementNodes(ctx.statements()); IfElseNode.Branch branch = new IfElseNode.Branch(condition, statements); - if(needsTokenAssociation) branch.setToken(ctx.expression().getStart()); + if (needsTokenAssociation) branch.setToken(ctx.expression().getStart()); branches.add(branch); if (ctx.elseStatement() == null) return; @@ -917,7 +1077,7 @@ private List createListOfStatementNodes(DLSParser.StatementsConte .collect(Collectors.toList()); } - + private StatementNode visitFunctionDeclaration(DLSParser.FunctionDeclarationContext ctx) { String functionName = ctx.Identifier().getText(); IdentifierNode funcIdentifier = new IdentifierNode(functionName); @@ -931,25 +1091,27 @@ private StatementNode visitFunctionDeclaration(DLSParser.FunctionDeclarationCont .map(StatementNode.class::cast) .collect(Collectors.toList()); //if the last statement in the function body is not return statement, we add one. - if(!(funcBodyStatNodes.get(funcBodyStatNodes.size() - 1) instanceof ReturnNode)) + if (!(funcBodyStatNodes.get(funcBodyStatNodes.size() - 1) instanceof ReturnNode)) funcBodyStatNodes.add(new ReturnNode()); FuncDefNode ret = new FuncDefNode(funcIdentifier, argNames, funcBodyStatNodes); - if(needsTokenAssociation) ret.setToken(ctx.getStart()); + if (needsTokenAssociation) ret.setToken(ctx.getStart()); return ret; } - + private StatementNode visitReturnStatement(DLSParser.ReturnStatementContext ctx) { - Optional maybeRetVal = Optional.ofNullable(ctx.expression()).map(this::visitExpression); - ReturnNode ret = new ReturnNode(maybeRetVal.orElse(null)); - if(needsTokenAssociation)ret.setToken(ctx.getStart()); + Optional maybeRetNode = Optional.ofNullable(ctx.expression()) + .map(this::visitExpression) + .map(ReturnNode::new); + ReturnNode ret = maybeRetNode.orElse(new ReturnNode()); + if (needsTokenAssociation) ret.setToken(ctx.getStart()); return ret; } - + private StatementNode visitListOperationStatement(DLSParser.ListOperationStatementContext ctx) { ListOptNode.ListOptType optType; - if(ctx.Each() != null) { + if (ctx.Each() != null) { optType = ListOptNode.ListOptType.LOOP; // we will support map and filter later // } else if (ctx.Map() != null) { @@ -965,7 +1127,7 @@ private StatementNode visitListOperationStatement(DLSParser.ListOperationStateme List statements = getStatementNodes(ctx.statements()); ListOptNode ret = new ListOptNode(optType, identifier, statements); //we want to be able to stop at the first line of a map/reduce/filter so that we do not even need to get into the statements inside to stop. - if(needsTokenAssociation)ret.setToken(ctx.getStart()); + if (needsTokenAssociation) ret.setToken(ctx.getStart()); return ret; } @@ -992,7 +1154,7 @@ private List getChanceStatementNodes(DLSParser.ChanceStatementCon List branches = new LinkedList<>(); int i = 0; - for(DLSParser.PossibilityContext possibility : ctx.possibility()) { + for (DLSParser.PossibilityContext possibility : ctx.possibility()) { int p = getPercentageVal(possibility.Percentage().getText()); //inclusive int lowBound = i + 1; @@ -1012,31 +1174,39 @@ private List getChanceStatementNodes(DLSParser.ChanceStatementCon branches.add(new IfElseNode.Branch(t3, branchStatements)); } - IfElseNode ifElseNode = new IfElseNode(branches); + IfElseNode ifElseNode = new IfElseNode(branches); statements.add(ifElseNode); return statements; } private List visitBuiltInCommandStatement(DLSParser.BuiltInCommandStatementContext ctx) { - if(ctx instanceof DLSParser.TerminateCommandContext) { + if (ctx instanceof DLSParser.TerminateCommandContext) { EndSurveyNode end = new EndSurveyNode(); - if(needsTokenAssociation)end.setToken(ctx.getStart()); + if (needsTokenAssociation) end.setToken(ctx.getStart()); return Collections.singletonList(end); } else if (ctx instanceof DLSParser.SelectCommandContext) { - DLSParser.SelectCommandContext scc = (DLSParser.SelectCommandContext)ctx; + DLSParser.SelectCommandContext scc = (DLSParser.SelectCommandContext) ctx; ExpressionNode left = visitExpression(scc.expression()); DotNode answerIsSelected = new DotNode(left, AnswerFields.IsSelected.getName()); AssignNode setAnswerToBeSelected = new AssignNode(answerIsSelected, new BooleanNode(true)); ExpressionStatementNode select = new ExpressionStatementNode(setAnswerToBeSelected); - if(needsTokenAssociation)select.setToken(ctx.getStart()); + if (needsTokenAssociation) select.setToken(ctx.getStart()); return Collections.singletonList(select); + } else if (ctx instanceof DLSParser.DeselectCommandContext) { + DLSParser.DeselectCommandContext dsc = (DLSParser.DeselectCommandContext) ctx; + ExpressionNode left = visitExpression(dsc.expression()); + DotNode answerIsSelected = new DotNode(left, AnswerFields.IsSelected.getName()); + AssignNode setAnswerToBeDeSelected = new AssignNode(answerIsSelected, new BooleanNode(false)); + ExpressionStatementNode deselect = new ExpressionStatementNode(setAnswerToBeDeSelected); + if (needsTokenAssociation) deselect.setToken(ctx.getStart()); + return Collections.singletonList(deselect); } else if (ctx instanceof DLSParser.RankCommandContext) { - DLSParser.RankCommandContext rcc = (DLSParser.RankCommandContext)ctx; + DLSParser.RankCommandContext rcc = (DLSParser.RankCommandContext) ctx; List ecs = rcc.rankOrders().expression(); int rank = 1; List statementNodes = new LinkedList<>(); - for(DLSParser.ExpressionContext ec : ecs) { + for (DLSParser.ExpressionContext ec : ecs) { ExpressionNode left = visitExpression(ec); DotNode answerRank = new DotNode(left, AnswerFields.Rank.getName()); AssignNode setAnswerRank = new AssignNode(answerRank, new NumberNode(rank++)); @@ -1054,15 +1224,15 @@ private List visitBuiltInCommandStatement(DLSParser.BuiltInComman second generated statement, by the time we stop we have already set the rank of the first row1. But from user point of view, when he stop the command, the entire commands has not been executed yet. */ - if(needsTokenAssociation) + if (needsTokenAssociation) //parser syntax gurantee that there will at least be one statement here. - ((ExpressionStatementNode)statementNodes.get(0)).setToken(ctx.getStart()); + ((ExpressionStatementNode) statementNodes.get(0)).setToken(ctx.getStart()); return statementNodes; } else if (ctx instanceof DLSParser.PrintCommandContext) { ExpressionNode exp = visitExpression(((DLSParser.PrintCommandContext) ctx).expression()); CallNode callBuiltInPrintFunction = new CallNode(BuiltInFuncNames.PRINT.getFuncName(), exp); ExpressionStatementNode statementNode = new ExpressionStatementNode(callBuiltInPrintFunction); - if(needsTokenAssociation) statementNode.setToken(ctx.getStart()); + if (needsTokenAssociation) statementNode.setToken(ctx.getStart()); return Collections.singletonList(statementNode); } throw new RuntimeException("unsupported built in command"); @@ -1139,14 +1309,14 @@ private ObjectLiteralNode.Field getTextField(DLSParser.ScriptTextAreaContext scr private ObjectLiteralNode.Field getTextField(List orderedExpressionNodes) { orderedExpressionNodes.sort(Comparator.comparingInt(o -> o.order)); - if(orderedExpressionNodes.size() == 1) { + if (orderedExpressionNodes.size() == 1) { return new ObjectLiteralNode.Field("text", orderedExpressionNodes.get(0).exp); - } else if(orderedExpressionNodes.size() == 2) { + } else if (orderedExpressionNodes.size() == 2) { AddNode add = new AddNode(orderedExpressionNodes.get(0).exp, orderedExpressionNodes.get(1).exp); return new ObjectLiteralNode.Field("text", add); } else { AddNode add = new AddNode(orderedExpressionNodes.get(0).exp, orderedExpressionNodes.get(1).exp); - for(int i = 2; i < orderedExpressionNodes.size(); i++) { + for (int i = 2; i < orderedExpressionNodes.size(); i++) { add = new AddNode(add, orderedExpressionNodes.get(i).exp); } return new ObjectLiteralNode.Field("text", add); diff --git a/ide/compiler/MSL-1.0-SNAPSHOT-jar-with-dependencies.jar b/ide/compiler/MSL-1.0-SNAPSHOT-jar-with-dependencies.jar new file mode 100644 index 0000000..ed18f49 Binary files /dev/null and b/ide/compiler/MSL-1.0-SNAPSHOT-jar-with-dependencies.jar differ diff --git a/ide/compiler/input/input.txt b/ide/compiler/input/input.txt new file mode 100644 index 0000000..dfbbec5 --- /dev/null +++ b/ide/compiler/input/input.txt @@ -0,0 +1,82 @@ +[Page] +def greeting +if clock < 11am then + greeting = "Good morning!" +else if clock < 5pm then + greeting = "Good afternoon!" +else + greeting = "Good evening!" +end +[SingleChoice id="q1"]${greeting}Are you good at math? +[Row id="yes"]Yes +[Row id="no"]No +[Submit] +def global isGood = false +if q1.yes.selected then + isGood = true + print "user is good at math" +else + isGood = false + print "user is bad at math" +end +[PageEnd] + +[PageGroup show={isGood} randomize] +[Page] +def showNum +chance +50%: showNum = "x" +50%: showNum = "2" +end +[SingleChoice id="q2" show={showNum == "2"}]What is the value of 66 * 3 / 2 +[Row id="r1"]78 +[Row id="correct"]99 +[Row id="r3"]94 + +[SingleChoice id="qX" show={showNum == "x"}]What is the value of 44 * 2 +[Row id="correct"]88 +[Row id="r2"]99 +[Row id="r3"]77 +[Submit] +[PageEnd] + +[Page] +[SingleChoice id="q3"]What is the value of 2 * 2 * ( 3 + 7 ) +[Row id="r1"]22 +[Row id="correct"]40 +[Row id="r3"]39 +[Submit] +[PageEnd] +[PageGroupEnd] + +[EmptyPage] +if isGood == false then + return +end + +if q2.duration + qX.duration + q3.duration < 2s then + print "user is answering too fast" + terminate +end + +if q2.correct.selected == false and q3.correct.selected == false and qX.correct.selected == false then + isGood = false +end +[EmptyPageEnd] + +[Page show={isGood}] +[SingleChoice id="q6"]Why are you good at math? +[Row id="r1"]Because I am smart +[Row id="r2"]Because I am handsome +[Row id="r3"]Because I work +[Submit] +[PageEnd] + + +[Page hide={isGood}] +[SingleChoice id="q7"]Why are you bad at math? +[Row id="r1"]Because I am not smart +[Row id="r2"]Because I am not handsome +[Row id="r3"]Because I don't work +[Submit] +[PageEnd] diff --git a/ide/compiler/output/commandsStr.txt b/ide/compiler/output/commandsStr.txt new file mode 100644 index 0000000..3011370 --- /dev/null +++ b/ide/compiler/output/commandsStr.txt @@ -0,0 +1,755 @@ + def_func _page_gn2 2 0 + go_to 110 + new + dup + string 0 + put_field id + store _pagePropObj +2 null +2 store greeting +3 param_bound +3 invoke_func _clock +3 number 11.0 +3 cmp_lt 15 +3 bool false +3 go_to 16 +3 bool true +3 empty + if_eq_0 21 +4 string 1 +4 store greeting + go_to 38 +5 param_bound +5 invoke_func _clock +5 number 17.0 +5 cmp_lt 27 +5 bool false +5 go_to 28 +5 bool true +5 empty + if_eq_0 33 +6 string 2 +6 store greeting + go_to 38 + bool true + if_eq_0 38 +8 string 3 +8 store greeting + go_to 38 + empty + new + dup + string 4 + put_field id + dup + string 5 + put_field type + dup + string 6 + load greeting + add + string 7 + add + put_field text + dup + new + dup + new + dup + string 8 + put_field id + dup + string 9 + put_field text + dup + string 10 + put_field id + put_field yes + dup + new + dup + string 11 + put_field id + dup + string 12 + put_field text + dup + string 13 + put_field id + put_field no + put_field rows + dup + string 14 + put_field id + g_store q1 + param_bound + load q1 + send_question + await +14 bool false +14 g_store isGood +15 load q1 +15 read_field yes +15 read_field selected + if_eq_0 100 +16 bool true +16 store isGood +17 param_bound +17 string 15 +17 invoke_func _print + go_to 108 + bool true + if_eq_0 108 +19 bool false +19 store isGood +20 param_bound +20 string 16 +20 invoke_func _print + go_to 108 + empty + return_null + empty + param_bound + invoke_func _page_gn2 + def_func _pageGroup_gn22 115 0 + go_to 483 + load isGood + string 17 + cmp_eq 120 + bool false + go_to 121 + bool true + empty + if_eq_0 125 + return_null + go_to 125 + empty + load isGood + bool false + cmp_eq 131 + bool false + go_to 132 + bool true + empty + if_eq_0 136 + return_null + go_to 136 + empty + new + dup + load isGood + put_field show + dup + string 18 + put_field randomize + store _pageGroupPropObj + def_func _page_gn6 147 0 + go_to 338 + new + dup + string 19 + put_field id + store _pagePropObj +26 null +26 store showNum + param_bound + number 1.0 + number 101.0 + invoke_func _getRandomNumber + store _randomNumber_gn7 + load _randomNumber_gn7 + number 1.0 + cmp_ge 164 + bool false + go_to 165 + bool true + empty + if_eq_0 177 + load _randomNumber_gn7 + number 50.0 + cmp_le 172 + bool false + go_to 173 + bool true + empty + if_eq_0 177 + bool true + go_to 178 + bool false + empty + if_eq_0 183 +28 string 20 +28 store showNum + go_to 207 + load _randomNumber_gn7 + number 51.0 + cmp_ge 188 + bool false + go_to 189 + bool true + empty + if_eq_0 201 + load _randomNumber_gn7 + number 100.0 + cmp_le 196 + bool false + go_to 197 + bool true + empty + if_eq_0 201 + bool true + go_to 202 + bool false + empty + if_eq_0 207 +29 string 21 +29 store showNum + go_to 207 + empty + new + dup + string 22 + put_field id + dup + load showNum + string 23 + cmp_eq 218 + bool false + go_to 219 + bool true + empty + put_field show + dup + string 24 + put_field type + dup + string 25 + put_field text + dup + new + dup + new + dup + string 26 + put_field id + dup + string 27 + put_field text + dup + string 28 + put_field id + put_field r1 + dup + new + dup + string 29 + put_field id + dup + string 30 + put_field text + dup + string 31 + put_field id + put_field correct + dup + new + dup + string 32 + put_field id + dup + string 33 + put_field text + dup + string 34 + put_field id + put_field r3 + put_field rows + dup + string 35 + put_field id + g_store q2 + new + dup + string 36 + put_field id + dup + load showNum + string 37 + cmp_eq 280 + bool false + go_to 281 + bool true + empty + put_field show + dup + string 38 + put_field type + dup + string 39 + put_field text + dup + new + dup + new + dup + string 40 + put_field id + dup + string 41 + put_field text + dup + string 42 + put_field id + put_field correct + dup + new + dup + string 43 + put_field id + dup + string 44 + put_field text + dup + string 45 + put_field id + put_field r2 + dup + new + dup + string 46 + put_field id + dup + string 47 + put_field text + dup + string 48 + put_field id + put_field r3 + put_field rows + dup + string 49 + put_field id + g_store qX + param_bound + load q2 + load qX + send_question + await + return_null + empty + def_func _page_gn16 341 0 + go_to 404 + new + dup + string 50 + put_field id + store _pagePropObj + new + dup + string 51 + put_field id + dup + string 52 + put_field type + dup + string 53 + put_field text + dup + new + dup + new + dup + string 54 + put_field id + dup + string 55 + put_field text + dup + string 56 + put_field id + put_field r1 + dup + new + dup + string 57 + put_field id + dup + string 58 + put_field text + dup + string 59 + put_field id + put_field correct + dup + new + dup + string 60 + put_field id + dup + string 61 + put_field text + dup + string 62 + put_field id + put_field r3 + put_field rows + dup + string 63 + put_field id + g_store q3 + param_bound + load q3 + send_question + await + return_null + empty + param_bound + load _page_gn6 + load _page_gn16 + invoke_func List + store _generatedIdentifierName21 + load _pageGroupPropObj + read_field randomize + bool true + cmp_eq 416 + bool false + go_to 417 + bool true + empty + if_ne_0 428 + load _pageGroupPropObj + read_field randomize + string 64 + cmp_eq 425 + bool false + go_to 426 + bool true + empty + if_eq_0 430 + bool true + go_to 431 + bool false + empty + if_eq_0 437 + load _generatedIdentifierName21 + param_bound + invoke_method randomize + go_to 437 + empty + load _pageGroupPropObj + read_field rotate + bool true + cmp_eq 444 + bool false + go_to 445 + bool true + empty + if_ne_0 456 + load _pageGroupPropObj + read_field rotate + string 65 + cmp_eq 453 + bool false + go_to 454 + bool true + empty + if_eq_0 458 + bool true + go_to 459 + bool false + empty + if_eq_0 465 + load _generatedIdentifierName21 + param_bound + invoke_method rotate + go_to 465 + empty + new_scope + number 0 + store $index + load $index + load _generatedIdentifierName21 + read_field size + cmp_ge 481 + load _generatedIdentifierName21 + load $index + a_load + store $element + param_bound + invoke_func $element + inc $index + go_to 469 + close_scope + return_null + empty + param_bound + invoke_func _pageGroup_gn22 + def_func _page_gn23 488 0 + go_to 565 +53 load isGood +53 bool false +53 cmp_eq 493 +53 bool false +53 go_to 494 +53 bool true +53 empty + if_eq_0 498 + return_null + go_to 498 + empty +57 load q2 +57 read_field duration +57 load qX +57 read_field duration +57 add +57 load q3 +57 read_field duration +57 add +57 number 2000.0 +57 cmp_lt 511 +57 bool false +57 go_to 512 +57 bool true +57 empty + if_eq_0 519 +58 param_bound +58 string 66 +58 invoke_func _print + exit_program + go_to 519 + empty +62 load q2 +62 read_field correct +62 read_field selected +62 bool false +62 cmp_eq 527 +62 bool false +62 go_to 528 +62 bool true +62 empty +62 if_eq_0 542 +62 load q3 +62 read_field correct +62 read_field selected +62 bool false +62 cmp_eq 537 +62 bool false +62 go_to 538 +62 bool true +62 empty +62 if_eq_0 542 +62 bool true +62 go_to 543 +62 bool false +62 empty +62 if_eq_0 557 +62 load qX +62 read_field correct +62 read_field selected +62 bool false +62 cmp_eq 552 +62 bool false +62 go_to 553 +62 bool true +62 empty +62 if_eq_0 557 +62 bool true +62 go_to 558 +62 bool false +62 empty + if_eq_0 563 +63 bool false +63 store isGood + go_to 563 + empty + return_null + empty + param_bound + invoke_func _page_gn23 + def_func _page_gn24 570 0 + go_to 658 + load isGood + string 67 + cmp_eq 575 + bool false + go_to 576 + bool true + empty + if_eq_0 580 + return_null + go_to 580 + empty + load isGood + bool false + cmp_eq 586 + bool false + go_to 587 + bool true + empty + if_eq_0 591 + return_null + go_to 591 + empty + new + dup + load isGood + put_field show + dup + string 68 + put_field id + store _pagePropObj + new + dup + string 69 + put_field id + dup + string 70 + put_field type + dup + string 71 + put_field text + dup + new + dup + new + dup + string 72 + put_field id + dup + string 73 + put_field text + dup + string 74 + put_field id + put_field r1 + dup + new + dup + string 75 + put_field id + dup + string 76 + put_field text + dup + string 77 + put_field id + put_field r2 + dup + new + dup + string 78 + put_field id + dup + string 79 + put_field text + dup + string 80 + put_field id + put_field r3 + put_field rows + dup + string 81 + put_field id + g_store q6 + param_bound + load q6 + send_question + await + return_null + empty + param_bound + invoke_func _page_gn24 + def_func _page_gn29 663 0 + go_to 751 + load isGood + string 82 + cmp_eq 668 + bool false + go_to 669 + bool true + empty + if_eq_0 673 + return_null + go_to 673 + empty + load isGood + bool true + cmp_eq 679 + bool false + go_to 680 + bool true + empty + if_eq_0 684 + return_null + go_to 684 + empty + new + dup + load isGood + put_field hide + dup + string 83 + put_field id + store _pagePropObj + new + dup + string 84 + put_field id + dup + string 85 + put_field type + dup + string 86 + put_field text + dup + new + dup + new + dup + string 87 + put_field id + dup + string 88 + put_field text + dup + string 89 + put_field id + put_field r1 + dup + new + dup + string 90 + put_field id + dup + string 91 + put_field text + dup + string 92 + put_field id + put_field r2 + dup + new + dup + string 93 + put_field id + dup + string 94 + put_field text + dup + string 95 + put_field id + put_field r3 + put_field rows + dup + string 96 + put_field id + g_store q7 + param_bound + load q7 + send_question + await + return_null + empty + param_bound + invoke_func _page_gn29 + exit_program diff --git a/ide/compiler/output/pluginImports.txt b/ide/compiler/output/pluginImports.txt new file mode 100644 index 0000000..e69de29 diff --git a/ide/compiler/output/stringConstants.txt b/ide/compiler/output/stringConstants.txt new file mode 100644 index 0000000..4e2bb60 --- /dev/null +++ b/ide/compiler/output/stringConstants.txt @@ -0,0 +1,97 @@ +"_page_gn2" +"Good morning!" +"Good afternoon!" +"Good evening!" +"q1" +"single-choice" +"" +"Are you good at math?" +"yes" +"Yes" +"yes" +"no" +"No" +"no" +"q1" +"user is good at math" +"user is bad at math" +"false" +"true" +"_page_gn6" +"x" +"2" +"q2" +"2" +"single-choice" +"What is the value of 66 * 3 / 2" +"r1" +"78" +"r1" +"correct" +"99" +"correct" +"r3" +"94" +"r3" +"q2" +"qX" +"x" +"single-choice" +"What is the value of 44 * 2" +"correct" +"88" +"correct" +"r2" +"99" +"r2" +"r3" +"77" +"r3" +"qX" +"_page_gn16" +"q3" +"single-choice" +"What is the value of 2 * 2 * ( 3 + 7 )" +"r1" +"22" +"r1" +"correct" +"40" +"correct" +"r3" +"39" +"r3" +"q3" +"true" +"true" +"user is answering too fast" +"false" +"_page_gn24" +"q6" +"single-choice" +"Why are you good at math?" +"r1" +"Because I am smart" +"r1" +"r2" +"Because I am handsome" +"r2" +"r3" +"Because I work" +"r3" +"q6" +"true" +"_page_gn29" +"q7" +"single-choice" +"Why are you bad at math?" +"r1" +"Because I am not smart" +"r1" +"r2" +"Because I am not handsome" +"r2" +"r3" +"Because I don't work" +"r3" +"q7" diff --git a/ide/public/html/index.html b/ide/public/html/index.html index f0f0dc9..d4ec776 100644 --- a/ide/public/html/index.html +++ b/ide/public/html/index.html @@ -19,6 +19,7 @@
+ diff --git a/ide/public/javascripts/ace/src/mode-msl.js b/ide/public/javascripts/ace/src/mode-msl.js index 5b22540..8b59cee 100644 --- a/ide/public/javascripts/ace/src/mode-msl.js +++ b/ide/public/javascripts/ace/src/mode-msl.js @@ -11,7 +11,7 @@ define("ace/mode/msl_highlight_rules", ["require", "exports", "module", "ace/lib const buildInMethods = ( "List|randomize|rotate|get|has|indexOf|add|addFirst|addLast|addAllFirst|addAllLast|" + - "set|addAt|removeFirst|removeLast|remove|removeAt|clear|select|rank|print|->" + "set|addAt|removeFirst|removeLast|remove|removeAt|clear|select|deselect|rank|print|->" ); const buildInProperties = "selected|duration|answeredWhen|"; @@ -27,6 +27,13 @@ define("ace/mode/msl_highlight_rules", ["require", "exports", "module", "ace/lib regex: '".*?"' }; + const inTagExpressionStartRule = { + token: "gray", + regex: /{/, + //see https://stackoverflow.com/questions/22765435/recursive-blocks-in-ace-editor/22766243#22766243 + push: "inTagExpression" + }; + //in tag const EqualSignRule = { token: "gray", @@ -67,6 +74,10 @@ define("ace/mode/msl_highlight_rules", ["require", "exports", "module", "ace/lib token: "gray", regex: /\[Page/, next: "inPageTag" + }, { + token: "gray", + regex: /\[EmptyPage]/, + next: "inPostQuestionScript" }]; const startRules = [{ @@ -82,16 +93,41 @@ define("ace/mode/msl_highlight_rules", ["require", "exports", "module", "ace/lib const PageEndRule = { token: "gray", - regex: /\[PageEnd]/, + regex: /\[PageEnd]|\[EmptyPageEnd]/, next: "pageAndPageGroupStart" }; + const PreScriptRowTagRule = { + token: "question_row", + regex: /\[Row/, + next: 'preScriptRowTag' + }; + + const PreScriptColTagRule = { + token: "question_col", + regex: /\[Col/, + next: 'preScriptColTag' + }; + + const PostScriptRowTagRule = { + token: "question_row", + regex: /\[Row/, + next: 'postScriptRowTag' + }; + + const PostScriptColTagRule = { + token: "question_col", + regex: /\[Col/, + next: 'postScriptColTag' + }; + + this.$rules = { "start": startRules, "pageAndPageGroupStart": PageAndPageGroupStartRules, - "inPageGroupTag": [StringRule, EqualSignRule, { + "inPageGroupTag": [StringRule, EqualSignRule, inTagExpressionStartRule, { token: "gray", regex: /]/, next: "inPrePageScript" @@ -103,16 +139,30 @@ define("ace/mode/msl_highlight_rules", ["require", "exports", "module", "ace/lib next: "inPageTag" }], - "inPageTag": [StringRule, EqualSignRule, { + "inPageTag": [StringRule, EqualSignRule, inTagExpressionStartRule, { token: "gray", regex: /]/, next: "inPreQuestionScript" }], + "inTagExpression": [ + StringRule, + BooleanRule, + DotRule, + KeyWordMapperRule, { + token: "gray", + regex: /}/, + //https://stackoverflow.com/questions/22765435/recursive-blocks-in-ace-editor/22766243#22766243 + next: "pop" + } + ], + "inPreQuestionScript": [ StringRule, BooleanRule, DotRule, + PreScriptRowTagRule, + PreScriptColTagRule, KeyWordMapperRule, QuestionStartRule, /* @@ -132,7 +182,7 @@ define("ace/mode/msl_highlight_rules", ["require", "exports", "module", "ace/lib PageEndRule ], - "inQuestionTag": [StringRule, EqualSignRule, { + "inQuestionTag": [StringRule, EqualSignRule, inTagExpressionStartRule, { token: "question", regex: /]/, next: "inQuestionBody" @@ -141,11 +191,11 @@ define("ace/mode/msl_highlight_rules", ["require", "exports", "module", "ace/lib "inQuestionBody": [{ token: "question_row", - regex: /\[Row/, + regex: /\[Row(s)?/, next: "inRowTag" }, { token: "question_col", - regex: /\[Col/, + regex: /\[Col(s)?/, next: "inColTag" }, QuestionStartRule, /* @@ -164,18 +214,66 @@ define("ace/mode/msl_highlight_rules", ["require", "exports", "module", "ace/lib submitButtonRule, PageEndRule], - "inPostQuestionScript": [StringRule, BooleanRule, DotRule, KeyWordMapperRule, PageEndRule], + "inPostQuestionScript": [StringRule, BooleanRule, DotRule, PostScriptRowTagRule, PostScriptColTagRule, KeyWordMapperRule, PageEndRule], - "inRowTag": [StringRule, EqualSignRule, { + "inRowTag": [StringRule, EqualSignRule, inTagExpressionStartRule, { token: "question_row", regex: /]/, next: "inQuestionBody" }], - "inColTag": [StringRule, EqualSignRule, { + "inColTag": [StringRule, EqualSignRule, inTagExpressionStartRule, { token: "question_col", regex: /]/, next: "inQuestionBody" + }], + + "preScriptRowTag": [StringRule, EqualSignRule, inTagExpressionStartRule, { + token: "question_row", + regex: /]/, + next: "preScriptRowEndTag" + }], + + "preScriptColTag": [StringRule, EqualSignRule, inTagExpressionStartRule, { + token: "question_col", + regex: /]/, + next: "preScriptColEndTag" + }], + + "preScriptRowEndTag": [{ + token: "question_row", + regex: /\[End]/, + next: "inPreQuestionScript" + }], + + "preScriptColEndTag": [{ + token: "question_col", + regex: /\[End]/, + next: "inPreQuestionScript" + }], + + "postScriptRowTag": [StringRule, EqualSignRule, inTagExpressionStartRule, { + token: "question_row", + regex: /]/, + next: "postScriptRowEndTag" + }], + + "postScriptColTag": [StringRule, EqualSignRule, inTagExpressionStartRule, { + token: "question_col", + regex: /]/, + next: "postScriptColEndTag" + }], + + "postScriptRowEndTag": [{ + token: "question_row", + regex: /\[End]/, + next: "inPostQuestionScript" + }], + + "postScriptColEndTag": [{ + token: "question_col", + regex: /\[End]/, + next: "inPostQuestionScript" }] }; diff --git a/ide/public/javascripts/editor.js b/ide/public/javascripts/editor.js index 91c2afe..826ed3b 100644 --- a/ide/public/javascripts/editor.js +++ b/ide/public/javascripts/editor.js @@ -90,26 +90,31 @@ function bindPageMacro(){ function bindSingleChoiceMacro(){ document.querySelector("#sc-macro").onclick = function(){ - editor.insert("[SingleChoice]" + generateRowsTemplate()); + editor.insert("[SingleChoice id=\"qId\"]" + generateRowsTemplate()); }; } function bindMultipleChoiceMacro(){ document.querySelector("#mc-macro").onclick = function(){ - editor.insert("[MultipleChoice]" + generateRowsTemplate()); + editor.insert("[MultipleChoice id=\"qId\"]" + generateRowsTemplate()); }; } function bindSingleMatrixMacro(){ document.querySelector("#sm-macro").onclick = function(){ - editor.insert("[SingleMatrix]" + generateRowsTemplate() + generateColsTemplate()); + editor.insert("[SingleMatrix id=\"qId\"]" + generateRowsTemplate() + generateColsTemplate()); }; } function bindMultipleMatrixMacro(){ document.querySelector("#mm-macro").onclick = function(){ - editor.insert("[MultipleMatrix]" + generateRowsTemplate() + generateColsTemplate()); + editor.insert("[MultipleMatrix id=\"qId\"]" + generateRowsTemplate() + generateColsTemplate()); }; } +function bindEmptyPageMacro(){ + document.querySelector("#empty-page-macro").onclick = function(){ + editor.insert("[EmptyPage]\n\n[EmptyPageEnd]"); + } +} diff --git a/ide/public/javascripts/main.js b/ide/public/javascripts/main.js index 26565a5..2797240 100644 --- a/ide/public/javascripts/main.js +++ b/ide/public/javascripts/main.js @@ -34,4 +34,5 @@ function init(){ bindSingleMatrixMacro(); bindMultipleMatrixMacro(); bindPageGroupMacro(); + bindEmptyPageMacro(); } \ No newline at end of file diff --git a/ide/public/javascripts/reference_ui/rui.js b/ide/public/javascripts/reference_ui/rui.js index beeb364..1e05600 100644 --- a/ide/public/javascripts/reference_ui/rui.js +++ b/ide/public/javascripts/reference_ui/rui.js @@ -1,2 +1,2 @@ -!function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="/",e(e.s=568)}([function(t,e,n){"use strict";function r(t){return function e(r,a){switch(arguments.length){case 0:return e;case 1:return n.i(o.a)(r)?e:n.i(i.a)(function(e){return t(r,e)});default:return n.i(o.a)(r)&&n.i(o.a)(a)?e:n.i(o.a)(r)?n.i(i.a)(function(e){return t(e,a)}):n.i(o.a)(a)?n.i(i.a)(function(e){return t(r,e)}):t(r,a)}}}e.a=r;var i=n(1),o=n(65)},function(t,e,n){"use strict";function r(t){return function e(r){return 0===arguments.length||n.i(i.a)(r)?e:t.apply(this,arguments)}}e.a=r;var i=n(65)},function(t,e,n){"use strict";function r(t){return function e(r,u,s){switch(arguments.length){case 0:return e;case 1:return n.i(a.a)(r)?e:n.i(o.a)(function(e,n){return t(r,e,n)});case 2:return n.i(a.a)(r)&&n.i(a.a)(u)?e:n.i(a.a)(r)?n.i(o.a)(function(e,n){return t(e,u,n)}):n.i(a.a)(u)?n.i(o.a)(function(e,n){return t(r,e,n)}):n.i(i.a)(function(e){return t(r,u,e)});default:return n.i(a.a)(r)&&n.i(a.a)(u)&&n.i(a.a)(s)?e:n.i(a.a)(r)&&n.i(a.a)(u)?n.i(o.a)(function(e,n){return t(e,n,s)}):n.i(a.a)(r)&&n.i(a.a)(s)?n.i(o.a)(function(e,n){return t(e,u,n)}):n.i(a.a)(u)&&n.i(a.a)(s)?n.i(o.a)(function(e,n){return t(r,e,n)}):n.i(a.a)(r)?n.i(i.a)(function(e){return t(e,u,s)}):n.i(a.a)(u)?n.i(i.a)(function(e){return t(r,e,s)}):n.i(a.a)(s)?n.i(i.a)(function(e){return t(r,u,e)}):t(r,u,s)}}}e.a=r;var i=n(1),o=n(0),a=n(65)},function(t,e,n){"use strict";function r(t,e,n,r,o,a,u,s){if(i(e),!t){var c;if(void 0===e)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,o,a,u,s],f=0;c=new Error(e.replace(/%s/g,function(){return l[f++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}}var i=function(t){};t.exports=r},function(t,e,n){"use strict";var r=n(14),i=r;t.exports=i},function(t,e,n){"use strict";function r(t){for(var e=arguments.length-1,n="Minified React error #"+t+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+t,r=0;r=0;)e=u[r],n.i(i.a)(e,t)&&!c(l,e)&&(l[l.length]=e),r-=1;return l}:function(t){return Object(t)!==t?[]:Object.keys(t)},f=n.i(r.a)(l);e.a=f},function(t,e,n){"use strict";var r=n(2),i=n(16),o=n.i(r.a)(i.a);e.a=o},function(t,e,n){"use strict";function r(){P.ReactReconcileTransaction&&E||l("123")}function i(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=p.getPooled(),this.reconcileTransaction=P.ReactReconcileTransaction.getPooled(!0)}function o(t,e,n,i,o,a){return r(),E.batchedUpdates(t,e,n,i,o,a)}function a(t,e){return t._mountOrder-e._mountOrder}function u(t){var e=t.dirtyComponentsLength;e!==g.length&&l("124",e,g.length),g.sort(a),_++;for(var n=0;n=0&&"[object Array]"===Object.prototype.toString.call(t)}},function(t,e,n){"use strict";function r(t){return t&&t["@@transducer/reduced"]?t:{"@@transducer/value":t,"@@transducer/reduced":!0}}e.a=r},function(t,e,n){"use strict";var r=n(5),i=(n(3),function(t){var e=this;if(e.instancePool.length){var n=e.instancePool.pop();return e.call(n,t),n}return new e(t)}),o=function(t,e){var n=this;if(n.instancePool.length){var r=n.instancePool.pop();return n.call(r,t,e),r}return new n(t,e)},a=function(t,e,n){var r=this;if(r.instancePool.length){var i=r.instancePool.pop();return r.call(i,t,e,n),i}return new r(t,e,n)},u=function(t,e,n,r){var i=this;if(i.instancePool.length){var o=i.instancePool.pop();return i.call(o,t,e,n,r),o}return new i(t,e,n,r)},s=function(t){var e=this;t instanceof e||r("25"),t.destructor(),e.instancePool.length=0}e.a=r;var i=n(151)},function(t,e,n){"use strict";var r=n(0),i=n.i(r.a)(function(t,e){return e>t?e:t});e.a=i},function(t,e,n){"use strict";var r=n(0),i=n.i(r.a)(function(t,e){for(var n=e,r=0;r1){for(var d=Array(h),v=0;v1){for(var m=Array(y),g=0;g0&&void 0!==arguments[0]&&arguments[0],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return{type:s,isDebug:t,jsPluginImports:e,cssPluginImports:n}}function i(){return{type:u}}function o(){return{type:l}}function a(){return{type:c}}n.d(e,"f",function(){return u}),n.d(e,"d",function(){return s}),n.d(e,"c",function(){return c}),n.d(e,"g",function(){return l}),e.a=r,e.b=i,e.h=o,e.e=a;var u="flow_startAnswering",s="flow_reset",c="flow_end",l="flow_firstQuestionLoaded"},function(t,e,n){"use strict";function r(t){return!0===t||"true"===t}function i(t){return!1===t||"false"===t}function o(t){for(var e=t.length,n=void 0,r=void 0;0!==e;)r=Math.floor(Math.random()*e),e-=1,n=t[e],t[e]=t[r],t[r]=n;return t}function a(t){for(var e=Math.floor(Math.random()*t.length*2),n=0;n>>0;if(""+n!==e||4294967295===n)return NaN;e=n}return e<0?d(t)+e:e}function y(){return!0}function m(t,e,n){return(0===t||void 0!==n&&t<=-n)&&(void 0===e||void 0!==n&&e>=n)}function g(t,e){return b(t,e,0)}function _(t,e){return b(t,e,e)}function b(t,e,n){return void 0===t?n:t<0?Math.max(0,e+t):void 0===e?t:Math.min(e,t)}function w(t){this.next=t}function E(t,e,n,r){var i=0===t?e:1===t?n:[e,n];return r?r.value=i:r={value:i,done:!1},r}function C(){return{value:void 0,done:!0}}function x(t){return!!O(t)}function S(t){return t&&"function"===typeof t.next}function I(t){var e=O(t);return e&&e.call(t)}function O(t){var e=t&&(En&&t[En]||t[Cn]);if("function"===typeof e)return e}function P(t){return t&&"number"===typeof t.length}function k(t){return null===t||void 0===t?q():o(t)?t.toSeq():z(t)}function T(t){return null===t||void 0===t?q().toKeyedSeq():o(t)?a(t)?t.toSeq():t.fromEntrySeq():L(t)}function N(t){return null===t||void 0===t?q():o(t)?a(t)?t.entrySeq():t.toIndexedSeq():F(t)}function M(t){return(null===t||void 0===t?q():o(t)?a(t)?t.entrySeq():t:F(t)).toSetSeq()}function A(t){this._array=t,this.size=t.length}function D(t){var e=Object.keys(t);this._object=t,this._keys=e,this.size=e.length}function R(t){this._iterable=t,this.size=t.length||t.size}function j(t){this._iterator=t,this._iteratorCache=[]}function U(t){return!(!t||!t[Sn])}function q(){return In||(In=new A([]))}function L(t){var e=Array.isArray(t)?new A(t).fromEntrySeq():S(t)?new j(t).fromEntrySeq():x(t)?new R(t).fromEntrySeq():"object"===typeof t?new D(t):void 0;if(!e)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+t);return e}function F(t){var e=B(t);if(!e)throw new TypeError("Expected Array or iterable object of values: "+t);return e}function z(t){var e=B(t)||"object"===typeof t&&new D(t);if(!e)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+t);return e}function B(t){return P(t)?new A(t):S(t)?new j(t):x(t)?new R(t):void 0}function V(t,e,n,r){var i=t._cache;if(i){for(var o=i.length-1,a=0;a<=o;a++){var u=i[n?o-a:a];if(!1===e(u[1],r?u[0]:a,t))return a+1}return a}return t.__iterateUncached(e,n)}function W(t,e,n,r){var i=t._cache;if(i){var o=i.length-1,a=0;return new w(function(){var t=i[n?o-a:a];return a++>o?C():E(e,r?t[0]:a-1,t[1])})}return t.__iteratorUncached(e,n)}function H(t,e){return e?K(e,t,"",{"":t}):Y(t)}function K(t,e,n,r){return Array.isArray(e)?t.call(r,n,N(e).map(function(n,r){return K(t,n,r,e)})):G(e)?t.call(r,n,T(e).map(function(n,r){return K(t,n,r,e)})):e}function Y(t){return Array.isArray(t)?N(t).map(Y).toList():G(t)?T(t).map(Y).toMap():t}function G(t){return t&&(t.constructor===Object||void 0===t.constructor)}function X(t,e){if(t===e||t!==t&&e!==e)return!0;if(!t||!e)return!1;if("function"===typeof t.valueOf&&"function"===typeof e.valueOf){if(t=t.valueOf(),e=e.valueOf(),t===e||t!==t&&e!==e)return!0;if(!t||!e)return!1}return!("function"!==typeof t.equals||"function"!==typeof e.equals||!t.equals(e))}function Q(t,e){if(t===e)return!0;if(!o(e)||void 0!==t.size&&void 0!==e.size&&t.size!==e.size||void 0!==t.__hash&&void 0!==e.__hash&&t.__hash!==e.__hash||a(t)!==a(e)||u(t)!==u(e)||c(t)!==c(e))return!1;if(0===t.size&&0===e.size)return!0;var n=!s(t);if(c(t)){var r=t.entries();return e.every(function(t,e){var i=r.next().value;return i&&X(i[1],t)&&(n||X(i[0],e))})&&r.next().done}var i=!1;if(void 0===t.size)if(void 0===e.size)"function"===typeof t.cacheResult&&t.cacheResult();else{i=!0;var l=t;t=e,e=l}var f=!0,p=e.__iterate(function(e,r){if(n?!t.has(e):i?!X(e,t.get(r,yn)):!X(t.get(r,yn),e))return f=!1,!1});return f&&t.size===p}function $(t,e){if(!(this instanceof $))return new $(t,e);if(this._value=t,this.size=void 0===e?1/0:Math.max(0,e),0===this.size){if(On)return On;On=this}}function J(t,e){if(!t)throw new Error(e)}function Z(t,e,n){if(!(this instanceof Z))return new Z(t,e,n);if(J(0!==n,"Cannot step a Range by 0"),t=t||0,void 0===e&&(e=1/0),n=void 0===n?1:Math.abs(n),e>>1&1073741824|3221225471&t}function ot(t){if(!1===t||null===t||void 0===t)return 0;if("function"===typeof t.valueOf&&(!1===(t=t.valueOf())||null===t||void 0===t))return 0;if(!0===t)return 1;var e=typeof t;if("number"===e){if(t!==t||t===1/0)return 0;var n=0|t;for(n!==t&&(n^=4294967295*t);t>4294967295;)t/=4294967295,n^=t;return it(n)}if("string"===e)return t.length>jn?at(t):ut(t);if("function"===typeof t.hashCode)return t.hashCode();if("object"===e)return st(t);if("function"===typeof t.toString)return ut(t.toString());throw new Error("Value type "+e+" cannot be hashed.")}function at(t){var e=Ln[t];return void 0===e&&(e=ut(t),qn===Un&&(qn=0,Ln={}),qn++,Ln[t]=e),e}function ut(t){for(var e=0,n=0;n0)switch(t.nodeType){case 1:return t.uniqueID;case 9:return t.documentElement&&t.documentElement.uniqueID}}function lt(t){J(t!==1/0,"Cannot perform this action with an infinite size.")}function ft(t){return null===t||void 0===t?Et():pt(t)&&!c(t)?t:Et().withMutations(function(e){var r=n(t);lt(r.size),r.forEach(function(t,n){return e.set(n,t)})})}function pt(t){return!(!t||!t[Fn])}function ht(t,e){this.ownerID=t,this.entries=e}function dt(t,e,n){this.ownerID=t,this.bitmap=e,this.nodes=n}function vt(t,e,n){this.ownerID=t,this.count=e,this.nodes=n}function yt(t,e,n){this.ownerID=t,this.keyHash=e,this.entries=n}function mt(t,e,n){this.ownerID=t,this.keyHash=e,this.entry=n}function gt(t,e,n){this._type=e,this._reverse=n,this._stack=t._root&&bt(t._root)}function _t(t,e){return E(t,e[0],e[1])}function bt(t,e){return{node:t,index:0,__prev:e}}function wt(t,e,n,r){var i=Object.create(zn);return i.size=t,i._root=e,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function Et(){return Bn||(Bn=wt(0))}function Ct(t,e,n){var r,i;if(t._root){var o=l(mn),a=l(gn);if(r=xt(t._root,t.__ownerID,0,void 0,e,n,o,a),!a.value)return t;i=t.size+(o.value?n===yn?-1:1:0)}else{if(n===yn)return t;i=1,r=new ht(t.__ownerID,[[e,n]])}return t.__ownerID?(t.size=i,t._root=r,t.__hash=void 0,t.__altered=!0,t):r?wt(i,r):Et()}function xt(t,e,n,r,i,o,a,u){return t?t.update(e,n,r,i,o,a,u):o===yn?t:(f(u),f(a),new mt(e,r,[i,o]))}function St(t){return t.constructor===mt||t.constructor===yt}function It(t,e,n,r,i){if(t.keyHash===r)return new yt(e,r,[t.entry,i]);var o,a=(0===n?t.keyHash:t.keyHash>>>n)&vn,u=(0===n?r:r>>>n)&vn;return new dt(e,1<>>=1)a[u]=1&n?e[o++]:void 0;return a[r]=i,new vt(t,o+1,a)}function Tt(t,e,r){for(var i=[],a=0;a>1&1431655765,t=(858993459&t)+(t>>2&858993459),t=t+(t>>4)&252645135,t+=t>>8,127&(t+=t>>16)}function jt(t,e,n,r){var i=r?t:h(t);return i[e]=n,i}function Ut(t,e,n,r){var i=t.length+1;if(r&&e+1===i)return t[e]=n,t;for(var o=new Array(i),a=0,u=0;u0&&io?0:o-n,c=a-n;return c>dn&&(c=dn),function(){if(i===c)return Xn;var t=e?--c:i++;return r&&r[t]}}function i(t,r,i){var u,s=t&&t.array,c=i>o?0:o-i>>r,l=1+(a-i>>r);return l>dn&&(l=dn),function(){for(;;){if(u){var t=u();if(t!==Xn)return t;u=null}if(c===l)return Xn;var o=e?--l:c++;u=n(s&&s[o],r-hn,i+(o<=t.size||e<0)return t.withMutations(function(t){e<0?Xt(t,e).set(0,n):Xt(t,0,e+1).set(e,n)});e+=t._origin;var r=t._tail,i=t._root,o=l(gn);return e>=$t(t._capacity)?r=Kt(r,t.__ownerID,0,e,n,o):i=Kt(i,t.__ownerID,t._level,e,n,o),o.value?t.__ownerID?(t._root=i,t._tail=r,t.__hash=void 0,t.__altered=!0,t):Vt(t._origin,t._capacity,t._level,i,r):t}function Kt(t,e,n,r,i,o){var a=r>>>n&vn,u=t&&a0){var c=t&&t.array[a],l=Kt(c,e,n-hn,r,i,o);return l===c?t:(s=Yt(t,e),s.array[a]=l,s)}return u&&t.array[a]===i?t:(f(o),s=Yt(t,e),void 0===i&&a===s.array.length-1?s.array.pop():s.array[a]=i,s)}function Yt(t,e){return e&&t&&e===t.ownerID?t:new zt(t?t.array.slice():[],e)}function Gt(t,e){if(e>=$t(t._capacity))return t._tail;if(e<1<0;)n=n.array[e>>>r&vn],r-=hn;return n}}function Xt(t,e,n){void 0!==e&&(e|=0),void 0!==n&&(n|=0);var r=t.__ownerID||new p,i=t._origin,o=t._capacity,a=i+e,u=void 0===n?o:n<0?o+n:i+n;if(a===i&&u===o)return t;if(a>=u)return t.clear();for(var s=t._level,c=t._root,l=0;a+l<0;)c=new zt(c&&c.array.length?[void 0,c]:[],r),s+=hn,l+=1<=1<f?new zt([],r):d;if(d&&h>f&&ahn;m-=hn){var g=f>>>m&vn;y=y.array[g]=Yt(y.array[g],r)}y.array[f>>>hn&vn]=d}if(u=h)a-=h,u-=h,s=hn,c=null,v=v&&v.removeBefore(r,0,a);else if(a>i||h>>s&vn;if(_!==h>>>s&vn)break;_&&(l+=(1<i&&(c=c.removeBefore(r,s,a-l)),c&&ha&&(a=c.size),o(s)||(c=c.map(function(t){return H(t)})),i.push(c)}return a>t.size&&(t=t.setSize(a)),At(t,e,i)}function $t(t){return t>>hn<=dn&&a.size>=2*o.size?(i=a.filter(function(t,e){return void 0!==t&&u!==e}),r=i.toKeyedSeq().map(function(t){return t[0]}).flip().toMap(),t.__ownerID&&(r.__ownerID=i.__ownerID=t.__ownerID)):(r=o.remove(e),i=u===a.size-1?a.pop():a.set(u,void 0))}else if(s){if(n===a.get(u)[1])return t;r=o,i=a.set(u,[e,n])}else r=o.set(e,a.size),i=a.set(a.size,[e,n]);return t.__ownerID?(t.size=r.size,t._map=r,t._list=i,t.__hash=void 0,t):te(r,i)}function re(t,e){this._iter=t,this._useKeys=e,this.size=t.size}function ie(t){this._iter=t,this.size=t.size}function oe(t){this._iter=t,this.size=t.size}function ae(t){this._iter=t,this.size=t.size}function ue(t){var e=Pe(t);return e._iter=t,e.size=t.size,e.flip=function(){return t},e.reverse=function(){var e=t.reverse.apply(this);return e.flip=function(){return t.reverse()},e},e.has=function(e){return t.includes(e)},e.includes=function(e){return t.has(e)},e.cacheResult=ke,e.__iterateUncached=function(e,n){var r=this;return t.__iterate(function(t,n){return!1!==e(n,t,r)},n)},e.__iteratorUncached=function(e,n){if(e===wn){var r=t.__iterator(e,n);return new w(function(){var t=r.next();if(!t.done){var e=t.value[0];t.value[0]=t.value[1],t.value[1]=e}return t})}return t.__iterator(e===bn?_n:bn,n)},e}function se(t,e,n){var r=Pe(t);return r.size=t.size,r.has=function(e){return t.has(e)},r.get=function(r,i){var o=t.get(r,yn);return o===yn?i:e.call(n,o,r,t)},r.__iterateUncached=function(r,i){var o=this;return t.__iterate(function(t,i,a){return!1!==r(e.call(n,t,i,a),i,o)},i)},r.__iteratorUncached=function(r,i){var o=t.__iterator(wn,i);return new w(function(){var i=o.next();if(i.done)return i;var a=i.value,u=a[0];return E(r,u,e.call(n,a[1],u,t),i)})},r}function ce(t,e){var n=Pe(t);return n._iter=t,n.size=t.size,n.reverse=function(){return t},t.flip&&(n.flip=function(){var e=ue(t);return e.reverse=function(){return t.flip()},e}),n.get=function(n,r){return t.get(e?n:-1-n,r)},n.has=function(n){return t.has(e?n:-1-n)},n.includes=function(e){return t.includes(e)},n.cacheResult=ke,n.__iterate=function(e,n){var r=this;return t.__iterate(function(t,n){return e(t,n,r)},!n)},n.__iterator=function(e,n){return t.__iterator(e,!n)},n}function le(t,e,n,r){var i=Pe(t);return r&&(i.has=function(r){var i=t.get(r,yn);return i!==yn&&!!e.call(n,i,r,t)},i.get=function(r,i){var o=t.get(r,yn);return o!==yn&&e.call(n,o,r,t)?o:i}),i.__iterateUncached=function(i,o){var a=this,u=0;return t.__iterate(function(t,o,s){if(e.call(n,t,o,s))return u++,i(t,r?o:u-1,a)},o),u},i.__iteratorUncached=function(i,o){var a=t.__iterator(wn,o),u=0;return new w(function(){for(;;){var o=a.next();if(o.done)return o;var s=o.value,c=s[0],l=s[1];if(e.call(n,l,c,t))return E(i,r?c:u++,l,o)}})},i}function fe(t,e,n){var r=ft().asMutable();return t.__iterate(function(i,o){r.update(e.call(n,i,o,t),0,function(t){return t+1})}),r.asImmutable()}function pe(t,e,n){var r=a(t),i=(c(t)?Jt():ft()).asMutable();t.__iterate(function(o,a){i.update(e.call(n,o,a,t),function(t){return t=t||[],t.push(r?[a,o]:o),t})});var o=Oe(t);return i.map(function(e){return xe(t,o(e))})}function he(t,e,n,r){var i=t.size;if(void 0!==e&&(e|=0),void 0!==n&&(n===1/0?n=i:n|=0),m(e,n,i))return t;var o=g(e,i),a=_(n,i);if(o!==o||a!==a)return he(t.toSeq().cacheResult(),e,n,r);var u,s=a-o;s===s&&(u=s<0?0:s);var c=Pe(t);return c.size=0===u?u:t.size&&u||void 0,!r&&U(t)&&u>=0&&(c.get=function(e,n){return e=v(this,e),e>=0&&eu)return C();var t=i.next();return r||e===bn?t:e===_n?E(e,s-1,void 0,t):E(e,s-1,t.value[1],t)})},c}function de(t,e,n){var r=Pe(t);return r.__iterateUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterate(r,i);var a=0;return t.__iterate(function(t,i,u){return e.call(n,t,i,u)&&++a&&r(t,i,o)}),a},r.__iteratorUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterator(r,i);var a=t.__iterator(wn,i),u=!0;return new w(function(){if(!u)return C();var t=a.next();if(t.done)return t;var i=t.value,s=i[0],c=i[1];return e.call(n,c,s,o)?r===wn?t:E(r,s,c,t):(u=!1,C())})},r}function ve(t,e,n,r){var i=Pe(t);return i.__iterateUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterate(i,o);var u=!0,s=0;return t.__iterate(function(t,o,c){if(!u||!(u=e.call(n,t,o,c)))return s++,i(t,r?o:s-1,a)}),s},i.__iteratorUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterator(i,o);var u=t.__iterator(wn,o),s=!0,c=0;return new w(function(){var t,o,l;do{if(t=u.next(),t.done)return r||i===bn?t:i===_n?E(i,c++,void 0,t):E(i,c++,t.value[1],t);var f=t.value;o=f[0],l=f[1],s&&(s=e.call(n,l,o,a))}while(s);return i===wn?t:E(i,o,l,t)})},i}function ye(t,e){var r=a(t),i=[t].concat(e).map(function(t){return o(t)?r&&(t=n(t)):t=r?L(t):F(Array.isArray(t)?t:[t]),t}).filter(function(t){return 0!==t.size});if(0===i.length)return t;if(1===i.length){var s=i[0];if(s===t||r&&a(s)||u(t)&&u(s))return s}var c=new A(i);return r?c=c.toKeyedSeq():u(t)||(c=c.toSetSeq()),c=c.flatten(!0),c.size=i.reduce(function(t,e){if(void 0!==t){var n=e.size;if(void 0!==n)return t+n}},0),c}function me(t,e,n){var r=Pe(t);return r.__iterateUncached=function(r,i){function a(t,c){var l=this;t.__iterate(function(t,i){return(!e||c0}function Ce(t,n,r){var i=Pe(t);return i.size=new A(r).map(function(t){return t.size}).min(),i.__iterate=function(t,e){for(var n,r=this.__iterator(bn,e),i=0;!(n=r.next()).done&&!1!==t(n.value,i++,this););return i},i.__iteratorUncached=function(t,i){var o=r.map(function(t){return t=e(t),I(i?t.reverse():t)}),a=0,u=!1;return new w(function(){var e;return u||(e=o.map(function(t){return t.next()}),u=e.some(function(t){return t.done})),u?C():E(t,a++,n.apply(null,e.map(function(t){return t.value})))})},i}function xe(t,e){return U(t)?e:t.constructor(e)}function Se(t){if(t!==Object(t))throw new TypeError("Expected [K, V] tuple: "+t)}function Ie(t){return lt(t.size),d(t)}function Oe(t){return a(t)?n:u(t)?r:i}function Pe(t){return Object.create((a(t)?T:u(t)?N:M).prototype)}function ke(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):k.prototype.cacheResult.call(this)}function Te(t,e){return t>e?1:te?-1:0}function on(t){if(t.size===1/0)return 0;var e=c(t),n=a(t),r=e?1:0;return an(t.__iterate(n?e?function(t,e){r=31*r+un(ot(t),ot(e))|0}:function(t,e){r=r+un(ot(t),ot(e))|0}:e?function(t){r=31*r+ot(t)|0}:function(t){r=r+ot(t)|0}),r)}function an(t,e){return e=Tn(e,3432918353),e=Tn(e<<15|e>>>-15,461845907),e=Tn(e<<13|e>>>-13,5),e=(e+3864292196|0)^t,e=Tn(e^e>>>16,2246822507),e=Tn(e^e>>>13,3266489909),e=it(e^e>>>16)}function un(t,e){return t^e+2654435769+(t<<6)+(t>>2)|0}var sn=Array.prototype.slice;t(n,e),t(r,e),t(i,e),e.isIterable=o,e.isKeyed=a,e.isIndexed=u,e.isAssociative=s,e.isOrdered=c,e.Keyed=n,e.Indexed=r,e.Set=i;var cn="@@__IMMUTABLE_ITERABLE__@@",ln="@@__IMMUTABLE_KEYED__@@",fn="@@__IMMUTABLE_INDEXED__@@",pn="@@__IMMUTABLE_ORDERED__@@",hn=5,dn=1<r?C():E(t,i,n[e?r-i++:i++])})},t(D,T),D.prototype.get=function(t,e){return void 0===e||this.has(t)?this._object[t]:e},D.prototype.has=function(t){return this._object.hasOwnProperty(t)},D.prototype.__iterate=function(t,e){for(var n=this._object,r=this._keys,i=r.length-1,o=0;o<=i;o++){var a=r[e?i-o:o];if(!1===t(n[a],a,this))return o+1}return o},D.prototype.__iterator=function(t,e){var n=this._object,r=this._keys,i=r.length-1,o=0;return new w(function(){var a=r[e?i-o:o];return o++>i?C():E(t,a,n[a])})},D.prototype[pn]=!0,t(R,N),R.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);var n=this._iterable,r=I(n),i=0;if(S(r))for(var o;!(o=r.next()).done&&!1!==t(o.value,i++,this););return i},R.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var n=this._iterable,r=I(n);if(!S(r))return new w(C);var i=0;return new w(function(){var e=r.next();return e.done?e:E(t,i++,e.value)})},t(j,N),j.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);for(var n=this._iterator,r=this._iteratorCache,i=0;i=r.length){var e=n.next();if(e.done)return e;r[i]=e.value}return E(t,i,r[i++])})};var In;t($,N),$.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},$.prototype.get=function(t,e){return this.has(t)?this._value:e},$.prototype.includes=function(t){return X(this._value,t)},$.prototype.slice=function(t,e){var n=this.size;return m(t,e,n)?this:new $(this._value,_(e,n)-g(t,n))},$.prototype.reverse=function(){return this},$.prototype.indexOf=function(t){return X(this._value,t)?0:-1},$.prototype.lastIndexOf=function(t){return X(this._value,t)?this.size:-1},$.prototype.__iterate=function(t,e){for(var n=0;n=0&&e=0&&nn?C():E(t,o++,a)})},Z.prototype.equals=function(t){return t instanceof Z?this._start===t._start&&this._end===t._end&&this._step===t._step:Q(this,t)};var Pn;t(tt,e),t(et,tt),t(nt,tt),t(rt,tt),tt.Keyed=et,tt.Indexed=nt,tt.Set=rt;var kn,Tn="function"===typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(t,e){t|=0,e|=0;var n=65535&t,r=65535&e;return n*r+((t>>>16)*r+n*(e>>>16)<<16>>>0)|0},Nn=Object.isExtensible,Mn=function(){try{return Object.defineProperty({},"@",{}),!0}catch(t){return!1}}(),An="function"===typeof WeakMap;An&&(kn=new WeakMap);var Dn=0,Rn="__immutablehash__";"function"===typeof Symbol&&(Rn=Symbol(Rn));var jn=16,Un=255,qn=0,Ln={};t(ft,et),ft.of=function(){var t=sn.call(arguments,0);return Et().withMutations(function(e){for(var n=0;n=t.length)throw new Error("Missing value for key: "+t[n]);e.set(t[n],t[n+1])}})},ft.prototype.toString=function(){return this.__toString("Map {","}")},ft.prototype.get=function(t,e){return this._root?this._root.get(0,void 0,t,e):e},ft.prototype.set=function(t,e){return Ct(this,t,e)},ft.prototype.setIn=function(t,e){return this.updateIn(t,yn,function(){return e})},ft.prototype.remove=function(t){return Ct(this,t,yn)},ft.prototype.deleteIn=function(t){return this.updateIn(t,function(){return yn})},ft.prototype.update=function(t,e,n){return 1===arguments.length?t(this):this.updateIn([t],e,n)},ft.prototype.updateIn=function(t,e,n){n||(n=e,e=void 0);var r=Dt(this,Ne(t),e,n);return r===yn?void 0:r},ft.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):Et()},ft.prototype.merge=function(){return Tt(this,void 0,arguments)},ft.prototype.mergeWith=function(t){return Tt(this,t,sn.call(arguments,1))},ft.prototype.mergeIn=function(t){var e=sn.call(arguments,1);return this.updateIn(t,Et(),function(t){return"function"===typeof t.merge?t.merge.apply(t,e):e[e.length-1]})},ft.prototype.mergeDeep=function(){return Tt(this,Nt,arguments)},ft.prototype.mergeDeepWith=function(t){var e=sn.call(arguments,1);return Tt(this,Mt(t),e)},ft.prototype.mergeDeepIn=function(t){var e=sn.call(arguments,1);return this.updateIn(t,Et(),function(t){return"function"===typeof t.mergeDeep?t.mergeDeep.apply(t,e):e[e.length-1]})},ft.prototype.sort=function(t){return Jt(be(this,t))},ft.prototype.sortBy=function(t,e){return Jt(be(this,e,t))},ft.prototype.withMutations=function(t){var e=this.asMutable();return t(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this},ft.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new p)},ft.prototype.asImmutable=function(){return this.__ensureOwner()},ft.prototype.wasAltered=function(){return this.__altered},ft.prototype.__iterator=function(t,e){return new gt(this,t,e)},ft.prototype.__iterate=function(t,e){var n=this,r=0;return this._root&&this._root.iterate(function(e){return r++,t(e[1],e[0],n)},e),r},ft.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?wt(this.size,this._root,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},ft.isMap=pt;var Fn="@@__IMMUTABLE_MAP__@@",zn=ft.prototype;zn[Fn]=!0,zn.delete=zn.remove,zn.removeIn=zn.deleteIn,ht.prototype.get=function(t,e,n,r){for(var i=this.entries,o=0,a=i.length;o=Vn)return Ot(t,s,r,i);var d=t&&t===this.ownerID,v=d?s:h(s);return p?u?c===l-1?v.pop():v[c]=v.pop():v[c]=[r,i]:v.push([r,i]),d?(this.entries=v,this):new ht(t,v)}},dt.prototype.get=function(t,e,n,r){void 0===e&&(e=ot(n));var i=1<<((0===t?e:e>>>t)&vn),o=this.bitmap;return 0===(o&i)?r:this.nodes[Rt(o&i-1)].get(t+hn,e,n,r)},dt.prototype.update=function(t,e,n,r,i,o,a){void 0===n&&(n=ot(r));var u=(0===e?n:n>>>e)&vn,s=1<=Wn)return kt(t,p,c,u,d);if(l&&!d&&2===p.length&&St(p[1^f]))return p[1^f];if(l&&d&&1===p.length&&St(d))return d;var v=t&&t===this.ownerID,y=l?d?c:c^s:c|s,m=l?d?jt(p,f,d,v):qt(p,f,v):Ut(p,f,d,v);return v?(this.bitmap=y,this.nodes=m,this):new dt(t,y,m)},vt.prototype.get=function(t,e,n,r){void 0===e&&(e=ot(n));var i=(0===t?e:e>>>t)&vn,o=this.nodes[i];return o?o.get(t+hn,e,n,r):r},vt.prototype.update=function(t,e,n,r,i,o,a){void 0===n&&(n=ot(r));var u=(0===e?n:n>>>e)&vn,s=i===yn,c=this.nodes,l=c[u];if(s&&!l)return this;var f=xt(l,t,e+hn,n,r,i,o,a);if(f===l)return this;var p=this.count;if(l){if(!f&&--p=0&&t>>e&vn;if(r>=this.array.length)return new zt([],t);var i,o=0===r;if(e>0){var a=this.array[r];if((i=a&&a.removeBefore(t,e-hn,n))===a&&o)return this}if(o&&!i)return this;var u=Yt(this,t);if(!o)for(var s=0;s>>e&vn;if(r>=this.array.length)return this;var i;if(e>0){var o=this.array[r];if((i=o&&o.removeAfter(t,e-hn,n))===o&&r===this.array.length-1)return this}var a=Yt(this,t);return a.array.splice(r+1),i&&(a.array[r]=i),a};var Gn,Xn={};t(Jt,ft),Jt.of=function(){return this(arguments)},Jt.prototype.toString=function(){return this.__toString("OrderedMap {","}")},Jt.prototype.get=function(t,e){var n=this._map.get(t);return void 0!==n?this._list.get(n)[1]:e},Jt.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):ee()},Jt.prototype.set=function(t,e){return ne(this,t,e)},Jt.prototype.remove=function(t){return ne(this,t,yn)},Jt.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},Jt.prototype.__iterate=function(t,e){var n=this;return this._list.__iterate(function(e){return e&&t(e[1],e[0],n)},e)},Jt.prototype.__iterator=function(t,e){return this._list.fromEntrySeq().__iterator(t,e)},Jt.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t),n=this._list.__ensureOwner(t);return t?te(e,n,t,this.__hash):(this.__ownerID=t,this._map=e,this._list=n,this)},Jt.isOrderedMap=Zt,Jt.prototype[pn]=!0,Jt.prototype.delete=Jt.prototype.remove;var Qn;t(re,T),re.prototype.get=function(t,e){return this._iter.get(t,e)},re.prototype.has=function(t){return this._iter.has(t)},re.prototype.valueSeq=function(){return this._iter.valueSeq()},re.prototype.reverse=function(){var t=this,e=ce(this,!0);return this._useKeys||(e.valueSeq=function(){return t._iter.toSeq().reverse()}),e},re.prototype.map=function(t,e){var n=this,r=se(this,t,e);return this._useKeys||(r.valueSeq=function(){return n._iter.toSeq().map(t,e)}),r},re.prototype.__iterate=function(t,e){var n,r=this;return this._iter.__iterate(this._useKeys?function(e,n){return t(e,n,r)}:(n=e?Ie(this):0,function(i){return t(i,e?--n:n++,r)}),e)},re.prototype.__iterator=function(t,e){if(this._useKeys)return this._iter.__iterator(t,e);var n=this._iter.__iterator(bn,e),r=e?Ie(this):0;return new w(function(){var i=n.next();return i.done?i:E(t,e?--r:r++,i.value,i)})},re.prototype[pn]=!0,t(ie,N),ie.prototype.includes=function(t){return this._iter.includes(t)},ie.prototype.__iterate=function(t,e){var n=this,r=0;return this._iter.__iterate(function(e){return t(e,r++,n)},e)},ie.prototype.__iterator=function(t,e){var n=this._iter.__iterator(bn,e),r=0;return new w(function(){var e=n.next();return e.done?e:E(t,r++,e.value,e)})},t(oe,M),oe.prototype.has=function(t){return this._iter.includes(t)},oe.prototype.__iterate=function(t,e){var n=this;return this._iter.__iterate(function(e){return t(e,e,n)},e)},oe.prototype.__iterator=function(t,e){var n=this._iter.__iterator(bn,e);return new w(function(){var e=n.next();return e.done?e:E(t,e.value,e.value,e)})},t(ae,T),ae.prototype.entrySeq=function(){return this._iter.toSeq()},ae.prototype.__iterate=function(t,e){var n=this;return this._iter.__iterate(function(e){if(e){Se(e);var r=o(e);return t(r?e.get(1):e[1],r?e.get(0):e[0],n)}},e)},ae.prototype.__iterator=function(t,e){var n=this._iter.__iterator(bn,e);return new w(function(){for(;;){var e=n.next();if(e.done)return e;var r=e.value;if(r){Se(r);var i=o(r);return E(t,i?r.get(0):r[0],i?r.get(1):r[1],e)}}})},ie.prototype.cacheResult=re.prototype.cacheResult=oe.prototype.cacheResult=ae.prototype.cacheResult=ke,t(Me,et),Me.prototype.toString=function(){return this.__toString(De(this)+" {","}")},Me.prototype.has=function(t){return this._defaultValues.hasOwnProperty(t)},Me.prototype.get=function(t,e){if(!this.has(t))return e;var n=this._defaultValues[t];return this._map?this._map.get(t,n):n},Me.prototype.clear=function(){if(this.__ownerID)return this._map&&this._map.clear(),this;var t=this.constructor;return t._empty||(t._empty=Ae(this,Et()))},Me.prototype.set=function(t,e){if(!this.has(t))throw new Error('Cannot set unknown key "'+t+'" on '+De(this));if(this._map&&!this._map.has(t)){if(e===this._defaultValues[t])return this}var n=this._map&&this._map.set(t,e);return this.__ownerID||n===this._map?this:Ae(this,n)},Me.prototype.remove=function(t){if(!this.has(t))return this;var e=this._map&&this._map.remove(t);return this.__ownerID||e===this._map?this:Ae(this,e)},Me.prototype.wasAltered=function(){return this._map.wasAltered()},Me.prototype.__iterator=function(t,e){var r=this;return n(this._defaultValues).map(function(t,e){return r.get(e)}).__iterator(t,e)},Me.prototype.__iterate=function(t,e){var r=this;return n(this._defaultValues).map(function(t,e){return r.get(e)}).__iterate(t,e)},Me.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map&&this._map.__ensureOwner(t);return t?Ae(this,e,t):(this.__ownerID=t,this._map=e,this)};var $n=Me.prototype;$n.delete=$n.remove,$n.deleteIn=$n.removeIn=zn.removeIn,$n.merge=zn.merge,$n.mergeWith=zn.mergeWith,$n.mergeIn=zn.mergeIn,$n.mergeDeep=zn.mergeDeep,$n.mergeDeepWith=zn.mergeDeepWith,$n.mergeDeepIn=zn.mergeDeepIn,$n.setIn=zn.setIn,$n.update=zn.update,$n.updateIn=zn.updateIn,$n.withMutations=zn.withMutations,$n.asMutable=zn.asMutable,$n.asImmutable=zn.asImmutable,t(Ue,rt),Ue.of=function(){return this(arguments)},Ue.fromKeys=function(t){return this(n(t).keySeq())},Ue.prototype.toString=function(){return this.__toString("Set {","}")},Ue.prototype.has=function(t){return this._map.has(t)},Ue.prototype.add=function(t){return Le(this,this._map.set(t,!0))},Ue.prototype.remove=function(t){return Le(this,this._map.remove(t))},Ue.prototype.clear=function(){return Le(this,this._map.clear())},Ue.prototype.union=function(){var t=sn.call(arguments,0);return t=t.filter(function(t){return 0!==t.size}),0===t.length?this:0!==this.size||this.__ownerID||1!==t.length?this.withMutations(function(e){for(var n=0;n=0;n--)e={value:arguments[n],next:e};return this.__ownerID?(this.size=t,this._head=e,this.__hash=void 0,this.__altered=!0,this):Ge(t,e)},Ke.prototype.pushAll=function(t){if(t=r(t),0===t.size)return this;lt(t.size);var e=this.size,n=this._head;return t.reverse().forEach(function(t){e++,n={value:t,next:n}}),this.__ownerID?(this.size=e,this._head=n,this.__hash=void 0,this.__altered=!0,this):Ge(e,n)},Ke.prototype.pop=function(){return this.slice(1)},Ke.prototype.unshift=function(){return this.push.apply(this,arguments)},Ke.prototype.unshiftAll=function(t){return this.pushAll(t)},Ke.prototype.shift=function(){return this.pop.apply(this,arguments)},Ke.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Xe()},Ke.prototype.slice=function(t,e){if(m(t,e,this.size))return this;var n=g(t,this.size);if(_(e,this.size)!==this.size)return nt.prototype.slice.call(this,t,e);for(var r=this.size-n,i=this._head;n--;)i=i.next;return this.__ownerID?(this.size=r,this._head=i,this.__hash=void 0,this.__altered=!0,this):Ge(r,i)},Ke.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Ge(this.size,this._head,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},Ke.prototype.__iterate=function(t,e){if(e)return this.reverse().__iterate(t);for(var n=0,r=this._head;r&&!1!==t(r.value,n++,this);)r=r.next;return n},Ke.prototype.__iterator=function(t,e){if(e)return this.reverse().__iterator(t);var n=0,r=this._head;return new w(function(){if(r){var e=r.value;return r=r.next,E(t,n++,e)}return C()})},Ke.isStack=Ye;var rr="@@__IMMUTABLE_STACK__@@",ir=Ke.prototype;ir[rr]=!0,ir.withMutations=zn.withMutations,ir.asMutable=zn.asMutable,ir.asImmutable=zn.asImmutable,ir.wasAltered=zn.wasAltered;var or;e.Iterator=w,Qe(e,{toArray:function(){lt(this.size);var t=new Array(this.size||0);return this.valueSeq().__iterate(function(e,n){t[n]=e}),t},toIndexedSeq:function(){return new ie(this)},toJS:function(){return this.toSeq().map(function(t){return t&&"function"===typeof t.toJS?t.toJS():t}).__toJS()},toJSON:function(){return this.toSeq().map(function(t){return t&&"function"===typeof t.toJSON?t.toJSON():t}).__toJS()},toKeyedSeq:function(){return new re(this,!0)},toMap:function(){return ft(this.toKeyedSeq())},toObject:function(){lt(this.size);var t={};return this.__iterate(function(e,n){t[n]=e}),t},toOrderedMap:function(){return Jt(this.toKeyedSeq())},toOrderedSet:function(){return Be(a(this)?this.valueSeq():this)},toSet:function(){return Ue(a(this)?this.valueSeq():this)},toSetSeq:function(){return new oe(this)},toSeq:function(){return u(this)?this.toIndexedSeq():a(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Ke(a(this)?this.valueSeq():this)},toList:function(){return Lt(a(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(t,e){return 0===this.size?t+e:t+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+e},concat:function(){return xe(this,ye(this,sn.call(arguments,0)))},includes:function(t){return this.some(function(e){return X(e,t)})},entries:function(){return this.__iterator(wn)},every:function(t,e){lt(this.size);var n=!0;return this.__iterate(function(r,i,o){if(!t.call(e,r,i,o))return n=!1,!1}),n},filter:function(t,e){return xe(this,le(this,t,e,!0))},find:function(t,e,n){var r=this.findEntry(t,e);return r?r[1]:n},forEach:function(t,e){return lt(this.size),this.__iterate(e?t.bind(e):t)},join:function(t){lt(this.size),t=void 0!==t?""+t:",";var e="",n=!0;return this.__iterate(function(r){n?n=!1:e+=t,e+=null!==r&&void 0!==r?r.toString():""}),e},keys:function(){return this.__iterator(_n)},map:function(t,e){return xe(this,se(this,t,e))},reduce:function(t,e,n){lt(this.size);var r,i;return arguments.length<2?i=!0:r=e,this.__iterate(function(e,o,a){i?(i=!1,r=e):r=t.call(n,r,e,o,a)}),r},reduceRight:function(t,e,n){var r=this.toKeyedSeq().reverse();return r.reduce.apply(r,arguments)},reverse:function(){return xe(this,ce(this,!0))},slice:function(t,e){return xe(this,he(this,t,e,!0))},some:function(t,e){return!this.every(Ze(t),e)},sort:function(t){return xe(this,be(this,t))},values:function(){return this.__iterator(bn)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some(function(){return!0})},count:function(t,e){return d(t?this.toSeq().filter(t,e):this)},countBy:function(t,e){return fe(this,t,e)},equals:function(t){return Q(this,t)},entrySeq:function(){var t=this;if(t._cache)return new A(t._cache);var e=t.toSeq().map(Je).toIndexedSeq();return e.fromEntrySeq=function(){return t.toSeq()},e},filterNot:function(t,e){return this.filter(Ze(t),e)},findEntry:function(t,e,n){var r=n;return this.__iterate(function(n,i,o){if(t.call(e,n,i,o))return r=[i,n],!1}),r},findKey:function(t,e){var n=this.findEntry(t,e);return n&&n[0]},findLast:function(t,e,n){return this.toKeyedSeq().reverse().find(t,e,n)},findLastEntry:function(t,e,n){return this.toKeyedSeq().reverse().findEntry(t,e,n)},findLastKey:function(t,e){return this.toKeyedSeq().reverse().findKey(t,e)},first:function(){return this.find(y)},flatMap:function(t,e){return xe(this,ge(this,t,e))},flatten:function(t){return xe(this,me(this,t,!0))},fromEntrySeq:function(){return new ae(this)},get:function(t,e){return this.find(function(e,n){return X(n,t)},void 0,e)},getIn:function(t,e){for(var n,r=this,i=Ne(t);!(n=i.next()).done;){var o=n.value;if((r=r&&r.get?r.get(o,yn):yn)===yn)return e}return r},groupBy:function(t,e){return pe(this,t,e)},has:function(t){return this.get(t,yn)!==yn},hasIn:function(t){return this.getIn(t,yn)!==yn},isSubset:function(t){return t="function"===typeof t.includes?t:e(t),this.every(function(e){return t.includes(e)})},isSuperset:function(t){return t="function"===typeof t.isSubset?t:e(t),t.isSubset(this)},keyOf:function(t){return this.findKey(function(e){return X(e,t)})},keySeq:function(){return this.toSeq().map($e).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},lastKeyOf:function(t){return this.toKeyedSeq().reverse().keyOf(t)},max:function(t){return we(this,t)},maxBy:function(t,e){return we(this,e,t)},min:function(t){return we(this,t?tn(t):rn)},minBy:function(t,e){return we(this,e?tn(e):rn,t)},rest:function(){return this.slice(1)},skip:function(t){return this.slice(Math.max(0,t))},skipLast:function(t){return xe(this,this.toSeq().reverse().skip(t).reverse())},skipWhile:function(t,e){return xe(this,ve(this,t,e,!0))},skipUntil:function(t,e){return this.skipWhile(Ze(t),e)},sortBy:function(t,e){return xe(this,be(this,e,t))},take:function(t){return this.slice(0,Math.max(0,t))},takeLast:function(t){return xe(this,this.toSeq().reverse().take(t).reverse())},takeWhile:function(t,e){return xe(this,de(this,t,e))},takeUntil:function(t,e){return this.takeWhile(Ze(t),e)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=on(this))}});var ar=e.prototype;ar[cn]=!0,ar[xn]=ar.values,ar.__toJS=ar.toArray,ar.__toStringMapper=en,ar.inspect=ar.toSource=function(){return this.toString()},ar.chain=ar.flatMap,ar.contains=ar.includes,Qe(n,{flip:function(){return xe(this,ue(this))},mapEntries:function(t,e){var n=this,r=0;return xe(this,this.toSeq().map(function(i,o){return t.call(e,[o,i],r++,n)}).fromEntrySeq())},mapKeys:function(t,e){var n=this;return xe(this,this.toSeq().flip().map(function(r,i){return t.call(e,r,i,n)}).flip())}});var ur=n.prototype;return ur[ln]=!0,ur[xn]=ar.entries,ur.__toJS=ar.toObject,ur.__toStringMapper=function(t,e){return JSON.stringify(e)+": "+en(t)},Qe(r,{toKeyedSeq:function(){return new re(this,!1)},filter:function(t,e){return xe(this,le(this,t,e,!1))},findIndex:function(t,e){var n=this.findEntry(t,e);return n?n[0]:-1},indexOf:function(t){var e=this.keyOf(t);return void 0===e?-1:e},lastIndexOf:function(t){var e=this.lastKeyOf(t);return void 0===e?-1:e},reverse:function(){return xe(this,ce(this,!1))},slice:function(t,e){return xe(this,he(this,t,e,!1))},splice:function(t,e){var n=arguments.length;if(e=Math.max(0|e,0),0===n||2===n&&!e)return this;t=g(t,t<0?this.count():this.size);var r=this.slice(0,t);return xe(this,1===n?r:r.concat(h(arguments,2),this.slice(t+e)))},findLastIndex:function(t,e){var n=this.findLastEntry(t,e);return n?n[0]:-1},first:function(){return this.get(0)},flatten:function(t){return xe(this,me(this,t,!1))},get:function(t,e){return t=v(this,t),t<0||this.size===1/0||void 0!==this.size&&t>this.size?e:this.find(function(e,n){return n===t},void 0,e)},has:function(t){return(t=v(this,t))>=0&&(void 0!==this.size?this.size===1/0||t=arguments.length)?f=e[l]:(f=arguments[s],s+=1),u[l]=f,n.i(o.a)(f)||(c-=1),l+=1}return c<=0?a.apply(this,u):n.i(i.a)(c,r(t,u,a))}}e.a=r;var i=n(21),o=n(65)},function(t,e,n){"use strict";var r=n(1),i=n(29),o=n(45),a=n.i(r.a)(function(t){return!!n.i(i.a)(t)||!!t&&("object"===typeof t&&(!n.i(o.a)(t)&&(1===t.nodeType?!!t.length:0===t.length||t.length>0&&(t.hasOwnProperty(0)&&t.hasOwnProperty(t.length-1)))))});e.a=a},function(t,e,n){"use strict";function r(t){return"[object Function]"===Object.prototype.toString.call(t)}e.a=r},function(t,e,n){"use strict";function r(t){return null!=t&&"object"===typeof t&&!0===t["@@functional/placeholder"]}e.a=r},function(t,e,n){"use strict";function r(t,e){for(var n=0,r=e.length,i=Array(r);n]/;t.exports=i},function(t,e,n){"use strict";var r,i=n(11),o=n(103),a=/^[ \r\n\t\f]/,u=/<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/,s=n(111),c=s(function(t,e){if(t.namespaceURI!==o.svg||"innerHTML"in t)t.innerHTML=e;else{r=r||document.createElement("div"),r.innerHTML=""+e+"";for(var n=r.firstChild;n.firstChild;)t.appendChild(n.firstChild)}});if(i.canUseDOM){var l=document.createElement("div");l.innerHTML=" ",""===l.innerHTML&&(c=function(t,e){if(t.parentNode&&t.parentNode.replaceChild(t,t),a.test(e)||"<"===e[0]&&u.test(e)){t.innerHTML=String.fromCharCode(65279)+e;var n=t.firstChild;1===n.data.length?t.removeChild(n):n.deleteData(0,1)}else t.innerHTML=e}),l=null}t.exports=c},function(t,e,n){"use strict";function r(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}function i(t,e,n){for(var r=e.length-1;r>=0;r--){var i=e[r](t);if(i)return i}return function(e,r){throw new Error("Invalid value of type "+typeof t+" for "+n+" argument when connecting component "+r.wrappedComponentName+".")}}function o(t,e){return t===e}var a=n(537),u=n(544),s=n(538),c=n(539),l=n(540),f=n(541),p=Object.assign||function(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{},e=t.connectHOC,n=void 0===e?a.a:e,h=t.mapStateToPropsFactories,d=void 0===h?c.a:h,v=t.mapDispatchToPropsFactories,y=void 0===v?s.a:v,m=t.mergePropsFactories,g=void 0===m?l.a:m,_=t.selectorFactory,b=void 0===_?f.a:_;return function(t,e,a){var s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},c=s.pure,l=void 0===c||c,f=s.areStatesEqual,h=void 0===f?o:f,v=s.areOwnPropsEqual,m=void 0===v?u.a:v,_=s.areStatePropsEqual,w=void 0===_?u.a:_,E=s.areMergedPropsEqual,C=void 0===E?u.a:E,x=r(s,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),S=i(t,d,"mapStateToProps"),I=i(e,y,"mapDispatchToProps"),O=i(a,g,"mergeProps");return n(b,p({methodName:"connect",getDisplayName:function(t){return"Connect("+t+")"},shouldHandleStateChanges:Boolean(t),initMapStateToProps:S,initMapDispatchToProps:I,initMergeProps:O,pure:l,areStatesEqual:h,areOwnPropsEqual:m,areStatePropsEqual:w,areMergedPropsEqual:C},x))}}()},function(t,e,n){"use strict";function r(t,e){return t===e?0!==t||0!==e||1/t===1/e:t!==t&&e!==e}function i(t,e){if(r(t,e))return!0;if("object"!==typeof t||null===t||"object"!==typeof e||null===e)return!1;var n=Object.keys(t),i=Object.keys(e);if(n.length!==i.length)return!1;for(var a=0;a-1||a("96",t),!c.plugins[n]){e.extractEvents||a("97",t),c.plugins[n]=e;var r=e.eventTypes;for(var o in r)i(r[o],e,o)||a("98",o,t)}}}function i(t,e,n){c.eventNameDispatchConfigs.hasOwnProperty(n)&&a("99",n),c.eventNameDispatchConfigs[n]=t;var r=t.phasedRegistrationNames;if(r){for(var i in r)if(r.hasOwnProperty(i)){var u=r[i];o(u,e,n)}return!0}return!!t.registrationName&&(o(t.registrationName,e,n),!0)}function o(t,e,n){c.registrationNameModules[t]&&a("100",t),c.registrationNameModules[t]=e,c.registrationNameDependencies[t]=e.eventTypes[n].dependencies}var a=n(5),u=(n(3),null),s={},c={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},possibleRegistrationNames:null,injectEventPluginOrder:function(t){u&&a("101"),u=Array.prototype.slice.call(t),r()},injectEventPluginsByName:function(t){var e=!1;for(var n in t)if(t.hasOwnProperty(n)){var i=t[n];s.hasOwnProperty(n)&&s[n]===i||(s[n]&&a("102",n),s[n]=i,e=!0)}e&&r()},getPluginModuleForEvent:function(t){var e=t.dispatchConfig;if(e.registrationName)return c.registrationNameModules[e.registrationName]||null;if(void 0!==e.phasedRegistrationNames){var n=e.phasedRegistrationNames;for(var r in n)if(n.hasOwnProperty(r)){var i=c.registrationNameModules[n[r]];if(i)return i}}return null},_resetEventPlugins:function(){u=null;for(var t in s)s.hasOwnProperty(t)&&delete s[t];c.plugins.length=0;var e=c.eventNameDispatchConfigs;for(var n in e)e.hasOwnProperty(n)&&delete e[n];var r=c.registrationNameModules;for(var i in r)r.hasOwnProperty(i)&&delete r[i]}};t.exports=c},function(t,e,n){"use strict";function r(t){return"topMouseUp"===t||"topTouchEnd"===t||"topTouchCancel"===t}function i(t){return"topMouseMove"===t||"topTouchMove"===t}function o(t){return"topMouseDown"===t||"topTouchStart"===t}function a(t,e,n,r){var i=t.type||"unknown-event";t.currentTarget=m.getNodeFromInstance(r),e?v.invokeGuardedCallbackWithCatch(i,n,t):v.invokeGuardedCallback(i,n,t),t.currentTarget=null}function u(t,e){var n=t._dispatchListeners,r=t._dispatchInstances;if(Array.isArray(n))for(var i=0;i0&&r.length<20?n+" (keys: "+r.join(", ")+")":n}function o(t,e){var n=u.get(t);if(!n){return null}return n}var a=n(5),u=(n(27),n(52)),s=(n(19),n(24)),c=(n(3),n(4),{isMounted:function(t){var e=u.get(t);return!!e&&!!e._renderedComponent},enqueueCallback:function(t,e,n){c.validateCallback(e,n);var i=o(t);if(!i)return null;i._pendingCallbacks?i._pendingCallbacks.push(e):i._pendingCallbacks=[e],r(i)},enqueueCallbackInternal:function(t,e){t._pendingCallbacks?t._pendingCallbacks.push(e):t._pendingCallbacks=[e],r(t)},enqueueForceUpdate:function(t){var e=o(t,"forceUpdate");e&&(e._pendingForceUpdate=!0,r(e))},enqueueReplaceState:function(t,e,n){var i=o(t,"replaceState");i&&(i._pendingStateQueue=[e],i._pendingReplaceState=!0,void 0!==n&&null!==n&&(c.validateCallback(n,"replaceState"),i._pendingCallbacks?i._pendingCallbacks.push(n):i._pendingCallbacks=[n]),r(i))},enqueueSetState:function(t,e){var n=o(t,"setState");if(n){(n._pendingStateQueue||(n._pendingStateQueue=[])).push(e),r(n)}},enqueueElementInternal:function(t,e,n){t._pendingElement=e,t._context=n,r(t)},validateCallback:function(t,e){t&&"function"!==typeof t&&a("122",e,i(t))}});t.exports=c},function(t,e,n){"use strict";var r=function(t){return"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,n,r,i){MSApp.execUnsafeLocalFunction(function(){return t(e,n,r,i)})}:t};t.exports=r},function(t,e,n){"use strict";function r(t){var e,n=t.keyCode;return"charCode"in t?0===(e=t.charCode)&&13===n&&(e=13):e=n,e>=32||13===e?e:0}t.exports=r},function(t,e,n){"use strict";function r(t){var e=this,n=e.nativeEvent;if(n.getModifierState)return n.getModifierState(t);var r=o[t];return!!r&&!!n[r]}function i(t){return r}var o={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};t.exports=i},function(t,e,n){"use strict";function r(t){var e=t.target||t.srcElement||window;return e.correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}t.exports=r},function(t,e,n){"use strict";function r(t,e){if(!o.canUseDOM||e&&!("addEventListener"in document))return!1;var n="on"+t,r=n in document;if(!r){var a=document.createElement("div");a.setAttribute(n,"return;"),r="function"===typeof a[n]}return!r&&i&&"wheel"===t&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}var i,o=n(11);o.canUseDOM&&(i=document.implementation&&document.implementation.hasFeature&&!0!==document.implementation.hasFeature("","")),t.exports=r},function(t,e,n){"use strict";function r(t,e){var n=null===t||!1===t,r=null===e||!1===e;if(n||r)return n===r;var i=typeof t,o=typeof e;return"string"===i||"number"===i?"string"===o||"number"===o:"object"===o&&t.type===e.type&&t.key===e.key}t.exports=r},function(t,e,n){"use strict";var r=(n(6),n(14)),i=(n(4),r);t.exports=i},function(t,e,n){"use strict";function r(t){"undefined"!==typeof console&&"function"===typeof console.error&&console.error(t);try{throw new Error(t)}catch(t){}}e.a=r},function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"===typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";function r(t,e,n){return{type:u,pageGroupInfo:t,pageInfo:e,questions:n}}function i(t,e,n){return{type:s,pageGroupInfo:t,pageInfo:e,questions:n}}function o(t,e){return{question:t,questionDiv:e,type:c}}function a(t,e){return{question:t,questionDiv:e,type:l}}e.b=r,e.a=i,e.c=o,e.d=a;var u="plugin_pageLoad",s="plugin_pageUnload",c="plugin_questionLoad",l="plugin_questionUnLoad"},function(t,e,n){"use strict";function r(t,e){if(e.type!==p.e)return t.questions;var n=e.questionId,r=e.name,i=e.value,a=t.questions,s=u(a,n),c=a.get(s),l={form:{}};l.form[r]=i;var f=o(t.lastInteractionTime);Object.assign(l,f);var d=h.a(c,l);return a.set(s,d)}function i(t,e){if(e.type!==p.d)return t.questions;var n=t.questions,r=e.rowId,i=e.colId,s=e.questionId,c=e.val,l=u(n,s),f=n.get(l),d={};void 0===i||null===i?(d[r]={selected:c},"single-choice"===f.type&&Object.entries(f.rows).forEach(function(t){var e=v(t,1),n=e[0];n!==r&&(d[n]={selected:!1})})):(d[r]={},d[r][i]={selected:c},"single-matrix"===f.type&&Object.entries(f.cols).forEach(function(t){var e=v(t,1),n=e[0];n!==i&&(d[r][n]={selected:!1})}));var y=o(t.lastInteractionTime),m=a(f.totalClicks);Object.assign(d,y,m);var g=h.a(f,d);return n.set(l,g)}function o(t){var e=new Date;return{answeredWhen:e,duration:e.getTime()-t.getTime()}}function a(t){return{totalClicks:++t}}function u(t,e){return t.findIndex(function(t){return t.id===e})}function s(t,e){if(e.type===p.f){c(t.questions.toArray(),t.token).then(function(r){r.token===t.token&&(r.questions&&0!==r.questions.length?e.asyncDispatch(n.i(f.b)(r)):e.asyncDispatch(n.i(d.e)()))})}}function c(t,e){return window.isDev?l(t,e):window.interpreter.submitAnswer(t)}function l(t,e){return y++,y>4?Promise.resolve({pageInfo:{attrib1:"evaluated attrib1"},questions:[],token:e}):new Promise(function(t,n){setTimeout(function(){var n=[{id:"q1",type:"single-choice",text:"q1 text"+Date.now(),rows:{_generatedIdentifierName2:{text:" aa"},_generatedIdentifierName3:{text:" bb"}}},{id:"q2",type:"multiple-choice",text:"q2 text",rows:{_generatedIdentifierName4:{text:" aa"},_generatedIdentifierName5:{text:" bb"}}},{id:"q3",type:"multiple-matrix",text:"q3 text",rotateCol:!0,rows:{_generatedIdentifierName6:{text:" aa"},_generatedIdentifierName7:{text:" bb"}},cols:{_generatedIdentifierName5:{text:" col1"},_generatedIdentifierName6:{text:" col2"}}}];t({pageInfo:{randomize:"true"},pageGroupInfo:{},questions:n,token:e})},100)})}e.c=r,e.b=i,e.a=s;var f=n(28),p=n(32),h=n(326),d=n(42),v=function(){function t(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,u=t[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&u.return&&u.return()}finally{if(i)throw o}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),y=0},function(t,e,n){"use strict";var r=n(14),i={listen:function(t,e,n){return t.addEventListener?(t.addEventListener(e,n,!1),{remove:function(){t.removeEventListener(e,n,!1)}}):t.attachEvent?(t.attachEvent("on"+e,n),{remove:function(){t.detachEvent("on"+e,n)}}):void 0},capture:function(t,e,n){return t.addEventListener?(t.addEventListener(e,n,!0),{remove:function(){t.removeEventListener(e,n,!0)}}):{remove:r}},registerDefault:function(){}};t.exports=i},function(t,e,n){"use strict";function r(t){try{t.focus()}catch(t){}}t.exports=r},function(t,e,n){"use strict";function r(t){if("undefined"===typeof(t=t||("undefined"!==typeof document?document:void 0)))return null;try{return t.activeElement||t.body}catch(e){return t.body}}t.exports=r},function(t,e,n){"use strict";var r=n(267),i=r.a.Symbol;e.a=i},function(t,e){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function i(t){if(l===setTimeout)return setTimeout(t,0);if((l===n||!l)&&setTimeout)return l=setTimeout,setTimeout(t,0);try{return l(t,0)}catch(e){try{return l.call(null,t,0)}catch(e){return l.call(this,t,0)}}}function o(t){if(f===clearTimeout)return clearTimeout(t);if((f===r||!f)&&clearTimeout)return f=clearTimeout,clearTimeout(t);try{return f(t)}catch(e){try{return f.call(null,t)}catch(e){return f.call(this,t)}}}function a(){v&&h&&(v=!1,h.length?d=h.concat(d):y=-1,d.length&&u())}function u(){if(!v){var t=i(a);v=!0;for(var e=d.length;e;){for(h=d,d=[];++y1)for(var n=1;n=i.length||e<-i.length)return i;var o=e<0?i.length:0,a=o+e,u=n.i(r.a)(i);return u[a]=t(i[a]),u});e.a=o},function(t,e,n){"use strict";var r=n(0),i=n.i(r.a)(function(t,e){return t&&e});e.a=i},function(t,e,n){"use strict";var r=n(0),i=n(7),o=n(155),a=n.i(r.a)(n.i(i.a)(["any"],o.a,function(t,e){for(var n=0;n1){var f=!n.i(s.a)(c)&&n.i(i.a)(l,c)?c[l]:n.i(a.a)(e[1])?[]:{};r=t(Array.prototype.slice.call(e,1),r,f)}if(n.i(a.a)(l)&&n.i(o.a)(c)){var p=[].concat(c);return p[l]=r,p}return n.i(u.a)(l,r,c)});e.a=c},function(t,e,n){"use strict";var r=n(21),i=n(0),o=n.i(i.a)(function(t,e){return n.i(r.a)(t.length,function(){return t.apply(e,arguments)})});e.a=o},function(t,e,n){"use strict";function r(){if(0===arguments.length)throw new Error("composeK requires at least one argument");var t=Array.prototype.slice.call(arguments),e=t.pop();return n.i(o.a)(o.a.apply(this,n.i(a.a)(i.a,t)),e)}e.a=r;var i=n(83),o=n(84),a=n(13)},function(t,e,n){"use strict";var r=n(0),i=n(86),o=n(70),a=n.i(r.a)(function(t,e){if(t>10)throw new Error("Constructor with greater than ten arguments");return 0===t?function(){return new e}:n.i(i.a)(n.i(o.a)(t,function(t,n,r,i,o,a,u,s,c,l){switch(arguments.length){case 1:return new e(t);case 2:return new e(t,n);case 3:return new e(t,n,r);case 4:return new e(t,n,r,i);case 5:return new e(t,n,r,i,o);case 6:return new e(t,n,r,i,o,a);case 7:return new e(t,n,r,i,o,a,u);case 8:return new e(t,n,r,i,o,a,u,s);case 9:return new e(t,n,r,i,o,a,u,s,c);case 10:return new e(t,n,r,i,o,a,u,s,c,l)}}))});e.a=a},function(t,e,n){"use strict";var r=n(0),i=n(66),o=n(10),a=n(35),u=n(48),s=n(23),c=n.i(r.a)(function(t,e){return n.i(o.a)(n.i(s.a)(a.a,0,n.i(u.a)("length",e)),function(){var r=arguments,o=this;return t.apply(o,n.i(i.a)(function(t){return t.apply(o,r)},e))})});e.a=c},function(t,e,n){"use strict";var r=n(0),i=n.i(r.a)(function(t,e){return null==e||e!==e?t:e});e.a=i},function(t,e,n){"use strict";var r=n(34),i=n(0),o=n.i(i.a)(function(t,e){for(var i=[],o=0,a=t.length;o=0;)e=t(n[r],e),r-=1;return e});e.a=i},function(t,e,n){"use strict";var r=n(2),i=n.i(r.a)(function(t,e,n){var r=Array.prototype.slice.call(n,0);return r.splice(t,e),r});e.a=i},function(t,e,n){"use strict";var r=n(0),i=n(82),o=n(13),a=n(174),u=n(175),s=n.i(r.a)(function(t,e){return"function"===typeof e.sequence?e.sequence(t):n.i(u.a)(function(t,e){return n.i(i.a)(n.i(o.a)(a.a,t),e)},t([]),e)});e.a=s},function(t,e,n){"use strict";var r=n(58),i=n(23),o=n.i(i.a)(r.a,0);e.a=o},function(t,e,n){"use strict";var r=n(0),i=n(143),o=n.i(r.a)(function(t,e){return n.i(i.a)(t>=0?e.length-t:0,e)});e.a=o},function(t,e,n){"use strict";var r=n(0),i=n.i(r.a)(function(t,e){var n,r=Number(e),i=0;if(r<0||isNaN(r))throw new RangeError("n must be a non-negative number");for(n=new Array(r);i.":"function"===typeof e?" Instead of passing a class like Foo, pass React.createElement(Foo) or .":null!=e&&void 0!==e.props?" This may be caused by unintentionally loading two independent copies of React.":"");var a,u=y.createElement(q,{child:e});if(t){var s=E.get(t);a=s._processChildContext(s._context)}else a=O;var l=p(n);if(l){var f=l._currentElement,d=f.props.child;if(T(d,e)){var v=l._renderedComponent.getPublicInstance(),m=r&&function(){r.call(v)};return L._updateRootComponent(l,u,a,n,m),v}L.unmountComponentAtNode(n)}var g=i(n),_=g&&!!o(g),b=c(n),w=_&&!l&&!b,C=L._renderNewRootComponent(u,n,w,a)._renderedComponent.getPublicInstance();return r&&r.call(C),C},render:function(t,e,n){return L._renderSubtreeIntoContainer(null,t,e,n)},unmountComponentAtNode:function(t){l(t)||h("40");var e=p(t);if(!e){c(t),1===t.nodeType&&t.hasAttribute(M);return!1}return delete j[e._instance.rootID],I.batchedUpdates(s,e,t,!1),!0},_mountImageIntoNode:function(t,e,n,o,a){if(l(e)||h("41"),o){var u=i(e);if(C.canReuseMarkup(t,u))return void g.precacheNode(n,u);var s=u.getAttribute(C.CHECKSUM_ATTR_NAME);u.removeAttribute(C.CHECKSUM_ATTR_NAME);var c=u.outerHTML;u.setAttribute(C.CHECKSUM_ATTR_NAME,s);var f=t,p=r(f,c),v=" (client) "+f.substring(p-20,p+20)+"\n (server) "+c.substring(p-20,p+20);e.nodeType===D&&h("42",v)}if(e.nodeType===D&&h("43"),a.useCreateElement){for(;e.lastChild;)e.removeChild(e.lastChild);d.insertTreeBefore(e,t,null)}else k(e,t),g.precacheNode(n,e.firstChild)}};t.exports=L},function(t,e,n){"use strict";var r=n(5),i=n(40),o=(n(3),{HOST:0,COMPOSITE:1,EMPTY:2,getType:function(t){return null===t||!1===t?o.EMPTY:i.isValidElement(t)?"function"===typeof t.type?o.COMPOSITE:o.HOST:void r("26",t)}});t.exports=o},function(t,e,n){"use strict";var r={currentScrollLeft:0,currentScrollTop:0,refreshScrollValues:function(t){r.currentScrollLeft=t.x,r.currentScrollTop=t.y}};t.exports=r},function(t,e,n){"use strict";function r(t,e){return null==e&&i("30"),null==t?e:Array.isArray(t)?Array.isArray(e)?(t.push.apply(t,e),t):(t.push(e),t):Array.isArray(e)?[t].concat(e):[t,e]}var i=n(5);n(3);t.exports=r},function(t,e,n){"use strict";function r(t,e,n){Array.isArray(t)?t.forEach(e,n):t&&e.call(n,t)}t.exports=r},function(t,e,n){"use strict";function r(t){for(var e;(e=t._renderedNodeType)===i.COMPOSITE;)t=t._renderedComponent;return e===i.HOST?t._renderedComponent:e===i.EMPTY?null:void 0}var i=n(196);t.exports=r},function(t,e,n){"use strict";function r(){return!o&&i.canUseDOM&&(o="textContent"in document.documentElement?"textContent":"innerText"),o}var i=n(11),o=null;t.exports=r},function(t,e,n){"use strict";function r(t){var e=t.type,n=t.nodeName;return n&&"input"===n.toLowerCase()&&("checkbox"===e||"radio"===e)}function i(t){return t._wrapperState.valueTracker}function o(t,e){t._wrapperState.valueTracker=e}function a(t){t._wrapperState.valueTracker=null}function u(t){var e;return t&&(e=r(t)?""+t.checked:t.value),e}var s=n(8),c={_getTrackerFromNode:function(t){return i(s.getInstanceFromNode(t))},track:function(t){if(!i(t)){var e=s.getNodeFromInstance(t),n=r(e)?"checked":"value",u=Object.getOwnPropertyDescriptor(e.constructor.prototype,n),c=""+e[n];e.hasOwnProperty(n)||"function"!==typeof u.get||"function"!==typeof u.set||(Object.defineProperty(e,n,{enumerable:u.enumerable,configurable:!0,get:function(){return u.get.call(this)},set:function(t){c=""+t,u.set.call(this,t)}}),o(t,{getValue:function(){return c},setValue:function(t){c=""+t},stopTracking:function(){a(t),delete e[n]}}))}},updateValueIfChanged:function(t){if(!t)return!1;var e=i(t);if(!e)return c.track(t),!0;var n=e.getValue(),r=u(s.getNodeFromInstance(t));return r!==n&&(e.setValue(r),!0)},stopTracking:function(t){var e=i(t);e&&e.stopTracking()}};t.exports=c},function(t,e,n){"use strict";function r(t){if(t){var e=t.getName();if(e)return" Check the render method of `"+e+"`."}return""}function i(t){return"function"===typeof t&&"undefined"!==typeof t.prototype&&"function"===typeof t.prototype.mountComponent&&"function"===typeof t.prototype.receiveComponent}function o(t,e){var n;if(null===t||!1===t)n=c.create(o);else if("object"===typeof t){var u=t,s=u.type;if("function"!==typeof s&&"string"!==typeof s){var p="";p+=r(u._owner),a("130",null==s?s:typeof s,p)}"string"===typeof u.type?n=l.createInternalComponent(u):i(u.type)?(n=new u.type(u),n.getHostNode||(n.getHostNode=n.getNativeNode)):n=new f(u)}else"string"===typeof t||"number"===typeof t?n=l.createInstanceForText(t):a("131",typeof t);return n._mountIndex=0,n._mountImage=null,n}var a=n(5),u=n(6),s=n(485),c=n(191),l=n(193),f=(n(555),n(3),n(4),function(t){this.construct(t)});u(f.prototype,s,{_instantiateReactComponent:o}),t.exports=o},function(t,e,n){"use strict";function r(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return"input"===e?!!i[t.type]:"textarea"===e}var i={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};t.exports=r},function(t,e,n){"use strict";var r=n(11),i=n(77),o=n(78),a=function(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&3===n.nodeType)return void(n.nodeValue=e)}t.textContent=e};r.canUseDOM&&("textContent"in document.documentElement||(a=function(t,e){if(3===t.nodeType)return void(t.nodeValue=e);o(t,i(e))})),t.exports=a},function(t,e,n){"use strict";function r(t,e){return t&&"object"===typeof t&&null!=t.key?c.escape(t.key):e.toString(36)}function i(t,e,n,o){var p=typeof t;if("undefined"!==p&&"boolean"!==p||(t=null),null===t||"string"===p||"number"===p||"object"===p&&t.$$typeof===u)return n(o,t,""===e?l+r(t,0):e),1;var h,d,v=0,y=""===e?l:e+f;if(Array.isArray(t))for(var m=0;mc){for(var e=0,n=a.length-s;e link[data-plugin="true"]').forEach(function(t){t.remove()});var e=this.props,n=e.jsPluginImports,r=e.cssPluginImports;n.filter(function(e){return!t.thirdPartyJsLibs.has(e)}).map(function(e){var n=document.createElement("script");n.src=e,n.async=!0,n.dataset.plugin="true",document.body.appendChild(n),e.includes("msl_plugins_repo")||t.thirdPartyJsLibs.add(e)}),r.map(function(t){var e=document.createElement("link");e.rel="stylesheet",e.type="text/css",e.href=t,e.dataset.plugin="true",document.body.appendChild(e)})}},{key:"componentDidUpdate",value:function(){this.insertPlugins()}},{key:"componentDidMount",value:function(){this.insertPlugins()}},{key:"render",value:function(){return s.a.createElement("div",{id:"plugins"})}}]),e}(a.Component)},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function o(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a=n(25),u=(n.n(a),n(20)),s=n.n(u),c=n(228),l=n(43),f=n(55),p=n(120),h=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:c.a,e=arguments[1];if(t.isLocked)switch(e.type){case r.a:case l.c:case l.d:break;default:return t}h.a.passEventsToPlugins(e);var o=n.i(c.b)(t,e);if(o)return o;n.i(i.a)(t,e);var d=n.i(a.a)(t,e),v=n.i(u.a)(t,e),y=n.i(p.a)(t,e),m=n.i(f.a)(t,e);return{pageInfo:y,pageGroupInfo:m,questions:n.i(s.a)(t,e,y,m),isLocked:d,lastInteractionTime:v,token:t.token,isStarted:t.isStarted,isEnded:t.isEnded,jsPluginImports:t.jsPluginImports,cssPluginImports:t.cssPluginImports}};e.a=d},function(t,e,n){"use strict";function r(t,e,r,o){var a=e.questions;n.i(s.b)(r.randomize)&&n.i(s.d)(a),n.i(s.b)(r.rotate)&&n.i(s.e)(a);var l=n.i(c.List)(a);return e.type===u.a?l.map(i):l}function i(t){return t=o(t),t=a(t)}function o(t){var e={displayedWhen:Date.now(),answeredWhen:null,duration:0,totalClicks:0,geoLocation:null};return Object.assign({},t,e)}function a(t){switch(t.type){case"single-choice":case"multiple-choice":return function(t){var e={},r=[];return Object.entries(t.rows).map(function(t){var n=l(t,2),i=n[0],o=n[1];r.push(i),e[i]=Object.assign({},o,{id:i,selected:!1})}),n.i(s.b)(t.randomize)&&n.i(s.d)(r),n.i(s.b)(t.rotate)&&n.i(s.e)(r),Object.assign({},t,e,{rowIds:r})}(t);case"single-matrix":case"multiple-matrix":return function(t){var e=Object.entries(t.rows),r=Object.entries(t.cols),i={},o=[];e.forEach(function(t){var e=l(t,2),n=e[0],a=e[1];o.push(n);var u=Object.assign({},a,{id:n});r.forEach(function(t){var e=l(t,2),n=e[0],r=e[1];u[n]=Object.assign({},r,{id:n,selected:!1})}),i[n]=u}),n.i(s.b)(t.randomize)&&n.i(s.d)(o),n.i(s.b)(t.rotate)&&n.i(s.e)(o);var a=[];return r.forEach(function(t){var e=l(t,1),n=e[0];a.push(n)}),n.i(s.b)(t.randomizeCol)&&n.i(s.d)(a),n.i(s.b)(t.rotateCol)&&n.i(s.e)(a),Object.assign({},t,i,{rowIds:o},{colIds:a})}(t);default:return t}}e.a=r;var u=n(28),s=n(43),c=n(57),l=(n.n(c),function(){function t(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,u=t[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&u.return&&u.return()}finally{if(i)throw o}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}())},function(t,e,n){"use strict";function r(t,e,r,s){switch(e.type){case i.a:return n.i(o.a)(t,e,r,s);case a.d:return n.i(u.b)(t,e);case a.e:return n.i(u.c)(t,e);default:return t.questions}}e.a=r;var i=n(28),o=n(239),a=n(32),u=n(121)},function(t,e,n){"use strict";function r(t,e){return e.type===i.a?e.pageGroupInfo:t.pageGroupInfo}e.a=r;var i=n(28)},function(t,e,n){"use strict";function r(t,e){return e.type===i.a?e.pageInfo:t.pageInfo}e.a=r;var i=n(28)},function(t,e,n){"use strict";Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/))},function(t,e,n){"use strict";function r(t){return t}function i(t,e,n){function i(t,e){var n=g.hasOwnProperty(e)?g[e]:null;E.hasOwnProperty(e)&&u("OVERRIDE_BASE"===n,"ReactClassInterface: You are attempting to override `%s` from your class specification. Ensure that your method names do not overlap with React methods.",e),t&&u("DEFINE_MANY"===n||"DEFINE_MANY_MERGED"===n,"ReactClassInterface: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",e)}function c(t,n){if(n){u("function"!==typeof n,"ReactClass: You're attempting to use a component class or function as a mixin. Instead, just use a regular object."),u(!e(n),"ReactClass: You're attempting to use a component as a mixin. Instead, just use a regular object.");var r=t.prototype,o=r.__reactAutoBindPairs;n.hasOwnProperty(s)&&_.mixins(t,n.mixins);for(var a in n)if(n.hasOwnProperty(a)&&a!==s){var c=n[a],l=r.hasOwnProperty(a);if(i(l,a),_.hasOwnProperty(a))_[a](t,c);else{var f=g.hasOwnProperty(a),d="function"===typeof c,v=d&&!f&&!l&&!1!==n.autobind;if(v)o.push(a,c),r[a]=c;else if(l){var y=g[a];u(f&&("DEFINE_MANY_MERGED"===y||"DEFINE_MANY"===y),"ReactClass: Unexpected spec policy %s for key %s when mixing in component specs.",y,a),"DEFINE_MANY_MERGED"===y?r[a]=p(r[a],c):"DEFINE_MANY"===y&&(r[a]=h(r[a],c))}else r[a]=c}}}else;}function l(t,e){if(e)for(var n in e){var r=e[n];if(e.hasOwnProperty(n)){var i=n in _;u(!i,'ReactClass: You are attempting to define a reserved property, `%s`, that shouldn\'t be on the "statics" key. Define it as an instance property instead; it will still be accessible on the constructor.',n);var o=n in t;u(!o,"ReactClass: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",n),t[n]=r}}}function f(t,e){u(t&&e&&"object"===typeof t&&"object"===typeof e,"mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.");for(var n in e)e.hasOwnProperty(n)&&(u(void 0===t[n],"mergeIntoWithNoDuplicateKeys(): Tried to merge two objects with the same key: `%s`. This conflict may be due to a mixin; in particular, this may be caused by two getInitialState() or getDefaultProps() methods returning objects with clashing keys.",n),t[n]=e[n]);return t}function p(t,e){return function(){var n=t.apply(this,arguments),r=e.apply(this,arguments);if(null==n)return r;if(null==r)return n;var i={};return f(i,n),f(i,r),i}}function h(t,e){return function(){t.apply(this,arguments),e.apply(this,arguments)}}function d(t,e){var n=e.bind(t);return n}function v(t){for(var e=t.__reactAutoBindPairs,n=0;n":"<"+t+">",u[t]=!a.firstChild),u[t]?p[t]:null}var i=n(11),o=n(3),a=i.canUseDOM?document.createElement("div"):null,u={},s=[1,'"],c=[1,"","
"],l=[3,"","
"],f=[1,'',""],p={"*":[1,"?
","
"],area:[1,"",""],col:[2,"","
"],legend:[1,"
","
"],param:[1,"",""],tr:[2,"","
"],optgroup:s,option:s,caption:c,colgroup:c,tbody:c,tfoot:c,thead:c,td:l,th:l};["circle","clipPath","defs","ellipse","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","text","tspan"].forEach(function(t){p[t]=f,u[t]=!0}),t.exports=r},function(t,e,n){"use strict";function r(t){return t.Window&&t instanceof t.Window?{x:t.pageXOffset||t.document.documentElement.scrollLeft,y:t.pageYOffset||t.document.documentElement.scrollTop}:{x:t.scrollLeft,y:t.scrollTop}}t.exports=r},function(t,e,n){"use strict";function r(t){return t.replace(i,"-$1").toLowerCase()}var i=/([A-Z])/g;t.exports=r},function(t,e,n){"use strict";function r(t){return i(t).replace(o,"-ms-")}var i=n(254),o=/^ms-/;t.exports=r},function(t,e,n){"use strict";function r(t){var e=t?t.ownerDocument||t:document,n=e.defaultView||window;return!(!t||!("function"===typeof n.Node?t instanceof n.Node:"object"===typeof t&&"number"===typeof t.nodeType&&"string"===typeof t.nodeName))}t.exports=r},function(t,e,n){"use strict";function r(t){return i(t)&&3==t.nodeType}var i=n(256);t.exports=r},function(t,e,n){"use strict";function r(t){var e={};return function(n){return e.hasOwnProperty(n)||(e[n]=t.call(this,n)),e[n]}}t.exports=r},function(t,e,n){"use strict";var r={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o=Object.defineProperty,a=Object.getOwnPropertyNames,u=Object.getOwnPropertySymbols,s=Object.getOwnPropertyDescriptor,c=Object.getPrototypeOf,l=c&&c(Object);t.exports=function t(e,n,f){if("string"!==typeof n){if(l){var p=c(n);p&&p!==l&&t(e,p,f)}var h=a(n);u&&(h=h.concat(u(n)));for(var d=0;d=0?r:0);n=0&&t(e[r]);)r-=1;return n.i(i.a)(0,r+1,e)}e.a=r;var i=n(18)},function(t,e,n){"use strict";function r(t,e,r,u){function s(t,e){return i(t,e,r.slice(),u.slice())}var c=n.i(o.a)(t),l=n.i(o.a)(e);return!n.i(a.a)(function(t,e){return!n.i(a.a)(s,e,t)},l,c)}function i(t,e,o,a){if(n.i(c.a)(t,e))return!0;var p=n.i(f.a)(t);if(p!==n.i(f.a)(e))return!1;if(null==t||null==e)return!1;if("function"===typeof t["fantasy-land/equals"]||"function"===typeof e["fantasy-land/equals"])return"function"===typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](e)&&"function"===typeof e["fantasy-land/equals"]&&e["fantasy-land/equals"](t);if("function"===typeof t.equals||"function"===typeof e.equals)return"function"===typeof t.equals&&t.equals(e)&&"function"===typeof e.equals&&e.equals(t);switch(p){case"Arguments":case"Array":case"Object":if("function"===typeof t.constructor&&"Promise"===n.i(u.a)(t.constructor))return t===e;break;case"Boolean":case"Number":case"String":if(typeof t!==typeof e||!n.i(c.a)(t.valueOf(),e.valueOf()))return!1;break;case"Date":if(!n.i(c.a)(t.valueOf(),e.valueOf()))return!1;break;case"Error":return t.name===e.name&&t.message===e.message;case"RegExp":if(t.source!==e.source||t.global!==e.global||t.ignoreCase!==e.ignoreCase||t.multiline!==e.multiline||t.sticky!==e.sticky||t.unicode!==e.unicode)return!1}for(var h=o.length-1;h>=0;){if(o[h]===t)return a[h]===e;h-=1}switch(p){case"Map":return t.size===e.size&&r(t.entries(),e.entries(),o.concat([t]),a.concat([e]));case"Set":return t.size===e.size&&r(t.values(),e.values(),o.concat([t]),a.concat([e]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var d=n.i(l.a)(t);if(d.length!==n.i(l.a)(e).length)return!1;var v=o.concat([t]),y=a.concat([e]);for(h=d.length-1;h>=0;){var m=d[h];if(!n.i(s.a)(m,e)||!i(e[m],t[m],v,y))return!1;h-=1}return!0}e.a=i;var o=n(335),a=n(61),u=n(341),s=n(12),c=n(146),l=n(22),f=n(99)},function(t,e,n){"use strict";var r=n(340),i=n(63),o=n(16),a=n(9),u=function(t){return{"@@transducer/init":a.a.init,"@@transducer/result":function(e){return t["@@transducer/result"](e)},"@@transducer/step":function(e,i){var o=t["@@transducer/step"](e,i);return o["@@transducer/reduced"]?n.i(r.a)(o):o}}},s=function(t){var e=u(t);return{"@@transducer/init":a.a.init,"@@transducer/result":function(t){return e["@@transducer/result"](t)},"@@transducer/step":function(t,r){return n.i(i.a)(r)?n.i(o.a)(e,t,r):n.i(o.a)(e,t,[r])}}};e.a=s},function(t,e,n){"use strict";function r(t){return{"@@transducer/value":t,"@@transducer/reduced":!0}}e.a=r},function(t,e,n){"use strict";function r(t){var e=String(t).match(/^function (\w*)/);return null==e?"":e[1]}e.a=r},function(t,e,n){"use strict";function r(t){return"[object RegExp]"===Object.prototype.toString.call(t)}e.a=r},function(t,e,n){"use strict";function r(t){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),r=1,o=arguments.length;r":r(o,a)},f=function(t,e){return n.i(o.a)(function(e){return n.i(a.a)(e)+": "+l(t[e])},e.slice().sort())};switch(Object.prototype.toString.call(t)){case"[object Arguments]":return"(function() { return arguments; }("+n.i(o.a)(l,t).join(", ")+"))";case"[object Array]":return"["+n.i(o.a)(l,t).concat(f(t,n.i(c.a)(function(t){return/^\d+$/.test(t)},n.i(s.a)(t)))).join(", ")+"]";case"[object Boolean]":return"object"===typeof t?"new Boolean("+l(t.valueOf())+")":t.toString();case"[object Date]":return"new Date("+(isNaN(t.valueOf())?l(NaN):n.i(a.a)(n.i(u.a)(t)))+")";case"[object Null]":return"null";case"[object Number]":return"object"===typeof t?"new Number("+l(t.valueOf())+")":1/t===-1/0?"-0":t.toString(10);case"[object String]":return"object"===typeof t?"new String("+l(t.valueOf())+")":n.i(a.a)(t);case"[object Undefined]":return"undefined";default:if("function"===typeof t.toString){var p=t.toString();if("[object Object]"!==p)return p}return"{"+f(t,n.i(s.a)(t)).join(", ")+"}"}}e.a=r;var i=n(34),o=n(66),a=n(347),u=n(349),s=n(22),c=n(72)},function(t,e,n){"use strict";var r=n(0),i=n(30),o=n(9),a=function(){function t(t,e){this.xf=e,this.f=t,this.all=!0}return t.prototype["@@transducer/init"]=o.a.init,t.prototype["@@transducer/result"]=function(t){return this.all&&(t=this.xf["@@transducer/step"](t,!0)),this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,e){return this.f(e)||(this.all=!1,t=n.i(i.a)(this.xf["@@transducer/step"](t,!1))),t},t}(),u=n.i(r.a)(function(t,e){return new a(t,e)});e.a=u},function(t,e,n){"use strict";var r=n(17),i=n(0),o=n(9),a=function(){function t(t,e){this.xf=e,this.pos=0,this.full=!1,this.acc=new Array(t)}return t.prototype["@@transducer/init"]=o.a.init,t.prototype["@@transducer/result"]=function(t){return this.acc=null,this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,e){return this.store(e),this.full?this.xf["@@transducer/step"](t,this.getCopy()):t},t.prototype.store=function(t){this.acc[this.pos]=t,this.pos+=1,this.pos===this.acc.length&&(this.pos=0,this.full=!0)},t.prototype.getCopy=function(){return n.i(r.a)(Array.prototype.slice.call(this.acc,this.pos),Array.prototype.slice.call(this.acc,0,this.pos))},t}(),u=n.i(i.a)(function(t,e){return new a(t,e)});e.a=u},function(t,e,n){"use strict";var r=n(0),i=n(339),o=n(13),a=n.i(r.a)(function(t,e){return n.i(o.a)(t,n.i(i.a)(e))});e.a=a},function(t,e,n){"use strict";var r=n(0),i=n(9),o=function(){function t(t,e){this.xf=e,this.n=t}return t.prototype["@@transducer/init"]=i.a.init,t.prototype["@@transducer/result"]=i.a.result,t.prototype["@@transducer/step"]=function(t,e){return this.n>0?(this.n-=1,t):this.xf["@@transducer/step"](t,e)},t}(),a=n.i(r.a)(function(t,e){return new o(t,e)});e.a=a},function(t,e,n){"use strict";var r=n(0),i=n(9),o=function(){function t(t,e){this.xf=e,this.pos=0,this.full=!1,this.acc=new Array(t)}return t.prototype["@@transducer/init"]=i.a.init,t.prototype["@@transducer/result"]=function(t){return this.acc=null,this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,e){return this.full&&(t=this.xf["@@transducer/step"](t,this.acc[this.pos])),this.store(e),t},t.prototype.store=function(t){this.acc[this.pos]=t,this.pos+=1,this.pos===this.acc.length&&(this.pos=0,this.full=!0)},t}(),a=n.i(r.a)(function(t,e){return new o(t,e)});e.a=a},function(t,e,n){"use strict";var r=n(0),i=n(16),o=n(9),a=function(){function t(t,e){this.f=t,this.retained=[],this.xf=e}return t.prototype["@@transducer/init"]=o.a.init,t.prototype["@@transducer/result"]=function(t){return this.retained=null,this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,e){return this.f(e)?this.retain(t,e):this.flush(t,e)},t.prototype.flush=function(t,e){return t=n.i(i.a)(this.xf["@@transducer/step"],t,this.retained),this.retained=[],this.xf["@@transducer/step"](t,e)},t.prototype.retain=function(t,e){return this.retained.push(e),t},t}(),u=n.i(r.a)(function(t,e){return new a(t,e)});e.a=u},function(t,e,n){"use strict";var r=n(0),i=n(9),o=function(){function t(t,e){this.xf=e,this.f=t}return t.prototype["@@transducer/init"]=i.a.init,t.prototype["@@transducer/result"]=i.a.result,t.prototype["@@transducer/step"]=function(t,e){if(this.f){if(this.f(e))return t;this.f=null}return this.xf["@@transducer/step"](t,e)},t}(),a=n.i(r.a)(function(t,e){return new o(t,e)});e.a=a},function(t,e,n){"use strict";var r=n(0),i=n(9),o=function(){function t(t,e){this.xf=e,this.f=t}return t.prototype["@@transducer/init"]=i.a.init,t.prototype["@@transducer/result"]=i.a.result,t.prototype["@@transducer/step"]=function(t,e){return this.f(e)?this.xf["@@transducer/step"](t,e):t},t}(),a=n.i(r.a)(function(t,e){return new o(t,e)});e.a=a},function(t,e,n){"use strict";var r=n(0),i=n(30),o=n(9),a=function(){function t(t,e){this.xf=e,this.f=t,this.found=!1}return t.prototype["@@transducer/init"]=o.a.init,t.prototype["@@transducer/result"]=function(t){return this.found||(t=this.xf["@@transducer/step"](t,void 0)),this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,e){return this.f(e)&&(this.found=!0,t=n.i(i.a)(this.xf["@@transducer/step"](t,e))),t},t}(),u=n.i(r.a)(function(t,e){return new a(t,e)});e.a=u},function(t,e,n){"use strict";var r=n(0),i=n(30),o=n(9),a=function(){function t(t,e){this.xf=e,this.f=t,this.idx=-1,this.found=!1}return t.prototype["@@transducer/init"]=o.a.init,t.prototype["@@transducer/result"]=function(t){return this.found||(t=this.xf["@@transducer/step"](t,-1)),this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,e){return this.idx+=1,this.f(e)&&(this.found=!0,t=n.i(i.a)(this.xf["@@transducer/step"](t,this.idx))),t},t}(),u=n.i(r.a)(function(t,e){return new a(t,e)});e.a=u},function(t,e,n){"use strict";var r=n(0),i=n(9),o=function(){function t(t,e){this.xf=e,this.f=t}return t.prototype["@@transducer/init"]=i.a.init,t.prototype["@@transducer/result"]=function(t){return this.xf["@@transducer/result"](this.xf["@@transducer/step"](t,this.last))},t.prototype["@@transducer/step"]=function(t,e){return this.f(e)&&(this.last=e),t},t}(),a=n.i(r.a)(function(t,e){return new o(t,e)});e.a=a},function(t,e,n){"use strict";var r=n(0),i=n(9),o=function(){function t(t,e){this.xf=e,this.f=t,this.idx=-1,this.lastIdx=-1}return t.prototype["@@transducer/init"]=i.a.init,t.prototype["@@transducer/result"]=function(t){return this.xf["@@transducer/result"](this.xf["@@transducer/step"](t,this.lastIdx))},t.prototype["@@transducer/step"]=function(t,e){return this.idx+=1,this.f(e)&&(this.lastIdx=this.idx),t},t}(),a=n.i(r.a)(function(t,e){return new o(t,e)});e.a=a},function(t,e,n){"use strict";var r=n(0),i=n(9),o=function(){function t(t,e){this.xf=e,this.f=t}return t.prototype["@@transducer/init"]=i.a.init,t.prototype["@@transducer/result"]=i.a.result,t.prototype["@@transducer/step"]=function(t,e){return this.xf["@@transducer/step"](t,this.f(e))},t}(),a=n.i(r.a)(function(t,e){return new o(t,e)});e.a=a},function(t,e,n){"use strict";var r=n(62),i=n(12),o=n(9),a=function(){function t(t,e,n,r){this.valueFn=t,this.valueAcc=e,this.keyFn=n,this.xf=r,this.inputs={}}return t.prototype["@@transducer/init"]=o.a.init,t.prototype["@@transducer/result"]=function(t){var e;for(e in this.inputs)if(n.i(i.a)(e,this.inputs)&&(t=this.xf["@@transducer/step"](t,this.inputs[e]),t["@@transducer/reduced"])){t=t["@@transducer/value"];break}return this.inputs=null,this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,e){var n=this.keyFn(e);return this.inputs[n]=this.inputs[n]||[n,this.valueAcc],this.inputs[n][1]=this.valueFn(this.inputs[n][1],e),t},t}(),u=n.i(r.a)(4,[],function(t,e,n,r){return new a(t,e,n,r)});e.a=u},function(t,e,n){"use strict";var r=n(0),i=n(30),o=n(9),a=function(){function t(t,e){this.xf=e,this.n=t,this.i=0}return t.prototype["@@transducer/init"]=o.a.init,t.prototype["@@transducer/result"]=o.a.result,t.prototype["@@transducer/step"]=function(t,e){this.i+=1;var r=0===this.n?t:this.xf["@@transducer/step"](t,e);return this.n>=0&&this.i>=this.n?n.i(i.a)(r):r},t}(),u=n.i(r.a)(function(t,e){return new a(t,e)});e.a=u},function(t,e,n){"use strict";var r=n(0),i=n(30),o=n(9),a=function(){function t(t,e){this.xf=e,this.f=t}return t.prototype["@@transducer/init"]=o.a.init,t.prototype["@@transducer/result"]=o.a.result,t.prototype["@@transducer/step"]=function(t,e){return this.f(e)?this.xf["@@transducer/step"](t,e):n.i(i.a)(t)},t}(),u=n.i(r.a)(function(t,e){return new a(t,e)});e.a=u},function(t,e,n){"use strict";var r=n(0),i=n(9),o=function(){function t(t,e){this.xf=e,this.f=t}return t.prototype["@@transducer/init"]=i.a.init,t.prototype["@@transducer/result"]=i.a.result,t.prototype["@@transducer/step"]=function(t,e){return this.f(e),this.xf["@@transducer/step"](t,e)},t}(),a=n.i(r.a)(function(t,e){return new o(t,e)});e.a=a},function(t,e,n){"use strict";n(34),n(0),n(90),n(60),n(100)},function(t,e,n){"use strict";n(44),n(0)},function(t,e,n){"use strict";n(147),n(2),n(94),n(16),n(348)},function(t,e,n){"use strict";n(1),n(12),n(22)},function(t,e,n){"use strict";n(1),n(22)},function(t,e,n){"use strict";n(1),n(145),n(15)},function(t,e,n){"use strict";n(46)},function(t,e,n){"use strict";n(1)},function(t,e,n){"use strict";n(0),n(29),n(15)},function(t,e,n){"use strict";n(1),n(67),n(47),n(101)},function(t,e,n){"use strict";n(1),n(134),n(67),n(36)},function(t,e,n){"use strict";n(1),n(59),n(67),n(96)},function(t,e,n){"use strict";n(0)},function(t,e,n){"use strict";n(0)},function(t,e,n){"use strict";n(2)},function(t,e,n){"use strict";n(2)},function(t,e,n){"use strict";n(0),n(16),n(22)},function(t,e,n){"use strict";n(0)},function(t,e,n){"use strict";n(0),n(92)},function(t,e,n){"use strict";n(2)},function(t,e,n){"use strict";n(1),n(164)},function(t,e,n){"use strict";n(165),n(49)},function(t,e,n){"use strict";n(89),n(0)},function(t,e,n){"use strict";n(89),n(1)},function(t,e,n){"use strict";n(0),n(69)},function(t,e,n){"use strict";var r=n(0),i=n(69),o=n.i(r.a)(function(t,e){return n.i(i.a)(function(t,e,n){return n},t,e)});e.a=o},function(t,e,n){"use strict";n(2),n(69)},function(t,e,n){"use strict";n(2),n(95)},function(t,e,n){"use strict";n(0)},function(t,e,n){"use strict";n(2)},function(t,e,n){"use strict";n(0)},function(t,e,n){"use strict";n(1)},function(t,e,n){"use strict";var r=n(149),i=n(0),o=n(7),a=n(155),u=n(132);a.a,u.a},function(t,e,n){"use strict";n(1),n(10),n(47)},function(t,e,n){"use strict";n(2)},function(t,e,n){"use strict";var r=n(1),i=n(344);i.a},function(t,e,n){"use strict";n(0)},function(t,e,n){"use strict";n(21),n(1)},function(t,e,n){"use strict";n(0)},function(t,e,n){"use strict";var r=n(17),i=n(150);r.a},function(t,e,n){"use strict";var r=n(17),i=n(150),o=n(60);r.a},function(t,e,n){"use strict";var r=n(87),i=n(160),o=n(72);r.a,o.a},function(t,e,n){"use strict";n(2),n(15),n(36)},function(t,e,n){"use strict";n(2),n(139),n(36)},function(t,e,n){"use strict";n(2),n(36)},function(t,e,n){"use strict";n(0)},function(t,e,n){"use strict";n(0)},function(t,e,n){"use strict";n(136),n(73)},function(t,e,n){"use strict";var r=n(166),i=n(23);r.a},function(t,e,n){"use strict";var r=n(66),i=n(88),o=n(171),a=n(183);r.a,o.a,i.a},function(t,e,n){"use strict";n(2),n(15)},function(t,e,n){"use strict";n(2),n(158)},function(t,e,n){"use strict";n(2),n(12)},function(t,e,n){"use strict";n(2)},function(t,e,n){"use strict";n(0)},function(t,e,n){"use strict";n(0),n(153)},function(t,e,n){"use strict";n(62),n(16),n(30)},function(t,e,n){"use strict";var r=n(1),i=n(30);i.a},function(t,e,n){"use strict";n(0),n(33),n(180)},function(t,e,n){"use strict";n(2)},function(t,e,n){"use strict";n(2)},function(t,e,n){"use strict";n(2),n(33),n(170)},function(t,e,n){"use strict";n(0)},function(t,e,n){"use strict";n(0)},function(t,e,n){"use strict";n(0)},function(t,e,n){"use strict";n(46)},function(t,e,n){"use strict";n(0),n(162),n(18)},function(t,e,n){"use strict";n(0),n(18)},function(t,e,n){"use strict";n(0)},function(t,e,n){"use strict";n(0),n(15),n(98)},function(t,e,n){"use strict";n(0)},function(t,e,n){"use strict";n(0),n(85),n(140)},function(t,e,n){"use strict";n(2),n(85),n(141)},function(t,e,n){"use strict";n(0),n(18)},function(t,e,n){"use strict";var r=n(0),i=n(7),o=n(366),a=n(18);o.a},function(t,e,n){"use strict";var r=n(0),i=n(7),o=n(367);o.a},function(t,e,n){"use strict";n(148),n(0),n(342),n(49)},function(t,e,n){"use strict";n(46)},function(t,e,n){"use strict";n(1),n(12)},function(t,e,n){"use strict";n(1)},function(t,e,n){"use strict";n(46)},function(t,e,n){"use strict";n(16),n(157),n(10)},function(t,e,n){"use strict";n(1)},function(t,e,n){"use strict";n(2),n(13),n(177)},function(t,e,n){"use strict";n(1),String.prototype.trim},function(t,e,n){"use strict";n(21),n(17),n(0)},function(t,e,n){"use strict";n(1)},function(t,e,n){"use strict";n(1),n(70)},function(t,e,n){"use strict";n(0),n(10)},function(t,e,n){"use strict";n(0)},function(t,e,n){"use strict";var r=n(17),i=n(0),o=n(84),a=n(100);a.a,r.a},function(t,e,n){"use strict";n(17),n(2),n(182)},function(t,e,n){"use strict";n(2)},function(t,e,n){"use strict";var r=n(91),i=n(83);r.a},function(t,e,n){"use strict";n(2)},function(t,e,n){"use strict";n(1)},function(t,e,n){"use strict";n(0)},function(t,e,n){"use strict";n(2)},function(t,e,n){"use strict";n(0),n(15),n(13),n(185)},function(t,e,n){"use strict";n(34),n(0),n(60),n(72)},function(t,e,n){"use strict";n(0)},function(t,e,n){"use strict";n(0)},function(t,e,n){"use strict";n(0)},function(t,e,n){"use strict";n(2)},function(t,e,n){"use strict";t.exports=n(486)},function(t,e,n){"use strict";var r={Properties:{"aria-current":0,"aria-details":0,"aria-disabled":0,"aria-hidden":0,"aria-invalid":0,"aria-keyshortcuts":0,"aria-label":0,"aria-roledescription":0,"aria-autocomplete":0,"aria-checked":0,"aria-expanded":0,"aria-haspopup":0,"aria-level":0,"aria-modal":0,"aria-multiline":0,"aria-multiselectable":0,"aria-orientation":0,"aria-placeholder":0,"aria-pressed":0,"aria-readonly":0,"aria-required":0,"aria-selected":0,"aria-sort":0,"aria-valuemax":0,"aria-valuemin":0,"aria-valuenow":0,"aria-valuetext":0,"aria-atomic":0,"aria-busy":0,"aria-live":0,"aria-relevant":0,"aria-dropeffect":0,"aria-grabbed":0,"aria-activedescendant":0,"aria-colcount":0,"aria-colindex":0,"aria-colspan":0,"aria-controls":0,"aria-describedby":0,"aria-errormessage":0,"aria-flowto":0,"aria-labelledby":0,"aria-owns":0,"aria-posinset":0,"aria-rowcount":0,"aria-rowindex":0,"aria-rowspan":0,"aria-setsize":0},DOMAttributeNames:{},DOMPropertyNames:{}};t.exports=r},function(t,e,n){"use strict";var r=n(8),i=n(123),o={focusDOMComponent:function(){i(r.getNodeFromInstance(this))}};t.exports=o},function(t,e,n){"use strict";function r(t){return(t.ctrlKey||t.altKey||t.metaKey)&&!(t.ctrlKey&&t.altKey)}function i(t){switch(t){case"topCompositionStart":return S.compositionStart;case"topCompositionEnd":return S.compositionEnd;case"topCompositionUpdate":return S.compositionUpdate}}function o(t,e){return"topKeyDown"===t&&e.keyCode===g}function a(t,e){switch(t){case"topKeyUp":return-1!==m.indexOf(e.keyCode);case"topKeyDown":return e.keyCode!==g;case"topKeyPress":case"topMouseDown":case"topBlur":return!0;default:return!1}}function u(t){var e=t.detail;return"object"===typeof e&&"data"in e?e.data:null}function s(t,e,n,r){var s,c;if(_?s=i(t):O?a(t,n)&&(s=S.compositionEnd):o(t,n)&&(s=S.compositionStart),!s)return null;E&&(O||s!==S.compositionStart?s===S.compositionEnd&&O&&(c=O.getData()):O=d.getPooled(r));var l=v.getPooled(s,e,n,r);if(c)l.data=c;else{var f=u(n);null!==f&&(l.data=f)}return p.accumulateTwoPhaseDispatches(l),l}function c(t,e){switch(t){case"topCompositionEnd":return u(e);case"topKeyPress":return e.which!==C?null:(I=!0,x);case"topTextInput":var n=e.data;return n===x&&I?null:n;default:return null}}function l(t,e){if(O){if("topCompositionEnd"===t||!_&&a(t,e)){var n=O.getData();return d.release(O),O=null,n}return null}switch(t){case"topPaste":return null;case"topKeyPress":return e.which&&!r(e)?String.fromCharCode(e.which):null;case"topCompositionEnd":return E?null:e.data;default:return null}}function f(t,e,n,r){var i;if(!(i=w?c(t,n):l(t,n)))return null;var o=y.getPooled(S.beforeInput,e,n,r);return o.data=i,p.accumulateTwoPhaseDispatches(o),o}var p=n(51),h=n(11),d=n(481),v=n(518),y=n(521),m=[9,13,27,32],g=229,_=h.canUseDOM&&"CompositionEvent"in window,b=null;h.canUseDOM&&"documentMode"in document&&(b=document.documentMode);var w=h.canUseDOM&&"TextEvent"in window&&!b&&!function(){var t=window.opera;return"object"===typeof t&&"function"===typeof t.version&&parseInt(t.version(),10)<=12}(),E=h.canUseDOM&&(!_||b&&b>8&&b<=11),C=32,x=String.fromCharCode(C),S={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["topCompositionEnd","topKeyPress","topTextInput","topPaste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:["topBlur","topCompositionEnd","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:["topBlur","topCompositionStart","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:["topBlur","topCompositionUpdate","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]}},I=!1,O=null,P={eventTypes:S,extractEvents:function(t,e,n,r){return[s(t,e,n,r),f(t,e,n,r)]}};t.exports=P},function(t,e,n){"use strict";var r=n(186),i=n(11),o=(n(19),n(248),n(527)),a=n(255),u=n(258),s=(n(4),u(function(t){return a(t)})),c=!1,l="cssFloat";if(i.canUseDOM){var f=document.createElement("div").style;try{f.font=""}catch(t){c=!0}void 0===document.documentElement.style.cssFloat&&(l="styleFloat")}var p={createMarkupForStyles:function(t,e){var n="";for(var r in t)if(t.hasOwnProperty(r)){var i=0===r.indexOf("--"),a=t[r];null!=a&&(n+=s(r)+":",n+=o(r,a,e,i)+";")}return n||null},setValueForStyles:function(t,e,n){var i=t.style;for(var a in e)if(e.hasOwnProperty(a)){var u=0===a.indexOf("--"),s=o(a,e[a],n,u);if("float"!==a&&"cssFloat"!==a||(a=l),u)i.setProperty(a,s);else if(s)i[a]=s;else{var f=c&&r.shorthandPropertyExpansions[a];if(f)for(var p in f)i[p]="";else i[a]=""}}}};t.exports=p},function(t,e,n){"use strict";function r(t,e,n){var r=I.getPooled(N.change,t,e,n);return r.type="change",E.accumulateTwoPhaseDispatches(r),r}function i(t){var e=t.nodeName&&t.nodeName.toLowerCase();return"select"===e||"input"===e&&"file"===t.type}function o(t){var e=r(A,t,P(t));S.batchedUpdates(a,e)}function a(t){w.enqueueEvents(t),w.processEventQueue(!1)}function u(t,e){M=t,A=e,M.attachEvent("onchange",o)}function s(){M&&(M.detachEvent("onchange",o),M=null,A=null)}function c(t,e){var n=O.updateValueIfChanged(t),r=!0===e.simulated&&j._allowSimulatedPassThrough;if(n||r)return t}function l(t,e){if("topChange"===t)return e}function f(t,e,n){"topFocus"===t?(s(),u(e,n)):"topBlur"===t&&s()}function p(t,e){M=t,A=e,M.attachEvent("onpropertychange",d)}function h(){M&&(M.detachEvent("onpropertychange",d),M=null,A=null)}function d(t){"value"===t.propertyName&&c(A,t)&&o(t)}function v(t,e,n){"topFocus"===t?(h(),p(e,n)):"topBlur"===t&&h()}function y(t,e,n){if("topSelectionChange"===t||"topKeyUp"===t||"topKeyDown"===t)return c(A,n)}function m(t){var e=t.nodeName;return e&&"input"===e.toLowerCase()&&("checkbox"===t.type||"radio"===t.type)}function g(t,e,n){if("topClick"===t)return c(e,n)}function _(t,e,n){if("topInput"===t||"topChange"===t)return c(e,n)}function b(t,e){if(null!=t){var n=t._wrapperState||e._wrapperState;if(n&&n.controlled&&"number"===e.type){var r=""+e.value;e.getAttribute("value")!==r&&e.setAttribute("value",r)}}}var w=n(50),E=n(51),C=n(11),x=n(8),S=n(24),I=n(26),O=n(202),P=n(114),k=n(115),T=n(204),N={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:["topBlur","topChange","topClick","topFocus","topInput","topKeyDown","topKeyUp","topSelectionChange"]}},M=null,A=null,D=!1;C.canUseDOM&&(D=k("change")&&(!document.documentMode||document.documentMode>8));var R=!1;C.canUseDOM&&(R=k("input")&&(!document.documentMode||document.documentMode>9));var j={eventTypes:N,_allowSimulatedPassThrough:!0,_isInputEventSupported:R,extractEvents:function(t,e,n,o){var a,u,s=e?x.getNodeFromInstance(e):window;if(i(s)?D?a=l:u=f:T(s)?R?a=_:(a=y,u=v):m(s)&&(a=g),a){var c=a(t,e,n);if(c){return r(c,n,o)}}u&&u(t,s,e),"topBlur"===t&&b(e,s)}};t.exports=j},function(t,e,n){"use strict";var r=n(5),i=n(37),o=n(11),a=n(251),u=n(14),s=(n(3),{dangerouslyReplaceNodeWithMarkup:function(t,e){if(o.canUseDOM||r("56"),e||r("57"),"HTML"===t.nodeName&&r("58"),"string"===typeof e){var n=a(e,u)[0];t.parentNode.replaceChild(n,t)}else i.replaceChildWithTree(t,e)}});t.exports=s},function(t,e,n){"use strict";var r=["ResponderEventPlugin","SimpleEventPlugin","TapEventPlugin","EnterLeaveEventPlugin","ChangeEventPlugin","SelectEventPlugin","BeforeInputEventPlugin"];t.exports=r},function(t,e,n){"use strict";var r=n(51),i=n(8),o=n(75),a={mouseEnter:{registrationName:"onMouseEnter",dependencies:["topMouseOut","topMouseOver"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["topMouseOut","topMouseOver"]}},u={eventTypes:a,extractEvents:function(t,e,n,u){if("topMouseOver"===t&&(n.relatedTarget||n.fromElement))return null;if("topMouseOut"!==t&&"topMouseOver"!==t)return null;var s;if(u.window===u)s=u;else{var c=u.ownerDocument;s=c?c.defaultView||c.parentWindow:window}var l,f;if("topMouseOut"===t){l=e;var p=n.relatedTarget||n.toElement;f=p?i.getClosestInstanceFromNode(p):null}else l=null,f=e;if(l===f)return null;var h=null==l?s:i.getNodeFromInstance(l),d=null==f?s:i.getNodeFromInstance(f),v=o.getPooled(a.mouseLeave,l,n,u);v.type="mouseleave",v.target=h,v.relatedTarget=d;var y=o.getPooled(a.mouseEnter,f,n,u);return y.type="mouseenter",y.target=d,y.relatedTarget=h,r.accumulateEnterLeaveDispatches(v,y,l,f),[v,y]}};t.exports=u},function(t,e,n){"use strict";function r(t){this._root=t,this._startText=this.getText(),this._fallbackText=null}var i=n(6),o=n(31),a=n(201);i(r.prototype,{destructor:function(){this._root=null,this._startText=null,this._fallbackText=null},getText:function(){return"value"in this._root?this._root.value:this._root[a()]},getData:function(){if(this._fallbackText)return this._fallbackText;var t,e,n=this._startText,r=n.length,i=this.getText(),o=i.length;for(t=0;t1?1-e:void 0;return this._fallbackText=i.slice(t,u),this._fallbackText}}),o.addPoolingTo(r),t.exports=r},function(t,e,n){"use strict";var r=n(38),i=r.injection.MUST_USE_PROPERTY,o=r.injection.HAS_BOOLEAN_VALUE,a=r.injection.HAS_NUMERIC_VALUE,u=r.injection.HAS_POSITIVE_NUMERIC_VALUE,s=r.injection.HAS_OVERLOADED_BOOLEAN_VALUE,c={isCustomAttribute:RegExp.prototype.test.bind(new RegExp("^(data|aria)-["+r.ATTRIBUTE_NAME_CHAR+"]*$")),Properties:{accept:0,acceptCharset:0,accessKey:0,action:0,allowFullScreen:o,allowTransparency:0,alt:0,as:0,async:o,autoComplete:0,autoPlay:o,capture:o,cellPadding:0,cellSpacing:0,charSet:0,challenge:0,checked:i|o,cite:0,classID:0,className:0,cols:u,colSpan:0,content:0,contentEditable:0,contextMenu:0,controls:o,controlsList:0,coords:0,crossOrigin:0,data:0,dateTime:0,default:o,defer:o,dir:0,disabled:o,download:s,draggable:0,encType:0,form:0,formAction:0,formEncType:0,formMethod:0,formNoValidate:o,formTarget:0,frameBorder:0,headers:0,height:0,hidden:o,high:0,href:0,hrefLang:0,htmlFor:0,httpEquiv:0,icon:0,id:0,inputMode:0,integrity:0,is:0,keyParams:0,keyType:0,kind:0,label:0,lang:0,list:0,loop:o,low:0,manifest:0,marginHeight:0,marginWidth:0,max:0,maxLength:0,media:0,mediaGroup:0,method:0,min:0,minLength:0,multiple:i|o,muted:i|o,name:0,nonce:0,noValidate:o,open:o,optimum:0,pattern:0,placeholder:0,playsInline:o,poster:0,preload:0,profile:0,radioGroup:0,readOnly:o,referrerPolicy:0,rel:0,required:o,reversed:o,role:0,rows:u,rowSpan:a,sandbox:0,scope:0,scoped:o,scrolling:0,seamless:o,selected:i|o,shape:0,size:u,sizes:0,span:u,spellCheck:0,src:0,srcDoc:0,srcLang:0,srcSet:0,start:a,step:0,style:0,summary:0,tabIndex:0,target:0,title:0,type:0,useMap:0,value:0,width:0,wmode:0,wrap:0,about:0,datatype:0,inlist:0,prefix:0,property:0,resource:0,typeof:0,vocab:0,autoCapitalize:0,autoCorrect:0,autoSave:0,color:0,itemProp:0,itemScope:o,itemType:0,itemID:0,itemRef:0,results:0,security:0,unselectable:0},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},DOMPropertyNames:{},DOMMutationMethods:{value:function(t,e){if(null==e)return t.removeAttribute("value");"number"!==t.type||!1===t.hasAttribute("value")?t.setAttribute("value",""+e):t.validity&&!t.validity.badInput&&t.ownerDocument.activeElement!==t&&t.setAttribute("value",""+e)}}};t.exports=c},function(t,e,n){"use strict";(function(e){function r(t,e,n,r){var i=void 0===t[n];null!=e&&i&&(t[n]=o(e,!0))}var i=n(39),o=n(203),a=(n(106),n(116)),u=n(206);n(4);"undefined"!==typeof e&&n.i({NODE_ENV:"production",PUBLIC_URL:""});var s={instantiateChildren:function(t,e,n,i){if(null==t)return null;var o={};return u(t,r,o),o},updateChildren:function(t,e,n,r,u,s,c,l,f){if(e||t){var p,h;for(p in e)if(e.hasOwnProperty(p)){h=t&&t[p];var d=h&&h._currentElement,v=e[p];if(null!=h&&a(d,v))i.receiveComponent(h,v,u,l),e[p]=h;else{h&&(r[p]=i.getHostNode(h),i.unmountComponent(h,!1));var y=o(v,!0);e[p]=y;var m=i.mountComponent(y,u,s,c,l,f);n.push(m)}}for(p in t)!t.hasOwnProperty(p)||e&&e.hasOwnProperty(p)||(h=t[p],r[p]=i.getHostNode(h),i.unmountComponent(h,!1))}},unmountChildren:function(t,e){for(var n in t)if(t.hasOwnProperty(n)){var r=t[n];i.unmountComponent(r,e)}}};t.exports=s}).call(e,n(126))},function(t,e,n){"use strict";var r=n(102),i=n(491),o={processChildrenUpdates:i.dangerouslyProcessChildrenUpdates,replaceNodeWithMarkup:r.dangerouslyReplaceNodeWithMarkup};t.exports=o},function(t,e,n){"use strict";function r(t){}function i(t){return!(!t.prototype||!t.prototype.isReactComponent)}function o(t){return!(!t.prototype||!t.prototype.isPureReactComponent)}var a=n(5),u=n(6),s=n(40),c=n(108),l=n(27),f=n(109),p=n(52),h=(n(19),n(196)),d=n(39),v=n(56),y=(n(3),n(80)),m=n(116),g=(n(4),{ImpureClass:0,PureClass:1,StatelessFunctional:2});r.prototype.render=function(){var t=p.get(this)._currentElement.type,e=t(this.props,this.context,this.updater);return e};var _=1,b={construct:function(t){this._currentElement=t,this._rootNodeID=0,this._compositeType=null,this._instance=null,this._hostParent=null,this._hostContainerInfo=null,this._updateBatchNumber=null,this._pendingElement=null,this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,this._renderedNodeType=null,this._renderedComponent=null,this._context=null,this._mountOrder=0,this._topLevelWrapper=null,this._pendingCallbacks=null,this._calledComponentWillUnmount=!1},mountComponent:function(t,e,n,u){this._context=u,this._mountOrder=_++,this._hostParent=e,this._hostContainerInfo=n;var c,l=this._currentElement.props,f=this._processContext(u),h=this._currentElement.type,d=t.getUpdateQueue(),y=i(h),m=this._constructComponent(y,l,f,d);y||null!=m&&null!=m.render?o(h)?this._compositeType=g.PureClass:this._compositeType=g.ImpureClass:(c=m,null===m||!1===m||s.isValidElement(m)||a("105",h.displayName||h.name||"Component"),m=new r(h),this._compositeType=g.StatelessFunctional);m.props=l,m.context=f,m.refs=v,m.updater=d,this._instance=m,p.set(m,this);var b=m.state;void 0===b&&(m.state=b=null),("object"!==typeof b||Array.isArray(b))&&a("106",this.getName()||"ReactCompositeComponent"),this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1;var w;return w=m.unstable_handleError?this.performInitialMountWithErrorHandling(c,e,n,t,u):this.performInitialMount(c,e,n,t,u),m.componentDidMount&&t.getReactMountReady().enqueue(m.componentDidMount,m),w},_constructComponent:function(t,e,n,r){return this._constructComponentWithoutOwner(t,e,n,r)},_constructComponentWithoutOwner:function(t,e,n,r){var i=this._currentElement.type;return t?new i(e,n,r):i(e,n,r)},performInitialMountWithErrorHandling:function(t,e,n,r,i){var o,a=r.checkpoint();try{o=this.performInitialMount(t,e,n,r,i)}catch(u){r.rollback(a),this._instance.unstable_handleError(u),this._pendingStateQueue&&(this._instance.state=this._processPendingState(this._instance.props,this._instance.context)),a=r.checkpoint(),this._renderedComponent.unmountComponent(!0),r.rollback(a),o=this.performInitialMount(t,e,n,r,i)}return o},performInitialMount:function(t,e,n,r,i){var o=this._instance,a=0;o.componentWillMount&&(o.componentWillMount(),this._pendingStateQueue&&(o.state=this._processPendingState(o.props,o.context))),void 0===t&&(t=this._renderValidatedComponent());var u=h.getType(t);this._renderedNodeType=u;var s=this._instantiateReactComponent(t,u!==h.EMPTY);this._renderedComponent=s;var c=d.mountComponent(s,r,e,n,this._processChildContext(i),a);return c},getHostNode:function(){return d.getHostNode(this._renderedComponent)},unmountComponent:function(t){if(this._renderedComponent){var e=this._instance;if(e.componentWillUnmount&&!e._calledComponentWillUnmount)if(e._calledComponentWillUnmount=!0,t){var n=this.getName()+".componentWillUnmount()";f.invokeGuardedCallback(n,e.componentWillUnmount.bind(e))}else e.componentWillUnmount();this._renderedComponent&&(d.unmountComponent(this._renderedComponent,t),this._renderedNodeType=null,this._renderedComponent=null,this._instance=null),this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,this._pendingCallbacks=null,this._pendingElement=null,this._context=null,this._rootNodeID=0,this._topLevelWrapper=null,p.remove(e)}},_maskContext:function(t){var e=this._currentElement.type,n=e.contextTypes;if(!n)return v;var r={};for(var i in n)r[i]=t[i];return r},_processContext:function(t){var e=this._maskContext(t);return e},_processChildContext:function(t){var e,n=this._currentElement.type,r=this._instance;if(r.getChildContext&&(e=r.getChildContext()),e){"object"!==typeof n.childContextTypes&&a("107",this.getName()||"ReactCompositeComponent");for(var i in e)i in n.childContextTypes||a("108",this.getName()||"ReactCompositeComponent",i);return u({},t,e)}return t},_checkContextTypes:function(t,e,n){},receiveComponent:function(t,e,n){var r=this._currentElement,i=this._context;this._pendingElement=null,this.updateComponent(e,r,t,i,n)},performUpdateIfNecessary:function(t){null!=this._pendingElement?d.receiveComponent(this,this._pendingElement,t,this._context):null!==this._pendingStateQueue||this._pendingForceUpdate?this.updateComponent(t,this._currentElement,this._currentElement,this._context,this._context):this._updateBatchNumber=null},updateComponent:function(t,e,n,r,i){var o=this._instance;null==o&&a("136",this.getName()||"ReactCompositeComponent");var u,s=!1;this._context===i?u=o.context:(u=this._processContext(i),s=!0);var c=e.props,l=n.props;e!==n&&(s=!0),s&&o.componentWillReceiveProps&&o.componentWillReceiveProps(l,u);var f=this._processPendingState(l,u),p=!0;this._pendingForceUpdate||(o.shouldComponentUpdate?p=o.shouldComponentUpdate(l,f,u):this._compositeType===g.PureClass&&(p=!y(c,l)||!y(o.state,f))),this._updateBatchNumber=null,p?(this._pendingForceUpdate=!1,this._performComponentUpdate(n,l,f,u,t,i)):(this._currentElement=n,this._context=i,o.props=l,o.state=f,o.context=u)},_processPendingState:function(t,e){var n=this._instance,r=this._pendingStateQueue,i=this._pendingReplaceState;if(this._pendingReplaceState=!1,this._pendingStateQueue=null,!r)return n.state;if(i&&1===r.length)return r[0];for(var o=u({},i?r[0]:n.state),a=i?1:0;a=0||null!=e.is}function v(t){var e=t.type;h(e),this._currentElement=t,this._tag=e.toLowerCase(),this._namespaceURI=null,this._renderedChildren=null,this._previousStyle=null,this._previousStyleCopy=null,this._hostNode=null,this._hostParent=null,this._rootNodeID=0,this._domID=0,this._hostContainerInfo=null,this._wrapperState=null,this._topLevelWrapper=null,this._flags=0}var y=n(5),m=n(6),g=n(474),_=n(476),b=n(37),w=n(103),E=n(38),C=n(188),x=n(50),S=n(104),I=n(74),O=n(189),P=n(8),k=n(492),T=n(493),N=n(190),M=n(496),A=(n(19),n(505)),D=n(510),R=(n(14),n(77)),j=(n(3),n(115),n(80),n(202)),U=(n(117),n(4),O),q=x.deleteListener,L=P.getNodeFromInstance,F=I.listenTo,z=S.registrationNameModules,B={string:!0,number:!0},V="__html",W={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null},H=11,K={topAbort:"abort",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topSeeked:"seeked",topSeeking:"seeking",topStalled:"stalled",topSuspend:"suspend",topTimeUpdate:"timeupdate",topVolumeChange:"volumechange",topWaiting:"waiting"},Y={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},G={listing:!0,pre:!0,textarea:!0},X=m({menuitem:!0},Y),Q=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,$={},J={}.hasOwnProperty,Z=1;v.displayName="ReactDOMComponent",v.Mixin={mountComponent:function(t,e,n,r){this._rootNodeID=Z++,this._domID=n._idCounter++,this._hostParent=e,this._hostContainerInfo=n;var o=this._currentElement.props;switch(this._tag){case"audio":case"form":case"iframe":case"img":case"link":case"object":case"source":case"video":this._wrapperState={listeners:null},t.getReactMountReady().enqueue(f,this);break;case"input":k.mountWrapper(this,o,e),o=k.getHostProps(this,o),t.getReactMountReady().enqueue(l,this),t.getReactMountReady().enqueue(f,this);break;case"option":T.mountWrapper(this,o,e),o=T.getHostProps(this,o);break;case"select":N.mountWrapper(this,o,e),o=N.getHostProps(this,o),t.getReactMountReady().enqueue(f,this);break;case"textarea":M.mountWrapper(this,o,e),o=M.getHostProps(this,o),t.getReactMountReady().enqueue(l,this),t.getReactMountReady().enqueue(f,this)}i(this,o);var a,p;null!=e?(a=e._namespaceURI,p=e._tag):n._tag&&(a=n._namespaceURI,p=n._tag),(null==a||a===w.svg&&"foreignobject"===p)&&(a=w.html),a===w.html&&("svg"===this._tag?a=w.svg:"math"===this._tag&&(a=w.mathml)),this._namespaceURI=a;var h;if(t.useCreateElement){var d,v=n._ownerDocument;if(a===w.html)if("script"===this._tag){var y=v.createElement("div"),m=this._currentElement.type;y.innerHTML="<"+m+">",d=y.removeChild(y.firstChild)}else d=o.is?v.createElement(this._currentElement.type,o.is):v.createElement(this._currentElement.type);else d=v.createElementNS(a,this._currentElement.type);P.precacheNode(this,d),this._flags|=U.hasCachedChildNodes,this._hostParent||C.setAttributeForRoot(d),this._updateDOMProperties(null,o,t);var _=b(d);this._createInitialChildren(t,o,r,_),h=_}else{var E=this._createOpenTagMarkupAndPutListeners(t,o),x=this._createContentMarkup(t,o,r);h=!x&&Y[this._tag]?E+"/>":E+">"+x+""}switch(this._tag){case"input":t.getReactMountReady().enqueue(u,this),o.autoFocus&&t.getReactMountReady().enqueue(g.focusDOMComponent,this);break;case"textarea":t.getReactMountReady().enqueue(s,this),o.autoFocus&&t.getReactMountReady().enqueue(g.focusDOMComponent,this);break;case"select":case"button":o.autoFocus&&t.getReactMountReady().enqueue(g.focusDOMComponent,this);break;case"option":t.getReactMountReady().enqueue(c,this)}return h},_createOpenTagMarkupAndPutListeners:function(t,e){var n="<"+this._currentElement.type;for(var r in e)if(e.hasOwnProperty(r)){var i=e[r];if(null!=i)if(z.hasOwnProperty(r))i&&o(this,r,i,t);else{"style"===r&&(i&&(i=this._previousStyleCopy=m({},e.style)),i=_.createMarkupForStyles(i,this));var a=null;null!=this._tag&&d(this._tag,e)?W.hasOwnProperty(r)||(a=C.createMarkupForCustomAttribute(r,i)):a=C.createMarkupForProperty(r,i),a&&(n+=" "+a)}}return t.renderToStaticMarkup?n:(this._hostParent||(n+=" "+C.createMarkupForRoot()),n+=" "+C.createMarkupForID(this._domID))},_createContentMarkup:function(t,e,n){var r="",i=e.dangerouslySetInnerHTML;if(null!=i)null!=i.__html&&(r=i.__html);else{var o=B[typeof e.children]?e.children:null,a=null!=o?null:e.children;if(null!=o)r=R(o);else if(null!=a){var u=this.mountChildren(a,t,n);r=u.join("")}}return G[this._tag]&&"\n"===r.charAt(0)?"\n"+r:r},_createInitialChildren:function(t,e,n,r){var i=e.dangerouslySetInnerHTML;if(null!=i)null!=i.__html&&b.queueHTML(r,i.__html);else{var o=B[typeof e.children]?e.children:null,a=null!=o?null:e.children;if(null!=o)""!==o&&b.queueText(r,o);else if(null!=a)for(var u=this.mountChildren(a,t,n),s=0;se.end?(n=e.end,r=e.start):(n=e.start,r=e.end),i.moveToElementText(t),i.moveStart("character",n),i.setEndPoint("EndToStart",i),i.moveEnd("character",r-n),i.select()}function u(t,e){if(window.getSelection){var n=window.getSelection(),r=t[l()].length,i=Math.min(e.start,r),o=void 0===e.end?i:Math.min(e.end,r);if(!n.extend&&i>o){var a=o;o=i,i=a}var u=c(t,i),s=c(t,o);if(u&&s){var f=document.createRange();f.setStart(u.node,u.offset),n.removeAllRanges(),i>o?(n.addRange(f),n.extend(s.node,s.offset)):(f.setEnd(s.node,s.offset),n.addRange(f))}}}var s=n(11),c=n(532),l=n(201),f=s.canUseDOM&&"selection"in document&&!("getSelection"in window),p={getOffsets:f?i:o,setOffsets:f?a:u};t.exports=p},function(t,e,n){"use strict";var r=n(5),i=n(6),o=n(102),a=n(37),u=n(8),s=n(77),c=(n(3),n(117),function(t){this._currentElement=t,this._stringText=""+t,this._hostNode=null,this._hostParent=null,this._domID=0,this._mountIndex=0,this._closingComment=null,this._commentNodes=null});i(c.prototype,{mountComponent:function(t,e,n,r){var i=n._idCounter++,o=" react-text: "+i+" ";if(this._domID=i,this._hostParent=e,t.useCreateElement){var c=n._ownerDocument,l=c.createComment(o),f=c.createComment(" /react-text "),p=a(c.createDocumentFragment());return a.queueChild(p,a(l)),this._stringText&&a.queueChild(p,a(c.createTextNode(this._stringText))),a.queueChild(p,a(f)),u.precacheNode(this,l),this._closingComment=f,p}var h=s(this._stringText);return t.renderToStaticMarkup?h:"\x3c!--"+o+"--\x3e"+h+"\x3c!-- /react-text --\x3e"},receiveComponent:function(t,e){if(t!==this._currentElement){this._currentElement=t;var n=""+t;if(n!==this._stringText){this._stringText=n;var r=this.getHostNode();o.replaceDelimitedText(r[0],r[1],n)}}},getHostNode:function(){var t=this._commentNodes;if(t)return t;if(!this._closingComment)for(var e=u.getNodeFromInstance(this),n=e.nextSibling;;){if(null==n&&r("67",this._domID),8===n.nodeType&&" /react-text "===n.nodeValue){this._closingComment=n;break}n=n.nextSibling}return t=[this._hostNode,this._closingComment],this._commentNodes=t,t},unmountComponent:function(){this._closingComment=null,this._commentNodes=null,u.uncacheNode(this)}}),t.exports=c},function(t,e,n){"use strict";function r(){this._rootNodeID&&l.updateWrapper(this)}function i(t){var e=this._currentElement.props,n=u.executeOnChange(e,t);return c.asap(r,this),n}var o=n(5),a=n(6),u=n(107),s=n(8),c=n(24),l=(n(3),n(4),{getHostProps:function(t,e){return null!=e.dangerouslySetInnerHTML&&o("91"),a({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue,onChange:t._wrapperState.onChange})},mountWrapper:function(t,e){var n=u.getValue(e),r=n;if(null==n){var a=e.defaultValue,s=e.children;null!=s&&(null!=a&&o("92"),Array.isArray(s)&&(s.length<=1||o("93"),s=s[0]),a=""+s),null==a&&(a=""),r=a}t._wrapperState={initialValue:""+r,listeners:null,onChange:i.bind(t)}},updateWrapper:function(t){var e=t._currentElement.props,n=s.getNodeFromInstance(t),r=u.getValue(e);if(null!=r){var i=""+r;i!==n.value&&(n.value=i),null==e.defaultValue&&(n.defaultValue=i)}null!=e.defaultValue&&(n.defaultValue=e.defaultValue)},postMountWrapper:function(t){var e=s.getNodeFromInstance(t),n=e.textContent;n===t._wrapperState.initialValue&&(e.value=n)}});t.exports=l},function(t,e,n){"use strict";function r(t,e){"_hostNode"in t||s("33"),"_hostNode"in e||s("33");for(var n=0,r=t;r;r=r._hostParent)n++;for(var i=0,o=e;o;o=o._hostParent)i++;for(;n-i>0;)t=t._hostParent,n--;for(;i-n>0;)e=e._hostParent,i--;for(var a=n;a--;){if(t===e)return t;t=t._hostParent,e=e._hostParent}return null}function i(t,e){"_hostNode"in t||s("35"),"_hostNode"in e||s("35");for(;e;){if(e===t)return!0;e=e._hostParent}return!1}function o(t){return"_hostNode"in t||s("36"),t._hostParent}function a(t,e,n){for(var r=[];t;)r.push(t),t=t._hostParent;var i;for(i=r.length;i-- >0;)e(r[i],"captured",n);for(i=0;i0;)n(s[c],"captured",o)}var s=n(5);n(3);t.exports={isAncestor:i,getLowestCommonAncestor:r,getParentInstance:o,traverseTwoPhase:a,traverseEnterLeave:u}},function(t,e,n){"use strict";function r(){this.reinitializeTransaction()}var i=n(6),o=n(24),a=n(76),u=n(14),s={initialize:u,close:function(){p.isBatchingUpdates=!1}},c={initialize:u,close:o.flushBatchedUpdates.bind(o)},l=[c,s];i(r.prototype,a,{getTransactionWrappers:function(){return l}});var f=new r,p={isBatchingUpdates:!1,batchedUpdates:function(t,e,n,r,i,o){var a=p.isBatchingUpdates;return p.isBatchingUpdates=!0,a?t(e,n,r,i,o):f.perform(t,null,e,n,r,i,o)}};t.exports=p},function(t,e,n){"use strict";function r(){C||(C=!0,g.EventEmitter.injectReactEventListener(m),g.EventPluginHub.injectEventPluginOrder(u),g.EventPluginUtils.injectComponentTree(p),g.EventPluginUtils.injectTreeTraversal(d),g.EventPluginHub.injectEventPluginsByName({SimpleEventPlugin:E,EnterLeaveEventPlugin:s,ChangeEventPlugin:a,SelectEventPlugin:w,BeforeInputEventPlugin:o}),g.HostComponent.injectGenericComponentClass(f),g.HostComponent.injectTextComponentClass(v),g.DOMProperty.injectDOMPropertyConfig(i),g.DOMProperty.injectDOMPropertyConfig(c),g.DOMProperty.injectDOMPropertyConfig(b),g.EmptyComponent.injectEmptyComponentFactory(function(t){return new h(t)}),g.Updates.injectReconcileTransaction(_),g.Updates.injectBatchingStrategy(y),g.Component.injectEnvironment(l))}var i=n(473),o=n(475),a=n(477),u=n(479),s=n(480),c=n(482),l=n(484),f=n(487),p=n(8),h=n(489),d=n(497),v=n(495),y=n(498),m=n(502),g=n(503),_=n(508),b=n(513),w=n(514),E=n(515),C=!1;t.exports={inject:r}},function(t,e,n){"use strict";var r="function"===typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;t.exports=r},function(t,e,n){"use strict";function r(t){i.enqueueEvents(t),i.processEventQueue(!1)}var i=n(50),o={handleTopLevel:function(t,e,n,o){r(i.extractEvents(t,e,n,o))}};t.exports=o},function(t,e,n){"use strict";function r(t){for(;t._hostParent;)t=t._hostParent;var e=f.getNodeFromInstance(t),n=e.parentNode;return f.getClosestInstanceFromNode(n)}function i(t,e){this.topLevelType=t,this.nativeEvent=e,this.ancestors=[]}function o(t){var e=h(t.nativeEvent),n=f.getClosestInstanceFromNode(e),i=n;do{t.ancestors.push(i),i=i&&r(i)}while(i);for(var o=0;o/,o=/^<\!\-\-/,a={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(t){var e=r(t);return o.test(t)?t:t.replace(i," "+a.CHECKSUM_ATTR_NAME+'="'+e+'"$&')},canReuseMarkup:function(t,e){var n=e.getAttribute(a.CHECKSUM_ATTR_NAME);return n=n&&parseInt(n,10),r(t)===n}};t.exports=a},function(t,e,n){"use strict";function r(t,e,n){return{type:"INSERT_MARKUP",content:t,fromIndex:null,fromNode:null,toIndex:n,afterNode:e}}function i(t,e,n){return{type:"MOVE_EXISTING",content:null,fromIndex:t._mountIndex,fromNode:p.getHostNode(t),toIndex:n,afterNode:e}}function o(t,e){return{type:"REMOVE_NODE",content:null,fromIndex:t._mountIndex,fromNode:e,toIndex:null,afterNode:null}}function a(t){return{type:"SET_MARKUP",content:t,fromIndex:null,fromNode:null,toIndex:null,afterNode:null}}function u(t){return{type:"TEXT_CONTENT",content:t,fromIndex:null,fromNode:null,toIndex:null,afterNode:null}}function s(t,e){return e&&(t=t||[],t.push(e)),t}function c(t,e){f.processChildrenUpdates(t,e)}var l=n(5),f=n(108),p=(n(52),n(19),n(27),n(39)),h=n(483),d=(n(14),n(529)),v=(n(3),{Mixin:{_reconcilerInstantiateChildren:function(t,e,n){return h.instantiateChildren(t,e,n)},_reconcilerUpdateChildren:function(t,e,n,r,i,o){var a,u=0;return a=d(e,u),h.updateChildren(t,a,n,r,i,this,this._hostContainerInfo,o,u),a},mountChildren:function(t,e,n){var r=this._reconcilerInstantiateChildren(t,e,n);this._renderedChildren=r;var i=[],o=0;for(var a in r)if(r.hasOwnProperty(a)){var u=r[a],s=0,c=p.mountComponent(u,e,this,this._hostContainerInfo,n,s);u._mountIndex=o++,i.push(c)}return i},updateTextContent:function(t){var e=this._renderedChildren;h.unmountChildren(e,!1);for(var n in e)e.hasOwnProperty(n)&&l("118");c(this,[u(t)])},updateMarkup:function(t){var e=this._renderedChildren;h.unmountChildren(e,!1);for(var n in e)e.hasOwnProperty(n)&&l("118");c(this,[a(t)])},updateChildren:function(t,e,n){this._updateChildren(t,e,n)},_updateChildren:function(t,e,n){var r=this._renderedChildren,i={},o=[],a=this._reconcilerUpdateChildren(r,t,o,i,e,n);if(a||r){var u,l=null,f=0,h=0,d=0,v=null;for(u in a)if(a.hasOwnProperty(u)){var y=r&&r[u],m=a[u];y===m?(l=s(l,this.moveChild(y,v,f,h)),h=Math.max(y._mountIndex,h),y._mountIndex=f):(y&&(h=Math.max(y._mountIndex,h)),l=s(l,this._mountChildAtIndex(m,o[d],v,f,e,n)),d++),f++,v=p.getHostNode(m)}for(u in i)i.hasOwnProperty(u)&&(l=s(l,this._unmountChild(r[u],i[u])));l&&c(this,l),this._renderedChildren=a}},unmountChildren:function(t){var e=this._renderedChildren;h.unmountChildren(e,t),this._renderedChildren=null},moveChild:function(t,e,n,r){if(t._mountIndex=e)return{node:n,offset:e-o};o=a}n=r(i(n))}}t.exports=o},function(t,e,n){"use strict";function r(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n["ms"+t]="MS"+e,n["O"+t]="o"+e.toLowerCase(),n}function i(t){if(u[t])return u[t];if(!a[t])return t;var e=a[t];for(var n in e)if(e.hasOwnProperty(n)&&n in s)return u[t]=e[n];return""}var o=n(11),a={animationend:r("Animation","AnimationEnd"),animationiteration:r("Animation","AnimationIteration"),animationstart:r("Animation","AnimationStart"),transitionend:r("Transition","TransitionEnd")},u={},s={};o.canUseDOM&&(s=document.createElement("div").style,"AnimationEvent"in window||(delete a.animationend.animation,delete a.animationiteration.animation,delete a.animationstart.animation),"TransitionEvent"in window||delete a.transitionend.transition),t.exports=i},function(t,e,n){"use strict";function r(t){return'"'+i(t)+'"'}var i=n(77);t.exports=r},function(t,e,n){"use strict";var r=n(195);t.exports=r.renderSubtreeIntoContainer},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function o(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a=n(20),u=(n.n(a),n(128)),s=n.n(u),c=n(208);n(118);e.a=function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"store",n=arguments[1],u=n||e+"Subscription",l=function(t){function n(o,a){r(this,n);var u=i(this,t.call(this,o,a));return u[e]=o.store,u}return o(n,t),n.prototype.getChildContext=function(){var t;return t={},t[e]=this[e],t[u]=null,t},n.prototype.render=function(){return a.Children.only(this.props.children)},n}(a.Component);return l.propTypes={store:c.a.isRequired,children:s.a.element.isRequired},l.childContextTypes=(t={},t[e]=c.a.isRequired,t[u]=c.b,t),l}()},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function o(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}function u(){}function s(t,e){var n={run:function(r){try{var i=t(e.getState(),r);(i!==n.props||n.error)&&(n.shouldComponentUpdate=!0,n.props=i,n.error=null)}catch(t){n.shouldComponentUpdate=!0,n.error=t}}};return n}function c(t){var e,c,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},p=l.getDisplayName,b=void 0===p?function(t){return"ConnectAdvanced("+t+")"}:p,w=l.methodName,E=void 0===w?"connectAdvanced":w,C=l.renderCountProp,x=void 0===C?void 0:C,S=l.shouldHandleStateChanges,I=void 0===S||S,O=l.storeKey,P=void 0===O?"store":O,k=l.withRef,T=void 0!==k&&k,N=a(l,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef"]),M=P+"Subscription",A=g++,D=(e={},e[P]=y.a,e[M]=y.b,e),R=(c={},c[M]=y.b,c);return function(e){h()("function"==typeof e,"You must pass a component to the function returned by connect. Instead received "+JSON.stringify(e));var a=e.displayName||e.name||"Component",c=b(a),l=m({},N,{getDisplayName:b,methodName:E,renderCountProp:x,shouldHandleStateChanges:I,storeKey:P,withRef:T,displayName:c,wrappedComponentName:a,WrappedComponent:e}),p=function(a){function f(t,e){r(this,f);var n=i(this,a.call(this,t,e));return n.version=A,n.state={},n.renderCount=0,n.store=t[P]||e[P],n.propsMode=Boolean(t[P]),n.setWrappedInstance=n.setWrappedInstance.bind(n),h()(n.store,'Could not find "'+P+'" in either the context or props of "'+c+'". Either wrap the root component in a , or explicitly pass "'+P+'" as a prop to "'+c+'".'),n.initSelector(),n.initSubscription(),n}return o(f,a),f.prototype.getChildContext=function(){var t,e=this.propsMode?null:this.subscription;return t={},t[M]=e||this.context[M],t},f.prototype.componentDidMount=function(){I&&(this.subscription.trySubscribe(),this.selector.run(this.props),this.selector.shouldComponentUpdate&&this.forceUpdate())},f.prototype.componentWillReceiveProps=function(t){this.selector.run(t)},f.prototype.shouldComponentUpdate=function(){return this.selector.shouldComponentUpdate},f.prototype.componentWillUnmount=function(){this.subscription&&this.subscription.tryUnsubscribe(),this.subscription=null,this.notifyNestedSubs=u,this.store=null,this.selector.run=u,this.selector.shouldComponentUpdate=!1},f.prototype.getWrappedInstance=function(){return h()(T,"To access the wrapped instance, you need to specify { withRef: true } in the options argument of the "+E+"() call."),this.wrappedInstance},f.prototype.setWrappedInstance=function(t){this.wrappedInstance=t},f.prototype.initSelector=function(){var e=t(this.store.dispatch,l);this.selector=s(e,this.store),this.selector.run(this.props)},f.prototype.initSubscription=function(){if(I){var t=(this.propsMode?this.props:this.context)[M];this.subscription=new v.a(this.store,t,this.onStateChange.bind(this)),this.notifyNestedSubs=this.subscription.notifyNestedSubs.bind(this.subscription)}},f.prototype.onStateChange=function(){this.selector.run(this.props),this.selector.shouldComponentUpdate?(this.componentDidUpdate=this.notifyNestedSubsOnComponentDidUpdate,this.setState(_)):this.notifyNestedSubs()},f.prototype.notifyNestedSubsOnComponentDidUpdate=function(){this.componentDidUpdate=void 0,this.notifyNestedSubs()},f.prototype.isSubscribed=function(){return Boolean(this.subscription)&&this.subscription.isSubscribed()},f.prototype.addExtraProps=function(t){if(!T&&!x&&(!this.propsMode||!this.subscription))return t;var e=m({},t);return T&&(e.ref=this.setWrappedInstance),x&&(e[x]=this.renderCount++),this.propsMode&&this.subscription&&(e[M]=this.subscription),e},f.prototype.render=function(){var t=this.selector;if(t.shouldComponentUpdate=!1,t.error)throw t.error;return n.i(d.createElement)(e,this.addExtraProps(t.props))},f}(d.Component);return p.WrappedComponent=e,p.displayName=c,p.childContextTypes=R,p.contextTypes=D,p.propTypes=D,f()(p,e)}}e.a=c;var l=n(259),f=n.n(l),p=n(260),h=n.n(p),d=n(20),v=(n.n(d),n(543)),y=n(208),m=Object.assign||function(t){for(var e=1;e=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}function i(t,e,n,r){return function(i,o){return n(t(i,o),e(r,o),o)}}function o(t,e,n,r,i){function o(i,o){return d=i,v=o,y=t(d,v),m=e(r,v),g=n(y,m,v),h=!0,g}function a(){return y=t(d,v),e.dependsOnOwnProps&&(m=e(r,v)),g=n(y,m,v)}function u(){return t.dependsOnOwnProps&&(y=t(d,v)),e.dependsOnOwnProps&&(m=e(r,v)),g=n(y,m,v)}function s(){var e=t(d,v),r=!p(e,y);return y=e,r&&(g=n(y,m,v)),g}function c(t,e){var n=!f(e,v),r=!l(t,d);return d=t,v=e,n&&r?a():n?u():r?s():g}var l=i.areStatesEqual,f=i.areOwnPropsEqual,p=i.areStatePropsEqual,h=!1,d=void 0,v=void 0,y=void 0,m=void 0,g=void 0;return function(t,e){return h?c(t,e):o(t,e)}}function a(t,e){var n=e.initMapStateToProps,a=e.initMapDispatchToProps,u=e.initMergeProps,s=r(e,["initMapStateToProps","initMapDispatchToProps","initMergeProps"]),c=n(t,s),l=a(t,s),f=u(t,s);return(s.pure?o:i)(c,l,f,t,s)}e.a=a;n(542)},function(t,e,n){"use strict";n(118)},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(){var t=[],e=[];return{clear:function(){e=o,t=o},notify:function(){for(var n=t=e,r=0;r-1?e:t}function h(t,e){e=e||{};var n=e.body;if(t instanceof h){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new i(t.headers)),this.method=t.method,this.mode=t.mode,n||null==t._bodyInit||(n=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"omit",!e.headers&&this.headers||(this.headers=new i(e.headers)),this.method=p(e.method||this.method||"GET"),this.mode=e.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function d(t){var e=new FormData;return t.trim().split("&").forEach(function(t){if(t){var n=t.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");e.append(decodeURIComponent(r),decodeURIComponent(i))}}),e}function v(t){var e=new i;return t.split(/\r?\n/).forEach(function(t){var n=t.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();e.append(r,i)}}),e}function y(t,e){e||(e={}),this.type="default",this.status="status"in e?e.status:200,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new i(e.headers),this.url=e.url||"",this._initBody(t)}if(!t.fetch){var m={searchParams:"URLSearchParams"in t,iterable:"Symbol"in t&&"iterator"in Symbol,blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};if(m.arrayBuffer)var g=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],_=function(t){return t&&DataView.prototype.isPrototypeOf(t)},b=ArrayBuffer.isView||function(t){return t&&g.indexOf(Object.prototype.toString.call(t))>-1};i.prototype.append=function(t,r){t=e(t),r=n(r);var i=this.map[t];this.map[t]=i?i+","+r:r},i.prototype.delete=function(t){delete this.map[e(t)]},i.prototype.get=function(t){return t=e(t),this.has(t)?this.map[t]:null},i.prototype.has=function(t){return this.map.hasOwnProperty(e(t))},i.prototype.set=function(t,r){this.map[e(t)]=n(r)},i.prototype.forEach=function(t,e){for(var n in this.map)this.map.hasOwnProperty(n)&&t.call(e,this.map[n],n,this)},i.prototype.keys=function(){var t=[];return this.forEach(function(e,n){t.push(n)}),r(t)},i.prototype.values=function(){var t=[];return this.forEach(function(e){t.push(e)}),r(t)},i.prototype.entries=function(){var t=[];return this.forEach(function(e,n){t.push([n,e])}),r(t)},m.iterable&&(i.prototype[Symbol.iterator]=i.prototype.entries);var w=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];h.prototype.clone=function(){return new h(this,{body:this._bodyInit})},f.call(h.prototype),f.call(y.prototype),y.prototype.clone=function(){return new y(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new i(this.headers),url:this.url})},y.error=function(){var t=new y(null,{status:0,statusText:""});return t.type="error",t};var E=[301,302,303,307,308];y.redirect=function(t,e){if(-1===E.indexOf(e))throw new RangeError("Invalid status code");return new y(null,{status:e,headers:{location:t}})},t.Headers=i,t.Request=h,t.Response=y,t.fetch=function(t,e){return new Promise(function(n,r){var i=new h(t,e),o=new XMLHttpRequest;o.onload=function(){var t={status:o.status,statusText:o.statusText,headers:v(o.getAllResponseHeaders()||"")};t.url="responseURL"in o?o.responseURL:t.headers.get("X-Request-URL");var e="response"in o?o.response:o.responseText;n(new y(e,t))},o.onerror=function(){r(new TypeError("Network request failed"))},o.ontimeout=function(){r(new TypeError("Network request failed"))},o.open(i.method,i.url,!0),"include"===i.credentials&&(o.withCredentials=!0),"responseType"in o&&m.blob&&(o.responseType="blob"),i.headers.forEach(function(t,e){o.setRequestHeader(e,t)}),o.send("undefined"===typeof i._bodyInit?null:i._bodyInit)})},t.fetch.polyfill=!0}}("undefined"!==typeof self?self:this)},function(t,e,n){n(220),t.exports=n(219)}]); -//# sourceMappingURL=main.32f062d6.js.map \ No newline at end of file +!function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="/",e(e.s=568)}([function(t,e,n){"use strict";function r(t){return function e(r,a){switch(arguments.length){case 0:return e;case 1:return n.i(o.a)(r)?e:n.i(i.a)(function(e){return t(r,e)});default:return n.i(o.a)(r)&&n.i(o.a)(a)?e:n.i(o.a)(r)?n.i(i.a)(function(e){return t(e,a)}):n.i(o.a)(a)?n.i(i.a)(function(e){return t(r,e)}):t(r,a)}}}e.a=r;var i=n(1),o=n(65)},function(t,e,n){"use strict";function r(t){return function e(r){return 0===arguments.length||n.i(i.a)(r)?e:t.apply(this,arguments)}}e.a=r;var i=n(65)},function(t,e,n){"use strict";function r(t){return function e(r,u,s){switch(arguments.length){case 0:return e;case 1:return n.i(a.a)(r)?e:n.i(o.a)(function(e,n){return t(r,e,n)});case 2:return n.i(a.a)(r)&&n.i(a.a)(u)?e:n.i(a.a)(r)?n.i(o.a)(function(e,n){return t(e,u,n)}):n.i(a.a)(u)?n.i(o.a)(function(e,n){return t(r,e,n)}):n.i(i.a)(function(e){return t(r,u,e)});default:return n.i(a.a)(r)&&n.i(a.a)(u)&&n.i(a.a)(s)?e:n.i(a.a)(r)&&n.i(a.a)(u)?n.i(o.a)(function(e,n){return t(e,n,s)}):n.i(a.a)(r)&&n.i(a.a)(s)?n.i(o.a)(function(e,n){return t(e,u,n)}):n.i(a.a)(u)&&n.i(a.a)(s)?n.i(o.a)(function(e,n){return t(r,e,n)}):n.i(a.a)(r)?n.i(i.a)(function(e){return t(e,u,s)}):n.i(a.a)(u)?n.i(i.a)(function(e){return t(r,e,s)}):n.i(a.a)(s)?n.i(i.a)(function(e){return t(r,u,e)}):t(r,u,s)}}}e.a=r;var i=n(1),o=n(0),a=n(65)},function(t,e,n){"use strict";function r(t,e,n,r,o,a,u,s){if(i(e),!t){var c;if(void 0===e)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,o,a,u,s],f=0;c=new Error(e.replace(/%s/g,function(){return l[f++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}}var i=function(t){};t.exports=r},function(t,e,n){"use strict";var r=n(14),i=r;t.exports=i},function(t,e,n){"use strict";function r(t){for(var e=arguments.length-1,n="Minified React error #"+t+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+t,r=0;r=0;)e=u[r],n.i(i.a)(e,t)&&!c(l,e)&&(l[l.length]=e),r-=1;return l}:function(t){return Object(t)!==t?[]:Object.keys(t)},f=n.i(r.a)(l);e.a=f},function(t,e,n){"use strict";var r=n(2),i=n(16),o=n.i(r.a)(i.a);e.a=o},function(t,e,n){"use strict";function r(){P.ReactReconcileTransaction&&E||l("123")}function i(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=p.getPooled(),this.reconcileTransaction=P.ReactReconcileTransaction.getPooled(!0)}function o(t,e,n,i,o,a){return r(),E.batchedUpdates(t,e,n,i,o,a)}function a(t,e){return t._mountOrder-e._mountOrder}function u(t){var e=t.dirtyComponentsLength;e!==g.length&&l("124",e,g.length),g.sort(a),_++;for(var n=0;n=0&&"[object Array]"===Object.prototype.toString.call(t)}},function(t,e,n){"use strict";function r(t){return t&&t["@@transducer/reduced"]?t:{"@@transducer/value":t,"@@transducer/reduced":!0}}e.a=r},function(t,e,n){"use strict";var r=n(5),i=(n(3),function(t){var e=this;if(e.instancePool.length){var n=e.instancePool.pop();return e.call(n,t),n}return new e(t)}),o=function(t,e){var n=this;if(n.instancePool.length){var r=n.instancePool.pop();return n.call(r,t,e),r}return new n(t,e)},a=function(t,e,n){var r=this;if(r.instancePool.length){var i=r.instancePool.pop();return r.call(i,t,e,n),i}return new r(t,e,n)},u=function(t,e,n,r){var i=this;if(i.instancePool.length){var o=i.instancePool.pop();return i.call(o,t,e,n,r),o}return new i(t,e,n,r)},s=function(t){var e=this;t instanceof e||r("25"),t.destructor(),e.instancePool.length=0}e.a=r;var i=n(151)},function(t,e,n){"use strict";var r=n(0),i=n.i(r.a)(function(t,e){return e>t?e:t});e.a=i},function(t,e,n){"use strict";var r=n(0),i=n.i(r.a)(function(t,e){for(var n=e,r=0;r1){for(var d=Array(h),v=0;v1){for(var m=Array(y),g=0;g0&&void 0!==arguments[0]&&arguments[0],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return{type:s,isDebug:t,jsPluginImports:e,cssPluginImports:n}}function i(){return{type:u}}function o(){return{type:l}}function a(){return{type:c}}n.d(e,"f",function(){return u}),n.d(e,"d",function(){return s}),n.d(e,"c",function(){return c}),n.d(e,"g",function(){return l}),e.a=r,e.b=i,e.h=o,e.e=a;var u="flow_startAnswering",s="flow_reset",c="flow_end",l="flow_firstQuestionLoaded"},function(t,e,n){"use strict";function r(t){return!0===t||"true"===t}function i(t){return!1===t||"false"===t}function o(t){for(var e=t.length,n=void 0,r=void 0;0!==e;)r=Math.floor(Math.random()*e),e-=1,n=t[e],t[e]=t[r],t[r]=n;return t}function a(t){for(var e=Math.floor(Math.random()*t.length*2),n=0;n>>0;if(""+n!==e||4294967295===n)return NaN;e=n}return e<0?d(t)+e:e}function y(){return!0}function m(t,e,n){return(0===t||void 0!==n&&t<=-n)&&(void 0===e||void 0!==n&&e>=n)}function g(t,e){return b(t,e,0)}function _(t,e){return b(t,e,e)}function b(t,e,n){return void 0===t?n:t<0?Math.max(0,e+t):void 0===e?t:Math.min(e,t)}function w(t){this.next=t}function E(t,e,n,r){var i=0===t?e:1===t?n:[e,n];return r?r.value=i:r={value:i,done:!1},r}function C(){return{value:void 0,done:!0}}function x(t){return!!I(t)}function S(t){return t&&"function"===typeof t.next}function O(t){var e=I(t);return e&&e.call(t)}function I(t){var e=t&&(En&&t[En]||t[Cn]);if("function"===typeof e)return e}function P(t){return t&&"number"===typeof t.length}function k(t){return null===t||void 0===t?L():o(t)?t.toSeq():z(t)}function T(t){return null===t||void 0===t?L().toKeyedSeq():o(t)?a(t)?t.toSeq():t.fromEntrySeq():q(t)}function N(t){return null===t||void 0===t?L():o(t)?a(t)?t.entrySeq():t.toIndexedSeq():F(t)}function M(t){return(null===t||void 0===t?L():o(t)?a(t)?t.entrySeq():t:F(t)).toSetSeq()}function A(t){this._array=t,this.size=t.length}function D(t){var e=Object.keys(t);this._object=t,this._keys=e,this.size=e.length}function R(t){this._iterable=t,this.size=t.length||t.size}function j(t){this._iterator=t,this._iteratorCache=[]}function U(t){return!(!t||!t[Sn])}function L(){return On||(On=new A([]))}function q(t){var e=Array.isArray(t)?new A(t).fromEntrySeq():S(t)?new j(t).fromEntrySeq():x(t)?new R(t).fromEntrySeq():"object"===typeof t?new D(t):void 0;if(!e)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+t);return e}function F(t){var e=B(t);if(!e)throw new TypeError("Expected Array or iterable object of values: "+t);return e}function z(t){var e=B(t)||"object"===typeof t&&new D(t);if(!e)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+t);return e}function B(t){return P(t)?new A(t):S(t)?new j(t):x(t)?new R(t):void 0}function V(t,e,n,r){var i=t._cache;if(i){for(var o=i.length-1,a=0;a<=o;a++){var u=i[n?o-a:a];if(!1===e(u[1],r?u[0]:a,t))return a+1}return a}return t.__iterateUncached(e,n)}function W(t,e,n,r){var i=t._cache;if(i){var o=i.length-1,a=0;return new w(function(){var t=i[n?o-a:a];return a++>o?C():E(e,r?t[0]:a-1,t[1])})}return t.__iteratorUncached(e,n)}function H(t,e){return e?K(e,t,"",{"":t}):Y(t)}function K(t,e,n,r){return Array.isArray(e)?t.call(r,n,N(e).map(function(n,r){return K(t,n,r,e)})):G(e)?t.call(r,n,T(e).map(function(n,r){return K(t,n,r,e)})):e}function Y(t){return Array.isArray(t)?N(t).map(Y).toList():G(t)?T(t).map(Y).toMap():t}function G(t){return t&&(t.constructor===Object||void 0===t.constructor)}function X(t,e){if(t===e||t!==t&&e!==e)return!0;if(!t||!e)return!1;if("function"===typeof t.valueOf&&"function"===typeof e.valueOf){if(t=t.valueOf(),e=e.valueOf(),t===e||t!==t&&e!==e)return!0;if(!t||!e)return!1}return!("function"!==typeof t.equals||"function"!==typeof e.equals||!t.equals(e))}function Q(t,e){if(t===e)return!0;if(!o(e)||void 0!==t.size&&void 0!==e.size&&t.size!==e.size||void 0!==t.__hash&&void 0!==e.__hash&&t.__hash!==e.__hash||a(t)!==a(e)||u(t)!==u(e)||c(t)!==c(e))return!1;if(0===t.size&&0===e.size)return!0;var n=!s(t);if(c(t)){var r=t.entries();return e.every(function(t,e){var i=r.next().value;return i&&X(i[1],t)&&(n||X(i[0],e))})&&r.next().done}var i=!1;if(void 0===t.size)if(void 0===e.size)"function"===typeof t.cacheResult&&t.cacheResult();else{i=!0;var l=t;t=e,e=l}var f=!0,p=e.__iterate(function(e,r){if(n?!t.has(e):i?!X(e,t.get(r,yn)):!X(t.get(r,yn),e))return f=!1,!1});return f&&t.size===p}function $(t,e){if(!(this instanceof $))return new $(t,e);if(this._value=t,this.size=void 0===e?1/0:Math.max(0,e),0===this.size){if(In)return In;In=this}}function J(t,e){if(!t)throw new Error(e)}function Z(t,e,n){if(!(this instanceof Z))return new Z(t,e,n);if(J(0!==n,"Cannot step a Range by 0"),t=t||0,void 0===e&&(e=1/0),n=void 0===n?1:Math.abs(n),e>>1&1073741824|3221225471&t}function ot(t){if(!1===t||null===t||void 0===t)return 0;if("function"===typeof t.valueOf&&(!1===(t=t.valueOf())||null===t||void 0===t))return 0;if(!0===t)return 1;var e=typeof t;if("number"===e){if(t!==t||t===1/0)return 0;var n=0|t;for(n!==t&&(n^=4294967295*t);t>4294967295;)t/=4294967295,n^=t;return it(n)}if("string"===e)return t.length>jn?at(t):ut(t);if("function"===typeof t.hashCode)return t.hashCode();if("object"===e)return st(t);if("function"===typeof t.toString)return ut(t.toString());throw new Error("Value type "+e+" cannot be hashed.")}function at(t){var e=qn[t];return void 0===e&&(e=ut(t),Ln===Un&&(Ln=0,qn={}),Ln++,qn[t]=e),e}function ut(t){for(var e=0,n=0;n0)switch(t.nodeType){case 1:return t.uniqueID;case 9:return t.documentElement&&t.documentElement.uniqueID}}function lt(t){J(t!==1/0,"Cannot perform this action with an infinite size.")}function ft(t){return null===t||void 0===t?Et():pt(t)&&!c(t)?t:Et().withMutations(function(e){var r=n(t);lt(r.size),r.forEach(function(t,n){return e.set(n,t)})})}function pt(t){return!(!t||!t[Fn])}function ht(t,e){this.ownerID=t,this.entries=e}function dt(t,e,n){this.ownerID=t,this.bitmap=e,this.nodes=n}function vt(t,e,n){this.ownerID=t,this.count=e,this.nodes=n}function yt(t,e,n){this.ownerID=t,this.keyHash=e,this.entries=n}function mt(t,e,n){this.ownerID=t,this.keyHash=e,this.entry=n}function gt(t,e,n){this._type=e,this._reverse=n,this._stack=t._root&&bt(t._root)}function _t(t,e){return E(t,e[0],e[1])}function bt(t,e){return{node:t,index:0,__prev:e}}function wt(t,e,n,r){var i=Object.create(zn);return i.size=t,i._root=e,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function Et(){return Bn||(Bn=wt(0))}function Ct(t,e,n){var r,i;if(t._root){var o=l(mn),a=l(gn);if(r=xt(t._root,t.__ownerID,0,void 0,e,n,o,a),!a.value)return t;i=t.size+(o.value?n===yn?-1:1:0)}else{if(n===yn)return t;i=1,r=new ht(t.__ownerID,[[e,n]])}return t.__ownerID?(t.size=i,t._root=r,t.__hash=void 0,t.__altered=!0,t):r?wt(i,r):Et()}function xt(t,e,n,r,i,o,a,u){return t?t.update(e,n,r,i,o,a,u):o===yn?t:(f(u),f(a),new mt(e,r,[i,o]))}function St(t){return t.constructor===mt||t.constructor===yt}function Ot(t,e,n,r,i){if(t.keyHash===r)return new yt(e,r,[t.entry,i]);var o,a=(0===n?t.keyHash:t.keyHash>>>n)&vn,u=(0===n?r:r>>>n)&vn;return new dt(e,1<>>=1)a[u]=1&n?e[o++]:void 0;return a[r]=i,new vt(t,o+1,a)}function Tt(t,e,r){for(var i=[],a=0;a>1&1431655765,t=(858993459&t)+(t>>2&858993459),t=t+(t>>4)&252645135,t+=t>>8,127&(t+=t>>16)}function jt(t,e,n,r){var i=r?t:h(t);return i[e]=n,i}function Ut(t,e,n,r){var i=t.length+1;if(r&&e+1===i)return t[e]=n,t;for(var o=new Array(i),a=0,u=0;u0&&io?0:o-n,c=a-n;return c>dn&&(c=dn),function(){if(i===c)return Xn;var t=e?--c:i++;return r&&r[t]}}function i(t,r,i){var u,s=t&&t.array,c=i>o?0:o-i>>r,l=1+(a-i>>r);return l>dn&&(l=dn),function(){for(;;){if(u){var t=u();if(t!==Xn)return t;u=null}if(c===l)return Xn;var o=e?--l:c++;u=n(s&&s[o],r-hn,i+(o<=t.size||e<0)return t.withMutations(function(t){e<0?Xt(t,e).set(0,n):Xt(t,0,e+1).set(e,n)});e+=t._origin;var r=t._tail,i=t._root,o=l(gn);return e>=$t(t._capacity)?r=Kt(r,t.__ownerID,0,e,n,o):i=Kt(i,t.__ownerID,t._level,e,n,o),o.value?t.__ownerID?(t._root=i,t._tail=r,t.__hash=void 0,t.__altered=!0,t):Vt(t._origin,t._capacity,t._level,i,r):t}function Kt(t,e,n,r,i,o){var a=r>>>n&vn,u=t&&a0){var c=t&&t.array[a],l=Kt(c,e,n-hn,r,i,o);return l===c?t:(s=Yt(t,e),s.array[a]=l,s)}return u&&t.array[a]===i?t:(f(o),s=Yt(t,e),void 0===i&&a===s.array.length-1?s.array.pop():s.array[a]=i,s)}function Yt(t,e){return e&&t&&e===t.ownerID?t:new zt(t?t.array.slice():[],e)}function Gt(t,e){if(e>=$t(t._capacity))return t._tail;if(e<1<0;)n=n.array[e>>>r&vn],r-=hn;return n}}function Xt(t,e,n){void 0!==e&&(e|=0),void 0!==n&&(n|=0);var r=t.__ownerID||new p,i=t._origin,o=t._capacity,a=i+e,u=void 0===n?o:n<0?o+n:i+n;if(a===i&&u===o)return t;if(a>=u)return t.clear();for(var s=t._level,c=t._root,l=0;a+l<0;)c=new zt(c&&c.array.length?[void 0,c]:[],r),s+=hn,l+=1<=1<f?new zt([],r):d;if(d&&h>f&&ahn;m-=hn){var g=f>>>m&vn;y=y.array[g]=Yt(y.array[g],r)}y.array[f>>>hn&vn]=d}if(u=h)a-=h,u-=h,s=hn,c=null,v=v&&v.removeBefore(r,0,a);else if(a>i||h>>s&vn;if(_!==h>>>s&vn)break;_&&(l+=(1<i&&(c=c.removeBefore(r,s,a-l)),c&&ha&&(a=c.size),o(s)||(c=c.map(function(t){return H(t)})),i.push(c)}return a>t.size&&(t=t.setSize(a)),At(t,e,i)}function $t(t){return t>>hn<=dn&&a.size>=2*o.size?(i=a.filter(function(t,e){return void 0!==t&&u!==e}),r=i.toKeyedSeq().map(function(t){return t[0]}).flip().toMap(),t.__ownerID&&(r.__ownerID=i.__ownerID=t.__ownerID)):(r=o.remove(e),i=u===a.size-1?a.pop():a.set(u,void 0))}else if(s){if(n===a.get(u)[1])return t;r=o,i=a.set(u,[e,n])}else r=o.set(e,a.size),i=a.set(a.size,[e,n]);return t.__ownerID?(t.size=r.size,t._map=r,t._list=i,t.__hash=void 0,t):te(r,i)}function re(t,e){this._iter=t,this._useKeys=e,this.size=t.size}function ie(t){this._iter=t,this.size=t.size}function oe(t){this._iter=t,this.size=t.size}function ae(t){this._iter=t,this.size=t.size}function ue(t){var e=Pe(t);return e._iter=t,e.size=t.size,e.flip=function(){return t},e.reverse=function(){var e=t.reverse.apply(this);return e.flip=function(){return t.reverse()},e},e.has=function(e){return t.includes(e)},e.includes=function(e){return t.has(e)},e.cacheResult=ke,e.__iterateUncached=function(e,n){var r=this;return t.__iterate(function(t,n){return!1!==e(n,t,r)},n)},e.__iteratorUncached=function(e,n){if(e===wn){var r=t.__iterator(e,n);return new w(function(){var t=r.next();if(!t.done){var e=t.value[0];t.value[0]=t.value[1],t.value[1]=e}return t})}return t.__iterator(e===bn?_n:bn,n)},e}function se(t,e,n){var r=Pe(t);return r.size=t.size,r.has=function(e){return t.has(e)},r.get=function(r,i){var o=t.get(r,yn);return o===yn?i:e.call(n,o,r,t)},r.__iterateUncached=function(r,i){var o=this;return t.__iterate(function(t,i,a){return!1!==r(e.call(n,t,i,a),i,o)},i)},r.__iteratorUncached=function(r,i){var o=t.__iterator(wn,i);return new w(function(){var i=o.next();if(i.done)return i;var a=i.value,u=a[0];return E(r,u,e.call(n,a[1],u,t),i)})},r}function ce(t,e){var n=Pe(t);return n._iter=t,n.size=t.size,n.reverse=function(){return t},t.flip&&(n.flip=function(){var e=ue(t);return e.reverse=function(){return t.flip()},e}),n.get=function(n,r){return t.get(e?n:-1-n,r)},n.has=function(n){return t.has(e?n:-1-n)},n.includes=function(e){return t.includes(e)},n.cacheResult=ke,n.__iterate=function(e,n){var r=this;return t.__iterate(function(t,n){return e(t,n,r)},!n)},n.__iterator=function(e,n){return t.__iterator(e,!n)},n}function le(t,e,n,r){var i=Pe(t);return r&&(i.has=function(r){var i=t.get(r,yn);return i!==yn&&!!e.call(n,i,r,t)},i.get=function(r,i){var o=t.get(r,yn);return o!==yn&&e.call(n,o,r,t)?o:i}),i.__iterateUncached=function(i,o){var a=this,u=0;return t.__iterate(function(t,o,s){if(e.call(n,t,o,s))return u++,i(t,r?o:u-1,a)},o),u},i.__iteratorUncached=function(i,o){var a=t.__iterator(wn,o),u=0;return new w(function(){for(;;){var o=a.next();if(o.done)return o;var s=o.value,c=s[0],l=s[1];if(e.call(n,l,c,t))return E(i,r?c:u++,l,o)}})},i}function fe(t,e,n){var r=ft().asMutable();return t.__iterate(function(i,o){r.update(e.call(n,i,o,t),0,function(t){return t+1})}),r.asImmutable()}function pe(t,e,n){var r=a(t),i=(c(t)?Jt():ft()).asMutable();t.__iterate(function(o,a){i.update(e.call(n,o,a,t),function(t){return t=t||[],t.push(r?[a,o]:o),t})});var o=Ie(t);return i.map(function(e){return xe(t,o(e))})}function he(t,e,n,r){var i=t.size;if(void 0!==e&&(e|=0),void 0!==n&&(n===1/0?n=i:n|=0),m(e,n,i))return t;var o=g(e,i),a=_(n,i);if(o!==o||a!==a)return he(t.toSeq().cacheResult(),e,n,r);var u,s=a-o;s===s&&(u=s<0?0:s);var c=Pe(t);return c.size=0===u?u:t.size&&u||void 0,!r&&U(t)&&u>=0&&(c.get=function(e,n){return e=v(this,e),e>=0&&eu)return C();var t=i.next();return r||e===bn?t:e===_n?E(e,s-1,void 0,t):E(e,s-1,t.value[1],t)})},c}function de(t,e,n){var r=Pe(t);return r.__iterateUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterate(r,i);var a=0;return t.__iterate(function(t,i,u){return e.call(n,t,i,u)&&++a&&r(t,i,o)}),a},r.__iteratorUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterator(r,i);var a=t.__iterator(wn,i),u=!0;return new w(function(){if(!u)return C();var t=a.next();if(t.done)return t;var i=t.value,s=i[0],c=i[1];return e.call(n,c,s,o)?r===wn?t:E(r,s,c,t):(u=!1,C())})},r}function ve(t,e,n,r){var i=Pe(t);return i.__iterateUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterate(i,o);var u=!0,s=0;return t.__iterate(function(t,o,c){if(!u||!(u=e.call(n,t,o,c)))return s++,i(t,r?o:s-1,a)}),s},i.__iteratorUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterator(i,o);var u=t.__iterator(wn,o),s=!0,c=0;return new w(function(){var t,o,l;do{if(t=u.next(),t.done)return r||i===bn?t:i===_n?E(i,c++,void 0,t):E(i,c++,t.value[1],t);var f=t.value;o=f[0],l=f[1],s&&(s=e.call(n,l,o,a))}while(s);return i===wn?t:E(i,o,l,t)})},i}function ye(t,e){var r=a(t),i=[t].concat(e).map(function(t){return o(t)?r&&(t=n(t)):t=r?q(t):F(Array.isArray(t)?t:[t]),t}).filter(function(t){return 0!==t.size});if(0===i.length)return t;if(1===i.length){var s=i[0];if(s===t||r&&a(s)||u(t)&&u(s))return s}var c=new A(i);return r?c=c.toKeyedSeq():u(t)||(c=c.toSetSeq()),c=c.flatten(!0),c.size=i.reduce(function(t,e){if(void 0!==t){var n=e.size;if(void 0!==n)return t+n}},0),c}function me(t,e,n){var r=Pe(t);return r.__iterateUncached=function(r,i){function a(t,c){var l=this;t.__iterate(function(t,i){return(!e||c0}function Ce(t,n,r){var i=Pe(t);return i.size=new A(r).map(function(t){return t.size}).min(),i.__iterate=function(t,e){for(var n,r=this.__iterator(bn,e),i=0;!(n=r.next()).done&&!1!==t(n.value,i++,this););return i},i.__iteratorUncached=function(t,i){var o=r.map(function(t){return t=e(t),O(i?t.reverse():t)}),a=0,u=!1;return new w(function(){var e;return u||(e=o.map(function(t){return t.next()}),u=e.some(function(t){return t.done})),u?C():E(t,a++,n.apply(null,e.map(function(t){return t.value})))})},i}function xe(t,e){return U(t)?e:t.constructor(e)}function Se(t){if(t!==Object(t))throw new TypeError("Expected [K, V] tuple: "+t)}function Oe(t){return lt(t.size),d(t)}function Ie(t){return a(t)?n:u(t)?r:i}function Pe(t){return Object.create((a(t)?T:u(t)?N:M).prototype)}function ke(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):k.prototype.cacheResult.call(this)}function Te(t,e){return t>e?1:te?-1:0}function on(t){if(t.size===1/0)return 0;var e=c(t),n=a(t),r=e?1:0;return an(t.__iterate(n?e?function(t,e){r=31*r+un(ot(t),ot(e))|0}:function(t,e){r=r+un(ot(t),ot(e))|0}:e?function(t){r=31*r+ot(t)|0}:function(t){r=r+ot(t)|0}),r)}function an(t,e){return e=Tn(e,3432918353),e=Tn(e<<15|e>>>-15,461845907),e=Tn(e<<13|e>>>-13,5),e=(e+3864292196|0)^t,e=Tn(e^e>>>16,2246822507),e=Tn(e^e>>>13,3266489909),e=it(e^e>>>16)}function un(t,e){return t^e+2654435769+(t<<6)+(t>>2)|0}var sn=Array.prototype.slice;t(n,e),t(r,e),t(i,e),e.isIterable=o,e.isKeyed=a,e.isIndexed=u,e.isAssociative=s,e.isOrdered=c,e.Keyed=n,e.Indexed=r,e.Set=i;var cn="@@__IMMUTABLE_ITERABLE__@@",ln="@@__IMMUTABLE_KEYED__@@",fn="@@__IMMUTABLE_INDEXED__@@",pn="@@__IMMUTABLE_ORDERED__@@",hn=5,dn=1<r?C():E(t,i,n[e?r-i++:i++])})},t(D,T),D.prototype.get=function(t,e){return void 0===e||this.has(t)?this._object[t]:e},D.prototype.has=function(t){return this._object.hasOwnProperty(t)},D.prototype.__iterate=function(t,e){for(var n=this._object,r=this._keys,i=r.length-1,o=0;o<=i;o++){var a=r[e?i-o:o];if(!1===t(n[a],a,this))return o+1}return o},D.prototype.__iterator=function(t,e){var n=this._object,r=this._keys,i=r.length-1,o=0;return new w(function(){var a=r[e?i-o:o];return o++>i?C():E(t,a,n[a])})},D.prototype[pn]=!0,t(R,N),R.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);var n=this._iterable,r=O(n),i=0;if(S(r))for(var o;!(o=r.next()).done&&!1!==t(o.value,i++,this););return i},R.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var n=this._iterable,r=O(n);if(!S(r))return new w(C);var i=0;return new w(function(){var e=r.next();return e.done?e:E(t,i++,e.value)})},t(j,N),j.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);for(var n=this._iterator,r=this._iteratorCache,i=0;i=r.length){var e=n.next();if(e.done)return e;r[i]=e.value}return E(t,i,r[i++])})};var On;t($,N),$.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},$.prototype.get=function(t,e){return this.has(t)?this._value:e},$.prototype.includes=function(t){return X(this._value,t)},$.prototype.slice=function(t,e){var n=this.size;return m(t,e,n)?this:new $(this._value,_(e,n)-g(t,n))},$.prototype.reverse=function(){return this},$.prototype.indexOf=function(t){return X(this._value,t)?0:-1},$.prototype.lastIndexOf=function(t){return X(this._value,t)?this.size:-1},$.prototype.__iterate=function(t,e){for(var n=0;n=0&&e=0&&nn?C():E(t,o++,a)})},Z.prototype.equals=function(t){return t instanceof Z?this._start===t._start&&this._end===t._end&&this._step===t._step:Q(this,t)};var Pn;t(tt,e),t(et,tt),t(nt,tt),t(rt,tt),tt.Keyed=et,tt.Indexed=nt,tt.Set=rt;var kn,Tn="function"===typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(t,e){t|=0,e|=0;var n=65535&t,r=65535&e;return n*r+((t>>>16)*r+n*(e>>>16)<<16>>>0)|0},Nn=Object.isExtensible,Mn=function(){try{return Object.defineProperty({},"@",{}),!0}catch(t){return!1}}(),An="function"===typeof WeakMap;An&&(kn=new WeakMap);var Dn=0,Rn="__immutablehash__";"function"===typeof Symbol&&(Rn=Symbol(Rn));var jn=16,Un=255,Ln=0,qn={};t(ft,et),ft.of=function(){var t=sn.call(arguments,0);return Et().withMutations(function(e){for(var n=0;n=t.length)throw new Error("Missing value for key: "+t[n]);e.set(t[n],t[n+1])}})},ft.prototype.toString=function(){return this.__toString("Map {","}")},ft.prototype.get=function(t,e){return this._root?this._root.get(0,void 0,t,e):e},ft.prototype.set=function(t,e){return Ct(this,t,e)},ft.prototype.setIn=function(t,e){return this.updateIn(t,yn,function(){return e})},ft.prototype.remove=function(t){return Ct(this,t,yn)},ft.prototype.deleteIn=function(t){return this.updateIn(t,function(){return yn})},ft.prototype.update=function(t,e,n){return 1===arguments.length?t(this):this.updateIn([t],e,n)},ft.prototype.updateIn=function(t,e,n){n||(n=e,e=void 0);var r=Dt(this,Ne(t),e,n);return r===yn?void 0:r},ft.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):Et()},ft.prototype.merge=function(){return Tt(this,void 0,arguments)},ft.prototype.mergeWith=function(t){return Tt(this,t,sn.call(arguments,1))},ft.prototype.mergeIn=function(t){var e=sn.call(arguments,1);return this.updateIn(t,Et(),function(t){return"function"===typeof t.merge?t.merge.apply(t,e):e[e.length-1]})},ft.prototype.mergeDeep=function(){return Tt(this,Nt,arguments)},ft.prototype.mergeDeepWith=function(t){var e=sn.call(arguments,1);return Tt(this,Mt(t),e)},ft.prototype.mergeDeepIn=function(t){var e=sn.call(arguments,1);return this.updateIn(t,Et(),function(t){return"function"===typeof t.mergeDeep?t.mergeDeep.apply(t,e):e[e.length-1]})},ft.prototype.sort=function(t){return Jt(be(this,t))},ft.prototype.sortBy=function(t,e){return Jt(be(this,e,t))},ft.prototype.withMutations=function(t){var e=this.asMutable();return t(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this},ft.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new p)},ft.prototype.asImmutable=function(){return this.__ensureOwner()},ft.prototype.wasAltered=function(){return this.__altered},ft.prototype.__iterator=function(t,e){return new gt(this,t,e)},ft.prototype.__iterate=function(t,e){var n=this,r=0;return this._root&&this._root.iterate(function(e){return r++,t(e[1],e[0],n)},e),r},ft.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?wt(this.size,this._root,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},ft.isMap=pt;var Fn="@@__IMMUTABLE_MAP__@@",zn=ft.prototype;zn[Fn]=!0,zn.delete=zn.remove,zn.removeIn=zn.deleteIn,ht.prototype.get=function(t,e,n,r){for(var i=this.entries,o=0,a=i.length;o=Vn)return It(t,s,r,i);var d=t&&t===this.ownerID,v=d?s:h(s);return p?u?c===l-1?v.pop():v[c]=v.pop():v[c]=[r,i]:v.push([r,i]),d?(this.entries=v,this):new ht(t,v)}},dt.prototype.get=function(t,e,n,r){void 0===e&&(e=ot(n));var i=1<<((0===t?e:e>>>t)&vn),o=this.bitmap;return 0===(o&i)?r:this.nodes[Rt(o&i-1)].get(t+hn,e,n,r)},dt.prototype.update=function(t,e,n,r,i,o,a){void 0===n&&(n=ot(r));var u=(0===e?n:n>>>e)&vn,s=1<=Wn)return kt(t,p,c,u,d);if(l&&!d&&2===p.length&&St(p[1^f]))return p[1^f];if(l&&d&&1===p.length&&St(d))return d;var v=t&&t===this.ownerID,y=l?d?c:c^s:c|s,m=l?d?jt(p,f,d,v):Lt(p,f,v):Ut(p,f,d,v);return v?(this.bitmap=y,this.nodes=m,this):new dt(t,y,m)},vt.prototype.get=function(t,e,n,r){void 0===e&&(e=ot(n));var i=(0===t?e:e>>>t)&vn,o=this.nodes[i];return o?o.get(t+hn,e,n,r):r},vt.prototype.update=function(t,e,n,r,i,o,a){void 0===n&&(n=ot(r));var u=(0===e?n:n>>>e)&vn,s=i===yn,c=this.nodes,l=c[u];if(s&&!l)return this;var f=xt(l,t,e+hn,n,r,i,o,a);if(f===l)return this;var p=this.count;if(l){if(!f&&--p=0&&t>>e&vn;if(r>=this.array.length)return new zt([],t);var i,o=0===r;if(e>0){var a=this.array[r];if((i=a&&a.removeBefore(t,e-hn,n))===a&&o)return this}if(o&&!i)return this;var u=Yt(this,t);if(!o)for(var s=0;s>>e&vn;if(r>=this.array.length)return this;var i;if(e>0){var o=this.array[r];if((i=o&&o.removeAfter(t,e-hn,n))===o&&r===this.array.length-1)return this}var a=Yt(this,t);return a.array.splice(r+1),i&&(a.array[r]=i),a};var Gn,Xn={};t(Jt,ft),Jt.of=function(){return this(arguments)},Jt.prototype.toString=function(){return this.__toString("OrderedMap {","}")},Jt.prototype.get=function(t,e){var n=this._map.get(t);return void 0!==n?this._list.get(n)[1]:e},Jt.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):ee()},Jt.prototype.set=function(t,e){return ne(this,t,e)},Jt.prototype.remove=function(t){return ne(this,t,yn)},Jt.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},Jt.prototype.__iterate=function(t,e){var n=this;return this._list.__iterate(function(e){return e&&t(e[1],e[0],n)},e)},Jt.prototype.__iterator=function(t,e){return this._list.fromEntrySeq().__iterator(t,e)},Jt.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t),n=this._list.__ensureOwner(t);return t?te(e,n,t,this.__hash):(this.__ownerID=t,this._map=e,this._list=n,this)},Jt.isOrderedMap=Zt,Jt.prototype[pn]=!0,Jt.prototype.delete=Jt.prototype.remove;var Qn;t(re,T),re.prototype.get=function(t,e){return this._iter.get(t,e)},re.prototype.has=function(t){return this._iter.has(t)},re.prototype.valueSeq=function(){return this._iter.valueSeq()},re.prototype.reverse=function(){var t=this,e=ce(this,!0);return this._useKeys||(e.valueSeq=function(){return t._iter.toSeq().reverse()}),e},re.prototype.map=function(t,e){var n=this,r=se(this,t,e);return this._useKeys||(r.valueSeq=function(){return n._iter.toSeq().map(t,e)}),r},re.prototype.__iterate=function(t,e){var n,r=this;return this._iter.__iterate(this._useKeys?function(e,n){return t(e,n,r)}:(n=e?Oe(this):0,function(i){return t(i,e?--n:n++,r)}),e)},re.prototype.__iterator=function(t,e){if(this._useKeys)return this._iter.__iterator(t,e);var n=this._iter.__iterator(bn,e),r=e?Oe(this):0;return new w(function(){var i=n.next();return i.done?i:E(t,e?--r:r++,i.value,i)})},re.prototype[pn]=!0,t(ie,N),ie.prototype.includes=function(t){return this._iter.includes(t)},ie.prototype.__iterate=function(t,e){var n=this,r=0;return this._iter.__iterate(function(e){return t(e,r++,n)},e)},ie.prototype.__iterator=function(t,e){var n=this._iter.__iterator(bn,e),r=0;return new w(function(){var e=n.next();return e.done?e:E(t,r++,e.value,e)})},t(oe,M),oe.prototype.has=function(t){return this._iter.includes(t)},oe.prototype.__iterate=function(t,e){var n=this;return this._iter.__iterate(function(e){return t(e,e,n)},e)},oe.prototype.__iterator=function(t,e){var n=this._iter.__iterator(bn,e);return new w(function(){var e=n.next();return e.done?e:E(t,e.value,e.value,e)})},t(ae,T),ae.prototype.entrySeq=function(){return this._iter.toSeq()},ae.prototype.__iterate=function(t,e){var n=this;return this._iter.__iterate(function(e){if(e){Se(e);var r=o(e);return t(r?e.get(1):e[1],r?e.get(0):e[0],n)}},e)},ae.prototype.__iterator=function(t,e){var n=this._iter.__iterator(bn,e);return new w(function(){for(;;){var e=n.next();if(e.done)return e;var r=e.value;if(r){Se(r);var i=o(r);return E(t,i?r.get(0):r[0],i?r.get(1):r[1],e)}}})},ie.prototype.cacheResult=re.prototype.cacheResult=oe.prototype.cacheResult=ae.prototype.cacheResult=ke,t(Me,et),Me.prototype.toString=function(){return this.__toString(De(this)+" {","}")},Me.prototype.has=function(t){return this._defaultValues.hasOwnProperty(t)},Me.prototype.get=function(t,e){if(!this.has(t))return e;var n=this._defaultValues[t];return this._map?this._map.get(t,n):n},Me.prototype.clear=function(){if(this.__ownerID)return this._map&&this._map.clear(),this;var t=this.constructor;return t._empty||(t._empty=Ae(this,Et()))},Me.prototype.set=function(t,e){if(!this.has(t))throw new Error('Cannot set unknown key "'+t+'" on '+De(this));if(this._map&&!this._map.has(t)){if(e===this._defaultValues[t])return this}var n=this._map&&this._map.set(t,e);return this.__ownerID||n===this._map?this:Ae(this,n)},Me.prototype.remove=function(t){if(!this.has(t))return this;var e=this._map&&this._map.remove(t);return this.__ownerID||e===this._map?this:Ae(this,e)},Me.prototype.wasAltered=function(){return this._map.wasAltered()},Me.prototype.__iterator=function(t,e){var r=this;return n(this._defaultValues).map(function(t,e){return r.get(e)}).__iterator(t,e)},Me.prototype.__iterate=function(t,e){var r=this;return n(this._defaultValues).map(function(t,e){return r.get(e)}).__iterate(t,e)},Me.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map&&this._map.__ensureOwner(t);return t?Ae(this,e,t):(this.__ownerID=t,this._map=e,this)};var $n=Me.prototype;$n.delete=$n.remove,$n.deleteIn=$n.removeIn=zn.removeIn,$n.merge=zn.merge,$n.mergeWith=zn.mergeWith,$n.mergeIn=zn.mergeIn,$n.mergeDeep=zn.mergeDeep,$n.mergeDeepWith=zn.mergeDeepWith,$n.mergeDeepIn=zn.mergeDeepIn,$n.setIn=zn.setIn,$n.update=zn.update,$n.updateIn=zn.updateIn,$n.withMutations=zn.withMutations,$n.asMutable=zn.asMutable,$n.asImmutable=zn.asImmutable,t(Ue,rt),Ue.of=function(){return this(arguments)},Ue.fromKeys=function(t){return this(n(t).keySeq())},Ue.prototype.toString=function(){return this.__toString("Set {","}")},Ue.prototype.has=function(t){return this._map.has(t)},Ue.prototype.add=function(t){return qe(this,this._map.set(t,!0))},Ue.prototype.remove=function(t){return qe(this,this._map.remove(t))},Ue.prototype.clear=function(){return qe(this,this._map.clear())},Ue.prototype.union=function(){var t=sn.call(arguments,0);return t=t.filter(function(t){return 0!==t.size}),0===t.length?this:0!==this.size||this.__ownerID||1!==t.length?this.withMutations(function(e){for(var n=0;n=0;n--)e={value:arguments[n],next:e};return this.__ownerID?(this.size=t,this._head=e,this.__hash=void 0,this.__altered=!0,this):Ge(t,e)},Ke.prototype.pushAll=function(t){if(t=r(t),0===t.size)return this;lt(t.size);var e=this.size,n=this._head;return t.reverse().forEach(function(t){e++,n={value:t,next:n}}),this.__ownerID?(this.size=e,this._head=n,this.__hash=void 0,this.__altered=!0,this):Ge(e,n)},Ke.prototype.pop=function(){return this.slice(1)},Ke.prototype.unshift=function(){return this.push.apply(this,arguments)},Ke.prototype.unshiftAll=function(t){return this.pushAll(t)},Ke.prototype.shift=function(){return this.pop.apply(this,arguments)},Ke.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Xe()},Ke.prototype.slice=function(t,e){if(m(t,e,this.size))return this;var n=g(t,this.size);if(_(e,this.size)!==this.size)return nt.prototype.slice.call(this,t,e);for(var r=this.size-n,i=this._head;n--;)i=i.next;return this.__ownerID?(this.size=r,this._head=i,this.__hash=void 0,this.__altered=!0,this):Ge(r,i)},Ke.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Ge(this.size,this._head,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},Ke.prototype.__iterate=function(t,e){if(e)return this.reverse().__iterate(t);for(var n=0,r=this._head;r&&!1!==t(r.value,n++,this);)r=r.next;return n},Ke.prototype.__iterator=function(t,e){if(e)return this.reverse().__iterator(t);var n=0,r=this._head;return new w(function(){if(r){var e=r.value;return r=r.next,E(t,n++,e)}return C()})},Ke.isStack=Ye;var rr="@@__IMMUTABLE_STACK__@@",ir=Ke.prototype;ir[rr]=!0,ir.withMutations=zn.withMutations,ir.asMutable=zn.asMutable,ir.asImmutable=zn.asImmutable,ir.wasAltered=zn.wasAltered;var or;e.Iterator=w,Qe(e,{toArray:function(){lt(this.size);var t=new Array(this.size||0);return this.valueSeq().__iterate(function(e,n){t[n]=e}),t},toIndexedSeq:function(){return new ie(this)},toJS:function(){return this.toSeq().map(function(t){return t&&"function"===typeof t.toJS?t.toJS():t}).__toJS()},toJSON:function(){return this.toSeq().map(function(t){return t&&"function"===typeof t.toJSON?t.toJSON():t}).__toJS()},toKeyedSeq:function(){return new re(this,!0)},toMap:function(){return ft(this.toKeyedSeq())},toObject:function(){lt(this.size);var t={};return this.__iterate(function(e,n){t[n]=e}),t},toOrderedMap:function(){return Jt(this.toKeyedSeq())},toOrderedSet:function(){return Be(a(this)?this.valueSeq():this)},toSet:function(){return Ue(a(this)?this.valueSeq():this)},toSetSeq:function(){return new oe(this)},toSeq:function(){return u(this)?this.toIndexedSeq():a(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Ke(a(this)?this.valueSeq():this)},toList:function(){return qt(a(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(t,e){return 0===this.size?t+e:t+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+e},concat:function(){return xe(this,ye(this,sn.call(arguments,0)))},includes:function(t){return this.some(function(e){return X(e,t)})},entries:function(){return this.__iterator(wn)},every:function(t,e){lt(this.size);var n=!0;return this.__iterate(function(r,i,o){if(!t.call(e,r,i,o))return n=!1,!1}),n},filter:function(t,e){return xe(this,le(this,t,e,!0))},find:function(t,e,n){var r=this.findEntry(t,e);return r?r[1]:n},forEach:function(t,e){return lt(this.size),this.__iterate(e?t.bind(e):t)},join:function(t){lt(this.size),t=void 0!==t?""+t:",";var e="",n=!0;return this.__iterate(function(r){n?n=!1:e+=t,e+=null!==r&&void 0!==r?r.toString():""}),e},keys:function(){return this.__iterator(_n)},map:function(t,e){return xe(this,se(this,t,e))},reduce:function(t,e,n){lt(this.size);var r,i;return arguments.length<2?i=!0:r=e,this.__iterate(function(e,o,a){i?(i=!1,r=e):r=t.call(n,r,e,o,a)}),r},reduceRight:function(t,e,n){var r=this.toKeyedSeq().reverse();return r.reduce.apply(r,arguments)},reverse:function(){return xe(this,ce(this,!0))},slice:function(t,e){return xe(this,he(this,t,e,!0))},some:function(t,e){return!this.every(Ze(t),e)},sort:function(t){return xe(this,be(this,t))},values:function(){return this.__iterator(bn)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some(function(){return!0})},count:function(t,e){return d(t?this.toSeq().filter(t,e):this)},countBy:function(t,e){return fe(this,t,e)},equals:function(t){return Q(this,t)},entrySeq:function(){var t=this;if(t._cache)return new A(t._cache);var e=t.toSeq().map(Je).toIndexedSeq();return e.fromEntrySeq=function(){return t.toSeq()},e},filterNot:function(t,e){return this.filter(Ze(t),e)},findEntry:function(t,e,n){var r=n;return this.__iterate(function(n,i,o){if(t.call(e,n,i,o))return r=[i,n],!1}),r},findKey:function(t,e){var n=this.findEntry(t,e);return n&&n[0]},findLast:function(t,e,n){return this.toKeyedSeq().reverse().find(t,e,n)},findLastEntry:function(t,e,n){return this.toKeyedSeq().reverse().findEntry(t,e,n)},findLastKey:function(t,e){return this.toKeyedSeq().reverse().findKey(t,e)},first:function(){return this.find(y)},flatMap:function(t,e){return xe(this,ge(this,t,e))},flatten:function(t){return xe(this,me(this,t,!0))},fromEntrySeq:function(){return new ae(this)},get:function(t,e){return this.find(function(e,n){return X(n,t)},void 0,e)},getIn:function(t,e){for(var n,r=this,i=Ne(t);!(n=i.next()).done;){var o=n.value;if((r=r&&r.get?r.get(o,yn):yn)===yn)return e}return r},groupBy:function(t,e){return pe(this,t,e)},has:function(t){return this.get(t,yn)!==yn},hasIn:function(t){return this.getIn(t,yn)!==yn},isSubset:function(t){return t="function"===typeof t.includes?t:e(t),this.every(function(e){return t.includes(e)})},isSuperset:function(t){return t="function"===typeof t.isSubset?t:e(t),t.isSubset(this)},keyOf:function(t){return this.findKey(function(e){return X(e,t)})},keySeq:function(){return this.toSeq().map($e).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},lastKeyOf:function(t){return this.toKeyedSeq().reverse().keyOf(t)},max:function(t){return we(this,t)},maxBy:function(t,e){return we(this,e,t)},min:function(t){return we(this,t?tn(t):rn)},minBy:function(t,e){return we(this,e?tn(e):rn,t)},rest:function(){return this.slice(1)},skip:function(t){return this.slice(Math.max(0,t))},skipLast:function(t){return xe(this,this.toSeq().reverse().skip(t).reverse())},skipWhile:function(t,e){return xe(this,ve(this,t,e,!0))},skipUntil:function(t,e){return this.skipWhile(Ze(t),e)},sortBy:function(t,e){return xe(this,be(this,e,t))},take:function(t){return this.slice(0,Math.max(0,t))},takeLast:function(t){return xe(this,this.toSeq().reverse().take(t).reverse())},takeWhile:function(t,e){return xe(this,de(this,t,e))},takeUntil:function(t,e){return this.takeWhile(Ze(t),e)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=on(this))}});var ar=e.prototype;ar[cn]=!0,ar[xn]=ar.values,ar.__toJS=ar.toArray,ar.__toStringMapper=en,ar.inspect=ar.toSource=function(){return this.toString()},ar.chain=ar.flatMap,ar.contains=ar.includes,Qe(n,{flip:function(){return xe(this,ue(this))},mapEntries:function(t,e){var n=this,r=0;return xe(this,this.toSeq().map(function(i,o){return t.call(e,[o,i],r++,n)}).fromEntrySeq())},mapKeys:function(t,e){var n=this;return xe(this,this.toSeq().flip().map(function(r,i){return t.call(e,r,i,n)}).flip())}});var ur=n.prototype;return ur[ln]=!0,ur[xn]=ar.entries,ur.__toJS=ar.toObject,ur.__toStringMapper=function(t,e){return JSON.stringify(e)+": "+en(t)},Qe(r,{toKeyedSeq:function(){return new re(this,!1)},filter:function(t,e){return xe(this,le(this,t,e,!1))},findIndex:function(t,e){var n=this.findEntry(t,e);return n?n[0]:-1},indexOf:function(t){var e=this.keyOf(t);return void 0===e?-1:e},lastIndexOf:function(t){var e=this.lastKeyOf(t);return void 0===e?-1:e},reverse:function(){return xe(this,ce(this,!1))},slice:function(t,e){return xe(this,he(this,t,e,!1))},splice:function(t,e){var n=arguments.length;if(e=Math.max(0|e,0),0===n||2===n&&!e)return this;t=g(t,t<0?this.count():this.size);var r=this.slice(0,t);return xe(this,1===n?r:r.concat(h(arguments,2),this.slice(t+e)))},findLastIndex:function(t,e){var n=this.findLastEntry(t,e);return n?n[0]:-1},first:function(){return this.get(0)},flatten:function(t){return xe(this,me(this,t,!1))},get:function(t,e){return t=v(this,t),t<0||this.size===1/0||void 0!==this.size&&t>this.size?e:this.find(function(e,n){return n===t},void 0,e)},has:function(t){return(t=v(this,t))>=0&&(void 0!==this.size?this.size===1/0||t=arguments.length)?f=e[l]:(f=arguments[s],s+=1),u[l]=f,n.i(o.a)(f)||(c-=1),l+=1}return c<=0?a.apply(this,u):n.i(i.a)(c,r(t,u,a))}}e.a=r;var i=n(21),o=n(65)},function(t,e,n){"use strict";var r=n(1),i=n(29),o=n(45),a=n.i(r.a)(function(t){return!!n.i(i.a)(t)||!!t&&("object"===typeof t&&(!n.i(o.a)(t)&&(1===t.nodeType?!!t.length:0===t.length||t.length>0&&(t.hasOwnProperty(0)&&t.hasOwnProperty(t.length-1)))))});e.a=a},function(t,e,n){"use strict";function r(t){return"[object Function]"===Object.prototype.toString.call(t)}e.a=r},function(t,e,n){"use strict";function r(t){return null!=t&&"object"===typeof t&&!0===t["@@functional/placeholder"]}e.a=r},function(t,e,n){"use strict";function r(t,e){for(var n=0,r=e.length,i=Array(r);n]/;t.exports=i},function(t,e,n){"use strict";var r,i=n(11),o=n(103),a=/^[ \r\n\t\f]/,u=/<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/,s=n(111),c=s(function(t,e){if(t.namespaceURI!==o.svg||"innerHTML"in t)t.innerHTML=e;else{r=r||document.createElement("div"),r.innerHTML=""+e+"";for(var n=r.firstChild;n.firstChild;)t.appendChild(n.firstChild)}});if(i.canUseDOM){var l=document.createElement("div");l.innerHTML=" ",""===l.innerHTML&&(c=function(t,e){if(t.parentNode&&t.parentNode.replaceChild(t,t),a.test(e)||"<"===e[0]&&u.test(e)){t.innerHTML=String.fromCharCode(65279)+e;var n=t.firstChild;1===n.data.length?t.removeChild(n):n.deleteData(0,1)}else t.innerHTML=e}),l=null}t.exports=c},function(t,e,n){"use strict";function r(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}function i(t,e,n){for(var r=e.length-1;r>=0;r--){var i=e[r](t);if(i)return i}return function(e,r){throw new Error("Invalid value of type "+typeof t+" for "+n+" argument when connecting component "+r.wrappedComponentName+".")}}function o(t,e){return t===e}var a=n(537),u=n(544),s=n(538),c=n(539),l=n(540),f=n(541),p=Object.assign||function(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{},e=t.connectHOC,n=void 0===e?a.a:e,h=t.mapStateToPropsFactories,d=void 0===h?c.a:h,v=t.mapDispatchToPropsFactories,y=void 0===v?s.a:v,m=t.mergePropsFactories,g=void 0===m?l.a:m,_=t.selectorFactory,b=void 0===_?f.a:_;return function(t,e,a){var s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},c=s.pure,l=void 0===c||c,f=s.areStatesEqual,h=void 0===f?o:f,v=s.areOwnPropsEqual,m=void 0===v?u.a:v,_=s.areStatePropsEqual,w=void 0===_?u.a:_,E=s.areMergedPropsEqual,C=void 0===E?u.a:E,x=r(s,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),S=i(t,d,"mapStateToProps"),O=i(e,y,"mapDispatchToProps"),I=i(a,g,"mergeProps");return n(b,p({methodName:"connect",getDisplayName:function(t){return"Connect("+t+")"},shouldHandleStateChanges:Boolean(t),initMapStateToProps:S,initMapDispatchToProps:O,initMergeProps:I,pure:l,areStatesEqual:h,areOwnPropsEqual:m,areStatePropsEqual:w,areMergedPropsEqual:C},x))}}()},function(t,e,n){"use strict";function r(t,e){return t===e?0!==t||0!==e||1/t===1/e:t!==t&&e!==e}function i(t,e){if(r(t,e))return!0;if("object"!==typeof t||null===t||"object"!==typeof e||null===e)return!1;var n=Object.keys(t),i=Object.keys(e);if(n.length!==i.length)return!1;for(var a=0;a-1||a("96",t),!c.plugins[n]){e.extractEvents||a("97",t),c.plugins[n]=e;var r=e.eventTypes;for(var o in r)i(r[o],e,o)||a("98",o,t)}}}function i(t,e,n){c.eventNameDispatchConfigs.hasOwnProperty(n)&&a("99",n),c.eventNameDispatchConfigs[n]=t;var r=t.phasedRegistrationNames;if(r){for(var i in r)if(r.hasOwnProperty(i)){var u=r[i];o(u,e,n)}return!0}return!!t.registrationName&&(o(t.registrationName,e,n),!0)}function o(t,e,n){c.registrationNameModules[t]&&a("100",t),c.registrationNameModules[t]=e,c.registrationNameDependencies[t]=e.eventTypes[n].dependencies}var a=n(5),u=(n(3),null),s={},c={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},possibleRegistrationNames:null,injectEventPluginOrder:function(t){u&&a("101"),u=Array.prototype.slice.call(t),r()},injectEventPluginsByName:function(t){var e=!1;for(var n in t)if(t.hasOwnProperty(n)){var i=t[n];s.hasOwnProperty(n)&&s[n]===i||(s[n]&&a("102",n),s[n]=i,e=!0)}e&&r()},getPluginModuleForEvent:function(t){var e=t.dispatchConfig;if(e.registrationName)return c.registrationNameModules[e.registrationName]||null;if(void 0!==e.phasedRegistrationNames){var n=e.phasedRegistrationNames;for(var r in n)if(n.hasOwnProperty(r)){var i=c.registrationNameModules[n[r]];if(i)return i}}return null},_resetEventPlugins:function(){u=null;for(var t in s)s.hasOwnProperty(t)&&delete s[t];c.plugins.length=0;var e=c.eventNameDispatchConfigs;for(var n in e)e.hasOwnProperty(n)&&delete e[n];var r=c.registrationNameModules;for(var i in r)r.hasOwnProperty(i)&&delete r[i]}};t.exports=c},function(t,e,n){"use strict";function r(t){return"topMouseUp"===t||"topTouchEnd"===t||"topTouchCancel"===t}function i(t){return"topMouseMove"===t||"topTouchMove"===t}function o(t){return"topMouseDown"===t||"topTouchStart"===t}function a(t,e,n,r){var i=t.type||"unknown-event";t.currentTarget=m.getNodeFromInstance(r),e?v.invokeGuardedCallbackWithCatch(i,n,t):v.invokeGuardedCallback(i,n,t),t.currentTarget=null}function u(t,e){var n=t._dispatchListeners,r=t._dispatchInstances;if(Array.isArray(n))for(var i=0;i0&&r.length<20?n+" (keys: "+r.join(", ")+")":n}function o(t,e){var n=u.get(t);if(!n){return null}return n}var a=n(5),u=(n(28),n(52)),s=(n(19),n(24)),c=(n(3),n(4),{isMounted:function(t){var e=u.get(t);return!!e&&!!e._renderedComponent},enqueueCallback:function(t,e,n){c.validateCallback(e,n);var i=o(t);if(!i)return null;i._pendingCallbacks?i._pendingCallbacks.push(e):i._pendingCallbacks=[e],r(i)},enqueueCallbackInternal:function(t,e){t._pendingCallbacks?t._pendingCallbacks.push(e):t._pendingCallbacks=[e],r(t)},enqueueForceUpdate:function(t){var e=o(t,"forceUpdate");e&&(e._pendingForceUpdate=!0,r(e))},enqueueReplaceState:function(t,e,n){var i=o(t,"replaceState");i&&(i._pendingStateQueue=[e],i._pendingReplaceState=!0,void 0!==n&&null!==n&&(c.validateCallback(n,"replaceState"),i._pendingCallbacks?i._pendingCallbacks.push(n):i._pendingCallbacks=[n]),r(i))},enqueueSetState:function(t,e){var n=o(t,"setState");if(n){(n._pendingStateQueue||(n._pendingStateQueue=[])).push(e),r(n)}},enqueueElementInternal:function(t,e,n){t._pendingElement=e,t._context=n,r(t)},validateCallback:function(t,e){t&&"function"!==typeof t&&a("122",e,i(t))}});t.exports=c},function(t,e,n){"use strict";var r=function(t){return"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,n,r,i){MSApp.execUnsafeLocalFunction(function(){return t(e,n,r,i)})}:t};t.exports=r},function(t,e,n){"use strict";function r(t){var e,n=t.keyCode;return"charCode"in t?0===(e=t.charCode)&&13===n&&(e=13):e=n,e>=32||13===e?e:0}t.exports=r},function(t,e,n){"use strict";function r(t){var e=this,n=e.nativeEvent;if(n.getModifierState)return n.getModifierState(t);var r=o[t];return!!r&&!!n[r]}function i(t){return r}var o={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};t.exports=i},function(t,e,n){"use strict";function r(t){var e=t.target||t.srcElement||window;return e.correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}t.exports=r},function(t,e,n){"use strict";function r(t,e){if(!o.canUseDOM||e&&!("addEventListener"in document))return!1;var n="on"+t,r=n in document;if(!r){var a=document.createElement("div");a.setAttribute(n,"return;"),r="function"===typeof a[n]}return!r&&i&&"wheel"===t&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}var i,o=n(11);o.canUseDOM&&(i=document.implementation&&document.implementation.hasFeature&&!0!==document.implementation.hasFeature("","")),t.exports=r},function(t,e,n){"use strict";function r(t,e){var n=null===t||!1===t,r=null===e||!1===e;if(n||r)return n===r;var i=typeof t,o=typeof e;return"string"===i||"number"===i?"string"===o||"number"===o:"object"===o&&t.type===e.type&&t.key===e.key}t.exports=r},function(t,e,n){"use strict";var r=(n(6),n(14)),i=(n(4),r);t.exports=i},function(t,e,n){"use strict";function r(t){"undefined"!==typeof console&&"function"===typeof console.error&&console.error(t);try{throw new Error(t)}catch(t){}}e.a=r},function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"===typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";function r(t,e,n,r){return{type:u,pageGroupInfo:t,pageInfo:e,questions:n,pageDiv:r}}function i(t,e,n,r){return{type:s,pageGroupInfo:t,pageInfo:e,questions:n,pageDiv:r}}function o(t,e){return{question:t,questionDiv:e,type:c}}function a(t,e){return{question:t,questionDiv:e,type:l}}e.b=r,e.a=i,e.c=o,e.d=a;var u="plugin_pageLoad",s="plugin_pageUnload",c="plugin_questionLoad",l="plugin_questionUnLoad"},function(t,e,n){"use strict";function r(t,e){if(e.type!==f.e)return t.questions;var n=e.questionId,r=e.name,i=e.value,a=t.questions,s=u(a,n),c=a.get(s),l={form:{}};l.form[r]=i;var h=o(c,t.lastInteractionTime);Object.assign(l,h);var d=p.a(c,l);return a.set(s,d)}function i(t,e){if(e.type!==f.d)return t.questions;var n=t.questions,r=e.rowId,i=e.colId,s=e.questionId,c=e.val,l=u(n,s),h=n.get(l),v={};void 0===i||null===i?(v[r]={selected:c},"single-choice"===h.type&&Object.entries(h.rows).forEach(function(t){var e=d(t,1),n=e[0];n!==r&&(v[n]={selected:!1})})):(v[r]={},v[r][i]={selected:c},"single-matrix"===h.type&&Object.entries(h.cols).forEach(function(t){var e=d(t,1),n=e[0];n!==i&&(v[r][n]={selected:!1})}));var y=o(h,t.lastInteractionTime),m=a(h.totalClicks);Object.assign(v,y,m);var g=p.a(h,v);return n.set(l,g)}function o(t,e){var n=new Date;return{answeredWhen:n,duration:t.duration+(n.getTime()-e.getTime())}}function a(t){return{totalClicks:++t}}function u(t,e){return t.findIndex(function(t){return t.id===e})}function s(t,e){if(e.type===f.f){c(t.questions.toArray()).then(function(r){r.token===t.token&&(r.questions&&0!==r.questions.length?e.asyncDispatch(n.i(l.b)(r)):e.asyncDispatch(n.i(h.e)()))})}}function c(t){return window.interpreter.submitAnswer(t)}e.c=r,e.b=i,e.a=s;var l=n(26),f=n(32),p=n(326),h=n(42),d=function(){function t(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,u=t[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&u.return&&u.return()}finally{if(i)throw o}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}()},function(t,e,n){"use strict";var r=n(14),i={listen:function(t,e,n){return t.addEventListener?(t.addEventListener(e,n,!1),{remove:function(){t.removeEventListener(e,n,!1)}}):t.attachEvent?(t.attachEvent("on"+e,n),{remove:function(){t.detachEvent("on"+e,n)}}):void 0},capture:function(t,e,n){return t.addEventListener?(t.addEventListener(e,n,!0),{remove:function(){t.removeEventListener(e,n,!0)}}):{remove:r}},registerDefault:function(){}};t.exports=i},function(t,e,n){"use strict";function r(t){try{t.focus()}catch(t){}}t.exports=r},function(t,e,n){"use strict";function r(t){if("undefined"===typeof(t=t||("undefined"!==typeof document?document:void 0)))return null;try{return t.activeElement||t.body}catch(e){return t.body}}t.exports=r},function(t,e,n){"use strict";var r=n(267),i=r.a.Symbol;e.a=i},function(t,e){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function i(t){if(l===setTimeout)return setTimeout(t,0);if((l===n||!l)&&setTimeout)return l=setTimeout,setTimeout(t,0);try{return l(t,0)}catch(e){try{return l.call(null,t,0)}catch(e){return l.call(this,t,0)}}}function o(t){if(f===clearTimeout)return clearTimeout(t);if((f===r||!f)&&clearTimeout)return f=clearTimeout,clearTimeout(t);try{return f(t)}catch(e){try{return f.call(null,t)}catch(e){return f.call(this,t)}}}function a(){v&&h&&(v=!1,h.length?d=h.concat(d):y=-1,d.length&&u())}function u(){if(!v){var t=i(a);v=!0;for(var e=d.length;e;){for(h=d,d=[];++y1)for(var n=1;n=i.length||e<-i.length)return i;var o=e<0?i.length:0,a=o+e,u=n.i(r.a)(i);return u[a]=t(i[a]),u});e.a=o},function(t,e,n){"use strict";var r=n(0),i=n.i(r.a)(function(t,e){return t&&e});e.a=i},function(t,e,n){"use strict";var r=n(0),i=n(7),o=n(155),a=n.i(r.a)(n.i(i.a)(["any"],o.a,function(t,e){for(var n=0;n1){var f=!n.i(s.a)(c)&&n.i(i.a)(l,c)?c[l]:n.i(a.a)(e[1])?[]:{};r=t(Array.prototype.slice.call(e,1),r,f)}if(n.i(a.a)(l)&&n.i(o.a)(c)){var p=[].concat(c);return p[l]=r,p}return n.i(u.a)(l,r,c)});e.a=c},function(t,e,n){"use strict";var r=n(21),i=n(0),o=n.i(i.a)(function(t,e){return n.i(r.a)(t.length,function(){return t.apply(e,arguments)})});e.a=o},function(t,e,n){"use strict";function r(){if(0===arguments.length)throw new Error("composeK requires at least one argument");var t=Array.prototype.slice.call(arguments),e=t.pop();return n.i(o.a)(o.a.apply(this,n.i(a.a)(i.a,t)),e)}e.a=r;var i=n(83),o=n(84),a=n(13)},function(t,e,n){"use strict";var r=n(0),i=n(86),o=n(70),a=n.i(r.a)(function(t,e){if(t>10)throw new Error("Constructor with greater than ten arguments");return 0===t?function(){return new e}:n.i(i.a)(n.i(o.a)(t,function(t,n,r,i,o,a,u,s,c,l){switch(arguments.length){case 1:return new e(t);case 2:return new e(t,n);case 3:return new e(t,n,r);case 4:return new e(t,n,r,i);case 5:return new e(t,n,r,i,o);case 6:return new e(t,n,r,i,o,a);case 7:return new e(t,n,r,i,o,a,u);case 8:return new e(t,n,r,i,o,a,u,s);case 9:return new e(t,n,r,i,o,a,u,s,c);case 10:return new e(t,n,r,i,o,a,u,s,c,l)}}))});e.a=a},function(t,e,n){"use strict";var r=n(0),i=n(66),o=n(10),a=n(35),u=n(48),s=n(23),c=n.i(r.a)(function(t,e){return n.i(o.a)(n.i(s.a)(a.a,0,n.i(u.a)("length",e)),function(){var r=arguments,o=this;return t.apply(o,n.i(i.a)(function(t){return t.apply(o,r)},e))})});e.a=c},function(t,e,n){"use strict";var r=n(0),i=n.i(r.a)(function(t,e){return null==e||e!==e?t:e});e.a=i},function(t,e,n){"use strict";var r=n(34),i=n(0),o=n.i(i.a)(function(t,e){for(var i=[],o=0,a=t.length;o=0;)e=t(n[r],e),r-=1;return e});e.a=i},function(t,e,n){"use strict";var r=n(2),i=n.i(r.a)(function(t,e,n){var r=Array.prototype.slice.call(n,0);return r.splice(t,e),r});e.a=i},function(t,e,n){"use strict";var r=n(0),i=n(82),o=n(13),a=n(174),u=n(175),s=n.i(r.a)(function(t,e){return"function"===typeof e.sequence?e.sequence(t):n.i(u.a)(function(t,e){return n.i(i.a)(n.i(o.a)(a.a,t),e)},t([]),e)});e.a=s},function(t,e,n){"use strict";var r=n(58),i=n(23),o=n.i(i.a)(r.a,0);e.a=o},function(t,e,n){"use strict";var r=n(0),i=n(143),o=n.i(r.a)(function(t,e){return n.i(i.a)(t>=0?e.length-t:0,e)});e.a=o},function(t,e,n){"use strict";var r=n(0),i=n.i(r.a)(function(t,e){var n,r=Number(e),i=0;if(r<0||isNaN(r))throw new RangeError("n must be a non-negative number");for(n=new Array(r);i.":"function"===typeof e?" Instead of passing a class like Foo, pass React.createElement(Foo) or .":null!=e&&void 0!==e.props?" This may be caused by unintentionally loading two independent copies of React.":"");var a,u=y.createElement(L,{child:e});if(t){var s=E.get(t);a=s._processChildContext(s._context)}else a=I;var l=p(n);if(l){var f=l._currentElement,d=f.props.child;if(T(d,e)){var v=l._renderedComponent.getPublicInstance(),m=r&&function(){r.call(v)};return q._updateRootComponent(l,u,a,n,m),v}q.unmountComponentAtNode(n)}var g=i(n),_=g&&!!o(g),b=c(n),w=_&&!l&&!b,C=q._renderNewRootComponent(u,n,w,a)._renderedComponent.getPublicInstance();return r&&r.call(C),C},render:function(t,e,n){return q._renderSubtreeIntoContainer(null,t,e,n)},unmountComponentAtNode:function(t){l(t)||h("40");var e=p(t);if(!e){c(t),1===t.nodeType&&t.hasAttribute(M);return!1}return delete j[e._instance.rootID],O.batchedUpdates(s,e,t,!1),!0},_mountImageIntoNode:function(t,e,n,o,a){if(l(e)||h("41"),o){var u=i(e);if(C.canReuseMarkup(t,u))return void g.precacheNode(n,u);var s=u.getAttribute(C.CHECKSUM_ATTR_NAME);u.removeAttribute(C.CHECKSUM_ATTR_NAME);var c=u.outerHTML;u.setAttribute(C.CHECKSUM_ATTR_NAME,s);var f=t,p=r(f,c),v=" (client) "+f.substring(p-20,p+20)+"\n (server) "+c.substring(p-20,p+20);e.nodeType===D&&h("42",v)}if(e.nodeType===D&&h("43"),a.useCreateElement){for(;e.lastChild;)e.removeChild(e.lastChild);d.insertTreeBefore(e,t,null)}else k(e,t),g.precacheNode(n,e.firstChild)}};t.exports=q},function(t,e,n){"use strict";var r=n(5),i=n(40),o=(n(3),{HOST:0,COMPOSITE:1,EMPTY:2,getType:function(t){return null===t||!1===t?o.EMPTY:i.isValidElement(t)?"function"===typeof t.type?o.COMPOSITE:o.HOST:void r("26",t)}});t.exports=o},function(t,e,n){"use strict";var r={currentScrollLeft:0,currentScrollTop:0,refreshScrollValues:function(t){r.currentScrollLeft=t.x,r.currentScrollTop=t.y}};t.exports=r},function(t,e,n){"use strict";function r(t,e){return null==e&&i("30"),null==t?e:Array.isArray(t)?Array.isArray(e)?(t.push.apply(t,e),t):(t.push(e),t):Array.isArray(e)?[t].concat(e):[t,e]}var i=n(5);n(3);t.exports=r},function(t,e,n){"use strict";function r(t,e,n){Array.isArray(t)?t.forEach(e,n):t&&e.call(n,t)}t.exports=r},function(t,e,n){"use strict";function r(t){for(var e;(e=t._renderedNodeType)===i.COMPOSITE;)t=t._renderedComponent;return e===i.HOST?t._renderedComponent:e===i.EMPTY?null:void 0}var i=n(196);t.exports=r},function(t,e,n){"use strict";function r(){return!o&&i.canUseDOM&&(o="textContent"in document.documentElement?"textContent":"innerText"),o}var i=n(11),o=null;t.exports=r},function(t,e,n){"use strict";function r(t){var e=t.type,n=t.nodeName;return n&&"input"===n.toLowerCase()&&("checkbox"===e||"radio"===e)}function i(t){return t._wrapperState.valueTracker}function o(t,e){t._wrapperState.valueTracker=e}function a(t){t._wrapperState.valueTracker=null}function u(t){var e;return t&&(e=r(t)?""+t.checked:t.value),e}var s=n(8),c={_getTrackerFromNode:function(t){return i(s.getInstanceFromNode(t))},track:function(t){if(!i(t)){var e=s.getNodeFromInstance(t),n=r(e)?"checked":"value",u=Object.getOwnPropertyDescriptor(e.constructor.prototype,n),c=""+e[n];e.hasOwnProperty(n)||"function"!==typeof u.get||"function"!==typeof u.set||(Object.defineProperty(e,n,{enumerable:u.enumerable,configurable:!0,get:function(){return u.get.call(this)},set:function(t){c=""+t,u.set.call(this,t)}}),o(t,{getValue:function(){return c},setValue:function(t){c=""+t},stopTracking:function(){a(t),delete e[n]}}))}},updateValueIfChanged:function(t){if(!t)return!1;var e=i(t);if(!e)return c.track(t),!0;var n=e.getValue(),r=u(s.getNodeFromInstance(t));return r!==n&&(e.setValue(r),!0)},stopTracking:function(t){var e=i(t);e&&e.stopTracking()}};t.exports=c},function(t,e,n){"use strict";function r(t){if(t){var e=t.getName();if(e)return" Check the render method of `"+e+"`."}return""}function i(t){return"function"===typeof t&&"undefined"!==typeof t.prototype&&"function"===typeof t.prototype.mountComponent&&"function"===typeof t.prototype.receiveComponent}function o(t,e){var n;if(null===t||!1===t)n=c.create(o);else if("object"===typeof t){var u=t,s=u.type;if("function"!==typeof s&&"string"!==typeof s){var p="";p+=r(u._owner),a("130",null==s?s:typeof s,p)}"string"===typeof u.type?n=l.createInternalComponent(u):i(u.type)?(n=new u.type(u),n.getHostNode||(n.getHostNode=n.getNativeNode)):n=new f(u)}else"string"===typeof t||"number"===typeof t?n=l.createInstanceForText(t):a("131",typeof t);return n._mountIndex=0,n._mountImage=null,n}var a=n(5),u=n(6),s=n(485),c=n(191),l=n(193),f=(n(555),n(3),n(4),function(t){this.construct(t)});u(f.prototype,s,{_instantiateReactComponent:o}),t.exports=o},function(t,e,n){"use strict";function r(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return"input"===e?!!i[t.type]:"textarea"===e}var i={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};t.exports=r},function(t,e,n){"use strict";var r=n(11),i=n(77),o=n(78),a=function(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&3===n.nodeType)return void(n.nodeValue=e)}t.textContent=e};r.canUseDOM&&("textContent"in document.documentElement||(a=function(t,e){if(3===t.nodeType)return void(t.nodeValue=e);o(t,i(e))})),t.exports=a},function(t,e,n){"use strict";function r(t,e){return t&&"object"===typeof t&&null!=t.key?c.escape(t.key):e.toString(36)}function i(t,e,n,o){var p=typeof t;if("undefined"!==p&&"boolean"!==p||(t=null),null===t||"string"===p||"number"===p||"object"===p&&t.$$typeof===u)return n(o,t,""===e?l+r(t,0):e),1;var h,d,v=0,y=""===e?l:e+f;if(Array.isArray(t))for(var m=0;mc){for(var e=0,n=a.length-s;e link[data-plugin="true"]').forEach(function(t){t.remove()});var e=this.props,n=e.jsPluginImports,r=e.cssPluginImports;n.filter(function(e){return!t.thirdPartyJsLibs.has(e)}).map(function(e){var n=document.createElement("script");n.src=e,n.async=!0,n.dataset.plugin="true",document.body.appendChild(n),e.includes("msl_plugins_repo")||t.thirdPartyJsLibs.add(e)}),r.map(function(t){var e=document.createElement("link");e.rel="stylesheet",e.type="text/css",e.href=t,e.dataset.plugin="true",document.body.appendChild(e)})}},{key:"componentDidUpdate",value:function(){this.insertPlugins()}},{key:"componentDidMount",value:function(){this.insertPlugins()}},{key:"render",value:function(){return s.a.createElement("div",{id:"plugins"})}}]),e}(a.Component)},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function o(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a=n(25),u=(n.n(a),n(20)),s=n.n(u),c=n(228),l=n(43),f=n(55),p=n(120),h=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:c.a,e=arguments[1];if(t.isLocked)switch(e.type){case r.a:case l.c:case l.d:break;default:return t}h.a.passEventsToPlugins(e);var o=n.i(c.b)(t,e);if(o)return o;n.i(i.a)(t,e);var d=n.i(a.a)(t,e),v=n.i(p.a)(t,e),y=n.i(f.a)(t,e);return{pageInfo:v,pageGroupInfo:y,questions:n.i(s.a)(t,e,v,y),isLocked:d,lastInteractionTime:n.i(u.a)(t,e),token:t.token,isStarted:t.isStarted,isEnded:t.isEnded,jsPluginImports:t.jsPluginImports,cssPluginImports:t.cssPluginImports}};e.a=d},function(t,e,n){"use strict";function r(t,e,r,o){var a=e.questions;n.i(s.b)(r.randomize)&&n.i(s.d)(a),n.i(s.b)(r.rotate)&&n.i(s.e)(a);var l=n.i(c.List)(a);return e.type===u.a?l.map(i):l}function i(t){return t=o(t),t=a(t)}function o(t){var e={displayedWhen:Date.now(),answeredWhen:null,duration:0,totalClicks:0,geoLocation:null};return Object.assign({},t,e)}function a(t){function e(t,e){var n=l(e,2),r=(n[0],n[1]);return r.id?t.concat([r]):t.concat(r._elements)}switch(t.type){case"single-choice":case"multiple-choice":return function(t){var r={},i=[];return Object.entries(t.rows).reduce(e,[]).map(function(t){i.push(t.id),r[t.id]=Object.assign({},t,{selected:!1})}),n.i(s.b)(t.randomize)&&n.i(s.d)(i),n.i(s.b)(t.rotate)&&n.i(s.e)(i),Object.assign({},t,r,{rowIds:i})}(t);case"single-matrix":case"multiple-matrix":return function(t){var r=Object.entries(t.rows).reduce(e,[]),i=Object.entries(t.cols).reduce(e,[]),o={},a=[];r.forEach(function(t){a.push(t.id);var e=Object.assign({},t);i.forEach(function(t){e[t.id]=Object.assign({},t,{selected:!1})}),o[t.id]=e}),n.i(s.b)(t.randomize)&&n.i(s.d)(a),n.i(s.b)(t.rotate)&&n.i(s.e)(a);var u=[];return i.forEach(function(t){u.push(t.id)}),n.i(s.b)(t.randomizeCol)&&n.i(s.d)(u),n.i(s.b)(t.rotateCol)&&n.i(s.e)(u),Object.assign({},t,o,{rowIds:a},{colIds:u})}(t);default:return t}}e.a=r;var u=n(26),s=n(43),c=n(57),l=(n.n(c),function(){function t(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,u=t[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&u.return&&u.return()}finally{if(i)throw o}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}())},function(t,e,n){"use strict";function r(t,e,r,s){switch(e.type){case i.a:return n.i(o.a)(t,e,r,s);case a.d:return n.i(u.b)(t,e);case a.e:return n.i(u.c)(t,e);default:return t.questions}}e.a=r;var i=n(26),o=n(239),a=n(32),u=n(121)},function(t,e,n){"use strict";function r(t,e){return e.type===i.a?e.pageGroupInfo:t.pageGroupInfo}e.a=r;var i=n(26)},function(t,e,n){"use strict";function r(t,e){return e.type===i.a?e.pageInfo:t.pageInfo}e.a=r;var i=n(26)},function(t,e,n){"use strict";Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/))},function(t,e,n){"use strict";function r(t){return t}function i(t,e,n){function i(t,e){var n=g.hasOwnProperty(e)?g[e]:null;E.hasOwnProperty(e)&&u("OVERRIDE_BASE"===n,"ReactClassInterface: You are attempting to override `%s` from your class specification. Ensure that your method names do not overlap with React methods.",e),t&&u("DEFINE_MANY"===n||"DEFINE_MANY_MERGED"===n,"ReactClassInterface: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",e)}function c(t,n){if(n){u("function"!==typeof n,"ReactClass: You're attempting to use a component class or function as a mixin. Instead, just use a regular object."),u(!e(n),"ReactClass: You're attempting to use a component as a mixin. Instead, just use a regular object.");var r=t.prototype,o=r.__reactAutoBindPairs;n.hasOwnProperty(s)&&_.mixins(t,n.mixins);for(var a in n)if(n.hasOwnProperty(a)&&a!==s){var c=n[a],l=r.hasOwnProperty(a);if(i(l,a),_.hasOwnProperty(a))_[a](t,c);else{var f=g.hasOwnProperty(a),d="function"===typeof c,v=d&&!f&&!l&&!1!==n.autobind;if(v)o.push(a,c),r[a]=c;else if(l){var y=g[a];u(f&&("DEFINE_MANY_MERGED"===y||"DEFINE_MANY"===y),"ReactClass: Unexpected spec policy %s for key %s when mixing in component specs.",y,a),"DEFINE_MANY_MERGED"===y?r[a]=p(r[a],c):"DEFINE_MANY"===y&&(r[a]=h(r[a],c))}else r[a]=c}}}else;}function l(t,e){if(e)for(var n in e){var r=e[n];if(e.hasOwnProperty(n)){var i=n in _;u(!i,'ReactClass: You are attempting to define a reserved property, `%s`, that shouldn\'t be on the "statics" key. Define it as an instance property instead; it will still be accessible on the constructor.',n);var o=n in t;u(!o,"ReactClass: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",n),t[n]=r}}}function f(t,e){u(t&&e&&"object"===typeof t&&"object"===typeof e,"mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.");for(var n in e)e.hasOwnProperty(n)&&(u(void 0===t[n],"mergeIntoWithNoDuplicateKeys(): Tried to merge two objects with the same key: `%s`. This conflict may be due to a mixin; in particular, this may be caused by two getInitialState() or getDefaultProps() methods returning objects with clashing keys.",n),t[n]=e[n]);return t}function p(t,e){return function(){var n=t.apply(this,arguments),r=e.apply(this,arguments);if(null==n)return r;if(null==r)return n;var i={};return f(i,n),f(i,r),i}}function h(t,e){return function(){t.apply(this,arguments),e.apply(this,arguments)}}function d(t,e){var n=e.bind(t);return n}function v(t){for(var e=t.__reactAutoBindPairs,n=0;n":"<"+t+">",u[t]=!a.firstChild),u[t]?p[t]:null}var i=n(11),o=n(3),a=i.canUseDOM?document.createElement("div"):null,u={},s=[1,'"],c=[1,"","
"],l=[3,"","
"],f=[1,'',""],p={"*":[1,"?
","
"],area:[1,"",""],col:[2,"","
"],legend:[1,"
","
"],param:[1,"",""],tr:[2,"","
"],optgroup:s,option:s,caption:c,colgroup:c,tbody:c,tfoot:c,thead:c,td:l,th:l};["circle","clipPath","defs","ellipse","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","text","tspan"].forEach(function(t){p[t]=f,u[t]=!0}),t.exports=r},function(t,e,n){"use strict";function r(t){return t.Window&&t instanceof t.Window?{x:t.pageXOffset||t.document.documentElement.scrollLeft,y:t.pageYOffset||t.document.documentElement.scrollTop}:{x:t.scrollLeft,y:t.scrollTop}}t.exports=r},function(t,e,n){"use strict";function r(t){return t.replace(i,"-$1").toLowerCase()}var i=/([A-Z])/g;t.exports=r},function(t,e,n){"use strict";function r(t){return i(t).replace(o,"-ms-")}var i=n(254),o=/^ms-/;t.exports=r},function(t,e,n){"use strict";function r(t){var e=t?t.ownerDocument||t:document,n=e.defaultView||window;return!(!t||!("function"===typeof n.Node?t instanceof n.Node:"object"===typeof t&&"number"===typeof t.nodeType&&"string"===typeof t.nodeName))}t.exports=r},function(t,e,n){"use strict";function r(t){return i(t)&&3==t.nodeType}var i=n(256);t.exports=r},function(t,e,n){"use strict";function r(t){var e={};return function(n){return e.hasOwnProperty(n)||(e[n]=t.call(this,n)),e[n]}}t.exports=r},function(t,e,n){"use strict";var r={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o=Object.defineProperty,a=Object.getOwnPropertyNames,u=Object.getOwnPropertySymbols,s=Object.getOwnPropertyDescriptor,c=Object.getPrototypeOf,l=c&&c(Object);t.exports=function t(e,n,f){if("string"!==typeof n){if(l){var p=c(n);p&&p!==l&&t(e,p,f)}var h=a(n);u&&(h=h.concat(u(n)));for(var d=0;d=0?r:0);n=0&&t(e[r]);)r-=1;return n.i(i.a)(0,r+1,e)}e.a=r;var i=n(18)},function(t,e,n){"use strict";function r(t,e,r,u){function s(t,e){return i(t,e,r.slice(),u.slice())}var c=n.i(o.a)(t),l=n.i(o.a)(e);return!n.i(a.a)(function(t,e){return!n.i(a.a)(s,e,t)},l,c)}function i(t,e,o,a){if(n.i(c.a)(t,e))return!0;var p=n.i(f.a)(t);if(p!==n.i(f.a)(e))return!1;if(null==t||null==e)return!1;if("function"===typeof t["fantasy-land/equals"]||"function"===typeof e["fantasy-land/equals"])return"function"===typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](e)&&"function"===typeof e["fantasy-land/equals"]&&e["fantasy-land/equals"](t);if("function"===typeof t.equals||"function"===typeof e.equals)return"function"===typeof t.equals&&t.equals(e)&&"function"===typeof e.equals&&e.equals(t);switch(p){case"Arguments":case"Array":case"Object":if("function"===typeof t.constructor&&"Promise"===n.i(u.a)(t.constructor))return t===e;break;case"Boolean":case"Number":case"String":if(typeof t!==typeof e||!n.i(c.a)(t.valueOf(),e.valueOf()))return!1;break;case"Date":if(!n.i(c.a)(t.valueOf(),e.valueOf()))return!1;break;case"Error":return t.name===e.name&&t.message===e.message;case"RegExp":if(t.source!==e.source||t.global!==e.global||t.ignoreCase!==e.ignoreCase||t.multiline!==e.multiline||t.sticky!==e.sticky||t.unicode!==e.unicode)return!1}for(var h=o.length-1;h>=0;){if(o[h]===t)return a[h]===e;h-=1}switch(p){case"Map":return t.size===e.size&&r(t.entries(),e.entries(),o.concat([t]),a.concat([e]));case"Set":return t.size===e.size&&r(t.values(),e.values(),o.concat([t]),a.concat([e]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var d=n.i(l.a)(t);if(d.length!==n.i(l.a)(e).length)return!1;var v=o.concat([t]),y=a.concat([e]);for(h=d.length-1;h>=0;){var m=d[h];if(!n.i(s.a)(m,e)||!i(e[m],t[m],v,y))return!1;h-=1}return!0}e.a=i;var o=n(335),a=n(61),u=n(341),s=n(12),c=n(146),l=n(22),f=n(99)},function(t,e,n){"use strict";var r=n(340),i=n(63),o=n(16),a=n(9),u=function(t){return{"@@transducer/init":a.a.init,"@@transducer/result":function(e){return t["@@transducer/result"](e)},"@@transducer/step":function(e,i){var o=t["@@transducer/step"](e,i);return o["@@transducer/reduced"]?n.i(r.a)(o):o}}},s=function(t){var e=u(t);return{"@@transducer/init":a.a.init,"@@transducer/result":function(t){return e["@@transducer/result"](t)},"@@transducer/step":function(t,r){return n.i(i.a)(r)?n.i(o.a)(e,t,r):n.i(o.a)(e,t,[r])}}};e.a=s},function(t,e,n){"use strict";function r(t){return{"@@transducer/value":t,"@@transducer/reduced":!0}}e.a=r},function(t,e,n){"use strict";function r(t){var e=String(t).match(/^function (\w*)/);return null==e?"":e[1]}e.a=r},function(t,e,n){"use strict";function r(t){return"[object RegExp]"===Object.prototype.toString.call(t)}e.a=r},function(t,e,n){"use strict";function r(t){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),r=1,o=arguments.length;r":r(o,a)},f=function(t,e){return n.i(o.a)(function(e){return n.i(a.a)(e)+": "+l(t[e])},e.slice().sort())};switch(Object.prototype.toString.call(t)){case"[object Arguments]":return"(function() { return arguments; }("+n.i(o.a)(l,t).join(", ")+"))";case"[object Array]":return"["+n.i(o.a)(l,t).concat(f(t,n.i(c.a)(function(t){return/^\d+$/.test(t)},n.i(s.a)(t)))).join(", ")+"]";case"[object Boolean]":return"object"===typeof t?"new Boolean("+l(t.valueOf())+")":t.toString();case"[object Date]":return"new Date("+(isNaN(t.valueOf())?l(NaN):n.i(a.a)(n.i(u.a)(t)))+")";case"[object Null]":return"null";case"[object Number]":return"object"===typeof t?"new Number("+l(t.valueOf())+")":1/t===-1/0?"-0":t.toString(10);case"[object String]":return"object"===typeof t?"new String("+l(t.valueOf())+")":n.i(a.a)(t);case"[object Undefined]":return"undefined";default:if("function"===typeof t.toString){var p=t.toString();if("[object Object]"!==p)return p}return"{"+f(t,n.i(s.a)(t)).join(", ")+"}"}}e.a=r;var i=n(34),o=n(66),a=n(347),u=n(349),s=n(22),c=n(72)},function(t,e,n){"use strict";var r=n(0),i=n(30),o=n(9),a=function(){function t(t,e){this.xf=e,this.f=t,this.all=!0}return t.prototype["@@transducer/init"]=o.a.init,t.prototype["@@transducer/result"]=function(t){return this.all&&(t=this.xf["@@transducer/step"](t,!0)),this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,e){return this.f(e)||(this.all=!1,t=n.i(i.a)(this.xf["@@transducer/step"](t,!1))),t},t}(),u=n.i(r.a)(function(t,e){return new a(t,e)});e.a=u},function(t,e,n){"use strict";var r=n(17),i=n(0),o=n(9),a=function(){function t(t,e){this.xf=e,this.pos=0,this.full=!1,this.acc=new Array(t)}return t.prototype["@@transducer/init"]=o.a.init,t.prototype["@@transducer/result"]=function(t){return this.acc=null,this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,e){return this.store(e),this.full?this.xf["@@transducer/step"](t,this.getCopy()):t},t.prototype.store=function(t){this.acc[this.pos]=t,this.pos+=1,this.pos===this.acc.length&&(this.pos=0,this.full=!0)},t.prototype.getCopy=function(){return n.i(r.a)(Array.prototype.slice.call(this.acc,this.pos),Array.prototype.slice.call(this.acc,0,this.pos))},t}(),u=n.i(i.a)(function(t,e){return new a(t,e)});e.a=u},function(t,e,n){"use strict";var r=n(0),i=n(339),o=n(13),a=n.i(r.a)(function(t,e){return n.i(o.a)(t,n.i(i.a)(e))});e.a=a},function(t,e,n){"use strict";var r=n(0),i=n(9),o=function(){function t(t,e){this.xf=e,this.n=t}return t.prototype["@@transducer/init"]=i.a.init,t.prototype["@@transducer/result"]=i.a.result,t.prototype["@@transducer/step"]=function(t,e){return this.n>0?(this.n-=1,t):this.xf["@@transducer/step"](t,e)},t}(),a=n.i(r.a)(function(t,e){return new o(t,e)});e.a=a},function(t,e,n){"use strict";var r=n(0),i=n(9),o=function(){function t(t,e){this.xf=e,this.pos=0,this.full=!1,this.acc=new Array(t)}return t.prototype["@@transducer/init"]=i.a.init,t.prototype["@@transducer/result"]=function(t){return this.acc=null,this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,e){return this.full&&(t=this.xf["@@transducer/step"](t,this.acc[this.pos])),this.store(e),t},t.prototype.store=function(t){this.acc[this.pos]=t,this.pos+=1,this.pos===this.acc.length&&(this.pos=0,this.full=!0)},t}(),a=n.i(r.a)(function(t,e){return new o(t,e)});e.a=a},function(t,e,n){"use strict";var r=n(0),i=n(16),o=n(9),a=function(){function t(t,e){this.f=t,this.retained=[],this.xf=e}return t.prototype["@@transducer/init"]=o.a.init,t.prototype["@@transducer/result"]=function(t){return this.retained=null,this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,e){return this.f(e)?this.retain(t,e):this.flush(t,e)},t.prototype.flush=function(t,e){return t=n.i(i.a)(this.xf["@@transducer/step"],t,this.retained),this.retained=[],this.xf["@@transducer/step"](t,e)},t.prototype.retain=function(t,e){return this.retained.push(e),t},t}(),u=n.i(r.a)(function(t,e){return new a(t,e)});e.a=u},function(t,e,n){"use strict";var r=n(0),i=n(9),o=function(){function t(t,e){this.xf=e,this.f=t}return t.prototype["@@transducer/init"]=i.a.init,t.prototype["@@transducer/result"]=i.a.result,t.prototype["@@transducer/step"]=function(t,e){if(this.f){if(this.f(e))return t;this.f=null}return this.xf["@@transducer/step"](t,e)},t}(),a=n.i(r.a)(function(t,e){return new o(t,e)});e.a=a},function(t,e,n){"use strict";var r=n(0),i=n(9),o=function(){function t(t,e){this.xf=e,this.f=t}return t.prototype["@@transducer/init"]=i.a.init,t.prototype["@@transducer/result"]=i.a.result,t.prototype["@@transducer/step"]=function(t,e){return this.f(e)?this.xf["@@transducer/step"](t,e):t},t}(),a=n.i(r.a)(function(t,e){return new o(t,e)});e.a=a},function(t,e,n){"use strict";var r=n(0),i=n(30),o=n(9),a=function(){function t(t,e){this.xf=e,this.f=t,this.found=!1}return t.prototype["@@transducer/init"]=o.a.init,t.prototype["@@transducer/result"]=function(t){return this.found||(t=this.xf["@@transducer/step"](t,void 0)),this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,e){return this.f(e)&&(this.found=!0,t=n.i(i.a)(this.xf["@@transducer/step"](t,e))),t},t}(),u=n.i(r.a)(function(t,e){return new a(t,e)});e.a=u},function(t,e,n){"use strict";var r=n(0),i=n(30),o=n(9),a=function(){function t(t,e){this.xf=e,this.f=t,this.idx=-1,this.found=!1}return t.prototype["@@transducer/init"]=o.a.init,t.prototype["@@transducer/result"]=function(t){return this.found||(t=this.xf["@@transducer/step"](t,-1)),this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,e){return this.idx+=1,this.f(e)&&(this.found=!0,t=n.i(i.a)(this.xf["@@transducer/step"](t,this.idx))),t},t}(),u=n.i(r.a)(function(t,e){return new a(t,e)});e.a=u},function(t,e,n){"use strict";var r=n(0),i=n(9),o=function(){function t(t,e){this.xf=e,this.f=t}return t.prototype["@@transducer/init"]=i.a.init,t.prototype["@@transducer/result"]=function(t){return this.xf["@@transducer/result"](this.xf["@@transducer/step"](t,this.last))},t.prototype["@@transducer/step"]=function(t,e){return this.f(e)&&(this.last=e),t},t}(),a=n.i(r.a)(function(t,e){return new o(t,e)});e.a=a},function(t,e,n){"use strict";var r=n(0),i=n(9),o=function(){function t(t,e){this.xf=e,this.f=t,this.idx=-1,this.lastIdx=-1}return t.prototype["@@transducer/init"]=i.a.init,t.prototype["@@transducer/result"]=function(t){return this.xf["@@transducer/result"](this.xf["@@transducer/step"](t,this.lastIdx))},t.prototype["@@transducer/step"]=function(t,e){return this.idx+=1,this.f(e)&&(this.lastIdx=this.idx),t},t}(),a=n.i(r.a)(function(t,e){return new o(t,e)});e.a=a},function(t,e,n){"use strict";var r=n(0),i=n(9),o=function(){function t(t,e){this.xf=e,this.f=t}return t.prototype["@@transducer/init"]=i.a.init,t.prototype["@@transducer/result"]=i.a.result,t.prototype["@@transducer/step"]=function(t,e){return this.xf["@@transducer/step"](t,this.f(e))},t}(),a=n.i(r.a)(function(t,e){return new o(t,e)});e.a=a},function(t,e,n){"use strict";var r=n(62),i=n(12),o=n(9),a=function(){function t(t,e,n,r){this.valueFn=t,this.valueAcc=e,this.keyFn=n,this.xf=r,this.inputs={}}return t.prototype["@@transducer/init"]=o.a.init,t.prototype["@@transducer/result"]=function(t){var e;for(e in this.inputs)if(n.i(i.a)(e,this.inputs)&&(t=this.xf["@@transducer/step"](t,this.inputs[e]),t["@@transducer/reduced"])){t=t["@@transducer/value"];break}return this.inputs=null,this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,e){var n=this.keyFn(e);return this.inputs[n]=this.inputs[n]||[n,this.valueAcc],this.inputs[n][1]=this.valueFn(this.inputs[n][1],e),t},t}(),u=n.i(r.a)(4,[],function(t,e,n,r){return new a(t,e,n,r)});e.a=u},function(t,e,n){"use strict";var r=n(0),i=n(30),o=n(9),a=function(){function t(t,e){this.xf=e,this.n=t,this.i=0}return t.prototype["@@transducer/init"]=o.a.init,t.prototype["@@transducer/result"]=o.a.result,t.prototype["@@transducer/step"]=function(t,e){this.i+=1;var r=0===this.n?t:this.xf["@@transducer/step"](t,e);return this.n>=0&&this.i>=this.n?n.i(i.a)(r):r},t}(),u=n.i(r.a)(function(t,e){return new a(t,e)});e.a=u},function(t,e,n){"use strict";var r=n(0),i=n(30),o=n(9),a=function(){function t(t,e){this.xf=e,this.f=t}return t.prototype["@@transducer/init"]=o.a.init,t.prototype["@@transducer/result"]=o.a.result,t.prototype["@@transducer/step"]=function(t,e){return this.f(e)?this.xf["@@transducer/step"](t,e):n.i(i.a)(t)},t}(),u=n.i(r.a)(function(t,e){return new a(t,e)});e.a=u},function(t,e,n){"use strict";var r=n(0),i=n(9),o=function(){function t(t,e){this.xf=e,this.f=t}return t.prototype["@@transducer/init"]=i.a.init,t.prototype["@@transducer/result"]=i.a.result,t.prototype["@@transducer/step"]=function(t,e){return this.f(e),this.xf["@@transducer/step"](t,e)},t}(),a=n.i(r.a)(function(t,e){return new o(t,e)});e.a=a},function(t,e,n){"use strict";n(34),n(0),n(90),n(60),n(100)},function(t,e,n){"use strict";n(44),n(0)},function(t,e,n){"use strict";n(147),n(2),n(94),n(16),n(348)},function(t,e,n){"use strict";n(1),n(12),n(22)},function(t,e,n){"use strict";n(1),n(22)},function(t,e,n){"use strict";n(1),n(145),n(15)},function(t,e,n){"use strict";n(46)},function(t,e,n){"use strict";n(1)},function(t,e,n){"use strict";n(0),n(29),n(15)},function(t,e,n){"use strict";n(1),n(67),n(47),n(101)},function(t,e,n){"use strict";n(1),n(134),n(67),n(36)},function(t,e,n){"use strict";n(1),n(59),n(67),n(96)},function(t,e,n){"use strict";n(0)},function(t,e,n){"use strict";n(0)},function(t,e,n){"use strict";n(2)},function(t,e,n){"use strict";n(2)},function(t,e,n){"use strict";n(0),n(16),n(22)},function(t,e,n){"use strict";n(0)},function(t,e,n){"use strict";n(0),n(92)},function(t,e,n){"use strict";n(2)},function(t,e,n){"use strict";n(1),n(164)},function(t,e,n){"use strict";n(165),n(49)},function(t,e,n){"use strict";n(89),n(0)},function(t,e,n){"use strict";n(89),n(1)},function(t,e,n){"use strict";n(0),n(69)},function(t,e,n){"use strict";var r=n(0),i=n(69),o=n.i(r.a)(function(t,e){return n.i(i.a)(function(t,e,n){return n},t,e)});e.a=o},function(t,e,n){"use strict";n(2),n(69)},function(t,e,n){"use strict";n(2),n(95)},function(t,e,n){"use strict";n(0)},function(t,e,n){"use strict";n(2)},function(t,e,n){"use strict";n(0)},function(t,e,n){"use strict";n(1)},function(t,e,n){"use strict";var r=n(149),i=n(0),o=n(7),a=n(155),u=n(132);a.a,u.a},function(t,e,n){"use strict";n(1),n(10),n(47)},function(t,e,n){"use strict";n(2)},function(t,e,n){"use strict";var r=n(1),i=n(344);i.a},function(t,e,n){"use strict";n(0)},function(t,e,n){"use strict";n(21),n(1)},function(t,e,n){"use strict";n(0)},function(t,e,n){"use strict";var r=n(17),i=n(150);r.a},function(t,e,n){"use strict";var r=n(17),i=n(150),o=n(60);r.a},function(t,e,n){"use strict";var r=n(87),i=n(160),o=n(72);r.a,o.a},function(t,e,n){"use strict";n(2),n(15),n(36)},function(t,e,n){"use strict";n(2),n(139),n(36)},function(t,e,n){"use strict";n(2),n(36)},function(t,e,n){"use strict";n(0)},function(t,e,n){"use strict";n(0)},function(t,e,n){"use strict";n(136),n(73)},function(t,e,n){"use strict";var r=n(166),i=n(23);r.a},function(t,e,n){"use strict";var r=n(66),i=n(88),o=n(171),a=n(183);r.a,o.a,i.a},function(t,e,n){"use strict";n(2),n(15)},function(t,e,n){"use strict";n(2),n(158)},function(t,e,n){"use strict";n(2),n(12)},function(t,e,n){"use strict";n(2)},function(t,e,n){"use strict";n(0)},function(t,e,n){"use strict";n(0),n(153)},function(t,e,n){"use strict";n(62),n(16),n(30)},function(t,e,n){"use strict";var r=n(1),i=n(30);i.a},function(t,e,n){"use strict";n(0),n(33),n(180)},function(t,e,n){"use strict";n(2)},function(t,e,n){"use strict";n(2)},function(t,e,n){"use strict";n(2),n(33),n(170)},function(t,e,n){"use strict";n(0)},function(t,e,n){"use strict";n(0)},function(t,e,n){"use strict";n(0)},function(t,e,n){"use strict";n(46)},function(t,e,n){"use strict";n(0),n(162),n(18)},function(t,e,n){"use strict";n(0),n(18)},function(t,e,n){"use strict";n(0)},function(t,e,n){"use strict";n(0),n(15),n(98)},function(t,e,n){"use strict";n(0)},function(t,e,n){"use strict";n(0),n(85),n(140)},function(t,e,n){"use strict";n(2),n(85),n(141)},function(t,e,n){"use strict";n(0),n(18)},function(t,e,n){"use strict";var r=n(0),i=n(7),o=n(366),a=n(18);o.a},function(t,e,n){"use strict";var r=n(0),i=n(7),o=n(367);o.a},function(t,e,n){"use strict";n(148),n(0),n(342),n(49)},function(t,e,n){"use strict";n(46)},function(t,e,n){"use strict";n(1),n(12)},function(t,e,n){"use strict";n(1)},function(t,e,n){"use strict";n(46)},function(t,e,n){"use strict";n(16),n(157),n(10)},function(t,e,n){"use strict";n(1)},function(t,e,n){"use strict";n(2),n(13),n(177)},function(t,e,n){"use strict";n(1),String.prototype.trim},function(t,e,n){"use strict";n(21),n(17),n(0)},function(t,e,n){"use strict";n(1)},function(t,e,n){"use strict";n(1),n(70)},function(t,e,n){"use strict";n(0),n(10)},function(t,e,n){"use strict";n(0)},function(t,e,n){"use strict";var r=n(17),i=n(0),o=n(84),a=n(100);a.a,r.a},function(t,e,n){"use strict";n(17),n(2),n(182)},function(t,e,n){"use strict";n(2)},function(t,e,n){"use strict";var r=n(91),i=n(83);r.a},function(t,e,n){"use strict";n(2)},function(t,e,n){"use strict";n(1)},function(t,e,n){"use strict";n(0)},function(t,e,n){"use strict";n(2)},function(t,e,n){"use strict";n(0),n(15),n(13),n(185)},function(t,e,n){"use strict";n(34),n(0),n(60),n(72)},function(t,e,n){"use strict";n(0)},function(t,e,n){"use strict";n(0)},function(t,e,n){"use strict";n(0)},function(t,e,n){"use strict";n(2)},function(t,e,n){"use strict";t.exports=n(486)},function(t,e,n){"use strict";var r={Properties:{"aria-current":0,"aria-details":0,"aria-disabled":0,"aria-hidden":0,"aria-invalid":0,"aria-keyshortcuts":0,"aria-label":0,"aria-roledescription":0,"aria-autocomplete":0,"aria-checked":0,"aria-expanded":0,"aria-haspopup":0,"aria-level":0,"aria-modal":0,"aria-multiline":0,"aria-multiselectable":0,"aria-orientation":0,"aria-placeholder":0,"aria-pressed":0,"aria-readonly":0,"aria-required":0,"aria-selected":0,"aria-sort":0,"aria-valuemax":0,"aria-valuemin":0,"aria-valuenow":0,"aria-valuetext":0,"aria-atomic":0,"aria-busy":0,"aria-live":0,"aria-relevant":0,"aria-dropeffect":0,"aria-grabbed":0,"aria-activedescendant":0,"aria-colcount":0,"aria-colindex":0,"aria-colspan":0,"aria-controls":0,"aria-describedby":0,"aria-errormessage":0,"aria-flowto":0,"aria-labelledby":0,"aria-owns":0,"aria-posinset":0,"aria-rowcount":0,"aria-rowindex":0,"aria-rowspan":0,"aria-setsize":0},DOMAttributeNames:{},DOMPropertyNames:{}};t.exports=r},function(t,e,n){"use strict";var r=n(8),i=n(123),o={focusDOMComponent:function(){i(r.getNodeFromInstance(this))}};t.exports=o},function(t,e,n){"use strict";function r(t){return(t.ctrlKey||t.altKey||t.metaKey)&&!(t.ctrlKey&&t.altKey)}function i(t){switch(t){case"topCompositionStart":return S.compositionStart;case"topCompositionEnd":return S.compositionEnd;case"topCompositionUpdate":return S.compositionUpdate}}function o(t,e){return"topKeyDown"===t&&e.keyCode===g}function a(t,e){switch(t){case"topKeyUp":return-1!==m.indexOf(e.keyCode);case"topKeyDown":return e.keyCode!==g;case"topKeyPress":case"topMouseDown":case"topBlur":return!0;default:return!1}}function u(t){var e=t.detail;return"object"===typeof e&&"data"in e?e.data:null}function s(t,e,n,r){var s,c;if(_?s=i(t):I?a(t,n)&&(s=S.compositionEnd):o(t,n)&&(s=S.compositionStart),!s)return null;E&&(I||s!==S.compositionStart?s===S.compositionEnd&&I&&(c=I.getData()):I=d.getPooled(r));var l=v.getPooled(s,e,n,r);if(c)l.data=c;else{var f=u(n);null!==f&&(l.data=f)}return p.accumulateTwoPhaseDispatches(l),l}function c(t,e){switch(t){case"topCompositionEnd":return u(e);case"topKeyPress":return e.which!==C?null:(O=!0,x);case"topTextInput":var n=e.data;return n===x&&O?null:n;default:return null}}function l(t,e){if(I){if("topCompositionEnd"===t||!_&&a(t,e)){var n=I.getData();return d.release(I),I=null,n}return null}switch(t){case"topPaste":return null;case"topKeyPress":return e.which&&!r(e)?String.fromCharCode(e.which):null;case"topCompositionEnd":return E?null:e.data;default:return null}}function f(t,e,n,r){var i;if(!(i=w?c(t,n):l(t,n)))return null;var o=y.getPooled(S.beforeInput,e,n,r);return o.data=i,p.accumulateTwoPhaseDispatches(o),o}var p=n(51),h=n(11),d=n(481),v=n(518),y=n(521),m=[9,13,27,32],g=229,_=h.canUseDOM&&"CompositionEvent"in window,b=null;h.canUseDOM&&"documentMode"in document&&(b=document.documentMode);var w=h.canUseDOM&&"TextEvent"in window&&!b&&!function(){var t=window.opera;return"object"===typeof t&&"function"===typeof t.version&&parseInt(t.version(),10)<=12}(),E=h.canUseDOM&&(!_||b&&b>8&&b<=11),C=32,x=String.fromCharCode(C),S={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["topCompositionEnd","topKeyPress","topTextInput","topPaste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:["topBlur","topCompositionEnd","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:["topBlur","topCompositionStart","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:["topBlur","topCompositionUpdate","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]}},O=!1,I=null,P={eventTypes:S,extractEvents:function(t,e,n,r){return[s(t,e,n,r),f(t,e,n,r)]}};t.exports=P},function(t,e,n){"use strict";var r=n(186),i=n(11),o=(n(19),n(248),n(527)),a=n(255),u=n(258),s=(n(4),u(function(t){return a(t)})),c=!1,l="cssFloat";if(i.canUseDOM){var f=document.createElement("div").style;try{f.font=""}catch(t){c=!0}void 0===document.documentElement.style.cssFloat&&(l="styleFloat")}var p={createMarkupForStyles:function(t,e){var n="";for(var r in t)if(t.hasOwnProperty(r)){var i=0===r.indexOf("--"),a=t[r];null!=a&&(n+=s(r)+":",n+=o(r,a,e,i)+";")}return n||null},setValueForStyles:function(t,e,n){var i=t.style;for(var a in e)if(e.hasOwnProperty(a)){var u=0===a.indexOf("--"),s=o(a,e[a],n,u);if("float"!==a&&"cssFloat"!==a||(a=l),u)i.setProperty(a,s);else if(s)i[a]=s;else{var f=c&&r.shorthandPropertyExpansions[a];if(f)for(var p in f)i[p]="";else i[a]=""}}}};t.exports=p},function(t,e,n){"use strict";function r(t,e,n){var r=O.getPooled(N.change,t,e,n);return r.type="change",E.accumulateTwoPhaseDispatches(r),r}function i(t){var e=t.nodeName&&t.nodeName.toLowerCase();return"select"===e||"input"===e&&"file"===t.type}function o(t){var e=r(A,t,P(t));S.batchedUpdates(a,e)}function a(t){w.enqueueEvents(t),w.processEventQueue(!1)}function u(t,e){M=t,A=e,M.attachEvent("onchange",o)}function s(){M&&(M.detachEvent("onchange",o),M=null,A=null)}function c(t,e){var n=I.updateValueIfChanged(t),r=!0===e.simulated&&j._allowSimulatedPassThrough;if(n||r)return t}function l(t,e){if("topChange"===t)return e}function f(t,e,n){"topFocus"===t?(s(),u(e,n)):"topBlur"===t&&s()}function p(t,e){M=t,A=e,M.attachEvent("onpropertychange",d)}function h(){M&&(M.detachEvent("onpropertychange",d),M=null,A=null)}function d(t){"value"===t.propertyName&&c(A,t)&&o(t)}function v(t,e,n){"topFocus"===t?(h(),p(e,n)):"topBlur"===t&&h()}function y(t,e,n){if("topSelectionChange"===t||"topKeyUp"===t||"topKeyDown"===t)return c(A,n)}function m(t){var e=t.nodeName;return e&&"input"===e.toLowerCase()&&("checkbox"===t.type||"radio"===t.type)}function g(t,e,n){if("topClick"===t)return c(e,n)}function _(t,e,n){if("topInput"===t||"topChange"===t)return c(e,n)}function b(t,e){if(null!=t){var n=t._wrapperState||e._wrapperState;if(n&&n.controlled&&"number"===e.type){var r=""+e.value;e.getAttribute("value")!==r&&e.setAttribute("value",r)}}}var w=n(50),E=n(51),C=n(11),x=n(8),S=n(24),O=n(27),I=n(202),P=n(114),k=n(115),T=n(204),N={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:["topBlur","topChange","topClick","topFocus","topInput","topKeyDown","topKeyUp","topSelectionChange"]}},M=null,A=null,D=!1;C.canUseDOM&&(D=k("change")&&(!document.documentMode||document.documentMode>8));var R=!1;C.canUseDOM&&(R=k("input")&&(!document.documentMode||document.documentMode>9));var j={eventTypes:N,_allowSimulatedPassThrough:!0,_isInputEventSupported:R,extractEvents:function(t,e,n,o){var a,u,s=e?x.getNodeFromInstance(e):window;if(i(s)?D?a=l:u=f:T(s)?R?a=_:(a=y,u=v):m(s)&&(a=g),a){var c=a(t,e,n);if(c){return r(c,n,o)}}u&&u(t,s,e),"topBlur"===t&&b(e,s)}};t.exports=j},function(t,e,n){"use strict";var r=n(5),i=n(37),o=n(11),a=n(251),u=n(14),s=(n(3),{dangerouslyReplaceNodeWithMarkup:function(t,e){if(o.canUseDOM||r("56"),e||r("57"),"HTML"===t.nodeName&&r("58"),"string"===typeof e){var n=a(e,u)[0];t.parentNode.replaceChild(n,t)}else i.replaceChildWithTree(t,e)}});t.exports=s},function(t,e,n){"use strict";var r=["ResponderEventPlugin","SimpleEventPlugin","TapEventPlugin","EnterLeaveEventPlugin","ChangeEventPlugin","SelectEventPlugin","BeforeInputEventPlugin"];t.exports=r},function(t,e,n){"use strict";var r=n(51),i=n(8),o=n(75),a={mouseEnter:{registrationName:"onMouseEnter",dependencies:["topMouseOut","topMouseOver"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["topMouseOut","topMouseOver"]}},u={eventTypes:a,extractEvents:function(t,e,n,u){if("topMouseOver"===t&&(n.relatedTarget||n.fromElement))return null;if("topMouseOut"!==t&&"topMouseOver"!==t)return null;var s;if(u.window===u)s=u;else{var c=u.ownerDocument;s=c?c.defaultView||c.parentWindow:window}var l,f;if("topMouseOut"===t){l=e;var p=n.relatedTarget||n.toElement;f=p?i.getClosestInstanceFromNode(p):null}else l=null,f=e;if(l===f)return null;var h=null==l?s:i.getNodeFromInstance(l),d=null==f?s:i.getNodeFromInstance(f),v=o.getPooled(a.mouseLeave,l,n,u);v.type="mouseleave",v.target=h,v.relatedTarget=d;var y=o.getPooled(a.mouseEnter,f,n,u);return y.type="mouseenter",y.target=d,y.relatedTarget=h,r.accumulateEnterLeaveDispatches(v,y,l,f),[v,y]}};t.exports=u},function(t,e,n){"use strict";function r(t){this._root=t,this._startText=this.getText(),this._fallbackText=null}var i=n(6),o=n(31),a=n(201);i(r.prototype,{destructor:function(){this._root=null,this._startText=null,this._fallbackText=null},getText:function(){return"value"in this._root?this._root.value:this._root[a()]},getData:function(){if(this._fallbackText)return this._fallbackText;var t,e,n=this._startText,r=n.length,i=this.getText(),o=i.length;for(t=0;t1?1-e:void 0;return this._fallbackText=i.slice(t,u),this._fallbackText}}),o.addPoolingTo(r),t.exports=r},function(t,e,n){"use strict";var r=n(38),i=r.injection.MUST_USE_PROPERTY,o=r.injection.HAS_BOOLEAN_VALUE,a=r.injection.HAS_NUMERIC_VALUE,u=r.injection.HAS_POSITIVE_NUMERIC_VALUE,s=r.injection.HAS_OVERLOADED_BOOLEAN_VALUE,c={isCustomAttribute:RegExp.prototype.test.bind(new RegExp("^(data|aria)-["+r.ATTRIBUTE_NAME_CHAR+"]*$")),Properties:{accept:0,acceptCharset:0,accessKey:0,action:0,allowFullScreen:o,allowTransparency:0,alt:0,as:0,async:o,autoComplete:0,autoPlay:o,capture:o,cellPadding:0,cellSpacing:0,charSet:0,challenge:0,checked:i|o,cite:0,classID:0,className:0,cols:u,colSpan:0,content:0,contentEditable:0,contextMenu:0,controls:o,controlsList:0,coords:0,crossOrigin:0,data:0,dateTime:0,default:o,defer:o,dir:0,disabled:o,download:s,draggable:0,encType:0,form:0,formAction:0,formEncType:0,formMethod:0,formNoValidate:o,formTarget:0,frameBorder:0,headers:0,height:0,hidden:o,high:0,href:0,hrefLang:0,htmlFor:0,httpEquiv:0,icon:0,id:0,inputMode:0,integrity:0,is:0,keyParams:0,keyType:0,kind:0,label:0,lang:0,list:0,loop:o,low:0,manifest:0,marginHeight:0,marginWidth:0,max:0,maxLength:0,media:0,mediaGroup:0,method:0,min:0,minLength:0,multiple:i|o,muted:i|o,name:0,nonce:0,noValidate:o,open:o,optimum:0,pattern:0,placeholder:0,playsInline:o,poster:0,preload:0,profile:0,radioGroup:0,readOnly:o,referrerPolicy:0,rel:0,required:o,reversed:o,role:0,rows:u,rowSpan:a,sandbox:0,scope:0,scoped:o,scrolling:0,seamless:o,selected:i|o,shape:0,size:u,sizes:0,span:u,spellCheck:0,src:0,srcDoc:0,srcLang:0,srcSet:0,start:a,step:0,style:0,summary:0,tabIndex:0,target:0,title:0,type:0,useMap:0,value:0,width:0,wmode:0,wrap:0,about:0,datatype:0,inlist:0,prefix:0,property:0,resource:0,typeof:0,vocab:0,autoCapitalize:0,autoCorrect:0,autoSave:0,color:0,itemProp:0,itemScope:o,itemType:0,itemID:0,itemRef:0,results:0,security:0,unselectable:0},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},DOMPropertyNames:{},DOMMutationMethods:{value:function(t,e){if(null==e)return t.removeAttribute("value");"number"!==t.type||!1===t.hasAttribute("value")?t.setAttribute("value",""+e):t.validity&&!t.validity.badInput&&t.ownerDocument.activeElement!==t&&t.setAttribute("value",""+e)}}};t.exports=c},function(t,e,n){"use strict";(function(e){function r(t,e,n,r){var i=void 0===t[n];null!=e&&i&&(t[n]=o(e,!0))}var i=n(39),o=n(203),a=(n(106),n(116)),u=n(206);n(4);"undefined"!==typeof e&&n.i({NODE_ENV:"production",PUBLIC_URL:""});var s={instantiateChildren:function(t,e,n,i){if(null==t)return null;var o={};return u(t,r,o),o},updateChildren:function(t,e,n,r,u,s,c,l,f){if(e||t){var p,h;for(p in e)if(e.hasOwnProperty(p)){h=t&&t[p];var d=h&&h._currentElement,v=e[p];if(null!=h&&a(d,v))i.receiveComponent(h,v,u,l),e[p]=h;else{h&&(r[p]=i.getHostNode(h),i.unmountComponent(h,!1));var y=o(v,!0);e[p]=y;var m=i.mountComponent(y,u,s,c,l,f);n.push(m)}}for(p in t)!t.hasOwnProperty(p)||e&&e.hasOwnProperty(p)||(h=t[p],r[p]=i.getHostNode(h),i.unmountComponent(h,!1))}},unmountChildren:function(t,e){for(var n in t)if(t.hasOwnProperty(n)){var r=t[n];i.unmountComponent(r,e)}}};t.exports=s}).call(e,n(126))},function(t,e,n){"use strict";var r=n(102),i=n(491),o={processChildrenUpdates:i.dangerouslyProcessChildrenUpdates,replaceNodeWithMarkup:r.dangerouslyReplaceNodeWithMarkup};t.exports=o},function(t,e,n){"use strict";function r(t){}function i(t){return!(!t.prototype||!t.prototype.isReactComponent)}function o(t){return!(!t.prototype||!t.prototype.isPureReactComponent)}var a=n(5),u=n(6),s=n(40),c=n(108),l=n(28),f=n(109),p=n(52),h=(n(19),n(196)),d=n(39),v=n(56),y=(n(3),n(80)),m=n(116),g=(n(4),{ImpureClass:0,PureClass:1,StatelessFunctional:2});r.prototype.render=function(){var t=p.get(this)._currentElement.type,e=t(this.props,this.context,this.updater);return e};var _=1,b={construct:function(t){this._currentElement=t,this._rootNodeID=0,this._compositeType=null,this._instance=null,this._hostParent=null,this._hostContainerInfo=null,this._updateBatchNumber=null,this._pendingElement=null,this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,this._renderedNodeType=null,this._renderedComponent=null,this._context=null,this._mountOrder=0,this._topLevelWrapper=null,this._pendingCallbacks=null,this._calledComponentWillUnmount=!1},mountComponent:function(t,e,n,u){this._context=u,this._mountOrder=_++,this._hostParent=e,this._hostContainerInfo=n;var c,l=this._currentElement.props,f=this._processContext(u),h=this._currentElement.type,d=t.getUpdateQueue(),y=i(h),m=this._constructComponent(y,l,f,d);y||null!=m&&null!=m.render?o(h)?this._compositeType=g.PureClass:this._compositeType=g.ImpureClass:(c=m,null===m||!1===m||s.isValidElement(m)||a("105",h.displayName||h.name||"Component"),m=new r(h),this._compositeType=g.StatelessFunctional);m.props=l,m.context=f,m.refs=v,m.updater=d,this._instance=m,p.set(m,this);var b=m.state;void 0===b&&(m.state=b=null),("object"!==typeof b||Array.isArray(b))&&a("106",this.getName()||"ReactCompositeComponent"),this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1;var w;return w=m.unstable_handleError?this.performInitialMountWithErrorHandling(c,e,n,t,u):this.performInitialMount(c,e,n,t,u),m.componentDidMount&&t.getReactMountReady().enqueue(m.componentDidMount,m),w},_constructComponent:function(t,e,n,r){return this._constructComponentWithoutOwner(t,e,n,r)},_constructComponentWithoutOwner:function(t,e,n,r){var i=this._currentElement.type;return t?new i(e,n,r):i(e,n,r)},performInitialMountWithErrorHandling:function(t,e,n,r,i){var o,a=r.checkpoint();try{o=this.performInitialMount(t,e,n,r,i)}catch(u){r.rollback(a),this._instance.unstable_handleError(u),this._pendingStateQueue&&(this._instance.state=this._processPendingState(this._instance.props,this._instance.context)),a=r.checkpoint(),this._renderedComponent.unmountComponent(!0),r.rollback(a),o=this.performInitialMount(t,e,n,r,i)}return o},performInitialMount:function(t,e,n,r,i){var o=this._instance,a=0;o.componentWillMount&&(o.componentWillMount(),this._pendingStateQueue&&(o.state=this._processPendingState(o.props,o.context))),void 0===t&&(t=this._renderValidatedComponent());var u=h.getType(t);this._renderedNodeType=u;var s=this._instantiateReactComponent(t,u!==h.EMPTY);this._renderedComponent=s;var c=d.mountComponent(s,r,e,n,this._processChildContext(i),a);return c},getHostNode:function(){return d.getHostNode(this._renderedComponent)},unmountComponent:function(t){if(this._renderedComponent){var e=this._instance;if(e.componentWillUnmount&&!e._calledComponentWillUnmount)if(e._calledComponentWillUnmount=!0,t){var n=this.getName()+".componentWillUnmount()";f.invokeGuardedCallback(n,e.componentWillUnmount.bind(e))}else e.componentWillUnmount();this._renderedComponent&&(d.unmountComponent(this._renderedComponent,t),this._renderedNodeType=null,this._renderedComponent=null,this._instance=null),this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,this._pendingCallbacks=null,this._pendingElement=null,this._context=null,this._rootNodeID=0,this._topLevelWrapper=null,p.remove(e)}},_maskContext:function(t){var e=this._currentElement.type,n=e.contextTypes;if(!n)return v;var r={};for(var i in n)r[i]=t[i];return r},_processContext:function(t){var e=this._maskContext(t);return e},_processChildContext:function(t){var e,n=this._currentElement.type,r=this._instance;if(r.getChildContext&&(e=r.getChildContext()),e){"object"!==typeof n.childContextTypes&&a("107",this.getName()||"ReactCompositeComponent");for(var i in e)i in n.childContextTypes||a("108",this.getName()||"ReactCompositeComponent",i);return u({},t,e)}return t},_checkContextTypes:function(t,e,n){},receiveComponent:function(t,e,n){var r=this._currentElement,i=this._context;this._pendingElement=null,this.updateComponent(e,r,t,i,n)},performUpdateIfNecessary:function(t){null!=this._pendingElement?d.receiveComponent(this,this._pendingElement,t,this._context):null!==this._pendingStateQueue||this._pendingForceUpdate?this.updateComponent(t,this._currentElement,this._currentElement,this._context,this._context):this._updateBatchNumber=null},updateComponent:function(t,e,n,r,i){var o=this._instance;null==o&&a("136",this.getName()||"ReactCompositeComponent");var u,s=!1;this._context===i?u=o.context:(u=this._processContext(i),s=!0);var c=e.props,l=n.props;e!==n&&(s=!0),s&&o.componentWillReceiveProps&&o.componentWillReceiveProps(l,u);var f=this._processPendingState(l,u),p=!0;this._pendingForceUpdate||(o.shouldComponentUpdate?p=o.shouldComponentUpdate(l,f,u):this._compositeType===g.PureClass&&(p=!y(c,l)||!y(o.state,f))),this._updateBatchNumber=null,p?(this._pendingForceUpdate=!1,this._performComponentUpdate(n,l,f,u,t,i)):(this._currentElement=n,this._context=i,o.props=l,o.state=f,o.context=u)},_processPendingState:function(t,e){var n=this._instance,r=this._pendingStateQueue,i=this._pendingReplaceState;if(this._pendingReplaceState=!1,this._pendingStateQueue=null,!r)return n.state;if(i&&1===r.length)return r[0];for(var o=u({},i?r[0]:n.state),a=i?1:0;a=0||null!=e.is}function v(t){var e=t.type;h(e),this._currentElement=t,this._tag=e.toLowerCase(),this._namespaceURI=null,this._renderedChildren=null,this._previousStyle=null,this._previousStyleCopy=null,this._hostNode=null,this._hostParent=null,this._rootNodeID=0,this._domID=0,this._hostContainerInfo=null,this._wrapperState=null,this._topLevelWrapper=null,this._flags=0}var y=n(5),m=n(6),g=n(474),_=n(476),b=n(37),w=n(103),E=n(38),C=n(188),x=n(50),S=n(104),O=n(74),I=n(189),P=n(8),k=n(492),T=n(493),N=n(190),M=n(496),A=(n(19),n(505)),D=n(510),R=(n(14),n(77)),j=(n(3),n(115),n(80),n(202)),U=(n(117),n(4),I),L=x.deleteListener,q=P.getNodeFromInstance,F=O.listenTo,z=S.registrationNameModules,B={string:!0,number:!0},V="__html",W={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null},H=11,K={topAbort:"abort",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topSeeked:"seeked",topSeeking:"seeking",topStalled:"stalled",topSuspend:"suspend",topTimeUpdate:"timeupdate",topVolumeChange:"volumechange",topWaiting:"waiting"},Y={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},G={listing:!0,pre:!0,textarea:!0},X=m({menuitem:!0},Y),Q=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,$={},J={}.hasOwnProperty,Z=1;v.displayName="ReactDOMComponent",v.Mixin={mountComponent:function(t,e,n,r){this._rootNodeID=Z++,this._domID=n._idCounter++,this._hostParent=e,this._hostContainerInfo=n;var o=this._currentElement.props;switch(this._tag){case"audio":case"form":case"iframe":case"img":case"link":case"object":case"source":case"video":this._wrapperState={listeners:null},t.getReactMountReady().enqueue(f,this);break;case"input":k.mountWrapper(this,o,e),o=k.getHostProps(this,o),t.getReactMountReady().enqueue(l,this),t.getReactMountReady().enqueue(f,this);break;case"option":T.mountWrapper(this,o,e),o=T.getHostProps(this,o);break;case"select":N.mountWrapper(this,o,e),o=N.getHostProps(this,o),t.getReactMountReady().enqueue(f,this);break;case"textarea":M.mountWrapper(this,o,e),o=M.getHostProps(this,o),t.getReactMountReady().enqueue(l,this),t.getReactMountReady().enqueue(f,this)}i(this,o);var a,p;null!=e?(a=e._namespaceURI,p=e._tag):n._tag&&(a=n._namespaceURI,p=n._tag),(null==a||a===w.svg&&"foreignobject"===p)&&(a=w.html),a===w.html&&("svg"===this._tag?a=w.svg:"math"===this._tag&&(a=w.mathml)),this._namespaceURI=a;var h;if(t.useCreateElement){var d,v=n._ownerDocument;if(a===w.html)if("script"===this._tag){var y=v.createElement("div"),m=this._currentElement.type;y.innerHTML="<"+m+">",d=y.removeChild(y.firstChild)}else d=o.is?v.createElement(this._currentElement.type,o.is):v.createElement(this._currentElement.type);else d=v.createElementNS(a,this._currentElement.type);P.precacheNode(this,d),this._flags|=U.hasCachedChildNodes,this._hostParent||C.setAttributeForRoot(d),this._updateDOMProperties(null,o,t);var _=b(d);this._createInitialChildren(t,o,r,_),h=_}else{var E=this._createOpenTagMarkupAndPutListeners(t,o),x=this._createContentMarkup(t,o,r);h=!x&&Y[this._tag]?E+"/>":E+">"+x+""}switch(this._tag){case"input":t.getReactMountReady().enqueue(u,this),o.autoFocus&&t.getReactMountReady().enqueue(g.focusDOMComponent,this);break;case"textarea":t.getReactMountReady().enqueue(s,this),o.autoFocus&&t.getReactMountReady().enqueue(g.focusDOMComponent,this);break;case"select":case"button":o.autoFocus&&t.getReactMountReady().enqueue(g.focusDOMComponent,this);break;case"option":t.getReactMountReady().enqueue(c,this)}return h},_createOpenTagMarkupAndPutListeners:function(t,e){var n="<"+this._currentElement.type;for(var r in e)if(e.hasOwnProperty(r)){var i=e[r];if(null!=i)if(z.hasOwnProperty(r))i&&o(this,r,i,t);else{"style"===r&&(i&&(i=this._previousStyleCopy=m({},e.style)),i=_.createMarkupForStyles(i,this));var a=null;null!=this._tag&&d(this._tag,e)?W.hasOwnProperty(r)||(a=C.createMarkupForCustomAttribute(r,i)):a=C.createMarkupForProperty(r,i),a&&(n+=" "+a)}}return t.renderToStaticMarkup?n:(this._hostParent||(n+=" "+C.createMarkupForRoot()),n+=" "+C.createMarkupForID(this._domID))},_createContentMarkup:function(t,e,n){var r="",i=e.dangerouslySetInnerHTML;if(null!=i)null!=i.__html&&(r=i.__html);else{var o=B[typeof e.children]?e.children:null,a=null!=o?null:e.children;if(null!=o)r=R(o);else if(null!=a){var u=this.mountChildren(a,t,n);r=u.join("")}}return G[this._tag]&&"\n"===r.charAt(0)?"\n"+r:r},_createInitialChildren:function(t,e,n,r){var i=e.dangerouslySetInnerHTML;if(null!=i)null!=i.__html&&b.queueHTML(r,i.__html);else{var o=B[typeof e.children]?e.children:null,a=null!=o?null:e.children;if(null!=o)""!==o&&b.queueText(r,o);else if(null!=a)for(var u=this.mountChildren(a,t,n),s=0;se.end?(n=e.end,r=e.start):(n=e.start,r=e.end),i.moveToElementText(t),i.moveStart("character",n),i.setEndPoint("EndToStart",i),i.moveEnd("character",r-n),i.select()}function u(t,e){if(window.getSelection){var n=window.getSelection(),r=t[l()].length,i=Math.min(e.start,r),o=void 0===e.end?i:Math.min(e.end,r);if(!n.extend&&i>o){var a=o;o=i,i=a}var u=c(t,i),s=c(t,o);if(u&&s){var f=document.createRange();f.setStart(u.node,u.offset),n.removeAllRanges(),i>o?(n.addRange(f),n.extend(s.node,s.offset)):(f.setEnd(s.node,s.offset),n.addRange(f))}}}var s=n(11),c=n(532),l=n(201),f=s.canUseDOM&&"selection"in document&&!("getSelection"in window),p={getOffsets:f?i:o,setOffsets:f?a:u};t.exports=p},function(t,e,n){"use strict";var r=n(5),i=n(6),o=n(102),a=n(37),u=n(8),s=n(77),c=(n(3),n(117),function(t){this._currentElement=t,this._stringText=""+t,this._hostNode=null,this._hostParent=null,this._domID=0,this._mountIndex=0,this._closingComment=null,this._commentNodes=null});i(c.prototype,{mountComponent:function(t,e,n,r){var i=n._idCounter++,o=" react-text: "+i+" ";if(this._domID=i,this._hostParent=e,t.useCreateElement){var c=n._ownerDocument,l=c.createComment(o),f=c.createComment(" /react-text "),p=a(c.createDocumentFragment());return a.queueChild(p,a(l)),this._stringText&&a.queueChild(p,a(c.createTextNode(this._stringText))),a.queueChild(p,a(f)),u.precacheNode(this,l),this._closingComment=f,p}var h=s(this._stringText);return t.renderToStaticMarkup?h:"\x3c!--"+o+"--\x3e"+h+"\x3c!-- /react-text --\x3e"},receiveComponent:function(t,e){if(t!==this._currentElement){this._currentElement=t;var n=""+t;if(n!==this._stringText){this._stringText=n;var r=this.getHostNode();o.replaceDelimitedText(r[0],r[1],n)}}},getHostNode:function(){var t=this._commentNodes;if(t)return t;if(!this._closingComment)for(var e=u.getNodeFromInstance(this),n=e.nextSibling;;){if(null==n&&r("67",this._domID),8===n.nodeType&&" /react-text "===n.nodeValue){this._closingComment=n;break}n=n.nextSibling}return t=[this._hostNode,this._closingComment],this._commentNodes=t,t},unmountComponent:function(){this._closingComment=null,this._commentNodes=null,u.uncacheNode(this)}}),t.exports=c},function(t,e,n){"use strict";function r(){this._rootNodeID&&l.updateWrapper(this)}function i(t){var e=this._currentElement.props,n=u.executeOnChange(e,t);return c.asap(r,this),n}var o=n(5),a=n(6),u=n(107),s=n(8),c=n(24),l=(n(3),n(4),{getHostProps:function(t,e){return null!=e.dangerouslySetInnerHTML&&o("91"),a({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue,onChange:t._wrapperState.onChange})},mountWrapper:function(t,e){var n=u.getValue(e),r=n;if(null==n){var a=e.defaultValue,s=e.children;null!=s&&(null!=a&&o("92"),Array.isArray(s)&&(s.length<=1||o("93"),s=s[0]),a=""+s),null==a&&(a=""),r=a}t._wrapperState={initialValue:""+r,listeners:null,onChange:i.bind(t)}},updateWrapper:function(t){var e=t._currentElement.props,n=s.getNodeFromInstance(t),r=u.getValue(e);if(null!=r){var i=""+r;i!==n.value&&(n.value=i),null==e.defaultValue&&(n.defaultValue=i)}null!=e.defaultValue&&(n.defaultValue=e.defaultValue)},postMountWrapper:function(t){var e=s.getNodeFromInstance(t),n=e.textContent;n===t._wrapperState.initialValue&&(e.value=n)}});t.exports=l},function(t,e,n){"use strict";function r(t,e){"_hostNode"in t||s("33"),"_hostNode"in e||s("33");for(var n=0,r=t;r;r=r._hostParent)n++;for(var i=0,o=e;o;o=o._hostParent)i++;for(;n-i>0;)t=t._hostParent,n--;for(;i-n>0;)e=e._hostParent,i--;for(var a=n;a--;){if(t===e)return t;t=t._hostParent,e=e._hostParent}return null}function i(t,e){"_hostNode"in t||s("35"),"_hostNode"in e||s("35");for(;e;){if(e===t)return!0;e=e._hostParent}return!1}function o(t){return"_hostNode"in t||s("36"),t._hostParent}function a(t,e,n){for(var r=[];t;)r.push(t),t=t._hostParent;var i;for(i=r.length;i-- >0;)e(r[i],"captured",n);for(i=0;i0;)n(s[c],"captured",o)}var s=n(5);n(3);t.exports={isAncestor:i,getLowestCommonAncestor:r,getParentInstance:o,traverseTwoPhase:a,traverseEnterLeave:u}},function(t,e,n){"use strict";function r(){this.reinitializeTransaction()}var i=n(6),o=n(24),a=n(76),u=n(14),s={initialize:u,close:function(){p.isBatchingUpdates=!1}},c={initialize:u,close:o.flushBatchedUpdates.bind(o)},l=[c,s];i(r.prototype,a,{getTransactionWrappers:function(){return l}});var f=new r,p={isBatchingUpdates:!1,batchedUpdates:function(t,e,n,r,i,o){var a=p.isBatchingUpdates;return p.isBatchingUpdates=!0,a?t(e,n,r,i,o):f.perform(t,null,e,n,r,i,o)}};t.exports=p},function(t,e,n){"use strict";function r(){C||(C=!0,g.EventEmitter.injectReactEventListener(m),g.EventPluginHub.injectEventPluginOrder(u),g.EventPluginUtils.injectComponentTree(p),g.EventPluginUtils.injectTreeTraversal(d),g.EventPluginHub.injectEventPluginsByName({SimpleEventPlugin:E,EnterLeaveEventPlugin:s,ChangeEventPlugin:a,SelectEventPlugin:w,BeforeInputEventPlugin:o}),g.HostComponent.injectGenericComponentClass(f),g.HostComponent.injectTextComponentClass(v),g.DOMProperty.injectDOMPropertyConfig(i),g.DOMProperty.injectDOMPropertyConfig(c),g.DOMProperty.injectDOMPropertyConfig(b),g.EmptyComponent.injectEmptyComponentFactory(function(t){return new h(t)}),g.Updates.injectReconcileTransaction(_),g.Updates.injectBatchingStrategy(y),g.Component.injectEnvironment(l))}var i=n(473),o=n(475),a=n(477),u=n(479),s=n(480),c=n(482),l=n(484),f=n(487),p=n(8),h=n(489),d=n(497),v=n(495),y=n(498),m=n(502),g=n(503),_=n(508),b=n(513),w=n(514),E=n(515),C=!1;t.exports={inject:r}},function(t,e,n){"use strict";var r="function"===typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;t.exports=r},function(t,e,n){"use strict";function r(t){i.enqueueEvents(t),i.processEventQueue(!1)}var i=n(50),o={handleTopLevel:function(t,e,n,o){r(i.extractEvents(t,e,n,o))}};t.exports=o},function(t,e,n){"use strict";function r(t){for(;t._hostParent;)t=t._hostParent;var e=f.getNodeFromInstance(t),n=e.parentNode;return f.getClosestInstanceFromNode(n)}function i(t,e){this.topLevelType=t,this.nativeEvent=e,this.ancestors=[]}function o(t){var e=h(t.nativeEvent),n=f.getClosestInstanceFromNode(e),i=n;do{t.ancestors.push(i),i=i&&r(i)}while(i);for(var o=0;o/,o=/^<\!\-\-/,a={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(t){var e=r(t);return o.test(t)?t:t.replace(i," "+a.CHECKSUM_ATTR_NAME+'="'+e+'"$&')},canReuseMarkup:function(t,e){var n=e.getAttribute(a.CHECKSUM_ATTR_NAME);return n=n&&parseInt(n,10),r(t)===n}};t.exports=a},function(t,e,n){"use strict";function r(t,e,n){return{type:"INSERT_MARKUP",content:t,fromIndex:null,fromNode:null,toIndex:n,afterNode:e}}function i(t,e,n){return{type:"MOVE_EXISTING",content:null,fromIndex:t._mountIndex,fromNode:p.getHostNode(t),toIndex:n,afterNode:e}}function o(t,e){return{type:"REMOVE_NODE",content:null,fromIndex:t._mountIndex,fromNode:e,toIndex:null,afterNode:null}}function a(t){return{type:"SET_MARKUP",content:t,fromIndex:null,fromNode:null,toIndex:null,afterNode:null}}function u(t){return{type:"TEXT_CONTENT",content:t,fromIndex:null,fromNode:null,toIndex:null,afterNode:null}}function s(t,e){return e&&(t=t||[],t.push(e)),t}function c(t,e){f.processChildrenUpdates(t,e)}var l=n(5),f=n(108),p=(n(52),n(19),n(28),n(39)),h=n(483),d=(n(14),n(529)),v=(n(3),{Mixin:{_reconcilerInstantiateChildren:function(t,e,n){return h.instantiateChildren(t,e,n)},_reconcilerUpdateChildren:function(t,e,n,r,i,o){var a,u=0;return a=d(e,u),h.updateChildren(t,a,n,r,i,this,this._hostContainerInfo,o,u),a},mountChildren:function(t,e,n){var r=this._reconcilerInstantiateChildren(t,e,n);this._renderedChildren=r;var i=[],o=0;for(var a in r)if(r.hasOwnProperty(a)){var u=r[a],s=0,c=p.mountComponent(u,e,this,this._hostContainerInfo,n,s);u._mountIndex=o++,i.push(c)}return i},updateTextContent:function(t){var e=this._renderedChildren;h.unmountChildren(e,!1);for(var n in e)e.hasOwnProperty(n)&&l("118");c(this,[u(t)])},updateMarkup:function(t){var e=this._renderedChildren;h.unmountChildren(e,!1);for(var n in e)e.hasOwnProperty(n)&&l("118");c(this,[a(t)])},updateChildren:function(t,e,n){this._updateChildren(t,e,n)},_updateChildren:function(t,e,n){var r=this._renderedChildren,i={},o=[],a=this._reconcilerUpdateChildren(r,t,o,i,e,n);if(a||r){var u,l=null,f=0,h=0,d=0,v=null;for(u in a)if(a.hasOwnProperty(u)){var y=r&&r[u],m=a[u];y===m?(l=s(l,this.moveChild(y,v,f,h)),h=Math.max(y._mountIndex,h),y._mountIndex=f):(y&&(h=Math.max(y._mountIndex,h)),l=s(l,this._mountChildAtIndex(m,o[d],v,f,e,n)),d++),f++,v=p.getHostNode(m)}for(u in i)i.hasOwnProperty(u)&&(l=s(l,this._unmountChild(r[u],i[u])));l&&c(this,l),this._renderedChildren=a}},unmountChildren:function(t){var e=this._renderedChildren;h.unmountChildren(e,t),this._renderedChildren=null},moveChild:function(t,e,n,r){if(t._mountIndex=e)return{node:n,offset:e-o};o=a}n=r(i(n))}}t.exports=o},function(t,e,n){"use strict";function r(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n["ms"+t]="MS"+e,n["O"+t]="o"+e.toLowerCase(),n}function i(t){if(u[t])return u[t];if(!a[t])return t;var e=a[t];for(var n in e)if(e.hasOwnProperty(n)&&n in s)return u[t]=e[n];return""}var o=n(11),a={animationend:r("Animation","AnimationEnd"),animationiteration:r("Animation","AnimationIteration"),animationstart:r("Animation","AnimationStart"),transitionend:r("Transition","TransitionEnd")},u={},s={};o.canUseDOM&&(s=document.createElement("div").style,"AnimationEvent"in window||(delete a.animationend.animation,delete a.animationiteration.animation,delete a.animationstart.animation),"TransitionEvent"in window||delete a.transitionend.transition),t.exports=i},function(t,e,n){"use strict";function r(t){return'"'+i(t)+'"'}var i=n(77);t.exports=r},function(t,e,n){"use strict";var r=n(195);t.exports=r.renderSubtreeIntoContainer},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function o(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a=n(20),u=(n.n(a),n(128)),s=n.n(u),c=n(208);n(118);e.a=function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"store",n=arguments[1],u=n||e+"Subscription",l=function(t){function n(o,a){r(this,n);var u=i(this,t.call(this,o,a));return u[e]=o.store,u}return o(n,t),n.prototype.getChildContext=function(){var t;return t={},t[e]=this[e],t[u]=null,t},n.prototype.render=function(){return a.Children.only(this.props.children)},n}(a.Component);return l.propTypes={store:c.a.isRequired,children:s.a.element.isRequired},l.childContextTypes=(t={},t[e]=c.a.isRequired,t[u]=c.b,t),l}()},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?t:e}function o(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}function u(){}function s(t,e){var n={run:function(r){try{var i=t(e.getState(),r);(i!==n.props||n.error)&&(n.shouldComponentUpdate=!0,n.props=i,n.error=null)}catch(t){n.shouldComponentUpdate=!0,n.error=t}}};return n}function c(t){var e,c,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},p=l.getDisplayName,b=void 0===p?function(t){return"ConnectAdvanced("+t+")"}:p,w=l.methodName,E=void 0===w?"connectAdvanced":w,C=l.renderCountProp,x=void 0===C?void 0:C,S=l.shouldHandleStateChanges,O=void 0===S||S,I=l.storeKey,P=void 0===I?"store":I,k=l.withRef,T=void 0!==k&&k,N=a(l,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef"]),M=P+"Subscription",A=g++,D=(e={},e[P]=y.a,e[M]=y.b,e),R=(c={},c[M]=y.b,c);return function(e){h()("function"==typeof e,"You must pass a component to the function returned by connect. Instead received "+JSON.stringify(e));var a=e.displayName||e.name||"Component",c=b(a),l=m({},N,{getDisplayName:b,methodName:E,renderCountProp:x,shouldHandleStateChanges:O,storeKey:P,withRef:T,displayName:c,wrappedComponentName:a,WrappedComponent:e}),p=function(a){function f(t,e){r(this,f);var n=i(this,a.call(this,t,e));return n.version=A,n.state={},n.renderCount=0,n.store=t[P]||e[P],n.propsMode=Boolean(t[P]),n.setWrappedInstance=n.setWrappedInstance.bind(n),h()(n.store,'Could not find "'+P+'" in either the context or props of "'+c+'". Either wrap the root component in a , or explicitly pass "'+P+'" as a prop to "'+c+'".'),n.initSelector(),n.initSubscription(),n}return o(f,a),f.prototype.getChildContext=function(){var t,e=this.propsMode?null:this.subscription;return t={},t[M]=e||this.context[M],t},f.prototype.componentDidMount=function(){O&&(this.subscription.trySubscribe(),this.selector.run(this.props),this.selector.shouldComponentUpdate&&this.forceUpdate())},f.prototype.componentWillReceiveProps=function(t){this.selector.run(t)},f.prototype.shouldComponentUpdate=function(){return this.selector.shouldComponentUpdate},f.prototype.componentWillUnmount=function(){this.subscription&&this.subscription.tryUnsubscribe(),this.subscription=null,this.notifyNestedSubs=u,this.store=null,this.selector.run=u,this.selector.shouldComponentUpdate=!1},f.prototype.getWrappedInstance=function(){return h()(T,"To access the wrapped instance, you need to specify { withRef: true } in the options argument of the "+E+"() call."),this.wrappedInstance},f.prototype.setWrappedInstance=function(t){this.wrappedInstance=t},f.prototype.initSelector=function(){var e=t(this.store.dispatch,l);this.selector=s(e,this.store),this.selector.run(this.props)},f.prototype.initSubscription=function(){if(O){var t=(this.propsMode?this.props:this.context)[M];this.subscription=new v.a(this.store,t,this.onStateChange.bind(this)),this.notifyNestedSubs=this.subscription.notifyNestedSubs.bind(this.subscription)}},f.prototype.onStateChange=function(){this.selector.run(this.props),this.selector.shouldComponentUpdate?(this.componentDidUpdate=this.notifyNestedSubsOnComponentDidUpdate,this.setState(_)):this.notifyNestedSubs()},f.prototype.notifyNestedSubsOnComponentDidUpdate=function(){this.componentDidUpdate=void 0,this.notifyNestedSubs()},f.prototype.isSubscribed=function(){return Boolean(this.subscription)&&this.subscription.isSubscribed()},f.prototype.addExtraProps=function(t){if(!T&&!x&&(!this.propsMode||!this.subscription))return t;var e=m({},t);return T&&(e.ref=this.setWrappedInstance),x&&(e[x]=this.renderCount++),this.propsMode&&this.subscription&&(e[M]=this.subscription),e},f.prototype.render=function(){var t=this.selector;if(t.shouldComponentUpdate=!1,t.error)throw t.error;return n.i(d.createElement)(e,this.addExtraProps(t.props))},f}(d.Component);return p.WrappedComponent=e,p.displayName=c,p.childContextTypes=R,p.contextTypes=D,p.propTypes=D,f()(p,e)}}e.a=c;var l=n(259),f=n.n(l),p=n(260),h=n.n(p),d=n(20),v=(n.n(d),n(543)),y=n(208),m=Object.assign||function(t){for(var e=1;e=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}function i(t,e,n,r){return function(i,o){return n(t(i,o),e(r,o),o)}}function o(t,e,n,r,i){function o(i,o){return d=i,v=o,y=t(d,v),m=e(r,v),g=n(y,m,v),h=!0,g}function a(){return y=t(d,v),e.dependsOnOwnProps&&(m=e(r,v)),g=n(y,m,v)}function u(){return t.dependsOnOwnProps&&(y=t(d,v)),e.dependsOnOwnProps&&(m=e(r,v)),g=n(y,m,v)}function s(){var e=t(d,v),r=!p(e,y);return y=e,r&&(g=n(y,m,v)),g}function c(t,e){var n=!f(e,v),r=!l(t,d);return d=t,v=e,n&&r?a():n?u():r?s():g}var l=i.areStatesEqual,f=i.areOwnPropsEqual,p=i.areStatePropsEqual,h=!1,d=void 0,v=void 0,y=void 0,m=void 0,g=void 0;return function(t,e){return h?c(t,e):o(t,e)}}function a(t,e){var n=e.initMapStateToProps,a=e.initMapDispatchToProps,u=e.initMergeProps,s=r(e,["initMapStateToProps","initMapDispatchToProps","initMergeProps"]),c=n(t,s),l=a(t,s),f=u(t,s);return(s.pure?o:i)(c,l,f,t,s)}e.a=a;n(542)},function(t,e,n){"use strict";n(118)},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(){var t=[],e=[];return{clear:function(){e=o,t=o},notify:function(){for(var n=t=e,r=0;r-1?e:t}function h(t,e){e=e||{};var n=e.body;if(t instanceof h){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new i(t.headers)),this.method=t.method,this.mode=t.mode,n||null==t._bodyInit||(n=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"omit",!e.headers&&this.headers||(this.headers=new i(e.headers)),this.method=p(e.method||this.method||"GET"),this.mode=e.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function d(t){var e=new FormData;return t.trim().split("&").forEach(function(t){if(t){var n=t.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");e.append(decodeURIComponent(r),decodeURIComponent(i))}}),e}function v(t){var e=new i;return t.split(/\r?\n/).forEach(function(t){var n=t.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();e.append(r,i)}}),e}function y(t,e){e||(e={}),this.type="default",this.status="status"in e?e.status:200,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new i(e.headers),this.url=e.url||"",this._initBody(t)}if(!t.fetch){var m={searchParams:"URLSearchParams"in t,iterable:"Symbol"in t&&"iterator"in Symbol,blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};if(m.arrayBuffer)var g=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],_=function(t){return t&&DataView.prototype.isPrototypeOf(t)},b=ArrayBuffer.isView||function(t){return t&&g.indexOf(Object.prototype.toString.call(t))>-1};i.prototype.append=function(t,r){t=e(t),r=n(r);var i=this.map[t];this.map[t]=i?i+","+r:r},i.prototype.delete=function(t){delete this.map[e(t)]},i.prototype.get=function(t){return t=e(t),this.has(t)?this.map[t]:null},i.prototype.has=function(t){return this.map.hasOwnProperty(e(t))},i.prototype.set=function(t,r){this.map[e(t)]=n(r)},i.prototype.forEach=function(t,e){for(var n in this.map)this.map.hasOwnProperty(n)&&t.call(e,this.map[n],n,this)},i.prototype.keys=function(){var t=[];return this.forEach(function(e,n){t.push(n)}),r(t)},i.prototype.values=function(){var t=[];return this.forEach(function(e){t.push(e)}),r(t)},i.prototype.entries=function(){var t=[];return this.forEach(function(e,n){t.push([n,e])}),r(t)},m.iterable&&(i.prototype[Symbol.iterator]=i.prototype.entries);var w=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];h.prototype.clone=function(){return new h(this,{body:this._bodyInit})},f.call(h.prototype),f.call(y.prototype),y.prototype.clone=function(){return new y(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new i(this.headers),url:this.url})},y.error=function(){var t=new y(null,{status:0,statusText:""});return t.type="error",t};var E=[301,302,303,307,308];y.redirect=function(t,e){if(-1===E.indexOf(e))throw new RangeError("Invalid status code");return new y(null,{status:e,headers:{location:t}})},t.Headers=i,t.Request=h,t.Response=y,t.fetch=function(t,e){return new Promise(function(n,r){var i=new h(t,e),o=new XMLHttpRequest;o.onload=function(){var t={status:o.status,statusText:o.statusText,headers:v(o.getAllResponseHeaders()||"")};t.url="responseURL"in o?o.responseURL:t.headers.get("X-Request-URL");var e="response"in o?o.response:o.responseText;n(new y(e,t))},o.onerror=function(){r(new TypeError("Network request failed"))},o.ontimeout=function(){r(new TypeError("Network request failed"))},o.open(i.method,i.url,!0),"include"===i.credentials&&(o.withCredentials=!0),"responseType"in o&&m.blob&&(o.responseType="blob"),i.headers.forEach(function(t,e){o.setRequestHeader(e,t)}),o.send("undefined"===typeof i._bodyInit?null:i._bodyInit)})},t.fetch.polyfill=!0}}("undefined"!==typeof self?self:this)},function(t,e,n){n(220),t.exports=n(219)}]); +//# sourceMappingURL=main.6e85d214.js.map \ No newline at end of file diff --git a/ide/public/javascripts/syntax_highlight/mode-msl.js b/ide/public/javascripts/syntax_highlight/mode-msl.js index 2297606..8b59cee 100644 --- a/ide/public/javascripts/syntax_highlight/mode-msl.js +++ b/ide/public/javascripts/syntax_highlight/mode-msl.js @@ -11,7 +11,7 @@ define("ace/mode/msl_highlight_rules", ["require", "exports", "module", "ace/lib const buildInMethods = ( "List|randomize|rotate|get|has|indexOf|add|addFirst|addLast|addAllFirst|addAllLast|" + - "set|addAt|removeFirst|removeLast|remove|removeAt|clear|select|rank|print|->" + "set|addAt|removeFirst|removeLast|remove|removeAt|clear|select|deselect|rank|print|->" ); const buildInProperties = "selected|duration|answeredWhen|"; @@ -27,6 +27,13 @@ define("ace/mode/msl_highlight_rules", ["require", "exports", "module", "ace/lib regex: '".*?"' }; + const inTagExpressionStartRule = { + token: "gray", + regex: /{/, + //see https://stackoverflow.com/questions/22765435/recursive-blocks-in-ace-editor/22766243#22766243 + push: "inTagExpression" + }; + //in tag const EqualSignRule = { token: "gray", @@ -52,7 +59,7 @@ define("ace/mode/msl_highlight_rules", ["require", "exports", "module", "ace/lib const QuestionStartRule = { token: "question", - regex: /\[SingleChoice|\[SingleMatrix|\[MultipleChoice|\[MultipleMatrix/, + regex: /\[SingleChoice|\[SingleMatrix|\[MultipleChoice|\[MultipleMatrix|\[Empty/, next: "inQuestionTag" }; @@ -67,6 +74,10 @@ define("ace/mode/msl_highlight_rules", ["require", "exports", "module", "ace/lib token: "gray", regex: /\[Page/, next: "inPageTag" + }, { + token: "gray", + regex: /\[EmptyPage]/, + next: "inPostQuestionScript" }]; const startRules = [{ @@ -82,16 +93,41 @@ define("ace/mode/msl_highlight_rules", ["require", "exports", "module", "ace/lib const PageEndRule = { token: "gray", - regex: /\[PageEnd]/, + regex: /\[PageEnd]|\[EmptyPageEnd]/, next: "pageAndPageGroupStart" }; + const PreScriptRowTagRule = { + token: "question_row", + regex: /\[Row/, + next: 'preScriptRowTag' + }; + + const PreScriptColTagRule = { + token: "question_col", + regex: /\[Col/, + next: 'preScriptColTag' + }; + + const PostScriptRowTagRule = { + token: "question_row", + regex: /\[Row/, + next: 'postScriptRowTag' + }; + + const PostScriptColTagRule = { + token: "question_col", + regex: /\[Col/, + next: 'postScriptColTag' + }; + + this.$rules = { "start": startRules, "pageAndPageGroupStart": PageAndPageGroupStartRules, - "inPageGroupTag": [StringRule, EqualSignRule, { + "inPageGroupTag": [StringRule, EqualSignRule, inTagExpressionStartRule, { token: "gray", regex: /]/, next: "inPrePageScript" @@ -103,16 +139,30 @@ define("ace/mode/msl_highlight_rules", ["require", "exports", "module", "ace/lib next: "inPageTag" }], - "inPageTag": [StringRule, EqualSignRule, { + "inPageTag": [StringRule, EqualSignRule, inTagExpressionStartRule, { token: "gray", regex: /]/, next: "inPreQuestionScript" }], + "inTagExpression": [ + StringRule, + BooleanRule, + DotRule, + KeyWordMapperRule, { + token: "gray", + regex: /}/, + //https://stackoverflow.com/questions/22765435/recursive-blocks-in-ace-editor/22766243#22766243 + next: "pop" + } + ], + "inPreQuestionScript": [ StringRule, BooleanRule, DotRule, + PreScriptRowTagRule, + PreScriptColTagRule, KeyWordMapperRule, QuestionStartRule, /* @@ -132,7 +182,7 @@ define("ace/mode/msl_highlight_rules", ["require", "exports", "module", "ace/lib PageEndRule ], - "inQuestionTag": [StringRule, EqualSignRule, { + "inQuestionTag": [StringRule, EqualSignRule, inTagExpressionStartRule, { token: "question", regex: /]/, next: "inQuestionBody" @@ -141,11 +191,11 @@ define("ace/mode/msl_highlight_rules", ["require", "exports", "module", "ace/lib "inQuestionBody": [{ token: "question_row", - regex: /\[Row/, + regex: /\[Row(s)?/, next: "inRowTag" }, { token: "question_col", - regex: /\[Col/, + regex: /\[Col(s)?/, next: "inColTag" }, QuestionStartRule, /* @@ -164,18 +214,66 @@ define("ace/mode/msl_highlight_rules", ["require", "exports", "module", "ace/lib submitButtonRule, PageEndRule], - "inPostQuestionScript": [StringRule, BooleanRule, DotRule, KeyWordMapperRule, PageEndRule], + "inPostQuestionScript": [StringRule, BooleanRule, DotRule, PostScriptRowTagRule, PostScriptColTagRule, KeyWordMapperRule, PageEndRule], - "inRowTag": [StringRule, EqualSignRule, { + "inRowTag": [StringRule, EqualSignRule, inTagExpressionStartRule, { token: "question_row", regex: /]/, next: "inQuestionBody" }], - "inColTag": [StringRule, EqualSignRule, { + "inColTag": [StringRule, EqualSignRule, inTagExpressionStartRule, { token: "question_col", regex: /]/, next: "inQuestionBody" + }], + + "preScriptRowTag": [StringRule, EqualSignRule, inTagExpressionStartRule, { + token: "question_row", + regex: /]/, + next: "preScriptRowEndTag" + }], + + "preScriptColTag": [StringRule, EqualSignRule, inTagExpressionStartRule, { + token: "question_col", + regex: /]/, + next: "preScriptColEndTag" + }], + + "preScriptRowEndTag": [{ + token: "question_row", + regex: /\[End]/, + next: "inPreQuestionScript" + }], + + "preScriptColEndTag": [{ + token: "question_col", + regex: /\[End]/, + next: "inPreQuestionScript" + }], + + "postScriptRowTag": [StringRule, EqualSignRule, inTagExpressionStartRule, { + token: "question_row", + regex: /]/, + next: "postScriptRowEndTag" + }], + + "postScriptColTag": [StringRule, EqualSignRule, inTagExpressionStartRule, { + token: "question_col", + regex: /]/, + next: "postScriptColEndTag" + }], + + "postScriptRowEndTag": [{ + token: "question_row", + regex: /\[End]/, + next: "inPostQuestionScript" + }], + + "postScriptColEndTag": [{ + token: "question_col", + regex: /\[End]/, + next: "inPostQuestionScript" }] }; diff --git a/ide/public/temp_msl_plugins_repo/razer.js b/ide/public/temp_msl_plugins_repo/razer.js index 1493568..b7e244e 100644 --- a/ide/public/temp_msl_plugins_repo/razer.js +++ b/ide/public/temp_msl_plugins_repo/razer.js @@ -1,24 +1,38 @@ (function () { function razer(action) { - console.log(action); - if (action.type === "plugin_questionChanged") { + + switch (action.type) { + case "plugin_questionLoad": + questionLoad(action); + break; + case "plugin_questionUnLoad": + questionUnload(action); + break; + default: + //nothing + } + + function questionLoad(action) { const question = action.question; - if (question.razer === "true") { - //mount the razer iframe.... - const iframeElem = document.createElement("iframe"); - iframeElem.height = "528"; - iframeElem.scrolling = "no"; - iframeElem.src = "//assets.razerzone.com/animation/ouroboros_v2/index.html"; - iframeElem.width = "938"; - iframeElem.classList.add("razer-iframe"); + if(question.razer !== "true") return; + //mount the razer iframe.... + const iframeElem = document.createElement("iframe"); + iframeElem.height = "528"; + iframeElem.scrolling = "no"; + iframeElem.src = "//assets.razerzone.com/animation/ouroboros_v2/index.html"; + iframeElem.width = "938"; + iframeElem.classList.add("razer-iframe"); - const belowQuestionTextDiv = action.questionDiv.querySelector(".below-question-text"); - belowQuestionTextDiv.appendChild(iframeElem); - } else { - const iframe = action.questionDiv.querySelector(`.below-question-text .razer-iframe`); - if (iframe) iframe.remove(); - } + const belowQuestionTextDiv = action.questionDiv.querySelector(".below-question-text"); + belowQuestionTextDiv.appendChild(iframeElem); + } + + function questionUnload(action) { + const question = action.question; + if(question.razer !== "true") return; + const iframe = action.questionDiv.querySelector(`.below-question-text .razer-iframe`); + if (iframe) iframe.remove(); } } diff --git a/ide/test-data/demo-survey b/ide/test-data/demo-survey index 17543bb..8f752bd 100644 --- a/ide/test-data/demo-survey +++ b/ide/test-data/demo-survey @@ -7,69 +7,4 @@ CSS "../temp_msl_plugins_repo/fashion.css" [Row id="row2" videoSrc="https://images-fe.ssl-images-amazon.com/images/I/A1V21HzqzpS.mp4"]Red [Row id="row3" videoSrc="https://images-fe.ssl-images-amazon.com/images/I/A1YY9ei9l7S.mp4"]Pink [Submit] -[PageEnd] - - - - -JS "../temp_msl_plugins_repo/razer.js" -CSS "../temp_msl_plugins_repo/razer.css" - -[Page] - -[MultipleChoice]What kind of mouse do you like? -[Row]Small -[Row]Cheap -[Row]Precious -[Row]Bluetooth -[Row]Has many buttons - -[SingleChoice razer="true"]How do you like this design? -[Row]Good -[Row]Normal -[Row]Bad - -[SingleMatrix]Some other questions.. -[Row]Some row 1 -[Row]Some row 2 -[Col]Some column 1 -[Col]Some column 2 -[Submit] -[PageEnd] - -[Page] -[SingleChoice]Some other questions -[Row]aaa -[Row]bbb -[Row]ccc - -[SingleChoice]Some other questions -[Row]aaa -[Row]bbb -[Row]ccc - -[Submit] -[PageEnd] - -JS "https://maps.googleapis.com/maps/api/js?key=AIzaSyC7H_6oQ33ae7r-UPJqprgNcs13LnCDcHs" -JS "../temp_msl_plugins_repo/get-map-position.js" -CSS "../temp_msl_plugins_repo/get-map-position.css" - -[Page] -[Empty getMapPosition="true"]Where do you have lunch break? -[Submit] -[PageEnd] - -[Page] -[SingleChoice]Some other questions -[Row]aaa -[Row]bbb -[Row]ccc - -[SingleChoice]Some other questions -[Row]aaa -[Row]bbb -[Row]ccc - -[Submit] -[PageEnd] +[PageEnd] \ No newline at end of file diff --git a/ide/test-data/demo-survey-2 b/ide/test-data/demo-survey-2 new file mode 100644 index 0000000..59c0226 --- /dev/null +++ b/ide/test-data/demo-survey-2 @@ -0,0 +1,38 @@ +JS "../temp_msl_plugins_repo/razer.js" +CSS "../temp_msl_plugins_repo/razer.css" + +[Page] + +[MultipleChoice]What kind of mouse do you like? +[Row]Small +[Row]Cheap +[Row]Precious +[Row]Bluetooth +[Row]Has many buttons + +[SingleChoice razer="true"]How do you like this design? +[Row]Good +[Row]Normal +[Row]Bad + +[SingleMatrix]Some other questions.. +[Row]Some row 1 +[Row]Some row 2 +[Col]Some column 1 +[Col]Some column 2 +[Submit] +[PageEnd] + +[Page] +[SingleChoice]Some other questions +[Row]aaa +[Row]bbb +[Row]ccc + +[SingleChoice]Some other questions +[Row]aaa +[Row]bbb +[Row]ccc + +[Submit] +[PageEnd] \ No newline at end of file diff --git a/ide/test-data/demo-survey-3 b/ide/test-data/demo-survey-3 new file mode 100644 index 0000000..823b764 --- /dev/null +++ b/ide/test-data/demo-survey-3 @@ -0,0 +1,22 @@ +JS "https://maps.googleapis.com/maps/api/js?key=AIzaSyC7H_6oQ33ae7r-UPJqprgNcs13LnCDcHs" +JS "../temp_msl_plugins_repo/get-map-position.js" +CSS "../temp_msl_plugins_repo/get-map-position.css" + +[Page] +[Empty getMapPosition="true"]Where do you have lunch break? +[Submit] +[PageEnd] + +[Page] +[SingleChoice]Some other questions +[Row]aaa +[Row]bbb +[Row]ccc + +[SingleChoice]Some other questions +[Row]aaa +[Row]bbb +[Row]ccc + +[Submit] +[PageEnd] \ No newline at end of file diff --git a/ide/test-data/demo-survey-4 b/ide/test-data/demo-survey-4 new file mode 100644 index 0000000..d38ae8d --- /dev/null +++ b/ide/test-data/demo-survey-4 @@ -0,0 +1,47 @@ +[EmptyPage] +def v1 = [Row]Rakuten[End] +def v2 = [Row]Taobao[End] +def v3 = [Row]Ebay[End] +def v4 = [Row]Amazon[End] + +def global onlineVendors = List(v1, v2, v3, v4) + +def v5 = [Row]7-11[End] +def v6 = [Row]Family Mart[End] +def v7 = [Row]Aeon[End] + +def global normalVendors = List(v5, v6, v7) +[EmptyPageEnd] + +[Page] +[MultipleChoice id="q1"]Do you buy things from the following places? +[Rows use={normalVendors}] +[Rows use={onlineVendors}] +[Row]Big camera +[Submit] +[PageEnd] + +[Page] +[MultipleChoice id="q2"]Do you like the following places? +[Rows use={normalVendors}] +[Rows use={onlineVendors}] +[Row]Big camera +[Submit] +[PageEnd] + +[Page] + +def r1 = [Col]Good[End] +def r2 = [Col]Normal[End] +def r3 = [Col]Bad[End] + +[SingleMatrix id="q3"]How do you rate the following online places? +[Rows use={onlineVendors}] +[Cols use={List(r1, r2, r3)}] + +[SingleMatrix id="q4"]How do you rate the following offline places? +[Rows use={normalVendors}] +[Row]Big camera +[Cols use={List(r1, r2, r3)}] +[Submit] +[PageEnd] \ No newline at end of file diff --git a/ide/test-data/ppt-survey-1 b/ide/test-data/ppt-survey-1 new file mode 100644 index 0000000..1d9c093 --- /dev/null +++ b/ide/test-data/ppt-survey-1 @@ -0,0 +1,20 @@ +[Page] +[SingleChoice id="q1"]犬がいますか? +[Row id="yes"]はい +[Row id="no"]いいえ +[Submit] +[PageEnd] + +[Page] +[SingleChoice show={q1.yes.selected}]あなたは何匹の犬を飼っていますか? +[Row]0 +[Row]1 +[Row]2 +[Row]3 + +[MultipleChoice]趣味は何? +[Row]お金を稼ぐ +[Row]お金をかける +[Row]他人のお金をかける +[Submit] +[PageEnd] \ No newline at end of file diff --git a/ide/test-data/ppt-survey-2 b/ide/test-data/ppt-survey-2 new file mode 100644 index 0000000..3c39595 --- /dev/null +++ b/ide/test-data/ppt-survey-2 @@ -0,0 +1,39 @@ +[Page] +[SingleChoice id="q1"]Are you good at math? +[Row id="yes"]Yes +[Row id="no"]No +[Submit] +[PageEnd] + +[Page] +[SingleChoice id="q2"]What is the value of 66 * 3 / 2 +[Row id="r1"]78 +[Row id="r2"]99 +[Row id="r3"]94 +[Submit] +[PageEnd] + +[Page] +[SingleChoice id="q3"]What is the value of 2 * 2 * ( 3 + 7 ) +[Row id="r1"]22 +[Row id="r2"]40 +[Row id="r3"]39 +[Submit] +[PageEnd] + + +[Page] +[SingleChoice id="q6"]Why are you good at math? +[Row id="r1"]Because I am smart +[Row id="r2"]Because I am handsome +[Row id="r3"]Because I work +[Submit] +[PageEnd] + +[Page] +[SingleChoice id="q7"]Why are you bad at math? +[Row id="r1"]Because I am not smart +[Row id="r2"]Because I am not handsome +[Row id="r3"]Because I don't work +[Submit] +[PageEnd] diff --git a/ide/test-data/ppt-survey-3 b/ide/test-data/ppt-survey-3 new file mode 100644 index 0000000..dfbbec5 --- /dev/null +++ b/ide/test-data/ppt-survey-3 @@ -0,0 +1,82 @@ +[Page] +def greeting +if clock < 11am then + greeting = "Good morning!" +else if clock < 5pm then + greeting = "Good afternoon!" +else + greeting = "Good evening!" +end +[SingleChoice id="q1"]${greeting}Are you good at math? +[Row id="yes"]Yes +[Row id="no"]No +[Submit] +def global isGood = false +if q1.yes.selected then + isGood = true + print "user is good at math" +else + isGood = false + print "user is bad at math" +end +[PageEnd] + +[PageGroup show={isGood} randomize] +[Page] +def showNum +chance +50%: showNum = "x" +50%: showNum = "2" +end +[SingleChoice id="q2" show={showNum == "2"}]What is the value of 66 * 3 / 2 +[Row id="r1"]78 +[Row id="correct"]99 +[Row id="r3"]94 + +[SingleChoice id="qX" show={showNum == "x"}]What is the value of 44 * 2 +[Row id="correct"]88 +[Row id="r2"]99 +[Row id="r3"]77 +[Submit] +[PageEnd] + +[Page] +[SingleChoice id="q3"]What is the value of 2 * 2 * ( 3 + 7 ) +[Row id="r1"]22 +[Row id="correct"]40 +[Row id="r3"]39 +[Submit] +[PageEnd] +[PageGroupEnd] + +[EmptyPage] +if isGood == false then + return +end + +if q2.duration + qX.duration + q3.duration < 2s then + print "user is answering too fast" + terminate +end + +if q2.correct.selected == false and q3.correct.selected == false and qX.correct.selected == false then + isGood = false +end +[EmptyPageEnd] + +[Page show={isGood}] +[SingleChoice id="q6"]Why are you good at math? +[Row id="r1"]Because I am smart +[Row id="r2"]Because I am handsome +[Row id="r3"]Because I work +[Submit] +[PageEnd] + + +[Page hide={isGood}] +[SingleChoice id="q7"]Why are you bad at math? +[Row id="r1"]Because I am not smart +[Row id="r2"]Because I am not handsome +[Row id="r3"]Because I don't work +[Submit] +[PageEnd] diff --git a/ide/test-data/ppt-survey-4 b/ide/test-data/ppt-survey-4 new file mode 100644 index 0000000..9491526 --- /dev/null +++ b/ide/test-data/ppt-survey-4 @@ -0,0 +1,15 @@ +[Page] +function makeRows() + return List( + [Row]Hello[End], + [Row]World[End] + ) +end +[SingleChoice id="q1"]Demonstrates how to make function calls +[Rows use={makeRows()}] +[Row]extra row + +[MultipleChoice id="q2"]The vm actually supports closure, although i guess it is not very useful... +[Rows use={makeRows()}] +[Submit] +[PageEnd] \ No newline at end of file diff --git a/interpreter/src/builtIn.ts b/interpreter/src/builtIn.ts index fed01ec..5917df2 100644 --- a/interpreter/src/builtIn.ts +++ b/interpreter/src/builtIn.ts @@ -8,10 +8,9 @@ export class List { return this._elements[index]; } - //todo: in the future we may not use 0 and 1 for booleans - has(el): number { + has(el): boolean { const t = this._elements.indexOf(el); - return t === -1? 0 : 1; + return t === -1? false : true; } indexOf(el): number { diff --git a/interpreter/src/commands.ts b/interpreter/src/commands.ts index be8ec54..ca111b9 100644 --- a/interpreter/src/commands.ts +++ b/interpreter/src/commands.ts @@ -2,6 +2,16 @@ * Created by wangsheng on 14/10/17. */ +var answer = { + id: "q1", + row1: { + selected: true, + } + + +} + + export class Command { lineNumber: number; name: string; diff --git a/interpreter/src/interpreter.ts b/interpreter/src/interpreter.ts index 20f5849..dc86871 100644 --- a/interpreter/src/interpreter.ts +++ b/interpreter/src/interpreter.ts @@ -89,14 +89,28 @@ abstract class AbstractInterpreterState implements InterpreterState { this.vm = interpreter; } - //todo: add doc for this - _getUnresolvedQuestionDataPromise(){ + /** + * here we would return a promise, and keep the resolve function by assigning it to vm.toResolveNextQuestionData + * a typical use case is when we are in debug mode, reference ui requests for the next page, and vm tries to evaluates the next page, + * in the middle of it, vm hits a breakpoint. And this point, vm stops, and has no idea when it can resume evaluating the page. + * so vm will return a promise (of next page) to reference ui. vm also keep the resolve function as vm.toResolveNextQuestionData. + * later when user resume execution (by clicking resume debugging or step over) and when the page is finally evaluated, we call vm.toResolveNextQuestionData + * to resolve the promise we returned previously. + * @returns {Promise} promise of next page. + * @private + */ + _getUnresolvedQuestionDataPromise(): Promise{ return new Promise((resolve, reject) => { this.vm.toResolveNextQuestionData = resolve; }); } - //todo: and this... + /** + * returns a resolved promise of next page + * @param vmResponse + * @returns {Promise} + * @private + */ _getResolvedQuestionDataPromise(vmResponse: VMResponse){ return Promise.resolve(vmResponse); } @@ -393,7 +407,12 @@ export class Interpreter { builtInFunctions: Map; isWaitingForAnswer: boolean; toResolveNextQuestionData: Function; - //todo: documentation to explain how we use token + /* + this token is only useful when we embed the reference ui in the ide. a vm may be restarted many times, so imagine we run the vm for the first time, + stops and receives a promise, and we register a callback to execute when the promise is resolved. then we restart the vm and run it the second time, + now the promise in the first run finally resolves, in this case, we don't want to invoke the callback. this token is used to differentiate different + runs. Every time we rerun the vm we would generate a different token. + */ token: string; output: (content: string) => void; //we use this call back to tell ide that we have stopped at a break point so that the ide can highlight the corresponding line. @@ -750,10 +769,9 @@ export class Interpreter { } public execute(comm: Command): any { - //todo: big giant switch case... switch (comm.name) { case "await": - //todo: this command is not useful, remove it from compiler + //this is not useful anymore... return; case "cmp_eq": return this.cmpEq(comm); diff --git a/interpreter/src/questionTypes.ts b/interpreter/src/questionTypes.ts index 90ca494..cd451a6 100644 --- a/interpreter/src/questionTypes.ts +++ b/interpreter/src/questionTypes.ts @@ -1,12 +1,64 @@ -//todo: I want these interfaces to be like a documentations about questions... I need to add details to it.. like stats... - /* + right now the vm will send all the questions on the next page in an array. the result + is something like this: + + [question1Data, question2Data.....] + + this is slightly problematic as the page information and page group information + is lost + + in the early design, page and page group are converted to functions. for instance, + when we see a page, we actually calls the page function, and the page function will + gives us an array of question objects. the page only has `randomize` and `rotate` + attributes. + + when running the page function, we evaluate the `randomize` and `rotate` attribute + and based on the result, we return questions in different order. so, all attributes + (only two in the early design) take effect before vm returns the data, and ui do not + need to concern about it. so, nothing about the page needed to be passed to ui according + to the early design. + + but in the late design, we introduced plugins. and we want to allow plugins to work + with pages. for instance, i can have a background image plugin, that changes the background + image of a page. + + it may look like this: + use "background-image" + + [QuestionPage background={bgUrl}] + [SingleChoice]..... + [SingleChoice]..... + [Submit] + [PageEnd] + + so in this case, the vm needs to pass the evaluated background url to ui. ui can then loads the + the background image. + + obviously, with [question1Data, question2Data.....] as the result passed from vm to ui, there is + no place the page information. + + to keep the page and page group as functions (we don't want to change that...too much effort...), + we will create a special object called pageInfo (pageGroupInfo will be introduced later), this object carries all page information that needs to be passed + to ui. + + this is what vm will pass to ui when we introduce pageInfo + { + pageInfo: { + //randomize and rotate, as discussed above, won't be passed... + attrib1: "evaluated result" + attrib2: "evaluated result" + }, + questions: [ + question1Data, + question2Data.... + ] + } + type: actionTypePageData, token: response.token, pageInfo: response.pageInfo, questions: List(response.questions) - */ export interface VMResponse { @@ -23,6 +75,7 @@ export interface Question { //following attributes will be available after question is answered. displayedWhen: Date; answeredWhen: Date; + //the time it takes to answer the question. duration: number; totalClicks: number; } diff --git a/reference-ui/public/index.html b/reference-ui/public/index.html index 0b65d13..138f0a8 100644 --- a/reference-ui/public/index.html +++ b/reference-ui/public/index.html @@ -1,6 +1,6 @@ - + @@ -22,24 +22,174 @@ --> React App - - - -
- - - + To begin the development, run `npm start` or `yarn start`. + To create a production bundle, use `npm run build` or `yarn build`. +--> + + diff --git a/reference-ui/public/testJsPlugin.js b/reference-ui/public/testJsPlugin.js index bcc2fdb..550c4b4 100644 --- a/reference-ui/public/testJsPlugin.js +++ b/reference-ui/public/testJsPlugin.js @@ -19,7 +19,7 @@ setTimeout(function(){ answerSetSelect(action); break; default: - //nothing + //nothing } function questionLoad(action) { diff --git a/reference-ui/src/actions/PluginActions.js b/reference-ui/src/actions/PluginActions.js index 8e02d16..328f113 100644 --- a/reference-ui/src/actions/PluginActions.js +++ b/reference-ui/src/actions/PluginActions.js @@ -1,31 +1,28 @@ -/** - * Created by sheng.wang on 2017/12/06. - */ - const prefix = "plugin_"; +//these event is not intended to be used by redux, rather, it is passed to plugins export const actionTypePageLoad = `${prefix}pageLoad`; export const actionTypePageUnload = `${prefix}pageUnload`; export const actionTypeQuestionLoad = `${prefix}questionLoad`; export const actionTypeQuestionUnload = `${prefix}questionUnLoad`; -//these event is not intended to be used by redux, rather, it is passed to plugins - -export function pageLoadAction(pageGroupInfo, pageInfo, questions){ +export function pageLoadAction(pageGroupInfo, pageInfo, questions, pageDiv){ return { type: actionTypePageLoad, pageGroupInfo, pageInfo, - questions + questions, + pageDiv } } -export function pageUnloadAction(pageGroupInfo, pageInfo, questions){ +export function pageUnloadAction(pageGroupInfo, pageInfo, questions, pageDiv){ return { type: actionTypePageUnload, pageGroupInfo, pageInfo, - questions + questions, + pageDiv } } diff --git a/reference-ui/src/components/PluginImportsComp.js b/reference-ui/src/components/PluginImportsComp.js index 8c119fa..f72d07e 100644 --- a/reference-ui/src/components/PluginImportsComp.js +++ b/reference-ui/src/components/PluginImportsComp.js @@ -8,30 +8,32 @@ export class PluginImportsComp extends Component { this.thirdPartyJsLibs = new Set(); } - insertPlugins(){ - /* - when embedded in ide we need to reuse the RUI for different surveys...hence, we need to remove the plugin stylesheets when we re-run the survey, otherwise - stylesheets introduced in previous surveys may have (unwanted) effect on the current surveys. - so here, we remove all the existing plugins stylesheets (including stylesheets to reset the styles) - however, when it comes to plugin js, things are a bit trickier. - we make sure all registered callbacks are unregistered, when we run a new survey, js plugins registered for the previous surveys - won't be called. This is done by pluginManager.resetRegisteredPlugins() function. - if a plugin is well written, it should not pollute global namespace, and has no effect as long as it is not called by plugin manager( in the above case, it won't - be called, because we would have unregistered it when we run a new survey). - but some 3rd party libraries will probably make changes to global namespaces, keep working without being called, or reacts to various events. - there is no obvious way to overcome this. when you import a piece of 3rd party js, it just runs, you cannot undo all the side effects. - so here, the least we can do is, to make sure a 3rd party library is not ran multiple times. For instance, when we introduce google map for the current survey, - and later a new survey also want to import google map api, we can ignore the second import, because it has already been imported (and cannot be removed, at least - no official doc says anything about removing). + /* + when embedded in ide we need to reuse the RUI for different surveys...hence, we need to remove the plugin stylesheets when we re-run the survey, otherwise + stylesheets introduced in previous surveys may have (unwanted) effect on the current surveys. + so here, we remove all the existing plugins stylesheets to reset the styles. + however, when it comes to plugin js, things are a bit trickier. + we make sure all registered callbacks are unregistered, when we run a new survey, js plugins registered for the previous surveys + won't be called. This is done by pluginManager.resetRegisteredPlugins() function. + if a plugin is well written, it should not pollute global namespace, and has no effect as long as it is not called by plugin manager( in the above case, it won't + be called, because we would have unregistered it when we run a new survey). + but some 3rd party libraries will probably make changes to global namespaces, keep working without being called, or reacts to various events. + there is no obvious way to overcome this. when you import a piece of 3rd party js, it just runs, you cannot undo all the side effects. + so here, the least we can do is, to make sure a 3rd party library is not ran multiple times. For instance, when we introduce google map for the current survey, + and later a new survey also want to import google map api, we can ignore the second import, because it has already been imported (and cannot be removed, at least + no official doc says anything about removing). + + we use this component to remember what 3rd party js links have been imported because this component will keep living once it is created. and we make sure no 3rd party js links are imported twice. - we use this component to remember what 3rd party js links have been imported because this component will keep living once it is created. and we make sure no 3rd party js links are imported twice. + so in summary, + we remove css and add them back if needed. + when a plugin is not needed, we remove its js link tag. this has no effects, just trying to make the dom looks nicer. we also unregister it from pluginManager. + when a plugin is needed again, a js link tag is appended to dom, causing the plugin code to run again, the plugin code, when running, should register itself in pluginManager. + we make sure no 3rd party libraries are added twice, but we don't remove them / undo their effects /remove their js link tag. - so in summary, - we remove css and add them back if needed. - when a plugin is not needed, we remove its js link tag. this has no effects, just trying to make the dom looks nicer. we also unregister it from pluginManager. - when a plugin is needed again, a js link tag is appended to dom, causing the plugin code to run again, the plugin code, when running, should register itself in pluginManager. - we make sure no 3rd party libraries are added twice, but we don't remove them / undo their effects /remove their js link tag. - */ + we are manipulating the dom directly because JSX, by the time when i write the code, does create a js script link but the js inside the plugin somehow just won't execute. + */ + insertPlugins(){ const previousPlugins = document.querySelectorAll('body > link[data-plugin="true"]'); previousPlugins.forEach(pp => { pp.remove(); @@ -51,8 +53,8 @@ export class PluginImportsComp extends Component { //has to be a 3rd party lib this.thirdPartyJsLibs.add(url); } - }); + cssPluginImports.map(url => { const fileref = document.createElement("link"); fileref.rel = "stylesheet"; @@ -63,11 +65,13 @@ export class PluginImportsComp extends Component { }); } + //when embedded in an ide, every time we rerun / re debug the survey, the imports may change, and this component will be updated, and + //we need to re-insert the plugins. componentDidUpdate () { this.insertPlugins(); } - //called in initial rendering + //when ran in a respondent device, we will insert plugins when this component is mounted. componentDidUpdate will never be called.. componentDidMount () { this.insertPlugins(); } diff --git a/reference-ui/src/components/QuestionPageComp.js b/reference-ui/src/components/QuestionPageComp.js index f5763d6..0a7616a 100644 --- a/reference-ui/src/components/QuestionPageComp.js +++ b/reference-ui/src/components/QuestionPageComp.js @@ -13,19 +13,20 @@ class QuestionPage extends Component { componentWillUpdate(nextProps, nextState) { if(this.props.pageInfo.id !== nextProps.pageInfo.id) { - pluginManager.passEventsToPlugins(pageUnloadAction(this.props.pageGroupInfo, this.props.pageInfo, this.props.questions)); + pluginManager.passEventsToPlugins(pageUnloadAction(this.props.pageGroupInfo, this.props.pageInfo, this.props.questions, this.questionPageDiv)); } } componentDidUpdate(prevProps, prevState){ if(prevProps.pageInfo.id !== this.props.pageInfo.id) { - pluginManager.passEventsToPlugins(pageLoadAction(this.props.pageGroupInfo, this.props.pageInfo, this.props.questions)); + pluginManager.passEventsToPlugins(pageLoadAction(this.props.pageGroupInfo, this.props.pageInfo, this.props.questions, this.questionPageDiv)); } + console.log(Date.now()) } componentDidMount() { const {pageGroupInfo, pageInfo, questions} = this.props; - pluginManager.passEventsToPlugins(pageLoadAction(pageGroupInfo, pageInfo, questions)) + pluginManager.passEventsToPlugins(pageLoadAction(pageGroupInfo, pageInfo, questions, this.questionPageDiv)) } render() { @@ -47,9 +48,8 @@ class QuestionPage extends Component { const pageDivProps = extractHTMLElementAttributesFromProps(pageInfo); return ( - //todo: change the class name here, it should be question-page*, rather than page* //the extra structures, such as page-body-left, page-body-right are used by the plugins to cusomize the UI. -
+
{this.questionPageDiv = questionPageDiv;}}>
MSL
diff --git a/reference-ui/src/components/WelcomePageComp.js b/reference-ui/src/components/WelcomePageComp.js index a429efb..9fe1ce5 100644 --- a/reference-ui/src/components/WelcomePageComp.js +++ b/reference-ui/src/components/WelcomePageComp.js @@ -13,14 +13,14 @@ export class WelcomePageComp extends PureComponent {
MSL
-

- 複数のアンケート画面を同時に開くと、正常に回答できません。
- アンケートはひとつずつ、回答ください。
- アンケートへの回答は、「動作環境」に記載の環境からお願いします。
- 本アンケートは、回答を中断してから1時間以内は中断した質問から再開可能です。
- (システム緊急対応等により再開できない場合もありますので、予めご了承ください。) - 回答結果は、当社の「個人情報保護方針」に基づいて取り扱います。
-

+
+
    +
  • 複数のアンケート画面を同時に開くと、正常に回答できません。
  • +
  • アンケートはひとつずつ、回答ください。
  • +
  • アンケートへの回答は、「動作環境」に記載の環境からお願いします。
  • +
  • 回答結果は、当社の「個人情報保護方針」に基づいて取り扱います。
  • +
+
diff --git a/reference-ui/src/containers/QuestionPageContainer.js b/reference-ui/src/containers/QuestionPageContainer.js index 233d881..d05700f 100644 --- a/reference-ui/src/containers/QuestionPageContainer.js +++ b/reference-ui/src/containers/QuestionPageContainer.js @@ -18,6 +18,7 @@ function mapDispatchToProps(dispatch) { } function submitAnswersHandler() { + console.log(Date.now()); dispatch(submitAnswersAction()) } diff --git a/reference-ui/src/reducers/FlowReducer.js b/reference-ui/src/reducers/FlowReducer.js index dcc5895..90f2a01 100644 --- a/reference-ui/src/reducers/FlowReducer.js +++ b/reference-ui/src/reducers/FlowReducer.js @@ -5,9 +5,11 @@ import { import {List} from "../../node_modules/immutable/dist/immutable"; import {pageDataAction} from "../actions/PageActions"; -//todo: for default state we need to display a welcome page..., we add a separate field to mark the welcome page status... -//todo: each status should have a token generated when we restart, everything response from vm should carry that token -//todo: if a response is not with current token, that response is a response of a request sent in the previous cycle.(before we restart) +/* + for default state we need to display a welcome page..., we add a separate field to mark the welcome page status... + each status should have a token generated when we restart, everything response from vm should carry that token + if a response is not with current token, that response is a response of a request sent in the previous cycle.(before we restart) + */ export const defaultState = { //see comments in mainReducer isLocked: false, @@ -67,49 +69,9 @@ function endSurvey(state, action) { } function restartDebug(token){ - return window.isDev? fakeData(token) : window.interpreter.restartDebug(token); + return window.interpreter.restartDebug(token); } function restartRun(token){ - return window.isDev? fakeData(token) : window.interpreter.restartRun(token); + return window.interpreter.restartRun(token); } - -function fakeData(token){ - //see sendAnswerToInterpreter in QuestionAnswerReducer - return new Promise(function (resolve, reject) { - setTimeout(function () { - const questions = [ - { - id: "q1", - type: "single-choice", - text: "Which cloth do you like best?", - fashion: "true", - rows: { - row1: { - text: "Cloth A", - videoSrc: "https://images-fe.ssl-images-amazon.com/images/I/A1Pm-q-cBNS.mp4" - }, - row2: { - text: "Cloth B", - videoSrc: "https://images-fe.ssl-images-amazon.com/images/I/A1V21HzqzpS.mp4" - }, - row3: { - text: "Cloth B", - videoSrc: "https://images-fe.ssl-images-amazon.com/images/I/A1bwNA23dvS.mp4" - } - } - } - ]; - resolve({ - pageInfo: { - id: "p1" - }, - pageGroupInfo: { - id: "g1" - }, - questions, - token: token - }); - }, 100); - }); -} \ No newline at end of file diff --git a/reference-ui/src/reducers/InteractionTimeReducer.js b/reference-ui/src/reducers/InteractionTimeReducer.js index 83fab4a..229ed7a 100644 --- a/reference-ui/src/reducers/InteractionTimeReducer.js +++ b/reference-ui/src/reducers/InteractionTimeReducer.js @@ -1,9 +1,12 @@ import {actionTypeSetSelect} from "../actions/AnswerActions"; +import {actionTypePageData} from "../actions/PageActions"; export function lastInteractionTimeReducer(state, action) { switch (action.type) { case actionTypeSetSelect: return new Date(); + case actionTypePageData: + return new Date(); default: return state.lastInteractionTime; } diff --git a/reference-ui/src/reducers/MainReducer.js b/reference-ui/src/reducers/MainReducer.js index 1eaf2b5..cf662e0 100644 --- a/reference-ui/src/reducers/MainReducer.js +++ b/reference-ui/src/reducers/MainReducer.js @@ -10,11 +10,6 @@ import {pageGroupInfoReducer} from "./pageGroupInfoReducer"; import {pageInfoReducer} from "./pageInfoReducer"; import {pluginManager} from "../plugins/pluginManager"; -//todo: here, add a reset action, and a reset reducer. when reset action is received, reset the status to default status (with a new token) -//todo: add a start answering action (action sent when user click on the start button on welcome page), a corresponding reducer, that reducer would call vm's restart function. -//todo: that is, everything will be initiated from UI. the vm is like backend server, only reacts when called by ui. -//todo: add a welcome page component -//todo: add a end page component. const mainReducer = (state = defaultState, action) => { /* senario: user clicks submit, UI send the answer data to vm, vm hit a break point, it returns a question data promise @@ -40,11 +35,10 @@ const mainReducer = (state = defaultState, action) => { submitAnswersReducer(state, action); const isLocked = isLockedReducer(state, action); - const lastInteractionTime = lastInteractionTimeReducer(state, action); const pageInfo = pageInfoReducer(state, action); const pageGroupInfo = pageGroupInfoReducer(state, action); const questions = questionsReducer(state, action, pageInfo, pageGroupInfo); - + const lastInteractionTime = lastInteractionTimeReducer(state, action); return { pageInfo, diff --git a/reference-ui/src/reducers/QuestionAnswerReducer.js b/reference-ui/src/reducers/QuestionAnswerReducer.js index 2104cbc..096067d 100644 --- a/reference-ui/src/reducers/QuestionAnswerReducer.js +++ b/reference-ui/src/reducers/QuestionAnswerReducer.js @@ -15,7 +15,7 @@ export function updateForm(state, action) { const questionChanges = {form: {}}; questionChanges.form[name] = value; - const c1 = questionTimeRecordChanges(state.lastInteractionTime); + const c1 = questionTimeRecordChanges(question, state.lastInteractionTime); Object.assign(questionChanges, c1); const newQuestion = R.mergeDeepRight(question, questionChanges); @@ -55,7 +55,7 @@ export function setSelect(state, action) { } } - const c1 = questionTimeRecordChanges(state.lastInteractionTime); + const c1 = questionTimeRecordChanges(question, state.lastInteractionTime); const c2 = questionTotalClickChanges(question.totalClicks); Object.assign(questionChanges, c1, c2); @@ -82,7 +82,7 @@ export function setSelect(state, action) { //the last question user interacted with, we called it lastQuestion question.duration = question.duration + (question.answeredWhen - lastQuestion.answeredWhen) - //if question is the first question user interacts with, ie, there is lastQuestion, then + //if question is the first question user interacts with, ie, there is no lastQuestion, then question.duration = question.duration + (question.answeredWhen - pageDisplayedWhen) the above equations can be summarized to be: @@ -113,11 +113,11 @@ export function setSelect(state, action) { //so the time it takes to review question 1 is time 4 - time 3 question1.duration = question1.duration + (time 4 - time 3) */ -function questionTimeRecordChanges(lastInteractionTime) { +function questionTimeRecordChanges(question, lastInteractionTime) { const now = new Date(); return { answeredWhen: now, - duration: now.getTime() - lastInteractionTime.getTime() + duration: question.duration + (now.getTime() - lastInteractionTime.getTime()) }; } @@ -137,8 +137,7 @@ function getQuestionIndexById(questions, id) { export function submitAnswersReducer(state, action) { if (action.type === actionTypeSubmitAnswer) { - //we should not send state.token, but for the fake data to pass validation, it needs the token - const questionsPromise = sendAnswerToInterpreter(state.questions.toArray(), state.token); + const questionsPromise = sendAnswerToInterpreter(state.questions.toArray()); questionsPromise.then(function (response) { if(response.token === state.token) { if(!response.questions || response.questions.length === 0) { @@ -151,145 +150,6 @@ export function submitAnswersReducer(state, action) { } } -function sendAnswerToInterpreter(questionsWithAnswers, token) { - if(!window.isDev) { - return window.interpreter.submitAnswer(questionsWithAnswers); - } else { - return fakeSendAnswerToInterpreter(questionsWithAnswers, token); - } -} - -//todo: connect to vm and get back the real questions data -let fakeAnswerCount = 0; -function fakeSendAnswerToInterpreter(questions, token) { - fakeAnswerCount++; - if(fakeAnswerCount > 4) { - return Promise.resolve({ - pageInfo: { - attrib1: "evaluated attrib1" - }, - questions: [], - token - }) - } - return new Promise(function (resolve, reject) { - setTimeout(function () { - /* - right now the vm will send all the questions on the next page in an array. the result - is something like this: - - [question1Data, question2Data.....] - - this is slightly problematic as the page information and page group information - is lost - - in the early design, page and page group are converted to functions. for instance, - when we see a page, we actually calls the page function, and the page function will - gives us an array of question objects. the page only has `randomize` and `rotate` - attributes. - - when running the page function, we evaluate the `randomize` and `rotate` attribute - and based on the result, we return questions in different order. so, all attributes - (only two in the early design) take effect before vm returns the data, and ui do not - need to concern about it. so, nothing about the page needed to be passed to ui according - to the early design. - - but in the late design, we introduced plugins. and we want to allow plugins to work - with pages. for instance, i can have a background image plugin, that changes the background - image of a page. - - it may look like this: - use "background-image" - - [QuestionPage background={bgUrl}] - [SingleChoice]..... - [SingleChoice]..... - [Submit] - [PageEnd] - - so in this case, the vm needs to pass the evaluated background url to ui. ui can then loads the - the background image. - - obviously, with [question1Data, question2Data.....] as the result passed from vm to ui, there is - no place the page information. - - to keep the page and page group as functions (we don't want to change that...too much effort...), - we will create a special object called pageInfo (pageGroupInfo will be introduced later), this object carries all page information that needs to be passed - to ui. - - this is what vm will pass to ui when we introduce pageInfo - { - pageInfo: { - //randomize and rotate, as discussed above, won't be passed... - attrib1: "evaluated result" - attrib2: "evaluated result" - }, - questions: [ - question1Data, - question2Data.... - ] - } - */ - - const questions = [ - { - id: "q1", - type: "single-choice", - text: "q1 text" + Date.now(), - rows: { - _generatedIdentifierName2: { - "text": " aa" - }, - _generatedIdentifierName3: { - "text": " bb" - } - } - }, - { - id: "q2", - type: "multiple-choice", - text: "q2 text", - rows: { - _generatedIdentifierName4: { - "text": " aa" - }, - _generatedIdentifierName5: { - "text": " bb" - } - } - }, - { - id: "q3", - type: "multiple-matrix", - text: "q3 text", - rotateCol: true, - rows: { - _generatedIdentifierName6: { - text: " aa" - }, - _generatedIdentifierName7: { - text: " bb" - } - }, - cols: { - _generatedIdentifierName5: { - text: " col1" - }, - _generatedIdentifierName6: { - text: " col2" - } - } - } - ]; - - resolve({ - pageInfo: { - randomize: "true" - }, - pageGroupInfo: {}, - questions, - token - }); - }, 100); - }); +function sendAnswerToInterpreter(questionsWithAnswers) { + return window.interpreter.submitAnswer(questionsWithAnswers); } diff --git a/reference-ui/src/reducers/QuestionAugmentReducer.js b/reference-ui/src/reducers/QuestionAugmentReducer.js index db01f61..0f196e4 100644 --- a/reference-ui/src/reducers/QuestionAugmentReducer.js +++ b/reference-ui/src/reducers/QuestionAugmentReducer.js @@ -9,14 +9,14 @@ export function augmentQuestions(state, action, pageInfo, pageGroupInfo) { const questions = List(_questions); - if(action.type === actionTypePageData) { + if (action.type === actionTypePageData) { return questions.map(augmentQuestion); } return questions; } //this reducer augment a vm passed in question. see reference/questionData for more information. -function augmentQuestion(question){ +function augmentQuestion(question) { question = augmentWithStatsFields(question); // question = directAccessToRows(question); question = augmentRows(question); @@ -46,40 +46,85 @@ function augmentRows(question) { return question; } - function augmentNoneMatrixQuestions(question){ + function reduceOptionFieldToArrayOfOptionObj(ret, kv) { + const [key, value] = kv; + //List is not visible here because of the way it packas the code, so we checks id to + //determine whether value is a list or row object (row object must have an id) + if (!value.id) { + //value is an list of row objects. + return ret.concat(value._elements); + } else { + //value is an row object. + return ret.concat([value]); + } + } + + function augmentNoneMatrixQuestions(question) { + /* + we copy the all the rows in question.rows, augment the copies, and make the copies a direct field of question. The rows in question.rows will + not be augmented / changed and serve as a reference only. + so this is the question looks like originally: + { + rows: { + rowId1: {text: "hello"}, + rowId2: {text: "world"} + } + }, + this is how it looks like after we change it. + { + rows: { + rowId1: {text: "hello"}, + rowId2: {text: "world"} + }, + rowId1: { + id: "rowId1", + text: "hello", + selected: false + }, + rowId2: { + id: "rowId1", + text: "world", + selected: false + } + } + after the change, we can now do: + question.rowId1.text + as opposed to + question.rows.rowId1.text + + also, questions.rows only serve as a reference, when we assign answer data, we only modify question.rowId1, rather than question.rows.rowId1. + */ const newRows = {}; //we collects all row ids into this array so that it is easier to loop over row ids later, and whenever we render the rows, we will //use the orders in this array. const rowIds = []; - Object.entries(question.rows).map(kv => { - const [rowId, row] = kv; - rowIds.push(rowId); - newRows[rowId] = Object.assign({}, row, {id: rowId, selected: false}); - }); + const rows = Object.entries(question.rows).reduce(reduceOptionFieldToArrayOfOptionObj, []); + rows.map(row => { + rowIds.push(row.id); + newRows[row.id] = Object.assign({}, row, {selected: false}); + }); if (isPropertyValueTrue(question.randomize)) shuffle(rowIds); if (isPropertyValueTrue(question.rotate)) rotate(rowIds); return Object.assign({}, question, newRows, {rowIds}); } - function augmentMatrixQuestions(question){ - const rowKVs = Object.entries(question.rows); - const colKVs = Object.entries(question.cols); + function augmentMatrixQuestions(question) { + const rows = Object.entries(question.rows).reduce(reduceOptionFieldToArrayOfOptionObj, []); + const cols = Object.entries(question.cols).reduce(reduceOptionFieldToArrayOfOptionObj, []); const newRows = {}; //we collects all row ids into this array so that it is easier to loop over row ids later, and whenever we render the rows, we will //use the orders in this array. const rowIds = []; - rowKVs.forEach(rowKV => { - const [rowId, row] = rowKV; - rowIds.push(rowId); - const newRow = Object.assign({}, row, {id: rowId}); - colKVs.forEach(colKV => { - const [colId, col] = colKV; - newRow[colId] = Object.assign({}, col, {id: colId, selected: false}); + rows.forEach(row => { + rowIds.push(row.id); + const newRow = Object.assign({}, row); + cols.forEach(col => { + newRow[col.id] = Object.assign({}, col, {selected: false}); }); - newRows[rowId] = newRow; + newRows[row.id] = newRow; }); if (isPropertyValueTrue(question.randomize)) shuffle(rowIds); @@ -87,20 +132,13 @@ function augmentRows(question) { //same for colIds, like rowIds const colIds = []; - colKVs.forEach(colKV => { - const [colId] = colKV; - colIds.push(colId); + cols.forEach(col => { + colIds.push(col.id); }); - if(isPropertyValueTrue(question.randomizeCol)) shuffle(colIds); - if(isPropertyValueTrue(question.rotateCol)) rotate(colIds); + if (isPropertyValueTrue(question.randomizeCol)) shuffle(colIds); + if (isPropertyValueTrue(question.rotateCol)) rotate(colIds); return Object.assign({}, question, newRows, {rowIds}, {colIds}); } } - -// function directAccessToRows(question) { -// return Object.assign({}, question, question.rows); -// } - -