@nekobird/controls
Version:
A collection of opinionated user-interface controls.
19 lines • 232 kB
JavaScript
parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c<t.length;c++)try{f(t[c])}catch(e){i||(i=e)}if(t.length){var l=f(t[t.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=l:"function"==typeof define&&define.amd?define(function(){return l}):n&&(this[n]=l)}if(parcelRequire=f,i)throw i;return f}({"tTJo":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});
},{}],"QVnC":[function(require,module,exports) {
var t=function(t){"use strict";var r,e=Object.prototype,n=e.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(t,r,e,n){var o=r&&r.prototype instanceof v?r:v,i=Object.create(o.prototype),a=new k(n||[]);return i._invoke=function(t,r,e){var n=f;return function(o,i){if(n===l)throw new Error("Generator is already running");if(n===p){if("throw"===o)throw i;return N()}for(e.method=o,e.arg=i;;){var a=e.delegate;if(a){var c=_(a,e);if(c){if(c===y)continue;return c}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if(n===f)throw n=p,e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);n=l;var u=h(t,r,e);if("normal"===u.type){if(n=e.done?p:s,u.arg===y)continue;return{value:u.arg,done:e.done}}"throw"===u.type&&(n=p,e.method="throw",e.arg=u.arg)}}}(t,e,a),i}function h(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(n){return{type:"throw",arg:n}}}t.wrap=u;var f="suspendedStart",s="suspendedYield",l="executing",p="completed",y={};function v(){}function d(){}function g(){}var m={};m[i]=function(){return this};var w=Object.getPrototypeOf,L=w&&w(w(G([])));L&&L!==e&&n.call(L,i)&&(m=L);var x=g.prototype=v.prototype=Object.create(m);function E(t){["next","throw","return"].forEach(function(r){t[r]=function(t){return this._invoke(r,t)}})}function b(t){var r;this._invoke=function(e,o){function i(){return new Promise(function(r,i){!function r(e,o,i,a){var c=h(t[e],t,o);if("throw"!==c.type){var u=c.arg,f=u.value;return f&&"object"==typeof f&&n.call(f,"__await")?Promise.resolve(f.__await).then(function(t){r("next",t,i,a)},function(t){r("throw",t,i,a)}):Promise.resolve(f).then(function(t){u.value=t,i(u)},function(t){return r("throw",t,i,a)})}a(c.arg)}(e,o,r,i)})}return r=r?r.then(i,i):i()}}function _(t,e){var n=t.iterator[e.method];if(n===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=r,_(t,e),"throw"===e.method))return y;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return y}var o=h(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,y;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=r),e.delegate=null,y):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,y)}function j(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function O(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function G(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function e(){for(;++o<t.length;)if(n.call(t,o))return e.value=t[o],e.done=!1,e;return e.value=r,e.done=!0,e};return a.next=a}}return{next:N}}function N(){return{value:r,done:!0}}return d.prototype=x.constructor=g,g.constructor=d,g[c]=d.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===d||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,c in t||(t[c]="GeneratorFunction")),t.prototype=Object.create(x),t},t.awrap=function(t){return{__await:t}},E(b.prototype),b.prototype[a]=function(){return this},t.AsyncIterator=b,t.async=function(r,e,n,o){var i=new b(u(r,e,n,o));return t.isGeneratorFunction(e)?i:i.next().then(function(t){return t.done?t.value:i.next()})},E(x),x[c]="Generator",x[i]=function(){return this},x.toString=function(){return"[object Generator]"},t.keys=function(t){var r=[];for(var e in t)r.push(e);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=G,k.prototype={constructor:k,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(O),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=r)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function o(n,o){return c.type="throw",c.arg=t,e.next=n,o&&(e.method="next",e.arg=r),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),h=n.call(a,"finallyLoc");if(u&&h){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!h)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var o=this.tryEntries[e];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=r&&r<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=r,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),y},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),O(e),y}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;O(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:G(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=r),y}},t}("object"==typeof module?module.exports:{});try{regeneratorRuntime=t}catch(r){Function("r","regeneratorRuntime = r")(t)}
},{}],"PMvg":[function(require,module,exports) {
module.exports=require("regenerator-runtime");
},{"regenerator-runtime":"QVnC"}],"b9XL":[function(require,module,exports) {
function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o})(t)}function t(n){return"function"==typeof Symbol&&"symbol"===o(Symbol.iterator)?module.exports=t=function(t){return o(t)}:module.exports=t=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":o(t)},t(n)}module.exports=t;
},{}],"0fcM":[function(require,module,exports) {
function n(n,o){if(!(n instanceof o))throw new TypeError("Cannot call a class as a function")}module.exports=n;
},{}],"P8NW":[function(require,module,exports) {
function e(e,r){for(var n=0;n<r.length;n++){var t=r[n];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(e,t.key,t)}}function r(r,n,t){return n&&e(r.prototype,n),t&&e(r,t),r}module.exports=r;
},{}],"0ZeX":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.DEFAULT_CONFIG={cooldown:200,listenToKeydown:!1,deactivateOnOutsideAction:!0,items:[],isTrigger:function(t){return t.classList.contains("js-mono-item-trigger")},mapTriggerToAction:function(t){return"activate"===t.dataset.action?{trigger:t,action:"activate",payload:t.dataset.target}:"deactivate"===t.dataset.action?{trigger:t,action:"deactivate"}:"toggle"===t.dataset.action&&{trigger:t,action:"toggle",payload:t.dataset.target}},getItemId:function(t){return"string"==typeof t.dataset.id&&t.dataset.id},conditionActivate:function(){return!0},conditionDeactivate:function(){return!0},beforeActivate:function(){return Promise.resolve()},beforeDeactivate:function(){return Promise.resolve()},itemIsActive:function(t){return t.classList.contains("js-mono-item--active")},activateItem:function(t){return t.classList.add("js-mono-item--active")},deactivateItem:function(t){return t.classList.remove("js-mono-item--active")},afterActivate:function(){return Promise.resolve()},afterDeactivate:function(){return Promise.resolve()},beforeAction:function(){return Promise.resolve()},afterAction:function(){},onKeydown:function(){},onOutsideAction:function(){}};
},{}],"EUV0":[function(require,module,exports) {
"use strict";var t=i(require("@babel/runtime/helpers/classCallCheck")),e=i(require("@babel/runtime/helpers/createClass"));function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(exports,"__esModule",{value:!0});var r=function(){function i(e){(0,t.default)(this,i),this.isActive=!1,this.controller=e,this.items=[]}return(0,e.default)(i,[{key:"initialize",value:function(){return this.loadItemsFromConfig(),this.filterItems(),this.filterActiveItems(),this}},{key:"loadItemsFromConfig",value:function(){var t=this.controller.config;if(!1===Array.isArray(t.items)&&NodeList.prototype.isPrototypeOf(t.items))return this.items=Array.from(t.items),this;if(!0===Array.isArray(t.items))return this.items=t.items,this;throw new Error("MonoController: Items not defined.")}},{key:"setItems",value:function(t){if("string"==typeof t){var e=document.querySelectorAll(t);return null!==e&&(this.items=Array.from(e)),this}return NodeList.prototype.isPrototypeOf(t)?(this.items=Array.from(t),this):(!0===Array.isArray(t)&&(this.items=t),this)}},{key:"filterItems",value:function(){var t=this;return this.items=this.items.filter(function(e){return t.itemIsValid(e)}),this}},{key:"filterActiveItems",value:function(){var t=this,e=this.controller.config;return this.items.length>0&&(this.items.forEach(function(i){if(!0===e.itemIsActive(i,t.controller)){var r=e.getItemId(i);!0===t.isActive?e.deactivateItem(i,t.controller):!1!==r&&(t.activeItem=i,t.activeItemId=r,t.isActive=!0)}}),this.controller.isReady=!0),this}},{key:"itemIsValid",value:function(t){var e=!0;return!1===this.controller.config.getItemId(t)&&(e=!1),e}},{key:"getItemFromId",value:function(t){var e=this.controller.config,i=[];return this.items.forEach(function(r){e.getItemId(r)===t&&i.push(r)}),i.length>0&&i[0]}},{key:"activate",value:function(t){var e=this.controller.config;!0===this.itemIsValid(t)&&(e.activateItem(t,this.controller),this.activeItem=t,this.activeItemId=e.getItemId(t),this.isActive=!0)}},{key:"deactivate",value:function(){var t=this.controller.config;void 0!==this.activeItem&&(t.deactivateItem(this.activeItem,this.controller),this.activeItem=void 0,this.activeItemId=void 0,this.isActive=!1)}}]),i}();exports.ItemManager=r;
},{"@babel/runtime/helpers/classCallCheck":"0fcM","@babel/runtime/helpers/createClass":"P8NW"}],"Qw3/":[function(require,module,exports) {
var define;
var e;parcelRequire=function(t,n,i,r){var o,a="function"==typeof parcelRequire&&parcelRequire,s="function"==typeof require&&require;function u(e,i){if(!n[e]){if(!t[e]){var r="function"==typeof parcelRequire&&parcelRequire;if(!i&&r)return r(e,!0);if(a)return a(e,!0);if(s&&"string"==typeof e)return s(e);var o=new Error("Cannot find module '"+e+"'");throw o.code="MODULE_NOT_FOUND",o}c.resolve=function(n){return t[e][1][n]||n},c.cache={};var l=n[e]=new u.Module(e);t[e][0].call(l.exports,c,l,l.exports,this)}return n[e].exports;function c(e){return u(c.resolve(e))}}u.isParcelRequire=!0,u.Module=function(e){this.id=e,this.bundle=u,this.exports={}},u.modules=t,u.cache=n,u.parent=a,u.register=function(e,n){t[e]=[function(e,t){t.exports=n},{}]};for(var l=0;l<i.length;l++)try{u(i[l])}catch(t){o||(o=t)}if(i.length){var c=u(i[i.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=c:"function"==typeof e&&e.amd&&e(function(){return c})}if(parcelRequire=u,o)throw o;return u}({"5gKv":[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},{}],"0fcM":[function(e,t,n){t.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},{}],P8NW:[function(e,t,n){function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}t.exports=function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}},{}],kmUo:[function(e,t,n){"use strict";var i=o(e("@babel/runtime/helpers/classCallCheck")),r=o(e("@babel/runtime/helpers/createClass"));function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function e(){(0,i.default)(this,e)}return(0,r.default)(e,null,[{key:"average",value:function(e){if(e.length<2)throw new Error("@nekobird/rocket: Num.average: Expects at least 2 numbers.");return this.sum(e)/e.length}},{key:"constrain",value:function(e,t){"number"==typeof t&&(t=[0,t]);var n=Math.min(t[0],t[1]),i=Math.max(t[0],t[1]);return e<=n?n:e>=i?i:e}},{key:"cycle",value:function(e,t){"number"==typeof t&&(t=[0,t]);var n=Math.min(t[0],t[1]),i=Math.max(t[0],t[1]);if(0===n&&0===i)return 0;var r,o=this.getEuclideanDistance(n,i);return e>i?(r=this.getEuclideanDistance(e,i)%o+n)===n?i:r:e<n?(r=i-this.getEuclideanDistance(e,n)%o)===i?n:r:e}},{key:"getEuclideanDistance",value:function(e,t){return e===t?0:Math.sqrt(Math.abs((e-t)*(t-e)))}},{key:"hypotenuse",value:function(e,t){var n=Math.max(Math.abs(e),Math.abs(t));0===n&&(n=1);var i=Math.min(Math.abs(e),Math.abs(t))/n;return n*Math.sqrt(1+i*i)}},{key:"reciprocal",value:function(e){return 0!=e?1/e:void 0}},{key:"round",value:function(e,t){return t=void 0===t?0:t,parseFloat(e.toFixed(t))}},{key:"lerp",value:function(e,t,n){return(1-e)*t+e*n}},{key:"cubicBezier",value:function(e,t,n,i,r){return Math.pow(1-e,3)*t+3*e*Math.pow(1-e,2)*n+3*e*e*(1-e)*i+e*e*e*r}},{key:"modulate",value:function(t,n,i){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];"number"==typeof n&&(n=[0,n]),"number"==typeof i&&(i=[0,i]);var o,a=(t-n[0])/(n[1]-n[0]);return o=i[1]>i[0]?a*(i[1]-i[0])+i[0]:i[0]-a*(i[0]-i[1]),!0===r?e.constrain(o,i):o}},{key:"random",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2;if("number"==typeof e&&(e=[0,e]),0===e[0]&&1===e[1])return!0===t?Math.floor(2*Math.random()):parseFloat(Math.random().toFixed(n));var i=this.modulate(Math.random(),1,e,!1);return parseInt(i.toFixed(0),10)}},{key:"sum",value:function(e){return e.reduce(function(e,t){return e+t})}},{key:"within",value:function(e,t){return"number"==typeof t&&(t=[0,t]),e>=t[0]&&e<=t[1]}},{key:"getSign",value:function(e){var t=Math.sign(e);return 0===t?1:t}}]),e}();n.Num=a},{"@babel/runtime/helpers/classCallCheck":"0fcM","@babel/runtime/helpers/createClass":"P8NW"}],b9XL:[function(e,t,n){function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(e){return"function"==typeof Symbol&&"symbol"===i(Symbol.iterator)?t.exports=r=function(e){return i(e)}:t.exports=r=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":i(e)},r(e)}t.exports=r},{}],"35Ey":[function(e,t,n){"use strict";var i=a(e("@babel/runtime/helpers/typeof")),r=a(e("@babel/runtime/helpers/classCallCheck")),o=a(e("@babel/runtime/helpers/createClass"));function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var s=e("../rocket"),u=function(){function e(){(0,r.default)(this,e)}return(0,o.default)(e,null,[{key:"isPromise",value:function(e){return"object"===(0,i.default)(e)&&"function"==typeof e.then&&e instanceof Promise&&Promise.resolve(e)===e}},{key:"promiseEach",value:function(e,t){return 0===e.length?Promise.resolve():e.reduce(function(e,n){return e.then(function(){return t(n)})},Promise.resolve())}},{key:"cycleArrayNext",value:function(e){var t=-1;return function(){return++t>e.length-1&&(t=0),e[t]}}},{key:"cycleArray",value:function(e,t){return e[t%e.length]}},{key:"randomChoice",value:function(e){return e[s.Num.random(e.length-1,!0)]}},{key:"debounce",value:function(e,t){var n;return function(){var i=this,r=arguments;clearTimeout(n),n=setTimeout(function(){return t.apply(i,r)},1e3*e)}}},{key:"throttle",value:function(e,t){var n,i;return e*=1e3,function(){var r=this,o=arguments,a=Date.now();"number"==typeof i&&a<i+e?(clearTimeout(n),n=setTimeout(function(){i=a,t.apply(r,o)},e)):(i=a,t.apply(this,arguments))}}}]),e}();n.Util=u},{"@babel/runtime/helpers/typeof":"b9XL","@babel/runtime/helpers/classCallCheck":"0fcM","@babel/runtime/helpers/createClass":"P8NW","../rocket":"ydY1"}],YoLM:[function(e,t,n){"use strict";var i=o(e("@babel/runtime/helpers/classCallCheck")),r=o(e("@babel/runtime/helpers/createClass"));function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function e(){(0,i.default)(this,e)}return(0,r.default)(e,null,[{key:"upperCaseFirstLetter",value:function(e){return e.charAt(0).toUpperCase()+e.slice(1)}},{key:"lowerCaseFirstLetter",value:function(e){return e.charAt(0).toLowerCase()+e.slice(1)}},{key:"removeExtraWhitespaces",value:function(e){return e.replace(/[\s]+/g," ")}},{key:"removeTabs",value:function(e){return e.replace(/[\t]+/g,"")}},{key:"removeNewLines",value:function(e){return e.replace(/[\r\n]+/g,"")}},{key:"match",value:function(e,t){var n=e.match(t);return null!==n&&(1===n.length?n[0]:n)}}]),e}();n.StringUtil=a},{"@babel/runtime/helpers/classCallCheck":"0fcM","@babel/runtime/helpers/createClass":"P8NW"}],XfJI:[function(e,t,n){t.exports=function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}},{}],OMTj:[function(e,t,n){t.exports=function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}},{}],"wF/n":[function(e,t,n){t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}},{}],Fhqp:[function(e,t,n){var i=e("./arrayWithoutHoles"),r=e("./iterableToArray"),o=e("./nonIterableSpread");t.exports=function(e){return i(e)||r(e)||o()}},{"./arrayWithoutHoles":"XfJI","./iterableToArray":"OMTj","./nonIterableSpread":"wF/n"}],"Ru3/":[function(e,t,n){"use strict";var i=s(e("@babel/runtime/helpers/toConsumableArray")),r=s(e("@babel/runtime/helpers/typeof")),o=s(e("@babel/runtime/helpers/classCallCheck")),a=s(e("@babel/runtime/helpers/createClass"));function s(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var u=function(){function e(){(0,o.default)(this,e)}return(0,a.default)(e,null,[{key:"isHTMLElement",value:function(){if(0===arguments.length)return!1;for(var e=function(e){return null!==e&&"object"===(0,r.default)(e)&&"number"==typeof e.nodeType&&1===e.nodeType&&e instanceof HTMLElement==1},t=0;t<arguments.length;t++)if(!1===e(t<0||arguments.length<=t?void 0:arguments[t]))return!1;return!0}},{key:"isNodeListOfHTMLElement",value:function(){if(0===arguments.length)return!1;for(var t=function(t){return"object"===(0,r.default)(t)&&!0===NodeList.prototype.isPrototypeOf(t)&&!0===(0,i.default)(t).every(function(t){return e.isHTMLElement(t)})},n=0;n<arguments.length;n++)if(!1===t(n<0||arguments.length<=n?void 0:arguments[n]))return!1;return!0}},{key:"prependChild",value:function(e,t){e.childElementCount>0?e.insertBefore(t,e.childNodes[0]):e.appendChild(t)}}]),e}();n.DOMUtil=u},{"@babel/runtime/helpers/toConsumableArray":"Fhqp","@babel/runtime/helpers/typeof":"b9XL","@babel/runtime/helpers/classCallCheck":"0fcM","@babel/runtime/helpers/createClass":"P8NW"}],PjR2:[function(e,t,n){"use strict";var i=s(e("@babel/runtime/helpers/typeof")),r=s(e("@babel/runtime/helpers/toConsumableArray")),o=s(e("@babel/runtime/helpers/classCallCheck")),a=s(e("@babel/runtime/helpers/createClass"));function s(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var u=e("../rocket"),l=function(){function e(){(0,o.default)(this,e)}return(0,a.default)(e,null,[{key:"ascendFrom",value:function(e,t){for(var n=e;null!==n&&n!==document.documentElement;)if(null!==(n=n)){if(!0===t(n))break;n=n.parentElement}}},{key:"descendFrom",value:function(e,t){!function e(n){var i=n.children;if(i.length>0)for(var r=0;r<i.length&&!0!==t(i[r]);r++)i[r].children.length>0&&e(i[r])}(e)}},{key:"findAncestor",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=[];if(!1===u.DOMUtil.isHTMLElement(e))return!1;!0===t(e)&&i.push(e);for(var r=e;null!==r&&r!==document.documentElement;)if(null!==(r=r)){if(!0===t(r)&&(i.push(r),!1===n))break;r=r.parentElement}return i.length>0&&(!0===n?i:i[0])}},{key:"findDescendant",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=[];return!0===t(e)&&i.push(e),function e(r){var o=r.children;if(o.length>0)for(var a=0;a<o.length&&(!0!==t(o[a])||(i.push(o[a]),!1!==n));a++)o[a].children.length>0&&e(o[a])}(e),i.length>0&&(!0===n?i:i[0])}},{key:"findAncestorWithClass",value:function(e,t){var n,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return"string"==typeof t?n=function(e){return e.classList.contains(t)}:!0===Array.isArray(t)&&(n=function(e){for(var n=0;n<t.length;n++)if(!0===e.classList.contains(t[n]))return!0;return!1}),this.findAncestor(e,n,i)}},{key:"findDescendantWithClass",value:function(e,t){var n,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return"string"==typeof t?n=function(e){return e.classList.contains(t)}:!0===Array.isArray(t)&&(n=function(e){for(var n=0;n<t.length;n++)if(!0===e.classList.contains(t[n]))return!0;return!1}),this.findDescendant(e,n,i)}},{key:"findAncestorWithId",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return this.findAncestor(e,function(e){return e.id===t},n)}},{key:"findDescendantWithid",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return this.findDescendant(e,function(e){return e.id===t},n)}},{key:"hasAncestor",value:function(e,t){return this.findAncestor(e,function(e){var n;return!0===Array.isArray(t)&&!0===(n=u.DOMUtil).isHTMLElement.apply(n,(0,r.default)(t))?-1!==(t=t).indexOf(e):!0===u.DOMUtil.isNodeListOfHTMLElement(t)?(t=t,-1!==(0,r.default)(t).indexOf(e)):e===t},!1)}},{key:"hasDescendant",value:function(e,t){return this.findDescendant(e,function(e){var n;return!0===Array.isArray(t)&&!0===(n=u.DOMUtil).isHTMLElement.apply(n,(0,r.default)(t))?-1!==(t=t).indexOf(e):!0===u.DOMUtil.isNodeListOfHTMLElement(t)?(t=t,-1!==(0,r.default)(t).indexOf(e)):e===t},!1)}},{key:"getSiblings",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(null!==e.parentElement){var n=(0,r.default)(e.parentElement.children);return!0===t&&n.splice(n.indexOf(e),1),n.length>0&&n}return!1}},{key:"findSibling",value:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=this.getSiblings(e);if(!1===i)return!1;if(i.length>0){for(var r=[],o=0;o<i.length;o++)!0===t(i[o])&&r.push(i[o]);if(r.length>0)return!0===n?r:r[0]}return!1}},{key:"findSiblingWithClass",value:function(e,t){var n,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return"string"==typeof t?n=function(e){return e.classList.contains(t)}:!0===Array.isArray(t)&&(n=function(e){for(var n=0;n<t.length;n++)if(!0===e.classList.contains(t[n]))return!0;return!1}),this.findSibling(e,n,i)}},{key:"removeChildren",value:function(e){for(var t=0;null!==e.firstChild;)e.removeChild(e.firstChild),t++;return t}},{key:"findNextSibling",value:function(e,t){for(var n=e;null!==n;){if(null!==e&&!0===t(e))return e;n=e.nextElementSibling}return!1}},{key:"removeChild",value:function(e,t){var n=0;return function e(i){var r=i.children;if(r.length>0)for(var o=0;o<r.length;o++)!0===t(r[o])?(i.removeChild(r[o]),n++):r[o].children.length>0&&e(r[o])}(e),n}},{key:"getChildren",value:function(e,t){var n=(0,r.default)(e.children);return void 0===t?n:n.filter(function(e){return t(e)})}},{key:"getNthChild",value:function(e,t,n){void 0===n&&(n=function(e){return!0});var o,a=(0,r.default)(t.children).filter(n);return o="last"===e?a[a.length-1]:a[e],"object"===(0,i.default)(o)&&o}},{key:"mapDataFromChildren",value:function(e,t,n){void 0===n&&(n=function(e){return!0});var i=(0,r.default)(e.children).filter(n);if(0===i.length)return[];if(1===i.length){var o=t(i[0]);return void 0!==o?[o]:[]}var a=[];return i.forEach(function(e){var n=t(e);void 0!==n&&a.push(n)}),a}}]),e}();n.DOMTraverse=l},{"@babel/runtime/helpers/typeof":"b9XL","@babel/runtime/helpers/toConsumableArray":"Fhqp","@babel/runtime/helpers/classCallCheck":"0fcM","@babel/runtime/helpers/createClass":"P8NW","../rocket":"ydY1"}],bb02:[function(e,t,n){"use strict";var i=o(e("@babel/runtime/helpers/classCallCheck")),r=o(e("@babel/runtime/helpers/createClass"));function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var a=e("../rocket"),s=function(){function e(){(0,i.default)(this,e)}return(0,r.default)(e,null,[{key:"getLineHeight",value:function(e){var t,n=document.createElement("div");return n.style.padding="0",n.style.visibility="none",n.textContent="abcd",this.copyStylesFrom(e,["fontSize","fontFamily","lineHeight"],n),null!==e.parentNode?(e.parentNode.appendChild(n),t=n.clientHeight,e.parentNode.removeChild(n)):(document.appendChild(n),t=n.clientHeight,document.removeChild(n)),n.remove(),t}},{key:"applyStyle",value:function(e,t){Object.keys(t).forEach(function(n){var i=t[n];"number"==typeof i&&(i=i.toString()),"string"==typeof i&&(e.style[n]=i)})}},{key:"copyStylesFrom",value:function(e,t){for(var n=arguments.length,i=new Array(n>2?n-2:0),r=2;r<n;r++)i[r-2]=arguments[r];"string"==typeof t&&(t=[t]);var o=window.getComputedStyle(e);t.forEach(function(e){i.forEach(function(t){t.style[e]=o[e]})})}},{key:"clearStyles",value:function(e){e.removeAttribute("style")}},{key:"removeStyles",value:function(e,t){"string"==typeof t&&(t=[t]),t.forEach(function(t){e.style.removeProperty(t)})}},{key:"getStyleValue",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=window.getComputedStyle(e)[t];return!0===n?parseFloat(i):i}},{key:"getStyleValues",value:function(e,t){"string"==typeof t&&(t=[t]);var n=window.getComputedStyle(e),i={};return t.forEach(function(e){i[e]=n[e]}),i}},{key:"getFontSize",value:function(e){return this.getStyleValue(e,"fontSize",!0)}},{key:"setFontSize",value:function(e,t){e.style.fontSize="".concat(t,"px")}},{key:"getBaseFontSize",value:function(){var e=window.getComputedStyle(document.documentElement).fontSize;return"string"==typeof e&&""!==e?parseFloat(e):16}},{key:"RemToPx",value:function(e){return e*this.getBaseFontSize()}},{key:"getAnimationDelay",value:function(e){var t=getComputedStyle(e).animationDelay;return null===t||""===t?0:1e3*parseFloat(t)}},{key:"getAnimationDuration",value:function(e){var t=getComputedStyle(e).animationDuration;return null===t||""===t?0:1e3*parseFloat(t)}},{key:"getParentsMaxAnimationDuration",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=[];return a.DOMTraverse.ascendFrom(e,function(e){var r=t.getAnimationDuration(e);!0===n&&(r+=t.getAnimationDelay(e)),i.push(r)}),Math.max.apply(Math,i)}},{key:"getChildrenMaxAnimationDuration",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=[];return a.DOMTraverse.descendFrom(e,function(e){var r=t.getAnimationDuration(e);!0===n&&(r+=t.getAnimationDelay(e)),i.push(r)}),Math.max.apply(Math,i)}},{key:"getTransitionDuration",value:function(e){var t=getComputedStyle(e).transitionDuration;return null===t||""===t?0:1e3*parseFloat(t)}}]),e}();n.DOMStyle=s},{"@babel/runtime/helpers/classCallCheck":"0fcM","@babel/runtime/helpers/createClass":"P8NW","../rocket":"ydY1"}],H3Nn:[function(e,t,n){"use strict";var i=o(e("@babel/runtime/helpers/classCallCheck")),r=o(e("@babel/runtime/helpers/createClass"));function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var a=e("../rocket"),s=function(){function e(){(0,i.default)(this,e)}return(0,r.default)(e,null,[{key:"getTotalHorizontalBorderWidths",value:function(e){var t=window.getComputedStyle(e),n=t.borderLeftWidth,i=t.borderRightWidth;return(null===n||""===n?0:parseFloat(n))+(null===i||""===i?0:parseFloat(i))}},{key:"getTotalVerticalBorderWidths",value:function(e){var t=window.getComputedStyle(e),n=t.borderTopWidth,i=t.borderBottomWidth;return(null===n||""===n?0:parseFloat(n))+(null===i||""===i?0:parseFloat(i))}},{key:"getTotalHorizontalPaddings",value:function(e){var t=window.getComputedStyle(e),n=t.paddingLeft,i=t.paddingRight;return(null===n||""===n?0:parseFloat(n))+(null===i||""===i?0:parseFloat(i))}},{key:"getTotalVerticalPaddings",value:function(e){var t=window.getComputedStyle(e),n=t.paddingTop,i=t.paddingBottom;return(null===n||""===n?0:parseFloat(n))+(null===i||""===i?0:parseFloat(i))}},{key:"getTotalHorizontalMargins",value:function(e){var t=window.getComputedStyle(e),n=t.marginLeft,i=t.marginRight;return(null===n||""===n?0:parseFloat(n))+(null===i||""===i?0:parseFloat(i))}},{key:"getTotalVerticalMargins",value:function(e){var t=window.getComputedStyle(e),n=t.marginTop,i=t.marginBottom;return(null===n||""===n?0:parseFloat(n))+(null===i||""===i?0:parseFloat(i))}},{key:"getTotalHorizontalInnerSpace",value:function(e){return"border-box"===a.DOMStyle.getStyleValue(e,"box-sizing")?this.getTotalHorizontalPaddings(e)+this.getTotalHorizontalBorderWidths(e):this.getTotalHorizontalPaddings(e)}},{key:"getTotalVerticalInnerSpace",value:function(e){return"border-box"===a.DOMStyle.getStyleValue(e,"box-sizing")?this.getTotalVerticalPaddings(e)+this.getTotalVerticalBorderWidths(e):this.getTotalVerticalPaddings(e)}},{key:"getTotalHorizontalOuterSpace",value:function(e){return"border-box"!==a.DOMStyle.getStyleValue(e,"box-sizing")?this.getTotalHorizontalMargins(e)+this.getTotalHorizontalBorderWidths(e):this.getTotalHorizontalMargins(e)}},{key:"getTotalVerticalOuterSpace",value:function(e){return"border-box"!==a.DOMStyle.getStyleValue(e,"box-sizing")?this.getTotalVerticalMargins(e)+this.getTotalVerticalBorderWidths(e):this.getTotalVerticalMargins(e)}},{key:"getTotalHorizontalDimension",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.offsetWidth;return!0===t&&(n=e.getBoundingClientRect().width),n+this.getTotalHorizontalOuterSpace(e)}},{key:"getTotalVerticalDimension",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.offsetHeight;return!0===t&&(n=e.getBoundingClientRect().height),n+this.getTotalVerticalOuterSpace(e)}}]),e}();n.DOMBoxModel=s},{"@babel/runtime/helpers/classCallCheck":"0fcM","@babel/runtime/helpers/createClass":"P8NW","../rocket":"ydY1"}],uFsl:[function(e,t,n){"use strict";var i=o(e("@babel/runtime/helpers/classCallCheck")),r=o(e("@babel/runtime/helpers/createClass"));function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var a=e("../rocket"),s=function(){function e(){(0,i.default)(this,e)}return(0,r.default)(e,null,[{key:"getTextFromElement",value:function(e){return e instanceof HTMLTextAreaElement||e instanceof HTMLInputElement||"INPUT"===e.nodeName||"TEXTAREA"===e.nodeName?e.value:null!==e.textContent?e.textContent:""}},{key:"getElementTextBoxWidth",value:function(e){return e.offsetWidth-a.DOMBoxModel.getTotalHorizontalInnerSpace(e)}},{key:"getElementTextBoxHeight",value:function(e){return e.offsetHeight-a.DOMBoxModel.getTotalVerticalInnerSpace(e)}},{key:"getLastLine",value:function(e){var t=e.textContent;if(null!==t){var n=t.split(" "),i=[],r=n.length-1,o=document.createElement("div");o.style.padding="0",o.style.visibility="none",a.DOMStyle.copyStylesFrom(e,["fontSize","fontFamily","lineHeight"],o);var s=e.clientWidth-a.DOMBoxModel.getTotalHorizontalInnerSpace(e);o.style.maxWidth="".concat(s,"px"),o.textContent=t,null!==e.parentNode?e.parentNode.appendChild(o):document.appendChild(o);for(var u=o.clientHeight,l=t;void 0!==n[r];){var c=n[r].length+1;if(l=l.substring(0,l.length-c),o.textContent=l,i.unshift(n[r]),o.clientHeight<u)break;r--}return null!==e.parentNode?e.parentNode.removeChild(o):document.removeChild(o),i.join(" ")}return""}}]),e}();n.DOMText=s},{"@babel/runtime/helpers/classCallCheck":"0fcM","@babel/runtime/helpers/createClass":"P8NW","../rocket":"ydY1"}],yu5I:[function(e,t,n){"use strict";var i=o(e("@babel/runtime/helpers/classCallCheck")),r=o(e("@babel/runtime/helpers/createClass"));function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function e(){(0,i.default)(this,e)}return(0,r.default)(e,null,[{key:"load",value:function(e){return new Promise(function(t,n){var i=new Image;i.addEventListener("load",function(){t({image:i,source:e})}),i.addEventListener("error",function(){n(new Error("DOMImage.load: There is an error loading image."))}),i.src=e})}},{key:"getSize",value:function(e){return new Promise(function(t,n){var i=new Image;i.addEventListener("error",function(){n(new Error("DOMImage.getSize: There is an error loading image."))}),i.src=e;var r=setInterval(function(){"number"==typeof i.naturalWidth&&"number"==typeof i.naturalHeight&&(clearInterval(r),t({width:i.naturalWidth,height:i.naturalHeight}))},10)})}}]),e}();n.DOMImage=a},{"@babel/runtime/helpers/classCallCheck":"0fcM","@babel/runtime/helpers/createClass":"P8NW"}],DbMY:[function(e,t,n){"use strict";var i=a(e("@babel/runtime/helpers/toConsumableArray")),r=a(e("@babel/runtime/helpers/classCallCheck")),o=a(e("@babel/runtime/helpers/createClass"));function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var s=e("../rocket"),u=function(){function e(){(0,r.default)(this,e)}return(0,o.default)(e,null,[{key:"getElementOffsetFromPoint",value:function(e,t){var n=t.x,i=t.y,r=e.getBoundingClientRect(),o=r.left,a=r.top;return new s.Point(s.Num.getEuclideanDistance(o,n),s.Num.getEuclideanDistance(a,i))}},{key:"getElementCornerPoints",value:function(e){var t=e.getBoundingClientRect(),n=t.top,i=t.bottom,r=t.left,o=t.right;return[new s.Point(r,n),new s.Point(r,i),new s.Point(o,n),new s.Point(o,i)]}},{key:"getElementCenterPoint",value:function(e){var t=e.getBoundingClientRect(),n=t.left,i=t.top,r=t.width,o=t.height;return new s.Point(n+r/2,i+o/2)}},{key:"getElementDiagonalPoints",value:function(e){var t=e.getBoundingClientRect(),n=t.top,i=t.bottom,r=t.left,o=t.right;return[new s.Point(r,n),new s.Point(o,i)]}},{key:"getElementTopPoints",value:function(e){var t=e.getBoundingClientRect(),n=t.left,i=t.right,r=t.top;return[new s.Point(n,r),new s.Point(i,r)]}},{key:"getElementBottomPoints",value:function(e){var t=e.getBoundingClientRect(),n=t.left,i=t.right,r=t.bottom;return[new s.Point(n,r),new s.Point(i,r)]}},{key:"getElementLeftPoints",value:function(e){var t=e.getBoundingClientRect(),n=t.left,i=t.top,r=t.bottom;return[new s.Point(n,i),new s.Point(n,r)]}},{key:"getElementRightPoints",value:function(e){var t=e.getBoundingClientRect(),n=t.right,i=t.top,r=t.bottom;return[new s.Point(n,i),new s.Point(n,r)]}},{key:"elementIsAbovePoints",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=e.getBoundingClientRect().bottom;if(!0===Array.isArray(t)){var r=!0;return t.forEach(function(e){var t=e.y;i+n<t==0&&(r=!1)}),r}return i+n<t.y}},{key:"elementIsBelowPoints",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=e.getBoundingClientRect().top;if(!0===Array.isArray(t)){var r=!0;return t.forEach(function(e){var t=e.y;i+n>t==0&&(r=!1)}),r}return i+n>t.y}},{key:"elementCenterIsAbovePoints",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=this.getElementCenterPoint(e);if(!0===Array.isArray(t)){var r=!0;return t.forEach(function(e){var t=e.y;i.y+n>t==0&&(r=!1)}),r}return i.y+n>t.y}},{key:"elementCenterIsBelowPoints",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=this.getElementCenterPoint(e);if(!0===Array.isArray(t)){var r=!0;return t.forEach(function(e){var t=e.y;i.y+n<t==0&&(r=!1)}),r}return i.y+n<t.y}},{key:"getClosestDistanceFromElementCornersToPoint",value:function(e,t){var n=this.getElementCornerPoints(e).map(function(e){return s.Point.getDistanceTo(e,t)});return Math.min.apply(Math,(0,i.default)(n))}},{key:"getDistanceFromElementCenterToPoint",value:function(e,t){return s.Point.getDistanceTo(this.getElementCenterPoint(e),t)}},{key:"pointIsInElement",value:function(e,t){var n=e.x,i=e.y;return-1!==document.elementsFromPoint(n,i).indexOf(t)}},{key:"findElementFromPoint",value:function(e,t){var n,i=e.x,r=e.y,o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=document.elementsFromPoint(i,r);if(0===a.length)return!1;n=void 0===t?function(){return!0}:t;var s=[];return a.forEach(function(e){!0===n(e)&&s.push(e)}),0!==s.length&&(1===s.length?s[0]:!0===o?s:s[0])}},{key:"getClosestChildFromPoints",value:function(e,t,n){var r=this;void 0===n&&(n=function(e){return!0});var o=(0,i.default)(e.children).filter(n);if(0===o.length)return!1;var a=o.map(function(e){if(!0===Array.isArray(t)){var n=t.map(function(t){return r.getClosestDistanceFromElementCornersToPoint(e,t)});return Math.min.apply(Math,(0,i.default)(n))}return r.getClosestDistanceFromElementCornersToPoint(e,t)});return o[a.indexOf(Math.min.apply(Math,(0,i.default)(a)))]}}]),e}();n.DOMPoint=u},{"@babel/runtime/helpers/toConsumableArray":"Fhqp","@babel/runtime/helpers/classCallCheck":"0fcM","@babel/runtime/helpers/createClass":"P8NW","../rocket":"ydY1"}],Fss1:[function(e,t,n){"use strict";var i=a(e("@babel/runtime/helpers/classCallCheck")),r=a(e("@babel/runtime/helpers/createClass")),o=a(e("@babel/runtime/helpers/toConsumableArray"));function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var s=e("../rocket");n.DOMViewCornerNames=["top-left","top-right","bottom-left","bottom-right"],n.DOMViewEdgeNames=["top","bottom","left","right"],n.DOMViewEdgeAndCornerNames=[].concat((0,o.default)(n.DOMViewCornerNames),(0,o.default)(n.DOMViewEdgeNames));var u=function(){function e(){(0,i.default)(this,e)}return(0,r.default)(e,null,[{key:"elementIsInView",value:function(e){var t=e.getBoundingClientRect(),n=t.top,i=t.bottom,r=t.left,o=t.right;return!(r<0||n<0||o>s.Viewport.width||i>s.Viewport.height)}},{key:"elementIsClipping",value:function(e,t){void 0===t&&(t=(0,o.default)(n.DOMViewEdgeAndCornerNames)),!1===Array.isArray(t)&&(t=[t]),t=t;var i=this.elementIsClippingCornerOrEdge(e);return!1!==i&&-1!==t.indexOf(i)&&i}},{key:"elementIsClippingEdge",value:function(e){var t=e.getBoundingClientRect(),n=t.top,i=t.bottom,r=t.left,o=t.right;return r<0?"left":n<0?"top":o>s.Viewport.width?"right":i>s.Viewport.height&&"bottom"}},{key:"elementIsClippingCorner",value:function(e){var t=e.getBoundingClientRect(),n=t.top,i=t.bottom,r=t.left,o=t.right;if(n<0){if(r<0)return"top-left";if(o>s.Viewport.width)return"top-right"}else if(i>s.Viewport.height){if(r<0)return"bottom-left";if(o>s.Viewport.width)return"bottom-right"}return!1}},{key:"elementIsClippingCornerOrEdge",value:function(e){var t=e.getBoundingClientRect(),n=t.top,i=t.bottom,r=t.left,o=t.right;return n<0?r<0?"top-left":o>s.Viewport.width?"top-right":"top":i>s.Viewport.height?r<0?"bottom-left":o>s.Viewport.width?"bottom-right":"bottom":r<0?"left":o>s.Viewport.width&&"right"}}]),e}();n.DOMView=u},{"@babel/runtime/helpers/classCallCheck":"0fcM","@babel/runtime/helpers/createClass":"P8NW","@babel/runtime/helpers/toConsumableArray":"Fhqp","../rocket":"ydY1"}],pkyr:[function(e,t,n){"use strict";var i=o(e("@babel/runtime/helpers/classCallCheck")),r=o(e("@babel/runtime/helpers/createClass"));function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var a=e("../rocket"),s=["top-left","top-right","bottom-left","bottom-right"],u=(["center"].concat(s,["top","bottom","left","right"]),["top-left","top","top-right","right","bottom-right","bottom","bottom-left"]),l=function(){function e(){(0,i.default)(this,e)}return(0,r.default)(e,null,[{key:"getTargetAlignment",value:function(e,t,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"viewport",o=e.getBoundingClientRect(),a=this.getElementOffset(e,t),s=this.getElementOffset(n,i),u=o.left+s.left-a.left,l=o.top+s.top-a.top;return this.transformOffsetRelativeTo({left:u,top:l},r)}},{key:"getTargetAlignmentToPoint",value:function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"viewport",r=e.getBoundingClientRect(),o=this.getElementOffset(e,t),a=r.left+n.x-o.left,s=r.top+n.y-o.top;return this.transformOffsetRelativeTo({left:a,top:s},i)}},{key:"getTargetAlignmentToView",value:function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"viewport",r=e.getBoundingClientRect(),o=this.getElementOffset(e,t),a=this.getViewOffset(n),s=r.left+a.left-o.left,u=r.top+a.top-o.top;return this.transformOffsetRelativeTo({left:s,top:u},i)}},{key:"getComplementaryReferencePoint",value:function(e){if("center"===e)return"center";switch(e){case"top-left":return"bottom-right";case"top":return"bottom";case"top-right":return"bottom-left";case"left":return"right";case"right":return"left";case"bottom-left":return"top-right";case"bottom":return"top";case"bottom-right":return"top-left"}}},{key:"getReferencePointFromRotation",value:function(e,t){if("center"===e)return"center";var n=u.indexOf(e);return a.Util.cycleArray(u,n+t)}},{key:"getElementOffset",value:function(e,t){var n,i,r=e.getBoundingClientRect();n=i=0;var o=r.left+a.Num.getEuclideanDistance(r.left,r.right)/2,s=r.top+a.Num.getEuclideanDistance(r.top,r.bottom)/2;switch(t){case"center":n=o,i=s;break;case"top-left":n=r.left,i=r.top;break;case"top":n=o,i=r.top;break;case"top-right":n=r.right,i=r.top;break;case"left":n=r.left,i=s;break;case"right":n=r.right,i=s;break;case"bottom-left":n=r.left,i=r.bottom;break;case"bottom":n=o,i=r.bottom;break;case"bottom-right":n=r.right,i=r.bottom}return{left:n,top:i}}},{key:"getViewOffset",value:function(e){var t=0,n=0,i=a.Viewport.width/2,r=a.Viewport.height/2;switch(e){case"center":t=i,n=r;break;case"top-left":break;case"top":t=i;break;case"top-right":t=a.Viewport.width;break;case"left":n=r;break;case"right":t=a.Viewport.width,n=r;break;case"bottom-left":n=a.Viewport.height;break;case"bottom":t=i,n=a.Viewport.height;break;case"bottom-right":t=a.Viewport.width,n=a.Viewport.height}return{left:t,top:n}}},{key:"getOffsetFromTargeReferencePointToOrigin",value:function(e,t){var n=e.getBoundingClientRect(),i=n.left,r=n.top,o=this.getElementOffset(e,t);return{left:i-o.left,top:r-o.top}}},{key:"transformOffsetRelativeTo",value:function(e,t){var n=e.left,i=e.top;if("document"===t)n+=a.DOMScroll.scrollLeft,i+=a.DOMScroll.scrollTop;else if("viewport"===t)n=n,i=i;else if(!0===a.DOMUtil.isHTMLElement(t)){var r=t.getBoundingClientRect();n-=r.left,i-=r.top}return{left:n,top:i}}},{key:"applySpacingToOffset",value:function(e,t,n){var i=e.left,r=e.top;if("center"===t)return{left:i,top:r};if(-1!==s.indexOf(t)){var o=this.calculateCornerSpacing(n);switch(t){case"top-left":i-=o,r-=o;break;case"top-right":i+=o,r-=o;break;case"bottom-left":i-=o,r+=o;break;case"bottom-right":i+=o,r+=o}return{left:i,top:r}}switch(t){case"top":r-=n;break;case"bottom":r+=n;break;case"left":i-=n;break;case"right":i+=n}return{left:i,top:r}}},{key:"calculateCornerSpacing",value:function(e){return Math.cos(Math.PI/4)*e}}]),e}();n.DOMAlignOffset=l},{"@babel/runtime/helpers/classCallCheck":"0fcM","@babel/runtime/helpers/createClass":"P8NW","../rocket":"ydY1"}],"36IU":[function(e,t,n){"use strict";var i=o(e("@babel/runtime/helpers/classCallCheck")),r=o(e("@babel/runtime/helpers/createClass"));function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var a=e("../rocket"),s=function(){function e(){(0,i.default)(this,e)}return(0,r.default)(e,null,[{key:"getElementOffsetFrom",value:function(e,t){var n=e.getBoundingClientRect(),i=t.getBoundingClientRect();return{top:a.Num.getEuclideanDistance(n.top,i.top),bottom:a.Num.getEuclideanDistance(n.bottom,i.bottom),left:a.Num.getEuclideanDistance(n.left,i.left),right:a.Num.getEuclideanDistance(n.right,i.right)}}},{key:"getElementOffsetFromDocument",value:function(e){var t=e.getBoundingClientRect(),n=a.DOMScroll,i=n.scrollLeft,r=n.scrollTop;return{top:t.top+r,bottom:t.bottom+r,left:t.left+i,right:t.right+i}}}]),e}();n.DOMOffset=s},{"@babel/runtime/helpers/classCallCheck":"0fcM","@babel/runtime/helpers/createClass":"P8NW","../rocket":"ydY1"}],xfSR:[function(e,t,n){"use strict";var i=o(e("@babel/runtime/helpers/classCallCheck")),r=o(e("@babel/runtime/helpers/createClass"));function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var a=e("../rocket"),s=function(){function e(){(0,i.default)(this,e)}return(0,r.default)(e,null,[{key:"getRectFromElements",value:function(e){var t;if(0===(t=!1===Array.isArray(e)?[e]:e).length)return!1;for(var n={top:0,bottom:0,left:0,right:0,width:0,height:0,center:a.Point.zero()},i=0;i<t.length;i++){var r=t[i].getBoundingClientRect(),o=r.top,s=r.bottom,u=r.left,l=r.right;0===i?(n.top=o,n.bottom=s,n.left=u,n.right=l):(o<n.top&&(n.top=o),s>n.bottom&&(n.bottom=s),u<n.left&&(n.left=u),l>n.right&&(n.right=l))}return n.width=a.Num.getEuclideanDistance(n.left,n.right),n.height=a.Num.getEuclideanDistance(n.top,n.bottom),n.center=new a.Point(n.left+n.width/2,n.top+n.height/2),n}},{key:"elementsAreOverlapping",value:function(e,t){var n=e.getBoundingClientRect(),i=t.getBoundingClientRect();return!(n.left>i.right||i.left>n.right||n.top>i.bottom||i.top>n.bottom)}},{key:"getOverlappingAreaFromElements",value:function(e,t){var n=e.getBoundingClientRect(),i=t.getBoundingClientRect();if(!0===this.elementsAreOverlapping(e,t)){var r=Math.max(n.top,i.top),o=Math.min(n.bottom,i.bottom),s=Math.max(n.left,i.left),u=Math.min(n.right,i.right);return a.Num.getEuclideanDistance(s,u)*a.Num.getEuclideanDistance(r,o)}return 0}}]),e}();n.DOMRect=s},{"@babel/runtime/helpers/classCallCheck":"0fcM","@babel/runtime/helpers/createClass":"P8NW","../rocket":"ydY1"}],hBGe:[function(e,t,n){"use strict";var i=o(e("@babel/runtime/helpers/classCallCheck")),r=o(e("@babel/runtime/helpers/createClass"));function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var a=e("../rocket"),s=function(){function e(){(0,i.default)(this,e)}return(0,r.default)(e,null,[{key:"getScrollLeftToElements",value:function(e){var t,n=0;return!1!==(t=!0===Array.isArray(e)?a.DOMRect.getRectFromElements(e):e.getBoundingClientRect())&&(n=t.left),n+this.scrollLeft}},{key:"getScrollTopToElements",value:function(e){var t,n=0;return!1!==(t=!0===Array.isArray(e)?a.DOMRect.getRectFromElements(e):e.getBoundingClientRect())&&(n=t.top),n+this.scrollTop}},{key:"getScrollLeftToElementsCenterFrame",value:function(e){var t,n=0,i=0;return!1!==(t=!0===Array.isArray(e)?a.DOMRect.getRectFromElements(e):e.getBoundingClientRect())&&(n=t.left,i=t.width),n-(a.Viewport.width-i)/2+this.scrollLeft}},{key:"getScrollTopToElementsCenterFrame",value:function(e){var t,n=0,i=0;return!1!==(t=!0===Array.isArray(e)?a.DOMRect.getRectFromElements(e):e.getBoundingClientRect())&&(n=t.top,i=t.height),n-(a.Viewport.height-i)/2+this.scrollTop}},{key:"getScrollToElementsCenterFrame",value:function(e){return{left:this.getScrollLeftToElementsCenterFrame(e),top:this.getScrollTopToElementsCenterFrame(e)}}},{key:"scrollLeft",get:function(){return"number"==typeof window.pageXOffset?window.pageXOffset:document.documentElement.scrollLeft||document.body.scrollLeft||window.scrollX||0}},{key:"scrollTop",get:function(){return"number"==typeof window.pageYOffset?window.pageYOffset:document.documentElement.scrollTop||document.body.scrollTop||window.scrollY||0}}]),e}();n.DOMScroll=s},{"@babel/runtime/helpers/classCallCheck":"0fcM","@babel/runtime/helpers/createClass":"P8NW","../rocket":"ydY1"}],Re3A:[function(e,t,n){"use strict";var i=o(e("@babel/runtime/helpers/classCallCheck")),r=o(e("@babel/runtime/helpers/createClass"));function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var a,s,u,l=e("./rocket"),c={border:"none",boxSizing:"border-box",display:"block",height:"100vh",left:"0",padding:"0",position:"fixed",top:"0",visibility:"hidden",width:"100vw",zIndex:"-9999"},h=!1,f=docume