text: /*! Outkit v1.0.2 - Copyright 2017 James Ehly - MIT License */
  !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.outkit=e():t.outkit=e()}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};return e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=9)}([function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(){r(this,t),this.okClassName="",this.stateClassName="",this.style={}}return i(t,null,[{key:"animated",value:function(t){return this.animatedProps.indexOf(t)>=0}}]),t}();o.animatedProps=["style.height","style.width","style.top","style.bottom","style.left","style.right","style.opacity","style.zIndex","string.marginTop","string.marginBottom","string.marginLeft","string.marginRight","string.paddingTop","string.paddingBottom","string.paddingLeft","string.paddingRight"],e.State=o},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();Object.defineProperty(e,"__esModule",{value:!0});var s=n(11),a=n(10),u=n(0),l=n(2),f=function(){function t(e){var n=this;r(this,t),this.step=function(t,e){var r=e[0],i=e[1];for(var o in r.style)if(u.State.animated("style."+o)){var s=r.style[o],a=i.style[o];if(s!==a){var l=parseFloat(s),f=parseFloat(a);if(isFinite(l)&&isFinite(f)){var c=(l-f)*t+f+"";(!isFinite(s)&&s.match(/px$/)||!isFinite(a)&&a.match(/px$/))&&(c+="px"),n._element.style[o]=c}}}},this._events={},this._logger=new a.default,this._animator=new s.OutkitAnimator,this._children=new Array;var i=l.default.queryElement(e);if(!i)return void this._logger.error('Element "'+e+'" could not be found.  Ensure your query string is a valid css selector.');this.setElement(i),this._state=null,void 0!==this._animator&&null!==this._animator&&void 0!==this._animator.setStep&&"function"==typeof this._animator.setStep&&this._animator.setStep(this.step)}return o(t,[{key:"getElement",value:function(){return this._element}},{key:"setElement",value:function(t){return this._element=t,this}},{key:"getAnimator",value:function(){return this._animator}},{key:"setAnimator",value:function(t){return this._animator=t,this}},{key:"addChild",value:function(t){return this._children.push(t),t.setParent(this),this}},{key:"removeChild",value:function(t){var e=this._children.indexOf(t);return this._children.splice(e,1),this}},{key:"getChildren",value:function(){return this._children}},{key:"setParent",value:function(t){return this._parent=t,this}},{key:"getRoot",value:function(){return this._parent&&"function"==typeof this._parent.getRoot?this._parent.getRoot():this}},{key:"getState",value:function(){return this._state}},{key:"setState",value:function(t){return this._state=t,this}},{key:"registerEvent",value:function(t,e){return this._events[t]=e,this}},{key:"relay",value:function(t){var e=[];"function"==typeof this._events[t]&&e.push(this._events[t]());var n=!0,r=!1,o=void 0;try{for(var s,a=this._children[Symbol.iterator]();!(n=(s=a.next()).done);n=!0){var u=s.value;"object"===(void 0===u?"undefined":i(u))&&"function"==typeof u.relay&&e.push(u.relay(t))}}catch(t){r=!0,o=t}finally{try{!n&&a.return&&a.return()}finally{if(r)throw o}}return Promise.all(e)}},{key:"merge",value:function(t,e){var n=new u.State;return n=Object.assign(n,e,t),n.style=Object.assign({},e.style,t.style),n}},{key:"render",value:function(t){var e=this,n=this._state,r=!1;return this._state?t=this.merge(t,n):(n=new u.State,r=!0,this._element.style.cssText=null),new Promise(function(i,o){if(!e._element)return e._logger.error("Element is undefined.  Use setElement() before calling render()."),void o(n);if(e.changeClassName(t.stateClassName,n.stateClassName),e.changeClassName(t.okClassName,n.okClassName),e.setStaticProperties(t,n,r),r)return e._logger.log("[Initial State][#"+e._element.id+"]:  "+JSON.stringify(t)+" ]"),e._state=t,void i(t);if(e._animator){var s=Date.now();return e._animator.animate(s,t,n).then(function(n){n&&(e._logger.log("[Updated State][#"+e._element.id+"]:  "+JSON.stringify(t)+" ]"),e._state=t,i(t))})}e._state=t,i(t)})}},{key:"isAnimatedStyle",value:function(t){return u.State.animated("style."+t)}},{key:"changeClassName",value:function(t,e){t&&t!=e&&l.default.changeClass(this._element,t,e)}},{key:"setStaticProperties",value:function(t,e,n){for(var r in t.style)if(!this._animator||!this.isAnimatedStyle(r)||null===t.style[r]||n){var i=t.style[r],o=e.style[r];i!==o&&(u.State.animated("style."+r)&&!i.match(/%|px$/)&&(i+="px"),this._element.style[r]=i)}}}]),t}();e.Component=f},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(){r(this,t)}return i(t,null,[{key:"changeClass",value:function(t,e,n){var r=t.className.split(" ");if(n){var i=r.indexOf(n);i>=0&&r.splice(i,1)}if(e){r.indexOf(e)<0&&r.push(e)}t.className=r.join(" ")}},{key:"setGuidId",value:function(t){var e="ok-guid-"+Math.random().toString(36).substring(2)+(new Date).getTime().toString(36);t.id=e}},{key:"queryElement",value:function(t){return document.querySelectorAll(t)[0]}}]),t}();e.default=o},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();Object.defineProperty(e,"__esModule",{value:!0});var a=n(1),u=n(0),l=function(t){function e(t){r(this,e);var n=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.startDrag=function(t){var e=n.getElement();n._dragRoot&&(e=n.getRoot().getElement());var r=e.parentElement,i=t.clientX,o=t.clientY,s=e.offsetTop,a=e.offsetLeft,u=e.offsetWidth,l=e.offsetHeight,f=(r.offsetTop,r.offsetLeft,r.offsetWidth),c=r.offsetHeight,h=i-a,p=o-s;document.onmousemove=function(t){var r=t.clientX,i=t.clientY,o=r-h,s=i-p;o<0&&(o=0),s<0&&(s=0),o+u>f&&(o=f-u),s+l>c&&(s=c-l),n.move(e,o,s)}},n._dragRoot=!1,n.registerEvent("init",function(){return n.init()}),n}return o(e,t),s(e,[{key:"dragRoot",value:function(t){return this._dragRoot=t,this}},{key:"init",value:function(){var t=new u.State;return t.okClassName="ok-draggable",this.getElement().addEventListener("mousedown",this.startDrag),this.getElement().addEventListener("mouseup",function(){document.onmousemove=function(){}}),this.render(t)}},{key:"move",value:function(t,e,n){t.style.left=e+"px",t.style.top=n+"px"}},{key:"stopDrag",value:function(){}}]),e}(a.Component);e.default=l},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();Object.defineProperty(e,"__esModule",{value:!0});var a=n(0),u=n(1),l=function(t){function e(t,n){r(this,e);var o=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return o._dockPositions=["left","right","top","bottom"],o._dock="left",o._minSize=0,o._maxSize=280,o._isOpen=!1,o.registerEvent("on",function(){return o.on()}),o.registerEvent("off",function(){return o.off()}),o.registerEvent("toggle",function(){return o.toggle()}),o.registerEvent("init",function(){return o.init()}),o}return o(e,t),s(e,[{key:"dock",value:function(t){var e=this;return new Promise(function(n,r){return e._dockPositions.indexOf(t)<0&&(e._logger.error('"'+t+'" is not a valid dock position.  Valid positions are '+e._dockPositions.join(", ")),r()),e.relay("off").then(function(){return e._dock=t,e._state=null,e.init()})})}},{key:"minSize",value:function(t){return t<0?(this._logger.error("minSize number must be greater than or equal to zero."),this):(this._minSize=t,this)}},{key:"maxSize",value:function(t){return t<0?(this._logger.error("maxSize number must be greater than or equal to zero."),this):(this._maxSize=t,this)}},{key:"init",value:function(){var t=new a.State;return t.okClassName="ok-drawer",t.style.position="fixed",t.style.display="block",t.style.zIndex="10000",this.isLeft()&&(t.style.width=this._maxSize+"px",t.style.height=this.getElement().parentElement.offsetHeight+"px",t.style.left="-"+this._maxSize+"px",t.style.top="0"),this.isRight()&&(t.style.width=this._maxSize+"px",t.style.height=this.getElement().parentElement.offsetHeight+"px",t.style.right="-"+this._maxSize+"px",t.style.top="0"),this.isTop()&&(t.style.width=this.getElement().parentElement.offsetWidth+"px",t.style.height=this._maxSize+"px",t.style.top="-"+this._maxSize+"px",t.style.left="0"),this.isBottom()&&(t.style.width=this.getElement().parentElement.offsetWidth+"px",t.style.height=this._maxSize+"px",t.style.bottom="-"+this._maxSize+"px",t.style.left="0"),this.render(t)}},{key:"toggle",value:function(){return this._isOpen?this.off():this.on()}},{key:"on",value:function(){var t=this;if(this._isOpen)return new Promise(function(e,n){e(t._state)});this._isOpen=!0;var e=new a.State;return this.isLeft()&&(e.style.left="0"),this.isRight()&&(e.style.right="0"),this.isTop()&&(e.style.top="0"),this.isBottom()&&(e.style.bottom="0"),e.stateClassName="ok-on",this.render(e)}},{key:"off",value:function(){var t=this;if(!this._isOpen)return new Promise(function(e,n){e(t._state)});this._isOpen=!1;var e=new a.State;return this.isLeft()&&(e.style.left="-"+this._maxSize+"px"),this.isRight()&&(e.style.right="-"+this._maxSize+"px"),this.isTop()&&(e.style.top="-"+this._maxSize+"px"),this.isBottom()&&(e.style.bottom="-"+this._maxSize+"px"),e.stateClassName="ok-off",this.render(e)}},{key:"isLeft",value:function(){return"left"===this._dock}},{key:"isRight",value:function(){return"right"===this._dock}},{key:"isTop",value:function(){return"top"===this._dock}},{key:"isBottom",value:function(){return"bottom"===this._dock}}]),e}(u.Component);e.default=l},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var s=i.get;if(void 0!==s)return s.call(r)};Object.defineProperty(e,"__esModule",{value:!0});var u=n(1),l=n(2),f=n(0),c=function(t){function e(t){r(this,e);var n=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.resetChildren(),n.registerEvent("init",function(){return n.init()}),n.setAnimator(null),n}return o(e,t),s(e,[{key:"init",value:function(){var t=this.getElement();this.resetChildren();for(var e=0;e<t.children.length;e++){var n=t.children[e];n.id||l.default.setGuidId(n);var r=new u.Component("#"+n.id);r.setAnimator(null);var i=n.getAttribute("data-size")||"100%";"100%"===i?this.fluidChildren.push(r):i.match(/^[\d]+%$/)?this.perctChildren.push(r):this.fixedChildren.push(r),r.render({style:{height:"100%",width:i,overflow:"hidden",float:"left"}}),this.addChild(r)}window.removeEventListener("resize",this.resize.bind(this)),window.addEventListener("resize",this.resize.bind(this));var o=new f.State;return o.style.height=this.getElement().parentElement.offsetHeight+"px",o.style.width=this.getElement().parentElement.offsetWidth+"px",o.style.display="block",o.style.overflow="hidden",o.style.float="left",this.render(o)}},{key:"resize",value:function(){var t=new f.State;return t.style.height=this.getElement().parentElement.offsetHeight+"px",t.style.width=this.getElement().parentElement.offsetWidth+"px",this.render(t)}},{key:"render",value:function(t){var n=[];n.push(a(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"render",this).call(this,t));var r=this.getElement().offsetWidth,i=r,o=(this.getElement().offsetHeight,!0),s=!1,u=void 0;try{for(var l,f=this.fixedChildren[Symbol.iterator]();!(o=(l=f.next()).done);o=!0){i-=l.value.getElement().offsetWidth}}catch(t){s=!0,u=t}finally{try{!o&&f.return&&f.return()}finally{if(s)throw u}}var c=!0,h=!1,p=void 0;try{for(var y,d=this.perctChildren[Symbol.iterator]();!(c=(y=d.next()).done);c=!0){var v=y.value,m=parseFloat(v.getElement().getAttribute("data-size"))/100*i;i-=m,v.render({style:{width:m+"px"}})}}catch(t){h=!0,p=t}finally{try{!c&&d.return&&d.return()}finally{if(h)throw p}}var g=!0,_=!1,b=void 0;try{for(var w,k=this.fluidChildren[Symbol.iterator]();!(g=(w=k.next()).done);g=!0){var O=w.value,x=i/this.fluidChildren.length;n.push(O.render({style:{width:x+"px"}}))}}catch(t){_=!0,b=t}finally{try{!g&&k.return&&k.return()}finally{if(_)throw b}}return Promise.all(n)}},{key:"resetChildren",value:function(){this.fixedChildren=new Array,this.perctChildren=new Array,this.fluidChildren=new Array}}]),e}(u.Component);e.default=c},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();Object.defineProperty(e,"__esModule",{value:!0});var a=n(0),u=n(1),l=function(t){function e(t){r(this,e);var n=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.clickEvent=function(){n.getRoot().relay("off")},n._opacity=.8,n._color="#000000",n._isOn=!1,n.registerEvent("on",function(){return n.on()}),n.registerEvent("off",function(){return n.off()}),n.registerEvent("toggle",function(){return n.toggle()}),n.registerEvent("init",function(){return n.init()}),n}return o(e,t),s(e,[{key:"opacity",value:function(t){return t<0?(this._logger.error("Opacity must be greater than or equal to zero."),this):t>1?(this._logger.error("Opacity must be less than or equal to one."),this):(this._opacity=t,this)}},{key:"color",value:function(t){return this._color=t,this}},{key:"init",value:function(){var t=new a.State;return t.okClassName="ok-overlay",t.style.height="100%",t.style.width="100%",t.style.position="fixed",t.style.backgroundColor=this._color,t.style.opacity="0",t.style.display="none",t.style.top="0",t.style.left="0",this.getElement()&&this.getElement().addEventListener("click",this.clickEvent),this.render(t)}},{key:"toggle",value:function(){return this._isOn?this.off():this.on()}},{key:"on",value:function(){var t=this;return this._isOn?new Promise(function(e,n){e(t._state)}):(this._isOn=!0,this.render(this.onState()))}},{key:"off",value:function(){var t=this;return this._isOn?(this._isOn=!1,this.render(this.offState()).then(function(e){return t.render(t.hiddenState())})):new Promise(function(e,n){e(t._state)})}},{key:"onState",value:function(){var t=new a.State;return t.style.display="block",t.style.opacity=this._opacity.toString(),t}},{key:"offState",value:function(){var t=new a.State;return t.style.opacity="0",t}},{key:"hiddenState",value:function(){var t=new a.State;return t.style.display="none",t}}]),e}(u.Component);e.default=l},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var s=i.get;if(void 0!==s)return s.call(r)};Object.defineProperty(e,"__esModule",{value:!0});var u=n(1),l=n(2),f=n(0),c=function(t){function e(t){r(this,e);var n=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.resetChildren(),n.registerEvent("init",function(){return n.init()}),n.setAnimator(null),n}return o(e,t),s(e,[{key:"init",value:function(){var t=this.getElement();this.resetChildren();for(var e=0;e<t.children.length;e++){var n=t.children[e];n.id||l.default.setGuidId(n);var r=new u.Component("#"+n.id);r.setAnimator(null);var i=n.getAttribute("data-size")||"100%";"100%"===i?this.fluidChildren.push(r):i.match(/^[\d]+%$/)?this.perctChildren.push(r):this.fixedChildren.push(r),r.render({style:{width:"100%",height:i,overflow:"hidden",float:"left"}}),this.addChild(r)}window.removeEventListener("resize",this.resize.bind(this)),window.addEventListener("resize",this.resize.bind(this));var o=new f.State;return o.style.height=this.getElement().parentElement.offsetHeight+"px",o.style.width=this.getElement().parentElement.offsetWidth+"px",o.style.display="block",o.style.overflow="hidden",o.style.float="left",this.render(o)}},{key:"resize",value:function(){var t=new f.State;return t.style.height=this.getElement().parentElement.offsetHeight+"px",console.log(document.body.offsetHeight),t.style.width=this.getElement().parentElement.offsetWidth+"px",this.render(t)}},{key:"render",value:function(t){var n=[];n.push(a(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"render",this).call(this,t));var r=this.getElement().offsetHeight,i=r,o=(this.getElement().offsetWidth,!0),s=!1,u=void 0;try{for(var l,f=this.fixedChildren[Symbol.iterator]();!(o=(l=f.next()).done);o=!0){i-=l.value.getElement().offsetHeight}}catch(t){s=!0,u=t}finally{try{!o&&f.return&&f.return()}finally{if(s)throw u}}var c=!0,h=!1,p=void 0;try{for(var y,d=this.perctChildren[Symbol.iterator]();!(c=(y=d.next()).done);c=!0){var v=y.value,m=parseFloat(v.getElement().getAttribute("data-size"))/100*i;i-=m,v.render({style:{height:m+"px"}})}}catch(t){h=!0,p=t}finally{try{!c&&d.return&&d.return()}finally{if(h)throw p}}var g=!0,_=!1,b=void 0;try{for(var w,k=this.fluidChildren[Symbol.iterator]();!(g=(w=k.next()).done);g=!0){var O=w.value,x=i/this.fluidChildren.length;n.push(O.render({style:{height:x+"px"}}))}}catch(t){_=!0,b=t}finally{try{!g&&k.return&&k.return()}finally{if(_)throw b}}return Promise.all(n)}},{key:"resetChildren",value:function(){this.fixedChildren=new Array,this.perctChildren=new Array,this.fluidChildren=new Array}}]),e}(u.Component);e.default=c},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();Object.defineProperty(e,"__esModule",{value:!0});var a,u=n(0),l=n(1);!function(t){t[t.TopLeft=0]="TopLeft",t[t.Top=1]="Top",t[t.TopRight=2]="TopRight",t[t.Left=3]="Left",t[t.Center=4]="Center",t[t.Right=5]="Right",t[t.BottomRight=6]="BottomRight",t[t.Bottom=7]="Bottom",t[t.BottomLeft=8]="BottomLeft"}(a=e.WindowPlacement||(e.WindowPlacement={}));var f=function(t){function e(t,n){r(this,e);var o=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return o._width=n.width||100,o._height=n.height||100,o._top=n.top||0,o._left=n.left||0,o._placement=a.Center,o._isOpen=!1,o._placementMargin=32,o.registerEvent("on",function(){return o.on()}),o.registerEvent("off",function(){return o.off()}),o.registerEvent("toggle",function(){return o.toggle()}),o.registerEvent("init",function(){return o.init()}),o}return o(e,t),s(e,[{key:"width",value:function(t){return t<0?(this._logger.error("Width must be greater than or equal to zero."),this):(this._width=t,this)}},{key:"height",value:function(t){return t<0?(this._logger.error("Height must be greater than or equal to zero."),this):(this._height=t,this)}},{key:"top",value:function(t){return this._top=t,this}},{key:"left",value:function(t){return this._left=t,this}},{key:"init",value:function(){var t=new u.State;t.okClassName="ok-window",t.style.position="absolute",t.style.display="none",t.style.zIndex="9999",t.style.width=this._width+"px",t.style.height=this._height+"px",t.style.opacity="0";var e="0",n="0",r=window.innerWidth,i=window.innerHeight,o=this._placementMargin,s=r-this._width-o,l=r/2-this._width/2,f=i/2-this._height/2,c=i-this._height-o;if(this._placement)switch(+this._placement){case a.TopLeft:e=o+"px",n=o+"px";break;case a.Top:e=l+"px",n=o+"px";break;case a.TopRight:e=s+"px",n=o+"px";break;case a.Left:e=o+"px",n=f+"px";break;case a.Center:e=l+"px",n=f+"px";break;case a.Right:e=s+"px",n=f+"px";break;case a.BottomLeft:e=o+"px",n=c+"px";break;case a.Bottom:e=l+"px",n=c+"px";break;case a.BottomRight:e=s+"px",n=c+"px";break;default:e=l+"px",n=f+"px"}else e=this._left+"px",n=this._top+"px";return t.style.left=e,t.style.top=n,this.render(t)}},{key:"toggle",value:function(){return this._isOpen?this.off():this.on()}},{key:"on",value:function(){var t=this;if(this._isOpen)return new Promise(function(e,n){e(t._state)});this._isOpen=!0;var e=new u.State;return e.style.display="block",e.style.opacity="1",this.render(e)}},{key:"off",value:function(){var t=this;if(!this._isOpen)return new Promise(function(e,n){e(t._state)});this._isOpen=!1;var e=new u.State;return e.style.opacity="0",this.render(e).then(function(e){var n=new u.State;return n.style.display="none",t.render(n)})}}]),e}(l.Component);e.default=f},function(t,e,n){"use strict";function r(t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}Object.defineProperty(e,"__esModule",{value:!0}),r(n(0)),r(n(1));var i=n(4);e.Drawer=i.default;var o=n(7);e.VerticalLayout=o.default;var s=n(5);e.HorizontalLayout=s.default;var a=n(8);e.Window=a.default;var u=n(6);e.Overlay=u.default;var l=n(3);e.Draggable=l.default},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];r(this,t),this._c={warn:function(t){},error:function(t){},info:function(t){},log:function(t){}},"object"===i(window.console)&&e&&(this._c=window.console),this._debug=e}return o(t,[{key:"log",value:function(t){this._debug&&"function"==typeof this._c.log&&this._c.log(t)}},{key:"warn",value:function(t){this._debug&&"function"==typeof this._c.warn&&this._c.warn(t)}},{key:"info",value:function(t){this._debug&&"function"==typeof this._c.info&&this._c.info(t)}},{key:"error",value:function(t){this._debug&&"function"==typeof this._c.error&&this._c.error(t)}}]),t}();e.default=s},function(t,e,n){/*! Outkit Animator v1.0.3 - Copyright 2017 James Ehly - MIT License */
  !function(e,n){t.exports=n()}(0,function(){return function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=1)}([function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});!function(t){t[t.Linear=0]="Linear",t[t.EaseIn=1]="EaseIn",t[t.EaseOut=2]="EaseOut",t[t.EaseInOut=3]="EaseInOut",t[t.PullIn=4]="PullIn",t[t.PushOut=5]="PushOut",t[t.PushPull=6]="PushPull"}(e.AnimatorTransition||(e.AnimatorTransition={}))},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),s=function(){function t(){r(this,t),this.easeOut=this.makeEaseOut(this.easeIn),this.easeInOut=this.makeEaseInOut(this.easeIn),this.pushOut=this.makeEaseOut(this.pullIn),this.pushPull=this.makeEaseInOut(this.pullIn),this._duration=200,this._step=function(){},this._rate=16,this._transition=this.linear}return i(t,[{key:"setStep",value:function(t){return this._step=t,this}},{key:"setDuration",value:function(t){return this._duration=t,this}},{key:"setRate",value:function(t){return this._rate=t,this}},{key:"setTransition",value:function(t){switch(t){case o.AnimatorTransition.EaseIn:this._transition=this.easeIn;break;case o.AnimatorTransition.EaseOut:this._transition=this.easeOut;break;case o.AnimatorTransition.EaseInOut:this._transition=this.easeInOut;break;case o.AnimatorTransition.PullIn:this._transition=this.pullIn;break;case o.AnimatorTransition.PushOut:this._transition=this.pushOut;break;case o.AnimatorTransition.PushPull:this._transition=this.pushPull;break;default:this._transition=this.linear}return this}},{key:"animate",value:function(t){for(var e=this,n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return new Promise(function(n){if("function"==typeof window.requestAnimationFrame){var i=performance.now(),o=function t(o){var s=(o-i)/e._duration;s>1&&(s=1);var a=e._transition(s);e._step(a,r),s<1?requestAnimationFrame(t):n(!0)};requestAnimationFrame(o)}else e._interval=window.setInterval(function(){var i=Date.now(),o=i-t,s=o/e._duration;s>1&&(s=1);var a=e._transition(s);e._step(a,r),1==s&&(clearInterval(e._interval),n(!0))},e._rate)})}},{key:"linear",value:function(t){return t}},{key:"easeIn",value:function(t){return Math.pow(t,5)}},{key:"pullIn",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return Math.pow(t,2)*((e+1)*t-e)}},{key:"makeEaseOut",value:function(t){return function(e){return 1-t(1-e)}}},{key:"makeEaseInOut",value:function(t){return function(e){return e<.5?t(2*e)/2:(2-t(2*(1-e)))/2}}}]),t}();e.OutkitAnimator=s,function(t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}(n(0))}])})}])});
  //# sourceMappingURL=./dist/outkit.min.js.map