New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

blinguidance

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

blinguidance - npm Package Compare versions

Comparing version 1.0.6 to 1.0.7

2

package.json
{
"name": "blinguidance",
"version": "1.0.6",
"version": "1.0.7",
"description": "guidance",

@@ -5,0 +5,0 @@ "main": "src/lib/guidance.umd.min.js",

"use strict";function t(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function e(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?t(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):t(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function r(){
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
r=function(){return t};var t={},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,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var o=e&&e.prototype instanceof h?e:h,i=Object.create(o.prototype),a=new O(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return k()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=x(a,r);if(c){if(c===f)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=s(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(t,r,a),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var f={};function h(){}function p(){}function d(){}var y={};u(y,i,(function(){return this}));var v=Object.getPrototypeOf,g=v&&v(v(j([])));g&&g!==e&&n.call(g,i)&&(y=g);var m=d.prototype=h.prototype=Object.create(y);function w(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(o,i,a,c){var u=s(t[o],t,i);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var o;this._invoke=function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}}function x(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=s(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,f;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function L(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function j(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 r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:k}}function k(){return{value:void 0,done:!0}}return p.prototype=d,u(m,"constructor",d),u(d,"constructor",p),p.displayName=u(d,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,u(t,c,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},w(b.prototype),u(b.prototype,a,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new b(l(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(m),u(m,c,"Generator"),u(m,i,(function(){return this})),u(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=j,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},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 r(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(t,e){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&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:j(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function o(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function i(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,c=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){c=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(c)throw o}}return i}(t,e)||a(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){if(t){if("string"==typeof t)return c(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(t,e):void 0}}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function u(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=a(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,c=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return c=t.done,t},e:function(t){u=!0,i=t},f:function(){try{c||null==r.return||r.return()}finally{if(u)throw i}}}}function l(t,e,r){return function(t,e,r){if(e.set)e.set.call(t,r);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=r}}(t,s(t,e,"set"),r),r}function s(t,e,r){if(!e.has(t))throw new TypeError("attempted to "+r+" private field on non-instance");return e.get(t)}function f(t,e,r){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return r}function h(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function p(t,e){h(t,e),e.add(t)}var d;function y(t,e){var r=t;for(var n in"string"==typeof t&&(r=document.createElement(t)),e)r.style[n]=e[n];return r}var v=new Map;function g(){var t,r=u(v);try{for(r.s();!(t=r.n()).done;){var n=i(t.value,2),o=n[0],a=n[1];o.style=e(e({},o.style),a)}}catch(t){r.e(t)}finally{r.f()}}function m(t){var e=document.querySelector(t);!function(t){var e=getComputedStyle(t).position,r=getComputedStyle(t).zIndex;v.set(t,{position:e,zIndex:r}),"static"===e&&(t.style.position="relative"),t.style.zIndex="9999"}(e);var r=e.offsetLeft;return[e.offsetTop+"px",r+"px",e.clientHeight+"px",e.clientWidth+"px"]}function w(t){window.scrollTo({top:t,behavior:"smooth"})}var b=new WeakMap,x=new WeakSet,L=new WeakSet,E=new WeakSet,O=new WeakSet,j=new WeakSet;d=Symbol.iterator;var k=function(){function t(r){var n,o,i;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),p(this,j),p(this,O),p(this,E),p(this,L),p(this,x),i={writable:!0,value:!1},h(n=this,o=b),o.set(n,i);var a=r.flow,c=r.btns,u=void 0===c?{next:{},end:{}}:c;this.flow=a,this.innerHeight=window.innerHeight,this.mask=y("div",{position:"fixed",top:"0",left:"0",right:"0",bottom:"0",background:"rgba(0,0,0,.5)",zIndex:"99"}),this.showBox=y("div",{position:"absolute",zIndex:"999",backgroundSize:"100% 100%",transition:"all 0.3s ease-in-out"});var l={cursor:"pointer",position:"absolute",display:"fixed",textAlign:"center"};this.nextBtn=y("div",e(e({},u.next),l)),this.nextBtn.innerHTML=u.next.content,this.endBtn=y("div",e(e({},u.end),{},{cursor:"pointer"},l)),this.endBtn.innerHTML=u.end.content}var o,i,a;return o=t,a=[{key:"create",value:function(e){var r=new t(e);return r.insert.bind(r)}}],(i=[{key:"insert",value:function(t,e){if(!function(t,e){return e.get?e.get.call(t):e.value}(n=this,s(n,b,"get"))){var n;l(this,b,!0);var o=r().mark((function n(o){var i,a,c;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:document.body.appendChild(o.mask),document.body.appendChild(o.showBox),f(o,E,T).call(o),o.showBox.appendChild(o.nextBtn),o.showBox.appendChild(o.endBtn),o.nextBtn.onclick=t,o.endBtn.onclick=e,i=u(o.flow),r.prev=8,i.s();case 10:if((a=i.n()).done){r.next=23;break}if((c=a.value).target){r.next=14;break}throw new Error("Target is not passed in");case 14:return o.currentStyle=c,g(),f(o,L,F).call(o,c),y(o.nextBtn,c.next),y(o.endBtn,c.end),void(r.next=21);case 21:r.next=10;break;case 23:r.next=28;break;case 25:r.prev=25,r.t0=r.catch(8),i.e(r.t0);case 28:return r.prev=28,i.f(),r.finish(28);case 31:case"end":return r.stop()}}),n,null,[[8,25,28,31]])}))(this);return o.end=f(this,j,C).bind(this),o}}},{key:d,value:r().mark((function t(){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.delegateYield(this.flow,"t0",1);case 1:case"end":return t.stop()}}),t,this)}))}])&&n(o.prototype,i),a&&n(o,a),Object.defineProperty(o,"prototype",{writable:!1}),t}();function S(t,r){r.adjustment||(r.adjustment={});var n=r.adjustment,o=n.top,i=void 0===o?5:o,a=n.left,c=void 0===a?5:a;if(!t)return e(e({},r),{},{left:parseFloat(r.left)-parseFloat(r.width)+parseFloat(r.targetWidth)+"px"});var u={xLeft:parseFloat(r.left)-parseFloat(r.width)+c+"px",xRight:parseFloat(r.left)+parseFloat(r.targetWidth)+c+"px",xCenter:parseFloat(r.left)-parseFloat(r.width)/2+parseFloat(r.targetWidth)/2+c+"px",yTop:parseFloat(r.top)-parseFloat(r.height)+i+"px",yBottom:parseFloat(r.top)+parseFloat(r.targetHeight)+i+"px",yCenter:parseFloat(r.top)-parseFloat(r.height)/2+parseFloat(r.targetHeight)/2+i+"px"};switch(t){case"top":return e(e({},r),{},{top:u.yTop,left:u.xCenter});case"right":return e(e({},r),{},{left:u.xRight,top:u.yCenter});case"bottom":return e(e({},r),{},{top:u.yBottom,left:u.xCenter});case"left":return e(e({},r),{},{left:u.xLeft,top:u.yCenter});case"topLeft":return e(e({},r),{},{left:u.xLeft,top:u.yTop});case"topRight":return e(e({},r),{},{left:u.xRight,top:u.yTop});case"bottomLeft":return e(e({},r),{},{left:u.xLeft,top:u.yBottom});case"bottomRight":return e(e({},r),{},{left:u.xRight,top:u.yBottom})}}function F(t){var r=i(m(t.target),4),n=r[0],o=r[1],a=r[2],c=r[3];f(this,O,B).call(this,n,a);var u=f(this,x,S).call(this,t.placement,e(e({},t),{},{top:n,left:o,targetWidth:c,targetHeight:a}));y(this.showBox,u)}function T(){var t=this;this.resize=function(t){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:250,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=!1;return function(){for(var i=this,a=arguments.length,c=new Array(a),u=0;u<a;u++)c[u]=arguments[u];n&&!o?(t.apply(this,c),o=!0):(e&&clearTimeout(e),e=setTimeout((function(){t.apply(i,c),e=null,o=!1}),r))}}((function(){f(t,L,F).call(t,t.currentStyle)})),window.addEventListener("resize",this.resize)}function B(t,e){w(parseFloat(t)+parseFloat(e)/2-this.innerHeight/2)}function C(){w(0),document.body.removeChild(this.mask),document.body.removeChild(this.showBox),this.mask=null,this.showBox=null,g(),v=null,window.removeEventListener("resize",this.resize)}module.exports=k;
r=function(){return t};var t={},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,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var o=e&&e.prototype instanceof h?e:h,i=Object.create(o.prototype),a=new O(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return k()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=x(a,r);if(c){if(c===f)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=s(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(t,r,a),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var f={};function h(){}function p(){}function d(){}var y={};u(y,i,(function(){return this}));var v=Object.getPrototypeOf,g=v&&v(v(j([])));g&&g!==e&&n.call(g,i)&&(y=g);var m=d.prototype=h.prototype=Object.create(y);function w(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(o,i,a,c){var u=s(t[o],t,i);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var o;this._invoke=function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}}function x(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=s(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,f;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function L(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function j(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 r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:k}}function k(){return{value:void 0,done:!0}}return p.prototype=d,u(m,"constructor",d),u(d,"constructor",p),p.displayName=u(d,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,u(t,c,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},w(b.prototype),u(b.prototype,a,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new b(l(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(m),u(m,c,"Generator"),u(m,i,(function(){return this})),u(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=j,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},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 r(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(t,e){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&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:j(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function o(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function i(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,c=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){c=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(c)throw o}}return i}(t,e)||a(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){if(t){if("string"==typeof t)return c(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(t,e):void 0}}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function u(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=a(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,c=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return c=t.done,t},e:function(t){u=!0,i=t},f:function(){try{c||null==r.return||r.return()}finally{if(u)throw i}}}}function l(t,e,r){return function(t,e,r){if(e.set)e.set.call(t,r);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=r}}(t,s(t,e,"set"),r),r}function s(t,e,r){if(!e.has(t))throw new TypeError("attempted to "+r+" private field on non-instance");return e.get(t)}function f(t,e,r){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return r}function h(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function p(t,e){h(t,e),e.add(t)}var d;function y(t,e){var r=t;for(var n in"string"==typeof t&&(r=document.createElement(t)),e)r.style[n]=e[n];return r}var v=new Map;function g(){var t,r=u(v);try{for(r.s();!(t=r.n()).done;){var n=i(t.value,2),o=n[0],a=n[1];o.style=e(e({},o.style),a)}}catch(t){r.e(t)}finally{r.f()}}function m(t,e){return t.offsetParent?(console.log(t.offsetParent),m(t.offsetParent,e)+t[e]):t[e]||0}function w(t){var e=document.querySelector(t);!function(t){var e=getComputedStyle(t).position,r=getComputedStyle(t).zIndex;v.set(t,{position:e,zIndex:r}),"static"===e&&(t.style.position="relative"),t.style.zIndex="9999"}(e);var r=m(e,"offsetTop"),n=m(e,"offsetLeft");return console.log(n,r),[r+"px",n+"px",e.clientHeight+"px",e.clientWidth+"px"]}function b(t){window.scrollTo({top:t,behavior:"smooth"})}var x=new WeakMap,L=new WeakSet,E=new WeakSet,O=new WeakSet,j=new WeakSet,k=new WeakSet;d=Symbol.iterator;var S=function(){function t(r){var n,o,i;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),p(this,k),p(this,j),p(this,O),p(this,E),p(this,L),i={writable:!0,value:!1},h(n=this,o=x),o.set(n,i);var a=r.flow,c=r.btns,u=void 0===c?{next:{},end:{}}:c;this.flow=a,this.innerHeight=window.innerHeight,this.mask=y("div",{position:"fixed",top:"0",left:"0",right:"0",bottom:"0",background:"rgba(0,0,0,.5)",zIndex:"99"}),this.showBox=y("div",{position:"absolute",zIndex:"999",backgroundSize:"100% 100%",transition:"all 0.3s ease-in-out"});var l={cursor:"pointer",position:"absolute",display:"fixed",textAlign:"center"};this.nextBtn=y("div",e(e({},u.next),l)),this.nextBtn.innerHTML=u.next.content,this.endBtn=y("div",e(e({},u.end),{},{cursor:"pointer"},l)),this.endBtn.innerHTML=u.end.content}var o,i,a;return o=t,a=[{key:"create",value:function(e){var r=new t(e);return r.insert.bind(r)}}],(i=[{key:"insert",value:function(t,e){if(!function(t,e){return e.get?e.get.call(t):e.value}(n=this,s(n,x,"get"))){var n;l(this,x,!0);var o=r().mark((function n(o){var i,a,c;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:document.body.appendChild(o.mask),document.body.appendChild(o.showBox),f(o,O,B).call(o),o.showBox.appendChild(o.nextBtn),o.showBox.appendChild(o.endBtn),o.nextBtn.onclick=t,o.endBtn.onclick=e,i=u(o.flow),r.prev=8,i.s();case 10:if((a=i.n()).done){r.next=23;break}if((c=a.value).target){r.next=14;break}throw new Error("Target is not passed in");case 14:return o.currentStyle=c,g(),f(o,E,T).call(o,c),y(o.nextBtn,c.next),y(o.endBtn,c.end),void(r.next=21);case 21:r.next=10;break;case 23:r.next=28;break;case 25:r.prev=25,r.t0=r.catch(8),i.e(r.t0);case 28:return r.prev=28,i.f(),r.finish(28);case 31:case"end":return r.stop()}}),n,null,[[8,25,28,31]])}))(this);return o.end=f(this,k,C).bind(this),o}}},{key:d,value:r().mark((function t(){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.delegateYield(this.flow,"t0",1);case 1:case"end":return t.stop()}}),t,this)}))}])&&n(o.prototype,i),a&&n(o,a),Object.defineProperty(o,"prototype",{writable:!1}),t}();function F(t,r){r.adjustment||(r.adjustment={});var n=r.adjustment,o=n.top,i=void 0===o?0:o,a=n.left,c=void 0===a?0:a;if(!t)return e(e({},r),{},{left:parseFloat(r.left)-parseFloat(r.width)+parseFloat(r.targetWidth)+"px"});var u={xLeft:parseFloat(r.left)-parseFloat(r.width)+c+"px",xRight:parseFloat(r.left)+parseFloat(r.targetWidth)+c+"px",xCenter:parseFloat(r.left)-parseFloat(r.width)/2+parseFloat(r.targetWidth)/2+c+"px",yTop:parseFloat(r.top)-parseFloat(r.height)+i+"px",yBottom:parseFloat(r.top)+parseFloat(r.targetHeight)+i+"px",yCenter:parseFloat(r.top)-parseFloat(r.height)/2+parseFloat(r.targetHeight)/2+i+"px"};switch(t){case"top":return e(e({},r),{},{top:u.yTop,left:u.xCenter});case"right":return e(e({},r),{},{left:u.xRight,top:u.yCenter});case"bottom":return e(e({},r),{},{top:u.yBottom,left:u.xCenter});case"left":return e(e({},r),{},{left:u.xLeft,top:u.yCenter});case"topLeft":return e(e({},r),{},{left:u.xLeft,top:u.yTop});case"topRight":return e(e({},r),{},{left:u.xRight,top:u.yTop});case"bottomLeft":return e(e({},r),{},{left:u.xLeft,top:u.yBottom});case"bottomRight":return e(e({},r),{},{left:u.xRight,top:u.yBottom})}}function T(t){var r=i(w(t.target),4),n=r[0],o=r[1],a=r[2],c=r[3];f(this,j,P).call(this,n,a);var u=f(this,L,F).call(this,t.placement,e(e({},t),{},{top:n,left:o,targetWidth:c,targetHeight:a}));y(this.showBox,u)}function B(){var t=this;this.resize=function(t){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:250,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=!1;return function(){for(var i=this,a=arguments.length,c=new Array(a),u=0;u<a;u++)c[u]=arguments[u];n&&!o?(t.apply(this,c),o=!0):(e&&clearTimeout(e),e=setTimeout((function(){t.apply(i,c),e=null,o=!1}),r))}}((function(){f(t,E,T).call(t,t.currentStyle)})),window.addEventListener("resize",this.resize)}function P(t,e){b(parseFloat(t)+parseFloat(e)/2-this.innerHeight/2)}function C(){b(0),document.body.removeChild(this.mask),document.body.removeChild(this.showBox),this.mask=null,this.showBox=null,g(),v=null,window.removeEventListener("resize",this.resize)}module.exports=S;
function t(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function e(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?t(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):t(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function r(){
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
r=function(){return t};var t={},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,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var o=e&&e.prototype instanceof h?e:h,i=Object.create(o.prototype),a=new O(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return k()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=x(a,r);if(c){if(c===f)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=s(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(t,r,a),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var f={};function h(){}function p(){}function d(){}var y={};u(y,i,(function(){return this}));var v=Object.getPrototypeOf,g=v&&v(v(j([])));g&&g!==e&&n.call(g,i)&&(y=g);var m=d.prototype=h.prototype=Object.create(y);function w(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(o,i,a,c){var u=s(t[o],t,i);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var o;this._invoke=function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}}function x(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=s(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,f;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function L(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function j(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 r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:k}}function k(){return{value:void 0,done:!0}}return p.prototype=d,u(m,"constructor",d),u(d,"constructor",p),p.displayName=u(d,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,u(t,c,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},w(b.prototype),u(b.prototype,a,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new b(l(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(m),u(m,c,"Generator"),u(m,i,(function(){return this})),u(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=j,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},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 r(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(t,e){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&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:j(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function o(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function i(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,c=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){c=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(c)throw o}}return i}(t,e)||a(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){if(t){if("string"==typeof t)return c(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(t,e):void 0}}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function u(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=a(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,c=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return c=t.done,t},e:function(t){u=!0,i=t},f:function(){try{c||null==r.return||r.return()}finally{if(u)throw i}}}}function l(t,e,r){return function(t,e,r){if(e.set)e.set.call(t,r);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=r}}(t,s(t,e,"set"),r),r}function s(t,e,r){if(!e.has(t))throw new TypeError("attempted to "+r+" private field on non-instance");return e.get(t)}function f(t,e,r){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return r}function h(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function p(t,e){h(t,e),e.add(t)}var d;function y(t,e){var r=t;for(var n in"string"==typeof t&&(r=document.createElement(t)),e)r.style[n]=e[n];return r}var v=new Map;function g(){var t,r=u(v);try{for(r.s();!(t=r.n()).done;){var n=i(t.value,2),o=n[0],a=n[1];o.style=e(e({},o.style),a)}}catch(t){r.e(t)}finally{r.f()}}function m(t){var e=document.querySelector(t);!function(t){var e=getComputedStyle(t).position,r=getComputedStyle(t).zIndex;v.set(t,{position:e,zIndex:r}),"static"===e&&(t.style.position="relative"),t.style.zIndex="9999"}(e);var r=e.offsetLeft;return[e.offsetTop+"px",r+"px",e.clientHeight+"px",e.clientWidth+"px"]}function w(t){window.scrollTo({top:t,behavior:"smooth"})}var b=new WeakMap,x=new WeakSet,L=new WeakSet,E=new WeakSet,O=new WeakSet,j=new WeakSet;d=Symbol.iterator;var k=function(){function t(r){var n,o,i;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),p(this,j),p(this,O),p(this,E),p(this,L),p(this,x),i={writable:!0,value:!1},h(n=this,o=b),o.set(n,i);var a=r.flow,c=r.btns,u=void 0===c?{next:{},end:{}}:c;this.flow=a,this.innerHeight=window.innerHeight,this.mask=y("div",{position:"fixed",top:"0",left:"0",right:"0",bottom:"0",background:"rgba(0,0,0,.5)",zIndex:"99"}),this.showBox=y("div",{position:"absolute",zIndex:"999",backgroundSize:"100% 100%",transition:"all 0.3s ease-in-out"});var l={cursor:"pointer",position:"absolute",display:"fixed",textAlign:"center"};this.nextBtn=y("div",e(e({},u.next),l)),this.nextBtn.innerHTML=u.next.content,this.endBtn=y("div",e(e({},u.end),{},{cursor:"pointer"},l)),this.endBtn.innerHTML=u.end.content}var o,i,a;return o=t,a=[{key:"create",value:function(e){var r=new t(e);return r.insert.bind(r)}}],(i=[{key:"insert",value:function(t,e){if(!function(t,e){return e.get?e.get.call(t):e.value}(n=this,s(n,b,"get"))){var n;l(this,b,!0);var o=r().mark((function n(o){var i,a,c;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:document.body.appendChild(o.mask),document.body.appendChild(o.showBox),f(o,E,T).call(o),o.showBox.appendChild(o.nextBtn),o.showBox.appendChild(o.endBtn),o.nextBtn.onclick=t,o.endBtn.onclick=e,i=u(o.flow),r.prev=8,i.s();case 10:if((a=i.n()).done){r.next=23;break}if((c=a.value).target){r.next=14;break}throw new Error("Target is not passed in");case 14:return o.currentStyle=c,g(),f(o,L,F).call(o,c),y(o.nextBtn,c.next),y(o.endBtn,c.end),void(r.next=21);case 21:r.next=10;break;case 23:r.next=28;break;case 25:r.prev=25,r.t0=r.catch(8),i.e(r.t0);case 28:return r.prev=28,i.f(),r.finish(28);case 31:case"end":return r.stop()}}),n,null,[[8,25,28,31]])}))(this);return o.end=f(this,j,C).bind(this),o}}},{key:d,value:r().mark((function t(){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.delegateYield(this.flow,"t0",1);case 1:case"end":return t.stop()}}),t,this)}))}])&&n(o.prototype,i),a&&n(o,a),Object.defineProperty(o,"prototype",{writable:!1}),t}();function S(t,r){r.adjustment||(r.adjustment={});var n=r.adjustment,o=n.top,i=void 0===o?5:o,a=n.left,c=void 0===a?5:a;if(!t)return e(e({},r),{},{left:parseFloat(r.left)-parseFloat(r.width)+parseFloat(r.targetWidth)+"px"});var u={xLeft:parseFloat(r.left)-parseFloat(r.width)+c+"px",xRight:parseFloat(r.left)+parseFloat(r.targetWidth)+c+"px",xCenter:parseFloat(r.left)-parseFloat(r.width)/2+parseFloat(r.targetWidth)/2+c+"px",yTop:parseFloat(r.top)-parseFloat(r.height)+i+"px",yBottom:parseFloat(r.top)+parseFloat(r.targetHeight)+i+"px",yCenter:parseFloat(r.top)-parseFloat(r.height)/2+parseFloat(r.targetHeight)/2+i+"px"};switch(t){case"top":return e(e({},r),{},{top:u.yTop,left:u.xCenter});case"right":return e(e({},r),{},{left:u.xRight,top:u.yCenter});case"bottom":return e(e({},r),{},{top:u.yBottom,left:u.xCenter});case"left":return e(e({},r),{},{left:u.xLeft,top:u.yCenter});case"topLeft":return e(e({},r),{},{left:u.xLeft,top:u.yTop});case"topRight":return e(e({},r),{},{left:u.xRight,top:u.yTop});case"bottomLeft":return e(e({},r),{},{left:u.xLeft,top:u.yBottom});case"bottomRight":return e(e({},r),{},{left:u.xRight,top:u.yBottom})}}function F(t){var r=i(m(t.target),4),n=r[0],o=r[1],a=r[2],c=r[3];f(this,O,B).call(this,n,a);var u=f(this,x,S).call(this,t.placement,e(e({},t),{},{top:n,left:o,targetWidth:c,targetHeight:a}));y(this.showBox,u)}function T(){var t=this;this.resize=function(t){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:250,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=!1;return function(){for(var i=this,a=arguments.length,c=new Array(a),u=0;u<a;u++)c[u]=arguments[u];n&&!o?(t.apply(this,c),o=!0):(e&&clearTimeout(e),e=setTimeout((function(){t.apply(i,c),e=null,o=!1}),r))}}((function(){f(t,L,F).call(t,t.currentStyle)})),window.addEventListener("resize",this.resize)}function B(t,e){w(parseFloat(t)+parseFloat(e)/2-this.innerHeight/2)}function C(){w(0),document.body.removeChild(this.mask),document.body.removeChild(this.showBox),this.mask=null,this.showBox=null,g(),v=null,window.removeEventListener("resize",this.resize)}export{k as default};
r=function(){return t};var t={},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,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var o=e&&e.prototype instanceof h?e:h,i=Object.create(o.prototype),a=new O(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return k()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=x(a,r);if(c){if(c===f)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=s(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(t,r,a),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var f={};function h(){}function p(){}function d(){}var y={};u(y,i,(function(){return this}));var v=Object.getPrototypeOf,g=v&&v(v(j([])));g&&g!==e&&n.call(g,i)&&(y=g);var m=d.prototype=h.prototype=Object.create(y);function w(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(o,i,a,c){var u=s(t[o],t,i);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var o;this._invoke=function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}}function x(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=s(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,f;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function L(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function j(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 r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:k}}function k(){return{value:void 0,done:!0}}return p.prototype=d,u(m,"constructor",d),u(d,"constructor",p),p.displayName=u(d,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,u(t,c,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},w(b.prototype),u(b.prototype,a,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new b(l(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(m),u(m,c,"Generator"),u(m,i,(function(){return this})),u(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=j,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},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 r(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(t,e){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&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:j(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function o(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function i(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,c=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){c=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(c)throw o}}return i}(t,e)||a(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){if(t){if("string"==typeof t)return c(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(t,e):void 0}}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function u(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=a(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,c=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return c=t.done,t},e:function(t){u=!0,i=t},f:function(){try{c||null==r.return||r.return()}finally{if(u)throw i}}}}function l(t,e,r){return function(t,e,r){if(e.set)e.set.call(t,r);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=r}}(t,s(t,e,"set"),r),r}function s(t,e,r){if(!e.has(t))throw new TypeError("attempted to "+r+" private field on non-instance");return e.get(t)}function f(t,e,r){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return r}function h(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function p(t,e){h(t,e),e.add(t)}var d;function y(t,e){var r=t;for(var n in"string"==typeof t&&(r=document.createElement(t)),e)r.style[n]=e[n];return r}var v=new Map;function g(){var t,r=u(v);try{for(r.s();!(t=r.n()).done;){var n=i(t.value,2),o=n[0],a=n[1];o.style=e(e({},o.style),a)}}catch(t){r.e(t)}finally{r.f()}}function m(t,e){return t.offsetParent?(console.log(t.offsetParent),m(t.offsetParent,e)+t[e]):t[e]||0}function w(t){var e=document.querySelector(t);!function(t){var e=getComputedStyle(t).position,r=getComputedStyle(t).zIndex;v.set(t,{position:e,zIndex:r}),"static"===e&&(t.style.position="relative"),t.style.zIndex="9999"}(e);var r=m(e,"offsetTop"),n=m(e,"offsetLeft");return console.log(n,r),[r+"px",n+"px",e.clientHeight+"px",e.clientWidth+"px"]}function b(t){window.scrollTo({top:t,behavior:"smooth"})}var x=new WeakMap,L=new WeakSet,E=new WeakSet,O=new WeakSet,j=new WeakSet,k=new WeakSet;d=Symbol.iterator;var S=function(){function t(r){var n,o,i;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),p(this,k),p(this,j),p(this,O),p(this,E),p(this,L),i={writable:!0,value:!1},h(n=this,o=x),o.set(n,i);var a=r.flow,c=r.btns,u=void 0===c?{next:{},end:{}}:c;this.flow=a,this.innerHeight=window.innerHeight,this.mask=y("div",{position:"fixed",top:"0",left:"0",right:"0",bottom:"0",background:"rgba(0,0,0,.5)",zIndex:"99"}),this.showBox=y("div",{position:"absolute",zIndex:"999",backgroundSize:"100% 100%",transition:"all 0.3s ease-in-out"});var l={cursor:"pointer",position:"absolute",display:"fixed",textAlign:"center"};this.nextBtn=y("div",e(e({},u.next),l)),this.nextBtn.innerHTML=u.next.content,this.endBtn=y("div",e(e({},u.end),{},{cursor:"pointer"},l)),this.endBtn.innerHTML=u.end.content}var o,i,a;return o=t,a=[{key:"create",value:function(e){var r=new t(e);return r.insert.bind(r)}}],(i=[{key:"insert",value:function(t,e){if(!function(t,e){return e.get?e.get.call(t):e.value}(n=this,s(n,x,"get"))){var n;l(this,x,!0);var o=r().mark((function n(o){var i,a,c;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:document.body.appendChild(o.mask),document.body.appendChild(o.showBox),f(o,O,B).call(o),o.showBox.appendChild(o.nextBtn),o.showBox.appendChild(o.endBtn),o.nextBtn.onclick=t,o.endBtn.onclick=e,i=u(o.flow),r.prev=8,i.s();case 10:if((a=i.n()).done){r.next=23;break}if((c=a.value).target){r.next=14;break}throw new Error("Target is not passed in");case 14:return o.currentStyle=c,g(),f(o,E,T).call(o,c),y(o.nextBtn,c.next),y(o.endBtn,c.end),void(r.next=21);case 21:r.next=10;break;case 23:r.next=28;break;case 25:r.prev=25,r.t0=r.catch(8),i.e(r.t0);case 28:return r.prev=28,i.f(),r.finish(28);case 31:case"end":return r.stop()}}),n,null,[[8,25,28,31]])}))(this);return o.end=f(this,k,C).bind(this),o}}},{key:d,value:r().mark((function t(){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.delegateYield(this.flow,"t0",1);case 1:case"end":return t.stop()}}),t,this)}))}])&&n(o.prototype,i),a&&n(o,a),Object.defineProperty(o,"prototype",{writable:!1}),t}();function F(t,r){r.adjustment||(r.adjustment={});var n=r.adjustment,o=n.top,i=void 0===o?0:o,a=n.left,c=void 0===a?0:a;if(!t)return e(e({},r),{},{left:parseFloat(r.left)-parseFloat(r.width)+parseFloat(r.targetWidth)+"px"});var u={xLeft:parseFloat(r.left)-parseFloat(r.width)+c+"px",xRight:parseFloat(r.left)+parseFloat(r.targetWidth)+c+"px",xCenter:parseFloat(r.left)-parseFloat(r.width)/2+parseFloat(r.targetWidth)/2+c+"px",yTop:parseFloat(r.top)-parseFloat(r.height)+i+"px",yBottom:parseFloat(r.top)+parseFloat(r.targetHeight)+i+"px",yCenter:parseFloat(r.top)-parseFloat(r.height)/2+parseFloat(r.targetHeight)/2+i+"px"};switch(t){case"top":return e(e({},r),{},{top:u.yTop,left:u.xCenter});case"right":return e(e({},r),{},{left:u.xRight,top:u.yCenter});case"bottom":return e(e({},r),{},{top:u.yBottom,left:u.xCenter});case"left":return e(e({},r),{},{left:u.xLeft,top:u.yCenter});case"topLeft":return e(e({},r),{},{left:u.xLeft,top:u.yTop});case"topRight":return e(e({},r),{},{left:u.xRight,top:u.yTop});case"bottomLeft":return e(e({},r),{},{left:u.xLeft,top:u.yBottom});case"bottomRight":return e(e({},r),{},{left:u.xRight,top:u.yBottom})}}function T(t){var r=i(w(t.target),4),n=r[0],o=r[1],a=r[2],c=r[3];f(this,j,P).call(this,n,a);var u=f(this,L,F).call(this,t.placement,e(e({},t),{},{top:n,left:o,targetWidth:c,targetHeight:a}));y(this.showBox,u)}function B(){var t=this;this.resize=function(t){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:250,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=!1;return function(){for(var i=this,a=arguments.length,c=new Array(a),u=0;u<a;u++)c[u]=arguments[u];n&&!o?(t.apply(this,c),o=!0):(e&&clearTimeout(e),e=setTimeout((function(){t.apply(i,c),e=null,o=!1}),r))}}((function(){f(t,E,T).call(t,t.currentStyle)})),window.addEventListener("resize",this.resize)}function P(t,e){b(parseFloat(t)+parseFloat(e)/2-this.innerHeight/2)}function C(){b(0),document.body.removeChild(this.mask),document.body.removeChild(this.showBox),this.mask=null,this.showBox=null,g(),v=null,window.removeEventListener("resize",this.resize)}export{S as default};
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).Guidance=e()}(this,(function(){"use strict";function t(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function e(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?t(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):t(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function r(){
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
r=function(){return t};var t={},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,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var o=e&&e.prototype instanceof h?e:h,i=Object.create(o.prototype),a=new j(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return k()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=x(a,r);if(c){if(c===f)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=s(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(t,r,a),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var f={};function h(){}function p(){}function d(){}var y={};u(y,i,(function(){return this}));var v=Object.getPrototypeOf,g=v&&v(v(O([])));g&&g!==e&&n.call(g,i)&&(y=g);var m=d.prototype=h.prototype=Object.create(y);function w(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(o,i,a,c){var u=s(t[o],t,i);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var o;this._invoke=function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}}function x(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=s(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,f;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function L(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function O(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 r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:k}}function k(){return{value:void 0,done:!0}}return p.prototype=d,u(m,"constructor",d),u(d,"constructor",p),p.displayName=u(d,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,u(t,c,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},w(b.prototype),u(b.prototype,a,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new b(l(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(m),u(m,c,"Generator"),u(m,i,(function(){return this})),u(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=O,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},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 r(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(t,e){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&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:O(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function o(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function i(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,c=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){c=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(c)throw o}}return i}(t,e)||a(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){if(t){if("string"==typeof t)return c(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(t,e):void 0}}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function u(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=a(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,c=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return c=t.done,t},e:function(t){u=!0,i=t},f:function(){try{c||null==r.return||r.return()}finally{if(u)throw i}}}}function l(t,e,r){return function(t,e,r){if(e.set)e.set.call(t,r);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=r}}(t,s(t,e,"set"),r),r}function s(t,e,r){if(!e.has(t))throw new TypeError("attempted to "+r+" private field on non-instance");return e.get(t)}function f(t,e,r){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return r}function h(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function p(t,e){h(t,e),e.add(t)}var d;function y(t,e){var r=t;for(var n in"string"==typeof t&&(r=document.createElement(t)),e)r.style[n]=e[n];return r}var v=new Map;function g(){var t,r=u(v);try{for(r.s();!(t=r.n()).done;){var n=i(t.value,2),o=n[0],a=n[1];o.style=e(e({},o.style),a)}}catch(t){r.e(t)}finally{r.f()}}function m(t){var e=document.querySelector(t);!function(t){var e=getComputedStyle(t).position,r=getComputedStyle(t).zIndex;v.set(t,{position:e,zIndex:r}),"static"===e&&(t.style.position="relative"),t.style.zIndex="9999"}(e);var r=e.offsetLeft;return[e.offsetTop+"px",r+"px",e.clientHeight+"px",e.clientWidth+"px"]}function w(t){window.scrollTo({top:t,behavior:"smooth"})}var b=new WeakMap,x=new WeakSet,L=new WeakSet,E=new WeakSet,j=new WeakSet,O=new WeakSet;function k(t,r){r.adjustment||(r.adjustment={});var n=r.adjustment,o=n.top,i=void 0===o?5:o,a=n.left,c=void 0===a?5:a;if(!t)return e(e({},r),{},{left:parseFloat(r.left)-parseFloat(r.width)+parseFloat(r.targetWidth)+"px"});var u={xLeft:parseFloat(r.left)-parseFloat(r.width)+c+"px",xRight:parseFloat(r.left)+parseFloat(r.targetWidth)+c+"px",xCenter:parseFloat(r.left)-parseFloat(r.width)/2+parseFloat(r.targetWidth)/2+c+"px",yTop:parseFloat(r.top)-parseFloat(r.height)+i+"px",yBottom:parseFloat(r.top)+parseFloat(r.targetHeight)+i+"px",yCenter:parseFloat(r.top)-parseFloat(r.height)/2+parseFloat(r.targetHeight)/2+i+"px"};switch(t){case"top":return e(e({},r),{},{top:u.yTop,left:u.xCenter});case"right":return e(e({},r),{},{left:u.xRight,top:u.yCenter});case"bottom":return e(e({},r),{},{top:u.yBottom,left:u.xCenter});case"left":return e(e({},r),{},{left:u.xLeft,top:u.yCenter});case"topLeft":return e(e({},r),{},{left:u.xLeft,top:u.yTop});case"topRight":return e(e({},r),{},{left:u.xRight,top:u.yTop});case"bottomLeft":return e(e({},r),{},{left:u.xLeft,top:u.yBottom});case"bottomRight":return e(e({},r),{},{left:u.xRight,top:u.yBottom})}}function S(t){var r=i(m(t.target),4),n=r[0],o=r[1],a=r[2],c=r[3];f(this,j,F).call(this,n,a);var u=f(this,x,k).call(this,t.placement,e(e({},t),{},{top:n,left:o,targetWidth:c,targetHeight:a}));y(this.showBox,u)}function T(){var t=this;this.resize=function(t){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:250,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=!1;return function(){for(var i=this,a=arguments.length,c=new Array(a),u=0;u<a;u++)c[u]=arguments[u];n&&!o?(t.apply(this,c),o=!0):(e&&clearTimeout(e),e=setTimeout((function(){t.apply(i,c),e=null,o=!1}),r))}}((function(){f(t,L,S).call(t,t.currentStyle)})),window.addEventListener("resize",this.resize)}function F(t,e){w(parseFloat(t)+parseFloat(e)/2-this.innerHeight/2)}function B(){w(0),document.body.removeChild(this.mask),document.body.removeChild(this.showBox),this.mask=null,this.showBox=null,g(),v=null,window.removeEventListener("resize",this.resize)}return d=Symbol.iterator,function(){function t(r){var n,o,i;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),p(this,O),p(this,j),p(this,E),p(this,L),p(this,x),i={writable:!0,value:!1},h(n=this,o=b),o.set(n,i);var a=r.flow,c=r.btns,u=void 0===c?{next:{},end:{}}:c;this.flow=a,this.innerHeight=window.innerHeight,this.mask=y("div",{position:"fixed",top:"0",left:"0",right:"0",bottom:"0",background:"rgba(0,0,0,.5)",zIndex:"99"}),this.showBox=y("div",{position:"absolute",zIndex:"999",backgroundSize:"100% 100%",transition:"all 0.3s ease-in-out"});var l={cursor:"pointer",position:"absolute",display:"fixed",textAlign:"center"};this.nextBtn=y("div",e(e({},u.next),l)),this.nextBtn.innerHTML=u.next.content,this.endBtn=y("div",e(e({},u.end),{},{cursor:"pointer"},l)),this.endBtn.innerHTML=u.end.content}var o,i,a;return o=t,a=[{key:"create",value:function(e){var r=new t(e);return r.insert.bind(r)}}],(i=[{key:"insert",value:function(t,e){if(!function(t,e){return e.get?e.get.call(t):e.value}(n=this,s(n,b,"get"))){var n;l(this,b,!0);var o=r().mark((function n(o){var i,a,c;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:document.body.appendChild(o.mask),document.body.appendChild(o.showBox),f(o,E,T).call(o),o.showBox.appendChild(o.nextBtn),o.showBox.appendChild(o.endBtn),o.nextBtn.onclick=t,o.endBtn.onclick=e,i=u(o.flow),r.prev=8,i.s();case 10:if((a=i.n()).done){r.next=23;break}if((c=a.value).target){r.next=14;break}throw new Error("Target is not passed in");case 14:return o.currentStyle=c,g(),f(o,L,S).call(o,c),y(o.nextBtn,c.next),y(o.endBtn,c.end),void(r.next=21);case 21:r.next=10;break;case 23:r.next=28;break;case 25:r.prev=25,r.t0=r.catch(8),i.e(r.t0);case 28:return r.prev=28,i.f(),r.finish(28);case 31:case"end":return r.stop()}}),n,null,[[8,25,28,31]])}))(this);return o.end=f(this,O,B).bind(this),o}}},{key:d,value:r().mark((function t(){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.delegateYield(this.flow,"t0",1);case 1:case"end":return t.stop()}}),t,this)}))}])&&n(o.prototype,i),a&&n(o,a),Object.defineProperty(o,"prototype",{writable:!1}),t}()}));
r=function(){return t};var t={},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,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var o=e&&e.prototype instanceof h?e:h,i=Object.create(o.prototype),a=new j(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return k()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=x(a,r);if(c){if(c===f)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=s(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(t,r,a),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var f={};function h(){}function p(){}function d(){}var y={};u(y,i,(function(){return this}));var v=Object.getPrototypeOf,g=v&&v(v(O([])));g&&g!==e&&n.call(g,i)&&(y=g);var m=d.prototype=h.prototype=Object.create(y);function w(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(o,i,a,c){var u=s(t[o],t,i);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var o;this._invoke=function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}}function x(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=s(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,f;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function L(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function O(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 r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:k}}function k(){return{value:void 0,done:!0}}return p.prototype=d,u(m,"constructor",d),u(d,"constructor",p),p.displayName=u(d,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,u(t,c,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},w(b.prototype),u(b.prototype,a,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new b(l(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(m),u(m,c,"Generator"),u(m,i,(function(){return this})),u(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=O,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},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 r(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(t,e){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&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:O(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function o(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function i(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,c=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){c=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(c)throw o}}return i}(t,e)||a(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){if(t){if("string"==typeof t)return c(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(t,e):void 0}}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function u(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=a(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,c=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return c=t.done,t},e:function(t){u=!0,i=t},f:function(){try{c||null==r.return||r.return()}finally{if(u)throw i}}}}function l(t,e,r){return function(t,e,r){if(e.set)e.set.call(t,r);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=r}}(t,s(t,e,"set"),r),r}function s(t,e,r){if(!e.has(t))throw new TypeError("attempted to "+r+" private field on non-instance");return e.get(t)}function f(t,e,r){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return r}function h(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function p(t,e){h(t,e),e.add(t)}var d;function y(t,e){var r=t;for(var n in"string"==typeof t&&(r=document.createElement(t)),e)r.style[n]=e[n];return r}var v=new Map;function g(){var t,r=u(v);try{for(r.s();!(t=r.n()).done;){var n=i(t.value,2),o=n[0],a=n[1];o.style=e(e({},o.style),a)}}catch(t){r.e(t)}finally{r.f()}}function m(t,e){return t.offsetParent?(console.log(t.offsetParent),m(t.offsetParent,e)+t[e]):t[e]||0}function w(t){var e=document.querySelector(t);!function(t){var e=getComputedStyle(t).position,r=getComputedStyle(t).zIndex;v.set(t,{position:e,zIndex:r}),"static"===e&&(t.style.position="relative"),t.style.zIndex="9999"}(e);var r=m(e,"offsetTop"),n=m(e,"offsetLeft");return console.log(n,r),[r+"px",n+"px",e.clientHeight+"px",e.clientWidth+"px"]}function b(t){window.scrollTo({top:t,behavior:"smooth"})}var x=new WeakMap,L=new WeakSet,E=new WeakSet,j=new WeakSet,O=new WeakSet,k=new WeakSet;function S(t,r){r.adjustment||(r.adjustment={});var n=r.adjustment,o=n.top,i=void 0===o?0:o,a=n.left,c=void 0===a?0:a;if(!t)return e(e({},r),{},{left:parseFloat(r.left)-parseFloat(r.width)+parseFloat(r.targetWidth)+"px"});var u={xLeft:parseFloat(r.left)-parseFloat(r.width)+c+"px",xRight:parseFloat(r.left)+parseFloat(r.targetWidth)+c+"px",xCenter:parseFloat(r.left)-parseFloat(r.width)/2+parseFloat(r.targetWidth)/2+c+"px",yTop:parseFloat(r.top)-parseFloat(r.height)+i+"px",yBottom:parseFloat(r.top)+parseFloat(r.targetHeight)+i+"px",yCenter:parseFloat(r.top)-parseFloat(r.height)/2+parseFloat(r.targetHeight)/2+i+"px"};switch(t){case"top":return e(e({},r),{},{top:u.yTop,left:u.xCenter});case"right":return e(e({},r),{},{left:u.xRight,top:u.yCenter});case"bottom":return e(e({},r),{},{top:u.yBottom,left:u.xCenter});case"left":return e(e({},r),{},{left:u.xLeft,top:u.yCenter});case"topLeft":return e(e({},r),{},{left:u.xLeft,top:u.yTop});case"topRight":return e(e({},r),{},{left:u.xRight,top:u.yTop});case"bottomLeft":return e(e({},r),{},{left:u.xLeft,top:u.yBottom});case"bottomRight":return e(e({},r),{},{left:u.xRight,top:u.yBottom})}}function T(t){var r=i(w(t.target),4),n=r[0],o=r[1],a=r[2],c=r[3];f(this,O,B).call(this,n,a);var u=f(this,L,S).call(this,t.placement,e(e({},t),{},{top:n,left:o,targetWidth:c,targetHeight:a}));y(this.showBox,u)}function F(){var t=this;this.resize=function(t){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:250,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=!1;return function(){for(var i=this,a=arguments.length,c=new Array(a),u=0;u<a;u++)c[u]=arguments[u];n&&!o?(t.apply(this,c),o=!0):(e&&clearTimeout(e),e=setTimeout((function(){t.apply(i,c),e=null,o=!1}),r))}}((function(){f(t,E,T).call(t,t.currentStyle)})),window.addEventListener("resize",this.resize)}function B(t,e){b(parseFloat(t)+parseFloat(e)/2-this.innerHeight/2)}function P(){b(0),document.body.removeChild(this.mask),document.body.removeChild(this.showBox),this.mask=null,this.showBox=null,g(),v=null,window.removeEventListener("resize",this.resize)}return d=Symbol.iterator,function(){function t(r){var n,o,i;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),p(this,k),p(this,O),p(this,j),p(this,E),p(this,L),i={writable:!0,value:!1},h(n=this,o=x),o.set(n,i);var a=r.flow,c=r.btns,u=void 0===c?{next:{},end:{}}:c;this.flow=a,this.innerHeight=window.innerHeight,this.mask=y("div",{position:"fixed",top:"0",left:"0",right:"0",bottom:"0",background:"rgba(0,0,0,.5)",zIndex:"99"}),this.showBox=y("div",{position:"absolute",zIndex:"999",backgroundSize:"100% 100%",transition:"all 0.3s ease-in-out"});var l={cursor:"pointer",position:"absolute",display:"fixed",textAlign:"center"};this.nextBtn=y("div",e(e({},u.next),l)),this.nextBtn.innerHTML=u.next.content,this.endBtn=y("div",e(e({},u.end),{},{cursor:"pointer"},l)),this.endBtn.innerHTML=u.end.content}var o,i,a;return o=t,a=[{key:"create",value:function(e){var r=new t(e);return r.insert.bind(r)}}],(i=[{key:"insert",value:function(t,e){if(!function(t,e){return e.get?e.get.call(t):e.value}(n=this,s(n,x,"get"))){var n;l(this,x,!0);var o=r().mark((function n(o){var i,a,c;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:document.body.appendChild(o.mask),document.body.appendChild(o.showBox),f(o,j,F).call(o),o.showBox.appendChild(o.nextBtn),o.showBox.appendChild(o.endBtn),o.nextBtn.onclick=t,o.endBtn.onclick=e,i=u(o.flow),r.prev=8,i.s();case 10:if((a=i.n()).done){r.next=23;break}if((c=a.value).target){r.next=14;break}throw new Error("Target is not passed in");case 14:return o.currentStyle=c,g(),f(o,E,T).call(o,c),y(o.nextBtn,c.next),y(o.endBtn,c.end),void(r.next=21);case 21:r.next=10;break;case 23:r.next=28;break;case 25:r.prev=25,r.t0=r.catch(8),i.e(r.t0);case 28:return r.prev=28,i.f(),r.finish(28);case 31:case"end":return r.stop()}}),n,null,[[8,25,28,31]])}))(this);return o.end=f(this,k,P).bind(this),o}}},{key:d,value:r().mark((function t(){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.delegateYield(this.flow,"t0",1);case 1:case"end":return t.stop()}}),t,this)}))}])&&n(o.prototype,i),a&&n(o,a),Object.defineProperty(o,"prototype",{writable:!1}),t}()}));
SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc