1?r[p-1]:void 0,y=p>2?r[2]:void 0;for(v=e.length>3&&typeof v=="function"?(p--,v):void 0,y&&Yn(r[0],r[1],y)&&(v=p<3?void 0:v,p=1),n=Object(n);++a-1&&e%1==0&&e0){if(++n>=h)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}function sr(e){if(e!=null){try{return Ee.call(e)}catch{}try{return e+""}catch{}}return""}function Le(e,n){return e===n||e!==e&&n!==n}var We=wt(function(){return arguments}())?wt:function(e){return ee(e)&&O.call(e,"callee")&&!ln.call(e,"callee")},Ge=Array.isArray;function Xe(e){return e!=null&&Dt(e.length)&&!Ze(e)}function or(e){return ee(e)&&Xe(e)}var xt=hn||ur;function Ze(e){if(!I(e))return!1;var n=be(e);return n==ae||n==Me||n==re||n==He}function Dt(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=M}function I(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}function ee(e){return e!=null&&typeof e=="object"}function ar(e){if(!ee(e)||be(e)!=q)return!1;var n=yt(e);if(n===null)return!0;var r=O.call(n,"constructor")&&n.constructor;return typeof r=="function"&&r instanceof r&&Ee.call(r)==on}var Ot=F?$e(F):In;function lr(e){return Gn(e,kt(e))}function kt(e){return Xe(e)?jn(e,!0):Rn(e)}var cr=Xn(function(e,n,r){bt(e,n,r)});function hr(e){return function(){return e}}function St(e){return e}function ur(){return!1}g.exports=cr})(Oe,Oe.exports);const G=Oe.exports,jt={type:"column",animation:"fade-down"};class it extends De{constructor(t){super();o(this,"sharee");o(this,"elementHovering",!1);o(this,"shareeElHovering",!1);o(this,"shareeEl");o(this,"driverListeners",{});o(this,"hideTimeout",0);o(this,"options");this.sharee=t,this.shareeEl=document.createElement("div"),this.options=G({},jt,t.options.modeOptions)}show(){this.shareeEl.classList.add("showing"),setTimeout(()=>{this.shareeEl.classList.add("show");const t=this.sharee.targetElement.getBoundingClientRect(),i=t.x,h=t.y;this.sharee.lang.Direction==="ltr"?(this.shareeEl.style.left=`${i}px`,this.shareeEl.style.right="unset"):(this.shareeEl.style.right=`${i}px`,this.shareeEl.style.left="unset"),this.shareeEl.style.top=`${h+t.height}px`})}hide(){var t;(t=this.shareeEl)==null||t.classList.remove("show"),clearTimeout(this.hideTimeout),this.hideTimeout=setTimeout(()=>{var i;(i=this.shareeEl)==null||i.classList.remove("showing")},Number.parseInt(this.sharee.options.showTransitionDuration))}elementOnMouseEnter(){this.elementHovering=!0,this.show()}elementOnMouseLeave(){setTimeout(()=>this.elementHovering=!1),setTimeout(()=>{this.shareeElHovering||this.hide()})}shareElOnMouseEnter(){this.elementHovering&&this.show(),this.shareeElHovering=!0}shareElOnMouseLeave(){setTimeout(()=>this.shareeElHovering=!1),setTimeout(()=>{this.elementHovering||this.hide()})}listenEvents(){this.shareeEl.addEventListener("mouseenter",this.shareElOnMouseEnter.bind(this)),this.shareeEl.addEventListener("mouseleave",this.shareElOnMouseLeave.bind(this));const t=this.elementOnMouseEnter.bind(this),i=this.elementOnMouseLeave.bind(this);this.sharee.targetElement.addEventListener("mouseenter",t),this.sharee.targetElement.addEventListener("mouseleave",i),this.eventListeners.push([this.sharee.targetElement,"mouseenter",t]),this.eventListeners.push([this.sharee.targetElement,"mouseleave",i])}destroy(){window.shareeEl=this.shareeEl,this.eventListeners.forEach(t=>{t[0].removeEventListener(t[1],t[2])}),this.shareeEl.parentElement.removeChild(this.shareeEl)}reRender(){this.destroy(),setTimeout(()=>{this.render()})}render(){this.shareeEl=document.createElement("div"),this.shareeEl.classList.add("sharee__dropdown"),this.shareeEl.classList.add("sharee__"+this.sharee.lang.Direction),this.shareeEl.classList.add(this.options.animation),this.shareeEl.style.transition="all "+this.sharee.options.showTransitionDuration,this.shareeEl.style.transitionProperty="transform, opacity";for(let t of this.sharee.options.drivers){if(!this.shouldRenderDriver(t))continue;const i=this.resolveDriver(t),h=new i(this.sharee.lang,{lang:this.sharee.lang,shareText:this.sharee.getShareText(),shareLink:this.sharee.getShareLink(),ripple:this.sharee.options.ripple}),d=this.renderDriver(h);this.shareeEl.appendChild(d)}document.body.appendChild(this.shareeEl),this.listenEvents(),this.options.type==="grid"?this.shareeEl.classList.add("sharee__dropdown__grid"):this.options.type==="row"&&this.shareeEl.classList.add("sharee__dropdown__row")}onDriverMouseEnter(t){return()=>{t.mainEl.style.backgroundColor=t.backgroundHoverColor,t.mainEl.style.color=t.textHoverColor}}onDriverMouseLeave(t){return()=>{this.initDriverStyles(t)}}onDriverClick(t){return i=>{t.onClick(i)}}initDriverStyles(t){var i,h;t.mainEl.style.backgroundColor=t.backgroundColor,t.mainEl.style.color=t.textColor,t.mainEl.style.transition=(((i=t.options)==null?void 0:i.transitionDuration)||"200ms")+" all",(h=t.options)!=null&&h.ripple&&this.initRipple(t)}initRipple(t){t.rippleInitialized||(t.rippleInitialized=!0,Promise.resolve().then(()=>Se).then(i=>{i.default(t.mainEl,{background:t.rippleColor})}))}renderDriver(t){t.mainEl=document.createElement("a"),"getLink"in t&&(t.mainEl.href=t.getLink()),this.initDriverStyles(t),this.listenDriverEvents(t);const i=document.createElement("div");i.innerHTML=t.icon;const h=document.createElement("div");return h.innerHTML=t.getButtonText(),t.mainEl.appendChild(i),t.mainEl.appendChild(h),t.mainEl}listenDriverEvents(t){const i=this.onDriverMouseEnter(t),h=this.onDriverMouseLeave(t),d=this.onDriverClick(t);this.driverListeners[t.buttonText]=[i,h,d],t.mainEl.addEventListener("mouseenter",i),t.mainEl.addEventListener("mouseleave",h),t.mainEl.addEventListener("click",d)}}function st(g,s){var t;do{if((t=g==null?void 0:g.className)!=null&&t.includes(s))return!0;g=g.parentNode}while(g);return!1}class Pt extends it{constructor(s){super(s),this.options.type="row"}show(){this.shareeEl.classList.add("showing"),setTimeout(()=>{this.shareeEl.classList.add("show")})}getDistanceFromTop(){return window.pageXOffset||document.documentElement.scrollTop||document.body.scrollTop}getTooltipPosition(){let s;try{s=window.getSelection().getRangeAt(0).getBoundingClientRect()}catch{return{left:0,top:0}}const t=30,i=s.top,h=s.left+(s.width-t*this.sharee.options.drivers.length)/2;return{top:i,left:h}}setPosition(s){this.shareeEl.style.right="unset";const{left:t,top:i}=this.getTooltipPosition();return t===0?(this.hide(),!1):(s.x+300>window.innerWidth?this.shareeEl.style.left=t+"px":this.shareeEl.style.left=t+"px",this.shareeEl.style.top=`${i+26}px`,!0)}shouldRenderDriver(s){return s!=="copy"}getSelectedText(){var s;try{window.getSelection().getRangeAt(0)}catch{return!1}return window.getSelection?(s=window.getSelection())==null?void 0:s.toString():typeof document.selection<"u"?document.selection.createRange().text:""}destroy(){super.destroy(),window.removeEventListener("resize",this.windowOnResize)}render(){super.render(),this.shareeEl.classList.add("sharee__text")}documentOnClick(s){st(s.target,"sharee__text")||this.hide()}elementOnMouseUp(s){const t=s.currentTarget;setTimeout(()=>{const i=this.getSelectedText();!i||st(t,"sharee__text")||(this.sharee.options.shareText=i,this.reRender(),setTimeout(()=>{this.show(),setTimeout(()=>{this.setPosition(s)})}))})}windowOnResize(){this.hide()}listenEvents(){const s=this.elementOnMouseUp.bind(this),t=this.documentOnClick.bind(this);this.sharee.targetElement.addEventListener("mouseup",s),document.addEventListener("click",t);const i=this.windowOnResize.bind(this);window.addEventListener("resize",i),this.eventListeners.push([this.sharee.targetElement,"mouseup",s]),this.eventListeners.push([document,"click",t]),this.eventListeners.push([window,"resize",i])}renderDriver(s){s.mainEl=document.createElement("a"),s.mainEl.title=s.getButtonText(),"getLink"in s&&(s.mainEl.href=s.getLink()),this.initDriverStyles(s),this.listenDriverEvents(s);const t=document.createElement("div");return t.innerHTML=s.icon,s.mainEl.appendChild(t),s.mainEl}}const zt={noTitle:!1};class At extends De{constructor(t){super();o(this,"sharee");o(this,"elementHovering",!1);o(this,"shareeElHovering",!1);o(this,"shareeEl");o(this,"driverListeners",{});o(this,"hideTimeout",0);o(this,"options");this.sharee=t,this.shareeEl=document.createElement("div"),this.options=G({},zt,t.options.modeOptions)}hide(){var t;(t=this.shareeEl)==null||t.classList.remove("show"),clearTimeout(this.hideTimeout),this.hideTimeout=setTimeout(()=>{var i;(i=this.shareeEl)==null||i.classList.remove("showing")},Number.parseInt(this.sharee.options.showTransitionDuration))}destroy(){this.eventListeners.forEach(t=>{t[0].removeEventListener(t[1],t[2])}),this.shareeEl.parentElement.removeChild(this.shareeEl)}reRender(){this.destroy(),setTimeout(()=>{this.render()})}render(){this.shareeEl=document.createElement("div"),this.shareeEl.classList.add("sharee__normal"),this.shareeEl.classList.add("sharee__"+this.sharee.lang.Direction),this.shareeEl.style.transition="all "+this.sharee.options.showTransitionDuration,this.shareeEl.style.transitionProperty="transform, opacity";for(let t of this.sharee.options.drivers){if(!this.shouldRenderDriver(t))continue;const i=this.resolveDriver(t),h=new i(this.sharee.lang,{lang:this.sharee.lang,shareText:this.sharee.getShareText(),shareLink:this.sharee.getShareLink(),ripple:this.sharee.options.ripple}),d=this.renderDriver(h);this.shareeEl.appendChild(d)}this.sharee.targetElement.appendChild(this.shareeEl)}onDriverClick(t){return i=>{t.onClick(i)}}initDriverStyles(t){var i,h;t.mainEl.style.backgroundColor=t.backgroundColor,t.mainEl.style.color=t.textColor,t.mainEl.style.transition=(((i=t.options)==null?void 0:i.transitionDuration)||"200ms")+" background, 1s max-width",(h=t.options)!=null&&h.ripple&&this.initRipple(t)}initRipple(t){t.rippleInitialized||(t.rippleInitialized=!0,Promise.resolve().then(()=>Se).then(i=>{i.default(t.mainEl,{background:t.rippleColor})}))}renderDriver(t){t.mainEl=document.createElement("a"),"getLink"in t&&(t.mainEl.href=t.getLink()),this.initDriverStyles(t),this.listenDriverEvents(t);const i=document.createElement("div");i.innerHTML=t.icon;const h=document.createElement("div");return h.innerHTML=t.getButtonText(),t.mainEl.appendChild(i),this.options.noTitle?(t.mainEl.title=t.getButtonText(),t.mainEl.classList.add("sharee__no-title")):t.mainEl.appendChild(h),t.mainEl.classList.add("sharee__driver__"+t.getName()),t.mainEl}listenDriverEvents(t){const i=this.onDriverClick(t);this.driverListeners[t.buttonText]=[i],t.mainEl.addEventListener("click",i)}}const It={position:"top-right",noTitle:!1};class Rt extends De{constructor(t){super();o(this,"sharee");o(this,"shareeEl");o(this,"driverListeners",{});o(this,"options");this.sharee=t,this.shareeEl=document.createElement("div"),this.options=G({},It,t.options.modeOptions)}destroy(){window.shareeEl=this.shareeEl,console.log(this.shareeEl),this.eventListeners.forEach(t=>{t[0].removeEventListener(t[1],t[2])}),this.shareeEl.parentElement.removeChild(this.shareeEl)}reRender(){this.destroy(),setTimeout(()=>{this.render()})}getPositionClass(){}render(){this.shareeEl=document.createElement("div"),this.shareeEl.classList.add("sharee__fixed"),this.shareeEl.classList.add("sharee__"+this.sharee.lang.Direction),this.shareeEl.classList.add("sharee__position__"+this.options.position),this.shareeEl.style.transition="all "+this.sharee.options.showTransitionDuration,this.shareeEl.style.transitionProperty="transform, opacity";for(let t of this.sharee.options.drivers){if(!this.shouldRenderDriver(t))continue;const i=this.resolveDriver(t),h=new i(this.sharee.lang,{lang:this.sharee.lang,shareText:this.sharee.getShareText(),shareLink:this.sharee.getShareLink(),ripple:this.sharee.options.ripple}),d=this.renderDriver(h);this.shareeEl.appendChild(d)}document.body.appendChild(this.shareeEl)}onDriverMouseEnter(t){return()=>{t.mainEl.style.backgroundColor=t.backgroundHoverColor,t.mainEl.style.color=t.textHoverColor}}onDriverMouseLeave(t){return()=>{this.initDriverStyles(t)}}onDriverClick(t){return i=>{t.onClick(i)}}initDriverStyles(t){var i,h;t.mainEl.style.backgroundColor=t.backgroundColor,t.mainEl.style.color=t.textColor,t.mainEl.style.transition=(((i=t.options)==null?void 0:i.transitionDuration)||"200ms")+" all",(h=t.options)!=null&&h.ripple&&this.initRipple(t)}initRipple(t){t.rippleInitialized||(t.rippleInitialized=!0,Promise.resolve().then(()=>Se).then(i=>{i.default(t.mainEl,{background:t.rippleColor})}))}renderDriver(t){t.mainEl=document.createElement("a"),"getLink"in t&&(t.mainEl.href=t.getLink()),this.initDriverStyles(t);const i=document.createElement("div");i.innerHTML=t.icon;const h=document.createElement("div");return h.innerHTML=t.getButtonText(),t.mainEl.appendChild(i),this.options.noTitle?(t.mainEl.title=t.getButtonText(),t.mainEl.classList.add("sharee__no-title")):t.mainEl.appendChild(h),t.mainEl.classList.add("sharee__driver__"+t.getName()),t.mainEl}}const $t={dropdown:it,text:Pt,normal:At,fixed:Rt},dr="";class R{constructor(s,t){o(this,"lang");o(this,"mainEl",null);o(this,"options");o(this,"rippleColor","#ffffff75");o(this,"rippleInitialized",!1);this.options=t,this.lang=s}getButtonText(){return this.lang[this.buttonText.replaceAll(" ","_")]||this.buttonText}onClick(s){}getName(){return this.constructor.name}}const Bt=`\r
+`;class Nt extends R{constructor(t,i){super(t,i);o(this,"buttonText","Telegram");o(this,"icon",Bt);o(this,"backgroundColor","#0088CC");o(this,"backgroundHoverColor","#0371aa");o(this,"textColor","#fff");o(this,"textHoverColor","#fff")}getLink(){var t,i;return`https://telegram.me/share/url?url=${(t=this.options)==null?void 0:t.shareLink}&text=${encodeURIComponent((i=this.options)==null?void 0:i.shareText)}`}}const Ft=`\r
\r
\r
-`;class At extends R{constructor(t,i){super(t,i);o(this,"buttonText","Whatsapp");o(this,"icon",zt);o(this,"backgroundColor","#25D366");o(this,"backgroundHoverColor","#20bd5a");o(this,"textColor","#fff");o(this,"textHoverColor","#fff")}getLink(){var t,i;return`whatsapp://send?text=${(t=this.options)==null?void 0:t.shareText}
- ${(i=this.options)==null?void 0:i.shareLink}`}}const It=`\r
+`;class Ut extends R{constructor(t,i){super(t,i);o(this,"buttonText","Whatsapp");o(this,"icon",Ft);o(this,"backgroundColor","#25D366");o(this,"backgroundHoverColor","#20bd5a");o(this,"textColor","#fff");o(this,"textHoverColor","#fff")}getLink(){var t,i;return`whatsapp://send?text=${(t=this.options)==null?void 0:t.shareText}
+ ${(i=this.options)==null?void 0:i.shareLink}`}}const Vt=`\r
\r
-`;class Rt extends R{constructor(t,i){super(t,i);o(this,"buttonText","Copy Link");o(this,"icon",It);o(this,"backgroundColor","#797979");o(this,"backgroundHoverColor","#5e5e5e");o(this,"textColor","#fff");o(this,"textHoverColor","#fff");o(this,"timeout",0)}onClick(t){super.onClick(t);const i=this.lang.CopiedSuccessfully,d=t.currentTarget.querySelector("div:nth-child(2)");if(d.innerHTML===i){d.innerHTML=this.getButtonText();return}let M=window.location.href;navigator.clipboard.writeText(M).then(()=>{d.innerHTML=i,d.style.transition="300ms all",d.style.transform="scale(1)",d.style.transform=`scale(1.07) translateX(${this.lang.Direction==="rtl"?"-":""}4px)`,clearTimeout(this.timeout),this.timeout=setTimeout(()=>{d.innerHTML=this.getButtonText(),d.style.transition="none",d.style.transform="scale(1)"},5e3)})}}const $t=`