PageSourceSearch

https://www.statista.com/dist/2961.cd483e.js

js statista.com collected 2026-09-24 05:16:33 UTC 9,552 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2961],{52961:function(t,e,i){i.d(e,{A:function(){return c}});var o=i(75695),s=i(99656),n=i(45947);const l=15,r="right",h={right:{arrowClass:"arrowLeft",transitionClass:"fadeInRight"},left:{arrowClass:"arrowRight",transitionClass:"fadeInLeft"},top:{arrowClass:"arrowDown",transitionClass:"fadeInDown"},bottom:{arrowClass:"arrowUp",transitionClass:"fadeInUp"}},a={right:["right","left","top","bottom"],left:["left","right","top","bottom"],top:["top","bottom","right","left"],bottom:["bottom","top","right","left"]};let p=0;var d={props:{gtm:{type:String,default:""},heading:{type:String,default:""},content:{type:String,default:""},settings:{type:Object,default:()=>({})},hideOnMobile:{type:Boolean,default:!1},hideOnDesktop:{type:Boolean,default:!1}},data(){return{config:{width:this.settings?.width??250,padding:this.settings?.padding??false,horizontalArrowTopOffset:this.settings?.horizontalArrowTopOffset??0,position:this.settings?.position??r,positionMobile:this.settings?.positionMobile??r,hideArrow:this.settings?.hideArrow??false,showOverlay:this.settings?.showOverlay??false,classes:this.settings?.classes??"",autoPosition:this.settings?.autoPosition??true,openOnClick:this.settings?.openOnClick??false,allowSpaceOnTrigger:this.settings?.allowSpaceOnTrigger??false,hideErrorImage:this.settings?.hideErrorImage??false,useAriaDescribedBy:this.settings?.useAriaDescribedBy??false},position:((0,s.F)()?this.settings?.positionMobile:this.settings?.position)??r,fadingDirections:null,timeout:0,tooltipDisabled:this.hideOnMobile&&(0,s.F)()||this.hideOnDesktop,tooltipShown:!1,tooltipHidden:!0,fadeOutBlocked:!1,preventHideOnBlur:!1,hasErrorImage:!1,tooltipId:`tooltip-${++p}-${Date.now()}`}},computed:{tooltipClasses(){const t=[];if(this.fadingDirections){const e=h[this.position];t.push(e.arrowClass),t.push(this.tooltipShown?e.transitionClass:"fadeOut"),this.tooltipHidden||t.push("pos-absolute")}return this.config.classes.length>0&&t.push(this.config.classes),this.hasErrorImage&&t.push("hasErrorImage"),t},tooltipStyles(){const t={width:`${Math.min(this.config.width,window.innerWidth)}px`};if((0,s.F)()&&this.config.classes.includes("fullMobileWidth")&&(t.width="100%",t.left="0px"),this.config.padding&&(t.padding=this.config.padding),this.fadingDirections){const e=this.fadingDirections[this.position];t.top=e?.top??0,t.left=e?.left??0,t["--arrowLeft"]=e?.arrowLeft??"50%"}return t},elementWithTooltip(){return this.$refs.trigger.firstChild}},methods:{innerFocusableElements(){if(this.$refs.tooltip){const t=(0,n.i)({parent:this.$refs.tooltip}),e=this.$refs.tooltip.firstChild;return(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth)&&e!==t[0]?[e,...t]:t}return[]},onClick(){this.tooltipShown?this.hideTooltip():this.showTooltip()},showTooltipDelayed(){this.timeout=setTimeout((()=>{this.showTooltip()}),300)},delayHideTooltip(){setTimeout((()=>{this.hideTooltip()}),100)},fadeAndHide(t=!1){this.fadeOutBlocked=!1,this.hideTooltip(),t&&this.elementWithTooltip?.focus()},blockFadeOut(){this.fadeOutBlocked=!0},setPreventHideOnBlur(t=!0){this.preventHideOnBlur=t},showTooltip(t=!1){this.$refs.tooltip&&!this.tooltipShown&&(document.body.appendChild(this.$refs.tooltip),this.tooltipHidden=!1,this.setSpacings(),this.tooltipShown=!0,t&&(this.preventHideOnBlur=!0),this.config.openOnClick&&this.elementWithTooltip&&this.elementWithTooltip.setAttribute("aria-pressed","true"),this.$nextTick((()=>{this.setToolTipContentFocusable()})))},hideTooltip(){!this.fadeOutBlocked&&this.$refs.tooltipWrapper&&(clearTimeout(this.timeout),this.tooltipShown=!1,this.timeout=setTimeout((()=>{this.tooltipShown||(this.$refs.tooltipWrapper?(this.$refs.tooltipWrapper.appendChild(this.$refs.tooltip),this.unsetToolTipContentFocusable()):this.$refs.tooltip&&this.$refs.tooltip.remove(),this.tooltipHidden=!0)}),500),this.fadeOutBlocked=!1,this.config.openOnClick&&this.elementWithTooltip&&this.elementWithTooltip.setAttribute("aria-pressed","false"))},hideErrorImage(){const t=this.$refs.tooltip.querySelector("img");t&&(t.onerror=()=>{t.style.display="none",this.hasErrorImage=!0})},setSpacings(){const t=(0,o.PT)(this.elementWithTooltip),e=(0,o.dM)(this.elementWithTooltip).width,i=(0,o.dM)(this.elementWithTooltip).height,s=(0,o.dM)(this.$refs.tooltip).width,n=(0,o.dM)(this.$refs.tooltip).height,r=Math.max(l,t.top+this.config.horizontalArrowTopOffset-l);let h=Math.max(l,t.left-s/2+e/2);h+s>window.innerWidth&&(h=Math.max(0,window.innerWidth-s-l));const a=t.left+e/2-h;this.fadingDirections={right:{top:`${r}px`,left:`${t.left+e+l}px`},left:{top:`${r}px`,left:t.left-s-l+"px"},top:{top:t.top-n-l+"px",left:`${h}px`,arrowLeft:`${a}px`},bottom:{top:`${t.top+i+l}px`,left:`${h}px`,arrowLeft:`${a}px`}},this.config.autoPosition&&this.setAutoPosition()},setAutoPosition(){const t=a[this.config.position];for(let e=0;e<t.length;e+=1){const i=t[e];if(!this.isOffscreen(i)){this.position=i;break}}},isOffscreen(t){const e=this.elementWithTooltip.getBoundingClientRect(),i=this.$refs.tooltip.getBoundingClientRect();switch(t){case"right":return e.left+e.width+i.width>window.innerWidth;case"left":return e.left-i.width<0;case"top":return e.top-i.height<0;case"bottom":return e.top+e.height+i.height>window.innerHeight}},onBlur(){this.preventHideOnBlur||this.hideTooltip(),this.preventHideOnBlur=!1},clickOutsideEvent(t){this.$refs.trigger===t.target||this.$refs.trigger?.contains(t.target)||this.$refs.tooltip===t.target||this.$refs.tooltip?.contains(t.target)||this.onBlur()},onTab(t){if(!this.tooltipShown)return;const e=this.innerFocusableElements();t.shiftKey||!t.shiftKey&&!e.length?this.hideTooltip():!t.shiftKey&&e.length&&(t.preventDefault(),t.stopPropagation(),this.preventHideOnBlur=!0,this.$nextTick((()=>{e[0].focus()})))},onSpace(t){this.config.allowSpaceOnTrigger||(t.stopPropagation(),t.preventDefault()),this.showTooltip(!0)},focusNextElementOnPage(){const t=(0,n.i)();let e;t.some(((t,i)=>{if(t===this.elementWithTooltip)return e=i,!0})),e&&(t[e+1]??t[e]).focus()},handleTabInsideTooltip(t){const e=this.innerFocusableElements();t.target?.isEqualNode(e[0])&&t.shiftKey&&(t.preventDefault(),this.elementWithTooltip?.focu
1s());const i=e[e.length-1];t.target?.isEqualNode(i)&&!t.shiftKey&&(t.preventDefault(),this.hideTooltip(),this.focusNextElementOnPage())},setToolTipContentFocusable(){this.innerFocusableElements().forEach((t=>{t.setAttribute("tabindex","0")}))},unsetToolTipContentFocusable(){this.innerFocusableElements().forEach((t=>{t.setAttribute("tabindex","-1")}))},setAriaDescribedBy(){const t=this.content||this.$slots.content&&this.$slots.content.length>0;this.config.useAriaDescribedBy&&this.elementWithTooltip&&t&&this.elementWithTooltip.setAttribute("aria-describedby",this.tooltipId)},removeAriaDescribedBy(){this.config.useAriaDescribedBy&&this.elementWithTooltip&&this.elementWithTooltip.removeAttribute("aria-describedby")}},mounted(){this.config.hideErrorImage&&this.hideErrorImage(),this.elementWithTooltip&&this.elementWithTooltip.nodeType===Node.ELEMENT_NODE&&!this.elementWithTooltip.dataset.preventTabindex&&(this.elementWithTooltip.setAttribute("tabindex",0),this.elementWithTooltip.addEventListener("blur",this.onBlur)),this.config.openOnClick&&document.body.addEventListener("click",this.clickOutsideEvent),this.unsetToolTipContentFocusable(),this.setAriaDescribedBy()},beforeDestroy(){this.$refs.tooltip&&this.$refs.tooltip.remove(),this.elementWithTooltip.removeEventListener("blur",this.onBlur),document.body.removeEventListener("click",this.clickOutsideEvent),this.removeAriaDescribedBy()}},c=(0,i(67658).A)(d,(function(){var t=this,e=t._self._c;return e("div",t._g({ref:"trigger",staticClass:"vueTooltip__trigger",class:{"vueTooltip__trigger--clickable":t.config.openOnClick},attrs:{"data-gtm":t.gtm},on:{keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"space",32,e.key,[" ","Spacebar"])?null:t.onSpace(e)},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"tab",9,e.key,"Tab")?null:t.onTab(e)}],keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:(e.stopPropagation(),t.hideTooltip())}}},t.tooltipDisabled?{}:{focusin:()=>t.config.openOnClick?null:t.showTooltip(!0),mouseenter:()=>t.config.openOnClick?null:t.showTooltipDelayed(),mouseleave:()=>t.config.openOnClick?null:t.delayHideTooltip(),click:()=>t.config.openOnClick?t.onClick():null}),[t._t("default",null,{show:t.showTooltip,hide:t.hideTooltip}),t._v(" "),t.tooltipDisabled?t._e():e("div",{ref:"tooltipWrapper",staticClass:"vueTooltip__wrap"},[e("div",{ref:"tooltip",staticClass:"vueTooltip animated animation--duration-500",class:t.tooltipClasses,style:t.tooltipStyles,attrs:{id:t.config.useAriaDescribedBy?t.tooltipId:null,role:"tooltip",hidden:t.tooltipHidden},on:{mouseenter:function(e){t.config.openOnClick?t.setPreventHideOnBlur(!0):t.blockFadeOut()},mouseleave:function(e){t.config.openOnClick?t.setPreventHideOnBlur(!1):t.fadeAndHide()},keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"tab",9,e.key,"Tab")?null:t.handleTabInsideTooltip(e)},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:(e.stopPropagation(),t.fadeAndHide(!0))}]}},[t._t("content",(function(){return[t.heading?e("p",{staticClass:"vueTooltip__heading",domProps:{innerHTML:t._s(t.heading)}}):t._e(),t._v(" "),e("div",{staticClass:"vueTooltip__content",domProps:{innerHTML:t._s(t.content)}})]}))],2)])],2)}),[],!1,null,null,null).exports}}]);
2//# sourceMappingURL=2961.cd483e.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.