PageSourceSearch

https://www.fiat.com.eg/etc.clientlibs/stellantis-d2-core/clientli…/core/components/TextImage.js

js fiat.com.eg collected 2026-10-07 19:15:49 UTC 8,631 bytes, 2 lines download raw bytes

1/*! stellantis_d2_core 1.44.12 202609100705 */
2"use strict";(self.webpackChunkstellantis_d2_core=self.webpackChunkstellantis_d2_core||[]).push([["TextImage"],{3293:(e,t,i)=>{i.r(t),i.d(t,{default:()=>d});var o=i(2446),n=i(9264);function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function l(e){return function(e){if(Array.isArray(e))return a(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return a(e,t);var i={}.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?a(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,o=Array(t);i<t;i++)o[i]=e[i];return o}function s(e,t){for(var i=0;i<t.length;i++){var o=t[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,c(o.key),o)}}function c(e){var t=function(e,t){if("object"!=r(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var o=i.call(e,t||"default");if("object"!=r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==r(t)?t:t+""}var u=i(2556).gsap,d=function(){return e=function e(t){var i;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.component=t,this.image=this.component.querySelector("img"),this.imageText=this.component.querySelector(".cvTextImage__text"),this.vrtWithImage=this.component.querySelector(".cvTextImage__image"),this.imageGradient=this.component.querySelector(".cvTextImage__image.vrt--gradient"),this.video=this.component.querySelector(".cvTextImage__video"),this.wcagWidget=this.component.querySelector(".wcag_videoWdg"),this.vrtFullImage=this.component.classList.contains("vrt--imageFull"),this.isVideoVariant=this.component.classList.contains("vrt--video"),this.dataLposVideoControls=null===(i=this.wcagWidget)||void 0===i||null===(i=i.querySelector(".wcag_videoWdg__button"))||void 0===i||null===(i=i.dataset)||void 0===i?void 0:i.lpos,this.checkImageText(),this.checkImageGradient(),this.initObserver(),this.isVideoVariant&&this.video&&this.initVideoVariant(),this.vrtWithImage&&this.vrtFullImage&&"undefined"!=typeof window&&window.innerWidth>=992&&this.setContainerHeight(),(0,o.Z7)(this.component)},t=[{key:"initObserver",value:function(){var e,t,i=this;"undefined"!=typeof window&&"IntersectionObserver"in window?(this.observer=new IntersectionObserver(function(e){var t,o,n,r,l,a,s=null==e?void 0:e[0];null!=s&&s.isIntersecting&&(null===(t=i.timeline)||void 0===t||null===(o=t.play)||void 0===o||o.call(t),null===(n=i.observer)||void 0===n||null===(r=n.unobserve)||void 0===r||r.call(n,i.component),null===(l=i.observer)||void 0===l||null===(a=l.disconnect)||void 0===a||a.call(l))},{root:null,rootMargin:"0px",threshold:[0]}),this.observer.observe(this.component)):null===(e=this.timeline)||void 0===e||null===(t=e.play)||void 0===t||t.call(e)}},{key:"initVideoVariant",value:function(){(0,o.E)(this.component),(0,o.di)(this.video,null),(0,n.t)(this.wcagWidget,this.dataLposVideoControls,this.dataLposVideoControls),this.bindIframeClick(),this.initVideos(),this.initVideoObservers()}},{key:"bindIframeClick",value:function(){var e=this;this._onIframeClick&&this.component.removeEventListener("click",this._onIframeClick),this._onIframeClick=function(t){var i,n,r,l=null===(i=t.target)||void 0===i||null===(n=i.closest)||void 0===n?void 0:n.call(i,".cvTextImage__iframe__video__aid");if(l&&e.component.contains(l)){var a=null===(r=l.parentElement)||void 0===r?void 0:r.querySelector("iframe");a&&(0,o.UI)(a)}},this.component.addEventListener("click",this._onIframeClick)}},{key:"initVideos",value:function(){var e=this;this.component.querySelectorAll("video").forEach(function(t){var i,o=t.querySelector("source");
2null!=o&&null!==(i=o.dataset)&&void 0!==i&&i.src&&-1!==o.dataset.src.indexOf("youtube")&&e.handleYouTubeVideo(t,o)})}},{key:"handleYouTubeVideo",value:function(e,t){var i,n=this,r=null==e?void 0:e.parentElement,l=(null==t||null===(i=t.dataset)||void 0===i?void 0:i.src)||"";if(r&&l){r.querySelector(".cvTextImage__iframe__video__aid")||r.insertAdjacentHTML("beforeend",'<div class="cvTextImage__iframe__video__aid" style="opacity: 1"><span><svg viewBox="0 0 752 752" xmlns="http://www.w3.org/2000/svg"><path d="M213.26 179.97a9.872 9.872 0 0 1 9.918.09l315.72 187.46a9.857 9.857 0 0 1 4.828 8.48 9.859 9.859 0 0 1-4.828 8.485l-315.72 187.46a9.872 9.872 0 0 1-14.906-8.485V188.54a9.867 9.867 0 0 1 4.988-8.574zm14.746 25.906v340.25l286.53-170.13z" fill-rule="evenodd"/></svg></span></div>'),t.dataset.src=(0,o.S_)(l),this.youtubeEmbed(r,t.dataset.src);var a=r.querySelector("iframe");null==a||a.addEventListener("load",function(){return n.setVideoDimensions()},{once:!0}),("function"==typeof requestAnimationFrame?requestAnimationFrame:function(e){return setTimeout(e,0)})(function(){return n.setVideoDimensions()}),this.onResize||(this.onResize=function(){return n.setVideoDimensions()},window.addEventListener("resize",this.onResize,{passive:!0}))}}},{key:"initVideoObservers",value:function(){(0,o.pP)(this.component.querySelectorAll("video")),(0,o.bQ)(l(this.component.querySelectorAll("iframe")))}},{key:"youtubeEmbed",value:function(e,t){var i,o,n;null===(i=e.querySelector(".cvTextImage__video"))||void 0===i||i.remove(),null===(o=e.querySelector(".wcag_videoWdg"))||void 0===o||o.remove(),null===(n=e.querySelector(".cvTextImage__video__aid"))||void 0===n||n.remove();var r=document.createElement("div");r.className="cvVideoResponsive",r.style.opacity="0";var l=document.createElement("iframe");l.width="100%",l.height="800",l.src="".concat(t,"?enablejsapi=1&rel=0"),l.name="YouTube video player",l.title="YouTube video player",l.setAttribute("frameborder","0"),l.setAttribute("allow","accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"),l.setAttribute("allowfullscreen",""),r.appendChild(l),e.appendChild(r),e.style.height="auto"}},{key:"checkImageText",value:function(){var e;""===(null===(e=this.imageText)||void 0===e?void 0:e.innerText)&&(this.imageText.style.display="none");var t=this.component;this.timeline=u.timeline({paused:!0,defaults:{force3D:!0,duration:.5,ease:"expo.easeOut"}}),this.timeline.fromTo(t.querySelector(".cvTextImage__title"),{autoAlpha:0,y:-30},{autoAlpha:1,y:0}),this.timeline.fromTo(t.querySelector(".cvTextImage__deck"),{autoAlpha:0,y:-30},{autoAlpha:1,y:0},"-=0.2"),this.timeline.fromTo(t.querySelector(".cvKicker"),{autoAlpha:0,y:-10},{autoAlpha:1,y:0},"-=0.2"),this.timeline.fromTo(t.querySelectorAll(".cvBtn"),{autoAlpha:0,y:-30},{autoAlpha:1,y:0,stagger:.1},"-=0.5"),this.timeline.fromTo(t.querySelectorAll(".cvTag"),{autoAlpha:0},{autoAlpha:1})}},{key:"checkImageGradient",value:function(){var e="undefined"!=typeof window&&window.innerWidth<992;!this.imageGradient&&this.vrtWithImage&&e&&this.imageText&&(this.imageText.style.marginTop="-12px")}},{key:"setContainerHeight",value:function(){var e,t=this,i=this.image,o=null===(e=this.component)||void 0===e?void 0:e.querySelector(".cvRow");i&&o&&(null==i||i.addEventListener("load",function(){o.style.minHeight="".concat(t.image.clientHeight,"px")}))}},{key:"setVideoDimensions",value:function(){var e=this.component.querySelector("iframe");e&&(this.component.style.setProperty("--video-height","".concat(e.offsetHeight,"px")),this.component.style.setProperty("--video-width","".concat(e.offsetWidth,"px")))}},{key:"destroy",value:function(){var e,t,i,o,n,r;"undefined"!=typeof window&&window.removeEventListener("resize",this.onResize),this.onResize=null,this.component.removeEventListener("click",this._onIframeClick),this._onIframeClick=null,null===(e=this.observer)||void 0===e||null===(t=e.unobserve)||void 0===t||t.call(e,this.component),null===(i=this.observer)||void 0===i||null===(o=i.disconnect)||void 0===o||o.call(i),this.observer=null,null===(n=this.timeline)||void 0===n||null===(r=n.kill)||void 0===r||r.call(n),this.timeline=null}}],t&&s(e.prototype,t),i&&s(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,i}()}}]);

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.