Opal.modules["gamefic/version"]=function(e){var $=(e.top,e),t=(e.nil,e.breaker,e.slice,e.module);return function($){var n,r=n=t($,"Gamefic"),a=(r.$$proto,r.$$scope);e.cdecl(a,"VERSION","2.0.0")}($.base)},Opal.modules["gamefic/matchable"]=function(e){function $(e,$){return"number"==typeof e&&"number"==typeof $?e+$:e["$+"]($)}var t=(e.top,e),n=e.nil,r=(e.breaker,e.slice,e.module),a=e.hash2;return e.add_stubs(["$uniq","$split","$downcase","$to_s","$empty?","$keywords","$each","$start_with?","$gsub","$+","$include?","$==","$length"]),function(t){var i,s=i=r(t,"Gamefic"),o=(s.$$proto,s.$$scope);!function(t){var i,s,o,l=i=r(t,"Matchable"),u=(l.$$proto,l.$$scope);e.cdecl(u,"SPLIT_REGEXP",/[\s]+/),e.defn(l,"$keywords",s=function(){return this.$to_s().$downcase().$split(u.get("SPLIT_REGEXP")).$uniq()},s.$$arity=0),e.defn(l,"$match?",o=function(t,r){var i,s,o,l,c=this,p=n,f=n,d=n;if(null==r||!r.$$is_hash){if(null!=r)throw e.ArgumentError.$new("expected kwargs");r=a([],{})}return null==(l=r.$$smap.fuzzy)&&(l=!1),p=t.$split(u.get("SPLIT_REGEXP")),!!((i=p["$empty?"]())===n||null==i||i.$$is_boolean&&1!=i)&&(f=0,d=c.$keywords(),(i=(s=p).$each,i.$$p=(o=function(t){var r,a,i,s=o.$$s||this;return null==t&&(t=n),!1!==l&&l!==n&&null!=l?function(){var o=e.new_brk();try{return(r=(a=d).$each,r.$$p=(i=function(r){var a;i.$$s;if(null==r&&(r=n),(a=r.$gsub(/[^a-z0-9]/,"")["$start_with?"](t.$downcase().$gsub(/[^a-z0-9]/,"")))===n||null==a||a.$$is_boolean&&1!=a)return n;f=$(f,1),e.brk(n,o)},i.$$s=s,i.$$brk=o,i.$$arity=1,i),r).call(a)}catch(e){if(e===o)return e.$v;throw e}}():(r=d["$include?"](t.$downcase()))===n||null==r||r.$$is_boolean&&1!=r?n:f=$(f,1)},o.$$s=c,o.$$arity=1,o),i).call(s),f["$=="](p.$length()))},o.$$arity=-2)}(o.base)}(t.base)},Opal.modules["gamefic/core_ext/array"]=function(e){function $(e,$){return"number"==typeof e&&"number"==typeof $?e-$:e["$-"]($)}function t(e,$){return"number"==typeof e&&"number"==typeof $?e<$:e["$<"]($)}function n(e,$){return"number"==typeof e&&"number"==typeof $?e+$:e["$+"]($)}var r=(e.top,e),a=e.nil,i=(e.breaker,e.slice,e.klass),s=e.range;return e.add_stubs(["$kind_of?","$delete_if","$==","$clone","$send","$include?","$new","$-","$[]","$rand","$length","$pop_sample","$delete_at","$<","$join","$+","$strip","$last","$join_and"]),function(r,$super){function o(){}var l,u,c,p,f,d,_,y=o=i(r,$super,"Array",o),h=(y.$$proto,y.$$scope);return e.defn(y,"$that_are",l=function(e){var $,t,n,r,i,s=this;return($=!1!==(t=e["$kind_of?"](h.get("Class")))&&t!==a&&null!=t?t:e["$kind_of?"](h.get("Module")))===a||null==$||$.$$is_boolean&&1!=$?($=e["$kind_of?"](h.get("Symbol")))===a||null==$||$.$$is_boolean&&1!=$?($=s["$include?"](e))===a||null==$||$.$$is_boolean&&1!=$?h.get("Array").$new():[e]:($=(r=s.$clone()).$delete_if,$.$$p=(i=function($){i.$$s;return null==$&&($=a),$.$send(e)["$=="](!1)},i.$$s=s,i.$$arity=1,i),$).call(r):($=(t=s.$clone()).$delete_if,$.$$p=(n=function($){n.$$s;return null==$&&($=a),$["$kind_of?"](e)["$=="](!1)},n.$$s=s,n.$$arity=1,n),$).call(t)},l.$$arity=1),e.defn(y,"$that_are_not",u=function(e){var t,n,r,i,s,o=this;return(t=!1!==(n=e["$kind_of?"](h.get("Class")))&&n!==a&&null!=n?n:e["$kind_of?"](h.get("Module")))===a||null==t||t.$$is_boolean&&1!=t?(t=e["$kind_of?"](h.get("Symbol")))===a||null==t||t.$$is_boolean&&1!=t?$(o.$clone(),[e]):(t=(i=o.$clone()).$delete_if,t.$$p=(s=function($){s.$$s;return null==$&&($=a),$.$send(e)["$=="](!0)},s.$$s=o,s.$$arity=1,s),t).call(i):(t=(n=o.$clone()).$delete_if,t.$$p=(r=function($){r.$$s;return null==$&&($=a),$["$kind_of?"](e)["$=="](!0)},r.$$s=o,r.$$arity=1,r),t).call(n)},u.$$arity=1),e.defn(y,"$random",c=function(){var e=this;return e["$[]"](e.$rand(e.$length()))},c.$$arity=0),e.defn(y,"$pop_random",p=function(){return this.$pop_sample()},p.$$arity=0),e.defn(y,"$pop_sample",f=function(){var e=this;return e.$delete_at(e.$rand(e.$length()))},f.$$arity=0),e.defn(y,"$join_and",d=function(e,$,r){var i,o=this,l=a;return null==e&&(e=", "),null==$&&($=" and "),null==r&&(r=!0),(i=t(o.$length(),3))===a||null==i||i.$$is_boolean&&1!=i?(l=o["$[]"](s(0,-2,!1)),n(l.$join(e),""+function(){return!1!==r&&r!==a&&null!=r?e.$strip():""}()+$+o.$last())):o.$join($)},d.$$arity=-1),e.defn(y,"$join_or",_=function(e,$,t){var n=this;return null==e&&(e=", "),null==$&&($=" or "),null==t&&(t=!0),n.$join_and(e,$,t)},_.$$arity=-1),a&&"join_or"}(r.base,null)},Opal.modules["gamefic/core_ext/string"]=function(e){var $=e.top,t=e,n=e.nil,r=(e.breaker,e.slice,e.klass);return e.add_stubs(["$require","$include","$upcase","$[]","$length","$capitalize_first","$split","$strip","$gsub"]),$.$require("gamefic/matchable"),function($,$super){function t(){}var a,i,s,o=t=r($,$super,"String",t),l=(o.$$proto,o.$$scope);return o.$include(l.get("Gamefic").$$scope.get("Matchable")),e.defn(o,"$capitalize_first",a=function(){var e=this;return""+e["$[]"](0,1).$upcase()+e["$[]"](1,e.$length())},a.$$arity=0),e.defn(o,"$cap_first",i=function(){return this.$capitalize_first()},i.$$arity=0),e.defn(o,"$split_words",s=function(){return this.$gsub(/[\s]+/," ").$strip().$split()},s.$$arity=0),n&&"split_words"}(t.base,null)},Opal.modules["gamefic/grammar/tense"]=function(e){var $=e.top,t=e,n=(e.nil,e.breaker,e.slice,e.module);return e.add_stubs(["$require"]),$.$require("gamefic/grammar"),function($){var t,r=t=n($,"Tense"),a=(r.$$proto,r.$$scope);e.cdecl(a,"PRESENT","present"),e.cdecl(a,"PAST","past")}(t.get("Gamefic").$$scope.get("Grammar"))},Opal.modules["gamefic/grammar/pronouns"]=function(e){var $=e.top,t=e,n=e.nil,r=(e.breaker,e.slice,e.module),a=e.klass,i=e.hash2;return e.add_stubs(["$require","$[]","$get_pronoun_set","$cap_first","$subj","$obj","$poss","$reflex","$sets","$person","$nil?","$plural?","$gender","$raise","$[]="]),$.$require("gamefic/grammar"),function($){var t,s=t=r($,"Grammar"),o=(s.$$proto,s.$$scope);!function($,$super){function t(){}var r,s,o,l,u,c,p,f,d,_,y,h=t=a($,$super,"Pronouns",t),m=h.$$proto,b=h.$$scope;m.object=n,e.defn(h,"$initialize",r=function(e){return this.object=e},r.$$arity=1),e.defn(h,"$subj",s=function(){var e=this;return b.get("Pronouns").$get_pronoun_set(e.object)["$[]"](0)},s.$$arity=0),e.defn(h,"$obj",o=function(){var e=this;return b.get("Pronouns").$get_pronoun_set(e.object)["$[]"](1)},o.$$arity=0),e.defn(h,"$poss",l=function(){var e=this;return b.get("Pronouns").$get_pronoun_set(e.object)["$[]"](2)},l.$$arity=0),e.defn(h,"$reflex",u=function(){var e=this;return b.get("Pronouns").$get_pronoun_set(e.object)["$[]"](3)},u.$$arity=0),e.defn(h,"$Subj",c=function(){return this.$subj().$cap_first()},c.$$arity=0),e.defn(h,"$Obj",p=function(){return this.$obj().$cap_first()},p.$$arity=0),e.defn(h,"$Poss",f=function(){return this.$poss().$cap_first()},f.$$arity=0),e.defn(h,"$Reflex",d=function(){return this.$reflex().$cap_first()},d.$$arity=0),e.defs(h,"$get_pronoun_set",_=function(e){var $,t=this,r=n;return r=b.get("Pronouns").$sets()["$[]"](""+e.$person()),($=r["$nil?"]())===n||null==$||$.$$is_boolean&&1!=$||(r=b.get("Pronouns").$sets()["$[]"](e.$person()+":"+function(){return($=e["$plural?"]())===n||null==$||$.$$is_boolean&&1!=$?"singular":"plural"}())),($=r["$nil?"]())===n||null==$||$.$$is_boolean&&1!=$||(r=b.get("Pronouns").$sets()["$[]"](e.$person()+":"+function(){return($=e["$plural?"]())===n||null==$||$.$$is_boolean&&1!=$?"singular":"plural"}()+":"+e.$gender())),($=r["$nil?"]())===n||null==$||$.$$is_boolean&&1!=$||t.$raise("Pronoun set could not be determined"),r},_.$$arity=1),e.defs(h,"$sets",y=function(){var e,$=this;return null==$.sets&&($.sets=n),(e=$.sets["$nil?"]())===n||null==e||e.$$is_boolean&&1!=e||($.sets=i([],{}),$.sets["$[]="]("1:singular",["I","me","my","myself"]),$.sets["$[]="]("2:singular",["you","you","your","yourself"]),$.sets["$[]="]("3:singular:male",["he","him","his","himself"]),$.sets["$[]="]("3:singular:female",["she","her","her","herself"]),$.sets["$[]="]("3:singular:other",["they","them","their","themselves"]),$.sets["$[]="]("3:singular:neutral",["it","it","its","itself"]),$.sets["$[]="]("1:plural",["we","us","our","ourselves"]),$.sets["$[]="]("2:plural",["you","you","your","yourselves"]),$.sets["$[]="]("3:plural",["they","them","their","themselves"])),$.sets},y.$$arity=0)}(o.base,null)}(t.get("Gamefic"))},Opal.modules["gamefic/grammar/conjugator"]=function(e){var $=e.top,t=e,n=e.nil,r=(e.breaker,e.slice,e.module),a=e.hash2;return e.add_stubs(["$require","$[]","$[]=","$new"]),$.$require("gamefic/grammar"),function($){var t,i=t=r($,"Grammar"),s=(i.$$proto,i.$$scope);!function($){var t,i=t=r($,"Conjugator"),s=(i.$$proto,i.$$scope);!function($){var t,i,s,o=t=r($,"ClassMethods"),l=(o.$$proto,o.$$scope);e.cvars["@@conjugated_verbs"]=a([],{}),e.defn(o,"$conjugate",i=function($,t){var r,i,s,o,u=arguments.length,c=u-2;c<0&&(c=0),o=new Array(c);for(var p=2;p$:e["$>"]($)}var n=e.top,r=e,a=e.nil,i=(e.breaker,e.slice,e.module),s=e.klass,o=e.range;return e.add_stubs(["$require","$extend","$each_pair","$define_singleton_method","$conjugate","$[]","$conjugated_verbs","$class","$new","$split_words","$+","$>","$length","$join"]),n.$require("gamefic/grammar"),function(n){var r,l=r=i(n,"Grammar"),u=(l.$$proto,l.$$scope);!function(n,$super){function r(){}var i,l,u,c=r=s(n,$super,"Verbs",r),p=c.$$proto,f=c.$$scope;p.pronoun=a,c.$extend(f.get("Gamefic").$$scope.get("Grammar").$$scope.get("Conjugator").$$scope.get("ClassMethods")),e.defn(c,"$initialize",i=function(e){var $,t,n,r=this;return r.pronoun=e,($=(t=r.$class().$conjugated_verbs()).$each_pair,$.$$p=(n=function(e,$){var t,r,i,s=n.$$s||this;return null==e&&(e=a),null==$&&($=a),(t=(r=s).$define_singleton_method,t.$$p=(i=function(){var e=i.$$s||this;return null==e.pronoun&&(e.pronoun=a),$["$[]"]("present").$conjugate(e.pronoun)},i.$$s=s,i.$$arity=0,i),t).call(r,e)},n.$$s=r,n.$$arity=2,n),$).call(t)},i.$$arity=1),e.defn(c,"$method_missing",l=function($){var t,n,r=this,i=(l.$$p,arguments.length),s=i-1;s<0&&(s=0),n=new Array(s);for(var o=1;o",e=e.$gsub(/[ \t\r]*\n[ \t\r]*\n[ \t\r]*/,"
"),e=e.$gsub(/[ \t]*\n[ \t]*/," "),t.$p_set_messages($(t.$messages(),e))},i.$$arity=1),e.defn(p,"$stream",s=function(e){var t=this;return t.$p_set_messages($(t.$messages(),e.$strip()))},s.$$arity=1),e.defn(p,"$messages",o=function(){var e,$=this;return null==$.messages&&($.messages=n),!1!==(e=$.messages)&&e!==n&&null!=e?e:$.messages=""},o.$$arity=0),e.defn(p,"$output",l=function(){return this.$messages()},l.$$arity=0),e.defn(p,"$flush",u=function(){var e,$=this;return(e=$.$messages()["$empty?"]())===n||null==e||e.$$is_boolean&&1!=e?$.$p_set_messages(""):n},u.$$arity=0),p.$private(),e.defn(p,"$p_set_messages",c=function(e){return this.messages=e},c.$$arity=1)}(s.base)}(t.base)},Opal.modules["gamefic/entity"]=function(e){var $=e.top,t=e,n=e.nil,r=(e.breaker,e.slice,e.module),a=e.klass,i=e.hash2;return e.add_stubs(["$require","$include","$!=","$==","$kind_of?","$raise","$[]","$session","$[]="]),$.$require("gamefic/node"),$.$require("gamefic/describable"),$.$require("gamefic/messaging"),function($){var t,s=t=r($,"Gamefic"),o=(s.$$proto,s.$$scope);!function($,$super){function t(){}var r,s,o,l,u,c=t=a($,$super,"Entity",t),p=c.$$proto,f=c.$$scope;p.session=n,c.$include(f.get("Node")),c.$include(f.get("Messaging")),c.$include(f.get("Grammar").$$scope.get("WordAdapter")),e.defn(c,"$update",r=function(){return n},r.$$arity=0),e.defn(c,"$parent=",s=function($){var t,r,a=this,i=s.$$p,o=n,l=n;for(s.$$p=null,o=[],l=0;l$:e["$>"]($)}function t(e,$){return"number"==typeof e&&"number"==typeof $?e+$:e["$+"]($)}function n(e,$){return"number"==typeof e&&"number"==typeof $?e-$:e["$-"]($)}function r(e,$){return"number"==typeof e&&"number"==typeof $?e<=$:e["$<="]($)}var a=(e.top,e),i=e.nil,s=(e.breaker,e.slice,e.module),o=e.klass,l=e.hash2;return e.add_stubs(["$attr_reader","$nil?","$scene","$merge!","$state","$[]=","$messages","$>","$buffer_stack","$append_buffer","$each","$concat","$dispatch","$reverse","$playbooks","$execute_stack","$==","$clear_buffer","$set_buffer_stack","$+","$perform","$-","$buffer","$dispatch_from_params","$empty?","$performance_stack","$shift","$last","$execute","$new","$start","$class","$<=","$raise","$cue","$!","$kind_of?","$freeze","$to_s","$include?","$entered_scenes","$push","$private","$first","$meta?","$validate_playbook","$proceed","$pop","$call","$verb","$parameters","$!=","$validators"]),function(a){var u,c=u=s(a,"Gamefic"),p=(c.$$proto,c.$$scope);!function(e,$super){function $(){}var t=$=o(e,$super,"NotConclusionError",$);t.$$proto,t.$$scope}(p.base,p.get("Exception")),function(a){var o,u,c,p,f,d,_,y,h,m,b,g,v,k,w,x,q,j,G,z,S,O,P,E,A,C,N,M,T,B,I=o=s(a,"Active"),R=(I.$$proto,I.$$scope);I.$attr_reader("last_action"),I.$attr_reader("user"),I.$attr_reader("scene"),I.$attr_reader("next_scene"),e.defn(I,"$playbooks",u=function(){var e,$=this;return null==$.playbooks&&($.playbooks=i),!1!==(e=$.playbooks)&&e!==i&&null!=e?e:$.playbooks=[]},u.$$arity=0),e.defn(I,"$connect",c=function(e){return this.user=e},c.$$arity=1),e.defn(I,"$queue",p=function(){var e,$=this;return null==$.queue&&($.queue=i),!1!==(e=$.queue)&&e!==i&&null!=e?e:$.queue=[]},p.$$arity=0),e.defn(I,"$state",f=function(){var e,$=this;return null==$.state&&($.state=i),$.state=l([],{}),((e=$.$scene()["$nil?"]())===i||null==e||e.$$is_boolean&&1!=e)&&$.state["$merge!"]($.$scene().$state()),$.state["$[]="]("output",$.$messages()),$.state},f.$$arity=0),e.defn(I,"$tell",d=function(t){var n,r,a=this,s=d.$$p,o=i,l=i;for(d.$$p=null,o=[],l=0;l"},_.$$arity=0),e.defn(g,"$type",y=function(){var e,$=this;return!1!==(e=$.type)&&e!==t&&null!=e?e:$.type="Scene"},y.$$arity=0),e.defs(g,"$on_start",h=function(){var e=this,$=h.$$p,n=$||t;return h.$$p=null,e.start_block=n},h.$$arity=0),e.defn(g,"$tracked?",m=function(){return this.$class()["$tracked?"]()},m.$$arity=0),e.defn(g,"$tracked=",b=function(e){var $,t,n=this;return $=[e],t=n.$class(),t["$tracked="].apply(t,$),$[$.length-1]},b.$$arity=1),function($){var n,r;$.$$scope,$.$$proto;$.$attr_writer("tracked"),e.defn($,"$start_block",n=function(){var e=this;return null==e.start_block&&(e.start_block=t),e.start_block},n.$$arity=0),e.defn($,"$tracked?",r=function(){var e,$=this;return null==$.tracked&&($.tracked=t),!1!==(e=$.tracked)&&e!==t&&null!=e?e:$.tracked=!1},r.$$arity=0)}(e.get_singleton_class(g))}(o.get("Scene"),null)}($.base)},Opal.modules["gamefic/scene/custom"]=function(e){var $=(e.top,e),t=(e.nil,e.breaker,e.slice,e.module),n=e.klass;return function(e){var $,r=$=t(e,"Gamefic"),a=(r.$$proto,r.$$scope);!function(e,$super){function $(){}var t=$=n(e,$super,"Custom",$);t.$$proto,t.$$scope}(a.get("Scene"),a.get("Scene").$$scope.get("Base"))}($.base)},Opal.modules["gamefic/scene/activity"]=function(e){var $=(e.top,e),t=e.nil,n=(e.breaker,e.slice,e.module),r=e.klass;return e.add_stubs(["$type=","$empty?","$strip","$to_s","$input","$perform","$actor","$performed"]),function($){var a,i=a=n($,"Gamefic"),s=(i.$$proto,i.$$scope);!function($,$super){function n(){}var a,i,s=n=r($,$super,"Activity",n);s.$$proto,s.$$scope;e.defn(s,"$post_initialize",a=function(){var e,$,t=this;return e=["Activity"],$=t,$["$type="].apply($,e),e[e.length-1]},a.$$arity=0),e.defn(s,"$finish",i=function(){var $,n,r=this,a=i.$$p,s=t,o=t,l=t;for(i.$$p=null,o=[],l=0;l$:e["$>"]($)}function t(e,$){return"number"==typeof e&&"number"==typeof $?e-$:e["$-"]($)}function n(e,$){return"number"==typeof e&&"number"==typeof $?e+$:e["$+"]($)}var r=(e.top,e),a=e.nil,i=(e.breaker,e.slice,e.module),s=e.klass,o=e.hash2;return e.add_stubs(["$attr_reader","$attr_writer","$type=","$prompt=","$get_choice","$nil?","$selection","$tell","$actor","$invalid_message","$tell_options","$merge","$options","$private","$=~","$strip","$input","$>","$to_i","$-","$number","$[]","$index","$each","$zero?","$casecmp","$+"]),function(r){var l,u=l=i(r,"Gamefic"),c=(u.$$proto,u.$$scope);!function(r,$super){function i(){}var l,u,c,p,f,d,_,y=i=s(r,$super,"MultipleChoice",i),h=y.$$proto;y.$$scope;h.options=h.invalid_message=a,y.$attr_reader("index"),y.$attr_reader("number"),y.$attr_reader("selection"),y.$attr_writer("invalid_message"),e.defn(y,"$post_initialize",l=function(){var e,$,t=this;return e=["MultipleChoice"],$=t,$["$type="].apply($,e),e[e.length-1],e=["Enter a choice:"],$=t,$["$prompt="].apply($,e),e[e.length-1]},l.$$arity=0),e.defn(y,"$finish",u=function(){var $,t,n=this,r=u.$$p,i=a,s=a;for(u.$$p=null,i=[],s=0;s'+e+"")},t.$$s=r,t.$$arity=1,t),e).call($),i=n(i,""),r.$actor().$tell(i)},_.$$arity=0)}(c.get("Scene"),c.get("Scene").$$scope.get("Custom"))}(r.base)},Opal.modules["gamefic/scene/multiple_scene"]=function(e){var $=(e.top,e),t=e.nil,n=(e.breaker,e.slice,e.module),r=e.klass,a=e.hash2;return e.add_stubs(["$push","$options","$[]=","$option_map","$get_choice","$nil?","$selection","$prepare","$actor","$[]","$each_pair","$entered?","$merge"]),function($){var i,s=i=n($,"Gamefic"),o=(s.$$proto,s.$$scope);!function($,$super){function n(){}var i,s,o,l,u=n=r($,$super,"MultipleScene",n),c=u.$$proto;u.$$scope;c.option_map=t,e.defn(u,"$option_map",i=function(){var e,$=this;return!1!==(e=$.option_map)&&e!==t&&null!=e?e:$.option_map=a([],{})},i.$$arity=0),e.defn(u,"$map",s=function(e,$){var t=this;return t.$options().$push(e),t.$option_map()["$[]="](e,$)},s.$$arity=2),e.defn(u,"$finish",o=function(){var e,$=this;return $.$get_choice(),(e=$.$selection()["$nil?"]())===t||null==e||e.$$is_boolean&&1!=e?$.$actor().$prepare($.$option_map()["$[]"]($.$selection())):t},o.$$arity=0),e.defn(u,"$state",l=function(){var $,n,r,i,s=this,o=l.$$p,u=t,c=t,p=t;for(l.$$p=null,c=[],p=0;p$:e["$>"]($)}var n=(e.top,e),r=e.nil,a=(e.breaker,e.slice,e.module),i=e.klass,s=e.hash2;return e.add_stubs(["$attr_reader","$context_from","$empty?","$new","$execute","$nested?","$denest","$keep_if","$accept?","$!=","$length","$select","$match?","$include?","$nil?","$each","$kind_of?","$+","$arguments","$precision","$downcase","$to_s","$class","$join","$send","$!","$match","$is_a?","$==","$protected","$accessible?","$push","$concat","$subquery_accessible","$children","$private","$split","$pop","$>","$last","$[]"]),function(n){var o,l=o=a(n,"Gamefic"),u=(l.$$proto,l.$$scope);!function(n){var o,l=o=a(n,"Query"),u=(l.$$proto,l.$$scope);!function(n,$super){function a(){}var o,l,u,c,p,f,d,_,y,h,m,b,g=a=i(n,$super,"Base",a),v=g.$$proto,k=g.$$scope;v.precision=v.arguments=r,e.cdecl(k,"NEST_REGEXP",/ in | on | of | from | inside /),g.$attr_reader("arguments"),e.defn(g,"$initialize",o=function(){var e,$=this,t=arguments.length,n=t-0;n<0&&(n=0),e=new Array(n);for(var r=0;r$:e["$>"]($)}function n(e,$){return"number"==typeof e&&"number"==typeof $?e-$:e["$-"]($)}function r(e,$){return"number"==typeof e&&"number"==typeof $?e<$:e["$<"]($)}var a=(e.top,e),i=e.nil,s=(e.breaker,e.slice,e.module),o=e.klass,l=e.hash2;return e.add_stubs(["$attr_reader","$parameters","$nil?","$executor","$class","$call","$verb","$signature","$rank","$meta?","$order_key","$new","$verb=","$meta=","$order_key=","$each","$add_query","$on_execute","$to_proc","$!","$!=","$+","$length","$queries","$arity","$>","$raise","$push","$join","$map","$start_with?","$to_s","$-","$include?","$[]","$==","$remaining","$resolve","$strip","$<","$empty?","$objects","$ambiguous?","$protected"]),function(a){var u,c=u=s(a,"Gamefic"),p=(c.$$proto,c.$$scope);!function(e,$super){function $(){}var t=$=o(e,$super,"ActionArgumentError",$);t.$$proto,t.$$scope}(p.base,p.get("ArgumentError")),function(a,$super){function s(){}var u,c,p,f,d,_,y,h,m,b,g=s=o(a,$super,"Action",s),v=g.$$proto,k=g.$$scope;v.actor=v.parameters=v.executed=i,g.$attr_reader("parameters"),e.defn(g,"$initialize",u=function(e,$){var t=this;return t.actor=e,t.parameters=$,t.executed=!1},u.$$arity=2),e.defn(g,"$arguments",c=function(){return this.$parameters()},c.$$arity=0),e.defn(g,"$execute",p=function(){var $,t=this;return t.executed=!0,($=t.$class().$executor()["$nil?"]())===i||null==$||$.$$is_boolean&&1!=$?($=t.$class().$executor()).$call.apply($,[t.actor].concat(e.to_a(t.parameters))):i},p.$$arity=0),e.defn(g,"$executed?",f=function(){return this.executed},f.$$arity=0),e.defn(g,"$verb",d=function(){return this.$class().$verb()},d.$$arity=0),e.defn(g,"$signature",_=function(){return this.$class().$signature()},_.$$arity=0),e.defn(g,"$rank",y=function(){return this.$class().$rank()},y.$$arity=0),e.defn(g,"$meta?",h=function(){return this.$class()["$meta?"]()},h.$$arity=0),e.defn(g,"$order_key",m=function(){return this.$class().$order_key()},m.$$arity=0),e.defs(g,"$subclass",b=function(n,r,a){var s,o,u,c,p,f,d,_,y,h=this,m=b.$$p,g=m||i,v=i;if(f=e.slice.call(arguments,1,arguments.length),null==(a=e.extract_kwargs(f))||!a.$$is_hash){if(null!=a)throw e.ArgumentError.$new("expected kwargs");a=l([],{})}return null==(d=a.$$smap.meta)&&(d=!1),null==(_=a.$$smap.order_key)&&(_=0),y=0","$verb"]),n.$require("gamefic/command"),function(n){var r,l=r=i(n,"Gamefic"),u=(l.$$proto,l.$$scope);!function(n,$super){function r(){}var i,l,u,c,p,f,d=r=s(n,$super,"Syntax",r),_=d.$$proto,y=d.$$scope;_.token_count=_.regexp=_.verb=_.replace=a,d.$attr_reader("token_count","first_word","verb","template","command"),e.cvars["@@phrase"]="([\\w\\W\\s\\S]*?)",e.defn(d,"$initialize",i=function(n,r){var i,s,o,l,u,c=this,p=a,f=a,d=a,_=a,h=a,m=a,b=a;return p=n.$split_words(),c.token_count=p.$length(),f=r.$split_words(),c.verb=a,p["$[]"](0)["$[]"](0)["$=="](":")?(c.token_count=$(c.token_count,1),c.first_word=""):((i=f["$[]"](0)["$nil?"]()["$!"]())===a||null==i||i.$$is_boolean&&1!=i||(c.verb=f["$[]"](0).$to_sym()),c.first_word=p["$[]"](0).$to_s()),c.command=f.$join(" "),c.template=p.$join(" "),d=[],_=[],h=!1,(i=(s=p).$each,i.$$p=(o=function($){var t;o.$$s;return null==$&&($=a),(t=$.$match(/^:[a-z0-9_]+$/i))===a||null==t||t.$$is_boolean&&1!=t?(d.$push($),h=!1):(_.$push($),!1!==h&&h!==a&&null!=h?a:(d.$push(null==(t=e.cvars["@@phrase"])?a:t),h=!0))},o.$$s=c,o.$$arity=1,o),i).call(s),m=[],b=0,(i=(l=f).$each,i.$$p=(u=function(e){u.$$s;return null==e&&(e=a),e["$[]"](0)["$=="](":")?(b=t(_.$index(e),1),m.$push("{$"+b+"}")):m.$push(e)},u.$$s=c,u.$$arity=1,u),i).call(l),c.replace=m.$join(" "),c.regexp=y.get("Regexp").$new("^"+d.$join(" ")+"$",y.get("Regexp").$$scope.get("IGNORECASE"))},i.$$arity=2),e.defn(d,"$tokenize",l=function(e){var $,t,n,r=this,i=a,s=a,l=a;return i=e.$match(r.regexp),($=i["$nil?"]())===a||null==$||$.$$is_boolean&&1!=$?(s=[],l=function(){return($=r.verb["$nil?"]())===a||null==$||$.$$is_boolean&&1!=$?1:0}(),($=(t=r.replace.$to_s().$split_words()["$[]"](o(l,-1,!1))).$each,$.$$p=(n=function(e){var $;n.$$s;return null==e&&(e=a),($=e.$match(/^\{\$[0-9]+\}$/))===a||null==$||$.$$is_boolean&&1!=$?s.$push(e):s.$push(i["$[]"](e["$[]"](o(2,-2,!1)).$to_i()))},n.$$s=r,n.$$arity=1,n),$).call(t),y.get("Command").$new(r.verb,s)):a},l.$$arity=1),e.defn(d,"$accept?",u=function(e){var $=this;return e.$match($.regexp)["$nil?"]()["$!"]()},u.$$arity=1),e.defn(d,"$signature",c=function(){var e=this;return[e.regexp,e.replace]},c.$$arity=0),e.defn(d,"$==",p=function(e){return this.$signature()["$=="](e.$signature())},p.$$arity=1),e.defs(d,"$tokenize",f=function(e,$){var t,n,r,i,s,o=this,l=a;return l=[],(t=(n=$).$each,t.$$p=(r=function($){var t,n=(r.$$s,a);return null==$&&($=a),n=$.$tokenize(e),(t=n["$nil?"]()["$!"]())===a||null==t||t.$$is_boolean&&1!=t?a:l.$push(n)},r.$$s=o,r.$$arity=1,r),t).call(n),(t=(i=l)["$sort!"],t.$$p=(s=function(e,$){s.$$s;return null==e&&(e=a),null==$&&($=a),e.$arguments().$length()["$=="]($.$arguments().$length())?$.$verb().$to_s()["$<=>"](e.$verb().$to_s()):$.$arguments().$length()["$<=>"](e.$arguments().$length())},s.$$s=o,s.$$arity=2,s),t).call(i),l},f.$$arity=2)}(u.base,null)}(r.base)},Opal.modules["gamefic/source/base"]=function(e){var $=(e.top,e),t=(e.nil,e.breaker,e.slice,e.module),n=e.klass;return e.add_stubs(["$raise"]),function($){var r,a=r=t($,"Gamefic"),i=(a.$$proto,a.$$scope);!function($,$super){function t(){}var r,a,i=t=n($,$super,"Base",t);i.$$proto,i.$$scope;e.defn(i,"$initialize",r=function(){return this.$raise("#initialize must be defined in subclasses")},r.$$arity=0),e.defn(i,"$export",a=function(){return this.$raise("#export must be defined in subclasses")},a.$$arity=1)}(i.get("Source"),null)}($.base)},Opal.modules["gamefic/source/file"]=function(e){function $(e,$){return"number"==typeof e&&"number"==typeof $?e+$:e["$+"]($)}var t=(e.top,e),n=e.nil,r=(e.breaker,e.slice,e.module),a=e.klass;return e.add_stubs(["$attr_reader","$attr_accessor","$each","$join","$+","$file?","$new","$raise"]),function(t){var i,s=i=r(t,"Gamefic"),o=(s.$$proto,s.$$scope);!function(t,$super){function r(){}var i,s,o=r=a(t,$super,"File",r),l=o.$$proto,u=o.$$scope;l.directories=n,e.cvars["@@extensions"]=[".plot.rb",".plot",".rb"],o.$attr_reader("directories"),o.$attr_accessor("main_dir"),e.defn(o,"$initialize",i=function(){var e,$,t=this,r=arguments.length,a=r-0;a<0&&(a=0),$=new Array(a);for(var i=0;i$:e["$>"]($)}var t=e.top,n=e,r=e.nil,a=(e.breaker,e.slice,e.module);return e.add_stubs(["$require","$include","$respond","$to_proc","$playbook","$new","$entities","$each","$resolve","$empty?","$objects","$raise","$>","$length","$push","$[]","$to_sym","$first","$tokenize","$syntaxes","$nil?","$parse","$verb","$arguments","$meta","$disambiguate","$validate","$interpret","$reject","$start_with?","$map","$to_s","$verbs","$actions"]),t.$require("gamefic/action"),function(t){var n,i=n=a(t,"Gamefic"),s=(i.$$proto,i.$$scope);!function(t){var n,i,s,o,l,u,c,p,f,d,_,y,h=n=a(t,"Commands"),m=(h.$$proto,h.$$scope);h.$include(m.get("Gamefic").$$scope.get("Plot").$$scope.get("Entities")),e.defn(h,"$respond",i=function($){var t,n,a,s=this,o=i.$$p,l=o||r,u=arguments.length,c=u-1;c<0&&(c=0),a=new Array(c);for(var p=1;p$:e["$>"]($)}var t=(e.top,e),n=e.nil,r=(e.breaker,e.slice,e.module),a=e.klass,i=e.hash2;return e.add_stubs(["$new","$to_proc","$==","$kind_of?","$raise","$push","$p_entities","$running?","$p_dynamic","$make","$playbooks","$playbook","$include?","$delete","$p_players","$parent=","$match","$entities","$length","$objects","$>","$[]","$clone","$private"]),function(t){var s,o=s=r(t,"Gamefic"),l=(o.$$proto,o.$$scope);!function(t,$super){function s(){}var o=s=a(t,$super,"Plot",s),l=(o.$$proto,o.$$scope);(function(t){var a,s,o,l,u,c,p,f,d,_,y=a=r(t,"Entities"),h=(y.$$proto,y.$$scope);e.defn(y,"$make",s=function(e,$){var t,r,a=this,o=s.$$p,l=o||n,u=n;return null==$&&($=i([],{})),s.$$p=null,u=(t=(r=e).$new,t.$$p=l.$to_proc(),t).call(r,$),u["$kind_of?"](h.get("Entity"))["$=="](!1)&&a.$raise("Invalid entity class"),a.$p_entities().$push(u),(t=a["$running?"]())===n||null==t||t.$$is_boolean&&1!=t||a.$p_dynamic().$push(u),u},s.$$arity=-2),e.defn(y,"$cast",o=function(e,$){var t,r,a=this,s=o.$$p,l=s||n,u=n;return null==$&&($=i([],{})),o.$$p=null,u=(t=(r=a).$make,t.$$p=l.$to_proc(),t).call(r,e,$),u.$playbooks().$push(a.$playbook()),u},o.$$arity=-2),e.defn(y,"$destroy",l=function(e){var $,t,r=this;return($=r.$p_dynamic()["$include?"](e))===n||null==$||$.$$is_boolean&&1!=$||(r.$p_entities().$delete(e),r.$p_dynamic().$delete(e),r.$p_players().$delete(e)),$=[n],t=e,t["$parent="].apply(t,$),$[$.length-1]},l.$$arity=1),e.defn(y,"$pick",u=function(e){var t,r=this,a=n,i=n;return a=h.get("Gamefic").$$scope.get("Query").$$scope.get("Base").$new(),i=a.$match(e,r.$entities()),i.$objects().$length()["$=="](0)?r.$raise(h.get("IndexError").$new("Unable to find entity from '"+e+"'")):(t=$(i.$objects().$length(),1))===n||null==t||t.$$is_boolean&&1!=t||r.$raise(h.get("IndexError").$new("Ambiguous entities found from '"+e+"'")),i.$objects()["$[]"](0)},u.$$arity=1),e.defn(y,"$entities",c=function(){return this.$p_entities().$clone()},c.$$arity=0),e.defn(y,"$players",p=function(){return this.$p_players().$clone()},p.$$arity=0),y.$private(),e.defn(y,"$p_entities",f=function(){var e,$=this;return null==$.p_entities&&($.p_entities=n),!1!==(e=$.p_entities)&&e!==n&&null!=e?e:$.p_entities=[]},f.$$arity=0),e.defn(y,"$p_players",d=function(){var e,$=this;return null==$.p_players&&($.p_players=n),!1!==(e=$.p_players)&&e!==n&&null!=e?e:$.p_players=[]},d.$$arity=0),e.defn(y,"$p_dynamic",_=function(){var e,$=this;return null==$.p_dynamic&&($.p_dynamic=n),!1!==(e=$.p_dynamic)&&e!==n&&null!=e?e:$.p_dynamic=[]},_.$$arity=0)})(l.base)}(l.base,null)}(t.base)},Opal.modules["gamefic/plot/articles"]=function(e){var $=(e.top,e),t=(e.nil,e.breaker,e.slice,e.module);return e.add_stubs(["$indefinitely","$definitely","$cap_first"]),function($){var n,r=n=t($,"Gamefic"),a=(r.$$proto,r.$$scope);!function($){var n,r,a,i,s,o,l,u=n=t($,"Articles");u.$$proto,u.$$scope;e.defn(u,"$a",r=function(e){return e.$indefinitely()},r.$$arity=1),e.defn(u,"$an",a=function(e){return e.$indefinitely()},a.$$arity=1),e.defn(u,"$the",i=function(e){return e.$definitely()},i.$$arity=1),e.defn(u,"$A",s=function(e){return e.$indefinitely().$cap_first()},s.$$arity=1),e.defn(u,"$An",o=function(e){return e.$indefinitely().$cap_first()},o.$$arity=1),e.defn(u,"$The",l=function(e){return e.$definitely().$cap_first()},l.$$arity=1)}(a.get("Plot"))}($.base)},Opal.modules["gamefic/plot/you_mount"]=function(e){var $=e.top,t=e,n=e.nil,r=(e.breaker,e.slice,e.module),a=e.klass;return e.add_stubs(["$require","$include","$nil?","$new","$person="]),$.$require("gamefic/grammar"),function($){var t,i=t=r($,"Gamefic"),s=(i.$$proto,i.$$scope);!function($){var t,i,s=t=r($,"YouMount"),o=(s.$$proto,s.$$scope);!function(e,$super){function $(){}var t=$=a(e,$super,"YouGrammarSet",$),n=(t.$$proto,t.$$scope);t.$include(n.get("Grammar").$$scope.get("Gender")),t.$include(n.get("Grammar").$$scope.get("Person")),t.$include(n.get("Grammar").$$scope.get("Plural")),t.$include(n.get("Grammar").$$scope.get("WordAdapter"))}(o.base,null),e.defn(s,"$you",i=function(){var e,$,t=this;return null==t.you&&(t.you=n),(e=t.you["$nil?"]())===n||null==e||e.$$is_boolean&&1!=e||(t.you=o.get("YouGrammarSet").$new(),e=[2],$=t.you,$["$person="].apply($,e),e[e.length-1]),t.you},i.$$arity=0)}(s.get("Plot"))}(t.base)},Opal.modules.json=function(e){var $=(e.top,e),t=e.nil,n=(e.breaker,e.slice,e.module),r=e.hash2,a=e.klass;return e.add_stubs(["$new","$push","$[]=","$[]","$create_id","$json_create","$attr_accessor","$create_id=","$===","$parse","$generate","$from_object","$merge","$to_json","$responds_to?","$to_io","$write","$to_s","$to_a","$strftime"]),function($){function a($,n){var r,i,s,o,l,u;switch(typeof $){case"string":case"number":return $;case"boolean":return!!$;case"null":return t;case"object":if(!$)return t;if($.$$is_array){for(i=n.array_class.$new(),o=0,l=$.length;o":(u=o.$player_store().$index(e),($=u["$nil?"]())===r||null==$||$.$$is_boolean&&1!=$?"#":(o.$raise(e+" not found in plot"),r))):"#":(l=s([],{}),($=(a=e).$each_pair,$.$$p=(i=function(e,$){var t=i.$$s||this;return null==e&&(e=r),null==$&&($=r),l["$[]="](t.$serialize(e),t.$serialize($))},i.$$s=o,i.$$arity=2,i),$).call(a),l):(l=[],($=(t=e).$each,$.$$p=(n=function(e){var $=n.$$s||this;return null==e&&(e=r),l.$push($.$serialize(e))},n.$$s=o,n.$$arity=1,n),$).call(t),l)},_.$$arity=1),e.defn(x,"$unserialize",y=function(e){var $,t,n,a,i,o=this,l=r,u=r;return($=e["$kind_of?"](j.get("Array")))===r||null==$||$.$$is_boolean&&1!=$?($=e["$kind_of?"](j.get("Hash")))===r||null==$||$.$$is_boolean&&1!=$?($=e["$kind_of?"](j.get("String")))===r||null==$||$.$$is_boolean&&1!=$?e:($=u=e.$match(/#/))===r||null==$||$.$$is_boolean&&1!=$?($=u=e.$match(/#/))===r||null==$||$.$$is_boolean&&1!=$?($=u=e.$match(/#/))===r||null==$||$.$$is_boolean&&1!=$?e:o.$player_store()["$[]"](u["$[]"](1).$to_i()):o.$entity_store()["$[]"](u["$[]"](1).$to_i()):o.$plot().$scene_classes()["$[]"](u["$[]"](1).$to_i()):(l=s([],{}),($=(a=e).$each_pair,$.$$p=(i=function(e,$){var t=i.$$s||this;return null==e&&(e=r),null==$&&($=r),l["$[]="](t.$unserialize(e),t.$unserialize($))},i.$$s=o,i.$$arity=2,i),$).call(a),l):(l=[],($=(t=e).$each,$.$$p=(n=function(e){var $=n.$$s||this;return null==e&&(e=r),l.$push($.$unserialize(e))},n.$$s=o,n.$$arity=1,n),$).call(t),l)},y.$$arity=1),e.defn(x,"$rebuild1",h=function(e,$){var t,n,a,i=this;return(t=(n=$).$each_pair,t.$$p=(a=function($,t){var n,i=a.$$s||this;return null==$&&($=r),null==t&&(t=r),(n=$.$to_s()["$start_with?"]("@"))===r||null==n||n.$$is_boolean&&1!=n?r:e.$instance_variable_set($,i.$unserialize(t))},a.$$s=i,a.$$arity=2,a),t).call(n)},h.$$arity=2),e.defn(x,"$rebuild2",m=function(e,$){var t,n,a,i=this;return(t=(n=$).$each_pair,t.$$p=(a=function($,t){var n,i,s=a.$$s||this;return null==$&&($=r),null==t&&(t=r),i=$.$to_s()["$!="]("class"),(n=!1!==i&&i!==r&&null!=i?$.$to_s()["$start_with?"]("@")["$!"]():i)===r||null==n||n.$$is_boolean&&1!=n?r:e.$send($+"=",s.$unserialize(t))},a.$$s=i,a.$$arity=2,a),t).call(n)},m.$$arity=2),e.defn(x,"$hash_subplot",b=function(e){var $,t,n,a,i,o,l,u=this,c=r;return c=s(["entities","instance_variables","theater_instance_variables"],{entities:[],instance_variables:s([],{}),theater_instance_variables:s([],{})}),($=(t=e.$instance_variables()).$each,$.$$p=(n=function($){var t,a=n.$$s||this,i=r;return null==$&&($=r),i=e.$instance_variable_get($),(t=a["$can_serialize?"](i))===r||null==t||t.$$is_boolean&&1!=t?r:c["$[]"]("instance_variables")["$[]="]($,a.$serialize(i))},n.$$s=u,n.$$arity=1,n),$).call(t),($=(a=e.$theater().$instance_variables()).$each,$.$$p=(i=function($){var t,n=i.$$s||this,a=r;return null==$&&($=r),a=e.$theater().$instance_variable_get($),(t=n["$can_serialize?"](a))===r||null==t||t.$$is_boolean&&1!=t?r:c["$[]"]("theater_instance_variables")["$[]="]($,n.$serialize(a))},i.$$s=u,i.$$arity=1,i),$).call(a),($=(o=e.$entities()).$each,$.$$p=(l=function(e){var $=l.$$s||this;return null==e&&(e=r),c["$[]"]("entities").$push($.$serialize(e))},l.$$s=u,l.$$arity=1,l),$).call(o),c["$[]="]("class",e.$class().$to_s().$split("::").$last()),c},b.$$arity=1),e.defn(x,"$rebuild_subplot",g=function(e,$){var n,a,i,s,o,l,u,c,p,f=this,d=r;return(n=(a=e.$entities()).$each,n.$$p=(i=function($){i.$$s;return null==$&&($=r),e.$destroy($)},i.$$s=f,i.$$arity=1,i),n).call(a),(n=(s=$["$[]"]("instance_variables")).$each_pair,n.$$p=(o=function($,t){var n=o.$$s||this;return null==$&&($=r),null==t&&(t=r),e.$instance_variable_set($,n.$unserialize(t))},o.$$s=f,o.$$arity=2,o),n).call(s),(n=(l=$["$[]"]("theater_instance_variables")).$each_pair,n.$$p=(u=function($,t){var n=u.$$s||this;return null==$&&($=r),null==t&&(t=r),e.$theater().$instance_variable_set($,n.$unserialize(t))},u.$$s=f,u.$$arity=2,u),n).call(l),d=0,(n=(c=$["$[]"]("entities")).$each,n.$$p=(p=function($){var n=p.$$s||this;return null==$&&($=r),e.$add_entity(n.$unserialize($)),d=t(d,1)},p.$$s=f,p.$$arity=1,p),n).call(c)},g.$$arity=2),e.defn(x,"$entity_store",v=function(){var e,$=this;return!1!==(e=$.entity_store)&&e!==r&&null!=e?e:$.entity_store=[]},v.$$arity=0),e.defn(x,"$player_store",k=function(){var e,$=this;return!1!==(e=$.player_store)&&e!==r&&null!=e?e:$.player_store=[]},k.$$arity=0),e.defn(x,"$hash_entity",w=function(e){var $,t,n,a=this,i=r;return i=s([],{}),($=(t=e.$instance_variables()).$each,$.$$p=(n=function($){var t,a,s=n.$$s||this,o=r;return null==$&&($=r),o=e.$instance_variable_get($),(t=!1!==(a=s.$hash_blacklist()["$include?"]($))&&a!==r&&null!=a?a:s["$can_serialize?"](o)["$!"]())===r||null==t||t.$$is_boolean&&1!=t?i["$[]="]($,s.$serialize(o)):r},n.$$s=a,n.$$arity=1,n),$).call(t),i["$[]="]("class",e.$class().$to_s().$split("::").$last()),i["$[]="]("parent",a.$serialize(e.$parent())),i},w.$$arity=1)}(c.get("Plot"),null)}(n.base)},Opal.modules["gamefic/subplot"]=function(e){var $=e.top,t=e,n=e.nil,r=(e.breaker,e.slice,e.module),a=e.klass,i=e.hash2;return e.add_stubs(["$require","$include","$attr_reader","$protected","$nil?","$start_proc","$class","$stage","$to_proc","$freeze","$playbook","$introduce","$push","$default_scene","$plot","$default_conclusion","$new","$include?","$playbooks","$delete","$cue","$p_players","$each","$destroy","$entities","$exeunt","$players","$empty?","$conclude","$concluded?","$call_ready","$call_player_ready","$call_player_update","$call_update"]),$.$require("gamefic/plot"),function($){var t,s=t=r($,"Gamefic"),o=(s.$$proto,s.$$scope);!function($,$super){function t(){}var r,s,o,l,u,c,p,f,d,_,y,h,m,b=t=a($,$super,"Subplot",t),g=b.$$proto,v=b.$$scope;g.p_entities=g.playbook=g.next_cue=g.concluded=n,b.$include(v.get("Plot").$$scope.get("Theater")),b.$include(v.get("Plot").$$scope.get("Entities")),b.$include(v.get("Plot").$$scope.get("Commands")),b.$include(v.get("Plot").$$scope.get("Callbacks")),b.$include(v.get("Plot").$$scope.get("Scenes")),b.$include(v.get("Plot").$$scope.get("Articles")),b.$attr_reader("plot"),function($){var t;$.$$scope,$.$$proto;$.$attr_reader("start_proc"),$.$protected(),e.defn($,"$on_start",t=function(){var e=this,$=t.$$p,r=$||n;return t.$$p=null,e.start_proc=r},t.$$arity=0)}(e.get_singleton_class(b)),e.defn(b,"$initialize",r=function($,t){var r,a,s,o,l=this;if(null==t||!t.$$is_hash){if(null!=t)throw e.ArgumentError.$new("expected kwargs");t=i([],{})}return null==(s=t.$$smap.introduce)&&(s=n),null==(o=t.$$smap.next_cue)&&(o=n),l.plot=$,l.next_cue=o,l.concluded=!1,((r=l.$class().$start_proc()["$nil?"]())===n||null==r||r.$$is_boolean&&1!=r)&&(r=(a=l).$stage,r.$$p=l.$class().$start_proc().$to_proc(),r).call(a),l.$playbook().$freeze(),(r=s["$nil?"]())===n||null==r||r.$$is_boolean&&1!=r?l.$introduce(s):n},r.$$arity=-2),e.defn(b,"$add_entity",s=function(e){return this.p_entities.$push(e)},s.$$arity=1),e.defn(b,"$subplot",o=function(){return this},o.$$arity=0),e.defn(b,"$default_scene",l=function(){return this.$plot().$default_scene()},l.$$arity=0),e.defn(b,"$default_conclusion",u=function(){return this.$plot().$default_conclusion()},u.$$arity=0),e.defn(b,"$playbook",c=function(){var e,$=this;return!1!==(e=$.playbook)&&e!==n&&null!=e?e:$.playbook=v.get("Gamefic").$$scope.get("Plot").$$scope.get("Playbook").$new()},c.$$arity=0),e.defn(b,"$cast",p=function($,t){var r,a,s=this,o=p.$$p,l=n,u=n,c=n;for(null==t&&(t=i([],{})),p.$$p=null,u=[],c=0;c$:e["$>"]($)}function t(e,$){return"number"==typeof e&&"number"==typeof $?e+$:e["$+"]($)}var n=(e.top,e),r=e.nil,a=(e.breaker,e.slice,e.module),i=e.klass,s=e.hash2,o=e.range;return e.add_stubs(["$flatten","$values","$keys","$new","$each","$push","$definitely","$tell","$join_or","$to_proc","$meta=","$[]","$subclass","$raise_order_key","$add_action","$add_syntax","$>","$length","$concat","$dispatch_from_params","$empty?","$dispatch_from_string","$join","$tokenize","$syntaxes","$actions_for","$verb","$hidden?","$attempt","$arguments","$nil?","$unshift","$sort_and_reduce_actions","$valid?","$dup","$freeze","$private","$[]=","$generate_default_syntax","$gsub","$to_s","$include?","$+","$queries","$strip","$==","$raise","$uniq!","$sort!","$token_count","$<=>","$first_word","$uniq","$class","$sort","$rank","$order_key"]),function(n){var l,u=l=a(n,"Gamefic"),c=(u.$$proto,u.$$scope);!function(n,$super){function a(){}var l=a=i(n,$super,"Plot",a),u=(l.$$proto,l.$$scope);(function(n,$super){function a(){}var l,u,c,p,f,d,_,y,h,m,b,g,v,k,w,x,q,j,G,z,S,O,P=a=i(n,$super,"Playbook",a),E=P.$$proto,A=P.$$scope;E.syntaxes=E.commands=E.validators=E.disambiguator=r,e.defn(P,"$initialize",l=function($){var t,n,a,i,o=this;if(null==$||!$.$$is_hash){if(null!=$)throw e.ArgumentError.$new("expected kwargs");$=s([],{})}return null==(t=$.$$smap.commands)&&(t=s([],{})),null==(n=$.$$smap.syntaxes)&&(n=[]),null==(a=$.$$smap.validators)&&(a=[]),null==(i=$.$$smap.disambiguator)&&(i=r),o.commands=t,o.syntaxes=n,o.validators=a,o.disambiguator=i},l.$$arity=-1),e.defn(P,"$syntaxes",u=function(){return this.syntaxes},u.$$arity=0),e.defn(P,"$actions",c=function(){return this.commands.$values().$flatten()},c.$$arity=0),e.defn(P,"$verbs",p=function(){return this.commands.$keys()},p.$$arity=0),e.defn(P,"$validators",f=function(){return this.validators},f.$$arity=0),e.defn(P,"$disambiguator",d=function(){var e,$,t,n,a=this;return!1!==(e=a.disambiguator)&&e!==r&&null!=e?e:a.disambiguator=($=(t=A.get("Action")).$new,$.$$p=(n=function(e,$){var t,a,i,s=n.$$s||this,o=r;return null==e&&(e=r),null==$&&($=r),o=[],(t=(a=$).$each,t.$$p=(i=function(e){i.$$s;return null==e&&(e=r),o.$push(e.$definitely())},i.$$s=s,i.$$arity=1,i),t).call(a),e.$tell("I don't know which you mean: "+o.$join_or()+".")},n.$$s=a,n.$$arity=2,n),$).call(t,r,A.get("Query").$$scope.get("Base").$new())},d.$$arity=0),e.defn(P,"$disambiguate",_=function(){var e,$,t,n=this,a=_.$$p,i=a||r;return _.$$p=null,n.disambiguator=(e=($=A.get("Action")).$new,e.$$p=i.$to_proc(),e).call($,r,A.get("Query").$$scope.get("Base").$new()),e=[!0],t=n.disambiguator,t["$meta="].apply(t,e),e[e.length-1],n.disambiguator},_.$$arity=0),e.defn(P,"$validate",y=function(){var e=this,$=y.$$p,t=$||r;return y.$$p=null,e.validators.$push(t)},y.$$arity=0),e.defn(P,"$actions_for",h=function(e){var $;return!1!==($=this.commands["$[]"](e))&&$!==r&&null!=$?$:[]},h.$$arity=1),e.defn(P,"$respond",m=function($){var t,n,a,i=this,o=m.$$p,l=o||r,u=r,c=arguments.length,p=c-1;p<0&&(p=0),a=new Array(p);for(var f=1;f"](e.$first_word()):$.$token_count()["$<=>"](e.$token_count())},n.$$s=a,n.$$arity=2,n),$).call(t)},z.$$arity=1),e.defn(P,"$sort_and_reduce_actions",S=function(e){var $,t,n,a,i,s,o=this;return($=(t=(a=(i=e).$sort,a.$$p=(s=function(e,$){s.$$s;return null==e&&(e=r),null==$&&($=r),e.$rank()["$=="]($.$rank())?$.$order_key()["$<=>"](e.$order_key()):$.$rank()["$<=>"](e.$rank())},s.$$s=o,s.$$arity=2,s),a).call(i)).$uniq,$.$$p=(n=function(e){n.$$s;return null==e&&(e=r),e.$class()},n.$$s=o,n.$$arity=1,n),$).call(t)},S.$$arity=1),e.defn(P,"$raise_order_key",O=function(){var $,n,a=r;return!1!==($=null==(n=e.cvars["@@order_key"])?r:n)&&$!==r&&null!=$||(e.cvars["@@order_key"]=0),a=null==($=e.cvars["@@order_key"])?r:$,e.cvars["@@order_key"]=t(null==($=e.cvars["@@order_key"])?r:$,1),a},O.$$arity=0)})(u.base,null)}(c.base,null)}(n.base)},Opal.modules["gamefic/plot/callbacks"]=function(e){var $=(e.top,e),t=e.nil,n=(e.breaker,e.slice,e.module);return e.add_stubs(["$push","$p_ready_procs","$p_update_procs","$p_player_ready_procs","$p_before_player_update_procs","$p_player_update_procs","$private","$each","$call","$flush","$p_players","$nil?","$next_scene","$cue","$scene","$default_scene"]),function($){var r,a=r=n($,"Gamefic"),i=(a.$$proto,a.$$scope);!function($){var r,a,i,s,o,l,u,c,p,f,d,_,y,h,m,b,g=r=n($,"Callbacks");g.$$proto,g.$$scope;e.defn(g,"$on_ready",a=function(){var e=this,$=a.$$p,n=$||t;return a.$$p=null,e.$p_ready_procs().$push(n)},a.$$arity=0),e.defn(g,"$on_update",i=function(){var e=this,$=i.$$p,n=$||t;return i.$$p=null,e.$p_update_procs().$push(n)},i.$$arity=0),e.defn(g,"$on_player_ready",s=function(){var e=this,$=s.$$p,n=$||t;return s.$$p=null,e.$p_player_ready_procs().$push(n)},s.$$arity=0),e.defn(g,"$before_player_update",o=function(){var e=this,$=o.$$p,n=$||t;return o.$$p=null,e.$p_before_player_update_procs().$push(n)},o.$$arity=0),e.defn(g,"$on_player_update",l=function(){var e=this,$=l.$$p,n=$||t;return l.$$p=null,e.$p_player_update_procs().$push(n)},l.$$arity=0),g.$private(),e.defn(g,"$call_ready",u=function(){var e,$,n,r=this;return(e=($=r.$p_ready_procs()).$each,e.$$p=(n=function(e){n.$$s;return null==e&&(e=t),e.$call()},n.$$s=r,n.$$arity=1,n),e).call($)},u.$$arity=0),e.defn(g,"$call_update",c=function(){var e,$,n,r=this;return(e=($=r.$p_update_procs()).$each,e.$$p=(n=function(e){n.$$s;return null==e&&(e=t),e.$call()},n.$$s=r,n.$$arity=1,n),e).call($)},c.$$arity=0),e.defn(g,"$call_before_player_update",p=function(){var e,$,n,r=this;return(e=($=r.$p_players()).$each,e.$$p=(n=function(e){var $,r,a,i=n.$$s||this;return null==e&&(e=t),e.$flush(),($=(r=i.$p_before_player_update_procs()).$each,$.$$p=(a=function($){a.$$s;return null==$&&($=t),$.$call(e)},a.$$s=i,a.$$arity=1,a),$).call(r)},n.$$s=r,n.$$arity=1,n),e).call($)},p.$$arity=0),e.defn(g,"$call_player_ready",f=function(){var e,$,n,r=this;return(e=($=r.$p_players()).$each,e.$$p=(n=function(e){var $,r,a,i=n.$$s||this;return null==e&&(e=t),(($=e.$next_scene()["$nil?"]())===t||null==$||$.$$is_boolean&&1!=$)&&e.$cue(e.$next_scene()),($=e.$scene()["$nil?"]())===t||null==$||$.$$is_boolean&&1!=$||e.$cue(i.$default_scene()),($=(r=i.$p_player_ready_procs()).$each,$.$$p=(a=function($){a.$$s;return null==$&&($=t),$.$call(e)},a.$$s=i,a.$$arity=1,a),$).call(r)},n.$$s=r,n.$$arity=1,n),e).call($)},f.$$arity=0),e.defn(g,"$call_player_update",d=function(){var e,$,n,r=this;return(e=($=r.$p_players()).$each,e.$$p=(n=function(e){var $,r,a,i=n.$$s||this;return null==e&&(e=t),($=(r=i.$p_player_update_procs()).$each,$.$$p=(a=function($){a.$$s;return null==$&&($=t),$.$call(e)},a.$$s=i,a.$$arity=1,a),$).call(r)},n.$$s=r,n.$$arity=1,n),e).call($)},d.$$arity=0),e.defn(g,"$p_ready_procs",_=function(){var e,$=this;return null==$.p_ready_procs&&($.p_ready_procs=t),!1!==(e=$.p_ready_procs)&&e!==t&&null!=e?e:$.p_ready_procs=[]},_.$$arity=0),e.defn(g,"$p_update_procs",y=function(){var e,$=this;return null==$.p_update_procs&&($.p_update_procs=t),!1!==(e=$.p_update_procs)&&e!==t&&null!=e?e:$.p_update_procs=[]},y.$$arity=0),e.defn(g,"$p_before_player_update_procs",h=function(){var e,$=this;return null==$.p_before_player_update_procs&&($.p_before_player_update_procs=t),!1!==(e=$.p_before_player_update_procs)&&e!==t&&null!=e?e:$.p_before_player_update_procs=[]},h.$$arity=0),e.defn(g,"$p_player_ready_procs",m=function(){var e,$=this;return null==$.p_player_ready_procs&&($.p_player_ready_procs=t),!1!==(e=$.p_player_ready_procs)&&e!==t&&null!=e?e:$.p_player_ready_procs=[]},m.$$arity=0),e.defn(g,"$p_player_update_procs",b=function(){var e,$=this
;return null==$.p_player_update_procs&&($.p_player_update_procs=t),!1!==(e=$.p_player_update_procs)&&e!==t&&null!=e?e:$.p_player_update_procs=[]},b.$$arity=0)}(i.get("Plot"))}($.base)},Opal.modules["gamefic/plot/theater"]=function(e){var $=(e.top,e),t=e.nil,n=(e.breaker,e.slice,e.module);return e.add_stubs(["$nil?","$module_eval","$theater","$module_exec","$to_proc","$new","$define_singleton_method","$public_send","$raise","$class_exec","$include"]),function($){var r,a=r=n($,"Gamefic"),i=(a.$$proto,a.$$scope);!function($){var r,a,i,s=r=n($,"Theater"),o=(s.$$proto,s.$$scope);e.defn(s,"$stage",a=function(){var $,n,r,i,s=this,o=a.$$p,l=o||t,u=arguments.length,c=u-0;c<0&&(c=0),i=new Array(c);for(var p=0;p