/*! * @title Web Experience Toolkit (WET) / Boîte à outils de l'expérience Web (BOEW) * @license wet-boew.github.io/wet-boew/License-en.html / wet-boew.github.io/wet-boew/Licence-fr.html * v13.1.0 - 2023-05-09 * */ !function(t,r,a){"use strict";function n(e){if(!e.content){for(var e=e,t=e.childNodes,a=r.createDocumentFragment();t[0];)a.appendChild(t[0]);e.content=a}}var i="wb-template",o="template",e=a.doc;a.tmplPolyfill=n,e.on("timerpoke.wb wb-init.wb-template",o,function(e){e=a.init(e,i,o);e&&(n(e),a.ready(t(e),i))}),a.add(o)}(jQuery,document,wb),function(i,a){"use strict";var r,n,o,s,l,e=a.doc,c="gc-subway",d=".provisional."+c,u=c+"-section",p=c+"-index";e.on("timerpoke.wb wb-init .provisional.gc-subway",d,function(e){var t=a.init(e,c,d);t&&e.currentTarget===e.target&&(e=i(t),r=t.hasAttribute("data-sections-title")?t.getAttribute("data-sections-title"):"Sections",t.querySelector("h1")?((n=i("h1",e))&&(n.id=n.id||a.getId(),a.addSkipLink(a.i18n("skip-prefix")+" "+n.text(),{href:"#"+n.id})),e.nextUntil(".pagedetails, .gc-subway-support").wrapAll("
"),e.wrap("
"),(o=i("."+u+" h1")).wrap("
"),n.wrap("
"),i("

"+n.text()+"

").insertBefore(o),i("").insertAfter(n),e.find("a.active").attr({tabindex:"0","aria-current":"page"}),l=i(d+" a, ."+u+" .gc-subway-pagination a, main .pager a"),(s=i(".gc-subway-support"))&&(s.clone().addClass("hidden-xs hidden-sm").insertAfter("."+c),s.addClass("hidden-md hidden-lg")),l.each(function(e,t){let a=i(t),r=a.attr("href"),n;r&&(n=r.includes("#")?r:r+="#wb-cont"),a.clone().addClass("hidden-md hidden-lg").attr("href",n).insertAfter(t),a.addClass("hidden-xs hidden-sm")}),t.classList.add("no-blink")):t.classList.contains(p)||t.classList.add(p),a.ready(e,c))}),a.add(d)}(jQuery,(window,wb)),function(g,f,m){"use strict";function d(e,t,a){for(var r,n,i=a[t];r=i.shift();)(n=r.action)&&(e.trigger(n+"."+h,r),delete r.action)}var e=f.doc,u="wb-actionmng",o="."+u,t="[data-"+u+"]",b=u+"Rn",h=u+o,p={},v={},w={},a=["mapfilter","tocsv","loadJSON","patch","ajax","addClass","removeClass","tblfilter","withInput","run"].join("."+h+" ")+"."+h,y={op:"move",path:"{base}",from:"{base}/{qval}"},x=function(e,t,a){t[e]||(t[e]=[]),t[e].push(a)},k=function(e,t,a,r){for(var n,i,o,s,l,c=(a=g.isArray(a)?g.extend([],a):[a]).length,d=0;d!==c;d+=1)if(i=(n=a[d]).action){if(o=n.match,l=n.default,s=!1,o&&!l)throw"'match' and 'default' property need to be set";if(l&&t.length&&"string"==typeof o)try{s=(s=new RegExp(o).exec(t))||l}catch(e){}else s||!l||t||(s=l);switch(!n.qval&&s&&(n.qval=s),i){case"patch":var u=n.patches,p=n.base||"/";u||(u=[y],n.cumulative=!0),g.isArray(u)||(u=[u]),u=C(u,n.qval,p),n.patches=u;break;case"ajax":n.trigger&&r&&(n.trigger=!1),n.url=S(n.url,n.qval);break;case"tblfilter":n.value=S(n.value,n.qval)}x(e,v,n)}},C=function(e,t,a){var r,n,i,o=e.length,s=[];for(a=a||"/",r=0;r!==o;r+=1)n=e[r],i=g.extend({},n),n.path&&(i.path=S(n.path,t,a)),n.from&&(i.from=S(n.from,t,a)),n.value&&(i.value=S(n.value,t,a)),s.push(i);return s},S=function(e,t,a){return t?a?e.replace(/\{qval\}/,t).replace(/\{base\}/,a):e.replace(/\{qval\}/,t):e};e.on("do."+h,function(e){var t,a,r,n,i,o,s=e.element||e.target,l=s.id,c=e.actions||[];if((s===e.target||e.currentTarget===e.target)&&-1===s.className.indexOf(u)){for((r=(c=!g.isArray(c)?[c]:c).length)&&(t=g(s)).addClass(u),l&&p[l]&&d(t,l,p),a=0;a!==r;a+=1)(i=(n=c[a]).action)&&((o=n.target)?(n.trgbefore?x(o,p,n):x(o,v,n),(o=n.trggroup)&&x(o,w,n)):t.trigger(i+"."+h,n));l&&v[l]&&d(t,l,v),g(e.target).removeClass(u)}}),e.on("clean."+h,function(e){var t,a,r=e.element||e.target,n=e.trggroup;if((r===e.target||e.currentTarget===e.target)&&n&&w[n])for(t=w[n];a=t.shift();)delete a.action}),e.on(a,o,function(e,t){var a,r,n,i,o,s,l,c,d,u,p=e.type;if(h===e.namespace)switch(p){case"run":!function(e,t){var a,r,n,i,e=e.target,o=g(e),s=w[t.trggroup];if(s&&!o.hasClass(b)){for(o.addClass(b),r=s.length,a=0;a!==r;a+=1)(i=(n=s[a]).action)&&o.trigger(i+"."+h,n);o.removeClass(b)}}(e,t);break;case"tblfilter":!function(e,t){var a=e.target,r=g(t.source||a),n=t.column,i=parseInt(n,10),o=!!t.regex,e=!t.smart||!!t.smart,a=!t.caseinsen||!!t.caseinsen;if("TABLE"!==r.get(0).nodeName)throw"Table filtering can only applied on table";r=r.dataTable({retrieve:!0}).api(),(n?r.column(n=!0===i?i:n):r).search(t.value,o,e,a).draw()}(e,t);break;case"addClass":!function(e,t){e=g(t.source||e.target);t.class&&e.addClass(t.class)}(e,t);break;case"removeClass":!function(e,t){e=g(t.source||e.target);t.class&&e.removeClass(t.class)}(e,t);break;case"ajax":l=e,(c=t).container?d=g(c.container):(u=f.getId(),d=g("
"),g(l.target).after(d)),c.trigger&&d.attr("data-trigger-wet","true"),l=c.type||"replace",d.attr("data-ajax-"+l,c.url),d.one("wb-contentupdated",function(e,t){var a=e.currentTarget,e=a.getAttribute("data-trigger-wet");a.removeAttribute("data-ajax-"+t["ajax-type"]),e&&(g(a).find(f.allSelectors).addClass("wb-init").filter(":not(#"+a.id+" .wb-init .wb-init)").trigger("timerpoke.wb"),a.removeAttribute("data-trigger-wet"))}),d.trigger("wb-update.wb-data-ajax");break;case"patch":c=(o=t).source,d=o.patches,s=!!o.cumulative,d&&(g.isArray(d)||(d=[d]),g(c).trigger({type:"patches.wb-jsonmanager",patches:d,fpath:o.fpath,filter:o.filter||[],filternot:o.filternot||[],cumulative:s}));break;case"mapfilter":o=e,s=g((i=t).source||o.target).get(0).geomap,o=i.filter,i=i.value,"aoi"===o&&s.zoomAOI(i),"layer"===o&&s.showLayer(i,!0);break;case"tocsv":!function(e,t){var a,r,n,i,o,s=g(e),e=s.get(0),l=e.classList.contains("wb-tables"),c="",t=t||(e.caption||"table")+".csv",d=e.rows,u=d.length,p=d[0].cells.length;if(l){for(u=(n=s.dataTable({retrieve:!0}).api()).rows()[0].length,r=0;r reply and continue","chtwzrd-reset":"Restart from the beginning","chtwzrd-toggle":"Switch to wizard","chtwzrd-notification":"Close chat notification","chtwzrd-open":"Open chat wizard","chtwzrd-minimize":"Minimize chat wizard","chtwzrd-history":"Conversation history","chtwzrd-reply":"Reply","chtwzrd-controls":"Controls","chtwzrd-toggle-basic":"Switch to basic form","chtwzrd-waiting":"Waiting for message","chtwzrd-answer":"You have answered:"},fr:{"chtwzrd-send":"Envoyer la réponse et continuer","chtwzrd-reset":"Recommencer depuis le début","chtwzrd-toggle":"Basculer vers l'assistant","chtwzrd-notification":"Fermer la notification de discussion","chtwzrd-open":"Ouvrir l'assistant de discussion","chtwzrd-minimize":"Réduire l'assistant de discussion","chtwzrd-history":"Historique de discussion","chtwzrd-reply":"Répondre","chtwzrd-controls":"Contrôles","chtwzrd-toggle-basic":"Basculer vers le formulaire","chtwzrd-waiting":"En attente d'un message","chtwzrd-answer":"Vous avez répondu :"}},t=function(t){var e;t.data(x+"-src")?(e=t.data(x+"-src"),p.getJSON(e,function(e){c(t,S=e),i(t)})):(S=l(t),i(t))},i=function(e){b=localStorage.getItem("wb-chtwzrd-notif"),e.removeClass("hidden wb-inv").addClass(x+"-basic"),g=!(E={shortDelay:500,mediumDelay:750,longDelay:1250,xLongDelay:2e3,xxLongDelay:2500}),v=S.header.first,w=S.header.instructions||"",h=S.header.defaultDestination,y=S.questions[v],f=S.header.formType||"dynamic",m=!!S.header.inline,A={send:(A=A[p("html").attr("lang")||"en"])["chtwzrd-send"],reset:A["chtwzrd-reset"],toggle:A["chtwzrd-toggle"],notification:A["chtwzrd-notification"],trigger:A["chtwzrd-open"],minimize:A["chtwzrd-minimize"],conversation:A["chtwzrd-history"],reply:A["chtwzrd-reply"],controls:A["chtwzrd-controls"],toggleBasic:A["chtwzrd-toggle-basic"],waiting:A["chtwzrd-waiting"],answer:A["chtwzrd-answer"]},j(e,S.header.title);var t,a=p(k+"-basic"),r=p(k+"-bubble-wrap"),n=p(k+"-btn"),i=p(k+"-container"),o=p(".body",i),s=p(".history",i),l=p(".minimize",i),c=p(".reset",i),e=p(".basic-link",i),d=c,u=e;z(a),q(r),T(n),e.on("click",function(e){e.preventDefault();var t=p("legend:first",a);t.attr("tabindex","0"),s.attr("aria-live",""),N(a,"form"),i.stop().hide(),a.stop().show(function(){t.focus(),t.removeAttr("tabindex")}),p("body").removeClass(x+"-noscroll")}),p(k+"-link").on("click",function(e){e.preventDefault(),a.stop().hide(),t=p(":focus"),p(this).hasClass(x+"-bubble")||N(i,"wizard"),p(".bubble",r).removeClass("trans-pulse"),p("p",r).hide().removeClass("trans-left"),i.stop().show(),r.stop().hide(),n.prop("disabled",!0),m||p("body").addClass(x+"-noscroll"),s.length&&p(".conversation",i).scrollTop(s[0].scrollHeight),g||I(o),localStorage.setItem("wb-chtwzrd-notif",1)}),p(k+"-btn").on("click",function(e){e.preventDefault(),n.prop("disabled",!0),a.stop().hide(),t=p(":focus"),N(i,"wizard"),i.stop().show(),r.stop().hide(),i.find(":focusable").first().focus(),m||p("body").addClass(x+"-noscroll"),s.length&&p(".conversation",i).scrollTop(s[0].scrollHeight),g||I(o)}),m?p(k+"-link").click():i.on("keydown",function(e){9===e.keyCode&&(e.shiftKey?d.is(":focus")&&(e.preventDefault(),u.focus()):u.is(":focus")&&(e.preventDefault(),d.focus())),27===e.keyCode&&l.click()}),C.on("click",k+"-container .btn-send",function(e){"submit"!==p(this).attr("type")&&(e.preventDefault(),(e=p("input:checked",o)).length||(e=p("input:first",o)).attr("checked",!0),D(o,L(e),!1))}),c.on("click",function(e){e.preventDefault(),N(p(k+"-container"),"wizard")}),l.on("click",function(e){e.preventDefault(),i.stop().hide(),n.prop("disabled",!1),r.stop().show(),p("body").removeClass(x+"-noscroll"),t.focus()})},z=function(e){var r=p("form",e),t=p("fieldset",e),a=t.first();"dynamic"===f&&(a.addClass(x+"-first-q"),t.not(k+"-first-q").hide()),e.hide(),p("input",r).prop("checked",!1),r.append(""),p("input",r).on("change",function(){var e,t=L(p(this)),a=p("#"+t.qNext,r);"dynamic"===f&&(e=p(this).closest("fieldset"),!a.is(":hidden")&&e.next().attr("id")===a.attr("id")&&"none"!==t.qNext||e.nextAll("fieldset").hide().find("input").prop("checked",!1),"none"!==t.qNext&&p("#"+t.qNext).show(),""!==t.url&&r.attr("action",t.url))})},q=function(t){var e,a=p("#wb-info"),r=p(k+"-link",t);S.header.avatar&&r.css("background-image","url("+S.header.avatar+")"),t.fadeIn("slow"),a.addClass(x+"-mrgn"),a.length&&((e=function(e){p(n).scrollTop()>=p(document).outerHeight()-p(n).outerHeight()-a.outerHeight()?e.css({bottom:a.outerHeight()-(p(document).outerHeight()-p(n).outerHeight()-p(n).scrollTop())+30}):e.css({bottom:30})})(t),p(n).on("resize scroll",function(){e(t)})),p(".notif",t).on("click",function(){r.click()}),p(".notif-close",t).on("click",function(e){e.preventDefault(),p(this).parent().hide(),t.focus(),localStorage.setItem("wb-chtwzrd-notif",1)})},T=function(e){e.attr("aria-controls",x+"-container")},l=function(e){var t=p("form",e),a=p("h2",e).first(),r=p("p:not("+k+"-greetings):not("+k+"-farewell)",t).first(),n="btn-former-send",i={},l={},o=p("fieldset",e);return e.data(x),(i=e.data(x)?e.data(x):{}).inline=e.hasClass("wb-chtwzrd-inline"),i.avatar=e.data(x+"-avatar"),i.defaultDestination=t.attr("action"),i.name=t.attr("name"),i.method=t.attr("method"),i.form={},i.form.title=a.html(),i.title=O(a,i.form.title),i.greetings=p("p"+k+"-greetings",t).html(),i.farewell=p("p"+k+"-farewell",t).html(),i.form.sendButton=p("input[type=submit]",t).length?p("input[type=submit]",t).addClass(n).val():p("button[type=submit]",t).addClass(n).html(),i.sendButton=O(p("."+n,t),i.form.sendButton),r.length&&(i.form.instructions=r.html(),i.instructions=O(r,i.form.instructions)),i.first=i.first||o.first().attr("id"),o.each(function(){var e=p(this),t=p("legend",e),a=p("label",e),r=this.id,n=p("input[type=radio]",e).length?"radio":"checkbox",o=[],s="",e={};a.each(function(e){var t=p("input",p(this)),a={},r=t.attr("name"),n=t.data(x+"-url"),i=t.siblings("span:not(.no-"+x+")").html();e||(s=r),a.content=i,a.value=t.val(),a.next=t.data(x+"-next"),n&&(a.url=n),o.push(a)}),e.name=s,e.input=n,e.formLabel=t.html(),e.label=O(t,e.formLabel),e.choices=o,l[r]=e}),{header:i,questions:l}},j=function(e,t){e.after("
"+A.trigger+""+(b?"":"

"+t+" ×

")+"
"),e.next(k+"-bubble-wrap").after("");e=p(k+"-container");e.append(""),e.append("");e=p(".body",e);e.append("

"+A.conversation+"

"+A.reply+"

"),e.append("

"+A.controls+"

"),e.attr("name",S.header.name+"-chat"),e.attr("method",S.header.method),r=p(".btn-send ",e).html()},c=function(e,t){e.html("");var a="

"+t.header.title+"

",r="

"+t.header.instructions+"

",n=">"+t.header.sendButton+"";t.header.form.title,a="

"+t.header.form.title+"

",e.append(a+"
");var i=p("form",e);t.header.form.instructions,r="

"+t.header.form.instructions+"

",i.append("

"+t.header.greetings+"

"+r),p.each(t.questions,function(e,a){var r=o.getId(),t=""+a.label+"";a.formLabel,a.formLabel&&(t=""+a.formLabel+""),i.append("
"+t+"
    ");var n=p("."+r,i);p.each(a.choices,function(e,t){r=o.getId(),p("ul",n).append("
  • ")}l.prop("disabled",!1);var a=s[0].scrollHeight,r=p(".reply",n);r.length&&r.outerHeight()+c.outerHeight()>s.innerHeight()&&(a=i[0].scrollHeight-c.outerHeight()-42),s.scrollTop(a)},E.mediumDelay)),s.scrollTop(s[0].scrollHeight)},e)},D=function(e,t){var a=o.getId(),r=p(".history",e);r.append("

    "+A.answer+" "+t.value+"

    "),p(".form-params",e).append(""),g=!1,""!==t.url&&(h=t.url);var t=t.qNext,n=p("#"+a,r);y="none"===t?"last":S.questions[t],p(".btn-send",e).prop("disabled",!0),n.attr("tabindex","0"),d=setTimeout(function(){p(".inputs-zone",e).remove("fieldset"),n.focus(),n.removeAttr("tabindex"),I(e)},E.shortDelay)},u=function(e){e.html("")},O=function(e,t){e=e.data(s);return e||t},L=function(e){var t=e.data(x+"-next"),a=e.data(x+"-url");return{qNext:t,name:e.attr("name"),val:e.val(),url:a||"",value:e.next().html()}};C.on("timerpoke.wb wb-init.wb-chtwzrd",k+".provisional",function(e){e=o.init(e,x,k);e&&(e=p(e),t(e),o.ready(e,x))}),o.add(k)}(jQuery,window,wb),function(r,n){"use strict";var i="wb-doaction",o="a[data-"+i+"],button[data-"+i+"]",s="do.wb-actionmng",l=n.doc;l.on("click",o,function(e){var t=e.target,a=r(t);if("BUTTON"===(t=e.currentTarget!==e.target?(a=a.parentsUntil("main",o))[0]:t).nodeName||"A"===t.nodeName)return t.id||(t.id=n.getId()),n.isReady?a.trigger({type:s,actions:n.getData(a,i)}):l.one("wb-ready.wb",function(){a.trigger({type:s,actions:n.getData(a,i)})}),!1})}(jQuery,(window,wb)),function(q,z,T){"use strict";function A(e,t){var a=t.$selElm,r=t.name,n=t.value;r&&t.provEvt.setAttribute("name",r),"string"==typeof n&&a.val(n),a.attr("data-"+i,i)}function j(e,t){var a=q(t.origin),e=q(e.target).data(G),r=t.toggle,r=q.extend({},r=r&&"string"==typeof r?{selector:r}:r,e.toggle);a.addClass("wb-toggle"),a.trigger("toggle.wb-toggle",r),r.type="off",a.one(J,function(){a.addClass("wb-toggle"),a.trigger("toggle.wb-toggle",r),a.removeClass("wb-toggle")})}function N(e,t){var a,r,n,i,o,s,l,c=t.outputctnrid,d=t.actions,u=t.lblselector,p=!!t.required,g=!t.noreqlabel,f=t.items,m=e.target,b=q(m),h=t.source,v=b.data(G).i18n,w=t.attributes,y=T.getId(),x="",k="
    "),E&&h.addClass("form-inline"),A&&h.addClass("gc-chckbxrdio"),p&&g&&(x+=" class='required'",e+=" ("+v.required+")"),x+=">",e+="",u?(a=q("
    "+t.label+"
    ").find(u),h.append(x+a.html()+e).append(a.nextAll()),a=a.prevAll()):h.append(q(x+t.label+e)),A&&!E&&(l="closed"),r=0,n=f.length;r!==n;r+=1)if((s=f[r]).group)for("open"===l&&(C+="",l="closed"),C+="

    "+s.label+"

    ","closed"===l&&(C+="
      ",l="open"),o=s.group.length,i=0;i!==o;i+=1)C+=re(s.group[i],z,S,E,A,p);else 0===r&&"closed"===l&&(C+="
        ",l="open"),C+=re(s,z,S,E,A,p);"open"===l&&(C+="
      "),h.append(C),q("#"+c).append(h),a&&h.before(a),d&&0 elements in your list.";for(g=[],"A"===c.nodeName&&(n=c.getAttribute("href"),r=q(c).html(),s=1,g.push({action:"redir",url:n})),o=1;o!==s;o+=1){if(d=l[o],(u=q(d)).hasClass(O)){p=d.id||T.getId(),d.id=p,n=D+"-"+p,g.push({action:"append",srctype:D,source:"#"+p});break}if("UL"===d.nodeName){if(t)throw"Recursive error, please check your code";i=te(u.children(),!0)}u.hasClass(H)&&(r=u.html())}r=r||c.nodeValue,a.id||(a.id=T.getId()),b.push({bind:a.id,label:r,actions:g,group:i})}return b},ae=function(e){var t=e.label,a=""},c=function(e){var t="",a={};return a.bind=e.bind||"",a.actions=e.actions||[],t+=" data-"+D+"='"+JSON.stringify(a)+"'"},re=function(e,t,a,r,n,i){var o=T.getId(),s=e.label,l="