import{i as e}from"./preload-helper-B45gAKPr.js";import{pn as t}from"./iframe-NOj5DEP4.js";function n(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function r(e){return!e||typeof e!=`object`||Array.isArray(e)?null:e}var i=e((()=>{}));function a(){let e=``;for(let t=0;t<arguments.length;t++){let n=arguments[t];if(!(!n||n===!0)){if(typeof n==`string`){e=e?e+` `+n:n;continue}if(!(typeof n!=`object`||Array.isArray(n)))for(let t in n)n[t]&&(e=e?e+` `+t:t)}}return e}function o(e){return e===`Enter`||e===` `}function s(e,t,n={}){return n.disabled||!o(e.key)?!1:(e.preventDefault(),t(),!0)}function c({currentIndex:e,itemCount:t,key:n,orientation:r,wrap:i=!0}){if(t<=0)return null;let a=Math.min(t-1,Math.max(0,e));return n===`Home`?0:n===`End`?t-1:n===(r===`horizontal`?`ArrowLeft`:`ArrowUp`)?a>0?a-1:i?t-1:0:n===(r===`horizontal`?`ArrowRight`:`ArrowDown`)?a<t-1?a+1:i?0:t-1:null}function l(...e){globalThis.console.error(...e)}function u(e,t){for(let n=0;n<e.length;n+=1)if(!t?.(e[n]))return n;return-1}function d(e,t){for(let n=e.length-1;n>=0;--n)if(!t?.(e[n]))return n;return-1}function f(e,t,n,r,i={}){let{wrap:a=!1}=i,o=t>=0&&t<e.length?t:-1,s=(t,i)=>{for(let a=t;n===1?a<=i:a>=i;a+=n)if(!r?.(e[a]))return a;return null},c=s(t+n,n===1?e.length-1:0);return c===null?!a||e.length===0?o:(n===1?s(0,Math.min(t-1,e.length-1)):s(e.length-1,Math.max(t+1,0)))??o:c}var p=e((()=>{t()}));export{a,l as c,n as d,p as i,i as l,s as n,c as o,u as r,d as s,f as t,r as u};