{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./cartridges/app_custom_basicfit/cartridge/client/default/js/animations/linesAnimations.js","webpack:///./cartridges/app_custom_basicfit/cartridge/client/default/js/promoBanner.js","webpack:///./cartridges/app_custom_basicfit/cartridge/client/default/js/util.js","webpack:///./node_modules/get-youtube-id/index.js","webpack:///./node_modules/kute.js/dist/kute.esm.js","webpack:///./node_modules/process/browser.js","webpack:///./node_modules/tingle.js/dist/tingle.min.js","webpack:///(webpack)/buildin/global.js"],"names":["isDesktop","getScreenSizeType","indexOf","runCircleAnimationBackwards","outerCircleId","innerCircleId","el1","document","querySelector","el2","KUTE","fromTo","draw","rotate","opacity","easing","yoyo","duration","start","runCircleAnimationForwards","runLineAnimationBackwards","id","animationTime","el","runLineAnimationForwards","runLineAnimationBounce","runLineAnimationBounceBack","lineScrollAnimation","lineId","linePath","getElementById","length","getTotalLength","style","strokeDasharray","strokeDashoffset","scrollpercent","body","scrollTop","documentElement","scrollHeight","clientHeight","imageScrollAnimation","svgId","animationBanner","getBoundingClientRect","animatedSvg","navigationHeight","height","devider","includes","maxHeight","top","position","PromoBanner","pathsVisible","animationType","isPathsVisible","svgChildren","childNodes","undefined","forEach","runAnimation","element","dataset","animationtype","isDOMElementInViewport","init","window","addEventListener","addClassWhenInViewport","smallDesktopMin","mobileViewMax","tabletViewMin","tabletViewMax","processInclude","include","Object","keys","key","formatName","product","category","name","toLowerCase","innerWidth","getScreenSize","mediaQuery","matchMedia","matches","isElementInViewport","rect","windowHeight","innerHeight","windowWidth","clientWidth","vertInView","horInView","left","width","bounding","className","$element","classList","add","remove","currentPageScrollPosition","scrollLock","onoff","$body","scrollY","overflow","removeProperty","scrollTo","createErrorNotification","message","errorHtml","$","append","appendToUrl","url","params","newUrl","map","encodeURIComponent","join","openVideoInModal","videoUrl","videoId","getYouTubeID","iframeVimeo","videoInModal","tingle","modal","cssClass","closeLabel","onClose","destroy","setContent","open","scrollToAnchor","anchor","defaultOptions","headerElemHeight","extraMargin","scrollPos","parseInt","offset","animate","setEqualHeights","arrayItems","count","maxH","arrays","push","splice","i","data","j","currentH","outerHeight","k","css","each","currentH2","fontSizeReduced","pages","querySelectorAll","titleContainer","fontReduceComponent","page","component","offsetWidth","checkForContent","elements","item","hasChildNodes","validateEmail","email","regex","test","calculateTitleHeight","heroBannerTitle","heroBannerImg","marginTop","offsetHeight","display","openTabs","tabSelector","tabContentSelector","tab","tabContent","removeActive","e","current","currentTarget","currentID","getAttribute","readMoreButton","content","btnText","btnLessText","btnClassName","num","readLess","readMoreBtn","createElement","innerHTML","value","index","appendChild","toggle","contains","imageResizeiOSFix","$img","addClass","backToTop","$backToTop","on","$scrollPos","pageYOffset","removeClass","preventDefault","customStickyPosition","stickyElement","elementOne","elementTwo","elementThree","stickyEl","offSetOne","offSetTwo","offSetThree","dynamicCountdown","timeLeftSeconds","parseFloat","text","self","timer","setInterval","hours","Math","floor","minutes","seconds","remainingTime","clearInterval","hasClass","spinner","stop","removeHiddenAssets","$Selector","parentToRemoveSelector","find","closest"],"mappings":";QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;;AClFA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;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A;;AAEA;AACA,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB;AACA;AACA;AACA;;AAEA;AACA,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB;AACA;AACA;AACA;;AAEA;AACA,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB;AACA;AACA;AACA;;AAEA;AACA,aAAa,OAAO;AACpB,cAAc,OAAO;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,OAAO;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,UAAU;AACV;AACA;;AAEA,cAAc,yBAAyB;;AAEvC,4BAA4B,qBAAqB;;AAEjD;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,WAAW,cAAc;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,WAAW;AACX;AACA,OAAO;;AAEP;AACA;AACA,OAAO;AACP;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,WAAW;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,WAAW;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,aAAa;AACzB;AACA;;AAEA;AACA;AACA;AACA,yBAAyB,mBAAmB;;AAE5C;AACA;AACA,UAAU;AACV;AACA,8BAA8B;AAC9B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,6DAA6D;AAC7D;AACA,eAAe;AACf;AACA,wFAAwF;AACxF;AACA;AACA,iBAAiB;AACjB;AACA,aAAa;AACb;AACA,SAAS;AACT;AACA,KAAK;AACL,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,0DAA0D;AAC1D;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB;AACA,iCAAiC;AACjC;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,SAAS;AACT;AACA;;AAEA;AACA,SAAS;AACT;;AAEA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,WAAW;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,WAAW,8CAA8C;AACzD;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,6BAA6B;AACxC,aAAa,oBAAoB;AACjC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA,uEAAuE;AACvE;AACA;AACA,6DAA6D,GAAG;AAChE;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B,WAAW,iBAAiB;AAC5B,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,GAAG;AACH,uDAAuD,GAAG;AAC1D;AACA;;AAEA;AACA;AACA;AACA;AACA,mCAAmC;AACnC,KAAK;AACL;AACA;AACA,OAAO;AACP;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,gBAAgB;AAC7B,aAAa,gBAAgB;AAC7B,aAAa,kBAAkB;AAC/B,eAAe,UAAU;AACzB;AACA;AACA;AACA;;AAEA,eAAe,QAAQ;AACvB;AACA,eAAe,QAAQ;AACvB;AACA,eAAe,QAAQ;AACvB;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,kDAAkD;AAClD;AACA;AACA,eAAe,kBAAkB;AACjC;AACA,eAAe,OAAO;AACtB,mEAAmE;AACnE,eAAe,OAAO;AACtB,0DAA0D;;AAE1D;AACA;AACA,iCAAiC,GAAG;AACpC;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,aAAa,QAAQ;AACrB,eAAe,UAAU;AACzB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,eAAe,UAAU;AACzB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,iBAAiB;AAC9B,eAAe,UAAU;AACzB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,OAAO;AACpB,eAAe,QAAQ;AACvB;AACA;AACA;;AAEA;;AAEA,8CAA8C,aAAa;;AAE3D;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,iBAAiB;AAC9B,eAAe,MAAM;AACrB;AACA;AACA,mBAAmB;;AAEnB;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;;AAEA;AACA,eAAe,QAAQ;AACvB;AACA,eAAe,QAAQ;AACvB;;AAEA;AACA,eAAe,QAAQ;AACvB;AACA,eAAe,QAAQ;AACvB;AACA;AACA,eAAe,QAAQ;AACvB;;AAEA;AACA,eAAe,gBAAgB;AAC/B,2BAA2B;AAC3B,eAAe,QAAQ;AACvB;AACA,eAAe,QAAQ;AACvB;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,QAAQ;AACrB,eAAe,MAAM;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,eAAe,MAAM;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,eAAe,MAAM;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,eAAe,MAAM;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA,aAAa,OAAO;AACpB,eAAe,QAAQ;AACvB;AACA;AACA;;AAEA;;AAEA,8CAA8C,aAAa;;AAE3D;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,yBAAyB;AACzB;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,sCAAsC;AACnD,aAAa,g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AAW,gBAAgB;AAC3B,aAAa,gBAAgB;AAC7B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,sCAAsC;AACjD,WAAW,gBAAgB;AAC3B,WAAW,gBAAgB;AAC3B,WAAW,kBAAkB;AAC7B,aAAa,gBAAgB;AAC7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAmB;AAChC;AACA;AACA;AACA;AACA,8BAA8B,oBAAoB;AAClD,OAAO;AACP,8BAA8B,mBAAmB;AACjD;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,QAAQ;;AAER;AACA,QAAQ;;AAER;AACA,QAAQ;;AAER;AACA,QAAQ;;AAER;AACA;AACA;;AAEA;AACA,sCAAsC;AACtC;;AAEA;AACA,iCAAiC,SAAS;AAC1C,KAAK;AACL;AACA;AACA,OAAO;;AAEP;AACA,iCAAiC,mBAAmB,GAAG,qBAAqB;AAC5E;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,OAAO;;AAEP;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI,sBAAsB;AAC1B;AACA,WAAW,OAAO;AAClB,WAAW,iBAAiB;AAC5B,cAAc,sBAAsB,WAAW,YAAY;AAC3D;AACA;AACA;AACA;AACA;;AAEA,sBAAsB,wBAAwB;AAC9C;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;;AAEA,UAAU;AACV;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,kCAAkC,0CAA0C,EAAE;;AAE9E;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA,SAAS,gBAAgB;AACzB;;AAEA;AACA;AACA;AACA;AACA,+BAA+B,MAAM;AACrC;AACA,WAAW,OAAO;AAClB,aAAa,wBAAwB;AACrC;AACA;AACA;AACA;AACA;AACA,8BAA8B,EAAE,UAAU,EAAE,UAAU,EAAE;;AAExD;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,iBAAiB,MAAM,QAAQ;AAC5C;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA,gBAAgB;AAChB,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,cAAc;AACd,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,WAAW,iBAAiB;AAC5B,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,+CAA+C;AAC/C,KAAK;AACL,wDAAwD;AACxD;AACA,GAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,iBAAiB;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,kBAAkB;AAClC;AACA,SAAS,YAAY;AACrB;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA,8BAA8B,iDAAiD;;AAE/E;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,cAAc,oBAAoB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA,0CAA0C;AAC1C;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,yDAAyD,KAAK;;AAE9D;AACA;AACA;AACA;AACA;AACA,+CAA+C,kBAAkB;AACjE;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,OAAO;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,gBAAgB,kBAAkB;AAClC;AACA;AACA,SAAS,6CAA6C;AACtD;;AAEA;AACA;AACA;AACA,kBAAkB,QAAQ;AAC1B,eAAe;AACf,CAAC;;AAED;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA,2BAA2B;AAC3B;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;;AAEA;AACA,sEAAsE;AACtE,oFAAoF;AACpF,wCAAwC,GAAG,sBAAsB;AACjE,+CAA+C;AAC/C,oEAAoE;AACpE,+CAA+C;;AAE/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA,yDAAyD;AACzD;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,8DAA8D,SAAS;AACvE;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,gDAAgD,2BAA2B,oBAAoB,EAAE;AACjG,gDAAgD,2BAA2B,6CAA6C,EAAE;AAC1H;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,oCAAoC,qBAAqB,GAAG,WAAW;AACvE,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,oCAAoC,WAAW,GAAG,mCAAmC;AACrF,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,gBAAgB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,yBAAyB;AAC3C,mBAAmB,qBAAqB;AACxC,gBAAgB,UAAU;AAC1B;AACA;AACA,SAAS,4BAA4B;AACrC;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,OAAO;AACp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;AACA;AACA,iEAAiE;AACjE;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,sDAAsD;AACjE,aAAa,sBAAsB;AACnC;AACA;AACA,mCAAmC;AACnC;AACA,4BAA4B,wBAAwB;AACpD;;AAEA;AACA;AACA;AACA;;AAEA;AACA,8DAA8D,EAAE;;AAEhE;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO,OAAO;AACd;AACA;AACA,KAAK;AACL;AACA,2CAA2C,GAAG;AAC9C;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA;;AAEA,2BAA2B,iBAAiB;AAC5C;AACA,+BAA+B,GAAG,EAAE,OAAO,4BAA4B,GAAG,EAAE,OAAO;AACnF;AACA;AACA,KAAK,2BAA2B;AAChC;AACA,KAAK,OAAO;AACZ;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA,sCAAsC,+CAA+C,MAAM,WAAW;AACtG;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,eAAe;AAC1B,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,uCAAuC;AAClD,aAAa,OAAO;AACpB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,2BAA2B,UAAU,EAAE;AACvC,6DAA6D,UAAU;AACvE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qBAAqB,uBAAuB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,eAAe;AAC1B,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,iBAAiB;AAC5B,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,4BAA4B;AACvC,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,4BAA4B;AACvC,WAAW,yBAAyB;AACpC,aAAa,gBAAgB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA,WAAW,4BAA4B;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,gBAAgB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,yBAAyB;AACpC,aAAa,gBAAgB;AAC7B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,gBAAgB,UAAU;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB;;AAEA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,wCAAwC;AACnD,aAAa,IAAI;AACjB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;AACA;AACA;AACA,SAAS,OAAO;;AAEhB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;AACA,SAAS,mBAAmB;AAC5B;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,gBAAgB,MAAM,sBAAsB,iBAAiB,+BAA+B,MAAM;AAClG;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA,oCAAoC;AACpC;;AAEA;;AAEA;AACA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;AACA,SAAS,+BAA+B;AACxC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,MAAM,IAAI,iBAAiB,YAAY,MAAM;AAC/D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB,MAAM,IAAI,iBAAiB,YAAY,MAAM,KAAK,iBAAiB;AACrF;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,sBAAsB,MAAM,IAAI,iBAAiB,YAAY,MAAM,KAAK,iBAAiB;AACzF;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,oBAAoB,MAAM,IAAI,iBAAiB,YAAY,MAAM,KAAK,iBAAiB;AACvF;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,oBAAoB,MAAM,IAAI,iBAAiB,YAAY,MAAM,KAAK,iBAAiB;AACvF;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;AACA,SAAS,iBAAiB;AAC1B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,IAAI;AACf,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;AACA,SAAS,wBAAwB;AACjC;AACA;;AAEA;;AAEA;AACA,kBAAkB,MAAM,IAAI,iBAAiB,IAAI,iBAAiB;AAClE;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,SAAS;AACT,2BAA2B,OAAO;AAClC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA,aAAa,kBAAkB;AAC/B;AACA,aAAa,OAAO;AACpB;AACA,aAAa,OAAO;AACpB;AACA,aAAa,OAAO;AACpB;AACA,aAAa,OAAO;AACpB;AACA,aAAa,OAAO;AACpB;AACA,aAAa,IAAI;AACjB;AACA,aAAa,OAAO;AACpB;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,aAAa,2BAA2B;AACxC;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,aAAa,sBAAsB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,YAAY;AACZ,aAAa;;AAEb;AACA;AACA;AACA;AACA,eAAe,wBAAwB;AACvC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,wBAAwB;AACvC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,IAAI;AACf,aAAa,sBAAsB;AACnC;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,aAAa,oBAAoB;AACjC;AACA;AACA;AACA;AACA;;AAEA,aAAa,oBAAoB;AACjC;AACA,kBAAkB;AAClB;;AAEA,iBAAiB,QAAQ;AACzB;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,eAAe,IAAI;AACnB;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,cAAc,sBAAsB;AACpC;AACA;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,YAAY,SAAS;AACrB;AACA;AACA,cAAc,aAAa,aAAa,aAAa,aAAa;AAClE;AACA;AACA;;AAEA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,QAAQ;AAC1C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,WAAW,iBAAiB;AAC5B,WAAW,OAAO;AAClB,aAAa,iBAAiB;AAC9B;AACA;AACA,qBAAqB;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,WAAW,iBAAiB;AAC5B,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,cAAc,IAAI;AAClB,4BAA4B,IAAI;AAChC;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,aAAa,sBAAsB;AACnC;AACA;AACA;AACA,eAAe;;AAEf;AACA;AACA;AACA,eAAe;AACf,KAAK;AACL,eAAe;AACf,KAAK;AACL;AACA,eAAe;AACf;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,SAAS;AACtB;AACA;AACA;AACA,aAAa,iBAAiB;AAC9B;AACA,aAAa,iBAAiB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,qBAAqB;AAChC,aAAa,wCAAwC;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,aAAa,mBAAmB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB;AAClB;AACA,uBAAuB;AACvB;;AAEA,iBAAiB,QAAQ;AACzB;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B,WAAW,eAAe;AAC1B,aAAa,kBAAkB;AAC/B;AACA;AACA,OAAO,QAAQ;AACf;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B,WAAW,eAAe;AAC1B,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B,YAAY,oBAAoB;AAChC;AACA;AACA,aAAa,oBAAoB;AACjC;AACA,aAAa,kBAAkB;AAC/B;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA,YAAY,sBAAsB;AAClC,YAAY,sBAAsB;AAClC,cAAc;AACd;AACA;AACA,SAAS,iBAAiB;AAC1B,SAAS,iBAAiB;AAC1B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,cAAc,IAAI;AAClB,4BAA4B,IAAI;AAChC;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,cAAc,sBAAsB;AACpC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA,YAAY;AACZ;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,mCAAmC,aAAa;;AAEhD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,cAAc,IAAI;AAClB,kCAAkC,IAAI;AACtC;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,sBAAsB;AACnC;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,eAAe;AACf,iBAAiB,OAAO;;AAExB;AACA,aAAa;AACb;;AAEA;AACA,iBAAiB,iBAAiB;AAClC;;AAEA,MAAM,OAAO;AACb,0BAA0B,OAAO;AACjC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA,cAAc,IAAI;AAClB,4BAA4B,IAAI;AAChC;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,cAAc,sBAAsB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU,IAAI;AACd;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,aAAa,sBAAsB;AACnC;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,eAAe;AACf,iBAAiB,OAAO;;AAExB;AACA,aAAa;AACb;;AAEA;AACA,iBAAiB,iBAAiB;AAClC;;AAEA,MAAM,OAAO;AACb,0BAA0B,OAAO;AACjC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA,gBAAgB,IAAI;AACpB;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,cAAc,sBAAsB,gBAAgB,IAAI;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,cAAc,IAAI;AAClB,4BAA4B,IAAI;AAChC;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,aAAa,sBAAsB;AACnC;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,eAAe;AACf,iBAAiB,OAAO;;AAExB;AACA,aAAa;AACb;;AAEA;AACA,iBAAiB,iBAAiB;AAClC;;AAEA,MAAM,OAAO;AACb,0BAA0B,OAAO;AACjC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA,cAAc,IAAI;AAClB;AACA,kCAAkC,IAAI;AACtC;AACA,WAAW,2BAA2B;AACtC,WAAW,QAAQ;AACnB,aAAa,sBAAsB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA,mCAAmC,QAAQ;AAC3C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,OAAO;AAClB,cAAc,sBAAsB,gBAAgB,KAAK;AACzD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,WAAW;AACtB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA,WAAW,WAAW;AACtB,WAAW,WAAW;AACtB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,WAAW;AACxB;AACA;AACA;AACA,iBAAiB,OAAO,UAAU;AAClC;AACA,mBAAmB,OAAO,UAAU;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,eAAe,EAAE;AACnC,eAAe;AACf,CAAC;;AAED;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA,yDAAyD,uCAAuC;AAChG;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,WAAW,kBAAkB;AAC7B,aAAa,0BAA0B;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,iBAAiB,aAAa;AAC9B;AACA;;AAEA;AACA,YAAY;AACZ,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA;;AAEA,oBAAoB,UAAU;AAC9B;;AAEA;AACA;AACA,WAAW,kBAAkB;AAC7B,WAAW,OAAO;AAClB,aAAa,kBAAkB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,iBAAiB,eAAe;AAChC;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,kBAAkB;AAC/B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,kBAAkB;AAC7B,WAAW,kBAAkB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,sBAAsB,cAAc;AACpC;;AAEA,mBAAmB,eAAe;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,mBAAmB;AAC9B,WAAW,OAAO;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,WAAW;AACtB,WAAW,OAAO;AAClB;AACA;AACA;AACA;;AAEA,iBAAiB,oBAAoB;AACrC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,kBAAkB;AAC7B,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,OAAO;AAClB,aAAa,kBAAkB;AAC/B;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM,sBAAsB;AAC5B,GAAG;AACH,mBAAmB,iBAAiB,IAAI,MAAM;AAC9C;;AAEA,aAAa,kBAAkB;AAC/B;;AAEA;AACA,mBAAmB,iBAAiB,IAAI,OAAO;AAC/C;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,oBAAoB;AACjC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,4BAA4B;AACvC,aAAa,mBAAmB;AAChC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,qBAAqB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;;AAEA;AACA;AACA,UAAU;AACV;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAE2B;;;;;;;;;;;;;AC7mJ3B;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;;;AAIA;AACA;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uC,kHAAkH,mBAAmB,uCAAuC,+BAA+B,wEAAwE,mCAAmC,sDAAsD,sCAAsC,4UAA4U,EAAE,SAAS,E;;;;;;;;;;;ACA3xO;;AAEA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;;AAEA;AACA;AACA,4CAA4C;;AAE5C","file":"default/js/promoBanner.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./cartridges/app_custom_basicfit/cartridge/client/default/js/promoBanner.js\");\n","import KUTE from 'kute.js';\nimport { getScreenSizeType } from '../util';\n\nconst isDesktop = getScreenSizeType().indexOf('desktop') > -1;\n\nfunction runCircleAnimationBackwards(outerCircleId, innerCircleId) {\n const el1 = document.querySelector(outerCircleId);\n const el2 = document.querySelector(innerCircleId);\n\n if (el1 && el2) {\n KUTE.fromTo(outerCircleId,\n { draw: '25% 100%', rotate: 45, opacity: 1 },\n { draw: '0% 25%', opacity: 1 },\n { easing: 'easingCubicInOut', yoyo: true, duration: 1500 }\n ).start();\n\n KUTE.fromTo(innerCircleId,\n { draw: '25% 100%' },\n { draw: '0% 25%' },\n { easing: 'easingCubicInOut', yoyo: true, duration: 1500 }\n ).start();\n }\n}\n\nfunction runCircleAnimationForwards(outerCircleId, innerCircleId) {\n const el1 = document.querySelector(outerCircleId);\n const el2 = document.querySelector(innerCircleId);\n\n if (el1 && el2) {\n KUTE.fromTo(outerCircleId,\n { draw: '0% 25%', rotate: 45, opacity: 1 },\n { draw: '25% 100%', opacity: 1 },\n { easing: 'easingCubicInOut', yoyo: true, duration: 1500 }\n ).start();\n\n KUTE.fromTo(innerCircleId,\n { draw: '0% 25%', opacity: 1 },\n { draw: '25% 100%', opacity: 1 },\n { easing: 'easingCubicInOut', yoyo: true, duration: 1500 }\n ).start();\n }\n}\n\nfunction runLineAnimationBackwards(id, animationTime = 1500) {\n const el = document.querySelector(id);\n\n if (el) {\n KUTE.fromTo(id,\n { draw: '100% 100%', opacity: 1 },\n { draw: '0% 100%', opacity: 1 },\n { easing: 'easingCubicInOut', yoyo: true, duration: animationTime }\n ).start();\n }\n}\n\nfunction runLineAnimationForwards(id, animationTime = 1500) {\n const el = document.querySelector(id);\n\n if (el) {\n KUTE.fromTo(id,\n { draw: '0% 25%', opacity: 1 },\n { draw: '0% 100%', opacity: 1 },\n { easing: 'easingCubicInOut', yoyo: true, duration: animationTime }\n ).start();\n }\n}\n\nfunction runLineAnimationBounce(id) {\n if (id) {\n KUTE.fromTo(id,\n { draw: '0% 100%' },\n { draw: '0% 25%' },\n { easing: 'easingCubicInOut', yoyo: true, duration: 1500 }\n ).start();\n }\n}\n\nfunction runLineAnimationBounceBack(id) {\n if (id) {\n KUTE.fromTo(id,\n { draw: '0% 25%', rotate: 45, opacity: 1 },\n { draw: '0% 100%', opacity: 1 },\n { easing: 'easingCubicInOut', yoyo: true, duration: 1500 }\n ).start();\n }\n}\n\nfunction lineScrollAnimation(lineId) {\n if (isDesktop && lineId) {\n // Get the id of the element and the length of \n const linePath = document.getElementById(lineId);\n const length = linePath.getTotalLength();\n\n // The start position of the drawing\n linePath.style.strokeDasharray = length;\n\n // Hide the line by offsetting dash. Remove this line to show the line before scroll draw\n linePath.style.strokeDashoffset = length;\n const scrollpercent = 1 - (document.body.scrollTop + document.documentElement.scrollTop) / (document.documentElement.scrollHeight - document.documentElement.clientHeight);\n\n const draw = length * scrollpercent;\n\n // Reverse the drawing (when scrolling upwards)\n linePath.style.strokeDashoffset = length - draw;\n }\n}\n\nfunction imageScrollAnimation(svgId) {\n if (isDesktop && svgId) {\n const animationBanner = document.querySelector('.line-animation-block').getBoundingClientRect();\n const animatedSvg = document.getElementById(svgId);\n const navigationHeight = document.querySelector('.main-navigation-wrapper').getBoundingClientRect().height;\n const devider = svgId.includes('loginbanner') ? 18 : 8;\n\n const maxHeight = (-animationBanner.height / devider) + 20; // added 20px for padding to avoid content overlap\n\n // if the banner scrolls out of the viewport, the image becomes sticky until the max sticky point is reached\n if (animationBanner.top <= navigationHeight && animationBanner.top > maxHeight) {\n animatedSvg.style.position = 'fixed';\n animatedSvg.style.top = navigationHeight;\n } else {\n animatedSvg.style.position = 'relative';\n animatedSvg.style.top = 'auto';\n\n if (animationBanner.top <= maxHeight) {\n animatedSvg.style.top = -maxHeight + navigationHeight;\n }\n }\n }\n}\n\nexport {\n runCircleAnimationBackwards,\n runCircleAnimationForwards,\n runLineAnimationBackwards,\n runLineAnimationForwards,\n runLineAnimationBounce,\n runLineAnimationBounceBack,\n lineScrollAnimation,\n imageScrollAnimation,\n};\n","import { runLineAnimationBackwards } from './animations/linesAnimations';\nimport { addClassWhenInViewport, isDOMElementInViewport } from './util';\n\nconst PromoBanner = (() => {\n let pathsVisible = false;\n let animationType;\n\n function isPathsVisible() {\n let svgChildren;\n\n if (animationType === 'Z-Lines') {\n svgChildren = document.getElementById('zLineAnimation_promobanner').childNodes;\n } else if (animationType === 'Z-Lines-Two') {\n svgChildren = document.getElementById('zLinesTwoAnimation_promobanner').childNodes;\n } else if (animationType === 'CurveAnimation') {\n svgChildren = document.getElementById('curveAnimation_promobanner').childNodes;\n }\n\n if (svgChildren !== undefined) {\n svgChildren.forEach(el => {\n if (el.style && el.style.opacity === '1') {\n pathsVisible = true;\n } else if (el.style && el.style.opacity === '0') {\n pathsVisible = false;\n }\n });\n }\n }\n\n function runAnimation() {\n const element = document.querySelector('.promo-banner');\n if (element) {\n animationType = document.querySelector('.promo-banner').dataset.animationtype;\n isPathsVisible();\n\n if (isDOMElementInViewport(element)) {\n if (animationType === 'Z-Lines' && !pathsVisible) {\n runLineAnimationBackwards('#zLine1_promobanner');\n runLineAnimationBackwards('#zLine2_promobanner');\n } else if (animationType === 'Z-Lines-Two' && !pathsVisible) {\n runLineAnimationBackwards('#zLine1Two_promobanner');\n runLineAnimationBackwards('#zLine2Two_promobanner');\n } else if (animationType === 'CurveAnimation' && !pathsVisible) {\n runLineAnimationBackwards('#curveLine1_promobanner');\n runLineAnimationBackwards('#curveLine2_promobanner');\n }\n }\n }\n }\n\n return {\n init() {\n runAnimation();\n window.addEventListener('scroll', runAnimation);\n addClassWhenInViewport('.page-wide-marquee', 'animate');\n },\n };\n})();\n\nexport default PromoBanner;\n","\nimport tingle from 'tingle.js';\nimport getYouTubeID from 'get-youtube-id';\nexport const smallDesktopMin = 1025;\nexport const mobileViewMax = 767;\nexport const tabletViewMin = 901;\nexport const tabletViewMax = 1024;\n\nfunction processInclude(include) {\n if (typeof include === 'function') {\n include();\n } else if (typeof include === 'object') {\n Object.keys(include).forEach((key) => {\n if (typeof include[key] === 'function') {\n include[key]();\n }\n });\n }\n}\n\n// Format name for ecommerce\nfunction formatName(product) {\n if (product.category === 'subscription') {\n product.name = `basic-fit ${product.name.toLowerCase()}`;\n } else {\n product.name = product.name.toLowerCase();\n }\n return product;\n}\n\nfunction getScreenSizeType() {\n const innerWidth = window.innerWidth;\n\n if (innerWidth <= mobileViewMax) {\n return ['mobile-pt'];\n } else if (innerWidth > mobileViewMax && innerWidth <= 900) {\n return ['mobile-ls', 'tablet-pt'];\n } else if (innerWidth > 900 && innerWidth <= tabletViewMax) {\n return ['tablet-ls'];\n } else if (innerWidth > tabletViewMax) {\n return ['desktop'];\n }\n}\n\n// Better in terms of modularity than getScreenSizeType()\nfunction getScreenSize(mediaQuery) {\n return window.matchMedia(mediaQuery).matches;\n}\n\n// Check if element is in viewport\n\nfunction isElementInViewport(element) {\n const rect = document.querySelector(element).getBoundingClientRect();\n const windowHeight = (window.innerHeight || document.documentElement.clientHeight);\n const windowWidth = (window.innerWidth || document.documentElement.clientWidth);\n const vertInView = (rect.top < windowHeight) && ((rect.top + rect.height) > 0);\n const horInView = (rect.left < windowWidth) && ((rect.left + rect.width) > 0);\n\n return (vertInView && horInView);\n}\n\nfunction isDOMElementInViewport(element) {\n const bounding = element.getBoundingClientRect();\n const windowHeight = (window.innerHeight || document.documentElement.clientHeight);\n const windowWidth = (window.innerWidth || document.documentElement.clientWidth);\n const vertInView = (bounding.top < windowHeight) && ((bounding.top + bounding.height) > 0);\n const horInView = (bounding.left < windowWidth) && ((bounding.left + bounding.width) > 0);\n\n return (vertInView && horInView);\n}\n\nfunction addClassWhenInViewport(element, className) {\n const $element = document.querySelector(element);\n\n if (document.querySelector(element)) {\n if (isElementInViewport(element)) {\n $element.classList.add(className);\n } else {\n $element.classList.remove(className);\n }\n }\n}\n\n/**\n* Prevents body scroll in a way that IOS accepts it as well\n* styles need to be written inline to work properly\n* the added class is for adressing nesting inheritance\n*/\n\nlet currentPageScrollPosition = 0;\n\nfunction scrollLock(onoff) {\n const $body = document.querySelector('body');\n\n if (onoff === 'on') {\n currentPageScrollPosition = window.scrollY;\n $body.classList.add('scroll-lock');\n $body.style.overflow = 'hidden';\n $body.style.position = 'fixed';\n $body.style.top = `-${currentPageScrollPosition}px`;\n $body.style.width = '100%';\n } else if (onoff === 'off') {\n $body.classList.remove('scroll-lock');\n $body.style.removeProperty('overflow');\n $body.style.removeProperty('position');\n $body.style.removeProperty('top');\n $body.style.removeProperty('width');\n window.scrollTo(0, currentPageScrollPosition);\n }\n}\n\n/**\n * Create an alert to display the error message\n * @param {Object} message - Error message to display\n */\nfunction createErrorNotification(message) {\n const errorHtml =\n `
\n \n ${message}\n
`;\n\n $('.error-messaging').append(errorHtml);\n}\n\nfunction appendToUrl(url, params) {\n let newUrl = url;\n\n if (params) {\n newUrl += (newUrl.indexOf('?') !== -1 ? '&' : '?') + Object.keys(params).map((key) => `${key}=${encodeURIComponent(params[key])}`).join('&');\n }\n\n return newUrl;\n}\n\nfunction openVideoInModal(videoUrl) {\n const videoId = getYouTubeID(videoUrl);\n\n const iframeVimeo = ``;\n\n const videoInModal = new tingle.modal({\n cssClass: ['modal-wrapper', 'modal-wrapper--video'],\n closeLabel: '',\n onClose() {\n this.destroy();\n },\n });\n\n videoInModal.setContent(iframeVimeo);\n videoInModal.open();\n}\n\nfunction scrollToAnchor(anchor, params = {}) {\n const defaultOptions = {\n headerElemHeight: params.headerElemHeight || 0,\n extraMargin: params.extraMargin || 0,\n duration: params.duration || 400,\n };\n const { headerElemHeight, extraMargin, duration } = defaultOptions;\n const scrollPos = parseInt($(anchor).offset().top - headerElemHeight - extraMargin);\n\n $('html, body').animate({\n scrollTop: scrollPos,\n }, duration);\n}\n\nfunction setEqualHeights (arrayItems, count) {\n if(arrayItems !== undefined && arrayItems.length > 0) {\n arrayItems.height('');\n\n var maxH = 0;\n\n if(count) {\n var arrays = [];\n while(arrayItems.length > 0) {\n arrays.push(arrayItems.splice(0, count));\n }\n\n for(var i = 0; i < arrays.length; i += 1) {\n var data = arrays[i];\n maxH = 0;\n for(var j = 0; j < data.length; j += 1) {\n var currentH = $(data[j]).outerHeight();\n if(currentH > maxH) {\n maxH = currentH;\n }\n }\n\n for(var k = 0; k < data.length; k += 1) {\n $(data[k]).css('height', maxH);\n }\n }\n } else {\n arrayItems.each(function() {\n var currentH2 = $(this).outerHeight();\n if(currentH2 > maxH) {\n maxH = currentH2;\n }\n });\n\n arrayItems.css('height', maxH);\n }\n }\n}\n\nfunction fontSizeReduced() {\n var pages = document.querySelectorAll('.page');\n var titleContainer = document.querySelector('.js-text-col');\n var fontReduceComponent = document.querySelectorAll('.js-font-component');\n\n pages.forEach((page) => {\n fontReduceComponent.forEach((component) => {\n if(component.offsetWidth > page.offsetWidth || component.offsetWidth > titleContainer.offsetWidth) {\n component.classList.add('font-smaller');\n }\n });\n });\n}\n\nfunction checkForContent(elements) {\n elements.forEach(function (item) {\n if(!item.hasChildNodes()) {\n item.remove();\n }\n });\n}\n\n/**\n * Checks if the email value entered is correct format\n * @param {string} email - email string to check if valid\n * @returns {boolean} Whether email is valid\n */\nfunction validateEmail(email) {\n var regex = /^[\\w.%+-]+@[\\w.-]+\\.[\\w]{2,6}$/;\n return regex.test(email);\n}\n\nfunction calculateTitleHeight() {\n const innerWidth = window.innerWidth;\n var heroBannerTitle = document.querySelector('.js-main-title-hero-wrapper');\n var heroBannerImg = document.querySelector('.js-hero-wrapper-content-img');\n\n if (heroBannerImg) {\n if (innerWidth < smallDesktopMin) {\n heroBannerImg.style.marginTop = heroBannerTitle.offsetHeight + 30 + 'px';\n }\n heroBannerImg.style.display = 'block';\n heroBannerImg.style.opacity = 1;\n } else {\n return;\n }\n}\n\nfunction openTabs(tabSelector, tabContentSelector) {\n const tab = tabSelector;\n const tabContent = tabContentSelector;\n\n function removeActive() {\n tab.forEach(function(element) {\n element.classList.remove('active');\n });\n\n tabContent.forEach(function(element) {\n element.style.display = 'none';\n });\n }\n\n tab.forEach(function(element) {\n element.addEventListener('click', function(e) {\n removeActive();\n\n let current = e.currentTarget;\n let currentID = e.currentTarget.getAttribute('data-id');\n let tabContent = document.getElementById(currentID);\n\n current.classList.add('active');\n tabContent.style.display = 'block';\n });\n });\n}\n\n//requires to define two hidden input fields that contains text for buttons\nfunction readMoreButton(content, arrayItems, btnText, btnLessText, btnClassName, num, readLess) {\n var readMoreBtn = document.createElement('button');\n\n readMoreBtn.innerHTML = btnText.value;\n readMoreBtn.classList.add(btnClassName);\n\n //elements that needs to be hidden\n arrayItems.forEach((item, index) => {\n //from which element to show read more button\n if(index > num) {\n item.classList.add('hidden');\n\n //where to append btn\n content.appendChild(readMoreBtn);\n\n //logic for read more/less button\n readMoreBtn.addEventListener('click', function() {\n if(!readLess) {\n item.classList.remove('hidden');\n this.style.display = 'none';\n } else {\n item.classList.toggle('hidden');\n }\n\n //changing text of the button\n if(item.classList.contains('hidden')) {\n this.innerHTML = btnText.value;\n } else {\n this.innerHTML = btnLessText.value;\n }\n });\n }\n });\n}\n\nfunction imageResizeiOSFix() {\n const $img = $('.js-hero-wrapper-content-img img');\n if ($img) {\n $img.addClass('resize-fix');\n }\n}\n\nfunction backToTop(element) {\n const $backToTop = element;\n\n $(window).on('scroll', function() {\n var $scrollPos = window.pageYOffset;\n\n // 100 = one scroll\n if ($scrollPos > 100) {\n $backToTop.addClass('show');\n } else {\n $backToTop.removeClass('show');\n }\n });\n\n $backToTop.on('click', function(e) {\n e.preventDefault();\n\n $('html, body').animate({\n scrollTop: 0\n }, 500);\n });\n}\n\nfunction customStickyPosition(stickyElement, elementOne, elementTwo, elementThree) {\n let stickyEl = stickyElement;\n let offSetOne = 0;\n let offSetTwo = 0;\n let offSetThree = 0;\n\n if(elementOne) {\n offSetOne += elementOne.offsetHeight;\n }\n\n if(elementTwo) {\n offSetTwo += elementTwo.offsetHeight;\n }\n\n if(elementThree) {\n offSetThree += elementThree.offsetHeight;\n }\n\n stickyEl.style.top = offSetOne + offSetTwo + offSetThree + 'px';\n}\n\nfunction dynamicCountdown() {\n $('.js-promotion-text').each(function() {\n //get minutes from each promotion\n let timeLeftSeconds = parseFloat($(this).text(), 10) * 60;\n\n let self = $(this);\n\n var timer = setInterval(function(){\n //get hours\n let hours = Math.floor(timeLeftSeconds / 3600);\n //get minutes\n let minutes = Math.floor((timeLeftSeconds - (hours * 3600)) / 60);\n //get seconds\n let seconds = timeLeftSeconds - (hours * 3600) - (minutes * 60);\n\n hours < 10 ? hours = '0' + hours : '';\n minutes < 10 ? minutes = '0' + minutes : '';\n seconds < 10 ? seconds = '0' + seconds : '';\n\n let remainingTime = hours + ':' + minutes + ':' + seconds;\n\n if(timeLeftSeconds <= 0){\n clearInterval(timer);\n }\n\n //when string concatenate pump text\n if (remainingTime) {\n //set remaining time to each label\n self.text(remainingTime);\n if(!$(\".discount-label__promotion\").hasClass(\"js-loaded\")) {\n $('.discount-label__promotion').addClass('js-loaded');\n $.spinner().stop();\n }\n }\n\n timeLeftSeconds -= 1;\n }, 1000);\n });\n}\n\n/**\n * @description Should be done before slider init to remove slides so we can use different number of slider assets per locale, for non sliders it should alse be removed at the beginning.\n * @param {jQuery} $Selector - selector of element that has childred to hide\n * @param {string} parentToRemoveSelector - selector of parent element that should be removed.\n */\nfunction removeHiddenAssets($Selector, parentToRemoveSelector) {\n if ($Selector.find('.js-remove-element')) {\n $Selector.find('.js-remove-element').closest(parentToRemoveSelector).remove();\n }\n}\n\nexport {\n processInclude,\n getScreenSizeType,\n isElementInViewport,\n isDOMElementInViewport,\n addClassWhenInViewport,\n appendToUrl,\n createErrorNotification,\n getScreenSize,\n openVideoInModal,\n scrollToAnchor,\n formatName,\n setEqualHeights,\n fontSizeReduced,\n calculateTitleHeight,\n validateEmail,\n openTabs,\n readMoreButton,\n checkForContent,\n backToTop,\n imageResizeiOSFix,\n customStickyPosition,\n dynamicCountdown,\n scrollLock,\n removeHiddenAssets,\n};\n","\n(function (root, factory) {\n if (typeof exports === 'object') {\n module.exports = factory();\n } else if (typeof define === 'function' && define.amd) {\n define(factory);\n } else {\n root.getYouTubeID = factory();\n }\n}(this, function (exports) {\n\n return function (url, opts) {\n if (opts == undefined) {\n opts = {fuzzy: true};\n }\n\n if (/youtu\\.?be/.test(url)) {\n\n // Look first for known patterns\n var i;\n var patterns = [\n /youtu\\.be\\/([^#\\&\\?]{11})/, // youtu.be/\n /\\?v=([^#\\&\\?]{11})/, // ?v=\n /\\&v=([^#\\&\\?]{11})/, // &v=\n /embed\\/([^#\\&\\?]{11})/, // embed/\n /\\/v\\/([^#\\&\\?]{11})/ // /v/\n ];\n\n // If any pattern matches, return the ID\n for (i = 0; i < patterns.length; ++i) {\n if (patterns[i].test(url)) {\n return patterns[i].exec(url)[1];\n }\n }\n\n if (opts.fuzzy) {\n // If that fails, break it apart by certain characters and look \n // for the 11 character key\n var tokens = url.split(/[\\/\\&\\?=#\\.\\s]/g);\n for (i = 0; i < tokens.length; ++i) {\n if (/^[^#\\&\\?]{11}$/.test(tokens[i])) {\n return tokens[i];\n }\n }\n }\n }\n\n return null;\n };\n\n}));\n","/*!\n* KUTE.js Standard v2.2.4 (http://thednp.github.io/kute.js)\n* Copyright 2015-2022 © thednp\n* Licensed under MIT (https://github.com/thednp/kute.js/blob/master/LICENSE)\n*/\n/**\r\n * Creates cubic-bezier easing functions for animation engines.\r\n * @see http://svn.webkit.org/repository/webkit/trunk/Source/WebCore/platform/graphics/UnitBezier.h\r\n * \r\n *\r\n * @class\r\n */\r\nclass CubicBezier {\r\n /**\r\n * @constructor\r\n * @param {number} x1 - first point horizontal position\r\n * @param {number} y1 - first point vertical position\r\n * @param {number} x2 - second point horizontal position\r\n * @param {number} y2 - second point vertical position\r\n * @param {string=} functionName - an optional function name\r\n * @returns {(t: number) => number} a new CubicBezier easing function\r\n */\r\n constructor(x1, y1, x2, y2, functionName) {\r\n // pre-calculate the polynomial coefficients\r\n // First and last control points are implied to be (0.0, 0.0) and (1.0, 1.0)\r\n const p1x = x1 || 0;\r\n const p1y = y1 || 0;\r\n const p2x = x2 || 1;\r\n const p2y = y2 || 1;\r\n \r\n /** @type {number} */\r\n this.cx = 3 * p1x;\r\n \r\n /** @type {number} */\r\n this.bx = 3 * (p2x - p1x) - this.cx;\r\n\r\n /** @type {number} */\r\n this.ax = 1 - this.cx - this.bx;\r\n \r\n /** @type {number} */\r\n this.cy = 3 * p1y;\r\n \r\n /** @type {number} */\r\n this.by = 3 * (p2y - p1y) - this.cy;\r\n \r\n /** @type {number} */\r\n this.ay = 1 - this.cy - this.by;\r\n \r\n /** @type {(t: number) => number} */\r\n const BezierEasing = (t) => this.sampleCurveY(this.solveCurveX(t));\r\n\r\n // this function needs a name\r\n Object.defineProperty(BezierEasing, 'name', { writable: true });\r\n BezierEasing.name = functionName || `cubic-bezier(${[p1x, p1y, p2x, p2y]})`;\r\n\r\n return BezierEasing;\r\n }\r\n\r\n /**\r\n * @param {number} t - progress [0-1]\r\n * @return {number} - sampled X value\r\n */\r\n sampleCurveX(t) {\r\n return ((this.ax * t + this.bx) * t + this.cx) * t;\r\n }\r\n\r\n /**\r\n * @param {number} t - progress [0-1]\r\n * @return {number} - sampled Y value\r\n */\r\n sampleCurveY(t) {\r\n return ((this.ay * t + this.by) * t + this.cy) * t;\r\n }\r\n\r\n /**\r\n * @param {number} t - progress [0-1]\r\n * @return {number} - sampled curve derivative X value\r\n */\r\n sampleCurveDerivativeX(t) {\r\n return (3 * this.ax * t + 2 * this.bx) * t + this.cx;\r\n }\r\n\r\n /**\r\n * @param {number} x - progress [0-1]\r\n * @return {number} - solved curve X value\r\n */\r\n solveCurveX(x) {\r\n // Set Precision\r\n const epsilon = 1e-6;\r\n\r\n // Skip values out of range\r\n if (x <= 0) return 0;\r\n if (x >= 1) return 1;\r\n\r\n let t2 = x;\r\n let x2 = 0;\r\n let d2 = 0;\r\n\r\n // First try a few iterations of Newton's method\r\n // -- usually very fast.\r\n for (let i = 0; i < 8; i += 1) {\r\n x2 = this.sampleCurveX(t2) - x;\r\n if (Math.abs(x2) < epsilon) return t2;\r\n d2 = this.sampleCurveDerivativeX(t2);\r\n /* istanbul ignore next */\r\n if (Math.abs(d2) < epsilon) break;\r\n t2 -= x2 / d2;\r\n }\r\n\r\n // No solution found - use bi-section\r\n let t0 = 0;\r\n let t1 = 1;\r\n t2 = x;\r\n\r\n while (t0 < t1) {\r\n x2 = this.sampleCurveX(t2);\r\n if (Math.abs(x2 - x) < epsilon) return t2;\r\n if (x > x2) t0 = t2;\r\n else t1 = t2;\r\n\r\n t2 = (t1 - t0) * 0.5 + t0;\r\n }\r\n\r\n // Give up\r\n /* istanbul ignore next */\r\n return t2;\r\n }\r\n}\n\nvar version$1 = \"1.0.1\";\n\n/**\r\n * A global namespace for library version.\r\n * @type {string}\r\n */\r\nconst Version$1 = version$1;\n\n/** @typedef {import('../types/index')} */\r\n\r\nObject.assign(CubicBezier, { Version: Version$1 });\n\n/**\n * The KUTE.js Execution Context\n */\nconst KEC = {};\n\nconst Tweens = [];\n\nlet gl0bal;\n\nif (typeof global !== 'undefined') gl0bal = global;\nelse if (typeof window !== 'undefined') gl0bal = window.self;\nelse gl0bal = {};\n\nconst globalObject = gl0bal;\n\n// KUTE.js INTERPOLATE FUNCTIONS\n// =============================\nconst interpolate = {};\n\n// schedule property specific function on animation start\n// link property update function to KUTE.js execution context\nconst onStart = {};\n\n// Include a performance.now polyfill.\n// source https://github.com/tweenjs/tween.js/blob/master/src/Now.ts\nlet performanceNow;\n\n// In node.js, use process.hrtime.\n// eslint-disable-next-line\n// @ts-ignore\r\nif (typeof self === 'undefined' && typeof process !== 'undefined' && process.hrtime) {\n performanceNow = () => {\n // eslint-disable-next-line\n\t\t// @ts-ignore\r\n const time = process.hrtime();\n\n // Convert [seconds, nanoseconds] to milliseconds.\n return time[0] * 1000 + time[1] / 1000000;\n };\n} else if (typeof self !== 'undefined' && self.performance !== undefined && self.performance.now !== undefined) {\n // In a browser, use self.performance.now if it is available.\n // This must be bound, because directly assigning this function\n // leads to an invocation exception in Chrome.\n performanceNow = self.performance.now.bind(self.performance);\n} else if (typeof Date !== 'undefined' && Date.now) {\n // Use Date.now if it is available.\n performanceNow = Date.now;\n} else {\n // Otherwise, use 'new Date().getTime()'.\n performanceNow = () => new Date().getTime();\n}\n\nconst now = performanceNow;\n\nconst Time = {};\nTime.now = now;\n\n// eslint-disable-next-line import/no-mutable-exports -- impossible to satisfy\nlet Tick = 0;\n\n/**\n *\n * @param {number | Date} time\n */\nconst Ticker = (time) => {\n let i = 0;\n while (i < Tweens.length) {\n if (Tweens[i].update(time)) {\n i += 1;\n } else {\n Tweens.splice(i, 1);\n }\n }\n Tick = requestAnimationFrame(Ticker);\n};\n\n// stop requesting animation frame\nfunction stop() {\n setTimeout(() => { // re-added for #81\n if (!Tweens.length && Tick) {\n cancelAnimationFrame(Tick);\n Tick = null;\n Object.keys(onStart).forEach((obj) => {\n if (typeof (onStart[obj]) === 'function') {\n if (KEC[obj]) delete KEC[obj];\n } else {\n Object.keys(onStart[obj]).forEach((prop) => {\n if (KEC[prop]) delete KEC[prop];\n });\n }\n });\n\n Object.keys(interpolate).forEach((i) => {\n if (KEC[i]) delete KEC[i];\n });\n }\n }, 64);\n}\n\n// render update functions\n// =======================\nconst Render = {\n Tick, Ticker, Tweens, Time,\n};\nObject.keys(Render).forEach((blob) => {\n if (!KEC[blob]) {\n KEC[blob] = blob === 'Time' ? Time.now : Render[blob];\n }\n});\n\nglobalObject._KUTE = KEC;\n\n// all supported properties\nconst supportedProperties = {};\n\nconst defaultValues = {};\n\nconst defaultOptions$1 = {\n duration: 700,\n delay: 0,\n easing: 'linear',\n repeat: 0,\n repeatDelay: 0,\n yoyo: false,\n resetStart: false,\n offset: 0,\n};\n\n// used in preparePropertiesObject\nconst prepareProperty = {};\n\n// check current property value when .to() method is used\nconst prepareStart = {};\n\n// checks for differences between the processed start and end values,\n// can be set to make sure start unit and end unit are same,\n// stack transforms, process SVG paths,\n// any type of post processing the component needs\nconst crossCheck = {};\n\n// schedule property specific function on animation complete\nconst onComplete = {};\n\n// link properties to interpolate functions\nconst linkProperty = {};\n\nconst Objects = {\n supportedProperties,\n defaultValues,\n defaultOptions: defaultOptions$1,\n prepareProperty,\n prepareStart,\n crossCheck,\n onStart,\n onComplete,\n linkProperty,\n};\n\n// util - a general object for utils like rgbToHex, processEasing\nconst Util = {};\n\n/**\n * KUTE.add(Tween)\n *\n * @param {KUTE.Tween} tw a new tween to add\n */\nconst add = (tw) => Tweens.push(tw);\n\n/**\n * KUTE.remove(Tween)\n *\n * @param {KUTE.Tween} tw a new tween to add\n */\nconst remove = (tw) => {\n const i = Tweens.indexOf(tw);\n if (i !== -1) Tweens.splice(i, 1);\n};\n\n/**\n * KUTE.add(Tween)\n *\n * @return {KUTE.Tween[]} tw a new tween to add\n */\nconst getAll = () => Tweens;\n\n/**\n * KUTE.removeAll()\n */\nconst removeAll = () => { Tweens.length = 0; };\n\n/**\n * linkInterpolation\n * @this {KUTE.Tween}\n */\nfunction linkInterpolation() { // DON'T change\n Object.keys(linkProperty).forEach((component) => {\n const componentLink = linkProperty[component];\n const componentProps = supportedProperties[component];\n\n Object.keys(componentLink).forEach((fnObj) => {\n if (typeof (componentLink[fnObj]) === 'function' // ATTR, colors, scroll, boxModel, borderRadius\n && Object.keys(this.valuesEnd).some((i) => (componentProps && componentProps.includes(i))\n || (i === 'attr' && Object.keys(this.valuesEnd[i]).some((j) => componentProps && componentProps.includes(j))))) {\n if (!KEC[fnObj]) KEC[fnObj] = componentLink[fnObj];\n } else {\n Object.keys(this.valuesEnd).forEach((prop) => {\n const propObject = this.valuesEnd[prop];\n if (propObject instanceof Object) {\n Object.keys(propObject).forEach((i) => {\n if (typeof (componentLink[i]) === 'function') { // transformCSS3\n if (!KEC[i]) KEC[i] = componentLink[i];\n } else {\n Object.keys(componentLink[fnObj]).forEach((j) => {\n if (componentLink[i] && typeof (componentLink[i][j]) === 'function') { // transformMatrix\n if (!KEC[j]) KEC[j] = componentLink[i][j];\n }\n });\n }\n });\n }\n });\n }\n });\n });\n}\n\nconst internals = {\n add,\n remove,\n getAll,\n removeAll,\n stop,\n linkInterpolation,\n};\n\n/**\n * getInlineStyle\n * Returns the transform style for element from\n * cssText. Used by for the `.to()` static method.\n *\n * @param {Element} el target element\n * @returns {object}\n */\nfunction getInlineStyle(el) {\n // if the scroll applies to `window` it returns as it has no styling\n if (!el.style) return false;\n // the cssText | the resulting transform object\n const css = el.style.cssText.replace(/\\s/g, '').split(';');\n const transformObject = {};\n const arrayFn = ['translate3d', 'translate', 'scale3d', 'skew'];\n\n css.forEach((cs) => {\n if (/transform/i.test(cs)) {\n // all transform properties\n const tps = cs.split(':')[1].split(')');\n tps.forEach((tpi) => {\n const tpv = tpi.split('(');\n const tp = tpv[0];\n // each transform property\n const tv = tpv[1];\n if (!/matrix/.test(tp)) {\n transformObject[tp] = arrayFn.includes(tp) ? tv.split(',') : tv;\n }\n });\n }\n });\n\n return transformObject;\n}\n\n/**\n * getStyleForProperty\n *\n * Returns the computed style property for element for .to() method.\n * Used by for the `.to()` static method.\n *\n * @param {Element} elem\n * @param {string} propertyName\n * @returns {string}\n */\nfunction getStyleForProperty(elem, propertyName) {\n let result = defaultValues[propertyName];\n const styleAttribute = elem.style;\n const computedStyle = getComputedStyle(elem) || elem.currentStyle;\n const styleValue = styleAttribute[propertyName] && !/auto|initial|none|unset/.test(styleAttribute[propertyName])\n ? styleAttribute[propertyName]\n : computedStyle[propertyName];\n\n if (propertyName !== 'transform' && (propertyName in computedStyle || propertyName in styleAttribute)) {\n result = styleValue;\n }\n\n return result;\n}\n\n/**\n * prepareObject\n *\n * Returns all processed valuesStart / valuesEnd.\n *\n * @param {Element} obj the values start/end object\n * @param {string} fn toggles between the two\n */\nfunction prepareObject(obj, fn) { // this, props object, type: start/end\n const propertiesObject = fn === 'start' ? this.valuesStart : this.valuesEnd;\n\n Object.keys(prepareProperty).forEach((component) => {\n const prepareComponent = prepareProperty[component];\n const supportComponent = supportedProperties[component];\n\n Object.keys(prepareComponent).forEach((tweenCategory) => {\n const transformObject = {};\n\n Object.keys(obj).forEach((tweenProp) => {\n // scroll, opacity, other components\n if (defaultValues[tweenProp] && prepareComponent[tweenProp]) {\n propertiesObject[tweenProp] = prepareComponent[tweenProp]\n .call(this, tweenProp, obj[tweenProp]);\n\n // transform\n } else if (!defaultValues[tweenCategory] && tweenCategory === 'transform'\n && supportComponent.includes(tweenProp)) {\n transformObject[tweenProp] = obj[tweenProp];\n\n // allow transformFunctions to work with preprocessed input values\n } else if (!defaultValues[tweenProp] && tweenProp === 'transform') {\n propertiesObject[tweenProp] = obj[tweenProp];\n\n // colors, boxModel, category\n } else if (!defaultValues[tweenCategory]\n && supportComponent && supportComponent.includes(tweenProp)) {\n propertiesObject[tweenProp] = prepareComponent[tweenCategory]\n .call(this, tweenProp, obj[tweenProp]);\n }\n });\n\n // we filter out older browsers by checking Object.keys\n if (Object.keys(transformObject).length) {\n propertiesObject[tweenCategory] = prepareComponent[tweenCategory]\n .call(this, tweenCategory, transformObject);\n }\n });\n });\n}\n\n/**\n * getStartValues\n *\n * Returns the start values for to() method.\n * Used by for the `.to()` static method.\n *\n * @this {KUTE.Tween} the tween instance\n */\nfunction getStartValues() {\n const startValues = {};\n const currentStyle = getInlineStyle(this.element);\n\n Object.keys(this.valuesStart).forEach((tweenProp) => {\n Object.keys(prepareStart).forEach((component) => {\n const componentStart = prepareStart[component];\n\n Object.keys(componentStart).forEach((tweenCategory) => {\n // clip, opacity, scroll\n if (tweenCategory === tweenProp && componentStart[tweenProp]) {\n startValues[tweenProp] = componentStart[tweenCategory]\n .call(this, tweenProp, this.valuesStart[tweenProp]);\n // find in an array of properties\n } else if (supportedProperties[component]\n && supportedProperties[component].includes(tweenProp)) {\n startValues[tweenProp] = componentStart[tweenCategory]\n .call(this, tweenProp, this.valuesStart[tweenProp]);\n }\n });\n });\n });\n\n // stack transformCSS props for .to() chains\n // also add to startValues values from previous tweens\n Object.keys(currentStyle).forEach((current) => {\n if (!(current in this.valuesStart)) {\n startValues[current] = currentStyle[current] || defaultValues[current];\n }\n });\n\n this.valuesStart = {};\n prepareObject.call(this, startValues, 'start');\n}\n\nvar Process = {\n getInlineStyle,\n getStyleForProperty,\n getStartValues,\n prepareObject,\n};\n\nconst connect = {};\n/** @type {KUTE.TweenBase | KUTE.Tween | KUTE.TweenExtra} */\nconnect.tween = null;\nconnect.processEasing = null;\n\nconst Easing = {\n linear: new CubicBezier(0, 0, 1, 1, 'linear'),\n easingSinusoidalIn: new CubicBezier(0.47, 0, 0.745, 0.715, 'easingSinusoidalIn'),\n easingSinusoidalOut: new CubicBezier(0.39, 0.575, 0.565, 1, 'easingSinusoidalOut'),\n easingSinusoidalInOut: new CubicBezier(0.445, 0.05, 0.55, 0.95, 'easingSinusoidalInOut'),\n\n easingQuadraticIn: new CubicBezier(0.550, 0.085, 0.680, 0.530, 'easingQuadraticIn'),\n easingQuadraticOut: new CubicBezier(0.250, 0.460, 0.450, 0.940, 'easingQuadraticOut'),\n easingQuadraticInOut: new CubicBezier(0.455, 0.030, 0.515, 0.955, 'easingQuadraticInOut'),\n\n easingCubicIn: new CubicBezier(0.55, 0.055, 0.675, 0.19, 'easingCubicIn'),\n easingCubicOut: new CubicBezier(0.215, 0.61, 0.355, 1, 'easingCubicOut'),\n easingCubicInOut: new CubicBezier(0.645, 0.045, 0.355, 1, 'easingCubicInOut'),\n\n easingQuarticIn: new CubicBezier(0.895, 0.03, 0.685, 0.22, 'easingQuarticIn'),\n easingQuarticOut: new CubicBezier(0.165, 0.84, 0.44, 1, 'easingQuarticOut'),\n easingQuarticInOut: new CubicBezier(0.77, 0, 0.175, 1, 'easingQuarticInOut'),\n\n easingQuinticIn: new CubicBezier(0.755, 0.05, 0.855, 0.06, 'easingQuinticIn'),\n easingQuinticOut: new CubicBezier(0.23, 1, 0.32, 1, 'easingQuinticOut'),\n easingQuinticInOut: new CubicBezier(0.86, 0, 0.07, 1, 'easingQuinticInOut'),\n\n easingExponentialIn: new CubicBezier(0.95, 0.05, 0.795, 0.035, 'easingExponentialIn'),\n easingExponentialOut: new CubicBezier(0.19, 1, 0.22, 1, 'easingExponentialOut'),\n easingExponentialInOut: new CubicBezier(1, 0, 0, 1, 'easingExponentialInOut'),\n\n easingCircularIn: new CubicBezier(0.6, 0.04, 0.98, 0.335, 'easingCircularIn'),\n easingCircularOut: new CubicBezier(0.075, 0.82, 0.165, 1, 'easingCircularOut'),\n easingCircularInOut: new CubicBezier(0.785, 0.135, 0.15, 0.86, 'easingCircularInOut'),\n\n easingBackIn: new CubicBezier(0.6, -0.28, 0.735, 0.045, 'easingBackIn'),\n easingBackOut: new CubicBezier(0.175, 0.885, 0.32, 1.275, 'easingBackOut'),\n easingBackInOut: new CubicBezier(0.68, -0.55, 0.265, 1.55, 'easingBackInOut'),\n};\n\n/**\n * Returns a valid `easingFunction`.\n *\n * @param {KUTE.easingFunction | string} fn function name or constructor name\n * @returns {KUTE.easingFunction} a valid easingfunction\n */\nfunction processBezierEasing(fn) {\n if (typeof fn === 'function') {\n return fn;\n } if (typeof (Easing[fn]) === 'function') {\n return Easing[fn];\n } if (/bezier/.test(fn)) {\n const bz = fn.replace(/bezier|\\s|\\(|\\)/g, '').split(',');\n return new CubicBezier(bz[0] * 1, bz[1] * 1, bz[2] * 1, bz[3] * 1); // bezier easing\n }\n // if (/elastic|bounce/i.test(fn)) {\n // throw TypeError(`KUTE - CubicBezier doesn't support ${fn} easing.`);\n // }\n return Easing.linear;\n}\n\nconnect.processEasing = processBezierEasing;\n\n/**\n * selector\n *\n * A selector utility for KUTE.js.\n *\n * @param {KUTE.selectorType} el target(s) or string selector\n * @param {boolean | number} multi when true returns an array/collection of elements\n * @returns {Element | Element[] | null}\n */\nfunction selector(el, multi) {\n try {\n let requestedElem;\n let itemsArray;\n if (multi) {\n itemsArray = el instanceof Array && el.every((x) => x instanceof Element);\n requestedElem = el instanceof HTMLCollection || el instanceof NodeList || itemsArray\n ? el : document.querySelectorAll(el);\n } else {\n requestedElem = el instanceof Element || el === window // scroll\n ? el : document.querySelector(el);\n }\n return requestedElem;\n } catch (e) {\n throw TypeError(`KUTE.js - Element(s) not found: ${el}.`);\n }\n}\n\nfunction queueStart() {\n // fire onStart actions\n Object.keys(onStart).forEach((obj) => {\n if (typeof (onStart[obj]) === 'function') {\n onStart[obj].call(this, obj); // easing functions\n } else {\n Object.keys(onStart[obj]).forEach((prop) => {\n onStart[obj][prop].call(this, prop);\n });\n }\n });\n\n // add interpolations\n linkInterpolation.call(this);\n}\n\n/**\n * The `TweenBase` constructor creates a new `Tween` object\n * for a single `HTMLElement` and returns it.\n *\n * `TweenBase` is meant to be used with pre-processed values.\n */\nclass TweenBase {\n /**\n * @param {Element} targetElement the target element\n * @param {KUTE.tweenProps} startObject the start values\n * @param {KUTE.tweenProps} endObject the end values\n * @param {KUTE.tweenOptions} opsObject the end values\n * @returns {TweenBase} the resulting Tween object\n */\n constructor(targetElement, startObject, endObject, opsObject) {\n // element animation is applied to\n this.element = targetElement;\n\n /** @type {boolean} */\n this.playing = false;\n /** @type {number?} */\n this._startTime = null;\n /** @type {boolean} */\n this._startFired = false;\n\n // type is set via KUTE.tweenProps\n this.valuesEnd = endObject;\n this.valuesStart = startObject;\n\n // OPTIONS\n const options = opsObject || {};\n // internal option to process inline/computed style at start instead of init\n // used by to() method and expects object : {} / false\n this._resetStart = options.resetStart || 0;\n // you can only set a core easing function as default\n /** @type {KUTE.easingOption} */\n this._easing = typeof (options.easing) === 'function' ? options.easing : connect.processEasing(options.easing);\n /** @type {number} */\n this._duration = options.duration || defaultOptions$1.duration; // duration option | default\n /** @type {number} */\n this._delay = options.delay || defaultOptions$1.delay; // delay option | default\n\n // set other options\n Object.keys(options).forEach((op) => {\n const internalOption = `_${op}`;\n if (!(internalOption in this)) this[internalOption] = options[op];\n });\n\n // callbacks should not be set as undefined\n // this._onStart = options.onStart\n // this._onUpdate = options.onUpdate\n // this._onStop = options.onStop\n // this._onComplete = options.onComplete\n\n // queue the easing\n const easingFnName = this._easing.name;\n if (!onStart[easingFnName]) {\n onStart[easingFnName] = function easingFn(prop) {\n if (!KEC[prop] && prop === this._easing.name) KEC[prop] = this._easing;\n };\n }\n\n return this;\n }\n\n /**\n * Starts tweening\n * @param {number?} time the tween start time\n * @returns {TweenBase} this instance\n */\n start(time) {\n // now it's a good time to start\n add(this);\n this.playing = true;\n\n this._startTime = typeof time !== 'undefined' ? time : KEC.Time();\n this._startTime += this._delay;\n\n if (!this._startFired) {\n if (this._onStart) {\n this._onStart.call(this);\n }\n\n queueStart.call(this);\n\n this._startFired = true;\n }\n\n if (!Tick) Ticker();\n return this;\n }\n\n /**\n * Stops tweening\n * @returns {TweenBase} this instance\n */\n stop() {\n if (this.playing) {\n remove(this);\n this.playing = false;\n\n if (this._onStop) {\n this._onStop.call(this);\n }\n this.close();\n }\n return this;\n }\n\n /**\n * Trigger internal completion callbacks.\n */\n close() {\n // scroll|transformMatrix need this\n Object.keys(onComplete).forEach((component) => {\n Object.keys(onComplete[component]).forEach((toClose) => {\n onComplete[component][toClose].call(this, toClose);\n });\n });\n // when all animations are finished, stop ticking after ~3 frames\n this._startFired = false;\n stop.call(this);\n }\n\n /**\n * Schedule another tween instance to start once this one completes.\n * @param {KUTE.chainOption} args the tween animation start time\n * @returns {TweenBase} this instance\n */\n chain(args) {\n this._chain = [];\n this._chain = args.length ? args : this._chain.concat(args);\n return this;\n }\n\n /**\n * Stop tweening the chained tween instances.\n */\n stopChainedTweens() {\n if (this._chain && this._chain.length) this._chain.forEach((tw) => tw.stop());\n }\n\n /**\n * Update the tween on each tick.\n * @param {number} time the tick time\n * @returns {boolean} this instance\n */\n update(time) {\n const T = time !== undefined ? time : KEC.Time();\n\n let elapsed;\n\n if (T < this._startTime && this.playing) { return true; }\n\n elapsed = (T - this._startTime) / this._duration;\n elapsed = (this._duration === 0 || elapsed > 1) ? 1 : elapsed;\n\n // calculate progress\n const progress = this._easing(elapsed);\n\n // render the update\n Object.keys(this.valuesEnd).forEach((tweenProp) => {\n KEC[tweenProp](this.element,\n this.valuesStart[tweenProp],\n this.valuesEnd[tweenProp],\n progress);\n });\n\n // fire the updateCallback\n if (this._onUpdate) {\n this._onUpdate.call(this);\n }\n\n if (elapsed === 1) {\n // fire the complete callback\n if (this._onComplete) {\n this._onComplete.call(this);\n }\n\n // now we're sure no animation is running\n this.playing = false;\n\n // stop ticking when finished\n this.close();\n\n // start animating chained tweens\n if (this._chain !== undefined && this._chain.length) {\n this._chain.map((tw) => tw.start());\n }\n\n return false;\n }\n\n return true;\n }\n}\n\n// Update Tween Interface\nconnect.tween = TweenBase;\n\n/**\n * The `KUTE.Tween()` constructor creates a new `Tween` object\n * for a single `HTMLElement` and returns it.\n *\n * This constructor adds additional functionality and is the default\n * Tween object constructor in KUTE.js.\n */\nclass Tween extends TweenBase {\n /**\n * @param {KUTE.tweenParams} args (*target*, *startValues*, *endValues*, *options*)\n * @returns {Tween} the resulting Tween object\n */\n constructor(...args) {\n super(...args); // this calls the constructor of TweenBase\n\n // reset interpolation values\n this.valuesStart = {};\n this.valuesEnd = {};\n\n // const startObject = args[1];\n // const endObject = args[2];\n const [startObject, endObject, options] = args.slice(1);\n\n // set valuesEnd\n prepareObject.call(this, endObject, 'end');\n\n // set valuesStart\n if (this._resetStart) {\n this.valuesStart = startObject;\n } else {\n prepareObject.call(this, startObject, 'start');\n }\n\n // ready for crossCheck\n if (!this._resetStart) {\n Object.keys(crossCheck).forEach((component) => {\n Object.keys(crossCheck[component]).forEach((checkProp) => {\n crossCheck[component][checkProp].call(this, checkProp);\n });\n });\n }\n\n // set paused state\n /** @type {boolean} */\n this.paused = false;\n /** @type {number?} */\n this._pauseTime = null;\n\n // additional properties and options\n /** @type {number?} */\n this._repeat = options.repeat || defaultOptions$1.repeat;\n /** @type {number?} */\n this._repeatDelay = options.repeatDelay || defaultOptions$1.repeatDelay;\n // we cache the number of repeats to be able to put it back after all cycles finish\n /** @type {number?} */\n this._repeatOption = this._repeat;\n\n // yoyo needs at least repeat: 1\n /** @type {KUTE.tweenProps} */\n this.valuesRepeat = {}; // valuesRepeat\n /** @type {boolean} */\n this._yoyo = options.yoyo || defaultOptions$1.yoyo;\n /** @type {boolean} */\n this._reversed = false;\n\n // don't load extra callbacks\n // this._onPause = options.onPause || defaultOptions.onPause\n // this._onResume = options.onResume || defaultOptions.onResume\n\n // chained Tweens\n // this._chain = options.chain || defaultOptions.chain;\n return this;\n }\n\n /**\n * Starts tweening, extended method\n * @param {number?} time the tween start time\n * @returns {Tween} this instance\n */\n start(time) {\n // on start we reprocess the valuesStart for TO() method\n if (this._resetStart) {\n this.valuesStart = this._resetStart;\n getStartValues.call(this);\n\n // this is where we do the valuesStart and valuesEnd check for fromTo() method\n Object.keys(crossCheck).forEach((component) => {\n Object.keys(crossCheck[component]).forEach((checkProp) => {\n crossCheck[component][checkProp].call(this, checkProp);\n });\n });\n }\n // still not paused\n this.paused = false;\n\n // set yoyo values\n if (this._yoyo) {\n Object.keys(this.valuesEnd).forEach((endProp) => {\n this.valuesRepeat[endProp] = this.valuesStart[endProp];\n });\n }\n\n super.start(time);\n\n return this;\n }\n\n /**\n * Stops tweening, extended method\n * @returns {Tween} this instance\n */\n stop() {\n super.stop();\n if (!this.paused && this.playing) {\n this.paused = false;\n this.stopChainedTweens();\n }\n return this;\n }\n\n /**\n * Trigger internal completion callbacks.\n */\n close() {\n super.close();\n\n if (this._repeatOption > 0) {\n this._repeat = this._repeatOption;\n }\n if (this._yoyo && this._reversed === true) {\n this.reverse();\n this._reversed = false;\n }\n\n return this;\n }\n\n /**\n * Resume tweening\n * @returns {Tween} this instance\n */\n resume() {\n if (this.paused && this.playing) {\n this.paused = false;\n if (this._onResume !== undefined) {\n this._onResume.call(this);\n }\n // re-queue execution context\n queueStart.call(this);\n // update time and let it roll\n this._startTime += KEC.Time() - this._pauseTime;\n add(this);\n // restart ticker if stopped\n if (!Tick) Ticker();\n }\n return this;\n }\n\n /**\n * Pause tweening\n * @returns {Tween} this instance\n */\n pause() {\n if (!this.paused && this.playing) {\n remove(this);\n this.paused = true;\n this._pauseTime = KEC.Time();\n if (this._onPause !== undefined) {\n this._onPause.call(this);\n }\n }\n return this;\n }\n\n /**\n * Reverses start values with end values\n */\n reverse() {\n Object.keys(this.valuesEnd).forEach((reverseProp) => {\n const tmp = this.valuesRepeat[reverseProp];\n this.valuesRepeat[reverseProp] = this.valuesEnd[reverseProp];\n this.valuesEnd[reverseProp] = tmp;\n this.valuesStart[reverseProp] = this.valuesRepeat[reverseProp];\n });\n }\n\n /**\n * Update the tween on each tick.\n * @param {number} time the tick time\n * @returns {boolean} this instance\n */\n update(time) {\n const T = time !== undefined ? time : KEC.Time();\n\n let elapsed;\n\n if (T < this._startTime && this.playing) { return true; }\n\n elapsed = (T - this._startTime) / this._duration;\n elapsed = (this._duration === 0 || elapsed > 1) ? 1 : elapsed;\n\n // calculate progress\n const progress = this._easing(elapsed);\n\n // render the update\n Object.keys(this.valuesEnd).forEach((tweenProp) => {\n KEC[tweenProp](this.element,\n this.valuesStart[tweenProp],\n this.valuesEnd[tweenProp],\n progress);\n });\n\n // fire the updateCallback\n if (this._onUpdate) {\n this._onUpdate.call(this);\n }\n\n if (elapsed === 1) {\n if (this._repeat > 0) {\n if (Number.isFinite(this._repeat)) this._repeat -= 1;\n\n // set the right time for delay\n this._startTime = T;\n if (Number.isFinite(this._repeat) && this._yoyo && !this._reversed) {\n this._startTime += this._repeatDelay;\n }\n\n if (this._yoyo) { // handle yoyo\n this._reversed = !this._reversed;\n this.reverse();\n }\n\n return true;\n }\n\n // fire the complete callback\n if (this._onComplete) {\n this._onComplete.call(this);\n }\n\n // now we're sure no animation is running\n this.playing = false;\n\n // stop ticking when finished\n this.close();\n\n // start animating chained tweens\n if (this._chain !== undefined && this._chain.length) {\n this._chain.forEach((tw) => tw.start());\n }\n\n return false;\n }\n return true;\n }\n}\n\n// Update Tween Interface Update\nconnect.tween = Tween;\n\n/**\n * The static method creates a new `Tween` object for each `HTMLElement`\n * from and `Array`, `HTMLCollection` or `NodeList`.\n */\nclass TweenCollection {\n /**\n *\n * @param {Element[] | HTMLCollection | NodeList} els target elements\n * @param {KUTE.tweenProps} vS the start values\n * @param {KUTE.tweenProps} vE the end values\n * @param {KUTE.tweenOptions} Options tween options\n * @returns {TweenCollection} the Tween object collection\n */\n constructor(els, vS, vE, Options) {\n const TweenConstructor = connect.tween;\n /** @type {KUTE.twCollection[]} */\n this.tweens = [];\n\n const Ops = Options || {};\n /** @type {number?} */\n Ops.delay = Ops.delay || defaultOptions$1.delay;\n\n // set all options\n const options = [];\n\n Array.from(els).forEach((el, i) => {\n options[i] = Ops || {};\n options[i].delay = i > 0 ? Ops.delay + (Ops.offset || defaultOptions$1.offset) : Ops.delay;\n if (el instanceof Element) {\n this.tweens.push(new TweenConstructor(el, vS, vE, options[i]));\n } else {\n throw Error(`KUTE - ${el} is not instanceof Element`);\n }\n });\n\n /** @type {number?} */\n this.length = this.tweens.length;\n return this;\n }\n\n /**\n * Starts tweening, all targets\n * @param {number?} time the tween start time\n * @returns {TweenCollection} this instance\n */\n start(time) {\n const T = time === undefined ? KEC.Time() : time;\n this.tweens.map((tween) => tween.start(T));\n return this;\n }\n\n /**\n * Stops tweening, all targets and their chains\n * @returns {TweenCollection} this instance\n */\n stop() {\n this.tweens.map((tween) => tween.stop());\n return this;\n }\n\n /**\n * Pause tweening, all targets\n * @returns {TweenCollection} this instance\n */\n pause() {\n this.tweens.map((tween) => tween.pause());\n return this;\n }\n\n /**\n * Resume tweening, all targets\n * @returns {TweenCollection} this instance\n */\n resume() {\n this.tweens.map((tween) => tween.resume());\n return this;\n }\n\n /**\n * Schedule another tween or collection to start after\n * this one is complete.\n * @param {number?} args the tween start time\n * @returns {TweenCollection} this instance\n */\n chain(args) {\n const lastTween = this.tweens[this.length - 1];\n if (args instanceof TweenCollection) {\n lastTween.chain(args.tweens);\n } else if (args instanceof connect.tween) {\n lastTween.chain(args);\n } else {\n throw new TypeError('KUTE.js - invalid chain value');\n }\n return this;\n }\n\n /**\n * Check if any tween instance is playing\n * @param {number?} time the tween start time\n * @returns {TweenCollection} this instance\n */\n playing() {\n return this.tweens.some((tw) => tw.playing);\n }\n\n /**\n * Remove all tweens in the collection\n */\n removeTweens() {\n this.tweens = [];\n }\n\n /**\n * Returns the maximum animation duration\n * @returns {number} this instance\n */\n getMaxDuration() {\n const durations = [];\n this.tweens.forEach((tw) => {\n durations.push(tw._duration + tw._delay + tw._repeat * tw._repeatDelay);\n });\n return Math.max(durations);\n }\n}\n\nconst { tween: TweenConstructor$1 } = connect;\n\n/**\n * The `KUTE.to()` static method returns a new Tween object\n * for a single `HTMLElement` at its current state.\n *\n * @param {Element} element target element\n * @param {KUTE.tweenProps} endObject\n * @param {KUTE.tweenOptions} optionsObj tween options\n * @returns {KUTE.Tween} the resulting Tween object\n */\nfunction to(element, endObject, optionsObj) {\n const options = optionsObj || {};\n options.resetStart = endObject;\n return new TweenConstructor$1(selector(element), endObject, endObject, options);\n}\n\nconst { tween: TweenConstructor } = connect;\n\n/**\n * The `KUTE.fromTo()` static method returns a new Tween object\n * for a single `HTMLElement` at a given state.\n *\n * @param {Element} element target element\n * @param {KUTE.tweenProps} startObject\n * @param {KUTE.tweenProps} endObject\n * @param {KUTE.tweenOptions} optionsObj tween options\n * @returns {KUTE.Tween} the resulting Tween object\n */\nfunction fromTo(element, startObject, endObject, optionsObj) {\n const options = optionsObj || {};\n return new TweenConstructor(selector(element), startObject, endObject, options);\n}\n\n/**\n * The `KUTE.allTo()` static method creates a new Tween object\n * for multiple `HTMLElement`s, `HTMLCollection` or `NodeListat`\n * at their current state.\n *\n * @param {Element[] | HTMLCollection | NodeList} elements target elements\n * @param {KUTE.tweenProps} endObject\n * @param {KUTE.tweenProps} optionsObj progress\n * @returns {TweenCollection} the Tween object collection\n */\nfunction allTo(elements, endObject, optionsObj) {\n const options = optionsObj || {};\n options.resetStart = endObject;\n return new TweenCollection(selector(elements, true), endObject, endObject, options);\n}\n\n/**\n * The `KUTE.allFromTo()` static method creates a new Tween object\n * for multiple `HTMLElement`s, `HTMLCollection` or `NodeListat`\n * at a given state.\n *\n * @param {Element[] | HTMLCollection | NodeList} elements target elements\n * @param {KUTE.tweenProps} startObject\n * @param {KUTE.tweenProps} endObject\n * @param {KUTE.tweenOptions} optionsObj tween options\n * @returns {TweenCollection} the Tween object collection\n */\nfunction allFromTo(elements, startObject, endObject, optionsObj) {\n const options = optionsObj || {};\n return new TweenCollection(selector(elements, true), startObject, endObject, options);\n}\n\n/**\n * Animation Class\n *\n * Registers components by populating KUTE.js objects and makes sure\n * no duplicate component / property is allowed.\n */\nclass Animation {\n /**\n * @constructor\n * @param {KUTE.fullComponent} Component\n */\n constructor(Component) {\n try {\n if (Component.component in supportedProperties) {\n throw Error(`KUTE - ${Component.component} already registered`);\n } else if (Component.property in defaultValues) {\n throw Error(`KUTE - ${Component.property} already registered`);\n }\n } catch (e) {\n throw Error(e);\n }\n\n const propertyInfo = this;\n const ComponentName = Component.component;\n // const Objects = { defaultValues, defaultOptions, Interpolate, linkProperty, Util }\n const Functions = {\n prepareProperty, prepareStart, onStart, onComplete, crossCheck,\n };\n const Category = Component.category;\n const Property = Component.property;\n const Length = (Component.properties && Component.properties.length)\n || (Component.subProperties && Component.subProperties.length);\n\n // single property\n // {property,defaultvalue,defaultOptions,Interpolate,functions}\n\n // category colors, boxModel, borderRadius\n // {category,properties,defaultvalues,defaultOptions,Interpolate,functions}\n\n // property with multiple sub properties. Eg transform, filter\n // {property,subProperties,defaultvalues,defaultOptions,Interpolate,functions}\n\n // property with multiple sub properties. Eg htmlAttributes\n // {category,subProperties,defaultvalues,defaultOptions,Interpolate,functions}\n\n // set supported category/property\n supportedProperties[ComponentName] = Component.properties\n || Component.subProperties || Component.property;\n\n // set defaultValues\n if ('defaultValue' in Component) { // value 0 will invalidate\n defaultValues[Property] = Component.defaultValue;\n\n // minimal info\n propertyInfo.supports = `${Property} property`;\n } else if (Component.defaultValues) {\n Object.keys(Component.defaultValues).forEach((dv) => {\n defaultValues[dv] = Component.defaultValues[dv];\n });\n\n // minimal info\n propertyInfo.supports = `${Length || Property} ${Property || Category} properties`;\n }\n\n // set additional options\n if (Component.defaultOptions) {\n // Object.keys(Component.defaultOptions).forEach((op) => {\n // defaultOptions[op] = Component.defaultOptions[op];\n // });\n Object.assign(defaultOptions$1, Component.defaultOptions);\n }\n\n // set functions\n if (Component.functions) {\n Object.keys(Functions).forEach((fn) => {\n if (fn in Component.functions) {\n if (typeof (Component.functions[fn]) === 'function') {\n // if (!Functions[fn][ Category||Property ]) {\n // Functions[fn][ Category||Property ] = Component.functions[fn];\n // }\n if (!Functions[fn][ComponentName]) Functions[fn][ComponentName] = {};\n if (!Functions[fn][ComponentName][Category || Property]) {\n Functions[fn][ComponentName][Category || Property] = Component.functions[fn];\n }\n } else {\n Object.keys(Component.functions[fn]).forEach((ofn) => {\n // !Functions[fn][ofn] && (Functions[fn][ofn] = Component.functions[fn][ofn])\n if (!Functions[fn][ComponentName]) Functions[fn][ComponentName] = {};\n if (!Functions[fn][ComponentName][ofn]) {\n Functions[fn][ComponentName][ofn] = Component.functions[fn][ofn];\n }\n });\n }\n }\n });\n }\n\n // set component interpolation functions\n if (Component.Interpolate) {\n Object.keys(Component.Interpolate).forEach((fni) => {\n const compIntObj = Component.Interpolate[fni];\n if (typeof (compIntObj) === 'function' && !interpolate[fni]) {\n interpolate[fni] = compIntObj;\n } else {\n Object.keys(compIntObj).forEach((sfn) => {\n if (typeof (compIntObj[sfn]) === 'function' && !interpolate[fni]) {\n interpolate[fni] = compIntObj[sfn];\n }\n });\n }\n });\n\n linkProperty[ComponentName] = Component.Interpolate;\n }\n\n // set component util\n if (Component.Util) {\n Object.keys(Component.Util).forEach((fnu) => {\n if (!Util[fnu]) Util[fnu] = Component.Util[fnu];\n });\n }\n\n return propertyInfo;\n }\n}\n\n/**\n * trueDimension\n *\n * Returns the string value of a specific CSS property converted into a nice\n * { v = value, u = unit } object.\n *\n * @param {string} dimValue the property string value\n * @param {boolean | number} isAngle sets the utility to investigate angles\n * @returns {{v: number, u: string}} the true {value, unit} tuple\n */\nconst trueDimension = (dimValue, isAngle) => {\n const intValue = parseInt(dimValue, 10) || 0;\n const mUnits = ['px', '%', 'deg', 'rad', 'em', 'rem', 'vh', 'vw'];\n let theUnit;\n\n for (let mIndex = 0; mIndex < mUnits.length; mIndex += 1) {\n if (typeof dimValue === 'string' && dimValue.includes(mUnits[mIndex])) {\n theUnit = mUnits[mIndex]; break;\n }\n }\n if (theUnit === undefined) {\n theUnit = isAngle ? 'deg' : 'px';\n }\n\n return { v: intValue, u: theUnit };\n};\n\n/**\n * Numbers Interpolation Function.\n *\n * @param {number} a start value\n * @param {number} b end value\n * @param {number} v progress\n * @returns {number} the interpolated number\n */\nfunction numbers(a, b, v) {\n const A = +a;\n const B = b - a;\n // a = +a; b -= a;\n return A + B * v;\n}\n\n// Component Functions\n/**\n * Sets the update function for the property.\n * @param {string} tweenProp the property name\n */\nfunction boxModelOnStart(tweenProp) {\n if (tweenProp in this.valuesEnd && !KEC[tweenProp]) {\n KEC[tweenProp] = (elem, a, b, v) => {\n /* eslint-disable no-param-reassign -- impossible to satisfy */\n /* eslint-disable no-bitwise -- impossible to satisfy */\n elem.style[tweenProp] = `${v > 0.99 || v < 0.01\n ? ((numbers(a, b, v) * 10) >> 0) / 10\n : (numbers(a, b, v)) >> 0}px`;\n /* eslint-enable no-bitwise */\n /* eslint-enable no-param-reassign */\n };\n }\n}\n\n// Component Functions\n/**\n * Returns the current property computed style.\n * @param {string} tweenProp the property name\n * @returns {string} computed style for property\n */\nfunction getBoxModel(tweenProp) {\n return getStyleForProperty(this.element, tweenProp) || defaultValues[tweenProp];\n}\n\n/**\n * Returns the property tween object.\n * @param {string} tweenProp the property name\n * @param {string} value the property name\n * @returns {number} the property tween object\n */\nfunction prepareBoxModel(tweenProp, value) {\n const boxValue = trueDimension(value);\n const offsetProp = tweenProp === 'height' ? 'offsetHeight' : 'offsetWidth';\n return boxValue.u === '%' ? (boxValue.v * this.element[offsetProp]) / 100 : boxValue.v;\n}\n\n// Component Base Props\nconst essentialBoxProps = ['top', 'left', 'width', 'height'];\nconst essentialBoxPropsValues = {\n top: 0, left: 0, width: 0, height: 0,\n};\n\nconst essentialBoxOnStart = {};\nessentialBoxProps.forEach((x) => { essentialBoxOnStart[x] = boxModelOnStart; });\n\n// All Component Functions\nconst essentialBoxModelFunctions = {\n prepareStart: getBoxModel,\n prepareProperty: prepareBoxModel,\n onStart: essentialBoxOnStart,\n};\n\n// Component Essential\nconst BoxModelEssential = {\n component: 'essentialBoxModel',\n category: 'boxModel',\n properties: essentialBoxProps,\n defaultValues: essentialBoxPropsValues,\n Interpolate: { numbers },\n functions: essentialBoxModelFunctions,\n Util: { trueDimension },\n};\n\n/**\n * hexToRGB\n *\n * Converts a #HEX color format into RGB\n * and returns a color object {r,g,b}.\n *\n * @param {string} hex the degree angle\n * @returns {KUTE.colorObject | null} the radian angle\n */\nconst hexToRGB = (hex) => {\n // Expand shorthand form (e.g. \"03F\") to full form (e.g. \"0033FF\")\n const hexShorthand = /^#?([a-f\\d])([a-f\\d])([a-f\\d])$/i;\n const HEX = hex.replace(hexShorthand, (_, r, g, b) => r + r + g + g + b + b);\n const result = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(HEX);\n\n return result ? {\n r: parseInt(result[1], 16),\n g: parseInt(result[2], 16),\n b: parseInt(result[3], 16),\n } : null;\n};\n\n/**\n * trueColor\n *\n * Transform any color to rgba()/rgb() and return a nice RGB(a) object.\n *\n * @param {string} colorString the color input\n * @returns {KUTE.colorObject} the {r,g,b,a} color object\n */\nconst trueColor = (colorString) => {\n let result;\n if (/rgb|rgba/.test(colorString)) { // first check if it's a rgb string\n const vrgb = colorString.replace(/\\s|\\)/, '').split('(')[1].split(',');\n const colorAlpha = vrgb[3] ? vrgb[3] : null;\n if (!colorAlpha) {\n result = { r: parseInt(vrgb[0], 10), g: parseInt(vrgb[1], 10), b: parseInt(vrgb[2], 10) };\n } else {\n result = {\n r: parseInt(vrgb[0], 10),\n g: parseInt(vrgb[1], 10),\n b: parseInt(vrgb[2], 10),\n a: parseFloat(colorAlpha),\n };\n }\n } if (/^#/.test(colorString)) {\n const fromHex = hexToRGB(colorString);\n result = { r: fromHex.r, g: fromHex.g, b: fromHex.b };\n } if (/transparent|none|initial|inherit/.test(colorString)) {\n result = {\n r: 0, g: 0, b: 0, a: 0,\n };\n }\n // maybe we can check for web safe colors\n // only works in a browser\n if (!/^#|^rgb/.test(colorString)) {\n const siteHead = document.getElementsByTagName('head')[0];\n siteHead.style.color = colorString;\n let webColor = getComputedStyle(siteHead, null).color;\n webColor = /rgb/.test(webColor) ? webColor.replace(/[^\\d,]/g, '').split(',') : [0, 0, 0];\n siteHead.style.color = '';\n result = {\n r: parseInt(webColor[0], 10),\n g: parseInt(webColor[1], 10),\n b: parseInt(webColor[2], 10),\n };\n }\n return result;\n};\n\n/**\n * Color Interpolation Function.\n *\n * @param {KUTE.colorObject} a start color\n * @param {KUTE.colorObject} b end color\n * @param {number} v progress\n * @returns {string} the resulting color\n */\nfunction colors(a, b, v) {\n const _c = {};\n const ep = ')';\n const cm = ',';\n const rgb = 'rgb(';\n const rgba = 'rgba(';\n\n Object.keys(b).forEach((c) => {\n if (c !== 'a') {\n _c[c] = numbers(a[c], b[c], v) >> 0 || 0; // eslint-disable-line no-bitwise\n } else if (a[c] && b[c]) {\n _c[c] = (numbers(a[c], b[c], v) * 100 >> 0) / 100; // eslint-disable-line no-bitwise\n }\n });\n\n return !_c.a\n ? rgb + _c.r + cm + _c.g + cm + _c.b + ep\n : rgba + _c.r + cm + _c.g + cm + _c.b + cm + _c.a + ep;\n}\n\n// Component Functions\n/**\n * Sets the property update function.\n * @param {string} tweenProp the property name\n */\nfunction onStartColors(tweenProp) {\n if (this.valuesEnd[tweenProp] && !KEC[tweenProp]) {\n KEC[tweenProp] = (elem, a, b, v) => {\n // eslint-disable-next-line no-param-reassign\n elem.style[tweenProp] = colors(a, b, v);\n };\n }\n}\n\n// Component Properties\n// supported formats\n// 'hex', 'rgb', 'rgba' '#fff' 'rgb(0,0,0)' / 'rgba(0,0,0,0)' 'red' (IE9+)\nconst supportedColors = [\n 'color', 'backgroundColor', 'outlineColor',\n 'borderColor', 'borderTopColor', 'borderRightColor',\n 'borderBottomColor', 'borderLeftColor',\n];\n\nconst defaultColors = {};\nsupportedColors.forEach((tweenProp) => {\n defaultColors[tweenProp] = '#000';\n});\n\n// Component Functions\nconst colorsOnStart = {};\nsupportedColors.forEach((x) => {\n colorsOnStart[x] = onStartColors;\n});\n\n/**\n * Returns the current property computed style.\n * @param {string} prop the property name\n * @returns {string} property computed style\n */\nfunction getColor(prop/* , value */) {\n return getStyleForProperty(this.element, prop) || defaultValues[prop];\n}\n\n/**\n * Returns the property tween object.\n * @param {string} _ the property name\n * @param {string} value the property value\n * @returns {KUTE.colorObject} the property tween object\n */\nfunction prepareColor(/* prop, */_, value) {\n return trueColor(value);\n}\n\n// All Component Functions\nconst colorFunctions = {\n prepareStart: getColor,\n prepareProperty: prepareColor,\n onStart: colorsOnStart,\n};\n\n// Component Full\nconst colorProperties = {\n component: 'colorProperties',\n category: 'colors',\n properties: supportedColors,\n defaultValues: defaultColors,\n Interpolate: { numbers, colors },\n functions: colorFunctions,\n Util: { trueColor },\n};\n\n// Component Special\nconst attributes = {};\n\nconst onStartAttr = {\n /**\n * onStartAttr.attr\n *\n * Sets the sub-property update function.\n * @param {string} tweenProp the property name\n */\n attr(tweenProp) {\n if (!KEC[tweenProp] && this.valuesEnd[tweenProp]) {\n KEC[tweenProp] = (elem, vS, vE, v) => {\n Object.keys(vE).forEach((oneAttr) => {\n KEC.attributes[oneAttr](elem, oneAttr, vS[oneAttr], vE[oneAttr], v);\n });\n };\n }\n },\n /**\n * onStartAttr.attributes\n *\n * Sets the update function for the property.\n * @param {string} tweenProp the property name\n */\n attributes(tweenProp) {\n if (!KEC[tweenProp] && this.valuesEnd.attr) {\n KEC[tweenProp] = attributes;\n }\n },\n};\n\n// Component Name\nconst ComponentName = 'htmlAttributes';\n\n// Component Properties\nconst svgColors = ['fill', 'stroke', 'stop-color'];\n\n// Component Util\n/**\n * Returns non-camelcase property name.\n * @param {string} a the camelcase property name\n * @returns {string} the non-camelcase property name\n */\nfunction replaceUppercase(a) { return a.replace(/[A-Z]/g, '-$&').toLowerCase(); }\n\n// Component Functions\n/**\n * Returns the current attribute value.\n * @param {string} _ the property name\n * @param {string} value the property value\n * @returns {{[x:string]: string}} attribute value\n */\nfunction getAttr(/* tweenProp, */_, value) {\n const attrStartValues = {};\n Object.keys(value).forEach((attr) => {\n // get the value for 'fill-opacity' not fillOpacity\n // also 'width' not the internal 'width_px'\n const attribute = replaceUppercase(attr).replace(/_+[a-z]+/, '');\n const currentValue = this.element.getAttribute(attribute);\n attrStartValues[attribute] = svgColors.includes(attribute)\n ? (currentValue || 'rgba(0,0,0,0)')\n : (currentValue || (/opacity/i.test(attr) ? 1 : 0));\n });\n\n return attrStartValues;\n}\n\n/**\n * Returns the property tween object.\n * @param {string} tweenProp the property name\n * @param {string} attrObj the property value\n * @returns {number} the property tween object\n */\nfunction prepareAttr(tweenProp, attrObj) { // attr (string),attrObj (object)\n const attributesObject = {};\n\n Object.keys(attrObj).forEach((p) => {\n const prop = replaceUppercase(p);\n const regex = /(%|[a-z]+)$/;\n const currentValue = this.element.getAttribute(prop.replace(/_+[a-z]+/, ''));\n\n if (!svgColors.includes(prop)) {\n // attributes set with unit suffixes\n if (currentValue !== null && regex.test(currentValue)) {\n const unit = trueDimension(currentValue).u || trueDimension(attrObj[p]).u;\n const suffix = /%/.test(unit) ? '_percent' : `_${unit}`;\n\n // most \"unknown\" attributes cannot register into onStart, so we manually add them\n onStart[ComponentName][prop + suffix] = (tp) => {\n if (this.valuesEnd[tweenProp] && this.valuesEnd[tweenProp][tp] && !(tp in attributes)) {\n attributes[tp] = (elem, oneAttr, a, b, v) => {\n const _p = oneAttr.replace(suffix, '');\n /* eslint no-bitwise: [\"error\", { \"allow\": [\">>\"] }] */\n elem.setAttribute(_p, ((numbers(a.v, b.v, v) * 1000 >> 0) / 1000) + b.u);\n };\n }\n };\n attributesObject[prop + suffix] = trueDimension(attrObj[p]);\n } else if (!regex.test(attrObj[p]) || currentValue === null\n || (currentValue && !regex.test(currentValue))) {\n // most \"unknown\" attributes cannot register into onStart, so we manually add them\n onStart[ComponentName][prop] = (tp) => {\n if (this.valuesEnd[tweenProp] && this.valuesEnd[tweenProp][tp] && !(tp in attributes)) {\n attributes[tp] = (elem, oneAttr, a, b, v) => {\n elem.setAttribute(oneAttr, (numbers(a, b, v) * 1000 >> 0) / 1000);\n };\n }\n };\n attributesObject[prop] = parseFloat(attrObj[p]);\n }\n } else { // colors\n // most \"unknown\" attributes cannot register into onStart, so we manually add them\n onStart[ComponentName][prop] = (tp) => {\n if (this.valuesEnd[tweenProp] && this.valuesEnd[tweenProp][tp] && !(tp in attributes)) {\n attributes[tp] = (elem, oneAttr, a, b, v) => {\n elem.setAttribute(oneAttr, colors(a, b, v));\n };\n }\n };\n attributesObject[prop] = trueColor(attrObj[p]) || defaultValues.htmlAttributes[p];\n }\n });\n\n return attributesObject;\n}\n\n// All Component Functions\nconst attrFunctions = {\n prepareStart: getAttr,\n prepareProperty: prepareAttr,\n onStart: onStartAttr,\n};\n\n// Component Full\nconst htmlAttributes = {\n component: ComponentName,\n property: 'attr',\n // the Animation class will need some values to validate this Object attribute\n subProperties: ['fill', 'stroke', 'stop-color', 'fill-opacity', 'stroke-opacity'],\n defaultValue: {\n fill: 'rgb(0,0,0)',\n stroke: 'rgb(0,0,0)',\n 'stop-color': 'rgb(0,0,0)',\n opacity: 1,\n 'stroke-opacity': 1,\n 'fill-opacity': 1, // same here\n },\n Interpolate: { numbers, colors },\n functions: attrFunctions,\n // export to global for faster execution\n Util: { replaceUppercase, trueColor, trueDimension },\n};\n\n/* opacityProperty = {\n property: 'opacity',\n defaultValue: 1,\n interpolators: {numbers},\n functions = { prepareStart, prepareProperty, onStart }\n} */\n\n// Component Functions\n/**\n * Sets the property update function.\n * @param {string} tweenProp the property name\n */\nfunction onStartOpacity(tweenProp/* , value */) {\n // opacity could be 0 sometimes, we need to check regardless\n if (tweenProp in this.valuesEnd && !KEC[tweenProp]) {\n KEC[tweenProp] = (elem, a, b, v) => {\n /* eslint-disable */\r\n elem.style[tweenProp] = ((numbers(a, b, v) * 1000) >> 0) / 1000;\r\n /* eslint-enable */\n };\n }\n}\n\n// Component Functions\n/**\n * Returns the current property computed style.\n * @param {string} tweenProp the property name\n * @returns {string} computed style for property\n */\nfunction getOpacity(tweenProp/* , value */) {\n return getStyleForProperty(this.element, tweenProp);\n}\n\n/**\n * Returns the property tween object.\n * @param {string} _ the property name\n * @param {string} value the property value\n * @returns {number} the property tween object\n */\nfunction prepareOpacity(/* tweenProp, */_, value) {\n return parseFloat(value); // opacity always FLOAT\n}\n\n// All Component Functions\nconst opacityFunctions = {\n prepareStart: getOpacity,\n prepareProperty: prepareOpacity,\n onStart: onStartOpacity,\n};\n\n// Full Component\nconst OpacityProperty = {\n component: 'opacityProperty',\n property: 'opacity',\n defaultValue: 1,\n Interpolate: { numbers },\n functions: opacityFunctions,\n};\n\n// Component Values\nconst lowerCaseAlpha = String('abcdefghijklmnopqrstuvwxyz').split(''); // lowercase\nconst upperCaseAlpha = String('abcdefghijklmnopqrstuvwxyz').toUpperCase().split(''); // uppercase\nconst nonAlpha = String(\"~!@#$%^&*()_+{}[];'<>,./?=-\").split(''); // symbols\nconst numeric = String('0123456789').split(''); // numeric\nconst alphaNumeric = lowerCaseAlpha.concat(upperCaseAlpha, numeric); // alpha numeric\nconst allTypes = alphaNumeric.concat(nonAlpha); // all caracters\n\nconst charSet = {\n alpha: lowerCaseAlpha, // lowercase\n upper: upperCaseAlpha, // uppercase\n symbols: nonAlpha, // symbols\n numeric,\n alphanumeric: alphaNumeric,\n all: allTypes,\n};\n\n// Component Functions\nconst onStartWrite = {\n /**\n * onStartWrite.text\n *\n * Sets the property update function.\n * @param {string} tweenProp the property name\n */\n text(tweenProp) {\n if (!KEC[tweenProp] && this.valuesEnd[tweenProp]) {\n const chars = this._textChars;\n let charsets = charSet[defaultOptions$1.textChars];\n\n if (chars in charSet) {\n charsets = charSet[chars];\n } else if (chars && chars.length) {\n charsets = chars;\n }\n\n KEC[tweenProp] = (elem, a, b, v) => {\n let initialText = '';\n let endText = '';\n const finalText = b === '' ? ' ' : b;\n const firstLetterA = a.substring(0);\n const firstLetterB = b.substring(0);\n /* eslint-disable */\r\n const pointer = charsets[(Math.random() * charsets.length) >> 0];\r\n\r\n if (a === ' ') {\r\n endText = firstLetterB\r\n .substring(Math.min(v * firstLetterB.length, firstLetterB.length) >> 0, 0);\r\n elem.innerHTML = v < 1 ? ((endText + pointer)) : finalText;\r\n } else if (b === ' ') {\r\n initialText = firstLetterA\r\n .substring(0, Math.min((1 - v) * firstLetterA.length, firstLetterA.length) >> 0);\r\n elem.innerHTML = v < 1 ? ((initialText + pointer)) : finalText;\r\n } else {\r\n initialText = firstLetterA\r\n .substring(firstLetterA.length,\r\n Math.min(v * firstLetterA.length, firstLetterA.length) >> 0);\r\n endText = firstLetterB\r\n .substring(0, Math.min(v * firstLetterB.length, firstLetterB.length) >> 0);\r\n elem.innerHTML = v < 1 ? ((endText + pointer + initialText)) : finalText;\r\n }\r\n /* eslint-enable */\n };\n }\n },\n /**\n * onStartWrite.number\n *\n * Sets the property update function.\n * @param {string} tweenProp the property name\n */\n number(tweenProp) {\n if (tweenProp in this.valuesEnd && !KEC[tweenProp]) { // numbers can be 0\n KEC[tweenProp] = (elem, a, b, v) => {\n /* eslint-disable */\r\n elem.innerHTML = numbers(a, b, v) >> 0;\r\n /* eslint-enable */\n };\n }\n },\n};\n\n// Component Util\n// utility for multi-child targets\n// wrapContentsSpan returns an [Element] with the SPAN.tagName and a desired class\nfunction wrapContentsSpan(el, classNAME) {\n let textWriteWrapper;\n let newElem;\n if (typeof (el) === 'string') {\n newElem = document.createElement('SPAN');\n newElem.innerHTML = el;\n newElem.className = classNAME;\n return newElem;\n }\n if (!el.children.length || (el.children.length && el.children[0].className !== classNAME)) {\n const elementInnerHTML = el.innerHTML;\n textWriteWrapper = document.createElement('SPAN');\n textWriteWrapper.className = classNAME;\n textWriteWrapper.innerHTML = elementInnerHTML;\n /* eslint-disable no-param-reassign -- impossible to satisfy */\n el.appendChild(textWriteWrapper);\n el.innerHTML = textWriteWrapper.outerHTML;\n /* eslint-enable no-param-reassign -- impossible to satisfy */\n } else if (el.children.length && el.children[0].className === classNAME) {\n [textWriteWrapper] = el.children;\n }\n return textWriteWrapper;\n}\n\nfunction getTextPartsArray(el, classNAME) {\n let elementsArray = [];\n const len = el.children.length;\n if (len) {\n const textParts = [];\n let remainingMarkup = el.innerHTML;\n let wrapperParts;\n\n for (let i = 0, currentChild, childOuter, unTaggedContent; i < len; i += 1) {\n currentChild = el.children[i];\n childOuter = currentChild.outerHTML;\n wrapperParts = remainingMarkup.split(childOuter);\n\n if (wrapperParts[0] !== '') {\n unTaggedContent = wrapContentsSpan(wrapperParts[0], classNAME);\n textParts.push(unTaggedContent);\n remainingMarkup = remainingMarkup.replace(wrapperParts[0], '');\n } else if (wrapperParts[1] !== '') {\n unTaggedContent = wrapContentsSpan(wrapperParts[1].split('<')[0], classNAME);\n textParts.push(unTaggedContent);\n remainingMarkup = remainingMarkup.replace(wrapperParts[0].split('<')[0], '');\n }\n\n if (!currentChild.classList.contains(classNAME)) currentChild.classList.add(classNAME);\n textParts.push(currentChild);\n remainingMarkup = remainingMarkup.replace(childOuter, '');\n }\n\n if (remainingMarkup !== '') {\n const unTaggedRemaining = wrapContentsSpan(remainingMarkup, classNAME);\n textParts.push(unTaggedRemaining);\n }\n\n elementsArray = elementsArray.concat(textParts);\n } else {\n elementsArray = elementsArray.concat([wrapContentsSpan(el, classNAME)]);\n }\n return elementsArray;\n}\n\nfunction setSegments(target, newText) {\n const oldTargetSegs = getTextPartsArray(target, 'text-part');\n const newTargetSegs = getTextPartsArray(wrapContentsSpan(newText), 'text-part');\n\n /* eslint-disable no-param-reassign */\n target.innerHTML = '';\n target.innerHTML += oldTargetSegs.map((s) => { s.className += ' oldText'; return s.outerHTML; }).join('');\n target.innerHTML += newTargetSegs.map((s) => { s.className += ' newText'; return s.outerHTML.replace(s.innerHTML, ''); }).join('');\n /* eslint-enable no-param-reassign */\n\n return [oldTargetSegs, newTargetSegs];\n}\n\nfunction createTextTweens(target, newText, ops) {\n if (target.playing) return false;\n\n const options = ops || {};\n options.duration = 1000;\n\n if (ops.duration === 'auto') {\n options.duration = 'auto';\n } else if (Number.isFinite(ops.duration * 1)) {\n options.duration = ops.duration * 1;\n }\n\n const TweenContructor = connect.tween;\n const segs = setSegments(target, newText);\n const oldTargetSegs = segs[0];\n const newTargetSegs = segs[1];\n const oldTargets = [].slice.call(target.getElementsByClassName('oldText')).reverse();\n const newTargets = [].slice.call(target.getElementsByClassName('newText'));\n\n let textTween = [];\n let totalDelay = 0;\n\n textTween = textTween.concat(oldTargets.map((el, i) => {\n options.duration = options.duration === 'auto'\n ? oldTargetSegs[i].innerHTML.length * 75\n : options.duration;\n options.delay = totalDelay;\n options.onComplete = null;\n\n totalDelay += options.duration;\n return new TweenContructor(el, { text: el.innerHTML }, { text: '' }, options);\n }));\n textTween = textTween.concat(newTargets.map((el, i) => {\n function onComplete() {\n /* eslint-disable no-param-reassign */\n target.innerHTML = newText;\n target.playing = false;\n /* eslint-enable no-param-reassign */\n }\n\n options.duration = options.duration === 'auto' ? newTargetSegs[i].innerHTML.length * 75 : options.duration;\n options.delay = totalDelay;\n options.onComplete = i === newTargetSegs.length - 1 ? onComplete : null;\n totalDelay += options.duration;\n\n return new TweenContructor(el, { text: '' }, { text: newTargetSegs[i].innerHTML }, options);\n }));\n\n textTween.start = function startTweens() {\n if (!target.playing) {\n textTween.forEach((tw) => tw.start());\n // eslint-disable-next-line no-param-reassign\n target.playing = true;\n }\n };\n\n return textTween;\n}\n\n// Component Functions\n/**\n * Returns the current element `innerHTML`.\n * @returns {string} computed style for property\n */\nfunction getWrite(/* tweenProp, value */) {\n return this.element.innerHTML;\n}\n\n/**\n * Returns the property tween object.\n * @param {string} tweenProp the property name\n * @param {string} value the property value\n * @returns {number | string} the property tween object\n */\nfunction prepareText(tweenProp, value) {\n if (tweenProp === 'number') {\n return parseFloat(value);\n }\n // empty strings crash the update function\n return value === '' ? ' ' : value;\n}\n\n// All Component Functions\nconst textWriteFunctions = {\n prepareStart: getWrite,\n prepareProperty: prepareText,\n onStart: onStartWrite,\n};\n\n// Full Component\nconst TextWrite = {\n component: 'textWriteProperties',\n category: 'textWrite',\n properties: ['text', 'number'],\n defaultValues: { text: ' ', number: '0' },\n defaultOptions: { textChars: 'alpha' },\n Interpolate: { numbers },\n functions: textWriteFunctions,\n // export to global for faster execution\n Util: { charSet, createTextTweens },\n};\n\n/**\n * Perspective Interpolation Function.\n *\n * @param {number} a start value\n * @param {number} b end value\n * @param {string} u unit\n * @param {number} v progress\n * @returns {string} the perspective function in string format\n */\nfunction perspective(a, b, u, v) {\n // eslint-disable-next-line no-bitwise\n return `perspective(${((a + (b - a) * v) * 1000 >> 0) / 1000}${u})`;\n}\n\n/**\n * Translate 3D Interpolation Function.\n *\n * @param {number[]} a start [x,y,z] position\n * @param {number[]} b end [x,y,z] position\n * @param {string} u unit, usually `px` degrees\n * @param {number} v progress\n * @returns {string} the interpolated 3D translation string\n */\nfunction translate3d(a, b, u, v) {\n const translateArray = [];\n for (let ax = 0; ax < 3; ax += 1) {\n translateArray[ax] = (a[ax] || b[ax]\n // eslint-disable-next-line no-bitwise\n ? ((a[ax] + (b[ax] - a[ax]) * v) * 1000 >> 0) / 1000 : 0) + u;\n }\n return `translate3d(${translateArray.join(',')})`;\n}\n\n/**\n * 3D Rotation Interpolation Function.\n *\n * @param {number} a start [x,y,z] angles\n * @param {number} b end [x,y,z] angles\n * @param {string} u unit, usually `deg` degrees\n * @param {number} v progress\n * @returns {string} the interpolated 3D rotation string\n */\nfunction rotate3d(a, b, u, v) {\n let rotateStr = '';\n // eslint-disable-next-line no-bitwise\n rotateStr += a[0] || b[0] ? `rotateX(${((a[0] + (b[0] - a[0]) * v) * 1000 >> 0) / 1000}${u})` : '';\n // eslint-disable-next-line no-bitwise\n rotateStr += a[1] || b[1] ? `rotateY(${((a[1] + (b[1] - a[1]) * v) * 1000 >> 0) / 1000}${u})` : '';\n // eslint-disable-next-line no-bitwise\n rotateStr += a[2] || b[2] ? `rotateZ(${((a[2] + (b[2] - a[2]) * v) * 1000 >> 0) / 1000}${u})` : '';\n return rotateStr;\n}\n\n/**\n * Translate 2D Interpolation Function.\n *\n * @param {number[]} a start [x,y] position\n * @param {number[]} b end [x,y] position\n * @param {string} u unit, usually `px` degrees\n * @param {number} v progress\n * @returns {string} the interpolated 2D translation string\n */\nfunction translate(a, b, u, v) {\n const translateArray = [];\n // eslint-disable-next-line no-bitwise\n translateArray[0] = (a[0] === b[0] ? b[0] : ((a[0] + (b[0] - a[0]) * v) * 1000 >> 0) / 1000) + u;\n // eslint-disable-next-line no-bitwise\n translateArray[1] = a[1] || b[1] ? ((a[1] === b[1] ? b[1] : ((a[1] + (b[1] - a[1]) * v) * 1000 >> 0) / 1000) + u) : '0';\n return `translate(${translateArray.join(',')})`;\n}\n\n/**\n * 2D Rotation Interpolation Function.\n *\n * @param {number} a start angle\n * @param {number} b end angle\n * @param {string} u unit, usually `deg` degrees\n * @param {number} v progress\n * @returns {string} the interpolated rotation\n */\nfunction rotate(a, b, u, v) {\n // eslint-disable-next-line no-bitwise\n return `rotate(${((a + (b - a) * v) * 1000 >> 0) / 1000}${u})`;\n}\n\n/**\n * Scale Interpolation Function.\n *\n * @param {number} a start scale\n * @param {number} b end scale\n * @param {number} v progress\n * @returns {string} the interpolated scale\n */\nfunction scale(a, b, v) {\n // eslint-disable-next-line no-bitwise\n return `scale(${((a + (b - a) * v) * 1000 >> 0) / 1000})`;\n}\n\n/**\n * Skew Interpolation Function.\n *\n * @param {number} a start {x,y} angles\n * @param {number} b end {x,y} angles\n * @param {string} u unit, usually `deg` degrees\n * @param {number} v progress\n * @returns {string} the interpolated string value of skew(s)\n */\nfunction skew(a, b, u, v) {\n const skewArray = [];\n // eslint-disable-next-line no-bitwise\n skewArray[0] = (a[0] === b[0] ? b[0] : ((a[0] + (b[0] - a[0]) * v) * 1000 >> 0) / 1000) + u;\n // eslint-disable-next-line no-bitwise\n skewArray[1] = a[1] || b[1] ? ((a[1] === b[1] ? b[1] : ((a[1] + (b[1] - a[1]) * v) * 1000 >> 0) / 1000) + u) : '0';\n return `skew(${skewArray.join(',')})`;\n}\n\n// Component Functions\n/**\n * Sets the property update function.\n * * same to svgTransform, htmlAttributes\n * @param {string} tweenProp the property name\n */\nfunction onStartTransform(tweenProp) {\n if (!KEC[tweenProp] && this.valuesEnd[tweenProp]) {\n KEC[tweenProp] = (elem, a, b, v) => {\n // eslint-disable-next-line no-param-reassign\n elem.style[tweenProp] = (a.perspective || b.perspective ? perspective(a.perspective, b.perspective, 'px', v) : '') // one side might be 0\n + (a.translate3d ? translate3d(a.translate3d, b.translate3d, 'px', v) : '') // array [x,y,z]\n + (a.rotate3d ? rotate3d(a.rotate3d, b.rotate3d, 'deg', v) : '') // array [x,y,z]\n + (a.skew ? skew(a.skew, b.skew, 'deg', v) : '') // array [x,y]\n + (a.scale || b.scale ? scale(a.scale, b.scale, v) : ''); // one side might be 0\n };\n }\n}\n\n// same to svg transform, attr\n// the component developed for modern browsers supporting non-prefixed transform\n\n// Component Functions\n/**\n * Returns the current property inline style.\n * @param {string} tweenProp the property name\n * @returns {string} inline style for property\n */\nfunction getTransform(tweenProp/* , value */) {\n const currentStyle = getInlineStyle(this.element);\n return currentStyle[tweenProp] ? currentStyle[tweenProp] : defaultValues[tweenProp];\n}\n\n/**\n * Returns the property tween object.\n * @param {string} _ the property name\n * @param {Object} obj the property value\n * @returns {KUTE.transformFObject} the property tween object\n */\nfunction prepareTransform(/* prop, */_, obj) {\n const prepAxis = ['X', 'Y', 'Z']; // coordinates\n const transformObject = {};\n const translateArray = []; const rotateArray = []; const skewArray = [];\n const arrayFunctions = ['translate3d', 'translate', 'rotate3d', 'skew'];\n\n Object.keys(obj).forEach((x) => {\n const pv = typeof obj[x] === 'object' && obj[x].length\n ? obj[x].map((v) => parseInt(v, 10))\n : parseInt(obj[x], 10);\n\n if (arrayFunctions.includes(x)) {\n const propId = x === 'translate' || x === 'rotate' ? `${x}3d` : x;\n\n if (x === 'skew') {\n transformObject[propId] = pv.length\n ? [pv[0] || 0, pv[1] || 0]\n : [pv || 0, 0];\n } else if (x === 'translate') {\n transformObject[propId] = pv.length\n ? [pv[0] || 0, pv[1] || 0, pv[2] || 0]\n : [pv || 0, 0, 0];\n } else { // translate3d | rotate3d\n transformObject[propId] = [pv[0] || 0, pv[1] || 0, pv[2] || 0];\n }\n } else if (/[XYZ]/.test(x)) {\n const fn = x.replace(/[XYZ]/, '');\n const fnId = fn === 'skew' ? fn : `${fn}3d`;\n const fnLen = fn === 'skew' ? 2 : 3;\n let fnArray = [];\n\n if (fn === 'translate') {\n fnArray = translateArray;\n } else if (fn === 'rotate') {\n fnArray = rotateArray;\n } else if (fn === 'skew') {\n fnArray = skewArray;\n }\n\n for (let fnIndex = 0; fnIndex < fnLen; fnIndex += 1) {\n const fnAxis = prepAxis[fnIndex];\n fnArray[fnIndex] = (`${fn}${fnAxis}` in obj) ? parseInt(obj[`${fn}${fnAxis}`], 10) : 0;\n }\n transformObject[fnId] = fnArray;\n } else if (x === 'rotate') { // rotate\n transformObject.rotate3d = [0, 0, pv];\n } else { // scale | perspective\n transformObject[x] = x === 'scale' ? parseFloat(obj[x]) : pv;\n }\n });\n\n return transformObject;\n}\n\n/**\n * Prepare tween object in advance for `to()` method.\n * @param {string} tweenProp the property name\n */\nfunction crossCheckTransform(tweenProp) {\n if (this.valuesEnd[tweenProp]) {\n if (this.valuesEnd[tweenProp]) {\n if (this.valuesEnd[tweenProp].perspective && !this.valuesStart[tweenProp].perspective) {\n this.valuesStart[tweenProp].perspective = this.valuesEnd[tweenProp].perspective;\n }\n }\n }\n}\n\n// All Component Functions\nconst transformFunctions = {\n prepareStart: getTransform,\n prepareProperty: prepareTransform,\n onStart: onStartTransform,\n crossCheck: crossCheckTransform,\n};\n\nconst supportedTransformProperties = [\n 'perspective',\n 'translate3d', 'translateX', 'translateY', 'translateZ', 'translate',\n 'rotate3d', 'rotateX', 'rotateY', 'rotateZ', 'rotate',\n 'skewX', 'skewY', 'skew',\n 'scale',\n];\n\nconst defaultTransformValues = {\n perspective: 400,\n translate3d: [0, 0, 0],\n translateX: 0,\n translateY: 0,\n translateZ: 0,\n translate: [0, 0],\n rotate3d: [0, 0, 0],\n rotateX: 0,\n rotateY: 0,\n rotateZ: 0,\n rotate: 0,\n skewX: 0,\n skewY: 0,\n skew: [0, 0],\n scale: 1,\n};\n\n// Full Component\nconst TransformFunctions = {\n component: 'transformFunctions',\n property: 'transform',\n subProperties: supportedTransformProperties,\n defaultValues: defaultTransformValues,\n functions: transformFunctions,\n Interpolate: {\n perspective,\n translate3d,\n rotate3d,\n translate,\n rotate,\n scale,\n skew,\n },\n};\n\n// Component Functions\n/**\n * Sets the property update function.\n * @param {string} tweenProp the property name\n */\nfunction onStartDraw(tweenProp) {\n if (tweenProp in this.valuesEnd && !KEC[tweenProp]) {\n KEC[tweenProp] = (elem, a, b, v) => {\n /* eslint-disable no-bitwise -- impossible to satisfy */\n const pathLength = (a.l * 100 >> 0) / 100;\n const start = (numbers(a.s, b.s, v) * 100 >> 0) / 100;\n const end = (numbers(a.e, b.e, v) * 100 >> 0) / 100;\n const offset = 0 - start;\n const dashOne = end + offset;\n // eslint-disable-next-line no-param-reassign -- impossible to satisfy\n elem.style.strokeDashoffset = `${offset}px`;\n // eslint-disable-next-line no-param-reassign -- impossible to satisfy\n elem.style.strokeDasharray = `${((dashOne < 1 ? 0 : dashOne) * 100 >> 0) / 100}px, ${pathLength}px`;\n /* eslint-disable no-bitwise -- impossible to satisfy */\n };\n }\n}\n\n// Component Util\n/**\n * Convert a `` length percent value to absolute.\n * @param {string} v raw value\n * @param {number} l length value\n * @returns {number} the absolute value\n */\nfunction percent(v, l) {\n return (parseFloat(v) / 100) * l;\n}\n\n/**\n * Returns the `` length.\n * It doesn't compute `rx` and / or `ry` of the element.\n * @see http://stackoverflow.com/a/30376660\n * @param {SVGRectElement} el target element\n * @returns {number} the `` length\n */\nfunction getRectLength(el) {\n const w = el.getAttribute('width');\n const h = el.getAttribute('height');\n return (w * 2) + (h * 2);\n}\n\n/**\n * Returns the `` / `` length.\n * @param {SVGPolylineElement | SVGPolygonElement} el target element\n * @returns {number} the element length\n */\nfunction getPolyLength(el) {\n const points = el.getAttribute('points').split(' ');\n\n let len = 0;\n if (points.length > 1) {\n const coord = (p) => {\n const c = p.split(',');\n if (c.length !== 2) { return 0; } // return undefined\n if (Number.isNaN(c[0] * 1) || Number.isNaN(c[1] * 1)) { return 0; }\n return [parseFloat(c[0]), parseFloat(c[1])];\n };\n\n const dist = (c1, c2) => {\n if (c1 !== undefined && c2 !== undefined) {\n return Math.sqrt((c2[0] - c1[0]) ** 2 + (c2[1] - c1[1]) ** 2);\n }\n return 0;\n };\n\n if (points.length > 2) {\n for (let i = 0; i < points.length - 1; i += 1) {\n len += dist(coord(points[i]), coord(points[i + 1]));\n }\n }\n len += el.tagName === 'polygon'\n ? dist(coord(points[0]), coord(points[points.length - 1])) : 0;\n }\n return len;\n}\n\n/**\n * Returns the `` length.\n * @param {SVGLineElement} el target element\n * @returns {number} the element length\n */\nfunction getLineLength(el) {\n const x1 = el.getAttribute('x1');\n const x2 = el.getAttribute('x2');\n const y1 = el.getAttribute('y1');\n const y2 = el.getAttribute('y2');\n return Math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2);\n}\n\n/**\n * Returns the `` length.\n * @param {SVGCircleElement} el target element\n * @returns {number} the element length\n */\nfunction getCircleLength(el) {\n const r = el.getAttribute('r');\n return 2 * Math.PI * r;\n}\n\n// returns the length of an ellipse\n/**\n * Returns the `` length.\n * @param {SVGEllipseElement} el target element\n * @returns {number} the element length\n */\nfunction getEllipseLength(el) {\n const rx = el.getAttribute('rx');\n const ry = el.getAttribute('ry');\n const len = 2 * rx;\n const wid = 2 * ry;\n return ((Math.sqrt(0.5 * ((len * len) + (wid * wid)))) * (Math.PI * 2)) / 2;\n}\n\n/**\n * Returns the shape length.\n * @param {SVGPathCommander.shapeTypes} el target element\n * @returns {number} the element length\n */\nfunction getTotalLength$1(el) {\n if (el.tagName === 'rect') {\n return getRectLength(el);\n } if (el.tagName === 'circle') {\n return getCircleLength(el);\n } if (el.tagName === 'ellipse') {\n return getEllipseLength(el);\n } if (['polygon', 'polyline'].includes(el.tagName)) {\n return getPolyLength(el);\n } if (el.tagName === 'line') {\n return getLineLength(el);\n }\n // ESLint\n return 0;\n}\n\n/**\n * Returns the property tween object.\n * @param {SVGPathCommander.shapeTypes} element the target element\n * @param {string | KUTE.drawObject} value the property value\n * @returns {KUTE.drawObject} the property tween object\n */\nfunction getDraw(element, value) {\n const length = /path|glyph/.test(element.tagName)\n ? element.getTotalLength()\n : getTotalLength$1(element);\n let start;\n let end;\n let dasharray;\n let offset;\n\n if (value instanceof Object && Object.keys(value).every((v) => ['s', 'e', 'l'].includes(v))) {\n return value;\n } if (typeof value === 'string') {\n const v = value.split(/,|\\s/);\n start = /%/.test(v[0]) ? percent(v[0].trim(), length) : parseFloat(v[0]);\n end = /%/.test(v[1]) ? percent(v[1].trim(), length) : parseFloat(v[1]);\n } else if (typeof value === 'undefined') {\n offset = parseFloat(getStyleForProperty(element, 'stroke-dashoffset'));\n dasharray = getStyleForProperty(element, 'stroke-dasharray').split(',');\n\n start = 0 - offset;\n end = parseFloat(dasharray[0]) + start || length;\n }\n return { s: start, e: end, l: length };\n}\n\n/**\n * Reset CSS properties associated with the `draw` property.\n * @param {SVGPathCommander.shapeTypes} element target\n */\nfunction resetDraw(elem) {\n /* eslint-disable no-param-reassign -- impossible to satisfy */\n elem.style.strokeDashoffset = '';\n elem.style.strokeDasharray = '';\n /* eslint-disable no-param-reassign -- impossible to satisfy */\n}\n\n// Component Functions\n/**\n * Returns the property tween object.\n * @returns {KUTE.drawObject} the property tween object\n */\nfunction getDrawValue(/* prop, value */) {\n return getDraw(this.element);\n}\n/**\n * Returns the property tween object.\n * @param {string} _ the property name\n * @param {string | KUTE.drawObject} value the property value\n * @returns {KUTE.drawObject} the property tween object\n */\nfunction prepareDraw(_, value) {\n return getDraw(this.element, value);\n}\n\n// All Component Functions\nconst svgDrawFunctions = {\n prepareStart: getDrawValue,\n prepareProperty: prepareDraw,\n onStart: onStartDraw,\n};\n\n// Component Full\nconst SvgDrawProperty = {\n component: 'svgDraw',\n property: 'draw',\n defaultValue: '0% 0%',\n Interpolate: { numbers },\n functions: svgDrawFunctions,\n // Export to global for faster execution\n Util: {\n getRectLength,\n getPolyLength,\n getLineLength,\n getCircleLength,\n getEllipseLength,\n getTotalLength: getTotalLength$1,\n resetDraw,\n getDraw,\n percent,\n },\n};\n\n/**\n * Splits an extended A (arc-to) segment into two cubic-bezier segments.\n *\n * @param {SVGPath.pathArray} path the `pathArray` this segment belongs to\n * @param {string[]} allPathCommands all previous path commands\n * @param {number} i the segment index\n */\n\nfunction fixArc(path, allPathCommands, i) {\n if (path[i].length > 7) {\n path[i].shift();\n const segment = path[i];\n let ni = i; // ESLint\n while (segment.length) {\n // if created multiple C:s, their original seg is saved\n allPathCommands[i] = 'A';\n path.splice(ni += 1, 0, ['C', ...segment.splice(0, 6)]);\n }\n path.splice(i, 1);\n }\n}\n\n/**\n * Segment params length\n * @type {Record}\n */\nconst paramsCount = {\n a: 7, c: 6, h: 1, l: 2, m: 2, r: 4, q: 4, s: 4, t: 2, v: 1, z: 0,\n};\n\n/**\n * Iterates an array to check if it's an actual `pathArray`.\n *\n * @param {string | SVGPath.pathArray} path the `pathArray` to be checked\n * @returns {boolean} iteration result\n */\nfunction isPathArray(path) {\n return Array.isArray(path) && path.every((seg) => {\n const lk = seg[0].toLowerCase();\n return paramsCount[lk] === seg.length - 1 && 'achlmqstvz'.includes(lk);\n });\n}\n\n/**\n * Iterates an array to check if it's a `pathArray`\n * with all absolute values.\n *\n * @param {string | SVGPath.pathArray} path the `pathArray` to be checked\n * @returns {boolean} iteration result\n */\nfunction isAbsoluteArray(path) {\n return isPathArray(path)\n // `isPathArray` also checks if it's `Array`\n && path.every(([x]) => x === x.toUpperCase());\n}\n\n/**\n * Iterates an array to check if it's a `pathArray`\n * with all segments are in non-shorthand notation\n * with absolute values.\n *\n * @param {string | SVGPath.pathArray} path the `pathArray` to be checked\n * @returns {boolean} iteration result\n */\nfunction isNormalizedArray(path) {\n // `isAbsoluteArray` also checks if it's `Array`\n return isAbsoluteArray(path) && path.every(([pc]) => 'ACLMQZ'.includes(pc));\n}\n\n/**\n * Iterates an array to check if it's a `pathArray`\n * with all C (cubic bezier) segments.\n *\n * @param {string | SVGPath.pathArray} path the `Array` to be checked\n * @returns {boolean} iteration result\n */\nfunction isCurveArray(path) {\n // `isPathArray` also checks if it's `Array`\n return isNormalizedArray(path) && path.every(([pc]) => 'MC'.includes(pc));\n}\n\n/**\n * Returns a clone of an existing `pathArray`.\n *\n * @param {SVGPath.pathArray | SVGPath.pathSegment} path the source `pathArray`\n * @returns {any} the cloned `pathArray`\n */\nfunction clonePath(path) {\n return path.map((x) => (Array.isArray(x) ? [...x] : x));\n}\n\n/**\n * Breaks the parsing of a pathString once a segment is finalized.\n *\n * @param {SVGPath.PathParser} path the `PathParser` instance\n */\nfunction finalizeSegment(path) {\n let pathCommand = path.pathValue[path.segmentStart];\n let LK = pathCommand.toLowerCase();\n const { data } = path;\n\n while (data.length >= paramsCount[LK]) {\n // overloaded `moveTo`\n // https://github.com/rveciana/svg-path-properties/blob/master/src/parse.ts\n if (LK === 'm' && data.length > 2) {\n path.segments.push([pathCommand, ...data.splice(0, 2)]);\n LK = 'l';\n pathCommand = pathCommand === 'm' ? 'l' : 'L';\n } else {\n path.segments.push([pathCommand, ...data.splice(0, paramsCount[LK])]);\n }\n\n if (!paramsCount[LK]) {\n break;\n }\n }\n}\n\nconst error = 'SVGPathCommander error';\n\n/**\n * Validates an A (arc-to) specific path command value.\n * Usually a `large-arc-flag` or `sweep-flag`.\n *\n * @param {SVGPath.PathParser} path the `PathParser` instance\n */\nfunction scanFlag(path) {\n const { index, pathValue } = path;\n const code = pathValue.charCodeAt(index);\n\n if (code === 0x30/* 0 */) {\n path.param = 0;\n path.index += 1;\n return;\n }\n\n if (code === 0x31/* 1 */) {\n path.param = 1;\n path.index += 1;\n return;\n }\n\n path.err = `${error}: invalid Arc flag \"${pathValue[index]}\", expecting 0 or 1 at index ${index}`;\n}\n\n/**\n * Checks if a character is a digit.\n *\n * @param {number} code the character to check\n * @returns {boolean} check result\n */\nfunction isDigit(code) {\n return (code >= 48 && code <= 57); // 0..9\n}\n\nconst invalidPathValue = 'Invalid path value';\n\n/**\n * Validates every character of the path string,\n * every path command, negative numbers or floating point numbers.\n *\n * @param {SVGPath.PathParser} path the `PathParser` instance\n */\nfunction scanParam(path) {\n const { max, pathValue, index: start } = path;\n let index = start;\n let zeroFirst = false;\n let hasCeiling = false;\n let hasDecimal = false;\n let hasDot = false;\n let ch;\n\n if (index >= max) {\n // path.err = 'SvgPath: missed param (at pos ' + index + ')';\n path.err = `${error}: ${invalidPathValue} at index ${index}, \"pathValue\" is missing param`;\n return;\n }\n ch = pathValue.charCodeAt(index);\n\n if (ch === 0x2B/* + */ || ch === 0x2D/* - */) {\n index += 1;\n // ch = (index < max) ? pathValue.charCodeAt(index) : 0;\n ch = pathValue.charCodeAt(index);\n }\n\n // This logic is shamelessly borrowed from Esprima\n // https://github.com/ariya/esprimas\n if (!isDigit(ch) && ch !== 0x2E/* . */) {\n // path.err = 'SvgPath: param should start with 0..9 or `.` (at pos ' + index + ')';\n path.err = `${error}: ${invalidPathValue} at index ${index}, \"${pathValue[index]}\" is not a number`;\n return;\n }\n\n if (ch !== 0x2E/* . */) {\n zeroFirst = (ch === 0x30/* 0 */);\n index += 1;\n\n ch = pathValue.charCodeAt(index);\n\n if (zeroFirst && index < max) {\n // decimal number starts with '0' such as '09' is illegal.\n if (ch && isDigit(ch)) {\n // path.err = 'SvgPath: numbers started with `0` such as `09`\n // are illegal (at pos ' + start + ')';\n path.err = `${error}: ${invalidPathValue} at index ${start}, \"${pathValue[start]}\" illegal number`;\n return;\n }\n }\n\n while (index < max && isDigit(pathValue.charCodeAt(index))) {\n index += 1;\n hasCeiling = true;\n }\n\n ch = pathValue.charCodeAt(index);\n }\n\n if (ch === 0x2E/* . */) {\n hasDot = true;\n index += 1;\n while (isDigit(pathValue.charCodeAt(index))) {\n index += 1;\n hasDecimal = true;\n }\n\n ch = pathValue.charCodeAt(index);\n }\n\n if (ch === 0x65/* e */ || ch === 0x45/* E */) {\n if (hasDot && !hasCeiling && !hasDecimal) {\n path.err = `${error}: ${invalidPathValue} at index ${index}, \"${pathValue[index]}\" invalid float exponent`;\n return;\n }\n\n index += 1;\n\n ch = pathValue.charCodeAt(index);\n\n if (ch === 0x2B/* + */ || ch === 0x2D/* - */) {\n index += 1;\n }\n if (index < max && isDigit(pathValue.charCodeAt(index))) {\n while (index < max && isDigit(pathValue.charCodeAt(index))) {\n index += 1;\n }\n } else {\n path.err = `${error}: ${invalidPathValue} at index ${index}, \"${pathValue[index]}\" invalid integer exponent`;\n return;\n }\n }\n\n path.index = index;\n path.param = +path.pathValue.slice(start, index);\n}\n\n/**\n * Checks if the character is a space.\n *\n * @param {number} ch the character to check\n * @returns {boolean} check result\n */\nfunction isSpace(ch) {\n const specialSpaces = [\n 0x1680, 0x180E, 0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, 0x2006,\n 0x2007, 0x2008, 0x2009, 0x200A, 0x202F, 0x205F, 0x3000, 0xFEFF];\n /* istanbul ignore next */\n return (ch === 0x0A) || (ch === 0x0D) || (ch === 0x2028) || (ch === 0x2029) // Line terminators\n // White spaces\n || (ch === 0x20) || (ch === 0x09) || (ch === 0x0B) || (ch === 0x0C) || (ch === 0xA0)\n || (ch >= 0x1680 && specialSpaces.includes(ch));\n}\n\n/**\n * Points the parser to the next character in the\n * path string every time it encounters any kind of\n * space character.\n *\n * @param {SVGPath.PathParser} path the `PathParser` instance\n */\nfunction skipSpaces(path) {\n const { pathValue, max } = path;\n while (path.index < max && isSpace(pathValue.charCodeAt(path.index))) {\n path.index += 1;\n }\n}\n\n/**\n * Checks if the character is a path command.\n *\n * @param {any} code the character to check\n * @returns {boolean} check result\n */\nfunction isPathCommand(code) {\n // eslint-disable-next-line no-bitwise -- Impossible to satisfy\n switch (code | 0x20) {\n case 0x6D/* m */:\n case 0x7A/* z */:\n case 0x6C/* l */:\n case 0x68/* h */:\n case 0x76/* v */:\n case 0x63/* c */:\n case 0x73/* s */:\n case 0x71/* q */:\n case 0x74/* t */:\n case 0x61/* a */:\n // case 0x72/* r */:\n return true;\n default:\n return false;\n }\n}\n\n/**\n * Checks if the character is or belongs to a number.\n * [0-9]|+|-|.\n *\n * @param {number} code the character to check\n * @returns {boolean} check result\n */\nfunction isDigitStart(code) {\n return (code >= 48 && code <= 57) /* 0..9 */\n || code === 0x2B /* + */\n || code === 0x2D /* - */\n || code === 0x2E; /* . */\n}\n\n/**\n * Checks if the character is an A (arc-to) path command.\n *\n * @param {number} code the character to check\n * @returns {boolean} check result\n */\nfunction isArcCommand(code) {\n // eslint-disable-next-line no-bitwise -- Impossible to satisfy\n return (code | 0x20) === 0x61;\n}\n\n/**\n * Scans every character in the path string to determine\n * where a segment starts and where it ends.\n *\n * @param {SVGPath.PathParser} path the `PathParser` instance\n */\nfunction scanSegment(path) {\n const { max, pathValue, index } = path;\n const cmdCode = pathValue.charCodeAt(index);\n const reqParams = paramsCount[pathValue[index].toLowerCase()];\n\n path.segmentStart = index;\n\n if (!isPathCommand(cmdCode)) {\n path.err = `${error}: ${invalidPathValue} \"${pathValue[index]}\" is not a path command`;\n return;\n }\n\n path.index += 1;\n skipSpaces(path);\n\n path.data = [];\n\n if (!reqParams) {\n // Z\n finalizeSegment(path);\n return;\n }\n\n for (;;) {\n for (let i = reqParams; i > 0; i -= 1) {\n if (isArcCommand(cmdCode) && (i === 3 || i === 4)) scanFlag(path);\n else scanParam(path);\n\n if (path.err.length) {\n return;\n }\n path.data.push(path.param);\n\n skipSpaces(path);\n\n // after ',' param is mandatory\n if (path.index < max && pathValue.charCodeAt(path.index) === 0x2C/* , */) {\n path.index += 1;\n skipSpaces(path);\n }\n }\n\n if (path.index >= path.max) {\n break;\n }\n\n // Stop on next segment\n if (!isDigitStart(pathValue.charCodeAt(path.index))) {\n break;\n }\n }\n\n finalizeSegment(path);\n}\n\n/**\n * The `PathParser` is used by the `parsePathString` static method\n * to generate a `pathArray`.\n *\n * @param {string} pathString\n */\nfunction PathParser(pathString) {\n /** @type {SVGPath.pathArray} */\n this.segments = [];\n /** @type {string} */\n this.pathValue = pathString;\n /** @type {number} */\n this.max = pathString.length;\n /** @type {number} */\n this.index = 0;\n /** @type {number} */\n this.param = 0.0;\n /** @type {number} */\n this.segmentStart = 0;\n /** @type {any} */\n this.data = [];\n /** @type {string} */\n this.err = '';\n}\n\n/**\n * Parses a path string value and returns an array\n * of segments we like to call `pathArray`.\n *\n * @param {SVGPath.pathArray | string} pathInput the string to be parsed\n * @returns {SVGPath.pathArray | string} the resulted `pathArray` or error string\n */\nfunction parsePathString(pathInput) {\n if (isPathArray(pathInput)) {\n return clonePath(pathInput);\n }\n\n const path = new PathParser(pathInput);\n\n skipSpaces(path);\n\n while (path.index < path.max && !path.err.length) {\n scanSegment(path);\n }\n\n return path.err ? path.err : path.segments;\n}\n\n/**\n * Parses a path string value or object and returns an array\n * of segments, all converted to absolute values.\n *\n * @param {string | SVGPath.pathArray} pathInput the path string | object\n * @returns {SVGPath.absoluteArray} the resulted `pathArray` with absolute values\n */\nfunction pathToAbsolute(pathInput) {\n /* istanbul ignore else */\n if (isAbsoluteArray(pathInput)) {\n // `isAbsoluteArray` checks if it's `pathArray`\n return clonePath(pathInput);\n }\n\n const path = parsePathString(pathInput);\n let x = 0; let y = 0;\n let mx = 0; let my = 0;\n\n // the `absoluteSegment[]` is for sure an `absolutePath`\n return path.map((segment) => {\n const values = segment.slice(1).map(Number);\n const [pathCommand] = segment;\n /** @type {SVGPath.absoluteCommand} */\n const absCommand = pathCommand.toUpperCase();\n\n if (pathCommand === 'M') {\n [x, y] = values;\n mx = x;\n my = y;\n return ['M', x, y];\n }\n /** @type {SVGPath.absoluteSegment} */\n let absoluteSegment = [];\n\n if (pathCommand !== absCommand) {\n switch (absCommand) {\n case 'A':\n absoluteSegment = [\n absCommand, values[0], values[1], values[2],\n values[3], values[4], values[5] + x, values[6] + y];\n break;\n case 'V':\n absoluteSegment = [absCommand, values[0] + y];\n break;\n case 'H':\n absoluteSegment = [absCommand, values[0] + x];\n break;\n default: {\n // use brakets for `eslint: no-case-declaration`\n // https://stackoverflow.com/a/50753272/803358\n const absValues = values.map((n, j) => n + (j % 2 ? y : x));\n // for n, l, c, s, q, t\n absoluteSegment = [absCommand, ...absValues];\n }\n }\n } else {\n absoluteSegment = [absCommand, ...values];\n }\n\n const segLength = absoluteSegment.length;\n switch (absCommand) {\n case 'Z':\n x = mx;\n y = my;\n break;\n case 'H':\n [, x] = absoluteSegment;\n break;\n case 'V':\n [, y] = absoluteSegment;\n break;\n default:\n x = absoluteSegment[segLength - 2];\n y = absoluteSegment[segLength - 1];\n\n if (absCommand === 'M') {\n mx = x;\n my = y;\n }\n }\n return absoluteSegment;\n });\n}\n\n/**\n * Normalizes a single segment of a `pathArray` object.\n *\n * @param {SVGPath.pathSegment} segment the segment object\n * @param {any} params the coordinates of the previous segment\n * @returns {SVGPath.normalSegment} the normalized segment\n */\nfunction normalizeSegment(segment, params) {\n const [pathCommand] = segment;\n const {\n x1: px1, y1: py1, x2: px2, y2: py2,\n } = params;\n const values = segment.slice(1).map(Number);\n let result = segment;\n\n if (!'TQ'.includes(pathCommand)) {\n // optional but good to be cautious\n params.qx = null;\n params.qy = null;\n }\n\n if (pathCommand === 'H') {\n result = ['L', segment[1], py1];\n } else if (pathCommand === 'V') {\n result = ['L', px1, segment[1]];\n } else if (pathCommand === 'S') {\n const x1 = px1 * 2 - px2;\n const y1 = py1 * 2 - py2;\n params.x1 = x1;\n params.y1 = y1;\n result = ['C', x1, y1, ...values];\n } else if (pathCommand === 'T') {\n const qx = px1 * 2 - params.qx;\n const qy = py1 * 2 - params.qy;\n params.qx = qx;\n params.qy = qy;\n result = ['Q', qx, qy, ...values];\n } else if (pathCommand === 'Q') {\n const [nqx, nqy] = values;\n params.qx = nqx;\n params.qy = nqy;\n }\n\n return result;\n}\n\n/**\n * @type {SVGPath.parserParams}\n */\nconst paramsParser = {\n x1: 0, y1: 0, x2: 0, y2: 0, x: 0, y: 0, qx: null, qy: null,\n};\n\n/**\n * Normalizes a `path` object for further processing:\n * * convert segments to absolute values\n * * convert shorthand path commands to their non-shorthand notation\n *\n * @param {string | SVGPath.pathArray} pathInput the string to be parsed or 'pathArray'\n * @returns {SVGPath.normalArray} the normalized `pathArray`\n */\nfunction normalizePath(pathInput) {\n if (isNormalizedArray(pathInput)) {\n return clonePath(pathInput);\n }\n\n /** @type {SVGPath.normalArray} */\n const path = pathToAbsolute(pathInput);\n const params = { ...paramsParser };\n const ii = path.length;\n\n for (let i = 0; i < ii; i += 1) {\n path[i];\n path[i] = normalizeSegment(path[i], params);\n\n const segment = path[i];\n const seglen = segment.length;\n\n params.x1 = +segment[seglen - 2];\n params.y1 = +segment[seglen - 1];\n params.x2 = +(segment[seglen - 4]) || params.x1;\n params.y2 = +(segment[seglen - 3]) || params.y1;\n }\n\n return path;\n}\n\n/**\n * Returns an {x,y} vector rotated by a given\n * angle in radian.\n *\n * @param {number} x the initial vector x\n * @param {number} y the initial vector y\n * @param {number} rad the radian vector angle\n * @returns {{x: number, y: number}} the rotated vector\n */\nfunction rotateVector(x, y, rad) {\n const X = x * Math.cos(rad) - y * Math.sin(rad);\n const Y = x * Math.sin(rad) + y * Math.cos(rad);\n return { x: X, y: Y };\n}\n\n/**\n * Converts A (arc-to) segments to C (cubic-bezier-to).\n *\n * For more information of where this math came from visit:\n * http://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes\n *\n * @param {number} X1 the starting x position\n * @param {number} Y1 the starting y position\n * @param {number} RX x-radius of the arc\n * @param {number} RY y-radius of the arc\n * @param {number} angle x-axis-rotation of the arc\n * @param {number} LAF large-arc-flag of the arc\n * @param {number} SF sweep-flag of the arc\n * @param {number} X2 the ending x position\n * @param {number} Y2 the ending y position\n * @param {number[]=} recursive the parameters needed to split arc into 2 segments\n * @return {number[]} the resulting cubic-bezier segment(s)\n */\nfunction arcToCubic(X1, Y1, RX, RY, angle, LAF, SF, X2, Y2, recursive) {\n let x1 = X1; let y1 = Y1; let rx = RX; let ry = RY; let x2 = X2; let y2 = Y2;\n // for more information of where this Math came from visit:\n // http://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes\n const d120 = (Math.PI * 120) / 180;\n\n const rad = (Math.PI / 180) * (+angle || 0);\n /** @type {number[]} */\n let res = [];\n let xy;\n let f1;\n let f2;\n let cx;\n let cy;\n\n if (!recursive) {\n xy = rotateVector(x1, y1, -rad);\n x1 = xy.x;\n y1 = xy.y;\n xy = rotateVector(x2, y2, -rad);\n x2 = xy.x;\n y2 = xy.y;\n\n const x = (x1 - x2) / 2;\n const y = (y1 - y2) / 2;\n let h = (x * x) / (rx * rx) + (y * y) / (ry * ry);\n if (h > 1) {\n h = Math.sqrt(h);\n rx *= h;\n ry *= h;\n }\n const rx2 = rx * rx;\n const ry2 = ry * ry;\n\n const k = (LAF === SF ? -1 : 1)\n * Math.sqrt(Math.abs((rx2 * ry2 - rx2 * y * y - ry2 * x * x)\n / (rx2 * y * y + ry2 * x * x)));\n\n cx = ((k * rx * y) / ry) + ((x1 + x2) / 2);\n cy = ((k * -ry * x) / rx) + ((y1 + y2) / 2);\n // eslint-disable-next-line no-bitwise -- Impossible to satisfy no-bitwise\n f1 = Math.asin((((y1 - cy) / ry) * (10 ** 9) >> 0) / (10 ** 9));\n // eslint-disable-next-line no-bitwise -- Impossible to satisfy no-bitwise\n f2 = Math.asin((((y2 - cy) / ry) * (10 ** 9) >> 0) / (10 ** 9));\n\n f1 = x1 < cx ? Math.PI - f1 : f1;\n f2 = x2 < cx ? Math.PI - f2 : f2;\n if (f1 < 0) (f1 = Math.PI * 2 + f1);\n if (f2 < 0) (f2 = Math.PI * 2 + f2);\n if (SF && f1 > f2) {\n f1 -= Math.PI * 2;\n }\n if (!SF && f2 > f1) {\n f2 -= Math.PI * 2;\n }\n } else {\n [f1, f2, cx, cy] = recursive;\n }\n let df = f2 - f1;\n if (Math.abs(df) > d120) {\n const f2old = f2;\n const x2old = x2;\n const y2old = y2;\n f2 = f1 + d120 * (SF && f2 > f1 ? 1 : -1);\n x2 = cx + rx * Math.cos(f2);\n y2 = cy + ry * Math.sin(f2);\n res = arcToCubic(x2, y2, rx, ry, angle, 0, SF, x2old, y2old, [f2, f2old, cx, cy]);\n }\n df = f2 - f1;\n const c1 = Math.cos(f1);\n const s1 = Math.sin(f1);\n const c2 = Math.cos(f2);\n const s2 = Math.sin(f2);\n const t = Math.tan(df / 4);\n const hx = (4 / 3) * rx * t;\n const hy = (4 / 3) * ry * t;\n const m1 = [x1, y1];\n const m2 = [x1 + hx * s1, y1 - hy * c1];\n const m3 = [x2 + hx * s2, y2 - hy * c2];\n const m4 = [x2, y2];\n m2[0] = 2 * m1[0] - m2[0];\n m2[1] = 2 * m1[1] - m2[1];\n if (recursive) {\n return [...m2, ...m3, ...m4, ...res];\n }\n res = [...m2, ...m3, ...m4, ...res];\n const newres = [];\n for (let i = 0, ii = res.length; i < ii; i += 1) {\n newres[i] = i % 2\n ? rotateVector(res[i - 1], res[i], rad).y\n : rotateVector(res[i], res[i + 1], rad).x;\n }\n return newres;\n}\n\n/**\n * Converts a Q (quadratic-bezier) segment to C (cubic-bezier).\n *\n * @param {number} x1 curve start x\n * @param {number} y1 curve start y\n * @param {number} qx control point x\n * @param {number} qy control point y\n * @param {number} x2 curve end x\n * @param {number} y2 curve end y\n * @returns {number[]} the cubic-bezier segment\n */\nfunction quadToCubic(x1, y1, qx, qy, x2, y2) {\n const r13 = 1 / 3;\n const r23 = 2 / 3;\n return [\n r13 * x1 + r23 * qx, // cpx1\n r13 * y1 + r23 * qy, // cpy1\n r13 * x2 + r23 * qx, // cpx2\n r13 * y2 + r23 * qy, // cpy2\n x2, y2, // x,y\n ];\n}\n\n/**\n * Returns the coordinates of a specified distance\n * ratio between two points.\n *\n * @param {[number, number]} a the first point coordinates\n * @param {[number, number]} b the second point coordinates\n * @param {number} t the ratio\n * @returns {[number, number]} the midpoint coordinates\n */\nfunction midPoint(a, b, t) {\n const [ax, ay] = a; const [bx, by] = b;\n return [ax + (bx - ax) * t, ay + (by - ay) * t];\n}\n\n/**\n * Returns the square root of the distance\n * between two given points.\n *\n * @param {[number, number]} a the first point coordinates\n * @param {[number, number]} b the second point coordinates\n * @returns {number} the distance value\n */\nfunction distanceSquareRoot(a, b) {\n return Math.sqrt(\n (a[0] - b[0]) * (a[0] - b[0])\n + (a[1] - b[1]) * (a[1] - b[1]),\n );\n}\n\n/**\n * Returns a {x,y} point at a given length, the total length and\n * the minimum and maximum {x,y} coordinates of a line (L,V,H,Z) segment.\n *\n * @param {number} x1 the starting point X\n * @param {number} y1 the starting point Y\n * @param {number} x2 the ending point X\n * @param {number} y2 the ending point Y\n * @param {number=} distance the distance to point\n * @returns {SVGPath.lengthFactory} the segment length, point, min & max\n */\nfunction segmentLineFactory(x1, y1, x2, y2, distance) {\n const length = distanceSquareRoot([x1, y1], [x2, y2]);\n let point = { x: 0, y: 0 };\n\n /* istanbul ignore else */\n if (typeof distance === 'number') {\n if (distance <= 0) {\n point = { x: x1, y: y1 };\n } else if (distance >= length) {\n point = { x: x2, y: y2 };\n } else {\n const [x, y] = midPoint([x1, y1], [x2, y2], distance / length);\n point = { x, y };\n }\n }\n\n return {\n length,\n point,\n min: {\n x: Math.min(x1, x2),\n y: Math.min(y1, y2),\n },\n max: {\n x: Math.max(x1, x2),\n y: Math.max(y1, y2),\n },\n };\n}\n\n/**\n * Converts an L (line-to) segment to C (cubic-bezier).\n *\n * @param {number} x1 line start x\n * @param {number} y1 line start y\n * @param {number} x2 line end x\n * @param {number} y2 line end y\n * @returns {number[]} the cubic-bezier segment\n */\nfunction lineToCubic(x1, y1, x2, y2) {\n const t = 0.5;\n /** @type {[number, number]} */\n const p0 = [x1, y1];\n /** @type {[number, number]} */\n const p1 = [x2, y2];\n const p2 = midPoint(p0, p1, t);\n const p3 = midPoint(p1, p2, t);\n const p4 = midPoint(p2, p3, t);\n const p5 = midPoint(p3, p4, t);\n const p6 = midPoint(p4, p5, t);\n const seg1 = [...p0, ...p2, ...p4, ...p6, t];\n const cp1 = segmentLineFactory(...seg1).point;\n const seg2 = [...p6, ...p5, ...p3, ...p1, 0];\n const cp2 = segmentLineFactory(...seg2).point;\n\n return [cp1.x, cp1.y, cp2.x, cp2.y, x2, y2];\n}\n\n/**\n * Converts any segment to C (cubic-bezier).\n *\n * @param {SVGPath.pathSegment} segment the source segment\n * @param {SVGPath.parserParams} params the source segment parameters\n * @returns {SVGPath.cubicSegment | SVGPath.MSegment} the cubic-bezier segment\n */\nfunction segmentToCubic(segment, params) {\n const [pathCommand] = segment;\n const values = segment.slice(1).map(Number);\n const [x, y] = values;\n let args;\n const {\n x1: px1, y1: py1, x: px, y: py,\n } = params;\n\n if (!'TQ'.includes(pathCommand)) {\n params.qx = null;\n params.qy = null;\n }\n\n switch (pathCommand) {\n case 'M':\n params.x = x;\n params.y = y;\n return segment;\n case 'A':\n args = [px1, py1, ...values];\n return ['C', ...arcToCubic(...args)];\n case 'Q':\n params.qx = x;\n params.qy = y;\n args = [px1, py1, ...values];\n return ['C', ...quadToCubic(...args)];\n case 'L':\n return ['C', ...lineToCubic(px1, py1, x, y)];\n case 'Z':\n return ['C', ...lineToCubic(px1, py1, px, py)];\n }\n return segment;\n}\n\n/**\n * Parses a path string value or 'pathArray' and returns a new one\n * in which all segments are converted to cubic-bezier.\n *\n * In addition, un-necessary `Z` segment is removed if previous segment\n * extends to the `M` segment.\n *\n * @param {string | SVGPath.pathArray} pathInput the string to be parsed or 'pathArray'\n * @returns {SVGPath.curveArray} the resulted `pathArray` converted to cubic-bezier\n */\nfunction pathToCurve(pathInput) {\n /* istanbul ignore else */\n if (isCurveArray(pathInput)) {\n // `isCurveArray` checks if it's `pathArray`\n return clonePath(pathInput);\n }\n\n // const path = fixPath(normalizePath(pathInput));\n const path = normalizePath(pathInput);\n const params = { ...paramsParser };\n const allPathCommands = [];\n let pathCommand = ''; // ts-lint\n let ii = path.length;\n\n for (let i = 0; i < ii; i += 1) {\n [pathCommand] = path[i];\n allPathCommands[i] = pathCommand;\n\n path[i] = segmentToCubic(path[i], params);\n\n fixArc(path, allPathCommands, i);\n ii = path.length;\n\n const segment = path[i];\n const seglen = segment.length;\n params.x1 = +segment[seglen - 2];\n params.y1 = +segment[seglen - 1];\n params.x2 = +(segment[seglen - 4]) || params.x1;\n params.y2 = +(segment[seglen - 3]) || params.y1;\n }\n\n return path;\n}\n\n/**\n * SVGPathCommander default options\n * @type {SVGPath.options}\n */\nconst defaultOptions = {\n origin: [0, 0, 0],\n round: 4,\n};\n\n/**\n * Rounds the values of a `pathArray` instance to\n * a specified amount of decimals and returns it.\n *\n * @param {SVGPath.pathArray} path the source `pathArray`\n * @param {number | 'off'} roundOption the amount of decimals to round numbers to\n * @returns {SVGPath.pathArray} the resulted `pathArray` with rounded values\n */\nfunction roundPath(path, roundOption) {\n let { round } = defaultOptions;\n if (roundOption === 'off' || round === 'off') return clonePath(path);\n // round = roundOption >= 1 ? roundOption : round;\n // allow for ZERO decimals\n round = roundOption >= 0 ? roundOption : round;\n // to round values to the power\n // the `round` value must be integer\n const pow = typeof round === 'number' && round >= 1 ? (10 ** round) : 1;\n\n return path.map((pi) => {\n const values = pi.slice(1).map(Number)\n .map((n) => (round ? (Math.round(n * pow) / pow) : Math.round(n)));\n return [pi[0], ...values];\n });\n}\n\n/**\n * Returns a valid `d` attribute string value created\n * by rounding values and concatenating the `pathArray` segments.\n *\n * @param {SVGPath.pathArray} path the `pathArray` object\n * @param {number | 'off'} round amount of decimals to round values to\n * @returns {string} the concatenated path string\n */\nfunction pathToString(path, round) {\n return roundPath(path, round)\n .map((x) => x[0] + x.slice(1).join(' ')).join('');\n}\n\n/**\n * Split a path into an `Array` of sub-path strings.\n *\n * In the process, values are converted to absolute\n * for visual consistency.\n *\n * @param {SVGPath.pathArray} pathInput the source `pathArray`\n * @return {SVGPath.pathArray[]} an array with all sub-path strings\n */\nfunction splitPath(pathInput) {\n /** @type {SVGPath.pathArray[]} */\n const composite = [];\n /** @type {SVGPath.pathArray} */\n let path;\n let pi = -1;\n\n pathInput.forEach((seg) => {\n if (seg[0] === 'M') {\n path = [seg];\n pi += 1;\n } else {\n path = [...path, seg];\n }\n composite[pi] = path;\n });\n\n return composite;\n}\n\n/**\n *\n * @param {{x: number, y: number}} v0\n * @param {{x: number, y: number}} v1\n * @returns {{x: number, y: number}}\n */\nfunction angleBetween(v0, v1) {\n const { x: v0x, y: v0y } = v0;\n const { x: v1x, y: v1y } = v1;\n const p = v0x * v1x + v0y * v1y;\n const n = Math.sqrt((v0x ** 2 + v0y ** 2) * (v1x ** 2 + v1y ** 2));\n const sign = v0x * v1y - v0y * v1x < 0 ? -1 : 1;\n const angle = sign * Math.acos(p / n);\n\n return angle;\n}\n\n/**\n * Returns a {x,y} point at a given length, the total length and\n * the minimum and maximum {x,y} coordinates of a C (cubic-bezier) segment.\n * @see https://github.com/MadLittleMods/svg-curve-lib/blob/master/src/js/svg-curve-lib.js\n *\n * @param {number} x1 the starting x position\n * @param {number} y1 the starting y position\n * @param {number} RX x-radius of the arc\n * @param {number} RY y-radius of the arc\n * @param {number} angle x-axis-rotation of the arc\n * @param {number} LAF large-arc-flag of the arc\n * @param {number} SF sweep-flag of the arc\n * @param {number} x the ending x position\n * @param {number} y the ending y position\n * @param {number} t the point distance\n * @returns {{x: number, y: number}} the requested point\n */\nfunction getPointAtArcSegmentLength(x1, y1, RX, RY, angle, LAF, SF, x, y, t) {\n const {\n abs, sin, cos, sqrt, PI,\n } = Math;\n let rx = abs(RX);\n let ry = abs(RY);\n const xRot = ((angle % 360) + 360) % 360;\n const xRotRad = xRot * (PI / 180);\n\n if (x1 === x && y1 === y) {\n return { x: x1, y: y1 };\n }\n\n if (rx === 0 || ry === 0) {\n return segmentLineFactory(x1, y1, x, y, t).point;\n }\n\n const dx = (x1 - x) / 2;\n const dy = (y1 - y) / 2;\n\n const transformedPoint = {\n x: cos(xRotRad) * dx + sin(xRotRad) * dy,\n y: -sin(xRotRad) * dx + cos(xRotRad) * dy,\n };\n\n const radiiCheck = transformedPoint.x ** 2 / rx ** 2 + transformedPoint.y ** 2 / ry ** 2;\n\n if (radiiCheck > 1) {\n rx *= sqrt(radiiCheck);\n ry *= sqrt(radiiCheck);\n }\n\n const cSquareNumerator = rx ** 2 * ry ** 2\n - rx ** 2 * transformedPoint.y ** 2\n - ry ** 2 * transformedPoint.x ** 2;\n\n const cSquareRootDenom = rx ** 2 * transformedPoint.y ** 2\n + ry ** 2 * transformedPoint.x ** 2;\n\n let cRadicand = cSquareNumerator / cSquareRootDenom;\n cRadicand = cRadicand < 0 ? 0 : cRadicand;\n const cCoef = (LAF !== SF ? 1 : -1) * sqrt(cRadicand);\n const transformedCenter = {\n x: cCoef * ((rx * transformedPoint.y) / ry),\n y: cCoef * (-(ry * transformedPoint.x) / rx),\n };\n\n const center = {\n x: cos(xRotRad) * transformedCenter.x\n - sin(xRotRad) * transformedCenter.y + (x1 + x) / 2,\n y: sin(xRotRad) * transformedCenter.x\n + cos(xRotRad) * transformedCenter.y + (y1 + y) / 2,\n };\n\n const startVector = {\n x: (transformedPoint.x - transformedCenter.x) / rx,\n y: (transformedPoint.y - transformedCenter.y) / ry,\n };\n\n const startAngle = angleBetween({ x: 1, y: 0 }, startVector);\n\n const endVector = {\n x: (-transformedPoint.x - transformedCenter.x) / rx,\n y: (-transformedPoint.y - transformedCenter.y) / ry,\n };\n\n let sweepAngle = angleBetween(startVector, endVector);\n if (!SF && sweepAngle > 0) {\n sweepAngle -= 2 * PI;\n } else if (SF && sweepAngle < 0) {\n sweepAngle += 2 * PI;\n }\n sweepAngle %= 2 * PI;\n\n const alpha = startAngle + sweepAngle * t;\n const ellipseComponentX = rx * cos(alpha);\n const ellipseComponentY = ry * sin(alpha);\n\n const point = {\n x: cos(xRotRad) * ellipseComponentX\n - sin(xRotRad) * ellipseComponentY\n + center.x,\n y: sin(xRotRad) * ellipseComponentX\n + cos(xRotRad) * ellipseComponentY\n + center.y,\n };\n\n // to be used later\n // point.ellipticalArcStartAngle = startAngle;\n // point.ellipticalArcEndAngle = startAngle + sweepAngle;\n // point.ellipticalArcAngle = alpha;\n\n // point.ellipticalArcCenter = center;\n // point.resultantRx = rx;\n // point.resultantRy = ry;\n\n return point;\n}\n\n/**\n * Returns a {x,y} point at a given length, the total length and\n * the shape minimum and maximum {x,y} coordinates of an A (arc-to) segment.\n *\n * @param {number} X1 the starting x position\n * @param {number} Y1 the starting y position\n * @param {number} RX x-radius of the arc\n * @param {number} RY y-radius of the arc\n * @param {number} angle x-axis-rotation of the arc\n * @param {number} LAF large-arc-flag of the arc\n * @param {number} SF sweep-flag of the arc\n * @param {number} X2 the ending x position\n * @param {number} Y2 the ending y position\n * @param {number} distance the point distance\n * @returns {SVGPath.lengthFactory} the segment length, point, min & max\n */\nfunction segmentArcFactory(X1, Y1, RX, RY, angle, LAF, SF, X2, Y2, distance) {\n const distanceIsNumber = typeof distance === 'number';\n let x = X1; let y = Y1;\n let LENGTH = 0;\n let prev = [x, y, LENGTH];\n let cur = [x, y];\n let t = 0;\n let POINT = { x: 0, y: 0 };\n let POINTS = [{ x, y }];\n\n if (distanceIsNumber && distance <= 0) {\n POINT = { x, y };\n }\n\n const sampleSize = 300;\n for (let j = 0; j <= sampleSize; j += 1) {\n t = j / sampleSize;\n\n ({ x, y } = getPointAtArcSegmentLength(X1, Y1, RX, RY, angle, LAF, SF, X2, Y2, t));\n POINTS = [...POINTS, { x, y }];\n LENGTH += distanceSquareRoot(cur, [x, y]);\n cur = [x, y];\n\n if (distanceIsNumber && LENGTH > distance && distance > prev[2]) {\n const dv = (LENGTH - distance) / (LENGTH - prev[2]);\n\n POINT = {\n x: cur[0] * (1 - dv) + prev[0] * dv,\n y: cur[1] * (1 - dv) + prev[1] * dv,\n };\n }\n prev = [x, y, LENGTH];\n }\n\n if (distanceIsNumber && distance >= LENGTH) {\n POINT = { x: X2, y: Y2 };\n }\n\n return {\n length: LENGTH,\n point: POINT,\n min: {\n x: Math.min(...POINTS.map((n) => n.x)),\n y: Math.min(...POINTS.map((n) => n.y)),\n },\n max: {\n x: Math.max(...POINTS.map((n) => n.x)),\n y: Math.max(...POINTS.map((n) => n.y)),\n },\n };\n}\n\n/**\n * Returns a {x,y} point at a given length, the total length and\n * the minimum and maximum {x,y} coordinates of a C (cubic-bezier) segment.\n *\n * @param {number} x1 the starting point X\n * @param {number} y1 the starting point Y\n * @param {number} c1x the first control point X\n * @param {number} c1y the first control point Y\n * @param {number} c2x the second control point X\n * @param {number} c2y the second control point Y\n * @param {number} x2 the ending point X\n * @param {number} y2 the ending point Y\n * @param {number} t a [0-1] ratio\n * @returns {{x: number, y: number}} the cubic-bezier segment length\n */\nfunction getPointAtCubicSegmentLength(x1, y1, c1x, c1y, c2x, c2y, x2, y2, t) {\n const t1 = 1 - t;\n return {\n x: (t1 ** 3) * x1\n + 3 * (t1 ** 2) * t * c1x\n + 3 * t1 * (t ** 2) * c2x\n + (t ** 3) * x2,\n y: (t1 ** 3) * y1\n + 3 * (t1 ** 2) * t * c1y\n + 3 * t1 * (t ** 2) * c2y\n + (t ** 3) * y2,\n };\n}\n\n/**\n * Returns the length of a C (cubic-bezier) segment\n * or an {x,y} point at a given length.\n *\n * @param {number} x1 the starting point X\n * @param {number} y1 the starting point Y\n * @param {number} c1x the first control point X\n * @param {number} c1y the first control point Y\n * @param {number} c2x the second control point X\n * @param {number} c2y the second control point Y\n * @param {number} x2 the ending point X\n * @param {number} y2 the ending point Y\n * @param {number=} distance the point distance\n * @returns {SVGPath.lengthFactory} the segment length, point, min & max\n */\nfunction segmentCubicFactory(x1, y1, c1x, c1y, c2x, c2y, x2, y2, distance) {\n const distanceIsNumber = typeof distance === 'number';\n let x = x1; let y = y1;\n let LENGTH = 0;\n let prev = [x, y, LENGTH];\n let cur = [x, y];\n let t = 0;\n let POINT = { x: 0, y: 0 };\n let POINTS = [{ x, y }];\n\n if (distanceIsNumber && distance <= 0) {\n POINT = { x, y };\n }\n\n const sampleSize = 300;\n for (let j = 0; j <= sampleSize; j += 1) {\n t = j / sampleSize;\n\n ({ x, y } = getPointAtCubicSegmentLength(x1, y1, c1x, c1y, c2x, c2y, x2, y2, t));\n POINTS = [...POINTS, { x, y }];\n LENGTH += distanceSquareRoot(cur, [x, y]);\n cur = [x, y];\n\n if (distanceIsNumber && LENGTH > distance && distance > prev[2]) {\n const dv = (LENGTH - distance) / (LENGTH - prev[2]);\n\n POINT = {\n x: cur[0] * (1 - dv) + prev[0] * dv,\n y: cur[1] * (1 - dv) + prev[1] * dv,\n };\n }\n prev = [x, y, LENGTH];\n }\n\n if (distanceIsNumber && distance >= LENGTH) {\n POINT = { x: x2, y: y2 };\n }\n\n return {\n length: LENGTH,\n point: POINT,\n min: {\n x: Math.min(...POINTS.map((n) => n.x)),\n y: Math.min(...POINTS.map((n) => n.y)),\n },\n max: {\n x: Math.max(...POINTS.map((n) => n.x)),\n y: Math.max(...POINTS.map((n) => n.y)),\n },\n };\n}\n\n/**\n * Returns the {x,y} coordinates of a point at a\n * given length of a quadratic-bezier segment.\n *\n * @see https://github.com/substack/point-at-length\n *\n * @param {number} x1 the starting point X\n * @param {number} y1 the starting point Y\n * @param {number} cx the control point X\n * @param {number} cy the control point Y\n * @param {number} x2 the ending point X\n * @param {number} y2 the ending point Y\n * @param {number} t a [0-1] ratio\n * @returns {{x: number, y: number}} the requested {x,y} coordinates\n */\nfunction getPointAtQuadSegmentLength(x1, y1, cx, cy, x2, y2, t) {\n const t1 = 1 - t;\n return {\n x: (t1 ** 2) * x1\n + 2 * t1 * t * cx\n + (t ** 2) * x2,\n y: (t1 ** 2) * y1\n + 2 * t1 * t * cy\n + (t ** 2) * y2,\n };\n}\n\n/**\n * Returns a {x,y} point at a given length, the total length and\n * the minimum and maximum {x,y} coordinates of a Q (quadratic-bezier) segment.\n *\n * @param {number} x1 the starting point X\n * @param {number} y1 the starting point Y\n * @param {number} qx the control point X\n * @param {number} qy the control point Y\n * @param {number} x2 the ending point X\n * @param {number} y2 the ending point Y\n * @param {number=} distance the distance to point\n * @returns {SVGPath.lengthFactory} the segment length, point, min & max\n */\nfunction segmentQuadFactory(x1, y1, qx, qy, x2, y2, distance) {\n const distanceIsNumber = typeof distance === 'number';\n let x = x1; let y = y1;\n let LENGTH = 0;\n let prev = [x, y, LENGTH];\n let cur = [x, y];\n let t = 0;\n let POINT = { x: 0, y: 0 };\n let POINTS = [{ x, y }];\n\n if (distanceIsNumber && distance <= 0) {\n POINT = { x, y };\n }\n\n const sampleSize = 300;\n for (let j = 0; j <= sampleSize; j += 1) {\n t = j / sampleSize;\n\n ({ x, y } = getPointAtQuadSegmentLength(x1, y1, qx, qy, x2, y2, t));\n POINTS = [...POINTS, { x, y }];\n LENGTH += distanceSquareRoot(cur, [x, y]);\n cur = [x, y];\n\n if (distanceIsNumber && LENGTH > distance && distance > prev[2]) {\n const dv = (LENGTH - distance) / (LENGTH - prev[2]);\n\n POINT = {\n x: cur[0] * (1 - dv) + prev[0] * dv,\n y: cur[1] * (1 - dv) + prev[1] * dv,\n };\n }\n prev = [x, y, LENGTH];\n }\n\n /* istanbul ignore else */\n if (distanceIsNumber && distance >= LENGTH) {\n POINT = { x: x2, y: y2 };\n }\n\n return {\n length: LENGTH,\n point: POINT,\n min: {\n x: Math.min(...POINTS.map((n) => n.x)),\n y: Math.min(...POINTS.map((n) => n.y)),\n },\n max: {\n x: Math.max(...POINTS.map((n) => n.x)),\n y: Math.max(...POINTS.map((n) => n.y)),\n },\n };\n}\n\n/**\n * Returns a {x,y} point at a given length\n * of a shape, the shape total length and\n * the shape minimum and maximum {x,y} coordinates.\n *\n * @param {string | SVGPath.pathArray} pathInput the `pathArray` to look into\n * @param {number=} distance the length of the shape to look at\n * @returns {SVGPath.lengthFactory} the path length, point, min & max\n */\nfunction pathLengthFactory(pathInput, distance) {\n const path = normalizePath(pathInput);\n const distanceIsNumber = typeof distance === 'number';\n let isM;\n let data = [];\n let pathCommand;\n let x = 0;\n let y = 0;\n let mx = 0;\n let my = 0;\n let seg;\n let MIN = [];\n let MAX = [];\n let length = 0;\n let min = { x: 0, y: 0 };\n let max = min;\n let point = min;\n let POINT = min;\n let LENGTH = 0;\n\n for (let i = 0, ll = path.length; i < ll; i += 1) {\n seg = path[i];\n [pathCommand] = seg;\n isM = pathCommand === 'M';\n data = !isM ? [x, y, ...seg.slice(1)] : data;\n\n // this segment is always ZERO\n /* istanbul ignore else */\n if (isM) {\n // remember mx, my for Z\n [, mx, my] = seg;\n min = { x: mx, y: my };\n max = min;\n length = 0;\n\n if (distanceIsNumber && distance < 0.001) {\n POINT = min;\n }\n } else if (pathCommand === 'L') {\n ({\n length, min, max, point,\n } = segmentLineFactory(...data, (distance || 0) - LENGTH));\n } else if (pathCommand === 'A') {\n ({\n length, min, max, point,\n } = segmentArcFactory(...data, (distance || 0) - LENGTH));\n } else if (pathCommand === 'C') {\n ({\n length, min, max, point,\n } = segmentCubicFactory(...data, (distance || 0) - LENGTH));\n } else if (pathCommand === 'Q') {\n ({\n length, min, max, point,\n } = segmentQuadFactory(...data, (distance || 0) - LENGTH));\n } else if (pathCommand === 'Z') {\n data = [x, y, mx, my];\n ({\n length, min, max, point,\n } = segmentLineFactory(...data, (distance || 0) - LENGTH));\n }\n\n if (distanceIsNumber && LENGTH < distance && LENGTH + length >= distance) {\n POINT = point;\n }\n\n MAX = [...MAX, max];\n MIN = [...MIN, min];\n LENGTH += length;\n\n [x, y] = pathCommand !== 'Z' ? seg.slice(-2) : [mx, my];\n }\n\n // native `getPointAtLength` behavior when the given distance\n // is higher than total length\n if (distanceIsNumber && distance >= LENGTH) {\n POINT = { x, y };\n }\n\n return {\n length: LENGTH,\n point: POINT,\n min: {\n x: Math.min(...MIN.map((n) => n.x)),\n y: Math.min(...MIN.map((n) => n.y)),\n },\n max: {\n x: Math.max(...MAX.map((n) => n.x)),\n y: Math.max(...MAX.map((n) => n.y)),\n },\n };\n}\n\n/**\n * Returns the shape total length, or the equivalent to `shape.getTotalLength()`.\n *\n * The `normalizePath` version is lighter, faster, more efficient and more accurate\n * with paths that are not `curveArray`.\n *\n * @param {string | SVGPath.pathArray} pathInput the target `pathArray`\n * @returns {number} the shape total length\n */\nfunction getTotalLength(pathInput) {\n return pathLengthFactory(pathInput).length;\n}\n\n/**\n * Returns [x,y] coordinates of a point at a given length of a shape.\n *\n * @param {string | SVGPath.pathArray} pathInput the `pathArray` to look into\n * @param {number} distance the length of the shape to look at\n * @returns {{x: number, y: number}} the requested {x, y} point coordinates\n */\nfunction getPointAtLength(pathInput, distance) {\n return pathLengthFactory(pathInput, distance).point;\n}\n\n/**\n * d3-polygon-area\n * https://github.com/d3/d3-polygon\n *\n * Returns the area of a polygon.\n *\n * @param {number[][]} polygon an array of coordinates\n * @returns {number} the polygon area\n */\nfunction polygonArea(polygon) {\n const n = polygon.length;\n let i = -1;\n let a;\n let b = polygon[n - 1];\n let area = 0;\n\n /* eslint-disable-next-line */\n while (++i < n) {\n a = b;\n b = polygon[i];\n area += a[1] * b[0] - a[0] * b[1];\n }\n\n return area / 2;\n}\n\n/**\n * d3-polygon-length\n * https://github.com/d3/d3-polygon\n *\n * Returns the perimeter of a polygon.\n *\n * @param {[number,number][]} polygon an array of coordinates\n * @returns {number} the polygon length\n */\nfunction polygonLength(polygon) {\n return polygon.reduce((length, point, i) => {\n if (i) {\n return length + distanceSquareRoot(polygon[i - 1], point);\n }\n return 0;\n }, 0);\n}\n\n/**\n * A global namespace for epsilon.\n *\n * @type {number}\n */\nconst epsilon = 1e-9;\n\n/**\n * Coordinates Interpolation Function.\n *\n * @param {number[][]} a start coordinates\n * @param {number[][]} b end coordinates\n * @param {string} l amount of coordinates\n * @param {number} v progress\n * @returns {number[][]} the interpolated coordinates\n */\nfunction coords(a, b, l, v) {\n const points = [];\n for (let i = 0; i < l; i += 1) { // for each point\n points[i] = [];\n for (let j = 0; j < 2; j += 1) { // each point coordinate\n // eslint-disable-next-line no-bitwise\n points[i].push(((a[i][j] + (b[i][j] - a[i][j]) * v) * 1000 >> 0) / 1000);\n }\n }\n return points;\n}\n\n/* SVGMorph = {\n property: 'path',\n defaultValue: [],\n interpolators: {numbers,coords} },\n functions = { prepareStart, prepareProperty, onStart, crossCheck }\n} */\n\n// Component functions\n/**\n * Sets the property update function.\n * @param {string} tweenProp the property name\n */\nfunction onStartSVGMorph(tweenProp) {\n if (!KEC[tweenProp] && this.valuesEnd[tweenProp]) {\n KEC[tweenProp] = (elem, a, b, v) => {\n const path1 = a.polygon; const path2 = b.polygon;\n const len = path2.length;\n elem.setAttribute('d', (v === 1 ? b.original : `M${coords(path1, path2, len, v).join('L')}Z`));\n };\n }\n}\n\n// Component Util\n// original script flubber\n// https://github.com/veltman/flubber\n\n/**\n * Returns an existing polygon or false if it's not a polygon.\n * @param {SVGPath.pathArray} pathArray target `pathArray`\n * @returns {KUTE.exactPolygon | false} the resulted polygon\n */\nfunction exactPolygon(pathArray) {\n const polygon = [];\n const pathlen = pathArray.length;\n let segment = [];\n let pathCommand = '';\n\n if (!pathArray.length || pathArray[0][0] !== 'M') {\n return false;\n }\n\n for (let i = 0; i < pathlen; i += 1) {\n segment = pathArray[i];\n [pathCommand] = segment;\n\n if ((pathCommand === 'M' && i) || pathCommand === 'Z') {\n break; // !!\n } else if ('ML'.includes(pathCommand)) {\n polygon.push([segment[1], segment[2]]);\n } else {\n return false;\n }\n }\n\n return pathlen ? { polygon } : false;\n}\n\n/**\n * Returns a new polygon polygon.\n * @param {SVGPath.pathArray} parsed target `pathArray`\n * @param {number} maxLength the maximum segment length\n * @returns {KUTE.exactPolygon} the resulted polygon\n */\nfunction approximatePolygon(parsed, maxLength) {\n const ringPath = splitPath(parsed)[0];\n const normalPath = normalizePath(ringPath);\n const pathLength = getTotalLength(normalPath);\n const polygon = [];\n let numPoints = 3;\n let point;\n\n if (maxLength && !Number.isNaN(maxLength) && +maxLength > 0) {\n numPoints = Math.max(numPoints, Math.ceil(pathLength / maxLength));\n }\n\n for (let i = 0; i < numPoints; i += 1) {\n point = getPointAtLength(normalPath, (pathLength * i) / numPoints);\n polygon.push([point.x, point.y]);\n }\n\n // Make all rings clockwise\n if (polygonArea(polygon) > 0) {\n polygon.reverse();\n }\n\n return {\n polygon,\n skipBisect: true,\n };\n}\n\n/**\n * Parses a path string and returns a polygon array.\n * @param {string} str path string\n * @param {number} maxLength maximum amount of points\n * @returns {KUTE.exactPolygon} the polygon array we need\n */\nfunction pathStringToPolygon(str, maxLength) {\n const parsed = normalizePath(str);\n return exactPolygon(parsed) || approximatePolygon(parsed, maxLength);\n}\n\n/**\n * Rotates a polygon to better match its pair.\n * @param {KUTE.polygonMorph} polygon the target polygon\n * @param {KUTE.polygonMorph} vs the reference polygon\n */\nfunction rotatePolygon(polygon, vs) {\n const len = polygon.length;\n let min = Infinity;\n let bestOffset;\n let sumOfSquares = 0;\n let spliced;\n let d;\n let p;\n\n for (let offset = 0; offset < len; offset += 1) {\n sumOfSquares = 0;\n\n for (let i = 0; i < vs.length; i += 1) {\n p = vs[i];\n d = distanceSquareRoot(polygon[(offset + i) % len], p);\n sumOfSquares += d * d;\n }\n\n if (sumOfSquares < min) {\n min = sumOfSquares;\n bestOffset = offset;\n }\n }\n\n if (bestOffset) {\n spliced = polygon.splice(0, bestOffset);\n polygon.splice(polygon.length, 0, ...spliced);\n }\n}\n\n/**\n * Sample additional points for a polygon to better match its pair.\n * @param {KUTE.polygonObject} polygon the target polygon\n * @param {number} numPoints the amount of points needed\n */\nfunction addPoints(polygon, numPoints) {\n const desiredLength = polygon.length + numPoints;\n const step = polygonLength(polygon) / numPoints;\n\n let i = 0;\n let cursor = 0;\n let insertAt = step / 2;\n let a;\n let b;\n let segment;\n\n while (polygon.length < desiredLength) {\n a = polygon[i];\n b = polygon[(i + 1) % polygon.length];\n\n segment = distanceSquareRoot(a, b);\n\n if (insertAt <= cursor + segment) {\n polygon.splice(i + 1, 0, segment\n ? midPoint(a, b, (insertAt - cursor) / segment)\n : a.slice(0));\n insertAt += step;\n } else {\n cursor += segment;\n i += 1;\n }\n }\n}\n\n/**\n * Split segments of a polygon until it reaches a certain\n * amount of points.\n * @param {number[][]} polygon the target polygon\n * @param {number} maxSegmentLength the maximum amount of points\n */\nfunction bisect(polygon, maxSegmentLength = Infinity) {\n let a = [];\n let b = [];\n\n for (let i = 0; i < polygon.length; i += 1) {\n a = polygon[i];\n b = i === polygon.length - 1 ? polygon[0] : polygon[i + 1];\n\n // Could splice the whole set for a segment instead, but a bit messy\n while (distanceSquareRoot(a, b) > maxSegmentLength) {\n b = midPoint(a, b, 0.5);\n polygon.splice(i + 1, 0, b);\n }\n }\n}\n\n/**\n * Checks the validity of a polygon.\n * @param {KUTE.polygonMorph} polygon the target polygon\n * @returns {boolean} the result of the check\n */\nfunction validPolygon(polygon) {\n return Array.isArray(polygon)\n && polygon.every((point) => Array.isArray(point)\n && point.length === 2\n && !Number.isNaN(point[0])\n && !Number.isNaN(point[1]));\n}\n\n/**\n * Returns a new polygon and its length from string or another `Array`.\n * @param {KUTE.polygonMorph | string} input the target polygon\n * @param {number} maxSegmentLength the maximum amount of points\n * @returns {KUTE.polygonMorph} normalized polygon\n */\nfunction getPolygon(input, maxSegmentLength) {\n let skipBisect;\n let polygon;\n\n if (typeof (input) === 'string') {\n const converted = pathStringToPolygon(input, maxSegmentLength);\n ({ polygon, skipBisect } = converted);\n } else if (!Array.isArray(input)) {\n throw Error(`${invalidPathValue}: ${input}`);\n }\n\n /** @type {KUTE.polygonMorph} */\n const points = [...polygon];\n\n if (!validPolygon(points)) {\n throw Error(`${invalidPathValue}: ${points}`);\n }\n\n // TODO skip this test to avoid scale issues?\n // Chosen epsilon (1e-6) is problematic for small coordinate range, we now use 1e-9\n if (points.length > 1 && distanceSquareRoot(points[0], points[points.length - 1]) < epsilon) {\n points.pop();\n }\n\n if (!skipBisect && maxSegmentLength\n && !Number.isNaN(maxSegmentLength) && (+maxSegmentLength) > 0) {\n bisect(points, maxSegmentLength);\n }\n\n return points;\n}\n\n/**\n * Returns two new polygons ready to tween.\n * @param {string} path1 the first path string\n * @param {string} path2 the second path string\n * @param {number} precision the morphPrecision option value\n * @returns {KUTE.polygonMorph[]} the two polygons\n */\nfunction getInterpolationPoints(path1, path2, precision) {\n const morphPrecision = precision || defaultOptions$1.morphPrecision;\n const fromRing = getPolygon(path1, morphPrecision);\n const toRing = getPolygon(path2, morphPrecision);\n const diff = fromRing.length - toRing.length;\n\n addPoints(fromRing, diff < 0 ? diff * -1 : 0);\n addPoints(toRing, diff > 0 ? diff : 0);\n\n rotatePolygon(fromRing, toRing);\n\n return [roundPath(fromRing), roundPath(toRing)];\n}\n\n// Component functions\n/**\n * Returns the current `d` attribute value.\n * @returns {string} the `d` attribute value\n */\nfunction getSVGMorph(/* tweenProp */) {\n return this.element.getAttribute('d');\n}\n\n/**\n * Returns the property tween object.\n * @param {string} _ the property name\n * @param {string | KUTE.polygonObject} value the property value\n * @returns {KUTE.polygonObject} the property tween object\n */\nfunction prepareSVGMorph(/* tweenProp */_, value) {\n const pathObject = {};\n // remove newlines, they brake JSON strings sometimes\n const pathReg = new RegExp('\\\\n', 'ig');\n let elem = null;\n\n if (value instanceof SVGPathElement) {\n elem = value;\n } else if (/^\\.|^#/.test(value)) {\n elem = selector(value);\n }\n\n // first make sure we return pre-processed values\n if (typeof (value) === 'object' && value.polygon) {\n return value;\n } if (elem && ['path', 'glyph'].includes(elem.tagName)) {\n pathObject.original = elem.getAttribute('d').replace(pathReg, '');\n // maybe it's a string path already\n } else if (!elem && typeof (value) === 'string') {\n pathObject.original = value.replace(pathReg, '');\n }\n\n return pathObject;\n}\n\n/**\n * Enables the `to()` method by preparing the tween object in advance.\n * @param {string} prop the `path` property name\n */\nfunction crossCheckSVGMorph(prop) {\n if (this.valuesEnd[prop]) {\n const pathArray1 = this.valuesStart[prop].polygon;\n const pathArray2 = this.valuesEnd[prop].polygon;\n // skip already processed paths\n // allow the component to work with pre-processed values\n if (!pathArray1 || !pathArray2 || (pathArray1.length !== pathArray2.length)) {\n const p1 = this.valuesStart[prop].original;\n const p2 = this.valuesEnd[prop].original;\n // process morphPrecision\n const morphPrecision = this._morphPrecision\n ? parseInt(this._morphPrecision, 10)\n : defaultOptions$1.morphPrecision;\n\n const [path1, path2] = getInterpolationPoints(p1, p2, morphPrecision);\n this.valuesStart[prop].polygon = path1;\n this.valuesEnd[prop].polygon = path2;\n }\n }\n}\n\n// All Component Functions\nconst svgMorphFunctions = {\n prepareStart: getSVGMorph,\n prepareProperty: prepareSVGMorph,\n onStart: onStartSVGMorph,\n crossCheck: crossCheckSVGMorph,\n};\n\n// Component Full\nconst SVGMorph = {\n component: 'svgMorph',\n property: 'path',\n defaultValue: [],\n Interpolate: coords,\n defaultOptions: { morphPrecision: 10 },\n functions: svgMorphFunctions,\n // Export utils to global for faster execution\n Util: {\n // component\n addPoints,\n bisect,\n getPolygon,\n validPolygon,\n getInterpolationPoints,\n pathStringToPolygon,\n distanceSquareRoot,\n midPoint,\n approximatePolygon,\n rotatePolygon,\n // svg-path-commander\n pathToString,\n pathToCurve,\n getTotalLength,\n getPointAtLength,\n polygonArea,\n roundPath,\n },\n};\n\nconst Components = {\n EssentialBoxModel: BoxModelEssential,\n ColorsProperties: colorProperties,\n HTMLAttributes: htmlAttributes,\n OpacityProperty,\n TextWriteProp: TextWrite,\n TransformFunctions,\n SVGDraw: SvgDrawProperty,\n SVGMorph,\n};\n\n// init components\nObject.keys(Components).forEach((component) => {\n const compOps = Components[component];\n Components[component] = new Animation(compOps);\n});\n\nvar version = \"2.2.4\";\n\n// @ts-ignore\n\n/**\n * A global namespace for library version.\n * @type {string}\n */\nconst Version = version;\n\n// KUTE.js standard distribution version\n\nconst KUTE = {\n Animation,\n Components,\n\n // Tween Interface\n Tween,\n fromTo,\n to,\n // Tween Collection\n TweenCollection,\n allFromTo,\n allTo,\n // Tween Interface\n\n Objects,\n Util,\n Easing,\n CubicBezier,\n Render,\n Interpolate: interpolate,\n Process,\n Internals: internals,\n Selector: selector,\n Version,\n};\n\nexport { KUTE as default };\n","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","!function(t,o){\"function\"==typeof define&&define.amd?define(o):\"object\"==typeof exports?module.exports=o():t.tingle=o()}(this,function(){var o=!1;function t(t){this.opts=function(){for(var t=1;t',this.modalCloseBtnLabel=document.createElement(\"span\"),this.modalCloseBtnLabel.classList.add(\"tingle-modal__closeLabel\"),this.modalCloseBtnLabel.innerHTML=this.opts.closeLabel,this.modalCloseBtn.appendChild(this.modalCloseBtnIcon),this.modalCloseBtn.appendChild(this.modalCloseBtnLabel));this.modalBox=document.createElement(\"div\"),this.modalBox.classList.add(\"tingle-modal-box\"),this.modalBoxContent=document.createElement(\"div\"),this.modalBoxContent.classList.add(\"tingle-modal-box__content\"),this.modalBox.appendChild(this.modalBoxContent),-1!==this.opts.closeMethods.indexOf(\"button\")&&this.modal.appendChild(this.modalCloseBtn);this.modal.appendChild(this.modalBox)}.call(this),function(){this._events={clickCloseBtn:this.close.bind(this),clickOverlay:function(t){var o=this.modal.offsetWidth-this.modal.clientWidth,e=t.clientX>=this.modal.offsetWidth-15,s=this.modal.scrollHeight!==this.modal.offsetHeight;if(\"MacIntel\"===navigator.platform&&0==o&&e&&s)return;-1!==this.opts.closeMethods.indexOf(\"overlay\")&&!function(t,o){for(;(t=t.parentElement)&&!t.classList.contains(o););return t}(t.target,\"tingle-modal\")&&t.clientX