import{aP as p,ai as f}from"./dVzHJMF1.js";function a(e){"@babel/helpers - typeof";return a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(e)}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function b(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,m(n.key),n)}}function h(e,t,r){return t&&b(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function m(e){var t=g(e,"string");return a(t)=="symbol"?t:t+""}function g(e,t){if(a(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(a(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var E=function(){function e(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(){};d(this,e),this.element=t,this.listener=r}return h(e,[{key:"bindScrollListener",value:function(){this.scrollableParents=p(this.element);for(var r=0;r<this.scrollableParents.length;r++)this.scrollableParents[r].addEventListener("scroll",this.listener)}},{key:"unbindScrollListener",value:function(){if(this.scrollableParents)for(var r=0;r<this.scrollableParents.length;r++)this.scrollableParents[r].removeEventListener("scroll",this.listener)}},{key:"destroy",value:function(){this.unbindScrollListener(),this.element=null,this.listener=null,this.scrollableParents=null}}])}();function u(e){"@babel/helpers - typeof";return u=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(e)}function _(e){return k(e)||w(e)||P(e)||S()}function S(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function P(e,t){if(e){if(typeof e=="string")return c(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}function w(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function k(e){if(Array.isArray(e))return c(e)}function c(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function C(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,v(n.key),n)}}function j(e,t,r){return t&&A(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function y(e,t,r){return(t=v(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function v(e){var t=$(e,"string");return u(t)=="symbol"?t:t+""}function $(e,t){if(u(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(u(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var L=function(){function e(t){var r=t.init,n=t.type;C(this,e),y(this,"helpers",void 0),y(this,"type",void 0),this.helpers=new Set(r),this.type=n}return j(e,[{key:"add",value:function(r){this.helpers.add(r)}},{key:"update",value:function(){}},{key:"delete",value:function(r){this.helpers.delete(r)}},{key:"clear",value:function(){this.helpers.clear()}},{key:"get",value:function(r,n){var l=this._get(r,n),i=l?this._recursive(_(this.helpers),l):null;return f(i)?i:null}},{key:"_isMatched",value:function(r,n){var l,i=r==null?void 0:r.parent;return(i==null||(l=i.vnode)===null||l===void 0?void 0:l.key)===n||i&&this._isMatched(i,n)||!1}},{key:"_get",value:function(r,n){var l,i;return((l=n||(r==null?void 0:r.$slots))===null||l===void 0||(i=l.default)===null||i===void 0?void 0:i.call(l))||null}},{key:"_recursive",value:function(){var r=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=[];return l.forEach(function(o){o.children instanceof Array?i=i.concat(r._recursive(i,o.children)):o.type.name===r.type?i.push(o):f(o.key)&&(i=i.concat(n.filter(function(s){return r._isMatched(s,o.key)}).map(function(s){return s.vnode})))}),i}}])}();function T(e,t){if(e){var r=e.props;if(r){var n=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),l=Object.prototype.hasOwnProperty.call(r,n)?n:t;return e.type.extends.props[t].type===Boolean&&r[l]===""?!0:r[l]}}return null}export{E as C,L as _,T as g};
