Socket
Socket
Sign inDemoInstall

effector

Package Overview
Dependencies
0
Maintainers
5
Versions
270
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 23.1.0 to 23.2.0

2

compat.js

@@ -1,2 +0,2 @@

'use strict';function e(e,r){for(var n in e)r(e[n],n)}function r(e,r){e.forEach(r)}function n(e,r,n){if(!e)throw Error((n?n+': ':'')+r)}function t(e,r){var n=j(e).meta||{};re={id:j(e).id,parent:re,value:e,template:n.template||te(),sidRoot:n.sidRoot||re&&re.sidRoot,meta:n};try{return r()}finally{ne('region'),re=F(re)}}function a(e){var n=void 0===e?{}:e,t=n.node,a=void 0===t?[]:t,i=n.parent,o=n.child,u=void 0===o?n.to||n.target:o,s=n.scope,f=void 0===s?{}:s,c=n.meta,d=void 0===c?{}:c,l=n.family,p=void 0===l?{type:'regular'}:l,v=n.regional,m=oe(void 0===i?n.from||n.source:i),h=oe(p.links),g=oe(p.owners),y=[];r(a,(function(e){return e&&J(y,e)}));var b={id:Z(),seq:y,next:oe(u),meta:d,scope:f,family:{type:p.type||"crosslink",links:h,owners:g}};return r(h,(function(e){return J(O(e),b)})),r(g,(function(e){return J(z(e),b)})),r(m,(function(e){return J(e.next,b)})),v&&re&&ie(C(re),[b]),b}function i(e,n,t){var a,i=We,o=null,u=Re;if(e.target&&(n=e.params,t=e.defer,a=e.meta,i='page'in e?e.page:i,e.stack&&(o=e.stack),u=R(e)||u,e=e.target),u&&Re&&u!==Re&&(Re=null),Array.isArray(e))for(var s=0;s<e.length;s++)_e('pure',i,j(e[s]),o,n[s],u,a);else _e('pure',i,j(e),o,n,u,a);if(!t||Le){var f,c,d,l,p,v,m={isRoot:Le,currentPage:We,scope:Re,isWatch:Te,isPure:Be};Le=0;for(var h=function(){var e=l.idx,n=l.stack,t=l.type;d=n.node,We=p=n.page,Re=R(n),p?v=p.reg:Re&&(v=Re.reg);var a=!!p,i=!!Re,o={fail:0,scope:d.scope};f=c=0;for(var u=e;u<d.seq.length&&!f;u++){var s=d.seq[u];if(s.order){var h=s.order,g=h.priority,y=h.barrierID,b=y?p?p.fullID+"_"+y:y:0;if(u!==e||t!==g)return y?Ve.has(b)||(Ve.add(b),Pe(u,n,g,y)):Pe(u,n,g,0),"continue|kernelLoop";y&&Ve.delete(b)}switch(s.type){case'mov':var k=s.data,w=void 0;switch(k.from){case'stack':w=C(n);break;case'a':case'b':w=n[k.from];break;case'value':w=k.store;break;case'store':if(v&&!v[k.store.id])if(a){var x=Ue(p,k.store.id);n.page=p=x,x?v=x.reg:i?(Ke(Re,k.store,0,1,k.softRead),v=Re.reg):v=void 0}else i&&Ke(Re,k.store,0,1,k.softRead);w=Oe(v&&v[k.store.id]||k.store)}switch(k.to){case'stack':n.value=w;break;case'a':case'b':n[k.to]=w;break;case'store':$e(p,Re,k.target,0).current=w}break;case'compute':var S=s.data;if(S.fn){Te='watch'===d.meta.op,Be=S.pure;var M=S.safe?(0,S.fn)(C(n),o.scope,n):Qe(o,S.fn,n);S.filter?c=!M:n.value=M,Te=m.isWatch,Be=m.isPure}}f=o.fail||c}if(De&&De(n,o),!f){var A=C(n),j=R(n);if(r(d.next,(function(e){_e('child',p,e,n,A,j)})),j){d.meta.needFxCounter&&_e('child',p,j.fxCount,n,A,j),d.meta.storeChange&&_e('child',p,j.storeChange,n,A,j),d.meta.warnSerialize&&_e('child',p,j.warnSerializeNode,n,A,j);var O=j.additionalLinks[d.id];O&&r(O,(function(e){_e('child',p,e,n,A,j)}))}}};l=qe();)h();Le=m.isRoot,We=m.currentPage,Re=R(m)}}function o(r,n){void 0===n&&(n='combine');var t=n+'(',a='',i=0;return e(r,(function(e){i<25&&(null!=e&&(t+=a,t+=P(e)?_(e).fullName:e.toString()),i+=1,a=', ')})),t+')'}function u(e,r){var n,t,a=e;if(r){var i=_(r);0===e.length?(n=i.path,t=i.fullName):(n=i.path.concat([e]),t=0===i.fullName.length?e:i.fullName+'/'+e)}else n=0===e.length?[]:[e],t=e;return{shortName:a,fullName:t,path:n}}function s(e,r){if(!r)return e;if(!r.name&&!r.named&&!r.loc)return e;var n="["+e+"]",t=r.named||r.name;t&&(n+=" unit '"+t+"'");var a=r.loc;return!t&&a&&(n+=" ("+a.file+":"+a.line+":"+a.column+")"),n}function f(e,r){var n=r?e:e[0];ce(n);var t=n.or,a=n.and;if(a){var i=r?a:a[0];if(ue(i)&&'and'in i){var o=f(a,r);e=o[0],t=Object.assign({},t,o[1])}else e=a}return[e,t]}function c(e){var r=function(){return e()};return r.unsubscribe=function(){return e()},r}function d(e){var r=te();if(r){for(var n=r.handlers[e],t=arguments.length,a=new Array(t>1?t-1:0),i=1;i<t;i++)a[i-1]=arguments[i];if(n)return n.apply(void 0,[r].concat(a))}}function l(e,r,n,t){var a=We,i=null;if(r)for(i=We;i&&i.template!==r;)i=F(i);He(i);var o=e.create(n,t);return He(a),o}function p(e,r){var t=Xe({or:r,and:'string'==typeof e?{name:e}:e}),o=s('event',t),u=function e(r){n(!D(e,'derived'),'call of derived event is not supported, use createEvent instead',o),n(!Be,'unit call from pure function is not supported, use operators like sample instead',o);for(var t=arguments.length,a=new Array(t>1?t-1:0),i=1;i<t;i++)a[i-1]=arguments[i];return We?l(e,f,r,a):e.create(r,a)},f=te(),c=Object.assign(u,{graphite:a({meta:or(t.actualOp||"event",u,t),regional:1}),create:function(e){return i({target:u,params:e,scope:Re}),e},watch:function(e){return ar(u,e)},map:function(e){return ur(u,"map",e,[Me()])},filter:function(e){return ur(u,'filter',e.fn?e:e.fn,[Me(he,1)])},filterMap:function(e){return ur(u,'filterMap',e,[Me(),xe((function(e){return!fe(e)}),1)])},prepend:function(e){n(u.targetable,'.prepend of derived event is not supported, call source event instead',o);var r=p('* \u2192 '+u.shortName,{parent:F(u)});return d('eventPrepend',j(r)),tr(r,u,[Me()],'prepend',e),ir(u,r),r}});return null!=t&&t.domain&&t.domain.hooks.event(c),q(c,'id',c.graphite.id),ne(c.graphite),c}function v(e,t,a,i,o){return le(a,o+" "+t,'first argument'),n(se(i),'second argument should be a function',o),K(!D(e,'derived'),t+" in derived store",t+" in store created via createStore",o),r(Array.isArray(a)?a:[a],(function(r){e.off(r),I(e).set(r,nr(fr(r,e,'on',me,i)))})),e}function m(e,t){var o=Xe(t),u=je(e),f=s('store',o),c=p({named:'updates',derived:1});d('storeBase',u);var l=u.id,h='skipVoid'in o,g=h&&!o.skipVoid;K(!(h&&o.skipVoid),'{skipVoid: true}','updateFilter',f);var y={subscribers:new Map,updates:c,defaultState:e,stateRef:u,getState:function(){var e,r=u;if(We){for(var n=We;n&&!n.reg[l];)n=F(n);n&&(e=n)}return!e&&Re&&(Ke(Re,u,1),e=Re),e&&(r=e.reg[l]),Oe(r)},setState:function(e){return i({target:y,params:e,defer:1,scope:Re})},reset:function(){n(y.targetable,'.reset of derived store is not supported',f);for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];return r(t,(function(e){return v(y,'.reset',e,(function(){return y.defaultState}),f)})),y},on:function(e,r){return n(y.targetable,'.on of derived store is not supported',f),v(y,'.on',e,r,f)},off:function(e){var r=I(y).get(e);return r&&(r(),I(y).delete(e)),y},map:function(e,r){var n,t;ue(e)&&(n=e,e=e.fn);var a=y.getState(),i=fe(a);te()?t=null:(!i||i&&g)&&(t=e(a));var o=m(t,Object.assign({name:y.shortName+" \u2192 *",derived:1},r,{and:n})),s=fr(y,o,"map",he,e);return ze(N(o),{type:"map",fn:e,from:u}),N(o).noInit=1,d('storeMap',u,s),o},watch:function(e,r){if(K(!r,'watch second argument','sample',f),!r||!P(e)){var t=ar(y,e);return d('storeWatch',u,e)||e(y.getState()),t}return n(se(r),'second argument should be a function',f),e.watch((function(e){return r(y.getState(),e)}))}},b=or("store",y,o),k=y.defaultConfig.updateFilter;y.graphite=a({scope:{state:u,fn:k},node:[xe((function(e,r,n){return n.scope&&!n.scope.reg[u.id]&&(n.b=1),e})),Se(u),xe((function(e,r,n){var t=n.a,a=n.b,i=fe(e);return i&&!h&&console.error(f+": "+sr),(i&&g||!i)&&(e!==t||a)}),1),k&&Me(ve,1),be({from:"stack",target:u})],child:c,meta:Object.assign({},b,{defaultState:e}),regional:1}),q(y,'id',y.graphite.id),q(y,'rootStateRefId',l);var w=D(y,'serialize'),x=D(y,'derived'),S='ignore'===w,M=D(y,'sid');M&&(q(y,'storeChange',1),u.sid=M),M||S||x||q(y,'warnSerialize',1);var A=fe(e);return n(x||!A||A&&g,sr,f),x&&A&&!h&&console.error(f+": "+sr),ie(y,[c]),null!=o&&o.domain&&o.domain.hooks.store(y),x||(y.reinit=p({named:'reinit'}),y.reset(y.reinit)),u.meta=y.graphite.meta,ne(y.graphite),y}function h(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];var a,i,o,u=f(r);r=u[0];var c,d,l,p=s('combine',o=u[1]),v=r[r.length-1],m=!V(v)&&ue(v),h=m&&v,g=m?r[r.length-2]:v;if(se(g)?(i=r.slice(0,m?-2:-1),a=g):i=r,1===i.length){var y=i[0];V(y)||(c=y,d=1)}if(!d&&(c=i,a)){l=1;var b=a;a=function(e){return b.apply(void 0,e)}}return n(ue(c),p+": shape should be an object"),cr(Array.isArray(c),!l,c,o,a,h)}function g(){var e={};return e.req=new Promise((function(r,n){e.rs=r,e.rj=n})),e.req.catch((function(){})),e}function y(e,r){void 0===r&&(r={});var t=Xe(se(e)?{handler:e}:e,r),o=s('effect',t),u=p(se(e)?{handler:e}:e,Object.assign({},r,{actualOp:"effect"})),f=j(u);q(f,'op',u.kind="effect"),u.use=function(e){return n(se(e),'.use argument should be a function',o),y.scope.handler=e,u},u.use.getCurrent=function(){return y.scope.handler};var c=u.finally=p({named:'finally',derived:1}),d=u.done=c.filterMap({named:'done',fn:function(e){if('done'===e.status)return{params:e.params,result:e.result}}}),l=u.fail=c.filterMap({named:'fail',fn:function(e){if('fail'===e.status)return{params:e.params,error:e.error}}}),v=u.doneData=d.map({named:'doneData',fn:function(e){return e.result}}),h=u.failData=l.map({named:'failData',fn:function(e){return e.error}}),y=a({scope:{handler:u.defaultConfig.handler||function(){return n(0,"no handler used in "+u.compositeName.fullName)}},node:[xe((function(e,r,n){var t=r.handler,a=R(n);if(a){var i=a.handlers.unitMap.get(u)||a.handlers.sidMap[u.sid];i&&(t=i)}return e.handler=t,e}),0,1),xe((function(e,r,n){if(!r.runnerFn||r.runnerFn(e,null,n)){var t=e.params,a=e.req,i=e.handler,o=e.args,u=void 0===o?[t]:o,s=lr(t,a,1,c,n),f=lr(t,a,0,c,n),d=dr(i,f,u),l=d[1];d[0]&&(ue(l)&&se(l.then)?l.then(s,f):s(l))}}),0,1)],meta:{op:'fx',fx:'runner'}});f.scope.runner=y,J(f.seq,xe((function(e,r,n){var t=r.runner,a=F(n)?{params:e,req:{rs:function(){},rj:function(){}}}:e;return n.meta||(n.meta={fxID:ee()}),i({target:t,params:a,defer:1,scope:R(n),meta:n.meta}),a.params}))),u.create=function(e){var r=g(),n={params:e,req:r};if(Re&&!Te){var t=Re;r.req.finally((function(){Ge(t)})).catch((function(){}))}return i({target:u,params:n,scope:Re}),r.req};var b=u.inFlight=m(0,{serialize:'ignore',named:(D(u,'name')||u.graphite.id)+'.inFlight'}).on(u,(function(e){return e+1})).on(c,(function(e){return e-1})).map({fn:function(e){return e},named:'inFlight'});q(c,'needFxCounter','dec'),q(u,'needFxCounter',1);var k=u.pending=b.map({fn:function(e){return e>0},named:'pending'});return ie(u,[c,d,l,v,h,k,b]),null!=t&&t.domain&&t.domain.hooks.effect(u),u}function b(e,r){var n=s('merge',r);le(e,n,'first argument');var t=p({name:o(e,'merge'),derived:1,and:r});return tr(e,t,[],'merge'),t}function k(e,t){var a=0;return r(vr,(function(r){r in e&&(n(null!=e[r],mr(t,r)),a=1)})),a}function w(e,n,t){var a=[];(function e(i){U(a,i)||(J(a,i),"store"===D(i,'op')&&(t||D(i,'sid'))&&n(i,D(i,'sid')),r(i.next,e),r(O(i),e),r(z(i),e))})(e)}function x(e,t){var a=Array.isArray(e)?new Map(e):e,i=new Map,o=0;if(a instanceof Map){var u={};return r(a,(function(e,r){n(P(r),'Map key should be a unit'),t&&t(r,e),r.sid&&(r.sid in u&&(o=1),u[r.sid]=e),i.set(r,e)})),{sidMap:u,unitMap:i,hasSidDoubles:o}}return{sidMap:a,unitMap:i}}function S(e,r){return V(r)?[Ae.mov({store:r.stateRef,to:'stack'})].concat(e):e}Object.defineProperty(exports,'__esModule',{value:1});for(var M,A='undefined'!=typeof Symbol&&Symbol.observable||'@@observable',j=function(e){return e.graphite||e},O=function(e){return e.family.owners},z=function(e){return e.family.links},N=function(e){return e.stateRef},C=function(e){return e.value},I=function(e){return e.subscribers},F=function(e){return e.parent},R=function(e){return e.scope},D=function(e,r){return j(e).meta[r]},q=function(e,r,n){return j(e).meta[r]=n},_=function(e){return e.compositeName},P=function(e){return(se(e)||ue(e))&&'kind'in e},E=function(e){return function(r){return P(r)&&r.kind===e}},V=E("store"),L=E("event"),T=E("effect"),B=function(e){return P(e)&&!!e.targetable},W=E("domain"),G=E("scope"),H={__proto__:null,unit:P,store:V,event:L,effect:T,targetable:B,domain:W,scope:G,attached:function(e){return T(e)&&1==D(e,'attached')}},U=function(e,r){return e.includes(r)},$=function(e,r){var n=e.indexOf(r);-1!==n&&e.splice(n,1)},J=function(e,r){return e.push(r)},K=function(e,r,n,t){return!e&&console.error((t?t+': ':'')+r+" is deprecated"+(n?", use "+n+" instead":''))},Q=function(){var e=0;return function(){return""+ ++e}},X=Q(),Y=Q(),Z=Q(),ee=Q(),re=null,ne=function(e){M&&M(e,re)},te=function(){return re&&re.template},ae=function(e){return e&&re&&re.sidRoot&&(e=re.sidRoot+"|"+e),e},ie=function(e,n){var t=j(e);r(n,(function(e){var r=j(e);"domain"!==t.family.type&&(r.family.type="crosslink"),J(O(r),t),J(z(t),r)}))},oe=function(e){return void 0===e&&(e=[]),(Array.isArray(e)?e:[e]).flat().map(j)},ue=function(e){return'object'==typeof e&&null!==e},se=function(e){return'function'==typeof e},fe=function(e){return void 0===e},ce=function(e){return n(ue(e)||se(e),'expect first argument be an object')},de=function(e,r,t,a){return n(!(!ue(e)&&!se(e)||!('family'in e)&&!('graphite'in e)),r+": expect "+t+" to be a unit (store, event or effect)"+a)},le=function(e,n,t){Array.isArray(e)?r(e,(function(e,r){return de(e,n,r+" item of "+t,'')})):de(e,n,t,' or array of units')},pe=function(e,t,a){return void 0===a&&(a='target'),r(oe(t),(function(r){return n(!D(r,'derived'),e+": derived unit in \""+a+"\" is not supported, use createStore/createEvent instead\"")}))},ve=function(e,r,n){return(0,r.fn)(e,n.a)},me=function(e,r,n){return(0,r.fn)(n.a,e)},he=function(e,r){return(0,r.fn)(e)},ge=function(e,r,n,t){var a={id:Y(),type:e,data:r};return n&&(a.order={priority:n},t&&(a.order.barrierID=++ye)),a},ye=0,be=function(e){var r=e.from,n=e.target,t=e.to;return ge('mov',{from:void 0===r?"store":r,store:e.store,to:void 0===t?n?"store":"stack":t,target:n},e.priority,e.batch)},ke=function(e){var r=e.safe,n=e.filter,t=e.pure;return ge('compute',{fn:e.fn,safe:void 0===r?0:r,filter:void 0===n?0:n,pure:void 0===t?0:t},e.priority,e.batch)},we=function(e){return ke({fn:e.fn,priority:"effect"})},xe=function(e,r,n){return ke({fn:e,safe:1,filter:r,priority:n&&"effect"})},Se=function(e,r,n){return be({store:e,to:r?"stack":"a",priority:n&&"sampler",batch:1})},Me=function(e,r){return void 0===e&&(e=he),ke({fn:e,pure:1,filter:r})},Ae={mov:be,compute:ke,filter:function(e){return ke({fn:e.fn,filter:1,pure:e.pure})},run:we},je=function(e){return{id:Y(),current:e,initial:e}},Oe=function(e){return e.current},ze=function(e,r){e.before||(e.before=[]),J(e.before,r)},Ne=null,Ce=function e(r,n){return r?n?((r.v.type===n.v.type&&r.v.id>n.v.id||Ee(r.v.type)>Ee(n.v.type))&&(t=r,r=n,n=t),t=e(r.r,n),r.r=r.l,r.l=t,r):r:n;var t},Ie=[],Fe=0;Fe<6;)J(Ie,{first:null,last:null,size:0}),Fe+=1;var Re,De,qe=function(){for(var e=0;e<6;e++){var r=Ie[e];if(r.size>0){if(3===e||4===e){r.size-=1;var n=Ne.v;return Ne=Ce(Ne.l,Ne.r),n}1===r.size&&(r.last=null);var t=r.first;return r.first=t.r,r.size-=1,t.v}}},_e=function(e,r,n,t,a,i,o){return Pe(0,{a:null,b:null,node:n,parent:t,value:a,page:r,scope:i,meta:o},e,0)},Pe=function(e,r,n,t){var a=Ee(n),i=Ie[a],o={v:{idx:e,stack:r,type:n,id:t},l:null,r:null};3===a||4===a?Ne=Ce(Ne,o):(0===i.size?i.first=o:i.last.r=o,i.last=o),i.size+=1},Ee=function(e){switch(e){case'child':return 0;case'pure':return 1;case'read':return 2;case'barrier':return 3;case'sampler':return 4;case'effect':return 5;default:return-1}},Ve=new Set,Le=1,Te=0,Be=0,We=null,Ge=function(e){Re=e},He=function(e){We=e},Ue=function(e,r){if(e){for(;e&&!e.reg[r];)e=e.parent;if(e)return e}return null},$e=function(e,r,n,t){var a=Ue(e,n.id);return a?a.reg[n.id]:r?(Ke(r,n,t),r.reg[n.id]):n},Je=function(e){return e},Ke=function e(n,t,a,i,o){var u=n.reg;if(!u[t.id]){var s=t.sid,f={id:t.id,current:t.initial,meta:t.meta};if(f.id in n.values.idMap)f.current=n.values.idMap[f.id];else if(s&&s in n.values.sidMap&&!(s in n.sidIdMap)){var c,d=null==t||null===(c=t.meta)||void 0===c?void 0:c.serialize;f.current=(n.fromSerialize&&'ignore'!==d&&(null==d?void 0:d.read)||Je)(n.values.sidMap[s])}else if(t.before&&!o){var l=0,p=a||!t.noInit||i;r(t.before,(function(r){switch(r.type){case'map':var t=r.from;if((t||r.fn)&&(t&&e(n,t,a,i),p)){var o=t&&u[t.id].current;f.current=r.fn?r.fn(o):o}break;case'field':e(n,r.from,a,i),l||(l=1,f.current=Array.isArray(f.current)?[].concat(f.current):Object.assign({},f.current)),p&&(f.current[r.field]=u[u[r.from.id].id].current)}}))}s&&(n.sidIdMap[s]=t.id),u[t.id]=f}},Qe=function(e,r,n){try{return r(C(n),e.scope,n)}catch(t){console.error(t),e.fail=1,e.failReason=t}},Xe=function r(n,t){return void 0===t&&(t={}),ue(n)&&(r(n.or,t),e(n,(function(e,r){fe(e)||'or'===r||'and'===r||(t[r]=e)})),r(n.and,t)),t},Ye=function(e,r){$(e.next,r),$(O(e),r),$(z(e),r)},Ze=function e(r,n,t){var a;r.next.length=0,r.seq.length=0,r.scope=null;for(var i=z(r);a=i.pop();)Ye(a,r),(n||t&&'sample'!==r.meta.op||"crosslink"===a.family.type)&&e(a,n,'on'!==a.meta.op&&t);for(i=O(r);a=i.pop();)Ye(a,r),t&&"crosslink"===a.family.type&&e(a,n,'on'!==a.meta.op&&t)},er=function(e){return e.clear()},rr=function(e,r){var n=(void 0===r?{}:r).deep,t=0;if(e.ownerSet&&e.ownerSet.delete(e),V(e))er(I(e));else if(W(e)){t=1;var a=e.history;er(a.events),er(a.effects),er(a.stores),er(a.domains)}Ze(j(e),!!n,t)},nr=function(e){return c((function(){return rr(e)}))},tr=function(e,r,n,t,i){return a({node:n,parent:e,child:r,scope:{fn:i},meta:{op:t},family:{owners:[e,r],links:r},regional:1})},ar=function(e,r){return n(se(r),'.watch argument should be a function'),nr(a({scope:{fn:r},node:[we({fn:he})],parent:e,meta:{op:'watch'},family:{owners:e},regional:1}))},ir=function(e,r,n){void 0===n&&(n="event"),F(e)&&F(e).hooks[n](r)},or=function(e,r,n){var t=Xe(n),a="domain"===e,i=X(),o=t.sid,s=void 0===o?null:o,f=t.named,c=void 0===f?null:f,d=t.domain,l=t.parent,p=void 0===l?void 0===d?null:d:l,v=c||t.name||(a?'':i),m=u(v,p),h={op:r.kind=e,name:r.shortName=v,sid:r.sid=ae(s),named:c,unitId:r.id=i,serialize:t.serialize,derived:t.derived,config:t};if(r.targetable=!t.derived,r.parent=p,r.compositeName=m,r.defaultConfig=t,r.getType=function(){return K(0,'getType','compositeName.fullName'),m.fullName},!a){r.subscribe=function(e){return ce(e),r.watch(se(e)?e:function(r){return e.next&&e.next(r)})},r[A]=function(){return r};var g=te();g&&(h.nativeTemplate=g)}return h},ur=function(e,r,n,t){var a;ue(n)&&(a=n,n=n.fn);var i=p({name:e.shortName+" \u2192 *",derived:1,and:a});return tr(e,i,t,r,n),i},sr='undefined is used to skip updates. To allow undefined as a value provide explicit { skipVoid: false } option',fr=function(e,r,n,t,a){var i=N(r),o=be({store:i,to:"a",priority:'read'});"map"===n&&(o.data.softRead=1);var u=[o,Me(t)];return d('storeOnMap',i,u,V(e)&&N(e)),tr(e,r,u,n,a)},cr=function(r,t,a,i,u,f){var c=s('combine',i),l=r?function(e){return[].concat(e)}:function(e){return Object.assign({},e)},p=r?[]:{},v=l(p),h=je(v),g=je(1);h.type=r?'list':'shape',h.noInit=1,d('combineBase',h,g);var y=m(v,Object.assign({name:o(a),derived:1},f,{and:i})),b=N(y);b.noInit=1,q(y,'isCombine',1);var k=Se(h);k.order={priority:'barrier'};var w=be({store:b,to:'b',priority:'read'});w.data.softRead=1;var x=[xe((function(e,r,n){return n.scope&&!n.scope.reg[h.id]&&(n.c=1),e})),k,be({store:g,to:'b'}),xe((function(e,r,n){var a=r.key;if(n.c||e!==n.a[a])return t&&n.b&&(n.a=l(n.a)),n.a[a]=e,1}),1),be({from:"a",target:h}),be({from:"value",store:0,target:g}),be({from:"value",store:1,target:g,priority:'barrier',batch:1}),Se(h,1,1),u&&Me(),w];if(e(a,(function(e,r){if(!V(e))return n(!P(e)&&!fe(e),"combine expects a store in a field "+r,c),void(v[r]=p[r]=e);p[r]=e.defaultState,v[r]=e.getState();var t=tr(e,y,x,'combine',u);t.scope.key=r;var a=N(e);ze(h,{type:'field',field:r,from:a}),d('combineField',a,t)})),y.defaultShape=a,ze(b,{type:"map",from:h,fn:u}),!te())if(u){var S=u(v);!fe(S)||f&&'skipVoid'in f||console.error(c+": "+sr),b.current=S,b.initial=S,y.defaultState=S}else y.defaultState=p;return y},dr=function(e,r,n){try{return[1,e.apply(void 0,n)]}catch(t){return r(t),[0,null]}},lr=function(e,r,n,t,a){return function(o){i({target:[t,pr],params:[n?{status:'done',params:e,result:o}:{status:'fail',params:e,error:o},{value:o,fn:n?r.rs:r.rj}],defer:1,page:a.page,scope:a.scope,meta:a.meta})}},pr=a({node:[we({fn:function(e){return(0,e.fn)(e.value)}})],meta:{op:'fx',fx:'sidechain'}}),vr=['source','clock','target'],mr=function(e,r){return e+": "+r+" should be defined"},hr=function(e,r,t,a,i,o,u,f,c,l,v,g){var y=s(e,f),k=!!i;n(!fe(t)||!fe(r),mr(y,'either source or clock'));var w=0;fe(t)?w=1:P(t)||(t=h(t)),fe(r)?r=t:(le(r,y,'clock'),Array.isArray(r)&&(r=b(r))),w&&(t=r),f||u||(u=t.shortName);var x='none';(v||a)&&(P(a)?x='unit':(n(se(a),'`filter` should be function or unit'),x='fn')),i?(le(i,y,'target'),pe(y,i)):'none'===x&&l&&V(t)&&V(r)?i=m(o?o(Oe(N(t)),Oe(N(r))):Oe(N(t)),{name:u,sid:g,or:f}):(i=p({name:u,derived:1,or:f}),d('sampleTarget',j(i)));var S=je(),M=[];if('unit'===x){var A=yr(a,i,r,S,e),O=A[0];A[2]||M.push.apply(M,gr(A[1])),M.push.apply(M,gr(O))}var z=[];if(w)c&&z.push(Se(S,1,1));else{var C=yr(t,i,r,S,e),I=C[0];C[2]||z.push.apply(z,gr(C[1])),z.push(Se(I,1,c))}var F=tr(r,i,[d('sampleSourceLoader'),be({from:"stack",target:S})].concat(z,M,[Se(S),'fn'===x&&Me((function(e,r,n){return a(e,n.a)}),1),o&&Me(ve),d('sampleSourceUpward',k)]),e,o);return ie(t,[F]),Object.assign(F.meta,f,{joint:1}),i},gr=function(e){return[Se(e),xe((function(e,r,n){return n.a}),1)]},yr=function(e,r,n,t,i){var o=V(e),u=o?N(e):je(),s=je(o);return o||a({parent:e,node:[be({from:"stack",target:u}),be({from:"value",store:1,target:s})],family:{owners:[e,r,n],links:r},meta:{op:i},regional:1}),d('sampleSource',s,u,t),[u,s,o]},br=function(e,r,n,t){var a=e[r];a&&i({target:a,params:Array.isArray(a)?a.map((function(){return n})):n,defer:1,stack:t})},kr=function(e){return!e.node.meta.isCombine||e.parent&&'combine'!==e.parent.node.meta.op},wr=function(e){return e};exports.allSettled=function(e,r){var n=void 0===r?{}:r,t=n.scope,a=n.params;if(!P(e))return Promise.reject(new Error('first argument should be unit'));if(!(T(e)||L(e)||V(e)||G(e)))return Promise.reject(new Error('first argument accepts only effects, events, stores or scopes'));G(e)&&(t=e);var o=g();o.parentFork=Re;var u=t.fxCount;J(u.scope.defers,o);var s=[],f=[];return G(e)||(J(s,e),J(f,T(e)?{params:a,req:{rs:function(e){o.value={status:'done',value:e}},rj:function(e){o.value={status:'fail',value:e}}}}:a)),J(s,u),J(f,null),i({target:s,params:f,scope:t}),o.req},exports.attach=function(e){var r,t,a=f(e,1);e=a[0];var o=s('attach',t=a[1]),c=e.source,d=e.effect,l=e.mapParams,p=e.domain;T(d)&&n(fe(p),'`domain` can only be used with a plain function',o);var v=y(e,t);q(v,'attached',1);var m,g,b=j(v).scope.runner,k=function(e,r,n){var t,a=e.params,o=e.req,u=e.handler,s=v.finally,f=lr(a,o,0,s,n),d=n.a,p=T(u),m=1;if(l){var h=dr(l,f,[a,d]);m=h[0],t=h[1]}else t=c&&p?d:a;if(m){if(!p)return e.args=[d,t],1;i({target:u,params:{params:t,req:{rs:lr(a,o,1,s,n),rj:f}},page:n.page,defer:1,meta:n.meta})}};c?(b.scope.runnerFn=k,V(c)?ie(g=c,[v]):(g=h(c),ie(v,[g])),m=[xe((function(e){return e}),0,1),Se(N(g))],delete b.seq[1].order):m=[xe(k,1,1)],(r=b.seq).splice.apply(r,[1,0].concat(m)),v.use(d);var w=F(d);return w&&(Object.assign(_(v),u(v.shortName,w)),v.defaultConfig.parent=w),ir(d,v,"effect"),v},exports.clearNode=rr,exports.combine=h,exports.createApi=function(){for(var r=arguments.length,n=new Array(r),t=0;t<r;t++)n[t]=arguments[t];var a=f(n),i=a[0],o=i[0],u=i[1],s=a[1],c={};return e(u,(function(e,r){var n=c[r]=p(r,{parent:F(o),config:s});o.on(n,e),ir(o,n)})),c},exports.createDomain=function n(t,o){var u=Xe({or:o,and:'string'==typeof t?{name:t}:t}),s=a({family:{type:"domain"},regional:1,parent:(null==u?void 0:u.domain)||(null==u?void 0:u.parent)}),f={history:{},graphite:s,hooks:{}};s.meta=or("domain",f,{parent:(null==u?void 0:u.domain)||(null==u?void 0:u.parent),or:Object.assign({},u,{derived:1})}),e({Event:p,Effect:y,Store:m,Domain:n},(function(e,n){var t=n.toLowerCase(),a=p({named:"on"+n});f.hooks[t]=a;var o=new Set;f.history[t+"s"]=o,a.create=function(e){return i(a,e),e},J(j(a).seq,xe((function(e,r,n){return n.scope=null,e}))),a.watch((function(e){ie(f,[e]),o.add(e),e.ownerSet||(e.ownerSet=o),F(e)||(e.parent=f)})),ie(f,[a]),f["onCreate"+n]=function(e){return r(o,e),a.watch(e)},f["create"+n]=f[t]=function(r,n){var t=Xe({and:n,or:r});return null!=t&&t.domain?e(r,n):a(e(r,{parent:f,or:t}))}}));var c=F(f);return c&&e(f.hooks,(function(e,r){return tr(e,c.hooks[r])})),null!=u&&u.domain&&u.domain.hooks.domain(f),f},exports.createEffect=y,exports.createEvent=p,exports.createNode=a,exports.createStore=m,exports.createWatch=function(e){var r=e.unit,n=e.fn,t=e.scope,i=e.batch,o=[Ae.run({fn:function(e){return n(e)}})];i&&o.unshift(Ae.compute({priority:'sampler',batch:1})),V(r)&&o.unshift(Ae.mov({store:r.stateRef,to:'stack'}));var u=Array.isArray(r)?r:[r];if(t){var s=[],f=t.additionalLinks;return u.forEach((function(e){var r=f[e.graphite.id]||[];f[e.graphite.id]=r;var n=a({node:S(o,e),meta:{watchOp:e.kind}});r.push(n),s.push((function(){var e=r.indexOf(n);-1!==e&&r.splice(e,1),rr(n)}))})),c((function(){s.forEach((function(e){return e()}))}))}var d=a({node:o,parent:u,family:{owners:u}});return c((function(){rr(d)}))},exports.fork=function(e,t){var i,o=e;W(e)&&(K(0,'fork(domain)','fork()'),i=e,o=t);var u=function(e){var n=a({scope:{defers:[],inFlight:0,fxID:0},node:[xe((function(e,r,n){n.parent?'dec'===n.parent.node.meta.needFxCounter?r.inFlight-=1:(r.inFlight+=1,r.fxID+=1):r.fxID+=1})),ke({priority:"sampler",batch:1}),xe((function(e,n){var t=n.defers,a=n.fxID;n.inFlight>0||0===t.length||Promise.resolve().then((function(){n.fxID===a&&r(t.splice(0,t.length),(function(e){Ge(e.parentFork),e.rs(e.value)}))}))}),0,1)]}),t=a({node:[xe((function(e,r,n){var t=n.parent;if(t){var a=t.node;if(kr(t)){var i=R(n),o=a.meta.sid;i.sidIdMap[o]=a.scope.state.id,i.values.sidMap[o]=e;var u=a.meta.serialize;u&&i.sidSerializeSettings.set(o,'ignore'===u?{ignore:1}:{ignore:0,write:u.write})}}}))]}),i=a({node:[xe((function(e,r,n){var t=R(n);t&&n.parent&&kr(n.parent)&&(t.warnSerialize=1)}))]}),o={cloneOf:e,reg:{},values:{sidMap:{},idMap:{}},sidIdMap:{},sidSerializeSettings:new Map,getState:function(e){if('current'in e)return $e(We,o,e,0).current;var r=j(e);return $e(We,o,r.scope.state,1).current},kind:"scope",graphite:a({family:{type:"domain",links:[n,t,i]},meta:{unit:'fork'},scope:{forkInFlightCounter:n}}),additionalLinks:{},handlers:{sidMap:{},unitMap:new Map},fxCount:n,storeChange:t,warnSerializeNode:i};return o}(i);if(o){if(o.values){var s=x(o.values,(function(e){return n(V(e)&&B(e),'Values map can contain only writable stores as keys')})),f=s.unitMap,c=s.hasSidDoubles;Object.assign(u.values.sidMap,s.sidMap),r(f,(function(e,r){if(u.values.idMap[r.stateRef.id]=e,'ignore'===D(r,'serialize')){var n=D(r,'sid');u.sidSerializeSettings.set(n,{ignore:1})}})),u.fromSerialize=!(Array.isArray(o.values)||o.values instanceof Map),u.hasSidDoubles=c}o.handlers&&(K(o.handlers instanceof Map||Array.isArray(o.handlers),'object with handlers','array'),u.handlers=x(o.handlers,(function(e){return n(T(e),"Handlers map can contain only effects as keys")})))}return u},exports.forward=function(e){var r='forward',n=f(e,1),t=n[0],i=t.from,o=t.to,u=n[1],c=s(r,u);return K(0,r,'sample',c),le(i,c,'"from"'),le(o,c,'"to"'),pe(c,o,'to'),nr(a({parent:i,child:o,meta:{op:r,config:u},family:{},regional:1}))},exports.fromObservable=function(e){ce(e);var r=A in e?e[A]():e;n(r.subscribe,'expect observable to have .subscribe');var t=p(),a=nr(t);return r.subscribe({next:t,error:a,complete:a}),t},exports.guard=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];var t=f(r),a=t[0],i=a[0],o=a[1],u=t[1],c=s('guard',u);return K(0,'guard','sample',c),o||(i=(o=i).source),k(o,c),hr('guard',o.clock,i,o.filter,o.target,null,o.name,u,!o.greedy,0,1)},exports.hydrate=function(e,t){var a=t.values;n(ue(a),'values property should be an object');var o=x(a),u=o.sidMap,s=o.unitMap,f=Object.getOwnPropertyNames(u),c={};r(s,(function(e,r){c[r.stateRef.id]=r}));var d,l,p,v=[],m=[];G(e)?(p=1,n((d=e).cloneOf,'scope should be created from domain'),K(0,'hydrate(fork(domain), { values })','fork({ values })'),l=j(d.cloneOf)):W(e)?(K(0,'hydrate(domain, { values })','fork({ values })'),l=j(e)):n(0,'first argument of hydrate should be domain or scope'),w(l,(function(e,r){if(r&&U(f,r)){J(v,e);var n=D(e,'serialize');n&&'ignore'!==n&&(u[r]=n.read(u[r])),J(m,u[r])}else e.scope.state.id in c&&(J(v,e),J(m,s.get(c[e.scope.state.id])))}),1),i({target:v,params:m,scope:d}),p&&Object.assign(d.values.sidMap,u)},exports.is=H,exports.launch=i,exports.merge=b,exports.restore=function(r,t,a){var i=s('restore',a);if(n(!V(r),'restore($store) is not supported',i),L(r)||T(r)){var o=F(r),u=m(t,{parent:o,name:r.shortName,and:a});return tr(T(r)?r.doneData:r,u),o&&o.hooks.store(u),u}var f=Array.isArray(r)?[]:{};return e(r,(function(e,r){return f[r]=V(e)?e:m(e,{name:r})})),f},exports.sample=function(){for(var e,r,n=arguments.length,t=new Array(n),a=0;a<n;a++)t[a]=arguments[a];var i,o,u=f(t),c=u[0],d=c[0],l=c[1],p=c[2],v=u[1],m=1,h=s('sample',v);return fe(l)&&ue(d)&&k(d,h)&&(l=d.clock,p=d.fn,'batch'in d?m=d.batch:(K(!('greedy'in d),'greedy in sample','batch',h),m=!d.greedy),o=d.filter,e=d.target,r=d.name,i=d.sid,d=d.source),hr('sample',l,d,o,e,p,r,v,m,1,0,i)},exports.scopeBind=function(e,r){var t=void 0===r?{}:r,a=t.scope;n(a||Re||t.safe,'scopeBind: scope not found');var i=a||Re;return function(r){function n(){Ge(o)}var t,a=0,o=Re;Ge(i);try{t=e(r)}catch(u){t=u,a=1}if(n(),a)throw t;return t instanceof Promise&&t.then(n,n),t}},exports.serialize=function(r,t){void 0===t&&(t={}),r.warnSerialize&&console.error('There is a store without sid in this scope, its value is omitted'),n(!r.hasSidDoubles,'duplicate sid found in this scope');var a=t.ignore?t.ignore.map((function(e){return e.sid})):[],i={};return e(r.values.sidMap,(function(e,n){var t;if(!U(a,n)){var o=r.sidIdMap[n],u=null!==(t=r.sidSerializeSettings.get(n))&&void 0!==t?t:{ignore:0,write:wr};u.ignore||(i[n]=(0,u.write)(o&&o in r.reg?r.reg[o].current:e))}})),'onlyChanges'in t&&(K(0,'onlyChanges'),t.onlyChanges||(n(r.cloneOf,'scope should be created from domain'),w(j(r.cloneOf),(function(e,n){n in i||U(a,n)||D(e,'isCombine')||'ignore'===D(e,'serialize')||(i[n]=r.getState(e))})))),i},exports.setGraphInspector=function(e){M=e},exports.setInspector=function(e){De=e},exports.setStoreName=function(e,r){e.shortName=r,Object.assign(_(e),u(r,F(e)))},exports.split=function(){for(var r,t,i='split',o=arguments.length,u=new Array(o),c=0;c<o;c++)u[c]=arguments[c];var l=f(u),v=l[0],m=v[0],h=v[1],g=l[1],y=s(i,g),b=!h;b&&(r=m.cases,h=m.match,t=m.clock,m=m.source);var k=V(h),w=!P(h)&&se(h),x=!k&&!w&&ue(h);n(P(m),'source must be a unit',y),r||(r={}),b?e(r,(function(e,r){return pe(y,e,"cases."+r)})):(n(x,'match should be an object',y),e(h,(function(e,n){return r[n]=p({derived:1,named:"cases."+n,and:g})})),r.__=p({derived:1,named:'cases.__',and:g}));var S,M=new Set([].concat(m,t||[],Object.values(r))),A=Object.keys(k||w?r:h);if(k||w)k&&M.add(h),S=[k&&Se(N(h),0,1),ke({safe:k,filter:1,pure:!k,fn:function(e,r,n){var t=String(k?n.a:h(e));br(r,U(A,t)?t:'__',e,n)}})];else if(x){var j=je({});j.type='shape';var O,z=[];e(h,(function(e,r){if(P(e)){O=1,J(z,r),M.add(e);var n=tr(e,[],[Se(j),xe((function(e,n,t){return t.a[r]=e}))]);if(V(e)){j.current[r]=e.getState();var t=N(e);ze(j,{from:t,field:r,type:'field'}),d('splitMatchStore',t,n)}}})),O&&d('splitBase',j),S=[O&&Se(j,0,1),Me((function(e,r,n){for(var t=0;t<A.length;t++){var a=A[t];if(U(z,a)?n.a[a]:h[a](e))return void br(r,a,e,n)}br(r,'__',e,n)}),1)]}else n(0,'expect match to be unit, function or object');var C=a({meta:{op:i},parent:t?[]:m,scope:r,node:S,family:{owners:Array.from(M)},regional:1});if(t&&hr(i,t,m,null,C,null,i,g,0,0,0),!b)return r},exports.step=Ae,exports.version="23.1.0",exports.withFactory=function(e){var r=e.sid,n=e.name,i=e.loc,o=e.method,u=e.fn;return t(a({meta:{sidRoot:ae(r),sid:r,name:n,loc:i,method:o,type:'factory'}}),u)},exports.withRegion=t;
'use strict';function e(e,r){for(var n in e)r(e[n],n)}function r(e,r){e.forEach(r)}function n(e,r,n){if(!e)throw Error((n?n+': ':'')+r)}function t(e,r){var n=j(e).meta||{};re={id:j(e).id,parent:re,value:e,template:n.template||te(),sidRoot:n.sidRoot||re&&re.sidRoot,meta:n};try{return r()}finally{ne('region'),re=R(re)}}function a(e){var n=void 0===e?{}:e,t=n.node,a=void 0===t?[]:t,i=n.parent,o=n.child,u=void 0===o?n.to||n.target:o,s=n.scope,f=void 0===s?{}:s,c=n.meta,d=void 0===c?{}:c,l=n.family,p=void 0===l?{type:'regular'}:l,v=n.regional,m=oe(void 0===i?n.from||n.source:i),h=oe(p.links),g=oe(p.owners),y=[];r(a,(function(e){return e&&J(y,e)}));var b={id:Z(),seq:y,next:oe(u),meta:d,scope:f,family:{type:p.type||"crosslink",links:h,owners:g}};return r(h,(function(e){return J(O(e),b)})),r(g,(function(e){return J(z(e),b)})),r(m,(function(e){return J(e.next,b)})),v&&re&&ie(C(re),[b]),b}function i(e,n,t){var a,i=We,o=null,u=Fe;if(e.target&&(n=e.params,t=e.defer,a=e.meta,i='page'in e?e.page:i,e.stack&&(o=e.stack),u=F(e)||u,e=e.target),u&&Fe&&u!==Fe&&(Fe=null),Array.isArray(e))for(var s=0;s<e.length;s++)_e('pure',i,j(e[s]),o,n[s],u,a);else _e('pure',i,j(e),o,n,u,a);if(!t||Le){var f,c,d,l,p,v,m={isRoot:Le,currentPage:We,scope:Fe,isWatch:Te,isPure:Be};Le=0;for(var h=function(){var e=l.idx,n=l.stack,t=l.type;d=n.node,We=p=n.page,Fe=F(n),p?v=p.reg:Fe&&(v=Fe.reg);var a=!!p,i=!!Fe,o={fail:0,scope:d.scope};f=c=0;for(var u=e;u<d.seq.length&&!f;u++){var s=d.seq[u];if(s.order){var h=s.order,g=h.priority,y=h.barrierID,b=y?p?p.fullID+"_"+y:y:0;if(u!==e||t!==g)return y?Ve.has(b)||(Ve.add(b),Pe(u,n,g,y)):Pe(u,n,g,0),"continue|kernelLoop";y&&Ve.delete(b)}switch(s.type){case'mov':var k=s.data,w=void 0;switch(k.from){case'stack':w=C(n);break;case'a':case'b':w=n[k.from];break;case'value':w=k.store;break;case'store':if(v&&!v[k.store.id])if(a){var x=Ue(p,k.store.id);n.page=p=x,x?v=x.reg:i?(Ke(Fe,k.store,0,1,k.softRead),v=Fe.reg):v=void 0}else i&&Ke(Fe,k.store,0,1,k.softRead);w=Oe(v&&v[k.store.id]||k.store)}switch(k.to){case'stack':n.value=w;break;case'a':case'b':n[k.to]=w;break;case'store':$e(p,Fe,k.target,0).current=w}break;case'compute':var S=s.data;if(S.fn){Te='watch'===d.meta.op,Be=S.pure;var M=S.safe?(0,S.fn)(C(n),o.scope,n):Qe(o,S.fn,n);S.filter?c=!M:n.value=M,Te=m.isWatch,Be=m.isPure}}f=o.fail||c}if(De&&De(n,o),!f){var A=C(n),j=F(n);if(r(d.next,(function(e){_e('child',p,e,n,A,j)})),j){d.meta.needFxCounter&&_e('child',p,j.fxCount,n,A,j),d.meta.storeChange&&_e('child',p,j.storeChange,n,A,j),d.meta.warnSerialize&&_e('child',p,j.warnSerializeNode,n,A,j);var O=j.additionalLinks[d.id];O&&r(O,(function(e){_e('child',p,e,n,A,j)}))}}};l=qe();)h();Le=m.isRoot,We=m.currentPage,Fe=F(m)}}function o(r,n){void 0===n&&(n='combine');var t=n+'(',a='',i=0;return e(r,(function(e){i<25&&(null!=e&&(t+=a,t+=P(e)?_(e).fullName:e.toString()),i+=1,a=', ')})),t+')'}function u(e,r){var n,t,a=e;if(r){var i=_(r);0===e.length?(n=i.path,t=i.fullName):(n=i.path.concat([e]),t=0===i.fullName.length?e:i.fullName+'/'+e)}else n=0===e.length?[]:[e],t=e;return{shortName:a,fullName:t,path:n}}function s(e,r){if(!r)return e;if(!r.name&&!r.named&&!r.loc)return e;var n="["+e+"]",t=r.named||r.name;t&&(n+=" unit '"+t+"'");var a=r.loc;return!t&&a&&(n+=" ("+a.file+":"+a.line+":"+a.column+")"),n}function f(e,r){var n=r?e:e[0];ce(n);var t=n.or,a=n.and;if(a){var i=r?a:a[0];if(ue(i)&&'and'in i){var o=f(a,r);e=o[0],t=Object.assign({},t,o[1])}else e=a}return[e,t]}function c(e){var r=function(){return e()};return r.unsubscribe=function(){return e()},r}function d(e){var r=te();if(r){for(var n=r.handlers[e],t=arguments.length,a=new Array(t>1?t-1:0),i=1;i<t;i++)a[i-1]=arguments[i];if(n)return n.apply(void 0,[r].concat(a))}}function l(e,r,n,t){var a=We,i=null;if(r)for(i=We;i&&i.template!==r;)i=R(i);He(i);var o=e.create(n,t);return He(a),o}function p(e,r){var t=Xe({or:r,and:'string'==typeof e?{name:e}:e}),o=s('event',t),u=function e(r){n(!D(e,'derived'),'call of derived event is not supported, use createEvent instead',o),n(!Be,'unit call from pure function is not supported, use operators like sample instead',o);for(var t=arguments.length,a=new Array(t>1?t-1:0),i=1;i<t;i++)a[i-1]=arguments[i];return We?l(e,f,r,a):e.create(r,a)},f=te(),c=Object.assign(u,{graphite:a({meta:or(t.actualOp||"event",u,t),regional:1}),create:function(e){return i({target:u,params:e,scope:Fe}),e},watch:function(e){return ar(u,e)},map:function(e){return ur(u,"map",e,[Me()])},filter:function(e){return ur(u,'filter',e.fn?e:e.fn,[Me(he,1)])},filterMap:function(e){return ur(u,'filterMap',e,[Me(),xe((function(e){return!fe(e)}),1)])},prepend:function(e){n(u.targetable,'.prepend of derived event is not supported, call source event instead',o);var r=p('* \u2192 '+u.shortName,{parent:R(u)});return d('eventPrepend',j(r)),tr(r,u,[Me()],'prepend',e),ir(u,r),r}});return null!=t&&t.domain&&t.domain.hooks.event(c),q(c,'id',c.graphite.id),ne(c.graphite),c}function v(e,t,a,i,o){return le(a,o+" "+t,'first argument'),n(se(i),'second argument should be a function',o),K(!D(e,'derived'),t+" in derived store",t+" in store created via createStore",o),r(Array.isArray(a)?a:[a],(function(r){e.off(r),I(e).set(r,nr(fr(r,e,'on',me,i)))})),e}function m(e,t){var o=Xe(t),u=je(e),f=s('store',o),c=p({named:'updates',derived:1});d('storeBase',u);var l=u.id,h='skipVoid'in o,g=h&&!o.skipVoid;K(!(h&&o.skipVoid),'{skipVoid: true}','updateFilter',f);var y={subscribers:new Map,updates:c,defaultState:e,stateRef:u,getState:function(){var e,r=u;if(We){for(var n=We;n&&!n.reg[l];)n=R(n);n&&(e=n)}return!e&&Fe&&(Ke(Fe,u,1),e=Fe),e&&(r=e.reg[l]),Oe(r)},setState:function(e){return i({target:y,params:e,defer:1,scope:Fe})},reset:function(){n(y.targetable,'.reset of derived store is not supported',f);for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];return r(t,(function(e){return v(y,'.reset',e,(function(){return y.defaultState}),f)})),y},on:function(e,r){return n(y.targetable,'.on of derived store is not supported',f),v(y,'.on',e,r,f)},off:function(e){var r=I(y).get(e);return r&&(r(),I(y).delete(e)),y},map:function(e,r){var n,t;ue(e)&&(n=e,e=e.fn);var a=y.getState(),i=fe(a);te()?t=null:(!i||i&&g)&&(t=e(a));var o=m(t,Object.assign({name:y.shortName+" \u2192 *",derived:1},r,{and:n})),s=fr(y,o,"map",he,e);return ze(N(o),{type:"map",fn:e,from:u}),N(o).noInit=1,d('storeMap',u,s),o},watch:function(e,r){if(K(!r,'watch second argument','sample',f),!r||!P(e)){var t=ar(y,e);return d('storeWatch',u,e)||e(y.getState()),t}return n(se(r),'second argument should be a function',f),e.watch((function(e){return r(y.getState(),e)}))}},b=or("store",y,o),k=y.defaultConfig.updateFilter;y.graphite=a({scope:{state:u,fn:k},node:[xe((function(e,r,n){return n.scope&&!n.scope.reg[u.id]&&(n.b=1),e})),Se(u),xe((function(e,r,n){var t=n.a,a=n.b,i=fe(e);return i&&!h&&console.error(f+": "+sr),(i&&g||!i)&&(e!==t||a)}),1),k&&Me(ve,1),be({from:"stack",target:u})],child:c,meta:Object.assign({},b,{defaultState:e}),regional:1}),q(y,'id',y.graphite.id),q(y,'rootStateRefId',l);var w=D(y,'serialize'),x=D(y,'derived'),S='ignore'===w,M=D(y,'sid');M&&(q(y,'storeChange',1),u.sid=M),M||S||x||q(y,'warnSerialize',1);var A=fe(e);return n(x||!A||A&&g,sr,f),x&&A&&!h&&console.error(f+": "+sr),ie(y,[c]),null!=o&&o.domain&&o.domain.hooks.store(y),x||(y.reinit=p({named:'reinit'}),y.reset(y.reinit)),u.meta=y.graphite.meta,ne(y.graphite),y}function h(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];var a,i,o,u=f(r);r=u[0];var c,d,l,p=s('combine',o=u[1]),v=r[r.length-1],m=!V(v)&&ue(v),h=m&&v,g=m?r[r.length-2]:v;if(se(g)?(i=r.slice(0,m?-2:-1),a=g):i=r,1===i.length){var y=i[0];V(y)||(c=y,d=1)}if(!d&&(c=i,a)){l=1;var b=a;a=function(e){return b.apply(void 0,e)}}return n(ue(c),p+": shape should be an object"),cr(Array.isArray(c),!l,c,o,a,h)}function g(){var e={};return e.req=new Promise((function(r,n){e.rs=r,e.rj=n})),e.req.catch((function(){})),e}function y(e,r){void 0===r&&(r={});var t=Xe(se(e)?{handler:e}:e,r),o=s('effect',t),u=p(se(e)?{handler:e}:e,Object.assign({},r,{actualOp:"effect"})),f=j(u);q(f,'op',u.kind="effect"),u.use=function(e){return n(se(e),'.use argument should be a function',o),y.scope.handler=e,u},u.use.getCurrent=function(){return y.scope.handler};var c=u.finally=p({named:'finally',derived:1}),d=u.done=c.filterMap({named:'done',fn:function(e){if('done'===e.status)return{params:e.params,result:e.result}}}),l=u.fail=c.filterMap({named:'fail',fn:function(e){if('fail'===e.status)return{params:e.params,error:e.error}}}),v=u.doneData=d.map({named:'doneData',fn:function(e){return e.result}}),h=u.failData=l.map({named:'failData',fn:function(e){return e.error}}),y=a({scope:{handler:u.defaultConfig.handler||function(){return n(0,"no handler used in "+u.compositeName.fullName)}},node:[xe((function(e,r,n){var t=r.handler,a=F(n);if(a){var i=a.handlers.unitMap.get(u)||a.handlers.sidMap[u.sid];i&&(t=i)}return e.handler=t,e}),0,1),xe((function(e,r,n){if(!r.runnerFn||r.runnerFn(e,null,n)){var t=e.params,a=e.req,i=e.handler,o=e.args,u=void 0===o?[t]:o,s=lr(t,a,1,c,n),f=lr(t,a,0,c,n),d=dr(i,f,u),l=d[1];d[0]&&(ue(l)&&se(l.then)?l.then(s,f):s(l))}}),0,1)],meta:{op:'fx',fx:'runner'}});f.scope.runner=y,J(f.seq,xe((function(e,r,n){var t=r.runner,a=R(n)?{params:e,req:{rs:function(){},rj:function(){}}}:e;return n.meta||(n.meta={fxID:ee()}),i({target:t,params:a,defer:1,scope:F(n),meta:n.meta}),a.params}))),u.create=function(e){var r=g(),n={params:e,req:r};if(Fe&&!Te){var t=Fe;r.req.finally((function(){Ge(t)})).catch((function(){}))}return i({target:u,params:n,scope:Fe}),r.req};var b=u.inFlight=m(0,{serialize:'ignore',named:(D(u,'name')||u.graphite.id)+'.inFlight'}).on(u,(function(e){return e+1})).on(c,(function(e){return e-1})).map({fn:function(e){return e},named:'inFlight'});q(c,'needFxCounter','dec'),q(u,'needFxCounter',1);var k=u.pending=b.map({fn:function(e){return e>0},named:'pending'});return ie(u,[c,d,l,v,h,k,b]),null!=t&&t.domain&&t.domain.hooks.effect(u),u}function b(e,r){var n=s('merge',r);le(e,n,'first argument');var t=p({name:o(e,'merge'),derived:1,and:r});return tr(e,t,[],'merge'),t}function k(e,t){var a=0;return r(vr,(function(r){r in e&&(n(null!=e[r],mr(t,r)),a=1)})),a}function w(e,n,t){var a=[];(function e(i){U(a,i)||(J(a,i),"store"===D(i,'op')&&(t||D(i,'sid'))&&n(i,D(i,'sid')),r(i.next,e),r(O(i),e),r(z(i),e))})(e)}function x(e,t){var a=Array.isArray(e)?new Map(e):e,i=new Map,o=0;if(a instanceof Map){var u={};return r(a,(function(e,r){n(P(r),'Map key should be a unit'),t&&t(r,e),r.sid&&(r.sid in u&&(o=1),u[r.sid]=e),i.set(r,e)})),{sidMap:u,unitMap:i,hasSidDoubles:o}}return{sidMap:a,unitMap:i}}function S(e,r){return V(r)?[Ae.mov({store:r.stateRef,to:'stack'})].concat(e):e}Object.defineProperty(exports,'__esModule',{value:1});for(var M,A='undefined'!=typeof Symbol&&Symbol.observable||'@@observable',j=function(e){return e.graphite||e},O=function(e){return e.family.owners},z=function(e){return e.family.links},N=function(e){return e.stateRef},C=function(e){return e.value},I=function(e){return e.subscribers},R=function(e){return e.parent},F=function(e){return e.scope},D=function(e,r){return j(e).meta[r]},q=function(e,r,n){return j(e).meta[r]=n},_=function(e){return e.compositeName},P=function(e){return(se(e)||ue(e))&&'kind'in e},E=function(e){return function(r){return P(r)&&r.kind===e}},V=E("store"),L=E("event"),T=E("effect"),B=function(e){return P(e)&&!!e.targetable},W=E("domain"),G=E("scope"),H={__proto__:null,unit:P,store:V,event:L,effect:T,targetable:B,domain:W,scope:G,attached:function(e){return T(e)&&1==D(e,'attached')}},U=function(e,r){return e.includes(r)},$=function(e,r){var n=e.indexOf(r);-1!==n&&e.splice(n,1)},J=function(e,r){return e.push(r)},K=function(e,r,n,t){return!e&&console.error((t?t+': ':'')+r+" is deprecated"+(n?", use "+n+" instead":''))},Q=function(){var e=0;return function(){return""+ ++e}},X=Q(),Y=Q(),Z=Q(),ee=Q(),re=null,ne=function(e){M&&M(e,re)},te=function(){return re&&re.template},ae=function(e){return e&&re&&re.sidRoot&&(e=re.sidRoot+"|"+e),e},ie=function(e,n){var t=j(e);r(n,(function(e){var r=j(e);"domain"!==t.family.type&&(r.family.type="crosslink"),J(O(r),t),J(z(t),r)}))},oe=function(e){return void 0===e&&(e=[]),(Array.isArray(e)?e:[e]).flat().map(j)},ue=function(e){return'object'==typeof e&&null!==e},se=function(e){return'function'==typeof e},fe=function(e){return void 0===e},ce=function(e){return n(ue(e)||se(e),'expect first argument be an object')},de=function(e,r,t,a){return n(!(!ue(e)&&!se(e)||!('family'in e)&&!('graphite'in e)),r+": expect "+t+" to be a unit (store, event or effect)"+a)},le=function(e,n,t){Array.isArray(e)?r(e,(function(e,r){return de(e,n,r+" item of "+t,'')})):de(e,n,t,' or array of units')},pe=function(e,t,a){return void 0===a&&(a='target'),r(oe(t),(function(r){return n(!D(r,'derived'),e+": derived unit in \""+a+"\" is not supported, use createStore/createEvent instead\"")}))},ve=function(e,r,n){return(0,r.fn)(e,n.a)},me=function(e,r,n){return(0,r.fn)(n.a,e)},he=function(e,r){return(0,r.fn)(e)},ge=function(e,r,n,t){var a={id:Y(),type:e,data:r};return n&&(a.order={priority:n},t&&(a.order.barrierID=++ye)),a},ye=0,be=function(e){var r=e.from,n=e.target,t=e.to;return ge('mov',{from:void 0===r?"store":r,store:e.store,to:void 0===t?n?"store":"stack":t,target:n},e.priority,e.batch)},ke=function(e){var r=e.safe,n=e.filter,t=e.pure;return ge('compute',{fn:e.fn,safe:void 0===r?0:r,filter:void 0===n?0:n,pure:void 0===t?0:t},e.priority,e.batch)},we=function(e){return ke({fn:e.fn,priority:"effect"})},xe=function(e,r,n){return ke({fn:e,safe:1,filter:r,priority:n&&"effect"})},Se=function(e,r,n){return be({store:e,to:r?"stack":"a",priority:n&&"sampler",batch:1})},Me=function(e,r){return void 0===e&&(e=he),ke({fn:e,pure:1,filter:r})},Ae={mov:be,compute:ke,filter:function(e){return ke({fn:e.fn,filter:1,pure:e.pure})},run:we},je=function(e){return{id:Y(),current:e,initial:e}},Oe=function(e){return e.current},ze=function(e,r){e.before||(e.before=[]),J(e.before,r)},Ne=null,Ce=function e(r,n){return r?n?((r.v.type===n.v.type&&r.v.id>n.v.id||Ee(r.v.type)>Ee(n.v.type))&&(t=r,r=n,n=t),t=e(r.r,n),r.r=r.l,r.l=t,r):r:n;var t},Ie=[],Re=0;Re<6;)J(Ie,{first:null,last:null,size:0}),Re+=1;var Fe,De,qe=function(){for(var e=0;e<6;e++){var r=Ie[e];if(r.size>0){if(3===e||4===e){r.size-=1;var n=Ne.v;return Ne=Ce(Ne.l,Ne.r),n}1===r.size&&(r.last=null);var t=r.first;return r.first=t.r,r.size-=1,t.v}}},_e=function(e,r,n,t,a,i,o){return Pe(0,{a:null,b:null,node:n,parent:t,value:a,page:r,scope:i,meta:o},e,0)},Pe=function(e,r,n,t){var a=Ee(n),i=Ie[a],o={v:{idx:e,stack:r,type:n,id:t},l:null,r:null};3===a||4===a?Ne=Ce(Ne,o):(0===i.size?i.first=o:i.last.r=o,i.last=o),i.size+=1},Ee=function(e){switch(e){case'child':return 0;case'pure':return 1;case'read':return 2;case'barrier':return 3;case'sampler':return 4;case'effect':return 5;default:return-1}},Ve=new Set,Le=1,Te=0,Be=0,We=null,Ge=function(e){Fe=e},He=function(e){We=e},Ue=function(e,r){if(e){for(;e&&!e.reg[r];)e=e.parent;if(e)return e}return null},$e=function(e,r,n,t){var a=Ue(e,n.id);return a?a.reg[n.id]:r?(Ke(r,n,t),r.reg[n.id]):n},Je=function(e){return e},Ke=function e(n,t,a,i,o){var u=n.reg;if(!u[t.id]){var s=t.sid,f={id:t.id,current:t.initial,meta:t.meta};if(f.id in n.values.idMap)f.current=n.values.idMap[f.id];else if(s&&s in n.values.sidMap&&!(s in n.sidIdMap)){var c,d=null==t||null===(c=t.meta)||void 0===c?void 0:c.serialize;f.current=(n.fromSerialize&&'ignore'!==d&&(null==d?void 0:d.read)||Je)(n.values.sidMap[s])}else if(t.before&&!o){var l=0,p=a||!t.noInit||i;r(t.before,(function(r){switch(r.type){case'map':var t=r.from;if((t||r.fn)&&(t&&e(n,t,a,i),p)){var o=t&&u[t.id].current;f.current=r.fn?r.fn(o):o}break;case'field':e(n,r.from,a,i),l||(l=1,f.current=Array.isArray(f.current)?[].concat(f.current):Object.assign({},f.current)),p&&(f.current[r.field]=u[u[r.from.id].id].current)}}))}s&&(n.sidIdMap[s]=t.id),u[t.id]=f}},Qe=function(e,r,n){try{return r(C(n),e.scope,n)}catch(t){console.error(t),e.fail=1,e.failReason=t}},Xe=function r(n,t){return void 0===t&&(t={}),ue(n)&&(r(n.or,t),e(n,(function(e,r){fe(e)||'or'===r||'and'===r||(t[r]=e)})),r(n.and,t)),t},Ye=function(e,r){$(e.next,r),$(O(e),r),$(z(e),r)},Ze=function e(r,n,t){var a;r.next.length=0,r.seq.length=0,r.scope=null;for(var i=z(r);a=i.pop();)Ye(a,r),(n||t&&'sample'!==r.meta.op||"crosslink"===a.family.type)&&e(a,n,'on'!==a.meta.op&&t);for(i=O(r);a=i.pop();)Ye(a,r),t&&"crosslink"===a.family.type&&e(a,n,'on'!==a.meta.op&&t)},er=function(e){return e.clear()},rr=function(e,r){var n=(void 0===r?{}:r).deep,t=0;if(e.ownerSet&&e.ownerSet.delete(e),V(e))er(I(e));else if(W(e)){t=1;var a=e.history;er(a.events),er(a.effects),er(a.stores),er(a.domains)}Ze(j(e),!!n,t)},nr=function(e){return c((function(){return rr(e)}))},tr=function(e,r,n,t,i){return a({node:n,parent:e,child:r,scope:{fn:i},meta:{op:t},family:{owners:[e,r],links:r},regional:1})},ar=function(e,r){return n(se(r),'.watch argument should be a function'),nr(a({scope:{fn:r},node:[we({fn:he})],parent:e,meta:{op:'watch'},family:{owners:e},regional:1}))},ir=function(e,r,n){void 0===n&&(n="event"),R(e)&&R(e).hooks[n](r)},or=function(e,r,n){var t=Xe(n),a="domain"===e,i=X(),o=t.sid,s=void 0===o?null:o,f=t.named,c=void 0===f?null:f,d=t.domain,l=t.parent,p=void 0===l?void 0===d?null:d:l,v=c||t.name||(a?'':i),m=u(v,p),h={op:r.kind=e,name:r.shortName=v,sid:r.sid=ae(s),named:c,unitId:r.id=i,serialize:t.serialize,derived:t.derived,config:t};if(r.targetable=!t.derived,r.parent=p,r.compositeName=m,r.defaultConfig=t,r.getType=function(){return K(0,'getType','compositeName.fullName'),m.fullName},!a){r.subscribe=function(e){return ce(e),r.watch(se(e)?e:function(r){return e.next&&e.next(r)})},r[A]=function(){return r};var g=te();g&&(h.nativeTemplate=g)}return h},ur=function(e,r,n,t){var a;ue(n)&&(a=n,n=n.fn);var i=p({name:e.shortName+" \u2192 *",derived:1,and:a});return tr(e,i,t,r,n),i},sr='undefined is used to skip updates. To allow undefined as a value provide explicit { skipVoid: false } option',fr=function(e,r,n,t,a){var i=N(r),o=be({store:i,to:"a",priority:'read'});"map"===n&&(o.data.softRead=1);var u=[o,Me(t)];return d('storeOnMap',i,u,V(e)&&N(e)),tr(e,r,u,n,a)},cr=function(r,t,a,i,u,f){var c=s('combine',i),l=r?function(e){return[].concat(e)}:function(e){return Object.assign({},e)},p=r?[]:{},v=l(p),h=je(v),g=je(1);h.type=r?'list':'shape',h.noInit=1,d('combineBase',h,g);var y=m(v,Object.assign({name:o(a),derived:1},f,{and:i})),b=N(y);b.noInit=1,q(y,'isCombine',1);var k=Se(h);k.order={priority:'barrier'};var w=be({store:b,to:'b',priority:'read'});w.data.softRead=1;var x=[xe((function(e,r,n){return n.scope&&!n.scope.reg[h.id]&&(n.c=1),e})),k,be({store:g,to:'b'}),xe((function(e,r,n){var a=r.key;if(n.c||e!==n.a[a])return t&&n.b&&(n.a=l(n.a)),n.a[a]=e,1}),1),be({from:"a",target:h}),be({from:"value",store:0,target:g}),be({from:"value",store:1,target:g,priority:'barrier',batch:1}),Se(h,1,1),u&&Me(),w];if(e(a,(function(e,r){if(!V(e))return n(!P(e)&&!fe(e),"combine expects a store in a field "+r,c),void(v[r]=p[r]=e);p[r]=e.defaultState,v[r]=e.getState();var t=tr(e,y,x,'combine',u);t.scope.key=r;var a=N(e);ze(h,{type:'field',field:r,from:a}),d('combineField',a,t)})),y.defaultShape=a,ze(b,{type:"map",from:h,fn:u}),!te())if(u){var S=u(v);!fe(S)||f&&'skipVoid'in f||console.error(c+": "+sr),b.current=S,b.initial=S,y.defaultState=S}else y.defaultState=p;return y},dr=function(e,r,n){try{return[1,e.apply(void 0,n)]}catch(t){return r(t),[0,null]}},lr=function(e,r,n,t,a){return function(o){i({target:[t,pr],params:[n?{status:'done',params:e,result:o}:{status:'fail',params:e,error:o},{value:o,fn:n?r.rs:r.rj}],defer:1,page:a.page,scope:a.scope,meta:a.meta})}},pr=a({node:[we({fn:function(e){return(0,e.fn)(e.value)}})],meta:{op:'fx',fx:'sidechain'}}),vr=['source','clock','target'],mr=function(e,r){return e+": "+r+" should be defined"},hr=function(e,r,t,a,i,o,u,f,c,l,v,g){var y=s(e,f),k=!!i;n(!fe(t)||!fe(r),mr(y,'either source or clock'));var w=0;fe(t)?w=1:P(t)||(t=h(t)),fe(r)?r=t:(le(r,y,'clock'),Array.isArray(r)&&(r=b(r))),w&&(t=r),f||u||(u=t.shortName);var x='none';(v||a)&&(P(a)?x='unit':(n(se(a),'`filter` should be function or unit'),x='fn')),i?(le(i,y,'target'),pe(y,i)):'none'===x&&l&&V(t)&&V(r)?i=m(o?o(Oe(N(t)),Oe(N(r))):Oe(N(t)),{name:u,sid:g,or:f}):(i=p({name:u,derived:1,or:f}),d('sampleTarget',j(i)));var S=je(),M=[];if('unit'===x){var A=yr(a,i,r,S,e),O=A[0];A[2]||M.push.apply(M,gr(A[1])),M.push.apply(M,gr(O))}var z=[];if(w)c&&z.push(Se(S,1,1));else{var C=yr(t,i,r,S,e),I=C[0];C[2]||z.push.apply(z,gr(C[1])),z.push(Se(I,1,c))}var R=tr(r,i,[d('sampleSourceLoader'),be({from:"stack",target:S})].concat(z,M,[Se(S),'fn'===x&&Me((function(e,r,n){return a(e,n.a)}),1),o&&Me(ve),d('sampleSourceUpward',k)]),e,o);return ie(t,[R]),Object.assign(R.meta,f,{joint:1}),i},gr=function(e){return[Se(e),xe((function(e,r,n){return n.a}),1)]},yr=function(e,r,n,t,i){var o=V(e),u=o?N(e):je(),s=je(o);return o||a({parent:e,node:[be({from:"stack",target:u}),be({from:"value",store:1,target:s})],family:{owners:[e,r,n],links:r},meta:{op:i},regional:1}),d('sampleSource',s,u,t),[u,s,o]},br=function(e,r,n,t){var a=e[r];a&&i({target:a,params:Array.isArray(a)?a.map((function(){return n})):n,defer:1,stack:t})},kr=function(e){return!e.node.meta.isCombine||e.parent&&'combine'!==e.parent.node.meta.op},wr=function(e){return e};exports.allSettled=function(e,r){var n=void 0===r?{}:r,t=n.scope,a=n.params;if(!P(e))return Promise.reject(new Error('first argument should be unit'));if(!(T(e)||L(e)||V(e)||G(e)))return Promise.reject(new Error('first argument accepts only effects, events, stores or scopes'));if(G(e))t=e;else if(!B(e)){var o=s('allSettled',j(e).meta);return Promise.reject(Error(o+": unit should be targetable"))}var u=g();u.parentFork=Fe;var f=t.fxCount;J(f.scope.defers,u);var c=[],d=[];return G(e)||(J(c,e),J(d,T(e)?{params:a,req:{rs:function(e){u.value={status:'done',value:e}},rj:function(e){u.value={status:'fail',value:e}}}}:a)),J(c,f),J(d,null),i({target:c,params:d,scope:t}),u.req},exports.attach=function(e){var r,t,a=f(e,1);e=a[0];var o=s('attach',t=a[1]),c=e.source,d=e.effect,l=e.mapParams,p=e.domain;T(d)&&n(fe(p),'`domain` can only be used with a plain function',o);var v=y(e,t);q(v,'attached',1);var m,g,b=j(v).scope.runner,k=function(e,r,n){var t,a=e.params,o=e.req,u=e.handler,s=v.finally,f=lr(a,o,0,s,n),d=n.a,p=T(u),m=1;if(l){var h=dr(l,f,[a,d]);m=h[0],t=h[1]}else t=c&&p?d:a;if(m){if(!p)return e.args=[d,t],1;i({target:u,params:{params:t,req:{rs:lr(a,o,1,s,n),rj:f}},page:n.page,defer:1,meta:n.meta})}};c?(b.scope.runnerFn=k,V(c)?ie(g=c,[v]):(g=h(c),ie(v,[g])),m=[xe((function(e){return e}),0,1),Se(N(g))],delete b.seq[1].order):m=[xe(k,1,1)],(r=b.seq).splice.apply(r,[1,0].concat(m)),v.use(d);var w=R(d);return w&&(Object.assign(_(v),u(v.shortName,w)),v.defaultConfig.parent=w),ir(d,v,"effect"),v},exports.clearNode=rr,exports.combine=h,exports.createApi=function(){for(var r=arguments.length,n=new Array(r),t=0;t<r;t++)n[t]=arguments[t];var a=f(n),i=a[0],o=i[0],u=i[1],s=a[1],c={};return e(u,(function(e,r){var n=c[r]=p(r,{parent:R(o),config:s});o.on(n,e),ir(o,n)})),c},exports.createDomain=function n(t,o){var u=Xe({or:o,and:'string'==typeof t?{name:t}:t}),s=a({family:{type:"domain"},regional:1,parent:(null==u?void 0:u.domain)||(null==u?void 0:u.parent)}),f={history:{},graphite:s,hooks:{}};s.meta=or("domain",f,{parent:(null==u?void 0:u.domain)||(null==u?void 0:u.parent),or:Object.assign({},u,{derived:1})}),e({Event:p,Effect:y,Store:m,Domain:n},(function(e,n){var t=n.toLowerCase(),a=p({named:"on"+n});f.hooks[t]=a;var o=new Set;f.history[t+"s"]=o,a.create=function(e){return i(a,e),e},J(j(a).seq,xe((function(e,r,n){return n.scope=null,e}))),a.watch((function(e){ie(f,[e]),o.add(e),e.ownerSet||(e.ownerSet=o),R(e)||(e.parent=f)})),ie(f,[a]),f["onCreate"+n]=function(e){return r(o,e),a.watch(e)},f["create"+n]=f[t]=function(r,n){var t=Xe({and:n,or:r});return null!=t&&t.domain?e(r,n):a(e(r,{parent:f,or:t}))}}));var c=R(f);return c&&e(f.hooks,(function(e,r){return tr(e,c.hooks[r])})),null!=u&&u.domain&&u.domain.hooks.domain(f),f},exports.createEffect=y,exports.createEvent=p,exports.createNode=a,exports.createStore=m,exports.createWatch=function(e){var r=e.unit,n=e.fn,t=e.scope,i=e.batch,o=[Ae.run({fn:function(e){return n(e)}})];i&&o.unshift(Ae.compute({priority:'sampler',batch:1})),V(r)&&o.unshift(Ae.mov({store:r.stateRef,to:'stack'}));var u=Array.isArray(r)?r:[r];if(t){var s=[],f=t.additionalLinks;return u.forEach((function(e){var r=f[e.graphite.id]||[];f[e.graphite.id]=r;var n=a({node:S(o,e),meta:{watchOp:e.kind}});r.push(n),s.push((function(){var e=r.indexOf(n);-1!==e&&r.splice(e,1),rr(n)}))})),c((function(){s.forEach((function(e){return e()}))}))}var d=a({node:o,parent:u,family:{owners:u}});return c((function(){rr(d)}))},exports.fork=function(e,t){var i,o=e;W(e)&&(K(0,'fork(domain)','fork()'),i=e,o=t);var u=function(e){var n=a({scope:{defers:[],inFlight:0,fxID:0},node:[xe((function(e,r,n){n.parent?'dec'===n.parent.node.meta.needFxCounter?r.inFlight-=1:(r.inFlight+=1,r.fxID+=1):r.fxID+=1})),ke({priority:"sampler",batch:1}),xe((function(e,n){var t=n.defers,a=n.fxID;n.inFlight>0||0===t.length||Promise.resolve().then((function(){n.fxID===a&&r(t.splice(0,t.length),(function(e){Ge(e.parentFork),e.rs(e.value)}))}))}),0,1)]}),t=a({node:[xe((function(e,r,n){var t=n.parent;if(t){var a=t.node;if(kr(t)){var i=F(n),o=a.meta.sid;i.sidIdMap[o]=a.scope.state.id,i.values.sidMap[o]=e;var u=a.meta.serialize;u&&i.sidSerializeSettings.set(o,'ignore'===u?{ignore:1}:{ignore:0,write:u.write})}}}))]}),i=a({node:[xe((function(e,r,n){var t=F(n);t&&n.parent&&kr(n.parent)&&(t.warnSerialize=1)}))]}),o={cloneOf:e,reg:{},values:{sidMap:{},idMap:{}},sidIdMap:{},sidSerializeSettings:new Map,getState:function(e){if('current'in e)return $e(We,o,e,0).current;var r=j(e);return $e(We,o,r.scope.state,1).current},kind:"scope",graphite:a({family:{type:"domain",links:[n,t,i]},meta:{unit:'fork'},scope:{forkInFlightCounter:n}}),additionalLinks:{},handlers:{sidMap:{},unitMap:new Map},fxCount:n,storeChange:t,warnSerializeNode:i};return o}(i);if(o){if(o.values){var s=x(o.values,(function(e){return n(V(e)&&B(e),'Values map can contain only writable stores as keys')})),f=s.unitMap,c=s.hasSidDoubles;Object.assign(u.values.sidMap,s.sidMap),r(f,(function(e,r){if(u.values.idMap[r.stateRef.id]=e,u.sidIdMap[D(r,'sid')]=r.stateRef.id,'ignore'===D(r,'serialize')){var n=D(r,'sid');u.sidSerializeSettings.set(n,{ignore:1})}})),u.fromSerialize=!(Array.isArray(o.values)||o.values instanceof Map),u.hasSidDoubles=c}o.handlers&&(K(o.handlers instanceof Map||Array.isArray(o.handlers),'object with handlers','array'),u.handlers=x(o.handlers,(function(e){return n(T(e),"Handlers map can contain only effects as keys")})))}return u},exports.forward=function(e){var r='forward',n=f(e,1),t=n[0],i=t.from,o=t.to,u=n[1],c=s(r,u);return K(0,r,'sample',c),le(i,c,'"from"'),le(o,c,'"to"'),pe(c,o,'to'),nr(a({parent:i,child:o,meta:{op:r,config:u},family:{},regional:1}))},exports.fromObservable=function(e){ce(e);var r=A in e?e[A]():e;n(r.subscribe,'expect observable to have .subscribe');var t=p(),a=nr(t);return r.subscribe({next:t,error:a,complete:a}),t},exports.guard=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];var t=f(r),a=t[0],i=a[0],o=a[1],u=t[1],c=s('guard',u);return K(0,'guard','sample',c),o||(i=(o=i).source),k(o,c),hr('guard',o.clock,i,o.filter,o.target,null,o.name,u,!o.greedy,0,1)},exports.hydrate=function(e,t){var a=t.values;n(ue(a),'values property should be an object');var o=x(a),u=o.sidMap,s=o.unitMap,f=Object.getOwnPropertyNames(u),c={};r(s,(function(e,r){c[r.stateRef.id]=r}));var d,l,p,v=[],m=[];G(e)?(p=1,n((d=e).cloneOf,'scope should be created from domain'),K(0,'hydrate(fork(domain), { values })','fork({ values })'),l=j(d.cloneOf)):W(e)?(K(0,'hydrate(domain, { values })','fork({ values })'),l=j(e)):n(0,'first argument of hydrate should be domain or scope'),w(l,(function(e,r){if(r&&U(f,r)){J(v,e);var n=D(e,'serialize');n&&'ignore'!==n&&(u[r]=n.read(u[r])),J(m,u[r])}else e.scope.state.id in c&&(J(v,e),J(m,s.get(c[e.scope.state.id])))}),1),i({target:v,params:m,scope:d}),p&&Object.assign(d.values.sidMap,u)},exports.is=H,exports.launch=i,exports.merge=b,exports.restore=function(r,t,a){var i=s('restore',a);if(n(!V(r),'restore($store) is not supported',i),L(r)||T(r)){var o=R(r),u=m(t,{parent:o,name:r.shortName,and:a});return tr(T(r)?r.doneData:r,u),o&&o.hooks.store(u),u}var f=Array.isArray(r)?[]:{};return e(r,(function(e,r){return f[r]=V(e)?e:m(e,{name:r})})),f},exports.sample=function(){for(var e,r,n=arguments.length,t=new Array(n),a=0;a<n;a++)t[a]=arguments[a];var i,o,u=f(t),c=u[0],d=c[0],l=c[1],p=c[2],v=u[1],m=1,h=s('sample',v);return fe(l)&&ue(d)&&k(d,h)&&(l=d.clock,p=d.fn,'batch'in d?m=d.batch:(K(!('greedy'in d),'greedy in sample','batch',h),m=!d.greedy),o=d.filter,e=d.target,r=d.name,i=d.sid,d=d.source),hr('sample',l,d,o,e,p,r,v,m,1,0,i)},exports.scopeBind=function(e,r){var t=void 0===r?{}:r,a=t.scope;n(a||Fe||t.safe,'scopeBind: scope not found');var i=a||Fe;return function(r){function n(){Ge(o)}var t,a=0,o=Fe;Ge(i);try{t=e(r)}catch(u){t=u,a=1}if(n(),a)throw t;return t instanceof Promise&&t.then(n,n),t}},exports.serialize=function(r,t){void 0===t&&(t={}),r.warnSerialize&&console.error('There is a store without sid in this scope, its value is omitted'),n(!r.hasSidDoubles,'duplicate sid found in this scope');var a=t.ignore?t.ignore.map((function(e){return e.sid})):[],i={};return e(r.values.sidMap,(function(e,n){var t;if(!U(a,n)){var o=r.sidIdMap[n],u=null!==(t=r.sidSerializeSettings.get(n))&&void 0!==t?t:{ignore:0,write:wr};u.ignore||(i[n]=(0,u.write)(o&&o in r.reg?r.reg[o].current:e))}})),'onlyChanges'in t&&(K(0,'onlyChanges'),t.onlyChanges||(n(r.cloneOf,'scope should be created from domain'),w(j(r.cloneOf),(function(e,n){n in i||U(a,n)||D(e,'isCombine')||'ignore'===D(e,'serialize')||(i[n]=r.getState(e))})))),i},exports.setGraphInspector=function(e){M=e},exports.setInspector=function(e){De=e},exports.setStoreName=function(e,r){e.shortName=r,Object.assign(_(e),u(r,R(e)))},exports.split=function(){for(var r,t,i='split',o=arguments.length,u=new Array(o),c=0;c<o;c++)u[c]=arguments[c];var l=f(u),v=l[0],m=v[0],h=v[1],g=l[1],y=s(i,g),b=!h;b&&(r=m.cases,h=m.match,t=m.clock,m=m.source);var k=V(h),w=!P(h)&&se(h),x=!k&&!w&&ue(h);n(P(m),'source must be a unit',y),r||(r={}),b?e(r,(function(e,r){return pe(y,e,"cases."+r)})):(n(x,'match should be an object',y),e(h,(function(e,n){return r[n]=p({derived:1,named:"cases."+n,and:g})})),r.__=p({derived:1,named:'cases.__',and:g}));var S,M=new Set([].concat(m,t||[],Object.values(r))),A=Object.keys(k||w?r:h);if(k||w)k&&M.add(h),S=[k&&Se(N(h),0,1),ke({safe:k,filter:1,pure:!k,fn:function(e,r,n){var t=String(k?n.a:h(e));br(r,U(A,t)?t:'__',e,n)}})];else if(x){var j=je({});j.type='shape';var O,z=[];e(h,(function(e,r){if(P(e)){O=1,J(z,r),M.add(e);var n=tr(e,[],[Se(j),xe((function(e,n,t){return t.a[r]=e}))]);if(V(e)){j.current[r]=e.getState();var t=N(e);ze(j,{from:t,field:r,type:'field'}),d('splitMatchStore',t,n)}}})),O&&d('splitBase',j),S=[O&&Se(j,0,1),Me((function(e,r,n){for(var t=0;t<A.length;t++){var a=A[t];if(U(z,a)?n.a[a]:h[a](e))return void br(r,a,e,n)}br(r,'__',e,n)}),1)]}else n(0,'expect match to be unit, function or object');var C=a({meta:{op:i},parent:t?[]:m,scope:r,node:S,family:{owners:Array.from(M)},regional:1});if(t&&hr(i,t,m,null,C,null,i,g,0,0,0),!b)return r},exports.step=Ae,exports.version="23.2.0",exports.withFactory=function(e){var r=e.sid,n=e.name,i=e.loc,o=e.method,u=e.fn;return t(a({meta:{sidRoot:ae(r),sid:r,name:n,loc:i,method:o,type:'factory'}}),u)},exports.withRegion=t;
//# sourceMappingURL=compat.js.map

@@ -1,2 +0,2 @@

function e(e,t){for(const r in e)t(e[r],r)}function t(e,t){e.forEach(t)}function r(e,t,r){if(!e)throw Error(`${r?r+': ':''}${t}`)}function n(e,t){const r=M(e).meta||{};ee={id:M(e).id,parent:ee,value:e,template:r.template||re(),sidRoot:r.sidRoot||ee&&ee.sidRoot,meta:r};try{return t()}finally{te('region'),ee=C(ee)}}function a({node:e=[],from:r,source:n,parent:a=r||n,to:o,target:s,child:i=o||s,scope:c={},meta:l={},family:d={type:'regular'},regional:u}={}){const p=oe(a),f=oe(d.links),m=oe(d.owners),h=[];t(e,(e=>e&&H(h,e)));const g={id:X(),seq:h,next:oe(i),meta:l,scope:c,family:{type:d.type||"crosslink",links:f,owners:m}};return t(f,(e=>H($(e),g))),t(m,(e=>H(z(e),g))),t(p,(e=>H(e.next,g))),u&&ee&&ae(N(ee),[g]),g}function o(e,r,n){let a,o=Te,s=null,i=_e;if(e.target&&(r=e.params,n=e.defer,a=e.meta,o='page'in e?e.page:o,e.stack&&(s=e.stack),i=I(e)||i,e=e.target),i&&_e&&i!==_e&&(_e=null),Array.isArray(e))for(let t=0;t<e.length;t++)Fe('pure',o,M(e[t]),s,r[t],i,a);else Fe('pure',o,M(e),s,r,i,a);if(n&&!Pe)return;const c={isRoot:Pe,currentPage:Te,scope:_e,isWatch:Ee,isPure:Ve};let l,d,u,p,f,m;Pe=0;e:for(;p=Oe();){const{idx:e,stack:r,type:n}=p;u=r.node,Te=f=r.page,_e=I(r),f?m=f.reg:_e&&(m=_e.reg);const a=!!f,o=!!_e,s={fail:0,scope:u.scope};l=d=0;for(let t=e;t<u.seq.length&&!l;t++){const i=u.seq[t];if(i.order){const{priority:a,barrierID:o}=i.order,s=o?f?`${f.fullID}_${o}`:o:0;if(t!==e||n!==a){o?qe.has(s)||(qe.add(s),Re(t,r,a,o)):Re(t,r,a,0);continue e}o&&qe.delete(s)}switch(i.type){case'mov':{const e=i.data;let t;switch(e.from){case'stack':t=N(r);break;case'a':case'b':t=r[e.from];break;case'value':t=e.store;break;case'store':if(m&&!m[e.store.id])if(a){const t=We(f,e.store.id);r.page=f=t,t?m=t.reg:o?(Je(_e,e.store,0,1,e.softRead),m=_e.reg):m=void 0}else o&&Je(_e,e.store,0,1,e.softRead);t=ze(m&&m[e.store.id]||e.store)}switch(e.to){case'stack':r.value=t;break;case'a':case'b':r[e.to]=t;break;case'store':Ge(f,_e,e.target,0).current=t}break}case'compute':const e=i.data;if(e.fn){Ee='watch'===u.meta.op,Ve=e.pure;const t=e.safe?(0,e.fn)(N(r),s.scope,r):Ke(s,e.fn,r);e.filter?d=!t:r.value=t,Ee=c.isWatch,Ve=c.isPure}}l=s.fail||d}if(He&&He(r,s),!l){const e=N(r),n=I(r);if(t(u.next,(t=>{Fe('child',f,t,r,e,n)})),n){u.meta.needFxCounter&&Fe('child',f,n.fxCount,r,e,n),u.meta.storeChange&&Fe('child',f,n.storeChange,r,e,n),u.meta.warnSerialize&&Fe('child',f,n.warnSerializeNode,r,e,n);const a=n.additionalLinks[u.id];a&&t(a,(t=>{Fe('child',f,t,r,e,n)}))}}}Pe=c.isRoot,Te=c.currentPage,_e=I(c)}function s(t,r="combine"){let n=r+'(',a='',o=0;return e(t,(e=>{o<25&&(null!=e&&(n+=a,n+=D(e)?R(e).fullName:e.toString()),o+=1,a=', ')})),n+')'}function i(e,t){let r,n;const a=e;if(t){const a=R(t);0===e.length?(r=a.path,n=a.fullName):(r=a.path.concat([e]),n=0===a.fullName.length?e:a.fullName+'/'+e)}else r=0===e.length?[]:[e],n=e;return{shortName:a,fullName:n,path:r}}function c(e,t){if(!t)return e;if(!t.name&&!t.named&&!t.loc)return e;let r=`[${e}]`;const n=t.named||t.name;n&&(r+=` unit '${n}'`);const a=t.loc;return!n&&a&&(r+=` (${a.file}:${a.line}:${a.column})`),r}function l(e,t){const r=t?e:e[0];le(r);let n=r.or;const a=r.and;if(a){const r=t?a:a[0];if(se(r)&&'and'in r){const r=l(a,t);e=r[0],n={...n,...r[1]}}else e=a}return[e,n]}function d(e){const t=()=>e();return t.unsubscribe=()=>e(),t}function u(e,...t){const r=re();if(r){const n=r.handlers[e];if(n)return n(r,...t)}}function p(e,t){const n=Qe({or:t,and:'string'==typeof e?{name:e}:e}),s=c('event',n),i=(e,...t)=>(r(!O(i,'derived'),'call of derived event is not supported, use createEvent instead',s),r(!Ve,'unit call from pure function is not supported, use operators like sample instead',s),Te?((e,t,r,n)=>{const a=Te;let o=null;if(t)for(o=Te;o&&o.template!==t;)o=C(o);Le(o);const s=e.create(r,n);return Le(a),s})(i,l,e,t):i.create(e,t)),l=re(),d=Object.assign(i,{graphite:a({meta:ot(n.actualOp||"event",i,n),regional:1}),create:e=>(o({target:i,params:e,scope:_e}),e),watch:e=>nt(i,e),map:e=>st(i,"map",e,[Se()]),filter:e=>st(i,'filter',e.fn?e:e.fn,[Se(he,1)]),filterMap:e=>st(i,'filterMap',e,[Se(),xe((e=>!ce(e)),1)]),prepend(e){r(i.targetable,'.prepend of derived event is not supported, call source event instead',s);const t=p('* \u2192 '+i.shortName,{parent:C(i)});return u('eventPrepend',M(t)),rt(t,i,[Se()],'prepend',e),at(i,t),t}});return null!=n&&n.domain&&n.domain.hooks.event(d),F(d,'id',d.graphite.id),te(d.graphite),d}function f(e,n,a,o,s){return ue(a,`${s} ${n}`,'first argument'),r(ie(o),'second argument should be a function',s),U(!O(e,'derived'),`${n} in derived store`,`${n} in store created via createStore`,s),t(Array.isArray(a)?a:[a],(t=>{e.off(t),j(e).set(t,tt(lt(t,e,'on',me,o)))})),e}function m(e,n){const s=Qe(n),i=$e(e),l=c('store',s),d=p({named:'updates',derived:1});u('storeBase',i);const h=i.id,g='skipVoid'in s,y=g&&!s.skipVoid;U(!(g&&s.skipVoid),'{skipVoid: true}','updateFilter',l);const v={subscribers:new Map,updates:d,defaultState:e,stateRef:i,getState(){let e,t=i;if(Te){let t=Te;for(;t&&!t.reg[h];)t=C(t);t&&(e=t)}return!e&&_e&&(Je(_e,i,1),e=_e),e&&(t=e.reg[h]),ze(t)},setState:e=>o({target:v,params:e,defer:1,scope:_e}),reset:(...e)=>(r(v.targetable,'.reset of derived store is not supported',l),t(e,(e=>f(v,'.reset',e,(()=>v.defaultState),l))),v),on:(e,t)=>(r(v.targetable,'.on of derived store is not supported',l),f(v,'.on',e,t,l)),off(e){const t=j(v).get(e);return t&&(t(),j(v).delete(e)),v},map(e,t){let r,n;se(e)&&(r=e,e=e.fn);const a=v.getState(),o=ce(a);re()?n=null:(!o||o&&y)&&(n=e(a));const s=m(n,{name:`${v.shortName} \u2192 *`,derived:1,...t,and:r}),c=lt(v,s,"map",he,e);return Ae(A(s),{type:"map",fn:e,from:i}),A(s).noInit=1,u('storeMap',i,c),s},watch(e,t){if(U(!t,'watch second argument','sample',l),!t||!D(e)){const t=nt(v,e);return u('storeWatch',i,e)||e(v.getState()),t}return r(ie(t),'second argument should be a function',l),e.watch((e=>t(v.getState(),e)))}},b=ot("store",v,s),k=v.defaultConfig.updateFilter;v.graphite=a({scope:{state:i,fn:k},node:[xe(((e,t,r)=>(r.scope&&!r.scope.reg[i.id]&&(r.b=1),e))),we(i),xe(((e,t,{a:r,b:n})=>{const a=ce(e);return a&&!g&&console.error(`${l}: ${ct}`),(a&&y||!a)&&(e!==r||n)}),1),k&&Se(fe,1),ve({from:"stack",target:i})],child:d,meta:{...b,defaultState:e},regional:1}),F(v,'id',v.graphite.id),F(v,'rootStateRefId',h);const x=O(v,'serialize'),w=O(v,'derived'),S='ignore'===x,M=O(v,'sid');M&&(F(v,'storeChange',1),i.sid=M),M||S||w||F(v,'warnSerialize',1);const $=ce(e);return r(w||!$||$&&y,ct,l),w&&$&&!g&&console.error(`${l}: ${ct}`),ae(v,[d]),null!=s&&s.domain&&s.domain.hooks.store(v),w||(v.reinit=p({named:'reinit'}),v.reset(v.reinit)),i.meta=v.graphite.meta,te(v.graphite),v}function h(...e){let t,n,a;[e,a]=l(e);const o=c('combine',a),s=e[e.length-1],i=!_(s)&&se(s),d=i&&s,u=i?e[e.length-2]:s;let p,f,m;if(ie(u)?(n=e.slice(0,i?-2:-1),t=u):n=e,1===n.length){const e=n[0];_(e)||(p=e,f=1)}if(!f&&(p=n,t)){m=1;const e=t;t=t=>e(...t)}return r(se(p),`${o}: shape should be an object`),dt(Array.isArray(p),!m,p,a,t,d)}function g(){const e={};return e.req=new Promise(((t,r)=>{e.rs=t,e.rj=r})),e.req.catch((()=>{})),e}function y(e,t={}){const n=Qe(ie(e)?{handler:e}:e,t),s=c('effect',n),i=p(ie(e)?{handler:e}:e,{...t,actualOp:"effect"}),l=M(i);F(l,'op',i.kind="effect"),i.use=e=>(r(ie(e),'.use argument should be a function',s),v.scope.handler=e,i),i.use.getCurrent=()=>v.scope.handler;const d=i.finally=p({named:'finally',derived:1}),u=i.done=d.filterMap({named:'done',fn({status:e,params:t,result:r}){if('done'===e)return{params:t,result:r}}}),f=i.fail=d.filterMap({named:'fail',fn({status:e,params:t,error:r}){if('fail'===e)return{params:t,error:r}}}),h=i.doneData=u.map({named:'doneData',fn:({result:e})=>e}),y=i.failData=f.map({named:'failData',fn:({error:e})=>e}),v=a({scope:{handler:i.defaultConfig.handler||(()=>r(0,`no handler used in ${i.compositeName.fullName}`))},node:[xe(((e,t,r)=>{let n=t.handler;const a=I(r);if(a){const e=a.handlers.unitMap.get(i)||a.handlers.sidMap[i.sid];e&&(n=e)}return e.handler=n,e}),0,1),xe(((e,t,r)=>{if(t.runnerFn&&!t.runnerFn(e,null,r))return;const{params:n,req:a,handler:o,args:s=[n]}=e,i=pt(n,a,1,d,r),c=pt(n,a,0,d,r),[l,u]=ut(o,c,s);l&&(se(u)&&ie(u.then)?u.then(i,c):i(u))}),0,1)],meta:{op:'fx',fx:'runner'}});l.scope.runner=v,H(l.seq,xe(((e,{runner:t},r)=>{const n=C(r)?{params:e,req:{rs(e){},rj(e){}}}:e;return r.meta||(r.meta={fxID:Y()}),o({target:t,params:n,defer:1,scope:I(r),meta:r.meta}),n.params}))),i.create=e=>{const t=g(),r={params:e,req:t};if(_e&&!Ee){const e=_e;t.req.finally((()=>{Be(e)})).catch((()=>{}))}return o({target:i,params:r,scope:_e}),t.req};const b=i.inFlight=m(0,{serialize:'ignore',named:(O(i,'name')||i.graphite.id)+'.inFlight'}).on(i,(e=>e+1)).on(d,(e=>e-1)).map({fn:e=>e,named:'inFlight'});F(d,'needFxCounter','dec'),F(i,'needFxCounter',1);const k=i.pending=b.map({fn:e=>e>0,named:'pending'});return ae(i,[d,u,f,h,y,k,b]),null!=n&&n.domain&&n.domain.hooks.effect(i),i}function v(e,t){const r=c('merge',t);ue(e,r,'first argument');const n=p({name:s(e,'merge'),derived:1,and:t});return rt(e,n,[],'merge'),n}function b(e,n){let a=0;return t(mt,(t=>{t in e&&(r(null!=e[t],ht(n,t)),a=1)})),a}function k(e,r,n){const a=[];(function e(o){W(a,o)||(H(a,o),"store"===O(o,'op')&&(n||O(o,'sid'))&&r(o,O(o,'sid')),t(o.next,e),t($(o),e),t(z(o),e))})(e)}function x(e,n){const a=Array.isArray(e)?new Map(e):e,o=new Map;let s=0;if(a instanceof Map){const e={};return t(a,((t,a)=>{r(D(a),'Map key should be a unit'),n&&n(a,t),a.sid&&(a.sid in e&&(s=1),e[a.sid]=t),o.set(a,t)})),{sidMap:e,unitMap:o,hasSidDoubles:s}}return{sidMap:a,unitMap:o}}function w(e,t){return _(t)?[Me.mov({store:t.stateRef,to:'stack'}),...e]:e}Object.defineProperty(exports,'__esModule',{value:1});const S='undefined'!=typeof Symbol&&Symbol.observable||'@@observable',M=e=>e.graphite||e,$=e=>e.family.owners,z=e=>e.family.links,A=e=>e.stateRef,N=e=>e.value,j=e=>e.subscribers,C=e=>e.parent,I=e=>e.scope,O=(e,t)=>M(e).meta[t],F=(e,t,r)=>M(e).meta[t]=r,R=e=>e.compositeName,D=e=>(ie(e)||se(e))&&'kind'in e,q=e=>t=>D(t)&&t.kind===e,_=q("store"),P=q("event"),E=q("effect"),V=e=>D(e)&&!!e.targetable,T=q("domain"),B=q("scope");var L={__proto__:null,unit:D,store:_,event:P,effect:E,targetable:V,domain:T,scope:B,attached:e=>E(e)&&1==O(e,'attached')};const W=(e,t)=>e.includes(t),G=(e,t)=>{const r=e.indexOf(t);-1!==r&&e.splice(r,1)},H=(e,t)=>e.push(t),U=(e,t,r,n)=>!e&&console.error(`${n?n+': ':''}${t} is deprecated${r?`, use ${r} instead`:''}`),J=()=>{let e=0;return()=>""+ ++e},K=J(),Q=J(),X=J(),Y=J();let Z,ee=null;const te=e=>{Z&&Z(e,ee)},re=()=>ee&&ee.template,ne=e=>(e&&ee&&ee.sidRoot&&(e=`${ee.sidRoot}|${e}`),e),ae=(e,r)=>{const n=M(e);t(r,(e=>{const t=M(e);"domain"!==n.family.type&&(t.family.type="crosslink"),H($(t),n),H(z(n),t)}))},oe=(e=[])=>(Array.isArray(e)?e:[e]).flat().map(M),se=e=>'object'==typeof e&&null!==e,ie=e=>'function'==typeof e,ce=e=>void 0===e,le=e=>r(se(e)||ie(e),'expect first argument be an object'),de=(e,t,n,a)=>r(!(!se(e)&&!ie(e)||!('family'in e)&&!('graphite'in e)),`${t}: expect ${n} to be a unit (store, event or effect)${a}`),ue=(e,r,n)=>{Array.isArray(e)?t(e,((e,t)=>de(e,r,`${t} item of ${n}`,''))):de(e,r,n,' or array of units')},pe=(e,n,a="target")=>t(oe(n),(t=>r(!O(t,'derived'),`${e}: derived unit in "${a}" is not supported, use createStore/createEvent instead"`))),fe=(e,{fn:t},{a:r})=>t(e,r),me=(e,{fn:t},{a:r})=>t(r,e),he=(e,{fn:t})=>t(e),ge=(e,t,r,n)=>{const a={id:Q(),type:e,data:t};return r&&(a.order={priority:r},n&&(a.order.barrierID=++ye)),a};let ye=0;const ve=({from:e="store",store:t,target:r,to:n=(r?"store":"stack"),batch:a,priority:o})=>ge('mov',{from:e,store:t,to:n,target:r},o,a),be=({fn:e,batch:t,priority:r,safe:n=0,filter:a=0,pure:o=0})=>ge('compute',{fn:e,safe:n,filter:a,pure:o},r,t),ke=({fn:e})=>be({fn:e,priority:"effect"}),xe=(e,t,r)=>be({fn:e,safe:1,filter:t,priority:r&&"effect"}),we=(e,t,r)=>ve({store:e,to:t?"stack":"a",priority:r&&"sampler",batch:1}),Se=(e=he,t)=>be({fn:e,pure:1,filter:t}),Me={mov:ve,compute:be,filter:({fn:e,pure:t})=>be({fn:e,filter:1,pure:t}),run:ke},$e=e=>({id:Q(),current:e,initial:e}),ze=({current:e})=>e,Ae=(e,t)=>{e.before||(e.before=[]),H(e.before,t)};let Ne=null;const je=(e,t)=>{if(!e)return t;if(!t)return e;let r;return(e.v.type===t.v.type&&e.v.id>t.v.id||De(e.v.type)>De(t.v.type))&&(r=e,e=t,t=r),r=je(e.r,t),e.r=e.l,e.l=r,e},Ce=[];let Ie=0;for(;Ie<6;)H(Ce,{first:null,last:null,size:0}),Ie+=1;const Oe=()=>{for(let e=0;e<6;e++){const t=Ce[e];if(t.size>0){if(3===e||4===e){t.size-=1;const e=Ne.v;return Ne=je(Ne.l,Ne.r),e}1===t.size&&(t.last=null);const r=t.first;return t.first=r.r,t.size-=1,r.v}}},Fe=(e,t,r,n,a,o,s)=>Re(0,{a:null,b:null,node:r,parent:n,value:a,page:t,scope:o,meta:s},e,0),Re=(e,t,r,n)=>{const a=De(r),o=Ce[a],s={v:{idx:e,stack:t,type:r,id:n},l:null,r:null};3===a||4===a?Ne=je(Ne,s):(0===o.size?o.first=s:o.last.r=s,o.last=s),o.size+=1},De=e=>{switch(e){case'child':return 0;case'pure':return 1;case'read':return 2;case'barrier':return 3;case'sampler':return 4;case'effect':return 5;default:return-1}},qe=new Set;let _e,Pe=1,Ee=0,Ve=0,Te=null;const Be=e=>{_e=e},Le=e=>{Te=e},We=(e,t)=>{if(e){for(;e&&!e.reg[t];)e=e.parent;if(e)return e}return null},Ge=(e,t,r,n)=>{const a=We(e,r.id);return a?a.reg[r.id]:t?(Je(t,r,n),t.reg[r.id]):r};let He;const Ue=e=>e,Je=(e,r,n,a,o)=>{const s=e.reg;if(s[r.id])return;const i=r.sid,c={id:r.id,current:r.initial,meta:r.meta};if(c.id in e.values.idMap)c.current=e.values.idMap[c.id];else if(i&&i in e.values.sidMap&&!(i in e.sidIdMap)){var l;const t=null==r||null===(l=r.meta)||void 0===l?void 0:l.serialize;c.current=(e.fromSerialize&&'ignore'!==t&&(null==t?void 0:t.read)||Ue)(e.values.sidMap[i])}else if(r.before&&!o){let o=0;const i=n||!r.noInit||a;t(r.before,(t=>{switch(t.type){case'map':{const r=t.from;if((r||t.fn)&&(r&&Je(e,r,n,a),i)){const e=r&&s[r.id].current;c.current=t.fn?t.fn(e):e}break}case'field':Je(e,t.from,n,a),o||(o=1,c.current=Array.isArray(c.current)?[...c.current]:{...c.current}),i&&(c.current[t.field]=s[s[t.from.id].id].current)}}))}i&&(e.sidIdMap[i]=r.id),s[r.id]=c},Ke=(e,t,r)=>{try{return t(N(r),e.scope,r)}catch(t){console.error(t),e.fail=1,e.failReason=t}},Qe=(t,r={})=>(se(t)&&(Qe(t.or,r),e(t,((e,t)=>{ce(e)||'or'===t||'and'===t||(r[t]=e)})),Qe(t.and,r)),r),Xe=(e,t)=>{G(e.next,t),G($(e),t),G(z(e),t)},Ye=(e,t,r)=>{let n;e.next.length=0,e.seq.length=0,e.scope=null;let a=z(e);for(;n=a.pop();)Xe(n,e),(t||r&&'sample'!==e.meta.op||"crosslink"===n.family.type)&&Ye(n,t,'on'!==n.meta.op&&r);for(a=$(e);n=a.pop();)Xe(n,e),r&&"crosslink"===n.family.type&&Ye(n,t,'on'!==n.meta.op&&r)},Ze=e=>e.clear(),et=(e,{deep:t}={})=>{let r=0;if(e.ownerSet&&e.ownerSet.delete(e),_(e))Ze(j(e));else if(T(e)){r=1;const t=e.history;Ze(t.events),Ze(t.effects),Ze(t.stores),Ze(t.domains)}Ye(M(e),!!t,r)},tt=e=>d((()=>et(e))),rt=(e,t,r,n,o)=>a({node:r,parent:e,child:t,scope:{fn:o},meta:{op:n},family:{owners:[e,t],links:t},regional:1}),nt=(e,t)=>(r(ie(t),'.watch argument should be a function'),tt(a({scope:{fn:t},node:[ke({fn:he})],parent:e,meta:{op:'watch'},family:{owners:e},regional:1}))),at=(e,t,r="event")=>{C(e)&&C(e).hooks[r](t)},ot=(e,t,r)=>{const n=Qe(r),a="domain"===e,o=K(),{sid:s=null,named:c=null,domain:l=null,parent:d=l}=n,u=c||n.name||(a?'':o),p=i(u,d),f={op:t.kind=e,name:t.shortName=u,sid:t.sid=ne(s),named:c,unitId:t.id=o,serialize:n.serialize,derived:n.derived,config:n};if(t.targetable=!n.derived,t.parent=d,t.compositeName=p,t.defaultConfig=n,t.getType=()=>(U(0,'getType','compositeName.fullName'),p.fullName),!a){t.subscribe=e=>(le(e),t.watch(ie(e)?e:t=>e.next&&e.next(t))),t[S]=()=>t;const e=re();e&&(f.nativeTemplate=e)}return f},st=(e,t,r,n)=>{let a;se(r)&&(a=r,r=r.fn);const o=p({name:`${e.shortName} \u2192 *`,derived:1,and:a});return rt(e,o,n,t,r),o},ct='undefined is used to skip updates. To allow undefined as a value provide explicit { skipVoid: false } option',lt=(e,t,r,n,a)=>{const o=A(t),s=ve({store:o,to:"a",priority:'read'});"map"===r&&(s.data.softRead=1);const i=[s,Se(n)];return u('storeOnMap',o,i,_(e)&&A(e)),rt(e,t,i,r,a)},dt=(t,n,a,o,i,l)=>{const d=c('combine',o),p=t?e=>[...e]:e=>({...e}),f=t?[]:{},h=p(f),g=$e(h),y=$e(1);g.type=t?'list':'shape',g.noInit=1,u('combineBase',g,y);const v=m(h,{name:s(a),derived:1,...l,and:o}),b=A(v);b.noInit=1,F(v,'isCombine',1);const k=we(g);k.order={priority:'barrier'};const x=ve({store:b,to:'b',priority:'read'});x.data.softRead=1;const w=[xe(((e,t,r)=>(r.scope&&!r.scope.reg[g.id]&&(r.c=1),e))),k,ve({store:y,to:'b'}),xe(((e,{key:t},r)=>{if(r.c||e!==r.a[t])return n&&r.b&&(r.a=p(r.a)),r.a[t]=e,1}),1),ve({from:"a",target:g}),ve({from:"value",store:0,target:y}),ve({from:"value",store:1,target:y,priority:'barrier',batch:1}),we(g,1,1),i&&Se(),x];if(e(a,((e,t)=>{if(!_(e))return r(!D(e)&&!ce(e),`combine expects a store in a field ${t}`,d),void(h[t]=f[t]=e);f[t]=e.defaultState,h[t]=e.getState();const n=rt(e,v,w,'combine',i);n.scope.key=t;const a=A(e);Ae(g,{type:'field',field:t,from:a}),u('combineField',a,n)})),v.defaultShape=a,Ae(b,{type:"map",from:g,fn:i}),!re())if(i){const e=i(h);!ce(e)||l&&'skipVoid'in l||console.error(`${d}: ${ct}`),b.current=e,b.initial=e,v.defaultState=e}else v.defaultState=f;return v},ut=(e,t,r)=>{try{return[1,e(...r)]}catch(e){return t(e),[0,null]}},pt=(e,t,r,n,a)=>s=>{o({target:[n,ft],params:[r?{status:'done',params:e,result:s}:{status:'fail',params:e,error:s},{value:s,fn:r?t.rs:t.rj}],defer:1,page:a.page,scope:a.scope,meta:a.meta})},ft=a({node:[ke({fn:({fn:e,value:t})=>e(t)})],meta:{op:'fx',fx:'sidechain'}}),mt=['source','clock','target'],ht=(e,t)=>e+`: ${t} should be defined`,gt=(e,t,n,a,o,s,i,l,d,f,g,y)=>{const b=c(e,l),k=!!o;r(!ce(n)||!ce(t),ht(b,'either source or clock'));let x=0;ce(n)?x=1:D(n)||(n=h(n)),ce(t)?t=n:(ue(t,b,'clock'),Array.isArray(t)&&(t=v(t))),x&&(n=t),l||i||(i=n.shortName);let w='none';(g||a)&&(D(a)?w='unit':(r(ie(a),'`filter` should be function or unit'),w='fn')),o?(ue(o,b,'target'),pe(b,o)):'none'===w&&f&&_(n)&&_(t)?o=m(s?s(ze(A(n)),ze(A(t))):ze(A(n)),{name:i,sid:y,or:l}):(o=p({name:i,derived:1,or:l}),u('sampleTarget',M(o)));const S=$e();let $=[];if('unit'===w){const[r,n,s]=vt(a,o,t,S,e);s||$.push(...yt(n)),$.push(...yt(r))}const z=[];if(x)d&&z.push(we(S,1,1));else{const[r,a,s]=vt(n,o,t,S,e);s||z.push(...yt(a)),z.push(we(r,1,d))}const N=rt(t,o,[u('sampleSourceLoader'),ve({from:"stack",target:S}),...z,...$,we(S),'fn'===w&&Se(((e,t,{a:r})=>a(e,r)),1),s&&Se(fe),u('sampleSourceUpward',k)],e,s);return ae(n,[N]),Object.assign(N.meta,l,{joint:1}),o},yt=e=>[we(e),xe(((e,t,{a:r})=>r),1)],vt=(e,t,r,n,o)=>{const s=_(e),i=s?A(e):$e(),c=$e(s);return s||a({parent:e,node:[ve({from:"stack",target:i}),ve({from:"value",store:1,target:c})],family:{owners:[e,t,r],links:t},meta:{op:o},regional:1}),u('sampleSource',c,i,n),[i,c,s]},bt=(e,t,r,n)=>{const a=e[t];a&&o({target:a,params:Array.isArray(a)?a.map((()=>r)):r,defer:1,stack:n})},kt=e=>!e.node.meta.isCombine||e.parent&&'combine'!==e.parent.node.meta.op,xt=e=>e;exports.allSettled=(e,{scope:t,params:r}={})=>{if(!D(e))return Promise.reject(new Error('first argument should be unit'));if(!(E(e)||P(e)||_(e)||B(e)))return Promise.reject(new Error('first argument accepts only effects, events, stores or scopes'));B(e)&&(t=e);const n=g();n.parentFork=_e;const{fxCount:a}=t;H(a.scope.defers,n);const s=[],i=[];return B(e)||(H(s,e),H(i,E(e)?{params:r,req:{rs(e){n.value={status:'done',value:e}},rj(e){n.value={status:'fail',value:e}}}}:r)),H(s,a),H(i,null),o({target:s,params:i,scope:t}),n.req},exports.attach=e=>{let t;[e,t]=l(e,1);const n=c('attach',t);let{source:a,effect:s,mapParams:d,domain:u}=e;E(s)&&r(ce(u),'`domain` can only be used with a plain function',n);const p=y(e,t);F(p,'attached',1);const{runner:f}=M(p).scope;let m;const g=(e,t,r)=>{const{params:n,req:s,handler:i}=e,c=p.finally,l=pt(n,s,0,c,r),u=r.a,f=E(i);let m,h=1;if(d?[h,m]=ut(d,l,[n,u]):m=a&&f?u:n,h){if(!f)return e.args=[u,m],1;o({target:i,params:{params:m,req:{rs:pt(n,s,1,c,r),rj:l}},page:r.page,defer:1,meta:r.meta})}};if(a){let e;f.scope.runnerFn=g,_(a)?(e=a,ae(e,[p])):(e=h(a),ae(p,[e])),m=[xe((e=>e),0,1),we(A(e))],delete f.seq[1].order}else m=[xe(g,1,1)];f.seq.splice(1,0,...m),p.use(s);const v=C(s);return v&&(Object.assign(R(p),i(p.shortName,v)),p.defaultConfig.parent=v),at(s,p,"effect"),p},exports.clearNode=et,exports.combine=h,exports.createApi=(...t)=>{let[[r,n],a]=l(t);const o={};return e(n,((e,t)=>{const n=o[t]=p(t,{parent:C(r),config:a});r.on(n,e),at(r,n)})),o},exports.createDomain=function r(n,s){const i=Qe({or:s,and:'string'==typeof n?{name:n}:n}),c=a({family:{type:"domain"},regional:1,parent:(null==i?void 0:i.domain)||(null==i?void 0:i.parent)}),l={history:{},graphite:c,hooks:{}};c.meta=ot("domain",l,{parent:(null==i?void 0:i.domain)||(null==i?void 0:i.parent),or:{...i,derived:1}}),e({Event:p,Effect:y,Store:m,Domain:r},((e,r)=>{const n=r.toLowerCase(),a=p({named:`on${r}`});l.hooks[n]=a;const s=new Set;l.history[`${n}s`]=s,a.create=e=>(o(a,e),e),H(M(a).seq,xe(((e,t,r)=>(r.scope=null,e)))),a.watch((e=>{ae(l,[e]),s.add(e),e.ownerSet||(e.ownerSet=s),C(e)||(e.parent=l)})),ae(l,[a]),l[`onCreate${r}`]=e=>(t(s,e),a.watch(e)),l[`create${r}`]=l[n]=(t,r)=>{const n=Qe({and:r,or:t});return null!=n&&n.domain?e(t,r):a(e(t,{parent:l,or:n}))}}));const d=C(l);return d&&e(l.hooks,((e,t)=>rt(e,d.hooks[t]))),null!=i&&i.domain&&i.domain.hooks.domain(l),l},exports.createEffect=y,exports.createEvent=p,exports.createNode=a,exports.createStore=m,exports.createWatch=({unit:e,fn:t,scope:r,batch:n})=>{const o=[Me.run({fn:e=>t(e)})];n&&o.unshift(Me.compute({priority:'sampler',batch:1})),_(e)&&o.unshift(Me.mov({store:e.stateRef,to:'stack'}));const s=Array.isArray(e)?e:[e];if(r){const e=[],t=r.additionalLinks;return s.forEach((r=>{const n=t[r.graphite.id]||[];t[r.graphite.id]=n;const s=a({node:w(o,r),meta:{watchOp:r.kind}});n.push(s),e.push((()=>{const e=n.indexOf(s);-1!==e&&n.splice(e,1),et(s)}))})),d((()=>{e.forEach((e=>e()))}))}{const e=a({node:o,parent:s,family:{owners:s}});return d((()=>{et(e)}))}},exports.fork=(e,n)=>{let o,s=e;T(e)&&(U(0,'fork(domain)','fork()'),o=e,s=n);const i=(e=>{const r=a({scope:{defers:[],inFlight:0,fxID:0},node:[xe(((e,t,r)=>{r.parent?'dec'===r.parent.node.meta.needFxCounter?t.inFlight-=1:(t.inFlight+=1,t.fxID+=1):t.fxID+=1})),be({priority:"sampler",batch:1}),xe(((e,r)=>{const{defers:n,fxID:a}=r;r.inFlight>0||0===n.length||Promise.resolve().then((()=>{r.fxID===a&&t(n.splice(0,n.length),(e=>{Be(e.parentFork),e.rs(e.value)}))}))}),0,1)]}),n=a({node:[xe(((e,t,r)=>{const n=r.parent;if(n){const t=n.node;if(kt(n)){const n=I(r),a=t.meta.sid;n.sidIdMap[a]=t.scope.state.id,n.values.sidMap[a]=e;const o=t.meta.serialize;o&&n.sidSerializeSettings.set(a,'ignore'===o?{ignore:1}:{ignore:0,write:o.write})}}}))]}),o=a({node:[xe(((e,t,r)=>{const n=I(r);n&&r.parent&&kt(r.parent)&&(n.warnSerialize=1)}))]}),s={cloneOf:e,reg:{},values:{sidMap:{},idMap:{}},sidIdMap:{},sidSerializeSettings:new Map,getState(e){if('current'in e)return Ge(Te,s,e,0).current;const t=M(e);return Ge(Te,s,t.scope.state,1).current},kind:"scope",graphite:a({family:{type:"domain",links:[r,n,o]},meta:{unit:'fork'},scope:{forkInFlightCounter:r}}),additionalLinks:{},handlers:{sidMap:{},unitMap:new Map},fxCount:r,storeChange:n,warnSerializeNode:o};return s})(o);if(s){if(s.values){const{sidMap:e,unitMap:n,hasSidDoubles:a}=x(s.values,(e=>r(_(e)&&V(e),'Values map can contain only writable stores as keys')));Object.assign(i.values.sidMap,e),t(n,((e,t)=>{if(i.values.idMap[t.stateRef.id]=e,'ignore'===O(t,'serialize')){const e=O(t,'sid');i.sidSerializeSettings.set(e,{ignore:1})}})),i.fromSerialize=!(Array.isArray(s.values)||s.values instanceof Map),i.hasSidDoubles=a}s.handlers&&(U(s.handlers instanceof Map||Array.isArray(s.handlers),'object with handlers','array'),i.handlers=x(s.handlers,(e=>r(E(e),"Handlers map can contain only effects as keys"))))}return i},exports.forward=e=>{const t='forward',[{from:r,to:n},o]=l(e,1),s=c(t,o);return U(0,t,'sample',s),ue(r,s,'"from"'),ue(n,s,'"to"'),pe(s,n,'to'),tt(a({parent:r,child:n,meta:{op:t,config:o},family:{},regional:1}))},exports.fromObservable=e=>{le(e);const t=S in e?e[S]():e;r(t.subscribe,'expect observable to have .subscribe');const n=p(),a=tt(n);return t.subscribe({next:n,error:a,complete:a}),n},exports.guard=(...e)=>{let[[t,r],n]=l(e);const a=c('guard',n);return U(0,'guard','sample',a),r||(r=t,t=r.source),b(r,a),gt('guard',r.clock,t,r.filter,r.target,null,r.name,n,!r.greedy,0,1)},exports.hydrate=(e,{values:n})=>{r(se(n),'values property should be an object');const{sidMap:a,unitMap:s}=x(n),i=Object.getOwnPropertyNames(a),c={};t(s,((e,t)=>{c[t.stateRef.id]=t}));const l=[],d=[];let u,p,f;B(e)?(u=e,f=1,r(u.cloneOf,'scope should be created from domain'),U(0,'hydrate(fork(domain), { values })','fork({ values })'),p=M(u.cloneOf)):T(e)?(U(0,'hydrate(domain, { values })','fork({ values })'),p=M(e)):r(0,'first argument of hydrate should be domain or scope'),k(p,((e,t)=>{if(t&&W(i,t)){H(l,e);const r=O(e,'serialize');r&&'ignore'!==r&&(a[t]=r.read(a[t])),H(d,a[t])}else e.scope.state.id in c&&(H(l,e),H(d,s.get(c[e.scope.state.id])))}),1),o({target:l,params:d,scope:u}),f&&Object.assign(u.values.sidMap,a)},exports.is=L,exports.launch=o,exports.merge=v,exports.restore=(t,n,a)=>{const o=c('restore',a);if(r(!_(t),'restore($store) is not supported',o),P(t)||E(t)){const e=C(t),r=m(n,{parent:e,name:t.shortName,and:a});return rt(E(t)?t.doneData:t,r),e&&e.hooks.store(r),r}const s=Array.isArray(t)?[]:{};return e(t,((e,t)=>s[t]=_(e)?e:m(e,{name:t}))),s},exports.sample=(...e)=>{let t,r,n,a,[[o,s,i],d]=l(e),u=1;const p=c('sample',d);return ce(s)&&se(o)&&b(o,p)&&(s=o.clock,i=o.fn,'batch'in o?u=o.batch:(U(!('greedy'in o),'greedy in sample','batch',p),u=!o.greedy),a=o.filter,t=o.target,r=o.name,n=o.sid,o=o.source),gt('sample',s,o,a,t,i,r,d,u,1,0,n)},exports.scopeBind=(e,{scope:t,safe:n}={})=>{r(t||_e||n,'scopeBind: scope not found');const a=t||_e;return t=>{function r(){Be(s)}let n,o=0;const s=_e;Be(a);try{n=e(t)}catch(e){n=e,o=1}if(r(),o)throw n;return n instanceof Promise&&n.then(r,r),n}},exports.serialize=(t,n={})=>{t.warnSerialize&&console.error('There is a store without sid in this scope, its value is omitted'),r(!t.hasSidDoubles,'duplicate sid found in this scope');const a=n.ignore?n.ignore.map((({sid:e})=>e)):[],o={};return e(t.values.sidMap,((e,r)=>{var n;if(W(a,r))return;const s=t.sidIdMap[r],i=null!==(n=t.sidSerializeSettings.get(r))&&void 0!==n?n:{ignore:0,write:xt};i.ignore||(o[r]=(0,i.write)(s&&s in t.reg?t.reg[s].current:e))})),'onlyChanges'in n&&(U(0,'onlyChanges'),n.onlyChanges||(r(t.cloneOf,'scope should be created from domain'),k(M(t.cloneOf),((e,r)=>{r in o||W(a,r)||O(e,'isCombine')||'ignore'===O(e,'serialize')||(o[r]=t.getState(e))})))),o},exports.setGraphInspector=e=>{Z=e},exports.setInspector=e=>{He=e},exports.setStoreName=(e,t)=>{e.shortName=t,Object.assign(R(e),i(t,C(e)))},exports.split=(...t)=>{const n='split';let o,s,[[i,d],f]=l(t);const m=c(n,f),h=!d;h&&(o=i.cases,d=i.match,s=i.clock,i=i.source);const g=_(d),y=!D(d)&&ie(d),v=!g&&!y&&se(d);r(D(i),'source must be a unit',m),o||(o={}),h?e(o,((e,t)=>pe(m,e,`cases.${t}`))):(r(v,'match should be an object',m),e(d,((e,t)=>o[t]=p({derived:1,named:`cases.${t}`,and:f}))),o.__=p({derived:1,named:'cases.__',and:f}));const b=new Set([].concat(i,s||[],Object.values(o))),k=Object.keys(g||y?o:d);let x;if(g||y)g&&b.add(d),x=[g&&we(A(d),0,1),be({safe:g,filter:1,pure:!g,fn(e,t,r){const n=String(g?r.a:d(e));bt(t,W(k,n)?n:'__',e,r)}})];else if(v){const t=$e({});t.type='shape';const r=[];let n;e(d,((e,a)=>{if(D(e)){n=1,H(r,a),b.add(e);const o=rt(e,[],[we(t),xe(((e,t,{a:r})=>r[a]=e))]);if(_(e)){t.current[a]=e.getState();const r=A(e);Ae(t,{from:r,field:a,type:'field'}),u('splitMatchStore',r,o)}}})),n&&u('splitBase',t),x=[n&&we(t,0,1),Se(((e,t,n)=>{for(let a=0;a<k.length;a++){const o=k[a];if(W(r,o)?n.a[o]:d[o](e))return void bt(t,o,e,n)}bt(t,'__',e,n)}),1)]}else r(0,'expect match to be unit, function or object');const w=a({meta:{op:n},parent:s?[]:i,scope:o,node:x,family:{owners:Array.from(b)},regional:1});if(s&&gt(n,s,i,null,w,null,n,f,0,0,0),!h)return o},exports.step=Me,exports.version="23.1.0",exports.withFactory=({sid:e,name:t,loc:r,method:o,fn:s})=>n(a({meta:{sidRoot:ne(e),sid:e,name:t,loc:r,method:o,type:'factory'}}),s),exports.withRegion=n;
function e(e,t){for(const r in e)t(e[r],r)}function t(e,t){e.forEach(t)}function r(e,t,r){if(!e)throw Error(`${r?r+': ':''}${t}`)}function n(e,t){const r=M(e).meta||{};ee={id:M(e).id,parent:ee,value:e,template:r.template||re(),sidRoot:r.sidRoot||ee&&ee.sidRoot,meta:r};try{return t()}finally{te('region'),ee=C(ee)}}function a({node:e=[],from:r,source:n,parent:a=r||n,to:o,target:s,child:i=o||s,scope:c={},meta:l={},family:d={type:'regular'},regional:u}={}){const p=oe(a),f=oe(d.links),m=oe(d.owners),h=[];t(e,(e=>e&&H(h,e)));const g={id:X(),seq:h,next:oe(i),meta:l,scope:c,family:{type:d.type||"crosslink",links:f,owners:m}};return t(f,(e=>H($(e),g))),t(m,(e=>H(z(e),g))),t(p,(e=>H(e.next,g))),u&&ee&&ae(N(ee),[g]),g}function o(e,r,n){let a,o=Te,s=null,i=_e;if(e.target&&(r=e.params,n=e.defer,a=e.meta,o='page'in e?e.page:o,e.stack&&(s=e.stack),i=I(e)||i,e=e.target),i&&_e&&i!==_e&&(_e=null),Array.isArray(e))for(let t=0;t<e.length;t++)Re('pure',o,M(e[t]),s,r[t],i,a);else Re('pure',o,M(e),s,r,i,a);if(n&&!Pe)return;const c={isRoot:Pe,currentPage:Te,scope:_e,isWatch:Ee,isPure:Ve};let l,d,u,p,f,m;Pe=0;e:for(;p=Oe();){const{idx:e,stack:r,type:n}=p;u=r.node,Te=f=r.page,_e=I(r),f?m=f.reg:_e&&(m=_e.reg);const a=!!f,o=!!_e,s={fail:0,scope:u.scope};l=d=0;for(let t=e;t<u.seq.length&&!l;t++){const i=u.seq[t];if(i.order){const{priority:a,barrierID:o}=i.order,s=o?f?`${f.fullID}_${o}`:o:0;if(t!==e||n!==a){o?qe.has(s)||(qe.add(s),Fe(t,r,a,o)):Fe(t,r,a,0);continue e}o&&qe.delete(s)}switch(i.type){case'mov':{const e=i.data;let t;switch(e.from){case'stack':t=N(r);break;case'a':case'b':t=r[e.from];break;case'value':t=e.store;break;case'store':if(m&&!m[e.store.id])if(a){const t=We(f,e.store.id);r.page=f=t,t?m=t.reg:o?(Je(_e,e.store,0,1,e.softRead),m=_e.reg):m=void 0}else o&&Je(_e,e.store,0,1,e.softRead);t=ze(m&&m[e.store.id]||e.store)}switch(e.to){case'stack':r.value=t;break;case'a':case'b':r[e.to]=t;break;case'store':Ge(f,_e,e.target,0).current=t}break}case'compute':const e=i.data;if(e.fn){Ee='watch'===u.meta.op,Ve=e.pure;const t=e.safe?(0,e.fn)(N(r),s.scope,r):Ke(s,e.fn,r);e.filter?d=!t:r.value=t,Ee=c.isWatch,Ve=c.isPure}}l=s.fail||d}if(He&&He(r,s),!l){const e=N(r),n=I(r);if(t(u.next,(t=>{Re('child',f,t,r,e,n)})),n){u.meta.needFxCounter&&Re('child',f,n.fxCount,r,e,n),u.meta.storeChange&&Re('child',f,n.storeChange,r,e,n),u.meta.warnSerialize&&Re('child',f,n.warnSerializeNode,r,e,n);const a=n.additionalLinks[u.id];a&&t(a,(t=>{Re('child',f,t,r,e,n)}))}}}Pe=c.isRoot,Te=c.currentPage,_e=I(c)}function s(t,r="combine"){let n=r+'(',a='',o=0;return e(t,(e=>{o<25&&(null!=e&&(n+=a,n+=D(e)?F(e).fullName:e.toString()),o+=1,a=', ')})),n+')'}function i(e,t){let r,n;const a=e;if(t){const a=F(t);0===e.length?(r=a.path,n=a.fullName):(r=a.path.concat([e]),n=0===a.fullName.length?e:a.fullName+'/'+e)}else r=0===e.length?[]:[e],n=e;return{shortName:a,fullName:n,path:r}}function c(e,t){if(!t)return e;if(!t.name&&!t.named&&!t.loc)return e;let r=`[${e}]`;const n=t.named||t.name;n&&(r+=` unit '${n}'`);const a=t.loc;return!n&&a&&(r+=` (${a.file}:${a.line}:${a.column})`),r}function l(e,t){const r=t?e:e[0];le(r);let n=r.or;const a=r.and;if(a){const r=t?a:a[0];if(se(r)&&'and'in r){const r=l(a,t);e=r[0],n={...n,...r[1]}}else e=a}return[e,n]}function d(e){const t=()=>e();return t.unsubscribe=()=>e(),t}function u(e,...t){const r=re();if(r){const n=r.handlers[e];if(n)return n(r,...t)}}function p(e,t){const n=Qe({or:t,and:'string'==typeof e?{name:e}:e}),s=c('event',n),i=(e,...t)=>(r(!O(i,'derived'),'call of derived event is not supported, use createEvent instead',s),r(!Ve,'unit call from pure function is not supported, use operators like sample instead',s),Te?((e,t,r,n)=>{const a=Te;let o=null;if(t)for(o=Te;o&&o.template!==t;)o=C(o);Le(o);const s=e.create(r,n);return Le(a),s})(i,l,e,t):i.create(e,t)),l=re(),d=Object.assign(i,{graphite:a({meta:ot(n.actualOp||"event",i,n),regional:1}),create:e=>(o({target:i,params:e,scope:_e}),e),watch:e=>nt(i,e),map:e=>st(i,"map",e,[Se()]),filter:e=>st(i,'filter',e.fn?e:e.fn,[Se(he,1)]),filterMap:e=>st(i,'filterMap',e,[Se(),xe((e=>!ce(e)),1)]),prepend(e){r(i.targetable,'.prepend of derived event is not supported, call source event instead',s);const t=p('* \u2192 '+i.shortName,{parent:C(i)});return u('eventPrepend',M(t)),rt(t,i,[Se()],'prepend',e),at(i,t),t}});return null!=n&&n.domain&&n.domain.hooks.event(d),R(d,'id',d.graphite.id),te(d.graphite),d}function f(e,n,a,o,s){return ue(a,`${s} ${n}`,'first argument'),r(ie(o),'second argument should be a function',s),U(!O(e,'derived'),`${n} in derived store`,`${n} in store created via createStore`,s),t(Array.isArray(a)?a:[a],(t=>{e.off(t),j(e).set(t,tt(lt(t,e,'on',me,o)))})),e}function m(e,n){const s=Qe(n),i=$e(e),l=c('store',s),d=p({named:'updates',derived:1});u('storeBase',i);const h=i.id,g='skipVoid'in s,y=g&&!s.skipVoid;U(!(g&&s.skipVoid),'{skipVoid: true}','updateFilter',l);const b={subscribers:new Map,updates:d,defaultState:e,stateRef:i,getState(){let e,t=i;if(Te){let t=Te;for(;t&&!t.reg[h];)t=C(t);t&&(e=t)}return!e&&_e&&(Je(_e,i,1),e=_e),e&&(t=e.reg[h]),ze(t)},setState:e=>o({target:b,params:e,defer:1,scope:_e}),reset:(...e)=>(r(b.targetable,'.reset of derived store is not supported',l),t(e,(e=>f(b,'.reset',e,(()=>b.defaultState),l))),b),on:(e,t)=>(r(b.targetable,'.on of derived store is not supported',l),f(b,'.on',e,t,l)),off(e){const t=j(b).get(e);return t&&(t(),j(b).delete(e)),b},map(e,t){let r,n;se(e)&&(r=e,e=e.fn);const a=b.getState(),o=ce(a);re()?n=null:(!o||o&&y)&&(n=e(a));const s=m(n,{name:`${b.shortName} \u2192 *`,derived:1,...t,and:r}),c=lt(b,s,"map",he,e);return Ae(A(s),{type:"map",fn:e,from:i}),A(s).noInit=1,u('storeMap',i,c),s},watch(e,t){if(U(!t,'watch second argument','sample',l),!t||!D(e)){const t=nt(b,e);return u('storeWatch',i,e)||e(b.getState()),t}return r(ie(t),'second argument should be a function',l),e.watch((e=>t(b.getState(),e)))}},v=ot("store",b,s),k=b.defaultConfig.updateFilter;b.graphite=a({scope:{state:i,fn:k},node:[xe(((e,t,r)=>(r.scope&&!r.scope.reg[i.id]&&(r.b=1),e))),we(i),xe(((e,t,{a:r,b:n})=>{const a=ce(e);return a&&!g&&console.error(`${l}: ${ct}`),(a&&y||!a)&&(e!==r||n)}),1),k&&Se(fe,1),be({from:"stack",target:i})],child:d,meta:{...v,defaultState:e},regional:1}),R(b,'id',b.graphite.id),R(b,'rootStateRefId',h);const x=O(b,'serialize'),w=O(b,'derived'),S='ignore'===x,M=O(b,'sid');M&&(R(b,'storeChange',1),i.sid=M),M||S||w||R(b,'warnSerialize',1);const $=ce(e);return r(w||!$||$&&y,ct,l),w&&$&&!g&&console.error(`${l}: ${ct}`),ae(b,[d]),null!=s&&s.domain&&s.domain.hooks.store(b),w||(b.reinit=p({named:'reinit'}),b.reset(b.reinit)),i.meta=b.graphite.meta,te(b.graphite),b}function h(...e){let t,n,a;[e,a]=l(e);const o=c('combine',a),s=e[e.length-1],i=!_(s)&&se(s),d=i&&s,u=i?e[e.length-2]:s;let p,f,m;if(ie(u)?(n=e.slice(0,i?-2:-1),t=u):n=e,1===n.length){const e=n[0];_(e)||(p=e,f=1)}if(!f&&(p=n,t)){m=1;const e=t;t=t=>e(...t)}return r(se(p),`${o}: shape should be an object`),dt(Array.isArray(p),!m,p,a,t,d)}function g(){const e={};return e.req=new Promise(((t,r)=>{e.rs=t,e.rj=r})),e.req.catch((()=>{})),e}function y(e,t={}){const n=Qe(ie(e)?{handler:e}:e,t),s=c('effect',n),i=p(ie(e)?{handler:e}:e,{...t,actualOp:"effect"}),l=M(i);R(l,'op',i.kind="effect"),i.use=e=>(r(ie(e),'.use argument should be a function',s),b.scope.handler=e,i),i.use.getCurrent=()=>b.scope.handler;const d=i.finally=p({named:'finally',derived:1}),u=i.done=d.filterMap({named:'done',fn({status:e,params:t,result:r}){if('done'===e)return{params:t,result:r}}}),f=i.fail=d.filterMap({named:'fail',fn({status:e,params:t,error:r}){if('fail'===e)return{params:t,error:r}}}),h=i.doneData=u.map({named:'doneData',fn:({result:e})=>e}),y=i.failData=f.map({named:'failData',fn:({error:e})=>e}),b=a({scope:{handler:i.defaultConfig.handler||(()=>r(0,`no handler used in ${i.compositeName.fullName}`))},node:[xe(((e,t,r)=>{let n=t.handler;const a=I(r);if(a){const e=a.handlers.unitMap.get(i)||a.handlers.sidMap[i.sid];e&&(n=e)}return e.handler=n,e}),0,1),xe(((e,t,r)=>{if(t.runnerFn&&!t.runnerFn(e,null,r))return;const{params:n,req:a,handler:o,args:s=[n]}=e,i=pt(n,a,1,d,r),c=pt(n,a,0,d,r),[l,u]=ut(o,c,s);l&&(se(u)&&ie(u.then)?u.then(i,c):i(u))}),0,1)],meta:{op:'fx',fx:'runner'}});l.scope.runner=b,H(l.seq,xe(((e,{runner:t},r)=>{const n=C(r)?{params:e,req:{rs(e){},rj(e){}}}:e;return r.meta||(r.meta={fxID:Y()}),o({target:t,params:n,defer:1,scope:I(r),meta:r.meta}),n.params}))),i.create=e=>{const t=g(),r={params:e,req:t};if(_e&&!Ee){const e=_e;t.req.finally((()=>{Be(e)})).catch((()=>{}))}return o({target:i,params:r,scope:_e}),t.req};const v=i.inFlight=m(0,{serialize:'ignore',named:(O(i,'name')||i.graphite.id)+'.inFlight'}).on(i,(e=>e+1)).on(d,(e=>e-1)).map({fn:e=>e,named:'inFlight'});R(d,'needFxCounter','dec'),R(i,'needFxCounter',1);const k=i.pending=v.map({fn:e=>e>0,named:'pending'});return ae(i,[d,u,f,h,y,k,v]),null!=n&&n.domain&&n.domain.hooks.effect(i),i}function b(e,t){const r=c('merge',t);ue(e,r,'first argument');const n=p({name:s(e,'merge'),derived:1,and:t});return rt(e,n,[],'merge'),n}function v(e,n){let a=0;return t(mt,(t=>{t in e&&(r(null!=e[t],ht(n,t)),a=1)})),a}function k(e,r,n){const a=[];(function e(o){W(a,o)||(H(a,o),"store"===O(o,'op')&&(n||O(o,'sid'))&&r(o,O(o,'sid')),t(o.next,e),t($(o),e),t(z(o),e))})(e)}function x(e,n){const a=Array.isArray(e)?new Map(e):e,o=new Map;let s=0;if(a instanceof Map){const e={};return t(a,((t,a)=>{r(D(a),'Map key should be a unit'),n&&n(a,t),a.sid&&(a.sid in e&&(s=1),e[a.sid]=t),o.set(a,t)})),{sidMap:e,unitMap:o,hasSidDoubles:s}}return{sidMap:a,unitMap:o}}function w(e,t){return _(t)?[Me.mov({store:t.stateRef,to:'stack'}),...e]:e}Object.defineProperty(exports,'__esModule',{value:1});const S='undefined'!=typeof Symbol&&Symbol.observable||'@@observable',M=e=>e.graphite||e,$=e=>e.family.owners,z=e=>e.family.links,A=e=>e.stateRef,N=e=>e.value,j=e=>e.subscribers,C=e=>e.parent,I=e=>e.scope,O=(e,t)=>M(e).meta[t],R=(e,t,r)=>M(e).meta[t]=r,F=e=>e.compositeName,D=e=>(ie(e)||se(e))&&'kind'in e,q=e=>t=>D(t)&&t.kind===e,_=q("store"),P=q("event"),E=q("effect"),V=e=>D(e)&&!!e.targetable,T=q("domain"),B=q("scope");var L={__proto__:null,unit:D,store:_,event:P,effect:E,targetable:V,domain:T,scope:B,attached:e=>E(e)&&1==O(e,'attached')};const W=(e,t)=>e.includes(t),G=(e,t)=>{const r=e.indexOf(t);-1!==r&&e.splice(r,1)},H=(e,t)=>e.push(t),U=(e,t,r,n)=>!e&&console.error(`${n?n+': ':''}${t} is deprecated${r?`, use ${r} instead`:''}`),J=()=>{let e=0;return()=>""+ ++e},K=J(),Q=J(),X=J(),Y=J();let Z,ee=null;const te=e=>{Z&&Z(e,ee)},re=()=>ee&&ee.template,ne=e=>(e&&ee&&ee.sidRoot&&(e=`${ee.sidRoot}|${e}`),e),ae=(e,r)=>{const n=M(e);t(r,(e=>{const t=M(e);"domain"!==n.family.type&&(t.family.type="crosslink"),H($(t),n),H(z(n),t)}))},oe=(e=[])=>(Array.isArray(e)?e:[e]).flat().map(M),se=e=>'object'==typeof e&&null!==e,ie=e=>'function'==typeof e,ce=e=>void 0===e,le=e=>r(se(e)||ie(e),'expect first argument be an object'),de=(e,t,n,a)=>r(!(!se(e)&&!ie(e)||!('family'in e)&&!('graphite'in e)),`${t}: expect ${n} to be a unit (store, event or effect)${a}`),ue=(e,r,n)=>{Array.isArray(e)?t(e,((e,t)=>de(e,r,`${t} item of ${n}`,''))):de(e,r,n,' or array of units')},pe=(e,n,a="target")=>t(oe(n),(t=>r(!O(t,'derived'),`${e}: derived unit in "${a}" is not supported, use createStore/createEvent instead"`))),fe=(e,{fn:t},{a:r})=>t(e,r),me=(e,{fn:t},{a:r})=>t(r,e),he=(e,{fn:t})=>t(e),ge=(e,t,r,n)=>{const a={id:Q(),type:e,data:t};return r&&(a.order={priority:r},n&&(a.order.barrierID=++ye)),a};let ye=0;const be=({from:e="store",store:t,target:r,to:n=(r?"store":"stack"),batch:a,priority:o})=>ge('mov',{from:e,store:t,to:n,target:r},o,a),ve=({fn:e,batch:t,priority:r,safe:n=0,filter:a=0,pure:o=0})=>ge('compute',{fn:e,safe:n,filter:a,pure:o},r,t),ke=({fn:e})=>ve({fn:e,priority:"effect"}),xe=(e,t,r)=>ve({fn:e,safe:1,filter:t,priority:r&&"effect"}),we=(e,t,r)=>be({store:e,to:t?"stack":"a",priority:r&&"sampler",batch:1}),Se=(e=he,t)=>ve({fn:e,pure:1,filter:t}),Me={mov:be,compute:ve,filter:({fn:e,pure:t})=>ve({fn:e,filter:1,pure:t}),run:ke},$e=e=>({id:Q(),current:e,initial:e}),ze=({current:e})=>e,Ae=(e,t)=>{e.before||(e.before=[]),H(e.before,t)};let Ne=null;const je=(e,t)=>{if(!e)return t;if(!t)return e;let r;return(e.v.type===t.v.type&&e.v.id>t.v.id||De(e.v.type)>De(t.v.type))&&(r=e,e=t,t=r),r=je(e.r,t),e.r=e.l,e.l=r,e},Ce=[];let Ie=0;for(;Ie<6;)H(Ce,{first:null,last:null,size:0}),Ie+=1;const Oe=()=>{for(let e=0;e<6;e++){const t=Ce[e];if(t.size>0){if(3===e||4===e){t.size-=1;const e=Ne.v;return Ne=je(Ne.l,Ne.r),e}1===t.size&&(t.last=null);const r=t.first;return t.first=r.r,t.size-=1,r.v}}},Re=(e,t,r,n,a,o,s)=>Fe(0,{a:null,b:null,node:r,parent:n,value:a,page:t,scope:o,meta:s},e,0),Fe=(e,t,r,n)=>{const a=De(r),o=Ce[a],s={v:{idx:e,stack:t,type:r,id:n},l:null,r:null};3===a||4===a?Ne=je(Ne,s):(0===o.size?o.first=s:o.last.r=s,o.last=s),o.size+=1},De=e=>{switch(e){case'child':return 0;case'pure':return 1;case'read':return 2;case'barrier':return 3;case'sampler':return 4;case'effect':return 5;default:return-1}},qe=new Set;let _e,Pe=1,Ee=0,Ve=0,Te=null;const Be=e=>{_e=e},Le=e=>{Te=e},We=(e,t)=>{if(e){for(;e&&!e.reg[t];)e=e.parent;if(e)return e}return null},Ge=(e,t,r,n)=>{const a=We(e,r.id);return a?a.reg[r.id]:t?(Je(t,r,n),t.reg[r.id]):r};let He;const Ue=e=>e,Je=(e,r,n,a,o)=>{const s=e.reg;if(s[r.id])return;const i=r.sid,c={id:r.id,current:r.initial,meta:r.meta};if(c.id in e.values.idMap)c.current=e.values.idMap[c.id];else if(i&&i in e.values.sidMap&&!(i in e.sidIdMap)){var l;const t=null==r||null===(l=r.meta)||void 0===l?void 0:l.serialize;c.current=(e.fromSerialize&&'ignore'!==t&&(null==t?void 0:t.read)||Ue)(e.values.sidMap[i])}else if(r.before&&!o){let o=0;const i=n||!r.noInit||a;t(r.before,(t=>{switch(t.type){case'map':{const r=t.from;if((r||t.fn)&&(r&&Je(e,r,n,a),i)){const e=r&&s[r.id].current;c.current=t.fn?t.fn(e):e}break}case'field':Je(e,t.from,n,a),o||(o=1,c.current=Array.isArray(c.current)?[...c.current]:{...c.current}),i&&(c.current[t.field]=s[s[t.from.id].id].current)}}))}i&&(e.sidIdMap[i]=r.id),s[r.id]=c},Ke=(e,t,r)=>{try{return t(N(r),e.scope,r)}catch(t){console.error(t),e.fail=1,e.failReason=t}},Qe=(t,r={})=>(se(t)&&(Qe(t.or,r),e(t,((e,t)=>{ce(e)||'or'===t||'and'===t||(r[t]=e)})),Qe(t.and,r)),r),Xe=(e,t)=>{G(e.next,t),G($(e),t),G(z(e),t)},Ye=(e,t,r)=>{let n;e.next.length=0,e.seq.length=0,e.scope=null;let a=z(e);for(;n=a.pop();)Xe(n,e),(t||r&&'sample'!==e.meta.op||"crosslink"===n.family.type)&&Ye(n,t,'on'!==n.meta.op&&r);for(a=$(e);n=a.pop();)Xe(n,e),r&&"crosslink"===n.family.type&&Ye(n,t,'on'!==n.meta.op&&r)},Ze=e=>e.clear(),et=(e,{deep:t}={})=>{let r=0;if(e.ownerSet&&e.ownerSet.delete(e),_(e))Ze(j(e));else if(T(e)){r=1;const t=e.history;Ze(t.events),Ze(t.effects),Ze(t.stores),Ze(t.domains)}Ye(M(e),!!t,r)},tt=e=>d((()=>et(e))),rt=(e,t,r,n,o)=>a({node:r,parent:e,child:t,scope:{fn:o},meta:{op:n},family:{owners:[e,t],links:t},regional:1}),nt=(e,t)=>(r(ie(t),'.watch argument should be a function'),tt(a({scope:{fn:t},node:[ke({fn:he})],parent:e,meta:{op:'watch'},family:{owners:e},regional:1}))),at=(e,t,r="event")=>{C(e)&&C(e).hooks[r](t)},ot=(e,t,r)=>{const n=Qe(r),a="domain"===e,o=K(),{sid:s=null,named:c=null,domain:l=null,parent:d=l}=n,u=c||n.name||(a?'':o),p=i(u,d),f={op:t.kind=e,name:t.shortName=u,sid:t.sid=ne(s),named:c,unitId:t.id=o,serialize:n.serialize,derived:n.derived,config:n};if(t.targetable=!n.derived,t.parent=d,t.compositeName=p,t.defaultConfig=n,t.getType=()=>(U(0,'getType','compositeName.fullName'),p.fullName),!a){t.subscribe=e=>(le(e),t.watch(ie(e)?e:t=>e.next&&e.next(t))),t[S]=()=>t;const e=re();e&&(f.nativeTemplate=e)}return f},st=(e,t,r,n)=>{let a;se(r)&&(a=r,r=r.fn);const o=p({name:`${e.shortName} \u2192 *`,derived:1,and:a});return rt(e,o,n,t,r),o},ct='undefined is used to skip updates. To allow undefined as a value provide explicit { skipVoid: false } option',lt=(e,t,r,n,a)=>{const o=A(t),s=be({store:o,to:"a",priority:'read'});"map"===r&&(s.data.softRead=1);const i=[s,Se(n)];return u('storeOnMap',o,i,_(e)&&A(e)),rt(e,t,i,r,a)},dt=(t,n,a,o,i,l)=>{const d=c('combine',o),p=t?e=>[...e]:e=>({...e}),f=t?[]:{},h=p(f),g=$e(h),y=$e(1);g.type=t?'list':'shape',g.noInit=1,u('combineBase',g,y);const b=m(h,{name:s(a),derived:1,...l,and:o}),v=A(b);v.noInit=1,R(b,'isCombine',1);const k=we(g);k.order={priority:'barrier'};const x=be({store:v,to:'b',priority:'read'});x.data.softRead=1;const w=[xe(((e,t,r)=>(r.scope&&!r.scope.reg[g.id]&&(r.c=1),e))),k,be({store:y,to:'b'}),xe(((e,{key:t},r)=>{if(r.c||e!==r.a[t])return n&&r.b&&(r.a=p(r.a)),r.a[t]=e,1}),1),be({from:"a",target:g}),be({from:"value",store:0,target:y}),be({from:"value",store:1,target:y,priority:'barrier',batch:1}),we(g,1,1),i&&Se(),x];if(e(a,((e,t)=>{if(!_(e))return r(!D(e)&&!ce(e),`combine expects a store in a field ${t}`,d),void(h[t]=f[t]=e);f[t]=e.defaultState,h[t]=e.getState();const n=rt(e,b,w,'combine',i);n.scope.key=t;const a=A(e);Ae(g,{type:'field',field:t,from:a}),u('combineField',a,n)})),b.defaultShape=a,Ae(v,{type:"map",from:g,fn:i}),!re())if(i){const e=i(h);!ce(e)||l&&'skipVoid'in l||console.error(`${d}: ${ct}`),v.current=e,v.initial=e,b.defaultState=e}else b.defaultState=f;return b},ut=(e,t,r)=>{try{return[1,e(...r)]}catch(e){return t(e),[0,null]}},pt=(e,t,r,n,a)=>s=>{o({target:[n,ft],params:[r?{status:'done',params:e,result:s}:{status:'fail',params:e,error:s},{value:s,fn:r?t.rs:t.rj}],defer:1,page:a.page,scope:a.scope,meta:a.meta})},ft=a({node:[ke({fn:({fn:e,value:t})=>e(t)})],meta:{op:'fx',fx:'sidechain'}}),mt=['source','clock','target'],ht=(e,t)=>e+`: ${t} should be defined`,gt=(e,t,n,a,o,s,i,l,d,f,g,y)=>{const v=c(e,l),k=!!o;r(!ce(n)||!ce(t),ht(v,'either source or clock'));let x=0;ce(n)?x=1:D(n)||(n=h(n)),ce(t)?t=n:(ue(t,v,'clock'),Array.isArray(t)&&(t=b(t))),x&&(n=t),l||i||(i=n.shortName);let w='none';(g||a)&&(D(a)?w='unit':(r(ie(a),'`filter` should be function or unit'),w='fn')),o?(ue(o,v,'target'),pe(v,o)):'none'===w&&f&&_(n)&&_(t)?o=m(s?s(ze(A(n)),ze(A(t))):ze(A(n)),{name:i,sid:y,or:l}):(o=p({name:i,derived:1,or:l}),u('sampleTarget',M(o)));const S=$e();let $=[];if('unit'===w){const[r,n,s]=bt(a,o,t,S,e);s||$.push(...yt(n)),$.push(...yt(r))}const z=[];if(x)d&&z.push(we(S,1,1));else{const[r,a,s]=bt(n,o,t,S,e);s||z.push(...yt(a)),z.push(we(r,1,d))}const N=rt(t,o,[u('sampleSourceLoader'),be({from:"stack",target:S}),...z,...$,we(S),'fn'===w&&Se(((e,t,{a:r})=>a(e,r)),1),s&&Se(fe),u('sampleSourceUpward',k)],e,s);return ae(n,[N]),Object.assign(N.meta,l,{joint:1}),o},yt=e=>[we(e),xe(((e,t,{a:r})=>r),1)],bt=(e,t,r,n,o)=>{const s=_(e),i=s?A(e):$e(),c=$e(s);return s||a({parent:e,node:[be({from:"stack",target:i}),be({from:"value",store:1,target:c})],family:{owners:[e,t,r],links:t},meta:{op:o},regional:1}),u('sampleSource',c,i,n),[i,c,s]},vt=(e,t,r,n)=>{const a=e[t];a&&o({target:a,params:Array.isArray(a)?a.map((()=>r)):r,defer:1,stack:n})},kt=e=>!e.node.meta.isCombine||e.parent&&'combine'!==e.parent.node.meta.op,xt=e=>e;exports.allSettled=(e,{scope:t,params:r}={})=>{if(!D(e))return Promise.reject(new Error('first argument should be unit'));if(!(E(e)||P(e)||_(e)||B(e)))return Promise.reject(new Error('first argument accepts only effects, events, stores or scopes'));if(B(e))t=e;else if(!V(e)){const t=c('allSettled',M(e).meta);return Promise.reject(Error(`${t}: unit should be targetable`))}const n=g();n.parentFork=_e;const{fxCount:a}=t;H(a.scope.defers,n);const s=[],i=[];return B(e)||(H(s,e),H(i,E(e)?{params:r,req:{rs(e){n.value={status:'done',value:e}},rj(e){n.value={status:'fail',value:e}}}}:r)),H(s,a),H(i,null),o({target:s,params:i,scope:t}),n.req},exports.attach=e=>{let t;[e,t]=l(e,1);const n=c('attach',t);let{source:a,effect:s,mapParams:d,domain:u}=e;E(s)&&r(ce(u),'`domain` can only be used with a plain function',n);const p=y(e,t);R(p,'attached',1);const{runner:f}=M(p).scope;let m;const g=(e,t,r)=>{const{params:n,req:s,handler:i}=e,c=p.finally,l=pt(n,s,0,c,r),u=r.a,f=E(i);let m,h=1;if(d?[h,m]=ut(d,l,[n,u]):m=a&&f?u:n,h){if(!f)return e.args=[u,m],1;o({target:i,params:{params:m,req:{rs:pt(n,s,1,c,r),rj:l}},page:r.page,defer:1,meta:r.meta})}};if(a){let e;f.scope.runnerFn=g,_(a)?(e=a,ae(e,[p])):(e=h(a),ae(p,[e])),m=[xe((e=>e),0,1),we(A(e))],delete f.seq[1].order}else m=[xe(g,1,1)];f.seq.splice(1,0,...m),p.use(s);const b=C(s);return b&&(Object.assign(F(p),i(p.shortName,b)),p.defaultConfig.parent=b),at(s,p,"effect"),p},exports.clearNode=et,exports.combine=h,exports.createApi=(...t)=>{let[[r,n],a]=l(t);const o={};return e(n,((e,t)=>{const n=o[t]=p(t,{parent:C(r),config:a});r.on(n,e),at(r,n)})),o},exports.createDomain=function r(n,s){const i=Qe({or:s,and:'string'==typeof n?{name:n}:n}),c=a({family:{type:"domain"},regional:1,parent:(null==i?void 0:i.domain)||(null==i?void 0:i.parent)}),l={history:{},graphite:c,hooks:{}};c.meta=ot("domain",l,{parent:(null==i?void 0:i.domain)||(null==i?void 0:i.parent),or:{...i,derived:1}}),e({Event:p,Effect:y,Store:m,Domain:r},((e,r)=>{const n=r.toLowerCase(),a=p({named:`on${r}`});l.hooks[n]=a;const s=new Set;l.history[`${n}s`]=s,a.create=e=>(o(a,e),e),H(M(a).seq,xe(((e,t,r)=>(r.scope=null,e)))),a.watch((e=>{ae(l,[e]),s.add(e),e.ownerSet||(e.ownerSet=s),C(e)||(e.parent=l)})),ae(l,[a]),l[`onCreate${r}`]=e=>(t(s,e),a.watch(e)),l[`create${r}`]=l[n]=(t,r)=>{const n=Qe({and:r,or:t});return null!=n&&n.domain?e(t,r):a(e(t,{parent:l,or:n}))}}));const d=C(l);return d&&e(l.hooks,((e,t)=>rt(e,d.hooks[t]))),null!=i&&i.domain&&i.domain.hooks.domain(l),l},exports.createEffect=y,exports.createEvent=p,exports.createNode=a,exports.createStore=m,exports.createWatch=({unit:e,fn:t,scope:r,batch:n})=>{const o=[Me.run({fn:e=>t(e)})];n&&o.unshift(Me.compute({priority:'sampler',batch:1})),_(e)&&o.unshift(Me.mov({store:e.stateRef,to:'stack'}));const s=Array.isArray(e)?e:[e];if(r){const e=[],t=r.additionalLinks;return s.forEach((r=>{const n=t[r.graphite.id]||[];t[r.graphite.id]=n;const s=a({node:w(o,r),meta:{watchOp:r.kind}});n.push(s),e.push((()=>{const e=n.indexOf(s);-1!==e&&n.splice(e,1),et(s)}))})),d((()=>{e.forEach((e=>e()))}))}{const e=a({node:o,parent:s,family:{owners:s}});return d((()=>{et(e)}))}},exports.fork=(e,n)=>{let o,s=e;T(e)&&(U(0,'fork(domain)','fork()'),o=e,s=n);const i=(e=>{const r=a({scope:{defers:[],inFlight:0,fxID:0},node:[xe(((e,t,r)=>{r.parent?'dec'===r.parent.node.meta.needFxCounter?t.inFlight-=1:(t.inFlight+=1,t.fxID+=1):t.fxID+=1})),ve({priority:"sampler",batch:1}),xe(((e,r)=>{const{defers:n,fxID:a}=r;r.inFlight>0||0===n.length||Promise.resolve().then((()=>{r.fxID===a&&t(n.splice(0,n.length),(e=>{Be(e.parentFork),e.rs(e.value)}))}))}),0,1)]}),n=a({node:[xe(((e,t,r)=>{const n=r.parent;if(n){const t=n.node;if(kt(n)){const n=I(r),a=t.meta.sid;n.sidIdMap[a]=t.scope.state.id,n.values.sidMap[a]=e;const o=t.meta.serialize;o&&n.sidSerializeSettings.set(a,'ignore'===o?{ignore:1}:{ignore:0,write:o.write})}}}))]}),o=a({node:[xe(((e,t,r)=>{const n=I(r);n&&r.parent&&kt(r.parent)&&(n.warnSerialize=1)}))]}),s={cloneOf:e,reg:{},values:{sidMap:{},idMap:{}},sidIdMap:{},sidSerializeSettings:new Map,getState(e){if('current'in e)return Ge(Te,s,e,0).current;const t=M(e);return Ge(Te,s,t.scope.state,1).current},kind:"scope",graphite:a({family:{type:"domain",links:[r,n,o]},meta:{unit:'fork'},scope:{forkInFlightCounter:r}}),additionalLinks:{},handlers:{sidMap:{},unitMap:new Map},fxCount:r,storeChange:n,warnSerializeNode:o};return s})(o);if(s){if(s.values){const{sidMap:e,unitMap:n,hasSidDoubles:a}=x(s.values,(e=>r(_(e)&&V(e),'Values map can contain only writable stores as keys')));Object.assign(i.values.sidMap,e),t(n,((e,t)=>{if(i.values.idMap[t.stateRef.id]=e,i.sidIdMap[O(t,'sid')]=t.stateRef.id,'ignore'===O(t,'serialize')){const e=O(t,'sid');i.sidSerializeSettings.set(e,{ignore:1})}})),i.fromSerialize=!(Array.isArray(s.values)||s.values instanceof Map),i.hasSidDoubles=a}s.handlers&&(U(s.handlers instanceof Map||Array.isArray(s.handlers),'object with handlers','array'),i.handlers=x(s.handlers,(e=>r(E(e),"Handlers map can contain only effects as keys"))))}return i},exports.forward=e=>{const t='forward',[{from:r,to:n},o]=l(e,1),s=c(t,o);return U(0,t,'sample',s),ue(r,s,'"from"'),ue(n,s,'"to"'),pe(s,n,'to'),tt(a({parent:r,child:n,meta:{op:t,config:o},family:{},regional:1}))},exports.fromObservable=e=>{le(e);const t=S in e?e[S]():e;r(t.subscribe,'expect observable to have .subscribe');const n=p(),a=tt(n);return t.subscribe({next:n,error:a,complete:a}),n},exports.guard=(...e)=>{let[[t,r],n]=l(e);const a=c('guard',n);return U(0,'guard','sample',a),r||(r=t,t=r.source),v(r,a),gt('guard',r.clock,t,r.filter,r.target,null,r.name,n,!r.greedy,0,1)},exports.hydrate=(e,{values:n})=>{r(se(n),'values property should be an object');const{sidMap:a,unitMap:s}=x(n),i=Object.getOwnPropertyNames(a),c={};t(s,((e,t)=>{c[t.stateRef.id]=t}));const l=[],d=[];let u,p,f;B(e)?(u=e,f=1,r(u.cloneOf,'scope should be created from domain'),U(0,'hydrate(fork(domain), { values })','fork({ values })'),p=M(u.cloneOf)):T(e)?(U(0,'hydrate(domain, { values })','fork({ values })'),p=M(e)):r(0,'first argument of hydrate should be domain or scope'),k(p,((e,t)=>{if(t&&W(i,t)){H(l,e);const r=O(e,'serialize');r&&'ignore'!==r&&(a[t]=r.read(a[t])),H(d,a[t])}else e.scope.state.id in c&&(H(l,e),H(d,s.get(c[e.scope.state.id])))}),1),o({target:l,params:d,scope:u}),f&&Object.assign(u.values.sidMap,a)},exports.is=L,exports.launch=o,exports.merge=b,exports.restore=(t,n,a)=>{const o=c('restore',a);if(r(!_(t),'restore($store) is not supported',o),P(t)||E(t)){const e=C(t),r=m(n,{parent:e,name:t.shortName,and:a});return rt(E(t)?t.doneData:t,r),e&&e.hooks.store(r),r}const s=Array.isArray(t)?[]:{};return e(t,((e,t)=>s[t]=_(e)?e:m(e,{name:t}))),s},exports.sample=(...e)=>{let t,r,n,a,[[o,s,i],d]=l(e),u=1;const p=c('sample',d);return ce(s)&&se(o)&&v(o,p)&&(s=o.clock,i=o.fn,'batch'in o?u=o.batch:(U(!('greedy'in o),'greedy in sample','batch',p),u=!o.greedy),a=o.filter,t=o.target,r=o.name,n=o.sid,o=o.source),gt('sample',s,o,a,t,i,r,d,u,1,0,n)},exports.scopeBind=(e,{scope:t,safe:n}={})=>{r(t||_e||n,'scopeBind: scope not found');const a=t||_e;return t=>{function r(){Be(s)}let n,o=0;const s=_e;Be(a);try{n=e(t)}catch(e){n=e,o=1}if(r(),o)throw n;return n instanceof Promise&&n.then(r,r),n}},exports.serialize=(t,n={})=>{t.warnSerialize&&console.error('There is a store without sid in this scope, its value is omitted'),r(!t.hasSidDoubles,'duplicate sid found in this scope');const a=n.ignore?n.ignore.map((({sid:e})=>e)):[],o={};return e(t.values.sidMap,((e,r)=>{var n;if(W(a,r))return;const s=t.sidIdMap[r],i=null!==(n=t.sidSerializeSettings.get(r))&&void 0!==n?n:{ignore:0,write:xt};i.ignore||(o[r]=(0,i.write)(s&&s in t.reg?t.reg[s].current:e))})),'onlyChanges'in n&&(U(0,'onlyChanges'),n.onlyChanges||(r(t.cloneOf,'scope should be created from domain'),k(M(t.cloneOf),((e,r)=>{r in o||W(a,r)||O(e,'isCombine')||'ignore'===O(e,'serialize')||(o[r]=t.getState(e))})))),o},exports.setGraphInspector=e=>{Z=e},exports.setInspector=e=>{He=e},exports.setStoreName=(e,t)=>{e.shortName=t,Object.assign(F(e),i(t,C(e)))},exports.split=(...t)=>{const n='split';let o,s,[[i,d],f]=l(t);const m=c(n,f),h=!d;h&&(o=i.cases,d=i.match,s=i.clock,i=i.source);const g=_(d),y=!D(d)&&ie(d),b=!g&&!y&&se(d);r(D(i),'source must be a unit',m),o||(o={}),h?e(o,((e,t)=>pe(m,e,`cases.${t}`))):(r(b,'match should be an object',m),e(d,((e,t)=>o[t]=p({derived:1,named:`cases.${t}`,and:f}))),o.__=p({derived:1,named:'cases.__',and:f}));const v=new Set([].concat(i,s||[],Object.values(o))),k=Object.keys(g||y?o:d);let x;if(g||y)g&&v.add(d),x=[g&&we(A(d),0,1),ve({safe:g,filter:1,pure:!g,fn(e,t,r){const n=String(g?r.a:d(e));vt(t,W(k,n)?n:'__',e,r)}})];else if(b){const t=$e({});t.type='shape';const r=[];let n;e(d,((e,a)=>{if(D(e)){n=1,H(r,a),v.add(e);const o=rt(e,[],[we(t),xe(((e,t,{a:r})=>r[a]=e))]);if(_(e)){t.current[a]=e.getState();const r=A(e);Ae(t,{from:r,field:a,type:'field'}),u('splitMatchStore',r,o)}}})),n&&u('splitBase',t),x=[n&&we(t,0,1),Se(((e,t,n)=>{for(let a=0;a<k.length;a++){const o=k[a];if(W(r,o)?n.a[o]:d[o](e))return void vt(t,o,e,n)}vt(t,'__',e,n)}),1)]}else r(0,'expect match to be unit, function or object');const w=a({meta:{op:n},parent:s?[]:i,scope:o,node:x,family:{owners:Array.from(v)},regional:1});if(s&&gt(n,s,i,null,w,null,n,f,0,0,0),!h)return o},exports.step=Me,exports.version="23.2.0",exports.withFactory=({sid:e,name:t,loc:r,method:o,fn:s})=>n(a({meta:{sidRoot:ne(e),sid:e,name:t,loc:r,method:o,type:'factory'}}),s),exports.withRegion=n;
//# sourceMappingURL=effector.cjs.js.map

@@ -1,2 +0,2 @@

((e,t)=>{'object'==typeof exports&&'undefined'!=typeof module?t(exports):'function'==typeof define&&define.amd?define(['exports'],t):t((e='undefined'!=typeof globalThis?globalThis:e||self).effector={})})(this,(e=>{function t(e,t){for(const r in e)t(e[r],r)}function r(e,t){e.forEach(t)}function n(e,t,r){if(!e)throw Error(`${r?r+': ':''}${t}`)}function a(e,t){const r=D(e).meta||{};ue={id:D(e).id,parent:ue,value:e,template:r.template||pe(),sidRoot:r.sidRoot||ue&&ue.sidRoot,meta:r};try{return t()}finally{fe('region'),ue=V(ue)}}function o({node:e=[],from:t,source:n,parent:a=t||n,to:o,target:s,child:i=o||s,scope:c={},meta:l={},family:d={type:'regular'},regional:u}={}){const f=ge(a),p=ge(d.links),m=ge(d.owners),h=[];r(e,(e=>e&&ne(h,e)));const g={id:ce(),seq:h,next:ge(i),meta:l,scope:c,family:{type:d.type||I,links:p,owners:m}};return r(p,(e=>ne(q(e),g))),r(m,(e=>ne(_(e),g))),r(f,(e=>ne(e.next,g))),u&&ue&&he(E(ue),[g]),g}function s(e,t,n){let a,o=Ye,s=null,i=Je;if(e.target&&(t=e.params,n=e.defer,a=e.meta,o='page'in e?e.page:o,e.stack&&(s=e.stack),i=B(e)||i,e=e.target),i&&Je&&i!==Je&&(Je=null),Array.isArray(e))for(let r=0;r<e.length;r++)We('pure',o,D(e[r]),s,t[r],i,a);else We('pure',o,D(e),s,t,i,a);if(n&&!Ke)return;const c={isRoot:Ke,currentPage:Ye,scope:Je,isWatch:Qe,isPure:Xe};let l,d,u,f,p,m;Ke=0;e:for(;f=Le();){const{idx:e,stack:t,type:n}=f;u=t.node,Ye=p=t.page,Je=B(t),p?m=p.reg:Je&&(m=Je.reg);const a=!!p,o=!!Je,s={fail:0,scope:u.scope};l=d=0;for(let r=e;r<u.seq.length&&!l;r++){const i=u.seq[r];if(i.order){const{priority:a,barrierID:o}=i.order,s=o?p?`${p.fullID}_${o}`:o:0;if(r!==e||n!==a){o?Ue.has(s)||(Ue.add(s),Ge(r,t,a,o)):Ge(r,t,a,0);continue e}o&&Ue.delete(s)}switch(i.type){case'mov':{const e=i.data;let r;switch(e.from){case'stack':r=E(t);break;case'a':case'b':r=t[e.from];break;case'value':r=e.store;break;case'store':if(m&&!m[e.store.id])if(a){const r=tt(p,e.store.id);t.page=p=r,r?m=r.reg:o?(ot(Je,e.store,0,1,e.softRead),m=Je.reg):m=void 0}else o&&ot(Je,e.store,0,1,e.softRead);r=_e(m&&m[e.store.id]||e.store)}switch(e.to){case'stack':t.value=r;break;case'a':case'b':t[e.to]=r;break;case'store':rt(p,Je,e.target,0).current=r}break}case'compute':const e=i.data;if(e.fn){Qe='watch'===u.meta.op,Xe=e.pure;const r=e.safe?(0,e.fn)(E(t),s.scope,t):st(s,e.fn,t);e.filter?d=!r:t.value=r,Qe=c.isWatch,Xe=c.isPure}}l=s.fail||d}if(nt&&nt(t,s),!l){const e=E(t),n=B(t);if(r(u.next,(r=>{We('child',p,r,t,e,n)})),n){u.meta.needFxCounter&&We('child',p,n.fxCount,t,e,n),u.meta.storeChange&&We('child',p,n.storeChange,t,e,n),u.meta.warnSerialize&&We('child',p,n.warnSerializeNode,t,e,n);const a=n.additionalLinks[u.id];a&&r(a,(r=>{We('child',p,r,t,e,n)}))}}}Ke=c.isRoot,Ye=c.currentPage,Je=B(c)}function i(e,r="combine"){let n=r+'(',a='',o=0;return t(e,(e=>{o<25&&(null!=e&&(n+=a,n+=H(e)?G(e).fullName:e.toString()),o+=1,a=', ')})),n+')'}function c(e,t){let r,n;const a=e;if(t){const a=G(t);0===e.length?(r=a.path,n=a.fullName):(r=a.path.concat([e]),n=0===a.fullName.length?e:a.fullName+'/'+e)}else r=0===e.length?[]:[e],n=e;return{shortName:a,fullName:n,path:r}}function l(e,t){if(!t)return e;if(!t.name&&!t.named&&!t.loc)return e;let r=`[${e}]`;const n=t.named||t.name;n&&(r+=` unit '${n}'`);const a=t.loc;return!n&&a&&(r+=` (${a.file}:${a.line}:${a.column})`),r}function d(e,t){const r=t?e:e[0];ke(r);let n=r.or;const a=r.and;if(a){const r=t?a:a[0];if(ye(r)&&'and'in r){const r=d(a,t);e=r[0],n={...n,...r[1]}}else e=a}return[e,n]}function u(e){const t=()=>e();return t.unsubscribe=()=>e(),t}function f(e,...t){const r=pe();if(r){const n=r.handlers[e];if(n)return n(r,...t)}}function p(e,t){const r=ct({or:t,and:'string'==typeof e?{name:e}:e}),a=l('event',r),i=(e,...t)=>(n(!L(i,'derived'),'call of derived event is not supported, use createEvent instead',a),n(!Xe,'unit call from pure function is not supported, use operators like sample instead',a),Ye?((e,t,r,n)=>{const a=Ye;let o=null;if(t)for(o=Ye;o&&o.template!==t;)o=V(o);et(o);const s=e.create(r,n);return et(a),s})(i,c,e,t):i.create(e,t)),c=pe(),d=Object.assign(i,{graphite:o({meta:yt(r.actualOp||z,i,r),regional:1}),create:e=>(s({target:i,params:e,scope:Je}),e),watch:e=>ht(i,e),map:e=>bt(i,O,e,[Re()]),filter:e=>bt(i,'filter',e.fn?e:e.fn,[Re(ze,1)]),filterMap:e=>bt(i,'filterMap',e,[Re(),Oe((e=>!ve(e)),1)]),prepend(e){n(i.targetable,'.prepend of derived event is not supported, call source event instead',a);const t=p('* \u2192 '+i.shortName,{parent:V(i)});return f('eventPrepend',D(t)),mt(t,i,[Re()],'prepend',e),gt(i,t),t}});return null!=r&&r.domain&&r.domain.hooks.event(d),W(d,'id',d.graphite.id),fe(d.graphite),d}function m(e,t,a,o,s){return Se(a,`${s} ${t}`,'first argument'),n(be(o),'second argument should be a function',s),ae(!L(e,'derived'),`${t} in derived store`,`${t} in store created via createStore`,s),r(Array.isArray(a)?a:[a],(t=>{e.off(t),T(e).set(t,pt(kt(t,e,'on',xe,o)))})),e}function h(e,t){const a=ct(t),i=qe(e),c=l('store',a),d=p({named:'updates',derived:1});f('storeBase',i);const u=i.id,g='skipVoid'in a,y=g&&!a.skipVoid;ae(!(g&&a.skipVoid),'{skipVoid: true}','updateFilter',c);const b={subscribers:new Map,updates:d,defaultState:e,stateRef:i,getState(){let e,t=i;if(Ye){let t=Ye;for(;t&&!t.reg[u];)t=V(t);t&&(e=t)}return!e&&Je&&(ot(Je,i,1),e=Je),e&&(t=e.reg[u]),_e(t)},setState:e=>s({target:b,params:e,defer:1,scope:Je}),reset:(...e)=>(n(b.targetable,'.reset of derived store is not supported',c),r(e,(e=>m(b,'.reset',e,(()=>b.defaultState),c))),b),on:(e,t)=>(n(b.targetable,'.on of derived store is not supported',c),m(b,'.on',e,t,c)),off(e){const t=T(b).get(e);return t&&(t(),T(b).delete(e)),b},map(e,t){let r,n;ye(e)&&(r=e,e=e.fn);const a=b.getState(),o=ve(a);pe()?n=null:(!o||o&&y)&&(n=e(a));const s=h(n,{name:`${b.shortName} \u2192 *`,derived:1,...t,and:r}),c=kt(b,s,O,ze,e);return Pe(P(s),{type:O,fn:e,from:i}),P(s).noInit=1,f('storeMap',i,c),s},watch(e,t){if(ae(!t,'watch second argument','sample',c),!t||!H(e)){const t=ht(b,e);return f('storeWatch',i,e)||e(b.getState()),t}return n(be(t),'second argument should be a function',c),e.watch((e=>t(b.getState(),e)))}},v=yt(x,b,a),k=b.defaultConfig.updateFilter;b.graphite=o({scope:{state:i,fn:k},node:[Oe(((e,t,r)=>(r.scope&&!r.scope.reg[i.id]&&(r.b=1),e))),Fe(i),Oe(((e,t,{a:r,b:n})=>{const a=ve(e);return a&&!g&&console.error(`${c}: ${vt}`),(a&&y||!a)&&(e!==r||n)}),1),k&&Re($e,1),je({from:F,target:i})],child:d,meta:{...v,defaultState:e},regional:1}),W(b,'id',b.graphite.id),W(b,'rootStateRefId',u);const w=L(b,'serialize'),S=L(b,'derived'),M='ignore'===w,$=L(b,'sid');$&&(W(b,'storeChange',1),i.sid=$),$||M||S||W(b,'warnSerialize',1);const z=ve(e);return n(S||!z||z&&y,vt,c),S&&z&&!g&&console.error(`${c}: ${vt}`),he(b,[d]),null!=a&&a.domain&&a.domain.hooks.store(b),S||(b.reinit=p({named:'reinit'}),b.reset(b.reinit)),i.meta=b.graphite.meta,fe(b.graphite),b}function g(...e){let t,r,a;[e,a]=d(e);const o=l('combine',a),s=e[e.length-1],i=!J(s)&&ye(s),c=i&&s,u=i?e[e.length-2]:s;let f,p,m;if(be(u)?(r=e.slice(0,i?-2:-1),t=u):r=e,1===r.length){const e=r[0];J(e)||(f=e,p=1)}if(!p&&(f=r,t)){m=1;const e=t;t=t=>e(...t)}return n(ye(f),`${o}: shape should be an object`),wt(Array.isArray(f),!m,f,a,t,c)}function y(){const e={};return e.req=new Promise(((t,r)=>{e.rs=t,e.rj=r})),e.req.catch((()=>{})),e}function b(e,t={}){const r=ct(be(e)?{handler:e}:e,t),a=l('effect',r),i=p(be(e)?{handler:e}:e,{...t,actualOp:A}),c=D(i);W(c,'op',i.kind=A),i.use=e=>(n(be(e),'.use argument should be a function',a),b.scope.handler=e,i),i.use.getCurrent=()=>b.scope.handler;const d=i.finally=p({named:'finally',derived:1}),u=i.done=d.filterMap({named:'done',fn({status:e,params:t,result:r}){if('done'===e)return{params:t,result:r}}}),f=i.fail=d.filterMap({named:'fail',fn({status:e,params:t,error:r}){if('fail'===e)return{params:t,error:r}}}),m=i.doneData=u.map({named:'doneData',fn:({result:e})=>e}),g=i.failData=f.map({named:'failData',fn:({error:e})=>e}),b=o({scope:{handler:i.defaultConfig.handler||(()=>n(0,`no handler used in ${i.compositeName.fullName}`))},node:[Oe(((e,t,r)=>{let n=t.handler;const a=B(r);if(a){const e=a.handlers.unitMap.get(i)||a.handlers.sidMap[i.sid];e&&(n=e)}return e.handler=n,e}),0,1),Oe(((e,t,r)=>{if(t.runnerFn&&!t.runnerFn(e,null,r))return;const{params:n,req:a,handler:o,args:s=[n]}=e,i=Mt(n,a,1,d,r),c=Mt(n,a,0,d,r),[l,u]=St(o,c,s);l&&(ye(u)&&be(u.then)?u.then(i,c):i(u))}),0,1)],meta:{op:'fx',fx:'runner'}});c.scope.runner=b,ne(c.seq,Oe(((e,{runner:t},r)=>{const n=V(r)?{params:e,req:{rs(e){},rj(e){}}}:e;return r.meta||(r.meta={fxID:le()}),s({target:t,params:n,defer:1,scope:B(r),meta:r.meta}),n.params}))),i.create=e=>{const t=y(),r={params:e,req:t};if(Je&&!Qe){const e=Je;t.req.finally((()=>{Ze(e)})).catch((()=>{}))}return s({target:i,params:r,scope:Je}),t.req};const v=i.inFlight=h(0,{serialize:'ignore',named:(L(i,'name')||i.graphite.id)+'.inFlight'}).on(i,(e=>e+1)).on(d,(e=>e-1)).map({fn:e=>e,named:'inFlight'});W(d,'needFxCounter','dec'),W(i,'needFxCounter',1);const k=i.pending=v.map({fn:e=>e>0,named:'pending'});return he(i,[d,u,f,m,g,k,v]),null!=r&&r.domain&&r.domain.hooks.effect(i),i}function v(e,t){const r=l('merge',t);Se(e,r,'first argument');const n=p({name:i(e,'merge'),derived:1,and:t});return mt(e,n,[],'merge'),n}function k(e,t){let a=0;return r(xt,(r=>{r in e&&(n(null!=e[r],zt(t,r)),a=1)})),a}function w(e,t,n){const a=[];(function e(o){te(a,o)||(ne(a,o),L(o,'op')===x&&(n||L(o,'sid'))&&t(o,L(o,'sid')),r(o.next,e),r(q(o),e),r(_(o),e))})(e)}function S(e,t){const a=Array.isArray(e)?new Map(e):e,o=new Map;let s=0;if(a instanceof Map){const e={};return r(a,((r,a)=>{n(H(a),'Map key should be a unit'),t&&t(a,r),a.sid&&(a.sid in e&&(s=1),e[a.sid]=r),o.set(a,r)})),{sidMap:e,unitMap:o,hasSidDoubles:s}}return{sidMap:a,unitMap:o}}function M(e,t){return J(t)?[De.mov({store:t.stateRef,to:'stack'}),...e]:e}const $='undefined'!=typeof Symbol&&Symbol.observable||'@@observable',x='store',z='event',A='effect',N='domain',j='scope',C='sampler',I='crosslink',O='map',F='stack',R='value',D=e=>e.graphite||e,q=e=>e.family.owners,_=e=>e.family.links,P=e=>e.stateRef,E=e=>e.value,T=e=>e.subscribers,V=e=>e.parent,B=e=>e.scope,L=(e,t)=>D(e).meta[t],W=(e,t,r)=>D(e).meta[t]=r,G=e=>e.compositeName,H=e=>(be(e)||ye(e))&&'kind'in e,U=e=>t=>H(t)&&t.kind===e,J=U(x),K=U(z),Q=U(A),X=e=>H(e)&&!!e.targetable,Y=U(N),Z=U(j);var ee={__proto__:null,unit:H,store:J,event:K,effect:Q,targetable:X,domain:Y,scope:Z,attached:e=>Q(e)&&1==L(e,'attached')};const te=(e,t)=>e.includes(t),re=(e,t)=>{const r=e.indexOf(t);-1!==r&&e.splice(r,1)},ne=(e,t)=>e.push(t),ae=(e,t,r,n)=>!e&&console.error(`${n?n+': ':''}${t} is deprecated${r?`, use ${r} instead`:''}`),oe=()=>{let e=0;return()=>""+ ++e},se=oe(),ie=oe(),ce=oe(),le=oe();let de,ue=null;const fe=e=>{de&&de(e,ue)},pe=()=>ue&&ue.template,me=e=>(e&&ue&&ue.sidRoot&&(e=`${ue.sidRoot}|${e}`),e),he=(e,t)=>{const n=D(e);r(t,(e=>{const t=D(e);n.family.type!==N&&(t.family.type=I),ne(q(t),n),ne(_(n),t)}))},ge=(e=[])=>(Array.isArray(e)?e:[e]).flat().map(D),ye=e=>'object'==typeof e&&null!==e,be=e=>'function'==typeof e,ve=e=>void 0===e,ke=e=>n(ye(e)||be(e),'expect first argument be an object'),we=(e,t,r,a)=>n(!(!ye(e)&&!be(e)||!('family'in e)&&!('graphite'in e)),`${t}: expect ${r} to be a unit (store, event or effect)${a}`),Se=(e,t,n)=>{Array.isArray(e)?r(e,((e,r)=>we(e,t,`${r} item of ${n}`,''))):we(e,t,n,' or array of units')},Me=(e,t,a="target")=>r(ge(t),(t=>n(!L(t,'derived'),`${e}: derived unit in "${a}" is not supported, use createStore/createEvent instead"`))),$e=(e,{fn:t},{a:r})=>t(e,r),xe=(e,{fn:t},{a:r})=>t(r,e),ze=(e,{fn:t})=>t(e),Ae=(e,t,r,n)=>{const a={id:ie(),type:e,data:t};return r&&(a.order={priority:r},n&&(a.order.barrierID=++Ne)),a};let Ne=0;const je=({from:e=x,store:t,target:r,to:n=(r?x:F),batch:a,priority:o})=>Ae('mov',{from:e,store:t,to:n,target:r},o,a),Ce=({fn:e,batch:t,priority:r,safe:n=0,filter:a=0,pure:o=0})=>Ae('compute',{fn:e,safe:n,filter:a,pure:o},r,t),Ie=({fn:e})=>Ce({fn:e,priority:A}),Oe=(e,t,r)=>Ce({fn:e,safe:1,filter:t,priority:r&&A}),Fe=(e,t,r)=>je({store:e,to:t?F:"a",priority:r&&C,batch:1}),Re=(e=ze,t)=>Ce({fn:e,pure:1,filter:t}),De={mov:je,compute:Ce,filter:({fn:e,pure:t})=>Ce({fn:e,filter:1,pure:t}),run:Ie},qe=e=>({id:ie(),current:e,initial:e}),_e=({current:e})=>e,Pe=(e,t)=>{e.before||(e.before=[]),ne(e.before,t)};let Ee=null;const Te=(e,t)=>{if(!e)return t;if(!t)return e;let r;return(e.v.type===t.v.type&&e.v.id>t.v.id||He(e.v.type)>He(t.v.type))&&(r=e,e=t,t=r),r=Te(e.r,t),e.r=e.l,e.l=r,e},Ve=[];let Be=0;for(;Be<6;)ne(Ve,{first:null,last:null,size:0}),Be+=1;const Le=()=>{for(let e=0;e<6;e++){const t=Ve[e];if(t.size>0){if(3===e||4===e){t.size-=1;const e=Ee.v;return Ee=Te(Ee.l,Ee.r),e}1===t.size&&(t.last=null);const r=t.first;return t.first=r.r,t.size-=1,r.v}}},We=(e,t,r,n,a,o,s)=>Ge(0,{a:null,b:null,node:r,parent:n,value:a,page:t,scope:o,meta:s},e,0),Ge=(e,t,r,n)=>{const a=He(r),o=Ve[a],s={v:{idx:e,stack:t,type:r,id:n},l:null,r:null};3===a||4===a?Ee=Te(Ee,s):(0===o.size?o.first=s:o.last.r=s,o.last=s),o.size+=1},He=e=>{switch(e){case'child':return 0;case'pure':return 1;case'read':return 2;case'barrier':return 3;case'sampler':return 4;case'effect':return 5;default:return-1}},Ue=new Set;let Je,Ke=1,Qe=0,Xe=0,Ye=null;const Ze=e=>{Je=e},et=e=>{Ye=e},tt=(e,t)=>{if(e){for(;e&&!e.reg[t];)e=e.parent;if(e)return e}return null},rt=(e,t,r,n)=>{const a=tt(e,r.id);return a?a.reg[r.id]:t?(ot(t,r,n),t.reg[r.id]):r};let nt;const at=e=>e,ot=(e,t,n,a,o)=>{const s=e.reg;if(s[t.id])return;const i=t.sid,c={id:t.id,current:t.initial,meta:t.meta};if(c.id in e.values.idMap)c.current=e.values.idMap[c.id];else if(i&&i in e.values.sidMap&&!(i in e.sidIdMap)){var l;const r=null==t||null===(l=t.meta)||void 0===l?void 0:l.serialize;c.current=(e.fromSerialize&&'ignore'!==r&&(null==r?void 0:r.read)||at)(e.values.sidMap[i])}else if(t.before&&!o){let o=0;const i=n||!t.noInit||a;r(t.before,(t=>{switch(t.type){case'map':{const r=t.from;if((r||t.fn)&&(r&&ot(e,r,n,a),i)){const e=r&&s[r.id].current;c.current=t.fn?t.fn(e):e}break}case'field':ot(e,t.from,n,a),o||(o=1,c.current=Array.isArray(c.current)?[...c.current]:{...c.current}),i&&(c.current[t.field]=s[s[t.from.id].id].current)}}))}i&&(e.sidIdMap[i]=t.id),s[t.id]=c},st=(e,t,r)=>{try{return t(E(r),e.scope,r)}catch(t){console.error(t),e.fail=1,e.failReason=t}},ct=(e,r={})=>(ye(e)&&(ct(e.or,r),t(e,((e,t)=>{ve(e)||'or'===t||'and'===t||(r[t]=e)})),ct(e.and,r)),r),lt=(e,t)=>{re(e.next,t),re(q(e),t),re(_(e),t)},dt=(e,t,r)=>{let n;e.next.length=0,e.seq.length=0,e.scope=null;let a=_(e);for(;n=a.pop();)lt(n,e),(t||r&&'sample'!==e.meta.op||n.family.type===I)&&dt(n,t,'on'!==n.meta.op&&r);for(a=q(e);n=a.pop();)lt(n,e),r&&n.family.type===I&&dt(n,t,'on'!==n.meta.op&&r)},ut=e=>e.clear(),ft=(e,{deep:t}={})=>{let r=0;if(e.ownerSet&&e.ownerSet.delete(e),J(e))ut(T(e));else if(Y(e)){r=1;const t=e.history;ut(t.events),ut(t.effects),ut(t.stores),ut(t.domains)}dt(D(e),!!t,r)},pt=e=>u((()=>ft(e))),mt=(e,t,r,n,a)=>o({node:r,parent:e,child:t,scope:{fn:a},meta:{op:n},family:{owners:[e,t],links:t},regional:1}),ht=(e,t)=>(n(be(t),'.watch argument should be a function'),pt(o({scope:{fn:t},node:[Ie({fn:ze})],parent:e,meta:{op:'watch'},family:{owners:e},regional:1}))),gt=(e,t,r=z)=>{V(e)&&V(e).hooks[r](t)},yt=(e,t,r)=>{const n=ct(r),a=e===N,o=se(),{sid:s=null,named:i=null,domain:l=null,parent:d=l}=n,u=i||n.name||(a?'':o),f=c(u,d),p={op:t.kind=e,name:t.shortName=u,sid:t.sid=me(s),named:i,unitId:t.id=o,serialize:n.serialize,derived:n.derived,config:n};if(t.targetable=!n.derived,t.parent=d,t.compositeName=f,t.defaultConfig=n,t.getType=()=>(ae(0,'getType','compositeName.fullName'),f.fullName),!a){t.subscribe=e=>(ke(e),t.watch(be(e)?e:t=>e.next&&e.next(t))),t[$]=()=>t;const e=pe();e&&(p.nativeTemplate=e)}return p},bt=(e,t,r,n)=>{let a;ye(r)&&(a=r,r=r.fn);const o=p({name:`${e.shortName} \u2192 *`,derived:1,and:a});return mt(e,o,n,t,r),o},vt='undefined is used to skip updates. To allow undefined as a value provide explicit { skipVoid: false } option',kt=(e,t,r,n,a)=>{const o=P(t),s=je({store:o,to:"a",priority:'read'});r===O&&(s.data.softRead=1);const i=[s,Re(n)];return f('storeOnMap',o,i,J(e)&&P(e)),mt(e,t,i,r,a)},wt=(e,r,a,o,s,c)=>{const d=l('combine',o),u=e?e=>[...e]:e=>({...e}),p=e?[]:{},m=u(p),g=qe(m),y=qe(1);g.type=e?'list':'shape',g.noInit=1,f('combineBase',g,y);const b=h(m,{name:i(a),derived:1,...c,and:o}),v=P(b);v.noInit=1,W(b,'isCombine',1);const k=Fe(g);k.order={priority:'barrier'};const w=je({store:v,to:'b',priority:'read'});w.data.softRead=1;const S=[Oe(((e,t,r)=>(r.scope&&!r.scope.reg[g.id]&&(r.c=1),e))),k,je({store:y,to:'b'}),Oe(((e,{key:t},n)=>{if(n.c||e!==n.a[t])return r&&n.b&&(n.a=u(n.a)),n.a[t]=e,1}),1),je({from:"a",target:g}),je({from:R,store:0,target:y}),je({from:R,store:1,target:y,priority:'barrier',batch:1}),Fe(g,1,1),s&&Re(),w];if(t(a,((e,t)=>{if(!J(e))return n(!H(e)&&!ve(e),`combine expects a store in a field ${t}`,d),void(m[t]=p[t]=e);p[t]=e.defaultState,m[t]=e.getState();const r=mt(e,b,S,'combine',s);r.scope.key=t;const a=P(e);Pe(g,{type:'field',field:t,from:a}),f('combineField',a,r)})),b.defaultShape=a,Pe(v,{type:O,from:g,fn:s}),!pe())if(s){const e=s(m);!ve(e)||c&&'skipVoid'in c||console.error(`${d}: ${vt}`),v.current=e,v.initial=e,b.defaultState=e}else b.defaultState=p;return b},St=(e,t,r)=>{try{return[1,e(...r)]}catch(e){return t(e),[0,null]}},Mt=(e,t,r,n,a)=>o=>{s({target:[n,$t],params:[r?{status:'done',params:e,result:o}:{status:'fail',params:e,error:o},{value:o,fn:r?t.rs:t.rj}],defer:1,page:a.page,scope:a.scope,meta:a.meta})},$t=o({node:[Ie({fn:({fn:e,value:t})=>e(t)})],meta:{op:'fx',fx:'sidechain'}}),xt=['source','clock','target'],zt=(e,t)=>e+`: ${t} should be defined`,At=(e,t,r,a,o,s,i,c,d,u,m,y)=>{const b=l(e,c),k=!!o;n(!ve(r)||!ve(t),zt(b,'either source or clock'));let w=0;ve(r)?w=1:H(r)||(r=g(r)),ve(t)?t=r:(Se(t,b,'clock'),Array.isArray(t)&&(t=v(t))),w&&(r=t),c||i||(i=r.shortName);let S='none';(m||a)&&(H(a)?S='unit':(n(be(a),'`filter` should be function or unit'),S='fn')),o?(Se(o,b,'target'),Me(b,o)):'none'===S&&u&&J(r)&&J(t)?o=h(s?s(_e(P(r)),_e(P(t))):_e(P(r)),{name:i,sid:y,or:c}):(o=p({name:i,derived:1,or:c}),f('sampleTarget',D(o)));const M=qe();let $=[];if('unit'===S){const[r,n,s]=jt(a,o,t,M,e);s||$.push(...Nt(n)),$.push(...Nt(r))}const x=[];if(w)d&&x.push(Fe(M,1,1));else{const[n,a,s]=jt(r,o,t,M,e);s||x.push(...Nt(a)),x.push(Fe(n,1,d))}const z=mt(t,o,[f('sampleSourceLoader'),je({from:F,target:M}),...x,...$,Fe(M),'fn'===S&&Re(((e,t,{a:r})=>a(e,r)),1),s&&Re($e),f('sampleSourceUpward',k)],e,s);return he(r,[z]),Object.assign(z.meta,c,{joint:1}),o},Nt=e=>[Fe(e),Oe(((e,t,{a:r})=>r),1)],jt=(e,t,r,n,a)=>{const s=J(e),i=s?P(e):qe(),c=qe(s);return s||o({parent:e,node:[je({from:F,target:i}),je({from:R,store:1,target:c})],family:{owners:[e,t,r],links:t},meta:{op:a},regional:1}),f('sampleSource',c,i,n),[i,c,s]},Ct=(e,t,r,n)=>{const a=e[t];a&&s({target:a,params:Array.isArray(a)?a.map((()=>r)):r,defer:1,stack:n})},It=e=>!e.node.meta.isCombine||e.parent&&'combine'!==e.parent.node.meta.op,Ot=e=>e;e.allSettled=(e,{scope:t,params:r}={})=>{if(!H(e))return Promise.reject(new Error('first argument should be unit'));if(!(Q(e)||K(e)||J(e)||Z(e)))return Promise.reject(new Error('first argument accepts only effects, events, stores or scopes'));Z(e)&&(t=e);const n=y();n.parentFork=Je;const{fxCount:a}=t;ne(a.scope.defers,n);const o=[],i=[];return Z(e)||(ne(o,e),ne(i,Q(e)?{params:r,req:{rs(e){n.value={status:'done',value:e}},rj(e){n.value={status:'fail',value:e}}}}:r)),ne(o,a),ne(i,null),s({target:o,params:i,scope:t}),n.req},e.attach=e=>{let t;[e,t]=d(e,1);const r=l('attach',t);let{source:a,effect:o,mapParams:i,domain:u}=e;Q(o)&&n(ve(u),'`domain` can only be used with a plain function',r);const f=b(e,t);W(f,'attached',1);const{runner:p}=D(f).scope;let m;const h=(e,t,r)=>{const{params:n,req:o,handler:c}=e,l=f.finally,d=Mt(n,o,0,l,r),u=r.a,p=Q(c);let m,h=1;if(i?[h,m]=St(i,d,[n,u]):m=a&&p?u:n,h){if(!p)return e.args=[u,m],1;s({target:c,params:{params:m,req:{rs:Mt(n,o,1,l,r),rj:d}},page:r.page,defer:1,meta:r.meta})}};if(a){let e;p.scope.runnerFn=h,J(a)?(e=a,he(e,[f])):(e=g(a),he(f,[e])),m=[Oe((e=>e),0,1),Fe(P(e))],delete p.seq[1].order}else m=[Oe(h,1,1)];p.seq.splice(1,0,...m),f.use(o);const y=V(o);return y&&(Object.assign(G(f),c(f.shortName,y)),f.defaultConfig.parent=y),gt(o,f,A),f},e.clearNode=ft,e.combine=g,e.createApi=(...e)=>{let[[r,n],a]=d(e);const o={};return t(n,((e,t)=>{const n=o[t]=p(t,{parent:V(r),config:a});r.on(n,e),gt(r,n)})),o},e.createDomain=function e(n,a){const i=ct({or:a,and:'string'==typeof n?{name:n}:n}),c=o({family:{type:N},regional:1,parent:(null==i?void 0:i.domain)||(null==i?void 0:i.parent)}),l={history:{},graphite:c,hooks:{}};c.meta=yt(N,l,{parent:(null==i?void 0:i.domain)||(null==i?void 0:i.parent),or:{...i,derived:1}}),t({Event:p,Effect:b,Store:h,Domain:e},((e,t)=>{const n=t.toLowerCase(),a=(e=>p({named:e}))(`on${t}`);l.hooks[n]=a;const o=new Set;l.history[`${n}s`]=o,a.create=e=>(s(a,e),e),ne(D(a).seq,Oe(((e,t,r)=>(r.scope=null,e)))),a.watch((e=>{he(l,[e]),o.add(e),e.ownerSet||(e.ownerSet=o),V(e)||(e.parent=l)})),he(l,[a]),l[`onCreate${t}`]=e=>(r(o,e),a.watch(e)),l[`create${t}`]=l[n]=(t,r)=>{const n=ct({and:r,or:t});return null!=n&&n.domain?e(t,r):a(e(t,{parent:l,or:n}))}}));const d=V(l);return d&&t(l.hooks,((e,t)=>mt(e,d.hooks[t]))),null!=i&&i.domain&&i.domain.hooks.domain(l),l},e.createEffect=b,e.createEvent=p,e.createNode=o,e.createStore=h,e.createWatch=({unit:e,fn:t,scope:r,batch:n})=>{const a=[De.run({fn:e=>t(e)})];n&&a.unshift(De.compute({priority:'sampler',batch:1})),J(e)&&a.unshift(De.mov({store:e.stateRef,to:'stack'}));const s=Array.isArray(e)?e:[e];if(r){const e=[],t=r.additionalLinks;return s.forEach((r=>{const n=t[r.graphite.id]||[];t[r.graphite.id]=n;const s=o({node:M(a,r),meta:{watchOp:r.kind}});n.push(s),e.push((()=>{const e=n.indexOf(s);-1!==e&&n.splice(e,1),ft(s)}))})),u((()=>{e.forEach((e=>e()))}))}{const e=o({node:a,parent:s,family:{owners:s}});return u((()=>{ft(e)}))}},e.fork=(e,t)=>{let a,s=e;Y(e)&&(ae(0,'fork(domain)','fork()'),a=e,s=t);const i=(e=>{const t=o({scope:{defers:[],inFlight:0,fxID:0},node:[Oe(((e,t,r)=>{r.parent?'dec'===r.parent.node.meta.needFxCounter?t.inFlight-=1:(t.inFlight+=1,t.fxID+=1):t.fxID+=1})),Ce({priority:C,batch:1}),Oe(((e,t)=>{const{defers:n,fxID:a}=t;t.inFlight>0||0===n.length||Promise.resolve().then((()=>{t.fxID===a&&r(n.splice(0,n.length),(e=>{Ze(e.parentFork),e.rs(e.value)}))}))}),0,1)]}),n=o({node:[Oe(((e,t,r)=>{const n=r.parent;if(n){const t=n.node;if(It(n)){const n=B(r),a=t.meta.sid;n.sidIdMap[a]=t.scope.state.id,n.values.sidMap[a]=e;const o=t.meta.serialize;o&&n.sidSerializeSettings.set(a,'ignore'===o?{ignore:1}:{ignore:0,write:o.write})}}}))]}),a=o({node:[Oe(((e,t,r)=>{const n=B(r);n&&r.parent&&It(r.parent)&&(n.warnSerialize=1)}))]}),s={cloneOf:e,reg:{},values:{sidMap:{},idMap:{}},sidIdMap:{},sidSerializeSettings:new Map,getState(e){if('current'in e)return rt(Ye,s,e,0).current;const t=D(e);return rt(Ye,s,t.scope.state,1).current},kind:j,graphite:o({family:{type:N,links:[t,n,a]},meta:{unit:'fork'},scope:{forkInFlightCounter:t}}),additionalLinks:{},handlers:{sidMap:{},unitMap:new Map},fxCount:t,storeChange:n,warnSerializeNode:a};return s})(a);if(s){if(s.values){const{sidMap:e,unitMap:t,hasSidDoubles:a}=S(s.values,(e=>n(J(e)&&X(e),'Values map can contain only writable stores as keys')));Object.assign(i.values.sidMap,e),r(t,((e,t)=>{if(i.values.idMap[t.stateRef.id]=e,'ignore'===L(t,'serialize')){const e=L(t,'sid');i.sidSerializeSettings.set(e,{ignore:1})}})),i.fromSerialize=!(Array.isArray(s.values)||s.values instanceof Map),i.hasSidDoubles=a}s.handlers&&(ae(s.handlers instanceof Map||Array.isArray(s.handlers),'object with handlers','array'),i.handlers=S(s.handlers,(e=>n(Q(e),"Handlers map can contain only effects as keys"))))}return i},e.forward=e=>{const t='forward',[{from:r,to:n},a]=d(e,1),s=l(t,a);return ae(0,t,'sample',s),Se(r,s,'"from"'),Se(n,s,'"to"'),Me(s,n,'to'),pt(o({parent:r,child:n,meta:{op:t,config:a},family:{},regional:1}))},e.fromObservable=e=>{ke(e);const t=$ in e?e[$]():e;n(t.subscribe,'expect observable to have .subscribe');const r=p(),a=pt(r);return t.subscribe({next:r,error:a,complete:a}),r},e.guard=(...e)=>{let[[t,r],n]=d(e);const a=l('guard',n);return ae(0,'guard','sample',a),r||(r=t,t=r.source),k(r,a),At('guard',r.clock,t,r.filter,r.target,null,r.name,n,!r.greedy,0,1)},e.hydrate=(e,{values:t})=>{n(ye(t),'values property should be an object');const{sidMap:a,unitMap:o}=S(t),i=Object.getOwnPropertyNames(a),c={};r(o,((e,t)=>{c[t.stateRef.id]=t}));const l=[],d=[];let u,f,p;Z(e)?(u=e,p=1,n(u.cloneOf,'scope should be created from domain'),ae(0,'hydrate(fork(domain), { values })','fork({ values })'),f=D(u.cloneOf)):Y(e)?(ae(0,'hydrate(domain, { values })','fork({ values })'),f=D(e)):n(0,'first argument of hydrate should be domain or scope'),w(f,((e,t)=>{if(t&&te(i,t)){ne(l,e);const r=L(e,'serialize');r&&'ignore'!==r&&(a[t]=r.read(a[t])),ne(d,a[t])}else e.scope.state.id in c&&(ne(l,e),ne(d,o.get(c[e.scope.state.id])))}),1),s({target:l,params:d,scope:u}),p&&Object.assign(u.values.sidMap,a)},e.is=ee,e.launch=s,e.merge=v,e.restore=(e,r,a)=>{const o=l('restore',a);if(n(!J(e),'restore($store) is not supported',o),K(e)||Q(e)){const t=V(e),n=h(r,{parent:t,name:e.shortName,and:a});return mt(Q(e)?e.doneData:e,n),t&&t.hooks.store(n),n}const s=Array.isArray(e)?[]:{};return t(e,((e,t)=>s[t]=J(e)?e:h(e,{name:t}))),s},e.sample=(...e)=>{let t,r,n,a,[[o,s,i],c]=d(e),u=1;const f=l('sample',c);return ve(s)&&ye(o)&&k(o,f)&&(s=o.clock,i=o.fn,'batch'in o?u=o.batch:(ae(!('greedy'in o),'greedy in sample','batch',f),u=!o.greedy),a=o.filter,t=o.target,r=o.name,n=o.sid,o=o.source),At('sample',s,o,a,t,i,r,c,u,1,0,n)},e.scopeBind=(e,{scope:t,safe:r}={})=>{n(t||Je||r,'scopeBind: scope not found');const a=t||Je;return t=>{function r(){Ze(s)}let n,o=0;const s=Je;Ze(a);try{n=e(t)}catch(e){n=e,o=1}if(r(),o)throw n;return n instanceof Promise&&n.then(r,r),n}},e.serialize=(e,r={})=>{e.warnSerialize&&console.error('There is a store without sid in this scope, its value is omitted'),n(!e.hasSidDoubles,'duplicate sid found in this scope');const a=r.ignore?r.ignore.map((({sid:e})=>e)):[],o={};return t(e.values.sidMap,((t,r)=>{var n;if(te(a,r))return;const s=e.sidIdMap[r],i=null!==(n=e.sidSerializeSettings.get(r))&&void 0!==n?n:{ignore:0,write:Ot};i.ignore||(o[r]=(0,i.write)(s&&s in e.reg?e.reg[s].current:t))})),'onlyChanges'in r&&(ae(0,'onlyChanges'),r.onlyChanges||(n(e.cloneOf,'scope should be created from domain'),w(D(e.cloneOf),((t,r)=>{r in o||te(a,r)||L(t,'isCombine')||'ignore'===L(t,'serialize')||(o[r]=e.getState(t))})))),o},e.setGraphInspector=e=>{de=e},e.setInspector=e=>{nt=e},e.setStoreName=(e,t)=>{e.shortName=t,Object.assign(G(e),c(t,V(e)))},e.split=(...e)=>{const r='split';let a,s,[[i,c],u]=d(e);const m=l(r,u),h=!c;h&&(a=i.cases,c=i.match,s=i.clock,i=i.source);const g=J(c),y=!H(c)&&be(c),b=!g&&!y&&ye(c);n(H(i),'source must be a unit',m),a||(a={}),h?t(a,((e,t)=>Me(m,e,`cases.${t}`))):(n(b,'match should be an object',m),t(c,((e,t)=>a[t]=p({derived:1,named:`cases.${t}`,and:u}))),a.__=p({derived:1,named:'cases.__',and:u}));const v=new Set([].concat(i,s||[],Object.values(a))),k=Object.keys(g||y?a:c);let w;if(g||y)g&&v.add(c),w=[g&&Fe(P(c),0,1),Ce({safe:g,filter:1,pure:!g,fn(e,t,r){const n=String(g?r.a:c(e));Ct(t,te(k,n)?n:'__',e,r)}})];else if(b){const e=qe({});e.type='shape';const r=[];let n;t(c,((t,a)=>{if(H(t)){n=1,ne(r,a),v.add(t);const o=mt(t,[],[Fe(e),Oe(((e,t,{a:r})=>r[a]=e))]);if(J(t)){e.current[a]=t.getState();const r=P(t);Pe(e,{from:r,field:a,type:'field'}),f('splitMatchStore',r,o)}}})),n&&f('splitBase',e),w=[n&&Fe(e,0,1),Re(((e,t,n)=>{for(let a=0;a<k.length;a++){const o=k[a];if(te(r,o)?n.a[o]:c[o](e))return void Ct(t,o,e,n)}Ct(t,'__',e,n)}),1)]}else n(0,'expect match to be unit, function or object');const S=o({meta:{op:r},parent:s?[]:i,scope:a,node:w,family:{owners:Array.from(v)},regional:1});if(s&&At(r,s,i,null,S,null,r,u,0,0,0),!h)return a},e.step=De,e.version="23.1.0",e.withFactory=({sid:e,name:t,loc:r,method:n,fn:s})=>a(o({meta:{sidRoot:me(e),sid:e,name:t,loc:r,method:n,type:'factory'}}),s),e.withRegion=a,Object.defineProperty(e,'__esModule',{value:1})}));
((e,t)=>{'object'==typeof exports&&'undefined'!=typeof module?t(exports):'function'==typeof define&&define.amd?define(['exports'],t):t((e='undefined'!=typeof globalThis?globalThis:e||self).effector={})})(this,(e=>{function t(e,t){for(const r in e)t(e[r],r)}function r(e,t){e.forEach(t)}function n(e,t,r){if(!e)throw Error(`${r?r+': ':''}${t}`)}function a(e,t){const r=D(e).meta||{};ue={id:D(e).id,parent:ue,value:e,template:r.template||pe(),sidRoot:r.sidRoot||ue&&ue.sidRoot,meta:r};try{return t()}finally{fe('region'),ue=V(ue)}}function o({node:e=[],from:t,source:n,parent:a=t||n,to:o,target:s,child:i=o||s,scope:c={},meta:l={},family:d={type:'regular'},regional:u}={}){const f=ge(a),p=ge(d.links),m=ge(d.owners),h=[];r(e,(e=>e&&ne(h,e)));const g={id:ce(),seq:h,next:ge(i),meta:l,scope:c,family:{type:d.type||I,links:p,owners:m}};return r(p,(e=>ne(q(e),g))),r(m,(e=>ne(_(e),g))),r(f,(e=>ne(e.next,g))),u&&ue&&he(E(ue),[g]),g}function s(e,t,n){let a,o=Ye,s=null,i=Je;if(e.target&&(t=e.params,n=e.defer,a=e.meta,o='page'in e?e.page:o,e.stack&&(s=e.stack),i=B(e)||i,e=e.target),i&&Je&&i!==Je&&(Je=null),Array.isArray(e))for(let r=0;r<e.length;r++)We('pure',o,D(e[r]),s,t[r],i,a);else We('pure',o,D(e),s,t,i,a);if(n&&!Ke)return;const c={isRoot:Ke,currentPage:Ye,scope:Je,isWatch:Qe,isPure:Xe};let l,d,u,f,p,m;Ke=0;e:for(;f=Le();){const{idx:e,stack:t,type:n}=f;u=t.node,Ye=p=t.page,Je=B(t),p?m=p.reg:Je&&(m=Je.reg);const a=!!p,o=!!Je,s={fail:0,scope:u.scope};l=d=0;for(let r=e;r<u.seq.length&&!l;r++){const i=u.seq[r];if(i.order){const{priority:a,barrierID:o}=i.order,s=o?p?`${p.fullID}_${o}`:o:0;if(r!==e||n!==a){o?Ue.has(s)||(Ue.add(s),Ge(r,t,a,o)):Ge(r,t,a,0);continue e}o&&Ue.delete(s)}switch(i.type){case'mov':{const e=i.data;let r;switch(e.from){case'stack':r=E(t);break;case'a':case'b':r=t[e.from];break;case'value':r=e.store;break;case'store':if(m&&!m[e.store.id])if(a){const r=tt(p,e.store.id);t.page=p=r,r?m=r.reg:o?(ot(Je,e.store,0,1,e.softRead),m=Je.reg):m=void 0}else o&&ot(Je,e.store,0,1,e.softRead);r=_e(m&&m[e.store.id]||e.store)}switch(e.to){case'stack':t.value=r;break;case'a':case'b':t[e.to]=r;break;case'store':rt(p,Je,e.target,0).current=r}break}case'compute':const e=i.data;if(e.fn){Qe='watch'===u.meta.op,Xe=e.pure;const r=e.safe?(0,e.fn)(E(t),s.scope,t):st(s,e.fn,t);e.filter?d=!r:t.value=r,Qe=c.isWatch,Xe=c.isPure}}l=s.fail||d}if(nt&&nt(t,s),!l){const e=E(t),n=B(t);if(r(u.next,(r=>{We('child',p,r,t,e,n)})),n){u.meta.needFxCounter&&We('child',p,n.fxCount,t,e,n),u.meta.storeChange&&We('child',p,n.storeChange,t,e,n),u.meta.warnSerialize&&We('child',p,n.warnSerializeNode,t,e,n);const a=n.additionalLinks[u.id];a&&r(a,(r=>{We('child',p,r,t,e,n)}))}}}Ke=c.isRoot,Ye=c.currentPage,Je=B(c)}function i(e,r="combine"){let n=r+'(',a='',o=0;return t(e,(e=>{o<25&&(null!=e&&(n+=a,n+=H(e)?G(e).fullName:e.toString()),o+=1,a=', ')})),n+')'}function c(e,t){let r,n;const a=e;if(t){const a=G(t);0===e.length?(r=a.path,n=a.fullName):(r=a.path.concat([e]),n=0===a.fullName.length?e:a.fullName+'/'+e)}else r=0===e.length?[]:[e],n=e;return{shortName:a,fullName:n,path:r}}function l(e,t){if(!t)return e;if(!t.name&&!t.named&&!t.loc)return e;let r=`[${e}]`;const n=t.named||t.name;n&&(r+=` unit '${n}'`);const a=t.loc;return!n&&a&&(r+=` (${a.file}:${a.line}:${a.column})`),r}function d(e,t){const r=t?e:e[0];ke(r);let n=r.or;const a=r.and;if(a){const r=t?a:a[0];if(ye(r)&&'and'in r){const r=d(a,t);e=r[0],n={...n,...r[1]}}else e=a}return[e,n]}function u(e){const t=()=>e();return t.unsubscribe=()=>e(),t}function f(e,...t){const r=pe();if(r){const n=r.handlers[e];if(n)return n(r,...t)}}function p(e,t){const r=ct({or:t,and:'string'==typeof e?{name:e}:e}),a=l('event',r),i=(e,...t)=>(n(!L(i,'derived'),'call of derived event is not supported, use createEvent instead',a),n(!Xe,'unit call from pure function is not supported, use operators like sample instead',a),Ye?((e,t,r,n)=>{const a=Ye;let o=null;if(t)for(o=Ye;o&&o.template!==t;)o=V(o);et(o);const s=e.create(r,n);return et(a),s})(i,c,e,t):i.create(e,t)),c=pe(),d=Object.assign(i,{graphite:o({meta:yt(r.actualOp||z,i,r),regional:1}),create:e=>(s({target:i,params:e,scope:Je}),e),watch:e=>ht(i,e),map:e=>bt(i,O,e,[Fe()]),filter:e=>bt(i,'filter',e.fn?e:e.fn,[Fe(ze,1)]),filterMap:e=>bt(i,'filterMap',e,[Fe(),Oe((e=>!ve(e)),1)]),prepend(e){n(i.targetable,'.prepend of derived event is not supported, call source event instead',a);const t=p('* \u2192 '+i.shortName,{parent:V(i)});return f('eventPrepend',D(t)),mt(t,i,[Fe()],'prepend',e),gt(i,t),t}});return null!=r&&r.domain&&r.domain.hooks.event(d),W(d,'id',d.graphite.id),fe(d.graphite),d}function m(e,t,a,o,s){return Se(a,`${s} ${t}`,'first argument'),n(be(o),'second argument should be a function',s),ae(!L(e,'derived'),`${t} in derived store`,`${t} in store created via createStore`,s),r(Array.isArray(a)?a:[a],(t=>{e.off(t),T(e).set(t,pt(kt(t,e,'on',xe,o)))})),e}function h(e,t){const a=ct(t),i=qe(e),c=l('store',a),d=p({named:'updates',derived:1});f('storeBase',i);const u=i.id,g='skipVoid'in a,y=g&&!a.skipVoid;ae(!(g&&a.skipVoid),'{skipVoid: true}','updateFilter',c);const b={subscribers:new Map,updates:d,defaultState:e,stateRef:i,getState(){let e,t=i;if(Ye){let t=Ye;for(;t&&!t.reg[u];)t=V(t);t&&(e=t)}return!e&&Je&&(ot(Je,i,1),e=Je),e&&(t=e.reg[u]),_e(t)},setState:e=>s({target:b,params:e,defer:1,scope:Je}),reset:(...e)=>(n(b.targetable,'.reset of derived store is not supported',c),r(e,(e=>m(b,'.reset',e,(()=>b.defaultState),c))),b),on:(e,t)=>(n(b.targetable,'.on of derived store is not supported',c),m(b,'.on',e,t,c)),off(e){const t=T(b).get(e);return t&&(t(),T(b).delete(e)),b},map(e,t){let r,n;ye(e)&&(r=e,e=e.fn);const a=b.getState(),o=ve(a);pe()?n=null:(!o||o&&y)&&(n=e(a));const s=h(n,{name:`${b.shortName} \u2192 *`,derived:1,...t,and:r}),c=kt(b,s,O,ze,e);return Pe(P(s),{type:O,fn:e,from:i}),P(s).noInit=1,f('storeMap',i,c),s},watch(e,t){if(ae(!t,'watch second argument','sample',c),!t||!H(e)){const t=ht(b,e);return f('storeWatch',i,e)||e(b.getState()),t}return n(be(t),'second argument should be a function',c),e.watch((e=>t(b.getState(),e)))}},v=yt(x,b,a),k=b.defaultConfig.updateFilter;b.graphite=o({scope:{state:i,fn:k},node:[Oe(((e,t,r)=>(r.scope&&!r.scope.reg[i.id]&&(r.b=1),e))),Re(i),Oe(((e,t,{a:r,b:n})=>{const a=ve(e);return a&&!g&&console.error(`${c}: ${vt}`),(a&&y||!a)&&(e!==r||n)}),1),k&&Fe($e,1),Ne({from:R,target:i})],child:d,meta:{...v,defaultState:e},regional:1}),W(b,'id',b.graphite.id),W(b,'rootStateRefId',u);const w=L(b,'serialize'),S=L(b,'derived'),M='ignore'===w,$=L(b,'sid');$&&(W(b,'storeChange',1),i.sid=$),$||M||S||W(b,'warnSerialize',1);const z=ve(e);return n(S||!z||z&&y,vt,c),S&&z&&!g&&console.error(`${c}: ${vt}`),he(b,[d]),null!=a&&a.domain&&a.domain.hooks.store(b),S||(b.reinit=p({named:'reinit'}),b.reset(b.reinit)),i.meta=b.graphite.meta,fe(b.graphite),b}function g(...e){let t,r,a;[e,a]=d(e);const o=l('combine',a),s=e[e.length-1],i=!J(s)&&ye(s),c=i&&s,u=i?e[e.length-2]:s;let f,p,m;if(be(u)?(r=e.slice(0,i?-2:-1),t=u):r=e,1===r.length){const e=r[0];J(e)||(f=e,p=1)}if(!p&&(f=r,t)){m=1;const e=t;t=t=>e(...t)}return n(ye(f),`${o}: shape should be an object`),wt(Array.isArray(f),!m,f,a,t,c)}function y(){const e={};return e.req=new Promise(((t,r)=>{e.rs=t,e.rj=r})),e.req.catch((()=>{})),e}function b(e,t={}){const r=ct(be(e)?{handler:e}:e,t),a=l('effect',r),i=p(be(e)?{handler:e}:e,{...t,actualOp:A}),c=D(i);W(c,'op',i.kind=A),i.use=e=>(n(be(e),'.use argument should be a function',a),b.scope.handler=e,i),i.use.getCurrent=()=>b.scope.handler;const d=i.finally=p({named:'finally',derived:1}),u=i.done=d.filterMap({named:'done',fn({status:e,params:t,result:r}){if('done'===e)return{params:t,result:r}}}),f=i.fail=d.filterMap({named:'fail',fn({status:e,params:t,error:r}){if('fail'===e)return{params:t,error:r}}}),m=i.doneData=u.map({named:'doneData',fn:({result:e})=>e}),g=i.failData=f.map({named:'failData',fn:({error:e})=>e}),b=o({scope:{handler:i.defaultConfig.handler||(()=>n(0,`no handler used in ${i.compositeName.fullName}`))},node:[Oe(((e,t,r)=>{let n=t.handler;const a=B(r);if(a){const e=a.handlers.unitMap.get(i)||a.handlers.sidMap[i.sid];e&&(n=e)}return e.handler=n,e}),0,1),Oe(((e,t,r)=>{if(t.runnerFn&&!t.runnerFn(e,null,r))return;const{params:n,req:a,handler:o,args:s=[n]}=e,i=Mt(n,a,1,d,r),c=Mt(n,a,0,d,r),[l,u]=St(o,c,s);l&&(ye(u)&&be(u.then)?u.then(i,c):i(u))}),0,1)],meta:{op:'fx',fx:'runner'}});c.scope.runner=b,ne(c.seq,Oe(((e,{runner:t},r)=>{const n=V(r)?{params:e,req:{rs(e){},rj(e){}}}:e;return r.meta||(r.meta={fxID:le()}),s({target:t,params:n,defer:1,scope:B(r),meta:r.meta}),n.params}))),i.create=e=>{const t=y(),r={params:e,req:t};if(Je&&!Qe){const e=Je;t.req.finally((()=>{Ze(e)})).catch((()=>{}))}return s({target:i,params:r,scope:Je}),t.req};const v=i.inFlight=h(0,{serialize:'ignore',named:(L(i,'name')||i.graphite.id)+'.inFlight'}).on(i,(e=>e+1)).on(d,(e=>e-1)).map({fn:e=>e,named:'inFlight'});W(d,'needFxCounter','dec'),W(i,'needFxCounter',1);const k=i.pending=v.map({fn:e=>e>0,named:'pending'});return he(i,[d,u,f,m,g,k,v]),null!=r&&r.domain&&r.domain.hooks.effect(i),i}function v(e,t){const r=l('merge',t);Se(e,r,'first argument');const n=p({name:i(e,'merge'),derived:1,and:t});return mt(e,n,[],'merge'),n}function k(e,t){let a=0;return r(xt,(r=>{r in e&&(n(null!=e[r],zt(t,r)),a=1)})),a}function w(e,t,n){const a=[];(function e(o){te(a,o)||(ne(a,o),L(o,'op')===x&&(n||L(o,'sid'))&&t(o,L(o,'sid')),r(o.next,e),r(q(o),e),r(_(o),e))})(e)}function S(e,t){const a=Array.isArray(e)?new Map(e):e,o=new Map;let s=0;if(a instanceof Map){const e={};return r(a,((r,a)=>{n(H(a),'Map key should be a unit'),t&&t(a,r),a.sid&&(a.sid in e&&(s=1),e[a.sid]=r),o.set(a,r)})),{sidMap:e,unitMap:o,hasSidDoubles:s}}return{sidMap:a,unitMap:o}}function M(e,t){return J(t)?[De.mov({store:t.stateRef,to:'stack'}),...e]:e}const $='undefined'!=typeof Symbol&&Symbol.observable||'@@observable',x='store',z='event',A='effect',j='domain',N='scope',C='sampler',I='crosslink',O='map',R='stack',F='value',D=e=>e.graphite||e,q=e=>e.family.owners,_=e=>e.family.links,P=e=>e.stateRef,E=e=>e.value,T=e=>e.subscribers,V=e=>e.parent,B=e=>e.scope,L=(e,t)=>D(e).meta[t],W=(e,t,r)=>D(e).meta[t]=r,G=e=>e.compositeName,H=e=>(be(e)||ye(e))&&'kind'in e,U=e=>t=>H(t)&&t.kind===e,J=U(x),K=U(z),Q=U(A),X=e=>H(e)&&!!e.targetable,Y=U(j),Z=U(N);var ee={__proto__:null,unit:H,store:J,event:K,effect:Q,targetable:X,domain:Y,scope:Z,attached:e=>Q(e)&&1==L(e,'attached')};const te=(e,t)=>e.includes(t),re=(e,t)=>{const r=e.indexOf(t);-1!==r&&e.splice(r,1)},ne=(e,t)=>e.push(t),ae=(e,t,r,n)=>!e&&console.error(`${n?n+': ':''}${t} is deprecated${r?`, use ${r} instead`:''}`),oe=()=>{let e=0;return()=>""+ ++e},se=oe(),ie=oe(),ce=oe(),le=oe();let de,ue=null;const fe=e=>{de&&de(e,ue)},pe=()=>ue&&ue.template,me=e=>(e&&ue&&ue.sidRoot&&(e=`${ue.sidRoot}|${e}`),e),he=(e,t)=>{const n=D(e);r(t,(e=>{const t=D(e);n.family.type!==j&&(t.family.type=I),ne(q(t),n),ne(_(n),t)}))},ge=(e=[])=>(Array.isArray(e)?e:[e]).flat().map(D),ye=e=>'object'==typeof e&&null!==e,be=e=>'function'==typeof e,ve=e=>void 0===e,ke=e=>n(ye(e)||be(e),'expect first argument be an object'),we=(e,t,r,a)=>n(!(!ye(e)&&!be(e)||!('family'in e)&&!('graphite'in e)),`${t}: expect ${r} to be a unit (store, event or effect)${a}`),Se=(e,t,n)=>{Array.isArray(e)?r(e,((e,r)=>we(e,t,`${r} item of ${n}`,''))):we(e,t,n,' or array of units')},Me=(e,t,a="target")=>r(ge(t),(t=>n(!L(t,'derived'),`${e}: derived unit in "${a}" is not supported, use createStore/createEvent instead"`))),$e=(e,{fn:t},{a:r})=>t(e,r),xe=(e,{fn:t},{a:r})=>t(r,e),ze=(e,{fn:t})=>t(e),Ae=(e,t,r,n)=>{const a={id:ie(),type:e,data:t};return r&&(a.order={priority:r},n&&(a.order.barrierID=++je)),a};let je=0;const Ne=({from:e=x,store:t,target:r,to:n=(r?x:R),batch:a,priority:o})=>Ae('mov',{from:e,store:t,to:n,target:r},o,a),Ce=({fn:e,batch:t,priority:r,safe:n=0,filter:a=0,pure:o=0})=>Ae('compute',{fn:e,safe:n,filter:a,pure:o},r,t),Ie=({fn:e})=>Ce({fn:e,priority:A}),Oe=(e,t,r)=>Ce({fn:e,safe:1,filter:t,priority:r&&A}),Re=(e,t,r)=>Ne({store:e,to:t?R:"a",priority:r&&C,batch:1}),Fe=(e=ze,t)=>Ce({fn:e,pure:1,filter:t}),De={mov:Ne,compute:Ce,filter:({fn:e,pure:t})=>Ce({fn:e,filter:1,pure:t}),run:Ie},qe=e=>({id:ie(),current:e,initial:e}),_e=({current:e})=>e,Pe=(e,t)=>{e.before||(e.before=[]),ne(e.before,t)};let Ee=null;const Te=(e,t)=>{if(!e)return t;if(!t)return e;let r;return(e.v.type===t.v.type&&e.v.id>t.v.id||He(e.v.type)>He(t.v.type))&&(r=e,e=t,t=r),r=Te(e.r,t),e.r=e.l,e.l=r,e},Ve=[];let Be=0;for(;Be<6;)ne(Ve,{first:null,last:null,size:0}),Be+=1;const Le=()=>{for(let e=0;e<6;e++){const t=Ve[e];if(t.size>0){if(3===e||4===e){t.size-=1;const e=Ee.v;return Ee=Te(Ee.l,Ee.r),e}1===t.size&&(t.last=null);const r=t.first;return t.first=r.r,t.size-=1,r.v}}},We=(e,t,r,n,a,o,s)=>Ge(0,{a:null,b:null,node:r,parent:n,value:a,page:t,scope:o,meta:s},e,0),Ge=(e,t,r,n)=>{const a=He(r),o=Ve[a],s={v:{idx:e,stack:t,type:r,id:n},l:null,r:null};3===a||4===a?Ee=Te(Ee,s):(0===o.size?o.first=s:o.last.r=s,o.last=s),o.size+=1},He=e=>{switch(e){case'child':return 0;case'pure':return 1;case'read':return 2;case'barrier':return 3;case'sampler':return 4;case'effect':return 5;default:return-1}},Ue=new Set;let Je,Ke=1,Qe=0,Xe=0,Ye=null;const Ze=e=>{Je=e},et=e=>{Ye=e},tt=(e,t)=>{if(e){for(;e&&!e.reg[t];)e=e.parent;if(e)return e}return null},rt=(e,t,r,n)=>{const a=tt(e,r.id);return a?a.reg[r.id]:t?(ot(t,r,n),t.reg[r.id]):r};let nt;const at=e=>e,ot=(e,t,n,a,o)=>{const s=e.reg;if(s[t.id])return;const i=t.sid,c={id:t.id,current:t.initial,meta:t.meta};if(c.id in e.values.idMap)c.current=e.values.idMap[c.id];else if(i&&i in e.values.sidMap&&!(i in e.sidIdMap)){var l;const r=null==t||null===(l=t.meta)||void 0===l?void 0:l.serialize;c.current=(e.fromSerialize&&'ignore'!==r&&(null==r?void 0:r.read)||at)(e.values.sidMap[i])}else if(t.before&&!o){let o=0;const i=n||!t.noInit||a;r(t.before,(t=>{switch(t.type){case'map':{const r=t.from;if((r||t.fn)&&(r&&ot(e,r,n,a),i)){const e=r&&s[r.id].current;c.current=t.fn?t.fn(e):e}break}case'field':ot(e,t.from,n,a),o||(o=1,c.current=Array.isArray(c.current)?[...c.current]:{...c.current}),i&&(c.current[t.field]=s[s[t.from.id].id].current)}}))}i&&(e.sidIdMap[i]=t.id),s[t.id]=c},st=(e,t,r)=>{try{return t(E(r),e.scope,r)}catch(t){console.error(t),e.fail=1,e.failReason=t}},ct=(e,r={})=>(ye(e)&&(ct(e.or,r),t(e,((e,t)=>{ve(e)||'or'===t||'and'===t||(r[t]=e)})),ct(e.and,r)),r),lt=(e,t)=>{re(e.next,t),re(q(e),t),re(_(e),t)},dt=(e,t,r)=>{let n;e.next.length=0,e.seq.length=0,e.scope=null;let a=_(e);for(;n=a.pop();)lt(n,e),(t||r&&'sample'!==e.meta.op||n.family.type===I)&&dt(n,t,'on'!==n.meta.op&&r);for(a=q(e);n=a.pop();)lt(n,e),r&&n.family.type===I&&dt(n,t,'on'!==n.meta.op&&r)},ut=e=>e.clear(),ft=(e,{deep:t}={})=>{let r=0;if(e.ownerSet&&e.ownerSet.delete(e),J(e))ut(T(e));else if(Y(e)){r=1;const t=e.history;ut(t.events),ut(t.effects),ut(t.stores),ut(t.domains)}dt(D(e),!!t,r)},pt=e=>u((()=>ft(e))),mt=(e,t,r,n,a)=>o({node:r,parent:e,child:t,scope:{fn:a},meta:{op:n},family:{owners:[e,t],links:t},regional:1}),ht=(e,t)=>(n(be(t),'.watch argument should be a function'),pt(o({scope:{fn:t},node:[Ie({fn:ze})],parent:e,meta:{op:'watch'},family:{owners:e},regional:1}))),gt=(e,t,r=z)=>{V(e)&&V(e).hooks[r](t)},yt=(e,t,r)=>{const n=ct(r),a=e===j,o=se(),{sid:s=null,named:i=null,domain:l=null,parent:d=l}=n,u=i||n.name||(a?'':o),f=c(u,d),p={op:t.kind=e,name:t.shortName=u,sid:t.sid=me(s),named:i,unitId:t.id=o,serialize:n.serialize,derived:n.derived,config:n};if(t.targetable=!n.derived,t.parent=d,t.compositeName=f,t.defaultConfig=n,t.getType=()=>(ae(0,'getType','compositeName.fullName'),f.fullName),!a){t.subscribe=e=>(ke(e),t.watch(be(e)?e:t=>e.next&&e.next(t))),t[$]=()=>t;const e=pe();e&&(p.nativeTemplate=e)}return p},bt=(e,t,r,n)=>{let a;ye(r)&&(a=r,r=r.fn);const o=p({name:`${e.shortName} \u2192 *`,derived:1,and:a});return mt(e,o,n,t,r),o},vt='undefined is used to skip updates. To allow undefined as a value provide explicit { skipVoid: false } option',kt=(e,t,r,n,a)=>{const o=P(t),s=Ne({store:o,to:"a",priority:'read'});r===O&&(s.data.softRead=1);const i=[s,Fe(n)];return f('storeOnMap',o,i,J(e)&&P(e)),mt(e,t,i,r,a)},wt=(e,r,a,o,s,c)=>{const d=l('combine',o),u=e?e=>[...e]:e=>({...e}),p=e?[]:{},m=u(p),g=qe(m),y=qe(1);g.type=e?'list':'shape',g.noInit=1,f('combineBase',g,y);const b=h(m,{name:i(a),derived:1,...c,and:o}),v=P(b);v.noInit=1,W(b,'isCombine',1);const k=Re(g);k.order={priority:'barrier'};const w=Ne({store:v,to:'b',priority:'read'});w.data.softRead=1;const S=[Oe(((e,t,r)=>(r.scope&&!r.scope.reg[g.id]&&(r.c=1),e))),k,Ne({store:y,to:'b'}),Oe(((e,{key:t},n)=>{if(n.c||e!==n.a[t])return r&&n.b&&(n.a=u(n.a)),n.a[t]=e,1}),1),Ne({from:"a",target:g}),Ne({from:F,store:0,target:y}),Ne({from:F,store:1,target:y,priority:'barrier',batch:1}),Re(g,1,1),s&&Fe(),w];if(t(a,((e,t)=>{if(!J(e))return n(!H(e)&&!ve(e),`combine expects a store in a field ${t}`,d),void(m[t]=p[t]=e);p[t]=e.defaultState,m[t]=e.getState();const r=mt(e,b,S,'combine',s);r.scope.key=t;const a=P(e);Pe(g,{type:'field',field:t,from:a}),f('combineField',a,r)})),b.defaultShape=a,Pe(v,{type:O,from:g,fn:s}),!pe())if(s){const e=s(m);!ve(e)||c&&'skipVoid'in c||console.error(`${d}: ${vt}`),v.current=e,v.initial=e,b.defaultState=e}else b.defaultState=p;return b},St=(e,t,r)=>{try{return[1,e(...r)]}catch(e){return t(e),[0,null]}},Mt=(e,t,r,n,a)=>o=>{s({target:[n,$t],params:[r?{status:'done',params:e,result:o}:{status:'fail',params:e,error:o},{value:o,fn:r?t.rs:t.rj}],defer:1,page:a.page,scope:a.scope,meta:a.meta})},$t=o({node:[Ie({fn:({fn:e,value:t})=>e(t)})],meta:{op:'fx',fx:'sidechain'}}),xt=['source','clock','target'],zt=(e,t)=>e+`: ${t} should be defined`,At=(e,t,r,a,o,s,i,c,d,u,m,y)=>{const b=l(e,c),k=!!o;n(!ve(r)||!ve(t),zt(b,'either source or clock'));let w=0;ve(r)?w=1:H(r)||(r=g(r)),ve(t)?t=r:(Se(t,b,'clock'),Array.isArray(t)&&(t=v(t))),w&&(r=t),c||i||(i=r.shortName);let S='none';(m||a)&&(H(a)?S='unit':(n(be(a),'`filter` should be function or unit'),S='fn')),o?(Se(o,b,'target'),Me(b,o)):'none'===S&&u&&J(r)&&J(t)?o=h(s?s(_e(P(r)),_e(P(t))):_e(P(r)),{name:i,sid:y,or:c}):(o=p({name:i,derived:1,or:c}),f('sampleTarget',D(o)));const M=qe();let $=[];if('unit'===S){const[r,n,s]=Nt(a,o,t,M,e);s||$.push(...jt(n)),$.push(...jt(r))}const x=[];if(w)d&&x.push(Re(M,1,1));else{const[n,a,s]=Nt(r,o,t,M,e);s||x.push(...jt(a)),x.push(Re(n,1,d))}const z=mt(t,o,[f('sampleSourceLoader'),Ne({from:R,target:M}),...x,...$,Re(M),'fn'===S&&Fe(((e,t,{a:r})=>a(e,r)),1),s&&Fe($e),f('sampleSourceUpward',k)],e,s);return he(r,[z]),Object.assign(z.meta,c,{joint:1}),o},jt=e=>[Re(e),Oe(((e,t,{a:r})=>r),1)],Nt=(e,t,r,n,a)=>{const s=J(e),i=s?P(e):qe(),c=qe(s);return s||o({parent:e,node:[Ne({from:R,target:i}),Ne({from:F,store:1,target:c})],family:{owners:[e,t,r],links:t},meta:{op:a},regional:1}),f('sampleSource',c,i,n),[i,c,s]},Ct=(e,t,r,n)=>{const a=e[t];a&&s({target:a,params:Array.isArray(a)?a.map((()=>r)):r,defer:1,stack:n})},It=e=>!e.node.meta.isCombine||e.parent&&'combine'!==e.parent.node.meta.op,Ot=e=>e;e.allSettled=(e,{scope:t,params:r}={})=>{if(!H(e))return Promise.reject(new Error('first argument should be unit'));if(!(Q(e)||K(e)||J(e)||Z(e)))return Promise.reject(new Error('first argument accepts only effects, events, stores or scopes'));if(Z(e))t=e;else if(!X(e)){const t=l('allSettled',D(e).meta);return Promise.reject(Error(`${t}: unit should be targetable`))}const n=y();n.parentFork=Je;const{fxCount:a}=t;ne(a.scope.defers,n);const o=[],i=[];return Z(e)||(ne(o,e),ne(i,Q(e)?{params:r,req:{rs(e){n.value={status:'done',value:e}},rj(e){n.value={status:'fail',value:e}}}}:r)),ne(o,a),ne(i,null),s({target:o,params:i,scope:t}),n.req},e.attach=e=>{let t;[e,t]=d(e,1);const r=l('attach',t);let{source:a,effect:o,mapParams:i,domain:u}=e;Q(o)&&n(ve(u),'`domain` can only be used with a plain function',r);const f=b(e,t);W(f,'attached',1);const{runner:p}=D(f).scope;let m;const h=(e,t,r)=>{const{params:n,req:o,handler:c}=e,l=f.finally,d=Mt(n,o,0,l,r),u=r.a,p=Q(c);let m,h=1;if(i?[h,m]=St(i,d,[n,u]):m=a&&p?u:n,h){if(!p)return e.args=[u,m],1;s({target:c,params:{params:m,req:{rs:Mt(n,o,1,l,r),rj:d}},page:r.page,defer:1,meta:r.meta})}};if(a){let e;p.scope.runnerFn=h,J(a)?(e=a,he(e,[f])):(e=g(a),he(f,[e])),m=[Oe((e=>e),0,1),Re(P(e))],delete p.seq[1].order}else m=[Oe(h,1,1)];p.seq.splice(1,0,...m),f.use(o);const y=V(o);return y&&(Object.assign(G(f),c(f.shortName,y)),f.defaultConfig.parent=y),gt(o,f,A),f},e.clearNode=ft,e.combine=g,e.createApi=(...e)=>{let[[r,n],a]=d(e);const o={};return t(n,((e,t)=>{const n=o[t]=p(t,{parent:V(r),config:a});r.on(n,e),gt(r,n)})),o},e.createDomain=function e(n,a){const i=ct({or:a,and:'string'==typeof n?{name:n}:n}),c=o({family:{type:j},regional:1,parent:(null==i?void 0:i.domain)||(null==i?void 0:i.parent)}),l={history:{},graphite:c,hooks:{}};c.meta=yt(j,l,{parent:(null==i?void 0:i.domain)||(null==i?void 0:i.parent),or:{...i,derived:1}}),t({Event:p,Effect:b,Store:h,Domain:e},((e,t)=>{const n=t.toLowerCase(),a=(e=>p({named:e}))(`on${t}`);l.hooks[n]=a;const o=new Set;l.history[`${n}s`]=o,a.create=e=>(s(a,e),e),ne(D(a).seq,Oe(((e,t,r)=>(r.scope=null,e)))),a.watch((e=>{he(l,[e]),o.add(e),e.ownerSet||(e.ownerSet=o),V(e)||(e.parent=l)})),he(l,[a]),l[`onCreate${t}`]=e=>(r(o,e),a.watch(e)),l[`create${t}`]=l[n]=(t,r)=>{const n=ct({and:r,or:t});return null!=n&&n.domain?e(t,r):a(e(t,{parent:l,or:n}))}}));const d=V(l);return d&&t(l.hooks,((e,t)=>mt(e,d.hooks[t]))),null!=i&&i.domain&&i.domain.hooks.domain(l),l},e.createEffect=b,e.createEvent=p,e.createNode=o,e.createStore=h,e.createWatch=({unit:e,fn:t,scope:r,batch:n})=>{const a=[De.run({fn:e=>t(e)})];n&&a.unshift(De.compute({priority:'sampler',batch:1})),J(e)&&a.unshift(De.mov({store:e.stateRef,to:'stack'}));const s=Array.isArray(e)?e:[e];if(r){const e=[],t=r.additionalLinks;return s.forEach((r=>{const n=t[r.graphite.id]||[];t[r.graphite.id]=n;const s=o({node:M(a,r),meta:{watchOp:r.kind}});n.push(s),e.push((()=>{const e=n.indexOf(s);-1!==e&&n.splice(e,1),ft(s)}))})),u((()=>{e.forEach((e=>e()))}))}{const e=o({node:a,parent:s,family:{owners:s}});return u((()=>{ft(e)}))}},e.fork=(e,t)=>{let a,s=e;Y(e)&&(ae(0,'fork(domain)','fork()'),a=e,s=t);const i=(e=>{const t=o({scope:{defers:[],inFlight:0,fxID:0},node:[Oe(((e,t,r)=>{r.parent?'dec'===r.parent.node.meta.needFxCounter?t.inFlight-=1:(t.inFlight+=1,t.fxID+=1):t.fxID+=1})),Ce({priority:C,batch:1}),Oe(((e,t)=>{const{defers:n,fxID:a}=t;t.inFlight>0||0===n.length||Promise.resolve().then((()=>{t.fxID===a&&r(n.splice(0,n.length),(e=>{Ze(e.parentFork),e.rs(e.value)}))}))}),0,1)]}),n=o({node:[Oe(((e,t,r)=>{const n=r.parent;if(n){const t=n.node;if(It(n)){const n=B(r),a=t.meta.sid;n.sidIdMap[a]=t.scope.state.id,n.values.sidMap[a]=e;const o=t.meta.serialize;o&&n.sidSerializeSettings.set(a,'ignore'===o?{ignore:1}:{ignore:0,write:o.write})}}}))]}),a=o({node:[Oe(((e,t,r)=>{const n=B(r);n&&r.parent&&It(r.parent)&&(n.warnSerialize=1)}))]}),s={cloneOf:e,reg:{},values:{sidMap:{},idMap:{}},sidIdMap:{},sidSerializeSettings:new Map,getState(e){if('current'in e)return rt(Ye,s,e,0).current;const t=D(e);return rt(Ye,s,t.scope.state,1).current},kind:N,graphite:o({family:{type:j,links:[t,n,a]},meta:{unit:'fork'},scope:{forkInFlightCounter:t}}),additionalLinks:{},handlers:{sidMap:{},unitMap:new Map},fxCount:t,storeChange:n,warnSerializeNode:a};return s})(a);if(s){if(s.values){const{sidMap:e,unitMap:t,hasSidDoubles:a}=S(s.values,(e=>n(J(e)&&X(e),'Values map can contain only writable stores as keys')));Object.assign(i.values.sidMap,e),r(t,((e,t)=>{if(i.values.idMap[t.stateRef.id]=e,i.sidIdMap[L(t,'sid')]=t.stateRef.id,'ignore'===L(t,'serialize')){const e=L(t,'sid');i.sidSerializeSettings.set(e,{ignore:1})}})),i.fromSerialize=!(Array.isArray(s.values)||s.values instanceof Map),i.hasSidDoubles=a}s.handlers&&(ae(s.handlers instanceof Map||Array.isArray(s.handlers),'object with handlers','array'),i.handlers=S(s.handlers,(e=>n(Q(e),"Handlers map can contain only effects as keys"))))}return i},e.forward=e=>{const t='forward',[{from:r,to:n},a]=d(e,1),s=l(t,a);return ae(0,t,'sample',s),Se(r,s,'"from"'),Se(n,s,'"to"'),Me(s,n,'to'),pt(o({parent:r,child:n,meta:{op:t,config:a},family:{},regional:1}))},e.fromObservable=e=>{ke(e);const t=$ in e?e[$]():e;n(t.subscribe,'expect observable to have .subscribe');const r=p(),a=pt(r);return t.subscribe({next:r,error:a,complete:a}),r},e.guard=(...e)=>{let[[t,r],n]=d(e);const a=l('guard',n);return ae(0,'guard','sample',a),r||(r=t,t=r.source),k(r,a),At('guard',r.clock,t,r.filter,r.target,null,r.name,n,!r.greedy,0,1)},e.hydrate=(e,{values:t})=>{n(ye(t),'values property should be an object');const{sidMap:a,unitMap:o}=S(t),i=Object.getOwnPropertyNames(a),c={};r(o,((e,t)=>{c[t.stateRef.id]=t}));const l=[],d=[];let u,f,p;Z(e)?(u=e,p=1,n(u.cloneOf,'scope should be created from domain'),ae(0,'hydrate(fork(domain), { values })','fork({ values })'),f=D(u.cloneOf)):Y(e)?(ae(0,'hydrate(domain, { values })','fork({ values })'),f=D(e)):n(0,'first argument of hydrate should be domain or scope'),w(f,((e,t)=>{if(t&&te(i,t)){ne(l,e);const r=L(e,'serialize');r&&'ignore'!==r&&(a[t]=r.read(a[t])),ne(d,a[t])}else e.scope.state.id in c&&(ne(l,e),ne(d,o.get(c[e.scope.state.id])))}),1),s({target:l,params:d,scope:u}),p&&Object.assign(u.values.sidMap,a)},e.is=ee,e.launch=s,e.merge=v,e.restore=(e,r,a)=>{const o=l('restore',a);if(n(!J(e),'restore($store) is not supported',o),K(e)||Q(e)){const t=V(e),n=h(r,{parent:t,name:e.shortName,and:a});return mt(Q(e)?e.doneData:e,n),t&&t.hooks.store(n),n}const s=Array.isArray(e)?[]:{};return t(e,((e,t)=>s[t]=J(e)?e:h(e,{name:t}))),s},e.sample=(...e)=>{let t,r,n,a,[[o,s,i],c]=d(e),u=1;const f=l('sample',c);return ve(s)&&ye(o)&&k(o,f)&&(s=o.clock,i=o.fn,'batch'in o?u=o.batch:(ae(!('greedy'in o),'greedy in sample','batch',f),u=!o.greedy),a=o.filter,t=o.target,r=o.name,n=o.sid,o=o.source),At('sample',s,o,a,t,i,r,c,u,1,0,n)},e.scopeBind=(e,{scope:t,safe:r}={})=>{n(t||Je||r,'scopeBind: scope not found');const a=t||Je;return t=>{function r(){Ze(s)}let n,o=0;const s=Je;Ze(a);try{n=e(t)}catch(e){n=e,o=1}if(r(),o)throw n;return n instanceof Promise&&n.then(r,r),n}},e.serialize=(e,r={})=>{e.warnSerialize&&console.error('There is a store without sid in this scope, its value is omitted'),n(!e.hasSidDoubles,'duplicate sid found in this scope');const a=r.ignore?r.ignore.map((({sid:e})=>e)):[],o={};return t(e.values.sidMap,((t,r)=>{var n;if(te(a,r))return;const s=e.sidIdMap[r],i=null!==(n=e.sidSerializeSettings.get(r))&&void 0!==n?n:{ignore:0,write:Ot};i.ignore||(o[r]=(0,i.write)(s&&s in e.reg?e.reg[s].current:t))})),'onlyChanges'in r&&(ae(0,'onlyChanges'),r.onlyChanges||(n(e.cloneOf,'scope should be created from domain'),w(D(e.cloneOf),((t,r)=>{r in o||te(a,r)||L(t,'isCombine')||'ignore'===L(t,'serialize')||(o[r]=e.getState(t))})))),o},e.setGraphInspector=e=>{de=e},e.setInspector=e=>{nt=e},e.setStoreName=(e,t)=>{e.shortName=t,Object.assign(G(e),c(t,V(e)))},e.split=(...e)=>{const r='split';let a,s,[[i,c],u]=d(e);const m=l(r,u),h=!c;h&&(a=i.cases,c=i.match,s=i.clock,i=i.source);const g=J(c),y=!H(c)&&be(c),b=!g&&!y&&ye(c);n(H(i),'source must be a unit',m),a||(a={}),h?t(a,((e,t)=>Me(m,e,`cases.${t}`))):(n(b,'match should be an object',m),t(c,((e,t)=>a[t]=p({derived:1,named:`cases.${t}`,and:u}))),a.__=p({derived:1,named:'cases.__',and:u}));const v=new Set([].concat(i,s||[],Object.values(a))),k=Object.keys(g||y?a:c);let w;if(g||y)g&&v.add(c),w=[g&&Re(P(c),0,1),Ce({safe:g,filter:1,pure:!g,fn(e,t,r){const n=String(g?r.a:c(e));Ct(t,te(k,n)?n:'__',e,r)}})];else if(b){const e=qe({});e.type='shape';const r=[];let n;t(c,((t,a)=>{if(H(t)){n=1,ne(r,a),v.add(t);const o=mt(t,[],[Re(e),Oe(((e,t,{a:r})=>r[a]=e))]);if(J(t)){e.current[a]=t.getState();const r=P(t);Pe(e,{from:r,field:a,type:'field'}),f('splitMatchStore',r,o)}}})),n&&f('splitBase',e),w=[n&&Re(e,0,1),Fe(((e,t,n)=>{for(let a=0;a<k.length;a++){const o=k[a];if(te(r,o)?n.a[o]:c[o](e))return void Ct(t,o,e,n)}Ct(t,'__',e,n)}),1)]}else n(0,'expect match to be unit, function or object');const S=o({meta:{op:r},parent:s?[]:i,scope:a,node:w,family:{owners:Array.from(v)},regional:1});if(s&&At(r,s,i,null,S,null,r,u,0,0,0),!h)return a},e.step=De,e.version="23.2.0",e.withFactory=({sid:e,name:t,loc:r,method:n,fn:s})=>a(o({meta:{sidRoot:me(e),sid:e,name:t,loc:r,method:n,type:'factory'}}),s),e.withRegion=a,Object.defineProperty(e,'__esModule',{value:1})}));
//# sourceMappingURL=effector.umd.js.map
{
"name": "effector",
"version": "23.1.0",
"version": "23.2.0",
"description": "Business logic with ease",

@@ -5,0 +5,0 @@ "main": "effector.cjs.js",

@@ -395,27 +395,27 @@ <p align="center">

<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/belovsandr>
<img src=https://avatars.githubusercontent.com/u/16794134?v=4 width="100;" alt=Aleksandr Belov/>
<a href=https://github.com/yumauri>
<img src=https://avatars.githubusercontent.com/u/6583994?v=4 width="100;" alt=Victor/>
<br />
<sub style="font-size:14px"><b>Aleksandr Belov</b></sub>
<sub style="font-size:14px"><b>Victor</b></sub>
</a>
</td>
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/Kelin2025>
<img src=https://avatars.githubusercontent.com/u/4208480?v=4 width="100;" alt=Anton Kosykh/>
<a href=https://github.com/Minhir>
<img src=https://avatars.githubusercontent.com/u/7985223?v=4 width="100;" alt=Vladimir Ivakin/>
<br />
<sub style="font-size:14px"><b>Anton Kosykh</b></sub>
<sub style="font-size:14px"><b>Vladimir Ivakin</b></sub>
</a>
</td>
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/yurovant>
<img src=https://avatars.githubusercontent.com/u/11337124?v=4 width="100;" alt=Anton Yurovskykh/>
<a href=https://github.com/aldibatyr>
<img src=https://avatars.githubusercontent.com/u/47831819?v=4 width="100;" alt=Aldiyar Batyrbekov/>
<br />
<sub style="font-size:14px"><b>Anton Yurovskykh</b></sub>
<sub style="font-size:14px"><b>Aldiyar Batyrbekov</b></sub>
</a>
</td>
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/Arsen-95>
<img src=https://avatars.githubusercontent.com/u/83858217?v=4 width="100;" alt=Arsen-95/>
<a href=https://github.com/cqh963852>
<img src=https://avatars.githubusercontent.com/u/17702287?v=4 width="100;" alt=cqh/>
<br />
<sub style="font-size:14px"><b>Arsen-95</b></sub>
<sub style="font-size:14px"><b>cqh</b></sub>
</a>

@@ -426,41 +426,41 @@ </td>

<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/gamtiq>
<img src=https://avatars.githubusercontent.com/u/1177323?v=4 width="100;" alt=Denis Sikuler/>
<a href=https://github.com/xaota>
<img src=https://avatars.githubusercontent.com/u/1172619?v=4 width="100;" alt=xaota/>
<br />
<sub style="font-size:14px"><b>Denis Sikuler</b></sub>
<sub style="font-size:14px"><b>xaota</b></sub>
</a>
</td>
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/sagdeev>
<img src=https://avatars.githubusercontent.com/u/8946162?v=4 width="100;" alt=Renat Sagdeev/>
<a href=https://github.com/faustienf>
<img src=https://avatars.githubusercontent.com/u/3603479?v=4 width="100;" alt=☃︎/>
<br />
<sub style="font-size:14px"><b>Renat Sagdeev</b></sub>
<sub style="font-size:14px"><b>☃︎</b></sub>
</a>
</td>
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/TngSam>
<img src=https://avatars.githubusercontent.com/u/25546058?v=4 width="100;" alt=Samir/>
<a href=https://github.com/Laiff>
<img src=https://avatars.githubusercontent.com/u/575885?v=4 width="100;" alt=Andrei Antropov/>
<br />
<sub style="font-size:14px"><b>Samir</b></sub>
<sub style="font-size:14px"><b>Andrei Antropov</b></sub>
</a>
</td>
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/Sozonov>
<img src=https://avatars.githubusercontent.com/u/1931637?v=4 width="100;" alt=Sozonov/>
<a href=https://github.com/kireevmp>
<img src=https://avatars.githubusercontent.com/u/29187880?v=4 width="100;" alt=Mikhail Kireev/>
<br />
<sub style="font-size:14px"><b>Sozonov</b></sub>
<sub style="font-size:14px"><b>Mikhail Kireev</b></sub>
</a>
</td>
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/enomado>
<img src=https://avatars.githubusercontent.com/u/707007?v=4 width="100;" alt=Stanislav/>
<a href=https://github.com/Tauka>
<img src=https://avatars.githubusercontent.com/u/15087247?v=4 width="100;" alt=Tauyekel Kunzhol/>
<br />
<sub style="font-size:14px"><b>Stanislav</b></sub>
<sub style="font-size:14px"><b>Tauyekel Kunzhol</b></sub>
</a>
</td>
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/Tauka>
<img src=https://avatars.githubusercontent.com/u/15087247?v=4 width="100;" alt=Tauyekel Kunzhol/>
<a href=https://github.com/enomado>
<img src=https://avatars.githubusercontent.com/u/707007?v=4 width="100;" alt=Stanislav/>
<br />
<sub style="font-size:14px"><b>Tauyekel Kunzhol</b></sub>
<sub style="font-size:14px"><b>Stanislav</b></sub>
</a>

@@ -471,41 +471,41 @@ </td>

<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/yumauri>
<img src=https://avatars.githubusercontent.com/u/6583994?v=4 width="100;" alt=Victor/>
<a href=https://github.com/Sozonov>
<img src=https://avatars.githubusercontent.com/u/1931637?v=4 width="100;" alt=Sozonov/>
<br />
<sub style="font-size:14px"><b>Victor</b></sub>
<sub style="font-size:14px"><b>Sozonov</b></sub>
</a>
</td>
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/Minhir>
<img src=https://avatars.githubusercontent.com/u/7985223?v=4 width="100;" alt=Vladimir Ivakin/>
<a href=https://github.com/TngSam>
<img src=https://avatars.githubusercontent.com/u/25546058?v=4 width="100;" alt=Samir/>
<br />
<sub style="font-size:14px"><b>Vladimir Ivakin</b></sub>
<sub style="font-size:14px"><b>Samir</b></sub>
</a>
</td>
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/aldibatyr>
<img src=https://avatars.githubusercontent.com/u/47831819?v=4 width="100;" alt=Aldiyar Batyrbekov/>
<a href=https://github.com/sagdeev>
<img src=https://avatars.githubusercontent.com/u/8946162?v=4 width="100;" alt=Renat Sagdeev/>
<br />
<sub style="font-size:14px"><b>Aldiyar Batyrbekov</b></sub>
<sub style="font-size:14px"><b>Renat Sagdeev</b></sub>
</a>
</td>
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/cqh963852>
<img src=https://avatars.githubusercontent.com/u/17702287?v=4 width="100;" alt=cqh/>
<a href=https://github.com/gamtiq>
<img src=https://avatars.githubusercontent.com/u/1177323?v=4 width="100;" alt=Denis Sikuler/>
<br />
<sub style="font-size:14px"><b>cqh</b></sub>
<sub style="font-size:14px"><b>Denis Sikuler</b></sub>
</a>
</td>
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/xaota>
<img src=https://avatars.githubusercontent.com/u/1172619?v=4 width="100;" alt=xaota/>
<a href=https://github.com/Arsen-95>
<img src=https://avatars.githubusercontent.com/u/83858217?v=4 width="100;" alt=Arsen-95/>
<br />
<sub style="font-size:14px"><b>xaota</b></sub>
<sub style="font-size:14px"><b>Arsen-95</b></sub>
</a>
</td>
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/faustienf>
<img src=https://avatars.githubusercontent.com/u/3603479?v=4 width="100;" alt=☃︎/>
<a href=https://github.com/yurovant>
<img src=https://avatars.githubusercontent.com/u/11337124?v=4 width="100;" alt=Anton Yurovskykh/>
<br />
<sub style="font-size:14px"><b>☃︎</b></sub>
<sub style="font-size:14px"><b>Anton Yurovskykh</b></sub>
</a>

@@ -516,41 +516,41 @@ </td>

<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/Laiff>
<img src=https://avatars.githubusercontent.com/u/575885?v=4 width="100;" alt=Andrei Antropov/>
<a href=https://github.com/belovsandr>
<img src=https://avatars.githubusercontent.com/u/16794134?v=4 width="100;" alt=Aleksandr Belov/>
<br />
<sub style="font-size:14px"><b>Andrei Antropov</b></sub>
<sub style="font-size:14px"><b>Aleksandr Belov</b></sub>
</a>
</td>
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/kireevmp>
<img src=https://avatars.githubusercontent.com/u/29187880?v=4 width="100;" alt=Mikhail Kireev/>
<a href=https://github.com/Kelin2025>
<img src=https://avatars.githubusercontent.com/u/4208480?v=4 width="100;" alt=Anton Kosykh/>
<br />
<sub style="font-size:14px"><b>Mikhail Kireev</b></sub>
<sub style="font-size:14px"><b>Anton Kosykh</b></sub>
</a>
</td>
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/0xflotus>
<img src=https://avatars.githubusercontent.com/u/26602940?v=4 width="100;" alt=0xflotus/>
<a href=https://github.com/gitter-badger>
<img src=https://avatars.githubusercontent.com/u/8518239?v=4 width="100;" alt=The Gitter Badger/>
<br />
<sub style="font-size:14px"><b>0xflotus</b></sub>
<sub style="font-size:14px"><b>The Gitter Badger</b></sub>
</a>
</td>
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/focusbytheway>
<img src=https://avatars.githubusercontent.com/u/45828023?v=4 width="100;" alt=Abdukerim Radjapov/>
<a href=https://github.com/usmanyunusov>
<img src=https://avatars.githubusercontent.com/u/28816324?v=4 width="100;" alt=Usman Yunusov/>
<br />
<sub style="font-size:14px"><b>Abdukerim Radjapov</b></sub>
<sub style="font-size:14px"><b>Usman Yunusov</b></sub>
</a>
</td>
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/7iomka>
<img src=https://avatars.githubusercontent.com/u/18473137?v=4 width="100;" alt=7iomka/>
<a href=https://github.com/vadimfilimonov>
<img src=https://avatars.githubusercontent.com/u/11225648?v=4 width="100;" alt=vadimfilimonov/>
<br />
<sub style="font-size:14px"><b>7iomka</b></sub>
<sub style="font-size:14px"><b>vadimfilimonov</b></sub>
</a>
</td>
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/abelsiqueira>
<img src=https://avatars.githubusercontent.com/u/1068752?v=4 width="100;" alt=Abel Soares Siqueira/>
<a href=https://github.com/vsviridov>
<img src=https://avatars.githubusercontent.com/u/221684?v=4 width="100;" alt=Vasili Sviridov/>
<br />
<sub style="font-size:14px"><b>Abel Soares Siqueira</b></sub>
<sub style="font-size:14px"><b>Vasili Sviridov</b></sub>
</a>

@@ -561,41 +561,41 @@ </td>

<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/domosedov>
<img src=https://avatars.githubusercontent.com/u/42298502?v=4 width="100;" alt=Aleksandr Grigorii/>
<a href=https://github.com/vsvirydau-cl>
<img src=https://avatars.githubusercontent.com/u/55260532?v=4 width="100;" alt=Vasili Svirydau/>
<br />
<sub style="font-size:14px"><b>Aleksandr Grigorii</b></sub>
<sub style="font-size:14px"><b>Vasili Svirydau</b></sub>
</a>
</td>
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/yialo>
<img src=https://avatars.githubusercontent.com/u/38593881?v=4 width="100;" alt=Alex Arro/>
<a href=https://github.com/VictorKolb>
<img src=https://avatars.githubusercontent.com/u/14196649?v=4 width="100;" alt=Victor Kolb/>
<br />
<sub style="font-size:14px"><b>Alex Arro</b></sub>
<sub style="font-size:14px"><b>Victor Kolb</b></sub>
</a>
</td>
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/alexey-pd>
<img src=https://avatars.githubusercontent.com/u/12380196?v=4 width="100;" alt=Aleksei Pudnikov/>
<a href=https://github.com/vladmelnikov>
<img src=https://avatars.githubusercontent.com/u/13378944?v=4 width="100;" alt=Vladislav Melnikov/>
<br />
<sub style="font-size:14px"><b>Aleksei Pudnikov</b></sub>
<sub style="font-size:14px"><b>Vladislav Melnikov</b></sub>
</a>
</td>
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/sanohin>
<img src=https://avatars.githubusercontent.com/u/14825383?v=4 width="100;" alt=Alex Anokhin/>
<a href=https://github.com/Shiyan7>
<img src=https://avatars.githubusercontent.com/u/57950265?v=4 width="100;" alt=Shiyan7/>
<br />
<sub style="font-size:14px"><b>Alex Anokhin</b></sub>
<sub style="font-size:14px"><b>Shiyan7</b></sub>
</a>
</td>
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/mihasia20008>
<img src=https://avatars.githubusercontent.com/u/9918427?v=4 width="100;" alt=Alexander/>
<a href=https://github.com/belozer>
<img src=https://avatars.githubusercontent.com/u/1655916?v=4 width="100;" alt=Sergey Belozyorcev/>
<br />
<sub style="font-size:14px"><b>Alexander</b></sub>
<sub style="font-size:14px"><b>Sergey Belozyorcev</b></sub>
</a>
</td>
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/Alexandrsv>
<img src=https://avatars.githubusercontent.com/u/15097064?v=4 width="100;" alt=Alexandrsv/>
<a href=https://github.com/satyarohith>
<img src=https://avatars.githubusercontent.com/u/29819102?v=4 width="100;" alt=Satya Rohith/>
<br />
<sub style="font-size:14px"><b>Alexandrsv</b></sub>
<sub style="font-size:14px"><b>Satya Rohith</b></sub>
</a>

@@ -606,41 +606,41 @@ </td>

<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/ayuhito>
<img src=https://avatars.githubusercontent.com/u/38220115?v=4 width="100;" alt=Ayu/>
<a href=https://github.com/GTech1256>
<img src=https://avatars.githubusercontent.com/u/18086485?v=4 width="100;" alt=Roman/>
<br />
<sub style="font-size:14px"><b>Ayu</b></sub>
<sub style="font-size:14px"><b>Roman</b></sub>
</a>
</td>
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/hyposlasher>
<img src=https://avatars.githubusercontent.com/u/13961762?v=4 width="100;" alt=Dennis Maush/>
<a href=https://github.com/raidenmiro>
<img src=https://avatars.githubusercontent.com/u/82271383?v=4 width="100;" alt=Robert Kuzhin/>
<br />
<sub style="font-size:14px"><b>Dennis Maush</b></sub>
<sub style="font-size:14px"><b>Robert Kuzhin</b></sub>
</a>
</td>
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/dskiba>
<img src=https://avatars.githubusercontent.com/u/28356785?v=4 width="100;" alt=Denis Skiba/>
<a href=https://github.com/romadryud>
<img src=https://avatars.githubusercontent.com/u/19193036?v=4 width="100;" alt=Raman Aktsisiuk/>
<br />
<sub style="font-size:14px"><b>Denis Skiba</b></sub>
<sub style="font-size:14px"><b>Raman Aktsisiuk</b></sub>
</a>
</td>
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/outbreak>
<img src=https://avatars.githubusercontent.com/u/64531?v=4 width="100;" alt=Dmitry Dudin/>
<a href=https://github.com/rachaeldawn>
<img src=https://avatars.githubusercontent.com/u/7696498?v=4 width="100;" alt=Rachael Dawn/>
<br />
<sub style="font-size:14px"><b>Dmitry Dudin</b></sub>
<sub style="font-size:14px"><b>Rachael Dawn</b></sub>
</a>
</td>
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/edprince>
<img src=https://avatars.githubusercontent.com/u/7027089?v=4 width="100;" alt=Ed Prince/>
<a href=https://github.com/bigslycat>
<img src=https://avatars.githubusercontent.com/u/1121997?v=4 width="100;" alt=bigslycat/>
<br />
<sub style="font-size:14px"><b>Ed Prince</b></sub>
<sub style="font-size:14px"><b>bigslycat</b></sub>
</a>
</td>
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/husek>
<img src=https://avatars.githubusercontent.com/u/4630702?v=4 width="100;" alt=Gabriel Husek/>
<a href=https://github.com/darky>
<img src=https://avatars.githubusercontent.com/u/1832800?v=4 width="100;" alt=Vladislav Botvin/>
<br />
<sub style="font-size:14px"><b>Gabriel Husek</b></sub>
<sub style="font-size:14px"><b>Vladislav Botvin</b></sub>
</a>

@@ -651,41 +651,41 @@ </td>

<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/Ilmar7786>
<img src=https://avatars.githubusercontent.com/u/84752977?v=4 width="100;" alt=Ilya Martynov/>
<a href=https://github.com/willheslam>
<img src=https://avatars.githubusercontent.com/u/5377213?v=4 width="100;" alt=Will Heslam/>
<br />
<sub style="font-size:14px"><b>Ilya Martynov</b></sub>
<sub style="font-size:14px"><b>Will Heslam</b></sub>
</a>
</td>
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/newbornfrontender>
<img src=https://avatars.githubusercontent.com/u/34810942?v=4 width="100;" alt=Infant Frontender/>
<a href=https://github.com/WoodenPC>
<img src=https://avatars.githubusercontent.com/u/25397745?v=4 width="100;" alt=Rasul />
<br />
<sub style="font-size:14px"><b>Infant Frontender</b></sub>
<sub style="font-size:14px"><b>Rasul </b></sub>
</a>
</td>
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/vanpav>
<img src=https://avatars.githubusercontent.com/u/2944759?v=4 width="100;" alt=Ivan/>
<a href=https://github.com/bonkboykz>
<img src=https://avatars.githubusercontent.com/u/4549476?v=4 width="100;" alt=Yesset Zhussupov/>
<br />
<sub style="font-size:14px"><b>Ivan</b></sub>
<sub style="font-size:14px"><b>Yesset Zhussupov</b></sub>
</a>
</td>
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/jankeromnes>
<img src=https://avatars.githubusercontent.com/u/599268?v=4 width="100;" alt=Jan Keromnes/>
<a href=https://github.com/anatolykopyl>
<img src=https://avatars.githubusercontent.com/u/33553182?v=4 width="100;" alt=Anatoly Kopyl/>
<br />
<sub style="font-size:14px"><b>Jan Keromnes</b></sub>
<sub style="font-size:14px"><b>Anatoly Kopyl</b></sub>
</a>
</td>
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/jsejcksn>
<img src=https://avatars.githubusercontent.com/u/868251?v=4 width="100;" alt=Jesse Jackson/>
<a href=https://github.com/ansunrisein>
<img src=https://avatars.githubusercontent.com/u/45604301?v=4 width="100;" alt=ansunrisein/>
<br />
<sub style="font-size:14px"><b>Jesse Jackson</b></sub>
<sub style="font-size:14px"><b>ansunrisein</b></sub>
</a>
</td>
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/joelbandi>
<img src=https://avatars.githubusercontent.com/u/15027870?v=4 width="100;" alt=Joel Bandi/>
<a href=https://github.com/c01nd01r>
<img src=https://avatars.githubusercontent.com/u/3511312?v=4 width="100;" alt=Stanislav/>
<br />
<sub style="font-size:14px"><b>Joel Bandi</b></sub>
<sub style="font-size:14px"><b>Stanislav</b></sub>
</a>

@@ -696,41 +696,41 @@ </td>

<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/Kurzdor>
<img src=https://avatars.githubusercontent.com/u/19878951?v=4 width="100;" alt=Paul Ekshmidt/>
<a href=https://github.com/dmitryplyaskin>
<img src=https://avatars.githubusercontent.com/u/35658668?v=4 width="100;" alt=dmitryplyaskin/>
<br />
<sub style="font-size:14px"><b>Paul Ekshmidt</b></sub>
<sub style="font-size:14px"><b>dmitryplyaskin</b></sub>
</a>
</td>
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/RubaXa>
<img src=https://avatars.githubusercontent.com/u/1109562?v=4 width="100;" alt=Lebedev Konstantin/>
<a href=https://github.com/gzaripov>
<img src=https://avatars.githubusercontent.com/u/15311091?v=4 width="100;" alt=Grigory Zaripov/>
<br />
<sub style="font-size:14px"><b>Lebedev Konstantin</b></sub>
<sub style="font-size:14px"><b>Grigory Zaripov</b></sub>
</a>
</td>
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/Leniorko>
<img src=https://avatars.githubusercontent.com/u/26775798?v=4 width="100;" alt=Leniorko/>
<a href=https://github.com/astrobot-houston>
<img src=https://avatars.githubusercontent.com/u/108291165?v=4 width="100;" alt=Houston (Bot)/>
<br />
<sub style="font-size:14px"><b>Leniorko</b></sub>
<sub style="font-size:14px"><b>Houston (Bot)</b></sub>
</a>
</td>
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/lud>
<img src=https://avatars.githubusercontent.com/u/637632?v=4 width="100;" alt=Ludovic Dem/>
<a href=https://github.com/nonzzz>
<img src=https://avatars.githubusercontent.com/u/52351095?v=4 width="100;" alt=kanno/>
<br />
<sub style="font-size:14px"><b>Ludovic Dem</b></sub>
<sub style="font-size:14px"><b>kanno</b></sub>
</a>
</td>
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/MiiZZo>
<img src=https://avatars.githubusercontent.com/u/58049702?v=4 width="100;" alt=Nikita Svoyachenko/>
<a href=https://github.com/leushkin>
<img src=https://avatars.githubusercontent.com/u/26031322?v=4 width="100;" alt=Kirill Leushkin/>
<br />
<sub style="font-size:14px"><b>Nikita Svoyachenko</b></sub>
<sub style="font-size:14px"><b>Kirill Leushkin</b></sub>
</a>
</td>
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/mikecann>
<img src=https://avatars.githubusercontent.com/u/215033?v=4 width="100;" alt=Mike Cann/>
<a href=https://github.com/miyaokamarina>
<img src=https://avatars.githubusercontent.com/u/37388187?v=4 width="100;" alt=Marina Miyaoka/>
<br />
<sub style="font-size:14px"><b>Mike Cann</b></sub>
<sub style="font-size:14px"><b>Marina Miyaoka</b></sub>
</a>

@@ -741,41 +741,41 @@ </td>

<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/olejech>
<img src=https://avatars.githubusercontent.com/u/64708593?v=4 width="100;" alt=Oleg/>
<a href=https://github.com/nulladdict>
<img src=https://avatars.githubusercontent.com/u/26379644?v=4 width="100;" alt=roman/>
<br />
<sub style="font-size:14px"><b>Oleg</b></sub>
<sub style="font-size:14px"><b>roman</b></sub>
</a>
</td>
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/OlegBrony>
<img src=https://avatars.githubusercontent.com/u/19880334?v=4 width="100;" alt=Oleh/>
<a href=https://github.com/vladthelittleone>
<img src=https://avatars.githubusercontent.com/u/4215285?v=4 width="100;" alt=vladthelittleone/>
<br />
<sub style="font-size:14px"><b>Oleh</b></sub>
<sub style="font-size:14px"><b>vladthelittleone</b></sub>
</a>
</td>
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/pgrekovich>
<img src=https://avatars.githubusercontent.com/u/1001687?v=4 width="100;" alt=Pasha Grekovich/>
<a href=https://github.com/xxxxue>
<img src=https://avatars.githubusercontent.com/u/32764266?v=4 width="100;" alt=xxxxue/>
<br />
<sub style="font-size:14px"><b>Pasha Grekovich</b></sub>
<sub style="font-size:14px"><b>xxxxue</b></sub>
</a>
</td>
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/bigslycat>
<img src=https://avatars.githubusercontent.com/u/1121997?v=4 width="100;" alt=bigslycat/>
<a href=https://github.com/0xflotus>
<img src=https://avatars.githubusercontent.com/u/26602940?v=4 width="100;" alt=0xflotus/>
<br />
<sub style="font-size:14px"><b>bigslycat</b></sub>
<sub style="font-size:14px"><b>0xflotus</b></sub>
</a>
</td>
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/rachaeldawn>
<img src=https://avatars.githubusercontent.com/u/7696498?v=4 width="100;" alt=Rachael Dawn/>
<a href=https://github.com/focusbytheway>
<img src=https://avatars.githubusercontent.com/u/45828023?v=4 width="100;" alt=Abdukerim Radjapov/>
<br />
<sub style="font-size:14px"><b>Rachael Dawn</b></sub>
<sub style="font-size:14px"><b>Abdukerim Radjapov</b></sub>
</a>
</td>
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/romadryud>
<img src=https://avatars.githubusercontent.com/u/19193036?v=4 width="100;" alt=Raman Aktsisiuk/>
<a href=https://github.com/7iomka>
<img src=https://avatars.githubusercontent.com/u/18473137?v=4 width="100;" alt=7iomka/>
<br />
<sub style="font-size:14px"><b>Raman Aktsisiuk</b></sub>
<sub style="font-size:14px"><b>7iomka</b></sub>
</a>

@@ -786,41 +786,41 @@ </td>

<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/raidenmiro>
<img src=https://avatars.githubusercontent.com/u/82271383?v=4 width="100;" alt=Robert Kuzhin/>
<a href=https://github.com/abelsiqueira>
<img src=https://avatars.githubusercontent.com/u/1068752?v=4 width="100;" alt=Abel Soares Siqueira/>
<br />
<sub style="font-size:14px"><b>Robert Kuzhin</b></sub>
<sub style="font-size:14px"><b>Abel Soares Siqueira</b></sub>
</a>
</td>
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/GTech1256>
<img src=https://avatars.githubusercontent.com/u/18086485?v=4 width="100;" alt=Roman/>
<a href=https://github.com/domosedov>
<img src=https://avatars.githubusercontent.com/u/42298502?v=4 width="100;" alt=Aleksandr Grigorii/>
<br />
<sub style="font-size:14px"><b>Roman</b></sub>
<sub style="font-size:14px"><b>Aleksandr Grigorii</b></sub>
</a>
</td>
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/satyarohith>
<img src=https://avatars.githubusercontent.com/u/29819102?v=4 width="100;" alt=Satya Rohith/>
<a href=https://github.com/yialo>
<img src=https://avatars.githubusercontent.com/u/38593881?v=4 width="100;" alt=Alex Arro/>
<br />
<sub style="font-size:14px"><b>Satya Rohith</b></sub>
<sub style="font-size:14px"><b>Alex Arro</b></sub>
</a>
</td>
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/belozer>
<img src=https://avatars.githubusercontent.com/u/1655916?v=4 width="100;" alt=Sergey Belozyorcev/>
<a href=https://github.com/alexey-pd>
<img src=https://avatars.githubusercontent.com/u/12380196?v=4 width="100;" alt=Aleksei Pudnikov/>
<br />
<sub style="font-size:14px"><b>Sergey Belozyorcev</b></sub>
<sub style="font-size:14px"><b>Aleksei Pudnikov</b></sub>
</a>
</td>
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/Shiyan7>
<img src=https://avatars.githubusercontent.com/u/57950265?v=4 width="100;" alt=Shiyan7/>
<a href=https://github.com/sanohin>
<img src=https://avatars.githubusercontent.com/u/14825383?v=4 width="100;" alt=Alex Anokhin/>
<br />
<sub style="font-size:14px"><b>Shiyan7</b></sub>
<sub style="font-size:14px"><b>Alex Anokhin</b></sub>
</a>
</td>
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/gitter-badger>
<img src=https://avatars.githubusercontent.com/u/8518239?v=4 width="100;" alt=The Gitter Badger/>
<a href=https://github.com/mihasia20008>
<img src=https://avatars.githubusercontent.com/u/9918427?v=4 width="100;" alt=Alexander/>
<br />
<sub style="font-size:14px"><b>The Gitter Badger</b></sub>
<sub style="font-size:14px"><b>Alexander</b></sub>
</a>

@@ -831,41 +831,41 @@ </td>

<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/usmanyunusov>
<img src=https://avatars.githubusercontent.com/u/28816324?v=4 width="100;" alt=Usman Yunusov/>
<a href=https://github.com/Alexandrsv>
<img src=https://avatars.githubusercontent.com/u/15097064?v=4 width="100;" alt=Александр/>
<br />
<sub style="font-size:14px"><b>Usman Yunusov</b></sub>
<sub style="font-size:14px"><b>Александр</b></sub>
</a>
</td>
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/vadimfilimonov>
<img src=https://avatars.githubusercontent.com/u/11225648?v=4 width="100;" alt=vadimfilimonov/>
<a href=https://github.com/ayuhito>
<img src=https://avatars.githubusercontent.com/u/38220115?v=4 width="100;" alt=Ayu/>
<br />
<sub style="font-size:14px"><b>vadimfilimonov</b></sub>
<sub style="font-size:14px"><b>Ayu</b></sub>
</a>
</td>
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/vsviridov>
<img src=https://avatars.githubusercontent.com/u/221684?v=4 width="100;" alt=Vasili Sviridov/>
<a href=https://github.com/hyposlasher>
<img src=https://avatars.githubusercontent.com/u/13961762?v=4 width="100;" alt=Dennis Maush/>
<br />
<sub style="font-size:14px"><b>Vasili Sviridov</b></sub>
<sub style="font-size:14px"><b>Dennis Maush</b></sub>
</a>
</td>
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/vsvirydau-cl>
<img src=https://avatars.githubusercontent.com/u/55260532?v=4 width="100;" alt=Vasili Svirydau/>
<a href=https://github.com/dskiba>
<img src=https://avatars.githubusercontent.com/u/28356785?v=4 width="100;" alt=Denis Skiba/>
<br />
<sub style="font-size:14px"><b>Vasili Svirydau</b></sub>
<sub style="font-size:14px"><b>Denis Skiba</b></sub>
</a>
</td>
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/VictorKolb>
<img src=https://avatars.githubusercontent.com/u/14196649?v=4 width="100;" alt=Victor Kolb/>
<a href=https://github.com/outbreak>
<img src=https://avatars.githubusercontent.com/u/64531?v=4 width="100;" alt=Dmitry Dudin/>
<br />
<sub style="font-size:14px"><b>Victor Kolb</b></sub>
<sub style="font-size:14px"><b>Dmitry Dudin</b></sub>
</a>
</td>
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/vladmelnikov>
<img src=https://avatars.githubusercontent.com/u/13378944?v=4 width="100;" alt=Vladislav Melnikov/>
<a href=https://github.com/edprince>
<img src=https://avatars.githubusercontent.com/u/7027089?v=4 width="100;" alt=Ed Prince/>
<br />
<sub style="font-size:14px"><b>Vladislav Melnikov</b></sub>
<sub style="font-size:14px"><b>Ed Prince</b></sub>
</a>

@@ -876,41 +876,41 @@ </td>

<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/darky>
<img src=https://avatars.githubusercontent.com/u/1832800?v=4 width="100;" alt=Vladislav Botvin/>
<a href=https://github.com/husek>
<img src=https://avatars.githubusercontent.com/u/4630702?v=4 width="100;" alt=Gabriel Husek/>
<br />
<sub style="font-size:14px"><b>Vladislav Botvin</b></sub>
<sub style="font-size:14px"><b>Gabriel Husek</b></sub>
</a>
</td>
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/willheslam>
<img src=https://avatars.githubusercontent.com/u/5377213?v=4 width="100;" alt=Will Heslam/>
<a href=https://github.com/Ilmar7786>
<img src=https://avatars.githubusercontent.com/u/84752977?v=4 width="100;" alt=Ilya Martynov/>
<br />
<sub style="font-size:14px"><b>Will Heslam</b></sub>
<sub style="font-size:14px"><b>Ilya Martynov</b></sub>
</a>
</td>
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/WoodenPC>
<img src=https://avatars.githubusercontent.com/u/25397745?v=4 width="100;" alt=Rasul />
<a href=https://github.com/newbornfrontender>
<img src=https://avatars.githubusercontent.com/u/34810942?v=4 width="100;" alt=Infant Frontender/>
<br />
<sub style="font-size:14px"><b>Rasul </b></sub>
<sub style="font-size:14px"><b>Infant Frontender</b></sub>
</a>
</td>
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/bonkboykz>
<img src=https://avatars.githubusercontent.com/u/4549476?v=4 width="100;" alt=Yesset Zhussupov/>
<a href=https://github.com/vanpav>
<img src=https://avatars.githubusercontent.com/u/2944759?v=4 width="100;" alt=Ivan/>
<br />
<sub style="font-size:14px"><b>Yesset Zhussupov</b></sub>
<sub style="font-size:14px"><b>Ivan</b></sub>
</a>
</td>
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/anatolykopyl>
<img src=https://avatars.githubusercontent.com/u/33553182?v=4 width="100;" alt=Anatoly Kopyl/>
<a href=https://github.com/jankeromnes>
<img src=https://avatars.githubusercontent.com/u/599268?v=4 width="100;" alt=Jan Keromnes/>
<br />
<sub style="font-size:14px"><b>Anatoly Kopyl</b></sub>
<sub style="font-size:14px"><b>Jan Keromnes</b></sub>
</a>
</td>
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/c01nd01r>
<img src=https://avatars.githubusercontent.com/u/3511312?v=4 width="100;" alt=Stanislav/>
<a href=https://github.com/jsejcksn>
<img src=https://avatars.githubusercontent.com/u/868251?v=4 width="100;" alt=Jesse Jackson/>
<br />
<sub style="font-size:14px"><b>Stanislav</b></sub>
<sub style="font-size:14px"><b>Jesse Jackson</b></sub>
</a>

@@ -921,41 +921,41 @@ </td>

<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/dmitryplyaskin>
<img src=https://avatars.githubusercontent.com/u/35658668?v=4 width="100;" alt=dmitryplyaskin/>
<a href=https://github.com/joelbandi>
<img src=https://avatars.githubusercontent.com/u/15027870?v=4 width="100;" alt=Joel Bandi/>
<br />
<sub style="font-size:14px"><b>dmitryplyaskin</b></sub>
<sub style="font-size:14px"><b>Joel Bandi</b></sub>
</a>
</td>
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/gzaripov>
<img src=https://avatars.githubusercontent.com/u/15311091?v=4 width="100;" alt=Grigory Zaripov/>
<a href=https://github.com/Kurzdor>
<img src=https://avatars.githubusercontent.com/u/19878951?v=4 width="100;" alt=Paul Ekshmidt/>
<br />
<sub style="font-size:14px"><b>Grigory Zaripov</b></sub>
<sub style="font-size:14px"><b>Paul Ekshmidt</b></sub>
</a>
</td>
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/astrobot-houston>
<img src=https://avatars.githubusercontent.com/u/108291165?v=4 width="100;" alt=Houston (Bot)/>
<a href=https://github.com/RubaXa>
<img src=https://avatars.githubusercontent.com/u/1109562?v=4 width="100;" alt=Lebedev Konstantin/>
<br />
<sub style="font-size:14px"><b>Houston (Bot)</b></sub>
<sub style="font-size:14px"><b>Lebedev Konstantin</b></sub>
</a>
</td>
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/nonzzz>
<img src=https://avatars.githubusercontent.com/u/52351095?v=4 width="100;" alt=kanno/>
<a href=https://github.com/Leniorko>
<img src=https://avatars.githubusercontent.com/u/26775798?v=4 width="100;" alt=Leniorko/>
<br />
<sub style="font-size:14px"><b>kanno</b></sub>
<sub style="font-size:14px"><b>Leniorko</b></sub>
</a>
</td>
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/leushkin>
<img src=https://avatars.githubusercontent.com/u/26031322?v=4 width="100;" alt=Kirill Leushkin/>
<a href=https://github.com/lud>
<img src=https://avatars.githubusercontent.com/u/637632?v=4 width="100;" alt=Ludovic Dem/>
<br />
<sub style="font-size:14px"><b>Kirill Leushkin</b></sub>
<sub style="font-size:14px"><b>Ludovic Dem</b></sub>
</a>
</td>
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/miyaokamarina>
<img src=https://avatars.githubusercontent.com/u/37388187?v=4 width="100;" alt=Marina Miyaoka/>
<a href=https://github.com/MiiZZo>
<img src=https://avatars.githubusercontent.com/u/58049702?v=4 width="100;" alt=Nikita Svoyachenko/>
<br />
<sub style="font-size:14px"><b>Marina Miyaoka</b></sub>
<sub style="font-size:14px"><b>Nikita Svoyachenko</b></sub>
</a>

@@ -966,22 +966,29 @@ </td>

<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/nulladdict>
<img src=https://avatars.githubusercontent.com/u/26379644?v=4 width="100;" alt=roman/>
<a href=https://github.com/mikecann>
<img src=https://avatars.githubusercontent.com/u/215033?v=4 width="100;" alt=Mike Cann/>
<br />
<sub style="font-size:14px"><b>roman</b></sub>
<sub style="font-size:14px"><b>Mike Cann</b></sub>
</a>
</td>
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/vladthelittleone>
<img src=https://avatars.githubusercontent.com/u/4215285?v=4 width="100;" alt=vladthelittleone/>
<a href=https://github.com/olejech>
<img src=https://avatars.githubusercontent.com/u/64708593?v=4 width="100;" alt=Oleg/>
<br />
<sub style="font-size:14px"><b>vladthelittleone</b></sub>
<sub style="font-size:14px"><b>Oleg</b></sub>
</a>
</td>
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/xxxxue>
<img src=https://avatars.githubusercontent.com/u/32764266?v=4 width="100;" alt=o0o0o0/>
<a href=https://github.com/OlegBrony>
<img src=https://avatars.githubusercontent.com/u/19880334?v=4 width="100;" alt=Oleh/>
<br />
<sub style="font-size:14px"><b>o0o0o0</b></sub>
<sub style="font-size:14px"><b>Oleh</b></sub>
</a>
</td>
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0">
<a href=https://github.com/pgrekovich>
<img src=https://avatars.githubusercontent.com/u/1001687?v=4 width="100;" alt=Pasha Grekovich/>
<br />
<sub style="font-size:14px"><b>Pasha Grekovich</b></sub>
</a>
</td>
</tr>

@@ -988,0 +995,0 @@ </table>

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc