UNPKG

@stories-js/core

Version:

Stories web components to build stories

5 lines 1.59 kB
/*! * (C) StoriesJS https://storiesjs.org - GPL-2.0 License */ System.register(["./p-6a7c8a99.system.js"],(function(t){"use strict";var e;return{setters:[function(t){e=t.m}],execute:function(){t("a",c);var r=t("A","ACTION_EVENT");var n=t("D",{clearOnStoryChange:true,limit:50});var o=function(t,e){var r=Object.getPrototypeOf(t);if(!r||e(r))return r;return o(r,e)};var a=function(t){return Boolean(typeof t==="object"&&t&&o(t,(function(t){return/^Synthetic(?:Base)?Event$/.test(t.constructor.name)}))&&typeof t.persist==="function")};var i=function(t){if(a(t)){var e=Object.create(t.constructor.prototype,Object.getOwnPropertyDescriptors(t));e.persist();var r=Object.getOwnPropertyDescriptor(e,"view");var n=r===null||r===void 0?void 0:r.value;if(typeof n==="object"&&(n===null||n===void 0?void 0:n.constructor.name)==="Window"){Object.defineProperty(e,"view",Object.assign(Object.assign({},r),{value:Object.create(n.constructor.prototype)}))}return e}return t};function c(t,o){if(o===void 0){o={}}var a=Object.assign(Object.assign({},n),o);var c=function(){var n=[];for(var o=0;o<arguments.length;o++){n[o]=arguments[o]}var c=(new Date).getTime().toString();var s=1;var u=n.map(i);var v=n.length>1?u:u[0];var f={id:c,count:0,data:{name:t,args:v},options:Object.assign(Object.assign({},a),{maxDepth:s,allowFunction:a.allowFunction||false})};var l=[];var p=JSON.stringify(f,(function(t,e){if(typeof e==="object"&&e!==null){if(l.indexOf(e)!==-1){return}l.push(e)}return e}));l=null;var O=JSON.parse(p);console.log(r,O);e.emit(r,O)};return c}}}})); //# sourceMappingURL=p-8fe59c36.system.js.map