nodality 1.0.0-beta.74 → 1.0.0-beta.76
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.cjs.js.LICENSE.txt +1 -1
- package/dist/animator.esm.js +1 -1
- package/dist/animator.esm.js.LICENSE.txt +1 -1
- package/dist/appleanim.cjs.js.LICENSE.txt +1 -1
- package/dist/appleanim.esm.js.LICENSE.txt +1 -1
- package/dist/audionew.cjs.js +1 -1
- package/dist/audionew.cjs.js.LICENSE.txt +1 -1
- package/dist/audionew.esm.js +1 -1
- package/dist/audionew.esm.js.LICENSE.txt +1 -1
- package/dist/base.cjs.js.LICENSE.txt +1 -1
- package/dist/base.esm.js.LICENSE.txt +1 -1
- package/dist/betaDesktopBar.esm.js +1 -1
- package/dist/betaDesktopBar.esm.js.LICENSE.txt +1 -1
- package/dist/betaMobileBar.esm.js +1 -1
- package/dist/betaMobileBar.esm.js.LICENSE.txt +1 -1
- package/dist/bundle.umd.js +1 -1
- package/dist/bundle.umd.js.LICENSE.txt +1 -1
- package/dist/button.cjs.js +1 -1
- package/dist/button.cjs.js.LICENSE.txt +1 -1
- package/dist/button.esm.js +1 -1
- package/dist/button.esm.js.LICENSE.txt +1 -1
- package/dist/cardGetter.cjs.js.LICENSE.txt +1 -1
- package/dist/cardGetter.esm.js.LICENSE.txt +1 -1
- package/dist/center.cjs.js.LICENSE.txt +1 -1
- package/dist/center.esm.js.LICENSE.txt +1 -1
- package/dist/checkbox.cjs.js +1 -1
- package/dist/checkbox.cjs.js.LICENSE.txt +1 -1
- package/dist/checkbox.esm.js +1 -1
- package/dist/checkbox.esm.js.LICENSE.txt +1 -1
- package/dist/code.cjs.js +1 -1
- package/dist/code.cjs.js.LICENSE.txt +1 -1
- package/dist/code.esm.js +1 -1
- package/dist/code.esm.js.LICENSE.txt +1 -1
- package/dist/container.cjs.js +1 -1
- package/dist/container.cjs.js.LICENSE.txt +1 -1
- package/dist/container.esm.js +1 -1
- package/dist/container.esm.js.LICENSE.txt +1 -1
- package/dist/datalist.cjs.js.LICENSE.txt +1 -1
- package/dist/datalist.esm.js.LICENSE.txt +1 -1
- package/dist/designer.cjs.js +1 -1
- package/dist/designer.cjs.js.LICENSE.txt +1 -1
- package/dist/designer.esm.js +1 -1
- package/dist/designer.esm.js.LICENSE.txt +1 -1
- package/dist/dropdown.cjs.js +1 -1
- package/dist/dropdown.cjs.js.LICENSE.txt +1 -1
- package/dist/dropdown.esm.js +1 -1
- package/dist/dropdown.esm.js.LICENSE.txt +1 -1
- package/dist/elementMapper.cjs.js +1 -1
- package/dist/elementMapper.cjs.js.LICENSE.txt +1 -1
- package/dist/elementMapper.esm.js +1 -1
- package/dist/elementMapper.esm.js.LICENSE.txt +1 -1
- package/dist/finalresult.esm.js +1 -1
- package/dist/finalresult.esm.js.LICENSE.txt +1 -1
- package/dist/flexCard.cjs.js +1 -1
- package/dist/flexCard.cjs.js.LICENSE.txt +1 -1
- package/dist/flexCard.esm.js +1 -1
- package/dist/flexCard.esm.js.LICENSE.txt +1 -1
- package/dist/flexGrid.cjs.js +1 -1
- package/dist/flexGrid.cjs.js.LICENSE.txt +1 -1
- package/dist/flexGrid.esm.js +1 -1
- package/dist/flexGrid.esm.js.LICENSE.txt +1 -1
- package/dist/flexRow.cjs.js +1 -1
- package/dist/flexRow.cjs.js.LICENSE.txt +1 -1
- package/dist/flexRow.esm.js +1 -1
- package/dist/flexRow.esm.js.LICENSE.txt +1 -1
- package/dist/floatingInput.cjs.js +1 -1
- package/dist/floatingInput.cjs.js.LICENSE.txt +1 -1
- package/dist/floatingInput.esm.js +1 -1
- package/dist/floatingInput.esm.js.LICENSE.txt +1 -1
- package/dist/free.cjs.js +1 -1
- package/dist/free.cjs.js.LICENSE.txt +1 -1
- package/dist/free.esm.js +1 -1
- package/dist/free.esm.js.LICENSE.txt +1 -1
- package/dist/horizontalScroller.esm.js.LICENSE.txt +1 -1
- package/dist/image.cjs.js +1 -1
- package/dist/image.cjs.js.LICENSE.txt +1 -1
- package/dist/image.esm.js +1 -1
- package/dist/image.esm.js.LICENSE.txt +1 -1
- package/dist/imagePicker.cjs.js +1 -1
- package/dist/imagePicker.cjs.js.LICENSE.txt +1 -1
- package/dist/imagePicker.esm.js +1 -1
- package/dist/imagePicker.esm.js.LICENSE.txt +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.LICENSE.txt +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.LICENSE.txt +1 -1
- package/dist/link.cjs.js +1 -1
- package/dist/link.cjs.js.LICENSE.txt +1 -1
- package/dist/link.esm.js +1 -1
- package/dist/link.esm.js.LICENSE.txt +1 -1
- package/dist/linkGetter.cjs.js +1 -1
- package/dist/linkGetter.cjs.js.LICENSE.txt +1 -1
- package/dist/linkGetter.esm.js +1 -1
- package/dist/linkGetter.esm.js.LICENSE.txt +1 -1
- package/dist/metaAdder.cjs.js.LICENSE.txt +1 -1
- package/dist/metaAdder.esm.js.LICENSE.txt +1 -1
- package/dist/modal2025.cjs.js.LICENSE.txt +1 -1
- package/dist/modal2025.esm.js.LICENSE.txt +1 -1
- package/dist/multiswitchers.esm.js +1 -1
- package/dist/multiswitchers.esm.js.LICENSE.txt +1 -1
- package/dist/newNavBar.cjs.js +1 -1
- package/dist/newNavBar.cjs.js.LICENSE.txt +1 -1
- package/dist/newNavBar.esm.js +1 -1
- package/dist/newNavBar.esm.js.LICENSE.txt +1 -1
- package/dist/picker.cjs.js +1 -1
- package/dist/picker.cjs.js.LICENSE.txt +1 -1
- package/dist/picker.esm.js +1 -1
- package/dist/picker.esm.js.LICENSE.txt +1 -1
- package/dist/progress.cjs.js.LICENSE.txt +1 -1
- package/dist/progress.esm.js.LICENSE.txt +1 -1
- package/dist/radio.cjs.js.LICENSE.txt +1 -1
- package/dist/radio.esm.js.LICENSE.txt +1 -1
- package/dist/range.cjs.js.LICENSE.txt +1 -1
- package/dist/range.esm.js.LICENSE.txt +1 -1
- package/dist/scrollvideo.cjs.js.LICENSE.txt +1 -1
- package/dist/scrollvideo.esm.js.LICENSE.txt +1 -1
- package/dist/sideBar.cjs.js.LICENSE.txt +1 -1
- package/dist/sideBar.esm.js.LICENSE.txt +1 -1
- package/dist/sideNavBar.cjs.js +1 -1
- package/dist/sideNavBar.cjs.js.LICENSE.txt +1 -1
- package/dist/sideNavBar.esm.js +1 -1
- package/dist/sideNavBar.esm.js.LICENSE.txt +1 -1
- package/dist/simpleBar.cjs.js +1 -1
- package/dist/simpleBar.cjs.js.LICENSE.txt +1 -1
- package/dist/simpleBar.esm.js +1 -1
- package/dist/simpleBar.esm.js.LICENSE.txt +1 -1
- package/dist/stack.cjs.js.LICENSE.txt +1 -1
- package/dist/stack.esm.js.LICENSE.txt +1 -1
- package/dist/stacker.cjs.js.LICENSE.txt +1 -1
- package/dist/stacker.esm.js.LICENSE.txt +1 -1
- package/dist/table.cjs.js +1 -1
- package/dist/table.cjs.js.LICENSE.txt +1 -1
- package/dist/table.esm.js +1 -1
- package/dist/table.esm.js.LICENSE.txt +1 -1
- package/dist/text.cjs.js +1 -1
- package/dist/text.cjs.js.LICENSE.txt +1 -1
- package/dist/text.esm.js +1 -1
- package/dist/text.esm.js.LICENSE.txt +1 -1
- package/dist/textField.cjs.js +1 -1
- package/dist/textField.cjs.js.LICENSE.txt +1 -1
- package/dist/textField.esm.js +1 -1
- package/dist/textField.esm.js.LICENSE.txt +1 -1
- package/dist/transformanim.cjs.js +1 -1
- package/dist/transformanim.cjs.js.LICENSE.txt +1 -1
- package/dist/transformanim.esm.js +1 -1
- package/dist/transformanim.esm.js.LICENSE.txt +1 -1
- package/dist/wrap.cjs.js.LICENSE.txt +1 -1
- package/dist/wrap.esm.js.LICENSE.txt +1 -1
- package/dist/zoomCard.cjs.js +1 -1
- package/dist/zoomCard.cjs.js.LICENSE.txt +1 -1
- package/dist/zoomCard.esm.js +1 -1
- package/dist/zoomCard.esm.js.LICENSE.txt +1 -1
- package/layout/DEPRECATED-PARAGRAPH.js +1 -1
- package/layout/animator.js +59 -74
- 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/betaDesktopBar.js +1 -1
- package/layout/betaMobileBar.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/cleanRow.js +1 -1
- package/layout/code.js +1 -1
- package/layout/container.js +78 -188
- package/layout/custom.js +1 -1
- package/layout/divImage.js +1 -1
- package/layout/dropdown.js +1 -1
- package/layout/dropdown2025.js +40 -2
- package/layout/emptyElement.js +1 -1
- package/layout/externalStylesheet.js +1 -1
- package/layout/flexCard.js +1 -1
- package/layout/flexGrid.js +4 -1
- package/layout/flexrow.js +1 -1
- package/layout/footer.js +1 -1
- package/layout/formComponents/custom.js +1 -1
- package/layout/formComponents/dataList.js +1 -1
- package/layout/formComponents/floatingInput.js +2 -1
- package/layout/formComponents/form-all.js +1 -1
- package/layout/formComponents/form.js +2 -1
- package/layout/formComponents/imagePicker.js +1 -1
- package/layout/formComponents/picker.js +1 -1
- package/layout/formComponents/radio.js +1 -1
- package/layout/formComponents/radiogroup.js +1 -1
- package/layout/formComponents/range.js +1 -1
- package/layout/free.js +4 -4
- package/layout/grid-new.js +1 -1
- package/layout/grid.js +1 -1
- package/layout/gridSwitcher.js +1 -1
- package/layout/group.js +1 -1
- package/layout/header.js +1 -1
- package/layout/horizontalScroller.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/metaAdder.js +1 -1
- package/layout/modal2025.js +1 -1
- package/layout/modernwrap.js +1 -1
- package/layout/multiswitcher.js +1 -1
- package/layout/multiswitcherBeta.js +1 -1
- package/layout/navBar-OLD.js +1 -1
- package/layout/navBar.js +1 -1
- package/layout/navFactor/customDiv.js +3 -1
- package/layout/newFlatAdder.js +1 -1
- package/layout/newNavBar copy 2.js +1 -1
- package/layout/newNavBar copy.js +1 -1
- package/layout/newNavBar.js +1 -1
- package/layout/offsetContainer.js +1 -1
- package/layout/progress.js +1 -1
- package/layout/row.js +1 -1
- package/layout/savedNewNavBar.js +1 -1
- package/layout/scrollvideo.js +8 -4
- package/layout/sideBar.js +1 -1
- package/layout/sideNavBar.js +1 -1
- package/layout/simpleBar.js +1 -1
- package/layout/slider2025.js +1 -1
- package/layout/spacer.js +1 -1
- package/layout/stack.js +1 -1
- package/layout/styler.js +1 -1
- package/layout/switcher.js +1 -1
- package/layout/table.js +1 -1
- package/layout/text.js +25 -5
- package/layout/textField.js +1 -1
- package/layout/ulist.js +1 -1
- package/layout/video.js +1 -1
- package/layout/withoutNew.js +1 -1
- package/layout/wrap.js +1 -1
- package/layout/zoomCard.js +1 -1
- package/lib/AppleAnim.js +2 -1
- package/lib/Stacker.js +3 -1
- package/lib/TransformAnim.js +5 -2
- package/lib/cardGetter.js +1 -1
- package/lib/designer.js +42 -3
- package/lib/elementMapper.js +169 -4
- package/lib/linkGetter.js +4 -1
- package/lib/scrollvideo.js +3 -1
- package/package.json +2 -2
package/dist/animator.cjs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see animator.cjs.js.LICENSE.txt */
|
|
2
|
-
(()=>{"use strict";var t={d:(e,r)=>{for(var s in r)t.o(r,s)&&!t.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:r[s]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function s(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var s,n,i,a,o=[],l=!0,c=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(s=i.call(r)).done)&&(o.push(s.value),o.length!==e);l=!0);}catch(t){c=!0,n=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw n}}return o}}(t,e)||i(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=i(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var s=0,n=function(){};return{s:n,n:function(){return s>=t.length?{done:!0}:{done:!1,value:t[s++]}},e:function(t){throw t},f:n}}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 a,o=!0,l=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){l=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(l)throw a}}}}function i(t,e){if(t){if("string"==typeof t)return a(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(t,e):void 0}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,s=Array(e);r<e;r++)s[r]=t[r];return s}function o(t,e){for(var r=0;r<e.length;r++){var s=e[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,l(s.key),s)}}function l(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var s=e.call(t,"string");if("object"!=r(s))return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}t.r(e),t.d(e,{Animator:()=>c});var c=function(){return t=function t(){var e,r,s,n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e=this,s=function(t){if(t.transform||t.op&&t.op.transform){var e=t.transform;t.transform||(e=t.op.transform),e.duration||(e.duration="3s-ease-in-out"),n.setDefault=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"0px";return 0===t.length?e+" ":t};var r=function(){var r="",s="",i="",a="",o="",l="",c="",u="",d="";if(0!==e.values.length){e.values.forEach((function(t){t.startsWith("tx:")&&(r=t.replace("tx:","")),t.startsWith("ty:")&&(s=t.replace("ty:","")),t.startsWith("tz:")?i=t.replace("tz:",""):t.startsWith("scale(")?a=t:t.startsWith("skew(")?o=t:t.startsWith("rotate(")?l=function(t){var e=t.match(/rotate\(([^)]+)\)/);if(!e)return t;var r=e[1].split(",").map((function(t){return t.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],")"):t}(t):t.startsWith("perspective(")?c=t:t.startsWith("matrix(")?u=t:t.startsWith("opacity:")&&(d=t.replace("opacity:",""))})),r=n.setDefault(r),s=n.setDefault(s),i=n.setDefault(i);var f="";if("0px"!=s&&"0px"!=r&&"0px"!=i?f+="translate3d(".concat(r,", ").concat(s,", ").concat(i,")"):"0px"==s&&"0px"==r||(f+="translate(".concat(r,", ").concat(s,")")),a&&(f+=" ".concat(a)),l&&(f+=" ".concat(l)),o&&(f+=" ".concat(o)),c&&(f+=" ".concat(c)),u&&(f+=" ".concat(u)),f){if(t.op.transform.duration){var h=t.op.transform.duration.replace(/^(\d+)(s)-/,(function(t,e,r){return e/2+r+" "})),p="transform ".concat(h,", opacity ").concat(h);n.res.style.transition=p}else n.res.style.transition="transform 3s ease-in-out, opacity 3s ease-in-out";n.res.style.transform=f,n.res.style.opacity=d}}};e.on?n.res.addEventListener(e.on,(function(){e.delay?setTimeout((function(){r()}),e.delay):r()})):window.addEventListener("load",(function(){e.delay?setTimeout((function(){r()}),e.delay):r()}));var s=function(){var t="";e.values.forEach((function(e){e.startsWith("tx:")?t+="translateX(0) ":e.startsWith("ty:")?t+="translateY(0) ":e.startsWith("tz:")?t+="translateZ(0) ":e.startsWith("scale(")?t+="scale(1) ":e.startsWith("skew(")?t+="skew(0, 0) ":e.startsWith("rotate(")?t+="rotate(0) ":e.startsWith("perspective(")?t+="perspective(0) ":e.startsWith("matrix(")&&(t+="matrix(1, 0, 0, 1, 0, 0) "),n.res.style.opacity="1"})),t&&(n.res.style.transform=t.trim())};if(e.on)n.res.addEventListener("mouseout",(function(){e.keep||s()}));else{var i=1e3*parseFloat(e.duration),a=e.closeAfter?e.closeAfter:0;setTimeout((function(){e.keep||s()}),i/2+a)}}},(r=l(r="reactOnTransform"))in e?Object.defineProperty(e,r,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[r]=s,this.state={isExpanded:!1,isMovedUp:!1,isMovedDown:!1}},(e=[{key:"keySet",value:function(t){return this.temporaryVal=1,this.res.style[t.key]=t.value,this}},{key:"onScroll",value:function(t){var e=this;"opacity"===t.value?this.res.style.opacity=t.valMin:"scale"===t.value&&(this.res.style.transform="scale(".concat(t.valMax,")")),window.addEventListener("scroll",(function(){var r=e.smartRange(window.scrollY,{min:t.from,max:t.to},{min:t.valMin,max:t.valMax});"opacity"===t.value?e.res.style.opacity=r:"scale"===t.value&&(e.res.style.transform="scale(".concat(r,")"))}))}},{key:"setAny",value:function(t){this[Object.keys(t)[0]]=[Object.values(t)[0]]}},{key:"setID",value:function(t){this.id=t}},{key:"setPrevText",value:function(t){this.prevText=t}},{key:"getCSS",value:function(){return this.css}},{key:"getPX",value:function(t){return{xs:"0px",sm:"576px",md:"768px",lg:"992px",xl:"1200px",xxl:"1400px",mxxl:"1800px"}[t]||"Invalid breakpoint"}},{key:"respad",value:function(t){var e=this,r=function(){e.pad(t[0].values);for(var r=0;r<t.length;r++){var s=t[r].breakpoint;window.matchMedia("(min-width: ".concat(e.getPX(s))).matches&&e.pad(t[r].values)}};window.addEventListener("resize",r),r()}},{key:"resmar",value:function(t){var e=this,r=function(){e.mar(t[0].values);for(var r=0;r<t.length;r++){var s=t[r].breakpoint;window.matchMedia("(max-width: ".concat(e.getPX(s))).matches&&e.mar(t[r].values)}};window.addEventListener("resize",r),r()}},{key:"resprop",value:function(t){var e=this;this.prevBackground=this.res.style.background,this.prevWidth=this.res.style.width,this.prevHeight=this.res.style.height,this.prevBorder=this.res.style.border;var r=function(){e.res.style.background=e.prevBackground,e.res.style.width=e.prevWidth,e.res.style.height=e.prevHeight,e.res.style.border=e.prevBorder;for(var r=0;r<t.length;r++){var s=t[r].breakpoint;if(window.matchMedia("(max-width: ".concat(e.getPX(s))).matches){var n={};for(var i in t[r])"breakpoint"!==i&&(n[i]=t[r][i]);e.set(n)}}};window.addEventListener("resize",r),r()}},{key:"isNumber",value:function(t){return"number"==typeof t&&!isNaN(t)}},{key:"pad",value:function(t){for(var e=0;e<t.length;e++)for(var r=Object.keys(t[e]),s=0;s<r.length;s++)for(var n=r[s],i=t[e][n],a=0;a<n.length;a++)switch(n[a]){case"a":this.res.style.padding=this.isNumber(i)?"".concat(i,"px"):i;break;case"t":this.res.style.paddingTop=this.isNumber(i)?"".concat(i,"px"):i;break;case"l":this.res.style.paddingLeft=this.isNumber(i)?"".concat(i,"px"):i;break;case"r":this.res.style.paddingRight=this.isNumber(i)?"".concat(i,"px"):i;break;case"b":this.res.style.paddingBottom=this.isNumber(i)?"".concat(i,"px"):i}return this}},{key:"as",value:function(t){return this.res.style.alignSelf=t,this}},{key:"mar",value:function(t){for(var e=0;e<t.length;e++)for(var r=Object.keys(t[e]),s=0;s<r.length;s++)for(var n=r[s],i=t[e][n],a=0;a<n.length;a++){switch(n[a]){case"a":this.res.style.margin=this.isNumber(i)?"".concat(i,"px"):i;break;case"t":this.res.style.marginTop=this.isNumber(i)?"".concat(i,"px"):i;break;case"l":this.res.style.marginLeft=this.isNumber(i)?"".concat(i,"px"):i;break;case"r":this.res.style.marginRight=this.isNumber(i)?"".concat(i,"px"):i;break;case"b":this.res.style.marginBottom=this.isNumber(i)?"".concat(i,"px"):i}"auto"===n[a]&&(this.res.style.marginLeft="auto",this.res.style.marginRight="auto")}return this}},{key:"smartRange",value:function(t,e,r){t<e.min&&(t=e.min),t>e.max&&(t=e.max);var s=(t-e.min)/(e.max-e.min);e.min>e.max&&(s=(t-e.max)/(e.min-e.max));var n=(r.min-r.max)*s-r.min;if(n=Math.abs(n),r.min<r.max){var i=(r.max+Math.abs(r.min))*s;n=r.min+i}return n}},{key:"gpos",value:function(t){return this.res.style.gridColumn=t.col,this.res.style.gridRow=t.row,this}},{key:"fluidCopy",value:function(t){if(t instanceof Object){this.prevStylex=this.res.style,this.res=document.createElement("h1"),this.res.style.cssText=this.prevStylex.cssText;var e=document.createTextNode(this.text);return this.res.appendChild(e),this.res.style.fontSize=t.exact,this}if("S1"===t){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"===t){this.prevStylex=this.res.style,this.res=document.createElement("h2"),this.res.style.cssText=this.prevStylex.cssText;var s=document.createTextNode(this.text);this.res.appendChild(s),this.res.style.fontSize="calc(1.500rem + 4.3vw)"}if("S3"===t){this.prevStylex=this.res.style,this.res=document.createElement("h3"),this.res.style.cssText=this.prevStylex.cssText;var n=document.createTextNode(this.text);this.res.appendChild(n),this.res.style.fontSize="calc(1.375rem + 3.525vw)"}if("S4"===t){this.prevStylex=this.res.style,this.res=document.createElement("h4"),this.res.style.cssText=this.prevStylex.cssText;var i=document.createTextNode(this.text);this.res.appendChild(i),this.res.style.fontSize="calc(1.250rem + 2.75vw)"}if("S5"===t){this.prevStylex=this.res.style,this.res=document.createElement("h5"),this.res.style.cssText=this.prevStylex.cssText;var a=document.createTextNode(this.text);this.res.appendChild(a),this.res.style.fontSize="calc(1.125rem + 1.975vw)"}return"S6"===t&&(this.res.style.fontSize="calc(1rem + 0.5vw)"),this}},{key:"setIndex",value:function(t){this.index=t}},{key:"borderObj",value:function(t){var e,r=null!==(e=t.type)&&void 0!==e?e:"solid";return this.res.style.border="".concat(t.width," ").concat(r," ").concat(t.color),this.res.style.borderRadius=t.radius,this}},{key:"protoReact",value:function(t,e){var r=this;t.sort((function(t,e){return parseInt(t.range[0])-parseInt(e.range[0])}));var i=function(){var i=window.innerWidth,a="";r.storedQueries=t.map((function(t){return t.target})).filter((function(t){return null!=t}));var o,l=n(t);try{for(l.s();!(o=l.n()).done;){var c=o.value;r.counterIndex++;var u=s(c.range,2),d=u[0],f=u[1],h=parseInt(d),p=parseInt(f),y=!0;if(c.target){y=!1;for(var m=0;m<c.target.length;m++)c.target[m]===e&&(y=!0)}i>=h&&i<=p&&y&&("gradient"===c.log&&(a+="gradient"),"blast"===c.log&&(a+="blast"),"animation"===c.log&&(a+="animation"),"shadow"===c.log&&(a+="shadow"),"span"===c.log&&(a+="span"),"filter"===c.log&&(a+="filter"),"background"===c.log&&(a+="background"))}}catch(t){l.e(t)}finally{l.f()}r.res.style.margin="";var v,g=r.res.style.color;for(t.map((function(t){return t.log})).filter((function(t){return null!=t})).includes("gradient")&&(r.res.style.WebkitBackgroundClip="",r.res.style.background=""),r.res.style["-webkit-text-stroke"]="",r.res.style.filter="",r.res.style.textShadow="",r.res.style.border="";r.res.firstChild;)r.res.removeChild(r.res.firstChild);if(r.res.textContent=r.text,""===a&&(r.res.style["-webkit-text-fill-color"]="",r.res.style.color=g),"blast"===a){for(m=0;m<t.length;m++){var x=t[m].op.offsets;x&&void 0!==r.index&&(r.res.style.margin=x[Number(r.index)]+"px")}for(r.res.style["-webkit-text-fill-color"]="transparent",r.res.style["-webkit-text-stroke"]=r.globalBlast,m=0;m<t.length;m++){var b=t[m].op.offsets;b&&void 0!==r.index&&(r.res.style.margin=b[Number(r.index)]+"px")}}if("gradient"===a&&(r.res.style["-webkit-text-fill-color"]="transparent",r.res.style.background=r.globalGradient,r.res.style["-webkit-background-clip"]="text",r.res.style.border="1px solid orange"),"background"===a&&(r.res.style.background="orange"),"gradientblast"===a&&(r.res.style["-webkit-text-fill-color"]="transparent",r.res.style.background=r.globalGradient,r.res.style["-webkit-background-clip"]="text",r.res.style["-webkit-text-stroke"]=r.globalBlast),"gradientanimation"===a&&(r.res.style["-webkit-text-fill-color"]="transparent",r.res.style.background=r.globalGradient,r.res.style["-webkit-background-clip"]="text"),"gradientanimationshadow"===a&&(r.res.style["-webkit-text-fill-color"]="transparent",r.res.style.background=r.globalGradient,r.res.style["-webkit-background-clip"]="text",r.res.style.textShadow=r.globalShadow),"animationshadow"===a&&(r.res.style["-webkit-text-fill-color"]="",r.res.style.textShadow=r.globalShadow),"shadow"===a&&(r.res.style["-webkit-text-fill-color"]="",r.res.style.textShadow=r.globalShadow),"span"===a&&r.options.span)for(v=Array.isArray(r.options.span)?r.options.span.filter((function(t){return"span"===t.op.name}))[0]:r.options.span,r.res.textContent="",m=0;m<v.op.parts.length;m++){var k=v.op.parts[m].style,w=new Text(v.op.parts[m].text).setup({type:"span"}).set(k).render();r.res.appendChild(w)}if("filter"===a){var S=r.options.filtera.op.filter;r.res.style.filter=S,r.res.style.border="8px solid orange"}};window.addEventListener("resize",i),i()}},{key:"setPref",value:function(t){this.preffersId=t}},{key:"setClass",value:function(t){this.class=t}},{key:"betaReact",value:function(t,e){var r=this;this.ap=!1,this.cta=0,this.once=!1,t.sort((function(t,e){return parseInt(t.range[0])-parseInt(e.range[0])}));var i=function(){var i=window.innerWidth,a="";r.resCopy=r.res,r.storedQueries=t.map((function(t){return t.target})).filter((function(t){return null!=t}));var o,l=n(t);try{for(l.s();!(o=l.n()).done;){var c=o.value;r.counterIndex++;var u=s(c.range,2),d=u[0],f=u[1],h=parseInt(d),p=parseInt(f),y=!0;if(c.target){y=!1;for(var m=0;m<c.target.length;m++)c.target[m]===e&&(y=!0)}i>=h&&i<=p&&y&&("blast"===c.log&&(a+="blast"),"shadow"===c.log&&(a+="shadow"),"background"===c.log&&(a+="background"),"gradient"===c.log&&(a+="gradient"),"spana"===c.log&&(a+="spana"),"layout"===c.log&&(a+="layout"),"margin"===c.log&&(a+="margin"),c.op&&c.op.margin&&(r.useMargin=c.op.margin))}}catch(t){l.e(t)}finally{l.f()}if(r.res.style.background="",r.res.style.backgroundColor="",r.res.style.textShadow="",r.res.style.border="",r.res.style.margin="",r.res.style["-webkit-text-fill-color"]="",r.res.style["-webkit-text-stroke"]="",r.res.style["-webkit-text-stroke-width"]="","background"===a&&(r.res.style.backgroundColor="green"),"margin"===a)for(m=0;m<t.length;m++)if(t[m].op){var v=t[m].op.offsets;v&&void 0!==r.index&&(r.res.style.margin=v[Number(r.index)]+"px")}if("blastbackgroundmargin"===a){for(m=0;m<t.length;m++)if(t[m].op){var g=t[m].op.offsets;g&&void 0!==r.index&&(r.res.style.margin=g[Number(r.index)]+"px")}r.res.style.backgroundColor="green","FlexRowLayoutElement"===r.getType()?r.res.style.border="1px solid orange":(r.res.textContent=r.text,r.res.style["-webkit-text-fill-color"]="transparent",r.res.style["-webkit-text-stroke-color"]="orange",r.res.style["-webkit-text-stroke-width"]="1px"),r.res.style["-webkit-text-fill-color"]="transparent",r.res.style["-webkit-text-stroke-color"]="orange",r.res.style["-webkit-text-stroke-width"]="1px"}if("blastbackground"===a){for(m=0;m<t.length;m++)if(t[m].op){var x=t[m].op.offsets;x&&void 0!==r.index&&(r.res.style.margin=x[Number(r.index)]+"px")}r.res.style.backgroundColor="green",r.useMargin?r.res.style.margin="1rem":r.res.setAttribute("id","iofhwoiefhoih"),"FlexRowLayoutElement"===r.getType()?r.res.style.border="1px solid orange":(r.res.textContent=r.text,r.res.style["-webkit-text-fill-color"]="transparent",r.res.style["-webkit-text-stroke-color"]="orange",r.res.style["-webkit-text-stroke-width"]="1px"),r.res.style["-webkit-text-fill-color"]="transparent",r.res.style["-webkit-text-stroke-color"]="orange",r.res.style["-webkit-text-stroke-width"]="1px"}if("layout"===a&&(r.res.style.alignSelf="start",r.res.style.border="1px solid purple"),"blast"===a){for(m=0;m<t.length;m++)if(t[m].op){var b=t[m].op.offsets;b&&void 0!==r.index&&(r.res.style.margin=b[Number(r.index)]+"px")}"FlexRowLayoutElement"===r.getType()?r.res.style.border="1px solid orange":(r.res.textContent=r.text,r.res.style["-webkit-text-fill-color"]="transparent",r.res.style["-webkit-background-clip"]="text",r.res.style["-webkit-text-stroke-color"]="orange",r.res.style["-webkit-text-stroke-width"]="1px"),r.res.style["-webkit-text-fill-color"]="transparent",r.res.style["-webkit-text-stroke"]="orange",r.res.style["-webkit-text-stroke-width"]="1px"}"blastgradientbackground"===a&&(r.res.style.border="1px solid yellow",r.res.style["-webkit-text-stroke-color"]="orange",r.res.style["-webkit-text-stroke-width"]="1px"),"gradient"===a&&(r.res.style.background="linear-gradient(to left, #3498db, #1abc9c)","FlexRowLayoutElement"===r.getType()||(r.res.children[0]&&r.res.removeChild(r.res.children[0]),r.res.style["-webkit-text-fill-color"]="transparent",r.res.style["-webkit-background-clip"]="text",r.res.textContent=r.text)),"shadow"===a&&("FlexRowLayoutElement"===r.getType()||(r.res.children[0]&&r.res.removeChild(r.res.children[0]),r.res.style["-webkit-text-fill-color"]="",r.res.style["-webkit-text-fill-color"]="",r.res.style.textShadow="#1abc9cff -6px 6px , #1abc9c40 -12px 12px",r.res.textContent=r.text))};window.addEventListener("resize",i),i()}},{key:"cssGen",value:function(t,e,r,s){return this.css=[""],[""]}},{key:"chainReact",value:function(t,e,r){var i=this;this.cssGen(t,e,this.class,void 0!==this.class),this.ap=!1,this.cta=0,this.once=!1;var a,o=n(t);try{for(o.s();!(a=o.n()).done;){var l=a.value;l.range||(l.range=["0px","999999px"])}}catch(t){o.e(t)}finally{o.f()}t.sort((function(t,e){return parseInt(t.range[0])-parseInt(e.range[0])}));var c=function(){var a=window.visualViewport.width,o=[],l=[];i.resCopy=i.res,i.storedQueries=t.map((function(t){return t.target})).filter((function(t){return null!=t}));var c,u=n(t);try{for(u.s();!(c=u.n()).done;){var d=c.value;i.counterIndex++;var f=s(d.range,2),h=f[0],p=f[1],y=parseInt(h),m=parseInt(p),v=!0;if(d.target){v=!1;for(var g=0;g<d.target.length;g++)d.target[g]===e&&(v=!0)}a>=y&&a<=m&&v&&(o.push(d.log),l.push(d),d.op&&d.op.margin&&(i.useMargin=d.op.margin))}}catch(t){u.e(t)}finally{u.f()}if(r&&!r.includes("background")&&(i.res.style.background="",i.res.style.backgroundColor=""),i.res.style.textShadow="",r&&!r.includes("border")&&(i.res.style.border=""),r&&!r.includes("margin")&&(i.res.style.margin=""),i.res.style["-webkit-text-fill-color"]="",i.res.style["-webkit-text-stroke-color"]="",i.res.style["-webkit-text-stroke-width"]="",i.res.style.filter="",(o.includes("gradient")||o.includes("shadow"))&&(i.res.style.position="relative",i.res.style.zIndex=-1),o.includes("blast")){var x,b=l.filter((function(t){return"blast"===t.log}))[0].op.color,k=null!==(x=l.filter((function(t){return"blast"===t.log}))[0].op.width)&&void 0!==x?x:"1px";"FlexRowLayoutElement"===i.getType()?i.res.style.border="".concat(k,"px solid orange"):(i.res.textContent=i.text,i.res.style["-webkit-text-fill-color"]="transparent",i.res.style["-webkit-text-stroke-color"]=b,i.res.style["-webkit-text-stroke-width"]="".concat(k))}if(o.includes("filter")){var w=l.filter((function(t){return"filter"===t.log}))[0].op.filter;i.res.style.filter=w}if(o.includes("background")&&(i.res.style.backgroundColor="green"),o.includes("gradient")&&(i.res.style["-webkit-text-fill-color"]="transparent",i.res.style.background=i.globalGradient,i.res.style["background-clip"]="text"),o.includes("shadow"))if("FlexRowLayoutElement"===i.getType());else{var S="",E=0;for(g=0;g<i.options.shadow.op.steps;g++)S+="drop-shadow(".concat(E+=3,"px ").concat(E,"px ").concat(E,"px gray) ");i.res.style.filter=S}if(o.includes("margin"))for(g=0;g<t.length;g++)if(t[g].op){var T=t[g].op.offsets;T&&void 0!==i.index&&(i.res.style.margin=T[Number(i.index)]+"px")}if(o.includes("animation")){if(i.options.animation&&!i.hasAnimated&&!i.options.animation.op.fireAt){i.hasAnimated=!0;var C=i.options.animation.op;i.res.animate(C.keyframesClose,{duration:0,fill:"forwards"}),i.res.animate(C.keyframesOpen,C.openOptions)}if(i.options.animation&&i.options.animation.op.fireAt&&i.options.animation.op.fireAt.endsWith("px")){var W=i.options.animation.op;i.res.animate(W.keyframesClose,{duration:0,fill:"forwards"});var L=function(){window.scrollY>parseFloat(W.fireAt)&&(i.res.animate(W.keyframesOpen,W.openOptions),window.removeEventListener("scroll",L))};window.addEventListener("scroll",L)}if(i.options.animation&&i.options.animation.op.fireAt&&"inview"===i.options.animation.op.fireAt){var O=i.options.animation.op;i.res.animate(O.keyframesClose,{duration:0,fill:"forwards"}),new IntersectionObserver((function(t,e){t.forEach((function(t){t.isIntersecting&&(i.res.animate(O.keyframesOpen,O.openOptions),e.disconnect())}))})).observe(i.res)}}};window.addEventListener("resize",c),c()}},{key:"maxWidth",value:function(t){return this.res.style.maxWidth=t,this}},{key:"removeQuotesFromFirstWord",value:function(t){return t.replace(/"([^"]+)":/g,"$1:")}},{key:"arrayMargin",value:function(t,e){return t.includes("left")&&(this.res.style.marginLeft=e),t.includes("right")&&(this.res.style.marginRight=e),t.includes("top")&&(this.res.style.marginTop=e),t.includes("bottom")&&(this.res.style.marginBottom=e),t.includes("all")&&(this.res.style.margin=e),e||(this.res.style.marginBottom=t),this}},{key:"navBarExpand",value:function(){return this.res.style.backgroundColor="green",this.res.animate([{transform:"scaleY(3.0)"}],{duration:2e3,iterations:1,fill:"both"}),this}},{key:"scrollFade",value:function(t,e){return this.res.style.visibility="hidden",this.faden(t,e,"scroll"),this}},{key:"expand",value:function(t){var e=this;return!1===this.state.isExpanded?"click"===t.on?this.res.addEventListener("click",(function(){e.innerExpand(t)})):this.innerExpand(t):this.innerExpandBack(t),this.state.isExpanded=!this.state.isExpanded,this}},{key:"move",value:function(t){var e=this;return"click"===t.on?this.res.addEventListener("click",(function(){e.moveUpa(t)})):("up"===t.direction&&this.moveUpa(t),"down"===t.direction&&this.moveDowna(t),this.state.isMovedUp=!this.state.isMovedUp,"left"===t.direction&&this.moveLeft(t)),this}},{key:"moveLeft",value:function(t){return this.res.animate([{transform:"translateX(0px)"},{transform:"translateX(-".concat(t.distance,")")}],{duration:900,iterations:t.iterations,fill:"both"}).play(),this}},{key:"moveUpa",value:function(t){return!1===this.state.isMovedUp?this.res.animate([{transform:"translateX(0px)"},{transform:"translateY(-".concat(t.distance,")")}],{duration:900,iterations:t.iterations,fill:"both"}).play():this.res.animate([{transform:"translateX(0px)"},{transform:"translateY(".concat(t.distance,")")}],{duration:900,iterations:t.iterations,fill:"both"}).play(),this}},{key:"moveDowna",value:function(t){return!1===this.state.isMovedDown?this.res.animate([{transform:"translateX(0px)"},{transform:"translateY(".concat(t.distance,")")}],{duration:900,iterations:t.iterations,fill:"both"}).play():this.res.animate([{transform:"translateX(0px)"},{transform:"translateY(-".concat(t.distance,")")}],{duration:900,iterations:t.iterations,fill:"both"}).play(),this}},{key:"moveUpaBack",value:function(t){return this.res.animate([{transform:"translateX(0px)"}],{duration:900,iterations:t.iterations,fill:"both"}).play(),this}},{key:"innerExpandBack",value:function(t){this.res.animate([{width:this.prevWidth,height:this.prevHeight}],{duration:900,iterations:t.iterations,fill:"both"})}},{key:"innerExpand",value:function(t){var e,r;return this.prevWidth=this.res.style.width,this.prevHeight=this.res.style.height,this.res.animate([{width:this.prevWidth,height:this.prevHeight},{width:null!==(e=t.width)&&void 0!==e?e:this.prevWidth,height:null!==(r=t.height)&&void 0!==r?r:this.prevHeight}],{duration:900,iterations:t.iterations,fill:"both"}),this}},{key:"fade",value:function(t){return this.res.style.visibility="hidden",this.faden(t.duration,t.from,"load"),t.finalOpacity&&(this.finalOpacity=t.finalOpacity),this}},{key:"faden",value:function(t,e,r){var s=this;return this.res.style.visibility="hidden",this.scrolled=!1,window.addEventListener(r,(function(){s.res.style.visibility="visible";var n=window.innerHeight;(s.res.getBoundingClientRect().top-n<=0||"load"==r)&&0==s.scrolled&&("left"==e&&s.res.animate([{transform:"translateX(-30px)"},{transform:"translateX(0px)"}],{duration:t,iterations:1}),"right"==e&&s.res.animate([{transform:"translateX(30px)"},{transform:"translateX(0px)"}],{duration:t,iterations:1}),"top"==e&&s.res.animate([{transform:"translateY(-30px)"},{transform:"translateY(0px)"}],{duration:t,iterations:1}),"bottom"==e&&s.res.animate([{transform:"translateY(30px)"},{transform:"translateY(0px)"}],{duration:t,iterations:1}),s.res.animate([{opacity:"0.0"},{opacity:"1.0"}],{duration:t,iterations:1}),s.scrolled=!0)})),this}}])&&o(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();module.exports=e})();
|
|
2
|
+
(()=>{"use strict";var t={d:(e,r)=>{for(var n in r)t.o(r,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,s,i,a,o=[],l=!0,c=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(o.push(n.value),o.length!==e);l=!0);}catch(t){c=!0,s=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw s}}return o}}(t,e)||i(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=i(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,s=function(){};return{s,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,l=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){l=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(l)throw a}}}}function i(t,e){if(t){if("string"==typeof t)return a(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(t,e):void 0}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,l(n.key),n)}}function l(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}t.r(e),t.d(e,{Animator:()=>c});var c=function(){return t=function t(){var e,r,n,s=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e=this,n=function(t){if(t.transform||t.op&&t.op.transform){var e=t.transform;t.transform||(e=t.op.transform),e.duration||(e.duration="3s-ease-in-out"),s.setDefault=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"0px";return 0===t.length?e+" ":t};var r=function(){var r="",n="",i="",a="",o="",l="",c="",u="",f="";if(0!==e.values.length){e.values.forEach((function(t){t.startsWith("tx:")&&(r=t.replace("tx:","")),t.startsWith("ty:")&&(n=t.replace("ty:","")),t.startsWith("tz:")?i=t.replace("tz:",""):t.startsWith("scale(")?a=t:t.startsWith("skew(")?o=t:t.startsWith("rotate(")?l=function(t){var e=t.match(/rotate\(([^)]+)\)/);if(!e)return t;var r=e[1].split(",").map((function(t){return t.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],")"):t}(t):t.startsWith("perspective(")?c=t:t.startsWith("matrix(")?u=t:t.startsWith("opacity:")&&(f=t.replace("opacity:",""))})),r=s.setDefault(r),n=s.setDefault(n),i=s.setDefault(i);var h="";if("0px"!=n&&"0px"!=r&&"0px"!=i?h+="translate3d(".concat(r,", ").concat(n,", ").concat(i,")"):"0px"==n&&"0px"==r||(h+="translate(".concat(r,", ").concat(n,")")),a&&(h+=" ".concat(a)),l&&(h+=" ".concat(l)),o&&(h+=" ".concat(o)),c&&(h+=" ".concat(c)),u&&(h+=" ".concat(u)),h){if(t.op.transform.duration){var p=t.op.transform.duration.replace(/^(\d+)(s)-/,(function(t,e,r){return e/2+r+" "})),d="transform ".concat(p,", opacity ").concat(p);s.res.style.transition=d}else s.res.style.transition="transform 3s ease-in-out, opacity 3s ease-in-out";t.op.transform.static&&(s.res.style.transition=""),s.res.style.transform=h,s.res.style.opacity=f}}};e.on?s.res.addEventListener(e.on,(function(){e.delay?setTimeout((function(){r()}),e.delay):r()})):window.addEventListener("load",(function(){e.delay?setTimeout((function(){r()}),e.delay):r()}));var n=function(){var t="";e.values.forEach((function(e){e.startsWith("tx:")?t+="translateX(0) ":e.startsWith("ty:")?t+="translateY(0) ":e.startsWith("tz:")?t+="translateZ(0) ":e.startsWith("scale(")?t+="scale(1) ":e.startsWith("skew(")?t+="skew(0, 0) ":e.startsWith("rotate(")?t+="rotate(0) ":e.startsWith("perspective(")?t+="perspective(0) ":e.startsWith("matrix(")&&(t+="matrix(1, 0, 0, 1, 0, 0) "),s.res.style.opacity="1"})),t&&(s.res.style.transform=t.trim())};if(e.on)s.res.addEventListener("mouseout",(function(){e.keep||n()}));else{var i=1e3*parseFloat(e.duration),a=e.closeAfter?e.closeAfter:0;setTimeout((function(){e.keep||n()}),i/2+a)}e.hardCSS&&(s.res.style.transform=e.hardCSS)}},(r=l(r="reactOnTransform"))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,this.state={isExpanded:!1,isMovedUp:!1,isMovedDown:!1}},e=[{key:"keySet",value:function(t){return this.temporaryVal=1,this.res.style[t.key]=t.value,this}},{key:"onScroll",value:function(t){var e=this;"opacity"===t.value?this.res.style.opacity=t.valMin:"scale"===t.value&&(this.res.style.transform="scale(".concat(t.valMax,")")),window.addEventListener("scroll",(function(){var r=e.smartRange(window.scrollY,{min:t.from,max:t.to},{min:t.valMin,max:t.valMax});"opacity"===t.value?e.res.style.opacity=r:"scale"===t.value&&(e.res.style.transform="scale(".concat(r,")"))}))}},{key:"setAny",value:function(t){this[Object.keys(t)[0]]=[Object.values(t)[0]]}},{key:"setID",value:function(t){this.id=t}},{key:"setPrevText",value:function(t){this.prevText=t}},{key:"getCSS",value:function(){return this.css}},{key:"getPX",value:function(t){return{xs:"0px",sm:"576px",md:"768px",lg:"992px",xl:"1200px",xxl:"1400px",mxxl:"1800px"}[t]||"Invalid breakpoint"}},{key:"respad",value:function(t){var e=this,r=function(){e.pad(t[0].values);for(var r=0;r<t.length;r++){var n=t[r].breakpoint;window.matchMedia("(min-width: ".concat(e.getPX(n))).matches&&e.pad(t[r].values)}};window.addEventListener("resize",r),r()}},{key:"resmar",value:function(t){var e=this,r=function(){e.mar(t[0].values);for(var r=0;r<t.length;r++){var n=t[r].breakpoint;window.matchMedia("(max-width: ".concat(e.getPX(n))).matches&&e.mar(t[r].values)}};window.addEventListener("resize",r),r()}},{key:"resprop",value:function(t){var e=this;this.prevBackground=this.res.style.background,this.prevWidth=this.res.style.width,this.prevHeight=this.res.style.height,this.prevBorder=this.res.style.border;var r=function(){e.res.style.background=e.prevBackground,e.res.style.width=e.prevWidth,e.res.style.height=e.prevHeight,e.res.style.border=e.prevBorder;for(var r=0;r<t.length;r++){var n=t[r].breakpoint;if(window.matchMedia("(max-width: ".concat(e.getPX(n))).matches){var s={};for(var i in t[r])"breakpoint"!==i&&(s[i]=t[r][i]);e.set(s)}}};window.addEventListener("resize",r),r()}},{key:"isNumber",value:function(t){return"number"==typeof t&&!isNaN(t)}},{key:"pad",value:function(t){for(var e=0;e<t.length;e++)for(var r=Object.keys(t[e]),n=0;n<r.length;n++)for(var s=r[n],i=t[e][s],a=0;a<s.length;a++)switch(s[a]){case"a":this.res.style.padding=this.isNumber(i)?"".concat(i,"px"):i;break;case"t":this.res.style.paddingTop=this.isNumber(i)?"".concat(i,"px"):i;break;case"l":this.res.style.paddingLeft=this.isNumber(i)?"".concat(i,"px"):i;break;case"r":this.res.style.paddingRight=this.isNumber(i)?"".concat(i,"px"):i;break;case"b":this.res.style.paddingBottom=this.isNumber(i)?"".concat(i,"px"):i}return this}},{key:"as",value:function(t){return this.res.style.alignSelf=t,this}},{key:"mar",value:function(t){for(var e=0;e<t.length;e++)for(var r=Object.keys(t[e]),n=0;n<r.length;n++)for(var s=r[n],i=t[e][s],a=0;a<s.length;a++){switch(s[a]){case"a":this.res.style.margin=this.isNumber(i)?"".concat(i,"px"):i;break;case"t":this.res.style.marginTop=this.isNumber(i)?"".concat(i,"px"):i;break;case"l":this.res.style.marginLeft=this.isNumber(i)?"".concat(i,"px"):i;break;case"r":this.res.style.marginRight=this.isNumber(i)?"".concat(i,"px"):i;break;case"b":this.res.style.marginBottom=this.isNumber(i)?"".concat(i,"px"):i}"auto"===s[a]&&(this.res.style.marginLeft="auto",this.res.style.marginRight="auto")}return this}},{key:"smartRange",value:function(t,e,r){t<e.min&&(t=e.min),t>e.max&&(t=e.max);var n=(t-e.min)/(e.max-e.min);e.min>e.max&&(n=(t-e.max)/(e.min-e.max));var s=(r.min-r.max)*n-r.min;if(s=Math.abs(s),r.min<r.max){var i=(r.max+Math.abs(r.min))*n;s=r.min+i}return s}},{key:"gpos",value:function(t){return this.res.style.gridColumn=t.col,this.res.style.gridRow=t.row,this}},{key:"fluidCopy",value:function(t){if(t instanceof Object){this.prevStylex=this.res.style,this.res=document.createElement("h1"),this.res.style.cssText=this.prevStylex.cssText;var e=document.createTextNode(this.text);return this.res.appendChild(e),this.res.style.fontSize=t.exact,this}if("S1"===t){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"===t){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"===t){this.prevStylex=this.res.style,this.res=document.createElement("h3"),this.res.style.cssText=this.prevStylex.cssText;var s=document.createTextNode(this.text);this.res.appendChild(s),this.res.style.fontSize="calc(1.375rem + 3.525vw)"}if("S4"===t){this.prevStylex=this.res.style,this.res=document.createElement("h4"),this.res.style.cssText=this.prevStylex.cssText;var i=document.createTextNode(this.text);this.res.appendChild(i),this.res.style.fontSize="calc(1.250rem + 2.75vw)"}if("S5"===t){this.prevStylex=this.res.style,this.res=document.createElement("h5"),this.res.style.cssText=this.prevStylex.cssText;var a=document.createTextNode(this.text);this.res.appendChild(a),this.res.style.fontSize="calc(1.125rem + 1.975vw)"}return"S6"===t&&(this.res.style.fontSize="calc(1rem + 0.5vw)"),this}},{key:"setIndex",value:function(t){this.index=t}},{key:"borderObj",value:function(t){var e,r=null!==(e=t.type)&&void 0!==e?e:"solid";return this.res.style.border="".concat(t.width," ").concat(r," ").concat(t.color),this.res.style.borderRadius=t.radius,this}},{key:"setPref",value:function(t){this.preffersId=t}},{key:"setClass",value:function(t){this.class=t}},{key:"chainReact",value:function(t,e,r){var i=this;console.log("0P"),this.ap=!1,this.cta=0,this.once=!1;var a,o=s(t);try{for(o.s();!(a=o.n()).done;){var l=a.value;l.range||(l.range=["0px","999999px"])}}catch(t){o.e(t)}finally{o.f()}t.sort((function(t,e){return parseInt(t.range[0])-parseInt(e.range[0])}));var c=function(a){var o=window.visualViewport.width,l=[],c=[];i.resCopy=i.res,i.storedQueries=t.map((function(t){return t.target})).filter((function(t){return null!=t}));var u,f=s(t);try{for(f.s();!(u=f.n()).done;){var h=u.value;i.counterIndex++;var p=n(h.range,2),d=p[0],y=p[1],m=parseInt(d),v=parseInt(y),x=!0;if(h.target){x=!1;for(var g=0;g<h.target.length;g++)h.target[g]===e&&(x=!0)}o>=m&&o<=v&&x&&(l.push(h.log),c.push(h),h.op&&h.op.margin&&(i.useMargin=h.op.margin))}}catch(t){f.e(t)}finally{f.f()}if(r&&!r.includes("background")&&(i.res.style.background="",i.res.style.backgroundColor=""),i.res.style.textShadow="",r&&!r.includes("border")&&(i.res.style.border=""),r&&!r.includes("margin")&&(i.res.style.margin=""),i.res.style["-webkit-text-fill-color"]="",i.res.style["-webkit-text-stroke-color"]="",i.res.style["-webkit-text-stroke-width"]="",i.res.style.filter="",(l.includes("gradient")||l.includes("shadow"))&&(i.res.style.position="relative",i.res.style.zIndex=-1),l.includes("blast")){var b,w=c.filter((function(t){return"blast"===t.log}))[0].op.color,k=null!==(b=c.filter((function(t){return"blast"===t.log}))[0].op.width)&&void 0!==b?b:"1px";"FlexRowLayoutElement"===i.getType()?i.res.style.border="".concat(k,"px solid orange"):(i.res.textContent=i.text,i.res.style["-webkit-text-fill-color"]="transparent",i.res.style["-webkit-text-stroke-color"]=w,i.res.style["-webkit-text-stroke-width"]="".concat(k))}if(l.includes("filter")){var S=c.filter((function(t){return"filter"===t.log}))[0].op.filter;i.res.style.filter=S}if(l.includes("background")&&(i.res.style.backgroundColor="green"),l.includes("gradient")&&(i.res.style["-webkit-text-fill-color"]="transparent",i.res.style.background=i.globalGradient,i.res.style["background-clip"]="text"),l.includes("shadow"))if("FlexRowLayoutElement"===i.getType());else{var T="",C=0;for(g=0;g<i.options.shadow.op.steps;g++)T+="drop-shadow(".concat(C+=3,"px ").concat(C,"px ").concat(C,"px gray) ");i.res.style.filter=T}if(l.includes("margin"))for(g=0;g<t.length;g++)if(t[g].op){var E=t[g].op.offsets;E&&void 0!==i.index&&(i.res.style.margin=E[Number(i.index)]+"px")}if(l.includes("spana")||l.includes("span")){if(i.res=i.resCopy,i.options.span){var O;for(O=Array.isArray(i.options.span)?i.options.span.filter((function(t){return"span"===t.op.name}))[0]:i.options.span,i.res.textContent="",g=0;g<O.op.parts.length;g++){var W=O.op.parts[g].style,A=new i.constructor(O.op.parts[g].text).setup({type:"span"}).set(W).render();i.res.appendChild(A)}}}else{if(!a)for(;i.res.firstChild;)i.res.removeChild(i.res.firstChild);var j=new i.constructor(i.prevText).set({}).render();i.res.appendChild(j)}if(l.includes("animation")){if(i.options.animation&&!i.hasAnimated&&!i.options.animation.op.fireAt){i.hasAnimated=!0;var N=i.options.animation.op;i.res.animate(N.keyframesClose,{duration:0,fill:"forwards"}),i.res.animate(N.keyframesOpen,N.openOptions)}if(i.options.animation&&i.options.animation.op.fireAt&&i.options.animation.op.fireAt.endsWith("px")){var I=i.options.animation.op;i.res.animate(I.keyframesClose,{duration:0,fill:"forwards"});var L=function(){window.scrollY>parseFloat(I.fireAt)&&(i.res.animate(I.keyframesOpen,I.openOptions),window.removeEventListener("scroll",L))};window.addEventListener("scroll",L)}if(i.options.animation&&i.options.animation.op.fireAt&&"inview"===i.options.animation.op.fireAt){var M=i.options.animation.op;i.res.animate(M.keyframesClose,{duration:0,fill:"forwards"}),new IntersectionObserver((function(t,e){t.forEach((function(t){t.isIntersecting&&(i.res.animate(M.keyframesOpen,M.openOptions),e.disconnect())}))})).observe(i.res)}}};this.options.animation||window.addEventListener("resize",(function(){return c()})),c()}},{key:"maxWidth",value:function(t){return this.res.style.maxWidth=t,this}},{key:"removeQuotesFromFirstWord",value:function(t){return t.replace(/"([^"]+)":/g,"$1:")}},{key:"arrayMargin",value:function(t,e){return t.includes("left")&&(this.res.style.marginLeft=e),t.includes("right")&&(this.res.style.marginRight=e),t.includes("top")&&(this.res.style.marginTop=e),t.includes("bottom")&&(this.res.style.marginBottom=e),t.includes("all")&&(this.res.style.margin=e),e||(this.res.style.marginBottom=t),this}}],e&&o(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();module.exports=e})();
|
package/dist/animator.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see animator.esm.js.LICENSE.txt */
|
|
2
|
-
var t={d:(e,r)=>{for(var s in r)t.o(r,s)&&!t.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:r[s]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)},e={};function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function s(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var s,n,i,a,o=[],l=!0,c=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(s=i.call(r)).done)&&(o.push(s.value),o.length!==e);l=!0);}catch(t){c=!0,n=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw n}}return o}}(t,e)||i(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=i(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var s=0,n=function(){};return{s:n,n:function(){return s>=t.length?{done:!0}:{done:!1,value:t[s++]}},e:function(t){throw t},f:n}}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 a,o=!0,l=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){l=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(l)throw a}}}}function i(t,e){if(t){if("string"==typeof t)return a(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(t,e):void 0}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,s=Array(e);r<e;r++)s[r]=t[r];return s}function o(t,e){for(var r=0;r<e.length;r++){var s=e[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,l(s.key),s)}}function l(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var s=e.call(t,"string");if("object"!=r(s))return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}t.d(e,{y:()=>c});var c=function(){return t=function t(){var e,r,s,n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e=this,s=function(t){if(t.transform||t.op&&t.op.transform){var e=t.transform;t.transform||(e=t.op.transform),e.duration||(e.duration="3s-ease-in-out"),n.setDefault=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"0px";return 0===t.length?e+" ":t};var r=function(){var r="",s="",i="",a="",o="",l="",c="",u="",d="";if(0!==e.values.length){e.values.forEach((function(t){t.startsWith("tx:")&&(r=t.replace("tx:","")),t.startsWith("ty:")&&(s=t.replace("ty:","")),t.startsWith("tz:")?i=t.replace("tz:",""):t.startsWith("scale(")?a=t:t.startsWith("skew(")?o=t:t.startsWith("rotate(")?l=function(t){var e=t.match(/rotate\(([^)]+)\)/);if(!e)return t;var r=e[1].split(",").map((function(t){return t.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],")"):t}(t):t.startsWith("perspective(")?c=t:t.startsWith("matrix(")?u=t:t.startsWith("opacity:")&&(d=t.replace("opacity:",""))})),r=n.setDefault(r),s=n.setDefault(s),i=n.setDefault(i);var h="";if("0px"!=s&&"0px"!=r&&"0px"!=i?h+="translate3d(".concat(r,", ").concat(s,", ").concat(i,")"):"0px"==s&&"0px"==r||(h+="translate(".concat(r,", ").concat(s,")")),a&&(h+=" ".concat(a)),l&&(h+=" ".concat(l)),o&&(h+=" ".concat(o)),c&&(h+=" ".concat(c)),u&&(h+=" ".concat(u)),h){if(t.op.transform.duration){var f=t.op.transform.duration.replace(/^(\d+)(s)-/,(function(t,e,r){return e/2+r+" "})),p="transform ".concat(f,", opacity ").concat(f);n.res.style.transition=p}else n.res.style.transition="transform 3s ease-in-out, opacity 3s ease-in-out";n.res.style.transform=h,n.res.style.opacity=d}}};e.on?n.res.addEventListener(e.on,(function(){e.delay?setTimeout((function(){r()}),e.delay):r()})):window.addEventListener("load",(function(){e.delay?setTimeout((function(){r()}),e.delay):r()}));var s=function(){var t="";e.values.forEach((function(e){e.startsWith("tx:")?t+="translateX(0) ":e.startsWith("ty:")?t+="translateY(0) ":e.startsWith("tz:")?t+="translateZ(0) ":e.startsWith("scale(")?t+="scale(1) ":e.startsWith("skew(")?t+="skew(0, 0) ":e.startsWith("rotate(")?t+="rotate(0) ":e.startsWith("perspective(")?t+="perspective(0) ":e.startsWith("matrix(")&&(t+="matrix(1, 0, 0, 1, 0, 0) "),n.res.style.opacity="1"})),t&&(n.res.style.transform=t.trim())};if(e.on)n.res.addEventListener("mouseout",(function(){e.keep||s()}));else{var i=1e3*parseFloat(e.duration),a=e.closeAfter?e.closeAfter:0;setTimeout((function(){e.keep||s()}),i/2+a)}}},(r=l(r="reactOnTransform"))in e?Object.defineProperty(e,r,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[r]=s,this.state={isExpanded:!1,isMovedUp:!1,isMovedDown:!1}},(e=[{key:"keySet",value:function(t){return this.temporaryVal=1,this.res.style[t.key]=t.value,this}},{key:"onScroll",value:function(t){var e=this;"opacity"===t.value?this.res.style.opacity=t.valMin:"scale"===t.value&&(this.res.style.transform="scale(".concat(t.valMax,")")),window.addEventListener("scroll",(function(){var r=e.smartRange(window.scrollY,{min:t.from,max:t.to},{min:t.valMin,max:t.valMax});"opacity"===t.value?e.res.style.opacity=r:"scale"===t.value&&(e.res.style.transform="scale(".concat(r,")"))}))}},{key:"setAny",value:function(t){this[Object.keys(t)[0]]=[Object.values(t)[0]]}},{key:"setID",value:function(t){this.id=t}},{key:"setPrevText",value:function(t){this.prevText=t}},{key:"getCSS",value:function(){return this.css}},{key:"getPX",value:function(t){return{xs:"0px",sm:"576px",md:"768px",lg:"992px",xl:"1200px",xxl:"1400px",mxxl:"1800px"}[t]||"Invalid breakpoint"}},{key:"respad",value:function(t){var e=this,r=function(){e.pad(t[0].values);for(var r=0;r<t.length;r++){var s=t[r].breakpoint;window.matchMedia("(min-width: ".concat(e.getPX(s))).matches&&e.pad(t[r].values)}};window.addEventListener("resize",r),r()}},{key:"resmar",value:function(t){var e=this,r=function(){e.mar(t[0].values);for(var r=0;r<t.length;r++){var s=t[r].breakpoint;window.matchMedia("(max-width: ".concat(e.getPX(s))).matches&&e.mar(t[r].values)}};window.addEventListener("resize",r),r()}},{key:"resprop",value:function(t){var e=this;this.prevBackground=this.res.style.background,this.prevWidth=this.res.style.width,this.prevHeight=this.res.style.height,this.prevBorder=this.res.style.border;var r=function(){e.res.style.background=e.prevBackground,e.res.style.width=e.prevWidth,e.res.style.height=e.prevHeight,e.res.style.border=e.prevBorder;for(var r=0;r<t.length;r++){var s=t[r].breakpoint;if(window.matchMedia("(max-width: ".concat(e.getPX(s))).matches){var n={};for(var i in t[r])"breakpoint"!==i&&(n[i]=t[r][i]);e.set(n)}}};window.addEventListener("resize",r),r()}},{key:"isNumber",value:function(t){return"number"==typeof t&&!isNaN(t)}},{key:"pad",value:function(t){for(var e=0;e<t.length;e++)for(var r=Object.keys(t[e]),s=0;s<r.length;s++)for(var n=r[s],i=t[e][n],a=0;a<n.length;a++)switch(n[a]){case"a":this.res.style.padding=this.isNumber(i)?"".concat(i,"px"):i;break;case"t":this.res.style.paddingTop=this.isNumber(i)?"".concat(i,"px"):i;break;case"l":this.res.style.paddingLeft=this.isNumber(i)?"".concat(i,"px"):i;break;case"r":this.res.style.paddingRight=this.isNumber(i)?"".concat(i,"px"):i;break;case"b":this.res.style.paddingBottom=this.isNumber(i)?"".concat(i,"px"):i}return this}},{key:"as",value:function(t){return this.res.style.alignSelf=t,this}},{key:"mar",value:function(t){for(var e=0;e<t.length;e++)for(var r=Object.keys(t[e]),s=0;s<r.length;s++)for(var n=r[s],i=t[e][n],a=0;a<n.length;a++){switch(n[a]){case"a":this.res.style.margin=this.isNumber(i)?"".concat(i,"px"):i;break;case"t":this.res.style.marginTop=this.isNumber(i)?"".concat(i,"px"):i;break;case"l":this.res.style.marginLeft=this.isNumber(i)?"".concat(i,"px"):i;break;case"r":this.res.style.marginRight=this.isNumber(i)?"".concat(i,"px"):i;break;case"b":this.res.style.marginBottom=this.isNumber(i)?"".concat(i,"px"):i}"auto"===n[a]&&(this.res.style.marginLeft="auto",this.res.style.marginRight="auto")}return this}},{key:"smartRange",value:function(t,e,r){t<e.min&&(t=e.min),t>e.max&&(t=e.max);var s=(t-e.min)/(e.max-e.min);e.min>e.max&&(s=(t-e.max)/(e.min-e.max));var n=(r.min-r.max)*s-r.min;if(n=Math.abs(n),r.min<r.max){var i=(r.max+Math.abs(r.min))*s;n=r.min+i}return n}},{key:"gpos",value:function(t){return this.res.style.gridColumn=t.col,this.res.style.gridRow=t.row,this}},{key:"fluidCopy",value:function(t){if(t instanceof Object){this.prevStylex=this.res.style,this.res=document.createElement("h1"),this.res.style.cssText=this.prevStylex.cssText;var e=document.createTextNode(this.text);return this.res.appendChild(e),this.res.style.fontSize=t.exact,this}if("S1"===t){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"===t){this.prevStylex=this.res.style,this.res=document.createElement("h2"),this.res.style.cssText=this.prevStylex.cssText;var s=document.createTextNode(this.text);this.res.appendChild(s),this.res.style.fontSize="calc(1.500rem + 4.3vw)"}if("S3"===t){this.prevStylex=this.res.style,this.res=document.createElement("h3"),this.res.style.cssText=this.prevStylex.cssText;var n=document.createTextNode(this.text);this.res.appendChild(n),this.res.style.fontSize="calc(1.375rem + 3.525vw)"}if("S4"===t){this.prevStylex=this.res.style,this.res=document.createElement("h4"),this.res.style.cssText=this.prevStylex.cssText;var i=document.createTextNode(this.text);this.res.appendChild(i),this.res.style.fontSize="calc(1.250rem + 2.75vw)"}if("S5"===t){this.prevStylex=this.res.style,this.res=document.createElement("h5"),this.res.style.cssText=this.prevStylex.cssText;var a=document.createTextNode(this.text);this.res.appendChild(a),this.res.style.fontSize="calc(1.125rem + 1.975vw)"}return"S6"===t&&(this.res.style.fontSize="calc(1rem + 0.5vw)"),this}},{key:"setIndex",value:function(t){this.index=t}},{key:"borderObj",value:function(t){var e,r=null!==(e=t.type)&&void 0!==e?e:"solid";return this.res.style.border="".concat(t.width," ").concat(r," ").concat(t.color),this.res.style.borderRadius=t.radius,this}},{key:"protoReact",value:function(t,e){var r=this;t.sort((function(t,e){return parseInt(t.range[0])-parseInt(e.range[0])}));var i=function(){var i=window.innerWidth,a="";r.storedQueries=t.map((function(t){return t.target})).filter((function(t){return null!=t}));var o,l=n(t);try{for(l.s();!(o=l.n()).done;){var c=o.value;r.counterIndex++;var u=s(c.range,2),d=u[0],h=u[1],f=parseInt(d),p=parseInt(h),y=!0;if(c.target){y=!1;for(var m=0;m<c.target.length;m++)c.target[m]===e&&(y=!0)}i>=f&&i<=p&&y&&("gradient"===c.log&&(a+="gradient"),"blast"===c.log&&(a+="blast"),"animation"===c.log&&(a+="animation"),"shadow"===c.log&&(a+="shadow"),"span"===c.log&&(a+="span"),"filter"===c.log&&(a+="filter"),"background"===c.log&&(a+="background"))}}catch(t){l.e(t)}finally{l.f()}r.res.style.margin="";var v,x=r.res.style.color;for(t.map((function(t){return t.log})).filter((function(t){return null!=t})).includes("gradient")&&(r.res.style.WebkitBackgroundClip="",r.res.style.background=""),r.res.style["-webkit-text-stroke"]="",r.res.style.filter="",r.res.style.textShadow="",r.res.style.border="";r.res.firstChild;)r.res.removeChild(r.res.firstChild);if(r.res.textContent=r.text,""===a&&(r.res.style["-webkit-text-fill-color"]="",r.res.style.color=x),"blast"===a){for(m=0;m<t.length;m++){var g=t[m].op.offsets;g&&void 0!==r.index&&(r.res.style.margin=g[Number(r.index)]+"px")}for(r.res.style["-webkit-text-fill-color"]="transparent",r.res.style["-webkit-text-stroke"]=r.globalBlast,m=0;m<t.length;m++){var b=t[m].op.offsets;b&&void 0!==r.index&&(r.res.style.margin=b[Number(r.index)]+"px")}}if("gradient"===a&&(r.res.style["-webkit-text-fill-color"]="transparent",r.res.style.background=r.globalGradient,r.res.style["-webkit-background-clip"]="text",r.res.style.border="1px solid orange"),"background"===a&&(r.res.style.background="orange"),"gradientblast"===a&&(r.res.style["-webkit-text-fill-color"]="transparent",r.res.style.background=r.globalGradient,r.res.style["-webkit-background-clip"]="text",r.res.style["-webkit-text-stroke"]=r.globalBlast),"gradientanimation"===a&&(r.res.style["-webkit-text-fill-color"]="transparent",r.res.style.background=r.globalGradient,r.res.style["-webkit-background-clip"]="text"),"gradientanimationshadow"===a&&(r.res.style["-webkit-text-fill-color"]="transparent",r.res.style.background=r.globalGradient,r.res.style["-webkit-background-clip"]="text",r.res.style.textShadow=r.globalShadow),"animationshadow"===a&&(r.res.style["-webkit-text-fill-color"]="",r.res.style.textShadow=r.globalShadow),"shadow"===a&&(r.res.style["-webkit-text-fill-color"]="",r.res.style.textShadow=r.globalShadow),"span"===a&&r.options.span)for(v=Array.isArray(r.options.span)?r.options.span.filter((function(t){return"span"===t.op.name}))[0]:r.options.span,r.res.textContent="",m=0;m<v.op.parts.length;m++){var k=v.op.parts[m].style,w=new Text(v.op.parts[m].text).setup({type:"span"}).set(k).render();r.res.appendChild(w)}if("filter"===a){var S=r.options.filtera.op.filter;r.res.style.filter=S,r.res.style.border="8px solid orange"}};window.addEventListener("resize",i),i()}},{key:"setPref",value:function(t){this.preffersId=t}},{key:"setClass",value:function(t){this.class=t}},{key:"betaReact",value:function(t,e){var r=this;this.ap=!1,this.cta=0,this.once=!1,t.sort((function(t,e){return parseInt(t.range[0])-parseInt(e.range[0])}));var i=function(){var i=window.innerWidth,a="";r.resCopy=r.res,r.storedQueries=t.map((function(t){return t.target})).filter((function(t){return null!=t}));var o,l=n(t);try{for(l.s();!(o=l.n()).done;){var c=o.value;r.counterIndex++;var u=s(c.range,2),d=u[0],h=u[1],f=parseInt(d),p=parseInt(h),y=!0;if(c.target){y=!1;for(var m=0;m<c.target.length;m++)c.target[m]===e&&(y=!0)}i>=f&&i<=p&&y&&("blast"===c.log&&(a+="blast"),"shadow"===c.log&&(a+="shadow"),"background"===c.log&&(a+="background"),"gradient"===c.log&&(a+="gradient"),"spana"===c.log&&(a+="spana"),"layout"===c.log&&(a+="layout"),"margin"===c.log&&(a+="margin"),c.op&&c.op.margin&&(r.useMargin=c.op.margin))}}catch(t){l.e(t)}finally{l.f()}if(r.res.style.background="",r.res.style.backgroundColor="",r.res.style.textShadow="",r.res.style.border="",r.res.style.margin="",r.res.style["-webkit-text-fill-color"]="",r.res.style["-webkit-text-stroke"]="",r.res.style["-webkit-text-stroke-width"]="","background"===a&&(r.res.style.backgroundColor="green"),"margin"===a)for(m=0;m<t.length;m++)if(t[m].op){var v=t[m].op.offsets;v&&void 0!==r.index&&(r.res.style.margin=v[Number(r.index)]+"px")}if("blastbackgroundmargin"===a){for(m=0;m<t.length;m++)if(t[m].op){var x=t[m].op.offsets;x&&void 0!==r.index&&(r.res.style.margin=x[Number(r.index)]+"px")}r.res.style.backgroundColor="green","FlexRowLayoutElement"===r.getType()?r.res.style.border="1px solid orange":(r.res.textContent=r.text,r.res.style["-webkit-text-fill-color"]="transparent",r.res.style["-webkit-text-stroke-color"]="orange",r.res.style["-webkit-text-stroke-width"]="1px"),r.res.style["-webkit-text-fill-color"]="transparent",r.res.style["-webkit-text-stroke-color"]="orange",r.res.style["-webkit-text-stroke-width"]="1px"}if("blastbackground"===a){for(m=0;m<t.length;m++)if(t[m].op){var g=t[m].op.offsets;g&&void 0!==r.index&&(r.res.style.margin=g[Number(r.index)]+"px")}r.res.style.backgroundColor="green",r.useMargin?r.res.style.margin="1rem":r.res.setAttribute("id","iofhwoiefhoih"),"FlexRowLayoutElement"===r.getType()?r.res.style.border="1px solid orange":(r.res.textContent=r.text,r.res.style["-webkit-text-fill-color"]="transparent",r.res.style["-webkit-text-stroke-color"]="orange",r.res.style["-webkit-text-stroke-width"]="1px"),r.res.style["-webkit-text-fill-color"]="transparent",r.res.style["-webkit-text-stroke-color"]="orange",r.res.style["-webkit-text-stroke-width"]="1px"}if("layout"===a&&(r.res.style.alignSelf="start",r.res.style.border="1px solid purple"),"blast"===a){for(m=0;m<t.length;m++)if(t[m].op){var b=t[m].op.offsets;b&&void 0!==r.index&&(r.res.style.margin=b[Number(r.index)]+"px")}"FlexRowLayoutElement"===r.getType()?r.res.style.border="1px solid orange":(r.res.textContent=r.text,r.res.style["-webkit-text-fill-color"]="transparent",r.res.style["-webkit-background-clip"]="text",r.res.style["-webkit-text-stroke-color"]="orange",r.res.style["-webkit-text-stroke-width"]="1px"),r.res.style["-webkit-text-fill-color"]="transparent",r.res.style["-webkit-text-stroke"]="orange",r.res.style["-webkit-text-stroke-width"]="1px"}"blastgradientbackground"===a&&(r.res.style.border="1px solid yellow",r.res.style["-webkit-text-stroke-color"]="orange",r.res.style["-webkit-text-stroke-width"]="1px"),"gradient"===a&&(r.res.style.background="linear-gradient(to left, #3498db, #1abc9c)","FlexRowLayoutElement"===r.getType()||(r.res.children[0]&&r.res.removeChild(r.res.children[0]),r.res.style["-webkit-text-fill-color"]="transparent",r.res.style["-webkit-background-clip"]="text",r.res.textContent=r.text)),"shadow"===a&&("FlexRowLayoutElement"===r.getType()||(r.res.children[0]&&r.res.removeChild(r.res.children[0]),r.res.style["-webkit-text-fill-color"]="",r.res.style["-webkit-text-fill-color"]="",r.res.style.textShadow="#1abc9cff -6px 6px , #1abc9c40 -12px 12px",r.res.textContent=r.text))};window.addEventListener("resize",i),i()}},{key:"cssGen",value:function(t,e,r,s){return this.css=[""],[""]}},{key:"chainReact",value:function(t,e,r){var i=this;this.cssGen(t,e,this.class,void 0!==this.class),this.ap=!1,this.cta=0,this.once=!1;var a,o=n(t);try{for(o.s();!(a=o.n()).done;){var l=a.value;l.range||(l.range=["0px","999999px"])}}catch(t){o.e(t)}finally{o.f()}t.sort((function(t,e){return parseInt(t.range[0])-parseInt(e.range[0])}));var c=function(){var a=window.visualViewport.width,o=[],l=[];i.resCopy=i.res,i.storedQueries=t.map((function(t){return t.target})).filter((function(t){return null!=t}));var c,u=n(t);try{for(u.s();!(c=u.n()).done;){var d=c.value;i.counterIndex++;var h=s(d.range,2),f=h[0],p=h[1],y=parseInt(f),m=parseInt(p),v=!0;if(d.target){v=!1;for(var x=0;x<d.target.length;x++)d.target[x]===e&&(v=!0)}a>=y&&a<=m&&v&&(o.push(d.log),l.push(d),d.op&&d.op.margin&&(i.useMargin=d.op.margin))}}catch(t){u.e(t)}finally{u.f()}if(r&&!r.includes("background")&&(i.res.style.background="",i.res.style.backgroundColor=""),i.res.style.textShadow="",r&&!r.includes("border")&&(i.res.style.border=""),r&&!r.includes("margin")&&(i.res.style.margin=""),i.res.style["-webkit-text-fill-color"]="",i.res.style["-webkit-text-stroke-color"]="",i.res.style["-webkit-text-stroke-width"]="",i.res.style.filter="",(o.includes("gradient")||o.includes("shadow"))&&(i.res.style.position="relative",i.res.style.zIndex=-1),o.includes("blast")){var g,b=l.filter((function(t){return"blast"===t.log}))[0].op.color,k=null!==(g=l.filter((function(t){return"blast"===t.log}))[0].op.width)&&void 0!==g?g:"1px";"FlexRowLayoutElement"===i.getType()?i.res.style.border="".concat(k,"px solid orange"):(i.res.textContent=i.text,i.res.style["-webkit-text-fill-color"]="transparent",i.res.style["-webkit-text-stroke-color"]=b,i.res.style["-webkit-text-stroke-width"]="".concat(k))}if(o.includes("filter")){var w=l.filter((function(t){return"filter"===t.log}))[0].op.filter;i.res.style.filter=w}if(o.includes("background")&&(i.res.style.backgroundColor="green"),o.includes("gradient")&&(i.res.style["-webkit-text-fill-color"]="transparent",i.res.style.background=i.globalGradient,i.res.style["background-clip"]="text"),o.includes("shadow"))if("FlexRowLayoutElement"===i.getType());else{var S="",E=0;for(x=0;x<i.options.shadow.op.steps;x++)S+="drop-shadow(".concat(E+=3,"px ").concat(E,"px ").concat(E,"px gray) ");i.res.style.filter=S}if(o.includes("margin"))for(x=0;x<t.length;x++)if(t[x].op){var C=t[x].op.offsets;C&&void 0!==i.index&&(i.res.style.margin=C[Number(i.index)]+"px")}if(o.includes("animation")){if(i.options.animation&&!i.hasAnimated&&!i.options.animation.op.fireAt){i.hasAnimated=!0;var T=i.options.animation.op;i.res.animate(T.keyframesClose,{duration:0,fill:"forwards"}),i.res.animate(T.keyframesOpen,T.openOptions)}if(i.options.animation&&i.options.animation.op.fireAt&&i.options.animation.op.fireAt.endsWith("px")){var W=i.options.animation.op;i.res.animate(W.keyframesClose,{duration:0,fill:"forwards"});var L=function(){window.scrollY>parseFloat(W.fireAt)&&(i.res.animate(W.keyframesOpen,W.openOptions),window.removeEventListener("scroll",L))};window.addEventListener("scroll",L)}if(i.options.animation&&i.options.animation.op.fireAt&&"inview"===i.options.animation.op.fireAt){var I=i.options.animation.op;i.res.animate(I.keyframesClose,{duration:0,fill:"forwards"}),new IntersectionObserver((function(t,e){t.forEach((function(t){t.isIntersecting&&(i.res.animate(I.keyframesOpen,I.openOptions),e.disconnect())}))})).observe(i.res)}}};window.addEventListener("resize",c),c()}},{key:"maxWidth",value:function(t){return this.res.style.maxWidth=t,this}},{key:"removeQuotesFromFirstWord",value:function(t){return t.replace(/"([^"]+)":/g,"$1:")}},{key:"arrayMargin",value:function(t,e){return t.includes("left")&&(this.res.style.marginLeft=e),t.includes("right")&&(this.res.style.marginRight=e),t.includes("top")&&(this.res.style.marginTop=e),t.includes("bottom")&&(this.res.style.marginBottom=e),t.includes("all")&&(this.res.style.margin=e),e||(this.res.style.marginBottom=t),this}},{key:"navBarExpand",value:function(){return this.res.style.backgroundColor="green",this.res.animate([{transform:"scaleY(3.0)"}],{duration:2e3,iterations:1,fill:"both"}),this}},{key:"scrollFade",value:function(t,e){return this.res.style.visibility="hidden",this.faden(t,e,"scroll"),this}},{key:"expand",value:function(t){var e=this;return!1===this.state.isExpanded?"click"===t.on?this.res.addEventListener("click",(function(){e.innerExpand(t)})):this.innerExpand(t):this.innerExpandBack(t),this.state.isExpanded=!this.state.isExpanded,this}},{key:"move",value:function(t){var e=this;return"click"===t.on?this.res.addEventListener("click",(function(){e.moveUpa(t)})):("up"===t.direction&&this.moveUpa(t),"down"===t.direction&&this.moveDowna(t),this.state.isMovedUp=!this.state.isMovedUp,"left"===t.direction&&this.moveLeft(t)),this}},{key:"moveLeft",value:function(t){return this.res.animate([{transform:"translateX(0px)"},{transform:"translateX(-".concat(t.distance,")")}],{duration:900,iterations:t.iterations,fill:"both"}).play(),this}},{key:"moveUpa",value:function(t){return!1===this.state.isMovedUp?this.res.animate([{transform:"translateX(0px)"},{transform:"translateY(-".concat(t.distance,")")}],{duration:900,iterations:t.iterations,fill:"both"}).play():this.res.animate([{transform:"translateX(0px)"},{transform:"translateY(".concat(t.distance,")")}],{duration:900,iterations:t.iterations,fill:"both"}).play(),this}},{key:"moveDowna",value:function(t){return!1===this.state.isMovedDown?this.res.animate([{transform:"translateX(0px)"},{transform:"translateY(".concat(t.distance,")")}],{duration:900,iterations:t.iterations,fill:"both"}).play():this.res.animate([{transform:"translateX(0px)"},{transform:"translateY(-".concat(t.distance,")")}],{duration:900,iterations:t.iterations,fill:"both"}).play(),this}},{key:"moveUpaBack",value:function(t){return this.res.animate([{transform:"translateX(0px)"}],{duration:900,iterations:t.iterations,fill:"both"}).play(),this}},{key:"innerExpandBack",value:function(t){this.res.animate([{width:this.prevWidth,height:this.prevHeight}],{duration:900,iterations:t.iterations,fill:"both"})}},{key:"innerExpand",value:function(t){var e,r;return this.prevWidth=this.res.style.width,this.prevHeight=this.res.style.height,this.res.animate([{width:this.prevWidth,height:this.prevHeight},{width:null!==(e=t.width)&&void 0!==e?e:this.prevWidth,height:null!==(r=t.height)&&void 0!==r?r:this.prevHeight}],{duration:900,iterations:t.iterations,fill:"both"}),this}},{key:"fade",value:function(t){return this.res.style.visibility="hidden",this.faden(t.duration,t.from,"load"),t.finalOpacity&&(this.finalOpacity=t.finalOpacity),this}},{key:"faden",value:function(t,e,r){var s=this;return this.res.style.visibility="hidden",this.scrolled=!1,window.addEventListener(r,(function(){s.res.style.visibility="visible";var n=window.innerHeight;(s.res.getBoundingClientRect().top-n<=0||"load"==r)&&0==s.scrolled&&("left"==e&&s.res.animate([{transform:"translateX(-30px)"},{transform:"translateX(0px)"}],{duration:t,iterations:1}),"right"==e&&s.res.animate([{transform:"translateX(30px)"},{transform:"translateX(0px)"}],{duration:t,iterations:1}),"top"==e&&s.res.animate([{transform:"translateY(-30px)"},{transform:"translateY(0px)"}],{duration:t,iterations:1}),"bottom"==e&&s.res.animate([{transform:"translateY(30px)"},{transform:"translateY(0px)"}],{duration:t,iterations:1}),s.res.animate([{opacity:"0.0"},{opacity:"1.0"}],{duration:t,iterations:1}),s.scrolled=!0)})),this}}])&&o(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}(),u=e.y;export{u as Animator};
|
|
2
|
+
var t={d:(e,r)=>{for(var s in r)t.o(r,s)&&!t.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:r[s]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)},e={};function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function s(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var s,n,i,a,o=[],l=!0,c=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(s=i.call(r)).done)&&(o.push(s.value),o.length!==e);l=!0);}catch(t){c=!0,n=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw n}}return o}}(t,e)||i(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=i(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var s=0,n=function(){};return{s:n,n:function(){return s>=t.length?{done:!0}:{done:!1,value:t[s++]}},e:function(t){throw t},f:n}}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 a,o=!0,l=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){l=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(l)throw a}}}}function i(t,e){if(t){if("string"==typeof t)return a(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(t,e):void 0}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,s=Array(e);r<e;r++)s[r]=t[r];return s}function o(t,e){for(var r=0;r<e.length;r++){var s=e[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,l(s.key),s)}}function l(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var s=e.call(t,"string");if("object"!=r(s))return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}t.d(e,{y:()=>c});var c=function(){return t=function t(){var e,r,s,n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e=this,s=function(t){if(t.transform||t.op&&t.op.transform){var e=t.transform;t.transform||(e=t.op.transform),e.duration||(e.duration="3s-ease-in-out"),n.setDefault=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"0px";return 0===t.length?e+" ":t};var r=function(){var r="",s="",i="",a="",o="",l="",c="",u="",f="";if(0!==e.values.length){e.values.forEach((function(t){t.startsWith("tx:")&&(r=t.replace("tx:","")),t.startsWith("ty:")&&(s=t.replace("ty:","")),t.startsWith("tz:")?i=t.replace("tz:",""):t.startsWith("scale(")?a=t:t.startsWith("skew(")?o=t:t.startsWith("rotate(")?l=function(t){var e=t.match(/rotate\(([^)]+)\)/);if(!e)return t;var r=e[1].split(",").map((function(t){return t.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],")"):t}(t):t.startsWith("perspective(")?c=t:t.startsWith("matrix(")?u=t:t.startsWith("opacity:")&&(f=t.replace("opacity:",""))})),r=n.setDefault(r),s=n.setDefault(s),i=n.setDefault(i);var h="";if("0px"!=s&&"0px"!=r&&"0px"!=i?h+="translate3d(".concat(r,", ").concat(s,", ").concat(i,")"):"0px"==s&&"0px"==r||(h+="translate(".concat(r,", ").concat(s,")")),a&&(h+=" ".concat(a)),l&&(h+=" ".concat(l)),o&&(h+=" ".concat(o)),c&&(h+=" ".concat(c)),u&&(h+=" ".concat(u)),h){if(t.op.transform.duration){var p=t.op.transform.duration.replace(/^(\d+)(s)-/,(function(t,e,r){return e/2+r+" "})),d="transform ".concat(p,", opacity ").concat(p);n.res.style.transition=d}else n.res.style.transition="transform 3s ease-in-out, opacity 3s ease-in-out";t.op.transform.static&&(n.res.style.transition=""),n.res.style.transform=h,n.res.style.opacity=f}}};e.on?n.res.addEventListener(e.on,(function(){e.delay?setTimeout((function(){r()}),e.delay):r()})):window.addEventListener("load",(function(){e.delay?setTimeout((function(){r()}),e.delay):r()}));var s=function(){var t="";e.values.forEach((function(e){e.startsWith("tx:")?t+="translateX(0) ":e.startsWith("ty:")?t+="translateY(0) ":e.startsWith("tz:")?t+="translateZ(0) ":e.startsWith("scale(")?t+="scale(1) ":e.startsWith("skew(")?t+="skew(0, 0) ":e.startsWith("rotate(")?t+="rotate(0) ":e.startsWith("perspective(")?t+="perspective(0) ":e.startsWith("matrix(")&&(t+="matrix(1, 0, 0, 1, 0, 0) "),n.res.style.opacity="1"})),t&&(n.res.style.transform=t.trim())};if(e.on)n.res.addEventListener("mouseout",(function(){e.keep||s()}));else{var i=1e3*parseFloat(e.duration),a=e.closeAfter?e.closeAfter:0;setTimeout((function(){e.keep||s()}),i/2+a)}e.hardCSS&&(n.res.style.transform=e.hardCSS)}},(r=l(r="reactOnTransform"))in e?Object.defineProperty(e,r,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[r]=s,this.state={isExpanded:!1,isMovedUp:!1,isMovedDown:!1}},e=[{key:"keySet",value:function(t){return this.temporaryVal=1,this.res.style[t.key]=t.value,this}},{key:"onScroll",value:function(t){var e=this;"opacity"===t.value?this.res.style.opacity=t.valMin:"scale"===t.value&&(this.res.style.transform="scale(".concat(t.valMax,")")),window.addEventListener("scroll",(function(){var r=e.smartRange(window.scrollY,{min:t.from,max:t.to},{min:t.valMin,max:t.valMax});"opacity"===t.value?e.res.style.opacity=r:"scale"===t.value&&(e.res.style.transform="scale(".concat(r,")"))}))}},{key:"setAny",value:function(t){this[Object.keys(t)[0]]=[Object.values(t)[0]]}},{key:"setID",value:function(t){this.id=t}},{key:"setPrevText",value:function(t){this.prevText=t}},{key:"getCSS",value:function(){return this.css}},{key:"getPX",value:function(t){return{xs:"0px",sm:"576px",md:"768px",lg:"992px",xl:"1200px",xxl:"1400px",mxxl:"1800px"}[t]||"Invalid breakpoint"}},{key:"respad",value:function(t){var e=this,r=function(){e.pad(t[0].values);for(var r=0;r<t.length;r++){var s=t[r].breakpoint;window.matchMedia("(min-width: ".concat(e.getPX(s))).matches&&e.pad(t[r].values)}};window.addEventListener("resize",r),r()}},{key:"resmar",value:function(t){var e=this,r=function(){e.mar(t[0].values);for(var r=0;r<t.length;r++){var s=t[r].breakpoint;window.matchMedia("(max-width: ".concat(e.getPX(s))).matches&&e.mar(t[r].values)}};window.addEventListener("resize",r),r()}},{key:"resprop",value:function(t){var e=this;this.prevBackground=this.res.style.background,this.prevWidth=this.res.style.width,this.prevHeight=this.res.style.height,this.prevBorder=this.res.style.border;var r=function(){e.res.style.background=e.prevBackground,e.res.style.width=e.prevWidth,e.res.style.height=e.prevHeight,e.res.style.border=e.prevBorder;for(var r=0;r<t.length;r++){var s=t[r].breakpoint;if(window.matchMedia("(max-width: ".concat(e.getPX(s))).matches){var n={};for(var i in t[r])"breakpoint"!==i&&(n[i]=t[r][i]);e.set(n)}}};window.addEventListener("resize",r),r()}},{key:"isNumber",value:function(t){return"number"==typeof t&&!isNaN(t)}},{key:"pad",value:function(t){for(var e=0;e<t.length;e++)for(var r=Object.keys(t[e]),s=0;s<r.length;s++)for(var n=r[s],i=t[e][n],a=0;a<n.length;a++)switch(n[a]){case"a":this.res.style.padding=this.isNumber(i)?"".concat(i,"px"):i;break;case"t":this.res.style.paddingTop=this.isNumber(i)?"".concat(i,"px"):i;break;case"l":this.res.style.paddingLeft=this.isNumber(i)?"".concat(i,"px"):i;break;case"r":this.res.style.paddingRight=this.isNumber(i)?"".concat(i,"px"):i;break;case"b":this.res.style.paddingBottom=this.isNumber(i)?"".concat(i,"px"):i}return this}},{key:"as",value:function(t){return this.res.style.alignSelf=t,this}},{key:"mar",value:function(t){for(var e=0;e<t.length;e++)for(var r=Object.keys(t[e]),s=0;s<r.length;s++)for(var n=r[s],i=t[e][n],a=0;a<n.length;a++){switch(n[a]){case"a":this.res.style.margin=this.isNumber(i)?"".concat(i,"px"):i;break;case"t":this.res.style.marginTop=this.isNumber(i)?"".concat(i,"px"):i;break;case"l":this.res.style.marginLeft=this.isNumber(i)?"".concat(i,"px"):i;break;case"r":this.res.style.marginRight=this.isNumber(i)?"".concat(i,"px"):i;break;case"b":this.res.style.marginBottom=this.isNumber(i)?"".concat(i,"px"):i}"auto"===n[a]&&(this.res.style.marginLeft="auto",this.res.style.marginRight="auto")}return this}},{key:"smartRange",value:function(t,e,r){t<e.min&&(t=e.min),t>e.max&&(t=e.max);var s=(t-e.min)/(e.max-e.min);e.min>e.max&&(s=(t-e.max)/(e.min-e.max));var n=(r.min-r.max)*s-r.min;if(n=Math.abs(n),r.min<r.max){var i=(r.max+Math.abs(r.min))*s;n=r.min+i}return n}},{key:"gpos",value:function(t){return this.res.style.gridColumn=t.col,this.res.style.gridRow=t.row,this}},{key:"fluidCopy",value:function(t){if(t instanceof Object){this.prevStylex=this.res.style,this.res=document.createElement("h1"),this.res.style.cssText=this.prevStylex.cssText;var e=document.createTextNode(this.text);return this.res.appendChild(e),this.res.style.fontSize=t.exact,this}if("S1"===t){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"===t){this.prevStylex=this.res.style,this.res=document.createElement("h2"),this.res.style.cssText=this.prevStylex.cssText;var s=document.createTextNode(this.text);this.res.appendChild(s),this.res.style.fontSize="calc(1.500rem + 4.3vw)"}if("S3"===t){this.prevStylex=this.res.style,this.res=document.createElement("h3"),this.res.style.cssText=this.prevStylex.cssText;var n=document.createTextNode(this.text);this.res.appendChild(n),this.res.style.fontSize="calc(1.375rem + 3.525vw)"}if("S4"===t){this.prevStylex=this.res.style,this.res=document.createElement("h4"),this.res.style.cssText=this.prevStylex.cssText;var i=document.createTextNode(this.text);this.res.appendChild(i),this.res.style.fontSize="calc(1.250rem + 2.75vw)"}if("S5"===t){this.prevStylex=this.res.style,this.res=document.createElement("h5"),this.res.style.cssText=this.prevStylex.cssText;var a=document.createTextNode(this.text);this.res.appendChild(a),this.res.style.fontSize="calc(1.125rem + 1.975vw)"}return"S6"===t&&(this.res.style.fontSize="calc(1rem + 0.5vw)"),this}},{key:"setIndex",value:function(t){this.index=t}},{key:"borderObj",value:function(t){var e,r=null!==(e=t.type)&&void 0!==e?e:"solid";return this.res.style.border="".concat(t.width," ").concat(r," ").concat(t.color),this.res.style.borderRadius=t.radius,this}},{key:"setPref",value:function(t){this.preffersId=t}},{key:"setClass",value:function(t){this.class=t}},{key:"chainReact",value:function(t,e,r){var i=this;console.log("0P"),this.ap=!1,this.cta=0,this.once=!1;var a,o=n(t);try{for(o.s();!(a=o.n()).done;){var l=a.value;l.range||(l.range=["0px","999999px"])}}catch(t){o.e(t)}finally{o.f()}t.sort((function(t,e){return parseInt(t.range[0])-parseInt(e.range[0])}));var c=function(a){var o=window.visualViewport.width,l=[],c=[];i.resCopy=i.res,i.storedQueries=t.map((function(t){return t.target})).filter((function(t){return null!=t}));var u,f=n(t);try{for(f.s();!(u=f.n()).done;){var h=u.value;i.counterIndex++;var p=s(h.range,2),d=p[0],y=p[1],m=parseInt(d),v=parseInt(y),x=!0;if(h.target){x=!1;for(var g=0;g<h.target.length;g++)h.target[g]===e&&(x=!0)}o>=m&&o<=v&&x&&(l.push(h.log),c.push(h),h.op&&h.op.margin&&(i.useMargin=h.op.margin))}}catch(t){f.e(t)}finally{f.f()}if(r&&!r.includes("background")&&(i.res.style.background="",i.res.style.backgroundColor=""),i.res.style.textShadow="",r&&!r.includes("border")&&(i.res.style.border=""),r&&!r.includes("margin")&&(i.res.style.margin=""),i.res.style["-webkit-text-fill-color"]="",i.res.style["-webkit-text-stroke-color"]="",i.res.style["-webkit-text-stroke-width"]="",i.res.style.filter="",(l.includes("gradient")||l.includes("shadow"))&&(i.res.style.position="relative",i.res.style.zIndex=-1),l.includes("blast")){var b,w=c.filter((function(t){return"blast"===t.log}))[0].op.color,k=null!==(b=c.filter((function(t){return"blast"===t.log}))[0].op.width)&&void 0!==b?b:"1px";"FlexRowLayoutElement"===i.getType()?i.res.style.border="".concat(k,"px solid orange"):(i.res.textContent=i.text,i.res.style["-webkit-text-fill-color"]="transparent",i.res.style["-webkit-text-stroke-color"]=w,i.res.style["-webkit-text-stroke-width"]="".concat(k))}if(l.includes("filter")){var S=c.filter((function(t){return"filter"===t.log}))[0].op.filter;i.res.style.filter=S}if(l.includes("background")&&(i.res.style.backgroundColor="green"),l.includes("gradient")&&(i.res.style["-webkit-text-fill-color"]="transparent",i.res.style.background=i.globalGradient,i.res.style["background-clip"]="text"),l.includes("shadow"))if("FlexRowLayoutElement"===i.getType());else{var T="",C=0;for(g=0;g<i.options.shadow.op.steps;g++)T+="drop-shadow(".concat(C+=3,"px ").concat(C,"px ").concat(C,"px gray) ");i.res.style.filter=T}if(l.includes("margin"))for(g=0;g<t.length;g++)if(t[g].op){var E=t[g].op.offsets;E&&void 0!==i.index&&(i.res.style.margin=E[Number(i.index)]+"px")}if(l.includes("spana")||l.includes("span")){if(i.res=i.resCopy,i.options.span){var O;for(O=Array.isArray(i.options.span)?i.options.span.filter((function(t){return"span"===t.op.name}))[0]:i.options.span,i.res.textContent="",g=0;g<O.op.parts.length;g++){var W=O.op.parts[g].style,A=new i.constructor(O.op.parts[g].text).setup({type:"span"}).set(W).render();i.res.appendChild(A)}}}else{if(!a)for(;i.res.firstChild;)i.res.removeChild(i.res.firstChild);var N=new i.constructor(i.prevText).set({}).render();i.res.appendChild(N)}if(l.includes("animation")){if(i.options.animation&&!i.hasAnimated&&!i.options.animation.op.fireAt){i.hasAnimated=!0;var j=i.options.animation.op;i.res.animate(j.keyframesClose,{duration:0,fill:"forwards"}),i.res.animate(j.keyframesOpen,j.openOptions)}if(i.options.animation&&i.options.animation.op.fireAt&&i.options.animation.op.fireAt.endsWith("px")){var I=i.options.animation.op;i.res.animate(I.keyframesClose,{duration:0,fill:"forwards"});var L=function(){window.scrollY>parseFloat(I.fireAt)&&(i.res.animate(I.keyframesOpen,I.openOptions),window.removeEventListener("scroll",L))};window.addEventListener("scroll",L)}if(i.options.animation&&i.options.animation.op.fireAt&&"inview"===i.options.animation.op.fireAt){var z=i.options.animation.op;i.res.animate(z.keyframesClose,{duration:0,fill:"forwards"}),new IntersectionObserver((function(t,e){t.forEach((function(t){t.isIntersecting&&(i.res.animate(z.keyframesOpen,z.openOptions),e.disconnect())}))})).observe(i.res)}}};this.options.animation||window.addEventListener("resize",(function(){return c()})),c()}},{key:"maxWidth",value:function(t){return this.res.style.maxWidth=t,this}},{key:"removeQuotesFromFirstWord",value:function(t){return t.replace(/"([^"]+)":/g,"$1:")}},{key:"arrayMargin",value:function(t,e){return t.includes("left")&&(this.res.style.marginLeft=e),t.includes("right")&&(this.res.style.marginRight=e),t.includes("top")&&(this.res.style.marginTop=e),t.includes("bottom")&&(this.res.style.marginBottom=e),t.includes("all")&&(this.res.style.margin=e),e||(this.res.style.marginBottom=t),this}}],e&&o(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}(),u=e.y;export{u as Animator};
|
package/dist/audionew.cjs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see audionew.cjs.js.LICENSE.txt */
|
|
2
|
-
(()=>{"use strict";var t={d:(e,r)=>{for(var n in r)t.o(r,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,s,i,o,a=[],l=!0,c=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(a.push(n.value),a.length!==e);l=!0);}catch(t){c=!0,s=t}finally{try{if(!l&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw s}}return a}}(t,e)||i(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=i(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,s=function(){};return{s,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,l=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){l=!0,o=t},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw o}}}}function i(t,e){if(t){if("string"==typeof t)return o(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(t,e):void 0}}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,l(n.key),n)}}function l(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}function u(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,d(n.key),n)}}function d(t){var e=function(t){if("object"!=c(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==c(e)?e:e+""}function f(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(f=function(){return!!t})()}function p(t){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},p(t)}function h(t,e){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},h(t,e)}t.r(e),t.d(e,{Audio:()=>y});var y=function(t){function e(t){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,r){return e=p(e),function(t,e){if(e&&("object"==c(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,f()?Reflect.construct(e,r||[],p(t).constructor):e.apply(t,r))}(this,e)).url=t,r.res=null,r.setup(),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&h(t,e)}(e,t),r=e,(n=[{key:"setup",value:function(){this.res=document.createElement("audio"),this.res.setAttribute("src",this.url),this.res.setAttribute("controls","controls")}},{key:"set",value:function(t){return this.options=t,t.background&&this.background(t.background),this}},{key:"background",value:function(t){var e=document.createElement("style");return e.type="text/css",e.textContent="\n\taudio::-webkit-media-controls-panel {\n\t\tbackground-color: ".concat(t,";\n\t}\n"),document.head.appendChild(e),this}},{key:"toCode",value:function(){return JSON.stringify(this.options,null,4),['new Audio("'.concat(this.url,'")')]}},{key:"size",value:function(t){return this.res.style.width=t,this}},{key:"render",value:function(t){if(!t)return this.res;document.querySelector(t).appendChild(this.res)}}])&&u(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(function(){return t=function t(){var e,r,n,s=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e=this,n=function(t){if(t.transform||t.op&&t.op.transform){var e=t.transform;t.transform||(e=t.op.transform),e.duration||(e.duration="3s-ease-in-out"),s.setDefault=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"0px";return 0===t.length?e+" ":t};var r=function(){var r="",n="",i="",o="",a="",l="",c="",u="",d="";if(0!==e.values.length){e.values.forEach((function(t){t.startsWith("tx:")&&(r=t.replace("tx:","")),t.startsWith("ty:")&&(n=t.replace("ty:","")),t.startsWith("tz:")?i=t.replace("tz:",""):t.startsWith("scale(")?o=t:t.startsWith("skew(")?a=t:t.startsWith("rotate(")?l=function(t){var e=t.match(/rotate\(([^)]+)\)/);if(!e)return t;var r=e[1].split(",").map((function(t){return t.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],")"):t}(t):t.startsWith("perspective(")?c=t:t.startsWith("matrix(")?u=t:t.startsWith("opacity:")&&(d=t.replace("opacity:",""))})),r=s.setDefault(r),n=s.setDefault(n),i=s.setDefault(i);var f="";if("0px"!=n&&"0px"!=r&&"0px"!=i?f+="translate3d(".concat(r,", ").concat(n,", ").concat(i,")"):"0px"==n&&"0px"==r||(f+="translate(".concat(r,", ").concat(n,")")),o&&(f+=" ".concat(o)),l&&(f+=" ".concat(l)),a&&(f+=" ".concat(a)),c&&(f+=" ".concat(c)),u&&(f+=" ".concat(u)),f){if(t.op.transform.duration){var p=t.op.transform.duration.replace(/^(\d+)(s)-/,(function(t,e,r){return e/2+r+" "})),h="transform ".concat(p,", opacity ").concat(p);s.res.style.transition=h}else s.res.style.transition="transform 3s ease-in-out, opacity 3s ease-in-out";s.res.style.transform=f,s.res.style.opacity=d}}};e.on?s.res.addEventListener(e.on,(function(){e.delay?setTimeout((function(){r()}),e.delay):r()})):window.addEventListener("load",(function(){e.delay?setTimeout((function(){r()}),e.delay):r()}));var n=function(){var t="";e.values.forEach((function(e){e.startsWith("tx:")?t+="translateX(0) ":e.startsWith("ty:")?t+="translateY(0) ":e.startsWith("tz:")?t+="translateZ(0) ":e.startsWith("scale(")?t+="scale(1) ":e.startsWith("skew(")?t+="skew(0, 0) ":e.startsWith("rotate(")?t+="rotate(0) ":e.startsWith("perspective(")?t+="perspective(0) ":e.startsWith("matrix(")&&(t+="matrix(1, 0, 0, 1, 0, 0) "),s.res.style.opacity="1"})),t&&(s.res.style.transform=t.trim())};if(e.on)s.res.addEventListener("mouseout",(function(){e.keep||n()}));else{var i=1e3*parseFloat(e.duration),o=e.closeAfter?e.closeAfter:0;setTimeout((function(){e.keep||n()}),i/2+o)}}},(r=l(r="reactOnTransform"))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,this.state={isExpanded:!1,isMovedUp:!1,isMovedDown:!1}},(e=[{key:"keySet",value:function(t){return this.temporaryVal=1,this.res.style[t.key]=t.value,this}},{key:"onScroll",value:function(t){var e=this;"opacity"===t.value?this.res.style.opacity=t.valMin:"scale"===t.value&&(this.res.style.transform="scale(".concat(t.valMax,")")),window.addEventListener("scroll",(function(){var r=e.smartRange(window.scrollY,{min:t.from,max:t.to},{min:t.valMin,max:t.valMax});"opacity"===t.value?e.res.style.opacity=r:"scale"===t.value&&(e.res.style.transform="scale(".concat(r,")"))}))}},{key:"setAny",value:function(t){this[Object.keys(t)[0]]=[Object.values(t)[0]]}},{key:"setID",value:function(t){this.id=t}},{key:"setPrevText",value:function(t){this.prevText=t}},{key:"getCSS",value:function(){return this.css}},{key:"getPX",value:function(t){return{xs:"0px",sm:"576px",md:"768px",lg:"992px",xl:"1200px",xxl:"1400px",mxxl:"1800px"}[t]||"Invalid breakpoint"}},{key:"respad",value:function(t){var e=this,r=function(){e.pad(t[0].values);for(var r=0;r<t.length;r++){var n=t[r].breakpoint;window.matchMedia("(min-width: ".concat(e.getPX(n))).matches&&e.pad(t[r].values)}};window.addEventListener("resize",r),r()}},{key:"resmar",value:function(t){var e=this,r=function(){e.mar(t[0].values);for(var r=0;r<t.length;r++){var n=t[r].breakpoint;window.matchMedia("(max-width: ".concat(e.getPX(n))).matches&&e.mar(t[r].values)}};window.addEventListener("resize",r),r()}},{key:"resprop",value:function(t){var e=this;this.prevBackground=this.res.style.background,this.prevWidth=this.res.style.width,this.prevHeight=this.res.style.height,this.prevBorder=this.res.style.border;var r=function(){e.res.style.background=e.prevBackground,e.res.style.width=e.prevWidth,e.res.style.height=e.prevHeight,e.res.style.border=e.prevBorder;for(var r=0;r<t.length;r++){var n=t[r].breakpoint;if(window.matchMedia("(max-width: ".concat(e.getPX(n))).matches){var s={};for(var i in t[r])"breakpoint"!==i&&(s[i]=t[r][i]);e.set(s)}}};window.addEventListener("resize",r),r()}},{key:"isNumber",value:function(t){return"number"==typeof t&&!isNaN(t)}},{key:"pad",value:function(t){for(var e=0;e<t.length;e++)for(var r=Object.keys(t[e]),n=0;n<r.length;n++)for(var s=r[n],i=t[e][s],o=0;o<s.length;o++)switch(s[o]){case"a":this.res.style.padding=this.isNumber(i)?"".concat(i,"px"):i;break;case"t":this.res.style.paddingTop=this.isNumber(i)?"".concat(i,"px"):i;break;case"l":this.res.style.paddingLeft=this.isNumber(i)?"".concat(i,"px"):i;break;case"r":this.res.style.paddingRight=this.isNumber(i)?"".concat(i,"px"):i;break;case"b":this.res.style.paddingBottom=this.isNumber(i)?"".concat(i,"px"):i}return this}},{key:"as",value:function(t){return this.res.style.alignSelf=t,this}},{key:"mar",value:function(t){for(var e=0;e<t.length;e++)for(var r=Object.keys(t[e]),n=0;n<r.length;n++)for(var s=r[n],i=t[e][s],o=0;o<s.length;o++){switch(s[o]){case"a":this.res.style.margin=this.isNumber(i)?"".concat(i,"px"):i;break;case"t":this.res.style.marginTop=this.isNumber(i)?"".concat(i,"px"):i;break;case"l":this.res.style.marginLeft=this.isNumber(i)?"".concat(i,"px"):i;break;case"r":this.res.style.marginRight=this.isNumber(i)?"".concat(i,"px"):i;break;case"b":this.res.style.marginBottom=this.isNumber(i)?"".concat(i,"px"):i}"auto"===s[o]&&(this.res.style.marginLeft="auto",this.res.style.marginRight="auto")}return this}},{key:"smartRange",value:function(t,e,r){t<e.min&&(t=e.min),t>e.max&&(t=e.max);var n=(t-e.min)/(e.max-e.min);e.min>e.max&&(n=(t-e.max)/(e.min-e.max));var s=(r.min-r.max)*n-r.min;if(s=Math.abs(s),r.min<r.max){var i=(r.max+Math.abs(r.min))*n;s=r.min+i}return s}},{key:"gpos",value:function(t){return this.res.style.gridColumn=t.col,this.res.style.gridRow=t.row,this}},{key:"fluidCopy",value:function(t){if(t instanceof Object){this.prevStylex=this.res.style,this.res=document.createElement("h1"),this.res.style.cssText=this.prevStylex.cssText;var e=document.createTextNode(this.text);return this.res.appendChild(e),this.res.style.fontSize=t.exact,this}if("S1"===t){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"===t){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"===t){this.prevStylex=this.res.style,this.res=document.createElement("h3"),this.res.style.cssText=this.prevStylex.cssText;var s=document.createTextNode(this.text);this.res.appendChild(s),this.res.style.fontSize="calc(1.375rem + 3.525vw)"}if("S4"===t){this.prevStylex=this.res.style,this.res=document.createElement("h4"),this.res.style.cssText=this.prevStylex.cssText;var i=document.createTextNode(this.text);this.res.appendChild(i),this.res.style.fontSize="calc(1.250rem + 2.75vw)"}if("S5"===t){this.prevStylex=this.res.style,this.res=document.createElement("h5"),this.res.style.cssText=this.prevStylex.cssText;var o=document.createTextNode(this.text);this.res.appendChild(o),this.res.style.fontSize="calc(1.125rem + 1.975vw)"}return"S6"===t&&(this.res.style.fontSize="calc(1rem + 0.5vw)"),this}},{key:"setIndex",value:function(t){this.index=t}},{key:"borderObj",value:function(t){var e,r=null!==(e=t.type)&&void 0!==e?e:"solid";return this.res.style.border="".concat(t.width," ").concat(r," ").concat(t.color),this.res.style.borderRadius=t.radius,this}},{key:"protoReact",value:function(t,e){var r=this;t.sort((function(t,e){return parseInt(t.range[0])-parseInt(e.range[0])}));var i=function(){var i=window.innerWidth,o="";r.storedQueries=t.map((function(t){return t.target})).filter((function(t){return null!=t}));var a,l=s(t);try{for(l.s();!(a=l.n()).done;){var c=a.value;r.counterIndex++;var u=n(c.range,2),d=u[0],f=u[1],p=parseInt(d),h=parseInt(f),y=!0;if(c.target){y=!1;for(var m=0;m<c.target.length;m++)c.target[m]===e&&(y=!0)}i>=p&&i<=h&&y&&("gradient"===c.log&&(o+="gradient"),"blast"===c.log&&(o+="blast"),"animation"===c.log&&(o+="animation"),"shadow"===c.log&&(o+="shadow"),"span"===c.log&&(o+="span"),"filter"===c.log&&(o+="filter"),"background"===c.log&&(o+="background"))}}catch(t){l.e(t)}finally{l.f()}r.res.style.margin="";var v,b=r.res.style.color;for(t.map((function(t){return t.log})).filter((function(t){return null!=t})).includes("gradient")&&(r.res.style.WebkitBackgroundClip="",r.res.style.background=""),r.res.style["-webkit-text-stroke"]="",r.res.style.filter="",r.res.style.textShadow="",r.res.style.border="";r.res.firstChild;)r.res.removeChild(r.res.firstChild);if(r.res.textContent=r.text,""===o&&(r.res.style["-webkit-text-fill-color"]="",r.res.style.color=b),"blast"===o){for(m=0;m<t.length;m++){var g=t[m].op.offsets;g&&void 0!==r.index&&(r.res.style.margin=g[Number(r.index)]+"px")}for(r.res.style["-webkit-text-fill-color"]="transparent",r.res.style["-webkit-text-stroke"]=r.globalBlast,m=0;m<t.length;m++){var x=t[m].op.offsets;x&&void 0!==r.index&&(r.res.style.margin=x[Number(r.index)]+"px")}}if("gradient"===o&&(r.res.style["-webkit-text-fill-color"]="transparent",r.res.style.background=r.globalGradient,r.res.style["-webkit-background-clip"]="text",r.res.style.border="1px solid orange"),"background"===o&&(r.res.style.background="orange"),"gradientblast"===o&&(r.res.style["-webkit-text-fill-color"]="transparent",r.res.style.background=r.globalGradient,r.res.style["-webkit-background-clip"]="text",r.res.style["-webkit-text-stroke"]=r.globalBlast),"gradientanimation"===o&&(r.res.style["-webkit-text-fill-color"]="transparent",r.res.style.background=r.globalGradient,r.res.style["-webkit-background-clip"]="text"),"gradientanimationshadow"===o&&(r.res.style["-webkit-text-fill-color"]="transparent",r.res.style.background=r.globalGradient,r.res.style["-webkit-background-clip"]="text",r.res.style.textShadow=r.globalShadow),"animationshadow"===o&&(r.res.style["-webkit-text-fill-color"]="",r.res.style.textShadow=r.globalShadow),"shadow"===o&&(r.res.style["-webkit-text-fill-color"]="",r.res.style.textShadow=r.globalShadow),"span"===o&&r.options.span)for(v=Array.isArray(r.options.span)?r.options.span.filter((function(t){return"span"===t.op.name}))[0]:r.options.span,r.res.textContent="",m=0;m<v.op.parts.length;m++){var k=v.op.parts[m].style,w=new Text(v.op.parts[m].text).setup({type:"span"}).set(k).render();r.res.appendChild(w)}if("filter"===o){var S=r.options.filtera.op.filter;r.res.style.filter=S,r.res.style.border="8px solid orange"}};window.addEventListener("resize",i),i()}},{key:"setPref",value:function(t){this.preffersId=t}},{key:"setClass",value:function(t){this.class=t}},{key:"betaReact",value:function(t,e){var r=this;this.ap=!1,this.cta=0,this.once=!1,t.sort((function(t,e){return parseInt(t.range[0])-parseInt(e.range[0])}));var i=function(){var i=window.innerWidth,o="";r.resCopy=r.res,r.storedQueries=t.map((function(t){return t.target})).filter((function(t){return null!=t}));var a,l=s(t);try{for(l.s();!(a=l.n()).done;){var c=a.value;r.counterIndex++;var u=n(c.range,2),d=u[0],f=u[1],p=parseInt(d),h=parseInt(f),y=!0;if(c.target){y=!1;for(var m=0;m<c.target.length;m++)c.target[m]===e&&(y=!0)}i>=p&&i<=h&&y&&("blast"===c.log&&(o+="blast"),"shadow"===c.log&&(o+="shadow"),"background"===c.log&&(o+="background"),"gradient"===c.log&&(o+="gradient"),"spana"===c.log&&(o+="spana"),"layout"===c.log&&(o+="layout"),"margin"===c.log&&(o+="margin"),c.op&&c.op.margin&&(r.useMargin=c.op.margin))}}catch(t){l.e(t)}finally{l.f()}if(r.res.style.background="",r.res.style.backgroundColor="",r.res.style.textShadow="",r.res.style.border="",r.res.style.margin="",r.res.style["-webkit-text-fill-color"]="",r.res.style["-webkit-text-stroke"]="",r.res.style["-webkit-text-stroke-width"]="","background"===o&&(r.res.style.backgroundColor="green"),"margin"===o)for(m=0;m<t.length;m++)if(t[m].op){var v=t[m].op.offsets;v&&void 0!==r.index&&(r.res.style.margin=v[Number(r.index)]+"px")}if("blastbackgroundmargin"===o){for(m=0;m<t.length;m++)if(t[m].op){var b=t[m].op.offsets;b&&void 0!==r.index&&(r.res.style.margin=b[Number(r.index)]+"px")}r.res.style.backgroundColor="green","FlexRowLayoutElement"===r.getType()?r.res.style.border="1px solid orange":(r.res.textContent=r.text,r.res.style["-webkit-text-fill-color"]="transparent",r.res.style["-webkit-text-stroke-color"]="orange",r.res.style["-webkit-text-stroke-width"]="1px"),r.res.style["-webkit-text-fill-color"]="transparent",r.res.style["-webkit-text-stroke-color"]="orange",r.res.style["-webkit-text-stroke-width"]="1px"}if("blastbackground"===o){for(m=0;m<t.length;m++)if(t[m].op){var g=t[m].op.offsets;g&&void 0!==r.index&&(r.res.style.margin=g[Number(r.index)]+"px")}r.res.style.backgroundColor="green",r.useMargin?r.res.style.margin="1rem":r.res.setAttribute("id","iofhwoiefhoih"),"FlexRowLayoutElement"===r.getType()?r.res.style.border="1px solid orange":(r.res.textContent=r.text,r.res.style["-webkit-text-fill-color"]="transparent",r.res.style["-webkit-text-stroke-color"]="orange",r.res.style["-webkit-text-stroke-width"]="1px"),r.res.style["-webkit-text-fill-color"]="transparent",r.res.style["-webkit-text-stroke-color"]="orange",r.res.style["-webkit-text-stroke-width"]="1px"}if("layout"===o&&(r.res.style.alignSelf="start",r.res.style.border="1px solid purple"),"blast"===o){for(m=0;m<t.length;m++)if(t[m].op){var x=t[m].op.offsets;x&&void 0!==r.index&&(r.res.style.margin=x[Number(r.index)]+"px")}"FlexRowLayoutElement"===r.getType()?r.res.style.border="1px solid orange":(r.res.textContent=r.text,r.res.style["-webkit-text-fill-color"]="transparent",r.res.style["-webkit-background-clip"]="text",r.res.style["-webkit-text-stroke-color"]="orange",r.res.style["-webkit-text-stroke-width"]="1px"),r.res.style["-webkit-text-fill-color"]="transparent",r.res.style["-webkit-text-stroke"]="orange",r.res.style["-webkit-text-stroke-width"]="1px"}"blastgradientbackground"===o&&(r.res.style.border="1px solid yellow",r.res.style["-webkit-text-stroke-color"]="orange",r.res.style["-webkit-text-stroke-width"]="1px"),"gradient"===o&&(r.res.style.background="linear-gradient(to left, #3498db, #1abc9c)","FlexRowLayoutElement"===r.getType()||(r.res.children[0]&&r.res.removeChild(r.res.children[0]),r.res.style["-webkit-text-fill-color"]="transparent",r.res.style["-webkit-background-clip"]="text",r.res.textContent=r.text)),"shadow"===o&&("FlexRowLayoutElement"===r.getType()||(r.res.children[0]&&r.res.removeChild(r.res.children[0]),r.res.style["-webkit-text-fill-color"]="",r.res.style["-webkit-text-fill-color"]="",r.res.style.textShadow="#1abc9cff -6px 6px , #1abc9c40 -12px 12px",r.res.textContent=r.text))};window.addEventListener("resize",i),i()}},{key:"cssGen",value:function(t,e,r,n){return this.css=[""],[""]}},{key:"chainReact",value:function(t,e,r){var i=this;this.cssGen(t,e,this.class,void 0!==this.class),this.ap=!1,this.cta=0,this.once=!1;var o,a=s(t);try{for(a.s();!(o=a.n()).done;){var l=o.value;l.range||(l.range=["0px","999999px"])}}catch(t){a.e(t)}finally{a.f()}t.sort((function(t,e){return parseInt(t.range[0])-parseInt(e.range[0])}));var c=function(){var o=window.visualViewport.width,a=[],l=[];i.resCopy=i.res,i.storedQueries=t.map((function(t){return t.target})).filter((function(t){return null!=t}));var c,u=s(t);try{for(u.s();!(c=u.n()).done;){var d=c.value;i.counterIndex++;var f=n(d.range,2),p=f[0],h=f[1],y=parseInt(p),m=parseInt(h),v=!0;if(d.target){v=!1;for(var b=0;b<d.target.length;b++)d.target[b]===e&&(v=!0)}o>=y&&o<=m&&v&&(a.push(d.log),l.push(d),d.op&&d.op.margin&&(i.useMargin=d.op.margin))}}catch(t){u.e(t)}finally{u.f()}if(r&&!r.includes("background")&&(i.res.style.background="",i.res.style.backgroundColor=""),i.res.style.textShadow="",r&&!r.includes("border")&&(i.res.style.border=""),r&&!r.includes("margin")&&(i.res.style.margin=""),i.res.style["-webkit-text-fill-color"]="",i.res.style["-webkit-text-stroke-color"]="",i.res.style["-webkit-text-stroke-width"]="",i.res.style.filter="",(a.includes("gradient")||a.includes("shadow"))&&(i.res.style.position="relative",i.res.style.zIndex=-1),a.includes("blast")){var g,x=l.filter((function(t){return"blast"===t.log}))[0].op.color,k=null!==(g=l.filter((function(t){return"blast"===t.log}))[0].op.width)&&void 0!==g?g:"1px";"FlexRowLayoutElement"===i.getType()?i.res.style.border="".concat(k,"px solid orange"):(i.res.textContent=i.text,i.res.style["-webkit-text-fill-color"]="transparent",i.res.style["-webkit-text-stroke-color"]=x,i.res.style["-webkit-text-stroke-width"]="".concat(k))}if(a.includes("filter")){var w=l.filter((function(t){return"filter"===t.log}))[0].op.filter;i.res.style.filter=w}if(a.includes("background")&&(i.res.style.backgroundColor="green"),a.includes("gradient")&&(i.res.style["-webkit-text-fill-color"]="transparent",i.res.style.background=i.globalGradient,i.res.style["background-clip"]="text"),a.includes("shadow"))if("FlexRowLayoutElement"===i.getType());else{var S="",E=0;for(b=0;b<i.options.shadow.op.steps;b++)S+="drop-shadow(".concat(E+=3,"px ").concat(E,"px ").concat(E,"px gray) ");i.res.style.filter=S}if(a.includes("margin"))for(b=0;b<t.length;b++)if(t[b].op){var C=t[b].op.offsets;C&&void 0!==i.index&&(i.res.style.margin=C[Number(i.index)]+"px")}if(a.includes("animation")){if(i.options.animation&&!i.hasAnimated&&!i.options.animation.op.fireAt){i.hasAnimated=!0;var T=i.options.animation.op;i.res.animate(T.keyframesClose,{duration:0,fill:"forwards"}),i.res.animate(T.keyframesOpen,T.openOptions)}if(i.options.animation&&i.options.animation.op.fireAt&&i.options.animation.op.fireAt.endsWith("px")){var O=i.options.animation.op;i.res.animate(O.keyframesClose,{duration:0,fill:"forwards"});var j=function(){window.scrollY>parseFloat(O.fireAt)&&(i.res.animate(O.keyframesOpen,O.openOptions),window.removeEventListener("scroll",j))};window.addEventListener("scroll",j)}if(i.options.animation&&i.options.animation.op.fireAt&&"inview"===i.options.animation.op.fireAt){var W=i.options.animation.op;i.res.animate(W.keyframesClose,{duration:0,fill:"forwards"}),new IntersectionObserver((function(t,e){t.forEach((function(t){t.isIntersecting&&(i.res.animate(W.keyframesOpen,W.openOptions),e.disconnect())}))})).observe(i.res)}}};window.addEventListener("resize",c),c()}},{key:"maxWidth",value:function(t){return this.res.style.maxWidth=t,this}},{key:"removeQuotesFromFirstWord",value:function(t){return t.replace(/"([^"]+)":/g,"$1:")}},{key:"arrayMargin",value:function(t,e){return t.includes("left")&&(this.res.style.marginLeft=e),t.includes("right")&&(this.res.style.marginRight=e),t.includes("top")&&(this.res.style.marginTop=e),t.includes("bottom")&&(this.res.style.marginBottom=e),t.includes("all")&&(this.res.style.margin=e),e||(this.res.style.marginBottom=t),this}},{key:"navBarExpand",value:function(){return this.res.style.backgroundColor="green",this.res.animate([{transform:"scaleY(3.0)"}],{duration:2e3,iterations:1,fill:"both"}),this}},{key:"scrollFade",value:function(t,e){return this.res.style.visibility="hidden",this.faden(t,e,"scroll"),this}},{key:"expand",value:function(t){var e=this;return!1===this.state.isExpanded?"click"===t.on?this.res.addEventListener("click",(function(){e.innerExpand(t)})):this.innerExpand(t):this.innerExpandBack(t),this.state.isExpanded=!this.state.isExpanded,this}},{key:"move",value:function(t){var e=this;return"click"===t.on?this.res.addEventListener("click",(function(){e.moveUpa(t)})):("up"===t.direction&&this.moveUpa(t),"down"===t.direction&&this.moveDowna(t),this.state.isMovedUp=!this.state.isMovedUp,"left"===t.direction&&this.moveLeft(t)),this}},{key:"moveLeft",value:function(t){return this.res.animate([{transform:"translateX(0px)"},{transform:"translateX(-".concat(t.distance,")")}],{duration:900,iterations:t.iterations,fill:"both"}).play(),this}},{key:"moveUpa",value:function(t){return!1===this.state.isMovedUp?this.res.animate([{transform:"translateX(0px)"},{transform:"translateY(-".concat(t.distance,")")}],{duration:900,iterations:t.iterations,fill:"both"}).play():this.res.animate([{transform:"translateX(0px)"},{transform:"translateY(".concat(t.distance,")")}],{duration:900,iterations:t.iterations,fill:"both"}).play(),this}},{key:"moveDowna",value:function(t){return!1===this.state.isMovedDown?this.res.animate([{transform:"translateX(0px)"},{transform:"translateY(".concat(t.distance,")")}],{duration:900,iterations:t.iterations,fill:"both"}).play():this.res.animate([{transform:"translateX(0px)"},{transform:"translateY(-".concat(t.distance,")")}],{duration:900,iterations:t.iterations,fill:"both"}).play(),this}},{key:"moveUpaBack",value:function(t){return this.res.animate([{transform:"translateX(0px)"}],{duration:900,iterations:t.iterations,fill:"both"}).play(),this}},{key:"innerExpandBack",value:function(t){this.res.animate([{width:this.prevWidth,height:this.prevHeight}],{duration:900,iterations:t.iterations,fill:"both"})}},{key:"innerExpand",value:function(t){var e,r;return this.prevWidth=this.res.style.width,this.prevHeight=this.res.style.height,this.res.animate([{width:this.prevWidth,height:this.prevHeight},{width:null!==(e=t.width)&&void 0!==e?e:this.prevWidth,height:null!==(r=t.height)&&void 0!==r?r:this.prevHeight}],{duration:900,iterations:t.iterations,fill:"both"}),this}},{key:"fade",value:function(t){return this.res.style.visibility="hidden",this.faden(t.duration,t.from,"load"),t.finalOpacity&&(this.finalOpacity=t.finalOpacity),this}},{key:"faden",value:function(t,e,r){var n=this;return this.res.style.visibility="hidden",this.scrolled=!1,window.addEventListener(r,(function(){n.res.style.visibility="visible";var s=window.innerHeight;(n.res.getBoundingClientRect().top-s<=0||"load"==r)&&0==n.scrolled&&("left"==e&&n.res.animate([{transform:"translateX(-30px)"},{transform:"translateX(0px)"}],{duration:t,iterations:1}),"right"==e&&n.res.animate([{transform:"translateX(30px)"},{transform:"translateX(0px)"}],{duration:t,iterations:1}),"top"==e&&n.res.animate([{transform:"translateY(-30px)"},{transform:"translateY(0px)"}],{duration:t,iterations:1}),"bottom"==e&&n.res.animate([{transform:"translateY(30px)"},{transform:"translateY(0px)"}],{duration:t,iterations:1}),n.res.animate([{opacity:"0.0"},{opacity:"1.0"}],{duration:t,iterations:1}),n.scrolled=!0)})),this}}])&&a(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}());module.exports=e})();
|
|
2
|
+
(()=>{"use strict";var t={d:(e,r)=>{for(var n in r)t.o(r,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function n(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,s,o,a=[],l=!0,c=!1;try{if(s=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=s.call(r)).done)&&(a.push(n.value),a.length!==e);l=!0);}catch(t){c=!0,i=t}finally{try{if(!l&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return a}}(t,e)||s(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=s(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,l=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){l=!0,o=t},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw o}}}}function s(t,e){if(t){if("string"==typeof t)return o(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(t,e):void 0}}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,l(n.key),n)}}function l(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}function u(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,f(n.key),n)}}function f(t){var e=function(t){if("object"!=c(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==c(e)?e:e+""}function p(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(p=function(){return!!t})()}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}function y(t,e){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},y(t,e)}t.r(e),t.d(e,{Audio:()=>d});var d=function(t){function e(t){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,r){return e=h(e),function(t,e){if(e&&("object"==c(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,p()?Reflect.construct(e,r||[],h(t).constructor):e.apply(t,r))}(this,e)).url=t,r.res=null,r.setup(),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&y(t,e)}(e,t),r=e,(n=[{key:"setup",value:function(){this.res=document.createElement("audio"),this.res.setAttribute("src",this.url),this.res.setAttribute("controls","controls")}},{key:"set",value:function(t){return this.options=t,t.background&&this.background(t.background),this}},{key:"background",value:function(t){var e=document.createElement("style");return e.type="text/css",e.textContent="\n\taudio::-webkit-media-controls-panel {\n\t\tbackground-color: ".concat(t,";\n\t}\n"),document.head.appendChild(e),this}},{key:"toCode",value:function(){return JSON.stringify(this.options,null,4),['new Audio("'.concat(this.url,'")')]}},{key:"size",value:function(t){return this.res.style.width=t,this}},{key:"render",value:function(t){if(!t)return this.res;document.querySelector(t).appendChild(this.res)}}])&&u(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(function(){return t=function t(){var e,r,n,i=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e=this,n=function(t){if(t.transform||t.op&&t.op.transform){var e=t.transform;t.transform||(e=t.op.transform),e.duration||(e.duration="3s-ease-in-out"),i.setDefault=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"0px";return 0===t.length?e+" ":t};var r=function(){var r="",n="",s="",o="",a="",l="",c="",u="",f="";if(0!==e.values.length){e.values.forEach((function(t){t.startsWith("tx:")&&(r=t.replace("tx:","")),t.startsWith("ty:")&&(n=t.replace("ty:","")),t.startsWith("tz:")?s=t.replace("tz:",""):t.startsWith("scale(")?o=t:t.startsWith("skew(")?a=t:t.startsWith("rotate(")?l=function(t){var e=t.match(/rotate\(([^)]+)\)/);if(!e)return t;var r=e[1].split(",").map((function(t){return t.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],")"):t}(t):t.startsWith("perspective(")?c=t:t.startsWith("matrix(")?u=t:t.startsWith("opacity:")&&(f=t.replace("opacity:",""))})),r=i.setDefault(r),n=i.setDefault(n),s=i.setDefault(s);var p="";if("0px"!=n&&"0px"!=r&&"0px"!=s?p+="translate3d(".concat(r,", ").concat(n,", ").concat(s,")"):"0px"==n&&"0px"==r||(p+="translate(".concat(r,", ").concat(n,")")),o&&(p+=" ".concat(o)),l&&(p+=" ".concat(l)),a&&(p+=" ".concat(a)),c&&(p+=" ".concat(c)),u&&(p+=" ".concat(u)),p){if(t.op.transform.duration){var h=t.op.transform.duration.replace(/^(\d+)(s)-/,(function(t,e,r){return e/2+r+" "})),y="transform ".concat(h,", opacity ").concat(h);i.res.style.transition=y}else i.res.style.transition="transform 3s ease-in-out, opacity 3s ease-in-out";t.op.transform.static&&(i.res.style.transition=""),i.res.style.transform=p,i.res.style.opacity=f}}};e.on?i.res.addEventListener(e.on,(function(){e.delay?setTimeout((function(){r()}),e.delay):r()})):window.addEventListener("load",(function(){e.delay?setTimeout((function(){r()}),e.delay):r()}));var n=function(){var t="";e.values.forEach((function(e){e.startsWith("tx:")?t+="translateX(0) ":e.startsWith("ty:")?t+="translateY(0) ":e.startsWith("tz:")?t+="translateZ(0) ":e.startsWith("scale(")?t+="scale(1) ":e.startsWith("skew(")?t+="skew(0, 0) ":e.startsWith("rotate(")?t+="rotate(0) ":e.startsWith("perspective(")?t+="perspective(0) ":e.startsWith("matrix(")&&(t+="matrix(1, 0, 0, 1, 0, 0) "),i.res.style.opacity="1"})),t&&(i.res.style.transform=t.trim())};if(e.on)i.res.addEventListener("mouseout",(function(){e.keep||n()}));else{var s=1e3*parseFloat(e.duration),o=e.closeAfter?e.closeAfter:0;setTimeout((function(){e.keep||n()}),s/2+o)}e.hardCSS&&(i.res.style.transform=e.hardCSS)}},(r=l(r="reactOnTransform"))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,this.state={isExpanded:!1,isMovedUp:!1,isMovedDown:!1}},e=[{key:"keySet",value:function(t){return this.temporaryVal=1,this.res.style[t.key]=t.value,this}},{key:"onScroll",value:function(t){var e=this;"opacity"===t.value?this.res.style.opacity=t.valMin:"scale"===t.value&&(this.res.style.transform="scale(".concat(t.valMax,")")),window.addEventListener("scroll",(function(){var r=e.smartRange(window.scrollY,{min:t.from,max:t.to},{min:t.valMin,max:t.valMax});"opacity"===t.value?e.res.style.opacity=r:"scale"===t.value&&(e.res.style.transform="scale(".concat(r,")"))}))}},{key:"setAny",value:function(t){this[Object.keys(t)[0]]=[Object.values(t)[0]]}},{key:"setID",value:function(t){this.id=t}},{key:"setPrevText",value:function(t){this.prevText=t}},{key:"getCSS",value:function(){return this.css}},{key:"getPX",value:function(t){return{xs:"0px",sm:"576px",md:"768px",lg:"992px",xl:"1200px",xxl:"1400px",mxxl:"1800px"}[t]||"Invalid breakpoint"}},{key:"respad",value:function(t){var e=this,r=function(){e.pad(t[0].values);for(var r=0;r<t.length;r++){var n=t[r].breakpoint;window.matchMedia("(min-width: ".concat(e.getPX(n))).matches&&e.pad(t[r].values)}};window.addEventListener("resize",r),r()}},{key:"resmar",value:function(t){var e=this,r=function(){e.mar(t[0].values);for(var r=0;r<t.length;r++){var n=t[r].breakpoint;window.matchMedia("(max-width: ".concat(e.getPX(n))).matches&&e.mar(t[r].values)}};window.addEventListener("resize",r),r()}},{key:"resprop",value:function(t){var e=this;this.prevBackground=this.res.style.background,this.prevWidth=this.res.style.width,this.prevHeight=this.res.style.height,this.prevBorder=this.res.style.border;var r=function(){e.res.style.background=e.prevBackground,e.res.style.width=e.prevWidth,e.res.style.height=e.prevHeight,e.res.style.border=e.prevBorder;for(var r=0;r<t.length;r++){var n=t[r].breakpoint;if(window.matchMedia("(max-width: ".concat(e.getPX(n))).matches){var i={};for(var s in t[r])"breakpoint"!==s&&(i[s]=t[r][s]);e.set(i)}}};window.addEventListener("resize",r),r()}},{key:"isNumber",value:function(t){return"number"==typeof t&&!isNaN(t)}},{key:"pad",value:function(t){for(var e=0;e<t.length;e++)for(var r=Object.keys(t[e]),n=0;n<r.length;n++)for(var i=r[n],s=t[e][i],o=0;o<i.length;o++)switch(i[o]){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(t){return this.res.style.alignSelf=t,this}},{key:"mar",value:function(t){for(var e=0;e<t.length;e++)for(var r=Object.keys(t[e]),n=0;n<r.length;n++)for(var i=r[n],s=t[e][i],o=0;o<i.length;o++){switch(i[o]){case"a":this.res.style.margin=this.isNumber(s)?"".concat(s,"px"):s;break;case"t":this.res.style.marginTop=this.isNumber(s)?"".concat(s,"px"):s;break;case"l":this.res.style.marginLeft=this.isNumber(s)?"".concat(s,"px"):s;break;case"r":this.res.style.marginRight=this.isNumber(s)?"".concat(s,"px"):s;break;case"b":this.res.style.marginBottom=this.isNumber(s)?"".concat(s,"px"):s}"auto"===i[o]&&(this.res.style.marginLeft="auto",this.res.style.marginRight="auto")}return this}},{key:"smartRange",value:function(t,e,r){t<e.min&&(t=e.min),t>e.max&&(t=e.max);var n=(t-e.min)/(e.max-e.min);e.min>e.max&&(n=(t-e.max)/(e.min-e.max));var i=(r.min-r.max)*n-r.min;if(i=Math.abs(i),r.min<r.max){var s=(r.max+Math.abs(r.min))*n;i=r.min+s}return i}},{key:"gpos",value:function(t){return this.res.style.gridColumn=t.col,this.res.style.gridRow=t.row,this}},{key:"fluidCopy",value:function(t){if(t instanceof Object){this.prevStylex=this.res.style,this.res=document.createElement("h1"),this.res.style.cssText=this.prevStylex.cssText;var e=document.createTextNode(this.text);return this.res.appendChild(e),this.res.style.fontSize=t.exact,this}if("S1"===t){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"===t){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"===t){this.prevStylex=this.res.style,this.res=document.createElement("h3"),this.res.style.cssText=this.prevStylex.cssText;var i=document.createTextNode(this.text);this.res.appendChild(i),this.res.style.fontSize="calc(1.375rem + 3.525vw)"}if("S4"===t){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"===t){this.prevStylex=this.res.style,this.res=document.createElement("h5"),this.res.style.cssText=this.prevStylex.cssText;var o=document.createTextNode(this.text);this.res.appendChild(o),this.res.style.fontSize="calc(1.125rem + 1.975vw)"}return"S6"===t&&(this.res.style.fontSize="calc(1rem + 0.5vw)"),this}},{key:"setIndex",value:function(t){this.index=t}},{key:"borderObj",value:function(t){var e,r=null!==(e=t.type)&&void 0!==e?e:"solid";return this.res.style.border="".concat(t.width," ").concat(r," ").concat(t.color),this.res.style.borderRadius=t.radius,this}},{key:"setPref",value:function(t){this.preffersId=t}},{key:"setClass",value:function(t){this.class=t}},{key:"chainReact",value:function(t,e,r){var s=this;console.log("0P"),this.ap=!1,this.cta=0,this.once=!1;var o,a=i(t);try{for(a.s();!(o=a.n()).done;){var l=o.value;l.range||(l.range=["0px","999999px"])}}catch(t){a.e(t)}finally{a.f()}t.sort((function(t,e){return parseInt(t.range[0])-parseInt(e.range[0])}));var c=function(o){var a=window.visualViewport.width,l=[],c=[];s.resCopy=s.res,s.storedQueries=t.map((function(t){return t.target})).filter((function(t){return null!=t}));var u,f=i(t);try{for(f.s();!(u=f.n()).done;){var p=u.value;s.counterIndex++;var h=n(p.range,2),y=h[0],d=h[1],m=parseInt(y),v=parseInt(d),b=!0;if(p.target){b=!1;for(var g=0;g<p.target.length;g++)p.target[g]===e&&(b=!0)}a>=m&&a<=v&&b&&(l.push(p.log),c.push(p),p.op&&p.op.margin&&(s.useMargin=p.op.margin))}}catch(t){f.e(t)}finally{f.f()}if(r&&!r.includes("background")&&(s.res.style.background="",s.res.style.backgroundColor=""),s.res.style.textShadow="",r&&!r.includes("border")&&(s.res.style.border=""),r&&!r.includes("margin")&&(s.res.style.margin=""),s.res.style["-webkit-text-fill-color"]="",s.res.style["-webkit-text-stroke-color"]="",s.res.style["-webkit-text-stroke-width"]="",s.res.style.filter="",(l.includes("gradient")||l.includes("shadow"))&&(s.res.style.position="relative",s.res.style.zIndex=-1),l.includes("blast")){var x,w=c.filter((function(t){return"blast"===t.log}))[0].op.color,k=null!==(x=c.filter((function(t){return"blast"===t.log}))[0].op.width)&&void 0!==x?x:"1px";"FlexRowLayoutElement"===s.getType()?s.res.style.border="".concat(k,"px solid orange"):(s.res.textContent=s.text,s.res.style["-webkit-text-fill-color"]="transparent",s.res.style["-webkit-text-stroke-color"]=w,s.res.style["-webkit-text-stroke-width"]="".concat(k))}if(l.includes("filter")){var S=c.filter((function(t){return"filter"===t.log}))[0].op.filter;s.res.style.filter=S}if(l.includes("background")&&(s.res.style.backgroundColor="green"),l.includes("gradient")&&(s.res.style["-webkit-text-fill-color"]="transparent",s.res.style.background=s.globalGradient,s.res.style["background-clip"]="text"),l.includes("shadow"))if("FlexRowLayoutElement"===s.getType());else{var O="",T=0;for(g=0;g<s.options.shadow.op.steps;g++)O+="drop-shadow(".concat(T+=3,"px ").concat(T,"px ").concat(T,"px gray) ");s.res.style.filter=O}if(l.includes("margin"))for(g=0;g<t.length;g++)if(t[g].op){var j=t[g].op.offsets;j&&void 0!==s.index&&(s.res.style.margin=j[Number(s.index)]+"px")}if(l.includes("spana")||l.includes("span")){if(s.res=s.resCopy,s.options.span){var C;for(C=Array.isArray(s.options.span)?s.options.span.filter((function(t){return"span"===t.op.name}))[0]:s.options.span,s.res.textContent="",g=0;g<C.op.parts.length;g++){var E=C.op.parts[g].style,P=new s.constructor(C.op.parts[g].text).setup({type:"span"}).set(E).render();s.res.appendChild(P)}}}else{if(!o)for(;s.res.firstChild;)s.res.removeChild(s.res.firstChild);var A=new s.constructor(s.prevText).set({}).render();s.res.appendChild(A)}if(l.includes("animation")){if(s.options.animation&&!s.hasAnimated&&!s.options.animation.op.fireAt){s.hasAnimated=!0;var W=s.options.animation.op;s.res.animate(W.keyframesClose,{duration:0,fill:"forwards"}),s.res.animate(W.keyframesOpen,W.openOptions)}if(s.options.animation&&s.options.animation.op.fireAt&&s.options.animation.op.fireAt.endsWith("px")){var N=s.options.animation.op;s.res.animate(N.keyframesClose,{duration:0,fill:"forwards"});var I=function(){window.scrollY>parseFloat(N.fireAt)&&(s.res.animate(N.keyframesOpen,N.openOptions),window.removeEventListener("scroll",I))};window.addEventListener("scroll",I)}if(s.options.animation&&s.options.animation.op.fireAt&&"inview"===s.options.animation.op.fireAt){var z=s.options.animation.op;s.res.animate(z.keyframesClose,{duration:0,fill:"forwards"}),new IntersectionObserver((function(t,e){t.forEach((function(t){t.isIntersecting&&(s.res.animate(z.keyframesOpen,z.openOptions),e.disconnect())}))})).observe(s.res)}}};this.options.animation||window.addEventListener("resize",(function(){return c()})),c()}},{key:"maxWidth",value:function(t){return this.res.style.maxWidth=t,this}},{key:"removeQuotesFromFirstWord",value:function(t){return t.replace(/"([^"]+)":/g,"$1:")}},{key:"arrayMargin",value:function(t,e){return t.includes("left")&&(this.res.style.marginLeft=e),t.includes("right")&&(this.res.style.marginRight=e),t.includes("top")&&(this.res.style.marginTop=e),t.includes("bottom")&&(this.res.style.marginBottom=e),t.includes("all")&&(this.res.style.margin=e),e||(this.res.style.marginBottom=t),this}}],e&&a(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}());module.exports=e})();
|
package/dist/audionew.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see audionew.esm.js.LICENSE.txt */
|
|
2
|
-
function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,s,i,o,a=[],l=!0,c=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(a.push(n.value),a.length!==e);l=!0);}catch(t){c=!0,s=t}finally{try{if(!l&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw s}}return a}}(t,e)||n(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=n(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var s=0,i=function(){};return{s:i,n:function(){return s>=t.length?{done:!0}:{done:!1,value:t[s++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,l=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){l=!0,o=t},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw o}}}}function n(t,e){if(t){if("string"==typeof t)return s(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(t,e):void 0}}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,o(n.key),n)}}function o(e){var r=function(e){if("object"!=t(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=t(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==t(r)?r:r+""}var a=function(){return t=function t(){var e,r,n,s=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e=this,n=function(t){if(t.transform||t.op&&t.op.transform){var e=t.transform;t.transform||(e=t.op.transform),e.duration||(e.duration="3s-ease-in-out"),s.setDefault=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"0px";return 0===t.length?e+" ":t};var r=function(){var r="",n="",i="",o="",a="",l="",c="",u="",d="";if(0!==e.values.length){e.values.forEach((function(t){t.startsWith("tx:")&&(r=t.replace("tx:","")),t.startsWith("ty:")&&(n=t.replace("ty:","")),t.startsWith("tz:")?i=t.replace("tz:",""):t.startsWith("scale(")?o=t:t.startsWith("skew(")?a=t:t.startsWith("rotate(")?l=function(t){var e=t.match(/rotate\(([^)]+)\)/);if(!e)return t;var r=e[1].split(",").map((function(t){return t.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],")"):t}(t):t.startsWith("perspective(")?c=t:t.startsWith("matrix(")?u=t:t.startsWith("opacity:")&&(d=t.replace("opacity:",""))})),r=s.setDefault(r),n=s.setDefault(n),i=s.setDefault(i);var f="";if("0px"!=n&&"0px"!=r&&"0px"!=i?f+="translate3d(".concat(r,", ").concat(n,", ").concat(i,")"):"0px"==n&&"0px"==r||(f+="translate(".concat(r,", ").concat(n,")")),o&&(f+=" ".concat(o)),l&&(f+=" ".concat(l)),a&&(f+=" ".concat(a)),c&&(f+=" ".concat(c)),u&&(f+=" ".concat(u)),f){if(t.op.transform.duration){var h=t.op.transform.duration.replace(/^(\d+)(s)-/,(function(t,e,r){return e/2+r+" "})),p="transform ".concat(h,", opacity ").concat(h);s.res.style.transition=p}else s.res.style.transition="transform 3s ease-in-out, opacity 3s ease-in-out";s.res.style.transform=f,s.res.style.opacity=d}}};e.on?s.res.addEventListener(e.on,(function(){e.delay?setTimeout((function(){r()}),e.delay):r()})):window.addEventListener("load",(function(){e.delay?setTimeout((function(){r()}),e.delay):r()}));var n=function(){var t="";e.values.forEach((function(e){e.startsWith("tx:")?t+="translateX(0) ":e.startsWith("ty:")?t+="translateY(0) ":e.startsWith("tz:")?t+="translateZ(0) ":e.startsWith("scale(")?t+="scale(1) ":e.startsWith("skew(")?t+="skew(0, 0) ":e.startsWith("rotate(")?t+="rotate(0) ":e.startsWith("perspective(")?t+="perspective(0) ":e.startsWith("matrix(")&&(t+="matrix(1, 0, 0, 1, 0, 0) "),s.res.style.opacity="1"})),t&&(s.res.style.transform=t.trim())};if(e.on)s.res.addEventListener("mouseout",(function(){e.keep||n()}));else{var i=1e3*parseFloat(e.duration),o=e.closeAfter?e.closeAfter:0;setTimeout((function(){e.keep||n()}),i/2+o)}}},(r=o(r="reactOnTransform"))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,this.state={isExpanded:!1,isMovedUp:!1,isMovedDown:!1}},(n=[{key:"keySet",value:function(t){return this.temporaryVal=1,this.res.style[t.key]=t.value,this}},{key:"onScroll",value:function(t){var e=this;"opacity"===t.value?this.res.style.opacity=t.valMin:"scale"===t.value&&(this.res.style.transform="scale(".concat(t.valMax,")")),window.addEventListener("scroll",(function(){var r=e.smartRange(window.scrollY,{min:t.from,max:t.to},{min:t.valMin,max:t.valMax});"opacity"===t.value?e.res.style.opacity=r:"scale"===t.value&&(e.res.style.transform="scale(".concat(r,")"))}))}},{key:"setAny",value:function(t){this[Object.keys(t)[0]]=[Object.values(t)[0]]}},{key:"setID",value:function(t){this.id=t}},{key:"setPrevText",value:function(t){this.prevText=t}},{key:"getCSS",value:function(){return this.css}},{key:"getPX",value:function(t){return{xs:"0px",sm:"576px",md:"768px",lg:"992px",xl:"1200px",xxl:"1400px",mxxl:"1800px"}[t]||"Invalid breakpoint"}},{key:"respad",value:function(t){var e=this,r=function(){e.pad(t[0].values);for(var r=0;r<t.length;r++){var n=t[r].breakpoint;window.matchMedia("(min-width: ".concat(e.getPX(n))).matches&&e.pad(t[r].values)}};window.addEventListener("resize",r),r()}},{key:"resmar",value:function(t){var e=this,r=function(){e.mar(t[0].values);for(var r=0;r<t.length;r++){var n=t[r].breakpoint;window.matchMedia("(max-width: ".concat(e.getPX(n))).matches&&e.mar(t[r].values)}};window.addEventListener("resize",r),r()}},{key:"resprop",value:function(t){var e=this;this.prevBackground=this.res.style.background,this.prevWidth=this.res.style.width,this.prevHeight=this.res.style.height,this.prevBorder=this.res.style.border;var r=function(){e.res.style.background=e.prevBackground,e.res.style.width=e.prevWidth,e.res.style.height=e.prevHeight,e.res.style.border=e.prevBorder;for(var r=0;r<t.length;r++){var n=t[r].breakpoint;if(window.matchMedia("(max-width: ".concat(e.getPX(n))).matches){var s={};for(var i in t[r])"breakpoint"!==i&&(s[i]=t[r][i]);e.set(s)}}};window.addEventListener("resize",r),r()}},{key:"isNumber",value:function(t){return"number"==typeof t&&!isNaN(t)}},{key:"pad",value:function(t){for(var e=0;e<t.length;e++)for(var r=Object.keys(t[e]),n=0;n<r.length;n++)for(var s=r[n],i=t[e][s],o=0;o<s.length;o++)switch(s[o]){case"a":this.res.style.padding=this.isNumber(i)?"".concat(i,"px"):i;break;case"t":this.res.style.paddingTop=this.isNumber(i)?"".concat(i,"px"):i;break;case"l":this.res.style.paddingLeft=this.isNumber(i)?"".concat(i,"px"):i;break;case"r":this.res.style.paddingRight=this.isNumber(i)?"".concat(i,"px"):i;break;case"b":this.res.style.paddingBottom=this.isNumber(i)?"".concat(i,"px"):i}return this}},{key:"as",value:function(t){return this.res.style.alignSelf=t,this}},{key:"mar",value:function(t){for(var e=0;e<t.length;e++)for(var r=Object.keys(t[e]),n=0;n<r.length;n++)for(var s=r[n],i=t[e][s],o=0;o<s.length;o++){switch(s[o]){case"a":this.res.style.margin=this.isNumber(i)?"".concat(i,"px"):i;break;case"t":this.res.style.marginTop=this.isNumber(i)?"".concat(i,"px"):i;break;case"l":this.res.style.marginLeft=this.isNumber(i)?"".concat(i,"px"):i;break;case"r":this.res.style.marginRight=this.isNumber(i)?"".concat(i,"px"):i;break;case"b":this.res.style.marginBottom=this.isNumber(i)?"".concat(i,"px"):i}"auto"===s[o]&&(this.res.style.marginLeft="auto",this.res.style.marginRight="auto")}return this}},{key:"smartRange",value:function(t,e,r){t<e.min&&(t=e.min),t>e.max&&(t=e.max);var n=(t-e.min)/(e.max-e.min);e.min>e.max&&(n=(t-e.max)/(e.min-e.max));var s=(r.min-r.max)*n-r.min;if(s=Math.abs(s),r.min<r.max){var i=(r.max+Math.abs(r.min))*n;s=r.min+i}return s}},{key:"gpos",value:function(t){return this.res.style.gridColumn=t.col,this.res.style.gridRow=t.row,this}},{key:"fluidCopy",value:function(t){if(t instanceof Object){this.prevStylex=this.res.style,this.res=document.createElement("h1"),this.res.style.cssText=this.prevStylex.cssText;var e=document.createTextNode(this.text);return this.res.appendChild(e),this.res.style.fontSize=t.exact,this}if("S1"===t){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"===t){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"===t){this.prevStylex=this.res.style,this.res=document.createElement("h3"),this.res.style.cssText=this.prevStylex.cssText;var s=document.createTextNode(this.text);this.res.appendChild(s),this.res.style.fontSize="calc(1.375rem + 3.525vw)"}if("S4"===t){this.prevStylex=this.res.style,this.res=document.createElement("h4"),this.res.style.cssText=this.prevStylex.cssText;var i=document.createTextNode(this.text);this.res.appendChild(i),this.res.style.fontSize="calc(1.250rem + 2.75vw)"}if("S5"===t){this.prevStylex=this.res.style,this.res=document.createElement("h5"),this.res.style.cssText=this.prevStylex.cssText;var o=document.createTextNode(this.text);this.res.appendChild(o),this.res.style.fontSize="calc(1.125rem + 1.975vw)"}return"S6"===t&&(this.res.style.fontSize="calc(1rem + 0.5vw)"),this}},{key:"setIndex",value:function(t){this.index=t}},{key:"borderObj",value:function(t){var e,r=null!==(e=t.type)&&void 0!==e?e:"solid";return this.res.style.border="".concat(t.width," ").concat(r," ").concat(t.color),this.res.style.borderRadius=t.radius,this}},{key:"protoReact",value:function(t,n){var s=this;t.sort((function(t,e){return parseInt(t.range[0])-parseInt(e.range[0])}));var i=function(){var i=window.innerWidth,o="";s.storedQueries=t.map((function(t){return t.target})).filter((function(t){return null!=t}));var a,l=r(t);try{for(l.s();!(a=l.n()).done;){var c=a.value;s.counterIndex++;var u=e(c.range,2),d=u[0],f=u[1],h=parseInt(d),p=parseInt(f),y=!0;if(c.target){y=!1;for(var m=0;m<c.target.length;m++)c.target[m]===n&&(y=!0)}i>=h&&i<=p&&y&&("gradient"===c.log&&(o+="gradient"),"blast"===c.log&&(o+="blast"),"animation"===c.log&&(o+="animation"),"shadow"===c.log&&(o+="shadow"),"span"===c.log&&(o+="span"),"filter"===c.log&&(o+="filter"),"background"===c.log&&(o+="background"))}}catch(t){l.e(t)}finally{l.f()}s.res.style.margin="";var v,b=s.res.style.color;for(t.map((function(t){return t.log})).filter((function(t){return null!=t})).includes("gradient")&&(s.res.style.WebkitBackgroundClip="",s.res.style.background=""),s.res.style["-webkit-text-stroke"]="",s.res.style.filter="",s.res.style.textShadow="",s.res.style.border="";s.res.firstChild;)s.res.removeChild(s.res.firstChild);if(s.res.textContent=s.text,""===o&&(s.res.style["-webkit-text-fill-color"]="",s.res.style.color=b),"blast"===o){for(m=0;m<t.length;m++){var g=t[m].op.offsets;g&&void 0!==s.index&&(s.res.style.margin=g[Number(s.index)]+"px")}for(s.res.style["-webkit-text-fill-color"]="transparent",s.res.style["-webkit-text-stroke"]=s.globalBlast,m=0;m<t.length;m++){var x=t[m].op.offsets;x&&void 0!==s.index&&(s.res.style.margin=x[Number(s.index)]+"px")}}if("gradient"===o&&(s.res.style["-webkit-text-fill-color"]="transparent",s.res.style.background=s.globalGradient,s.res.style["-webkit-background-clip"]="text",s.res.style.border="1px solid orange"),"background"===o&&(s.res.style.background="orange"),"gradientblast"===o&&(s.res.style["-webkit-text-fill-color"]="transparent",s.res.style.background=s.globalGradient,s.res.style["-webkit-background-clip"]="text",s.res.style["-webkit-text-stroke"]=s.globalBlast),"gradientanimation"===o&&(s.res.style["-webkit-text-fill-color"]="transparent",s.res.style.background=s.globalGradient,s.res.style["-webkit-background-clip"]="text"),"gradientanimationshadow"===o&&(s.res.style["-webkit-text-fill-color"]="transparent",s.res.style.background=s.globalGradient,s.res.style["-webkit-background-clip"]="text",s.res.style.textShadow=s.globalShadow),"animationshadow"===o&&(s.res.style["-webkit-text-fill-color"]="",s.res.style.textShadow=s.globalShadow),"shadow"===o&&(s.res.style["-webkit-text-fill-color"]="",s.res.style.textShadow=s.globalShadow),"span"===o&&s.options.span)for(v=Array.isArray(s.options.span)?s.options.span.filter((function(t){return"span"===t.op.name}))[0]:s.options.span,s.res.textContent="",m=0;m<v.op.parts.length;m++){var k=v.op.parts[m].style,w=new Text(v.op.parts[m].text).setup({type:"span"}).set(k).render();s.res.appendChild(w)}if("filter"===o){var S=s.options.filtera.op.filter;s.res.style.filter=S,s.res.style.border="8px solid orange"}};window.addEventListener("resize",i),i()}},{key:"setPref",value:function(t){this.preffersId=t}},{key:"setClass",value:function(t){this.class=t}},{key:"betaReact",value:function(t,n){var s=this;this.ap=!1,this.cta=0,this.once=!1,t.sort((function(t,e){return parseInt(t.range[0])-parseInt(e.range[0])}));var i=function(){var i=window.innerWidth,o="";s.resCopy=s.res,s.storedQueries=t.map((function(t){return t.target})).filter((function(t){return null!=t}));var a,l=r(t);try{for(l.s();!(a=l.n()).done;){var c=a.value;s.counterIndex++;var u=e(c.range,2),d=u[0],f=u[1],h=parseInt(d),p=parseInt(f),y=!0;if(c.target){y=!1;for(var m=0;m<c.target.length;m++)c.target[m]===n&&(y=!0)}i>=h&&i<=p&&y&&("blast"===c.log&&(o+="blast"),"shadow"===c.log&&(o+="shadow"),"background"===c.log&&(o+="background"),"gradient"===c.log&&(o+="gradient"),"spana"===c.log&&(o+="spana"),"layout"===c.log&&(o+="layout"),"margin"===c.log&&(o+="margin"),c.op&&c.op.margin&&(s.useMargin=c.op.margin))}}catch(t){l.e(t)}finally{l.f()}if(s.res.style.background="",s.res.style.backgroundColor="",s.res.style.textShadow="",s.res.style.border="",s.res.style.margin="",s.res.style["-webkit-text-fill-color"]="",s.res.style["-webkit-text-stroke"]="",s.res.style["-webkit-text-stroke-width"]="","background"===o&&(s.res.style.backgroundColor="green"),"margin"===o)for(m=0;m<t.length;m++)if(t[m].op){var v=t[m].op.offsets;v&&void 0!==s.index&&(s.res.style.margin=v[Number(s.index)]+"px")}if("blastbackgroundmargin"===o){for(m=0;m<t.length;m++)if(t[m].op){var b=t[m].op.offsets;b&&void 0!==s.index&&(s.res.style.margin=b[Number(s.index)]+"px")}s.res.style.backgroundColor="green","FlexRowLayoutElement"===s.getType()?s.res.style.border="1px solid orange":(s.res.textContent=s.text,s.res.style["-webkit-text-fill-color"]="transparent",s.res.style["-webkit-text-stroke-color"]="orange",s.res.style["-webkit-text-stroke-width"]="1px"),s.res.style["-webkit-text-fill-color"]="transparent",s.res.style["-webkit-text-stroke-color"]="orange",s.res.style["-webkit-text-stroke-width"]="1px"}if("blastbackground"===o){for(m=0;m<t.length;m++)if(t[m].op){var g=t[m].op.offsets;g&&void 0!==s.index&&(s.res.style.margin=g[Number(s.index)]+"px")}s.res.style.backgroundColor="green",s.useMargin?s.res.style.margin="1rem":s.res.setAttribute("id","iofhwoiefhoih"),"FlexRowLayoutElement"===s.getType()?s.res.style.border="1px solid orange":(s.res.textContent=s.text,s.res.style["-webkit-text-fill-color"]="transparent",s.res.style["-webkit-text-stroke-color"]="orange",s.res.style["-webkit-text-stroke-width"]="1px"),s.res.style["-webkit-text-fill-color"]="transparent",s.res.style["-webkit-text-stroke-color"]="orange",s.res.style["-webkit-text-stroke-width"]="1px"}if("layout"===o&&(s.res.style.alignSelf="start",s.res.style.border="1px solid purple"),"blast"===o){for(m=0;m<t.length;m++)if(t[m].op){var x=t[m].op.offsets;x&&void 0!==s.index&&(s.res.style.margin=x[Number(s.index)]+"px")}"FlexRowLayoutElement"===s.getType()?s.res.style.border="1px solid orange":(s.res.textContent=s.text,s.res.style["-webkit-text-fill-color"]="transparent",s.res.style["-webkit-background-clip"]="text",s.res.style["-webkit-text-stroke-color"]="orange",s.res.style["-webkit-text-stroke-width"]="1px"),s.res.style["-webkit-text-fill-color"]="transparent",s.res.style["-webkit-text-stroke"]="orange",s.res.style["-webkit-text-stroke-width"]="1px"}"blastgradientbackground"===o&&(s.res.style.border="1px solid yellow",s.res.style["-webkit-text-stroke-color"]="orange",s.res.style["-webkit-text-stroke-width"]="1px"),"gradient"===o&&(s.res.style.background="linear-gradient(to left, #3498db, #1abc9c)","FlexRowLayoutElement"===s.getType()||(s.res.children[0]&&s.res.removeChild(s.res.children[0]),s.res.style["-webkit-text-fill-color"]="transparent",s.res.style["-webkit-background-clip"]="text",s.res.textContent=s.text)),"shadow"===o&&("FlexRowLayoutElement"===s.getType()||(s.res.children[0]&&s.res.removeChild(s.res.children[0]),s.res.style["-webkit-text-fill-color"]="",s.res.style["-webkit-text-fill-color"]="",s.res.style.textShadow="#1abc9cff -6px 6px , #1abc9c40 -12px 12px",s.res.textContent=s.text))};window.addEventListener("resize",i),i()}},{key:"cssGen",value:function(t,e,r,n){return this.css=[""],[""]}},{key:"chainReact",value:function(t,n,s){var i=this;this.cssGen(t,n,this.class,void 0!==this.class),this.ap=!1,this.cta=0,this.once=!1;var o,a=r(t);try{for(a.s();!(o=a.n()).done;){var l=o.value;l.range||(l.range=["0px","999999px"])}}catch(t){a.e(t)}finally{a.f()}t.sort((function(t,e){return parseInt(t.range[0])-parseInt(e.range[0])}));var c=function(){var o=window.visualViewport.width,a=[],l=[];i.resCopy=i.res,i.storedQueries=t.map((function(t){return t.target})).filter((function(t){return null!=t}));var c,u=r(t);try{for(u.s();!(c=u.n()).done;){var d=c.value;i.counterIndex++;var f=e(d.range,2),h=f[0],p=f[1],y=parseInt(h),m=parseInt(p),v=!0;if(d.target){v=!1;for(var b=0;b<d.target.length;b++)d.target[b]===n&&(v=!0)}o>=y&&o<=m&&v&&(a.push(d.log),l.push(d),d.op&&d.op.margin&&(i.useMargin=d.op.margin))}}catch(t){u.e(t)}finally{u.f()}if(s&&!s.includes("background")&&(i.res.style.background="",i.res.style.backgroundColor=""),i.res.style.textShadow="",s&&!s.includes("border")&&(i.res.style.border=""),s&&!s.includes("margin")&&(i.res.style.margin=""),i.res.style["-webkit-text-fill-color"]="",i.res.style["-webkit-text-stroke-color"]="",i.res.style["-webkit-text-stroke-width"]="",i.res.style.filter="",(a.includes("gradient")||a.includes("shadow"))&&(i.res.style.position="relative",i.res.style.zIndex=-1),a.includes("blast")){var g,x=l.filter((function(t){return"blast"===t.log}))[0].op.color,k=null!==(g=l.filter((function(t){return"blast"===t.log}))[0].op.width)&&void 0!==g?g:"1px";"FlexRowLayoutElement"===i.getType()?i.res.style.border="".concat(k,"px solid orange"):(i.res.textContent=i.text,i.res.style["-webkit-text-fill-color"]="transparent",i.res.style["-webkit-text-stroke-color"]=x,i.res.style["-webkit-text-stroke-width"]="".concat(k))}if(a.includes("filter")){var w=l.filter((function(t){return"filter"===t.log}))[0].op.filter;i.res.style.filter=w}if(a.includes("background")&&(i.res.style.backgroundColor="green"),a.includes("gradient")&&(i.res.style["-webkit-text-fill-color"]="transparent",i.res.style.background=i.globalGradient,i.res.style["background-clip"]="text"),a.includes("shadow"))if("FlexRowLayoutElement"===i.getType());else{var S="",E=0;for(b=0;b<i.options.shadow.op.steps;b++)S+="drop-shadow(".concat(E+=3,"px ").concat(E,"px ").concat(E,"px gray) ");i.res.style.filter=S}if(a.includes("margin"))for(b=0;b<t.length;b++)if(t[b].op){var C=t[b].op.offsets;C&&void 0!==i.index&&(i.res.style.margin=C[Number(i.index)]+"px")}if(a.includes("animation")){if(i.options.animation&&!i.hasAnimated&&!i.options.animation.op.fireAt){i.hasAnimated=!0;var T=i.options.animation.op;i.res.animate(T.keyframesClose,{duration:0,fill:"forwards"}),i.res.animate(T.keyframesOpen,T.openOptions)}if(i.options.animation&&i.options.animation.op.fireAt&&i.options.animation.op.fireAt.endsWith("px")){var O=i.options.animation.op;i.res.animate(O.keyframesClose,{duration:0,fill:"forwards"});var W=function(){window.scrollY>parseFloat(O.fireAt)&&(i.res.animate(O.keyframesOpen,O.openOptions),window.removeEventListener("scroll",W))};window.addEventListener("scroll",W)}if(i.options.animation&&i.options.animation.op.fireAt&&"inview"===i.options.animation.op.fireAt){var j=i.options.animation.op;i.res.animate(j.keyframesClose,{duration:0,fill:"forwards"}),new IntersectionObserver((function(t,e){t.forEach((function(t){t.isIntersecting&&(i.res.animate(j.keyframesOpen,j.openOptions),e.disconnect())}))})).observe(i.res)}}};window.addEventListener("resize",c),c()}},{key:"maxWidth",value:function(t){return this.res.style.maxWidth=t,this}},{key:"removeQuotesFromFirstWord",value:function(t){return t.replace(/"([^"]+)":/g,"$1:")}},{key:"arrayMargin",value:function(t,e){return t.includes("left")&&(this.res.style.marginLeft=e),t.includes("right")&&(this.res.style.marginRight=e),t.includes("top")&&(this.res.style.marginTop=e),t.includes("bottom")&&(this.res.style.marginBottom=e),t.includes("all")&&(this.res.style.margin=e),e||(this.res.style.marginBottom=t),this}},{key:"navBarExpand",value:function(){return this.res.style.backgroundColor="green",this.res.animate([{transform:"scaleY(3.0)"}],{duration:2e3,iterations:1,fill:"both"}),this}},{key:"scrollFade",value:function(t,e){return this.res.style.visibility="hidden",this.faden(t,e,"scroll"),this}},{key:"expand",value:function(t){var e=this;return!1===this.state.isExpanded?"click"===t.on?this.res.addEventListener("click",(function(){e.innerExpand(t)})):this.innerExpand(t):this.innerExpandBack(t),this.state.isExpanded=!this.state.isExpanded,this}},{key:"move",value:function(t){var e=this;return"click"===t.on?this.res.addEventListener("click",(function(){e.moveUpa(t)})):("up"===t.direction&&this.moveUpa(t),"down"===t.direction&&this.moveDowna(t),this.state.isMovedUp=!this.state.isMovedUp,"left"===t.direction&&this.moveLeft(t)),this}},{key:"moveLeft",value:function(t){return this.res.animate([{transform:"translateX(0px)"},{transform:"translateX(-".concat(t.distance,")")}],{duration:900,iterations:t.iterations,fill:"both"}).play(),this}},{key:"moveUpa",value:function(t){return!1===this.state.isMovedUp?this.res.animate([{transform:"translateX(0px)"},{transform:"translateY(-".concat(t.distance,")")}],{duration:900,iterations:t.iterations,fill:"both"}).play():this.res.animate([{transform:"translateX(0px)"},{transform:"translateY(".concat(t.distance,")")}],{duration:900,iterations:t.iterations,fill:"both"}).play(),this}},{key:"moveDowna",value:function(t){return!1===this.state.isMovedDown?this.res.animate([{transform:"translateX(0px)"},{transform:"translateY(".concat(t.distance,")")}],{duration:900,iterations:t.iterations,fill:"both"}).play():this.res.animate([{transform:"translateX(0px)"},{transform:"translateY(-".concat(t.distance,")")}],{duration:900,iterations:t.iterations,fill:"both"}).play(),this}},{key:"moveUpaBack",value:function(t){return this.res.animate([{transform:"translateX(0px)"}],{duration:900,iterations:t.iterations,fill:"both"}).play(),this}},{key:"innerExpandBack",value:function(t){this.res.animate([{width:this.prevWidth,height:this.prevHeight}],{duration:900,iterations:t.iterations,fill:"both"})}},{key:"innerExpand",value:function(t){var e,r;return this.prevWidth=this.res.style.width,this.prevHeight=this.res.style.height,this.res.animate([{width:this.prevWidth,height:this.prevHeight},{width:null!==(e=t.width)&&void 0!==e?e:this.prevWidth,height:null!==(r=t.height)&&void 0!==r?r:this.prevHeight}],{duration:900,iterations:t.iterations,fill:"both"}),this}},{key:"fade",value:function(t){return this.res.style.visibility="hidden",this.faden(t.duration,t.from,"load"),t.finalOpacity&&(this.finalOpacity=t.finalOpacity),this}},{key:"faden",value:function(t,e,r){var n=this;return this.res.style.visibility="hidden",this.scrolled=!1,window.addEventListener(r,(function(){n.res.style.visibility="visible";var s=window.innerHeight;(n.res.getBoundingClientRect().top-s<=0||"load"==r)&&0==n.scrolled&&("left"==e&&n.res.animate([{transform:"translateX(-30px)"},{transform:"translateX(0px)"}],{duration:t,iterations:1}),"right"==e&&n.res.animate([{transform:"translateX(30px)"},{transform:"translateX(0px)"}],{duration:t,iterations:1}),"top"==e&&n.res.animate([{transform:"translateY(-30px)"},{transform:"translateY(0px)"}],{duration:t,iterations:1}),"bottom"==e&&n.res.animate([{transform:"translateY(30px)"},{transform:"translateY(0px)"}],{duration:t,iterations:1}),n.res.animate([{opacity:"0.0"},{opacity:"1.0"}],{duration:t,iterations:1}),n.scrolled=!0)})),this}}])&&i(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,n}();function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,u(n.key),n)}}function u(t){var e=function(t){if("object"!=l(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=l(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==l(e)?e:e+""}function d(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(d=function(){return!!t})()}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}function h(t,e){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},h(t,e)}var p=function(){function t(e){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(t,e,r){return e=f(e),function(t,e){if(e&&("object"==l(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,d()?Reflect.construct(e,r||[],f(t).constructor):e.apply(t,r))}(this,t)).url=e,r.res=null,r.setup(),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&h(t,e)}(t,a),e=t,(r=[{key:"setup",value:function(){this.res=document.createElement("audio"),this.res.setAttribute("src",this.url),this.res.setAttribute("controls","controls")}},{key:"set",value:function(t){return this.options=t,t.background&&this.background(t.background),this}},{key:"background",value:function(t){var e=document.createElement("style");return e.type="text/css",e.textContent="\n\taudio::-webkit-media-controls-panel {\n\t\tbackground-color: ".concat(t,";\n\t}\n"),document.head.appendChild(e),this}},{key:"toCode",value:function(){return JSON.stringify(this.options,null,4),['new Audio("'.concat(this.url,'")')]}},{key:"size",value:function(t){return this.res.style.width=t,this}},{key:"render",value:function(t){if(!t)return this.res;document.querySelector(t).appendChild(this.res)}}])&&c(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,r}();export{p as Audio};
|
|
2
|
+
function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,s,i,o,a=[],l=!0,c=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(a.push(n.value),a.length!==e);l=!0);}catch(t){c=!0,s=t}finally{try{if(!l&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw s}}return a}}(t,e)||n(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=n(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var s=0,i=function(){};return{s:i,n:function(){return s>=t.length?{done:!0}:{done:!1,value:t[s++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,l=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){l=!0,o=t},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw o}}}}function n(t,e){if(t){if("string"==typeof t)return s(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(t,e):void 0}}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,o(n.key),n)}}function o(e){var r=function(e){if("object"!=t(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=t(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==t(r)?r:r+""}var a=function(){return t=function t(){var e,r,n,s=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e=this,n=function(t){if(t.transform||t.op&&t.op.transform){var e=t.transform;t.transform||(e=t.op.transform),e.duration||(e.duration="3s-ease-in-out"),s.setDefault=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"0px";return 0===t.length?e+" ":t};var r=function(){var r="",n="",i="",o="",a="",l="",c="",u="",f="";if(0!==e.values.length){e.values.forEach((function(t){t.startsWith("tx:")&&(r=t.replace("tx:","")),t.startsWith("ty:")&&(n=t.replace("ty:","")),t.startsWith("tz:")?i=t.replace("tz:",""):t.startsWith("scale(")?o=t:t.startsWith("skew(")?a=t:t.startsWith("rotate(")?l=function(t){var e=t.match(/rotate\(([^)]+)\)/);if(!e)return t;var r=e[1].split(",").map((function(t){return t.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],")"):t}(t):t.startsWith("perspective(")?c=t:t.startsWith("matrix(")?u=t:t.startsWith("opacity:")&&(f=t.replace("opacity:",""))})),r=s.setDefault(r),n=s.setDefault(n),i=s.setDefault(i);var p="";if("0px"!=n&&"0px"!=r&&"0px"!=i?p+="translate3d(".concat(r,", ").concat(n,", ").concat(i,")"):"0px"==n&&"0px"==r||(p+="translate(".concat(r,", ").concat(n,")")),o&&(p+=" ".concat(o)),l&&(p+=" ".concat(l)),a&&(p+=" ".concat(a)),c&&(p+=" ".concat(c)),u&&(p+=" ".concat(u)),p){if(t.op.transform.duration){var h=t.op.transform.duration.replace(/^(\d+)(s)-/,(function(t,e,r){return e/2+r+" "})),y="transform ".concat(h,", opacity ").concat(h);s.res.style.transition=y}else s.res.style.transition="transform 3s ease-in-out, opacity 3s ease-in-out";t.op.transform.static&&(s.res.style.transition=""),s.res.style.transform=p,s.res.style.opacity=f}}};e.on?s.res.addEventListener(e.on,(function(){e.delay?setTimeout((function(){r()}),e.delay):r()})):window.addEventListener("load",(function(){e.delay?setTimeout((function(){r()}),e.delay):r()}));var n=function(){var t="";e.values.forEach((function(e){e.startsWith("tx:")?t+="translateX(0) ":e.startsWith("ty:")?t+="translateY(0) ":e.startsWith("tz:")?t+="translateZ(0) ":e.startsWith("scale(")?t+="scale(1) ":e.startsWith("skew(")?t+="skew(0, 0) ":e.startsWith("rotate(")?t+="rotate(0) ":e.startsWith("perspective(")?t+="perspective(0) ":e.startsWith("matrix(")&&(t+="matrix(1, 0, 0, 1, 0, 0) "),s.res.style.opacity="1"})),t&&(s.res.style.transform=t.trim())};if(e.on)s.res.addEventListener("mouseout",(function(){e.keep||n()}));else{var i=1e3*parseFloat(e.duration),o=e.closeAfter?e.closeAfter:0;setTimeout((function(){e.keep||n()}),i/2+o)}e.hardCSS&&(s.res.style.transform=e.hardCSS)}},(r=o(r="reactOnTransform"))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,this.state={isExpanded:!1,isMovedUp:!1,isMovedDown:!1}},n=[{key:"keySet",value:function(t){return this.temporaryVal=1,this.res.style[t.key]=t.value,this}},{key:"onScroll",value:function(t){var e=this;"opacity"===t.value?this.res.style.opacity=t.valMin:"scale"===t.value&&(this.res.style.transform="scale(".concat(t.valMax,")")),window.addEventListener("scroll",(function(){var r=e.smartRange(window.scrollY,{min:t.from,max:t.to},{min:t.valMin,max:t.valMax});"opacity"===t.value?e.res.style.opacity=r:"scale"===t.value&&(e.res.style.transform="scale(".concat(r,")"))}))}},{key:"setAny",value:function(t){this[Object.keys(t)[0]]=[Object.values(t)[0]]}},{key:"setID",value:function(t){this.id=t}},{key:"setPrevText",value:function(t){this.prevText=t}},{key:"getCSS",value:function(){return this.css}},{key:"getPX",value:function(t){return{xs:"0px",sm:"576px",md:"768px",lg:"992px",xl:"1200px",xxl:"1400px",mxxl:"1800px"}[t]||"Invalid breakpoint"}},{key:"respad",value:function(t){var e=this,r=function(){e.pad(t[0].values);for(var r=0;r<t.length;r++){var n=t[r].breakpoint;window.matchMedia("(min-width: ".concat(e.getPX(n))).matches&&e.pad(t[r].values)}};window.addEventListener("resize",r),r()}},{key:"resmar",value:function(t){var e=this,r=function(){e.mar(t[0].values);for(var r=0;r<t.length;r++){var n=t[r].breakpoint;window.matchMedia("(max-width: ".concat(e.getPX(n))).matches&&e.mar(t[r].values)}};window.addEventListener("resize",r),r()}},{key:"resprop",value:function(t){var e=this;this.prevBackground=this.res.style.background,this.prevWidth=this.res.style.width,this.prevHeight=this.res.style.height,this.prevBorder=this.res.style.border;var r=function(){e.res.style.background=e.prevBackground,e.res.style.width=e.prevWidth,e.res.style.height=e.prevHeight,e.res.style.border=e.prevBorder;for(var r=0;r<t.length;r++){var n=t[r].breakpoint;if(window.matchMedia("(max-width: ".concat(e.getPX(n))).matches){var s={};for(var i in t[r])"breakpoint"!==i&&(s[i]=t[r][i]);e.set(s)}}};window.addEventListener("resize",r),r()}},{key:"isNumber",value:function(t){return"number"==typeof t&&!isNaN(t)}},{key:"pad",value:function(t){for(var e=0;e<t.length;e++)for(var r=Object.keys(t[e]),n=0;n<r.length;n++)for(var s=r[n],i=t[e][s],o=0;o<s.length;o++)switch(s[o]){case"a":this.res.style.padding=this.isNumber(i)?"".concat(i,"px"):i;break;case"t":this.res.style.paddingTop=this.isNumber(i)?"".concat(i,"px"):i;break;case"l":this.res.style.paddingLeft=this.isNumber(i)?"".concat(i,"px"):i;break;case"r":this.res.style.paddingRight=this.isNumber(i)?"".concat(i,"px"):i;break;case"b":this.res.style.paddingBottom=this.isNumber(i)?"".concat(i,"px"):i}return this}},{key:"as",value:function(t){return this.res.style.alignSelf=t,this}},{key:"mar",value:function(t){for(var e=0;e<t.length;e++)for(var r=Object.keys(t[e]),n=0;n<r.length;n++)for(var s=r[n],i=t[e][s],o=0;o<s.length;o++){switch(s[o]){case"a":this.res.style.margin=this.isNumber(i)?"".concat(i,"px"):i;break;case"t":this.res.style.marginTop=this.isNumber(i)?"".concat(i,"px"):i;break;case"l":this.res.style.marginLeft=this.isNumber(i)?"".concat(i,"px"):i;break;case"r":this.res.style.marginRight=this.isNumber(i)?"".concat(i,"px"):i;break;case"b":this.res.style.marginBottom=this.isNumber(i)?"".concat(i,"px"):i}"auto"===s[o]&&(this.res.style.marginLeft="auto",this.res.style.marginRight="auto")}return this}},{key:"smartRange",value:function(t,e,r){t<e.min&&(t=e.min),t>e.max&&(t=e.max);var n=(t-e.min)/(e.max-e.min);e.min>e.max&&(n=(t-e.max)/(e.min-e.max));var s=(r.min-r.max)*n-r.min;if(s=Math.abs(s),r.min<r.max){var i=(r.max+Math.abs(r.min))*n;s=r.min+i}return s}},{key:"gpos",value:function(t){return this.res.style.gridColumn=t.col,this.res.style.gridRow=t.row,this}},{key:"fluidCopy",value:function(t){if(t instanceof Object){this.prevStylex=this.res.style,this.res=document.createElement("h1"),this.res.style.cssText=this.prevStylex.cssText;var e=document.createTextNode(this.text);return this.res.appendChild(e),this.res.style.fontSize=t.exact,this}if("S1"===t){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"===t){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"===t){this.prevStylex=this.res.style,this.res=document.createElement("h3"),this.res.style.cssText=this.prevStylex.cssText;var s=document.createTextNode(this.text);this.res.appendChild(s),this.res.style.fontSize="calc(1.375rem + 3.525vw)"}if("S4"===t){this.prevStylex=this.res.style,this.res=document.createElement("h4"),this.res.style.cssText=this.prevStylex.cssText;var i=document.createTextNode(this.text);this.res.appendChild(i),this.res.style.fontSize="calc(1.250rem + 2.75vw)"}if("S5"===t){this.prevStylex=this.res.style,this.res=document.createElement("h5"),this.res.style.cssText=this.prevStylex.cssText;var o=document.createTextNode(this.text);this.res.appendChild(o),this.res.style.fontSize="calc(1.125rem + 1.975vw)"}return"S6"===t&&(this.res.style.fontSize="calc(1rem + 0.5vw)"),this}},{key:"setIndex",value:function(t){this.index=t}},{key:"borderObj",value:function(t){var e,r=null!==(e=t.type)&&void 0!==e?e:"solid";return this.res.style.border="".concat(t.width," ").concat(r," ").concat(t.color),this.res.style.borderRadius=t.radius,this}},{key:"setPref",value:function(t){this.preffersId=t}},{key:"setClass",value:function(t){this.class=t}},{key:"chainReact",value:function(t,n,s){var i=this;console.log("0P"),this.ap=!1,this.cta=0,this.once=!1;var o,a=r(t);try{for(a.s();!(o=a.n()).done;){var l=o.value;l.range||(l.range=["0px","999999px"])}}catch(t){a.e(t)}finally{a.f()}t.sort((function(t,e){return parseInt(t.range[0])-parseInt(e.range[0])}));var c=function(o){var a=window.visualViewport.width,l=[],c=[];i.resCopy=i.res,i.storedQueries=t.map((function(t){return t.target})).filter((function(t){return null!=t}));var u,f=r(t);try{for(f.s();!(u=f.n()).done;){var p=u.value;i.counterIndex++;var h=e(p.range,2),y=h[0],d=h[1],m=parseInt(y),v=parseInt(d),b=!0;if(p.target){b=!1;for(var x=0;x<p.target.length;x++)p.target[x]===n&&(b=!0)}a>=m&&a<=v&&b&&(l.push(p.log),c.push(p),p.op&&p.op.margin&&(i.useMargin=p.op.margin))}}catch(t){f.e(t)}finally{f.f()}if(s&&!s.includes("background")&&(i.res.style.background="",i.res.style.backgroundColor=""),i.res.style.textShadow="",s&&!s.includes("border")&&(i.res.style.border=""),s&&!s.includes("margin")&&(i.res.style.margin=""),i.res.style["-webkit-text-fill-color"]="",i.res.style["-webkit-text-stroke-color"]="",i.res.style["-webkit-text-stroke-width"]="",i.res.style.filter="",(l.includes("gradient")||l.includes("shadow"))&&(i.res.style.position="relative",i.res.style.zIndex=-1),l.includes("blast")){var g,w=c.filter((function(t){return"blast"===t.log}))[0].op.color,k=null!==(g=c.filter((function(t){return"blast"===t.log}))[0].op.width)&&void 0!==g?g:"1px";"FlexRowLayoutElement"===i.getType()?i.res.style.border="".concat(k,"px solid orange"):(i.res.textContent=i.text,i.res.style["-webkit-text-fill-color"]="transparent",i.res.style["-webkit-text-stroke-color"]=w,i.res.style["-webkit-text-stroke-width"]="".concat(k))}if(l.includes("filter")){var S=c.filter((function(t){return"filter"===t.log}))[0].op.filter;i.res.style.filter=S}if(l.includes("background")&&(i.res.style.backgroundColor="green"),l.includes("gradient")&&(i.res.style["-webkit-text-fill-color"]="transparent",i.res.style.background=i.globalGradient,i.res.style["background-clip"]="text"),l.includes("shadow"))if("FlexRowLayoutElement"===i.getType());else{var T="",O=0;for(x=0;x<i.options.shadow.op.steps;x++)T+="drop-shadow(".concat(O+=3,"px ").concat(O,"px ").concat(O,"px gray) ");i.res.style.filter=T}if(l.includes("margin"))for(x=0;x<t.length;x++)if(t[x].op){var C=t[x].op.offsets;C&&void 0!==i.index&&(i.res.style.margin=C[Number(i.index)]+"px")}if(l.includes("spana")||l.includes("span")){if(i.res=i.resCopy,i.options.span){var E;for(E=Array.isArray(i.options.span)?i.options.span.filter((function(t){return"span"===t.op.name}))[0]:i.options.span,i.res.textContent="",x=0;x<E.op.parts.length;x++){var j=E.op.parts[x].style,A=new i.constructor(E.op.parts[x].text).setup({type:"span"}).set(j).render();i.res.appendChild(A)}}}else{if(!o)for(;i.res.firstChild;)i.res.removeChild(i.res.firstChild);var W=new i.constructor(i.prevText).set({}).render();i.res.appendChild(W)}if(l.includes("animation")){if(i.options.animation&&!i.hasAnimated&&!i.options.animation.op.fireAt){i.hasAnimated=!0;var P=i.options.animation.op;i.res.animate(P.keyframesClose,{duration:0,fill:"forwards"}),i.res.animate(P.keyframesOpen,P.openOptions)}if(i.options.animation&&i.options.animation.op.fireAt&&i.options.animation.op.fireAt.endsWith("px")){var N=i.options.animation.op;i.res.animate(N.keyframesClose,{duration:0,fill:"forwards"});var I=function(){window.scrollY>parseFloat(N.fireAt)&&(i.res.animate(N.keyframesOpen,N.openOptions),window.removeEventListener("scroll",I))};window.addEventListener("scroll",I)}if(i.options.animation&&i.options.animation.op.fireAt&&"inview"===i.options.animation.op.fireAt){var z=i.options.animation.op;i.res.animate(z.keyframesClose,{duration:0,fill:"forwards"}),new IntersectionObserver((function(t,e){t.forEach((function(t){t.isIntersecting&&(i.res.animate(z.keyframesOpen,z.openOptions),e.disconnect())}))})).observe(i.res)}}};this.options.animation||window.addEventListener("resize",(function(){return c()})),c()}},{key:"maxWidth",value:function(t){return this.res.style.maxWidth=t,this}},{key:"removeQuotesFromFirstWord",value:function(t){return t.replace(/"([^"]+)":/g,"$1:")}},{key:"arrayMargin",value:function(t,e){return t.includes("left")&&(this.res.style.marginLeft=e),t.includes("right")&&(this.res.style.marginRight=e),t.includes("top")&&(this.res.style.marginTop=e),t.includes("bottom")&&(this.res.style.marginBottom=e),t.includes("all")&&(this.res.style.margin=e),e||(this.res.style.marginBottom=t),this}}],n&&i(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,n}();function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,u(n.key),n)}}function u(t){var e=function(t){if("object"!=l(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=l(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==l(e)?e:e+""}function f(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(f=function(){return!!t})()}function p(t){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},p(t)}function h(t,e){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},h(t,e)}var y=function(){function t(e){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(t,e,r){return e=p(e),function(t,e){if(e&&("object"==l(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,f()?Reflect.construct(e,r||[],p(t).constructor):e.apply(t,r))}(this,t)).url=e,r.res=null,r.setup(),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&h(t,e)}(t,a),e=t,(r=[{key:"setup",value:function(){this.res=document.createElement("audio"),this.res.setAttribute("src",this.url),this.res.setAttribute("controls","controls")}},{key:"set",value:function(t){return this.options=t,t.background&&this.background(t.background),this}},{key:"background",value:function(t){var e=document.createElement("style");return e.type="text/css",e.textContent="\n\taudio::-webkit-media-controls-panel {\n\t\tbackground-color: ".concat(t,";\n\t}\n"),document.head.appendChild(e),this}},{key:"toCode",value:function(){return JSON.stringify(this.options,null,4),['new Audio("'.concat(this.url,'")')]}},{key:"size",value:function(t){return this.res.style.width=t,this}},{key:"render",value:function(t){if(!t)return this.res;document.querySelector(t).appendChild(this.res)}}])&&c(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,r}();export{y as Audio};
|