import{u as e,c as t,a as n}from"./c.743a15a1.js";var r=t((function(e,t){function r(e,t,...n){if(!e)throw new TypeError(a(t,n))}function a(e,t){let n=0;return e.replace(/%[os]/gu,(()=>o(t[n++])))}function o(e){return"object"!=typeof e||null===e?String(e):Object.prototype.toString.call(e)}let i;Object.defineProperty(t,"__esModule",{value:!0});const s="undefined"!=typeof window?window:"undefined"!=typeof self?self:void 0!==n?n:"undefined"!=typeof globalThis?globalThis:void 0;let l;class c{constructor(e,t){this.code=e,this.message=t}warn(...e){var t;try{if(l)return void l({...this,args:e});const n=(null!==(t=(new Error).stack)&&void 0!==t?t:"").replace(/^(?:.+?\n){2}/gu,"\n");console.warn(this.message,...e,n)}catch(e){}}}const u=new c("W01","Unable to initialize event under dispatching."),p=new c("W02","Assigning any falsy value to 'cancelBubble' property has no effect."),g=new c("W03","Assigning any truthy value to 'returnValue' property has no effect."),f=new c("W04","Unable to preventDefault on non-cancelable events."),b=new c("W05","Unable to preventDefault inside passive event listener invocation."),d=new c("W06","An event listener wasn't added because it has been added already: %o, %o"),E=new c("W07","The %o option value was abandoned because the event listener wasn't added as duplicated."),v=new c("W08","The 'callback' argument must be a function or an object that has 'handleEvent' method: %o"),h=new c("W09","Event attribute handler must be a function: %o");class y{static get NONE(){return m}static get CAPTURING_PHASE(){return R}static get AT_TARGET(){return T}static get BUBBLING_PHASE(){return P}constructor(e,t){Object.defineProperty(this,"isTrusted",{value:!1,enumerable:!0});const n=null!=t?t:{};w.set(this,{type:String(e),bubbles:Boolean(n.bubbles),cancelable:Boolean(n.cancelable),composed:Boolean(n.composed),target:null,currentTarget:null,stopPropagationFlag:!1,stopImmediatePropagationFlag:!1,canceledFlag:!1,inPassiveListenerFlag:!1,dispatchFlag:!1,timeStamp:Date.now()})}get type(){return _(this).type}get target(){return _(this).target}get srcElement(){return _(this).target}get currentTarget(){return _(this).currentTarget}composedPath(){const e=_(this).currentTarget;return e?[e]:[]}get NONE(){return m}get CAPTURING_PHASE(){return R}get AT_TARGET(){return T}get BUBBLING_PHASE(){return P}get eventPhase(){return _(this).dispatchFlag?2:0}stopPropagation(){_(this).stopPropagationFlag=!0}get cancelBubble(){return _(this).stopPropagationFlag}set cancelBubble(e){e?_(this).stopPropagationFlag=!0:p.warn()}stopImmediatePropagation(){const e=_(this);e.stopPropagationFlag=e.stopImmediatePropagationFlag=!0}get bubbles(){return _(this).bubbles}get cancelable(){return _(this).cancelable}get returnValue(){return!_(this).canceledFlag}set returnValue(e){e?g.warn():O(_(this))}preventDefault(){O(_(this))}get defaultPrevented(){return _(this).canceledFlag}get composed(){return _(this).composed}get isTrusted(){return!1}get timeStamp(){return _(this).timeStamp}initEvent(e,t=!1,n=!1){const r=_(this);r.dispatchFlag?u.warn():w.set(this,{...r,type:String(e),bubbles:Boolean(t),cancelable:Boolean(n),target:null,currentTarget:null,stopPropagationFlag:!1,stopImmediatePropagationFlag:!1,canceledFlag:!1})}}const m=0,R=1,T=2,P=3,w=new WeakMap;function _(e,t="this"){const n=w.get(e);return r(null!=n,"'%s' must be an object that Event constructor created, but got another one: %o",t,e),n}function O(e){e.inPassiveListenerFlag?b.warn():e.cancelable?e.canceledFlag=!0:f.warn()}Object.defineProperty(y,"NONE",{enumerable:!0}),Object.defineProperty(y,"CAPTURING_PHASE",{enumerable:!0}),Object.defineProperty(y,"AT_TARGET",{enumerable:!0}),Object.defineProperty(y,"BUBBLING_PHASE",{enumerable:!0});const A=Object.getOwnPropertyNames(y.prototype);for(let e=0;ea,configurable:!0,enumerable:!0})}}class j extends y{static wrap(e){return new(L(e))(e)}constructor(e){super(e.type,{bubbles:e.bubbles,cancelable:e.cancelable,composed:e.composed}),e.cancelBubble&&super.stopPropagation(),e.defaultPrevented&&super.preventDefault(),B.set(this,{original:e});const t=Object.keys(e);for(let n=0;nn!==t)),!1):(e.listeners.splice(t,1),!0)}function X(e,t){var n;return null!==(n=e[t])&&void 0!==n?n:e[t]={attrCallback:void 0,attrListener:void 0,cow:!1,listeners:[]}}F.set(Object.prototype,j),void 0!==s&&void 0!==s.Event&&F.set(s.Event.prototype,j);class Q{constructor(){Z.set(this,Object.create(null))}addEventListener(e,t,n){const r=z(this),{callback:a,capture:o,once:i,passive:s,signal:l,type:c}=function(e,t,n){var r;if(K(t),"object"==typeof n&&null!==n)return{type:String(e),callback:null!=t?t:void 0,capture:Boolean(n.capture),passive:Boolean(n.passive),once:Boolean(n.once),signal:null!==(r=n.signal)&&void 0!==r?r:void 0};return{type:String(e),callback:null!=t?t:void 0,capture:Boolean(n),passive:!1,once:!1,signal:void 0}}(e,t,n);if(null==a||(null==l?void 0:l.aborted))return;const u=X(r,c),p=M(u,a,o);-1===p?G(u,a,o,s,i,l):function(e,t,n,r){d.warn(C(e)?"capture":"bubble",e.callback),V(e)!==t&&E.warn("passive");W(e)!==n&&E.warn("once");e.signal!==r&&E.warn("signal")}(u.listeners[p],s,i,l)}removeEventListener(e,t,n){const r=z(this),{callback:a,capture:o,type:i}=function(e,t,n){if(K(t),"object"==typeof n&&null!==n)return{type:String(e),callback:null!=t?t:void 0,capture:Boolean(n.capture)};return{type:String(e),callback:null!=t?t:void 0,capture:Boolean(n)}}(e,t,n),s=r[i];null!=a&&s&&x(s,a,o)}dispatchEvent(e){const t=z(this)[String(e.type)];if(null==t)return!0;const n=e instanceof y?e:j.wrap(e),r=_(n,"event");if(r.dispatchFlag)throw a="This event has been in dispatching.",s.DOMException?new s.DOMException(a,"InvalidStateError"):(null==I&&(I=class e extends Error{constructor(t){super(t),Error.captureStackTrace&&Error.captureStackTrace(this,e)}get code(){return 11}get name(){return"InvalidStateError"}},Object.defineProperties(I.prototype,{code:{enumerable:!0},name:{enumerable:!0}}),N(I),N(I.prototype)),new I(a));var a;if(r.dispatchFlag=!0,r.target=r.currentTarget=this,!r.stopPropagationFlag){const{cow:e,listeners:a}=t;t.cow=!0;for(let o=0;o