effector-inspector
Advanced tools
Comparing version 0.4.2 to 0.5.0
@@ -1,2 +0,2 @@ | ||
module.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=3)}([function(e,t){e.exports=require("forest")},function(e,t){e.exports=require("effector")},function(e,t){e.exports=require("foliage")},function(e,t,n){"use strict";n.r(t),n.d(t,"createInspector",(function(){return it})),n.d(t,"addStore",(function(){return ct})),n.d(t,"addEvent",(function(){return at})),n.d(t,"addEffect",(function(){return lt}));var r,o,i,c,a,l,u,s,f,d,p,b,m,y,v,O,j,g,h,x,w,S,k=n(1),A=n(0),P=n(2);function E(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function I(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var T=P.styled.div(r||(r=I(["\n background-color: white;\n border-radius: 0.5rem;\n box-shadow: 0 14.5px 5.2px -10px rgba(0, 0, 0, 0.038),\n 0 23.9px 16.6px -10px rgba(0, 0, 0, 0.057),\n 0 64px 118px -10px rgba(0, 0, 0, 0.08), 0 0 10px -3px rgba(0, 0, 0, 0.08);\n display: flex;\n flex-direction: row;\n bottom: 3rem;\n right: 3rem;\n top: 3rem;\n position: fixed;\n z-index: 1000;\n user-select: none;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica,\n Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',\n 'PT Sans', Helvetica, Arial, sans-serif;\n -ms-text-size-adjust: 100%;\n -webkit-text-size-adjust: 100%;\n line-height: 1.5;\n width: 100%;\n max-width: 46rem;\n\n & > * + * {\n border-left: 1px solid rgba(0, 0, 0, 0.08);\n }\n\n @media screen and (max-width: 700px) {\n max-width: 30rem;\n }\n"]))),z=P.styled.section(o||(o=I(["\n display: flex;\n flex-flow: column;\n position: relative;\n width: 100%;\n border-radius: inherit;\n"]))),M=P.styled.div(i||(i=I(["\n background-color: white;\n border-bottom: 1px solid rgba(0, 0, 0, 0.08);\n border-radius: inherit;\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n display: flex;\n font-size: 1.2rem;\n font-weight: bold;\n line-height: 2rem;\n position: sticky;\n left: 0;\n right: 0;\n top: 0;\n"]))),$=P.styled.div(c||(c=I(["\n padding: 0.5rem 1rem;\n cursor: pointer;\n border-radius: inherit;\n border-top-right-radius: 0;\n\n &:hover {\n box-shadow: inset 0 -2px 0 0 mediumvioletred;\n }\n\n &:not(:first-child) {\n border-top-left-radius: 0;\n }\n\n &[data-active='true'] {\n background: linear-gradient(rgba(199, 21, 133, 0), rgba(199, 21, 133, 0.1));\n }\n"]))),D=P.styled.div(a||(a=I(["\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n overflow-y: auto;\n"]))),C=P.styled.ul(l||(l=I(["\n list-style-type: none;\n margin: 0 0;\n padding: 0 0;\n overflow-x: auto;\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n"]))),U=P.styled.li(u||(u=I(["\n display: flex;\n padding: 0.5rem 1rem;\n margin: 0 0;\n"]))),F=P.styled.pre(s||(s=I(["\n display: flex;\n margin: 0 0;\n color: darkred;\n font-family: 'JetBrains Mono', hasklig, monofur, monospace;\n"]))),q=P.styled.pre(f||(f=I(["\n margin: 0 0;\n font-family: 'JetBrains Mono', hasklig, monofur, monospace;\n"]))),B=P.styled.button(d||(d=I(["\n background-color: transparent;\n border: 1px solid rgba(0, 0, 0, 0.4);\n padding: 0.2rem 0.4rem;\n margin: 0;\n font-family: 'JetBrains Mono', hasklig, monofur, monospace;\n border-radius: 6px;\n margin-left: 1rem;\n"]))),_=P.styled.span(p||(p=I(["\n display: inline-block;\n\n [data-opened='true'] > & {\n display: block;\n padding-left: 8px;\n }\n\n &[data-hidden='folded'] {\n display: none;\n\n [data-opened='true'] > & {\n display: block;\n }\n }\n\n &[data-hidden='expanded'] {\n display: inline-block;\n\n [data-opened='true'] > & {\n display: none;\n }\n }\n\n &:not(:last-child)::after {\n content: ', ';\n }\n"]))),J=P.styled.span(b||(b=I(["\n color: mediumvioletred;\n font-style: italic;\n"]))),N=P.styled.span(m||(m=I(["\n color: blue;\n"]))),L=P.styled.span(y||(y=I(["\n color: green;\n"]))),R=P.styled.span(v||(v=I(["\n color: blue;\n font-weight: bold;\n"]))),W={boolean:J,date:P.styled.span(O||(O=I(["\n color: olive;\n"]))),keyword:R,number:N,string:L,symbol:P.styled.span(j||(j=I([""]))),regexp:P.styled.span(g||(g=I(["\n color: orangered;\n"])))},H=P.styled.div(h||(h=I(["\n display: flex;\n padding: 1rem;\n"]))),K=P.styled.input(x||(x=I([""]))),V=P.styled.label(w||(w=I(["\n padding: 0 0.5rem;\n"]))),G=P.styled.input(S||(S=I(["\n padding: 0 0.5rem;\n margin: 0 0.5rem;\n border: 1px solid rgba(0, 0, 0, 0.4);\n border-radius: 0.2rem;\n"]))),Q=function(e){var t=e.title,n=E(e,["title"]);V((function(){K((function(){Object(A.spec)({attr:{type:"checkbox"}}),Object(A.spec)(n)})),Object(A.spec)({text:t})}))},X=Math.pow(983020,3);function Y(e,t){var n,r;return null!==(n=null!==(r=localStorage.getItem("".concat(X,"-").concat(e)))&&void 0!==r?r:t)&&void 0!==n?n:""}function Z(e,t){return localStorage.setItem("".concat(X,"-").concat(e),t),t}function ee(e){return{read:function(t){return Y(e,t)},write:function(t){return Z(e,t)}}}function te(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return ne(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ne(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,c=!0,a=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return c=e.done,e},e:function(e){a=!0,i=e},f:function(){try{c||null==n.return||n.return()}finally{if(a)throw i}}}}function ne(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var re=ee("last-tab");function oe(e){var t=Object.keys(e),n=t[0],r=re.read(n),o=t.includes(r)?r:n,i=Object(k.createEvent)({loc:{file:"/src/tabs.ts",line:10,column:22},name:"changeTab",sid:"-z2hzvl"}),c=Object(k.restore)(i,o,{loc:{file:"/src/tabs.ts",line:11,column:17},name:"$tab",sid:"16xfb8"});c.watch(re.write),z((function(){M((function(){var n,r=te(t);try{var o=function(){var t=n.value,r=e[t];$({text:r.title,data:{active:c.map((function(e){return e===t}))},handler:{click:i.prepend((function(){return t}))}})};for(r.s();!(n=r.n()).done;)o()}catch(e){r.e(e)}finally{r.f()}}));var n,r=te(t);try{var o=function(){var t=n.value,r=e[t];D({visible:c.map((function(e){return e===t})),fn:function(){r.fn({changeTab:i})}})};for(r.s();!(n=r.n()).done;)o()}catch(e){r.e(e)}finally{r.f()}}))}function ie(e){return function(e){if(Array.isArray(e))return le(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||ae(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ce(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var c,a=e[Symbol.iterator]();!(r=(c=a.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return n}(e,t)||ae(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ae(e,t){if(e){if("string"==typeof e)return le(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?le(e,t):void 0}}function le(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ue=/\[object ([\w\s]+)\]/;function se(e){var t=Object.prototype.toString.call(e),n=ue.exec(t);return n?n[1]:"unknown"}function fe(e){var t=Object(A.rec)((function(e){var n=e.store,r=ce(Object(A.remap)(n,["value","parentOpened"]),2),o=r[0],i=r[1],c=Object(k.createEvent)({loc:{file:"/src/object-view.ts",line:13,column:32},name:"foldableClicked",sid:"-stmnmb"}),a=Object(k.createStore)(!1,{loc:{file:"/src/object-view.ts",line:14,column:29},name:"$localOpened",sid:"-lmwtnk"}).on(c,(function(e){return!e}));c.watch((function(e){return console.warn("foldableClicked",e)}));var l=Object(k.combine)({"ɔ":[i,a,function(e,t){return!0===e&&t}],config:{loc:{file:"/src/object-view.ts",line:16,column:24},name:"$opened",sid:"7e1sme"}});Object(A.variant)({source:Object(k.combine)({"ɔ":[o,l,function(e,t){return{type:se(e),value:e,opened:t}}],config:{loc:{file:"/src/object-view.ts",line:18,column:20},name:"source",sid:"-22s5pi"}}),key:"type",cases:{String:function(e){var t=e.store;return W.string({text:['"',Object(A.remap)(t,"value"),'"']})},Number:function(e){var t=e.store;return W.number({text:Object(A.remap)(t,"value")})},BigInt:function(e){var t=e.store;return W.number({text:[Object(A.remap)(t,"value"),"n"],attr:{title:"BigInt"}})},Boolean:function(e){var t=e.store;return W.boolean({text:Object(A.remap)(t,"value")})},Null:function(){return W.keyword({text:"null"})},Undefined:function(){return W.keyword({text:"undefined"})},Symbol:function(e){var t=e.store;return W.symbol({text:Object(A.remap)(t,"value")})},RegExp:function(e){var t=e.store,n=Object(A.remap)(t,"value"),r=ce(Object(A.remap)(n,["source","flags"]),2),o=r[0],i=r[1];W.regexp({text:["/",o,"/",i]})},Function:function(e){var t=e.store,n=Object(A.remap)(t,"value"),r={title:n.map((function(e){return e.toString()}))};Object(A.h)("span",{text:"function",attr:r}),W.keyword({text:n.map((function(e){return e.name?" ".concat(e.name):""})),attr:r}),Object(A.h)("span",{text:"()",attr:r})},AsyncFunction:function(e){var t=e.store,n=Object(A.remap)(t,"value"),r={title:n.map((function(e){return e.toString()}))};Object(A.h)("span",{text:"async function",attr:r}),W.keyword({text:n.map((function(e){return e.name?" ".concat(e.name):""})),attr:r}),Object(A.h)("span",{text:"()",attr:r})},Window:function(e){var t=e.store,n=Object(A.remap)(t,"opened");Object(A.h)("span",(function(){Object(A.spec)({data:{opened:n}}),Object(A.h)("span",{text:"Window {...",fn:function(){Object(A.handler)({passive:!0,stop:!0,capture:!0},{click:c})}}),Object(A.spec)({text:"}"})}))},Date:function(){W.date({text:o.map((function(e){var t;return null===(t=e.toISOString)||void 0===t?void 0:t.call(e)})),attr:{title:o}})},Array:function(e){var n=e.store,r=ce(Object(A.remap)(n,["value","opened"]),2),o=r[0],i=r[1];Object(A.h)("span",(function(){Object(A.spec)({data:{opened:i}}),Object(A.h)("span",{text:"Array [",data:{clickable:!0},fn:function(){Object(A.handler)({passive:!0,stop:!0,capture:!0,prevent:!0},{click:c})}}),Object(A.list)(o,(function(e){var n=e.store,r=e.key;return _((function(){return t({store:Object(k.combine)({"ɔ":[{value:n,parentOpened:i,key:r.map(String)}],config:{loc:{file:"/src/object-view.ts",line:95,column:35},name:"store",sid:"z8226z"}})})}))})),Object(A.spec)({text:"]"})}))},Arguments:function(e){var n=e.store,r=ce(Object(A.remap)(n,["value","opened"]),2),o=r[0],i=r[1];Object(A.h)("span",(function(){Object(A.spec)({data:{opened:i}}),Object(A.h)("span",{text:"Arguments [",fn:function(){Object(A.handler)({passive:!0,stop:!0,capture:!0},{click:c})}}),Object(A.list)(o.map((function(e){return ie(e)})),(function(e){var n=e.store,r=e.key;return _((function(){return t({store:Object(k.combine)({"ɔ":[{value:n,parentOpened:i,key:r.map(String)}],config:{loc:{file:"/src/object-view.ts",line:118,column:35},name:"store",sid:"r5r5mn"}})})}))})),Object(A.spec)({text:"]"})}))},Set:function(e){var n=e.store,r=ce(Object(A.remap)(n,["value","opened"]),2),o=r[0],i=r[1];Object(A.h)("span",(function(){Object(A.spec)({data:{opened:i}}),Object(A.h)("span",{text:"Set [",fn:function(){Object(A.handler)({passive:!0,stop:!0,capture:!0},{click:c})}}),Object(A.list)(o.map((function(e){return ie(e.values())})),(function(e){var n=e.store,r=e.key;return _((function(){return t({store:Object(k.combine)({"ɔ":[{value:n,parentOpened:i,key:r.map(String)}],config:{loc:{file:"/src/object-view.ts",line:141,column:35},name:"store",sid:"-35hefr"}})})}))})),Object(A.spec)({text:"]"})}))},Map:function(e){var n=e.store,r=ce(Object(A.remap)(n,["value","opened"]),2),o=r[0],i=r[1];Object(A.h)("span",(function(){Object(A.spec)({data:{opened:i}}),Object(A.h)("span",(function(){Object(A.spec)({text:"Map {"}),Object(A.handler)({passive:!0,stop:!0,capture:!0},{click:c})})),Object(A.list)(o.map((function(e){return ie(e.entries())})),(function(e){var n=e.store,r=ce(Object(A.remap)(n,["0","1"]),2),o=r[0],a=r[1];_((function(){W.string({text:['"',o,'"'],fn:function(){Object(A.handler)({passive:!0,stop:!0,capture:!0},{click:c})}}),Object(A.h)("span",{text:" => "}),t({store:Object(k.combine)({"ɔ":[{value:a,parentOpened:i,key:o}],config:{loc:{file:"/src/object-view.ts",line:172,column:43},name:"store",sid:"-tocynm"}})})}))})),Object(A.spec)({text:"}"})}))},Error:function(e){var n=e.store,r=ce(Object(A.remap)(n,["value","opened"]),2),o=r[0],i=r[1],a=ce(Object(A.remap)(o,["name","message","stack"]),3),l=a[0],u=a[1],s=a[2];Object(A.h)("span",(function(){Object(A.spec)({data:{opened:i}}),Object(A.h)("span",{text:[l," {"],attr:{title:o.map((function(e){return e.constructor.name}))},fn:function(){Object(A.handler)({passive:!0,stop:!0,capture:!0},{click:c})}}),_((function(){Object(A.spec)({data:{hidden:"expanded"}}),W.string({text:['"message"'],fn:function(){Object(A.handler)({passive:!0,stop:!0,capture:!0},{click:c})}}),Object(A.h)("span",{text:": "}),t({store:Object(k.combine)({"ɔ":[{value:u,parentOpened:i,key:"message"}],config:{loc:{file:"/src/object-view.ts",line:212,column:39},name:"store",sid:"-hw05k0"}})})})),_((function(){Object(A.spec)({data:{hidden:"folded"}}),W.string({text:['"stack"'],fn:function(){Object(A.handler)({passive:!0,stop:!0,capture:!0},{click:c})}}),Object(A.h)("span",{text:": "}),t({store:Object(k.combine)({"ɔ":[{value:s,parentOpened:i,key:"stack"}],config:{loc:{file:"/src/object-view.ts",line:229,column:39},name:"store",sid:"3phfe"}})})})),Object(A.list)(o.map((function(e){return ie(Object.entries(e))})),(function(e){var n=e.store,r=ce(Object(A.remap)(n,["0","1"]),2),o=r[0],a=r[1];_((function(){W.string({text:['"',o,'"'],fn:function(){Object(A.handler)({passive:!0,stop:!0,capture:!0},{click:c})}}),Object(A.h)("span",{text:": "}),t({store:Object(k.combine)({"ɔ":[{value:a,parentOpened:i,key:o}],config:{loc:{file:"/src/object-view.ts",line:247,column:43},name:"store",sid:"sietol"}})})}))}))})),Object(A.h)("span",{text:"}"})},__:function(e){var n=e.store;Object(A.h)("span",(function(){var e=ce(Object(A.remap)(n,["type","value","opened"]),3),r=e[0],o=e[1],i=e[2];Object(A.spec)({data:{opened:i}}),Object(A.h)("span",{text:[r," {"],fn:function(){Object(A.handler)({passive:!0,stop:!0,capture:!0},{click:c})}}),Object(A.list)(o.map((function(e){return ie(Object.entries(e))})),(function(e){var n=e.store,r=ce(Object(A.remap)(n,["0","1"]),2),o=r[0],a=r[1];_((function(){W.string({text:['"',o,'"'],fn:function(){Object(A.handler)({passive:!0,stop:!0,capture:!0},{click:c})}}),Object(A.h)("span",{text:": "}),t({store:Object(k.combine)({"ɔ":[{value:a,parentOpened:i,key:o}],config:{loc:{file:"/src/object-view.ts",line:284,column:43},name:"store",sid:"err1f0"}})})}))}))})),Object(A.h)("span",{text:"}"})}}})}));t({store:Object(k.combine)({"ɔ":[{value:e.value,parentOpened:Object(k.createStore)(!0,{loc:{file:"/src/object-view.ts",line:301,column:26},name:"parentOpened",sid:"-8mc831"}),key:""}],config:{loc:{file:"/src/object-view.ts",line:299,column:15},name:"store",sid:"vtddfn"}})})}function de(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var c,a=e[Symbol.iterator]();!(r=(c=a.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return n}(e,t)||be(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function pe(e){return function(e){if(Array.isArray(e))return me(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||be(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function be(e,t){if(e){if("string"==typeof e)return me(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?me(e,t):void 0}}function me(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ye,ve=(ye="filter-kinds",{read:function(e){return JSON.parse(Y(ye,JSON.stringify(e)))},write:function(e){return Z(ye,JSON.stringify(e)),e}}),Oe=ee("filter-text");function je(e){var t=Object(k.createEvent)({loc:{file:"/src/logs.ts",line:10,column:23},name:"toggleKind",sid:"a40s1e"}),n=Object(k.createEvent)({loc:{file:"/src/logs.ts",line:11,column:26},name:"filterChanged",sid:"rus8aq"}),r=Object(k.createEvent)({loc:{file:"/src/logs.ts",line:12,column:25},name:"clearClicked",sid:"fqsv0g"}),o=Object(k.createStore)(ve.read(["event","store"]),{loc:{file:"/src/logs.ts",line:13,column:19},name:"$kinds",sid:"szzha3"}),i=Object(k.restore)(n,Oe.read(""),{loc:{file:"/src/logs.ts",line:14,column:24},name:"$filterText",sid:"-aznuxe"});o.on(t,(function(e,t){return e.includes(t)?e.filter((function(e){return e!==t})):[].concat(pe(e),[t])})).watch(ve.write),i.watch(Oe.write),e.on(r,(function(){return[]})),H((function(){Object(A.h)("span",{text:"Show: "}),Q({title:"Event",attr:{checked:o.map((function(e){return e.includes("event")}))},handler:{click:t.prepend((function(){return"event"}))}}),Q({title:"Store",attr:{checked:o.map((function(e){return e.includes("store")}))},handler:{click:t.prepend((function(){return"store"}))}}),Q({title:"Effect",attr:{checked:o.map((function(e){return e.includes("effect")}))},handler:{click:t.prepend((function(){return"effect"}))}}),Object(A.h)("span",{text:"Filter:"}),G({attr:{value:i},handler:{change:n.prepend((function(e){var t,n;return null!==(t=null===(n=e.currentTarget)||void 0===n?void 0:n.value)&&void 0!==t?t:""}))}}),B({text:"Clear",handler:{click:r}})})),C((function(){Object(A.list)({source:e,key:"id",fields:["kind","name","payload","datetime"],fn:function(e){var t=de(e.fields,4),n=t[0],r=t[1],c=t[2],a=t[3],l=Object(k.combine)({"ɔ":[n,o,function(e,t){return t.includes(e)}],config:{loc:{file:"/src/logs.ts",line:54,column:37},name:"$kindMatched",sid:"-9wrr4d"}}),u=Object(k.combine)({"ɔ":[i,r,function(e,t){return t.includes(e)}],config:{loc:{file:"/src/logs.ts",line:55,column:37},name:"$textMatched",sid:"1kzb89"}}),s=Object(k.combine)({"ɔ":[l,u,function(e,t){return e&&t}],config:{loc:{file:"/src/logs.ts",line:56,column:33},name:"$visible",sid:"-kgb7m1"}});U({visible:s,fn:function(){var e=a.map((function(e){return e.toISOString()})),t=a.map((function(e){return e.toLocaleTimeString()}));F({text:[t," ▸ "],attr:{title:e}}),F({text:n}),F({text:[" «",r,"» "]}),q((function(){return fe({value:c})}))}})}})}))}function ge(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function he(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var c,a=e[Symbol.iterator]();!(r=(c=a.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return we(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return we(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function we(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Se(e){C((function(){var t=e.map((function(e){return Object.entries(e).map((function(e){var t=xe(e,2);return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ge(Object(n),!0).forEach((function(t){he(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ge(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({name:t[0]},t[1])}))}));Object(A.list)({source:t,key:"name",fields:["name","value"],fn:function(e){var t=xe(e.fields,2),n=t[0],r=t[1];U((function(){F({text:[n,": "]}),q((function(){fe({value:r})}))}))}})}))}function ke(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ae(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var c,a=e[Symbol.iterator]();!(r=(c=a.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ee(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ee(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ee(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ie(e){C((function(){var t=e.map((function(e){return Object.entries(e).map((function(e){var t=Pe(e,2);return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ke(Object(n),!0).forEach((function(t){Ae(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ke(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({name:t[0]},t[1])}))}));Object(A.list)({source:t,key:"name",fields:["name","lastTriggeredWith"],fn:function(e){var t=Pe(e.fields,1)[0];U((function(){F({text:[t," "]})}))}})}))}var Te;function ze(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Me(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $e(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var c,a=e[Symbol.iterator]();!(r=(c=a.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return De(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return De(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function De(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ce(e){C((function(){var t=e.map((function(e){return Object.entries(e).map((function(e){var t=$e(e,2);return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ze(Object(n),!0).forEach((function(t){Me(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ze(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({sid:t[0]},t[1])}))}));Object(A.list)({source:t,key:"sid",fields:["name","inFlight"],fn:function(e){var t=$e(e.fields,2),n=t[0],r=t[1];U((function(){F({text:[n," "]}),q((function(){Object(A.h)("span",(function(){var e,t;Object(A.h)("span",{text:[" {"]}),_((function(){W.string({text:'"inFlight": '}),W.number({text:r})})),Object(A.text)(Te||(e=["}"],t||(t=e.slice(0)),Te=Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))))}))}))}))}})}))}function Ue(e){return(Ue="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Fe=Object(k.createStore)(!1,{loc:{file:"/src/view.ts",line:9,column:19},name:"$isVisible",sid:"-n4epn7"}),qe=Object(k.createEvent)({loc:{file:"/src/view.ts",line:10,column:22},name:"togglePressed",sid:"-6mw5g1"}),Be=Object(k.createEvent)({loc:{file:"/src/view.ts",line:11,column:22},name:"showInspector",sid:"-y75g2u"});function _e(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];o&&Be(),console.info("%c[effector-inspector] %cPress %cCTRL+B %cto open Inspector","color: gray; font-size: 1rem;","color: currentColor; font-size: 1rem;","color: deepskyblue; font-family: monospace; font-size: 1rem;","color: currentColor; font-size: 1rem;"),T({visible:Fe,fn:function(){oe({stores:{title:"Stores",fn:function(){Se(e)}},effects:{title:"Effects",fn:function(){Ce(n)}},events:{title:"Events",fn:function(){Ie(t)}},logs:{title:"Logs",fn:function(){je(r)}}})}})}"object"===("undefined"==typeof document?"undefined":Ue(document))&&document.addEventListener("keypress",(function(e){2===e.keyCode&&e.ctrlKey&&qe()})),Fe.on(qe,(function(e){return!e})).on(Be,(function(){return!0}));function Je(e){return(Je="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ne(e){return function(e){if(Array.isArray(e))return Le(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Le(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Le(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Le(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Re(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function We(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Re(Object(n),!0).forEach((function(t){He(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Re(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function He(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ke=Object(k.createEvent)({loc:{file:"/src/index.ts",line:5,column:17},name:"storeAdd",sid:"-wopdia"}),Ve=Object(k.createEvent)({loc:{file:"/src/index.ts",line:6,column:21},name:"storeUpdated",sid:"vmsjku"}),Ge=Object(k.createStore)({},{loc:{file:"/src/index.ts",line:7,column:16},name:"$stores",sid:"i7hdcj"}),Qe=Object(k.createEvent)({loc:{file:"/src/index.ts",line:8,column:17},name:"eventAdd",sid:"-or028u"}),Xe=Object(k.createEvent)({loc:{file:"/src/index.ts",line:9,column:23},name:"eventTriggered",sid:"86fn0c"}),Ye=Object(k.createStore)({},{loc:{file:"/src/index.ts",line:10,column:16},name:"$events",sid:"-bopi5k"}),Ze=Object(k.createEvent)({loc:{file:"/src/index.ts",line:11,column:18},name:"effectAdd",sid:"exj8si"}),et=Object(k.createEvent)({loc:{file:"/src/index.ts",line:12,column:24},name:"effectTriggered",sid:"-wmuqs0"}),tt=Object(k.createStore)({},{loc:{file:"/src/index.ts",line:13,column:17},name:"$effects",sid:"-548kt"}),nt=Object(k.createStore)([],{loc:{file:"/src/index.ts",line:14,column:14},name:"$logs",sid:"dr2ta8"});Ge.on(Ke,(function(e,t){return We(We({},e),{},He({},t.name,{value:t.store.getState(),mapped:t.mapped}))})).on(Ve,(function(e,t){var n=t.name,r=t.value;return e[n]=We(We({},e[n]),{},{value:r}),We({},e)})),Ye.on(Qe,(function(e,t){return We(We({},e),{},He({},t.name,{mapped:t.mapped,lastTriggeredWith:void 0}))})).on(Xe,(function(e,t){var n=t.name,r=t.params;return e[n]=We(We({},e[n]),{},{lastTriggeredWith:r}),We({},e)})),tt.on(Ze,(function(e,t){return We(We({},e),{},He({},t.sid,{name:t.name,effect:t.effect,inFlight:t.effect.inFlight.getState()}))})).on(et,(function(e,t){var n=t.sid,r=e[n];return e[n]=We(We({},r),{},{inFlight:r.effect.inFlight.getState()}),We({},e)}));var rt=1e3,ot=Object(k.createEffect)({handler:function(e){var t=e.name,n=e.kind,r=e.payload;return{id:(++rt).toString(36),kind:n,name:t,payload:r,datetime:new Date}}},{loc:{file:"/src/index.ts",line:60,column:23},name:"createRecordFx",sid:"-loxrq9"});function it(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t="object"===("undefined"==typeof document?"undefined":Je(document))&&document.createElement("div");if(t)return t.classList.add("effector-inspector"),document.body.append(t),Object(A.using)(t,(function(){return _e(Ge,Ye,tt,nt,e.visible)})),Object(A.using)(t,P.StyledRoot),{root:t}}function ct(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.name||ut(e);Ke({store:e,name:n,mapped:t.mapped||!1}),Object(k.forward)({"ɔ":{from:e.updates.map((function(e){return{name:n,value:e}})),to:Ve},config:{loc:{file:"/src/index.ts",line:101,column:4},sid:"-4z1lr5"}})}function at(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.name||ut(e);Qe({event:e,name:n,mapped:t.mapped||!1}),Object(k.forward)({"ɔ":{from:e.map((function(e){return{name:n,params:e}})),to:Xe},config:{loc:{file:"/src/index.ts",line:109,column:4},sid:"-4un909"}})}function lt(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=ut(e),o=n.sid||e.sid||r;Ze({effect:e,name:r,sid:o,attached:null!==(t=n.attached)&&void 0!==t&&t}),Object(k.forward)({"ɔ":{from:[e,e.finally],to:et.prepend((function(){return{sid:o}}))},config:{loc:{file:"/src/index.ts",line:121,column:4},sid:"-40ycyr"}});var i=e.map((function(e){return{kind:"effect",name:r,payload:e}})),c=e.done.map((function(e){return{kind:"effect",name:r+".done",payload:e}})),a=e.fail.map((function(e){return{kind:"effect",name:r+".fail",payload:e}}));Object(k.forward)({"ɔ":{from:[i,c,a],to:ot},config:{loc:{file:"/src/index.ts",line:140,column:4},sid:"-33ewrq"}})}function ut(e){return e.compositeName.path.join("/")}Object(k.forward)({"ɔ":{from:Xe,to:ot.prepend((function(e){return{kind:"event",name:e.name,payload:e.params}}))},config:{loc:{file:"/src/index.ts",line:71,column:0},sid:"-8rhkph"}}),Object(k.forward)({"ɔ":{from:Ve,to:ot.prepend((function(e){return{kind:"store",name:e.name,payload:e.value}}))},config:{loc:{file:"/src/index.ts",line:79,column:0},sid:"-8n37yl"}}),nt.on(ot.doneData,(function(e,t){return[t].concat(Ne(e))}))}]); | ||
module.exports=function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=3)}([function(e,n){e.exports=require("forest")},function(e,n){e.exports=require("effector")},function(e,n){e.exports=require("foliage")},function(e,n,t){"use strict";t.r(n),t.d(n,"createInspector",(function(){return dn})),t.d(n,"addStore",(function(){return pn})),t.d(n,"addEvent",(function(){return bn})),t.d(n,"addEffect",(function(){return mn}));var r,o,i,c,a,l,u,s,f,d,p,b,m,v,y,O,j,g,h,x,w,S,k,A=t(1),E=t(0),P=t(2);function I(e,n){if(null==e)return{};var t,r,o=function(e,n){if(null==e)return{};var t,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)t=i[r],n.indexOf(t)>=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)t=i[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function z(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}var $=P.styled.div(r||(r=z(["\n --primary: #ff8c00;\n --primary-light: #ffb152;\n --primary-dark: #c86e00;\n --primary-text: #fff;\n\n --text: #404040;\n --border: #dadada;\n --shadow: 0 4px 20px 4px rgba(0, 0, 0, 0.1);\n\n --scrollbar: var(--primary-light);\n\n --tabs-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);\n\n --tab-bg: #fff;\n --tab-text: #606060;\n --tab-text-active: var(--primary);\n --tab-shadow-active: var(--primary);\n\n --content-bg: #f9f9f9;\n\n --code-var: #ff8c00;\n --code-func: #249ec6;\n --code-string: #00a153;\n --code-bool: #ff62d3;\n --code-number: #7a70f3;\n --code-date: #333;\n --code-regexp: #95b70e;\n\n @media (prefers-color-scheme: dark) {\n --text: #ddd;\n --border: #111;\n --shadow: 0 4px 20px 4px rgba(0, 0, 0, 0.1);\n\n --scrollbar: var(--primary);\n\n --tabs-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);\n\n --tab-bg: #444;\n --tab-text: #ddd;\n --tab-text-active: var(--primary);\n --tab-shadow-active: var(--primary);\n\n --content-bg: #333;\n\n --code-var: #ff8c00;\n --code-func: #a5d4e2;\n --code-string: #2cb472;\n --code-bool: #ff62d3;\n --code-number: #9990ff;\n --code-date: #fff;\n --code-regexp: #e5ff7e;\n }\n\n ::-webkit-scrollbar-thumb {\n background-color: var(--scrollbar);\n }\n\n ::-webkit-scrollbar {\n width: 6px;\n }\n\n ::-webkit-scrollbar:horizontal {\n height: 6px;\n }\n\n position: fixed;\n top: 64px;\n right: 64px;\n bottom: 64px;\n z-index: 1000;\n\n display: flex;\n flex-direction: row;\n width: 736px;\n min-width: 400px;\n max-width: 90%;\n\n color: var(--text);\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Apple Color Emoji',\n 'Segoe UI Emoji', 'Segoe UI Symbol', 'PT Sans', Helvetica, Arial, sans-serif;\n line-height: 1.5;\n\n background-color: var(--bg);\n border-radius: 8px;\n box-shadow: var(--shadow);\n\n user-select: none;\n\n color-scheme: light dark;\n -ms-text-size-adjust: 100%;\n -webkit-text-size-adjust: 100%;\n\n @media screen and (max-width: 700px) {\n max-width: 480px;\n }\n"]))),D=P.styled.div(o||(o=z(["\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n width: 8px;\n margin-top: 48px;\n margin-bottom: 48px;\n margin-left: -10px;\n\n color: var(--primary);\n font-size: 14px;\n font-family: monospace;\n line-height: 6px;\n word-break: break-all;\n\n background-color: var(--bg);\n border-top-left-radius: 8px;\n border-bottom-left-radius: 8px;\n cursor: col-resize;\n\n &:hover,\n &[data-active='true'] {\n color: var(--bg);\n\n background-color: var(--primary);\n }\n"]))),M=P.styled.section(i||(i=z(["\n position: relative;\n\n display: flex;\n flex-flow: column;\n width: 100%;\n\n border-radius: inherit;\n"]))),T=P.styled.div(c||(c=z(["\n position: sticky;\n top: 0;\n right: 0;\n left: 0;\n\n display: flex;\n\n font-weight: 500;\n font-size: 16px;\n line-height: 20px;\n\n background-color: var(--tab-bg);\n border-bottom: 1px solid var(--border);\n border-radius: inherit;\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n box-shadow: var(--tabs-shadow);\n"]))),C=P.styled.div(a||(a=z(["\n padding: 8px 16px;\n\n color: var(--tab-text);\n\n border-radius: inherit;\n border-top-right-radius: 0;\n cursor: pointer;\n\n &:hover {\n box-shadow: inset 0 -2px 0 0 var(--tab-shadow-active);\n }\n\n &:not(:first-child) {\n border-top-left-radius: 0;\n }\n\n &[data-active='true'] {\n color: var(--tab-text-active);\n\n box-shadow: inset 0 -2px 0 0 var(--tab-shadow-active);\n }\n"]))),U=P.styled.div(l||(l=z(["\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n overflow-y: auto;\n\n background-color: var(--content-bg);\n"]))),F=P.styled.ul(u||(u=z(["\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n margin: 0 0;\n padding: 0 0;\n overflow-x: auto;\n\n list-style-type: none;\n"]))),L=P.styled.li(s||(s=z(["\n display: flex;\n margin: 0 0;\n padding: 6px 10px;\n\n font-size: 12px;\n line-height: 1.3;\n"]))),B=P.styled.pre(f||(f=z(["\n display: flex;\n margin: 0 0;\n\n color: var(--code-var);\n font-family: 'JetBrains Mono', hasklig, monofur, monospace;\n"]))),q=P.styled.pre(d||(d=z(["\n margin: 0 0;\n\n color: var(--code-func);\n font-family: 'JetBrains Mono', hasklig, monofur, monospace;\n"]))),R=P.styled.button(p||(p=z(["\n margin: 0;\n margin-left: 1rem;\n padding: 0.2rem 0.4rem;\n\n color: var(--primary-text);\n font-family: 'JetBrains Mono', hasklig, monofur, monospace;\n\n background-color: var(--primary);\n border: var(--primary);\n border-radius: 4px;\n\n &:focus {\n outline: 0;\n box-shadow: 0 0 0 1px var(--primary-dark), 0 0 3px 0 var(--primary-dark);\n }\n"]))),_=P.styled.span(b||(b=z(["\n display: inline-block;\n\n [data-opened='true'] > & {\n display: block;\n padding-left: 8px;\n }\n\n &[data-hidden='folded'] {\n display: none;\n\n [data-opened='true'] > & {\n display: block;\n }\n }\n\n &[data-hidden='expanded'] {\n display: inline-block;\n\n [data-opened='true'] > & {\n display: none;\n }\n }\n\n &:not(:last-child)::after {\n content: ', ';\n }\n"]))),J=P.styled.span(m||(m=z(["\n color: var(--code-bool);\n font-style: italic;\n"]))),N=P.styled.span(v||(v=z(["\n color: var(--code-number);\n"]))),W=P.styled.span(y||(y=z(["\n color: var(--code-string);\n"]))),K=P.styled.span(O||(O=z(["\n color: var(--code-number);\n font-weight: bold;\n"]))),X={boolean:J,date:P.styled.span(j||(j=z(["\n color: var(--code-date);\n"]))),keyword:K,number:N,string:W,symbol:P.styled.span(g||(g=z(["\n /* nothing here */\n"]))),regexp:P.styled.span(h||(h=z(["\n color: var(--code-regexp);\n"])))},H=P.styled.div(x||(x=z(["\n display: flex;\n flex-shrink: 0;\n padding: 1rem;\n"]))),V=P.styled.input(w||(w=z(["\n /* nothing here */\n"]))),G=P.styled.label(S||(S=z(["\n display: flex;\n flex-shrink: 0;\n padding: 0 0.5rem;\n"]))),Q=P.styled.input(k||(k=z(["\n display: flex;\n flex-shrink: 0;\n margin: 0 0.5rem;\n padding: 0 0.5rem;\n\n border: 1px solid var(--border);\n border-radius: 0.2rem;\n\n &:focus {\n border-color: var(--primary);\n outline: 0;\n box-shadow: 0 0 0 1px var(--primary);\n }\n"]))),Y=function(e){var n=e.title,t=I(e,["title"]);G((function(){V((function(){Object(E.spec)({attr:{type:"checkbox"}}),Object(E.spec)(t)})),Object(E.spec)({text:n})}))},Z=Math.pow(983020,2).toString(36);function ee(e,n){var t;return null!==(t=localStorage.getItem("".concat(Z,"-").concat(e)))&&void 0!==t?t:n}function ne(e,n){return localStorage.setItem("".concat(Z,"-").concat(e),n),n}function te(e,n){var t=Object(A.createEvent)({loc:{file:"/src/setting.ts",line:11,column:17},name:"save",sid:"wnm0lw"});return t.watch((function(n){return ne(e,n)})),{read:function(){return ee(e,n)},write:function(n){return ne(e,n)},save:t}}function re(e,n){var t=Object(A.createEvent)({loc:{file:"/src/setting.ts",line:20,column:17},name:"save",sid:"-o65dje"});return t.watch((function(n){return ne(e,JSON.stringify(n))})),{read:function(){return JSON.parse(ee(e,JSON.stringify(n)))},write:function(n){return ne(e,JSON.stringify(n)),n},save:t}}function oe(e,n){var t;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(t=function(e,n){if(!e)return;if("string"==typeof e)return ie(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return ie(e,n)}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,c=!0,a=!1;return{s:function(){t=e[Symbol.iterator]()},n:function(){var e=t.next();return c=e.done,e},e:function(e){a=!0,i=e},f:function(){try{c||null==t.return||t.return()}finally{if(a)throw i}}}}function ie(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function ce(e){var n=Object.keys(e),t=n[0],r=te("last-tab",t),o=r.read(),i=n.includes(o)?o:t,c=Object(A.createEvent)({loc:{file:"/src/tabs.ts",line:10,column:22},name:"changeTab",sid:"-z2hzvl"}),a=Object(A.restore)(c,i,{loc:{file:"/src/tabs.ts",line:11,column:17},name:"$tab",sid:"16xfb8"});a.watch(r.write),M((function(){T((function(){var t,r=oe(n);try{var o=function(){var n=t.value,r=e[n];C({text:r.title,data:{active:a.map((function(e){return e===n}))},handler:{click:c.prepend((function(){return n}))}})};for(r.s();!(t=r.n()).done;)o()}catch(e){r.e(e)}finally{r.f()}}));var t,r=oe(n);try{var o=function(){var n=t.value,r=e[n];U({visible:a.map((function(e){return e===n})),fn:function(){r.fn({changeTab:c})}})};for(r.s();!(t=r.n()).done;)o()}catch(e){r.e(e)}finally{r.f()}}))}function ae(e){return function(e){if(Array.isArray(e))return se(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||ue(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function le(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,o=!1,i=void 0;try{for(var c,a=e[Symbol.iterator]();!(r=(c=a.next()).done)&&(t.push(c.value),!n||t.length!==n);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return t}(e,n)||ue(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ue(e,n){if(e){if("string"==typeof e)return se(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?se(e,n):void 0}}function se(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}var fe=/\[object ([\w\s]+)\]/;function de(e){var n=Object.prototype.toString.call(e),t=fe.exec(n);return t?t[1]:"unknown"}function pe(e){var n=Object(E.rec)((function(e){var t=e.store,r=le(Object(E.remap)(t,["value","parentOpened"]),2),o=r[0],i=r[1],c=Object(A.createEvent)({loc:{file:"/src/object-view.ts",line:13,column:32},name:"foldableClicked",sid:"-stmnmb"}),a=Object(A.createStore)(!1,{loc:{file:"/src/object-view.ts",line:14,column:29},name:"$localOpened",sid:"-lmwtnk"}).on(c,(function(e){return!e})),l=Object(A.combine)({"ɔ":[i,a,function(e,n){return!0===e&&n}],config:{loc:{file:"/src/object-view.ts",line:15,column:24},name:"$opened",sid:"6x0687"}});Object(E.variant)({source:Object(A.combine)({"ɔ":[o,l,function(e,n){return{type:de(e),value:e,opened:n}}],config:{loc:{file:"/src/object-view.ts",line:17,column:20},name:"source",sid:"-2jts3p"}}),key:"type",cases:{String:function(e){var n=e.store;return X.string({text:['"',Object(E.remap)(n,"value"),'"']})},Number:function(e){var n=e.store;return X.number({text:Object(E.remap)(n,"value")})},BigInt:function(e){var n=e.store;return X.number({text:[Object(E.remap)(n,"value"),"n"],attr:{title:"BigInt"}})},Boolean:function(e){var n=e.store;return X.boolean({text:Object(E.remap)(n,"value")})},Null:function(){return X.keyword({text:"null"})},Undefined:function(){return X.keyword({text:"undefined"})},Symbol:function(e){var n=e.store;return X.symbol({text:Object(E.remap)(n,"value")})},RegExp:function(e){var n=e.store,t=Object(E.remap)(n,"value"),r=le(Object(E.remap)(t,["source","flags"]),2),o=r[0],i=r[1];X.regexp({text:["/",o,"/",i]})},Function:function(e){var n=e.store,t=Object(E.remap)(n,"value"),r={title:t.map((function(e){return e.toString()}))};Object(E.h)("span",{text:"function",attr:r}),X.keyword({text:t.map((function(e){return e.name?" ".concat(e.name):""})),attr:r}),Object(E.h)("span",{text:"()",attr:r})},AsyncFunction:function(e){var n=e.store,t=Object(E.remap)(n,"value"),r={title:t.map((function(e){return e.toString()}))};Object(E.h)("span",{text:"async function",attr:r}),X.keyword({text:t.map((function(e){return e.name?" ".concat(e.name):""})),attr:r}),Object(E.h)("span",{text:"()",attr:r})},Window:function(e){var n=e.store,t=Object(E.remap)(n,"opened");Object(E.h)("span",(function(){Object(E.spec)({data:{opened:t}}),Object(E.h)("span",{text:"Window {...",fn:function(){Object(E.handler)({passive:!0,stop:!0,capture:!0},{click:c})}}),Object(E.spec)({text:"}"})}))},Date:function(){X.date({text:o.map((function(e){var n;return null===(n=e.toISOString)||void 0===n?void 0:n.call(e)})),attr:{title:o}})},Array:function(e){var t=e.store,r=le(Object(E.remap)(t,["value","opened"]),2),o=r[0],i=r[1];Object(E.h)("span",(function(){Object(E.spec)({data:{opened:i}}),Object(E.h)("span",{text:"Array [",data:{clickable:!0},fn:function(){Object(E.handler)({passive:!0,stop:!0,capture:!0,prevent:!0},{click:c})}}),Object(E.list)(o,(function(e){var t=e.store,r=e.key;return _((function(){return n({store:Object(A.combine)({"ɔ":[{value:t,parentOpened:i,key:r.map(String)}],config:{loc:{file:"/src/object-view.ts",line:91,column:35},name:"store",sid:"xbvkm7"}})})}))})),Object(E.spec)({text:"]"})}))},Arguments:function(e){var t=e.store,r=le(Object(E.remap)(t,["value","opened"]),2),o=r[0],i=r[1];Object(E.h)("span",(function(){Object(E.spec)({data:{opened:i}}),Object(E.h)("span",{text:"Arguments [",fn:function(){Object(E.handler)({passive:!0,stop:!0,capture:!0},{click:c})}}),Object(E.list)(o.map((function(e){return ae(e)})),(function(e){var t=e.store,r=e.key;return _((function(){return n({store:Object(A.combine)({"ɔ":[{value:t,parentOpened:i,key:r.map(String)}],config:{loc:{file:"/src/object-view.ts",line:111,column:35},name:"store",sid:"nufsva"}})})}))})),Object(E.spec)({text:"]"})}))},Set:function(e){var t=e.store,r=le(Object(E.remap)(t,["value","opened"]),2),o=r[0],i=r[1];Object(E.h)("span",(function(){Object(E.spec)({data:{opened:i}}),Object(E.h)("span",{text:"Set [",fn:function(){Object(E.handler)({passive:!0,stop:!0,capture:!0},{click:c})}}),Object(E.list)(o.map((function(e){return ae(e.values())})),(function(e){var t=e.store,r=e.key;return _((function(){return n({store:Object(A.combine)({"ɔ":[{value:t,parentOpened:i,key:r.map(String)}],config:{loc:{file:"/src/object-view.ts",line:131,column:35},name:"store",sid:"-htvons"}})})}))})),Object(E.spec)({text:"]"})}))},Map:function(e){var t=e.store,r=le(Object(E.remap)(t,["value","opened"]),2),o=r[0],i=r[1];Object(E.h)("span",(function(){Object(E.spec)({data:{opened:i}}),Object(E.h)("span",(function(){Object(E.spec)({text:"Map {"}),Object(E.handler)({passive:!0,stop:!0,capture:!0},{click:c})})),Object(E.list)(o.map((function(e){return ae(e.entries())})),(function(e){var t=e.store,r=le(Object(E.remap)(t,["0","1"]),2),o=r[0],a=r[1];_((function(){X.string({text:['"',o,'"'],fn:function(){Object(E.handler)({passive:!0,stop:!0,capture:!0},{click:c})}}),Object(E.h)("span",{text:" => "}),n({store:Object(A.combine)({"ɔ":[{value:a,parentOpened:i,key:o}],config:{loc:{file:"/src/object-view.ts",line:159,column:43},name:"store",sid:"fb9vmt"}})})}))})),Object(E.spec)({text:"}"})}))},Error:function(e){var t=e.store,r=le(Object(E.remap)(t,["value","opened"]),2),o=r[0],i=r[1],a=le(Object(E.remap)(o,["name","message"]),2),l=a[0],u=a[1],s=o.map((function(e){var n;return null!==(n=e.stack)&&void 0!==n?n:null}));Object(E.h)("span",(function(){Object(E.spec)({data:{opened:i}}),Object(E.h)("span",{text:[l," {"],attr:{title:o.map((function(e){return e.constructor.name}))},fn:function(){Object(E.handler)({passive:!0,stop:!0,capture:!0},{click:c})}}),_((function(){Object(E.spec)({data:{hidden:"expanded"}}),X.string({text:['"message"'],fn:function(){Object(E.handler)({passive:!0,stop:!0,capture:!0},{click:c})}}),Object(E.h)("span",{text:": "}),n({store:Object(A.combine)({"ɔ":[{value:u,parentOpened:i,key:"message"}],config:{loc:{file:"/src/object-view.ts",line:193,column:39},name:"store",sid:"5h7l4"}})})})),_((function(){Object(E.spec)({data:{hidden:"folded"}}),X.string({text:['"stack"'],fn:function(){Object(E.handler)({passive:!0,stop:!0,capture:!0},{click:c})}}),Object(E.h)("span",{text:": "});var e=Object(A.combine)({"ɔ":[{value:s,parentOpened:i,key:"stack"}],config:{loc:{file:"/src/object-view.ts",line:209,column:42},name:"store",sid:"-t932g0"}});n({store:e})})),Object(E.list)(o.map((function(e){return ae(Object.entries(e))})),(function(e){var t=e.store,r=le(Object(E.remap)(t,["0","1"]),2),o=r[0],a=r[1];_((function(){X.string({text:['"',o,'"'],fn:function(){Object(E.handler)({passive:!0,stop:!0,capture:!0},{click:c})}}),Object(E.h)("span",{text:": "}),n({store:Object(A.combine)({"ɔ":[{value:a,parentOpened:i,key:o}],config:{loc:{file:"/src/object-view.ts",line:227,column:43},name:"store",sid:"-udqrh"}})})}))}))})),Object(E.h)("span",{text:"}"})},__:function(e){var t=e.store;Object(E.h)("span",(function(){var e=le(Object(E.remap)(t,["type","value","opened"]),3),r=e[0],o=e[1],i=e[2];Object(E.spec)({data:{opened:i}}),Object(E.h)("span",{text:[r," {"],fn:function(){Object(E.handler)({passive:!0,stop:!0,capture:!0},{click:c})}}),Object(E.list)(o.map((function(e){return ae(Object.entries(e))})),(function(e){var t=e.store,r=le(Object(E.remap)(t,["0","1"]),2),o=r[0],a=r[1];_((function(){X.string({text:['"',o,'"'],fn:function(){Object(E.handler)({passive:!0,stop:!0,capture:!0},{click:c})}}),Object(E.h)("span",{text:": "}),n({store:Object(A.combine)({"ɔ":[{value:a,parentOpened:i,key:o}],config:{loc:{file:"/src/object-view.ts",line:260,column:43},name:"store",sid:"-gh80lu"}})})}))}))})),Object(E.h)("span",{text:"}"})}}})})),t=e.value,r=Object(A.combine)({"ɔ":[{value:t,parentOpened:Object(A.createStore)(!0,{loc:{file:"/src/object-view.ts",line:277,column:22},name:"parentOpened",sid:"-2w11af"}),key:""},function(e){return e}],config:{loc:{file:"/src/object-view.ts",line:275,column:18},name:"store",sid:"kebhe"}});n({store:r})}function be(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,o=!1,i=void 0;try{for(var c,a=e[Symbol.iterator]();!(r=(c=a.next()).done)&&(t.push(c.value),!n||t.length!==n);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return t}(e,n)||ve(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function me(e){return function(e){if(Array.isArray(e))return ye(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||ve(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ve(e,n){if(e){if("string"==typeof e)return ye(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?ye(e,n):void 0}}function ye(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}var Oe=re("filter-kinds",["event","store"]),je=te("filter-text","");function ge(e,n){var t=Object(A.createEvent)({loc:{file:"/src/logs.ts",line:10,column:23},name:"toggleKind",sid:"a40s1e"}),r=Object(A.createEvent)({loc:{file:"/src/logs.ts",line:11,column:26},name:"filterChanged",sid:"rus8aq"}),o=Object(A.createEvent)({loc:{file:"/src/logs.ts",line:12,column:25},name:"clearClicked",sid:"fqsv0g"}),i=Object(A.createStore)(Oe.read(),{loc:{file:"/src/logs.ts",line:13,column:19},name:"$kinds",sid:"szzha3"}),c=Object(A.restore)(r,je.read(),{loc:{file:"/src/logs.ts",line:14,column:24},name:"$filterText",sid:"-aznuxe"});i.on(t,(function(e,n){return e.includes(n)?e.filter((function(e){return e!==n})):[].concat(me(e),[n])})).watch(Oe.write),c.watch(je.write),e.on(o,(function(){return[]})).on(n,(function(){return[]})),H((function(){Object(E.h)("span",{text:"Show: "}),Y({title:"Event",attr:{checked:i.map((function(e){return e.includes("event")}))},handler:{click:t.prepend((function(){return"event"}))}}),Y({title:"Store",attr:{checked:i.map((function(e){return e.includes("store")}))},handler:{click:t.prepend((function(){return"store"}))}}),Y({title:"Effect",attr:{checked:i.map((function(e){return e.includes("effect")}))},handler:{click:t.prepend((function(){return"effect"}))}}),Object(E.h)("span",{text:"Filter:"}),Q({attr:{value:c},handler:{change:r.prepend((function(e){var n,t;return null!==(n=null===(t=e.currentTarget)||void 0===t?void 0:t.value)&&void 0!==n?n:""}))}}),R({text:"Clear",handler:{click:o},attr:{title:"Press CTRL+L to clear logs"}})})),F((function(){Object(E.list)({source:e,key:"id",fields:["kind","name","payload","datetime"],fn:function(e){var n=be(e.fields,4),t=n[0],r=n[1],o=n[2],a=n[3],l=Object(A.combine)({"ɔ":[t,i,function(e,n){return n.includes(e)}],config:{loc:{file:"/src/logs.ts",line:56,column:37},name:"$kindMatched",sid:"-8yoibz"}}),u=Object(A.combine)({"ɔ":[c,r,function(e,n){return n.includes(e)}],config:{loc:{file:"/src/logs.ts",line:57,column:37},name:"$textMatched",sid:"2j2k0n"}}),s=Object(A.combine)({"ɔ":[l,u,function(e,n){return e&&n}],config:{loc:{file:"/src/logs.ts",line:58,column:33},name:"$visible",sid:"-ji7ytn"}});L({visible:s,fn:function(){var e=a.map((function(e){return e.toISOString()})),n=a.map((function(e){return e.toLocaleTimeString()}));B({text:[n," ▸ "],attr:{title:e}}),B({text:t}),B({text:[" «",r,"» "]}),q((function(){return pe({value:o})}))}})}})}))}function he(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function xe(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function we(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,o=!1,i=void 0;try{for(var c,a=e[Symbol.iterator]();!(r=(c=a.next()).done)&&(t.push(c.value),!n||t.length!==n);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return t}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return Se(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Se(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Se(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function ke(e){F((function(){var n=e.map((function(e){return Object.entries(e).map((function(e){var n=we(e,2);return function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?he(Object(t),!0).forEach((function(n){xe(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):he(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}({name:n[0]},n[1])}))}));Object(E.list)({source:n,key:"name",fields:["name","value"],fn:function(e){var n=we(e.fields,2),t=n[0],r=n[1];L((function(){B({text:[t,": "]}),q((function(){pe({value:r})}))}))}})}))}function Ae(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Ee(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Pe(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,o=!1,i=void 0;try{for(var c,a=e[Symbol.iterator]();!(r=(c=a.next()).done)&&(t.push(c.value),!n||t.length!==n);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return t}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return Ie(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Ie(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ie(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function ze(e){F((function(){var n=e.map((function(e){return Object.entries(e).map((function(e){var n=Pe(e,2);return function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Ae(Object(t),!0).forEach((function(n){Ee(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ae(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}({name:n[0]},n[1])}))}));Object(E.list)({source:n,key:"name",fields:["name","lastTriggeredWith"],fn:function(e){var n=Pe(e.fields,1)[0];L((function(){B({text:[n," "]})}))}})}))}var $e;function De(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Me(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Te(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,o=!1,i=void 0;try{for(var c,a=e[Symbol.iterator]();!(r=(c=a.next()).done)&&(t.push(c.value),!n||t.length!==n);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return t}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return Ce(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Ce(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ce(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function Ue(e){F((function(){var n=e.map((function(e){return Object.entries(e).map((function(e){var n=Te(e,2);return function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?De(Object(t),!0).forEach((function(n){Me(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):De(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}({sid:n[0]},n[1])}))}));Object(E.list)({source:n,key:"sid",fields:["name","inFlight"],fn:function(e){var n=Te(e.fields,2),t=n[0],r=n[1];L((function(){B({text:[t," "]}),q((function(){Object(E.h)("span",(function(){var e,n;Object(E.h)("span",{text:[" {"]}),_((function(){X.string({text:'"inFlight": '}),X.number({text:r})})),Object(E.text)($e||(e=["}"],n||(n=e.slice(0)),$e=Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))))}))}))}))}})}))}var Fe;function Le(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}function Be(e){return(Be="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var qe=Object(A.createStore)(!1,{loc:{file:"/src/view.ts",line:12,column:19},name:"$isVisible",sid:"l62ixn"}),Re=Object(A.createEvent)({loc:{file:"/src/view.ts",line:13,column:22},name:"togglePressed",sid:"-57ra9g"}),_e=Object(A.createEvent)({loc:{file:"/src/view.ts",line:14,column:21},name:"clearPressed",sid:"-bwebx"}),Je=Object(A.createEvent)({loc:{file:"/src/view.ts",line:15,column:22},name:"showInspector",sid:"-wayyi2"});function Ne(){var e=Object(A.createStore)(!1,{loc:{file:"/src/view.ts",line:29,column:20},name:"$inDrag",sid:"5k9yuw"}),n=Object(A.createEvent)({loc:{file:"/src/view.ts",line:30,column:22},name:"mouseDown",sid:"1evbai"}),t=Object(A.createEvent)({loc:{file:"/src/view.ts",line:31,column:22},name:"mouseMove",sid:"zfgfw8"}),r=Object(A.createEvent)({loc:{file:"/src/view.ts",line:32,column:20},name:"mouseUp",sid:"-oostct"});return e.on(n,(function(){return!0})).on(r,(function(){return!1})),Object(E.spec)({handler:{mousedown:n}}),n.watch((function(){document&&(document.addEventListener("mousemove",t),document.addEventListener("mouseup",r))})),r.watch((function(){document.removeEventListener("mousemove",t),document.removeEventListener("mouseup",r)})),{mouseMove:t,mouseDown:n,mouseUp:r,$inDrag:e}}function We(){var e=Object(A.createEvent)({loc:{file:"/src/view.ts",line:48,column:19},name:"setRef",sid:"-wt0va3"}),n=Object(A.restore)(e,null,{loc:{file:"/src/view.ts",line:49,column:17},name:"$ref",sid:"-lg0di4"});return Object(E.node)(e),n}function Ke(e,n,t,r){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];o&&Je(),console.info("%c[effector-inspector] %cPress %cCTRL+B %cto open Inspector","color: gray; font-size: 1rem;","color: currentColor; font-size: 1rem;","color: deepskyblue; font-family: monospace; font-size: 1rem;","color: currentColor; font-size: 1rem;"),$({visible:qe,fn:function(){var o=We(),i=re("width",736),c=Object(A.createStore)(i.read(),{loc:{file:"/src/view.ts",line:64,column:27},name:"$width",sid:"ea3x6n"});Object(E.spec)({style:{width:Object(E.val)(Fe||(Fe=Le(["","px"])),c)}}),D({text:"∙∙∙",fn:function(){var e=Ne(),n=e.mouseMove,t=e.mouseDown,r=e.mouseUp,a=e.$inDrag;Object(E.spec)({data:{active:a}});var l=Object(A.createStore)(0,{loc:{file:"/src/view.ts",line:71,column:35},name:"$shift",sid:"-gu5e3i"}),u=Object(A.sample)({"ɔ":[o,t,function(e,n){return{block:e,event:n}}],config:{loc:{file:"/src/view.ts",line:72,column:38},name:"dragStart",sid:"-y074ky"}}),s=Object(A.sample)({"ɔ":[o,n,function(e,n){return e.getBoundingClientRect().right-n.clientX}],config:{loc:{file:"/src/view.ts",line:73,column:37},name:"dragMove",sid:"v4e7l1"}}),f=Object(A.sample)({"ɔ":[l,s,function(e,n){return n-e}],config:{loc:{file:"/src/view.ts",line:77,column:41},name:"correctWidth",sid:"-5n34ap"}});c.on(f,(function(e,n){return n})),l.on(u,(function(e,n){var t=n.block,r=n.event;return t?t.getBoundingClientRect().left-r.clientX:0})),Object(A.sample)({"ɔ":[c,r,i.save],config:{loc:{file:"/src/view.ts",line:80,column:20},sid:"p40ua2"}})}}),ce({stores:{title:"Stores",fn:function(){ke(e)}},effects:{title:"Effects",fn:function(){Ue(t)}},events:{title:"Events",fn:function(){ze(n)}},logs:{title:"Logs",fn:function(){ge(r,_e)}}})}})}"object"===("undefined"==typeof document?"undefined":Be(document))&&document.addEventListener("keypress",(function(e){e.ctrlKey&&("l"!==e.key&&12!==e.keyCode||_e(),"b"!==e.key&&2!==e.keyCode||Re())})),qe.on(Re,(function(e){return!e})).on(Je,(function(){return!0}));function Xe(e){return(Xe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function He(e){return function(e){if(Array.isArray(e))return Ve(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,n){if(!e)return;if("string"==typeof e)return Ve(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Ve(e,n)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ve(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function Ge(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Qe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Ge(Object(t),!0).forEach((function(n){Ye(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ge(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function Ye(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var Ze=Object(A.createEvent)({loc:{file:"/src/index.ts",line:5,column:17},name:"storeAdd",sid:"-wopdia"}),en=Object(A.createEvent)({loc:{file:"/src/index.ts",line:6,column:21},name:"storeUpdated",sid:"vmsjku"}),nn=Object(A.createStore)({},{loc:{file:"/src/index.ts",line:7,column:16},name:"$stores",sid:"i7hdcj"}),tn=Object(A.createEvent)({loc:{file:"/src/index.ts",line:8,column:17},name:"eventAdd",sid:"-or028u"}),rn=Object(A.createEvent)({loc:{file:"/src/index.ts",line:9,column:23},name:"eventTriggered",sid:"86fn0c"}),on=Object(A.createStore)({},{loc:{file:"/src/index.ts",line:10,column:16},name:"$events",sid:"-bopi5k"}),cn=Object(A.createEvent)({loc:{file:"/src/index.ts",line:11,column:18},name:"effectAdd",sid:"exj8si"}),an=Object(A.createEvent)({loc:{file:"/src/index.ts",line:12,column:24},name:"effectTriggered",sid:"-wmuqs0"}),ln=Object(A.createStore)({},{loc:{file:"/src/index.ts",line:13,column:17},name:"$effects",sid:"-548kt"}),un=Object(A.createStore)([],{loc:{file:"/src/index.ts",line:14,column:14},name:"$logs",sid:"dr2ta8"});nn.on(Ze,(function(e,n){return Qe(Qe({},e),{},Ye({},n.name,{value:n.store.getState(),mapped:n.mapped}))})).on(en,(function(e,n){var t=n.name,r=n.value;return e[t]=Qe(Qe({},e[t]),{},{value:r}),Qe({},e)})),on.on(tn,(function(e,n){return Qe(Qe({},e),{},Ye({},n.name,{mapped:n.mapped,lastTriggeredWith:void 0}))})).on(rn,(function(e,n){var t=n.name,r=n.params;return e[t]=Qe(Qe({},e[t]),{},{lastTriggeredWith:r}),Qe({},e)})),ln.on(cn,(function(e,n){return Qe(Qe({},e),{},Ye({},n.sid,{name:n.name,effect:n.effect,inFlight:n.effect.inFlight.getState()}))})).on(an,(function(e,n){var t=n.sid,r=e[t];return e[t]=Qe(Qe({},r),{},{inFlight:r.effect.inFlight.getState()}),Qe({},e)}));var sn=1e3,fn=Object(A.createEffect)({handler:function(e){var n=e.name,t=e.kind,r=e.payload;return{id:(++sn).toString(36),kind:t,name:n,payload:r,datetime:new Date}}},{loc:{file:"/src/index.ts",line:60,column:23},name:"createRecordFx",sid:"-loxrq9"});function dn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n="object"===("undefined"==typeof document?"undefined":Xe(document))&&document.createElement("div");if(n)return n.classList.add("effector-inspector"),document.body.append(n),Object(E.using)(n,(function(){return Ke(nn,on,ln,un,e.visible)})),Object(E.using)(n,P.StyledRoot),{root:n}}function pn(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.name||vn(e);Ze({store:e,name:t,mapped:n.mapped||!1}),Object(A.forward)({"ɔ":{from:e.updates.map((function(e){return{name:t,value:e}})),to:en},config:{loc:{file:"/src/index.ts",line:101,column:4},sid:"-4z1lr5"}})}function bn(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.name||vn(e);tn({event:e,name:t,mapped:n.mapped||!1}),Object(A.forward)({"ɔ":{from:e.map((function(e){return{name:t,params:e}})),to:rn},config:{loc:{file:"/src/index.ts",line:109,column:4},sid:"-4un909"}})}function mn(e){var n,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=vn(e),o=t.sid||e.sid||r;cn({effect:e,name:r,sid:o,attached:null!==(n=t.attached)&&void 0!==n&&n}),Object(A.forward)({"ɔ":{from:[e,e.finally],to:an.prepend((function(){return{sid:o}}))},config:{loc:{file:"/src/index.ts",line:121,column:4},sid:"-40ycyr"}});var i=e.map((function(e){return{kind:"effect",name:r,payload:e}})),c=e.done.map((function(e){return{kind:"effect",name:r+".done",payload:e}})),a=e.fail.map((function(e){return{kind:"effect",name:r+".fail",payload:e}}));Object(A.forward)({"ɔ":{from:[i,c,a],to:fn},config:{loc:{file:"/src/index.ts",line:140,column:4},sid:"-33ewrq"}})}function vn(e){return e.compositeName.path.join("/")}Object(A.forward)({"ɔ":{from:rn,to:fn.prepend((function(e){return{kind:"event",name:e.name,payload:e.params}}))},config:{loc:{file:"/src/index.ts",line:71,column:0},sid:"-8rhkph"}}),Object(A.forward)({"ɔ":{from:en,to:fn.prepend((function(e){return{kind:"store",name:e.name,payload:e.value}}))},config:{loc:{file:"/src/index.ts",line:79,column:0},sid:"-8n37yl"}}),un.on(fn.doneData,(function(e,n){return[n].concat(He(e))}))}]); | ||
//# sourceMappingURL=common.js.map |
import { Spec } from 'foliage'; | ||
export declare const Container: import("foliage").Component; | ||
export declare const DragHandler: import("foliage").Component; | ||
export declare const Section: import("foliage").Component; | ||
@@ -4,0 +5,0 @@ export declare const SectionHead: import("foliage").Component; |
@@ -1,3 +0,3 @@ | ||
import { Store } from 'effector'; | ||
import { Store, Event } from 'effector'; | ||
import { LogMeta } from './types.h'; | ||
export declare function Logs($logs: Store<LogMeta[]>): void; | ||
export declare function Logs($logs: Store<LogMeta[]>, hotKeyClear: Event<void>): void; |
@@ -1,8 +0,10 @@ | ||
export declare function createSetting(name: string): { | ||
read: (defaultValue: string) => string; | ||
export declare function createSetting(name: string, defaultValue: string): { | ||
read: () => string; | ||
write: (value: string) => string; | ||
save: import("effector").Event<string>; | ||
}; | ||
export declare function createJsonSetting<T>(name: string): { | ||
read: (defaultValue: T) => T; | ||
export declare function createJsonSetting<T>(name: string, defaultValue: T): { | ||
read: () => T; | ||
write: (value: T) => T; | ||
save: import("effector").Event<T>; | ||
}; |
{ | ||
"name": "effector-inspector", | ||
"version": "0.4.2", | ||
"version": "0.5.0", | ||
"main": "./dist/common.js", | ||
@@ -15,3 +15,5 @@ "types": "./dist/index.d.ts", | ||
"prepublishOnly": "yarn build", | ||
"start": "parcel serve ./usage/index.html" | ||
"start": "parcel serve ./usage/index.html", | ||
"lint:style": "stylelint src/**/*.{js,css,ts,tsx} --fix", | ||
"format": "prettier --write 'src/**/*.{js,css,ts,tsx}'" | ||
}, | ||
@@ -31,7 +33,8 @@ "devDependencies": { | ||
"cz-conventional-changelog": "3.0.2", | ||
"effector": "^21.8.3", | ||
"effector": "^21.8.8", | ||
"eslint": "^6.6.0", | ||
"eslint-plugin-prettier": "^3.1.2", | ||
"eslint-plugin-react": "^7.17.0", | ||
"husky": "3.1.0", | ||
"husky": "^5.1.3", | ||
"lint-staged": "^10.5.4", | ||
"parcel-bundler": "^1.12.4", | ||
@@ -41,5 +44,8 @@ "prettier": "^1.19.1", | ||
"react-dom": "^16.11.0", | ||
"stylelint": "^13.12.0", | ||
"stylelint-config-rational-order": "^0.1.2", | ||
"stylelint-config-recommended": "^4.0.0", | ||
"terser-webpack-plugin": "^2.3.5", | ||
"ts-loader": "^8.0.1", | ||
"typescript": "^4.1.5", | ||
"typescript": "^4.2.3", | ||
"typescript-plugin-styled-components": "^1.4.4", | ||
@@ -46,0 +52,0 @@ "webpack": "^4.41.6", |
# Effector Inspector | ||
![Effector-Inspector](https://i.imgur.com/D5oqpLv.png) | ||
| Dark theme and simple log list | Stores with inspectable values | | ||
| --------------------------------------------- | ------------------------------------------ | | ||
| ![Dark-Logs](https://i.imgur.com/17j8ZRw.png) | ![Stores](https://i.imgur.com/R2Wx3Oe.png) | | ||
@@ -5,0 +7,0 @@ ## Installation |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
45
2
111109
31
15
276