{"version":3,"file":"animations.js","sources":["animations.js"],"sourcesContent":["/* eslint-disable no-unused-vars */\n(function (Drupal) {\n Drupal.behaviors.animations = {\n attach: function (context) {\n Drupal.scaleElement = function (element) {\n if (!element) return;\n\n const observer = new IntersectionObserver((entries) => {\n entries.forEach((entry) => {\n if (entry.isIntersecting) {\n element.classList.add(\"scale--on\");\n observer.unobserve(entry.target);\n }\n });\n });\n\n observer.observe(element);\n };\n\n Drupal.showPaws = function (element) {\n if (!element) return;\n\n const paws = element.querySelectorAll(\".paws-wrapper__paw\");\n\n const observer = new IntersectionObserver(\n (entries) => {\n entries.forEach((entry) => {\n if (entry.intersectionRatio >= 0.5) {\n const order = [1, 0, 3, 2];\n order.forEach((val, i) => {\n setTimeout(() => {\n paws[val].classList.add(\"show\");\n }, i * 500);\n });\n observer.unobserve(entry.target);\n }\n });\n },\n {\n threshold: [0.1, 0.5],\n }\n );\n\n observer.observe(element);\n };\n },\n };\n})(Drupal);\n"],"names":["Drupal","behaviors","animations","attach","context","scaleElement","element","observer","IntersectionObserver","entries","forEach","entry","isIntersecting","classList","add","unobserve","target","observe","showPaws","paws","querySelectorAll","intersectionRatio","val","i","setTimeout","threshold"],"mappings":"CACWA,IACTA,EAAOC,UAAUC,WAAa,CAC5BC,OAAQ,SAAUC,GAChBJ,EAAOK,aAAe,SAAUC,GAC9B,GAAKA,EAAL,CAEA,IAAMC,EAAW,IAAIC,qBAAqB,IACxCC,EAAQC,QAAQ,IACVC,EAAMC,iBACRN,EAAQO,UAAUC,IAAI,WAAW,EACjCP,EAASQ,UAAUJ,EAAMK,MAAM,EAEnC,CAAC,CACH,CAAC,EAEDT,EAASU,QAAQX,CAAO,CAXJ,CAYtB,EAEAN,EAAOkB,SAAW,SAAUZ,GAC1B,GAAKA,EAAL,CAEA,IAAMa,EAAOb,EAAQc,iBAAiB,oBAAoB,EAEpDb,EAAW,IAAIC,qBACnB,IACEC,EAAQC,QAAQ,IACiB,IAA3BC,EAAMU,oBACM,CAAC,EAAG,EAAG,EAAG,GAClBX,QAAQ,CAACY,EAAKC,KAClBC,WAAW,KACTL,EAAKG,GAAKT,UAAUC,IAAI,MAAM,CAChC,EAAO,IAAJS,CAAO,CACZ,CAAC,EACDhB,EAASQ,UAAUJ,EAAMK,MAAM,EAEnC,CAAC,CACH,EACA,CACES,UAAW,CAAC,GAAK,GACnB,CACF,EAEAlB,EAASU,QAAQX,CAAO,CAvBJ,CAwBtB,CACF,CACF,CACD,GAAEN,MAAM"}