exports.initStore=function(e){void 0===e&&(e={}),("undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})._BAZAR_STORE_={},_BAZAR_STORE_.initial={};var n=Object.keys(e);n.length>0&&n.forEach(function(n){_BAZAR_STORE_.initial[n]=e[n]})},exports.initState=function(e){return(_BAZAR_STORE_.initial||{})[e]},exports.getState=function(e){var n=(_BAZAR_STORE_[e]||{}).sync;return n?n():void 0},exports.register=function(e){var n=e.id,i=e.willRerender;if(void 0===i&&(i=!1),!n)throw new Error("Expected non-null id");if(_BAZAR_STORE_.hasOwnProperty(n)&&!i)throw new Error("Expected unique id");_BAZAR_STORE_[n]=Object.assign({},e)},exports.edict=function(e){var n=_BAZAR_STORE_[e].sync;if(!n)throw new Error("Sync is required to issue an edict");var i=n();Object.keys(_BAZAR_STORE_).forEach(function(n){if(-1!==(_BAZAR_STORE_[n].interests||[]).indexOf(e)){var t=_BAZAR_STORE_[n].onEdict;if(!t)throw new Error("Triggering undefined onEdict on "+n);t(e,i)}})},exports.poke=function(e,n){var i=(_BAZAR_STORE_[e]||{}).onPoke;if(!i)throw new Error("Poking component without onPoke method");i(n)};
