PageSourceSearch

https://www.caminteresse.fr/front/site/scripts/8674.1118c8fdcfd2e5f225fd.js

js caminteresse.fr collected 2026-09-24 08:46:07 UTC 39,141 bytes, 18 lines download raw bytes

1(self.webpackChunkone_website=self.webpackChunkone_website||[]).push([[8674],{2241(e,t,n){"use strict";function i(e,t,n,i,o,r,a){try{var s=e[r](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(i,o)}function o(e){return function(){var t=this,n=arguments;return new Promise(function(o,r){var a=e.apply(t,n);function s(e){i(a,o,r,s,c,"next",e)}function c(e){i(a,o,r,s,c,"throw",e)}s(void 0)})}}n.d(t,{A:()=>M});var r=n(4705);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach(function(t){(0,r.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var c={661(e){var t={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"Login"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NamedType",name:{kind:"Name",value:"LoginInput"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"login"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"user"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"publicId"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"signupService"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isSignup"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:136}};function n(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var i=e.type;"NamedType"===i.kind&&t.add(i.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){n(e,t)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){n(e,t)}),e.definitions&&e.definitions.forEach(function(e){n(e,t)})}t.loc.source={body:"mutation Login($data: LoginInput) {\n\tlogin(data: $data) {\n\t\tuser {\n\t\t\tid\n\t\t\temail\n\t\t\tpublicId\n\t\t}\n\t\turl\n\t\tsignupService\n\t\tisSignup\n\t}\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var i={};function o(e,t){for(var n=0;n<e.definitions.length;n++){var i=e.definitions[n];if(i.name&&i.name.value==t)return i}}t.definitions.forEach(function(e){if(e.name){var t=new Set;n(e,t),i[e.name.value]=t}}),e.exports=t,e.exports.Login=function(e,t){var n={kind:e.kind,definitions:[o(e,t)]};e.hasOwnProperty("loc")&&(n.loc=e.loc);var r=i[t]||new Set,a=new Set,s=new Set;for(r.forEach(function(e){s.add(e)});s.size>0;){var c=s;s=new Set,c.forEach(function(e){a.has(e)||(a.add(e),(i[e]||new Set).forEach(function(e){s.add(e)}))})}return a.forEach(function(t){var i=o(e,t);i&&n.definitions.push(i)}),n}(t,"Login")},737(e){var t={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"sendLoginLink"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"SendLoginLinkInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sendLoginLink"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:97}};function n(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);
1else if("VariableDefinition"===e.kind){var i=e.type;"NamedType"===i.kind&&t.add(i.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){n(e,t)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){n(e,t)}),e.definitions&&e.definitions.forEach(function(e){n(e,t)})}t.loc.source={body:"mutation sendLoginLink($data: SendLoginLinkInput!) {\n\tsendLoginLink(data: $data) {\n\t\tstatus\n\t}\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var i={};function o(e,t){for(var n=0;n<e.definitions.length;n++){var i=e.definitions[n];if(i.name&&i.name.value==t)return i}}t.definitions.forEach(function(e){if(e.name){var t=new Set;n(e,t),i[e.name.value]=t}}),e.exports=t,e.exports.sendLoginLink=function(e,t){var n={kind:e.kind,definitions:[o(e,t)]};e.hasOwnProperty("loc")&&(n.loc=e.loc);var r=i[t]||new Set,a=new Set,s=new Set;for(r.forEach(function(e){s.add(e)});s.size>0;){var c=s;s=new Set,c.forEach(function(e){a.has(e)||(a.add(e),(i[e]||new Set).forEach(function(e){s.add(e)}))})}return a.forEach(function(t){var i=o(e,t);i&&n.definitions.push(i)}),n}(t,"sendLoginLink")},556(e){var t={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"ResetPassword"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ResetPasswordInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"resetPassword"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:97}};function n(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var i=e.type;"NamedType"===i.kind&&t.add(i.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){n(e,t)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){n(e,t)}),e.definitions&&e.definitions.forEach(function(e){n(e,t)})}t.loc.source={body:"mutation ResetPassword($data: ResetPasswordInput!) {\n\tresetPassword(data: $data) {\n\t\tstatus\n\t}\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var i={};function o(e,t){for(var n=0;n<e.definitions.length;n++){var i=e.definitions[n];if(i.name&&i.name.value==t)return i}}t.definitions.forEach(function(e){if(e.name){var t=new Set;n(e,t),i[e.name.value]=t}}),e.exports=t,e.exports.ResetPassword=function(e,t){var n={kind:e.kind,definitions:[o(e,t)]};e.hasOwnProperty("loc")&&(n.loc=e.loc);var r=i[t]||new Set,a=new Set,s=new Set;for(r.forEach(function(e){s.add(e)});s.size>0;){var c=s;s=new Set,c.forEach(function(e){a.has(e)||(a.add(e),(i[e]||new Set).forEach(function(e){s.add(e)}))})}return a.forEach(function(t){var i=o(e,t);i&&n.definitions.push(i)}),n}(t,"ResetPassword")},760(e){var t={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"Signup"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"SignupInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"signup"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isSignup"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"signupService"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"user"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"publicId"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:140}};function n(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);
1else if("VariableDefinition"===e.kind){var i=e.type;"NamedType"===i.kind&&t.add(i.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){n(e,t)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){n(e,t)}),e.definitions&&e.definitions.forEach(function(e){n(e,t)})}t.loc.source={body:"mutation Signup($data: SignupInput!) {\n\tsignup(data: $data) {\n\t\tisSignup\n\t\tsignupService\n\t\turl\n\t\tuser {\n\t\t\tid\n\t\t\temail\n\t\t\tpublicId\n\t\t}\n\t}\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var i={};function o(e,t){for(var n=0;n<e.definitions.length;n++){var i=e.definitions[n];if(i.name&&i.name.value==t)return i}}t.definitions.forEach(function(e){if(e.name){var t=new Set;n(e,t),i[e.name.value]=t}}),e.exports=t,e.exports.Signup=function(e,t){var n={kind:e.kind,definitions:[o(e,t)]};e.hasOwnProperty("loc")&&(n.loc=e.loc);var r=i[t]||new Set,a=new Set,s=new Set;for(r.forEach(function(e){s.add(e)});s.size>0;){var c=s;s=new Set,c.forEach(function(e){a.has(e)||(a.add(e),(i[e]||new Set).forEach(function(e){s.add(e)}))})}return a.forEach(function(t){var i=o(e,t);i&&n.definitions.push(i)}),n}(t,"Signup")}},u={};function d(e){var t=u[e];if(void 0!==t)return t.exports;var n=u[e]={exports:{}};return c[e](n,n.exports,d),n.exports}d.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return d.d(t,{a:t}),t},d.d=(e,t)=>{for(var n in t)d.o(t,n)&&!d.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},d.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var p=d(661),l=d.n(p),m=d(737),h=d.n(m),v=d(556),f=d.n(v),g=d(760),w=d.n(g),y=["inc-nl","inc-order","inc-urv","inc-bmk","inc-redac","inc-alert","inc-mag","redirectTo","autoRedirect","utm_source","utm_campaign","utm_content","_sp_targeting_params"];function b(e){var{apiUrl:t,signupService:n,domainPrefix:i,isSignup:o,queryVars:r,brandsToConnect:a,methodType:s}=e,c=t;if(a&&"string"==typeof a&&a.length>0&&(c=function(e,t){return e.replace(/brands=(.*?)(&|$)/,"brands=".concat(encodeURIComponent(t.toUpperCase()),"$2"))}(c,a)),null!=r&&r.noDispatcher){var u=r.redirectTo?r.redirectTo:window.location.href,d=o?"signup":"login";return"".concat(c,"&signupservice=").concat(n,"&callbackUrl=").concat(u.startsWith("http://")||u.startsWith("https://")?encodeURIComponent(u+(u.includes("?")?"&pmc-action=".concat(d,"_").concat(s):"?pmc-action=".concat(d,"_").concat(s))):u)}return"".concat(c,"&signupservice=").concat(n,"&callbackUrl=").concat(encodeURIComponent("".concat(i,"/dispatcher?signupservice=").concat(n).concat(o?"&signup=".concat(o):"").concat(k(r))))}function S(e){var{queryVars:t,pmcDomain:n}=e;return"".concat(n,"/reset-password?token=__TOKEN__&callbackUrl=").concat(encodeURIComponent("".concat(n,"/dispatcher?").concat(k(t))))}function k(){var e="",t=s({},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{});return window.location.hostname.includes("boutique")&&window.sessionStorage.getItem("sourcepoint_consentRejected")&&(t._sp_targeting_params="paymenttunnel:true"),t.redirectTo=t.redirectTo?t.redirectTo:window.location.href,Object.entries(t).forEach(t=>{var[n,i]=t;y.includes(n)&&("redirectTo"===n&&"string"==typeof i&&(i.startsWith("http://")||i.startsWith("https://"))?e+="&".concat(n,"=").concat(encodeURIComponent(i)):e+="&".concat(n,"=").concat(i))}),e}function E(){if(!(arguments.length>0&&void 0!==arguments[0]?arguments[0]:document).querySelector("#pmc-insite-cgu-validation"))throw new Error('No cgu currently displayed. Use PMCInsite method "addLegalBlock()" to insert cgu component')}function _(e){var t=e;return t&&"object"==typeof t&&Array.isArray(t.errors)&&t.errors.length>0?function(e){if(!Array.isArray(e)||0===e.length)return"Erreur inconnue";var t=e[0];if(null==t)return"Erreur inconnue";if("object"!=typeof t)return String(t);var n=t,i=n.cause;if(null!=(null==i?void 0:i.description)&&"string"==typeof i.description)return i.description;var o=n.extensions;return null!=(null==o?void 0:o.description)&&"string"==typeof o.description?o.description:"string"==typeof n.message&&n.message?n.message:"Erreur inconnue"}(t.errors):e instanceof Error&&e.message?e.message:"string"==typeof(null==t?void 0:t.message)?t.message:String(null!=e?e:"Erreur inconnue")}function C(e){return R.apply(this,arguments)}function R(){return R=o(function*(e){var{pmc:t,provider:n,token:i,signupService:o,queryVars:r,brandsToConnect:a,onConnectionSuccess:s}=e;if(!t.gqlClient)throw new Error("GQL client not found");if(!t.pmcDomain)throw new Error("PMC domain is not set");var c=yield t.gqlClient.mutate({mutation:l(),variables:{data:{signupService:o,strategy:n.toUpperCase(),tokens:[i]}}}),u=b({domainPrefix:t.pmcDomain,apiUrl:c.data.login.url,signupService:c.data.login.signupService,isSignup:c.data.login.isSignup,queryVars:r,brandsToConnect:a,methodType:"socialNetwork"}),d=o.split("_");if(window.dataLayer.push({event:c.data.login.isSignup?"sign_up":"login",method:n,login_role:"ADMIN",signup_service:o,signup_service_part_
11:d[0],signup_service_part_2:d[1],signup_service_part_3:d[2],signup_service_part_4:d[3]}),D(n,"SUCCESS"),s&&"function"==typeof s){var p={id:c.data.login.user.id,publicId:c.data.login.user.publicId};yield s(p)}window.location.assign(u)}),R.apply(this,arguments)}function P(e,t){var n,{buttonId:i,signupService:r,queryVars:a,brandsToConnect:s,onConnectionSuccess:c,root:u=document}=t,d={clientId:"",scope:"",redirectURI:"",usePopup:!1};if(!i)throw new Error("Your button ID must be provided");if(null===(n=e.config.externalApis)||void 0===n||!n.apple)throw new Error("This brand does not have an Apple App ID, button will not work");d.clientId=e.config.externalApis.apple,d.scope="name email",d.redirectURI="https://".concat(document.location.host),d.usePopup=!0,E(u);var p=()=>{try{AppleID.auth.init(d);var t=u.querySelector("#".concat(i));t&&(t.disabled=!1,document.dispatchEvent(new Event("PMC::INSITE::ENABLED::APPLE")),t.addEventListener("click",()=>{var t;(t=o(function*(e,t){var{queryVars:n,signupService:i,brandsToConnect:o,onConnectionSuccess:r}=t;try{var a=(yield AppleID.auth.signIn()).authorization.id_token;D("apple","LOGINSTART"),C({pmc:e,signupService:i,provider:"apple",token:a,queryVars:n,brandsToConnect:o,onConnectionSuccess:r})}catch(e){var s=e;null!=s&&s.error&&"popup_closed_by_user"===s.error?D("apple","CANCELLED"):D("apple","ERROR")}}),function(e,n){return t.apply(this,arguments)})(e,{signupService:r,queryVars:a,brandsToConnect:s,onConnectionSuccess:c})}))}catch(e){D("apple","popup_closed_by_user"===e?"CANCELLED":"ERROR")}},l=document.getElementById("apple-sign-in");if(l&&"SCRIPT"===l.nodeName)p();else{var m,h=document.getElementsByTagName("script")[0],v=document.createElement("script");
1v.id="apple-sign-in",v.src="https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js",null!==(m=h.parentNode)&&void 0!==m&&m.insertBefore(v,h),v.onload=p,v.onerror=()=>{L("apple")}}}function N(e,t){var n,{buttonId:i,signupService:o,queryVars:r,brandsToConnect:a,onConnectionSuccess:s,root:c=document,customizeBtn:u={}}=t;if(!i)throw new Error("Your button ID must be provided");if(null===(n=e.config.externalApis)||void 0===n||!n.google)throw new Error("This brand does not have a Google App ID, button will not work");E(c);var d={client_id:"",callback:()=>{},use_fedcm_for_prompt:!1};d.client_id=e.config.externalApis.google,d.callback=t=>{t.clientId&&t.credential&&(D("google","LOGINSTART"),C({pmc:e,signupService:o,provider:"google",token:t.credential,queryVars:r,brandsToConnect:a,onConnectionSuccess:s}).catch(e=>{D("google","ERROR")}))},d.use_fedcm_for_prompt=document.location.search.includes("useFedcm=true");var p=()=>{window.google&&(window.google.accounts.id.initialize(d),window.google.accounts.id.renderButton(c.querySelector("#".concat(i)),u),document.dispatchEvent(new Event("PMC::INSITE::ENABLED::GOOGLE")))},l=document.getElementById("google-client-script");
1if(l&&"SCRIPT"===l.nodeName)p();else{var m=document.createElement("script");m.src="https://accounts.google.com/gsi/client",m.onload=p,m.async=!0,m.onerror=e=>{L("google",e)},m.id="google-client-script";var h=document.querySelector("body");h&&h.appendChild(m)}}function L(e,t){document.dispatchEvent(new Event("PMC::INSITE::ERROR::".concat(e.toUpperCase()))),console.error("Echec de chargement de l'API ".concat(e.toUpperCase()),{cause:t})}function D(e,t){document.dispatchEvent(new Event("PMC::INSITE::STATUS::".concat(e.toUpperCase(),"::").concat(t)))}var T=["charonne.cassidy|","(|.*[-_.])abuse(|[-_.].*)|","(|.*[-_.])admins?(|[-_.].*)|","(|.*[-_.])contacts?(|[-_.].*)|","(|.*[-_.])host(s|master?)?(|[-_.].*)|","(|.*[-_.])infos?(|[-_.].*)|","(|.*[-_.])ipadmin(|[-_.].*)|","(|.*[-_.])noc(|[-_.].*)|","(|.*[-_.])postmaster(|[-_.].*)|","(|.*[-_.])pourriel(|[-_.].*)|","(|.*[-_.])roots?(|[-_.].*)|","(|.*[-_.])security(|[-_.].*)|","(|.*[-_.])spam(|[-_.].*)|","(|.*[-_.])tech(|[-_.].*)|","(|.*[-_.])webmasters?(|[-_.].*)|","(|.*[-_.])maddox(|[-_.].*)|","(|.*[-_.])nexus(|[-_.].*)|","(|.*[-_.])test(|[-_.].*)"].join(""),A=["agora\\.bungi\\.com|","amen\\.fr|","bungi\\.com|","emailvision\\.com|","france-strategies\\.com|","gandi\\.net|","illiad\\.fr|","justice\\.fr|","koszmail\\.pl|","node\\.com|","operamail\\.com|","ovh\\.net|","proxad\\.net|","sdgsd\\.com|","tim\\.it|","tiscali\\.fr|","totalcommunications\\.com|","wrwer\\.com|","anacode\\.com|","ambassade-\\+|","caramail\\..+|","fre\\..+|","freee\\..+|","gmai\\..+|","gmaill\\..+|","hotmai\\..+|","hotmaill\\..+|","lycos.+|","spamgourmet\\.+|","tele2\\.+|","test\\.+|","voila\\..+|","yaho\\..+|","yahooo\\..+|","yopmail.+|",".+\\.bg|",".+\\.cn|",".+\\.coom|",".+\\.f|",".+\\.ffr|",".+\\.frr|",".+\\.r|",".+\\.ru|",".+\\.th|",".+otherinbox.com|","dgccrf|","signal-spam"].join(""),I=/^[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,}$/,O=new RegExp("(?!.*\\b(".concat(T,")\\b.*)^([a-zA-Z0-9.!#$%&'*+=?^_`{|}~-]+)")),q=new RegExp("@(?!.*\\b("+A+")\\b.*)([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9]))?(?:\\.([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?))*$"),x="pmc-insite-cgu-validation";window.dataLayer=window.dataLayer||[];var V={checkEmailAvailability:(e,t)=>o(function*(){var n,{email:i}=t;!function(e){var t=e.split("@")[1];if(!I.test(e))throw new Error("".concat(e," is not an email"));if(!O.test(e)||!q.test("@".concat(t)))throw new Error("Ce type d'email n'est pas autorisé")}(i);var o=yield e.getApiModule();return null!==(n=(yield o.checkEmailAvailability(i)).available)&&void 0!==n&&n})(),sendConnexionLink:(e,t)=>o(function*(){var{email:n,signupService:i,queryVars:o}=t;if(!n)throw new Error("An email must be provided");if(!i)throw new Error("A signupService must be provided");if(!e.checkSignupService(i))throw new Error('"'.concat(i,'" is not valid as a signupService'));if(yield V.checkEmailAvailability(e,{email:n}))return console.warn("No account for this email: ".concat(n)),!1;try{if(!e.gqlClient)throw new Error("GQL client not found");return!!(yield e.gqlClient.mutate({mutation:h(),variables:{data:{email:n,callbackUrl:"".concat(e.pmcDomain,"/magiclink-confirm?token=__TOKEN__&callbackUrl=").concat(encodeURIComponent("".concat(e.pmcDomain,"/dispatcher?signupservice=").concat(i).concat(o?k(o):"")))}}})).data.sendLoginLink.status&&(window.dataLayer.push({event:"button_click",button_name:"recevoir magic link"}),!0)}catch(e){return new Error(_(e))}})(),login:(e,t)=>o(function*(){var{email:n,password:i,signupService:o,queryVars:r,brandsToConnect:a,onConnectionSuccess:s}=t;if(!n)throw new Error("An email must be provided");if(!i)throw new Error("A password must be provided");if(!o)throw new Error("A signupService must be provided");if(!e.checkSignupService(o))throw new Error('"'.concat(o,'" is not valid as a signupService'));if(yield V.checkEmailAvailability(e,{email:n}))return console.warn("No account for this email: ".concat(n)),!1;window.dataLayer.push({event:"button_click",button_name:"je me connecte",signup_service:o});try{if(!e.gqlClient||!e.pmcDomain)throw new Error("GQL client not found");var c=yield e.gqlClient.mutate({mutation:l(),variables:{data:{login:n,password:i,signupService:o,strategy:"PMC"}}}),u=b({domainPrefix:e.pmcDomain,apiUrl:c.data.login.url,signupService:c.data.login.signupService,isSignup:c.data.login.isSignup,queryVars:r,brandsToConnect:a,methodType:"password"}),d=c.data.login.signupService.split("_");if(window.dataLayer.push({event:"login",method:"mdp",login_role:"ADMIN",signup_service:c.data.login.signupService,signup_service_part_
11:d[0],signup_service_part_2:d[1],signup_service_part_3:d[2],signup_service_part_4:d[3]}),s&&"function"==typeof s){var p={id:c.data.login.user.id,publicId:c.data.login.user.publicId};yield s(p)}return void window.location.assign(u)}catch(e){return new Error(_(e))}})(),loginPMSH:(e,t)=>o(function*(){var n,{email:i,password:o,signupService:r,queryVars:a,onConnectionSuccess:c,brandsToConnect:u,root:d=document}=t;if(!i)throw new Error("An email must be provided");if(!o)throw new Error("A password must be provided");if(!r)throw new Error("A signupService must be provided");if(!e.checkSignupService(r))throw new Error('"'.concat(r,'" is not valid as a signupService'));if(E(d),null===(n=e.config.options)||void 0===n||!n.hasPmshButton)throw new Error("This brand does not have connection through Prismashop, button will not work");try{if(!e.gqlClient||!e.pmcDomain)throw new Error("GQL client not found");var p=yield e.gqlClient.mutate({mutation:l(),variables:{data:{login:i,password:o,signupService:r,strategy:"PRISMASHOP"}}}),m=b({domainPrefix:e.pmcDomain,apiUrl:p.data.login.url,signupService:p.data.login.signupService,isSignup:p.data.login.isSignup,queryVars:s(s({},a),{},{method:"prismaShop"}),brandsToConnect:u,methodType:"pmsh"}),h=p.data.login.signupService.split("_");if(window.dataLayer.push({event:p.data.login.isSignup?"sign_up":"login",method:"prismashop",login_role:"ADMIN",signup_service:p.data.login.signupService,signup_service_part_1:h[0],signup_service_part_2:h[1],signup_service_part_3:h[2],signup_service_part_4:h[3]}),c&&"function"==typeof c){var v={id:p.data.login.user.id,publicId:p.data.login.user.publicId};yield c(v)}return void window.location.assign(m)}catch(e){return new Error(_(e))}})(),addLegalBlock:(e,t)=>{var{id:n,customText:i,root:o=document}=t;return new Promise((e,t)=>{if(!n)throw new Error("no id provided for addLegalBlock");var r=o.querySelector("#".concat(n));r||t(new Error("No element found for id ".concat(n)));var a=i?'\n\t\t\t\t<div id="'.concat(x,'">\n\t\t\t\t\t').concat(i,"\n\t\t\t\t</div>\n\t\t\t"):'\n                <div id="'.concat(x,'">\n                    En créant un compte, vous confirmez avoir plus de 18 ans et acceptez\n                    <a href="https://www.prismamedia.com/conditions-generales-dutilisation-prisma-connect" target="_blank">les conditions générales d\'utilisation</a> et\n                    <a href="https://www.prismamedia.com/espace-confidentialite/" target="_blank">la charte de protection des données</a> de Prisma Media.\n                </div>\n            ');r&&(r.innerHTML=a),e(!0)})},bindExternalAPIProvider(e,t){var{provider:n,buttonId:i,signupService:o,queryVars:r,brandsToConnect:a,onConnectionSuccess:s,root:c=document,customizeBtn:u={}}=t,d={google:N,apple:P};n?["apple","google"].includes(n)?d[n](e,{buttonId:i,signupService:o,queryVars:r,brandsToConnect:a,onConnectionSuccess:s,root:c,customizeBtn:u}):console.error("".concat(n," n'est pas un fournisseur d'authentification géré par PMC-INSITE-CLIENT. Les valeurs acceptées sont: apple, google")):console.error("Missing provider")},bindPmshButton(e,t){var n,{buttonId:i,signupService:o,queryVars:r,root:a=document}=t;if(!i)throw new Error("Your button ID must be provided");if(null===(n=e.config.options)||void 0===n||!n.hasPmshButton)throw new Error("This brand does not have Prismashop as a connexion provider, button will not work");var s=a.querySelector("#".concat(i));null==s||s.addEventListener("click",()=>{if(window.dataLayer.push({event:"button_click",button_name:"Redirection vers la connexion via Prismashop",signup_service:o}),!e.pmcDomain)throw new Error("PMC domain is not set");var t=function(e){var{queryVars:t,signupService:n,pmcDomain:i}=e;return"".concat(i,"/login-prismashop?signupservice=").concat(n).concat(k(t))}({queryVars:r,signupService:o,pmcDomain:e.pmcDomain});return window.location.assign(t)})},resetPassword:(e,t)=>o(function*(){var{email:n,signupService:i,queryVars:o}=t;if(!n)throw new Error("An email must be provided");if(!i)throw new Error("A signupService must be provided");if(!e.gqlClient)throw new Error("GQL client not found");if(!e.pmcDomain)throw new Error("PMC domain is not set");try{return(yield e.gqlClient.mutate({mutation:f(),variables:{data:{email:n,signupService:i,callbackUrl:S({queryVars:o,pmcDomain:e.pmcDomain})}}})).data.resetPassword.status||!1}catch(e){return new Error(_(e))}})(),signup:(e,t)=>o(function*(){var{email:n,password:i,signupService:o,queryVars:r,brandsToConnect:a,onConnectionSuccess:c,root:u=document}=t;if(!n)throw new Error("An email must be provided");
1if(!o)throw new Error("A signupService must be provided");if(!e.checkSignupService(o))throw new Error('"'.concat(o,'" is not valid as a signupService'));if(!e.gqlClient)throw new Error("GQL client not found");if(!e.pmcDomain)throw new Error("PMC domain is not set");E(u);var d={login:n,signupService:o,strategy:"PMC"};if(i&&(function(e){if(e.length<10)throw new Error("Le mot de passe doit comprendre au minimum 10 caractères");if(!e.match(/\d+/))throw new Error("Le mot de passe doit comprendre au minimum 1 chiffre");if(!e.match(/[a-z]+/))throw new Error("Le mot de passe doit comprendre au minimum 1 minuscule");if(!e.match(/[A-Z]+/))throw new Error("Le mot de passe doit comprendre au minimum 1 majuscule");if(!e.match(/[^a-zA-Z0-9 ]+/g))throw new Error("Le mot de passe doit comprendre au minimum 1 caractère spécial (!, $, #, %, ...)")}(i),d=s(s({},d),{},{password:i})),!(yield V.checkEmailAvailability(e,{email:n})))return console.warn("An account already exist for this email: ".concat(n)),!1;try{window.dataLayer.push({event:"button_click",method:"je mʼinscris"});var p=yield e.gqlClient.mutate({mutation:w(),variables:{data:d}}),l=b({domainPrefix:e.pmcDomain,apiUrl:p.data.signup.url,signupService:p.data.signup.signupService,isSignup:p.data.signup.isSignup,queryVars:r,brandsToConnect:a,methodType:"email"}),m=p.data.signup.signupService.split("_");if(window.dataLayer.push({event:"sign_up",method:"email",login_role:"ADMIN",signup_service:p.data.signup.signupService,signup_service_part_1:m[0],signup_service_part_2:m[1],signup_service_part_3:m[2],signup_service_part_4:m[3]}),c&&"function"==typeof c){var h={id:p.data.signup.user.id,publicId:p.data.signup.user.publicId};yield c(h)}return void window.location.assign(l)}catch(e){return new Error(_(e))}})(),getPmcDomain:(e,t)=>{var{path:n=""}=t;return"".concat(e.config.pmcUris.brandConnect).concat(n)},hasConnectionProvider:(e,t)=>{var n,i,o,{provider:r}=t;return"google"===r?!(null===(n=e.config.externalApis)||void 0===n||!n.google):"apple"===r?!(null===(i=e.config.externalApis)||void 0===i||!i.apple):"pmsh"===r&&!(null===(o=e.config.options)||void 0===o||!o.hasPmshButton)},hasGoogleConnection:e=>V.hasConnectionProvider(e,{provider:"google"}),hasAppleConnection:e=>V.hasConnectionProvider(e,{provider:"apple"}),hasPmshConnection:e=>V.hasConnectionProvider(e,{provider:"pmsh"})},M=Object.assign(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,i=V[e];return n?Promise.resolve(i(n,t)):new Promise((e,n)=>{var o,r;window.pmcstarter||n(new Error("pmcstarter must be loaded first")),null===(o=(r=window).pmcstarter)||void 0===o||o.call(r,o=>{try{e(i(o,t))}catch(e){n(e)}})})},{with:function(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=V[t];return Promise.resolve(i(e,n))}}})},2799(e,t,n){"use strict";n.d(t,{oo:()=>u,qw:()=>s,uA:()=>c});
2/*!
3 * Costro v2.2.0
4 * (c) 2021-2024 Yoriiis
5 * Released under the MIT License.
6 */
7var i=function(e){var t=e.callback,n=e.mode,i=e.basePath;this.callback=t,this.mode=n,this.basePath=this.normalizeBasePath(i),this.isHashMode="hash"===this.mode,this.currentPath=this.getPath(),this.onRouteChange=this.onRouteChange.bind(this)};function o(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function r(e){void 0===e&&(e=!1);for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];for(var i={},a=function(t){for(var n=t?Object.keys(t):[],a=0,s=n.length;a<s;a++){var c=n[a];o(t,c)&&(e&&"[object Object]"===Object.prototype.toString.call(t[c])?i[c]=r(!0,i[c],t[c]):i[c]=t[c])}},s=0,c=t.length;s<c;s++)a(t[s]);return i}i.prototype.normalizeBasePath=function(e){return e.replace(/\/+$/,"").replace(/^\/*/,"/")},i.prototype.init=function(){this.addEvents()},i.prototype.addEvents=function(){window.addEventListener(this.isHashMode?"hashchange":"popstate",this.onRouteChange)},i.prototype.onRouteChange=function(){this.currentPath=this.getPath(),this.callback(this.currentPath)},i.prototype.getPath=function(){if(this.isHashMode){var e=window.location.href,t=e.indexOf("#");return t>=0?e.slice(t+1):"/"}return this.stripBasePath(window.location.pathname,this.basePath)},i.prototype.stripBasePath=function(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))throw new Error("Location::stripBasePath | Invalid basepath, the pathname does not start with base path");return e.slice(t.length)||"/"},i.prototype.setPath=function(e){if(this.currentPath=e,this.isHashMode)window.location.hash=this.currentPath;else{var t=this.currentPath;"/"!==this.basePath&&(t=this.basePath+this.currentPath),window.history.pushState({path:t},"",t),this.callback(this.currentPath)}},i.prototype.destroy=function(){window.removeEventListener(this.isHashMode?"hashchange":"popstate",this.onRouteChange),this.currentPath=null};var a="/:([^/]*)",s=function(e){var t=e.mode;void 0===t&&(t="hash");var n=e.routes,o=e.target,r=e.basePath;void 0===r&&(r="/");var a=e.silentOnNotFound;if(void 0===a&&(a=!1),this.mode=t,this.target=o,this.basePath=r,this.silentOnNotFound=a,this.currentRoute=void 0,this.previousRoute=void 0,this.routes=this.createRoutesData(n),!this.routes.size)throw new Error("App::constructor | Invalid routes configuration");if(!["hash","history"].includes(this.mode))throw new Error('App::constructor | Unknown mode "'+t+'"');this.onNavigate=this.onNavigate.bind(this),this.onClickOnApp=this.onClickOnApp.bind(this),this.location=new i({basePath:this.basePath,callback:this.onRouteChange.bind(this),mode:this.mode}),this.location.init(),this.addEvents(),this.onRouteChange(this.location.currentPath)};s.prototype.createRoutesData=function(e){var t=this,n=e.filter(function(e){return!t.isInterfaceTypeFromComponentGranted(e.component)}).map(function(e){return e.path});if(n.length)throw new Error('App::createRoutesData | Invalid type for path components: "'+n.join('", "')+'". Allowed types are Function, Component, Node.ELEMENT_NODE, Node.DOCUMENT_FRAGMENT_NODE and 
7String.');return new Map(e.filter(function(e){return t.isInterfaceTypeFromComponentGranted(e.component)}).map(function(e){if(void 0===e.path&&(e.path="*"),"/"!==e.path&&e.path.endsWith("/"))throw new Error('App::createRoutesData | Route path "'+e.path+'" must not have a trailing slash.');var n=function(e){var t=e.match(new RegExp(a,"g"))||[],n=t.length,i=[];if(n)for(var o=0;o<n;o++)i.push(t[o].replace("/:",""));return i}(e.path),i="^"+e.path.replace(new RegExp(a,"g"),a.replace(":",""))+"$",o=t.isComponentClass(e.component);return[e.path,{component:e.component,dynamicSegments:n,interfaceType:null,isComponentClass:o,isComponentClassReady:!1,path:e.path,pathRegExp:i,props:e.props}]}))},s.prototype.isInterfaceTypeFromComponentGranted=function(e){return!("function"!=typeof e&&!this.isComponentClass(e))},s.prototype.isComponentClass=function(e){return!!e.prototype&&!!e.prototype.__isComponent},s.prototype.addEvents=function(){document.addEventListener("costro::navigate",this.onNavigate),this.target.addEventListener("click",this.onClickOnApp)},s.prototype.onNavigate=function(e){var t=e.detail.to;"string"==typeof t&&this.location.setPath(t)},s.prototype.onClickOnApp=function(e){var t=e.target;if(t.__customLink){e.preventDefault();var n=t.getAttribute("href");n&&this.location.setPath(n)}},s.prototype.onRouteChange=function(e){var t=this.getRouteMatch(e);if(t){if(this.currentRoute){if(t.path===this.currentRoute.path)return;this.destroyCurrentRoute()}this.currentRoute=t,this.createComponent()}else this.currentRoute&&!this.silentOnNotFound&&this.destroyCurrentRoute()},s.prototype.getRouteMatch=function(e){var t=this.routes.get(e);if(t)return t;for(var n of this.routes)if(n[1].dynamicSegments.length&&new RegExp(n[1].pathRegExp).test(e))return this.routes.get(n[0]);return this.silentOnNotFound?void 0:this.routes.get("*")},s.prototype.destroyCurrentRoute=function(){this.previousRoute=this.currentRoute,this.currentRoute=void 0,this.destroyComponent()},s.prototype.destroyComponent=function(){this.previousRoute&&(this.previousRoute.isComponentClass&&this.previousRoute.component.beforeDestroy(),"function"==typeof Element.prototype.replaceChildren?this.target.replaceChildren():this.target.innerHTML="",this.previousRoute.isComponentClass&&this.previousRoute.component.afterDestroy())},s.prototype.createComponent=function(){var e=this;this.currentRoute&&(this.currentRoute.isComponentClass&&!this.currentRoute.isComponentClassReady&&this.initComponentInCache(),this.getComponentView().then(function(t){t&&e.currentRoute&&(e.currentRoute.interfaceType||(e.currentRoute.interfaceType=e.getInterfaceTypeFromView(t),e.routes.set(e.currentRoute.path,e.currentRoute)),"STRING"===e.currentRoute.interfaceType&&(t=e.transformLinksInStringComponent(t)),e.target.appendChild(t),e.currentRoute.isComponentClass&&e.currentRoute.component.afterRender())}).catch(function(e){console.warn("getComponentView::promise rejected",e)}))},s.prototype.initComponentInCache=function(){if(this.currentRoute){for(var e=this.getComponentHelpers(),t=Object.keys(e),n=0,i=t.length;n<i;n++){var o=t[n];this.currentRoute.component.prototype[o]=e[o]}var r=new this.currentRoute.component(this.currentRoute.props);this.currentRoute.component=r,this.currentRoute.isComponentClassReady=!0,this.routes.set(this.currentRoute.path,this.currentRoute)}},s.prototype.getComponentView=function(){if(this.currentRoute){if(this.currentRoute.isComponentClass){this.updateComponentRouteData();var e=this.currentRoute.component.beforeRender();return e instanceof Promise?this.runRenderWhenReady(this.currentRoute,e):Promise.resolve(this.currentRoute.component.render())}return Promise.resolve(this.currentRoute.component.call(this.currentRoute.component,this.currentRoute.props))}return Promise.reject(new Error("getComponentView::promise not resolved"))},s.prototype.runRenderWhenReady=function(e,t){var n=this;return Promise.resolve(t).then(function(){if(n.currentRoute&&n.currentRoute.path===e.path)return e.component.render()})},s.prototype.updateComponentRouteData=function(){if(this.currentRoute&&(this.currentRoute.component.route.path=this.location.currentPath,this.currentRoute.dynamicSegments.length)){var e=this.location.currentPath.match(this.currentRoute.pathRegExp);if(e&&e.length>1){e.shift();for(var t=0,n=e.length;t<n;t++){var i=this.currentRoute.dynamicSegments[t];this.currentRoute.component.route.params[i]=e[t]}}}},s.prototype.getInterfaceTypeFromView=function(e){return"string"==typeof e?"STRING":[Node.ELEMENT_NODE,Node.DOCUMENT_FRAGMENT_NODE].includes(e.nodeType)?"ELEMENT_NODE":null},s.prototype.transformLinksInStringComponent=function(e){var t=document.createElement("template");t.innerHTML=e.trim();for(var n=document.importNode(t.content,!0),i=Array.from(n.querySelectorAll(".__customLink")),o=0,r=i.length;o<r;o++){var a=i[o];a.classList.remove("__customLink"),a.__customLink=!0}
7return t.remove(),n},s.prototype.getComponentHelpers=function(){var e=this;return{__getExternalStore:function(t,n){var i=e.getRouteMatch(n);return i&&i.isComponentClass&&i.isComponentClassReady?i.component.getStore(t):null}}},s.prototype.destroy=function(){this.location.destroy(),document.removeEventListener("costro::navigate",this.onNavigate),this.target.removeEventListener("click",this.onClickOnApp),this.currentRoute=void 0,this.previousRoute=void 0,this.routes.clear(),this.target.replaceChildren()};var c=function(e){this.props=e,this.route={params:{},path:""},this.store=new Map};function u(e){document.dispatchEvent(new window.CustomEvent("costro::navigate",{detail:{to:e}}))}c.prototype.beforeRender=function(){},c.prototype.afterRender=function(){},c.prototype.beforeDestroy=function(){},c.prototype.afterDestroy=function(){},c.prototype.render=function(){throw new Error('You have to implement the function "render" for the component.')},c.prototype.setStore=function(e){for(var t,n,i=Object.keys(e),o=0,a=i.length;o<a;o++){var s=i[o];if(this.store.has(s)){var c=this.store.get(s),u=r(!0,((t={})[s]=c,t),((n={})[s]=e[s],n));this.store.set(s,u[s])}else this.store.set(s,e[s])}},c.prototype.getStore=function(e,t){return e?t?this.__getExternalStore(e,t):this.store.get(e):null},c.prototype.__isComponent=!0,c.prototype.isReactComponent={}},3670(e){
8/**
9 * @license MIT
10 * @name validateTarget
11 * @version 2.0.0
12 * @author: Yoriiis aka Joris DANIEL <[email protected]>
13 * @description: Easily validate target of an HTML element especially during event delegation
14 * {@link https://github.com/yoriiis/validate-target}
15 * @copyright 2020 Joris DANIEL
16 **/
17e.exports=function({target:e,selectorString:t,nodeName:n}){if("string"==typeof n&&(n=[n]),Array.isArray(n)&&n.length)return n.map(n=>e.nodeName.toLowerCase()===n&&e.matches(t)).includes(!0)}},4705(e,t,n){"use strict";function i(e){return i="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},i(e)}function o(e){var t=function(e,t){if("object"!=i(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=i(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==i(t)?t:t+""}function r(e,t,n){return(t=o(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,{A:()=>r})}}]);
18//# sourceMappingURL=8674.1118c8fdcfd2e5f225fd.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.