Some checks failed
Build docker and publish / linux (1.24.5) (push) Failing after 39s
refactor(service): 修改banner和guild删除逻辑为软删除 fix(service): 修复删除操作使用软删除而非物理删除 build: 添加SQLite测试仓库实现 docs: 新增奖励管理字段拆分和批量抽奖UI改造文档 ci: 更新CI忽略文件 style: 清理无用资源文件
2 lines
7.5 KiB
JavaScript
2 lines
7.5 KiB
JavaScript
var e=Object.defineProperty,t=Object.defineProperties,n=Object.getOwnPropertyDescriptors,o=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable,s=(t,n,o)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[n]=o,u=(e,t)=>{for(var n in t||(t={}))r.call(t,n)&&s(e,n,t[n]);if(o)for(var n of o(t))a.call(t,n)&&s(e,n,t[n]);return e},c=(e,o)=>t(e,n(o));import{o as d,b as i,a as l,bL as f,V as p,W as v,_ as m,d as E,j as b,w as y,u as h,ai as w,n as L,aa as T,a7 as g,a2 as A,ak as P,y as x,f as k,aE as O,ap as S}from"./index-CZ0Lvzl5.js";const I="update:modelValue",N="change",R="input",F=e=>"undefined"!=typeof Element&&e instanceof Element,j=e=>Array.from(e.querySelectorAll('a[href],button:not([disabled]),button:not([hidden]),:not([tabindex="-1"]),input:not([disabled]),input:not([type="hidden"]),select:not([disabled]),textarea:not([disabled])')).filter(e=>K(e)&&(e=>"fixed"!==getComputedStyle(e).position&&null!==e.offsetParent)(e)),K=e=>{if(e.tabIndex>0||0===e.tabIndex&&null!==e.getAttribute("tabIndex"))return!0;if(e.tabIndex<0||e.hasAttribute("disabled")||"true"===e.getAttribute("aria-disabled"))return!1;switch(e.nodeName){case"A":return!!e.href&&"ignore"!==e.rel;case"INPUT":return!("hidden"===e.type||"file"===e.type);case"BUTTON":case"SELECT":case"TEXTAREA":return!0;default:return!1}},_=function(e,t,...n){let o;o=t.includes("mouse")||t.includes("click")?"MouseEvents":t.includes("key")?"KeyboardEvent":"HTMLEvents";const r=document.createEvent(o);return r.initEvent(t,...n),e.dispatchEvent(r),e},C=e=>!e.getAttribute("aria-owns"),q=(e,t,n)=>{const{parentNode:o}=e;if(!o)return null;const r=o.querySelectorAll(n);return r[Array.prototype.indexOf.call(r,e)+t]||null},U=(e,t)=>{if(!e||!e.focus)return;let n=!1;!F(e)||K(e)||e.getAttribute("tabindex")||(e.setAttribute("tabindex","-1"),n=!0),e.focus(t),F(e)&&n&&e.removeAttribute("tabindex")},B=e=>{e&&(U(e),!C(e)&&e.click())},D="focus-trap.focus-after-trapped",M="focus-trap.focus-after-released",H={cancelable:!0,bubbles:!1},W={cancelable:!0,bubbles:!1},$="focusAfterTrapped",V="focusAfterReleased",X=Symbol("elFocusTrap"),z=l(),G=l(0),J=l(0);let Q=0;const Y=e=>{const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0||e===document.activeElement?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t},Z=(e,t)=>{for(const n of e)if(!ee(n,t))return n},ee=(e,t)=>{if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1},te=(e,t)=>{if(e){const n=document.activeElement;U(e,{preventScroll:!0}),J.value=window.performance.now(),e!==n&&(e=>e instanceof HTMLInputElement&&"select"in e)(e)&&t&&e.select()}};function ne(e,t){const n=[...e],o=e.indexOf(t);return-1!==o&&n.splice(o,1),n}const oe=(()=>{let e=[];return{push:t=>{const n=e[0];n&&t!==n&&n.pause(),e=ne(e,t),e.unshift(t)},remove:t=>{var n,o;e=ne(e,t),null==(o=null==(n=e[0])?void 0:n.resume)||o.call(n)}}})(),re=()=>{z.value="pointer",G.value=window.performance.now()},ae=()=>{z.value="keyboard",G.value=window.performance.now()},se=e=>new CustomEvent("focus-trap.focusout-prevented",c(u({},W),{detail:e}));let ue=[];const ce=e=>{p(e)===v.esc&&ue.forEach(t=>t(e))};var de=m(E({name:"ElFocusTrap",inheritAttrs:!1,props:{loop:Boolean,trapped:Boolean,focusTrapEl:Object,focusStartEl:{type:[Object,String],default:"first"}},emits:[$,V,"focusin","focusout","focusout-prevented","release-requested"],setup(e,{emit:t}){const n=l();let o,r;const{focusReason:a}=(d(()=>{0===Q&&(document.addEventListener("mousedown",re),document.addEventListener("touchstart",re),document.addEventListener("keydown",ae)),Q++}),i(()=>{Q--,Q<=0&&(document.removeEventListener("mousedown",re),document.removeEventListener("touchstart",re),document.removeEventListener("keydown",ae))}),{focusReason:z,lastUserFocusTimestamp:G,lastAutomatedFocusTimestamp:J});var s;s=n=>{e.trapped&&!m.paused&&t("release-requested",n)},d(()=>{0===ue.length&&document.addEventListener("keydown",ce),f&&ue.push(s)}),i(()=>{ue=ue.filter(e=>e!==s),0===ue.length&&f&&document.removeEventListener("keydown",ce)});const m={paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}},E=n=>{if(!e.loop&&!e.trapped)return;if(m.paused)return;const{altKey:o,ctrlKey:r,metaKey:s,currentTarget:u,shiftKey:c}=n,{loop:d}=e,i=p(n)===v.tab&&!o&&!r&&!s,l=document.activeElement;if(i&&l){const e=u,[o,r]=(e=>{const t=Y(e);return[Z(t,e),Z(t.reverse(),e)]})(e);if(o&&r)if(c||l!==r){if(c&&[o,e].includes(l)){const e=se({focusReason:a.value});t("focusout-prevented",e),e.defaultPrevented||(n.preventDefault(),d&&te(r,!0))}}else{const e=se({focusReason:a.value});t("focusout-prevented",e),e.defaultPrevented||(n.preventDefault(),d&&te(o,!0))}else if(l===e){const e=se({focusReason:a.value});t("focusout-prevented",e),e.defaultPrevented||n.preventDefault()}}};g(X,{focusTrapRef:n,onKeydown:E}),y(()=>e.focusTrapEl,e=>{e&&(n.value=e)},{immediate:!0}),y([n],([e],[t])=>{e&&(e.addEventListener("keydown",E),e.addEventListener("focusin",P),e.addEventListener("focusout",x)),t&&(t.removeEventListener("keydown",E),t.removeEventListener("focusin",P),t.removeEventListener("focusout",x))});const b=e=>{t($,e)},A=e=>t(V,e),P=a=>{const s=h(n);if(!s)return;const u=a.target,c=a.relatedTarget,d=u&&s.contains(u);if(!e.trapped){c&&s.contains(c)||(o=c)}d&&t("focusin",a),m.paused||e.trapped&&(d?r=u:te(r,!0))},x=o=>{const s=h(n);if(!m.paused&&s)if(e.trapped){const n=o.relatedTarget;w(n)||s.contains(n)||setTimeout(()=>{if(!m.paused&&e.trapped){const e=se({focusReason:a.value});t("focusout-prevented",e),e.defaultPrevented||te(r,!0)}},0)}else{const e=o.target;e&&s.contains(e)||t("focusout",o)}};function k(){return t=this,r=null,a=function*(){yield L();const t=h(n);if(t){oe.push(m);const n=t.contains(document.activeElement)?o:document.activeElement;if(o=n,!t.contains(n)){const o=new Event(D,H);t.addEventListener(D,b),t.dispatchEvent(o),o.defaultPrevented||L(()=>{let o=e.focusStartEl;T(o)||(te(o),document.activeElement!==o&&(o="first")),"first"===o&&((e,t=!1)=>{const n=document.activeElement;for(const o of e)if(te(o,t),document.activeElement!==n)return})(Y(t),!0),document.activeElement!==n&&"container"!==o||te(t)})}}},new Promise((e,n)=>{var o=e=>{try{u(a.next(e))}catch(t){n(t)}},s=e=>{try{u(a.throw(e))}catch(t){n(t)}},u=t=>t.done?e(t.value):Promise.resolve(t.value).then(o,s);u((a=a.apply(t,r)).next())});var t,r,a}function O(){const e=h(n);if(e){e.removeEventListener(D,b);const t=new CustomEvent(M,c(u({},H),{detail:{focusReason:a.value}}));e.addEventListener(M,A),e.dispatchEvent(t),t.defaultPrevented||"keyboard"!=a.value&&G.value>J.value&&!e.contains(document.activeElement)||te(null!=o?o:document.body),e.removeEventListener(M,A),oe.remove(m),o=null,r=null}}return d(()=>{e.trapped&&k(),y(()=>e.trapped,e=>{e?k():O()})}),i(()=>{e.trapped&&O(),n.value&&(n.value.removeEventListener("keydown",E),n.value.removeEventListener("focusin",P),n.value.removeEventListener("focusout",x),n.value=void 0)}),{onKeydown:E}}}),[["render",function(e,t,n,o,r,a){return b(e.$slots,"default",{handleKeydown:e.onKeydown})}],["__file","focus-trap.vue"]]);const ie=A({to:{type:P([String,Object]),required:!0},disabled:Boolean});const le=S(m(E({__name:"teleport",props:ie,setup:e=>(e,t)=>e.disabled?b(e.$slots,"default",{key:0}):(k(),x(O,{key:1,to:e.to},[b(e.$slots,"default")],8,["to"]))}),[["__file","teleport.vue"]]));export{N as C,de as E,X as F,R as I,I as U,ie as a,le as b,C as c,B as d,U as f,q as g,K as i,j as o,_ as t};
|