Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-dev-os

Package Overview
Dependencies
Maintainers
1
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-dev-os - npm Package Compare versions

Comparing version 0.0.9 to 0.0.10

src/library/ui/common/Resizable/children/index.js

2

dist/bundle.js

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

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):"object"==typeof exports?exports.devOS=t(require("react")):e.devOS=t(e.react)}(window,(function(e){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="/",r(r.s=6)}([function(t,r){t.exports=e},function(e,t){},function(e,t,r){window,e.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="/",r(r.s=0)}([function(e,t,r){"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){i(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,o=!1,i=void 0;try{for(var c,u=e[Symbol.iterator]();!(n=(c=u.next()).done)&&(r.push(c.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{n||null==u.return||u.return()}finally{if(o)throw i}}return r}}(e,t)||function(e,t){if(e){if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}(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 u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}r.r(t),r.d(t,"Store",(function(){return v}));var a={isPending:!1,isError:!1,error:null,shouldThrowErrors:!0,shouldTrackAsyncState:!0},f=function(e){return Object.entries(e).reduce((function(e,t){var r=c(t,2),n=r[0],i=r[1],u="function"!=typeof i;return e[n]={configs:u?o({},a,{},i.configs):a,reducer:u?i.reducer:i},e}),{})},s=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.entries(e).reduce((function(e,t){var r=c(t,2),n=(r[0],r[1]),o=n.actions,i=void 0===o?{}:o,u=n.name,a=n.state,s=void 0===a?null:a;return e[u]={actions:f(i),state:s},e}),{})};function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function p(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach((function(t){b(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function b(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function y(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,o=!1,i=void 0;try{for(var c,u=e[Symbol.iterator]();!(n=(c=u.next()).done)&&(r.push(c.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{n||null==u.return||u.return()}finally{if(o)throw i}}return r}}(e,t)||function(e,t){if(e){if("string"==typeof e)return O(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?O(e,t):void 0}}(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 O(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function d(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var v=function(){function e(t){var r=t.name,n=void 0===r?"":r,o=t.services,i=void 0===o?{}:o,c=t.types;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.lastUid=0,this.name=n,this.services=i,this.subscribers={},this.types=s(c),this._typeConfigs=c}var t,r;return t=e,(r=[{key:"dispatch",value:function(e,t){var r=y(this._tokenizeAction(e),2),n=r[0],o=r[1],i=this.types[n],c=i.actions[o];return this._setState({typeName:n})(c.reducer({prevState:i.state,services:this.services},t)),this.types[n].state}},{key:"dispatchAsync",value:function(e,t){var r=y(this._tokenizeAction(e),2),n=r[0],o=r[1],i=this.types[n],c=i.actions[o],u=c.configs.shouldTrackAsyncState,a=this._setConfigs({actionName:o,typeName:n}),f=this._setState({typeName:n});return u&&a({isPending:!0,isError:!1,error:null}),Promise.resolve(c.reducer({prevState:i.state,services:this.services},t)).then((function(e){return u&&a({isPending:!1},!1),f(e),e})).catch((function(e){return u&&a({isPending:!1,isError:!0,error:e}),u?c.configs.shouldThrowErrors&&Promise.reject(e):Promise.reject(e)}))}},{key:"getError",value:function(e){var t=y(this._tokenizeAction(e),2),r=t[0],n=t[1];return this.types[r].actions[n].configs.error}},{key:"getState",value:function(e){return e?this.types[e].state:Object.entries(this.types).reduce((function(e,t){var r=y(t,2),n=r[0],o=r[1].state;return e[n]=o,e}),{})}},{key:"isError",value:function(e){var t=y(this._tokenizeAction(e),2),r=t[0],n=t[1];return this.types[r].actions[n].configs.isError}},{key:"isPending",value:function(e){var t=y(this._tokenizeAction(e),2),r=t[0],n=t[1];return this.types[r].actions[n].configs.isPending}},{key:"subscribe",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){},r="uid_".concat(++this.lastUid);return this.subscribers[r]=t,t(this),{onNotify:t,token:r,unsubscribe:function(){return e._unsubscribe(r)}}}},{key:"_notify",value:function(){var e=this;Object.values(this.subscribers).forEach((function(t){return t(e)}))}},{key:"reset",value:function(){this.lastUid=0,this.subscribers={},this.types=s(this._typeConfigs)}},{key:"_setConfigs",value:function(e){var t=this,r=e.actionName,n=e.typeName;return function(e){var o=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=t.types[n].actions[r].configs;return t.types[n].actions[r].configs=p({},i,{},e),o&&t._notify()}}},{key:"_setState",value:function(e){var t=this,r=e.typeName;return function(e){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return t.types[r].state=e,n&&t._notify()}}},{key:"_tokenizeAction",value:function(e){var t=y(e.split("."),1)[0];return[t,e.slice(t.length+1)]}},{key:"_unsubscribe",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;delete this.subscribers[e]}}])&&d(t.prototype,r),e}()}])},function(e,t){},function(e,t,r){e.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=0)}([function(e,t,r){"use strict";r.r(t);var n={error:function(e,t){if(e instanceof Error)return e;try{return t(e)}catch(e){return e instanceof Error?e:Error(e)}},maybe:function(e,t){return null!=e?t(e):null},sync:function(e,t){return e instanceof Promise?e.then((function(e){return t(e)})):t(e)}};t.default=function(e){var t=function(e,t){return t(e)};return function e(r){return{bind:function(o){return t="string"==typeof o?n[o]:o,e(r)},flow:function(n){return e(t(r,n))},close:function(e){return e?e(r):r}}}(e)}}]).default},function(e,t){},function(e,t,r){"use strict";r.r(t);var n=r(0),o=r.n(n),i=r(1),c=r.n(i);function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach((function(t){f(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function f(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var s=function(e){return o.a.createElement("div",{style:a(a({},c.a.container),e.style),title:e.title},e.children)};s.defaultProps={children:null,title:null};var l=s,p=function(e){return o.a.createElement("div",e)};function b(){return(b=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}var y=o.a.forwardRef((function(e,t){return o.a.createElement("div",b({},e,{ref:t}))}));function O(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function d(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function v(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 r=[],n=!0,o=!1,i=void 0;try{for(var c,u=e[Symbol.iterator]();!(n=(c=u.next()).done)&&(r.push(c.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{n||null==u.return||u.return()}finally{if(o)throw i}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return j(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return j(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 j(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var g=function(e){var t=e.isActive,r=Object(n.useRef)(null),o=v(D({isOpen:!1,position:{x:0,y:0}}),2),i=o[0],c=o[1],u=function(e){t&&!i.isOpen&&(c({isOpen:!0,position:{x:e.clientX,y:e.clientY}}),e.preventDefault(),e.stopPropagation())},a=function(){return c({isOpen:!1})},f=function(){return a()},s=function(){return a()};return Object(n.useEffect)((function(){return window.addEventListener("mousedown",s),window.addEventListener("click",f),function(){window.removeEventListener("mousedown",s),window.removeEventListener("click",f)}}),[i.isOpen]),Object(n.useEffect)((function(){var e=r.current;if(e)return e.addEventListener("contextmenu",u),function(){e.removeEventListener("contextmenu",u)}}),[r.current,t]),function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?O(Object(r),!0).forEach((function(t){d(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):O(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({ref:r},i)};function m(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 r=[],n=!0,o=!1,i=void 0;try{for(var c,u=e[Symbol.iterator]();!(n=(c=u.next()).done)&&(r.push(c.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{n||null==u.return||u.return()}finally{if(o)throw i}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return w(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return w(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 w(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function P(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?h(Object(r),!0).forEach((function(t){S(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):h(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function S(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function x(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 r=[],n=!0,o=!1,i=void 0;try{for(var c,u=e[Symbol.iterator]();!(n=(c=u.next()).done)&&(r.push(c.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{n||null==u.return||u.return()}finally{if(o)throw i}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return E(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return E(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 E(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var D=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object(n.useState)(e),r=x(t,2),o=r[0],i=r[1],c=function(e){i(e instanceof Function?function(t){return P(P({},t),e(t))}:function(t){return P(P({},t),e)})};return[o,c]},A=function(e,t){Object(n.useEffect)((function(){return window.addEventListener(e,t),function(){return window.removeEventListener(e,t)}}),[e,t])};function k(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 r=[],n=!0,o=!1,i=void 0;try{for(var c,u=e[Symbol.iterator]();!(n=(c=u.next()).done)&&(r.push(c.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{n||null==u.return||u.return()}finally{if(o)throw i}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return I(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return I(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 I(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function C(e){return function(e){if(Array.isArray(e))return _(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 _(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _(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 _(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function M(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function T(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?M(Object(r),!0).forEach((function(t){U(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):M(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function U(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function L(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function R(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?L(Object(r),!0).forEach((function(t){W(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):L(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function W(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function z(e){return function(e){if(Array.isArray(e))return N(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 N(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return N(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 N(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function $(e){return function(e){if(Array.isArray(e))return F(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 F(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return F(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 F(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function H(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function q(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?H(Object(r),!0).forEach((function(t){B(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):H(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function B(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function X(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Y(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?X(Object(r),!0).forEach((function(t){V(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):X(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function V(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var G={actions:{add:function(e,t){var r=e.prevState,n=T({},r.byId),o=C(r.orderedIds);return n[t.id]=t,o.push(t.id),T(T({},r),{},{byId:n,orderedIds:o})},focus:function(e,t){var r=e.prevState,n=z(r.orderedIds).sort((function(e,r){return e===t?1:r===t?-1:0}));return R(R({},r),{},{orderedIds:n})},remove:function(e,t){var r=e.prevState,n=q({},r.byId),o=$(r.orderedIds).filter((function(e){return e!==t}));return delete n[t],q(q({},r),{},{byId:n,orderedIds:o})},update:function(e,t){var r=e.prevState,n=Y({},r.byId),o=n[t.id];return n[t.id]=Y(Y({},o),t),Y(Y({},r),{},{byId:n})}},name:"windows",state:{byId:{},orderedIds:[]}},J=new(r(2).Store)({name:"DEV_TOOLS",types:{windows:G}});window.store=J;var K=J;function Q(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Z(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Q(Object(r),!0).forEach((function(t){ee(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Q(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function ee(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var te=0,re=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.contextMenu,r=void 0===t?{}:t,n=e.events,o=void 0===n?{}:n;return Z(Z({id:te+=1,isOpaque:!0,type:"DEFAULT",title:"",component:function(){return null},position:{x:24,y:24},size:{width:300,height:200}},e),{},{contextMenu:Z({items:[],width:100},r),events:Z({onMove:function(){}},o)})},ne=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=re(e);K.dispatch("windows.add",t)},oe={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1"},ie={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",550:"#898989",600:"#757575",700:"#616161",750:"#424242",800:"#323232",900:"#212121"},ce={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"},ue={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c"},ae="#ffffff",fe={50:"#fffde7",100:"#fff9c4",200:"#fff59d",300:"#fff176",400:"#ffee58",500:"#ffeb3b",600:"#fdd835",700:"#fbc02d",800:"#f9a825",900:"#f57f17"},se={ellipsis:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},le={none:{WebkitUserSelect:"none",MozUserSelect:"none",MsUserSelect:"none",userSelect:"none"},text:{WebkitUserSelect:"text",MozUserSelect:"text",MsUserSelect:"text",userSelect:"text"}};function pe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function be(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var ye={view:function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?pe(Object(r),!0).forEach((function(t){be(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({flex:1,cursor:"pointer",padding:"3px 8px",fontSize:"13px",fontWeight:"700",color:ae},le.none),stripe:function(e){return e%2!=0&&{backgroundColor:ie[800]}},selected:function(e){return e&&{backgroundColor:oe[800]}}};function Oe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function de(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Oe(Object(r),!0).forEach((function(t){ve(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Oe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function ve(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function je(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 r=[],n=!0,o=!1,i=void 0;try{for(var c,u=e[Symbol.iterator]();!(n=(c=u.next()).done)&&(r.push(c.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{n||null==u.return||u.return()}finally{if(o)throw i}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return ge(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ge(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 ge(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var me=function(e){var t=e.closeWindow,r=e.configs,i=e.createWindow,c=e.index,u=e.label,a=e.style,f=je(Object(n.useState)(!1),2),s=f[0],l=f[1];return A("mouseup",(function(){return l(!1)})),o.a.createElement(p,{style:de(de(de(de({},ye.view),a),ye.stripe(c)),ye.selected(s)),onMouseDown:function(){return l(!0)},onMouseUp:function(){l(!1),t(),i(r)}},u)};me.defaultProps={closeWindow:function(){},configs:{},createWindow:function(){},index:0,label:"",style:{}};var we=me,he={flex:1,display:"flex",alignItems:"flex-start",overflowY:"auto"};function Pe(){return(Pe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function Se(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function xe(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Se(Object(r),!0).forEach((function(t){Ee(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Se(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ee(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var De=function(e){var t=e.closeWindow,r=e.createWindow,n=e.style,i=e.tools;return o.a.createElement(p,{style:xe(xe({},he),n)},i.map((function(e,n){return o.a.createElement(we,Pe({key:"ITEM_".concat(n),closeWindow:t,createWindow:r,index:n},e))})))};De.defaultProps={closeWindow:function(){},createWindow:function(){},style:{},tools:[]};var Ae=De,ke=r(3),Ie=r.n(ke);function Ce(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _e(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ce(Object(r),!0).forEach((function(t){Me(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ce(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Me(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Te=function(e){var t=e.style,r=e.tools;return A("keyup",(function(e){var t=e.target.tagName.toUpperCase();"INPUT"!==t&&"TEXTAREA"!==t&&84===e.keyCode&&ne({type:"TOOL_BROWSER",component:function(e){return Ae(_e({tools:r},e))},position:{x:24,y:window.innerHeight-184},size:{width:140,height:160}})})),o.a.createElement(p,{style:_e(_e({},Ie.a.view),t)})};Te.defaultProps={style:{},tools:[]};var Ue=Te,Le=function(e){return function(t,r){var o=k(Object(n.useState)(void 0===r?t(e):r),2),i=o[0],c=o[1];return Object(n.useEffect)((function(){var r=!1,n=e.subscribe((function(e){setTimeout((function(){return!r&&c(t(e))}),0)}));return function(){r=!0,n.unsubscribe()}}),[]),i}}(K);function Re(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 r=[],n=!0,o=!1,i=void 0;try{for(var c,u=e[Symbol.iterator]();!(n=(c=u.next()).done)&&(r.push(c.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{n||null==u.return||u.return()}finally{if(o)throw i}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return We(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))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 r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var ze=function(e){var t=Re(K.getState("windows").orderedIds.slice(-2,-1),1)[0];K.dispatch("windows.remove",e),K.dispatch("windows.focus",t)},Ne={view:{flex:1,display:"flex",borderRight:"1px solid ".concat(ie[700]),borderBottom:"1px solid ".concat(ie[700]),borderLeft:"1px solid ".concat(ie[700]),borderRadius:"0px 0px 6px 6px",backgroundColor:ie[900],overflow:"hidden"},component:{flex:1}};function $e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Fe(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?$e(Object(r),!0).forEach((function(t){He(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$e(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function He(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var qe=Object(n.memo)((function(e){var t=e.id,r=e.style,n=K.getState("windows").byId[t].component;return o.a.createElement(p,{style:Fe(Fe({},Ne.view),r)},o.a.createElement(n,{closeWindow:function(){return ze(t)},createWindow:ne,style:Ne.component}))}));qe.defaultProps={id:null,style:{}};var Be=qe;function Xe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ye(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Xe(Object(r),!0).forEach((function(t){Ve(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Xe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ve(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Ge={view:Ye(Ye({color:ae,fontSize:"14px",lineHeight:"24px",fontWeight:600,cursor:"pointer",textAlign:"left",padding:"0px 12px"},le.none),se.ellipsis),hovered:function(e){return e&&{backgroundColor:oe[800]}}};function Je(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ke(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Je(Object(r),!0).forEach((function(t){Qe(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Je(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Qe(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Ze=function(e){var t=e.label,r=e.onClick,i=e.style,c=function(){var e=Object(n.useRef)(null),t=m(Object(n.useState)(!1),2),r=t[0],o=t[1],i=function(){return o(!0)},c=function(){return o(!1)};return Object(n.useEffect)((function(){var t=e.current;if(t)return t.addEventListener("mouseover",i),t.addEventListener("mouseleave",c),function(){t.removeEventListener("mouseover",i),t.removeEventListener("mouseleave",c)}}),[e.current]),{isHovered:r,ref:e,setIsHovered:o}}(),u=c.isHovered,a=c.ref;return o.a.createElement(y,{style:Ke(Ke(Ke({},Ge.view),i),Ge.hovered(u)),onClick:r,ref:a},t)};Ze.defaultProps={label:"",onClick:function(){},style:{}};var et=Ze,tt=function(e){var t=e.position,r=t.x,n=t.y,o=e.width;return{position:"absolute",top:"".concat(n,"px"),left:"".concat(r,"px"),width:"".concat(o,"px"),display:"flex",flexDirection:"column",borderRadius:"6px",boxShadow:"rgba(0, 0, 0, 0.19) 0px 10px 15px -3px, 0 4px 6px -2px rgba(0, 0, 0, 0.05)",border:"1px solid ".concat(ie[600]),backgroundColor:ie[800],overflow:"hidden",padding:"6px 0px"}};function rt(){return(rt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function nt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ot(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?nt(Object(r),!0).forEach((function(t){it(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function it(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var ct=function(e){var t=e.isOpen,r=e.items,n=e.position,i=e.style,c=e.width;return t&&o.a.createElement(p,{style:ot(ot({},tt({position:n,width:c})),i),onMouseDown:function(e){return e.stopPropagation()}},r.map((function(e,t){return o.a.createElement(et,rt({key:"CONTEXT_ITEM_".concat(t)},e))})))};ct.defaultProps={isOpen:!1,items:[],position:{x:0,y:0},style:{},width:0};var ut=ct,at=r(4),ft=r.n(at);function st(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function lt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?st(Object(r),!0).forEach((function(t){pt(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):st(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function pt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var bt=function(e){var t={x:e.position.x,y:e.position.y<0?0:e.position.y};return lt(lt({},e),{},{position:t})},yt=function(e){var t=window.innerHeight-23,r={x:e.position.x,y:e.position.y>t?t:e.position.y};return lt(lt({},e),{},{position:r})},Ot=function(e){var t=-(e.size.width-23),r={x:e.position.x<t?t:e.position.x,y:e.position.y};return lt(lt({},e),{},{position:r})},dt=function(e){var t=window.innerWidth-23,r={x:e.position.x>t?t:e.position.x,y:e.position.y};return lt(lt({},e),{},{position:r})},vt=function(e,t){var r=K.getState("windows").byId[t];if(r){var n=function(e){var t=e.event,r=e.window,n=r.position.y,o=r.position.x;return ft()({position:{x:o+t.movementX,y:n+t.movementY},size:r.size}).flow(bt).flow(yt).flow(Ot).flow(dt).close().position}({event:e,window:r});K.dispatch("windows.update",{id:t,position:n}),r.events.onMove(e)}e.stopPropagation(),e.preventDefault()},jt=function(e){return{height:"12px",width:"12px",borderRadius:"50%",backgroundColor:e.primaryColor}};function gt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function mt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?gt(Object(r),!0).forEach((function(t){wt(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function wt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var ht=function(e){var t=e.onClick,r=e.primaryColor,n=e.style;return o.a.createElement(p,{style:mt(mt({},jt({primaryColor:r})),n),onClick:t})};ht.defaultProps={onClick:function(){},primaryColor:"",style:{}};var Pt=ht,St={view:{display:"flex"},marginRight:{marginRight:"6px"}};function xt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Et(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?xt(Object(r),!0).forEach((function(t){Dt(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Dt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var At=function(e){var t=e.isFocused,r=e.onClose,n=e.style;return o.a.createElement(p,{style:Et(Et({},St.view),n)},o.a.createElement(Pt,{style:St.marginRight,primaryColor:t?ue[500]:ie[550],onClick:r}),o.a.createElement(Pt,{style:St.marginRight,primaryColor:t?fe[700]:ie[550]}),o.a.createElement(Pt,{primaryColor:t?ce[500]:ie[550]}))};At.defaultProps={isFocused:!1,onClose:function(){},style:{}};var kt=At;function It(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ct(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?It(Object(r),!0).forEach((function(t){_t(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):It(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _t(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Mt={view:{display:"flex",justifyContent:"center",alignItems:"center",padding:"0px 6px",backgroundColor:ie[750],overflow:"hidden",borderTop:"1px solid ".concat(ie[600]),borderRight:"1px solid ".concat(ie[600]),borderLeft:"1px solid ".concat(ie[600]),borderRadius:"6px 6px 0px 0px"},focused:function(e){return e&&{backgroundColor:ie[800]}},actionButtons:{flex:1,paddingRight:"16px"},title:Ct(Ct({color:ie[50],fontSize:"13px",fontWeight:700,paddingRight:"16px"},le.none),se.ellipsis),flexSpacer:{flex:1}};function Tt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ut(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Tt(Object(r),!0).forEach((function(t){Lt(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Tt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Lt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Rt=function(e){var t=e.id,r=e.isFocused,i=e.style,c=function(e){var t=e.onMove,r=void 0===t?function(){}:t,o=Object(n.useRef)(!1).current,i=Object(n.useRef)(null),c=function(e){return o&&r(e)},u=function e(){o=!1,window.removeEventListener("mouseup",e),window.removeEventListener("mousemove",c)},a=function(){o=!0,window.addEventListener("mouseup",u),window.addEventListener("mousemove",c)};return Object(n.useEffect)((function(){var e=i.current;if(e)return e.addEventListener("mousedown",a),function(){e.removeEventListener("mousedown",a)}}),[i.current]),{ref:i}}({onMove:function(e){return vt(e,t)}}).ref,u=Le((function(e){return e.getState("windows").byId[t]})),a=u.isOpaque,f=u.title;return o.a.createElement(y,{style:Ut(Ut(Ut({},Mt.view),i),Mt.focused(r)),onDoubleClick:function(){return store.dispatch("windows.update",{id:t,isOpaque:!a})},ref:c},o.a.createElement(kt,{style:Mt.actionButtons,isFocused:r,onClose:function(){return a&&ze(t)}}),o.a.createElement(l,{style:Mt.title},f),o.a.createElement(p,{style:Mt.flexSpacer}))};Rt.defaultProps={id:null,isFocused:!1,style:{}};var Wt=Rt,zt={view:function(e){var t=e.position,r=t.x,n=t.y,o=e.size,i=o.width,c=o.height,u=e.isOpaque;return{position:"absolute",transform:"translate(".concat(r,"px, ").concat(n,"px)"),display:"flex",flexDirection:"column",height:"".concat(c,"px"),width:"".concat(i,"px"),borderRadius:"6px",opacity:u?1:.1,pointerEvents:u?"auto":"none",boxShadow:"rgba(0, 0, 0, 0.19) 0px 10px 15px -3px, 0 4px 6px -2px rgba(0, 0, 0, 0.05)"}},header:{pointerEvents:"auto",minHeight:"24px",height:"24px"}};function Nt(){return(Nt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function $t(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ft(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?$t(Object(r),!0).forEach((function(t){Ht(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$t(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ht(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function qt(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 r=[],n=!0,o=!1,i=void 0;try{for(var c,u=e[Symbol.iterator]();!(n=(c=u.next()).done)&&(r.push(c.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{n||null==u.return||u.return()}finally{if(o)throw i}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Bt(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Bt(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 Bt(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Xt=function(e){var t=e.id,r=e.style,n=Le((function(e){return e.getState("windows").byId[t]})),i=g({isActive:n.contextMenu.items.length>0}),c=i.isOpen,u=i.position,a=i.ref,f=Le((function(e){var r=qt(e.getState("windows").orderedIds.slice(-1),1)[0];return t===r}));return o.a.createElement(y,{style:Ft(Ft({},zt.view(n)),r),onMouseDown:function(){return!f&&K.dispatch("windows.focus",t)},ref:a},o.a.createElement(Wt,{style:zt.header,id:t,isFocused:f}),o.a.createElement(Be,{id:t}),o.a.createElement(ut,Nt({isOpen:c,position:{x:u.x-n.position.x,y:u.y-n.position.y}},n.contextMenu)))};Xt.defaultProps={id:null,style:{}};var Yt=Xt,Vt=r(5),Gt=r.n(Vt);function Jt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Kt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Jt(Object(r),!0).forEach((function(t){Qt(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Jt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Qt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Zt=function(e){var t=e.style,r=Le((function(e){return e.getState("windows").orderedIds}));return o.a.createElement(p,{style:Kt(Kt({},Gt.a.view),t)},r.map((function(e){return o.a.createElement(Yt,{key:"WINDOW_".concat(e),id:e})})))};Zt.defaultProps={style:{}};var er=Zt,tr={position:"absolute",top:0,left:0,width:"100%",height:"100%",zIndex:2147483647,boxSizing:"border-box",verticalAlign:"baseline",lineHeight:"1.5",border:0,margin:0,padding:0,overflow:"hidden",pointerEvents:"none"};function rr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function nr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?rr(Object(r),!0).forEach((function(t){or(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function or(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var ir=function(e){var t=e.style,r=e.tools;return o.a.createElement(p,{style:nr(nr({},tr),t)},o.a.createElement(Ue,{tools:r}),o.a.createElement(er,null))};ir.defaultProps={style:{},tools:[]};var cr=ir;t.default=cr}])}));
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):"object"==typeof exports?exports.devOS=t(require("react")):e.devOS=t(e.react)}(window,(function(e){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="/",r(r.s=7)}([function(t,r){t.exports=e},function(e,t,r){e.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=0)}([function(e,t,r){"use strict";r.r(t);var n={error:function(e,t){if(e instanceof Error)return e;try{return t(e)}catch(e){return e instanceof Error?e:Error(e)}},maybe:function(e,t){return null!=e?t(e):null},sync:function(e,t){return e instanceof Promise?e.then((function(e){return t(e)})):t(e)}};t.default=function(e){var t=function(e,t){return t(e)};return function e(r){return{bind:function(o){return t="string"==typeof o?n[o]:o,e(r)},flow:function(n){return e(t(r,n))},close:function(e){return e?e(r):r}}}(e)}}]).default},function(e,t){},function(e,t){},function(e,t,r){window,e.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="/",r(r.s=0)}([function(e,t,r){"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){i(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,o=!1,i=void 0;try{for(var c,u=e[Symbol.iterator]();!(n=(c=u.next()).done)&&(r.push(c.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{n||null==u.return||u.return()}finally{if(o)throw i}}return r}}(e,t)||function(e,t){if(e){if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}(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 u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}r.r(t),r.d(t,"Store",(function(){return v}));var a={isPending:!1,isError:!1,error:null,shouldThrowErrors:!0,shouldTrackAsyncState:!0},f=function(e){return Object.entries(e).reduce((function(e,t){var r=c(t,2),n=r[0],i=r[1],u="function"!=typeof i;return e[n]={configs:u?o({},a,{},i.configs):a,reducer:u?i.reducer:i},e}),{})},s=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.entries(e).reduce((function(e,t){var r=c(t,2),n=(r[0],r[1]),o=n.actions,i=void 0===o?{}:o,u=n.name,a=n.state,s=void 0===a?null:a;return e[u]={actions:f(i),state:s},e}),{})};function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function p(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach((function(t){b(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function b(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function y(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,o=!1,i=void 0;try{for(var c,u=e[Symbol.iterator]();!(n=(c=u.next()).done)&&(r.push(c.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{n||null==u.return||u.return()}finally{if(o)throw i}}return r}}(e,t)||function(e,t){if(e){if("string"==typeof e)return O(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?O(e,t):void 0}}(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 O(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function d(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var v=function(){function e(t){var r=t.name,n=void 0===r?"":r,o=t.services,i=void 0===o?{}:o,c=t.types;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.lastUid=0,this.name=n,this.services=i,this.subscribers={},this.types=s(c),this._typeConfigs=c}var t,r;return t=e,(r=[{key:"dispatch",value:function(e,t){var r=y(this._tokenizeAction(e),2),n=r[0],o=r[1],i=this.types[n],c=i.actions[o];return this._setState({typeName:n})(c.reducer({prevState:i.state,services:this.services},t)),this.types[n].state}},{key:"dispatchAsync",value:function(e,t){var r=y(this._tokenizeAction(e),2),n=r[0],o=r[1],i=this.types[n],c=i.actions[o],u=c.configs.shouldTrackAsyncState,a=this._setConfigs({actionName:o,typeName:n}),f=this._setState({typeName:n});return u&&a({isPending:!0,isError:!1,error:null}),Promise.resolve(c.reducer({prevState:i.state,services:this.services},t)).then((function(e){return u&&a({isPending:!1},!1),f(e),e})).catch((function(e){return u&&a({isPending:!1,isError:!0,error:e}),u?c.configs.shouldThrowErrors&&Promise.reject(e):Promise.reject(e)}))}},{key:"getError",value:function(e){var t=y(this._tokenizeAction(e),2),r=t[0],n=t[1];return this.types[r].actions[n].configs.error}},{key:"getState",value:function(e){return e?this.types[e].state:Object.entries(this.types).reduce((function(e,t){var r=y(t,2),n=r[0],o=r[1].state;return e[n]=o,e}),{})}},{key:"isError",value:function(e){var t=y(this._tokenizeAction(e),2),r=t[0],n=t[1];return this.types[r].actions[n].configs.isError}},{key:"isPending",value:function(e){var t=y(this._tokenizeAction(e),2),r=t[0],n=t[1];return this.types[r].actions[n].configs.isPending}},{key:"subscribe",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){},r="uid_".concat(++this.lastUid);return this.subscribers[r]=t,t(this),{onNotify:t,token:r,unsubscribe:function(){return e._unsubscribe(r)}}}},{key:"_notify",value:function(){var e=this;Object.values(this.subscribers).forEach((function(t){return t(e)}))}},{key:"reset",value:function(){this.lastUid=0,this.subscribers={},this.types=s(this._typeConfigs)}},{key:"_setConfigs",value:function(e){var t=this,r=e.actionName,n=e.typeName;return function(e){var o=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=t.types[n].actions[r].configs;return t.types[n].actions[r].configs=p({},i,{},e),o&&t._notify()}}},{key:"_setState",value:function(e){var t=this,r=e.typeName;return function(e){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return t.types[r].state=e,n&&t._notify()}}},{key:"_tokenizeAction",value:function(e){var t=y(e.split("."),1)[0];return[t,e.slice(t.length+1)]}},{key:"_unsubscribe",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;delete this.subscribers[e]}}])&&d(t.prototype,r),e}()}])},function(e,t){},function(e,t){},function(e,t,r){"use strict";r.r(t);var n=r(0),o=r.n(n);function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u(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 r=[],n=!0,o=!1,i=void 0;try{for(var c,u=e[Symbol.iterator]();!(n=(c=u.next()).done)&&(r.push(c.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{n||null==u.return||u.return()}finally{if(o)throw i}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return a(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 a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var f=function(e){var t=e.isActive,r=Object(n.useRef)(null),o=u(g({isOpen:!1,position:{x:0,y:0}}),2),a=o[0],f=o[1],s=function(e){t&&!a.isOpen&&(f({isOpen:!0,position:{x:e.clientX,y:e.clientY}}),e.preventDefault(),e.stopPropagation())},l=function(){return f({isOpen:!1})},p=function(){return l()},b=function(){return l()};return Object(n.useEffect)((function(){return window.addEventListener("mousedown",b),window.addEventListener("click",p),function(){window.removeEventListener("mousedown",b),window.removeEventListener("click",p)}}),[a.isOpen]),Object(n.useEffect)((function(){var e=r.current;if(e)return e.addEventListener("contextmenu",s),function(){e.removeEventListener("contextmenu",s)}}),[r.current,t]),function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){c(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({ref:r},a)};function s(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 r=[],n=!0,o=!1,i=void 0;try{for(var c,u=e[Symbol.iterator]();!(n=(c=u.next()).done)&&(r.push(c.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{n||null==u.return||u.return()}finally{if(o)throw i}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return l(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 l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var p=function(){var e=Object(n.useRef)(null),t=s(Object(n.useState)(!1),2),r=t[0],o=t[1],i=function(){return o(!0)},c=function(){return o(!1)};return Object(n.useEffect)((function(){var t=e.current;if(t)return t.addEventListener("mouseover",i),t.addEventListener("mouseleave",c),function(){t.removeEventListener("mouseover",i),t.removeEventListener("mouseleave",c)}}),[e.current]),{isHovered:r,ref:e,setIsHovered:o}};function b(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function y(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?b(Object(r),!0).forEach((function(t){O(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):b(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function O(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function d(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 r=[],n=!0,o=!1,i=void 0;try{for(var c,u=e[Symbol.iterator]();!(n=(c=u.next()).done)&&(r.push(c.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{n||null==u.return||u.return()}finally{if(o)throw i}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return v(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return v(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 v(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var g=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object(n.useState)(e),r=d(t,2),o=r[0],i=r[1],c=function(e){i(e instanceof Function?function(t){return y(y({},t),e(t))}:function(t){return y(y({},t),e)})};return[o,c]},h=function(e,t){Object(n.useEffect)((function(){return window.addEventListener(e,t),function(){return window.removeEventListener(e,t)}}),[e,t])};function m(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 r=[],n=!0,o=!1,i=void 0;try{for(var c,u=e[Symbol.iterator]();!(n=(c=u.next()).done)&&(r.push(c.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{n||null==u.return||u.return()}finally{if(o)throw i}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return j(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return j(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 j(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var w=function(e){return{height:"5px",width:"5px",cursor:e}};function P(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function S(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?P(Object(r),!0).forEach((function(t){x(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):P(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function x(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,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 r=[],n=!0,o=!1,i=void 0;try{for(var c,u=e[Symbol.iterator]();!(n=(c=u.next()).done)&&(r.push(c.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{n||null==u.return||u.return()}finally{if(o)throw i}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return D(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return D(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 D(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var A=function(e){var t=e.cursor,r=e.onResize,i=e.style,c=E(Object(n.useState)(!1),2),u=c[0],a=c[1];return h("mouseup",(function(e){u&&(a(!1),e.preventDefault(),e.stopPropagation())})),h("mousemove",(function(e){u&&(r(e),e.preventDefault(),e.stopPropagation())})),o.a.createElement(G,{style:S(S({},w(t)),i),draggable:!1,onMouseDown:function(e){a(!0),e.preventDefault(),e.stopPropagation()}})};A.defaultProps={cursor:"nwse-resize",onResize:function(){},style:{}};var k=A,I={top:{position:"absolute",top:"-2px",left:"0px",width:"100%"},left:{position:"absolute",top:"0px",left:"-2px",height:"100%"},right:{position:"absolute",top:"0px",right:"-2px",height:"100%"},bottom:{position:"absolute",bottom:"-2px",left:"0px",width:"100%"},topLeft:{position:"absolute",top:"-2px",left:"-2px",height:"10px",width:"10px"},topRight:{position:"absolute",top:"-2px",right:"-2px",height:"10px",width:"10px"},bottomLeft:{position:"absolute",bottom:"-2px",left:"-2px",height:"10px",width:"10px"},bottomRight:{position:"absolute",bottom:"-2px",right:"-2px",height:"10px",width:"10px"}},z=function(e){var t=e.onResize;return o.a.createElement(n.Fragment,null,o.a.createElement(k,{style:I.top,cursor:"ns-resize",onResize:function(e){return t(e,"top")}}),o.a.createElement(k,{style:I.left,cursor:"ew-resize",onResize:function(e){return t(e,"left")}}),o.a.createElement(k,{style:I.right,cursor:"ew-resize",onResize:function(e){return t(e,"right")}}),o.a.createElement(k,{style:I.bottom,cursor:"ns-resize",onResize:function(e){return t(e,"bottom")}}),o.a.createElement(k,{style:I.topLeft,cursor:"nwse-resize",onResize:function(e){return t(e,"topLeft")}}),o.a.createElement(k,{style:I.topRight,cursor:"nesw-resize",onResize:function(e){return t(e,"topRight")}}),o.a.createElement(k,{style:I.bottomLeft,cursor:"nesw-resize",onResize:function(e){return t(e,"bottomLeft")}}),o.a.createElement(k,{style:I.bottomRight,cursor:"nwse-resize",onResize:function(e){return t(e,"bottomRight")}}))};z.defaultProps={onResize:function(){}};var C=z,R={bottom:function(e){var t=e.elem,r=e.event,n=t.height+r.movementY;return{width:t.width,height:n>1?n:1,top:t.top,left:t.left}},bottomLeft:function(e){var t=e.elem,r=e.event,n=t.width-r.movementX,o=t.height+r.movementY;return{width:n>1?n:1,height:o>1?o:1,top:t.top,left:t.left+r.movementX}},bottomRight:function(e){var t=e.elem,r=e.event,n=t.width+r.movementX,o=t.height+r.movementY;return{width:n>1?n:1,height:o>1?o:1,top:t.top,left:t.left}},left:function(e){var t=e.elem,r=e.event,n=t.width-r.movementX;return{width:n>1?n:1,height:t.height,top:t.top,left:t.left+r.movementX}},right:function(e){var t=e.elem,r=e.event,n=t.width+r.movementX;return{width:n>1?n:1,height:t.height,top:t.top,left:t.left}},top:function(e){var t=e.elem,r=e.event,n=t.height-r.movementY;return{width:t.width,height:n>1?n:1,top:t.top+r.movementY,left:t.left}},topLeft:function(e){var t=e.elem,r=e.event,n=t.width-r.movementX,o=t.height-r.movementY;return{width:n>1?n:1,height:o>1?o:1,top:t.top+r.movementY,left:t.left+r.movementX}},topRight:function(e){var t=e.elem,r=e.event,n=t.width+r.movementX,o=t.height-r.movementY;return{width:n>1?n:1,height:o>1?o:1,top:t.top+r.movementY,left:t.left}}},_=function(e){var t=e.elem,r=e.event,n=e.handle;return R[n]({elem:{width:t.current.offsetWidth,height:t.current.offsetHeight,top:t.current.offsetTop,left:t.current.offsetLeft},event:r})},M=r(2),T=r.n(M);function L(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function U(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?L(Object(r),!0).forEach((function(t){W(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):L(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function W(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var X=function(e){var t=e.children,r=e.isActive,i=e.onResize,c=e.style,u=Object(n.useRef)(null);return o.a.createElement(K,{style:U(U({},T.a.view),c),ref:u},t,r&&o.a.createElement(C,{onResize:function(e,t){return i(_({elem:u,event:e,handle:t}))}}))};X.defaultProps={children:null,isActive:!1,onResize:function(){},style:{}};var N=X,Y=r(3),$=r.n(Y);function H(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function F(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?H(Object(r),!0).forEach((function(t){q(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):H(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function q(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var B=function(e){return o.a.createElement("div",{style:F(F({},$.a.container),e.style),title:e.title},e.children)};B.defaultProps={children:null,title:null};var V=B,G=function(e){return o.a.createElement("div",e)};function J(){return(J=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}var K=o.a.forwardRef((function(e,t){return o.a.createElement("div",J({},e,{ref:t}))}));function Q(e){return function(e){if(Array.isArray(e))return Z(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 Z(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Z(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 Z(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function ee(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function te(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ee(Object(r),!0).forEach((function(t){re(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ee(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function re(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ne(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function oe(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ne(Object(r),!0).forEach((function(t){ie(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ne(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function ie(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ce(e){return function(e){if(Array.isArray(e))return ue(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 ue(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ue(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 ue(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function ae(e){return function(e){if(Array.isArray(e))return fe(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 fe(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return fe(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 fe(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function se(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function le(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?se(Object(r),!0).forEach((function(t){pe(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):se(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function pe(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function be(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ye(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?be(Object(r),!0).forEach((function(t){Oe(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):be(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Oe(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var de={actions:{add:function(e,t){var r=e.prevState,n=te({},r.byId),o=Q(r.orderedIds);return n[t.id]=t,o.push(t.id),te(te({},r),{},{byId:n,orderedIds:o})},focus:function(e,t){var r=e.prevState,n=ce(r.orderedIds).sort((function(e,r){return e===t?1:r===t?-1:0}));return oe(oe({},r),{},{orderedIds:n})},remove:function(e,t){var r=e.prevState,n=le({},r.byId),o=ae(r.orderedIds).filter((function(e){return e!==t}));return delete n[t],le(le({},r),{},{byId:n,orderedIds:o})},update:function(e,t){var r=e.prevState,n=ye({},r.byId),o=n[t.id];return n[t.id]=ye(ye({},o),t),ye(ye({},r),{},{byId:n})}},name:"windows",state:{byId:{},orderedIds:[]}},ve=new(r(4).Store)({name:"DEV_TOOLS",types:{windows:de}});window.store=ve;var ge=ve;function he(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function me(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?he(Object(r),!0).forEach((function(t){je(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):he(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function je(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var we=0,Pe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.contextMenu,r=void 0===t?{}:t,n=e.events,o=void 0===n?{}:n;return me(me({id:we+=1,isOpaque:!0,type:"DEFAULT",title:"",component:function(){return null},position:{x:24,y:24},size:{width:300,height:200}},e),{},{contextMenu:me({items:[],width:100},r),events:me({onMove:function(){}},o)})},Se=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Pe(e);ge.dispatch("windows.add",t)},xe={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1"},Ee={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",550:"#898989",600:"#757575",700:"#616161",750:"#424242",800:"#323232",900:"#212121"},De={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"},Ae={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c"},ke="#ffffff",Ie={50:"#fffde7",100:"#fff9c4",200:"#fff59d",300:"#fff176",400:"#ffee58",500:"#ffeb3b",600:"#fdd835",700:"#fbc02d",800:"#f9a825",900:"#f57f17"},ze={ellipsis:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},Ce={none:{WebkitUserSelect:"none",MozUserSelect:"none",MsUserSelect:"none",userSelect:"none"},text:{WebkitUserSelect:"text",MozUserSelect:"text",MsUserSelect:"text",userSelect:"text"}};function Re(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _e(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Me={view:function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Re(Object(r),!0).forEach((function(t){_e(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Re(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({flex:1,cursor:"pointer",padding:"3px 8px",fontSize:"13px",fontWeight:"700",color:ke},Ce.none),stripe:function(e){return e%2!=0&&{backgroundColor:Ee[800]}},hovered:function(e){return e&&{backgroundColor:xe[800]}}};function Te(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Le(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Te(Object(r),!0).forEach((function(t){Ue(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Te(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ue(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var We=function(e){var t=e.closeWindow,r=e.configs,n=e.createWindow,i=e.index,c=e.label,u=e.style,a=p(),f=a.isHovered,s=a.ref;return o.a.createElement(K,{style:Le(Le(Le(Le({},Me.view),u),Me.stripe(i)),Me.hovered(f)),onClick:function(){t(),n(r)},ref:s},c)};We.defaultProps={closeWindow:function(){},configs:{},createWindow:function(){},index:0,label:"",style:{}};var Xe=We,Ne={flex:1,display:"flex",alignItems:"flex-start",overflowY:"auto"};function Ye(){return(Ye=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function $e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function He(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?$e(Object(r),!0).forEach((function(t){Fe(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$e(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Fe(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var qe=function(e){var t=e.closeWindow,r=e.createWindow,n=e.style,i=e.tools;return o.a.createElement(G,{style:He(He({},Ne),n)},i.map((function(e,n){return o.a.createElement(Xe,Ye({key:"ITEM_".concat(n),closeWindow:t,createWindow:r,index:n},e))})))};qe.defaultProps={closeWindow:function(){},createWindow:function(){},style:{},tools:[]};var Be=qe,Ve=r(5),Ge=r.n(Ve);function Je(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ke(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Je(Object(r),!0).forEach((function(t){Qe(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Je(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Qe(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Ze=function(e){var t=e.style,r=e.tools;return h("keyup",(function(e){var t=e.target.tagName.toUpperCase();"INPUT"!==t&&"TEXTAREA"!==t&&84===e.keyCode&&Se({type:"TOOL_BROWSER",component:function(e){return Be(Ke({tools:r},e))},position:{x:24,y:window.innerHeight-184},size:{width:140,height:160}})})),o.a.createElement(G,{style:Ke(Ke({},Ge.a.view),t)})};Ze.defaultProps={style:{},tools:[]};var et=Ze,tt=function(e){return function(t,r){var o=m(Object(n.useState)(void 0===r?t(e):r),2),i=o[0],c=o[1];return Object(n.useEffect)((function(){var r=!1,n=e.subscribe((function(e){setTimeout((function(){return!r&&c(t(e))}),0)}));return function(){r=!0,n.unsubscribe()}}),[]),i}}(ge),rt=r(1),nt=r.n(rt);function ot(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function it(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ot(Object(r),!0).forEach((function(t){ct(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ot(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function ct(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var ut=function(e){var t={height:e.size.height,width:e.size.width<25?25:e.size.width};return it(it({},e),{},{size:t})},at=function(e){var t={height:e.size.height<25?25:e.size.height,width:e.size.width};return it(it({},e),{},{size:t})},ft=function(e){var t={x:e.position.x,y:e.position.y<0?0:e.position.y};return it(it({},e),{},{position:t})},st=function(e){var t=window.innerHeight-23,r={x:e.position.x,y:e.position.y>t?t:e.position.y};return it(it({},e),{},{position:r})},lt=function(e){var t=-(e.size.width-23),r={x:e.position.x<t?t:e.position.x,y:e.position.y};return it(it({},e),{},{position:r})},pt=function(e){var t=window.innerWidth-23,r={x:e.position.x>t?t:e.position.x,y:e.position.y};return it(it({},e),{},{position:r})},bt=function(e,t){var r=ge.getState("windows").byId[t];if(r){var n=function(e){var t=e.dimensions,r=e.window;return nt()({position:{x:r.position.x+t.left,y:r.position.y+t.top},size:{height:t.height,width:t.width}}).flow(ut).flow(at).flow(ft).flow(st).flow(lt).flow(pt).close()}({dimensions:e,window:r}),o=n.position,i=n.size;ge.dispatch("windows.update",{id:t,position:o,size:i})}};function yt(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 r=[],n=!0,o=!1,i=void 0;try{for(var c,u=e[Symbol.iterator]();!(n=(c=u.next()).done)&&(r.push(c.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{n||null==u.return||u.return()}finally{if(o)throw i}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ot(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ot(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 Ot(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var dt=function(e){var t=yt(ge.getState("windows").orderedIds.slice(-2,-1),1)[0];ge.dispatch("windows.remove",e),ge.dispatch("windows.focus",t)},vt={view:{flex:1,display:"flex",borderRight:"1px solid ".concat(Ee[700]),borderBottom:"1px solid ".concat(Ee[700]),borderLeft:"1px solid ".concat(Ee[700]),borderRadius:"0px 0px 6px 6px",backgroundColor:Ee[900],overflow:"hidden"},component:{flex:1}};function gt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ht(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?gt(Object(r),!0).forEach((function(t){mt(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function mt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var jt=Object(n.memo)((function(e){var t=e.id,r=e.style,n=ge.getState("windows").byId[t].component;return o.a.createElement(G,{style:ht(ht({},vt.view),r)},o.a.createElement(n,{closeWindow:function(){return dt(t)},createWindow:Se,style:vt.component}))}));jt.defaultProps={id:null,style:{}};var wt=jt;function Pt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function St(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Pt(Object(r),!0).forEach((function(t){xt(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Pt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function xt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Et={view:St(St({color:ke,fontSize:"14px",lineHeight:"24px",fontWeight:600,cursor:"pointer",textAlign:"left",padding:"0px 12px"},Ce.none),ze.ellipsis),hovered:function(e){return e&&{backgroundColor:xe[800]}}};function Dt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function At(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Dt(Object(r),!0).forEach((function(t){kt(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Dt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function kt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var It=function(e){var t=e.label,r=e.onClick,n=e.style,i=p(),c=i.isHovered,u=i.ref;return o.a.createElement(K,{style:At(At(At({},Et.view),n),Et.hovered(c)),onClick:r,ref:u},t)};It.defaultProps={label:"",onClick:function(){},style:{}};var zt=It,Ct=function(e){var t=e.position,r=t.x,n=t.y,o=e.width;return{position:"absolute",top:"".concat(n,"px"),left:"".concat(r,"px"),width:"".concat(o,"px"),display:"flex",flexDirection:"column",borderRadius:"6px",boxShadow:"rgba(0, 0, 0, 0.19) 0px 10px 15px -3px, 0 4px 6px -2px rgba(0, 0, 0, 0.05)",border:"1px solid ".concat(Ee[600]),backgroundColor:Ee[800],overflow:"hidden",padding:"6px 0px"}};function Rt(){return(Rt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function _t(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Mt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?_t(Object(r),!0).forEach((function(t){Tt(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_t(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Tt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Lt=function(e){var t=e.isOpen,r=e.items,n=e.position,i=e.style,c=e.width;return t&&o.a.createElement(G,{style:Mt(Mt({},Ct({position:n,width:c})),i),onMouseDown:function(e){return e.stopPropagation()}},r.map((function(e,t){return o.a.createElement(zt,Rt({key:"CONTEXT_ITEM_".concat(t)},e))})))};Lt.defaultProps={isOpen:!1,items:[],position:{x:0,y:0},style:{},width:0};var Ut=Lt;function Wt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Xt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Wt(Object(r),!0).forEach((function(t){Nt(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Wt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Nt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Yt=function(e){var t={x:e.position.x,y:e.position.y<0?0:e.position.y};return Xt(Xt({},e),{},{position:t})},$t=function(e){var t=window.innerHeight-23,r={x:e.position.x,y:e.position.y>t?t:e.position.y};return Xt(Xt({},e),{},{position:r})},Ht=function(e){var t=-(e.size.width-23),r={x:e.position.x<t?t:e.position.x,y:e.position.y};return Xt(Xt({},e),{},{position:r})},Ft=function(e){var t=window.innerWidth-23,r={x:e.position.x>t?t:e.position.x,y:e.position.y};return Xt(Xt({},e),{},{position:r})},qt=function(e,t){var r=ge.getState("windows").byId[t];if(r){var n=function(e){var t=e.event,r=e.window,n=r.position.y,o=r.position.x;return nt()({position:{x:o+t.movementX,y:n+t.movementY},size:r.size}).flow(Yt).flow($t).flow(Ht).flow(Ft).close().position}({event:e,window:r});ge.dispatch("windows.update",{id:t,position:n}),r.events.onMove(e)}e.stopPropagation(),e.preventDefault()},Bt=function(e){return{height:"12px",width:"12px",borderRadius:"50%",backgroundColor:e.primaryColor}};function Vt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Gt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Vt(Object(r),!0).forEach((function(t){Jt(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Vt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Jt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Kt=function(e){var t=e.onClick,r=e.primaryColor,n=e.style;return o.a.createElement(G,{style:Gt(Gt({},Bt({primaryColor:r})),n),onClick:t})};Kt.defaultProps={onClick:function(){},primaryColor:"",style:{}};var Qt=Kt,Zt={view:{display:"flex"},marginRight:{marginRight:"6px"}};function er(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function tr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?er(Object(r),!0).forEach((function(t){rr(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):er(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function rr(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var nr=function(e){var t=e.isFocused,r=e.onClose,n=e.style;return o.a.createElement(G,{style:tr(tr({},Zt.view),n)},o.a.createElement(Qt,{style:Zt.marginRight,primaryColor:t?Ae[500]:Ee[550],onClick:r}),o.a.createElement(Qt,{style:Zt.marginRight,primaryColor:t?Ie[700]:Ee[550]}),o.a.createElement(Qt,{primaryColor:t?De[500]:Ee[550]}))};nr.defaultProps={isFocused:!1,onClose:function(){},style:{}};var or=nr;function ir(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function cr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ir(Object(r),!0).forEach((function(t){ur(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ir(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function ur(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var ar={view:{display:"flex",justifyContent:"center",alignItems:"center",padding:"0px 6px",backgroundColor:Ee[750],overflow:"hidden",borderTop:"1px solid ".concat(Ee[600]),borderRight:"1px solid ".concat(Ee[600]),borderLeft:"1px solid ".concat(Ee[600]),borderRadius:"6px 6px 0px 0px"},focused:function(e){return e&&{backgroundColor:Ee[800]}},actionButtons:{flex:1,paddingRight:"16px"},title:cr(cr({color:Ee[50],fontSize:"13px",fontWeight:700,paddingRight:"16px"},Ce.none),ze.ellipsis),flexSpacer:{flex:1}};function fr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function sr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?fr(Object(r),!0).forEach((function(t){lr(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function lr(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var pr=function(e){var t=e.id,r=e.isFocused,i=e.style,c=function(e){var t=e.onMove,r=void 0===t?function(){}:t,o=Object(n.useRef)(!1).current,i=Object(n.useRef)(null),c=function(e){return o&&r(e)},u=function e(){o=!1,window.removeEventListener("mouseup",e),window.removeEventListener("mousemove",c)},a=function(){o=!0,window.addEventListener("mouseup",u),window.addEventListener("mousemove",c)};return Object(n.useEffect)((function(){var e=i.current;if(e)return e.addEventListener("mousedown",a),function(){e.removeEventListener("mousedown",a)}}),[i.current]),{ref:i}}({onMove:function(e){return qt(e,t)}}).ref,u=tt((function(e){return e.getState("windows").byId[t]})),a=u.isOpaque,f=u.title;return o.a.createElement(K,{style:sr(sr(sr({},ar.view),i),ar.focused(r)),onDoubleClick:function(){return store.dispatch("windows.update",{id:t,isOpaque:!a})},ref:c},o.a.createElement(or,{style:ar.actionButtons,isFocused:r,onClose:function(){return a&&dt(t)}}),o.a.createElement(V,{style:ar.title},f),o.a.createElement(G,{style:ar.flexSpacer}))};pr.defaultProps={id:null,isFocused:!1,style:{}};var br=pr,yr={view:function(e){var t=e.position,r=t.x,n=t.y,o=e.size,i=o.width,c=o.height,u=e.isOpaque;return{position:"absolute",transform:"translate(".concat(r,"px, ").concat(n,"px)"),display:"flex",height:"".concat(c,"px"),width:"".concat(i,"px"),borderRadius:"6px",opacity:u?1:.1,pointerEvents:u?"auto":"none",boxShadow:"rgba(0, 0, 0, 0.19) 0px 10px 15px -3px, 0 4px 6px -2px rgba(0, 0, 0, 0.05)"}},resizable:{display:"flex",flex:1,flexDirection:"column"},header:{pointerEvents:"auto",minHeight:"24px",height:"24px"}};function Or(){return(Or=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function dr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function vr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?dr(Object(r),!0).forEach((function(t){gr(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function gr(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function hr(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 r=[],n=!0,o=!1,i=void 0;try{for(var c,u=e[Symbol.iterator]();!(n=(c=u.next()).done)&&(r.push(c.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{n||null==u.return||u.return()}finally{if(o)throw i}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return mr(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return mr(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 mr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var jr=function(e){var t=e.id,r=e.style,n=tt((function(e){return e.getState("windows").byId[t]})),i=f({isActive:n.contextMenu.items.length>0}),c=i.isOpen,u=i.position,a=i.ref,s=tt((function(e){var r=hr(e.getState("windows").orderedIds.slice(-1),1)[0];return t===r}));return o.a.createElement(K,{style:vr(vr({},yr.view(n)),r),onMouseDown:function(){return!s&&ge.dispatch("windows.focus",t)},ref:a},o.a.createElement(N,{style:yr.resizable,onResize:function(e){return bt(e,t)},isActive:s},o.a.createElement(br,{style:yr.header,id:t,isFocused:s}),o.a.createElement(wt,{id:t}),o.a.createElement(Ut,Or({isOpen:c,position:{x:u.x-n.position.x,y:u.y-n.position.y}},n.contextMenu))))};jr.defaultProps={id:null,style:{}};var wr=jr,Pr=r(6),Sr=r.n(Pr);function xr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Er(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?xr(Object(r),!0).forEach((function(t){Dr(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Dr(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Ar=function(e){var t=e.style,r=tt((function(e){return e.getState("windows").orderedIds}));return o.a.createElement(G,{style:Er(Er({},Sr.a.view),t)},r.map((function(e){return o.a.createElement(wr,{key:"WINDOW_".concat(e),id:e})})))};Ar.defaultProps={style:{}};var kr=Ar,Ir={position:"absolute",top:0,left:0,width:"100%",height:"100%",zIndex:2147483647,boxSizing:"border-box",verticalAlign:"baseline",lineHeight:"1.5",border:0,margin:0,padding:0,overflow:"hidden",pointerEvents:"none"};function zr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Cr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?zr(Object(r),!0).forEach((function(t){Rr(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):zr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Rr(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var _r=function(e){var t=e.style,r=e.tools;return o.a.createElement(G,{style:Cr(Cr({},Ir),t)},o.a.createElement(et,{tools:r}),o.a.createElement(kr,null))};_r.defaultProps={style:{},tools:[]};var Mr=_r;t.default=Mr}])}));
{
"name": "react-dev-os",
"author": "Scotty Rogers",
"version": "0.0.9",
"version": "0.0.10",
"description": "An interactive development environment for react apps.",

@@ -6,0 +6,0 @@ "license": "ISC",

@@ -1,12 +0,10 @@

import React, { useState } from "react";
import { View } from "@library/ui";
import { useOnWindowEvent } from "@library/hooks";
import React from "react";
import { ViewRef } from "@library/ui";
import { useHover } from "@library/hooks";
import styles from "./styles";
const Item = ({ closeWindow, configs, createWindow, index, label, style }) => {
const [isSelected, setIsSelected] = useState(false);
const { isHovered, ref } = useHover();
const handleMouseDown = () => setIsSelected(true);
const handleMouseUp = () => {
setIsSelected(false);
const handleClick = () => {
closeWindow();

@@ -16,12 +14,6 @@ createWindow(configs);

useOnWindowEvent("mouseup", () => setIsSelected(false));
return (
<View
style={{ ...styles.view, ...style, ...styles.stripe(index), ...styles.selected(isSelected) }}
onMouseDown={handleMouseDown}
onMouseUp={handleMouseUp}
>
<ViewRef style={{ ...styles.view, ...style, ...styles.stripe(index), ...styles.hovered(isHovered) }} onClick={handleClick} ref={ref}>
{label}
</View>
</ViewRef>
);

@@ -28,0 +20,0 @@ };

@@ -18,5 +18,5 @@ import { colors, css } from "@library/styles";

},
selected: (isSelected) => {
return isSelected && { backgroundColor: colors.blue[800] };
hovered: (isHovered) => {
return isHovered && { backgroundColor: colors.blue[800] };
},
};
import React from "react";
import { ViewRef } from "@library/ui";
import { Resizable, ViewRef } from "@library/ui";
import { useContextMenu } from "@library/hooks";
import resizeWindow from "@procedures/windows/resize";
import store from "@store";

@@ -21,12 +22,15 @@ import { useStore } from "@tools/hooks";

const handleMouseDown = () => !isFocused && store.dispatch("windows.focus", id);
const handleResize = (dimensions) => resizeWindow(dimensions, id);
return (
<ViewRef style={{ ...styles.view(state), ...style }} onMouseDown={handleMouseDown} ref={ref}>
<Header style={styles.header} id={id} isFocused={isFocused} />
<Content id={id} />
<ContextMenu
isOpen={isMenuOpen}
position={{ x: menuPosition.x - state.position.x, y: menuPosition.y - state.position.y }}
{...state.contextMenu}
/>
<Resizable style={styles.resizable} onResize={handleResize} isActive={isFocused}>
<Header style={styles.header} id={id} isFocused={isFocused} />
<Content id={id} />
<ContextMenu
isOpen={isMenuOpen}
position={{ x: menuPosition.x - state.position.x, y: menuPosition.y - state.position.y }}
{...state.contextMenu}
/>
</Resizable>
</ViewRef>

@@ -33,0 +37,0 @@ );

@@ -7,3 +7,2 @@ export default {

display: "flex",
flexDirection: "column",
height: `${height}px`,

@@ -17,2 +16,7 @@ width: `${width}px`,

},
resizable: {
display: "flex",
flex: 1,
flexDirection: "column",
},
header: {

@@ -19,0 +23,0 @@ pointerEvents: "auto",

@@ -0,3 +1,4 @@

import Resizable from "./Resizable";
import Text from "./Text";
export { Text };
export { Resizable, Text };
SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc