goog.provide('sci.configs.re_frame.re_frame'); sci.configs.re_frame.re_frame.rfns = sci.core.create_ns.cljs$core$IFn$_invoke$arity$2(new cljs.core.Symbol(null,"re-frame.core","re-frame.core",-1549073474,null),null); sci.configs.re_frame.re_frame.rfdbns = sci.core.create_ns.cljs$core$IFn$_invoke$arity$2(new cljs.core.Symbol(null,"re-frame.db","re-frame.db",983930750,null),null); sci.configs.re_frame.re_frame.re_frame_namespace = sci.core._copy_ns(cljs.core.PersistentHashMap.fromArrays([cljs.core.with_meta(new cljs.core.Symbol(null,"reg-sub-raw","reg-sub-raw",784637666,null),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(new cljs.core.Symbol(null,"quote","quote",1377916282,null),cljs.core.list(new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"query-id","query-id",-1180306927,null),new cljs.core.Symbol(null,"handler-fn","handler-fn",841143797,null)], null))),new cljs.core.Keyword(null,"doc","doc",1913296891),"This is a low level, advanced function. You should probably be\n using `reg-sub` instead.\n\n Some explanation is available in the docs at\n http://day8.github.io/re-frame/flow-mechanics/",new cljs.core.Keyword("api-docs","heading","api-docs/heading",2007966345),"Subscriptions"], null)),cljs.core.with_meta(new cljs.core.Symbol(null,"dispatch-sync","dispatch-sync",-990037526,null),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(new cljs.core.Symbol(null,"quote","quote",1377916282,null),cljs.core.list(new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"event","event",1941966969,null)], null))),new cljs.core.Keyword(null,"doc","doc",1913296891),"Synchronously (immediately) process `event`. It does **not** queue\n the event for handling later as `dispatch` does.\n\n `event` is a vector and the first element is typically a keyword\n which identifies the kind of event.\n\n It is an error to use `dispatch-sync` within an event handler because\n you can't immediately process an new event when one is already\n part way through being processed.\n\n Generally, avoid using this function, and instead, use `dispatch`.\n Only use it in the narrow set of cases where any delay in\n processing is a problem:\n\n 1. the `:on-change` handler of a text field where we are expecting fast typing\n 2. when initialising your app - see 'main' in examples/todomvc/src/core.cljs\n 3. in a unit test where immediate, synchronous processing is useful\n\n Usage:\n\n #!clj\n (dispatch-sync [:sing :falsetto \"piano accordion\"])\n ",new cljs.core.Keyword("api-docs","heading","api-docs/heading",2007966345),"Dispatching Events"], null)),cljs.core.with_meta(new cljs.core.Symbol(null,"reg-sub","reg-sub",852548167,null),new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword("api-docs","heading","api-docs/heading",2007966345),"Subscriptions",new cljs.core.Keyword(null,"top-fn","top-fn",-2056129173),new cljs.core.PersistentArrayMap(null, 6, [new cljs.core.Keyword(null,"variadic?","variadic?",584179762),true,new cljs.core.Keyword(null,"fixed-arity","fixed-arity",1586445869),(1),new cljs.core.Keyword(null,"max-fixed-arity","max-fixed-arity",-690205543),(1),new cljs.core.Keyword(null,"method-params","method-params",-980792179),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.list(new cljs.core.Symbol(null,"query-id","query-id",-1180306927,null),new cljs.core.Symbol(null,"args","args",-1338879193,null))], null),new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"query-id","query-id",-1180306927,null),new cljs.core.Symbol(null,"&","&",-2144855648,null),new cljs.core.Symbol(null,"args","args",-1338879193,null)], null)),new cljs.core.Keyword(null,"arglists-meta","arglists-meta",1944829838),cljs.core.list(null)], null),new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(new cljs.core.Symbol(null,"quote","quote",1377916282,null),cljs.core.list(new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"query-id","query-id",-1180306927,null),new cljs.core.Symbol(null,"&","&",-2144855648,null),new cljs.core.Symbol(null,"args","args",-1338879193,null)], null))),new cljs.core.Keyword(null,"doc","doc",1913296891),"A call to `reg-sub` associates a `query-id` WITH two functions.\n\n The two functions provide 'a mechanism' for creating a node\n in the Signal Graph. When a node of type `query-id` is needed,\n the two functions can be used to create it.\n\n The three arguments are:\n\n - `query-id` - typically a namespaced keyword (later used in subscribe)\n - optionally, an `input signals` function which returns the input data\n flows required by this kind of node.\n - a `computation function` which computes the value (output) of the\n node (from the input data flows)\n\n Later, during app execution, a call to `(subscribe [:sub-id 3 :blue])`,\n will trigger the need for a new `:sub-id` Signal Graph node (matching the\n query `[:sub-id 3 :blue]`). And, to create that node the two functions\n associated with `:sub-id` will be looked up and used.\n\n Just to be clear: calling `reg-sub` does not immediately create a node.\n It only registers 'a mechanism' (the two functions) by which nodes\n can be created later, when a node is bought into existence by the\n use of `subscribe` in a `View Function`.\n\n `reg-sub` arguments are:\n\n - a `query-id` (typically a namespaced keyword)\n - a function which returns the inputs required by this kind of node (can be supplied in one of three ways)\n - a function which computes the value of this kind of node (can be supplied in one of three ways)\n\n The `computation function` is always the last argument supplied and has three ways to be called.\n Two of these methods are syntactic sugar to provide easier access to functional abstractions around your data.\n\n 1. A function that will accept two parameters, the `input-values` and `query-vector`. This is the\n standard way to provide a `computation-function`\n\n #!clj\n (reg-sub\n :query-id\n (fn [input-values query-vector]\n (:foo input-values)))\n\n 2. A single sugary tuple of `:->` and a 1-arity `computation-function`:\n\n #!clj\n (reg-sub\n :query-id\n :-> computation-fn)\n\n This sugary variation allows you to pass a function that will expect only one parameter,\n namely the `input-values` and entirely omit the `query-vector`. A typical `computation-function`\n expects two parameters which can cause unfortunate results when attempting to use\n clojure standard library functions, or other functions, in a functional manner.\n\n For example, a significant number of subscriptions exist only to get a value\n from the `input-values`. As shown below, this subscription will simply retrieve\n the value associated with the `:foo` key in our db:\n\n #!clj\n (reg-sub\n :query-id\n (fn [db _] ;; :<---- trivial boilerplate we might want to skip over\n (:foo db)))\n\n This is slightly more boilerplate than we might like to do,\n as we can use a keyword directly as a function, and we might like to do this:\n\n #!clj\n (reg-sub\n :query-id\n :foo) ;; :<---- This could be dangerous. If `:foo` is not in db, we get the `query-vector` instead of `nil`.\n\n By using `:->` our function would not contain the `query-vector`, and any\n missing keys would be represented as such:\n\n #!clj\n (reg-sub\n :query-id\n :-> :foo)\n\n This form allows us to ignore the `query-vector` if our `computation-function`\n has no need for it, and be safe from any accidents. Any 1-arity function can be provided,\n and for more complicated use cases, `partial`, `comp`, and anonymous functions can still be used.\n\n 3. A single sugary tuple of `:=>` and a multi-arity `computation-function`\n\n #!clj\n (reg-sub\n :query-id\n :=> computation-fn)\n\n The `query-vector` can be broken into two components `[query-id & optional-values]`, and\n some subscriptions require the `optional-values` for extra work within the subscription.\n To use them in variation #1, we need to destructure our `computation-function` parameters\n in order to use them.\n\n #!clj\n (reg-sub\n :query-id\n (fn [db [_ foo]]\n [db foo]))\n\n Again we are writing boilerplate just to reach our values, and we might prefer to\n have direction access through a parameter vector like `[input-values optional-values]`\n instead, so we might be able to use a multi-arity function directly as our `computation-function`.\n A rewrite of the above sub using this sugary syntax would look like this:\n\n #!clj\n (reg-sub\n :query-id\n :=> vector) ;; :<---- Could also be `(fn [db foo] [db foo])`\n\n The `computation function` is expected to take two arguments:\n\n - `input-values` - the values which flow into this node (how is it wired into the graph?)\n - `query-vector` - the vector given to `subscribe`\n\n and it returns a computed value (which then becomes the output of the node)\n\n When `computation function` is called, the 2nd `query-vector` argument will be that\n vector supplied to the `subscribe`. So, if the call was `(subscribe [:sub-id 3 :blue])`,\n then the `query-vector` supplied to the computation function will be `[:sub-id 3 :blue]`.\n\n The argument(s) supplied to `reg-sub` between `query-id` and the `computation-function`\n can vary in 3 ways, but whatever is there defines the `input signals` part\n of `the mechanism`, specifying what input values \"flow into\" the\n `computation function` (as the 1st argument) when it is called.\n\n So, `reg-sub` can be called in one of three ways, because there are three ways\n to define the input signals part. But note, the 2nd method, in which a\n `signals function` is explicitly supplied, is the most canonical and\n instructive. The other two are really just sugary variations.\n\n **First variation** - no input signal function given:\n\n #!clj\n (reg-sub\n :query-id\n a-computation-fn) ;; has signature: (fn [db query-vec] ... ret-value)\n\n In the absence of an explicit `signals function`, the node's input signal defaults to `app-db`\n and, as a result, the value within `app-db` (a map) is\n given as the 1st argument when `a-computation-fn` is called.\n\n\n **Second variation** - a signal function is explicitly supplied:\n\n #!clj\n (reg-sub\n :query-id\n signal-fn ;; <-- here\n computation-fn)\n\n This is the most canonical and instructive of the three variations.\n\n When a node is created from the template, the `signal function` will be called and it\n is expected to return the input signal(s) as either a singleton, if there is only\n one, or a sequence if there are many, or a map with the signals as the values.\n\n The current values of the returned signals will be supplied as the 1st argument to\n the `a-computation-fn` when it is called - and subject to what this `signal-fn` returns,\n this value will be either a singleton, sequence or map of them (paralleling\n the structure returned by the `signal function`).\n\n This example `signal function` returns a 2-vector of input signals.\n\n #!clj\n (fn [query-vec dynamic-vec]\n [(subscribe [:a-sub])\n (subscribe [:b-sub])])\n\n The associated computation function must be written\n to expect a 2-vector of values for its first argument:\n\n #!clj\n (fn [[a b] query-vec] ;; 1st argument is a seq of two values\n ....)\n\n If, on the other hand, the signal function was simpler and returned a singleton, like this:\n\n #!clj\n (fn [query-vec dynamic-vec]\n (subscribe [:a-sub])) ;; <-- returning a singleton\n\n then the associated computation function must be written to expect a single value\n as the 1st argument:\n\n #!clj\n (fn [a query-vec] ;; 1st argument is a single value\n ...)\n\n Further Note: variation #1 above, in which an `input-fn` was not supplied, like this:\n\n #!clj\n (reg-sub\n :query-id\n a-computation-fn) ;; has signature: (fn [db query-vec] ... ret-value)\n\n is the equivalent of using this\n 2nd variation and explicitly supplying a `signal-fn` which returns `app-db`:\n\n #!clj\n (reg-sub\n :query-id\n (fn [_ _] re-frame/app-db) ;; <--- explicit signal-fn\n a-computation-fn) ;; has signature: (fn [db query-vec] ... ret-value)\n\n **Third variation** - syntax Sugar\n\n #!clj\n (reg-sub\n :a-b-sub\n :<- [:a-sub]\n :<- [:b-sub]\n (fn [[a b] query-vec] ;; 1st argument is a seq of two values\n {:a a :b b}))\n\n This 3rd variation is just syntactic sugar for the 2nd. Instead of providing an\n `signals-fn` you provide one or more pairs of `:<-` and a subscription vector.\n\n If you supply only one pair a singleton will be supplied to the computation function,\n as if you had supplied a `signal-fn` returning only a single value:\n\n #!clj\n (reg-sub\n :a-sub\n :<- [:a-sub]\n (fn [a query-vec] ;; only one pair, so 1st argument is a single value\n ...))\n\n Syntactic sugar for both the `signal-fn` and `computation-fn` can be used together\n and the direction of arrows shows the flow of data and functions. The example from\n directly above is reproduced here:\n\n #!clj\n (reg-sub\n :a-b-sub\n :<- [:a-sub]\n :<- [:b-sub]\n :-> (partial zipmap [:a :b]))\n\n For further understanding, read the tutorials, and look at the detailed comments in\n /examples/todomvc/src/subs.cljs.\n\n See also: `subscribe`\n "], null)),cljs.core.with_meta(new cljs.core.Symbol(null,"dispatch","dispatch",-1335098760,null),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(new cljs.core.Symbol(null,"quote","quote",1377916282,null),cljs.core.list(new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"event","event",1941966969,null)], null))),new cljs.core.Keyword(null,"doc","doc",1913296891),"Queue `event` for processing (handling).\n\n `event` is a vector and the first element is typically a keyword\n which identifies the kind of event.\n\n The event will be added to a FIFO processing queue, so event\n handling does not happen immediately. It will happen 'very soon'\n but not now. And if the queue already contains events, they\n will be processed first.\n\n Usage:\n\n #!clj\n (dispatch [:order \"pizza\" {:supreme 2 :meatlovers 1 :veg 1}])\n ",new cljs.core.Keyword("api-docs","heading","api-docs/heading",2007966345),"Dispatching Events"], null)),cljs.core.with_meta(new cljs.core.Symbol(null,"unwrap","unwrap",241356065,null),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword("api-docs","heading","api-docs/heading",2007966345),"Interceptors"], null)),cljs.core.with_meta(new cljs.core.Symbol(null,"reg-event-fx","reg-event-fx",350713021,null),new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword("api-docs","heading","api-docs/heading",2007966345),"Event Handlers",new cljs.core.Keyword(null,"top-fn","top-fn",-2056129173),new cljs.core.PersistentArrayMap(null, 6, [new cljs.core.Keyword(null,"variadic?","variadic?",584179762),false,new cljs.core.Keyword(null,"fixed-arity","fixed-arity",1586445869),3,new cljs.core.Keyword(null,"max-fixed-arity","max-fixed-arity",-690205543),3,new cljs.core.Keyword(null,"method-params","method-params",-980792179),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"id","id",252129435,null),new cljs.core.Symbol(null,"handler","handler",1444934915,null)], null),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"id","id",252129435,null),new cljs.core.Symbol(null,"interceptors","interceptors",93748576,null),new cljs.core.Symbol(null,"handler","handler",1444934915,null)], null)], null),new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"id","id",252129435,null),new cljs.core.Symbol(null,"handler","handler",1444934915,null)], null),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"id","id",252129435,null),new cljs.core.Symbol(null,"interceptors","interceptors",93748576,null),new cljs.core.Symbol(null,"handler","handler",1444934915,null)], null)),new cljs.core.Keyword(null,"arglists-meta","arglists-meta",1944829838),cljs.core.list(null,null)], null),new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(new cljs.core.Symbol(null,"quote","quote",1377916282,null),cljs.core.list(new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"id","id",252129435,null),new cljs.core.Symbol(null,"handler","handler",1444934915,null)], null),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"id","id",252129435,null),new cljs.core.Symbol(null,"interceptors","interceptors",93748576,null),new cljs.core.Symbol(null,"handler","handler",1444934915,null)], null))),new cljs.core.Keyword(null,"doc","doc",1913296891),"Register the given event `handler` (function) for the given `id`. Optionally, provide\n an `interceptors` chain:\n\n - `id` is typically a namespaced keyword (but can be anything)\n - `handler` is a function: (coeffects-map event-vector) -> effects-map\n - `interceptors` is a collection of interceptors. Will be flattened and nils removed.\n\n\n Example Usage:\n\n #!clj\n (reg-event-fx\n :event-id\n (fn [cofx event]\n {:db (assoc (:db cofx) :some-key (get event 2))})) ;; return a map of effects\n\n\n Or perhaps:\n\n #!clj\n (reg-event-fx\n :namespaced/id ;; <-- namespaced keywords are often used\n [one two three] ;; <-- a seq of interceptors\n (fn [{:keys [db] :as cofx} [_ arg1 arg2]] ;; destructure both arguments\n {:db (assoc db :some-key arg1) ;; return a map of effects\n :fx [[:dispatch [:some-event arg2]]]}))\n "], null)),cljs.core.with_meta(new cljs.core.Symbol(null,"enqueue","enqueue",1377000435,null),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(new cljs.core.Symbol(null,"quote","quote",1377916282,null),cljs.core.list(new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"context","context",810340414,null),new cljs.core.Symbol(null,"interceptors","interceptors",93748576,null)], null))),new cljs.core.Keyword(null,"doc","doc",1913296891),"A utility function, used when writing an interceptor's `:before` function.\n\n Adds the given collection of `interceptors` to those already in `context's`\n execution `:queue`. It returns the updated `context`.\n\n So, it provides a way for one interceptor to add more interceptors to the\n currently executing interceptor chain.\n ",new cljs.core.Keyword("api-docs","heading","api-docs/heading",2007966345),"Writing Interceptors"], null)),cljs.core.with_meta(new cljs.core.Symbol(null,"get-coeffect","get-coeffect",1018510098,null),new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword("api-docs","heading","api-docs/heading",2007966345),"Writing Interceptors",new cljs.core.Keyword(null,"top-fn","top-fn",-2056129173),new cljs.core.PersistentArrayMap(null, 6, [new cljs.core.Keyword(null,"variadic?","variadic?",584179762),false,new cljs.core.Keyword(null,"fixed-arity","fixed-arity",1586445869),3,new cljs.core.Keyword(null,"max-fixed-arity","max-fixed-arity",-690205543),3,new cljs.core.Keyword(null,"method-params","method-params",-980792179),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"context","context",810340414,null)], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"context","context",810340414,null),new cljs.core.Symbol(null,"key","key",124488940,null)], null),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"context","context",810340414,null),new cljs.core.Symbol(null,"key","key",124488940,null),new cljs.core.Symbol(null,"not-found","not-found",1011451547,null)], null)], null),new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"context","context",810340414,null)], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"context","context",810340414,null),new cljs.core.Symbol(null,"key","key",124488940,null)], null),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"context","context",810340414,null),new cljs.core.Symbol(null,"key","key",124488940,null),new cljs.core.Symbol(null,"not-found","not-found",1011451547,null)], null)),new cljs.core.Keyword(null,"arglists-meta","arglists-meta",1944829838),cljs.core.list(null,null,null)], null),new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(new cljs.core.Symbol(null,"quote","quote",1377916282,null),cljs.core.list(new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"context","context",810340414,null)], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"context","context",810340414,null),new cljs.core.Symbol(null,"key","key",124488940,null)], null),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"context","context",810340414,null),new cljs.core.Symbol(null,"key","key",124488940,null),new cljs.core.Symbol(null,"not-found","not-found",1011451547,null)], null))),new cljs.core.Keyword(null,"doc","doc",1913296891),"A utility function, typically used when writing an interceptor's `:before` function.\n\n When called with one argument, it returns the `:coeffects` map from within that `context`.\n\n When called with two or three arguments, behaves like `clojure.core/get` and\n returns the value mapped to `key` in the `:coeffects` map within `context`, `not-found` or\n `nil` if `key` is not present."], null)),cljs.core.with_meta(new cljs.core.Symbol(null,"clear-event","clear-event",-1884567988,null),new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword("api-docs","heading","api-docs/heading",2007966345),"Event Handlers",new cljs.core.Keyword(null,"top-fn","top-fn",-2056129173),new cljs.core.PersistentArrayMap(null, 6, [new cljs.core.Keyword(null,"variadic?","variadic?",584179762),false,new cljs.core.Keyword(null,"fixed-arity","fixed-arity",1586445869),1,new cljs.core.Keyword(null,"max-fixed-arity","max-fixed-arity",-690205543),1,new cljs.core.Keyword(null,"method-params","method-params",-980792179),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.PersistentVector.EMPTY,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"id","id",252129435,null)], null)], null),new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(cljs.core.PersistentVector.EMPTY,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"id","id",252129435,null)], null)),new cljs.core.Keyword(null,"arglists-meta","arglists-meta",1944829838),cljs.core.list(null,null)], null),new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(new cljs.core.Symbol(null,"quote","quote",1377916282,null),cljs.core.list(cljs.core.PersistentVector.EMPTY,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"id","id",252129435,null)], null))),new cljs.core.Keyword(null,"doc","doc",1913296891),"Unregisters event handlers (presumably registered previously via the use of `reg-event-db` or `reg-event-fx`).\n\n When called with no args, it will unregister all currently registered event handlers.\n\n When given one arg, assumed to be the `id` of a previously registered\n event handler, it will unregister the associated handler. Will produce a warning to\n console if it finds no matching registration."], null)),cljs.core.with_meta(new cljs.core.Symbol(null,"subscribe","subscribe",2056785283,null),new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword("api-docs","heading","api-docs/heading",2007966345),"Subscriptions",new cljs.core.Keyword(null,"top-fn","top-fn",-2056129173),new cljs.core.PersistentArrayMap(null, 6, [new cljs.core.Keyword(null,"variadic?","variadic?",584179762),false,new cljs.core.Keyword(null,"fixed-arity","fixed-arity",1586445869),2,new cljs.core.Keyword(null,"max-fixed-arity","max-fixed-arity",-690205543),2,new cljs.core.Keyword(null,"method-params","method-params",-980792179),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"query","query",352022017,null)], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"query","query",352022017,null),new cljs.core.Symbol(null,"dynv","dynv",-405952138,null)], null)], null),new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"query","query",352022017,null)], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"query","query",352022017,null),new cljs.core.Symbol(null,"dynv","dynv",-405952138,null)], null)),new cljs.core.Keyword(null,"arglists-meta","arglists-meta",1944829838),cljs.core.list(null,null)], null),new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(new cljs.core.Symbol(null,"quote","quote",1377916282,null),cljs.core.list(new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"query","query",352022017,null)], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"query","query",352022017,null),new cljs.core.Symbol(null,"dynv","dynv",-405952138,null)], null))),new cljs.core.Keyword(null,"doc","doc",1913296891),"Given a `query` vector, returns a Reagent `reaction` which will, over\n time, reactively deliver a stream of values. So, in FRP-ish terms,\n it returns a `Signal`.\n\n To obtain the current value from the Signal, it must be dereferenced:\n\n #!clj\n (let [signal (subscribe [:items])\n value (deref signal)] ;; could be written as @signal\n ...)\n\n which is typically written tersely as simple:\n\n #!clj\n (let [items @(subscribe [:items])]\n ...)\n\n\n `query` is a vector of at least one element. The first element is the\n `query-id`, typically a namespaced keyword. The rest of the vector's\n elements are optional, additional values which parameterise the query\n performed.\n\n `dynv` is an optional 3rd argument, which is a vector of further input\n signals (atoms, reactions, etc), NOT values. This argument exists for\n historical reasons and is borderline deprecated these days.\n\n **Example Usage**:\n\n #!clj\n (subscribe [:items])\n (subscribe [:items \"blue\" :small])\n (subscribe [:items {:colour \"blue\" :size :small}])\n\n Note: for any given call to `subscribe` there must have been a previous call\n to `reg-sub`, registering the query handler (functions) associated with\n `query-id`.\n\n **Hint**\n\n When used in a view function BE SURE to `deref` the returned value.\n In fact, to avoid any mistakes, some prefer to define:\n\n #!clj\n (def context-map\n\n You can explore what is provided in `context` [here](https://day8.github.io/re-frame/Interceptors/#what-is-context).\n\n Example Usage:\n\n #!clj\n (reg-event-ctx\n :event-id\n (fn [{:keys [coeffects] :as context}]\n (let [initial {:db (:db coeffects)\n :event (:event coeffects)\n :fx []}\n result (-> initial\n function1\n function2\n function3)\n effects (select-keys result [:db :fx])]\n (assoc context :effects effects))))\n "], null)),cljs.core.with_meta(new cljs.core.Symbol(null,"add-post-event-callback","add-post-event-callback",182608154,null),new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword("api-docs","heading","api-docs/heading",2007966345),"Miscellaneous",new cljs.core.Keyword(null,"top-fn","top-fn",-2056129173),new cljs.core.PersistentArrayMap(null, 6, [new cljs.core.Keyword(null,"variadic?","variadic?",584179762),false,new cljs.core.Keyword(null,"fixed-arity","fixed-arity",1586445869),2,new cljs.core.Keyword(null,"max-fixed-arity","max-fixed-arity",-690205543),2,new cljs.core.Keyword(null,"method-params","method-params",-980792179),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"f","f",43394975,null)], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"id","id",252129435,null),new cljs.core.Symbol(null,"f","f",43394975,null)], null)], null),new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"f","f",43394975,null)], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"id","id",252129435,null),new cljs.core.Symbol(null,"f","f",43394975,null)], null)),new cljs.core.Keyword(null,"arglists-meta","arglists-meta",1944829838),cljs.core.list(null,null)], null),new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(new cljs.core.Symbol(null,"quote","quote",1377916282,null),cljs.core.list(new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"f","f",43394975,null)], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"id","id",252129435,null),new cljs.core.Symbol(null,"f","f",43394975,null)], null))),new cljs.core.Keyword(null,"doc","doc",1913296891),"Registers the given function `f` to be called after each event is processed.\n\n `f` will be called with two arguments:\n\n - `event`: a vector. The event just processed.\n - `queue`: a PersistentQueue, possibly empty, of events yet to be processed.\n\n This facility is useful in advanced cases like:\n\n - you are implementing a complex bootstrap pipeline\n - you want to create your own handling infrastructure, with perhaps multiple\n handlers for the one event, etc. Hook in here.\n - libraries providing 'isomorphic javascript' rendering on Nodejs or Nashorn.\n\n `id` is typically a keyword. If it supplied when an `f` is added, it can be\n subsequently be used to identify it for removal. See `remove-post-event-callback`.\n "], null)),cljs.core.with_meta(new cljs.core.Symbol(null,"reg-fx","reg-fx",-87443115,null),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(new cljs.core.Symbol(null,"quote","quote",1377916282,null),cljs.core.list(new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"id","id",252129435,null),new cljs.core.Symbol(null,"handler","handler",1444934915,null)], null))),new cljs.core.Keyword(null,"doc","doc",1913296891),"Register the given effect `handler` for the given `id`:\n\n - `id` is keyword, often namespaced.\n - `handler` is a side-effecting function which takes a single argument and whose return\n value is ignored.\n\n To use, first, associate `:effect2` with a handler:\n\n #!clj\n (reg-fx\n :effect2\n (fn [value]\n ... do something side-effect-y))\n\n Then, later, if an event handler were to return this effects map:\n\n #!clj\n {:effect2 [1 2]}\n\n then the `handler` `fn` we registered previously, using `reg-fx`, will be\n called with an argument of `[1 2]`.\n ",new cljs.core.Keyword("api-docs","heading","api-docs/heading",2007966345),"Effect Handlers"], null)),cljs.core.with_meta(new cljs.core.Symbol(null,"enrich","enrich",-468390398,null),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(new cljs.core.Symbol(null,"quote","quote",1377916282,null),cljs.core.list(new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"f","f",43394975,null)], null))),new cljs.core.Keyword(null,"doc","doc",1913296891),"Returns an interceptor which will run the given function `f` in the `:after`\n position.\n\n `f` is called with two arguments: `db` and `event`, and is expected to\n return a modified `db`.\n\n Unlike the `after` interceptor which is only about side effects, `enrich`\n expects `f` to process and alter the given `db` coeffect in some useful way,\n contributing to the derived data, flowing vibe.\n\n If `f` returns `nil`, the `db` value passed to `f` will be returned instead.\n\n #### Example Use:\n\n Imagine that todomvc needed to do duplicate detection - if any two todos had\n the same text, then highlight their background, and report them via a warning\n at the bottom of the panel.\n\n Almost any user action (edit text, add new todo, remove a todo) requires a\n complete reassessment of duplication errors and warnings. E.g. that edit\n just made might have introduced a new duplicate, or removed one. Same with\n any todo removal. So we need to re-calculate warnings after any CRUD events\n associated with the todos list.\n\n Unless we are careful, we might end up coding subtly different checks\n for each kind of CRUD operation. The duplicates check made after\n 'delete todo' event might be subtly different to that done after an\n editing operation. Nice and efficient, but fiddly. A bug generator\n approach.\n\n So, instead, we create an `f` which recalculates ALL warnings from scratch\n every time there is ANY change. It will inspect all the todos, and\n reset ALL FLAGS every time (overwriting what was there previously)\n and fully recalculate the list of duplicates (displayed at the bottom?).\n\n https://twitter.com/nathanmarz/status/879722740776939520\n\n By applying `f` in an `:enrich` interceptor, after every CRUD event,\n we keep the handlers simple and yet we ensure this important step\n (of getting warnings right) is not missed on any change.\n\n We can test `f` easily - it is a pure function - independently of\n any CRUD operation.\n\n This brings huge simplicity at the expense of some re-computation\n each time. This may be a very satisfactory trade-off in many cases.\n\n #### Returning nil\n\n In some cases, it's useful to apply a change to specific situations that can\n be determined at runtime instead of when defining the handler with an\n `:enrich` interceptor. Instead of forcing you to return the `db` from every\n non-applicable branch, you can return `nil` to use the given `db` value:\n\n #!clj\n (def set-last-update\n (core/enrich\n (fn [{db :db} [_ {user :user}]]\n (when (active-user? user) ;; <- Only perform an update if user is active\n ...))))\n ",new cljs.core.Keyword("api-docs","heading","api-docs/heading",2007966345),"Interceptors"], null)),cljs.core.with_meta(new cljs.core.Symbol(null,"reg-global-interceptor","reg-global-interceptor",2060591173,null),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(new cljs.core.Symbol(null,"quote","quote",1377916282,null),cljs.core.list(new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"interceptor","interceptor",-1526696693,null)], null))),new cljs.core.Keyword(null,"doc","doc",1913296891),"Registers the given `interceptor` as a global interceptor. Global interceptors are\n included in the processing chain of every event.\n\n When you register an event handler, you have the option of supplying an\n interceptor chain. Any global interceptors you register are effectively\n prepending to this chain.\n\n Global interceptors are run in the order that they are registered.",new cljs.core.Keyword("api-docs","heading","api-docs/heading",2007966345),"Global Interceptors"], null)),cljs.core.with_meta(new cljs.core.Symbol(null,"console","console",-1426363712,null),new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword("api-docs","heading","api-docs/heading",2007966345),"Logging",new cljs.core.Keyword(null,"top-fn","top-fn",-2056129173),new cljs.core.PersistentArrayMap(null, 6, [new cljs.core.Keyword(null,"variadic?","variadic?",584179762),true,new cljs.core.Keyword(null,"fixed-arity","fixed-arity",1586445869),(1),new cljs.core.Keyword(null,"max-fixed-arity","max-fixed-arity",-690205543),(1),new cljs.core.Keyword(null,"method-params","method-params",-980792179),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.list(new cljs.core.Symbol(null,"level","level",-1363938217,null),new cljs.core.Symbol(null,"args","args",-1338879193,null))], null),new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"level","level",-1363938217,null),new cljs.core.Symbol(null,"&","&",-2144855648,null),new cljs.core.Symbol(null,"args","args",-1338879193,null)], null)),new cljs.core.Keyword(null,"arglists-meta","arglists-meta",1944829838),cljs.core.list(null)], null),new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(new cljs.core.Symbol(null,"quote","quote",1377916282,null),cljs.core.list(new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"level","level",-1363938217,null),new cljs.core.Symbol(null,"&","&",-2144855648,null),new cljs.core.Symbol(null,"args","args",-1338879193,null)], null))),new cljs.core.Keyword(null,"doc","doc",1913296891),"A utility logging function which is used internally within re-frame to produce\n warnings and other output. It can also be used by libraries which\n extend re-frame, such as effect handlers.\n\n By default, it will output the given `args` to `js/console` at the given log `level`.\n However, an application using re-frame can redirect `console` output via `set-loggers!`.\n\n `level` can be one of `:log`, `:error`, `:warn`, `:debug`, `:group` or `:groupEnd`.\n\n Example usage:\n\n #!clj\n (console :error \"Sure enough it happened:\" a-var \"and\" another)\n (console :warn \"Possible breach of containment wall at:\" dt)\n "], null)),cljs.core.with_meta(new cljs.core.Symbol(null,"clear-cofx","clear-cofx",1267145204,null),new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword("api-docs","heading","api-docs/heading",2007966345),"Coeffects",new cljs.core.Keyword(null,"top-fn","top-fn",-2056129173),new cljs.core.PersistentArrayMap(null, 6, [new cljs.core.Keyword(null,"variadic?","variadic?",584179762),false,new cljs.core.Keyword(null,"fixed-arity","fixed-arity",1586445869),1,new cljs.core.Keyword(null,"max-fixed-arity","max-fixed-arity",-690205543),1,new cljs.core.Keyword(null,"method-params","method-params",-980792179),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.PersistentVector.EMPTY,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"id","id",252129435,null)], null)], null),new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(cljs.core.PersistentVector.EMPTY,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"id","id",252129435,null)], null)),new cljs.core.Keyword(null,"arglists-meta","arglists-meta",1944829838),cljs.core.list(null,null)], null),new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(new cljs.core.Symbol(null,"quote","quote",1377916282,null),cljs.core.list(cljs.core.PersistentVector.EMPTY,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"id","id",252129435,null)], null))),new cljs.core.Keyword(null,"doc","doc",1913296891),"Unregisters coeffect handlers (presumably registered previously via the use of `reg-cofx`).\n\n When called with no args, it will unregister all currently registered coeffect handlers.\n\n When given one arg, assumed to be the `id` of a previously registered\n coeffect handler, it will unregister the associated handler. Will produce a warning to\n console if it finds no matching registration."], null)),cljs.core.with_meta(new cljs.core.Symbol(null,"reg-cofx","reg-cofx",91685178,null),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(new cljs.core.Symbol(null,"quote","quote",1377916282,null),cljs.core.list(new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"id","id",252129435,null),new cljs.core.Symbol(null,"handler","handler",1444934915,null)], null))),new cljs.core.Keyword(null,"doc","doc",1913296891),"Register the given coeffect `handler` for the given `id`, for later use\n within `inject-cofx`:\n\n - `id` is keyword, often namespaced.\n - `handler` is a function which takes either one or two arguments, the first of which is\n always `coeffects` and which returns an updated `coeffects`.\n\n See also: `inject-cofx`\n ",new cljs.core.Keyword("api-docs","heading","api-docs/heading",2007966345),"Coeffects"], null)),cljs.core.with_meta(new cljs.core.Symbol(null,"after","after",-2059438855,null),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(new cljs.core.Symbol(null,"quote","quote",1377916282,null),cljs.core.list(new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"f","f",43394975,null)], null))),new cljs.core.Keyword(null,"doc","doc",1913296891),"Returns an interceptor which runs the given function `f` in the `:after`\n position, presumably for side effects.\n\n `f` is called with two arguments: the `:effects` value for `:db`\n (or the `:coeffect` value of `:db` if no `:db` effect is returned) and the event.\n Its return value is ignored, so `f` can only side-effect.\n\n An example of use can be seen in the re-frame github repo in `/examples/todomvc/events.cljs`:\n\n - `f` runs schema validation (reporting any errors found).\n - `f` writes to localstorage.",new cljs.core.Keyword("api-docs","heading","api-docs/heading",2007966345),"Interceptors"], null)),cljs.core.with_meta(new cljs.core.Symbol(null,"register-handler","register-handler",-2025780993,null),new cljs.core.PersistentArrayMap(null, 5, [new cljs.core.Keyword("api-docs","heading","api-docs/heading",2007966345),"Deprecated",new cljs.core.Keyword(null,"top-fn","top-fn",-2056129173),new cljs.core.PersistentArrayMap(null, 6, [new cljs.core.Keyword(null,"variadic?","variadic?",584179762),true,new cljs.core.Keyword(null,"fixed-arity","fixed-arity",1586445869),(0),new cljs.core.Keyword(null,"max-fixed-arity","max-fixed-arity",-690205543),(0),new cljs.core.Keyword(null,"method-params","method-params",-980792179),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.list(new cljs.core.Symbol(null,"args","args",-1338879193,null))], null),new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"&","&",-2144855648,null),new cljs.core.Symbol(null,"args","args",-1338879193,null)], null)),new cljs.core.Keyword(null,"arglists-meta","arglists-meta",1944829838),cljs.core.list(null)], null),new cljs.core.Keyword(null,"deprecated","deprecated",1498275348),"0.8.0",new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(new cljs.core.Symbol(null,"quote","quote",1377916282,null),cljs.core.list(new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"&","&",-2144855648,null),new cljs.core.Symbol(null,"args","args",-1338879193,null)], null))),new cljs.core.Keyword(null,"doc","doc",1913296891),"Deprecated. Use `reg-event-db` instead."], null)),cljs.core.with_meta(new cljs.core.Symbol(null,"set-loggers!","set-loggers!",-1947820787,null),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(new cljs.core.Symbol(null,"quote","quote",1377916282,null),cljs.core.list(new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"new-loggers","new-loggers",-1268568509,null)], null))),new cljs.core.Keyword(null,"doc","doc",1913296891),"re-frame outputs warnings and errors via the API function `console`\n which, by default, delegates to `js/console`'s default implementation for\n `log`, `error`, `warn`, `debug`, `group` and `groupEnd`. But, using this function,\n you can override that behaviour with your own functions.\n\n The argument `new-loggers` should be a map containing a subset of they keys\n for the standard `loggers`, namely `:log` `:error` `:warn` `:debug` `:group`\n or `:groupEnd`.\n\n Example Usage:\n\n #!clj\n (defn my-logger ;; my alternative logging function\n [& args]\n (post-it-somewhere (apply str args)))\n\n ;; now install my alternative loggers\n (re-frame.core/set-loggers! {:warn my-logger :log my-logger})\n ",new cljs.core.Keyword("api-docs","heading","api-docs/heading",2007966345),"Logging"], null)),cljs.core.with_meta(new cljs.core.Symbol(null,"assoc-effect","assoc-effect",300107315,null),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(new cljs.core.Symbol(null,"quote","quote",1377916282,null),cljs.core.list(new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"context","context",810340414,null),new cljs.core.Symbol(null,"key","key",124488940,null),new cljs.core.Symbol(null,"value","value",1946509744,null)], null))),new cljs.core.Keyword(null,"doc","doc",1913296891),"A utility function, typically used when writing an interceptor's `:after` function.\n\n Adds or updates a key/value pair in the `:effects` map within `context`. ",new cljs.core.Keyword("api-docs","heading","api-docs/heading",2007966345),"Writing Interceptors"], null)),cljs.core.with_meta(new cljs.core.Symbol(null,"on-changes","on-changes",-1308523167,null),new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword("api-docs","heading","api-docs/heading",2007966345),"Interceptors",new cljs.core.Keyword(null,"top-fn","top-fn",-2056129173),new cljs.core.PersistentArrayMap(null, 6, [new cljs.core.Keyword(null,"variadic?","variadic?",584179762),true,new cljs.core.Keyword(null,"fixed-arity","fixed-arity",1586445869),(2),new cljs.core.Keyword(null,"max-fixed-arity","max-fixed-arity",-690205543),(2),new cljs.core.Keyword(null,"method-params","method-params",-980792179),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.list(new cljs.core.Symbol(null,"f","f",43394975,null),new cljs.core.Symbol(null,"out-path","out-path",-923103991,null),new cljs.core.Symbol(null,"in-paths","in-paths",-1809668720,null))], null),new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"f","f",43394975,null),new cljs.core.Symbol(null,"out-path","out-path",-923103991,null),new cljs.core.Symbol(null,"&","&",-2144855648,null),new cljs.core.Symbol(null,"in-paths","in-paths",-1809668720,null)], null)),new cljs.core.Keyword(null,"arglists-meta","arglists-meta",1944829838),cljs.core.list(null)], null),new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(new cljs.core.Symbol(null,"quote","quote",1377916282,null),cljs.core.list(new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"f","f",43394975,null),new cljs.core.Symbol(null,"out-path","out-path",-923103991,null),new cljs.core.Symbol(null,"&","&",-2144855648,null),new cljs.core.Symbol(null,"in-paths","in-paths",-1809668720,null)], null))),new cljs.core.Keyword(null,"doc","doc",1913296891),"Returns an interceptor which will observe N paths within `db`, and if any of them\n test not `identical?` to their previous value (as a result of a event handler\n being run), then it will run `f` to compute a new value, which is then assoc-ed\n into the given `out-path` within `db`.\n\n Example Usage:\n\n #!clj\n (defn my-f\n [a-val b-val]\n ... some computation on a and b in here)\n\n ;; use it\n (def my-interceptor (on-changes my-f [:c] [:a] [:b]))\n\n (reg-event-db\n :event-id\n [... my-interceptor ...] ;; <-- ultimately used here\n (fn [db v]\n ...))\n\n\n If you put this interceptor on handlers which might change paths `:a` or `:b`,\n it will:\n\n - call `f` each time the value at path `[:a]` or `[:b]` changes\n - call `f` with the values extracted from `[:a]` `[:b]`\n - assoc the return value from `f` into the path `[:c]`\n "], null)),cljs.core.with_meta(new cljs.core.Symbol(null,"clear-subscription-cache!","clear-subscription-cache!",1196020095,null),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(new cljs.core.Symbol(null,"quote","quote",1377916282,null),cljs.core.list(cljs.core.PersistentVector.EMPTY)),new cljs.core.Keyword(null,"doc","doc",1913296891),"Removes all subscriptions from the cache.\n\n This function can be used at development time or test time. Useful when hot reloading\n namespaces containing subscription handlers. Also call it after a React/render exception,\n because React components won't have been cleaned up properly. And this, in turn, means\n the subscriptions within those components won't have been cleaned up correctly. So this\n forces the issue.\n ",new cljs.core.Keyword("api-docs","heading","api-docs/heading",2007966345),"Subscriptions"], null)),cljs.core.with_meta(new cljs.core.Symbol(null,"get-effect","get-effect",116827434,null),new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword("api-docs","heading","api-docs/heading",2007966345),"Writing Interceptors",new cljs.core.Keyword(null,"top-fn","top-fn",-2056129173),new cljs.core.PersistentArrayMap(null, 6, [new cljs.core.Keyword(null,"variadic?","variadic?",584179762),false,new cljs.core.Keyword(null,"fixed-arity","fixed-arity",1586445869),3,new cljs.core.Keyword(null,"max-fixed-arity","max-fixed-arity",-690205543),3,new cljs.core.Keyword(null,"method-params","method-params",-980792179),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"context","context",810340414,null)], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"context","context",810340414,null),new cljs.core.Symbol(null,"key","key",124488940,null)], null),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"context","context",810340414,null),new cljs.core.Symbol(null,"key","key",124488940,null),new cljs.core.Symbol(null,"not-found","not-found",1011451547,null)], null)], null),new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"context","context",810340414,null)], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"context","context",810340414,null),new cljs.core.Symbol(null,"key","key",124488940,null)], null),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"context","context",810340414,null),new cljs.core.Symbol(null,"key","key",124488940,null),new cljs.core.Symbol(null,"not-found","not-found",1011451547,null)], null)),new cljs.core.Keyword(null,"arglists-meta","arglists-meta",1944829838),cljs.core.list(null,null,null)], null),new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(new cljs.core.Symbol(null,"quote","quote",1377916282,null),cljs.core.list(new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"context","context",810340414,null)], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"context","context",810340414,null),new cljs.core.Symbol(null,"key","key",124488940,null)], null),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"context","context",810340414,null),new cljs.core.Symbol(null,"key","key",124488940,null),new cljs.core.Symbol(null,"not-found","not-found",1011451547,null)], null))),new cljs.core.Keyword(null,"doc","doc",1913296891),"A utility function, used when writing interceptors, typically within an `:after` function.\n\n When called with one argument, returns the `:effects` map from the `context`.\n\n When called with two or three arguments, behaves like `clojure.core/get` and\n returns the value mapped to `key` in the effects map, `not-found` or\n `nil` if `key` is not present."], null)),cljs.core.with_meta(new cljs.core.Symbol(null,"register-sub","register-sub",2032582885,null),new cljs.core.PersistentArrayMap(null, 5, [new cljs.core.Keyword("api-docs","heading","api-docs/heading",2007966345),"Deprecated",new cljs.core.Keyword(null,"top-fn","top-fn",-2056129173),new cljs.core.PersistentArrayMap(null, 6, [new cljs.core.Keyword(null,"variadic?","variadic?",584179762),true,new cljs.core.Keyword(null,"fixed-arity","fixed-arity",1586445869),(0),new cljs.core.Keyword(null,"max-fixed-arity","max-fixed-arity",-690205543),(0),new cljs.core.Keyword(null,"method-params","method-params",-980792179),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.list(new cljs.core.Symbol(null,"args","args",-1338879193,null))], null),new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"&","&",-2144855648,null),new cljs.core.Symbol(null,"args","args",-1338879193,null)], null)),new cljs.core.Keyword(null,"arglists-meta","arglists-meta",1944829838),cljs.core.list(null)], null),new cljs.core.Keyword(null,"deprecated","deprecated",1498275348),"0.8.0",new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(new cljs.core.Symbol(null,"quote","quote",1377916282,null),cljs.core.list(new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"&","&",-2144855648,null),new cljs.core.Symbol(null,"args","args",-1338879193,null)], null))),new cljs.core.Keyword(null,"doc","doc",1913296891),"Deprecated. Use `reg-sub-raw` instead."], null)),cljs.core.with_meta(new cljs.core.Symbol(null,"path","path",1452340359,null),new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword("api-docs","heading","api-docs/heading",2007966345),"Interceptors",new cljs.core.Keyword(null,"top-fn","top-fn",-2056129173),new cljs.core.PersistentArrayMap(null, 6, [new cljs.core.Keyword(null,"variadic?","variadic?",584179762),true,new cljs.core.Keyword(null,"fixed-arity","fixed-arity",1586445869),(0),new cljs.core.Keyword(null,"max-fixed-arity","max-fixed-arity",-690205543),(0),new cljs.core.Keyword(null,"method-params","method-params",-980792179),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.list(new cljs.core.Symbol(null,"args","args",-1338879193,null))], null),new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"&","&",-2144855648,null),new cljs.core.Symbol(null,"args","args",-1338879193,null)], null)),new cljs.core.Keyword(null,"arglists-meta","arglists-meta",1944829838),cljs.core.list(null)], null),new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(new cljs.core.Symbol(null,"quote","quote",1377916282,null),cljs.core.list(new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"&","&",-2144855648,null),new cljs.core.Symbol(null,"args","args",-1338879193,null)], null))),new cljs.core.Keyword(null,"doc","doc",1913296891),"Returns an interceptor which acts somewhat like `clojure.core/update-in`, in the sense that\n the event handler is given a specific part of `app-db` to change, not all of `app-db`.\n\n The interceptor has both a `:before` and `:after` functions. The `:before` replaces\n the `:db` key within coeffects with a sub-path within `app-db`. The `:after` reverses the process,\n and it grafts the handler's return value back into db, at the right path.\n\n Examples:\n\n #!clj\n (path :some :path)\n (path [:some :path])\n (path [:some :path] :to :here)\n (path [:some :path] [:to] :here)\n\n Example Use:\n\n #!clj\n (reg-event-db\n :event-id\n (path [:a :b]) ;; <-- used here, in interceptor chain\n (fn [b v] ;; 1st arg is not db. Is the value from path [:a :b] within db\n ... new-b)) ;; returns a new value for that path (not the entire db)\n\n Notes:\n\n 1. `path` may appear more than once in an interceptor chain. Progressive narrowing.\n 2. if `:effects` contains no `:db` effect, can't graft a value back in.\n "], null)),cljs.core.with_meta(new cljs.core.Symbol(null,"clear-global-interceptor","clear-global-interceptor",-1607850608,null),new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword("api-docs","heading","api-docs/heading",2007966345),"Global Interceptors",new cljs.core.Keyword(null,"top-fn","top-fn",-2056129173),new cljs.core.PersistentArrayMap(null, 6, [new cljs.core.Keyword(null,"variadic?","variadic?",584179762),false,new cljs.core.Keyword(null,"fixed-arity","fixed-arity",1586445869),1,new cljs.core.Keyword(null,"max-fixed-arity","max-fixed-arity",-690205543),1,new cljs.core.Keyword(null,"method-params","method-params",-980792179),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.PersistentVector.EMPTY,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"id","id",252129435,null)], null)], null),new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(cljs.core.PersistentVector.EMPTY,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"id","id",252129435,null)], null)),new cljs.core.Keyword(null,"arglists-meta","arglists-meta",1944829838),cljs.core.list(null,null)], null),new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(new cljs.core.Symbol(null,"quote","quote",1377916282,null),cljs.core.list(cljs.core.PersistentVector.EMPTY,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"id","id",252129435,null)], null))),new cljs.core.Keyword(null,"doc","doc",1913296891),"Unregisters global interceptors (presumably registered previously via the use of `reg-global-interceptor`).\n\n When called with no args, it will unregister all currently registered global interceptors.\n\n When given one arg, assumed to be the `id` of a previously registered\n global interceptors, it will unregister the associated interceptor. Will produce a warning to\n console if it finds no matching registration."], null)),cljs.core.with_meta(new cljs.core.Symbol(null,"clear-sub","clear-sub",-1368681160,null),new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword("api-docs","heading","api-docs/heading",2007966345),"Subscriptions",new cljs.core.Keyword(null,"top-fn","top-fn",-2056129173),new cljs.core.PersistentArrayMap(null, 6, [new cljs.core.Keyword(null,"variadic?","variadic?",584179762),false,new cljs.core.Keyword(null,"fixed-arity","fixed-arity",1586445869),1,new cljs.core.Keyword(null,"max-fixed-arity","max-fixed-arity",-690205543),1,new cljs.core.Keyword(null,"method-params","method-params",-980792179),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.PersistentVector.EMPTY,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"query-id","query-id",-1180306927,null)], null)], null),new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(cljs.core.PersistentVector.EMPTY,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"query-id","query-id",-1180306927,null)], null)),new cljs.core.Keyword(null,"arglists-meta","arglists-meta",1944829838),cljs.core.list(null,null)], null),new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(new cljs.core.Symbol(null,"quote","quote",1377916282,null),cljs.core.list(cljs.core.PersistentVector.EMPTY,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"query-id","query-id",-1180306927,null)], null))),new cljs.core.Keyword(null,"doc","doc",1913296891),"Unregisters subscription handlers (presumably registered previously via the use of `reg-sub`).\n\n When called with no args, it will unregister all currently registered subscription handlers.\n\n When given one arg, assumed to be the `id` of a previously registered\n subscription handler, it will unregister the associated handler. Will produce a warning to\n console if it finds no matching registration.\n\n NOTE: Depending on the usecase, it may be necessary to call `clear-subscription-cache!` afterwards"], null)),cljs.core.with_meta(new cljs.core.Symbol(null,"trim-v","trim-v",365592887,null),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword("api-docs","heading","api-docs/heading",2007966345),"Interceptors"], null)),cljs.core.with_meta(new cljs.core.Symbol(null,"->interceptor","->interceptor",-390826100,null),new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword("api-docs","heading","api-docs/heading",2007966345),"Writing Interceptors",new cljs.core.Keyword(null,"top-fn","top-fn",-2056129173),new cljs.core.PersistentArrayMap(null, 6, [new cljs.core.Keyword(null,"variadic?","variadic?",584179762),true,new cljs.core.Keyword(null,"fixed-arity","fixed-arity",1586445869),(0),new cljs.core.Keyword(null,"max-fixed-arity","max-fixed-arity",-690205543),(0),new cljs.core.Keyword(null,"method-params","method-params",-980792179),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.list(new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"as","as",1148689641),new cljs.core.Symbol(null,"m","m",-1021758608,null),new cljs.core.Keyword(null,"keys","keys",1068423698),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"id","id",252129435,null),new cljs.core.Symbol(null,"before","before",6839139,null),new cljs.core.Symbol(null,"after","after",-2059438855,null)], null)], null))], null),new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"&","&",-2144855648,null),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"as","as",1148689641),new cljs.core.Symbol(null,"m","m",-1021758608,null),new cljs.core.Keyword(null,"keys","keys",1068423698),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"id","id",252129435,null),new cljs.core.Symbol(null,"before","before",6839139,null),new cljs.core.Symbol(null,"after","after",-2059438855,null)], null)], null)], null)),new cljs.core.Keyword(null,"arglists-meta","arglists-meta",1944829838),cljs.core.list(null)], null),new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(new cljs.core.Symbol(null,"quote","quote",1377916282,null),cljs.core.list(new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"&","&",-2144855648,null),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"as","as",1148689641),new cljs.core.Symbol(null,"m","m",-1021758608,null),new cljs.core.Keyword(null,"keys","keys",1068423698),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"id","id",252129435,null),new cljs.core.Symbol(null,"before","before",6839139,null),new cljs.core.Symbol(null,"after","after",-2059438855,null)], null)], null)], null))),new cljs.core.Keyword(null,"doc","doc",1913296891),"A utility function for creating interceptors.\n\n Accepts three optional, named arguments:\n\n - `:id` - an id for the interceptor (decorative only)\n - `:before` - the interceptor's before function\n - `:after` - the interceptor's after function\n\n Example use:\n\n #!clj\n (def my-interceptor\n (->interceptor\n :id :my-interceptor\n :before (fn [context]\n ... modifies and returns `context`)\n :after (fn [context]\n ... modifies and returns `context`)))\n\n Notes:\n\n - `:before` functions modify and return their `context` argument. Sometimes they\n only side effect, in which case, they'll perform the side effect and return\n `context` unchanged.\n - `:before` functions often modify the `:coeffects` map within `context` and,\n if they do, then they should use the utility functions `get-coeffect` and\n `assoc-coeffect`.\n - `:after` functions modify and return their `context` argument. Sometimes they\n only side effect, in which case, they'll perform the side effect and return\n `context` unchanged.\n - `:after` functions often modify the `:effects` map within `context` and,\n if they do, then they should use the utility functions `get-effect`\n and `assoc-effect`"], null)),cljs.core.with_meta(new cljs.core.Symbol(null,"make-restore-fn","make-restore-fn",-439197753,null),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(new cljs.core.Symbol(null,"quote","quote",1377916282,null),cljs.core.list(cljs.core.PersistentVector.EMPTY)),new cljs.core.Keyword(null,"doc","doc",1913296891),"This is a utility function, typically used in testing.\n\n It checkpoints the current state of re-frame and returns a function which, when\n later called, will restore re-frame to the checkpointed state.\n\n The checkpoint includes `app-db`, all registered handlers and all subscriptions.\n ",new cljs.core.Keyword("api-docs","heading","api-docs/heading",2007966345),"Miscellaneous"], null)),cljs.core.with_meta(new cljs.core.Symbol(null,"purge-event-queue","purge-event-queue",-1780102203,null),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(new cljs.core.Symbol(null,"quote","quote",1377916282,null),cljs.core.list(cljs.core.PersistentVector.EMPTY)),new cljs.core.Keyword(null,"doc","doc",1913296891),"Removes all events currently queued for processing",new cljs.core.Keyword("api-docs","heading","api-docs/heading",2007966345),"Miscellaneous"], null)),cljs.core.with_meta(new cljs.core.Symbol(null,"debug","debug",32358931,null),new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword("api-docs","heading","api-docs/heading",2007966345),"Interceptors"], null)),cljs.core.with_meta(new cljs.core.Symbol(null,"assoc-coeffect","assoc-coeffect",891917445,null),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(new cljs.core.Symbol(null,"quote","quote",1377916282,null),cljs.core.list(new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"context","context",810340414,null),new cljs.core.Symbol(null,"key","key",124488940,null),new cljs.core.Symbol(null,"value","value",1946509744,null)], null))),new cljs.core.Keyword(null,"doc","doc",1913296891),"A utility function, typically used when writing an interceptor's `:before` function.\n\n Adds or updates a key/value pair in the `:coeffects` map within `context`. ",new cljs.core.Keyword("api-docs","heading","api-docs/heading",2007966345),"Writing Interceptors"], null)),cljs.core.with_meta(new cljs.core.Symbol(null,"reg-event-db","reg-event-db",1898199338,null),new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword("api-docs","heading","api-docs/heading",2007966345),"Event Handlers",new cljs.core.Keyword(null,"top-fn","top-fn",-2056129173),new cljs.core.PersistentArrayMap(null, 6, [new cljs.core.Keyword(null,"variadic?","variadic?",584179762),false,new cljs.core.Keyword(null,"fixed-arity","fixed-arity",1586445869),3,new cljs.core.Keyword(null,"max-fixed-arity","max-fixed-arity",-690205543),3,new cljs.core.Keyword(null,"method-params","method-params",-980792179),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"id","id",252129435,null),new cljs.core.Symbol(null,"handler","handler",1444934915,null)], null),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"id","id",252129435,null),new cljs.core.Symbol(null,"interceptors","interceptors",93748576,null),new cljs.core.Symbol(null,"handler","handler",1444934915,null)], null)], null),new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"id","id",252129435,null),new cljs.core.Symbol(null,"handler","handler",1444934915,null)], null),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"id","id",252129435,null),new cljs.core.Symbol(null,"interceptors","interceptors",93748576,null),new cljs.core.Symbol(null,"handler","handler",1444934915,null)], null)),new cljs.core.Keyword(null,"arglists-meta","arglists-meta",1944829838),cljs.core.list(null,null)], null),new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(new cljs.core.Symbol(null,"quote","quote",1377916282,null),cljs.core.list(new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"id","id",252129435,null),new cljs.core.Symbol(null,"handler","handler",1444934915,null)], null),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"id","id",252129435,null),new cljs.core.Symbol(null,"interceptors","interceptors",93748576,null),new cljs.core.Symbol(null,"handler","handler",1444934915,null)], null))),new cljs.core.Keyword(null,"doc","doc",1913296891),"Register the given event `handler` (function) for the given `id`. Optionally, provide\n an `interceptors` chain:\n\n - `id` is typically a namespaced keyword (but can be anything)\n - `handler` is a function: (db event) -> db\n - `interceptors` is a collection of interceptors. Will be flattened and nils removed.\n\n Example Usage:\n\n #!clj\n (reg-event-db\n :token\n (fn [db event]\n (assoc db :some-key (get event 2))) ;; return updated db\n\n Or perhaps:\n\n #!clj\n (reg-event-db\n :namespaced/id ;; <-- namespaced keywords are often used\n [one two three] ;; <-- a seq of interceptors\n (fn [db [_ arg1 arg2]] ;; <-- event vector is destructured\n (-> db\n (dissoc arg1)\n (update :key + arg2)))) ;; return updated db\n "], null)),cljs.core.with_meta(new cljs.core.Symbol(null,"inject-cofx","inject-cofx",-1494968627,null),new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword("api-docs","heading","api-docs/heading",2007966345),"Coeffects",new cljs.core.Keyword(null,"top-fn","top-fn",-2056129173),new cljs.core.PersistentArrayMap(null, 6, [new cljs.core.Keyword(null,"variadic?","variadic?",584179762),false,new cljs.core.Keyword(null,"fixed-arity","fixed-arity",1586445869),2,new cljs.core.Keyword(null,"max-fixed-arity","max-fixed-arity",-690205543),2,new cljs.core.Keyword(null,"method-params","method-params",-980792179),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"id","id",252129435,null)], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"id","id",252129435,null),new cljs.core.Symbol(null,"value","value",1946509744,null)], null)], null),new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"id","id",252129435,null)], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"id","id",252129435,null),new cljs.core.Symbol(null,"value","value",1946509744,null)], null)),new cljs.core.Keyword(null,"arglists-meta","arglists-meta",1944829838),cljs.core.list(null,null)], null),new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(new cljs.core.Symbol(null,"quote","quote",1377916282,null),cljs.core.list(new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"id","id",252129435,null)], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"id","id",252129435,null),new cljs.core.Symbol(null,"value","value",1946509744,null)], null))),new cljs.core.Keyword(null,"doc","doc",1913296891),"Given an `id`, and an optional, arbitrary `value`, returns an interceptor\n whose `:before` adds to the `:coeffects` (map) by calling a pre-registered\n 'coeffect handler' identified by the `id`.\n\n The previous association of a `coeffect handler` with an `id` will have\n happened via a call to `re-frame.core/reg-cofx` - generally on program startup.\n\n Within the created interceptor, this 'looked up' `coeffect handler` will\n be called (within the `:before`) with two arguments:\n\n - the current value of `:coeffects`\n - optionally, the originally supplied arbitrary `value`\n\n This `coeffect handler` is expected to modify and return its first, `coeffects` argument.\n\n **Example of `inject-cofx` and `reg-cofx` working together**\n\n\n First - Early in app startup, you register a `coeffect handler` for `:datetime`:\n\n #!clj\n (re-frame.core/reg-cofx\n :datetime ;; usage (inject-cofx :datetime)\n (fn coeffect-handler\n [coeffect]\n (assoc coeffect :now (js/Date.)))) ;; modify and return first arg\n\n Second - Later, add an interceptor to an -fx event handler, using `inject-cofx`:\n\n #!clj\n (re-frame.core/reg-event-fx ;; when registering an event handler\n :event-id\n [ ... (inject-cofx :datetime) ... ] ;; <-- create an injecting interceptor\n (fn event-handler\n [coeffect event]\n ;;... in here can access (:now coeffect) to obtain current datetime ...\n )))\n\n **Background**\n\n `coeffects` are the input resources required by an event handler\n to perform its job. The two most obvious ones are `db` and `event`.\n But sometimes an event handler might need other resources.\n\n Perhaps an event handler needs a random number or a GUID or the current\n datetime. Perhaps it needs access to a DataScript database connection.\n\n If an event handler directly accesses these resources, it stops being\n pure and, consequently, it becomes harder to test, etc. So we don't\n want that.\n\n Instead, the interceptor created by this function is a way to 'inject'\n 'necessary resources' into the `:coeffects` (map) subsequently given\n to the event handler at call time.\n\n See also `reg-cofx`\n "], null)),cljs.core.with_meta(new cljs.core.Symbol(null,"remove-post-event-callback","remove-post-event-callback",-909482234,null),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(new cljs.core.Symbol(null,"quote","quote",1377916282,null),cljs.core.list(new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"id","id",252129435,null)], null))),new cljs.core.Keyword(null,"doc","doc",1913296891),"Unregisters a post event callback function, identified by `id`.\n\n Such a function must have been previously registered via `add-post-event-callback`",new cljs.core.Keyword("api-docs","heading","api-docs/heading",2007966345),"Miscellaneous"], null))],[new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"name","name",1843675177),new cljs.core.Symbol("re-frame.core","reg-sub-raw","re-frame.core/reg-sub-raw",-1992472244,null),new cljs.core.Keyword(null,"val","val",128701612),re_frame.core.reg_sub_raw,new cljs.core.Keyword(null,"meta","meta",1499536964),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"query-id","query-id",-1180306927,null),new cljs.core.Symbol(null,"handler-fn","handler-fn",841143797,null)], null)),new cljs.core.Keyword(null,"doc","doc",1913296891),"This is a low level, advanced function. You should probably be\n using `reg-sub` instead.\n\n Some explanation is available in the docs at\n http://day8.github.io/re-frame/flow-mechanics/"], null)], null),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"name","name",1843675177),new cljs.core.Symbol("re-frame.core","dispatch-sync","re-frame.core/dispatch-sync",-1113172660,null),new cljs.core.Keyword(null,"val","val",128701612),re_frame.core.dispatch_sync,new cljs.core.Keyword(null,"meta","meta",1499536964),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"event","event",1941966969,null)], null)),new cljs.core.Keyword(null,"doc","doc",1913296891),"Synchronously (immediately) process `event`. It does **not** queue\n the event for handling later as `dispatch` does.\n\n `event` is a vector and the first element is typically a keyword\n which identifies the kind of event.\n\n It is an error to use `dispatch-sync` within an event handler because\n you can't immediately process an new event when one is already\n part way through being processed.\n\n Generally, avoid using this function, and instead, use `dispatch`.\n Only use it in the narrow set of cases where any delay in\n processing is a problem:\n\n 1. the `:on-change` handler of a text field where we are expecting fast typing\n 2. when initialising your app - see 'main' in examples/todomvc/src/core.cljs\n 3. in a unit test where immediate, synchronous processing is useful\n\n Usage:\n\n #!clj\n (dispatch-sync [:sing :falsetto \"piano accordion\"])\n "], null)], null),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"name","name",1843675177),new cljs.core.Symbol("re-frame.core","reg-sub","re-frame.core/reg-sub",-1693960551,null),new cljs.core.Keyword(null,"val","val",128701612),re_frame.core.reg_sub,new cljs.core.Keyword(null,"meta","meta",1499536964),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"query-id","query-id",-1180306927,null),new cljs.core.Symbol(null,"&","&",-2144855648,null),new cljs.core.Symbol(null,"args","args",-1338879193,null)], null)),new cljs.core.Keyword(null,"doc","doc",1913296891),"A call to `reg-sub` associates a `query-id` WITH two functions.\n\n The two functions provide 'a mechanism' for creating a node\n in the Signal Graph. When a node of type `query-id` is needed,\n the two functions can be used to create it.\n\n The three arguments are:\n\n - `query-id` - typically a namespaced keyword (later used in subscribe)\n - optionally, an `input signals` function which returns the input data\n flows required by this kind of node.\n - a `computation function` which computes the value (output) of the\n node (from the input data flows)\n\n Later, during app execution, a call to `(subscribe [:sub-id 3 :blue])`,\n will trigger the need for a new `:sub-id` Signal Graph node (matching the\n query `[:sub-id 3 :blue]`). And, to create that node the two functions\n associated with `:sub-id` will be looked up and used.\n\n Just to be clear: calling `reg-sub` does not immediately create a node.\n It only registers 'a mechanism' (the two functions) by which nodes\n can be created later, when a node is bought into existence by the\n use of `subscribe` in a `View Function`.\n\n `reg-sub` arguments are:\n\n - a `query-id` (typically a namespaced keyword)\n - a function which returns the inputs required by this kind of node (can be supplied in one of three ways)\n - a function which computes the value of this kind of node (can be supplied in one of three ways)\n\n The `computation function` is always the last argument supplied and has three ways to be called.\n Two of these methods are syntactic sugar to provide easier access to functional abstractions around your data.\n\n 1. A function that will accept two parameters, the `input-values` and `query-vector`. This is the\n standard way to provide a `computation-function`\n\n #!clj\n (reg-sub\n :query-id\n (fn [input-values query-vector]\n (:foo input-values)))\n\n 2. A single sugary tuple of `:->` and a 1-arity `computation-function`:\n\n #!clj\n (reg-sub\n :query-id\n :-> computation-fn)\n\n This sugary variation allows you to pass a function that will expect only one parameter,\n namely the `input-values` and entirely omit the `query-vector`. A typical `computation-function`\n expects two parameters which can cause unfortunate results when attempting to use\n clojure standard library functions, or other functions, in a functional manner.\n\n For example, a significant number of subscriptions exist only to get a value\n from the `input-values`. As shown below, this subscription will simply retrieve\n the value associated with the `:foo` key in our db:\n\n #!clj\n (reg-sub\n :query-id\n (fn [db _] ;; :<---- trivial boilerplate we might want to skip over\n (:foo db)))\n\n This is slightly more boilerplate than we might like to do,\n as we can use a keyword directly as a function, and we might like to do this:\n\n #!clj\n (reg-sub\n :query-id\n :foo) ;; :<---- This could be dangerous. If `:foo` is not in db, we get the `query-vector` instead of `nil`.\n\n By using `:->` our function would not contain the `query-vector`, and any\n missing keys would be represented as such:\n\n #!clj\n (reg-sub\n :query-id\n :-> :foo)\n\n This form allows us to ignore the `query-vector` if our `computation-function`\n has no need for it, and be safe from any accidents. Any 1-arity function can be provided,\n and for more complicated use cases, `partial`, `comp`, and anonymous functions can still be used.\n\n 3. A single sugary tuple of `:=>` and a multi-arity `computation-function`\n\n #!clj\n (reg-sub\n :query-id\n :=> computation-fn)\n\n The `query-vector` can be broken into two components `[query-id & optional-values]`, and\n some subscriptions require the `optional-values` for extra work within the subscription.\n To use them in variation #1, we need to destructure our `computation-function` parameters\n in order to use them.\n\n #!clj\n (reg-sub\n :query-id\n (fn [db [_ foo]]\n [db foo]))\n\n Again we are writing boilerplate just to reach our values, and we might prefer to\n have direction access through a parameter vector like `[input-values optional-values]`\n instead, so we might be able to use a multi-arity function directly as our `computation-function`.\n A rewrite of the above sub using this sugary syntax would look like this:\n\n #!clj\n (reg-sub\n :query-id\n :=> vector) ;; :<---- Could also be `(fn [db foo] [db foo])`\n\n The `computation function` is expected to take two arguments:\n\n - `input-values` - the values which flow into this node (how is it wired into the graph?)\n - `query-vector` - the vector given to `subscribe`\n\n and it returns a computed value (which then becomes the output of the node)\n\n When `computation function` is called, the 2nd `query-vector` argument will be that\n vector supplied to the `subscribe`. So, if the call was `(subscribe [:sub-id 3 :blue])`,\n then the `query-vector` supplied to the computation function will be `[:sub-id 3 :blue]`.\n\n The argument(s) supplied to `reg-sub` between `query-id` and the `computation-function`\n can vary in 3 ways, but whatever is there defines the `input signals` part\n of `the mechanism`, specifying what input values \"flow into\" the\n `computation function` (as the 1st argument) when it is called.\n\n So, `reg-sub` can be called in one of three ways, because there are three ways\n to define the input signals part. But note, the 2nd method, in which a\n `signals function` is explicitly supplied, is the most canonical and\n instructive. The other two are really just sugary variations.\n\n **First variation** - no input signal function given:\n\n #!clj\n (reg-sub\n :query-id\n a-computation-fn) ;; has signature: (fn [db query-vec] ... ret-value)\n\n In the absence of an explicit `signals function`, the node's input signal defaults to `app-db`\n and, as a result, the value within `app-db` (a map) is\n given as the 1st argument when `a-computation-fn` is called.\n\n\n **Second variation** - a signal function is explicitly supplied:\n\n #!clj\n (reg-sub\n :query-id\n signal-fn ;; <-- here\n computation-fn)\n\n This is the most canonical and instructive of the three variations.\n\n When a node is created from the template, the `signal function` will be called and it\n is expected to return the input signal(s) as either a singleton, if there is only\n one, or a sequence if there are many, or a map with the signals as the values.\n\n The current values of the returned signals will be supplied as the 1st argument to\n the `a-computation-fn` when it is called - and subject to what this `signal-fn` returns,\n this value will be either a singleton, sequence or map of them (paralleling\n the structure returned by the `signal function`).\n\n This example `signal function` returns a 2-vector of input signals.\n\n #!clj\n (fn [query-vec dynamic-vec]\n [(subscribe [:a-sub])\n (subscribe [:b-sub])])\n\n The associated computation function must be written\n to expect a 2-vector of values for its first argument:\n\n #!clj\n (fn [[a b] query-vec] ;; 1st argument is a seq of two values\n ....)\n\n If, on the other hand, the signal function was simpler and returned a singleton, like this:\n\n #!clj\n (fn [query-vec dynamic-vec]\n (subscribe [:a-sub])) ;; <-- returning a singleton\n\n then the associated computation function must be written to expect a single value\n as the 1st argument:\n\n #!clj\n (fn [a query-vec] ;; 1st argument is a single value\n ...)\n\n Further Note: variation #1 above, in which an `input-fn` was not supplied, like this:\n\n #!clj\n (reg-sub\n :query-id\n a-computation-fn) ;; has signature: (fn [db query-vec] ... ret-value)\n\n is the equivalent of using this\n 2nd variation and explicitly supplying a `signal-fn` which returns `app-db`:\n\n #!clj\n (reg-sub\n :query-id\n (fn [_ _] re-frame/app-db) ;; <--- explicit signal-fn\n a-computation-fn) ;; has signature: (fn [db query-vec] ... ret-value)\n\n **Third variation** - syntax Sugar\n\n #!clj\n (reg-sub\n :a-b-sub\n :<- [:a-sub]\n :<- [:b-sub]\n (fn [[a b] query-vec] ;; 1st argument is a seq of two values\n {:a a :b b}))\n\n This 3rd variation is just syntactic sugar for the 2nd. Instead of providing an\n `signals-fn` you provide one or more pairs of `:<-` and a subscription vector.\n\n If you supply only one pair a singleton will be supplied to the computation function,\n as if you had supplied a `signal-fn` returning only a single value:\n\n #!clj\n (reg-sub\n :a-sub\n :<- [:a-sub]\n (fn [a query-vec] ;; only one pair, so 1st argument is a single value\n ...))\n\n Syntactic sugar for both the `signal-fn` and `computation-fn` can be used together\n and the direction of arrows shows the flow of data and functions. The example from\n directly above is reproduced here:\n\n #!clj\n (reg-sub\n :a-b-sub\n :<- [:a-sub]\n :<- [:b-sub]\n :-> (partial zipmap [:a :b]))\n\n For further understanding, read the tutorials, and look at the detailed comments in\n /examples/todomvc/src/subs.cljs.\n\n See also: `subscribe`\n "], null)], null),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"name","name",1843675177),new cljs.core.Symbol("re-frame.core","dispatch","re-frame.core/dispatch",1765071110,null),new cljs.core.Keyword(null,"val","val",128701612),re_frame.core.dispatch,new cljs.core.Keyword(null,"meta","meta",1499536964),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"event","event",1941966969,null)], null)),new cljs.core.Keyword(null,"doc","doc",1913296891),"Queue `event` for processing (handling).\n\n `event` is a vector and the first element is typically a keyword\n which identifies the kind of event.\n\n The event will be added to a FIFO processing queue, so event\n handling does not happen immediately. It will happen 'very soon'\n but not now. And if the queue already contains events, they\n will be processed first.\n\n Usage:\n\n #!clj\n (dispatch [:order \"pizza\" {:supreme 2 :meatlovers 1 :veg 1}])\n "], null)], null),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"name","name",1843675177),new cljs.core.Symbol("re-frame.core","unwrap","re-frame.core/unwrap",-1498080569,null),new cljs.core.Keyword(null,"val","val",128701612),re_frame.core.unwrap,new cljs.core.Keyword(null,"meta","meta",1499536964),cljs.core.PersistentArrayMap.EMPTY], null),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"name","name",1843675177),new cljs.core.Symbol("re-frame.core","reg-event-fx","re-frame.core/reg-event-fx",-63037421,null),new cljs.core.Keyword(null,"val","val",128701612),re_frame.core.reg_event_fx,new cljs.core.Keyword(null,"meta","meta",1499536964),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"id","id",252129435,null),new cljs.core.Symbol(null,"handler","handler",1444934915,null)], null),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"id","id",252129435,null),new cljs.core.Symbol(null,"interceptors","interceptors",93748576,null),new cljs.core.Symbol(null,"handler","handler",1444934915,null)], null)),new cljs.core.Keyword(null,"doc","doc",1913296891),"Register the given event `handler` (function) for the given `id`. Optionally, provide\n an `interceptors` chain:\n\n - `id` is typically a namespaced keyword (but can be anything)\n - `handler` is a function: (coeffects-map event-vector) -> effects-map\n - `interceptors` is a collection of interceptors. Will be flattened and nils removed.\n\n\n Example Usage:\n\n #!clj\n (reg-event-fx\n :event-id\n (fn [cofx event]\n {:db (assoc (:db cofx) :some-key (get event 2))})) ;; return a map of effects\n\n\n Or perhaps:\n\n #!clj\n (reg-event-fx\n :namespaced/id ;; <-- namespaced keywords are often used\n [one two three] ;; <-- a seq of interceptors\n (fn [{:keys [db] :as cofx} [_ arg1 arg2]] ;; destructure both arguments\n {:db (assoc db :some-key arg1) ;; return a map of effects\n :fx [[:dispatch [:some-event arg2]]]}))\n "], null)], null),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"name","name",1843675177),new cljs.core.Symbol("re-frame.core","enqueue","re-frame.core/enqueue",-170225827,null),new cljs.core.Keyword(null,"val","val",128701612),re_frame.core.enqueue,new cljs.core.Keyword(null,"meta","meta",1499536964),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"context","context",810340414,null),new cljs.core.Symbol(null,"interceptors","interceptors",93748576,null)], null)),new cljs.core.Keyword(null,"doc","doc",1913296891),"A utility function, used when writing an interceptor's `:before` function.\n\n Adds the given collection of `interceptors` to those already in `context's`\n execution `:queue`. It returns the updated `context`.\n\n So, it provides a way for one interceptor to add more interceptors to the\n currently executing interceptor chain.\n "], null)], null),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"name","name",1843675177),new cljs.core.Symbol("re-frame.core","get-coeffect","re-frame.core/get-coeffect",1741350824,null),new cljs.core.Keyword(null,"val","val",128701612),re_frame.core.get_coeffect,new cljs.core.Keyword(null,"meta","meta",1499536964),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"context","context",810340414,null)], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"context","context",810340414,null),new cljs.core.Symbol(null,"key","key",124488940,null)], null),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"context","context",810340414,null),new cljs.core.Symbol(null,"key","key",124488940,null),new cljs.core.Symbol(null,"not-found","not-found",1011451547,null)], null)),new cljs.core.Keyword(null,"doc","doc",1913296891),"A utility function, typically used when writing an interceptor's `:before` function.\n\n When called with one argument, it returns the `:coeffects` map from within that `context`.\n\n When called with two or three arguments, behaves like `clojure.core/get` and\n returns the value mapped to `key` in the `:coeffects` map within `context`, `not-found` or\n `nil` if `key` is not present."], null)], null),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"name","name",1843675177),new cljs.core.Symbol("re-frame.core","clear-event","re-frame.core/clear-event",1624271650,null),new cljs.core.Keyword(null,"val","val",128701612),re_frame.core.clear_event,new cljs.core.Keyword(null,"meta","meta",1499536964),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(cljs.core.PersistentVector.EMPTY,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"id","id",252129435,null)], null)),new cljs.core.Keyword(null,"doc","doc",1913296891),"Unregisters event handlers (presumably registered previously via the use of `reg-event-db` or `reg-event-fx`).\n\n When called with no args, it will unregister all currently registered event handlers.\n\n When given one arg, assumed to be the `id` of a previously registered\n event handler, it will unregister the associated handler. Will produce a warning to\n console if it finds no matching registration."], null)], null),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"name","name",1843675177),new cljs.core.Symbol("re-frame.core","subscribe","re-frame.core/subscribe",-774932115,null),new cljs.core.Keyword(null,"val","val",128701612),re_frame.core.subscribe,new cljs.core.Keyword(null,"meta","meta",1499536964),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"query","query",352022017,null)], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"query","query",352022017,null),new cljs.core.Symbol(null,"dynv","dynv",-405952138,null)], null)),new cljs.core.Keyword(null,"doc","doc",1913296891),"Given a `query` vector, returns a Reagent `reaction` which will, over\n time, reactively deliver a stream of values. So, in FRP-ish terms,\n it returns a `Signal`.\n\n To obtain the current value from the Signal, it must be dereferenced:\n\n #!clj\n (let [signal (subscribe [:items])\n value (deref signal)] ;; could be written as @signal\n ...)\n\n which is typically written tersely as simple:\n\n #!clj\n (let [items @(subscribe [:items])]\n ...)\n\n\n `query` is a vector of at least one element. The first element is the\n `query-id`, typically a namespaced keyword. The rest of the vector's\n elements are optional, additional values which parameterise the query\n performed.\n\n `dynv` is an optional 3rd argument, which is a vector of further input\n signals (atoms, reactions, etc), NOT values. This argument exists for\n historical reasons and is borderline deprecated these days.\n\n **Example Usage**:\n\n #!clj\n (subscribe [:items])\n (subscribe [:items \"blue\" :small])\n (subscribe [:items {:colour \"blue\" :size :small}])\n\n Note: for any given call to `subscribe` there must have been a previous call\n to `reg-sub`, registering the query handler (functions) associated with\n `query-id`.\n\n **Hint**\n\n When used in a view function BE SURE to `deref` the returned value.\n In fact, to avoid any mistakes, some prefer to define:\n\n #!clj\n (def context-map\n\n You can explore what is provided in `context` [here](https://day8.github.io/re-frame/Interceptors/#what-is-context).\n\n Example Usage:\n\n #!clj\n (reg-event-ctx\n :event-id\n (fn [{:keys [coeffects] :as context}]\n (let [initial {:db (:db coeffects)\n :event (:event coeffects)\n :fx []}\n result (-> initial\n function1\n function2\n function3)\n effects (select-keys result [:db :fx])]\n (assoc context :effects effects))))\n "], null)], null),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"name","name",1843675177),new cljs.core.Symbol("re-frame.core","add-post-event-callback","re-frame.core/add-post-event-callback",-441107040,null),new cljs.core.Keyword(null,"val","val",128701612),re_frame.core.add_post_event_callback,new cljs.core.Keyword(null,"meta","meta",1499536964),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"f","f",43394975,null)], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"id","id",252129435,null),new cljs.core.Symbol(null,"f","f",43394975,null)], null)),new cljs.core.Keyword(null,"doc","doc",1913296891),"Registers the given function `f` to be called after each event is processed.\n\n `f` will be called with two arguments:\n\n - `event`: a vector. The event just processed.\n - `queue`: a PersistentQueue, possibly empty, of events yet to be processed.\n\n This facility is useful in advanced cases like:\n\n - you are implementing a complex bootstrap pipeline\n - you want to create your own handling infrastructure, with perhaps multiple\n handlers for the one event, etc. Hook in here.\n - libraries providing 'isomorphic javascript' rendering on Nodejs or Nashorn.\n\n `id` is typically a keyword. If it supplied when an `f` is added, it can be\n subsequently be used to identify it for removal. See `remove-post-event-callback`.\n "], null)], null),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"name","name",1843675177),new cljs.core.Symbol("re-frame.core","reg-fx","re-frame.core/reg-fx",1560429967,null),new cljs.core.Keyword(null,"val","val",128701612),re_frame.core.reg_fx,new cljs.core.Keyword(null,"meta","meta",1499536964),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"id","id",252129435,null),new cljs.core.Symbol(null,"handler","handler",1444934915,null)], null)),new cljs.core.Keyword(null,"doc","doc",1913296891),"Register the given effect `handler` for the given `id`:\n\n - `id` is keyword, often namespaced.\n - `handler` is a side-effecting function which takes a single argument and whose return\n value is ignored.\n\n To use, first, associate `:effect2` with a handler:\n\n #!clj\n (reg-fx\n :effect2\n (fn [value]\n ... do something side-effect-y))\n\n Then, later, if an event handler were to return this effects map:\n\n #!clj\n {:effect2 [1 2]}\n\n then the `handler` `fn` we registered previously, using `reg-fx`, will be\n called with an argument of `[1 2]`.\n "], null)], null),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"name","name",1843675177),new cljs.core.Symbol("re-frame.core","enrich","re-frame.core/enrich",-1956662808,null),new cljs.core.Keyword(null,"val","val",128701612),re_frame.core.enrich,new cljs.core.Keyword(null,"meta","meta",1499536964),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"f","f",43394975,null)], null)),new cljs.core.Keyword(null,"doc","doc",1913296891),"Returns an interceptor which will run the given function `f` in the `:after`\n position.\n\n `f` is called with two arguments: `db` and `event`, and is expected to\n return a modified `db`.\n\n Unlike the `after` interceptor which is only about side effects, `enrich`\n expects `f` to process and alter the given `db` coeffect in some useful way,\n contributing to the derived data, flowing vibe.\n\n If `f` returns `nil`, the `db` value passed to `f` will be returned instead.\n\n #### Example Use:\n\n Imagine that todomvc needed to do duplicate detection - if any two todos had\n the same text, then highlight their background, and report them via a warning\n at the bottom of the panel.\n\n Almost any user action (edit text, add new todo, remove a todo) requires a\n complete reassessment of duplication errors and warnings. E.g. that edit\n just made might have introduced a new duplicate, or removed one. Same with\n any todo removal. So we need to re-calculate warnings after any CRUD events\n associated with the todos list.\n\n Unless we are careful, we might end up coding subtly different checks\n for each kind of CRUD operation. The duplicates check made after\n 'delete todo' event might be subtly different to that done after an\n editing operation. Nice and efficient, but fiddly. A bug generator\n approach.\n\n So, instead, we create an `f` which recalculates ALL warnings from scratch\n every time there is ANY change. It will inspect all the todos, and\n reset ALL FLAGS every time (overwriting what was there previously)\n and fully recalculate the list of duplicates (displayed at the bottom?).\n\n https://twitter.com/nathanmarz/status/879722740776939520\n\n By applying `f` in an `:enrich` interceptor, after every CRUD event,\n we keep the handlers simple and yet we ensure this important step\n (of getting warnings right) is not missed on any change.\n\n We can test `f` easily - it is a pure function - independently of\n any CRUD operation.\n\n This brings huge simplicity at the expense of some re-computation\n each time. This may be a very satisfactory trade-off in many cases.\n\n #### Returning nil\n\n In some cases, it's useful to apply a change to specific situations that can\n be determined at runtime instead of when defining the handler with an\n `:enrich` interceptor. Instead of forcing you to return the `db` from every\n non-applicable branch, you can return `nil` to use the given `db` value:\n\n #!clj\n (def set-last-update\n (core/enrich\n (fn [{db :db} [_ {user :user}]]\n (when (active-user? user) ;; <- Only perform an update if user is active\n ...))))\n "], null)], null),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"name","name",1843675177),new cljs.core.Symbol("re-frame.core","reg-global-interceptor","re-frame.core/reg-global-interceptor",-2081719141,null),new cljs.core.Keyword(null,"val","val",128701612),re_frame.core.reg_global_interceptor,new cljs.core.Keyword(null,"meta","meta",1499536964),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"interceptor","interceptor",-1526696693,null)], null)),new cljs.core.Keyword(null,"doc","doc",1913296891),"Registers the given `interceptor` as a global interceptor. Global interceptors are\n included in the processing chain of every event.\n\n When you register an event handler, you have the option of supplying an\n interceptor chain. Any global interceptors you register are effectively\n prepending to this chain.\n\n Global interceptors are run in the order that they are registered."], null)], null),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"name","name",1843675177),new cljs.core.Symbol("re-frame.core","console","re-frame.core/console",1914748698,null),new cljs.core.Keyword(null,"val","val",128701612),re_frame.core.console,new cljs.core.Keyword(null,"meta","meta",1499536964),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"level","level",-1363938217,null),new cljs.core.Symbol(null,"&","&",-2144855648,null),new cljs.core.Symbol(null,"args","args",-1338879193,null)], null)),new cljs.core.Keyword(null,"doc","doc",1913296891),"A utility logging function which is used internally within re-frame to produce\n warnings and other output. It can also be used by libraries which\n extend re-frame, such as effect handlers.\n\n By default, it will output the given `args` to `js/console` at the given log `level`.\n However, an application using re-frame can redirect `console` output via `set-loggers!`.\n\n `level` can be one of `:log`, `:error`, `:warn`, `:debug`, `:group` or `:groupEnd`.\n\n Example usage:\n\n #!clj\n (console :error \"Sure enough it happened:\" a-var \"and\" another)\n (console :warn \"Possible breach of containment wall at:\" dt)\n "], null)], null),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"name","name",1843675177),new cljs.core.Symbol("re-frame.core","clear-cofx","re-frame.core/clear-cofx",583971922,null),new cljs.core.Keyword(null,"val","val",128701612),re_frame.core.clear_cofx,new cljs.core.Keyword(null,"meta","meta",1499536964),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(cljs.core.PersistentVector.EMPTY,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"id","id",252129435,null)], null)),new cljs.core.Keyword(null,"doc","doc",1913296891),"Unregisters coeffect handlers (presumably registered previously via the use of `reg-cofx`).\n\n When called with no args, it will unregister all currently registered coeffect handlers.\n\n When given one arg, assumed to be the `id` of a previously registered\n coeffect handler, it will unregister the associated handler. Will produce a warning to\n console if it finds no matching registration."], null)], null),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"name","name",1843675177),new cljs.core.Symbol("re-frame.core","reg-cofx","re-frame.core/reg-cofx",-1104161380,null),new cljs.core.Keyword(null,"val","val",128701612),re_frame.core.reg_cofx,new cljs.core.Keyword(null,"meta","meta",1499536964),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"id","id",252129435,null),new cljs.core.Symbol(null,"handler","handler",1444934915,null)], null)),new cljs.core.Keyword(null,"doc","doc",1913296891),"Register the given coeffect `handler` for the given `id`, for later use\n within `inject-cofx`:\n\n - `id` is keyword, often namespaced.\n - `handler` is a function which takes either one or two arguments, the first of which is\n always `coeffects` and which returns an updated `coeffects`.\n\n See also: `inject-cofx`\n "], null)], null),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"name","name",1843675177),new cljs.core.Symbol("re-frame.core","after","re-frame.core/after",705151839,null),new cljs.core.Keyword(null,"val","val",128701612),re_frame.core.after,new cljs.core.Keyword(null,"meta","meta",1499536964),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"f","f",43394975,null)], null)),new cljs.core.Keyword(null,"doc","doc",1913296891),"Returns an interceptor which runs the given function `f` in the `:after`\n position, presumably for side effects.\n\n `f` is called with two arguments: the `:effects` value for `:db`\n (or the `:coeffect` value of `:db` if no `:db` effect is returned) and the event.\n Its return value is ignored, so `f` can only side-effect.\n\n An example of use can be seen in the re-frame github repo in `/examples/todomvc/events.cljs`:\n\n - `f` runs schema validation (reporting any errors found).\n - `f` writes to localstorage."], null)], null),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"name","name",1843675177),new cljs.core.Symbol("re-frame.core","register-handler","re-frame.core/register-handler",772396373,null),new cljs.core.Keyword(null,"val","val",128701612),re_frame.core.register_handler,new cljs.core.Keyword(null,"meta","meta",1499536964),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"&","&",-2144855648,null),new cljs.core.Symbol(null,"args","args",-1338879193,null)], null)),new cljs.core.Keyword(null,"doc","doc",1913296891),"Deprecated. Use `reg-event-db` instead."], null)], null),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"name","name",1843675177),new cljs.core.Symbol("re-frame.core","set-loggers!","re-frame.core/set-loggers!",886929143,null),new cljs.core.Keyword(null,"val","val",128701612),re_frame.core.set_loggers_BANG_,new cljs.core.Keyword(null,"meta","meta",1499536964),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"new-loggers","new-loggers",-1268568509,null)], null)),new cljs.core.Keyword(null,"doc","doc",1913296891),"re-frame outputs warnings and errors via the API function `console`\n which, by default, delegates to `js/console`'s default implementation for\n `log`, `error`, `warn`, `debug`, `group` and `groupEnd`. But, using this function,\n you can override that behaviour with your own functions.\n\n The argument `new-loggers` should be a map containing a subset of they keys\n for the standard `loggers`, namely `:log` `:error` `:warn` `:debug` `:group`\n or `:groupEnd`.\n\n Example Usage:\n\n #!clj\n (defn my-logger ;; my alternative logging function\n [& args]\n (post-it-somewhere (apply str args)))\n\n ;; now install my alternative loggers\n (re-frame.core/set-loggers! {:warn my-logger :log my-logger})\n "], null)], null),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"name","name",1843675177),new cljs.core.Symbol("re-frame.core","assoc-effect","re-frame.core/assoc-effect",-114683447,null),new cljs.core.Keyword(null,"val","val",128701612),re_frame.core.assoc_effect,new cljs.core.Keyword(null,"meta","meta",1499536964),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"context","context",810340414,null),new cljs.core.Symbol(null,"key","key",124488940,null),new cljs.core.Symbol(null,"value","value",1946509744,null)], null)),new cljs.core.Keyword(null,"doc","doc",1913296891),"A utility function, typically used when writing an interceptor's `:after` function.\n\n Adds or updates a key/value pair in the `:effects` map within `context`. "], null)], null),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"name","name",1843675177),new cljs.core.Symbol("re-frame.core","on-changes","re-frame.core/on-changes",1765357575,null),new cljs.core.Keyword(null,"val","val",128701612),re_frame.core.on_changes,new cljs.core.Keyword(null,"meta","meta",1499536964),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"f","f",43394975,null),new cljs.core.Symbol(null,"out-path","out-path",-923103991,null),new cljs.core.Symbol(null,"&","&",-2144855648,null),new cljs.core.Symbol(null,"in-paths","in-paths",-1809668720,null)], null)),new cljs.core.Keyword(null,"doc","doc",1913296891),"Returns an interceptor which will observe N paths within `db`, and if any of them\n test not `identical?` to their previous value (as a result of a event handler\n being run), then it will run `f` to compute a new value, which is then assoc-ed\n into the given `out-path` within `db`.\n\n Example Usage:\n\n #!clj\n (defn my-f\n [a-val b-val]\n ... some computation on a and b in here)\n\n ;; use it\n (def my-interceptor (on-changes my-f [:c] [:a] [:b]))\n\n (reg-event-db\n :event-id\n [... my-interceptor ...] ;; <-- ultimately used here\n (fn [db v]\n ...))\n\n\n If you put this interceptor on handlers which might change paths `:a` or `:b`,\n it will:\n\n - call `f` each time the value at path `[:a]` or `[:b]` changes\n - call `f` with the values extracted from `[:a]` `[:b]`\n - assoc the return value from `f` into the path `[:c]`\n "], null)], null),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"name","name",1843675177),new cljs.core.Symbol("re-frame.core","clear-subscription-cache!","re-frame.core/clear-subscription-cache!",-8362855,null),new cljs.core.Keyword(null,"val","val",128701612),re_frame.core.clear_subscription_cache_BANG_,new cljs.core.Keyword(null,"meta","meta",1499536964),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(cljs.core.PersistentVector.EMPTY),new cljs.core.Keyword(null,"doc","doc",1913296891),"Removes all subscriptions from the cache.\n\n This function can be used at development time or test time. Useful when hot reloading\n namespaces containing subscription handlers. Also call it after a React/render exception,\n because React components won't have been cleaned up properly. And this, in turn, means\n the subscriptions within those components won't have been cleaned up correctly. So this\n forces the issue.\n "], null)], null),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"name","name",1843675177),new cljs.core.Symbol("re-frame.core","get-effect","re-frame.core/get-effect",-1346481552,null),new cljs.core.Keyword(null,"val","val",128701612),re_frame.core.get_effect,new cljs.core.Keyword(null,"meta","meta",1499536964),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"context","context",810340414,null)], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"context","context",810340414,null),new cljs.core.Symbol(null,"key","key",124488940,null)], null),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"context","context",810340414,null),new cljs.core.Symbol(null,"key","key",124488940,null),new cljs.core.Symbol(null,"not-found","not-found",1011451547,null)], null)),new cljs.core.Keyword(null,"doc","doc",1913296891),"A utility function, used when writing interceptors, typically within an `:after` function.\n\n When called with one argument, returns the `:effects` map from the `context`.\n\n When called with two or three arguments, behaves like `clojure.core/get` and\n returns the value mapped to `key` in the effects map, `not-found` or\n `nil` if `key` is not present."], null)], null),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"name","name",1843675177),new cljs.core.Symbol("re-frame.core","register-sub","re-frame.core/register-sub",-772926397,null),new cljs.core.Keyword(null,"val","val",128701612),re_frame.core.register_sub,new cljs.core.Keyword(null,"meta","meta",1499536964),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"&","&",-2144855648,null),new cljs.core.Symbol(null,"args","args",-1338879193,null)], null)),new cljs.core.Keyword(null,"doc","doc",1913296891),"Deprecated. Use `reg-sub-raw` instead."], null)], null),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"name","name",1843675177),new cljs.core.Symbol("re-frame.core","path","re-frame.core/path",-3666115,null),new cljs.core.Keyword(null,"val","val",128701612),re_frame.core.path,new cljs.core.Keyword(null,"meta","meta",1499536964),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"&","&",-2144855648,null),new cljs.core.Symbol(null,"args","args",-1338879193,null)], null)),new cljs.core.Keyword(null,"doc","doc",1913296891),"Returns an interceptor which acts somewhat like `clojure.core/update-in`, in the sense that\n the event handler is given a specific part of `app-db` to change, not all of `app-db`.\n\n The interceptor has both a `:before` and `:after` functions. The `:before` replaces\n the `:db` key within coeffects with a sub-path within `app-db`. The `:after` reverses the process,\n and it grafts the handler's return value back into db, at the right path.\n\n Examples:\n\n #!clj\n (path :some :path)\n (path [:some :path])\n (path [:some :path] :to :here)\n (path [:some :path] [:to] :here)\n\n Example Use:\n\n #!clj\n (reg-event-db\n :event-id\n (path [:a :b]) ;; <-- used here, in interceptor chain\n (fn [b v] ;; 1st arg is not db. Is the value from path [:a :b] within db\n ... new-b)) ;; returns a new value for that path (not the entire db)\n\n Notes:\n\n 1. `path` may appear more than once in an interceptor chain. Progressive narrowing.\n 2. if `:effects` contains no `:db` effect, can't graft a value back in.\n "], null)], null),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"name","name",1843675177),new cljs.core.Symbol("re-frame.core","clear-global-interceptor","re-frame.core/clear-global-interceptor",166960890,null),new cljs.core.Keyword(null,"val","val",128701612),re_frame.core.clear_global_interceptor,new cljs.core.Keyword(null,"meta","meta",1499536964),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(cljs.core.PersistentVector.EMPTY,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"id","id",252129435,null)], null)),new cljs.core.Keyword(null,"doc","doc",1913296891),"Unregisters global interceptors (presumably registered previously via the use of `reg-global-interceptor`).\n\n When called with no args, it will unregister all currently registered global interceptors.\n\n When given one arg, assumed to be the `id` of a previously registered\n global interceptors, it will unregister the associated interceptor. Will produce a warning to\n console if it finds no matching registration."], null)], null),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"name","name",1843675177),new cljs.core.Symbol("re-frame.core","clear-sub","re-frame.core/clear-sub",395526338,null),new cljs.core.Keyword(null,"val","val",128701612),re_frame.core.clear_sub,new cljs.core.Keyword(null,"meta","meta",1499536964),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(cljs.core.PersistentVector.EMPTY,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"query-id","query-id",-1180306927,null)], null)),new cljs.core.Keyword(null,"doc","doc",1913296891),"Unregisters subscription handlers (presumably registered previously via the use of `reg-sub`).\n\n When called with no args, it will unregister all currently registered subscription handlers.\n\n When given one arg, assumed to be the `id` of a previously registered\n subscription handler, it will unregister the associated handler. Will produce a warning to\n console if it finds no matching registration.\n\n NOTE: Depending on the usecase, it may be necessary to call `clear-subscription-cache!` afterwards"], null)], null),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"name","name",1843675177),new cljs.core.Symbol("re-frame.core","trim-v","re-frame.core/trim-v",-1158424979,null),new cljs.core.Keyword(null,"val","val",128701612),re_frame.core.trim_v,new cljs.core.Keyword(null,"meta","meta",1499536964),cljs.core.PersistentArrayMap.EMPTY], null),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"name","name",1843675177),new cljs.core.Symbol("re-frame.core","->interceptor","re-frame.core/->interceptor",6499190,null),new cljs.core.Keyword(null,"val","val",128701612),re_frame.core.__GT_interceptor,new cljs.core.Keyword(null,"meta","meta",1499536964),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"&","&",-2144855648,null),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"as","as",1148689641),new cljs.core.Symbol(null,"m","m",-1021758608,null),new cljs.core.Keyword(null,"keys","keys",1068423698),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"id","id",252129435,null),new cljs.core.Symbol(null,"before","before",6839139,null),new cljs.core.Symbol(null,"after","after",-2059438855,null)], null)], null)], null)),new cljs.core.Keyword(null,"doc","doc",1913296891),"A utility function for creating interceptors.\n\n Accepts three optional, named arguments:\n\n - `:id` - an id for the interceptor (decorative only)\n - `:before` - the interceptor's before function\n - `:after` - the interceptor's after function\n\n Example use:\n\n #!clj\n (def my-interceptor\n (->interceptor\n :id :my-interceptor\n :before (fn [context]\n ... modifies and returns `context`)\n :after (fn [context]\n ... modifies and returns `context`)))\n\n Notes:\n\n - `:before` functions modify and return their `context` argument. Sometimes they\n only side effect, in which case, they'll perform the side effect and return\n `context` unchanged.\n - `:before` functions often modify the `:coeffects` map within `context` and,\n if they do, then they should use the utility functions `get-coeffect` and\n `assoc-coeffect`.\n - `:after` functions modify and return their `context` argument. Sometimes they\n only side effect, in which case, they'll perform the side effect and return\n `context` unchanged.\n - `:after` functions often modify the `:effects` map within `context` and,\n if they do, then they should use the utility functions `get-effect`\n and `assoc-effect`"], null)], null),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"name","name",1843675177),new cljs.core.Symbol("re-frame.core","make-restore-fn","re-frame.core/make-restore-fn",-1130647527,null),new cljs.core.Keyword(null,"val","val",128701612),re_frame.core.make_restore_fn,new cljs.core.Keyword(null,"meta","meta",1499536964),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(cljs.core.PersistentVector.EMPTY),new cljs.core.Keyword(null,"doc","doc",1913296891),"This is a utility function, typically used in testing.\n\n It checkpoints the current state of re-frame and returns a function which, when\n later called, will restore re-frame to the checkpointed state.\n\n The checkpoint includes `app-db`, all registered handlers and all subscriptions.\n "], null)], null),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"name","name",1843675177),new cljs.core.Symbol("re-frame.core","purge-event-queue","re-frame.core/purge-event-queue",1051371119,null),new cljs.core.Keyword(null,"val","val",128701612),re_frame.core.purge_event_queue,new cljs.core.Keyword(null,"meta","meta",1499536964),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(cljs.core.PersistentVector.EMPTY),new cljs.core.Keyword(null,"doc","doc",1913296891),"Removes all events currently queued for processing"], null)], null),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"name","name",1843675177),new cljs.core.Symbol("re-frame.core","debug","re-frame.core/debug",1759164285,null),new cljs.core.Keyword(null,"val","val",128701612),re_frame.core.debug,new cljs.core.Keyword(null,"meta","meta",1499536964),cljs.core.PersistentArrayMap.EMPTY], null),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"name","name",1843675177),new cljs.core.Symbol("re-frame.core","assoc-coeffect","re-frame.core/assoc-coeffect",-832544285,null),new cljs.core.Keyword(null,"val","val",128701612),re_frame.core.assoc_coeffect,new cljs.core.Keyword(null,"meta","meta",1499536964),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"context","context",810340414,null),new cljs.core.Symbol(null,"key","key",124488940,null),new cljs.core.Symbol(null,"value","value",1946509744,null)], null)),new cljs.core.Keyword(null,"doc","doc",1913296891),"A utility function, typically used when writing an interceptor's `:before` function.\n\n Adds or updates a key/value pair in the `:coeffects` map within `context`. "], null)], null),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"name","name",1843675177),new cljs.core.Symbol("re-frame.core","reg-event-db","re-frame.core/reg-event-db",418153612,null),new cljs.core.Keyword(null,"val","val",128701612),re_frame.core.reg_event_db,new cljs.core.Keyword(null,"meta","meta",1499536964),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"id","id",252129435,null),new cljs.core.Symbol(null,"handler","handler",1444934915,null)], null),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"id","id",252129435,null),new cljs.core.Symbol(null,"interceptors","interceptors",93748576,null),new cljs.core.Symbol(null,"handler","handler",1444934915,null)], null)),new cljs.core.Keyword(null,"doc","doc",1913296891),"Register the given event `handler` (function) for the given `id`. Optionally, provide\n an `interceptors` chain:\n\n - `id` is typically a namespaced keyword (but can be anything)\n - `handler` is a function: (db event) -> db\n - `interceptors` is a collection of interceptors. Will be flattened and nils removed.\n\n Example Usage:\n\n #!clj\n (reg-event-db\n :token\n (fn [db event]\n (assoc db :some-key (get event 2))) ;; return updated db\n\n Or perhaps:\n\n #!clj\n (reg-event-db\n :namespaced/id ;; <-- namespaced keywords are often used\n [one two three] ;; <-- a seq of interceptors\n (fn [db [_ arg1 arg2]] ;; <-- event vector is destructured\n (-> db\n (dissoc arg1)\n (update :key + arg2)))) ;; return updated db\n "], null)], null),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"name","name",1843675177),new cljs.core.Symbol("re-frame.core","inject-cofx","re-frame.core/inject-cofx",506211767,null),new cljs.core.Keyword(null,"val","val",128701612),re_frame.core.inject_cofx,new cljs.core.Keyword(null,"meta","meta",1499536964),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"id","id",252129435,null)], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"id","id",252129435,null),new cljs.core.Symbol(null,"value","value",1946509744,null)], null)),new cljs.core.Keyword(null,"doc","doc",1913296891),"Given an `id`, and an optional, arbitrary `value`, returns an interceptor\n whose `:before` adds to the `:coeffects` (map) by calling a pre-registered\n 'coeffect handler' identified by the `id`.\n\n The previous association of a `coeffect handler` with an `id` will have\n happened via a call to `re-frame.core/reg-cofx` - generally on program startup.\n\n Within the created interceptor, this 'looked up' `coeffect handler` will\n be called (within the `:before`) with two arguments:\n\n - the current value of `:coeffects`\n - optionally, the originally supplied arbitrary `value`\n\n This `coeffect handler` is expected to modify and return its first, `coeffects` argument.\n\n **Example of `inject-cofx` and `reg-cofx` working together**\n\n\n First - Early in app startup, you register a `coeffect handler` for `:datetime`:\n\n #!clj\n (re-frame.core/reg-cofx\n :datetime ;; usage (inject-cofx :datetime)\n (fn coeffect-handler\n [coeffect]\n (assoc coeffect :now (js/Date.)))) ;; modify and return first arg\n\n Second - Later, add an interceptor to an -fx event handler, using `inject-cofx`:\n\n #!clj\n (re-frame.core/reg-event-fx ;; when registering an event handler\n :event-id\n [ ... (inject-cofx :datetime) ... ] ;; <-- create an injecting interceptor\n (fn event-handler\n [coeffect event]\n ;;... in here can access (:now coeffect) to obtain current datetime ...\n )))\n\n **Background**\n\n `coeffects` are the input resources required by an event handler\n to perform its job. The two most obvious ones are `db` and `event`.\n But sometimes an event handler might need other resources.\n\n Perhaps an event handler needs a random number or a GUID or the current\n datetime. Perhaps it needs access to a DataScript database connection.\n\n If an event handler directly accesses these resources, it stops being\n pure and, consequently, it becomes harder to test, etc. So we don't\n want that.\n\n Instead, the interceptor created by this function is a way to 'inject'\n 'necessary resources' into the `:coeffects` (map) subsequently given\n to the event handler at call time.\n\n See also `reg-cofx`\n "], null)], null),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"name","name",1843675177),new cljs.core.Symbol("re-frame.core","remove-post-event-callback","re-frame.core/remove-post-event-callback",-1601893792,null),new cljs.core.Keyword(null,"val","val",128701612),re_frame.core.remove_post_event_callback,new cljs.core.Keyword(null,"meta","meta",1499536964),new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"arglists","arglists",1661989754),cljs.core.list(new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Symbol(null,"id","id",252129435,null)], null)),new cljs.core.Keyword(null,"doc","doc",1913296891),"Unregisters a post event callback function, identified by `id`.\n\n Such a function must have been previously registered via `add-post-event-callback`"], null)], null)]),sci.configs.re_frame.re_frame.rfns); sci.configs.re_frame.re_frame.re_frame_db_namespace = sci.core._copy_ns(new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Symbol(null,"app-db","app-db",-1788829467,null),new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null,"name","name",1843675177),new cljs.core.Symbol("re-frame.db","app-db","re-frame.db/app-db",1918166498,null),new cljs.core.Keyword(null,"val","val",128701612),re_frame.db.app_db,new cljs.core.Keyword(null,"meta","meta",1499536964),cljs.core.PersistentArrayMap.EMPTY], null)], null),sci.configs.re_frame.re_frame.rfdbns); sci.configs.re_frame.re_frame.namespaces = new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Symbol(null,"re-frame.core","re-frame.core",-1549073474,null),sci.configs.re_frame.re_frame.re_frame_namespace,new cljs.core.Symbol(null,"re-frame.db","re-frame.db",983930750,null),sci.configs.re_frame.re_frame.re_frame_db_namespace], null); sci.configs.re_frame.re_frame.config = new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"namespaces","namespaces",-1444157469),sci.configs.re_frame.re_frame.namespaces], null); //# sourceMappingURL=sci.configs.re_frame.re_frame.js.map