!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.murphy=t():e.murphy=t()}(this,(()=>(()=>{var e={853:e=>{var t=.1,r="function"==typeof Float32Array;function a(e,t){return 1-3*t+3*e}function n(e,t){return 3*t-6*e}function o(e){return 3*e}function i(e,t,r){return((a(t,r)*e+n(t,r))*e+o(t))*e}function s(e,t,r){return 3*a(t,r)*e*e+2*n(t,r)*e+o(t)}function c(e){return e}e.exports=function(e,a,n,o){if(!(0<=e&&e<=1&&0<=n&&n<=1))throw new Error("bezier x values must be in [0, 1] range");if(e===a&&n===o)return c;for(var l=r?new Float32Array(11):new Array(11),p=0;p<11;++p)l[p]=i(p*t,e,n);return function(r){return 0===r?0:1===r?1:i(function(r){for(var a=0,o=1;10!==o&&l[o]<=r;++o)a+=t;--o;var c=a+(r-l[o])/(l[o+1]-l[o])*t,p=s(c,e,n);return p>=.001?function(e,t,r,a){for(var n=0;n<4;++n){var o=s(t,r,a);if(0===o)return t;t-=(i(t,r,a)-e)/o}return t}(r,c,e,n):0===p?c:function(e,t,r,a,n){var o,s,c=0;do{(o=i(s=t+(r-t)/2,a,n)-e)>0?r=s:t=s}while(Math.abs(o)>1e-7&&++c<10);return s}(r,a,a+t,e,n)}(r),a,o)}}}},t={};function r(a){var n=t[a];if(void 0!==n)return n.exports;var o=t[a]={exports:{}};return e[a](o,o.exports,r),o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var a in t)r.o(t,a)&&!r.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var a={};return(()=>{"use strict";r.d(a,{default:()=>M});var e=r(853),t=r.n(e);const n={LEFT_TO_RIGHT:"left-to-right",RIGHT_TO_LEFT:"right-to-left",TOP_TO_BOTTOM:"top-to-bottom",BOTTOM_TO_TOP:"bottom-to-top",MOBILE_BREAKPOINT:768,MOBILE_REGEX:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i,FLIP_LEFT:"flip-left",FLIP_RIGHT:"flip-right",FLIP_UP:"flip-up",FLIP_DOWN:"flip-down",ZOOM_IN:"zoom-in",ZOOM_OUT:"zoom-out",FADE:"fade",FADE_UP:"fade-up",FADE_DOWN:"fade-down",FADE_LEFT:"fade-left",FADE_RIGHT:"fade-right",ROTATE_LEFT:"rotate-left",ROTATE_RIGHT:"rotate-right",SCALE_UP:"scale-up",SCALE_DOWN:"scale-down",SLIDE_UP:"slide-up",SLIDE_DOWN:"slide-down",SLIDE_LEFT:"slide-left",SLIDE_RIGHT:"slide-right",BOUNCE_IN:"bounce-in",BOUNCE_OUT:"bounce-out",MURPHY_SELECTOR:"[data-murphy]",APPEARANCE_DISTANCE_DEFAULT:100,ELEMENT_DISTANCE_DEFAULT:50,EASE_DEFAULT:"cubic-bezier(0.25, 0.1, 0.25, 1)",ANIMATION_DELAY_DEFAULT:0,THRESHOLD_DEFAULT:.1,ANIMATION_DURATION_DEFAULT:300,VIEWPORT_POSITIONS:{TOP:"0px 0px 0px 0px",MIDDLE:"0px 0px -50% 0px",BOTTOM:"0px 0px 0px 0px",QUARTER:"0px 0px -25% 0px",THREE_QUARTERS:"0px 0px -75% 0px"},ANIMATION_CONFIGS:{"flip-left":{transform:"rotateY(-90deg)",transformOrigin:"left center",opacity:0},"flip-right":{transform:"rotateY(90deg)",transformOrigin:"right center",opacity:0},"flip-up":{transform:"rotateX(-90deg)",transformOrigin:"center top",opacity:0},"flip-down":{transform:"rotateX(90deg)",transformOrigin:"center bottom",opacity:0},"zoom-in":{transform:"scale(0.5)",opacity:0},"zoom-out":{transform:"scale(1.5)",opacity:0},fade:{opacity:0},"fade-up":{transform:"translateY(20px)",opacity:0},"fade-down":{transform:"translateY(-20px)",opacity:0},"fade-left":{transform:"translateX(20px)",opacity:0},"fade-right":{transform:"translateX(-20px)",opacity:0},"rotate-left":{transform:"rotate(-180deg)",opacity:0},"rotate-right":{transform:"rotate(180deg)",opacity:0},"scale-up":{transform:"scale(0.5)",opacity:0},"scale-down":{transform:"scale(1.5)",opacity:0},"slide-up":{transform:"translateY(100%)",opacity:0},"slide-down":{transform:"translateY(-100%)",opacity:0},"slide-left":{transform:"translateX(100%)",opacity:0},"slide-right":{transform:"translateX(-100%)",opacity:0},"bounce-in":{transform:"scale(0.3) translateY(100px)",opacity:0},"bounce-out":{transform:"scale(1.2) translateY(-50px)",opacity:0},elastic:{transform:"scale(0.5) translateY(80px)",opacity:0},spring:{transform:"scale(0.8) translateY(60px)",opacity:0},smooth:[.4,0,.2,1],sharp:[.4,0,.6,1],swift:[.4,0,.2,1],"material-standard":[.4,0,.2,1],"material-decelerate":[0,0,.2,1],"material-accelerate":[.4,0,1,1]},BEZIER_EASINGS:{ease:[.25,.1,.25,1],linear:[0,0,1,1],"ease-in":[.42,0,1,1],"ease-out":[0,0,.58,1],"ease-in-out":[.42,0,.58,1],"material-standard":[.4,0,.2,1],"material-decelerate":[0,0,.2,1],"material-accelerate":[.4,0,1,1],bounce:[.68,-.6,.32,1.6],elastic:[.68,-.6,.32,1.6],smooth:[.4,0,.2,1],sharp:[.4,0,.6,1],swift:[.4,0,.2,1],spring:[.68,-.6,.32,1.6]}},{LEFT_TO_RIGHT:o,RIGHT_TO_LEFT:i,TOP_TO_BOTTOM:s,BOTTOM_TO_TOP:c,MURPHY_SELECTOR:l,APPEARANCE_DISTANCE_DEFAULT:p,ELEMENT_DISTANCE_DEFAULT:u,ANIMATION_DELAY_DEFAULT:m,THRESHOLD_DEFAULT:d,ANIMATION_DURATION_DEFAULT:f,BEZIER_EASINGS:T}=n,E=(e,t,r={})=>{const a=new CustomEvent(`murphy:${t}`,{detail:{element:e,...r}});document.dispatchEvent(a)},y=e=>{if(!b())return _();let t=l;return e&&(t+=`[data-murphy-group="${e}"]`),document.querySelectorAll(t).forEach((e=>{I(e)}))},_=()=>{document.querySelectorAll(l).forEach((e=>{e.style.opacity="1",e.style.transform="translate(0)",e.classList.add("murphy-animated"),E(e,"cancel")}))},O=e=>{let t=l;e&&(t+=`[data-murphy-group="${e}"]`),document.querySelectorAll(t).forEach((e=>{e.style.opacity="1",e.style.transform="none",e.offsetWidth;const t=e.dataset.murphy||c,r=e.dataset.murphyElementDistance||u,a=parseInt(e.dataset.murphyAnimationDuration)||f,o=x(e.dataset.murphyEase||n.EASE_DEFAULT),i=h(t,r),s=e.animate([{transform:"none",opacity:1},{transform:i,opacity:0}],{duration:a,easing:o,fill:"forwards"});e._animation=s,s.onfinish=()=>{e.classList.remove("murphy-animated"),e.classList.remove("murphy-in"),e.classList.remove("murphy-out"),delete e._animation,e._observer&&(e._observer.disconnect(),delete e._observer),E(e,"reset")}}))},A=()=>{document.querySelectorAll(l).forEach((e=>{e._observer&&(e._observer.disconnect(),delete e._observer),E(e,"cleanup")}))},I=e=>{if("true"===e.dataset.murphyDisableMobile&&(window.innerWidth<=n.MOBILE_BREAKPOINT||n.MOBILE_REGEX.test(navigator.userAgent)))return e.style.opacity="1",void(e.style.transform="none");const t=e.dataset.murphy||c,r=e.dataset.murphyAppearanceDistance||p,a=e.dataset.murphyElementDistance||u,o=e.dataset.murphyEase||"ease",i=parseInt(e.dataset.murphyAnimationDelay)||m,s=parseFloat(e.dataset.murphyElementThreshold)||d,l=parseInt(e.dataset.murphyAnimationDuration)||f;e.style.opacity="0",e.style.transform=h(t,a);let T=e.dataset.murphyRootMargin;if(T){const e=T.toUpperCase();n.VIEWPORT_POSITIONS[e]&&(T=n.VIEWPORT_POSITIONS[e])}else T=`0px 0px ${-1*r}px 0px`;D({elementOptions:{element:e,animationType:t,animationDuration:l,elementDistance:a,ease:o,delay:i,elementThreshold:s},observerOptions:{threshold:s,rootMargin:T}})},h=(e,t)=>{const r={[c]:`translateY(${t}px)`,[s]:`translateY(-${t}px)`,[o]:`translateX(-${t}px)`,[i]:`translateX(${t}px)`};return r[e]||r[c]},D=({elementOptions:e,observerOptions:t})=>{try{const r=e.element,a=e.animationType,n="true"===r.dataset.murphyMirror,o=new IntersectionObserver((()=>{let t;return(...i)=>{clearTimeout(t),t=setTimeout((()=>(t=>{t.forEach((t=>{const{intersectionRatio:i}=t,s=Number(e.elementThreshold)||0,c=.05,l=i<=c,p=i>c&&i=s-c&&!p?(L(r,{delay:e.delay,duration:e.animationDuration,easing:e.ease,distance:e.elementDistance,direction:a})(),n||o.unobserve(t.target),E(r,"in",{intersectionRatio:i})):n&&l&&!p&&(L(r,{delay:0,duration:e.animationDuration,easing:e.ease,distance:e.elementDistance,direction:a,reverse:!0})(),E(r,"out",{intersectionRatio:i}))}))})(...i)),100)}})(),t);r._observer=o,o.observe(r)}catch(t){L(element,{delay:e.delay,duration:e.animationDuration,easing:e.ease,distance:e.elementDistance,direction:animationType})(),E(element,"in",{error:"IntersectionObserver not supported"})}};function L(e,t){const{delay:r=n.ANIMATION_DELAY_DEFAULT,duration:a=n.ANIMATION_DURATION_DEFAULT,easing:o=n.EASE_DEFAULT,distance:i=n.ELEMENT_DISTANCE_DEFAULT,direction:s=n.LEFT_TO_RIGHT,reverse:c=!1}=t,l=Math.max(0,Number(a)||n.ANIMATION_DURATION_DEFAULT),p=Math.max(0,Number(r)||n.ANIMATION_DELAY_DEFAULT),u=Math.max(0,Number(i)||n.ELEMENT_DISTANCE_DEFAULT);return()=>{setTimeout((()=>{const t=x(o),r=n.ANIMATION_CONFIGS[s]||{transform:N(s,u),opacity:0},a=e.animate(c?[{transform:"none",opacity:1},r]:[r,{transform:"none",opacity:1}],{duration:l,easing:t,fill:"forwards"});e._animation=a,a.onfinish=()=>{c?e.classList.remove("murphy-animated"):e.classList.add("murphy-animated"),E(e,"finish",{reverse:c})}}),p)}}function N(e,t){switch(e){case n.LEFT_TO_RIGHT:return`translateX(-${t}px)`;case n.RIGHT_TO_LEFT:return`translateX(${t}px)`;case n.TOP_TO_BOTTOM:return`translateY(-${t}px)`;case n.BOTTOM_TO_TOP:return`translateY(${t}px)`;default:return"none"}}function x(e){if("string"==typeof e){if(e.startsWith("cubic-bezier"))return e;const t=n.BEZIER_EASINGS[e];if(t&&Array.isArray(t)&&4===t.length)return`cubic-bezier(${t.join(", ")})`}return n.EASE_DEFAULT}const b=()=>!!window.Animation&&!!(window.IntersectionObserver&&"IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype);class F{constructor(){b()||console.warn("MurphyJS: Your browser does not support required features")}animate(e,r){const a=document.querySelectorAll(e),{opacity:n=[0,1],x:o=[0,0],y:i=[0,0],duration:s=1e3,delay:c=0,ease:l="ease"}=r;a.forEach((e=>{e.style.opacity=n[0],e.style.transform=`translate(${o[0]}px, ${i[0]}px)`,setTimeout((()=>{const r=T[l]||t()(.4,0,.2,1),a=performance.now(),c=t=>{const l=t-a,p=Math.min(l/s,1),u=r(p),m=n[0]+(n[1]-n[0])*u,d=o[0]+(o[1]-o[0])*u,f=i[0]+(i[1]-i[0])*u;e.style.opacity=m,e.style.transform=`translate(${d}px, ${f}px)`,p<1?requestAnimationFrame(c):(e.style.opacity=n[1],e.style.transform=`translate(${o[1]}px, ${i[1]}px)`,E(e,"finish"))};requestAnimationFrame(c)}),c)}))}}"undefined"!=typeof window&&(window.murphy={play:y,cancel:_,reset:O,cleanup:A},window.Murphy=F);const M={play:y,cancel:_,reset:O,cleanup:A,Murphy:F}})(),a.default})()));