From f0a7a283521d443cff2406d9bb603978e7e7c5ec Mon Sep 17 00:00:00 2001 From: "G. Gibson" Date: Mon, 25 Apr 2022 16:46:08 -0700 Subject: [PATCH] Downloader testing 3 --- Public/www/javascript/gxg.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Public/www/javascript/gxg.js b/Public/www/javascript/gxg.js index 1e61742..6f4d23d 100644 --- a/Public/www/javascript/gxg.js +++ b/Public/www/javascript/gxg.js @@ -2754,9 +2754,9 @@ var self=Opal.top,$nesting=[],nil=Opal.nil,$$$=Opal.$$$,$$=Opal.$$,$module=Opal. try{return self.$log_error($hash2(["error","parameters"],{"error":the_error,"parameters":payload.$decode64()}))}finally{Opal.pop_exception();}}else{throw $err;}};},$Socket_add_to_inbox$5.$$arity=-1);Opal.def(self,'$error_message',$Socket_error_message$6=function $$error_message(the_message){var self=this;return self.$log_error($hash2(["error"],{"error":$$($nesting,'Exception').$new(the_message)}))},$Socket_error_message$6.$$arity=1);Opal.def(self,'$next_message',$Socket_next_message$7=function $$next_message(){var self=this;return self.inbox.$shift()},$Socket_next_message$7.$$arity=0);Opal.def(self,'$write',$Socket_write$8=function $$write(the_data){var self=this,thesocket=nil;if(the_data==null){the_data="";};if($truthy(the_data['$is_any?']($$$('::','Hash'),$$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){if($truthy(the_data['$is_a?']($$$('::','Hash')))){the_data=$$($nesting,'JSON').$generate(the_data).$encode64()}else{the_data=$$($nesting,'JSON').$generate(the_data.$export()).$encode64()}};thesocket=self.socket;if($truthy(thesocket)){thesocket.send(the_data);return true;}else{return false};},$Socket_write$8.$$arity=-1);Opal.def(self,'$close',$Socket_close$9=function $$close(){var self=this,thesocket=nil;thesocket=self.socket;if($truthy(thesocket)){thesocket.close;self.socket=nil;return true;}else{return false};},$Socket_close$9.$$arity=0);Opal.def(self,'$open?',$Socket_open$ques$10=function(){var self=this;if($truthy(self.socket)){return true}else{return false}},$Socket_open$ques$10.$$arity=0);Opal.def(self,'$open',$Socket_open$11=function $$open(the_location){var self=this,the_url=nil,greeting=nil,the_socket=nil,the_error=nil,$writer=nil;self.socket=nil;if($truthy((window.location['href'])['$include?']("https://"))){the_url=""+"wss://"+(the_location)}else{the_url=""+"ws://"+(the_location)};try{greeting=$hash2(["attach_display"],{"attach_display":true}).$to_json().$encode64();the_socket=new WebSocket(the_url);the_socket.onopen=function(e){the_socket.send(greeting);};the_socket.onmessage=function(event){Opal.eval("GxG::DISPLAY_DETAILS[:socket].add_to_inbox('"+event.data+"')");};the_socket.onclose=function(event){Opal.eval("GxG::DISPLAY_DETAILS[:socket].close");};the_socket.onerror=function(error){Opal.eval("GxG::DISPLAY_DETAILS[:socket].error_message('"+error.message+"')");};;self.socket=the_socket;}catch($err){if(Opal.rescue($err,[$$($nesting,'Exception')])){(the_error=$err) try{self.$log_error($hash2(["error","parameters"],{"error":the_error,"parameters":$hash2(["url"],{"url":the_url.$to_s()})}))}finally{Opal.pop_exception();}}else{throw $err;}};;if($truthy(self.socket)){$writer=["socket",self];$send($$$($$$('::','GxG'),'DISPLAY_DETAILS'),'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];}else{return nil};},$Socket_open$11.$$arity=1);Opal.def(self,'$set_remote_uuid',$Socket_set_remote_uuid$12=function $$set_remote_uuid(the_uuid){var self=this;if(the_uuid==null){the_uuid=nil;};if($truthy($$($nesting,'GxG')['$valid_uuid?'](the_uuid))){self.remote_uuid=the_uuid.$to_sym();return true;}else{return false};},$Socket_set_remote_uuid$12.$$arity=-1);return(Opal.def(self,'$initialize',$Socket_initialize$13=function $$initialize(){var self=this;self.uuid=$$($nesting,'GxG').$uuid_generate().$to_sym();self.remote_uuid=nil;self.inbox=[];return self;},$Socket_initialize$13.$$arity=0),nil)&&'initialize';})($nesting[0],null,$nesting);})($nesting[0],$nesting);return(function($base,$parent_nesting){var self=$module($base,'Networking');var $nesting=[self].concat($parent_nesting);(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Channel');var $nesting=[self].concat($parent_nesting);return nil})($nesting[0],null,$nesting);return(function($base,$super,$parent_nesting){var self=$klass($base,$super,'Connector');var $nesting=[self].concat($parent_nesting),$Connector_remote_uuid$14,$Connector_open$ques$15,$Connector_close$16,$Connector_post$17,$Connector_download_file$20,$Connector_push$22,$Connector_pull$25,$Connector_push_message$28,$Connector_pull_message$29,$Connector_process_pending$30,$Connector_push_object_portions$31,$Connector_search_database$32,$Connector_search_pull$33,$Connector_destroy_object$35,$Connector_push_data$37,$Connector_push_object$39,$Connector_pull_data$43,$Connector_pull_object$45,$Connector_load_format$47,$Connector_store_format$49,$Connector_get_permissions$53,$Connector_call_event$55,$Connector_library_pull$56,$Connector_format_pull$58,$Connector_format_push$60,$Connector_format_list$62,$Connector_admin$64,$Connector_vfs$66,$Connector_app_state_push$68,$Connector_app_state_pull$70,$Connector_application_open$72,$Connector_application_close$75,$Connector_application_list$77,$Connector_application_menu$79,$Connector_entries$81,$Connector_heartbeat$83,$Connector_update_credential$85,$Connector_downgrade_credential$88,$Connector_action$90,$Connector_relative_url$91,$Connector_query$92,$Connector_article$93,$Connector_display_path$94,$Connector_initialize$95;self.$$prototype.remote_uuid=self.$$prototype.active=self.$$prototype.uuid=self.$$prototype.heart_beat_timer=self.$$prototype.relative_url=self.$$prototype.host_prefix=self.$$prototype.display_path=self.$$prototype.csrf=self.$$prototype.query=self.$$prototype.article=nil;Opal.def(self,'$remote_uuid',$Connector_remote_uuid$14=function $$remote_uuid(){var self=this;return self.remote_uuid},$Connector_remote_uuid$14.$$arity=0);Opal.def(self,'$open?',$Connector_open$ques$15=function(){var self=this;return self.active},$Connector_open$ques$15.$$arity=0);Opal.def(self,'$close',$Connector_close$16=function $$close(){var self=this,the_message=nil,$writer=nil;the_message=self.$new_message($hash2(["close"],{"close":true}));$writer=["sender",self.uuid];$send(the_message,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["to",self.remote_uuid];$send(the_message,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;self.$pull(the_message,$hash2(["synchronous"],{"synchronous":true}));self.active=false;self.csrf=nil;if($truthy(self.heart_beat_timer['$is_a?']($$$('::','Hash')))){$$$($$($nesting,'GxG'),'DISPATCHER').$cancel_timer(self.heart_beat_timer)};return true;},$Connector_close$16.$$arity=0);Opal.def(self,'$post',$Connector_post$17=function $$post(form_data,options){var $iter=$Connector_post$17.$$p,handler=$iter||nil,$$18,$$19,self=this,action=nil,the_url=nil,the_xhr=nil,$ret_or_1=nil,failed=nil,succeeded=nil;if($iter)$Connector_post$17.$$p=null;if($iter)$Connector_post$17.$$p=null;;if(form_data==null){form_data="";};if(options==null){options=$hash2([],{});};if($truthy(self.active)){if($truthy(form_data['$is_a?']($$$($$$($$$('::','GxG'),'Gui'),'Form')))){action=form_data.$get_attribute("action").$to_s();if($truthy($rb_gt(action.$size(),0))){if($truthy($rb_gt(self.relative_url.$to_s().$size(),0))){the_url=""+(self.host_prefix)+(self.relative_url.$to_s())+(action.$to_s())+"?display="+(self.display_path.$to_s())}else{the_url=""+(self.host_prefix)+(action.$to_s())+"?display="+(self.display_path.$to_s())}}else if($truthy($rb_gt(self.relative_url.$to_s().$size(),0))){the_url=""+(self.host_prefix)+(self.relative_url.$to_s())+"?display="+(self.display_path.$to_s())}else{the_url=""+(self.host_prefix)+"?display="+(self.display_path.$to_s())};the_xhr=new XMLHttpRequest;the_xhr.open('POST',the_url,true);the_xhr.timeout=(function(){if($truthy(($ret_or_1=options['$[]']("timeout")))){return $ret_or_1}else{return 5000};return nil;})();the_xhr.setRequestHeader('X-Requested-With','XMLHttpRequest');the_xhr.setRequestHeader('Accept','application/json');the_xhr.setRequestHeader('X-CSRF-Token',self.csrf);the_xhr.setRequestHeader('Content-Type','multipart/form-data');failed=$send($$($nesting,'Proc'),'new',[],($$18=function(reason){var self=$$18.$$s==null?this:$$18.$$s;if(reason==null){reason=$hash2(["error"],{"error":"unknown"});};return self.$log_error(reason);},$$18.$$s=self,$$18.$$arity=-1,$$18));succeeded=$send($$($nesting,'Proc'),'new',[],($$19=function(){var self=$$19.$$s==null?this:$$19.$$s,response_code=nil,the_response=nil,the_error=nil;response_code=(the_xhr.status).$to_i();if($truthy($rb_lt(response_code,300))){try{the_response=$$$('::','JSON').$parse(the_xhr.response,$hash2(["symbolize_names"],{"symbolize_names":true}));self.$log_info(the_response.$inspect());if($truthy(handler['$respond_to?']("call"))){return handler.$call(the_response)}else{return nil};}catch($err){if(Opal.rescue($err,[$$($nesting,'Exception')])){(the_error=$err) try{return self.$log_error($hash2(["error","parameters"],{"error":the_error,"parameters":the_xhr.response}))}finally{Opal.pop_exception();}}else{throw $err;}};}else{try{return failed.$call($$$('::','JSON').$parse(the_xhr.response,$hash2(["symbolize_names"],{"symbolize_names":true})))}catch($err){if(Opal.rescue($err,[$$($nesting,'Exception')])){(the_error=$err) -try{return self.$log_error($hash2(["error","parameters"],{"error":the_error,"parameters":the_xhr.response}))}finally{Opal.pop_exception();}}else{throw $err;}};};},$$19.$$s=self,$$19.$$arity=0,$$19));the_xhr.addEventListener('load',succeeded);the_xhr.addEventListener('error',failed);the_xhr.addEventListener('timeout',failed);the_xhr.addEventListener('abort',failed);the_xhr.send(form_data.$element());return true;}else{return false}}else{return nil};},$Connector_post$17.$$arity=-1);Opal.def(self,'$download_file',$Connector_download_file$20=function $$download_file(the_vfs_path,error_handler){var $iter=$Connector_download_file$20.$$p,the_handler=$iter||nil,$$21,self=this,$ret_or_2=nil,the_message=nil,$writer=nil;if($iter)$Connector_download_file$20.$$p=null;if($iter)$Connector_download_file$20.$$p=null;;if(the_vfs_path==null){the_vfs_path="";};if(error_handler==null){error_handler=nil;};if($truthy(self['$open?']())){if($truthy((function(){if($truthy(($ret_or_2=the_vfs_path['$is_a?']($$$('::','String'))))){return the_handler}else{return $ret_or_2};return nil;})())){the_message=self.$new_message($hash2(["download_file"],{"download_file":$hash2(["path"],{"path":the_vfs_path})}));$writer=["sender",self.uuid];$send(the_message,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["to",self.remote_uuid];$send(the_message,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;if($truthy(error_handler['$respond_to?']("call"))){$send(the_message,'on',["fail"],error_handler.$to_proc())};$send(the_message,'on',["success"],($$21=function(response){var self=$$21.$$s==null?this:$$21.$$s;if(response==null){response=nil;};return self.$puts($rb_plus("Got: ",response.$inspect()));},$$21.$$s=self,$$21.$$arity=1,$$21));$$$($$($nesting,'GxG'),'CONNECTION').$pull(the_message);return true;}else{return false}}else{return nil};},$Connector_download_file$20.$$arity=-1);Opal.def(self,'$push',$Connector_push$22=function $$push(the_message,options){var $$23,$$24,self=this,the_url=nil,payload=nil,the_xhr=nil,$ret_or_3=nil,failed=nil,succeeded=nil;if(the_message==null){the_message=nil;};if(options==null){options=$hash2([],{});};if($truthy(self.active)){if($truthy(the_message['$is_a?']($$$($$$($$$('::','GxG'),'Events'),'Message')))){if($truthy($rb_gt(self.relative_url.$to_s().$size(),0))){the_url=""+(self.host_prefix)+(self.relative_url.$to_s())+"?display="+(self.display_path.$to_s())}else{the_url=""+(self.host_prefix)+"?display="+(self.display_path.$to_s())};payload=the_message.$body().$to_json().$to_s();the_xhr=new XMLHttpRequest;the_xhr.open('PUT',the_url,true);the_xhr.timeout=(function(){if($truthy(($ret_or_3=options['$[]']("timeout")))){return $ret_or_3}else{return 5000};return nil;})();the_xhr.setRequestHeader('X-Requested-With','XMLHttpRequest');the_xhr.setRequestHeader('Accept','application/json');the_xhr.setRequestHeader('X-CSRF-Token',self.csrf);the_xhr.setRequestHeader('Content-Type','application/json');failed=$send($$($nesting,'Proc'),'new',[],($$23=function(reason){var self=$$23.$$s==null?this:$$23.$$s;if(reason==null){reason=nil;};return the_message.$fail(reason);},$$23.$$s=self,$$23.$$arity=-1,$$23));succeeded=$send($$($nesting,'Proc'),'new',[],($$24=function(){var self=$$24.$$s==null?this:$$24.$$s,response_code=nil,the_error=nil;response_code=(the_xhr.status).$to_i();if($truthy($rb_lt(response_code,300))){try{return the_message.$succeed($$$('::','JSON').$parse(the_xhr.response,$hash2(["symbolize_names"],{"symbolize_names":true})))}catch($err){if(Opal.rescue($err,[$$($nesting,'Exception')])){(the_error=$err) +try{return self.$log_error($hash2(["error","parameters"],{"error":the_error,"parameters":the_xhr.response}))}finally{Opal.pop_exception();}}else{throw $err;}};};},$$19.$$s=self,$$19.$$arity=0,$$19));the_xhr.addEventListener('load',succeeded);the_xhr.addEventListener('error',failed);the_xhr.addEventListener('timeout',failed);the_xhr.addEventListener('abort',failed);the_xhr.send(form_data.$element());return true;}else{return false}}else{return nil};},$Connector_post$17.$$arity=-1);Opal.def(self,'$download_file',$Connector_download_file$20=function $$download_file(the_vfs_path,error_handler){var $iter=$Connector_download_file$20.$$p,the_handler=$iter||nil,$$21,self=this,$ret_or_2=nil,the_message=nil,$writer=nil;if($iter)$Connector_download_file$20.$$p=null;if($iter)$Connector_download_file$20.$$p=null;;if(the_vfs_path==null){the_vfs_path="";};if(error_handler==null){error_handler=nil;};if($truthy(self['$open?']())){if($truthy((function(){if($truthy(($ret_or_2=the_vfs_path['$is_a?']($$$('::','String'))))){return the_handler}else{return $ret_or_2};return nil;})())){the_message=self.$new_message($hash2(["download_file"],{"download_file":$hash2(["path"],{"path":the_vfs_path})}));$writer=["sender",self.uuid];$send(the_message,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["to",self.remote_uuid];$send(the_message,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;if($truthy(error_handler['$respond_to?']("call"))){$send(the_message,'on',["fail"],error_handler.$to_proc())};$send(the_message,'on',["success"],($$21=function(response){var self=$$21.$$s==null?this:$$21.$$s;if(response==null){response=nil;};self.$puts($rb_plus("Got: ",response.$inspect()));return the_handler.$call(response);},$$21.$$s=self,$$21.$$arity=1,$$21));$$$($$($nesting,'GxG'),'CONNECTION').$pull(the_message);return true;}else{return false}}else{return nil};},$Connector_download_file$20.$$arity=-1);Opal.def(self,'$push',$Connector_push$22=function $$push(the_message,options){var $$23,$$24,self=this,the_url=nil,payload=nil,the_xhr=nil,$ret_or_3=nil,failed=nil,succeeded=nil;if(the_message==null){the_message=nil;};if(options==null){options=$hash2([],{});};if($truthy(self.active)){if($truthy(the_message['$is_a?']($$$($$$($$$('::','GxG'),'Events'),'Message')))){if($truthy($rb_gt(self.relative_url.$to_s().$size(),0))){the_url=""+(self.host_prefix)+(self.relative_url.$to_s())+"?display="+(self.display_path.$to_s())}else{the_url=""+(self.host_prefix)+"?display="+(self.display_path.$to_s())};payload=the_message.$body().$to_json().$to_s();the_xhr=new XMLHttpRequest;the_xhr.open('PUT',the_url,true);the_xhr.timeout=(function(){if($truthy(($ret_or_3=options['$[]']("timeout")))){return $ret_or_3}else{return 5000};return nil;})();the_xhr.setRequestHeader('X-Requested-With','XMLHttpRequest');the_xhr.setRequestHeader('Accept','application/json');the_xhr.setRequestHeader('X-CSRF-Token',self.csrf);the_xhr.setRequestHeader('Content-Type','application/json');failed=$send($$($nesting,'Proc'),'new',[],($$23=function(reason){var self=$$23.$$s==null?this:$$23.$$s;if(reason==null){reason=nil;};return the_message.$fail(reason);},$$23.$$s=self,$$23.$$arity=-1,$$23));succeeded=$send($$($nesting,'Proc'),'new',[],($$24=function(){var self=$$24.$$s==null?this:$$24.$$s,response_code=nil,the_error=nil;response_code=(the_xhr.status).$to_i();if($truthy($rb_lt(response_code,300))){try{return the_message.$succeed($$$('::','JSON').$parse(the_xhr.response,$hash2(["symbolize_names"],{"symbolize_names":true})))}catch($err){if(Opal.rescue($err,[$$($nesting,'Exception')])){(the_error=$err) try{return self.$log_error($hash2(["error","parameters"],{"error":the_error,"parameters":the_xhr.response}))}finally{Opal.pop_exception();}}else{throw $err;}};}else{return failed.$call(response_code)};},$$24.$$s=self,$$24.$$arity=0,$$24));the_xhr.addEventListener('load',succeeded);the_xhr.addEventListener('error',failed);the_xhr.addEventListener('timeout',failed);the_xhr.addEventListener('abort',failed);the_xhr.send(payload);return true;}else{return false}}else{return nil};},$Connector_push$22.$$arity=-1);Opal.def(self,'$pull',$Connector_pull$25=function $$pull(the_message,options){var $$26,$$27,self=this,the_query=nil,the_url=nil,the_xhr=nil,$ret_or_4=nil,failed=nil,succeeded=nil;if(the_message==null){the_message=nil;};if(options==null){options=$hash2(["synchronous"],{"synchronous":false});};if($truthy(self.active)){if($truthy(the_message['$is_a?']($$$($$$($$$('::','GxG'),'Events'),'Message')))){the_query=""+"display="+(self.display_path.$to_s())+"&details="+(the_message.$body().$to_json().$encode64());if($truthy($rb_gt(self.relative_url.$to_s().$size(),0))){the_url=$rb_plus($rb_plus($rb_plus(self.host_prefix.$to_s(),self.relative_url.$to_s()),"?"),the_query)}else{the_url=$rb_plus($rb_plus(self.host_prefix.$to_s(),"?"),the_query)};the_xhr=new XMLHttpRequest;if(options['$[]']("synchronous")['$=='](true)){the_xhr.open('GET',the_url.$to_s(),false)}else{the_xhr.open('GET',the_url.$to_s(),true);the_xhr.timeout=(function(){if($truthy(($ret_or_4=options['$[]']("timeout")))){return $ret_or_4}else{return 600000};return nil;})();};the_xhr.setRequestHeader('X-Requested-With','XMLHttpRequest');the_xhr.setRequestHeader('Accept','application/json');failed=$send($$($nesting,'Proc'),'new',[],($$26=function(reason){var self=$$26.$$s==null?this:$$26.$$s;if(reason==null){reason=nil;};return the_message.$fail(reason);},$$26.$$s=self,$$26.$$arity=-1,$$26));succeeded=$send($$($nesting,'Proc'),'new',[],($$27=function(){var self=$$27.$$s==null?this:$$27.$$s,response_code=nil,the_error=nil;response_code=(the_xhr.status).$to_i();if($truthy($rb_lt(response_code,300))){try{the_message.$succeed($$$('::','JSON').$parse(the_xhr.response,$hash2(["symbolize_names"],{"symbolize_names":true})));return self.$puts("got data");}catch($err){if(Opal.rescue($err,[$$($nesting,'Exception')])){(the_error=$err) -try{return self.$log_error($hash2(["error","parameters"],{"error":the_error,"parameters":the_xhr.response}))}finally{Opal.pop_exception();}}else{throw $err;}};}else{return failed.$call(response_code)};},$$27.$$s=self,$$27.$$arity=0,$$27));the_xhr.addEventListener('load',succeeded);the_xhr.addEventListener('error',failed);the_xhr.addEventListener('timeout',failed);the_xhr.addEventListener('abort',failed);the_xhr.send(null);return true;}else{return false}}else{return nil};},$Connector_pull$25.$$arity=-1);Opal.def(self,'$push_message',$Connector_push_message$28=function $$push_message(the_message){var self=this;if(the_message==null){the_message=nil;};return nil;},$Connector_push_message$28.$$arity=-1);Opal.def(self,'$pull_message',$Connector_pull_message$29=function $$pull_message(options){var self=this;if(options==null){options=$hash2([],{});};return nil;},$Connector_pull_message$29.$$arity=-1);Opal.def(self,'$process_pending',$Connector_process_pending$30=function $$process_pending(options){var self=this;if(options==null){options=$hash2([],{});};return nil;},$Connector_process_pending$30.$$arity=-1);Opal.def(self,'$push_object_portions',$Connector_push_object_portions$31=function $$push_object_portions(details,error_handler){var $iter=$Connector_push_object_portions$31.$$p,the_handler=$iter||nil,self=this;if($iter)$Connector_push_object_portions$31.$$p=null;if($iter)$Connector_push_object_portions$31.$$p=null;;if(details==null){details=$hash2([],{});};if(error_handler==null){error_handler=nil;};return nil;},$Connector_push_object_portions$31.$$arity=-1);Opal.def(self,'$search_database',$Connector_search_database$32=function $$search_database(details,error_handler){var $iter=$Connector_search_database$32.$$p,the_handler=$iter||nil,self=this,$ret_or_5=nil;if($iter)$Connector_search_database$32.$$p=null;if($iter)$Connector_search_database$32.$$p=null;;if(details==null){details=$hash2([],{});};if(error_handler==null){error_handler=nil;};if($truthy((function(){if($truthy(($ret_or_5=details['$is_a?']($$$('::','Hash'))))){return the_handler}else{return $ret_or_5};return nil;})())){$send(self,'pull_data',[$hash2(["search_database"],{"search_database":$hash2(["criteria"],{"criteria":details})}),error_handler],the_handler.$to_proc());return true;}else{return false};},$Connector_search_database$32.$$arity=-1);Opal.def(self,'$search_pull',$Connector_search_pull$33=function $$search_pull(details,error_handler){var $iter=$Connector_search_pull$33.$$p,the_handler=$iter||nil,$$34,self=this,$ret_or_6=nil;if($iter)$Connector_search_pull$33.$$p=null;if($iter)$Connector_search_pull$33.$$p=null;;if(details==null){details=$hash2([],{});};if(error_handler==null){error_handler=nil;};if($truthy((function(){if($truthy(($ret_or_6=details['$is_a?']($$$('::','Hash'))))){return the_handler}else{return $ret_or_6};return nil;})())){$send(self,'pull_data',[$hash2(["search_pull"],{"search_pull":$hash2(["criteria"],{"criteria":details})}),error_handler],($$34=function(data){var self=$$34.$$s==null?this:$$34.$$s,the_error=nil;if(data==null){data=nil;};if($truthy(data['$is_a?']($$$('::','Hash')))){if($truthy(data['$[]']("result"))){if($truthy(data['$[]']("result")['$is_a?']($$$('::','String')))){if($truthy(data['$[]']("result").$to_s()['$base64?']())){data=data['$[]']("result").$decode64()};if($truthy(data.$to_s()['$json?']())){try{data=$$$('::','JSON').$parse(data.$to_s(),$hash2(["symbolize_names"],{"symbolize_names":true}));return the_handler.$call($$$($$$('::','GxG'),'Database').$process_detached_import(data));}catch($err){if(Opal.rescue($err,[$$($nesting,'Exception')])){(the_error=$err) +try{self.$puts("Parse Error");return self.$log_error($hash2(["error","parameters"],{"error":the_error,"parameters":the_xhr.response}));}finally{Opal.pop_exception();}}else{throw $err;}};}else{return failed.$call(response_code)};},$$27.$$s=self,$$27.$$arity=0,$$27));the_xhr.addEventListener('load',succeeded);the_xhr.addEventListener('error',failed);the_xhr.addEventListener('timeout',failed);the_xhr.addEventListener('abort',failed);the_xhr.send(null);return true;}else{return false}}else{return nil};},$Connector_pull$25.$$arity=-1);Opal.def(self,'$push_message',$Connector_push_message$28=function $$push_message(the_message){var self=this;if(the_message==null){the_message=nil;};return nil;},$Connector_push_message$28.$$arity=-1);Opal.def(self,'$pull_message',$Connector_pull_message$29=function $$pull_message(options){var self=this;if(options==null){options=$hash2([],{});};return nil;},$Connector_pull_message$29.$$arity=-1);Opal.def(self,'$process_pending',$Connector_process_pending$30=function $$process_pending(options){var self=this;if(options==null){options=$hash2([],{});};return nil;},$Connector_process_pending$30.$$arity=-1);Opal.def(self,'$push_object_portions',$Connector_push_object_portions$31=function $$push_object_portions(details,error_handler){var $iter=$Connector_push_object_portions$31.$$p,the_handler=$iter||nil,self=this;if($iter)$Connector_push_object_portions$31.$$p=null;if($iter)$Connector_push_object_portions$31.$$p=null;;if(details==null){details=$hash2([],{});};if(error_handler==null){error_handler=nil;};return nil;},$Connector_push_object_portions$31.$$arity=-1);Opal.def(self,'$search_database',$Connector_search_database$32=function $$search_database(details,error_handler){var $iter=$Connector_search_database$32.$$p,the_handler=$iter||nil,self=this,$ret_or_5=nil;if($iter)$Connector_search_database$32.$$p=null;if($iter)$Connector_search_database$32.$$p=null;;if(details==null){details=$hash2([],{});};if(error_handler==null){error_handler=nil;};if($truthy((function(){if($truthy(($ret_or_5=details['$is_a?']($$$('::','Hash'))))){return the_handler}else{return $ret_or_5};return nil;})())){$send(self,'pull_data',[$hash2(["search_database"],{"search_database":$hash2(["criteria"],{"criteria":details})}),error_handler],the_handler.$to_proc());return true;}else{return false};},$Connector_search_database$32.$$arity=-1);Opal.def(self,'$search_pull',$Connector_search_pull$33=function $$search_pull(details,error_handler){var $iter=$Connector_search_pull$33.$$p,the_handler=$iter||nil,$$34,self=this,$ret_or_6=nil;if($iter)$Connector_search_pull$33.$$p=null;if($iter)$Connector_search_pull$33.$$p=null;;if(details==null){details=$hash2([],{});};if(error_handler==null){error_handler=nil;};if($truthy((function(){if($truthy(($ret_or_6=details['$is_a?']($$$('::','Hash'))))){return the_handler}else{return $ret_or_6};return nil;})())){$send(self,'pull_data',[$hash2(["search_pull"],{"search_pull":$hash2(["criteria"],{"criteria":details})}),error_handler],($$34=function(data){var self=$$34.$$s==null?this:$$34.$$s,the_error=nil;if(data==null){data=nil;};if($truthy(data['$is_a?']($$$('::','Hash')))){if($truthy(data['$[]']("result"))){if($truthy(data['$[]']("result")['$is_a?']($$$('::','String')))){if($truthy(data['$[]']("result").$to_s()['$base64?']())){data=data['$[]']("result").$decode64()};if($truthy(data.$to_s()['$json?']())){try{data=$$$('::','JSON').$parse(data.$to_s(),$hash2(["symbolize_names"],{"symbolize_names":true}));return the_handler.$call($$$($$$('::','GxG'),'Database').$process_detached_import(data));}catch($err){if(Opal.rescue($err,[$$($nesting,'Exception')])){(the_error=$err) try{return self.$log_error($hash2(["error","parameters"],{"error":the_error,"parameters":$hash2(["data"],{"data":data})}))}finally{Opal.pop_exception();}}else{throw $err;}};}else{return nil};}else{return self.$log_error($hash2(["error","parameters"],{"error":$$($nesting,'Exception').$new("Malformed Response Data"),"parameters":$hash2(["data"],{"data":data['$[]']("result")})}))}}else if($truthy(data['$[]']("error"))){if($truthy(error_handler['$respond_to?']("call"))){return error_handler.$call(data)}else{return nil}}else{return nil}}else{return nil};},$$34.$$s=self,$$34.$$arity=1,$$34));return true;}else{return false};},$Connector_search_pull$33.$$arity=-1);Opal.def(self,'$destroy_object',$Connector_destroy_object$35=function $$destroy_object(the_specifier,error_handler){var $iter=$Connector_destroy_object$35.$$p,the_handler=$iter||nil,$$36,self=this,$ret_or_7=nil;if($iter)$Connector_destroy_object$35.$$p=null;if($iter)$Connector_destroy_object$35.$$p=null;;if(the_specifier==null){the_specifier=nil;};if(error_handler==null){error_handler=nil;};if($truthy((function(){if($truthy(($ret_or_7=the_specifier))){return the_handler}else{return $ret_or_7};return nil;})())){$send(self,'pull_data',[$hash2(["destroy_object"],{"destroy_object":$hash2(["path"],{"path":the_specifier})}),error_handler],($$36=function(data){var self=$$36.$$s==null?this:$$36.$$s;if(data==null){data=nil;};if($truthy(data['$is_a?']($$$('::','Hash')))){return the_handler.$call(data)}else{return nil};},$$36.$$s=self,$$36.$$arity=1,$$36));return true;}else{return false};},$Connector_destroy_object$35.$$arity=-1);Opal.def(self,'$push_data',$Connector_push_data$37=function $$push_data(details,error_handler){var $iter=$Connector_push_data$37.$$p,the_handler=$iter||nil,$$38,self=this,$ret_or_8=nil,the_message=nil,$writer=nil;if($iter)$Connector_push_data$37.$$p=null;if($iter)$Connector_push_data$37.$$p=null;;if(details==null){details=$hash2([],{});};if(error_handler==null){error_handler=nil;};if($truthy((function(){if($truthy(($ret_or_8=details['$is_a?']($$$('::','Hash'))))){return the_handler}else{return $ret_or_8};return nil;})())){the_message=self.$new_message(details);$writer=["sender",self.uuid];$send(the_message,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["to",self.remote_uuid];$send(the_message,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;if($truthy(error_handler['$respond_to?']("call"))){$send(the_message,'on',["fail"],error_handler.$to_proc())};$send(the_message,'on',["success"],($$38=function(response){var self=$$38.$$s==null?this:$$38.$$s;if(response==null){response=nil;};return the_handler.$call(response);},$$38.$$s=self,$$38.$$arity=1,$$38));$$$($$($nesting,'GxG'),'CONNECTION').$push(the_message);return true;}else{return false};},$Connector_push_data$37.$$arity=-1);Opal.def(self,'$push_object',$Connector_push_object$39=function $$push_object(details,error_handler){var $iter=$Connector_push_object$39.$$p,the_handler=$iter||nil,$$40,$$41,$$42,self=this,$ret_or_9=nil,exception=nil,payload=nil,$writer=nil,format_list=nil,importation_record=nil;if($iter)$Connector_push_object$39.$$p=null;if($iter)$Connector_push_object$39.$$p=null;;if(details==null){details=$hash2([],{});};if(error_handler==null){error_handler=nil;};if($truthy((function(){if($truthy(($ret_or_9=details['$is_a?']($$$('::','Hash'))))){return the_handler}else{return $ret_or_9};return nil;})())){exception=nil;payload=$hash2([],{});if($truthy(details['$[]']("object")['$is_any?']($$$($$$('::','GxG'),'BinaryArray'),$$$('::','String')))){if($truthy($rb_gt(details['$[]']("path").$to_s().$size(),0))){$writer=["path",details['$[]']("path")];$send(payload,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["object",details['$[]']("object").$to_s().$encode64()];$send(payload,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;}else{exception="You MUST specify a :path to store the data into."}}else if($truthy(details['$[]']("object")['$is_a?']($$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){if($truthy($rb_gt(details['$[]']("path").$to_s().$size(),0))){$writer=["path",details['$[]']("path")];$send(payload,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};$writer=["uuid",details['$[]']("object").$uuid().$to_s()];$send(payload,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;format_list=[];importation_record=$hash2(["formats","records"],{"formats":$hash2([],{}),"records":[]});if($truthy($rb_gt(details['$[]']("object").$format().$to_s().$size(),0))){format_list['$<<'](details['$[]']("object").$format())};$send(details['$[]']("object"),'search',[],($$40=function(value,selector,container){var self=$$40.$$s==null?this:$$40.$$s;if(value==null){value=nil;};if(selector==null){selector=nil;};if(container==null){container=nil;};if($truthy(value['$is_a?']($$$($$$($$$('::','GxG'),'Database'),'DetachedHash')))){if($truthy($rb_gt(value.$format().$to_s().$size(),0))){format_list['$<<'](value.$format())}};if($truthy(value['$is_a?']($$$($$$($$$('::','GxG'),'Database'),'PersistedArray')))){if($truthy($rb_gt(value.$constraint().$to_s().$size(),0))){return format_list['$<<'](value.$constraint())}else{return nil}}else{return nil};},$$40.$$s=self,$$40.$$arity=3,$$40));$send(format_list,'each',[],($$41=function(the_specifier){var self=$$41.$$s==null?this:$$41.$$s,format_record=nil;if(the_specifier==null){the_specifier=nil;};format_record=$$$($$($nesting,'GxG'),'DB')['$[]']("formats")['$[]'](the_specifier.$to_s().$to_sym()).$clone();if($truthy(format_record['$is_a?']($$$('::','Hash')))){$writer=["content",format_record['$[]']("content").$gxg_export()];$send(format_record,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=[the_specifier.$to_s().$to_sym(),format_record];$send(importation_record['$[]']("formats"),'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];;}else{return nil};},$$41.$$s=self,$$41.$$arity=1,$$41));importation_record['$[]']("records")['$<<'](details['$[]']("object").$export());$writer=["object",importation_record];$send(payload,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;}else{exception="Invalid Data Type"};if($truthy(exception)){if($truthy(error_handler['$respond_to?']("call"))){error_handler.$call($hash2(["result","error"],{"result":nil,"error":exception}))};return false;}else{$send(self,'push_data',[$hash2(["put_object"],{"put_object":payload}),error_handler],($$42=function(data){var self=$$42.$$s==null?this:$$42.$$s;if(data==null){data=nil;};if($truthy(data['$is_a?']($$$('::','Hash')))){return the_handler.$call(data)}else{return nil};},$$42.$$s=self,$$42.$$arity=1,$$42));return true;};}else{return false};},$Connector_push_object$39.$$arity=-1);Opal.def(self,'$pull_data',$Connector_pull_data$43=function $$pull_data(the_specifier,error_handler){var $iter=$Connector_pull_data$43.$$p,the_handler=$iter||nil,$$44,self=this,$ret_or_10=nil,the_message=nil,$writer=nil;if($iter)$Connector_pull_data$43.$$p=null;if($iter)$Connector_pull_data$43.$$p=null;;if(the_specifier==null){the_specifier=$hash2([],{});};if(error_handler==null){error_handler=nil;};if($truthy((function(){if($truthy(($ret_or_10=the_specifier))){return the_handler}else{return $ret_or_10};return nil;})())){the_message=self.$new_message(the_specifier);$writer=["sender",self.uuid];$send(the_message,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["to",self.remote_uuid];$send(the_message,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;if($truthy(error_handler['$respond_to?']("call"))){$send(the_message,'on',["fail"],error_handler.$to_proc())};$send(the_message,'on',["success"],($$44=function(response){var self=$$44.$$s==null?this:$$44.$$s,data=nil,the_error=nil;if(response==null){response=nil;};if($truthy(response['$is_a?']($$$('::','Hash')))){data=nil;if($truthy(response['$[]']("result")['$is_a?']($$$('::','String')))){if($truthy(response['$[]']("result").$to_s()['$base64?']())){data=response['$[]']("result").$decode64()};if($truthy(data.$to_s()['$json?']())){try{data=$$$('::','JSON').$parse(data.$to_s(),$hash2(["symbolize_names"],{"symbolize_names":true}))}catch($err){if(Opal.rescue($err,[$$($nesting,'Exception')])){(the_error=$err) try{self.$log_error($hash2(["error","parameters"],{"error":the_error,"parameters":$hash2(["data"],{"data":data})}))}finally{Opal.pop_exception();}}else{throw $err;}};};return the_handler.$call(data);}else{return self.$log_error($hash2(["error","parameters"],{"error":$$($nesting,'Exception').$new("Malformed Response Data"),"parameters":$hash2(["data"],{"data":response['$[]']("result")})}))};}else{return nil};},$$44.$$s=self,$$44.$$arity=1,$$44));return $$$($$($nesting,'GxG'),'CONNECTION').$pull(the_message);}else{return nil};},$Connector_pull_data$43.$$arity=-1);Opal.def(self,'$pull_object',$Connector_pull_object$45=function $$pull_object(the_specifier,error_handler){var $iter=$Connector_pull_object$45.$$p,the_handler=$iter||nil,$$46,self=this,$ret_or_11=nil,op_frame=nil;if($iter)$Connector_pull_object$45.$$p=null;if($iter)$Connector_pull_object$45.$$p=null;;if(the_specifier==null){the_specifier=nil;};if(error_handler==null){error_handler=nil;};if($truthy((function(){if($truthy(($ret_or_11=the_specifier))){return the_handler}else{return $ret_or_11};return nil;})())){if($truthy($$($nesting,'GxG')['$valid_uuid?'](the_specifier.$to_s()))){op_frame=$hash2(["get_object"],{"get_object":$hash2(["uuid"],{"uuid":the_specifier})})}else{op_frame=$hash2(["get_object"],{"get_object":$hash2(["path"],{"path":the_specifier})})};$send(self,'pull_data',[op_frame,error_handler],($$46=function(data){var self=$$46.$$s==null?this:$$46.$$s;if(data==null){data=nil;};if($truthy(data['$is_a?']($$$('::','Hash')))){return the_handler.$call($$$($$$('::','GxG'),'Database').$process_detached_import(data))}else{return nil};},$$46.$$s=self,$$46.$$arity=1,$$46));return true;}else{return false};},$Connector_pull_object$45.$$arity=-1);Opal.def(self,'$load_format',$Connector_load_format$47=function $$load_format(details,error_handler){var $iter=$Connector_load_format$47.$$p,the_handler=$iter||nil,$$48,self=this,$ret_or_12=nil;if($iter)$Connector_load_format$47.$$p=null;if($iter)$Connector_load_format$47.$$p=null;;if(details==null){details=$hash2([],{});};if(error_handler==null){error_handler=nil;};if($truthy((function(){if($truthy(($ret_or_12=details))){return the_handler}else{return $ret_or_12};return nil;})())){$send(self,'pull_data',[$hash2(["get_format"],{"get_format":details}),error_handler],($$48=function(data){var self=$$48.$$s==null?this:$$48.$$s,the_error=nil;if(data==null){data=nil;};if($truthy(data['$is_a?']($$$('::','Hash')))){if($truthy(data['$[]']("result"))){if($truthy(data['$[]']("result")['$is_a?']($$$('::','String')))){if($truthy(data['$[]']("result").$to_s()['$base64?']())){data=data['$[]']("result").$decode64()};if($truthy(data.$to_s()['$json?']())){try{data=$$$('::','JSON').$parse(data.$to_s(),$hash2(["symbolize_names"],{"symbolize_names":true}));$$$($$$('::','GxG'),'Database').$process_detached_import(data);return the_handler.$call($hash2(["result"],{"result":true}));}catch($err){if(Opal.rescue($err,[$$($nesting,'Exception')])){(the_error=$err) try{return self.$log_error($hash2(["error","parameters"],{"error":the_error,"parameters":$hash2(["data"],{"data":data})}))}finally{Opal.pop_exception();}}else{throw $err;}};}else{return nil};}else{return self.$log_error($hash2(["error","parameters"],{"error":$$($nesting,'Exception').$new("Malformed Response Data"),"parameters":$hash2(["data"],{"data":data['$[]']("result")})}))}}else if($truthy(data['$[]']("error"))){if($truthy(error_handler['$respond_to?']("call"))){return error_handler.$call(data)}else{return nil}}else{return nil}}else{return nil};},$$48.$$s=self,$$48.$$arity=1,$$48));return true;}else{return false};},$Connector_load_format$47.$$arity=-1);Opal.def(self,'$store_format',$Connector_store_format$49=function $$store_format(details,error_handler){var $iter=$Connector_store_format$49.$$p,the_handler=$iter||nil,$$50,$$51,$$52,self=this,$ret_or_13=nil,format_list=nil,importation_record=nil;if($iter)$Connector_store_format$49.$$p=null;if($iter)$Connector_store_format$49.$$p=null;;if(details==null){details=$hash2([],{});};if(error_handler==null){error_handler=nil;};if($truthy((function(){if($truthy(($ret_or_13=details))){return the_handler}else{return $ret_or_13};return nil;})())){if(details.$keys().$size()['$=='](0)){format_list=$$$($$$('::','GxG'),'DB')['$[]']("formats").$keys()}else{format_list=[];$send($$$($$$('::','GxG'),'DB')['$[]']("formats").$keys(),'each',[],($$50=function(the_uuid){var self=$$50.$$s==null?this:$$50.$$s;if(the_uuid==null){the_uuid=nil;};if($truthy($rb_gt(details['$[]']("uuid").$to_s().$size(),0))){if(the_uuid['$=='](details['$[]']("uuid"))){if($truthy(format_list['$include?'](the_uuid))){}else{format_list['$<<'](the_uuid)}}};if($truthy($rb_gt(details['$[]']("type").$to_s().$size(),0))){if($$$($$$('::','GxG'),'DB')['$[]']("formats")['$[]'](the_uuid)['$[]']("type")['$=='](details['$[]']("type"))){if($truthy(format_list['$include?'](the_uuid))){}else{format_list['$<<'](the_uuid)}}};if($truthy($rb_gt(details['$[]']("ufs").$to_s().$size(),0))){if($$$($$$('::','GxG'),'DB')['$[]']("formats")['$[]'](the_uuid)['$[]']("ufs")['$=='](details['$[]']("ufs"))){if($truthy(format_list['$include?'](the_uuid))){}else{format_list['$<<'](the_uuid)}}};if($truthy($rb_gt(details['$[]']("title").$to_s().$size(),0))){if($$$($$$('::','GxG'),'DB')['$[]']("formats")['$[]'](the_uuid)['$[]']("title")['$=='](details['$[]']("title"))){if($truthy(format_list['$include?'](the_uuid))){}else{format_list['$<<'](the_uuid)}}};if($truthy($rb_gt(details['$[]']("version").$to_s().$size(),0))){if($$$($$$('::','GxG'),'DB')['$[]']("formats")['$[]'](the_uuid)['$[]']("version")['$=='](details['$[]']("version"))){if($truthy(format_list['$include?'](the_uuid))){return nil}else{return format_list['$<<'](the_uuid)}}else{return nil}}else{return nil};},$$50.$$s=self,$$50.$$arity=1,$$50));};importation_record=$hash2(["formats","records"],{"formats":$hash2([],{}),"records":[]});$send(format_list,'each',[],($$51=function(the_uuid){var self=$$51.$$s==null?this:$$51.$$s,format_record=nil,$writer=nil;if(the_uuid==null){the_uuid=nil;};format_record=$$$($$$('::','GxG'),'DB')['$[]']("formats")['$[]'](the_uuid.$to_s().$to_sym()).$clone();$writer=["content",format_record['$[]']("content").$gxg_export()];$send(format_record,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=[the_uuid.$to_s().$to_sym(),format_record];$send(importation_record['$[]']("formats"),'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];;},$$51.$$s=self,$$51.$$arity=1,$$51));$send(self,'push_data',[$hash2(["put_format"],{"put_format":importation_record}),error_handler],($$52=function(data){var self=$$52.$$s==null?this:$$52.$$s;if(data==null){data=nil;};if($truthy(data['$is_a?']($$$('::','Hash')))){return the_handler.$call(data)}else{return nil};},$$52.$$s=self,$$52.$$arity=1,$$52));return true;}else{return false};},$Connector_store_format$49.$$arity=-1);Opal.def(self,'$get_permissions',$Connector_get_permissions$53=function $$get_permissions(the_specifier,error_handler){var $iter=$Connector_get_permissions$53.$$p,the_handler=$iter||nil,$$54,self=this,$ret_or_14=nil;if($iter)$Connector_get_permissions$53.$$p=null;if($iter)$Connector_get_permissions$53.$$p=null;;if(the_specifier==null){the_specifier=nil;};if(error_handler==null){error_handler=nil;};if($truthy((function(){if($truthy(($ret_or_14=the_specifier))){return the_handler}else{return $ret_or_14};return nil;})())){$send(self,'pull_data',[$hash2(["get_permissions"],{"get_permissions":$hash2(["path"],{"path":the_specifier})}),error_handler],($$54=function(data){var self=$$54.$$s==null?this:$$54.$$s;if(data==null){data=nil;};if($truthy(data['$is_a?']($$$('::','Hash')))){return the_handler.$call(data)}else{return nil};},$$54.$$s=self,$$54.$$arity=1,$$54));return true;}else{return false};},$Connector_get_permissions$53.$$arity=-1);Opal.def(self,'$call_event',$Connector_call_event$55=function $$call_event(service,op_frame,error_handler){var $iter=$Connector_call_event$55.$$p,the_handler=$iter||nil,self=this,$ret_or_15=nil;if($iter)$Connector_call_event$55.$$p=null;if($iter)$Connector_call_event$55.$$p=null;;if(service==null){service="core";};if(op_frame==null){op_frame=$hash2(["interface"],{"interface":true});};if(error_handler==null){error_handler=nil;};if($truthy(self['$open?']())){if($truthy((function(){if($truthy(($ret_or_15=op_frame['$is_a?']($$$('::','Hash'))))){return the_handler}else{return $ret_or_15};return nil;})())){$send(self,'pull_data',[$hash2(["call_event"],{"call_event":$hash2(["service","op_frame"],{"service":service.$to_s(),"op_frame":op_frame})}),error_handler],the_handler.$to_proc());return true;}else{return false}}else{return nil};},$Connector_call_event$55.$$arity=-1);Opal.def(self,'$library_pull',$Connector_library_pull$56=function $$library_pull(details,error_handler){var $iter=$Connector_library_pull$56.$$p,the_handler=$iter||nil,$$57,self=this,$ret_or_16=nil;if($iter)$Connector_library_pull$56.$$p=null;if($iter)$Connector_library_pull$56.$$p=null;;if(details==null){details=$hash2([],{});};if(error_handler==null){error_handler=nil;};if($truthy(self['$open?']())){if($truthy((function(){if($truthy(($ret_or_16=details['$is_a?']($$$('::','Hash'))))){return the_handler}else{return $ret_or_16};return nil;})())){$send(self,'pull_data',[$hash2(["get_library"],{"get_library":details}),error_handler],($$57=function(data){var self=$$57.$$s==null?this:$$57.$$s;if(data==null){data=nil;};return the_handler.$call(data);},$$57.$$s=self,$$57.$$arity=1,$$57));return true;}else{return false}}else{return nil};},$Connector_library_pull$56.$$arity=-1);Opal.def(self,'$format_pull',$Connector_format_pull$58=function $$format_pull(details,error_handler){var $iter=$Connector_format_pull$58.$$p,the_handler=$iter||nil,$$59,self=this,$ret_or_17=nil;if($iter)$Connector_format_pull$58.$$p=null;if($iter)$Connector_format_pull$58.$$p=null;;if(details==null){details=$hash2([],{});};if(error_handler==null){error_handler=nil;};if($truthy(self['$open?']())){if($truthy((function(){if($truthy(($ret_or_17=details['$is_any?']($$$('::','Array'),$$$('::','Hash'))))){return the_handler}else{return $ret_or_17};return nil;})())){$send(self,'pull_data',[$hash2(["format_pull"],{"format_pull":details}),error_handler],($$59=function(data){var self=$$59.$$s==null?this:$$59.$$s;if(data==null){data=nil;};return the_handler.$call(data);},$$59.$$s=self,$$59.$$arity=1,$$59));return true;}else{return false}}else{return nil};},$Connector_format_pull$58.$$arity=-1);Opal.def(self,'$format_push',$Connector_format_push$60=function $$format_push(details,error_handler){var $iter=$Connector_format_push$60.$$p,the_handler=$iter||nil,$$61,self=this,$ret_or_18=nil;if($iter)$Connector_format_push$60.$$p=null;if($iter)$Connector_format_push$60.$$p=null;;if(details==null){details=$hash2([],{});};if(error_handler==null){error_handler=nil;};if($truthy(self['$open?']())){if($truthy((function(){if($truthy(($ret_or_18=details['$is_a?']($$$('::','Hash'))))){return the_handler}else{return $ret_or_18};return nil;})())){$send(self,'push_data',[$hash2(["format_push"],{"format_push":details}),error_handler],($$61=function(data){var self=$$61.$$s==null?this:$$61.$$s;if(data==null){data=nil;};return the_handler.$call(data);},$$61.$$s=self,$$61.$$arity=1,$$61));return true;}else{return false}}else{return nil};},$Connector_format_push$60.$$arity=-1);Opal.def(self,'$format_list',$Connector_format_list$62=function $$format_list(details,error_handler){var $iter=$Connector_format_list$62.$$p,the_handler=$iter||nil,$$63,self=this,$ret_or_19=nil;if($iter)$Connector_format_list$62.$$p=null;if($iter)$Connector_format_list$62.$$p=null;;if(details==null){details=$hash2([],{});};if(error_handler==null){error_handler=nil;};if($truthy(self['$open?']())){if($truthy((function(){if($truthy(($ret_or_19=details['$is_a?']($$$('::','Hash'))))){return the_handler}else{return $ret_or_19};return nil;})())){$send(self,'pull_data',[$hash2(["format_list"],{"format_list":details}),error_handler],($$63=function(data){var self=$$63.$$s==null?this:$$63.$$s;if(data==null){data=nil;};return the_handler.$call(data);},$$63.$$s=self,$$63.$$arity=1,$$63));return true;}else{return false}}else{return nil};},$Connector_format_list$62.$$arity=-1);Opal.def(self,'$admin',$Connector_admin$64=function $$admin(details,error_handler){var $iter=$Connector_admin$64.$$p,the_handler=$iter||nil,$$65,self=this,$ret_or_20=nil;if($iter)$Connector_admin$64.$$p=null;if($iter)$Connector_admin$64.$$p=null;;if(details==null){details=$hash2([],{});};if(error_handler==null){error_handler=nil;};if($truthy(self['$open?']())){if($truthy((function(){if($truthy(($ret_or_20=details['$is_a?']($$$('::','Hash'))))){return the_handler}else{return $ret_or_20};return nil;})())){$send(self,'pull_data',[$hash2(["admin"],{"admin":details}),error_handler],($$65=function(data){var self=$$65.$$s==null?this:$$65.$$s;if(data==null){data=nil;};return the_handler.$call(data);},$$65.$$s=self,$$65.$$arity=1,$$65));return true;}else{return false}}else{return nil};},$Connector_admin$64.$$arity=-1);Opal.def(self,'$vfs',$Connector_vfs$66=function $$vfs(details,error_handler){var $iter=$Connector_vfs$66.$$p,the_handler=$iter||nil,$$67,self=this,$ret_or_21=nil;if($iter)$Connector_vfs$66.$$p=null;if($iter)$Connector_vfs$66.$$p=null;;if(details==null){details=$hash2([],{});};if(error_handler==null){error_handler=nil;};if($truthy(self['$open?']())){if($truthy((function(){if($truthy(($ret_or_21=details['$is_a?']($$$('::','Hash'))))){return the_handler}else{return $ret_or_21};return nil;})())){if($truthy(["vfs_mkfile","vfs_mkdir","vfs_rename","vfs_destroy","vfs_copy","vfs_move","set_permissions"]['$include?'](details.$keys()['$[]'](0)))){$send(self,'pull_data',[details,error_handler],($$67=function(data){var self=$$67.$$s==null?this:$$67.$$s;if(data==null){data=nil;};return the_handler.$call(data);},$$67.$$s=self,$$67.$$arity=1,$$67));return true;}else{return false}}else{return false}}else{return false};},$Connector_vfs$66.$$arity=-1);Opal.def(self,'$app_state_push',$Connector_app_state_push$68=function $$app_state_push(details,error_handler){var $iter=$Connector_app_state_push$68.$$p,the_handler=$iter||nil,$$69,self=this,$ret_or_22=nil;if($iter)$Connector_app_state_push$68.$$p=null;if($iter)$Connector_app_state_push$68.$$p=null;;if(details==null){details=$hash2([],{});};if(error_handler==null){error_handler=nil;};if($truthy((function(){if($truthy(($ret_or_22=details['$is_a?']($$$('::','Hash'))))){return the_handler}else{return $ret_or_22};return nil;})())){$send(self,'push_data',[$hash2(["app_state_push"],{"app_state_push":$hash2(["application","data"],{"application":details['$[]']("application"),"data":details['$[]']("data")})}),error_handler],($$69=function(data){var self=$$69.$$s==null?this:$$69.$$s;if(data==null){data=nil;};if($truthy(data['$is_a?']($$$('::','Hash')))){return the_handler.$call(data)}else{return nil};},$$69.$$s=self,$$69.$$arity=1,$$69));return true;}else{return false};},$Connector_app_state_push$68.$$arity=-1);Opal.def(self,'$app_state_pull',$Connector_app_state_pull$70=function $$app_state_pull(details,error_handler){var $iter=$Connector_app_state_pull$70.$$p,the_handler=$iter||nil,$$71,self=this,$ret_or_23=nil;if($iter)$Connector_app_state_pull$70.$$p=null;if($iter)$Connector_app_state_pull$70.$$p=null;;if(details==null){details=$hash2([],{});};if(error_handler==null){error_handler=nil;};if($truthy(self['$open?']())){if($truthy((function(){if($truthy(($ret_or_23=details['$is_a?']($$$('::','Hash'))))){return the_handler}else{return $ret_or_23};return nil;})())){$send(self,'pull_data',[$hash2(["app_state_pull"],{"app_state_pull":$hash2(["application"],{"application":details['$[]']("application")})}),error_handler],($$71=function(data){var self=$$71.$$s==null?this:$$71.$$s;if(data==null){data=nil;};return the_handler.$call(data);},$$71.$$s=self,$$71.$$arity=1,$$71));return true;}else{return false}}else{return nil};},$Connector_app_state_pull$70.$$arity=-1);Opal.def(self,'$application_open',$Connector_application_open$72=function $$application_open(details,error_handler){var $iter=$Connector_application_open$72.$$p,the_handler=$iter||nil,$$73,$$74,self=this,$ret_or_24=nil,$ret_or_25=nil,$ret_or_26=nil;if($iter)$Connector_application_open$72.$$p=null;if($iter)$Connector_application_open$72.$$p=null;;if(details==null){details=$hash2([],{});};if(error_handler==null){error_handler=nil;};if($truthy(self['$open?']())){if($truthy((function(){if($truthy(($ret_or_24=details['$is_a?']($$$('::','Hash'))))){return the_handler}else{return $ret_or_24};return nil;})())){if($truthy(details['$[]']("name"))){$send(self,'pull_data',[$hash2(["application_open"],{"application_open":$hash2(["restore","name"],{"restore":(function(){if($truthy(($ret_or_25=details['$[]']("restore")))){return $ret_or_25}else{return false};return nil;})(),"name":details['$[]']("name")})}),error_handler],($$73=function(data){var self=$$73.$$s==null?this:$$73.$$s;if(data==null){data=nil;};return the_handler.$call(data);},$$73.$$s=self,$$73.$$arity=1,$$73))}else{$send(self,'pull_data',[$hash2(["application_open"],{"application_open":$hash2(["restore","path"],{"restore":(function(){if($truthy(($ret_or_26=details['$[]']("restore")))){return $ret_or_26}else{return false};return nil;})(),"path":details['$[]']("path")})}),error_handler],($$74=function(data){var self=$$74.$$s==null?this:$$74.$$s;if(data==null){data=nil;};return the_handler.$call(data);},$$74.$$s=self,$$74.$$arity=1,$$74))};return true;}else{return false}}else{return nil};},$Connector_application_open$72.$$arity=-1);Opal.def(self,'$application_close',$Connector_application_close$75=function $$application_close(details,error_handler){var $iter=$Connector_application_close$75.$$p,the_handler=$iter||nil,$$76,self=this,$ret_or_27=nil;if($iter)$Connector_application_close$75.$$p=null;if($iter)$Connector_application_close$75.$$p=null;;if(details==null){details=$hash2([],{});};if(error_handler==null){error_handler=nil;};if($truthy(self['$open?']())){if($truthy((function(){if($truthy(($ret_or_27=details['$is_a?']($$$('::','Hash'))))){return the_handler}else{return $ret_or_27};return nil;})())){$send(self,'pull_data',[$hash2(["application_close"],{"application_close":$hash2(["application"],{"application":details['$[]']("application")})}),error_handler],($$76=function(data){var self=$$76.$$s==null?this:$$76.$$s;if(data==null){data=nil;};return the_handler.$call(data);},$$76.$$s=self,$$76.$$arity=1,$$76));return true;}else{return false}}else{return nil};},$Connector_application_close$75.$$arity=-1);Opal.def(self,'$application_list',$Connector_application_list$77=function $$application_list(error_handler){var $iter=$Connector_application_list$77.$$p,the_handler=$iter||nil,$$78,self=this;if($iter)$Connector_application_list$77.$$p=null;if($iter)$Connector_application_list$77.$$p=null;;if(error_handler==null){error_handler=nil;};if($truthy(self['$open?']())){if($truthy(the_handler)){$send(self,'pull_data',[$hash2(["application_list"],{"application_list":true}),error_handler],($$78=function(data){var self=$$78.$$s==null?this:$$78.$$s;if(data==null){data=nil;};return the_handler.$call(data);},$$78.$$s=self,$$78.$$arity=1,$$78));return true;}else{return false}}else{return nil};},$Connector_application_list$77.$$arity=-1);Opal.def(self,'$application_menu',$Connector_application_menu$79=function $$application_menu(error_handler){var $iter=$Connector_application_menu$79.$$p,the_handler=$iter||nil,$$80,self=this;if($iter)$Connector_application_menu$79.$$p=null;if($iter)$Connector_application_menu$79.$$p=null;;if(error_handler==null){error_handler=nil;};if($truthy(self['$open?']())){if($truthy(the_handler)){$send(self,'pull_data',[$hash2(["application_menu"],{"application_menu":true}),error_handler],($$80=function(data){var self=$$80.$$s==null?this:$$80.$$s;if(data==null){data=nil;};return the_handler.$call(data);},$$80.$$s=self,$$80.$$arity=1,$$80));return true;}else{return false}}else{return nil};},$Connector_application_menu$79.$$arity=-1);Opal.def(self,'$entries',$Connector_entries$81=function $$entries(details,error_handler){var $iter=$Connector_entries$81.$$p,the_handler=$iter||nil,$$82,self=this,$ret_or_28=nil;if($iter)$Connector_entries$81.$$p=null;if($iter)$Connector_entries$81.$$p=null;;if(details==null){details=$hash2([],{});};if(error_handler==null){error_handler=nil;};if($truthy(self['$open?']())){if($truthy((function(){if($truthy(($ret_or_28=details['$is_a?']($$$('::','Hash'))))){return the_handler}else{return $ret_or_28};return nil;})())){$$$($$($nesting,'GxG'),'DISPLAY_DETAILS')['$[]']("object").$set_busy(true);$send(self,'pull_data',[$hash2(["entries"],{"entries":$hash2(["path"],{"path":details['$[]']("path")})}),error_handler],($$82=function(data){var self=$$82.$$s==null?this:$$82.$$s;if(data==null){data=nil;};the_handler.$call(data);return $$$($$($nesting,'GxG'),'DISPLAY_DETAILS')['$[]']("object").$set_busy(false);},$$82.$$s=self,$$82.$$arity=1,$$82));return true;}else{return false}}else{return nil};},$Connector_entries$81.$$arity=-1);Opal.def(self,'$heartbeat',$Connector_heartbeat$83=function $$heartbeat(){var $$84,self=this,heartbeat_message=nil,$writer=nil;if($truthy(self.active)){heartbeat_message=self.$new_message($hash2(["heartbeat"],{"heartbeat":true}));$writer=["sender",self.uuid.$to_s()];$send(heartbeat_message,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["to",self.remote_uuid.$to_s()];$send(heartbeat_message,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$send(heartbeat_message,'on',["success"],($$84=function(response){var self=$$84.$$s==null?this:$$84.$$s;if(response==null){response=nil;};if($truthy(response['$is_a?']($$$('::','Hash')))){if(response['$[]']("result")['$[]']("status")['$==']("credentialed")){};$writer=["server_status",response['$[]']("result")['$[]']("server").$to_s().$to_sym()];$send($$$($$($nesting,'GxG'),'DISPLAY_DETAILS'),'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];;}else{return nil};},$$84.$$s=self,$$84.$$arity=1,$$84));return $$$($$($nesting,'GxG'),'CONNECTION').$pull(heartbeat_message);}else{return nil}},$Connector_heartbeat$83.$$arity=0);Opal.def(self,'$update_credential',$Connector_update_credential$85=function $$update_credential(details,error_handler){var $iter=$Connector_update_credential$85.$$p,the_handler=$iter||nil,$$86,$$87,self=this,$ret_or_29=nil,content=nil,the_message=nil,$writer=nil;if($iter)$Connector_update_credential$85.$$p=null;if($iter)$Connector_update_credential$85.$$p=null;;if(details==null){details=$hash2([],{});};if(error_handler==null){error_handler=nil;};if($truthy(self['$open?']())){if($truthy((function(){if($truthy(($ret_or_29=details['$is_a?']($$$('::','Hash'))))){return the_handler}else{return $ret_or_29};return nil;})())){content=details.$to_json().$to_s().$encrypt(self.csrf.$to_s()).$encode64();the_message=self.$new_message($hash2(["update_credential"],{"update_credential":content}));$writer=["sender",self.uuid];$send(the_message,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["to",self.remote_uuid];$send(the_message,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["thread",the_message.$id().$to_s()];$send(the_message['$[]']("body"),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$send(the_message,'on',["success"],($$86=function(the_response){var self=$$86.$$s==null?this:$$86.$$s;if(the_response==null){the_response=nil;};if($truthy(the_response['$is_a?']($$$('::','Hash')))){if(the_response['$[]']("status")['$==']("credentialed")){$writer=["logged_in",true];$send($$$($$($nesting,'GxG'),'DISPLAY_DETAILS'),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];}};return the_handler.$call(the_response);},$$86.$$s=self,$$86.$$arity=1,$$86));if($truthy(error_handler)){$send(the_message,'on',["fail"],($$87=function(the_response){var self=$$87.$$s==null?this:$$87.$$s;if(the_response==null){the_response=nil;};return error_handler.$call(the_response);},$$87.$$s=self,$$87.$$arity=1,$$87))};return $$$($$($nesting,'GxG'),'CONNECTION').$push(the_message);}else{return nil}}else{return nil};},$Connector_update_credential$85.$$arity=-1);Opal.def(self,'$downgrade_credential',$Connector_downgrade_credential$88=function $$downgrade_credential(){var $iter=$Connector_downgrade_credential$88.$$p,the_handler=$iter||nil,$$89,self=this,downgrade_message=nil,$writer=nil;if($iter)$Connector_downgrade_credential$88.$$p=null;if($iter)$Connector_downgrade_credential$88.$$p=null;;if($truthy(self.active)){downgrade_message=self.$new_message($hash2(["downgrade_credential"],{"downgrade_credential":true}));$writer=["sender",self.uuid.$to_s()];$send(downgrade_message,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["to",self.remote_uuid.$to_s()];$send(downgrade_message,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$send(downgrade_message,'on',["success"],($$89=function(response){var self=$$89.$$s==null?this:$$89.$$s,new_event=nil;if(response==null){response=nil;};if($truthy(response['$is_a?']($$$('::','Hash')))){if(response['$[]']("status")['$==']("uncredentialed")){$writer=["logged_in",false];$send($$$($$($nesting,'GxG'),'DISPLAY_DETAILS'),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;if($truthy(the_handler['$respond_to?']("call"))){the_handler.$call(response)};new_event=new CustomEvent('credentialchanged',{detail:response['$[]']("status").$to_s()});return window.dispatchEvent(new_event);}else{return nil}}else{return nil};},$$89.$$s=self,$$89.$$arity=1,$$89));return $$$($$($nesting,'GxG'),'CONNECTION').$pull(downgrade_message);}else{return nil};},$Connector_downgrade_credential$88.$$arity=0);Opal.def(self,'$action',$Connector_action$90=function $$action(details,error_handler){var $iter=$Connector_action$90.$$p,the_handler=$iter||nil,self=this;if($iter)$Connector_action$90.$$p=null;if($iter)$Connector_action$90.$$p=null;;if(details==null){details=$hash2([],{});};if(error_handler==null){error_handler=nil;};return nil;},$Connector_action$90.$$arity=-1);Opal.def(self,'$relative_url',$Connector_relative_url$91=function $$relative_url(){var self=this;return self.relative_url},$Connector_relative_url$91.$$arity=0);Opal.def(self,'$query',$Connector_query$92=function $$query(){var self=this;return self.query},$Connector_query$92.$$arity=0);Opal.def(self,'$article',$Connector_article$93=function $$article(){var self=this;return self.article},$Connector_article$93.$$arity=0);Opal.def(self,'$display_path',$Connector_display_path$94=function $$display_path(){var self=this;return self.display_path},$Connector_display_path$94.$$arity=0);return(Opal.def(self,'$initialize',$Connector_initialize$95=function $$initialize(){var $$96,$$97,$$102,$$103,self=this,page_name=nil,subpath_array=nil,found_at=nil,query_string=nil,query_array=nil,the_introduction=nil,$writer=nil;if($truthy((window.location['href'])['$include?']("https://"))){self.host_prefix=$rb_plus("https://",window.location['host'])}else{self.host_prefix=$rb_plus("http://",window.location['host'])};self.relative_url="";page_name=$$($nesting,'File').$basename(window.location['pathname']);subpath_array=(window.location['pathname']).$split("/");found_at=subpath_array.$index(page_name);if($truthy(found_at['$is_a?']($$$('::','Numeric')))){if($truthy($rb_gt(found_at,1))){self.relative_url=subpath_array['$[]'](Opal.Range.$new(0,$rb_minus(found_at,1),false)).$join("/")}};self.article=nil;self.query=$hash2([],{});query_string=(window.location.href).$split("?")['$[]'](1);if($truthy(query_string)){self.article=query_string.$split("#")['$[]'](1);query_string=query_string.$split("#")['$[]'](0);if($truthy(query_string['$include?']("&"))){query_array=query_string.$split("&")}else{query_array=query_string.$split("&")};$send(query_array,'each',[],($$96=function(entry){var self=$$96.$$s==null?this:$$96.$$s,buffer=nil,$writer=nil;if(self.query==null)self.query=nil;if(entry==null){entry=nil;};buffer=entry.$split("=");$writer=[buffer['$[]'](0).$to_s().$to_sym(),buffer['$[]'](1)];$send(self.query,'[]=',Opal.to_a($writer));return $writer[$rb_minus($writer["length"],1)];;},$$96.$$s=self,$$96.$$arity=1,$$96));}else{self.article=(window.location.href).$split("#")['$[]'](1)};self.uuid=$$($nesting,'GxG').$uuid_generate().$to_sym();self.remote_uuid=nil;self.active=true;self.display_path=nil;self.in_busy=false;self.out_busy=false;self.pending=$hash2([],{});self.channels=$hash2([],{});self.buffers=$hash2([],{});self.csrf=nil;self.the_connector=self;the_introduction=self.$new_message($hash2(["introduction"],{"introduction":self.uuid.$to_s()}));$writer=["sender",self.uuid.$to_s()];$send(the_introduction,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["to",self.host_prefix.$to_s()];$send(the_introduction,'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$send(the_introduction,'on',["success"],($$97=function(response){var self=$$97.$$s==null?this:$$97.$$s,$$98;if(response==null){response=nil;};if(response['$[]']("result")['$==']("OK")){if($truthy(response['$[]']("csrf"))){self.csrf=response['$[]']("csrf")};if(response['$[]']("status")['$==']("credentialed")){$writer=["logged_in",true];$send($$$($$($nesting,'GxG'),'DISPLAY_DETAILS'),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];}else{$writer=["logged_in",false];$send($$$($$($nesting,'GxG'),'DISPLAY_DETAILS'),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];};if($truthy(response['$[]']("relative_url"))){self.relative_url=response['$[]']("relative_url")};if(response['$[]']("display")['$==']("unavailable")){return alert('Display Resource Unavailable');}else{self.display_path=response['$[]']("display");self.active=true;return $send($$$($$($nesting,'GxG'),'DISPATCHER'),'post_event',["display"],($$98=function(){var self=$$98.$$s==null?this:$$98.$$s,$a,$$99,$$100,$$101;if(self.query==null)self.query=nil;if(self.article==null)self.article=nil;if(self.relative_url==null)self.relative_url=nil;while(!($truthy((document.readyState).$to_s()['$==']("complete")))){self.$sleep(0.5)};$writer=["query",self.query];$send($$$($$$('::','GxG'),'DISPLAY_DETAILS'),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;$writer=["article",self.article];$send($$$($$$('::','GxG'),'DISPLAY_DETAILS'),'[]=',Opal.to_a($writer));$writer[$rb_minus($writer["length"],1)];;var do_unload=function(the_event){Opal.GxG.$eval("GxG::DISPLAY_DETAILS[:socket].close");if(the_event){the_event.returnValue="closing...";}