PageSourceSearch

https://abacus.ai/js/general.js?t=1233

js abacus.ai collected 2026-10-01 10:15:12 UTC 45,093 bytes, 1,640 lines download raw bytes

1const isMobile =
2  /android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(
3    (navigator && navigator.userAgent ? navigator.userAgent : "").toLowerCase(),
4  );
5
6if (typeof Sentry !== "undefined") {
7  // Sentry.init({
8  //   dsn: "https://[email protected]/1480813",
9  //   ignoreErrors: [
10  //     "ResizeObserver loop limit exceeded",
11  //     "Non-Error promise rejection captured with value: Object Not Found Matching Id:3",
12  //   ],
13  // });
14}
15
16const getTokenCookie = function () {
17  return document.cookie.match("(^|;)\\s*token\\s*=\\s*([^;]+)")?.pop() || "";
18};
19
20// let isIE = false;
21// if(/MSIE 10/i.test(navigator.userAgent)) {
22//   isIE = true;
23// } else if (/MSIE 9/i.test(navigator.userAgent) || /rv:11.0/i.test(navigator.userAgent)) {
24//   isIE = true;
25// } else if (/Edge\/\d./i.test(navigator.userAgent)){
26//   isIE = true;
27// }
28
29var storage = Storages.localStorage;
30
31$('img[src="static/imgs/logo_text.png"]').css("cursor", "pointer");
32$('img[src="/static/imgs/logo_text.webp"]').css("cursor", "pointer");
33$(".caseStudiesIndustry, .linkNew").click(function () {
34  let classes = $(this).attr("data-type");
35  if ($("#" + classes).length) {
36    $([document.documentElement, document.body]).animate(
37      {
38        scrollTop: $("#" + classes).offset().top - 80,
39      },
40      100,
41    );
42  }
43});
44
45var makeHoverImgs = function (useCursor = false) {
46  if (useCursor) {
47    $(".imgHover").css({ cursor: "pointer" });
48  }
49  $(".imgHover").hover(
50    function () {
51      let src1 = $(this).attr("src");
52      src1 = src1.replace(".png", "-Hover.png").replace(".jpg", "-Hover.jpg");
53      $(this).attr("src", src1);
54    },
55    function () {
56      let src1 = $(this).attr("src");
57      src1 = src1.replace("-Hover.", ".");
58      $(this).attr("src", src1);
59    },
60  );
61};
62
63let params = {};
64let paramsLoc = window.location.search;
65if (paramsLoc) {
66  if (paramsLoc.startsWith("?")) {
67    paramsLoc = paramsLoc.substring(1);
68  }
69
70  paramsLoc = paramsLoc.split("&");
71  paramsLoc &&
72    paramsLoc.some((p1) => {
73      let p0 = p1.split("=")[0];
74      if (p0) {
75        let v1 = p1.substring(p0.length + 1);
76        params[p0] = v1;
77      }
78    });
79}
80
81let force = false;
82
83var openExternal = function (url) {
84  window.open(url, "_blank");
85};
86/*
87let filename = '';
88let path = window.location.pathname;
89if(path.endsWith('.html')) {
90  let pp = path.split('/');
91  filename = pp.pop();
92}
93if(isMobile && filename.indexOf('mobile_')!==0) {
94  let url = window.location.href;
95  let urlOri = url;
96  if(filename!=='') {
97    url = url.replace(filename, 'mobile_'+filename);
98
99    if(urlOri!==url) {
100      window.location.href = url;
101    }
102  }
103
104} else if(!isMobile && filename.indexOf('mobile_')===0) {
105  let url = window.location.href;
106  let urlOri = url;
107  url = url.replace('/mobile_', '/');
108
109  if(urlOri!==url) {
110    window.location.href = url;
111  }
112}
113*/
114var scrollToBottom = function () {
115  window.scrollTo(0, document.body.scrollHeight);
116};
117
118var goTab = function (queryUrl, differentOrigin = false) {
119  let url0 = window.location.href;
120
121  if (queryUrl === "/") {
122    queryUrl = "";
123  }
124
125  queryUrl = queryUrl || "";
126
127  let url1 = window.location.origin;
128  let urlE = queryUrl;
129  if (urlE !== "") {
130    if (!url1.endsWith("/")) {
131      url1 += "/";
132    }
133  }
134  let urlFinal = differentOrigin ? urlE : url1 + urlE;
135  if (urlFinal !== url0) {
136    window.location = urlFinal;
137  }
138};
139
140var cancelEvents = function (e) {
141  e.preventDefault();
142  e.stopPropagation();
143};
144
145var showInviteIndex = function () {
146  $("#inviteForm").show();
147};
148var hideInviteIndex = function () {
149  $("#inviteForm").hide();
150};
151
152var inviteSend = function (form) {
153  let $form = $(form);
154
155  let valName = $form.find("#valName").val();
156  let valEmail = $form.find("#valEmail").val();
157  let valOrgName = $form.find("#valOrgName").val();
158  let valComment = $form.find("#valComment").val();
159
160  $.ajax({
161    url: "/api/_signup",
162    method: "POST",
163    headers: {
164      "REAI-UI": 1,
165    },
166    data: {
167      name: valName,
168      email: valEmail,
169      org_name: valOrgName,
170      comment: valComment,
171    },
172    success: function (data, textStatus, request) {
173      invitationForText("Thanks for your interest. We will be in touch.");
174    }.bind(this),
175    error: function (request, textStatus, errorThrown) {
176      window.alert("There was an error");
177    },
178  });
179};
180
181var invitationForText = function (msg) {
182  let $formParent = $("#formParent");
183  $formParent.html(
184    '<div style="text-align: center; color: white;">' + msg + "</div>",
185  );
186};
187
188var createTabs = function () {
189  let tabs = $("#tabs");
190  if (tabs.length > 0) {
191    let selTabName = $(tabs[0]).attr("data-tab");
192    tabs.append(
193      $(
194        '<span class="topTab ' +
195          (selTabName === "\\" ? "selected" : "") +
196          '" onclick="goTab(\'/\')">HOME</span>\n' +
197          '<span class="topTab ' +
198          (selTabName === "research" ? "selected" : "") +
199          '" onclick="goTab(\'research\')">RESEARCH</span>\n' +
200          '<span class="topTab ' +
201          (selTabName === "culture" ? "selected" : "") +
202          '" onclick="goTab(\'culture\')">CULTURE</span>\n' +
203          '<span class="topTab ' +
204          (selTabName === "about" ? "selected" : "") +
205          '" onclick="goTab(\'about\')">ABOUT US</span>\n' +
206          '<span class="topTab ' +
207          (selTabName === "social" ? "selected" : "") +
208          '" onclick="goTab(\'social\')">SOCIAL MEDIA</span>\n' +
209          '<span class="topTab ' +
210          (selTabName === "jobs" ? "selected" : "") +
211          '" onclick="goTab(\'jobs\')">JOBS</span>\n',
212      ),
213    );
214  }
215};
216
217$(document).ready(function () {
218  $(".hoverReplace").hover(
219    function () {
220      let newSrc = $(this).attr("src").replace(".png", "-h.png");
221      $(this).attr("src", newSrc);
222    },
223    function () {
224      let newSrc = $(this).attr("src").replace("-h.png", ".png");
225      $(this).attr("src", newSrc);
226    },
227  );
228});
229
230var shapes = [];
231
232var generateBackgroundCircles = function (backDiv) {
233  const $body = $(document.body);
234
235  let $backDiv = $(backDiv);
236  let ww = $body.width() || $(window).width();
237  let hh = $body.height() || $(window).height();
238  $backDiv.css({
239    width: ww + "px",
240    height: hh + "px",
241  });
242
243  var generateShapeWhite = function (id, ind) {
244    const imgWW = Math.trunc(2572 / 2); //2570;//1400-Math.trunc(Math.random()*400);
245    let left =
246      -imgWW / 2 +
247      ww / 2 +
248      (ind % 2 === 0 ? -1 : 1) * Math.trunc((Math.random() * ww) / 2);
249    let top = Math.trunc(Math.random() * hh - imgWW / 2);
250
251    let $tabSel = $(".topTab.selected");
252    if ($tabSel && $tabSel.length > 0) {
253      $tabSel = $($tabSel[0]);
254      if ($tabSel) {
255        const hrefTabSel = $tabSel.attr("href");
256        if (hrefTabSel) {
257          if (hrefTabSel.indexOf("index.") > -1) {
258            left = [0, 0][ind];
259            top = [0, 0][ind];
260            return null;
261          } else if (hrefTabSel.indexOf("research.") > -1) {
262            left = [-1254, 2119][ind];
263            top = [-104, 362][ind];
264          } else if (hrefTabSel.indexOf("culture.") > -1) {
265            left = [-1246, 1363][ind];
266            top = [-110, 1115][ind];
267            return null;
268          } else if (hrefTabSel.indexOf("about.") > -1) {
269            left = [-1251, 2098][ind];
270            top = [-124, 346][ind];
271          } else if (hrefTabSel.indexOf("social.") > -1) {
272            left = [-1246, 1363][ind];
273            top = [-110, 1115][ind];
274          } else if (hrefTabSel.indexOf("jobs.") > -1) {
275            left = [-1240, 1369][ind];
276            top = [-112, 1113][ind];
277          }
278        }
279      }
280    }
281
282    left = (left / 2) * 1.5;
283
284    left -= Math.trunc(1370 / 2);
285
286    let img1 = $(
287      '<img id="' +
288        id +
289        '" src="imgs/poly7.png" style="width: ' +
290        imgWW +
291        "px; position: absolute; top: " +
292        top +
293        "px; left: 50%; margin-left: " +
294        left +
295        'px; opacity: 0.6;" alt="" />',
296    );
297    $backDiv.append(img1);
298    return { shape: img1, top: top, left: left, size: imgWW, ignore: true };
299  };
300
301  var animCircleCount = 4;
302
303  var generateCircle = function (id, ind) {
304    const colors = ["#1496CA", "#0B9D7C"];
305
306    let wwCircle = 40 + Math.trunc(Math.random() * (520 - 40));
307
308    let left = Math.trunc(Math.random() * ww);
309    let top = Math.trunc(Math.random() * hh - wwCircle / 2);
310
311    let circleColor =
312      colors[Math.trunc(Math.random() * colors.length) % colors.length];
313    let opacity = 0.38 - Math.random() * 0.16;
314
315    let numCirclesMore = Math.random();
316    if (numCirclesMore < 0.34) {
317      numCirclesMore = 2;
318    } else if (numCirclesMore < 0.6) {
319      numCirclesMore = 1;
320    } else {
321      numCirclesMore = 0;
322    }
323
324    let more = "";
325    const addCircleSemi = function (wwCircleMain, wwCircle) {
326      let top = wwCircleMain / 2 - wwCircle / 2;
327      let left = wwCircleMain / 2 - wwCircle / 2;
328      return (
329        '<div style="position: absolute; border-radius: 50%; opacity: 0.06; background-color: white; top: ' +
330        top +
331        "px; left: " +
332        left +
333        "px; width: " +
334        wwCircle +
335        "px; height: " +
336        wwCircle +
337        'px;"></div>'
338      );
339    };
340    for (let i = 0; i < numCirclesMore; i++) {
341      more += addCircleSemi(
342        wwCircle,
343        Math.trunc(wwCircle * ([0.45, 0.23][i] - Math.random() * 0.04)),
344      );
345    }
346
347    let circle1 = $(
348      '<div class="animThing circle-anim-' +
349        Math.trunc(Math.random() * animCircleCount) +
350        '" style="width: ' +
351        wwCircle +
352        "px; height: " +
353        wwCircle +
354        "px; border-radius: 50%; border: 1px solid " +
355        circleColor +
356        "; opacity: " +
357        opacity.toFixed(2) +
358        "; position: absolute; top: " +
359        top +
360        "px; left: " +
361        left +
362        'px;">' +
363        more +
364        "</div>",
365    );
366    $backDiv.append(circle1);
367    return { shape: circle1, top: top, left: left, size: wwCircle };
368  };
369
370  var animPointCount = 5;
371
372  var generatePoint = function (id, ind) {
373    const colors = ["#1496CA", "#0B9D7C", "#159ED4", "#32C5FF", "#0B9D7C"];
374
375    let wwCircle = 3 + Math.trunc(Math.random() * (16 - 3));
376
377    let left =
378      ww / 2 + (ind % 2 === 0 ? -1 : 1) * Math.trunc((Math.random() * ww) / 2);
379    let top = Math.trunc(Math.random() * hh - wwCircle / 2);
380
381    let circleColor =
382      colors[Math.trunc(Math.random() * colors.length) % colors.length];
383    let opacity = 1 - Math.random() * 0.26;
384    let circle1 = $(
385      '<div class="animThing point-anim-' +
386        Math.trunc(Math.random() * animPointCount) +
387        '" style="width: ' +
388        wwCircle +
389        "px; height: " +
390        wwCircle +
391        "px; border-radius: 50%; background-color: " +
392        circleColor +
393        "; opacity: " +
394        opacity.toFixed(2) +
395        "; position: absolute; top: " +
396        top +
397        "px; left: " +
398        left +
399        'px;"></div>',
400    );
401    $backDiv.append(circle1);
402    return { shape: circle1, top: top, left: left, size: wwCircle };
403  };
404
405  if (shapes && shapes.length > 0) {
406    shapes.some((s1) => {
407      if (s1 && s1.shape) {
408        s1.shape.remove();
409      }
410    });
411    shapes = [];
412  }
413
414  shapes = [];
415
416  var touchShapes = function (s1, s2) {
417    const esp = 1.3;
418    if (
419      s1.left > s2.left + s2.size * esp ||
420      s2.left > s1.left + s1.size * esp
421    ) {
422      return false;
423    }
424    if (s1.top > s2.top + s2.size * esp || s2.top > s1.top + s1.size * esp) {
425      return false;
426    }
427    return true;
428  };
429  var touchOtherShape = function (s1, checkIgnore) {
430    let res = false;
431    shapes &&
432      shapes.some((s2) => {
433        if (
434          (!checkIgnore || (checkIgnore && !s2.ignore)) &&
435          touchShapes(s1, s2)
436        ) {
437          res = true;
438          return true;
439        }
440        return false;
441      });
442    return res;
443  };
444
445  const max0 = 40;
446
447  /*  for(let i=0; i<2; i++) {
448        let s1 = null, max = max0;
449        do {
450          if(s1 && s1.shape) {
451            s1.shape.remove();
452          }
453          s1 = generateShapeWhite('poly7_' + i, i);
454        } while(s1!=null && max-->0 && touchOtherShape(s1, false));
455        if(s1) {
456          shapes.push(s1);
457        }
458      }
459    */
460  for (let i = 0; i < 8; i++) {
461    let s1 = null,
462      max = max0;
463    do {
464      if (s1 && s1.shape) {
465        s1.shape.remove();
466      }
467      s1 = generateCircle("circle_" + i, i);
468    } while (s1 != null && max-- > 0 && touchOtherShape(s1, true));
469    if (s1) {
470      shapes.push(s1);
471    }
472  }
473
474  for (let i = 0; i < 8; i++) {
475    let s1 = null,
476      max = max0;
477    do {
478      if (s1 && s1.shape) {
479        s1.shape.remove();
480      }
481      s1 = generatePoint("point_" + i, i);
482    } while (s1 != null && max-- > 0 && touchOtherShape(s1, true));
483    if (s1) {
484      shapes.push(s1);
485    }
486  }
487
488  var animateShapes = (shapes, idThisAnim) => {
489    shapes.some((s1) => {
490      if (s1.ignore) {
491        return false;
492      }
493
494      let animCall = (s1, idThisAnim) => {
495        if (!s1 || idThisAnim !== idAnim) {
496          return;
497        }
498
499        let $shape = s1.shape;
500
501        let top =
502          (s1.top2 || 0) /*$shape.css('top')*/ +
503          Math.trunc(Math.random() * 60) -
504          30;
505        let left =
506          (s1.left2 || 0) /*$shape.css('left')*/ +
507          Math.trunc(Math.random() * 60) -
508          30;
509        let time = Math.random() * 1400 + 2200;
510
511        $shape.velocity(
512          {
513            translateX: top,
514            translateY: left,
515            // transform: 'translateX('+top+'px)',// translateY('+left+'px)',
516          },
517          {
518            easing: "linear",
519            duration: time,
520            complete: (elements, activeCall) => {
521              s1.top2 = top;
522              s1.left2 = left;
523              animCall(s1, idThisAnim);
524            },
525          },
526        );
527      };
528
529      animCall(s1, idThisAnim);
530    });
531  };
532
533  idAnim++;
534  // animateShapes(shapes, idAnim);
535};
536
537var idAnim = 1;
538
539var timeoutResize = null;
540$(window).resize(() => {
541  if (timeoutResize != null) {
542    clearTimeout(timeoutResize);
543    timeoutResize = null;
544  }
545  timeoutResize = setTimeout(() => {
546    timeoutResize = null;
547
548    generateBackgroundCircles($(".backCircles")[0]);
549  }, 250);
550});
551
552if ($(".backCircles").length > 0) {
553  setTimeout(() => {
554    generateBackgroundCircles($(".backCircles")[0]);
555  }, 100);
556}
557
558if ($("#research1").length > 0) {
559  let doResearchLines = () => {
560    let position0 = $("#research0").position();
561    let top0 =
562      position0 == null ? null : position0.top + $("#research0").height();
563    let position1 = $("#research1").position();
564    let top1 = position1.top + $("#research1").height();
565    let position2 = $("#research2").position();
566
567    if (top0 != null) {
568      $("#line0").css({
569        left: position0.left + $("#research0").width() / 2 - 3.5,
570        top: top0,
571        height: position1.top - top0,
572      });
573    }
574
575    $("#line1").css({
576      left: position1.left + $("#research1").width() / 2 - 3.5,
577      top: top1,
578      height: position2.top - top1,
579    });
580
581    let top2 = position2.top + $("#research2").height();
582    $("#line2").css({
583      left: position2.left + $("#research2").width() / 2 - 3.5,
584      top: top2,
585      height: $("#research3").position().top - top2,
586    });
587
588    let positionD0 = $("#researchD0").position();
589    if (positionD0 != null) {
590      let topD0 = positionD0.top + $("#researchD0").height();
591      let positionD1 = $("#researchD1").position();
592      // let topD1 = positionD1 == null ? null : (positionD1.top + $('#researchD1').height());
593
594      $("#lineD").css({
595        left: positionD0.left + $("#researchD0").width() / 2 - 3.5,
596        top: 10 + topD0,
597        height: positionD1.top - topD0 - 10 * 2,
598      });
599    }
600  };
601
602  setTimeout(() => {
603    doResearchLines();
604  }, 0);
605  setTimeout(() => {
606    doResearchLines();
607  }, 100);
608  setTimeout(() => {
609    doResearchLines();
610  }, 500);
611}
612
613var menuExpand = function (menuItem) {
614  if (
615    $(`#${menuItem}Arrow`).attr("src") === "/static/imgsmobile/arrow_down.png"
616  ) {
617    $(`#${menuItem}Arrow`).attr("src", "/static/imgsmobile/arrow_up.png");
618    $(`#${menuItem}Content`).css("display", "block");
619  } else {
620    $(`#${menuItem}Arrow`).attr("src", "/static/imgsmobile/arrow_down.png");
621    $(`#${menuItem}Content`).css("display", "none");
622  }
623};
624
625if ($(".fillMeetup").length > 0) {
626  let data = data_meetup;
627  if (
628    data &&
629    data.date_string != null &&
630    data.speakers != null &&
631    data.url != null
632  ) {
633    $(".fillMeetup .date").text(data.date_string);
634    $(".fillMeetup .speakers").text(data.speakers);
635    $(".fillMeetup .url").prop("href", data.url);
636    $(".fillMeetup .meetImg").prop("href", data.url);
637    if (data.img_src) {
638      $(".fillMeetup .meetImgElem").prop("src", data.img_src);
639    }
640    if (isMobile) {
641      if (data.img_style_mobile) {
642        $(".fillMeetup .meetImgElem").prop("style", data.img_style_mobile);
643      }
644    } else {
645      if (data.img_style) {
646        $(".fillMeetup .meetImgElem").prop("style", data.img_style);
647      }
648    }
649  }
650}
651
652var askRecaptcha = (action, cbFinish) => {
653  var exec = function () {
654    window["grecaptcha"].ready(function () {
655      window["grecaptcha"]
656        .execute("6LecNb4UAAAAAD9bzZveB8dUdkUrJJZYQO1woMxw", { action: action })
657        .then(function (token) {
658          cbFinish && cbFinish(token);
659        })
660        .catch(() => {
661          cbFinish && cbFinish(null);
662        });
663    });
664  };
665  if (window["grecaptcha"]) {
666    exec();
667  } else if (window.loadRecaptcha) {
668    // Lazy-loaded reCAPTCHA (see _recaptcha_lazy.html): fetch it on demand.
669    window
670      .loadRecaptcha()
671      .then(exec)
672      .catch(() => {
673        cbFinish && cbFinish(null);
674      });
675  } else {
676    cbFinish && cbFinish(null);
677  }
678};
679
680var $preloadimgs = null,
681  listPreloadImgs = [];
682var cacheImgHidden = (url1) => {
683  if (url1 == null || url1 === "" || url1.endsWith(".mp4")) {
684    return;
685  }
686
687  if ($preloadimgs == null) {
688    $preloadimgs = $(
689      '<div style="position: absolute; top: 0; left: 0; visibility: hidden; z-index: 0;"></div>',
690    );
691  }
692
693  if (listPreloadImgs.indexOf(url1) === -1) {
694    listPreloadImgs.push(url1);
695
696    let $img1 = $('<img src="' + url1 + '" alt="" />');
697    $preloadimgs.append($img1);
698  }
699};
700
701const topMarScroll = $(".homeSolNew").length > 0 ? 80 : 50;
702
703$().ready(() => {
704  if ($(".headerNavNew").length > 0) {
705    let $headerNav = $(".headerNavNew");
706    var showNavActual = false;
707
708    var doCheckScrollWin = () => {
709      let showNav = $(window).scrollTop() > topMarScroll;
710      if (showNav !== showNavActual) {
711        showNavActual = showNav;
712        if (showNav) {
713          $headerNav.fadeIn();
714        } else {
715          $headerNav.fadeOut();
716        }
717      }
718    };
719
720    doCheckScrollWin();
721
722    $(window).scroll(function (event) {
723      doCheckScrollWin();
724    });
725  }
726
727  $(".requestAccessButton .requestConsButton").each(function (index) {
728    let $elem = $(this);
729
730    if ($elem.attr("href")) {
731      $elem.attr("href", "#");
732    }
733  });
734
735  $(document).on("click", ".requestAccessButtonMobile", function () {
736    let $t1 = $(this);
737
738    let isGetStarted = $t1.attr("data-get-started");
739    if (isGetStarted) {
740      window.location.href = "/app/signup";
741      return;
742    }
743
744    goTab("request_access" + (window.isDecoRequest ? "?deco=1" : ""));
745  });
746
747  $(".requestConsButtonMobile").each(function (index) {
748    let $elem = $(this);
749    $elem.click(function () {
750      goTab("request_cons");
751    });
752  });
753
754  var rulesAll = {
755    email: ["email", "empty"],
756    nameOrg: ["empty"],
757    orgSize: ["empty"],
758    persRole: ["empty"],
759    namePers: ["empty"],
760    usecase: {
761      identifier: "usecase",
762      rules: [
763        {
764          type: "checked",
765          prompt: "Please select at least one use case",
766        },
767      ],
768    },
769  };
770  // this part of code ignoring mobile validation but not sure why
771  // if (isRunMobile) {
772  //   delete rulesAll.orgSize;
773  //   if ($(".requestAccessForm").attr("data-mobile-org") !== "true") {
774  //     delete rulesAll.nameOrg;
775  //   }
776  //   delete rulesAll.persRole;
777  //   delete rulesAll.namePers;
778  // }
779
780  var requestAccessFieldToValidate = [];
781  var requestAccessStepActual = 0;
782
783  var requestResetForm = (doClose = true) => {
784    requestAccessFieldToValidate = [];
785    requestAccessStepActual = 0;
786
787    let $formUI = $(".ui.form.requestAccessForm");
788    $formUI.find('[name="email"]').val("");
789    $formUI.find('[name="nameOrg"]').val("");
790    $formUI.find('[name="orgSize"]').val("");
791    $formUI.find('[name="persRole"]').val("");
792    $formUI.find('[name="namePers"]').val("");
793    $formUI.find('[name="usecase"]:checked').each(function () {
794      $(this).prop("checked", false);
795    });
796
797    if (doClose) {
798      if (isRunMobile) {
799        goTab("/");
800      } else if ($.fn.modal) {
801        $(".requestAccessModal").modal("hide");
802      }
803    }
804  };
805
806  var emailUseFirstStep = null;
807  var $stepsMax = parseInt($(".requestAccessForm").attr("data-steps") || "0");
808  var refreshRequestAccessFormSteps = (step = 0) => {
809    $stepsMax = parseInt($(".requestAccessForm").attr("data-steps") || "0");
810
811    for (let i = 0; i < $stepsMax; i++) {
812      let $1 = $(".requestAccessModal .step" + i);
813      if (i === step) {
814        $1.show();
815      } else {
816        $1.hide();
817      }
818    }
819
820    if (!isRunMobile && $.fn.modal) {
821      $(".requestAccessModal").modal("refresh");
822    }
823  };
824
825  // Semantic UI (.modal) is not loaded on lean pages that have no request-access modal
826  if (!isMobile && $.fn.modal && $(".requestAccessModal").length > 0) {
827    $(".requestAccessModal").modal({
828      onHide: function () {
829        if ((window.location.href || "").indexOf("?requestaccess=1") > -1) {
830          goTab("/");
831        }
832      },
833    });
834  }
835
836  var showStepRequestAccess = (step = 0, checkIsProcessing = false) => {
837    if (step < 0) {
838      step = 0;
839    }
840    if (step >= $stepsMax) {
841      requestResetForm(true);
842      return;
843    }
844
845    if (checkIsProcessing && step > 0) {
846      while (
847        step > 0 &&
848        $(".requestAccessModal .step" + step).attr("data-show-previous") ===
849          "false"
850      ) {
851        step--;
852      }
853    }
854
855    if (step === 3 && $(".requestAccessForm").attr("data-simple") === "true") {
856      step = 4;
857    }
858    if (
859      step === 3 &&
860      $(".requestAccessForm").attr("data-first_only") === "true"
861    ) {
862      step = 4;
863    }
864
865    // while(step>0 && step<$stepsMax && $('.requestAccessModal .step'+step).attr('data-mobile')==='false') {
866    //   step++;
867    // }
868
869    requestAccessStepActual = step;
870
871    refreshRequestAccessFormSteps(step);
872    $(".ui.checkbox").checkbox();
873
874    let $actualStepElem = $(".requestAccessModal .step" + step);
875
876    requestAccessFieldToValidate = [];
877    let $fieldsList = $actualStepElem.attr("data-validate");
878    if ($fieldsList != null && $fieldsList !== "") {
879      requestAccessFieldToValidate = $fieldsList.split(",");
880    }
881
882    let kk = Object.keys(rulesAll);
883    if (step === 2 && useCaseReqSel != null) {
884      kk = [];
885    }
886    let rules = {};
887    kk.some((k1) => {
888      if (requestAccessFieldToValidate.indexOf(k1) > -1) {
889        rules[k1] = rulesAll[k1];
890      }
891    });
892
893    let $formUI = $(".ui.form.requestAccessForm");
894    $formUI.form({ fields: {} });
895    $formUI.form("validate form");
896    setTimeout(() => {
897      $formUI.form({
898        fields: rules,
899      });
900    }, 0);
901
902    let $showPreviousButton =
903      $actualStepElem.attr("data-show-previous") !== "false";
904    if ($showPreviousButton) {
905      $(".previousButton").show();
906    } else {
907      $(".previousButton").hide();
908    }
909
910    let $showNextButton = $actualStepElem.attr("data-show-next") !== "false";
911    if ($showNextButton) {
912      $(".nextButton").show();
913    } else {
914      $(".nextButton").hide();
915    }
916
917    let $title =
918      $actualStepElem.attr("data-title") || "Request Access For A Free Trial";
919    $(".requestTitle").text($title);
920
921    let $nextStepText = $actualStepElem.attr("data-next-text") || "Continue";
922    $(".nextButton").text($nextStepText);
923
924    if (step === 1 && !isMobile) {
925      //check email and add to DB
926      let email1 = $formUI.find('[name="email"]').first().val();
927      emailUseFirstStep = email1;
928
929      $(".emailProMsg").hide();
930      $.ajax({
931        url: "/api/_addBetaRequest",
932        method: "POST",
933        headers: {
934          "REAI-UI": 1,
935        },
936        data: {
937          email: email1 || "",
938          token: getTokenCookie(),
939        },
940        success: function (data, textStatus, request) {
941          if (data && data.success && data.result && data.result.betaEmail) {
942            window.location.href =
943              "/app/signin?betaEmail=1&email=" + encodeURIComponent(email1);
944          } else if (data && data.success && data.result) {
945            showStepRequestAccess(step + 1);
946          } else if (data && data.invalidDomain) {
947            $(".emailProMsg").show();
948            showStepRequestAccess(step - 1);
949          } else {
950            showStepRequestAccess(step - 1);
951          }
952        }.bind(this),
953        error: function (request, textStatus, errorThrown) {
954          showStepRequestAccess(step - 1);
955          window.alert("There was an error");
956        },
957      });
958    } else if (step === 1 && isMobile) {
959      $.ajax({
960        url: "/api/_addBetaRequest",
961        method: "POST",
962        headers: {
963          "REAI-UI": 1,
964        },
965        data: {
966          email: $formUI.find('[name="email"]').first().val() || "",
967          name: $formUI.find('[name="namePers"]').first().val() || "",
968          organization: $formUI.find('[name="nameOrg"]').first().val() || "",
969          token: getTokenCookie(),
970        },
971        success: function (data, textStatus, request) {
972          if (data && data.success) {
973            showStepRequestAccess(step + 1);
974          } else {
975            if (data && data.error) {
976              window.alert("Error: " + data.error);
977            }
978            showStepRequestAccess(step - 1);
979          }
980        }.bind(this),
981        error: function (request, textStatus, errorThrown) {
982          showStepRequestAccess(step - 1);
983          window.alert("There was an error");
984        },
985      });
986    } else if (step === 4) {
987      let useCases = "";
988      if (useCaseReqSel == null) {
989        $formUI.find('[name="usecase"]:checked').each(function () {
990          let $this = $(this);
991          if (useCases !== "") {
992            useCases += ",";
993          }
994          useCases += $this.attr("value");
995        });
996      } else {
997        useCases = useCaseReqSel;
998      }
999
1000      $.ajax({
1001        url: "/api/_addBetaRequest",
1002        method: "POST",
1003        headers: {
1004          "REAI-UI": 1,
1005        },
1006        data: {
1007          email: emailUseFirstStep,
1008          useCase: useCases,
1009          name: $formUI.find('[name="namePers"]').first().val() || "",
1010          organization: $formUI.find('[name="nameOrg"]').first().val() || "",
1011          organizationSize:
1012            $formUI.find('[name="orgSize"]').first().val() || "",
1013          comment:
1014            "Role: " + $formUI.find('[name="persRole"]').first().val() || "",
1015          token: getTokenCookie(),
1016        },
1017        success: function (data, textStatus, request) {
1018          if (data && data.success) {
1019            showStepRequestAccess(step + 1);
1020          } else {
1021            if (data && data.error) {
1022              window.alert("Error: " + data.error);
1023            }
1024            showStepRequestAccess(step - 1);
1025          }
1026        }.bind(this),
1027        error: function (request, textStatus, errorThrown) {
1028          showStepRequestAccess(step - 1);
1029          window.alert("There was an error");
1030        },
1031      });
1032    }
1033  };
1034
1035  var useCaseReqSel = null;
1036  $(".requestAccessButton").click(function (e) {
1037    if (e) {
1038      e.preventDefault();
1039      e.stopPropagation();
1040    }
1041
1042    let $t1 = $(this);
1043
1044    let useCase1 = $t1.attr("data-use-case");
1045    if (useCase1 != null && useCase1 !== "") {
1046      useCaseReqSel = useCase1;
1047    } else {
1048      useCaseReqSel = null;
1049    }
1050
1051    showStepRequestAccess(requestAccessStepActual);
1052    if (!isRunMobile) {
1053      $(".requestAccessModal").modal("show");
1054    }
1055  });
1056  if ((window.location.href || "").indexOf("?requestaccess=1") > -1) {
1057    setTimeout(() => {
1058      if (isMobile) {
1059        $(".requestAccessButtonMobile").click();
1060      } else {
1061        $(".requestAccessButton").click();
1062      }
1063    }, 100);
1064  }
1065  if ((window.location.href || "").indexOf("?consaccess=1") > -1) {
1066    setTimeout(() => {
1067      if (isMobile) {
1068        $(".requestConsButtonMobile").click();
1069      } else {
1070        $(".requestConsButton").click();
1071      }
1072    }, 100);
1073  }
1074
1075  if ($(".requestAccessMobileShow").length > 0) {
1076    showStepRequestAccess(requestAccessStepActual);
1077  }
1078
1079  $(".requestAccessModal .nextButton").click(function () {
1080    if (
1081      requestAccessFieldToValidate != null &&
1082      requestAccessFieldToValidate.length > 0
1083    ) {
1084      let $valid = $(".ui.form.requestAccessForm").form("is valid");
1085      if (!$valid) {
1086        return;
1087      }
1088    }
1089
1090    showStepRequestAccess(requestAccessStepActual + 1);
1091  });
1092  $(".requestAccessModal .previousButton").click(function () {
1093    showStepRequestAccess(requestAccessStepActual - 1, true);
1094  });
1095
1096  //
1097  var rulesAllCons = {
1098    email: ["email", "empty"],
1099    nameOrg: ["empty"],
1100    persRole: ["empty"],
1101    namePers: ["empty"],
1102  };
1103  if ($(".requestAccessForm").attr("data-first_only") === "true" && isMobile) {
1104    delete rulesAllCons.persRole;
1105    delete rulesAllCons.namePers;
1106  } else if ($(".requestAccessForm").attr("data-simple") === "true") {
1107    delete rulesAllCons.nameOrg;
1108    delete rulesAllCons.persRole;
1109    delete rulesAllCons.namePers;
1110  }
1111
1112  var consrequestAccessFieldToValidate = [];
1113  var consrequestAccessStepActual = 0;
1114
1115  var consrequestResetForm = (doClose = true) => {
1116    consrequestAccessFieldToValidate = [];
1117    consrequestAccessStepActual = 0;
1118
1119    let $formUI = $(".ui.form.requestConsForm");
1120    $formUI.find('[name="email"]').val("");
1121    $formUI.find('[name="nameOrg"]').val("");
1122    $formUI.find('[name="persRole"]').val("");
1123    $formUI.find('[name="namePers"]').val("");
1124
1125    if (doClose) {
1126      if (isRunMobile) {
1127        goTab("/");
1128      } else {
1129        $(".requestConsModal").modal("hide");
1130      }
1131    }
1132  };
1133
1134  var $consstepsMax = parseInt($(".requestConsForm").attr("data-steps") || "0");
1135  var consshowStepRequestAccess = (step = 0, checkIsProcessing = false) => {
1136    if (step < 0) {
1137      step = 0;
1138    }
1139    if (step >= $consstepsMax) {
1140      consrequestResetForm(true);
1141      return;
1142    }
1143
1144    if (checkIsProcessing && step > 0) {
1145      while (
1146        step > 0 &&
1147        $(".requestConsModal .step" + step).attr("data-show-previous") ===
1148          "false"
1149      ) {
1150        step--;
1151      }
1152    }
1153
1154    // while (step > 0 && step < $stepsMax && $('.requestConsModal .step' + step).attr('data-mobile') === 'false') {
1155    //   step++;
1156    // }
1157
1158    consrequestAccessStepActual = step;
1159
1160    for (let i = 0; i < $consstepsMax; i++) {
1161      let $1 = $(".requestConsModal .step" + i);
1162      if (i === step) {
1163        $1.show();
1164      } else {
1165        $1.hide();
1166      }
1167    }
1168
1169    let $consactualStepElem = $(".requestConsModal .step" + step);
1170
1171    consrequestAccessFieldToValidate = [];
1172    let $consfieldsList = $consactualStepElem.attr("data-validate");
1173    if ($consfieldsList != null && $consfieldsList !== "") {
1174      consrequestAccessFieldToValidate = $consfieldsList.split(",");
1175    }
1176
1177    let kk = Object.keys(rulesAllCons);
1178    let rules = {};
1179    kk.some((k1) => {
1180      if (consrequestAccessFieldToValidate.indexOf(k1) > -1) {
1181        rules[k1] = rulesAllCons[k1];
1182      }
1183    });
1184
1185    let $consformUI = $(".ui.form.requestConsForm");
1186    $consformUI.form({ fields: {} });
1187    $consformUI.form("validate form");
1188    setTimeout(() => {
1189      $consformUI.form({
1190        fields: rules,
1191      });
1192    }, 0);
1193
1194    let $consshowPreviousButton =
1195      $consactualStepElem.attr("data-show-previous") !== "false";
1196    if ($consshowPreviousButton) {
1197      $(".conspreviousButton").show();
1198    } else {
1199      $(".conspreviousButton").hide();
1200    }
1201
1202    let $consshowNextButton =
1203      $consactualStepElem.attr("data-show-next") !== "false";
1204    if ($consshowNextButton) {
1205      $(".consnextButton").show();
1206    } else {
1207      $(".consnextButton").hide();
1208    }
1209
1210    let $constitle =
1211      $consactualStepElem.attr("data-title") || "Free Expert Consultation";
1212    $(".consrequestTitle").text($constitle);
1213
1214    let $consnextStepText =
1215      $consactualStepElem.attr("data-next-text") || "Continue";
1216    $(".consnextButton").text($consnextStepText);
1217
1218    if (step === 1) {
1219      //check email and add to DB
1220      $(".consemailProMsg").hide();
1221      $.ajax({
1222        url: "/api/_addBetaRequest",
1223        method: "POST",
1224        headers: {
1225          "REAI-UI": 1,
1226        },
1227        data: {
1228          email: $consformUI.find('[name="email"]').first().val() || "",
1229          token: getTokenCookie(),
1230          consultation: true,
1231        },
1232        success: function (data, textStatus, request) {
1233          if (data && data.success && data.result) {
1234            $.ajax({
1235              url: "/api/_addBetaRequest",
1236              method: "POST",
1237              headers: {
1238                "REAI-UI": 1,
1239              },
1240              data: {
1241                email: $consformUI.find('[name="email"]').first().val() || "",
1242                name: $consformUI.find('[name="namePers"]').first().val() || "",
1243                organization:
1244                  $consformUI.find('[name="nameOrg"]').first().val() || "",
1245                token: getTokenCookie(),
1246                comment:
1247                  "Role: " +
1248                    $consformUI.find('[name="persRole"]').first().val() || "",
1249              },
1250              success: function (data, textStatus, request) {
1251                if (data && data.success) {
1252                  consshowStepRequestAccess(step + 1);
1253                } else {
1254                  if (data && data.error) {
1255                    window.alert("Error: " + data.error);
1256                  }
1257                  consshowStepRequestAccess(step - 1);
1258                }
1259              }.bind(this),
1260              error: function (request, textStatus, errorThrown) {
1261                consshowStepRequestAccess(step - 1);
1262                window.alert("There was an error");
1263              },
1264            });
1265          } else if (data && data.invalidDomain) {
1266            $(".consemailProMsg").show();
1267            consshowStepRequestAccess(step - 1);
1268          } else {
1269            consshowStepRequestAccess(step - 1);
1270          }
1271        }.bind(this),
1272        error: function (request, textStatus, errorThrown) {
1273          consshowStepRequestAccess(step - 1);
1274          window.alert("There was an error");
1275        },
1276      });
1277    }
1278  };
1279
1280  $(".requestConsButton").click(function (e) {
1281    if (e) {
1282      e.preventDefault();
1283      e.stopPropagation();
1284    }
1285
1286    consshowStepRequestAccess(requestAccessStepActual);
1287    if (!isRunMobile) {
1288      $(".requestConsModal").modal("show");
1289    }
1290  });
1291  if ((window.location.href || "").indexOf("?consrequestaccess=1") > -1) {
1292    setTimeout(() => {
1293      $(".requestConsButton").click();
1294    }, 100);
1295  }
1296
1297  if ($(".requestConsMobileShow").length > 0) {
1298    consshowStepRequestAccess(requestAccessStepActual);
1299  }
1300
1301  $(".requestConsModal .consnextButton").click(function () {
1302    if (
1303      consrequestAccessFieldToValidate != null &&
1304      consrequestAccessFieldToValidate.length > 0
1305    ) {
1306      let $valid = $(".ui.form.requestConsForm").form("is valid");
1307      if (!$valid) {
1308        return;
1309      }
1310    }
1311
1312    consshowStepRequestAccess(consrequestAccessStepActual + 1);
1313  });
1314  $(".requestConsModal .conspreviousButton").click(function () {
1315    consshowStepRequestAccess(consrequestAccessStepActual - 1, true);
1316  });
1317
1318  if ($(".requestConsMobileShow").length > 0) {
1319    consshowStepRequestAccess(consrequestAccessStepActual);
1320  }
1321
1322  //
1323  let p1 = storage.get("form_s");
1324  if (params) {
1325    let p2 = params["form"];
1326    if (p2 == null || p2 === "") {
1327      //
1328    } else {
1329      if (p2 !== "s") {
1330        p2 = "";
1331      }
1332      if (p1 !== p2) {
1333        p1 = p2;
1334        storage.set("form_s", p1);
1335      }
1336    }
1337  }
1338
1339  // $('.requestAccessForm .step3s').hide();
1340  if (p1 === "s") {
1341    /*
1342            $('.requestAccessForm').attr('data-forms', 'true');
1343            $('.requestAccessForm .step0 .fieldOne').removeClass('fieldOne');
1344            $('.formSgrid').hide();
1345            $('.formSremoveName').attr('name', '');
1346            $('.requestAccessForm .step2').attr('data-next-text', 'Next Step');
1347            $('.formSreplaceName').each(function () {
1348              let $t = $(this);
1349              $t.attr('name', $t.attr('name2'));
1350            });
1351
1352            $('.requestAccessForm .step4').removeClass('step4').addClass('step5');
1353            $('.requestAccessForm .step3').removeClass('step3').addClass('step4');
1354            $('.requestAccessForm .step3s').removeClass('step3s').addClass('step3');
1355            $('.requestAccessForm .step0').attr('data-validate', $('.requestAccessForm .step0').attr('data-validate-s'));
1356            $('.requestAccessForm').attr('data-steps', '6');
1357
1358            refreshRequestAccessFormSteps(0);
1359         */
1360  } else {
1361    $(".form_s").show();
1362  }
1363});
1364
1365var prepareHoverDropdown = function () {
1366  let isFalseAttr = (value) => {
1367    if (value === false || value === "false") {
1368      return true;
1369    } else {
1370      return false;
1371    }
1372  };
1373
1374  $("[dropdown]").hover(
1375    function () {
1376      let $dropdown = $(this);
1377      if ($dropdown.attr("data-on-click")) {
1378        return;
1379      }
1380
1381      $dropdown.attr("data-is-hover", true);
1382
1383      let $dropdownContent = $(".dropdown-content", this);
1384      if (!$dropdownContent.attr("data-hover-ready")) {
1385        $dropdownContent.attr("data-hover-ready", true);
1386        $dropdownContent.hover(
1387          function () {
1388            $dropdownContent.attr("data-is-hover", true);
1389          },
1390          function () {
1391            $dropdownContent.attr("data-is-hover", false);
1392          },
1393        );
1394      }
1395
1396      let $dropdownToggle = $(".dropdown-toggle", this);
1397      let expanded1 = $dropdownToggle.hasClass("show");
1398      if (isFalseAttr(expanded1)) {
1399        let allDropdowns = $(".dropdown-toggle");
1400        allDropdowns.each((d1) => {
1401          d1 = $(d1);
1402
1403          if (d1.is($dropdownToggle)) {
1404            return;
1405          }
1406
1407          let dropdownInterval = d1.data("data-hover-interval");
1408          if (dropdownInterval) {
1409            clearInterval(dropdownInterval);
1410            dropdownInterval = null;
1411            d1.data("data-hover-interval", null);
1412          }
1413
1414          let $content1 = d1.data("data-hover-content");
1415          if ($content1) {
1416            $content1.attr("data-is-hover", false);
1417          }
1418        });
1419        allDropdowns.dropdown("hide");
1420
1421        $dropdownToggle.dropdown("show");
1422        // $dropdownToggle.trigger("click");
1423
1424        setTimeout(() => {
1425          let dropdownInterval = setInterval(() => {
1426            let expanded1 = $dropdownToggle.hasClass("show");
1427            if (isFalseAttr(expanded1)) {
1428              let dropdownInterval = $dropdownToggle.data(
1429                "data-hover-interval",
1430              );
1431              if (dropdownInterval) {
1432                clearInterval(dropdownInterval);
1433                dropdownInterval = null;
1434                $dropdownToggle.data("data-hover-interval", null);
1435              }
1436            } else {
1437              if (
1438                isFalseAttr($dropdownContent.attr("data-is-hover")) &&
1439                isFalseAttr($dropdown.attr("data-is-hover"))
1440              ) {
1441                //is out
1442                let dropdownInterval = $dropdownToggle.data(
1443                  "data-hover-interval",
1444                );
1445                if (dropdownInterval) {
1446                  clearInterval(dropdownInterval);
1447                  dropdownInterval = null;
1448                  // $(".solutionsMenu").height(500);
1449                  $(".solutionsViewAll").show();
1450                  $dropdownToggle.data("data-hover-interval", null);
1451                }
1452
1453                // dd1.hide();
1454                $dropdownToggle.dropdown("hide");
1455                // $dropdownToggle.trigger("click");
1456              }
1457            }
1458          }, 1000);
1459
1460          $dropdownToggle.data("data-hover-interval", dropdownInterval);
1461          $dropdownToggle.data("data-hover-content", $dropdownContent);
1462        });
1463      }
1464    },
1465    function () {
1466      let $dropdown = $(this);
1467      if ($dropdown.attr("data-on-click")) {
1468        return;
1469      }
1470
1471      $dropdown.attr("data-is-hover", false);
1472    },
1473  );
1474};
1475
1476$(".solutionsViewAll").click((e) => {
1477  e.stopPropagation();
1478  $(".solutionsMenu").height(500);
1479  $(".solutionsViewAll").hide();
1480});
1481
1482makeHoverImgs(true);
1483
1484var noTouchImg = (list) => {
1485  if (list) {
1486    list.each((ind, e1) => {
1487      let $e1 = $(e1);
1488      $e1.on("contextmenu", function (e) {
1489        return false;
1490      });
1491      $e1.mousedown(function (e) {
1492        e.preventDefault();
1493      });
1494    });
1495  }
1496};
1497
1498noTouchImg($(".imgNo, .uk-lightbox img"));
1499
1500UIkit.util.on(document, "show", ".uk-lightbox", function (e1, item) {
1501  setTimeout(() => {
1502    $(".uk-lightbox img").each((ind, e1) => {
1503      let $e1 = $(e1);
1504      $e1.on("contextmenu", function (e) {
1505        return false;
1506      });
1507      $e1.mousedown(function (e) {
1508        e.preventDefault();
1509      });
1510    });
1511  }, 0);
1512});
1513
1514if ($(".tokUse").length > 0) {
1515  if (window.tokenLand == null || window.tokenLand === "") {
1516    let t1 = storage.get("tokenLand");
1517    if (t1) {
1518      window.tokenLand = t1;
1519    }
1520  } else {
1521    storage.set("tokenLand", window.tokenLand);
1522  }
1523}
1524
1525let homeSolNewTimer = null;
1526let isHoverHomeSolNew = false;
1527let homeNewSolutionIndex = -1;
1528let homeSolNew = $(".homeSolNew");
1529let homeSolNewCount = 0;
1530
1531if (homeSolNew.length > 0) {
1532  const prepareTimerHomeSelNew = () => {
1533    if (homeSolNewTimer != null) {
1534      clearInterval(homeSolNewTimer);
1535    }
1536    homeSolNewTimer = setInterval(() => {
1537      if (!isHoverHomeSolNew) {
1538        let ind = homeNewSolutionIndex + 1;
1539        ind = ind % homeSolNewCount;
1540        doSelSolNew(ind);
1541      }
1542    }, 6000);
1543  };
1544  prepareTimerHomeSelNew();
1545
1546  const doSelSolNew = (ind) => {
1547    if (homeNewSolutionIndex !== ind) {
1548      homeSolNew
1549        .find('.solHomeNew[data-ind="' + homeNewSolutionIndex + '"]')
1550        .removeClass("selected");
1551
1552      for (let i = 0; i < 20; i++) {
1553        let solDetail = homeSolNew.find(
1554          '.homeSolNewDetail[data-ind="' + i + '"]',
1555        );
1556        let solDetailBack = homeSolNew.find(
1557          '.homeSolNewDetailBack[data-ind="' + i + '"]',
1558        );
1559
1560        if (solDetail.length > 0) {
1561          homeSolNewCount = i + 1;
1562        }
1563
1564        solDetail.stop();
1565        solDetailBack.stop();
1566
1567        if (i === homeNewSolutionIndex || i === ind) {
1568          solDetail.css({ display: "flex" });
1569          solDetailBack.css({ display: "flex" });
1570        } else {
1571          solDetail.css({ opacity: 0, display: "none" });
1572          solDetailBack.css({ opacity: 0, display: "none" });
1573        }
1574      }
1575
1576      const ind1 = homeNewSolutionIndex;
1577      homeSolNew
1578        .find('.homeSolNewDetail[data-ind="' + ind1 + '"]')
1579        .animate({ opacity: 0 }, 400, function () {
1580          if (homeNewSolutionIndex !== ind1) {
1581            homeSolNew
1582              .find('.homeSolNewDetail[data-ind="' + ind1 + '"]')
1583              .css({ display: "none" });
1584          }
1585        });
1586      homeSolNew
1587        .find('.homeSolNewDetailBack[data-ind="' + ind1 + '"]')
1588        .animate({ opacity: 0 }, 400, function () {
1589          if (homeNewSolutionIndex !== ind1) {
1590            homeSolNew
1591              .find('.homeSolNewDetailBack[data-ind="' + ind1 + '"]')
1592              .css({ display: "none" });
1593          }
1594        });
1595
1596      homeNewSolutionIndex = ind;
1597
1598      homeSolNew
1599        .find('.homeSolNewDetail[data-ind="' + homeNewSolutionIndex + '"]')
1600        .animate({ opacity: 1 }, 800);
1601      homeSolNew
1602        .find('.homeSolNewDetailBack[data-ind="' + homeNewSolutionIndex + '"]')
1603        .animate({ opacity: 1 }, 800);
1604
1605      let selElem = homeSolNew.find(
1606        '.solHomeNew[data-ind="' + homeNewSolutionIndex + '"]',
1607      );
1608      selElem.addClass("selected");
1609    }
1610  };
1611
1612  var timeoutConst;
1613  homeSolNew
1614    .find(".solHomeNew")
1615    .mouseenter(function () {
1616      timeoutConst = setTimeout(() => {
1617        let $this = $(this);
1618        let ind = parseInt($this.attr("data-ind"));
1619        doSelSolNew(ind);
1620      }, 500);
1621    })
1622    .mouseleave(function () {
1623      clearTimeout(timeoutConst);
1624    });
1625
1626  $(".homeSolNewNoHover").hover(
1627    function () {
1628      isHoverHomeSolNew = true;
1629    },
1630    function () {
1631      isHoverHomeSolNew = false;
1632      prepareTimerHomeSelNew();
1633    },
1634  );
1635
1636  doSelSolNew(0);
1637
1638  // Title text comes from the Jinja-rendered template (translated via | t).
1639  // Do not overwrite it here -- doing so clobbers translations.
1640}

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.