PageSourceSearch

https://www.saintelouise.qc.ca/assets/modules/js/blocs.js?r=1788202336

js saintelouise.qc.ca collected 2026-10-04 10:22:50 UTC 15,615 bytes, 1 lines download raw bytes

1(()=>{function t(t,e,o){return(e=function(t){var e=function(t,e){if("object"!==n(t)||null===t)return t;var o=t[Symbol.toPrimitive];if(void 0!==o){var i=o.call(t,e||"default");if("object"!==n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===n(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function e(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var o=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=o){var n,i,r,s,a=[],c=!0,l=!1;try{if(r=(o=o.call(t)).next,0===e){if(Object(o)!==o)return;c=!1}else for(;!(c=(n=r.call(o)).done)&&(a.push(n.value),a.length!==e);c=!0);}catch(t){l=!0,i=t}finally{try{if(!c&&null!=o.return&&(s=o.return(),Object(s)!==s))return}finally{if(l)throw i}}return a}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return o(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var o=0,n=new Array(e);o<e;o++)n[o]=t[o];return n}function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}SoftSystem.Utils.ConvertVP=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(0!=t)return e?100*t/window.innerWidth:100*t/window.innerHeight;if(0!=e&&0!=o){var n=[];return n.width=Math.ceil(window.innerWidth*e/100),n.height=Math.ceil(window.innerHeight*o/100),n}return 0!=e?Math.ceil(window.innerWidth*e/100):0!=o?Math.ceil(window.innerHeight*o/100):void 0},SoftSystem.Utils.CheckIframe=function(){try{return window.self!==window.top}catch(t){return!0}};var i="1vw";"undefined"!=typeof cfg&&2!=cfg.microsite||(i=SoftSystem.Utils.ConvertVP(0,1,0)),SoftSystem.Blocs={VueApp:null,OptionsGrid:{animate:!0,margin:0,cellHeight:i,verticalMargin:"0vw",staticGrid:!0,resizable:!1,disableResize:!0,disableDrag:!0,detachGrid:!1,minRow:0,oneColumnSize:767}},SoftSystem.Blocs.ChargerGridStack=function(){$(window).width()<768||GridStack.initAll(SoftSystem.Blocs.OptionsGrid)},SoftSystem.Blocs.ResizeGridstack=function(){if(!($(window).width()<768)){var t=$(".grid-stack");$(t).each((function(){var t=$(this)[0].gridstack;$(this).find(".autoheight").each((function(){var e,o=$(this).find(".bloc")[0].scrollHeight+17,n=$(this).data("id"),i=SoftSystem.Blocs.Accordeons.scrollUp[n],r=SoftSystem.Blocs.Accordeons.heightAccordeon[n],s=SoftSystem.Blocs.Accordeons.blocAccordeon[n];"undefined"==SoftSystem.Blocs.Accordeons.heightAccordeon[n]&&(r=0),"undefined"==SoftSystem.Blocs.Accordeons.blocAccordeon[n]&&(s=null),"undefined"==SoftSystem.Blocs.Accordeons.scrollUp[n]&&(i=!1),s==$(this).find(".bloc").parent()[0]&&(o=$(this).find(".bloc").parent()[0].scrollHeight+17,void 0!==SoftSystem.Blocs.Accordeons.oldAccordeonHeight[n]&&(o=parseInt(Soft
1System.Blocs.Accordeons.oldAccordeonHeight[n])),i?(SoftSystem.Blocs.Accordeons.oldAccordeonHeight[n]=o,o=r):SoftSystem.Blocs.Accordeons.oldAccordeonHeight={}),e=parseInt(pxTOvw(o)),t.update(this,{h:e})}))}))}},SoftSystem.Blocs.Parallax=function(){$(".parallax").length>0&&$(window).on("load resize scroll",(function(){$(".parallax").each((function(){var t=-$(window).scrollTop(),e=0;$(".header").length>0&&(e=$(".header").height());var o=(t- -($(this).position().top-$(this).height()))/4-e;o>0&&(o=0),$(this).visible("partial")&&$(this).css({"background-position":"0px "+o+"px"})}))}))},SoftSystem.Blocs.SetupSite=function(){$(window).width()>=768&&(SoftSystem.Blocs.ChargerGridStack(),SoftSystem.Blocs.ResizeGridstack()),$(window).width()>=768&&SoftSystem.Blocs.Parallax()},SoftSystem.Blocs.Cartes=[],SoftSystem.Blocs.maps=[],SoftSystem.Blocs.updateMarkers=function(t){if(null!=SoftSystem.Blocs.maps[t.bloc_id]){var e=new L.Popup;map=SoftSystem.Blocs.maps[t.bloc_id],map.eachLayer((function(t){null!=t.options.texte&&map.removeLayer(t)}));var o=[],i=L.icon({iconUrl:"/images/vendor/leaflet/dist/marker-icon.png",iconAnchor:[12,41]});"array"!=typeof t.markers&&"object"!=n(t.markers)||(o=t.markers);for(var r=[],s=0;s<o.length;s++){var a=o[s],c=[a.latitude,a.longitude];console.log(a.options),r.push(c),markerData={icon:i,texte:a.texte[cfg.langue],alt:a.titre[cfg.langue],title:a.titre[cfg.langue],index:s},2==cfg.microsite&&(markerData.draggable="true");var l=L.marker(c,markerData);2==cfg.microsite&&l.on("dragend",(function(t){var e=t.target,o=e.getLatLng();e.setLatLng(new L.LatLng(o.lat,o.lng),{icon:i,texte:e.texte,alt:e.titre,title:e.titre,index:e.options.index,draggable:"true"}),SoftSystem.Blocs.Accordeons.VueAppForm.markers[e.options.index].latitude=o.lat,SoftSystem.Blocs.Accordeons.VueAppForm.markers[e.options.index].longitude=o.lng,map.panTo(new L.LatLng(o.lat,o.lng))})),map.addLayer(l),l.on("click",(function(t){e.setLatLng(t.latlng),map.openPopup(e),e.setContent("<strong>"+this.options.title+"</strong>"+this.options.texte)}))}o.length>0?map.fitBounds(r):map.setView(new L.LatLng(46.829853,-71.254028),8)}},SoftSystem.Blocs.AddCarte=function(t){SoftSystem.Blocs.Cartes[t.bloc_id]=t},SoftSystem.Blocs.InitCartes=function(){for(var t=SoftSystem.Blocs.Cartes,o=new L.Popup,i=L.icon({iconUrl:"/images/vendor/leaflet/dist/marker-icon.png",iconAnchor:[12,41]}),r=0,s=Object.entries(t);r<s.length;r++){var a=e(s[r],2),c=(a[0],a[1]),l="bloc_carte_"+c.bloc_id,d=L.map(l,{scrollWheelZoom:!1});SoftSystem.Blocs.maps[c.bloc_id]=d,L.tileLayer.provider("OpenStreetMap").addTo(d);var u=[];"array"!=typeof c.markers&&"object"!=n(c.markers)||(u=c.markers);for(var f=[],m=0;m<u.length;m++){var p=u[m];console.log(p);var g=[p.latitude,p.longitude];f.push(g),markerData={icon:i,texte:p.texte[cfg.langue],alt:p.titre[cfg.langue],title:p.titre[cfg.langue],index:m},2==cfg.microsite&&(markerData.draggable="true");var h=L.marker(g,markerData);2==cfg.microsite&&h.on("dragend",(function(t){var e=t.target,o=e.getLatLng();e.setLatLng(new L.LatLng(o.lat,o.lng),{icon:i,texte:e.texte,alt:e.titre,title:e.titre,index:e.options.index,draggable:"true"}),SoftSystem.Blocs.Accordeons.VueAppForm.markers[e.options.index].latitude=o.lat,SoftSystem.Blocs.Accordeons.VueAppForm.markers[e.options.index].longitude=o.lng,d.panTo(new L.LatLng(o.lat,o.lng))})),d.addLayer(h),h.on("click",(function(t){o.setLatLng(t.latlng),d.openPopup(o),o.setContent("<strong>"+this.options.title+"</strong>"+this.options.texte)}))}u.length>0?d.fitBounds(f):d.setView(new L.LatLng(46.829853,-71.254028),8)}},SoftSystem.Blocs.Accordeons={VueAppForm:null,VueApp:null,scrollUp:{},heightAccordeon:{},blocAccordeon:{},oldAccordeonHeight:{}},SoftSystem.Blocs.Accordeons.SetupSite=function(){$(".liste_accordeon > li > span > a").on("click",(function(t){t.preventDefault();var e=this,o=$(e).closest(".liste_accordeon");blocid=o.parent().parent().parent().data("id"),SoftSystem.Blocs.Accordeons.blocAccordeon[blocid]=o.parent().parent()[0],SoftSystem.Blocs.Accordeons.heightAccordeon[blocid]=o[0].scrollHeight;var n=!1;$(e).closest("li").find(".reponse").is(":visible")&&(SoftSystem.Blocs.Accordeons.scrollUp[blocid]=!1,n=!0),o.find(".reponse").slideUp(1
150),o.find(".plus").removeClass("fa-minus").addClass("fa-plus"),o.find("li").removeClass("active"),n||(SoftSystem.Blocs.Accordeons.scrollUp[blocid]=!0,$(e).closest("li").addClass("active").find(".reponse").slideDown(150),$(e).closest("li").find(".plus").removeClass("fa-plus").addClass("fa-minus")),""!=$(e).data("ref")&&(location.hash="#"+$(e).data("ref")),setTimeout((function(){SoftSystem.Blocs.Accordeons.scrollUp[blocid]&&(o=$(e).closest(".liste_accordeon"),SoftSystem.Blocs.Accordeons.heightAccordeon[blocid]=o[0].scrollHeight),SoftSystem.Blocs.ResizeGridstack()}),150)}));var t=location.hash;""!=t&&(t=t.replace("#",""),$(".liste_accordeon > li > span > a").each((function(){var e=$(this).data("ref");t==e&&($(this).closest("li").find(".reponse").is(":visible")||$(this).trigger("click"))})))},SoftSystem.Blocs.Slider={},SoftSystem.Blocs.Slider.SetupSite=function(){$(".bloc_slider_slick").slick({dots:!0,autoplay:!0,fade:!1})},SoftSystem.Blocs.FormulaireIntranet=function(e){window.scrollTo(0,0),parent.scrollTo(0,0);for(var o={},n=0;n<e.items.length;n++){var i=e.items[n];o[i.id]={x:i.x,y:i.y,w:i.w,h:i.h}}SoftSystem.Blocs.VueApp=new Vue({el:"#app_blocs",data:{afficherOptions:!0,afficherGrid:!1,type:"texte",items:o,grid:null,settings:e,modif:!1,template:0,contenuCopie:0,urlDuplicate:""},mounted:function(){this.setupGrid();var t=localStorage.getItem("afficherGrid");null!=t&&(t=JSON.parse(t),this.afficherGrid=t)},watch:{afficherOptions:function(t){t?(this.grid.enable(),parent.document.getElementById("tab-grid").classList.remove("preview")):parent.document.getElementById("tab-grid").classList.add("preview")},afficherGrid:function(t){localStorage.setItem("afficherGrid",t)}},methods:{setupGrid:function(){var t={column:12,margin:0,cellHeight:SoftSystem.Utils.ConvertVP(0,1,0),verticalMargin:"0vw",static:!1,alwaysShowResizeHandle:this.settings.resize,disableResize:!this.settings.resize};this.grid=GridStack.init(t);var e=this;this.grid.on("resizestop",(function(t,o){e.updateItems(),e.modif=!0})),this.grid.on("dragstop",(function(t,o){e.updateItems(),e.modif=!0})),this.settings.mobile||(SoftSystem.Blocs.HookFormulaire(),SoftSystem.Blocs.ContextMenu())},updateItems:function(){for(var t=this.grid.getGridItems(),e=0;e<t.length;e++){var o=t[e],n=o.getAttribute("data-id"),i={x:o.gridstackNode.x,y:o.gridstackNode.y,w:o.gridstackNode.w,h:o.gridstackNode.h};Vue.set(this.items,n,i)}SoftSystem.Blocs.AdjustFrame()},getHeight:function(t){return void 0!==this.items[t]?this.items[t].h:0},deleteBloc:function(t){t.preventDefault();var e=t.target,o=$(e).closest(".grid-stack-item"),n=o.data("id"),i=window;SoftSystem.Utils.CheckIframe()&&(i=parent);var r=this.settings.url+"delete/"+n+"/?ajax=1",s=this;i.bootbox.confirm("Confirmer la suppression du bloc",(function(t){t&&(s.grid.removeWidget(o[0]),Vue.delete(s.items,n),axios.get(r).then((function(t){s.saveBlocs()})))}))},resetMobile:function(){url=this.settings.url+"reset_mobile/"+this.settings.module+"/"+this.settings.enr+"/",axios.get(url).then((function(t){window.location.reload(!0)}))},getItemsJson:function(){return this.updateItems(),JSON.stringify(this.items)},saveBlocs:function(){var t=this.getItemsJson();document.getElementById("data").value=t,document.getElementById("form_blocs").submit()},utiliserTemplate:function(){var t=parseInt(this.template),e=this.settings.module,o=this.settings.enr,n=this.settings.url+"utiliser-template/"+e+"/"+o+"/"+t+"/?ajax=1";axios.get(n).then((function(t){parent.SoftSystem.Blocs.MarkSubmit(),window.location.reload(!0)}))},creerGabarit:function(t){var e=t.target,o=$(e).data("url"),n=window;SoftSystem.Utils.CheckIframe()&&(n=parent),n.bootbox.prompt({title:"Créer un gabarit pour quel module ? ",inputType:"select",inputOptions:this.settings.modules,value:"",onShown:function(){n.$(".bootbox-input-select").addClass("form-select")},callback:function(t){null!=t&&(o=o.replace("[mod]",t),top.location=o)}})},copierBlocs:function(){var e=parseInt(this.contenuCopie),o=this.settings.module,n=this.settings.enr,i=this.settings.url+"copier-contenus/"+o+"/"+n+"/"+e+"/?ajax=1",r=window;SoftSystem.Utils.CheckIframe()&&(r=parent),e>0&&r.bootbox.confirm({title:"Copier blocs d'une autre page",message:'<label style="color:red;text-decoration: underline;">ATTENTION !</label> Cette action supprimera tout le contenu de votre page actuelle pour le remplacer avec le contenu d\'une autre page.<br/><br/>Êtes-vous vraiment sûr ?',buttons:{confirm:{label:"Oui",className:"btn-success"},cancel:{label:"Non",className:"btn-warning"}},callback:function(t){t?axios.get(i).then((function(t){window.location.reload(!0)})):$("#select_contenus").val(0)}}).css(t({"font-weight":"bold",color:"#FFF","font-size":"1.2em"},"font-weight","bold"))},duplicateTo:function(t){this.urlDuplicate=t.target.href;var e=$("#boite_duplicate").html();$(t.target).next(".boite_duplicate_unique").html(e).show()}
1,copierVersSelect:function(t){var e=$(t).siblings("select").first().val(),o=this.urlDuplicate;0!=e&&(o=o+e+"/?ajax=1",$(".boite_duplicate_unique").hide(),axios.get(o).then((function(t){var e=window;SoftSystem.Utils.CheckIframe()&&(e=parent),e.bootbox.confirm({message:"Bloc copié, voulez-vous aller sur la page sélectionnée ?",buttons:{confirm:{label:"Oui",className:"btn-success"},cancel:{label:"Non",className:"btn-warning"}},callback:function(o){o&&(e.location.href="../"+t.data.id)}})})))},openFancybox:function(t,e){return t.stopImmediatePropagation(),$(".contextMenu").length>0&&$(".contextMenu, .contextMenu-trigger").fadeOut(),!SoftSystem.Utils.CheckIframe()||(t.preventDefault(),"undefined"==typeof url&&(e=t.target.getAttribute("href")),widthAUtiliser="95%",parent.$.fancybox.open({padding:0,href:e,type:"iframe",width:widthAUtiliser,height:"95%",autoSize:!1}),!1)},clickEdit:function(t){var e=$(t.target);e.hasClass("grid-stack-item")||(e=e.closest(".grid-stack-item")),$(e).find(".bloc_edit").first()[0].click()},devMode:function(){return SoftSystem.Utils.CheckIframe()?parent.cfg.devMode:cfg.devMode}}})},SoftSystem.Blocs.HookFormulaire=function(){if(SoftSystem.Utils.CheckIframe()){var t=$(".iframe_bloc",parent.document),e=t.prop("id"),o=t.closest("form").prop("id"),n=o+"_blocs",i=parent.document.getElementById(n);null==i&&((i=parent.document.createElement("input")).setAttribute("type","hidden"),i.setAttribute("name","blocs"),i.setAttribute("id",n)),parent.document.getElementById(o).appendChild(i);var r=$("#grid_site").height();SoftSystem.Blocs.AdjustFrame(e,r),$(window.parent,window.parent.document).on("scroll",(function(){SoftSystem.Blocs.AdjustHeaderBar()}))}},SoftSystem.Blocs.AdjustHeaderBar=function(){var t=$(".iframe_bloc",parent.document),e=$(window.parent.document),o=$(".topnav",parent.document),n=$("#config-header"),i=t.offset().top,r=e.scrollTop(),s=$(o[0]).height(),a=parseInt(i-r-s);a<0?(a=Math.abs(a),n.css("top",a+"px")):n.css("top","0px")},SoftSystem.Blocs.TriggerSave=function(t,e){var o=document.getElementById(t).contentWindow.SoftSystem.Blocs.VueApp.getItemsJson(),n=e+"_blocs";document.getElementById(n).value=o},SoftSystem.Blocs.ContextMenu=function(){$("#grid_site").on("contextmenu",(function(t){t.preventDefault(),$(".contextMenu").css("left",t.pageX).css("top",t.pageY).fadeIn(150),$(".contextMenu-trigger").show()})),$(".contextMenu-trigger").on("click",(function(t){t.preventDefault(),$(".contextMenu").fadeOut(),$(".contextMenu-trigger").hide()}))},SoftSystem.Blocs.AdjustFrame=function(){var t=$("#grid_site").height();if(0==t?t=750:t+=250,SoftSystem.Utils.CheckIframe()){var e=$(".iframe_bloc",parent.document);$(e).css("height",t+"px")}},SoftSystem.Blocs.CloseDuplicatePopup=function(){$(document).on("click",".boite_duplicate_unique a.fas",(function(t){t.preventDefault(),$(".boite_duplicate_unique").hide()}))},SoftSystem.Blocs.MarkSubmit=function(){var t=$(".iframe_bloc");t.get(0).onload=function(){t.get(0).onload=null,$("#Donnees").submit()}}})();

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.