@hublo/mstaff-client-sdk 0.2.76 → 0.2.77

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/core.cjs +2 -2
  2. package/dist/core.js +317 -304
  3. package/package.json +1 -1
package/dist/core.cjs CHANGED
@@ -1,6 +1,6 @@
1
- "use strict";var Ze=Object.defineProperty;var Xe=(e,t,i)=>t in e?Ze(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i;var C=(e,t,i)=>(Xe(e,typeof t!="symbol"?t+"":t,i),i);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("vue"),Ye=require("axios"),et=require("pinia"),tt=require("@vueuse/core");function nt(e){return L.getCurrentScope()?(L.onScopeDispose(e),!0):!1}typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;/*!
1
+ "use strict";var Xe=Object.defineProperty;var Ye=(e,t,i)=>t in e?Xe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i;var C=(e,t,i)=>(Ye(e,typeof t!="symbol"?t+"":t,i),i);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("vue"),et=require("axios"),tt=require("pinia"),nt=require("@vueuse/core");function it(e){return L.getCurrentScope()?(L.onScopeDispose(e),!0):!1}typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;/*!
2
2
  * cookie
3
3
  * Copyright(c) 2012-2014 Roman Shtylman
4
4
  * Copyright(c) 2015 Douglas Christopher Wilson
5
5
  * MIT Licensed
6
- */var de=st,se=rt,it=Object.prototype.toString,z=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function st(e,t){if(typeof e!="string")throw new TypeError("argument str must be a string");for(var i={},n=t||{},s=n.decode||ot,c=0;c<e.length;){var u=e.indexOf("=",c);if(u===-1)break;var m=e.indexOf(";",c);if(m===-1)m=e.length;else if(m<u){c=e.lastIndexOf(";",u-1)+1;continue}var l=e.slice(c,u).trim();if(i[l]===void 0){var r=e.slice(u+1,m).trim();r.charCodeAt(0)===34&&(r=r.slice(1,-1)),i[l]=ut(r,s)}c=m+1}return i}function rt(e,t,i){var n=i||{},s=n.encode||at;if(typeof s!="function")throw new TypeError("option encode is invalid");if(!z.test(e))throw new TypeError("argument name is invalid");var c=s(t);if(c&&!z.test(c))throw new TypeError("argument val is invalid");var u=e+"="+c;if(n.maxAge!=null){var m=n.maxAge-0;if(isNaN(m)||!isFinite(m))throw new TypeError("option maxAge is invalid");u+="; Max-Age="+Math.floor(m)}if(n.domain){if(!z.test(n.domain))throw new TypeError("option domain is invalid");u+="; Domain="+n.domain}if(n.path){if(!z.test(n.path))throw new TypeError("option path is invalid");u+="; Path="+n.path}if(n.expires){var l=n.expires;if(!ct(l)||isNaN(l.valueOf()))throw new TypeError("option expires is invalid");u+="; Expires="+l.toUTCString()}if(n.httpOnly&&(u+="; HttpOnly"),n.secure&&(u+="; Secure"),n.partitioned&&(u+="; Partitioned"),n.priority){var r=typeof n.priority=="string"?n.priority.toLowerCase():n.priority;switch(r){case"low":u+="; Priority=Low";break;case"medium":u+="; Priority=Medium";break;case"high":u+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}}if(n.sameSite){var a=typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite;switch(a){case!0:u+="; SameSite=Strict";break;case"lax":u+="; SameSite=Lax";break;case"strict":u+="; SameSite=Strict";break;case"none":u+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return u}function ot(e){return e.indexOf("%")!==-1?decodeURIComponent(e):e}function at(e){return encodeURIComponent(e)}function ct(e){return it.call(e)==="[object Date]"||e instanceof Date}function ut(e,t){try{return t(e)}catch{return e}}function lt(){const e=typeof global>"u"?void 0:global.TEST_HAS_DOCUMENT_COOKIE;return typeof e=="boolean"?e:typeof document=="object"&&typeof document.cookie=="string"}function dt(e){return typeof e=="string"?de(e):typeof e=="object"&&e!==null?e:{}}function K(e,t={}){const i=mt(e);if(!t.doNotParse)try{return JSON.parse(i)}catch{}return e}function mt(e){return e&&e[0]==="j"&&e[1]===":"?e.substr(2):e}class ft{constructor(t,i={}){this.changeListeners=[],this.HAS_DOCUMENT_COOKIE=!1,this.update=()=>{if(!this.HAS_DOCUMENT_COOKIE)return;const s=this.cookies;this.cookies=de(document.cookie),this._checkChanges(s)};const n=typeof document>"u"?"":document.cookie;this.cookies=dt(t||n),this.defaultSetOptions=i,this.HAS_DOCUMENT_COOKIE=lt()}_emitChange(t){for(let i=0;i<this.changeListeners.length;++i)this.changeListeners[i](t)}_checkChanges(t){new Set(Object.keys(t).concat(Object.keys(this.cookies))).forEach(n=>{t[n]!==this.cookies[n]&&this._emitChange({name:n,value:K(this.cookies[n])})})}_startPolling(){this.pollingInterval=setInterval(this.update,300)}_stopPolling(){this.pollingInterval&&clearInterval(this.pollingInterval)}get(t,i={}){return i.doNotUpdate||this.update(),K(this.cookies[t],i)}getAll(t={}){t.doNotUpdate||this.update();const i={};for(let n in this.cookies)i[n]=K(this.cookies[n],t);return i}set(t,i,n){n?n=Object.assign(Object.assign({},this.defaultSetOptions),n):n=this.defaultSetOptions;const s=typeof i=="string"?i:JSON.stringify(i);this.cookies=Object.assign(Object.assign({},this.cookies),{[t]:s}),this.HAS_DOCUMENT_COOKIE&&(document.cookie=se(t,s,n)),this._emitChange({name:t,value:i,options:n})}remove(t,i){const n=i=Object.assign(Object.assign(Object.assign({},this.defaultSetOptions),i),{expires:new Date(1970,1,1,0,0,1),maxAge:0});this.cookies=Object.assign({},this.cookies),delete this.cookies[t],this.HAS_DOCUMENT_COOKIE&&(document.cookie=se(t,"",n)),this._emitChange({name:t,value:void 0,options:i})}addChangeListener(t){this.changeListeners.push(t),this.HAS_DOCUMENT_COOKIE&&this.changeListeners.length===1&&(typeof window=="object"&&"cookieStore"in window?window.cookieStore.addEventListener("change",this.update):this._startPolling())}removeChangeListener(t){const i=this.changeListeners.indexOf(t);i>=0&&this.changeListeners.splice(i,1),this.HAS_DOCUMENT_COOKIE&&this.changeListeners.length===0&&(typeof window=="object"&&"cookieStore"in window?window.cookieStore.removeEventListener("change",this.update):this._stopPolling())}}function pt(e,{doNotParse:t=!1,autoUpdateDependencies:i=!1}={},n=new ft){const s=i?[...e||[]]:e;let c=n.getAll({doNotParse:!0});const u=L.ref(0),m=()=>{const l=n.getAll({doNotParse:!0});ht(s||null,l,c)&&u.value++,c=l};return n.addChangeListener(m),nt(()=>{n.removeChangeListener(m)}),{get:(...l)=>(i&&s&&!s.includes(l[0])&&s.push(l[0]),u.value,n.get(l[0],{doNotParse:t,...l[1]})),getAll:(...l)=>(u.value,n.getAll({doNotParse:t,...l[0]})),set:(...l)=>n.set(...l),remove:(...l)=>n.remove(...l),addChangeListener:(...l)=>n.addChangeListener(...l),removeChangeListener:(...l)=>n.removeChangeListener(...l)}}function ht(e,t,i){if(!e)return!0;for(const n of e)if(t[n]!==i[n])return!0;return!1}const yt=()=>{let e=!1;return function(t){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4)))&&(e=!0)}(navigator.userAgent||navigator.vendor||window.opera),e},me=(e,t)=>q(e,fe(t)),q=(e,t)=>{const i={};return re(t).forEach(n=>i[n]=q(e==null?void 0:e[n],t[n])),"$item"in t&&(e==null||e.forEach((n,s)=>i[s]=q(n,t.$item))),i.$valid=(!t.$asserts||t.$asserts.every(n=>n(e)))&&re(i).every(n=>i[n].$valid),i},fe=e=>ge(Object.entries(e).reduce((t,[i,n])=>(t[`${i.replaceAll(".[]",".$item")}${i.length?".":""}$asserts`]=Array.isArray(n)?n:[n],t),{})),gt=(e,t,i)=>(e=JSON.parse(JSON.stringify(e)),te(e).forEach(s=>{const c=s.replace(/\.[0-9]+/g,".[]");O(t,`${s}.$valid`)===!1&&i[c]!==void 0&&N(e,s,i[c])}),e),re=e=>Object.keys(e).filter(t=>!t.startsWith("$")),bt=e=>typeof e=="boolean",wt=e=>typeof e=="number",At=e=>typeof e=="string",j=e=>Array.isArray(e),B=e=>typeof e=="object"&&!j(e)&&e!==null,vt=e=>e instanceof Date,Rt=e=>typeof e=="function",pe=e=>e===null,he=e=>e===void 0,ye=e=>pe(e)||he(e),Pt=e=>!ye(e),Et=e=>!!e,kt=e=>!e,It=(e,t)=>j(e)&&e.every(i=>t(i)),Ct=(e,t)=>B(e)&&Object.values(e).every(i=>t(i)),St=(e,t)=>me(e,t).$valid,Ot=(e,t,i=!1)=>{j(t)||(t=[t]);let n=e;for(;n;){if(n.classList&&t[i?"every":"some"](s=>n.classList.contains(s)))return!0;n=n.parentElement}return!1},$t=()=>typeof window<"u"&&typeof window.document<"u",T=()=>typeof process<"u"&&process.versions!=null&&process.versions.node!=null,O=(e,t,i)=>{const n=typeof t=="string"?t.split("."):[t];let s=e;const c=m=>m!=null,u=m=>typeof m=="object";for(const[m,l]of n.entries()){if(!c(s))return i;if(m===n.length-1)return c(s[l])?s[l]:i;if(!u(s[l]))return i;s=s[l]}return i},N=(e,t,i)=>{const n=typeof t=="string"?t.split("."):[t],s=m=>typeof m=="number"||/^\d$/g.test(m),c=m=>parseInt(m,10);let u=e;return n.forEach((m,l)=>{if(l===n.length-1)u[m]=i;else{const r=s(n[l+1])?[]:{};m=s(m)?c(m):m,u[m]=u[m]??r,u=u[m]}}),e},ge=(e,t={})=>{const i=B(e)?Object.entries(e):e;for(const[n,s]of i)N(t,n,s);return t},Tt=(e,t={})=>{const i=B(e)?Object.entries(e):e;for(const[n,s]of i)N(t,n,s(t,n));return t},be=e=>{if(typeof e=="object"){if(Array.isArray(e))return[...e];if(Object(e)===e)return{...e}}return e},ee=(e,t)=>{const i={...e};for(const[n,s]of Object.entries(t))n in i&&typeof i[n]=="object"&&typeof s=="object"?i[n]=ee(i[n],s):i[n]=be(s);return i},te=(e,t=()=>!0,i="")=>{const n=[];for(const s in e){const c=e[s],u=i?`${i}.${s}`:s;t(s,u,c)&&(n.push(u),(B(c)||j(c))&&n.push(...te(c,t,u)))}return n},Lt=e=>e.startsWith("http:")?e.replace("http:","https:"):e,Nt=(e,t=!1)=>e.startsWith("http:")||e.startsWith("https:")?e:t?`https://${e}`:`http://${e}`,we=()=>typeof window<"u"&&(window!=null&&window.location)?new URL(window.location).hostname:void 0,oe=()=>{const e=we();return!e||e==="localhost"?e:`.${e}`},Mt=()=>({path:"/"}),Dt=e=>({path:"/",domain:e,sameSite:"none",secure:!0}),W=e=>{if(!(T()||!e))return e.startsWith("localhost")?Mt():Dt(e)};function Ae(){const e=pt(),t=c=>e.get(c),i=(c,u)=>e.set(c,u,W(oe())),n=c=>{e.remove(c),e.remove(c,W(we())),e.remove(c,W(oe()))};return{getItem:t,setItem:i,removeItem:n,clear:()=>Object.keys(e.getAll()).forEach(c=>n(c))}}let U=null;function _(e={auth:"token",refresh:"refresh_token",expiration:"token_expiration_date"},t=Ae()){if(U)return U;function i(){return t.getItem(e.auth)}function n(){return t.getItem(e.refresh)}function s(){return t.getItem(e.expiration)}function c(p,h){const b=a(p);if(!b.exp)throw new Error("Invalid JWT token.");t.setItem(e.auth,p),t.setItem(e.refresh,h),t.setItem(e.expiration,((b.exp-60)*1e3).toString())}function u(){t.removeItem(e.auth),t.removeItem(e.refresh),t.removeItem(e.expiration)}function m(){return l()&&!r()}function l(){return!!i()}function r(){const p=s();return p?new Date(p)<new Date:!0}function a(p){return JSON.parse(atob(p.split(".")[1]))}function f(){return t}return U={keys:e,getAuthToken:i,getRefreshToken:n,getExpiration:s,authenticate:c,clear:u,isAuthenticated:m,hasAuth:l,isExpired:r,getStorage:f},U}function xt(e){let t={"Content-Type":"application/json"};e&&i(e);function i(b,w=!1){return t=w?b:{...t,...b},this}function n(){return t}function s(b,w){return t[b]=w,this}function c(b){return t[b]}function u(b){return t[b]&&delete t[b],this}function m(b){return s("Authorization","Bearer "+b),this}function l(){return u("Authorization"),this}function r(){return!!c("Authorization")}function a(){return s("Content-Type","multipart/form-data"),this}function f(){return s("Content-Type","application/json"),this}function p(){return c("Content-Type")==="multipart/form-data"}function h(){return c("Content-Type")==="application/json"}return{setHeaders:i,getHeaders:n,setHeader:s,getHeader:c,removeHeader:u,setAuthorization:m,removeAuthorization:l,hasAuthorization:r,setFormData:a,setJson:f,isFormData:p,isJson:h}}function _t(e){let t=null;e&&i(e);function i(s){if(s=s.toLowerCase(),!["get","post","put","patch","delete"].includes(s))throw new Error("Invalid method.");return t=s,this}function n(){return t}return{setMethod:i,getMethod:n}}function jt(e,t,i){let n=null;i&&s(i);function s(r){if(!["post","put","patch"].includes(e.getMethod()))throw new Error("Payload can only be set for POST, PUT and PATCH requests.");return r instanceof FormData?t.setFormData():u(r)&&(r=m(r),t.setFormData()),t.isFormData()&&e.getMethod()==="put"&&(e.setMethod("post"),r.append("_method","PUT")),n=r,this}function c(){return n}function u(r){for(const a in r){const f=r[a];if(l(f))return!0;if(typeof f=="object"&&u(f))return!0}return!1}function m(r,a=null,f=0){const p=!a;p&&(a=new FormData);for(const h in r){const b=r[h];l(b)?(r[h]="<<FileIndex:"+f+">>",a.append(f,b,b.name),f++):typeof b=="object"&&(r[h]=m(r[h],a,f))}return p?(a.append("payload",JSON.stringify(r)),a):r}function l(r){return typeof File<"u"&&r instanceof File||typeof Blob<"u"&&r instanceof Blob}return{setPayload:s,getPayload:c}}const k=class k{constructor(t={}){C(this,"level",3);C(this,"logger");C(this,"prefix");this.logger=t.logger||console,this.prefix=t.prefix||""}setLevel(t){this.level=t}debug(...t){this.level<=k.LEVEL_DEBUG&&V(this.logger.debug,this.prefix,t)}info(...t){this.level<=k.LEVEL_INFO&&V(this.logger.info,this.prefix,t)}warn(...t){this.level<=k.LEVEL_WARN&&V(this.logger.warn,this.prefix,t)}error(...t){this.level<=k.LEVEL_ERROR&&V(this.logger.error,this.prefix,t)}};C(k,"LEVEL_DEBUG",0),C(k,"LEVEL_INFO",1),C(k,"LEVEL_WARN",2),C(k,"LEVEL_ERROR",3),C(k,"LEVEL_OFF",4);let Q=k;const V=(e,t,i)=>{t?e(t,...i):e(...i)},A=new Q({prefix:"[SDK]"});let ve=null,Re=null,Pe=null,Ee="/",ke=null;const Bt=()=>ve,zt=e=>{if(A.info("[Config] Environment:",e),!e)throw new Error("Invalid environment.");ve=e},Ut=()=>Re,Vt=e=>{if(A.info("[Config] API Host:",e),!e)throw new Error("Invalid API host.");Re=e},Ft=()=>ke,Ht=e=>{ke=e},qt=()=>Pe,Qt=e=>{if(A.info("[Config] Main App Host:",e),!e)throw new Error("Invalid main app host.");Pe=e},Gt=e=>{A.info("[Config] Base Assets Urls:",e),Ee=e},Kt=()=>Ee,$={getEnvironment:Bt,getApiHost:Ut,getErrorHandler:Ft,setEnvironment:zt,setApiHost:Vt,setErrorHandler:Ht,getMainAppHost:qt,setMainAppHost:Qt,setBaseAssetsUrl:Gt,getBaseAssetsUrl:Kt};function Wt(e){const t=$.getApiHost().replace(/\/$/g,"");let i=null,n={},s={};e&&m(e);function c(){return t+l()+h()}function u(){return l(!0,!0)}function m(d){return i="/"+d.replace(/^\//g,""),this}function l(d=!0,P=!1){return d?i.replace(/:(\w+)/g,(E,I)=>P?"*":s[I]||":"+I):i}function r(d){return n=d,this}function a(d,P){return n[d]=P,this}function f(d){return n[d]&&delete n[d],this}function p(){return Object.keys(n).length>0}function h(d=!0){if(!p())return"";let P="";for(const E in n)if(Array.isArray(n[E]))for(const I of n[E])P+=(P.length?"&":"")+`${E}[]=`+I;else P+=(P.length?"&":"")+E+"="+n[E];return(d?"?":"")+P}function b(d){return s=d,this}function w(d,P){return s[d]=P,this}function S(d){return s[d]&&delete s[d],this}return{setPath:m,getPath:l,getUri:c,getMockUri:u,setQueryParams:r,setQueryParam:a,removeQueryParam:f,hasQuery:p,getQueryString:h,setRouteParams:b,setRouteParam:w,removeRouteParam:S}}function Jt(e){let t=[];function i(){return t=r(arguments),u(),this}function n(){return t.length>0}function s(a){return t.includes(a.trim())?this:(t.push(a.trim()),u(),this)}function c(a){const f=t.indexOf(a.trim());return f===-1?this:(t.splice(f,1),u(),this)}function u(){t.length?e.setQueryParam("groups",l(t)):e.removeQueryParam("groups")}function m(a){return a.split(",").map(f=>f.trim())}function l(a){return a.join(",")}function r(a){let f=[];return a.length===1?typeof a[0]=="string"?f=m(a[0]):Array.isArray(a[0])&&(f=a[0]):f=Array.from(a),f}return{setGroups:i,hasGroups:n,addGroup:s,removeGroup:c}}function Zt(e){let t=!1,i=!1,n=1,s=10;function c(){return t=!0,u(),this}function u(){i=!0;const h=p(arguments);return r(h.page||1,!1),a(h.perPage||s,!1),f(),this}function m(){return i=!1,f(),this}function l(){return i}function r(h,b=!0){return t=!0,i=!0,n=h,b&&f(),this}function a(h,b=!0){return t=!0,i=!0,s=h,b&&f(),this}function f(){t?l()?(e.removeQueryParam("pagination"),e.setQueryParam("page",n),e.setQueryParam("nbResultPerPage",s)):(e.removeQueryParam("page"),e.removeQueryParam("nbResultPerPage"),e.setQueryParam("pagination","false")):(e.removeQueryParam("page"),e.removeQueryParam("nbResultPerPage"),e.removeQueryParam("pagination"))}function p(h){if(h.length===1&&typeof h[0]=="object")return h[0];const b={};return h.length>=1&&(b.page=h[0]),h.length>=2&&(b.perPage=h[1]),b}return{isList:c,paginate:u,disablePagination:m,hasPagination:l,setPage:r,setPerPage:a}}function Xt(e){let t=!1,i="id",n="ASC";function s(){t=!0;const a=r(arguments);return a.orderBy&&u(a.orderBy,!1),a.orderDir&&m(a.orderDir,!1),l(),this}function c(){return t}function u(a,f=!0){return t=!0,i=a,f&&l(),this}function m(a,f=!0){if(a=a.toUpperCase(),["ASC","DESC"].indexOf(a)===-1)throw new Error("Invalid order direction");return t=!0,n=a,f&&l(),this}function l(){c()&&(e.setQueryParam("orderBy",i),e.setQueryParam("orderDirection",n))}function r(a){if(a.length===1&&typeof a[0]=="object")return a[0];const f={};return a.length>=1&&(f.orderBy=a[0]),a.length>=2&&(f.orderDir=a[1]),f}return{setOrder:s,hasOrder:c,setOrderBy:u,setOrderDir:m}}function Yt(){let e=!1;function t(){return e=!0,this}function i(){return e}return{setSilent:t,isSilent:i}}function en(){let e="json";function t(n="json"){if(["arraybuffer","document","json","text","stream","blob"].indexOf(n)===-1)throw new Error("Invalid response type");return e=n,this}function i(){return e}return{setResponseType:t,getResponseType:i}}function tn(e){function t(){return e}function i(){return e.data}function n(){return e.data}return{getResponse:t,getData:i,getPayload:n}}function nn(e,t=!1){let i=!1,n=!1;return e.response?(i=!0,n=!0):e.request&&(i=!0),!t&&$.getErrorHandler()&&$.getErrorHandler()(e),{sent:i,responded:n,error:e}}function sn(e){function t(){return e}function i(){return e.data}function n(){return e.data}function s(){return e.data["@type"]==="hydra:Collection"}function c(){return s()?e.data["hydra:member"]:null}function u(){return s()?e.data["hydra:totalItems"]:null}function m(){return s()?e.data["hydra:view"]&&e.data["hydra:view"]["hydra:last"]:!1}function l(){return!s()||!m()?null:parseInt(e.data["hydra:view"]["@id"].match(/page=(\d+)/)[1])}function r(){return!s()||!m()?null:parseInt(e.data["hydra:view"]["hydra:last"].match(/page=(\d+)/)[1])}return{getResponse:t,getData:i,getPayload:n,isCollection:s,getCollection:c,getTotal:u,hasPagination:m,getPage:l,getPages:r}}function rn(e,t,i,n,s,c){async function u(){const l=i.getMethod(),r=t.getUri(),a=e.getHeaders(),f=n.getPayload(),p=[r];["post","put","patch"].includes(l)&&p.push(f||{}),p.push({headers:a,responseType:c.getResponseType()}),A.info("[Request] Sending request:",`[${l.toUpperCase()}]`,r);try{const h=await Ye[l](...p);return m(h)}catch(h){throw nn(h,s.isSilent())}}function m(l){if(l.headers){const r=Object.keys(l.headers),a=r.map(f=>f.toLowerCase()).indexOf("content-type");if(a!==-1&&l.headers[r[a]].includes("application/ld+json"))return sn(l)}return tn(l)}return{send:u}}function R(e,t="get",i=null){const n=xt(),s=Wt(e),c=_t(t),u=jt(c,n,i),m=Jt(s),l=Zt(s),r=Xt(s),a=Yt(),f=en(),p=rn(n,s,c,u,a,f);return{...n,...s,...c,...u,...m,...l,...r,...a,...f,...p}}function y(e,t="get",i=null){const n=R(e,t,i),s=_();s.isAuthenticated()&&n.setAuthorization(s.getAuthToken());const c=n.send;return n.send=async function(){if(!n.hasAuthorization())throw new Error("::SDK Request:: Request cannot be sent, missing authorization header.");return c()},n}const on=(e,t)=>y("/v2/activity/candidate/:candidateId/establishment/:establishmentId").setRouteParams({candidateId:e,establishmentId:t}),an=()=>({listByCandidateAndEstablishment:on}),cn=(e,t,i)=>y("/candidate/:candidateId/share/establishment/:establishmentId").setMethod("post").setRouteParams({candidateId:e,establishmentId:t}).setPayload(i),un=(e,t)=>y("/candidate/:candidateId/archive/establishment/:establishmentId").setRouteParams({candidateId:e,establishmentId:t}),ln=(e,t)=>y("/candidate/:candidateId/archive/establishment/:establishmentId").setMethod("post").setRouteParams({candidateId:e,establishmentId:t}),dn=(e,t)=>y("/candidate/:candidateId/archive/establishment/:establishmentId").setMethod("delete").setRouteParams({candidateId:e,establishmentId:t}),mn=(e,t)=>y("/v2/candidates/lookup").setQueryParam("email",e).setQueryParam("establishment-id",t),fn=(e,t)=>y("/v2/candidates").setMethod("post").setQueryParam("establishment-id",e).setPayload(t),pn=(e,t,i)=>y("/v2/candidates/:candidateId").setQueryParam("establishment-id",t).setRouteParams({candidateId:e}).setMethod("put").setPayload(i),hn=e=>y("/candidate/register/close/:registrationToken").setMethod("post").setRouteParams({registrationToken:e}),yn=e=>y("/candidate/register/open").setMethod("post").setQueryParam("groups","register:token").setPayload(e),gn=(e,t)=>y("/establishment/:establishmentId:/candidate/invitation").setRouteParams({establishmentId:e}).setMethod("post").setPayload(t),bn=()=>({share:cn,isArchived:un,archive:ln,unarchive:dn,lookupCandidate:mn,createCandidate:fn,updateCandidate:pn,closeIncompleteRegistration:hn,openNewRegistration:yn,updateInvitation:gn}),wn=(e,t)=>y("/comment/establishment/:establishmentId/candidate/:userId").setRouteParams({establishmentId:e,userId:t}),An=(e,t,i)=>y("/comment/establishment/:establishmentId/candidate/:userId").setRouteParams({establishmentId:e,userId:t}).setMethod("post").setPayload(i),vn=(e,t)=>y("/comment/:commentId").setRouteParams({commentId:e}).setMethod("put").setPayload(t),Rn=e=>y("/comment/:commentId").setRouteParams({commentId:e}).setMethod("delete"),Pn=()=>({getForEstablishmentCandidate:wn,postForEstablishmentCandidate:An,update:vn,remove:Rn}),En=()=>R("contractType").isList().addGroup("Term:id").addGroup("Term:name"),kn=(e,t=!0)=>y("contractType/establishment/:establishmentId").isList().setRouteParams({establishmentId:e}).setQueryParam("all",t).addGroup("Term:id").addGroup("Term:name"),In=()=>({list:En,listByEstablishment:kn}),Cn=e=>y("/v2/talents").isList().setQueryParam("establishment-id",e),Sn=e=>y("/v2/talent/mark-as-seen/:talentId").setRouteParams({talentId:e}).setMethod("post"),On=()=>({list:Cn,markAsSeen:Sn}),$n=(e,t,i)=>y("/cvtheque/establishment/:establishmentId/candidate/:candidateId/label/synchronize").setRouteParams({establishmentId:e,candidateId:t}).setMethod("post").setPayload(i),Tn=()=>({syncCandidateLabels:$n}),Ln=()=>R("diploma").isList().addGroup("Term:id").addGroup("Term:name"),Nn=()=>({list:Ln}),Mn=e=>y("document/candidate/:candidateId").setRouteParams({candidateId:e}).isList().disablePagination(),Dn=(e,t)=>y("document/candidate/:candidateId/establishment/:establishmentId/recruiter").setRouteParams({candidateId:e,establishmentId:t}).isList().disablePagination(),xn=(e,t)=>y("document/candidate/:candidateId/establishment/:establishmentId/candidate").setRouteParams({candidateId:e,establishmentId:t}).isList().disablePagination(),_n=e=>y("document/recruiter").setMethod("post").setPayload(e),jn=e=>y("document/:documentId").setRouteParams({documentId:e}).setMethod("delete"),Bn=()=>({listByCandidate:Mn,listByCandidateAndEstablishmentFromRecruiter:Dn,listByCandidateAndEstablishmentFromCandidate:xn,addFromRecruiter:_n,remove:jn}),zn=(e,t)=>y("/v2/establishments/:establishmentId/email-history").setRouteParams({establishmentId:t}).setQueryParam("receiverId",e).isList().disablePagination(),Un=()=>({listByCandidateAndEstablishment:zn}),Vn=(e,t)=>y("/email/candidate/:candidateId").setMethod("post").setRouteParams({candidateId:e}).setPayload(t),Fn=(e,t)=>y("/v2/emails/send").setMethod("post").setPayload({recipientIds:e,...t}),Hn=()=>({sendToCandidate:Vn,sendToRecipients:Fn}),qn=(e,t=!0)=>{const i=y("/v2/establishments/:establishmentId/email-templates").setRouteParams({establishmentId:e}).isList().disablePagination();return t&&i.setQueryParam("global",!0),i},Qn=()=>y("/v2/self/email-templates").isList().disablePagination(),Gn=()=>({listByEstablishment:qn,listSelf:Qn}),Kn=(e,t)=>y("establishment-career/:establishmentId/:versionId").setRouteParams({establishmentId:e,versionId:t}),Wn=(e,t="published")=>y("establishment-career/:establishmentId/state/:state").setRouteParams({establishmentId:e,state:t}),Jn=(e,t,i=null)=>{const n=i!==null?y("establishment-career/:establishmentId/:versionId").setRouteParams({establishmentId:e,versionId:i}):y("establishment-career/:establishmentId").setRouteParams({establishmentId:e});return n.setMethod("post").setPayload(t),n},Zn=(e,t)=>y("establishment-career/:establishmentId/logo-banner").setMethod("post").setRouteParams({establishmentId:e}).setPayload(t),Xn=(e,t,i)=>y("establishment-career/:establishmentId/publish/:versionId").setMethod("post").setRouteParams({establishmentId:e,versionId:t}).setPayload(i),Yn=()=>({readById:Kn,readByState:Wn,upsert:Jn,uploadLogoAndBanner:Zn,publish:Xn}),ei=e=>R("establishment/:establishmentId").setRouteParams({establishmentId:e}),ti=e=>y("establishment/:establishmentId/authorizations").setRouteParams({establishmentId:e}),ne=()=>({read:ei,authorizations:ti}),ni=e=>R("feature-flag/maintenance").setMethod("post").setPayload(e),ii=(e,t)=>R("feature-flag/establishment").setMethod("post").setPayload({establishment:e,flagName:t}),si=()=>({maintenanceModeEnabled:ni,forEstablishment:ii}),ri=()=>R("job").isList().addGroup("Term:id").addGroup("Term:name"),oi=(e,t=!0)=>y("job/establishment/:establishmentId").isList().setRouteParams({establishmentId:e}).setQueryParam("all",t).addGroup("Term:id").addGroup("Term:name"),ai=()=>({list:ri,listByEstablishment:oi}),ci=e=>y("/label/establishment/:establishmentId").isList().setRouteParams({establishmentId:e}),ui=(e,t)=>y("/label/establishment/:establishmentId").setMethod("post").setRouteParams({establishmentId:e}).setPayload(t),li=(e,t)=>y("/label/:labelId").setMethod("put").setRouteParams({labelId:e}).setPayload(t),di=e=>y("/label/:labelId").setMethod("delete").setRouteParams({labelId:e}),mi=(e,t,i)=>y("/label/establishment/:establishmentId/candidate/:candidateId/synchronize").setMethod("post").setPayload(i).setRouteParams({establishmentId:e,candidateId:t}),fi=()=>({listByEstablishment:ci,addToEstablishment:ui,update:li,remove:di,syncForCandidate:mi}),pi=e=>R("offer/:offerId").setRouteParams({offerId:e}),hi=()=>({read:pi}),yi=(e,t=!1)=>{const i=y("/recruiter/establishment/:establishmentId").isList().setRouteParams({establishmentId:e});return t&&i.setQueryParam("exclude-me",1),i},gi=()=>({listByEstablishment:yi}),bi=e=>y("/recruitment/:recruitmentId").setRouteParams({recruitmentId:e}),wi=e=>y("/recruitment/mine/establishment/:establishmentId").isList().setRouteParams({establishmentId:e}),Ai=(e,t)=>y("/recruitment/mine/establishment/:establishmentId/has-not/candidate/:candidateId").isList().setRouteParams({establishmentId:e,candidateId:t}),vi=(e,t)=>y("/recruitment/mine/establishment/:establishmentId/has/candidate/:candidateId").isList().setRouteParams({establishmentId:e,candidateId:t}),Ri=(e,t)=>y("/recruitment/establishment/:establishmentId/has/candidate/:candidateId").isList().setRouteParams({establishmentId:e,candidateId:t}),Pi=(e,t)=>y("/recruitment/:recruitmentId/candidate").setMethod("put").setRouteParams({recruitmentId:e}).setPayload(t),Ei=(e,t)=>y("/recruitment/:recruitmentId/candidate/:candidateId").setMethod("delete").setRouteParams({recruitmentId:e,candidateId:t}),ki=()=>({read:bi,mineByEstablishment:wi,mineWithoutCandidate:Ai,mineWithCandidate:vi,withCandidate:Ri,addCandidates:Pi,removeCandidate:Ei}),Ii=(e,t,i,n=null)=>{const s=R("candidate/register/open").setMethod("post"),c={email:e};return t==="establishment"&&(c.establishmentId=i),t==="offer"&&(c.offerId=i),n&&(c.referer=n),s.setPayload(c),s},Ci=(e,t)=>R("candidate/register/update/:token").setMethod("post").setRouteParams({token:e}).setPayload(t),Si=e=>R("candidate/register/read/:token").setRouteParams({token:e}),Oi=e=>R("candidate/register/close/:token").setMethod("post").setRouteParams({token:e}),$i=()=>({open:Ii,update:Ci,read:Si,close:Oi}),Ti=(e,t)=>y("/v2/registrations/lookup").setQueryParam("candidate-id",e).setQueryParam("establishment-id",t),Li=()=>({lookupEstablishment:Ti}),Ni=()=>R("speciality").isList().addGroup("Term:id").addGroup("Term:name"),Mi=(e,t=!0)=>y("speciality/establishment/:establishmentId").isList().setRouteParams({establishmentId:e}).setQueryParam("all",t).addGroup("Term:id").addGroup("Term:name"),Di=()=>({list:Ni,listByEstablishment:Mi}),xi=e=>y("/tag/public/establishment/:establishmentId").isList().setRouteParams({establishmentId:e}),_i=()=>({listByEstablishment:xi}),ji=(e,t)=>y("/v2/talents/lookup").setQueryParam("candidate-id",e).setQueryParam("establishment-id",t),Bi=e=>y("/v2/talents/index").setMethod("post").setPayload(e),zi=()=>({lookupTalent:ji,addCandidateToTalentPool:Bi}),Ui=e=>R("user/email/isset/:email").setRouteParams({email:e}),Vi=()=>y("user/self").addGroup("user:self"),Fi=e=>y("/user/:uuid").setRouteParams({uuid:e}),Hi=e=>R("/user/:uuid").setRouteParams({uuid:e}),qi=e=>y("/user/:id/uuid").setRouteParams({id:e}),ie=()=>({emailExists:Ui,self:Vi,byUuidPrivate:Fi,byUuid:Hi,fetchUuid:qi});let F;function Ie(){if(F)return F;const e={user:void 0,roles:[],establishments:{}},t=async()=>{if(!_().isAuthenticated())throw new Error("::SDK Authorization:: User not authenticated");const r=(await ie().self().send()).getData();e.user={id:r.id,email:r.email,firstName:r.firstName,lastName:r.lastName,avatar:r.avatar},e.roles=r.roles},i=async r=>{if(!_().isAuthenticated())throw new Error("::SDK Authorization:: User not authenticated");e.establishments[r]=(await ne().authorizations(r).send()).getData()},n=r=>{if(e.user===void 0)throw new Error("::SDK Authorization:: User not fetched");return e.roles.includes(r)};return F={fetchSelf:t,fetchPermission:i,hasRole:n,hasRoleRH:()=>n("ROLE_RH"),hasRoleCandidate:()=>n("ROLE_CANDIDATE"),hasRoleAdmin:()=>n("ROLE_ADMIN"),hasPermission:(r,...a)=>{const f=e.establishments[r];if(f===void 0)throw new Error(`::SDK Authorization:: Permissions not fetched for establishment ${r}`);return a.every(p=>f[p]===!0)},clear:()=>{e.user=void 0,e.roles=[],e.establishments={}}},F}async function Qi(e,...t){if(!_().isAuthenticated())throw"ERR_NOT_AUTHENTICATED";const n=Ie();await Promise.all([n.fetchSelf(),n.fetchPermission(e)]);for(let s=0;s<t.length;s++){const c=t[s];if(!n.hasPermission(e,c))throw"ERR_MISSING_PERMISSION"}}const Gi=et.defineStore("authorization",{state:()=>({user:void 0,establishments:{}}),getters:{roles:e=>e.user.roles??[],isRH(){return this.roles.includes("ROLE_RH")},isCandidate(){return this.roles.includes("ROLE_CANDIDATE")},isAdmin(){return this.roles.includes("ROLE_ADMIN")}},actions:{async fetchSelf(e){if(this.user===void 0||e){const t=await ie().self().send();this.user=t.getData()}},async fetchPermission(e,t){if(!this.establishments[e]||t){const i=await ne().authorizations(e).send();this.establishments[e]=i.getData()}},hasPermission(e,...t){const i=this.establishments[e];return i===void 0?!1:t.every(n=>i[n]===!0)}}});let D=null;function g(){if(D)return D;const e=$.getEnvironment(),t=(()=>e==="prod"||e==="production"?"pPROC7dPoJ7XdxHrwsTQNXCGX79MJjhp":e==="staging"?"823rqOTwVk1ZCWVyBAdLInZ77TcFF0CF":"TMZX6evFnu87JrBHV5qLwHsld5C6hilZ")(),i=!!t,n=e!=="prod"&&e!=="production";let s=null;function c(){return i}function u(){const p=window.analytics=window.analytics||[];if(!p.initialize&&p.invoked)A.error("Segment snippet included twice.");else{p.invoked=!0,p.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","debug","page","once","off","on","addSourceMiddleware","addIntegrationMiddleware","setAnonymousId","addDestinationMiddleware"],p.factory=function(h){return function(){if(window.analytics.initialized)return window.analytics[h].apply(window.analytics,arguments);const b=Array.prototype.slice.call(arguments);return b.unshift(h),p.push(b),p}};for(let h=0;h<p.methods.length;h++){const b=p.methods[h];p[b]=p.factory(b)}p.load=function(h,b){const w=document.createElement("script");w.id="analytics-script",w.type="text/javascript",w.async=!0,w.src="https://cdn.segment.com/analytics.js/v1/"+h+"/analytics.min.js",w.onerror=()=>window.dispatchEvent(new Event("analytics-error"));const S=document.getElementsByTagName("script")[0];S.parentNode.insertBefore(w,S),p._loadOptions=b},p._writeKey=t,p.SNIPPET_VERSION="4.16.1",p.load(t),p.page(),p.ready(()=>window.dispatchEvent(new Event("analytics-ready")))}}async function m(){return s!==null||(s=new Promise((p,h)=>{if(!c())return f("Analytics is disabled."),p();if(window.addEventListener("analytics-ready",()=>{f("Analytics script loaded successfully."),p()}),window.addEventListener("analytics-error",()=>{f("Analytics script failed to load. Consider disabling your AdBlocker.",null,"error"),h()}),f("Loading Analytics script."),window.analytics)return p();u()})),s}async function l(p,h){if(!T())try{if(await this.analyticsScriptReady(),f("[identify]",[p,h]),c())return window.analytics.identify(p,h)}catch{f("[identify]",[p,h],"error")}}async function r(p,h,b){if(!T()){typeof b!="object"&&(b={});try{if(await this.analyticsScriptReady(),f("[page]",[p,h,b]),c())return window.analytics.page(p,{category:h,...b})}catch(w){console.log(w),f("[page]",[p,h,b],"error")}}}async function a(p,h,b){if(!T()){typeof b!="object"&&(b={});try{if(await this.analyticsScriptReady(),f("[track]",[p,h,b]),c())return window.analytics.track(p,{category:h,...b})}catch{f("[track]",[p,h,b],"error")}}}function f(p,h=[],b="info"){h||(h=[]),n&&A[b](`::SDK Analytics:: ${p}`,...h)}return D={analyticsScriptReady:m,isEnabled:c,identify:l,page:r,track:a,consoleMessage:f},D}g.destroy=()=>D=null;function Ce(){const e="Hubler Application";function t(r){if(!r)throw new Error(`Missing arguments for domain "${e}"`);const a=!!r.offerId;if(a&&!r.recruitmentId)throw new Error(`Missing argument "recruitmentId" for domain "${e}"`);return{companyId:r.establishmentId?r.establishmentId.toString():null,jobOfferId:a?r.offerId.toString():null,recruitmentId:a?r.recruitmentId.toString():null,selections:[a?"Application":"Spontaneous Application"]}}async function i(r){return g().page("Application Authentication Viewed",e,t(r))}async function n(r){return g().page("Application Magic Link Viewed",e,t(r))}async function s(r){return g().page("Application Job Viewed",e,t(r))}async function c(r){return g().page("Application Information Viewed",e,t(r))}async function u(r){return g().page("Application Document Viewed",e,t(r))}async function m(r){return g().page("Application Success Viewed",e,t(r))}async function l(r){if(!r.error)throw new Error(`Missing argument "error" for domain "${e}", event "Application Form Failed"`);return g().track("Application Form Failed",e,{...t(r),error:r.error})}return{applicationAuthenticationViewed:i,applicationMagicLinkViewed:n,applicationJobViewed:s,applicationInformationViewed:c,applicationDocumentViewed:u,applicationSuccessViewed:m,applicationFormFailed:l}}function Se(){const e="Profile";function t(d,P){var I;if(!d)throw new Error(`Missing arguments for domain "${e}"`);const E={companyId:d.companyId?d.companyId.toString():null,hublerId:(I=d.hublerId)==null?void 0:I.toString()};return P&&(E.productId=d.companyId?d.companyId+"_2":null),d.recruitmentId&&(E.recruitmentId=d.recruitmentId.toString()),d.selections&&(E.selections=d.selections),d.institutionId&&(E.institutionId=d.institutionId.map(String)),E}async function i(d){return g().track(d.name,e,t(d.properties),!0)}async function n(d){return g().track(d.name,e,t(d.properties,!0))}async function s(d){return g().track(d.name,e,t(d.properties,!0))}async function c(d){return g().track(d.name,e,t(d.properties,!0))}async function u(d){return g().track(d.name,e,t(d.properties,!0))}async function m(d){return g().track(d.name,e,t(d.properties,!0))}async function l(d){return g().track(d.name,e,t(d.properties,!0))}async function r(d){return g().track(d.name,e,t(d.properties,!0))}async function a(d){return g().track(d.name,e,t(d.properties,!0))}async function f(d){return g().track(d.name,e,t(d.properties,!0))}async function p(d){return g().track(d.name,e,t(d.properties,!0))}async function h(d){return g().track(d.name,e,t(d.properties,!0))}async function b(d){return g().track(d.name,e,t(d.properties,!0))}async function w(d){return g().page(d.name,d.properties.category,t(d.properties,!1))}async function S(d){return g().track(d.name,e,t(d.properties,!1))}return{profileDocumentDeleted:i,profileLabelAdded:n,profileLabelRemoved:s,profileShared:c,profileArchived:u,profileCandidateAdded:m,profileCommentAdded:l,profileDocumentAdded:r,profileDocumentDownloaded:a,profileDocumentRequested:f,profileRecruitmentAdded:p,profileRecruitmentRemoved:h,profileTabSelected:b,profileViewed:w,profileEmailSent:S}}function Oe(){const e="Recruitment";function t(n){if(!n)throw new Error(`Missing arguments for domain "${e}"`);const s={companyId:n.companyId?n.companyId.toString():null};return n.institutionId&&(s.institutionId=[n.institutionId.toString()]),n.origin&&(s.origin=n.origin.toString()),s}async function i(n){return g().track(n.name,e,{...t(n),recruitmentId:n.recruitmentId.toString(),count:parseInt(n.count)})}return{candidateAdded:i}}function $e(){const e="Visual Builder";function t(o,Je){if(!o)throw new Error(`Missing arguments for domain "${e}"`);const M={companyId:o.companyId?o.companyId.toString():null};return Je&&(M.productId=o.companyId?o.companyId+"_2":null),o.selections&&(M.selections=o.selections),o.error&&(M.error=o.error),o.institutionId&&(M.institutionId=[o.institutionId.toString()]),M}async function i(o){return g().page(o.name,e,t(o.properties,!0))}async function n(o){return g().track(o.name,e,t(o.properties),!0)}async function s(o){return g().track(o.name,e,t(o.properties,!0))}async function c(o){return g().page(o.name,e,t(o.properties,!0))}async function u(o){return g().page(o.name,e,t(o.properties,!0))}async function m(o){return g().track(o.name,e,t(o.properties,!0))}async function l(o){return g().page(o.name,e,t(o.properties,!0))}async function r(o){return g().page(o.name,e,t(o.properties,!0))}async function a(o){return g().page(o.name,e,t(o.properties,!0))}async function f(o){return g().track(o.name,e,t(o.properties,!0))}async function p(o){return g().page(o.name,e,t(o.properties,!0))}async function h(o){return g().page(o.name,e,t(o.properties,!0))}async function b(o){return g().track(o.name,e,t(o.properties,!0))}async function w(o){return g().track(o.name,e,t(o.properties,!0))}async function S(o){return g().page(o.name,e,t(o.properties,!0))}async function d(o){return g().page(o.name,e,t(o.properties,!0))}async function P(o){return g().page(o.name,e,t(o.properties,!0))}async function E(o){return g().page(o.name,e,t(o.properties,!0))}async function I(o){return g().page(o.name,e,t(o.properties,!1))}async function xe(o){return g().track(o.name,e,t(o.properties,!0))}async function _e(o){return g().track(o.name,e,t(o.properties,!0))}async function je(o){return g().track(o.name,e,t(o.properties,!0))}async function Be(o){return g().track(o.name,e,t(o.properties,!0))}async function ze(o){return g().track(o.name,e,t(o.properties,!0))}async function Ue(o){return g().track(o.name,e,t(o.properties,!0))}async function Ve(o){return g().track(o.name,e,t(o.properties,!0))}async function Fe(o){return g().track(o.name,e,t(o.properties,!0))}async function He(o){return g().track(o.name,e,t(o.properties,!0))}async function qe(o){return g().track(o.name,e,t(o.properties,!0))}async function Qe(o){return g().track(o.name,e,t(o.properties,!0))}async function Ge(o){return g().track(o.name,e,t(o.properties,!0))}async function Ke(o){return g().track(o.name,e,t(o.properties,!0))}async function We(o){return g().page(o.name,e,t(o.properties,!1))}return{careerSitePreviewViewed:i,careerSitePublished:n,setupBenefitCustomAdded:s,setupBenefitViewed:c,setupCandidateInformationViewed:u,setupContactAdded:m,setupContactViewed:l,setupEditionDoneViewed:r,setupExternalLinkViewed:a,setupImageUploaded:f,setupImageViewed:p,setupLocationViewed:h,setupPresentationContentAdded:b,setupPresentationNewTabAdded:w,setupPresentationViewed:S,setupSettingsDoneViewed:d,setupSocialNetworkViewed:P,setupThemeViewed:E,visualBuilderViewed:I,setupImageUploadFailed:xe,fastCopyLinkClicked:_e,setupBenefitCustomDeleted:je,setupBenefitCustomEdited:Be,setupContactDeleted:ze,setupContactEdited:Ue,setupContactNewClicked:Ve,setupPresentationContentDeleted:Fe,setupPresentationContentDuplicated:He,setupPresentationContentMoved:qe,setupPresentationTabDeleted:Qe,setupPresentationTabEdited:Ge,setupPresentationTabMoved:Ke,setupSEOViewed:We}}const ae=Object.freeze(Object.defineProperty({__proto__:null,useAnalyticsHublerApplication:Ce,useAnalyticsProfile:Se,useAnalyticsRecruitment:Oe,useAnalyticsVisualBuilder:$e},Symbol.toStringTag,{value:"Module"}));function Ki(){function e(i){return g().identify(i.id,{email:i.email,firstName:i.firstname,lastName:i.lastname,createdAt:i.createdAt,type:"Hubler",lang:"fr",medium:t()?"MOBILE_DEVICE":"WEB_BROWSER"})}function t(){let i=!1;return function(n){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(n)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(n.substr(0,4)))&&(i=!0)}(navigator.userAgent||navigator.vendor||window.opera),i}return{identifyCandidate:e}}let H=null;const Wi=async(e,t)=>{try{return await G(),A.info("[identify]",[e,t]),window.analytics.identify(e,t)}catch{A.error("[identify]",[e,t])}},Ji=async(e,t,i)=>{typeof i!="object"&&(i={});try{return await G(),A.info("[page]",[e,t,i]),window.analytics.page(e,{category:t,...i})}catch{A.error("[page]",[e,t,i])}},Zi=async(e,t,i)=>{typeof i!="object"&&(i={});try{return await G(),A.info("[track]",[e,t,i]),window.analytics.track(e,{category:t,...i})}catch{A.error("[track]",[e,t,i])}},Z=()=>{const e=$.getEnvironment();return e==="prod"||e==="production"?"pPROC7dPoJ7XdxHrwsTQNXCGX79MJjhp":e==="staging"?"823rqOTwVk1ZCWVyBAdLInZ77TcFF0CF":"TMZX6evFnu87JrBHV5qLwHsld5C6hilZ"},Te=()=>{const e=window.analytics=window.analytics||[];if(!e.initialize&&e.invoked)A.error("Segment snippet included twice.");else{e.invoked=!0,e.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","debug","page","once","off","on","addSourceMiddleware","addIntegrationMiddleware","setAnonymousId","addDestinationMiddleware"],e.factory=function(t){return function(){if(window.analytics.initialized)return window.analytics[t].apply(window.analytics,arguments);const i=Array.prototype.slice.call(arguments);return i.unshift(t),e.push(i),e}};for(let t=0;t<e.methods.length;t++){const i=e.methods[t];e[i]=e.factory(i)}e.load=function(t,i){const n=document.createElement("script");n.id="analytics-script",n.type="text/javascript",n.async=!0,n.src="https://cdn.segment.com/analytics.js/v1/"+t+"/analytics.min.js",n.onerror=()=>window.dispatchEvent(new Event("analytics-error"));const s=document.getElementsByTagName("script")[0];s.parentNode.insertBefore(n,s),e._loadOptions=i},e._writeKey=Z(),e.SNIPPET_VERSION="4.16.1",e.load(Z()),e.page(),e.ready(()=>window.dispatchEvent(new Event("analytics-ready")))}},G=()=>(H!==null||(H=new Promise((e,t)=>{if(window.addEventListener("analytics-ready",()=>{A.info("Analytics script loaded successfully."),e()}),window.addEventListener("analytics-error",()=>{A.error("Analytics script failed to load. Consider disabling your AdBlocker."),t()}),A.info("Loading Analytics script."),window.analytics)return e();Te()})),H),Xi={key:Z,appendScript:Te,ready:G,identify:Wi,page:Ji,track:Zi},Yi="AIzaSyDicyRD6rvVdnicp1tgV0ElazASNGbyyTs";let Le=!1;const Ne=()=>new Promise(e=>{T()||Le||window.google&&window.google.maps?e():(window.addEventListener("gmap-ready",()=>e()),ns())}),es=(e,t)=>Ne().then(()=>{T()||ts(e,t)}),ts=(e,t)=>{const i=new window.google.maps.places.Autocomplete(e,{componentRestrictions:{country:["fr","re","yt","gp","mq"]}});window.google.maps.event.addListener(i,"place_changed",()=>{const n=i.getPlace();n.formatted_address&&t&&t(n.formatted_address,n)})},ns=()=>{window.onGmapScriptReady=()=>{};const e=document.createElement("script");e.src="https://maps.googleapis.com/maps/api/js?key="+Yi+"&libraries=places&callback=onGmapScriptReady",e.async=!0,e.defer=!0,e.onload=()=>window.dispatchEvent(new Event("gmap-ready")),document.body.appendChild(e),Le=!0},is={scriptReady:Ne,autocompleteInput:es},ss={common:{the:"le",from:"de"},timeAgo:{"just-now":"à l'instant",ago:"il y a {0}",in:"dans {0}","last-month":"le mois dernier","next-month":"le mois prochain",month:"mois | mois","last-year":"l'année dernière","next-year":"l'année prochaine",year:"an | ans",yesterday:"hier",tomorrow:"demain",day:"jour | jours","last-week":"la semaine dernière","next-week":"la semaine prochaine",week:"semaine | semaines",hour:"heure | heures",minute:"minute | minutes",second:"seconde | secondes"}},rs={fr:ss};let X=null;const Me=()=>X,os=(e={})=>{let t=e.locale||"fr";const i=l=>t=l,n=()=>t,s=ee(rs,(e==null?void 0:e.messages)||{}),c=(l,r)=>{const a=O(s,`${t}.${l}`);return a?r?as(a,r):a:l},u=(l,r)=>{const a=O(s,`${t}.${l}`);return a?cs(a,r):l};return X={t:c,tNode:u,setLocale:i,getLocale:n,install:l=>{l.config.globalProperties.$t=c,l.config.globalProperties.$tNode=u}},X},as=(e,t)=>e?e.replace(/{{ ?([a-zA-Z_.]+) ?}}/g,(i,n)=>O(t,n)):null,cs=(e,t)=>{if(!e)return null;const i=e.split(/(\{[{%]+[^{}]*[%}]+})/g).filter(n=>n!=="").map(n=>{const s=n.startsWith("{%")&&n.endsWith("%}")?"slot":n.startsWith("{{")&&n.endsWith("}}")?"variable":"text";if(s==="text")return()=>ce.text(n);n=n.replace(/[{}%]/g,"").trim();const c=n.match(/^[a-zA-Z_.]+/)[0];n=n.replace(c,"").trim();const u={};return n!==""&&([...n.matchAll(/([a-zA-Z_.]+)(=([a-zA-Z_.]+))?/g)].reduce((r,a)=>(a[3]===void 0?N(r,a[1],O(t,a[1])):N(r,a[1],O(t,a[3])),r),u),[...n.matchAll(/([a-zA-Z_.]+)="([^"]+)"/g)].reduce((r,a)=>{let f=a[2];return new RegExp(/^[0-9]*$/).exec(a[2])?f=parseInt(a[2]):new RegExp(/^(true|false)$/).exec(a[2])&&(f=a[2]==="true"),r[a[1]]=f,r},u)),m=>ce[s](c,t,m,u)});return{setup:(n,{slots:s})=>()=>i.map(c=>c(s))}},ce={slot:(e,t,i,n)=>L.h("span",{class:"node node--slot"},i[e.trim()](n)),variable:(e,t)=>L.h("span",{class:"node node--variable"},O(t,e.trim())),text:e=>L.h("span",{class:"node node--text"},e)};function us(e){const{t}=Me(),i={justNow:t("timeAgo.just-now"),past:n=>n.match(/\d/)?t("timeAgo.ago",[n]):n,future:n=>n.match(/\d/)?t("timeAgo.in",[n]):n,month:(n,s)=>n===1?t(s?"timeAgo.last-month":"timeAgo.next-month"):`${n} ${t("timeAgo.month",n)}`,year:(n,s)=>n===1?t(s?"timeAgo.last-year":"timeAgo.next-year"):`${n} ${t("timeAgo.year",n)}`,day:(n,s)=>n===1?t(s?"timeAgo.yesterday":"timeAgo.tomorrow"):`${n} ${t("timeAgo.day",n)}`,week:(n,s)=>n===1?t(s?"timeAgo.last-week":"timeAgo.next-week"):`${n} ${t("timeAgo.week",n)}`,hour:n=>`${n} ${t("timeAgo.hour",n)}`,minute:n=>`${n} ${t("timeAgo.minute",n)}`,second:n=>`${n} ${t("timeAgo.second",n)}`,invalid:""};return tt.useTimeAgo(e,{fullDateFormatter:n=>n.toLocaleDateString(),messages:i})}function ls(){let e=null;function t(){return e}function i(){return e.controller}function n(){return"use"+e.controller.charAt(0).toUpperCase()+e.controller.slice(1)+"QSController"}function s(){return e.action}function c(){return e.arguments}function u(){return!!(e&&e.controller&&e.action)}function m(){window.location.search.length!==0&&(e=window.location.search.substring(1).split("&").reduce((l,r)=>{const a=r.split("=");return a[0]==="controller"||a[0]==="action"?l[a[0]]=decodeURIComponent(a[1]):l.arguments[a[0]]=decodeURIComponent(a[1]),l},{controller:null,action:null,arguments:{}}))}return m(),{getParams:t,getController:i,getControllerComposableName:n,getAction:s,getArguments:c,hasAction:u}}function ds(){async function e({domain:n,event:s,...c}){const u="useAnalytics"+n.charAt(0).toUpperCase()+n.slice(1);if(!t(u))throw new Error(`Domain ${n} is not defined`);const m=ae[u]();if(!i(m,s))throw new Error(`Event ${s} is not defined in domain ${n}`);return m[s](c)}function t(n){return!!ae[n]}function i(n,s){return!!n[s]}return{call:e}}const ue=Object.freeze(Object.defineProperty({__proto__:null,useAnalyticsQSController:ds},Symbol.toStringTag,{value:"Module"}));function ms(e){if(!e.hasAction())throw new Error("No action found in router");function t(){if(!i())throw new Error(`Controller ${e.getController()} not found`);const s=ue[e.getControllerComposableName()]();if(!n(s))throw new Error(`Action ${e.getAction()} not found in controller ${e.getController()}`);return s[e.getAction()](e.getArguments())}function i(){return e.getControllerComposableName()in ue}function n(s){return e.getAction()in s}return{dispatch:t}}function fs(){let e=!1;function t(s,c,u){n(),u()}function i(s,c,u){if(!e)return e=!0,t(s,c,u);u()}function n(){const s=ls();if(!s.hasAction())return;ms(s).dispatch()}return{vueRouterBeforeEach:t,vueRouterBeforeFirst:i,handle:n}}const ps=()=>({getAssetUrl:t=>`${$.getBaseAssetsUrl()}${t}`}),v=()=>$.getMainAppHost(),hs=()=>`${v()}/rh/establishments`,ys=e=>`${v()}/rh/establishment/${e}`,gs=e=>{var t;return typeof e=="string"?e:typeof e=="object"&&((t=e==null?void 0:e.urls)!=null&&t.display)?e.urls.display:null},bs=()=>`${v()}/rh/dashboard`,ws=e=>`${v()}/candidate-invite/establishment/${e}`,As=(e,t=!1)=>t?`${v()}/cvbank/${e}`:`${v()}/rh/establishment/${e}/cvtheque`,vs=(e,t)=>`${v()}/user-profile/establishment/${e}/user/${t}`,Rs=e=>`${v()}/rh/establishment/${e}/recruitment`,Ps=(e,t)=>`${v()}/rh/establishment/${e}/recruitment/${t}`,Es=(e,t)=>`${v()}/rh/establishment/${e}/recruitment/${t}/kanban`,ks=e=>`${v()}/rh/establishment/${e}/career-configuration`,Is=(e,t=null)=>t?`${v()}/career-website/${e}/${t}`:`${v()}/career-website/${e}`,Cs=(e,t)=>`${v()}/career-website-preview/${e}/${t}`,Ss=(e,t=null)=>{const i=v().replace("://",`://${e}.`);return t?`${i}?_version=${t}`:`${i}`},Os=e=>`${v()}/rh/establishment/${e}/stats`,$s=e=>`${v()}/rh/establishment/${e}/backoffice`,Ts=()=>`${v()}/rh/settings/general`;function Ls(){return{root:v,establishments:hs,establishment:ys,img:gs,dashboard:bs,candidateInvite:ws,cvtheque:As,userProfile:vs,recruitments:Rs,recruitment:Ps,recruitmentKanban:Es,career:ks,careerConfig:Is,careerPreview:Cs,careerWebsite:Ss,statistics:Os,backoffice:$s,userSettings:Ts}}const le=new Set;let x,Y={ignore:e=>e.startsWith("Ui")};const J=e=>{if(e!=null&&e.classList){e._cssChecked=!0;for(const t of e.classList)x.has(t)||le.has(t)||Y.ignore(t)||(le.add(t),A.error(`Undefined CSS class: ${t}`))}},De=e=>{var t;for(const i of e)if(i!=null&&i.cssRules&&(i==null?void 0:i.cssRules.length)>0)De(i.cssRules);else if(i.selectorText){const n=(t=i.selectorText)==null?void 0:t.match(/\.[\w-]+/g);if(n)for(const s of n)x.add(s.substr(1))}},Ns=(e={})=>{if(x)return x;x=new Set,Y={...Y,...e},De(document.styleSheets),new MutationObserver(i=>{for(const n of i)if(n.type==="childList"&&(n!=null&&n.addedNodes)){for(const s of n.addedNodes)if(!(s.nodeType===3||s.nodeType===8)){J(s);for(const c of s.querySelectorAll("*"))J(c)}}else(n==null?void 0:n.attributeName)==="class"&&J(n.target)}).observe(document,{attributes:!0,childList:!0,subtree:!0})},Ms="0.2.75";exports.Analytics=Xi;exports.BaseLogger=Q;exports.Gmap=is;exports.SDKConfig=$;exports.SDKLogger=A;exports.VERSION=Ms;exports._clone=be;exports._get=O;exports._map=Tt;exports._merge=ee;exports._pathList=te;exports._set=N;exports._setMany=ge;exports.buildObjectValidation=q;exports.createI18n=os;exports.ensureScheme=Nt;exports.hasOrIsInClass=Ot;exports.inBrowser=$t;exports.inNode=T;exports.isArray=j;exports.isArrayOf=It;exports.isBoolean=bt;exports.isDate=vt;exports.isFalsy=kt;exports.isFunction=Rt;exports.isMobile=yt;exports.isNotNullOrUndefined=Pt;exports.isNull=pe;exports.isNullOrUndefined=ye;exports.isNumber=wt;exports.isObject=B;exports.isObjectOf=Ct;exports.isObjectValid=St;exports.isString=At;exports.isTruthy=Et;exports.isUndefined=he;exports.sanitizeObject=gt;exports.secureScheme=Lt;exports.transpileAsserts=fe;exports.useActivityRepository=an;exports.useAnalyticsHublerApplication=Ce;exports.useAnalyticsIdentify=Ki;exports.useAnalyticsProfile=Se;exports.useAnalyticsRecruitment=Oe;exports.useAnalyticsVisualBuilder=$e;exports.useAssetUrls=ps;exports.useAuthentication=_;exports.useAuthorization=Ie;exports.useAuthorizationStore=Gi;exports.useCanAccessEstablishmentMiddleware=Qi;exports.useCandidateRepository=bn;exports.useCommentRepository=Pn;exports.useContractTypeRepository=In;exports.useCookieStorage=Ae;exports.useCvbankRepository=On;exports.useCvthequeRepository=Tn;exports.useDiplomaRepository=Nn;exports.useDocumentRepository=Bn;exports.useDomainUrls=Ls;exports.useEmailHistoryRepository=Un;exports.useEmailRepository=Hn;exports.useEmailTemplateRepository=Gn;exports.useEstablishmentCareerRepository=Yn;exports.useEstablishmentRepository=ne;exports.useFeatureFlagRepository=si;exports.useI18n=Me;exports.useJobRepository=ai;exports.useLabelRepository=fi;exports.useLocaleTimeAgo=us;exports.useObjectValidation=me;exports.useOfferRepository=hi;exports.usePrivateRequest=y;exports.useQSAction=fs;exports.useRecruiterRepository=gi;exports.useRecruitmentRepository=ki;exports.useRegisterRepository=$i;exports.useRegistrationRepository=Li;exports.useRequest=R;exports.useSpecialityRepository=Di;exports.useTagRepository=_i;exports.useTalentRepository=zi;exports.useUndefinedCssClasses=Ns;exports.useUserRepository=ie;
6
+ */var de=rt,se=ot,st=Object.prototype.toString,z=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function rt(e,t){if(typeof e!="string")throw new TypeError("argument str must be a string");for(var i={},n=t||{},s=n.decode||at,a=0;a<e.length;){var u=e.indexOf("=",a);if(u===-1)break;var m=e.indexOf(";",a);if(m===-1)m=e.length;else if(m<u){a=e.lastIndexOf(";",u-1)+1;continue}var l=e.slice(a,u).trim();if(i[l]===void 0){var r=e.slice(u+1,m).trim();r.charCodeAt(0)===34&&(r=r.slice(1,-1)),i[l]=lt(r,s)}a=m+1}return i}function ot(e,t,i){var n=i||{},s=n.encode||ct;if(typeof s!="function")throw new TypeError("option encode is invalid");if(!z.test(e))throw new TypeError("argument name is invalid");var a=s(t);if(a&&!z.test(a))throw new TypeError("argument val is invalid");var u=e+"="+a;if(n.maxAge!=null){var m=n.maxAge-0;if(isNaN(m)||!isFinite(m))throw new TypeError("option maxAge is invalid");u+="; Max-Age="+Math.floor(m)}if(n.domain){if(!z.test(n.domain))throw new TypeError("option domain is invalid");u+="; Domain="+n.domain}if(n.path){if(!z.test(n.path))throw new TypeError("option path is invalid");u+="; Path="+n.path}if(n.expires){var l=n.expires;if(!ut(l)||isNaN(l.valueOf()))throw new TypeError("option expires is invalid");u+="; Expires="+l.toUTCString()}if(n.httpOnly&&(u+="; HttpOnly"),n.secure&&(u+="; Secure"),n.partitioned&&(u+="; Partitioned"),n.priority){var r=typeof n.priority=="string"?n.priority.toLowerCase():n.priority;switch(r){case"low":u+="; Priority=Low";break;case"medium":u+="; Priority=Medium";break;case"high":u+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}}if(n.sameSite){var c=typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite;switch(c){case!0:u+="; SameSite=Strict";break;case"lax":u+="; SameSite=Lax";break;case"strict":u+="; SameSite=Strict";break;case"none":u+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return u}function at(e){return e.indexOf("%")!==-1?decodeURIComponent(e):e}function ct(e){return encodeURIComponent(e)}function ut(e){return st.call(e)==="[object Date]"||e instanceof Date}function lt(e,t){try{return t(e)}catch{return e}}function dt(){const e=typeof global>"u"?void 0:global.TEST_HAS_DOCUMENT_COOKIE;return typeof e=="boolean"?e:typeof document=="object"&&typeof document.cookie=="string"}function mt(e){return typeof e=="string"?de(e):typeof e=="object"&&e!==null?e:{}}function K(e,t={}){const i=ft(e);if(!t.doNotParse)try{return JSON.parse(i)}catch{}return e}function ft(e){return e&&e[0]==="j"&&e[1]===":"?e.substr(2):e}class pt{constructor(t,i={}){this.changeListeners=[],this.HAS_DOCUMENT_COOKIE=!1,this.update=()=>{if(!this.HAS_DOCUMENT_COOKIE)return;const s=this.cookies;this.cookies=de(document.cookie),this._checkChanges(s)};const n=typeof document>"u"?"":document.cookie;this.cookies=mt(t||n),this.defaultSetOptions=i,this.HAS_DOCUMENT_COOKIE=dt()}_emitChange(t){for(let i=0;i<this.changeListeners.length;++i)this.changeListeners[i](t)}_checkChanges(t){new Set(Object.keys(t).concat(Object.keys(this.cookies))).forEach(n=>{t[n]!==this.cookies[n]&&this._emitChange({name:n,value:K(this.cookies[n])})})}_startPolling(){this.pollingInterval=setInterval(this.update,300)}_stopPolling(){this.pollingInterval&&clearInterval(this.pollingInterval)}get(t,i={}){return i.doNotUpdate||this.update(),K(this.cookies[t],i)}getAll(t={}){t.doNotUpdate||this.update();const i={};for(let n in this.cookies)i[n]=K(this.cookies[n],t);return i}set(t,i,n){n?n=Object.assign(Object.assign({},this.defaultSetOptions),n):n=this.defaultSetOptions;const s=typeof i=="string"?i:JSON.stringify(i);this.cookies=Object.assign(Object.assign({},this.cookies),{[t]:s}),this.HAS_DOCUMENT_COOKIE&&(document.cookie=se(t,s,n)),this._emitChange({name:t,value:i,options:n})}remove(t,i){const n=i=Object.assign(Object.assign(Object.assign({},this.defaultSetOptions),i),{expires:new Date(1970,1,1,0,0,1),maxAge:0});this.cookies=Object.assign({},this.cookies),delete this.cookies[t],this.HAS_DOCUMENT_COOKIE&&(document.cookie=se(t,"",n)),this._emitChange({name:t,value:void 0,options:i})}addChangeListener(t){this.changeListeners.push(t),this.HAS_DOCUMENT_COOKIE&&this.changeListeners.length===1&&(typeof window=="object"&&"cookieStore"in window?window.cookieStore.addEventListener("change",this.update):this._startPolling())}removeChangeListener(t){const i=this.changeListeners.indexOf(t);i>=0&&this.changeListeners.splice(i,1),this.HAS_DOCUMENT_COOKIE&&this.changeListeners.length===0&&(typeof window=="object"&&"cookieStore"in window?window.cookieStore.removeEventListener("change",this.update):this._stopPolling())}}function ht(e,{doNotParse:t=!1,autoUpdateDependencies:i=!1}={},n=new pt){const s=i?[...e||[]]:e;let a=n.getAll({doNotParse:!0});const u=L.ref(0),m=()=>{const l=n.getAll({doNotParse:!0});yt(s||null,l,a)&&u.value++,a=l};return n.addChangeListener(m),it(()=>{n.removeChangeListener(m)}),{get:(...l)=>(i&&s&&!s.includes(l[0])&&s.push(l[0]),u.value,n.get(l[0],{doNotParse:t,...l[1]})),getAll:(...l)=>(u.value,n.getAll({doNotParse:t,...l[0]})),set:(...l)=>n.set(...l),remove:(...l)=>n.remove(...l),addChangeListener:(...l)=>n.addChangeListener(...l),removeChangeListener:(...l)=>n.removeChangeListener(...l)}}function yt(e,t,i){if(!e)return!0;for(const n of e)if(t[n]!==i[n])return!0;return!1}const gt=()=>{let e=!1;return function(t){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4)))&&(e=!0)}(navigator.userAgent||navigator.vendor||window.opera),e},me=(e,t)=>H(e,fe(t)),H=(e,t)=>{const i={};return re(t).forEach(n=>i[n]=H(e==null?void 0:e[n],t[n])),"$item"in t&&(e==null||e.forEach((n,s)=>i[s]=H(n,t.$item))),i.$valid=(!t.$asserts||t.$asserts.every(n=>n(e)))&&re(i).every(n=>i[n].$valid),i},fe=e=>ge(Object.entries(e).reduce((t,[i,n])=>(t[`${i.replaceAll(".[]",".$item")}${i.length?".":""}$asserts`]=Array.isArray(n)?n:[n],t),{})),bt=(e,t,i)=>(e=JSON.parse(JSON.stringify(e)),te(e).forEach(s=>{const a=s.replace(/\.[0-9]+/g,".[]");O(t,`${s}.$valid`)===!1&&i[a]!==void 0&&N(e,s,i[a])}),e),re=e=>Object.keys(e).filter(t=>!t.startsWith("$")),wt=e=>typeof e=="boolean",At=e=>typeof e=="number",vt=e=>typeof e=="string",j=e=>Array.isArray(e),B=e=>typeof e=="object"&&!j(e)&&e!==null,Rt=e=>e instanceof Date,Pt=e=>typeof e=="function",pe=e=>e===null,he=e=>e===void 0,ye=e=>pe(e)||he(e),Et=e=>!ye(e),kt=e=>!!e,It=e=>!e,Ct=(e,t)=>j(e)&&e.every(i=>t(i)),St=(e,t)=>B(e)&&Object.values(e).every(i=>t(i)),Ot=(e,t)=>me(e,t).$valid,$t=(e,t,i=!1)=>{j(t)||(t=[t]);let n=e;for(;n;){if(n.classList&&t[i?"every":"some"](s=>n.classList.contains(s)))return!0;n=n.parentElement}return!1},Tt=()=>typeof window<"u"&&typeof window.document<"u",T=()=>typeof process<"u"&&process.versions!=null&&process.versions.node!=null,O=(e,t,i)=>{const n=typeof t=="string"?t.split("."):[t];let s=e;const a=m=>m!=null,u=m=>typeof m=="object";for(const[m,l]of n.entries()){if(!a(s))return i;if(m===n.length-1)return a(s[l])?s[l]:i;if(!u(s[l]))return i;s=s[l]}return i},N=(e,t,i)=>{const n=typeof t=="string"?t.split("."):[t],s=m=>typeof m=="number"||/^\d$/g.test(m),a=m=>parseInt(m,10);let u=e;return n.forEach((m,l)=>{if(l===n.length-1)u[m]=i;else{const r=s(n[l+1])?[]:{};m=s(m)?a(m):m,u[m]=u[m]??r,u=u[m]}}),e},ge=(e,t={})=>{const i=B(e)?Object.entries(e):e;for(const[n,s]of i)N(t,n,s);return t},Lt=(e,t={})=>{const i=B(e)?Object.entries(e):e;for(const[n,s]of i)N(t,n,s(t,n));return t},be=e=>{if(typeof e=="object"){if(Array.isArray(e))return[...e];if(Object(e)===e)return{...e}}return e},ee=(e,t)=>{const i={...e};for(const[n,s]of Object.entries(t))n in i&&typeof i[n]=="object"&&typeof s=="object"?i[n]=ee(i[n],s):i[n]=be(s);return i},te=(e,t=()=>!0,i="")=>{const n=[];for(const s in e){const a=e[s],u=i?`${i}.${s}`:s;t(s,u,a)&&(n.push(u),(B(a)||j(a))&&n.push(...te(a,t,u)))}return n},Nt=e=>e.startsWith("http:")?e.replace("http:","https:"):e,Mt=(e,t=!1)=>e.startsWith("http:")||e.startsWith("https:")?e:t?`https://${e}`:`http://${e}`,we=()=>typeof window<"u"&&(window!=null&&window.location)?new URL(window.location).hostname:void 0,oe=()=>{const e=we();return!e||e==="localhost"?e:`.${e}`},Dt=()=>({path:"/"}),xt=e=>({path:"/",domain:e,sameSite:"none",secure:!0}),J=e=>{if(!(T()||!e))return e.startsWith("localhost")?Dt():xt(e)};function Ae(){const e=ht(),t=a=>e.get(a),i=(a,u)=>e.set(a,u,J(oe())),n=a=>{e.remove(a),e.remove(a,J(we())),e.remove(a,J(oe()))};return{getItem:t,setItem:i,removeItem:n,clear:()=>Object.keys(e.getAll()).forEach(a=>n(a))}}let U=null;function _(e={auth:"token",refresh:"refresh_token",expiration:"token_expiration_date"},t=Ae()){if(U)return U;function i(){return t.getItem(e.auth)}function n(){return t.getItem(e.refresh)}function s(){return t.getItem(e.expiration)}function a(p,h){const b=c(p);if(!b.exp)throw new Error("Invalid JWT token.");t.setItem(e.auth,p),t.setItem(e.refresh,h),t.setItem(e.expiration,((b.exp-60)*1e3).toString())}function u(){t.removeItem(e.auth),t.removeItem(e.refresh),t.removeItem(e.expiration)}function m(){return l()&&!r()}function l(){return!!i()}function r(){const p=s();return p?new Date(p)<new Date:!0}function c(p){return JSON.parse(atob(p.split(".")[1]))}function f(){return t}return U={keys:e,getAuthToken:i,getRefreshToken:n,getExpiration:s,authenticate:a,clear:u,isAuthenticated:m,hasAuth:l,isExpired:r,getStorage:f},U}function _t(e){let t={"Content-Type":"application/json"};e&&i(e);function i(b,w=!1){return t=w?b:{...t,...b},this}function n(){return t}function s(b,w){return t[b]=w,this}function a(b){return t[b]}function u(b){return t[b]&&delete t[b],this}function m(b){return s("Authorization","Bearer "+b),this}function l(){return u("Authorization"),this}function r(){return!!a("Authorization")}function c(){return s("Content-Type","multipart/form-data"),this}function f(){return s("Content-Type","application/json"),this}function p(){return a("Content-Type")==="multipart/form-data"}function h(){return a("Content-Type")==="application/json"}return{setHeaders:i,getHeaders:n,setHeader:s,getHeader:a,removeHeader:u,setAuthorization:m,removeAuthorization:l,hasAuthorization:r,setFormData:c,setJson:f,isFormData:p,isJson:h}}function jt(e){let t=null;e&&i(e);function i(s){if(s=s.toLowerCase(),!["get","post","put","patch","delete"].includes(s))throw new Error("Invalid method.");return t=s,this}function n(){return t}return{setMethod:i,getMethod:n}}function Bt(e,t,i){let n=null;i&&s(i);function s(r){if(!["post","put","patch"].includes(e.getMethod()))throw new Error("Payload can only be set for POST, PUT and PATCH requests.");return r instanceof FormData?t.setFormData():u(r)&&(r=m(r),t.setFormData()),t.isFormData()&&e.getMethod()==="put"&&(e.setMethod("post"),r.append("_method","PUT")),n=r,this}function a(){return n}function u(r){for(const c in r){const f=r[c];if(l(f))return!0;if(typeof f=="object"&&u(f))return!0}return!1}function m(r,c=null,f=0){const p=!c;p&&(c=new FormData);for(const h in r){const b=r[h];l(b)?(r[h]="<<FileIndex:"+f+">>",c.append(f,b,b.name),f++):typeof b=="object"&&(r[h]=m(r[h],c,f))}return p?(c.append("payload",JSON.stringify(r)),c):r}function l(r){return typeof File<"u"&&r instanceof File||typeof Blob<"u"&&r instanceof Blob}return{setPayload:s,getPayload:a}}const k=class k{constructor(t={}){C(this,"level",3);C(this,"logger");C(this,"prefix");this.logger=t.logger||console,this.prefix=t.prefix||""}setLevel(t){this.level=t}debug(...t){this.level<=k.LEVEL_DEBUG&&V(this.logger.debug,this.prefix,t)}info(...t){this.level<=k.LEVEL_INFO&&V(this.logger.info,this.prefix,t)}warn(...t){this.level<=k.LEVEL_WARN&&V(this.logger.warn,this.prefix,t)}error(...t){this.level<=k.LEVEL_ERROR&&V(this.logger.error,this.prefix,t)}};C(k,"LEVEL_DEBUG",0),C(k,"LEVEL_INFO",1),C(k,"LEVEL_WARN",2),C(k,"LEVEL_ERROR",3),C(k,"LEVEL_OFF",4);let Q=k;const V=(e,t,i)=>{t?e(t,...i):e(...i)},A=new Q({prefix:"[SDK]"});let ve=null,Re=null,Pe=null,Ee="/",ke=null;const zt=()=>ve,Ut=e=>{if(A.info("[Config] Environment:",e),!e)throw new Error("Invalid environment.");ve=e},Vt=()=>Re,Ft=e=>{if(A.info("[Config] API Host:",e),!e)throw new Error("Invalid API host.");Re=e},qt=()=>ke,Ht=e=>{ke=e},Qt=()=>Pe,Gt=e=>{if(A.info("[Config] Main App Host:",e),!e)throw new Error("Invalid main app host.");Pe=e},Kt=e=>{A.info("[Config] Base Assets Urls:",e),Ee=e},Jt=()=>Ee,$={getEnvironment:zt,getApiHost:Vt,getErrorHandler:qt,setEnvironment:Ut,setApiHost:Ft,setErrorHandler:Ht,getMainAppHost:Qt,setMainAppHost:Gt,setBaseAssetsUrl:Kt,getBaseAssetsUrl:Jt};function Wt(e){const t=$.getApiHost().replace(/\/$/g,"");let i=null,n={},s={};e&&m(e);function a(){return t+l()+h()}function u(){return l(!0,!0)}function m(d){return i="/"+d.replace(/^\//g,""),this}function l(d=!0,P=!1){return d?i.replace(/:(\w+)/g,(E,I)=>P?"*":s[I]||":"+I):i}function r(d){return n=d,this}function c(d,P){return n[d]=P,this}function f(d){return n[d]&&delete n[d],this}function p(){return Object.keys(n).length>0}function h(d=!0){if(!p())return"";let P="";for(const E in n)if(Array.isArray(n[E]))for(const I of n[E])P+=(P.length?"&":"")+`${E}[]=`+I;else P+=(P.length?"&":"")+E+"="+n[E];return(d?"?":"")+P}function b(d){return s=d,this}function w(d,P){return s[d]=P,this}function S(d){return s[d]&&delete s[d],this}return{setPath:m,getPath:l,getUri:a,getMockUri:u,setQueryParams:r,setQueryParam:c,removeQueryParam:f,hasQuery:p,getQueryString:h,setRouteParams:b,setRouteParam:w,removeRouteParam:S}}function Zt(e){let t=[];function i(){return t=r(arguments),u(),this}function n(){return t.length>0}function s(c){return t.includes(c.trim())?this:(t.push(c.trim()),u(),this)}function a(c){const f=t.indexOf(c.trim());return f===-1?this:(t.splice(f,1),u(),this)}function u(){t.length?e.setQueryParam("groups",l(t)):e.removeQueryParam("groups")}function m(c){return c.split(",").map(f=>f.trim())}function l(c){return c.join(",")}function r(c){let f=[];return c.length===1?typeof c[0]=="string"?f=m(c[0]):Array.isArray(c[0])&&(f=c[0]):f=Array.from(c),f}return{setGroups:i,hasGroups:n,addGroup:s,removeGroup:a}}function Xt(e){let t=!1,i=!1,n=1,s=10;function a(){return t=!0,u(),this}function u(){i=!0;const h=p(arguments);return r(h.page||1,!1),c(h.perPage||s,!1),f(),this}function m(){return i=!1,f(),this}function l(){return i}function r(h,b=!0){return t=!0,i=!0,n=h,b&&f(),this}function c(h,b=!0){return t=!0,i=!0,s=h,b&&f(),this}function f(){t?l()?(e.removeQueryParam("pagination"),e.setQueryParam("page",n),e.setQueryParam("nbResultPerPage",s)):(e.removeQueryParam("page"),e.removeQueryParam("nbResultPerPage"),e.setQueryParam("pagination","false")):(e.removeQueryParam("page"),e.removeQueryParam("nbResultPerPage"),e.removeQueryParam("pagination"))}function p(h){if(h.length===1&&typeof h[0]=="object")return h[0];const b={};return h.length>=1&&(b.page=h[0]),h.length>=2&&(b.perPage=h[1]),b}return{isList:a,paginate:u,disablePagination:m,hasPagination:l,setPage:r,setPerPage:c}}function Yt(e){let t=!1,i="id",n="ASC";function s(){t=!0;const c=r(arguments);return c.orderBy&&u(c.orderBy,!1),c.orderDir&&m(c.orderDir,!1),l(),this}function a(){return t}function u(c,f=!0){return t=!0,i=c,f&&l(),this}function m(c,f=!0){if(c=c.toUpperCase(),["ASC","DESC"].indexOf(c)===-1)throw new Error("Invalid order direction");return t=!0,n=c,f&&l(),this}function l(){a()&&(e.setQueryParam("orderBy",i),e.setQueryParam("orderDirection",n))}function r(c){if(c.length===1&&typeof c[0]=="object")return c[0];const f={};return c.length>=1&&(f.orderBy=c[0]),c.length>=2&&(f.orderDir=c[1]),f}return{setOrder:s,hasOrder:a,setOrderBy:u,setOrderDir:m}}function en(){let e=!1;function t(){return e=!0,this}function i(){return e}return{setSilent:t,isSilent:i}}function tn(){let e="json";function t(n="json"){if(["arraybuffer","document","json","text","stream","blob"].indexOf(n)===-1)throw new Error("Invalid response type");return e=n,this}function i(){return e}return{setResponseType:t,getResponseType:i}}function nn(e){function t(){return e}function i(){return e.data}function n(){return e.data}return{getResponse:t,getData:i,getPayload:n}}function sn(e,t=!1){let i=!1,n=!1;return e.response?(i=!0,n=!0):e.request&&(i=!0),!t&&$.getErrorHandler()&&$.getErrorHandler()(e),{sent:i,responded:n,error:e}}function rn(e){function t(){return e}function i(){return e.data}function n(){return e.data}function s(){return e.data["@type"]==="hydra:Collection"}function a(){return s()?e.data["hydra:member"]:null}function u(){return s()?e.data["hydra:totalItems"]:null}function m(){return s()?e.data["hydra:view"]&&e.data["hydra:view"]["hydra:last"]:!1}function l(){return!s()||!m()?null:parseInt(e.data["hydra:view"]["@id"].match(/page=(\d+)/)[1])}function r(){return!s()||!m()?null:parseInt(e.data["hydra:view"]["hydra:last"].match(/page=(\d+)/)[1])}return{getResponse:t,getData:i,getPayload:n,isCollection:s,getCollection:a,getTotal:u,hasPagination:m,getPage:l,getPages:r}}function on(e,t,i,n,s,a){async function u(){const l=i.getMethod(),r=t.getUri(),c=e.getHeaders(),f=n.getPayload(),p=[r];["post","put","patch"].includes(l)&&p.push(f||{}),p.push({headers:c,responseType:a.getResponseType()}),A.info("[Request] Sending request:",`[${l.toUpperCase()}]`,r);try{const h=await et[l](...p);return m(h)}catch(h){throw sn(h,s.isSilent())}}function m(l){if(l.headers){const r=Object.keys(l.headers),c=r.map(f=>f.toLowerCase()).indexOf("content-type");if(c!==-1&&l.headers[r[c]].includes("application/ld+json"))return rn(l)}return nn(l)}return{send:u}}function R(e,t="get",i=null){const n=_t(),s=Wt(e),a=jt(t),u=Bt(a,n,i),m=Zt(s),l=Xt(s),r=Yt(s),c=en(),f=tn(),p=on(n,s,a,u,c,f);return{...n,...s,...a,...u,...m,...l,...r,...c,...f,...p}}function y(e,t="get",i=null){const n=R(e,t,i),s=_();s.isAuthenticated()&&n.setAuthorization(s.getAuthToken());const a=n.send;return n.send=async function(){if(!n.hasAuthorization())throw new Error("::SDK Request:: Request cannot be sent, missing authorization header.");return a()},n}const an=(e,t)=>y("/v2/activity/candidate/:candidateId/establishment/:establishmentId").setRouteParams({candidateId:e,establishmentId:t}),cn=()=>({listByCandidateAndEstablishment:an}),un=(e,t,i)=>y("/candidate/:candidateId/share/establishment/:establishmentId").setMethod("post").setRouteParams({candidateId:e,establishmentId:t}).setPayload(i),ln=(e,t)=>y("/candidate/:candidateId/archive/establishment/:establishmentId").setRouteParams({candidateId:e,establishmentId:t}),dn=(e,t)=>y("/candidate/:candidateId/archive/establishment/:establishmentId").setMethod("post").setRouteParams({candidateId:e,establishmentId:t}),mn=(e,t)=>y("/candidate/:candidateId/archive/establishment/:establishmentId").setMethod("delete").setRouteParams({candidateId:e,establishmentId:t}),fn=(e,t)=>y("/v2/candidates/lookup").setQueryParam("email",e).setQueryParam("establishment-id",t),pn=(e,t)=>y("/v2/candidates").setMethod("post").setQueryParam("establishment-id",e).setPayload(t),hn=(e,t,i)=>y("/v2/candidates/:candidateId").setQueryParam("establishment-id",t).setRouteParams({candidateId:e}).setMethod("put").setPayload(i),yn=e=>y("/candidate/register/close/:registrationToken").setMethod("post").setRouteParams({registrationToken:e}),gn=e=>y("/candidate/register/open").setMethod("post").setQueryParam("groups","register:token").setPayload(e),bn=(e,t)=>y("/establishment/:establishmentId:/candidate/invitation").setRouteParams({establishmentId:e}).setMethod("post").setPayload(t),wn=()=>({share:un,isArchived:ln,archive:dn,unarchive:mn,lookupCandidate:fn,createCandidate:pn,updateCandidate:hn,closeIncompleteRegistration:yn,openNewRegistration:gn,updateInvitation:bn}),An=(e,t)=>y("/comment/establishment/:establishmentId/candidate/:userId").setRouteParams({establishmentId:e,userId:t}),vn=(e,t,i)=>y("/comment/establishment/:establishmentId/candidate/:userId").setRouteParams({establishmentId:e,userId:t}).setMethod("post").setPayload(i),Rn=(e,t)=>y("/comment/:commentId").setRouteParams({commentId:e}).setMethod("put").setPayload(t),Pn=e=>y("/comment/:commentId").setRouteParams({commentId:e}).setMethod("delete"),En=()=>({getForEstablishmentCandidate:An,postForEstablishmentCandidate:vn,update:Rn,remove:Pn}),kn=()=>R("contractType").isList().addGroup("Term:id").addGroup("Term:name"),In=(e,t=!0)=>y("contractType/establishment/:establishmentId").isList().setRouteParams({establishmentId:e}).setQueryParam("all",t).addGroup("Term:id").addGroup("Term:name"),Cn=()=>({list:kn,listByEstablishment:In}),Sn=e=>y("/v2/talents").isList().setQueryParam("establishment-id",e),On=e=>y("/v2/talent/mark-as-seen/:talentId").setRouteParams({talentId:e}).setMethod("post"),$n=()=>({list:Sn,markAsSeen:On}),Tn=(e,t,i)=>y("/cvtheque/establishment/:establishmentId/candidate/:candidateId/label/synchronize").setRouteParams({establishmentId:e,candidateId:t}).setMethod("post").setPayload(i),Ln=()=>({syncCandidateLabels:Tn}),Nn=()=>R("diploma").isList().addGroup("Term:id").addGroup("Term:name"),Mn=()=>({list:Nn}),Dn=e=>y("document/candidate/:candidateId").setRouteParams({candidateId:e}).isList().disablePagination(),xn=(e,t)=>y("document/candidate/:candidateId/establishment/:establishmentId/recruiter").setRouteParams({candidateId:e,establishmentId:t}).isList().disablePagination(),_n=(e,t)=>y("document/candidate/:candidateId/establishment/:establishmentId/candidate").setRouteParams({candidateId:e,establishmentId:t}).isList().disablePagination(),jn=e=>y("document/recruiter").setMethod("post").setPayload(e),Bn=e=>y("document/:documentId").setRouteParams({documentId:e}).setMethod("delete"),zn=()=>({listByCandidate:Dn,listByCandidateAndEstablishmentFromRecruiter:xn,listByCandidateAndEstablishmentFromCandidate:_n,addFromRecruiter:jn,remove:Bn}),Un=(e,t)=>y("/v2/establishments/:establishmentId/email-history").setRouteParams({establishmentId:t}).setQueryParam("receiverId",e).isList().disablePagination(),Vn=()=>({listByCandidateAndEstablishment:Un}),Fn=(e,t)=>y("/email/candidate/:candidateId").setMethod("post").setRouteParams({candidateId:e}).setPayload(t),qn=(e,t)=>y("/v2/emails/send").setMethod("post").setPayload({recipientIds:e,...t}),Hn=()=>({sendToCandidate:Fn,sendToRecipients:qn}),Qn=(e,t=!0)=>{const i=y("/v2/establishments/:establishmentId/email-templates").setRouteParams({establishmentId:e}).isList().disablePagination();return t&&i.setQueryParam("global",!0),i},Gn=()=>y("/v2/self/email-templates").isList().disablePagination(),Kn=()=>({listByEstablishment:Qn,listSelf:Gn}),Jn=(e,t)=>y("establishment-career/:establishmentId/:versionId").setRouteParams({establishmentId:e,versionId:t}),Wn=(e,t="published")=>y("establishment-career/:establishmentId/state/:state").setRouteParams({establishmentId:e,state:t}),Zn=(e,t,i=null)=>{const n=i!==null?y("establishment-career/:establishmentId/:versionId").setRouteParams({establishmentId:e,versionId:i}):y("establishment-career/:establishmentId").setRouteParams({establishmentId:e});return n.setMethod("post").setPayload(t),n},Xn=(e,t)=>y("establishment-career/:establishmentId/logo-banner").setMethod("post").setRouteParams({establishmentId:e}).setPayload(t),Yn=(e,t,i)=>y("establishment-career/:establishmentId/publish/:versionId").setMethod("post").setRouteParams({establishmentId:e,versionId:t}).setPayload(i),ei=()=>({readById:Jn,readByState:Wn,upsert:Zn,uploadLogoAndBanner:Xn,publish:Yn}),ti=e=>R("establishment/:establishmentId").setRouteParams({establishmentId:e}),ni=e=>y("establishment/:establishmentId/authorizations").setRouteParams({establishmentId:e}),ne=()=>({read:ti,authorizations:ni}),ii=e=>R("feature-flag/maintenance").setMethod("post").setPayload(e),si=(e,t)=>R("feature-flag/establishment").setMethod("post").setPayload({establishment:e,flagName:t}),ri=()=>({maintenanceModeEnabled:ii,forEstablishment:si}),oi=()=>R("job").isList().addGroup("Term:id").addGroup("Term:name"),ai=(e,t=!0)=>y("job/establishment/:establishmentId").isList().setRouteParams({establishmentId:e}).setQueryParam("all",t).addGroup("Term:id").addGroup("Term:name"),ci=()=>({list:oi,listByEstablishment:ai}),ui=e=>y("/label/establishment/:establishmentId").isList().setRouteParams({establishmentId:e}),li=(e,t)=>y("/label/establishment/:establishmentId").setMethod("post").setRouteParams({establishmentId:e}).setPayload(t),di=(e,t)=>y("/label/:labelId").setMethod("put").setRouteParams({labelId:e}).setPayload(t),mi=e=>y("/label/:labelId").setMethod("delete").setRouteParams({labelId:e}),fi=(e,t,i)=>y("/label/establishment/:establishmentId/candidate/:candidateId/synchronize").setMethod("post").setPayload(i).setRouteParams({establishmentId:e,candidateId:t}),pi=()=>({listByEstablishment:ui,addToEstablishment:li,update:di,remove:mi,syncForCandidate:fi}),hi=e=>R("offer/:offerId").setRouteParams({offerId:e}),yi=()=>({read:hi}),gi=(e,t=!1)=>{const i=y("/recruiter/establishment/:establishmentId").isList().setRouteParams({establishmentId:e});return t&&i.setQueryParam("exclude-me",1),i},bi=()=>({listByEstablishment:gi}),wi=e=>y("/recruitment/:recruitmentId").setRouteParams({recruitmentId:e}),Ai=e=>y("/recruitment/mine/establishment/:establishmentId").isList().setRouteParams({establishmentId:e}),vi=(e,t)=>y("/recruitment/mine/establishment/:establishmentId/has-not/candidate/:candidateId").isList().setRouteParams({establishmentId:e,candidateId:t}),Ri=(e,t)=>y("/recruitment/mine/establishment/:establishmentId/has/candidate/:candidateId").isList().setRouteParams({establishmentId:e,candidateId:t}),Pi=(e,t)=>y("/recruitment/establishment/:establishmentId/has/candidate/:candidateId").isList().setRouteParams({establishmentId:e,candidateId:t}),Ei=(e,t)=>y("/recruitment/:recruitmentId/candidate").setMethod("put").setRouteParams({recruitmentId:e}).setPayload(t),ki=(e,t)=>y("/recruitment/:recruitmentId/candidate/:candidateId").setMethod("delete").setRouteParams({recruitmentId:e,candidateId:t}),Ii=()=>({read:wi,mineByEstablishment:Ai,mineWithoutCandidate:vi,mineWithCandidate:Ri,withCandidate:Pi,addCandidates:Ei,removeCandidate:ki}),Ci=(e,t,i,n=null)=>{const s=R("candidate/register/open").setMethod("post"),a={email:e};return t==="establishment"&&(a.establishmentId=i),t==="offer"&&(a.offerId=i),n&&(a.referer=n),s.setPayload(a),s},Si=(e,t)=>R("candidate/register/update/:token").setMethod("post").setRouteParams({token:e}).setPayload(t),Oi=e=>R("candidate/register/read/:token").setRouteParams({token:e}),$i=e=>R("candidate/register/close/:token").setMethod("post").setRouteParams({token:e}),Ti=()=>({open:Ci,update:Si,read:Oi,close:$i}),Li=(e,t)=>y("/v2/registrations/lookup").setQueryParam("candidate-id",e).setQueryParam("establishment-id",t),Ni=()=>({lookupEstablishment:Li}),Mi=()=>R("speciality").isList().addGroup("Term:id").addGroup("Term:name"),Di=(e,t=!0)=>y("speciality/establishment/:establishmentId").isList().setRouteParams({establishmentId:e}).setQueryParam("all",t).addGroup("Term:id").addGroup("Term:name"),xi=()=>({list:Mi,listByEstablishment:Di}),_i=e=>y("/tag/public/establishment/:establishmentId").isList().setRouteParams({establishmentId:e}),ji=()=>({listByEstablishment:_i}),Bi=(e,t)=>y("/v2/talents/lookup").setQueryParam("candidate-id",e).setQueryParam("establishment-id",t),zi=e=>y("/v2/talents/index").setMethod("post").setPayload(e),Ui=()=>({lookupTalent:Bi,addCandidateToTalentPool:zi}),Vi=e=>R("user/email/isset/:email").setRouteParams({email:e}),Fi=()=>y("user/self").addGroup("user:self"),qi=e=>y("/user/:uuid").setRouteParams({uuid:e}),Hi=e=>R("/user/:uuid").setRouteParams({uuid:e}),Qi=e=>y("/user/:id/uuid").setRouteParams({id:e}),ie=()=>({emailExists:Vi,self:Fi,byUuidPrivate:qi,byUuid:Hi,fetchUuid:Qi});let F;function Ie(){if(F)return F;const e={user:void 0,roles:[],establishments:{}},t=async()=>{if(!_().isAuthenticated())throw new Error("::SDK Authorization:: User not authenticated");const r=(await ie().self().send()).getData();e.user={id:r.id,email:r.email,firstName:r.firstName,lastName:r.lastName,avatar:r.avatar},e.roles=r.roles},i=async r=>{if(!_().isAuthenticated())throw new Error("::SDK Authorization:: User not authenticated");e.establishments[r]=(await ne().authorizations(r).send()).getData()},n=r=>{if(e.user===void 0)throw new Error("::SDK Authorization:: User not fetched");return e.roles.includes(r)};return F={fetchSelf:t,fetchPermission:i,hasRole:n,hasRoleRH:()=>n("ROLE_RH"),hasRoleCandidate:()=>n("ROLE_CANDIDATE"),hasRoleAdmin:()=>n("ROLE_ADMIN"),hasPermission:(r,...c)=>{const f=e.establishments[r];if(f===void 0)throw new Error(`::SDK Authorization:: Permissions not fetched for establishment ${r}`);return c.every(p=>f[p]===!0)},clear:()=>{e.user=void 0,e.roles=[],e.establishments={}}},F}async function Gi(e,...t){if(!_().isAuthenticated())throw"ERR_NOT_AUTHENTICATED";const n=Ie();await Promise.all([n.fetchSelf(),n.fetchPermission(e)]);for(let s=0;s<t.length;s++){const a=t[s];if(!n.hasPermission(e,a))throw"ERR_MISSING_PERMISSION"}}const Ki=tt.defineStore("authorization",{state:()=>({user:void 0,establishments:{}}),getters:{roles:e=>e.user.roles??[],isRH(){return this.roles.includes("ROLE_RH")},isCandidate(){return this.roles.includes("ROLE_CANDIDATE")},isAdmin(){return this.roles.includes("ROLE_ADMIN")}},actions:{async fetchSelf(e){if(this.user===void 0||e){const t=await ie().self().send();this.user=t.getData()}},async fetchPermission(e,t){if(!this.establishments[e]||t){const i=await ne().authorizations(e).send();this.establishments[e]=i.getData()}},hasPermission(e,...t){const i=this.establishments[e];return i===void 0?!1:t.every(n=>i[n]===!0)}}});let D=null;function g(){if(D)return D;const e=$.getEnvironment(),t=(()=>e==="prod"||e==="production"?"pPROC7dPoJ7XdxHrwsTQNXCGX79MJjhp":e==="staging"?"823rqOTwVk1ZCWVyBAdLInZ77TcFF0CF":"TMZX6evFnu87JrBHV5qLwHsld5C6hilZ")(),i=!!t,n=e!=="prod"&&e!=="production";let s=null;function a(){return i}function u(){const p=window.analytics=window.analytics||[];if(!p.initialize&&p.invoked)A.error("Segment snippet included twice.");else{p.invoked=!0,p.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","debug","page","once","off","on","addSourceMiddleware","addIntegrationMiddleware","setAnonymousId","addDestinationMiddleware"],p.factory=function(h){return function(){if(window.analytics.initialized)return window.analytics[h].apply(window.analytics,arguments);const b=Array.prototype.slice.call(arguments);return b.unshift(h),p.push(b),p}};for(let h=0;h<p.methods.length;h++){const b=p.methods[h];p[b]=p.factory(b)}p.load=function(h,b){const w=document.createElement("script");w.id="analytics-script",w.type="text/javascript",w.async=!0,w.src="https://cdn.segment.com/analytics.js/v1/"+h+"/analytics.min.js",w.onerror=()=>window.dispatchEvent(new Event("analytics-error"));const S=document.getElementsByTagName("script")[0];S.parentNode.insertBefore(w,S),p._loadOptions=b},p._writeKey=t,p.SNIPPET_VERSION="4.16.1",p.load(t),p.page(),p.ready(()=>window.dispatchEvent(new Event("analytics-ready")))}}async function m(){return s!==null||(s=new Promise((p,h)=>{if(!a())return f("Analytics is disabled."),p();if(window.addEventListener("analytics-ready",()=>{f("Analytics script loaded successfully."),p()}),window.addEventListener("analytics-error",()=>{f("Analytics script failed to load. Consider disabling your AdBlocker.",null,"error"),h()}),f("Loading Analytics script."),window.analytics)return p();u()})),s}async function l(p,h){if(!T())try{if(await this.analyticsScriptReady(),f("[identify]",[p,h]),a())return window.analytics.identify(p,h)}catch{f("[identify]",[p,h],"error")}}async function r(p,h,b){if(!T()){typeof b!="object"&&(b={});try{if(await this.analyticsScriptReady(),f("[page]",[p,h,b]),a())return window.analytics.page(p,{category:h,...b})}catch(w){console.log(w),f("[page]",[p,h,b],"error")}}}async function c(p,h,b){if(!T()){typeof b!="object"&&(b={});try{if(await this.analyticsScriptReady(),f("[track]",[p,h,b]),a())return window.analytics.track(p,{category:h,...b})}catch{f("[track]",[p,h,b],"error")}}}function f(p,h=[],b="info"){h||(h=[]),n&&A[b](`::SDK Analytics:: ${p}`,...h)}return D={analyticsScriptReady:m,isEnabled:a,identify:l,page:r,track:c,consoleMessage:f},D}g.destroy=()=>D=null;function Ce(){const e="Hubler Application";function t(r){if(!r)throw new Error(`Missing arguments for domain "${e}"`);const c=!!r.offerId;if(c&&!r.recruitmentId)throw new Error(`Missing argument "recruitmentId" for domain "${e}"`);return{companyId:r.establishmentId?r.establishmentId.toString():null,jobOfferId:c?r.offerId.toString():null,recruitmentId:c?r.recruitmentId.toString():null,selections:[c?"Application":"Spontaneous Application"]}}async function i(r){return g().page("Application Authentication Viewed",e,t(r))}async function n(r){return g().page("Application Magic Link Viewed",e,t(r))}async function s(r){return g().page("Application Job Viewed",e,t(r))}async function a(r){return g().page("Application Information Viewed",e,t(r))}async function u(r){return g().page("Application Document Viewed",e,t(r))}async function m(r){return g().page("Application Success Viewed",e,t(r))}async function l(r){if(!r.error)throw new Error(`Missing argument "error" for domain "${e}", event "Application Form Failed"`);return g().track("Application Form Failed",e,{...t(r),error:r.error})}return{applicationAuthenticationViewed:i,applicationMagicLinkViewed:n,applicationJobViewed:s,applicationInformationViewed:a,applicationDocumentViewed:u,applicationSuccessViewed:m,applicationFormFailed:l}}function Se(){const e="Profile";function t(d,P){var I;if(!d)throw new Error(`Missing arguments for domain "${e}"`);const E={companyId:d.companyId?d.companyId.toString():null,hublerId:(I=d.hublerId)==null?void 0:I.toString()};return P&&(E.productId=d.companyId?d.companyId+"_2":null),d.recruitmentId&&(E.recruitmentId=d.recruitmentId.toString()),d.selections&&(E.selections=d.selections),d.institutionId&&(E.institutionId=d.institutionId.map(String)),E}async function i(d){return g().track(d.name,e,t(d.properties),!0)}async function n(d){return g().track(d.name,e,t(d.properties,!0))}async function s(d){return g().track(d.name,e,t(d.properties,!0))}async function a(d){return g().track(d.name,e,t(d.properties,!0))}async function u(d){return g().track(d.name,e,t(d.properties,!0))}async function m(d){return g().track(d.name,e,t(d.properties,!0))}async function l(d){return g().track(d.name,e,t(d.properties,!0))}async function r(d){return g().track(d.name,e,t(d.properties,!0))}async function c(d){return g().track(d.name,e,t(d.properties,!0))}async function f(d){return g().track(d.name,e,t(d.properties,!0))}async function p(d){return g().track(d.name,e,t(d.properties,!0))}async function h(d){return g().track(d.name,e,t(d.properties,!0))}async function b(d){return g().track(d.name,e,t(d.properties,!0))}async function w(d){return g().page(d.name,d.properties.category,t(d.properties,!1))}async function S(d){return g().track(d.name,e,t(d.properties,!1))}return{profileDocumentDeleted:i,profileLabelAdded:n,profileLabelRemoved:s,profileShared:a,profileArchived:u,profileCandidateAdded:m,profileCommentAdded:l,profileDocumentAdded:r,profileDocumentDownloaded:c,profileDocumentRequested:f,profileRecruitmentAdded:p,profileRecruitmentRemoved:h,profileTabSelected:b,profileViewed:w,profileEmailSent:S}}function Oe(){const e="Recruitment";function t(n){if(!n)throw new Error(`Missing arguments for domain "${e}"`);const s={companyId:n.companyId?n.companyId.toString():null};return n.institutionId&&(s.institutionId=[n.institutionId.toString()]),n.origin&&(s.origin=n.origin.toString()),s}async function i(n){return g().track(n.name,e,{...t(n),recruitmentId:n.recruitmentId.toString(),count:parseInt(n.count)})}return{candidateAdded:i}}function $e(){const e="Visual Builder";function t(o,Ze){if(!o)throw new Error(`Missing arguments for domain "${e}"`);const M={companyId:o.companyId?o.companyId.toString():null};return Ze&&(M.productId=o.companyId?o.companyId+"_2":null),o.selections&&(M.selections=o.selections),o.error&&(M.error=o.error),o.institutionId&&(M.institutionId=[o.institutionId.toString()]),M}async function i(o){return g().page(o.name,e,t(o.properties,!0))}async function n(o){return g().track(o.name,e,t(o.properties),!0)}async function s(o){return g().track(o.name,e,t(o.properties,!0))}async function a(o){return g().page(o.name,e,t(o.properties,!0))}async function u(o){return g().page(o.name,e,t(o.properties,!0))}async function m(o){return g().track(o.name,e,t(o.properties,!0))}async function l(o){return g().page(o.name,e,t(o.properties,!0))}async function r(o){return g().page(o.name,e,t(o.properties,!0))}async function c(o){return g().page(o.name,e,t(o.properties,!0))}async function f(o){return g().track(o.name,e,t(o.properties,!0))}async function p(o){return g().page(o.name,e,t(o.properties,!0))}async function h(o){return g().page(o.name,e,t(o.properties,!0))}async function b(o){return g().track(o.name,e,t(o.properties,!0))}async function w(o){return g().track(o.name,e,t(o.properties,!0))}async function S(o){return g().page(o.name,e,t(o.properties,!0))}async function d(o){return g().page(o.name,e,t(o.properties,!0))}async function P(o){return g().page(o.name,e,t(o.properties,!0))}async function E(o){return g().page(o.name,e,t(o.properties,!0))}async function I(o){return g().page(o.name,e,t(o.properties,!1))}async function _e(o){return g().track(o.name,e,t(o.properties,!0))}async function je(o){return g().track(o.name,e,t(o.properties,!0))}async function Be(o){return g().track(o.name,e,t(o.properties,!0))}async function ze(o){return g().track(o.name,e,t(o.properties,!0))}async function Ue(o){return g().track(o.name,e,t(o.properties,!0))}async function Ve(o){return g().track(o.name,e,t(o.properties,!0))}async function Fe(o){return g().track(o.name,e,t(o.properties,!0))}async function qe(o){return g().track(o.name,e,t(o.properties,!0))}async function He(o){return g().track(o.name,e,t(o.properties,!0))}async function Qe(o){return g().track(o.name,e,t(o.properties,!0))}async function Ge(o){return g().track(o.name,e,t(o.properties,!0))}async function Ke(o){return g().track(o.name,e,t(o.properties,!0))}async function Je(o){return g().track(o.name,e,t(o.properties,!0))}async function We(o){return g().page(o.name,e,t(o.properties,!1))}return{careerSitePreviewViewed:i,careerSitePublished:n,setupBenefitCustomAdded:s,setupBenefitViewed:a,setupCandidateInformationViewed:u,setupContactAdded:m,setupContactViewed:l,setupEditionDoneViewed:r,setupExternalLinkViewed:c,setupImageUploaded:f,setupImageViewed:p,setupLocationViewed:h,setupPresentationContentAdded:b,setupPresentationNewTabAdded:w,setupPresentationViewed:S,setupSettingsDoneViewed:d,setupSocialNetworkViewed:P,setupThemeViewed:E,visualBuilderViewed:I,setupImageUploadFailed:_e,fastCopyLinkClicked:je,setupBenefitCustomDeleted:Be,setupBenefitCustomEdited:ze,setupContactDeleted:Ue,setupContactEdited:Ve,setupContactNewClicked:Fe,setupPresentationContentDeleted:qe,setupPresentationContentDuplicated:He,setupPresentationContentMoved:Qe,setupPresentationTabDeleted:Ge,setupPresentationTabEdited:Ke,setupPresentationTabMoved:Je,setupSEOViewed:We}}const ae=Object.freeze(Object.defineProperty({__proto__:null,useAnalyticsHublerApplication:Ce,useAnalyticsProfile:Se,useAnalyticsRecruitment:Oe,useAnalyticsVisualBuilder:$e},Symbol.toStringTag,{value:"Module"}));function Ji(){function e(i){return g().identify(i.id,{email:i.email,firstName:i.firstname,lastName:i.lastname,createdAt:i.createdAt,type:"Hubler",lang:"fr",medium:t()?"MOBILE_DEVICE":"WEB_BROWSER"})}function t(){let i=!1;return function(n){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(n)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(n.substr(0,4)))&&(i=!0)}(navigator.userAgent||navigator.vendor||window.opera),i}return{identifyCandidate:e}}let q=null;const Wi=async(e,t)=>{try{return await G(),A.info("[identify]",[e,t]),window.analytics.identify(e,t)}catch{A.error("[identify]",[e,t])}},Zi=async(e,t,i)=>{typeof i!="object"&&(i={});try{return await G(),A.info("[page]",[e,t,i]),window.analytics.page(e,{category:t,...i})}catch{A.error("[page]",[e,t,i])}},Xi=async(e,t,i)=>{typeof i!="object"&&(i={});try{return await G(),A.info("[track]",[e,t,i]),window.analytics.track(e,{category:t,...i})}catch{A.error("[track]",[e,t,i])}},Z=()=>{const e=$.getEnvironment();return e==="prod"||e==="production"?"pPROC7dPoJ7XdxHrwsTQNXCGX79MJjhp":e==="staging"?"823rqOTwVk1ZCWVyBAdLInZ77TcFF0CF":"TMZX6evFnu87JrBHV5qLwHsld5C6hilZ"},Te=()=>{const e=window.analytics=window.analytics||[];if(!e.initialize&&e.invoked)A.error("Segment snippet included twice.");else{e.invoked=!0,e.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","debug","page","once","off","on","addSourceMiddleware","addIntegrationMiddleware","setAnonymousId","addDestinationMiddleware"],e.factory=function(t){return function(){if(window.analytics.initialized)return window.analytics[t].apply(window.analytics,arguments);const i=Array.prototype.slice.call(arguments);return i.unshift(t),e.push(i),e}};for(let t=0;t<e.methods.length;t++){const i=e.methods[t];e[i]=e.factory(i)}e.load=function(t,i){const n=document.createElement("script");n.id="analytics-script",n.type="text/javascript",n.async=!0,n.src="https://cdn.segment.com/analytics.js/v1/"+t+"/analytics.min.js",n.onerror=()=>window.dispatchEvent(new Event("analytics-error"));const s=document.getElementsByTagName("script")[0];s.parentNode.insertBefore(n,s),e._loadOptions=i},e._writeKey=Z(),e.SNIPPET_VERSION="4.16.1",e.load(Z()),e.page(),e.ready(()=>window.dispatchEvent(new Event("analytics-ready")))}},G=()=>(q!==null||(q=new Promise((e,t)=>{if(window.addEventListener("analytics-ready",()=>{A.info("Analytics script loaded successfully."),e()}),window.addEventListener("analytics-error",()=>{A.error("Analytics script failed to load. Consider disabling your AdBlocker."),t()}),A.info("Loading Analytics script."),window.analytics)return e();Te()})),q),Yi={key:Z,appendScript:Te,ready:G,identify:Wi,page:Zi,track:Xi},es="AIzaSyDicyRD6rvVdnicp1tgV0ElazASNGbyyTs";let Le=!1;const Ne=()=>new Promise(e=>{T()||Le||window.google&&window.google.maps?e():(window.addEventListener("gmap-ready",()=>e()),is())}),ts=(e,t)=>Ne().then(()=>{T()||ns(e,t)}),ns=(e,t)=>{const i=new window.google.maps.places.Autocomplete(e,{componentRestrictions:{country:["fr","re","yt","gp","mq"]}});window.google.maps.event.addListener(i,"place_changed",()=>{const n=i.getPlace();n.formatted_address&&t&&t(n.formatted_address,n)})},is=()=>{window.onGmapScriptReady=()=>{};const e=document.createElement("script");e.src="https://maps.googleapis.com/maps/api/js?key="+es+"&libraries=places&callback=onGmapScriptReady",e.async=!0,e.defer=!0,e.onload=()=>window.dispatchEvent(new Event("gmap-ready")),document.body.appendChild(e),Le=!0},ss={scriptReady:Ne,autocompleteInput:ts},rs={common:{the:"le",from:"de"},timeAgo:{"just-now":"à l'instant",ago:"il y a {0}",in:"dans {0}","last-month":"le mois dernier","next-month":"le mois prochain",month:"mois | mois","last-year":"l'année dernière","next-year":"l'année prochaine",year:"an | ans",yesterday:"hier",tomorrow:"demain",day:"jour | jours","last-week":"la semaine dernière","next-week":"la semaine prochaine",week:"semaine | semaines",hour:"heure | heures",minute:"minute | minutes",second:"seconde | secondes"}},os={fr:rs};let X=null;const Me=()=>X,as=(e={})=>{let t=e.locale||"fr";const i=l=>t=l,n=()=>t,s=ee(os,(e==null?void 0:e.messages)||{}),a=(l,r)=>{const c=O(s,`${t}.${l}`);return c?r?cs(c,r):c:l},u=(l,r)=>{const c=O(s,`${t}.${l}`);return c?us(c,r):l};return X={t:a,tNode:u,setLocale:i,getLocale:n,install:l=>{l.config.globalProperties.$t=a,l.config.globalProperties.$tNode=u}},X},cs=(e,t)=>e?e.replace(/{{ ?([a-zA-Z_.]+) ?}}/g,(i,n)=>O(t,n)):null,us=(e,t)=>{if(!e)return null;const i=e.split(/(\{[{%]+[^{}]*[%}]+})/g).filter(n=>n!=="").map(n=>{const s=n.startsWith("{%")&&n.endsWith("%}")?"slot":n.startsWith("{{")&&n.endsWith("}}")?"variable":"text";if(s==="text")return()=>ce.text(n);n=n.replace(/[{}%]/g,"").trim();const a=n.match(/^[a-zA-Z_.]+/)[0];n=n.replace(a,"").trim();const u={};return n!==""&&([...n.matchAll(/([a-zA-Z_.]+)(=([a-zA-Z_.]+))?/g)].reduce((r,c)=>(c[3]===void 0?N(r,c[1],O(t,c[1])):N(r,c[1],O(t,c[3])),r),u),[...n.matchAll(/([a-zA-Z_.]+)="([^"]+)"/g)].reduce((r,c)=>{let f=c[2];return new RegExp(/^[0-9]*$/).exec(c[2])?f=parseInt(c[2]):new RegExp(/^(true|false)$/).exec(c[2])&&(f=c[2]==="true"),r[c[1]]=f,r},u)),m=>ce[s](a,t,m,u)});return{setup:(n,{slots:s})=>()=>i.map(a=>a(s))}},ce={slot:(e,t,i,n)=>L.h("span",{class:"node node--slot"},i[e.trim()](n)),variable:(e,t)=>L.h("span",{class:"node node--variable"},O(t,e.trim())),text:e=>L.h("span",{class:"node node--text"},e)};function ls(e){const{t}=Me(),i={justNow:t("timeAgo.just-now"),past:n=>n.match(/\d/)?t("timeAgo.ago",[n]):n,future:n=>n.match(/\d/)?t("timeAgo.in",[n]):n,month:(n,s)=>n===1?t(s?"timeAgo.last-month":"timeAgo.next-month"):`${n} ${t("timeAgo.month",n)}`,year:(n,s)=>n===1?t(s?"timeAgo.last-year":"timeAgo.next-year"):`${n} ${t("timeAgo.year",n)}`,day:(n,s)=>n===1?t(s?"timeAgo.yesterday":"timeAgo.tomorrow"):`${n} ${t("timeAgo.day",n)}`,week:(n,s)=>n===1?t(s?"timeAgo.last-week":"timeAgo.next-week"):`${n} ${t("timeAgo.week",n)}`,hour:n=>`${n} ${t("timeAgo.hour",n)}`,minute:n=>`${n} ${t("timeAgo.minute",n)}`,second:n=>`${n} ${t("timeAgo.second",n)}`,invalid:""};return nt.useTimeAgo(e,{fullDateFormatter:n=>n.toLocaleDateString(),messages:i})}function ds(){let e=null;function t(){return e}function i(){return e.controller}function n(){return"use"+e.controller.charAt(0).toUpperCase()+e.controller.slice(1)+"QSController"}function s(){return e.action}function a(){return e.arguments}function u(){return!!(e&&e.controller&&e.action)}function m(){window.location.search.length!==0&&(e=window.location.search.substring(1).split("&").reduce((l,r)=>{const c=r.split("=");return c[0]==="controller"||c[0]==="action"?l[c[0]]=decodeURIComponent(c[1]):l.arguments[c[0]]=decodeURIComponent(c[1]),l},{controller:null,action:null,arguments:{}}))}return m(),{getParams:t,getController:i,getControllerComposableName:n,getAction:s,getArguments:a,hasAction:u}}function ms(){async function e({domain:n,event:s,...a}){const u="useAnalytics"+n.charAt(0).toUpperCase()+n.slice(1);if(!t(u))throw new Error(`Domain ${n} is not defined`);const m=ae[u]();if(!i(m,s))throw new Error(`Event ${s} is not defined in domain ${n}`);return m[s](a)}function t(n){return!!ae[n]}function i(n,s){return!!n[s]}return{call:e}}const ue=Object.freeze(Object.defineProperty({__proto__:null,useAnalyticsQSController:ms},Symbol.toStringTag,{value:"Module"}));function fs(e){if(!e.hasAction())throw new Error("No action found in router");function t(){if(!i())throw new Error(`Controller ${e.getController()} not found`);const s=ue[e.getControllerComposableName()]();if(!n(s))throw new Error(`Action ${e.getAction()} not found in controller ${e.getController()}`);return s[e.getAction()](e.getArguments())}function i(){return e.getControllerComposableName()in ue}function n(s){return e.getAction()in s}return{dispatch:t}}function ps(){let e=!1;function t(s,a,u){n(),u()}function i(s,a,u){if(!e)return e=!0,t(s,a,u);u()}function n(){const s=ds();if(!s.hasAction())return;fs(s).dispatch()}return{vueRouterBeforeEach:t,vueRouterBeforeFirst:i,handle:n}}const De=(e,t,i)=>{const n={};for(const s of e)t.query[s]!==void 0&&(n[s]=t.query[s]);if(Object.keys(n).length){const s=JSON.parse(JSON.stringify(t));for(const a in n)delete s.query[a];i.replace(s)}return n},hs=(e,t,i)=>De([e],t,i)[e],ys=()=>({getAssetUrl:t=>`${$.getBaseAssetsUrl()}${t}`}),v=()=>$.getMainAppHost(),gs=()=>`${v()}/rh/establishments`,bs=e=>`${v()}/rh/establishment/${e}`,ws=e=>{var t;return typeof e=="string"?e:typeof e=="object"&&((t=e==null?void 0:e.urls)!=null&&t.display)?e.urls.display:null},As=()=>`${v()}/rh/dashboard`,vs=e=>`${v()}/candidate-invite/establishment/${e}`,Rs=(e,t=!1)=>t?`${v()}/cvbank/${e}`:`${v()}/rh/establishment/${e}/cvtheque`,Ps=(e,t)=>`${v()}/user-profile/establishment/${e}/user/${t}`,Es=e=>`${v()}/rh/establishment/${e}/recruitment`,ks=(e,t)=>`${v()}/rh/establishment/${e}/recruitment/${t}`,Is=(e,t)=>`${v()}/rh/establishment/${e}/recruitment/${t}/kanban`,Cs=e=>`${v()}/rh/establishment/${e}/career-configuration`,Ss=(e,t=null)=>t?`${v()}/career-website/${e}/${t}`:`${v()}/career-website/${e}`,Os=(e,t)=>`${v()}/career-website-preview/${e}/${t}`,$s=(e,t=null)=>{const i=v().replace("://",`://${e}.`);return t?`${i}?_version=${t}`:`${i}`},Ts=e=>`${v()}/rh/establishment/${e}/stats`,Ls=e=>`${v()}/rh/establishment/${e}/backoffice`,Ns=()=>`${v()}/rh/settings/general`;function Ms(){return{root:v,establishments:gs,establishment:bs,img:ws,dashboard:As,candidateInvite:vs,cvtheque:Rs,userProfile:Ps,recruitments:Es,recruitment:ks,recruitmentKanban:Is,career:Cs,careerConfig:Ss,careerPreview:Os,careerWebsite:$s,statistics:Ts,backoffice:Ls,userSettings:Ns}}const le=new Set;let x,Y={ignore:e=>e.startsWith("Ui")};const W=e=>{if(e!=null&&e.classList){e._cssChecked=!0;for(const t of e.classList)x.has(t)||le.has(t)||Y.ignore(t)||(le.add(t),A.error(`Undefined CSS class: ${t}`))}},xe=e=>{var t;for(const i of e)if(i!=null&&i.cssRules&&(i==null?void 0:i.cssRules.length)>0)xe(i.cssRules);else if(i.selectorText){const n=(t=i.selectorText)==null?void 0:t.match(/\.[\w-]+/g);if(n)for(const s of n)x.add(s.substr(1))}},Ds=(e={})=>{if(x)return x;x=new Set,Y={...Y,...e},xe(document.styleSheets),new MutationObserver(i=>{for(const n of i)if(n.type==="childList"&&(n!=null&&n.addedNodes)){for(const s of n.addedNodes)if(!(s.nodeType===3||s.nodeType===8)){W(s);for(const a of s.querySelectorAll("*"))W(a)}}else(n==null?void 0:n.attributeName)==="class"&&W(n.target)}).observe(document,{attributes:!0,childList:!0,subtree:!0})},xs="0.2.76";exports.Analytics=Yi;exports.BaseLogger=Q;exports.Gmap=ss;exports.SDKConfig=$;exports.SDKLogger=A;exports.VERSION=xs;exports._clone=be;exports._get=O;exports._map=Lt;exports._merge=ee;exports._pathList=te;exports._set=N;exports._setMany=ge;exports.buildObjectValidation=H;exports.consumeQueryParam=hs;exports.consumeQueryParams=De;exports.createI18n=as;exports.ensureScheme=Mt;exports.hasOrIsInClass=$t;exports.inBrowser=Tt;exports.inNode=T;exports.isArray=j;exports.isArrayOf=Ct;exports.isBoolean=wt;exports.isDate=Rt;exports.isFalsy=It;exports.isFunction=Pt;exports.isMobile=gt;exports.isNotNullOrUndefined=Et;exports.isNull=pe;exports.isNullOrUndefined=ye;exports.isNumber=At;exports.isObject=B;exports.isObjectOf=St;exports.isObjectValid=Ot;exports.isString=vt;exports.isTruthy=kt;exports.isUndefined=he;exports.sanitizeObject=bt;exports.secureScheme=Nt;exports.transpileAsserts=fe;exports.useActivityRepository=cn;exports.useAnalyticsHublerApplication=Ce;exports.useAnalyticsIdentify=Ji;exports.useAnalyticsProfile=Se;exports.useAnalyticsRecruitment=Oe;exports.useAnalyticsVisualBuilder=$e;exports.useAssetUrls=ys;exports.useAuthentication=_;exports.useAuthorization=Ie;exports.useAuthorizationStore=Ki;exports.useCanAccessEstablishmentMiddleware=Gi;exports.useCandidateRepository=wn;exports.useCommentRepository=En;exports.useContractTypeRepository=Cn;exports.useCookieStorage=Ae;exports.useCvbankRepository=$n;exports.useCvthequeRepository=Ln;exports.useDiplomaRepository=Mn;exports.useDocumentRepository=zn;exports.useDomainUrls=Ms;exports.useEmailHistoryRepository=Vn;exports.useEmailRepository=Hn;exports.useEmailTemplateRepository=Kn;exports.useEstablishmentCareerRepository=ei;exports.useEstablishmentRepository=ne;exports.useFeatureFlagRepository=ri;exports.useI18n=Me;exports.useJobRepository=ci;exports.useLabelRepository=pi;exports.useLocaleTimeAgo=ls;exports.useObjectValidation=me;exports.useOfferRepository=yi;exports.usePrivateRequest=y;exports.useQSAction=ps;exports.useRecruiterRepository=bi;exports.useRecruitmentRepository=Ii;exports.useRegisterRepository=Ti;exports.useRegistrationRepository=Ni;exports.useRequest=R;exports.useSpecialityRepository=xi;exports.useTagRepository=ji;exports.useTalentRepository=Ui;exports.useUndefinedCssClasses=Ds;exports.useUserRepository=ie;