Comparing version 22.3.0 to 22.4.0
@@ -20,2 +20,3 @@ module.exports = function (babel, options = {}) { | ||
merges, | ||
gates, | ||
storeCreators, | ||
@@ -35,4 +36,6 @@ eventCreators, | ||
domainMethods, | ||
reactMethods, | ||
factories, | ||
importName, | ||
importReactNames, | ||
reactSsr, | ||
@@ -168,2 +171,19 @@ } = normalizeOptions(options) | ||
] | ||
const reactMethodParsers = [ | ||
{ | ||
flag: gates, | ||
set: reactMethods.createGate, | ||
fn: (path, state, name, id) => | ||
setConfigForConfMethod( | ||
path, | ||
state, | ||
id, | ||
t, | ||
smallConfig, | ||
false, | ||
name, | ||
true, | ||
), | ||
}, | ||
] | ||
function addImport(path, method) { | ||
@@ -195,2 +215,17 @@ const programPath = path.find(path => path.isProgram()) | ||
ImportDeclaration(path, state) { | ||
const createFactoryTemplate = () => { | ||
if (!this.effector_factoryMap) { | ||
this.effector_factoryMap = new Map() | ||
if (!factoryTemplate) { | ||
factoryTemplate = template( | ||
addLoc | ||
? 'FACTORY({sid: SID,fn:()=>FN,name:NAME,method:METHOD,loc:LOC})' | ||
: addNames | ||
? 'FACTORY({sid: SID,fn:()=>FN,name:NAME,method:METHOD})' | ||
: 'FACTORY({sid: SID,fn:()=>FN})', | ||
) | ||
} | ||
} | ||
} | ||
const source = path.node.source.value | ||
@@ -233,2 +268,16 @@ const specifiers = path.node.specifiers | ||
} | ||
} else if ( | ||
importReactNames.ssr.has(source) || | ||
importReactNames.nossr.has(source) | ||
) { | ||
for (let i = 0; i < specifiers.length; i++) { | ||
const s = specifiers[i] | ||
if (!s.imported) continue | ||
const importedName = s.imported.name | ||
const localName = s.local.name | ||
if (importedName === localName) continue | ||
if (reactMethods.createGate.has(importedName)) { | ||
reactMethods.createGate.add(localName) | ||
} | ||
} | ||
} else { | ||
@@ -277,15 +326,4 @@ for (let i = 0; i < specifiers.length; i++) { | ||
this.effector_needFactoryImport = true | ||
if (!this.effector_factoryMap) { | ||
this.effector_factoryMap = new Map() | ||
if (!factoryTemplate) { | ||
let tpl | ||
factoryTemplate = template( | ||
addLoc | ||
? 'FACTORY({sid: SID,fn:()=>FN,name:NAME,method:METHOD,loc:LOC})' | ||
: addNames | ||
? 'FACTORY({sid: SID,fn:()=>FN,name:NAME,method:METHOD})' | ||
: 'FACTORY({sid: SID,fn:()=>FN})', | ||
) | ||
} | ||
} | ||
createFactoryTemplate() | ||
for (let i = 0; i < specifiers.length; i++) { | ||
@@ -348,2 +386,3 @@ const s = specifiers[i] | ||
applyMethodParsers(methodParsers, path, state, name) | ||
applyMethodParsers(reactMethodParsers, path, state, name) | ||
} | ||
@@ -459,2 +498,5 @@ if ( | ||
}, | ||
reactMethods: { | ||
createGate: [], | ||
}, | ||
factories: [], | ||
@@ -482,2 +524,5 @@ } | ||
}, | ||
reactMethods: { | ||
createGate: ['createGate'], | ||
}, | ||
factories: [], | ||
@@ -503,2 +548,3 @@ } | ||
merges: true, | ||
gates: true, | ||
}, | ||
@@ -519,4 +565,22 @@ result: { | ||
'@effector/effector', | ||
'@farfetched/core', | ||
'@effector/reflect', | ||
'@effector/reflect/ssr', | ||
'atomic-router', | ||
], | ||
), | ||
importReactNames: { | ||
ssr: new Set( | ||
readReactImportOption(options, 'ssr', [ | ||
'effector-react/scope', | ||
'effector-react/ssr', | ||
]), | ||
), | ||
nossr: new Set( | ||
readReactImportOption(options, 'nossr', [ | ||
'effector-react', | ||
'effector-react/compat', | ||
]), | ||
), | ||
}, | ||
storeCreators: new Set(options.storeCreators || defaults.store), | ||
@@ -539,2 +603,6 @@ eventCreators: new Set(options.eventCreators || defaults.event), | ||
), | ||
reactMethods: readConfigShape( | ||
options.reactMethods, | ||
defaults.reactMethods, | ||
), | ||
factories: (options.factories || defaults.factories).map(stripExtension), | ||
@@ -550,2 +618,11 @@ addLoc: Boolean(options.addLoc), | ||
function readReactImportOption(options, name, defaults) { | ||
if (options && options.importReactNames && options.importReactNames[name]) { | ||
if (Array.isArray(options.importReactNames[name])) | ||
return options.importReactNames[name] | ||
else return [options.importReactNames[name]] | ||
} | ||
return defaults | ||
} | ||
function readConfigFlags({options, properties, result}) { | ||
@@ -733,2 +810,3 @@ for (const property in properties) { | ||
checkBindingName, | ||
allowEmptyArguments, | ||
) { | ||
@@ -748,3 +826,3 @@ const displayName = nameNodeId ? nameNodeId.name : '' | ||
if (args) { | ||
if (!args[0]) return | ||
if (!args[0] && !allowEmptyArguments) return | ||
const commonArgs = singleArgument | ||
@@ -751,0 +829,0 @@ ? args[0] |
@@ -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){if(!e)throw Error(r)}function t(e,r){X={parent:X,value:e,template:H(e,'template')||Y(),sidRoot:H(e,'sidRoot')||X&&X.sidRoot};try{return r()}finally{X=T(X)}}function a(e){var n=void 0===e?{}:e,t=n.node,a=void 0===t?[]:t,o=n.parent,i=n.child,u=void 0===i?n.to||n.target:i,f=n.scope,c=void 0===f?{}:f,s=n.meta,l=void 0===s?{}:s,d=n.family,p=void 0===d?{type:'regular'}:d,v=n.regional,m=re(void 0===o?n.from||n.source:o),g=re(p.links),h=re(p.owners),y=[];r(a,(function(e){return e&&D(y,e)}));var b={id:Q(),seq:y,next:re(u),meta:l,scope:c,family:{type:p.type||"crosslink",links:g,owners:h}};return r(g,(function(e){return D(P(e),b)})),r(h,(function(e){return D(E(e),b)})),r(m,(function(e){return D(e.next,b)})),v&&X&&ee(L(X),[b]),b}function o(e,n,t){var a=Pe,o=null,i=Oe;if(e.target&&(n=e.params,t=e.defer,a='page'in e?e.page:a,e.stack&&(o=e.stack),i=W(e)||i,e=e.target),i&&Oe&&i!==Oe&&(Oe=null),Array.isArray(e))for(var u=0;u<e.length;u++)Ie('pure',a,_(e[u]),o,n[u],i);else Ie('pure',a,_(e),o,n,i);if(!t||De){var f,c,s,l,d,p,v={isRoot:De,currentPage:Pe,scope:Oe,isWatch:Re,isPure:_e};De=0;for(var m=function(){var e=l.idx,n=l.stack,t=l.type;s=n.node,Pe=d=n.page,Oe=W(n),d?p=d.reg:Oe&&(p=Oe.reg);var a=!!d,o=!!Oe,i={fail:0,scope:s.scope};f=c=0;for(var u=e;u<s.seq.length&&!f;u++){var m=s.seq[u];if(m.order){var g=m.order,h=g.priority,y=g.barrierID,b=y?d?d.fullID+"_"+y:y:0;if(u!==e||t!==h)return y?Fe.has(b)||(Fe.add(b),qe(u,n,h,y)):qe(u,n,h),"continue|kernelLoop";y&&Fe.delete(b)}switch(m.type){case'mov':var x=m.data,w=void 0;switch(x.from){case S:w=L(n);break;case"a":case'b':w=n[x.from];break;case"value":w=x.store;break;case"store":if(p&&!p[x.store.id])if(a){var k=Le(d,x.store.id);n.page=d=k,k?p=k.reg:o?(Te(Oe,x.store,0,1,x.softRead),p=Oe.reg):p=void 0}else o&&Te(Oe,x.store,0,1,x.softRead);w=ke(p&&p[x.store.id]||x.store)}switch(x.to){case S:n.value=w;break;case"a":case'b':n[x.to]=w;break;case"store":Be(d,Oe,s,x.target).current=w}break;case'compute':var A=m.data;if(A.fn){Re='watch'===H(s,'op'),_e=A.pure;var j=A.safe?(0,A.fn)(L(n),i.scope,n):We(i,A.fn,n);A.filter?c=!j:n.value=j,Re=v.isWatch,_e=v.isPure}}f=i.fail||c}if(!f){var C=L(n);r(s.next,(function(e){Ie('child',d,e,n,C,W(n))}));var M=W(n);if(M){H(s,'needFxCounter')&&Ie('child',d,M.fxCount,n,C,M),H(s,'storeChange')&&Ie('child',d,M.storeChange,n,C,M),H(s,'warnSerialize')&&Ie('child',d,M.warnSerializeNode,n,C,M);var O=M.additionalLinks[s.id];O&&r(O,(function(e){Ie('child',d,e,n,C,M)}))}}};l=Ne();)m();De=v.isRoot,Pe=v.currentPage,Oe=W(v)}}function i(r,n){void 0===n&&(n='combine');var t=n+'(',a='',o=0;return e(r,(function(e){o<25&&(null!=e&&(t+=a,t+=A(e)?$(e).fullName:e.toString()),o+=1,a=', ')})),t+')'}function u(e,r){var n,t,a=e;if(r){var o=$(r);0===e.length?(n=o.path,t=o.fullName):(n=o.path.concat([e]),t=0===o.fullName.length?e:o.fullName+'/'+e)}else n=0===e.length?[]:[e],t=e;return{shortName:a,fullName:t,path:n}}function f(e,r){var n=r?e:e[0];oe(n);var t=n.or,a=n.and;if(a){var o=r?a:a[0];if(ne(o)&&'and'in o){var i=f(a,r);e=i[0],t=Object.assign({},t,i[1])}else e=a}return[e,t]}function c(e){var r=Y();if(r){for(var n=r.handlers[e],t=arguments.length,a=new Array(t>1?t-1:0),o=1;o<t;o++)a[o-1]=arguments[o];if(n)return n.apply(void 0,[r].concat(a))}}function s(e,r,n,t){var a=Pe,o=null;if(r)for(o=Pe;o&&o.template!==r;)o=T(o);Ve(o);var i=e.create(n,t);return Ve(a),i}function l(e,r){var n=function e(r){R(!H(e,'derived'),'call of derived event','createEvent'),R(!_e,'unit call from pure function','operators like sample');for(var n=arguments.length,a=new Array(n>1?n-1:0),o=1;o<n;o++)a[o-1]=arguments[o];return Pe?s(e,t,r,a):e.create(r,a)},t=Y();return Object.assign(n,{graphite:a({meta:Ze("event",n,e,r),regional:1}),create:function(e){return o({target:n,params:e,scope:Oe}),e},watch:function(e){return Xe(n,e)},map:function(e){return er(n,k,e,[be()])},filter:function(e){return er(n,"filter",e.fn?e:e.fn,[be(le,1)])},filterMap:function(e){return er(n,'filterMap',e,[be(),he((function(e){return!ae(e)}),1)])},prepend:function(e){var r=l('* \u2192 '+n.shortName,{parent:T(n)});return c('eventPrepend',_(r)),Qe(r,n,[be()],'prepend',e),Ye(n,r),r}})}function d(e,t){var i=we(e),u=l({named:'updates',derived:1});c('storeBase',i);var f=i.id,s={subscribers:new Map,updates:u,defaultState:e,stateRef:i,getState:function(){var e,r=i;if(Pe){for(var n=Pe;n&&!n.reg[f];)n=T(n);n&&(e=n)}return!e&&Oe&&(Te(Oe,i,1),e=Oe),e&&(r=e.reg[f]),ke(r)},setState:function(e){return o({target:s,params:e,defer:1,scope:Oe})},reset:function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return r(n,(function(e){return s.on(e,(function(){return s.defaultState}))})),s},on:function(e,n){return ue(e,'.on','first argument'),R(!H(s,'derived'),'.on in derived store','createStore'),r(Array.isArray(e)?e:[e],(function(e){s.off(e),B(s).set(e,Ke(rr(e,s,'on',se,n)))})),s},off:function(e){var r=B(s).get(e);return r&&(r(),B(s).delete(e)),s},map:function(e,r){var n,t;ne(e)&&(n=e,e=e.fn),R(ae(r),'second argument of store.map','updateFilter');var a=s.getState();Y()?t=null:ae(a)||(t=e(a,r));var o=d(t,{name:s.shortName+" \u2192 *",derived:1,and:n}),u=rr(s,o,k,ce,e);return Se(V(o),{type:k,fn:e,from:i}),V(o).noInit=1,c('storeMap',i,u),o},watch:function(e,r){if(!r||!A(e)){var t=Xe(s,e);return c('storeWatch',i,e)||e(s.getState()),t}return n(te(r),'second argument should be a function'),e.watch((function(e){return r(s.getState(),e)}))}},p=Ze("store",s,t),v=s.defaultConfig.updateFilter;s.graphite=a({scope:{state:i,fn:v},node:[he((function(e,r,n){return n.scope&&!n.scope.reg[i.id]&&(n.b=1),e})),ye(i),he((function(e,r,n){var t=n.a,a=n.b;return!ae(e)&&(e!==t||a)}),1),v&&be(ce,1),ve({from:S,target:i})],child:u,meta:p,regional:1});var m=H(s,'derived'),g='ignore'===H(s,'serialize'),h=H(s,'sid');return h&&(g||U(s,'storeChange',1),i.sid=h),h||g||m||U(s,'warnSerialize',1),n(m||!ae(e),"current state can't be undefined, use null instead"),ee(s,[u]),s}function p(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];var a,o,i,u=f(r);i=u[1];var c,s,l,d=(r=u[0])[r.length-1];if(te(d)?(o=r.slice(0,-1),a=d):o=r,1===o.length){var p=o[0];C(p)||(c=p,s=1)}if(!s&&(c=o,a)){l=1;var v=a;a=function(e){return v.apply(void 0,e)}}return n(ne(c),'shape should be an object'),nr(Array.isArray(c),!l,c,i,a)}function v(){var e={};return e.req=new Promise((function(r,n){e.rs=r,e.rj=n})),e.req.catch((function(){})),e}function m(e,r){var t=l(te(e)?{handler:e}:e,r),i=_(t);U(i,'op',t.kind="effect"),t.use=function(e){return n(te(e),'.use argument should be a function'),m.scope.handler=e,t},t.use.getCurrent=function(){return m.scope.handler};var u=t.finally=l({named:'finally',derived:1}),f=t.done=u.filterMap({named:'done',fn:function(e){if('done'===e.status)return{params:e.params,result:e.result}}}),c=t.fail=u.filterMap({named:'fail',fn:function(e){if('fail'===e.status)return{params:e.params,error:e.error}}}),s=t.doneData=f.map({named:'doneData',fn:function(e){return e.result}}),p=t.failData=c.map({named:'failData',fn:function(e){return e.error}}),m=a({scope:{handlerId:H(i,'sid'),handler:t.defaultConfig.handler||function(){return n(0,"no handler used in "+t.getType())}},node:[he((function(e,r,n){var t=r,a=t.handler;if(W(n)){var o=W(n).handlers[t.handlerId];o&&(a=o)}return e.handler=a,e}),0,1),he((function(e,r,n){var t=e.params,a=e.req,o=e.handler,i=e.args,f=void 0===i?[t]:i,c=ar(t,a,1,u,n),s=ar(t,a,0,u,n),l=tr(o,s,f),d=l[1];l[0]&&(ne(d)&&te(d.then)?d.then(c,s):c(d))}),0,1)],meta:{op:'fx',fx:'runner'}});i.scope.runner=m,D(i.seq,he((function(e,r,n){var t=r.runner,a=T(n)?{params:e,req:{rs:function(){},rj:function(){}}}:e;return o({target:t,params:a,defer:1,scope:W(n)}),a.params}),0,1)),t.create=function(e){var r=v(),n={params:e,req:r};if(Oe){if(!Re){var a=Oe;r.req.finally((function(){Ee(a)})).catch((function(){}))}o({target:t,params:n,scope:Oe})}else o(t,n);return r.req};var g=t.inFlight=d(0,{serialize:'ignore'}).on(t,(function(e){return e+1})).on(u,(function(e){return e-1})).map({fn:function(e){return e},named:'inFlight'});U(u,'needFxCounter','dec'),U(t,'needFxCounter',1);var h=t.pending=g.map({fn:function(e){return e>0},named:'pending'});return ee(t,[u,f,c,s,p,h,g]),t}function g(e,r){ue(e,'merge','first argument');var n=l({name:i(e,'merge'),derived:1,and:r});return Qe(e,n,[],'merge'),n}function h(e,t){var a=0;return r(ir,(function(r){r in e&&(n(null!=e[r],ur(t,r)),a=1)})),a}function y(e,n){var t=[];(function e(a){z(t,a)||(D(t,a),"store"===H(a,'op')&&H(a,'sid')&&n(a,H(a,'sid')),r(a.next,e),r(P(a),e),r(E(a),e))})(e)}function b(e,t){if(Array.isArray(e)&&(e=new Map(e)),e instanceof Map){var a={};return r(e,(function(e,r){n(A(r),'Map key should be a unit'),t&&t(r,e),n(r.sid,'unit should have a sid'),n(!(r.sid in a),'duplicate sid found'),a[r.sid]=e})),a}return e}function x(e){var r=function(){return e()};return r.unsubscribe=function(){return e()},r}Object.defineProperty(exports,'__esModule',{value:1});for(var w='undefined'!=typeof Symbol&&Symbol.observable||'@@observable',k='map',S='stack',A=function(e){return(te(e)||ne(e))&&'kind'in e},j=function(e){return function(r){return A(r)&&r.kind===e}},C=j("store"),M=j("event"),O=j("effect"),N=j("domain"),I=j("scope"),q={__proto__:null,unit:A,store:C,event:M,effect:O,domain:N,scope:I},z=function(e,r){return e.includes(r)},F=function(e,r){var n=e.indexOf(r);-1!==n&&e.splice(n,1)},D=function(e,r){return e.push(r)},R=function(e,r,n){return!e&&console.error(r+" is deprecated"+(n?", use "+n+" instead":''))},_=function(e){return e.graphite||e},P=function(e){return e.family.owners},E=function(e){return e.family.links},V=function(e){return e.stateRef},L=function(e){return e.value},B=function(e){return e.subscribers},T=function(e){return e.parent},W=function(e){return e.scope},H=function(e,r){return _(e).meta[r]},U=function(e,r,n){return _(e).meta[r]=n},$=function(e){return e.compositeName},G=function(){var e=0;return function(){return""+ ++e}},J=G(),K=G(),Q=G(),X=null,Y=function(){return X&&X.template},Z=function(e){return e&&X&&X.sidRoot&&(e=X.sidRoot+"|"+e),e},ee=function(e,n){var t=_(e);r(n,(function(e){var r=_(e);"domain"!==t.family.type&&(r.family.type="crosslink"),D(P(r),t),D(E(t),r)}))},re=function(e){return void 0===e&&(e=[]),(Array.isArray(e)?e:[e]).flat().map(_)},ne=function(e){return'object'==typeof e&&null!==e},te=function(e){return'function'==typeof e},ae=function(e){return void 0===e},oe=function(e){return n(ne(e)||te(e),'expect first argument be an object')},ie=function(e,r,t,a){return n(!(!ne(e)&&!te(e)||!('family'in e)&&!('graphite'in e)),r+": expect "+t+" to be a unit (store, event or effect)"+a)},ue=function(e,n,t){Array.isArray(e)?r(e,(function(e,r){return ie(e,n,r+" item of "+t,'')})):ie(e,n,t,' or array of units')},fe=function(e,n,t){return void 0===t&&(t='target'),r(re(n),(function(r){return R(!H(r,'derived'),e+": derived unit in \""+t+"\"","createEvent/createStore")}))},ce=function(e,r,n){return(0,r.fn)(e,n.a)},se=function(e,r,n){return(0,r.fn)(n.a,e)},le=function(e,r){return(0,r.fn)(e)},de=function(e,r,n,t){var a={id:K(),type:e,data:r};return n&&(a.order={priority:n},t&&(a.order.barrierID=++pe)),a},pe=0,ve=function(e){var r=e.from,n=e.target,t=e.to;return de('mov',{from:void 0===r?"store":r,store:e.store,to:void 0===t?n?"store":S:t,target:n},e.priority,e.batch)},me=function(e){var r=e.safe,n=e.filter,t=e.pure;return de('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)},ge=function(e){return me({fn:e.fn,priority:"effect"})},he=function(e,r,n){return me({fn:e,safe:1,filter:r,priority:n&&"effect"})},ye=function(e,r,n){return ve({store:e,to:r?S:"a",priority:n&&"sampler",batch:1})},be=function(e,r){return void 0===e&&(e=le),me({fn:e,pure:1,filter:r})},xe={mov:ve,compute:me,filter:function(e){return me({fn:e.fn,filter:1,pure:e.pure})},run:ge},we=function(e){return{id:K(),current:e}},ke=function(e){return e.current},Se=function(e,r){e.before||(e.before=[]),D(e.before,r)},Ae=null,je=function e(r,n){return r?n?((r.v.type===n.v.type&&r.v.id>n.v.id||ze(r.v.type)>ze(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},Ce=[],Me=0;Me<6;)D(Ce,{first:null,last:null,size:0}),Me+=1;var Oe,Ne=function(){for(var e=0;e<6;e++){var r=Ce[e];if(r.size>0){if(3===e||4===e){r.size-=1;var n=Ae.v;return Ae=je(Ae.l,Ae.r),n}1===r.size&&(r.last=null);var t=r.first;return r.first=t.r,r.size-=1,t.v}}},Ie=function(e,r,n,t,a,o){return qe(0,{a:null,b:null,node:n,parent:t,value:a,page:r,scope:o},e)},qe=function(e,r,n,t){void 0===t&&(t=0);var a=ze(n),o=Ce[a],i={v:{idx:e,stack:r,type:n,id:t},l:null,r:null};3===a||4===a?Ae=je(Ae,i):(0===o.size?o.first=i:o.last.r=i,o.last=i),o.size+=1},ze=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}},Fe=new Set,De=1,Re=0,_e=0,Pe=null,Ee=function(e){Oe=e},Ve=function(e){Pe=e},Le=function(e,r){if(e){for(;e&&!e.reg[r];)e=T(e);if(e)return e}return null},Be=function(e,r,n,t,a){var o=Le(e,t.id);return o?o.reg[t.id]:r?(Te(r,t,a),r.reg[t.id]):t},Te=function e(n,t,a,o,i){var u=n.reg,f=t.sid;if(!u[t.id]){var c={id:t.id,current:t.current};if(f&&f in n.sidValuesMap&&!(f in n.sidIdMap))c.current=n.sidValuesMap[f];else if(t.before&&!i){var s=0,l=a||!t.noInit||o;r(t.before,(function(r){switch(r.type){case k:var t=r.from;if(t||r.fn){t&&e(n,t,a,o);var i=t&&u[t.id].current;l&&(c.current=r.fn?r.fn(i):i)}break;case'field':s||(s=1,c.current=Array.isArray(c.current)?[].concat(c.current):Object.assign({},c.current)),e(n,r.from,a,o),l&&(c.current[r.field]=u[u[r.from.id].id].current)}}))}f&&(n.sidIdMap[f]=t.id),u[t.id]=c}},We=function(e,r,n){try{return r(L(n),e.scope,n)}catch(t){console.error(t),e.fail=1}},He=function r(n,t){return void 0===t&&(t={}),ne(n)&&(r(n.or,t),e(n,(function(e,r){ae(e)||'or'===r||'and'===r||(t[r]=e)})),r(n.and,t)),t},Ue=function(e,r){F(e.next,r),F(P(e),r),F(E(e),r)},$e=function e(r,n,t){var a;r.next.length=0,r.seq.length=0,r.scope=null;for(var o=E(r);a=o.pop();)Ue(a,r),(n||t&&'sample'!==H(r,'op')||"crosslink"===a.family.type)&&e(a,n,'on'!==H(a,'op')&&t);for(o=P(r);a=o.pop();)Ue(a,r),t&&"crosslink"===a.family.type&&e(a,n,'on'!==H(a,'op')&&t)},Ge=function(e){return e.clear()},Je=function(e,r){var n=(void 0===r?{}:r).deep,t=0;if(e.ownerSet&&e.ownerSet.delete(e),C(e))Ge(B(e));else if(N(e)){t=1;var a=e.history;Ge(a.events),Ge(a.effects),Ge(a.stores),Ge(a.domains)}$e(_(e),!!n,t)},Ke=function(e){var r=function(){return Je(e)};return r.unsubscribe=r,r},Qe=function(e,r,n,t,o){return a({node:n,parent:e,child:r,scope:{fn:o},meta:{op:t},family:{owners:[e,r],links:r},regional:1})},Xe=function(e,r){return n(te(r),'.watch argument should be a function'),Ke(a({scope:{fn:r},node:[ge({fn:le})],parent:e,meta:{op:'watch'},family:{owners:e},regional:1}))},Ye=function(e,r,n){void 0===n&&(n="event"),T(e)&&T(e).hooks[n](r)},Ze=function(e,r,n,t){var a="domain"===e,o=J(),i=He({or:t,and:'string'==typeof n?{name:n}:n}),f=i.parent,c=void 0===f?null:f,s=i.sid,l=void 0===s?null:s,d=i.named,p=void 0===d?null:d,v=p||i.name||(a?'':o),m=u(v,c),g={op:r.kind=e,name:r.shortName=v,sid:r.sid=Z(l),named:p,unitId:r.id=o,serialize:i.serialize,derived:i.derived,config:i};if(r.parent=c,r.compositeName=m,r.defaultConfig=i,r.thru=function(e){return R(0,'thru','js pipe'),e(r)},r.getType=function(){return m.fullName},!a){r.subscribe=function(e){return oe(e),r.watch(te(e)?e:function(r){return e.next&&e.next(r)})},r[w]=function(){return r};var h=Y();h&&(g.nativeTemplate=h)}return g},er=function(e,r,n,t){var a;ne(n)&&(a=n,n=n.fn);var o=l({name:e.shortName+" \u2192 *",derived:1,and:a});return Qe(e,o,t,r,n),o},rr=function(e,r,n,t,a){var o=V(r),i=ve({store:o,to:"a",priority:'read'});n===k&&(i.data.softRead=1);var u=[i,be(t)];return c('storeOnMap',o,u,C(e)&&V(e)),Qe(e,r,u,n,a)},nr=function(r,t,a,o,u){var f=r?function(e){return e.slice()}:function(e){return Object.assign({},e)},s=r?[]:{},l=f(s),p=we(l),v=we(1);p.type=r?'list':'shape',p.noInit=1,c('combineBase',p,v);var m=d(l,{name:i(a),derived:1,and:o}),g=V(m);g.noInit=1,U(m,'isCombine',1);var h=ye(p);h.order={priority:'barrier'};var y=[he((function(e,r,n){return n.scope&&!n.scope.reg[p.id]&&(n.c=1),e})),h,ve({store:v,to:'b'}),he((function(e,r,n){var a=r.key;if(n.c||e!==n.a[a])return t&&n.b&&(n.a=f(n.a)),n.a[a]=e,1}),1),ve({from:"a",target:p}),ve({from:"value",store:0,target:v}),ve({from:"value",store:1,target:v,priority:"barrier",batch:1}),ye(p,1),u&&be()];return e(a,(function(e,r){if(!C(e))return n(!A(e)&&!ae(e),"combine expects a store in a field "+r),void(l[r]=s[r]=e);s[r]=e.defaultState,l[r]=e.getState();var t=Qe(e,m,y,'combine',u);t.scope.key=r;var a=V(e);Se(p,{type:'field',field:r,from:a}),c('combineField',a,t)})),m.defaultShape=a,Se(g,{type:k,from:p,fn:u}),Y()||(m.defaultState=u?g.current=u(l):s),m},tr=function(e,r,n){try{return[1,e.apply(void 0,n)]}catch(t){return r(t),[0,null]}},ar=function(e,r,n,t,a){return function(i){return o({target:[t,or],params:[n?{status:'done',params:e,result:i}:{status:'fail',params:e,error:i},{value:i,fn:n?r.rs:r.rj}],defer:1,page:a.page,scope:W(a)})}},or=a({node:[ge({fn:function(e){return(0,e.fn)(e.value)}})],meta:{op:'fx',fx:'sidechain'}}),ir=['source','clock','target'],ur=function(e,r){return e+": "+r+" should be defined"},fr=function(e,r,t,a,o,i,u,f,s,v,m,h){var y=!!o;n(!ae(t)||!ae(r),ur(e,'either source or clock'));var b=0;ae(t)?b=1:A(t)||(t=p(t)),ae(r)?r=t:(ue(r,e,'clock'),Array.isArray(r)&&(r=g(r))),b&&(t=r),f||u||(u=t.shortName);var x='none';(m||a)&&(A(a)?x='unit':(n(te(a),'`filter` should be function or unit'),x='fn')),o?(ue(o,e,'target'),fe(e,o)):'none'===x&&v&&C(t)&&C(r)?o=d(i?i(ke(V(t)),ke(V(r))):ke(V(t)),{name:u,sid:h,or:f}):(o=l({name:u,derived:1,or:f}),c('sampleTarget',_(o)));var w=we(),k=[];if('unit'===x){var j=sr(a,o,r,w,e),M=j[0];k=[].concat(cr(j[1]),cr(M))}var O=sr(t,o,r,w,e),N=O[0],I=O[1];return ee(t,[Qe(r,o,[c('sampleSourceLoader'),ve({from:S,target:w})].concat(cr(I),[ye(N,1,s)],k,[ye(w),'fn'===x&&be((function(e,r,n){return a(e,n.a)}),1),i&&be(ce),c('sampleSourceUpward',y)]),e,i)]),o},cr=function(e){return[ye(e),he((function(e,r,n){return n.a}),1)]},sr=function(e,r,n,t,o){var i=C(e),u=i?V(e):we(),f=we(i);return i||a({parent:e,node:[ve({from:S,target:u}),ve({from:"value",store:1,target:f})],family:{owners:[e,r,n],links:r},meta:{op:o},regional:1}),c('sampleSource',f,u,t),[u,f]},lr=function(e,r,n,t){var a=e[r];a&&o({target:a,params:Array.isArray(a)?a.map((function(){return n})):n,defer:1,stack:t})};exports.allSettled=function(e,r){var n=r.scope,t=r.params;if(!A(e))return Promise.reject(new Error('first argument should be unit'));if(!O(e)&&!M(e)&&!C(e))return Promise.reject(new Error('first argument accepts only effects, events and stores'));var a=v();a.parentFork=Oe;var i=n.fxCount;D(i.scope.defers,a);var u=[e],f=[];return D(f,O(e)?{params:t,req:{rs:function(e){a.value={status:'done',value:e}},rj:function(e){a.value={status:'fail',value:e}}}}:t),D(u,i),D(f,null),o({target:u,params:f,scope:n}),a.req},exports.attach=function(e){var r,n=f(e,1),t=(e=n[0]).source,a=e.effect,i=e.mapParams,c=m(e,n[1]);U(c,'attached',1);var s,l,d=_(c).scope.runner,v=he((function(e,r,n){var a,u=e.params,f=e.req,s=e.handler,l=c.finally,d=ar(u,f,0,l,n),p=n.a,v=O(s),m=1;if(i){var g=tr(i,d,[u,p]);m=g[0],a=g[1]}else a=t&&v?p:u;if(m){if(!v)return e.args=[p,a],1;o({target:s,params:{params:a,req:{rs:ar(u,f,1,l,n),rj:d}},page:n.page,defer:1})}}),1,1);t?(C(t)?ee(l=t,[c]):(l=p(t),ee(c,[l])),s=[ye(V(l)),v]):s=[v],(r=d.seq).splice.apply(r,[1,0].concat(s)),c.use(a);var g=T(a);return g&&(Object.assign($(c),u(c.shortName,g)),c.defaultConfig.parent=g),Ye(a,c,"effect"),c},exports.clearNode=Je,exports.combine=p,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),o=a[0],i=o[0],u=o[1],c=a[1],s={};return e(u,(function(e,r){var n=s[r]=l(r,{parent:T(i),config:c});i.on(n,e),Ye(i,n)})),s},exports.createDomain=function n(t,i){var u=a({family:{type:"domain"},regional:1}),f={history:{},graphite:u,hooks:{}};u.meta=Ze("domain",f,t,i),e({Event:l,Effect:m,Store:d,Domain:n},(function(e,n){var t=n.toLowerCase(),a=l({named:"on"+n});f.hooks[t]=a;var i=new Set;f.history[t+"s"]=i,a.create=function(e){return o(a,e),e},D(_(a).seq,he((function(e,r,n){return n.scope=null,e}))),a.watch((function(e){ee(f,[e]),i.add(e),e.ownerSet||(e.ownerSet=i),T(e)||(e.parent=f)})),ee(f,[a]),f["onCreate"+n]=function(e){return r(i,e),a.watch(e)},f["create"+n]=f[t]=function(r,n){return a(e(r,{parent:f,or:n}))}}));var c=T(f);return c&&e(f.hooks,(function(e,r){return Qe(e,c.hooks[r])})),f},exports.createEffect=m,exports.createEvent=l,exports.createNode=a,exports.createStore=d,exports.createStoreObject=function(){return R(0,'createStoreObject','combine'),p.apply(void 0,arguments)},exports.createWatch=function(e){var r=e.unit,n=e.fn,t=e.scope,o=[xe.run({fn:function(e){return n(e)}})];if(t){var i=a({node:o}),u=r.graphite.id,f=t.additionalLinks,c=f[u]||[];return f[u]=c,c.push(i),x((function(){var e=c.indexOf(i);-1!==e&&c.splice(e,1),Je(i)}))}var s=a({node:o,parent:[r],family:{owners:r}});return x((function(){Je(s)}))},exports.fork=function(e,t){var o,i=e;N(e)&&(o=e,i=t);var u=function(e){var n=a({scope:{defers:[],inFlight:0,fxID:0},node:[he((function(e,r,n){T(n)?'dec'===H(T(n).node,'needFxCounter')?r.inFlight-=1:(r.inFlight+=1,r.fxID+=1):r.fxID+=1})),me({priority:"sampler",batch:1}),he((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){Ee(e.parentFork),e.rs(e.value)}))}))}),0,1)]}),t=a({node:[he((function(e,r,n){var t=T(n);if(t){var a=t.node;if(!H(a,'isCombine')||T(t)&&'combine'!==H(T(t).node,'op')){var o=W(n),i=a.scope.state.id,u=H(a,'sid');o.sidIdMap[u]=i,o.sidValuesMap[u]=e}}}))]}),o=a({node:[he((function(e,r,n){var t=W(n);if(t){var a=T(n);a&&(!H(a.node,'isCombine')||T(a)&&'combine'!==H(T(a).node,'op'))&&(t.warnSerialize=1)}}))]}),i={cloneOf:e,reg:{},sidValuesMap:{},sidIdMap:{},getState:function(e){if('current'in e)return Be(Pe,i,null,e).current;var r=_(e);return Be(Pe,i,r,r.scope.state,1).current},kind:"scope",graphite:a({family:{type:"domain",links:[n,t,o]},meta:{unit:'fork'},scope:{forkInFlightCounter:n}}),additionalLinks:{},handlers:{},fxCount:n,storeChange:t,warnSerializeNode:o};return i}(o);if(i){if(i.values){var f=b(i.values,(function(e){return n(C(e),'Values map can contain only stores as keys')}));Object.assign(u.sidValuesMap,f)}i.handlers&&(u.handlers=b(i.handlers,(function(e){return n(O(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],o=t.from,i=t.to,u=n[1];return ue(o,r,'"from"'),ue(i,r,'"to"'),fe(r,i,'to'),Ke(a({parent:o,child:i,meta:{op:r,config:u},family:{},regional:1}))},exports.fromObservable=function(e){oe(e);var r=w in e?e[w]():e;n(r.subscribe,'expect observable to have .subscribe');var t=l(),a=Ke(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],o=a[0],i=a[1],u=t[1];return i||(o=(i=o).source),h(i,'guard'),fr('guard',i.clock,o,i.filter,i.target,null,i.name,u,!i.greedy,0,1)},exports.hydrate=function(e,r){var t=r.values;n(ne(t),'values property should be an object');var a,i,u,f=b(t),c=Object.getOwnPropertyNames(f),s=[],l=[];I(e)?(u=1,n((a=e).cloneOf,'scope should be created from domain'),i=_(a.cloneOf)):N(e)?i=_(e):n(0,'first argument of hydrate should be domain or scope'),y(i,(function(e,r){z(c,r)&&(D(s,e),D(l,f[r]))})),o({target:s,params:l,scope:a}),u&&Object.assign(a.sidValuesMap,f)},exports.is=q,exports.launch=o,exports.merge=g,exports.restore=function(r,n,t){if(C(r))return R(0,'restore($store)'),r;if(M(r)||O(r)){var a=T(r),o=d(n,{parent:a,name:r.shortName,and:t});return Qe(O(r)?r.doneData:r,o),a&&a.hooks.store(o),o}var i=Array.isArray(r)?[]:{};return e(r,(function(e,r){return i[r]=C(e)?e:d(e,{name:r})})),i},exports.sample=function(){for(var e,r,n=arguments.length,t=new Array(n),a=0;a<n;a++)t[a]=arguments[a];var o,i,u=f(t),c=u[0],s=c[0],l=c[1],d=c[2],p=u[1],v=1;return ae(l)&&ne(s)&&h(s,"sample")&&(l=s.clock,d=s.fn,v=!s.greedy,i=s.filter,e=s.target,r=s.name,o=s.sid,s=s.source),fr("sample",l,s,i,e,d,r,p,v,1,0,o)},exports.scopeBind=function(e,r){var t=(void 0===r?{}:r).scope;n(t||Oe,'scopeBind cannot be called outside of forked .watch');var a=t||Oe;return O(e)?function(r){var n=v();return o({target:e,params:{params:r,req:n},scope:a}),n.req}:function(r){return o({target:e,params:r,scope:a}),r}},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');var a=t.ignore?t.ignore.map((function(e){return e.sid})):[],o={};return e(r.sidValuesMap,(function(e,n){if(!z(a,n)){var t=r.sidIdMap[n];o[n]=t&&t in r.reg?r.reg[t].current:e}})),'onlyChanges'in t&&!t.onlyChanges&&(n(r.cloneOf,'scope should be created from domain'),y(_(r.cloneOf),(function(e,n){n in o||z(a,n)||H(e,'isCombine')||'ignore'===H(e,'serialize')||(o[n]=r.getState(e))}))),o},exports.setStoreName=function(e,r){e.shortName=r,Object.assign($(e),u(r,T(e)))},exports.split=function(){for(var r,t,o='split',i=arguments.length,u=new Array(i),s=0;s<i;s++)u[s]=arguments[s];var d=f(u),p=d[0],v=p[0],m=p[1],g=d[1],h=!m;h&&(r=v.cases,m=v.match,t=v.clock,v=v.source);var y=C(m),b=!A(m)&&te(m),x=!y&&!b&&ne(m);r||(r={}),h?e(r,(function(e,r){return fe(o,e,"cases."+r)})):(n(x,'match should be an object'),e(m,(function(e,n){return r[n]=l({derived:1,and:g})})),r.__=l({derived:1,and:g}));var w,k=new Set([].concat(v,t||[],Object.values(r))),S=Object.keys(y||b?r:m);if(y||b)y&&k.add(m),w=[y&&ye(V(m),0,1),me({safe:y,filter:1,pure:!y,fn:function(e,r,n){var t=String(y?n.a:m(e));lr(r,z(S,t)?t:'__',e,n)}})];else if(x){var j=we({});j.type='shape';var M,O=[];e(m,(function(e,r){if(A(e)){M=1,D(O,r),k.add(e);var n=Qe(e,[],[ye(j),he((function(e,n,t){return t.a[r]=e}))]);if(C(e)){j.current[r]=e.getState();var t=V(e);Se(j,{from:t,field:r,type:'field'}),c('splitMatchStore',t,n)}}})),M&&c('splitBase',j),w=[M&&ye(j,0,1),be((function(e,r,n){for(var t=0;t<S.length;t++){var a=S[t];if(z(O,a)?n.a[a]:m[a](e))return void lr(r,a,e,n)}lr(r,'__',e,n)}),1)]}else n(0,'expect match to be unit, function or object');var N=a({meta:{op:o},parent:t?[]:v,scope:r,node:w,family:{owners:Array.from(k)},regional:1});if(t&&fr(o,t,v,null,N,null,o,g,0,0,0),!h)return r},exports.step=xe,exports.version="22.3.0",exports.withFactory=function(e){var r=e.name,n=e.loc,o=e.method,i=e.fn;return t(a({meta:{sidRoot:Z(e.sid),name:r,loc:n,method:o}}),i)},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){if(!e)throw Error(r)}function t(e,r){X={parent:X,value:e,template:q(e,'template')||Y(),sidRoot:q(e,'sidRoot')||X&&X.sidRoot};try{return r()}finally{X=N(X)}}function a(e){var n=void 0===e?{}:e,t=n.node,a=void 0===t?[]:t,o=n.parent,i=n.child,u=void 0===i?n.to||n.target:i,f=n.scope,c=void 0===f?{}:f,s=n.meta,l=void 0===s?{}:s,d=n.family,p=void 0===d?{type:'regular'}:d,v=n.regional,m=re(void 0===o?n.from||n.source:o),g=re(p.links),h=re(p.owners),y=[];r(a,(function(e){return e&&U(y,e)}));var b={id:Q(),seq:y,next:re(u),meta:l,scope:c,family:{type:p.type||"crosslink",links:g,owners:h}};return r(g,(function(e){return U(j(e),b)})),r(h,(function(e){return U(z(e),b)})),r(m,(function(e){return U(e.next,b)})),v&&X&&ee(O(X),[b]),b}function o(e,n,t){var a=_e,o=null,i=Oe;if(e.target&&(n=e.params,t=e.defer,a='page'in e?e.page:a,e.stack&&(o=e.stack),i=I(e)||i,e=e.target),i&&Oe&&i!==Oe&&(Oe=null),Array.isArray(e))for(var u=0;u<e.length;u++)Ne('pure',a,A(e[u]),o,n[u],i);else Ne('pure',a,A(e),o,n,i);if(!t||Ee){var f,c,s,l,d,p,v={isRoot:Ee,currentPage:_e,scope:Oe,isWatch:De,isPure:Re};Ee=0;for(var m=function(){var e=l.idx,n=l.stack,t=l.type;s=n.node,_e=d=n.page,Oe=I(n),d?p=d.reg:Oe&&(p=Oe.reg);var a=!!d,o=!!Oe,i={fail:0,scope:s.scope};f=c=0;for(var u=e;u<s.seq.length&&!f;u++){var m=s.seq[u];if(m.order){var g=m.order,h=g.priority,y=g.barrierID,b=y?d?d.fullID+"_"+y:y:0;if(u!==e||t!==h)return y?Fe.has(b)||(Fe.add(b),Ie(u,n,h,y)):Ie(u,n,h),"continue|kernelLoop";y&&Fe.delete(b)}switch(m.type){case'mov':var x=m.data,k=void 0;switch(x.from){case S:k=O(n);break;case"a":case'b':k=n[x.from];break;case"value":k=x.store;break;case"store":if(p&&!p[x.store.id])if(a){var w=Le(d,x.store.id);n.page=d=w,w?p=w.reg:o?(We(Oe,x.store,0,1,x.softRead),p=Oe.reg):p=void 0}else o&&We(Oe,x.store,0,1,x.softRead);k=we(p&&p[x.store.id]||x.store)}switch(x.to){case S:n.value=k;break;case"a":case'b':n[x.to]=k;break;case"store":Be(d,Oe,s,x.target).current=k}break;case'compute':var A=m.data;if(A.fn){De='watch'===q(s,'op'),Re=A.pure;var j=A.safe?(0,A.fn)(O(n),i.scope,n):He(i,A.fn,n);A.filter?c=!j:n.value=j,De=v.isWatch,Re=v.isPure}}f=i.fail||c}if(!f){var z=O(n),M=I(n);if(r(s.next,(function(e){Ne('child',d,e,n,z,M)})),M){q(s,'needFxCounter')&&Ne('child',d,M.fxCount,n,z,M),q(s,'storeChange')&&Ne('child',d,M.storeChange,n,z,M),q(s,'warnSerialize')&&Ne('child',d,M.warnSerializeNode,n,z,M);var C=M.additionalLinks[s.id];C&&r(C,(function(e){Ne('child',d,e,n,z,M)}))}}};l=Ce();)m();Ee=v.isRoot,_e=v.currentPage,Oe=I(v)}}function i(r,n){void 0===n&&(n='combine');var t=n+'(',a='',o=0;return e(r,(function(e){o<25&&(null!=e&&(t+=a,t+=D(e)?E(e).fullName:e.toString()),o+=1,a=', ')})),t+')'}function u(e,r){var n,t,a=e;if(r){var o=E(r);0===e.length?(n=o.path,t=o.fullName):(n=o.path.concat([e]),t=0===o.fullName.length?e:o.fullName+'/'+e)}else n=0===e.length?[]:[e],t=e;return{shortName:a,fullName:t,path:n}}function f(e,r){var n=r?e:e[0];oe(n);var t=n.or,a=n.and;if(a){var o=r?a:a[0];if(ne(o)&&'and'in o){var i=f(a,r);e=i[0],t=Object.assign({},t,i[1])}else e=a}return[e,t]}function c(e){var r=Y();if(r){for(var n=r.handlers[e],t=arguments.length,a=new Array(t>1?t-1:0),o=1;o<t;o++)a[o-1]=arguments[o];if(n)return n.apply(void 0,[r].concat(a))}}function s(e,r,n,t){var a=_e,o=null;if(r)for(o=_e;o&&o.template!==r;)o=N(o);Ve(o);var i=e.create(n,t);return Ve(a),i}function l(e,r){var n=Ue({or:r,and:'string'==typeof e?{name:e}:e}),t=function e(r){$(!q(e,'derived'),'call of derived event','createEvent'),$(!Re,'unit call from pure function','operators like sample');for(var n=arguments.length,t=new Array(n>1?n-1:0),a=1;a<n;a++)t[a-1]=arguments[a];return _e?s(e,i,r,t):e.create(r,t)},i=Y(),u=Object.assign(t,{graphite:a({meta:er("event",t,n),regional:1}),create:function(e){return o({target:t,params:e,scope:Oe}),e},watch:function(e){return Ye(t,e)},map:function(e){return rr(t,w,e,[be()])},filter:function(e){return rr(t,"filter",e.fn?e:e.fn,[be(le,1)])},filterMap:function(e){return rr(t,'filterMap',e,[be(),he((function(e){return!ae(e)}),1)])},prepend:function(e){var r=l('* \u2192 '+t.shortName,{parent:N(t)});return c('eventPrepend',A(r)),Xe(r,t,[be()],'prepend',e),Ze(t,r),r}});return null!=n&&n.domain&&n.domain.hooks.event(u),u}function d(e,t){var i=Ue(t),u=ke(e),f=l({named:'updates',derived:1});c('storeBase',u);var s=u.id,p={subscribers:new Map,updates:f,defaultState:e,stateRef:u,getState:function(){var e,r=u;if(_e){for(var n=_e;n&&!n.reg[s];)n=N(n);n&&(e=n)}return!e&&Oe&&(We(Oe,u,1),e=Oe),e&&(r=e.reg[s]),we(r)},setState:function(e){return o({target:p,params:e,defer:1,scope:Oe})},reset:function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return r(n,(function(e){return p.on(e,(function(){return p.defaultState}))})),p},on:function(e,t){return ue(e,'.on','first argument'),n(te(t),'second argument should be a function'),$(!q(p,'derived'),'.on in derived store','createStore'),r(Array.isArray(e)?e:[e],(function(e){p.off(e),C(p).set(e,Qe(nr(e,p,'on',se,t)))})),p},off:function(e){var r=C(p).get(e);return r&&(r(),C(p).delete(e)),p},map:function(e,r){var n,t;ne(e)&&(n=e,e=e.fn),$(ae(r),'second argument of store.map','updateFilter');var a=p.getState();Y()?t=null:ae(a)||(t=e(a,r));var o=d(t,{name:p.shortName+" \u2192 *",derived:1,and:n}),i=nr(p,o,w,ce,e);return Se(M(o),{type:w,fn:e,from:u}),M(o).noInit=1,c('storeMap',u,i),o},watch:function(e,r){if(!r||!D(e)){var t=Ye(p,e);return c('storeWatch',u,e)||e(p.getState()),t}return n(te(r),'second argument should be a function'),e.watch((function(e){return r(p.getState(),e)}))}},v=er("store",p,i),m=p.defaultConfig.updateFilter;p.graphite=a({scope:{state:u,fn:m},node:[he((function(e,r,n){return n.scope&&!n.scope.reg[u.id]&&(n.b=1),e})),ye(u),he((function(e,r,n){var t=n.a,a=n.b;return!ae(e)&&(e!==t||a)}),1),m&&be(ce,1),ve({from:S,target:u})],child:f,meta:v,regional:1});var g=q(p,'serialize'),h=q(p,'derived'),y='ignore'===g,b=!g||y?0:g,x=q(p,'sid');return x&&(y||F(p,'storeChange',1),u.sid=x,b&&(u.meta=Object.assign({},null==u?void 0:u.meta,{serialize:b}))),x||y||h||F(p,'warnSerialize',1),n(h||!ae(e),"current state can't be undefined, use null instead"),ee(p,[f]),null!=i&&i.domain&&i.domain.hooks.store(p),h||(p.reinit=l(),p.reset(p.reinit)),p}function p(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];var a,o,i,u=f(r);i=u[1];var c,s,l,d=(r=u[0])[r.length-1];if(te(d)?(o=r.slice(0,-1),a=d):o=r,1===o.length){var p=o[0];_(p)||(c=p,s=1)}if(!s&&(c=o,a)){l=1;var v=a;a=function(e){return v.apply(void 0,e)}}return n(ne(c),'shape should be an object'),tr(Array.isArray(c),!l,c,i,a)}function v(){var e={};return e.req=new Promise((function(r,n){e.rs=r,e.rj=n})),e.req.catch((function(){})),e}function m(e,r){var t=Ue(te(e)?{handler:e}:e,r),i=l(te(e)?{handler:e}:e,r),u=A(i);F(u,'op',i.kind="effect"),i.use=function(e){return n(te(e),'.use argument should be a function'),g.scope.handler=e,i},i.use.getCurrent=function(){return g.scope.handler};var f=i.finally=l({named:'finally',derived:1}),c=i.done=f.filterMap({named:'done',fn:function(e){if('done'===e.status)return{params:e.params,result:e.result}}}),s=i.fail=f.filterMap({named:'fail',fn:function(e){if('fail'===e.status)return{params:e.params,error:e.error}}}),p=i.doneData=c.map({named:'doneData',fn:function(e){return e.result}}),m=i.failData=s.map({named:'failData',fn:function(e){return e.error}}),g=a({scope:{handlerId:q(u,'sid'),handler:i.defaultConfig.handler||function(){return n(0,"no handler used in "+i.getType())}},node:[he((function(e,r,n){var t=r,a=t.handler;if(I(n)){var o=I(n).handlers[t.handlerId];o&&(a=o)}return e.handler=a,e}),0,1),he((function(e,r,n){var t=e.params,a=e.req,o=e.handler,i=e.args,u=void 0===i?[t]:i,c=or(n),s=ir(t,a,1,f,n,c),l=ir(t,a,0,f,n,c),d=ar(o,l,u),p=d[1];d[0]&&(ne(p)&&te(p.then)?p.then(s,l):s(p))}),0,1)],meta:{op:'fx',fx:'runner'}});u.scope.runner=g,U(u.seq,he((function(e,r,n){var t=r.runner,a=N(n)?{params:e,req:{rs:function(){},rj:function(){}}}:e;return o({target:t,params:a,defer:1,scope:I(n)}),a.params}),0,1)),i.create=function(e){var r=v(),n={params:e,req:r};if(Oe){if(!De){var t=Oe;r.req.finally((function(){Pe(t)})).catch((function(){}))}o({target:i,params:n,scope:Oe})}else o(i,n);return r.req};var h=i.inFlight=d(0,{serialize:'ignore'}).on(i,(function(e){return e+1})).on(f,(function(e){return e-1})).map({fn:function(e){return e},named:'inFlight'});F(f,'needFxCounter','dec'),F(i,'needFxCounter',1);var y=i.pending=h.map({fn:function(e){return e>0},named:'pending'});return ee(i,[f,c,s,p,m,y,h]),null!=t&&t.domain&&t.domain.hooks.effect(i),i}function g(e,r){ue(e,'merge','first argument');var n=l({name:i(e,'merge'),derived:1,and:r});return Xe(e,n,[],'merge'),n}function h(e,t){var a=0;return r(fr,(function(r){r in e&&(n(null!=e[r],cr(t,r)),a=1)})),a}function y(e,n){var t=[];(function e(a){W(t,a)||(U(t,a),"store"===q(a,'op')&&q(a,'sid')&&n(a,q(a,'sid')),r(a.next,e),r(j(a),e),r(z(a),e))})(e)}function b(e,t){var a=Array.isArray(e)?new Map(e):e;if(a instanceof Map){var o={};return r(a,(function(e,r){n(D(r),'Map key should be a unit'),t&&t(r,e),n(r.sid,'unit should have a sid'),n(!(r.sid in o),'duplicate sid found'),o[r.sid]=e})),o}return a}function x(e){var r=function(){return e()};return r.unsubscribe=function(){return e()},r}Object.defineProperty(exports,'__esModule',{value:1});for(var k='undefined'!=typeof Symbol&&Symbol.observable||'@@observable',w='map',S='stack',A=function(e){return e.graphite||e},j=function(e){return e.family.owners},z=function(e){return e.family.links},M=function(e){return e.stateRef},O=function(e){return e.value},C=function(e){return e.subscribers},N=function(e){return e.parent},I=function(e){return e.scope},q=function(e,r){return A(e).meta[r]},F=function(e,r,n){return A(e).meta[r]=n},E=function(e){return e.compositeName},D=function(e){return(te(e)||ne(e))&&'kind'in e},R=function(e){return function(r){return D(r)&&r.kind===e}},_=R("store"),P=R("event"),V=R("effect"),L=R("domain"),B=R("scope"),T={__proto__:null,unit:D,store:_,event:P,effect:V,domain:L,scope:B,attached:function(e){return V(e)&&1==q(e,'attached')}},W=function(e,r){return e.includes(r)},H=function(e,r){var n=e.indexOf(r);-1!==n&&e.splice(n,1)},U=function(e,r){return e.push(r)},$=function(e,r,n){return!e&&console.error(r+" is deprecated"+(n?", use "+n+" instead":''))},G=function(){var e=0;return function(){return""+ ++e}},J=G(),K=G(),Q=G(),X=null,Y=function(){return X&&X.template},Z=function(e){return e&&X&&X.sidRoot&&(e=X.sidRoot+"|"+e),e},ee=function(e,n){var t=A(e);r(n,(function(e){var r=A(e);"domain"!==t.family.type&&(r.family.type="crosslink"),U(j(r),t),U(z(t),r)}))},re=function(e){return void 0===e&&(e=[]),(Array.isArray(e)?e:[e]).flat().map(A)},ne=function(e){return'object'==typeof e&&null!==e},te=function(e){return'function'==typeof e},ae=function(e){return void 0===e},oe=function(e){return n(ne(e)||te(e),'expect first argument be an object')},ie=function(e,r,t,a){return n(!(!ne(e)&&!te(e)||!('family'in e)&&!('graphite'in e)),r+": expect "+t+" to be a unit (store, event or effect)"+a)},ue=function(e,n,t){Array.isArray(e)?r(e,(function(e,r){return ie(e,n,r+" item of "+t,'')})):ie(e,n,t,' or array of units')},fe=function(e,n,t){return void 0===t&&(t='target'),r(re(n),(function(r){return $(!q(r,'derived'),e+": derived unit in \""+t+"\"","createEvent/createStore")}))},ce=function(e,r,n){return(0,r.fn)(e,n.a)},se=function(e,r,n){return(0,r.fn)(n.a,e)},le=function(e,r){return(0,r.fn)(e)},de=function(e,r,n,t){var a={id:K(),type:e,data:r};return n&&(a.order={priority:n},t&&(a.order.barrierID=++pe)),a},pe=0,ve=function(e){var r=e.from,n=e.target,t=e.to;return de('mov',{from:void 0===r?"store":r,store:e.store,to:void 0===t?n?"store":S:t,target:n},e.priority,e.batch)},me=function(e){var r=e.safe,n=e.filter,t=e.pure;return de('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)},ge=function(e){return me({fn:e.fn,priority:"effect"})},he=function(e,r,n){return me({fn:e,safe:1,filter:r,priority:n&&"effect"})},ye=function(e,r,n){return ve({store:e,to:r?S:"a",priority:n&&"sampler",batch:1})},be=function(e,r){return void 0===e&&(e=le),me({fn:e,pure:1,filter:r})},xe={mov:ve,compute:me,filter:function(e){return me({fn:e.fn,filter:1,pure:e.pure})},run:ge},ke=function(e){return{id:K(),current:e}},we=function(e){return e.current},Se=function(e,r){e.before||(e.before=[]),U(e.before,r)},Ae=null,je=function e(r,n){return r?n?((r.v.type===n.v.type&&r.v.id>n.v.id||qe(r.v.type)>qe(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},ze=[],Me=0;Me<6;)U(ze,{first:null,last:null,size:0}),Me+=1;var Oe,Ce=function(){for(var e=0;e<6;e++){var r=ze[e];if(r.size>0){if(3===e||4===e){r.size-=1;var n=Ae.v;return Ae=je(Ae.l,Ae.r),n}1===r.size&&(r.last=null);var t=r.first;return r.first=t.r,r.size-=1,t.v}}},Ne=function(e,r,n,t,a,o){return Ie(0,{a:null,b:null,node:n,parent:t,value:a,page:r,scope:o},e)},Ie=function(e,r,n,t){void 0===t&&(t=0);var a=qe(n),o=ze[a],i={v:{idx:e,stack:r,type:n,id:t},l:null,r:null};3===a||4===a?Ae=je(Ae,i):(0===o.size?o.first=i:o.last.r=i,o.last=i),o.size+=1},qe=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}},Fe=new Set,Ee=1,De=0,Re=0,_e=null,Pe=function(e){Oe=e},Ve=function(e){_e=e},Le=function(e,r){if(e){for(;e&&!e.reg[r];)e=N(e);if(e)return e}return null},Be=function(e,r,n,t,a){var o=Le(e,t.id);return o?o.reg[t.id]:r?(We(r,t,a),r.reg[t.id]):t},Te=function(e){return e},We=function e(n,t,a,o,i){var u,f=n.reg,c=t.sid,s=null==t||null===(u=t.meta)||void 0===u?void 0:u.serialize;if(!f[t.id]){var l={id:t.id,current:t.current,meta:t.meta};if(c&&c in n.sidValuesMap&&!(c in n.sidIdMap))l.current=(n.fromSerialize&&'ignore'!==s&&(null==s?void 0:s.read)||Te)(n.sidValuesMap[c]);else if(t.before&&!i){var d=0,p=a||!t.noInit||o;r(t.before,(function(r){switch(r.type){case w:var t=r.from;if(t||r.fn){t&&e(n,t,a,o);var i=t&&f[t.id].current;p&&(l.current=r.fn?r.fn(i):i)}break;case'field':d||(d=1,l.current=Array.isArray(l.current)?[].concat(l.current):Object.assign({},l.current)),e(n,r.from,a,o),p&&(l.current[r.field]=f[f[r.from.id].id].current)}}))}c&&(n.sidIdMap[c]=t.id),f[t.id]=l}},He=function(e,r,n){try{return r(O(n),e.scope,n)}catch(t){console.error(t),e.fail=1}},Ue=function r(n,t){return void 0===t&&(t={}),ne(n)&&(r(n.or,t),e(n,(function(e,r){ae(e)||'or'===r||'and'===r||(t[r]=e)})),r(n.and,t)),t},$e=function(e,r){H(e.next,r),H(j(e),r),H(z(e),r)},Ge=function e(r,n,t){var a;r.next.length=0,r.seq.length=0,r.scope=null;for(var o=z(r);a=o.pop();)$e(a,r),(n||t&&'sample'!==q(r,'op')||"crosslink"===a.family.type)&&e(a,n,'on'!==q(a,'op')&&t);for(o=j(r);a=o.pop();)$e(a,r),t&&"crosslink"===a.family.type&&e(a,n,'on'!==q(a,'op')&&t)},Je=function(e){return e.clear()},Ke=function(e,r){var n=(void 0===r?{}:r).deep,t=0;if(e.ownerSet&&e.ownerSet.delete(e),_(e))Je(C(e));else if(L(e)){t=1;var a=e.history;Je(a.events),Je(a.effects),Je(a.stores),Je(a.domains)}Ge(A(e),!!n,t)},Qe=function(e){var r=function(){return Ke(e)};return r.unsubscribe=r,r},Xe=function(e,r,n,t,o){return a({node:n,parent:e,child:r,scope:{fn:o},meta:{op:t},family:{owners:[e,r],links:r},regional:1})},Ye=function(e,r){return n(te(r),'.watch argument should be a function'),Qe(a({scope:{fn:r},node:[ge({fn:le})],parent:e,meta:{op:'watch'},family:{owners:e},regional:1}))},Ze=function(e,r,n){void 0===n&&(n="event"),N(e)&&N(e).hooks[n](r)},er=function(e,r,n){var t=Ue(n),a="domain"===e,o=J(),i=t.sid,f=void 0===i?null:i,c=t.named,s=void 0===c?null:c,l=t.domain,d=t.parent,p=void 0===d?void 0===l?null:l:d,v=s||t.name||(a?'':o),m=u(v,p),g={op:r.kind=e,name:r.shortName=v,sid:r.sid=Z(f),named:s,unitId:r.id=o,serialize:t.serialize,derived:t.derived,config:t};if(r.parent=p,r.compositeName=m,r.defaultConfig=t,r.thru=function(e){return $(0,'thru','js pipe'),e(r)},r.getType=function(){return m.fullName},!a){r.subscribe=function(e){return oe(e),r.watch(te(e)?e:function(r){return e.next&&e.next(r)})},r[k]=function(){return r};var h=Y();h&&(g.nativeTemplate=h)}return g},rr=function(e,r,n,t){var a;ne(n)&&(a=n,n=n.fn);var o=l({name:e.shortName+" \u2192 *",derived:1,and:a});return Xe(e,o,t,r,n),o},nr=function(e,r,n,t,a){var o=M(r),i=ve({store:o,to:"a",priority:'read'});n===w&&(i.data.softRead=1);var u=[i,be(t)];return c('storeOnMap',o,u,_(e)&&M(e)),Xe(e,r,u,n,a)},tr=function(r,t,a,o,u){var f=r?function(e){return[].concat(e)}:function(e){return Object.assign({},e)},s=r?[]:{},l=f(s),p=ke(l),v=ke(1);p.type=r?'list':'shape',p.noInit=1,c('combineBase',p,v);var m=d(l,{name:i(a),derived:1,and:o}),g=M(m);g.noInit=1,F(m,'isCombine',1);var h=ye(p);h.order={priority:'barrier'};var y=[he((function(e,r,n){return n.scope&&!n.scope.reg[p.id]&&(n.c=1),e})),h,ve({store:v,to:'b'}),he((function(e,r,n){var a=r.key;if(n.c||e!==n.a[a])return t&&n.b&&(n.a=f(n.a)),n.a[a]=e,1}),1),ve({from:"a",target:p}),ve({from:"value",store:0,target:v}),ve({from:"value",store:1,target:v,priority:"barrier",batch:1}),ye(p,1),u&&be()];return e(a,(function(e,r){if(!_(e))return n(!D(e)&&!ae(e),"combine expects a store in a field "+r),void(l[r]=s[r]=e);s[r]=e.defaultState,l[r]=e.getState();var t=Xe(e,m,y,'combine',u);t.scope.key=r;var a=M(e);Se(p,{type:'field',field:r,from:a}),c('combineField',a,t)})),m.defaultShape=a,Se(g,{type:w,from:p,fn:u}),Y()||(m.defaultState=u?g.current=u(l):s),m},ar=function(e,r,n){try{return[1,e.apply(void 0,n)]}catch(t){return r(t),[0,null]}},or=function(e){var r=I(e),n={ref:r};return r&&U(r.activeEffects,n),n},ir=function(e,r,n,t,a,i){return function(u){i.ref&&H(i.ref.activeEffects,i),o({target:[t,ur],params:[n?{status:'done',params:e,result:u}:{status:'fail',params:e,error:u},{value:u,fn:n?r.rs:r.rj}],defer:1,page:a.page,scope:i.ref})}},ur=a({node:[ge({fn:function(e){return(0,e.fn)(e.value)}})],meta:{op:'fx',fx:'sidechain'}}),fr=['source','clock','target'],cr=function(e,r){return e+": "+r+" should be defined"},sr=function(e,r,t,a,o,i,u,f,s,v,m,h){var y=!!o;n(!ae(t)||!ae(r),cr(e,'either source or clock'));var b=0;ae(t)?b=1:D(t)||(t=p(t)),ae(r)?r=t:(ue(r,e,'clock'),Array.isArray(r)&&(r=g(r))),b&&(t=r),f||u||(u=t.shortName);var x='none';(m||a)&&(D(a)?x='unit':(n(te(a),'`filter` should be function or unit'),x='fn')),o?(ue(o,e,'target'),fe(e,o)):'none'===x&&v&&_(t)&&_(r)?o=d(i?i(we(M(t)),we(M(r))):we(M(t)),{name:u,sid:h,or:f}):(o=l({name:u,derived:1,or:f}),c('sampleTarget',A(o)));var k=ke(),w=[];if('unit'===x){var j=dr(a,o,r,k,e),z=j[0];w=[].concat(lr(j[1]),lr(z))}var O=dr(t,o,r,k,e),C=O[0],N=O[1],I=Xe(r,o,[c('sampleSourceLoader'),ve({from:S,target:k})].concat(lr(N),[ye(C,1,s)],w,[ye(k),'fn'===x&&be((function(e,r,n){return a(e,n.a)}),1),i&&be(ce),c('sampleSourceUpward',y)]),e,i);return ee(t,[I]),Object.assign(I.meta,f,{joint:1}),o},lr=function(e){return[ye(e),he((function(e,r,n){return n.a}),1)]},dr=function(e,r,n,t,o){var i=_(e),u=i?M(e):ke(),f=ke(i);return i||a({parent:e,node:[ve({from:S,target:u}),ve({from:"value",store:1,target:f})],family:{owners:[e,r,n],links:r},meta:{op:o},regional:1}),c('sampleSource',f,u,t),[u,f]},pr=function(e,r,n,t){var a=e[r];a&&o({target:a,params:Array.isArray(a)?a.map((function(){return n})):n,defer:1,stack:t})},vr=function(e){return e};exports.allSettled=function(e,r){var n=r.scope,t=r.params;if(!D(e))return Promise.reject(new Error('first argument should be unit'));if(!V(e)&&!P(e)&&!_(e))return Promise.reject(new Error('first argument accepts only effects, events and stores'));var a=v();a.parentFork=Oe;var i=n.fxCount;U(i.scope.defers,a);var u=[e],f=[];return U(f,V(e)?{params:t,req:{rs:function(e){a.value={status:'done',value:e}},rj:function(e){a.value={status:'fail',value:e}}}}:t),U(u,i),U(f,null),o({target:u,params:f,scope:n}),a.req},exports.attach=function(e){var r,n=f(e,1),t=(e=n[0]).source,a=e.effect,i=e.mapParams,c=m(e,n[1]);F(c,'attached',1);var s,l,d=A(c).scope.runner,v=he((function(e,r,n){var a,u=e.params,f=e.req,s=e.handler,l=c.finally,d=or(n),p=ir(u,f,0,l,n,d),v=n.a,m=V(s),g=1;if(i){var h=ar(i,p,[u,v]);g=h[0],a=h[1]}else a=t&&m?v:u;if(g){if(!m)return e.args=[v,a],1;o({target:s,params:{params:a,req:{rs:ir(u,f,1,l,n,d),rj:p}},page:n.page,defer:1})}}),1,1);t?(_(t)?ee(l=t,[c]):(l=p(t),ee(c,[l])),s=[ye(M(l)),v]):s=[v],(r=d.seq).splice.apply(r,[1,0].concat(s)),c.use(a);var g=N(a);return g&&(Object.assign(E(c),u(c.shortName,g)),c.defaultConfig.parent=g),Ze(a,c,"effect"),c},exports.clearNode=Ke,exports.combine=p,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),o=a[0],i=o[0],u=o[1],c=a[1],s={};return e(u,(function(e,r){var n=s[r]=l(r,{parent:N(i),config:c});i.on(n,e),Ze(i,n)})),s},exports.createDomain=function n(t,i){var u=Ue({or:i,and:'string'==typeof t?{name:t}:t}),f=a({family:{type:"domain"},regional:1,parent:(null==u?void 0:u.domain)||(null==u?void 0:u.parent)}),c={history:{},graphite:f,hooks:{}};f.meta=er("domain",c,{parent:(null==u?void 0:u.domain)||(null==u?void 0:u.parent),or:u}),e({Event:l,Effect:m,Store:d,Domain:n},(function(e,n){var t=n.toLowerCase(),a=l({named:"on"+n});c.hooks[t]=a;var i=new Set;c.history[t+"s"]=i,a.create=function(e){return o(a,e),e},U(A(a).seq,he((function(e,r,n){return n.scope=null,e}))),a.watch((function(e){ee(c,[e]),i.add(e),e.ownerSet||(e.ownerSet=i),N(e)||(e.parent=c)})),ee(c,[a]),c["onCreate"+n]=function(e){return r(i,e),a.watch(e)},c["create"+n]=c[t]=function(r,n){var t=Ue({and:n,or:r});return null!=t&&t.domain?e(r,n):a(e(r,{parent:c,or:t}))}}));var s=N(c);return s&&e(c.hooks,(function(e,r){return Xe(e,s.hooks[r])})),null!=u&&u.domain&&u.domain.hooks.domain(c),c},exports.createEffect=m,exports.createEvent=l,exports.createNode=a,exports.createStore=d,exports.createStoreObject=function(){return $(0,'createStoreObject','combine'),p.apply(void 0,arguments)},exports.createWatch=function(e){var r=e.unit,n=e.fn,t=e.scope,o=[xe.run({fn:function(e){return n(e)}})];if(t){var i=a({node:o}),u=r.graphite.id,f=t.additionalLinks,c=f[u]||[];return f[u]=c,c.push(i),x((function(){var e=c.indexOf(i);-1!==e&&c.splice(e,1),Ke(i)}))}var s=a({node:o,parent:[r],family:{owners:r}});return x((function(){Ke(s)}))},exports.fork=function(e,t){var o,i=e;L(e)&&(o=e,i=t);var u=function(e){var n=a({scope:{defers:[],inFlight:0,fxID:0},node:[he((function(e,r,n){N(n)?'dec'===q(N(n).node,'needFxCounter')?r.inFlight-=1:(r.inFlight+=1,r.fxID+=1):r.fxID+=1})),me({priority:"sampler",batch:1}),he((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){Pe(e.parentFork),e.rs(e.value)}))}))}),0,1)]}),t=a({node:[he((function(e,r,n){var t=N(n);if(t){var a=t.node;if(!q(a,'isCombine')||N(t)&&'combine'!==q(N(t).node,'op')){var o=I(n),i=a.scope.state.id,u=q(a,'sid');o.sidIdMap[u]=i,o.sidValuesMap[u]=e;var f=q(a,'serialize');f&&'ignore'!==f&&(o.sidSerializeMap[u]=f.write)}}}))]}),o=a({node:[he((function(e,r,n){var t=I(n);if(t){var a=N(n);a&&(!q(a.node,'isCombine')||N(a)&&'combine'!==q(N(a).node,'op'))&&(t.warnSerialize=1)}}))]}),i={cloneOf:e,reg:{},sidValuesMap:{},sidIdMap:{},sidSerializeMap:{},getState:function(e){if('current'in e)return Be(_e,i,null,e).current;var r=A(e);return Be(_e,i,r,r.scope.state,1).current},kind:"scope",graphite:a({family:{type:"domain",links:[n,t,o]},meta:{unit:'fork'},scope:{forkInFlightCounter:n}}),additionalLinks:{},handlers:{},fxCount:n,storeChange:t,warnSerializeNode:o,activeEffects:[]};return i}(o);if(i){var f=i.scope;if(f){var c=f.activeEffects;f.activeEffects=[],u.activeEffects=c,r(c,(function(e){return e.ref=u}))}if(i.values){var s=b(i.values,(function(e){return n(_(e),'Values map can contain only stores as keys')}));Object.assign(u.sidValuesMap,s),u.fromSerialize=!(Array.isArray(i.values)||i.values instanceof Map)}i.handlers&&(u.handlers=b(i.handlers,(function(e){return n(V(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],o=t.from,i=t.to,u=n[1];return ue(o,r,'"from"'),ue(i,r,'"to"'),fe(r,i,'to'),Qe(a({parent:o,child:i,meta:{op:r,config:u},family:{},regional:1}))},exports.fromObservable=function(e){oe(e);var r=k in e?e[k]():e;n(r.subscribe,'expect observable to have .subscribe');var t=l(),a=Qe(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],o=a[0],i=a[1],u=t[1];return i||(o=(i=o).source),h(i,'guard'),sr('guard',i.clock,o,i.filter,i.target,null,i.name,u,!i.greedy,0,1)},exports.hydrate=function(e,r){var t=r.values;n(ne(t),'values property should be an object');var a,i,u,f=b(t),c=Object.getOwnPropertyNames(f),s=[],l=[];B(e)?(u=1,n((a=e).cloneOf,'scope should be created from domain'),i=A(a.cloneOf)):L(e)?i=A(e):n(0,'first argument of hydrate should be domain or scope'),y(i,(function(e,r){if(W(c,r)){U(s,e);var n=q(e,'serialize');n&&'ignore'!==n&&(f[r]=n.read(f[r])),U(l,f[r])}})),o({target:s,params:l,scope:a}),u&&Object.assign(a.sidValuesMap,f)},exports.is=T,exports.launch=o,exports.merge=g,exports.restore=function(r,n,t){if(_(r))return $(0,'restore($store)'),r;if(P(r)||V(r)){var a=N(r),o=d(n,{parent:a,name:r.shortName,and:t});return Xe(V(r)?r.doneData:r,o),a&&a.hooks.store(o),o}var i=Array.isArray(r)?[]:{};return e(r,(function(e,r){return i[r]=_(e)?e:d(e,{name:r})})),i},exports.sample=function(){for(var e,r,n=arguments.length,t=new Array(n),a=0;a<n;a++)t[a]=arguments[a];var o,i,u=f(t),c=u[0],s=c[0],l=c[1],d=c[2],p=u[1],v=1;return ae(l)&&ne(s)&&h(s,"sample")&&(l=s.clock,d=s.fn,v=!s.greedy,i=s.filter,e=s.target,r=s.name,o=s.sid,s=s.source),sr("sample",l,s,i,e,d,r,p,v,1,0,o)},exports.scopeBind=function(e,r){var t=void 0===r?{}:r,a=t.scope;n(a||Oe||t.safe,'scopeBind cannot be called outside of forked .watch');var i=a||Oe;return V(e)?function(r){var n=v();return o({target:e,params:{params:r,req:n},scope:i}),n.req}:function(r){return o({target:e,params:r,scope:i}),r}},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');var a=t.ignore?t.ignore.map((function(e){return e.sid})):[],o={};return e(r.sidValuesMap,(function(e,n){if(!W(a,n)){var t=r.sidIdMap[n];o[n]=(r.sidSerializeMap[n]||vr)(t&&t in r.reg?r.reg[t].current:e)}})),'onlyChanges'in t&&!t.onlyChanges&&(n(r.cloneOf,'scope should be created from domain'),y(A(r.cloneOf),(function(e,n){n in o||W(a,n)||q(e,'isCombine')||'ignore'===q(e,'serialize')||(o[n]=r.getState(e))}))),o},exports.setStoreName=function(e,r){e.shortName=r,Object.assign(E(e),u(r,N(e)))},exports.split=function(){for(var r,t,o='split',i=arguments.length,u=new Array(i),s=0;s<i;s++)u[s]=arguments[s];var d=f(u),p=d[0],v=p[0],m=p[1],g=d[1],h=!m;h&&(r=v.cases,m=v.match,t=v.clock,v=v.source);var y=_(m),b=!D(m)&&te(m),x=!y&&!b&&ne(m);r||(r={}),h?e(r,(function(e,r){return fe(o,e,"cases."+r)})):(n(x,'match should be an object'),e(m,(function(e,n){return r[n]=l({derived:1,and:g})})),r.__=l({derived:1,and:g}));var k,w=new Set([].concat(v,t||[],Object.values(r))),S=Object.keys(y||b?r:m);if(y||b)y&&w.add(m),k=[y&&ye(M(m),0,1),me({safe:y,filter:1,pure:!y,fn:function(e,r,n){var t=String(y?n.a:m(e));pr(r,W(S,t)?t:'__',e,n)}})];else if(x){var A=ke({});A.type='shape';var j,z=[];e(m,(function(e,r){if(D(e)){j=1,U(z,r),w.add(e);var n=Xe(e,[],[ye(A),he((function(e,n,t){return t.a[r]=e}))]);if(_(e)){A.current[r]=e.getState();var t=M(e);Se(A,{from:t,field:r,type:'field'}),c('splitMatchStore',t,n)}}})),j&&c('splitBase',A),k=[j&&ye(A,0,1),be((function(e,r,n){for(var t=0;t<S.length;t++){var a=S[t];if(W(z,a)?n.a[a]:m[a](e))return void pr(r,a,e,n)}pr(r,'__',e,n)}),1)]}else n(0,'expect match to be unit, function or object');var O=a({meta:{op:o},parent:t?[]:v,scope:r,node:k,family:{owners:Array.from(w)},regional:1});if(t&&sr(o,t,v,null,O,null,o,g,0,0,0),!h)return r},exports.step=xe,exports.version="22.4.0",exports.withFactory=function(e){var r=e.name,n=e.loc,o=e.method,i=e.fn;return t(a({meta:{sidRoot:Z(e.sid),name:r,loc:n,method:o}}),i)},exports.withRegion=t; | ||
//# sourceMappingURL=compat.js.map |
@@ -1,2 +0,2 @@ | ||
function e(e,t){for(let r in e)t(e[r],r)}function t(e,t){e.forEach(t)}function r(e,t){if(!e)throw Error(t)}function a(e,t){Q={parent:Q,value:e,template:T(e,'template')||X(),sidRoot:T(e,'sidRoot')||Q&&Q.sidRoot};try{return t()}finally{Q=B(Q)}}function n({node:e=[],from:r,source:a,parent:n=r||a,to:o,target:s,child:i=o||s,scope:l={},meta:f={},family:c={type:'regular'},regional:d}={}){let u=ee(n),p=ee(c.links),m=ee(c.owners),h=[];t(e,(e=>e&&z(h,e)));let g={id:K(),seq:h,next:ee(i),meta:f,scope:l,family:{type:c.type||"crosslink",links:p,owners:m}};return t(p,(e=>z(R(e),g))),t(m,(e=>z(_(e),g))),t(u,(e=>z(e.next,g))),d&&Q&&Z(E(Q),[g]),g}function o(e,r,a){let n=Re,o=null,s=qe;if(e.target&&(r=e.params,a=e.defer,n='page'in e?e.page:n,e.stack&&(o=e.stack),s=L(e)||s,e=e.target),s&&qe&&s!==qe&&(qe=null),Array.isArray(e))for(let t=0;t<e.length;t++)Ne('pure',n,D(e[t]),o,r[t],s);else Ne('pure',n,D(e),o,r,s);if(a&&!ze)return;let i,l,f,c,d,u,p={isRoot:ze,currentPage:Re,scope:qe,isWatch:Fe,isPure:De};ze=0;e:for(;c=Me();){let{idx:e,stack:r,type:a}=c;f=r.node,Re=d=r.page,qe=L(r),d?u=d.reg:qe&&(u=qe.reg);let n=!!d,o=!!qe,s={fail:0,scope:f.scope};i=l=0;for(let t=e;t<f.seq.length&&!i;t++){let c=f.seq[t];if(c.order){let{priority:n,barrierID:o}=c.order,s=o?d?`${d.fullID}_${o}`:o:0;if(t!==e||a!==n){o?Oe.has(s)||(Oe.add(s),Ae(t,r,n,o)):Ae(t,r,n);continue e}o&&Oe.delete(s)}switch(c.type){case'mov':{let e,t=c.data;switch(t.from){case w:e=E(r);break;case"a":case'b':e=r[t.from];break;case"value":e=t.store;break;case"store":if(u&&!u[t.store.id])if(n){let e=Ee(d,t.store.id);r.page=d=e,e?u=e.reg:o?(Be(qe,t.store,0,1,t.softRead),u=qe.reg):u=void 0}else o&&Be(qe,t.store,0,1,t.softRead);e=ke(u&&u[t.store.id]||t.store)}switch(t.to){case w:r.value=e;break;case"a":case'b':r[t.to]=e;break;case"store":Ve(d,qe,f,t.target).current=e}break}case'compute':let e=c.data;if(e.fn){Fe='watch'===T(f,'op'),De=e.pure;let t=e.safe?(0,e.fn)(E(r),s.scope,r):Le(s,e.fn,r);e.filter?l=!t:r.value=t,Fe=p.isWatch,De=p.isPure}}i=s.fail||l}if(!i){let e=E(r);t(f.next,(t=>{Ne('child',d,t,r,e,L(r))}));let a=L(r);if(a){T(f,'needFxCounter')&&Ne('child',d,a.fxCount,r,e,a),T(f,'storeChange')&&Ne('child',d,a.storeChange,r,e,a),T(f,'warnSerialize')&&Ne('child',d,a.warnSerializeNode,r,e,a);let n=a.additionalLinks[f.id];n&&t(n,(t=>{Ne('child',d,t,r,e,a)}))}}}ze=p.isRoot,Re=p.currentPage,qe=L(p)}function s(t,r="combine"){let a=r+'(',n='',o=0;return e(t,(e=>{o<25&&(null!=e&&(a+=n,a+=S(e)?H(e).fullName:e.toString()),o+=1,n=', ')})),a+')'}function i(e,t){let r,a,n=e;if(t){let n=H(t);0===e.length?(r=n.path,a=n.fullName):(r=n.path.concat([e]),a=0===n.fullName.length?e:n.fullName+'/'+e)}else r=0===e.length?[]:[e],a=e;return{shortName:n,fullName:a,path:r}}function l(e,t){let r=t?e:e[0];ne(r);let a=r.or,n=r.and;if(n){let r=t?n:n[0];if(te(r)&&'and'in r){let r=l(n,t);e=r[0],a={...a,...r[1]}}else e=n}return[e,a]}function f(e,...t){let r=X();if(r){let a=r.handlers[e];if(a)return a(r,...t)}}function c(e,t){let r=(e,...t)=>(F(!T(r,'derived'),'call of derived event','createEvent'),F(!De,'unit call from pure function','operators like sample'),Re?((e,t,r,a)=>{let n=Re,o=null;if(t)for(o=Re;o&&o.template!==t;)o=B(o);Pe(o);let s=e.create(r,a);return Pe(n),s})(r,a,e,t):r.create(e,t)),a=X();return Object.assign(r,{graphite:n({meta:Ye("event",r,e,t),regional:1}),create:e=>(o({target:r,params:e,scope:qe}),e),watch:e=>Qe(r,e),map:e=>Ze(r,k,e,[be()]),filter:e=>Ze(r,"filter",e.fn?e:e.fn,[be(ce,1)]),filterMap:e=>Ze(r,'filterMap',e,[be(),ge((e=>!ae(e)),1)]),prepend(e){let t=c('* \u2192 '+r.shortName,{parent:B(r)});return f('eventPrepend',D(t)),Ke(t,r,[be()],'prepend',e),Xe(r,t),t}})}function d(e,a){let s=xe(e),i=c({named:'updates',derived:1});f('storeBase',s);let l=s.id,u={subscribers:new Map,updates:i,defaultState:e,stateRef:s,getState(){let e,t=s;if(Re){let t=Re;for(;t&&!t.reg[l];)t=B(t);t&&(e=t)}return!e&&qe&&(Be(qe,s,1),e=qe),e&&(t=e.reg[l]),ke(t)},setState:e=>o({target:u,params:e,defer:1,scope:qe}),reset:(...e)=>(t(e,(e=>u.on(e,(()=>u.defaultState)))),u),on:(e,r)=>(se(e,'.on','first argument'),F(!T(u,'derived'),'.on in derived store','createStore'),t(Array.isArray(e)?e:[e],(e=>{u.off(e),V(u).set(e,Je(et(e,u,'on',fe,r)))})),u),off(e){let t=V(u).get(e);return t&&(t(),V(u).delete(e)),u},map(e,t){let r,a;te(e)&&(r=e,e=e.fn),F(ae(t),'second argument of store.map','updateFilter');let n=u.getState();X()?a=null:ae(n)||(a=e(n,t));let o=d(a,{name:`${u.shortName} \u2192 *`,derived:1,and:r}),i=et(u,o,k,le,e);return we(P(o),{type:k,fn:e,from:s}),P(o).noInit=1,f('storeMap',s,i),o},watch(e,t){if(!t||!S(e)){let t=Qe(u,e);return f('storeWatch',s,e)||e(u.getState()),t}return r(re(t),'second argument should be a function'),e.watch((e=>t(u.getState(),e)))}},p=Ye("store",u,a),m=u.defaultConfig.updateFilter;u.graphite=n({scope:{state:s,fn:m},node:[ge(((e,t,r)=>(r.scope&&!r.scope.reg[s.id]&&(r.b=1),e))),ye(s),ge(((e,t,{a:r,b:a})=>!ae(e)&&(e!==r||a)),1),m&&be(le,1),pe({from:w,target:s})],child:i,meta:p,regional:1});let h=T(u,'derived'),g='ignore'===T(u,'serialize'),y=T(u,'sid');return y&&(g||W(u,'storeChange',1),s.sid=y),y||g||h||W(u,'warnSerialize',1),r(h||!ae(e),"current state can't be undefined, use null instead"),Z(u,[i]),u}function u(...e){let t,a,n;[e,n]=l(e);let o,s,i,f=e[e.length-1];if(re(f)?(a=e.slice(0,-1),t=f):a=e,1===a.length){let e=a[0];C(e)||(o=e,s=1)}if(!s&&(o=a,t)){i=1;let e=t;t=t=>e(...t)}return r(te(o),'shape should be an object'),tt(Array.isArray(o),!i,o,n,t)}function p(){let e={};return e.req=new Promise(((t,r)=>{e.rs=t,e.rj=r})),e.req.catch((()=>{})),e}function m(e,t){let a=c(re(e)?{handler:e}:e,t),s=D(a);W(s,'op',a.kind="effect"),a.use=e=>(r(re(e),'.use argument should be a function'),h.scope.handler=e,a),a.use.getCurrent=()=>h.scope.handler;let i=a.finally=c({named:'finally',derived:1}),l=a.done=i.filterMap({named:'done',fn({status:e,params:t,result:r}){if('done'===e)return{params:t,result:r}}}),f=a.fail=i.filterMap({named:'fail',fn({status:e,params:t,error:r}){if('fail'===e)return{params:t,error:r}}}),u=a.doneData=l.map({named:'doneData',fn:({result:e})=>e}),m=a.failData=f.map({named:'failData',fn:({error:e})=>e}),h=n({scope:{handlerId:T(s,'sid'),handler:a.defaultConfig.handler||(()=>r(0,`no handler used in ${a.getType()}`))},node:[ge(((e,t,r)=>{let a=t,n=a.handler;if(L(r)){let e=L(r).handlers[a.handlerId];e&&(n=e)}return e.handler=n,e}),0,1),ge((({params:e,req:t,handler:r,args:a=[e]},n,o)=>{let s=at(e,t,1,i,o),l=at(e,t,0,i,o),[f,c]=rt(r,l,a);f&&(te(c)&&re(c.then)?c.then(s,l):s(c))}),0,1)],meta:{op:'fx',fx:'runner'}});s.scope.runner=h,z(s.seq,ge(((e,{runner:t},r)=>{let a=B(r)?{params:e,req:{rs(e){},rj(e){}}}:e;return o({target:t,params:a,defer:1,scope:L(r)}),a.params}),0,1)),a.create=e=>{let t=p(),r={params:e,req:t};if(qe){if(!Fe){let e=qe;t.req.finally((()=>{_e(e)})).catch((()=>{}))}o({target:a,params:r,scope:qe})}else o(a,r);return t.req};let g=a.inFlight=d(0,{serialize:'ignore'}).on(a,(e=>e+1)).on(i,(e=>e-1)).map({fn:e=>e,named:'inFlight'});W(i,'needFxCounter','dec'),W(a,'needFxCounter',1);let y=a.pending=g.map({fn:e=>e>0,named:'pending'});return Z(a,[i,l,f,u,m,y,g]),a}function h(e,t){se(e,'merge','first argument');let r=c({name:s(e,'merge'),derived:1,and:t});return Ke(e,r,[],'merge'),r}function g(e,a){let n=0;return t(ot,(t=>{t in e&&(r(null!=e[t],st(a,t)),n=1)})),n}function y(e,r){let a=[];(function e(n){O(a,n)||(z(a,n),"store"===T(n,'op')&&T(n,'sid')&&r(n,T(n,'sid')),t(n.next,e),t(R(n),e),t(_(n),e))})(e)}function b(e,a){if(Array.isArray(e)&&(e=new Map(e)),e instanceof Map){let n={};return t(e,((e,t)=>{r(S(t),'Map key should be a unit'),a&&a(t,e),r(t.sid,'unit should have a sid'),r(!(t.sid in n),'duplicate sid found'),n[t.sid]=e})),n}return e}function v(e){let t=()=>e();return t.unsubscribe=()=>e(),t}Object.defineProperty(exports,'__esModule',{value:1});let x='undefined'!=typeof Symbol&&Symbol.observable||'@@observable',k='map',w='stack',S=e=>(re(e)||te(e))&&'kind'in e;const j=e=>t=>S(t)&&t.kind===e;let C=j("store"),$=j("event"),M=j("effect"),N=j("domain"),A=j("scope");var I={__proto__:null,unit:S,store:C,event:$,effect:M,domain:N,scope:A};let O=(e,t)=>e.includes(t),q=(e,t)=>{let r=e.indexOf(t);-1!==r&&e.splice(r,1)},z=(e,t)=>e.push(t),F=(e,t,r)=>!e&&console.error(`${t} is deprecated${r?`, use ${r} instead`:''}`),D=e=>e.graphite||e,R=e=>e.family.owners,_=e=>e.family.links,P=e=>e.stateRef,E=e=>e.value,V=e=>e.subscribers,B=e=>e.parent,L=e=>e.scope,T=(e,t)=>D(e).meta[t],W=(e,t,r)=>D(e).meta[t]=r,H=e=>e.compositeName;const U=()=>{let e=0;return()=>""+ ++e};let G=U(),J=U(),K=U(),Q=null,X=()=>Q&&Q.template,Y=e=>(e&&Q&&Q.sidRoot&&(e=`${Q.sidRoot}|${e}`),e),Z=(e,r)=>{let a=D(e);t(r,(e=>{let t=D(e);"domain"!==a.family.type&&(t.family.type="crosslink"),z(R(t),a),z(_(a),t)}))},ee=(e=[])=>(Array.isArray(e)?e:[e]).flat().map(D),te=e=>'object'==typeof e&&null!==e,re=e=>'function'==typeof e,ae=e=>void 0===e,ne=e=>r(te(e)||re(e),'expect first argument be an object');const oe=(e,t,a,n)=>r(!(!te(e)&&!re(e)||!('family'in e)&&!('graphite'in e)),`${t}: expect ${a} to be a unit (store, event or effect)${n}`);let se=(e,r,a)=>{Array.isArray(e)?t(e,((e,t)=>oe(e,r,`${t} item of ${a}`,''))):oe(e,r,a,' or array of units')},ie=(e,r,a="target")=>t(ee(r),(t=>F(!T(t,'derived'),`${e}: derived unit in "${a}"`,"createEvent/createStore"))),le=(e,{fn:t},{a:r})=>t(e,r),fe=(e,{fn:t},{a:r})=>t(r,e),ce=(e,{fn:t})=>t(e);const de=(e,t,r,a)=>{let n={id:J(),type:e,data:t};return r&&(n.order={priority:r},a&&(n.order.barrierID=++ue)),n};let ue=0,pe=({from:e="store",store:t,target:r,to:a=(r?"store":w),batch:n,priority:o})=>de('mov',{from:e,store:t,to:a,target:r},o,n),me=({fn:e,batch:t,priority:r,safe:a=0,filter:n=0,pure:o=0})=>de('compute',{fn:e,safe:a,filter:n,pure:o},r,t),he=({fn:e})=>me({fn:e,priority:"effect"}),ge=(e,t,r)=>me({fn:e,safe:1,filter:t,priority:r&&"effect"}),ye=(e,t,r)=>pe({store:e,to:t?w:"a",priority:r&&"sampler",batch:1}),be=(e=ce,t)=>me({fn:e,pure:1,filter:t}),ve={mov:pe,compute:me,filter:({fn:e,pure:t})=>me({fn:e,filter:1,pure:t}),run:he},xe=e=>({id:J(),current:e}),ke=({current:e})=>e,we=(e,t)=>{e.before||(e.before=[]),z(e.before,t)},Se=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||Ie(e.v.type)>Ie(t.v.type))&&(r=e,e=t,t=r),r=je(e.r,t),e.r=e.l,e.l=r,e},Ce=[];let $e=0;for(;$e<6;)z(Ce,{first:null,last:null,size:0}),$e+=1;const Me=()=>{for(let e=0;e<6;e++){let t=Ce[e];if(t.size>0){if(3===e||4===e){t.size-=1;let e=Se.v;return Se=je(Se.l,Se.r),e}1===t.size&&(t.last=null);let r=t.first;return t.first=r.r,t.size-=1,r.v}}},Ne=(e,t,r,a,n,o)=>Ae(0,{a:null,b:null,node:r,parent:a,value:n,page:t,scope:o},e),Ae=(e,t,r,a=0)=>{let n=Ie(r),o=Ce[n],s={v:{idx:e,stack:t,type:r,id:a},l:null,r:null};3===n||4===n?Se=je(Se,s):(0===o.size?o.first=s:o.last.r=s,o.last=s),o.size+=1},Ie=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}},Oe=new Set;let qe,ze=1,Fe=0,De=0,Re=null,_e=e=>{qe=e},Pe=e=>{Re=e};const Ee=(e,t)=>{if(e){for(;e&&!e.reg[t];)e=B(e);if(e)return e}return null};let Ve=(e,t,r,a,n)=>{let o=Ee(e,a.id);return o?o.reg[a.id]:t?(Be(t,a,n),t.reg[a.id]):a},Be=(e,r,a,n,o)=>{let s=e.reg,i=r.sid;if(s[r.id])return;let l={id:r.id,current:r.current};if(i&&i in e.sidValuesMap&&!(i in e.sidIdMap))l.current=e.sidValuesMap[i];else if(r.before&&!o){let o=0,i=a||!r.noInit||n;t(r.before,(t=>{switch(t.type){case k:{let r=t.from;if(r||t.fn){r&&Be(e,r,a,n);let o=r&&s[r.id].current;i&&(l.current=t.fn?t.fn(o):o)}break}case'field':o||(o=1,l.current=Array.isArray(l.current)?[...l.current]:{...l.current}),Be(e,t.from,a,n),i&&(l.current[t.field]=s[s[t.from.id].id].current)}}))}i&&(e.sidIdMap[i]=r.id),s[r.id]=l};const Le=(e,t,r)=>{try{return t(E(r),e.scope,r)}catch(t){console.error(t),e.fail=1}};let Te=(t,r={})=>(te(t)&&(Te(t.or,r),e(t,((e,t)=>{ae(e)||'or'===t||'and'===t||(r[t]=e)})),Te(t.and,r)),r);const We=(e,t)=>{q(e.next,t),q(R(e),t),q(_(e),t)},He=(e,t,r)=>{let a;e.next.length=0,e.seq.length=0,e.scope=null;let n=_(e);for(;a=n.pop();)We(a,e),(t||r&&'sample'!==T(e,'op')||"crosslink"===a.family.type)&&He(a,t,'on'!==T(a,'op')&&r);for(n=R(e);a=n.pop();)We(a,e),r&&"crosslink"===a.family.type&&He(a,t,'on'!==T(a,'op')&&r)},Ue=e=>e.clear();let Ge=(e,{deep:t}={})=>{let r=0;if(e.ownerSet&&e.ownerSet.delete(e),C(e))Ue(V(e));else if(N(e)){r=1;let t=e.history;Ue(t.events),Ue(t.effects),Ue(t.stores),Ue(t.domains)}He(D(e),!!t,r)},Je=e=>{let t=()=>Ge(e);return t.unsubscribe=t,t},Ke=(e,t,r,a,o)=>n({node:r,parent:e,child:t,scope:{fn:o},meta:{op:a},family:{owners:[e,t],links:t},regional:1}),Qe=(e,t)=>(r(re(t),'.watch argument should be a function'),Je(n({scope:{fn:t},node:[he({fn:ce})],parent:e,meta:{op:'watch'},family:{owners:e},regional:1}))),Xe=(e,t,r="event")=>{B(e)&&B(e).hooks[r](t)},Ye=(e,t,r,a)=>{let n="domain"===e,o=G(),s=Te({or:a,and:'string'==typeof r?{name:r}:r}),{parent:l=null,sid:f=null,named:c=null}=s,d=c||s.name||(n?'':o),u=i(d,l),p={op:t.kind=e,name:t.shortName=d,sid:t.sid=Y(f),named:c,unitId:t.id=o,serialize:s.serialize,derived:s.derived,config:s};if(t.parent=l,t.compositeName=u,t.defaultConfig=s,t.thru=e=>(F(0,'thru','js pipe'),e(t)),t.getType=()=>u.fullName,!n){t.subscribe=e=>(ne(e),t.watch(re(e)?e:t=>e.next&&e.next(t))),t[x]=()=>t;let e=X();e&&(p.nativeTemplate=e)}return p};const Ze=(e,t,r,a)=>{let n;te(r)&&(n=r,r=r.fn);let o=c({name:`${e.shortName} \u2192 *`,derived:1,and:n});return Ke(e,o,a,t,r),o},et=(e,t,r,a,n)=>{let o=P(t),s=pe({store:o,to:"a",priority:'read'});r===k&&(s.data.softRead=1);let i=[s,be(a)];return f('storeOnMap',o,i,C(e)&&P(e)),Ke(e,t,i,r,n)},tt=(t,a,n,o,i)=>{let l=t?e=>e.slice():e=>({...e}),c=t?[]:{},u=l(c),p=xe(u),m=xe(1);p.type=t?'list':'shape',p.noInit=1,f('combineBase',p,m);let h=d(u,{name:s(n),derived:1,and:o}),g=P(h);g.noInit=1,W(h,'isCombine',1);let y=ye(p);y.order={priority:'barrier'};let b=[ge(((e,t,r)=>(r.scope&&!r.scope.reg[p.id]&&(r.c=1),e))),y,pe({store:m,to:'b'}),ge(((e,{key:t},r)=>{if(r.c||e!==r.a[t])return a&&r.b&&(r.a=l(r.a)),r.a[t]=e,1}),1),pe({from:"a",target:p}),pe({from:"value",store:0,target:m}),pe({from:"value",store:1,target:m,priority:"barrier",batch:1}),ye(p,1),i&&be()];return e(n,((e,t)=>{if(!C(e))return r(!S(e)&&!ae(e),`combine expects a store in a field ${t}`),void(u[t]=c[t]=e);c[t]=e.defaultState,u[t]=e.getState();let a=Ke(e,h,b,'combine',i);a.scope.key=t;let n=P(e);we(p,{type:'field',field:t,from:n}),f('combineField',n,a)})),h.defaultShape=n,we(g,{type:k,from:p,fn:i}),X()||(h.defaultState=i?g.current=i(u):c),h};let rt=(e,t,r)=>{try{return[1,e(...r)]}catch(e){return t(e),[0,null]}},at=(e,t,r,a,n)=>s=>o({target:[a,nt],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:n.page,scope:L(n)});const nt=n({node:[he({fn:({fn:e,value:t})=>e(t)})],meta:{op:'fx',fx:'sidechain'}}),ot=['source','clock','target'],st=(e,t)=>e+`: ${t} should be defined`;let lt=(e,t,a,n,o,s,i,l,p,m,g,y)=>{let b=!!o;r(!ae(a)||!ae(t),st(e,'either source or clock'));let v=0;ae(a)?v=1:S(a)||(a=u(a)),ae(t)?t=a:(se(t,e,'clock'),Array.isArray(t)&&(t=h(t))),v&&(a=t),l||i||(i=a.shortName);let x='none';(g||n)&&(S(n)?x='unit':(r(re(n),'`filter` should be function or unit'),x='fn')),o?(se(o,e,'target'),ie(e,o)):'none'===x&&m&&C(a)&&C(t)?o=d(s?s(ke(P(a)),ke(P(t))):ke(P(a)),{name:i,sid:y,or:l}):(o=c({name:i,derived:1,or:l}),f('sampleTarget',D(o)));let k=xe(),j=[];if('unit'===x){let[r,a]=ct(n,o,t,k,e);j=[...ft(a),...ft(r)]}let[$,M]=ct(a,o,t,k,e);return Z(a,[Ke(t,o,[f('sampleSourceLoader'),pe({from:w,target:k}),...ft(M),ye($,1,p),...j,ye(k),'fn'===x&&be(((e,t,{a:r})=>n(e,r)),1),s&&be(le),f('sampleSourceUpward',b)],e,s)]),o};const ft=e=>[ye(e),ge(((e,t,{a:r})=>r),1)],ct=(e,t,r,a,o)=>{let s=C(e),i=s?P(e):xe(),l=xe(s);return s||n({parent:e,node:[pe({from:w,target:i}),pe({from:"value",store:1,target:l})],family:{owners:[e,t,r],links:t},meta:{op:o},regional:1}),f('sampleSource',l,i,a),[i,l]},dt=(e,t,r,a)=>{let n=e[t];n&&o({target:n,params:Array.isArray(n)?n.map((()=>r)):r,defer:1,stack:a})};exports.allSettled=(e,{scope:t,params:r})=>{if(!S(e))return Promise.reject(new Error('first argument should be unit'));if(!M(e)&&!$(e)&&!C(e))return Promise.reject(new Error('first argument accepts only effects, events and stores'));let a=p();a.parentFork=qe;let{fxCount:n}=t;z(n.scope.defers,a);let s=[e],i=[];return z(i,M(e)?{params:r,req:{rs(e){a.value={status:'done',value:e}},rj(e){a.value={status:'fail',value:e}}}}:r),z(s,n),z(i,null),o({target:s,params:i,scope:t}),a.req},exports.attach=e=>{let t;[e,t]=l(e,1);let{source:r,effect:a,mapParams:n}=e,s=m(e,t);W(s,'attached',1);let f,{runner:c}=D(s).scope,d=ge(((e,t,a)=>{let i,{params:l,req:f,handler:c}=e,d=s.finally,u=at(l,f,0,d,a),p=a.a,m=M(c),h=1;if(n?[h,i]=rt(n,u,[l,p]):i=r&&m?p:l,h){if(!m)return e.args=[p,i],1;o({target:c,params:{params:i,req:{rs:at(l,f,1,d,a),rj:u}},page:a.page,defer:1})}}),1,1);if(r){let e;C(r)?(e=r,Z(e,[s])):(e=u(r),Z(s,[e])),f=[ye(P(e)),d]}else f=[d];c.seq.splice(1,0,...f),s.use(a);let p=B(a);return p&&(Object.assign(H(s),i(s.shortName,p)),s.defaultConfig.parent=p),Xe(a,s,"effect"),s},exports.clearNode=Ge,exports.combine=u,exports.createApi=(...t)=>{let[[r,a],n]=l(t),o={};return e(a,((e,t)=>{let a=o[t]=c(t,{parent:B(r),config:n});r.on(a,e),Xe(r,a)})),o},exports.createDomain=function r(a,s){let i=n({family:{type:"domain"},regional:1}),l={history:{},graphite:i,hooks:{}};i.meta=Ye("domain",l,a,s),e({Event:c,Effect:m,Store:d,Domain:r},((e,r)=>{let a=r.toLowerCase(),n=c({named:`on${r}`});l.hooks[a]=n;let s=new Set;l.history[`${a}s`]=s,n.create=e=>(o(n,e),e),z(D(n).seq,ge(((e,t,r)=>(r.scope=null,e)))),n.watch((e=>{Z(l,[e]),s.add(e),e.ownerSet||(e.ownerSet=s),B(e)||(e.parent=l)})),Z(l,[n]),l[`onCreate${r}`]=e=>(t(s,e),n.watch(e)),l[`create${r}`]=l[a]=(t,r)=>n(e(t,{parent:l,or:r}))}));let f=B(l);return f&&e(l.hooks,((e,t)=>Ke(e,f.hooks[t]))),l},exports.createEffect=m,exports.createEvent=c,exports.createNode=n,exports.createStore=d,exports.createStoreObject=(...e)=>(F(0,'createStoreObject','combine'),u(...e)),exports.createWatch=({unit:e,fn:t,scope:r})=>{let a=[ve.run({fn:e=>t(e)})];if(r){let t=n({node:a}),o=e.graphite.id,s=r.additionalLinks,i=s[o]||[];return s[o]=i,i.push(t),v((()=>{let e=i.indexOf(t);-1!==e&&i.splice(e,1),Ge(t)}))}{let t=n({node:a,parent:[e],family:{owners:e}});return v((()=>{Ge(t)}))}},exports.fork=(e,a)=>{let o,s=e;N(e)&&(o=e,s=a);let i=(e=>{let r=n({scope:{defers:[],inFlight:0,fxID:0},node:[ge(((e,t,r)=>{B(r)?'dec'===T(B(r).node,'needFxCounter')?t.inFlight-=1:(t.inFlight+=1,t.fxID+=1):t.fxID+=1})),me({priority:"sampler",batch:1}),ge(((e,r)=>{let{defers:a,fxID:n}=r;r.inFlight>0||0===a.length||Promise.resolve().then((()=>{r.fxID===n&&t(a.splice(0,a.length),(e=>{_e(e.parentFork),e.rs(e.value)}))}))}),0,1)]}),a=n({node:[ge(((e,t,r)=>{let a=B(r);if(a){let t=a.node;if(!T(t,'isCombine')||B(a)&&'combine'!==T(B(a).node,'op')){let a=L(r),n=t.scope.state.id,o=T(t,'sid');a.sidIdMap[o]=n,a.sidValuesMap[o]=e}}}))]}),o=n({node:[ge(((e,t,r)=>{let a=L(r);if(a){let e=B(r);e&&(!T(e.node,'isCombine')||B(e)&&'combine'!==T(B(e).node,'op'))&&(a.warnSerialize=1)}}))]}),s={cloneOf:e,reg:{},sidValuesMap:{},sidIdMap:{},getState(e){if('current'in e)return Ve(Re,s,null,e).current;let t=D(e);return Ve(Re,s,t,t.scope.state,1).current},kind:"scope",graphite:n({family:{type:"domain",links:[r,a,o]},meta:{unit:'fork'},scope:{forkInFlightCounter:r}}),additionalLinks:{},handlers:{},fxCount:r,storeChange:a,warnSerializeNode:o};return s})(o);if(s){if(s.values){let e=b(s.values,(e=>r(C(e),'Values map can contain only stores as keys')));Object.assign(i.sidValuesMap,e)}s.handlers&&(i.handlers=b(s.handlers,(e=>r(M(e),"Handlers map can contain only effects as keys"))))}return i},exports.forward=e=>{let t='forward',[{from:r,to:a},o]=l(e,1);return se(r,t,'"from"'),se(a,t,'"to"'),ie(t,a,'to'),Je(n({parent:r,child:a,meta:{op:t,config:o},family:{},regional:1}))},exports.fromObservable=e=>{ne(e);let t=x in e?e[x]():e;r(t.subscribe,'expect observable to have .subscribe');let a=c(),n=Je(a);return t.subscribe({next:a,error:n,complete:n}),a},exports.guard=(...e)=>{let[[t,r],a]=l(e);return r||(r=t,t=r.source),g(r,'guard'),lt('guard',r.clock,t,r.filter,r.target,null,r.name,a,!r.greedy,0,1)},exports.hydrate=(e,{values:t})=>{r(te(t),'values property should be an object');let a,n,s,i=b(t),l=Object.getOwnPropertyNames(i),f=[],c=[];A(e)?(a=e,s=1,r(a.cloneOf,'scope should be created from domain'),n=D(a.cloneOf)):N(e)?n=D(e):r(0,'first argument of hydrate should be domain or scope'),y(n,((e,t)=>{O(l,t)&&(z(f,e),z(c,i[t]))})),o({target:f,params:c,scope:a}),s&&Object.assign(a.sidValuesMap,i)},exports.is=I,exports.launch=o,exports.merge=h,exports.restore=(t,r,a)=>{if(C(t))return F(0,'restore($store)'),t;if($(t)||M(t)){let e=B(t),n=d(r,{parent:e,name:t.shortName,and:a});return Ke(M(t)?t.doneData:t,n),e&&e.hooks.store(n),n}let n=Array.isArray(t)?[]:{};return e(t,((e,t)=>n[t]=C(e)?e:d(e,{name:t}))),n},exports.sample=(...e)=>{let t,r,a,n,[[o,s,i],f]=l(e),c=1;return ae(s)&&te(o)&&g(o,"sample")&&(s=o.clock,i=o.fn,c=!o.greedy,n=o.filter,t=o.target,r=o.name,a=o.sid,o=o.source),lt("sample",s,o,n,t,i,r,f,c,1,0,a)},exports.scopeBind=(e,{scope:t}={})=>{r(t||qe,'scopeBind cannot be called outside of forked .watch');let a=t||qe;return M(e)?t=>{let r=p();return o({target:e,params:{params:t,req:r},scope:a}),r.req}:t=>(o({target:e,params:t,scope:a}),t)},exports.serialize=(t,a={})=>{t.warnSerialize&&console.error('There is a store without sid in this scope, its value is omitted');let n=a.ignore?a.ignore.map((({sid:e})=>e)):[],o={};return e(t.sidValuesMap,((e,r)=>{if(O(n,r))return;let a=t.sidIdMap[r];o[r]=a&&a in t.reg?t.reg[a].current:e})),'onlyChanges'in a&&!a.onlyChanges&&(r(t.cloneOf,'scope should be created from domain'),y(D(t.cloneOf),((e,r)=>{r in o||O(n,r)||T(e,'isCombine')||'ignore'===T(e,'serialize')||(o[r]=t.getState(e))}))),o},exports.setStoreName=(e,t)=>{e.shortName=t,Object.assign(H(e),i(t,B(e)))},exports.split=(...t)=>{let a,o,s='split',[[i,d],u]=l(t),p=!d;p&&(a=i.cases,d=i.match,o=i.clock,i=i.source);let m=C(d),h=!S(d)&&re(d),g=!m&&!h&&te(d);a||(a={}),p?e(a,((e,t)=>ie(s,e,`cases.${t}`))):(r(g,'match should be an object'),e(d,((e,t)=>a[t]=c({derived:1,and:u}))),a.__=c({derived:1,and:u}));let y,b=new Set([].concat(i,o||[],Object.values(a))),v=Object.keys(m||h?a:d);if(m||h)m&&b.add(d),y=[m&&ye(P(d),0,1),me({safe:m,filter:1,pure:!m,fn(e,t,r){let a=String(m?r.a:d(e));dt(t,O(v,a)?a:'__',e,r)}})];else if(g){let t=xe({});t.type='shape';let r,a=[];e(d,((e,n)=>{if(S(e)){r=1,z(a,n),b.add(e);let o=Ke(e,[],[ye(t),ge(((e,t,{a:r})=>r[n]=e))]);if(C(e)){t.current[n]=e.getState();let r=P(e);we(t,{from:r,field:n,type:'field'}),f('splitMatchStore',r,o)}}})),r&&f('splitBase',t),y=[r&&ye(t,0,1),be(((e,t,r)=>{for(let n=0;n<v.length;n++){let o=v[n];if(O(a,o)?r.a[o]:d[o](e))return void dt(t,o,e,r)}dt(t,'__',e,r)}),1)]}else r(0,'expect match to be unit, function or object');let x=n({meta:{op:s},parent:o?[]:i,scope:a,node:y,family:{owners:Array.from(b)},regional:1});if(o&<(s,o,i,null,x,null,s,u,0,0,0),!p)return a},exports.step=ve,exports.version="22.3.0",exports.withFactory=({sid:e,name:t,loc:r,method:o,fn:s})=>a(n({meta:{sidRoot:Y(e),name:t,loc:r,method:o}}),s),exports.withRegion=a; | ||
function e(e,t){for(let r in e)t(e[r],r)}function t(e,t){e.forEach(t)}function r(e,t){if(!e)throw Error(t)}function a(e,t){Q={parent:Q,value:e,template:O(e,'template')||X(),sidRoot:O(e,'sidRoot')||Q&&Q.sidRoot};try{return t()}finally{Q=A(Q)}}function n({node:e=[],from:r,source:a,parent:n=r||a,to:o,target:i,child:l=o||i,scope:s={},meta:f={},family:d={type:'regular'},regional:c}={}){let u=ee(n),p=ee(d.links),m=ee(d.owners),h=[];t(e,(e=>e&&W(h,e)));let g={id:K(),seq:h,next:ee(l),meta:f,scope:s,family:{type:d.type||"crosslink",links:p,owners:m}};return t(p,(e=>W(z(e),g))),t(m,(e=>W(M(e),g))),t(u,(e=>W(e.next,g))),c&&Q&&Z(C(Q),[g]),g}function o(e,r,a){let n=De,o=null,i=Ie;if(e.target&&(r=e.params,a=e.defer,n='page'in e?e.page:n,e.stack&&(o=e.stack),i=N(e)||i,e=e.target),i&&Ie&&i!==Ie&&(Ie=null),Array.isArray(e))for(let t=0;t<e.length;t++)$e('pure',n,S(e[t]),o,r[t],i);else $e('pure',n,S(e),o,r,i);if(a&&!qe)return;let l,s,f,d,c,u,p={isRoot:qe,currentPage:De,scope:Ie,isWatch:Fe,isPure:Ee};qe=0;e:for(;d=Ce();){let{idx:e,stack:r,type:a}=d;f=r.node,De=c=r.page,Ie=N(r),c?u=c.reg:Ie&&(u=Ie.reg);let n=!!c,o=!!Ie,i={fail:0,scope:f.scope};l=s=0;for(let t=e;t<f.seq.length&&!l;t++){let d=f.seq[t];if(d.order){let{priority:n,barrierID:o}=d.order,i=o?c?`${c.fullID}_${o}`:o:0;if(t!==e||a!==n){o?Oe.has(i)||(Oe.add(i),Ae(t,r,n,o)):Ae(t,r,n);continue e}o&&Oe.delete(i)}switch(d.type){case'mov':{let e,t=d.data;switch(t.from){case w:e=C(r);break;case"a":case'b':e=r[t.from];break;case"value":e=t.store;break;case"store":if(u&&!u[t.store.id])if(n){let e=Pe(c,t.store.id);r.page=c=e,e?u=e.reg:o?(Le(Ie,t.store,0,1,t.softRead),u=Ie.reg):u=void 0}else o&&Le(Ie,t.store,0,1,t.softRead);e=ke(u&&u[t.store.id]||t.store)}switch(t.to){case w:r.value=e;break;case"a":case'b':r[t.to]=e;break;case"store":Ve(c,Ie,f,t.target).current=e}break}case'compute':let e=d.data;if(e.fn){Fe='watch'===O(f,'op'),Ee=e.pure;let t=e.safe?(0,e.fn)(C(r),i.scope,r):Te(i,e.fn,r);e.filter?s=!t:r.value=t,Fe=p.isWatch,Ee=p.isPure}}l=i.fail||s}if(!l){let e=C(r),a=N(r);if(t(f.next,(t=>{$e('child',c,t,r,e,a)})),a){O(f,'needFxCounter')&&$e('child',c,a.fxCount,r,e,a),O(f,'storeChange')&&$e('child',c,a.storeChange,r,e,a),O(f,'warnSerialize')&&$e('child',c,a.warnSerializeNode,r,e,a);let n=a.additionalLinks[f.id];n&&t(n,(t=>{$e('child',c,t,r,e,a)}))}}}qe=p.isRoot,De=p.currentPage,Ie=N(p)}function i(t,r="combine"){let a=r+'(',n='',o=0;return e(t,(e=>{o<25&&(null!=e&&(a+=n,a+=F(e)?q(e).fullName:e.toString()),o+=1,n=', ')})),a+')'}function l(e,t){let r,a,n=e;if(t){let n=q(t);0===e.length?(r=n.path,a=n.fullName):(r=n.path.concat([e]),a=0===n.fullName.length?e:n.fullName+'/'+e)}else r=0===e.length?[]:[e],a=e;return{shortName:n,fullName:a,path:r}}function s(e,t){let r=t?e:e[0];ne(r);let a=r.or,n=r.and;if(n){let r=t?n:n[0];if(te(r)&&'and'in r){let r=s(n,t);e=r[0],a={...a,...r[1]}}else e=n}return[e,a]}function f(e,...t){let r=X();if(r){let a=r.handlers[e];if(a)return a(r,...t)}}function d(e,t){let r=We({or:t,and:'string'==typeof e?{name:e}:e}),a=(e,...t)=>(H(!O(a,'derived'),'call of derived event','createEvent'),H(!Ee,'unit call from pure function','operators like sample'),De?((e,t,r,a)=>{let n=De,o=null;if(t)for(o=De;o&&o.template!==t;)o=A(o);_e(o);let i=e.create(r,a);return _e(n),i})(a,i,e,t):a.create(e,t)),i=X(),l=Object.assign(a,{graphite:n({meta:Ze("event",a,r),regional:1}),create:e=>(o({target:a,params:e,scope:Ie}),e),watch:e=>Xe(a,e),map:e=>et(a,k,e,[be()]),filter:e=>et(a,"filter",e.fn?e:e.fn,[be(de,1)]),filterMap:e=>et(a,'filterMap',e,[be(),ge((e=>!ae(e)),1)]),prepend(e){let t=d('* \u2192 '+a.shortName,{parent:A(a)});return f('eventPrepend',S(t)),Qe(t,a,[be()],'prepend',e),Ye(a,t),t}});return null!=r&&r.domain&&r.domain.hooks.event(l),l}function c(e,a){let i=We(a),l=xe(e),s=d({named:'updates',derived:1});f('storeBase',l);let u=l.id,p={subscribers:new Map,updates:s,defaultState:e,stateRef:l,getState(){let e,t=l;if(De){let t=De;for(;t&&!t.reg[u];)t=A(t);t&&(e=t)}return!e&&Ie&&(Le(Ie,l,1),e=Ie),e&&(t=e.reg[u]),ke(t)},setState:e=>o({target:p,params:e,defer:1,scope:Ie}),reset:(...e)=>(t(e,(e=>p.on(e,(()=>p.defaultState)))),p),on:(e,a)=>(ie(e,'.on','first argument'),r(re(a),'second argument should be a function'),H(!O(p,'derived'),'.on in derived store','createStore'),t(Array.isArray(e)?e:[e],(e=>{p.off(e),$(p).set(e,Ke(tt(e,p,'on',fe,a)))})),p),off(e){let t=$(p).get(e);return t&&(t(),$(p).delete(e)),p},map(e,t){let r,a;te(e)&&(r=e,e=e.fn),H(ae(t),'second argument of store.map','updateFilter');let n=p.getState();X()?a=null:ae(n)||(a=e(n,t));let o=c(a,{name:`${p.shortName} \u2192 *`,derived:1,and:r}),i=tt(p,o,k,se,e);return we(j(o),{type:k,fn:e,from:l}),j(o).noInit=1,f('storeMap',l,i),o},watch(e,t){if(!t||!F(e)){let t=Xe(p,e);return f('storeWatch',l,e)||e(p.getState()),t}return r(re(t),'second argument should be a function'),e.watch((e=>t(p.getState(),e)))}},m=Ze("store",p,i),h=p.defaultConfig.updateFilter;p.graphite=n({scope:{state:l,fn:h},node:[ge(((e,t,r)=>(r.scope&&!r.scope.reg[l.id]&&(r.b=1),e))),ye(l),ge(((e,t,{a:r,b:a})=>!ae(e)&&(e!==r||a)),1),h&&be(se,1),pe({from:w,target:l})],child:s,meta:m,regional:1});let g=O(p,'serialize'),y=O(p,'derived'),b='ignore'===g,v=!g||b?0:g,x=O(p,'sid');return x&&(b||I(p,'storeChange',1),l.sid=x,v&&(l.meta={...null==l?void 0:l.meta,serialize:v})),x||b||y||I(p,'warnSerialize',1),r(y||!ae(e),"current state can't be undefined, use null instead"),Z(p,[s]),null!=i&&i.domain&&i.domain.hooks.store(p),y||(p.reinit=d(),p.reset(p.reinit)),p}function u(...e){let t,a,n;[e,n]=s(e);let o,i,l,f=e[e.length-1];if(re(f)?(a=e.slice(0,-1),t=f):a=e,1===a.length){let e=a[0];D(e)||(o=e,i=1)}if(!i&&(o=a,t)){l=1;let e=t;t=t=>e(...t)}return r(te(o),'shape should be an object'),rt(Array.isArray(o),!l,o,n,t)}function p(){let e={};return e.req=new Promise(((t,r)=>{e.rs=t,e.rj=r})),e.req.catch((()=>{})),e}function m(e,t){let a=We(re(e)?{handler:e}:e,t),i=d(re(e)?{handler:e}:e,t),l=S(i);I(l,'op',i.kind="effect"),i.use=e=>(r(re(e),'.use argument should be a function'),g.scope.handler=e,i),i.use.getCurrent=()=>g.scope.handler;let s=i.finally=d({named:'finally',derived:1}),f=i.done=s.filterMap({named:'done',fn({status:e,params:t,result:r}){if('done'===e)return{params:t,result:r}}}),u=i.fail=s.filterMap({named:'fail',fn({status:e,params:t,error:r}){if('fail'===e)return{params:t,error:r}}}),m=i.doneData=f.map({named:'doneData',fn:({result:e})=>e}),h=i.failData=u.map({named:'failData',fn:({error:e})=>e}),g=n({scope:{handlerId:O(l,'sid'),handler:i.defaultConfig.handler||(()=>r(0,`no handler used in ${i.getType()}`))},node:[ge(((e,t,r)=>{let a=t,n=a.handler;if(N(r)){let e=N(r).handlers[a.handlerId];e&&(n=e)}return e.handler=n,e}),0,1),ge((({params:e,req:t,handler:r,args:a=[e]},n,o)=>{let i=nt(o),l=ot(e,t,1,s,o,i),f=ot(e,t,0,s,o,i),[d,c]=at(r,f,a);d&&(te(c)&&re(c.then)?c.then(l,f):l(c))}),0,1)],meta:{op:'fx',fx:'runner'}});l.scope.runner=g,W(l.seq,ge(((e,{runner:t},r)=>{let a=A(r)?{params:e,req:{rs(e){},rj(e){}}}:e;return o({target:t,params:a,defer:1,scope:N(r)}),a.params}),0,1)),i.create=e=>{let t=p(),r={params:e,req:t};if(Ie){if(!Fe){let e=Ie;t.req.finally((()=>{Re(e)})).catch((()=>{}))}o({target:i,params:r,scope:Ie})}else o(i,r);return t.req};let y=i.inFlight=c(0,{serialize:'ignore'}).on(i,(e=>e+1)).on(s,(e=>e-1)).map({fn:e=>e,named:'inFlight'});I(s,'needFxCounter','dec'),I(i,'needFxCounter',1);let b=i.pending=y.map({fn:e=>e>0,named:'pending'});return Z(i,[s,f,u,m,h,b,y]),null!=a&&a.domain&&a.domain.hooks.effect(i),i}function h(e,t){ie(e,'merge','first argument');let r=d({name:i(e,'merge'),derived:1,and:t});return Qe(e,r,[],'merge'),r}function g(e,a){let n=0;return t(st,(t=>{t in e&&(r(null!=e[t],ft(a,t)),n=1)})),n}function y(e,r){let a=[];(function e(n){L(a,n)||(W(a,n),"store"===O(n,'op')&&O(n,'sid')&&r(n,O(n,'sid')),t(n.next,e),t(z(n),e),t(M(n),e))})(e)}function b(e,a){let n=Array.isArray(e)?new Map(e):e;if(n instanceof Map){let e={};return t(n,((t,n)=>{r(F(n),'Map key should be a unit'),a&&a(n,t),r(n.sid,'unit should have a sid'),r(!(n.sid in e),'duplicate sid found'),e[n.sid]=t})),e}return n}function v(e){let t=()=>e();return t.unsubscribe=()=>e(),t}Object.defineProperty(exports,'__esModule',{value:1});let x='undefined'!=typeof Symbol&&Symbol.observable||'@@observable',k='map',w='stack',S=e=>e.graphite||e,z=e=>e.family.owners,M=e=>e.family.links,j=e=>e.stateRef,C=e=>e.value,$=e=>e.subscribers,A=e=>e.parent,N=e=>e.scope,O=(e,t)=>S(e).meta[t],I=(e,t,r)=>S(e).meta[t]=r,q=e=>e.compositeName,F=e=>(re(e)||te(e))&&'kind'in e;const E=e=>t=>F(t)&&t.kind===e;let D=E("store"),R=E("event"),_=E("effect"),P=E("domain"),V=E("scope");var B={__proto__:null,unit:F,store:D,event:R,effect:_,domain:P,scope:V,attached:e=>_(e)&&1==O(e,'attached')};let L=(e,t)=>e.includes(t),T=(e,t)=>{let r=e.indexOf(t);-1!==r&&e.splice(r,1)},W=(e,t)=>e.push(t),H=(e,t,r)=>!e&&console.error(`${t} is deprecated${r?`, use ${r} instead`:''}`);const U=()=>{let e=0;return()=>""+ ++e};let G=U(),J=U(),K=U(),Q=null,X=()=>Q&&Q.template,Y=e=>(e&&Q&&Q.sidRoot&&(e=`${Q.sidRoot}|${e}`),e),Z=(e,r)=>{let a=S(e);t(r,(e=>{let t=S(e);"domain"!==a.family.type&&(t.family.type="crosslink"),W(z(t),a),W(M(a),t)}))},ee=(e=[])=>(Array.isArray(e)?e:[e]).flat().map(S),te=e=>'object'==typeof e&&null!==e,re=e=>'function'==typeof e,ae=e=>void 0===e,ne=e=>r(te(e)||re(e),'expect first argument be an object');const oe=(e,t,a,n)=>r(!(!te(e)&&!re(e)||!('family'in e)&&!('graphite'in e)),`${t}: expect ${a} to be a unit (store, event or effect)${n}`);let ie=(e,r,a)=>{Array.isArray(e)?t(e,((e,t)=>oe(e,r,`${t} item of ${a}`,''))):oe(e,r,a,' or array of units')},le=(e,r,a="target")=>t(ee(r),(t=>H(!O(t,'derived'),`${e}: derived unit in "${a}"`,"createEvent/createStore"))),se=(e,{fn:t},{a:r})=>t(e,r),fe=(e,{fn:t},{a:r})=>t(r,e),de=(e,{fn:t})=>t(e);const ce=(e,t,r,a)=>{let n={id:J(),type:e,data:t};return r&&(n.order={priority:r},a&&(n.order.barrierID=++ue)),n};let ue=0,pe=({from:e="store",store:t,target:r,to:a=(r?"store":w),batch:n,priority:o})=>ce('mov',{from:e,store:t,to:a,target:r},o,n),me=({fn:e,batch:t,priority:r,safe:a=0,filter:n=0,pure:o=0})=>ce('compute',{fn:e,safe:a,filter:n,pure:o},r,t),he=({fn:e})=>me({fn:e,priority:"effect"}),ge=(e,t,r)=>me({fn:e,safe:1,filter:t,priority:r&&"effect"}),ye=(e,t,r)=>pe({store:e,to:t?w:"a",priority:r&&"sampler",batch:1}),be=(e=de,t)=>me({fn:e,pure:1,filter:t}),ve={mov:pe,compute:me,filter:({fn:e,pure:t})=>me({fn:e,filter:1,pure:t}),run:he},xe=e=>({id:J(),current:e}),ke=({current:e})=>e,we=(e,t)=>{e.before||(e.before=[]),W(e.before,t)},Se=null;const ze=(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||Ne(e.v.type)>Ne(t.v.type))&&(r=e,e=t,t=r),r=ze(e.r,t),e.r=e.l,e.l=r,e},Me=[];let je=0;for(;je<6;)W(Me,{first:null,last:null,size:0}),je+=1;const Ce=()=>{for(let e=0;e<6;e++){let t=Me[e];if(t.size>0){if(3===e||4===e){t.size-=1;let e=Se.v;return Se=ze(Se.l,Se.r),e}1===t.size&&(t.last=null);let r=t.first;return t.first=r.r,t.size-=1,r.v}}},$e=(e,t,r,a,n,o)=>Ae(0,{a:null,b:null,node:r,parent:a,value:n,page:t,scope:o},e),Ae=(e,t,r,a=0)=>{let n=Ne(r),o=Me[n],i={v:{idx:e,stack:t,type:r,id:a},l:null,r:null};3===n||4===n?Se=ze(Se,i):(0===o.size?o.first=i:o.last.r=i,o.last=i),o.size+=1},Ne=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}},Oe=new Set;let Ie,qe=1,Fe=0,Ee=0,De=null,Re=e=>{Ie=e},_e=e=>{De=e};const Pe=(e,t)=>{if(e){for(;e&&!e.reg[t];)e=A(e);if(e)return e}return null};let Ve=(e,t,r,a,n)=>{let o=Pe(e,a.id);return o?o.reg[a.id]:t?(Le(t,a,n),t.reg[a.id]):a};const Be=e=>e;let Le=(e,r,a,n,o)=>{var i;let l=e.reg,s=r.sid,f=null==r||null===(i=r.meta)||void 0===i?void 0:i.serialize;if(l[r.id])return;let d={id:r.id,current:r.current,meta:r.meta};if(s&&s in e.sidValuesMap&&!(s in e.sidIdMap))d.current=(e.fromSerialize&&'ignore'!==f&&(null==f?void 0:f.read)||Be)(e.sidValuesMap[s]);else if(r.before&&!o){let o=0,i=a||!r.noInit||n;t(r.before,(t=>{switch(t.type){case k:{let r=t.from;if(r||t.fn){r&&Le(e,r,a,n);let o=r&&l[r.id].current;i&&(d.current=t.fn?t.fn(o):o)}break}case'field':o||(o=1,d.current=Array.isArray(d.current)?[...d.current]:{...d.current}),Le(e,t.from,a,n),i&&(d.current[t.field]=l[l[t.from.id].id].current)}}))}s&&(e.sidIdMap[s]=r.id),l[r.id]=d};const Te=(e,t,r)=>{try{return t(C(r),e.scope,r)}catch(t){console.error(t),e.fail=1}};let We=(t,r={})=>(te(t)&&(We(t.or,r),e(t,((e,t)=>{ae(e)||'or'===t||'and'===t||(r[t]=e)})),We(t.and,r)),r);const He=(e,t)=>{T(e.next,t),T(z(e),t),T(M(e),t)},Ue=(e,t,r)=>{let a;e.next.length=0,e.seq.length=0,e.scope=null;let n=M(e);for(;a=n.pop();)He(a,e),(t||r&&'sample'!==O(e,'op')||"crosslink"===a.family.type)&&Ue(a,t,'on'!==O(a,'op')&&r);for(n=z(e);a=n.pop();)He(a,e),r&&"crosslink"===a.family.type&&Ue(a,t,'on'!==O(a,'op')&&r)},Ge=e=>e.clear();let Je=(e,{deep:t}={})=>{let r=0;if(e.ownerSet&&e.ownerSet.delete(e),D(e))Ge($(e));else if(P(e)){r=1;let t=e.history;Ge(t.events),Ge(t.effects),Ge(t.stores),Ge(t.domains)}Ue(S(e),!!t,r)},Ke=e=>{let t=()=>Je(e);return t.unsubscribe=t,t},Qe=(e,t,r,a,o)=>n({node:r,parent:e,child:t,scope:{fn:o},meta:{op:a},family:{owners:[e,t],links:t},regional:1}),Xe=(e,t)=>(r(re(t),'.watch argument should be a function'),Ke(n({scope:{fn:t},node:[he({fn:de})],parent:e,meta:{op:'watch'},family:{owners:e},regional:1}))),Ye=(e,t,r="event")=>{A(e)&&A(e).hooks[r](t)},Ze=(e,t,r)=>{let a=We(r),n="domain"===e,o=G(),{sid:i=null,named:s=null,domain:f=null,parent:d=f}=a,c=s||a.name||(n?'':o),u=l(c,d),p={op:t.kind=e,name:t.shortName=c,sid:t.sid=Y(i),named:s,unitId:t.id=o,serialize:a.serialize,derived:a.derived,config:a};if(t.parent=d,t.compositeName=u,t.defaultConfig=a,t.thru=e=>(H(0,'thru','js pipe'),e(t)),t.getType=()=>u.fullName,!n){t.subscribe=e=>(ne(e),t.watch(re(e)?e:t=>e.next&&e.next(t))),t[x]=()=>t;let e=X();e&&(p.nativeTemplate=e)}return p};const et=(e,t,r,a)=>{let n;te(r)&&(n=r,r=r.fn);let o=d({name:`${e.shortName} \u2192 *`,derived:1,and:n});return Qe(e,o,a,t,r),o},tt=(e,t,r,a,n)=>{let o=j(t),i=pe({store:o,to:"a",priority:'read'});r===k&&(i.data.softRead=1);let l=[i,be(a)];return f('storeOnMap',o,l,D(e)&&j(e)),Qe(e,t,l,r,n)},rt=(t,a,n,o,l)=>{let s=t?e=>[...e]:e=>({...e}),d=t?[]:{},u=s(d),p=xe(u),m=xe(1);p.type=t?'list':'shape',p.noInit=1,f('combineBase',p,m);let h=c(u,{name:i(n),derived:1,and:o}),g=j(h);g.noInit=1,I(h,'isCombine',1);let y=ye(p);y.order={priority:'barrier'};let b=[ge(((e,t,r)=>(r.scope&&!r.scope.reg[p.id]&&(r.c=1),e))),y,pe({store:m,to:'b'}),ge(((e,{key:t},r)=>{if(r.c||e!==r.a[t])return a&&r.b&&(r.a=s(r.a)),r.a[t]=e,1}),1),pe({from:"a",target:p}),pe({from:"value",store:0,target:m}),pe({from:"value",store:1,target:m,priority:"barrier",batch:1}),ye(p,1),l&&be()];return e(n,((e,t)=>{if(!D(e))return r(!F(e)&&!ae(e),`combine expects a store in a field ${t}`),void(u[t]=d[t]=e);d[t]=e.defaultState,u[t]=e.getState();let a=Qe(e,h,b,'combine',l);a.scope.key=t;let n=j(e);we(p,{type:'field',field:t,from:n}),f('combineField',n,a)})),h.defaultShape=n,we(g,{type:k,from:p,fn:l}),X()||(h.defaultState=l?g.current=l(u):d),h};let at=(e,t,r)=>{try{return[1,e(...r)]}catch(e){return t(e),[0,null]}},nt=e=>{let t=N(e),r={ref:t};return t&&W(t.activeEffects,r),r},ot=(e,t,r,a,n,i)=>l=>{i.ref&&T(i.ref.activeEffects,i),o({target:[a,lt],params:[r?{status:'done',params:e,result:l}:{status:'fail',params:e,error:l},{value:l,fn:r?t.rs:t.rj}],defer:1,page:n.page,scope:i.ref})};const lt=n({node:[he({fn:({fn:e,value:t})=>e(t)})],meta:{op:'fx',fx:'sidechain'}}),st=['source','clock','target'],ft=(e,t)=>e+`: ${t} should be defined`;let dt=(e,t,a,n,o,i,l,s,p,m,g,y)=>{let b=!!o;r(!ae(a)||!ae(t),ft(e,'either source or clock'));let v=0;ae(a)?v=1:F(a)||(a=u(a)),ae(t)?t=a:(ie(t,e,'clock'),Array.isArray(t)&&(t=h(t))),v&&(a=t),s||l||(l=a.shortName);let x='none';(g||n)&&(F(n)?x='unit':(r(re(n),'`filter` should be function or unit'),x='fn')),o?(ie(o,e,'target'),le(e,o)):'none'===x&&m&&D(a)&&D(t)?o=c(i?i(ke(j(a)),ke(j(t))):ke(j(a)),{name:l,sid:y,or:s}):(o=d({name:l,derived:1,or:s}),f('sampleTarget',S(o)));let k=xe(),z=[];if('unit'===x){let[r,a]=ut(n,o,t,k,e);z=[...ct(a),...ct(r)]}let[M,C]=ut(a,o,t,k,e),$=Qe(t,o,[f('sampleSourceLoader'),pe({from:w,target:k}),...ct(C),ye(M,1,p),...z,ye(k),'fn'===x&&be(((e,t,{a:r})=>n(e,r)),1),i&&be(se),f('sampleSourceUpward',b)],e,i);return Z(a,[$]),Object.assign($.meta,s,{joint:1}),o};const ct=e=>[ye(e),ge(((e,t,{a:r})=>r),1)],ut=(e,t,r,a,o)=>{let i=D(e),l=i?j(e):xe(),s=xe(i);return i||n({parent:e,node:[pe({from:w,target:l}),pe({from:"value",store:1,target:s})],family:{owners:[e,t,r],links:t},meta:{op:o},regional:1}),f('sampleSource',s,l,a),[l,s]},pt=(e,t,r,a)=>{let n=e[t];n&&o({target:n,params:Array.isArray(n)?n.map((()=>r)):r,defer:1,stack:a})},mt=e=>e;exports.allSettled=(e,{scope:t,params:r})=>{if(!F(e))return Promise.reject(new Error('first argument should be unit'));if(!_(e)&&!R(e)&&!D(e))return Promise.reject(new Error('first argument accepts only effects, events and stores'));let a=p();a.parentFork=Ie;let{fxCount:n}=t;W(n.scope.defers,a);let i=[e],l=[];return W(l,_(e)?{params:r,req:{rs(e){a.value={status:'done',value:e}},rj(e){a.value={status:'fail',value:e}}}}:r),W(i,n),W(l,null),o({target:i,params:l,scope:t}),a.req},exports.attach=e=>{let t;[e,t]=s(e,1);let{source:r,effect:a,mapParams:n}=e,i=m(e,t);I(i,'attached',1);let f,{runner:d}=S(i).scope,c=ge(((e,t,a)=>{let l,{params:s,req:f,handler:d}=e,c=i.finally,u=nt(a),p=ot(s,f,0,c,a,u),m=a.a,h=_(d),g=1;if(n?[g,l]=at(n,p,[s,m]):l=r&&h?m:s,g){if(!h)return e.args=[m,l],1;o({target:d,params:{params:l,req:{rs:ot(s,f,1,c,a,u),rj:p}},page:a.page,defer:1})}}),1,1);if(r){let e;D(r)?(e=r,Z(e,[i])):(e=u(r),Z(i,[e])),f=[ye(j(e)),c]}else f=[c];d.seq.splice(1,0,...f),i.use(a);let p=A(a);return p&&(Object.assign(q(i),l(i.shortName,p)),i.defaultConfig.parent=p),Ye(a,i,"effect"),i},exports.clearNode=Je,exports.combine=u,exports.createApi=(...t)=>{let[[r,a],n]=s(t),o={};return e(a,((e,t)=>{let a=o[t]=d(t,{parent:A(r),config:n});r.on(a,e),Ye(r,a)})),o},exports.createDomain=function r(a,i){let l=We({or:i,and:'string'==typeof a?{name:a}:a}),s=n({family:{type:"domain"},regional:1,parent:(null==l?void 0:l.domain)||(null==l?void 0:l.parent)}),f={history:{},graphite:s,hooks:{}};s.meta=Ze("domain",f,{parent:(null==l?void 0:l.domain)||(null==l?void 0:l.parent),or:l}),e({Event:d,Effect:m,Store:c,Domain:r},((e,r)=>{let a=r.toLowerCase(),n=d({named:`on${r}`});f.hooks[a]=n;let i=new Set;f.history[`${a}s`]=i,n.create=e=>(o(n,e),e),W(S(n).seq,ge(((e,t,r)=>(r.scope=null,e)))),n.watch((e=>{Z(f,[e]),i.add(e),e.ownerSet||(e.ownerSet=i),A(e)||(e.parent=f)})),Z(f,[n]),f[`onCreate${r}`]=e=>(t(i,e),n.watch(e)),f[`create${r}`]=f[a]=(t,r)=>{let a=We({and:r,or:t});return null!=a&&a.domain?e(t,r):n(e(t,{parent:f,or:a}))}}));let u=A(f);return u&&e(f.hooks,((e,t)=>Qe(e,u.hooks[t]))),null!=l&&l.domain&&l.domain.hooks.domain(f),f},exports.createEffect=m,exports.createEvent=d,exports.createNode=n,exports.createStore=c,exports.createStoreObject=(...e)=>(H(0,'createStoreObject','combine'),u(...e)),exports.createWatch=({unit:e,fn:t,scope:r})=>{let a=[ve.run({fn:e=>t(e)})];if(r){let t=n({node:a}),o=e.graphite.id,i=r.additionalLinks,l=i[o]||[];return i[o]=l,l.push(t),v((()=>{let e=l.indexOf(t);-1!==e&&l.splice(e,1),Je(t)}))}{let t=n({node:a,parent:[e],family:{owners:e}});return v((()=>{Je(t)}))}},exports.fork=(e,a)=>{let o,i=e;P(e)&&(o=e,i=a);let l=(e=>{let r=n({scope:{defers:[],inFlight:0,fxID:0},node:[ge(((e,t,r)=>{A(r)?'dec'===O(A(r).node,'needFxCounter')?t.inFlight-=1:(t.inFlight+=1,t.fxID+=1):t.fxID+=1})),me({priority:"sampler",batch:1}),ge(((e,r)=>{let{defers:a,fxID:n}=r;r.inFlight>0||0===a.length||Promise.resolve().then((()=>{r.fxID===n&&t(a.splice(0,a.length),(e=>{Re(e.parentFork),e.rs(e.value)}))}))}),0,1)]}),a=n({node:[ge(((e,t,r)=>{let a=A(r);if(a){let t=a.node;if(!O(t,'isCombine')||A(a)&&'combine'!==O(A(a).node,'op')){let a=N(r),n=t.scope.state.id,o=O(t,'sid');a.sidIdMap[o]=n,a.sidValuesMap[o]=e;let i=O(t,'serialize');i&&'ignore'!==i&&(a.sidSerializeMap[o]=i.write)}}}))]}),o=n({node:[ge(((e,t,r)=>{let a=N(r);if(a){let e=A(r);e&&(!O(e.node,'isCombine')||A(e)&&'combine'!==O(A(e).node,'op'))&&(a.warnSerialize=1)}}))]}),i={cloneOf:e,reg:{},sidValuesMap:{},sidIdMap:{},sidSerializeMap:{},getState(e){if('current'in e)return Ve(De,i,null,e).current;let t=S(e);return Ve(De,i,t,t.scope.state,1).current},kind:"scope",graphite:n({family:{type:"domain",links:[r,a,o]},meta:{unit:'fork'},scope:{forkInFlightCounter:r}}),additionalLinks:{},handlers:{},fxCount:r,storeChange:a,warnSerializeNode:o,activeEffects:[]};return i})(o);if(i){let e=i.scope;if(e){let r=e.activeEffects;e.activeEffects=[],l.activeEffects=r,t(r,(e=>e.ref=l))}if(i.values){let e=b(i.values,(e=>r(D(e),'Values map can contain only stores as keys')));Object.assign(l.sidValuesMap,e),l.fromSerialize=!(Array.isArray(i.values)||i.values instanceof Map)}i.handlers&&(l.handlers=b(i.handlers,(e=>r(_(e),"Handlers map can contain only effects as keys"))))}return l},exports.forward=e=>{let t='forward',[{from:r,to:a},o]=s(e,1);return ie(r,t,'"from"'),ie(a,t,'"to"'),le(t,a,'to'),Ke(n({parent:r,child:a,meta:{op:t,config:o},family:{},regional:1}))},exports.fromObservable=e=>{ne(e);let t=x in e?e[x]():e;r(t.subscribe,'expect observable to have .subscribe');let a=d(),n=Ke(a);return t.subscribe({next:a,error:n,complete:n}),a},exports.guard=(...e)=>{let[[t,r],a]=s(e);return r||(r=t,t=r.source),g(r,'guard'),dt('guard',r.clock,t,r.filter,r.target,null,r.name,a,!r.greedy,0,1)},exports.hydrate=(e,{values:t})=>{r(te(t),'values property should be an object');let a,n,i,l=b(t),s=Object.getOwnPropertyNames(l),f=[],d=[];V(e)?(a=e,i=1,r(a.cloneOf,'scope should be created from domain'),n=S(a.cloneOf)):P(e)?n=S(e):r(0,'first argument of hydrate should be domain or scope'),y(n,((e,t)=>{if(L(s,t)){W(f,e);let r=O(e,'serialize');r&&'ignore'!==r&&(l[t]=r.read(l[t])),W(d,l[t])}})),o({target:f,params:d,scope:a}),i&&Object.assign(a.sidValuesMap,l)},exports.is=B,exports.launch=o,exports.merge=h,exports.restore=(t,r,a)=>{if(D(t))return H(0,'restore($store)'),t;if(R(t)||_(t)){let e=A(t),n=c(r,{parent:e,name:t.shortName,and:a});return Qe(_(t)?t.doneData:t,n),e&&e.hooks.store(n),n}let n=Array.isArray(t)?[]:{};return e(t,((e,t)=>n[t]=D(e)?e:c(e,{name:t}))),n},exports.sample=(...e)=>{let t,r,a,n,[[o,i,l],f]=s(e),d=1;return ae(i)&&te(o)&&g(o,"sample")&&(i=o.clock,l=o.fn,d=!o.greedy,n=o.filter,t=o.target,r=o.name,a=o.sid,o=o.source),dt("sample",i,o,n,t,l,r,f,d,1,0,a)},exports.scopeBind=(e,{scope:t,safe:a}={})=>{r(t||Ie||a,'scopeBind cannot be called outside of forked .watch');let n=t||Ie;return _(e)?t=>{let r=p();return o({target:e,params:{params:t,req:r},scope:n}),r.req}:t=>(o({target:e,params:t,scope:n}),t)},exports.serialize=(t,a={})=>{t.warnSerialize&&console.error('There is a store without sid in this scope, its value is omitted');let n=a.ignore?a.ignore.map((({sid:e})=>e)):[],o={};return e(t.sidValuesMap,((e,r)=>{if(L(n,r))return;let a=t.sidIdMap[r];o[r]=(t.sidSerializeMap[r]||mt)(a&&a in t.reg?t.reg[a].current:e)})),'onlyChanges'in a&&!a.onlyChanges&&(r(t.cloneOf,'scope should be created from domain'),y(S(t.cloneOf),((e,r)=>{r in o||L(n,r)||O(e,'isCombine')||'ignore'===O(e,'serialize')||(o[r]=t.getState(e))}))),o},exports.setStoreName=(e,t)=>{e.shortName=t,Object.assign(q(e),l(t,A(e)))},exports.split=(...t)=>{let a,o,i='split',[[l,c],u]=s(t),p=!c;p&&(a=l.cases,c=l.match,o=l.clock,l=l.source);let m=D(c),h=!F(c)&&re(c),g=!m&&!h&&te(c);a||(a={}),p?e(a,((e,t)=>le(i,e,`cases.${t}`))):(r(g,'match should be an object'),e(c,((e,t)=>a[t]=d({derived:1,and:u}))),a.__=d({derived:1,and:u}));let y,b=new Set([].concat(l,o||[],Object.values(a))),v=Object.keys(m||h?a:c);if(m||h)m&&b.add(c),y=[m&&ye(j(c),0,1),me({safe:m,filter:1,pure:!m,fn(e,t,r){let a=String(m?r.a:c(e));pt(t,L(v,a)?a:'__',e,r)}})];else if(g){let t=xe({});t.type='shape';let r,a=[];e(c,((e,n)=>{if(F(e)){r=1,W(a,n),b.add(e);let o=Qe(e,[],[ye(t),ge(((e,t,{a:r})=>r[n]=e))]);if(D(e)){t.current[n]=e.getState();let r=j(e);we(t,{from:r,field:n,type:'field'}),f('splitMatchStore',r,o)}}})),r&&f('splitBase',t),y=[r&&ye(t,0,1),be(((e,t,r)=>{for(let n=0;n<v.length;n++){let o=v[n];if(L(a,o)?r.a[o]:c[o](e))return void pt(t,o,e,r)}pt(t,'__',e,r)}),1)]}else r(0,'expect match to be unit, function or object');let x=n({meta:{op:i},parent:o?[]:l,scope:a,node:y,family:{owners:Array.from(b)},regional:1});if(o&&dt(i,o,l,null,x,null,i,u,0,0,0),!p)return a},exports.step=ve,exports.version="22.4.0",exports.withFactory=({sid:e,name:t,loc:r,method:o,fn:i})=>a(n({meta:{sidRoot:Y(e),name:t,loc:r,method:o}}),i),exports.withRegion=a; | ||
//# 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(let r in e)t(e[r],r)}function r(e,t){e.forEach(t)}function n(e,t){if(!e)throw Error(t)}function a(e,t){se={parent:se,value:e,template:te(e,'template')||fe(),sidRoot:te(e,'sidRoot')||se&&se.sidRoot};try{return t()}finally{se=Z(se)}}function o({node:e=[],from:t,source:n,parent:a=t||n,to:o,target:i,child:l=o||i,scope:s={},meta:f={},family:d={type:'regular'},regional:u}={}){let c=ce(a),p=ce(d.links),m=ce(d.owners),h=[];r(e,(e=>e&&H(h,e)));let g={id:le(),seq:h,next:ce(l),meta:f,scope:s,family:{type:d.type||N,links:p,owners:m}};return r(p,(e=>H(J(e),g))),r(m,(e=>H(K(e),g))),r(c,(e=>H(e.next,g))),u&&se&&ue(X(se),[g]),g}function i(e,t,n){let a=Je,o=null,i=We;if(e.target&&(t=e.params,n=e.defer,a='page'in e?e.page:a,e.stack&&(o=e.stack),i=ee(e)||i,e=e.target),i&&We&&i!==We&&(We=null),Array.isArray(e))for(let r=0;r<e.length;r++)Ve('pure',a,G(e[r]),o,t[r],i);else Ve('pure',a,G(e),o,t,i);if(n&&!He)return;let l,s,f,d,u,c,p={isRoot:He,currentPage:Je,scope:We,isWatch:Ue,isPure:Ge};He=0;e:for(;d=Ee();){let{idx:e,stack:t,type:n}=d;f=t.node,Je=u=t.page,We=ee(t),u?c=u.reg:We&&(c=We.reg);let a=!!u,o=!!We,i={fail:0,scope:f.scope};l=s=0;for(let r=e;r<f.seq.length&&!l;r++){let d=f.seq[r];if(d.order){let{priority:a,barrierID:o}=d.order,i=o?u?`${u.fullID}_${o}`:o:0;if(r!==e||n!==a){o?Le.has(i)||(Le.add(i),Te(r,t,a,o)):Te(r,t,a);continue e}o&&Le.delete(i)}switch(d.type){case'mov':{let e,r=d.data;switch(r.from){case I:e=X(t);break;case F:case'b':e=t[r.from];break;case q:e=r.store;break;case S:if(c&&!c[r.store.id])if(a){let e=Xe(u,r.store.id);t.page=u=e,e?c=e.reg:o?(Ze(We,r.store,0,1,r.softRead),c=We.reg):c=void 0}else o&&Ze(We,r.store,0,1,r.softRead);e=ze(c&&c[r.store.id]||r.store)}switch(r.to){case I:t.value=e;break;case F:case'b':t[r.to]=e;break;case S:Ye(u,We,f,r.target).current=e}break}case'compute':let e=d.data;if(e.fn){Ue='watch'===te(f,'op'),Ge=e.pure;let r=e.safe?(0,e.fn)(X(t),i.scope,t):et(i,e.fn,t);e.filter?s=!r:t.value=r,Ue=p.isWatch,Ge=p.isPure}}l=i.fail||s}if(!l){let e=X(t);r(f.next,(r=>{Ve('child',u,r,t,e,ee(t))}));let n=ee(t);if(n){te(f,'needFxCounter')&&Ve('child',u,n.fxCount,t,e,n),te(f,'storeChange')&&Ve('child',u,n.storeChange,t,e,n),te(f,'warnSerialize')&&Ve('child',u,n.warnSerializeNode,t,e,n);let a=n.additionalLinks[f.id];a&&r(a,(r=>{Ve('child',u,r,t,e,n)}))}}}He=p.isRoot,Je=p.currentPage,We=ee(p)}function l(e,r="combine"){let n=r+'(',a='',o=0;return t(e,(e=>{o<25&&(null!=e&&(n+=a,n+=D(e)?ne(e).fullName:e.toString()),o+=1,a=', ')})),n+')'}function s(e,t){let r,n,a=e;if(t){let a=ne(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 f(e,t){let r=t?e:e[0];ge(r);let n=r.or,a=r.and;if(a){let r=t?a:a[0];if(pe(r)&&'and'in r){let r=f(a,t);e=r[0],n={...n,...r[1]}}else e=a}return[e,n]}function d(e,...t){let r=fe();if(r){let n=r.handlers[e];if(n)return n(r,...t)}}function u(e,t){let r=(e,...t)=>(U(!te(r,'derived'),'call of derived event','createEvent'),U(!Ge,'unit call from pure function','operators like sample'),Je?((e,t,r,n)=>{let a=Je,o=null;if(t)for(o=Je;o&&o.template!==t;)o=Z(o);Qe(o);let i=e.create(r,n);return Qe(a),i})(r,n,e,t):r.create(e,t)),n=fe();return Object.assign(r,{graphite:o({meta:ut(x,r,e,t),regional:1}),create:e=>(i({target:r,params:e,scope:We}),e),watch:e=>ft(r,e),map:e=>ct(r,A,e,[Ie()]),filter:e=>ct(r,"filter",e.fn?e:e.fn,[Ie(Se,1)]),filterMap:e=>ct(r,'filterMap',e,[Ie(),Ne((e=>!he(e)),1)]),prepend(e){let t=u('* \u2192 '+r.shortName,{parent:Z(r)});return d('eventPrepend',G(t)),st(t,r,[Ie()],'prepend',e),dt(r,t),t}})}function c(e,t){let a=qe(e),l=u({named:'updates',derived:1});d('storeBase',a);let s=a.id,f={subscribers:new Map,updates:l,defaultState:e,stateRef:a,getState(){let e,t=a;if(Je){let t=Je;for(;t&&!t.reg[s];)t=Z(t);t&&(e=t)}return!e&&We&&(Ze(We,a,1),e=We),e&&(t=e.reg[s]),ze(t)},setState:e=>i({target:f,params:e,defer:1,scope:We}),reset:(...e)=>(r(e,(e=>f.on(e,(()=>f.defaultState)))),f),on:(e,t)=>(be(e,'.on','first argument'),U(!te(f,'derived'),'.on in derived store','createStore'),r(Array.isArray(e)?e:[e],(e=>{f.off(e),Y(f).set(e,lt(pt(e,f,'on',we,t)))})),f),off(e){let t=Y(f).get(e);return t&&(t(),Y(f).delete(e)),f},map(e,t){let r,n;pe(e)&&(r=e,e=e.fn),U(he(t),'second argument of store.map','updateFilter');let o=f.getState();fe()?n=null:he(o)||(n=e(o,t));let i=c(n,{name:`${f.shortName} \u2192 *`,derived:1,and:r}),l=pt(f,i,A,ke,e);return Fe(Q(i),{type:A,fn:e,from:a}),Q(i).noInit=1,d('storeMap',a,l),i},watch(e,t){if(!t||!D(e)){let t=ft(f,e);return d('storeWatch',a,e)||e(f.getState()),t}return n(me(t),'second argument should be a function'),e.watch((e=>t(f.getState(),e)))}},p=ut(S,f,t),m=f.defaultConfig.updateFilter;f.graphite=o({scope:{state:a,fn:m},node:[Ne(((e,t,r)=>(r.scope&&!r.scope.reg[a.id]&&(r.b=1),e))),Ae(a),Ne(((e,t,{a:r,b:n})=>!he(e)&&(e!==r||n)),1),m&&Ie(ke,1),Ce({from:I,target:a})],child:l,meta:p,regional:1});let h=te(f,'derived'),g='ignore'===te(f,'serialize'),y=te(f,'sid');return y&&(g||re(f,'storeChange',1),a.sid=y),y||g||h||re(f,'warnSerialize',1),n(h||!he(e),"current state can't be undefined, use null instead"),ue(f,[l]),f}function p(...e){let t,r,a;[e,a]=f(e);let o,i,l,s=e[e.length-1];if(me(s)?(r=e.slice(0,-1),t=s):r=e,1===r.length){let e=r[0];_(e)||(o=e,i=1)}if(!i&&(o=r,t)){l=1;let e=t;t=t=>e(...t)}return n(pe(o),'shape should be an object'),mt(Array.isArray(o),!l,o,a,t)}function m(){let e={};return e.req=new Promise(((t,r)=>{e.rs=t,e.rj=r})),e.req.catch((()=>{})),e}function h(e,t){let r=u(me(e)?{handler:e}:e,t),a=G(r);re(a,'op',r.kind=j),r.use=e=>(n(me(e),'.use argument should be a function'),h.scope.handler=e,r),r.use.getCurrent=()=>h.scope.handler;let l=r.finally=u({named:'finally',derived:1}),s=r.done=l.filterMap({named:'done',fn({status:e,params:t,result:r}){if('done'===e)return{params:t,result:r}}}),f=r.fail=l.filterMap({named:'fail',fn({status:e,params:t,error:r}){if('fail'===e)return{params:t,error:r}}}),d=r.doneData=s.map({named:'doneData',fn:({result:e})=>e}),p=r.failData=f.map({named:'failData',fn:({error:e})=>e}),h=o({scope:{handlerId:te(a,'sid'),handler:r.defaultConfig.handler||(()=>n(0,`no handler used in ${r.getType()}`))},node:[Ne(((e,t,r)=>{let n=t,a=n.handler;if(ee(r)){let e=ee(r).handlers[n.handlerId];e&&(a=e)}return e.handler=a,e}),0,1),Ne((({params:e,req:t,handler:r,args:n=[e]},a,o)=>{let i=gt(e,t,1,l,o),s=gt(e,t,0,l,o),[f,d]=ht(r,s,n);f&&(pe(d)&&me(d.then)?d.then(i,s):i(d))}),0,1)],meta:{op:'fx',fx:'runner'}});a.scope.runner=h,H(a.seq,Ne(((e,{runner:t},r)=>{let n=Z(r)?{params:e,req:{rs(e){},rj(e){}}}:e;return i({target:t,params:n,defer:1,scope:ee(r)}),n.params}),0,1)),r.create=e=>{let t=m(),n={params:e,req:t};if(We){if(!Ue){let e=We;t.req.finally((()=>{Ke(e)})).catch((()=>{}))}i({target:r,params:n,scope:We})}else i(r,n);return t.req};let g=r.inFlight=c(0,{serialize:'ignore'}).on(r,(e=>e+1)).on(l,(e=>e-1)).map({fn:e=>e,named:'inFlight'});re(l,'needFxCounter','dec'),re(r,'needFxCounter',1);let y=r.pending=g.map({fn:e=>e>0,named:'pending'});return ue(r,[l,s,f,d,p,y,g]),r}function g(e,t){be(e,'merge','first argument');let r=u({name:l(e,'merge'),derived:1,and:t});return st(e,r,[],'merge'),r}function y(e,t){let a=0;return r(bt,(r=>{r in e&&(n(null!=e[r],vt(t,r)),a=1)})),a}function b(e,t){let n=[];(function e(a){L(n,a)||(H(n,a),te(a,'op')===S&&te(a,'sid')&&t(a,te(a,'sid')),r(a.next,e),r(J(a),e),r(K(a),e))})(e)}function v(e,t){if(Array.isArray(e)&&(e=new Map(e)),e instanceof Map){let a={};return r(e,((e,r)=>{n(D(r),'Map key should be a unit'),t&&t(r,e),n(r.sid,'unit should have a sid'),n(!(r.sid in a),'duplicate sid found'),a[r.sid]=e})),a}return e}function k(e){let t=()=>e();return t.unsubscribe=()=>e(),t}let w='undefined'!=typeof Symbol&&Symbol.observable||'@@observable',S='store',x='event',j='effect',C='domain',$='scope',M='sampler',N='crosslink',A='map',I='stack',O='barrier',q='value',z='sample',F='a',D=e=>(me(e)||pe(e))&&'kind'in e;const R=e=>t=>D(t)&&t.kind===e;let _=R(S),P=R(x),E=R(j),V=R(C),T=R($);var B={__proto__:null,unit:D,store:_,event:P,effect:E,domain:V,scope:T};let L=(e,t)=>e.includes(t),W=(e,t)=>{let r=e.indexOf(t);-1!==r&&e.splice(r,1)},H=(e,t)=>e.push(t),U=(e,t,r)=>!e&&console.error(`${t} is deprecated${r?`, use ${r} instead`:''}`),G=e=>e.graphite||e,J=e=>e.family.owners,K=e=>e.family.links,Q=e=>e.stateRef,X=e=>e.value,Y=e=>e.subscribers,Z=e=>e.parent,ee=e=>e.scope,te=(e,t)=>G(e).meta[t],re=(e,t,r)=>G(e).meta[t]=r,ne=e=>e.compositeName;const ae=()=>{let e=0;return()=>""+ ++e};let oe=ae(),ie=ae(),le=ae(),se=null,fe=()=>se&&se.template,de=e=>(e&&se&&se.sidRoot&&(e=`${se.sidRoot}|${e}`),e),ue=(e,t)=>{let n=G(e);r(t,(e=>{let t=G(e);n.family.type!==C&&(t.family.type=N),H(J(t),n),H(K(n),t)}))},ce=(e=[])=>(Array.isArray(e)?e:[e]).flat().map(G),pe=e=>'object'==typeof e&&null!==e,me=e=>'function'==typeof e,he=e=>void 0===e,ge=e=>n(pe(e)||me(e),'expect first argument be an object');const ye=(e,t,r,a)=>n(!(!pe(e)&&!me(e)||!('family'in e)&&!('graphite'in e)),`${t}: expect ${r} to be a unit (store, event or effect)${a}`);let be=(e,t,n)=>{Array.isArray(e)?r(e,((e,r)=>ye(e,t,`${r} item of ${n}`,''))):ye(e,t,n,' or array of units')},ve=(e,t,n="target")=>r(ce(t),(t=>U(!te(t,'derived'),`${e}: derived unit in "${n}"`,"createEvent/createStore"))),ke=(e,{fn:t},{a:r})=>t(e,r),we=(e,{fn:t},{a:r})=>t(r,e),Se=(e,{fn:t})=>t(e);const xe=(e,t,r,n)=>{let a={id:ie(),type:e,data:t};return r&&(a.order={priority:r},n&&(a.order.barrierID=++je)),a};let je=0,Ce=({from:e=S,store:t,target:r,to:n=(r?S:I),batch:a,priority:o})=>xe('mov',{from:e,store:t,to:n,target:r},o,a),$e=({fn:e,batch:t,priority:r,safe:n=0,filter:a=0,pure:o=0})=>xe('compute',{fn:e,safe:n,filter:a,pure:o},r,t),Me=({fn:e})=>$e({fn:e,priority:j}),Ne=(e,t,r)=>$e({fn:e,safe:1,filter:t,priority:r&&j}),Ae=(e,t,r)=>Ce({store:e,to:t?I:F,priority:r&&M,batch:1}),Ie=(e=Se,t)=>$e({fn:e,pure:1,filter:t}),Oe={mov:Ce,compute:$e,filter:({fn:e,pure:t})=>$e({fn:e,filter:1,pure:t}),run:Me},qe=e=>({id:ie(),current:e}),ze=({current:e})=>e,Fe=(e,t)=>{e.before||(e.before=[]),H(e.before,t)},De=null;const Re=(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||Be(e.v.type)>Be(t.v.type))&&(r=e,e=t,t=r),r=Re(e.r,t),e.r=e.l,e.l=r,e},_e=[];let Pe=0;for(;Pe<6;)H(_e,{first:null,last:null,size:0}),Pe+=1;const Ee=()=>{for(let e=0;e<6;e++){let t=_e[e];if(t.size>0){if(3===e||4===e){t.size-=1;let e=De.v;return De=Re(De.l,De.r),e}1===t.size&&(t.last=null);let r=t.first;return t.first=r.r,t.size-=1,r.v}}},Ve=(e,t,r,n,a,o)=>Te(0,{a:null,b:null,node:r,parent:n,value:a,page:t,scope:o},e),Te=(e,t,r,n=0)=>{let a=Be(r),o=_e[a],i={v:{idx:e,stack:t,type:r,id:n},l:null,r:null};3===a||4===a?De=Re(De,i):(0===o.size?o.first=i:o.last.r=i,o.last=i),o.size+=1},Be=e=>{switch(e){case'child':return 0;case'pure':return 1;case'read':return 2;case O:return 3;case M:return 4;case j:return 5;default:return-1}},Le=new Set;let We,He=1,Ue=0,Ge=0,Je=null,Ke=e=>{We=e},Qe=e=>{Je=e};const Xe=(e,t)=>{if(e){for(;e&&!e.reg[t];)e=Z(e);if(e)return e}return null};let Ye=(e,t,r,n,a)=>{let o=Xe(e,n.id);return o?o.reg[n.id]:t?(Ze(t,n,a),t.reg[n.id]):n},Ze=(e,t,n,a,o)=>{let i=e.reg,l=t.sid;if(i[t.id])return;let s={id:t.id,current:t.current};if(l&&l in e.sidValuesMap&&!(l in e.sidIdMap))s.current=e.sidValuesMap[l];else if(t.before&&!o){let o=0,l=n||!t.noInit||a;r(t.before,(t=>{switch(t.type){case A:{let r=t.from;if(r||t.fn){r&&Ze(e,r,n,a);let o=r&&i[r.id].current;l&&(s.current=t.fn?t.fn(o):o)}break}case'field':o||(o=1,s.current=Array.isArray(s.current)?[...s.current]:{...s.current}),Ze(e,t.from,n,a),l&&(s.current[t.field]=i[i[t.from.id].id].current)}}))}l&&(e.sidIdMap[l]=t.id),i[t.id]=s};const et=(e,t,r)=>{try{return t(X(r),e.scope,r)}catch(t){console.error(t),e.fail=1}};let tt=(e,r={})=>(pe(e)&&(tt(e.or,r),t(e,((e,t)=>{he(e)||'or'===t||'and'===t||(r[t]=e)})),tt(e.and,r)),r);const rt=(e,t)=>{W(e.next,t),W(J(e),t),W(K(e),t)},nt=(e,t,r)=>{let n;e.next.length=0,e.seq.length=0,e.scope=null;let a=K(e);for(;n=a.pop();)rt(n,e),(t||r&&'sample'!==te(e,'op')||n.family.type===N)&&nt(n,t,'on'!==te(n,'op')&&r);for(a=J(e);n=a.pop();)rt(n,e),r&&n.family.type===N&&nt(n,t,'on'!==te(n,'op')&&r)},at=e=>e.clear();let ot=(e,{deep:t}={})=>{let r=0;if(e.ownerSet&&e.ownerSet.delete(e),_(e))at(Y(e));else if(V(e)){r=1;let t=e.history;at(t.events),at(t.effects),at(t.stores),at(t.domains)}nt(G(e),!!t,r)},lt=e=>{let t=()=>ot(e);return t.unsubscribe=t,t},st=(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}),ft=(e,t)=>(n(me(t),'.watch argument should be a function'),lt(o({scope:{fn:t},node:[Me({fn:Se})],parent:e,meta:{op:'watch'},family:{owners:e},regional:1}))),dt=(e,t,r=x)=>{Z(e)&&Z(e).hooks[r](t)},ut=(e,t,r,n)=>{let a=e===C,o=oe(),i=tt({or:n,and:'string'==typeof r?{name:r}:r}),{parent:l=null,sid:f=null,named:d=null}=i,u=d||i.name||(a?'':o),c=s(u,l),p={op:t.kind=e,name:t.shortName=u,sid:t.sid=de(f),named:d,unitId:t.id=o,serialize:i.serialize,derived:i.derived,config:i};if(t.parent=l,t.compositeName=c,t.defaultConfig=i,t.thru=e=>(U(0,'thru','js pipe'),e(t)),t.getType=()=>c.fullName,!a){t.subscribe=e=>(ge(e),t.watch(me(e)?e:t=>e.next&&e.next(t))),t[w]=()=>t;let e=fe();e&&(p.nativeTemplate=e)}return p};const ct=(e,t,r,n)=>{let a;pe(r)&&(a=r,r=r.fn);let o=u({name:`${e.shortName} \u2192 *`,derived:1,and:a});return st(e,o,n,t,r),o},pt=(e,t,r,n,a)=>{let o=Q(t),i=Ce({store:o,to:F,priority:'read'});r===A&&(i.data.softRead=1);let l=[i,Ie(n)];return d('storeOnMap',o,l,_(e)&&Q(e)),st(e,t,l,r,a)},mt=(e,r,a,o,i)=>{let s=e?e=>e.slice():e=>({...e}),f=e?[]:{},u=s(f),p=qe(u),m=qe(1);p.type=e?'list':'shape',p.noInit=1,d('combineBase',p,m);let h=c(u,{name:l(a),derived:1,and:o}),g=Q(h);g.noInit=1,re(h,'isCombine',1);let y=Ae(p);y.order={priority:'barrier'};let b=[Ne(((e,t,r)=>(r.scope&&!r.scope.reg[p.id]&&(r.c=1),e))),y,Ce({store:m,to:'b'}),Ne(((e,{key:t},n)=>{if(n.c||e!==n.a[t])return r&&n.b&&(n.a=s(n.a)),n.a[t]=e,1}),1),Ce({from:F,target:p}),Ce({from:q,store:0,target:m}),Ce({from:q,store:1,target:m,priority:O,batch:1}),Ae(p,1),i&&Ie()];return t(a,((e,t)=>{if(!_(e))return n(!D(e)&&!he(e),`combine expects a store in a field ${t}`),void(u[t]=f[t]=e);f[t]=e.defaultState,u[t]=e.getState();let r=st(e,h,b,'combine',i);r.scope.key=t;let a=Q(e);Fe(p,{type:'field',field:t,from:a}),d('combineField',a,r)})),h.defaultShape=a,Fe(g,{type:A,from:p,fn:i}),fe()||(h.defaultState=i?g.current=i(u):f),h};let ht=(e,t,r)=>{try{return[1,e(...r)]}catch(e){return t(e),[0,null]}},gt=(e,t,r,n,a)=>o=>i({target:[n,yt],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:ee(a)});const yt=o({node:[Me({fn:({fn:e,value:t})=>e(t)})],meta:{op:'fx',fx:'sidechain'}}),bt=['source','clock','target'],vt=(e,t)=>e+`: ${t} should be defined`;let kt=(e,t,r,a,o,i,l,s,f,m,h,y)=>{let b=!!o;n(!he(r)||!he(t),vt(e,'either source or clock'));let v=0;he(r)?v=1:D(r)||(r=p(r)),he(t)?t=r:(be(t,e,'clock'),Array.isArray(t)&&(t=g(t))),v&&(r=t),s||l||(l=r.shortName);let k='none';(h||a)&&(D(a)?k='unit':(n(me(a),'`filter` should be function or unit'),k='fn')),o?(be(o,e,'target'),ve(e,o)):'none'===k&&m&&_(r)&&_(t)?o=c(i?i(ze(Q(r)),ze(Q(t))):ze(Q(r)),{name:l,sid:y,or:s}):(o=u({name:l,derived:1,or:s}),d('sampleTarget',G(o)));let w=qe(),S=[];if('unit'===k){let[r,n]=St(a,o,t,w,e);S=[...wt(n),...wt(r)]}let[x,j]=St(r,o,t,w,e);return ue(r,[st(t,o,[d('sampleSourceLoader'),Ce({from:I,target:w}),...wt(j),Ae(x,1,f),...S,Ae(w),'fn'===k&&Ie(((e,t,{a:r})=>a(e,r)),1),i&&Ie(ke),d('sampleSourceUpward',b)],e,i)]),o};const wt=e=>[Ae(e),Ne(((e,t,{a:r})=>r),1)],St=(e,t,r,n,a)=>{let i=_(e),l=i?Q(e):qe(),s=qe(i);return i||o({parent:e,node:[Ce({from:I,target:l}),Ce({from:q,store:1,target:s})],family:{owners:[e,t,r],links:t},meta:{op:a},regional:1}),d('sampleSource',s,l,n),[l,s]},xt=(e,t,r,n)=>{let a=e[t];a&&i({target:a,params:Array.isArray(a)?a.map((()=>r)):r,defer:1,stack:n})};e.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))return Promise.reject(new Error('first argument accepts only effects, events and stores'));let n=m();n.parentFork=We;let{fxCount:a}=t;H(a.scope.defers,n);let o=[e],l=[];return H(l,E(e)?{params:r,req:{rs(e){n.value={status:'done',value:e}},rj(e){n.value={status:'fail',value:e}}}}:r),H(o,a),H(l,null),i({target:o,params:l,scope:t}),n.req},e.attach=e=>{let t;[e,t]=f(e,1);let{source:r,effect:n,mapParams:a}=e,o=h(e,t);re(o,'attached',1);let l,{runner:d}=G(o).scope,u=Ne(((e,t,n)=>{let l,{params:s,req:f,handler:d}=e,u=o.finally,c=gt(s,f,0,u,n),p=n.a,m=E(d),h=1;if(a?[h,l]=ht(a,c,[s,p]):l=r&&m?p:s,h){if(!m)return e.args=[p,l],1;i({target:d,params:{params:l,req:{rs:gt(s,f,1,u,n),rj:c}},page:n.page,defer:1})}}),1,1);if(r){let e;_(r)?(e=r,ue(e,[o])):(e=p(r),ue(o,[e])),l=[Ae(Q(e)),u]}else l=[u];d.seq.splice(1,0,...l),o.use(n);let c=Z(n);return c&&(Object.assign(ne(o),s(o.shortName,c)),o.defaultConfig.parent=c),dt(n,o,j),o},e.clearNode=ot,e.combine=p,e.createApi=(...e)=>{let[[r,n],a]=f(e),o={};return t(n,((e,t)=>{let n=o[t]=u(t,{parent:Z(r),config:a});r.on(n,e),dt(r,n)})),o},e.createDomain=function e(n,a){let l=o({family:{type:C},regional:1}),s={history:{},graphite:l,hooks:{}};l.meta=ut(C,s,n,a),t({Event:u,Effect:h,Store:c,Domain:e},((e,t)=>{let n=t.toLowerCase(),a=(e=>u({named:e}))(`on${t}`);s.hooks[n]=a;let o=new Set;s.history[`${n}s`]=o,a.create=e=>(i(a,e),e),H(G(a).seq,Ne(((e,t,r)=>(r.scope=null,e)))),a.watch((e=>{ue(s,[e]),o.add(e),e.ownerSet||(e.ownerSet=o),Z(e)||(e.parent=s)})),ue(s,[a]),s[`onCreate${t}`]=e=>(r(o,e),a.watch(e)),s[`create${t}`]=s[n]=(t,r)=>a(e(t,{parent:s,or:r}))}));let f=Z(s);return f&&t(s.hooks,((e,t)=>st(e,f.hooks[t]))),s},e.createEffect=h,e.createEvent=u,e.createNode=o,e.createStore=c,e.createStoreObject=(...e)=>(U(0,'createStoreObject','combine'),p(...e)),e.createWatch=({unit:e,fn:t,scope:r})=>{let n=[Oe.run({fn:e=>t(e)})];if(r){let t=o({node:n}),a=e.graphite.id,i=r.additionalLinks,l=i[a]||[];return i[a]=l,l.push(t),k((()=>{let e=l.indexOf(t);-1!==e&&l.splice(e,1),ot(t)}))}{let t=o({node:n,parent:[e],family:{owners:e}});return k((()=>{ot(t)}))}},e.fork=(e,t)=>{let a,i=e;V(e)&&(a=e,i=t);let l=(e=>{let t=o({scope:{defers:[],inFlight:0,fxID:0},node:[Ne(((e,t,r)=>{Z(r)?'dec'===te(Z(r).node,'needFxCounter')?t.inFlight-=1:(t.inFlight+=1,t.fxID+=1):t.fxID+=1})),$e({priority:M,batch:1}),Ne(((e,t)=>{let{defers:n,fxID:a}=t;t.inFlight>0||0===n.length||Promise.resolve().then((()=>{t.fxID===a&&r(n.splice(0,n.length),(e=>{Ke(e.parentFork),e.rs(e.value)}))}))}),0,1)]}),n=o({node:[Ne(((e,t,r)=>{let n=Z(r);if(n){let t=n.node;if(!te(t,'isCombine')||Z(n)&&'combine'!==te(Z(n).node,'op')){let n=ee(r),a=t.scope.state.id,o=te(t,'sid');n.sidIdMap[o]=a,n.sidValuesMap[o]=e}}}))]}),a=o({node:[Ne(((e,t,r)=>{let n=ee(r);if(n){let e=Z(r);e&&(!te(e.node,'isCombine')||Z(e)&&'combine'!==te(Z(e).node,'op'))&&(n.warnSerialize=1)}}))]}),i={cloneOf:e,reg:{},sidValuesMap:{},sidIdMap:{},getState(e){if('current'in e)return Ye(Je,i,null,e).current;let t=G(e);return Ye(Je,i,t,t.scope.state,1).current},kind:$,graphite:o({family:{type:C,links:[t,n,a]},meta:{unit:'fork'},scope:{forkInFlightCounter:t}}),additionalLinks:{},handlers:{},fxCount:t,storeChange:n,warnSerializeNode:a};return i})(a);if(i){if(i.values){let e=v(i.values,(e=>n(_(e),'Values map can contain only stores as keys')));Object.assign(l.sidValuesMap,e)}i.handlers&&(l.handlers=v(i.handlers,(e=>n(E(e),"Handlers map can contain only effects as keys"))))}return l},e.forward=e=>{let t='forward',[{from:r,to:n},a]=f(e,1);return be(r,t,'"from"'),be(n,t,'"to"'),ve(t,n,'to'),lt(o({parent:r,child:n,meta:{op:t,config:a},family:{},regional:1}))},e.fromObservable=e=>{ge(e);let t=w in e?e[w]():e;n(t.subscribe,'expect observable to have .subscribe');let r=u(),a=lt(r);return t.subscribe({next:r,error:a,complete:a}),r},e.guard=(...e)=>{let[[t,r],n]=f(e);return r||(r=t,t=r.source),y(r,'guard'),kt('guard',r.clock,t,r.filter,r.target,null,r.name,n,!r.greedy,0,1)},e.hydrate=(e,{values:t})=>{n(pe(t),'values property should be an object');let r,a,o,l=v(t),s=Object.getOwnPropertyNames(l),f=[],d=[];T(e)?(r=e,o=1,n(r.cloneOf,'scope should be created from domain'),a=G(r.cloneOf)):V(e)?a=G(e):n(0,'first argument of hydrate should be domain or scope'),b(a,((e,t)=>{L(s,t)&&(H(f,e),H(d,l[t]))})),i({target:f,params:d,scope:r}),o&&Object.assign(r.sidValuesMap,l)},e.is=B,e.launch=i,e.merge=g,e.restore=(e,r,n)=>{if(_(e))return U(0,'restore($store)'),e;if(P(e)||E(e)){let t=Z(e),a=c(r,{parent:t,name:e.shortName,and:n});return st(E(e)?e.doneData:e,a),t&&t.hooks.store(a),a}let a=Array.isArray(e)?[]:{};return t(e,((e,t)=>a[t]=_(e)?e:c(e,{name:t}))),a},e.sample=(...e)=>{let t,r,n,a,[[o,i,l],s]=f(e),d=1;return he(i)&&pe(o)&&y(o,z)&&(i=o.clock,l=o.fn,d=!o.greedy,a=o.filter,t=o.target,r=o.name,n=o.sid,o=o.source),kt(z,i,o,a,t,l,r,s,d,1,0,n)},e.scopeBind=(e,{scope:t}={})=>{n(t||We,'scopeBind cannot be called outside of forked .watch');let r=t||We;return E(e)?t=>{let n=m();return i({target:e,params:{params:t,req:n},scope:r}),n.req}:t=>(i({target:e,params:t,scope:r}),t)},e.serialize=(e,r={})=>{e.warnSerialize&&console.error('There is a store without sid in this scope, its value is omitted');let a=r.ignore?r.ignore.map((({sid:e})=>e)):[],o={};return t(e.sidValuesMap,((t,r)=>{if(L(a,r))return;let n=e.sidIdMap[r];o[r]=n&&n in e.reg?e.reg[n].current:t})),'onlyChanges'in r&&!r.onlyChanges&&(n(e.cloneOf,'scope should be created from domain'),b(G(e.cloneOf),((t,r)=>{r in o||L(a,r)||te(t,'isCombine')||'ignore'===te(t,'serialize')||(o[r]=e.getState(t))}))),o},e.setStoreName=(e,t)=>{e.shortName=t,Object.assign(ne(e),s(t,Z(e)))},e.split=(...e)=>{let r,a,i='split',[[l,s],c]=f(e),p=!s;p&&(r=l.cases,s=l.match,a=l.clock,l=l.source);let m=_(s),h=!D(s)&&me(s),g=!m&&!h&&pe(s);r||(r={}),p?t(r,((e,t)=>ve(i,e,`cases.${t}`))):(n(g,'match should be an object'),t(s,((e,t)=>r[t]=u({derived:1,and:c}))),r.__=u({derived:1,and:c}));let y,b=new Set([].concat(l,a||[],Object.values(r))),v=Object.keys(m||h?r:s);if(m||h)m&&b.add(s),y=[m&&Ae(Q(s),0,1),$e({safe:m,filter:1,pure:!m,fn(e,t,r){let n=String(m?r.a:s(e));xt(t,L(v,n)?n:'__',e,r)}})];else if(g){let e=qe({});e.type='shape';let r,n=[];t(s,((t,a)=>{if(D(t)){r=1,H(n,a),b.add(t);let o=st(t,[],[Ae(e),Ne(((e,t,{a:r})=>r[a]=e))]);if(_(t)){e.current[a]=t.getState();let r=Q(t);Fe(e,{from:r,field:a,type:'field'}),d('splitMatchStore',r,o)}}})),r&&d('splitBase',e),y=[r&&Ae(e,0,1),Ie(((e,t,r)=>{for(let a=0;a<v.length;a++){let o=v[a];if(L(n,o)?r.a[o]:s[o](e))return void xt(t,o,e,r)}xt(t,'__',e,r)}),1)]}else n(0,'expect match to be unit, function or object');let k=o({meta:{op:i},parent:a?[]:l,scope:r,node:y,family:{owners:Array.from(b)},regional:1});if(a&&kt(i,a,l,null,k,null,i,c,0,0,0),!p)return r},e.step=Oe,e.version="22.3.0",e.withFactory=({sid:e,name:t,loc:r,method:n,fn:i})=>a(o({meta:{sidRoot:de(e),name:t,loc:r,method:n}}),i),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(let r in e)t(e[r],r)}function r(e,t){e.forEach(t)}function a(e,t){if(!e)throw Error(t)}function n(e,t){se={parent:se,value:e,template:L(e,'template')||fe(),sidRoot:L(e,'sidRoot')||se&&se.sidRoot};try{return t()}finally{se=T(se)}}function i({node:e=[],from:t,source:a,parent:n=t||a,to:i,target:o,child:l=i||o,scope:s={},meta:f={},family:d={type:'regular'},regional:u}={}){let c=ce(n),p=ce(d.links),m=ce(d.owners),h=[];r(e,(e=>e&&re(h,e)));let g={id:le(),seq:h,next:ce(l),meta:f,scope:s,family:{type:d.type||$,links:p,owners:m}};return r(p,(e=>re(D(e),g))),r(m,(e=>re(R(e),g))),r(c,(e=>re(e.next,g))),u&&se&&ue(P(se),[g]),g}function o(e,t,a){let n=Je,i=null,o=We;if(e.target&&(t=e.params,a=e.defer,n='page'in e?e.page:n,e.stack&&(i=e.stack),o=B(e)||o,e=e.target),o&&We&&o!==We&&(We=null),Array.isArray(e))for(let r=0;r<e.length;r++)Ve('pure',n,E(e[r]),i,t[r],o);else Ve('pure',n,E(e),i,t,o);if(a&&!He)return;let l,s,f,d,u,c,p={isRoot:He,currentPage:Je,scope:We,isWatch:Ue,isPure:Ge};He=0;e:for(;d=Pe();){let{idx:e,stack:t,type:a}=d;f=t.node,Je=u=t.page,We=B(t),u?c=u.reg:We&&(c=We.reg);let n=!!u,i=!!We,o={fail:0,scope:f.scope};l=s=0;for(let r=e;r<f.seq.length&&!l;r++){let d=f.seq[r];if(d.order){let{priority:n,barrierID:i}=d.order,o=i?u?`${u.fullID}_${i}`:i:0;if(r!==e||a!==n){i?Le.has(o)||(Le.add(o),Te(r,t,n,i)):Te(r,t,n);continue e}i&&Le.delete(o)}switch(d.type){case'mov':{let e,r=d.data;switch(r.from){case N:e=P(t);break;case F:case'b':e=t[r.from];break;case I:e=r.store;break;case S:if(c&&!c[r.store.id])if(n){let e=Xe(u,r.store.id);t.page=u=e,e?c=e.reg:i?(et(We,r.store,0,1,r.softRead),c=We.reg):c=void 0}else i&&et(We,r.store,0,1,r.softRead);e=qe(c&&c[r.store.id]||r.store)}switch(r.to){case N:t.value=e;break;case F:case'b':t[r.to]=e;break;case S:Ye(u,We,f,r.target).current=e}break}case'compute':let e=d.data;if(e.fn){Ue='watch'===L(f,'op'),Ge=e.pure;let r=e.safe?(0,e.fn)(P(t),o.scope,t):tt(o,e.fn,t);e.filter?s=!r:t.value=r,Ue=p.isWatch,Ge=p.isPure}}l=o.fail||s}if(!l){let e=P(t),a=B(t);if(r(f.next,(r=>{Ve('child',u,r,t,e,a)})),a){L(f,'needFxCounter')&&Ve('child',u,a.fxCount,t,e,a),L(f,'storeChange')&&Ve('child',u,a.storeChange,t,e,a),L(f,'warnSerialize')&&Ve('child',u,a.warnSerializeNode,t,e,a);let n=a.additionalLinks[f.id];n&&r(n,(r=>{Ve('child',u,r,t,e,a)}))}}}He=p.isRoot,Je=p.currentPage,We=B(p)}function l(e,r="combine"){let a=r+'(',n='',i=0;return t(e,(e=>{i<25&&(null!=e&&(a+=n,a+=U(e)?H(e).fullName:e.toString()),i+=1,n=', ')})),a+')'}function s(e,t){let r,a,n=e;if(t){let n=H(t);0===e.length?(r=n.path,a=n.fullName):(r=n.path.concat([e]),a=0===n.fullName.length?e:n.fullName+'/'+e)}else r=0===e.length?[]:[e],a=e;return{shortName:n,fullName:a,path:r}}function f(e,t){let r=t?e:e[0];ge(r);let a=r.or,n=r.and;if(n){let r=t?n:n[0];if(pe(r)&&'and'in r){let r=f(n,t);e=r[0],a={...a,...r[1]}}else e=n}return[e,a]}function d(e,...t){let r=fe();if(r){let a=r.handlers[e];if(a)return a(r,...t)}}function u(e,t){let r=rt({or:t,and:'string'==typeof e?{name:e}:e}),a=(e,...t)=>(ae(!L(a,'derived'),'call of derived event','createEvent'),ae(!Ge,'unit call from pure function','operators like sample'),Je?((e,t,r,a)=>{let n=Je,i=null;if(t)for(i=Je;i&&i.template!==t;)i=T(i);Qe(i);let o=e.create(r,a);return Qe(n),o})(a,n,e,t):a.create(e,t)),n=fe(),l=Object.assign(a,{graphite:i({meta:ct(x,a,r),regional:1}),create:e=>(o({target:a,params:e,scope:We}),e),watch:e=>dt(a,e),map:e=>pt(a,A,e,[Ne()]),filter:e=>pt(a,"filter",e.fn?e:e.fn,[Ne(Se,1)]),filterMap:e=>pt(a,'filterMap',e,[Ne(),$e((e=>!he(e)),1)]),prepend(e){let t=u('* \u2192 '+a.shortName,{parent:T(a)});return d('eventPrepend',E(t)),ft(t,a,[Ne()],'prepend',e),ut(a,t),t}});return null!=r&&r.domain&&r.domain.hooks.event(l),l}function c(e,t){let n=rt(t),l=Ie(e),s=u({named:'updates',derived:1});d('storeBase',l);let f=l.id,p={subscribers:new Map,updates:s,defaultState:e,stateRef:l,getState(){let e,t=l;if(Je){let t=Je;for(;t&&!t.reg[f];)t=T(t);t&&(e=t)}return!e&&We&&(et(We,l,1),e=We),e&&(t=e.reg[f]),qe(t)},setState:e=>o({target:p,params:e,defer:1,scope:We}),reset:(...e)=>(r(e,(e=>p.on(e,(()=>p.defaultState)))),p),on:(e,t)=>(be(e,'.on','first argument'),a(me(t),'second argument should be a function'),ae(!L(p,'derived'),'.on in derived store','createStore'),r(Array.isArray(e)?e:[e],(e=>{p.off(e),V(p).set(e,st(mt(e,p,'on',we,t)))})),p),off(e){let t=V(p).get(e);return t&&(t(),V(p).delete(e)),p},map(e,t){let r,a;pe(e)&&(r=e,e=e.fn),ae(he(t),'second argument of store.map','updateFilter');let n=p.getState();fe()?a=null:he(n)||(a=e(n,t));let i=c(a,{name:`${p.shortName} \u2192 *`,derived:1,and:r}),o=mt(p,i,A,ke,e);return Fe(_(i),{type:A,fn:e,from:l}),_(i).noInit=1,d('storeMap',l,o),i},watch(e,t){if(!t||!U(e)){let t=dt(p,e);return d('storeWatch',l,e)||e(p.getState()),t}return a(me(t),'second argument should be a function'),e.watch((e=>t(p.getState(),e)))}},m=ct(S,p,n),h=p.defaultConfig.updateFilter;p.graphite=i({scope:{state:l,fn:h},node:[$e(((e,t,r)=>(r.scope&&!r.scope.reg[l.id]&&(r.b=1),e))),Ae(l),$e(((e,t,{a:r,b:a})=>!he(e)&&(e!==r||a)),1),h&&Ne(ke,1),ze({from:N,target:l})],child:s,meta:m,regional:1});let g=L(p,'serialize'),y=L(p,'derived'),b='ignore'===g,v=!g||b?0:g,k=L(p,'sid');return k&&(b||W(p,'storeChange',1),l.sid=k,v&&(l.meta={...null==l?void 0:l.meta,serialize:v})),k||b||y||W(p,'warnSerialize',1),a(y||!he(e),"current state can't be undefined, use null instead"),ue(p,[s]),null!=n&&n.domain&&n.domain.hooks.store(p),y||(p.reinit=u(),p.reset(p.reinit)),p}function p(...e){let t,r,n;[e,n]=f(e);let i,o,l,s=e[e.length-1];if(me(s)?(r=e.slice(0,-1),t=s):r=e,1===r.length){let e=r[0];J(e)||(i=e,o=1)}if(!o&&(i=r,t)){l=1;let e=t;t=t=>e(...t)}return a(pe(i),'shape should be an object'),ht(Array.isArray(i),!l,i,n,t)}function m(){let e={};return e.req=new Promise(((t,r)=>{e.rs=t,e.rj=r})),e.req.catch((()=>{})),e}function h(e,t){let r=rt(me(e)?{handler:e}:e,t),n=u(me(e)?{handler:e}:e,t),l=E(n);W(l,'op',n.kind=j),n.use=e=>(a(me(e),'.use argument should be a function'),g.scope.handler=e,n),n.use.getCurrent=()=>g.scope.handler;let s=n.finally=u({named:'finally',derived:1}),f=n.done=s.filterMap({named:'done',fn({status:e,params:t,result:r}){if('done'===e)return{params:t,result:r}}}),d=n.fail=s.filterMap({named:'fail',fn({status:e,params:t,error:r}){if('fail'===e)return{params:t,error:r}}}),p=n.doneData=f.map({named:'doneData',fn:({result:e})=>e}),h=n.failData=d.map({named:'failData',fn:({error:e})=>e}),g=i({scope:{handlerId:L(l,'sid'),handler:n.defaultConfig.handler||(()=>a(0,`no handler used in ${n.getType()}`))},node:[$e(((e,t,r)=>{let a=t,n=a.handler;if(B(r)){let e=B(r).handlers[a.handlerId];e&&(n=e)}return e.handler=n,e}),0,1),$e((({params:e,req:t,handler:r,args:a=[e]},n,i)=>{let o=yt(i),l=bt(e,t,1,s,i,o),f=bt(e,t,0,s,i,o),[d,u]=gt(r,f,a);d&&(pe(u)&&me(u.then)?u.then(l,f):l(u))}),0,1)],meta:{op:'fx',fx:'runner'}});l.scope.runner=g,re(l.seq,$e(((e,{runner:t},r)=>{let a=T(r)?{params:e,req:{rs(e){},rj(e){}}}:e;return o({target:t,params:a,defer:1,scope:B(r)}),a.params}),0,1)),n.create=e=>{let t=m(),r={params:e,req:t};if(We){if(!Ue){let e=We;t.req.finally((()=>{Ke(e)})).catch((()=>{}))}o({target:n,params:r,scope:We})}else o(n,r);return t.req};let y=n.inFlight=c(0,{serialize:'ignore'}).on(n,(e=>e+1)).on(s,(e=>e-1)).map({fn:e=>e,named:'inFlight'});W(s,'needFxCounter','dec'),W(n,'needFxCounter',1);let b=n.pending=y.map({fn:e=>e>0,named:'pending'});return ue(n,[s,f,d,p,h,b,y]),null!=r&&r.domain&&r.domain.hooks.effect(n),n}function g(e,t){be(e,'merge','first argument');let r=u({name:l(e,'merge'),derived:1,and:t});return ft(e,r,[],'merge'),r}function y(e,t){let n=0;return r(kt,(r=>{r in e&&(a(null!=e[r],wt(t,r)),n=1)})),n}function b(e,t){let a=[];(function e(n){ee(a,n)||(re(a,n),L(n,'op')===S&&L(n,'sid')&&t(n,L(n,'sid')),r(n.next,e),r(D(n),e),r(R(n),e))})(e)}function v(e,t){let n=Array.isArray(e)?new Map(e):e;if(n instanceof Map){let e={};return r(n,((r,n)=>{a(U(n),'Map key should be a unit'),t&&t(n,r),a(n.sid,'unit should have a sid'),a(!(n.sid in e),'duplicate sid found'),e[n.sid]=r})),e}return n}function k(e){let t=()=>e();return t.unsubscribe=()=>e(),t}let w='undefined'!=typeof Symbol&&Symbol.observable||'@@observable',S='store',x='event',j='effect',z='domain',M='scope',C='sampler',$='crosslink',A='map',N='stack',O='barrier',I='value',q='sample',F='a',E=e=>e.graphite||e,D=e=>e.family.owners,R=e=>e.family.links,_=e=>e.stateRef,P=e=>e.value,V=e=>e.subscribers,T=e=>e.parent,B=e=>e.scope,L=(e,t)=>E(e).meta[t],W=(e,t,r)=>E(e).meta[t]=r,H=e=>e.compositeName,U=e=>(me(e)||pe(e))&&'kind'in e;const G=e=>t=>U(t)&&t.kind===e;let J=G(S),K=G(x),Q=G(j),X=G(z),Y=G(M);var Z={__proto__:null,unit:U,store:J,event:K,effect:Q,domain:X,scope:Y,attached:e=>Q(e)&&1==L(e,'attached')};let ee=(e,t)=>e.includes(t),te=(e,t)=>{let r=e.indexOf(t);-1!==r&&e.splice(r,1)},re=(e,t)=>e.push(t),ae=(e,t,r)=>!e&&console.error(`${t} is deprecated${r?`, use ${r} instead`:''}`);const ne=()=>{let e=0;return()=>""+ ++e};let ie=ne(),oe=ne(),le=ne(),se=null,fe=()=>se&&se.template,de=e=>(e&&se&&se.sidRoot&&(e=`${se.sidRoot}|${e}`),e),ue=(e,t)=>{let a=E(e);r(t,(e=>{let t=E(e);a.family.type!==z&&(t.family.type=$),re(D(t),a),re(R(a),t)}))},ce=(e=[])=>(Array.isArray(e)?e:[e]).flat().map(E),pe=e=>'object'==typeof e&&null!==e,me=e=>'function'==typeof e,he=e=>void 0===e,ge=e=>a(pe(e)||me(e),'expect first argument be an object');const ye=(e,t,r,n)=>a(!(!pe(e)&&!me(e)||!('family'in e)&&!('graphite'in e)),`${t}: expect ${r} to be a unit (store, event or effect)${n}`);let be=(e,t,a)=>{Array.isArray(e)?r(e,((e,r)=>ye(e,t,`${r} item of ${a}`,''))):ye(e,t,a,' or array of units')},ve=(e,t,a="target")=>r(ce(t),(t=>ae(!L(t,'derived'),`${e}: derived unit in "${a}"`,"createEvent/createStore"))),ke=(e,{fn:t},{a:r})=>t(e,r),we=(e,{fn:t},{a:r})=>t(r,e),Se=(e,{fn:t})=>t(e);const xe=(e,t,r,a)=>{let n={id:oe(),type:e,data:t};return r&&(n.order={priority:r},a&&(n.order.barrierID=++je)),n};let je=0,ze=({from:e=S,store:t,target:r,to:a=(r?S:N),batch:n,priority:i})=>xe('mov',{from:e,store:t,to:a,target:r},i,n),Me=({fn:e,batch:t,priority:r,safe:a=0,filter:n=0,pure:i=0})=>xe('compute',{fn:e,safe:a,filter:n,pure:i},r,t),Ce=({fn:e})=>Me({fn:e,priority:j}),$e=(e,t,r)=>Me({fn:e,safe:1,filter:t,priority:r&&j}),Ae=(e,t,r)=>ze({store:e,to:t?N:F,priority:r&&C,batch:1}),Ne=(e=Se,t)=>Me({fn:e,pure:1,filter:t}),Oe={mov:ze,compute:Me,filter:({fn:e,pure:t})=>Me({fn:e,filter:1,pure:t}),run:Ce},Ie=e=>({id:oe(),current:e}),qe=({current:e})=>e,Fe=(e,t)=>{e.before||(e.before=[]),re(e.before,t)},Ee=null;const De=(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||Be(e.v.type)>Be(t.v.type))&&(r=e,e=t,t=r),r=De(e.r,t),e.r=e.l,e.l=r,e},Re=[];let _e=0;for(;_e<6;)re(Re,{first:null,last:null,size:0}),_e+=1;const Pe=()=>{for(let e=0;e<6;e++){let t=Re[e];if(t.size>0){if(3===e||4===e){t.size-=1;let e=Ee.v;return Ee=De(Ee.l,Ee.r),e}1===t.size&&(t.last=null);let r=t.first;return t.first=r.r,t.size-=1,r.v}}},Ve=(e,t,r,a,n,i)=>Te(0,{a:null,b:null,node:r,parent:a,value:n,page:t,scope:i},e),Te=(e,t,r,a=0)=>{let n=Be(r),i=Re[n],o={v:{idx:e,stack:t,type:r,id:a},l:null,r:null};3===n||4===n?Ee=De(Ee,o):(0===i.size?i.first=o:i.last.r=o,i.last=o),i.size+=1},Be=e=>{switch(e){case'child':return 0;case'pure':return 1;case'read':return 2;case O:return 3;case C:return 4;case j:return 5;default:return-1}},Le=new Set;let We,He=1,Ue=0,Ge=0,Je=null,Ke=e=>{We=e},Qe=e=>{Je=e};const Xe=(e,t)=>{if(e){for(;e&&!e.reg[t];)e=T(e);if(e)return e}return null};let Ye=(e,t,r,a,n)=>{let i=Xe(e,a.id);return i?i.reg[a.id]:t?(et(t,a,n),t.reg[a.id]):a};const Ze=e=>e;let et=(e,t,a,n,i)=>{var o;let l=e.reg,s=t.sid,f=null==t||null===(o=t.meta)||void 0===o?void 0:o.serialize;if(l[t.id])return;let d={id:t.id,current:t.current,meta:t.meta};if(s&&s in e.sidValuesMap&&!(s in e.sidIdMap))d.current=(e.fromSerialize&&'ignore'!==f&&(null==f?void 0:f.read)||Ze)(e.sidValuesMap[s]);else if(t.before&&!i){let i=0,o=a||!t.noInit||n;r(t.before,(t=>{switch(t.type){case A:{let r=t.from;if(r||t.fn){r&&et(e,r,a,n);let i=r&&l[r.id].current;o&&(d.current=t.fn?t.fn(i):i)}break}case'field':i||(i=1,d.current=Array.isArray(d.current)?[...d.current]:{...d.current}),et(e,t.from,a,n),o&&(d.current[t.field]=l[l[t.from.id].id].current)}}))}s&&(e.sidIdMap[s]=t.id),l[t.id]=d};const tt=(e,t,r)=>{try{return t(P(r),e.scope,r)}catch(t){console.error(t),e.fail=1}};let rt=(e,r={})=>(pe(e)&&(rt(e.or,r),t(e,((e,t)=>{he(e)||'or'===t||'and'===t||(r[t]=e)})),rt(e.and,r)),r);const at=(e,t)=>{te(e.next,t),te(D(e),t),te(R(e),t)},nt=(e,t,r)=>{let a;e.next.length=0,e.seq.length=0,e.scope=null;let n=R(e);for(;a=n.pop();)at(a,e),(t||r&&'sample'!==L(e,'op')||a.family.type===$)&&nt(a,t,'on'!==L(a,'op')&&r);for(n=D(e);a=n.pop();)at(a,e),r&&a.family.type===$&&nt(a,t,'on'!==L(a,'op')&&r)},ot=e=>e.clear();let lt=(e,{deep:t}={})=>{let r=0;if(e.ownerSet&&e.ownerSet.delete(e),J(e))ot(V(e));else if(X(e)){r=1;let t=e.history;ot(t.events),ot(t.effects),ot(t.stores),ot(t.domains)}nt(E(e),!!t,r)},st=e=>{let t=()=>lt(e);return t.unsubscribe=t,t},ft=(e,t,r,a,n)=>i({node:r,parent:e,child:t,scope:{fn:n},meta:{op:a},family:{owners:[e,t],links:t},regional:1}),dt=(e,t)=>(a(me(t),'.watch argument should be a function'),st(i({scope:{fn:t},node:[Ce({fn:Se})],parent:e,meta:{op:'watch'},family:{owners:e},regional:1}))),ut=(e,t,r=x)=>{T(e)&&T(e).hooks[r](t)},ct=(e,t,r)=>{let a=rt(r),n=e===z,i=ie(),{sid:o=null,named:l=null,domain:f=null,parent:d=f}=a,u=l||a.name||(n?'':i),c=s(u,d),p={op:t.kind=e,name:t.shortName=u,sid:t.sid=de(o),named:l,unitId:t.id=i,serialize:a.serialize,derived:a.derived,config:a};if(t.parent=d,t.compositeName=c,t.defaultConfig=a,t.thru=e=>(ae(0,'thru','js pipe'),e(t)),t.getType=()=>c.fullName,!n){t.subscribe=e=>(ge(e),t.watch(me(e)?e:t=>e.next&&e.next(t))),t[w]=()=>t;let e=fe();e&&(p.nativeTemplate=e)}return p};const pt=(e,t,r,a)=>{let n;pe(r)&&(n=r,r=r.fn);let i=u({name:`${e.shortName} \u2192 *`,derived:1,and:n});return ft(e,i,a,t,r),i},mt=(e,t,r,a,n)=>{let i=_(t),o=ze({store:i,to:F,priority:'read'});r===A&&(o.data.softRead=1);let l=[o,Ne(a)];return d('storeOnMap',i,l,J(e)&&_(e)),ft(e,t,l,r,n)},ht=(e,r,n,i,o)=>{let s=e?e=>[...e]:e=>({...e}),f=e?[]:{},u=s(f),p=Ie(u),m=Ie(1);p.type=e?'list':'shape',p.noInit=1,d('combineBase',p,m);let h=c(u,{name:l(n),derived:1,and:i}),g=_(h);g.noInit=1,W(h,'isCombine',1);let y=Ae(p);y.order={priority:'barrier'};let b=[$e(((e,t,r)=>(r.scope&&!r.scope.reg[p.id]&&(r.c=1),e))),y,ze({store:m,to:'b'}),$e(((e,{key:t},a)=>{if(a.c||e!==a.a[t])return r&&a.b&&(a.a=s(a.a)),a.a[t]=e,1}),1),ze({from:F,target:p}),ze({from:I,store:0,target:m}),ze({from:I,store:1,target:m,priority:O,batch:1}),Ae(p,1),o&&Ne()];return t(n,((e,t)=>{if(!J(e))return a(!U(e)&&!he(e),`combine expects a store in a field ${t}`),void(u[t]=f[t]=e);f[t]=e.defaultState,u[t]=e.getState();let r=ft(e,h,b,'combine',o);r.scope.key=t;let n=_(e);Fe(p,{type:'field',field:t,from:n}),d('combineField',n,r)})),h.defaultShape=n,Fe(g,{type:A,from:p,fn:o}),fe()||(h.defaultState=o?g.current=o(u):f),h};let gt=(e,t,r)=>{try{return[1,e(...r)]}catch(e){return t(e),[0,null]}},yt=e=>{let t=B(e),r={ref:t};return t&&re(t.activeEffects,r),r},bt=(e,t,r,a,n,i)=>l=>{i.ref&&te(i.ref.activeEffects,i),o({target:[a,vt],params:[r?{status:'done',params:e,result:l}:{status:'fail',params:e,error:l},{value:l,fn:r?t.rs:t.rj}],defer:1,page:n.page,scope:i.ref})};const vt=i({node:[Ce({fn:({fn:e,value:t})=>e(t)})],meta:{op:'fx',fx:'sidechain'}}),kt=['source','clock','target'],wt=(e,t)=>e+`: ${t} should be defined`;let St=(e,t,r,n,i,o,l,s,f,m,h,y)=>{let b=!!i;a(!he(r)||!he(t),wt(e,'either source or clock'));let v=0;he(r)?v=1:U(r)||(r=p(r)),he(t)?t=r:(be(t,e,'clock'),Array.isArray(t)&&(t=g(t))),v&&(r=t),s||l||(l=r.shortName);let k='none';(h||n)&&(U(n)?k='unit':(a(me(n),'`filter` should be function or unit'),k='fn')),i?(be(i,e,'target'),ve(e,i)):'none'===k&&m&&J(r)&&J(t)?i=c(o?o(qe(_(r)),qe(_(t))):qe(_(r)),{name:l,sid:y,or:s}):(i=u({name:l,derived:1,or:s}),d('sampleTarget',E(i)));let w=Ie(),S=[];if('unit'===k){let[r,a]=jt(n,i,t,w,e);S=[...xt(a),...xt(r)]}let[x,j]=jt(r,i,t,w,e),z=ft(t,i,[d('sampleSourceLoader'),ze({from:N,target:w}),...xt(j),Ae(x,1,f),...S,Ae(w),'fn'===k&&Ne(((e,t,{a:r})=>n(e,r)),1),o&&Ne(ke),d('sampleSourceUpward',b)],e,o);return ue(r,[z]),Object.assign(z.meta,s,{joint:1}),i};const xt=e=>[Ae(e),$e(((e,t,{a:r})=>r),1)],jt=(e,t,r,a,n)=>{let o=J(e),l=o?_(e):Ie(),s=Ie(o);return o||i({parent:e,node:[ze({from:N,target:l}),ze({from:I,store:1,target:s})],family:{owners:[e,t,r],links:t},meta:{op:n},regional:1}),d('sampleSource',s,l,a),[l,s]},zt=(e,t,r,a)=>{let n=e[t];n&&o({target:n,params:Array.isArray(n)?n.map((()=>r)):r,defer:1,stack:a})},Mt=e=>e;e.allSettled=(e,{scope:t,params:r})=>{if(!U(e))return Promise.reject(new Error('first argument should be unit'));if(!Q(e)&&!K(e)&&!J(e))return Promise.reject(new Error('first argument accepts only effects, events and stores'));let a=m();a.parentFork=We;let{fxCount:n}=t;re(n.scope.defers,a);let i=[e],l=[];return re(l,Q(e)?{params:r,req:{rs(e){a.value={status:'done',value:e}},rj(e){a.value={status:'fail',value:e}}}}:r),re(i,n),re(l,null),o({target:i,params:l,scope:t}),a.req},e.attach=e=>{let t;[e,t]=f(e,1);let{source:r,effect:a,mapParams:n}=e,i=h(e,t);W(i,'attached',1);let l,{runner:d}=E(i).scope,u=$e(((e,t,a)=>{let l,{params:s,req:f,handler:d}=e,u=i.finally,c=yt(a),p=bt(s,f,0,u,a,c),m=a.a,h=Q(d),g=1;if(n?[g,l]=gt(n,p,[s,m]):l=r&&h?m:s,g){if(!h)return e.args=[m,l],1;o({target:d,params:{params:l,req:{rs:bt(s,f,1,u,a,c),rj:p}},page:a.page,defer:1})}}),1,1);if(r){let e;J(r)?(e=r,ue(e,[i])):(e=p(r),ue(i,[e])),l=[Ae(_(e)),u]}else l=[u];d.seq.splice(1,0,...l),i.use(a);let c=T(a);return c&&(Object.assign(H(i),s(i.shortName,c)),i.defaultConfig.parent=c),ut(a,i,j),i},e.clearNode=lt,e.combine=p,e.createApi=(...e)=>{let[[r,a],n]=f(e),i={};return t(a,((e,t)=>{let a=i[t]=u(t,{parent:T(r),config:n});r.on(a,e),ut(r,a)})),i},e.createDomain=function e(a,n){let l=rt({or:n,and:'string'==typeof a?{name:a}:a}),s=i({family:{type:z},regional:1,parent:(null==l?void 0:l.domain)||(null==l?void 0:l.parent)}),f={history:{},graphite:s,hooks:{}};s.meta=ct(z,f,{parent:(null==l?void 0:l.domain)||(null==l?void 0:l.parent),or:l}),t({Event:u,Effect:h,Store:c,Domain:e},((e,t)=>{let a=t.toLowerCase(),n=(e=>u({named:e}))(`on${t}`);f.hooks[a]=n;let i=new Set;f.history[`${a}s`]=i,n.create=e=>(o(n,e),e),re(E(n).seq,$e(((e,t,r)=>(r.scope=null,e)))),n.watch((e=>{ue(f,[e]),i.add(e),e.ownerSet||(e.ownerSet=i),T(e)||(e.parent=f)})),ue(f,[n]),f[`onCreate${t}`]=e=>(r(i,e),n.watch(e)),f[`create${t}`]=f[a]=(t,r)=>{let a=rt({and:r,or:t});return null!=a&&a.domain?e(t,r):n(e(t,{parent:f,or:a}))}}));let d=T(f);return d&&t(f.hooks,((e,t)=>ft(e,d.hooks[t]))),null!=l&&l.domain&&l.domain.hooks.domain(f),f},e.createEffect=h,e.createEvent=u,e.createNode=i,e.createStore=c,e.createStoreObject=(...e)=>(ae(0,'createStoreObject','combine'),p(...e)),e.createWatch=({unit:e,fn:t,scope:r})=>{let a=[Oe.run({fn:e=>t(e)})];if(r){let t=i({node:a}),n=e.graphite.id,o=r.additionalLinks,l=o[n]||[];return o[n]=l,l.push(t),k((()=>{let e=l.indexOf(t);-1!==e&&l.splice(e,1),lt(t)}))}{let t=i({node:a,parent:[e],family:{owners:e}});return k((()=>{lt(t)}))}},e.fork=(e,t)=>{let n,o=e;X(e)&&(n=e,o=t);let l=(e=>{let t=i({scope:{defers:[],inFlight:0,fxID:0},node:[$e(((e,t,r)=>{T(r)?'dec'===L(T(r).node,'needFxCounter')?t.inFlight-=1:(t.inFlight+=1,t.fxID+=1):t.fxID+=1})),Me({priority:C,batch:1}),$e(((e,t)=>{let{defers:a,fxID:n}=t;t.inFlight>0||0===a.length||Promise.resolve().then((()=>{t.fxID===n&&r(a.splice(0,a.length),(e=>{Ke(e.parentFork),e.rs(e.value)}))}))}),0,1)]}),a=i({node:[$e(((e,t,r)=>{let a=T(r);if(a){let t=a.node;if(!L(t,'isCombine')||T(a)&&'combine'!==L(T(a).node,'op')){let a=B(r),n=t.scope.state.id,i=L(t,'sid');a.sidIdMap[i]=n,a.sidValuesMap[i]=e;let o=L(t,'serialize');o&&'ignore'!==o&&(a.sidSerializeMap[i]=o.write)}}}))]}),n=i({node:[$e(((e,t,r)=>{let a=B(r);if(a){let e=T(r);e&&(!L(e.node,'isCombine')||T(e)&&'combine'!==L(T(e).node,'op'))&&(a.warnSerialize=1)}}))]}),o={cloneOf:e,reg:{},sidValuesMap:{},sidIdMap:{},sidSerializeMap:{},getState(e){if('current'in e)return Ye(Je,o,null,e).current;let t=E(e);return Ye(Je,o,t,t.scope.state,1).current},kind:M,graphite:i({family:{type:z,links:[t,a,n]},meta:{unit:'fork'},scope:{forkInFlightCounter:t}}),additionalLinks:{},handlers:{},fxCount:t,storeChange:a,warnSerializeNode:n,activeEffects:[]};return o})(n);if(o){let e=o.scope;if(e){let t=e.activeEffects;e.activeEffects=[],l.activeEffects=t,r(t,(e=>e.ref=l))}if(o.values){let e=v(o.values,(e=>a(J(e),'Values map can contain only stores as keys')));Object.assign(l.sidValuesMap,e),l.fromSerialize=!(Array.isArray(o.values)||o.values instanceof Map)}o.handlers&&(l.handlers=v(o.handlers,(e=>a(Q(e),"Handlers map can contain only effects as keys"))))}return l},e.forward=e=>{let t='forward',[{from:r,to:a},n]=f(e,1);return be(r,t,'"from"'),be(a,t,'"to"'),ve(t,a,'to'),st(i({parent:r,child:a,meta:{op:t,config:n},family:{},regional:1}))},e.fromObservable=e=>{ge(e);let t=w in e?e[w]():e;a(t.subscribe,'expect observable to have .subscribe');let r=u(),n=st(r);return t.subscribe({next:r,error:n,complete:n}),r},e.guard=(...e)=>{let[[t,r],a]=f(e);return r||(r=t,t=r.source),y(r,'guard'),St('guard',r.clock,t,r.filter,r.target,null,r.name,a,!r.greedy,0,1)},e.hydrate=(e,{values:t})=>{a(pe(t),'values property should be an object');let r,n,i,l=v(t),s=Object.getOwnPropertyNames(l),f=[],d=[];Y(e)?(r=e,i=1,a(r.cloneOf,'scope should be created from domain'),n=E(r.cloneOf)):X(e)?n=E(e):a(0,'first argument of hydrate should be domain or scope'),b(n,((e,t)=>{if(ee(s,t)){re(f,e);let r=L(e,'serialize');r&&'ignore'!==r&&(l[t]=r.read(l[t])),re(d,l[t])}})),o({target:f,params:d,scope:r}),i&&Object.assign(r.sidValuesMap,l)},e.is=Z,e.launch=o,e.merge=g,e.restore=(e,r,a)=>{if(J(e))return ae(0,'restore($store)'),e;if(K(e)||Q(e)){let t=T(e),n=c(r,{parent:t,name:e.shortName,and:a});return ft(Q(e)?e.doneData:e,n),t&&t.hooks.store(n),n}let n=Array.isArray(e)?[]:{};return t(e,((e,t)=>n[t]=J(e)?e:c(e,{name:t}))),n},e.sample=(...e)=>{let t,r,a,n,[[i,o,l],s]=f(e),d=1;return he(o)&&pe(i)&&y(i,q)&&(o=i.clock,l=i.fn,d=!i.greedy,n=i.filter,t=i.target,r=i.name,a=i.sid,i=i.source),St(q,o,i,n,t,l,r,s,d,1,0,a)},e.scopeBind=(e,{scope:t,safe:r}={})=>{a(t||We||r,'scopeBind cannot be called outside of forked .watch');let n=t||We;return Q(e)?t=>{let r=m();return o({target:e,params:{params:t,req:r},scope:n}),r.req}:t=>(o({target:e,params:t,scope:n}),t)},e.serialize=(e,r={})=>{e.warnSerialize&&console.error('There is a store without sid in this scope, its value is omitted');let n=r.ignore?r.ignore.map((({sid:e})=>e)):[],i={};return t(e.sidValuesMap,((t,r)=>{if(ee(n,r))return;let a=e.sidIdMap[r];i[r]=(e.sidSerializeMap[r]||Mt)(a&&a in e.reg?e.reg[a].current:t)})),'onlyChanges'in r&&!r.onlyChanges&&(a(e.cloneOf,'scope should be created from domain'),b(E(e.cloneOf),((t,r)=>{r in i||ee(n,r)||L(t,'isCombine')||'ignore'===L(t,'serialize')||(i[r]=e.getState(t))}))),i},e.setStoreName=(e,t)=>{e.shortName=t,Object.assign(H(e),s(t,T(e)))},e.split=(...e)=>{let r,n,o='split',[[l,s],c]=f(e),p=!s;p&&(r=l.cases,s=l.match,n=l.clock,l=l.source);let m=J(s),h=!U(s)&&me(s),g=!m&&!h&&pe(s);r||(r={}),p?t(r,((e,t)=>ve(o,e,`cases.${t}`))):(a(g,'match should be an object'),t(s,((e,t)=>r[t]=u({derived:1,and:c}))),r.__=u({derived:1,and:c}));let y,b=new Set([].concat(l,n||[],Object.values(r))),v=Object.keys(m||h?r:s);if(m||h)m&&b.add(s),y=[m&&Ae(_(s),0,1),Me({safe:m,filter:1,pure:!m,fn(e,t,r){let a=String(m?r.a:s(e));zt(t,ee(v,a)?a:'__',e,r)}})];else if(g){let e=Ie({});e.type='shape';let r,a=[];t(s,((t,n)=>{if(U(t)){r=1,re(a,n),b.add(t);let i=ft(t,[],[Ae(e),$e(((e,t,{a:r})=>r[n]=e))]);if(J(t)){e.current[n]=t.getState();let r=_(t);Fe(e,{from:r,field:n,type:'field'}),d('splitMatchStore',r,i)}}})),r&&d('splitBase',e),y=[r&&Ae(e,0,1),Ne(((e,t,r)=>{for(let n=0;n<v.length;n++){let i=v[n];if(ee(a,i)?r.a[i]:s[i](e))return void zt(t,i,e,r)}zt(t,'__',e,r)}),1)]}else a(0,'expect match to be unit, function or object');let k=i({meta:{op:o},parent:n?[]:l,scope:r,node:y,family:{owners:Array.from(b)},regional:1});if(n&&St(o,n,l,null,k,null,o,c,0,0,0),!p)return r},e.step=Oe,e.version="22.4.0",e.withFactory=({sid:e,name:t,loc:r,method:a,fn:o})=>n(i({meta:{sidRoot:de(e),name:t,loc:r,method:a}}),o),e.withRegion=n,Object.defineProperty(e,'__esModule',{value:1})})); | ||
//# sourceMappingURL=effector.umd.js.map |
{ | ||
"name": "effector", | ||
"version": "22.3.0", | ||
"version": "22.4.0", | ||
"description": "Business logic with ease", | ||
@@ -13,2 +13,3 @@ "main": "effector.cjs.js", | ||
".": { | ||
"types": "./index.d.ts", | ||
"import": "./effector.mjs", | ||
@@ -18,4 +19,9 @@ "require": "./effector.cjs.js", | ||
}, | ||
"./effector.mjs": "./effector.mjs", | ||
"./effector.mjs": { | ||
"types": "./effector.mjs.d.ts", | ||
"import": "./effector.mjs", | ||
"default": "./effector.mjs" | ||
}, | ||
"./fork": { | ||
"types": "./fork.d.ts", | ||
"import": "./fork.mjs", | ||
@@ -25,4 +31,12 @@ "require": "./fork.js", | ||
}, | ||
"./compat": "./compat.js", | ||
"./effector.umd": "./effector.umd.js", | ||
"./compat": { | ||
"types": "./compat.d.ts", | ||
"require": "./compat.js", | ||
"default": "./compat.js" | ||
}, | ||
"./effector.umd": { | ||
"types": "./effector.umd.d.ts", | ||
"require": "./effector.umd.js", | ||
"default": "./effector.umd.js" | ||
}, | ||
"./babel-plugin": "./babel-plugin.js", | ||
@@ -29,0 +43,0 @@ "./babel-plugin-react": "./babel-plugin-react.js", |
878
README.md
@@ -0,1 +1,16 @@ | ||
<p align="center"> | ||
<a href="https://effector.dev" target="_blank" rel="noopener noreferrer"> | ||
<img width="180" src="https://raw.githubusercontent.com/effector/effector/master/website/client/static/img/comet.svg" alt="Effector Comet Logo" /> | ||
</a> | ||
</p> | ||
<br /> | ||
<p align="center"> | ||
<a href="https://gitter.im/effector/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge"><img src="https://badges.gitter.im/effector/community.svg" alt="join gitter" /></a> | ||
<a href="https://openbase.com/js/effector?utm_source=embedded&utm_medium=badge&utm_campaign=rate-badge"><img src="https://badges.openbase.com/js/rating/effector.svg" alt="rate on openbase" /></a> | ||
<a href="https://github.com/effector/effector/actions/workflows/tests.yml"><img src="https://github.com/effector/effector/actions/workflows/tests.yml/badge.svg?branch=master" alt="build status" /></a> | ||
<a href="https://discord.gg/t3KkcQdt"><img src="https://img.shields.io/badge/chat-discord-blue?style=flat&logo=discord" alt="discord chat"></a> | ||
<a href="https://www.patreon.com/zero_bias/overview"><img src="https://img.shields.io/badge/become-a%20patron-%23f96854" alt="become a patron" /></a> | ||
</p> | ||
# ☄️ effector | ||
@@ -42,18 +57,53 @@ | ||
with **pnpm** | ||
```sh | ||
npm install effector | ||
pnpm add effector | ||
``` | ||
with **yarn** | ||
```sh | ||
yarn add effector | ||
``` | ||
with **npm** | ||
```sh | ||
npm add effector | ||
``` | ||
**React** | ||
To getting started read our article [how to write React and Typescript application](https://effector.dev/docs/typescript/usage-with-effector-react). | ||
with **pnpm** | ||
```sh | ||
npm install effector effector-react | ||
pnpm add effector effector-react | ||
``` | ||
with **yarn** | ||
```sh | ||
yarn add effector effector-react | ||
``` | ||
with **npm** | ||
```sh | ||
npm add effector effector-react | ||
``` | ||
**Vue** | ||
with **pnpm** | ||
```sh | ||
npm install effector effector-vue | ||
pnpm add effector effector-vue | ||
``` | ||
with **yarn** | ||
```sh | ||
yarn add effector effector-vue | ||
``` | ||
with **npm** | ||
```sh | ||
npm add effector effector-vue | ||
``` | ||
**Svelte** | ||
@@ -65,6 +115,7 @@ | ||
- https://unpkg.com/effector/effector.cjs.js | ||
- https://unpkg.com/effector/effector.mjs | ||
- https://unpkg.com/effector-react/effector-react.cjs.js | ||
- https://unpkg.com/effector-vue/effector-vue.cjs.js | ||
- https://www.jsdelivr.com/package/npm/effector | ||
- https://cdn.jsdelivr.net/npm/effector/effector.cjs.js | ||
- https://cdn.jsdelivr.net/npm/effector/effector.mjs | ||
- https://cdn.jsdelivr.net/npm/effector-react/effector-react.cjs.js | ||
- https://cdn.jsdelivr.net/npm/effector-vue/effector-vue.cjs.js | ||
@@ -77,5 +128,5 @@ ## Documentation | ||
- [effector](https://effector.dev/docs/api/effector/effector) | ||
- [effector-react](https://effector.dev/docs/api/effector-react/effector-react) | ||
- [effector-vue](https://effector.dev/docs/api/effector-vue/effector-vue) | ||
- [effector](https://effector.dev/docs/api/effector) | ||
- [effector-react](https://effector.dev/docs/api/effector-react) | ||
- [effector-vue](https://effector.dev/docs/api/effector-vue) | ||
@@ -99,3 +150,3 @@ ## Articles | ||
- [dev.to](https://dev.to/effector) | ||
- [Gitter](https://gitter.im/effector-js/community) | ||
- [Gitter](https://gitter.im/effector/community) | ||
- [Discord](https://discord.gg/yHcMcuRWeC) | ||
@@ -106,5 +157,5 @@ - Add a [GitHub Topic `effector`](https://github.com/topics/effector) to your project's home page | ||
You can try effector in [our repl](https://share.effector.dev) | ||
You can try effector with [online playground](https://share.effector.dev) | ||
Code sharing, Typescript and react supported out of the box. [REPL repository](https://github.com/effector/repl) | ||
Code sharing, Typescript and react supported out of the box. [Playground repository](https://github.com/effector/repl) | ||
@@ -128,72 +179,747 @@ ## DevTools | ||
More articles about effector at patreon | ||
<a href="https://www.patreon.com/zero_bias/overview"><img src="https://c5.patreon.com/external/logo/become_a_patron_button.png"/></a> | ||
- Read more articles on [a patreon page](https://www.patreon.com/zero_bias/overview) | ||
- Donate [on OpenCollective](https://opencollective.com/effector) | ||
- Be a sponsor [on Github Sponsors](https://github.com/sponsors/effector) | ||
[![Rate on Openbase](https://badges.openbase.com/js/rating/effector.svg)](https://openbase.com/js/effector?utm_source=embedded&utm_medium=badge&utm_campaign=rate-badge) | ||
Your support allows us to improve the developer experience 🧡. | ||
## Contributors | ||
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --> | ||
<!-- prettier-ignore-start --> | ||
<!-- markdownlint-disable --> | ||
<table> | ||
<tr> | ||
<td align="center"><a href="https://zerobias.net"><img src="https://avatars0.githubusercontent.com/u/15912112?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Dmitry</b></sub></a><br /><a href="#question-zerobias" title="Answering Questions">💬</a> <a href="https://github.com/effector/effector/commits?author=zerobias" title="Code">💻</a> <a href="https://github.com/effector/effector/commits?author=zerobias" title="Documentation">📖</a> <a href="#example-zerobias" title="Examples">💡</a> <a href="#ideas-zerobias" title="Ideas, Planning, & Feedback">🤔</a> <a href="#infra-zerobias" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="https://github.com/effector/effector/commits?author=zerobias" title="Tests">⚠️</a></td> | ||
<td align="center"><a href="https://github.com/goodmind"><img src="https://avatars2.githubusercontent.com/u/3275424?v=4?s=100" width="100px;" alt=""/><br /><sub><b>andretshurotshka</b></sub></a><br /><a href="#question-goodmind" title="Answering Questions">💬</a> <a href="https://github.com/effector/effector/commits?author=goodmind" title="Code">💻</a> <a href="https://github.com/effector/effector/commits?author=goodmind" title="Documentation">📖</a> <a href="#platform-goodmind" title="Packaging/porting to new platform">📦</a> <a href="https://github.com/effector/effector/commits?author=goodmind" title="Tests">⚠️</a></td> | ||
<td align="center"><a href="https://sergeysova.com"><img src="https://avatars0.githubusercontent.com/u/5620073?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Sergey Sova</b></sub></a><br /><a href="https://github.com/effector/effector/commits?author=sergeysova" title="Documentation">📖</a> <a href="#example-sergeysova" title="Examples">💡</a> <a href="https://github.com/effector/effector/commits?author=sergeysova" title="Code">💻</a> <a href="https://github.com/effector/effector/commits?author=sergeysova" title="Tests">⚠️</a> <a href="#ideas-sergeysova" title="Ideas, Planning, & Feedback">🤔</a></td> | ||
<td align="center"><a href="https://t.me/artalar"><img src="https://avatars0.githubusercontent.com/u/27290320?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Arutyunyan Artyom</b></sub></a><br /><a href="https://github.com/effector/effector/commits?author=artalar" title="Documentation">📖</a> <a href="#example-artalar" title="Examples">💡</a></td> | ||
<td align="center"><a href="https://github.com/Komar0ff"><img src="https://avatars2.githubusercontent.com/u/10588170?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Ilya</b></sub></a><br /><a href="https://github.com/effector/effector/commits?author=Komar0ff" title="Documentation">📖</a></td> | ||
<td align="center"><a href="https://github.com/dpr-dev"><img src="https://avatars3.githubusercontent.com/u/23157659?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Arthur Irgashev</b></sub></a><br /><a href="https://github.com/effector/effector/commits?author=dpr-dev" title="Documentation">📖</a> <a href="https://github.com/effector/effector/commits?author=dpr-dev" title="Code">💻</a> <a href="#example-dpr-dev" title="Examples">💡</a></td> | ||
<td align="center"><a href="https://github.com/hexagon141"><img src="https://avatars0.githubusercontent.com/u/15704394?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Igor Ryzhov</b></sub></a><br /><a href="https://github.com/effector/effector/commits?author=hexagon141" title="Documentation">📖</a> <a href="https://github.com/effector/effector/commits?author=hexagon141" title="Code">💻</a> <a href="#example-hexagon141" title="Examples">💡</a></td> | ||
</tr> | ||
<tr> | ||
<td align="center"><img src="https://avatars1.githubusercontent.com/u/22044607?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Egor Guscha</b></sub><br /><a href="https://github.com/effector/effector/commits?author=egorguscha" title="Documentation">📖</a></td> | ||
<td align="center"><img src="https://avatars0.githubusercontent.com/u/47696795?v=4?s=100" width="100px;" alt=""/><br /><sub><b>bakugod</b></sub><br /><a href="https://github.com/effector/effector/commits?author=bakugod" title="Documentation">📖</a> <a href="#example-bakugod" title="Examples">💡</a></td> | ||
<td align="center"><img src="https://avatars0.githubusercontent.com/u/29141708?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Ruslan</b></sub><br /><a href="https://github.com/effector/effector/commits?author=doasync" title="Documentation">📖</a> <a href="https://github.com/effector/effector/commits?author=doasync" title="Code">💻</a> <a href="#ideas-doasync" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/effector/effector/commits?author=doasync" title="Tests">⚠️</a></td> | ||
<td align="center"><img src="https://avatars2.githubusercontent.com/u/7874664?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Maxim Alyoshin</b></sub><br /><a href="https://github.com/effector/effector/commits?author=mg901" title="Documentation">📖</a></td> | ||
<td align="center"><img src="https://avatars0.githubusercontent.com/u/25362218?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Andrey Gopienko</b></sub><br /><a href="https://github.com/effector/effector/commits?author=tehSLy" title="Documentation">📖</a></td> | ||
<td align="center"><img src="https://avatars2.githubusercontent.com/u/13759065?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Vadim Ivanov</b></sub><br /><a href="https://github.com/effector/effector/commits?author=ivanov-v" title="Documentation">📖</a></td> | ||
<td align="center"><img src="https://avatars3.githubusercontent.com/u/14825383?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Aleksandr Anokhin</b></sub><br /><a href="https://github.com/effector/effector/commits?author=sanohin" title="Code">💻</a></td> | ||
</tr> | ||
<tr> | ||
<td align="center"><img src="https://avatars2.githubusercontent.com/u/4208480?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Anton Kosykh</b></sub><br /><a href="https://github.com/effector/effector/commits?author=Kelin2025" title="Code">💻</a></td> | ||
<td align="center"><img src="https://avatars0.githubusercontent.com/u/1109562?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Konstantin Lebedev</b></sub><br /><a href="#example-RubaXa" title="Examples">💡</a></td> | ||
<td align="center"><img src="https://avatars3.githubusercontent.com/u/1121997?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Pavel Tereschenko</b></sub><br /><a href="https://github.com/effector/effector/commits?author=bigslycat" title="Code">💻</a></td> | ||
<td align="center"><img src="https://avatars2.githubusercontent.com/u/29819102?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Satya Rohith</b></sub><br /><a href="https://github.com/effector/effector/commits?author=satyarohith" title="Documentation">📖</a></td> | ||
<td align="center"><img src="https://avatars1.githubusercontent.com/u/13378944?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Vladislav Melnikov</b></sub><br /><a href="https://github.com/effector/effector/commits?author=vladmelnikov" title="Code">💻</a></td> | ||
<td align="center"><img src="https://avatars3.githubusercontent.com/u/15311091?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Grigory Zaripov</b></sub><br /><a href="https://github.com/effector/effector/commits?author=gzaripov" title="Code">💻</a></td> | ||
<td align="center"><img src="https://avatars1.githubusercontent.com/u/37388187?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Marina Miyaoka</b></sub><br /><a href="https://github.com/effector/effector/commits?author=miyaokamarina" title="Code">💻</a></td> | ||
</tr> | ||
<tr> | ||
<td align="center"><img src="https://avatars2.githubusercontent.com/u/35740512?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Evgeny Zakharov</b></sub><br /><a href="https://github.com/effector/effector/commits?author=risenforces" title="Documentation">📖</a></td> | ||
<td align="center"><a href="http://bloadvenro.ru"><img src="https://avatars1.githubusercontent.com/u/11679418?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Viktor</b></sub></a><br /><a href="https://github.com/effector/effector/commits?author=bloadvenro" title="Code">💻</a> <a href="https://github.com/effector/effector/commits?author=bloadvenro" title="Documentation">📖</a> <a href="https://github.com/effector/effector/commits?author=bloadvenro" title="Tests">⚠️</a> <a href="#ideas-bloadvenro" title="Ideas, Planning, & Feedback">🤔</a></td> | ||
<td align="center"><a href="https://github.com/abliarsar"><img src="https://avatars3.githubusercontent.com/u/9501504?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Ivan Savichev</b></sub></a><br /><a href="https://github.com/effector/effector/commits?author=abliarsar" title="Code">💻</a> <a href="#ideas-abliarsar" title="Ideas, Planning, & Feedback">🤔</a></td> | ||
<td align="center"><a href="http://vk.com/dimensi"><img src="https://avatars0.githubusercontent.com/u/11390039?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Nikita Nafranets</b></sub></a><br /><a href="https://github.com/effector/effector/commits?author=dimensi" title="Documentation">📖</a> <a href="#example-dimensi" title="Examples">💡</a></td> | ||
<td align="center"><a href="https://github.com/Tauka"><img src="https://avatars3.githubusercontent.com/u/15087247?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Tauyekel Kunzhol</b></sub></a><br /><a href="https://github.com/effector/effector/commits?author=Tauka" title="Documentation">📖</a></td> | ||
<td align="center"><a href="https://github.com/Laiff"><img src="https://avatars0.githubusercontent.com/u/575885?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Andrew Laiff</b></sub></a><br /><a href="https://github.com/effector/effector/commits?author=Laiff" title="Documentation">📖</a></td> | ||
<td align="center"><a href="https://github.com/ilajosmanov"><img src="https://avatars3.githubusercontent.com/u/18512404?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Illia Osmanov</b></sub></a><br /><a href="https://github.com/effector/effector/commits?author=ilajosmanov" title="Code">💻</a> <a href="#ideas-ilajosmanov" title="Ideas, Planning, & Feedback">🤔</a></td> | ||
</tr> | ||
<tr> | ||
<td align="center"><a href="https://github.com/YanLobat"><img src="https://avatars3.githubusercontent.com/u/5307423?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Yan</b></sub></a><br /><a href="https://github.com/effector/effector/commits?author=YanLobat" title="Documentation">📖</a></td> | ||
<td align="center"><a href="https://github.com/egaris"><img src="https://avatars2.githubusercontent.com/u/5036934?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Egor Aristov</b></sub></a><br /><a href="https://github.com/effector/effector/commits?author=egaris" title="Documentation">📖</a></td> | ||
<td align="center"><a href="https://github.com/Sozonov"><img src="https://avatars2.githubusercontent.com/u/1931637?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Sozonov</b></sub></a><br /><a href="https://github.com/effector/effector/commits?author=Sozonov" title="Documentation">📖</a></td> | ||
<td align="center"><a href="https://github.com/Fl0pZz"><img src="https://avatars2.githubusercontent.com/u/9510124?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Rafael Fakhreev</b></sub></a><br /><a href="https://github.com/effector/effector/commits?author=Fl0pZz" title="Code">💻</a> <a href="#ideas-Fl0pZz" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/effector/effector/commits?author=Fl0pZz" title="Tests">⚠️</a></td> | ||
<td align="center"><a href="https://github.com/yumauri"><img src="https://avatars0.githubusercontent.com/u/6583994?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Victor</b></sub></a><br /><a href="https://github.com/effector/effector/commits?author=yumauri" title="Code">💻</a> <a href="#ideas-yumauri" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/effector/effector/commits?author=yumauri" title="Documentation">📖</a></td> | ||
<td align="center"><a href="https://github.com/zarabotaet"><img src="https://avatars0.githubusercontent.com/u/15930980?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Dmitrij Shuleshov</b></sub></a><br /><a href="https://github.com/effector/effector/commits?author=zarabotaet" title="Documentation">📖</a></td> | ||
<td align="center"><a href="https://github.com/kobzarvs"><img src="https://avatars3.githubusercontent.com/u/1615093?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Valeriy Kobzar</b></sub></a><br /><a href="https://github.com/effector/effector/commits?author=kobzarvs" title="Code">💻</a> <a href="#infra-kobzarvs" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="#ideas-kobzarvs" title="Ideas, Planning, & Feedback">🤔</a></td> | ||
</tr> | ||
<tr> | ||
<td align="center"><a href="https://github.com/Spoki4"><img src="https://avatars3.githubusercontent.com/u/2562688?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Ivan</b></sub></a><br /><a href="https://github.com/effector/effector/commits?author=Spoki4" title="Code">💻</a> <a href="https://github.com/effector/effector/commits?author=Spoki4" title="Tests">⚠️</a></td> | ||
<td align="center"><a href="https://github.com/oas89"><img src="https://avatars1.githubusercontent.com/u/5285065?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Aleksandr Osipov</b></sub></a><br /><a href="https://github.com/effector/effector/commits?author=oas89" title="Documentation">📖</a> <a href="https://github.com/effector/effector/commits?author=oas89" title="Tests">⚠️</a></td> | ||
<td align="center"><a href="https://github.com/popuguytheparrot"><img src="https://avatars1.githubusercontent.com/u/19804652?v=4?s=100" width="100px;" alt=""/><br /><sub><b>popuguy</b></sub></a><br /><a href="https://github.com/effector/effector/commits?author=popuguytheparrot" title="Documentation">📖</a> <a href="#infra-popuguytheparrot" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="#ideas-popuguytheparrot" title="Ideas, Planning, & Feedback">🤔</a></td> | ||
<td align="center"><a href="https://github.com/uulaal"><img src="https://avatars.githubusercontent.com/u/38786565?v=4?s=100" width="100px;" alt=""/><br /><sub><b>uulaal</b></sub></a><br /><a href="https://github.com/effector/effector/commits?author=uulaal" title="Code">💻</a></td> | ||
<td align="center"><a href="https://binjo.ru/"><img src="https://avatars.githubusercontent.com/u/8722478?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Viktor Pasynok</b></sub></a><br /><a href="#infra-binjospookie" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="https://github.com/effector/effector/commits?author=binjospookie" title="Code">💻</a> <a href="https://github.com/effector/effector/commits?author=binjospookie" title="Tests">⚠️</a></td> | ||
</tr> | ||
<tr> | ||
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0"> | ||
<a href=https://github.com/zerobias> | ||
<img src=https://avatars.githubusercontent.com/u/15912112?v=4 width="100;" alt=Dmitry/> | ||
<br /> | ||
<sub style="font-size:14px"><b>Dmitry</b></sub> | ||
</a> | ||
</td> | ||
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0"> | ||
<a href=https://github.com/goodmind> | ||
<img src=https://avatars.githubusercontent.com/u/3275424?v=4 width="100;" alt=andretshurotshka/> | ||
<br /> | ||
<sub style="font-size:14px"><b>andretshurotshka</b></sub> | ||
</a> | ||
</td> | ||
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0"> | ||
<a href=https://github.com/sergeysova> | ||
<img src=https://avatars.githubusercontent.com/u/5620073?v=4 width="100;" alt=Sergey Sova/> | ||
<br /> | ||
<sub style="font-size:14px"><b>Sergey Sova</b></sub> | ||
</a> | ||
</td> | ||
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0"> | ||
<a href=https://github.com/popuguytheparrot> | ||
<img src=https://avatars.githubusercontent.com/u/19804652?v=4 width="100;" alt=popuguy/> | ||
<br /> | ||
<sub style="font-size:14px"><b>popuguy</b></sub> | ||
</a> | ||
</td> | ||
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0"> | ||
<a href=https://github.com/egorguscha> | ||
<img src=https://avatars.githubusercontent.com/u/22044607?v=4 width="100;" alt=Egor/> | ||
<br /> | ||
<sub style="font-size:14px"><b>Egor</b></sub> | ||
</a> | ||
</td> | ||
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0"> | ||
<a href=https://github.com/AlexandrHoroshih> | ||
<img src=https://avatars.githubusercontent.com/u/32790736?v=4 width="100;" alt=Alexander Khoroshikh/> | ||
<br /> | ||
<sub style="font-size:14px"><b>Alexander Khoroshikh</b></sub> | ||
</a> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0"> | ||
<a href=https://github.com/kobzarvs> | ||
<img src=https://avatars.githubusercontent.com/u/1615093?v=4 width="100;" alt=Valeriy Kobzar/> | ||
<br /> | ||
<sub style="font-size:14px"><b>Valeriy Kobzar</b></sub> | ||
</a> | ||
</td> | ||
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0"> | ||
<a href=https://github.com/doasync> | ||
<img src=https://avatars.githubusercontent.com/u/29141708?v=4 width="100;" alt=Ruslan @doasync/> | ||
<br /> | ||
<sub style="font-size:14px"><b>Ruslan @doasync</b></sub> | ||
</a> | ||
</td> | ||
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0"> | ||
<a href=https://github.com/ilajosmanov> | ||
<img src=https://avatars.githubusercontent.com/u/18512404?v=4 width="100;" alt=Illia Osmanov/> | ||
<br /> | ||
<sub style="font-size:14px"><b>Illia Osmanov</b></sub> | ||
</a> | ||
</td> | ||
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0"> | ||
<a href=https://github.com/igorkamyshev> | ||
<img src=https://avatars.githubusercontent.com/u/26767722?v=4 width="100;" alt=Igor Kamyşev/> | ||
<br /> | ||
<sub style="font-size:14px"><b>Igor Kamyşev</b></sub> | ||
</a> | ||
</td> | ||
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0"> | ||
<a href=https://github.com/YanLobat> | ||
<img src=https://avatars.githubusercontent.com/u/5307423?v=4 width="100;" alt=Yan/> | ||
<br /> | ||
<sub style="font-size:14px"><b>Yan</b></sub> | ||
</a> | ||
</td> | ||
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0"> | ||
<a href=https://github.com/mg901> | ||
<img src=https://avatars.githubusercontent.com/u/7874664?v=4 width="100;" alt=Maxim/> | ||
<br /> | ||
<sub style="font-size:14px"><b>Maxim</b></sub> | ||
</a> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0"> | ||
<a href=https://github.com/hexagon141> | ||
<img src=https://avatars.githubusercontent.com/u/15704394?v=4 width="100;" alt=Igor Ryzhov/> | ||
<br /> | ||
<sub style="font-size:14px"><b>Igor Ryzhov</b></sub> | ||
</a> | ||
</td> | ||
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0"> | ||
<a href=https://github.com/dpr-dev> | ||
<img src=https://avatars.githubusercontent.com/u/23157659?v=4 width="100;" alt=Arthur Irgashev/> | ||
<br /> | ||
<sub style="font-size:14px"><b>Arthur Irgashev</b></sub> | ||
</a> | ||
</td> | ||
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0"> | ||
<a href=https://github.com/bloadvenro> | ||
<img src=https://avatars.githubusercontent.com/u/11679418?v=4 width="100;" alt=Viktor/> | ||
<br /> | ||
<sub style="font-size:14px"><b>Viktor</b></sub> | ||
</a> | ||
</td> | ||
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0"> | ||
<a href=https://github.com/Komar0ff> | ||
<img src=https://avatars.githubusercontent.com/u/10588170?v=4 width="100;" alt=Ilya/> | ||
<br /> | ||
<sub style="font-size:14px"><b>Ilya</b></sub> | ||
</a> | ||
</td> | ||
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0"> | ||
<a href=https://github.com/artalar> | ||
<img src=https://avatars.githubusercontent.com/u/27290320?v=4 width="100;" alt=Arutiunian Artem/> | ||
<br /> | ||
<sub style="font-size:14px"><b>Arutiunian Artem</b></sub> | ||
</a> | ||
</td> | ||
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0"> | ||
<a href=https://github.com/zarabotaet> | ||
<img src=https://avatars.githubusercontent.com/u/15930980?v=4 width="100;" alt=Dmitrij Shuleshov/> | ||
<br /> | ||
<sub style="font-size:14px"><b>Dmitrij Shuleshov</b></sub> | ||
</a> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0"> | ||
<a href=https://github.com/dimensi> | ||
<img src=https://avatars.githubusercontent.com/u/11390039?v=4 width="100;" alt=Nikita Nafranets/> | ||
<br /> | ||
<sub style="font-size:14px"><b>Nikita Nafranets</b></sub> | ||
</a> | ||
</td> | ||
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0"> | ||
<a href=https://github.com/abliarsar> | ||
<img src=https://avatars.githubusercontent.com/u/9501504?v=4 width="100;" alt=Ivan Savichev/> | ||
<br /> | ||
<sub style="font-size:14px"><b>Ivan Savichev</b></sub> | ||
</a> | ||
</td> | ||
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0"> | ||
<a href=https://github.com/oas89> | ||
<img src=https://avatars.githubusercontent.com/u/5285065?v=4 width="100;" alt=Aleksandr Osipov/> | ||
<br /> | ||
<sub style="font-size:14px"><b>Aleksandr Osipov</b></sub> | ||
</a> | ||
</td> | ||
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0"> | ||
<a href=https://github.com/bakugod> | ||
<img src=https://avatars.githubusercontent.com/u/47696795?v=4 width="100;" alt=bakugod/> | ||
<br /> | ||
<sub style="font-size:14px"><b>bakugod</b></sub> | ||
</a> | ||
</td> | ||
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0"> | ||
<a href=https://github.com/victordidenko> | ||
<img src=https://avatars.githubusercontent.com/u/15016227?v=4 width="100;" alt=Victor Didenko/> | ||
<br /> | ||
<sub style="font-size:14px"><b>Victor Didenko</b></sub> | ||
</a> | ||
</td> | ||
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0"> | ||
<a href=https://github.com/binjospookie> | ||
<img src=https://avatars.githubusercontent.com/u/8722478?v=4 width="100;" alt=Viktor Pasynok/> | ||
<br /> | ||
<sub style="font-size:14px"><b>Viktor Pasynok</b></sub> | ||
</a> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0"> | ||
<a href=https://github.com/tehSLy> | ||
<img src=https://avatars.githubusercontent.com/u/25362218?v=4 width="100;" alt=Andrei/> | ||
<br /> | ||
<sub style="font-size:14px"><b>Andrei</b></sub> | ||
</a> | ||
</td> | ||
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0"> | ||
<a href=https://github.com/Drevoed> | ||
<img src=https://avatars.githubusercontent.com/u/53709100?v=4 width="100;" alt=Kirill Mironov/> | ||
<br /> | ||
<sub style="font-size:14px"><b>Kirill Mironov</b></sub> | ||
</a> | ||
</td> | ||
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0"> | ||
<a href=https://github.com/Spoki4> | ||
<img src=https://avatars.githubusercontent.com/u/2562688?v=4 width="100;" alt=Ivan/> | ||
<br /> | ||
<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/belovsandr> | ||
<img src=https://avatars.githubusercontent.com/u/16794134?v=4 width="100;" alt=Aleksandr Belov/> | ||
<br /> | ||
<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/yurovant> | ||
<img src=https://avatars.githubusercontent.com/u/11337124?v=4 width="100;" alt=Anton Yurovskykh/> | ||
<br /> | ||
<sub style="font-size:14px"><b>Anton Yurovskykh</b></sub> | ||
</a> | ||
</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/> | ||
<br /> | ||
<sub style="font-size:14px"><b>Denis Sikuler</b></sub> | ||
</a> | ||
</td> | ||
</tr> | ||
<tr> | ||
<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/> | ||
<br /> | ||
<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/TngSam> | ||
<img src=https://avatars.githubusercontent.com/u/25546058?v=4 width="100;" alt=Samir/> | ||
<br /> | ||
<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/Sozonov> | ||
<img src=https://avatars.githubusercontent.com/u/1931637?v=4 width="100;" alt=Sozonov/> | ||
<br /> | ||
<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/enomado> | ||
<img src=https://avatars.githubusercontent.com/u/707007?v=4 width="100;" alt=Stanislav/> | ||
<br /> | ||
<sub style="font-size:14px"><b>Stanislav</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/> | ||
<br /> | ||
<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/aldibatyr> | ||
<img src=https://avatars.githubusercontent.com/u/47831819?v=4 width="100;" alt=Aldiyar Batyrbekov/> | ||
<br /> | ||
<sub style="font-size:14px"><b>Aldiyar Batyrbekov</b></sub> | ||
</a> | ||
</td> | ||
</tr> | ||
<tr> | ||
<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/> | ||
<br /> | ||
<sub style="font-size:14px"><b>cqh</b></sub> | ||
</a> | ||
</td> | ||
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0"> | ||
<a href=https://github.com/ivanov-v> | ||
<img src=https://avatars.githubusercontent.com/u/13759065?v=4 width="100;" alt=Ivanov Vadim/> | ||
<br /> | ||
<sub style="font-size:14px"><b>Ivanov Vadim</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/> | ||
<br /> | ||
<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/Laiff> | ||
<img src=https://avatars.githubusercontent.com/u/575885?v=4 width="100;" alt=Andrey Antropov/> | ||
<br /> | ||
<sub style="font-size:14px"><b>Andrey Antropov</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/> | ||
<br /> | ||
<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/7iomka> | ||
<img src=https://avatars.githubusercontent.com/u/18473137?v=4 width="100;" alt=7iomka/> | ||
<br /> | ||
<sub style="font-size:14px"><b>7iomka</b></sub> | ||
</a> | ||
</td> | ||
</tr> | ||
<tr> | ||
<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/> | ||
<br /> | ||
<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/domosedov> | ||
<img src=https://avatars.githubusercontent.com/u/42298502?v=4 width="100;" alt=Aleksandr Grigorii/> | ||
<br /> | ||
<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/yialo> | ||
<img src=https://avatars.githubusercontent.com/u/38593881?v=4 width="100;" alt=Alex Arro/> | ||
<br /> | ||
<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/alexey-pd> | ||
<img src=https://avatars.githubusercontent.com/u/12380196?v=4 width="100;" alt=Aleksei Pudnikov/> | ||
<br /> | ||
<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/sanohin> | ||
<img src=https://avatars.githubusercontent.com/u/14825383?v=4 width="100;" alt=Alek Anokhin/> | ||
<br /> | ||
<sub style="font-size:14px"><b>Alek Anokhin</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/> | ||
<br /> | ||
<sub style="font-size:14px"><b>Alexander</b></sub> | ||
</a> | ||
</td> | ||
</tr> | ||
<tr> | ||
<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/> | ||
<br /> | ||
<sub style="font-size:14px"><b>Alexandrsv</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/> | ||
<br /> | ||
<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/rymarchikbot> | ||
<img src=https://avatars.githubusercontent.com/u/43807162?v=4 width="100;" alt=rymarchikbot/> | ||
<br /> | ||
<sub style="font-size:14px"><b>rymarchikbot</b></sub> | ||
</a> | ||
</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/> | ||
<br /> | ||
<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/hyposlasher> | ||
<img src=https://avatars.githubusercontent.com/u/13961762?v=4 width="100;" alt=Denis Maushov/> | ||
<br /> | ||
<sub style="font-size:14px"><b>Denis Maushov</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/> | ||
<br /> | ||
<sub style="font-size:14px"><b>Denis Skiba</b></sub> | ||
</a> | ||
</td> | ||
</tr> | ||
<tr> | ||
<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/> | ||
<br /> | ||
<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/edprince> | ||
<img src=https://avatars.githubusercontent.com/u/7027089?v=4 width="100;" alt=Ed Prince/> | ||
<br /> | ||
<sub style="font-size:14px"><b>Ed Prince</b></sub> | ||
</a> | ||
</td> | ||
<td align="center" style="word-wrap: break-word; width: 150.0; height: 150.0"> | ||
<a href=https://github.com/kubk> | ||
<img src=https://avatars.githubusercontent.com/u/22447849?v=4 width="100;" alt=Egor Gorbachev/> | ||
<br /> | ||
<sub style="font-size:14px"><b>Egor Gorbachev</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/> | ||
<br /> | ||
<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/newbornfrontender> | ||
<img src=https://avatars.githubusercontent.com/u/34810942?v=4 width="100;" alt=Infant Frontender/> | ||
<br /> | ||
<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/vanpav> | ||
<img src=https://avatars.githubusercontent.com/u/2944759?v=4 width="100;" alt=Ivan/> | ||
<br /> | ||
<sub style="font-size:14px"><b>Ivan</b></sub> | ||
</a> | ||
</td> | ||
</tr> | ||
<tr> | ||
<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/> | ||
<br /> | ||
<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/jsejcksn> | ||
<img src=https://avatars.githubusercontent.com/u/868251?v=4 width="100;" alt=Jesse Jackson/> | ||
<br /> | ||
<sub style="font-size:14px"><b>Jesse Jackson</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/> | ||
<br /> | ||
<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/Kurzdor> | ||
<img src=https://avatars.githubusercontent.com/u/19878951?v=4 width="100;" alt=Paul Ekshmidt/> | ||
<br /> | ||
<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/RubaXa> | ||
<img src=https://avatars.githubusercontent.com/u/1109562?v=4 width="100;" alt=Lebedev Konstantin/> | ||
<br /> | ||
<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/lud> | ||
<img src=https://avatars.githubusercontent.com/u/637632?v=4 width="100;" alt=Ludovic Dem/> | ||
<br /> | ||
<sub style="font-size:14px"><b>Ludovic Dem</b></sub> | ||
</a> | ||
</td> | ||
</tr> | ||
<tr> | ||
<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/> | ||
<br /> | ||
<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/olejech> | ||
<img src=https://avatars.githubusercontent.com/u/64708593?v=4 width="100;" alt=Oleg/> | ||
<br /> | ||
<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/OlegBrony> | ||
<img src=https://avatars.githubusercontent.com/u/19880334?v=4 width="100;" alt=Oleh/> | ||
<br /> | ||
<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> | ||
<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/> | ||
<br /> | ||
<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/rachaeldawn> | ||
<img src=https://avatars.githubusercontent.com/u/7696498?v=4 width="100;" alt=Rachael Dawn/> | ||
<br /> | ||
<sub style="font-size:14px"><b>Rachael Dawn</b></sub> | ||
</a> | ||
</td> | ||
</tr> | ||
<tr> | ||
<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/> | ||
<br /> | ||
<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/raidenmiro> | ||
<img src=https://avatars.githubusercontent.com/u/82271383?v=4 width="100;" alt=Robert Kuzhin/> | ||
<br /> | ||
<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/satyarohith> | ||
<img src=https://avatars.githubusercontent.com/u/29819102?v=4 width="100;" alt=Satya Rohith/> | ||
<br /> | ||
<sub style="font-size:14px"><b>Satya Rohith</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/> | ||
<br /> | ||
<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/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>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/usmanyunusov> | ||
<img src=https://avatars.githubusercontent.com/u/28816324?v=4 width="100;" alt=Usman Yunusov/> | ||
<br /> | ||
<sub style="font-size:14px"><b>Usman Yunusov</b></sub> | ||
</a> | ||
</td> | ||
</tr> | ||
<tr> | ||
<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/> | ||
<br /> | ||
<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/vsviridov> | ||
<img src=https://avatars.githubusercontent.com/u/221684?v=4 width="100;" alt=Vasili Sviridov/> | ||
<br /> | ||
<sub style="font-size:14px"><b>Vasili Sviridov</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/> | ||
<br /> | ||
<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/yumauri> | ||
<img src=https://avatars.githubusercontent.com/u/6583994?v=4 width="100;" alt=Victor/> | ||
<br /> | ||
<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/VictorKolb> | ||
<img src=https://avatars.githubusercontent.com/u/14196649?v=4 width="100;" alt=Victor Kolb/> | ||
<br /> | ||
<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/Victor-Nikliaiev> | ||
<img src=https://avatars.githubusercontent.com/u/62945733?v=4 width="100;" alt=Vic/> | ||
<br /> | ||
<sub style="font-size:14px"><b>Vic</b></sub> | ||
</a> | ||
</td> | ||
</tr> | ||
<tr> | ||
<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/> | ||
<br /> | ||
<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/darky> | ||
<img src=https://avatars.githubusercontent.com/u/1832800?v=4 width="100;" alt=Vladislav Botvin/> | ||
<br /> | ||
<sub style="font-size:14px"><b>Vladislav Botvin</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/> | ||
<br /> | ||
<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/WoodenPC> | ||
<img src=https://avatars.githubusercontent.com/u/25397745?v=4 width="100;" alt=Rasul /> | ||
<br /> | ||
<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/bonkboykz> | ||
<img src=https://avatars.githubusercontent.com/u/4549476?v=4 width="100;" alt=Yesset/> | ||
<br /> | ||
<sub style="font-size:14px"><b>Yesset</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/> | ||
<br /> | ||
<sub style="font-size:14px"><b>Anatoly Kopyl</b></sub> | ||
</a> | ||
</td> | ||
</tr> | ||
<tr> | ||
<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/> | ||
<br /> | ||
<sub style="font-size:14px"><b>Stanislav</b></sub> | ||
</a> | ||
</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/> | ||
<br /> | ||
<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/gzaripov> | ||
<img src=https://avatars.githubusercontent.com/u/15311091?v=4 width="100;" alt=Grigory Zaripov/> | ||
<br /> | ||
<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/nonzzz> | ||
<img src=https://avatars.githubusercontent.com/u/52351095?v=4 width="100;" alt=kanno/> | ||
<br /> | ||
<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/leushkin> | ||
<img src=https://avatars.githubusercontent.com/u/26031322?v=4 width="100;" alt=Kirill Leushkin/> | ||
<br /> | ||
<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/miyaokamarina> | ||
<img src=https://avatars.githubusercontent.com/u/37388187?v=4 width="100;" alt=Marina Miyaoka/> | ||
<br /> | ||
<sub style="font-size:14px"><b>Marina Miyaoka</b></sub> | ||
</a> | ||
</td> | ||
</tr> | ||
<tr> | ||
<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/> | ||
<br /> | ||
<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/risenforces> | ||
<img src=https://avatars.githubusercontent.com/u/35740512?v=4 width="100;" alt=Evgeny Zakharov/> | ||
<br /> | ||
<sub style="font-size:14px"><b>Evgeny Zakharov</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/> | ||
<br /> | ||
<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/xxxxue> | ||
<img src=https://avatars.githubusercontent.com/u/32764266?v=4 width="100;" alt=xxxxue/> | ||
<br /> | ||
<sub style="font-size:14px"><b>xxxxue</b></sub> | ||
</a> | ||
</td> | ||
</tr> | ||
</table> | ||
<!-- markdownlint-restore --> | ||
<!-- prettier-ignore-end --> | ||
<!-- ALL-CONTRIBUTORS-LIST:END --> | ||
[![Tested with browserstack](https://raw.githubusercontent.com/effector/effector/master/website/media/Browserstack-logo.svg?sanitize=true)](https://BrowserStack.com) |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1338840
16510
920