@hublo/mstaff-client-sdk 0.2.24 → 0.2.26
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.
- package/dist/core.cjs +1 -1
- package/dist/core.js +175 -171
- package/package.json +1 -1
package/dist/core.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var le=Object.defineProperty;var de=(e,t,s)=>t in e?le(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;var I=(e,t,s)=>(de(e,typeof t!="symbol"?t+"":t,s),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("vue"),me=require("axios"),fe=require("pinia"),pe=require("@vueuse/core");var H={expireTimes:"1d",path:"; path=/",domain:"",secure:!1,sameSite:"; SameSite=Lax"},he=function(){function e(){this.current_default_config=H}return e.prototype.config=function(t){for(var s in this.current_default_config)this.current_default_config[s]=t[s]?t[s]:H[s]},e.prototype.get=function(t){var s=decodeURIComponent(document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*"+encodeURIComponent(t).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1"))||null;if(s&&s.substring(0,1)==="{"&&s.substring(s.length-1,s.length)==="}")try{s=JSON.parse(s)}catch{return s}return s},e.prototype.set=function(t,s,n,r,a,d,p){if(t){if(/^(?:expires|max-age|path|domain|secure|SameSite)$/i.test(t))throw new Error('Cookie name illegality. Cannot be set to ["expires","max-age","path","domain","secure","SameSite"] current key name: '+t)}else throw new Error("Cookie name is not found in the first argument.");s&&s.constructor===Object&&(s=JSON.stringify(s));var u="";if(n==null&&(n=this.current_default_config.expireTimes?this.current_default_config.expireTimes:""),n&&n!=0)switch(n.constructor){case Number:n===1/0||n===-1?u="; expires=Fri, 31 Dec 9999 23:59:59 GMT":u="; max-age="+n;break;case String:if(/^(?:\d+(y|m|d|h|min|s))$/i.test(n)){var i=n.replace(/^(\d+)(?:y|m|d|h|min|s)$/i,"$1");switch(n.replace(/^(?:\d+)(y|m|d|h|min|s)$/i,"$1").toLowerCase()){case"m":u="; max-age="+ +i*2592e3;break;case"d":u="; max-age="+ +i*86400;break;case"h":u="; max-age="+ +i*3600;break;case"min":u="; max-age="+ +i*60;break;case"s":u="; max-age="+i;break;case"y":u="; max-age="+ +i*31104e3;break}}else u="; expires="+n;break;case Date:u="; expires="+n.toUTCString();break}return document.cookie=encodeURIComponent(t)+"="+encodeURIComponent(s)+u+(a?"; domain="+a:this.current_default_config.domain?this.current_default_config.domain:"")+(r?"; path="+r:this.current_default_config.path?this.current_default_config.path:"; path=/")+(d==null?this.current_default_config.secure?"; Secure":"":d?"; Secure":"")+(p==null?this.current_default_config.sameSite?"; SameSute="+this.current_default_config.sameSite:"":p?"; SameSite="+p:""),this},e.prototype.remove=function(t,s,n){return!t||!this.isKey(t)?!1:(document.cookie=encodeURIComponent(t)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT"+(n?"; domain="+n:this.current_default_config.domain?this.current_default_config.domain:"")+(s?"; path="+s:this.current_default_config.path?this.current_default_config.path:"; path=/")+"; SameSite=Lax",!0)},e.prototype.isKey=function(t){return new RegExp("(?:^|;\\s*)"+encodeURIComponent(t).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(document.cookie)},e.prototype.keys=function(){if(!document.cookie)return[];for(var t=document.cookie.replace(/((?:^|\s*;)[^\=]+)(?=;|$)|^\s*|\s*(?:\=[^;]*)?(?:\1|$)/g,"").split(/\s*(?:\=[^;]*)?;\s*/),s=0;s<t.length;s++)t[s]=decodeURIComponent(t[s]);return t},e}(),j=null;function ye(){j==null&&(j=new he);var e=x.reactive(j);return{cookies:e}}function ge(){const{cookies:e}=ye();function t(a){return e.get(a)}function s(a,d){return e.set(a,d)}function n(a){return e.remove(a)}function r(){e.keys().forEach(a=>n(a))}return{getItem:t,setItem:s,removeItem:n,clear:r}}let O=null;function T(e={auth:"token",refresh:"refresh_token",expiration:"token_expiration_date"},t=ge()){if(O)return O;function s(){return t.getItem(e.auth)}function n(){return t.getItem(e.refresh)}function r(){return t.getItem(e.expiration)}function a(m,f){const h=o(m);if(!h.exp)throw new Error("Invalid JWT token.");t.setItem(e.auth,m),t.setItem(e.refresh,f),t.setItem(e.expiration,((h.exp-60)*1e3).toString())}function d(){t.removeItem(e.auth),t.removeItem(e.refresh),t.removeItem(e.expiration)}function p(){return u()&&!i()}function u(){return!!s()}function i(){const m=r();return m?new Date(m)<new Date:!0}function o(m){return JSON.parse(atob(m.split(".")[1]))}function l(){return t}return O={keys:e,getAuthToken:s,getRefreshToken:n,getExpiration:r,authenticate:a,clear:d,isAuthenticated:p,hasAuth:u,isExpired:i,getStorage:l},O}function be(e){let t={"Content-Type":"application/json"};e&&s(e);function s(h,R=!1){return t=R?h:{...t,...h},this}function n(){return t}function r(h,R){return t[h]=R,this}function a(h){return t[h]}function d(h){return t[h]&&delete t[h],this}function p(h){return r("Authorization","Bearer "+h),this}function u(){return d("Authorization"),this}function i(){return!!a("Authorization")}function o(){return r("Content-Type","multipart/form-data"),this}function l(){return r("Content-Type","application/json"),this}function m(){return a("Content-Type")==="multipart/form-data"}function f(){return a("Content-Type")==="application/json"}return{setHeaders:s,getHeaders:n,setHeader:r,getHeader:a,removeHeader:d,setAuthorization:p,removeAuthorization:u,hasAuthorization:i,setFormData:o,setJson:l,isFormData:m,isJson:f}}function Re(e){let t=null;e&&s(e);function s(r){if(r=r.toLowerCase(),!["get","post","put","patch","delete"].includes(r))throw new Error("Invalid method.");return t=r,this}function n(){return t}return{setMethod:s,getMethod:n}}function we(e,t,s){let n=null;s&&r(s);function r(i){if(!["post","put","patch"].includes(e.getMethod()))throw new Error("Payload can only be set for POST, PUT and PATCH requests.");return i instanceof FormData?t.setFormData():d(i)&&(i=p(i),t.setFormData()),t.isFormData()&&e.getMethod()==="put"&&(e.setMethod("post"),i.append("_method","PUT")),n=i,this}function a(){return n}function d(i){for(const o in i){const l=i[o];if(u(l))return!0;if(typeof l=="object"&&d(l))return!0}return!1}function p(i,o=null,l=0){const m=!o;m&&(o=new FormData);for(const f in i){const h=i[f];u(h)?(i[f]="<<FileIndex:"+l+">>",o.append(l,h,h.name),l++):typeof h=="object"&&(i[f]=p(i[f],o,l))}return m?(o.append("payload",JSON.stringify(i)),o):i}function u(i){return typeof File<"u"&&i instanceof File||typeof Blob<"u"&&i instanceof Blob}return{setPayload:r,getPayload:a}}const v=class v{constructor(t={}){I(this,"level",2);I(this,"logger");I(this,"prefix");this.logger=t.logger||console,this.prefix=t.prefix||""}setLevel(t){this.level=t}debug(...t){this.level<=v.LEVEL_DEBUG&&D(this.logger.debug,this.prefix,t)}info(...t){this.level<=v.LEVEL_INFO&&D(this.logger.info,this.prefix,t)}warn(...t){this.level<=v.LEVEL_WARN&&D(this.logger.warn,this.prefix,t)}error(...t){this.level<=v.LEVEL_ERROR&&D(this.logger.error,this.prefix,t)}};I(v,"LEVEL_DEBUG",0),I(v,"LEVEL_INFO",1),I(v,"LEVEL_WARN",2),I(v,"LEVEL_ERROR",3),I(v,"LEVEL_OFF",4);let N=v;const D=(e,t,s)=>{t?e(t,...s):e(...s)},E=new N({prefix:"[SDK]"});let Z=null,X=null,Y=null,ee="/",te=null;const Ae=()=>Z,Pe=e=>{if(E.info("[Config] Environment:",e),!e)throw new Error("Invalid environment.");Z=e},ve=()=>X,Ie=e=>{if(E.info("[Config] API Host:",e),!e)throw new Error("Invalid API host.");X=e},Ee=()=>te,Se=e=>{te=e},Ce=()=>Y,ke=e=>{if(E.info("[Config] Main App Host:",e),!e)throw new Error("Invalid main app host.");Y=e},$e=e=>{E.info("[Config] Base Assets Urls:",e),ee=e},Le=()=>ee,C={getEnvironment:Ae,getApiHost:ve,getErrorHandler:Ee,setEnvironment:Pe,setApiHost:Ie,setErrorHandler:Se,getMainAppHost:Ce,setMainAppHost:ke,setBaseAssetsUrl:$e,getBaseAssetsUrl:Le};function Me(e){const t=C.getApiHost().replace(/\/$/g,"");let s=null,n={},r={};e&&p(e);function a(){return t+u()+f()}function d(){return u(!0,!0)}function p(c){return s="/"+c.replace(/^\//g,""),this}function u(c=!0,A=!1){return c?s.replace(/:(\w+)/g,(P,S)=>A?"*":r[S]||":"+S):s}function i(c){return n=c,this}function o(c,A){return n[c]=A,this}function l(c){return n[c]&&delete n[c],this}function m(){return Object.keys(n).length>0}function f(c=!0){if(!m())return"";let A="";for(const P in n)if(Array.isArray(n[P]))for(const S of n[P])A+=(A.length?"&":"")+`${P}[]=`+S;else A+=(A.length?"&":"")+P+"="+n[P];return(c?"?":"")+A}function h(c){return r=c,this}function R(c,A){return r[c]=A,this}function $(c){return r[c]&&delete r[c],this}return{setPath:p,getPath:u,getUri:a,getMockUri:d,setQueryParams:i,setQueryParam:o,removeQueryParam:l,hasQuery:m,getQueryString:f,setRouteParams:h,setRouteParam:R,removeRouteParam:$}}function Te(e){let t=[];function s(){return t=i(arguments),d(),this}function n(){return t.length>0}function r(o){return t.includes(o.trim())?this:(t.push(o.trim()),d(),this)}function a(o){const l=t.indexOf(o.trim());return l===-1?this:(t.splice(l,1),d(),this)}function d(){t.length?e.setQueryParam("groups",u(t)):e.removeQueryParam("groups")}function p(o){return o.split(",").map(l=>l.trim())}function u(o){return o.join(",")}function i(o){let l=[];return o.length===1?typeof o[0]=="string"?l=p(o[0]):Array.isArray(o[0])&&(l=o[0]):l=Array.from(o),l}return{setGroups:s,hasGroups:n,addGroup:r,removeGroup:a}}function Oe(e){let t=!1,s=!1,n=1,r=10;function a(){return t=!0,d(),this}function d(){s=!0;const f=m(arguments);return i(f.page||1,!1),o(f.perPage||r,!1),l(),this}function p(){return s=!1,l(),this}function u(){return s}function i(f,h=!0){return t=!0,s=!0,n=f,h&&l(),this}function o(f,h=!0){return t=!0,s=!0,r=f,h&&l(),this}function l(){t?u()?(e.removeQueryParam("pagination"),e.setQueryParam("page",n),e.setQueryParam("nbResultPerPage",r)):(e.removeQueryParam("page"),e.removeQueryParam("nbResultPerPage"),e.setQueryParam("pagination","false")):(e.removeQueryParam("page"),e.removeQueryParam("nbResultPerPage"),e.removeQueryParam("pagination"))}function m(f){if(f.length===1&&typeof f[0]=="object")return f[0];const h={};return f.length>=1&&(h.page=f[0]),f.length>=2&&(h.perPage=f[1]),h}return{isList:a,paginate:d,disablePagination:p,hasPagination:u,setPage:i,setPerPage:o}}function De(e){let t=!1,s="id",n="ASC";function r(){t=!0;const o=i(arguments);return o.orderBy&&d(o.orderBy,!1),o.orderDir&&p(o.orderDir,!1),u(),this}function a(){return t}function d(o,l=!0){return t=!0,s=o,l&&u(),this}function p(o,l=!0){if(o=o.toUpperCase(),["ASC","DESC"].indexOf(o)===-1)throw new Error("Invalid order direction");return t=!0,n=o,l&&u(),this}function u(){a()&&(e.setQueryParam("orderBy",s),e.setQueryParam("orderDirection",n))}function i(o){if(o.length===1&&typeof o[0]=="object")return o[0];const l={};return o.length>=1&&(l.orderBy=o[0]),o.length>=2&&(l.orderDir=o[1]),l}return{setOrder:r,hasOrder:a,setOrderBy:d,setOrderDir:p}}function _e(){let e=!1;function t(){return e=!0,this}function s(){return e}return{setSilent:t,isSilent:s}}function xe(){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 s(){return e}return{setResponseType:t,getResponseType:s}}function Ne(e){function t(){return e}function s(){return e.data}function n(){return e.data}return{getResponse:t,getData:s,getPayload:n}}function je(e,t=!1){let s=!1,n=!1;return e.response?(s=!0,n=!0):e.request&&(s=!0),!t&&C.getErrorHandler()&&C.getErrorHandler()(e),{sent:s,responded:n,error:e}}function Fe(e){function t(){return e}function s(){return e.data}function n(){return e.data}function r(){return e.data["@type"]==="hydra:Collection"}function a(){return r()?e.data["hydra:member"]:null}function d(){return r()?e.data["hydra:totalItems"]:null}function p(){return r()?e.data["hydra:view"]&&e.data["hydra:view"]["hydra:last"]:!1}function u(){return!r()||!p()?null:parseInt(e.data["hydra:view"]["@id"].match(/page=(\d+)/)[1])}function i(){return!r()||!p()?null:parseInt(e.data["hydra:view"]["hydra:last"].match(/page=(\d+)/)[1])}return{getResponse:t,getData:s,getPayload:n,isCollection:r,getCollection:a,getTotal:d,hasPagination:p,getPage:u,getPages:i}}function Ue(e,t,s,n,r,a){async function d(){const u=s.getMethod(),i=t.getUri(),o=e.getHeaders(),l=n.getPayload(),m=[i];["post","put","patch"].includes(u)&&m.push(l||{}),m.push({headers:o,responseType:a.getResponseType()}),E.info("[Request] Sending request:",`[${u.toUpperCase()}]`,i);try{const f=await me[u](...m);return p(f)}catch(f){throw je(f,r.isSilent())}}function p(u){if(u.headers){const i=Object.keys(u.headers),o=i.map(l=>l.toLowerCase()).indexOf("content-type");if(o!==-1&&u.headers[i[o]].includes("application/ld+json"))return Fe(u)}return Ne(u)}return{send:d}}function b(e,t="get",s=null){const n=be(),r=Me(e),a=Re(t),d=we(a,n,s),p=Te(r),u=Oe(r),i=De(r),o=_e(),l=xe(),m=Ue(n,r,a,d,o,l);return{...n,...r,...a,...d,...p,...u,...i,...o,...l,...m}}function y(e,t="get",s=null){const n=b(e,t,s),r=T();r.isAuthenticated()&&n.setAuthorization(r.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 qe=(e,t)=>y("/v2/activity/candidate/:candidateId/establishment/:establishmentId").setRouteParams({candidateId:e,establishmentId:t}),ze=()=>({listByCandidateAndEstablishment:qe}),Be=(e,t,s)=>y("/candidate/:candidateId/share/establishment/:establishmentId").setMethod("post").setRouteParams({candidateId:e,establishmentId:t}).setPayload(s),Qe=(e,t)=>y("/candidate/:candidateId/archive/establishment/:establishmentId").setRouteParams({candidateId:e,establishmentId:t}),Ge=(e,t)=>y("/candidate/:candidateId/archive/establishment/:establishmentId").setMethod("post").setRouteParams({candidateId:e,establishmentId:t}),He=(e,t)=>y("/candidate/:candidateId/archive/establishment/:establishmentId").setMethod("delete").setRouteParams({candidateId:e,establishmentId:t}),Ve=e=>y("/v2/candidates/lookup").setQueryParam("email",e),Ke=(e,t)=>y("/v2/candidates").setMethod("post").setQueryParam("establishment-id",e).setFormData().setPayload(t),Je=(e,t,s)=>y("/v2/candidates/:candidateId").setQueryParam("establishment-id",t).setRouteParams({candidateId:e}).setMethod("post").setFormData().setPayload(s),We=e=>y("/candidate/register/close/:registrationToken").setMethod("post").setRouteParams({registrationToken:e}),Ze=e=>y("/candidate/register/open").setMethod("post").setQueryParam("groups","register:token").setPayload(e),Xe=()=>({share:Be,isArchived:Qe,archive:Ge,unarchive:He,lookupCandidate:Ve,createCandidate:Ke,updateCandidate:Je,closeIncompleteRegistration:We,openNewRegistration:Ze}),Ye=(e,t)=>y("/comment/establishment/:establishmentId/candidate/:userId").setRouteParams({establishmentId:e,userId:t}),et=(e,t,s)=>y("/comment/establishment/:establishmentId/candidate/:userId").setRouteParams({establishmentId:e,userId:t}).setMethod("post").setPayload(s),tt=(e,t)=>y("/comment/:commentId").setRouteParams({commentId:e}).setMethod("put").setPayload(t),nt=e=>y("/comment/:commentId").setRouteParams({commentId:e}).setMethod("delete"),st=()=>({getForEstablishmentCandidate:Ye,postForEstablishmentCandidate:et,update:tt,remove:nt}),rt=()=>b("contractType").isList().addGroup("Term:id").addGroup("Term:name"),it=()=>({list:rt}),ot=e=>y("/v2/talents").isList().setQueryParam("establishment-id",e),at=()=>({list:ot}),ct=(e,t,s)=>y("/cvtheque/establishment/:establishmentId/candidate/:candidateId/label/synchronize").setRouteParams({establishmentId:e,candidateId:t}).setMethod("post").setPayload(s),ut=()=>({syncCandidateLabels:ct}),lt=()=>b("diploma").isList().addGroup("Term:id").addGroup("Term:name"),dt=()=>({list:lt}),mt=e=>y("document/candidate/:candidateId").setRouteParams({candidateId:e}).isList().disablePagination(),ft=(e,t)=>y("document/candidate/:candidateId/establishment/:establishmentId/recruiter").setRouteParams({candidateId:e,establishmentId:t}).isList().disablePagination(),pt=(e,t)=>y("document/candidate/:candidateId/establishment/:establishmentId/candidate").setRouteParams({candidateId:e,establishmentId:t}).isList().disablePagination(),ht=e=>y("document/recruiter").setMethod("post").setPayload(e),yt=e=>y("document/:documentId").setRouteParams({documentId:e}).setMethod("delete"),gt=()=>({listByCandidate:mt,listByCandidateAndEstablishmentFromRecruiter:ft,listByCandidateAndEstablishmentFromCandidate:pt,addFromRecruiter:ht,remove:yt}),bt=(e,t)=>y("/v2/establishments/:establishmentId/email-history").setRouteParams({establishmentId:t}).setQueryParam("receiverId",e).isList().disablePagination(),Rt=()=>({listByCandidateAndEstablishment:bt}),wt=(e,t)=>y("/email/candidate/:candidateId").setMethod("post").setRouteParams({candidateId:e}).setPayload(t),At=(e,t)=>y("/v2/emails/send").setMethod("post").setFormData().setPayload({recipientIds:e,...t}),Pt=()=>({sendToCandidate:wt,sendToRecipients:At}),vt=(e,t=!0)=>{const s=y("/v2/establishments/:establishmentId/email-templates").setRouteParams({establishmentId:e}).isList().disablePagination();return t&&s.setQueryParam("global",!0),s},It=()=>y("/v2/self/email-templates").isList().disablePagination(),Et=()=>({listByEstablishment:vt,listSelf:It}),St=(e,t)=>y("establishment-career/:establishmentId/:versionId").setRouteParams({establishmentId:e,versionId:t}),Ct=(e,t="published")=>y("establishment-career/:establishmentId/state/:state").setRouteParams({establishmentId:e,state:t}),kt=(e,t,s=null)=>{const n=s!==null?y("establishment-career/:establishmentId/:versionId").setRouteParams({establishmentId:e,versionId:s}):y("establishment-career/:establishmentId").setRouteParams({establishmentId:e});return n.setMethod("post").setPayload(t),n},$t=(e,t)=>y("establishment-career/:establishmentId/logo-banner").setMethod("post").setRouteParams({establishmentId:e}).setPayload(t),Lt=(e,t,s)=>y("establishment-career/:establishmentId/publish/:versionId").setMethod("post").setRouteParams({establishmentId:e,versionId:t}).setPayload(s),Mt=()=>({readById:St,readByState:Ct,upsert:kt,uploadLogoAndBanner:$t,publish:Lt}),Tt=e=>b("establishment/:establishmentId").setRouteParams({establishmentId:e}),Ot=e=>y("establishment/:establishmentId/authorizations").setRouteParams({establishmentId:e}),B=()=>({read:Tt,authorizations:Ot}),Dt=e=>b("feature-flag/maintenance").setMethod("post").setPayload(e),_t=(e,t)=>b("feature-flag/establishment").setMethod("post").setPayload({establishment:e,flagName:t}),xt=()=>({maintenanceModeEnabled:Dt,forEstablishment:_t}),Nt=()=>b("job").isList().addGroup("Term:id").addGroup("Term:name"),jt=e=>b("speciality").isList().setQueryParam("all",!0).setQueryParam("establishmentId",e).addGroup("Term:id").addGroup("Term:name"),Ft=()=>({list:Nt,listByEstablishment:jt}),Ut=e=>y("/label/establishment/:establishmentId").isList().setRouteParams({establishmentId:e}),qt=(e,t)=>y("/label/establishment/:establishmentId").setMethod("post").setRouteParams({establishmentId:e}).setPayload(t),zt=(e,t)=>y("/label/:labelId").setMethod("put").setRouteParams({labelId:e}).setPayload(t),Bt=e=>y("/label/:labelId").setMethod("delete").setRouteParams({labelId:e}),Qt=(e,t,s)=>y("/label/establishment/:establishmentId/candidate/:candidateId/synchronize").setMethod("post").setPayload(s).setRouteParams({establishmentId:e,candidateId:t}),Gt=()=>({listByEstablishment:Ut,addToEstablishment:qt,update:zt,remove:Bt,syncForCandidate:Qt}),Ht=e=>b("offer/:offerId").setRouteParams({offerId:e}),Vt=()=>({read:Ht}),Kt=(e,t=!1)=>{const s=y("/recruiter/establishment/:establishmentId").isList().setRouteParams({establishmentId:e});return t&&s.setQueryParam("exclude-me",1),s},Jt=()=>({listByEstablishment:Kt}),Wt=e=>y("/recruitment/establishment/:establishmentId/mine").isList().setRouteParams({establishmentId:e}),Zt=(e,t)=>y("/recruitment/mine/establishment/:establishmentId/has-not/candidate/:candidateId").isList().setRouteParams({establishmentId:e,candidateId:t}),Xt=(e,t)=>y("/recruitment/mine/establishment/:establishmentId/has/candidate/:candidateId").isList().setRouteParams({establishmentId:e,candidateId:t}),Yt=(e,t)=>y("/recruitment/establishment/:establishmentId/has/candidate/:candidateId").isList().setRouteParams({establishmentId:e,candidateId:t}),en=(e,t)=>y("/recruitment/:recruitmentId/candidate").setMethod("put").setRouteParams({recruitmentId:e}).setPayload(t),tn=(e,t)=>y("/recruitment/:recruitmentId/candidate/:candidateId").setMethod("delete").setRouteParams({recruitmentId:e,candidateId:t}),nn=()=>({mineByEstablishment:Wt,mineWithoutCandidate:Zt,mineWithCandidate:Xt,withCandidate:Yt,addCandidates:en,removeCandidate:tn}),sn=(e,t,s,n=null)=>{const r=b("candidate/register/open").setMethod("post"),a={email:e};return t==="establishment"&&(a.establishmentId=s),t==="offer"&&(a.offerId=s),n&&(a.referer=n),r.setPayload(a),r},rn=(e,t)=>b("candidate/register/update/:token").setMethod("post").setRouteParams({token:e}).setPayload(t),on=e=>b("candidate/register/read/:token").setRouteParams({token:e}),an=e=>b("candidate/register/close/:token").setMethod("post").setRouteParams({token:e}),cn=()=>({open:sn,update:rn,read:on,close:an}),un=(e,t)=>y("/v2/registrations/lookup").setQueryParam("candidate-id",e).setQueryParam("establishment-id",t),ln=()=>({lookupEstablishment:un}),dn=()=>b("speciality").isList().addGroup("Term:id").addGroup("Term:name"),mn=e=>b("speciality").isList().setQueryParam("all",!0).setQueryParam("establishmentId",e).addGroup("Term:id").addGroup("Term:name"),fn=()=>({list:dn,listByEstablishment:mn}),pn=e=>y("/tag/public/establishment/:establishmentId").isList().setRouteParams({establishmentId:e}),hn=()=>({listByEstablishment:pn}),yn=(e,t)=>y("/v2/talents/lookup").setQueryParam("candidate-id",e).setQueryParam("establishment-id",t),gn=e=>y("/v2/talents/index").setMethod("post").setPayload(e),bn=()=>({lookupTalent:yn,addCandidateToTalentPool:gn}),Rn=e=>b("user/email/isset/:email").setRouteParams({email:e}),wn=()=>y("user/self").addGroup("user:self"),An=e=>y("/user/:uuid").setRouteParams({uuid:e}),Pn=e=>b("/user/:uuid").setRouteParams({uuid:e}),vn=e=>y("/user/:id/uuid").setRouteParams({id:e}),Q=()=>({emailExists:Rn,self:wn,byUuidPrivate:An,byUuid:Pn,fetchUuid:vn});let _;function ne(){if(_)return _;const e={user:void 0,roles:[],establishments:{}},t=async()=>{if(!T().isAuthenticated())throw new Error("::SDK Authorization:: User not authenticated");const i=(await Q().self().send()).getData();e.user={id:i.id,email:i.email,firstName:i.firstName,lastName:i.lastName,avatar:i.avatar},e.roles=i.roles},s=async i=>{if(!T().isAuthenticated())throw new Error("::SDK Authorization:: User not authenticated");e.establishments[i]=(await B().authorizations(i).send()).getData()},n=i=>{if(e.user===void 0)throw new Error("::SDK Authorization:: User not fetched");return e.roles.includes(i)};return _={fetchSelf:t,fetchPermission:s,hasRole:n,hasRoleRH:()=>n("ROLE_RH"),hasRoleCandidate:()=>n("ROLE_CANDIDATE"),hasRoleAdmin:()=>n("ROLE_ADMIN"),hasPermission:(i,...o)=>{const l=e.establishments[i];if(l===void 0)throw new Error(`::SDK Authorization:: Permissions not fetched for establishment ${i}`);return o.every(m=>l[m]===!0)},clear:()=>{e.user=void 0,e.roles=[],e.establishments={}}},_}async function In(e,...t){if(!T().isAuthenticated())throw"ERR_NOT_AUTHENTICATED";const n=ne();await Promise.all([n.fetchSelf(),n.fetchPermission(e)]);for(let r=0;r<t.length;r++){const a=t[r];if(!n.hasPermission(e,a))throw"ERR_MISSING_PERMISSION"}}const En=fe.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 Q().self().send();this.user=t.getData()}},async fetchPermission(e,t){if(!this.establishments[e]||t){const s=await B().authorizations(e).send();this.establishments[e]=s.getData()}},hasPermission(e,...t){const s=this.establishments[e];return s===void 0?!1:t.every(n=>s[n]===!0)}}}),k=(e,t,s)=>{const n=typeof t=="string"?t.split("."):[t];let r=e;for(const[a,d]of n.entries()){if(a===n.length-1)return r[d]!==void 0?r[d]:s;if(r===null||!(d in r)||typeof r[d]!="object")return s;r=r[d]}return s},U=(e,t,s)=>{const n=typeof t=="string"?t.split("."):[t],r=p=>typeof p=="number"||/^\d$/g.test(p),a=p=>parseInt(p,10);let d=e;return n.forEach((p,u)=>{if(u===n.length-1)d[p]=s;else{const i=r(n[u+1])?[]:{};p=r(p)?a(p):p,d[p]=d[p]??i,d=d[p]}}),e},se=e=>{if(typeof e=="object"){if(Array.isArray(e))return[...e];if(Object(e)===e)return{...e}}return e},G=(e,t)=>{const s={...e};for(const[n,r]of Object.entries(t))n in s&&typeof s[n]=="object"&&typeof r=="object"?s[n]=G(s[n],r):s[n]=se(r);return s};let L=null;function g(){if(L)return L;const e=C.getEnvironment(),t=(()=>e==="prod"||e==="production"?"pPROC7dPoJ7XdxHrwsTQNXCGX79MJjhp":e==="staging"?"823rqOTwVk1ZCWVyBAdLInZ77TcFF0CF":"TMZX6evFnu87JrBHV5qLwHsld5C6hilZ")(),s=!!t,n=e!=="prod"&&e!=="production";let r=null;function a(){return s}function d(){const m=window.analytics=window.analytics||[];if(!m.initialize&&m.invoked)E.error("Segment snippet included twice.");else{m.invoked=!0,m.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","debug","page","once","off","on","addSourceMiddleware","addIntegrationMiddleware","setAnonymousId","addDestinationMiddleware"],m.factory=function(f){return function(){if(window.analytics.initialized)return window.analytics[f].apply(window.analytics,arguments);const h=Array.prototype.slice.call(arguments);return h.unshift(f),m.push(h),m}};for(let f=0;f<m.methods.length;f++){const h=m.methods[f];m[h]=m.factory(h)}m.load=function(f,h){const R=document.createElement("script");R.id="analytics-script",R.type="text/javascript",R.async=!0,R.src="https://cdn.segment.com/analytics.js/v1/"+f+"/analytics.min.js",R.onerror=()=>window.dispatchEvent(new Event("analytics-error"));const $=document.getElementsByTagName("script")[0];$.parentNode.insertBefore(R,$),m._loadOptions=h},m._writeKey=t,m.SNIPPET_VERSION="4.16.1",m.load(t),m.page(),m.ready(()=>window.dispatchEvent(new Event("analytics-ready")))}}async function p(){return r!==null||(r=new Promise((m,f)=>{if(!a())return l("Analytics is disabled."),m();if(window.addEventListener("analytics-ready",()=>{l("Analytics script loaded successfully."),m()}),window.addEventListener("analytics-error",()=>{l("Analytics script failed to load. Consider disabling your AdBlocker.",null,"error"),f()}),l("Loading Analytics script."),window.analytics)return m();d()})),r}async function u(m,f){try{if(await this.analyticsScriptReady(),l("[identify]",[m,f]),a())return window.analytics.identify(m,f)}catch{l("[identify]",[m,f],"error")}}async function i(m,f,h){typeof h!="object"&&(h={});try{if(await this.analyticsScriptReady(),l("[page]",[m,f,h]),a())return window.analytics.page(m,{category:f,...h})}catch{l("[page]",[m,f,h],"error")}}async function o(m,f,h){typeof h!="object"&&(h={});try{if(await this.analyticsScriptReady(),l("[track]",[m,f,h]),a())return window.analytics.track(m,{category:f,...h})}catch{l("[track]",[m,f,h],"error")}}function l(m,f=[],h="info"){f||(f=[]),n&&E[h](`%cⒶ%c ::SDK Analytics:: ${m}`,"color: green;","color: inherit;",...f)}return L={analyticsScriptReady:p,isEnabled:a,identify:u,page:i,track:o,consoleMessage:l},L}g.destroy=()=>L=null;function re(){const e="Hubler Application";function t(i){var l;if(!i)throw new Error(`Missing arguments for domain "${e}"`);const o=!!i.offerId;if(o&&!i.recruitmentId)throw new Error(`Missing argument "recruitmentId" for domain "${e}"`);return{companyId:(l=i.establishmentId)==null?void 0:l.toString(),jobOfferId:o?i.offerId.toString():null,recruitmentId:o?i.recruitmentId.toString():null,selections:[o?"Application":"Spontaneous Application"]}}async function s(i){return g().page("Application Authentication Viewed",e,t(i))}async function n(i){return g().page("Application Magic Link Viewed",e,t(i))}async function r(i){return g().page("Application Job Viewed",e,t(i))}async function a(i){return g().page("Application Information Viewed",e,t(i))}async function d(i){return g().page("Application Document Viewed",e,t(i))}async function p(i){return g().page("Application Success Viewed",e,t(i))}async function u(i){if(!i.error)throw new Error(`Missing argument "error" for domain "${e}", event "Application Form Failed"`);return g().track("Application Form Failed",e,{...t(i),error:i.error})}return{applicationAuthenticationViewed:s,applicationMagicLinkViewed:n,applicationJobViewed:r,applicationInformationViewed:a,applicationDocumentViewed:d,applicationSuccessViewed:p,applicationFormFailed:u}}function ie(){const e="Profile";function t(c,A){var S;if(!c)throw new Error(`Missing arguments for domain "${e}"`);const P={companyId:c.companyId?c.companyId.toString():null,hublerId:(S=c.hublerId)==null?void 0:S.toString()};return A&&(P.productId=c.companyId?c.companyId+"_2":null),c.recruitmentId&&(P.recruitmentId=c.recruitmentId.toString()),c.selections&&(P.selections=c.selections),c.institutionId&&(P.institutionId=c.institutionId.map(String)),P}async function s(c){return g().track(c.name,e,t(c.properties),!0)}async function n(c){return g().track(c.name,e,t(c.properties,!0))}async function r(c){return g().track(c.name,e,t(c.properties,!0))}async function a(c){return g().track(c.name,e,t(c.properties,!0))}async function d(c){return g().track(c.name,e,t(c.properties,!0))}async function p(c){return g().track(c.name,e,t(c.properties,!0))}async function u(c){return g().track(c.name,e,t(c.properties,!0))}async function i(c){return g().track(c.name,e,t(c.properties,!0))}async function o(c){return g().track(c.name,e,t(c.properties,!0))}async function l(c){return g().track(c.name,e,t(c.properties,!0))}async function m(c){return g().track(c.name,e,t(c.properties,!0))}async function f(c){return g().track(c.name,e,t(c.properties,!0))}async function h(c){return g().track(c.name,e,t(c.properties,!0))}async function R(c){return g().page(c.name,c.properties.category,t(c.properties,!1))}async function $(c){return g().track(c.name,e,t(c.properties,!1))}return{profileDocumentDeleted:s,profileLabelAdded:n,profileLabelRemoved:r,profileShared:a,profileArchived:d,profileCandidateAdded:p,profileCommentAdded:u,profileDocumentAdded:i,profileDocumentDownloaded:o,profileDocumentRequested:l,profileRecruitmentAdded:m,profileRecruitmentRemoved:f,profileTabSelected:h,profileViewed:R,profileEmailSent:$}}const V=Object.freeze(Object.defineProperty({__proto__:null,useAnalyticsHublerApplication:re,useAnalyticsProfile:ie},Symbol.toStringTag,{value:"Module"}));function Sn(){function e(s){return g().identify(s.id,{email:s.email,firstName:s.firstname,lastName:s.lastname,createdAt:s.createdAt,type:"Hubler",lang:"fr",medium:t()?"MOBILE_DEVICE":"WEB_BROWSER"})}function t(){let s=!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)))&&(s=!0)}(navigator.userAgent||navigator.vendor||window.opera),s}return{identifyCandidate:e}}const Cn="AIzaSyDicyRD6rvVdnicp1tgV0ElazASNGbyyTs";let oe=!1;const ae=()=>new Promise(e=>{oe||window.google&&window.google.maps?e():(window.addEventListener("gmap-ready",()=>e()),Ln())}),kn=(e,t)=>ae().then(()=>$n(e,t)),$n=(e,t)=>{const s=new window.google.maps.places.Autocomplete(e,{componentRestrictions:{country:["fr","re","yt","gp","mq"]}});window.google.maps.event.addListener(s,"place_changed",()=>{const n=s.getPlace();n.formatted_address&&t&&t(n.formatted_address,n)})},Ln=()=>{window.onGmapScriptReady=function(){};const e=document.createElement("script");e.src="https://maps.googleapis.com/maps/api/js?key="+Cn+"&libraries=places&callback=onGmapScriptReady",e.async=!0,e.defer=!0,e.onload=()=>window.dispatchEvent(new Event("gmap-ready")),document.body.appendChild(e),oe=!0},Mn={scriptReady:ae,autocompleteInput:kn},Tn={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"}},On={fr:Tn};let q=null;const ce=()=>q,Dn=(e={})=>{let t=e.locale||"fr";const s=u=>t=u,n=()=>t,r=G(On,(e==null?void 0:e.messages)||{}),a=(u,i)=>{const o=k(r,`${t}.${u}`);return o?i?_n(o,i):o:u},d=(u,i)=>{const o=k(r,`${t}.${u}`);return o?xn(o,i):u};return q={t:a,tNode:d,setLocale:s,getLocale:n,install:u=>{u.config.globalProperties.$t=a,u.config.globalProperties.$tNode=d}},q},_n=(e,t)=>e?e.replace(/{{ ?([a-zA-Z_.]+) ?}}/g,(s,n)=>k(t,n)):null,xn=(e,t)=>{if(!e)return null;const s=e.split(/(\{[{%]+[^{}]*[%}]+})/g).filter(n=>n!=="").map(n=>{const r=n.startsWith("{%")&&n.endsWith("%}")?"slot":n.startsWith("{{")&&n.endsWith("}}")?"variable":"text";if(r==="text")return()=>K.text(n);n=n.replace(/[{}%]/g,"").trim();const a=n.match(/^[a-zA-Z_.]+/)[0];n=n.replace(a,"").trim();const d={};return n!==""&&([...n.matchAll(/([a-zA-Z_.]+)(=([a-zA-Z_.]+))?/g)].reduce((i,o)=>(o[3]===void 0?U(i,o[1],k(t,o[1])):U(i,o[1],k(t,o[3])),i),d),[...n.matchAll(/([a-zA-Z_.]+)="([^"]+)"/g)].reduce((i,o)=>{let l=o[2];return new RegExp(/^[0-9]*$/).exec(o[2])?l=parseInt(o[2]):new RegExp(/^(true|false)$/).exec(o[2])&&(l=o[2]==="true"),i[o[1]]=l,i},d)),p=>K[r](a,t,p,d)});return{setup:(n,{slots:r})=>()=>s.map(a=>a(r))}},K={slot:(e,t,s,n)=>x.h("span",{class:"node node--slot"},s[e.trim()](n)),variable:(e,t)=>x.h("span",{class:"node node--variable"},k(t,e.trim())),text:e=>x.h("span",{class:"node node--text"},e)};function Nn(e){const{t}=ce(),s={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,r)=>n===1?t(r?"timeAgo.last-month":"timeAgo.next-month"):`${n} ${t("timeAgo.month",n)}`,year:(n,r)=>n===1?t(r?"timeAgo.last-year":"timeAgo.next-year"):`${n} ${t("timeAgo.year",n)}`,day:(n,r)=>n===1?t(r?"timeAgo.yesterday":"timeAgo.tomorrow"):`${n} ${t("timeAgo.day",n)}`,week:(n,r)=>n===1?t(r?"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 pe.useTimeAgo(e,{fullDateFormatter:n=>n.toLocaleDateString(),messages:s})}function jn(){let e=null;function t(){return e}function s(){return e.controller}function n(){return"use"+e.controller.charAt(0).toUpperCase()+e.controller.slice(1)+"QSController"}function r(){return e.action}function a(){return e.arguments}function d(){return!!(e&&e.controller&&e.action)}function p(){window.location.search.length!==0&&(e=window.location.search.substring(1).split("&").reduce((u,i)=>{const o=i.split("=");return o[0]==="controller"||o[0]==="action"?u[o[0]]=decodeURIComponent(o[1]):u.arguments[o[0]]=decodeURIComponent(o[1]),u},{controller:null,action:null,arguments:{}}))}return p(),{getParams:t,getController:s,getControllerComposableName:n,getAction:r,getArguments:a,hasAction:d}}function Fn(){async function e({domain:n,event:r,...a}){const d="useAnalytics"+n.charAt(0).toUpperCase()+n.slice(1);if(!t(d))throw new Error(`Domain ${n} is not defined`);const p=V[d]();if(!s(p,r))throw new Error(`Event ${r} is not defined in domain ${n}`);return p[r](a)}function t(n){return!!V[n]}function s(n,r){return!!n[r]}return{call:e}}const J=Object.freeze(Object.defineProperty({__proto__:null,useAnalyticsQSController:Fn},Symbol.toStringTag,{value:"Module"}));function Un(e){if(!e.hasAction())throw new Error("No action found in router");function t(){if(!s())throw new Error(`Controller ${e.getController()} not found`);const r=J[e.getControllerComposableName()]();if(!n(r))throw new Error(`Action ${e.getAction()} not found in controller ${e.getController()}`);return r[e.getAction()](e.getArguments())}function s(){return e.getControllerComposableName()in J}function n(r){return e.getAction()in r}return{dispatch:t}}function qn(){let e=!1;function t(r,a,d){n(),d()}function s(r,a,d){if(!e)return e=!0,t(r,a,d);d()}function n(){const r=jn();if(!r.hasAction())return;Un(r).dispatch()}return{vueRouterBeforeEach:t,vueRouterBeforeFirst:s,handle:n}}const zn=()=>({getAssetUrl:t=>`${C.getBaseAssetsUrl()}${t}`}),w=()=>C.getMainAppHost(),Bn=()=>`${w()}/rh/establishments`,Qn=e=>`${w()}/rh/establishment/${e}`,Gn=e=>e&&typeof e=="object"&&e.urls&&e.urls.display?e.urls.display:"",Hn=e=>`${w()}/candidate-invite/establishment/${e}`,Vn=(e,t=!1)=>t?`${w()}/cvbank/${e}/`:`${w()}/rh/establishment/${e}/cvtheque/`,Kn=(e,t)=>`${w()}/user-profile/establishment/${e}/user/${t}`,Jn=(e,t)=>`${w()}/rh/establishment/${e}/recruitment/${t}`,Wn=(e,t)=>`${w()}/rh/establishment/${e}/recruitment/${t}/kanban`,Zn=e=>`${w()}/rh/establishment/${e}/career-configuration`,Xn=(e,t=null)=>t?`${w()}/career-website/${e}/${t}`:`${w()}/career-website/${e}`,Yn=(e,t)=>`${w()}/career-website-preview/${e}/${t}`,es=(e,t=null)=>{const s=w().replace("://",`://${e}.`);return t?`${s}?_version=${t}`:`${s}`};function ts(){return{root:w,establishments:Bn,establishment:Qn,img:Gn,candidateInvite:Hn,cvtheque:Vn,userProfile:Kn,recruitment:Jn,recruitmentKanban:Wn,career:Zn,careerConfig:Xn,careerPreview:Yn,careerWebsite:es}}const W=new Set;let M,z={ignore:e=>e.startsWith("Ui")};const F=e=>{if(e!=null&&e.classList){e._cssChecked=!0;for(const t of e.classList)M.has(t)||W.has(t)||z.ignore(t)||(W.add(t),E.error(`Undefined CSS class: ${t}`))}},ue=e=>{var t;for(const s of e)if(s!=null&&s.cssRules&&(s==null?void 0:s.cssRules.length)>0)ue(s.cssRules);else if(s.selectorText){const n=(t=s.selectorText)==null?void 0:t.match(/\.[\w-]+/g);if(n)for(const r of n)M.add(r.substr(1))}},ns=(e={})=>{if(M)return M;M=new Set,z={...z,...e},ue(document.styleSheets),new MutationObserver(s=>{for(const n of s)if(n.type==="childList"&&(n!=null&&n.addedNodes)){for(const r of n.addedNodes)if(!(r.nodeType===3||r.nodeType===8)){F(r);for(const a of r.querySelectorAll("*"))F(a)}}else(n==null?void 0:n.attributeName)==="class"&&F(n.target)}).observe(document,{attributes:!0,childList:!0,subtree:!0})},ss="0.2.23";exports.BaseLogger=N;exports.Gmap=Mn;exports.SDKConfig=C;exports.SDKLogger=E;exports.VERSION=ss;exports._clone=se;exports._get=k;exports._merge=G;exports._set=U;exports.createI18n=Dn;exports.useActivityRepository=ze;exports.useAnalyticsHublerApplication=re;exports.useAnalyticsIdentify=Sn;exports.useAnalyticsProfile=ie;exports.useAssetUrls=zn;exports.useAuthentication=T;exports.useAuthorization=ne;exports.useAuthorizationStore=En;exports.useCanAccessEstablishmentMiddleware=In;exports.useCandidateRepository=Xe;exports.useCommentRepository=st;exports.useContractTypeRepository=it;exports.useCvbankRepository=at;exports.useCvthequeRepository=ut;exports.useDiplomaRepository=dt;exports.useDocumentRepository=gt;exports.useDomainUrls=ts;exports.useEmailHistoryRepository=Rt;exports.useEmailRepository=Pt;exports.useEmailTemplateRepository=Et;exports.useEstablishmentCareerRepository=Mt;exports.useEstablishmentRepository=B;exports.useFeatureFlagRepository=xt;exports.useI18n=ce;exports.useJobRepository=Ft;exports.useLabelRepository=Gt;exports.useLocaleTimeAgo=Nn;exports.useOfferRepository=Vt;exports.usePrivateRequest=y;exports.useQSAction=qn;exports.useRecruiterRepository=Jt;exports.useRecruitmentRepository=nn;exports.useRegisterRepository=cn;exports.useRegistrationRepository=ln;exports.useRequest=b;exports.useSpecialityRepository=fn;exports.useTagRepository=hn;exports.useTalentRepository=bn;exports.useUndefinedCssClasses=ns;exports.useUserRepository=Q;
|
|
1
|
+
"use strict";var le=Object.defineProperty;var de=(e,t,s)=>t in e?le(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;var I=(e,t,s)=>(de(e,typeof t!="symbol"?t+"":t,s),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("vue"),me=require("axios"),fe=require("pinia"),pe=require("@vueuse/core");var H={expireTimes:"1d",path:"; path=/",domain:"",secure:!1,sameSite:"; SameSite=Lax"},he=function(){function e(){this.current_default_config=H}return e.prototype.config=function(t){for(var s in this.current_default_config)this.current_default_config[s]=t[s]?t[s]:H[s]},e.prototype.get=function(t){var s=decodeURIComponent(document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*"+encodeURIComponent(t).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1"))||null;if(s&&s.substring(0,1)==="{"&&s.substring(s.length-1,s.length)==="}")try{s=JSON.parse(s)}catch{return s}return s},e.prototype.set=function(t,s,n,r,a,f,d){if(t){if(/^(?:expires|max-age|path|domain|secure|SameSite)$/i.test(t))throw new Error('Cookie name illegality. Cannot be set to ["expires","max-age","path","domain","secure","SameSite"] current key name: '+t)}else throw new Error("Cookie name is not found in the first argument.");s&&s.constructor===Object&&(s=JSON.stringify(s));var u="";if(n==null&&(n=this.current_default_config.expireTimes?this.current_default_config.expireTimes:""),n&&n!=0)switch(n.constructor){case Number:n===1/0||n===-1?u="; expires=Fri, 31 Dec 9999 23:59:59 GMT":u="; max-age="+n;break;case String:if(/^(?:\d+(y|m|d|h|min|s))$/i.test(n)){var i=n.replace(/^(\d+)(?:y|m|d|h|min|s)$/i,"$1");switch(n.replace(/^(?:\d+)(y|m|d|h|min|s)$/i,"$1").toLowerCase()){case"m":u="; max-age="+ +i*2592e3;break;case"d":u="; max-age="+ +i*86400;break;case"h":u="; max-age="+ +i*3600;break;case"min":u="; max-age="+ +i*60;break;case"s":u="; max-age="+i;break;case"y":u="; max-age="+ +i*31104e3;break}}else u="; expires="+n;break;case Date:u="; expires="+n.toUTCString();break}return document.cookie=encodeURIComponent(t)+"="+encodeURIComponent(s)+u+(a?"; domain="+a:this.current_default_config.domain?this.current_default_config.domain:"")+(r?"; path="+r:this.current_default_config.path?this.current_default_config.path:"; path=/")+(f==null?this.current_default_config.secure?"; Secure":"":f?"; Secure":"")+(d==null?this.current_default_config.sameSite?"; SameSute="+this.current_default_config.sameSite:"":d?"; SameSite="+d:""),this},e.prototype.remove=function(t,s,n){return!t||!this.isKey(t)?!1:(document.cookie=encodeURIComponent(t)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT"+(n?"; domain="+n:this.current_default_config.domain?this.current_default_config.domain:"")+(s?"; path="+s:this.current_default_config.path?this.current_default_config.path:"; path=/")+"; SameSite=Lax",!0)},e.prototype.isKey=function(t){return new RegExp("(?:^|;\\s*)"+encodeURIComponent(t).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(document.cookie)},e.prototype.keys=function(){if(!document.cookie)return[];for(var t=document.cookie.replace(/((?:^|\s*;)[^\=]+)(?=;|$)|^\s*|\s*(?:\=[^;]*)?(?:\1|$)/g,"").split(/\s*(?:\=[^;]*)?;\s*/),s=0;s<t.length;s++)t[s]=decodeURIComponent(t[s]);return t},e}(),j=null;function ye(){j==null&&(j=new he);var e=x.reactive(j);return{cookies:e}}function ge(){const{cookies:e}=ye();function t(a){return e.get(a)}function s(a,f){return e.set(a,f)}function n(a){return e.remove(a)}function r(){e.keys().forEach(a=>n(a))}return{getItem:t,setItem:s,removeItem:n,clear:r}}let O=null;function T(e={auth:"token",refresh:"refresh_token",expiration:"token_expiration_date"},t=ge()){if(O)return O;function s(){return t.getItem(e.auth)}function n(){return t.getItem(e.refresh)}function r(){return t.getItem(e.expiration)}function a(m,p){const h=o(m);if(!h.exp)throw new Error("Invalid JWT token.");t.setItem(e.auth,m),t.setItem(e.refresh,p),t.setItem(e.expiration,((h.exp-60)*1e3).toString())}function f(){t.removeItem(e.auth),t.removeItem(e.refresh),t.removeItem(e.expiration)}function d(){return u()&&!i()}function u(){return!!s()}function i(){const m=r();return m?new Date(m)<new Date:!0}function o(m){return JSON.parse(atob(m.split(".")[1]))}function l(){return t}return O={keys:e,getAuthToken:s,getRefreshToken:n,getExpiration:r,authenticate:a,clear:f,isAuthenticated:d,hasAuth:u,isExpired:i,getStorage:l},O}function be(e){let t={"Content-Type":"application/json"};e&&s(e);function s(h,R=!1){return t=R?h:{...t,...h},this}function n(){return t}function r(h,R){return t[h]=R,this}function a(h){return t[h]}function f(h){return t[h]&&delete t[h],this}function d(h){return r("Authorization","Bearer "+h),this}function u(){return f("Authorization"),this}function i(){return!!a("Authorization")}function o(){return r("Content-Type","multipart/form-data"),this}function l(){return r("Content-Type","application/json"),this}function m(){return a("Content-Type")==="multipart/form-data"}function p(){return a("Content-Type")==="application/json"}return{setHeaders:s,getHeaders:n,setHeader:r,getHeader:a,removeHeader:f,setAuthorization:d,removeAuthorization:u,hasAuthorization:i,setFormData:o,setJson:l,isFormData:m,isJson:p}}function Re(e){let t=null;e&&s(e);function s(r){if(r=r.toLowerCase(),!["get","post","put","patch","delete"].includes(r))throw new Error("Invalid method.");return t=r,this}function n(){return t}return{setMethod:s,getMethod:n}}function we(e,t,s){let n=null;s&&r(s);function r(i){if(!["post","put","patch"].includes(e.getMethod()))throw new Error("Payload can only be set for POST, PUT and PATCH requests.");return i instanceof FormData?t.setFormData():f(i)&&(i=d(i),t.setFormData()),t.isFormData()&&e.getMethod()==="put"&&(e.setMethod("post"),i.append("_method","PUT")),n=i,this}function a(){return n}function f(i){for(const o in i){const l=i[o];if(u(l))return!0;if(typeof l=="object"&&f(l))return!0}return!1}function d(i,o=null,l=0){const m=!o;m&&(o=new FormData);for(const p in i){const h=i[p];u(h)?(i[p]="<<FileIndex:"+l+">>",o.append(l,h,h.name),l++):typeof h=="object"&&(i[p]=d(i[p],o,l))}return m?(o.append("payload",JSON.stringify(i)),o):i}function u(i){return typeof File<"u"&&i instanceof File||typeof Blob<"u"&&i instanceof Blob}return{setPayload:r,getPayload:a}}const v=class v{constructor(t={}){I(this,"level",3);I(this,"logger");I(this,"prefix");this.logger=t.logger||console,this.prefix=t.prefix||""}setLevel(t){this.level=t}debug(...t){this.level<=v.LEVEL_DEBUG&&D(this.logger.debug,this.prefix,t)}info(...t){this.level<=v.LEVEL_INFO&&D(this.logger.info,this.prefix,t)}warn(...t){this.level<=v.LEVEL_WARN&&D(this.logger.warn,this.prefix,t)}error(...t){this.level<=v.LEVEL_ERROR&&D(this.logger.error,this.prefix,t)}};I(v,"LEVEL_DEBUG",0),I(v,"LEVEL_INFO",1),I(v,"LEVEL_WARN",2),I(v,"LEVEL_ERROR",3),I(v,"LEVEL_OFF",4);let N=v;const D=(e,t,s)=>{t?e(t,...s):e(...s)},E=new N({prefix:"[SDK]"});let Z=null,X=null,Y=null,ee="/",te=null;const Ae=()=>Z,Pe=e=>{if(E.info("[Config] Environment:",e),!e)throw new Error("Invalid environment.");Z=e},ve=()=>X,Ie=e=>{if(E.info("[Config] API Host:",e),!e)throw new Error("Invalid API host.");X=e},Ee=()=>te,Se=e=>{te=e},Ce=()=>Y,ke=e=>{if(E.info("[Config] Main App Host:",e),!e)throw new Error("Invalid main app host.");Y=e},$e=e=>{E.info("[Config] Base Assets Urls:",e),ee=e},Le=()=>ee,C={getEnvironment:Ae,getApiHost:ve,getErrorHandler:Ee,setEnvironment:Pe,setApiHost:Ie,setErrorHandler:Se,getMainAppHost:Ce,setMainAppHost:ke,setBaseAssetsUrl:$e,getBaseAssetsUrl:Le};function Me(e){const t=C.getApiHost().replace(/\/$/g,"");let s=null,n={},r={};e&&d(e);function a(){return t+u()+p()}function f(){return u(!0,!0)}function d(c){return s="/"+c.replace(/^\//g,""),this}function u(c=!0,A=!1){return c?s.replace(/:(\w+)/g,(P,S)=>A?"*":r[S]||":"+S):s}function i(c){return n=c,this}function o(c,A){return n[c]=A,this}function l(c){return n[c]&&delete n[c],this}function m(){return Object.keys(n).length>0}function p(c=!0){if(!m())return"";let A="";for(const P in n)if(Array.isArray(n[P]))for(const S of n[P])A+=(A.length?"&":"")+`${P}[]=`+S;else A+=(A.length?"&":"")+P+"="+n[P];return(c?"?":"")+A}function h(c){return r=c,this}function R(c,A){return r[c]=A,this}function $(c){return r[c]&&delete r[c],this}return{setPath:d,getPath:u,getUri:a,getMockUri:f,setQueryParams:i,setQueryParam:o,removeQueryParam:l,hasQuery:m,getQueryString:p,setRouteParams:h,setRouteParam:R,removeRouteParam:$}}function Te(e){let t=[];function s(){return t=i(arguments),f(),this}function n(){return t.length>0}function r(o){return t.includes(o.trim())?this:(t.push(o.trim()),f(),this)}function a(o){const l=t.indexOf(o.trim());return l===-1?this:(t.splice(l,1),f(),this)}function f(){t.length?e.setQueryParam("groups",u(t)):e.removeQueryParam("groups")}function d(o){return o.split(",").map(l=>l.trim())}function u(o){return o.join(",")}function i(o){let l=[];return o.length===1?typeof o[0]=="string"?l=d(o[0]):Array.isArray(o[0])&&(l=o[0]):l=Array.from(o),l}return{setGroups:s,hasGroups:n,addGroup:r,removeGroup:a}}function Oe(e){let t=!1,s=!1,n=1,r=10;function a(){return t=!0,f(),this}function f(){s=!0;const p=m(arguments);return i(p.page||1,!1),o(p.perPage||r,!1),l(),this}function d(){return s=!1,l(),this}function u(){return s}function i(p,h=!0){return t=!0,s=!0,n=p,h&&l(),this}function o(p,h=!0){return t=!0,s=!0,r=p,h&&l(),this}function l(){t?u()?(e.removeQueryParam("pagination"),e.setQueryParam("page",n),e.setQueryParam("nbResultPerPage",r)):(e.removeQueryParam("page"),e.removeQueryParam("nbResultPerPage"),e.setQueryParam("pagination","false")):(e.removeQueryParam("page"),e.removeQueryParam("nbResultPerPage"),e.removeQueryParam("pagination"))}function m(p){if(p.length===1&&typeof p[0]=="object")return p[0];const h={};return p.length>=1&&(h.page=p[0]),p.length>=2&&(h.perPage=p[1]),h}return{isList:a,paginate:f,disablePagination:d,hasPagination:u,setPage:i,setPerPage:o}}function De(e){let t=!1,s="id",n="ASC";function r(){t=!0;const o=i(arguments);return o.orderBy&&f(o.orderBy,!1),o.orderDir&&d(o.orderDir,!1),u(),this}function a(){return t}function f(o,l=!0){return t=!0,s=o,l&&u(),this}function d(o,l=!0){if(o=o.toUpperCase(),["ASC","DESC"].indexOf(o)===-1)throw new Error("Invalid order direction");return t=!0,n=o,l&&u(),this}function u(){a()&&(e.setQueryParam("orderBy",s),e.setQueryParam("orderDirection",n))}function i(o){if(o.length===1&&typeof o[0]=="object")return o[0];const l={};return o.length>=1&&(l.orderBy=o[0]),o.length>=2&&(l.orderDir=o[1]),l}return{setOrder:r,hasOrder:a,setOrderBy:f,setOrderDir:d}}function _e(){let e=!1;function t(){return e=!0,this}function s(){return e}return{setSilent:t,isSilent:s}}function xe(){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 s(){return e}return{setResponseType:t,getResponseType:s}}function Ne(e){function t(){return e}function s(){return e.data}function n(){return e.data}return{getResponse:t,getData:s,getPayload:n}}function je(e,t=!1){let s=!1,n=!1;return e.response?(s=!0,n=!0):e.request&&(s=!0),!t&&C.getErrorHandler()&&C.getErrorHandler()(e),{sent:s,responded:n,error:e}}function Fe(e){function t(){return e}function s(){return e.data}function n(){return e.data}function r(){return e.data["@type"]==="hydra:Collection"}function a(){return r()?e.data["hydra:member"]:null}function f(){return r()?e.data["hydra:totalItems"]:null}function d(){return r()?e.data["hydra:view"]&&e.data["hydra:view"]["hydra:last"]:!1}function u(){return!r()||!d()?null:parseInt(e.data["hydra:view"]["@id"].match(/page=(\d+)/)[1])}function i(){return!r()||!d()?null:parseInt(e.data["hydra:view"]["hydra:last"].match(/page=(\d+)/)[1])}return{getResponse:t,getData:s,getPayload:n,isCollection:r,getCollection:a,getTotal:f,hasPagination:d,getPage:u,getPages:i}}function Ue(e,t,s,n,r,a){async function f(){const u=s.getMethod(),i=t.getUri(),o=e.getHeaders(),l=n.getPayload(),m=[i];["post","put","patch"].includes(u)&&m.push(l||{}),m.push({headers:o,responseType:a.getResponseType()}),E.info("[Request] Sending request:",`[${u.toUpperCase()}]`,i);try{const p=await me[u](...m);return d(p)}catch(p){throw je(p,r.isSilent())}}function d(u){if(u.headers){const i=Object.keys(u.headers),o=i.map(l=>l.toLowerCase()).indexOf("content-type");if(o!==-1&&u.headers[i[o]].includes("application/ld+json"))return Fe(u)}return Ne(u)}return{send:f}}function b(e,t="get",s=null){const n=be(),r=Me(e),a=Re(t),f=we(a,n,s),d=Te(r),u=Oe(r),i=De(r),o=_e(),l=xe(),m=Ue(n,r,a,f,o,l);return{...n,...r,...a,...f,...d,...u,...i,...o,...l,...m}}function y(e,t="get",s=null){const n=b(e,t,s),r=T();r.isAuthenticated()&&n.setAuthorization(r.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 qe=(e,t)=>y("/v2/activity/candidate/:candidateId/establishment/:establishmentId").setRouteParams({candidateId:e,establishmentId:t}),ze=()=>({listByCandidateAndEstablishment:qe}),Be=(e,t,s)=>y("/candidate/:candidateId/share/establishment/:establishmentId").setMethod("post").setRouteParams({candidateId:e,establishmentId:t}).setPayload(s),Qe=(e,t)=>y("/candidate/:candidateId/archive/establishment/:establishmentId").setRouteParams({candidateId:e,establishmentId:t}),Ge=(e,t)=>y("/candidate/:candidateId/archive/establishment/:establishmentId").setMethod("post").setRouteParams({candidateId:e,establishmentId:t}),He=(e,t)=>y("/candidate/:candidateId/archive/establishment/:establishmentId").setMethod("delete").setRouteParams({candidateId:e,establishmentId:t}),Ve=e=>y("/v2/candidates/lookup").setQueryParam("email",e),Ke=(e,t)=>y("/v2/candidates").setMethod("post").setQueryParam("establishment-id",e).setFormData().setPayload(t),Je=(e,t,s)=>y("/v2/candidates/:candidateId").setQueryParam("establishment-id",t).setRouteParams({candidateId:e}).setMethod("post").setFormData().setPayload(s),We=e=>y("/candidate/register/close/:registrationToken").setMethod("post").setRouteParams({registrationToken:e}),Ze=e=>y("/candidate/register/open").setMethod("post").setQueryParam("groups","register:token").setPayload(e),Xe=()=>({share:Be,isArchived:Qe,archive:Ge,unarchive:He,lookupCandidate:Ve,createCandidate:Ke,updateCandidate:Je,closeIncompleteRegistration:We,openNewRegistration:Ze}),Ye=(e,t)=>y("/comment/establishment/:establishmentId/candidate/:userId").setRouteParams({establishmentId:e,userId:t}),et=(e,t,s)=>y("/comment/establishment/:establishmentId/candidate/:userId").setRouteParams({establishmentId:e,userId:t}).setMethod("post").setPayload(s),tt=(e,t)=>y("/comment/:commentId").setRouteParams({commentId:e}).setMethod("put").setPayload(t),nt=e=>y("/comment/:commentId").setRouteParams({commentId:e}).setMethod("delete"),st=()=>({getForEstablishmentCandidate:Ye,postForEstablishmentCandidate:et,update:tt,remove:nt}),rt=()=>b("contractType").isList().addGroup("Term:id").addGroup("Term:name"),it=()=>({list:rt}),ot=e=>y("/v2/talents").isList().setQueryParam("establishment-id",e),at=()=>({list:ot}),ct=(e,t,s)=>y("/cvtheque/establishment/:establishmentId/candidate/:candidateId/label/synchronize").setRouteParams({establishmentId:e,candidateId:t}).setMethod("post").setPayload(s),ut=()=>({syncCandidateLabels:ct}),lt=()=>b("diploma").isList().addGroup("Term:id").addGroup("Term:name"),dt=()=>({list:lt}),mt=e=>y("document/candidate/:candidateId").setRouteParams({candidateId:e}).isList().disablePagination(),ft=(e,t)=>y("document/candidate/:candidateId/establishment/:establishmentId/recruiter").setRouteParams({candidateId:e,establishmentId:t}).isList().disablePagination(),pt=(e,t)=>y("document/candidate/:candidateId/establishment/:establishmentId/candidate").setRouteParams({candidateId:e,establishmentId:t}).isList().disablePagination(),ht=e=>y("document/recruiter").setMethod("post").setPayload(e),yt=e=>y("document/:documentId").setRouteParams({documentId:e}).setMethod("delete"),gt=()=>({listByCandidate:mt,listByCandidateAndEstablishmentFromRecruiter:ft,listByCandidateAndEstablishmentFromCandidate:pt,addFromRecruiter:ht,remove:yt}),bt=(e,t)=>y("/v2/establishments/:establishmentId/email-history").setRouteParams({establishmentId:t}).setQueryParam("receiverId",e).isList().disablePagination(),Rt=()=>({listByCandidateAndEstablishment:bt}),wt=(e,t)=>y("/email/candidate/:candidateId").setMethod("post").setRouteParams({candidateId:e}).setPayload(t),At=(e,t)=>y("/v2/emails/send").setMethod("post").setFormData().setPayload({recipientIds:e,...t}),Pt=()=>({sendToCandidate:wt,sendToRecipients:At}),vt=(e,t=!0)=>{const s=y("/v2/establishments/:establishmentId/email-templates").setRouteParams({establishmentId:e}).isList().disablePagination();return t&&s.setQueryParam("global",!0),s},It=()=>y("/v2/self/email-templates").isList().disablePagination(),Et=()=>({listByEstablishment:vt,listSelf:It}),St=(e,t)=>y("establishment-career/:establishmentId/:versionId").setRouteParams({establishmentId:e,versionId:t}),Ct=(e,t="published")=>y("establishment-career/:establishmentId/state/:state").setRouteParams({establishmentId:e,state:t}),kt=(e,t,s=null)=>{const n=s!==null?y("establishment-career/:establishmentId/:versionId").setRouteParams({establishmentId:e,versionId:s}):y("establishment-career/:establishmentId").setRouteParams({establishmentId:e});return n.setMethod("post").setPayload(t),n},$t=(e,t)=>y("establishment-career/:establishmentId/logo-banner").setMethod("post").setRouteParams({establishmentId:e}).setPayload(t),Lt=(e,t,s)=>y("establishment-career/:establishmentId/publish/:versionId").setMethod("post").setRouteParams({establishmentId:e,versionId:t}).setPayload(s),Mt=()=>({readById:St,readByState:Ct,upsert:kt,uploadLogoAndBanner:$t,publish:Lt}),Tt=e=>b("establishment/:establishmentId").setRouteParams({establishmentId:e}),Ot=e=>y("establishment/:establishmentId/authorizations").setRouteParams({establishmentId:e}),B=()=>({read:Tt,authorizations:Ot}),Dt=e=>b("feature-flag/maintenance").setMethod("post").setPayload(e),_t=(e,t)=>b("feature-flag/establishment").setMethod("post").setPayload({establishment:e,flagName:t}),xt=()=>({maintenanceModeEnabled:Dt,forEstablishment:_t}),Nt=()=>b("job").isList().addGroup("Term:id").addGroup("Term:name"),jt=e=>b("speciality").isList().setQueryParam("all",!0).setQueryParam("establishmentId",e).addGroup("Term:id").addGroup("Term:name"),Ft=()=>({list:Nt,listByEstablishment:jt}),Ut=e=>y("/label/establishment/:establishmentId").isList().setRouteParams({establishmentId:e}),qt=(e,t)=>y("/label/establishment/:establishmentId").setMethod("post").setRouteParams({establishmentId:e}).setPayload(t),zt=(e,t)=>y("/label/:labelId").setMethod("put").setRouteParams({labelId:e}).setPayload(t),Bt=e=>y("/label/:labelId").setMethod("delete").setRouteParams({labelId:e}),Qt=(e,t,s)=>y("/label/establishment/:establishmentId/candidate/:candidateId/synchronize").setMethod("post").setPayload(s).setRouteParams({establishmentId:e,candidateId:t}),Gt=()=>({listByEstablishment:Ut,addToEstablishment:qt,update:zt,remove:Bt,syncForCandidate:Qt}),Ht=e=>b("offer/:offerId").setRouteParams({offerId:e}),Vt=()=>({read:Ht}),Kt=(e,t=!1)=>{const s=y("/recruiter/establishment/:establishmentId").isList().setRouteParams({establishmentId:e});return t&&s.setQueryParam("exclude-me",1),s},Jt=()=>({listByEstablishment:Kt}),Wt=e=>y("/recruitment/establishment/:establishmentId/mine").isList().setRouteParams({establishmentId:e}),Zt=(e,t)=>y("/recruitment/mine/establishment/:establishmentId/has-not/candidate/:candidateId").isList().setRouteParams({establishmentId:e,candidateId:t}),Xt=(e,t)=>y("/recruitment/mine/establishment/:establishmentId/has/candidate/:candidateId").isList().setRouteParams({establishmentId:e,candidateId:t}),Yt=(e,t)=>y("/recruitment/establishment/:establishmentId/has/candidate/:candidateId").isList().setRouteParams({establishmentId:e,candidateId:t}),en=(e,t)=>y("/recruitment/:recruitmentId/candidate").setMethod("put").setRouteParams({recruitmentId:e}).setPayload(t),tn=(e,t)=>y("/recruitment/:recruitmentId/candidate/:candidateId").setMethod("delete").setRouteParams({recruitmentId:e,candidateId:t}),nn=()=>({mineByEstablishment:Wt,mineWithoutCandidate:Zt,mineWithCandidate:Xt,withCandidate:Yt,addCandidates:en,removeCandidate:tn}),sn=(e,t,s,n=null)=>{const r=b("candidate/register/open").setMethod("post"),a={email:e};return t==="establishment"&&(a.establishmentId=s),t==="offer"&&(a.offerId=s),n&&(a.referer=n),r.setPayload(a),r},rn=(e,t)=>b("candidate/register/update/:token").setMethod("post").setRouteParams({token:e}).setPayload(t),on=e=>b("candidate/register/read/:token").setRouteParams({token:e}),an=e=>b("candidate/register/close/:token").setMethod("post").setRouteParams({token:e}),cn=()=>({open:sn,update:rn,read:on,close:an}),un=(e,t)=>y("/v2/registrations/lookup").setQueryParam("candidate-id",e).setQueryParam("establishment-id",t),ln=()=>({lookupEstablishment:un}),dn=()=>b("speciality").isList().addGroup("Term:id").addGroup("Term:name"),mn=e=>b("speciality").isList().setQueryParam("all",!0).setQueryParam("establishmentId",e).addGroup("Term:id").addGroup("Term:name"),fn=()=>({list:dn,listByEstablishment:mn}),pn=e=>y("/tag/public/establishment/:establishmentId").isList().setRouteParams({establishmentId:e}),hn=()=>({listByEstablishment:pn}),yn=(e,t)=>y("/v2/talents/lookup").setQueryParam("candidate-id",e).setQueryParam("establishment-id",t),gn=e=>y("/v2/talents/index").setMethod("post").setPayload(e),bn=()=>({lookupTalent:yn,addCandidateToTalentPool:gn}),Rn=e=>b("user/email/isset/:email").setRouteParams({email:e}),wn=()=>y("user/self").addGroup("user:self"),An=e=>y("/user/:uuid").setRouteParams({uuid:e}),Pn=e=>b("/user/:uuid").setRouteParams({uuid:e}),vn=e=>y("/user/:id/uuid").setRouteParams({id:e}),Q=()=>({emailExists:Rn,self:wn,byUuidPrivate:An,byUuid:Pn,fetchUuid:vn});let _;function ne(){if(_)return _;const e={user:void 0,roles:[],establishments:{}},t=async()=>{if(!T().isAuthenticated())throw new Error("::SDK Authorization:: User not authenticated");const i=(await Q().self().send()).getData();e.user={id:i.id,email:i.email,firstName:i.firstName,lastName:i.lastName,avatar:i.avatar},e.roles=i.roles},s=async i=>{if(!T().isAuthenticated())throw new Error("::SDK Authorization:: User not authenticated");e.establishments[i]=(await B().authorizations(i).send()).getData()},n=i=>{if(e.user===void 0)throw new Error("::SDK Authorization:: User not fetched");return e.roles.includes(i)};return _={fetchSelf:t,fetchPermission:s,hasRole:n,hasRoleRH:()=>n("ROLE_RH"),hasRoleCandidate:()=>n("ROLE_CANDIDATE"),hasRoleAdmin:()=>n("ROLE_ADMIN"),hasPermission:(i,...o)=>{const l=e.establishments[i];if(l===void 0)throw new Error(`::SDK Authorization:: Permissions not fetched for establishment ${i}`);return o.every(m=>l[m]===!0)},clear:()=>{e.user=void 0,e.roles=[],e.establishments={}}},_}async function In(e,...t){if(!T().isAuthenticated())throw"ERR_NOT_AUTHENTICATED";const n=ne();await Promise.all([n.fetchSelf(),n.fetchPermission(e)]);for(let r=0;r<t.length;r++){const a=t[r];if(!n.hasPermission(e,a))throw"ERR_MISSING_PERMISSION"}}const En=fe.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 Q().self().send();this.user=t.getData()}},async fetchPermission(e,t){if(!this.establishments[e]||t){const s=await B().authorizations(e).send();this.establishments[e]=s.getData()}},hasPermission(e,...t){const s=this.establishments[e];return s===void 0?!1:t.every(n=>s[n]===!0)}}}),k=(e,t,s)=>{const n=typeof t=="string"?t.split("."):[t];let r=e;const a=d=>d!=null,f=d=>typeof d=="object";for(const[d,u]of n.entries()){if(!a(r))return s;if(d===n.length-1)return a(r[u])?r[u]:s;if(!f(r[u]))return s;r=r[u]}return s},U=(e,t,s)=>{const n=typeof t=="string"?t.split("."):[t],r=d=>typeof d=="number"||/^\d$/g.test(d),a=d=>parseInt(d,10);let f=e;return n.forEach((d,u)=>{if(u===n.length-1)f[d]=s;else{const i=r(n[u+1])?[]:{};d=r(d)?a(d):d,f[d]=f[d]??i,f=f[d]}}),e},se=e=>{if(typeof e=="object"){if(Array.isArray(e))return[...e];if(Object(e)===e)return{...e}}return e},G=(e,t)=>{const s={...e};for(const[n,r]of Object.entries(t))n in s&&typeof s[n]=="object"&&typeof r=="object"?s[n]=G(s[n],r):s[n]=se(r);return s};let L=null;function g(){if(L)return L;const e=C.getEnvironment(),t=(()=>e==="prod"||e==="production"?"pPROC7dPoJ7XdxHrwsTQNXCGX79MJjhp":e==="staging"?"823rqOTwVk1ZCWVyBAdLInZ77TcFF0CF":"TMZX6evFnu87JrBHV5qLwHsld5C6hilZ")(),s=!!t,n=e!=="prod"&&e!=="production";let r=null;function a(){return s}function f(){const m=window.analytics=window.analytics||[];if(!m.initialize&&m.invoked)E.error("Segment snippet included twice.");else{m.invoked=!0,m.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","debug","page","once","off","on","addSourceMiddleware","addIntegrationMiddleware","setAnonymousId","addDestinationMiddleware"],m.factory=function(p){return function(){if(window.analytics.initialized)return window.analytics[p].apply(window.analytics,arguments);const h=Array.prototype.slice.call(arguments);return h.unshift(p),m.push(h),m}};for(let p=0;p<m.methods.length;p++){const h=m.methods[p];m[h]=m.factory(h)}m.load=function(p,h){const R=document.createElement("script");R.id="analytics-script",R.type="text/javascript",R.async=!0,R.src="https://cdn.segment.com/analytics.js/v1/"+p+"/analytics.min.js",R.onerror=()=>window.dispatchEvent(new Event("analytics-error"));const $=document.getElementsByTagName("script")[0];$.parentNode.insertBefore(R,$),m._loadOptions=h},m._writeKey=t,m.SNIPPET_VERSION="4.16.1",m.load(t),m.page(),m.ready(()=>window.dispatchEvent(new Event("analytics-ready")))}}async function d(){if(window!==void 0)return r!==null||(r=new Promise((m,p)=>{if(!a())return l("Analytics is disabled."),m();if(window.addEventListener("analytics-ready",()=>{l("Analytics script loaded successfully."),m()}),window.addEventListener("analytics-error",()=>{l("Analytics script failed to load. Consider disabling your AdBlocker.",null,"error"),p()}),l("Loading Analytics script."),window.analytics)return m();f()})),r}async function u(m,p){try{if(await this.analyticsScriptReady(),l("[identify]",[m,p]),a())return window.analytics.identify(m,p)}catch{l("[identify]",[m,p],"error")}}async function i(m,p,h){typeof h!="object"&&(h={});try{if(await this.analyticsScriptReady(),l("[page]",[m,p,h]),a())return window.analytics.page(m,{category:p,...h})}catch{l("[page]",[m,p,h],"error")}}async function o(m,p,h){typeof h!="object"&&(h={});try{if(await this.analyticsScriptReady(),l("[track]",[m,p,h]),a())return window.analytics.track(m,{category:p,...h})}catch{l("[track]",[m,p,h],"error")}}function l(m,p=[],h="info"){p||(p=[]),n&&E[h](`::SDK Analytics:: ${m}`,...p)}return L={analyticsScriptReady:d,isEnabled:a,identify:u,page:i,track:o,consoleMessage:l},L}g.destroy=()=>L=null;function re(){const e="Hubler Application";function t(i){var l;if(!i)throw new Error(`Missing arguments for domain "${e}"`);const o=!!i.offerId;if(o&&!i.recruitmentId)throw new Error(`Missing argument "recruitmentId" for domain "${e}"`);return{companyId:(l=i.establishmentId)==null?void 0:l.toString(),jobOfferId:o?i.offerId.toString():null,recruitmentId:o?i.recruitmentId.toString():null,selections:[o?"Application":"Spontaneous Application"]}}async function s(i){return g().page("Application Authentication Viewed",e,t(i))}async function n(i){return g().page("Application Magic Link Viewed",e,t(i))}async function r(i){return g().page("Application Job Viewed",e,t(i))}async function a(i){return g().page("Application Information Viewed",e,t(i))}async function f(i){return g().page("Application Document Viewed",e,t(i))}async function d(i){return g().page("Application Success Viewed",e,t(i))}async function u(i){if(!i.error)throw new Error(`Missing argument "error" for domain "${e}", event "Application Form Failed"`);return g().track("Application Form Failed",e,{...t(i),error:i.error})}return{applicationAuthenticationViewed:s,applicationMagicLinkViewed:n,applicationJobViewed:r,applicationInformationViewed:a,applicationDocumentViewed:f,applicationSuccessViewed:d,applicationFormFailed:u}}function ie(){const e="Profile";function t(c,A){var S;if(!c)throw new Error(`Missing arguments for domain "${e}"`);const P={companyId:c.companyId?c.companyId.toString():null,hublerId:(S=c.hublerId)==null?void 0:S.toString()};return A&&(P.productId=c.companyId?c.companyId+"_2":null),c.recruitmentId&&(P.recruitmentId=c.recruitmentId.toString()),c.selections&&(P.selections=c.selections),c.institutionId&&(P.institutionId=c.institutionId.map(String)),P}async function s(c){return g().track(c.name,e,t(c.properties),!0)}async function n(c){return g().track(c.name,e,t(c.properties,!0))}async function r(c){return g().track(c.name,e,t(c.properties,!0))}async function a(c){return g().track(c.name,e,t(c.properties,!0))}async function f(c){return g().track(c.name,e,t(c.properties,!0))}async function d(c){return g().track(c.name,e,t(c.properties,!0))}async function u(c){return g().track(c.name,e,t(c.properties,!0))}async function i(c){return g().track(c.name,e,t(c.properties,!0))}async function o(c){return g().track(c.name,e,t(c.properties,!0))}async function l(c){return g().track(c.name,e,t(c.properties,!0))}async function m(c){return g().track(c.name,e,t(c.properties,!0))}async function p(c){return g().track(c.name,e,t(c.properties,!0))}async function h(c){return g().track(c.name,e,t(c.properties,!0))}async function R(c){return g().page(c.name,c.properties.category,t(c.properties,!1))}async function $(c){return g().track(c.name,e,t(c.properties,!1))}return{profileDocumentDeleted:s,profileLabelAdded:n,profileLabelRemoved:r,profileShared:a,profileArchived:f,profileCandidateAdded:d,profileCommentAdded:u,profileDocumentAdded:i,profileDocumentDownloaded:o,profileDocumentRequested:l,profileRecruitmentAdded:m,profileRecruitmentRemoved:p,profileTabSelected:h,profileViewed:R,profileEmailSent:$}}const V=Object.freeze(Object.defineProperty({__proto__:null,useAnalyticsHublerApplication:re,useAnalyticsProfile:ie},Symbol.toStringTag,{value:"Module"}));function Sn(){function e(s){return g().identify(s.id,{email:s.email,firstName:s.firstname,lastName:s.lastname,createdAt:s.createdAt,type:"Hubler",lang:"fr",medium:t()?"MOBILE_DEVICE":"WEB_BROWSER"})}function t(){let s=!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)))&&(s=!0)}(navigator.userAgent||navigator.vendor||window.opera),s}return{identifyCandidate:e}}const Cn="AIzaSyDicyRD6rvVdnicp1tgV0ElazASNGbyyTs";let oe=!1;const ae=()=>new Promise(e=>{oe||window.google&&window.google.maps?e():(window.addEventListener("gmap-ready",()=>e()),Ln())}),kn=(e,t)=>ae().then(()=>$n(e,t)),$n=(e,t)=>{const s=new window.google.maps.places.Autocomplete(e,{componentRestrictions:{country:["fr","re","yt","gp","mq"]}});window.google.maps.event.addListener(s,"place_changed",()=>{const n=s.getPlace();n.formatted_address&&t&&t(n.formatted_address,n)})},Ln=()=>{window.onGmapScriptReady=function(){};const e=document.createElement("script");e.src="https://maps.googleapis.com/maps/api/js?key="+Cn+"&libraries=places&callback=onGmapScriptReady",e.async=!0,e.defer=!0,e.onload=()=>window.dispatchEvent(new Event("gmap-ready")),document.body.appendChild(e),oe=!0},Mn={scriptReady:ae,autocompleteInput:kn},Tn={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"}},On={fr:Tn};let q=null;const ce=()=>q,Dn=(e={})=>{let t=e.locale||"fr";const s=u=>t=u,n=()=>t,r=G(On,(e==null?void 0:e.messages)||{}),a=(u,i)=>{const o=k(r,`${t}.${u}`);return o?i?_n(o,i):o:u},f=(u,i)=>{const o=k(r,`${t}.${u}`);return o?xn(o,i):u};return q={t:a,tNode:f,setLocale:s,getLocale:n,install:u=>{u.config.globalProperties.$t=a,u.config.globalProperties.$tNode=f}},q},_n=(e,t)=>e?e.replace(/{{ ?([a-zA-Z_.]+) ?}}/g,(s,n)=>k(t,n)):null,xn=(e,t)=>{if(!e)return null;const s=e.split(/(\{[{%]+[^{}]*[%}]+})/g).filter(n=>n!=="").map(n=>{const r=n.startsWith("{%")&&n.endsWith("%}")?"slot":n.startsWith("{{")&&n.endsWith("}}")?"variable":"text";if(r==="text")return()=>K.text(n);n=n.replace(/[{}%]/g,"").trim();const a=n.match(/^[a-zA-Z_.]+/)[0];n=n.replace(a,"").trim();const f={};return n!==""&&([...n.matchAll(/([a-zA-Z_.]+)(=([a-zA-Z_.]+))?/g)].reduce((i,o)=>(o[3]===void 0?U(i,o[1],k(t,o[1])):U(i,o[1],k(t,o[3])),i),f),[...n.matchAll(/([a-zA-Z_.]+)="([^"]+)"/g)].reduce((i,o)=>{let l=o[2];return new RegExp(/^[0-9]*$/).exec(o[2])?l=parseInt(o[2]):new RegExp(/^(true|false)$/).exec(o[2])&&(l=o[2]==="true"),i[o[1]]=l,i},f)),d=>K[r](a,t,d,f)});return{setup:(n,{slots:r})=>()=>s.map(a=>a(r))}},K={slot:(e,t,s,n)=>x.h("span",{class:"node node--slot"},s[e.trim()](n)),variable:(e,t)=>x.h("span",{class:"node node--variable"},k(t,e.trim())),text:e=>x.h("span",{class:"node node--text"},e)};function Nn(e){const{t}=ce(),s={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,r)=>n===1?t(r?"timeAgo.last-month":"timeAgo.next-month"):`${n} ${t("timeAgo.month",n)}`,year:(n,r)=>n===1?t(r?"timeAgo.last-year":"timeAgo.next-year"):`${n} ${t("timeAgo.year",n)}`,day:(n,r)=>n===1?t(r?"timeAgo.yesterday":"timeAgo.tomorrow"):`${n} ${t("timeAgo.day",n)}`,week:(n,r)=>n===1?t(r?"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 pe.useTimeAgo(e,{fullDateFormatter:n=>n.toLocaleDateString(),messages:s})}function jn(){let e=null;function t(){return e}function s(){return e.controller}function n(){return"use"+e.controller.charAt(0).toUpperCase()+e.controller.slice(1)+"QSController"}function r(){return e.action}function a(){return e.arguments}function f(){return!!(e&&e.controller&&e.action)}function d(){window.location.search.length!==0&&(e=window.location.search.substring(1).split("&").reduce((u,i)=>{const o=i.split("=");return o[0]==="controller"||o[0]==="action"?u[o[0]]=decodeURIComponent(o[1]):u.arguments[o[0]]=decodeURIComponent(o[1]),u},{controller:null,action:null,arguments:{}}))}return d(),{getParams:t,getController:s,getControllerComposableName:n,getAction:r,getArguments:a,hasAction:f}}function Fn(){async function e({domain:n,event:r,...a}){const f="useAnalytics"+n.charAt(0).toUpperCase()+n.slice(1);if(!t(f))throw new Error(`Domain ${n} is not defined`);const d=V[f]();if(!s(d,r))throw new Error(`Event ${r} is not defined in domain ${n}`);return d[r](a)}function t(n){return!!V[n]}function s(n,r){return!!n[r]}return{call:e}}const J=Object.freeze(Object.defineProperty({__proto__:null,useAnalyticsQSController:Fn},Symbol.toStringTag,{value:"Module"}));function Un(e){if(!e.hasAction())throw new Error("No action found in router");function t(){if(!s())throw new Error(`Controller ${e.getController()} not found`);const r=J[e.getControllerComposableName()]();if(!n(r))throw new Error(`Action ${e.getAction()} not found in controller ${e.getController()}`);return r[e.getAction()](e.getArguments())}function s(){return e.getControllerComposableName()in J}function n(r){return e.getAction()in r}return{dispatch:t}}function qn(){let e=!1;function t(r,a,f){n(),f()}function s(r,a,f){if(!e)return e=!0,t(r,a,f);f()}function n(){const r=jn();if(!r.hasAction())return;Un(r).dispatch()}return{vueRouterBeforeEach:t,vueRouterBeforeFirst:s,handle:n}}const zn=()=>({getAssetUrl:t=>`${C.getBaseAssetsUrl()}${t}`}),w=()=>C.getMainAppHost(),Bn=()=>`${w()}/rh/establishments`,Qn=e=>`${w()}/rh/establishment/${e}`,Gn=e=>e&&typeof e=="object"&&e.urls&&e.urls.display?e.urls.display:"",Hn=e=>`${w()}/candidate-invite/establishment/${e}`,Vn=(e,t=!1)=>t?`${w()}/cvbank/${e}/`:`${w()}/rh/establishment/${e}/cvtheque/`,Kn=(e,t)=>`${w()}/user-profile/establishment/${e}/user/${t}`,Jn=(e,t)=>`${w()}/rh/establishment/${e}/recruitment/${t}`,Wn=(e,t)=>`${w()}/rh/establishment/${e}/recruitment/${t}/kanban`,Zn=e=>`${w()}/rh/establishment/${e}/career-configuration`,Xn=(e,t=null)=>t?`${w()}/career-website/${e}/${t}`:`${w()}/career-website/${e}`,Yn=(e,t)=>`${w()}/career-website-preview/${e}/${t}`,es=(e,t=null)=>{const s=w().replace("://",`://${e}.`);return t?`${s}?_version=${t}`:`${s}`};function ts(){return{root:w,establishments:Bn,establishment:Qn,img:Gn,candidateInvite:Hn,cvtheque:Vn,userProfile:Kn,recruitment:Jn,recruitmentKanban:Wn,career:Zn,careerConfig:Xn,careerPreview:Yn,careerWebsite:es}}const W=new Set;let M,z={ignore:e=>e.startsWith("Ui")};const F=e=>{if(e!=null&&e.classList){e._cssChecked=!0;for(const t of e.classList)M.has(t)||W.has(t)||z.ignore(t)||(W.add(t),E.error(`Undefined CSS class: ${t}`))}},ue=e=>{var t;for(const s of e)if(s!=null&&s.cssRules&&(s==null?void 0:s.cssRules.length)>0)ue(s.cssRules);else if(s.selectorText){const n=(t=s.selectorText)==null?void 0:t.match(/\.[\w-]+/g);if(n)for(const r of n)M.add(r.substr(1))}},ns=(e={})=>{if(M)return M;M=new Set,z={...z,...e},ue(document.styleSheets),new MutationObserver(s=>{for(const n of s)if(n.type==="childList"&&(n!=null&&n.addedNodes)){for(const r of n.addedNodes)if(!(r.nodeType===3||r.nodeType===8)){F(r);for(const a of r.querySelectorAll("*"))F(a)}}else(n==null?void 0:n.attributeName)==="class"&&F(n.target)}).observe(document,{attributes:!0,childList:!0,subtree:!0})},ss="0.2.25";exports.BaseLogger=N;exports.Gmap=Mn;exports.SDKConfig=C;exports.SDKLogger=E;exports.VERSION=ss;exports._clone=se;exports._get=k;exports._merge=G;exports._set=U;exports.createI18n=Dn;exports.useActivityRepository=ze;exports.useAnalyticsHublerApplication=re;exports.useAnalyticsIdentify=Sn;exports.useAnalyticsProfile=ie;exports.useAssetUrls=zn;exports.useAuthentication=T;exports.useAuthorization=ne;exports.useAuthorizationStore=En;exports.useCanAccessEstablishmentMiddleware=In;exports.useCandidateRepository=Xe;exports.useCommentRepository=st;exports.useContractTypeRepository=it;exports.useCvbankRepository=at;exports.useCvthequeRepository=ut;exports.useDiplomaRepository=dt;exports.useDocumentRepository=gt;exports.useDomainUrls=ts;exports.useEmailHistoryRepository=Rt;exports.useEmailRepository=Pt;exports.useEmailTemplateRepository=Et;exports.useEstablishmentCareerRepository=Mt;exports.useEstablishmentRepository=B;exports.useFeatureFlagRepository=xt;exports.useI18n=ce;exports.useJobRepository=Ft;exports.useLabelRepository=Gt;exports.useLocaleTimeAgo=Nn;exports.useOfferRepository=Vt;exports.usePrivateRequest=y;exports.useQSAction=qn;exports.useRecruiterRepository=Jt;exports.useRecruitmentRepository=nn;exports.useRegisterRepository=cn;exports.useRegistrationRepository=ln;exports.useRequest=b;exports.useSpecialityRepository=fn;exports.useTagRepository=hn;exports.useTalentRepository=bn;exports.useUndefinedCssClasses=ns;exports.useUserRepository=Q;
|
package/dist/core.js
CHANGED
|
@@ -29,7 +29,7 @@ var Q = {
|
|
|
29
29
|
return s;
|
|
30
30
|
}
|
|
31
31
|
return s;
|
|
32
|
-
}, e.prototype.set = function(t, s, n, r, a,
|
|
32
|
+
}, e.prototype.set = function(t, s, n, r, a, f, d) {
|
|
33
33
|
if (t) {
|
|
34
34
|
if (/^(?:expires|max-age|path|domain|secure|SameSite)$/i.test(t))
|
|
35
35
|
throw new Error('Cookie name illegality. Cannot be set to ["expires","max-age","path","domain","secure","SameSite"] current key name: ' + t);
|
|
@@ -72,7 +72,7 @@ var Q = {
|
|
|
72
72
|
u = "; expires=" + n.toUTCString();
|
|
73
73
|
break;
|
|
74
74
|
}
|
|
75
|
-
return document.cookie = encodeURIComponent(t) + "=" + encodeURIComponent(s) + u + (a ? "; domain=" + a : this.current_default_config.domain ? this.current_default_config.domain : "") + (r ? "; path=" + r : this.current_default_config.path ? this.current_default_config.path : "; path=/") + (
|
|
75
|
+
return document.cookie = encodeURIComponent(t) + "=" + encodeURIComponent(s) + u + (a ? "; domain=" + a : this.current_default_config.domain ? this.current_default_config.domain : "") + (r ? "; path=" + r : this.current_default_config.path ? this.current_default_config.path : "; path=/") + (f == null ? this.current_default_config.secure ? "; Secure" : "" : f ? "; Secure" : "") + (d == null ? this.current_default_config.sameSite ? "; SameSute=" + this.current_default_config.sameSite : "" : d ? "; SameSite=" + d : ""), this;
|
|
76
76
|
}, e.prototype.remove = function(t, s, n) {
|
|
77
77
|
return !t || !this.isKey(t) ? !1 : (document.cookie = encodeURIComponent(t) + "=; expires=Thu, 01 Jan 1970 00:00:00 GMT" + (n ? "; domain=" + n : this.current_default_config.domain ? this.current_default_config.domain : "") + (s ? "; path=" + s : this.current_default_config.path ? this.current_default_config.path : "; path=/") + "; SameSite=Lax", !0);
|
|
78
78
|
}, e.prototype.isKey = function(t) {
|
|
@@ -96,8 +96,8 @@ function fe() {
|
|
|
96
96
|
function t(a) {
|
|
97
97
|
return e.get(a);
|
|
98
98
|
}
|
|
99
|
-
function s(a,
|
|
100
|
-
return e.set(a,
|
|
99
|
+
function s(a, f) {
|
|
100
|
+
return e.set(a, f);
|
|
101
101
|
}
|
|
102
102
|
function n(a) {
|
|
103
103
|
return e.remove(a);
|
|
@@ -112,14 +112,14 @@ function fe() {
|
|
|
112
112
|
clear: r
|
|
113
113
|
};
|
|
114
114
|
}
|
|
115
|
-
let
|
|
115
|
+
let O = null;
|
|
116
116
|
function _(e = {
|
|
117
117
|
auth: "token",
|
|
118
118
|
refresh: "refresh_token",
|
|
119
119
|
expiration: "token_expiration_date"
|
|
120
120
|
}, t = fe()) {
|
|
121
|
-
if (
|
|
122
|
-
return
|
|
121
|
+
if (O)
|
|
122
|
+
return O;
|
|
123
123
|
function s() {
|
|
124
124
|
return t.getItem(e.auth);
|
|
125
125
|
}
|
|
@@ -129,16 +129,16 @@ function _(e = {
|
|
|
129
129
|
function r() {
|
|
130
130
|
return t.getItem(e.expiration);
|
|
131
131
|
}
|
|
132
|
-
function a(m,
|
|
132
|
+
function a(m, p) {
|
|
133
133
|
const h = o(m);
|
|
134
134
|
if (!h.exp)
|
|
135
135
|
throw new Error("Invalid JWT token.");
|
|
136
|
-
t.setItem(e.auth, m), t.setItem(e.refresh,
|
|
136
|
+
t.setItem(e.auth, m), t.setItem(e.refresh, p), t.setItem(e.expiration, ((h.exp - 60) * 1e3).toString());
|
|
137
137
|
}
|
|
138
|
-
function
|
|
138
|
+
function f() {
|
|
139
139
|
t.removeItem(e.auth), t.removeItem(e.refresh), t.removeItem(e.expiration);
|
|
140
140
|
}
|
|
141
|
-
function
|
|
141
|
+
function d() {
|
|
142
142
|
return u() && !i();
|
|
143
143
|
}
|
|
144
144
|
function u() {
|
|
@@ -154,18 +154,18 @@ function _(e = {
|
|
|
154
154
|
function l() {
|
|
155
155
|
return t;
|
|
156
156
|
}
|
|
157
|
-
return
|
|
157
|
+
return O = {
|
|
158
158
|
keys: e,
|
|
159
159
|
getAuthToken: s,
|
|
160
160
|
getRefreshToken: n,
|
|
161
161
|
getExpiration: r,
|
|
162
162
|
authenticate: a,
|
|
163
|
-
clear:
|
|
164
|
-
isAuthenticated:
|
|
163
|
+
clear: f,
|
|
164
|
+
isAuthenticated: d,
|
|
165
165
|
hasAuth: u,
|
|
166
166
|
isExpired: i,
|
|
167
167
|
getStorage: l
|
|
168
|
-
},
|
|
168
|
+
}, O;
|
|
169
169
|
}
|
|
170
170
|
function pe(e) {
|
|
171
171
|
let t = {
|
|
@@ -184,14 +184,14 @@ function pe(e) {
|
|
|
184
184
|
function a(h) {
|
|
185
185
|
return t[h];
|
|
186
186
|
}
|
|
187
|
-
function
|
|
187
|
+
function f(h) {
|
|
188
188
|
return t[h] && delete t[h], this;
|
|
189
189
|
}
|
|
190
|
-
function
|
|
190
|
+
function d(h) {
|
|
191
191
|
return r("Authorization", "Bearer " + h), this;
|
|
192
192
|
}
|
|
193
193
|
function u() {
|
|
194
|
-
return
|
|
194
|
+
return f("Authorization"), this;
|
|
195
195
|
}
|
|
196
196
|
function i() {
|
|
197
197
|
return !!a("Authorization");
|
|
@@ -205,7 +205,7 @@ function pe(e) {
|
|
|
205
205
|
function m() {
|
|
206
206
|
return a("Content-Type") === "multipart/form-data";
|
|
207
207
|
}
|
|
208
|
-
function
|
|
208
|
+
function p() {
|
|
209
209
|
return a("Content-Type") === "application/json";
|
|
210
210
|
}
|
|
211
211
|
return {
|
|
@@ -213,14 +213,14 @@ function pe(e) {
|
|
|
213
213
|
getHeaders: n,
|
|
214
214
|
setHeader: r,
|
|
215
215
|
getHeader: a,
|
|
216
|
-
removeHeader:
|
|
217
|
-
setAuthorization:
|
|
216
|
+
removeHeader: f,
|
|
217
|
+
setAuthorization: d,
|
|
218
218
|
removeAuthorization: u,
|
|
219
219
|
hasAuthorization: i,
|
|
220
220
|
setFormData: o,
|
|
221
221
|
setJson: l,
|
|
222
222
|
isFormData: m,
|
|
223
|
-
isJson:
|
|
223
|
+
isJson: p
|
|
224
224
|
};
|
|
225
225
|
}
|
|
226
226
|
function he(e) {
|
|
@@ -245,27 +245,27 @@ function ye(e, t, s) {
|
|
|
245
245
|
function r(i) {
|
|
246
246
|
if (!["post", "put", "patch"].includes(e.getMethod()))
|
|
247
247
|
throw new Error("Payload can only be set for POST, PUT and PATCH requests.");
|
|
248
|
-
return i instanceof FormData ? t.setFormData() :
|
|
248
|
+
return i instanceof FormData ? t.setFormData() : f(i) && (i = d(i), t.setFormData()), t.isFormData() && e.getMethod() === "put" && (e.setMethod("post"), i.append("_method", "PUT")), n = i, this;
|
|
249
249
|
}
|
|
250
250
|
function a() {
|
|
251
251
|
return n;
|
|
252
252
|
}
|
|
253
|
-
function
|
|
253
|
+
function f(i) {
|
|
254
254
|
for (const o in i) {
|
|
255
255
|
const l = i[o];
|
|
256
256
|
if (u(l))
|
|
257
257
|
return !0;
|
|
258
|
-
if (typeof l == "object" &&
|
|
258
|
+
if (typeof l == "object" && f(l))
|
|
259
259
|
return !0;
|
|
260
260
|
}
|
|
261
261
|
return !1;
|
|
262
262
|
}
|
|
263
|
-
function
|
|
263
|
+
function d(i, o = null, l = 0) {
|
|
264
264
|
const m = !o;
|
|
265
265
|
m && (o = new FormData());
|
|
266
|
-
for (const
|
|
267
|
-
const h = i[
|
|
268
|
-
u(h) ? (i[
|
|
266
|
+
for (const p in i) {
|
|
267
|
+
const h = i[p];
|
|
268
|
+
u(h) ? (i[p] = "<<FileIndex:" + l + ">>", o.append(l, h, h.name), l++) : typeof h == "object" && (i[p] = d(i[p], o, l));
|
|
269
269
|
}
|
|
270
270
|
return m ? (o.append("payload", JSON.stringify(i)), o) : i;
|
|
271
271
|
}
|
|
@@ -283,7 +283,7 @@ const I = class I {
|
|
|
283
283
|
*/
|
|
284
284
|
constructor(t = {}) {
|
|
285
285
|
/** LEVEL represent the current logging level */
|
|
286
|
-
v(this, "level",
|
|
286
|
+
v(this, "level", 3);
|
|
287
287
|
/** Underlying logger to use. Default to console */
|
|
288
288
|
v(this, "logger");
|
|
289
289
|
/** Prefix to use for messages */
|
|
@@ -299,25 +299,25 @@ const I = class I {
|
|
|
299
299
|
}
|
|
300
300
|
/** debug display messages only if level is DEBUG or less */
|
|
301
301
|
debug(...t) {
|
|
302
|
-
this.level <= I.LEVEL_DEBUG &&
|
|
302
|
+
this.level <= I.LEVEL_DEBUG && T(this.logger.debug, this.prefix, t);
|
|
303
303
|
}
|
|
304
304
|
/** info display messages only if level is INFO or less */
|
|
305
305
|
info(...t) {
|
|
306
|
-
this.level <= I.LEVEL_INFO &&
|
|
306
|
+
this.level <= I.LEVEL_INFO && T(this.logger.info, this.prefix, t);
|
|
307
307
|
}
|
|
308
308
|
/** warn display messages only if level is WARN or less */
|
|
309
309
|
warn(...t) {
|
|
310
|
-
this.level <= I.LEVEL_WARN &&
|
|
310
|
+
this.level <= I.LEVEL_WARN && T(this.logger.warn, this.prefix, t);
|
|
311
311
|
}
|
|
312
312
|
/** error display messages only if level is ERROR or less */
|
|
313
313
|
error(...t) {
|
|
314
|
-
this.level <= I.LEVEL_ERROR &&
|
|
314
|
+
this.level <= I.LEVEL_ERROR && T(this.logger.error, this.prefix, t);
|
|
315
315
|
}
|
|
316
316
|
};
|
|
317
317
|
/** Possible logging level by order of verbosity (more verbose first) */
|
|
318
318
|
v(I, "LEVEL_DEBUG", 0), v(I, "LEVEL_INFO", 1), v(I, "LEVEL_WARN", 2), v(I, "LEVEL_ERROR", 3), v(I, "LEVEL_OFF", 4);
|
|
319
319
|
let F = I;
|
|
320
|
-
const
|
|
320
|
+
const T = (e, t, s) => {
|
|
321
321
|
t ? e(t, ...s) : e(...s);
|
|
322
322
|
}, E = new F({
|
|
323
323
|
prefix: "[SDK]"
|
|
@@ -354,14 +354,14 @@ const ge = () => K, be = (e) => {
|
|
|
354
354
|
function Ce(e) {
|
|
355
355
|
const t = k.getApiHost().replace(/\/$/g, "");
|
|
356
356
|
let s = null, n = {}, r = {};
|
|
357
|
-
e &&
|
|
357
|
+
e && d(e);
|
|
358
358
|
function a() {
|
|
359
|
-
return t + u() +
|
|
359
|
+
return t + u() + p();
|
|
360
360
|
}
|
|
361
|
-
function
|
|
361
|
+
function f() {
|
|
362
362
|
return u(!0, !0);
|
|
363
363
|
}
|
|
364
|
-
function
|
|
364
|
+
function d(c) {
|
|
365
365
|
return s = "/" + c.replace(/^\//g, ""), this;
|
|
366
366
|
}
|
|
367
367
|
function u(c = !0, A = !1) {
|
|
@@ -379,7 +379,7 @@ function Ce(e) {
|
|
|
379
379
|
function m() {
|
|
380
380
|
return Object.keys(n).length > 0;
|
|
381
381
|
}
|
|
382
|
-
function
|
|
382
|
+
function p(c = !0) {
|
|
383
383
|
if (!m())
|
|
384
384
|
return "";
|
|
385
385
|
let A = "";
|
|
@@ -401,15 +401,15 @@ function Ce(e) {
|
|
|
401
401
|
return r[c] && delete r[c], this;
|
|
402
402
|
}
|
|
403
403
|
return {
|
|
404
|
-
setPath:
|
|
404
|
+
setPath: d,
|
|
405
405
|
getPath: u,
|
|
406
406
|
getUri: a,
|
|
407
|
-
getMockUri:
|
|
407
|
+
getMockUri: f,
|
|
408
408
|
setQueryParams: i,
|
|
409
409
|
setQueryParam: o,
|
|
410
410
|
removeQueryParam: l,
|
|
411
411
|
hasQuery: m,
|
|
412
|
-
getQueryString:
|
|
412
|
+
getQueryString: p,
|
|
413
413
|
setRouteParams: h,
|
|
414
414
|
setRouteParam: w,
|
|
415
415
|
removeRouteParam: C
|
|
@@ -418,22 +418,22 @@ function Ce(e) {
|
|
|
418
418
|
function ke(e) {
|
|
419
419
|
let t = [];
|
|
420
420
|
function s() {
|
|
421
|
-
return t = i(arguments),
|
|
421
|
+
return t = i(arguments), f(), this;
|
|
422
422
|
}
|
|
423
423
|
function n() {
|
|
424
424
|
return t.length > 0;
|
|
425
425
|
}
|
|
426
426
|
function r(o) {
|
|
427
|
-
return t.includes(o.trim()) ? this : (t.push(o.trim()),
|
|
427
|
+
return t.includes(o.trim()) ? this : (t.push(o.trim()), f(), this);
|
|
428
428
|
}
|
|
429
429
|
function a(o) {
|
|
430
430
|
const l = t.indexOf(o.trim());
|
|
431
|
-
return l === -1 ? this : (t.splice(l, 1),
|
|
431
|
+
return l === -1 ? this : (t.splice(l, 1), f(), this);
|
|
432
432
|
}
|
|
433
|
-
function
|
|
433
|
+
function f() {
|
|
434
434
|
t.length ? e.setQueryParam("groups", u(t)) : e.removeQueryParam("groups");
|
|
435
435
|
}
|
|
436
|
-
function
|
|
436
|
+
function d(o) {
|
|
437
437
|
return o.split(",").map((l) => l.trim());
|
|
438
438
|
}
|
|
439
439
|
function u(o) {
|
|
@@ -441,7 +441,7 @@ function ke(e) {
|
|
|
441
441
|
}
|
|
442
442
|
function i(o) {
|
|
443
443
|
let l = [];
|
|
444
|
-
return o.length === 1 ? typeof o[0] == "string" ? l =
|
|
444
|
+
return o.length === 1 ? typeof o[0] == "string" ? l = d(o[0]) : Array.isArray(o[0]) && (l = o[0]) : l = Array.from(o), l;
|
|
445
445
|
}
|
|
446
446
|
return {
|
|
447
447
|
setGroups: s,
|
|
@@ -453,38 +453,38 @@ function ke(e) {
|
|
|
453
453
|
function $e(e) {
|
|
454
454
|
let t = !1, s = !1, n = 1, r = 10;
|
|
455
455
|
function a() {
|
|
456
|
-
return t = !0,
|
|
456
|
+
return t = !0, f(), this;
|
|
457
457
|
}
|
|
458
|
-
function
|
|
458
|
+
function f() {
|
|
459
459
|
s = !0;
|
|
460
|
-
const
|
|
461
|
-
return i(
|
|
460
|
+
const p = m(arguments);
|
|
461
|
+
return i(p.page || 1, !1), o(p.perPage || r, !1), l(), this;
|
|
462
462
|
}
|
|
463
|
-
function
|
|
463
|
+
function d() {
|
|
464
464
|
return s = !1, l(), this;
|
|
465
465
|
}
|
|
466
466
|
function u() {
|
|
467
467
|
return s;
|
|
468
468
|
}
|
|
469
|
-
function i(
|
|
470
|
-
return t = !0, s = !0, n =
|
|
469
|
+
function i(p, h = !0) {
|
|
470
|
+
return t = !0, s = !0, n = p, h && l(), this;
|
|
471
471
|
}
|
|
472
|
-
function o(
|
|
473
|
-
return t = !0, s = !0, r =
|
|
472
|
+
function o(p, h = !0) {
|
|
473
|
+
return t = !0, s = !0, r = p, h && l(), this;
|
|
474
474
|
}
|
|
475
475
|
function l() {
|
|
476
476
|
t ? u() ? (e.removeQueryParam("pagination"), e.setQueryParam("page", n), e.setQueryParam("nbResultPerPage", r)) : (e.removeQueryParam("page"), e.removeQueryParam("nbResultPerPage"), e.setQueryParam("pagination", "false")) : (e.removeQueryParam("page"), e.removeQueryParam("nbResultPerPage"), e.removeQueryParam("pagination"));
|
|
477
477
|
}
|
|
478
|
-
function m(
|
|
479
|
-
if (
|
|
480
|
-
return
|
|
478
|
+
function m(p) {
|
|
479
|
+
if (p.length === 1 && typeof p[0] == "object")
|
|
480
|
+
return p[0];
|
|
481
481
|
const h = {};
|
|
482
|
-
return
|
|
482
|
+
return p.length >= 1 && (h.page = p[0]), p.length >= 2 && (h.perPage = p[1]), h;
|
|
483
483
|
}
|
|
484
484
|
return {
|
|
485
485
|
isList: a,
|
|
486
|
-
paginate:
|
|
487
|
-
disablePagination:
|
|
486
|
+
paginate: f,
|
|
487
|
+
disablePagination: d,
|
|
488
488
|
hasPagination: u,
|
|
489
489
|
setPage: i,
|
|
490
490
|
setPerPage: o
|
|
@@ -495,15 +495,15 @@ function Le(e) {
|
|
|
495
495
|
function r() {
|
|
496
496
|
t = !0;
|
|
497
497
|
const o = i(arguments);
|
|
498
|
-
return o.orderBy &&
|
|
498
|
+
return o.orderBy && f(o.orderBy, !1), o.orderDir && d(o.orderDir, !1), u(), this;
|
|
499
499
|
}
|
|
500
500
|
function a() {
|
|
501
501
|
return t;
|
|
502
502
|
}
|
|
503
|
-
function
|
|
503
|
+
function f(o, l = !0) {
|
|
504
504
|
return t = !0, s = o, l && u(), this;
|
|
505
505
|
}
|
|
506
|
-
function
|
|
506
|
+
function d(o, l = !0) {
|
|
507
507
|
if (o = o.toUpperCase(), ["ASC", "DESC"].indexOf(o) === -1)
|
|
508
508
|
throw new Error("Invalid order direction");
|
|
509
509
|
return t = !0, n = o, l && u(), this;
|
|
@@ -520,8 +520,8 @@ function Le(e) {
|
|
|
520
520
|
return {
|
|
521
521
|
setOrder: r,
|
|
522
522
|
hasOrder: a,
|
|
523
|
-
setOrderBy:
|
|
524
|
-
setOrderDir:
|
|
523
|
+
setOrderBy: f,
|
|
524
|
+
setOrderDir: d
|
|
525
525
|
};
|
|
526
526
|
}
|
|
527
527
|
function Me() {
|
|
@@ -537,7 +537,7 @@ function Me() {
|
|
|
537
537
|
isSilent: s
|
|
538
538
|
};
|
|
539
539
|
}
|
|
540
|
-
function
|
|
540
|
+
function Oe() {
|
|
541
541
|
let e = "json";
|
|
542
542
|
function t(n = "json") {
|
|
543
543
|
if (["arraybuffer", "document", "json", "text", "stream", "blob"].indexOf(n) === -1)
|
|
@@ -552,7 +552,7 @@ function Te() {
|
|
|
552
552
|
getResponseType: s
|
|
553
553
|
};
|
|
554
554
|
}
|
|
555
|
-
function
|
|
555
|
+
function Te(e) {
|
|
556
556
|
function t() {
|
|
557
557
|
return e;
|
|
558
558
|
}
|
|
@@ -592,17 +592,17 @@ function _e(e) {
|
|
|
592
592
|
function a() {
|
|
593
593
|
return r() ? e.data["hydra:member"] : null;
|
|
594
594
|
}
|
|
595
|
-
function
|
|
595
|
+
function f() {
|
|
596
596
|
return r() ? e.data["hydra:totalItems"] : null;
|
|
597
597
|
}
|
|
598
|
-
function
|
|
598
|
+
function d() {
|
|
599
599
|
return r() ? e.data["hydra:view"] && e.data["hydra:view"]["hydra:last"] : !1;
|
|
600
600
|
}
|
|
601
601
|
function u() {
|
|
602
|
-
return !r() || !
|
|
602
|
+
return !r() || !d() ? null : parseInt(e.data["hydra:view"]["@id"].match(/page=(\d+)/)[1]);
|
|
603
603
|
}
|
|
604
604
|
function i() {
|
|
605
|
-
return !r() || !
|
|
605
|
+
return !r() || !d() ? null : parseInt(e.data["hydra:view"]["hydra:last"].match(/page=(\d+)/)[1]);
|
|
606
606
|
}
|
|
607
607
|
return {
|
|
608
608
|
getResponse: t,
|
|
@@ -610,46 +610,46 @@ function _e(e) {
|
|
|
610
610
|
getPayload: n,
|
|
611
611
|
isCollection: r,
|
|
612
612
|
getCollection: a,
|
|
613
|
-
getTotal:
|
|
614
|
-
hasPagination:
|
|
613
|
+
getTotal: f,
|
|
614
|
+
hasPagination: d,
|
|
615
615
|
getPage: u,
|
|
616
616
|
getPages: i
|
|
617
617
|
};
|
|
618
618
|
}
|
|
619
619
|
function xe(e, t, s, n, r, a) {
|
|
620
|
-
async function
|
|
620
|
+
async function f() {
|
|
621
621
|
const u = s.getMethod(), i = t.getUri(), o = e.getHeaders(), l = n.getPayload(), m = [i];
|
|
622
622
|
["post", "put", "patch"].includes(u) && m.push(l || {}), m.push({
|
|
623
623
|
headers: o,
|
|
624
624
|
responseType: a.getResponseType()
|
|
625
625
|
}), E.info("[Request] Sending request:", `[${u.toUpperCase()}]`, i);
|
|
626
626
|
try {
|
|
627
|
-
const
|
|
628
|
-
return p
|
|
629
|
-
} catch (
|
|
630
|
-
throw De(
|
|
627
|
+
const p = await ce[u](...m);
|
|
628
|
+
return d(p);
|
|
629
|
+
} catch (p) {
|
|
630
|
+
throw De(p, r.isSilent());
|
|
631
631
|
}
|
|
632
632
|
}
|
|
633
|
-
function
|
|
633
|
+
function d(u) {
|
|
634
634
|
if (u.headers) {
|
|
635
635
|
const i = Object.keys(u.headers), o = i.map((l) => l.toLowerCase()).indexOf("content-type");
|
|
636
636
|
if (o !== -1 && u.headers[i[o]].includes("application/ld+json"))
|
|
637
637
|
return _e(u);
|
|
638
638
|
}
|
|
639
|
-
return
|
|
639
|
+
return Te(u);
|
|
640
640
|
}
|
|
641
641
|
return {
|
|
642
|
-
send:
|
|
642
|
+
send: f
|
|
643
643
|
};
|
|
644
644
|
}
|
|
645
645
|
function b(e, t = "get", s = null) {
|
|
646
|
-
const n = pe(), r = Ce(e), a = he(t),
|
|
646
|
+
const n = pe(), r = Ce(e), a = he(t), f = ye(a, n, s), d = ke(r), u = $e(r), i = Le(r), o = Me(), l = Oe(), m = xe(n, r, a, f, o, l);
|
|
647
647
|
return {
|
|
648
648
|
...n,
|
|
649
649
|
...r,
|
|
650
650
|
...a,
|
|
651
|
+
...f,
|
|
651
652
|
...d,
|
|
652
|
-
...p,
|
|
653
653
|
...u,
|
|
654
654
|
...i,
|
|
655
655
|
...o,
|
|
@@ -679,12 +679,12 @@ const Ne = (e, t) => y("/v2/activity/candidate/:candidateId/establishment/:estab
|
|
|
679
679
|
updateCandidate: qe,
|
|
680
680
|
closeIncompleteRegistration: Ge,
|
|
681
681
|
openNewRegistration: He
|
|
682
|
-
}), Ve = (e, t) => y("/comment/establishment/:establishmentId/candidate/:userId").setRouteParams({ establishmentId: e, userId: t }), Ke = (e, t, s) => y("/comment/establishment/:establishmentId/candidate/:userId").setRouteParams({ establishmentId: e, userId: t }).setMethod("post").setPayload(s), Je = (e, t) => y("/comment/:commentId").setRouteParams({ commentId: e }).setMethod("put").setPayload(t), We = (e) => y("/comment/:commentId").setRouteParams({ commentId: e }).setMethod("delete"),
|
|
682
|
+
}), Ve = (e, t) => y("/comment/establishment/:establishmentId/candidate/:userId").setRouteParams({ establishmentId: e, userId: t }), Ke = (e, t, s) => y("/comment/establishment/:establishmentId/candidate/:userId").setRouteParams({ establishmentId: e, userId: t }).setMethod("post").setPayload(s), Je = (e, t) => y("/comment/:commentId").setRouteParams({ commentId: e }).setMethod("put").setPayload(t), We = (e) => y("/comment/:commentId").setRouteParams({ commentId: e }).setMethod("delete"), On = () => ({
|
|
683
683
|
getForEstablishmentCandidate: Ve,
|
|
684
684
|
postForEstablishmentCandidate: Ke,
|
|
685
685
|
update: Je,
|
|
686
686
|
remove: We
|
|
687
|
-
}), Ze = () => b("contractType").isList().addGroup("Term:id").addGroup("Term:name"),
|
|
687
|
+
}), Ze = () => b("contractType").isList().addGroup("Term:id").addGroup("Term:name"), Tn = () => ({
|
|
688
688
|
list: Ze
|
|
689
689
|
}), Xe = (e) => y("/v2/talents").isList().setQueryParam("establishment-id", e), Dn = () => ({
|
|
690
690
|
list: Xe
|
|
@@ -740,12 +740,12 @@ const Ne = (e, t) => y("/v2/activity/candidate/:candidateId/establishment/:estab
|
|
|
740
740
|
return t && s.setQueryParam("exclude-me", 1), s;
|
|
741
741
|
}, Hn = () => ({
|
|
742
742
|
listByEstablishment: kt
|
|
743
|
-
}), $t = (e) => y("/recruitment/establishment/:establishmentId/mine").isList().setRouteParams({ establishmentId: e }), Lt = (e, t) => y("/recruitment/mine/establishment/:establishmentId/has-not/candidate/:candidateId").isList().setRouteParams({ establishmentId: e, candidateId: t }), Mt = (e, t) => y("/recruitment/mine/establishment/:establishmentId/has/candidate/:candidateId").isList().setRouteParams({ establishmentId: e, candidateId: t }),
|
|
743
|
+
}), $t = (e) => y("/recruitment/establishment/:establishmentId/mine").isList().setRouteParams({ establishmentId: e }), Lt = (e, t) => y("/recruitment/mine/establishment/:establishmentId/has-not/candidate/:candidateId").isList().setRouteParams({ establishmentId: e, candidateId: t }), Mt = (e, t) => y("/recruitment/mine/establishment/:establishmentId/has/candidate/:candidateId").isList().setRouteParams({ establishmentId: e, candidateId: t }), Ot = (e, t) => y("/recruitment/establishment/:establishmentId/has/candidate/:candidateId").isList().setRouteParams({ establishmentId: e, candidateId: t }), Tt = (e, t) => y("/recruitment/:recruitmentId/candidate").setMethod("put").setRouteParams({ recruitmentId: e }).setPayload(t), Dt = (e, t) => y("/recruitment/:recruitmentId/candidate/:candidateId").setMethod("delete").setRouteParams({ recruitmentId: e, candidateId: t }), Vn = () => ({
|
|
744
744
|
mineByEstablishment: $t,
|
|
745
745
|
mineWithoutCandidate: Lt,
|
|
746
746
|
mineWithCandidate: Mt,
|
|
747
|
-
withCandidate:
|
|
748
|
-
addCandidates:
|
|
747
|
+
withCandidate: Ot,
|
|
748
|
+
addCandidates: Tt,
|
|
749
749
|
removeCandidate: Dt
|
|
750
750
|
}), _t = (e, t, s, n = null) => {
|
|
751
751
|
const r = b("candidate/register/open").setMethod("post"), a = { email: e };
|
|
@@ -870,23 +870,26 @@ const es = ue("authorization", {
|
|
|
870
870
|
}), $ = (e, t, s) => {
|
|
871
871
|
const n = typeof t == "string" ? t.split(".") : [t];
|
|
872
872
|
let r = e;
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
if (r === null || !(d in r) || typeof r[d] != "object")
|
|
873
|
+
const a = (d) => d != null, f = (d) => typeof d == "object";
|
|
874
|
+
for (const [d, u] of n.entries()) {
|
|
875
|
+
if (!a(r))
|
|
877
876
|
return s;
|
|
878
|
-
|
|
877
|
+
if (d === n.length - 1)
|
|
878
|
+
return a(r[u]) ? r[u] : s;
|
|
879
|
+
if (!f(r[u]))
|
|
880
|
+
return s;
|
|
881
|
+
r = r[u];
|
|
879
882
|
}
|
|
880
883
|
return s;
|
|
881
884
|
}, U = (e, t, s) => {
|
|
882
|
-
const n = typeof t == "string" ? t.split(".") : [t], r = (
|
|
883
|
-
let
|
|
884
|
-
return n.forEach((
|
|
885
|
+
const n = typeof t == "string" ? t.split(".") : [t], r = (d) => typeof d == "number" || /^\d$/g.test(d), a = (d) => parseInt(d, 10);
|
|
886
|
+
let f = e;
|
|
887
|
+
return n.forEach((d, u) => {
|
|
885
888
|
if (u === n.length - 1)
|
|
886
|
-
d
|
|
889
|
+
f[d] = s;
|
|
887
890
|
else {
|
|
888
891
|
const i = r(n[u + 1]) ? [] : {};
|
|
889
|
-
|
|
892
|
+
d = r(d) ? a(d) : d, f[d] = f[d] ?? i, f = f[d];
|
|
890
893
|
}
|
|
891
894
|
}), e;
|
|
892
895
|
}, Zt = (e) => {
|
|
@@ -912,81 +915,82 @@ function g() {
|
|
|
912
915
|
function a() {
|
|
913
916
|
return s;
|
|
914
917
|
}
|
|
915
|
-
function
|
|
918
|
+
function f() {
|
|
916
919
|
const m = window.analytics = window.analytics || [];
|
|
917
920
|
if (!m.initialize && m.invoked)
|
|
918
921
|
E.error("Segment snippet included twice.");
|
|
919
922
|
else {
|
|
920
|
-
m.invoked = !0, m.methods = ["trackSubmit", "trackClick", "trackLink", "trackForm", "pageview", "identify", "reset", "group", "track", "ready", "alias", "debug", "page", "once", "off", "on", "addSourceMiddleware", "addIntegrationMiddleware", "setAnonymousId", "addDestinationMiddleware"], m.factory = function(
|
|
923
|
+
m.invoked = !0, m.methods = ["trackSubmit", "trackClick", "trackLink", "trackForm", "pageview", "identify", "reset", "group", "track", "ready", "alias", "debug", "page", "once", "off", "on", "addSourceMiddleware", "addIntegrationMiddleware", "setAnonymousId", "addDestinationMiddleware"], m.factory = function(p) {
|
|
921
924
|
return function() {
|
|
922
925
|
if (window.analytics.initialized)
|
|
923
|
-
return window.analytics[
|
|
926
|
+
return window.analytics[p].apply(window.analytics, arguments);
|
|
924
927
|
const h = Array.prototype.slice.call(arguments);
|
|
925
|
-
return h.unshift(
|
|
928
|
+
return h.unshift(p), m.push(h), m;
|
|
926
929
|
};
|
|
927
930
|
};
|
|
928
|
-
for (let
|
|
929
|
-
const h = m.methods[
|
|
931
|
+
for (let p = 0; p < m.methods.length; p++) {
|
|
932
|
+
const h = m.methods[p];
|
|
930
933
|
m[h] = m.factory(h);
|
|
931
934
|
}
|
|
932
|
-
m.load = function(
|
|
935
|
+
m.load = function(p, h) {
|
|
933
936
|
const w = document.createElement("script");
|
|
934
|
-
w.id = "analytics-script", w.type = "text/javascript", w.async = !0, w.src = "https://cdn.segment.com/analytics.js/v1/" +
|
|
937
|
+
w.id = "analytics-script", w.type = "text/javascript", w.async = !0, w.src = "https://cdn.segment.com/analytics.js/v1/" + p + "/analytics.min.js", w.onerror = () => window.dispatchEvent(new Event("analytics-error"));
|
|
935
938
|
const C = document.getElementsByTagName("script")[0];
|
|
936
939
|
C.parentNode.insertBefore(w, C), m._loadOptions = h;
|
|
937
940
|
}, m._writeKey = t, m.SNIPPET_VERSION = "4.16.1", m.load(t), m.page(), m.ready(() => window.dispatchEvent(new Event("analytics-ready")));
|
|
938
941
|
}
|
|
939
942
|
}
|
|
940
|
-
async function
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
943
|
+
async function d() {
|
|
944
|
+
if (window !== void 0)
|
|
945
|
+
return r !== null || (r = new Promise((m, p) => {
|
|
946
|
+
if (!a())
|
|
947
|
+
return l("Analytics is disabled."), m();
|
|
948
|
+
if (window.addEventListener("analytics-ready", () => {
|
|
949
|
+
l("Analytics script loaded successfully."), m();
|
|
950
|
+
}), window.addEventListener("analytics-error", () => {
|
|
951
|
+
l("Analytics script failed to load. Consider disabling your AdBlocker.", null, "error"), p();
|
|
952
|
+
}), l("Loading Analytics script."), window.analytics)
|
|
953
|
+
return m();
|
|
954
|
+
f();
|
|
955
|
+
})), r;
|
|
956
|
+
}
|
|
957
|
+
async function u(m, p) {
|
|
954
958
|
try {
|
|
955
|
-
if (await this.analyticsScriptReady(), l("[identify]", [m,
|
|
956
|
-
return window.analytics.identify(m,
|
|
959
|
+
if (await this.analyticsScriptReady(), l("[identify]", [m, p]), a())
|
|
960
|
+
return window.analytics.identify(m, p);
|
|
957
961
|
} catch {
|
|
958
|
-
l("[identify]", [m,
|
|
962
|
+
l("[identify]", [m, p], "error");
|
|
959
963
|
}
|
|
960
964
|
}
|
|
961
|
-
async function i(m,
|
|
965
|
+
async function i(m, p, h) {
|
|
962
966
|
typeof h != "object" && (h = {});
|
|
963
967
|
try {
|
|
964
|
-
if (await this.analyticsScriptReady(), l("[page]", [m,
|
|
968
|
+
if (await this.analyticsScriptReady(), l("[page]", [m, p, h]), a())
|
|
965
969
|
return window.analytics.page(m, {
|
|
966
|
-
category:
|
|
970
|
+
category: p,
|
|
967
971
|
...h
|
|
968
972
|
});
|
|
969
973
|
} catch {
|
|
970
|
-
l("[page]", [m,
|
|
974
|
+
l("[page]", [m, p, h], "error");
|
|
971
975
|
}
|
|
972
976
|
}
|
|
973
|
-
async function o(m,
|
|
977
|
+
async function o(m, p, h) {
|
|
974
978
|
typeof h != "object" && (h = {});
|
|
975
979
|
try {
|
|
976
|
-
if (await this.analyticsScriptReady(), l("[track]", [m,
|
|
980
|
+
if (await this.analyticsScriptReady(), l("[track]", [m, p, h]), a())
|
|
977
981
|
return window.analytics.track(m, {
|
|
978
|
-
category:
|
|
982
|
+
category: p,
|
|
979
983
|
...h
|
|
980
984
|
});
|
|
981
985
|
} catch {
|
|
982
|
-
l("[track]", [m,
|
|
986
|
+
l("[track]", [m, p, h], "error");
|
|
983
987
|
}
|
|
984
988
|
}
|
|
985
|
-
function l(m,
|
|
986
|
-
|
|
989
|
+
function l(m, p = [], h = "info") {
|
|
990
|
+
p || (p = []), n && E[h](`::SDK Analytics:: ${m}`, ...p);
|
|
987
991
|
}
|
|
988
992
|
return L = {
|
|
989
|
-
analyticsScriptReady:
|
|
993
|
+
analyticsScriptReady: d,
|
|
990
994
|
isEnabled: a,
|
|
991
995
|
identify: u,
|
|
992
996
|
page: i,
|
|
@@ -1023,10 +1027,10 @@ function Xt() {
|
|
|
1023
1027
|
async function a(i) {
|
|
1024
1028
|
return g().page("Application Information Viewed", e, t(i));
|
|
1025
1029
|
}
|
|
1026
|
-
async function
|
|
1030
|
+
async function f(i) {
|
|
1027
1031
|
return g().page("Application Document Viewed", e, t(i));
|
|
1028
1032
|
}
|
|
1029
|
-
async function
|
|
1033
|
+
async function d(i) {
|
|
1030
1034
|
return g().page("Application Success Viewed", e, t(i));
|
|
1031
1035
|
}
|
|
1032
1036
|
async function u(i) {
|
|
@@ -1039,8 +1043,8 @@ function Xt() {
|
|
|
1039
1043
|
applicationMagicLinkViewed: n,
|
|
1040
1044
|
applicationJobViewed: r,
|
|
1041
1045
|
applicationInformationViewed: a,
|
|
1042
|
-
applicationDocumentViewed:
|
|
1043
|
-
applicationSuccessViewed:
|
|
1046
|
+
applicationDocumentViewed: f,
|
|
1047
|
+
applicationSuccessViewed: d,
|
|
1044
1048
|
applicationFormFailed: u
|
|
1045
1049
|
};
|
|
1046
1050
|
}
|
|
@@ -1068,10 +1072,10 @@ function Yt() {
|
|
|
1068
1072
|
async function a(c) {
|
|
1069
1073
|
return g().track(c.name, e, t(c.properties, !0));
|
|
1070
1074
|
}
|
|
1071
|
-
async function
|
|
1075
|
+
async function f(c) {
|
|
1072
1076
|
return g().track(c.name, e, t(c.properties, !0));
|
|
1073
1077
|
}
|
|
1074
|
-
async function
|
|
1078
|
+
async function d(c) {
|
|
1075
1079
|
return g().track(c.name, e, t(c.properties, !0));
|
|
1076
1080
|
}
|
|
1077
1081
|
async function u(c) {
|
|
@@ -1089,7 +1093,7 @@ function Yt() {
|
|
|
1089
1093
|
async function m(c) {
|
|
1090
1094
|
return g().track(c.name, e, t(c.properties, !0));
|
|
1091
1095
|
}
|
|
1092
|
-
async function
|
|
1096
|
+
async function p(c) {
|
|
1093
1097
|
return g().track(c.name, e, t(c.properties, !0));
|
|
1094
1098
|
}
|
|
1095
1099
|
async function h(c) {
|
|
@@ -1106,14 +1110,14 @@ function Yt() {
|
|
|
1106
1110
|
profileLabelAdded: n,
|
|
1107
1111
|
profileLabelRemoved: r,
|
|
1108
1112
|
profileShared: a,
|
|
1109
|
-
profileArchived:
|
|
1110
|
-
profileCandidateAdded:
|
|
1113
|
+
profileArchived: f,
|
|
1114
|
+
profileCandidateAdded: d,
|
|
1111
1115
|
profileCommentAdded: u,
|
|
1112
1116
|
profileDocumentAdded: i,
|
|
1113
1117
|
profileDocumentDownloaded: o,
|
|
1114
1118
|
profileDocumentRequested: l,
|
|
1115
1119
|
profileRecruitmentAdded: m,
|
|
1116
|
-
profileRecruitmentRemoved:
|
|
1120
|
+
profileRecruitmentRemoved: p,
|
|
1117
1121
|
profileTabSelected: h,
|
|
1118
1122
|
profileViewed: w,
|
|
1119
1123
|
profileEmailSent: C
|
|
@@ -1198,17 +1202,17 @@ const an = () => B, ss = (e = {}) => {
|
|
|
1198
1202
|
const s = (u) => t = u, n = () => t, r = te(on, (e == null ? void 0 : e.messages) || {}), a = (u, i) => {
|
|
1199
1203
|
const o = $(r, `${t}.${u}`);
|
|
1200
1204
|
return o ? i ? cn(o, i) : o : u;
|
|
1201
|
-
},
|
|
1205
|
+
}, f = (u, i) => {
|
|
1202
1206
|
const o = $(r, `${t}.${u}`);
|
|
1203
1207
|
return o ? un(o, i) : u;
|
|
1204
1208
|
};
|
|
1205
1209
|
return B = {
|
|
1206
1210
|
t: a,
|
|
1207
|
-
tNode:
|
|
1211
|
+
tNode: f,
|
|
1208
1212
|
setLocale: s,
|
|
1209
1213
|
getLocale: n,
|
|
1210
1214
|
install: (u) => {
|
|
1211
|
-
u.config.globalProperties.$t = a, u.config.globalProperties.$tNode =
|
|
1215
|
+
u.config.globalProperties.$t = a, u.config.globalProperties.$tNode = f;
|
|
1212
1216
|
}
|
|
1213
1217
|
}, B;
|
|
1214
1218
|
}, cn = (e, t) => e ? e.replace(/{{ ?([a-zA-Z_.]+) ?}}/g, (s, n) => $(t, n)) : null, un = (e, t) => {
|
|
@@ -1221,11 +1225,11 @@ const an = () => B, ss = (e = {}) => {
|
|
|
1221
1225
|
n = n.replace(/[{}%]/g, "").trim();
|
|
1222
1226
|
const a = n.match(/^[a-zA-Z_.]+/)[0];
|
|
1223
1227
|
n = n.replace(a, "").trim();
|
|
1224
|
-
const
|
|
1225
|
-
return n !== "" && ([...n.matchAll(/([a-zA-Z_.]+)(=([a-zA-Z_.]+))?/g)].reduce((i, o) => (o[3] === void 0 ? U(i, o[1], $(t, o[1])) : U(i, o[1], $(t, o[3])), i),
|
|
1228
|
+
const f = {};
|
|
1229
|
+
return n !== "" && ([...n.matchAll(/([a-zA-Z_.]+)(=([a-zA-Z_.]+))?/g)].reduce((i, o) => (o[3] === void 0 ? U(i, o[1], $(t, o[1])) : U(i, o[1], $(t, o[3])), i), f), [...n.matchAll(/([a-zA-Z_.]+)="([^"]+)"/g)].reduce((i, o) => {
|
|
1226
1230
|
let l = o[2];
|
|
1227
1231
|
return new RegExp(/^[0-9]*$/).exec(o[2]) ? l = parseInt(o[2]) : new RegExp(/^(true|false)$/).exec(o[2]) && (l = o[2] === "true"), i[o[1]] = l, i;
|
|
1228
|
-
},
|
|
1232
|
+
}, f)), (d) => G[r](a, t, d, f);
|
|
1229
1233
|
});
|
|
1230
1234
|
return { setup: (n, { slots: r }) => () => s.map((a) => a(r)) };
|
|
1231
1235
|
}, G = {
|
|
@@ -1269,33 +1273,33 @@ function ln() {
|
|
|
1269
1273
|
function a() {
|
|
1270
1274
|
return e.arguments;
|
|
1271
1275
|
}
|
|
1272
|
-
function
|
|
1276
|
+
function f() {
|
|
1273
1277
|
return !!(e && e.controller && e.action);
|
|
1274
1278
|
}
|
|
1275
|
-
function
|
|
1279
|
+
function d() {
|
|
1276
1280
|
window.location.search.length !== 0 && (e = window.location.search.substring(1).split("&").reduce((u, i) => {
|
|
1277
1281
|
const o = i.split("=");
|
|
1278
1282
|
return o[0] === "controller" || o[0] === "action" ? u[o[0]] = decodeURIComponent(o[1]) : u.arguments[o[0]] = decodeURIComponent(o[1]), u;
|
|
1279
1283
|
}, { controller: null, action: null, arguments: {} }));
|
|
1280
1284
|
}
|
|
1281
|
-
return
|
|
1285
|
+
return d(), {
|
|
1282
1286
|
getParams: t,
|
|
1283
1287
|
getController: s,
|
|
1284
1288
|
getControllerComposableName: n,
|
|
1285
1289
|
getAction: r,
|
|
1286
1290
|
getArguments: a,
|
|
1287
|
-
hasAction:
|
|
1291
|
+
hasAction: f
|
|
1288
1292
|
};
|
|
1289
1293
|
}
|
|
1290
1294
|
function dn() {
|
|
1291
1295
|
async function e({ domain: n, event: r, ...a }) {
|
|
1292
|
-
const
|
|
1293
|
-
if (!t(
|
|
1296
|
+
const f = "useAnalytics" + n.charAt(0).toUpperCase() + n.slice(1);
|
|
1297
|
+
if (!t(f))
|
|
1294
1298
|
throw new Error(`Domain ${n} is not defined`);
|
|
1295
|
-
const
|
|
1296
|
-
if (!s(
|
|
1299
|
+
const d = q[f]();
|
|
1300
|
+
if (!s(d, r))
|
|
1297
1301
|
throw new Error(`Event ${r} is not defined in domain ${n}`);
|
|
1298
|
-
return
|
|
1302
|
+
return d[r](a);
|
|
1299
1303
|
}
|
|
1300
1304
|
function t(n) {
|
|
1301
1305
|
return !!q[n];
|
|
@@ -1334,13 +1338,13 @@ function mn(e) {
|
|
|
1334
1338
|
}
|
|
1335
1339
|
function is() {
|
|
1336
1340
|
let e = !1;
|
|
1337
|
-
function t(r, a,
|
|
1338
|
-
n(),
|
|
1341
|
+
function t(r, a, f) {
|
|
1342
|
+
n(), f();
|
|
1339
1343
|
}
|
|
1340
|
-
function s(r, a,
|
|
1344
|
+
function s(r, a, f) {
|
|
1341
1345
|
if (!e)
|
|
1342
|
-
return e = !0, t(r, a,
|
|
1343
|
-
|
|
1346
|
+
return e = !0, t(r, a, f);
|
|
1347
|
+
f();
|
|
1344
1348
|
}
|
|
1345
1349
|
function n() {
|
|
1346
1350
|
const r = ln();
|
|
@@ -1415,7 +1419,7 @@ const j = (e) => {
|
|
|
1415
1419
|
childList: !0,
|
|
1416
1420
|
subtree: !0
|
|
1417
1421
|
});
|
|
1418
|
-
}, us = "0.2.
|
|
1422
|
+
}, us = "0.2.25";
|
|
1419
1423
|
export {
|
|
1420
1424
|
F as BaseLogger,
|
|
1421
1425
|
ns as Gmap,
|
|
@@ -1437,8 +1441,8 @@ export {
|
|
|
1437
1441
|
es as useAuthorizationStore,
|
|
1438
1442
|
Yn as useCanAccessEstablishmentMiddleware,
|
|
1439
1443
|
Mn as useCandidateRepository,
|
|
1440
|
-
|
|
1441
|
-
|
|
1444
|
+
On as useCommentRepository,
|
|
1445
|
+
Tn as useContractTypeRepository,
|
|
1442
1446
|
Dn as useCvbankRepository,
|
|
1443
1447
|
_n as useCvthequeRepository,
|
|
1444
1448
|
xn as useDiplomaRepository,
|