Your IP : 18.226.181.176


Current Path : /var/www/www-root/data/www/www.monolith-realty.ru/bitrix/js/ui/tooltip/dist/
Upload File :
Current File : /var/www/www-root/data/www/www.monolith-realty.ru/bitrix/js/ui/tooltip/dist/tooltip.bundle.js.map

{"version":3,"file":"tooltip.bundle.js","sources":["../src/tooltip.js","../src/balloon.js","../src/index.js"],"sourcesContent":["export class Tooltip\n{\n\tstatic disabled = false;\n\tstatic tooltipsList =  {};\n\n\tstatic disable()\n\t{\n\t\tthis.disabled = true;\n\t}\n\n\tstatic enable()\n\t{\n\t\tthis.disabled = false;\n\t}\n\n\tstatic getDisabledStatus()\n\t{\n\t\treturn this.disabled;\n\t}\n\n\tstatic getLoader()\n\t{\n\t\treturn '/bitrix/tools/tooltip.php';\n\t}\n\n\tstatic getIdPrefix()\n\t{\n\t\treturn 'bx-ui-tooltip-';\n\t}\n}\n","import {Type, ajax, Loc} from 'main.core';\nimport {BaseEvent, EventEmitter} from 'main.core.events';\n\nimport {Tooltip} from './tooltip';\n\n\nexport class TooltipBalloon\n{\n\tconstructor(params)\n\t{\n\t\tthis.node = null;\n\t\tthis.userId = null;\n\t\tthis.loader = null;\n\t\tthis.version = null;\n\t\tthis.tracking = false;\n\t\tthis.active = false;\n\t\tthis.width = 364; // 393\n\t\tthis.height = 215; // 302\n\t\tthis.realAnchor = null;\n\t\tthis.coordsLeft = 0;\n\t\tthis.coordsTop = 0;\n\t\tthis.anchorRight = 0;\n\t\tthis.anchorTop = 0;\n\t\tthis.hMirror = false;\n\t\tthis.vMirror = false;\n\t\tthis.rootClassName = '';\n\t\tthis.INFO = null;\n\t\tthis.DIV = null;\n\t\tthis.ROOT_DIV = null;\n\t\tthis.params = {};\n\t\tthis.trackMouseHandle = this.trackMouse.bind(this);\n\n\t\tthis.init(params);\n\t\tthis.create();\n\t\treturn this;\n\t}\n\n\tinit(params)\n\t{\n\t\tthis.node = params.node;\n\t\tthis.userId = params.userId;\n\t\tthis.loader = (Type.isStringFilled(params.loader) ? params.loader : '');\n\n\t\tthis.version = (\n\t\t\t!Type.isUndefined(params.version)\n\t\t\t&& parseInt(params.version) > 0\n\t\t\t\t? parseInt(params.version)\n\t\t\t\t: (Type.isStringFilled(this.loader) ? 2 : 3)\n\t\t);\n\n\t\tthis.rootClassName = this.node.getAttribute('bx-tooltip-classname');\n\n\t\tconst paramsString = this.node.getAttribute('bx-tooltip-params');\n\n\t\tlet anchorParams = {};\n\t\tif (Type.isStringFilled(paramsString))\n\t\t{\n\t\t\tanchorParams = JSON.parse(paramsString);\n\t\t\tif (!Type.isPlainObject(anchorParams))\n\t\t\t{\n\t\t\t\tanchorParams = {};\n\t\t\t}\n\t\t}\n\n\t\tthis.params = anchorParams;\n\t}\n\n\tcreate()\n\t{\n\t\tif (!Tooltip.getDisabledStatus())\n\t\t{\n\t\t\tthis.startTrackMouse();\n\t\t}\n\n\t\tthis.node.addEventListener('mouseout', this.stopTrackMouse.bind(this));\n\t\tEventEmitter.subscribe('SidePanel.Slider:onOpen', this.onSliderOpen.bind(this));\n\t}\n\n\tonSliderOpen()\n\t{\n\t\tif (this.tracking)\n\t\t{\n\t\t\tthis.stopTrackMouse();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.hideTooltip();\n\t\t}\n\t}\n\n\tstartTrackMouse()\n\t{\n\t\tif (this.tracking)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tconst elCoords = BX.pos(this.node);\n\t\tthis.realAnchor = this.node;\n\n\t\tthis.coordsLeft = (\n\t\t\telCoords.width < 40\n\t\t\t\t? (elCoords.left - 35)\n\t\t\t\t: (elCoords.left + 0)\n\t\t);\n\t\tthis.coordsTop = elCoords.top - 245; // 325\n\t\tthis.anchorRight = elCoords.right;\n\t\tthis.anchorTop = elCoords.top;\n\n\t\tthis.tracking = true;\n\n\t\tdocument.addEventListener('mousemove', this.trackMouseHandle);\n\n\t\tsetTimeout(() => {\n\t\t\tthis.tickTimer();\n\t\t}, 500);\n\n\t\tthis.node.addEventListener('mouseout', this.stopTrackMouse.bind(this));\n\t}\n\n\tstopTrackMouse()\n\t{\n\t\tif (!this.tracking)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tdocument.removeEventListener('mousemove', this.trackMouseHandle);\n\n\t\tthis.active = false;\n\t\tsetTimeout(() => {\n\t\t\tthis.hideTooltip()\n\t\t}, 500);\n\t\tthis.tracking = false;\n\t}\n\n\ttrackMouse(e)\n\t{\n\t\tif (!this.tracking)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tconst current = (\n\t\t\te && e.pageX\n\t\t\t\t? {\n\t\t\t\t\tx: e.pageX,\n\t\t\t\t\ty: e.pageY,\n\t\t\t\t}\n\t\t\t\t: {\n\t\t\t\t\tx: e.clientX + document.body.scrollLeft,\n\t\t\t\t\ty: e.clientY + document.body.scrollTop,\n\t\t\t\t}\n\t\t);\n\n\t\tif (current.x < 0)\n\t\t{\n\t\t\tcurrent.x = 0;\n\t\t}\n\n\t\tif (current.y < 0)\n\t\t{\n\t\t\tcurrent.y = 0;\n\t\t}\n\n\t\tcurrent.time = this.tracking;\n\n\t\tif (!this.active)\n\t\t{\n\t\t\tthis.active = current;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (\n\t\t\t\tthis.active.x >= (current.x - 1) && this.active.x <= (current.x + 1)\n\t\t\t\t&& this.active.y >= (current.y - 1) && this.active.y <= (current.y + 1)\n\t\t\t)\n\t\t\t{\n\t\t\t\tif ((this.active.time + 20/*2sec*/) <= current.time)\n\t\t\t\t{\n\t\t\t\t\tthis.showTooltip();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.active = current;\n\t\t\t}\n\t\t}\n\t}\n\n\ttickTimer()\n\t{\n\t\tif (!this.tracking)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tthis.tracking++;\n\t\tif (this.active)\n\t\t{\n\t\t\tif ((this.active.time + 5/*0.5sec*/)  <= this.tracking)\n\t\t\t{\n\t\t\t\tthis.showTooltip();\n\t\t\t}\n\t\t}\n\n\t\tsetTimeout(() => {\n\t\t\tthis.tickTimer();\n\t\t}, 100);\n\t}\n\n\thideTooltip()\n\t{\n\t\tif (this.tracking)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tthis.showOpacityEffect(1);\n\t}\n\n\tshowOpacityEffect(bFade)\n\t{\n\t\tconst steps = 3;\n\t\tconst period = 1;\n\t\tconst delta = 1 / steps;\n\t\tlet i = 0;\n\n\t\tconst intId = setInterval(() => {\n\t\t\ti++;\n\t\t\tif (i > steps)\n\t\t\t{\n\t\t\t\tclearInterval(intId);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst op = (\n\t\t\t\tbFade\n\t\t\t\t\t? 1 - i * delta\n\t\t\t\t\t: i * delta\n\t\t\t);\n\n\t\t\tif (this.DIV != null)\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tthis.DIV.style.opacity = op;\n\t\t\t\t}\n\t\t\t\tcatch(e)\n\t\t\t\t{\n\t\t\t\t}\n\t\t\t\tfinally\n\t\t\t\t{\n\t\t\t\t\tif (\n\t\t\t\t\t\t!bFade\n\t\t\t\t\t\t&& i == 1\n\t\t\t\t\t)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.DIV.classList.add('ui-tooltip-info-shadow-show');\n\t\t\t\t\t\tthis.DIV.style.display = 'block';\n\t\t\t\t\t}\n\n\t\t\t\t\tif (\n\t\t\t\t\t\tbFade\n\t\t\t\t\t\t&& i == steps\n\t\t\t\t\t\t&& this.DIV\n\t\t\t\t\t)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.DIV.classList.remove('ui-tooltip-info-shadow-show');\n\t\t\t\t\t\tthis.DIV.classList.add('ui-tooltip-info-shadow-hide');\n\t\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\t\tthis.DIV.style.display = 'none';\n\t\t\t\t\t\t}, 500);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (bFade)\n\t\t\t\t\t{\n\t\t\t\t\t\tEventEmitter.emit('onTooltipHide', new BaseEvent({\n\t\t\t\t\t\t\tcompatData: [ this ],\n\t\t\t\t\t\t}));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}, period);\n\t}\n\n\tshowTooltip()\n\t{\n\t\tconst old = document.getElementById(`${Tooltip.getIdPrefix()}${this.userId}`);\n\n\t\tif (\n\t\t\tTooltip.getDisabledStatus()\n\t\t\t|| (\n\t\t\t\told\n\t\t\t\t&& old.classList.contains('ui-tooltip-info-shadow-show')\n\t\t\t)\n\t\t)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tif (\n\t\t\tnull == this.DIV\n\t\t\t&& null == this.ROOT_DIV\n\t\t)\n\t\t{\n\t\t\tthis.ROOT_DIV = document.body.appendChild(document.createElement('DIV'));\n\t\t\tthis.ROOT_DIV.style.position = 'absolute';\n\n\t\t\tBX.ZIndexManager.register(this.ROOT_DIV);\n\n\t\t\tthis.DIV = this.ROOT_DIV.appendChild(document.createElement('DIV'));\n\t\t\tthis.DIV.className = 'bx-ui-tooltip-info-shadow';\n\n\t\t\tthis.DIV.style.width = `${this.width}px`;\n\t\t}\n\n\t\tlet left = this.coordsLeft;\n\t\tconst top = this.coordsTop + 30;\n\t\tconst arScroll = BX.GetWindowScrollPos();\n\t\tconst body = document.body;\n\n\t\tthis.hMirror = false;\n\t\tthis.vMirror = ((top - arScroll.scrollTop - 50) < 0);\n\n\t\tif ((body.clientWidth + arScroll.scrollLeft) < (left + this.width))\n\t\t{\n\t\t\tleft = this.anchorRight - this.width;\n\t\t\tthis.hMirror = true;\n\t\t}\n\n\t\tthis.ROOT_DIV.style.left = `${parseInt(left)}px`;\n\t\tthis.ROOT_DIV.style.top = `${parseInt(top)}px`;\n\n\t\tBX.ZIndexManager.bringToFront(this.ROOT_DIV);\n\n\t\tthis.ROOT_DIV.addEventListener('click', (e) => { e.stopPropagation(); });\n\n\t\tif (Type.isStringFilled(this.rootClassName))\n\t\t{\n\t\t\tthis.ROOT_DIV.className = this.rootClassName;\n\t\t}\n\n\t\tconst loader = (\n\t\t\tType.isStringFilled(this.loader)\n\t\t\t\t? this.loader\n\t\t\t\t: Tooltip.getLoader()\n\t\t);\n\n\t\t// create stub\n\t\tlet stubCreated = false;\n\n\t\tif ('' == this.DIV.innerHTML)\n\t\t{\n\t\t\tstubCreated = true;\n\n\t\t\tif (this.version >= 3)\n\t\t\t{\n\t\t\t\tajax.runComponentAction('bitrix:ui.tooltip', 'getData', {\n\t\t\t\t\tmode: 'ajax',\n\t\t\t\t\tdata: {\n\t\t\t\t\t\tuserId: this.userId,\n\t\t\t\t\t\tparams: (!Type.isUndefined(this.params) ? this.params : {}),\n\t\t\t\t\t}\n\t\t\t\t}).then((response) => {\n\n\t\t\t\t\tconst detailUrl = (Type.isStringFilled(response.data.user.detailUrl) ? response.data.user.detailUrl : '');\n\t\t\t\t\tlet cardUserName = '';\n\n\t\t\t\t\tif (Type.isStringFilled(response.data.user.nameFormatted))\n\t\t\t\t\t{\n\t\t\t\t\t\tconst {nameFormatted = ''} = response.data.user;\n\n\t\t\t\t\t\tif (Type.isStringFilled(detailUrl))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcardUserName = `\n\t\t\t\t\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\t\t\t\t\tclass=\"bx-ui-tooltip-user-name\"\n\t\t\t\t\t\t\t\t\t\t\t\ttitle=\"${nameFormatted}\"\n\t\t\t\t\t\t\t\t\t\t\t\thref=\"${detailUrl}\"\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t${response.data.user.nameFormatted}\n\t\t\t\t\t\t\t\t\t\t\t</a>`\n\t\t\t\t\t\t\t;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcardUserName = `\n\t\t\t\t\t\t\t\t\t\t\t<span \n\t\t\t\t\t\t\t\t\t\t\t\tclass=\"bx-ui-tooltip-user-name\"\n\t\t\t\t\t\t\t\t\t\t\t\ttitle=\"${nameFormatted}\"\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\tresponse.data.user.nameFormatted\n\t\t\t\t\t\t\t\t\t\t\t</span>`\n\t\t\t\t\t\t\t;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tlet cardFields = '<div class=\"bx-ui-tooltip-info-data-info\">';\n\t\t\t\t\tObject.keys(response.data.user.cardFields).forEach((fieldCode) => {\n\t\t\t\t\t\tcardFields += `<span class=\"bx-ui-tooltip-field-row bx-ui-tooltip-field-row-${fieldCode.toLowerCase()}\"><span class=\"bx-ui-tooltip-field-name\">${response.data.user.cardFields[fieldCode].name}</span>: <span class=\"bx-ui-tooltip-field-value\">${response.data.user.cardFields[fieldCode].value}</span></span>`;\n\t\t\t\t\t});\n\t\t\t\t\tcardFields += '</div>';\n\n\t\t\t\t\tconst cardFieldsClassName = (\n\t\t\t\t\t\tparseInt(Loc.getMessage('USER_ID')) > 0\n\t\t\t\t\t\t&& response.data.currentUserPerms.operations.videocall\n\t\t\t\t\t\t\t? 'bx-ui-tooltip-info-data-cont-video'\n\t\t\t\t\t\t\t: 'bx-ui-tooltip-info-data-cont'\n\t\t\t\t\t);\n\t\t\t\t\tcardFields = `<div id=\"bx_user_info_data_cont_${response.data.user.id}\" class=\"${cardFieldsClassName}\">${cardFields}</div>`;\n\n\t\t\t\t\tlet photo = '';\n\t\t\t\t\tlet photoClassName = 'bx-ui-tooltip-info-data-photo no-photo';\n\n\t\t\t\t\tif (Type.isStringFilled(response.data.user.photo))\n\t\t\t\t\t{\n\t\t\t\t\t\tphoto = response.data.user.photo;\n\t\t\t\t\t\tphotoClassName = 'bx-ui-tooltip-info-data-photo';\n\t\t\t\t\t}\n\n\t\t\t\t\tphoto = (\n\t\t\t\t\t\tType.isStringFilled(detailUrl)\n\t\t\t\t\t\t\t? `<a href=\"${detailUrl}\" class=\"${photoClassName}\">${photo}</a>`\n\t\t\t\t\t\t\t: `<span class=\"${photoClassName}\">${photo}</span>`\n\t\t\t\t\t);\n\n\t\t\t\t\tlet toolbar = '';\n\t\t\t\t\tlet toolbar2 = '';\n\n\t\t\t\t\tif (\n\t\t\t\t\t\tparseInt(Loc.getMessage('USER_ID')) > 0\n\t\t\t\t\t\t&& response.data.user.active\n\t\t\t\t\t\t&& response.data.user.id != Loc.getMessage('USER_ID')\n\t\t\t\t\t\t&& response.data.currentUserPerms.operations.message\n\t\t\t\t\t)\n\t\t\t\t\t{\n\t\t\t\t\t\ttoolbar2 += `<li class=\"bx-icon bx-icon-message\"><span onclick=\"return BX.tooltip.openIM(${response.data.user.id});\">${Loc.getMessage('MAIN_UL_TOOLBAR_MESSAGES_CHAT')}</span></li>`;\n\t\t\t\t\t\ttoolbar2 += `<li id=\"im-video-call-button${response.data.user.id}\" class=\"bx-icon bx-icon-video\"><span onclick=\"return BX.tooltip.openCallTo(${response.data.user.id});\">${Loc.getMessage('MAIN_UL_TOOLBAR_VIDEO_CALL')}</span></li>`;\n\t\t\t\t\t\ttoolbar2 += `<script>Event.ready(() => { BX.tooltip.checkCallTo(\"im-video-call-button${response.data.user.id}\"); };</script>`;\n\t\t\t\t\t}\n\n\t\t\t\t\ttoolbar2 = (Type.isStringFilled(toolbar2) ? `<div class=\"bx-ui-tooltip-info-data-separator\"></div><ul>${toolbar2}</ul>` : '');\n\n\t\t\t\t\tif (response.data.user.hasBirthday)\n\t\t\t\t\t{\n\t\t\t\t\t\ttoolbar += `<li class=\"bx-icon bx-icon-birth\">${Loc.getMessage('MAIN_UL_TOOLBAR_BIRTHDAY')}</li>`;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (response.data.user.hasHonour)\n\t\t\t\t\t{\n\t\t\t\t\t\ttoolbar += `<li class=\"bx-icon bx-icon-featured\">${Loc.getMessage('MAIN_UL_TOOLBAR_HONORED')}</li>`;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (response.data.user.hasAbsence)\n\t\t\t\t\t{\n\t\t\t\t\t\ttoolbar += `<li class=\"bx-icon bx-icon-away\">${Loc.getMessage('MAIN_UL_TOOLBAR_ABSENT')}</li>`;\n\t\t\t\t\t}\n\n\t\t\t\t\ttoolbar = (Type.isStringFilled(toolbar) ? `<ul>${toolbar}</ul>` : '');\n\n\t\t\t\t\tthis.insertData({\n\t\t\t\t\t\tRESULT: {\n\t\t\t\t\t\t\tName: cardUserName,\n\t\t\t\t\t\t\tPosition: (Type.isStringFilled(response.data.user.position) ? response.data.user.position : ''),\n\t\t\t\t\t\t\tCard: cardFields,\n\t\t\t\t\t\t\tPhoto: photo,\n\t\t\t\t\t\t\tToolbar: toolbar,\n\t\t\t\t\t\t\tToolbar2: toolbar2,\n\t\t\t\t\t\t},\n\t\t\t\t\t});\n\t\t\t\t\tthis.adjustPosition();\n\n\t\t\t\t}, () => {});\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tconst url = loader +\n\t\t\t\t\t(loader.indexOf('?') >= 0 ? '&' : '?') +\n\t\t\t\t\t`MODE=UI&MUL_MODE=INFO&USER_ID=${this.userId}` +\n\t\t\t\t\t`&site=${(Loc.getMessage('SITE_ID') || '')}` +\n\t\t\t\t\t`&version=${this.version}` +\n\t\t\t\t\t(\n\t\t\t\t\t\t!Type.isUndefined(this.params)\n\t\t\t\t\t\t&& !Type.isUndefined(this.params.entityType)\n\t\t\t\t\t\t&& Type.isStringFilled(this.params.entityType)\n\t\t\t\t\t\t\t? `&entityType=${this.params.entityType}`\n\t\t\t\t\t\t\t: ''\n\t\t\t\t\t) +\n\t\t\t\t\t(\n\t\t\t\t\t\t!Type.isUndefined(this.params)\n\t\t\t\t\t\t&& !Type.isUndefined(this.params.entityId)\n\t\t\t\t\t\t&& parseInt(this.params.entityId) > 0\n\t\t\t\t\t\t\t? `&entityId=${parseInt(this.params.entityId)}`\n\t\t\t\t\t\t\t: ''\n\t\t\t\t\t);\n\n\t\t\t\tajax.get(url, (data) => {\n\t\t\t\t\tthis.insertData(data);\n\t\t\t\t\tthis.adjustPosition();\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tthis.DIV.id = `${Tooltip.getIdPrefix()}${this.userId}`;\n\n\t\t\tthis.DIV.innerHTML = '<div class=\"bx-ui-tooltip-info-wrap\">'\n\t\t\t\t+ '<div class=\"bx-ui-tooltip-info-leftcolumn\">'\n\t\t\t\t+ `<div class=\"bx-ui-tooltip-photo\" id=\"${Tooltip.getIdPrefix()}photo-${this.userId}\"><div class=\"bx-ui-tooltip-info-data-loading\">${Loc.getMessage('JS_CORE_LOADING')}</div></div>`\n\t\t\t\t+ '</div>'\n\t\t\t\t+ '<div class=\"bx-ui-tooltip-info-data\">'\n\t\t\t\t+ `<div id=\"${Tooltip.getIdPrefix()}data-card-${this.userId}\"></div>`\n\t\t\t\t+ '<div class=\"bx-ui-tooltip-info-data-tools\">'\n\t\t\t\t+ `<div class=\"bx-ui-tooltip-tb-control bx-ui-tooltip-tb-control-left\" id=\"${Tooltip.getIdPrefix()}toolbar-${this.userId}\"></div>`\n\t\t\t\t+ `<div class=\"bx-ui-tooltip-tb-control bx-ui-tooltip-tb-control-right\" id=\"${Tooltip.getIdPrefix()}toolbar2-${this.userId}\"></div>`\n\t\t\t\t+ '<div class=\"bx-ui-tooltip-info-data-clear\"></div>'\n\t\t\t\t+ '</div>'\n\t\t\t\t+ '</div>'\n\t\t\t\t+ '</div><div class=\"bx-ui-tooltip-info-bottomarea\"></div>';\n\t\t}\n\n\t\tthis.DIV.className = 'bx-ui-tooltip-info-shadow';\n\t\tthis.classNameAnim = 'bx-ui-tooltip-info-shadow-anim';\n\t\tthis.classNameFixed = 'bx-ui-tooltip-info-shadow';\n\n\t\tif (this.hMirror && this.vMirror)\n\t\t{\n\t\t\tthis.DIV.className = 'bx-ui-tooltip-info-shadow-hv';\n\t\t\tthis.classNameAnim = 'bx-ui-tooltip-info-shadow-hv-anim';\n\t\t\tthis.classNameFixed = 'bx-ui-tooltip-info-shadow-hv';\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (this.hMirror)\n\t\t\t{\n\t\t\t\tthis.DIV.className = 'bx-ui-tooltip-info-shadow-h';\n\t\t\t\tthis.classNameAnim = 'bx-ui-tooltip-info-shadow-h-anim';\n\t\t\t\tthis.classNameFixed = 'bx-ui-tooltip-info-shadow-h';\n\t\t\t}\n\n\t\t\tif (this.vMirror)\n\t\t\t{\n\t\t\t\tthis.DIV.className = 'bx-ui-tooltip-info-shadow-v';\n\t\t\t\tthis.classNameAnim = 'bx-ui-tooltip-info-shadow-v-anim';\n\t\t\t\tthis.classNameFixed = 'bx-ui-tooltip-info-shadow-v';\n\t\t\t}\n\t\t}\n\n\t\tthis.DIV.style.display = 'block';\n\n\t\tif (!stubCreated)\n\t\t{\n\t\t\tthis.adjustPosition();\n\t\t}\n\n\t\tthis.showOpacityEffect(0);\n\n\t\tdocument.getElementById(`${Tooltip.getIdPrefix()}${this.userId}`).onmouseover = () => {\n\t\t\tthis.startTrackMouse(this);\n\t\t};\n\n\t\tdocument.getElementById(`${Tooltip.getIdPrefix()}${this.userId}`).onmouseout = () => {\n\t\t\tthis.stopTrackMouse(this);\n\t\t};\n\n\t\tEventEmitter.emit('onTooltipShow', new BaseEvent({\n\t\t\tcompatData: [ this ],\n\t\t}));\n\t}\n\n\tadjustPosition()\n\t{\n\t\tconst tooltipCoords = BX.pos(this.DIV);\n\n\t\tif (this.vMirror)\n\t\t{\n\t\t\tthis.ROOT_DIV.style.top = `${parseInt(this.anchorTop + 13)}px`;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.ROOT_DIV.style.top = `${parseInt(this.anchorTop - tooltipCoords.height - 13 + 12)}px`; // 12 - bottom block\n\t\t}\n\t}\n\n\tinsertData(data)\n\t{\n\t\tif (\n\t\t\tnull != data\n\t\t\t&& (\n\t\t\t\tthis.version >= 3\n\t\t\t\t|| data.length > 0\n\t\t\t)\n\t\t)\n\t\t{\n\t\t\tif (this.version >= 3)\n\t\t\t{\n\t\t\t\tthis.INFO = data;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\teval(`this.INFO = ${data}`);\n\t\t\t}\n\n\t\t\tconst cardEl = document.getElementById(`${Tooltip.getIdPrefix()}data-card-${this.userId}`);\n\t\t\tcardEl.innerHTML = '';\n\t\t\tif (Type.isStringFilled(this.INFO.RESULT.Name))\n\t\t\t{\n\t\t\t\tcardEl.innerHTML += `<div class=\"bx-ui-tooltip-user-name-block\">${this.INFO.RESULT.Name}</div>`;\n\t\t\t}\n\t\t\tif (Type.isStringFilled(this.INFO.RESULT.Position))\n\t\t\t{\n\t\t\t\tcardEl.innerHTML += `<div class=\"bx-ui-tooltip-user-position\">${this.INFO.RESULT.Position}</div>`;\n\t\t\t}\n\t\t\tcardEl.innerHTML += this.INFO.RESULT.Card;\n\n\t\t\tconst photoEl = document.getElementById(`${Tooltip.getIdPrefix()}photo-${this.userId}`);\n\t\t\tphotoEl.innerHTML = this.INFO.RESULT.Photo;\n\n\t\t\tconst toolbarEl = document.getElementById(`${Tooltip.getIdPrefix()}toolbar-${this.userId}`);\n\t\t\ttoolbarEl.innerHTML = this.INFO.RESULT.Toolbar;\n\n\t\t\tconst toolbar2El = document.getElementById(`${Tooltip.getIdPrefix()}toolbar2-${this.userId}`);\n\t\t\ttoolbar2El.innerHTML = this.INFO.RESULT.Toolbar2;\n\n\t\t\tif (Type.isArray(this.INFO.RESULT.Scripts))\n\t\t\t{\n\t\t\t\tthis.INFO.RESULT.Scripts.forEach((script) => {\n\t\t\t\t\teval(script);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tEventEmitter.emit('onTooltipInsertData', new BaseEvent({\n\t\t\t\tcompatData: [ this ],\n\t\t\t}));\n\t\t}\n\t}\n}","import {Browser, Event, Type} from 'main.core';\n\nimport {Tooltip} from './tooltip.js';\nimport {TooltipBalloon} from './balloon.js';\n\nimport './css/style.css';\n\nEvent.ready(() => {\n\tif (\n\t\tBrowser.isAndroid()\n\t\t|| Browser.isIOS()\n\t)\n\t{\n\t\treturn;\n\t}\n\n\tdocument.addEventListener('mouseover', (e) => {\n\n\t\tconst node = e.target;\n\n\t\tconst userId = node.getAttribute('bx-tooltip-user-id');\n\t\tconst loader = node.getAttribute('bx-tooltip-loader');\n\n\t\tlet tooltipId = userId; // don't use integer value!\n\n\t\tif (Type.isStringFilled(loader))\n\t\t{\n\t\t\tlet loaderHash = 0;\n\n\t\t\t[...loader].forEach((c, i) => {\n\t\t\t\tloaderHash = (31 * loaderHash + loader.charCodeAt(i)) << 0;\n\t\t\t});\n\n\t\t\ttooltipId = loaderHash + userId;\n\t\t}\n\n\t\tif (Type.isStringFilled(userId))\n\t\t{\n\t\t\tif (null == Tooltip.tooltipsList[tooltipId])\n\t\t\t{\n\t\t\t\tTooltip.tooltipsList[tooltipId] = new TooltipBalloon({\n\t\t\t\t\tuserId: userId,\n\t\t\t\t\tnode: node,\n\t\t\t\t\tloader: loader\n\t\t\t\t});\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tTooltip.tooltipsList[tooltipId].node = node;\n\t\t\t\tTooltip.tooltipsList[tooltipId].create();\n\t\t\t}\n\n\t\t\te.preventDefault();\n\t\t}\n\t});\n\n});\n\nexport {\n\tTooltip,\n\tTooltipBalloon,\n}\n"],"names":["Tooltip","disable","disabled","enable","getDisabledStatus","getLoader","getIdPrefix","tooltipsList","TooltipBalloon","constructor","params","node","userId","loader","version","tracking","active","width","height","realAnchor","coordsLeft","coordsTop","anchorRight","anchorTop","hMirror","vMirror","rootClassName","INFO","DIV","ROOT_DIV","trackMouseHandle","trackMouse","bind","init","create","Type","isStringFilled","isUndefined","parseInt","getAttribute","paramsString","anchorParams","JSON","parse","isPlainObject","startTrackMouse","addEventListener","stopTrackMouse","EventEmitter","subscribe","onSliderOpen","hideTooltip","elCoords","BX","pos","left","top","right","document","setTimeout","tickTimer","removeEventListener","e","current","pageX","x","y","pageY","clientX","body","scrollLeft","clientY","scrollTop","time","showTooltip","showOpacityEffect","bFade","steps","period","delta","i","intId","setInterval","clearInterval","op","style","opacity","classList","add","display","remove","emit","BaseEvent","compatData","old","getElementById","contains","appendChild","createElement","position","ZIndexManager","register","className","arScroll","GetWindowScrollPos","clientWidth","bringToFront","stopPropagation","stubCreated","innerHTML","ajax","runComponentAction","mode","data","then","response","detailUrl","user","cardUserName","nameFormatted","cardFields","Object","keys","forEach","fieldCode","toLowerCase","name","value","cardFieldsClassName","Loc","getMessage","currentUserPerms","operations","videocall","id","photo","photoClassName","toolbar","toolbar2","message","hasBirthday","hasHonour","hasAbsence","insertData","RESULT","Name","Position","Card","Photo","Toolbar","Toolbar2","adjustPosition","url","indexOf","entityType","entityId","get","classNameAnim","classNameFixed","onmouseover","onmouseout","tooltipCoords","length","eval","cardEl","photoEl","toolbarEl","toolbar2El","isArray","Scripts","script","Event","ready","Browser","isAndroid","isIOS","target","tooltipId","loaderHash","c","charCodeAt","preventDefault"],"mappings":";;;;;CAAO,MAAMA,OAAO,CACpB;GAIC,OAAOC,OAAO,GACd;KACC,IAAI,CAACC,QAAQ,GAAG,IAAI;;GAGrB,OAAOC,MAAM,GACb;KACC,IAAI,CAACD,QAAQ,GAAG,KAAK;;GAGtB,OAAOE,iBAAiB,GACxB;KACC,OAAO,IAAI,CAACF,QAAQ;;GAGrB,OAAOG,SAAS,GAChB;KACC,OAAO,2BAA2B;;GAGnC,OAAOC,WAAW,GAClB;KACC,OAAO,gBAAgB;;CAEzB;CA7BaN,OAAO,CAEZE,QAAQ,GAAG,KAAK;CAFXF,OAAO,CAGZO,YAAY,GAAI,EAAE;;CCGnB,MAAMC,cAAc,CAC3B;GACCC,WAAW,CAACC,MAAM,EAClB;KACC,IAAI,CAACC,IAAI,GAAG,IAAI;KAChB,IAAI,CAACC,MAAM,GAAG,IAAI;KAClB,IAAI,CAACC,MAAM,GAAG,IAAI;KAClB,IAAI,CAACC,OAAO,GAAG,IAAI;KACnB,IAAI,CAACC,QAAQ,GAAG,KAAK;KACrB,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