var i=Object.defineProperty;var y=(e,s,t)=>s in e?i(e,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[s]=t;var r=(e,s,t)=>(y(e,typeof s!="symbol"?s+"":s,t),t);import"./outputWidgets.b9aa154a.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},s=new Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="b36bb604-2cf4-4030-bd1f-b36b93b6be5c",e._sentryDebugIdIdentifier="sentry-dbid-b36bb604-2cf4-4030-bd1f-b36b93b6be5c")}catch{}})();class d{static get isMac(){return navigator.userAgent.includes("Mac OS X")}static get buildPlatform(){return{}.CURRENT_PLATFORM||"web"}}const u=e=>d.isMac&&e.ctrlKey,b=e=>d.isMac?e.metaKey:e.ctrlKey,f=e=>e.altKey,l=e=>e.shiftKey,c={alt:f,"arrow-up":e=>e.code==="ArrowUp","arrow-down":e=>e.code==="ArrowDown","arrow-left":e=>e.code==="ArrowLeft","arrow-right":e=>e.code==="ArrowRight",ctrl:b,delete:e=>d.isMac?e.code==="Backspace":e.code==="Delete",enter:e=>e.code==="Enter",escape:e=>e.code==="Escape",shift:l,space:e=>e.code==="Space",a:e=>e.code==="KeyA",b:e=>e.code==="KeyB",c:e=>e.code==="KeyC",d:e=>e.code==="KeyD",f:e=>e.code==="KeyF",g:e=>e.code==="KeyG",h:e=>e.code==="KeyH",k:e=>e.code==="KeyK",p:e=>e.code==="KeyP",v:e=>e.code==="KeyV",x:e=>e.code==="KeyX",z:e=>e.code==="KeyZ",0:e=>e.code==="Digit0","[":e=>e.code==="BracketLeft","]":e=>e.code==="BracketRight"};class K{constructor(s){r(this,"pressedKeys");r(this,"evt");this.evt=s,this.pressedKeys={};const t=a=>n=>{Object.keys(c).forEach(o=>{c[o](n)&&this.setPressed(o,a)})};this.evt||(window.addEventListener("keydown",t(!0)),window.addEventListener("keyup",t(!1)))}setPressed(s,t){this.pressedKeys[s]=t}isPressed(s){var t;return this.evt?c[s](this.evt):(t=this.pressedKeys[s])!=null?t:!1}}const p=new K;export{f as a,b as c,p as k,u as m,l as s};
//# sourceMappingURL=keyboard.394147fd.js.map
