nodality 1.0.140 → 1.0.141
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.
- package/dist/animator.cjs.js +1 -1
- package/dist/animator.esm.js +1 -1
- package/dist/audionew.cjs.js +1 -1
- package/dist/audionew.esm.js +1 -1
- package/dist/beta-desktop-bar.cjs.js +1 -1
- package/dist/beta-desktop-bar.esm.js +1 -1
- package/dist/beta-mobile-bar.cjs.js +1 -1
- package/dist/beta-mobile-bar.esm.js +1 -1
- package/dist/bundle.umd.js +1 -1
- package/dist/button.cjs.js +1 -1
- package/dist/button.esm.js +1 -1
- package/dist/center.cjs.js +1 -1
- package/dist/center.esm.js +1 -1
- package/dist/checkbox.cjs.js +1 -1
- package/dist/checkbox.esm.js +1 -1
- package/dist/code.cjs.js +1 -1
- package/dist/code.esm.js +1 -1
- package/dist/container.cjs.js +1 -1
- package/dist/container.esm.js +1 -1
- package/dist/designer.cjs.js +1 -1
- package/dist/designer.esm.js +1 -1
- package/dist/dropdown.cjs.js +1 -1
- package/dist/dropdown.esm.js +1 -1
- package/dist/element-mapper.cjs.js +1 -1
- package/dist/element-mapper.esm.js +1 -1
- package/dist/finalresult.esm.js +1 -1
- package/dist/flex-card.cjs.js +1 -1
- package/dist/flex-card.esm.js +1 -1
- package/dist/flex-grid.cjs.js +1 -1
- package/dist/flex-grid.esm.js +1 -1
- package/dist/flex-row.cjs.js +1 -1
- package/dist/flex-row.esm.js +1 -1
- package/dist/floating-input.cjs.js +1 -1
- package/dist/floating-input.esm.js +1 -1
- package/dist/free.cjs.js +1 -1
- package/dist/free.esm.js +1 -1
- package/dist/image-picker.cjs.js +1 -1
- package/dist/image-picker.esm.js +1 -1
- package/dist/image.cjs.js +1 -1
- package/dist/image.esm.js +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/link-getter.cjs.js +1 -1
- package/dist/link-getter.esm.js +1 -1
- package/dist/link.cjs.js +1 -1
- package/dist/link.esm.js +1 -1
- package/dist/multiswitcher.cjs.js +1 -1
- package/dist/multiswitcher.esm.js +1 -1
- package/dist/new-nav-bar.cjs.js +1 -1
- package/dist/new-nav-bar.esm.js +1 -1
- package/dist/picker.cjs.js +1 -1
- package/dist/picker.esm.js +1 -1
- package/dist/side-nav-bar.cjs.js +1 -1
- package/dist/side-nav-bar.esm.js +1 -1
- package/dist/simple-bar.cjs.js +1 -1
- package/dist/simple-bar.esm.js +1 -1
- package/dist/slider-2025.cjs.js +1 -1
- package/dist/slider-2025.esm.js +1 -1
- package/dist/table.cjs.js +1 -1
- package/dist/table.esm.js +1 -1
- package/dist/text-field.cjs.js +1 -1
- package/dist/text-field.esm.js +1 -1
- package/dist/text.cjs.js +1 -1
- package/dist/text.esm.js +1 -1
- package/dist/ulist.cjs.js +1 -1
- package/dist/ulist.esm.js +1 -1
- package/dist/video.cjs.js +1 -1
- package/dist/video.esm.js +1 -1
- package/dist/zoom-card.cjs.js +1 -1
- package/dist/zoom-card.esm.js +1 -1
- package/layout/animator.js +7 -2
- package/layout/audio.js +1 -1
- package/layout/audionew.js +1 -1
- package/layout/base-2.js +1 -1
- package/layout/base.js +1 -1
- package/layout/beta-desktop-bar.js +1 -1
- package/layout/beta-mobile-bar.js +1 -1
- package/layout/box.js +1 -1
- package/layout/button.js +1 -1
- package/layout/cards.js +1 -1
- package/layout/center.js +1 -1
- package/layout/checkbox.js +1 -1
- package/layout/circle.js +1 -1
- package/layout/clean-row.js +1 -1
- package/layout/code.js +1 -1
- package/layout/container.js +9 -3
- package/layout/custom.js +1 -1
- package/layout/div-image.js +1 -1
- package/layout/dropdown-2025.js +1 -1
- package/layout/dropdown.js +1 -1
- package/layout/empty-element.js +1 -1
- package/layout/external-stylesheet.js +1 -1
- package/layout/flex-card.js +1 -1
- package/layout/flex-grid.js +1 -1
- package/layout/flex-row.js +6 -2
- package/layout/footer.js +1 -1
- package/layout/form-components/custom.js +1 -1
- package/layout/form-components/data-list.js +1 -1
- package/layout/form-components/floating-input.js +1 -1
- package/layout/form-components/form-all.js +1 -1
- package/layout/form-components/form.js +1 -1
- package/layout/form-components/image-picker.js +1 -1
- package/layout/form-components/picker.js +1 -1
- package/layout/form-components/radio.js +1 -1
- package/layout/form-components/radiogroup.js +1 -1
- package/layout/form-components/range.js +1 -1
- package/layout/free.js +1 -1
- package/layout/grid-new.js +1 -1
- package/layout/grid-switcher.js +1 -1
- package/layout/grid.js +1 -1
- package/layout/group.js +1 -1
- package/layout/header.js +1 -1
- package/layout/horizontal-scroller.js +1 -1
- package/layout/image-old.js +1 -1
- package/layout/image.js +1 -1
- package/layout/index.js +1 -1
- package/layout/label.js +1 -1
- package/layout/link.js +1 -1
- package/layout/list-OLD.js +1 -1
- package/layout/list.js +1 -1
- package/layout/meta-adder.js +1 -1
- package/layout/modal-2025.js +1 -1
- package/layout/modernwrap.js +1 -1
- package/layout/multiswitcher.js +1 -1
- package/layout/multiswitcherBeta.js +1 -1
- package/layout/nav-bar.js +1 -1
- package/layout/nav-factor/custom-div.js +1 -1
- package/layout/navBar-OLD.js +1 -1
- package/layout/new-flat-adder.js +1 -1
- package/layout/new-nav-bar.js +1 -1
- package/layout/offset-container.js +1 -1
- package/layout/polygon.js +1 -1
- package/layout/progress.js +1 -1
- package/layout/row.js +1 -1
- package/layout/saved-new-nav-bar.js +1 -1
- package/layout/scroll-video.js +1 -1
- package/layout/side-bar.js +1 -1
- package/layout/side-nav-bar.js +1 -1
- package/layout/simple-bar.js +1 -1
- package/layout/slider-2025.js +1 -1
- package/layout/spacer.js +1 -1
- package/layout/stack.js +1 -1
- package/layout/styler.js +1 -1
- package/layout/svg.js +1 -1
- package/layout/switcher.js +1 -1
- package/layout/table.js +1 -1
- package/layout/text-field.js +1 -1
- package/layout/text.js +1 -1
- package/layout/ulist.js +1 -1
- package/layout/video.js +1 -1
- package/layout/without-new.js +1 -1
- package/layout/wrap.js +1 -1
- package/layout/zoom-card.js +1 -1
- package/lib/card-getter.js +1 -1
- package/lib/designer.js +1 -1
- package/lib/element-mapper.js +1 -1
- package/lib/keyframe-animation.js +1 -1
- package/lib/link-getter.js +1 -1
- package/lib/scroll-video.js +1 -1
- package/lib/stacker.js +1 -1
- package/lib/theme.js +1 -1
- package/lib/transform-anim.js +1 -1
- package/package.json +1 -1
package/dist/table.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)}e.r(t),e.d(t,{Table:()=>w});var n="nodality.theme.mode",o="nodality:theme",s={mode:function(){try{var e=localStorage.getItem(n);if("light"===e||"dark"===e)return e}catch(e){}return"undefined"!=typeof window&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}(),tokens:{light:{},dark:{}},defaults:{light:{},dark:{}},setDefaults:function(e){return e&&"object"===r(e)&&(e.light&&(this.defaults.light=Object.assign({},this.defaults.light,e.light)),e.dark&&(this.defaults.dark=Object.assign({},this.defaults.dark,e.dark)),this._broadcast()),this},setTokens:function(e){return e&&"object"===r(e)&&(e.light&&Object.assign(this.tokens.light,e.light),e.dark&&Object.assign(this.tokens.dark,e.dark)),this},get current(){return this.tokens[this.mode]||{}},set:function(e){if("light"!==e&&"dark"!==e)return this;if(e===this.mode)return this;this.mode=e;try{localStorage.setItem(n,e)}catch(e){}return this._broadcast(),this},toggle:function(){return this.set("dark"===this.mode?"light":"dark")},subscribe:function(e){if("undefined"==typeof document)return function(){};var t=function(t){return e(t.detail.mode,t.detail.tokens)};document.addEventListener(o,t);try{e(this.mode,this.current)}catch(e){}return function(){return document.removeEventListener(o,t)}},_broadcast:function(){"undefined"!=typeof document&&document.dispatchEvent(new CustomEvent(o,{detail:{mode:this.mode,tokens:this.current}}))}};function i(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=l(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 s,i=!0,a=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){a=!0,s=e},f:function(){try{i||null==r.return||r.return()}finally{if(a)throw s}}}}function a(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)||l(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 l(e,t){if(e){if("string"==typeof e)return c(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)?c(e,t):void 0}}function c(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 u(e){return u="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},u(e)}function f(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,h(n.key),n)}}function h(e){var t=function(e){if("object"!=u(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=u(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==u(t)?t:t+""}function d(e){return d="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},d(e)}function p(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return y(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)?y(e,t):void 0}}(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 s,i=!0,a=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){a=!0,s=e},f:function(){try{i||null==r.return||r.return()}finally{if(a)throw s}}}}function y(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 v(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,m(n.key),n)}}function m(e){var t=function(e){if("object"!=d(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=d(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==d(t)?t:t+""}function g(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(g=function(){return!!e})()}function b(){return b="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=k(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}},b.apply(null,arguments)}function k(e){return k=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},k(e)}function x(e,t){return x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},x(e,t)}var w=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=k(t),function(e,t){if(t&&("object"==d(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,g()?Reflect.construct(t,r||[],k(e).constructor):t.apply(e,r))}(this,t)).res=document.createElement("table"),e.res.style.borderCollapse="separate",e.res.style.borderSpacing="0",e.res.style.overflow="hidden",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&&x(e,t)}(t,e),r=t,n=[{key:"add",value:function(e){this.data=e,this.datas=e;var t=Object.keys(e[0]);return this.generateTable(this.res,e),this.generateTableHead(this.res,t),this}},{key:"style",value:function(e){return e.font&&(this.res.style.fontFamily=e.font),this}},{key:"getType",value:function(){return"LayoutWrapperElement"}},{key:"set",value:function(e){return e.cellPadding&&this.cellPadding(e.cellPadding),e.cellAlign&&this.cellAlign(e.cellAlign),e.style&&this.style(e.style),e.headStyle&&this.headStyle(e.headStyle),e.border&&this.border(e.border),e.center&&this.center(e.center),e.borderRadius&&this.borderRadius(e.borderRadius),e.gradient&&(this.res.style.background=e.gradient.op.gradient,this.res.style.backgroundClip="padding-box"),this.obj=e,this.options=e,this.callReact(e),this}},{key:"callReact",value:function(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=b(k(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"),l.push("border"),console.log("ARA IS ",s),this.chainReact(s,this.options.id,l)}}},{key:"toCode",value:function(){var e=JSON.stringify(this.data,null,2),t=JSON.stringify(this.obj,null,2);return e=e.replace(/"(\w+)"\s*:/g,"$1:"),t=t.replace(/"(\w+)"\s*:/g,"$1:"),["new Table()\n .add(".concat(e,")\n .set(").concat(t,")")]}},{key:"borderRadius",value:function(e){return this.res.style.borderRadius="".concat(4*e,"px"),this.res.style.overflow="hidden",this}},{key:"center",value:function(){return this.res.style.marginLeft="auto",this.res.style.marginRight="auto",this}},{key:"cellPadding",value:function(e){var t,r=p(this.res.rows);try{for(r.s();!(t=r.n()).done;){var n,o=p(t.value.cells);try{for(o.s();!(n=o.n()).done;)n.value.style.padding=e}catch(e){o.e(e)}finally{o.f()}}}catch(e){r.e(e)}finally{r.f()}return this}},{key:"cellAlign",value:function(e){var t,r=p(this.res.rows);try{for(r.s();!(t=r.n()).done;){var n,o=p(t.value.cells);try{for(o.s();!(n=o.n()).done;)n.value.style.textAlign=e}catch(e){o.e(e)}finally{o.f()}}}catch(e){r.e(e)}finally{r.f()}return this}},{key:"headStyle",value:function(e){var t=this.res.rows[0];return t&&(t.style.color=e.color,e.background&&(t.style.backgroundColor=e.background)),this}},{key:"border",value:function(e){var t;this.res.style.borderCollapse="separate",this.res.style.borderSpacing="0",this.res.style.border=e,this.res.style.borderRadius="12px";var r,n=p(this.res.rows);try{for(n.s();!(r=n.n()).done;){var o,s=p(r.value.cells);try{for(s.s();!(o=s.n()).done;)o.value.style.border="none"}catch(e){s.e(e)}finally{s.f()}}}catch(e){n.e(e)}finally{n.f()}for(var i=0;i<this.res.rows.length-1;i++){var a,l=p(this.res.rows[i].cells);try{for(l.s();!(a=l.n()).done;)a.value.style.borderBottom=e}catch(e){l.e(e)}finally{l.f()}}var c,u=(null===(t=this.res.rows[0])||void 0===t?void 0:t.cells.length)||0,f=p(this.res.rows);try{for(f.s();!(c=f.n()).done;)for(var h=c.value,d=0;d<u-1;d++)h.cells[d].style.borderRight=e}catch(e){f.e(e)}finally{f.f()}return this}},{key:"generateTableHead",value:function(e,t){var r,n=e.createTHead().insertRow(),o=p(t);try{for(o.s();!(r=o.n()).done;){var s=r.value,i=document.createElement("th");i.textContent=s,n.appendChild(i)}}catch(e){o.e(e)}finally{o.f()}}},{key:"generateTable",value:function(e,t){var r,n=p(t);try{for(n.s();!(r=n.n()).done;){var o=r.value,s=e.insertRow();for(var i in o)s.insertCell().textContent=o[i]}}catch(e){n.e(e)}finally{n.f()}}},{key:"render",value:function(e){var t=document.createElement("div");if(t.style.overflowX="auto",t.appendChild(this.res),!e)return t;document.querySelector(e).appendChild(t)}}],n&&v(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="",f="";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:")&&(f=e.replace("opacity:",""))}),r=o.setDefault(r),n=o.setDefault(n),s=o.setDefault(s);var h="";if("0px"!=n&&"0px"!=r&&"0px"!=s?h+="translate3d(".concat(r,", ").concat(n,", ").concat(s,")"):"0px"==n&&"0px"==r||(h+="translate(".concat(r,", ").concat(n,")")),i&&(h+=" ".concat(i)),l&&(h+=" ".concat(l)),a&&(h+=" ".concat(a)),c&&(h+=" ".concat(c)),u&&(h+=" ".concat(u)),h){if(e.op.duration){var d=e.op.duration.replace(/^(\d+)(s)-/,function(e,t,r){return t/2+r+" "}),p="transform ".concat(d,", opacity ").concat(d);o.res.style.transition=p}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=h,o.res.style.opacity=f}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=h(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,"undefined"!=typeof document&&(this._themeUnsub=s.subscribe(function(e){return o._applyTheme(e)}),Promise.resolve().then(function(){return o._applyTheme(s.mode)}))},t=[{key:"isHidden",value:function(e){e&&(this.res.style.display="none")}},{key:"theme",value:function(e){var t=this;return e&&"object"===u(e)?(this._themeMap=e,this._applyTheme(s.mode),this._themeUnsub||(this._themeUnsub=s.subscribe(function(e){return t._applyTheme(e)})),this):this}},{key:"destroy",value:function(){return"function"==typeof this._themeUnsub&&(this._themeUnsub(),this._themeUnsub=null),this.res&&this.res.parentNode&&this.res.parentNode.removeChild(this.res),this}},{key:"_applyTheme",value:function(e){if(!this._noTheme&&this.res)if(this._themeMap){var t=this._themeMap[e];if(!t)return;for(var r in t)this.res.style[r]=t[r]}else{var n=s.defaults&&s.defaults[e];if(n)for(var o in this._themeOriginal||(this._themeOriginal={}),n)o in this._themeOriginal||(this._themeOriginal[o]=this.res.style[o]||""),this._themeOriginal[o]||(this.res.style[o]=n[o])}}},{key:"keySet",value:function(e){if(this.temporaryVal=1,Array.isArray(e)){for(var t=0;t<e.length;t++)e[t]&&null!=e[t].key&&(this.res.style[e[t].key]=e[t].value);return this}return this.res.style[e.key]=e.value,this}},{key:"commonMethods",value:function(e){var t={exact:"fontSize",cursor:"cursor",width:"width",maxWidth:"maxWidth",height:"height",maxHeight:"maxHeight",radius:"borderRadius",lineHeight:"lineHeight",background:"background",font:"fontFamily",opacity:"opacity",gap:"gap",minHeight:"minHeight",position:"position",inset:"inset",top:"top",right:"right",bottom:"bottom",left:"left",zIndex:"zIndex",flex:"flex",flexShrink:"flexShrink",flexGrow:"flexGrow",flexBasis:"flexBasis",flexWrap:"flexWrap",alignSelf:"alignSelf",display:"display",gridTemplateColumns:"gridTemplateColumns",gridTemplateRows:"gridTemplateRows",rowGap:"rowGap",columnGap:"columnGap",letterSpacing:"letterSpacing",textTransform:"textTransform",whiteSpace:"whiteSpace",boxShadow:"boxShadow",backdropFilter:"backdropFilter",WebkitBackdropFilter:"WebkitBackdropFilter",overflow:"overflow",overflowX:"overflowX",overflowY:"overflowY",WebkitOverflowScrolling:"WebkitOverflowScrolling",WebkitTapHighlightColor:"WebkitTapHighlightColor",minWidth:"minWidth",boxSizing:"boxSizing",pointerEvents:"pointerEvents",userSelect:"userSelect",WebkitUserSelect:"WebkitUserSelect",textAlign:"textAlign",transition:"transition"};for(var r in t)null!=e[r]&&(this.res.style[t[r]]=e[r]);return"string"==typeof e.transform&&(this.res.style.transform=e.transform),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.noTheme&&(this._noTheme=!0),e.theme&&this.theme(e.theme),e.hide&&this.isHidden(e.hide),e.transform&&"object"===u(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&&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,this.prevBoxShadow=this.res.style.boxShadow,e.animation&&(this.res.style.transition="".concat(e.animation),this.res.style.transionProperty="background, color, transform"),this.prevTransform=this.res.style.transform,this.res.onmouseout=function(){t.res.style.backgroundColor="".concat(t.prevColor),t.res.style.color="".concat(t.foreColor),t.res.style.border=t.prevBorder,null==e.scale&&null==e.transform||(t.res.style.transform=t.prevTransform||""),null!=e.boxShadow&&(t.res.style.boxShadow=t.prevBoxShadow||"")},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"}if(null!=e.scale||null!=e.transform){var s=t.prevTransform?"".concat(t.prevTransform," "):"",i=[];null!=e.transform&&i.push(e.transform),null!=e.scale&&i.push("scale(".concat(e.scale,")")),t.res.style.transform="".concat(s).concat(i.join(" "))}null!=e.boxShadow&&(t.res.style.boxShadow=e.boxShadow)},this}},{key:"onScroll",value:function(e){var t=this,r=function(e){if(null==e)return{num:0,unit:"px"};var t=String(e).match(/^(-?[\d.]+)(.*)$/);return t?{num:parseFloat(t[1]),unit:t[2]||"px"}:{num:0,unit:"px"}},n=function(e){var r=e&&null!=e.tx?e.tx:"0px",n=e&&null!=e.ty?e.ty:"0px";t.res.style.transform="translate3d(".concat(r,", ").concat(n,", 0)")};"opacity"===e.value?this.res.style.opacity=e.valMin:"scale"===e.value?this.res.style.transform="scale(".concat(e.valMin,")"):"trn"===e.value&&n(e.valMin);var o=function(){if("trn"!==e.value){var o=t.smartRange(window.scrollY,{min:e.from,max:e.to},{min:e.valMin,max:e.valMax});"opacity"===e.value?t.res.style.opacity=o:"scale"===e.value&&(t.res.style.transform="scale(".concat(o,")"))}else{for(var s={},i=["tx","ty"],a=0;a<i.length;a++){var l=i[a],c=e.valMin&&null!=e.valMin[l],u=e.valMax&&null!=e.valMax[l];if(c||u){var f=r(c?e.valMin[l]:u?e.valMax[l]:"0px"),h=r(u?e.valMax[l]:c?e.valMin[l]:"0px"),d=t.smartRange(window.scrollY,{min:e.from,max:e.to},{min:f.num,max:h.num});s[l]="".concat(d).concat(f.unit)}}n(s)}};window.addEventListener("scroll",o),0===e.from&&o()}},{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]},o=["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 s=e.find(function(e){return"default"===e.breakpoint});for(var i in s||(s={breakpoint:"default",range:n.default},e.unshift(s)),this.prevStyles={},this.res.style)this.res.style.hasOwnProperty(i)&&isNaN(parseInt(i))&&(this.prevStyles[i]=this.res.style[i]);var l=new Set;e.forEach(function(e){Object.keys(e).forEach(function(e){o.includes(e)||"range"===e||l.add(e)})}),l.forEach(function(e){void 0===s[e]&&(s[e]=r.options[e]||"initial")}),this._responsiveTasks=this._responsiveTasks||[],this._responsiveTasks.push(function(){for(var t=window.innerWidth,n=s,i=0;i<e.length;i++){var c=e[i],u=a(c.range,2),f=u[0],h=u[1];if("default"!==c.breakpoint&&t>=f&&t<=h){n=c;break}}for(var d in l.forEach(function(e){if("keySet"===e){var t=s[e];t&&t.key&&(r.res.style[t.key]=t.value)}else r.res.style[e]=s[e]}),n)if("exact"===d&&(console.log("APPL"),console.log(n),console.log(r.set),r.set(n)),!o.includes(d)&&"range"!==d){var p=n[d];"keySet"===d&&p&&p.key?r.res.style[p.key]=p.value:"function"==typeof r[d]?r[d](p):r.res.style[d]=p}}),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,o=n,s=0;s<e.length;s++){var i=e[s],l=a(i.range,2),c=l[0],u=l[1];if("default"!==i.breakpoint&&r>=c&&r<=u){o=i;break}}var f=void 0!==o.values?o.values:n.values;null!=f&&t.pad(f)}),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},o=function(){for(var r=window.innerWidth,o=n,s=0;s<e.length;s++){var i=e[s],l=a(i.range,2),c=l[0],u=l[1];if("default"!==i.breakpoint&&r>=c&&r<=u){o=i;break}}t(o)};this._responsiveHandler&&window.removeEventListener("resize",this._responsiveHandler),this._responsiveHandler=o,window.addEventListener("resize",o),setTimeout(function(){o()},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,o=n,s=0;s<e.length;s++){var i=e[s],l=a(i.range,2),c=l[0],u=l[1];if("default"!==i.breakpoint&&r>=c&&r<=u){o=i;break}}var f=void 0!==o.values?o.values:n.values;null!=f&&t.mar(f)}),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){if("center"===e)return this.res.style.marginLeft="auto",this.res.style.marginRight="auto",this;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":"auto"===s?(this.res.style.marginLeft="auto",this.res.style.marginRight="auto"):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}"center"===o&&!0===s&&(this.res.style.marginLeft="auto",this.res.style.marginRight="auto"),"auto"===s&&(o.includes("l")||o.includes("r"))&&(o.includes("l")&&(this.res.style.marginLeft="auto"),o.includes("r")&&(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 n=this;console.log("0P"),this.ap=!1,this.cta=0,this.once=!1;var o,s=i(e);try{for(s.s();!(o=s.n()).done;){var l=o.value;l.range||(l.range=["0px","999999px"])}}catch(e){s.e(e)}finally{s.f()}e.sort(function(e,t){return parseInt(e.range[0])-parseInt(t.range[0])});var c=function(o){var s=window.visualViewport.width,l=[],c=[];n.resCopy=n.res,n.storedQueries=e.map(function(e){return e.target}).filter(function(e){return null!=e});var u,f=i(e);try{for(f.s();!(u=f.n()).done;){var h=u.value;n.counterIndex++;var d=a(h.range,2),p=d[0],y=d[1],v=parseInt(p),m=parseInt(y),g=!0;if(h.target){g=!1;for(var b=0;b<h.target.length;b++)h.target[b]===t&&(g=!0)}s>=v&&s<=m&&g&&(l.push(h.log),c.push(h),h.op&&h.op.margin&&(n.useMargin=h.op.margin))}}catch(e){f.e(e)}finally{f.f()}if(r&&!r.includes("background")&&(n.res.style.background="",n.res.style.backgroundColor=""),n.res.style.textShadow="",r&&!r.includes("border")&&(n.res.style.border=""),r&&!r.includes("margin")&&(n.res.style.margin=""),n.res.style["-webkit-text-fill-color"]="",n.res.style["-webkit-text-stroke-color"]="",n.res.style["-webkit-text-stroke-width"]="",n.res.style.filter="",n.options.background&&(console.log(n.options.background),n.res.style.background=n.options.background),l.includes("gradient"),(l.includes("gradient")||l.includes("shadow"))&&(n.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"===n.getType()||"LayoutWrapperElement"===n.getType()?(n.res.style.border="".concat("number"==typeof w?w+"px":w," solid orange"),n.res.style.display="inline-block","FlexRowLayoutElement"===n.getType()&&(n.res.style.display="flex"),n.res.style.boxSizing="border-box",n.res.style.transformOrigin="center",n.blastTarget=n.res):(n.text,n.res.style["-webkit-text-fill-color"]="transparent",n.res.style["-webkit-text-stroke-color"]=x,n.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;n.res.style.filter=S}if(l.includes("background")&&(n.res.style.backgroundColor="green"),l.includes("gradient")&&("LayoutWrapperElement"!==n.getType()&&"FlexRowLayoutElement"!==n.getType()&&(n.res.style["-webkit-text-fill-color"]="transparent"),n.res.style.background=n.globalGradient,"LayoutWrapperElement"!==n.getType()&&"FlexRowLayoutElement"!==n.getType()&&(n.res.style["background-clip"]="text")),l.includes("shadow")){var T,E,O,C,_=n.options.shadow.op;console.log("OP IS",_);var j=null!==(T=_.steps)&&void 0!==T?T:1,A=null!==(E=_.colors)&&void 0!==E?E:["gray"],R=null!==(O=_.movements)&&void 0!==O?O:["3px","3px"],W=null!==(C=_.radius)&&void 0!==C?C:"3px";if(1===R.length&&(R=[R[0],R[0]]),"FlexRowLayoutElement"===n.getType()||"LayoutWrapperElement"===n.getType()){for(var I=[],L=0;L<j;L++){var P,M=null!==(P=A[L])&&void 0!==P?P:A[0],N=R[0],z=R[1];I.push("".concat(N," ").concat(z," ").concat(W," ").concat(M))}n.res.style.boxShadow=I.join(", ")}else{for(var H=[],B=0;B<j;B++){var F,D=null!==(F=A[B])&&void 0!==F?F:A[0],G=R[0],U=R[1];H.push("drop-shadow(".concat(G," ").concat(U," ").concat(W," ").concat(D,")"))}n.res.style.filter=H.join(" ")}}if(l.includes("margin"))for(b=0;b<e.length;b++)if(e[b].op){var Y=e[b].op.offsets;Y&&void 0!==n.index&&(n.res.style.margin=Y[Number(n.index)]+"px")}if(l.includes("spana")||l.includes("span")){var X=document.createElement("div");if(X.setAttribute("id","oroa"),Object.assign(X.style,{position:"absolute",inset:"0",background:"linear-gradient(90deg, rgb(52,152,219), rgb(26,188,156))",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",pointerEvents:"none"}),n.res&&n.res.querySelector("span"))return;n.res=n.resCopy,n.res.textContent="",n.options.span&&(Array.isArray(n.options.span)?n.options.span:[n.options.span]).forEach(function(e){if(e.op&&"span"===e.op.name&&Array.isArray(e.op.parts)){var t=0,r=n.prevText||"";if(e.op.parts.forEach(function(e){var o=e.text,s=e.style||{};if(t<r.length){var i=r.indexOf(o,t);if(i>t){var a=r.substring(t,i);n.res.appendChild(new n.constructor(a).setup({type:"span",id:s.id,animation:s.animation}).set({}).render())}t=i+o.length}var l=new n.constructor(o).setup({type:"span",id:s.id,animation:s.animation}).set(s).render();n.res.appendChild(l)}),t<r.length){var o=r.substring(t);n.res.appendChild(new n.constructor(o).setup({type:"span"}).set({}).render())}}})}else{var $=new n.constructor(n.prevText).set({}).render();n.prevText&&n.prevText.length>0&&o&&n.res.appendChild($)}if(l.includes("animation")){if(n.options.animation&&!n.hasAnimated&&!n.options.animation.op.fireAt){console.warn(n.openTag),n.hasAnimated=!0;var J=n.options.animation.op;window.addEventListener("sidebar:open",function(){n.res.animate(J.keyframesOpen,J.openOptions)}),window.addEventListener("sidebar:closed",function(){n.res.animate(J.keyframesClose,J.closeOptions)}),n.res.animate(J.keyframesClose,{duration:0,fill:"forwards"}),n.openTag&&n.closeTag&&(window.addEventListener(n.openTag,function(){n.res.animate(J.keyframesOpen,J.openOptions)}),window.addEventListener(n.closeTag,function(){n.res.animate(J.keyframesClose,J.closeOptions)}))}if(n.options.animation&&n.options.animation.op.fireAt&&n.options.animation.op.fireAt.endsWith("px")){var V=n.options.animation.op;n.res.animate(V.keyframesClose,{duration:0,fill:"forwards"});var q=function(){window.scrollY>parseFloat(V.fireAt)&&(n.res.animate(V.keyframesOpen,V.openOptions),window.removeEventListener("scroll",q))};window.addEventListener("scroll",q)}if(n.options.animation&&"inview"===n.options.animation.op.fireAt){var Q=n.options.animation.op;n.res.animate(Q.keyframesClose,{duration:0,fill:"forwards"});var K=!1;new IntersectionObserver(function(e,t){e.forEach(function(e){e.isIntersecting&&!K&&(K=!0,n.res.animate(Q.keyframesOpen,Q.openOptions),t.disconnect())})}).observe(n.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&&f(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)}e.r(t),e.d(t,{Table:()=>w});var n="nodality.theme.mode",o="nodality:theme",s={mode:function(){try{var e=localStorage.getItem(n);if("light"===e||"dark"===e)return e}catch(e){}return"undefined"!=typeof window&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}(),tokens:{light:{},dark:{}},defaults:{light:{},dark:{}},setDefaults:function(e){return e&&"object"===r(e)&&(e.light&&(this.defaults.light=Object.assign({},this.defaults.light,e.light)),e.dark&&(this.defaults.dark=Object.assign({},this.defaults.dark,e.dark)),this._broadcast()),this},setTokens:function(e){return e&&"object"===r(e)&&(e.light&&Object.assign(this.tokens.light,e.light),e.dark&&Object.assign(this.tokens.dark,e.dark)),this},get current(){return this.tokens[this.mode]||{}},set:function(e){if("light"!==e&&"dark"!==e)return this;if(e===this.mode)return this;this.mode=e;try{localStorage.setItem(n,e)}catch(e){}return this._broadcast(),this},toggle:function(){return this.set("dark"===this.mode?"light":"dark")},subscribe:function(e){if("undefined"==typeof document)return function(){};var t=function(t){return e(t.detail.mode,t.detail.tokens)};document.addEventListener(o,t);try{e(this.mode,this.current)}catch(e){}return function(){return document.removeEventListener(o,t)}},_broadcast:function(){"undefined"!=typeof document&&document.dispatchEvent(new CustomEvent(o,{detail:{mode:this.mode,tokens:this.current}}))}};function i(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=l(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 s,i=!0,a=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){a=!0,s=e},f:function(){try{i||null==r.return||r.return()}finally{if(a)throw s}}}}function a(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)||l(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 l(e,t){if(e){if("string"==typeof e)return c(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)?c(e,t):void 0}}function c(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 u(e){return u="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},u(e)}function f(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,h(n.key),n)}}function h(e){var t=function(e){if("object"!=u(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=u(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==u(t)?t:t+""}function d(e){return d="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},d(e)}function p(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return y(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)?y(e,t):void 0}}(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 s,i=!0,a=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){a=!0,s=e},f:function(){try{i||null==r.return||r.return()}finally{if(a)throw s}}}}function y(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 v(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,m(n.key),n)}}function m(e){var t=function(e){if("object"!=d(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=d(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==d(t)?t:t+""}function g(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(g=function(){return!!e})()}function b(){return b="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=k(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}},b.apply(null,arguments)}function k(e){return k=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},k(e)}function x(e,t){return x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},x(e,t)}var w=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=k(t),function(e,t){if(t&&("object"==d(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,g()?Reflect.construct(t,r||[],k(e).constructor):t.apply(e,r))}(this,t)).res=document.createElement("table"),e.res.style.borderCollapse="separate",e.res.style.borderSpacing="0",e.res.style.overflow="hidden",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&&x(e,t)}(t,e),r=t,n=[{key:"add",value:function(e){this.data=e,this.datas=e;var t=Object.keys(e[0]);return this.generateTable(this.res,e),this.generateTableHead(this.res,t),this}},{key:"style",value:function(e){return e.font&&(this.res.style.fontFamily=e.font),this}},{key:"getType",value:function(){return"LayoutWrapperElement"}},{key:"set",value:function(e){return e.cellPadding&&this.cellPadding(e.cellPadding),e.cellAlign&&this.cellAlign(e.cellAlign),e.style&&this.style(e.style),e.headStyle&&this.headStyle(e.headStyle),e.border&&this.border(e.border),e.center&&this.center(e.center),e.borderRadius&&this.borderRadius(e.borderRadius),e.gradient&&(this.res.style.background=e.gradient.op.gradient,this.res.style.backgroundClip="padding-box"),this.obj=e,this.options=e,this.callReact(e),this}},{key:"callReact",value:function(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=b(k(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"),l.push("border"),console.log("ARA IS ",s),this.chainReact(s,this.options.id,l)}}},{key:"toCode",value:function(){var e=JSON.stringify(this.data,null,2),t=JSON.stringify(this.obj,null,2);return e=e.replace(/"(\w+)"\s*:/g,"$1:"),t=t.replace(/"(\w+)"\s*:/g,"$1:"),["new Table()\n .add(".concat(e,")\n .set(").concat(t,")")]}},{key:"borderRadius",value:function(e){return this.res.style.borderRadius="".concat(4*e,"px"),this.res.style.overflow="hidden",this}},{key:"center",value:function(){return this.res.style.marginLeft="auto",this.res.style.marginRight="auto",this}},{key:"cellPadding",value:function(e){var t,r=p(this.res.rows);try{for(r.s();!(t=r.n()).done;){var n,o=p(t.value.cells);try{for(o.s();!(n=o.n()).done;)n.value.style.padding=e}catch(e){o.e(e)}finally{o.f()}}}catch(e){r.e(e)}finally{r.f()}return this}},{key:"cellAlign",value:function(e){var t,r=p(this.res.rows);try{for(r.s();!(t=r.n()).done;){var n,o=p(t.value.cells);try{for(o.s();!(n=o.n()).done;)n.value.style.textAlign=e}catch(e){o.e(e)}finally{o.f()}}}catch(e){r.e(e)}finally{r.f()}return this}},{key:"headStyle",value:function(e){var t=this.res.rows[0];return t&&(t.style.color=e.color,e.background&&(t.style.backgroundColor=e.background)),this}},{key:"border",value:function(e){var t;this.res.style.borderCollapse="separate",this.res.style.borderSpacing="0",this.res.style.border=e,this.res.style.borderRadius="12px";var r,n=p(this.res.rows);try{for(n.s();!(r=n.n()).done;){var o,s=p(r.value.cells);try{for(s.s();!(o=s.n()).done;)o.value.style.border="none"}catch(e){s.e(e)}finally{s.f()}}}catch(e){n.e(e)}finally{n.f()}for(var i=0;i<this.res.rows.length-1;i++){var a,l=p(this.res.rows[i].cells);try{for(l.s();!(a=l.n()).done;)a.value.style.borderBottom=e}catch(e){l.e(e)}finally{l.f()}}var c,u=(null===(t=this.res.rows[0])||void 0===t?void 0:t.cells.length)||0,f=p(this.res.rows);try{for(f.s();!(c=f.n()).done;)for(var h=c.value,d=0;d<u-1;d++)h.cells[d].style.borderRight=e}catch(e){f.e(e)}finally{f.f()}return this}},{key:"generateTableHead",value:function(e,t){var r,n=e.createTHead().insertRow(),o=p(t);try{for(o.s();!(r=o.n()).done;){var s=r.value,i=document.createElement("th");i.textContent=s,n.appendChild(i)}}catch(e){o.e(e)}finally{o.f()}}},{key:"generateTable",value:function(e,t){var r,n=p(t);try{for(n.s();!(r=n.n()).done;){var o=r.value,s=e.insertRow();for(var i in o)s.insertCell().textContent=o[i]}}catch(e){n.e(e)}finally{n.f()}}},{key:"render",value:function(e){var t=document.createElement("div");if(t.style.overflowX="auto",t.appendChild(this.res),!e)return t;document.querySelector(e).appendChild(t)}}],n&&v(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="",f="";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:")&&(f=e.replace("opacity:",""))}),r=o.setDefault(r),n=o.setDefault(n),s=o.setDefault(s);var h="";if("0px"!=n&&"0px"!=r&&"0px"!=s?h+="translate3d(".concat(r,", ").concat(n,", ").concat(s,")"):"0px"==n&&"0px"==r||(h+="translate(".concat(r,", ").concat(n,")")),i&&(h+=" ".concat(i)),l&&(h+=" ".concat(l)),a&&(h+=" ".concat(a)),c&&(h+=" ".concat(c)),u&&(h+=" ".concat(u)),h){if(e.op.duration){var d=e.op.duration.replace(/^(\d+)(s)-/,function(e,t,r){return t/2+r+" "}),p="transform ".concat(d,", opacity ").concat(d);o.res.style.transition=p}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=h,o.res.style.opacity=f}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=h(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,"undefined"!=typeof document&&(this._themeUnsub=s.subscribe(function(e){return o._applyTheme(e)}),Promise.resolve().then(function(){return o._applyTheme(s.mode)}))},t=[{key:"isHidden",value:function(e){e&&(this.res.style.display="none")}},{key:"theme",value:function(e){var t=this;return e&&"object"===u(e)?(this._themeMap=e,this._applyTheme(s.mode),this._themeUnsub||(this._themeUnsub=s.subscribe(function(e){return t._applyTheme(e)})),this):this}},{key:"destroy",value:function(){return"function"==typeof this._themeUnsub&&(this._themeUnsub(),this._themeUnsub=null),this.res&&this.res.parentNode&&this.res.parentNode.removeChild(this.res),this}},{key:"_applyTheme",value:function(e){if(!this._noTheme&&this.res)if(this._themeMap){var t=this._themeMap[e];if(!t)return;for(var r in t)this.res.style[r]=t[r]}else{var n=s.defaults&&s.defaults[e];if(n)for(var o in this._themeOriginal||(this._themeOriginal={}),n)o in this._themeOriginal||(this._themeOriginal[o]=this.res.style[o]||""),this._themeOriginal[o]||(this.res.style[o]=n[o])}}},{key:"keySet",value:function(e){if(this.temporaryVal=1,Array.isArray(e)){for(var t=0;t<e.length;t++)e[t]&&null!=e[t].key&&(this.res.style[e[t].key]=e[t].value);return this}return this.res.style[e.key]=e.value,this}},{key:"commonMethods",value:function(e){var t={exact:"fontSize",cursor:"cursor",width:"width",maxWidth:"maxWidth",height:"height",maxHeight:"maxHeight",radius:"borderRadius",lineHeight:"lineHeight",background:"background",font:"fontFamily",opacity:"opacity",gap:"gap",minHeight:"minHeight",position:"position",inset:"inset",top:"top",right:"right",bottom:"bottom",left:"left",zIndex:"zIndex",flex:"flex",flexShrink:"flexShrink",flexGrow:"flexGrow",flexBasis:"flexBasis",flexWrap:"flexWrap",alignSelf:"alignSelf",display:"display",gridTemplateColumns:"gridTemplateColumns",gridTemplateRows:"gridTemplateRows",rowGap:"rowGap",columnGap:"columnGap",letterSpacing:"letterSpacing",textTransform:"textTransform",whiteSpace:"whiteSpace",boxShadow:"boxShadow",backdropFilter:"backdropFilter",WebkitBackdropFilter:"WebkitBackdropFilter",overflow:"overflow",overflowX:"overflowX",overflowY:"overflowY",WebkitOverflowScrolling:"WebkitOverflowScrolling",WebkitTapHighlightColor:"WebkitTapHighlightColor",minWidth:"minWidth",boxSizing:"boxSizing",pointerEvents:"pointerEvents",userSelect:"userSelect",WebkitUserSelect:"WebkitUserSelect",textAlign:"textAlign",transition:"transition"};for(var r in t)null!=e[r]&&(this.res.style[t[r]]=e[r]);return"string"==typeof e.transform&&(this.res.style.transform=e.transform),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.noTheme&&(this._noTheme=!0),e.theme&&this.theme(e.theme),e.hide&&this.isHidden(e.hide),e.transform&&"object"===u(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&&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,this.prevBoxShadow=this.res.style.boxShadow,e.animation&&(this.res.style.transition="".concat(e.animation),this.res.style.transionProperty="background, color, transform"),this.prevTransform=this.res.style.transform,this.res.onmouseout=function(){t.res.style.backgroundColor="".concat(t.prevColor),t.res.style.color="".concat(t.foreColor),t.res.style.border=t.prevBorder,null==e.scale&&null==e.transform||(t.res.style.transform=t.prevTransform||""),null!=e.boxShadow&&(t.res.style.boxShadow=t.prevBoxShadow||"")},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"}if(null!=e.scale||null!=e.transform){var s=t.prevTransform?"".concat(t.prevTransform," "):"",i=[];null!=e.transform&&i.push(e.transform),null!=e.scale&&i.push("scale(".concat(e.scale,")")),t.res.style.transform="".concat(s).concat(i.join(" "))}null!=e.boxShadow&&(t.res.style.boxShadow=e.boxShadow)},this}},{key:"onScroll",value:function(e){var t=this,r=function(e){if(null==e)return{num:0,unit:"px"};var t=String(e).match(/^(-?[\d.]+)(.*)$/);return t?{num:parseFloat(t[1]),unit:t[2]||"px"}:{num:0,unit:"px"}},n=function(e){var r=e&&null!=e.tx?e.tx:"0px",n=e&&null!=e.ty?e.ty:"0px";t.res.style.transform="translate3d(".concat(r,", ").concat(n,", 0)")};"opacity"===e.value?this.res.style.opacity=e.valMin:"scale"===e.value?this.res.style.transform="scale(".concat(e.valMin,")"):"trn"===e.value&&n(e.valMin);var o=function(){if("trn"!==e.value){var o=t.smartRange(window.scrollY,{min:e.from,max:e.to},{min:e.valMin,max:e.valMax});"opacity"===e.value?t.res.style.opacity=o:"scale"===e.value&&(t.res.style.transform="scale(".concat(o,")"))}else{for(var s={},i=["tx","ty"],a=0;a<i.length;a++){var l=i[a],c=e.valMin&&null!=e.valMin[l],u=e.valMax&&null!=e.valMax[l];if(c||u){var f=r(c?e.valMin[l]:u?e.valMax[l]:"0px"),h=r(u?e.valMax[l]:c?e.valMin[l]:"0px"),d=t.smartRange(window.scrollY,{min:e.from,max:e.to},{min:f.num,max:h.num});s[l]="".concat(d).concat(f.unit)}}n(s)}};window.addEventListener("scroll",o),0===e.from&&o()}},{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]},o=["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 s=e.find(function(e){return"default"===e.breakpoint});for(var i in s||(s={breakpoint:"default",range:n.default},e.unshift(s)),this.prevStyles={},this.res.style)this.res.style.hasOwnProperty(i)&&isNaN(parseInt(i))&&(this.prevStyles[i]=this.res.style[i]);var l=new Set;e.forEach(function(e){Object.keys(e).forEach(function(e){o.includes(e)||"range"===e||l.add(e)})}),l.forEach(function(e){void 0===s[e]&&(s[e]=r.options[e]||"initial")}),this._responsiveTasks=this._responsiveTasks||[],this._responsiveTasks.push(function(){for(var t=window.innerWidth,n=s,i=0;i<e.length;i++){var c=e[i],u=a(c.range,2),f=u[0],h=u[1];if("default"!==c.breakpoint&&t>=f&&t<=h){n=c;break}}for(var d in l.forEach(function(e){if("keySet"===e){var t=s[e];t&&t.key&&(r.res.style[t.key]=t.value)}else r.res.style[e]=s[e]}),n)if("exact"===d&&(console.log("APPL"),console.log(n),console.log(r.set),r.set(n)),!o.includes(d)&&"range"!==d){var p=n[d];"keySet"===d&&p&&p.key?r.res.style[p.key]=p.value:"function"==typeof r[d]?r[d](p):r.res.style[d]=p}}),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,o=n,s=0;s<e.length;s++){var i=e[s],l=a(i.range,2),c=l[0],u=l[1];if("default"!==i.breakpoint&&r>=c&&r<=u){o=i;break}}var f=void 0!==o.values?o.values:n.values;null!=f&&t.pad(f)}),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},o=function(){for(var r=window.innerWidth,o=n,s=0;s<e.length;s++){var i=e[s],l=a(i.range,2),c=l[0],u=l[1];if("default"!==i.breakpoint&&r>=c&&r<=u){o=i;break}}t(o)};this._responsiveHandler&&window.removeEventListener("resize",this._responsiveHandler),this._responsiveHandler=o,window.addEventListener("resize",o),setTimeout(function(){o()},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,o=n,s=0;s<e.length;s++){var i=e[s],l=a(i.range,2),c=l[0],u=l[1];if("default"!==i.breakpoint&&r>=c&&r<=u){o=i;break}}var f=void 0!==o.values?o.values:n.values;null!=f&&t.mar(f)}),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){if("center"===e)return this.res.style.marginLeft="auto",this.res.style.marginRight="auto",this;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":"auto"===s?(this.res.style.marginLeft="auto",this.res.style.marginRight="auto"):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}"center"===o&&!0===s&&(this.res.style.marginLeft="auto",this.res.style.marginRight="auto"),"auto"===s&&(o.includes("l")||o.includes("r"))&&(o.includes("l")&&(this.res.style.marginLeft="auto"),o.includes("r")&&(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),void 0!==e.radius&&(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 n=this;console.log("0P"),this.ap=!1,this.cta=0,this.once=!1;var o,s=i(e);try{for(s.s();!(o=s.n()).done;){var l=o.value;l.range||(l.range=["0px","999999px"])}}catch(e){s.e(e)}finally{s.f()}e.sort(function(e,t){return parseInt(e.range[0])-parseInt(t.range[0])});var c=function(o){var s=window.visualViewport.width,l=[],c=[];n.resCopy=n.res,n.storedQueries=e.map(function(e){return e.target}).filter(function(e){return null!=e});var u,f=i(e);try{for(f.s();!(u=f.n()).done;){var h=u.value;n.counterIndex++;var d=a(h.range,2),p=d[0],y=d[1],v=parseInt(p),m=parseInt(y),g=!0;if(h.target){g=!1;for(var b=0;b<h.target.length;b++)h.target[b]===t&&(g=!0)}s>=v&&s<=m&&g&&(l.push(h.log),c.push(h),h.op&&h.op.margin&&(n.useMargin=h.op.margin))}}catch(e){f.e(e)}finally{f.f()}if(r&&!r.includes("background")&&(n.res.style.background="",n.res.style.backgroundColor=""),n.res.style.textShadow="",r&&!r.includes("border")&&(n.res.style.border=""),r&&!r.includes("margin")&&(n.res.style.margin=""),n.res.style["-webkit-text-fill-color"]="",n.res.style["-webkit-text-stroke-color"]="",n.res.style["-webkit-text-stroke-width"]="",n.res.style.filter="",n.options.background&&(console.log(n.options.background),n.res.style.background=n.options.background),l.includes("gradient"),(l.includes("gradient")||l.includes("shadow"))&&(n.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"===n.getType()||"LayoutWrapperElement"===n.getType()?(n.res.style.border="".concat("number"==typeof w?w+"px":w," solid orange"),n.res.style.display="inline-block","FlexRowLayoutElement"===n.getType()&&(n.res.style.display="flex"),n.res.style.boxSizing="border-box",n.res.style.transformOrigin="center",n.blastTarget=n.res):(n.text,n.res.style["-webkit-text-fill-color"]="transparent",n.res.style["-webkit-text-stroke-color"]=x,n.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;n.res.style.filter=S}if(l.includes("background")&&(n.res.style.backgroundColor="green"),l.includes("gradient")&&("LayoutWrapperElement"!==n.getType()&&"FlexRowLayoutElement"!==n.getType()&&(n.res.style["-webkit-text-fill-color"]="transparent"),n.res.style.background=n.globalGradient,"LayoutWrapperElement"!==n.getType()&&"FlexRowLayoutElement"!==n.getType()&&(n.res.style["background-clip"]="text")),l.includes("shadow")){var T,E,O,C,_=n.options.shadow.op;console.log("OP IS",_);var j=null!==(T=_.steps)&&void 0!==T?T:1,A=null!==(E=_.colors)&&void 0!==E?E:["gray"],R=null!==(O=_.movements)&&void 0!==O?O:["3px","3px"],W=null!==(C=_.radius)&&void 0!==C?C:"3px";if(1===R.length&&(R=[R[0],R[0]]),"FlexRowLayoutElement"===n.getType()||"LayoutWrapperElement"===n.getType()){for(var I=[],L=0;L<j;L++){var P,M=null!==(P=A[L])&&void 0!==P?P:A[0],N=R[0],z=R[1];I.push("".concat(N," ").concat(z," ").concat(W," ").concat(M))}n.res.style.boxShadow=I.join(", ")}else{for(var H=[],B=0;B<j;B++){var F,D=null!==(F=A[B])&&void 0!==F?F:A[0],G=R[0],U=R[1];H.push("drop-shadow(".concat(G," ").concat(U," ").concat(W," ").concat(D,")"))}n.res.style.filter=H.join(" ")}}if(l.includes("margin"))for(b=0;b<e.length;b++)if(e[b].op){var Y=e[b].op.offsets;Y&&void 0!==n.index&&(n.res.style.margin=Y[Number(n.index)]+"px")}if(l.includes("spana")||l.includes("span")){var X=document.createElement("div");if(X.setAttribute("id","oroa"),Object.assign(X.style,{position:"absolute",inset:"0",background:"linear-gradient(90deg, rgb(52,152,219), rgb(26,188,156))",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",pointerEvents:"none"}),n.res&&n.res.querySelector("span"))return;n.res=n.resCopy,n.res.textContent="",n.options.span&&(Array.isArray(n.options.span)?n.options.span:[n.options.span]).forEach(function(e){if(e.op&&"span"===e.op.name&&Array.isArray(e.op.parts)){var t=0,r=n.prevText||"";if(e.op.parts.forEach(function(e){var o=e.text,s=e.style||{};if(t<r.length){var i=r.indexOf(o,t);if(i>t){var a=r.substring(t,i);n.res.appendChild(new n.constructor(a).setup({type:"span",id:s.id,animation:s.animation}).set({}).render())}t=i+o.length}var l=new n.constructor(o).setup({type:"span",id:s.id,animation:s.animation}).set(s).render();n.res.appendChild(l)}),t<r.length){var o=r.substring(t);n.res.appendChild(new n.constructor(o).setup({type:"span"}).set({}).render())}}})}else{var $=new n.constructor(n.prevText).set({}).render();n.prevText&&n.prevText.length>0&&o&&n.res.appendChild($)}if(l.includes("animation")){if(n.options.animation&&!n.hasAnimated&&!n.options.animation.op.fireAt){console.warn(n.openTag),n.hasAnimated=!0;var J=n.options.animation.op;window.addEventListener("sidebar:open",function(){n.res.animate(J.keyframesOpen,J.openOptions)}),window.addEventListener("sidebar:closed",function(){n.res.animate(J.keyframesClose,J.closeOptions)}),n.res.animate(J.keyframesClose,{duration:0,fill:"forwards"}),n.openTag&&n.closeTag&&(window.addEventListener(n.openTag,function(){n.res.animate(J.keyframesOpen,J.openOptions)}),window.addEventListener(n.closeTag,function(){n.res.animate(J.keyframesClose,J.closeOptions)}))}if(n.options.animation&&n.options.animation.op.fireAt&&n.options.animation.op.fireAt.endsWith("px")){var V=n.options.animation.op;n.res.animate(V.keyframesClose,{duration:0,fill:"forwards"});var q=function(){window.scrollY>parseFloat(V.fireAt)&&(n.res.animate(V.keyframesOpen,V.openOptions),window.removeEventListener("scroll",q))};window.addEventListener("scroll",q)}if(n.options.animation&&"inview"===n.options.animation.op.fireAt){var Q=n.options.animation.op;n.res.animate(Q.keyframesClose,{duration:0,fill:"forwards"});var K=!1;new IntersectionObserver(function(e,t){e.forEach(function(e){e.isIntersecting&&!K&&(K=!0,n.res.animate(Q.keyframesOpen,Q.openOptions),t.disconnect())})}).observe(n.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&&f(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}());module.exports=t})();
|
package/dist/table.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)}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 r="nodality.theme.mode",n="nodality:theme",o={mode:function(){try{var e=localStorage.getItem(r);if("light"===e||"dark"===e)return e}catch(e){}return"undefined"!=typeof window&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}(),tokens:{light:{},dark:{}},defaults:{light:{},dark:{}},setDefaults:function(e){return e&&"object"===t(e)&&(e.light&&(this.defaults.light=Object.assign({},this.defaults.light,e.light)),e.dark&&(this.defaults.dark=Object.assign({},this.defaults.dark,e.dark)),this._broadcast()),this},setTokens:function(e){return e&&"object"===t(e)&&(e.light&&Object.assign(this.tokens.light,e.light),e.dark&&Object.assign(this.tokens.dark,e.dark)),this},get current(){return this.tokens[this.mode]||{}},set:function(e){if("light"!==e&&"dark"!==e)return this;if(e===this.mode)return this;this.mode=e;try{localStorage.setItem(r,e)}catch(e){}return this._broadcast(),this},toggle:function(){return this.set("dark"===this.mode?"light":"dark")},subscribe:function(e){if("undefined"==typeof document)return function(){};var t=function(t){return e(t.detail.mode,t.detail.tokens)};document.addEventListener(n,t);try{e(this.mode,this.current)}catch(e){}return function(){return document.removeEventListener(n,t)}},_broadcast:function(){"undefined"!=typeof document&&document.dispatchEvent(new CustomEvent(n,{detail:{mode:this.mode,tokens:this.current}}))}};function s(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=a(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 s,i=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){l=!0,s=e},f:function(){try{i||null==r.return||r.return()}finally{if(l)throw s}}}}function i(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)||a(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 a(e,t){if(e){if("string"==typeof e)return l(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)?l(e,t):void 0}}function l(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 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,f(n.key),n)}}function f(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+""}var h=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="",o="",i="",a="",l="",c="",u="",f="";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:")?o=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:")&&(f=e.replace("opacity:",""))}),r=s.setDefault(r),n=s.setDefault(n),o=s.setDefault(o);var h="";if("0px"!=n&&"0px"!=r&&"0px"!=o?h+="translate3d(".concat(r,", ").concat(n,", ").concat(o,")"):"0px"==n&&"0px"==r||(h+="translate(".concat(r,", ").concat(n,")")),i&&(h+=" ".concat(i)),l&&(h+=" ".concat(l)),a&&(h+=" ".concat(a)),c&&(h+=" ".concat(c)),u&&(h+=" ".concat(u)),h){if(e.op.duration){var d=e.op.duration.replace(/^(\d+)(s)-/,function(e,t,r){return t/2+r+" "}),p="transform ".concat(d,", opacity ").concat(d);s.res.style.transition=p}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=h,s.res.style.opacity=f}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 o=1e3*parseFloat(t.duration),i=t.closeAfter?t.closeAfter:0;setTimeout(function(){t.keep||n()},o/2+i)}t.hardCSS&&(s.res.style.transform=t.hardCSS)}else alert("THIS FIRE WITH GRADIENT (invalid block"),console.log("INVALID BLOCKA"),console.log(e)},(r=f(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,"undefined"!=typeof document&&(this._themeUnsub=o.subscribe(function(e){return s._applyTheme(e)}),Promise.resolve().then(function(){return s._applyTheme(o.mode)}))},t=[{key:"isHidden",value:function(e){e&&(this.res.style.display="none")}},{key:"theme",value:function(e){var t=this;return e&&"object"===c(e)?(this._themeMap=e,this._applyTheme(o.mode),this._themeUnsub||(this._themeUnsub=o.subscribe(function(e){return t._applyTheme(e)})),this):this}},{key:"destroy",value:function(){return"function"==typeof this._themeUnsub&&(this._themeUnsub(),this._themeUnsub=null),this.res&&this.res.parentNode&&this.res.parentNode.removeChild(this.res),this}},{key:"_applyTheme",value:function(e){if(!this._noTheme&&this.res)if(this._themeMap){var t=this._themeMap[e];if(!t)return;for(var r in t)this.res.style[r]=t[r]}else{var n=o.defaults&&o.defaults[e];if(n)for(var s in this._themeOriginal||(this._themeOriginal={}),n)s in this._themeOriginal||(this._themeOriginal[s]=this.res.style[s]||""),this._themeOriginal[s]||(this.res.style[s]=n[s])}}},{key:"keySet",value:function(e){if(this.temporaryVal=1,Array.isArray(e)){for(var t=0;t<e.length;t++)e[t]&&null!=e[t].key&&(this.res.style[e[t].key]=e[t].value);return this}return this.res.style[e.key]=e.value,this}},{key:"commonMethods",value:function(e){var t={exact:"fontSize",cursor:"cursor",width:"width",maxWidth:"maxWidth",height:"height",maxHeight:"maxHeight",radius:"borderRadius",lineHeight:"lineHeight",background:"background",font:"fontFamily",opacity:"opacity",gap:"gap",minHeight:"minHeight",position:"position",inset:"inset",top:"top",right:"right",bottom:"bottom",left:"left",zIndex:"zIndex",flex:"flex",flexShrink:"flexShrink",flexGrow:"flexGrow",flexBasis:"flexBasis",flexWrap:"flexWrap",alignSelf:"alignSelf",display:"display",gridTemplateColumns:"gridTemplateColumns",gridTemplateRows:"gridTemplateRows",rowGap:"rowGap",columnGap:"columnGap",letterSpacing:"letterSpacing",textTransform:"textTransform",whiteSpace:"whiteSpace",boxShadow:"boxShadow",backdropFilter:"backdropFilter",WebkitBackdropFilter:"WebkitBackdropFilter",overflow:"overflow",overflowX:"overflowX",overflowY:"overflowY",WebkitOverflowScrolling:"WebkitOverflowScrolling",WebkitTapHighlightColor:"WebkitTapHighlightColor",minWidth:"minWidth",boxSizing:"boxSizing",pointerEvents:"pointerEvents",userSelect:"userSelect",WebkitUserSelect:"WebkitUserSelect",textAlign:"textAlign",transition:"transition"};for(var r in t)null!=e[r]&&(this.res.style[t[r]]=e[r]);return"string"==typeof e.transform&&(this.res.style.transform=e.transform),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.noTheme&&(this._noTheme=!0),e.theme&&this.theme(e.theme),e.hide&&this.isHidden(e.hide),e.transform&&"object"===c(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&&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,this.prevBoxShadow=this.res.style.boxShadow,e.animation&&(this.res.style.transition="".concat(e.animation),this.res.style.transionProperty="background, color, transform"),this.prevTransform=this.res.style.transform,this.res.onmouseout=function(){t.res.style.backgroundColor="".concat(t.prevColor),t.res.style.color="".concat(t.foreColor),t.res.style.border=t.prevBorder,null==e.scale&&null==e.transform||(t.res.style.transform=t.prevTransform||""),null!=e.boxShadow&&(t.res.style.boxShadow=t.prevBoxShadow||"")},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"}if(null!=e.scale||null!=e.transform){var s=t.prevTransform?"".concat(t.prevTransform," "):"",i=[];null!=e.transform&&i.push(e.transform),null!=e.scale&&i.push("scale(".concat(e.scale,")")),t.res.style.transform="".concat(s).concat(i.join(" "))}null!=e.boxShadow&&(t.res.style.boxShadow=e.boxShadow)},this}},{key:"onScroll",value:function(e){var t=this,r=function(e){if(null==e)return{num:0,unit:"px"};var t=String(e).match(/^(-?[\d.]+)(.*)$/);return t?{num:parseFloat(t[1]),unit:t[2]||"px"}:{num:0,unit:"px"}},n=function(e){var r=e&&null!=e.tx?e.tx:"0px",n=e&&null!=e.ty?e.ty:"0px";t.res.style.transform="translate3d(".concat(r,", ").concat(n,", 0)")};"opacity"===e.value?this.res.style.opacity=e.valMin:"scale"===e.value?this.res.style.transform="scale(".concat(e.valMin,")"):"trn"===e.value&&n(e.valMin);var o=function(){if("trn"!==e.value){var o=t.smartRange(window.scrollY,{min:e.from,max:e.to},{min:e.valMin,max:e.valMax});"opacity"===e.value?t.res.style.opacity=o:"scale"===e.value&&(t.res.style.transform="scale(".concat(o,")"))}else{for(var s={},i=["tx","ty"],a=0;a<i.length;a++){var l=i[a],c=e.valMin&&null!=e.valMin[l],u=e.valMax&&null!=e.valMax[l];if(c||u){var f=r(c?e.valMin[l]:u?e.valMax[l]:"0px"),h=r(u?e.valMax[l]:c?e.valMin[l]:"0px"),d=t.smartRange(window.scrollY,{min:e.from,max:e.to},{min:f.num,max:h.num});s[l]="".concat(d).concat(f.unit)}}n(s)}};window.addEventListener("scroll",o),0===e.from&&o()}},{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]},o=["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 s=e.find(function(e){return"default"===e.breakpoint});for(var a in s||(s={breakpoint:"default",range:n.default},e.unshift(s)),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){o.includes(e)||"range"===e||l.add(e)})}),l.forEach(function(e){void 0===s[e]&&(s[e]=r.options[e]||"initial")}),this._responsiveTasks=this._responsiveTasks||[],this._responsiveTasks.push(function(){for(var t=window.innerWidth,n=s,a=0;a<e.length;a++){var c=e[a],u=i(c.range,2),f=u[0],h=u[1];if("default"!==c.breakpoint&&t>=f&&t<=h){n=c;break}}for(var d in l.forEach(function(e){if("keySet"===e){var t=s[e];t&&t.key&&(r.res.style[t.key]=t.value)}else r.res.style[e]=s[e]}),n)if("exact"===d&&(console.log("APPL"),console.log(n),console.log(r.set),r.set(n)),!o.includes(d)&&"range"!==d){var p=n[d];"keySet"===d&&p&&p.key?r.res.style[p.key]=p.value:"function"==typeof r[d]?r[d](p):r.res.style[d]=p}}),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,o=n,s=0;s<e.length;s++){var a=e[s],l=i(a.range,2),c=l[0],u=l[1];if("default"!==a.breakpoint&&r>=c&&r<=u){o=a;break}}var f=void 0!==o.values?o.values:n.values;null!=f&&t.pad(f)}),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},o=function(){for(var r=window.innerWidth,o=n,s=0;s<e.length;s++){var a=e[s],l=i(a.range,2),c=l[0],u=l[1];if("default"!==a.breakpoint&&r>=c&&r<=u){o=a;break}}t(o)};this._responsiveHandler&&window.removeEventListener("resize",this._responsiveHandler),this._responsiveHandler=o,window.addEventListener("resize",o),setTimeout(function(){o()},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,o=n,s=0;s<e.length;s++){var a=e[s],l=i(a.range,2),c=l[0],u=l[1];if("default"!==a.breakpoint&&r>=c&&r<=u){o=a;break}}var f=void 0!==o.values?o.values:n.values;null!=f&&t.mar(f)}),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){if("center"===e)return this.res.style.marginLeft="auto",this.res.style.marginRight="auto",this;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":"auto"===s?(this.res.style.marginLeft="auto",this.res.style.marginRight="auto"):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}"center"===o&&!0===s&&(this.res.style.marginLeft="auto",this.res.style.marginRight="auto"),"auto"===s&&(o.includes("l")||o.includes("r"))&&(o.includes("l")&&(this.res.style.marginLeft="auto"),o.includes("r")&&(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 n=this;console.log("0P"),this.ap=!1,this.cta=0,this.once=!1;var o,a=s(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=[];n.resCopy=n.res,n.storedQueries=e.map(function(e){return e.target}).filter(function(e){return null!=e});var u,f=s(e);try{for(f.s();!(u=f.n()).done;){var h=u.value;n.counterIndex++;var d=i(h.range,2),p=d[0],y=d[1],v=parseInt(p),m=parseInt(y),g=!0;if(h.target){g=!1;for(var b=0;b<h.target.length;b++)h.target[b]===t&&(g=!0)}a>=v&&a<=m&&g&&(l.push(h.log),c.push(h),h.op&&h.op.margin&&(n.useMargin=h.op.margin))}}catch(e){f.e(e)}finally{f.f()}if(r&&!r.includes("background")&&(n.res.style.background="",n.res.style.backgroundColor=""),n.res.style.textShadow="",r&&!r.includes("border")&&(n.res.style.border=""),r&&!r.includes("margin")&&(n.res.style.margin=""),n.res.style["-webkit-text-fill-color"]="",n.res.style["-webkit-text-stroke-color"]="",n.res.style["-webkit-text-stroke-width"]="",n.res.style.filter="",n.options.background&&(console.log(n.options.background),n.res.style.background=n.options.background),l.includes("gradient"),(l.includes("gradient")||l.includes("shadow"))&&(n.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"===n.getType()||"LayoutWrapperElement"===n.getType()?(n.res.style.border="".concat("number"==typeof w?w+"px":w," solid orange"),n.res.style.display="inline-block","FlexRowLayoutElement"===n.getType()&&(n.res.style.display="flex"),n.res.style.boxSizing="border-box",n.res.style.transformOrigin="center",n.blastTarget=n.res):(n.text,n.res.style["-webkit-text-fill-color"]="transparent",n.res.style["-webkit-text-stroke-color"]=x,n.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;n.res.style.filter=S}if(l.includes("background")&&(n.res.style.backgroundColor="green"),l.includes("gradient")&&("LayoutWrapperElement"!==n.getType()&&"FlexRowLayoutElement"!==n.getType()&&(n.res.style["-webkit-text-fill-color"]="transparent"),n.res.style.background=n.globalGradient,"LayoutWrapperElement"!==n.getType()&&"FlexRowLayoutElement"!==n.getType()&&(n.res.style["background-clip"]="text")),l.includes("shadow")){var T,E,O,C,_=n.options.shadow.op;console.log("OP IS",_);var A=null!==(T=_.steps)&&void 0!==T?T:1,R=null!==(E=_.colors)&&void 0!==E?E:["gray"],j=null!==(O=_.movements)&&void 0!==O?O:["3px","3px"],W=null!==(C=_.radius)&&void 0!==C?C:"3px";if(1===j.length&&(j=[j[0],j[0]]),"FlexRowLayoutElement"===n.getType()||"LayoutWrapperElement"===n.getType()){for(var I=[],L=0;L<A;L++){var P,M=null!==(P=R[L])&&void 0!==P?P:R[0],N=j[0],z=j[1];I.push("".concat(N," ").concat(z," ").concat(W," ").concat(M))}n.res.style.boxShadow=I.join(", ")}else{for(var H=[],B=0;B<A;B++){var F,D=null!==(F=R[B])&&void 0!==F?F:R[0],G=j[0],U=j[1];H.push("drop-shadow(".concat(G," ").concat(U," ").concat(W," ").concat(D,")"))}n.res.style.filter=H.join(" ")}}if(l.includes("margin"))for(b=0;b<e.length;b++)if(e[b].op){var Y=e[b].op.offsets;Y&&void 0!==n.index&&(n.res.style.margin=Y[Number(n.index)]+"px")}if(l.includes("spana")||l.includes("span")){var X=document.createElement("div");if(X.setAttribute("id","oroa"),Object.assign(X.style,{position:"absolute",inset:"0",background:"linear-gradient(90deg, rgb(52,152,219), rgb(26,188,156))",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",pointerEvents:"none"}),n.res&&n.res.querySelector("span"))return;n.res=n.resCopy,n.res.textContent="",n.options.span&&(Array.isArray(n.options.span)?n.options.span:[n.options.span]).forEach(function(e){if(e.op&&"span"===e.op.name&&Array.isArray(e.op.parts)){var t=0,r=n.prevText||"";if(e.op.parts.forEach(function(e){var o=e.text,s=e.style||{};if(t<r.length){var i=r.indexOf(o,t);if(i>t){var a=r.substring(t,i);n.res.appendChild(new n.constructor(a).setup({type:"span",id:s.id,animation:s.animation}).set({}).render())}t=i+o.length}var l=new n.constructor(o).setup({type:"span",id:s.id,animation:s.animation}).set(s).render();n.res.appendChild(l)}),t<r.length){var o=r.substring(t);n.res.appendChild(new n.constructor(o).setup({type:"span"}).set({}).render())}}})}else{var $=new n.constructor(n.prevText).set({}).render();n.prevText&&n.prevText.length>0&&o&&n.res.appendChild($)}if(l.includes("animation")){if(n.options.animation&&!n.hasAnimated&&!n.options.animation.op.fireAt){console.warn(n.openTag),n.hasAnimated=!0;var J=n.options.animation.op;window.addEventListener("sidebar:open",function(){n.res.animate(J.keyframesOpen,J.openOptions)}),window.addEventListener("sidebar:closed",function(){n.res.animate(J.keyframesClose,J.closeOptions)}),n.res.animate(J.keyframesClose,{duration:0,fill:"forwards"}),n.openTag&&n.closeTag&&(window.addEventListener(n.openTag,function(){n.res.animate(J.keyframesOpen,J.openOptions)}),window.addEventListener(n.closeTag,function(){n.res.animate(J.keyframesClose,J.closeOptions)}))}if(n.options.animation&&n.options.animation.op.fireAt&&n.options.animation.op.fireAt.endsWith("px")){var V=n.options.animation.op;n.res.animate(V.keyframesClose,{duration:0,fill:"forwards"});var q=function(){window.scrollY>parseFloat(V.fireAt)&&(n.res.animate(V.keyframesOpen,V.openOptions),window.removeEventListener("scroll",q))};window.addEventListener("scroll",q)}if(n.options.animation&&"inview"===n.options.animation.op.fireAt){var Q=n.options.animation.op;n.res.animate(Q.keyframesClose,{duration:0,fill:"forwards"});var K=!1;new IntersectionObserver(function(e,t){e.forEach(function(e){e.isIntersecting&&!K&&(K=!0,n.res.animate(Q.keyframesOpen,Q.openOptions),t.disconnect())})}).observe(n.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&&u(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function d(e){return d="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},d(e)}function p(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return y(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)?y(e,t):void 0}}(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 s,i=!0,a=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){a=!0,s=e},f:function(){try{i||null==r.return||r.return()}finally{if(a)throw s}}}}function y(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 v(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,m(n.key),n)}}function m(e){var t=function(e){if("object"!=d(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=d(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==d(t)?t:t+""}function g(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(g=function(){return!!e})()}function b(){return b="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=k(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}},b.apply(null,arguments)}function k(e){return k=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},k(e)}function x(e,t){return x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},x(e,t)}var w=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=k(t),function(e,t){if(t&&("object"==d(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,g()?Reflect.construct(t,r||[],k(e).constructor):t.apply(e,r))}(this,e)).res=document.createElement("table"),t.res.style.borderCollapse="separate",t.res.style.borderSpacing="0",t.res.style.overflow="hidden",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&&x(e,t)}(e,h),t=e,r=[{key:"add",value:function(e){this.data=e,this.datas=e;var t=Object.keys(e[0]);return this.generateTable(this.res,e),this.generateTableHead(this.res,t),this}},{key:"style",value:function(e){return e.font&&(this.res.style.fontFamily=e.font),this}},{key:"getType",value:function(){return"LayoutWrapperElement"}},{key:"set",value:function(e){return e.cellPadding&&this.cellPadding(e.cellPadding),e.cellAlign&&this.cellAlign(e.cellAlign),e.style&&this.style(e.style),e.headStyle&&this.headStyle(e.headStyle),e.border&&this.border(e.border),e.center&&this.center(e.center),e.borderRadius&&this.borderRadius(e.borderRadius),e.gradient&&(this.res.style.background=e.gradient.op.gradient,this.res.style.backgroundClip="padding-box"),this.obj=e,this.options=e,this.callReact(e),this}},{key:"callReact",value:function(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=b(k(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"),l.push("border"),console.log("ARA IS ",s),this.chainReact(s,this.options.id,l)}}},{key:"toCode",value:function(){var e=JSON.stringify(this.data,null,2),t=JSON.stringify(this.obj,null,2);return e=e.replace(/"(\w+)"\s*:/g,"$1:"),t=t.replace(/"(\w+)"\s*:/g,"$1:"),["new Table()\n .add(".concat(e,")\n .set(").concat(t,")")]}},{key:"borderRadius",value:function(e){return this.res.style.borderRadius="".concat(4*e,"px"),this.res.style.overflow="hidden",this}},{key:"center",value:function(){return this.res.style.marginLeft="auto",this.res.style.marginRight="auto",this}},{key:"cellPadding",value:function(e){var t,r=p(this.res.rows);try{for(r.s();!(t=r.n()).done;){var n,o=p(t.value.cells);try{for(o.s();!(n=o.n()).done;)n.value.style.padding=e}catch(e){o.e(e)}finally{o.f()}}}catch(e){r.e(e)}finally{r.f()}return this}},{key:"cellAlign",value:function(e){var t,r=p(this.res.rows);try{for(r.s();!(t=r.n()).done;){var n,o=p(t.value.cells);try{for(o.s();!(n=o.n()).done;)n.value.style.textAlign=e}catch(e){o.e(e)}finally{o.f()}}}catch(e){r.e(e)}finally{r.f()}return this}},{key:"headStyle",value:function(e){var t=this.res.rows[0];return t&&(t.style.color=e.color,e.background&&(t.style.backgroundColor=e.background)),this}},{key:"border",value:function(e){var t;this.res.style.borderCollapse="separate",this.res.style.borderSpacing="0",this.res.style.border=e,this.res.style.borderRadius="12px";var r,n=p(this.res.rows);try{for(n.s();!(r=n.n()).done;){var o,s=p(r.value.cells);try{for(s.s();!(o=s.n()).done;)o.value.style.border="none"}catch(e){s.e(e)}finally{s.f()}}}catch(e){n.e(e)}finally{n.f()}for(var i=0;i<this.res.rows.length-1;i++){var a,l=p(this.res.rows[i].cells);try{for(l.s();!(a=l.n()).done;)a.value.style.borderBottom=e}catch(e){l.e(e)}finally{l.f()}}var c,u=(null===(t=this.res.rows[0])||void 0===t?void 0:t.cells.length)||0,f=p(this.res.rows);try{for(f.s();!(c=f.n()).done;)for(var h=c.value,d=0;d<u-1;d++)h.cells[d].style.borderRight=e}catch(e){f.e(e)}finally{f.f()}return this}},{key:"generateTableHead",value:function(e,t){var r,n=e.createTHead().insertRow(),o=p(t);try{for(o.s();!(r=o.n()).done;){var s=r.value,i=document.createElement("th");i.textContent=s,n.appendChild(i)}}catch(e){o.e(e)}finally{o.f()}}},{key:"generateTable",value:function(e,t){var r,n=p(t);try{for(n.s();!(r=n.n()).done;){var o=r.value,s=e.insertRow();for(var i in o)s.insertCell().textContent=o[i]}}catch(e){n.e(e)}finally{n.f()}}},{key:"render",value:function(e){var t=document.createElement("div");if(t.style.overflowX="auto",t.appendChild(this.res),!e)return t;document.querySelector(e).appendChild(t)}}],r&&v(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r}();export{w as Table};
|
|
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)}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 r="nodality.theme.mode",n="nodality:theme",o={mode:function(){try{var e=localStorage.getItem(r);if("light"===e||"dark"===e)return e}catch(e){}return"undefined"!=typeof window&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}(),tokens:{light:{},dark:{}},defaults:{light:{},dark:{}},setDefaults:function(e){return e&&"object"===t(e)&&(e.light&&(this.defaults.light=Object.assign({},this.defaults.light,e.light)),e.dark&&(this.defaults.dark=Object.assign({},this.defaults.dark,e.dark)),this._broadcast()),this},setTokens:function(e){return e&&"object"===t(e)&&(e.light&&Object.assign(this.tokens.light,e.light),e.dark&&Object.assign(this.tokens.dark,e.dark)),this},get current(){return this.tokens[this.mode]||{}},set:function(e){if("light"!==e&&"dark"!==e)return this;if(e===this.mode)return this;this.mode=e;try{localStorage.setItem(r,e)}catch(e){}return this._broadcast(),this},toggle:function(){return this.set("dark"===this.mode?"light":"dark")},subscribe:function(e){if("undefined"==typeof document)return function(){};var t=function(t){return e(t.detail.mode,t.detail.tokens)};document.addEventListener(n,t);try{e(this.mode,this.current)}catch(e){}return function(){return document.removeEventListener(n,t)}},_broadcast:function(){"undefined"!=typeof document&&document.dispatchEvent(new CustomEvent(n,{detail:{mode:this.mode,tokens:this.current}}))}};function s(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=a(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 s,i=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){l=!0,s=e},f:function(){try{i||null==r.return||r.return()}finally{if(l)throw s}}}}function i(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)||a(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 a(e,t){if(e){if("string"==typeof e)return l(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)?l(e,t):void 0}}function l(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 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,f(n.key),n)}}function f(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+""}var h=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="",o="",i="",a="",l="",c="",u="",f="";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:")?o=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:")&&(f=e.replace("opacity:",""))}),r=s.setDefault(r),n=s.setDefault(n),o=s.setDefault(o);var h="";if("0px"!=n&&"0px"!=r&&"0px"!=o?h+="translate3d(".concat(r,", ").concat(n,", ").concat(o,")"):"0px"==n&&"0px"==r||(h+="translate(".concat(r,", ").concat(n,")")),i&&(h+=" ".concat(i)),l&&(h+=" ".concat(l)),a&&(h+=" ".concat(a)),c&&(h+=" ".concat(c)),u&&(h+=" ".concat(u)),h){if(e.op.duration){var d=e.op.duration.replace(/^(\d+)(s)-/,function(e,t,r){return t/2+r+" "}),p="transform ".concat(d,", opacity ").concat(d);s.res.style.transition=p}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=h,s.res.style.opacity=f}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 o=1e3*parseFloat(t.duration),i=t.closeAfter?t.closeAfter:0;setTimeout(function(){t.keep||n()},o/2+i)}t.hardCSS&&(s.res.style.transform=t.hardCSS)}else alert("THIS FIRE WITH GRADIENT (invalid block"),console.log("INVALID BLOCKA"),console.log(e)},(r=f(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,"undefined"!=typeof document&&(this._themeUnsub=o.subscribe(function(e){return s._applyTheme(e)}),Promise.resolve().then(function(){return s._applyTheme(o.mode)}))},t=[{key:"isHidden",value:function(e){e&&(this.res.style.display="none")}},{key:"theme",value:function(e){var t=this;return e&&"object"===c(e)?(this._themeMap=e,this._applyTheme(o.mode),this._themeUnsub||(this._themeUnsub=o.subscribe(function(e){return t._applyTheme(e)})),this):this}},{key:"destroy",value:function(){return"function"==typeof this._themeUnsub&&(this._themeUnsub(),this._themeUnsub=null),this.res&&this.res.parentNode&&this.res.parentNode.removeChild(this.res),this}},{key:"_applyTheme",value:function(e){if(!this._noTheme&&this.res)if(this._themeMap){var t=this._themeMap[e];if(!t)return;for(var r in t)this.res.style[r]=t[r]}else{var n=o.defaults&&o.defaults[e];if(n)for(var s in this._themeOriginal||(this._themeOriginal={}),n)s in this._themeOriginal||(this._themeOriginal[s]=this.res.style[s]||""),this._themeOriginal[s]||(this.res.style[s]=n[s])}}},{key:"keySet",value:function(e){if(this.temporaryVal=1,Array.isArray(e)){for(var t=0;t<e.length;t++)e[t]&&null!=e[t].key&&(this.res.style[e[t].key]=e[t].value);return this}return this.res.style[e.key]=e.value,this}},{key:"commonMethods",value:function(e){var t={exact:"fontSize",cursor:"cursor",width:"width",maxWidth:"maxWidth",height:"height",maxHeight:"maxHeight",radius:"borderRadius",lineHeight:"lineHeight",background:"background",font:"fontFamily",opacity:"opacity",gap:"gap",minHeight:"minHeight",position:"position",inset:"inset",top:"top",right:"right",bottom:"bottom",left:"left",zIndex:"zIndex",flex:"flex",flexShrink:"flexShrink",flexGrow:"flexGrow",flexBasis:"flexBasis",flexWrap:"flexWrap",alignSelf:"alignSelf",display:"display",gridTemplateColumns:"gridTemplateColumns",gridTemplateRows:"gridTemplateRows",rowGap:"rowGap",columnGap:"columnGap",letterSpacing:"letterSpacing",textTransform:"textTransform",whiteSpace:"whiteSpace",boxShadow:"boxShadow",backdropFilter:"backdropFilter",WebkitBackdropFilter:"WebkitBackdropFilter",overflow:"overflow",overflowX:"overflowX",overflowY:"overflowY",WebkitOverflowScrolling:"WebkitOverflowScrolling",WebkitTapHighlightColor:"WebkitTapHighlightColor",minWidth:"minWidth",boxSizing:"boxSizing",pointerEvents:"pointerEvents",userSelect:"userSelect",WebkitUserSelect:"WebkitUserSelect",textAlign:"textAlign",transition:"transition"};for(var r in t)null!=e[r]&&(this.res.style[t[r]]=e[r]);return"string"==typeof e.transform&&(this.res.style.transform=e.transform),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.noTheme&&(this._noTheme=!0),e.theme&&this.theme(e.theme),e.hide&&this.isHidden(e.hide),e.transform&&"object"===c(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&&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,this.prevBoxShadow=this.res.style.boxShadow,e.animation&&(this.res.style.transition="".concat(e.animation),this.res.style.transionProperty="background, color, transform"),this.prevTransform=this.res.style.transform,this.res.onmouseout=function(){t.res.style.backgroundColor="".concat(t.prevColor),t.res.style.color="".concat(t.foreColor),t.res.style.border=t.prevBorder,null==e.scale&&null==e.transform||(t.res.style.transform=t.prevTransform||""),null!=e.boxShadow&&(t.res.style.boxShadow=t.prevBoxShadow||"")},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"}if(null!=e.scale||null!=e.transform){var s=t.prevTransform?"".concat(t.prevTransform," "):"",i=[];null!=e.transform&&i.push(e.transform),null!=e.scale&&i.push("scale(".concat(e.scale,")")),t.res.style.transform="".concat(s).concat(i.join(" "))}null!=e.boxShadow&&(t.res.style.boxShadow=e.boxShadow)},this}},{key:"onScroll",value:function(e){var t=this,r=function(e){if(null==e)return{num:0,unit:"px"};var t=String(e).match(/^(-?[\d.]+)(.*)$/);return t?{num:parseFloat(t[1]),unit:t[2]||"px"}:{num:0,unit:"px"}},n=function(e){var r=e&&null!=e.tx?e.tx:"0px",n=e&&null!=e.ty?e.ty:"0px";t.res.style.transform="translate3d(".concat(r,", ").concat(n,", 0)")};"opacity"===e.value?this.res.style.opacity=e.valMin:"scale"===e.value?this.res.style.transform="scale(".concat(e.valMin,")"):"trn"===e.value&&n(e.valMin);var o=function(){if("trn"!==e.value){var o=t.smartRange(window.scrollY,{min:e.from,max:e.to},{min:e.valMin,max:e.valMax});"opacity"===e.value?t.res.style.opacity=o:"scale"===e.value&&(t.res.style.transform="scale(".concat(o,")"))}else{for(var s={},i=["tx","ty"],a=0;a<i.length;a++){var l=i[a],c=e.valMin&&null!=e.valMin[l],u=e.valMax&&null!=e.valMax[l];if(c||u){var f=r(c?e.valMin[l]:u?e.valMax[l]:"0px"),h=r(u?e.valMax[l]:c?e.valMin[l]:"0px"),d=t.smartRange(window.scrollY,{min:e.from,max:e.to},{min:f.num,max:h.num});s[l]="".concat(d).concat(f.unit)}}n(s)}};window.addEventListener("scroll",o),0===e.from&&o()}},{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]},o=["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 s=e.find(function(e){return"default"===e.breakpoint});for(var a in s||(s={breakpoint:"default",range:n.default},e.unshift(s)),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){o.includes(e)||"range"===e||l.add(e)})}),l.forEach(function(e){void 0===s[e]&&(s[e]=r.options[e]||"initial")}),this._responsiveTasks=this._responsiveTasks||[],this._responsiveTasks.push(function(){for(var t=window.innerWidth,n=s,a=0;a<e.length;a++){var c=e[a],u=i(c.range,2),f=u[0],h=u[1];if("default"!==c.breakpoint&&t>=f&&t<=h){n=c;break}}for(var d in l.forEach(function(e){if("keySet"===e){var t=s[e];t&&t.key&&(r.res.style[t.key]=t.value)}else r.res.style[e]=s[e]}),n)if("exact"===d&&(console.log("APPL"),console.log(n),console.log(r.set),r.set(n)),!o.includes(d)&&"range"!==d){var p=n[d];"keySet"===d&&p&&p.key?r.res.style[p.key]=p.value:"function"==typeof r[d]?r[d](p):r.res.style[d]=p}}),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,o=n,s=0;s<e.length;s++){var a=e[s],l=i(a.range,2),c=l[0],u=l[1];if("default"!==a.breakpoint&&r>=c&&r<=u){o=a;break}}var f=void 0!==o.values?o.values:n.values;null!=f&&t.pad(f)}),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},o=function(){for(var r=window.innerWidth,o=n,s=0;s<e.length;s++){var a=e[s],l=i(a.range,2),c=l[0],u=l[1];if("default"!==a.breakpoint&&r>=c&&r<=u){o=a;break}}t(o)};this._responsiveHandler&&window.removeEventListener("resize",this._responsiveHandler),this._responsiveHandler=o,window.addEventListener("resize",o),setTimeout(function(){o()},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,o=n,s=0;s<e.length;s++){var a=e[s],l=i(a.range,2),c=l[0],u=l[1];if("default"!==a.breakpoint&&r>=c&&r<=u){o=a;break}}var f=void 0!==o.values?o.values:n.values;null!=f&&t.mar(f)}),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){if("center"===e)return this.res.style.marginLeft="auto",this.res.style.marginRight="auto",this;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":"auto"===s?(this.res.style.marginLeft="auto",this.res.style.marginRight="auto"):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}"center"===o&&!0===s&&(this.res.style.marginLeft="auto",this.res.style.marginRight="auto"),"auto"===s&&(o.includes("l")||o.includes("r"))&&(o.includes("l")&&(this.res.style.marginLeft="auto"),o.includes("r")&&(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),void 0!==e.radius&&(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 n=this;console.log("0P"),this.ap=!1,this.cta=0,this.once=!1;var o,a=s(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=[];n.resCopy=n.res,n.storedQueries=e.map(function(e){return e.target}).filter(function(e){return null!=e});var u,f=s(e);try{for(f.s();!(u=f.n()).done;){var h=u.value;n.counterIndex++;var d=i(h.range,2),p=d[0],y=d[1],v=parseInt(p),m=parseInt(y),g=!0;if(h.target){g=!1;for(var b=0;b<h.target.length;b++)h.target[b]===t&&(g=!0)}a>=v&&a<=m&&g&&(l.push(h.log),c.push(h),h.op&&h.op.margin&&(n.useMargin=h.op.margin))}}catch(e){f.e(e)}finally{f.f()}if(r&&!r.includes("background")&&(n.res.style.background="",n.res.style.backgroundColor=""),n.res.style.textShadow="",r&&!r.includes("border")&&(n.res.style.border=""),r&&!r.includes("margin")&&(n.res.style.margin=""),n.res.style["-webkit-text-fill-color"]="",n.res.style["-webkit-text-stroke-color"]="",n.res.style["-webkit-text-stroke-width"]="",n.res.style.filter="",n.options.background&&(console.log(n.options.background),n.res.style.background=n.options.background),l.includes("gradient"),(l.includes("gradient")||l.includes("shadow"))&&(n.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"===n.getType()||"LayoutWrapperElement"===n.getType()?(n.res.style.border="".concat("number"==typeof w?w+"px":w," solid orange"),n.res.style.display="inline-block","FlexRowLayoutElement"===n.getType()&&(n.res.style.display="flex"),n.res.style.boxSizing="border-box",n.res.style.transformOrigin="center",n.blastTarget=n.res):(n.text,n.res.style["-webkit-text-fill-color"]="transparent",n.res.style["-webkit-text-stroke-color"]=x,n.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;n.res.style.filter=S}if(l.includes("background")&&(n.res.style.backgroundColor="green"),l.includes("gradient")&&("LayoutWrapperElement"!==n.getType()&&"FlexRowLayoutElement"!==n.getType()&&(n.res.style["-webkit-text-fill-color"]="transparent"),n.res.style.background=n.globalGradient,"LayoutWrapperElement"!==n.getType()&&"FlexRowLayoutElement"!==n.getType()&&(n.res.style["background-clip"]="text")),l.includes("shadow")){var T,E,O,C,_=n.options.shadow.op;console.log("OP IS",_);var A=null!==(T=_.steps)&&void 0!==T?T:1,R=null!==(E=_.colors)&&void 0!==E?E:["gray"],j=null!==(O=_.movements)&&void 0!==O?O:["3px","3px"],W=null!==(C=_.radius)&&void 0!==C?C:"3px";if(1===j.length&&(j=[j[0],j[0]]),"FlexRowLayoutElement"===n.getType()||"LayoutWrapperElement"===n.getType()){for(var I=[],L=0;L<A;L++){var P,M=null!==(P=R[L])&&void 0!==P?P:R[0],N=j[0],z=j[1];I.push("".concat(N," ").concat(z," ").concat(W," ").concat(M))}n.res.style.boxShadow=I.join(", ")}else{for(var H=[],B=0;B<A;B++){var F,D=null!==(F=R[B])&&void 0!==F?F:R[0],G=j[0],U=j[1];H.push("drop-shadow(".concat(G," ").concat(U," ").concat(W," ").concat(D,")"))}n.res.style.filter=H.join(" ")}}if(l.includes("margin"))for(b=0;b<e.length;b++)if(e[b].op){var Y=e[b].op.offsets;Y&&void 0!==n.index&&(n.res.style.margin=Y[Number(n.index)]+"px")}if(l.includes("spana")||l.includes("span")){var X=document.createElement("div");if(X.setAttribute("id","oroa"),Object.assign(X.style,{position:"absolute",inset:"0",background:"linear-gradient(90deg, rgb(52,152,219), rgb(26,188,156))",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",pointerEvents:"none"}),n.res&&n.res.querySelector("span"))return;n.res=n.resCopy,n.res.textContent="",n.options.span&&(Array.isArray(n.options.span)?n.options.span:[n.options.span]).forEach(function(e){if(e.op&&"span"===e.op.name&&Array.isArray(e.op.parts)){var t=0,r=n.prevText||"";if(e.op.parts.forEach(function(e){var o=e.text,s=e.style||{};if(t<r.length){var i=r.indexOf(o,t);if(i>t){var a=r.substring(t,i);n.res.appendChild(new n.constructor(a).setup({type:"span",id:s.id,animation:s.animation}).set({}).render())}t=i+o.length}var l=new n.constructor(o).setup({type:"span",id:s.id,animation:s.animation}).set(s).render();n.res.appendChild(l)}),t<r.length){var o=r.substring(t);n.res.appendChild(new n.constructor(o).setup({type:"span"}).set({}).render())}}})}else{var $=new n.constructor(n.prevText).set({}).render();n.prevText&&n.prevText.length>0&&o&&n.res.appendChild($)}if(l.includes("animation")){if(n.options.animation&&!n.hasAnimated&&!n.options.animation.op.fireAt){console.warn(n.openTag),n.hasAnimated=!0;var J=n.options.animation.op;window.addEventListener("sidebar:open",function(){n.res.animate(J.keyframesOpen,J.openOptions)}),window.addEventListener("sidebar:closed",function(){n.res.animate(J.keyframesClose,J.closeOptions)}),n.res.animate(J.keyframesClose,{duration:0,fill:"forwards"}),n.openTag&&n.closeTag&&(window.addEventListener(n.openTag,function(){n.res.animate(J.keyframesOpen,J.openOptions)}),window.addEventListener(n.closeTag,function(){n.res.animate(J.keyframesClose,J.closeOptions)}))}if(n.options.animation&&n.options.animation.op.fireAt&&n.options.animation.op.fireAt.endsWith("px")){var V=n.options.animation.op;n.res.animate(V.keyframesClose,{duration:0,fill:"forwards"});var q=function(){window.scrollY>parseFloat(V.fireAt)&&(n.res.animate(V.keyframesOpen,V.openOptions),window.removeEventListener("scroll",q))};window.addEventListener("scroll",q)}if(n.options.animation&&"inview"===n.options.animation.op.fireAt){var Q=n.options.animation.op;n.res.animate(Q.keyframesClose,{duration:0,fill:"forwards"});var K=!1;new IntersectionObserver(function(e,t){e.forEach(function(e){e.isIntersecting&&!K&&(K=!0,n.res.animate(Q.keyframesOpen,Q.openOptions),t.disconnect())})}).observe(n.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&&u(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function d(e){return d="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},d(e)}function p(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return y(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)?y(e,t):void 0}}(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 s,i=!0,a=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){a=!0,s=e},f:function(){try{i||null==r.return||r.return()}finally{if(a)throw s}}}}function y(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 v(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,m(n.key),n)}}function m(e){var t=function(e){if("object"!=d(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=d(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==d(t)?t:t+""}function g(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(g=function(){return!!e})()}function b(){return b="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=k(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}},b.apply(null,arguments)}function k(e){return k=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},k(e)}function x(e,t){return x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},x(e,t)}var w=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=k(t),function(e,t){if(t&&("object"==d(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,g()?Reflect.construct(t,r||[],k(e).constructor):t.apply(e,r))}(this,e)).res=document.createElement("table"),t.res.style.borderCollapse="separate",t.res.style.borderSpacing="0",t.res.style.overflow="hidden",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&&x(e,t)}(e,h),t=e,r=[{key:"add",value:function(e){this.data=e,this.datas=e;var t=Object.keys(e[0]);return this.generateTable(this.res,e),this.generateTableHead(this.res,t),this}},{key:"style",value:function(e){return e.font&&(this.res.style.fontFamily=e.font),this}},{key:"getType",value:function(){return"LayoutWrapperElement"}},{key:"set",value:function(e){return e.cellPadding&&this.cellPadding(e.cellPadding),e.cellAlign&&this.cellAlign(e.cellAlign),e.style&&this.style(e.style),e.headStyle&&this.headStyle(e.headStyle),e.border&&this.border(e.border),e.center&&this.center(e.center),e.borderRadius&&this.borderRadius(e.borderRadius),e.gradient&&(this.res.style.background=e.gradient.op.gradient,this.res.style.backgroundClip="padding-box"),this.obj=e,this.options=e,this.callReact(e),this}},{key:"callReact",value:function(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=b(k(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"),l.push("border"),console.log("ARA IS ",s),this.chainReact(s,this.options.id,l)}}},{key:"toCode",value:function(){var e=JSON.stringify(this.data,null,2),t=JSON.stringify(this.obj,null,2);return e=e.replace(/"(\w+)"\s*:/g,"$1:"),t=t.replace(/"(\w+)"\s*:/g,"$1:"),["new Table()\n .add(".concat(e,")\n .set(").concat(t,")")]}},{key:"borderRadius",value:function(e){return this.res.style.borderRadius="".concat(4*e,"px"),this.res.style.overflow="hidden",this}},{key:"center",value:function(){return this.res.style.marginLeft="auto",this.res.style.marginRight="auto",this}},{key:"cellPadding",value:function(e){var t,r=p(this.res.rows);try{for(r.s();!(t=r.n()).done;){var n,o=p(t.value.cells);try{for(o.s();!(n=o.n()).done;)n.value.style.padding=e}catch(e){o.e(e)}finally{o.f()}}}catch(e){r.e(e)}finally{r.f()}return this}},{key:"cellAlign",value:function(e){var t,r=p(this.res.rows);try{for(r.s();!(t=r.n()).done;){var n,o=p(t.value.cells);try{for(o.s();!(n=o.n()).done;)n.value.style.textAlign=e}catch(e){o.e(e)}finally{o.f()}}}catch(e){r.e(e)}finally{r.f()}return this}},{key:"headStyle",value:function(e){var t=this.res.rows[0];return t&&(t.style.color=e.color,e.background&&(t.style.backgroundColor=e.background)),this}},{key:"border",value:function(e){var t;this.res.style.borderCollapse="separate",this.res.style.borderSpacing="0",this.res.style.border=e,this.res.style.borderRadius="12px";var r,n=p(this.res.rows);try{for(n.s();!(r=n.n()).done;){var o,s=p(r.value.cells);try{for(s.s();!(o=s.n()).done;)o.value.style.border="none"}catch(e){s.e(e)}finally{s.f()}}}catch(e){n.e(e)}finally{n.f()}for(var i=0;i<this.res.rows.length-1;i++){var a,l=p(this.res.rows[i].cells);try{for(l.s();!(a=l.n()).done;)a.value.style.borderBottom=e}catch(e){l.e(e)}finally{l.f()}}var c,u=(null===(t=this.res.rows[0])||void 0===t?void 0:t.cells.length)||0,f=p(this.res.rows);try{for(f.s();!(c=f.n()).done;)for(var h=c.value,d=0;d<u-1;d++)h.cells[d].style.borderRight=e}catch(e){f.e(e)}finally{f.f()}return this}},{key:"generateTableHead",value:function(e,t){var r,n=e.createTHead().insertRow(),o=p(t);try{for(o.s();!(r=o.n()).done;){var s=r.value,i=document.createElement("th");i.textContent=s,n.appendChild(i)}}catch(e){o.e(e)}finally{o.f()}}},{key:"generateTable",value:function(e,t){var r,n=p(t);try{for(n.s();!(r=n.n()).done;){var o=r.value,s=e.insertRow();for(var i in o)s.insertCell().textContent=o[i]}}catch(e){n.e(e)}finally{n.f()}}},{key:"render",value:function(e){var t=document.createElement("div");if(t.style.overflowX="auto",t.appendChild(this.res),!e)return t;document.querySelector(e).appendChild(t)}}],r&&v(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r}();export{w as Table};
|