PageSourceSearch

https://www.jcdecauxme.com/themes/custom/jcd/html/generic/js/behaviors/fancybox-min.js?tjrjan

js jcdecauxme.com collected 2026-09-26 06:27:34 UTC 9,827 bytes, 1 lines download raw bytes

1var jcd=jcd||{};!function(e){var t=null!=document.dir?document.dir:document.getElementsByTagName("html")[0].getAttribute("dir"),o=".view-content .post-block.post-ajax-slider";function n(t){if(!window.innerDocClick){var n=History.getState();if(void 0!==n.data.nid){var i=t.data.nid,a=n.data.nid;if(i&&a){var s=e(o);if(s.length){var r=s.index(s.filter('[data-listing-node-nid="'+i+'"]')),l=s.index(s.filter('[data-listing-node-nid="'+a+'"]')),d=1;0===r||r===s.length-1?(e.fancybox.cancel(),e.fancybox._start(1)):r>l?d=0:r<l&&(d=2)}}}void 0!==d?1!==d&&e.fancybox.jumpto(d):e.fancybox.close()}}function i(){if(!window.innerDocClick){var t=History.getState();if(void 0!==t.data.nid){var n,i=e(o+'[data-listing-node-nid="'+t.data.nid+'"]');if(i.length)i.find("a.open-ajax-content-popup").length?n=i.find("a.open-ajax-content-popup"):i.find(".desc a").length&&(n=i.find(".desc a")),n&&n.first().trigger("click")}}}document.onmouseover=function(){window.innerDocClick=!0},e(document).on("mouseleave",function(e){window.innerDocClick=!1}),jcd.fancyBox=function(o,a){"use strict";var s=jQuery("html"),r=0,l=!1,d="popup-fixed-position";e(once("fancyBox",".open-fancybox",o)).fancybox({padding:0,prevEffect:"fade",nextEffect:"fade",closeBtn:!1,fitToView:!1,loop:!1,scrolling:"hidden",mouseWheel:!1,beforeShow:function(){e(".btn-close-popup").on("click",function(){e.fancybox.close()})},beforeLoad:function(){l||(r=jQuery(window).scrollTop(),s.addClass(d),l=!0)},afterShow:function(){if(jcd.videoGtm(e(".popup-gallery .youtube")),jcd.videoVimeoGTM(e(".popup-gallery .vimeo")),jcdecaux.fancyboxPaginationHandle(),"undefined"!=typeof Drupal){var t=this.inner[0];t.nodeType===Node.ELEMENT_NODE&&Drupal.attachBehaviors(t,a)}setTimeout(function(){var t,o;t=e(".fancybox-outer").offset().top-e(window).scrollTop(),o=e("#admin-menu-wrapper").height()||0,t<49&&e(".fancybox-wrap").css({top:50+o})},350),e(window).width()<=1024&&e(".fancybox-wrap").swipe({allowPageScroll:"auto",triggerOnTouchEnd:!1,swipeStatus:v,preventDefaultEvents:!1,threshold:75,swipe:function(t,o){"left"===o&&e("body").hasClass("html")}})},afterClose:function(){s.removeClass(d),setTimeout(function(){jQuery(window).scrollTop(r),l=!1},150),jcd.matchHeight()},helpers:{overlay:{locked:!0}}});function c(t,o,n){var i=null;
1return e.each(n,function(e,n){n==t&&(i="prev"===o?e-1:e+1)}),null!==i&&void 0!==n[i]?n[i]:null}var p=e(".view-display-id-blog_post, .view-display-id-document, .view-display-id-catalogue").data("full-map"),f="/";"undefined"!=typeof drupalSettings&&"undefined"!==drupalSettings.path&&(f=drupalSettings.path.baseUrl+drupalSettings.path.pathPrefix);var u=f+"listing/ajax-popup-gallery/",h=f+"jcd/webform/",g=drupalSettings.path.currentPath.replace("node/",""),w="";Number.isInteger(Number.parseInt(g))&&(w="?listing_id="+g);var x=w?"&ajax":"?ajax";function v(t,o,n,i){if("move"!=o||"left"!=n&&"right"!=n)"end"==o&&("right"==n?e.fancybox.prev(n):"left"==n&&e.fancybox.next(n));else{var a=e(".fancybox-wrap");"left"==n?a.find(".fancybox-next").length>0&&(y(0+i,0),a.addClass("moving-left")):"right"==n&&a.find(".fancybox-prev").length>0&&(a.addClass("moving-right"),y(0-i,0))}}function y(t,o){var n=e(".fancybox-wrap .fancybox-inner");n.css("transition-duration",(o/1e3).toFixed(1)+"s");var i=(t<0?"":"-")+Math.abs(t).toString();n.css("transform","translate("+i+"px,0)")}e(once("ajaxFancyBoxBlock",".post-ajax-slider",o)).each(function(){var t,g=e(this).data("listing-node-nid");if(t=void 0!==e(this).data("popup-position")?e(this).data("popup-position"):"with-back-btn",g){var y=u+g+w;e(once("ajaxFancyBox",e(this,o).find(".open-ajax-content-popup").attr("href",y))).fancybox({padding:0,prevEffect:"elastic",nextEffect:"elastic",openEffect:"elastic",loop:!1,closeBtn:!1,fitToView:!1,wrapCSS:t,scrolling:"hidden",margin:0,mouseWheel:!1,type:"ajax",href:y+x,afterShow:function(){jcd.popupInit(),e(window).off("popstate",i);var t=e(this.inner).children(".document-popup").attr("data-nid");if(e(window).one("popstate",{nid:t},n),"undefined"!=typeof Drupal){var o=this.inner[0];o.nodeType===Node.ELEMENT_NODE&&Drupal.attachBehaviors(o,a)}e(window).width()<=1024&&e(".fancybox-wrap").swipe({allowPageScroll:"vertical",triggerOnTouchEnd:!1,swipeStatus:v,preventDefaultEvents:!1,threshold:75,swipe:function(t,o){if("up"===o||"down"===o)return!1;"left"===o&&e("body").hasClass("html")}});var s=e(this)[0].inner.find(".document-popup");if(void 0!==s.data("webform-block-id")){var r=s.data("webform-block-id"),l=h+r,d=Drupal.ajax({url:l,submit:{placeholder_id:"#"+s.data("webform-id")}});drupalSettings.nothrob=!0,d.execute(),drupalSettings.nothrob=!1}},beforeShow:function(){setTimeout(function(){e(".ajax-custom-loading-block").fadeOut(400)},50);var t=History.getState(),o=e(this)[0].inner.find(".document-popup"),n=o.attr("data-alias"),i=o.attr("data-nid");if("undefined"!==n&&"undefined"!==t.hash&&t.hash!==n&&"undefined"!=typeof drupalSettings&&void 0!==drupalSettings.JCDecaux&&void 0!==drupalSettings.JCDecaux.blog_post&&void 0!==drupalSettings.JCDecaux.blog_post.listing_url){var a=f+drupalSettings.JCDecaux.blog_post.listing_url.slice(1);n=n.slice(f.length),window.ajaxViewsReloadDisabled=!0,History.pushState({status:"open",nid:i},document.title,a+"/"+n)}var s=c(i,"prev",p),r=c(i,"next",p);this.group.length<2&&(s&&this.group.unshift({href:u+s+w+x,type:"ajax",isDom:!1,nid:s}),r&&this.group.push({href:u+r+w+x,type:"ajax",isDom:!1,nid:r}),(s&&!r||s&&r)&&(this.index=1)),2===this.group.length&&(1===this.index&&(r=c(i,"next",p))&&this.group.push({href:u+r+w+x,type:"ajax",isDom:!1,nid:r}),this.index<1&&(s=c(i,"prev",p))&&(this.group.unshift({href:u+s+w+x,type:"ajax",isDom:!1,nid:s}),this.index=1)),3===this.group.length&&(this.index<1&&(s=c(i,"prev",p))&&(this.group.unshift({href:u+s+w+x,type:"ajax",isDom:!1,nid:s}),this.group.pop(),this.index=1),this.index>1&&(r=c(i,"next",p))&&(this.group.push({href:u+r+w+x,type:"ajax",isDom:!1,nid:r}),this.group.shift(),this.index=1))},beforeLoad:function(){e.fancybox.coming&&e.fancybox.defaults&&!e.fancybox.coming.parent&&(e.fancybox.coming.parent=e("body"),e.fancybox.coming.fixed=!0,e.fancybox.defaults.fixed=!0),setTimeout(function(){e(".ajax-custom-loading-block").fadeIn(50)},0),l||(r=jQuery(window).scrollTop(),s.addClass(d),l=!0)},afterClose:function(){e(window).off("popstate",n),e(window).one("popstate",i),s.removeClass(d),window.ajaxViewsReloadDisabled=!1,setTimeout(function(){jQuery(window).scrollTop(r),l=!1},150),jcd.matchHeight()},beforeClose:function(){if("undefined"!=typeof drupalSettings&&void 0!==drupalSettings.JCDecaux&&void 0!==drupalSettings.JCDecaux.blog_post&&void 0!==drupalSettings.JCDecaux.blog_post.listing_url){var e=f+drupalSettings.JCDecaux.blog_post.listing_url.slice(1);History.pushState({status:"close"},document.title,e)}!1},helpers:{overlay:{locked:!0}}})}}),e(once("fancyBox",".open-content-popup",o)).fancybox({padding:0,prevEffect:"elastic",nextEffect:"elastic",openEffect:"elastic",loop:!1,closeBtn:!1,fitToView:!1,wrapCSS:"with-back-btn",margin:0,mouseWheel:!1,afterShow:function(){if(jcd.popupInit(),"undefined"!=typeof Drupal){var t=this.inner[0];t.nodeType===Node.ELEMENT_NODE&&Drupal.attachBehaviors(t,a)}e(window).width()<=1024&&e(".fancybox-wrap").swipe({allowPageScroll:"vertical",triggerOnTouchEnd:!1,swipeStatus:v,preventDefaultEvents:!1,threshold:75,swipe:function(t,o){if("up"===o||"down"===o)return!1;"left"===o&&e("body").hasClass("html")}})},beforeShow:function(){window.location.hash},beforeLoad:function(){l||(r=jQuery(window).scrollTop(),s.addClass(d),l=!0)},afterClose:function(){"undefined"!=typeof drupalSettings&&void 0!==drupalSettings.JCDecaux&&void 0!==drupalSettings.JCDecaux.blog_post&&void 0!==drupalSettings.JCDecaux.blog_post.listing_url&&History.pushState(null,document.title,drupalSettings.JCDecaux.blog_post.listing_url),s.removeClass(d),setTimeout(function(){jQuery(window).scrollTop(r),l=!1},150),jcd.matchHeight()},beforeClose:function(){!1},helpers:{overlay:{locked:!0}}}),e(once("fancyBox",".open-catalogue-popup",o)).fancybox({padding:0,prevEffect:"elastic",nextEffect:"elastic",openEffect:"elastic",loop:!1,closeBtn:!1,fitToView:!1,wrapCSS:"on-the-right",margin:0,autoScale:!0,leftRatio:1,topRatio:0,mouseWheel:!1,afterShow:function(){if(jcd.popupInit(),e(window).width()<=1024&&e(".fancybox-wrap").swipe({allowPageScroll:"vertical",triggerOnTouchEnd:!1,swipeStatus:v,preventDefaultEvents:!1,threshold:75,swipe:function(t,o){if("up"===o||"down"===o)return!1;"left"===o&&e("body").hasClass("html")}}),"undefined"!=typeof Drupal){var o=this.inner[0];o.nodeType===Node.ELEMENT_NODE&&Drupal.attachBehaviors(o,a)}if(e(this.inner[0]).find("div").hasClass("forDesktop"))return!1;e(this.inner[0]).find("table").each(function(){var t=e(this);t.hasClass("no-mobile-scroll")?t.wrap("<div class='forDesktop no-mobile-scroll'></div>"):t.wrap("<div class='forDesktop'></div>")}),e(once("addCustomScroll","div.forDesktop")).each(function(){var o=e(this),n=o.find("table").outerHeight(!0);o.height(n),o.jScrollPane(),"rtl"===t&&o.jScrollPane().data("jsp").scrollToX(9999,!1)})},beforeShow:function(){window.location.hash},beforeLoad:function(){l||(r=jQuery(window).scrollTop(),s.addClass(d),l=!0)},afterClose:function(){s.removeClass(d),setTimeout(function(){jQuery(window).scrollTop(r),l=!1},150),jcd.matchHeight()},beforeClose:function(){!1},helpers:{overlay:{locked:!0}}}),jcd.customAjaxLoader(o,a),e(once("fancyBox",".open-single-ajax-fancybox")).fancybox({padding:0,prevEffect:"elastic",nextEffect:"elastic",openEffect:"elastic",loop:!1,closeBtn:!1,fitToView:!1,scrolling:"hidden",margin:0,mouseWheel:!1,type:"aja
1x",beforeShow:function(){e(".btn-close-popup").click(function(){e.fancybox.close()})}})}}(jQuery),Drupal.behaviors.fancyBox={attach:function(e,t){jcd.fancyBox(e,t)}},jQuery.isReady&&Drupal.behaviors.fancyBox.attach(document,null);

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.