import{V as E,h as g,m as x,a3 as P,as as l,at as f,au as w,d as m,al as V,am as I,a0 as M}from"./DNoLdQ8h.js";function F(e){return e.endsWith("capture")&&e!=="gotpointercapture"&&e!=="lostpointercapture"}const N=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function G(e){return N.includes(e)}const O={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function U(e){return e=e.toLowerCase(),O[e]??e}const W=["touchstart","touchmove"];function X(e){return W.includes(e)}const j=["textarea","script","style","title"];function H(e){return j.includes(e)}function J(e,t){if(t){const r=document.body;e.autofocus=!0,E(()=>{document.activeElement===r&&e.focus()})}}function K(e){g&&x(e)!==null&&P(e)}let y=!1;function q(){y||(y=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{var t;if(!e.defaultPrevented)for(const r of e.target.elements)(t=r.__on_r)==null||t.call(r)})},{capture:!0}))}function k(e){var t=w,r=m;l(null),f(null);try{return e()}finally{l(t),f(r)}}function Q(e,t,r,o=r){e.addEventListener(t,()=>k(r));const n=e.__on_r;n?e.__on_r=()=>{n(),o(!0)}:e.__on_r=()=>o(!0),q()}const B=new Set,C=new Set;function Y(e){if(!g)return;e.onload&&e.removeAttribute("onload"),e.onerror&&e.removeAttribute("onerror");const t=e.__e;t!==void 0&&(e.__e=void 0,queueMicrotask(()=>{e.isConnected&&e.dispatchEvent(t)}))}function D(e,t,r,o={}){function n(a){if(o.capture||R.call(t,a),!a.cancelBubble)return k(()=>r==null?void 0:r.call(this,a))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?E(()=>{t.addEventListener(e,n,o)}):t.addEventListener(e,n,o),n}function Z(e,t,r,o,n){var a={capture:o,passive:n},i=D(e,t,r,a);(t===document.body||t===window||t===document)&&V(()=>{t.removeEventListener(e,i,a)})}function $(e){for(var t=0;t<e.length;t++)B.add(e[t]);for(var r of C)r(e)}function R(e){var b;var t=this,r=t.ownerDocument,o=e.type,n=((b=e.composedPath)==null?void 0:b.call(e))||[],a=n[0]||e.target,i=0,p=e.__root;if(p){var _=n.indexOf(p);if(_!==-1&&(t===document||t===window)){e.__root=t;return}var v=n.indexOf(t);if(v===-1)return;_<=v&&(i=_)}if(a=n[i]||e.target,a!==t){I(e,"currentTarget",{configurable:!0,get(){return a||r}});var T=w,S=m;l(null),f(null);try{for(var u,h=[];a!==null;){var d=a.assignedSlot||a.parentNode||a.host||null;try{var s=a["__"+o];if(s!=null&&(!a.disabled||e.target===a))if(M(s)){var[L,...A]=s;L.apply(a,[e,...A])}else s.call(a,e)}catch(c){u?h.push(c):u=c}if(e.cancelBubble||d===t||d===null)break;a=d}if(u){for(let c of h)queueMicrotask(()=>{throw c});throw u}}finally{e.__root=t,delete e.currentTarget,l(T),f(S)}}}export{F as a,J as b,D as c,$ as d,Z as e,q as f,G as g,Y as h,H as i,B as j,C as k,Q as l,R as m,U as n,X as o,K as r};
