PageSourceSearch

https://www.maxi-cosi.de/c/modules/custom/equally_ai/js/equally-ai.js?tm7qqo

js maxi-cosi.de collected 2026-10-05 01:04:00 UTC 3,520 bytes, 95 lines download raw bytes

1
2(function ($, Drupal, drupalSettings) {
3
4  Drupal.behaviors.AddEquallyAiWidget = {
5    attach: function () {
6      (function () {
7        const equallyAiLauncherHorizontalOffset = '15px';
8        const equallyAiLauncherBottomOffset = '90px';
9        const equallyAiLauncherSize = '46px';
10        const equallyAiLauncherSettings = {
11          localAlignment: 'bottom-left',
12          position: {
13            desktop: {
14              alignment: 'bottom-left',
15              horizontalMargin: equallyAiLauncherHorizontalOffset,
16              verticalMargin: equallyAiLauncherBottomOffset
17            },
18            mobile: {
19              alignment: 'bottom-left',
20              horizontalMargin: equallyAiLauncherHorizontalOffset,
21              verticalMargin: equallyAiLauncherBottomOffset
22            }
23          },
24          size: {
25            diameterDesktop: equallyAiLauncherSize,
26            diameterMobile: equallyAiLauncherSize,
27            iconShape: 'circle'
28          }
29        };
30
31        window.EQUALLY_AI_DEFAULT_SETTINGS = {
32          ...(window.EQUALLY_AI_DEFAULT_SETTINGS || {}),
33          ...equallyAiLauncherSettings
34        };
35
36        const resizeEquallyAiLauncher = () => {
37          const widget = document.querySelector('equally-widget-ui');
38          const button = widget && widget.shadowRoot
39            ? widget.shadowRoot.querySelector('#equally-ai___init-button')
40            : null;
41
42          if (!button) {
43            return false;
44          }
45
46          button.style.left = equallyAiLauncherHorizontalOffset;
47          button.style.right = 'auto';
48          button.style.bottom = equallyAiLauncherBottomOffset;
49          button.style.width = equallyAiLauncherSize;
50          button.style.height = equallyAiLauncherSize;
51
52          return true;
53        };
54
55        if (!window.equallyAiLauncherOverridesInitialized) {
56          window.equallyAiLauncherOverridesInitialized = true;
57          window.addEventListener('equally-ai:ready', () => {
58            if (window.EquallyAI && window.EquallyAI.updateSettings) {
59              window.EquallyAI.updateSettings('position', equallyAiLauncherSettings);
60            }
61
62            let attempts = 0;
63            const launcherIntervalId = setInterval(() => {
64              attempts += 1;
65              if (resizeEquallyAiLauncher() || attempts >= 20) {
66                clearInterval(launcherIntervalId);
67              }
68            }, 250);
69          });
70        }
71
72        document.addEventListener('load', function(d, s, id) {
73          var js, fjs = d.getElementsByTagName(s)[0];
74          if (d.getElementById(id)) return;
75          js = d.createElement(s);
76          js.id = id;
77          js.src = "https://widget.prod.equally.ai/equally-widget.min.js";
78          fjs.parentNode.insertBefore(js, fjs);
79          window.EquallyAI = {
80            updateSettings: (type, settings) =>
81              window.addEventListener('equally-ai:ready', () =>    window.EquallyAI.updateSettings(type, settings)),
82          };
83        }(document, 'script', 'equallyWidget'));
84        !window.EQUALLY_AI_API_KEY&&(window.EQUALLY_AI_API_KEY="e6fpedjpucc585pd9we2e1msf2ffceo0",intervalId=setInterval(function(){
85          window.EquallyAi&&(clearInterval(intervalId),window.EquallyAi=new EquallyAi)
86        },500));
87
88        var languageCode = drupalSettings.equally_ai.langcode;
89        if (languageCode) {
90          window.EquallyAI.updateSettings('currentLanguage', languageCode);
91        }
92      }) ();
93    }
94  };
95})(jQuery, Drupal, drupalSettings);

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.