nodality 1.0.119 → 1.0.121

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (161) hide show
  1. package/dist/animator.cjs.js +1 -1
  2. package/dist/animator.esm.js +1 -1
  3. package/dist/audionew.cjs.js +1 -1
  4. package/dist/audionew.esm.js +1 -1
  5. package/dist/beta-desktop-bar.cjs.js +1 -1
  6. package/dist/beta-desktop-bar.esm.js +1 -1
  7. package/dist/beta-mobile-bar.cjs.js +1 -1
  8. package/dist/beta-mobile-bar.esm.js +1 -1
  9. package/dist/bundle.umd.js +1 -1
  10. package/dist/button.cjs.js +1 -1
  11. package/dist/button.esm.js +1 -1
  12. package/dist/center.cjs.js +1 -1
  13. package/dist/center.esm.js +1 -1
  14. package/dist/checkbox.cjs.js +1 -1
  15. package/dist/checkbox.esm.js +1 -1
  16. package/dist/code.cjs.js +1 -1
  17. package/dist/code.esm.js +1 -1
  18. package/dist/container.cjs.js +1 -1
  19. package/dist/container.esm.js +1 -1
  20. package/dist/designer.cjs.js +1 -1
  21. package/dist/designer.esm.js +1 -1
  22. package/dist/dropdown.cjs.js +1 -1
  23. package/dist/dropdown.esm.js +1 -1
  24. package/dist/element-mapper.cjs.js +1 -1
  25. package/dist/element-mapper.esm.js +1 -1
  26. package/dist/finalresult.esm.js +1 -1
  27. package/dist/flex-card.cjs.js +1 -1
  28. package/dist/flex-card.esm.js +1 -1
  29. package/dist/flex-grid.cjs.js +1 -1
  30. package/dist/flex-grid.esm.js +1 -1
  31. package/dist/flex-row.cjs.js +1 -1
  32. package/dist/flex-row.esm.js +1 -1
  33. package/dist/floating-input.cjs.js +1 -1
  34. package/dist/floating-input.esm.js +1 -1
  35. package/dist/free.cjs.js +1 -1
  36. package/dist/free.esm.js +1 -1
  37. package/dist/image-picker.cjs.js +1 -1
  38. package/dist/image-picker.esm.js +1 -1
  39. package/dist/image.cjs.js +1 -1
  40. package/dist/image.esm.js +1 -1
  41. package/dist/index.cjs.js +1 -1
  42. package/dist/index.esm.js +1 -1
  43. package/dist/link-getter.cjs.js +1 -1
  44. package/dist/link-getter.esm.js +1 -1
  45. package/dist/link.cjs.js +1 -1
  46. package/dist/link.esm.js +1 -1
  47. package/dist/multiswitcher.cjs.js +1 -1
  48. package/dist/multiswitcher.esm.js +1 -1
  49. package/dist/new-nav-bar.cjs.js +1 -1
  50. package/dist/new-nav-bar.esm.js +1 -1
  51. package/dist/picker.cjs.js +1 -1
  52. package/dist/picker.esm.js +1 -1
  53. package/dist/side-nav-bar.cjs.js +1 -1
  54. package/dist/side-nav-bar.esm.js +1 -1
  55. package/dist/simple-bar.cjs.js +1 -1
  56. package/dist/simple-bar.esm.js +1 -1
  57. package/dist/slider-2025.cjs.js +1 -1
  58. package/dist/slider-2025.esm.js +1 -1
  59. package/dist/table.cjs.js +1 -1
  60. package/dist/table.esm.js +1 -1
  61. package/dist/text-field.cjs.js +1 -1
  62. package/dist/text-field.esm.js +1 -1
  63. package/dist/text.cjs.js +1 -1
  64. package/dist/text.esm.js +1 -1
  65. package/dist/ulist.cjs.js +1 -1
  66. package/dist/ulist.esm.js +1 -1
  67. package/dist/video.cjs.js +1 -1
  68. package/dist/video.esm.js +1 -1
  69. package/dist/zoom-card.cjs.js +1 -1
  70. package/dist/zoom-card.esm.js +1 -1
  71. package/layout/animator.js +3 -2
  72. package/layout/audio.js +1 -1
  73. package/layout/audionew.js +1 -1
  74. package/layout/base-2.js +1 -1
  75. package/layout/base.js +1 -1
  76. package/layout/beta-desktop-bar.js +1 -1
  77. package/layout/beta-mobile-bar.js +1 -1
  78. package/layout/box.js +1 -1
  79. package/layout/button.js +1 -1
  80. package/layout/cards.js +1 -1
  81. package/layout/center.js +1 -1
  82. package/layout/checkbox.js +1 -1
  83. package/layout/circle.js +1 -1
  84. package/layout/clean-row.js +1 -1
  85. package/layout/code.js +1 -1
  86. package/layout/container.js +1 -1
  87. package/layout/custom.js +1 -1
  88. package/layout/div-image.js +1 -1
  89. package/layout/dropdown-2025.js +1 -1
  90. package/layout/dropdown.js +1 -1
  91. package/layout/empty-element.js +1 -1
  92. package/layout/external-stylesheet.js +1 -1
  93. package/layout/flex-card.js +1 -1
  94. package/layout/flex-grid.js +1 -1
  95. package/layout/flex-row.js +1 -1
  96. package/layout/footer.js +1 -1
  97. package/layout/form-components/custom.js +1 -1
  98. package/layout/form-components/data-list.js +1 -1
  99. package/layout/form-components/floating-input.js +1 -1
  100. package/layout/form-components/form-all.js +1 -1
  101. package/layout/form-components/form.js +1 -1
  102. package/layout/form-components/image-picker.js +1 -1
  103. package/layout/form-components/picker.js +1 -1
  104. package/layout/form-components/radio.js +1 -1
  105. package/layout/form-components/radiogroup.js +1 -1
  106. package/layout/form-components/range.js +1 -1
  107. package/layout/free.js +1 -1
  108. package/layout/grid-new.js +1 -1
  109. package/layout/grid-switcher.js +1 -1
  110. package/layout/grid.js +1 -1
  111. package/layout/group.js +1 -1
  112. package/layout/header.js +1 -1
  113. package/layout/horizontal-scroller.js +1 -1
  114. package/layout/image-old.js +1 -1
  115. package/layout/image.js +1 -1
  116. package/layout/index.js +1 -1
  117. package/layout/label.js +1 -1
  118. package/layout/link.js +1 -1
  119. package/layout/list-OLD.js +1 -1
  120. package/layout/list.js +1 -1
  121. package/layout/meta-adder.js +1 -1
  122. package/layout/modal-2025.js +1 -1
  123. package/layout/modernwrap.js +1 -1
  124. package/layout/multiswitcher.js +1 -1
  125. package/layout/multiswitcherBeta.js +1 -1
  126. package/layout/nav-bar.js +1 -1
  127. package/layout/nav-factor/custom-div.js +1 -1
  128. package/layout/navBar-OLD.js +1 -1
  129. package/layout/new-flat-adder.js +1 -1
  130. package/layout/new-nav-bar.js +1 -1
  131. package/layout/offset-container.js +1 -1
  132. package/layout/polygon.js +1 -1
  133. package/layout/progress.js +1 -1
  134. package/layout/row.js +1 -1
  135. package/layout/saved-new-nav-bar.js +1 -1
  136. package/layout/scroll-video.js +1 -1
  137. package/layout/side-bar.js +1 -1
  138. package/layout/side-nav-bar.js +1 -1
  139. package/layout/simple-bar.js +1 -1
  140. package/layout/slider-2025.js +1 -1
  141. package/layout/spacer.js +1 -1
  142. package/layout/stack.js +1 -1
  143. package/layout/styler.js +1 -1
  144. package/layout/switcher.js +1 -1
  145. package/layout/table.js +1 -1
  146. package/layout/text-field.js +1 -1
  147. package/layout/text.js +3 -2
  148. package/layout/ulist.js +1 -1
  149. package/layout/video.js +1 -1
  150. package/layout/without-new.js +1 -1
  151. package/layout/wrap.js +1 -1
  152. package/layout/zoom-card.js +1 -1
  153. package/lib/card-getter.js +1 -1
  154. package/lib/designer.js +1 -1
  155. package/lib/element-mapper.js +1 -1
  156. package/lib/keyframe-animation.js +1 -1
  157. package/lib/link-getter.js +1 -1
  158. package/lib/scroll-video.js +1 -1
  159. package/lib/stacker.js +1 -1
  160. package/lib/transform-anim.js +1 -1
  161. package/package.json +1 -1
package/dist/code.cjs.js CHANGED
@@ -1 +1 @@
1
- (()=>{"use strict";var e={d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};function r(e){return r="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},r(e)}function n(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=s(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},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,a=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw i}}}}function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,s,i,a=[],l=!0,c=!1;try{if(s=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=s.call(r)).done)&&(a.push(n.value),a.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(c)throw o}}return a}}(e,t)||s(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){if(e){if("string"==typeof e)return i(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(e,t):void 0}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,l(n.key),n)}}function l(e){var t=function(e){if("object"!=r(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==r(t)?t:t+""}function c(e){return c="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},c(e)}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,p(n.key),n)}}function p(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}function d(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(d=function(){return!!e})()}function f(){return f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=h(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},f.apply(null,arguments)}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}function y(e,t){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},y(e,t)}e.r(t),e.d(t,{Code:()=>v});var v=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t,r){return t=h(t),function(e,t){if(t&&("object"==c(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,d()?Reflect.construct(t,r||[],h(e).constructor):t.apply(e,r))}(this,t)).res=document.createElement("code"),e.pre=document.createElement("pre"),e.res.style.background="#18232e",e.res.style.display="block",e.res.style.width="auto",e.res.style.height="auto",e.res.style.borderRadius="1rem",e.pre.appendChild(e.res),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&y(e,t)}(t,e),r=t,n=[{key:"getType",value:function(){return"LayoutWrapperElement"}},{key:"toCode",value:function(){var e=this.options;Object.keys(e).forEach(function(t){return void 0===e[t]&&delete e[t]});var t=JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:").replace(/"([^"]+)"/g,function(e,t){return t.includes("\n")||t.includes("'")||t.includes('"')?"`"+t.replace(/`/g,"\\`")+"`":'"'.concat(t,'"')});return"new Code().set(".concat(t,")")}},{key:"callReact",value:function(e){this.options=e;var r,n,o,s=[];if(e.stroke||e.gradient||e.span||e.backgroundOp||e.layout||e.shadow||e.animation||e.filtera||e.transform){e.gradient&&(this.globalGradient=e.gradient.op.gradient,"radial"===e.gradient.op.direction&&(this.globalGradient="radial-gradient(circle at center, orange, green)")),e.stroke&&(r=t,n=this,"function"==typeof(o=f(h(1&3?r.prototype:r),"setAny",n))?function(e){return o.apply(n,e)}:o)([{globalBlast:"".concat(e.stroke.op.width," ").concat(e.stroke.op.color)}]),e.span&&(e.span.prevText=this.text);var i=[e.stroke,e.gradient,e.animation,e.span,e.backgroundOp,e.layout,e.marginOp,e.shadow,e.animation,e.filtera,e.transform];i=i.filter(function(e){return null!=e});for(var a=0;a<i.length;a++)s.push({range:i[a].range,log:i[a].op.name,target:i[a].target,op:i[a].op});var l=[];e.borderObj&&l.push("border"),e.background&&l.push("background"),e.mar&&l.push("margin"),e.animation&&l.push("animation"),e.span&&l.push("span"),console.log("ARA IS "),console.log(s),this.chainReact(s,e.id,l)}}},{key:"set",value:function(e){return e.code&&(this.pre.children[0].innerHTML=e.code),e.class&&this.pre.children[0].setAttribute("class","".concat(e.class)),e.pad&&this.pad(e.pad),e.mar&&this.mar(e.mar),e.respad&&this.respad(e.respad),e.resmar&&this.resmar(e.resmar),e.resprop&&this.resprop(e.resprop),e.width&&(this.res.style.width=e.width),e.background&&(this.res.style.background=e.background),e.color&&(this.res.style.color=e.color),e.borderRadius&&(this.res.style.background=e.borderRadius),e.borderObj&&(this.res.style.border="".concat(e.borderObj.width," solid ").concat(e.borderObj.color),this.res.style.borderRadius="".concat(e.borderObj.radius)),this.callReact(e),this}},{key:"render",value:function(e){return e&&document.querySelector(e).appendChild(this.pre),this.res}}],n&&u(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(function(){return e=function e(){var t,r,n,o=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=this,n=function(e){if(console.log("LOBJO IS"),console.log("REPO"),console.log(o.res),console.log(e),e.transform||e.op){console.log("SIMPLIFIED"),console.log(e.transform),console.log(e.op);var t=e.op;e.transform||(t=e.op),t.duration||(t.duration="3s-ease-in-out"),console.log("ENTERING"),console.log(t),o.setDefault=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"0px";return 0===e.length?t+" ":e};var r=function(){var r="",n="",s="",i="",a="",l="",c="",u="",p="";if(console.log("ERRA - still nested"),console.log(t),0!==t.values.length){console.warn(t),t.values.forEach(function(e){e.startsWith("tx:")&&(r=e.replace("tx:","")),e.startsWith("ty:")&&(n=e.replace("ty:","")),e.startsWith("tz:")?s=e.replace("tz:",""):e.startsWith("scale(")?i=e:e.startsWith("skew(")?a=e:e.startsWith("rotate(")?l=function(e){var t=e.match(/rotate\(([^)]+)\)/);if(!t)return e;var r=t[1].split(",").map(function(e){return e.trim()});return 1===r.length?"rotate(".concat(r[0],")"):2===r.length?"rotateX(".concat(r[0],") rotateY(").concat(r[1],")"):3===r.length?"rotateX(".concat(r[0],") rotateY(").concat(r[1],") rotate(").concat(r[2],")"):e}(e):e.startsWith("perspective(")?c=e:e.startsWith("matrix(")?u=e:e.startsWith("opacity:")&&(p=e.replace("opacity:",""))}),r=o.setDefault(r),n=o.setDefault(n),s=o.setDefault(s);var d="";if("0px"!=n&&"0px"!=r&&"0px"!=s?d+="translate3d(".concat(r,", ").concat(n,", ").concat(s,")"):"0px"==n&&"0px"==r||(d+="translate(".concat(r,", ").concat(n,")")),i&&(d+=" ".concat(i)),l&&(d+=" ".concat(l)),a&&(d+=" ".concat(a)),c&&(d+=" ".concat(c)),u&&(d+=" ".concat(u)),d){if(e.op.duration){var f=e.op.duration.replace(/^(\d+)(s)-/,function(e,t,r){return t/2+r+" "}),h="transform ".concat(f,", opacity ").concat(f);o.res.style.transition=h}else o.res.style.transition="transform 3s ease-in-out, opacity 3s ease-in-out";e.op.static&&(o.res.style.transition=""),(o.blastTarget||o.res).style.transform=d,o.res.style.opacity=p}else alert("OPE")}};t.on?o.res.addEventListener(t.on,function(){t.delay?setTimeout(function(){r()},t.delay):r()}):window.addEventListener("load",function(){t.delay?setTimeout(function(){r()},t.delay):r()});var n=function(){var e="";console.log("RESET"),console.log(t),t.values.forEach(function(t){t.startsWith("tx:")?e+="translateX(0) ":t.startsWith("ty:")?e+="translateY(0) ":t.startsWith("tz:")?e+="translateZ(0) ":t.startsWith("scale(")?e+="scale(1) ":t.startsWith("skew(")?e+="skew(0, 0) ":t.startsWith("rotate(")?e+="rotate(0) ":t.startsWith("perspective(")?e+="perspective(0) ":t.startsWith("matrix(")&&(e+="matrix(1, 0, 0, 1, 0, 0) "),o.res.style.opacity="1"}),e&&(o.res.style.transform=e.trim())};if(t.on)o.res.addEventListener("mouseout",function(){t.keep||n()});else{var s=1e3*parseFloat(t.duration),i=t.closeAfter?t.closeAfter:0;setTimeout(function(){t.keep||n()},s/2+i)}t.hardCSS&&(o.res.style.transform=t.hardCSS)}else alert("THIS FIRE WITH GRADIENT (invalid block"),console.log("INVALID BLOCKA"),console.log(e)},(r=l(r="reactOnTransform"))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,this.state={isExpanded:!1,isMovedUp:!1,isMovedDown:!1},this.openedElements=new WeakMap},t=[{key:"isHidden",value:function(e){e&&(this.res.style.display="none")}},{key:"keySet",value:function(e){return this.temporaryVal=1,this.res.style[e.key]=e.value,this}},{key:"commonMethods",value:function(e){var t={exact:"fontSize",zIndex:"zIndex",position:"position",top:"top",cursor:"cursor",width:"width",maxWidth:"maxWidth",height:"height",maxHeight:"maxHeight",radius:"borderRadius",lineHeight:"lineHeight",background:"background",font:"fontFamily",opacity:"opacity"};for(var r in t)null!=e[r]&&(this.res.style[t[r]]=e[r]);return e.pad&&this.pad(e.pad),e.mar&&this.mar(e.mar),e.respad&&this.respad(e.respad),e.resmar&&this.resmar(e.resmar),e.hover&&this.hover(e.hover),e.size&&this.fluidCopy(e.size),e.resprop&&this.resprop(e.resprop,e),e.keySet&&this.keySet(e.keySet),e.hide&&this.isHidden(e.hide),e.transform&&this.reactOnTransform(e.transform),void 0!==e.opacity&&(this.res.style.opacity=e.opacity),e.bold?this.res.style.fontWeight="bold":null!=e.weight&&(this.res.style.fontWeight=e.weight),this}},{key:"hover",value:function(e){var t=this;if(e.border){var r=e.border.width;this.res.style.border=r?"".concat(r,"px solid transparent"):"1px solid transparent"}var n=this.options.borderObj;return n&&(this.res.style.border="".concat(n.width,"px solid ").concat(n.color)),this.prevColor=this.res.style.backgroundColor,this.foreColor=this.res.style.color,this.prevBorder=this.res.style.border,e.animation&&(this.res.style.transition="".concat(e.animation),this.res.style.transionProperty="background, color"),this.res.onmouseout=function(){t.res.style.backgroundColor="".concat(t.prevColor),t.res.style.color="".concat(t.foreColor),t.res.style.border=t.prevBorder},this.res.onmouseover=function(){if(t.res.style.color=e.color,t.res.style.backgroundColor=e.background,e.border){var r,n=e.border.width,o=null!==(r=e.border.color)&&void 0!==r?r:"#2ECC71";t.res.style.border=n?"".concat(n,"px solid ").concat(o):"1px solid #2ECC71"}},this}},{key:"onScroll",value:function(e){var t=this;"opacity"===e.value?this.res.style.opacity=e.valMin:"scale"===e.value&&(this.res.style.transform="scale(".concat(e.valMax,")")),window.addEventListener("scroll",function(){var r=t.smartRange(window.scrollY,{min:e.from,max:e.to},{min:e.valMin,max:e.valMax});"opacity"===e.value?t.res.style.opacity=r:"scale"===e.value&&(t.res.style.transform="scale(".concat(r,")"))})}},{key:"setAny",value:function(e){this[Object.keys(e)[0]]=[Object.values(e)[0]]}},{key:"setID",value:function(e){this.id=e}},{key:"setPrevText",value:function(e){this.prevText=e}},{key:"getCSS",value:function(){return this.css}},{key:"getPX",value:function(e){return{xs:"0px",sm:"576px",md:"768px",lg:"992px",xl:"1200px",xxl:"1400px",mxxl:"1800px"}[e]||"Invalid breakpoint"}},{key:"_setupResponsiveManager",value:function(){var e=this;this._responsiveTasks=this._responsiveTasks||[];var t=function(){e._responsiveTasks.forEach(function(e){e()})};this._responsiveHandler||(this._responsiveHandler=t,window.addEventListener("resize",t)),setTimeout(function(){t()},0)}},{key:"resprop",value:function(e,t){var r=this;alert(t),this.options=t;var n={default:[0,1e5],xs:[0,575],sm:[576,767],md:[768,991],lg:[992,1199],xl:[1200,1399],xxl:[1400,1e5]},s=["resprop","breakpoint","value","values","range"];e.forEach(function(e){void 0!==n[e.breakpoint]?e.range=n[e.breakpoint]:Array.isArray(e.breakpoint)&&2===e.breakpoint.length?e.range=[parseInt(e.breakpoint[0],10),parseInt(e.breakpoint[1],10)]:e.range=[0,parseInt(e.breakpoint,10)]}),e.sort(function(e,t){return e.range[1]-t.range[1]});var i=e.find(function(e){return"default"===e.breakpoint});for(var a in i||(i={breakpoint:"default",range:n.default},e.unshift(i)),this.prevStyles={},this.res.style)this.res.style.hasOwnProperty(a)&&isNaN(parseInt(a))&&(this.prevStyles[a]=this.res.style[a]);var l=new Set;e.forEach(function(e){Object.keys(e).forEach(function(e){s.includes(e)||"range"===e||l.add(e)})}),l.forEach(function(e){void 0===i[e]&&(i[e]=r.options[e]||"initial")}),this._responsiveTasks=this._responsiveTasks||[],this._responsiveTasks.push(function(){for(var t=window.innerWidth,n=i,a=0;a<e.length;a++){var c=e[a],u=o(c.range,2),p=u[0],d=u[1];if("default"!==c.breakpoint&&t>=p&&t<=d){n=c;break}}for(var f in l.forEach(function(e){if("keySet"===e){var t=i[e];t&&t.key&&(r.res.style[t.key]=t.value)}else r.res.style[e]=i[e]}),n)if("exact"===f&&(console.log("APPL"),console.log(n),console.log(r.set),r.set(n)),!s.includes(f)&&"range"!==f){var h=n[f];"keySet"===f&&h&&h.key?r.res.style[h.key]=h.value:"function"==typeof r[f]?r[f](h):r.res.style[f]=h}}),this._setupResponsiveManager()}},{key:"respad",value:function(e){var t=this,r={default:[0,1e5],xs:[0,575],sm:[576,767],md:[768,991],lg:[992,1199],xl:[1200,1399],xxl:[1400,1e5]};e.forEach(function(e){void 0!==r[e.breakpoint]?e.range=r[e.breakpoint]:Array.isArray(e.breakpoint)&&2===e.breakpoint.length?e.range=[parseInt(e.breakpoint[0],10),parseInt(e.breakpoint[1],10)]:e.range=[parseInt(e.breakpoint,10),1e5]}),e.sort(function(e,t){return e.range[0]-t.range[0]});var n=e.find(function(e){return"default"===e.breakpoint});n||(n={breakpoint:"default",range:r.default},e.unshift(n)),void 0===n.values&&(n.values=this.options.pad||null),this._responsiveTasks=this._responsiveTasks||[],this._responsiveTasks.push(function(){for(var r=window.innerWidth,s=n,i=0;i<e.length;i++){var a=e[i],l=o(a.range,2),c=l[0],u=l[1];if("default"!==a.breakpoint&&r>=c&&r<=u){s=a;break}}var p=void 0!==s.values?s.values:n.values;null!=p&&t.pad(p)}),this._setupResponsiveManager()}},{key:"_applyResponsive",value:function(e,t){var r={default:[0,1e5],xs:[0,575],sm:[576,767],md:[768,991],lg:[992,1199],xl:[1200,1399],xxl:[1400,1e5]};e.forEach(function(e){if(void 0!==r[e.breakpoint])e.range=r[e.breakpoint];else{var t=parseInt(e.breakpoint,10);e.range=[t,1e5]}}),e.sort(function(e,t){return e.range[0]-t.range[0]});var n=e.find(function(e){return"default"===e.breakpoint})||{breakpoint:"default",range:r.default},s=function(){for(var r=window.innerWidth,s=n,i=0;i<e.length;i++){var a=e[i],l=o(a.range,2),c=l[0],u=l[1];if("default"!==a.breakpoint&&r>=c&&r<=u){s=a;break}}t(s)};this._responsiveHandler&&window.removeEventListener("resize",this._responsiveHandler),this._responsiveHandler=s,window.addEventListener("resize",s),setTimeout(function(){s()},0)}},{key:"resmar",value:function(e){var t=this,r={default:[0,1e5],xs:[0,575],sm:[576,767],md:[768,991],lg:[992,1199],xl:[1200,1399],xxl:[1400,1e5]};e.forEach(function(e){void 0!==r[e.breakpoint]?e.range=r[e.breakpoint]:Array.isArray(e.breakpoint)&&2===e.breakpoint.length?e.range=[parseInt(e.breakpoint[0],10),parseInt(e.breakpoint[1],10)]:e.range=[parseInt(e.breakpoint,10),1e5]}),e.sort(function(e,t){return e.range[0]-t.range[0]});var n=e.find(function(e){return"default"===e.breakpoint});n||(n={breakpoint:"default",range:r.default},e.unshift(n)),void 0===n.values&&(n.values=this.options.pad||null),this._responsiveTasks=this._responsiveTasks||[],this._responsiveTasks.push(function(){for(var r=window.innerWidth,s=n,i=0;i<e.length;i++){var a=e[i],l=o(a.range,2),c=l[0],u=l[1];if("default"!==a.breakpoint&&r>=c&&r<=u){s=a;break}}var p=void 0!==s.values?s.values:n.values;null!=p&&t.mar(p)}),this._setupResponsiveManager()}},{key:"isNumber",value:function(e){return"number"==typeof e&&!isNaN(e)}},{key:"pad",value:function(e){for(var t=0;t<e.length;t++)for(var r=Object.keys(e[t]),n=0;n<r.length;n++)for(var o=r[n],s=e[t][o],i=0;i<o.length;i++)switch(o[i]){case"a":this.res.style.padding=this.isNumber(s)?"".concat(s,"px"):s;break;case"t":this.res.style.paddingTop=this.isNumber(s)?"".concat(s,"px"):s;break;case"l":this.res.style.paddingLeft=this.isNumber(s)?"".concat(s,"px"):s;break;case"r":this.res.style.paddingRight=this.isNumber(s)?"".concat(s,"px"):s;break;case"b":this.res.style.paddingBottom=this.isNumber(s)?"".concat(s,"px"):s}return this}},{key:"as",value:function(e){return this.res.style.alignSelf=e,this}},{key:"mar",value:function(e){for(var t=0;t<e.length;t++)for(var r=Object.keys(e[t]),n=0;n<r.length;n++)for(var o=r[n],s=e[t][o],i=0;i<o.length;i++){switch(o[i]){case"a":this.res.style.margin=this.isNumber(s)?"".concat(s,"px"):s;break;case"t":this.res.style.marginTop=this.isNumber(s)?"".concat(s,"px"):s;break;case"l":this.res.style.marginLeft=this.isNumber(s)?"".concat(s,"px"):s;break;case"r":this.res.style.marginRight=this.isNumber(s)?"".concat(s,"px"):s;break;case"b":this.res.style.marginBottom=this.isNumber(s)?"".concat(s,"px"):s}"auto"===o[i]&&(this.res.style.marginLeft="auto",this.res.style.marginRight="auto")}return this}},{key:"smartRange",value:function(e,t,r){e<t.min&&(e=t.min),e>t.max&&(e=t.max);var n=(e-t.min)/(t.max-t.min);t.min>t.max&&(n=(e-t.max)/(t.min-t.max));var o=(r.min-r.max)*n-r.min;if(o=Math.abs(o),r.min<r.max){var s=(r.max+Math.abs(r.min))*n;o=r.min+s}return o}},{key:"gpos",value:function(e){return this.res.style.gridColumn=e.col,this.res.style.gridRow=e.row,this}},{key:"fluidCopy",value:function(e){if(e instanceof Object){this.prevStylex=this.res.style,this.res=document.createElement("h1"),this.res.style.cssText=this.prevStylex.cssText;var t=document.createTextNode(this.text);return this.res.appendChild(t),this.res.style.fontSize=e.exact,this}if("S1"===e){this.prevStylex=this.res.style,this.res=document.createElement("h1"),this.res.style.cssText=this.prevStylex.cssText;var r=document.createTextNode(this.text);this.res.appendChild(r),this.res.style.fontSize="calc(1.625rem + 5.075vw)"}if("S2"===e){this.prevStylex=this.res.style,this.res=document.createElement("h2"),this.res.style.cssText=this.prevStylex.cssText;var n=document.createTextNode(this.text);this.res.appendChild(n),this.res.style.fontSize="calc(1.500rem + 4.3vw)"}if("S3"===e){this.prevStylex=this.res.style,this.res=document.createElement("h3"),this.res.style.cssText=this.prevStylex.cssText;var o=document.createTextNode(this.text);this.res.appendChild(o),this.res.style.fontSize="calc(1.375rem + 3.525vw)"}if("S4"===e){this.prevStylex=this.res.style,this.res=document.createElement("h4"),this.res.style.cssText=this.prevStylex.cssText;var s=document.createTextNode(this.text);this.res.appendChild(s),this.res.style.fontSize="calc(1.250rem + 2.75vw)"}if("S5"===e){this.prevStylex=this.res.style,this.res=document.createElement("h5"),this.res.style.cssText=this.prevStylex.cssText;var i=document.createTextNode(this.text);this.res.appendChild(i),this.res.style.fontSize="calc(1.125rem + 1.975vw)"}return"S6"===e&&(this.res.style.fontSize="calc(1rem + 0.5vw)"),this}},{key:"setIndex",value:function(e){this.index=e}},{key:"borderObj",value:function(e){var t,r=null!==(t=e.type)&&void 0!==t?t:"solid";return this.res.style.border="".concat(e.width," ").concat(r," ").concat(e.color),this.res.style.borderRadius=e.radius,this}},{key:"setPref",value:function(e){this.preffersId=e}},{key:"setClass",value:function(e){this.class=e}},{key:"setTags",value:function(e){this.openTag=e.open,this.closeTag=e.close,console.log("TAGS SET"),console.log(e)}},{key:"chainReact",value:function(e,t,r){var s=this;console.log("0P"),this.ap=!1,this.cta=0,this.once=!1;var i,a=n(e);try{for(a.s();!(i=a.n()).done;){var l=i.value;l.range||(l.range=["0px","999999px"])}}catch(e){a.e(e)}finally{a.f()}e.sort(function(e,t){return parseInt(e.range[0])-parseInt(t.range[0])});var c=function(i){var a=window.visualViewport.width,l=[],c=[];s.resCopy=s.res,s.storedQueries=e.map(function(e){return e.target}).filter(function(e){return null!=e});var u,p=n(e);try{for(p.s();!(u=p.n()).done;){var d=u.value;s.counterIndex++;var f=o(d.range,2),h=f[0],y=f[1],v=parseInt(h),m=parseInt(y),g=!0;if(d.target){g=!1;for(var b=0;b<d.target.length;b++)d.target[b]===t&&(g=!0)}a>=v&&a<=m&&g&&(l.push(d.log),c.push(d),d.op&&d.op.margin&&(s.useMargin=d.op.margin))}}catch(e){p.e(e)}finally{p.f()}if(r&&!r.includes("background")&&(s.res.style.background="",s.res.style.backgroundColor=""),s.res.style.textShadow="",r&&!r.includes("border")&&(s.res.style.border=""),r&&!r.includes("margin")&&(s.res.style.margin=""),s.res.style["-webkit-text-fill-color"]="",s.res.style["-webkit-text-stroke-color"]="",s.res.style["-webkit-text-stroke-width"]="",s.res.style.filter="",s.options.background&&(console.log(s.options.background),s.res.style.background=s.options.background),l.includes("gradient"),(l.includes("gradient")||l.includes("shadow"))&&(s.res.style.position="relative"),l.includes("blast")){var k,x=c.filter(function(e){return"blast"===e.log})[0].op.color,w=null!==(k=c.filter(function(e){return"blast"===e.log})[0].op.width)&&void 0!==k?k:"1px";"FlexRowLayoutElement"===s.getType()||"LayoutWrapperElement"===s.getType()?(s.res.style.border="".concat("number"==typeof w?w+"px":w," solid orange"),s.res.style.display="inline-block","FlexRowLayoutElement"===s.getType()&&(s.res.style.display="flex"),s.res.style.boxSizing="border-box",s.res.style.transformOrigin="center",s.blastTarget=s.res):(s.text,s.res.style["-webkit-text-fill-color"]="transparent",s.res.style["-webkit-text-stroke-color"]=x,s.res.style["-webkit-text-stroke-width"]="".concat(w))}if(l.includes("filter")){var T=c.filter(function(e){return"filter"===e.log})[0].op.filter;s.res.style.filter=T}if(l.includes("background")&&(s.res.style.backgroundColor="green"),l.includes("gradient")&&("LayoutWrapperElement"!==s.getType()&&"FlexRowLayoutElement"!==s.getType()&&(s.res.style["-webkit-text-fill-color"]="transparent"),s.res.style.background=s.globalGradient,"LayoutWrapperElement"!==s.getType()&&"FlexRowLayoutElement"!==s.getType()&&(s.res.style["background-clip"]="text")),l.includes("shadow")){var S,E,O,C,j=s.options.shadow.op;console.log("OP IS",j);var I=null!==(S=j.steps)&&void 0!==S?S:1,R=null!==(E=j.colors)&&void 0!==E?E:["gray"],A=null!==(O=j.movements)&&void 0!==O?O:["3px","3px"],W=null!==(C=j.radius)&&void 0!==C?C:"3px";if(1===A.length&&(A=[A[0],A[0]]),"FlexRowLayoutElement"===s.getType()||"LayoutWrapperElement"===s.getType()){for(var L=[],P=0;P<I;P++){var _,N=null!==(_=R[P])&&void 0!==_?_:R[0],M=A[0],z=A[1];L.push("".concat(M," ").concat(z," ").concat(W," ").concat(N))}s.res.style.boxShadow=L.join(", ")}else{for(var H=[],F=0;F<I;F++){var B,D=null!==(B=R[F])&&void 0!==B?B:R[0],G=A[0],Y=A[1];H.push("drop-shadow(".concat(G," ").concat(Y," ").concat(W," ").concat(D,")"))}s.res.style.filter=H.join(" ")}}if(l.includes("margin"))for(b=0;b<e.length;b++)if(e[b].op){var X=e[b].op.offsets;X&&void 0!==s.index&&(s.res.style.margin=X[Number(s.index)]+"px")}if(l.includes("spana")||l.includes("span")){var V=document.createElement("div");if(V.setAttribute("id","oroa"),Object.assign(V.style,{position:"absolute",inset:"0",background:"linear-gradient(90deg, rgb(52,152,219), rgb(26,188,156))",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",pointerEvents:"none"}),s.res&&s.res.querySelector("span"))return;s.res=s.resCopy,s.res.textContent="",s.options.span&&(Array.isArray(s.options.span)?s.options.span:[s.options.span]).forEach(function(e){if(e.op&&"span"===e.op.name&&Array.isArray(e.op.parts)){var t=0,r=s.prevText||"";if(e.op.parts.forEach(function(e){var n=e.text,o=e.style||{};if(t<r.length){var i=r.indexOf(n,t);if(i>t){var a=r.substring(t,i);s.res.appendChild(new s.constructor(a).setup({type:"span",id:o.id,animation:o.animation}).set({}).render())}t=i+n.length}var l=new s.constructor(n).setup({type:"span",id:o.id,animation:o.animation}).set(o).render();s.res.appendChild(l)}),t<r.length){var n=r.substring(t);s.res.appendChild(new s.constructor(n).setup({type:"span"}).set({}).render())}}})}else{var $=new s.constructor(s.prevText).set({}).render();s.prevText&&s.prevText.length>0&&i&&s.res.appendChild($)}if(l.includes("animation")){if(s.options.animation&&!s.hasAnimated&&!s.options.animation.op.fireAt){console.warn(s.openTag),s.hasAnimated=!0;var q=s.options.animation.op;window.addEventListener("sidebar:open",function(){s.res.animate(q.keyframesOpen,q.openOptions)}),window.addEventListener("sidebar:closed",function(){s.res.animate(q.keyframesClose,q.closeOptions)}),s.res.animate(q.keyframesClose,{duration:0,fill:"forwards"}),s.openTag&&s.closeTag&&(window.addEventListener(s.openTag,function(){s.res.animate(q.keyframesOpen,q.openOptions)}),window.addEventListener(s.closeTag,function(){s.res.animate(q.keyframesClose,q.closeOptions)}))}if(s.options.animation&&s.options.animation.op.fireAt&&s.options.animation.op.fireAt.endsWith("px")){var J=s.options.animation.op;s.res.animate(J.keyframesClose,{duration:0,fill:"forwards"});var Q=function(){window.scrollY>parseFloat(J.fireAt)&&(s.res.animate(J.keyframesOpen,J.openOptions),window.removeEventListener("scroll",Q))};window.addEventListener("scroll",Q)}if(s.options.animation&&"inview"===s.options.animation.op.fireAt){var U=s.options.animation.op;s.res.animate(U.keyframesClose,{duration:0,fill:"forwards"});var K=!1;new IntersectionObserver(function(e,t){e.forEach(function(e){e.isIntersecting&&!K&&(K=!0,s.res.animate(U.keyframesOpen,U.openOptions),t.disconnect())})}).observe(s.res)}}};this.options.animation||window.addEventListener("resize",function(){return c()}),c()}},{key:"maxWidth",value:function(e){return this.res.style.maxWidth=e,this}},{key:"removeQuotesFromFirstWord",value:function(e){return e.replace(/"([^"]+)":/g,"$1:")}},{key:"arrayMargin",value:function(e,t){return e.includes("left")&&(this.res.style.marginLeft=t),e.includes("right")&&(this.res.style.marginRight=t),e.includes("top")&&(this.res.style.marginTop=t),e.includes("bottom")&&(this.res.style.marginBottom=t),e.includes("all")&&(this.res.style.margin=t),t||(this.res.style.marginBottom=e),this}}],t&&a(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}());module.exports=t})();
1
+ (()=>{"use strict";var e={d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};function r(e){return r="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},r(e)}function n(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=s(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},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,a=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw i}}}}function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,s,i,a=[],l=!0,c=!1;try{if(s=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=s.call(r)).done)&&(a.push(n.value),a.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(c)throw o}}return a}}(e,t)||s(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){if(e){if("string"==typeof e)return i(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(e,t):void 0}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,l(n.key),n)}}function l(e){var t=function(e){if("object"!=r(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==r(t)?t:t+""}function c(e){return c="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},c(e)}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,p(n.key),n)}}function p(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}function d(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(d=function(){return!!e})()}function f(){return f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=h(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},f.apply(null,arguments)}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}function y(e,t){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},y(e,t)}e.r(t),e.d(t,{Code:()=>v});var v=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t,r){return t=h(t),function(e,t){if(t&&("object"==c(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,d()?Reflect.construct(t,r||[],h(e).constructor):t.apply(e,r))}(this,t)).res=document.createElement("code"),e.pre=document.createElement("pre"),e.res.style.background="#18232e",e.res.style.display="block",e.res.style.width="auto",e.res.style.height="auto",e.res.style.borderRadius="1rem",e.pre.appendChild(e.res),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&y(e,t)}(t,e),r=t,n=[{key:"getType",value:function(){return"LayoutWrapperElement"}},{key:"toCode",value:function(){var e=this.options;Object.keys(e).forEach(function(t){return void 0===e[t]&&delete e[t]});var t=JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:").replace(/"([^"]+)"/g,function(e,t){return t.includes("\n")||t.includes("'")||t.includes('"')?"`"+t.replace(/`/g,"\\`")+"`":'"'.concat(t,'"')});return"new Code().set(".concat(t,")")}},{key:"callReact",value:function(e){this.options=e;var r,n,o,s=[];if(e.stroke||e.gradient||e.span||e.backgroundOp||e.layout||e.shadow||e.animation||e.filtera||e.transform){e.gradient&&(this.globalGradient=e.gradient.op.gradient,"radial"===e.gradient.op.direction&&(this.globalGradient="radial-gradient(circle at center, orange, green)")),e.stroke&&(r=t,n=this,"function"==typeof(o=f(h(1&3?r.prototype:r),"setAny",n))?function(e){return o.apply(n,e)}:o)([{globalBlast:"".concat(e.stroke.op.width," ").concat(e.stroke.op.color)}]),e.span&&(e.span.prevText=this.text);var i=[e.stroke,e.gradient,e.animation,e.span,e.backgroundOp,e.layout,e.marginOp,e.shadow,e.animation,e.filtera,e.transform];i=i.filter(function(e){return null!=e});for(var a=0;a<i.length;a++)s.push({range:i[a].range,log:i[a].op.name,target:i[a].target,op:i[a].op});var l=[];e.borderObj&&l.push("border"),e.background&&l.push("background"),e.mar&&l.push("margin"),e.animation&&l.push("animation"),e.span&&l.push("span"),console.log("ARA IS "),console.log(s),this.chainReact(s,e.id,l)}}},{key:"set",value:function(e){return e.code&&(this.pre.children[0].innerHTML=e.code),e.class&&this.pre.children[0].setAttribute("class","".concat(e.class)),e.pad&&this.pad(e.pad),e.mar&&this.mar(e.mar),e.respad&&this.respad(e.respad),e.resmar&&this.resmar(e.resmar),e.resprop&&this.resprop(e.resprop),e.width&&(this.res.style.width=e.width),e.background&&(this.res.style.background=e.background),e.color&&(this.res.style.color=e.color),e.borderRadius&&(this.res.style.background=e.borderRadius),e.borderObj&&(this.res.style.border="".concat(e.borderObj.width," solid ").concat(e.borderObj.color),this.res.style.borderRadius="".concat(e.borderObj.radius)),this.callReact(e),this}},{key:"render",value:function(e){return e&&document.querySelector(e).appendChild(this.pre),this.res}}],n&&u(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(function(){return e=function e(){var t,r,n,o=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=this,n=function(e){if(console.log("LOBJO IS"),console.log("REPO"),console.log(o.res),console.log(e),e.transform||e.op){console.log("SIMPLIFIED"),console.log(e.transform),console.log(e.op);var t=e.op;e.transform||(t=e.op),t.duration||(t.duration="3s-ease-in-out"),console.log("ENTERING"),console.log(t),o.setDefault=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"0px";return 0===e.length?t+" ":e};var r=function(){var r="",n="",s="",i="",a="",l="",c="",u="",p="";if(console.log("ERRA - still nested"),console.log(t),0!==t.values.length){console.warn(t),t.values.forEach(function(e){e.startsWith("tx:")&&(r=e.replace("tx:","")),e.startsWith("ty:")&&(n=e.replace("ty:","")),e.startsWith("tz:")?s=e.replace("tz:",""):e.startsWith("scale(")?i=e:e.startsWith("skew(")?a=e:e.startsWith("rotate(")?l=function(e){var t=e.match(/rotate\(([^)]+)\)/);if(!t)return e;var r=t[1].split(",").map(function(e){return e.trim()});return 1===r.length?"rotate(".concat(r[0],")"):2===r.length?"rotateX(".concat(r[0],") rotateY(").concat(r[1],")"):3===r.length?"rotateX(".concat(r[0],") rotateY(").concat(r[1],") rotate(").concat(r[2],")"):e}(e):e.startsWith("perspective(")?c=e:e.startsWith("matrix(")?u=e:e.startsWith("opacity:")&&(p=e.replace("opacity:",""))}),r=o.setDefault(r),n=o.setDefault(n),s=o.setDefault(s);var d="";if("0px"!=n&&"0px"!=r&&"0px"!=s?d+="translate3d(".concat(r,", ").concat(n,", ").concat(s,")"):"0px"==n&&"0px"==r||(d+="translate(".concat(r,", ").concat(n,")")),i&&(d+=" ".concat(i)),l&&(d+=" ".concat(l)),a&&(d+=" ".concat(a)),c&&(d+=" ".concat(c)),u&&(d+=" ".concat(u)),d){if(e.op.duration){var f=e.op.duration.replace(/^(\d+)(s)-/,function(e,t,r){return t/2+r+" "}),h="transform ".concat(f,", opacity ").concat(f);o.res.style.transition=h}else o.res.style.transition="transform 3s ease-in-out, opacity 3s ease-in-out";e.op.static&&(o.res.style.transition=""),(o.blastTarget||o.res).style.transform=d,o.res.style.opacity=p}else alert("OPE")}};t.on?o.res.addEventListener(t.on,function(){t.delay?setTimeout(function(){r()},t.delay):r()}):window.addEventListener("load",function(){t.delay?setTimeout(function(){r()},t.delay):r()});var n=function(){var e="";console.log("RESET"),console.log(t),t.values.forEach(function(t){t.startsWith("tx:")?e+="translateX(0) ":t.startsWith("ty:")?e+="translateY(0) ":t.startsWith("tz:")?e+="translateZ(0) ":t.startsWith("scale(")?e+="scale(1) ":t.startsWith("skew(")?e+="skew(0, 0) ":t.startsWith("rotate(")?e+="rotate(0) ":t.startsWith("perspective(")?e+="perspective(0) ":t.startsWith("matrix(")&&(e+="matrix(1, 0, 0, 1, 0, 0) "),o.res.style.opacity="1"}),e&&(o.res.style.transform=e.trim())};if(t.on)o.res.addEventListener("mouseout",function(){t.keep||n()});else{var s=1e3*parseFloat(t.duration),i=t.closeAfter?t.closeAfter:0;setTimeout(function(){t.keep||n()},s/2+i)}t.hardCSS&&(o.res.style.transform=t.hardCSS)}else alert("THIS FIRE WITH GRADIENT (invalid block"),console.log("INVALID BLOCKA"),console.log(e)},(r=l(r="reactOnTransform"))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,this.state={isExpanded:!1,isMovedUp:!1,isMovedDown:!1},this.openedElements=new WeakMap},t=[{key:"isHidden",value:function(e){e&&(this.res.style.display="none")}},{key:"keySet",value:function(e){return this.temporaryVal=1,this.res.style[e.key]=e.value,this}},{key:"commonMethods",value:function(e){var t={exact:"fontSize",zIndex:"zIndex",position:"position",top:"top",cursor:"cursor",width:"width",maxWidth:"maxWidth",height:"height",maxHeight:"maxHeight",radius:"borderRadius",lineHeight:"lineHeight",background:"background",font:"fontFamily",opacity:"opacity"};for(var r in t)null!=e[r]&&(this.res.style[t[r]]=e[r]);return e.pad&&this.pad(e.pad),e.mar&&this.mar(e.mar),e.respad&&this.respad(e.respad),e.resmar&&this.resmar(e.resmar),e.hover&&this.hover(e.hover),e.size&&this.fluidCopy(e.size),e.resprop&&this.resprop(e.resprop,e),e.keySet&&this.keySet(e.keySet),e.hide&&this.isHidden(e.hide),e.transform&&this.reactOnTransform(e.transform),void 0!==e.opacity&&(this.res.style.opacity=e.opacity),e.bold?this.res.style.fontWeight="bold":null!=e.weight&&(this.res.style.fontWeight=e.weight),this}},{key:"hover",value:function(e){var t=this;if(e.border){var r=e.border.width;this.res.style.border=r?"".concat(r,"px solid transparent"):"1px solid transparent"}var n=this.options.borderObj;return n&&(this.res.style.border="".concat(n.width,"px solid ").concat(n.color)),this.prevColor=this.res.style.backgroundColor,this.foreColor=this.res.style.color,this.prevBorder=this.res.style.border,e.animation&&(this.res.style.transition="".concat(e.animation),this.res.style.transionProperty="background, color"),this.res.onmouseout=function(){t.res.style.backgroundColor="".concat(t.prevColor),t.res.style.color="".concat(t.foreColor),t.res.style.border=t.prevBorder},this.res.onmouseover=function(){if(t.res.style.color=e.color,t.res.style.backgroundColor=e.background,e.border){var r,n=e.border.width,o=null!==(r=e.border.color)&&void 0!==r?r:"#2ECC71";t.res.style.border=n?"".concat(n,"px solid ").concat(o):"1px solid #2ECC71"}},this}},{key:"onScroll",value:function(e){var t=this;"opacity"===e.value?this.res.style.opacity=e.valMin:"scale"===e.value&&(this.res.style.transform="scale(".concat(e.valMax,")")),window.addEventListener("scroll",function(){var r=t.smartRange(window.scrollY,{min:e.from,max:e.to},{min:e.valMin,max:e.valMax});"opacity"===e.value?t.res.style.opacity=r:"scale"===e.value&&(t.res.style.transform="scale(".concat(r,")"))})}},{key:"setAny",value:function(e){this[Object.keys(e)[0]]=[Object.values(e)[0]]}},{key:"setID",value:function(e){this.id=e}},{key:"setPrevText",value:function(e){this.prevText=e}},{key:"getCSS",value:function(){return this.css}},{key:"getPX",value:function(e){return{xs:"0px",sm:"576px",md:"768px",lg:"992px",xl:"1200px",xxl:"1400px",mxxl:"1800px"}[e]||"Invalid breakpoint"}},{key:"_setupResponsiveManager",value:function(){var e=this;this._responsiveTasks=this._responsiveTasks||[];var t=function(){e._responsiveTasks.forEach(function(e){e()})};this._responsiveHandler||(this._responsiveHandler=t,window.addEventListener("resize",t)),setTimeout(function(){t()},0)}},{key:"resprop",value:function(e,t){var r=this;this.options=t;var n={default:[0,1e5],xs:[0,575],sm:[576,767],md:[768,991],lg:[992,1199],xl:[1200,1399],xxl:[1400,1e5]},s=["resprop","breakpoint","value","values","range"];e.forEach(function(e){void 0!==n[e.breakpoint]?e.range=n[e.breakpoint]:Array.isArray(e.breakpoint)&&2===e.breakpoint.length?e.range=[parseInt(e.breakpoint[0],10),parseInt(e.breakpoint[1],10)]:e.range=[0,parseInt(e.breakpoint,10)]}),e.sort(function(e,t){return e.range[1]-t.range[1]});var i=e.find(function(e){return"default"===e.breakpoint});for(var a in i||(i={breakpoint:"default",range:n.default},e.unshift(i)),this.prevStyles={},this.res.style)this.res.style.hasOwnProperty(a)&&isNaN(parseInt(a))&&(this.prevStyles[a]=this.res.style[a]);var l=new Set;e.forEach(function(e){Object.keys(e).forEach(function(e){s.includes(e)||"range"===e||l.add(e)})}),l.forEach(function(e){void 0===i[e]&&(i[e]=r.options[e]||"initial")}),this._responsiveTasks=this._responsiveTasks||[],this._responsiveTasks.push(function(){for(var t=window.innerWidth,n=i,a=0;a<e.length;a++){var c=e[a],u=o(c.range,2),p=u[0],d=u[1];if("default"!==c.breakpoint&&t>=p&&t<=d){n=c;break}}for(var f in l.forEach(function(e){if("keySet"===e){var t=i[e];t&&t.key&&(r.res.style[t.key]=t.value)}else r.res.style[e]=i[e]}),n)if("exact"===f&&(console.log("APPL"),console.log(n),console.log(r.set),r.set(n)),!s.includes(f)&&"range"!==f){var h=n[f];"keySet"===f&&h&&h.key?r.res.style[h.key]=h.value:"function"==typeof r[f]?r[f](h):r.res.style[f]=h}}),this._setupResponsiveManager()}},{key:"respad",value:function(e){var t=this,r={default:[0,1e5],xs:[0,575],sm:[576,767],md:[768,991],lg:[992,1199],xl:[1200,1399],xxl:[1400,1e5]};e.forEach(function(e){void 0!==r[e.breakpoint]?e.range=r[e.breakpoint]:Array.isArray(e.breakpoint)&&2===e.breakpoint.length?e.range=[parseInt(e.breakpoint[0],10),parseInt(e.breakpoint[1],10)]:e.range=[parseInt(e.breakpoint,10),1e5]}),e.sort(function(e,t){return e.range[0]-t.range[0]});var n=e.find(function(e){return"default"===e.breakpoint});n||(n={breakpoint:"default",range:r.default},e.unshift(n)),void 0===n.values&&(n.values=this.options.pad||null),this._responsiveTasks=this._responsiveTasks||[],this._responsiveTasks.push(function(){for(var r=window.innerWidth,s=n,i=0;i<e.length;i++){var a=e[i],l=o(a.range,2),c=l[0],u=l[1];if("default"!==a.breakpoint&&r>=c&&r<=u){s=a;break}}var p=void 0!==s.values?s.values:n.values;null!=p&&t.pad(p)}),this._setupResponsiveManager()}},{key:"_applyResponsive",value:function(e,t){var r={default:[0,1e5],xs:[0,575],sm:[576,767],md:[768,991],lg:[992,1199],xl:[1200,1399],xxl:[1400,1e5]};e.forEach(function(e){if(void 0!==r[e.breakpoint])e.range=r[e.breakpoint];else{var t=parseInt(e.breakpoint,10);e.range=[t,1e5]}}),e.sort(function(e,t){return e.range[0]-t.range[0]});var n=e.find(function(e){return"default"===e.breakpoint})||{breakpoint:"default",range:r.default},s=function(){for(var r=window.innerWidth,s=n,i=0;i<e.length;i++){var a=e[i],l=o(a.range,2),c=l[0],u=l[1];if("default"!==a.breakpoint&&r>=c&&r<=u){s=a;break}}t(s)};this._responsiveHandler&&window.removeEventListener("resize",this._responsiveHandler),this._responsiveHandler=s,window.addEventListener("resize",s),setTimeout(function(){s()},0)}},{key:"resmar",value:function(e){var t=this,r={default:[0,1e5],xs:[0,575],sm:[576,767],md:[768,991],lg:[992,1199],xl:[1200,1399],xxl:[1400,1e5]};e.forEach(function(e){void 0!==r[e.breakpoint]?e.range=r[e.breakpoint]:Array.isArray(e.breakpoint)&&2===e.breakpoint.length?e.range=[parseInt(e.breakpoint[0],10),parseInt(e.breakpoint[1],10)]:e.range=[parseInt(e.breakpoint,10),1e5]}),e.sort(function(e,t){return e.range[0]-t.range[0]});var n=e.find(function(e){return"default"===e.breakpoint});n||(n={breakpoint:"default",range:r.default},e.unshift(n)),void 0===n.values&&(n.values=this.options.pad||null),this._responsiveTasks=this._responsiveTasks||[],this._responsiveTasks.push(function(){for(var r=window.innerWidth,s=n,i=0;i<e.length;i++){var a=e[i],l=o(a.range,2),c=l[0],u=l[1];if("default"!==a.breakpoint&&r>=c&&r<=u){s=a;break}}var p=void 0!==s.values?s.values:n.values;null!=p&&t.mar(p)}),this._setupResponsiveManager()}},{key:"isNumber",value:function(e){return"number"==typeof e&&!isNaN(e)}},{key:"pad",value:function(e){for(var t=0;t<e.length;t++)for(var r=Object.keys(e[t]),n=0;n<r.length;n++)for(var o=r[n],s=e[t][o],i=0;i<o.length;i++)switch(o[i]){case"a":this.res.style.padding=this.isNumber(s)?"".concat(s,"px"):s;break;case"t":this.res.style.paddingTop=this.isNumber(s)?"".concat(s,"px"):s;break;case"l":this.res.style.paddingLeft=this.isNumber(s)?"".concat(s,"px"):s;break;case"r":this.res.style.paddingRight=this.isNumber(s)?"".concat(s,"px"):s;break;case"b":this.res.style.paddingBottom=this.isNumber(s)?"".concat(s,"px"):s}return this}},{key:"as",value:function(e){return this.res.style.alignSelf=e,this}},{key:"mar",value:function(e){for(var t=0;t<e.length;t++)for(var r=Object.keys(e[t]),n=0;n<r.length;n++)for(var o=r[n],s=e[t][o],i=0;i<o.length;i++){switch(o[i]){case"a":this.res.style.margin=this.isNumber(s)?"".concat(s,"px"):s;break;case"t":this.res.style.marginTop=this.isNumber(s)?"".concat(s,"px"):s;break;case"l":this.res.style.marginLeft=this.isNumber(s)?"".concat(s,"px"):s;break;case"r":this.res.style.marginRight=this.isNumber(s)?"".concat(s,"px"):s;break;case"b":this.res.style.marginBottom=this.isNumber(s)?"".concat(s,"px"):s}"auto"===o[i]&&(this.res.style.marginLeft="auto",this.res.style.marginRight="auto")}return this}},{key:"smartRange",value:function(e,t,r){e<t.min&&(e=t.min),e>t.max&&(e=t.max);var n=(e-t.min)/(t.max-t.min);t.min>t.max&&(n=(e-t.max)/(t.min-t.max));var o=(r.min-r.max)*n-r.min;if(o=Math.abs(o),r.min<r.max){var s=(r.max+Math.abs(r.min))*n;o=r.min+s}return o}},{key:"gpos",value:function(e){return this.res.style.gridColumn=e.col,this.res.style.gridRow=e.row,this}},{key:"fluidCopy",value:function(e){if(e instanceof Object){this.prevStylex=this.res.style,this.res=document.createElement("h1"),this.res.style.cssText=this.prevStylex.cssText;var t=document.createTextNode(this.text);return this.res.appendChild(t),this.res.style.fontSize=e.exact,this}if("S1"===e){this.prevStylex=this.res.style,this.res=document.createElement("h1"),this.res.style.cssText=this.prevStylex.cssText;var r=document.createTextNode(this.text);this.res.appendChild(r),this.res.style.fontSize="calc(1.625rem + 5.075vw)"}if("S2"===e){this.prevStylex=this.res.style,this.res=document.createElement("h2"),this.res.style.cssText=this.prevStylex.cssText;var n=document.createTextNode(this.text);this.res.appendChild(n),this.res.style.fontSize="calc(1.500rem + 4.3vw)"}if("S3"===e){this.prevStylex=this.res.style,this.res=document.createElement("h3"),this.res.style.cssText=this.prevStylex.cssText;var o=document.createTextNode(this.text);this.res.appendChild(o),this.res.style.fontSize="calc(1.375rem + 3.525vw)"}if("S4"===e){this.prevStylex=this.res.style,this.res=document.createElement("h4"),this.res.style.cssText=this.prevStylex.cssText;var s=document.createTextNode(this.text);this.res.appendChild(s),this.res.style.fontSize="calc(1.250rem + 2.75vw)"}if("S5"===e){this.prevStylex=this.res.style,this.res=document.createElement("h5"),this.res.style.cssText=this.prevStylex.cssText;var i=document.createTextNode(this.text);this.res.appendChild(i),this.res.style.fontSize="calc(1.125rem + 1.975vw)"}return"S6"===e&&(this.res.style.fontSize="calc(1rem + 0.5vw)"),this}},{key:"setIndex",value:function(e){this.index=e}},{key:"borderObj",value:function(e){var t,r=null!==(t=e.type)&&void 0!==t?t:"solid";return this.res.style.border="".concat(e.width," ").concat(r," ").concat(e.color),this.res.style.borderRadius=e.radius,this}},{key:"setPref",value:function(e){this.preffersId=e}},{key:"setClass",value:function(e){this.class=e}},{key:"setTags",value:function(e){this.openTag=e.open,this.closeTag=e.close,console.log("TAGS SET"),console.log(e)}},{key:"chainReact",value:function(e,t,r){var s=this;console.log("0P"),this.ap=!1,this.cta=0,this.once=!1;var i,a=n(e);try{for(a.s();!(i=a.n()).done;){var l=i.value;l.range||(l.range=["0px","999999px"])}}catch(e){a.e(e)}finally{a.f()}e.sort(function(e,t){return parseInt(e.range[0])-parseInt(t.range[0])});var c=function(i){var a=window.visualViewport.width,l=[],c=[];s.resCopy=s.res,s.storedQueries=e.map(function(e){return e.target}).filter(function(e){return null!=e});var u,p=n(e);try{for(p.s();!(u=p.n()).done;){var d=u.value;s.counterIndex++;var f=o(d.range,2),h=f[0],y=f[1],v=parseInt(h),m=parseInt(y),g=!0;if(d.target){g=!1;for(var b=0;b<d.target.length;b++)d.target[b]===t&&(g=!0)}a>=v&&a<=m&&g&&(l.push(d.log),c.push(d),d.op&&d.op.margin&&(s.useMargin=d.op.margin))}}catch(e){p.e(e)}finally{p.f()}if(r&&!r.includes("background")&&(s.res.style.background="",s.res.style.backgroundColor=""),s.res.style.textShadow="",r&&!r.includes("border")&&(s.res.style.border=""),r&&!r.includes("margin")&&(s.res.style.margin=""),s.res.style["-webkit-text-fill-color"]="",s.res.style["-webkit-text-stroke-color"]="",s.res.style["-webkit-text-stroke-width"]="",s.res.style.filter="",s.options.background&&(console.log(s.options.background),s.res.style.background=s.options.background),l.includes("gradient"),(l.includes("gradient")||l.includes("shadow"))&&(s.res.style.position="relative"),l.includes("blast")){var k,x=c.filter(function(e){return"blast"===e.log})[0].op.color,w=null!==(k=c.filter(function(e){return"blast"===e.log})[0].op.width)&&void 0!==k?k:"1px";"FlexRowLayoutElement"===s.getType()||"LayoutWrapperElement"===s.getType()?(s.res.style.border="".concat("number"==typeof w?w+"px":w," solid orange"),s.res.style.display="inline-block","FlexRowLayoutElement"===s.getType()&&(s.res.style.display="flex"),s.res.style.boxSizing="border-box",s.res.style.transformOrigin="center",s.blastTarget=s.res):(s.text,s.res.style["-webkit-text-fill-color"]="transparent",s.res.style["-webkit-text-stroke-color"]=x,s.res.style["-webkit-text-stroke-width"]="".concat(w))}if(l.includes("filter")){var T=c.filter(function(e){return"filter"===e.log})[0].op.filter;s.res.style.filter=T}if(l.includes("background")&&(s.res.style.backgroundColor="green"),l.includes("gradient")&&("LayoutWrapperElement"!==s.getType()&&"FlexRowLayoutElement"!==s.getType()&&(s.res.style["-webkit-text-fill-color"]="transparent"),s.res.style.background=s.globalGradient,"LayoutWrapperElement"!==s.getType()&&"FlexRowLayoutElement"!==s.getType()&&(s.res.style["background-clip"]="text")),l.includes("shadow")){var S,E,O,C,j=s.options.shadow.op;console.log("OP IS",j);var I=null!==(S=j.steps)&&void 0!==S?S:1,R=null!==(E=j.colors)&&void 0!==E?E:["gray"],A=null!==(O=j.movements)&&void 0!==O?O:["3px","3px"],W=null!==(C=j.radius)&&void 0!==C?C:"3px";if(1===A.length&&(A=[A[0],A[0]]),"FlexRowLayoutElement"===s.getType()||"LayoutWrapperElement"===s.getType()){for(var L=[],P=0;P<I;P++){var _,N=null!==(_=R[P])&&void 0!==_?_:R[0],M=A[0],z=A[1];L.push("".concat(M," ").concat(z," ").concat(W," ").concat(N))}s.res.style.boxShadow=L.join(", ")}else{for(var H=[],F=0;F<I;F++){var B,D=null!==(B=R[F])&&void 0!==B?B:R[0],G=A[0],Y=A[1];H.push("drop-shadow(".concat(G," ").concat(Y," ").concat(W," ").concat(D,")"))}s.res.style.filter=H.join(" ")}}if(l.includes("margin"))for(b=0;b<e.length;b++)if(e[b].op){var X=e[b].op.offsets;X&&void 0!==s.index&&(s.res.style.margin=X[Number(s.index)]+"px")}if(l.includes("spana")||l.includes("span")){var V=document.createElement("div");if(V.setAttribute("id","oroa"),Object.assign(V.style,{position:"absolute",inset:"0",background:"linear-gradient(90deg, rgb(52,152,219), rgb(26,188,156))",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",pointerEvents:"none"}),s.res&&s.res.querySelector("span"))return;s.res=s.resCopy,s.res.textContent="",s.options.span&&(Array.isArray(s.options.span)?s.options.span:[s.options.span]).forEach(function(e){if(e.op&&"span"===e.op.name&&Array.isArray(e.op.parts)){var t=0,r=s.prevText||"";if(e.op.parts.forEach(function(e){var n=e.text,o=e.style||{};if(t<r.length){var i=r.indexOf(n,t);if(i>t){var a=r.substring(t,i);s.res.appendChild(new s.constructor(a).setup({type:"span",id:o.id,animation:o.animation}).set({}).render())}t=i+n.length}var l=new s.constructor(n).setup({type:"span",id:o.id,animation:o.animation}).set(o).render();s.res.appendChild(l)}),t<r.length){var n=r.substring(t);s.res.appendChild(new s.constructor(n).setup({type:"span"}).set({}).render())}}})}else{var $=new s.constructor(s.prevText).set({}).render();s.prevText&&s.prevText.length>0&&i&&s.res.appendChild($)}if(l.includes("animation")){if(s.options.animation&&!s.hasAnimated&&!s.options.animation.op.fireAt){console.warn(s.openTag),s.hasAnimated=!0;var q=s.options.animation.op;window.addEventListener("sidebar:open",function(){s.res.animate(q.keyframesOpen,q.openOptions)}),window.addEventListener("sidebar:closed",function(){s.res.animate(q.keyframesClose,q.closeOptions)}),s.res.animate(q.keyframesClose,{duration:0,fill:"forwards"}),s.openTag&&s.closeTag&&(window.addEventListener(s.openTag,function(){s.res.animate(q.keyframesOpen,q.openOptions)}),window.addEventListener(s.closeTag,function(){s.res.animate(q.keyframesClose,q.closeOptions)}))}if(s.options.animation&&s.options.animation.op.fireAt&&s.options.animation.op.fireAt.endsWith("px")){var J=s.options.animation.op;s.res.animate(J.keyframesClose,{duration:0,fill:"forwards"});var Q=function(){window.scrollY>parseFloat(J.fireAt)&&(s.res.animate(J.keyframesOpen,J.openOptions),window.removeEventListener("scroll",Q))};window.addEventListener("scroll",Q)}if(s.options.animation&&"inview"===s.options.animation.op.fireAt){var U=s.options.animation.op;s.res.animate(U.keyframesClose,{duration:0,fill:"forwards"});var K=!1;new IntersectionObserver(function(e,t){e.forEach(function(e){e.isIntersecting&&!K&&(K=!0,s.res.animate(U.keyframesOpen,U.openOptions),t.disconnect())})}).observe(s.res)}}};this.options.animation||window.addEventListener("resize",function(){return c()}),c()}},{key:"maxWidth",value:function(e){return this.res.style.maxWidth=e,this}},{key:"removeQuotesFromFirstWord",value:function(e){return e.replace(/"([^"]+)":/g,"$1:")}},{key:"arrayMargin",value:function(e,t){return e.includes("left")&&(this.res.style.marginLeft=t),e.includes("right")&&(this.res.style.marginRight=t),e.includes("top")&&(this.res.style.marginTop=t),e.includes("bottom")&&(this.res.style.marginBottom=t),e.includes("all")&&(this.res.style.margin=t),t||(this.res.style.marginBottom=e),this}}],t&&a(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}());module.exports=t})();
package/dist/code.esm.js CHANGED
@@ -1 +1 @@
1
- var e={};function t(e){return t="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},t(e)}function r(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=o(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,s=function(){};return{s,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:s}}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,a=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw i}}}}function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,s,i,a=[],l=!0,c=!1;try{if(s=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=s.call(r)).done)&&(a.push(n.value),a.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(c)throw o}}return a}}(e,t)||o(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){if(e){if("string"==typeof e)return s(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a(n.key),n)}}function a(e){var r=function(e){if("object"!=t(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=t(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==t(r)?r:r+""}e.d=(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},e.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var l=function(){return e=function e(){var t,r,n,o=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=this,n=function(e){if(console.log("LOBJO IS"),console.log("REPO"),console.log(o.res),console.log(e),e.transform||e.op){console.log("SIMPLIFIED"),console.log(e.transform),console.log(e.op);var t=e.op;e.transform||(t=e.op),t.duration||(t.duration="3s-ease-in-out"),console.log("ENTERING"),console.log(t),o.setDefault=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"0px";return 0===e.length?t+" ":e};var r=function(){var r="",n="",s="",i="",a="",l="",c="",u="",p="";if(console.log("ERRA - still nested"),console.log(t),0!==t.values.length){console.warn(t),t.values.forEach(function(e){e.startsWith("tx:")&&(r=e.replace("tx:","")),e.startsWith("ty:")&&(n=e.replace("ty:","")),e.startsWith("tz:")?s=e.replace("tz:",""):e.startsWith("scale(")?i=e:e.startsWith("skew(")?a=e:e.startsWith("rotate(")?l=function(e){var t=e.match(/rotate\(([^)]+)\)/);if(!t)return e;var r=t[1].split(",").map(function(e){return e.trim()});return 1===r.length?"rotate(".concat(r[0],")"):2===r.length?"rotateX(".concat(r[0],") rotateY(").concat(r[1],")"):3===r.length?"rotateX(".concat(r[0],") rotateY(").concat(r[1],") rotate(").concat(r[2],")"):e}(e):e.startsWith("perspective(")?c=e:e.startsWith("matrix(")?u=e:e.startsWith("opacity:")&&(p=e.replace("opacity:",""))}),r=o.setDefault(r),n=o.setDefault(n),s=o.setDefault(s);var d="";if("0px"!=n&&"0px"!=r&&"0px"!=s?d+="translate3d(".concat(r,", ").concat(n,", ").concat(s,")"):"0px"==n&&"0px"==r||(d+="translate(".concat(r,", ").concat(n,")")),i&&(d+=" ".concat(i)),l&&(d+=" ".concat(l)),a&&(d+=" ".concat(a)),c&&(d+=" ".concat(c)),u&&(d+=" ".concat(u)),d){if(e.op.duration){var f=e.op.duration.replace(/^(\d+)(s)-/,function(e,t,r){return t/2+r+" "}),h="transform ".concat(f,", opacity ").concat(f);o.res.style.transition=h}else o.res.style.transition="transform 3s ease-in-out, opacity 3s ease-in-out";e.op.static&&(o.res.style.transition=""),(o.blastTarget||o.res).style.transform=d,o.res.style.opacity=p}else alert("OPE")}};t.on?o.res.addEventListener(t.on,function(){t.delay?setTimeout(function(){r()},t.delay):r()}):window.addEventListener("load",function(){t.delay?setTimeout(function(){r()},t.delay):r()});var n=function(){var e="";console.log("RESET"),console.log(t),t.values.forEach(function(t){t.startsWith("tx:")?e+="translateX(0) ":t.startsWith("ty:")?e+="translateY(0) ":t.startsWith("tz:")?e+="translateZ(0) ":t.startsWith("scale(")?e+="scale(1) ":t.startsWith("skew(")?e+="skew(0, 0) ":t.startsWith("rotate(")?e+="rotate(0) ":t.startsWith("perspective(")?e+="perspective(0) ":t.startsWith("matrix(")&&(e+="matrix(1, 0, 0, 1, 0, 0) "),o.res.style.opacity="1"}),e&&(o.res.style.transform=e.trim())};if(t.on)o.res.addEventListener("mouseout",function(){t.keep||n()});else{var s=1e3*parseFloat(t.duration),i=t.closeAfter?t.closeAfter:0;setTimeout(function(){t.keep||n()},s/2+i)}t.hardCSS&&(o.res.style.transform=t.hardCSS)}else alert("THIS FIRE WITH GRADIENT (invalid block"),console.log("INVALID BLOCKA"),console.log(e)},(r=a(r="reactOnTransform"))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,this.state={isExpanded:!1,isMovedUp:!1,isMovedDown:!1},this.openedElements=new WeakMap},t=[{key:"isHidden",value:function(e){e&&(this.res.style.display="none")}},{key:"keySet",value:function(e){return this.temporaryVal=1,this.res.style[e.key]=e.value,this}},{key:"commonMethods",value:function(e){var t={exact:"fontSize",zIndex:"zIndex",position:"position",top:"top",cursor:"cursor",width:"width",maxWidth:"maxWidth",height:"height",maxHeight:"maxHeight",radius:"borderRadius",lineHeight:"lineHeight",background:"background",font:"fontFamily",opacity:"opacity"};for(var r in t)null!=e[r]&&(this.res.style[t[r]]=e[r]);return e.pad&&this.pad(e.pad),e.mar&&this.mar(e.mar),e.respad&&this.respad(e.respad),e.resmar&&this.resmar(e.resmar),e.hover&&this.hover(e.hover),e.size&&this.fluidCopy(e.size),e.resprop&&this.resprop(e.resprop,e),e.keySet&&this.keySet(e.keySet),e.hide&&this.isHidden(e.hide),e.transform&&this.reactOnTransform(e.transform),void 0!==e.opacity&&(this.res.style.opacity=e.opacity),e.bold?this.res.style.fontWeight="bold":null!=e.weight&&(this.res.style.fontWeight=e.weight),this}},{key:"hover",value:function(e){var t=this;if(e.border){var r=e.border.width;this.res.style.border=r?"".concat(r,"px solid transparent"):"1px solid transparent"}var n=this.options.borderObj;return n&&(this.res.style.border="".concat(n.width,"px solid ").concat(n.color)),this.prevColor=this.res.style.backgroundColor,this.foreColor=this.res.style.color,this.prevBorder=this.res.style.border,e.animation&&(this.res.style.transition="".concat(e.animation),this.res.style.transionProperty="background, color"),this.res.onmouseout=function(){t.res.style.backgroundColor="".concat(t.prevColor),t.res.style.color="".concat(t.foreColor),t.res.style.border=t.prevBorder},this.res.onmouseover=function(){if(t.res.style.color=e.color,t.res.style.backgroundColor=e.background,e.border){var r,n=e.border.width,o=null!==(r=e.border.color)&&void 0!==r?r:"#2ECC71";t.res.style.border=n?"".concat(n,"px solid ").concat(o):"1px solid #2ECC71"}},this}},{key:"onScroll",value:function(e){var t=this;"opacity"===e.value?this.res.style.opacity=e.valMin:"scale"===e.value&&(this.res.style.transform="scale(".concat(e.valMax,")")),window.addEventListener("scroll",function(){var r=t.smartRange(window.scrollY,{min:e.from,max:e.to},{min:e.valMin,max:e.valMax});"opacity"===e.value?t.res.style.opacity=r:"scale"===e.value&&(t.res.style.transform="scale(".concat(r,")"))})}},{key:"setAny",value:function(e){this[Object.keys(e)[0]]=[Object.values(e)[0]]}},{key:"setID",value:function(e){this.id=e}},{key:"setPrevText",value:function(e){this.prevText=e}},{key:"getCSS",value:function(){return this.css}},{key:"getPX",value:function(e){return{xs:"0px",sm:"576px",md:"768px",lg:"992px",xl:"1200px",xxl:"1400px",mxxl:"1800px"}[e]||"Invalid breakpoint"}},{key:"_setupResponsiveManager",value:function(){var e=this;this._responsiveTasks=this._responsiveTasks||[];var t=function(){e._responsiveTasks.forEach(function(e){e()})};this._responsiveHandler||(this._responsiveHandler=t,window.addEventListener("resize",t)),setTimeout(function(){t()},0)}},{key:"resprop",value:function(e,t){var r=this;alert(t),this.options=t;var o={default:[0,1e5],xs:[0,575],sm:[576,767],md:[768,991],lg:[992,1199],xl:[1200,1399],xxl:[1400,1e5]},s=["resprop","breakpoint","value","values","range"];e.forEach(function(e){void 0!==o[e.breakpoint]?e.range=o[e.breakpoint]:Array.isArray(e.breakpoint)&&2===e.breakpoint.length?e.range=[parseInt(e.breakpoint[0],10),parseInt(e.breakpoint[1],10)]:e.range=[0,parseInt(e.breakpoint,10)]}),e.sort(function(e,t){return e.range[1]-t.range[1]});var i=e.find(function(e){return"default"===e.breakpoint});for(var a in i||(i={breakpoint:"default",range:o.default},e.unshift(i)),this.prevStyles={},this.res.style)this.res.style.hasOwnProperty(a)&&isNaN(parseInt(a))&&(this.prevStyles[a]=this.res.style[a]);var l=new Set;e.forEach(function(e){Object.keys(e).forEach(function(e){s.includes(e)||"range"===e||l.add(e)})}),l.forEach(function(e){void 0===i[e]&&(i[e]=r.options[e]||"initial")}),this._responsiveTasks=this._responsiveTasks||[],this._responsiveTasks.push(function(){for(var t=window.innerWidth,o=i,a=0;a<e.length;a++){var c=e[a],u=n(c.range,2),p=u[0],d=u[1];if("default"!==c.breakpoint&&t>=p&&t<=d){o=c;break}}for(var f in l.forEach(function(e){if("keySet"===e){var t=i[e];t&&t.key&&(r.res.style[t.key]=t.value)}else r.res.style[e]=i[e]}),o)if("exact"===f&&(console.log("APPL"),console.log(o),console.log(r.set),r.set(o)),!s.includes(f)&&"range"!==f){var h=o[f];"keySet"===f&&h&&h.key?r.res.style[h.key]=h.value:"function"==typeof r[f]?r[f](h):r.res.style[f]=h}}),this._setupResponsiveManager()}},{key:"respad",value:function(e){var t=this,r={default:[0,1e5],xs:[0,575],sm:[576,767],md:[768,991],lg:[992,1199],xl:[1200,1399],xxl:[1400,1e5]};e.forEach(function(e){void 0!==r[e.breakpoint]?e.range=r[e.breakpoint]:Array.isArray(e.breakpoint)&&2===e.breakpoint.length?e.range=[parseInt(e.breakpoint[0],10),parseInt(e.breakpoint[1],10)]:e.range=[parseInt(e.breakpoint,10),1e5]}),e.sort(function(e,t){return e.range[0]-t.range[0]});var o=e.find(function(e){return"default"===e.breakpoint});o||(o={breakpoint:"default",range:r.default},e.unshift(o)),void 0===o.values&&(o.values=this.options.pad||null),this._responsiveTasks=this._responsiveTasks||[],this._responsiveTasks.push(function(){for(var r=window.innerWidth,s=o,i=0;i<e.length;i++){var a=e[i],l=n(a.range,2),c=l[0],u=l[1];if("default"!==a.breakpoint&&r>=c&&r<=u){s=a;break}}var p=void 0!==s.values?s.values:o.values;null!=p&&t.pad(p)}),this._setupResponsiveManager()}},{key:"_applyResponsive",value:function(e,t){var r={default:[0,1e5],xs:[0,575],sm:[576,767],md:[768,991],lg:[992,1199],xl:[1200,1399],xxl:[1400,1e5]};e.forEach(function(e){if(void 0!==r[e.breakpoint])e.range=r[e.breakpoint];else{var t=parseInt(e.breakpoint,10);e.range=[t,1e5]}}),e.sort(function(e,t){return e.range[0]-t.range[0]});var o=e.find(function(e){return"default"===e.breakpoint})||{breakpoint:"default",range:r.default},s=function(){for(var r=window.innerWidth,s=o,i=0;i<e.length;i++){var a=e[i],l=n(a.range,2),c=l[0],u=l[1];if("default"!==a.breakpoint&&r>=c&&r<=u){s=a;break}}t(s)};this._responsiveHandler&&window.removeEventListener("resize",this._responsiveHandler),this._responsiveHandler=s,window.addEventListener("resize",s),setTimeout(function(){s()},0)}},{key:"resmar",value:function(e){var t=this,r={default:[0,1e5],xs:[0,575],sm:[576,767],md:[768,991],lg:[992,1199],xl:[1200,1399],xxl:[1400,1e5]};e.forEach(function(e){void 0!==r[e.breakpoint]?e.range=r[e.breakpoint]:Array.isArray(e.breakpoint)&&2===e.breakpoint.length?e.range=[parseInt(e.breakpoint[0],10),parseInt(e.breakpoint[1],10)]:e.range=[parseInt(e.breakpoint,10),1e5]}),e.sort(function(e,t){return e.range[0]-t.range[0]});var o=e.find(function(e){return"default"===e.breakpoint});o||(o={breakpoint:"default",range:r.default},e.unshift(o)),void 0===o.values&&(o.values=this.options.pad||null),this._responsiveTasks=this._responsiveTasks||[],this._responsiveTasks.push(function(){for(var r=window.innerWidth,s=o,i=0;i<e.length;i++){var a=e[i],l=n(a.range,2),c=l[0],u=l[1];if("default"!==a.breakpoint&&r>=c&&r<=u){s=a;break}}var p=void 0!==s.values?s.values:o.values;null!=p&&t.mar(p)}),this._setupResponsiveManager()}},{key:"isNumber",value:function(e){return"number"==typeof e&&!isNaN(e)}},{key:"pad",value:function(e){for(var t=0;t<e.length;t++)for(var r=Object.keys(e[t]),n=0;n<r.length;n++)for(var o=r[n],s=e[t][o],i=0;i<o.length;i++)switch(o[i]){case"a":this.res.style.padding=this.isNumber(s)?"".concat(s,"px"):s;break;case"t":this.res.style.paddingTop=this.isNumber(s)?"".concat(s,"px"):s;break;case"l":this.res.style.paddingLeft=this.isNumber(s)?"".concat(s,"px"):s;break;case"r":this.res.style.paddingRight=this.isNumber(s)?"".concat(s,"px"):s;break;case"b":this.res.style.paddingBottom=this.isNumber(s)?"".concat(s,"px"):s}return this}},{key:"as",value:function(e){return this.res.style.alignSelf=e,this}},{key:"mar",value:function(e){for(var t=0;t<e.length;t++)for(var r=Object.keys(e[t]),n=0;n<r.length;n++)for(var o=r[n],s=e[t][o],i=0;i<o.length;i++){switch(o[i]){case"a":this.res.style.margin=this.isNumber(s)?"".concat(s,"px"):s;break;case"t":this.res.style.marginTop=this.isNumber(s)?"".concat(s,"px"):s;break;case"l":this.res.style.marginLeft=this.isNumber(s)?"".concat(s,"px"):s;break;case"r":this.res.style.marginRight=this.isNumber(s)?"".concat(s,"px"):s;break;case"b":this.res.style.marginBottom=this.isNumber(s)?"".concat(s,"px"):s}"auto"===o[i]&&(this.res.style.marginLeft="auto",this.res.style.marginRight="auto")}return this}},{key:"smartRange",value:function(e,t,r){e<t.min&&(e=t.min),e>t.max&&(e=t.max);var n=(e-t.min)/(t.max-t.min);t.min>t.max&&(n=(e-t.max)/(t.min-t.max));var o=(r.min-r.max)*n-r.min;if(o=Math.abs(o),r.min<r.max){var s=(r.max+Math.abs(r.min))*n;o=r.min+s}return o}},{key:"gpos",value:function(e){return this.res.style.gridColumn=e.col,this.res.style.gridRow=e.row,this}},{key:"fluidCopy",value:function(e){if(e instanceof Object){this.prevStylex=this.res.style,this.res=document.createElement("h1"),this.res.style.cssText=this.prevStylex.cssText;var t=document.createTextNode(this.text);return this.res.appendChild(t),this.res.style.fontSize=e.exact,this}if("S1"===e){this.prevStylex=this.res.style,this.res=document.createElement("h1"),this.res.style.cssText=this.prevStylex.cssText;var r=document.createTextNode(this.text);this.res.appendChild(r),this.res.style.fontSize="calc(1.625rem + 5.075vw)"}if("S2"===e){this.prevStylex=this.res.style,this.res=document.createElement("h2"),this.res.style.cssText=this.prevStylex.cssText;var n=document.createTextNode(this.text);this.res.appendChild(n),this.res.style.fontSize="calc(1.500rem + 4.3vw)"}if("S3"===e){this.prevStylex=this.res.style,this.res=document.createElement("h3"),this.res.style.cssText=this.prevStylex.cssText;var o=document.createTextNode(this.text);this.res.appendChild(o),this.res.style.fontSize="calc(1.375rem + 3.525vw)"}if("S4"===e){this.prevStylex=this.res.style,this.res=document.createElement("h4"),this.res.style.cssText=this.prevStylex.cssText;var s=document.createTextNode(this.text);this.res.appendChild(s),this.res.style.fontSize="calc(1.250rem + 2.75vw)"}if("S5"===e){this.prevStylex=this.res.style,this.res=document.createElement("h5"),this.res.style.cssText=this.prevStylex.cssText;var i=document.createTextNode(this.text);this.res.appendChild(i),this.res.style.fontSize="calc(1.125rem + 1.975vw)"}return"S6"===e&&(this.res.style.fontSize="calc(1rem + 0.5vw)"),this}},{key:"setIndex",value:function(e){this.index=e}},{key:"borderObj",value:function(e){var t,r=null!==(t=e.type)&&void 0!==t?t:"solid";return this.res.style.border="".concat(e.width," ").concat(r," ").concat(e.color),this.res.style.borderRadius=e.radius,this}},{key:"setPref",value:function(e){this.preffersId=e}},{key:"setClass",value:function(e){this.class=e}},{key:"setTags",value:function(e){this.openTag=e.open,this.closeTag=e.close,console.log("TAGS SET"),console.log(e)}},{key:"chainReact",value:function(e,t,o){var s=this;console.log("0P"),this.ap=!1,this.cta=0,this.once=!1;var i,a=r(e);try{for(a.s();!(i=a.n()).done;){var l=i.value;l.range||(l.range=["0px","999999px"])}}catch(e){a.e(e)}finally{a.f()}e.sort(function(e,t){return parseInt(e.range[0])-parseInt(t.range[0])});var c=function(i){var a=window.visualViewport.width,l=[],c=[];s.resCopy=s.res,s.storedQueries=e.map(function(e){return e.target}).filter(function(e){return null!=e});var u,p=r(e);try{for(p.s();!(u=p.n()).done;){var d=u.value;s.counterIndex++;var f=n(d.range,2),h=f[0],y=f[1],v=parseInt(h),m=parseInt(y),g=!0;if(d.target){g=!1;for(var b=0;b<d.target.length;b++)d.target[b]===t&&(g=!0)}a>=v&&a<=m&&g&&(l.push(d.log),c.push(d),d.op&&d.op.margin&&(s.useMargin=d.op.margin))}}catch(e){p.e(e)}finally{p.f()}if(o&&!o.includes("background")&&(s.res.style.background="",s.res.style.backgroundColor=""),s.res.style.textShadow="",o&&!o.includes("border")&&(s.res.style.border=""),o&&!o.includes("margin")&&(s.res.style.margin=""),s.res.style["-webkit-text-fill-color"]="",s.res.style["-webkit-text-stroke-color"]="",s.res.style["-webkit-text-stroke-width"]="",s.res.style.filter="",s.options.background&&(console.log(s.options.background),s.res.style.background=s.options.background),l.includes("gradient"),(l.includes("gradient")||l.includes("shadow"))&&(s.res.style.position="relative"),l.includes("blast")){var k,x=c.filter(function(e){return"blast"===e.log})[0].op.color,w=null!==(k=c.filter(function(e){return"blast"===e.log})[0].op.width)&&void 0!==k?k:"1px";"FlexRowLayoutElement"===s.getType()||"LayoutWrapperElement"===s.getType()?(s.res.style.border="".concat("number"==typeof w?w+"px":w," solid orange"),s.res.style.display="inline-block","FlexRowLayoutElement"===s.getType()&&(s.res.style.display="flex"),s.res.style.boxSizing="border-box",s.res.style.transformOrigin="center",s.blastTarget=s.res):(s.text,s.res.style["-webkit-text-fill-color"]="transparent",s.res.style["-webkit-text-stroke-color"]=x,s.res.style["-webkit-text-stroke-width"]="".concat(w))}if(l.includes("filter")){var T=c.filter(function(e){return"filter"===e.log})[0].op.filter;s.res.style.filter=T}if(l.includes("background")&&(s.res.style.backgroundColor="green"),l.includes("gradient")&&("LayoutWrapperElement"!==s.getType()&&"FlexRowLayoutElement"!==s.getType()&&(s.res.style["-webkit-text-fill-color"]="transparent"),s.res.style.background=s.globalGradient,"LayoutWrapperElement"!==s.getType()&&"FlexRowLayoutElement"!==s.getType()&&(s.res.style["background-clip"]="text")),l.includes("shadow")){var S,E,O,C,j=s.options.shadow.op;console.log("OP IS",j);var I=null!==(S=j.steps)&&void 0!==S?S:1,R=null!==(E=j.colors)&&void 0!==E?E:["gray"],A=null!==(O=j.movements)&&void 0!==O?O:["3px","3px"],W=null!==(C=j.radius)&&void 0!==C?C:"3px";if(1===A.length&&(A=[A[0],A[0]]),"FlexRowLayoutElement"===s.getType()||"LayoutWrapperElement"===s.getType()){for(var L=[],P=0;P<I;P++){var _,N=null!==(_=R[P])&&void 0!==_?_:R[0],z=A[0],M=A[1];L.push("".concat(z," ").concat(M," ").concat(W," ").concat(N))}s.res.style.boxShadow=L.join(", ")}else{for(var H=[],F=0;F<I;F++){var B,D=null!==(B=R[F])&&void 0!==B?B:R[0],G=A[0],Y=A[1];H.push("drop-shadow(".concat(G," ").concat(Y," ").concat(W," ").concat(D,")"))}s.res.style.filter=H.join(" ")}}if(l.includes("margin"))for(b=0;b<e.length;b++)if(e[b].op){var X=e[b].op.offsets;X&&void 0!==s.index&&(s.res.style.margin=X[Number(s.index)]+"px")}if(l.includes("spana")||l.includes("span")){var V=document.createElement("div");if(V.setAttribute("id","oroa"),Object.assign(V.style,{position:"absolute",inset:"0",background:"linear-gradient(90deg, rgb(52,152,219), rgb(26,188,156))",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",pointerEvents:"none"}),s.res&&s.res.querySelector("span"))return;s.res=s.resCopy,s.res.textContent="",s.options.span&&(Array.isArray(s.options.span)?s.options.span:[s.options.span]).forEach(function(e){if(e.op&&"span"===e.op.name&&Array.isArray(e.op.parts)){var t=0,r=s.prevText||"";if(e.op.parts.forEach(function(e){var n=e.text,o=e.style||{};if(t<r.length){var i=r.indexOf(n,t);if(i>t){var a=r.substring(t,i);s.res.appendChild(new s.constructor(a).setup({type:"span",id:o.id,animation:o.animation}).set({}).render())}t=i+n.length}var l=new s.constructor(n).setup({type:"span",id:o.id,animation:o.animation}).set(o).render();s.res.appendChild(l)}),t<r.length){var n=r.substring(t);s.res.appendChild(new s.constructor(n).setup({type:"span"}).set({}).render())}}})}else{var $=new s.constructor(s.prevText).set({}).render();s.prevText&&s.prevText.length>0&&i&&s.res.appendChild($)}if(l.includes("animation")){if(s.options.animation&&!s.hasAnimated&&!s.options.animation.op.fireAt){console.warn(s.openTag),s.hasAnimated=!0;var q=s.options.animation.op;window.addEventListener("sidebar:open",function(){s.res.animate(q.keyframesOpen,q.openOptions)}),window.addEventListener("sidebar:closed",function(){s.res.animate(q.keyframesClose,q.closeOptions)}),s.res.animate(q.keyframesClose,{duration:0,fill:"forwards"}),s.openTag&&s.closeTag&&(window.addEventListener(s.openTag,function(){s.res.animate(q.keyframesOpen,q.openOptions)}),window.addEventListener(s.closeTag,function(){s.res.animate(q.keyframesClose,q.closeOptions)}))}if(s.options.animation&&s.options.animation.op.fireAt&&s.options.animation.op.fireAt.endsWith("px")){var J=s.options.animation.op;s.res.animate(J.keyframesClose,{duration:0,fill:"forwards"});var Q=function(){window.scrollY>parseFloat(J.fireAt)&&(s.res.animate(J.keyframesOpen,J.openOptions),window.removeEventListener("scroll",Q))};window.addEventListener("scroll",Q)}if(s.options.animation&&"inview"===s.options.animation.op.fireAt){var U=s.options.animation.op;s.res.animate(U.keyframesClose,{duration:0,fill:"forwards"});var K=!1;new IntersectionObserver(function(e,t){e.forEach(function(e){e.isIntersecting&&!K&&(K=!0,s.res.animate(U.keyframesOpen,U.openOptions),t.disconnect())})}).observe(s.res)}}};this.options.animation||window.addEventListener("resize",function(){return c()}),c()}},{key:"maxWidth",value:function(e){return this.res.style.maxWidth=e,this}},{key:"removeQuotesFromFirstWord",value:function(e){return e.replace(/"([^"]+)":/g,"$1:")}},{key:"arrayMargin",value:function(e,t){return e.includes("left")&&(this.res.style.marginLeft=t),e.includes("right")&&(this.res.style.marginRight=t),e.includes("top")&&(this.res.style.marginTop=t),e.includes("bottom")&&(this.res.style.marginBottom=t),e.includes("all")&&(this.res.style.margin=t),t||(this.res.style.marginBottom=e),this}}],t&&i(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function c(e){return c="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},c(e)}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,p(n.key),n)}}function p(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}function d(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(d=function(){return!!e})()}function f(){return f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=h(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},f.apply(null,arguments)}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}function y(e,t){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},y(e,t)}var v=function(){function e(){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),(t=function(e,t,r){return t=h(t),function(e,t){if(t&&("object"==c(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,d()?Reflect.construct(t,r||[],h(e).constructor):t.apply(e,r))}(this,e)).res=document.createElement("code"),t.pre=document.createElement("pre"),t.res.style.background="#18232e",t.res.style.display="block",t.res.style.width="auto",t.res.style.height="auto",t.res.style.borderRadius="1rem",t.pre.appendChild(t.res),t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&y(e,t)}(e,l),t=e,r=[{key:"getType",value:function(){return"LayoutWrapperElement"}},{key:"toCode",value:function(){var e=this.options;Object.keys(e).forEach(function(t){return void 0===e[t]&&delete e[t]});var t=JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:").replace(/"([^"]+)"/g,function(e,t){return t.includes("\n")||t.includes("'")||t.includes('"')?"`"+t.replace(/`/g,"\\`")+"`":'"'.concat(t,'"')});return"new Code().set(".concat(t,")")}},{key:"callReact",value:function(t){this.options=t;var r,n,o,s=[];if(t.stroke||t.gradient||t.span||t.backgroundOp||t.layout||t.shadow||t.animation||t.filtera||t.transform){t.gradient&&(this.globalGradient=t.gradient.op.gradient,"radial"===t.gradient.op.direction&&(this.globalGradient="radial-gradient(circle at center, orange, green)")),t.stroke&&(r=e,n=this,"function"==typeof(o=f(h(1&3?r.prototype:r),"setAny",n))?function(e){return o.apply(n,e)}:o)([{globalBlast:"".concat(t.stroke.op.width," ").concat(t.stroke.op.color)}]),t.span&&(t.span.prevText=this.text);var i=[t.stroke,t.gradient,t.animation,t.span,t.backgroundOp,t.layout,t.marginOp,t.shadow,t.animation,t.filtera,t.transform];i=i.filter(function(e){return null!=e});for(var a=0;a<i.length;a++)s.push({range:i[a].range,log:i[a].op.name,target:i[a].target,op:i[a].op});var l=[];t.borderObj&&l.push("border"),t.background&&l.push("background"),t.mar&&l.push("margin"),t.animation&&l.push("animation"),t.span&&l.push("span"),console.log("ARA IS "),console.log(s),this.chainReact(s,t.id,l)}}},{key:"set",value:function(e){return e.code&&(this.pre.children[0].innerHTML=e.code),e.class&&this.pre.children[0].setAttribute("class","".concat(e.class)),e.pad&&this.pad(e.pad),e.mar&&this.mar(e.mar),e.respad&&this.respad(e.respad),e.resmar&&this.resmar(e.resmar),e.resprop&&this.resprop(e.resprop),e.width&&(this.res.style.width=e.width),e.background&&(this.res.style.background=e.background),e.color&&(this.res.style.color=e.color),e.borderRadius&&(this.res.style.background=e.borderRadius),e.borderObj&&(this.res.style.border="".concat(e.borderObj.width," solid ").concat(e.borderObj.color),this.res.style.borderRadius="".concat(e.borderObj.radius)),this.callReact(e),this}},{key:"render",value:function(e){return e&&document.querySelector(e).appendChild(this.pre),this.res}}],r&&u(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r}();export{v as Code};
1
+ var e={};function t(e){return t="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},t(e)}function r(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=o(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,s=function(){};return{s,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:s}}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,a=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw i}}}}function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,s,i,a=[],l=!0,c=!1;try{if(s=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=s.call(r)).done)&&(a.push(n.value),a.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(c)throw o}}return a}}(e,t)||o(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){if(e){if("string"==typeof e)return s(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a(n.key),n)}}function a(e){var r=function(e){if("object"!=t(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=t(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==t(r)?r:r+""}e.d=(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},e.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var l=function(){return e=function e(){var t,r,n,o=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=this,n=function(e){if(console.log("LOBJO IS"),console.log("REPO"),console.log(o.res),console.log(e),e.transform||e.op){console.log("SIMPLIFIED"),console.log(e.transform),console.log(e.op);var t=e.op;e.transform||(t=e.op),t.duration||(t.duration="3s-ease-in-out"),console.log("ENTERING"),console.log(t),o.setDefault=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"0px";return 0===e.length?t+" ":e};var r=function(){var r="",n="",s="",i="",a="",l="",c="",u="",p="";if(console.log("ERRA - still nested"),console.log(t),0!==t.values.length){console.warn(t),t.values.forEach(function(e){e.startsWith("tx:")&&(r=e.replace("tx:","")),e.startsWith("ty:")&&(n=e.replace("ty:","")),e.startsWith("tz:")?s=e.replace("tz:",""):e.startsWith("scale(")?i=e:e.startsWith("skew(")?a=e:e.startsWith("rotate(")?l=function(e){var t=e.match(/rotate\(([^)]+)\)/);if(!t)return e;var r=t[1].split(",").map(function(e){return e.trim()});return 1===r.length?"rotate(".concat(r[0],")"):2===r.length?"rotateX(".concat(r[0],") rotateY(").concat(r[1],")"):3===r.length?"rotateX(".concat(r[0],") rotateY(").concat(r[1],") rotate(").concat(r[2],")"):e}(e):e.startsWith("perspective(")?c=e:e.startsWith("matrix(")?u=e:e.startsWith("opacity:")&&(p=e.replace("opacity:",""))}),r=o.setDefault(r),n=o.setDefault(n),s=o.setDefault(s);var d="";if("0px"!=n&&"0px"!=r&&"0px"!=s?d+="translate3d(".concat(r,", ").concat(n,", ").concat(s,")"):"0px"==n&&"0px"==r||(d+="translate(".concat(r,", ").concat(n,")")),i&&(d+=" ".concat(i)),l&&(d+=" ".concat(l)),a&&(d+=" ".concat(a)),c&&(d+=" ".concat(c)),u&&(d+=" ".concat(u)),d){if(e.op.duration){var f=e.op.duration.replace(/^(\d+)(s)-/,function(e,t,r){return t/2+r+" "}),h="transform ".concat(f,", opacity ").concat(f);o.res.style.transition=h}else o.res.style.transition="transform 3s ease-in-out, opacity 3s ease-in-out";e.op.static&&(o.res.style.transition=""),(o.blastTarget||o.res).style.transform=d,o.res.style.opacity=p}else alert("OPE")}};t.on?o.res.addEventListener(t.on,function(){t.delay?setTimeout(function(){r()},t.delay):r()}):window.addEventListener("load",function(){t.delay?setTimeout(function(){r()},t.delay):r()});var n=function(){var e="";console.log("RESET"),console.log(t),t.values.forEach(function(t){t.startsWith("tx:")?e+="translateX(0) ":t.startsWith("ty:")?e+="translateY(0) ":t.startsWith("tz:")?e+="translateZ(0) ":t.startsWith("scale(")?e+="scale(1) ":t.startsWith("skew(")?e+="skew(0, 0) ":t.startsWith("rotate(")?e+="rotate(0) ":t.startsWith("perspective(")?e+="perspective(0) ":t.startsWith("matrix(")&&(e+="matrix(1, 0, 0, 1, 0, 0) "),o.res.style.opacity="1"}),e&&(o.res.style.transform=e.trim())};if(t.on)o.res.addEventListener("mouseout",function(){t.keep||n()});else{var s=1e3*parseFloat(t.duration),i=t.closeAfter?t.closeAfter:0;setTimeout(function(){t.keep||n()},s/2+i)}t.hardCSS&&(o.res.style.transform=t.hardCSS)}else alert("THIS FIRE WITH GRADIENT (invalid block"),console.log("INVALID BLOCKA"),console.log(e)},(r=a(r="reactOnTransform"))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,this.state={isExpanded:!1,isMovedUp:!1,isMovedDown:!1},this.openedElements=new WeakMap},t=[{key:"isHidden",value:function(e){e&&(this.res.style.display="none")}},{key:"keySet",value:function(e){return this.temporaryVal=1,this.res.style[e.key]=e.value,this}},{key:"commonMethods",value:function(e){var t={exact:"fontSize",zIndex:"zIndex",position:"position",top:"top",cursor:"cursor",width:"width",maxWidth:"maxWidth",height:"height",maxHeight:"maxHeight",radius:"borderRadius",lineHeight:"lineHeight",background:"background",font:"fontFamily",opacity:"opacity"};for(var r in t)null!=e[r]&&(this.res.style[t[r]]=e[r]);return e.pad&&this.pad(e.pad),e.mar&&this.mar(e.mar),e.respad&&this.respad(e.respad),e.resmar&&this.resmar(e.resmar),e.hover&&this.hover(e.hover),e.size&&this.fluidCopy(e.size),e.resprop&&this.resprop(e.resprop,e),e.keySet&&this.keySet(e.keySet),e.hide&&this.isHidden(e.hide),e.transform&&this.reactOnTransform(e.transform),void 0!==e.opacity&&(this.res.style.opacity=e.opacity),e.bold?this.res.style.fontWeight="bold":null!=e.weight&&(this.res.style.fontWeight=e.weight),this}},{key:"hover",value:function(e){var t=this;if(e.border){var r=e.border.width;this.res.style.border=r?"".concat(r,"px solid transparent"):"1px solid transparent"}var n=this.options.borderObj;return n&&(this.res.style.border="".concat(n.width,"px solid ").concat(n.color)),this.prevColor=this.res.style.backgroundColor,this.foreColor=this.res.style.color,this.prevBorder=this.res.style.border,e.animation&&(this.res.style.transition="".concat(e.animation),this.res.style.transionProperty="background, color"),this.res.onmouseout=function(){t.res.style.backgroundColor="".concat(t.prevColor),t.res.style.color="".concat(t.foreColor),t.res.style.border=t.prevBorder},this.res.onmouseover=function(){if(t.res.style.color=e.color,t.res.style.backgroundColor=e.background,e.border){var r,n=e.border.width,o=null!==(r=e.border.color)&&void 0!==r?r:"#2ECC71";t.res.style.border=n?"".concat(n,"px solid ").concat(o):"1px solid #2ECC71"}},this}},{key:"onScroll",value:function(e){var t=this;"opacity"===e.value?this.res.style.opacity=e.valMin:"scale"===e.value&&(this.res.style.transform="scale(".concat(e.valMax,")")),window.addEventListener("scroll",function(){var r=t.smartRange(window.scrollY,{min:e.from,max:e.to},{min:e.valMin,max:e.valMax});"opacity"===e.value?t.res.style.opacity=r:"scale"===e.value&&(t.res.style.transform="scale(".concat(r,")"))})}},{key:"setAny",value:function(e){this[Object.keys(e)[0]]=[Object.values(e)[0]]}},{key:"setID",value:function(e){this.id=e}},{key:"setPrevText",value:function(e){this.prevText=e}},{key:"getCSS",value:function(){return this.css}},{key:"getPX",value:function(e){return{xs:"0px",sm:"576px",md:"768px",lg:"992px",xl:"1200px",xxl:"1400px",mxxl:"1800px"}[e]||"Invalid breakpoint"}},{key:"_setupResponsiveManager",value:function(){var e=this;this._responsiveTasks=this._responsiveTasks||[];var t=function(){e._responsiveTasks.forEach(function(e){e()})};this._responsiveHandler||(this._responsiveHandler=t,window.addEventListener("resize",t)),setTimeout(function(){t()},0)}},{key:"resprop",value:function(e,t){var r=this;this.options=t;var o={default:[0,1e5],xs:[0,575],sm:[576,767],md:[768,991],lg:[992,1199],xl:[1200,1399],xxl:[1400,1e5]},s=["resprop","breakpoint","value","values","range"];e.forEach(function(e){void 0!==o[e.breakpoint]?e.range=o[e.breakpoint]:Array.isArray(e.breakpoint)&&2===e.breakpoint.length?e.range=[parseInt(e.breakpoint[0],10),parseInt(e.breakpoint[1],10)]:e.range=[0,parseInt(e.breakpoint,10)]}),e.sort(function(e,t){return e.range[1]-t.range[1]});var i=e.find(function(e){return"default"===e.breakpoint});for(var a in i||(i={breakpoint:"default",range:o.default},e.unshift(i)),this.prevStyles={},this.res.style)this.res.style.hasOwnProperty(a)&&isNaN(parseInt(a))&&(this.prevStyles[a]=this.res.style[a]);var l=new Set;e.forEach(function(e){Object.keys(e).forEach(function(e){s.includes(e)||"range"===e||l.add(e)})}),l.forEach(function(e){void 0===i[e]&&(i[e]=r.options[e]||"initial")}),this._responsiveTasks=this._responsiveTasks||[],this._responsiveTasks.push(function(){for(var t=window.innerWidth,o=i,a=0;a<e.length;a++){var c=e[a],u=n(c.range,2),p=u[0],d=u[1];if("default"!==c.breakpoint&&t>=p&&t<=d){o=c;break}}for(var f in l.forEach(function(e){if("keySet"===e){var t=i[e];t&&t.key&&(r.res.style[t.key]=t.value)}else r.res.style[e]=i[e]}),o)if("exact"===f&&(console.log("APPL"),console.log(o),console.log(r.set),r.set(o)),!s.includes(f)&&"range"!==f){var h=o[f];"keySet"===f&&h&&h.key?r.res.style[h.key]=h.value:"function"==typeof r[f]?r[f](h):r.res.style[f]=h}}),this._setupResponsiveManager()}},{key:"respad",value:function(e){var t=this,r={default:[0,1e5],xs:[0,575],sm:[576,767],md:[768,991],lg:[992,1199],xl:[1200,1399],xxl:[1400,1e5]};e.forEach(function(e){void 0!==r[e.breakpoint]?e.range=r[e.breakpoint]:Array.isArray(e.breakpoint)&&2===e.breakpoint.length?e.range=[parseInt(e.breakpoint[0],10),parseInt(e.breakpoint[1],10)]:e.range=[parseInt(e.breakpoint,10),1e5]}),e.sort(function(e,t){return e.range[0]-t.range[0]});var o=e.find(function(e){return"default"===e.breakpoint});o||(o={breakpoint:"default",range:r.default},e.unshift(o)),void 0===o.values&&(o.values=this.options.pad||null),this._responsiveTasks=this._responsiveTasks||[],this._responsiveTasks.push(function(){for(var r=window.innerWidth,s=o,i=0;i<e.length;i++){var a=e[i],l=n(a.range,2),c=l[0],u=l[1];if("default"!==a.breakpoint&&r>=c&&r<=u){s=a;break}}var p=void 0!==s.values?s.values:o.values;null!=p&&t.pad(p)}),this._setupResponsiveManager()}},{key:"_applyResponsive",value:function(e,t){var r={default:[0,1e5],xs:[0,575],sm:[576,767],md:[768,991],lg:[992,1199],xl:[1200,1399],xxl:[1400,1e5]};e.forEach(function(e){if(void 0!==r[e.breakpoint])e.range=r[e.breakpoint];else{var t=parseInt(e.breakpoint,10);e.range=[t,1e5]}}),e.sort(function(e,t){return e.range[0]-t.range[0]});var o=e.find(function(e){return"default"===e.breakpoint})||{breakpoint:"default",range:r.default},s=function(){for(var r=window.innerWidth,s=o,i=0;i<e.length;i++){var a=e[i],l=n(a.range,2),c=l[0],u=l[1];if("default"!==a.breakpoint&&r>=c&&r<=u){s=a;break}}t(s)};this._responsiveHandler&&window.removeEventListener("resize",this._responsiveHandler),this._responsiveHandler=s,window.addEventListener("resize",s),setTimeout(function(){s()},0)}},{key:"resmar",value:function(e){var t=this,r={default:[0,1e5],xs:[0,575],sm:[576,767],md:[768,991],lg:[992,1199],xl:[1200,1399],xxl:[1400,1e5]};e.forEach(function(e){void 0!==r[e.breakpoint]?e.range=r[e.breakpoint]:Array.isArray(e.breakpoint)&&2===e.breakpoint.length?e.range=[parseInt(e.breakpoint[0],10),parseInt(e.breakpoint[1],10)]:e.range=[parseInt(e.breakpoint,10),1e5]}),e.sort(function(e,t){return e.range[0]-t.range[0]});var o=e.find(function(e){return"default"===e.breakpoint});o||(o={breakpoint:"default",range:r.default},e.unshift(o)),void 0===o.values&&(o.values=this.options.pad||null),this._responsiveTasks=this._responsiveTasks||[],this._responsiveTasks.push(function(){for(var r=window.innerWidth,s=o,i=0;i<e.length;i++){var a=e[i],l=n(a.range,2),c=l[0],u=l[1];if("default"!==a.breakpoint&&r>=c&&r<=u){s=a;break}}var p=void 0!==s.values?s.values:o.values;null!=p&&t.mar(p)}),this._setupResponsiveManager()}},{key:"isNumber",value:function(e){return"number"==typeof e&&!isNaN(e)}},{key:"pad",value:function(e){for(var t=0;t<e.length;t++)for(var r=Object.keys(e[t]),n=0;n<r.length;n++)for(var o=r[n],s=e[t][o],i=0;i<o.length;i++)switch(o[i]){case"a":this.res.style.padding=this.isNumber(s)?"".concat(s,"px"):s;break;case"t":this.res.style.paddingTop=this.isNumber(s)?"".concat(s,"px"):s;break;case"l":this.res.style.paddingLeft=this.isNumber(s)?"".concat(s,"px"):s;break;case"r":this.res.style.paddingRight=this.isNumber(s)?"".concat(s,"px"):s;break;case"b":this.res.style.paddingBottom=this.isNumber(s)?"".concat(s,"px"):s}return this}},{key:"as",value:function(e){return this.res.style.alignSelf=e,this}},{key:"mar",value:function(e){for(var t=0;t<e.length;t++)for(var r=Object.keys(e[t]),n=0;n<r.length;n++)for(var o=r[n],s=e[t][o],i=0;i<o.length;i++){switch(o[i]){case"a":this.res.style.margin=this.isNumber(s)?"".concat(s,"px"):s;break;case"t":this.res.style.marginTop=this.isNumber(s)?"".concat(s,"px"):s;break;case"l":this.res.style.marginLeft=this.isNumber(s)?"".concat(s,"px"):s;break;case"r":this.res.style.marginRight=this.isNumber(s)?"".concat(s,"px"):s;break;case"b":this.res.style.marginBottom=this.isNumber(s)?"".concat(s,"px"):s}"auto"===o[i]&&(this.res.style.marginLeft="auto",this.res.style.marginRight="auto")}return this}},{key:"smartRange",value:function(e,t,r){e<t.min&&(e=t.min),e>t.max&&(e=t.max);var n=(e-t.min)/(t.max-t.min);t.min>t.max&&(n=(e-t.max)/(t.min-t.max));var o=(r.min-r.max)*n-r.min;if(o=Math.abs(o),r.min<r.max){var s=(r.max+Math.abs(r.min))*n;o=r.min+s}return o}},{key:"gpos",value:function(e){return this.res.style.gridColumn=e.col,this.res.style.gridRow=e.row,this}},{key:"fluidCopy",value:function(e){if(e instanceof Object){this.prevStylex=this.res.style,this.res=document.createElement("h1"),this.res.style.cssText=this.prevStylex.cssText;var t=document.createTextNode(this.text);return this.res.appendChild(t),this.res.style.fontSize=e.exact,this}if("S1"===e){this.prevStylex=this.res.style,this.res=document.createElement("h1"),this.res.style.cssText=this.prevStylex.cssText;var r=document.createTextNode(this.text);this.res.appendChild(r),this.res.style.fontSize="calc(1.625rem + 5.075vw)"}if("S2"===e){this.prevStylex=this.res.style,this.res=document.createElement("h2"),this.res.style.cssText=this.prevStylex.cssText;var n=document.createTextNode(this.text);this.res.appendChild(n),this.res.style.fontSize="calc(1.500rem + 4.3vw)"}if("S3"===e){this.prevStylex=this.res.style,this.res=document.createElement("h3"),this.res.style.cssText=this.prevStylex.cssText;var o=document.createTextNode(this.text);this.res.appendChild(o),this.res.style.fontSize="calc(1.375rem + 3.525vw)"}if("S4"===e){this.prevStylex=this.res.style,this.res=document.createElement("h4"),this.res.style.cssText=this.prevStylex.cssText;var s=document.createTextNode(this.text);this.res.appendChild(s),this.res.style.fontSize="calc(1.250rem + 2.75vw)"}if("S5"===e){this.prevStylex=this.res.style,this.res=document.createElement("h5"),this.res.style.cssText=this.prevStylex.cssText;var i=document.createTextNode(this.text);this.res.appendChild(i),this.res.style.fontSize="calc(1.125rem + 1.975vw)"}return"S6"===e&&(this.res.style.fontSize="calc(1rem + 0.5vw)"),this}},{key:"setIndex",value:function(e){this.index=e}},{key:"borderObj",value:function(e){var t,r=null!==(t=e.type)&&void 0!==t?t:"solid";return this.res.style.border="".concat(e.width," ").concat(r," ").concat(e.color),this.res.style.borderRadius=e.radius,this}},{key:"setPref",value:function(e){this.preffersId=e}},{key:"setClass",value:function(e){this.class=e}},{key:"setTags",value:function(e){this.openTag=e.open,this.closeTag=e.close,console.log("TAGS SET"),console.log(e)}},{key:"chainReact",value:function(e,t,o){var s=this;console.log("0P"),this.ap=!1,this.cta=0,this.once=!1;var i,a=r(e);try{for(a.s();!(i=a.n()).done;){var l=i.value;l.range||(l.range=["0px","999999px"])}}catch(e){a.e(e)}finally{a.f()}e.sort(function(e,t){return parseInt(e.range[0])-parseInt(t.range[0])});var c=function(i){var a=window.visualViewport.width,l=[],c=[];s.resCopy=s.res,s.storedQueries=e.map(function(e){return e.target}).filter(function(e){return null!=e});var u,p=r(e);try{for(p.s();!(u=p.n()).done;){var d=u.value;s.counterIndex++;var f=n(d.range,2),h=f[0],y=f[1],v=parseInt(h),m=parseInt(y),g=!0;if(d.target){g=!1;for(var b=0;b<d.target.length;b++)d.target[b]===t&&(g=!0)}a>=v&&a<=m&&g&&(l.push(d.log),c.push(d),d.op&&d.op.margin&&(s.useMargin=d.op.margin))}}catch(e){p.e(e)}finally{p.f()}if(o&&!o.includes("background")&&(s.res.style.background="",s.res.style.backgroundColor=""),s.res.style.textShadow="",o&&!o.includes("border")&&(s.res.style.border=""),o&&!o.includes("margin")&&(s.res.style.margin=""),s.res.style["-webkit-text-fill-color"]="",s.res.style["-webkit-text-stroke-color"]="",s.res.style["-webkit-text-stroke-width"]="",s.res.style.filter="",s.options.background&&(console.log(s.options.background),s.res.style.background=s.options.background),l.includes("gradient"),(l.includes("gradient")||l.includes("shadow"))&&(s.res.style.position="relative"),l.includes("blast")){var k,x=c.filter(function(e){return"blast"===e.log})[0].op.color,w=null!==(k=c.filter(function(e){return"blast"===e.log})[0].op.width)&&void 0!==k?k:"1px";"FlexRowLayoutElement"===s.getType()||"LayoutWrapperElement"===s.getType()?(s.res.style.border="".concat("number"==typeof w?w+"px":w," solid orange"),s.res.style.display="inline-block","FlexRowLayoutElement"===s.getType()&&(s.res.style.display="flex"),s.res.style.boxSizing="border-box",s.res.style.transformOrigin="center",s.blastTarget=s.res):(s.text,s.res.style["-webkit-text-fill-color"]="transparent",s.res.style["-webkit-text-stroke-color"]=x,s.res.style["-webkit-text-stroke-width"]="".concat(w))}if(l.includes("filter")){var T=c.filter(function(e){return"filter"===e.log})[0].op.filter;s.res.style.filter=T}if(l.includes("background")&&(s.res.style.backgroundColor="green"),l.includes("gradient")&&("LayoutWrapperElement"!==s.getType()&&"FlexRowLayoutElement"!==s.getType()&&(s.res.style["-webkit-text-fill-color"]="transparent"),s.res.style.background=s.globalGradient,"LayoutWrapperElement"!==s.getType()&&"FlexRowLayoutElement"!==s.getType()&&(s.res.style["background-clip"]="text")),l.includes("shadow")){var S,E,O,C,j=s.options.shadow.op;console.log("OP IS",j);var I=null!==(S=j.steps)&&void 0!==S?S:1,R=null!==(E=j.colors)&&void 0!==E?E:["gray"],A=null!==(O=j.movements)&&void 0!==O?O:["3px","3px"],W=null!==(C=j.radius)&&void 0!==C?C:"3px";if(1===A.length&&(A=[A[0],A[0]]),"FlexRowLayoutElement"===s.getType()||"LayoutWrapperElement"===s.getType()){for(var L=[],P=0;P<I;P++){var _,N=null!==(_=R[P])&&void 0!==_?_:R[0],z=A[0],M=A[1];L.push("".concat(z," ").concat(M," ").concat(W," ").concat(N))}s.res.style.boxShadow=L.join(", ")}else{for(var H=[],F=0;F<I;F++){var B,D=null!==(B=R[F])&&void 0!==B?B:R[0],G=A[0],Y=A[1];H.push("drop-shadow(".concat(G," ").concat(Y," ").concat(W," ").concat(D,")"))}s.res.style.filter=H.join(" ")}}if(l.includes("margin"))for(b=0;b<e.length;b++)if(e[b].op){var X=e[b].op.offsets;X&&void 0!==s.index&&(s.res.style.margin=X[Number(s.index)]+"px")}if(l.includes("spana")||l.includes("span")){var V=document.createElement("div");if(V.setAttribute("id","oroa"),Object.assign(V.style,{position:"absolute",inset:"0",background:"linear-gradient(90deg, rgb(52,152,219), rgb(26,188,156))",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",pointerEvents:"none"}),s.res&&s.res.querySelector("span"))return;s.res=s.resCopy,s.res.textContent="",s.options.span&&(Array.isArray(s.options.span)?s.options.span:[s.options.span]).forEach(function(e){if(e.op&&"span"===e.op.name&&Array.isArray(e.op.parts)){var t=0,r=s.prevText||"";if(e.op.parts.forEach(function(e){var n=e.text,o=e.style||{};if(t<r.length){var i=r.indexOf(n,t);if(i>t){var a=r.substring(t,i);s.res.appendChild(new s.constructor(a).setup({type:"span",id:o.id,animation:o.animation}).set({}).render())}t=i+n.length}var l=new s.constructor(n).setup({type:"span",id:o.id,animation:o.animation}).set(o).render();s.res.appendChild(l)}),t<r.length){var n=r.substring(t);s.res.appendChild(new s.constructor(n).setup({type:"span"}).set({}).render())}}})}else{var $=new s.constructor(s.prevText).set({}).render();s.prevText&&s.prevText.length>0&&i&&s.res.appendChild($)}if(l.includes("animation")){if(s.options.animation&&!s.hasAnimated&&!s.options.animation.op.fireAt){console.warn(s.openTag),s.hasAnimated=!0;var q=s.options.animation.op;window.addEventListener("sidebar:open",function(){s.res.animate(q.keyframesOpen,q.openOptions)}),window.addEventListener("sidebar:closed",function(){s.res.animate(q.keyframesClose,q.closeOptions)}),s.res.animate(q.keyframesClose,{duration:0,fill:"forwards"}),s.openTag&&s.closeTag&&(window.addEventListener(s.openTag,function(){s.res.animate(q.keyframesOpen,q.openOptions)}),window.addEventListener(s.closeTag,function(){s.res.animate(q.keyframesClose,q.closeOptions)}))}if(s.options.animation&&s.options.animation.op.fireAt&&s.options.animation.op.fireAt.endsWith("px")){var J=s.options.animation.op;s.res.animate(J.keyframesClose,{duration:0,fill:"forwards"});var Q=function(){window.scrollY>parseFloat(J.fireAt)&&(s.res.animate(J.keyframesOpen,J.openOptions),window.removeEventListener("scroll",Q))};window.addEventListener("scroll",Q)}if(s.options.animation&&"inview"===s.options.animation.op.fireAt){var U=s.options.animation.op;s.res.animate(U.keyframesClose,{duration:0,fill:"forwards"});var K=!1;new IntersectionObserver(function(e,t){e.forEach(function(e){e.isIntersecting&&!K&&(K=!0,s.res.animate(U.keyframesOpen,U.openOptions),t.disconnect())})}).observe(s.res)}}};this.options.animation||window.addEventListener("resize",function(){return c()}),c()}},{key:"maxWidth",value:function(e){return this.res.style.maxWidth=e,this}},{key:"removeQuotesFromFirstWord",value:function(e){return e.replace(/"([^"]+)":/g,"$1:")}},{key:"arrayMargin",value:function(e,t){return e.includes("left")&&(this.res.style.marginLeft=t),e.includes("right")&&(this.res.style.marginRight=t),e.includes("top")&&(this.res.style.marginTop=t),e.includes("bottom")&&(this.res.style.marginBottom=t),e.includes("all")&&(this.res.style.margin=t),t||(this.res.style.marginBottom=e),this}}],t&&i(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function c(e){return c="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},c(e)}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,p(n.key),n)}}function p(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}function d(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(d=function(){return!!e})()}function f(){return f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=h(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},f.apply(null,arguments)}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}function y(e,t){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},y(e,t)}var v=function(){function e(){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),(t=function(e,t,r){return t=h(t),function(e,t){if(t&&("object"==c(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,d()?Reflect.construct(t,r||[],h(e).constructor):t.apply(e,r))}(this,e)).res=document.createElement("code"),t.pre=document.createElement("pre"),t.res.style.background="#18232e",t.res.style.display="block",t.res.style.width="auto",t.res.style.height="auto",t.res.style.borderRadius="1rem",t.pre.appendChild(t.res),t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&y(e,t)}(e,l),t=e,r=[{key:"getType",value:function(){return"LayoutWrapperElement"}},{key:"toCode",value:function(){var e=this.options;Object.keys(e).forEach(function(t){return void 0===e[t]&&delete e[t]});var t=JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:").replace(/"([^"]+)"/g,function(e,t){return t.includes("\n")||t.includes("'")||t.includes('"')?"`"+t.replace(/`/g,"\\`")+"`":'"'.concat(t,'"')});return"new Code().set(".concat(t,")")}},{key:"callReact",value:function(t){this.options=t;var r,n,o,s=[];if(t.stroke||t.gradient||t.span||t.backgroundOp||t.layout||t.shadow||t.animation||t.filtera||t.transform){t.gradient&&(this.globalGradient=t.gradient.op.gradient,"radial"===t.gradient.op.direction&&(this.globalGradient="radial-gradient(circle at center, orange, green)")),t.stroke&&(r=e,n=this,"function"==typeof(o=f(h(1&3?r.prototype:r),"setAny",n))?function(e){return o.apply(n,e)}:o)([{globalBlast:"".concat(t.stroke.op.width," ").concat(t.stroke.op.color)}]),t.span&&(t.span.prevText=this.text);var i=[t.stroke,t.gradient,t.animation,t.span,t.backgroundOp,t.layout,t.marginOp,t.shadow,t.animation,t.filtera,t.transform];i=i.filter(function(e){return null!=e});for(var a=0;a<i.length;a++)s.push({range:i[a].range,log:i[a].op.name,target:i[a].target,op:i[a].op});var l=[];t.borderObj&&l.push("border"),t.background&&l.push("background"),t.mar&&l.push("margin"),t.animation&&l.push("animation"),t.span&&l.push("span"),console.log("ARA IS "),console.log(s),this.chainReact(s,t.id,l)}}},{key:"set",value:function(e){return e.code&&(this.pre.children[0].innerHTML=e.code),e.class&&this.pre.children[0].setAttribute("class","".concat(e.class)),e.pad&&this.pad(e.pad),e.mar&&this.mar(e.mar),e.respad&&this.respad(e.respad),e.resmar&&this.resmar(e.resmar),e.resprop&&this.resprop(e.resprop),e.width&&(this.res.style.width=e.width),e.background&&(this.res.style.background=e.background),e.color&&(this.res.style.color=e.color),e.borderRadius&&(this.res.style.background=e.borderRadius),e.borderObj&&(this.res.style.border="".concat(e.borderObj.width," solid ").concat(e.borderObj.color),this.res.style.borderRadius="".concat(e.borderObj.radius)),this.callReact(e),this}},{key:"render",value:function(e){return e&&document.querySelector(e).appendChild(this.pre),this.res}}],r&&u(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r}();export{v as Code};
@@ -1 +1 @@
1
- (()=>{"use strict";var e={d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};function r(e){return r="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},r(e)}function n(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=i(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,s=function(){};return{s,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:s}}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 o,a=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){l=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw o}}}}function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,s,i,o,a=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(a.push(n.value),a.length!==t);l=!0);}catch(e){c=!0,s=e}finally{try{if(!l&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw s}}return a}}(e,t)||i(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){if(e){if("string"==typeof e)return o(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,l(n.key),n)}}function l(e){var t=function(e){if("object"!=r(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==r(t)?t:t+""}function c(e){return c="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},c(e)}function u(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=h(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,s=function(){};return{s,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:s}}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,o=!0,a=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){a=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(a)throw i}}}}function h(e,t){if(e){if("string"==typeof e)return d(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?d(e,t):void 0}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function p(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,y(n.key),n)}}function y(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}function f(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(f=function(){return!!e})()}function m(){return m="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=v(e)););return e}(e,t);if(n){var s=Object.getOwnPropertyDescriptor(n,t);return s.get?s.get.call(arguments.length<3?e:r):s.value}},m.apply(null,arguments)}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}function g(e,t){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},g(e,t)}e.r(t),e.d(t,{Wrapper:()=>b});var b=function(e){function t(e){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,r){return t=v(t),function(e,t){if(t&&("object"==c(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,f()?Reflect.construct(t,r||[],v(e).constructor):t.apply(e,r))}(this,t)).res=null,r.setup(e),r.code=[],r.isLast=!1,r.constrObj=e,r.code.push("\n new Wrapper() \n"),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&g(e,t)}(t,e),r=t,n=[{key:"isLasta",value:function(){return this.isLast=!0,this}},{key:"toCode",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(this.code=[],this.excludeFromCodeTrue)return[""];var t=" ".repeat(e),r="".concat(t,'new Wrapper("').concat(this.constrObj,'")');if(this.constrObj||(r="".concat(t,"new Wrapper()")),Object.keys(this.obj).length){var n=Object.fromEntries(Object.entries(this.obj).filter(function(e){var t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,s,i,o,a=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(a.push(n.value),a.length!==t);l=!0);}catch(e){c=!0,s=e}finally{try{if(!l&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw s}}return a}}(e,t)||h(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e,2);return t[0],null!==t[1]})),s=JSON.stringify(n,null,2).replace(/"([^"]+)":/g,"$1:");r+="\n".concat(t," .set(").concat(s,")")}return this.items.length&&(r+="\n".concat(t," .add([\n")+this.items.map(function(t){return t.toCode(e+4)}).join(",\n")+"\n".concat(t," ])")),[r+="\n".concat(t)]}},{key:"getType",value:function(){return"LayoutWrapperElement"}},{key:"setArea",value:function(e){return this.res.style.gridArea=e,this}},{key:"removeQuotesFromFirstWord",value:function(e){return e.replace(/"([^"]+)":/g,"$1:")}},{key:"clicked",value:function(e){return this.res.addEventListener("click",e),this}},{key:"gpos",value:function(e){return this.res.style.gridColumn=e.col,this.res.style.gridRow=e.row,this}},{key:"set",value:function(e){this.obj=e,this.commonMethods(e);var r=".set({";e.isHidden&&this.isHidden(e.isHidden),e.scale&&(this.res.style.scale=e.scale),e.scale&&(r+="scale: ".concat(e.scale)),e.keySet&&this.keySet(e.keySet),e.resprop&&this.resprop(e.resprop),e.position&&(this.res.style.position=e.position),void 0!==e.top&&(this.res.style.top=e.top),e.pad&&this.pad(e.pad),e.mar&&this.mar(e.mar),e.arrpad&&(r+="pad: {sides: [".concat(e.arrpad.sides.map(function(e){return'"'.concat(e,'"')}).join(", "),'], value: "').concat(e.arrpad.value,'"}, ')),e.gpos&&this.gpos(e.gpos);var n,s,i,o=[];if(e.stroke||e.gradient||e.span||e.backgroundOp||e.layout||e.shadow||e.animation||e.filtera||e.transform){e.gradient&&(this.globalGradient=e.gradient.op.gradient,"radial"===e.gradient.op.direction&&(this.globalGradient="radial-gradient(circle at center, orange, green)")),e.stroke&&(n=t,s=this,"function"==typeof(i=m(v(1&3?n.prototype:n),"setAny",s))?function(e){return i.apply(s,e)}:i)([{globalBlast:"".concat(e.stroke.op.width," ").concat(e.stroke.op.color)}]),e.span&&(e.span.prevText=this.text);var a=[e.stroke,e.gradient,e.animation,e.span,e.backgroundOp,e.layout,e.marginOp,e.shadow,e.animation,e.filtera,e.transform];a=a.filter(function(e){return null!=e});for(var l=0;l<a.length;l++)o.push({range:a[l].range,log:a[l].op.name,target:a[l].target,op:a[l].op});var c=[];e.borderObj&&c.push("border"),e.background&&c.push("background"),e.mar&&c.push("margin"),e.animation&&c.push("animation"),e.span&&c.push("span"),e.transform&&c.push("transform"),e.gradient&&c.push("gradient"),e.blast,console.log("CARA IS "),console.log(o),this.options=e,this.chainReact(o,this.options.id,c)}if(e.centerColumn&&(this.res.style.display="flex",this.res.style.flexDirection="column",this.res.style.alignItems="center",e.centerColumn&&(r+="centerColumn: ".concat(e.centerColumn,","))),e.mboth&&(this.res.style.marginRight="auto")&&(this.res.style.marginLeft="auto"),e.mar&&this.mar(e.mar),e.sticky&&this.sticky(),e.transition&&(this.res.style.transition=e.transition),e.class&&this.res.setAttribute("class",e.class),e.ga&&(this.res.style.gridArea=e.ga),e.opacity&&(0==e.opacity&&(this.res.style.opacity=0),e.opacity&&(this.res.style.opacity=e.opacity)),e.maxHeight&&(this.res.style.maxHeight=e.maxHeight),e.id&&this.res.setAttribute("id",e.id),e.arrpad&&this.arrayPadding(e.arrpad.sides,e.arrpad.value),e.arrpad&&(r+="arrpad: {sides: [".concat(e.arrpad.sides.map(function(e){return'"'.concat(e,'"')}).join(", "),'], value: "').concat(e.arrpad.value,'"}, ')),e.arrayMargin&&this.arrayMargin(e.arrayMargin.sides,e.arrayMargin.value),e.arrayMargin&&(r+='\n arrayMargin: {sides: ["'.concat(e.arrayMargin.sides,'"], value: "').concat(e.arrayMargin.value,'"},')),e.center&&this.toCenter(e.center),e.center&&(r+='center: "'.concat(e.center,'",')),e.simpleCenter&&this.simpleCenter(),e.simpleCenter&&(r+='center: "'.concat(e.simpleCenter,'",')),e.filter&&(this.res.style.backdropFilter="blur(3px)"),e.radius&&this.corner(e.radius),e.radius&&(r+='\n radius: "'.concat(e.radius,'",')),e.border&&this.border(e.border),e.simpleBorder&&(this.res.style.border=e.simpleBorder),e.width&&this.width(e.width),e.width&&(r+='\n width: "'.concat(e.width,'",')),e.overflow&&(this.res.style.overflow="hidden"),e.overflow&&(r+='\n overflow: "'.concat(e.overflow,'",')),e.height&&this.heightNoAuto(e.height),e.height&&(r+='\n height: "'.concat(e.height,'",')),e.align&&this.flexAlign(e.align),e.align&&(r+='\n align: "'.concat(e.align,'",')),e.borderObj&&(this.res.style.borderRight="".concat(e.borderObj.width," solid ").concat(e.borderObj.color),this.res.style.borderRadius=e.borderObj.radius),e.borderObja&&(this.res.style.border="".concat(e.borderObja.width," solid ").concat(e.borderObja.color),this.res.style.borderRadius=e.borderObja.radius),e.font&&this.font(e.font),e.font&&(r+='font: "'.concat(e.font,'",')),e.maxWidth&&this.maxWidth(e.maxWidth),e.flexCenter&&this.flexc(e.flexCenter),e.multipad&&this.makeMultiPad(e.multipad),e.multimargin&&this.makeMultiMargin(e.multimargin),e.color&&this.color(e.color),e.background&&this.background(e.background),e.background&&(r+='background: "'.concat(e.background,'",')),e.weight&&this.weight(e.weight),e.paddings&&this.paddingo(e.paddings),e.area&&this.setArea(e.area),e.area&&(r+='area: "'.concat(e.area,'"')),e.column&&this.makeCol(),e.column&&(r+='\n column: "'.concat(e.column,'",')),e.alignIts&&(this.res.style.background="gray"),e.alignIts&&(this.res.style.alignItems="flex-start"),e.alignIts&&(this.res.style.justifyItems="flex-start"),e.customAlign&&(this.res.style.alignItems=e.customAlign),e.customJustify&&(this.res.style.justifyItems=e.customJustify),e.disp&&(this.res.style.display=e.disp),e.flexDir&&(this.res.style.flexDirection=e.flexDir),e.flexDir&&(this.res.style.display="flex"),e.flexDir&&(r+='\n flexDir: "'.concat(e.flexDir,'",')),e.zIndex&&(this.res.style.zIndex=e.zIndex),e.transform&&this.reactOnTransform(e.transform),e.name&&(this.name=e.name),e.responsive&&this.rsp(e.responsive),e.stretch){e.stretch&&this.stretch(e.stretch);var h=this.removeQuotesFromFirstWord(JSON.stringify(e.stretch));r+="\n stretch: ".concat(h,",")}for(var d in e)if("margin"===d){var p=e[d];if(Array.isArray(p)&&p.length>0){var y,f=u(p);try{for(f.s();!(y=f.n()).done;){var g=y.value;g.hasOwnProperty("top")&&(this.res.style.marginTop=g.top),g.hasOwnProperty("right")&&(this.res.style.marginRight=g.right),g.hasOwnProperty("bottom")&&(this.res.style.marginBottom=g.bottom),g.hasOwnProperty("left")&&(this.res.style.marginLeft=g.left)}}catch(e){f.e(e)}finally{f.f()}}}return 8===(r+="})\n").length&&(r=""),this.code.push(r),this}},{key:"rsp",value:function(e){var t=this;this.res.style.display="flex";var r=e.sequence.split("-"),n=function(){var n=e.ranges;"0px"!==n[0]&&n.unshift("0px");for(var s=0;s<n.length-1;s++)(window.matchMedia("(min-width: ".concat(n[s],") and (max-width: ").concat(n[s+1],")")).matches||window.matchMedia("(min-width: ".concat(n[n.length-1],")")).matches)&&("row"===r[s]&&(t.res.style.flexDirection="row",t.res.style.border="3px solid green"),"col"===r[s]&&(t.res.style.flexDirection="column",t.res.style.border="3px solid purple"));return t};window.addEventListener("resize",n),n()}},{key:"sticky",value:function(){return this.res.style.position="sticky",this.res.style.top=0,this}},{key:"toSticky",value:function(){return this.res.style.position="sticky",this.res.style.top="0",this}},{key:"stretch",value:function(e){var t=this,r=function(){window.matchMedia("(max-width: ".concat(e.at,")")).matches?t.res.style.width="auto":window.matchMedia("(max-device-width: 415px)").matches?t.res.style.width="100%":t.res.style.width=e.backTo};r(),window.addEventListener("resize",r)}},{key:"makeCol",value:function(){return this.res.style.display="flex",this.res.style.flexDirection="column",this.res.style.alignItems="flex-start",this}},{key:"paddingo",value:function(e){return this.res.style.padding=e,this}},{key:"toCenter",value:function(e){return this.res.style.display="flex",this.res.style.flexDirection="column",this.res.style.justifyContent="center","both"===e&&(this.res.style.alignItems="center"),this}},{key:"simpleCenter",value:function(){return this.res.style.justifyContent="center",this.res.style.justifyItems="center",this.res.style.alignContent="center",this.res.style.alignItems="center",this}},{key:"color",value:function(e){return this.res.style.color=e,this}},{key:"weight",value:function(e){return this.res.style.fontWeight=e,this}},{key:"makeMultiPad",value:function(e){for(var t=0;t<e.length;t++)"left"===e[t].side&&(this.res.style.paddingLeft=e[t].value),"right"===e[t].side&&(this.res.style.paddingRight=e[t].value);return this}},{key:"makeMultiMargin",value:function(e){this.res.style.zIndex="1";for(var t=0;t<e.length;t++)"left"===e[t].side&&(this.res.style.marginLeft=e[t].value),"right"===e[t].side&&(this.res.style.marginRight=e[t].value),"top"===e[t].side&&(this.res.style.marginTop=e[t].value),"bottom"===e[t].side&&(this.res.style.marginBottom=e[t].value);return this}},{key:"flexc",value:function(e){return this.res.style.display="flex",this.res.style.flexDirection="column",this.res.style.justifyContent="center",this}},{key:"maxWidth",value:function(e){return this.res.style.maxWidth=e,this}},{key:"font",value:function(e){return this.res.style.fontFamily=e,this}},{key:"flexAlign",value:function(e){return this.res.style.display="flex",this.res.style.justifyContent="flex-start",this.res.style.alignItems="flex-start","center"===e?(this.res.style.display="flex",this.res.style.flexDirection="column",this.res.style.alignItems="center",this):this}},{key:"width",value:function(e){return this.res.style.width=e,this}},{key:"heightNoAuto",value:function(e){return this.res.style.height=e,this}},{key:"border",value:function(e){return this.res.style.borderRadius="".concat(e.radius,"px"),this.res.style.padding="0.25em",this.res.style.border="".concat(e.width,"px solid ").concat(e.color),this}},{key:"toCol",value:function(){return this.res.style.display="flex",this.res.style.flexDirection="column",this.res.style.justifyContent="center",this.res.style.alignItems="center",this}},{key:"add",value:function(e){this.items=e,this.code.push(".add([ \n");var t=e.map(function(t,r){return t.toCode().flatMap(function(e){return e}).join("")+(r<e.length-1?",":"")}).join("");this.code.push(t);for(var r=0;r<e.length;r++)if(void 0!==e[r]&&void 0!==e[r].toCode){var n=e[r].render();this.res.appendChild(n)}return this.code.push("])"),this}},{key:"arrayPadding",value:function(e,t){return e.includes("left")&&(this.res.style.paddingLeft=t),e.includes("right")&&(this.res.style.paddingRight=t),e.includes("top")&&(this.res.style.paddingTop=t),e.includes("bottom")&&(this.res.style.paddingBottom=t),this}},{key:"arrayMargin",value:function(e,t){return t||(this.res.style.marginLeft="".concat(e[0],"px"),this.res.style.marginTop="".concat(e[1],"px"),this.res.style.marginRight="".concat(e[2],"px"),this.res.style.marginBottom="".concat(e[3],"px")),e.includes("left")&&(this.res.style.marginLeft=t),e.includes("right")&&(this.res.style.marginRight=t),e.includes("top")&&(this.res.style.marginTop=t),e.includes("bottom")&&(this.res.style.marginBottom=t),this}},{key:"setWidth",value:function(e){this.res.style.width="100vw"}},{key:"setHeight",value:function(e){return this.res.style.height="".concat(e),this}},{key:"setup",value:function(e){var t=null;return e?(e.isLink&&(t=document.createElement("a")),"aside"===e&&(t=document.createElement("aside")),"article"===e&&(t=document.createElement("article")),"main"===e&&(t=document.createElement("main")),"section"===e&&(t=document.createElement("section")),"header"===e&&(t=document.createElement("header")),"footer"===e&&(t=document.createElement("footer"))):t=document.createElement("div"),e&&e.isLink&&(t.style.textDecoration="none",t.setAttribute("href",e.child)),this.res=t,this.res.style.margin=0,this.res.style.padding=0,e&&!0===e.hideOverflow&&(this.res.style.overflow="hidden",this.res.style.overflowY="scroll"),e&&!0===e.center&&(this.res.style.display="flex",this.res.style.flexDirection="column",this.res.style.justifyContent="center",this.res.style.alignItems="center"),e&&"left"===e.align&&(this.res.style.alignItems="flex-start"),e&&"right"===e.align&&(this.res.style.alignItems="flex-end"),e&&e.height&&(this.res.style.height=e.height),e&&e.width&&(this.res.style.width=e.width,this.res.style.marginLeft="auto",this.res.style.marginRight="auto",window.matchMedia("(max-device-width: 415px)").matches&&(this.res.style.width="95%")),this}},{key:"height",value:function(e){return this.res.style.width="auto",this.res.style.height="".concat(e),this}},{key:"size",value:function(e,t){return this.w=e,this.h=t,this.w?this.res.style.width=this.w:this.res.style.width=window.innerWidth,this.h?this.res.style.height=this.h:this.res.style.height=window.innerHeight,this}},{key:"background",value:function(e){return this.res.style.background=e,this}},{key:"corner",value:function(e){return this.res.style.borderRadius=e,this}},{key:"padding",value:function(e,t,r,n){return this.res.style.paddingLeft=e,this.res.style.paddingTop=t,this.res.style.paddingRight=r,this.res.style.paddingBottom=n,this}},{key:"margin",value:function(e,t,r,n){return this.res.style.marginLeft=e,this.res.style.marginTop=t,this.res.style.marginRight=r,this.res.style.marginBottom=n,this}},{key:"itemWidth",value:function(e){for(var t=0;t<this.res.childNodes.length;t++)this.res.childNodes[t].style.width=e;return this}},{key:"apply",value:function(e){var t=this,r=function(){for(var r=0;r<e.length;r++){var n=e[r],s=window.matchMedia("(max-width: ".concat(n.width,"px)"));n.device&&(s=window.matchMedia("(max-device-width: ".concat(n.width,"px)")),alert(n.device)),s.matches&&Object.assign(t.res.style,n.styles)}},n=window.matchMedia("(max-width: ".concat(e[0].width,"px)"));return e[0].device&&(n=window.matchMedia("(max-device-width: ".concat(e[0].width,"px)"))),n.matches||Object.assign(this.res.style,e[0].styles),r(),window.addEventListener("resize",r),this}},{key:"mount",value:function(e){document.querySelector(e).appendChild(this.res)}},{key:"render",value:function(e){return e?(document.querySelector("#mount"),document.querySelector(e).appendChild(this.res),this):this.res}}],n&&p(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(function(){return e=function e(){var t,r,n,s=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=this,n=function(e){if(console.log("LOBJO IS"),console.log("REPO"),console.log(s.res),console.log(e),e.transform||e.op){console.log("SIMPLIFIED"),console.log(e.transform),console.log(e.op);var t=e.op;e.transform||(t=e.op),t.duration||(t.duration="3s-ease-in-out"),console.log("ENTERING"),console.log(t),s.setDefault=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"0px";return 0===e.length?t+" ":e};var r=function(){var r="",n="",i="",o="",a="",l="",c="",u="",h="";if(console.log("ERRA - still nested"),console.log(t),0!==t.values.length){console.warn(t),t.values.forEach(function(e){e.startsWith("tx:")&&(r=e.replace("tx:","")),e.startsWith("ty:")&&(n=e.replace("ty:","")),e.startsWith("tz:")?i=e.replace("tz:",""):e.startsWith("scale(")?o=e:e.startsWith("skew(")?a=e:e.startsWith("rotate(")?l=function(e){var t=e.match(/rotate\(([^)]+)\)/);if(!t)return e;var r=t[1].split(",").map(function(e){return e.trim()});return 1===r.length?"rotate(".concat(r[0],")"):2===r.length?"rotateX(".concat(r[0],") rotateY(").concat(r[1],")"):3===r.length?"rotateX(".concat(r[0],") rotateY(").concat(r[1],") rotate(").concat(r[2],")"):e}(e):e.startsWith("perspective(")?c=e:e.startsWith("matrix(")?u=e:e.startsWith("opacity:")&&(h=e.replace("opacity:",""))}),r=s.setDefault(r),n=s.setDefault(n),i=s.setDefault(i);var d="";if("0px"!=n&&"0px"!=r&&"0px"!=i?d+="translate3d(".concat(r,", ").concat(n,", ").concat(i,")"):"0px"==n&&"0px"==r||(d+="translate(".concat(r,", ").concat(n,")")),o&&(d+=" ".concat(o)),l&&(d+=" ".concat(l)),a&&(d+=" ".concat(a)),c&&(d+=" ".concat(c)),u&&(d+=" ".concat(u)),d){if(e.op.duration){var p=e.op.duration.replace(/^(\d+)(s)-/,function(e,t,r){return t/2+r+" "}),y="transform ".concat(p,", opacity ").concat(p);s.res.style.transition=y}else s.res.style.transition="transform 3s ease-in-out, opacity 3s ease-in-out";e.op.static&&(s.res.style.transition=""),(s.blastTarget||s.res).style.transform=d,s.res.style.opacity=h}else alert("OPE")}};t.on?s.res.addEventListener(t.on,function(){t.delay?setTimeout(function(){r()},t.delay):r()}):window.addEventListener("load",function(){t.delay?setTimeout(function(){r()},t.delay):r()});var n=function(){var e="";console.log("RESET"),console.log(t),t.values.forEach(function(t){t.startsWith("tx:")?e+="translateX(0) ":t.startsWith("ty:")?e+="translateY(0) ":t.startsWith("tz:")?e+="translateZ(0) ":t.startsWith("scale(")?e+="scale(1) ":t.startsWith("skew(")?e+="skew(0, 0) ":t.startsWith("rotate(")?e+="rotate(0) ":t.startsWith("perspective(")?e+="perspective(0) ":t.startsWith("matrix(")&&(e+="matrix(1, 0, 0, 1, 0, 0) "),s.res.style.opacity="1"}),e&&(s.res.style.transform=e.trim())};if(t.on)s.res.addEventListener("mouseout",function(){t.keep||n()});else{var i=1e3*parseFloat(t.duration),o=t.closeAfter?t.closeAfter:0;setTimeout(function(){t.keep||n()},i/2+o)}t.hardCSS&&(s.res.style.transform=t.hardCSS)}else alert("THIS FIRE WITH GRADIENT (invalid block"),console.log("INVALID BLOCKA"),console.log(e)},(r=l(r="reactOnTransform"))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,this.state={isExpanded:!1,isMovedUp:!1,isMovedDown:!1},this.openedElements=new WeakMap},t=[{key:"isHidden",value:function(e){e&&(this.res.style.display="none")}},{key:"keySet",value:function(e){return this.temporaryVal=1,this.res.style[e.key]=e.value,this}},{key:"commonMethods",value:function(e){var t={exact:"fontSize",zIndex:"zIndex",position:"position",top:"top",cursor:"cursor",width:"width",maxWidth:"maxWidth",height:"height",maxHeight:"maxHeight",radius:"borderRadius",lineHeight:"lineHeight",background:"background",font:"fontFamily",opacity:"opacity"};for(var r in t)null!=e[r]&&(this.res.style[t[r]]=e[r]);return e.pad&&this.pad(e.pad),e.mar&&this.mar(e.mar),e.respad&&this.respad(e.respad),e.resmar&&this.resmar(e.resmar),e.hover&&this.hover(e.hover),e.size&&this.fluidCopy(e.size),e.resprop&&this.resprop(e.resprop,e),e.keySet&&this.keySet(e.keySet),e.hide&&this.isHidden(e.hide),e.transform&&this.reactOnTransform(e.transform),void 0!==e.opacity&&(this.res.style.opacity=e.opacity),e.bold?this.res.style.fontWeight="bold":null!=e.weight&&(this.res.style.fontWeight=e.weight),this}},{key:"hover",value:function(e){var t=this;if(e.border){var r=e.border.width;this.res.style.border=r?"".concat(r,"px solid transparent"):"1px solid transparent"}var n=this.options.borderObj;return n&&(this.res.style.border="".concat(n.width,"px solid ").concat(n.color)),this.prevColor=this.res.style.backgroundColor,this.foreColor=this.res.style.color,this.prevBorder=this.res.style.border,e.animation&&(this.res.style.transition="".concat(e.animation),this.res.style.transionProperty="background, color"),this.res.onmouseout=function(){t.res.style.backgroundColor="".concat(t.prevColor),t.res.style.color="".concat(t.foreColor),t.res.style.border=t.prevBorder},this.res.onmouseover=function(){if(t.res.style.color=e.color,t.res.style.backgroundColor=e.background,e.border){var r,n=e.border.width,s=null!==(r=e.border.color)&&void 0!==r?r:"#2ECC71";t.res.style.border=n?"".concat(n,"px solid ").concat(s):"1px solid #2ECC71"}},this}},{key:"onScroll",value:function(e){var t=this;"opacity"===e.value?this.res.style.opacity=e.valMin:"scale"===e.value&&(this.res.style.transform="scale(".concat(e.valMax,")")),window.addEventListener("scroll",function(){var r=t.smartRange(window.scrollY,{min:e.from,max:e.to},{min:e.valMin,max:e.valMax});"opacity"===e.value?t.res.style.opacity=r:"scale"===e.value&&(t.res.style.transform="scale(".concat(r,")"))})}},{key:"setAny",value:function(e){this[Object.keys(e)[0]]=[Object.values(e)[0]]}},{key:"setID",value:function(e){this.id=e}},{key:"setPrevText",value:function(e){this.prevText=e}},{key:"getCSS",value:function(){return this.css}},{key:"getPX",value:function(e){return{xs:"0px",sm:"576px",md:"768px",lg:"992px",xl:"1200px",xxl:"1400px",mxxl:"1800px"}[e]||"Invalid breakpoint"}},{key:"_setupResponsiveManager",value:function(){var e=this;this._responsiveTasks=this._responsiveTasks||[];var t=function(){e._responsiveTasks.forEach(function(e){e()})};this._responsiveHandler||(this._responsiveHandler=t,window.addEventListener("resize",t)),setTimeout(function(){t()},0)}},{key:"resprop",value:function(e,t){var r=this;alert(t),this.options=t;var n={default:[0,1e5],xs:[0,575],sm:[576,767],md:[768,991],lg:[992,1199],xl:[1200,1399],xxl:[1400,1e5]},i=["resprop","breakpoint","value","values","range"];e.forEach(function(e){void 0!==n[e.breakpoint]?e.range=n[e.breakpoint]:Array.isArray(e.breakpoint)&&2===e.breakpoint.length?e.range=[parseInt(e.breakpoint[0],10),parseInt(e.breakpoint[1],10)]:e.range=[0,parseInt(e.breakpoint,10)]}),e.sort(function(e,t){return e.range[1]-t.range[1]});var o=e.find(function(e){return"default"===e.breakpoint});for(var a in o||(o={breakpoint:"default",range:n.default},e.unshift(o)),this.prevStyles={},this.res.style)this.res.style.hasOwnProperty(a)&&isNaN(parseInt(a))&&(this.prevStyles[a]=this.res.style[a]);var l=new Set;e.forEach(function(e){Object.keys(e).forEach(function(e){i.includes(e)||"range"===e||l.add(e)})}),l.forEach(function(e){void 0===o[e]&&(o[e]=r.options[e]||"initial")}),this._responsiveTasks=this._responsiveTasks||[],this._responsiveTasks.push(function(){for(var t=window.innerWidth,n=o,a=0;a<e.length;a++){var c=e[a],u=s(c.range,2),h=u[0],d=u[1];if("default"!==c.breakpoint&&t>=h&&t<=d){n=c;break}}for(var p in l.forEach(function(e){if("keySet"===e){var t=o[e];t&&t.key&&(r.res.style[t.key]=t.value)}else r.res.style[e]=o[e]}),n)if("exact"===p&&(console.log("APPL"),console.log(n),console.log(r.set),r.set(n)),!i.includes(p)&&"range"!==p){var y=n[p];"keySet"===p&&y&&y.key?r.res.style[y.key]=y.value:"function"==typeof r[p]?r[p](y):r.res.style[p]=y}}),this._setupResponsiveManager()}},{key:"respad",value:function(e){var t=this,r={default:[0,1e5],xs:[0,575],sm:[576,767],md:[768,991],lg:[992,1199],xl:[1200,1399],xxl:[1400,1e5]};e.forEach(function(e){void 0!==r[e.breakpoint]?e.range=r[e.breakpoint]:Array.isArray(e.breakpoint)&&2===e.breakpoint.length?e.range=[parseInt(e.breakpoint[0],10),parseInt(e.breakpoint[1],10)]:e.range=[parseInt(e.breakpoint,10),1e5]}),e.sort(function(e,t){return e.range[0]-t.range[0]});var n=e.find(function(e){return"default"===e.breakpoint});n||(n={breakpoint:"default",range:r.default},e.unshift(n)),void 0===n.values&&(n.values=this.options.pad||null),this._responsiveTasks=this._responsiveTasks||[],this._responsiveTasks.push(function(){for(var r=window.innerWidth,i=n,o=0;o<e.length;o++){var a=e[o],l=s(a.range,2),c=l[0],u=l[1];if("default"!==a.breakpoint&&r>=c&&r<=u){i=a;break}}var h=void 0!==i.values?i.values:n.values;null!=h&&t.pad(h)}),this._setupResponsiveManager()}},{key:"_applyResponsive",value:function(e,t){var r={default:[0,1e5],xs:[0,575],sm:[576,767],md:[768,991],lg:[992,1199],xl:[1200,1399],xxl:[1400,1e5]};e.forEach(function(e){if(void 0!==r[e.breakpoint])e.range=r[e.breakpoint];else{var t=parseInt(e.breakpoint,10);e.range=[t,1e5]}}),e.sort(function(e,t){return e.range[0]-t.range[0]});var n=e.find(function(e){return"default"===e.breakpoint})||{breakpoint:"default",range:r.default},i=function(){for(var r=window.innerWidth,i=n,o=0;o<e.length;o++){var a=e[o],l=s(a.range,2),c=l[0],u=l[1];if("default"!==a.breakpoint&&r>=c&&r<=u){i=a;break}}t(i)};this._responsiveHandler&&window.removeEventListener("resize",this._responsiveHandler),this._responsiveHandler=i,window.addEventListener("resize",i),setTimeout(function(){i()},0)}},{key:"resmar",value:function(e){var t=this,r={default:[0,1e5],xs:[0,575],sm:[576,767],md:[768,991],lg:[992,1199],xl:[1200,1399],xxl:[1400,1e5]};e.forEach(function(e){void 0!==r[e.breakpoint]?e.range=r[e.breakpoint]:Array.isArray(e.breakpoint)&&2===e.breakpoint.length?e.range=[parseInt(e.breakpoint[0],10),parseInt(e.breakpoint[1],10)]:e.range=[parseInt(e.breakpoint,10),1e5]}),e.sort(function(e,t){return e.range[0]-t.range[0]});var n=e.find(function(e){return"default"===e.breakpoint});n||(n={breakpoint:"default",range:r.default},e.unshift(n)),void 0===n.values&&(n.values=this.options.pad||null),this._responsiveTasks=this._responsiveTasks||[],this._responsiveTasks.push(function(){for(var r=window.innerWidth,i=n,o=0;o<e.length;o++){var a=e[o],l=s(a.range,2),c=l[0],u=l[1];if("default"!==a.breakpoint&&r>=c&&r<=u){i=a;break}}var h=void 0!==i.values?i.values:n.values;null!=h&&t.mar(h)}),this._setupResponsiveManager()}},{key:"isNumber",value:function(e){return"number"==typeof e&&!isNaN(e)}},{key:"pad",value:function(e){for(var t=0;t<e.length;t++)for(var r=Object.keys(e[t]),n=0;n<r.length;n++)for(var s=r[n],i=e[t][s],o=0;o<s.length;o++)switch(s[o]){case"a":this.res.style.padding=this.isNumber(i)?"".concat(i,"px"):i;break;case"t":this.res.style.paddingTop=this.isNumber(i)?"".concat(i,"px"):i;break;case"l":this.res.style.paddingLeft=this.isNumber(i)?"".concat(i,"px"):i;break;case"r":this.res.style.paddingRight=this.isNumber(i)?"".concat(i,"px"):i;break;case"b":this.res.style.paddingBottom=this.isNumber(i)?"".concat(i,"px"):i}return this}},{key:"as",value:function(e){return this.res.style.alignSelf=e,this}},{key:"mar",value:function(e){for(var t=0;t<e.length;t++)for(var r=Object.keys(e[t]),n=0;n<r.length;n++)for(var s=r[n],i=e[t][s],o=0;o<s.length;o++){switch(s[o]){case"a":this.res.style.margin=this.isNumber(i)?"".concat(i,"px"):i;break;case"t":this.res.style.marginTop=this.isNumber(i)?"".concat(i,"px"):i;break;case"l":this.res.style.marginLeft=this.isNumber(i)?"".concat(i,"px"):i;break;case"r":this.res.style.marginRight=this.isNumber(i)?"".concat(i,"px"):i;break;case"b":this.res.style.marginBottom=this.isNumber(i)?"".concat(i,"px"):i}"auto"===s[o]&&(this.res.style.marginLeft="auto",this.res.style.marginRight="auto")}return this}},{key:"smartRange",value:function(e,t,r){e<t.min&&(e=t.min),e>t.max&&(e=t.max);var n=(e-t.min)/(t.max-t.min);t.min>t.max&&(n=(e-t.max)/(t.min-t.max));var s=(r.min-r.max)*n-r.min;if(s=Math.abs(s),r.min<r.max){var i=(r.max+Math.abs(r.min))*n;s=r.min+i}return s}},{key:"gpos",value:function(e){return this.res.style.gridColumn=e.col,this.res.style.gridRow=e.row,this}},{key:"fluidCopy",value:function(e){if(e instanceof Object){this.prevStylex=this.res.style,this.res=document.createElement("h1"),this.res.style.cssText=this.prevStylex.cssText;var t=document.createTextNode(this.text);return this.res.appendChild(t),this.res.style.fontSize=e.exact,this}if("S1"===e){this.prevStylex=this.res.style,this.res=document.createElement("h1"),this.res.style.cssText=this.prevStylex.cssText;var r=document.createTextNode(this.text);this.res.appendChild(r),this.res.style.fontSize="calc(1.625rem + 5.075vw)"}if("S2"===e){this.prevStylex=this.res.style,this.res=document.createElement("h2"),this.res.style.cssText=this.prevStylex.cssText;var n=document.createTextNode(this.text);this.res.appendChild(n),this.res.style.fontSize="calc(1.500rem + 4.3vw)"}if("S3"===e){this.prevStylex=this.res.style,this.res=document.createElement("h3"),this.res.style.cssText=this.prevStylex.cssText;var s=document.createTextNode(this.text);this.res.appendChild(s),this.res.style.fontSize="calc(1.375rem + 3.525vw)"}if("S4"===e){this.prevStylex=this.res.style,this.res=document.createElement("h4"),this.res.style.cssText=this.prevStylex.cssText;var i=document.createTextNode(this.text);this.res.appendChild(i),this.res.style.fontSize="calc(1.250rem + 2.75vw)"}if("S5"===e){this.prevStylex=this.res.style,this.res=document.createElement("h5"),this.res.style.cssText=this.prevStylex.cssText;var o=document.createTextNode(this.text);this.res.appendChild(o),this.res.style.fontSize="calc(1.125rem + 1.975vw)"}return"S6"===e&&(this.res.style.fontSize="calc(1rem + 0.5vw)"),this}},{key:"setIndex",value:function(e){this.index=e}},{key:"borderObj",value:function(e){var t,r=null!==(t=e.type)&&void 0!==t?t:"solid";return this.res.style.border="".concat(e.width," ").concat(r," ").concat(e.color),this.res.style.borderRadius=e.radius,this}},{key:"setPref",value:function(e){this.preffersId=e}},{key:"setClass",value:function(e){this.class=e}},{key:"setTags",value:function(e){this.openTag=e.open,this.closeTag=e.close,console.log("TAGS SET"),console.log(e)}},{key:"chainReact",value:function(e,t,r){var i=this;console.log("0P"),this.ap=!1,this.cta=0,this.once=!1;var o,a=n(e);try{for(a.s();!(o=a.n()).done;){var l=o.value;l.range||(l.range=["0px","999999px"])}}catch(e){a.e(e)}finally{a.f()}e.sort(function(e,t){return parseInt(e.range[0])-parseInt(t.range[0])});var c=function(o){var a=window.visualViewport.width,l=[],c=[];i.resCopy=i.res,i.storedQueries=e.map(function(e){return e.target}).filter(function(e){return null!=e});var u,h=n(e);try{for(h.s();!(u=h.n()).done;){var d=u.value;i.counterIndex++;var p=s(d.range,2),y=p[0],f=p[1],m=parseInt(y),v=parseInt(f),g=!0;if(d.target){g=!1;for(var b=0;b<d.target.length;b++)d.target[b]===t&&(g=!0)}a>=m&&a<=v&&g&&(l.push(d.log),c.push(d),d.op&&d.op.margin&&(i.useMargin=d.op.margin))}}catch(e){h.e(e)}finally{h.f()}if(r&&!r.includes("background")&&(i.res.style.background="",i.res.style.backgroundColor=""),i.res.style.textShadow="",r&&!r.includes("border")&&(i.res.style.border=""),r&&!r.includes("margin")&&(i.res.style.margin=""),i.res.style["-webkit-text-fill-color"]="",i.res.style["-webkit-text-stroke-color"]="",i.res.style["-webkit-text-stroke-width"]="",i.res.style.filter="",i.options.background&&(console.log(i.options.background),i.res.style.background=i.options.background),l.includes("gradient"),(l.includes("gradient")||l.includes("shadow"))&&(i.res.style.position="relative"),l.includes("blast")){var x,k=c.filter(function(e){return"blast"===e.log})[0].op.color,w=null!==(x=c.filter(function(e){return"blast"===e.log})[0].op.width)&&void 0!==x?x:"1px";"FlexRowLayoutElement"===i.getType()||"LayoutWrapperElement"===i.getType()?(i.res.style.border="".concat("number"==typeof w?w+"px":w," solid orange"),i.res.style.display="inline-block","FlexRowLayoutElement"===i.getType()&&(i.res.style.display="flex"),i.res.style.boxSizing="border-box",i.res.style.transformOrigin="center",i.blastTarget=i.res):(i.text,i.res.style["-webkit-text-fill-color"]="transparent",i.res.style["-webkit-text-stroke-color"]=k,i.res.style["-webkit-text-stroke-width"]="".concat(w))}if(l.includes("filter")){var S=c.filter(function(e){return"filter"===e.log})[0].op.filter;i.res.style.filter=S}if(l.includes("background")&&(i.res.style.backgroundColor="green"),l.includes("gradient")&&("LayoutWrapperElement"!==i.getType()&&"FlexRowLayoutElement"!==i.getType()&&(i.res.style["-webkit-text-fill-color"]="transparent"),i.res.style.background=i.globalGradient,"LayoutWrapperElement"!==i.getType()&&"FlexRowLayoutElement"!==i.getType()&&(i.res.style["background-clip"]="text")),l.includes("shadow")){var T,O,E,j,C=i.options.shadow.op;console.log("OP IS",C);var I=null!==(T=C.steps)&&void 0!==T?T:1,A=null!==(O=C.colors)&&void 0!==O?O:["gray"],W=null!==(E=C.movements)&&void 0!==E?E:["3px","3px"],L=null!==(j=C.radius)&&void 0!==j?j:"3px";if(1===W.length&&(W=[W[0],W[0]]),"FlexRowLayoutElement"===i.getType()||"LayoutWrapperElement"===i.getType()){for(var R=[],M=0;M<I;M++){var P,N=null!==(P=A[M])&&void 0!==P?P:A[0],_=W[0],z=W[1];R.push("".concat(_," ").concat(z," ").concat(L," ").concat(N))}i.res.style.boxShadow=R.join(", ")}else{for(var D=[],B=0;B<I;B++){var H,F=null!==(H=A[B])&&void 0!==H?H:A[0],G=W[0],Y=W[1];D.push("drop-shadow(".concat(G," ").concat(Y," ").concat(L," ").concat(F,")"))}i.res.style.filter=D.join(" ")}}if(l.includes("margin"))for(b=0;b<e.length;b++)if(e[b].op){var q=e[b].op.offsets;q&&void 0!==i.index&&(i.res.style.margin=q[Number(i.index)]+"px")}if(l.includes("spana")||l.includes("span")){var J=document.createElement("div");if(J.setAttribute("id","oroa"),Object.assign(J.style,{position:"absolute",inset:"0",background:"linear-gradient(90deg, rgb(52,152,219), rgb(26,188,156))",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",pointerEvents:"none"}),i.res&&i.res.querySelector("span"))return;i.res=i.resCopy,i.res.textContent="",i.options.span&&(Array.isArray(i.options.span)?i.options.span:[i.options.span]).forEach(function(e){if(e.op&&"span"===e.op.name&&Array.isArray(e.op.parts)){var t=0,r=i.prevText||"";if(e.op.parts.forEach(function(e){var n=e.text,s=e.style||{};if(t<r.length){var o=r.indexOf(n,t);if(o>t){var a=r.substring(t,o);i.res.appendChild(new i.constructor(a).setup({type:"span",id:s.id,animation:s.animation}).set({}).render())}t=o+n.length}var l=new i.constructor(n).setup({type:"span",id:s.id,animation:s.animation}).set(s).render();i.res.appendChild(l)}),t<r.length){var n=r.substring(t);i.res.appendChild(new i.constructor(n).setup({type:"span"}).set({}).render())}}})}else{var $=new i.constructor(i.prevText).set({}).render();i.prevText&&i.prevText.length>0&&o&&i.res.appendChild($)}if(l.includes("animation")){if(i.options.animation&&!i.hasAnimated&&!i.options.animation.op.fireAt){console.warn(i.openTag),i.hasAnimated=!0;var Q=i.options.animation.op;window.addEventListener("sidebar:open",function(){i.res.animate(Q.keyframesOpen,Q.openOptions)}),window.addEventListener("sidebar:closed",function(){i.res.animate(Q.keyframesClose,Q.closeOptions)}),i.res.animate(Q.keyframesClose,{duration:0,fill:"forwards"}),i.openTag&&i.closeTag&&(window.addEventListener(i.openTag,function(){i.res.animate(Q.keyframesOpen,Q.openOptions)}),window.addEventListener(i.closeTag,function(){i.res.animate(Q.keyframesClose,Q.closeOptions)}))}if(i.options.animation&&i.options.animation.op.fireAt&&i.options.animation.op.fireAt.endsWith("px")){var X=i.options.animation.op;i.res.animate(X.keyframesClose,{duration:0,fill:"forwards"});var U=function(){window.scrollY>parseFloat(X.fireAt)&&(i.res.animate(X.keyframesOpen,X.openOptions),window.removeEventListener("scroll",U))};window.addEventListener("scroll",U)}if(i.options.animation&&"inview"===i.options.animation.op.fireAt){var V=i.options.animation.op;i.res.animate(V.keyframesClose,{duration:0,fill:"forwards"});var K=!1;new IntersectionObserver(function(e,t){e.forEach(function(e){e.isIntersecting&&!K&&(K=!0,i.res.animate(V.keyframesOpen,V.openOptions),t.disconnect())})}).observe(i.res)}}};this.options.animation||window.addEventListener("resize",function(){return c()}),c()}},{key:"maxWidth",value:function(e){return this.res.style.maxWidth=e,this}},{key:"removeQuotesFromFirstWord",value:function(e){return e.replace(/"([^"]+)":/g,"$1:")}},{key:"arrayMargin",value:function(e,t){return e.includes("left")&&(this.res.style.marginLeft=t),e.includes("right")&&(this.res.style.marginRight=t),e.includes("top")&&(this.res.style.marginTop=t),e.includes("bottom")&&(this.res.style.marginBottom=t),e.includes("all")&&(this.res.style.margin=t),t||(this.res.style.marginBottom=e),this}}],t&&a(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}());module.exports=t})();
1
+ (()=>{"use strict";var e={d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};function r(e){return r="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},r(e)}function n(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=i(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,s=function(){};return{s,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:s}}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 o,a=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){l=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw o}}}}function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,s,i,o,a=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(a.push(n.value),a.length!==t);l=!0);}catch(e){c=!0,s=e}finally{try{if(!l&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw s}}return a}}(e,t)||i(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){if(e){if("string"==typeof e)return o(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,l(n.key),n)}}function l(e){var t=function(e){if("object"!=r(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==r(t)?t:t+""}function c(e){return c="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},c(e)}function u(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=h(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,s=function(){};return{s,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:s}}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,o=!0,a=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){a=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(a)throw i}}}}function h(e,t){if(e){if("string"==typeof e)return d(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?d(e,t):void 0}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function p(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,y(n.key),n)}}function y(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}function f(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(f=function(){return!!e})()}function m(){return m="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=v(e)););return e}(e,t);if(n){var s=Object.getOwnPropertyDescriptor(n,t);return s.get?s.get.call(arguments.length<3?e:r):s.value}},m.apply(null,arguments)}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}function g(e,t){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},g(e,t)}e.r(t),e.d(t,{Wrapper:()=>b});var b=function(e){function t(e){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,r){return t=v(t),function(e,t){if(t&&("object"==c(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,f()?Reflect.construct(t,r||[],v(e).constructor):t.apply(e,r))}(this,t)).res=null,r.setup(e),r.code=[],r.isLast=!1,r.constrObj=e,r.code.push("\n new Wrapper() \n"),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&g(e,t)}(t,e),r=t,n=[{key:"isLasta",value:function(){return this.isLast=!0,this}},{key:"toCode",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(this.code=[],this.excludeFromCodeTrue)return[""];var t=" ".repeat(e),r="".concat(t,'new Wrapper("').concat(this.constrObj,'")');if(this.constrObj||(r="".concat(t,"new Wrapper()")),Object.keys(this.obj).length){var n=Object.fromEntries(Object.entries(this.obj).filter(function(e){var t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,s,i,o,a=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(a.push(n.value),a.length!==t);l=!0);}catch(e){c=!0,s=e}finally{try{if(!l&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw s}}return a}}(e,t)||h(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e,2);return t[0],null!==t[1]})),s=JSON.stringify(n,null,2).replace(/"([^"]+)":/g,"$1:");r+="\n".concat(t," .set(").concat(s,")")}return this.items.length&&(r+="\n".concat(t," .add([\n")+this.items.map(function(t){return t.toCode(e+4)}).join(",\n")+"\n".concat(t," ])")),[r+="\n".concat(t)]}},{key:"getType",value:function(){return"LayoutWrapperElement"}},{key:"setArea",value:function(e){return this.res.style.gridArea=e,this}},{key:"removeQuotesFromFirstWord",value:function(e){return e.replace(/"([^"]+)":/g,"$1:")}},{key:"clicked",value:function(e){return this.res.addEventListener("click",e),this}},{key:"gpos",value:function(e){return this.res.style.gridColumn=e.col,this.res.style.gridRow=e.row,this}},{key:"set",value:function(e){this.obj=e,this.commonMethods(e);var r=".set({";e.isHidden&&this.isHidden(e.isHidden),e.scale&&(this.res.style.scale=e.scale),e.scale&&(r+="scale: ".concat(e.scale)),e.keySet&&this.keySet(e.keySet),e.resprop&&this.resprop(e.resprop),e.position&&(this.res.style.position=e.position),void 0!==e.top&&(this.res.style.top=e.top),e.pad&&this.pad(e.pad),e.mar&&this.mar(e.mar),e.arrpad&&(r+="pad: {sides: [".concat(e.arrpad.sides.map(function(e){return'"'.concat(e,'"')}).join(", "),'], value: "').concat(e.arrpad.value,'"}, ')),e.gpos&&this.gpos(e.gpos);var n,s,i,o=[];if(e.stroke||e.gradient||e.span||e.backgroundOp||e.layout||e.shadow||e.animation||e.filtera||e.transform){e.gradient&&(this.globalGradient=e.gradient.op.gradient,"radial"===e.gradient.op.direction&&(this.globalGradient="radial-gradient(circle at center, orange, green)")),e.stroke&&(n=t,s=this,"function"==typeof(i=m(v(1&3?n.prototype:n),"setAny",s))?function(e){return i.apply(s,e)}:i)([{globalBlast:"".concat(e.stroke.op.width," ").concat(e.stroke.op.color)}]),e.span&&(e.span.prevText=this.text);var a=[e.stroke,e.gradient,e.animation,e.span,e.backgroundOp,e.layout,e.marginOp,e.shadow,e.animation,e.filtera,e.transform];a=a.filter(function(e){return null!=e});for(var l=0;l<a.length;l++)o.push({range:a[l].range,log:a[l].op.name,target:a[l].target,op:a[l].op});var c=[];e.borderObj&&c.push("border"),e.background&&c.push("background"),e.mar&&c.push("margin"),e.animation&&c.push("animation"),e.span&&c.push("span"),e.transform&&c.push("transform"),e.gradient&&c.push("gradient"),e.blast,console.log("CARA IS "),console.log(o),this.options=e,this.chainReact(o,this.options.id,c)}if(e.centerColumn&&(this.res.style.display="flex",this.res.style.flexDirection="column",this.res.style.alignItems="center",e.centerColumn&&(r+="centerColumn: ".concat(e.centerColumn,","))),e.mboth&&(this.res.style.marginRight="auto")&&(this.res.style.marginLeft="auto"),e.mar&&this.mar(e.mar),e.sticky&&this.sticky(),e.transition&&(this.res.style.transition=e.transition),e.class&&this.res.setAttribute("class",e.class),e.ga&&(this.res.style.gridArea=e.ga),e.opacity&&(0==e.opacity&&(this.res.style.opacity=0),e.opacity&&(this.res.style.opacity=e.opacity)),e.maxHeight&&(this.res.style.maxHeight=e.maxHeight),e.id&&this.res.setAttribute("id",e.id),e.arrpad&&this.arrayPadding(e.arrpad.sides,e.arrpad.value),e.arrpad&&(r+="arrpad: {sides: [".concat(e.arrpad.sides.map(function(e){return'"'.concat(e,'"')}).join(", "),'], value: "').concat(e.arrpad.value,'"}, ')),e.arrayMargin&&this.arrayMargin(e.arrayMargin.sides,e.arrayMargin.value),e.arrayMargin&&(r+='\n arrayMargin: {sides: ["'.concat(e.arrayMargin.sides,'"], value: "').concat(e.arrayMargin.value,'"},')),e.center&&this.toCenter(e.center),e.center&&(r+='center: "'.concat(e.center,'",')),e.simpleCenter&&this.simpleCenter(),e.simpleCenter&&(r+='center: "'.concat(e.simpleCenter,'",')),e.filter&&(this.res.style.backdropFilter="blur(3px)"),e.radius&&this.corner(e.radius),e.radius&&(r+='\n radius: "'.concat(e.radius,'",')),e.border&&this.border(e.border),e.simpleBorder&&(this.res.style.border=e.simpleBorder),e.width&&this.width(e.width),e.width&&(r+='\n width: "'.concat(e.width,'",')),e.overflow&&(this.res.style.overflow="hidden"),e.overflow&&(r+='\n overflow: "'.concat(e.overflow,'",')),e.height&&this.heightNoAuto(e.height),e.height&&(r+='\n height: "'.concat(e.height,'",')),e.align&&this.flexAlign(e.align),e.align&&(r+='\n align: "'.concat(e.align,'",')),e.borderObj&&(this.res.style.borderRight="".concat(e.borderObj.width," solid ").concat(e.borderObj.color),this.res.style.borderRadius=e.borderObj.radius),e.borderObja&&(this.res.style.border="".concat(e.borderObja.width," solid ").concat(e.borderObja.color),this.res.style.borderRadius=e.borderObja.radius),e.font&&this.font(e.font),e.font&&(r+='font: "'.concat(e.font,'",')),e.maxWidth&&this.maxWidth(e.maxWidth),e.flexCenter&&this.flexc(e.flexCenter),e.multipad&&this.makeMultiPad(e.multipad),e.multimargin&&this.makeMultiMargin(e.multimargin),e.color&&this.color(e.color),e.background&&this.background(e.background),e.background&&(r+='background: "'.concat(e.background,'",')),e.weight&&this.weight(e.weight),e.paddings&&this.paddingo(e.paddings),e.area&&this.setArea(e.area),e.area&&(r+='area: "'.concat(e.area,'"')),e.column&&this.makeCol(),e.column&&(r+='\n column: "'.concat(e.column,'",')),e.alignIts&&(this.res.style.background="gray"),e.alignIts&&(this.res.style.alignItems="flex-start"),e.alignIts&&(this.res.style.justifyItems="flex-start"),e.customAlign&&(this.res.style.alignItems=e.customAlign),e.customJustify&&(this.res.style.justifyItems=e.customJustify),e.disp&&(this.res.style.display=e.disp),e.flexDir&&(this.res.style.flexDirection=e.flexDir),e.flexDir&&(this.res.style.display="flex"),e.flexDir&&(r+='\n flexDir: "'.concat(e.flexDir,'",')),e.zIndex&&(this.res.style.zIndex=e.zIndex),e.transform&&this.reactOnTransform(e.transform),e.name&&(this.name=e.name),e.responsive&&this.rsp(e.responsive),e.stretch){e.stretch&&this.stretch(e.stretch);var h=this.removeQuotesFromFirstWord(JSON.stringify(e.stretch));r+="\n stretch: ".concat(h,",")}for(var d in e)if("margin"===d){var p=e[d];if(Array.isArray(p)&&p.length>0){var y,f=u(p);try{for(f.s();!(y=f.n()).done;){var g=y.value;g.hasOwnProperty("top")&&(this.res.style.marginTop=g.top),g.hasOwnProperty("right")&&(this.res.style.marginRight=g.right),g.hasOwnProperty("bottom")&&(this.res.style.marginBottom=g.bottom),g.hasOwnProperty("left")&&(this.res.style.marginLeft=g.left)}}catch(e){f.e(e)}finally{f.f()}}}return 8===(r+="})\n").length&&(r=""),this.code.push(r),this}},{key:"rsp",value:function(e){var t=this;this.res.style.display="flex";var r=e.sequence.split("-"),n=function(){var n=e.ranges;"0px"!==n[0]&&n.unshift("0px");for(var s=0;s<n.length-1;s++)(window.matchMedia("(min-width: ".concat(n[s],") and (max-width: ").concat(n[s+1],")")).matches||window.matchMedia("(min-width: ".concat(n[n.length-1],")")).matches)&&("row"===r[s]&&(t.res.style.flexDirection="row",t.res.style.border="3px solid green"),"col"===r[s]&&(t.res.style.flexDirection="column",t.res.style.border="3px solid purple"));return t};window.addEventListener("resize",n),n()}},{key:"sticky",value:function(){return this.res.style.position="sticky",this.res.style.top=0,this}},{key:"toSticky",value:function(){return this.res.style.position="sticky",this.res.style.top="0",this}},{key:"stretch",value:function(e){var t=this,r=function(){window.matchMedia("(max-width: ".concat(e.at,")")).matches?t.res.style.width="auto":window.matchMedia("(max-device-width: 415px)").matches?t.res.style.width="100%":t.res.style.width=e.backTo};r(),window.addEventListener("resize",r)}},{key:"makeCol",value:function(){return this.res.style.display="flex",this.res.style.flexDirection="column",this.res.style.alignItems="flex-start",this}},{key:"paddingo",value:function(e){return this.res.style.padding=e,this}},{key:"toCenter",value:function(e){return this.res.style.display="flex",this.res.style.flexDirection="column",this.res.style.justifyContent="center","both"===e&&(this.res.style.alignItems="center"),this}},{key:"simpleCenter",value:function(){return this.res.style.justifyContent="center",this.res.style.justifyItems="center",this.res.style.alignContent="center",this.res.style.alignItems="center",this}},{key:"color",value:function(e){return this.res.style.color=e,this}},{key:"weight",value:function(e){return this.res.style.fontWeight=e,this}},{key:"makeMultiPad",value:function(e){for(var t=0;t<e.length;t++)"left"===e[t].side&&(this.res.style.paddingLeft=e[t].value),"right"===e[t].side&&(this.res.style.paddingRight=e[t].value);return this}},{key:"makeMultiMargin",value:function(e){this.res.style.zIndex="1";for(var t=0;t<e.length;t++)"left"===e[t].side&&(this.res.style.marginLeft=e[t].value),"right"===e[t].side&&(this.res.style.marginRight=e[t].value),"top"===e[t].side&&(this.res.style.marginTop=e[t].value),"bottom"===e[t].side&&(this.res.style.marginBottom=e[t].value);return this}},{key:"flexc",value:function(e){return this.res.style.display="flex",this.res.style.flexDirection="column",this.res.style.justifyContent="center",this}},{key:"maxWidth",value:function(e){return this.res.style.maxWidth=e,this}},{key:"font",value:function(e){return this.res.style.fontFamily=e,this}},{key:"flexAlign",value:function(e){return this.res.style.display="flex",this.res.style.justifyContent="flex-start",this.res.style.alignItems="flex-start","center"===e?(this.res.style.display="flex",this.res.style.flexDirection="column",this.res.style.alignItems="center",this):this}},{key:"width",value:function(e){return this.res.style.width=e,this}},{key:"heightNoAuto",value:function(e){return this.res.style.height=e,this}},{key:"border",value:function(e){return this.res.style.borderRadius="".concat(e.radius,"px"),this.res.style.padding="0.25em",this.res.style.border="".concat(e.width,"px solid ").concat(e.color),this}},{key:"toCol",value:function(){return this.res.style.display="flex",this.res.style.flexDirection="column",this.res.style.justifyContent="center",this.res.style.alignItems="center",this}},{key:"add",value:function(e){this.items=e,this.code.push(".add([ \n");var t=e.map(function(t,r){return t.toCode().flatMap(function(e){return e}).join("")+(r<e.length-1?",":"")}).join("");this.code.push(t);for(var r=0;r<e.length;r++)if(void 0!==e[r]&&void 0!==e[r].toCode){var n=e[r].render();this.res.appendChild(n)}return this.code.push("])"),this}},{key:"arrayPadding",value:function(e,t){return e.includes("left")&&(this.res.style.paddingLeft=t),e.includes("right")&&(this.res.style.paddingRight=t),e.includes("top")&&(this.res.style.paddingTop=t),e.includes("bottom")&&(this.res.style.paddingBottom=t),this}},{key:"arrayMargin",value:function(e,t){return t||(this.res.style.marginLeft="".concat(e[0],"px"),this.res.style.marginTop="".concat(e[1],"px"),this.res.style.marginRight="".concat(e[2],"px"),this.res.style.marginBottom="".concat(e[3],"px")),e.includes("left")&&(this.res.style.marginLeft=t),e.includes("right")&&(this.res.style.marginRight=t),e.includes("top")&&(this.res.style.marginTop=t),e.includes("bottom")&&(this.res.style.marginBottom=t),this}},{key:"setWidth",value:function(e){this.res.style.width="100vw"}},{key:"setHeight",value:function(e){return this.res.style.height="".concat(e),this}},{key:"setup",value:function(e){var t=null;return e?(e.isLink&&(t=document.createElement("a")),"aside"===e&&(t=document.createElement("aside")),"article"===e&&(t=document.createElement("article")),"main"===e&&(t=document.createElement("main")),"section"===e&&(t=document.createElement("section")),"header"===e&&(t=document.createElement("header")),"footer"===e&&(t=document.createElement("footer"))):t=document.createElement("div"),e&&e.isLink&&(t.style.textDecoration="none",t.setAttribute("href",e.child)),this.res=t,this.res.style.margin=0,this.res.style.padding=0,e&&!0===e.hideOverflow&&(this.res.style.overflow="hidden",this.res.style.overflowY="scroll"),e&&!0===e.center&&(this.res.style.display="flex",this.res.style.flexDirection="column",this.res.style.justifyContent="center",this.res.style.alignItems="center"),e&&"left"===e.align&&(this.res.style.alignItems="flex-start"),e&&"right"===e.align&&(this.res.style.alignItems="flex-end"),e&&e.height&&(this.res.style.height=e.height),e&&e.width&&(this.res.style.width=e.width,this.res.style.marginLeft="auto",this.res.style.marginRight="auto",window.matchMedia("(max-device-width: 415px)").matches&&(this.res.style.width="95%")),this}},{key:"height",value:function(e){return this.res.style.width="auto",this.res.style.height="".concat(e),this}},{key:"size",value:function(e,t){return this.w=e,this.h=t,this.w?this.res.style.width=this.w:this.res.style.width=window.innerWidth,this.h?this.res.style.height=this.h:this.res.style.height=window.innerHeight,this}},{key:"background",value:function(e){return this.res.style.background=e,this}},{key:"corner",value:function(e){return this.res.style.borderRadius=e,this}},{key:"padding",value:function(e,t,r,n){return this.res.style.paddingLeft=e,this.res.style.paddingTop=t,this.res.style.paddingRight=r,this.res.style.paddingBottom=n,this}},{key:"margin",value:function(e,t,r,n){return this.res.style.marginLeft=e,this.res.style.marginTop=t,this.res.style.marginRight=r,this.res.style.marginBottom=n,this}},{key:"itemWidth",value:function(e){for(var t=0;t<this.res.childNodes.length;t++)this.res.childNodes[t].style.width=e;return this}},{key:"apply",value:function(e){var t=this,r=function(){for(var r=0;r<e.length;r++){var n=e[r],s=window.matchMedia("(max-width: ".concat(n.width,"px)"));n.device&&(s=window.matchMedia("(max-device-width: ".concat(n.width,"px)")),alert(n.device)),s.matches&&Object.assign(t.res.style,n.styles)}},n=window.matchMedia("(max-width: ".concat(e[0].width,"px)"));return e[0].device&&(n=window.matchMedia("(max-device-width: ".concat(e[0].width,"px)"))),n.matches||Object.assign(this.res.style,e[0].styles),r(),window.addEventListener("resize",r),this}},{key:"mount",value:function(e){document.querySelector(e).appendChild(this.res)}},{key:"render",value:function(e){return e?(document.querySelector("#mount"),document.querySelector(e).appendChild(this.res),this):this.res}}],n&&p(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(function(){return e=function e(){var t,r,n,s=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=this,n=function(e){if(console.log("LOBJO IS"),console.log("REPO"),console.log(s.res),console.log(e),e.transform||e.op){console.log("SIMPLIFIED"),console.log(e.transform),console.log(e.op);var t=e.op;e.transform||(t=e.op),t.duration||(t.duration="3s-ease-in-out"),console.log("ENTERING"),console.log(t),s.setDefault=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"0px";return 0===e.length?t+" ":e};var r=function(){var r="",n="",i="",o="",a="",l="",c="",u="",h="";if(console.log("ERRA - still nested"),console.log(t),0!==t.values.length){console.warn(t),t.values.forEach(function(e){e.startsWith("tx:")&&(r=e.replace("tx:","")),e.startsWith("ty:")&&(n=e.replace("ty:","")),e.startsWith("tz:")?i=e.replace("tz:",""):e.startsWith("scale(")?o=e:e.startsWith("skew(")?a=e:e.startsWith("rotate(")?l=function(e){var t=e.match(/rotate\(([^)]+)\)/);if(!t)return e;var r=t[1].split(",").map(function(e){return e.trim()});return 1===r.length?"rotate(".concat(r[0],")"):2===r.length?"rotateX(".concat(r[0],") rotateY(").concat(r[1],")"):3===r.length?"rotateX(".concat(r[0],") rotateY(").concat(r[1],") rotate(").concat(r[2],")"):e}(e):e.startsWith("perspective(")?c=e:e.startsWith("matrix(")?u=e:e.startsWith("opacity:")&&(h=e.replace("opacity:",""))}),r=s.setDefault(r),n=s.setDefault(n),i=s.setDefault(i);var d="";if("0px"!=n&&"0px"!=r&&"0px"!=i?d+="translate3d(".concat(r,", ").concat(n,", ").concat(i,")"):"0px"==n&&"0px"==r||(d+="translate(".concat(r,", ").concat(n,")")),o&&(d+=" ".concat(o)),l&&(d+=" ".concat(l)),a&&(d+=" ".concat(a)),c&&(d+=" ".concat(c)),u&&(d+=" ".concat(u)),d){if(e.op.duration){var p=e.op.duration.replace(/^(\d+)(s)-/,function(e,t,r){return t/2+r+" "}),y="transform ".concat(p,", opacity ").concat(p);s.res.style.transition=y}else s.res.style.transition="transform 3s ease-in-out, opacity 3s ease-in-out";e.op.static&&(s.res.style.transition=""),(s.blastTarget||s.res).style.transform=d,s.res.style.opacity=h}else alert("OPE")}};t.on?s.res.addEventListener(t.on,function(){t.delay?setTimeout(function(){r()},t.delay):r()}):window.addEventListener("load",function(){t.delay?setTimeout(function(){r()},t.delay):r()});var n=function(){var e="";console.log("RESET"),console.log(t),t.values.forEach(function(t){t.startsWith("tx:")?e+="translateX(0) ":t.startsWith("ty:")?e+="translateY(0) ":t.startsWith("tz:")?e+="translateZ(0) ":t.startsWith("scale(")?e+="scale(1) ":t.startsWith("skew(")?e+="skew(0, 0) ":t.startsWith("rotate(")?e+="rotate(0) ":t.startsWith("perspective(")?e+="perspective(0) ":t.startsWith("matrix(")&&(e+="matrix(1, 0, 0, 1, 0, 0) "),s.res.style.opacity="1"}),e&&(s.res.style.transform=e.trim())};if(t.on)s.res.addEventListener("mouseout",function(){t.keep||n()});else{var i=1e3*parseFloat(t.duration),o=t.closeAfter?t.closeAfter:0;setTimeout(function(){t.keep||n()},i/2+o)}t.hardCSS&&(s.res.style.transform=t.hardCSS)}else alert("THIS FIRE WITH GRADIENT (invalid block"),console.log("INVALID BLOCKA"),console.log(e)},(r=l(r="reactOnTransform"))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,this.state={isExpanded:!1,isMovedUp:!1,isMovedDown:!1},this.openedElements=new WeakMap},t=[{key:"isHidden",value:function(e){e&&(this.res.style.display="none")}},{key:"keySet",value:function(e){return this.temporaryVal=1,this.res.style[e.key]=e.value,this}},{key:"commonMethods",value:function(e){var t={exact:"fontSize",zIndex:"zIndex",position:"position",top:"top",cursor:"cursor",width:"width",maxWidth:"maxWidth",height:"height",maxHeight:"maxHeight",radius:"borderRadius",lineHeight:"lineHeight",background:"background",font:"fontFamily",opacity:"opacity"};for(var r in t)null!=e[r]&&(this.res.style[t[r]]=e[r]);return e.pad&&this.pad(e.pad),e.mar&&this.mar(e.mar),e.respad&&this.respad(e.respad),e.resmar&&this.resmar(e.resmar),e.hover&&this.hover(e.hover),e.size&&this.fluidCopy(e.size),e.resprop&&this.resprop(e.resprop,e),e.keySet&&this.keySet(e.keySet),e.hide&&this.isHidden(e.hide),e.transform&&this.reactOnTransform(e.transform),void 0!==e.opacity&&(this.res.style.opacity=e.opacity),e.bold?this.res.style.fontWeight="bold":null!=e.weight&&(this.res.style.fontWeight=e.weight),this}},{key:"hover",value:function(e){var t=this;if(e.border){var r=e.border.width;this.res.style.border=r?"".concat(r,"px solid transparent"):"1px solid transparent"}var n=this.options.borderObj;return n&&(this.res.style.border="".concat(n.width,"px solid ").concat(n.color)),this.prevColor=this.res.style.backgroundColor,this.foreColor=this.res.style.color,this.prevBorder=this.res.style.border,e.animation&&(this.res.style.transition="".concat(e.animation),this.res.style.transionProperty="background, color"),this.res.onmouseout=function(){t.res.style.backgroundColor="".concat(t.prevColor),t.res.style.color="".concat(t.foreColor),t.res.style.border=t.prevBorder},this.res.onmouseover=function(){if(t.res.style.color=e.color,t.res.style.backgroundColor=e.background,e.border){var r,n=e.border.width,s=null!==(r=e.border.color)&&void 0!==r?r:"#2ECC71";t.res.style.border=n?"".concat(n,"px solid ").concat(s):"1px solid #2ECC71"}},this}},{key:"onScroll",value:function(e){var t=this;"opacity"===e.value?this.res.style.opacity=e.valMin:"scale"===e.value&&(this.res.style.transform="scale(".concat(e.valMax,")")),window.addEventListener("scroll",function(){var r=t.smartRange(window.scrollY,{min:e.from,max:e.to},{min:e.valMin,max:e.valMax});"opacity"===e.value?t.res.style.opacity=r:"scale"===e.value&&(t.res.style.transform="scale(".concat(r,")"))})}},{key:"setAny",value:function(e){this[Object.keys(e)[0]]=[Object.values(e)[0]]}},{key:"setID",value:function(e){this.id=e}},{key:"setPrevText",value:function(e){this.prevText=e}},{key:"getCSS",value:function(){return this.css}},{key:"getPX",value:function(e){return{xs:"0px",sm:"576px",md:"768px",lg:"992px",xl:"1200px",xxl:"1400px",mxxl:"1800px"}[e]||"Invalid breakpoint"}},{key:"_setupResponsiveManager",value:function(){var e=this;this._responsiveTasks=this._responsiveTasks||[];var t=function(){e._responsiveTasks.forEach(function(e){e()})};this._responsiveHandler||(this._responsiveHandler=t,window.addEventListener("resize",t)),setTimeout(function(){t()},0)}},{key:"resprop",value:function(e,t){var r=this;this.options=t;var n={default:[0,1e5],xs:[0,575],sm:[576,767],md:[768,991],lg:[992,1199],xl:[1200,1399],xxl:[1400,1e5]},i=["resprop","breakpoint","value","values","range"];e.forEach(function(e){void 0!==n[e.breakpoint]?e.range=n[e.breakpoint]:Array.isArray(e.breakpoint)&&2===e.breakpoint.length?e.range=[parseInt(e.breakpoint[0],10),parseInt(e.breakpoint[1],10)]:e.range=[0,parseInt(e.breakpoint,10)]}),e.sort(function(e,t){return e.range[1]-t.range[1]});var o=e.find(function(e){return"default"===e.breakpoint});for(var a in o||(o={breakpoint:"default",range:n.default},e.unshift(o)),this.prevStyles={},this.res.style)this.res.style.hasOwnProperty(a)&&isNaN(parseInt(a))&&(this.prevStyles[a]=this.res.style[a]);var l=new Set;e.forEach(function(e){Object.keys(e).forEach(function(e){i.includes(e)||"range"===e||l.add(e)})}),l.forEach(function(e){void 0===o[e]&&(o[e]=r.options[e]||"initial")}),this._responsiveTasks=this._responsiveTasks||[],this._responsiveTasks.push(function(){for(var t=window.innerWidth,n=o,a=0;a<e.length;a++){var c=e[a],u=s(c.range,2),h=u[0],d=u[1];if("default"!==c.breakpoint&&t>=h&&t<=d){n=c;break}}for(var p in l.forEach(function(e){if("keySet"===e){var t=o[e];t&&t.key&&(r.res.style[t.key]=t.value)}else r.res.style[e]=o[e]}),n)if("exact"===p&&(console.log("APPL"),console.log(n),console.log(r.set),r.set(n)),!i.includes(p)&&"range"!==p){var y=n[p];"keySet"===p&&y&&y.key?r.res.style[y.key]=y.value:"function"==typeof r[p]?r[p](y):r.res.style[p]=y}}),this._setupResponsiveManager()}},{key:"respad",value:function(e){var t=this,r={default:[0,1e5],xs:[0,575],sm:[576,767],md:[768,991],lg:[992,1199],xl:[1200,1399],xxl:[1400,1e5]};e.forEach(function(e){void 0!==r[e.breakpoint]?e.range=r[e.breakpoint]:Array.isArray(e.breakpoint)&&2===e.breakpoint.length?e.range=[parseInt(e.breakpoint[0],10),parseInt(e.breakpoint[1],10)]:e.range=[parseInt(e.breakpoint,10),1e5]}),e.sort(function(e,t){return e.range[0]-t.range[0]});var n=e.find(function(e){return"default"===e.breakpoint});n||(n={breakpoint:"default",range:r.default},e.unshift(n)),void 0===n.values&&(n.values=this.options.pad||null),this._responsiveTasks=this._responsiveTasks||[],this._responsiveTasks.push(function(){for(var r=window.innerWidth,i=n,o=0;o<e.length;o++){var a=e[o],l=s(a.range,2),c=l[0],u=l[1];if("default"!==a.breakpoint&&r>=c&&r<=u){i=a;break}}var h=void 0!==i.values?i.values:n.values;null!=h&&t.pad(h)}),this._setupResponsiveManager()}},{key:"_applyResponsive",value:function(e,t){var r={default:[0,1e5],xs:[0,575],sm:[576,767],md:[768,991],lg:[992,1199],xl:[1200,1399],xxl:[1400,1e5]};e.forEach(function(e){if(void 0!==r[e.breakpoint])e.range=r[e.breakpoint];else{var t=parseInt(e.breakpoint,10);e.range=[t,1e5]}}),e.sort(function(e,t){return e.range[0]-t.range[0]});var n=e.find(function(e){return"default"===e.breakpoint})||{breakpoint:"default",range:r.default},i=function(){for(var r=window.innerWidth,i=n,o=0;o<e.length;o++){var a=e[o],l=s(a.range,2),c=l[0],u=l[1];if("default"!==a.breakpoint&&r>=c&&r<=u){i=a;break}}t(i)};this._responsiveHandler&&window.removeEventListener("resize",this._responsiveHandler),this._responsiveHandler=i,window.addEventListener("resize",i),setTimeout(function(){i()},0)}},{key:"resmar",value:function(e){var t=this,r={default:[0,1e5],xs:[0,575],sm:[576,767],md:[768,991],lg:[992,1199],xl:[1200,1399],xxl:[1400,1e5]};e.forEach(function(e){void 0!==r[e.breakpoint]?e.range=r[e.breakpoint]:Array.isArray(e.breakpoint)&&2===e.breakpoint.length?e.range=[parseInt(e.breakpoint[0],10),parseInt(e.breakpoint[1],10)]:e.range=[parseInt(e.breakpoint,10),1e5]}),e.sort(function(e,t){return e.range[0]-t.range[0]});var n=e.find(function(e){return"default"===e.breakpoint});n||(n={breakpoint:"default",range:r.default},e.unshift(n)),void 0===n.values&&(n.values=this.options.pad||null),this._responsiveTasks=this._responsiveTasks||[],this._responsiveTasks.push(function(){for(var r=window.innerWidth,i=n,o=0;o<e.length;o++){var a=e[o],l=s(a.range,2),c=l[0],u=l[1];if("default"!==a.breakpoint&&r>=c&&r<=u){i=a;break}}var h=void 0!==i.values?i.values:n.values;null!=h&&t.mar(h)}),this._setupResponsiveManager()}},{key:"isNumber",value:function(e){return"number"==typeof e&&!isNaN(e)}},{key:"pad",value:function(e){for(var t=0;t<e.length;t++)for(var r=Object.keys(e[t]),n=0;n<r.length;n++)for(var s=r[n],i=e[t][s],o=0;o<s.length;o++)switch(s[o]){case"a":this.res.style.padding=this.isNumber(i)?"".concat(i,"px"):i;break;case"t":this.res.style.paddingTop=this.isNumber(i)?"".concat(i,"px"):i;break;case"l":this.res.style.paddingLeft=this.isNumber(i)?"".concat(i,"px"):i;break;case"r":this.res.style.paddingRight=this.isNumber(i)?"".concat(i,"px"):i;break;case"b":this.res.style.paddingBottom=this.isNumber(i)?"".concat(i,"px"):i}return this}},{key:"as",value:function(e){return this.res.style.alignSelf=e,this}},{key:"mar",value:function(e){for(var t=0;t<e.length;t++)for(var r=Object.keys(e[t]),n=0;n<r.length;n++)for(var s=r[n],i=e[t][s],o=0;o<s.length;o++){switch(s[o]){case"a":this.res.style.margin=this.isNumber(i)?"".concat(i,"px"):i;break;case"t":this.res.style.marginTop=this.isNumber(i)?"".concat(i,"px"):i;break;case"l":this.res.style.marginLeft=this.isNumber(i)?"".concat(i,"px"):i;break;case"r":this.res.style.marginRight=this.isNumber(i)?"".concat(i,"px"):i;break;case"b":this.res.style.marginBottom=this.isNumber(i)?"".concat(i,"px"):i}"auto"===s[o]&&(this.res.style.marginLeft="auto",this.res.style.marginRight="auto")}return this}},{key:"smartRange",value:function(e,t,r){e<t.min&&(e=t.min),e>t.max&&(e=t.max);var n=(e-t.min)/(t.max-t.min);t.min>t.max&&(n=(e-t.max)/(t.min-t.max));var s=(r.min-r.max)*n-r.min;if(s=Math.abs(s),r.min<r.max){var i=(r.max+Math.abs(r.min))*n;s=r.min+i}return s}},{key:"gpos",value:function(e){return this.res.style.gridColumn=e.col,this.res.style.gridRow=e.row,this}},{key:"fluidCopy",value:function(e){if(e instanceof Object){this.prevStylex=this.res.style,this.res=document.createElement("h1"),this.res.style.cssText=this.prevStylex.cssText;var t=document.createTextNode(this.text);return this.res.appendChild(t),this.res.style.fontSize=e.exact,this}if("S1"===e){this.prevStylex=this.res.style,this.res=document.createElement("h1"),this.res.style.cssText=this.prevStylex.cssText;var r=document.createTextNode(this.text);this.res.appendChild(r),this.res.style.fontSize="calc(1.625rem + 5.075vw)"}if("S2"===e){this.prevStylex=this.res.style,this.res=document.createElement("h2"),this.res.style.cssText=this.prevStylex.cssText;var n=document.createTextNode(this.text);this.res.appendChild(n),this.res.style.fontSize="calc(1.500rem + 4.3vw)"}if("S3"===e){this.prevStylex=this.res.style,this.res=document.createElement("h3"),this.res.style.cssText=this.prevStylex.cssText;var s=document.createTextNode(this.text);this.res.appendChild(s),this.res.style.fontSize="calc(1.375rem + 3.525vw)"}if("S4"===e){this.prevStylex=this.res.style,this.res=document.createElement("h4"),this.res.style.cssText=this.prevStylex.cssText;var i=document.createTextNode(this.text);this.res.appendChild(i),this.res.style.fontSize="calc(1.250rem + 2.75vw)"}if("S5"===e){this.prevStylex=this.res.style,this.res=document.createElement("h5"),this.res.style.cssText=this.prevStylex.cssText;var o=document.createTextNode(this.text);this.res.appendChild(o),this.res.style.fontSize="calc(1.125rem + 1.975vw)"}return"S6"===e&&(this.res.style.fontSize="calc(1rem + 0.5vw)"),this}},{key:"setIndex",value:function(e){this.index=e}},{key:"borderObj",value:function(e){var t,r=null!==(t=e.type)&&void 0!==t?t:"solid";return this.res.style.border="".concat(e.width," ").concat(r," ").concat(e.color),this.res.style.borderRadius=e.radius,this}},{key:"setPref",value:function(e){this.preffersId=e}},{key:"setClass",value:function(e){this.class=e}},{key:"setTags",value:function(e){this.openTag=e.open,this.closeTag=e.close,console.log("TAGS SET"),console.log(e)}},{key:"chainReact",value:function(e,t,r){var i=this;console.log("0P"),this.ap=!1,this.cta=0,this.once=!1;var o,a=n(e);try{for(a.s();!(o=a.n()).done;){var l=o.value;l.range||(l.range=["0px","999999px"])}}catch(e){a.e(e)}finally{a.f()}e.sort(function(e,t){return parseInt(e.range[0])-parseInt(t.range[0])});var c=function(o){var a=window.visualViewport.width,l=[],c=[];i.resCopy=i.res,i.storedQueries=e.map(function(e){return e.target}).filter(function(e){return null!=e});var u,h=n(e);try{for(h.s();!(u=h.n()).done;){var d=u.value;i.counterIndex++;var p=s(d.range,2),y=p[0],f=p[1],m=parseInt(y),v=parseInt(f),g=!0;if(d.target){g=!1;for(var b=0;b<d.target.length;b++)d.target[b]===t&&(g=!0)}a>=m&&a<=v&&g&&(l.push(d.log),c.push(d),d.op&&d.op.margin&&(i.useMargin=d.op.margin))}}catch(e){h.e(e)}finally{h.f()}if(r&&!r.includes("background")&&(i.res.style.background="",i.res.style.backgroundColor=""),i.res.style.textShadow="",r&&!r.includes("border")&&(i.res.style.border=""),r&&!r.includes("margin")&&(i.res.style.margin=""),i.res.style["-webkit-text-fill-color"]="",i.res.style["-webkit-text-stroke-color"]="",i.res.style["-webkit-text-stroke-width"]="",i.res.style.filter="",i.options.background&&(console.log(i.options.background),i.res.style.background=i.options.background),l.includes("gradient"),(l.includes("gradient")||l.includes("shadow"))&&(i.res.style.position="relative"),l.includes("blast")){var x,k=c.filter(function(e){return"blast"===e.log})[0].op.color,w=null!==(x=c.filter(function(e){return"blast"===e.log})[0].op.width)&&void 0!==x?x:"1px";"FlexRowLayoutElement"===i.getType()||"LayoutWrapperElement"===i.getType()?(i.res.style.border="".concat("number"==typeof w?w+"px":w," solid orange"),i.res.style.display="inline-block","FlexRowLayoutElement"===i.getType()&&(i.res.style.display="flex"),i.res.style.boxSizing="border-box",i.res.style.transformOrigin="center",i.blastTarget=i.res):(i.text,i.res.style["-webkit-text-fill-color"]="transparent",i.res.style["-webkit-text-stroke-color"]=k,i.res.style["-webkit-text-stroke-width"]="".concat(w))}if(l.includes("filter")){var S=c.filter(function(e){return"filter"===e.log})[0].op.filter;i.res.style.filter=S}if(l.includes("background")&&(i.res.style.backgroundColor="green"),l.includes("gradient")&&("LayoutWrapperElement"!==i.getType()&&"FlexRowLayoutElement"!==i.getType()&&(i.res.style["-webkit-text-fill-color"]="transparent"),i.res.style.background=i.globalGradient,"LayoutWrapperElement"!==i.getType()&&"FlexRowLayoutElement"!==i.getType()&&(i.res.style["background-clip"]="text")),l.includes("shadow")){var T,O,E,j,C=i.options.shadow.op;console.log("OP IS",C);var I=null!==(T=C.steps)&&void 0!==T?T:1,A=null!==(O=C.colors)&&void 0!==O?O:["gray"],W=null!==(E=C.movements)&&void 0!==E?E:["3px","3px"],L=null!==(j=C.radius)&&void 0!==j?j:"3px";if(1===W.length&&(W=[W[0],W[0]]),"FlexRowLayoutElement"===i.getType()||"LayoutWrapperElement"===i.getType()){for(var R=[],M=0;M<I;M++){var P,N=null!==(P=A[M])&&void 0!==P?P:A[0],_=W[0],z=W[1];R.push("".concat(_," ").concat(z," ").concat(L," ").concat(N))}i.res.style.boxShadow=R.join(", ")}else{for(var D=[],B=0;B<I;B++){var H,F=null!==(H=A[B])&&void 0!==H?H:A[0],G=W[0],Y=W[1];D.push("drop-shadow(".concat(G," ").concat(Y," ").concat(L," ").concat(F,")"))}i.res.style.filter=D.join(" ")}}if(l.includes("margin"))for(b=0;b<e.length;b++)if(e[b].op){var q=e[b].op.offsets;q&&void 0!==i.index&&(i.res.style.margin=q[Number(i.index)]+"px")}if(l.includes("spana")||l.includes("span")){var J=document.createElement("div");if(J.setAttribute("id","oroa"),Object.assign(J.style,{position:"absolute",inset:"0",background:"linear-gradient(90deg, rgb(52,152,219), rgb(26,188,156))",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",pointerEvents:"none"}),i.res&&i.res.querySelector("span"))return;i.res=i.resCopy,i.res.textContent="",i.options.span&&(Array.isArray(i.options.span)?i.options.span:[i.options.span]).forEach(function(e){if(e.op&&"span"===e.op.name&&Array.isArray(e.op.parts)){var t=0,r=i.prevText||"";if(e.op.parts.forEach(function(e){var n=e.text,s=e.style||{};if(t<r.length){var o=r.indexOf(n,t);if(o>t){var a=r.substring(t,o);i.res.appendChild(new i.constructor(a).setup({type:"span",id:s.id,animation:s.animation}).set({}).render())}t=o+n.length}var l=new i.constructor(n).setup({type:"span",id:s.id,animation:s.animation}).set(s).render();i.res.appendChild(l)}),t<r.length){var n=r.substring(t);i.res.appendChild(new i.constructor(n).setup({type:"span"}).set({}).render())}}})}else{var $=new i.constructor(i.prevText).set({}).render();i.prevText&&i.prevText.length>0&&o&&i.res.appendChild($)}if(l.includes("animation")){if(i.options.animation&&!i.hasAnimated&&!i.options.animation.op.fireAt){console.warn(i.openTag),i.hasAnimated=!0;var Q=i.options.animation.op;window.addEventListener("sidebar:open",function(){i.res.animate(Q.keyframesOpen,Q.openOptions)}),window.addEventListener("sidebar:closed",function(){i.res.animate(Q.keyframesClose,Q.closeOptions)}),i.res.animate(Q.keyframesClose,{duration:0,fill:"forwards"}),i.openTag&&i.closeTag&&(window.addEventListener(i.openTag,function(){i.res.animate(Q.keyframesOpen,Q.openOptions)}),window.addEventListener(i.closeTag,function(){i.res.animate(Q.keyframesClose,Q.closeOptions)}))}if(i.options.animation&&i.options.animation.op.fireAt&&i.options.animation.op.fireAt.endsWith("px")){var X=i.options.animation.op;i.res.animate(X.keyframesClose,{duration:0,fill:"forwards"});var U=function(){window.scrollY>parseFloat(X.fireAt)&&(i.res.animate(X.keyframesOpen,X.openOptions),window.removeEventListener("scroll",U))};window.addEventListener("scroll",U)}if(i.options.animation&&"inview"===i.options.animation.op.fireAt){var V=i.options.animation.op;i.res.animate(V.keyframesClose,{duration:0,fill:"forwards"});var K=!1;new IntersectionObserver(function(e,t){e.forEach(function(e){e.isIntersecting&&!K&&(K=!0,i.res.animate(V.keyframesOpen,V.openOptions),t.disconnect())})}).observe(i.res)}}};this.options.animation||window.addEventListener("resize",function(){return c()}),c()}},{key:"maxWidth",value:function(e){return this.res.style.maxWidth=e,this}},{key:"removeQuotesFromFirstWord",value:function(e){return e.replace(/"([^"]+)":/g,"$1:")}},{key:"arrayMargin",value:function(e,t){return e.includes("left")&&(this.res.style.marginLeft=t),e.includes("right")&&(this.res.style.marginRight=t),e.includes("top")&&(this.res.style.marginTop=t),e.includes("bottom")&&(this.res.style.marginBottom=t),e.includes("all")&&(this.res.style.margin=t),t||(this.res.style.marginBottom=e),this}}],t&&a(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}());module.exports=t})();