uawdijnntqw1x1x1
IP : 3.144.72.54
Hostname : axolotl
Kernel : Linux axolotl 4.9.0-13-amd64 #1 SMP Debian 4.9.228-1 (2020-07-05) x86_64
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
OS : Linux
PATH:
/
var
/
www
/
axolotl
/
data
/
www
/
axolotl.ru
/
www
/
bitrix
/
js
/
imopenlines
/
component
/
widget
/
src
/
public.js
/
/
/** * Bitrix OpenLines widget * Widget public interface * * @package bitrix * @subpackage imopenlines * @copyright 2001-2019 Bitrix */ import {Widget} from "./widget" import {SubscriptionType} from "./const"; export class WidgetPublicManager { constructor(config) { this.developerInfo = 'Do not use private methods.'; this.__privateMethods__ = new Widget(config); this.__createLegacyMethods(); } open(params) { return this.__privateMethods__.open(params); } close() { return this.__privateMethods__.close(); } showNotification(params) { return this.__privateMethods__.showNotification(params); } getUserData() { return this.__privateMethods__.getUserData(); } setUserRegisterData(params) { return this.__privateMethods__.setUserRegisterData(params); } setCustomData(params) { return this.__privateMethods__.setCustomData(params); } mutateTemplateComponent(id, params) { return this.__privateMethods__.mutateTemplateComponent(id, params); } addLocalize(phrases) { return this.__privateMethods__.addLocalize(phrases); } /** * * @param params {Object} * @returns {Function|Boolean} - Unsubscribe callback function or False */ subscribe(params) { return this.__privateMethods__.subscribe(params); } start() { return this.__privateMethods__.start(); } __createLegacyMethods() { if (typeof window.BX.LiveChat === 'undefined') { let sourceHref = document.createElement('a'); sourceHref.href = this.__privateMethods__.host; let sourceDomain = sourceHref.protocol+'//'+sourceHref.hostname+(sourceHref.port && sourceHref.port != '80' && sourceHref.port != '443'? ":"+sourceHref.port: ""); window.BX.LiveChat = { openLiveChat: () => { this.open({openFromButton: true}); }, closeLiveChat: () => { this.close(); }, addEventListener: (el, eventName, handler) => { if (eventName === 'message') { this.subscribe({ type: SubscriptionType.userMessage, callback: function (event) { handler({origin: sourceDomain, data: JSON.stringify({action: 'sendMessage'}), event}); } }); } else { console.warn('Method BX.LiveChat.addEventListener is not supported, user new format for subscribe.') } }, setCookie: () => {}, getCookie: () => {}, sourceDomain }; } if (typeof window.BxLiveChatInit === 'function') { let config = window.BxLiveChatInit(); if (config.user) { this.__privateMethods__.setUserRegisterData(config.user); } if (config.firstMessage) { this.__privateMethods__.setCustomData(config.firstMessage) } } if (window.BxLiveChatLoader instanceof Array) { window.BxLiveChatLoader.forEach(callback => callback()); } return true; } }
/var/www/axolotl/data/www/axolotl.ru/www/bitrix/js/imopenlines/component/widget/src/public.js