1/** File : /plugins/cms/resources/js/AmetysFront.fr.js */ 2document_currentScript = (function() { a = document.createElement('script'); a.src='/plugins/cms/resources/js/AmetysFront.fr.js'; return a; })(); try { 3AmetysFront={_appParams:{},_displayMode:undefined,setAppParameter:function(name,value){this._appParams[name]=value},CONTEXT_PATH:"",ABSOLUTE_CONTEXT_PATH:"",URI_PREFIX:"",ABSOLUTE_URI_PREFIX:"",MAX_UPLOAD_SIZE:1E6,getPluginDirectPrefix:function(plugin){return[AmetysFront.URI_PREFIX,"_plugins",plugin].join("/")},getAbsolutePluginDirectPrefix:function(plugin){return[AmetysFront.ABSOLUTE_URI_PREFIX,"_plugins",plugin].join("/")},getPluginResourcesPrefix:function(plugin){return[AmetysFront.CONTEXT_PATH, 4"plugins",plugin,"resources"].join("/")},getAbsolutePluginResourcesPrefix:function(plugin){return[AmetysFront.ABSOLUTE_CONTEXT_PATH,"plugins",plugin,"resources"].join("/")},getAppParameters:function(){return this._appParams},getAppParameter:function(name){return this._appParams[name]},_mediaDisplayModeBrowser:window.matchMedia("(display-mode: browser)"),_mediaDisplayModeFullscreen:window.matchMedia("(display-mode: fullscreen)"),_mediaDisplayModeStandalone:window.matchMedia("(display-mode: standalone)"), 5_mediaDisplayModeMinimalUI:window.matchMedia("(display-mode: minimal-ui)"),getDisplayMode:function(){if(AmetysFront._displayMode===undefined)if(AmetysFront._mediaDisplayModeBrowser.matches)AmetysFront._displayMode="browser";else if(AmetysFront._mediaDisplayModeFullscreen.matches)AmetysFront._displayMode="fullscreen";else if(AmetysFront._mediaDisplayModeStandalone.matches)AmetysFront._displayMode="standalone";else AmetysFront._displayMode="minimal-ui";return AmetysFront._displayMode},_displayModeChangeListeners:[], 6_callDisplayModeChangeListeners:function(){for(let displayModeChangeListener of AmetysFront._displayModeChangeListeners)displayModeChangeListener(AmetysFront._displayMode)},onDisplayModeChange:function(callback){AmetysFront._displayModeChangeListeners.push(callback);callback(AmetysFront.getDisplayMode())}};AmetysFront._mediaDisplayModeBrowser.addEventListener("change",function(e){if(e.matches){AmetysFront._displayMode="browser";AmetysFront._callDisplayModeChangeListeners()}}); 7AmetysFront._mediaDisplayModeFullscreen.addEventListener("change",function(e){if(e.matches){AmetysFront._displayMode="fullscreen";AmetysFront._callDisplayModeChangeListeners()}});AmetysFront._mediaDisplayModeStandalone.addEventListener("change",function(e){if(e.matches){AmetysFront._displayMode="standalone";AmetysFront._callDisplayModeChangeListeners()}});AmetysFront._mediaDisplayModeMinimalUI.addEventListener("change",function(e){if(e.matches){AmetysFront._displayMode="minimal-ui";AmetysFront._callDisplayModeChangeListeners()}});} catch (e) { console.error("/plugins/cms/resources/js/AmetysFront.fr.js\n", e) } 8/** File : /plugins/cms/resources/js/AmetysFront/Event.js */ 9document_currentScript = (function() { a = document.createElement('script'); a.src='/plugins/cms/resources/js/AmetysFront/Event.js'; return a; })(); try { 10if(!AmetysFront.Event)AmetysFront.Event={_listeners:{},fire:function(event,data){var listeners=AmetysFront.Event._listeners[event]||[];for(var i=0;i<listeners.length;i++)listeners[i](data)},listen:function(event,listener){AmetysFront.Event._listeners[event]=AmetysFront.Event._listeners[event]||[];AmetysFront.Event._listeners[event].push(listener)},unlisten:function(event,listener){}};} catch (e) { console.error("/plugins/cms/resources/js/AmetysFront/Event.js\n", e) } 11/** File : /plugins/cms/resources/js/AmetysFront/Utils.fr.js */ 12document_currentScript = (function() { a = document.createElement('script'); a.src='/plugins/cms/resources/js/AmetysFront/Utils.fr.js'; return a; })(); try { 13AmetysFront.Utils={toMomentDate:function(date,relativeLimit,withoutRelativeSuffix,withTime){return AmetysFront.Utils.toRelativeDate(date,{relativeLimit:relativeLimit,withTime:withTime===false?false:true})},toRelativeDate:function(date,config){function _daysDiff(d1,d2){d1=new Date(d1);d1.setHours(0,0,0,0);d2=new Date(d2);d2.setHours(0,0,0,0);return(d1-d2)/(24*60*60*1E3)}config=config||{};
13let locale=config.locale||AmetysFront.getAppParameter("locale");let relativeLimit=config.relativeLimit||7;let withTime= 14config.withTime===true;let month=config.month||"long";let now=new Date;let relativeDate=new Date(date);let daysDiff=_daysDiff(now,relativeDate);let timeDiff=(now-relativeDate)/1E3;if(timeDiff<-59)return AmetysFront.Utils.toReadableDate(date,{"weekday":config.weekday,"month":month,"withTime":withTime,"withSeconds":config.withSeconds,"locale":locale});let dayText="";if(Math.min(relativeLimit,7)<=daysDiff)if(now.getFullYear()===relativeDate.getFullYear())dayText=relativeDate.toLocaleString(locale,{"weekday":config.weekday, 15"day":"numeric","month":month});else dayText=relativeDate.toLocaleString(locale,{"weekday":config.weekday,"day":"numeric","month":month,"year":"numeric"});else switch(daysDiff){case 0:dayText=(new Intl.RelativeTimeFormat(locale,{numeric:"auto"})).format(0,"day");break;case 1:dayText=(new Intl.RelativeTimeFormat(locale,{numeric:"auto"})).format(-1,"day");break;default:dayText=relativeDate.toLocaleString(locale,{"weekday":"long"})}if(withTime&&daysDiff==0)if(timeDiff<60)return"il y a quelques secondes"; 16else if(timeDiff<3600)return(new Intl.RelativeTimeFormat(locale,{numeric:"auto"})).format(-Math.floor(timeDiff/60),"minutes");else if(timeDiff<3*3600)return(new Intl.RelativeTimeFormat(locale,{numeric:"auto"})).format(-Math.floor(timeDiff/60/60),"hours");else return relativeDate.toLocaleTimeString(locale,{hour:"numeric",minute:"2-digit"});else return dayText},fromNow:function(date,config){config=config||{};let locale=config.locale||AmetysFront.getAppParameter("locale");const now=new Date;const then= 17new Date(date);const rtf=new Intl.RelativeTimeFormat(locale,{numeric:"auto"});const seconds=Math.round((now-then)/1E3);const minutes=Math.round(seconds/60);const hours=Math.round(minutes/60);const days=Math.round(hours/24);const months=Math.round(days/30.44);const years=Math.round(days/365.25);if(seconds<45)return rtf.format(-minutes,"second");else if(minutes<45)return rtf.format(-minutes,"minute");else if(hours<22)return rtf.format(-hours,"hour");else if(days<26)return rtf.format(-days,"day");else if(months< 1811)return rtf.format(-months,"month");else return rtf.format(-years,"year")},toReadableDate(date,config){config=config||{};let locale=config.locale||AmetysFront.getAppParameter("locale");let dateConfig={"weekday":config.weekday,"day":"numeric","month":config.month||"short","year":"numeric"};if(config.withTime){dateConfig.hour="numeric";dateConfig.minute="2-digit";if(config.withSeconds)dateConfig.second="2-digit"}return(new Date(date)).toLocaleString(locale,dateConfig)},getReadableSize:function(bytes, 19config){config=config||{};let fixedValue=config.fixedValue!=undefined?config.fixedValue:1;let limit=1024;let i=0;let units=[" "+"Ko"," "+"Mo"," "+"Go"," "+"Go"];let size=bytes;
19if(Math.abs(bytes)<=limit)return bytes+" "+"octet";else while(size>limit){size=size/limit;i++}return Math.max(size,.1).toFixed(fixedValue)+units[i-1]},deemphasize:function(s){if(!s)return s;s=s.replace(new RegExp(/[ÃÃÃÃÃà ]/g),"A");s=s.replace(new RegExp(/[à áâãäå]/g),"a");s=s.replace(new RegExp(/Ã/g),"AE");s=s.replace(new RegExp(/æ/g), 20"ae");s=s.replace(new RegExp(/Ã/g),"C");s=s.replace(new RegExp(/ç/g),"c");s=s.replace(new RegExp(/[ÃÃÃÃ]/g),"E");s=s.replace(new RegExp(/[èéêë]/g),"e");s=s.replace(new RegExp(/[ÃÃÃÃ]/g),"I");s=s.replace(new RegExp(/[ìÃîï]/g),"i");s=s.replace(new RegExp(/Ã/g),"N");s=s.replace(new RegExp(/ñ/g),"n");s=s.replace(new RegExp(/[ÃÃÃÃÃ]/g),"O");s=s.replace(new RegExp(/[òóôõö]/g),"o");s=s.replace(new RegExp(/Å/g),"OE");s=s.replace(new RegExp(/Å/g),"oe");s=s.replace(new RegExp(/[ÃÃÃÃ]/g),"U");s=s.replace(new RegExp(/[ùúûü]/g), 21"u");s=s.replace(new RegExp(/[ß]/g),"y");s=s.replace(new RegExp(/[ýÿ]/g),"y");return s},confirm:function(title,message,okFn){$j('\x3cdiv class\x3d"ui-confirm-box"\x3e\x3c/div\x3e').html(message).dialog({open:function(event,ui){$j(this).closest("[role\x3ddialog]").find(".ui-dialog-titlebar-close").hide();$j(this).closest("[role\x3ddialog]").attr("aria-modal",true)},title:title,resizable:true,minWidth:500,maxWidth:600,modal:true,zIndex:1E4,buttons:{"Oui":function(){$j(this).dialog("destroy");okFn()}, 22"Non":function(){$j(this).dialog("destroy")}}})},info:function(title,message){if(!title)title="Information";if(!message)message="No Message to Display.";$j('\x3cdiv class\x3d"ui-state-info ui-corner-all"\x3e\x3c/div\x3e').html(message).dialog({open:function(event,ui){$j(this).closest("[role\x3ddialog]").find(".ui-dialog-titlebar-close").hide();$j(this).closest("[role\x3ddialog]").attr("aria-modal",true)},title:title,resizable:true,minWidth:500,maxWidth:600,modal:true,zIndex:1E4,buttons:{"Ok":function(){$j(this).dialog("destroy")}}})}, 23error:function(message,title){if(!title)title="Attention!";if(!message)message="No Message to Display.";$j('\x3cdiv class\x3d"ui-state-error ui-corner-all"\x3e\x3c/div\x3e').html(message).dialog({open:function(event,ui){$j(this).closest("[role\x3ddialog]").find(".ui-dialog-titlebar-close").hide();$j(this).closest("[role\x3ddialog]").attr("aria-modal",true)},classes:{"ui-dialog":"ametys-ui-dialog-error"},title:title,resizable:true,minWidth:500,maxWidth:600,modal:true,zIndex:1E4,buttons:{"Ok":function(){$j(this).dialog("destroy")}}})}};} catch (e) { console.error("/plugins/cms/resources/js/AmetysFront/Utils.fr.js\n", e) } 24/** File : /plugins/cms/resources/js/AmetysFront/ServerComm.fr.js */ 25document_currentScript = (function() { a = document.createElement('script'); a.src='/plugins/cms/resources/js/AmetysFront/ServerComm.fr.js'; return a; })(); try { 26function ping(){window.setTimeout(function(){AmetysFront.ServerComm.send({plugin:"core-ui",url:"system-startuptime.xml",responseType:"xml",callback:{handler:function(response){ping()},errorHandler:function(){}}})},6E4)}ping(); 27AmetysFront.ServerComm={SERVERCOMM_URL:undefined,callMethod:function(options){return this.send({plugin:"core-ui",url:"client-call",responseType:"json",parameters:{role:options.role,id:options.id,methodName:options.methodName,parameters:options.parameters||[]},callback:options.callback})},send:function(options){if(!AmetysFront.ServerComm.SERVERCOMM_URL)AmetysFront.ServerComm.SERVERCOMM_URL=AmetysFront.getPluginDirectPrefix("cms")+"/servercomm/fo-messages.xml";var defaultOpts={pluginOrWorkspace:options.plugin, 28responseType:"json",parameters:{},showSuccess:false,showError:true,showWait:false,upload:false};for(var property in defaultOpts)if(options[property]===undefined)options[property]=defaultOpts[property];var contentJson=JSON.stringify({pluginOrWorkspace:options.pluginOrWorkspace,url:options.url,parameters:options.parameters,responseType:options.responseType});var contextParamsJson=JSON.stringify(AmetysFront.getAppParameters());var data=new FormData;data.append("content",contentJson);data.append("context.parameters", 29contextParamsJson);if(options.parameters.parameters&&options.parameters.parameters.forEac
29h){var totalSize=1E3;options.parameters.parameters.forEach(function(param,index){if(param instanceof File){data.append("file-"+index,param);options.parameters.parameters[index]=null;totalSize+=param.size}else if(param instanceof Array)for(let i in param){let subParam=param[i];if(subParam instanceof File){data.append("file-"+index+"-"+i,subParam);options.parameters.parameters[index][i]=null;totalSize+=subParam.size}}}); 30if(totalSize>AmetysFront.MAX_UPLOAD_SIZE){let errorText="Le ou les fichiers sélectionnés sont trop volumineux : {0} pour {1} de taille maximale autorisée.".replace(/\{0\}/g,AmetysFront.Utils.getReadableSize(totalSize)).replace(/\{1\}/g,AmetysFront.Utils.getReadableSize(AmetysFront.MAX_UPLOAD_SIZE));if(AmetysFront.Event)AmetysFront.Event.fire("loaderFail",{title:"Taille maximale dépassée",text:errorText});if(options.callback){let callback=options.callback;(callback.errorHandler||callback.handler).apply(callback.scope, 31[callback.errorHandler?errorText:null,callback.arguments])}throw new Error("Cannot send files of "+totalSize+" bytes. The max size is "+AmetysFront.MAX_UPLOAD_SIZE+" bytes.");}}$j.ajax({url:AmetysFront.ServerComm.SERVERCOMM_URL,dataType:"xml",data:data,contentType:false,processData:false,method:"POST",type:"POST",success:function(response,status,xhr){var responseElement=response.documentElement;var responseCode=responseElement?responseElement.getAttribute("code"):null,isBadResponse=!responseCode|| 32responseCode!="200";var callback=options.callback;if(responseElement&&responseElement.tagName=="NotConnected"){if(AmetysFront.Event){AmetysFront.Event.fire("loaderFail",{title:"{i18n plugin.cms:PLUGINS_CMS_FRONT_SERVERCOMM_ERROR_FATAL_SESSION_TITLE}}",text:"{i18n plugin.cms:PLUGINS_CMS_FRONT_SERVERCOMM_ERROR_FATAL_SESSION_DESCRIPTION}}",details:null,fatal:"session"});return}}else if(isBadResponse){if(callback)(callback.errorHandler||callback.handler).apply(callback.scope,[callback.errorHandler?$j("\x3e message", 33responseElement).text():null,callback.arguments]);else if(AmetysFront.Event)AmetysFront.Event.fire("loaderFail",{title:null,text:null,details:null});return}var responseData=responseElement;if(options.responseType=="json")responseData=JSON.parse(responseElement.textContent);if(callback)callback.handler.apply(callback.scope,[responseData,callback.arguments])},error:function(xhr,status,error){window.console.error("Exception in AmetysFront.ServerComm "+error);if(AmetysFront.Event)if(xhr.status==503)AmetysFront.Event.fire("loaderFail", 34{title:"Le serveur est en maintenance",text:"Une opération de maintenance est en cours sur le serveur. Vous pouvez essayer de recharger la page.",details:null,fatal:"maintenance"});else AmetysFront.Event.fire("loaderFail",{title:"La connexion avec le serveur a été perdue",text:"Cela peut provenir d'un problème de votre connexion au réseau ou d'une opération de maintenance sur le serveur",details:null,fatal:"server"});var callback=options.callback;if(callback)(callback.errorHandler||callback.handler).apply(callback.scope, 35[null,callback.arguments])}})}};} catch (e) { console.error("/plugins/cms/resources/js/AmetysFront/ServerComm.fr.js\n", e) } 36/** File : /plugins/cms/resources/js/AmetysFront/Accessibility.js */ 37document_currentScript = (function() { a = document.createElement('script'); a.src='/plugins/cms/resources/js/AmetysFront/Accessibility.js'; return a; })(); try { 38AmetysFront.Accessibility={_FOCUSABLE_ELEMENTS_SELECTOR:'a[href]:not([disabled]), summary, button:not([disabled]), textarea:not([disabled]), input[type\x3d"text"]:not([disabled]), input[type\x3d"radio"]:not([disabled]), input[type\x3d"checkbox"]:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex\x3d"-1"]), iframe:not([disabled])',_KEYCODE_TAB:9,_firstFocusableEl:null,_lastFocusableEl:null,_handleTabKeyPress:function(event){var isTabPressed=event.key==="Tab"||event.keyCode===AmetysFront.Accessibility._KEYCODE_TAB; 39if(!isTabPressed)return;if(event.shiftKey&&document.activeElement===AmetysFront.Accessibility._firstFocusableEl){event.preventDefault();
39AmetysFront.Accessibility._lastFocusableEl.focus()}else if(!event.shiftKey&&document.activeElement===AmetysFront.Accessibility._lastFocusableEl){event.preventDefault();AmetysFront.Accessibility._firstFocusableEl.focus()}},trapFocus:function(modalEl,focusFirstElmt){AmetysFront.Accessibility.untrapFocus(modalEl);var focusableEls=modalEl.querySelectorAll(AmetysFront.Accessibility._FOCUSABLE_ELEMENTS_SELECTOR); 40var $focusableEls=$j(focusableEls).filter(":visible").filter(function(i,elmt){let $elmt=$j(elmt);return $elmt.css("visibility")!="hidden"&&($elmt.closest("[role\x3d'dialog']").length===0||$elmt.closest("[role\x3d'dialog']").get(0)==modalEl)});if($focusableEls.length){AmetysFront.Accessibility._firstFocusableEl=$focusableEls.get(0);AmetysFront.Accessibility._lastFocusableEl=$focusableEls.get($focusableEls.length-1);if(focusFirstElmt)$j(AmetysFront.Accessibility._firstFocusableEl).trigger("focus"); 41modalEl.addEventListener("keydown",AmetysFront.Accessibility._handleTabKeyPress)}},untrapFocus:function(modalEl){modalEl.removeEventListener("keydown",AmetysFront.Accessibility._handleTabKeyPress);AmetysFront.Accessibility._firstFocusableEl=null;AmetysFront.Accessibility._lastFocusableEl=null}};} catch (e) { console.error("/plugins/cms/resources/js/AmetysFront/Accessibility.js\n", e) } 42 43//# sourceMappingURL=MTY0ODY5NjQ5.js.map
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.