aboutsummaryrefslogtreecommitdiff
path: root/archive/Problem 1 Leap year · Discussion #3 · Ta180m_Idiot-Code-Golf_files/vendors-node_modules_delegated-events_dist_index_js-node_modu.js
blob: f0a9ad68b312ca07e43ad3b90b24c1db0ce7aad8 (plain)
1
2
3
"use strict";(()=>{var Z=Object.defineProperty;var a=(z,_)=>Z(z,"name",{value:_,configurable:!0});(globalThis.webpackChunk=globalThis.webpackChunk||[]).push([["vendors-node_modules_delegated-events_dist_index_js-node_modules_github_catalyst_lib_index_js-01c6c51","node_modules_delegated-events_dist_index_js","vendors-node_modules_delegated-events_dist_index_js-node_modules_github_catalyst_lib_index_js-01c6c50","vendors-node_modules_delegated-events_dist_index_js-node_modules_github_catalyst_lib_index_js-01c6c52"],{59753:(z,_,D)=>{D.d(_,{f:()=>o,on:()=>G});function p(){if(!(this instanceof p))return new p;this.size=0,this.uid=0,this.selectors=[],this.selectorObjects={},this.indexes=Object.create(this.indexes),this.activeIndexes=[]}a(p,"SelectorSet");var v=window.document.documentElement,P=v.matches||v.webkitMatchesSelector||v.mozMatchesSelector||v.oMatchesSelector||v.msMatchesSelector;p.prototype.matchesSelector=function(e,n){return P.call(e,n)},p.prototype.querySelectorAll=function(e,n){return n.querySelectorAll(e)},p.prototype.indexes=[];var y=/^#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/g;p.prototype.indexes.push({name:"ID",selector:a(function(n){var r;if(r=n.match(y))return r[0].slice(1)},"matchIdSelector"),element:a(function(n){if(n.id)return[n.id]},"getElementId")});var C=/^\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/g;p.prototype.indexes.push({name:"CLASS",selector:a(function(n){var r;if(r=n.match(C))return r[0].slice(1)},"matchClassSelector"),element:a(function(n){var r=n.className;if(r){if(typeof r=="string")return r.split(/\s/);if(typeof r=="object"&&"baseVal"in r)return r.baseVal.split(/\s/)}},"getElementClassNames")});var x=/^((?:[\w\u00c0-\uFFFF\-]|\\.)+)/g;p.prototype.indexes.push({name:"TAG",selector:a(function(n){var r;if(r=n.match(x))return r[0].toUpperCase()},"matchTagSelector"),element:a(function(n){return[n.nodeName.toUpperCase()]},"getElementTagName")}),p.prototype.indexes.default={name:"UNIVERSAL",selector:function(){return!0},element:function(){return[!0]}};var A;typeof window.Map=="function"?A=window.Map:A=function(){function e(){this.map={}}return a(e,"Map"),e.prototype.get=function(n){return this.map[n+" "]},e.prototype.set=function(n,r){this.map[n+" "]=r},e}();var S=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g;function w(e,n){e=e.slice(0).concat(e.default);var r=e.length,i,s,c,u,d=n,l,h,f=[];do if(S.exec(""),(c=S.exec(d))&&(d=c[3],c[2]||!d)){for(i=0;i<r;i++)if(h=e[i],l=h.selector(c[1])){for(s=f.length,u=!1;s--;)if(f[s].index===h&&f[s].key===l){u=!0;break}u||f.push({index:h,key:l});break}}while(c);return f}a(w,"parseSelectorIndexes");function W(e,n){var r,i,s;for(r=0,i=e.length;r<i;r++)if(s=e[r],n.isPrototypeOf(s))return s}a(W,"findByPrototype"),p.prototype.logDefaultIndexUsed=function(){},p.prototype.add=function(e,n){var r,i,s,c,u,d,l,h,f=this.activeIndexes,g=this.selectors,b=this.selectorObjects;if(typeof e=="string"){for(r={id:this.uid++,selector:e,data:n},b[r.id]=r,l=w(this.indexes,e),i=0;i<l.length;i++)h=l[i],c=h.key,s=h.index,u=W(f,s),u||(u=Object.create(s),u.map=new A,f.push(u)),s===this.indexes.default&&this.logDefaultIndexUsed(r),d=u.map.get(c),d||(d=[],u.map.set(c,d)),d.push(r);this.size++,g.push(e)}},p.prototype.remove=function(e,n){if(typeof e=="string"){var r,i,s,c,u,d,l,h,f=this.activeIndexes,g=this.selectors=[],b=this.selectorObjects,I={},q=arguments.length===1;for(r=w(this.indexes,e),s=0;s<r.length;s++)for(i=r[s],c=f.length;c--;)if(d=f[c],i.index.isPrototypeOf(d)){if(l=d.map.get(i.key),l)for(u=l.length;u--;)h=l[u],h.selector===e&&(q||h.data===n)&&(l.splice(u,1),I[h.id]=!0);break}for(s in I)delete b[s],this.size--;for(s in b)g.push(b[s].selector)}};function M(e,n){return e.id-n.id}a(M,"sortById"),p.prototype.queryAll=function(e){if(!this.selectors.length)return[];var n={},r=[],i=this.querySelectorAll(this.selectors.join(", "),e),s,c,u,d,l,h,f,g;for(s=0,u=i.length;s<u;s++)for(l=i[s],h=this.matches(l),c=0,d=h.length;c<d;c++)g=h[c],n[g.id]?f=n[g.id]:(f={id:g.id,selector:g.selector,data:g.data,elements:[]},n[g.id]=f,r.push(f)),f.elements.push(l);return r.sort(M)},p.prototype.matches=function(e){if(!e)return[];var n,r,i,s,c,u,d,l,h,f,g,b=this.activeIndexes,I={},q=[];for(n=0,s=b.length;n<s;n++)if(d=b[n],l=d.element(e),l){for(r=0,c=l.length;r<c;r++)if(h=d.map.get(l[r]))for(i=0,u=h.length;i<u;i++)f=h[i],g=f.id,!I[g]&&this.matchesSelector(e,f.selector)&&(I[g]=!0,q.push(f))}return q.sort(M)};var k={},E={},j=new WeakMap,O=new WeakMap,m=new WeakMap,T=Object.getOwnPropertyDescriptor(Event.prototype,"currentTarget");function N(e,n,r){var i=e[n];return e[n]=function(){return r.apply(e,arguments),i.apply(e,arguments)},e}a(N,"before");function R(e,n,r){var i=[],s=n;do{if(s.nodeType!==1)break;var c=e.matches(s);if(c.length){var u={node:s,observers:c};r?i.unshift(u):i.push(u)}}while(s=s.parentElement);return i}a(R,"dist_matches");function F(){j.set(this,!0)}a(F,"trackPropagation");function U(){j.set(this,!0),O.set(this,!0)}a(U,"trackImmediate");function L(){return m.get(this)||null}a(L,"getCurrentTarget");function $(e,n){!T||Object.defineProperty(e,"currentTarget",{configurable:!0,enumerable:!0,get:n||T.get})}a($,"defineCurrentTarget");function B(e){try{return e.eventPhase,!0}catch{return!1}}a(B,"canDispatch");function V(e){if(!!B(e)){var n=e.eventPhase===1?E:k,r=n[e.type];if(!!r){var i=R(r,e.target,e.eventPhase===1);if(!!i.length){N(e,"stopPropagation",F),N(e,"stopImmediatePropagation",U),$(e,L);for(var s=0,c=i.length;s<c&&!j.get(e);s++){var u=i[s];m.set(e,u.node);for(var d=0,l=u.observers.length;d<l&&!O.get(e);d++)u.observers[d].data.call(u.node,e)}m.delete(e),$(e)}}}}a(V,"dispatch");function G(e,n,r){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},s=!!i.capture,c=s?E:k,u=c[e];u||(u=new p,c[e]=u,document.addEventListener(e,V,s)),u.add(n,r)}a(G,"on");function t(e,n,r){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},s=!!i.capture,c=s?E:k,u=c[e];!u||(u.remove(n,r),!u.size&&(delete c[e],document.removeEventListener(e,V,s)))}a(t,"off");function o(e,n,r){return e.dispatchEvent(new CustomEvent(n,{bubbles:!0,cancelable:!0,detail:r}))}a(o,"fire")},90420:(z,_,D)=>{D.d(_,{Lj:()=>T,Ih:()=>G,fA:()=>k,GO:()=>E});const p=new WeakSet;function v(t){p.add(t),t.shadowRoot&&P(t.shadowRoot),x(t),C(t.ownerDocument)}a(v,"bind");function P(t){x(t),C(t)}a(P,"bindShadow");const y=new WeakMap;function C(t=document){if(y.has(t))return y.get(t);let o=!1;const e=new MutationObserver(r=>{for(const i of r)if(i.type==="attributes"&&i.target instanceof Element)w(i.target);else if(i.type==="childList"&&i.addedNodes.length)for(const s of i.addedNodes)s instanceof Element&&x(s)});e.observe(t,{childList:!0,subtree:!0,attributeFilter:["data-action"]});const n={get closed(){return o},unsubscribe(){o=!0,y.delete(t),e.disconnect()}};return y.set(t,n),n}a(C,"listenForBind");function x(t){for(const o of t.querySelectorAll("[data-action]"))w(o);t instanceof Element&&t.hasAttribute("data-action")&&w(t)}a(x,"bindElements");function A(t){const o=t.currentTarget;for(const e of S(o))if(t.type===e.type){const n=o.closest(e.tag);p.has(n)&&typeof n[e.method]=="function"&&n[e.method](t);const r=o.getRootNode();if(r instanceof ShadowRoot&&p.has(r.host)&&r.host.matches(e.tag)){const i=r.host;typeof i[e.method]=="function"&&i[e.method](t)}}}a(A,"handleEvent");function*S(t){for(const o of(t.getAttribute("data-action")||"").trim().split(/\s+/)){const e=o.lastIndexOf(":"),n=Math.max(0,o.lastIndexOf("#"))||o.length;yield{type:o.slice(0,e),tag:o.slice(e+1,n),method:o.slice(n+1)||"handleEvent"}}}a(S,"bindings");function w(t){for(const o of S(t))t.addEventListener(o.type,A)}a(w,"bindActions");function W(t,o){const e=t.tagName.toLowerCase();if(t.shadowRoot){for(const n of t.shadowRoot.querySelectorAll(`[data-target~="${e}.${o}"]`))if(!n.closest(e))return n}for(const n of t.querySelectorAll(`[data-target~="${e}.${o}"]`))if(n.closest(e)===t)return n}a(W,"findTarget");function M(t,o){const e=t.tagName.toLowerCase(),n=[];if(t.shadowRoot)for(const r of t.shadowRoot.querySelectorAll(`[data-targets~="${e}.${o}"]`))r.closest(e)||n.push(r);for(const r of t.querySelectorAll(`[data-targets~="${e}.${o}"]`))r.closest(e)===t&&n.push(r);return n}a(M,"findTargets");function k(t,o){return Object.defineProperty(t,o,{configurable:!0,get(){return W(this,o)}})}a(k,"target");function E(t,o){return Object.defineProperty(t,o,{configurable:!0,get(){return M(this,o)}})}a(E,"targets");function j(t){const o=t.name.replace(/([A-Z]($|[a-z]))/g,"-$1").replace(/(^-|-Element$)/g,"").toLowerCase();window.customElements.get(o)||(window[t.name]=t,window.customElements.define(o,t))}a(j,"register");function O(t){for(const o of t.querySelectorAll("template[data-shadowroot]"))o.parentElement===t&&t.attachShadow({mode:o.getAttribute("data-shadowroot")==="closed"?"closed":"open"}).append(o.content.cloneNode(!0))}a(O,"autoShadowRoot");const m=new WeakMap;function T(t,o){m.has(t)||m.set(t,[]),m.get(t).push(o)}a(T,"attr");function N(t,o){o||(o=R(Object.getPrototypeOf(t)));for(const e of o){const n=t[e],r=F(e);let i={configurable:!0,get(){return this.getAttribute(r)||""},set(s){this.setAttribute(r,s||"")}};typeof n=="number"?i={configurable:!0,get(){return Number(this.getAttribute(r)||0)},set(s){this.setAttribute(r,s)}}:typeof n=="boolean"&&(i={configurable:!0,get(){return this.hasAttribute(r)},set(s){this.toggleAttribute(r,s)}}),Object.defineProperty(t,e,i),e in t&&!t.hasAttribute(r)&&i.set.call(t,n)}}a(N,"initializeAttrs");function R(t){const o=new Set;let e=t;for(;e&&e!==HTMLElement;){const n=m.get(e)||[];for(const r of n)o.add(r);e=Object.getPrototypeOf(e)}return o}a(R,"getAttrNames");function F(t){return`data-${t.replace(/([A-Z]($|[a-z]))/g,"-$1")}`.replace(/--/g,"-").toLowerCase()}a(F,"attrToAttributeName");function U(t){let o=t.observedAttributes||[];Object.defineProperty(t,"observedAttributes",{configurable:!0,get(){return[...R(t.prototype)].map(F).concat(o)},set(e){o=e}})}a(U,"defineObservedAttributes");const L=new WeakSet;function $(t,o){t.toggleAttribute("data-catalyst",!0),customElements.upgrade(t),L.add(t),O(t),N(t),v(t),o&&o.call(t),t.shadowRoot&&P(t.shadowRoot)}a($,"initializeInstance");function B(t){U(t),j(t)}a(B,"initializeClass");function V(t){return L.has(t)}a(V,"initialized");function G(t){const o=t.prototype.connectedCallback;t.prototype.connectedCallback=function(){$(this,o)},B(t)}a(G,"controller")}}]);})();

//# sourceMappingURL=vendors-node_modules_delegated-events_dist_index_js-node_modules_github_catalyst_lib_index_js-01c6c51-edfd57e08401.js.map