UNPKG

jswm

Version:

Virtual Window for React

1 lines 89.1 kB
!function(t,e){for(var n in e)t[n]=e[n]}(exports,function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=7)}([function(t,e){t.exports=require("styled-components")},function(t,e){t.exports=require("react")},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(){}return t.getPos=function(t){var e;if(t.targetTouches&&t.targetTouches.length){var n=t.targetTouches[0];e={x:n.pageX,y:n.pageY}}else e={x:t.clientX,y:t.clientY};return e},t.callEvent=function(e,n,i){e.dispatchEvent(t.createEvent(n,i))},t.createEvent=function(t,e){var n;try{n=new CustomEvent(t)}catch(e){(n=document.createEvent("CustomEvent")).initCustomEvent(t,!1,!1,null)}return e&&(n.params=e),n},t.createElement=function(t,e){var n=document.createElement(t);if(e)for(var i in e){var r=e[i];if("object"==typeof r&&r)for(var o=0,a=Object.keys(r);o<a.length;o++){var s=a[o];n[i][s]=r[s]}else n[i]=r}return n},t.init=function(){window&&!this.initFlag&&(this.initFlag=!0,window.addEventListener("mouseup",r,!1),window.addEventListener("touchend",r,{passive:!1}),window.addEventListener("mousemove",o,!1),window.addEventListener("touchmove",o,{passive:!1}),window.addEventListener("touchstart",s,{passive:!1}))},t.moveNode=null,t.frame=null,t.initFlag=!1,t}();function r(){i.moveNode=null,i.frame=null}function o(t){if(i.moveNode)if("touches"in t&&2===t.touches.length){if(void 0===i.pinchiBaseDistance)i.pinchiBaseDistance=a(t.touches);else{var e=i.moveNode,n=i.getPos(t),r=a(t.touches)-i.pinchiBaseDistance,o=function(t){var e=t[0].pageX-t[1].pageX,n=t[0].pageY-t[1].pageY;return Math.atan2(n,e)}(t.touches),s={event:t,nodePoint:{x:i.nodeX,y:i.nodeY},basePoint:{x:i.baseX,y:i.baseY},nowPoint:{x:n.x,y:n.y},nodeSize:{width:i.nodeWidth,height:i.nodeHeight},distance:r,radian:o};i.callEvent(e,"move",s)}t.preventDefault()}else{e=i.moveNode,n=i.getPos(t),s={event:t,nodePoint:{x:i.nodeX,y:i.nodeY},basePoint:{x:i.baseX,y:i.baseY},nowPoint:{x:n.x,y:n.y},nodeSize:{width:i.nodeWidth,height:i.nodeHeight}};i.callEvent(e,"move",s),t.preventDefault()}}function a(t){var e=t[0].pageX-t[1].pageX,n=t[0].pageY-t[1].pageY;return Math.sqrt(e*e+n*n)}function s(t){i.pinchiBaseDistance=void 0}e.Manager=i},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e}(o.Component);e.ListRow=a;var s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e}(o.Component);e.ListHeaders=s;var l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e}(o.Component);e.ListHeader=l;var c=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e}(o.Component);e.ListItem=c},function(t,e){t.exports=require("resize-observer-polyfill")},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),o=this&&this.__assign||function(){return(o=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},a=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(1)),l=n(6),c=n(37),u=n(2);e.ItemDataDefault={itemStyle:0,label:"",value:void 0,expand:!0,select:!1,checked:!1,keys:{},children:[]},e.UniqueKey={value:1};var d=function(t){function n(n){var i=t.call(this,n)||this;i.rootItemRef=s.createRef(),i.select=null;var r=function(t,i){if(!i||i.type!==l.TreeItem)return null;var o=i.props,a={itemStyle:o.itemStyle||n.itemStyle||0,label:o.label||"",expand:void 0===o.expand||o.expand,value:o.value,select:o.select||!1,checked:o.checked||!1,uniqueKey:e.UniqueKey.value++,keys:{},parent:t,children:[],onExpand:o.onExpand,onItemClick:o.onItemClick,onDoubleClick:o.onDoubleClick};return a.children=i.props.children?s.default.Children.map(i.props.children,(function(t){return r(a,t)})).filter((function(t){return t})):[],a},a=r(null,n.children)||o(o({},e.ItemDataDefault),{label:"Root",parent:null,uniqueKey:e.UniqueKey.value++});return i.item=a,i.state={item:i.item},i}return r(n,t),n.prototype.render=function(){return s.default.createElement(c.Root,null,s.default.createElement(l.TreeItem,{ref:this.rootItemRef,key:this.state.item.uniqueKey,treeView:this,parent:this,item:this.item}))},n.prototype.componentDidMount=function(){u.Manager.init()},n.prototype.getItem=function(){return this.rootItemRef.current},n.prototype.findItem=function(t){return this.rootItemRef.current.findItem(t)},n.prototype.findItems=function(t){return this.rootItemRef.current.findItems(t)},n.prototype.delItem=function(t){return this.rootItemRef.current.delItem(t)},n.prototype.getSelectItem=function(){return this.select},n.prototype.selectItem=function(t){this.select&&this.select.onSelect(!1),this.select=t,t&&t.onSelect(!0)},n.prototype.getCheckItems=function(){return this.rootItemRef.current.getCheckItems()},n.prototype.getRootUniqueKey=function(){return this.item.uniqueKey},n}(s.Component);e.TreeView=d},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),o=this&&this.__assign||function(){return(o=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},a=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var l,c=a(n(1)),u=s(n(33)),d=s(n(34)),p=s(n(35)),h=n(36),f=n(5);!function(t){t[t.CHECKBOX=1]="CHECKBOX"}(l=e.TreeItemStyle||(e.TreeItemStyle={}));var m=function(t){function e(e){var n=t.call(this,e)||this;return n.updateCache={},n.keyCache=[],n.mount=!1,n.item=n.props.item,n.state={item:n.item},n}return r(e,t),e.prototype.componentDidMount=function(){var t=this;this.mount=!0,e.referenceItem.set(this.item.uniqueKey,this),setTimeout((function(){t.props.treeView&&t.props.treeView.props.onExpand&&t.props.treeView.props.onExpand(t,t.item.expand,!0),t.props.onExpand&&t.props.onExpand(t.item.expand,!0)}))},e.prototype.componentWillUnmount=function(){e.referenceItem.delete(this.item.uniqueKey),this.mount=!1},e.prototype.shouldComponentUpdate=function(t,e){var n=this,i=this.item,r=this.updateCache;if(i.itemStyle===r.itemStyle&&i.label===r.label&&i.expand===r.expand&&i.select===r.select&&i.checked===r.checked&&e.childAnimation===r.childAnimation&&e.expandState===r.expandState){var o=this.item.children.map((function(t){return t.uniqueKey}));if(this.item.children.length===this.keyCache.length&&o.reduce((function(t,e,i){return t&&e===n.keyCache[i]}),!0))return!1;this.keyCache=o}return r.itemStyle=i.itemStyle,r.label=i.label,r.expand=i.expand,r.select=i.select,r.checked=i.checked,r.childAnimation=e.childAnimation,r.expandState=e.expandState,!0},e.prototype.render=function(){var t=this;return c.default.createElement(h.Root,null,c.default.createElement("div",{id:"item",className:this.state.item.select?"select":"",onClick:function(){t.state.item.onItemClick&&t.state.item.onItemClick(),t.props.treeView&&(t.props.treeView.selectItem(t),t.props.treeView.props.onItemClick&&t.props.treeView.props.onItemClick(t))},onDoubleClick:function(){t.state.item.onDoubleClick&&t.state.item.onDoubleClick(),t.props.treeView&&t.props.treeView.props.onItemDoubleClick&&t.props.treeView.props.onItemDoubleClick(t)}},c.default.createElement("img",{onClick:function(e){t.setExpand(!t.item.expand),e.stopPropagation()},id:"icon",src:0===this.state.item.children.length?u.default:this.item.expand?p.default:d.default}),0!=(this.state.item.itemStyle&l.CHECKBOX)&&c.default.createElement("input",{id:"checkbox",type:"checkbox",checked:this.state.item.checked,onClick:function(t){t.stopPropagation()},value:"",onChange:function(){return t.setChecked(!t.item.checked)}}),c.default.createElement("div",{id:"label"},this.state.item.label)),c.default.createElement("div",{style:{overflow:this.state.childAnimation?"hidden":"visible",display:this.state.item.expand||this.state.childAnimation?"block":"none"},id:"child",className:this.state.expandState?this.state.item.expand?"open":"close":"",onAnimationStart:function(e){t.setState({childAnimation:!0}),e.stopPropagation()},onAnimationEnd:function(e){t.setState({childAnimation:!1}),e.stopPropagation()}},c.default.createElement("div",null,c.default.createElement("div",{id:"line"}),c.default.createElement("div",{id:"children"},this.state.item.children.map((function(n){return c.default.createElement(e,{key:n.uniqueKey,treeView:t.props.treeView,parent:t,item:n})}))))))},e.prototype.updateState=function(){if(this.mount)this.setState({item:this.item});else{var t=e.referenceItem.get(this.item.uniqueKey);t&&t.setState({item:this.item})}},e.prototype.onSelect=function(t){this.item.select=t;for(var n=this.item;n=n.parent;){var i=e.referenceItem.get(n.uniqueKey);i?i.setExpand(!0):n.expand=!0}this.updateState()},e.prototype.setExpand=function(t){this.item.expand!==t&&(this.item.expand=t,this.setState({item:this.item,childAnimation:!0,expandState:!0}),this.props.treeView&&this.props.treeView.props.onExpand&&this.props.treeView.props.onExpand(this,t,!1),this.props.onExpand&&this.props.onExpand(t,!1))},e.prototype.select=function(){this.props.treeView.selectItem(this)},e.prototype.getLabel=function(){return this.item.label},e.prototype.setLabel=function(t){this.item.label=t,this.updateState()},e.prototype.getValue=function(){return this.item.value},e.prototype.setValue=function(t){this.item.value=t,this.updateState()},e.prototype.findItem=function(t){var n=function(e){if(e.value===t)return e;if(e.children)for(var i=0,r=e.children;i<r.length;i++){var o=r[i],a=n(o);if(a)return a}return null},i=n(this.item);return i?e.referenceItem.get(i.uniqueKey)||new e({item:i}):null},e.prototype.findItems=function(t){var n=[],i=function(r){if(r.value===t&&n.push(new e({item:r})),r.children)for(var o=0,a=r.children;o<a.length;o++){var s=a[o];i(s)}};return i(this.item),n},e.prototype.addItem=function(t){var n=t?{itemStyle:t.itemStyle||this.item.itemStyle||0,label:t.label||"",expand:void 0===t.expand||t.expand,value:t.value,select:t.select||!1,checked:t.checked||!1,uniqueKey:f.UniqueKey.value++,keys:{},parent:this.item,children:[],onExpand:t.onExpand,onItemClick:t.onItemClick,onDoubleClick:t.onDoubleClick}:o(o({},f.ItemDataDefault),{uniqueKey:f.UniqueKey.value++,itemStyle:this.item.itemStyle,parent:this.item});return this.item.children.push(n),this.updateState(),new e({item:n})},e.prototype.delItem=function(t){return t.remove(),!1},e.prototype.remove=function(){if(this.item.parent)for(var t=this.item.parent.children,n=0,i=t.length;n<i;n++)if(this.item.uniqueKey===t[n].uniqueKey){t.splice(n,1),e.referenceItem.get(this.item.parent.uniqueKey).updateState();break}},e.prototype.clear=function(){this.item.children=[],this.updateState()},e.prototype.getChildren=function(){return this.item.children},e.prototype.setChecked=function(t){this.item.checked=t,this.updateState()},e.prototype.getCheckItems=function(){var t=[],n=function(i){if(i.checked&&t.push(new e({item:i})),i.children)for(var r=0,o=i.children;r<o.length;r++){var a=o[r];n(a)}};return n(this.item),t},e.prototype.setKey=function(t,e){this.item.keys[t]=e},e.prototype.getKey=function(t){return this.item.keys[t]},e.referenceItem=new Map,e.defaultProps={itemStyle:0,label:"",expand:!0,select:!1,checked:!1,items:[]},e}(c.Component);e.TreeItem=m},function(t,e,n){t.exports=n(8)},function(t,e,n){"use strict";function i(t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}Object.defineProperty(e,"__esModule",{value:!0}),i(n(9)),i(n(18)),i(n(25)),i(n(5)),i(n(6))},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),o=this&&this.__assign||function(){return(o=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},s=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e};Object.defineProperty(e,"__esModule",{value:!0});var l,c,u=a(n(4)),d=s(n(1)),p=n(2),h=n(10),f=n(11),m=n(16),g=n(17);!function(t){t[t.TITLE=1]="TITLE",t[t.MAX=2]="MAX",t[t.MIN=4]="MIN",t[t.CLOSE=8]="CLOSE",t[t.FRAME=16]="FRAME",t[t.RESIZE=32]="RESIZE"}(l=e.WindowStyle||(e.WindowStyle={})),function(t){t[t.NORMAL=1]="NORMAL",t[t.MAX=2]="MAX",t[t.MIN=3]="MIN",t[t.HIDE=4]="HIDE"}(c=e.WindowState||(e.WindowState={}));var b=function(t){function e(e){var n,i,r,a,s,u=t.call(this,e)||this;return u.rootRef=d.createRef(),u.titleRef=d.createRef(),u.clientRef=d.createRef(),u.zoomRef=d.createRef(),u.flagWindowState=!1,u.socketSend=(n=u.socketSendNow,i=10,void 0===(r=!0)&&(r=!1),function(t){var e=this,o=arguments,s=function(){a=null,r||n.apply(e,o)},l=r&&!a;clearTimeout(a),a=setTimeout(s,i),l&&n.apply(e,o)}),s={active:e.active,overlapped:e.overlapped,titlePrmisson:e.windowStyle,titleSize:0==(e.windowStyle&l.TITLE)?0:e.titleSize,borderSize:e.borderSize,x:e.x||0,y:e.y||0,width:e.width,height:e.height,transformation:{originX:0,originY:0,translateX:0,translateY:0,scale:1},oldEnumState:c.HIDE,windowState:e.windowState,boxEnumState:c.HIDE,clientWidth:0,clientHeight:0},u.state=s,u.windowInfo={id:e.id,x:s.x,y:s.y,width:s.width,height:s.height,zoomSensitivity:e.zoomSensitivity,minScale:e.minScale,maxScale:e.maxScale,moveable:e.moveable,workspace:e.workspace,borderSize:s.borderSize,title:e.title,titleSize:s.titleSize,children:e&&e.children||null,active:s.active,overlapped:s.overlapped,windowStyle:e.windowStyle,windowState:s.windowState,realWindowState:s.boxEnumState,onUpdate:e.onUpdate,onClose:e.onClose,clientWidth:0,clientHeight:0,clientStyle:e.clientStyle,realX:0,realY:0,realWidth:0,realHeight:0,socket:null},u.windowInfoKeep=o({},u.windowInfo),u}return r(e,t),e.prototype.shouldComponentUpdate=function(t,e){return this.flagWindowState||t!==this.props&&t.windowState!==e.windowState&&this._setWindowState(t.windowState),!0},e.prototype.componentDidMount=function(){var t=this;p.Manager.init();var e=this.rootRef.current;e&&(e._symbol=this,e.parentNode&&(this.resizeObserver=new u.default((function(){t.onParentSize()})),this.resizeObserver.observe(e.parentNode)),e.addEventListener("move",this.onMove.bind(this)),e.addEventListener("active",this.onActive.bind(this))),this.props.active&&this.foreground(),this.update(),this.onWheel=this.onWheel.bind(this),this.clientRef.current&&this.clientRef.current.addEventListener("wheel",this.onWheel),this.props.socket&&this.props.socket.on("message",(function(e){e.target===t.props.id&&t.setState(e.state)}))},e.prototype.componentWillUnmount=function(){var t=this.rootRef.current;t&&(this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=void 0),t.removeEventListener("move",this.onMove.bind(this)),t.removeEventListener("active",this.onActive.bind(this))),this.clientRef.current&&this.clientRef.current.removeEventListener("wheel",this.onWheel)},e.prototype.componentDidUpdate=function(){if(this.props.onUpdate){for(var t=!1,e=0,n=Object.keys(this.windowInfo);e<n.length;e++){var i=n[e];if(this.windowInfo[i]!==this.windowInfoKeep[i]){t=!0;break}}t&&(this.windowInfoKeep=o({},this.windowInfo),this.updateInfoHandle||this.props.onUpdate&&this.props.onUpdate(this.windowInfoKeep))}this.changeState()},e.prototype.render=function(){var t,e,n,i,r,a,s=this,u=this.rootRef.current,p=this.clientRef.current;if(u&&p){u._symbol=this;var b=u.parentNode,y=this.state.overlapped?window.innerWidth:b.clientWidth,v=this.state.overlapped?window.innerHeight:b.clientHeight;switch(this.state.boxEnumState){case c.MAX:t=0,e=0,n=y,i=v,r=y,a=v-this.state.titleSize;break;case c.MIN:n=this.state.width,i=this.state.titleSize,null===(t=this.state.x)&&(t=(y-n)/2),null===(e=this.state.y)&&(e=(v-i)/2),r=this.state.width,a=0;break;default:t=this.state.x,e=this.state.y,(n=this.state.width)>y&&(n=y),(i=this.state.height)>v&&(i=v),null===t&&(t=(y-n)/2),null===e&&(e=(v-i)/2),r=n,a=i-this.state.titleSize}}else t=this.state.x,e=this.state.y,r=n=this.state.width,a=(i=this.state.height)-this.state.titleSize;return this.windowInfo=o(o({},this.windowInfo),{x:this.state.x,y:this.state.y,width:this.state.width,height:this.state.height,realX:t,realY:e,realWidth:n,realHeight:i,windowState:this.state.windowState,realWindowState:this.state.boxEnumState}),d.default.createElement(m.Root,{overlapped:this.state.overlapped,ref:this.rootRef,x:t||0,y:e||0,"data-scale":this.state.transformation.scale,frame:0!=(this.windowInfo.windowStyle&l.FRAME),width:n,height:i,titleSize:this.state.titleSize,onTouchStart:this.onMouseDown.bind(this),onMouseDown:this.onMouseDown.bind(this)},l.TITLE&&d.default.createElement(f.Title,{ref:this.titleRef,Active:this.state.active,Size:this.state.titleSize,id:"TITLE",onTouchStart:this.onFrame,onMouseDown:this.onFrame},d.default.createElement("div",{id:"text"},this.props.title),d.default.createElement("div",{id:"icons"},0!=(this.state.titlePrmisson&l.MIN)&&d.default.createElement("div",{id:"min",onClick:function(){return s._setWindowState(s.state.oldEnumState===c.MIN?c.NORMAL:c.MIN)}}),0!=(this.state.titlePrmisson&l.MAX)&&this.state.oldEnumState===c.NORMAL||this.state.oldEnumState===c.MIN?d.default.createElement("div",{id:"max",onMouseDown:function(t){t.stopPropagation()},onTouchStart:function(t){t.stopPropagation()},onClick:function(t){s._setWindowState(c.MAX)}}):d.default.createElement("div",{id:"normal",onMouseDown:function(t){t.stopPropagation()},onTouchStart:function(t){t.stopPropagation()},onClick:function(t){s._setWindowState(c.NORMAL)}}),0!=(this.state.titlePrmisson&l.CLOSE)&&d.default.createElement("div",{id:"close",onMouseDown:function(t){t.stopPropagation()},onTouchStart:function(t){t.stopPropagation()},onClick:function(t){s._setWindowState(c.HIDE),s.props.onClose&&s.props.onClose()}}))),0!=(this.state.titlePrmisson&l.RESIZE)&&g.borders.map((function(t){return d.default.createElement(g.Border,{key:t,id:t,Size:s.state.borderSize,onTouchStart:s.onFrame.bind(s),onMouseDown:s.onFrame.bind(s)})})),d.default.createElement(h.Client,{id:"CLIENT",ref:this.clientRef,TitleSize:this.state.titleSize,Width:r,Height:a,style:this.props.clientStyle,onMouseMove:this.onMouseMove.bind(this)},d.default.createElement("div",{ref:this.zoomRef,style:{width:"100%",height:"100%",transformOrigin:this.state.transformation.originX+"px "+this.state.transformation.originY+"px",transform:"matrix("+this.state.transformation.scale+", 0, 0, "+this.state.transformation.scale+", "+this.state.transformation.translateX+", "+this.state.transformation.translateY+")"}},this.props.children)))},e.prototype.getWindowInfo=function(){return this.windowInfo},e.prototype.setWindowState=function(t){this.flagWindowState=!0,this._setWindowState(t)},e.prototype._setWindowState=function(t){t&&(this.setState({windowState:t}),this.windowInfo.windowState=t)},e.prototype.foreground=function(){var t=new Set,n=this.rootRef.current;if(n){var i=n;do{n._symbol instanceof e&&(t.add(n),i=n)}while(n=n.parentNode);var r=i.parentNode;if(r){var o=function(n){if(n._symbol instanceof e){var i=t.has(n);p.Manager.callEvent(n,"active",i)}Array.prototype.forEach.call(n.childNodes,(function(t){o(t)}))};o(r)}}},e.prototype.update=function(){var t=this.rootRef.current,e=this.clientRef.current;t&&e&&(t._symbol=this,this.changeState())},e.prototype.changeState=function(){if(this.state.oldEnumState!==this.state.windowState)switch(this.setState({oldEnumState:this.state.windowState}),this.state.windowState){case c.NORMAL:this.normal();break;case c.MAX:this.max();break;case c.MIN:this.min();break;case c.HIDE:this.hide()}},e.prototype.min=function(){var t=this,e=this.rootRef.current,n=this.clientRef.current;if(e&&n)if(this.state.boxEnumState===c.MIN)n.style.animation="MinRestoreClient 0.1s ease 0s 1 alternate forwards",e.style.animation="MinRestoreRoot 0.5s ease 0s 1 alternate forwards",this.setState({boxEnumState:c.NORMAL});else{var i=function(){t.setState({boxEnumState:c.MIN}),n.removeEventListener("animationend",i),setTimeout((function(){e.style.animation="",n.style.animation=""}),1)};n.addEventListener("animationend",i),setTimeout((function(){e.style.animation="MinRoot 0.5s ease 0s 1 forwards",n.style.animation="MinClient 0.5s ease 0s 1 alternate forwards"}),1)}},e.prototype.max=function(){var t=this,e=this.rootRef.current;e&&(e.style.animation="",setTimeout((function(){t.setState({boxEnumState:c.MAX}),e.style.animation="Max 0.5s ease 0s 1 forwards"}),1))},e.prototype.normal=function(){var t=this;if(this.state.oldEnumState!==c.MIN)if(this.state.oldEnumState===c.HIDE){var e=this.rootRef.current;if(!e)return;var n=function(){e.removeEventListener("animationend",n),e.style.animation=""};e.addEventListener("animationend",n),e.style.animation="Show 0.5s ease 0s none",e.style.visibility="visible",this.setState({boxEnumState:c.NORMAL})}else{var i=this.rootRef.current;if(!i)return;i.style.animation="",setTimeout((function(){t.setState({boxEnumState:c.NORMAL}),i.style.animation="Restore 0.5s ease 0s forwards"}),1)}else this.min()},e.prototype.hide=function(){var t=this,e=this.rootRef.current;if(e){e.style.animation="";var n=function(){e.removeEventListener("animationend",n),t.setState({boxEnumState:c.HIDE})};setTimeout((function(){e.addEventListener("animationend",n),e.style.animation="Hide 0.5s ease 0s forwards"}),1)}},e.prototype.onMouseDown=function(t){if(null==p.Manager.moveNode&&(this.foreground(),this.props.moveable||p.Manager.frame)){p.Manager.moveNode=this.rootRef.current;var e=p.Manager.getPos(t);p.Manager.baseX=e.x,p.Manager.baseY=e.y,p.Manager.nodeX=this.windowInfo.realX,p.Manager.nodeY=this.windowInfo.realY,p.Manager.nodeWidth=this.windowInfo.realWidth,p.Manager.nodeHeight=this.windowInfo.realHeight}t.stopPropagation()},e.prototype.onFrame=function(t){null==p.Manager.frame&&(p.Manager.frame=t.currentTarget.id)},e.prototype.onActive=function(t){var n=!0===t.params;this.setState({active:n});var i=this.rootRef.current;if(n){var r=i.parentNode;r&&(i.style.zIndex="99999",Array.prototype.slice.call(r.childNodes,0).filter((function(t){return t._symbol instanceof e})).sort((function(t,e){return(t.style.zIndex?parseInt(t.style.zIndex):0)-(e.style.zIndex?parseInt(e.style.zIndex):0)})).forEach((function(t,e){t.style.zIndex=e.toString()})))}},e.prototype.onParentSize=function(){var t=this;this.resizeHandle||(this.resizeHandle=setTimeout((function(){t.forceUpdate(),t.resizeHandle=void 0}),10))},e.prototype.getParentScale=function(){var t,n=1,i=this.rootRef.current;if(i)for(;i=i.parentNode;)if(i._symbol instanceof e){n=+((null===(t=null==i?void 0:i.dataset)||void 0===t?void 0:t.scale)||1);break}return n},e.prototype.socketSendNow=function(t){var e;(null===(e=this.props.socket)||void 0===e?void 0:e.connected)&&this.props.id&&this.props.socket.send({target:this.props.id,state:t})},e.prototype.onMove=function(t){var e=this;if(this.state.windowState!==c.MAX){var n=[null===this.state.x?this.windowInfo.realX:this.state.x,null===this.state.y?this.windowInfo.realY:this.state.y,this.state.width,this.state.height],i=n[0],r=n[1],o=n[2],a=n[3],s=t.params,l=this.getParentScale();if(s.distance){var u=l*Math.abs(Math.cos(s.radian)*s.distance)*(s.distance<0?-1:1),d=l*Math.abs(-Math.sin(s.radian)*s.distance)*(s.distance<0?-1:1);i=s.nodePoint.x-u/2,r=s.nodePoint.y-d/2,o=p.Manager.nodeWidth+u,a=p.Manager.nodeHeight+d}else{var h=p.Manager.frame||"",f=(s.nowPoint.x-s.basePoint.x)/l,m=(s.nowPoint.y-s.basePoint.y)/l;switch(h){case"TOP":r=s.nodePoint.y+m,a=p.Manager.nodeHeight-m;break;case"RIGHT":o=p.Manager.nodeWidth+f;break;case"BOTTOM":a=p.Manager.nodeHeight+m;break;case"LEFT":i=s.nodePoint.x+f,o=p.Manager.nodeWidth-f;break;case"LEFT-TOP":i=s.nodePoint.x+f,r=s.nodePoint.y+m,o=p.Manager.nodeWidth-f,a=p.Manager.nodeHeight-m;break;case"RIGHT-TOP":r=s.nodePoint.y+m,o=p.Manager.nodeWidth+f,a=p.Manager.nodeHeight-m;break;case"LEFT-BOTTOM":i=s.nodePoint.x+f,o=p.Manager.nodeWidth-f,a=p.Manager.nodeHeight+m;break;case"RIGHT-BOTTOM":o=p.Manager.nodeWidth+f,a=p.Manager.nodeHeight+m;break;case"TITLE":i=s.nodePoint.x+f,r=s.nodePoint.y+m;break;default:if(!this.props.moveable)return;i=s.nodePoint.x+f,r=s.nodePoint.y+m}}this.moveParams={x:i,y:r,height:a,width:o},this.moveHandle||(this.socketSend(this.moveParams),this.moveHandle=setTimeout((function(){e.setState(e.moveParams),e.moveHandle=void 0}),10));try{var g=window.getSelection();g&&g.removeAllRanges()}catch(t){}}},e.prototype.getTranslate=function(t,e,n){return function(i,r,o){return t<=n&&t>=e&&i!==r?o+(i-r*t)*(1-1/t):o}},e.prototype.getScale=function(t,e,n,i,r){var o=t+r/(i/t);return[t,o=Math.max(e,Math.min(o,n))]},e.prototype.panBy=function(t,e){this.props.workspace&&(this.setState((function(n){return{transformation:o(o({},n.transformation),{translateX:n.transformation.translateX+t,translateY:n.transformation.translateY+e})}})),this.socketSend(this.state))},e.prototype.zoom=function(t,e,n){if(this.props.workspace){var i=this.zoomRef.current;if(i){var r=i.getBoundingClientRect(),o=r.left,a=r.top,s=this.props,l=s.minScale,c=s.maxScale,u=s.zoomSensitivity,d=this.getScale(this.state.transformation.scale,l,c,u,t),p=d[0],h=d[1],f=e-o,m=n-a,g=f/p,b=m/p,y=this.getTranslate(p,l,c),v={transformation:{originX:g,originY:b,translateX:y(f,this.state.transformation.originX,this.state.transformation.translateX),translateY:y(m,this.state.transformation.originY,this.state.transformation.translateY),scale:h}};this.setState(v),this.socketSend(v)}}},e.prototype.onWheel=function(t){t.stopPropagation(),!0!==t.ctrlKey&&!0!==t.altKey||!t.deltaY||(t.preventDefault(),this.zoom(-Math.sign(t.deltaY),t.pageX,t.pageY))},e.prototype.onMouseMove=function(t){var e=t.nativeEvent;!0===e.shiftKey&&(this.panBy(e.movementX,e.movementY),t.stopPropagation())},e.defaultProps={x:null,y:null,width:300,height:300,zoomSensitivity:25,minScale:.1,maxScale:10,moveable:!1,workspace:!1,borderSize:16,titleSize:40,title:"",active:!0,overlapped:!0,windowStyle:255,windowState:c.NORMAL,clientStyle:{},onUpdate:null,onClose:null},e}(d.Component);e.JSWindow=b},function(t,e,n){"use strict";var i=this&&this.__makeTemplateObject||function(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t},r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o,a=r(n(0));e.Client=a.default.div.attrs((function(t){return{style:{top:t.TitleSize+"px",width:t.Width+"px",height:t.Height+"px"}}}))(o||(o=i(["\n background: whitesmoke;\n position: absolute;\n overflow: hidden;\n right: 0;\n left: 0;\n top:0;\n bottom: 0;\n width:0;\n height:0;\n"],["\n background: whitesmoke;\n position: absolute;\n overflow: hidden;\n right: 0;\n left: 0;\n top:0;\n bottom: 0;\n width:0;\n height:0;\n"])))},function(t,e,n){"use strict";var i=this&&this.__makeTemplateObject||function(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t},r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o,a=r(n(0)),s=r(n(12)),l=r(n(13)),c=r(n(14)),u=r(n(15));e.Title=a.default.div.attrs((function(t){return{style:{backgroundColor:t.Active?"rgba(50,100,255,0.9)":"rgba(100,150,255,0.9)",color:t.Active?"white":"#eeeeee"}}}))(o||(o=i(["\nuser-select: none;\ndisplay: flex;\nposition: absolute;\ncursor: move;\noverflow: hidden;\nborder-left: 0.5px solid rgba(0, 0, 0, 0.4);\nborder-right: 0.5px solid rgba(0, 0, 0, 0.4);\nborder-top: 0.5px solid rgba(0, 0, 0, 0.4);\nbox-sizing: border-box;\nborder-radius: 0.8em 0.8em 0 0;\n\nleft: -1px;\ntop: -1px;\nright: -1px;\nheight: ",'px;\n\n> #text {\n flex: 1;\n overflow: hidden;\n font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande",\n "Lucida Sans", Arial, sans-serif;\n font-size: 24px;\n padding: 0px 0.5em;\n align-items: center;\n display: flex;\n white-space: nowrap;\n}\n> #icons {\n > div {\n display: inline-block;\n cursor: default;\n margin: 0.1em;\n background-size: 100% 100%;\n background-color: rgba(255, 255, 255, 0.05);\n width: ',"px;\n height: ","px;\n &:hover{\n background-color: rgba(255, 255, 255, 0.2);\n }\n &#min {\n background-image: url(",");\n }\n &#max {\n background-image: url(",");\n }\n &#normal {\n background-image: url(",");\n }\n &#close {\n background-image: url(",");\n }\n }\n}\n"],["\nuser-select: none;\ndisplay: flex;\nposition: absolute;\ncursor: move;\noverflow: hidden;\nborder-left: 0.5px solid rgba(0, 0, 0, 0.4);\nborder-right: 0.5px solid rgba(0, 0, 0, 0.4);\nborder-top: 0.5px solid rgba(0, 0, 0, 0.4);\nbox-sizing: border-box;\nborder-radius: 0.8em 0.8em 0 0;\n\nleft: -1px;\ntop: -1px;\nright: -1px;\nheight: ",'px;\n\n> #text {\n flex: 1;\n overflow: hidden;\n font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande",\n "Lucida Sans", Arial, sans-serif;\n font-size: 24px;\n padding: 0px 0.5em;\n align-items: center;\n display: flex;\n white-space: nowrap;\n}\n> #icons {\n > div {\n display: inline-block;\n cursor: default;\n margin: 0.1em;\n background-size: 100% 100%;\n background-color: rgba(255, 255, 255, 0.05);\n width: ',"px;\n height: ","px;\n &:hover{\n background-color: rgba(255, 255, 255, 0.2);\n }\n &#min {\n background-image: url(",");\n }\n &#max {\n background-image: url(",");\n }\n &#normal {\n background-image: url(",");\n }\n &#close {\n background-image: url(",");\n }\n }\n}\n"])),(function(t){return t.Size?t.Size+1:0}),(function(t){return t.Size-2}),(function(t){return t.Size-2}),s.default,l.default,u.default,c.default)},function(t,e,n){"use strict";n.r(e),e.default="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBH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kgeT0iMHB4IiB3aWR0aD0iMTI4cHgiIGhlaWdodD0iMTI4cHgiIHZpZXdCb3g9IjAgMCAxMjggMTI4IiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCAxMjggMTI4OyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+Cgkuc3Qwe2ZpbGw6I0ZGRkZGRjtzdHJva2U6IzAwMDAwMDtzdHJva2Utd2lkdGg6NDtzdHJva2UtbGluZWpvaW46cm91bmQ7fQoJLnN0MXtmaWxsOm5vbmU7fQo8L3N0eWxlPgo8dGl0bGU+bm9ybWFsPC90aXRsZT4KPHJlY3QgeD0iMzcuOCIgeT0iMTgiIGNsYXNzPSJzdDAiIHdpZHRoPSI3MC4yIiBoZWlnaHQ9IjcyLjQiLz4KPHJlY3QgeD0iMjIuNiIgeT0iMzAuNSIgY2xhc3M9InN0MCIgd2lkdGg9IjY4LjQiIGhlaWdodD0iNzAuNiIvPgo8cmVjdCBjbGFzcz0ic3QxIiB3aWR0aD0iMTI4IiBoZWlnaHQ9IjEyOCIvPgo8L3N2Zz4K"},function(t,e,n){"use strict";var i=this&&this.__makeTemplateObject||function(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t},r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o,a=r(n(0));e.Root=a.default.div.attrs((function(t){return{style:{left:t.x+"px",top:t.y+"px",width:t.width+"px",height:t.height+"px",position:t.overlapped?"fixed":"absolute"}}}))(o||(o=i(["\n visibility :hidden;\n position: fixed;\n ","\n box-shadow: 10px 10px 10px rgba(0, 0, 0, 0.4);\n border-radius:1em 1em 0 0;\n @keyframes Show {\n 0% {\n opacity: 0;\n //transform: scale(0);\n }\n\n 100% {\n opacity: 1;\n //transform: scale(1);\n }\n }\n @keyframes Hide {\n 100% {\n opacity: 0;\n transform: scale(0);\n }\n\n 0% {\n opacity: 1;\n transform: scale(1);\n }\n }\n @keyframes Max {\n 0% {\n transform: scale(0.5);\n }\n\n 100% {\n transform: scale(1);\n }\n }\n @keyframes Restore {\n 0% {\n transform: scale(1.5);\n }\n\n 100% {\n transform: scale(1);\n }\n }\n @keyframes MinRoot {\n 100% {\n height: ","px;\n }\n }\n\n @keyframes MinClient {\n 100% {\n height: 0px;\n }\n }\n @keyframes MinRestoreClient {\n 0% {\n max-height: 0px;\n }\n 100% {\n max-height: 100%;\n }\n }\n @keyframes MinRestoreRoot {\n 0% {\n max-height: ","px;\n }\n 100% {\n max-height: 100%;\n }\n }\n"],["\n visibility :hidden;\n position: fixed;\n ","\n box-shadow: 10px 10px 10px rgba(0, 0, 0, 0.4);\n border-radius:1em 1em 0 0;\n @keyframes Show {\n 0% {\n opacity: 0;\n //transform: scale(0);\n }\n\n 100% {\n opacity: 1;\n //transform: scale(1);\n }\n }\n @keyframes Hide {\n 100% {\n opacity: 0;\n transform: scale(0);\n }\n\n 0% {\n opacity: 1;\n transform: scale(1);\n }\n }\n @keyframes Max {\n 0% {\n transform: scale(0.5);\n }\n\n 100% {\n transform: scale(1);\n }\n }\n @keyframes Restore {\n 0% {\n transform: scale(1.5);\n }\n\n 100% {\n transform: scale(1);\n }\n }\n @keyframes MinRoot {\n 100% {\n height: ","px;\n }\n }\n\n @keyframes MinClient {\n 100% {\n height: 0px;\n }\n }\n @keyframes MinRestoreClient {\n 0% {\n max-height: 0px;\n }\n 100% {\n max-height: 100%;\n }\n }\n @keyframes MinRestoreRoot {\n 0% {\n max-height: ","px;\n }\n 100% {\n max-height: 100%;\n }\n }\n"])),(function(t){return t.frame&&"border: solid 1.0px rgba(0, 0, 0, 0.4);"}),(function(t){return t.titleSize}),(function(t){return t.titleSize}))},function(t,e,n){"use strict";var i=this&&this.__makeTemplateObject||function(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t},r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o,a=r(n(0));e.Border=a.default.div(o||(o=i(["\n position: absolute;\n user-select: none;\n &:active{\n background-color:rgba(0,0,0,0.05);\n }\n &#TOP {\n cursor: n-resize;\n left: 0px;\n top: -","px;\n right: 0px;\n height: ","px;\n }\n &#RIGHT {\n cursor: e-resize;\n top: 0px;\n right: -","px;\n bottom: 0px;\n width: ","px;\n }\n &#BOTTOM {\n cursor: s-resize;\n left: 0px;\n right: 0px;\n height: ","px;\n bottom: -","px;\n }\n &#LEFT {\n cursor: w-resize;\n top: 0px;\n left: -","px;\n bottom: 0px;\n width: ","px;\n }\n &#LEFT-TOP {\n cursor: nw-resize;\n left: -","px;\n top: -","px;\n width: ","px;\n height: ","px;\n }\n &#RIGHT-TOP {\n cursor: ne-resize;\n right: -","px;\n top: -","px;\n width: ","px;\n height: ","px;\n }\n &#LEFT-BOTTOM {\n cursor: sw-resize;\n left: -","px;\n bottom: -","px;\n width: ","px;\n height: ","px;\n }\n &#RIGHT-BOTTOM {\n cursor: se-resize;\n right: -","px;\n bottom: -","px;\n width: ","px;\n height: ","px;\n }\n"],["\n position: absolute;\n user-select: none;\n &:active{\n background-color:rgba(0,0,0,0.05);\n }\n &#TOP {\n cursor: n-resize;\n left: 0px;\n top: -","px;\n right: 0px;\n height: ","px;\n }\n &#RIGHT {\n cursor: e-resize;\n top: 0px;\n right: -","px;\n bottom: 0px;\n width: ","px;\n }\n &#BOTTOM {\n cursor: s-resize;\n left: 0px;\n right: 0px;\n height: ","px;\n bottom: -","px;\n }\n &#LEFT {\n cursor: w-resize;\n top: 0px;\n left: -","px;\n bottom: 0px;\n width: ","px;\n }\n &#LEFT-TOP {\n cursor: nw-resize;\n left: -","px;\n top: -","px;\n width: ","px;\n height: ","px;\n }\n &#RIGHT-TOP {\n cursor: ne-resize;\n right: -","px;\n top: -","px;\n width: ","px;\n height: ","px;\n }\n &#LEFT-BOTTOM {\n cursor: sw-resize;\n left: -","px;\n bottom: -","px;\n width: ","px;\n height: ","px;\n }\n &#RIGHT-BOTTOM {\n cursor: se-resize;\n right: -","px;\n bottom: -","px;\n width: ","px;\n height: ","px;\n }\n"])),(function(t){return t.Size}),(function(t){return t.Size}),(function(t){return t.Size}),(function(t){return t.Size}),(function(t){return t.Size}),(function(t){return t.Size}),(function(t){return t.Size}),(function(t){return t.Size}),(function(t){return t.Size}),(function(t){return t.Size}),(function(t){return t.Size}),(function(t){return t.Size}),(function(t){return t.Size}),(function(t){return t.Size}),(function(t){return t.Size}),(function(t){return t.Size}),(function(t){return t.Size}),(function(t){return t.Size}),(function(t){return t.Size}),(function(t){return t.Size}),(function(t){return t.Size}),(function(t){return t.Size}),(function(t){return t.Size}),(function(t){return t.Size})),e.borders=["TOP","RIGHT","BOTTOM","LEFT","LEFT-TOP","RIGHT-TOP","LEFT-BOTTOM","RIGHT-BOTTOM"]},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},a=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e};Object.defineProperty(e,"__esModule",{value:!0});var s=o(n(4)),l=a(n(1)),c=n(19),u=n(20),d=n(24),p=n(2),h=function(t){function e(e){var n=t.call(this,e)||this;return n.activeStop=!1,n.rootRef=l.createRef(),n.childRef=[l.createRef(),l.createRef()],n.state={pos:e.pos,activeMode:!1,barOpen:!0},n.type=e.type,n}return r(e,t),e.prototype.render=function(){var t=this,e=l.default.Children.toArray(this.props.children);return l.default.createElement(c.Root,{ref:this.rootRef,style:this.props.style},l.default.createElement(d.Child,{ref:this.childRef[1],onClick:function(){t.activeStop=!1,t.closeBar()}},e[1]),l.default.createElement(d.Child,{ref:this.childRef[0],onClick:function(){return t.activeStop=!0}},e[0]),l.default.createElement(u.Bar,{activeMode:this.state.activeMode,open:this.state.barOpen,type:this.props.type,size:this.props.bold,pos:this.state.pos,procOpen:function(e){return t.onOpen(e)},procMove:function(e){return t.onMove(e)}}))},e.prototype.componentDidUpdate=function(){this.props.type!==this.type?(this.type=this.props.type,this.onOpen(!0),this.onLayout()):this.layout()},e.prototype.componentDidMount=function(){var t=this;p.Manager.init(),this.resizeObserver=new s.default((function(){t.layout()})),this.resizeObserver.observe(this.rootRef.current),this.onLayout()},e.prototype.componentWillUnmount=function(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=void 0)},e.prototype.closeBar=function(){var t=this;this.state.activeMode&&!this.activeStop&&(this.closeHandle&&clearTimeout(this.closeHandle),this.closeHandle=setTimeout((function(){t.state.activeMode&&!t.activeStop&&t.onOpen(!1),t.closeHandle=void 0}),this.props.activeWait))},e.prototype.layout=function(){var t=this;this.layoutHandle||(this.layoutHandle=setTimeout((function(){t.layoutHandle=void 0,t.onLayout()}),1))},e.prototype.onLayout=function(){var t=!1,e=this.state.pos,n=this.rootRef.current,i=[this.childRef[0].current,this.childRef[1].current],r=this.props.bold,o=this.props.type,a=n.offsetWidth,s=n.offsetHeight;if(this.props.activeSize>-1){if("we"===o||"ew"===o)a-(e+r)<this.props.activeSize&&(t=!0,this.state.activeMode||(i[1].style.animation="DrawerMax 0.5s ease 0s forwards"));else s-(e+r)<this.props.activeSize&&(t=!0,this.state.activeMode||(i[1].style.animation="DrawerMax 0.5s ease 0s forwards"));t!==this.state.activeMode&&(this.setState({activeMode:t}),t||(this.onOpen(!0),i[1].style.animation="DrawerNormal 0.5s ease 0s normal"),this.closeBar())}switch(o){case"we":i[0].style.left="0",i[0].style.right="auto",i[0].style.width=e+"px",i[0].style.height="auto",i[0].style.top="0",i[0].style.bottom="0",t||(i[1].style.left=e+r+"px",i[1].style.right="0",i[1].style.width="auto",i[1].style.height="auto",i[1].style.top="0",i[1].style.bottom="0");break;case"ew":i[0].style.left="auto",i[0].style.right="0",i[0].style.width=e+"px",i[0].style.height="auto",i[0].style.top="0",i[0].style.bottom="0",t||(i[1].style.left="0",i[1].style.right=e+r+"px",i[1].style.width="auto",i[1].style.height="auto",i[1].style.top="0",i[1].style.bottom="0");break;case"ns":i[0].style.top="0",i[0].style.bottom="auto",i[0].style.width="auto",i[0].style.height=e+"px",i[0].style.left="0",i[0].style.right="0",t||(i[1].style.top=e+r+"px",i[1].style.bottom="0",i[1].style.width="auto",i[1].style.height="auto",i[1].style.left="0",i[1].style.right="0");break;case"sn":i[0].style.top="auto",i[0].style.bottom="0",i[0].style.width="auto",i[0].style.height=e+"px",i[0].style.left="0",i[0].style.right="0",t||(i[1].style.top="0",i[1].style.bottom=e+r+"px",i[1].style.width="auto",i[1].style.height="auto",i[1].style.left="0",i[1].style.right="0")}},e.prototype.onOpen=function(t){var e=[this.childRef[0].current,this.childRef[1].current];e[0].style.animation=t?this.props.type+"DrawerShow 0.5s ease 0s normal":this.props.type+"DrawerClose 0.5s ease 0s forwards",this.setState({barOpen:t})},e.prototype.onMove=function(t){this.setState({pos:t}),this.closeBar()},e.defaultProps={type:"ew",bold:16,pos:200,activeWait:3e3,activeSize:300,style:{}},e}(l.Component);e.SplitView=h},function(t,e,n){"use strict";var i=this&&this.__makeTemplateObject||function(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t},r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o,a=r(n(0));e.Root=a.default.div.attrs((function(t){return{style:{}}}))(o||(o=i(["\n & {\n overflow: hidden;\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n }\n\n @keyframes nsDrawerShow {\n 0% {\n top: 0;\n transform: translateY(-100%);\n }\n\n 100% {\n transform: translateY(0);\n }\n }\n\n @keyframes nsDrawerClose {\n 0% {\n transform: translateY(0);\n }\n\n 100% {\n top: 0;\n transform: translateY(-100%);\n }\n }\n\n @keyframes snDrawerShow {\n 0% {\n bottom: 0;\n transform: translateY(100%);\n }\n\n 100% {\n transform: translateY(0);\n }\n }\n\n @keyframes snDrawerClose {\n 0% {\n transform: translateY(0);\n }\n\n 100% {\n bottom: 0;\n transform: translateY(100%);\n }\n }\n\n @keyframes weDrawerShow {\n 0% {\n left: 0;\n transform: translateX(-100%);\n }\n\n 100% {\n transform: translateX(0);\n }\n }\n\n @keyframes weDrawerClose {\n 0% {\n transform: translateX(0);\n }\n\n 100% {\n left: 0;\n transform: translateX(-100%);\n }\n }\n\n @keyframes ewDrawerShow {\n 0% {\n transform: translateX(100%);\n right: 0;\n }\n\n 100% {\n transform: translateX(0);\n }\n }\n\n @keyframes ewDrawerClose {\n 0% {\n transform: translateX(0);\n }\n\n 100% {\n right: 0;\n transform: translateX(100%);\n }\n }\n\n @keyframes DrawerMax {\n 0% {\n }\n\n 100% {\n right: 0;\n left: 0;\n top: 0;\n bottom: 0;\n }\n }\n @keyframes DrawerNormal {\n 0% {\n right: 0;\n left: 0;\n top: 0;\n bottom: 0;\n }\n\n 100% {\n }\n }\n"],["\n & {\n overflow: hidden;\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n }\n\n @keyframes nsDrawerShow {\n 0% {\n top: 0;\n transform: translateY(-100%);\n }\n\n 100% {\n transform: translateY(0);\n }\n }\n\n @keyframes nsDrawerClose {\n 0% {\n transform: translateY(0);\n }\n\n 100% {\n top: 0;\n transform: translateY(-100%);\n }\n }\n\n @keyframes snDrawerShow {\n 0% {\n bottom: 0;\n transform: translateY(100%);\n }\n\n 100% {\n transform: translateY(0);\n }\n }\n\n @keyframes snDrawerClose {\n 0% {\n transform: translateY(0);\n }\n\n 100% {\n bottom: 0;\n transform: translateY(100%);\n }\n }\n\n @keyframes weDrawerShow {\n 0% {\n left: 0;\n transform: translateX(-100%);\n }\n\n 100% {\n transform: translateX(0);\n }\n }\n\n @keyframes weDra