159 lines
123 KiB
JavaScript
159 lines
123 KiB
JavaScript
(function(){
|
|
'use strict';var yga=function(){var a=document;var b="IFRAME";"application/xhtml+xml"===a.contentType&&(b=b.toLowerCase());return a.createElement(b)},s5=function(a,b,c){var d=a;b&&(d=(0,$APP.Ba)(a,b));d=s5.Ki(d);"function"===typeof $APP.la.setImmediate&&(c||s5.Ii())?$APP.la.setImmediate(d):(s5.Hh||(s5.Hh=s5.gi()),s5.Hh(d))},t5=function(a,b){return b instanceof a},u5=function(a,b){if(null!=a&&null!=a.ig)a.ig(a,b);else{var c=u5[$APP.pa(null==a?null:a)];if(null!=c)c.g?c.g(a,b):c.call(null,a,b);else if(c=
|
|
u5._,null!=c)c.g?c.g(a,b):c.call(null,a,b);else throw $APP.Gb("IDisposable.add-on-dispose!",a);}},v5=function(a){return $APP.V2.add_after_render(a)},w5=function(a){return null!=a?a.D&32768||$APP.Cd===a.Kd?!0:a.D?!1:$APP.Eb($APP.uc,a):$APP.Eb($APP.uc,a)},zga=function(a,b){u5(a,b)},Aga=function(a,b){return setTimeout(a,b)},x5=function(a){return null!=a&&$APP.Cd===a.Ye?[$APP.p(t5.g?t5.g($APP.i3,a):t5.call(null,$APP.i3,a))?"ra":$APP.p(t5.g?t5.g($APP.p3,a):t5.call(null,$APP.p3,a))?"rc":$APP.p(t5.g?t5.g($APP.t3,
|
|
a):t5.call(null,$APP.t3,a))?"rx":$APP.p(t5.g?t5.g($APP.m3,a):t5.call(null,$APP.m3,a))?"tr":"other",$APP.t.h($APP.Dd(a))].join(""):null},z5=function(a){return $APP.Le(a)?$APP.y(a):y5.l($APP.mL,$APP.I(["re-frame: expected a vector, but got:",a]))},Bga=function(a,b){return $APP.jf.j(function(c,d){return $APP.B.g($APP.Hp.h(b),$APP.Hp.h(d))?$APP.Af.g(c,b):$APP.Af.g(c,d)},A5,a)},Cga=function(a){var b=$APP.hg(a),c=$APP.Xe.g(b,$APP.Hp);return $APP.gk.B(B5,$APP.Ir,C5,function(d){var e=$APP.Dj.g($APP.Hp,d);
|
|
return $APP.p($APP.Bg($APP.$i([c]),e))?Bga(d,b):$APP.Af.g(d,b)})},Dga=function(a){return $APP.gk.B(B5,$APP.Ir,C5,function(b){return $APP.Vh.g(A5,$APP.ts.g(function(c){return $APP.B.g(a,$APP.Hp.h(c))},b))})},E5=function(a,b){return $APP.Xe.g($APP.Xe.g($APP.v(D5),a),b)},F5=function(a,b,c){$APP.gk.B(D5,$APP.Pp,new $APP.M(null,2,5,$APP.O,[a,b],null),c);return c},H5=function(a,b){return $APP.Mp.g(a,new $APP.M(null,2,5,$APP.O,[G5,b],null))},I5=function(a,b,c){return $APP.Mp.j(a,new $APP.M(null,2,5,$APP.O,
|
|
[G5,b],null),c)},J5=function(a,b,c){return $APP.Pp(a,new $APP.M(null,2,5,$APP.O,[G5,b],null),c)},L5=function(a,b){return $APP.Mp.g(a,new $APP.M(null,2,5,$APP.O,[K5,b],null))},M5=function(a,b,c){return $APP.Pp(a,new $APP.M(null,2,5,$APP.O,[K5,b],null),c)},N5=function(a,b){for(var c=a;;){var d=$APP.UC.h(c);if($APP.Ee(d))return c;a=$APP.Ce(d);var e=$APP.CK.h(c);c=$APP.Vi.l(c,$APP.UC,$APP.De(d),$APP.I([$APP.CK,$APP.Af.g(e,a)]));a=$APP.Xe.g(a,b);c=$APP.p(a)?a.h?a.h(c):a.call(null,c):c}},O5=function(a,
|
|
b){return $APP.Ir.B(a,$APP.UC,$APP.ys.g($APP.Vh,A5),b)},Q5=function(a,b){return F5(P5,a,$APP.ts.g($APP.zb,$APP.Yg(b)))},V5=function(a){var b=z5(a);b=E5(P5,b);if($APP.p(b))if($APP.p(R5))y5.l($APP.mL,$APP.I(["re-frame: while handling",R5,", dispatch-sync was called for",a,". You can't call dispatch-sync within an event handler."]));else{var c=R5;R5=a;try{var d=O5(M5(M5($APP.gg,P5,a),S5,a),b);var e=N5(d,T5);var f=O5($APP.um.g(e,$APP.UC),$APP.CK.h(e));N5(f,U5)}finally{R5=c}}},X5=function(a,b,c){var d=
|
|
new $APP.M(null,2,5,$APP.O,[a,b],null);zga(c,function(){return $APP.gk.g(W5,function(e){return $APP.Ze(e,d)&&c===$APP.Xe.g(e,d)?$APP.um.g(e,d):e})});$APP.gk.g(W5,function(e){return $APP.Vi.j(e,d,c)});return c},Y5=function(a,b){return $APP.Xe.g($APP.v(W5),new $APP.M(null,2,5,$APP.O,[a,b],null))},Z5=function(a,b){return $APP.Vh.j($APP.ve(b),$APP.Dj.h(function(c){var d=$APP.E.j(c,0,null);c=$APP.E.j(c,1,null);return new $APP.M(null,2,5,$APP.O,[d,a.h?a.h(c):a.call(null,c)],null)}),b)},$5=function(a,b){var c=
|
|
$APP.ce;c=$APP.Ie(a)?$APP.Dj.g(c,a):$APP.Je(a)?Z5(c,a):w5(a)?c.h?c.h(a):c.call(null,a):$APP.Pd;$APP.Ie(a)?$APP.Dj.g($APP.ce,a):$APP.Je(a)?Z5($APP.ce,a):w5(a)?$APP.v(a):y5.l($APP.mL,$APP.I(["re-frame: in the reg-sub for",b,", the input-signals function returns:",a]));return c},e6=function(a){for(var b=$APP.le(a.Eb);;){if(0===b)return a6(a,b6,null);var c=$APP.Bg(Ega,$APP.Qi($APP.Be($APP.Ce(a.Eb))));if($APP.p(c))return a6(a,c6,c);d6(a);--b}},g6=function(a){function b(){return a6(a,f6,null)}return s5.h?
|
|
s5.h(b):s5.call(null,b)},a6=function(a,b,c){var d=function(){var f=new $APP.M(null,2,5,$APP.O,[a.Re,b],null);if($APP.B.g(new $APP.M(null,2,5,$APP.O,[h6,i6],null),f))return new $APP.M(null,2,5,$APP.O,[j6,function(){a.Eb=$APP.Af.g(a.Eb,c);return g6(a)}],null);if($APP.B.g(new $APP.M(null,2,5,$APP.O,[k6,$APP.ZT],null),f))return new $APP.M(null,2,5,$APP.O,[h6,function(){a.Eb=A5;throw c;}],null);if($APP.B.g(new $APP.M(null,2,5,$APP.O,[k6,b6],null),f))return $APP.Ee(a.Eb)?new $APP.M(null,1,5,$APP.O,[h6],
|
|
null):new $APP.M(null,2,5,$APP.O,[j6,function(){return g6(a)}],null);if($APP.B.g(new $APP.M(null,2,5,$APP.O,[k6,c6],null),f))return new $APP.M(null,2,5,$APP.O,[l6,function(){return Fga(a,c)}],null);if($APP.B.g(new $APP.M(null,2,5,$APP.O,[l6,m6],null),f))return new $APP.M(null,2,5,$APP.O,[k6,function(){d6(a);return e6(a)}],null);if($APP.B.g(new $APP.M(null,2,5,$APP.O,[j6,f6],null),f))return new $APP.M(null,2,5,$APP.O,[k6,function(){return e6(a)}],null);if($APP.B.g(new $APP.M(null,2,5,$APP.O,[l6,i6],
|
|
null),f))return new $APP.M(null,2,5,$APP.O,[l6,function(){return a.Eb=$APP.Af.g(a.Eb,c)}],null);if($APP.B.g(new $APP.M(null,2,5,$APP.O,[k6,i6],null),f))return new $APP.M(null,2,5,$APP.O,[k6,function(){return a.Eb=$APP.Af.g(a.Eb,c)}],null);if($APP.B.g(new $APP.M(null,2,5,$APP.O,[j6,i6],null),f))return new $APP.M(null,2,5,$APP.O,[j6,function(){return a.Eb=$APP.Af.g(a.Eb,c)}],null);throw $APP.Gm.g(["re-frame: router state transition not found. ",$APP.t.h(a.Re)," ",$APP.t.h(b)].join(""),new $APP.n(null,
|
|
2,[Gga,a.Re,Hga,b],null));}();var e=$APP.E.j(d,0,null);d=$APP.E.j(d,1,null);a.Re=e;return $APP.p(d)?d.s?d.s():d.call(null):null},Fga=function(a,b){function c(){return a6(a,m6,null)}return b.h?b.h(c):b.call(null,c)},d6=function(a){var b=$APP.Ce(a.Eb);try{V5(b),a.Eb=$APP.De(a.Eb),n6(a,b)}catch(c){a6(a,$APP.ZT,c)}},n6=function(a,b){for(var c=$APP.x($APP.Si(a.Bd)),d=null,e=0,f=0;;)if(f<e){var g=d.Y(null,f);g.g?g.g(b,a.Eb):g.call(null,b,a.Eb);f+=1}else if(c=$APP.x(c))d=c,$APP.Me(d)?(c=$APP.hd(d),e=$APP.id(d),
|
|
d=c,g=$APP.le(c),c=e,e=g):(g=$APP.y(d),g.g?g.g(b,a.Eb):g.call(null,b,a.Eb),c=$APP.z(d),d=null,e=0),f=0;else break},p6=function(a){if(null==a)throw $APP.Gm.g('re-frame: you called "dispatch" without an event vector.',$APP.gg);a6(o6,i6,a);return null},r6=function(a,b){return F5(q6,a,b)},s6=function(a){a=$APP.hg(a);var b=$APP.Xe.g(a,Iga),c=$APP.Xe.g(a,$APP.Hx);return $APP.Ee(c)||"number"!==typeof b?y5.l($APP.mL,$APP.I(["re-frame: ignoring bad :dispatch-later value:",a])):Aga(function(){return p6(c)},
|
|
b)},v6=function(a){return t6.l($APP.I([$APP.Hp,K5,T5,function(b){var c=E5(u6,a);return $APP.p(c)?$APP.Ir.j(b,K5,c):y5.l($APP.mL,$APP.I(["No cofx handler registered for",a]))}]))},Jga=function(a,b){return t6.l($APP.I([$APP.Hp,K5,T5,function(c){var d=E5(u6,a);return $APP.p(d)?$APP.Ir.B(c,K5,d,b):y5.l($APP.mL,$APP.I(["No cofx handler registered for",a]))}]))},w6=function(a,b){return $APP.B.g(a,b)?new $APP.M(null,3,5,$APP.O,[null,null,a],null):new $APP.M(null,3,5,$APP.O,[a,b,null],null)},Kga=function(a){return $APP.x(a)?
|
|
$APP.jf.j(function(b,c){var d=$APP.E.j(c,0,null);c=$APP.E.j(c,1,null);return $APP.Vi.j(b,d,c)},$APP.rh($APP.lp.g($APP.Dg.g($APP.ip,$APP.Qi(a)),null)),a):null},Lga=function(a,b,c){var d=$APP.Xe.g(a,c),e=$APP.Xe.g(b,c),f=x6(d,e),g=$APP.E.j(f,0,null),k=$APP.E.j(f,1,null);f=$APP.E.j(f,2,null);a=$APP.Ze(a,c);b=$APP.Ze(b,c);d=a&&b&&(null!=f||null==d&&null==e);return new $APP.M(null,3,5,$APP.O,[!a||null==g&&d?null:$APP.fg([c,g]),!b||null==k&&d?null:$APP.fg([c,k]),d?$APP.fg([c,f]):null],null)},z6=function(a,
|
|
b){var c=$APP.Dj,d=c.g,e=y6.j,f=$APP.Le(a)?a:$APP.rh(a),g=$APP.Le(b)?b:$APP.rh(b),k=$APP.Os.h;a=$APP.le(a);b=$APP.le(b);return $APP.rh(d.call(c,Kga,e.call(y6,f,g,k.call($APP.Os,a>b?a:b))))},Mga=function(a,b){return new $APP.M(null,3,5,$APP.O,[$APP.ig($APP.XU.g(a,b)),$APP.ig($APP.XU.g(b,a)),$APP.ig($APP.WU.g(a,b))],null)},A6=function(a){if(null!=a&&null!=a.ci)a=a.ci(a);else{var b=A6[$APP.pa(null==a?null:a)];if(null!=b)a=b.h?b.h(a):b.call(null,a);else if(b=A6._,null!=b)a=b.h?b.h(a):b.call(null,a);else throw $APP.Gb("EqualityPartition.equality-partition",
|
|
a);}return a},B6=function(a,b){if(null!=a&&null!=a.bi)a=a.bi(a,b);else{var c=B6[$APP.pa(null==a?null:a)];if(null!=c)a=c.g?c.g(a,b):c.call(null,a,b);else if(c=B6._,null!=c)a=c.g?c.g(a,b):c.call(null,a,b);else throw $APP.Gb("Diff.diff-similar",a);}return a},x6=function(a,b){return $APP.B.g(a,b)?new $APP.M(null,3,5,$APP.O,[null,null,a],null):$APP.B.g(A6(a),A6(b))?B6(a,b):w6(a,b)},Oga=function(a){return t6.l($APP.I([$APP.Hp,Nga,T5,function(b){var c=K5.h(b),d=$APP.hg(c);c=$APP.Xe.g(d,C6);d=$APP.Xe.g(d,
|
|
P5);return J5(b,C6,a.g?a.g(c,d):a.call(null,c,d))}]))},Qga=function(a){return t6.l($APP.I([$APP.Hp,Pga,T5,function(b){var c=K5.h(b);c=$APP.hg(c);var d=$APP.Xe.g(c,P5);return $APP.Vi.j(b,G5,a.g?a.g(c,d):a.call(null,c,d))}]))},Sga=function(a){return t6.l($APP.I([$APP.Hp,Rga,T5,function(b){return a.h?a.h(b):a.call(null,b)}]))},Uga=function(a){return t6.l($APP.I([$APP.Hp,Tga,U5,function(b){var c=L5(b,P5),d=$APP.Ze(G5.h(b),C6)?H5(b,C6):L5(b,C6);c=a.g?a.g(d,c):a.call(null,d,c);return J5(b,C6,$APP.p(c)?
|
|
c:d)}]))},Vga=function(a){return t6.l($APP.I([$APP.Hp,U5,U5,function(b){var c=$APP.Ze(G5.h(b),C6)?H5(b,C6):L5(b,C6),d=L5(b,P5);a.g?a.g(c,d):a.call(null,c,d);return b}]))},E6=function(a,b){return F5(D6,a,b)};$APP.t3.prototype.ig=$APP.ja(53,function(a,b){a=this.ah;return null==a?this.ah=[b]:a.push(b)});s5.Ii=function(){return $APP.la.Window&&$APP.la.Window.prototype&&!$APP.ib("Edge")&&$APP.la.Window.prototype.setImmediate==$APP.la.setImmediate?!1:!0};
|
|
s5.gi=function(){var a=$APP.la.MessageChannel;"undefined"===typeof a&&"undefined"!==typeof window&&window.postMessage&&window.addEventListener&&!$APP.ib("Presto")&&(a=function(){var e=yga();e.style.display="none";document.documentElement.appendChild(e);var f=e.contentWindow;e=f.document;e.open();e.close();var g="callImmediate"+Math.random(),k="file:"==f.location.protocol?"*":f.location.protocol+"//"+f.location.host;e=(0,$APP.Ba)(function(l){if(("*"==k||l.origin==k)&&l.data==g)this.port1.onmessage()},
|
|
this);f.addEventListener("message",e,!1);this.port1={};this.port2={postMessage:function(){f.postMessage(g,k)}}});if("undefined"!==typeof a&&!$APP.ib("Trident")&&!$APP.ib("MSIE")){var b=new a,c={},d=c;b.port1.onmessage=function(){if(void 0!==c.next){c=c.next;var e=c.Bg;c.Bg=null;e()}};return function(e){d.next={Bg:e};d=d.next;b.port2.postMessage(0)}}return function(e){$APP.la.setTimeout(e,0)}};s5.Ki=function(a){return a};
|
|
var Wga=new $APP.w("re-frame.core","unwrap","re-frame.core/unwrap",-1498080569,null),Xga=new $APP.K(null,"do-fx","do-fx",1194163050),Yga=new $APP.w("re-frame.core","add-post-event-callback","re-frame.core/add-post-event-callback",-441107040,null),F6=new $APP.w(null,"handler-fn","handler-fn",841143797,null),Zga=new $APP.w("re-frame.core","reg-fx","re-frame.core/reg-fx",1560429967,null),G6=new $APP.w(null,"event","event",1941966969,null),H6=new $APP.w(null,"re-frame.core","re-frame.core",-1549073474,
|
|
null),Pga=new $APP.K(null,"fx-handler","fx-handler",-549783097),$ga=new $APP.w(null,"clear-sub","clear-sub",-1368681160,null),aha=new $APP.w("re-frame.core","clear-event","re-frame.core/clear-event",1624271650,null),I6=new $APP.w(null,"dynv","dynv",-405952138,null),J6=new $APP.K(null,"atom","atom",-397043653),K6=new $APP.K("re-frame.std-interceptors","not-found","re-frame.std-interceptors/not-found",-1614827865),bha=new $APP.w("re-frame.core","console","re-frame.core/console",1914748698,null),L6=
|
|
new $APP.w(null,"interceptor","interceptor",-1526696693,null),cha=new $APP.w(null,"purge-event-queue","purge-event-queue",-1780102203,null),dha=new $APP.w("re-frame.core","get-coeffect","re-frame.core/get-coeffect",1741350824,null),M6=new $APP.w(null,"query-id","query-id",-1180306927,null),eha=new $APP.w(null,"get-effect","get-effect",116827434,null),fha=new $APP.w("re-frame.core","enqueue","re-frame.core/enqueue",-170225827,null),gha=new $APP.w(null,"clear-subscription-cache!","clear-subscription-cache!",
|
|
1196020095,null),N6=new $APP.w(null,"in-paths","in-paths",-1809668720,null),O6=new $APP.K(null,"deprecated","deprecated",1498275348),hha=new $APP.K(null,"on-changes","on-changes",1345912602),Gga=new $APP.K(null,"fsm-state","fsm-state",1656310533),iha=new $APP.w("re-frame.core","trim-v","re-frame.core/trim-v",-1158424979,null),jha=new $APP.w("re-frame.core","set-loggers!","re-frame.core/set-loggers!",886929143,null),P6=new $APP.w(null,"not-found","not-found",1011451547,null),q6=new $APP.K(null,"fx",
|
|
"fx",-1237829572),kha=new $APP.K(null,"trim-v","trim-v",-1274938640),lha=new $APP.K(null,"deregister-event-handler","deregister-event-handler",-1096518994),mha=new $APP.w("re-frame.core","debug","re-frame.core/debug",1759164285,null),c6=new $APP.K(null,"pause","pause",-2095325672),nha=new $APP.w(null,"reg-event-db","reg-event-db",1898199338,null),oha=new $APP.w(null,"clear-cofx","clear-cofx",1267145204,null),pha=new $APP.w("re-frame.core","after","re-frame.core/after",705151839,null),Q6=new $APP.K("api-docs",
|
|
"heading","api-docs/heading",2007966345),qha=new $APP.w(null,"reg-event-fx","reg-event-fx",350713021,null),C6=new $APP.K(null,"db","db",993250759),rha=new $APP.K(null,"unwrap","unwrap",-1399175462),S5=new $APP.K(null,"original-event","original-event",2121330403),sha=new $APP.w("re-frame.core","dispatch-sync","re-frame.core/dispatch-sync",-1113172660,null),U5=new $APP.K(null,"after","after",594996914),Rga=new $APP.K(null,"ctx-handler","ctx-handler",-1777672230),R6=new $APP.K(null,"group","group",582596132),
|
|
tha=new $APP.w(null,"inject-cofx","inject-cofx",-1494968627,null),Iga=new $APP.K(null,"ms","ms",-1152709733),uha=new $APP.w(null,"debug","debug",32358931,null),vha=new $APP.w("re-frame.core","clear-global-interceptor","re-frame.core/clear-global-interceptor",166960890,null),wha=new $APP.w("re-frame.core","reg-event-db","re-frame.core/reg-event-db",418153612,null),S6=new $APP.K(null,"debug","debug",-1608172596),xha=new $APP.w("re-frame.core","reg-event-fx","re-frame.core/reg-event-fx",-63037421,null),
|
|
T6=new $APP.w(null,"after","after",-2059438855,null),f6=new $APP.K(null,"run-queue","run-queue",-1701798027),u6=new $APP.K(null,"cofx","cofx",2013202907),yha=new $APP.w(null,"clear-fx","clear-fx",1936947081,null),zha=new $APP.K(null,"flush-dom","flush-dom",-933676816),Aha=new $APP.w(null,"remove-post-event-callback","remove-post-event-callback",-909482234,null),G5=new $APP.K(null,"effects","effects",-282369292),i6=new $APP.K(null,"add-event","add-event",938429088),Bha=new $APP.w(null,"-\x3einterceptor",
|
|
"-\x3einterceptor",-390826100,null),Cha=new $APP.w("re-frame.core","clear-fx","re-frame.core/clear-fx",-894786861,null),Dha=new $APP.w(null,"dispatch-sync","dispatch-sync",-990037526,null),Eha=new $APP.w("re-frame.core","remove-post-event-callback","re-frame.core/remove-post-event-callback",-1601893792,null),U6=new $APP.w(null,"level","level",-1363938217,null),Fha=new $APP.w("re-frame.core","assoc-coeffect","re-frame.core/assoc-coeffect",-832544285,null),h6=new $APP.K(null,"idle","idle",-2007156861),
|
|
Gha=new $APP.w("re-frame.core","make-restore-fn","re-frame.core/make-restore-fn",-1130647527,null),V6=new $APP.K(null,"groupEnd","groupEnd",-337721382),Hha=new $APP.w(null,"assoc-coeffect","assoc-coeffect",891917445,null),Iha=new $APP.w("re-frame.core","path","re-frame.core/path",-3666115,null),Jha=new $APP.w(null,"get-coeffect","get-coeffect",1018510098,null),Kha=new $APP.w("re-frame.core","register-sub","re-frame.core/register-sub",-772926397,null),Lha=new $APP.w(null,"add-post-event-callback",
|
|
"add-post-event-callback",182608154,null),Mha=new $APP.K(null,"dispatch-n","dispatch-n",-504469236),Nha=new $APP.w(null,"on-changes","on-changes",-1308523167,null),W6=new $APP.w(null,"handler","handler",1444934915,null),Oha=new $APP.w("re-frame.core","clear-subscription-cache!","re-frame.core/clear-subscription-cache!",-8362855,null),X6=new $APP.K(null,"sequential","sequential",-1082983960),Pha=new $APP.w("re-frame.core","purge-event-queue","re-frame.core/purge-event-queue",1051371119,null),Y6=new $APP.w(null,
|
|
"interceptors","interceptors",93748576,null),P5=new $APP.K(null,"event","event",301435442),Qha=new $APP.K(null,"dispatch-later","dispatch-later",291951390),Rha=new $APP.w("re-frame.core","reg-sub","re-frame.core/reg-sub",-1693960551,null),K5=new $APP.K(null,"coeffects","coeffects",497912985),Sha=new $APP.K(null,"inject-global-interceptors","inject-global-interceptors",-2144129737),Tha=new $APP.w(null,"trim-v","trim-v",365592887,null),Uha=new $APP.w(null,"enqueue","enqueue",1377000435,null),Vha=new $APP.w("re-frame.core",
|
|
"subscribe","re-frame.core/subscribe",-774932115,null),Wha=new $APP.w("re-frame.core","reg-sub-raw","re-frame.core/reg-sub-raw",-1992472244,null),Xha=new $APP.w(null,"make-restore-fn","make-restore-fn",-439197753,null),Yha=new $APP.w(null,"console","console",-1426363712,null),Zha=new $APP.w(null,"subscribe","subscribe",2056785283,null),Nga=new $APP.K(null,"db-handler","db-handler",579530098),Z6=new $APP.K("re-frame-path","db-store","re-frame-path/db-store",655758490),$6=new $APP.w(null,"context",
|
|
"context",810340414,null),$ha=new $APP.w(null,"reg-global-interceptor","reg-global-interceptor",2060591173,null),Hga=new $APP.K(null,"trigger","trigger",103466139),a7=new $APP.w(null,"new-loggers","new-loggers",-1268568509,null),aia=new $APP.w(null,"unwrap","unwrap",241356065,null),bia=new $APP.w("re-frame.core","-\x3einterceptor","re-frame.core/-\x3einterceptor",6499190,null),m6=new $APP.K(null,"resume","resume",-118572261),cia=new $APP.K(null,"yield","yield",177875009),dia=new $APP.w(null,"clear-event",
|
|
"clear-event",-1884567988,null),eia=new $APP.K(null,"unnamed","unnamed",-26044928),C5=new $APP.K(null,"global-interceptors","global-interceptors",-1995759472),D6=new $APP.K(null,"sub","sub",-2093760025),fia=new $APP.w(null,"set-loggers!","set-loggers!",-1947820787,null),gia=new $APP.w(null,"assoc-effect","assoc-effect",300107315,null),hia=new $APP.w(null,"register-handler","register-handler",-2025780993,null),iia=new $APP.w("re-frame.core","reg-global-interceptor","re-frame.core/reg-global-interceptor",
|
|
-2081719141,null),l6=new $APP.K(null,"paused","paused",-1710376127),jia=new $APP.w(null,"reg-cofx","reg-cofx",91685178,null),b7=new $APP.w(null,"query","query",352022017,null),Tga=new $APP.K(null,"enrich","enrich",-2108921925),kia=new $APP.w(null,"reg-sub-raw","reg-sub-raw",784637666,null),lia=new $APP.w("re-frame.core","get-effect","re-frame.core/get-effect",-1346481552,null),mia=new $APP.w(null,"reg-event-ctx","reg-event-ctx",1495496276,null),nia=new $APP.w("re-frame.core","on-changes","re-frame.core/on-changes",
|
|
1765357575,null),j6=new $APP.K(null,"scheduled","scheduled",553898551),oia=new $APP.w("re-frame.core","dispatch","re-frame.core/dispatch",1765071110,null),pia=new $APP.w(null,"clear-global-interceptor","clear-global-interceptor",-1607850608,null),qia=new $APP.w(null,"register-sub","register-sub",2032582885,null),c7=new $APP.K(null,"loaded?","loaded?",-1108015206),b6=new $APP.K(null,"finish-run","finish-run",753148477),ria=new $APP.w(null,"reg-sub","reg-sub",852548167,null),sia=new $APP.w("re-frame.core",
|
|
"enrich","re-frame.core/enrich",-1956662808,null),tia=new $APP.w("re-frame.core","assoc-effect","re-frame.core/assoc-effect",-114683447,null),uia=new $APP.w("re-frame.core","clear-sub","re-frame.core/clear-sub",395526338,null),via=new $APP.w("re-frame.core","inject-cofx","re-frame.core/inject-cofx",506211767,null),k6=new $APP.K(null,"running","running",1554969103),wia=new $APP.w("re-frame.core","clear-cofx","re-frame.core/clear-cofx",583971922,null),d7=new $APP.K(null,"log","log",-1595516004),xia=
|
|
new $APP.w(null,"reg-fx","reg-fx",-87443115,null),yia=new $APP.w(null,"enrich","enrich",-468390398,null),zia=new $APP.w("re-frame.core","register-handler","re-frame.core/register-handler",772396373,null),e7=new $APP.w(null,"out-path","out-path",-923103991,null),T5=new $APP.K(null,"before","before",-1633692388),Aia=new $APP.w("re-frame.core","reg-event-ctx","re-frame.core/reg-event-ctx",15437106,null),f7=new $APP.w(null,"before","before",6839139,null),g7=new $APP.K(null,"\x3c-","\x3c-",760412998),
|
|
Bia=new $APP.w("re-frame.core","reg-cofx","re-frame.core/reg-cofx",-1104161380,null);var A5=$APP.Vh.g($APP.IA,$APP.qh);var h7=$APP.l5.h($APP.gg);var i7=$APP.fk.h(new $APP.n(null,6,[d7,console.log.bind(console),$APP.M4,console.warn.bind(console),$APP.mL,console.error.bind(console),S6,console.debug.bind(console),R6,$APP.p(console.group)?console.group.bind(console):console.log.bind(console),V6,$APP.p(console.groupEnd)?console.groupEnd.bind(console):function(){return $APP.Pd}],null)),y5=function y5(a){for(var c=[],d=arguments.length,e=0;;)if(e<d)c.push(arguments[e]),e+=1;else break;return y5.l(arguments[0],1<c.length?new $APP.Md(c.slice(1),0,
|
|
null):null)};y5.l=function(a,b){var c=$APP.Dg,d=c.g,e=$APP.v(i7);a=a.h?a.h(e):a.call(null,e);return d.call(c,a,b)};y5.o=1;y5.v=function(a){var b=$APP.y(a);a=$APP.z(a);return this.l(b,a)};var B5=$APP.fk.h(new $APP.n(null,2,[c7,!1,C5,A5],null));var Cia=function(){return $APP.gk.g(B5,function(a){return $APP.Vi.j(a,c7,!0)})};try{$APP.oz(self,"load",Cia)}catch(a){};var D5=$APP.fk.h($APP.gg),j7=function j7(a){switch(arguments.length){case 0:return j7.s();case 1:return j7.h(arguments[0]);case 2:return j7.g(arguments[0],arguments[1]);default:throw Error(["Invalid arity: ",$APP.t.h(arguments.length)].join(""));}};j7.s=function(){return $APP.Hg(D5,$APP.gg)};j7.h=function(a){return $APP.gk.j(D5,$APP.um,a)};
|
|
j7.g=function(a,b){return $APP.p(E5(a,b))?$APP.gk.l(D5,$APP.rm,new $APP.M(null,1,5,$APP.O,[a],null),$APP.um,$APP.I([b])):y5.l($APP.M4,$APP.I(["re-frame: can't clear",$APP.t.h(a),"handler for",[$APP.t.h(b),". Handler not found."].join("")]))};j7.o=2;$APP.fk.h(0);$APP.fk.h($APP.gg);$APP.fk.h($APP.qh);$APP.fk.h(0);var t6=function t6(a){for(var c=[],d=arguments.length,e=0;;)if(e<d)c.push(arguments[e]),e+=1;else break;return t6.l(0<c.length?new $APP.Md(c.slice(0),0,null):null)};t6.l=function(a){var b=$APP.hg(a);a=$APP.Xe.g(b,$APP.Hp);var c=$APP.Xe.g(b,T5);b=$APP.Xe.g(b,U5);return new $APP.n(null,3,[$APP.Hp,$APP.p(a)?a:eia,T5,c,U5,b],null)};t6.o=0;t6.v=function(a){return this.l($APP.x(a))};var R5=null;var W5=$APP.fk.h($APP.gg),k7=function k7(a){switch(arguments.length){case 1:return k7.h(arguments[0]);case 2:return k7.g(arguments[0],arguments[1]);default:throw Error(["Invalid arity: ",$APP.t.h(arguments.length)].join(""));}};
|
|
k7.h=function(a){var b=Y5(a,$APP.qh);if($APP.p(b))return b;var c=z5(a);b=E5(D6,c);return null==b?y5.l($APP.mL,$APP.I([["re-frame: no subscription handler registered for: ",$APP.t.h(c),". Returning a nil subscription."].join("")])):X5(a,$APP.qh,b.g?b.g(h7,a):b.call(null,h7,a))};
|
|
k7.g=function(a,b){var c=Y5(a,b);if($APP.p(c))return c;c=z5(a);var d=E5(D6,c);if(null==d)return y5.l($APP.mL,$APP.I([["re-frame: no subscription handler registered for: ",$APP.t.h(c),". Returning a nil subscription."].join("")]));var e=$APP.j3(function(){return $APP.ep.g($APP.ce,b)});var f=$APP.j3(function(){var g=$APP.v(e);return d.j?d.j(h7,a,g):d.call(null,h7,a,g)});return X5(a,b,$APP.j3(function(){return $APP.v($APP.v(f))}))};k7.o=2;
|
|
var l7=function l7(a){for(var c=[],d=arguments.length,e=0;;)if(e<d)c.push(arguments[e]),e+=1;else break;return l7.l(arguments[0],1<c.length?new $APP.Md(c.slice(1),0,null):null)};
|
|
l7.l=function(a,b){var c=["re-frame: reg-sub for ",$APP.t.h(a),", "].join(""),d=function(){var k=$APP.Mg(2,b),l=$APP.E.j(k,0,null),h=$APP.E.j(k,1,null);if($APP.B.g(1,$APP.le(k))||$APP.ye(l)||$APP.Le(l))return new $APP.M(null,2,5,$APP.O,[$APP.dj(b),$APP.ue(b)],null);k=$APP.Cl.g(2,b);switch(l instanceof $APP.K?l.ba:null){case "-\x3e":return new $APP.M(null,2,5,$APP.O,[k,function(r){return h.h?h.h(r):h.call(null,r)}],null);case "\x3d\x3e":return new $APP.M(null,2,5,$APP.O,[k,function(r,q){q=$APP.x(q);
|
|
$APP.y(q);q=$APP.z(q);return $APP.Dg.j(h,r,q)}],null);default:return y5.l($APP.mL,$APP.I([c,"expected :-\x3e or :\x3d\x3e as second to last argument, got:",l]))}}(),e=$APP.E.j(d,0,null),f=$APP.E.j(d,1,null),g=function(){switch($APP.le(e)){case 0:return function(){var q=null;q=function(u,C){switch(arguments.length){case 1:return h7;case 2:return h7}throw Error("Invalid arity: "+arguments.length);};q.h=function(){return h7};q.g=function(){return h7};return q}();case 1:var k=$APP.y(e);$APP.ye(k)||y5.l($APP.mL,
|
|
$APP.I([c,"2nd argument expected to be an inputs function, got:",k]));return k;case 2:k=$APP.E.j(e,0,null);var l=$APP.E.j(e,1,null);$APP.B.g(g7,k)||y5.l($APP.mL,$APP.I([c,"expected :\x3c-, got:",k]));return function(){function q(){return k7.h(l)}function u(){return k7.h(l)}var C=null;C=function(F,N){switch(arguments.length){case 1:return u.call(this,F);case 2:return q.call(this,F,N)}throw Error("Invalid arity: "+arguments.length);};C.h=u;C.g=q;return C}();default:k=$APP.pp.g(2,e);var h=$APP.Dj.g($APP.y,
|
|
k),r=$APP.Dj.g($APP.qe,k);$APP.Ag(new $APP.Yi(null,new $APP.n(null,1,[g7,null],null),null),h)&&$APP.Ag($APP.Le,r)||y5.l($APP.mL,$APP.I([c,"expected pairs of :\x3c- and vectors, got:",k]));return function(){function q(){return $APP.Dj.g(k7,r)}function u(){return $APP.Dj.g(k7,r)}var C=null;C=function(F,N){switch(arguments.length){case 1:return u.call(this,F);case 2:return q.call(this,F,N)}throw Error("Invalid arity: "+arguments.length);};C.h=u;C.g=q;return C}()}}();return F5(D6,a,function(){function k(r,
|
|
q,u){var C=g.g?g.g(q,u):g.call(null,q,u);r=$APP.fk.h(null);var F=$APP.j3(function(){var N=$5(C,a);return f.j?f.j(N,q,u):f.call(null,N,q,u)});$APP.Hg(r,x5(F));return F}function l(r,q){var u=g.g?g.g(q,null):g.call(null,q,null);r=$APP.fk.h(null);var C=$APP.j3(function(){var F=$5(u,a);return f.g?f.g(F,q):f.call(null,F,q)});$APP.Hg(r,x5(C));return C}var h=null;h=function(r,q,u){switch(arguments.length){case 2:return l.call(this,r,q);case 3:return k.call(this,r,q,u)}throw Error("Invalid arity: "+arguments.length);
|
|
};h.g=l;h.j=k;return h}())};l7.o=1;l7.v=function(a){var b=$APP.y(a);a=$APP.z(a);return this.l(b,a)};var Ega=new $APP.n(null,2,[zha,function(a){function b(){return s5.h?s5.h(a):s5.call(null,a)}return v5.h?v5.h(b):v5.call(null,b)},cia,s5],null),o6=new function(a,b,c){this.Re=a;this.Eb=b;this.Bd=c}(h6,A5,$APP.gg);var m7=t6.l($APP.I([$APP.Hp,Xga,U5,function(a){var b=G5.h(a);a=$APP.um.g(b,C6);b=C6.h(b);if($APP.p(b)){var c=E5(q6,C6);c.h?c.h(b):c.call(null,b)}c=$APP.x(a);for(var d=null,e=0,f=0;;)if(f<e){a=d.Y(null,f);b=$APP.E.j(a,0,null);a=$APP.E.j(a,1,null);var g=E5(q6,b);$APP.p(g)?(b=g,b.h?b.h(a):b.call(null,a)):y5.l($APP.M4,$APP.I(["re-frame: no handler registered for effect:",b,". Ignoring."]));f+=1}else if(a=$APP.x(c))c=a,$APP.Me(c)?(b=$APP.hd(c),c=$APP.id(c),a=b,b=$APP.le(b),d=a,e=b):(a=$APP.y(c),b=$APP.E.j(a,
|
|
0,null),a=$APP.E.j(a,1,null),d=E5(q6,b),$APP.p(d)?(b=d,b.h?b.h(a):b.call(null,a)):y5.l($APP.M4,$APP.I(["re-frame: no handler registered for effect:",b,". Ignoring."])),c=$APP.z(c),d=null,e=0),f=0;else return null}]));r6(Qha,function(a){if($APP.Je(a))return s6(a);a=$APP.x($APP.ts.g($APP.zb,a));for(var b=null,c=0,d=0;;)if(d<c){var e=b.Y(null,d);s6(e);d+=1}else if(a=$APP.x(a))b=a,$APP.Me(b)?(a=$APP.hd(b),c=$APP.id(b),b=a,e=$APP.le(a),a=c,c=e):(e=$APP.y(b),s6(e),a=$APP.z(b),b=null,c=0),d=0;else return null});
|
|
r6(q6,function(a){if($APP.Ie(a)){a=$APP.x($APP.ts.g($APP.zb,a));for(var b=null,c=0,d=0;;)if(d<c){var e=b.Y(null,d),f=$APP.E.j(e,0,null);e=$APP.E.j(e,1,null);$APP.B.g(C6,f)&&y5.l($APP.M4,$APP.I(['re-frame: ":fx" effect should not contain a :db effect']));var g=E5(q6,f);$APP.p(g)?(f=g,f.h?f.h(e):f.call(null,e)):y5.l($APP.M4,$APP.I(['re-frame: in ":fx" effect found ',f," which has no associated handler. Ignoring."]));d+=1}else if(a=$APP.x(a))$APP.Me(a)?(e=$APP.hd(a),a=$APP.id(a),f=e,e=$APP.le(e),b=f,
|
|
c=e):(e=$APP.y(a),f=$APP.E.j(e,0,null),e=$APP.E.j(e,1,null),$APP.B.g(C6,f)&&y5.l($APP.M4,$APP.I(['re-frame: ":fx" effect should not contain a :db effect'])),b=E5(q6,f),$APP.p(b)?(f=b,f.h?f.h(e):f.call(null,e)):y5.l($APP.M4,$APP.I(['re-frame: in ":fx" effect found ',f," which has no associated handler. Ignoring."])),a=$APP.z(a),b=null,c=0),d=0;else return null}else return y5.l($APP.M4,$APP.I(['re-frame: ":fx" effect expects a seq, but was given ',$APP.Fb(a)]))});
|
|
r6($APP.Hx,function(a){return $APP.Le(a)?p6(a):y5.l($APP.mL,$APP.I(["re-frame: ignoring bad :dispatch value. Expected a vector, but got:",a]))});
|
|
r6(Mha,function(a){if($APP.Ie(a)){a=$APP.x($APP.ts.g($APP.zb,a));for(var b=null,c=0,d=0;;)if(d<c){var e=b.Y(null,d);p6(e);d+=1}else if(a=$APP.x(a))b=a,$APP.Me(b)?(a=$APP.hd(b),c=$APP.id(b),b=a,e=$APP.le(a),a=c,c=e):(e=$APP.y(b),p6(e),a=$APP.z(b),b=null,c=0),d=0;else return null}else return y5.l($APP.mL,$APP.I(["re-frame: ignoring bad :dispatch-n value. Expected a collection, but got:",a]))});
|
|
r6(lha,function(a){var b=$APP.wm.g(j7,P5);if($APP.Ie(a)){a=$APP.x(a);for(var c=null,d=0,e=0;;)if(e<d){var f=c.Y(null,e);b(f);e+=1}else if(a=$APP.x(a))c=a,$APP.Me(c)?(a=$APP.hd(c),d=$APP.id(c),c=a,f=$APP.le(a),a=d,d=f):(f=$APP.y(c),b(f),a=$APP.z(c),c=null,d=0),e=0;else return null}else return b(a)});r6(C6,function(a){return $APP.v(h7)!==a?$APP.Hg(h7,a):null});F5(u6,C6,function(a){return $APP.Vi.j(a,C6,$APP.v(h7))});var n7=v6(C6);var y6=function y6(a){switch(arguments.length){case 2:return y6.g(arguments[0],arguments[1]);case 3:return y6.j(arguments[0],arguments[1],arguments[2]);default:throw Error(["Invalid arity: ",$APP.t.h(arguments.length)].join(""));}};y6.g=function(a,b){return y6.j(a,b,$APP.VU.g($APP.Qi(a),$APP.Qi(b)))};y6.j=function(a,b,c){return $APP.jf.j(function(d,e){return $APP.kv.h($APP.Dj.j($APP.tm,d,e))},new $APP.M(null,3,5,$APP.O,[null,null,null],null),$APP.Dj.g($APP.wm.j(Lga,a,b),c))};y6.o=3;A6["null"]=function(){return J6};
|
|
A6.string=function(){return J6};A6.number=function(){return J6};A6.array=function(){return X6};A6["function"]=function(){return J6};A6["boolean"]=function(){return J6};A6._=function(a){return(null!=a?a.D&1024||$APP.Cd===a.Uh||(a.D?0:$APP.Eb($APP.hc,a)):$APP.Eb($APP.hc,a))?$APP.An:(null!=a?a.D&4096||$APP.Cd===a.Xh||(a.D?0:$APP.Eb($APP.mc,a)):$APP.Eb($APP.mc,a))?$APP.On:(null!=a?a.D&16777216||$APP.Cd===a.Gf||(a.D?0:$APP.Eb($APP.Hc,a)):$APP.Eb($APP.Hc,a))?X6:J6};
|
|
B6["null"]=function(a,b){return w6(a,b)};B6.string=function(a,b){return w6(a,b)};B6.number=function(a,b){return w6(a,b)};B6.array=function(a,b){return z6(a,b)};B6["function"]=function(a,b){return w6(a,b)};B6["boolean"]=function(a,b){return w6(a,b)};
|
|
B6._=function(a,b){var c=function(){var d=A6(a);d=d instanceof $APP.K?d.ba:null;switch(d){case "atom":return w6;case "set":return Mga;case "sequential":return z6;case "map":return y6;default:throw Error(["No matching clause: ",$APP.t.h(d)].join(""));}}();return c.g?c.g(a,b):c.call(null,a,b)};var Dia=t6.l($APP.I([$APP.Hp,S6,T5,function(a){y5.l(d7,$APP.I(["Handling re-frame event:",L5(a,P5)]));return a},U5,function(a){var b=L5(a,P5),c=L5(a,C6),d=I5(a,C6,K6);$APP.B.g(d,K6)?y5.l(d7,$APP.I(["No app-db changes in:",b])):(d=x6(c,d),c=$APP.E.j(d,0,null),d=$APP.E.j(d,1,null),null!=c||null!=d?(y5.l(R6,$APP.I(["db clojure.data/diff for:",b])),y5.l(d7,$APP.I(["only before:",c])),y5.l(d7,$APP.I(["only after :",d])),y5(V6)):y5.l(d7,$APP.I(["No app-db changes resulted from:",b])));return a}])),Eia=
|
|
t6.l($APP.I([$APP.Hp,rha,T5,function(a){var b=L5(a,P5);$APP.E.j(b,0,null);var c=$APP.E.j(b,1,null);if($APP.B.g(2,$APP.le(b))&&$APP.Je(c))return M5(a,P5,c);y5.l($APP.M4,$APP.I(['re-frame: "unwrap" interceptor requires event to be a 2-vector of [event-id payload-map]. Got ',b]));return a},U5,function(a){return M5(a,P5,L5(a,S5))}])),Fia=t6.l($APP.I([$APP.Hp,kha,T5,function(a){if($APP.Le(L5(a,P5)))return $APP.Dg.J($APP.rm,a,new $APP.M(null,2,5,$APP.O,[K5,P5],null),$APP.Jl,$APP.I([1]));y5.l($APP.M4,$APP.I(['re-frame: "trim-v" interceptor expected event to be a vector. Got a ',
|
|
$APP.Fb(L5(a,P5))]));return a},U5,function(a){return M5(a,P5,L5(a,S5))}])),o7=function o7(a){for(var c=[],d=arguments.length,e=0;;)if(e<d)c.push(arguments[e]),e+=1;else break;return o7.l(0<c.length?new $APP.Md(c.slice(0),0,null):null)};
|
|
o7.l=function(a){var b=$APP.Yg(a);$APP.Ee(b)&&y5.l($APP.mL,$APP.I(['re-frame: "path" interceptor given no params']));return t6.l($APP.I([$APP.Hp,$APP.V4,T5,function(c){var d=L5(c,C6);return M5($APP.Ir.B(c,Z6,$APP.Af,d),C6,$APP.Mp.g(d,b))},U5,function(c){var d=Z6.h(c),e=$APP.Ce(d);d=$APP.De(d);d=M5($APP.Vi.j(c,Z6,d),C6,e);c=I5(c,C6,K6);return $APP.B.g(c,K6)?d:J5(d,C6,$APP.Pp(e,b,c))}]))};o7.o=0;o7.v=function(a){return this.l($APP.x(a))};
|
|
var p7=function p7(a){for(var c=[],d=arguments.length,e=0;;)if(e<d)c.push(arguments[e]),e+=1;else break;return p7.l(arguments[0],arguments[1],2<c.length?new $APP.Md(c.slice(2),0,null):null)};
|
|
p7.l=function(a,b,c){return t6.l($APP.I([$APP.Hp,hha,U5,function(d){var e=H5(d,C6),f=L5(d,C6),g=$APP.Dj.g(function(h){return $APP.Mp.g(e,h)},c),k=$APP.Dj.g(function(h){return $APP.Mp.g(f,h)},c),l=function(){var h=$APP.Ze(G5.h(d),C6);return h?$APP.Bg($APP.Oe,$APP.Dj.j($APP.yb,g,k)):h}();return $APP.p(l)?J5(d,C6,$APP.Pp(e,b,$APP.Dg.g(a,g))):d}]))};p7.o=2;p7.v=function(a){var b=$APP.y(a),c=$APP.z(a);a=$APP.y(c);c=$APP.z(c);return this.l(b,a,c)};
|
|
var q7=t6.l($APP.I([$APP.Hp,Sha,T5,function(a){return $APP.Ir.j(a,$APP.UC,function(b){return $APP.Vh.g(C5.h($APP.v(B5)),b)})}]));var r7=function r7(a){switch(arguments.length){case 2:return r7.g(arguments[0],arguments[1]);case 3:return r7.j(arguments[0],arguments[1],arguments[2]);default:throw Error(["Invalid arity: ",$APP.t.h(arguments.length)].join(""));}};r7.g=function(a,b){return r7.j(a,null,b)};r7.j=function(a,b,c){return Q5(a,new $APP.M(null,5,5,$APP.O,[n7,m7,q7,b,Oga(c)],null))};r7.o=3;
|
|
var s7=function s7(a){switch(arguments.length){case 2:return s7.g(arguments[0],arguments[1]);case 3:return s7.j(arguments[0],arguments[1],arguments[2]);default:throw Error(["Invalid arity: ",$APP.t.h(arguments.length)].join(""));}};s7.g=function(a,b){return s7.j(a,null,b)};s7.j=function(a,b,c){return Q5(a,new $APP.M(null,5,5,$APP.O,[n7,m7,q7,b,Qga(c)],null))};s7.o=3;
|
|
var t7=function t7(a){switch(arguments.length){case 2:return t7.g(arguments[0],arguments[1]);case 3:return t7.j(arguments[0],arguments[1],arguments[2]);default:throw Error(["Invalid arity: ",$APP.t.h(arguments.length)].join(""));}};t7.g=function(a,b){return t7.j(a,null,b)};t7.j=function(a,b,c){return Q5(a,new $APP.M(null,5,5,$APP.O,[n7,m7,q7,b,Sga(c)],null))};t7.o=3;
|
|
var u7=function u7(a){switch(arguments.length){case 0:return u7.s();case 1:return u7.h(arguments[0]);default:throw Error(["Invalid arity: ",$APP.t.h(arguments.length)].join(""));}};u7.s=function(){return j7.h(P5)};u7.h=function(a){return j7.g(P5,a)};u7.o=1;var v7=function v7(a){for(var c=[],d=arguments.length,e=0;;)if(e<d)c.push(arguments[e]),e+=1;else break;return v7.l(arguments[0],1<c.length?new $APP.Md(c.slice(1),0,null):null)};v7.l=function(a,b){return $APP.Dg.j(l7,a,b)};v7.o=1;
|
|
v7.v=function(a){var b=$APP.y(a);a=$APP.z(a);return this.l(b,a)};var w7=function w7(a){switch(arguments.length){case 1:return w7.h(arguments[0]);case 2:return w7.g(arguments[0],arguments[1]);default:throw Error(["Invalid arity: ",$APP.t.h(arguments.length)].join(""));}};w7.h=function(a){return k7.h(a)};w7.g=function(a,b){return k7.g(a,b)};w7.o=2;
|
|
var x7=function x7(a){switch(arguments.length){case 0:return x7.s();case 1:return x7.h(arguments[0]);default:throw Error(["Invalid arity: ",$APP.t.h(arguments.length)].join(""));}};x7.s=function(){return j7.h(D6)};x7.h=function(a){return j7.g(D6,a)};x7.o=1;var y7=function y7(a){switch(arguments.length){case 0:return y7.s();case 1:return y7.h(arguments[0]);default:throw Error(["Invalid arity: ",$APP.t.h(arguments.length)].join(""));}};y7.s=function(){return j7.h(q6)};
|
|
y7.h=function(a){return j7.g(q6,a)};y7.o=1;var z7=function z7(a){switch(arguments.length){case 1:return z7.h(arguments[0]);case 2:return z7.g(arguments[0],arguments[1]);default:throw Error(["Invalid arity: ",$APP.t.h(arguments.length)].join(""));}};z7.h=function(a){return v6(a)};z7.g=function(a,b){return Jga(a,b)};z7.o=2;
|
|
var A7=function A7(a){switch(arguments.length){case 0:return A7.s();case 1:return A7.h(arguments[0]);default:throw Error(["Invalid arity: ",$APP.t.h(arguments.length)].join(""));}};A7.s=function(){return j7.h(u6)};A7.h=function(a){return j7.g(u6,a)};A7.o=1;var B7=function B7(a){for(var c=[],d=arguments.length,e=0;;)if(e<d)c.push(arguments[e]),e+=1;else break;return B7.l(0<c.length?new $APP.Md(c.slice(0),0,null):null)};B7.l=function(a){return $APP.Dg.g(o7,a)};B7.o=0;B7.v=function(a){return this.l($APP.x(a))};
|
|
var C7=function C7(a){for(var c=[],d=arguments.length,e=0;;)if(e<d)c.push(arguments[e]),e+=1;else break;return C7.l(arguments[0],arguments[1],2<c.length?new $APP.Md(c.slice(2),0,null):null)};C7.l=function(a,b,c){return $APP.Dg.B(p7,a,b,c)};C7.o=2;C7.v=function(a){var b=$APP.y(a),c=$APP.z(a);a=$APP.y(c);c=$APP.z(c);return this.l(b,a,c)};
|
|
var D7=function D7(a){switch(arguments.length){case 0:return D7.s();case 1:return D7.h(arguments[0]);default:throw Error(["Invalid arity: ",$APP.t.h(arguments.length)].join(""));}};D7.s=function(){return $APP.gk.B(B5,$APP.Vi,C5,A5)};D7.h=function(a){return Dga(a)};D7.o=1;var E7=function E7(a){for(var c=[],d=arguments.length,e=0;;)if(e<d)c.push(arguments[e]),e+=1;else break;return E7.l(0<c.length?new $APP.Md(c.slice(0),0,null):null)};
|
|
E7.l=function(a){a=$APP.hg(a);$APP.Xe.g(a,$APP.Hp);$APP.Xe.g(a,T5);$APP.Xe.g(a,U5);a=$APP.I([a]);return $APP.Dg.g(t6,$APP.Dg.j($APP.V,$APP.dj(a),$APP.ue(a)))};E7.o=0;E7.v=function(a){return this.l($APP.x(a))};var F7=function F7(a){switch(arguments.length){case 1:return F7.h(arguments[0]);case 2:return F7.g(arguments[0],arguments[1]);case 3:return F7.j(arguments[0],arguments[1],arguments[2]);default:throw Error(["Invalid arity: ",$APP.t.h(arguments.length)].join(""));}};F7.h=function(a){return K5.h(a)};
|
|
F7.g=function(a,b){return L5(a,b)};F7.j=function(a,b,c){return $APP.Mp.j(a,new $APP.M(null,2,5,$APP.O,[K5,b],null),c)};F7.o=3;var G7=function G7(a){switch(arguments.length){case 1:return G7.h(arguments[0]);case 2:return G7.g(arguments[0],arguments[1]);case 3:return G7.j(arguments[0],arguments[1],arguments[2]);default:throw Error(["Invalid arity: ",$APP.t.h(arguments.length)].join(""));}};G7.h=function(a){return G5.h(a)};G7.g=function(a,b){return H5(a,b)};G7.j=function(a,b,c){return I5(a,b,c)};
|
|
G7.o=3;var H7=function H7(a){for(var c=[],d=arguments.length,e=0;;)if(e<d)c.push(arguments[e]),e+=1;else break;return H7.l(arguments[0],1<c.length?new $APP.Md(c.slice(1),0,null):null)};H7.l=function(a,b){return $APP.Dg.j(y5,a,b)};H7.o=1;H7.v=function(a){var b=$APP.y(a);a=$APP.z(a);return this.l(b,a)};
|
|
var I7=function I7(a){switch(arguments.length){case 1:return I7.h(arguments[0]);case 2:return I7.g(arguments[0],arguments[1]);default:throw Error(["Invalid arity: ",$APP.t.h(arguments.length)].join(""));}};I7.h=function(a){return I7.g(a,a)};I7.g=function(a,b){$APP.Ze(o6.Bd,a)&&y5.l($APP.M4,$APP.I(["re-frame: overwriting existing post event call back with id:",a]));return o6.Bd=$APP.Vi.j(o6.Bd,a,b)};I7.o=2;
|
|
var J7=function J7(a){for(var c=[],d=arguments.length,e=0;;)if(e<d)c.push(arguments[e]),e+=1;else break;return J7.l(0<c.length?new $APP.Md(c.slice(0),0,null):null)};J7.l=function(a){H7.l($APP.M4,$APP.I(['re-frame: "register-handler" has been renamed "reg-event-db" (look for registration of ',$APP.t.h($APP.y(a)),")"]));return $APP.Dg.g(r7,a)};J7.o=0;J7.v=function(a){return this.l($APP.x(a))};
|
|
var K7=function K7(a){for(var c=[],d=arguments.length,e=0;;)if(e<d)c.push(arguments[e]),e+=1;else break;return K7.l(0<c.length?new $APP.Md(c.slice(0),0,null):null)};K7.l=function(a){H7.l($APP.M4,$APP.I(['re-frame: "register-sub" is used to register the event ',$APP.t.h($APP.y(a)),' but it is a deprecated part of the API. Please use "reg-sub-raw" instead.']));return $APP.Dg.g(E6,a)};K7.o=0;K7.v=function(a){return this.l($APP.x(a))};var Gia=$APP.Uo(H6,null),Hia=$APP.Ky($APP.Ai([$APP.Ae(kia,new $APP.n(null,3,[$APP.W,$APP.P($APP.ll,$APP.P(new $APP.M(null,2,5,$APP.O,[M6,F6],null))),$APP.Z,'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 \x3ca href\x3d"http://day8.github.io/re-frame/flow-mechanics/" target\x3d"_blank"\x3ehttp://day8.github.io/re-frame/flow-mechanics/\x3c/a\x3e',Q6,"Subscriptions"],null)),$APP.Ae(Dha,new $APP.n(null,3,
|
|
[$APP.W,$APP.P($APP.ll,$APP.P(new $APP.M(null,1,5,$APP.O,[G6],null))),$APP.Z,"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 ",
|
|
Q6,"Dispatching Events"],null)),$APP.Ae(ria,new $APP.n(null,4,[Q6,"Subscriptions",$APP.pJ,new $APP.n(null,6,[$APP.PE,!0,$APP.yt,1,$APP.XQ,1,$APP.pP,new $APP.M(null,1,5,$APP.O,[$APP.P(M6,$APP.gL)],null),$APP.W,$APP.P(new $APP.M(null,3,5,$APP.O,[M6,$APP.Sk,$APP.gL],null)),$APP.FR,$APP.P(null)],null),$APP.W,$APP.P($APP.ll,$APP.P(new $APP.M(null,3,5,$APP.O,[M6,$APP.Sk,$APP.gL],null))),$APP.Z,"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 `:-\x3e` and a 1-arity `computation-function`:\n\n #!clj\n (reg-sub\n :query-id\n :-\x3e 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 _] ;; :\x3c---- 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) ;; :\x3c---- This could be dangerous. If `:foo` is not in db, we get the `query-vector` instead of `nil`.\n\n By using `:-\x3e` 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 :-\x3e :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 `:\x3d\x3e` and a multi-arity `computation-function`\n\n #!clj\n (reg-sub\n :query-id\n :\x3d\x3e computation-fn)\n\n The `query-vector` can be broken into two components `[query-id \x26 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 :\x3d\x3e vector) ;; :\x3c---- 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 ;; \x3c-- 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])) ;; \x3c-- 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) ;; \x3c--- 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 :\x3c- [:a-sub]\n :\x3c- [: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 `:\x3c-` 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 :\x3c- [: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 :\x3c- [:a-sub]\n :\x3c- [:b-sub]\n :-\x3e (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)),$APP.Ae($APP.XJ,new $APP.n(null,3,[$APP.W,$APP.P($APP.ll,$APP.P(new $APP.M(null,1,5,$APP.O,[G6],null))),$APP.Z,"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 ",
|
|
Q6,"Dispatching Events"],null)),$APP.Ae(aia,new $APP.n(null,1,[Q6,"Interceptors"],null)),$APP.Ae(qha,new $APP.n(null,4,[Q6,"Event Handlers",$APP.pJ,new $APP.n(null,6,[$APP.PE,!1,$APP.yt,3,$APP.XQ,3,$APP.pP,new $APP.M(null,2,5,$APP.O,[new $APP.M(null,2,5,$APP.O,[$APP.R4,W6],null),new $APP.M(null,3,5,$APP.O,[$APP.R4,Y6,W6],null)],null),$APP.W,$APP.P(new $APP.M(null,2,5,$APP.O,[$APP.R4,W6],null),new $APP.M(null,3,5,$APP.O,[$APP.R4,Y6,W6],null)),$APP.FR,$APP.P(null,null)],null),$APP.W,$APP.P($APP.ll,
|
|
$APP.P(new $APP.M(null,2,5,$APP.O,[$APP.R4,W6],null),new $APP.M(null,3,5,$APP.O,[$APP.R4,Y6,W6],null))),$APP.Z,"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) -\x3e 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 ;; \x3c-- namespaced keywords are often used\n [one two three] ;; \x3c-- 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)),$APP.Ae(Uha,new $APP.n(null,3,[$APP.W,$APP.P($APP.ll,$APP.P(new $APP.M(null,2,5,$APP.O,[$6,Y6],null))),$APP.Z,"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 ",Q6,"Writing Interceptors"],null)),$APP.Ae(Jha,
|
|
new $APP.n(null,4,[Q6,"Writing Interceptors",$APP.pJ,new $APP.n(null,6,[$APP.PE,!1,$APP.yt,3,$APP.XQ,3,$APP.pP,new $APP.M(null,3,5,$APP.O,[new $APP.M(null,1,5,$APP.O,[$6],null),new $APP.M(null,2,5,$APP.O,[$6,$APP.JD],null),new $APP.M(null,3,5,$APP.O,[$6,$APP.JD,P6],null)],null),$APP.W,$APP.P(new $APP.M(null,1,5,$APP.O,[$6],null),new $APP.M(null,2,5,$APP.O,[$6,$APP.JD],null),new $APP.M(null,3,5,$APP.O,[$6,$APP.JD,P6],null)),$APP.FR,$APP.P(null,null,null)],null),$APP.W,$APP.P($APP.ll,$APP.P(new $APP.M(null,
|
|
1,5,$APP.O,[$6],null),new $APP.M(null,2,5,$APP.O,[$6,$APP.JD],null),new $APP.M(null,3,5,$APP.O,[$6,$APP.JD,P6],null))),$APP.Z,"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)),$APP.Ae(dia,new $APP.n(null,4,[Q6,"Event Handlers",$APP.pJ,new $APP.n(null,6,[$APP.PE,!1,$APP.yt,1,$APP.XQ,1,$APP.pP,new $APP.M(null,2,5,$APP.O,[$APP.qh,new $APP.M(null,1,5,$APP.O,[$APP.R4],null)],null),$APP.W,$APP.P($APP.qh,new $APP.M(null,1,5,$APP.O,[$APP.R4],null)),$APP.FR,$APP.P(null,null)],null),$APP.W,$APP.P($APP.ll,$APP.P($APP.qh,new $APP.M(null,1,5,$APP.O,[$APP.R4],null))),$APP.Z,"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)),$APP.Ae(Zha,new $APP.n(null,4,[Q6,"Subscriptions",$APP.pJ,new $APP.n(null,6,[$APP.PE,!1,$APP.yt,2,$APP.XQ,2,$APP.pP,new $APP.M(null,2,5,$APP.O,[new $APP.M(null,1,5,$APP.O,[b7],null),new $APP.M(null,2,5,$APP.O,[b7,I6],null)],null),$APP.W,$APP.P(new $APP.M(null,1,5,$APP.O,[b7],null),new $APP.M(null,2,5,$APP.O,[b7,I6],null)),$APP.FR,$APP.P(null,null)],null),$APP.W,$APP.P($APP.ll,$APP.P(new $APP.M(null,1,5,$APP.O,[b7],null),new $APP.M(null,2,5,$APP.O,[b7,I6],null))),$APP.Z,'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 \x3csub (comp deref re-frame.core/subscribe))\n\n And then, within their views, they call `(\x3csub [:items :small])` rather\n than using `subscribe` directly.\n\n **De-duplication**\n\n Two, or more, concurrent subscriptions for the same query will\n source reactive updates from the one executing handler.\n\n See also: `reg-sub`\n '],
|
|
null)),$APP.Ae(yha,new $APP.n(null,4,[Q6,"Effect Handlers",$APP.pJ,new $APP.n(null,6,[$APP.PE,!1,$APP.yt,1,$APP.XQ,1,$APP.pP,new $APP.M(null,2,5,$APP.O,[$APP.qh,new $APP.M(null,1,5,$APP.O,[$APP.R4],null)],null),$APP.W,$APP.P($APP.qh,new $APP.M(null,1,5,$APP.O,[$APP.R4],null)),$APP.FR,$APP.P(null,null)],null),$APP.W,$APP.P($APP.ll,$APP.P($APP.qh,new $APP.M(null,1,5,$APP.O,[$APP.R4],null))),$APP.Z,"Unregisters effect handlers (presumably registered previously via the use of `reg-fx`).\n\n When called with no args, it will unregister all currently registered effect handlers.\n\n When given one arg, assumed to be the `id` of a previously registered\n effect handler, it will unregister the associated handler. Will produce a warning to\n console if it finds no matching registration.\n "],
|
|
null)),$APP.Ae(mia,new $APP.n(null,4,[Q6,"Event Handlers",$APP.pJ,new $APP.n(null,6,[$APP.PE,!1,$APP.yt,3,$APP.XQ,3,$APP.pP,new $APP.M(null,2,5,$APP.O,[new $APP.M(null,2,5,$APP.O,[$APP.R4,W6],null),new $APP.M(null,3,5,$APP.O,[$APP.R4,Y6,W6],null)],null),$APP.W,$APP.P(new $APP.M(null,2,5,$APP.O,[$APP.R4,W6],null),new $APP.M(null,3,5,$APP.O,[$APP.R4,Y6,W6],null)),$APP.FR,$APP.P(null,null)],null),$APP.W,$APP.P($APP.ll,$APP.P(new $APP.M(null,2,5,$APP.O,[$APP.R4,W6],null),new $APP.M(null,3,5,$APP.O,[$APP.R4,
|
|
Y6,W6],null))),$APP.Z,"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: context-map -\x3e 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 (-\x3e initial\n function1\n function2\n function3)\n effects (select-keys result [:db :fx])]\n (assoc context :effects effects))))\n "],
|
|
null)),$APP.Ae(Lha,new $APP.n(null,4,[Q6,"Miscellaneous",$APP.pJ,new $APP.n(null,6,[$APP.PE,!1,$APP.yt,2,$APP.XQ,2,$APP.pP,new $APP.M(null,2,5,$APP.O,[new $APP.M(null,1,5,$APP.O,[$APP.ZH],null),new $APP.M(null,2,5,$APP.O,[$APP.R4,$APP.ZH],null)],null),$APP.W,$APP.P(new $APP.M(null,1,5,$APP.O,[$APP.ZH],null),new $APP.M(null,2,5,$APP.O,[$APP.R4,$APP.ZH],null)),$APP.FR,$APP.P(null,null)],null),$APP.W,$APP.P($APP.ll,$APP.P(new $APP.M(null,1,5,$APP.O,[$APP.ZH],null),new $APP.M(null,2,5,$APP.O,[$APP.R4,
|
|
$APP.ZH],null))),$APP.Z,"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)),$APP.Ae(xia,new $APP.n(null,3,[$APP.W,$APP.P($APP.ll,$APP.P(new $APP.M(null,2,5,$APP.O,[$APP.R4,W6],null))),$APP.Z,"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 ",
|
|
Q6,"Effect Handlers"],null)),$APP.Ae(yia,new $APP.n(null,3,[$APP.W,$APP.P($APP.ll,$APP.P(new $APP.M(null,1,5,$APP.O,[$APP.ZH],null))),$APP.Z,'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 \x3ca href\x3d"https://twitter.com/nathanmarz/status/879722740776939520" target\x3d"_blank"\x3ehttps://twitter.com/nathanmarz/status/879722740776939520\x3c/a\x3e\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) ;; \x3c- Only perform an update if user is active\n ...))))\n ',
|
|
Q6,"Interceptors"],null)),$APP.Ae($ha,new $APP.n(null,3,[$APP.W,$APP.P($APP.ll,$APP.P(new $APP.M(null,1,5,$APP.O,[L6],null))),$APP.Z,"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.",
|
|
Q6,"Global Interceptors"],null)),$APP.Ae(Yha,new $APP.n(null,4,[Q6,"Logging",$APP.pJ,new $APP.n(null,6,[$APP.PE,!0,$APP.yt,1,$APP.XQ,1,$APP.pP,new $APP.M(null,1,5,$APP.O,[$APP.P(U6,$APP.gL)],null),$APP.W,$APP.P(new $APP.M(null,3,5,$APP.O,[U6,$APP.Sk,$APP.gL],null)),$APP.FR,$APP.P(null)],null),$APP.W,$APP.P($APP.ll,$APP.P(new $APP.M(null,3,5,$APP.O,[U6,$APP.Sk,$APP.gL],null))),$APP.Z,'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)),$APP.Ae(oha,new $APP.n(null,4,[Q6,"Coeffects",$APP.pJ,new $APP.n(null,6,[$APP.PE,!1,$APP.yt,1,$APP.XQ,1,$APP.pP,new $APP.M(null,2,5,$APP.O,[$APP.qh,new $APP.M(null,1,5,$APP.O,[$APP.R4],null)],null),$APP.W,$APP.P($APP.qh,new $APP.M(null,1,5,$APP.O,[$APP.R4],null)),$APP.FR,$APP.P(null,null)],null),$APP.W,$APP.P($APP.ll,$APP.P($APP.qh,new $APP.M(null,1,5,$APP.O,[$APP.R4],null))),$APP.Z,"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)),$APP.Ae(jia,new $APP.n(null,3,[$APP.W,$APP.P($APP.ll,$APP.P(new $APP.M(null,2,5,$APP.O,[$APP.R4,W6],null))),$APP.Z,"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 ",Q6,"Coeffects"],null)),$APP.Ae(T6,new $APP.n(null,
|
|
3,[$APP.W,$APP.P($APP.ll,$APP.P(new $APP.M(null,1,5,$APP.O,[$APP.ZH],null))),$APP.Z,"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.",
|
|
Q6,"Interceptors"],null)),$APP.Ae(hia,new $APP.n(null,5,[Q6,"Deprecated",$APP.pJ,new $APP.n(null,6,[$APP.PE,!0,$APP.yt,0,$APP.XQ,0,$APP.pP,new $APP.M(null,1,5,$APP.O,[$APP.P($APP.gL)],null),$APP.W,$APP.P(new $APP.M(null,2,5,$APP.O,[$APP.Sk,$APP.gL],null)),$APP.FR,$APP.P(null)],null),O6,"0.8.0",$APP.W,$APP.P($APP.ll,$APP.P(new $APP.M(null,2,5,$APP.O,[$APP.Sk,$APP.gL],null))),$APP.Z,"Deprecated. Use `reg-event-db` instead."],null)),$APP.Ae(fia,new $APP.n(null,3,[$APP.W,$APP.P($APP.ll,$APP.P(new $APP.M(null,
|
|
1,5,$APP.O,[a7],null))),$APP.Z,"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 [\x26 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 ",
|
|
Q6,"Logging"],null)),$APP.Ae(gia,new $APP.n(null,3,[$APP.W,$APP.P($APP.ll,$APP.P(new $APP.M(null,3,5,$APP.O,[$6,$APP.JD,$APP.OG],null))),$APP.Z,"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`. ",Q6,"Writing Interceptors"],null)),$APP.Ae(Nha,new $APP.n(null,4,[Q6,"Interceptors",$APP.pJ,new $APP.n(null,6,[$APP.PE,!0,$APP.yt,2,$APP.XQ,2,$APP.pP,new $APP.M(null,1,5,$APP.O,[$APP.P($APP.ZH,
|
|
e7,N6)],null),$APP.W,$APP.P(new $APP.M(null,4,5,$APP.O,[$APP.ZH,e7,$APP.Sk,N6],null)),$APP.FR,$APP.P(null)],null),$APP.W,$APP.P($APP.ll,$APP.P(new $APP.M(null,4,5,$APP.O,[$APP.ZH,e7,$APP.Sk,N6],null))),$APP.Z,"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 ...] ;; \x3c-- 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)),$APP.Ae(gha,new $APP.n(null,3,[$APP.W,$APP.P($APP.ll,$APP.P($APP.qh)),$APP.Z,"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 ",
|
|
Q6,"Subscriptions"],null)),$APP.Ae(eha,new $APP.n(null,4,[Q6,"Writing Interceptors",$APP.pJ,new $APP.n(null,6,[$APP.PE,!1,$APP.yt,3,$APP.XQ,3,$APP.pP,new $APP.M(null,3,5,$APP.O,[new $APP.M(null,1,5,$APP.O,[$6],null),new $APP.M(null,2,5,$APP.O,[$6,$APP.JD],null),new $APP.M(null,3,5,$APP.O,[$6,$APP.JD,P6],null)],null),$APP.W,$APP.P(new $APP.M(null,1,5,$APP.O,[$6],null),new $APP.M(null,2,5,$APP.O,[$6,$APP.JD],null),new $APP.M(null,3,5,$APP.O,[$6,$APP.JD,P6],null)),$APP.FR,$APP.P(null,null,null)],null),
|
|
$APP.W,$APP.P($APP.ll,$APP.P(new $APP.M(null,1,5,$APP.O,[$6],null),new $APP.M(null,2,5,$APP.O,[$6,$APP.JD],null),new $APP.M(null,3,5,$APP.O,[$6,$APP.JD,P6],null))),$APP.Z,"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)),$APP.Ae(qia,new $APP.n(null,5,[Q6,"Deprecated",$APP.pJ,new $APP.n(null,6,[$APP.PE,!0,$APP.yt,0,$APP.XQ,0,$APP.pP,new $APP.M(null,1,5,$APP.O,[$APP.P($APP.gL)],null),$APP.W,$APP.P(new $APP.M(null,2,5,$APP.O,[$APP.Sk,$APP.gL],null)),$APP.FR,$APP.P(null)],null),O6,"0.8.0",$APP.W,$APP.P($APP.ll,$APP.P(new $APP.M(null,2,5,$APP.O,[$APP.Sk,$APP.gL],null))),$APP.Z,"Deprecated. Use `reg-sub-raw` instead."],null)),$APP.Ae($APP.T4,new $APP.n(null,4,[Q6,"Interceptors",$APP.pJ,new $APP.n(null,6,[$APP.PE,
|
|
!0,$APP.yt,0,$APP.XQ,0,$APP.pP,new $APP.M(null,1,5,$APP.O,[$APP.P($APP.gL)],null),$APP.W,$APP.P(new $APP.M(null,2,5,$APP.O,[$APP.Sk,$APP.gL],null)),$APP.FR,$APP.P(null)],null),$APP.W,$APP.P($APP.ll,$APP.P(new $APP.M(null,2,5,$APP.O,[$APP.Sk,$APP.gL],null))),$APP.Z,"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]) ;; \x3c-- 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)),$APP.Ae(pia,new $APP.n(null,4,[Q6,"Global Interceptors",$APP.pJ,new $APP.n(null,6,[$APP.PE,!1,$APP.yt,1,$APP.XQ,1,$APP.pP,new $APP.M(null,2,5,$APP.O,[$APP.qh,new $APP.M(null,1,5,$APP.O,[$APP.R4],null)],null),$APP.W,$APP.P($APP.qh,new $APP.M(null,1,5,$APP.O,[$APP.R4],null)),$APP.FR,$APP.P(null,null)],null),$APP.W,$APP.P($APP.ll,$APP.P($APP.qh,new $APP.M(null,1,5,$APP.O,[$APP.R4],null))),$APP.Z,"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)),$APP.Ae($ga,new $APP.n(null,4,[Q6,"Subscriptions",$APP.pJ,new $APP.n(null,6,[$APP.PE,!1,$APP.yt,1,$APP.XQ,1,$APP.pP,new $APP.M(null,2,5,$APP.O,[$APP.qh,new $APP.M(null,1,5,$APP.O,[M6],null)],null),$APP.W,$APP.P($APP.qh,new $APP.M(null,1,5,$APP.O,[M6],null)),$APP.FR,$APP.P(null,null)],null),$APP.W,$APP.P($APP.ll,$APP.P($APP.qh,new $APP.M(null,1,5,$APP.O,[M6],null))),$APP.Z,"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)),$APP.Ae(Tha,new $APP.n(null,1,[Q6,"Interceptors"],null)),$APP.Ae(Bha,new $APP.n(null,4,[Q6,"Writing Interceptors",$APP.pJ,new $APP.n(null,6,[$APP.PE,!0,$APP.yt,0,$APP.XQ,0,$APP.pP,new $APP.M(null,1,5,$APP.O,[$APP.P(new $APP.n(null,2,[$APP.sp,$APP.eI,$APP.x4,new $APP.M(null,3,5,$APP.O,[$APP.R4,f7,T6],null)],null))],null),$APP.W,$APP.P(new $APP.M(null,2,5,$APP.O,[$APP.Sk,new $APP.n(null,2,[$APP.sp,$APP.eI,$APP.x4,new $APP.M(null,3,5,$APP.O,[$APP.R4,f7,T6],null)],null)],null)),$APP.FR,$APP.P(null)],
|
|
null),$APP.W,$APP.P($APP.ll,$APP.P(new $APP.M(null,2,5,$APP.O,[$APP.Sk,new $APP.n(null,2,[$APP.sp,$APP.eI,$APP.x4,new $APP.M(null,3,5,$APP.O,[$APP.R4,f7,T6],null)],null)],null))),$APP.Z,"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 (-\x3einterceptor\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)),$APP.Ae(Xha,new $APP.n(null,3,[$APP.W,$APP.P($APP.ll,$APP.P($APP.qh)),$APP.Z,"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 ",Q6,"Miscellaneous"],null)),$APP.Ae(cha,new $APP.n(null,3,[$APP.W,$APP.P($APP.ll,$APP.P($APP.qh)),$APP.Z,"Removes all events currently queued for processing",
|
|
Q6,"Miscellaneous"],null)),$APP.Ae(uha,new $APP.n(null,1,[Q6,"Interceptors"],null)),$APP.Ae(Hha,new $APP.n(null,3,[$APP.W,$APP.P($APP.ll,$APP.P(new $APP.M(null,3,5,$APP.O,[$6,$APP.JD,$APP.OG],null))),$APP.Z,"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`. ",Q6,"Writing Interceptors"],null)),$APP.Ae(nha,new $APP.n(null,4,[Q6,"Event Handlers",$APP.pJ,new $APP.n(null,6,[$APP.PE,!1,$APP.yt,
|
|
3,$APP.XQ,3,$APP.pP,new $APP.M(null,2,5,$APP.O,[new $APP.M(null,2,5,$APP.O,[$APP.R4,W6],null),new $APP.M(null,3,5,$APP.O,[$APP.R4,Y6,W6],null)],null),$APP.W,$APP.P(new $APP.M(null,2,5,$APP.O,[$APP.R4,W6],null),new $APP.M(null,3,5,$APP.O,[$APP.R4,Y6,W6],null)),$APP.FR,$APP.P(null,null)],null),$APP.W,$APP.P($APP.ll,$APP.P(new $APP.M(null,2,5,$APP.O,[$APP.R4,W6],null),new $APP.M(null,3,5,$APP.O,[$APP.R4,Y6,W6],null))),$APP.Z,"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) -\x3e 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 ;; \x3c-- namespaced keywords are often used\n [one two three] ;; \x3c-- a seq of interceptors\n (fn [db [_ arg1 arg2]] ;; \x3c-- event vector is destructured\n (-\x3e db\n (dissoc arg1)\n (update :key + arg2)))) ;; return updated db\n "],
|
|
null)),$APP.Ae(tha,new $APP.n(null,4,[Q6,"Coeffects",$APP.pJ,new $APP.n(null,6,[$APP.PE,!1,$APP.yt,2,$APP.XQ,2,$APP.pP,new $APP.M(null,2,5,$APP.O,[new $APP.M(null,1,5,$APP.O,[$APP.R4],null),new $APP.M(null,2,5,$APP.O,[$APP.R4,$APP.OG],null)],null),$APP.W,$APP.P(new $APP.M(null,1,5,$APP.O,[$APP.R4],null),new $APP.M(null,2,5,$APP.O,[$APP.R4,$APP.OG],null)),$APP.FR,$APP.P(null,null)],null),$APP.W,$APP.P($APP.ll,$APP.P(new $APP.M(null,1,5,$APP.O,[$APP.R4],null),new $APP.M(null,2,5,$APP.O,[$APP.R4,$APP.OG],
|
|
null))),$APP.Z,"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) ... ] ;; \x3c-- 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)),$APP.Ae(Aha,new $APP.n(null,3,[$APP.W,$APP.P($APP.ll,$APP.P(new $APP.M(null,1,5,$APP.O,[$APP.R4],null))),$APP.Z,"Unregisters a post event callback function, identified by `id`.\n\n Such a function must have been previously registered via `add-post-event-callback`",Q6,"Miscellaneous"],null))],[new $APP.n(null,3,[$APP.S,Wha,$APP.Jy,E6,$APP.ob,new $APP.n(null,2,[$APP.W,$APP.P(new $APP.M(null,2,5,$APP.O,[M6,F6],null)),$APP.Z,'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 \x3ca href\x3d"http://day8.github.io/re-frame/flow-mechanics/" target\x3d"_blank"\x3ehttp://day8.github.io/re-frame/flow-mechanics/\x3c/a\x3e'],
|
|
null)],null),new $APP.n(null,3,[$APP.S,sha,$APP.Jy,function(a){V5(a);n6(o6,a);return null},$APP.ob,new $APP.n(null,2,[$APP.W,$APP.P(new $APP.M(null,1,5,$APP.O,[G6],null)),$APP.Z,"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 $APP.n(null,3,[$APP.S,Rha,$APP.Jy,v7,$APP.ob,new $APP.n(null,2,[$APP.W,$APP.P(new $APP.M(null,3,5,$APP.O,[M6,$APP.Sk,$APP.gL],null)),$APP.Z,"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 `:-\x3e` and a 1-arity `computation-function`:\n\n #!clj\n (reg-sub\n :query-id\n :-\x3e 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 _] ;; :\x3c---- 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) ;; :\x3c---- This could be dangerous. If `:foo` is not in db, we get the `query-vector` instead of `nil`.\n\n By using `:-\x3e` 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 :-\x3e :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 `:\x3d\x3e` and a multi-arity `computation-function`\n\n #!clj\n (reg-sub\n :query-id\n :\x3d\x3e computation-fn)\n\n The `query-vector` can be broken into two components `[query-id \x26 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 :\x3d\x3e vector) ;; :\x3c---- 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 ;; \x3c-- 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])) ;; \x3c-- 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) ;; \x3c--- 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 :\x3c- [:a-sub]\n :\x3c- [: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 `:\x3c-` 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 :\x3c- [: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 :\x3c- [:a-sub]\n :\x3c- [:b-sub]\n :-\x3e (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 $APP.n(null,3,[$APP.S,oia,$APP.Jy,function(a){return p6(a)},$APP.ob,new $APP.n(null,2,[$APP.W,$APP.P(new $APP.M(null,1,5,$APP.O,[G6],null)),$APP.Z,"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 $APP.n(null,3,[$APP.S,Wga,$APP.Jy,Eia,$APP.ob,$APP.gg],null),new $APP.n(null,3,[$APP.S,xha,$APP.Jy,s7,$APP.ob,new $APP.n(null,2,[$APP.W,$APP.P(new $APP.M(null,2,5,$APP.O,[$APP.R4,W6],null),new $APP.M(null,3,5,$APP.O,[$APP.R4,Y6,W6],null)),$APP.Z,"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) -\x3e 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 ;; \x3c-- namespaced keywords are often used\n [one two three] ;; \x3c-- 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 $APP.n(null,3,[$APP.S,fha,$APP.Jy,function(a,b){return O5(a,b)},$APP.ob,new $APP.n(null,2,[$APP.W,$APP.P(new $APP.M(null,2,5,$APP.O,[$6,Y6],null)),$APP.Z,"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 $APP.n(null,3,[$APP.S,dha,$APP.Jy,F7,$APP.ob,new $APP.n(null,2,[$APP.W,$APP.P(new $APP.M(null,1,5,$APP.O,[$6],null),new $APP.M(null,2,5,$APP.O,[$6,$APP.JD],null),new $APP.M(null,3,5,$APP.O,[$6,$APP.JD,P6],null)),$APP.Z,"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 $APP.n(null,3,[$APP.S,aha,$APP.Jy,u7,$APP.ob,new $APP.n(null,2,[$APP.W,$APP.P($APP.qh,new $APP.M(null,1,5,$APP.O,[$APP.R4],null)),$APP.Z,"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 $APP.n(null,3,[$APP.S,Vha,$APP.Jy,w7,$APP.ob,new $APP.n(null,2,[$APP.W,$APP.P(new $APP.M(null,1,5,$APP.O,[b7],null),new $APP.M(null,2,5,$APP.O,[b7,I6],null)),$APP.Z,'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 \x3csub (comp deref re-frame.core/subscribe))\n\n And then, within their views, they call `(\x3csub [:items :small])` rather\n than using `subscribe` directly.\n\n **De-duplication**\n\n Two, or more, concurrent subscriptions for the same query will\n source reactive updates from the one executing handler.\n\n See also: `reg-sub`\n '],
|
|
null)],null),new $APP.n(null,3,[$APP.S,Cha,$APP.Jy,y7,$APP.ob,new $APP.n(null,2,[$APP.W,$APP.P($APP.qh,new $APP.M(null,1,5,$APP.O,[$APP.R4],null)),$APP.Z,"Unregisters effect handlers (presumably registered previously via the use of `reg-fx`).\n\n When called with no args, it will unregister all currently registered effect handlers.\n\n When given one arg, assumed to be the `id` of a previously registered\n effect handler, it will unregister the associated handler. Will produce a warning to\n console if it finds no matching registration.\n "],
|
|
null)],null),new $APP.n(null,3,[$APP.S,Aia,$APP.Jy,t7,$APP.ob,new $APP.n(null,2,[$APP.W,$APP.P(new $APP.M(null,2,5,$APP.O,[$APP.R4,W6],null),new $APP.M(null,3,5,$APP.O,[$APP.R4,Y6,W6],null)),$APP.Z,"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: context-map -\x3e 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 (-\x3e initial\n function1\n function2\n function3)\n effects (select-keys result [:db :fx])]\n (assoc context :effects effects))))\n "],
|
|
null)],null),new $APP.n(null,3,[$APP.S,Yga,$APP.Jy,I7,$APP.ob,new $APP.n(null,2,[$APP.W,$APP.P(new $APP.M(null,1,5,$APP.O,[$APP.ZH],null),new $APP.M(null,2,5,$APP.O,[$APP.R4,$APP.ZH],null)),$APP.Z,"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 $APP.n(null,3,[$APP.S,Zga,$APP.Jy,function(a,b){return r6(a,b)},$APP.ob,new $APP.n(null,2,[$APP.W,$APP.P(new $APP.M(null,2,5,$APP.O,[$APP.R4,W6],null)),$APP.Z,"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 $APP.n(null,3,[$APP.S,sia,$APP.Jy,function(a){return Uga(a)},$APP.ob,new $APP.n(null,2,[$APP.W,$APP.P(new $APP.M(null,1,5,$APP.O,[$APP.ZH],null)),$APP.Z,'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 \x3ca href\x3d"https://twitter.com/nathanmarz/status/879722740776939520" target\x3d"_blank"\x3ehttps://twitter.com/nathanmarz/status/879722740776939520\x3c/a\x3e\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) ;; \x3c- Only perform an update if user is active\n ...))))\n '],
|
|
null)],null),new $APP.n(null,3,[$APP.S,iia,$APP.Jy,function(a){return Cga(a)},$APP.ob,new $APP.n(null,2,[$APP.W,$APP.P(new $APP.M(null,1,5,$APP.O,[L6],null)),$APP.Z,"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 $APP.n(null,3,[$APP.S,bha,$APP.Jy,H7,$APP.ob,new $APP.n(null,2,[$APP.W,$APP.P(new $APP.M(null,3,5,$APP.O,[U6,$APP.Sk,$APP.gL],null)),$APP.Z,'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 $APP.n(null,3,[$APP.S,wia,$APP.Jy,A7,$APP.ob,new $APP.n(null,2,[$APP.W,$APP.P($APP.qh,new $APP.M(null,1,5,$APP.O,[$APP.R4],null)),$APP.Z,"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 $APP.n(null,3,[$APP.S,Bia,$APP.Jy,function(a,b){return F5(u6,a,b)},$APP.ob,new $APP.n(null,2,[$APP.W,$APP.P(new $APP.M(null,2,5,$APP.O,[$APP.R4,W6],null)),$APP.Z,"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 $APP.n(null,3,[$APP.S,pha,$APP.Jy,function(a){return Vga(a)},$APP.ob,new $APP.n(null,2,[$APP.W,$APP.P(new $APP.M(null,1,5,$APP.O,[$APP.ZH],null)),$APP.Z,"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 $APP.n(null,3,[$APP.S,zia,$APP.Jy,J7,$APP.ob,new $APP.n(null,2,[$APP.W,$APP.P(new $APP.M(null,2,5,$APP.O,[$APP.Sk,$APP.gL],null)),$APP.Z,"Deprecated. Use `reg-event-db` instead."],null)],null),new $APP.n(null,3,[$APP.S,jha,$APP.Jy,function(a){return $APP.gk.j(i7,$APP.tm,a)},$APP.ob,new $APP.n(null,2,[$APP.W,$APP.P(new $APP.M(null,1,5,$APP.O,[a7],null)),$APP.Z,"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 [\x26 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 $APP.n(null,3,[$APP.S,tia,$APP.Jy,function(a,b,c){return J5(a,b,c)},$APP.ob,new $APP.n(null,2,[$APP.W,$APP.P(new $APP.M(null,3,5,$APP.O,[$6,$APP.JD,$APP.OG],null)),$APP.Z,"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 $APP.n(null,3,[$APP.S,nia,$APP.Jy,C7,$APP.ob,new $APP.n(null,2,[$APP.W,$APP.P(new $APP.M(null,4,5,$APP.O,[$APP.ZH,e7,$APP.Sk,N6],
|
|
null)),$APP.Z,"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 ...] ;; \x3c-- 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 $APP.n(null,3,[$APP.S,Oha,$APP.Jy,function(){for(var a=$APP.x($APP.v(W5)),b=null,c=0,d=0;;)if(d<c){var e=b.Y(null,d);$APP.E.j(e,0,null);e=$APP.E.j(e,1,null);$APP.r3(e);d+=1}else if(a=$APP.x(a))$APP.Me(a)?(c=$APP.hd(a),a=$APP.id(a),b=c,c=$APP.le(c)):(b=$APP.y(a),$APP.E.j(b,0,null),b=$APP.E.j(b,1,null),$APP.r3(b),a=$APP.z(a),b=null,c=0),d=0;else break;return $APP.p($APP.ig($APP.v(W5)))?y5.l($APP.M4,$APP.I(["re-frame: The subscription cache isn't empty after being cleared"])):null},
|
|
$APP.ob,new $APP.n(null,2,[$APP.W,$APP.P($APP.qh),$APP.Z,"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 $APP.n(null,3,[$APP.S,lia,$APP.Jy,G7,$APP.ob,new $APP.n(null,2,[$APP.W,$APP.P(new $APP.M(null,1,5,$APP.O,[$6],null),new $APP.M(null,2,5,$APP.O,[$6,$APP.JD],null),new $APP.M(null,3,5,$APP.O,[$6,$APP.JD,P6],null)),$APP.Z,"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 $APP.n(null,3,[$APP.S,Kha,$APP.Jy,K7,$APP.ob,new $APP.n(null,2,[$APP.W,$APP.P(new $APP.M(null,2,5,$APP.O,[$APP.Sk,$APP.gL],null)),$APP.Z,"Deprecated. Use `reg-sub-raw` instead."],null)],null),new $APP.n(null,3,[$APP.S,Iha,$APP.Jy,B7,$APP.ob,new $APP.n(null,2,[$APP.W,$APP.P(new $APP.M(null,2,5,$APP.O,[$APP.Sk,$APP.gL],null)),$APP.Z,"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]) ;; \x3c-- 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 $APP.n(null,3,[$APP.S,vha,$APP.Jy,D7,$APP.ob,new $APP.n(null,2,[$APP.W,$APP.P($APP.qh,new $APP.M(null,1,5,$APP.O,[$APP.R4],null)),$APP.Z,"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 $APP.n(null,3,[$APP.S,uia,$APP.Jy,x7,$APP.ob,new $APP.n(null,2,[$APP.W,$APP.P($APP.qh,new $APP.M(null,1,5,$APP.O,[M6],null)),$APP.Z,"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 $APP.n(null,3,[$APP.S,iha,$APP.Jy,Fia,$APP.ob,$APP.gg],null),new $APP.n(null,3,[$APP.S,bia,$APP.Jy,E7,$APP.ob,new $APP.n(null,2,[$APP.W,$APP.P(new $APP.M(null,2,5,$APP.O,[$APP.Sk,new $APP.n(null,2,[$APP.sp,$APP.eI,$APP.x4,new $APP.M(null,3,5,$APP.O,[$APP.R4,f7,T6],null)],null)],null)),$APP.Z,"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 (-\x3einterceptor\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 $APP.n(null,3,[$APP.S,Gha,$APP.Jy,function(){var a=$APP.v(D5),b=$APP.v(h7),c=$APP.v(W5);return function(){var d=$APP.cj($APP.Si(c)),e=$APP.cj($APP.Si($APP.v(W5)));d=$APP.x($APP.XU.g(e,d));e=null;for(var f=0,g=0;;)if(g<f){var k=e.Y(null,g);$APP.r3(k);g+=1}else if(d=$APP.x(d))e=d,$APP.Me(e)?(d=$APP.hd(e),g=$APP.id(e),e=d,f=$APP.le(d),d=g):(d=$APP.y(e),$APP.r3(d),d=$APP.z(e),e=null,f=0),g=0;else break;$APP.Hg(D5,a);$APP.Hg(h7,b);return null}},$APP.ob,new $APP.n(null,2,[$APP.W,$APP.P($APP.qh),
|
|
$APP.Z,"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 $APP.n(null,3,[$APP.S,Pha,$APP.Jy,function(){return o6.Eb=A5},$APP.ob,new $APP.n(null,2,[$APP.W,$APP.P($APP.qh),$APP.Z,"Removes all events currently queued for processing"],null)],
|
|
null),new $APP.n(null,3,[$APP.S,mha,$APP.Jy,Dia,$APP.ob,$APP.gg],null),new $APP.n(null,3,[$APP.S,Fha,$APP.Jy,function(a,b,c){return M5(a,b,c)},$APP.ob,new $APP.n(null,2,[$APP.W,$APP.P(new $APP.M(null,3,5,$APP.O,[$6,$APP.JD,$APP.OG],null)),$APP.Z,"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 $APP.n(null,3,[$APP.S,wha,$APP.Jy,r7,$APP.ob,new $APP.n(null,2,[$APP.W,
|
|
$APP.P(new $APP.M(null,2,5,$APP.O,[$APP.R4,W6],null),new $APP.M(null,3,5,$APP.O,[$APP.R4,Y6,W6],null)),$APP.Z,"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) -\x3e 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 ;; \x3c-- namespaced keywords are often used\n [one two three] ;; \x3c-- a seq of interceptors\n (fn [db [_ arg1 arg2]] ;; \x3c-- event vector is destructured\n (-\x3e db\n (dissoc arg1)\n (update :key + arg2)))) ;; return updated db\n "],
|
|
null)],null),new $APP.n(null,3,[$APP.S,via,$APP.Jy,z7,$APP.ob,new $APP.n(null,2,[$APP.W,$APP.P(new $APP.M(null,1,5,$APP.O,[$APP.R4],null),new $APP.M(null,2,5,$APP.O,[$APP.R4,$APP.OG],null)),$APP.Z,"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) ... ] ;; \x3c-- 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 $APP.n(null,3,[$APP.S,Eha,$APP.Jy,function(a){return $APP.Ze(o6.Bd,a)?o6.Bd=$APP.um.g(o6.Bd,a):y5.l($APP.M4,$APP.I(["re-frame: could not remove post event call back with id:",a]))},$APP.ob,new $APP.n(null,2,[$APP.W,$APP.P(new $APP.M(null,1,5,$APP.O,[$APP.R4],null)),$APP.Z,"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)]),Gia);$APP.Zy(new $APP.n(null,1,[$APP.Np,new $APP.n(null,1,[H6,Hia],null)],null));
|
|
}).call(this); |