"use strict";var loadedrive=!1;const onGSRiveInteraction=()=>{if(!0===loadedrive)return;loadedrive=!0;let e=document.createElement("script");e.src="https://unpkg.com/@rive-app/canvas/rive.js",document.body.appendChild(e);let t=document.getElementsByClassName("gs-riveloader");for(let n=0;n<t.length;n++){let a=t[n];if(a.classList.contains("gs-riveloadnow"))continue;let o=a.querySelector("canvas"),r=o.getAttribute("data-id"),s=o.getAttribute("data-statemachine"),l=o.getAttribute("data-artboard");setTimeout(function(){if(o&&"undefined"!=typeof rive){let e=new rive.Rive({src:o.getAttribute("data-src"),canvas:o,artboard:l,stateMachines:s,autoplay:!0,onLoad(t){if(a.classList.add("rive-loaded"),e.resizeDrawingSurfaceToCanvas(),s){let n=e.stateMachineInputs(s);if(n.length>0)for(let o=0;o<n.length;o++){let l=n[o],d="stateMachineInput"+r+o;window[d]=l,console.log(d+" with name "+l.name+" is ready to use")}}let c="gsRIVE"+r;window[c]=e,console.log(c+" object is ready to use")}})}},300)}};document.body.addEventListener("mouseover",onGSRiveInteraction,{once:!0}),document.body.addEventListener("touchmove",onGSRiveInteraction,{once:!0}),window.addEventListener("scroll",onGSRiveInteraction,{once:!0}),document.body.addEventListener("keydown",onGSRiveInteraction,{once:!0});var requestIdleCallback=window.requestIdleCallback||function(e){let t=Date.now();return setTimeout(function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})},1)};let gspbrive=document.getElementsByClassName("gs-riveloader");for(let i=0;i<gspbrive.length;i++){let e=gspbrive[i];e.classList.contains("gs-loadnow")&&requestIdleCallback(function(){onGSRiveInteraction()},{timeout:500})}