Socket
Socket
Sign inDemoInstall

@danielgindi/dom-utils

Package Overview
Dependencies
0
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0 to 1.0.1

lib/ScrollHelper.js

4

dist/lib.cjs.min.js
/*!
* @danielgindi/dom-utils 1.0.0
* @danielgindi/dom-utils 1.0.1
* git://github.com/danielgindi/dom-utils.git
*/
"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function t(e){this.wrapped=e}function n(e){var n,r;function o(n,r){try{var a=e[n](r),l=a.value,c=l instanceof t;Promise.resolve(c?l.wrapped:l).then((function(e){c?o("return"===n?"return":"next",e):i(a.done?"return":"normal",e)}),(function(e){o("throw",e)}))}catch(e){i("throw",e)}}function i(e,t){switch(e){case"return":n.resolve({value:t,done:!0});break;case"throw":n.reject(t);break;default:n.resolve({value:t,done:!1})}(n=n.next)?o(n.key,n.arg):r=null}this._invoke=function(e,t){return new Promise((function(i,a){var l={key:e,arg:t,resolve:i,reject:a,next:null};r?r=r.next=l:(n=r=l,o(e,t))}))},"function"!=typeof e.return&&(this.return=void 0)}function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==l.return||l.return()}finally{if(o)throw i}}return n}}(e,t)||i(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){if(e){if("string"==typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function l(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=i(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,l=!0,c=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return l=e.done,e},e:function(e){c=!0,a=e},f:function(){try{l||null==n.return||n.return()}finally{if(c)throw a}}}}Object.defineProperty(exports,"__esModule",{value:!0}),"function"==typeof Symbol&&Symbol.asyncIterator&&(n.prototype[Symbol.asyncIterator]=function(){return this}),n.prototype.next=function(e){return this._invoke("next",e)},n.prototype.throw=function(e){return this._invoke("throw",e)},n.prototype.return=function(e){return this._invoke("return",e)};var c="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function u(e,t){return e(t={exports:{}},t.exports),t.exports}var f=function(e){return e&&e.Math==Math&&e},s=f("object"==typeof globalThis&&globalThis)||f("object"==typeof window&&window)||f("object"==typeof self&&self)||f("object"==typeof c&&c)||function(){return this}()||Function("return this")(),p=function(e){try{return!!e()}catch(e){return!0}},d=!p((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),h={}.propertyIsEnumerable,g=Object.getOwnPropertyDescriptor,v={f:g&&!h.call({1:2},1)?function(e){var t=g(this,e);return!!t&&t.enumerable}:h},y=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},m={}.toString,b=function(e){return m.call(e).slice(8,-1)},S="".split,x=p((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==b(e)?S.call(e,""):Object(e)}:Object,E=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},w=function(e){return x(E(e))},_=function(e){return"object"==typeof e?null!==e:"function"==typeof e},T=function(e,t){if(!_(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!_(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!_(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!_(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},C={}.hasOwnProperty,O=function(e,t){return C.call(e,t)},N=s.document,j=_(N)&&_(N.createElement),A=!d&&!p((function(){return 7!=Object.defineProperty(("div",j?N.createElement("div"):{}),"a",{get:function(){return 7}}).a})),I=Object.getOwnPropertyDescriptor,R={f:d?I:function(e,t){if(e=w(e),t=T(t,!0),A)try{return I(e,t)}catch(e){}if(O(e,t))return y(!v.f.call(e,t),e[t])}},F=function(e){if(!_(e))throw TypeError(String(e)+" is not an object");return e},P=Object.defineProperty,M={f:d?P:function(e,t,n){if(F(e),t=T(t,!0),F(n),A)try{return P(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},k=d?function(e,t,n){return M.f(e,t,y(1,n))}:function(e,t,n){return e[t]=n,e},L=function(e,t){try{k(s,e,t)}catch(n){s[e]=t}return t},D=s["__core-js_shared__"]||L("__core-js_shared__",{}),$=Function.toString;"function"!=typeof D.inspectSource&&(D.inspectSource=function(e){return $.call(e)});var B,U,z,W=D.inspectSource,H=s.WeakMap,Y="function"==typeof H&&/native code/.test(W(H)),q=u((function(e){(e.exports=function(e,t){return D[e]||(D[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.9.1",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})})),X=0,K=Math.random(),G=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++X+K).toString(36)},V=q("keys"),J={},Q=s.WeakMap;if(Y){var Z=D.state||(D.state=new Q),ee=Z.get,te=Z.has,ne=Z.set;B=function(e,t){return t.facade=e,ne.call(Z,e,t),t},U=function(e){return ee.call(Z,e)||{}},z=function(e){return te.call(Z,e)}}else{var re=V["state"]||(V.state=G("state"));J[re]=!0,B=function(e,t){return t.facade=e,k(e,re,t),t},U=function(e){return O(e,re)?e[re]:{}},z=function(e){return O(e,re)}}var oe={set:B,get:U,has:z,enforce:function(e){return z(e)?U(e):B(e,{})},getterFor:function(e){return function(t){var n;if(!_(t)||(n=U(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}},ie=u((function(e){var t=oe.get,n=oe.enforce,r=String(String).split("String");(e.exports=function(e,t,o,i){var a,l=!!i&&!!i.unsafe,c=!!i&&!!i.enumerable,u=!!i&&!!i.noTargetGet;"function"==typeof o&&("string"!=typeof t||O(o,"name")||k(o,"name",t),(a=n(o)).source||(a.source=r.join("string"==typeof t?t:""))),e!==s?(l?!u&&e[t]&&(c=!0):delete e[t],c?e[t]=o:k(e,t,o)):c?e[t]=o:L(t,o)})(Function.prototype,"toString",(function(){return"function"==typeof this&&t(this).source||W(this)}))})),ae=s,le=function(e){return"function"==typeof e?e:void 0},ce=function(e,t){return arguments.length<2?le(ae[e])||le(s[e]):ae[e]&&ae[e][t]||s[e]&&s[e][t]},ue=Math.ceil,fe=Math.floor,se=function(e){return isNaN(e=+e)?0:(e>0?fe:ue)(e)},pe=Math.min,de=function(e){return e>0?pe(se(e),9007199254740991):0},he=Math.max,ge=Math.min,ve=function(e){return function(t,n,r){var o,i=w(t),a=de(i.length),l=function(e,t){var n=se(e);return n<0?he(n+t,0):ge(n,t)}(r,a);if(e&&n!=n){for(;a>l;)if((o=i[l++])!=o)return!0}else for(;a>l;l++)if((e||l in i)&&i[l]===n)return e||l||0;return!e&&-1}},ye={includes:ve(!0),indexOf:ve(!1)}.indexOf,me=function(e,t){var n,r=w(e),o=0,i=[];for(n in r)!O(J,n)&&O(r,n)&&i.push(n);for(;t.length>o;)O(r,n=t[o++])&&(~ye(i,n)||i.push(n));return i},be=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Se=be.concat("length","prototype"),xe={f:Object.getOwnPropertyNames||function(e){return me(e,Se)}},Ee={f:Object.getOwnPropertySymbols},we=ce("Reflect","ownKeys")||function(e){var t=xe.f(F(e)),n=Ee.f;return n?t.concat(n(e)):t},_e=function(e,t){for(var n=we(t),r=M.f,o=R.f,i=0;i<n.length;i++){var a=n[i];O(e,a)||r(e,a,o(t,a))}},Te=/#|\.prototype\./,Ce=function(e,t){var n=Ne[Oe(e)];return n==Ae||n!=je&&("function"==typeof t?p(t):!!t)},Oe=Ce.normalize=function(e){return String(e).replace(Te,".").toLowerCase()},Ne=Ce.data={},je=Ce.NATIVE="N",Ae=Ce.POLYFILL="P",Ie=Ce,Re=R.f,Fe=function(e,t){var n,r,o,i,a,l=e.target,c=e.global,u=e.stat;if(n=c?s:u?s[l]||L(l,{}):(s[l]||{}).prototype)for(r in t){if(i=t[r],o=e.noTargetGet?(a=Re(n,r))&&a.value:n[r],!Ie(c?r:l+(u?".":"#")+r,e.forced)&&void 0!==o){if(typeof i==typeof o)continue;_e(i,o)}(e.sham||o&&o.sham)&&k(i,"sham",!0),ie(n,r,i,e)}},Pe=Object.keys||function(e){return me(e,be)},Me=v.f,ke=function(e){return function(t){for(var n,r=w(t),o=Pe(r),i=o.length,a=0,l=[];i>a;)n=o[a++],d&&!Me.call(r,n)||l.push(e?[n,r[n]]:r[n]);return l}},Le={entries:ke(!0),values:ke(!1)}.entries;Fe({target:"Object",stat:!0},{entries:function(e){return Le(e)}});var De=function(e,t){for(var n=0,r=Object.entries(t);n<r.length;n++){var i=o(r[n],2),a=i[0],l=i[1];e.style[a]=null==l?"":String(l)}},$e=function(e,t,n,r,o){return function(){var i,a,l,c,u=arguments.length<=0?void 0:arguments[0];if(e?(i=arguments.length<=1?void 0:arguments[1],a=!!(arguments.length<=2?void 0:arguments[2]),l=!!(arguments.length<=3?void 0:arguments[3]),c=!!(arguments.length<=4?void 0:arguments[4])):(a=!!(arguments.length<=1?void 0:arguments[1]),l=!!(arguments.length<=2?void 0:arguments[2]),c=!!(arguments.length<=3?void 0:arguments[3])),u===window)return u.document.documentElement["client".concat(n)];if(9===u.nodeType){var f=u.documentElement,s=u.body;return Math.max(s["scroll".concat(n)],f["scroll".concat(n)],s["offset".concat(n)],f["offset".concat(n)],f["client".concat(n)])}var p,d,h=!1,g=!1;if(!e&&"getBoundingClientRect"in u&&(p=u.getBoundingClientRect()[t],h=!0,g=!0),(void 0===p||c||h!==a||g!==l)&&(d=e?getComputedStyle(u,i):getComputedStyle(u)),void 0===p){var v=d[t];"auto"===v?(p=u["client".concat(n)],h=!0):p=parseFloat(v),"border-box"===d.boxSizing&&(h=!0,g=!0)}if(a!==h){var y=parseFloat(d["padding-".concat(r)]||0)+parseFloat(d["padding-".concat(o)]||0);a?p+=y:p-=y}if(l!==g){var m=parseFloat(d["border-".concat(r,"-width")]||0)+parseFloat(d["border-".concat(o,"-width")]||0);l?p+=m:p-=m}if(p<0&&(p=0),c){var b=parseFloat(d["margin-".concat(r)]||0)+parseFloat(d["margin-".concat(o)]||0);p+=b}return p}},Be=function(e,t,n,r){return function(t,o){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],l=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(t!==window&&9!==t.nodeType){var c=getComputedStyle(t),u=!1;if("border-box"===c.boxSizing&&(u=!0),i=!!i,a=!!a,(l=!!l)&&(o-=(parseFloat(c["margin-".concat(n)])||0)+(parseFloat(c["margin-".concat(r)])||0)),i!==u){var f=parseFloat(c["padding-".concat(n)]||0)+parseFloat(c["padding-".concat(r)]||0);i?o-=f:o+=f}if(a!==u){var s=(parseFloat(c["border-".concat(n,"-width")])||0)+(parseFloat(c["border-".concat(r,"-width")])||0);a?o-=s:o+=s}o<0&&(o=0),t.style[e]=o+"px"}}},Ue=$e(!1,"width","Width","left","right"),ze=$e(!1,"height","Height","top","bottom"),We=$e(!0,"width","Width","left","right"),He=$e(!0,"height","Height","top","bottom"),Ye=Be("width",0,"left","right"),qe=Be("height",0,"top","bottom"),Xe=Object.freeze({__proto__:null,getCssProps:function(e,t){var n,r=getComputedStyle(e),o={},i=l(t);try{for(i.s();!(n=i.n()).done;){var a=n.value,c=r[a];("width"===a||"height"===a)&&"auto"===c&&e instanceof HTMLElement&&(c=e["offset"+a.substr(0,1).toUpperCase()+a.substr(1)],"border-box"!==r.boxSizing&&("width"===a?(c-=parseFloat(r.paddingLeft||0),c-=parseFloat(r.paddingRight||0),c-=parseFloat(r.borderLeftWidth||0),c-=parseFloat(r.borderRightWidth||0)):(c-=parseFloat(r.paddingTop||0),c-=parseFloat(r.paddingBottom||0),c-=parseFloat(r.borderTopWidth||0),c-=parseFloat(r.borderBottomWidth||0)),c<0&&(c=0))),o[a]=c}}catch(e){i.e(e)}finally{i.f()}return o},setCssProps:De,getElementWidth:Ue,getElementHeight:ze,setElementWidth:Ye,setElementHeight:qe,getPseudoElementWidth:We,getPseudoElementHeight:He,getElementOffset:function(e){if(!e.getClientRects().length)return{top:0,left:0};var t=e.getBoundingClientRect(),n=e.ownerDocument.defaultView;return{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}},anchoredPosition:function(e,t,n,r,o){var i,a,l,c;if(r||(r={width:Ue(e,!0,!0),height:Ue(e,!0,!0)}),"start"!==t&&"end"!==t||(null==o&&(o="rtl"===getComputedStyle(e).direction),t="start"===t?o?"right":"left":o?"left":"right"),"right"===t)i=r.width,l=0;else if("center"===t)l=i=r.width/2;else if("left"===t)i=0,l=r.width;else if(t&&"string"==typeof t&&"%"===t.charAt(t.length-1)){var u=(parseFloat(t)||0)/100;i=r.width*u,l=r.width*-u,null==o&&(o="rtl"===getComputedStyle(e).direction),o&&(i=r.width-i,l=r.width-i)}else l=-(i=parseFloat(t)||0);if("bottom"===n)a=r.height,c=0;else if("center"===n)c=a=r.height/2;else if("top"===n)a=0,c=r.height;else if(n&&"string"==typeof n&&"%"===n.charAt(n.length-1)){var f=(parseFloat(n)||0)/100;a=r.height*f,c=r.height*-f}else c=-(a=parseFloat(n)||0);return{left:i,top:a,right:l,bottom:c,xSpec:t,ySpec:n}}}),Ke=function(e,t){for(var n=0,r=Object.entries(t);n<r.length;n++){var i=o(r[n],2),a=i[0],l=i[1];null!=l&&("innerHTML"===a?e.innerHTML=String(l):"css"===a&&"style"in e?De(e,l):"readOnly"===a||"tabIndex"===a||"textContent"===a?e[a]=l:e.setAttribute(a,String(l)))}},Ge=Object.freeze({__proto__:null,createElement:function(t,n,r){var o=document.createElement(t);if(n&&"object"===e(n)&&Ke(o,n),r)if(r instanceof Node)o.appendChild(r);else if(Array.isArray(r)){var i,a=l(r);try{for(a.s();!(i=a.n()).done;){var c=i.value;o.appendChild(c)}}catch(e){a.e(e)}finally{a.f()}}return o},setElementAttrs:Ke,closestUntil:function(e,t,n){if("closest"in e&&!n)return e.closest(t);var r=Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector;do{if(r.call(e,t))return e;if(n&&e===n)return null;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null},prev:function(e,t){if(!e)return null;var n=Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector;do{if(n.call(e,t))return e;e=e.previousElementSibling||e.previousSibling}while(null!==e&&1===e.nodeType);return null},next:function(e,t){if(!e)return null;var n=Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector;do{if(n.call(e,t))return e;e=e.nextElementSibling||e.nextSibling}while(null!==e&&1===e.nodeType);return null}}),Ve=function(){var e=F(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t};function Je(e,t){return RegExp(e,t)}var Qe,Ze,et={UNSUPPORTED_Y:p((function(){var e=Je("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),BROKEN_CARET:p((function(){var e=Je("^r","gy");return e.lastIndex=2,null!=e.exec("str")}))},tt=RegExp.prototype.exec,nt=String.prototype.replace,rt=tt,ot=(Qe=/a/,Ze=/b*/g,tt.call(Qe,"a"),tt.call(Ze,"a"),0!==Qe.lastIndex||0!==Ze.lastIndex),it=et.UNSUPPORTED_Y||et.BROKEN_CARET,at=void 0!==/()??/.exec("")[1];(ot||at||it)&&(rt=function(e){var t,n,r,o,i=this,a=it&&i.sticky,l=Ve.call(i),c=i.source,u=0,f=e;return a&&(-1===(l=l.replace("y","")).indexOf("g")&&(l+="g"),f=String(e).slice(i.lastIndex),i.lastIndex>0&&(!i.multiline||i.multiline&&"\n"!==e[i.lastIndex-1])&&(c="(?: "+c+")",f=" "+f,u++),n=new RegExp("^(?:"+c+")",l)),at&&(n=new RegExp("^"+c+"$(?!\\s)",l)),ot&&(t=i.lastIndex),r=tt.call(a?n:i,f),a?r?(r.input=r.input.slice(u),r[0]=r[0].slice(u),r.index=i.lastIndex,i.lastIndex+=r[0].length):i.lastIndex=0:ot&&r&&(i.lastIndex=i.global?r.index+r[0].length:t),at&&r&&r.length>1&&nt.call(r[0],n,(function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(r[o]=void 0)})),r});var lt=rt;Fe({target:"RegExp",proto:!0,forced:/./.exec!==lt},{exec:lt});var ct,ut,ft="process"==b(s.process),st=ce("navigator","userAgent")||"",pt=s.process,dt=pt&&pt.versions,ht=dt&&dt.v8;ht?ut=(ct=ht.split("."))[0]+ct[1]:st&&(!(ct=st.match(/Edge\/(\d+)/))||ct[1]>=74)&&(ct=st.match(/Chrome\/(\d+)/))&&(ut=ct[1]);var gt=ut&&+ut,vt=!!Object.getOwnPropertySymbols&&!p((function(){return!Symbol.sham&&(ft?38===gt:gt>37&&gt<41)})),yt=vt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,mt=q("wks"),bt=s.Symbol,St=yt?bt:bt&&bt.withoutSetter||G,xt=function(e){return O(mt,e)&&(vt||"string"==typeof mt[e])||(vt&&O(bt,e)?mt[e]=bt[e]:mt[e]=St("Symbol."+e)),mt[e]},Et=xt("species"),wt=!p((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),_t="$0"==="a".replace(/./,"$0"),Tt=xt("replace"),Ct=!!/./[Tt]&&""===/./[Tt]("a","$0"),Ot=!p((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]})),Nt=function(e,t,n,r){var o=xt(e),i=!p((function(){var t={};return t[o]=function(){return 7},7!=""[e](t)})),a=i&&!p((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[Et]=function(){return n},n.flags="",n[o]=/./[o]),n.exec=function(){return t=!0,null},n[o](""),!t}));if(!i||!a||"replace"===e&&(!wt||!_t||Ct)||"split"===e&&!Ot){var l=/./[o],c=n(o,""[e],(function(e,t,n,r,o){return t.exec===lt?i&&!o?{done:!0,value:l.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}}),{REPLACE_KEEPS_$0:_t,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:Ct}),u=c[0],f=c[1];ie(String.prototype,e,u),ie(RegExp.prototype,o,2==t?function(e,t){return f.call(e,this,t)}:function(e){return f.call(e,this)})}r&&k(RegExp.prototype[o],"sham",!0)},jt=function(e){return function(t,n){var r,o,i=String(E(t)),a=se(n),l=i.length;return a<0||a>=l?e?"":void 0:(r=i.charCodeAt(a))<55296||r>56319||a+1===l||(o=i.charCodeAt(a+1))<56320||o>57343?e?i.charAt(a):r:e?i.slice(a,a+2):o-56320+(r-55296<<10)+65536}},At={codeAt:jt(!1),charAt:jt(!0)}.charAt,It=function(e,t,n){return t+(n?At(e,t).length:1)},Rt=Math.floor,Ft="".replace,Pt=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Mt=/\$([$&'`]|\d{1,2})/g,kt=function(e,t,n,r,o,i){var a=n+e.length,l=r.length,c=Mt;return void 0!==o&&(o=Object(E(o)),c=Pt),Ft.call(i,c,(function(i,c){var u;switch(c.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,n);case"'":return t.slice(a);case"<":u=o[c.slice(1,-1)];break;default:var f=+c;if(0===f)return i;if(f>l){var s=Rt(f/10);return 0===s?i:s<=l?void 0===r[s-1]?c.charAt(1):r[s-1]+c.charAt(1):i}u=r[f-1]}return void 0===u?"":u}))},Lt=function(e,t){var n=e.exec;if("function"==typeof n){var r=n.call(e,t);if("object"!=typeof r)throw TypeError("RegExp exec method returned something other than an Object or null");return r}if("RegExp"!==b(e))throw TypeError("RegExp#exec called on incompatible receiver");return lt.call(e,t)},Dt=Math.max,$t=Math.min;Nt("replace",2,(function(e,t,n,r){var o=r.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,i=r.REPLACE_KEEPS_$0,a=o?"$":"$0";return[function(n,r){var o=E(this),i=null==n?void 0:n[e];return void 0!==i?i.call(n,o,r):t.call(String(o),n,r)},function(e,r){if(!o&&i||"string"==typeof r&&-1===r.indexOf(a)){var l=n(t,e,this,r);if(l.done)return l.value}var c=F(e),u=String(this),f="function"==typeof r;f||(r=String(r));var s=c.global;if(s){var p=c.unicode;c.lastIndex=0}for(var d=[];;){var h=Lt(c,u);if(null===h)break;if(d.push(h),!s)break;""===String(h[0])&&(c.lastIndex=It(u,de(c.lastIndex),p))}for(var g,v="",y=0,m=0;m<d.length;m++){h=d[m];for(var b=String(h[0]),S=Dt($t(se(h.index),u.length),0),x=[],E=1;E<h.length;E++)x.push(void 0===(g=h[E])?g:String(g));var w=h.groups;if(f){var _=[b].concat(x,S,u);void 0!==w&&_.push(w);var T=String(r.apply(void 0,_))}else T=kt(b,u,S,x,w,r);S>=y&&(v+=u.slice(y,S)+T,y=S+b.length)}return v+u.slice(y)}]}));var Bt=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(0!==n.length)if("after"in e)e.after.apply(e,n);else if(1===n.length){var o=n[0],i=o instanceof Node;o=i?o:document.createTextNode(String(o)),e.parentNode.insertBefore(o,e.nextSibling)}else{var a,c=document.createDocumentFragment(),u=l(n);try{for(u.s();!(a=u.n()).done;){var f=a.value,s=f instanceof Node;c.appendChild(s?f:document.createTextNode(String(f)))}}catch(e){u.e(e)}finally{u.f()}e.nextSibling?e.parentNode.insertBefore(c,e.nextSibling):e.parentNode.appendChild(c)}},Ut=null,zt=function(){try{document.createElement("div").querySelector(":scope > div"),Ut=!0}catch(e){Ut=!1}},Wt=Object.freeze({__proto__:null,getRootNode:function(e){if(!e)return null;if("getRootNode"in e)return e.getRootNode();for(;e.parentNode;)e=e.parentNode;return e},closest:function(e,t){if("closest"in e)return e.closest(t);var n=Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector;do{if(n.call(e,t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null},remove:function(e){e&&("remove"in e&&e.remove(),e.parentNode&&e.parentNode.removeChild(e))},before:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(0!==n.length)if("before"in e)Bt.before.apply(Bt,n);else if(1===n.length){var o=n[0],i=o instanceof Node;o=i?o:document.createTextNode(String(o)),Bt.parentNode.insertBefore(o,e)}else{var a,c=document.createDocumentFragment(),u=l(n);try{for(u.s();!(a=u.n()).done;){var f=a.value,s=f instanceof Node;c.appendChild(s?f:document.createTextNode(String(f)))}}catch(e){u.e(e)}finally{u.f()}e.parentNode.insertBefore(c,e)}},after:Bt,prepend:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(0!==n.length)if("prepend"in e)e.prepend.apply(e,n);else if(1===n.length){var o=n[0],i=o instanceof Node;o=i?o:document.createTextNode(String(o)),e.firstChild?e.insertBefore(o,e.firstChild):e.appendChild(o)}else{var a,c=document.createDocumentFragment(),u=l(n);try{for(u.s();!(a=u.n()).done;){var f=a.value,s=f instanceof Node;c.appendChild(s?f:document.createTextNode(String(f)))}}catch(e){u.e(e)}finally{u.f()}e.firstChild?e.insertBefore(c,e.firstChild):e.appendChild(c)}},append:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(0!==n.length)if("append"in e)e.append.apply(e,n);else if(1===n.length){var o=n[0],i=o instanceof Node;o=i?o:document.createTextNode(String(o)),e.appendChild(o)}else{var a,c=document.createDocumentFragment(),u=l(n);try{for(u.s();!(a=u.n()).done;){var f=a.value,s=f instanceof Node;c.appendChild(s?f:document.createTextNode(String(f)))}}catch(e){u.e(e)}finally{u.f()}e.appendChild(c)}},scopedSelector:function(e,t){if(null===Ut&&zt(),!0===Ut)return e.querySelector(t.replace(/((?:^|,)\s*)/g,"$1:scope "));var n=e.id,r="ID_"+Date.now();e.id=r,t=t.replace(/((?:^|,)\s*)/g,"$1#"+r);try{return e.querySelector(t)}finally{this.id=n}},scopedSelectorAll:function(e,t){if(null===Ut&&zt(),!0===Ut)return e.querySelectorAll(t.replace(/((?:^|,)\s*)/g,"$1:scope "));var n=e.id,r="ID_"+Date.now();e.id=r,t=t.replace(/((?:^|,)\s*)/g,"$1#"+r);try{return e.querySelectorAll(t)}finally{this.id=n}},toggleClass:function(e,t,n){var r=e.classList;return void 0===n?r.contains(t)?(r.remove(t),!1):(r.add(t),!0):n?(r.add(t),!0):(r.remove(t),!1)}}),Ht=xt("match"),Yt=xt("species"),qt=[].push,Xt=Math.min,Kt=!p((function(){return!RegExp(4294967295,"y")}));Nt("split",2,(function(e,t,n){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,n){var r,o,i=String(E(this)),a=void 0===n?4294967295:n>>>0;if(0===a)return[];if(void 0===e)return[i];if(!_(r=e)||!(void 0!==(o=r[Ht])?o:"RegExp"==b(r)))return t.call(i,e,a);for(var l,c,u,f=[],s=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),p=0,d=new RegExp(e.source,s+"g");(l=lt.call(d,i))&&!((c=d.lastIndex)>p&&(f.push(i.slice(p,l.index)),l.length>1&&l.index<i.length&&qt.apply(f,l.slice(1)),u=l[0].length,p=c,f.length>=a));)d.lastIndex===l.index&&d.lastIndex++;return p===i.length?!u&&d.test("")||f.push(""):f.push(i.slice(p)),f.length>a?f.slice(0,a):f}:"0".split(void 0,0).length?function(e,n){return void 0===e&&0===n?[]:t.call(this,e,n)}:t,[function(t,n){var o=E(this),i=null==t?void 0:t[e];return void 0!==i?i.call(t,o,n):r.call(String(o),t,n)},function(e,o){var i=n(r,e,this,o,r!==t);if(i.done)return i.value;var a=F(e),l=String(this),c=function(e,t){var n,r=F(e).constructor;return void 0===r||null==(n=F(r)[Yt])?t:function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}(n)}(a,RegExp),u=a.unicode,f=(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.unicode?"u":"")+(Kt?"y":"g"),s=new c(Kt?a:"^(?:"+a.source+")",f),p=void 0===o?4294967295:o>>>0;if(0===p)return[];if(0===l.length)return null===Lt(s,l)?[l]:[];for(var d=0,h=0,g=[];h<l.length;){s.lastIndex=Kt?h:0;var v,y=Lt(s,Kt?l:l.slice(h));if(null===y||(v=Xt(de(s.lastIndex+(Kt?0:h)),l.length))===d)h=It(l,h,u);else{if(g.push(l.slice(d,h)),g.length===p)return g;for(var m=1;m<=y.length-1;m++)if(g.push(y[m]),g.length===p)return g;h=d=v}}return g.push(l.slice(d)),g}]}),!Kt);var Gt=M.f,Vt=Function.prototype,Jt=Vt.toString,Qt=/^\s*function ([^ (]*)/;d&&!("name"in Vt)&&Gt(Vt,"name",{configurable:!0,get:function(){try{return Jt.call(this).match(Qt)[1]}catch(e){return""}}});var Zt=function(){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this._events=[]}var n,o;return n=t,(o=[{key:"add",value:function(t,n,r,o){var i=n.split("."),a=i[0],l=i[1];t.addEventListener(a,r,o||!1);var c=!0===o||"object"===e(o)&&!0===o.capture;return this._events.push({el:t,name:a,namespace:l,handler:r,useCapture:c}),this}},{key:"remove",value:function(t,n,r,o){var i=n?n.split("."):"",a=i[0],c=i[1],u=!0===o||"object"===e(o)&&!0===o.capture,f=[],s=[];if(t||a||c||r||void 0!==o){var p,d=l(this._events);try{for(d.s();!(p=d.n()).done;){var h=p.value;t&&h.el!==t||a&&h.name!==a||c&&h.namespace!==c||r&&h.handler!==r||void 0!==o&&h.useCapture!==u?f.push(h):s.push(h)}}catch(e){d.e(e)}finally{d.f()}}else s=this._events;this._events=f;var g,v=l(s);try{for(v.s();!(g=v.n()).done;){var y=g.value;y.el.removeEventListener(y.name,y.handler,y.useCapture)}}catch(e){v.e(e)}finally{v.f()}return this}}])&&r(n.prototype,o),t}(),en=Object.freeze({__proto__:null,default:Zt}),tn=Math.hypot,nn=Math.abs,rn=Math.sqrt;Fe({target:"Math",stat:!0,forced:!!tn&&tn(1/0,NaN)!==1/0},{hypot:function(e,t){for(var n,r,o=0,i=0,a=arguments.length,l=0;i<a;)l<(n=nn(arguments[i++]))?(o=o*(r=l/n)*r+1,l=n):o+=n>0?(r=n/l)*r:n;return l===1/0?1/0:l*rn(o)}});var on=Object.freeze({__proto__:null,bindTouchTap:function(e,t){var n=null,r=null,o=function(t){if(null===n){var o=t.changedTouches[0];n=o.identifier,r=o?{x:o.pageX,y:o.pageY}:{x:t.pageX,y:t.pageY},e.addEventListener("touchend",i),e.addEventListener("touchcancel",a)}},i=function(e){if(null!==n){var o=null;if(e.changedTouches){if(null!=n){var i,a=l(e.changedTouches);try{for(a.s();!(i=a.n()).done;){var c=i.value;if(c.identifier===n){o=c;break}}}catch(e){a.e(e)}finally{a.f()}}o||(o=e.changedTouches[0])}var u=o?{x:o.pageX,y:o.pageY}:{x:e.pageX,y:e.pageY},f=r;if(n=null,r=null,null!==t.distance){var s=t.distance||1;if(Math.hypot(Math.abs(u.x-f.x),Math.abs(u.y-f.y))>=s)return!1}t.handler&&t.handler(e)}},a=function t(){n=null,r=null,e.removeEventListener("touchend",i),e.removeEventListener("touchcancel",t)};return e.addEventListener("touchstart",o),{unbind:function(){e.removeEventListener("touchstart",o),e.removeEventListener("touchend",i),e.removeEventListener("touchcancel",a)}}}});exports.Css=Xe,exports.Dom=Ge,exports.DomCompat=Wt,exports.DomEventsSink=en,exports.Touches=on;
"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function t(e){this.wrapped=e}function n(e){var n,r;function o(n,r){try{var l=e[n](r),a=l.value,c=a instanceof t;Promise.resolve(c?a.wrapped:a).then((function(e){c?o("return"===n?"return":"next",e):i(l.done?"return":"normal",e)}),(function(e){o("throw",e)}))}catch(e){i("throw",e)}}function i(e,t){switch(e){case"return":n.resolve({value:t,done:!0});break;case"throw":n.reject(t);break;default:n.resolve({value:t,done:!1})}(n=n.next)?o(n.key,n.arg):r=null}this._invoke=function(e,t){return new Promise((function(i,l){var a={key:e,arg:t,resolve:i,reject:l,next:null};r?r=r.next=a:(n=r=a,o(e,t))}))},"function"!=typeof e.return&&(this.return=void 0)}function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var l,a=e[Symbol.iterator]();!(r=(l=a.next()).done)&&(n.push(l.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return n}}(e,t)||i(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){if(e){if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function a(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=i(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,a=!0,c=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){c=!0,l=e},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw l}}}}Object.defineProperty(exports,"__esModule",{value:!0}),"function"==typeof Symbol&&Symbol.asyncIterator&&(n.prototype[Symbol.asyncIterator]=function(){return this}),n.prototype.next=function(e){return this._invoke("next",e)},n.prototype.throw=function(e){return this._invoke("throw",e)},n.prototype.return=function(e){return this._invoke("return",e)};var c="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function u(e,t){return e(t={exports:{}},t.exports),t.exports}var f=function(e){return e&&e.Math==Math&&e},s=f("object"==typeof globalThis&&globalThis)||f("object"==typeof window&&window)||f("object"==typeof self&&self)||f("object"==typeof c&&c)||function(){return this}()||Function("return this")(),d=function(e){try{return!!e()}catch(e){return!0}},p=!d((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),h={}.propertyIsEnumerable,g=Object.getOwnPropertyDescriptor,v={f:g&&!h.call({1:2},1)?function(e){var t=g(this,e);return!!t&&t.enumerable}:h},y=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},m={}.toString,b=function(e){return m.call(e).slice(8,-1)},S="".split,x=d((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==b(e)?S.call(e,""):Object(e)}:Object,E=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},w=function(e){return x(E(e))},_=function(e){return"object"==typeof e?null!==e:"function"==typeof e},C=function(e,t){if(!_(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!_(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!_(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!_(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},O={}.hasOwnProperty,T=function(e,t){return O.call(e,t)},j=s.document,N=_(j)&&_(j.createElement),A=!p&&!d((function(){return 7!=Object.defineProperty(("div",N?j.createElement("div"):{}),"a",{get:function(){return 7}}).a})),I=Object.getOwnPropertyDescriptor,F={f:p?I:function(e,t){if(e=w(e),t=C(t,!0),A)try{return I(e,t)}catch(e){}if(T(e,t))return y(!v.f.call(e,t),e[t])}},P=function(e){if(!_(e))throw TypeError(String(e)+" is not an object");return e},R=Object.defineProperty,L={f:p?R:function(e,t,n){if(P(e),t=C(t,!0),P(n),A)try{return R(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},M=p?function(e,t,n){return L.f(e,t,y(1,n))}:function(e,t,n){return e[t]=n,e},k=function(e,t){try{M(s,e,t)}catch(n){s[e]=t}return t},W=s["__core-js_shared__"]||k("__core-js_shared__",{}),D=Function.toString;"function"!=typeof W.inspectSource&&(W.inspectSource=function(e){return D.call(e)});var $,z,B,U=W.inspectSource,H=s.WeakMap,q="function"==typeof H&&/native code/.test(U(H)),Y=u((function(e){(e.exports=function(e,t){return W[e]||(W[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.9.1",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})})),X=0,K=Math.random(),G=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++X+K).toString(36)},V=Y("keys"),J={},Q=s.WeakMap;if(q){var Z=W.state||(W.state=new Q),ee=Z.get,te=Z.has,ne=Z.set;$=function(e,t){return t.facade=e,ne.call(Z,e,t),t},z=function(e){return ee.call(Z,e)||{}},B=function(e){return te.call(Z,e)}}else{var re=V["state"]||(V.state=G("state"));J[re]=!0,$=function(e,t){return t.facade=e,M(e,re,t),t},z=function(e){return T(e,re)?e[re]:{}},B=function(e){return T(e,re)}}var oe={set:$,get:z,has:B,enforce:function(e){return B(e)?z(e):$(e,{})},getterFor:function(e){return function(t){var n;if(!_(t)||(n=z(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}},ie=u((function(e){var t=oe.get,n=oe.enforce,r=String(String).split("String");(e.exports=function(e,t,o,i){var l,a=!!i&&!!i.unsafe,c=!!i&&!!i.enumerable,u=!!i&&!!i.noTargetGet;"function"==typeof o&&("string"!=typeof t||T(o,"name")||M(o,"name",t),(l=n(o)).source||(l.source=r.join("string"==typeof t?t:""))),e!==s?(a?!u&&e[t]&&(c=!0):delete e[t],c?e[t]=o:M(e,t,o)):c?e[t]=o:k(t,o)})(Function.prototype,"toString",(function(){return"function"==typeof this&&t(this).source||U(this)}))})),le=s,ae=function(e){return"function"==typeof e?e:void 0},ce=function(e,t){return arguments.length<2?ae(le[e])||ae(s[e]):le[e]&&le[e][t]||s[e]&&s[e][t]},ue=Math.ceil,fe=Math.floor,se=function(e){return isNaN(e=+e)?0:(e>0?fe:ue)(e)},de=Math.min,pe=function(e){return e>0?de(se(e),9007199254740991):0},he=Math.max,ge=Math.min,ve=function(e){return function(t,n,r){var o,i=w(t),l=pe(i.length),a=function(e,t){var n=se(e);return n<0?he(n+t,0):ge(n,t)}(r,l);if(e&&n!=n){for(;l>a;)if((o=i[a++])!=o)return!0}else for(;l>a;a++)if((e||a in i)&&i[a]===n)return e||a||0;return!e&&-1}},ye={includes:ve(!0),indexOf:ve(!1)}.indexOf,me=function(e,t){var n,r=w(e),o=0,i=[];for(n in r)!T(J,n)&&T(r,n)&&i.push(n);for(;t.length>o;)T(r,n=t[o++])&&(~ye(i,n)||i.push(n));return i},be=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Se=be.concat("length","prototype"),xe={f:Object.getOwnPropertyNames||function(e){return me(e,Se)}},Ee={f:Object.getOwnPropertySymbols},we=ce("Reflect","ownKeys")||function(e){var t=xe.f(P(e)),n=Ee.f;return n?t.concat(n(e)):t},_e=function(e,t){for(var n=we(t),r=L.f,o=F.f,i=0;i<n.length;i++){var l=n[i];T(e,l)||r(e,l,o(t,l))}},Ce=/#|\.prototype\./,Oe=function(e,t){var n=je[Te(e)];return n==Ae||n!=Ne&&("function"==typeof t?d(t):!!t)},Te=Oe.normalize=function(e){return String(e).replace(Ce,".").toLowerCase()},je=Oe.data={},Ne=Oe.NATIVE="N",Ae=Oe.POLYFILL="P",Ie=Oe,Fe=F.f,Pe=function(e,t){var n,r,o,i,l,a=e.target,c=e.global,u=e.stat;if(n=c?s:u?s[a]||k(a,{}):(s[a]||{}).prototype)for(r in t){if(i=t[r],o=e.noTargetGet?(l=Fe(n,r))&&l.value:n[r],!Ie(c?r:a+(u?".":"#")+r,e.forced)&&void 0!==o){if(typeof i==typeof o)continue;_e(i,o)}(e.sham||o&&o.sham)&&M(i,"sham",!0),ie(n,r,i,e)}},Re=Object.keys||function(e){return me(e,be)},Le=v.f,Me=function(e){return function(t){for(var n,r=w(t),o=Re(r),i=o.length,l=0,a=[];i>l;)n=o[l++],p&&!Le.call(r,n)||a.push(e?[n,r[n]]:r[n]);return a}},ke={entries:Me(!0),values:Me(!1)}.entries;Pe({target:"Object",stat:!0},{entries:function(e){return ke(e)}});var We=function(e,t){for(var n=0,r=Object.entries(t);n<r.length;n++){var i=o(r[n],2),l=i[0],a=i[1];e.style[l]=null==a?"":String(a)}},De=function(e,t,n,r,o){return function(){var i,l,a,c,u=arguments.length<=0?void 0:arguments[0];if(e?(i=arguments.length<=1?void 0:arguments[1],l=!!(arguments.length<=2?void 0:arguments[2]),a=!!(arguments.length<=3?void 0:arguments[3]),c=!!(arguments.length<=4?void 0:arguments[4])):(l=!!(arguments.length<=1?void 0:arguments[1]),a=!!(arguments.length<=2?void 0:arguments[2]),c=!!(arguments.length<=3?void 0:arguments[3])),u===window)return u.document.documentElement["client".concat(n)];if(9===u.nodeType){var f=u.documentElement,s=u.body;return Math.max(s["scroll".concat(n)],f["scroll".concat(n)],s["offset".concat(n)],f["offset".concat(n)],f["client".concat(n)])}var d,p,h=!1,g=!1;if(!e&&"getBoundingClientRect"in u&&(d=u.getBoundingClientRect()[t],h=!0,g=!0),(void 0===d||c||h!==l||g!==a)&&(p=e?getComputedStyle(u,i):getComputedStyle(u)),void 0===d){var v=p[t];"auto"===v?(d=u["client".concat(n)],h=!0):d=parseFloat(v),"border-box"===p.boxSizing&&(h=!0,g=!0)}if(l!==h){var y=parseFloat(p["padding-".concat(r)]||0)+parseFloat(p["padding-".concat(o)]||0);l?d+=y:d-=y}if(a!==g){var m=parseFloat(p["border-".concat(r,"-width")]||0)+parseFloat(p["border-".concat(o,"-width")]||0);a?d+=m:d-=m}if(d<0&&(d=0),c){var b=parseFloat(p["margin-".concat(r)]||0)+parseFloat(p["margin-".concat(o)]||0);d+=b}return d}},$e=function(e,t,n,r){return function(t,o){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],l=arguments.length>3&&void 0!==arguments[3]&&arguments[3],a=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(t!==window&&9!==t.nodeType){var c=getComputedStyle(t),u=!1;if("border-box"===c.boxSizing&&(u=!0),i=!!i,l=!!l,(a=!!a)&&(o-=(parseFloat(c["margin-".concat(n)])||0)+(parseFloat(c["margin-".concat(r)])||0)),i!==u){var f=parseFloat(c["padding-".concat(n)]||0)+parseFloat(c["padding-".concat(r)]||0);i?o-=f:o+=f}if(l!==u){var s=(parseFloat(c["border-".concat(n,"-width")])||0)+(parseFloat(c["border-".concat(r,"-width")])||0);l?o-=s:o+=s}o<0&&(o=0),t.style[e]=o+"px"}}},ze=De(!1,"width","Width","left","right"),Be=De(!1,"height","Height","top","bottom"),Ue=De(!0,"width","Width","left","right"),He=De(!0,"height","Height","top","bottom"),qe=$e("width",0,"left","right"),Ye=$e("height",0,"top","bottom"),Xe=Object.freeze({__proto__:null,getCssProps:function(e,t){var n,r=getComputedStyle(e),o={},i=a(t);try{for(i.s();!(n=i.n()).done;){var l=n.value,c=r[l];("width"===l||"height"===l)&&"auto"===c&&e instanceof HTMLElement&&(c=e["offset"+l.substr(0,1).toUpperCase()+l.substr(1)],"border-box"!==r.boxSizing&&("width"===l?(c-=parseFloat(r.paddingLeft||0),c-=parseFloat(r.paddingRight||0),c-=parseFloat(r.borderLeftWidth||0),c-=parseFloat(r.borderRightWidth||0)):(c-=parseFloat(r.paddingTop||0),c-=parseFloat(r.paddingBottom||0),c-=parseFloat(r.borderTopWidth||0),c-=parseFloat(r.borderBottomWidth||0)),c<0&&(c=0))),o[l]=c}}catch(e){i.e(e)}finally{i.f()}return o},setCssProps:We,getElementWidth:ze,getElementHeight:Be,setElementWidth:qe,setElementHeight:Ye,getPseudoElementWidth:Ue,getPseudoElementHeight:He,getElementOffset:function(e){if(!e.getClientRects().length)return{top:0,left:0};var t=e.getBoundingClientRect(),n=e.ownerDocument.defaultView;return{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}},anchoredPosition:function(e,t,n,r,o){var i,l,a,c;if(r||(r={width:ze(e,!0,!0),height:ze(e,!0,!0)}),"start"!==t&&"end"!==t||(null==o&&(o="rtl"===getComputedStyle(e).direction),t="start"===t?o?"right":"left":o?"left":"right"),"right"===t)i=r.width,a=0;else if("center"===t)a=i=r.width/2;else if("left"===t)i=0,a=r.width;else if(t&&"string"==typeof t&&"%"===t.charAt(t.length-1)){var u=(parseFloat(t)||0)/100;i=r.width*u,a=r.width*-u,null==o&&(o="rtl"===getComputedStyle(e).direction),o&&(i=r.width-i,a=r.width-i)}else a=-(i=parseFloat(t)||0);if("bottom"===n)l=r.height,c=0;else if("center"===n)c=l=r.height/2;else if("top"===n)l=0,c=r.height;else if(n&&"string"==typeof n&&"%"===n.charAt(n.length-1)){var f=(parseFloat(n)||0)/100;l=r.height*f,c=r.height*-f}else c=-(l=parseFloat(n)||0);return{left:i,top:l,right:a,bottom:c,xSpec:t,ySpec:n}}}),Ke=function(e,t){for(var n=0,r=Object.entries(t);n<r.length;n++){var i=o(r[n],2),l=i[0],a=i[1];null!=a&&("innerHTML"===l?e.innerHTML=String(a):"css"===l&&"style"in e?We(e,a):"readOnly"===l||"tabIndex"===l||"textContent"===l?e[l]=a:e.setAttribute(l,String(a)))}},Ge=Object.freeze({__proto__:null,createElement:function(t,n,r){var o=document.createElement(t);if(n&&"object"===e(n)&&Ke(o,n),r)if(r instanceof Node)o.appendChild(r);else if(Array.isArray(r)){var i,l=a(r);try{for(l.s();!(i=l.n()).done;){var c=i.value;o.appendChild(c)}}catch(e){l.e(e)}finally{l.f()}}return o},setElementAttrs:Ke,closestUntil:function(e,t,n){if("closest"in e&&!n)return e.closest(t);var r=Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector;do{if(r.call(e,t))return e;if(n&&e===n)return null;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null},prev:function(e,t){if(!e)return null;var n=Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector;do{if(n.call(e,t))return e;e=e.previousElementSibling||e.previousSibling}while(null!==e&&1===e.nodeType);return null},next:function(e,t){if(!e)return null;var n=Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector;do{if(n.call(e,t))return e;e=e.nextElementSibling||e.nextSibling}while(null!==e&&1===e.nodeType);return null}}),Ve=function(){var e=P(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t};function Je(e,t){return RegExp(e,t)}var Qe,Ze,et={UNSUPPORTED_Y:d((function(){var e=Je("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),BROKEN_CARET:d((function(){var e=Je("^r","gy");return e.lastIndex=2,null!=e.exec("str")}))},tt=RegExp.prototype.exec,nt=String.prototype.replace,rt=tt,ot=(Qe=/a/,Ze=/b*/g,tt.call(Qe,"a"),tt.call(Ze,"a"),0!==Qe.lastIndex||0!==Ze.lastIndex),it=et.UNSUPPORTED_Y||et.BROKEN_CARET,lt=void 0!==/()??/.exec("")[1];(ot||lt||it)&&(rt=function(e){var t,n,r,o,i=this,l=it&&i.sticky,a=Ve.call(i),c=i.source,u=0,f=e;return l&&(-1===(a=a.replace("y","")).indexOf("g")&&(a+="g"),f=String(e).slice(i.lastIndex),i.lastIndex>0&&(!i.multiline||i.multiline&&"\n"!==e[i.lastIndex-1])&&(c="(?: "+c+")",f=" "+f,u++),n=new RegExp("^(?:"+c+")",a)),lt&&(n=new RegExp("^"+c+"$(?!\\s)",a)),ot&&(t=i.lastIndex),r=tt.call(l?n:i,f),l?r?(r.input=r.input.slice(u),r[0]=r[0].slice(u),r.index=i.lastIndex,i.lastIndex+=r[0].length):i.lastIndex=0:ot&&r&&(i.lastIndex=i.global?r.index+r[0].length:t),lt&&r&&r.length>1&&nt.call(r[0],n,(function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(r[o]=void 0)})),r});var at=rt;Pe({target:"RegExp",proto:!0,forced:/./.exec!==at},{exec:at});var ct,ut,ft="process"==b(s.process),st=ce("navigator","userAgent")||"",dt=s.process,pt=dt&&dt.versions,ht=pt&&pt.v8;ht?ut=(ct=ht.split("."))[0]+ct[1]:st&&(!(ct=st.match(/Edge\/(\d+)/))||ct[1]>=74)&&(ct=st.match(/Chrome\/(\d+)/))&&(ut=ct[1]);var gt=ut&&+ut,vt=!!Object.getOwnPropertySymbols&&!d((function(){return!Symbol.sham&&(ft?38===gt:gt>37&&gt<41)})),yt=vt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,mt=Y("wks"),bt=s.Symbol,St=yt?bt:bt&&bt.withoutSetter||G,xt=function(e){return T(mt,e)&&(vt||"string"==typeof mt[e])||(vt&&T(bt,e)?mt[e]=bt[e]:mt[e]=St("Symbol."+e)),mt[e]},Et=xt("species"),wt=!d((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),_t="$0"==="a".replace(/./,"$0"),Ct=xt("replace"),Ot=!!/./[Ct]&&""===/./[Ct]("a","$0"),Tt=!d((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]})),jt=function(e,t,n,r){var o=xt(e),i=!d((function(){var t={};return t[o]=function(){return 7},7!=""[e](t)})),l=i&&!d((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[Et]=function(){return n},n.flags="",n[o]=/./[o]),n.exec=function(){return t=!0,null},n[o](""),!t}));if(!i||!l||"replace"===e&&(!wt||!_t||Ot)||"split"===e&&!Tt){var a=/./[o],c=n(o,""[e],(function(e,t,n,r,o){return t.exec===at?i&&!o?{done:!0,value:a.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}}),{REPLACE_KEEPS_$0:_t,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:Ot}),u=c[0],f=c[1];ie(String.prototype,e,u),ie(RegExp.prototype,o,2==t?function(e,t){return f.call(e,this,t)}:function(e){return f.call(e,this)})}r&&M(RegExp.prototype[o],"sham",!0)},Nt=function(e){return function(t,n){var r,o,i=String(E(t)),l=se(n),a=i.length;return l<0||l>=a?e?"":void 0:(r=i.charCodeAt(l))<55296||r>56319||l+1===a||(o=i.charCodeAt(l+1))<56320||o>57343?e?i.charAt(l):r:e?i.slice(l,l+2):o-56320+(r-55296<<10)+65536}},At={codeAt:Nt(!1),charAt:Nt(!0)}.charAt,It=function(e,t,n){return t+(n?At(e,t).length:1)},Ft=function(e){return Object(E(e))},Pt=Math.floor,Rt="".replace,Lt=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Mt=/\$([$&'`]|\d{1,2})/g,kt=function(e,t,n,r,o,i){var l=n+e.length,a=r.length,c=Mt;return void 0!==o&&(o=Ft(o),c=Lt),Rt.call(i,c,(function(i,c){var u;switch(c.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,n);case"'":return t.slice(l);case"<":u=o[c.slice(1,-1)];break;default:var f=+c;if(0===f)return i;if(f>a){var s=Pt(f/10);return 0===s?i:s<=a?void 0===r[s-1]?c.charAt(1):r[s-1]+c.charAt(1):i}u=r[f-1]}return void 0===u?"":u}))},Wt=function(e,t){var n=e.exec;if("function"==typeof n){var r=n.call(e,t);if("object"!=typeof r)throw TypeError("RegExp exec method returned something other than an Object or null");return r}if("RegExp"!==b(e))throw TypeError("RegExp#exec called on incompatible receiver");return at.call(e,t)},Dt=Math.max,$t=Math.min;jt("replace",2,(function(e,t,n,r){var o=r.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,i=r.REPLACE_KEEPS_$0,l=o?"$":"$0";return[function(n,r){var o=E(this),i=null==n?void 0:n[e];return void 0!==i?i.call(n,o,r):t.call(String(o),n,r)},function(e,r){if(!o&&i||"string"==typeof r&&-1===r.indexOf(l)){var a=n(t,e,this,r);if(a.done)return a.value}var c=P(e),u=String(this),f="function"==typeof r;f||(r=String(r));var s=c.global;if(s){var d=c.unicode;c.lastIndex=0}for(var p=[];;){var h=Wt(c,u);if(null===h)break;if(p.push(h),!s)break;""===String(h[0])&&(c.lastIndex=It(u,pe(c.lastIndex),d))}for(var g,v="",y=0,m=0;m<p.length;m++){h=p[m];for(var b=String(h[0]),S=Dt($t(se(h.index),u.length),0),x=[],E=1;E<h.length;E++)x.push(void 0===(g=h[E])?g:String(g));var w=h.groups;if(f){var _=[b].concat(x,S,u);void 0!==w&&_.push(w);var C=String(r.apply(void 0,_))}else C=kt(b,u,S,x,w,r);S>=y&&(v+=u.slice(y,S)+C,y=S+b.length)}return v+u.slice(y)}]}));var zt=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(0!==n.length)if("after"in e)e.after.apply(e,n);else if(1===n.length){var o=n[0],i=o instanceof Node;o=i?o:document.createTextNode(String(o)),e.parentNode.insertBefore(o,e.nextSibling)}else{var l,c=document.createDocumentFragment(),u=a(n);try{for(u.s();!(l=u.n()).done;){var f=l.value,s=f instanceof Node;c.appendChild(s?f:document.createTextNode(String(f)))}}catch(e){u.e(e)}finally{u.f()}e.nextSibling?e.parentNode.insertBefore(c,e.nextSibling):e.parentNode.appendChild(c)}},Bt=null,Ut=function(){try{document.createElement("div").querySelector(":scope > div"),Bt=!0}catch(e){Bt=!1}},Ht=Object.freeze({__proto__:null,getRootNode:function(e){if(!e)return null;if("getRootNode"in e)return e.getRootNode();for(;e.parentNode;)e=e.parentNode;return e},closest:function(e,t){if("closest"in e)return e.closest(t);var n=Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector;do{if(n.call(e,t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null},remove:function(e){e&&("remove"in e&&e.remove(),e.parentNode&&e.parentNode.removeChild(e))},before:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(0!==n.length)if("before"in e)zt.before.apply(zt,n);else if(1===n.length){var o=n[0],i=o instanceof Node;o=i?o:document.createTextNode(String(o)),zt.parentNode.insertBefore(o,e)}else{var l,c=document.createDocumentFragment(),u=a(n);try{for(u.s();!(l=u.n()).done;){var f=l.value,s=f instanceof Node;c.appendChild(s?f:document.createTextNode(String(f)))}}catch(e){u.e(e)}finally{u.f()}e.parentNode.insertBefore(c,e)}},after:zt,prepend:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(0!==n.length)if("prepend"in e)e.prepend.apply(e,n);else if(1===n.length){var o=n[0],i=o instanceof Node;o=i?o:document.createTextNode(String(o)),e.firstChild?e.insertBefore(o,e.firstChild):e.appendChild(o)}else{var l,c=document.createDocumentFragment(),u=a(n);try{for(u.s();!(l=u.n()).done;){var f=l.value,s=f instanceof Node;c.appendChild(s?f:document.createTextNode(String(f)))}}catch(e){u.e(e)}finally{u.f()}e.firstChild?e.insertBefore(c,e.firstChild):e.appendChild(c)}},append:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(0!==n.length)if("append"in e)e.append.apply(e,n);else if(1===n.length){var o=n[0],i=o instanceof Node;o=i?o:document.createTextNode(String(o)),e.appendChild(o)}else{var l,c=document.createDocumentFragment(),u=a(n);try{for(u.s();!(l=u.n()).done;){var f=l.value,s=f instanceof Node;c.appendChild(s?f:document.createTextNode(String(f)))}}catch(e){u.e(e)}finally{u.f()}e.appendChild(c)}},scopedSelector:function(e,t){if(null===Bt&&Ut(),!0===Bt)return e.querySelector(t.replace(/((?:^|,)\s*)/g,"$1:scope "));var n=e.id,r="ID_"+Date.now();e.id=r,t=t.replace(/((?:^|,)\s*)/g,"$1#"+r);try{return e.querySelector(t)}finally{this.id=n}},scopedSelectorAll:function(e,t){if(null===Bt&&Ut(),!0===Bt)return e.querySelectorAll(t.replace(/((?:^|,)\s*)/g,"$1:scope "));var n=e.id,r="ID_"+Date.now();e.id=r,t=t.replace(/((?:^|,)\s*)/g,"$1#"+r);try{return e.querySelectorAll(t)}finally{this.id=n}},toggleClass:function(e,t,n){var r=e.classList;return void 0===n?r.contains(t)?(r.remove(t),!1):(r.add(t),!0):n?(r.add(t),!0):(r.remove(t),!1)}}),qt=xt("match"),Yt=xt("species"),Xt=[].push,Kt=Math.min,Gt=!d((function(){return!RegExp(4294967295,"y")}));jt("split",2,(function(e,t,n){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,n){var r,o,i=String(E(this)),l=void 0===n?4294967295:n>>>0;if(0===l)return[];if(void 0===e)return[i];if(!_(r=e)||!(void 0!==(o=r[qt])?o:"RegExp"==b(r)))return t.call(i,e,l);for(var a,c,u,f=[],s=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),d=0,p=new RegExp(e.source,s+"g");(a=at.call(p,i))&&!((c=p.lastIndex)>d&&(f.push(i.slice(d,a.index)),a.length>1&&a.index<i.length&&Xt.apply(f,a.slice(1)),u=a[0].length,d=c,f.length>=l));)p.lastIndex===a.index&&p.lastIndex++;return d===i.length?!u&&p.test("")||f.push(""):f.push(i.slice(d)),f.length>l?f.slice(0,l):f}:"0".split(void 0,0).length?function(e,n){return void 0===e&&0===n?[]:t.call(this,e,n)}:t,[function(t,n){var o=E(this),i=null==t?void 0:t[e];return void 0!==i?i.call(t,o,n):r.call(String(o),t,n)},function(e,o){var i=n(r,e,this,o,r!==t);if(i.done)return i.value;var l=P(e),a=String(this),c=function(e,t){var n,r=P(e).constructor;return void 0===r||null==(n=P(r)[Yt])?t:function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}(n)}(l,RegExp),u=l.unicode,f=(l.ignoreCase?"i":"")+(l.multiline?"m":"")+(l.unicode?"u":"")+(Gt?"y":"g"),s=new c(Gt?l:"^(?:"+l.source+")",f),d=void 0===o?4294967295:o>>>0;if(0===d)return[];if(0===a.length)return null===Wt(s,a)?[a]:[];for(var p=0,h=0,g=[];h<a.length;){s.lastIndex=Gt?h:0;var v,y=Wt(s,Gt?a:a.slice(h));if(null===y||(v=Kt(pe(s.lastIndex+(Gt?0:h)),a.length))===p)h=It(a,h,u);else{if(g.push(a.slice(p,h)),g.length===d)return g;for(var m=1;m<=y.length-1;m++)if(g.push(y[m]),g.length===d)return g;h=p=v}}return g.push(a.slice(p)),g}]}),!Gt);var Vt=L.f,Jt=Function.prototype,Qt=Jt.toString,Zt=/^\s*function ([^ (]*)/;p&&!("name"in Jt)&&Vt(Jt,"name",{configurable:!0,get:function(){try{return Qt.call(this).match(Zt)[1]}catch(e){return""}}});var en=function(){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this._events=[]}var n,o;return n=t,(o=[{key:"add",value:function(t,n,r,o){var i=n.split("."),l=i[0],a=i[1];t.addEventListener(l,r,o||!1);var c=!0===o||"object"===e(o)&&!0===o.capture;return this._events.push({el:t,name:l,namespace:a,handler:r,useCapture:c}),this}},{key:"remove",value:function(t,n,r,o){var i=n?n.split("."):"",l=i[0],c=i[1],u=!0===o||"object"===e(o)&&!0===o.capture,f=[],s=[];if(t||l||c||r||void 0!==o){var d,p=a(this._events);try{for(p.s();!(d=p.n()).done;){var h=d.value;t&&h.el!==t||l&&h.name!==l||c&&h.namespace!==c||r&&h.handler!==r||void 0!==o&&h.useCapture!==u?f.push(h):s.push(h)}}catch(e){p.e(e)}finally{p.f()}}else s=this._events;this._events=f;var g,v=a(s);try{for(v.s();!(g=v.n()).done;){var y=g.value;y.el.removeEventListener(y.name,y.handler,y.useCapture)}}catch(e){v.e(e)}finally{v.f()}return this}}])&&r(n.prototype,o),t}(),tn=Object.freeze({__proto__:null,default:en}),nn=Math.hypot,rn=Math.abs,on=Math.sqrt;Pe({target:"Math",stat:!0,forced:!!nn&&nn(1/0,NaN)!==1/0},{hypot:function(e,t){for(var n,r,o=0,i=0,l=arguments.length,a=0;i<l;)a<(n=rn(arguments[i++]))?(o=o*(r=a/n)*r+1,a=n):o+=n>0?(r=n/a)*r:n;return a===1/0?1/0:a*on(o)}});var ln,an=Object.freeze({__proto__:null,bindTouchTap:function(e,t){var n=null,r=null,o=function(t){if(null===n){var o=t.changedTouches[0];n=o.identifier,r=o?{x:o.pageX,y:o.pageY}:{x:t.pageX,y:t.pageY},e.addEventListener("touchend",i),e.addEventListener("touchcancel",l)}},i=function(e){if(null!==n){var o=null;if(e.changedTouches){if(null!=n){var i,l=a(e.changedTouches);try{for(l.s();!(i=l.n()).done;){var c=i.value;if(c.identifier===n){o=c;break}}}catch(e){l.e(e)}finally{l.f()}}o||(o=e.changedTouches[0])}var u=o?{x:o.pageX,y:o.pageY}:{x:e.pageX,y:e.pageY},f=r;if(n=null,r=null,null!==t.distance){var s=t.distance||1;if(Math.hypot(Math.abs(u.x-f.x),Math.abs(u.y-f.y))>=s)return!1}t.handler&&t.handler(e)}},l=function t(){n=null,r=null,e.removeEventListener("touchend",i),e.removeEventListener("touchcancel",t)};return e.addEventListener("touchstart",o),{unbind:function(){e.removeEventListener("touchstart",o),e.removeEventListener("touchend",i),e.removeEventListener("touchcancel",l)}}}}),cn=Object.assign,un=Object.defineProperty,fn=!cn||d((function(){if(p&&1!==cn({b:1},cn(un({},"a",{enumerable:!0,get:function(){un(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!=cn({},e)[n]||Re(cn({},t)).join("")!=r}))?function(e,t){for(var n=Ft(e),r=arguments.length,o=1,i=Ee.f,l=v.f;r>o;)for(var a,c=x(arguments[o++]),u=i?Re(c).concat(i(c)):Re(c),f=u.length,s=0;f>s;)a=u[s++],p&&!l.call(c,a)||(n[a]=c[a]);return n}:cn;Pe({target:"Object",stat:!0,forced:Object.assign!==fn},{assign:fn});var sn=function(){var e=document.createElement("div");e.dir="rtl",Object.assign(e.style,{direction:"rtl",fontSize:"14px",width:"1px",height:"1px",position:"absolute",top:"-1000px",overflow:"scroll"}),e.textContent="A",document.body.appendChild(e);var t="reverse";return e.scrollLeft>0?t="default":(e.scrollLeft=1,0===e.scrollLeft&&(t="negative")),e.parentNode.removeChild(e),t};function dn(e,t,n){if(void 0===n&&(n="rtl"===getComputedStyle(e).direction),!0===n&&void 0===ln&&(ln=sn()),!n)return t;switch(ln){case"negative":return t-e.scrollWidth+e.clientWidth;case"reverse":return e.scrollWidth-t-e.clientWidth;default:return t}}function pn(e,t){if(void 0===t&&(t="rtl"===getComputedStyle(e).direction),!0===t&&void 0===ln&&(ln=sn()),!t)return e.scrollLeft;switch(ln){case"negative":return e.scrollLeft+e.scrollWidth-e.clientWidth;case"reverse":return e.scrollWidth-e.scrollLeft-e.clientWidth;default:return e.scrollLeft}}function hn(e,t,n){return void 0===n&&(n="rtl"===getComputedStyle(e).direction),dn(e,n?e.scrollWidth-e.clientWidth-t:t,n)}var gn=Object.freeze({__proto__:null,calculateScrollLeftForValue:dn,getScrollLeft:pn,setScrollLeft:function(e,t,n){e.scrollLeft=dn(e,t,n)},calculateScrollHorzForValue:hn,getScrollHorz:function(e,t){return void 0===t&&(t="rtl"===getComputedStyle(e).direction),t?e.scrollWidth-e.clientWidth-pn(e,t):pn(e,t)},setScrollHorz:function(e,t,n){e.scrollLeft=hn(e,t,n)}});exports.Css=Xe,exports.Dom=Ge,exports.DomCompat=Ht,exports.DomEventsSink=tn,exports.ScrollHelper=gn,exports.Touches=an;
//# sourceMappingURL=lib.cjs.min.js.map
/*!
* @danielgindi/dom-utils 1.0.0
* @danielgindi/dom-utils 1.0.1
* git://github.com/danielgindi/dom-utils.git

@@ -944,4 +944,160 @@ */

export { Css, Dom, DomCompat, DomEventsSink$1 as DomEventsSink, Touches };
let rtlScrollType;
const detectRtlScrollType = () => {
const definer = document.createElement('div');
definer.dir = 'rtl';
Object.assign(definer.style, {
direction: 'rtl',
fontSize: '14px',
width: '1px',
height: '1px',
position: 'absolute',
top: '-1000px',
overflow: 'scroll',
});
definer.textContent = 'A';
document.body.appendChild(definer);
let type = 'reverse';
if (definer.scrollLeft > 0) {
type = 'default';
} else {
definer.scrollLeft = 1;
if (definer.scrollLeft === 0) {
type = 'negative';
}
}
definer.parentNode.removeChild(definer);
return type;
};
/**
* @param {Element} el
* @param {number} left
* @param {boolean|undefined} [rtl] if unspecified, then it's automatically detected.
* @returns {number}
*/
function calculateScrollLeftForValue(el, left, rtl) {
if (rtl === undefined) {
rtl = getComputedStyle(el).direction === 'rtl';
}
if (rtl === true && rtlScrollType === undefined) {
rtlScrollType = detectRtlScrollType();
}
if (rtl) {
switch (rtlScrollType) {
case 'negative':
return left - el.scrollWidth + el.clientWidth;
case 'reverse':
return el.scrollWidth - left - el.clientWidth;
default:
return left;
}
} else {
return left;
}
}
/**
* @param {Element} el
* @param {boolean|undefined} [rtl] if unspecified, then it's automatically detected.
* @returns {number}
*/
function getScrollLeft(el, rtl) {
if (rtl === undefined) {
rtl = getComputedStyle(el).direction === 'rtl';
}
if (rtl === true && rtlScrollType === undefined) {
rtlScrollType = detectRtlScrollType();
}
if (rtl) {
switch (rtlScrollType) {
case 'negative':
return el.scrollLeft + el.scrollWidth - el.clientWidth;
case 'reverse':
return el.scrollWidth - el.scrollLeft - el.clientWidth;
default:
return el.scrollLeft;
}
} else {
return el.scrollLeft;
}
}
/**
* @param {Element} el
* @param {number} left
* @param {boolean|undefined} [rtl] if unspecified, then it's automatically detected.
*/
function setScrollLeft(el, left, rtl) {
el.scrollLeft = calculateScrollLeftForValue(el, left, rtl);
}
/**
* @param {Element} el
* @param {number} value
* @param {boolean|undefined} [rtl] if unspecified, then it's automatically detected.
* @returns {number}
*/
function calculateScrollHorzForValue(el, value, rtl) {
if (rtl === undefined) {
rtl = getComputedStyle(el).direction === 'rtl';
}
if (rtl) {
return calculateScrollLeftForValue(el, el.scrollWidth - el.clientWidth - value, rtl);
} else {
return calculateScrollLeftForValue(el, value, rtl);
}
}
/**
* @param {Element} el
* @param {boolean|undefined} [rtl] if unspecified, then it's automatically detected.
* @returns {number}
*/
function getScrollHorz(el, rtl) {
if (rtl === undefined) {
rtl = getComputedStyle(el).direction === 'rtl';
}
if (rtl) {
return el.scrollWidth - el.clientWidth - getScrollLeft(el, rtl);
} else {
return getScrollLeft(el, rtl);
}
}
/**
* @param {Element} el
* @param {number} horz
* @param {boolean|undefined} [rtl] if unspecified, then it's automatically detected.
*/
function setScrollHorz(el, horz, rtl) {
el.scrollLeft = calculateScrollHorzForValue(el, horz, rtl);
}
var ScrollHelper = /*#__PURE__*/Object.freeze({
__proto__: null,
calculateScrollLeftForValue: calculateScrollLeftForValue,
getScrollLeft: getScrollLeft,
setScrollLeft: setScrollLeft,
calculateScrollHorzForValue: calculateScrollHorzForValue,
getScrollHorz: getScrollHorz,
setScrollHorz: setScrollHorz
});
export { Css, Dom, DomCompat, DomEventsSink$1 as DomEventsSink, ScrollHelper, Touches };
//# sourceMappingURL=lib.es6.js.map
/*!
* @danielgindi/dom-utils 1.0.0
* @danielgindi/dom-utils 1.0.1
* git://github.com/danielgindi/dom-utils.git
*/
const e=function(e,t){for(let[n,o]of Object.entries(t))e.style[n]=null==o?"":String(o)},t=function(e,t,n,o,r){return(...l)=>{let i,a,s,d,c=l[0];if(e?(i=l[1],a=!!l[2],s=!!l[3],d=!!l[4]):(a=!!l[1],s=!!l[2],d=!!l[3]),c===window)return c.document.documentElement[`client${n}`];if(9===c.nodeType){const e=c.documentElement,t=c.body;return Math.max(t[`scroll${n}`],e[`scroll${n}`],t[`offset${n}`],e[`offset${n}`],e[`client${n}`])}{let l,p,u=!1,f=!1;if(!e&&"getBoundingClientRect"in c&&(l=c.getBoundingClientRect()[t],u=!0,f=!0),(void 0===l||d||u!==a||f!==s)&&(p=e?getComputedStyle(c,i):getComputedStyle(c)),void 0===l){let e=p[t];"auto"===e?(l=c[`client${n}`],u=!0):l=parseFloat(e),"border-box"===p.boxSizing&&(u=!0,f=!0)}if(a!==u){let e=parseFloat(p[`padding-${o}`]||0)+parseFloat(p[`padding-${r}`]||0);a?l+=e:l-=e}if(s!==f){let e=parseFloat(p[`border-${o}-width`]||0)+parseFloat(p[`border-${r}-width`]||0);s?l+=e:l-=e}return l<0&&(l=0),d&&(l+=parseFloat(p[`margin-${o}`]||0)+parseFloat(p[`margin-${r}`]||0)),l}}},n=(e,t,n,o)=>(t,r,l=!1,i=!1,a=!1)=>{if(t===window)return;if(9===t.nodeType)return;const s=getComputedStyle(t);let d=!1;if("border-box"===s.boxSizing&&(d=!0),l=!!l,i=!!i,(a=!!a)&&(r-=(parseFloat(s[`margin-${n}`])||0)+(parseFloat(s[`margin-${o}`])||0)),l!==d){let e=parseFloat(s[`padding-${n}`]||0)+parseFloat(s[`padding-${o}`]||0);l?r-=e:r+=e}if(i!==d){let e=(parseFloat(s[`border-${n}-width`])||0)+(parseFloat(s[`border-${o}-width`])||0);i?r-=e:r+=e}r<0&&(r=0),t.style[e]=r+"px"},o=t(!1,"width","Width","left","right"),r=t(!1,"height","Height","top","bottom"),l=t(!0,"width","Width","left","right"),i=t(!0,"height","Height","top","bottom"),a=n("width",0,"left","right"),s=n("height",0,"top","bottom");var d=Object.freeze({__proto__:null,getCssProps:function(e,t){const n=getComputedStyle(e);let o={};for(let r of t){let t=n[r];("width"===r||"height"===r)&&"auto"===t&&e instanceof HTMLElement&&(t=e["offset"+r.substr(0,1).toUpperCase()+r.substr(1)],"border-box"!==n.boxSizing&&("width"===r?(t-=parseFloat(n.paddingLeft||0),t-=parseFloat(n.paddingRight||0),t-=parseFloat(n.borderLeftWidth||0),t-=parseFloat(n.borderRightWidth||0)):(t-=parseFloat(n.paddingTop||0),t-=parseFloat(n.paddingBottom||0),t-=parseFloat(n.borderTopWidth||0),t-=parseFloat(n.borderBottomWidth||0)),t<0&&(t=0))),o[r]=t}return o},setCssProps:e,getElementWidth:o,getElementHeight:r,setElementWidth:a,setElementHeight:s,getPseudoElementWidth:l,getPseudoElementHeight:i,getElementOffset:e=>{if(!e.getClientRects().length)return{top:0,left:0};let t=e.getBoundingClientRect(),n=e.ownerDocument.defaultView;return{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}},anchoredPosition:function(e,t,n,r,l){let i,a,s,d;if(r||(r={width:o(e,!0,!0),height:o(e,!0,!0)}),"start"!==t&&"end"!==t||(null==l&&(l="rtl"===getComputedStyle(e).direction),t="start"===t?l?"right":"left":l?"left":"right"),"right"===t)i=r.width,s=0;else if("center"===t)i=r.width/2,s=i;else if("left"===t)i=0,s=r.width;else if(t&&"string"==typeof t&&"%"===t.charAt(t.length-1)){let n=(parseFloat(t)||0)/100;i=r.width*n,s=r.width*-n,null==l&&(l="rtl"===getComputedStyle(e).direction),l&&(i=r.width-i,s=r.width-i)}else i=parseFloat(t)||0,s=-i;if("bottom"===n)a=r.height,d=0;else if("center"===n)a=r.height/2,d=a;else if("top"===n)a=0,d=r.height;else if(n&&"string"==typeof n&&"%"===n.charAt(n.length-1)){let e=(parseFloat(n)||0)/100;a=r.height*e,d=r.height*-e}else a=parseFloat(n)||0,d=-a;return{left:i,top:a,right:s,bottom:d,xSpec:t,ySpec:n}}});const c=function(t,n){for(let[o,r]of Object.entries(n))null!=r&&("innerHTML"===o?t.innerHTML=String(r):"css"===o&&"style"in t?e(t,r):"readOnly"===o||"tabIndex"===o||"textContent"===o?t[o]=r:t.setAttribute(o,String(r)))};var p=Object.freeze({__proto__:null,createElement:function(e,t,n){let o=document.createElement(e);if(t&&"object"==typeof t&&c(o,t),n)if(n instanceof Node)o.appendChild(n);else if(Array.isArray(n))for(let e of n)o.appendChild(e);return o},setElementAttrs:c,closestUntil:function(e,t,n){if("closest"in e&&!n)return e.closest(t);const o=Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector;do{if(o.call(e,t))return e;if(n&&e===n)return null;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null},prev:function(e,t){if(!e)return null;const n=Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector;do{if(n.call(e,t))return e;e=e.previousElementSibling||e.previousSibling}while(null!==e&&1===e.nodeType);return null},next:function(e,t){if(!e)return null;const n=Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector;do{if(n.call(e,t))return e;e=e.nextElementSibling||e.nextSibling}while(null!==e&&1===e.nodeType);return null}});const u=function(e,...t){if(0!==t.length)if("after"in e)e.after(...t);else if(1===t.length){let n=t[0];n=n instanceof Node?n:document.createTextNode(String(n)),e.parentNode.insertBefore(n,e.nextSibling)}else{let n=document.createDocumentFragment();for(const e of t){const t=e instanceof Node;n.appendChild(t?e:document.createTextNode(String(e)))}e.nextSibling?e.parentNode.insertBefore(n,e.nextSibling):e.parentNode.appendChild(n)}};let f=null;const h=()=>{try{document.createElement("div").querySelector(":scope > div"),f=!0}catch(e){f=!1}};var g=Object.freeze({__proto__:null,getRootNode:function(e){if(!e)return null;if("getRootNode"in e)return e.getRootNode();for(;e.parentNode;)e=e.parentNode;return e},closest:function(e,t){if("closest"in e)return e.closest(t);const n=Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector;do{if(n.call(e,t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null},remove:function(e){e&&("remove"in e&&e.remove(),e.parentNode&&e.parentNode.removeChild(e))},before:function(e,...t){if(0!==t.length)if("before"in e)u.before(...t);else if(1===t.length){let n=t[0];n=n instanceof Node?n:document.createTextNode(String(n)),u.parentNode.insertBefore(n,e)}else{let n=document.createDocumentFragment();for(const e of t){const t=e instanceof Node;n.appendChild(t?e:document.createTextNode(String(e)))}e.parentNode.insertBefore(n,e)}},after:u,prepend:function(e,...t){if(0!==t.length)if("prepend"in e)e.prepend(...t);else if(1===t.length){let n=t[0];n=n instanceof Node?n:document.createTextNode(String(n)),e.firstChild?e.insertBefore(n,e.firstChild):e.appendChild(n)}else{let n=document.createDocumentFragment();for(const e of t){const t=e instanceof Node;n.appendChild(t?e:document.createTextNode(String(e)))}e.firstChild?e.insertBefore(n,e.firstChild):e.appendChild(n)}},append:function(e,...t){if(0!==t.length)if("append"in e)e.append(...t);else if(1===t.length){let n=t[0];n=n instanceof Node?n:document.createTextNode(String(n)),e.appendChild(n)}else{let n=document.createDocumentFragment();for(const e of t){const t=e instanceof Node;n.appendChild(t?e:document.createTextNode(String(e)))}e.appendChild(n)}},scopedSelector:function(e,t){if(null===f&&h(),!0===f)return e.querySelector(t.replace(/((?:^|,)\s*)/g,"$1:scope "));{let n=e.id;const o="ID_"+Date.now();e.id=o,t=t.replace(/((?:^|,)\s*)/g,"$1#"+o);try{return e.querySelector(t)}finally{this.id=n}}},scopedSelectorAll:function(e,t){if(null===f&&h(),!0===f)return e.querySelectorAll(t.replace(/((?:^|,)\s*)/g,"$1:scope "));{let n=e.id;const o="ID_"+Date.now();e.id=o,t=t.replace(/((?:^|,)\s*)/g,"$1#"+o);try{return e.querySelectorAll(t)}finally{this.id=n}}},toggleClass:function(e,t,n){let o=e.classList;return void 0===n?o.contains(t)?(o.remove(t),!1):(o.add(t),!0):n?(o.add(t),!0):(o.remove(t),!1)}}),m=Object.freeze({__proto__:null,default:class{constructor(){this._events=[]}add(e,t,n,o){let r=t.split("."),l=r[0],i=r[1];e.addEventListener(l,n,o||!1);let a=!0===o||"object"==typeof o&&!0===o.capture;return this._events.push({el:e,name:l,namespace:i,handler:n,useCapture:a}),this}remove(e,t,n,o){let r=t?t.split("."):"",l=r[0],i=r[1],a=!0===o||"object"==typeof o&&!0===o.capture,s=[],d=[];if(e||l||i||n||void 0!==o)for(let t of this._events)e&&t.el!==e||l&&t.name!==l||i&&t.namespace!==i||n&&t.handler!==n||void 0!==o&&t.useCapture!==a?s.push(t):d.push(t);else d=this._events;this._events=s;for(let e of d)e.el.removeEventListener(e.name,e.handler,e.useCapture);return this}}}),b=Object.freeze({__proto__:null,bindTouchTap:function(e,t){let n=null,o=null;const r=t=>{if(null!==n)return;let r=t.changedTouches[0];n=r.identifier,o=r?{x:r.pageX,y:r.pageY}:{x:t.pageX,y:t.pageY},e.addEventListener("touchend",l),e.addEventListener("touchcancel",i)},l=e=>{if(null===n)return;let r=null;if(e.changedTouches){if(null!=n)for(let t of e.changedTouches)if(t.identifier===n){r=t;break}r||(r=e.changedTouches[0])}let l=r?{x:r.pageX,y:r.pageY}:{x:e.pageX,y:e.pageY},i=o;if(n=null,o=null,null!==t.distance){let e=t.distance||1;if(Math.hypot(Math.abs(l.x-i.x),Math.abs(l.y-i.y))>=e)return!1}t.handler&&t.handler(e)},i=()=>{n=null,o=null,e.removeEventListener("touchend",l),e.removeEventListener("touchcancel",i)};return e.addEventListener("touchstart",r),{unbind:()=>{e.removeEventListener("touchstart",r),e.removeEventListener("touchend",l),e.removeEventListener("touchcancel",i)}}}});export{d as Css,p as Dom,g as DomCompat,m as DomEventsSink,b as Touches};
const e=function(e,t){for(let[n,o]of Object.entries(t))e.style[n]=null==o?"":String(o)},t=function(e,t,n,o,r){return(...l)=>{let i,c,s,d,a=l[0];if(e?(i=l[1],c=!!l[2],s=!!l[3],d=!!l[4]):(c=!!l[1],s=!!l[2],d=!!l[3]),a===window)return a.document.documentElement[`client${n}`];if(9===a.nodeType){const e=a.documentElement,t=a.body;return Math.max(t[`scroll${n}`],e[`scroll${n}`],t[`offset${n}`],e[`offset${n}`],e[`client${n}`])}{let l,u,p=!1,f=!1;if(!e&&"getBoundingClientRect"in a&&(l=a.getBoundingClientRect()[t],p=!0,f=!0),(void 0===l||d||p!==c||f!==s)&&(u=e?getComputedStyle(a,i):getComputedStyle(a)),void 0===l){let e=u[t];"auto"===e?(l=a[`client${n}`],p=!0):l=parseFloat(e),"border-box"===u.boxSizing&&(p=!0,f=!0)}if(c!==p){let e=parseFloat(u[`padding-${o}`]||0)+parseFloat(u[`padding-${r}`]||0);c?l+=e:l-=e}if(s!==f){let e=parseFloat(u[`border-${o}-width`]||0)+parseFloat(u[`border-${r}-width`]||0);s?l+=e:l-=e}return l<0&&(l=0),d&&(l+=parseFloat(u[`margin-${o}`]||0)+parseFloat(u[`margin-${r}`]||0)),l}}},n=(e,t,n,o)=>(t,r,l=!1,i=!1,c=!1)=>{if(t===window)return;if(9===t.nodeType)return;const s=getComputedStyle(t);let d=!1;if("border-box"===s.boxSizing&&(d=!0),l=!!l,i=!!i,(c=!!c)&&(r-=(parseFloat(s[`margin-${n}`])||0)+(parseFloat(s[`margin-${o}`])||0)),l!==d){let e=parseFloat(s[`padding-${n}`]||0)+parseFloat(s[`padding-${o}`]||0);l?r-=e:r+=e}if(i!==d){let e=(parseFloat(s[`border-${n}-width`])||0)+(parseFloat(s[`border-${o}-width`])||0);i?r-=e:r+=e}r<0&&(r=0),t.style[e]=r+"px"},o=t(!1,"width","Width","left","right"),r=t(!1,"height","Height","top","bottom"),l=t(!0,"width","Width","left","right"),i=t(!0,"height","Height","top","bottom"),c=n("width",0,"left","right"),s=n("height",0,"top","bottom");var d=Object.freeze({__proto__:null,getCssProps:function(e,t){const n=getComputedStyle(e);let o={};for(let r of t){let t=n[r];("width"===r||"height"===r)&&"auto"===t&&e instanceof HTMLElement&&(t=e["offset"+r.substr(0,1).toUpperCase()+r.substr(1)],"border-box"!==n.boxSizing&&("width"===r?(t-=parseFloat(n.paddingLeft||0),t-=parseFloat(n.paddingRight||0),t-=parseFloat(n.borderLeftWidth||0),t-=parseFloat(n.borderRightWidth||0)):(t-=parseFloat(n.paddingTop||0),t-=parseFloat(n.paddingBottom||0),t-=parseFloat(n.borderTopWidth||0),t-=parseFloat(n.borderBottomWidth||0)),t<0&&(t=0))),o[r]=t}return o},setCssProps:e,getElementWidth:o,getElementHeight:r,setElementWidth:c,setElementHeight:s,getPseudoElementWidth:l,getPseudoElementHeight:i,getElementOffset:e=>{if(!e.getClientRects().length)return{top:0,left:0};let t=e.getBoundingClientRect(),n=e.ownerDocument.defaultView;return{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}},anchoredPosition:function(e,t,n,r,l){let i,c,s,d;if(r||(r={width:o(e,!0,!0),height:o(e,!0,!0)}),"start"!==t&&"end"!==t||(null==l&&(l="rtl"===getComputedStyle(e).direction),t="start"===t?l?"right":"left":l?"left":"right"),"right"===t)i=r.width,s=0;else if("center"===t)i=r.width/2,s=i;else if("left"===t)i=0,s=r.width;else if(t&&"string"==typeof t&&"%"===t.charAt(t.length-1)){let n=(parseFloat(t)||0)/100;i=r.width*n,s=r.width*-n,null==l&&(l="rtl"===getComputedStyle(e).direction),l&&(i=r.width-i,s=r.width-i)}else i=parseFloat(t)||0,s=-i;if("bottom"===n)c=r.height,d=0;else if("center"===n)c=r.height/2,d=c;else if("top"===n)c=0,d=r.height;else if(n&&"string"==typeof n&&"%"===n.charAt(n.length-1)){let e=(parseFloat(n)||0)/100;c=r.height*e,d=r.height*-e}else c=parseFloat(n)||0,d=-c;return{left:i,top:c,right:s,bottom:d,xSpec:t,ySpec:n}}});const a=function(t,n){for(let[o,r]of Object.entries(n))null!=r&&("innerHTML"===o?t.innerHTML=String(r):"css"===o&&"style"in t?e(t,r):"readOnly"===o||"tabIndex"===o||"textContent"===o?t[o]=r:t.setAttribute(o,String(r)))};var u=Object.freeze({__proto__:null,createElement:function(e,t,n){let o=document.createElement(e);if(t&&"object"==typeof t&&a(o,t),n)if(n instanceof Node)o.appendChild(n);else if(Array.isArray(n))for(let e of n)o.appendChild(e);return o},setElementAttrs:a,closestUntil:function(e,t,n){if("closest"in e&&!n)return e.closest(t);const o=Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector;do{if(o.call(e,t))return e;if(n&&e===n)return null;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null},prev:function(e,t){if(!e)return null;const n=Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector;do{if(n.call(e,t))return e;e=e.previousElementSibling||e.previousSibling}while(null!==e&&1===e.nodeType);return null},next:function(e,t){if(!e)return null;const n=Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector;do{if(n.call(e,t))return e;e=e.nextElementSibling||e.nextSibling}while(null!==e&&1===e.nodeType);return null}});const p=function(e,...t){if(0!==t.length)if("after"in e)e.after(...t);else if(1===t.length){let n=t[0];n=n instanceof Node?n:document.createTextNode(String(n)),e.parentNode.insertBefore(n,e.nextSibling)}else{let n=document.createDocumentFragment();for(const e of t){const t=e instanceof Node;n.appendChild(t?e:document.createTextNode(String(e)))}e.nextSibling?e.parentNode.insertBefore(n,e.nextSibling):e.parentNode.appendChild(n)}};let f=null;const h=()=>{try{document.createElement("div").querySelector(":scope > div"),f=!0}catch(e){f=!1}};var g=Object.freeze({__proto__:null,getRootNode:function(e){if(!e)return null;if("getRootNode"in e)return e.getRootNode();for(;e.parentNode;)e=e.parentNode;return e},closest:function(e,t){if("closest"in e)return e.closest(t);const n=Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector;do{if(n.call(e,t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null},remove:function(e){e&&("remove"in e&&e.remove(),e.parentNode&&e.parentNode.removeChild(e))},before:function(e,...t){if(0!==t.length)if("before"in e)p.before(...t);else if(1===t.length){let n=t[0];n=n instanceof Node?n:document.createTextNode(String(n)),p.parentNode.insertBefore(n,e)}else{let n=document.createDocumentFragment();for(const e of t){const t=e instanceof Node;n.appendChild(t?e:document.createTextNode(String(e)))}e.parentNode.insertBefore(n,e)}},after:p,prepend:function(e,...t){if(0!==t.length)if("prepend"in e)e.prepend(...t);else if(1===t.length){let n=t[0];n=n instanceof Node?n:document.createTextNode(String(n)),e.firstChild?e.insertBefore(n,e.firstChild):e.appendChild(n)}else{let n=document.createDocumentFragment();for(const e of t){const t=e instanceof Node;n.appendChild(t?e:document.createTextNode(String(e)))}e.firstChild?e.insertBefore(n,e.firstChild):e.appendChild(n)}},append:function(e,...t){if(0!==t.length)if("append"in e)e.append(...t);else if(1===t.length){let n=t[0];n=n instanceof Node?n:document.createTextNode(String(n)),e.appendChild(n)}else{let n=document.createDocumentFragment();for(const e of t){const t=e instanceof Node;n.appendChild(t?e:document.createTextNode(String(e)))}e.appendChild(n)}},scopedSelector:function(e,t){if(null===f&&h(),!0===f)return e.querySelector(t.replace(/((?:^|,)\s*)/g,"$1:scope "));{let n=e.id;const o="ID_"+Date.now();e.id=o,t=t.replace(/((?:^|,)\s*)/g,"$1#"+o);try{return e.querySelector(t)}finally{this.id=n}}},scopedSelectorAll:function(e,t){if(null===f&&h(),!0===f)return e.querySelectorAll(t.replace(/((?:^|,)\s*)/g,"$1:scope "));{let n=e.id;const o="ID_"+Date.now();e.id=o,t=t.replace(/((?:^|,)\s*)/g,"$1#"+o);try{return e.querySelectorAll(t)}finally{this.id=n}}},toggleClass:function(e,t,n){let o=e.classList;return void 0===n?o.contains(t)?(o.remove(t),!1):(o.add(t),!0):n?(o.add(t),!0):(o.remove(t),!1)}}),m=Object.freeze({__proto__:null,default:class{constructor(){this._events=[]}add(e,t,n,o){let r=t.split("."),l=r[0],i=r[1];e.addEventListener(l,n,o||!1);let c=!0===o||"object"==typeof o&&!0===o.capture;return this._events.push({el:e,name:l,namespace:i,handler:n,useCapture:c}),this}remove(e,t,n,o){let r=t?t.split("."):"",l=r[0],i=r[1],c=!0===o||"object"==typeof o&&!0===o.capture,s=[],d=[];if(e||l||i||n||void 0!==o)for(let t of this._events)e&&t.el!==e||l&&t.name!==l||i&&t.namespace!==i||n&&t.handler!==n||void 0!==o&&t.useCapture!==c?s.push(t):d.push(t);else d=this._events;this._events=s;for(let e of d)e.el.removeEventListener(e.name,e.handler,e.useCapture);return this}}}),b=Object.freeze({__proto__:null,bindTouchTap:function(e,t){let n=null,o=null;const r=t=>{if(null!==n)return;let r=t.changedTouches[0];n=r.identifier,o=r?{x:r.pageX,y:r.pageY}:{x:t.pageX,y:t.pageY},e.addEventListener("touchend",l),e.addEventListener("touchcancel",i)},l=e=>{if(null===n)return;let r=null;if(e.changedTouches){if(null!=n)for(let t of e.changedTouches)if(t.identifier===n){r=t;break}r||(r=e.changedTouches[0])}let l=r?{x:r.pageX,y:r.pageY}:{x:e.pageX,y:e.pageY},i=o;if(n=null,o=null,null!==t.distance){let e=t.distance||1;if(Math.hypot(Math.abs(l.x-i.x),Math.abs(l.y-i.y))>=e)return!1}t.handler&&t.handler(e)},i=()=>{n=null,o=null,e.removeEventListener("touchend",l),e.removeEventListener("touchcancel",i)};return e.addEventListener("touchstart",r),{unbind:()=>{e.removeEventListener("touchstart",r),e.removeEventListener("touchend",l),e.removeEventListener("touchcancel",i)}}}});let y;const v=()=>{const e=document.createElement("div");e.dir="rtl",Object.assign(e.style,{direction:"rtl",fontSize:"14px",width:"1px",height:"1px",position:"absolute",top:"-1000px",overflow:"scroll"}),e.textContent="A",document.body.appendChild(e);let t="reverse";return e.scrollLeft>0?t="default":(e.scrollLeft=1,0===e.scrollLeft&&(t="negative")),e.parentNode.removeChild(e),t};function S(e,t,n){if(void 0===n&&(n="rtl"===getComputedStyle(e).direction),!0===n&&void 0===y&&(y=v()),!n)return t;switch(y){case"negative":return t-e.scrollWidth+e.clientWidth;case"reverse":return e.scrollWidth-t-e.clientWidth;default:return t}}function E(e,t){if(void 0===t&&(t="rtl"===getComputedStyle(e).direction),!0===t&&void 0===y&&(y=v()),!t)return e.scrollLeft;switch(y){case"negative":return e.scrollLeft+e.scrollWidth-e.clientWidth;case"reverse":return e.scrollWidth-e.scrollLeft-e.clientWidth;default:return e.scrollLeft}}function C(e,t,n){return void 0===n&&(n="rtl"===getComputedStyle(e).direction),S(e,n?e.scrollWidth-e.clientWidth-t:t,n)}var w=Object.freeze({__proto__:null,calculateScrollLeftForValue:S,getScrollLeft:E,setScrollLeft:function(e,t,n){e.scrollLeft=S(e,t,n)},calculateScrollHorzForValue:C,getScrollHorz:function(e,t){return void 0===t&&(t="rtl"===getComputedStyle(e).direction),t?e.scrollWidth-e.clientWidth-E(e,t):E(e,t)},setScrollHorz:function(e,t,n){e.scrollLeft=C(e,t,n)}});export{d as Css,u as Dom,g as DomCompat,m as DomEventsSink,w as ScrollHelper,b as Touches};
//# sourceMappingURL=lib.es6.min.js.map
/*!
* @danielgindi/dom-utils 1.0.0
* @danielgindi/dom-utils 1.0.1
* git://github.com/danielgindi/dom-utils.git
*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).domutils={})}(this,(function(e){"use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function n(e){this.wrapped=e}function r(e){var t,r;function o(t,r){try{var a=e[t](r),l=a.value,c=l instanceof n;Promise.resolve(c?l.wrapped:l).then((function(e){c?o("return"===t?"return":"next",e):i(a.done?"return":"normal",e)}),(function(e){o("throw",e)}))}catch(e){i("throw",e)}}function i(e,n){switch(e){case"return":t.resolve({value:n,done:!0});break;case"throw":t.reject(n);break;default:t.resolve({value:n,done:!1})}(t=t.next)?o(t.key,t.arg):r=null}this._invoke=function(e,n){return new Promise((function(i,a){var l={key:e,arg:n,resolve:i,reject:a,next:null};r?r=r.next=l:(t=r=l,o(e,n))}))},"function"!=typeof e.return&&(this.return=void 0)}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==l.return||l.return()}finally{if(o)throw i}}return n}}(e,t)||a(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){if(e){if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function c(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=a(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,l=!0,c=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return l=e.done,e},e:function(e){c=!0,i=e},f:function(){try{l||null==n.return||n.return()}finally{if(c)throw i}}}}"function"==typeof Symbol&&Symbol.asyncIterator&&(r.prototype[Symbol.asyncIterator]=function(){return this}),r.prototype.next=function(e){return this._invoke("next",e)},r.prototype.throw=function(e){return this._invoke("throw",e)},r.prototype.return=function(e){return this._invoke("return",e)};var u="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function f(e,t){return e(t={exports:{}},t.exports),t.exports}var s=function(e){return e&&e.Math==Math&&e},p=s("object"==typeof globalThis&&globalThis)||s("object"==typeof window&&window)||s("object"==typeof self&&self)||s("object"==typeof u&&u)||function(){return this}()||Function("return this")(),d=function(e){try{return!!e()}catch(e){return!0}},h=!d((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),g={}.propertyIsEnumerable,v=Object.getOwnPropertyDescriptor,y={f:v&&!g.call({1:2},1)?function(e){var t=v(this,e);return!!t&&t.enumerable}:g},m=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},b={}.toString,S=function(e){return b.call(e).slice(8,-1)},x="".split,E=d((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==S(e)?x.call(e,""):Object(e)}:Object,w=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},T=function(e){return E(w(e))},C=function(e){return"object"==typeof e?null!==e:"function"==typeof e},_=function(e,t){if(!C(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!C(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!C(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!C(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},O={}.hasOwnProperty,N=function(e,t){return O.call(e,t)},j=p.document,A=C(j)&&C(j.createElement),I=!h&&!d((function(){return 7!=Object.defineProperty(("div",A?j.createElement("div"):{}),"a",{get:function(){return 7}}).a})),R=Object.getOwnPropertyDescriptor,F={f:h?R:function(e,t){if(e=T(e),t=_(t,!0),I)try{return R(e,t)}catch(e){}if(N(e,t))return m(!y.f.call(e,t),e[t])}},P=function(e){if(!C(e))throw TypeError(String(e)+" is not an object");return e},M=Object.defineProperty,k={f:h?M:function(e,t,n){if(P(e),t=_(t,!0),P(n),I)try{return M(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},L=h?function(e,t,n){return k.f(e,t,m(1,n))}:function(e,t,n){return e[t]=n,e},D=function(e,t){try{L(p,e,t)}catch(n){p[e]=t}return t},$="__core-js_shared__",B=p[$]||D($,{}),U=Function.toString;"function"!=typeof B.inspectSource&&(B.inspectSource=function(e){return U.call(e)});var z,W,H,Y,q=B.inspectSource,X=p.WeakMap,K="function"==typeof X&&/native code/.test(q(X)),G=f((function(e){(e.exports=function(e,t){return B[e]||(B[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.9.1",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})})),V=0,J=Math.random(),Q=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++V+J).toString(36)},Z=G("keys"),ee={},te=p.WeakMap;if(K){var ne=B.state||(B.state=new te),re=ne.get,oe=ne.has,ie=ne.set;z=function(e,t){return t.facade=e,ie.call(ne,e,t),t},W=function(e){return re.call(ne,e)||{}},H=function(e){return oe.call(ne,e)}}else{var ae=Z[Y="state"]||(Z[Y]=Q(Y));ee[ae]=!0,z=function(e,t){return t.facade=e,L(e,ae,t),t},W=function(e){return N(e,ae)?e[ae]:{}},H=function(e){return N(e,ae)}}var le={set:z,get:W,has:H,enforce:function(e){return H(e)?W(e):z(e,{})},getterFor:function(e){return function(t){var n;if(!C(t)||(n=W(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}},ce=f((function(e){var t=le.get,n=le.enforce,r=String(String).split("String");(e.exports=function(e,t,o,i){var a,l=!!i&&!!i.unsafe,c=!!i&&!!i.enumerable,u=!!i&&!!i.noTargetGet;"function"==typeof o&&("string"!=typeof t||N(o,"name")||L(o,"name",t),(a=n(o)).source||(a.source=r.join("string"==typeof t?t:""))),e!==p?(l?!u&&e[t]&&(c=!0):delete e[t],c?e[t]=o:L(e,t,o)):c?e[t]=o:D(t,o)})(Function.prototype,"toString",(function(){return"function"==typeof this&&t(this).source||q(this)}))})),ue=p,fe=function(e){return"function"==typeof e?e:void 0},se=function(e,t){return arguments.length<2?fe(ue[e])||fe(p[e]):ue[e]&&ue[e][t]||p[e]&&p[e][t]},pe=Math.ceil,de=Math.floor,he=function(e){return isNaN(e=+e)?0:(e>0?de:pe)(e)},ge=Math.min,ve=function(e){return e>0?ge(he(e),9007199254740991):0},ye=Math.max,me=Math.min,be=function(e){return function(t,n,r){var o,i=T(t),a=ve(i.length),l=function(e,t){var n=he(e);return n<0?ye(n+t,0):me(n,t)}(r,a);if(e&&n!=n){for(;a>l;)if((o=i[l++])!=o)return!0}else for(;a>l;l++)if((e||l in i)&&i[l]===n)return e||l||0;return!e&&-1}},Se={includes:be(!0),indexOf:be(!1)}.indexOf,xe=function(e,t){var n,r=T(e),o=0,i=[];for(n in r)!N(ee,n)&&N(r,n)&&i.push(n);for(;t.length>o;)N(r,n=t[o++])&&(~Se(i,n)||i.push(n));return i},Ee=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],we=Ee.concat("length","prototype"),Te={f:Object.getOwnPropertyNames||function(e){return xe(e,we)}},Ce={f:Object.getOwnPropertySymbols},_e=se("Reflect","ownKeys")||function(e){var t=Te.f(P(e)),n=Ce.f;return n?t.concat(n(e)):t},Oe=function(e,t){for(var n=_e(t),r=k.f,o=F.f,i=0;i<n.length;i++){var a=n[i];N(e,a)||r(e,a,o(t,a))}},Ne=/#|\.prototype\./,je=function(e,t){var n=Ie[Ae(e)];return n==Fe||n!=Re&&("function"==typeof t?d(t):!!t)},Ae=je.normalize=function(e){return String(e).replace(Ne,".").toLowerCase()},Ie=je.data={},Re=je.NATIVE="N",Fe=je.POLYFILL="P",Pe=je,Me=F.f,ke=function(e,t){var n,r,o,i,a,l=e.target,c=e.global,u=e.stat;if(n=c?p:u?p[l]||D(l,{}):(p[l]||{}).prototype)for(r in t){if(i=t[r],o=e.noTargetGet?(a=Me(n,r))&&a.value:n[r],!Pe(c?r:l+(u?".":"#")+r,e.forced)&&void 0!==o){if(typeof i==typeof o)continue;Oe(i,o)}(e.sham||o&&o.sham)&&L(i,"sham",!0),ce(n,r,i,e)}},Le=Object.keys||function(e){return xe(e,Ee)},De=y.f,$e=function(e){return function(t){for(var n,r=T(t),o=Le(r),i=o.length,a=0,l=[];i>a;)n=o[a++],h&&!De.call(r,n)||l.push(e?[n,r[n]]:r[n]);return l}},Be={entries:$e(!0),values:$e(!1)}.entries;ke({target:"Object",stat:!0},{entries:function(e){return Be(e)}});var Ue=function(e,t){for(var n=0,r=Object.entries(t);n<r.length;n++){var o=i(r[n],2),a=o[0],l=o[1];e.style[a]=null==l?"":String(l)}},ze=function(e,t,n,r,o){return function(){var i,a,l,c,u=arguments.length<=0?void 0:arguments[0];if(e?(i=arguments.length<=1?void 0:arguments[1],a=!!(arguments.length<=2?void 0:arguments[2]),l=!!(arguments.length<=3?void 0:arguments[3]),c=!!(arguments.length<=4?void 0:arguments[4])):(a=!!(arguments.length<=1?void 0:arguments[1]),l=!!(arguments.length<=2?void 0:arguments[2]),c=!!(arguments.length<=3?void 0:arguments[3])),u===window)return u.document.documentElement["client".concat(n)];if(9===u.nodeType){var f=u.documentElement,s=u.body;return Math.max(s["scroll".concat(n)],f["scroll".concat(n)],s["offset".concat(n)],f["offset".concat(n)],f["client".concat(n)])}var p,d,h=!1,g=!1;if(!e&&"getBoundingClientRect"in u&&(p=u.getBoundingClientRect()[t],h=!0,g=!0),(void 0===p||c||h!==a||g!==l)&&(d=e?getComputedStyle(u,i):getComputedStyle(u)),void 0===p){var v=d[t];"auto"===v?(p=u["client".concat(n)],h=!0):p=parseFloat(v),"border-box"===d.boxSizing&&(h=!0,g=!0)}if(a!==h){var y=parseFloat(d["padding-".concat(r)]||0)+parseFloat(d["padding-".concat(o)]||0);a?p+=y:p-=y}if(l!==g){var m=parseFloat(d["border-".concat(r,"-width")]||0)+parseFloat(d["border-".concat(o,"-width")]||0);l?p+=m:p-=m}if(p<0&&(p=0),c){var b=parseFloat(d["margin-".concat(r)]||0)+parseFloat(d["margin-".concat(o)]||0);p+=b}return p}},We=function(e,t,n,r){return function(t,o){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],l=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(t!==window&&9!==t.nodeType){var c=getComputedStyle(t),u=!1;if("border-box"===c.boxSizing&&(u=!0),i=!!i,a=!!a,(l=!!l)&&(o-=(parseFloat(c["margin-".concat(n)])||0)+(parseFloat(c["margin-".concat(r)])||0)),i!==u){var f=parseFloat(c["padding-".concat(n)]||0)+parseFloat(c["padding-".concat(r)]||0);i?o-=f:o+=f}if(a!==u){var s=(parseFloat(c["border-".concat(n,"-width")])||0)+(parseFloat(c["border-".concat(r,"-width")])||0);a?o-=s:o+=s}o<0&&(o=0),t.style[e]=o+"px"}}},He=ze(!1,"width","Width","left","right"),Ye=ze(!1,"height","Height","top","bottom"),qe=ze(!0,"width","Width","left","right"),Xe=ze(!0,"height","Height","top","bottom"),Ke=We("width",0,"left","right"),Ge=We("height",0,"top","bottom"),Ve=Object.freeze({__proto__:null,getCssProps:function(e,t){var n,r=getComputedStyle(e),o={},i=c(t);try{for(i.s();!(n=i.n()).done;){var a=n.value,l=r[a];("width"===a||"height"===a)&&"auto"===l&&e instanceof HTMLElement&&(l=e["offset"+a.substr(0,1).toUpperCase()+a.substr(1)],"border-box"!==r.boxSizing&&("width"===a?(l-=parseFloat(r.paddingLeft||0),l-=parseFloat(r.paddingRight||0),l-=parseFloat(r.borderLeftWidth||0),l-=parseFloat(r.borderRightWidth||0)):(l-=parseFloat(r.paddingTop||0),l-=parseFloat(r.paddingBottom||0),l-=parseFloat(r.borderTopWidth||0),l-=parseFloat(r.borderBottomWidth||0)),l<0&&(l=0))),o[a]=l}}catch(e){i.e(e)}finally{i.f()}return o},setCssProps:Ue,getElementWidth:He,getElementHeight:Ye,setElementWidth:Ke,setElementHeight:Ge,getPseudoElementWidth:qe,getPseudoElementHeight:Xe,getElementOffset:function(e){if(!e.getClientRects().length)return{top:0,left:0};var t=e.getBoundingClientRect(),n=e.ownerDocument.defaultView;return{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}},anchoredPosition:function(e,t,n,r,o){var i,a,l,c;if(r||(r={width:He(e,!0,!0),height:He(e,!0,!0)}),"start"!==t&&"end"!==t||(null==o&&(o="rtl"===getComputedStyle(e).direction),t="start"===t?o?"right":"left":o?"left":"right"),"right"===t)i=r.width,l=0;else if("center"===t)l=i=r.width/2;else if("left"===t)i=0,l=r.width;else if(t&&"string"==typeof t&&"%"===t.charAt(t.length-1)){var u=(parseFloat(t)||0)/100;i=r.width*u,l=r.width*-u,null==o&&(o="rtl"===getComputedStyle(e).direction),o&&(i=r.width-i,l=r.width-i)}else l=-(i=parseFloat(t)||0);if("bottom"===n)a=r.height,c=0;else if("center"===n)c=a=r.height/2;else if("top"===n)a=0,c=r.height;else if(n&&"string"==typeof n&&"%"===n.charAt(n.length-1)){var f=(parseFloat(n)||0)/100;a=r.height*f,c=r.height*-f}else c=-(a=parseFloat(n)||0);return{left:i,top:a,right:l,bottom:c,xSpec:t,ySpec:n}}}),Je=function(e,t){for(var n=0,r=Object.entries(t);n<r.length;n++){var o=i(r[n],2),a=o[0],l=o[1];null!=l&&("innerHTML"===a?e.innerHTML=String(l):"css"===a&&"style"in e?Ue(e,l):"readOnly"===a||"tabIndex"===a||"textContent"===a?e[a]=l:e.setAttribute(a,String(l)))}},Qe=Object.freeze({__proto__:null,createElement:function(e,n,r){var o=document.createElement(e);if(n&&"object"===t(n)&&Je(o,n),r)if(r instanceof Node)o.appendChild(r);else if(Array.isArray(r)){var i,a=c(r);try{for(a.s();!(i=a.n()).done;){var l=i.value;o.appendChild(l)}}catch(e){a.e(e)}finally{a.f()}}return o},setElementAttrs:Je,closestUntil:function(e,t,n){if("closest"in e&&!n)return e.closest(t);var r=Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector;do{if(r.call(e,t))return e;if(n&&e===n)return null;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null},prev:function(e,t){if(!e)return null;var n=Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector;do{if(n.call(e,t))return e;e=e.previousElementSibling||e.previousSibling}while(null!==e&&1===e.nodeType);return null},next:function(e,t){if(!e)return null;var n=Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector;do{if(n.call(e,t))return e;e=e.nextElementSibling||e.nextSibling}while(null!==e&&1===e.nodeType);return null}}),Ze=function(){var e=P(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t};function et(e,t){return RegExp(e,t)}var tt,nt,rt={UNSUPPORTED_Y:d((function(){var e=et("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),BROKEN_CARET:d((function(){var e=et("^r","gy");return e.lastIndex=2,null!=e.exec("str")}))},ot=RegExp.prototype.exec,it=String.prototype.replace,at=ot,lt=(tt=/a/,nt=/b*/g,ot.call(tt,"a"),ot.call(nt,"a"),0!==tt.lastIndex||0!==nt.lastIndex),ct=rt.UNSUPPORTED_Y||rt.BROKEN_CARET,ut=void 0!==/()??/.exec("")[1];(lt||ut||ct)&&(at=function(e){var t,n,r,o,i=this,a=ct&&i.sticky,l=Ze.call(i),c=i.source,u=0,f=e;return a&&(-1===(l=l.replace("y","")).indexOf("g")&&(l+="g"),f=String(e).slice(i.lastIndex),i.lastIndex>0&&(!i.multiline||i.multiline&&"\n"!==e[i.lastIndex-1])&&(c="(?: "+c+")",f=" "+f,u++),n=new RegExp("^(?:"+c+")",l)),ut&&(n=new RegExp("^"+c+"$(?!\\s)",l)),lt&&(t=i.lastIndex),r=ot.call(a?n:i,f),a?r?(r.input=r.input.slice(u),r[0]=r[0].slice(u),r.index=i.lastIndex,i.lastIndex+=r[0].length):i.lastIndex=0:lt&&r&&(i.lastIndex=i.global?r.index+r[0].length:t),ut&&r&&r.length>1&&it.call(r[0],n,(function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(r[o]=void 0)})),r});var ft=at;ke({target:"RegExp",proto:!0,forced:/./.exec!==ft},{exec:ft});var st,pt,dt="process"==S(p.process),ht=se("navigator","userAgent")||"",gt=p.process,vt=gt&&gt.versions,yt=vt&&vt.v8;yt?pt=(st=yt.split("."))[0]+st[1]:ht&&(!(st=ht.match(/Edge\/(\d+)/))||st[1]>=74)&&(st=ht.match(/Chrome\/(\d+)/))&&(pt=st[1]);var mt=pt&&+pt,bt=!!Object.getOwnPropertySymbols&&!d((function(){return!Symbol.sham&&(dt?38===mt:mt>37&&mt<41)})),St=bt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,xt=G("wks"),Et=p.Symbol,wt=St?Et:Et&&Et.withoutSetter||Q,Tt=function(e){return N(xt,e)&&(bt||"string"==typeof xt[e])||(bt&&N(Et,e)?xt[e]=Et[e]:xt[e]=wt("Symbol."+e)),xt[e]},Ct=Tt("species"),_t=!d((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),Ot="$0"==="a".replace(/./,"$0"),Nt=Tt("replace"),jt=!!/./[Nt]&&""===/./[Nt]("a","$0"),At=!d((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]})),It=function(e,t,n,r){var o=Tt(e),i=!d((function(){var t={};return t[o]=function(){return 7},7!=""[e](t)})),a=i&&!d((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[Ct]=function(){return n},n.flags="",n[o]=/./[o]),n.exec=function(){return t=!0,null},n[o](""),!t}));if(!i||!a||"replace"===e&&(!_t||!Ot||jt)||"split"===e&&!At){var l=/./[o],c=n(o,""[e],(function(e,t,n,r,o){return t.exec===ft?i&&!o?{done:!0,value:l.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}}),{REPLACE_KEEPS_$0:Ot,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:jt}),u=c[0],f=c[1];ce(String.prototype,e,u),ce(RegExp.prototype,o,2==t?function(e,t){return f.call(e,this,t)}:function(e){return f.call(e,this)})}r&&L(RegExp.prototype[o],"sham",!0)},Rt=function(e){return function(t,n){var r,o,i=String(w(t)),a=he(n),l=i.length;return a<0||a>=l?e?"":void 0:(r=i.charCodeAt(a))<55296||r>56319||a+1===l||(o=i.charCodeAt(a+1))<56320||o>57343?e?i.charAt(a):r:e?i.slice(a,a+2):o-56320+(r-55296<<10)+65536}},Ft={codeAt:Rt(!1),charAt:Rt(!0)}.charAt,Pt=function(e,t,n){return t+(n?Ft(e,t).length:1)},Mt=Math.floor,kt="".replace,Lt=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Dt=/\$([$&'`]|\d{1,2})/g,$t=function(e,t,n,r,o,i){var a=n+e.length,l=r.length,c=Dt;return void 0!==o&&(o=Object(w(o)),c=Lt),kt.call(i,c,(function(i,c){var u;switch(c.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,n);case"'":return t.slice(a);case"<":u=o[c.slice(1,-1)];break;default:var f=+c;if(0===f)return i;if(f>l){var s=Mt(f/10);return 0===s?i:s<=l?void 0===r[s-1]?c.charAt(1):r[s-1]+c.charAt(1):i}u=r[f-1]}return void 0===u?"":u}))},Bt=function(e,t){var n=e.exec;if("function"==typeof n){var r=n.call(e,t);if("object"!=typeof r)throw TypeError("RegExp exec method returned something other than an Object or null");return r}if("RegExp"!==S(e))throw TypeError("RegExp#exec called on incompatible receiver");return ft.call(e,t)},Ut=Math.max,zt=Math.min;It("replace",2,(function(e,t,n,r){var o=r.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,i=r.REPLACE_KEEPS_$0,a=o?"$":"$0";return[function(n,r){var o=w(this),i=null==n?void 0:n[e];return void 0!==i?i.call(n,o,r):t.call(String(o),n,r)},function(e,r){if(!o&&i||"string"==typeof r&&-1===r.indexOf(a)){var l=n(t,e,this,r);if(l.done)return l.value}var c=P(e),u=String(this),f="function"==typeof r;f||(r=String(r));var s=c.global;if(s){var p=c.unicode;c.lastIndex=0}for(var d=[];;){var h=Bt(c,u);if(null===h)break;if(d.push(h),!s)break;""===String(h[0])&&(c.lastIndex=Pt(u,ve(c.lastIndex),p))}for(var g,v="",y=0,m=0;m<d.length;m++){h=d[m];for(var b=String(h[0]),S=Ut(zt(he(h.index),u.length),0),x=[],E=1;E<h.length;E++)x.push(void 0===(g=h[E])?g:String(g));var w=h.groups;if(f){var T=[b].concat(x,S,u);void 0!==w&&T.push(w);var C=String(r.apply(void 0,T))}else C=$t(b,u,S,x,w,r);S>=y&&(v+=u.slice(y,S)+C,y=S+b.length)}return v+u.slice(y)}]}));var Wt=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(0!==n.length)if("after"in e)e.after.apply(e,n);else if(1===n.length){var o=n[0],i=o instanceof Node;o=i?o:document.createTextNode(String(o)),e.parentNode.insertBefore(o,e.nextSibling)}else{var a,l=document.createDocumentFragment(),u=c(n);try{for(u.s();!(a=u.n()).done;){var f=a.value,s=f instanceof Node;l.appendChild(s?f:document.createTextNode(String(f)))}}catch(e){u.e(e)}finally{u.f()}e.nextSibling?e.parentNode.insertBefore(l,e.nextSibling):e.parentNode.appendChild(l)}},Ht=null,Yt=function(){try{document.createElement("div").querySelector(":scope > div"),Ht=!0}catch(e){Ht=!1}},qt=Object.freeze({__proto__:null,getRootNode:function(e){if(!e)return null;if("getRootNode"in e)return e.getRootNode();for(;e.parentNode;)e=e.parentNode;return e},closest:function(e,t){if("closest"in e)return e.closest(t);var n=Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector;do{if(n.call(e,t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null},remove:function(e){e&&("remove"in e&&e.remove(),e.parentNode&&e.parentNode.removeChild(e))},before:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(0!==n.length)if("before"in e)Wt.before.apply(Wt,n);else if(1===n.length){var o=n[0],i=o instanceof Node;o=i?o:document.createTextNode(String(o)),Wt.parentNode.insertBefore(o,e)}else{var a,l=document.createDocumentFragment(),u=c(n);try{for(u.s();!(a=u.n()).done;){var f=a.value,s=f instanceof Node;l.appendChild(s?f:document.createTextNode(String(f)))}}catch(e){u.e(e)}finally{u.f()}e.parentNode.insertBefore(l,e)}},after:Wt,prepend:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(0!==n.length)if("prepend"in e)e.prepend.apply(e,n);else if(1===n.length){var o=n[0],i=o instanceof Node;o=i?o:document.createTextNode(String(o)),e.firstChild?e.insertBefore(o,e.firstChild):e.appendChild(o)}else{var a,l=document.createDocumentFragment(),u=c(n);try{for(u.s();!(a=u.n()).done;){var f=a.value,s=f instanceof Node;l.appendChild(s?f:document.createTextNode(String(f)))}}catch(e){u.e(e)}finally{u.f()}e.firstChild?e.insertBefore(l,e.firstChild):e.appendChild(l)}},append:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(0!==n.length)if("append"in e)e.append.apply(e,n);else if(1===n.length){var o=n[0],i=o instanceof Node;o=i?o:document.createTextNode(String(o)),e.appendChild(o)}else{var a,l=document.createDocumentFragment(),u=c(n);try{for(u.s();!(a=u.n()).done;){var f=a.value,s=f instanceof Node;l.appendChild(s?f:document.createTextNode(String(f)))}}catch(e){u.e(e)}finally{u.f()}e.appendChild(l)}},scopedSelector:function(e,t){if(null===Ht&&Yt(),!0===Ht)return e.querySelector(t.replace(/((?:^|,)\s*)/g,"$1:scope "));var n=e.id,r="ID_"+Date.now();e.id=r,t=t.replace(/((?:^|,)\s*)/g,"$1#"+r);try{return e.querySelector(t)}finally{this.id=n}},scopedSelectorAll:function(e,t){if(null===Ht&&Yt(),!0===Ht)return e.querySelectorAll(t.replace(/((?:^|,)\s*)/g,"$1:scope "));var n=e.id,r="ID_"+Date.now();e.id=r,t=t.replace(/((?:^|,)\s*)/g,"$1#"+r);try{return e.querySelectorAll(t)}finally{this.id=n}},toggleClass:function(e,t,n){var r=e.classList;return void 0===n?r.contains(t)?(r.remove(t),!1):(r.add(t),!0):n?(r.add(t),!0):(r.remove(t),!1)}}),Xt=Tt("match"),Kt=Tt("species"),Gt=[].push,Vt=Math.min,Jt=4294967295,Qt=!d((function(){return!RegExp(Jt,"y")}));It("split",2,(function(e,t,n){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,n){var r,o,i=String(w(this)),a=void 0===n?Jt:n>>>0;if(0===a)return[];if(void 0===e)return[i];if(!C(r=e)||!(void 0!==(o=r[Xt])?o:"RegExp"==S(r)))return t.call(i,e,a);for(var l,c,u,f=[],s=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),p=0,d=new RegExp(e.source,s+"g");(l=ft.call(d,i))&&!((c=d.lastIndex)>p&&(f.push(i.slice(p,l.index)),l.length>1&&l.index<i.length&&Gt.apply(f,l.slice(1)),u=l[0].length,p=c,f.length>=a));)d.lastIndex===l.index&&d.lastIndex++;return p===i.length?!u&&d.test("")||f.push(""):f.push(i.slice(p)),f.length>a?f.slice(0,a):f}:"0".split(void 0,0).length?function(e,n){return void 0===e&&0===n?[]:t.call(this,e,n)}:t,[function(t,n){var o=w(this),i=null==t?void 0:t[e];return void 0!==i?i.call(t,o,n):r.call(String(o),t,n)},function(e,o){var i=n(r,e,this,o,r!==t);if(i.done)return i.value;var a=P(e),l=String(this),c=function(e,t){var n,r=P(e).constructor;return void 0===r||null==(n=P(r)[Kt])?t:function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}(n)}(a,RegExp),u=a.unicode,f=(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.unicode?"u":"")+(Qt?"y":"g"),s=new c(Qt?a:"^(?:"+a.source+")",f),p=void 0===o?Jt:o>>>0;if(0===p)return[];if(0===l.length)return null===Bt(s,l)?[l]:[];for(var d=0,h=0,g=[];h<l.length;){s.lastIndex=Qt?h:0;var v,y=Bt(s,Qt?l:l.slice(h));if(null===y||(v=Vt(ve(s.lastIndex+(Qt?0:h)),l.length))===d)h=Pt(l,h,u);else{if(g.push(l.slice(d,h)),g.length===p)return g;for(var m=1;m<=y.length-1;m++)if(g.push(y[m]),g.length===p)return g;h=d=v}}return g.push(l.slice(d)),g}]}),!Qt);var Zt=k.f,en=Function.prototype,tn=en.toString,nn=/^\s*function ([^ (]*)/,rn="name";h&&!(rn in en)&&Zt(en,rn,{configurable:!0,get:function(){try{return tn.call(this).match(nn)[1]}catch(e){return""}}});var on=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._events=[]}var n,r;return n=e,(r=[{key:"add",value:function(e,n,r,o){var i=n.split("."),a=i[0],l=i[1];e.addEventListener(a,r,o||!1);var c=!0===o||"object"===t(o)&&!0===o.capture;return this._events.push({el:e,name:a,namespace:l,handler:r,useCapture:c}),this}},{key:"remove",value:function(e,n,r,o){var i=n?n.split("."):"",a=i[0],l=i[1],u=!0===o||"object"===t(o)&&!0===o.capture,f=[],s=[];if(e||a||l||r||void 0!==o){var p,d=c(this._events);try{for(d.s();!(p=d.n()).done;){var h=p.value;e&&h.el!==e||a&&h.name!==a||l&&h.namespace!==l||r&&h.handler!==r||void 0!==o&&h.useCapture!==u?f.push(h):s.push(h)}}catch(e){d.e(e)}finally{d.f()}}else s=this._events;this._events=f;var g,v=c(s);try{for(v.s();!(g=v.n()).done;){var y=g.value;y.el.removeEventListener(y.name,y.handler,y.useCapture)}}catch(e){v.e(e)}finally{v.f()}return this}}])&&o(n.prototype,r),e}(),an=Object.freeze({__proto__:null,default:on}),ln=Math.hypot,cn=Math.abs,un=Math.sqrt;ke({target:"Math",stat:!0,forced:!!ln&&ln(1/0,NaN)!==1/0},{hypot:function(e,t){for(var n,r,o=0,i=0,a=arguments.length,l=0;i<a;)l<(n=cn(arguments[i++]))?(o=o*(r=l/n)*r+1,l=n):o+=n>0?(r=n/l)*r:n;return l===1/0?1/0:l*un(o)}});var fn=Object.freeze({__proto__:null,bindTouchTap:function(e,t){var n=null,r=null,o=function(t){if(null===n){var o=t.changedTouches[0];n=o.identifier,r=o?{x:o.pageX,y:o.pageY}:{x:t.pageX,y:t.pageY},e.addEventListener("touchend",i),e.addEventListener("touchcancel",a)}},i=function(e){if(null!==n){var o=null;if(e.changedTouches){if(null!=n){var i,a=c(e.changedTouches);try{for(a.s();!(i=a.n()).done;){var l=i.value;if(l.identifier===n){o=l;break}}}catch(e){a.e(e)}finally{a.f()}}o||(o=e.changedTouches[0])}var u=o?{x:o.pageX,y:o.pageY}:{x:e.pageX,y:e.pageY},f=r;if(n=null,r=null,null!==t.distance){var s=t.distance||1;if(Math.hypot(Math.abs(u.x-f.x),Math.abs(u.y-f.y))>=s)return!1}t.handler&&t.handler(e)}},a=function t(){n=null,r=null,e.removeEventListener("touchend",i),e.removeEventListener("touchcancel",t)};return e.addEventListener("touchstart",o),{unbind:function(){e.removeEventListener("touchstart",o),e.removeEventListener("touchend",i),e.removeEventListener("touchcancel",a)}}}});e.Css=Ve,e.Dom=Qe,e.DomCompat=qt,e.DomEventsSink=an,e.Touches=fn,Object.defineProperty(e,"__esModule",{value:!0})}));
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).domutils={})}(this,(function(e){"use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function n(e){this.wrapped=e}function r(e){var t,r;function o(t,r){try{var l=e[t](r),a=l.value,c=a instanceof n;Promise.resolve(c?a.wrapped:a).then((function(e){c?o("return"===t?"return":"next",e):i(l.done?"return":"normal",e)}),(function(e){o("throw",e)}))}catch(e){i("throw",e)}}function i(e,n){switch(e){case"return":t.resolve({value:n,done:!0});break;case"throw":t.reject(n);break;default:t.resolve({value:n,done:!1})}(t=t.next)?o(t.key,t.arg):r=null}this._invoke=function(e,n){return new Promise((function(i,l){var a={key:e,arg:n,resolve:i,reject:l,next:null};r?r=r.next=a:(t=r=a,o(e,n))}))},"function"!=typeof e.return&&(this.return=void 0)}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var l,a=e[Symbol.iterator]();!(r=(l=a.next()).done)&&(n.push(l.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return n}}(e,t)||l(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){if(e){if("string"==typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function c(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=l(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw i}}}}"function"==typeof Symbol&&Symbol.asyncIterator&&(r.prototype[Symbol.asyncIterator]=function(){return this}),r.prototype.next=function(e){return this._invoke("next",e)},r.prototype.throw=function(e){return this._invoke("throw",e)},r.prototype.return=function(e){return this._invoke("return",e)};var u="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function f(e,t){return e(t={exports:{}},t.exports),t.exports}var s=function(e){return e&&e.Math==Math&&e},d=s("object"==typeof globalThis&&globalThis)||s("object"==typeof window&&window)||s("object"==typeof self&&self)||s("object"==typeof u&&u)||function(){return this}()||Function("return this")(),p=function(e){try{return!!e()}catch(e){return!0}},h=!p((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),g={}.propertyIsEnumerable,v=Object.getOwnPropertyDescriptor,y={f:v&&!g.call({1:2},1)?function(e){var t=v(this,e);return!!t&&t.enumerable}:g},m=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},b={}.toString,S=function(e){return b.call(e).slice(8,-1)},x="".split,E=p((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==S(e)?x.call(e,""):Object(e)}:Object,w=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},C=function(e){return E(w(e))},_=function(e){return"object"==typeof e?null!==e:"function"==typeof e},T=function(e,t){if(!_(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!_(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!_(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!_(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},O={}.hasOwnProperty,j=function(e,t){return O.call(e,t)},N=d.document,A=_(N)&&_(N.createElement),I=!h&&!p((function(){return 7!=Object.defineProperty(("div",A?N.createElement("div"):{}),"a",{get:function(){return 7}}).a})),F=Object.getOwnPropertyDescriptor,P={f:h?F:function(e,t){if(e=C(e),t=T(t,!0),I)try{return F(e,t)}catch(e){}if(j(e,t))return m(!y.f.call(e,t),e[t])}},R=function(e){if(!_(e))throw TypeError(String(e)+" is not an object");return e},L=Object.defineProperty,M={f:h?L:function(e,t,n){if(R(e),t=T(t,!0),R(n),I)try{return L(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},k=h?function(e,t,n){return M.f(e,t,m(1,n))}:function(e,t,n){return e[t]=n,e},W=function(e,t){try{k(d,e,t)}catch(n){d[e]=t}return t},D="__core-js_shared__",$=d[D]||W(D,{}),z=Function.toString;"function"!=typeof $.inspectSource&&($.inspectSource=function(e){return z.call(e)});var B,U,H,q,Y=$.inspectSource,X=d.WeakMap,K="function"==typeof X&&/native code/.test(Y(X)),G=f((function(e){(e.exports=function(e,t){return $[e]||($[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.9.1",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})})),V=0,J=Math.random(),Q=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++V+J).toString(36)},Z=G("keys"),ee={},te=d.WeakMap;if(K){var ne=$.state||($.state=new te),re=ne.get,oe=ne.has,ie=ne.set;B=function(e,t){return t.facade=e,ie.call(ne,e,t),t},U=function(e){return re.call(ne,e)||{}},H=function(e){return oe.call(ne,e)}}else{var le=Z[q="state"]||(Z[q]=Q(q));ee[le]=!0,B=function(e,t){return t.facade=e,k(e,le,t),t},U=function(e){return j(e,le)?e[le]:{}},H=function(e){return j(e,le)}}var ae={set:B,get:U,has:H,enforce:function(e){return H(e)?U(e):B(e,{})},getterFor:function(e){return function(t){var n;if(!_(t)||(n=U(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}},ce=f((function(e){var t=ae.get,n=ae.enforce,r=String(String).split("String");(e.exports=function(e,t,o,i){var l,a=!!i&&!!i.unsafe,c=!!i&&!!i.enumerable,u=!!i&&!!i.noTargetGet;"function"==typeof o&&("string"!=typeof t||j(o,"name")||k(o,"name",t),(l=n(o)).source||(l.source=r.join("string"==typeof t?t:""))),e!==d?(a?!u&&e[t]&&(c=!0):delete e[t],c?e[t]=o:k(e,t,o)):c?e[t]=o:W(t,o)})(Function.prototype,"toString",(function(){return"function"==typeof this&&t(this).source||Y(this)}))})),ue=d,fe=function(e){return"function"==typeof e?e:void 0},se=function(e,t){return arguments.length<2?fe(ue[e])||fe(d[e]):ue[e]&&ue[e][t]||d[e]&&d[e][t]},de=Math.ceil,pe=Math.floor,he=function(e){return isNaN(e=+e)?0:(e>0?pe:de)(e)},ge=Math.min,ve=function(e){return e>0?ge(he(e),9007199254740991):0},ye=Math.max,me=Math.min,be=function(e){return function(t,n,r){var o,i=C(t),l=ve(i.length),a=function(e,t){var n=he(e);return n<0?ye(n+t,0):me(n,t)}(r,l);if(e&&n!=n){for(;l>a;)if((o=i[a++])!=o)return!0}else for(;l>a;a++)if((e||a in i)&&i[a]===n)return e||a||0;return!e&&-1}},Se={includes:be(!0),indexOf:be(!1)}.indexOf,xe=function(e,t){var n,r=C(e),o=0,i=[];for(n in r)!j(ee,n)&&j(r,n)&&i.push(n);for(;t.length>o;)j(r,n=t[o++])&&(~Se(i,n)||i.push(n));return i},Ee=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],we=Ee.concat("length","prototype"),Ce={f:Object.getOwnPropertyNames||function(e){return xe(e,we)}},_e={f:Object.getOwnPropertySymbols},Te=se("Reflect","ownKeys")||function(e){var t=Ce.f(R(e)),n=_e.f;return n?t.concat(n(e)):t},Oe=function(e,t){for(var n=Te(t),r=M.f,o=P.f,i=0;i<n.length;i++){var l=n[i];j(e,l)||r(e,l,o(t,l))}},je=/#|\.prototype\./,Ne=function(e,t){var n=Ie[Ae(e)];return n==Pe||n!=Fe&&("function"==typeof t?p(t):!!t)},Ae=Ne.normalize=function(e){return String(e).replace(je,".").toLowerCase()},Ie=Ne.data={},Fe=Ne.NATIVE="N",Pe=Ne.POLYFILL="P",Re=Ne,Le=P.f,Me=function(e,t){var n,r,o,i,l,a=e.target,c=e.global,u=e.stat;if(n=c?d:u?d[a]||W(a,{}):(d[a]||{}).prototype)for(r in t){if(i=t[r],o=e.noTargetGet?(l=Le(n,r))&&l.value:n[r],!Re(c?r:a+(u?".":"#")+r,e.forced)&&void 0!==o){if(typeof i==typeof o)continue;Oe(i,o)}(e.sham||o&&o.sham)&&k(i,"sham",!0),ce(n,r,i,e)}},ke=Object.keys||function(e){return xe(e,Ee)},We=y.f,De=function(e){return function(t){for(var n,r=C(t),o=ke(r),i=o.length,l=0,a=[];i>l;)n=o[l++],h&&!We.call(r,n)||a.push(e?[n,r[n]]:r[n]);return a}},$e={entries:De(!0),values:De(!1)}.entries;Me({target:"Object",stat:!0},{entries:function(e){return $e(e)}});var ze=function(e,t){for(var n=0,r=Object.entries(t);n<r.length;n++){var o=i(r[n],2),l=o[0],a=o[1];e.style[l]=null==a?"":String(a)}},Be=function(e,t,n,r,o){return function(){var i,l,a,c,u=arguments.length<=0?void 0:arguments[0];if(e?(i=arguments.length<=1?void 0:arguments[1],l=!!(arguments.length<=2?void 0:arguments[2]),a=!!(arguments.length<=3?void 0:arguments[3]),c=!!(arguments.length<=4?void 0:arguments[4])):(l=!!(arguments.length<=1?void 0:arguments[1]),a=!!(arguments.length<=2?void 0:arguments[2]),c=!!(arguments.length<=3?void 0:arguments[3])),u===window)return u.document.documentElement["client".concat(n)];if(9===u.nodeType){var f=u.documentElement,s=u.body;return Math.max(s["scroll".concat(n)],f["scroll".concat(n)],s["offset".concat(n)],f["offset".concat(n)],f["client".concat(n)])}var d,p,h=!1,g=!1;if(!e&&"getBoundingClientRect"in u&&(d=u.getBoundingClientRect()[t],h=!0,g=!0),(void 0===d||c||h!==l||g!==a)&&(p=e?getComputedStyle(u,i):getComputedStyle(u)),void 0===d){var v=p[t];"auto"===v?(d=u["client".concat(n)],h=!0):d=parseFloat(v),"border-box"===p.boxSizing&&(h=!0,g=!0)}if(l!==h){var y=parseFloat(p["padding-".concat(r)]||0)+parseFloat(p["padding-".concat(o)]||0);l?d+=y:d-=y}if(a!==g){var m=parseFloat(p["border-".concat(r,"-width")]||0)+parseFloat(p["border-".concat(o,"-width")]||0);a?d+=m:d-=m}if(d<0&&(d=0),c){var b=parseFloat(p["margin-".concat(r)]||0)+parseFloat(p["margin-".concat(o)]||0);d+=b}return d}},Ue=function(e,t,n,r){return function(t,o){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],l=arguments.length>3&&void 0!==arguments[3]&&arguments[3],a=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(t!==window&&9!==t.nodeType){var c=getComputedStyle(t),u=!1;if("border-box"===c.boxSizing&&(u=!0),i=!!i,l=!!l,(a=!!a)&&(o-=(parseFloat(c["margin-".concat(n)])||0)+(parseFloat(c["margin-".concat(r)])||0)),i!==u){var f=parseFloat(c["padding-".concat(n)]||0)+parseFloat(c["padding-".concat(r)]||0);i?o-=f:o+=f}if(l!==u){var s=(parseFloat(c["border-".concat(n,"-width")])||0)+(parseFloat(c["border-".concat(r,"-width")])||0);l?o-=s:o+=s}o<0&&(o=0),t.style[e]=o+"px"}}},He=Be(!1,"width","Width","left","right"),qe=Be(!1,"height","Height","top","bottom"),Ye=Be(!0,"width","Width","left","right"),Xe=Be(!0,"height","Height","top","bottom"),Ke=Ue("width",0,"left","right"),Ge=Ue("height",0,"top","bottom"),Ve=Object.freeze({__proto__:null,getCssProps:function(e,t){var n,r=getComputedStyle(e),o={},i=c(t);try{for(i.s();!(n=i.n()).done;){var l=n.value,a=r[l];("width"===l||"height"===l)&&"auto"===a&&e instanceof HTMLElement&&(a=e["offset"+l.substr(0,1).toUpperCase()+l.substr(1)],"border-box"!==r.boxSizing&&("width"===l?(a-=parseFloat(r.paddingLeft||0),a-=parseFloat(r.paddingRight||0),a-=parseFloat(r.borderLeftWidth||0),a-=parseFloat(r.borderRightWidth||0)):(a-=parseFloat(r.paddingTop||0),a-=parseFloat(r.paddingBottom||0),a-=parseFloat(r.borderTopWidth||0),a-=parseFloat(r.borderBottomWidth||0)),a<0&&(a=0))),o[l]=a}}catch(e){i.e(e)}finally{i.f()}return o},setCssProps:ze,getElementWidth:He,getElementHeight:qe,setElementWidth:Ke,setElementHeight:Ge,getPseudoElementWidth:Ye,getPseudoElementHeight:Xe,getElementOffset:function(e){if(!e.getClientRects().length)return{top:0,left:0};var t=e.getBoundingClientRect(),n=e.ownerDocument.defaultView;return{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}},anchoredPosition:function(e,t,n,r,o){var i,l,a,c;if(r||(r={width:He(e,!0,!0),height:He(e,!0,!0)}),"start"!==t&&"end"!==t||(null==o&&(o="rtl"===getComputedStyle(e).direction),t="start"===t?o?"right":"left":o?"left":"right"),"right"===t)i=r.width,a=0;else if("center"===t)a=i=r.width/2;else if("left"===t)i=0,a=r.width;else if(t&&"string"==typeof t&&"%"===t.charAt(t.length-1)){var u=(parseFloat(t)||0)/100;i=r.width*u,a=r.width*-u,null==o&&(o="rtl"===getComputedStyle(e).direction),o&&(i=r.width-i,a=r.width-i)}else a=-(i=parseFloat(t)||0);if("bottom"===n)l=r.height,c=0;else if("center"===n)c=l=r.height/2;else if("top"===n)l=0,c=r.height;else if(n&&"string"==typeof n&&"%"===n.charAt(n.length-1)){var f=(parseFloat(n)||0)/100;l=r.height*f,c=r.height*-f}else c=-(l=parseFloat(n)||0);return{left:i,top:l,right:a,bottom:c,xSpec:t,ySpec:n}}}),Je=function(e,t){for(var n=0,r=Object.entries(t);n<r.length;n++){var o=i(r[n],2),l=o[0],a=o[1];null!=a&&("innerHTML"===l?e.innerHTML=String(a):"css"===l&&"style"in e?ze(e,a):"readOnly"===l||"tabIndex"===l||"textContent"===l?e[l]=a:e.setAttribute(l,String(a)))}},Qe=Object.freeze({__proto__:null,createElement:function(e,n,r){var o=document.createElement(e);if(n&&"object"===t(n)&&Je(o,n),r)if(r instanceof Node)o.appendChild(r);else if(Array.isArray(r)){var i,l=c(r);try{for(l.s();!(i=l.n()).done;){var a=i.value;o.appendChild(a)}}catch(e){l.e(e)}finally{l.f()}}return o},setElementAttrs:Je,closestUntil:function(e,t,n){if("closest"in e&&!n)return e.closest(t);var r=Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector;do{if(r.call(e,t))return e;if(n&&e===n)return null;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null},prev:function(e,t){if(!e)return null;var n=Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector;do{if(n.call(e,t))return e;e=e.previousElementSibling||e.previousSibling}while(null!==e&&1===e.nodeType);return null},next:function(e,t){if(!e)return null;var n=Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector;do{if(n.call(e,t))return e;e=e.nextElementSibling||e.nextSibling}while(null!==e&&1===e.nodeType);return null}}),Ze=function(){var e=R(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t};function et(e,t){return RegExp(e,t)}var tt,nt,rt={UNSUPPORTED_Y:p((function(){var e=et("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),BROKEN_CARET:p((function(){var e=et("^r","gy");return e.lastIndex=2,null!=e.exec("str")}))},ot=RegExp.prototype.exec,it=String.prototype.replace,lt=ot,at=(tt=/a/,nt=/b*/g,ot.call(tt,"a"),ot.call(nt,"a"),0!==tt.lastIndex||0!==nt.lastIndex),ct=rt.UNSUPPORTED_Y||rt.BROKEN_CARET,ut=void 0!==/()??/.exec("")[1];(at||ut||ct)&&(lt=function(e){var t,n,r,o,i=this,l=ct&&i.sticky,a=Ze.call(i),c=i.source,u=0,f=e;return l&&(-1===(a=a.replace("y","")).indexOf("g")&&(a+="g"),f=String(e).slice(i.lastIndex),i.lastIndex>0&&(!i.multiline||i.multiline&&"\n"!==e[i.lastIndex-1])&&(c="(?: "+c+")",f=" "+f,u++),n=new RegExp("^(?:"+c+")",a)),ut&&(n=new RegExp("^"+c+"$(?!\\s)",a)),at&&(t=i.lastIndex),r=ot.call(l?n:i,f),l?r?(r.input=r.input.slice(u),r[0]=r[0].slice(u),r.index=i.lastIndex,i.lastIndex+=r[0].length):i.lastIndex=0:at&&r&&(i.lastIndex=i.global?r.index+r[0].length:t),ut&&r&&r.length>1&&it.call(r[0],n,(function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(r[o]=void 0)})),r});var ft=lt;Me({target:"RegExp",proto:!0,forced:/./.exec!==ft},{exec:ft});var st,dt,pt="process"==S(d.process),ht=se("navigator","userAgent")||"",gt=d.process,vt=gt&&gt.versions,yt=vt&&vt.v8;yt?dt=(st=yt.split("."))[0]+st[1]:ht&&(!(st=ht.match(/Edge\/(\d+)/))||st[1]>=74)&&(st=ht.match(/Chrome\/(\d+)/))&&(dt=st[1]);var mt=dt&&+dt,bt=!!Object.getOwnPropertySymbols&&!p((function(){return!Symbol.sham&&(pt?38===mt:mt>37&&mt<41)})),St=bt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,xt=G("wks"),Et=d.Symbol,wt=St?Et:Et&&Et.withoutSetter||Q,Ct=function(e){return j(xt,e)&&(bt||"string"==typeof xt[e])||(bt&&j(Et,e)?xt[e]=Et[e]:xt[e]=wt("Symbol."+e)),xt[e]},_t=Ct("species"),Tt=!p((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),Ot="$0"==="a".replace(/./,"$0"),jt=Ct("replace"),Nt=!!/./[jt]&&""===/./[jt]("a","$0"),At=!p((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]})),It=function(e,t,n,r){var o=Ct(e),i=!p((function(){var t={};return t[o]=function(){return 7},7!=""[e](t)})),l=i&&!p((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[_t]=function(){return n},n.flags="",n[o]=/./[o]),n.exec=function(){return t=!0,null},n[o](""),!t}));if(!i||!l||"replace"===e&&(!Tt||!Ot||Nt)||"split"===e&&!At){var a=/./[o],c=n(o,""[e],(function(e,t,n,r,o){return t.exec===ft?i&&!o?{done:!0,value:a.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}}),{REPLACE_KEEPS_$0:Ot,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:Nt}),u=c[0],f=c[1];ce(String.prototype,e,u),ce(RegExp.prototype,o,2==t?function(e,t){return f.call(e,this,t)}:function(e){return f.call(e,this)})}r&&k(RegExp.prototype[o],"sham",!0)},Ft=function(e){return function(t,n){var r,o,i=String(w(t)),l=he(n),a=i.length;return l<0||l>=a?e?"":void 0:(r=i.charCodeAt(l))<55296||r>56319||l+1===a||(o=i.charCodeAt(l+1))<56320||o>57343?e?i.charAt(l):r:e?i.slice(l,l+2):o-56320+(r-55296<<10)+65536}},Pt={codeAt:Ft(!1),charAt:Ft(!0)}.charAt,Rt=function(e,t,n){return t+(n?Pt(e,t).length:1)},Lt=function(e){return Object(w(e))},Mt=Math.floor,kt="".replace,Wt=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Dt=/\$([$&'`]|\d{1,2})/g,$t=function(e,t,n,r,o,i){var l=n+e.length,a=r.length,c=Dt;return void 0!==o&&(o=Lt(o),c=Wt),kt.call(i,c,(function(i,c){var u;switch(c.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,n);case"'":return t.slice(l);case"<":u=o[c.slice(1,-1)];break;default:var f=+c;if(0===f)return i;if(f>a){var s=Mt(f/10);return 0===s?i:s<=a?void 0===r[s-1]?c.charAt(1):r[s-1]+c.charAt(1):i}u=r[f-1]}return void 0===u?"":u}))},zt=function(e,t){var n=e.exec;if("function"==typeof n){var r=n.call(e,t);if("object"!=typeof r)throw TypeError("RegExp exec method returned something other than an Object or null");return r}if("RegExp"!==S(e))throw TypeError("RegExp#exec called on incompatible receiver");return ft.call(e,t)},Bt=Math.max,Ut=Math.min;It("replace",2,(function(e,t,n,r){var o=r.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,i=r.REPLACE_KEEPS_$0,l=o?"$":"$0";return[function(n,r){var o=w(this),i=null==n?void 0:n[e];return void 0!==i?i.call(n,o,r):t.call(String(o),n,r)},function(e,r){if(!o&&i||"string"==typeof r&&-1===r.indexOf(l)){var a=n(t,e,this,r);if(a.done)return a.value}var c=R(e),u=String(this),f="function"==typeof r;f||(r=String(r));var s=c.global;if(s){var d=c.unicode;c.lastIndex=0}for(var p=[];;){var h=zt(c,u);if(null===h)break;if(p.push(h),!s)break;""===String(h[0])&&(c.lastIndex=Rt(u,ve(c.lastIndex),d))}for(var g,v="",y=0,m=0;m<p.length;m++){h=p[m];for(var b=String(h[0]),S=Bt(Ut(he(h.index),u.length),0),x=[],E=1;E<h.length;E++)x.push(void 0===(g=h[E])?g:String(g));var w=h.groups;if(f){var C=[b].concat(x,S,u);void 0!==w&&C.push(w);var _=String(r.apply(void 0,C))}else _=$t(b,u,S,x,w,r);S>=y&&(v+=u.slice(y,S)+_,y=S+b.length)}return v+u.slice(y)}]}));var Ht=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(0!==n.length)if("after"in e)e.after.apply(e,n);else if(1===n.length){var o=n[0],i=o instanceof Node;o=i?o:document.createTextNode(String(o)),e.parentNode.insertBefore(o,e.nextSibling)}else{var l,a=document.createDocumentFragment(),u=c(n);try{for(u.s();!(l=u.n()).done;){var f=l.value,s=f instanceof Node;a.appendChild(s?f:document.createTextNode(String(f)))}}catch(e){u.e(e)}finally{u.f()}e.nextSibling?e.parentNode.insertBefore(a,e.nextSibling):e.parentNode.appendChild(a)}},qt=null,Yt=function(){try{document.createElement("div").querySelector(":scope > div"),qt=!0}catch(e){qt=!1}},Xt=Object.freeze({__proto__:null,getRootNode:function(e){if(!e)return null;if("getRootNode"in e)return e.getRootNode();for(;e.parentNode;)e=e.parentNode;return e},closest:function(e,t){if("closest"in e)return e.closest(t);var n=Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector;do{if(n.call(e,t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null},remove:function(e){e&&("remove"in e&&e.remove(),e.parentNode&&e.parentNode.removeChild(e))},before:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(0!==n.length)if("before"in e)Ht.before.apply(Ht,n);else if(1===n.length){var o=n[0],i=o instanceof Node;o=i?o:document.createTextNode(String(o)),Ht.parentNode.insertBefore(o,e)}else{var l,a=document.createDocumentFragment(),u=c(n);try{for(u.s();!(l=u.n()).done;){var f=l.value,s=f instanceof Node;a.appendChild(s?f:document.createTextNode(String(f)))}}catch(e){u.e(e)}finally{u.f()}e.parentNode.insertBefore(a,e)}},after:Ht,prepend:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(0!==n.length)if("prepend"in e)e.prepend.apply(e,n);else if(1===n.length){var o=n[0],i=o instanceof Node;o=i?o:document.createTextNode(String(o)),e.firstChild?e.insertBefore(o,e.firstChild):e.appendChild(o)}else{var l,a=document.createDocumentFragment(),u=c(n);try{for(u.s();!(l=u.n()).done;){var f=l.value,s=f instanceof Node;a.appendChild(s?f:document.createTextNode(String(f)))}}catch(e){u.e(e)}finally{u.f()}e.firstChild?e.insertBefore(a,e.firstChild):e.appendChild(a)}},append:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(0!==n.length)if("append"in e)e.append.apply(e,n);else if(1===n.length){var o=n[0],i=o instanceof Node;o=i?o:document.createTextNode(String(o)),e.appendChild(o)}else{var l,a=document.createDocumentFragment(),u=c(n);try{for(u.s();!(l=u.n()).done;){var f=l.value,s=f instanceof Node;a.appendChild(s?f:document.createTextNode(String(f)))}}catch(e){u.e(e)}finally{u.f()}e.appendChild(a)}},scopedSelector:function(e,t){if(null===qt&&Yt(),!0===qt)return e.querySelector(t.replace(/((?:^|,)\s*)/g,"$1:scope "));var n=e.id,r="ID_"+Date.now();e.id=r,t=t.replace(/((?:^|,)\s*)/g,"$1#"+r);try{return e.querySelector(t)}finally{this.id=n}},scopedSelectorAll:function(e,t){if(null===qt&&Yt(),!0===qt)return e.querySelectorAll(t.replace(/((?:^|,)\s*)/g,"$1:scope "));var n=e.id,r="ID_"+Date.now();e.id=r,t=t.replace(/((?:^|,)\s*)/g,"$1#"+r);try{return e.querySelectorAll(t)}finally{this.id=n}},toggleClass:function(e,t,n){var r=e.classList;return void 0===n?r.contains(t)?(r.remove(t),!1):(r.add(t),!0):n?(r.add(t),!0):(r.remove(t),!1)}}),Kt=Ct("match"),Gt=Ct("species"),Vt=[].push,Jt=Math.min,Qt=4294967295,Zt=!p((function(){return!RegExp(Qt,"y")}));It("split",2,(function(e,t,n){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,n){var r,o,i=String(w(this)),l=void 0===n?Qt:n>>>0;if(0===l)return[];if(void 0===e)return[i];if(!_(r=e)||!(void 0!==(o=r[Kt])?o:"RegExp"==S(r)))return t.call(i,e,l);for(var a,c,u,f=[],s=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),d=0,p=new RegExp(e.source,s+"g");(a=ft.call(p,i))&&!((c=p.lastIndex)>d&&(f.push(i.slice(d,a.index)),a.length>1&&a.index<i.length&&Vt.apply(f,a.slice(1)),u=a[0].length,d=c,f.length>=l));)p.lastIndex===a.index&&p.lastIndex++;return d===i.length?!u&&p.test("")||f.push(""):f.push(i.slice(d)),f.length>l?f.slice(0,l):f}:"0".split(void 0,0).length?function(e,n){return void 0===e&&0===n?[]:t.call(this,e,n)}:t,[function(t,n){var o=w(this),i=null==t?void 0:t[e];return void 0!==i?i.call(t,o,n):r.call(String(o),t,n)},function(e,o){var i=n(r,e,this,o,r!==t);if(i.done)return i.value;var l=R(e),a=String(this),c=function(e,t){var n,r=R(e).constructor;return void 0===r||null==(n=R(r)[Gt])?t:function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}(n)}(l,RegExp),u=l.unicode,f=(l.ignoreCase?"i":"")+(l.multiline?"m":"")+(l.unicode?"u":"")+(Zt?"y":"g"),s=new c(Zt?l:"^(?:"+l.source+")",f),d=void 0===o?Qt:o>>>0;if(0===d)return[];if(0===a.length)return null===zt(s,a)?[a]:[];for(var p=0,h=0,g=[];h<a.length;){s.lastIndex=Zt?h:0;var v,y=zt(s,Zt?a:a.slice(h));if(null===y||(v=Jt(ve(s.lastIndex+(Zt?0:h)),a.length))===p)h=Rt(a,h,u);else{if(g.push(a.slice(p,h)),g.length===d)return g;for(var m=1;m<=y.length-1;m++)if(g.push(y[m]),g.length===d)return g;h=p=v}}return g.push(a.slice(p)),g}]}),!Zt);var en=M.f,tn=Function.prototype,nn=tn.toString,rn=/^\s*function ([^ (]*)/,on="name";h&&!(on in tn)&&en(tn,on,{configurable:!0,get:function(){try{return nn.call(this).match(rn)[1]}catch(e){return""}}});var ln=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._events=[]}var n,r;return n=e,(r=[{key:"add",value:function(e,n,r,o){var i=n.split("."),l=i[0],a=i[1];e.addEventListener(l,r,o||!1);var c=!0===o||"object"===t(o)&&!0===o.capture;return this._events.push({el:e,name:l,namespace:a,handler:r,useCapture:c}),this}},{key:"remove",value:function(e,n,r,o){var i=n?n.split("."):"",l=i[0],a=i[1],u=!0===o||"object"===t(o)&&!0===o.capture,f=[],s=[];if(e||l||a||r||void 0!==o){var d,p=c(this._events);try{for(p.s();!(d=p.n()).done;){var h=d.value;e&&h.el!==e||l&&h.name!==l||a&&h.namespace!==a||r&&h.handler!==r||void 0!==o&&h.useCapture!==u?f.push(h):s.push(h)}}catch(e){p.e(e)}finally{p.f()}}else s=this._events;this._events=f;var g,v=c(s);try{for(v.s();!(g=v.n()).done;){var y=g.value;y.el.removeEventListener(y.name,y.handler,y.useCapture)}}catch(e){v.e(e)}finally{v.f()}return this}}])&&o(n.prototype,r),e}(),an=Object.freeze({__proto__:null,default:ln}),cn=Math.hypot,un=Math.abs,fn=Math.sqrt;Me({target:"Math",stat:!0,forced:!!cn&&cn(1/0,NaN)!==1/0},{hypot:function(e,t){for(var n,r,o=0,i=0,l=arguments.length,a=0;i<l;)a<(n=un(arguments[i++]))?(o=o*(r=a/n)*r+1,a=n):o+=n>0?(r=n/a)*r:n;return a===1/0?1/0:a*fn(o)}});var sn,dn=Object.freeze({__proto__:null,bindTouchTap:function(e,t){var n=null,r=null,o=function(t){if(null===n){var o=t.changedTouches[0];n=o.identifier,r=o?{x:o.pageX,y:o.pageY}:{x:t.pageX,y:t.pageY},e.addEventListener("touchend",i),e.addEventListener("touchcancel",l)}},i=function(e){if(null!==n){var o=null;if(e.changedTouches){if(null!=n){var i,l=c(e.changedTouches);try{for(l.s();!(i=l.n()).done;){var a=i.value;if(a.identifier===n){o=a;break}}}catch(e){l.e(e)}finally{l.f()}}o||(o=e.changedTouches[0])}var u=o?{x:o.pageX,y:o.pageY}:{x:e.pageX,y:e.pageY},f=r;if(n=null,r=null,null!==t.distance){var s=t.distance||1;if(Math.hypot(Math.abs(u.x-f.x),Math.abs(u.y-f.y))>=s)return!1}t.handler&&t.handler(e)}},l=function t(){n=null,r=null,e.removeEventListener("touchend",i),e.removeEventListener("touchcancel",t)};return e.addEventListener("touchstart",o),{unbind:function(){e.removeEventListener("touchstart",o),e.removeEventListener("touchend",i),e.removeEventListener("touchcancel",l)}}}}),pn=Object.assign,hn=Object.defineProperty,gn=!pn||p((function(){if(h&&1!==pn({b:1},pn(hn({},"a",{enumerable:!0,get:function(){hn(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!=pn({},e)[n]||ke(pn({},t)).join("")!=r}))?function(e,t){for(var n=Lt(e),r=arguments.length,o=1,i=_e.f,l=y.f;r>o;)for(var a,c=E(arguments[o++]),u=i?ke(c).concat(i(c)):ke(c),f=u.length,s=0;f>s;)a=u[s++],h&&!l.call(c,a)||(n[a]=c[a]);return n}:pn;Me({target:"Object",stat:!0,forced:Object.assign!==gn},{assign:gn});var vn=function(){var e=document.createElement("div");e.dir="rtl",Object.assign(e.style,{direction:"rtl",fontSize:"14px",width:"1px",height:"1px",position:"absolute",top:"-1000px",overflow:"scroll"}),e.textContent="A",document.body.appendChild(e);var t="reverse";return e.scrollLeft>0?t="default":(e.scrollLeft=1,0===e.scrollLeft&&(t="negative")),e.parentNode.removeChild(e),t};function yn(e,t,n){if(void 0===n&&(n="rtl"===getComputedStyle(e).direction),!0===n&&void 0===sn&&(sn=vn()),!n)return t;switch(sn){case"negative":return t-e.scrollWidth+e.clientWidth;case"reverse":return e.scrollWidth-t-e.clientWidth;default:return t}}function mn(e,t){if(void 0===t&&(t="rtl"===getComputedStyle(e).direction),!0===t&&void 0===sn&&(sn=vn()),!t)return e.scrollLeft;switch(sn){case"negative":return e.scrollLeft+e.scrollWidth-e.clientWidth;case"reverse":return e.scrollWidth-e.scrollLeft-e.clientWidth;default:return e.scrollLeft}}function bn(e,t,n){return void 0===n&&(n="rtl"===getComputedStyle(e).direction),yn(e,n?e.scrollWidth-e.clientWidth-t:t,n)}var Sn=Object.freeze({__proto__:null,calculateScrollLeftForValue:yn,getScrollLeft:mn,setScrollLeft:function(e,t,n){e.scrollLeft=yn(e,t,n)},calculateScrollHorzForValue:bn,getScrollHorz:function(e,t){return void 0===t&&(t="rtl"===getComputedStyle(e).direction),t?e.scrollWidth-e.clientWidth-mn(e,t):mn(e,t)},setScrollHorz:function(e,t,n){e.scrollLeft=bn(e,t,n)}});e.Css=Ve,e.Dom=Qe,e.DomCompat=Xt,e.DomEventsSink=an,e.ScrollHelper=Sn,e.Touches=dn,Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=lib.umd.min.js.map

@@ -6,2 +6,3 @@ import * as Css from './Css';

import * as Touches from './Touches';
import * as ScrollHelper from './ScrollHelper';

@@ -14,2 +15,3 @@ export {

Touches,
ScrollHelper,
};
{
"name": "@danielgindi/dom-utils",
"version": "1.0.0",
"version": "1.0.1",
"description": "A collection of dom utilities. So you can work natively with the dom without dom frameworks.",

@@ -19,7 +19,6 @@ "main": "dist/lib.cjs.min.js",

"build": "npm run lint && node ./scripts/build.js",
"prepublish": "npm run build",
"lint": "eslint .",
"lint-fix": "eslint . --fix",
"_postinstall": "husky install",
"prepublishOnly": "pinst --disable",
"prepublishOnly": "pinst --disable && npm run build",
"postpublish": "pinst --enable"

@@ -34,4 +33,2 @@ },

"@babel/core": "^7.12.10",
"@babel/plugin-transform-runtime": "^7.12.10",
"@babel/polyfill": "^7.12.1",
"@babel/preset-env": "^7.12.11",

@@ -38,0 +35,0 @@ "@babel/runtime": "^7.12.5",

@@ -17,3 +17,3 @@ # @danielgindi/dom-utils

* `getElementOffset(el: Element): {top: number, left: number}`
* `anchoredPosition(el: Element, xSpec: 'left'|'center'|'right'|'start'|'end'|string|number, ySpec: 'top'|'center'|'bottom'|string|number, size: {width: number: height: number}, rtl: boolean?): {left: number, top: number, right: number, bottom: number, xSpec: string|number, ySpec: string|number}`
* `anchoredPosition(el: Element, xSpec: 'left'|'center'|'right'|'start'|'end'|string|number, ySpec: 'top'|'center'|'bottom'|string|number, size: {width: number: height: number}, rtl?: boolean): {left: number, top: number, right: number, bottom: number, xSpec: string|number, ySpec: string|number}`

@@ -23,3 +23,3 @@ * `lib/Dom.js`: A set of dom helpers

* `setElementAttrs(el: Element, attrs: Object<string, string>)`
* `closestUntil(el: Element, selector: string, until: Node?): Node|null`
* `closestUntil(el: Element, selector: string, until?: Node): Node|null`
* `prev(el: Element, selector: string): Element|null`

@@ -38,8 +38,8 @@ * `next(el: Element, selector: string): Element|null`

* `scopedSelectorAll(el: Element, selector: Element): NodeListOf<Element>`
* `toggleClass(el: Element, className: string, toggle: boolean?): boolean`
* `toggleClass(el: Element, className: string, toggle?: boolean): boolean`
* `lib/DomEventsSink.js`: A class for registering/unregistering event listeners
* `add(el: EventTarget, eventName: string, handler: EventListenerOrEventListenerObject, optionsOrCapture: boolean|AddEventListenerOptions?): DomEventsSink`
* `add(el: EventTarget, eventName: string, handler: EventListenerOrEventListenerObject, optionsOrCapture?: boolean|AddEventListenerOptions): DomEventsSink`
event names support namespacing, where `'event.namespace'`.
* `remove(el: EventTarget?, eventName: string?, handler: EventListenerOrEventListenerObject?, optionsOrCapture: boolean|AddEventListenerOptions?): DomEventsSink`
* `remove(el?: EventTarget, eventName?: string, handler?: EventListenerOrEventListenerObject, optionsOrCapture?: boolean|AddEventListenerOptions): DomEventsSink`
specify any argument as a filter for what to remove. specify '.namespace' event name in order to remove everything for a specific namespace.

@@ -51,2 +51,30 @@

* `ScrollHelper.js`: scroll helpers
* You can use `getScrollLeft`/`setScrollLeft` to normalize the behavior of `scrollLeft` across the quirks of different browsers.
* You can use `getScrollHorz`/`setScrollHorz` to record and restore `scrollLeft` positions on RTL elements, or to switch between ltr/rtl modes without loosing scroll position.
* `calculateScrollLeftForValue(el: Element, left: number, rtl?: boolean|undefined): number`
Calculates a native `scrollLeft` value for the specific element in the current browser.
The input value is a standard `scrollLeft` value (taken with `getScrollLeft`).
You will use this function instead of `setScrollLeft` if you want to animate to this value, or other kinds of manipulation.
`rtl` is optional, you can pass it if you already have the 'direction' of the element and want to avoid that extra calculation.
* `getScrollLeft(el: Element, rtl?: boolean|undefined): number`
Fetches the `scrollLeft` value from an element, and normalizes across the different scroll methods to a unified method.
You can later use `setScrollLeft` to set a value back to the element.
`rtl` is optional, you can pass it if you already have the 'direction' of the element and want to avoid that extra calculation.
* `setScrollLeft(el: Element, value: number, rtl?: boolean|undefined)`
Sets the `scrollLeft` on an element.
`rtl` is optional, you can pass it if you already have the 'direction' of the element and want to avoid that extra calculation.
This function uses `calculateScrollLeftForValue(...)` to calculate the native `scrollLeft`.
* `calculateScrollHorzForValue(el: Element, left: number, rtl?: boolean|undefined): number`
Calculates a native `scrollLeft` value for an element, from an rtl-aware `scrollLeft` (i.e from `getScrollHorz()`).
You will use this function instead of `setScrollHorz` if you want to animate to this value, or other kinds of manipulation.
`rtl` is optional, you can pass it if you already have the 'direction' of the element and want to avoid that extra calculation.
* `getScrollHorz(el: Element, rtl?: boolean|undefined): number`
Gets an rtl-aware `scrollLeft` value from an element. The value will behave like a standard `scrollLeft`,
except that for an rtl element it will have an rtl meaning, instead of being some crazy number.
`rtl` is optional, you can pass it if you already have the 'direction' of the element and want to avoid that extra calculation.
* `setScrollHorz(el: Element, value: number, rtl?: boolean|undefined)`
Sets the `scrollLeft` on an element, with an rtl-aware value.
`rtl` is optional, you can pass it if you already have the 'direction' of the element and want to avoid that extra calculation.
This function uses `calculateScrollHorzForValue(...)` to calculate the native `scrollLeft`.

@@ -53,0 +81,0 @@ ---

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc