f7cloud_client/apps/photos/js/useHotKey-CXYH7Vg8.chunk.mjs
root 8b6a0139db f7cloud_client
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-17 22:59:26 +00:00

3 lines
1.1 KiB
JavaScript

import{ae as r}from"./index-BMeBqg0T.chunk.mjs";const u=window.OCP?.Accessibility?.disableKeyboardShortcuts?.(),l=/mac|ipad|iphone|darwin/i.test(navigator.userAgent);function m(t){return!(t.target instanceof HTMLElement)||t.target instanceof HTMLInputElement||t.target instanceof HTMLTextAreaElement||t.target instanceof HTMLSelectElement||t.target.isContentEditable?!0:document.getElementsByClassName("modal-mask").length!==0}function c(t,n){return e=>{if((l?e.metaKey:e.ctrlKey)===!!n.ctrl){if(e.altKey!==!!n.alt||n.shift!==void 0&&e.shiftKey!==!!n.shift||m(e))return;n.prevent&&e.preventDefault(),n.stop&&e.stopPropagation(),t(e)}}}function d(t,n=()=>{},e={}){if(u)return()=>{};const i=(a,s)=>e.caseSensitive?a.key===s:a.key.toLowerCase()===s.toLowerCase(),o=a=>typeof t=="function"?t(a):typeof t=="string"?i(a,t):Array.isArray(t)?t.some(s=>i(a,s)):!0,f=r(o,c(n,e),{eventName:"keydown",dedupe:!0,passive:!e.prevent}),p=e.push?r(o,c(n,e),{eventName:"keyup",passive:!e.prevent}):()=>{};return()=>{f(),p()}}export{d as u};
//# sourceMappingURL=useHotKey-CXYH7Vg8.chunk.mjs.map