PageSourceSearch

https://www.creatio.com/themes/custom/creatio/components/products/products.js?tm6wkk

js creatio.com collected 2026-10-01 09:16:43 UTC 2,145 bytes, 61 lines download raw bytes

1(function ($, Drupal) {
2  'use strict';
3
4  Drupal.behaviors.creatio_component_products = {
5    attach: (context, settings) => {
6      $('.cr-products__tab', context).once('productsTabClick').bind('click', (e) => {
7        const tab = $(e.target).closest('.cr-products__tab');
8
9        if(!tab.hasClass('active')) {
10          const products = tab.closest('.cr-products');
11          const item = products.find('.cr-products__item').eq(tab.index());
12          const itemContent = item.find('.cr-products__content');
13          const itemText = itemContent.find('.cr-products__text');
14          const svg = item.find('.cr-products__screen svg');
15          const activeTab = products.find('.cr-products__tab.active');
16          const activeItem = products.find('.cr-products__item').eq(activeTab.index())
17          const activeItemContent = activeItem.find('.cr-products__content');
18          const activeAnimate = activeItem.find('[begin="indefinite"][id$="_finish"]');
19
20          const productsTypeDefault = products.hasClass('cr-products_default')
21
22          activeTab.add(activeItemContent).removeClass('active');
23          tab.add(itemContent).addClass('active');
24
25          if(productsTypeDefault) {
26            typeWriter(itemText[0]);
27            activeAnimate[0].beginElement();
28          }
29
30          setTimeout(() => {
31            activeItem.removeClass('active');
32            item.addClass('active');
33
34            if(productsTypeDefault) {
35              svg.html(svg.html());
36              svg.find('[begin="indefinite"][id$="_start"]')[0].beginElement();
37              svg[0].querySelectorAll('.digit').forEach(tsDigitAnimate);
38            }
39          }, (productsTypeDefault ? 400 : 0));
40        }
41      });
42    }
43  };
44
45  $(window).on('scroll', () => {
46    const st = $(window).scrollTop();
47    const region = $('.cr-products').closest('.creatio-region');
48    if(region.length) {
49      if(st) {
50        if(!region.hasClass('scrolled')) {
51          region.addClass('scrolled');
52        }
53      } else {
54        if(region.hasClass('scrolled')) {
55          region.removeClass('scrolled');
56        }
57      }
58    }
59  });
60
61}(jQuery, Drupal));

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.