2023-04-18 04:35:28 +00:00
import { _ as s , c as e , o as a , N as n } from "./chunks/framework.0799945b.js" ; const d = JSON . parse ( '{"title":"Creating Features","description":"","frontmatter":{},"headers":[],"relativePath":"guide/advanced-concepts/creating-features.md","lastUpdated":1681792472000}' ) , o = { name : "guide/advanced-concepts/creating-features.md" } , t = n ( ` <h1 id="creating-features" tabindex="-1">Creating Features <a class="header-anchor" href="#creating-features" aria-label="Permalink to "Creating Features""> </a></h1><p>Profectus is designed to encourage the developer to eventually start designing their own features for use in specific games. Features are designed to work where they require minimal (and typically zero) modifications around the code base - you simply write a single file for the feature, and any vue components it needs, and the act of importing that feature will set everything up. This also means you can share these features with others in entire collections, and any they don't use won't be present in the build output, won't be loaded, and won't affect the project in any way.</p><h2 id="creating-the-feature" tabindex="-1">Creating the Feature <a class="header-anchor" href="#creating-the-feature" aria-label="Permalink to "Creating the Feature""> </a></h2><p>Every feature has a couple of types. They have the feature themselves, a generic version for convenience, and any constructor typically has an options type and a type that gets "added" to it to create the feature itself. These typically involve replacing some types to denote how various properties change from, for example, <code>Computable<X></code> to <code>ProcessedComputable<X></code>. You should be able to use any of the existing features as a reference for how these types look and work.</p><p>Most significantly, the base type should typically always have a <code>type</code> property pointing to a symbol unique to this feature, so they can be easily differentiated at runtime. If it's a feature that should be renderable, then it'll also need <code>[Component]</code> and <code>[GatherProps]</code> properties, which describe the vue component to use and how to get the props for it from this feature, as well as a unique ID for the feature's <a href="./nodes">node</a>. You cna use the <a href="/api/modules/features/feature#getuniqueid">getUniqueID</a> utility to help.</p><p>The constructor itself should do several things. They should take their options within a function, so that they're not resolved when the object is constructed. It should return a lazy proxy of the feature, which allows features to reference each other and only resolve themselves once every feature is defined. The constructor should create any persistent refs it may require outside of the lazy proxy - it won't have access to the options at this point, so it should make any it <em>potentially</em> may require. Any that turn out not being needed can be <a href="/api/modules/game/persistence#deletepersistent">deleted</a>. Inside the lazy proxy the constructor should create the options object, assign onto it every property from the base type, call <a href="/api/modules/util/computed#processcomputable">processComputable</a> on every computable type, and <a href="/api/modules/features/feature#setdefault">setDefault</a> on any property with a default value. Then you should be able to simply return the options object, likely with a type cast, and the constructor will be complete.</p><p>Because typescript does not emit JS, if a property is supposed to be a function it is impossible to differentiate between a function that is itself the intended value or a function that returns the actual value. For this reason it is not recommended for any feature types to include properties that are <code>Computable<Function></code>s, and all functions <em>will</em> be wrapped in <code>computed</code>. The notable exception to this is <a href="./../important-concepts/coercable#render-functions-jsx">JSX</a>, which uses a utility function to mark that a functi
2023-04-08 15:14:26 +00:00
< span class = "line" > < span style = "color:#F07178;" > < / s p a n > < s p a n s t y l e = " c o l o r : # C 7 9 2 E A ; " > i n t e r f a c e < / s p a n > < s p a n s t y l e = " c o l o r : # F 0 7 1 7 8 ; " > < / s p a n > < s p a n s t y l e = " c o l o r : # F F C B 6 B ; " > S e t t i n g s < / s p a n > < s p a n s t y l e = " c o l o r : # F 0 7 1 7 8 ; " > < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > { < / s p a n > < / s p a n >
< span class = "line" > < span style = "color:#F07178;" > hideChallenges < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > : < / s p a n > < s p a n s t y l e = " c o l o r : # F 0 7 1 7 8 ; " > < / s p a n > < s p a n s t y l e = " c o l o r : # F F C B 6 B ; " > b o o l e a n < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > ; < / s p a n > < / s p a n >
< span class = "line" > < span style = "color:#F07178;" > < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > } < / s p a n > < / s p a n >
< span class = "line" > < span style = "color:#89DDFF;" > } < / s p a n > < / s p a n > < / c o d e > < / p r e > < / d i v > < p > N e x t y o u m u s t s e t t h e d e f a u l t v a l u e o f t h i s s e t t i n g w h e n t h e s e t t i n g s i s l o a d e d , w h i c h h a p p e n s d u r i n g t h e < c o d e > l o a d S e t t i n g s < / c o d e > e v e n t e m i t t e d o n t h e < a h r e f = " / a p i / m o d u l e s / g a m e / e v e n t s # g l o b a l b u s " > g l o b a l b u s < / a > . T h i s i s h o w t h a t l o o k s l i k e f o r t h e s a m e < c o d e > h i d e C h a l l e n g e s < / c o d e > s e t t i n g f r o m a b o v e : < / p > < d i v c l a s s = " l a n g u a g e - t s " > < b u t t o n t i t l e = " C o p y C o d e " c l a s s = " c o p y " > < / b u t t o n > < s p a n c l a s s = " l a n g " > t s < / s p a n > < p r e c l a s s = " s h i k i m a t e r i a l - t h e m e - p a l e n i g h t " > < c o d e > < s p a n c l a s s = " l i n e " > < s p a n s t y l e = " c o l o r : # A 6 A C C D ; " > g l o b a l B u s < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > . < / s p a n > < s p a n s t y l e = " c o l o r : # 8 2 A A F F ; " > o n < / s p a n > < s p a n s t y l e = " c o l o r : # A 6 A C C D ; " > ( < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > & q u o t ; < / s p a n > < s p a n s t y l e = " c o l o r : # C 3 E 8 8 D ; " > l o a d S e t t i n g s < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > & q u o t ; < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > , < / s p a n > < s p a n s t y l e = " c o l o r : # A 6 A C C D ; " > < / s p a n > < s p a n s t y l e = " c o l o r : # A 6 A C C D ; f o n t - s t y l e : i t a l i c ; " > s e t t i n g s < / s p a n > < s p a n s t y l e = " c o l o r : # A 6 A C C D ; " > < / s p a n > < s p a n s t y l e = " c o l o r : # C 7 9 2 E A ; " > = & g t ; < / s p a n > < s p a n s t y l e = " c o l o r : # A 6 A C C D ; " > < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > { < / s p a n > < / s p a n >
< span class = "line" > < span style = "color:#F07178;" > < / s p a n > < s p a n s t y l e = " c o l o r : # 8 2 A A F F ; " > s e t D e f a u l t < / s p a n > < s p a n s t y l e = " c o l o r : # F 0 7 1 7 8 ; " > ( < / s p a n > < s p a n s t y l e = " c o l o r : # A 6 A C C D ; " > s e t t i n g s < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > , < / s p a n > < s p a n s t y l e = " c o l o r : # F 0 7 1 7 8 ; " > < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > & q u o t ; < / s p a n > < s p a n s t y l e = " c o l o r : # C 3 E 8 8 D ; " > h i d e C h a l l e n g e s < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > & q u o t ; < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > , < / s p a n > < s p a n s t y l e = " c o l o r : # F 0 7 1 7 8 ; " > < / s p a n > < s p a n s t y l e = " c o l o r : # F F 9 C A C ; " > f a l s e < / s p a n > < s p a n s t y l e = " c o l o r : # F 0 7 1 7 8 ; " > ) < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > ; < / s p a n > < / s p a n >
< span class = "line" > < span style = "color:#89DDFF;" > } < / s p a n > < s p a n s t y l e = " c o l o r : # A 6 A C C D ; " > ) < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > ; < / s p a n > < / s p a n > < / c o d e > < / p r e > < / d i v > < p > F i n a l l y , y o u & # 3 9 ; l l n e e d t o r e g i s t e r a V u e c o m p o n e n t t o t h e s e t t i n g s m e n u s o t h e p l a y e r c a n a c t u a l l y m o d i f y t h i s s e t t i n g . H e r e & # 3 9 ; s t h e e x a m p l e f o r t h e < c o d e > h i d e C h a l l e n g e s < / c o d e > s e t t i n g : < / p > < d i v c l a s s = " l a n g u a g e - t s " > < b u t t o n t i t l e = " C o p y C o d e " c l a s s = " c o p y " > < / b u t t o n > < s p a n c l a s s = " l a n g " > t s < / s p a n > < p r e c l a s s = " s h i k i m a t e r i a l - t h e m e - p a l e n i g h t " > < c o d e > < s p a n c l a s s = " l i n e " > < s p a n s t y l e = " c o l o r : # 8 2 A A F F ; " > r e g i s t e r S e t t i n g F i e l d < / s p a n > < s p a n s t y l e = " c o l o r : # A 6 A C C D ; " > ( < / s p a n > < / s p a n >
< span class = "line" > < span style = "color:#A6ACCD;" > < / s p a n > < s p a n s t y l e = " c o l o r : # 8 2 A A F F ; " > j s x < / s p a n > < s p a n s t y l e = " c o l o r : # A 6 A C C D ; " > ( < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > ( ) < / s p a n > < s p a n s t y l e = " c o l o r : # A 6 A C C D ; " > < / s p a n > < s p a n s t y l e = " c o l o r : # C 7 9 2 E A ; " > = & g t ; < / s p a n > < s p a n s t y l e = " c o l o r : # A 6 A C C D ; " > ( < / s p a n > < / s p a n >
< span class = "line" > < span style = "color:#A6ACCD;" > < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > & l t ; < / s p a n > < s p a n s t y l e = " c o l o r : # A 6 A C C D ; f o n t - s t y l e : i t a l i c ; " > T o g g l e < / s p a n > < / s p a n >
< span class = "line" > < span style = "color:#A6ACCD;" > title < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > = { < / s p a n > < s p a n s t y l e = " c o l o r : # F 0 7 1 7 8 ; " > j s x < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > ( < / s p a n > < s p a n s t y l e = " c o l o r : # A 6 A C C D ; " > ( < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > ) < / s p a n > < s p a n s t y l e = " c o l o r : # A 6 A C C D ; " > < / s p a n > < s p a n s t y l e = " c o l o r : # C 7 9 2 E A ; " > = & g t ; < / s p a n > < s p a n s t y l e = " c o l o r : # A 6 A C C D ; " > ( < / s p a n > < / s p a n >
< span class = "line" > < span style = "color:#A6ACCD;" > < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > & l t ; < / s p a n > < s p a n s t y l e = " c o l o r : # F F C B 6 B ; " > s p a n < / s p a n > < s p a n s t y l e = " c o l o r : # A 6 A C C D ; " > < / s p a n > < s p a n s t y l e = " c o l o r : # F F C B 6 B ; " > c l a s s < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > = < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > & q u o t ; < / s p a n > < s p a n s t y l e = " c o l o r : # C 3 E 8 8 D ; " > o p t i o n - t i t l e < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > & q u o t ; < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > & g t ; < / s p a n > < / s p a n >
< span class = "line" > < span style = "color:#A6ACCD;" > < / s p a n > < s p a n s t y l e = " c o l o r : # F F C B 6 B ; " > H i d e < / s p a n > < s p a n s t y l e = " c o l o r : # A 6 A C C D ; " > < / s p a n > < s p a n s t y l e = " c o l o r : # F F C B 6 B ; " > m a x e d < / s p a n > < s p a n s t y l e = " c o l o r : # A 6 A C C D ; " > < / s p a n > < s p a n s t y l e = " c o l o r : # F F C B 6 B ; " > c h a l l e n g e s < / s p a n > < / s p a n >
< span class = "line" > < span style = "color:#A6ACCD;" > < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > & l t ; < / s p a n > < s p a n s t y l e = " c o l o r : # F F C B 6 B ; " > d e s c < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > & g t ; < / s p a n > < s p a n s t y l e = " c o l o r : # F F C B 6 B ; " > H i d e < / s p a n > < s p a n s t y l e = " c o l o r : # A 6 A C C D ; " > < / s p a n > < s p a n s t y l e = " c o l o r : # F F C B 6 B ; " > c h a l l e n g e s < / s p a n > < s p a n s t y l e = " c o l o r : # A 6 A C C D ; " > < / s p a n > < s p a n s t y l e = " c o l o r : # F F C B 6 B ; " > t h a t < / s p a n > < s p a n s t y l e = " c o l o r : # A 6 A C C D ; " > < / s p a n > < s p a n s t y l e = " c o l o r : # F F C B 6 B ; " > h a v e < / s p a n > < s p a n s t y l e = " c o l o r : # A 6 A C C D ; " > < / s p a n > < s p a n s t y l e = " c o l o r : # F F C B 6 B ; " > b e e n < / s p a n > < s p a n s t y l e = " c o l o r : # A 6 A C C D ; " > < / s p a n > < s p a n s t y l e = " c o l o r : # F F C B 6 B ; " > f u l l y < / s p a n > < s p a n s t y l e = " c o l o r : # A 6 A C C D ; " > < / s p a n > < s p a n s t y l e = " c o l o r : # F F C B 6 B ; " > c o m p l e t e d < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > . & l t ; < / s p a n > < s p a n s t y l e = " c o l o r : # A 6 A C C D ; " > / < / s p a n > < s p a n s t y l e = " c o l o r : # F F C B 6 B ; " > d e s c < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > & g t ; < / s p a n > < / s p a n >
< span class = "line" > < span style = "color:#A6ACCD;" > < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > & l t ; < / s p a n > < s p a n s t y l e = " c o l o r : # A 6 A C C D ; " > / < / s p a n > < s p a n s t y l e = " c o l o r : # F F C B 6 B ; " > s p a n < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > & g t ; < / s p a n > < / s p a n >
< span class = "line" > < span style = "color:#A6ACCD;" > ) ) < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > } < / s p a n > < / s p a n >
< span class = "line" > < span style = "color:#A6ACCD;" > < / s p a n > < s p a n s t y l e = " c o l o r : # A 6 A C C D ; f o n t - s t y l e : i t a l i c ; " > o n U p d a t e < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > : < / s p a n > < s p a n s t y l e = " c o l o r : # F F C B 6 B ; " > m o d e l V a l u e < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > = { < / s p a n > < s p a n s t y l e = " c o l o r : # A 6 A C C D ; f o n t - s t y l e : i t a l i c ; " > v a l u e < / s p a n > < s p a n s t y l e = " c o l o r : # A 6 A C C D ; " > < / s p a n > < s p a n s t y l e = " c o l o r : # C 7 9 2 E A ; " > = & g t ; < / s p a n > < s p a n s t y l e = " c o l o r : # A 6 A C C D ; " > ( s e t t i n g s < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > . < / s p a n > < s p a n s t y l e = " c o l o r : # A 6 A C C D ; " > h i d e C h a l l e n g e s < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > = < / s p a n > < s p a n s t y l e = " c o l o r : # A 6 A C C D ; " > v a l u e ) < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > } < / s p a n > < / s p a n >
< span class = "line" > < span style = "color:#A6ACCD;" > modelValue < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > = { < / s p a n > < s p a n s t y l e = " c o l o r : # A 6 A C C D ; " > s e t t i n g s . h i d e C h a l l e n g e s < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > } < / s p a n > < / s p a n >
< span class = "line" > < span style = "color:#A6ACCD;" > < /span><span style="color:#89DDFF;">/ & gt ; < / s p a n > < / s p a n >
< span class = "line" > < span style = "color:#A6ACCD;" > ) ) < / s p a n > < / s p a n >
< span class = "line" > < span style = "color:#A6ACCD;" > ) < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > ; < / s p a n > < / s p a n > < / c o d e > < / p r e > < / d i v > < h 2 i d = " u p d a t i n g - f e a t u r e s " t a b i n d e x = " - 1 " > U p d a t i n g F e a t u r e s < a c l a s s = " h e a d e r - a n c h o r " h r e f = " # u p d a t i n g - f e a t u r e s " a r i a - l a b e l = " P e r m a l i n k t o & q u o t ; U p d a t i n g F e a t u r e s & q u o t ; " > < / a > < / h 2 > < p > I f y o u r c u s t o m f e a t u r e r e q u i r e s r u n n i n g s o m e s o r t o f u p d a t e m e t h o d e v e r y t i c k , y o u & # 3 9 ; l l w a n t t o s e a r c h l a y e r s w h e n t h e y & # 3 9 ; r e a d d e d f o r a n y f e a t u r e s o f t h i s t y p e ( u s i n g t h e < a h r e f = " / a p i / m o d u l e s / f e a t u r e s / f e a t u r e # f i n d f e a t u r e s " > f i n d F e a t u r e s < / a > u t i l i t y ) , a d d a n e v e n t h a n d l e r f o r e v e r y < c o d e > u p d a t e < / c o d e > / < c o d e > p o s t U p d a t e < / c o d e > / < c o d e > p r e U p d a t e < / c o d e > , a n d c l e a n i t u p w h e n t h e l a y e r i s r e m o v e d . H e r e & # 3 9 ; s h o w t h i s l o o k s l i k e f o r t h e < c o d e > a c t i o n < / c o d e > f e a t u r e : < / p > < d i v c l a s s = " l a n g u a g e - t s " > < b u t t o n t i t l e = " C o p y C o d e " c l a s s = " c o p y " > < / b u t t o n > < s p a n c l a s s = " l a n g " > t s < / s p a n > < p r e c l a s s = " s h i k i m a t e r i a l - t h e m e - p a l e n i g h t h a s - d i f f " > < c o d e > < s p a n c l a s s = " l i n e " > < s p a n s t y l e = " c o l o r : # C 7 9 2 E A ; " > c o n s t < / s p a n > < s p a n s t y l e = " c o l o r : # A 6 A C C D ; " > l i s t e n e r s < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > : < / s p a n > < s p a n s t y l e = " c o l o r : # A 6 A C C D ; " > < / s p a n > < s p a n s t y l e = " c o l o r : # F F C B 6 B ; " > R e c o r d < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > & l t ; < / s p a n > < s p a n s t y l e = " c o l o r : # F F C B 6 B ; " > s t r i n g < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > , < / s p a n > < s p a n s t y l e = " c o l o r : # A 6 A C C D ; " > < / s p a n > < s p a n s t y l e = " c o l o r : # F F C B 6 B ; " > U n s u b s c r i b e < / s p a n > < s p a n s t y l e = " c o l o r : # A 6 A C C D ; " > < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > | < / s p a n > < s p a n s t y l e = " c o l o r : # A 6 A C C D ; " > < / s p a n > < s p a n s t y l e = " c o l o r : # F F C B 6 B ; " > u n d e f i n e d < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > & g t ; < / s p a n > < s p a n s t y l e = " c o l o r : # A 6 A C C D ; " > < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > = < / s p a n > < s p a n s t y l e = " c o l o r : # A 6 A C C D ; " > < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > { } ; < / s p a n > < / s p a n >
< span class = "line" > < span style = "color:#A6ACCD;" > globalBus < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > . < / s p a n > < s p a n s t y l e = " c o l o r : # 8 2 A A F F ; " > o n < / s p a n > < s p a n s t y l e = " c o l o r : # A 6 A C C D ; " > ( < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > & q u o t ; < / s p a n > < s p a n s t y l e = " c o l o r : # C 3 E 8 8 D ; " > a d d L a y e r < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > & q u o t ; < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > , < / s p a n > < s p a n s t y l e = " c o l o r : # A 6 A C C D ; " > < / s p a n > < s p a n s t y l e = " c o l o r : # A 6 A C C D ; f o n t - s t y l e : i t a l i c ; " > l a y e r < / s p a n > < s p a n s t y l e = " c o l o r : # A 6 A C C D ; " > < / s p a n > < s p a n s t y l e = " c o l o r : # C 7 9 2 E A ; " > = & g t ; < / s p a n > < s p a n s t y l e = " c o l o r : # A 6 A C C D ; " > < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > { < / s p a n > < / s p a n >
< span class = "line" > < span style = "color:#F07178;" > < / s p a n > < s p a n s t y l e = " c o l o r : # C 7 9 2 E A ; " > c o n s t < / s p a n > < s p a n s t y l e = " c o l o r : # F 0 7 1 7 8 ; " > < / s p a n > < s p a n s t y l e = " c o l o r : # A 6 A C C D ; " > a c t i o n s < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > : < / s p a n > < s p a n s t y l e = " c o l o r : # F 0 7 1 7 8 ; " > < / s p a n > < s p a n s t y l e = " c o l o r : # F F C B 6 B ; " > G e n e r i c A c t i o n < / s p a n > < s p a n s t y l e = " c o l o r : # F 0 7 1 7 8 ; " > [ ] < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > = < / s p a n > < s p a n s t y l e = " c o l o r : # F 0 7 1 7 8 ; " > < / s p a n > < s p a n s t y l e = " c o l o r : # 8 2 A A F F ; " > f i n d F e a t u r e s < / s p a n > < s p a n s t y l e = " c o l o r : # F 0 7 1 7 8 ; " > ( < / s p a n > < s p a n s t y l e = " c o l o r : # A 6 A C C D ; " > l a y e r < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > , < / s p a n > < s p a n s t y l e = " c o l o r : # F 0 7 1 7 8 ; " > < / s p a n > < s p a n s t y l e = " c o l o r : # A 6 A C C D ; " > A c t i o n T y p e < / s p a n > < s p a n s t y l e = " c o l o r : # F 0 7 1 7 8 ; " > ) < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; f o n t - s t y l e : i t a l i c ; " > a s < / s p a n > < s p a n s t y l e = " c o l o r : # F 0 7 1 7 8 ; " > < / s p a n > < s p a n s t y l e = " c o l o r : # F F C B 6 B ; " > G e n e r i c A c t i o n < / s p a n > < s p a n s t y l e = " c o l o r : # F 0 7 1 7 8 ; " > [ ] < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > ; < / s p a n > < / s p a n >
< span class = "line" > < span style = "color:#F07178;" > < / s p a n > < s p a n s t y l e = " c o l o r : # A 6 A C C D ; " > l i s t e n e r s < / s p a n > < s p a n s t y l e = " c o l o r : # F 0 7 1 7 8 ; " > [ < / s p a n > < s p a n s t y l e = " c o l o r : # A 6 A C C D ; " > l a y e r < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > . < / s p a n > < s p a n s t y l e = " c o l o r : # A 6 A C C D ; " > i d < / s p a n > < s p a n s t y l e = " c o l o r : # F 0 7 1 7 8 ; " > ] < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > = < / s p a n > < s p a n s t y l e = " c o l o r : # F 0 7 1 7 8 ; " > < / s p a n > < s p a n s t y l e = " c o l o r : # A 6 A C C D ; " > l a y e r < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > . < / s p a n > < s p a n s t y l e = " c o l o r : # 8 2 A A F F ; " > o n < / s p a n > < s p a n s t y l e = " c o l o r : # F 0 7 1 7 8 ; " > ( < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > & q u o t ; < / s p a n > < s p a n s t y l e = " c o l o r : # C 3 E 8 8 D ; " > p o s t U p d a t e < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > & q u o t ; < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > , < / s p a n > < s p a n s t y l e = " c o l o r : # F 0 7 1 7 8 ; " > < / s p a n > < s p a n s t y l e = " c o l o r : # A 6 A C C D ; f o n t - s t y l e : i t a l i c ; " > d i f f < / s p a n > < s p a n s t y l e = " c o l o r : # F 0 7 1 7 8 ; " > < / s p a n > < s p a n s t y l e = " c o l o r : # C 7 9 2 E A ; " > = & g t ; < / s p a n > < s p a n s t y l e = " c o l o r : # F 0 7 1 7 8 ; " > < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > { < / s p a n > < / s p a n >
< span class = "line" > < span style = "color:#F07178;" > < / s p a n > < s p a n s t y l e = " c o l o r : # A 6 A C C D ; " > a c t i o n s < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > . < / s p a n > < s p a n s t y l e = " c o l o r : # 8 2 A A F F ; " > f o r E a c h < / s p a n > < s p a n s t y l e = " c o l o r : # F 0 7 1 7 8 ; " > ( < / s p a n > < s p a n s t y l e = " c o l o r : # A 6 A C C D ; f o n t - s t y l e : i t a l i c ; " > a c t i o n < / s p a n > < s p a n s t y l e = " c o l o r : # F 0 7 1 7 8 ; " > < / s p a n > < s p a n s t y l e = " c o l o r : # C 7 9 2 E A ; " > = & g t ; < / s p a n > < s p a n s t y l e = " c o l o r : # F 0 7 1 7 8 ; " > < / s p a n > < s p a n s t y l e = " c o l o r : # A 6 A C C D ; " > a c t i o n < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > . < / s p a n > < s p a n s t y l e = " c o l o r : # 8 2 A A F F ; " > u p d a t e < / s p a n > < s p a n s t y l e = " c o l o r : # F 0 7 1 7 8 ; " > ( < / s p a n > < s p a n s t y l e = " c o l o r : # A 6 A C C D ; " > d i f f < / s p a n > < s p a n s t y l e = " c o l o r : # F 0 7 1 7 8 ; " > ) ) < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > ; < / s p a n > < / s p a n >
< span class = "line" > < span style = "color:#F07178;" > < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > } < / s p a n > < s p a n s t y l e = " c o l o r : # F 0 7 1 7 8 ; " > ) < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > ; < / s p a n > < / s p a n >
< span class = "line" > < span style = "color:#89DDFF;" > } < / s p a n > < s p a n s t y l e = " c o l o r : # A 6 A C C D ; " > ) < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > ; < / s p a n > < / s p a n >
< span class = "line" > < span style = "color:#A6ACCD;" > globalBus < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > . < / s p a n > < s p a n s t y l e = " c o l o r : # 8 2 A A F F ; " > o n < / s p a n > < s p a n s t y l e = " c o l o r : # A 6 A C C D ; " > ( < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > & q u o t ; < / s p a n > < s p a n s t y l e = " c o l o r : # C 3 E 8 8 D ; " > r e m o v e L a y e r < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > & q u o t ; < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > , < / s p a n > < s p a n s t y l e = " c o l o r : # A 6 A C C D ; " > < / s p a n > < s p a n s t y l e = " c o l o r : # A 6 A C C D ; f o n t - s t y l e : i t a l i c ; " > l a y e r < / s p a n > < s p a n s t y l e = " c o l o r : # A 6 A C C D ; " > < / s p a n > < s p a n s t y l e = " c o l o r : # C 7 9 2 E A ; " > = & g t ; < / s p a n > < s p a n s t y l e = " c o l o r : # A 6 A C C D ; " > < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > { < / s p a n > < / s p a n >
< span class = "line" > < span style = "color:#89DDFF;" > < /span><span style="color:#676E95;font-style:italic;">/ / unsubscribe from postUpdate < / s p a n > < / s p a n >
< span class = "line" > < span style = "color:#F07178;" > < / s p a n > < s p a n s t y l e = " c o l o r : # A 6 A C C D ; " > l i s t e n e r s < / s p a n > < s p a n s t y l e = " c o l o r : # F 0 7 1 7 8 ; " > [ < / s p a n > < s p a n s t y l e = " c o l o r : # A 6 A C C D ; " > l a y e r < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > . < / s p a n > < s p a n s t y l e = " c o l o r : # A 6 A C C D ; " > i d < / s p a n > < s p a n s t y l e = " c o l o r : # F 0 7 1 7 8 ; " > ] < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > ? . < / s p a n > < s p a n s t y l e = " c o l o r : # F 0 7 1 7 8 ; " > ( ) < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > ; < / s p a n > < / s p a n >
< span class = "line" > < span style = "color:#F07178;" > < / s p a n > < s p a n s t y l e = " c o l o r : # A 6 A C C D ; " > l i s t e n e r s < / s p a n > < s p a n s t y l e = " c o l o r : # F 0 7 1 7 8 ; " > [ < / s p a n > < s p a n s t y l e = " c o l o r : # A 6 A C C D ; " > l a y e r < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > . < / s p a n > < s p a n s t y l e = " c o l o r : # A 6 A C C D ; " > i d < / s p a n > < s p a n s t y l e = " c o l o r : # F 0 7 1 7 8 ; " > ] < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > = < / s p a n > < s p a n s t y l e = " c o l o r : # F 0 7 1 7 8 ; " > < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > u n d e f i n e d ; < / s p a n > < / s p a n >
< span class = "line" > < span style = "color:#89DDFF;" > } < / s p a n > < s p a n s t y l e = " c o l o r : # A 6 A C C D ; " > ) < / s p a n > < s p a n s t y l e = " c o l o r : # 8 9 D D F F ; " > ; < / s p a n > < / s p a n > < / c o d e > < / p r e > < / d i v > ` , 1 9 ) , l = [ t ] ; f u n c t i o n p ( r , c , y , i , F , D ) { r e t u r n a ( ) , e ( " d i v " , n u l l , l ) } c o n s t C = s ( o , [ [ " r e n d e r " , p ] ] ) ; e x p o r t { d a s _ _ p a g e D a t a , C a s d e f a u l t } ;