import{am as f,an as l,ao as y,Q as b,ap as P,ac as S,q as T,v as m}from"./C8SLBV5c.js";let w=!1;function x(){w||(w=!0,document.addEventListener("reset",r=>{Promise.resolve().then(()=>{var t;if(!r.defaultPrevented)for(const e of r.target.elements)(t=e.__on_r)==null||t.call(e)})},{capture:!0}))}function E(r){var t=y,e=b;f(null),l(null);try{return r()}finally{f(t),l(e)}}function N(r,t,e,n=e){r.addEventListener(t,()=>E(e));const i=r.__on_r;i?r.__on_r=()=>{i(),n(!0)}:r.__on_r=()=>n(!0),x()}const B=new Set,O=new Set;function W(r,t,e,n={}){function i(a){if(n.capture||D.call(t,a),!a.cancelBubble)return E(()=>e==null?void 0:e.call(this,a))}return r.startsWith("pointer")||r.startsWith("touch")||r==="wheel"?m(()=>{t.addEventListener(r,i,n)}):t.addEventListener(r,i,n),i}function Q(r,t,e,n,i){var a={capture:n,passive:i},o=W(r,t,e,a);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&T(()=>{t.removeEventListener(r,o,a)})}function j(r){for(var t=0;t<r.length;t++)B.add(r[t]);for(var e of O)e(r)}function D(r){var g;var t=this,e=t.ownerDocument,n=r.type,i=((g=r.composedPath)==null?void 0:g.call(r))||[],a=i[0]||r.target,o=0,v=r.__root;if(v){var _=i.indexOf(v);if(_!==-1&&(t===document||t===window)){r.__root=t;return}var p=i.indexOf(t);if(p===-1)return;_<=p&&(o=_)}if(a=i[o]||r.target,a!==t){P(r,"currentTarget",{configurable:!0,get(){return a||e}});var L=y,k=b;f(null),l(null);try{for(var s,h=[];a!==null;){var d=a.assignedSlot||a.parentNode||a.host||null;try{var u=a["__"+n];if(u!=null&&(!a.disabled||r.target===a))if(S(u)){var[q,...M]=u;q.apply(a,[r,...M])}else u.call(a,r)}catch(c){s?h.push(c):s=c}if(r.cancelBubble||d===t||d===null)break;a=d}if(s){for(let c of h)queueMicrotask(()=>{throw c});throw s}}finally{r.__root=t,delete r.currentTarget,f(L),l(k)}}}export{x as a,B as b,j as d,Q as e,D as h,N as l,O as r,E as w};
