hyper-console 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cc3b35947e7cb823ec038e5004bdb539ccba6bc8
4
- data.tar.gz: 078b40ab96b5073623dd789676d0a356e744c2a0
3
+ metadata.gz: 6b7e14468087ce59afcaf9cdc072aa16fddf72ed
4
+ data.tar.gz: 33c1e0d1698aafd57567e8a3a78e8024815179bd
5
5
  SHA512:
6
- metadata.gz: 51a0a37d22bff85d69717ca8d0d1f4cb7298754215baa4466771268133df5fe5abd136cf036468bfcc3b3dabd9691f0113dcb69d43ef3cfb89145f849ab0b0a2
7
- data.tar.gz: 64b4cb289914b5953f32bbc9895294e2786c1cf0147992a67212bd62907fff0da2f2bc70ce3b9eba312e0081ed0b6ed7322399a4812d34c36245cc6f4cf27cda
6
+ metadata.gz: 6bd4929b548ac43217422ff403aeb22f28214a91c53068465ce26645e9f47e646c8933b0367dee6d8a6cb1acbace1091e845d534492849941107a4696f9ed75a
7
+ data.tar.gz: 23c0b145926ef76fcf6855fee09fc2c0c50cbfe0a093f9d234d67f0613658523baed4bc0c3c6f3228ab3188b57ea408e28864eadc2583386e7c99cad703a68d2
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- hyper-console (0.1.1)
4
+ hyper-console (0.1.2)
5
5
  hyper-operation
6
6
  hyper-store (>= 0.2.3)
7
7
 
@@ -48011,47 +48011,79 @@ if (ch == null) ch = nil;
48011
48011
 
48012
48012
  /* Generated by Opal 0.10.3 */
48013
48013
  Opal.modules["hyperloop/console/evaluate"] = function(Opal) {
48014
- var self = Opal.top, $scope = Opal, nil = Opal.nil, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $hash2 = Opal.hash2;
48014
+ var self = Opal.top, $scope = Opal, nil = Opal.nil, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $hash2 = Opal.hash2;
48015
48015
 
48016
48016
  Opal.add_stubs(['$param', '$dispatch_to']);
48017
- (function($base, $super) {
48018
- function $Evaluate(){};
48019
- var self = $Evaluate = $klass($base, $super, 'Evaluate', $Evaluate);
48017
+ return (function($base) {
48018
+ var $Hyperloop, self = $Hyperloop = $module($base, 'Hyperloop');
48020
48019
 
48021
- var def = self.$$proto, $scope = self.$$scope, $a, $b, TMP_1;
48020
+ var def = self.$$proto, $scope = self.$$scope;
48022
48021
 
48023
- self.$param($hash2(["acting_user", "nils"], {"acting_user": nil, "nils": true}));
48022
+ (function($base) {
48023
+ var $Console, self = $Console = $module($base, 'Console');
48024
48024
 
48025
- self.$param("target_id");
48025
+ var def = self.$$proto, $scope = self.$$scope;
48026
48026
 
48027
- self.$param("sender_id");
48027
+ (function($base, $super) {
48028
+ function $Evaluate(){};
48029
+ var self = $Evaluate = $klass($base, $super, 'Evaluate', $Evaluate);
48028
48030
 
48029
- self.$param("context");
48031
+ var def = self.$$proto, $scope = self.$$scope, $a, $b, TMP_1;
48030
48032
 
48031
- self.$param($hash2(["string"], {"string": nil}));
48033
+ self.$param($hash2(["acting_user", "nils"], {"acting_user": nil, "nils": true}));
48032
48034
 
48033
- return ($a = ($b = self).$dispatch_to, $a.$$p = (TMP_1 = function(){var self = TMP_1.$$s || this;
48035
+ self.$param("target_id");
48034
48036
 
48035
- return (($scope.get('Hyperloop')).$$scope.get('Application'))}, TMP_1.$$s = self, TMP_1.$$arity = 0, TMP_1), $a).call($b);
48036
- })($scope.base, (($scope.get('Hyperloop')).$$scope.get('ServerOp')));
48037
- return (function($base, $super) {
48038
- function $Response(){};
48039
- var self = $Response = $klass($base, $super, 'Response', $Response);
48037
+ self.$param("sender_id");
48040
48038
 
48041
- var def = self.$$proto, $scope = self.$$scope, $a, $b, TMP_2;
48039
+ self.$param("context");
48042
48040
 
48043
- self.$param($hash2(["acting_user", "nils"], {"acting_user": nil, "nils": true}));
48041
+ self.$param($hash2(["string"], {"string": nil}));
48044
48042
 
48045
- self.$param("target_id");
48043
+ return ($a = ($b = self).$dispatch_to, $a.$$p = (TMP_1 = function(){var self = TMP_1.$$s || this;
48046
48044
 
48047
- self.$param("kind");
48045
+ return (($scope.get('Hyperloop')).$$scope.get('Application'))}, TMP_1.$$s = self, TMP_1.$$arity = 0, TMP_1), $a).call($b);
48046
+ })($scope.base, (($scope.get('Hyperloop')).$$scope.get('ServerOp')));
48048
48047
 
48049
- self.$param("message");
48048
+ (function($base, $super) {
48049
+ function $Response(){};
48050
+ var self = $Response = $klass($base, $super, 'Response', $Response);
48051
+
48052
+ var def = self.$$proto, $scope = self.$$scope, $a, $b, TMP_2;
48053
+
48054
+ self.$param($hash2(["acting_user", "nils"], {"acting_user": nil, "nils": true}));
48055
+
48056
+ self.$param("target_id");
48057
+
48058
+ self.$param("kind");
48050
48059
 
48051
- return ($a = ($b = self).$dispatch_to, $a.$$p = (TMP_2 = function(){var self = TMP_2.$$s || this;
48060
+ self.$param("message");
48052
48061
 
48053
- return (($scope.get('Hyperloop')).$$scope.get('Application'))}, TMP_2.$$s = self, TMP_2.$$arity = 0, TMP_2), $a).call($b);
48054
- })($scope.base, (($scope.get('Hyperloop')).$$scope.get('ServerOp')));
48062
+ return ($a = ($b = self).$dispatch_to, $a.$$p = (TMP_2 = function(){var self = TMP_2.$$s || this;
48063
+
48064
+ return (($scope.get('Hyperloop')).$$scope.get('Application'))}, TMP_2.$$s = self, TMP_2.$$arity = 0, TMP_2), $a).call($b);
48065
+ })($scope.base, (($scope.get('Hyperloop')).$$scope.get('ServerOp')));
48066
+ })($scope.base)
48067
+ })($scope.base)
48068
+ };
48069
+
48070
+ /* Generated by Opal 0.10.3 */
48071
+ Opal.modules["hyperloop/console/version"] = function(Opal) {
48072
+ var self = Opal.top, $scope = Opal, nil = Opal.nil, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module;
48073
+
48074
+ return (function($base) {
48075
+ var $Hyperloop, self = $Hyperloop = $module($base, 'Hyperloop');
48076
+
48077
+ var def = self.$$proto, $scope = self.$$scope;
48078
+
48079
+ (function($base) {
48080
+ var $Console, self = $Console = $module($base, 'Console');
48081
+
48082
+ var def = self.$$proto, $scope = self.$$scope;
48083
+
48084
+ Opal.cdecl($scope, 'VERSION', "0.1.2")
48085
+ })($scope.base)
48086
+ })($scope.base)
48055
48087
  };
48056
48088
 
48057
48089
  // CodeMirror, copyright (c) by Marijn Haverbeke and others
@@ -89725,340 +89757,356 @@ Opal.modules["hyperloop/console/client_components"] = function(Opal) {
89725
89757
  function $rb_lt(lhs, rhs) {
89726
89758
  return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs < rhs : lhs['$<'](rhs);
89727
89759
  }
89728
- var $a, $b, TMP_40, self = Opal.top, $scope = Opal, nil = Opal.nil, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $hash2 = Opal.hash2, $range = Opal.range, $hash = Opal.hash;
89760
+ var self = Opal.top, $scope = Opal, nil = Opal.nil, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $hash2 = Opal.hash2, $range = Opal.range, $hash = Opal.hash;
89729
89761
 
89730
89762
  Opal.add_stubs(['$param', '$state', '$attr_accessor', '$tap', '$uuid', '$error_message', '$mutate', '$=~', '$evaluate', '$[]', '$<<', '$history', '$console_state', '$run', '$application_window_id', '$console_id', '$context', '$after_mount', '$application_window_id=', '$params', '$context=', '$parse', '$title', '$on_dispatch', '$==', '$target_id', '$kind', '$message', '$to_json', '$after_update', '$render', '$on', '$set_focus', '$prevent_default', '$DIV', '$each', '$CodeHistoryItem', '$first', '$last', '$CodeEditor', '$attr_reader', '$dom_node', '$to_s', '$!', '$item_type', '$===', '$value', '$format_lines', '$gsub', '$split', '$join', '$+', '$shift', '$collect', '$include?', '$length', '$-', '$count', '$before_mount', '$format', '$mark_response_lines', '$stop_propagation', '$editor', '$set_focus_at_end', '$compact', '$lambda', '$on_change', '$on_key_down', '$editor=', '$class', '$before_unmount', '$[]=', '$after', '$>', '$move_history', '$<', '$parse_error', '$to_n', '$clear_error', '$empty?', '$compile', '$ready!', '$mark_error', '$ready?', '$DebugConsole', '$attr']);
89731
- (function($base, $super) {
89732
- function $DebugConsole(){};
89733
- var self = $DebugConsole = $klass($base, $super, 'DebugConsole', $DebugConsole);
89763
+ return (function($base) {
89764
+ var $Hyperloop, self = $Hyperloop = $module($base, 'Hyperloop');
89765
+
89766
+ var def = self.$$proto, $scope = self.$$scope;
89767
+
89768
+ (function($base) {
89769
+ var $Console, self = $Console = $module($base, 'Console');
89734
89770
 
89735
- var def = self.$$proto, $scope = self.$$scope, $a, $b, TMP_5, $c, TMP_7, $d, TMP_8;
89771
+ var def = self.$$proto, $scope = self.$$scope, $a, $b, TMP_40;
89736
89772
 
89737
- self.$param("application_window_id");
89773
+ (function($base, $super) {
89774
+ function $DebugConsole(){};
89775
+ var self = $DebugConsole = $klass($base, $super, 'DebugConsole', $DebugConsole);
89738
89776
 
89739
- self.$param("context");
89777
+ var def = self.$$proto, $scope = self.$$scope, $a, $b, TMP_5, $c, TMP_7, $d, TMP_8;
89740
89778
 
89741
- self.$param("title");
89779
+ self.$param("application_window_id");
89742
89780
 
89743
- self.$state($hash2(["history", "scope"], {"history": [], "scope": "shared"}));
89781
+ self.$param("context");
89744
89782
 
89745
- self.$state($hash2(["console_state", "scope"], {"console_state": "waiting_for_code", "scope": "shared"}));
89783
+ self.$param("title");
89746
89784
 
89747
- (function(self) {
89748
- var $scope = self.$$scope, def = self.$$proto, TMP_2, TMP_3, TMP_4;
89785
+ self.$state($hash2(["history", "scope"], {"history": [], "scope": "shared"}));
89749
89786
 
89750
- self.$attr_accessor("application_window_id");
89751
- self.$attr_accessor("context");
89752
- Opal.defn(self, '$console_id', TMP_2 = function $$console_id() {
89753
- var $a, $b, $c, $d, TMP_1, self = this;
89754
- if (self.console_id == null) self.console_id = nil;
89787
+ self.$state($hash2(["console_state", "scope"], {"console_state": "waiting_for_code", "scope": "shared"}));
89788
+
89789
+ (function(self) {
89790
+ var $scope = self.$$scope, def = self.$$proto, TMP_2, TMP_3, TMP_4;
89755
89791
 
89756
- return ((($a = self.console_id) !== false && $a !== nil && $a != null) ? $a : self.console_id = (((($b = sessionStorage.getItem('Hyperloop::Console::ConsoleId')) !== false && $b !== nil && $b != null) ? $b : ($c = ($d = $scope.get('SecureRandom').$uuid()).$tap, $c.$$p = (TMP_1 = function(id){var self = TMP_1.$$s || this;
89792
+ self.$attr_accessor("application_window_id");
89793
+ self.$attr_accessor("context");
89794
+ Opal.defn(self, '$console_id', TMP_2 = function $$console_id() {
89795
+ var $a, $b, $c, $d, TMP_1, self = this;
89796
+ if (self.console_id == null) self.console_id = nil;
89797
+
89798
+ return ((($a = self.console_id) !== false && $a !== nil && $a != null) ? $a : self.console_id = (((($b = sessionStorage.getItem('Hyperloop::Console::ConsoleId')) !== false && $b !== nil && $b != null) ? $b : ($c = ($d = $scope.get('SecureRandom').$uuid()).$tap, $c.$$p = (TMP_1 = function(id){var self = TMP_1.$$s || this;
89757
89799
  if (id == null) id = nil;
89758
- return sessionStorage.setItem('Hyperloop::Console::ConsoleId', id);}, TMP_1.$$s = self, TMP_1.$$arity = 1, TMP_1), $c).call($d))));
89759
- }, TMP_2.$$arity = 0);
89760
- Opal.defn(self, '$ready!', TMP_3 = function(code, compiled_code) {
89761
- var $a, self = this;
89762
- if (self.code_to_send == null) self.code_to_send = nil;
89800
+ return sessionStorage.setItem('Hyperloop::Console::ConsoleId', id);}, TMP_1.$$s = self, TMP_1.$$arity = 1, TMP_1), $c).call($d))));
89801
+ }, TMP_2.$$arity = 0);
89802
+ Opal.defn(self, '$ready!', TMP_3 = function(code, compiled_code) {
89803
+ var $a, self = this;
89804
+ if (self.code_to_send == null) self.code_to_send = nil;
89763
89805
 
89764
- self.code_to_send = code;
89765
- self.$mutate().$error_message(nil);
89766
- if ((($a = self.code_to_send['$=~'](/.\n$/)) !== nil && $a != null && (!$a.$$is_boolean || $a == true))) {
89767
- return self.$evaluate(compiled_code)
89768
- } else {
89769
- return nil
89770
- };
89771
- }, TMP_3.$$arity = 2);
89772
- return (Opal.defn(self, '$evaluate', TMP_4 = function $$evaluate(compiled_code) {
89773
- var self = this;
89774
- if (self.code_to_send == null) self.code_to_send = nil;
89806
+ self.code_to_send = code;
89807
+ self.$mutate().$error_message(nil);
89808
+ if ((($a = self.code_to_send['$=~'](/.\n$/)) !== nil && $a != null && (!$a.$$is_boolean || $a == true))) {
89809
+ return self.$evaluate(compiled_code)
89810
+ } else {
89811
+ return nil
89812
+ };
89813
+ }, TMP_3.$$arity = 2);
89814
+ return (Opal.defn(self, '$evaluate', TMP_4 = function $$evaluate(compiled_code) {
89815
+ var self = this;
89816
+ if (self.code_to_send == null) self.code_to_send = nil;
89775
89817
 
89776
- self.code_to_send = self.code_to_send['$[]']($range(0, -2, false));
89777
- self.$mutate().$history()['$<<']($hash2(["eval"], {"eval": self.code_to_send}));
89778
- self.$mutate().$console_state("sending");
89779
- return $scope.get('Evaluate').$run($hash2(["target_id", "sender_id", "context", "string"], {"target_id": self.$application_window_id(), "sender_id": self.$console_id(), "context": self.$context(), "string": compiled_code}));
89780
- }, TMP_4.$$arity = 1), nil) && 'evaluate';
89781
- })(Opal.get_singleton_class(self));
89818
+ self.code_to_send = self.code_to_send['$[]']($range(0, -2, false));
89819
+ self.$mutate().$history()['$<<']($hash2(["eval"], {"eval": self.code_to_send}));
89820
+ self.$mutate().$console_state("sending");
89821
+ return $scope.get('Evaluate').$run($hash2(["target_id", "sender_id", "context", "string"], {"target_id": self.$application_window_id(), "sender_id": self.$console_id(), "context": self.$context(), "string": compiled_code}));
89822
+ }, TMP_4.$$arity = 1), nil) && 'evaluate';
89823
+ })(Opal.get_singleton_class(self));
89782
89824
 
89783
- ($a = ($b = self).$after_mount, $a.$$p = (TMP_5 = function(){var self = TMP_5.$$s || this, $c, $d, TMP_6;
89825
+ ($a = ($b = self).$after_mount, $a.$$p = (TMP_5 = function(){var self = TMP_5.$$s || this, $c, $d, TMP_6;
89784
89826
 
89785
- (($c = [self.$params().$application_window_id()]), $d = $scope.get('DebugConsole'), $d['$application_window_id='].apply($d, $c), $c[$c.length-1]);
89786
- (($c = [self.$params().$context()]), $d = $scope.get('DebugConsole'), $d['$context='].apply($d, $c), $c[$c.length-1]);
89787
- self.$mutate().$history($scope.get('JSON').$parse(((($c = sessionStorage.getItem('Hyperloop::Console.history')) !== false && $c !== nil && $c != null) ? $c : "[]")));
89788
- document.title = self.$params().$title();
89789
- window.scrollTo(window.scrollX, 99999);
89790
- return ($c = ($d = $scope.get('Response')).$on_dispatch, $c.$$p = (TMP_6 = function(p){var self = TMP_6.$$s || this;
89827
+ (($c = [self.$params().$application_window_id()]), $d = $scope.get('DebugConsole'), $d['$application_window_id='].apply($d, $c), $c[$c.length-1]);
89828
+ (($c = [self.$params().$context()]), $d = $scope.get('DebugConsole'), $d['$context='].apply($d, $c), $c[$c.length-1]);
89829
+ self.$mutate().$history($scope.get('JSON').$parse(((($c = sessionStorage.getItem('Hyperloop::Console.history')) !== false && $c !== nil && $c != null) ? $c : "[]")));
89830
+ document.title = self.$params().$title();
89831
+ window.scrollTo(window.scrollX, 99999);
89832
+ return ($c = ($d = $scope.get('Response')).$on_dispatch, $c.$$p = (TMP_6 = function(p){var self = TMP_6.$$s || this;
89791
89833
  if (p == null) p = nil;
89792
- if (p.$target_id()['$==']($scope.get('DebugConsole').$console_id())) {
89793
- } else {
89794
- return nil;
89795
- };
89796
- self.$mutate().$console_state("waiting_for_code");
89797
- self.$mutate().$history()['$<<']($hash(p.$kind(), p.$message()));
89798
- return sessionStorage.setItem('Hyperloop::Console.history', self.$state().$history().$to_json());}, TMP_6.$$s = self, TMP_6.$$arity = 1, TMP_6), $c).call($d);}, TMP_5.$$s = self, TMP_5.$$arity = 0, TMP_5), $a).call($b);
89834
+ if (p.$target_id()['$==']($scope.get('DebugConsole').$console_id())) {
89835
+ } else {
89836
+ return nil;
89837
+ };
89838
+ self.$mutate().$console_state("waiting_for_code");
89839
+ self.$mutate().$history()['$<<']($hash(p.$kind(), p.$message()));
89840
+ return sessionStorage.setItem('Hyperloop::Console.history', self.$state().$history().$to_json());}, TMP_6.$$s = self, TMP_6.$$arity = 1, TMP_6), $c).call($d);}, TMP_5.$$s = self, TMP_5.$$arity = 0, TMP_5), $a).call($b);
89799
89841
 
89800
- ($a = ($c = self).$after_update, $a.$$p = (TMP_7 = function(){var self = TMP_7.$$s || this;
89842
+ ($a = ($c = self).$after_update, $a.$$p = (TMP_7 = function(){var self = TMP_7.$$s || this;
89801
89843
 
89802
- return window.scrollTo(window.scrollX, 99999);}, TMP_7.$$s = self, TMP_7.$$arity = 0, TMP_7), $a).call($c);
89844
+ return window.scrollTo(window.scrollX, 99999);}, TMP_7.$$s = self, TMP_7.$$arity = 0, TMP_7), $a).call($c);
89803
89845
 
89804
- return ($a = ($d = self).$render, $a.$$p = (TMP_8 = function(){var self = TMP_8.$$s || this, $e, $f, TMP_9, $g, $h, TMP_10;
89846
+ return ($a = ($d = self).$render, $a.$$p = (TMP_8 = function(){var self = TMP_8.$$s || this, $e, $f, TMP_9, $g, $h, TMP_10;
89805
89847
 
89806
- return ($e = ($f = ($g = ($h = self).$DIV, $g.$$p = (TMP_10 = function(){var self = TMP_10.$$s || this, $i, $j, TMP_11;
89848
+ return ($e = ($f = ($g = ($h = self).$DIV, $g.$$p = (TMP_10 = function(){var self = TMP_10.$$s || this, $i, $j, TMP_11;
89807
89849
 
89808
- ($i = ($j = self.$state().$history()).$each, $i.$$p = (TMP_11 = function(item){var self = TMP_11.$$s || this, $k;
89850
+ ($i = ($j = self.$state().$history()).$each, $i.$$p = (TMP_11 = function(item){var self = TMP_11.$$s || this, $k;
89809
89851
  if (item == null) item = nil;
89810
- return self.$CodeHistoryItem($hash2(["item_type", "value"], {"item_type": item.$first().$first(), "value": ((($k = item.$first().$last()) !== false && $k !== nil && $k != null) ? $k : "")}))}, TMP_11.$$s = self, TMP_11.$$arity = 1, TMP_11), $i).call($j);
89811
- if (self.$state().$console_state()['$==']("sending")) {
89812
- return nil
89813
- } else {
89814
- return self.$CodeEditor($hash2(["history", "context"], {"history": self.$state().$history(), "context": self.$params().$context()}))
89815
- };}, TMP_10.$$s = self, TMP_10.$$arity = 0, TMP_10), $g).call($h, $hash2(["class"], {"class": "card"}))).$on, $e.$$p = (TMP_9 = function(e){var self = TMP_9.$$s || this;
89852
+ return self.$CodeHistoryItem($hash2(["item_type", "value"], {"item_type": item.$first().$first(), "value": ((($k = item.$first().$last()) !== false && $k !== nil && $k != null) ? $k : "")}))}, TMP_11.$$s = self, TMP_11.$$arity = 1, TMP_11), $i).call($j);
89853
+ if (self.$state().$console_state()['$==']("sending")) {
89854
+ return nil
89855
+ } else {
89856
+ return self.$CodeEditor($hash2(["history", "context"], {"history": self.$state().$history(), "context": self.$params().$context()}))
89857
+ };}, TMP_10.$$s = self, TMP_10.$$arity = 0, TMP_10), $g).call($h, $hash2(["class"], {"class": "card"}))).$on, $e.$$p = (TMP_9 = function(e){var self = TMP_9.$$s || this;
89816
89858
  if (e == null) e = nil;
89817
- $scope.get('CodeEditor').$set_focus();
89818
- return e.$prevent_default();}, TMP_9.$$s = self, TMP_9.$$arity = 1, TMP_9), $e).call($f, "mouse_down")}, TMP_8.$$s = self, TMP_8.$$arity = 0, TMP_8), $a).call($d, $scope.get('DIV'), $hash2(["style"], {"style": $hash2(["height"], {"height": "100vh"})}));
89819
- })($scope.base, (($scope.get('Hyperloop')).$$scope.get('Component')));
89820
- (function($base, $super) {
89821
- function $CodeMirror(){};
89822
- var self = $CodeMirror = $klass($base, $super, 'CodeMirror', $CodeMirror);
89859
+ $scope.get('CodeEditor').$set_focus();
89860
+ return e.$prevent_default();}, TMP_9.$$s = self, TMP_9.$$arity = 1, TMP_9), $e).call($f, "mouse_down")}, TMP_8.$$s = self, TMP_8.$$arity = 0, TMP_8), $a).call($d, $scope.get('DIV'), $hash2(["style"], {"style": $hash2(["height"], {"height": "100vh"})}));
89861
+ })($scope.base, (($scope.get('Hyperloop')).$$scope.get('Component')));
89823
89862
 
89824
- var def = self.$$proto, $scope = self.$$scope, $a, $b, TMP_12;
89863
+ (function($base, $super) {
89864
+ function $CodeMirror(){};
89865
+ var self = $CodeMirror = $klass($base, $super, 'CodeMirror', $CodeMirror);
89825
89866
 
89826
- self.$attr_reader("editor");
89867
+ var def = self.$$proto, $scope = self.$$scope, $a, $b, TMP_12;
89827
89868
 
89828
- ($a = ($b = self).$after_mount, $a.$$p = (TMP_12 = function(){var self = TMP_12.$$s || this;
89829
- if (self.code == null) self.code = nil;
89830
- if (self.read_only == null) self.read_only = nil;
89869
+ self.$attr_reader("editor");
89831
89870
 
89832
- return self.editor = CodeMirror(self.$dom_node(), {
89833
- value: self.code.$to_s(),
89834
- mode: 'text/x-ruby',
89835
- matchBrackets: true,
89836
- lineNumbers: false,
89837
- indentUnit: 2,
89838
- theme: 'github',
89839
- readOnly: self.read_only['$!']()['$!']()
89840
- });}, TMP_12.$$s = self, TMP_12.$$arity = 0, TMP_12), $a).call($b);
89871
+ ($a = ($b = self).$after_mount, $a.$$p = (TMP_12 = function(){var self = TMP_12.$$s || this;
89872
+ if (self.code == null) self.code = nil;
89873
+ if (self.read_only == null) self.read_only = nil;
89841
89874
 
89842
- return self.$render($scope.get('DIV'));
89843
- })($scope.base, (($scope.get('Hyperloop')).$$scope.get('Component')));
89844
- (function($base, $super) {
89845
- function $CodeHistoryItem(){};
89846
- var self = $CodeHistoryItem = $klass($base, $super, 'CodeHistoryItem', $CodeHistoryItem);
89875
+ return self.editor = CodeMirror(self.$dom_node(), {
89876
+ value: self.code.$to_s(),
89877
+ mode: 'text/x-ruby',
89878
+ matchBrackets: true,
89879
+ lineNumbers: false,
89880
+ indentUnit: 2,
89881
+ theme: 'github',
89882
+ readOnly: self.read_only['$!']()['$!']()
89883
+ });}, TMP_12.$$s = self, TMP_12.$$arity = 0, TMP_12), $a).call($b);
89847
89884
 
89848
- var def = self.$$proto, $scope = self.$$scope, TMP_13, TMP_15, TMP_16, $a, $b, TMP_17, $c, TMP_18, $d, TMP_19;
89885
+ return self.$render($scope.get('DIV'));
89886
+ })($scope.base, (($scope.get('Hyperloop')).$$scope.get('Component')));
89849
89887
 
89850
- def.editor = nil;
89851
- self.$param("item_type");
89888
+ (function($base, $super) {
89889
+ function $CodeHistoryItem(){};
89890
+ var self = $CodeHistoryItem = $klass($base, $super, 'CodeHistoryItem', $CodeHistoryItem);
89852
89891
 
89853
- self.$param("value");
89892
+ var def = self.$$proto, $scope = self.$$scope, TMP_13, TMP_15, TMP_16, $a, $b, TMP_17, $c, TMP_18, $d, TMP_19;
89854
89893
 
89855
- Opal.defn(self, '$format', TMP_13 = function $$format() {
89856
- var self = this, $case = nil;
89894
+ def.editor = nil;
89895
+ self.$param("item_type");
89857
89896
 
89858
- return (function() {$case = self.$params().$item_type();if ("eval"['$===']($case)) {return self.$params().$value()}else if ("exception"['$===']($case)) {return self.$format_lines("!!", self.$params().$value())}else if ("result"['$===']($case)) {return self.$format_lines(">>", self.$params().$value())}else {return self.$format_lines("" + (self.$params().$item_type()) + ":", self.$params().$value())}})();
89859
- }, TMP_13.$$arity = 0);
89897
+ self.$param("value");
89860
89898
 
89861
- Opal.defn(self, '$format_lines', TMP_15 = function $$format_lines(prefix, value) {
89862
- var $a, $b, TMP_14, self = this, fill = nil, lines = nil;
89899
+ Opal.defn(self, '$format', TMP_13 = function $$format() {
89900
+ var self = this, $case = nil;
89901
+
89902
+ return (function() {$case = self.$params().$item_type();if ("eval"['$===']($case)) {return self.$params().$value()}else if ("exception"['$===']($case)) {return self.$format_lines("!!", self.$params().$value())}else if ("result"['$===']($case)) {return self.$format_lines(">>", self.$params().$value())}else {return self.$format_lines("" + (self.$params().$item_type()) + ":", self.$params().$value())}})();
89903
+ }, TMP_13.$$arity = 0);
89863
89904
 
89864
- fill = prefix.$gsub(/./, " ");
89865
- lines = value.$split("\n");
89866
- return ($rb_plus(["" + (prefix) + " " + (lines.$shift())], ($a = ($b = lines).$collect, $a.$$p = (TMP_14 = function(line){var self = TMP_14.$$s || this;
89905
+ Opal.defn(self, '$format_lines', TMP_15 = function $$format_lines(prefix, value) {
89906
+ var $a, $b, TMP_14, self = this, fill = nil, lines = nil;
89907
+
89908
+ fill = prefix.$gsub(/./, " ");
89909
+ lines = value.$split("\n");
89910
+ return ($rb_plus(["" + (prefix) + " " + (lines.$shift())], ($a = ($b = lines).$collect, $a.$$p = (TMP_14 = function(line){var self = TMP_14.$$s || this;
89867
89911
  if (line == null) line = nil;
89868
- return "" + (fill) + " " + (line)}, TMP_14.$$s = self, TMP_14.$$arity = 1, TMP_14), $a).call($b))).$join("\n");
89869
- }, TMP_15.$$arity = 2);
89912
+ return "" + (fill) + " " + (line)}, TMP_14.$$s = self, TMP_14.$$arity = 1, TMP_14), $a).call($b))).$join("\n");
89913
+ }, TMP_15.$$arity = 2);
89870
89914
 
89871
- Opal.defn(self, '$mark_response_lines', TMP_16 = function $$mark_response_lines() {
89872
- var $a, self = this, lines = nil, padding = nil, last_line = nil;
89915
+ Opal.defn(self, '$mark_response_lines', TMP_16 = function $$mark_response_lines() {
89916
+ var $a, self = this, lines = nil, padding = nil, last_line = nil;
89873
89917
 
89874
- if (self.$params().$item_type()['$==']("eval")) {
89875
- return nil};
89876
- lines = self.$params().$value().$split("\n");
89877
- padding = (function() {if ((($a = ["exception", "result"]['$include?'](self.$params().$item_type())) !== nil && $a != null && (!$a.$$is_boolean || $a == true))) {
89878
- return 3
89879
- } else {
89880
- return $rb_plus(2, self.$params().$item_type().$to_s().$length())
89881
- }; return nil; })();
89882
- last_line = ((($a = lines['$[]'](-1)) !== false && $a !== nil && $a != null) ? $a : "");
89883
- return self.editor.markText({line: 0, ch: 0}, {line: $rb_minus(lines.$count(), 1), ch: $rb_plus(last_line.$length(), padding)}, {className: 'response-line'});
89884
- }, TMP_16.$$arity = 0);
89918
+ if (self.$params().$item_type()['$==']("eval")) {
89919
+ return nil};
89920
+ lines = self.$params().$value().$split("\n");
89921
+ padding = (function() {if ((($a = ["exception", "result"]['$include?'](self.$params().$item_type())) !== nil && $a != null && (!$a.$$is_boolean || $a == true))) {
89922
+ return 3
89923
+ } else {
89924
+ return $rb_plus(2, self.$params().$item_type().$to_s().$length())
89925
+ }; return nil; })();
89926
+ last_line = ((($a = lines['$[]'](-1)) !== false && $a !== nil && $a != null) ? $a : "");
89927
+ return self.editor.markText({line: 0, ch: 0}, {line: $rb_minus(lines.$count(), 1), ch: $rb_plus(last_line.$length(), padding)}, {className: 'response-line'});
89928
+ }, TMP_16.$$arity = 0);
89885
89929
 
89886
- ($a = ($b = self).$before_mount, $a.$$p = (TMP_17 = function(){var self = TMP_17.$$s || this;
89930
+ ($a = ($b = self).$before_mount, $a.$$p = (TMP_17 = function(){var self = TMP_17.$$s || this;
89887
89931
 
89888
- self.code = self.$format();
89889
- return self.read_only = true;}, TMP_17.$$s = self, TMP_17.$$arity = 0, TMP_17), $a).call($b);
89932
+ self.code = self.$format();
89933
+ return self.read_only = true;}, TMP_17.$$s = self, TMP_17.$$arity = 0, TMP_17), $a).call($b);
89890
89934
 
89891
- ($a = ($c = self).$after_mount, $a.$$p = (TMP_18 = function(){var self = TMP_18.$$s || this;
89935
+ ($a = ($c = self).$after_mount, $a.$$p = (TMP_18 = function(){var self = TMP_18.$$s || this;
89892
89936
 
89893
- return self.$mark_response_lines()}, TMP_18.$$s = self, TMP_18.$$arity = 0, TMP_18), $a).call($c);
89937
+ return self.$mark_response_lines()}, TMP_18.$$s = self, TMP_18.$$arity = 0, TMP_18), $a).call($c);
89894
89938
 
89895
- return ($a = ($d = self).$render, $a.$$p = (TMP_19 = function(){var self = TMP_19.$$s || this, $e, $f, TMP_20, $g, $h, TMP_21;
89939
+ return ($a = ($d = self).$render, $a.$$p = (TMP_19 = function(){var self = TMP_19.$$s || this, $e, $f, TMP_20, $g, $h, TMP_21;
89896
89940
 
89897
- return ($e = ($f = ($g = ($h = self).$DIV, $g.$$p = (TMP_21 = function(){var self = TMP_21.$$s || this;
89941
+ return ($e = ($f = ($g = ($h = self).$DIV, $g.$$p = (TMP_21 = function(){var self = TMP_21.$$s || this;
89898
89942
 
89899
- return nil}, TMP_21.$$s = self, TMP_21.$$arity = 0, TMP_21), $g).call($h)).$on, $e.$$p = (TMP_20 = function(e){var self = TMP_20.$$s || this;
89943
+ return nil}, TMP_21.$$s = self, TMP_21.$$arity = 0, TMP_21), $g).call($h)).$on, $e.$$p = (TMP_20 = function(e){var self = TMP_20.$$s || this;
89900
89944
  if (e == null) e = nil;
89901
- return e.$stop_propagation()}, TMP_20.$$s = self, TMP_20.$$arity = 1, TMP_20), $e).call($f, "mouse_down")}, TMP_19.$$s = self, TMP_19.$$arity = 0, TMP_19), $a).call($d);
89902
- })($scope.base, $scope.get('CodeMirror'));
89903
- (function($base, $super) {
89904
- function $CodeEditor(){};
89905
- var self = $CodeEditor = $klass($base, $super, 'CodeEditor', $CodeEditor);
89945
+ return e.$stop_propagation()}, TMP_20.$$s = self, TMP_20.$$arity = 1, TMP_20), $e).call($f, "mouse_down")}, TMP_19.$$s = self, TMP_19.$$arity = 0, TMP_19), $a).call($d);
89946
+ })($scope.base, $scope.get('CodeMirror'));
89906
89947
 
89907
- var def = self.$$proto, $scope = self.$$scope, $a, $b, TMP_23, $c, TMP_25, $d, TMP_28, TMP_30, TMP_31, TMP_32, TMP_33, TMP_34, TMP_35, TMP_36, $e, TMP_37;
89948
+ (function($base, $super) {
89949
+ function $CodeEditor(){};
89950
+ var self = $CodeEditor = $klass($base, $super, 'CodeEditor', $CodeEditor);
89908
89951
 
89909
- def.history = def.history_pos = def.editor = def.error = nil;
89910
- self.$param("history");
89952
+ var def = self.$$proto, $scope = self.$$scope, $a, $b, TMP_23, $c, TMP_25, $d, TMP_28, TMP_30, TMP_31, TMP_32, TMP_33, TMP_34, TMP_35, TMP_36, $e, TMP_37;
89911
89953
 
89912
- self.$param("context");
89954
+ def.history = def.history_pos = def.editor = def.error = nil;
89955
+ self.$param("history");
89913
89956
 
89914
- (function(self) {
89915
- var $scope = self.$$scope, def = self.$$proto, TMP_22;
89957
+ self.$param("context");
89916
89958
 
89917
- self.$attr_accessor("editor");
89918
- return (Opal.defn(self, '$set_focus', TMP_22 = function $$set_focus() {
89919
- var $a, self = this;
89959
+ (function(self) {
89960
+ var $scope = self.$$scope, def = self.$$proto, TMP_22;
89920
89961
 
89921
- if ((($a = self.$editor()) !== nil && $a != null && (!$a.$$is_boolean || $a == true))) {
89922
- return self.$editor().$set_focus_at_end()
89923
- } else {
89924
- return nil
89925
- };
89926
- }, TMP_22.$$arity = 0), nil) && 'set_focus';
89927
- })(Opal.get_singleton_class(self));
89962
+ self.$attr_accessor("editor");
89963
+ return (Opal.defn(self, '$set_focus', TMP_22 = function $$set_focus() {
89964
+ var $a, self = this;
89928
89965
 
89929
- ($a = ($b = self).$before_mount, $a.$$p = (TMP_23 = function(){var self = TMP_23.$$s || this, $c, $d, TMP_24;
89930
- if (self.history == null) self.history = nil;
89966
+ if ((($a = self.$editor()) !== nil && $a != null && (!$a.$$is_boolean || $a == true))) {
89967
+ return self.$editor().$set_focus_at_end()
89968
+ } else {
89969
+ return nil
89970
+ };
89971
+ }, TMP_22.$$arity = 0), nil) && 'set_focus';
89972
+ })(Opal.get_singleton_class(self));
89973
+
89974
+ ($a = ($b = self).$before_mount, $a.$$p = (TMP_23 = function(){var self = TMP_23.$$s || this, $c, $d, TMP_24;
89975
+ if (self.history == null) self.history = nil;
89931
89976
 
89932
- self.history = $rb_plus(($c = ($d = self.$params().$history()).$collect, $c.$$p = (TMP_24 = function(item){var self = TMP_24.$$s || this;
89977
+ self.history = $rb_plus(($c = ($d = self.$params().$history()).$collect, $c.$$p = (TMP_24 = function(item){var self = TMP_24.$$s || this;
89933
89978
  if (item == null) item = nil;
89934
- return item['$[]']("eval")}, TMP_24.$$s = self, TMP_24.$$arity = 1, TMP_24), $c).call($d).$compact(), [""]);
89935
- return self.history_pos = $rb_minus(self.history.$length(), 1);}, TMP_23.$$s = self, TMP_23.$$arity = 0, TMP_23), $a).call($b);
89979
+ return item['$[]']("eval")}, TMP_24.$$s = self, TMP_24.$$arity = 1, TMP_24), $c).call($d).$compact(), [""]);
89980
+ return self.history_pos = $rb_minus(self.history.$length(), 1);}, TMP_23.$$s = self, TMP_23.$$arity = 0, TMP_23), $a).call($b);
89936
89981
 
89937
- ($a = ($c = self).$after_mount, $a.$$p = (TMP_25 = function(){var self = TMP_25.$$s || this, $d, $e, TMP_26, $f, TMP_27, $g;
89938
- if (self.editor == null) self.editor = nil;
89982
+ ($a = ($c = self).$after_mount, $a.$$p = (TMP_25 = function(){var self = TMP_25.$$s || this, $d, $e, TMP_26, $f, TMP_27, $g;
89983
+ if (self.editor == null) self.editor = nil;
89939
89984
 
89940
- self.editor.on('change', ($d = ($e = self).$lambda, $d.$$p = (TMP_26 = function(){var self = TMP_26.$$s || this;
89985
+ self.editor.on('change', ($d = ($e = self).$lambda, $d.$$p = (TMP_26 = function(){var self = TMP_26.$$s || this;
89941
89986
 
89942
- return self.$on_change()}, TMP_26.$$s = self, TMP_26.$$arity = 0, TMP_26), $d).call($e));
89943
- self.editor.on('keydown', ($d = ($f = self).$lambda, $d.$$p = (TMP_27 = function(cm, e){var self = TMP_27.$$s || this;
89987
+ return self.$on_change()}, TMP_26.$$s = self, TMP_26.$$arity = 0, TMP_26), $d).call($e));
89988
+ self.editor.on('keydown', ($d = ($f = self).$lambda, $d.$$p = (TMP_27 = function(cm, e){var self = TMP_27.$$s || this;
89944
89989
  if (cm == null) cm = nil;if (e == null) e = nil;
89945
- return self.$on_key_down(cm, e)}, TMP_27.$$s = self, TMP_27.$$arity = 2, TMP_27), $d).call($f));
89946
- self.editor.focus();
89947
- return (($d = [self]), $g = self.$class(), $g['$editor='].apply($g, $d), $d[$d.length-1]);}, TMP_25.$$s = self, TMP_25.$$arity = 0, TMP_25), $a).call($c);
89990
+ return self.$on_key_down(cm, e)}, TMP_27.$$s = self, TMP_27.$$arity = 2, TMP_27), $d).call($f));
89991
+ self.editor.focus();
89992
+ return (($d = [self]), $g = self.$class(), $g['$editor='].apply($g, $d), $d[$d.length-1]);}, TMP_25.$$s = self, TMP_25.$$arity = 0, TMP_25), $a).call($c);
89948
89993
 
89949
- ($a = ($d = self).$before_unmount, $a.$$p = (TMP_28 = function(){var self = TMP_28.$$s || this, $e, $f;
89994
+ ($a = ($d = self).$before_unmount, $a.$$p = (TMP_28 = function(){var self = TMP_28.$$s || this, $e, $f;
89950
89995
 
89951
- return (($e = [nil]), $f = self.$class(), $f['$editor='].apply($f, $e), $e[$e.length-1])}, TMP_28.$$s = self, TMP_28.$$arity = 0, TMP_28), $a).call($d);
89996
+ return (($e = [nil]), $f = self.$class(), $f['$editor='].apply($f, $e), $e[$e.length-1])}, TMP_28.$$s = self, TMP_28.$$arity = 0, TMP_28), $a).call($d);
89952
89997
 
89953
- Opal.defn(self, '$move_history', TMP_30 = function $$move_history(n) {
89954
- var $a, $b, TMP_29, self = this, text = nil, lines = nil;
89998
+ Opal.defn(self, '$move_history', TMP_30 = function $$move_history(n) {
89999
+ var $a, $b, TMP_29, self = this, text = nil, lines = nil;
89955
90000
 
89956
- self.history['$[]='](self.history_pos, self.editor.getValue());
89957
- self.history_pos = $rb_plus(self.history_pos, n);
89958
- text = self.history['$[]'](self.history_pos);
89959
- lines = text.$split("\n");
89960
- self.editor.setValue(text);
89961
- return ($a = ($b = self).$after, $a.$$p = (TMP_29 = function(){var self = TMP_29.$$s || this, $c;
89962
- if (self.editor == null) self.editor = nil;
90001
+ self.history['$[]='](self.history_pos, self.editor.getValue());
90002
+ self.history_pos = $rb_plus(self.history_pos, n);
90003
+ text = self.history['$[]'](self.history_pos);
90004
+ lines = text.$split("\n");
90005
+ self.editor.setValue(text);
90006
+ return ($a = ($b = self).$after, $a.$$p = (TMP_29 = function(){var self = TMP_29.$$s || this, $c;
90007
+ if (self.editor == null) self.editor = nil;
89963
90008
 
89964
- window.scrollTo(window.scrollX, 99999);
89965
- return self.editor.setCursor({line: lines.$count(), ch: (((($c = lines.$last()) !== false && $c !== nil && $c != null) ? $c : "")).$length()});}, TMP_29.$$s = self, TMP_29.$$arity = 0, TMP_29), $a).call($b, 0);
89966
- }, TMP_30.$$arity = 1);
90009
+ window.scrollTo(window.scrollX, 99999);
90010
+ return self.editor.setCursor({line: lines.$count(), ch: (((($c = lines.$last()) !== false && $c !== nil && $c != null) ? $c : "")).$length()});}, TMP_29.$$s = self, TMP_29.$$arity = 0, TMP_29), $a).call($b, 0);
90011
+ }, TMP_30.$$arity = 1);
89967
90012
 
89968
- Opal.defn(self, '$set_focus_at_end', TMP_31 = function $$set_focus_at_end() {
89969
- var $a, self = this, lines = nil;
90013
+ Opal.defn(self, '$set_focus_at_end', TMP_31 = function $$set_focus_at_end() {
90014
+ var $a, self = this, lines = nil;
89970
90015
 
89971
- self.editor.focus();
89972
- lines = (self.editor.getValue()).$split("\n");
89973
- return self.editor.setCursor({line: lines.$count(), ch: (((($a = lines.$last()) !== false && $a !== nil && $a != null) ? $a : "")).$length()});
89974
- }, TMP_31.$$arity = 0);
90016
+ self.editor.focus();
90017
+ lines = (self.editor.getValue()).$split("\n");
90018
+ return self.editor.setCursor({line: lines.$count(), ch: (((($a = lines.$last()) !== false && $a !== nil && $a != null) ? $a : "")).$length()});
90019
+ }, TMP_31.$$arity = 0);
89975
90020
 
89976
- Opal.defn(self, '$on_key_down', TMP_32 = function $$on_key_down(cm, e) {
89977
- var $a, $b, self = this;
90021
+ Opal.defn(self, '$on_key_down', TMP_32 = function $$on_key_down(cm, e) {
90022
+ var $a, $b, self = this;
89978
90023
 
89979
- if ((($a = ((($b = e.metaKey) !== false && $b !== nil && $b != null) ? $b : e.ctrlKey)) !== nil && $a != null && (!$a.$$is_boolean || $a == true))) {
89980
- if ((e.keyCode)['$=='](13)) {
89981
- } else {
89982
- return nil
89983
- };
89984
- return self.editor.setValue(self.editor.getValue()+"\n");
89985
- } else if ((e.key)['$==']("ArrowUp")) {
89986
- if ((($a = $rb_gt(self.history_pos, 0)) !== nil && $a != null && (!$a.$$is_boolean || $a == true))) {
89987
- return self.$move_history(-1)
89988
- } else {
89989
- return nil
89990
- }
89991
- } else if ((e.key)['$==']("ArrowDown")) {
89992
- if ((($a = $rb_lt(self.history_pos, $rb_minus(self.history.$length(), 1))) !== nil && $a != null && (!$a.$$is_boolean || $a == true))) {
89993
- return self.$move_history(1)
89994
- } else {
89995
- return nil
89996
- }
89997
- } else {
89998
- return nil
89999
- };
90000
- }, TMP_32.$$arity = 2);
90024
+ if ((($a = ((($b = e.metaKey) !== false && $b !== nil && $b != null) ? $b : e.ctrlKey)) !== nil && $a != null && (!$a.$$is_boolean || $a == true))) {
90025
+ if ((e.keyCode)['$=='](13)) {
90026
+ } else {
90027
+ return nil
90028
+ };
90029
+ return self.editor.setValue(self.editor.getValue()+"\n");
90030
+ } else if ((e.key)['$==']("ArrowUp")) {
90031
+ if ((($a = $rb_gt(self.history_pos, 0)) !== nil && $a != null && (!$a.$$is_boolean || $a == true))) {
90032
+ return self.$move_history(-1)
90033
+ } else {
90034
+ return nil
90035
+ }
90036
+ } else if ((e.key)['$==']("ArrowDown")) {
90037
+ if ((($a = $rb_lt(self.history_pos, $rb_minus(self.history.$length(), 1))) !== nil && $a != null && (!$a.$$is_boolean || $a == true))) {
90038
+ return self.$move_history(1)
90039
+ } else {
90040
+ return nil
90041
+ }
90042
+ } else {
90043
+ return nil
90044
+ };
90045
+ }, TMP_32.$$arity = 2);
90001
90046
 
90002
- Opal.defn(self, '$mark_error', TMP_33 = function $$mark_error(message) {
90003
- var $a, $b, self = this, from = nil, to = nil, title = nil;
90047
+ Opal.defn(self, '$mark_error', TMP_33 = function $$mark_error(message) {
90048
+ var $a, $b, self = this, from = nil, to = nil, title = nil;
90004
90049
 
90005
- $b = self.$parse_error(message), $a = Opal.to_ary($b), from = ($a[0] == null ? nil : $a[0]), to = ($a[1] == null ? nil : $a[1]), title = ($a[2] == null ? nil : $a[2]), $b;
90006
- return self.error = self.editor.markText(from.$to_n(), to.$to_n(), {className: 'syntax-error', title: title});
90007
- }, TMP_33.$$arity = 1);
90050
+ $b = self.$parse_error(message), $a = Opal.to_ary($b), from = ($a[0] == null ? nil : $a[0]), to = ($a[1] == null ? nil : $a[1]), title = ($a[2] == null ? nil : $a[2]), $b;
90051
+ return self.error = self.editor.markText(from.$to_n(), to.$to_n(), {className: 'syntax-error', title: title});
90052
+ }, TMP_33.$$arity = 1);
90008
90053
 
90009
- Opal.defn(self, '$parse_error', TMP_34 = function $$parse_error(message) {
90010
- var self = this, position_info = nil, last_line_number = nil, last_line = nil;
90054
+ Opal.defn(self, '$parse_error', TMP_34 = function $$parse_error(message) {
90055
+ var self = this, position_info = nil, last_line_number = nil, last_line = nil;
90011
90056
 
90012
- message = message.$split("\n");
90013
- position_info = message['$[]'](3).$split(":");
90014
- last_line_number = self.editor.lineCount();
90015
- last_line = self.editor.getLine(last_line_number-1);
90016
- return [$hash2(["line", "ch"], {"line": 0, "ch": 0}), $hash2(["line", "ch"], {"line": last_line_number, "ch": last_line.$length()}), message['$[]'](2).$split(":(file)")['$[]'](0)];
90017
- }, TMP_34.$$arity = 1);
90057
+ message = message.$split("\n");
90058
+ position_info = message['$[]'](3).$split(":");
90059
+ last_line_number = self.editor.lineCount();
90060
+ last_line = self.editor.getLine(last_line_number-1);
90061
+ return [$hash2(["line", "ch"], {"line": 0, "ch": 0}), $hash2(["line", "ch"], {"line": last_line_number, "ch": last_line.$length()}), message['$[]'](2).$split(":(file)")['$[]'](0)];
90062
+ }, TMP_34.$$arity = 1);
90018
90063
 
90019
- Opal.defn(self, '$clear_error', TMP_35 = function $$clear_error() {
90020
- var $a, self = this;
90064
+ Opal.defn(self, '$clear_error', TMP_35 = function $$clear_error() {
90065
+ var $a, self = this;
90021
90066
 
90022
- if ((($a = self.error) !== nil && $a != null && (!$a.$$is_boolean || $a == true))) {
90023
- self.error.clear();};
90024
- return self.error = nil;
90025
- }, TMP_35.$$arity = 0);
90067
+ if ((($a = self.error) !== nil && $a != null && (!$a.$$is_boolean || $a == true))) {
90068
+ self.error.clear();};
90069
+ return self.error = nil;
90070
+ }, TMP_35.$$arity = 0);
90026
90071
 
90027
- Opal.defn(self, '$on_change', TMP_36 = function $$on_change() {
90028
- var $a, self = this, code = nil, compiled_code = nil, e = nil;
90072
+ Opal.defn(self, '$on_change', TMP_36 = function $$on_change() {
90073
+ var $a, self = this, code = nil, compiled_code = nil, e = nil;
90029
90074
 
90030
- try {
90031
- self.$clear_error();
90032
- code = self.editor.getValue();
90033
- if ((($a = self.$params().$context()['$empty?']()) !== nil && $a != null && (!$a.$$is_boolean || $a == true))) {
90034
- compiled_code = $scope.get('Opal').$compile(code, $hash2(["irb"], {"irb": true}))
90035
- } else {
90036
- compiled_code = $scope.get('Opal').$compile("" + (self.$params().$context()) + ".instance_eval {" + (code) + "}")
90037
- };
90038
- return $scope.get('DebugConsole')['$ready!'](code, compiled_code);
90039
- } catch ($err) {
90040
- if (Opal.rescue($err, [$scope.get('Exception')])) {e = $err;
90041
90075
  try {
90042
- return self.$mark_error(e.$message())
90043
- } finally { Opal.pop_exception() }
90044
- } else { throw $err; }
90045
- };
90046
- }, TMP_36.$$arity = 0);
90076
+ self.$clear_error();
90077
+ code = self.editor.getValue();
90078
+ if ((($a = self.$params().$context()['$empty?']()) !== nil && $a != null && (!$a.$$is_boolean || $a == true))) {
90079
+ compiled_code = $scope.get('Opal').$compile(code, $hash2(["irb"], {"irb": true}))
90080
+ } else {
90081
+ compiled_code = $scope.get('Opal').$compile("" + (self.$params().$context()) + ".instance_eval {" + (code) + "}")
90082
+ };
90083
+ return $scope.get('DebugConsole')['$ready!'](code, compiled_code);
90084
+ } catch ($err) {
90085
+ if (Opal.rescue($err, [$scope.get('Exception')])) {e = $err;
90086
+ try {
90087
+ return self.$mark_error(e.$message())
90088
+ } finally { Opal.pop_exception() }
90089
+ } else { throw $err; }
90090
+ };
90091
+ }, TMP_36.$$arity = 0);
90047
90092
 
90048
- return ($a = ($e = self).$render, $a.$$p = (TMP_37 = function(){var self = TMP_37.$$s || this, $f, $g, TMP_38, $h, $i, TMP_39;
90093
+ return ($a = ($e = self).$render, $a.$$p = (TMP_37 = function(){var self = TMP_37.$$s || this, $f, $g, TMP_38, $h, $i, TMP_39;
90049
90094
 
90050
- return ($f = ($g = ($h = ($i = self).$DIV, $h.$$p = (TMP_39 = function(){var self = TMP_39.$$s || this;
90095
+ return ($f = ($g = ($h = ($i = self).$DIV, $h.$$p = (TMP_39 = function(){var self = TMP_39.$$s || this;
90051
90096
 
90052
- return nil}, TMP_39.$$s = self, TMP_39.$$arity = 0, TMP_39), $h).call($i)).$on, $f.$$p = (TMP_38 = function(e){var self = TMP_38.$$s || this;
90097
+ return nil}, TMP_39.$$s = self, TMP_39.$$arity = 0, TMP_39), $h).call($i)).$on, $f.$$p = (TMP_38 = function(e){var self = TMP_38.$$s || this;
90053
90098
  if (e == null) e = nil;
90054
- return e.$stop_propagation()}, TMP_38.$$s = self, TMP_38.$$arity = 1, TMP_38), $f).call($g, "mouse_down")}, TMP_37.$$s = self, TMP_37.$$arity = 0, TMP_37), $a).call($e);
90055
- })($scope.base, $scope.get('CodeMirror'));
90056
- return ($a = ($b = $scope.get('Document'))['$ready?'], $a.$$p = (TMP_40 = function(){var self = TMP_40.$$s || this, $c, $d, TMP_41, mount_point = nil;
90099
+ return e.$stop_propagation()}, TMP_38.$$s = self, TMP_38.$$arity = 1, TMP_38), $f).call($g, "mouse_down")}, TMP_37.$$s = self, TMP_37.$$arity = 0, TMP_37), $a).call($e);
90100
+ })($scope.base, $scope.get('CodeMirror'));
90101
+
90102
+ ($a = ($b = $scope.get('Document'))['$ready?'], $a.$$p = (TMP_40 = function(){var self = TMP_40.$$s || this, $c, $d, TMP_41, mount_point = nil;
90057
90103
 
90058
- mount_point = $scope.get('Element')['$[]']("[data-react-class='React.TopLevelRailsComponent']");
90059
- return ($c = ($d = mount_point).$render, $c.$$p = (TMP_41 = function(){var self = TMP_41.$$s || this;
90104
+ mount_point = $scope.get('Element')['$[]']("[data-react-class='React.TopLevelRailsComponent']");
90105
+ return ($c = ($d = mount_point).$render, $c.$$p = (TMP_41 = function(){var self = TMP_41.$$s || this;
90060
90106
 
90061
- return self.$DebugConsole($scope.get('JSON').$parse(mount_point.$attr("data-react-props"))['$[]']("render_params"))}, TMP_41.$$s = self, TMP_41.$$arity = 0, TMP_41), $c).call($d);}, TMP_40.$$s = self, TMP_40.$$arity = 0, TMP_40), $a).call($b);
90107
+ return (($scope.get('Hyperloop')).$$scope.get('Console')).$DebugConsole($scope.get('JSON').$parse(mount_point.$attr("data-react-props"))['$[]']("render_params"))}, TMP_41.$$s = self, TMP_41.$$arity = 0, TMP_41), $c).call($d);}, TMP_40.$$s = self, TMP_40.$$arity = 0, TMP_40), $a).call($b);
90108
+ })($scope.base)
90109
+ })($scope.base)
90062
90110
  };
90063
90111
 
90064
90112
  /*!
@@ -90191,6 +90239,7 @@ Opal.loaded(["hyperloop/pusher"]);
90191
90239
  self.$require("active_support");
90192
90240
  self.$require("securerandom");
90193
90241
  self.$require("hyperloop/console/evaluate");
90242
+ self.$require("hyperloop/console/version");
90194
90243
  self.$require("hyperloop/console/sources/codemirror");
90195
90244
  self.$require("hyperloop/console/sources/jquery-2.1.4");
90196
90245
  self.$require("hyperloop/console/sources/react");