@hublo/mstaff-client-sdk 0.2.4 → 0.2.5
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/README.md +1 -15
- package/dist/main.cjs +1 -1
- package/dist/main.js +227 -224
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -3,18 +3,4 @@
|
|
|
3
3
|

|
|
4
4
|

|
|
5
5
|

|
|
6
|
-

|
|
7
|
-
|
|
8
|
-
## Repository endpoints naming conventions
|
|
9
|
-
|
|
10
|
-
Endpoints should start either by :
|
|
11
|
-
|
|
12
|
-
- list
|
|
13
|
-
- read
|
|
14
|
-
- create
|
|
15
|
-
- update
|
|
16
|
-
- delete
|
|
17
|
-
|
|
18
|
-
and 'by' for establishing context.
|
|
19
|
-
|
|
20
|
-
Example: `listByCandidateAndEstablishmentFromRecruiter()`
|
|
6
|
+

|
package/dist/main.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var re=Object.defineProperty;var ie=(e,t,r)=>t in e?re(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var v=(e,t,r)=>(ie(e,typeof t!="symbol"?t+"":t,r),r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const T=require("vue"),oe=require("axios"),se=require("pinia"),ae=require("@vueuse/core");var H={expireTimes:"1d",path:"; path=/",domain:"",secure:!1,sameSite:"; SameSite=Lax"},ce=function(){function e(){this.current_default_config=H}return e.prototype.config=function(t){for(var r in this.current_default_config)this.current_default_config[r]=t[r]?t[r]:H[r]},e.prototype.get=function(t){var r=decodeURIComponent(document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*"+encodeURIComponent(t).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1"))||null;if(r&&r.substring(0,1)==="{"&&r.substring(r.length-1,r.length)==="}")try{r=JSON.parse(r)}catch{return r}return r},e.prototype.set=function(t,r,n,i,c,d,m){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.");r&&r.constructor===Object&&(r=JSON.stringify(r));var l="";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?l="; expires=Fri, 31 Dec 9999 23:59:59 GMT":l="; max-age="+n;break;case String:if(/^(?:\d+(y|m|d|h|min|s))$/i.test(n)){var o=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":l="; max-age="+ +o*2592e3;break;case"d":l="; max-age="+ +o*86400;break;case"h":l="; max-age="+ +o*3600;break;case"min":l="; max-age="+ +o*60;break;case"s":l="; max-age="+o;break;case"y":l="; max-age="+ +o*31104e3;break}}else l="; expires="+n;break;case Date:l="; expires="+n.toUTCString();break}return document.cookie=encodeURIComponent(t)+"="+encodeURIComponent(r)+l+(c?"; domain="+c:this.current_default_config.domain?this.current_default_config.domain:"")+(i?"; path="+i:this.current_default_config.path?this.current_default_config.path:"; path=/")+(d==null?this.current_default_config.secure?"; Secure":"":d?"; Secure":"")+(m==null?this.current_default_config.sameSite?"; SameSute="+this.current_default_config.sameSite:"":m?"; SameSite="+m:""),this},e.prototype.remove=function(t,r,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:"")+(r?"; path="+r: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*/),r=0;r<t.length;r++)t[r]=decodeURIComponent(t[r]);return t},e}(),j=null;function ue(){j==null&&(j=new ce);var e=T.reactive(j);return{cookies:e}}function le(){const{cookies:e}=ue();function t(c){return e.get(c)}function r(c,d){return e.set(c,d)}function n(c){return e.remove(c)}function i(){e.keys().forEach(c=>n(c))}return{getItem:t,setItem:r,removeItem:n,clear:i}}let O=null;function L(e={auth:"token",refresh:"refresh_token",expiration:"token_expiration_date"},t=le()){if(O)return O;function r(){return t.getItem(e.auth)}function n(){return t.getItem(e.refresh)}function i(){return t.getItem(e.expiration)}function c(f,p){const h=s(f);if(!h.exp)throw new Error("Invalid JWT token.");t.setItem(e.auth,f),t.setItem(e.refresh,p),t.setItem(e.expiration,((h.exp-60)*1e3).toString())}function d(){t.removeItem(e.auth),t.removeItem(e.refresh),t.removeItem(e.expiration)}function m(){return l()&&!o()}function l(){return!!r()}function o(){const f=i();return f?new Date(f)<new Date:!0}function s(f){return JSON.parse(atob(f.split(".")[1]))}function u(){return t}return O={keys:e,getAuthToken:r,getRefreshToken:n,getExpiration:i,authenticate:c,clear:d,isAuthenticated:m,hasAuth:l,isExpired:o,getStorage:u},O}function de(e){let t={"Content-Type":"application/json"};e&&r(e);function r(h,b=!1){return t=b?h:{...t,...h},this}function n(){return t}function i(h,b){return t[h]=b,this}function c(h){return t[h]}function d(h){return t[h]&&delete t[h],this}function m(h){return i("Authorization","Bearer "+h),this}function l(){return d("Authorization"),this}function o(){return!!c("Authorization")}function s(){return i("Content-Type","multipart/form-data"),this}function u(){return i("Content-Type","application/json"),this}function f(){return c("Content-Type")==="multipart/form-data"}function p(){return c("Content-Type")==="application/json"}return{setHeaders:r,getHeaders:n,setHeader:i,getHeader:c,removeHeader:d,setAuthorization:m,removeAuthorization:l,hasAuthorization:o,setFormData:s,setJson:u,isFormData:f,isJson:p}}function me(e){let t=null;e&&r(e);function r(i){if(i=i.toLowerCase(),!["get","post","put","patch","delete"].includes(i))throw new Error("Invalid method.");return t=i,this}function n(){return t}return{setMethod:r,getMethod:n}}function fe(e,t,r){let n=null;r&&i(r);function i(o){if(!["post","put","patch"].includes(e.getMethod()))throw new Error("Payload can only be set for POST, PUT and PATCH requests.");return o instanceof FormData?t.setFormData():d(o)&&(o=m(o),t.setFormData()),t.isFormData()&&e.getMethod()==="put"&&(e.setMethod("post"),o.append("_method","PUT")),n=o,this}function c(){return n}function d(o){for(const s in o){const u=o[s];if(l(u))return!0;if(typeof u=="object"&&d(u))return!0}return!1}function m(o,s=null,u=0){const f=!s;f&&(s=new FormData);for(const p in o){const h=o[p];l(h)?(o[p]="<<FileIndex:"+u+">>",s.append(u,h,h.name),u++):typeof h=="object"&&(o[p]=m(o[p],s,u))}return f?(s.append("payload",JSON.stringify(o)),s):o}function l(o){return typeof File<"u"&&o instanceof File||typeof Blob<"u"&&o instanceof Blob}return{setPayload:i,getPayload:c}}const I=class I{constructor(t={}){v(this,"level",3);v(this,"logger");v(this,"prefix");this.logger=t.logger||console,this.prefix=t.prefix||""}setLevel(t){this.level=t}debug(...t){this.level<=I.LEVEL_DEBUG&&D(this.logger.debug,this.prefix,t)}info(...t){this.level<=I.LEVEL_INFO&&D(this.logger.info,this.prefix,t)}warn(...t){this.level<=I.LEVEL_WARN&&D(this.logger.warn,this.prefix,t)}error(...t){this.level<=I.LEVEL_ERROR&&D(this.logger.error,this.prefix,t)}};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);let x=I;const D=(e,t,r)=>{t?e(t,...r):e(...r)},M=new x({prefix:"[SDK]"});let G=null,K=null,J=null,W=null;const pe=()=>G,he=e=>{if(M.info("[Config] Environment:",e),!e)throw new Error("Invalid environment.");G=e},ye=()=>K,ge=e=>{if(M.info("[Config] API Host:",e),!e)throw new Error("Invalid API host.");K=e},be=()=>W,we=e=>{W=e},Re=()=>J,Ae=e=>{if(M.info("[Config] Main App Host:",e),!e)throw new Error("Invalid main app host.");J=e},k={getEnvironment:pe,getApiHost:ye,getErrorHandler:be,setEnvironment:he,setApiHost:ge,setErrorHandler:we,getMainAppHost:Re,setMainAppHost:Ae};function Ie(e){const t=k.getApiHost().replace(/\/$/g,"");let r=null,n={},i={};e&&m(e);function c(){return t+l()+p()}function d(){return l(!0,!0)}function m(a){return r="/"+a.replace(/^\//g,""),this}function l(a=!0,R=!1){return a?r.replace(/:(\w+)/g,(A,E)=>R?"*":i[E]||":"+E):r}function o(a){return n=a,this}function s(a,R){return n[a]=R,this}function u(a){return n[a]&&delete n[a],this}function f(){return Object.keys(n).length>0}function p(a=!0){if(!f())return"";let R="";for(const A in n)if(Array.isArray(n[A]))for(const E of n[A])R+=(R.length?"&":"")+`${A}[]=`+E;else R+=(R.length?"&":"")+A+"="+n[A];return(a?"?":"")+R}function h(a){return i=a,this}function b(a,R){return i[a]=R,this}function C(a){return i[a]&&delete i[a],this}return{setPath:m,getPath:l,getUri:c,getMockUri:d,setQueryParams:o,setQueryParam:s,removeQueryParam:u,hasQuery:f,getQueryString:p,setRouteParams:h,setRouteParam:b,removeRouteParam:C}}function Pe(e){let t=[];function r(){return t=o(arguments),d(),this}function n(){return t.length>0}function i(s){return t.includes(s.trim())?this:(t.push(s.trim()),d(),this)}function c(s){const u=t.indexOf(s.trim());return u===-1?this:(t.splice(u,1),d(),this)}function d(){t.length?e.setQueryParam("groups",l(t)):e.removeQueryParam("groups")}function m(s){return s.split(",").map(u=>u.trim())}function l(s){return s.join(",")}function o(s){let u=[];return s.length===1?typeof s[0]=="string"?u=m(s[0]):Array.isArray(s[0])&&(u=s[0]):u=Array.from(s),u}return{setGroups:r,hasGroups:n,addGroup:i,removeGroup:c}}function ve(e){let t=!1,r=!1,n=1,i=10;function c(){return t=!0,d(),this}function d(){r=!0;const p=f(arguments);return o(p.page||1,!1),s(p.perPage||i,!1),u(),this}function m(){return r=!1,u(),this}function l(){return r}function o(p,h=!0){return t=!0,r=!0,n=p,h&&u(),this}function s(p,h=!0){return t=!0,r=!0,i=p,h&&u(),this}function u(){t?l()?(e.removeQueryParam("pagination"),e.setQueryParam("page",n),e.setQueryParam("nbResultPerPage",i)):(e.removeQueryParam("page"),e.removeQueryParam("nbResultPerPage"),e.setQueryParam("pagination","false")):(e.removeQueryParam("page"),e.removeQueryParam("nbResultPerPage"),e.removeQueryParam("pagination"))}function f(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:c,paginate:d,disablePagination:m,hasPagination:l,setPage:o,setPerPage:s}}function Ee(e){let t=!1,r="id",n="ASC";function i(){t=!0;const s=o(arguments);return s.orderBy&&d(s.orderBy,!1),s.orderDir&&m(s.orderDir,!1),l(),this}function c(){return t}function d(s,u=!0){return t=!0,r=s,u&&l(),this}function m(s,u=!0){if(s=s.toUpperCase(),["ASC","DESC"].indexOf(s)===-1)throw new Error("Invalid order direction");return t=!0,n=s,u&&l(),this}function l(){c()&&(e.setQueryParam("orderBy",r),e.setQueryParam("orderDirection",n))}function o(s){if(s.length===1&&typeof s[0]=="object")return s[0];const u={};return s.length>=1&&(u.orderBy=s[0]),s.length>=2&&(u.orderDir=s[1]),u}return{setOrder:i,hasOrder:c,setOrderBy:d,setOrderDir:m}}function Se(){let e=!1;function t(){return e=!0,this}function r(){return e}return{setSilent:t,isSilent:r}}function Ce(){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 r(){return e}return{setResponseType:t,getResponseType:r}}function ke(e){function t(){return e}function r(){return e.data}function n(){return e.data}return{getResponse:t,getData:r,getPayload:n}}function $e(e,t=!1){let r=!1,n=!1;return e.response?(r=!0,n=!0):e.request&&(r=!0),!t&&k.getErrorHandler()&&k.getErrorHandler()(e),{sent:r,responded:n,error:e}}function Le(e){function t(){return e}function r(){return e.data}function n(){return e.data}function i(){return e.data["@type"]==="hydra:Collection"}function c(){return i()?e.data["hydra:member"]:null}function d(){return i()?e.data["hydra:totalItems"]:null}function m(){return i()?e.data["hydra:view"]&&e.data["hydra:view"]["hydra:last"]:!1}function l(){return!i()||!m()?null:parseInt(e.data["hydra:view"]["@id"].match(/page=(\d+)/)[1])}function o(){return!i()||!m()?null:parseInt(e.data["hydra:view"]["hydra:last"].match(/page=(\d+)/)[1])}return{getResponse:t,getData:r,getPayload:n,isCollection:i,getCollection:c,getTotal:d,hasPagination:m,getPage:l,getPages:o}}function Me(e,t,r,n,i,c){async function d(){const l=r.getMethod(),o=t.getUri(),s=e.getHeaders(),u=n.getPayload(),f=[o];["post","put","patch"].includes(l)&&f.push(u||{}),f.push({headers:s,responseType:c.getResponseType()}),M.info("[Request] Sending request:",`[${l.toUpperCase()}]`,o);try{const p=await oe[l](...f);return m(p)}catch(p){throw $e(p,i.isSilent())}}function m(l){if(l.headers){const o=Object.keys(l.headers),s=o.map(u=>u.toLowerCase()).indexOf("content-type");if(s!==-1&&l.headers[o[s]].includes("application/ld+json"))return Le(l)}return ke(l)}return{send:d}}function w(e,t="get",r=null){const n=de(),i=Ie(e),c=me(t),d=fe(c,n,r),m=Pe(i),l=ve(i),o=Ee(i),s=Se(),u=Ce(),f=Me(n,i,c,d,s,u);return{...n,...i,...c,...d,...m,...l,...o,...s,...u,...f}}function y(e,t="get",r=null){const n=w(e,t,r),i=L();i.isAuthenticated()&&n.setAuthorization(i.getAuthToken());const c=n.send;return n.send=async function(){if(!n.hasAuthorization())throw new Error("::SDK Request:: Request cannot be sent, missing authorization header.");return c()},n}const Oe=(e,t)=>y("/v2/activity/candidate/:candidateId/establishment/:establishmentId").setRouteParams({candidateId:e,establishmentId:t}),De=()=>({listByCandidateAndEstablishment:Oe}),_e=(e,t,r)=>y("/candidate/:candidateId/share/establishment/:establishmentId").setMethod("post").setRouteParams({candidateId:e,establishmentId:t}).setPayload(r),Te=(e,t)=>y("/candidate/:candidateId/archive/establishment/:establishmentId").setRouteParams({candidateId:e,establishmentId:t}),xe=(e,t)=>y("/candidate/:candidateId/archive/establishment/:establishmentId").setMethod("post").setRouteParams({candidateId:e,establishmentId:t}),je=(e,t)=>y("/candidate/:candidateId/archive/establishment/:establishmentId").setMethod("delete").setRouteParams({candidateId:e,establishmentId:t}),Ne=()=>({share:_e,isArchived:Te,archive:xe,unarchive:je}),ze=(e,t)=>y("/comment/establishment/:establishmentId/candidate/:userId").setRouteParams({establishmentId:e,userId:t}),Fe=(e,t,r)=>y("/comment/establishment/:establishmentId/candidate/:userId").setRouteParams({establishmentId:e,userId:t}).setMethod("post").setPayload(r),qe=(e,t)=>y("/comment/:commentId").setRouteParams({commentId:e}).setMethod("put").setPayload(t),Be=e=>y("/comment/:commentId").setRouteParams({commentId:e}).setMethod("delete"),He=()=>({getForEstablishmentCandidate:ze,postForEstablishmentCandidate:Fe,update:qe,remove:Be}),Ve=()=>w("contractType").isList().addGroup("Term:id").addGroup("Term:name"),Qe=()=>({list:Ve}),Ue=e=>y("/v2/talents").isList().setQueryParam("establishment-id",e),Ge=()=>({list:Ue}),Ke=(e,t,r)=>y("/cvtheque/establishment/:establishmentId/candidate/:candidateId/label/synchronize").setRouteParams({establishmentId:e,candidateId:t}).setMethod("post").setPayload(r),Je=()=>({syncCandidateLabels:Ke}),We=()=>w("diploma").isList().addGroup("Term:id").addGroup("Term:name"),Ze=()=>({list:We}),Xe=e=>y("document/candidate/:candidateId").setRouteParams({candidateId:e}).isList().disablePagination(),Ye=(e,t)=>y("document/candidate/:candidateId/establishment/:establishmentId/recruiter").setRouteParams({candidateId:e,establishmentId:t}).isList().disablePagination(),et=(e,t)=>y("document/candidate/:candidateId/establishment/:establishmentId/candidate").setRouteParams({candidateId:e,establishmentId:t}).isList().disablePagination(),tt=e=>y("document/recruiter").setMethod("post").setPayload(e),nt=e=>y("document/:documentId").setRouteParams({documentId:e}).setMethod("delete"),rt=()=>({listByCandidate:Xe,listByCandidateAndEstablishmentFromRecruiter:Ye,listByCandidateAndEstablishmentFromCandidate:et,addFromRecruiter:tt,remove:nt}),it=(e,t)=>y("/v2/establishments/:establishmentId/email-history").setRouteParams({establishmentId:t}).setQueryParam("receiverId",e).isList().disablePagination(),ot=()=>({listByCandidateAndEstablishment:it}),st=(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}),ct=()=>({sendToCandidate:st,sendToRecipients:at}),ut=(e,t=!0)=>{const r=y("/v2/establishments/:establishmentId/email-templates").setRouteParams({establishmentId:e}).isList().disablePagination();return t&&r.setQueryParam("global",!0),r},lt=()=>y("/v2/self/email-templates").isList().disablePagination(),dt=()=>({listByEstablishment:ut,listSelf:lt}),mt=(e,t)=>y("establishment-career/:establishmentId/:versionId").setRouteParams({establishmentId:e,versionId:t}),ft=(e,t="published")=>y("establishment-career/:establishmentId/state/:state").setRouteParams({establishmentId:e,state:t}),pt=(e,t,r=null)=>{const n=r!==null?y("establishment-career/:establishmentId/:versionId").setRouteParams({establishmentId:e,versionId:r}):y("establishment-career/:establishmentId").setRouteParams({establishmentId:e});return n.setMethod("post").setPayload(t),n},ht=(e,t)=>y("establishment-career/:establishmentId/logo-banner").setMethod("post").setRouteParams({establishmentId:e}).setPayload(t),yt=(e,t,r)=>y("establishment-career/:establishmentId/publish/:versionId").setMethod("post").setRouteParams({establishmentId:e,versionId:t}).setPayload(r),gt=()=>({readById:mt,readByState:ft,upsert:pt,uploadLogoAndBanner:ht,publish:yt}),bt=e=>w("establishment/:establishmentId").setRouteParams({establishmentId:e}),wt=e=>y("establishment/:establishmentId/authorizations").setRouteParams({establishmentId:e}),F=()=>({read:bt,authorizations:wt}),Rt=e=>w("feature-flag/maintenance").setMethod("post").setPayload(e),At=(e,t)=>w("feature-flag/establishment").setMethod("post").setPayload({establishment:e,flagName:t}),It=()=>({maintenanceModeEnabled:Rt,forEstablishment:At}),Pt=()=>w("job").isList().addGroup("Term:id").addGroup("Term:name"),vt=()=>({list:Pt}),Et=e=>y("/label/establishment/:establishmentId").isList().setRouteParams({establishmentId:e}),St=(e,t)=>y("/label/establishment/:establishmentId").setMethod("post").setRouteParams({establishmentId:e}).setPayload(t),Ct=(e,t)=>y("/label/:labelId").setMethod("put").setRouteParams({labelId:e}).setPayload(t),kt=e=>y("/label/:labelId").setMethod("delete").setRouteParams({labelId:e}),$t=(e,t,r)=>y("/label/establishment/:establishmentId/candidate/:candidateId/synchronize").setMethod("post").setPayload(r).setRouteParams({establishmentId:e,candidateId:t}),Lt=()=>({listByEstablishment:Et,addToEstablishment:St,update:Ct,remove:kt,syncForCandidate:$t}),Mt=e=>w("offer/:offerId").setRouteParams({offerId:e}),Ot=()=>({read:Mt}),Dt=(e,t=!1)=>{const r=y("/recruiter/establishment/:establishmentId").isList().setRouteParams({establishmentId:e});return t&&r.setQueryParam("exclude-me",1),r},_t=()=>({listByEstablishment:Dt}),Tt=e=>y("/recruitment/establishment/:establishmentId/mine").isList().setRouteParams({establishmentId:e}),xt=(e,t)=>y("/recruitment/mine/establishment/:establishmentId/has-not/candidate/:candidateId").isList().setRouteParams({establishmentId:e,candidateId:t}),jt=(e,t)=>y("/recruitment/mine/establishment/:establishmentId/has/candidate/:candidateId").isList().setRouteParams({establishmentId:e,candidateId:t}),Nt=(e,t)=>y("/recruitment/establishment/:establishmentId/has/candidate/:candidateId").isList().setRouteParams({establishmentId:e,candidateId:t}),zt=(e,t)=>y("/recruitment/:recruitmentId/candidate").setMethod("put").setRouteParams({recruitmentId:e}).setPayload(t),Ft=(e,t)=>y("/recruitment/:recruitmentId/candidate/:candidateId").setMethod("delete").setRouteParams({recruitmentId:e,candidateId:t}),qt=()=>({mineByEstablishment:Tt,mineWithoutCandidate:xt,mineWithCandidate:jt,withCandidate:Nt,addCandidates:zt,removeCandidate:Ft}),Bt=(e,t,r,n=null)=>{const i=w("candidate/register/open").setMethod("post"),c={email:e};return t==="establishment"&&(c.establishmentId=r),t==="offer"&&(c.offerId=r),n&&(c.referer=n),i.setPayload(c),i},Ht=(e,t)=>w("candidate/register/update/:token").setMethod("post").setRouteParams({token:e}).setPayload(t),Vt=e=>w("candidate/register/read/:token").setRouteParams({token:e}),Qt=e=>w("candidate/register/close/:token").setMethod("post").setRouteParams({token:e}),Ut=()=>({open:Bt,update:Ht,read:Vt,close:Qt}),Gt=()=>w("speciality").isList().addGroup("Term:id").addGroup("Term:name"),Kt=()=>({list:Gt}),Jt=e=>y("/tag/public/establishment/:establishmentId").isList().setRouteParams({establishmentId:e}),Wt=()=>({listByEstablishment:Jt}),Zt=e=>w("user/email/isset/:email").setRouteParams({email:e}),Xt=()=>y("user/self").addGroup("user:self"),Yt=e=>y("/user/:uuid").setRouteParams({uuid:e}),en=e=>w("/user/:uuid").setRouteParams({uuid:e}),q=()=>({emailExists:Zt,self:Xt,byUuidPrivate:Yt,byUuid:en});let _;function Z(){if(_)return _;const e={user:void 0,roles:[],establishments:{}},t=async()=>{if(!L().isAuthenticated())throw new Error("::SDK Authorization:: User not authenticated");const o=(await q().self().send()).getData();e.user={id:o.id,email:o.email,firstName:o.firstName,lastName:o.lastName,avatar:o.avatar},e.roles=o.roles},r=async o=>{if(!L().isAuthenticated())throw new Error("::SDK Authorization:: User not authenticated");e.establishments[o]=(await F().authorizations(o).send()).getData()},n=o=>{if(e.user===void 0)throw new Error("::SDK Authorization:: User not fetched");return e.roles.includes(o)};return _={fetchSelf:t,fetchPermission:r,hasRole:n,hasRoleRH:()=>n("ROLE_RH"),hasRoleCandidate:()=>n("ROLE_CANDIDATE"),hasRoleAdmin:()=>n("ROLE_ADMIN"),hasPermission:(o,...s)=>{const u=e.establishments[o];if(u===void 0)throw new Error(`::SDK Authorization:: Permissions not fetched for establishment ${o}`);return s.every(f=>u[f]===!0)},clear:()=>{e.user=void 0,e.roles=[],e.establishments={}}},_}async function tn(e,...t){if(!L().isAuthenticated())throw"ERR_NOT_AUTHENTICATED";const n=Z();await Promise.all([n.fetchSelf(),n.fetchPermission(e)]);for(let i=0;i<t.length;i++){const c=t[i];if(!n.hasPermission(e,c))throw"ERR_MISSING_PERMISSION"}}const nn=se.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 r=await F().authorizations(e).send();this.establishments[e]=r.getData()}},hasPermission(e,...t){const r=this.establishments[e];return r===void 0?!1:t.every(n=>r[n]===!0)}}}),S=(e,t,r)=>{const n=typeof t=="string"?t.split("."):[t];let i=e;for(const[c,d]of n.entries()){if(c===n.length-1)return i[d]!==void 0?i[d]:r;if(!(d in i)||typeof i[d]!="object")return r;i=i[d]}return r},N=(e,t,r)=>{const n=typeof t=="string"?t.split("."):[t],i=m=>typeof m=="number"||/^\d$/g.test(m),c=m=>parseInt(m,10);let d=e;return n.forEach((m,l)=>{if(l===n.length-1)d[m]=r;else{const o=i(n[l+1])?[]:{};m=i(m)?c(m):m,d[m]=d[m]??o,d=d[m]}}),e},X=e=>{if(typeof e=="object"){if(Array.isArray(e))return[...e];if(Object(e)===e)return{...e}}return e},B=(e,t)=>{const r={...e};for(const[n,i]of Object.entries(t))n in r&&typeof r[n]=="object"&&typeof i=="object"?r[n]=B(r[n],i):r[n]=X(i);return r};let $=null;function g(){if($)return $;const e=k.getEnvironment(),t=(()=>e==="prod"||e==="production"?"pPROC7dPoJ7XdxHrwsTQNXCGX79MJjhp":e==="staging"?"823rqOTwVk1ZCWVyBAdLInZ77TcFF0CF":"TMZX6evFnu87JrBHV5qLwHsld5C6hilZ")(),r=!!t,n=e!=="prod"&&e!=="production";let i=null;function c(){return r}function d(){const f=window.analytics=window.analytics||[];if(!f.initialize)if(f.invoked)window.console&&console.error&&console.error("Segment snippet included twice.");else{f.invoked=!0,f.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","debug","page","once","off","on","addSourceMiddleware","addIntegrationMiddleware","setAnonymousId","addDestinationMiddleware"],f.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),f.push(h),f}};for(let p=0;p<f.methods.length;p++){const h=f.methods[p];f[h]=f.factory(h)}f.load=function(p,h){const b=document.createElement("script");b.id="analytics-script",b.type="text/javascript",b.async=!0,b.src="https://cdn.segment.com/analytics.js/v1/"+p+"/analytics.min.js",b.onerror=()=>window.dispatchEvent(new Event("analytics-error"));const C=document.getElementsByTagName("script")[0];C.parentNode.insertBefore(b,C),f._loadOptions=h},f._writeKey=t,f.SNIPPET_VERSION="4.16.1",f.load(t),f.page(),f.ready(()=>window.dispatchEvent(new Event("analytics-ready")))}}async function m(){return i!==null||(i=new Promise((f,p)=>{if(!c())return u("Analytics is disabled."),f();if(window.addEventListener("analytics-ready",()=>{u("Analytics script loaded successfully."),f()}),window.addEventListener("analytics-error",()=>{u("Analytics script failed to load. Consider disabling your AdBlocker.",null,"error"),p()}),u("Loading Analytics script."),window.analytics)return f();d()})),i}async function l(f,p){try{if(await this.analyticsScriptReady(),u("[identify]",[f,p]),c())return window.analytics.identify(f,p)}catch{u("[identify]",[f,p],"error")}}async function o(f,p,h){typeof h!="object"&&(h={});try{if(await this.analyticsScriptReady(),u("[page]",[f,p,h]),c())return window.analytics.page(f,{category:p,...h})}catch{u("[page]",[f,p,h],"error")}}async function s(f,p,h){typeof h!="object"&&(h={});try{if(await this.analyticsScriptReady(),u("[track]",[f,p,h]),c())return window.analytics.track(f,{category:p,...h})}catch{u("[track]",[f,p,h],"error")}}function u(f,p=[],h="log"){p||(p=[]),n&&console[h](`%cⒶ%c ::SDK Analytics:: ${f}`,"color: green;","color: inherit;",...p)}return $={analyticsScriptReady:m,isEnabled:c,identify:l,page:o,track:s,consoleMessage:u},$}g.destroy=()=>$=null;function Y(){const e="Hubler Application";function t(o){var u;if(!o)throw new Error(`Missing arguments for domain "${e}"`);const s=!!o.offerId;if(s&&!o.recruitmentId)throw new Error(`Missing argument "recruitmentId" for domain "${e}"`);return{companyId:(u=o.establishmentId)==null?void 0:u.toString(),jobOfferId:s?o.offerId.toString():null,recruitmentId:s?o.recruitmentId.toString():null,selections:[s?"Application":"Spontaneous Application"]}}async function r(o){return g().page("Application Authentication Viewed",e,t(o))}async function n(o){return g().page("Application Magic Link Viewed",e,t(o))}async function i(o){return g().page("Application Job Viewed",e,t(o))}async function c(o){return g().page("Application Information Viewed",e,t(o))}async function d(o){return g().page("Application Document Viewed",e,t(o))}async function m(o){return g().page("Application Success Viewed",e,t(o))}async function l(o){if(!o.error)throw new Error(`Missing argument "error" for domain "${e}", event "Application Form Failed"`);return g().track("Application Form Failed",e,{...t(o),error:o.error})}return{applicationAuthenticationViewed:r,applicationMagicLinkViewed:n,applicationJobViewed:i,applicationInformationViewed:c,applicationDocumentViewed:d,applicationSuccessViewed:m,applicationFormFailed:l}}function ee(){const e="Profile";function t(a,R){var E;if(!a)throw new Error(`Missing arguments for domain "${e}"`);const A={companyId:a.companyId?a.companyId.toString():null,hublerId:(E=a.hublerId)==null?void 0:E.toString()};return R&&(A.productId=a.companyId?a.companyId+"_2":null),a.recruitmentId&&(A.recruitmentId=a.recruitmentId.toString()),a.selections&&(A.selections=a.selections),a.institutionId&&(A.institutionId=a.institutionId.map(String)),A}async function r(a){return g().track(a.name,e,t(a.properties),!0)}async function n(a){return g().track(a.name,e,t(a.properties,!0))}async function i(a){return g().track(a.name,e,t(a.properties,!0))}async function c(a){return g().track(a.name,e,t(a.properties,!0))}async function d(a){return g().track(a.name,e,t(a.properties,!0))}async function m(a){return g().track(a.name,e,t(a.properties,!0))}async function l(a){return g().track(a.name,e,t(a.properties,!0))}async function o(a){return g().track(a.name,e,t(a.properties,!0))}async function s(a){return g().track(a.name,e,t(a.properties,!0))}async function u(a){return g().track(a.name,e,t(a.properties,!0))}async function f(a){return g().track(a.name,e,t(a.properties,!0))}async function p(a){return g().track(a.name,e,t(a.properties,!0))}async function h(a){return g().track(a.name,e,t(a.properties,!0))}async function b(a){return g().page(a.name,a.properties.category,t(a.properties,!1))}async function C(a){return g().track(a.name,e,t(a.properties,!1))}return{profileDocumentDeleted:r,profileLabelAdded:n,profileLabelRemoved:i,profileShared:c,profileArchived:d,profileCandidateAdded:m,profileCommentAdded:l,profileDocumentAdded:o,profileDocumentDownloaded:s,profileDocumentRequested:u,profileRecruitmentAdded:f,profileRecruitmentRemoved:p,profileTabSelected:h,profileViewed:b,profileEmailSent:C}}const V=Object.freeze(Object.defineProperty({__proto__:null,useAnalyticsHublerApplication:Y,useAnalyticsProfile:ee},Symbol.toStringTag,{value:"Module"}));function rn(){function e(r){return g().identify(r.id,{email:r.email,firstName:r.firstname,lastName:r.lastname,createdAt:r.createdAt,type:"Hubler",lang:"fr",medium:t()?"MOBILE_DEVICE":"WEB_BROWSER"})}function t(){let r=!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)))&&(r=!0)}(navigator.userAgent||navigator.vendor||window.opera),r}return{identifyCandidate:e}}const on="AIzaSyDicyRD6rvVdnicp1tgV0ElazASNGbyyTs",te=()=>new Promise(e=>{window.google&&window.google.maps?e():(window.addEventListener("gmap-ready",()=>e()),cn())}),sn=(e,t)=>te().then(()=>an(e,t)),an=(e,t)=>{const r=new window.google.maps.places.Autocomplete(e,{componentRestrictions:{country:["fr","re","yt","gp","mq"]}});window.google.maps.event.addListener(r,"place_changed",()=>{const n=r.getPlace();n.formatted_address&&t(n)})},cn=()=>{window.onGmapScriptReady=function(){};const e=document.createElement("script");e.src="https://maps.googleapis.com/maps/api/js?key="+on+"&libraries=places&callback=onGmapScriptReady",e.async=!0,e.defer=!0,e.onload=()=>window.dispatchEvent(new Event("gmap-ready")),document.body.appendChild(e)},un={scriptReady:te,autocompleteInput:sn},ln={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"}},dn={fr:ln};let z=null;const ne=()=>z,mn=(e={})=>{let t=e.locale||"fr";const r=m=>t=m,n=()=>t,i=B(dn,(e==null?void 0:e.messages)||{});return z={t:(m,l)=>{const o=S(i,`${t}.${m}`);return o?l?fn(o,l):o:m},tNode:(m,l)=>{const o=S(i,`${t}.${m}`);return o?pn(o,l):m},setLocale:r,getLocale:n},z},fn=(e,t)=>e?e.replace(/{{ ?([a-zA-Z_.]+) ?}}/g,(r,n)=>S(t,n)):null,pn=(e,t)=>{if(!e)return null;const r=e.split(/(\{[{%]+[^{}]*[%}]+})/g).filter(n=>n!=="").map(n=>{const i=n.startsWith("{%")&&n.endsWith("%}")?"slot":n.startsWith("{{")&&n.endsWith("}}")?"variable":"text";if(i==="text")return()=>Q.text(n);n=n.replace(/[{}%]/g,"").trim();const c=n.match(/^[a-zA-Z_.]+/)[0];n=n.replace(c,"").trim();const d={};return n!==""&&([...n.matchAll(/([a-zA-Z_.]+)(=([a-zA-Z_.]+))?/g)].reduce((o,s)=>(s[3]===void 0?N(o,s[1],S(t,s[1])):N(o,s[1],S(t,s[3])),o),d),[...n.matchAll(/([a-zA-Z_.]+)="([^"]+)"/g)].reduce((o,s)=>{let u=s[2];return new RegExp(/^[0-9]*$/).exec(s[2])?u=parseInt(s[2]):new RegExp(/^(true|false)$/).exec(s[2])&&(u=s[2]==="true"),o[s[1]]=u,o},d)),m=>Q[i](c,t,m,d)});return{setup:(n,{slots:i})=>()=>r.map(c=>c(i))}},Q={slot:(e,t,r,n)=>T.h("span",{class:"node node--slot"},r[e.trim()](n)),variable:(e,t)=>T.h("span",{class:"node node--variable"},S(t,e.trim())),text:e=>T.h("span",{class:"node node--text"},e)};function hn(e){const{t}=ne(),r={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,i)=>n===1?t(i?"timeAgo.last-month":"timeAgo.next-month"):`${n} ${t("timeAgo.month",n)}`,year:(n,i)=>n===1?t(i?"timeAgo.last-year":"timeAgo.next-year"):`${n} ${t("timeAgo.year",n)}`,day:(n,i)=>n===1?t(i?"timeAgo.yesterday":"timeAgo.tomorrow"):`${n} ${t("timeAgo.day",n)}`,week:(n,i)=>n===1?t(i?"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 ae.useTimeAgo(e,{fullDateFormatter:n=>n.toLocaleDateString(),messages:r})}function yn(){let e=null;function t(){return e}function r(){return e.controller}function n(){return"use"+e.controller.charAt(0).toUpperCase()+e.controller.slice(1)+"QSController"}function i(){return e.action}function c(){return e.arguments}function d(){return!!(e&&e.controller&&e.action)}function m(){window.location.search.length!==0&&(e=window.location.search.substring(1).split("&").reduce((l,o)=>{const s=o.split("=");return s[0]==="controller"||s[0]==="action"?l[s[0]]=decodeURIComponent(s[1]):l.arguments[s[0]]=decodeURIComponent(s[1]),l},{controller:null,action:null,arguments:{}}))}return m(),{getParams:t,getController:r,getControllerComposableName:n,getAction:i,getArguments:c,hasAction:d}}function gn(){async function e({domain:n,event:i,...c}){const d="useAnalytics"+n.charAt(0).toUpperCase()+n.slice(1);if(!t(d))throw new Error(`Domain ${n} is not defined`);const m=V[d]();if(!r(m,i))throw new Error(`Event ${i} is not defined in domain ${n}`);return m[i](c)}function t(n){return!!V[n]}function r(n,i){return!!n[i]}return{call:e}}const U=Object.freeze(Object.defineProperty({__proto__:null,useAnalyticsQSController:gn},Symbol.toStringTag,{value:"Module"}));function bn(e){if(!e.hasAction())throw new Error("No action found in router");function t(){if(!r())throw new Error(`Controller ${e.getController()} not found`);const i=U[e.getControllerComposableName()]();if(!n(i))throw new Error(`Action ${e.getAction()} not found in controller ${e.getController()}`);return i[e.getAction()](e.getArguments())}function r(){return e.getControllerComposableName()in U}function n(i){return e.getAction()in i}return{dispatch:t}}function wn(){let e=!1;function t(i,c,d){n(),d()}function r(i,c,d){if(!e)return e=!0,t(i,c,d);d()}function n(){const i=yn();if(!i.hasAction())return;bn(i).dispatch()}return{vueRouterBeforeEach:t,vueRouterBeforeFirst:r,handle:n}}const P=()=>k.getMainAppHost(),Rn=()=>`${P()}/rh/establishments`,An=e=>`${P()}/rh/establishment/${e}`,In=e=>e&&typeof e=="object"&&e.urls&&e.urls.display?e.urls.display:"",Pn=e=>`${P()}/rh/establishment/${e}/cvtheque/`,vn=(e,t)=>`${P()}/rh/establishment/${e}/recruitment/${t}`,En=(e,t)=>`${P()}/rh/establishment/${e}/recruitment/${t}/kanban`,Sn=e=>`${P()}/rh/establishment/${e}/career-configuration`,Cn=(e,t=null)=>t?`${P()}/career-website/${e}/${t}`:`${P()}/career-website/${e}`,kn=(e,t)=>`${P()}/career-website-preview/${e}/${t}`,$n=(e,t=null)=>{const r=P().replace("://",`://${e}.`);return t?`${r}?_version=${t}`:`${r}`};function Ln(){return{root:P,establishments:Rn,establishment:An,img:In,cvtheque:Pn,recruitment:vn,recruitmentKanban:En,career:Sn,careerConfig:Cn,careerPreview:kn,careerWebsite:$n}}const Mn="0.2.3";exports.BaseLogger=x;exports.Gmap=un;exports.SDKConfig=k;exports.SDKLogger=M;exports.VERSION=Mn;exports._clone=X;exports._get=S;exports._merge=B;exports._set=N;exports.createI18n=mn;exports.useActivityRepository=De;exports.useAnalyticsHublerApplication=Y;exports.useAnalyticsIdentify=rn;exports.useAnalyticsProfile=ee;exports.useAuthentication=L;exports.useAuthorization=Z;exports.useAuthorizationStore=nn;exports.useCanAccessEstablishmentMiddleware=tn;exports.useCandidateRepository=Ne;exports.useCommentRepository=He;exports.useContractTypeRepository=Qe;exports.useCvbankRepository=Ge;exports.useCvthequeRepository=Je;exports.useDiplomaRepository=Ze;exports.useDocumentRepository=rt;exports.useDomainUrls=Ln;exports.useEmailHistoryRepository=ot;exports.useEmailRepository=ct;exports.useEmailTemplateRepository=dt;exports.useEstablishmentCareerRepository=gt;exports.useEstablishmentRepository=F;exports.useFeatureFlagRepository=It;exports.useI18n=ne;exports.useJobRepository=vt;exports.useLabelRepository=Lt;exports.useLocaleTimeAgo=hn;exports.useOfferRepository=Ot;exports.usePrivateRequest=y;exports.useQSAction=wn;exports.useRecruiterRepository=_t;exports.useRecruitmentRepository=qt;exports.useRegisterRepository=Ut;exports.useRequest=w;exports.useSpecialityRepository=Kt;exports.useTagRepository=Wt;exports.useUserRepository=q;
|
|
1
|
+
"use strict";var re=Object.defineProperty;var ie=(e,t,r)=>t in e?re(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var v=(e,t,r)=>(ie(e,typeof t!="symbol"?t+"":t,r),r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const T=require("vue"),oe=require("axios"),se=require("pinia"),ae=require("@vueuse/core");var H={expireTimes:"1d",path:"; path=/",domain:"",secure:!1,sameSite:"; SameSite=Lax"},ce=function(){function e(){this.current_default_config=H}return e.prototype.config=function(t){for(var r in this.current_default_config)this.current_default_config[r]=t[r]?t[r]:H[r]},e.prototype.get=function(t){var r=decodeURIComponent(document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*"+encodeURIComponent(t).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1"))||null;if(r&&r.substring(0,1)==="{"&&r.substring(r.length-1,r.length)==="}")try{r=JSON.parse(r)}catch{return r}return r},e.prototype.set=function(t,r,n,i,c,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.");r&&r.constructor===Object&&(r=JSON.stringify(r));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 o=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="+ +o*2592e3;break;case"d":u="; max-age="+ +o*86400;break;case"h":u="; max-age="+ +o*3600;break;case"min":u="; max-age="+ +o*60;break;case"s":u="; max-age="+o;break;case"y":u="; max-age="+ +o*31104e3;break}}else u="; expires="+n;break;case Date:u="; expires="+n.toUTCString();break}return document.cookie=encodeURIComponent(t)+"="+encodeURIComponent(r)+u+(c?"; domain="+c:this.current_default_config.domain?this.current_default_config.domain:"")+(i?"; path="+i: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,r,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:"")+(r?"; path="+r: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*/),r=0;r<t.length;r++)t[r]=decodeURIComponent(t[r]);return t},e}(),j=null;function ue(){j==null&&(j=new ce);var e=T.reactive(j);return{cookies:e}}function le(){const{cookies:e}=ue();function t(c){return e.get(c)}function r(c,d){return e.set(c,d)}function n(c){return e.remove(c)}function i(){e.keys().forEach(c=>n(c))}return{getItem:t,setItem:r,removeItem:n,clear:i}}let O=null;function L(e={auth:"token",refresh:"refresh_token",expiration:"token_expiration_date"},t=le()){if(O)return O;function r(){return t.getItem(e.auth)}function n(){return t.getItem(e.refresh)}function i(){return t.getItem(e.expiration)}function c(m,f){const h=s(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()&&!o()}function u(){return!!r()}function o(){const m=i();return m?new Date(m)<new Date:!0}function s(m){return JSON.parse(atob(m.split(".")[1]))}function l(){return t}return O={keys:e,getAuthToken:r,getRefreshToken:n,getExpiration:i,authenticate:c,clear:d,isAuthenticated:p,hasAuth:u,isExpired:o,getStorage:l},O}function de(e){let t={"Content-Type":"application/json"};e&&r(e);function r(h,b=!1){return t=b?h:{...t,...h},this}function n(){return t}function i(h,b){return t[h]=b,this}function c(h){return t[h]}function d(h){return t[h]&&delete t[h],this}function p(h){return i("Authorization","Bearer "+h),this}function u(){return d("Authorization"),this}function o(){return!!c("Authorization")}function s(){return i("Content-Type","multipart/form-data"),this}function l(){return i("Content-Type","application/json"),this}function m(){return c("Content-Type")==="multipart/form-data"}function f(){return c("Content-Type")==="application/json"}return{setHeaders:r,getHeaders:n,setHeader:i,getHeader:c,removeHeader:d,setAuthorization:p,removeAuthorization:u,hasAuthorization:o,setFormData:s,setJson:l,isFormData:m,isJson:f}}function me(e){let t=null;e&&r(e);function r(i){if(i=i.toLowerCase(),!["get","post","put","patch","delete"].includes(i))throw new Error("Invalid method.");return t=i,this}function n(){return t}return{setMethod:r,getMethod:n}}function fe(e,t,r){let n=null;r&&i(r);function i(o){if(!["post","put","patch"].includes(e.getMethod()))throw new Error("Payload can only be set for POST, PUT and PATCH requests.");return o instanceof FormData?t.setFormData():d(o)&&(o=p(o),t.setFormData()),t.isFormData()&&e.getMethod()==="put"&&(e.setMethod("post"),o.append("_method","PUT")),n=o,this}function c(){return n}function d(o){for(const s in o){const l=o[s];if(u(l))return!0;if(typeof l=="object"&&d(l))return!0}return!1}function p(o,s=null,l=0){const m=!s;m&&(s=new FormData);for(const f in o){const h=o[f];u(h)?(o[f]="<<FileIndex:"+l+">>",s.append(l,h,h.name),l++):typeof h=="object"&&(o[f]=p(o[f],s,l))}return m?(s.append("payload",JSON.stringify(o)),s):o}function u(o){return typeof File<"u"&&o instanceof File||typeof Blob<"u"&&o instanceof Blob}return{setPayload:i,getPayload:c}}const P=class P{constructor(t={}){v(this,"level",3);v(this,"logger");v(this,"prefix");this.logger=t.logger||console,this.prefix=t.prefix||""}setLevel(t){this.level=t}debug(...t){this.level<=P.LEVEL_DEBUG&&D(this.logger.debug,this.prefix,t)}info(...t){this.level<=P.LEVEL_INFO&&D(this.logger.info,this.prefix,t)}warn(...t){this.level<=P.LEVEL_WARN&&D(this.logger.warn,this.prefix,t)}error(...t){this.level<=P.LEVEL_ERROR&&D(this.logger.error,this.prefix,t)}};v(P,"LEVEL_DEBUG",0),v(P,"LEVEL_INFO",1),v(P,"LEVEL_WARN",2),v(P,"LEVEL_ERROR",3),v(P,"LEVEL_OFF",4);let x=P;const D=(e,t,r)=>{t?e(t,...r):e(...r)},M=new x({prefix:"[SDK]"});let G=null,K=null,J=null,W=null;const pe=()=>G,he=e=>{if(M.info("[Config] Environment:",e),!e)throw new Error("Invalid environment.");G=e},ye=()=>K,ge=e=>{if(M.info("[Config] API Host:",e),!e)throw new Error("Invalid API host.");K=e},be=()=>W,we=e=>{W=e},Re=()=>J,Ae=e=>{if(M.info("[Config] Main App Host:",e),!e)throw new Error("Invalid main app host.");J=e},k={getEnvironment:pe,getApiHost:ye,getErrorHandler:be,setEnvironment:he,setApiHost:ge,setErrorHandler:we,getMainAppHost:Re,setMainAppHost:Ae};function Pe(e){const t=k.getApiHost().replace(/\/$/g,"");let r=null,n={},i={};e&&p(e);function c(){return t+u()+f()}function d(){return u(!0,!0)}function p(a){return r="/"+a.replace(/^\//g,""),this}function u(a=!0,R=!1){return a?r.replace(/:(\w+)/g,(A,E)=>R?"*":i[E]||":"+E):r}function o(a){return n=a,this}function s(a,R){return n[a]=R,this}function l(a){return n[a]&&delete n[a],this}function m(){return Object.keys(n).length>0}function f(a=!0){if(!m())return"";let R="";for(const A in n)if(Array.isArray(n[A]))for(const E of n[A])R+=(R.length?"&":"")+`${A}[]=`+E;else R+=(R.length?"&":"")+A+"="+n[A];return(a?"?":"")+R}function h(a){return i=a,this}function b(a,R){return i[a]=R,this}function C(a){return i[a]&&delete i[a],this}return{setPath:p,getPath:u,getUri:c,getMockUri:d,setQueryParams:o,setQueryParam:s,removeQueryParam:l,hasQuery:m,getQueryString:f,setRouteParams:h,setRouteParam:b,removeRouteParam:C}}function Ie(e){let t=[];function r(){return t=o(arguments),d(),this}function n(){return t.length>0}function i(s){return t.includes(s.trim())?this:(t.push(s.trim()),d(),this)}function c(s){const l=t.indexOf(s.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(s){return s.split(",").map(l=>l.trim())}function u(s){return s.join(",")}function o(s){let l=[];return s.length===1?typeof s[0]=="string"?l=p(s[0]):Array.isArray(s[0])&&(l=s[0]):l=Array.from(s),l}return{setGroups:r,hasGroups:n,addGroup:i,removeGroup:c}}function ve(e){let t=!1,r=!1,n=1,i=10;function c(){return t=!0,d(),this}function d(){r=!0;const f=m(arguments);return o(f.page||1,!1),s(f.perPage||i,!1),l(),this}function p(){return r=!1,l(),this}function u(){return r}function o(f,h=!0){return t=!0,r=!0,n=f,h&&l(),this}function s(f,h=!0){return t=!0,r=!0,i=f,h&&l(),this}function l(){t?u()?(e.removeQueryParam("pagination"),e.setQueryParam("page",n),e.setQueryParam("nbResultPerPage",i)):(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:c,paginate:d,disablePagination:p,hasPagination:u,setPage:o,setPerPage:s}}function Ee(e){let t=!1,r="id",n="ASC";function i(){t=!0;const s=o(arguments);return s.orderBy&&d(s.orderBy,!1),s.orderDir&&p(s.orderDir,!1),u(),this}function c(){return t}function d(s,l=!0){return t=!0,r=s,l&&u(),this}function p(s,l=!0){if(s=s.toUpperCase(),["ASC","DESC"].indexOf(s)===-1)throw new Error("Invalid order direction");return t=!0,n=s,l&&u(),this}function u(){c()&&(e.setQueryParam("orderBy",r),e.setQueryParam("orderDirection",n))}function o(s){if(s.length===1&&typeof s[0]=="object")return s[0];const l={};return s.length>=1&&(l.orderBy=s[0]),s.length>=2&&(l.orderDir=s[1]),l}return{setOrder:i,hasOrder:c,setOrderBy:d,setOrderDir:p}}function Se(){let e=!1;function t(){return e=!0,this}function r(){return e}return{setSilent:t,isSilent:r}}function Ce(){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 r(){return e}return{setResponseType:t,getResponseType:r}}function ke(e){function t(){return e}function r(){return e.data}function n(){return e.data}return{getResponse:t,getData:r,getPayload:n}}function $e(e,t=!1){let r=!1,n=!1;return e.response?(r=!0,n=!0):e.request&&(r=!0),!t&&k.getErrorHandler()&&k.getErrorHandler()(e),{sent:r,responded:n,error:e}}function Le(e){function t(){return e}function r(){return e.data}function n(){return e.data}function i(){return e.data["@type"]==="hydra:Collection"}function c(){return i()?e.data["hydra:member"]:null}function d(){return i()?e.data["hydra:totalItems"]:null}function p(){return i()?e.data["hydra:view"]&&e.data["hydra:view"]["hydra:last"]:!1}function u(){return!i()||!p()?null:parseInt(e.data["hydra:view"]["@id"].match(/page=(\d+)/)[1])}function o(){return!i()||!p()?null:parseInt(e.data["hydra:view"]["hydra:last"].match(/page=(\d+)/)[1])}return{getResponse:t,getData:r,getPayload:n,isCollection:i,getCollection:c,getTotal:d,hasPagination:p,getPage:u,getPages:o}}function Me(e,t,r,n,i,c){async function d(){const u=r.getMethod(),o=t.getUri(),s=e.getHeaders(),l=n.getPayload(),m=[o];["post","put","patch"].includes(u)&&m.push(l||{}),m.push({headers:s,responseType:c.getResponseType()}),M.info("[Request] Sending request:",`[${u.toUpperCase()}]`,o);try{const f=await oe[u](...m);return p(f)}catch(f){throw $e(f,i.isSilent())}}function p(u){if(u.headers){const o=Object.keys(u.headers),s=o.map(l=>l.toLowerCase()).indexOf("content-type");if(s!==-1&&u.headers[o[s]].includes("application/ld+json"))return Le(u)}return ke(u)}return{send:d}}function w(e,t="get",r=null){const n=de(),i=Pe(e),c=me(t),d=fe(c,n,r),p=Ie(i),u=ve(i),o=Ee(i),s=Se(),l=Ce(),m=Me(n,i,c,d,s,l);return{...n,...i,...c,...d,...p,...u,...o,...s,...l,...m}}function y(e,t="get",r=null){const n=w(e,t,r),i=L();i.isAuthenticated()&&n.setAuthorization(i.getAuthToken());const c=n.send;return n.send=async function(){if(!n.hasAuthorization())throw new Error("::SDK Request:: Request cannot be sent, missing authorization header.");return c()},n}const Oe=(e,t)=>y("/v2/activity/candidate/:candidateId/establishment/:establishmentId").setRouteParams({candidateId:e,establishmentId:t}),De=()=>({listByCandidateAndEstablishment:Oe}),_e=(e,t,r)=>y("/candidate/:candidateId/share/establishment/:establishmentId").setMethod("post").setRouteParams({candidateId:e,establishmentId:t}).setPayload(r),Te=(e,t)=>y("/candidate/:candidateId/archive/establishment/:establishmentId").setRouteParams({candidateId:e,establishmentId:t}),xe=(e,t)=>y("/candidate/:candidateId/archive/establishment/:establishmentId").setMethod("post").setRouteParams({candidateId:e,establishmentId:t}),je=(e,t)=>y("/candidate/:candidateId/archive/establishment/:establishmentId").setMethod("delete").setRouteParams({candidateId:e,establishmentId:t}),Ne=()=>({share:_e,isArchived:Te,archive:xe,unarchive:je}),ze=(e,t)=>y("/comment/establishment/:establishmentId/candidate/:userId").setRouteParams({establishmentId:e,userId:t}),Fe=(e,t,r)=>y("/comment/establishment/:establishmentId/candidate/:userId").setRouteParams({establishmentId:e,userId:t}).setMethod("post").setPayload(r),qe=(e,t)=>y("/comment/:commentId").setRouteParams({commentId:e}).setMethod("put").setPayload(t),Be=e=>y("/comment/:commentId").setRouteParams({commentId:e}).setMethod("delete"),He=()=>({getForEstablishmentCandidate:ze,postForEstablishmentCandidate:Fe,update:qe,remove:Be}),Ve=()=>w("contractType").isList().addGroup("Term:id").addGroup("Term:name"),Qe=()=>({list:Ve}),Ue=e=>y("/v2/talents").isList().setQueryParam("establishment-id",e),Ge=()=>({list:Ue}),Ke=(e,t,r)=>y("/cvtheque/establishment/:establishmentId/candidate/:candidateId/label/synchronize").setRouteParams({establishmentId:e,candidateId:t}).setMethod("post").setPayload(r),Je=()=>({syncCandidateLabels:Ke}),We=()=>w("diploma").isList().addGroup("Term:id").addGroup("Term:name"),Ze=()=>({list:We}),Xe=e=>y("document/candidate/:candidateId").setRouteParams({candidateId:e}).isList().disablePagination(),Ye=(e,t)=>y("document/candidate/:candidateId/establishment/:establishmentId/recruiter").setRouteParams({candidateId:e,establishmentId:t}).isList().disablePagination(),et=(e,t)=>y("document/candidate/:candidateId/establishment/:establishmentId/candidate").setRouteParams({candidateId:e,establishmentId:t}).isList().disablePagination(),tt=e=>y("document/recruiter").setMethod("post").setPayload(e),nt=e=>y("document/:documentId").setRouteParams({documentId:e}).setMethod("delete"),rt=()=>({listByCandidate:Xe,listByCandidateAndEstablishmentFromRecruiter:Ye,listByCandidateAndEstablishmentFromCandidate:et,addFromRecruiter:tt,remove:nt}),it=(e,t)=>y("/v2/establishments/:establishmentId/email-history").setRouteParams({establishmentId:t}).setQueryParam("receiverId",e).isList().disablePagination(),ot=()=>({listByCandidateAndEstablishment:it}),st=(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}),ct=()=>({sendToCandidate:st,sendToRecipients:at}),ut=(e,t=!0)=>{const r=y("/v2/establishments/:establishmentId/email-templates").setRouteParams({establishmentId:e}).isList().disablePagination();return t&&r.setQueryParam("global",!0),r},lt=()=>y("/v2/self/email-templates").isList().disablePagination(),dt=()=>({listByEstablishment:ut,listSelf:lt}),mt=(e,t)=>y("establishment-career/:establishmentId/:versionId").setRouteParams({establishmentId:e,versionId:t}),ft=(e,t="published")=>y("establishment-career/:establishmentId/state/:state").setRouteParams({establishmentId:e,state:t}),pt=(e,t,r=null)=>{const n=r!==null?y("establishment-career/:establishmentId/:versionId").setRouteParams({establishmentId:e,versionId:r}):y("establishment-career/:establishmentId").setRouteParams({establishmentId:e});return n.setMethod("post").setPayload(t),n},ht=(e,t)=>y("establishment-career/:establishmentId/logo-banner").setMethod("post").setRouteParams({establishmentId:e}).setPayload(t),yt=(e,t,r)=>y("establishment-career/:establishmentId/publish/:versionId").setMethod("post").setRouteParams({establishmentId:e,versionId:t}).setPayload(r),gt=()=>({readById:mt,readByState:ft,upsert:pt,uploadLogoAndBanner:ht,publish:yt}),bt=e=>w("establishment/:establishmentId").setRouteParams({establishmentId:e}),wt=e=>y("establishment/:establishmentId/authorizations").setRouteParams({establishmentId:e}),F=()=>({read:bt,authorizations:wt}),Rt=e=>w("feature-flag/maintenance").setMethod("post").setPayload(e),At=(e,t)=>w("feature-flag/establishment").setMethod("post").setPayload({establishment:e,flagName:t}),Pt=()=>({maintenanceModeEnabled:Rt,forEstablishment:At}),It=()=>w("job").isList().addGroup("Term:id").addGroup("Term:name"),vt=()=>({list:It}),Et=e=>y("/label/establishment/:establishmentId").isList().setRouteParams({establishmentId:e}),St=(e,t)=>y("/label/establishment/:establishmentId").setMethod("post").setRouteParams({establishmentId:e}).setPayload(t),Ct=(e,t)=>y("/label/:labelId").setMethod("put").setRouteParams({labelId:e}).setPayload(t),kt=e=>y("/label/:labelId").setMethod("delete").setRouteParams({labelId:e}),$t=(e,t,r)=>y("/label/establishment/:establishmentId/candidate/:candidateId/synchronize").setMethod("post").setPayload(r).setRouteParams({establishmentId:e,candidateId:t}),Lt=()=>({listByEstablishment:Et,addToEstablishment:St,update:Ct,remove:kt,syncForCandidate:$t}),Mt=e=>w("offer/:offerId").setRouteParams({offerId:e}),Ot=()=>({read:Mt}),Dt=(e,t=!1)=>{const r=y("/recruiter/establishment/:establishmentId").isList().setRouteParams({establishmentId:e});return t&&r.setQueryParam("exclude-me",1),r},_t=()=>({listByEstablishment:Dt}),Tt=e=>y("/recruitment/establishment/:establishmentId/mine").isList().setRouteParams({establishmentId:e}),xt=(e,t)=>y("/recruitment/mine/establishment/:establishmentId/has-not/candidate/:candidateId").isList().setRouteParams({establishmentId:e,candidateId:t}),jt=(e,t)=>y("/recruitment/mine/establishment/:establishmentId/has/candidate/:candidateId").isList().setRouteParams({establishmentId:e,candidateId:t}),Nt=(e,t)=>y("/recruitment/establishment/:establishmentId/has/candidate/:candidateId").isList().setRouteParams({establishmentId:e,candidateId:t}),zt=(e,t)=>y("/recruitment/:recruitmentId/candidate").setMethod("put").setRouteParams({recruitmentId:e}).setPayload(t),Ft=(e,t)=>y("/recruitment/:recruitmentId/candidate/:candidateId").setMethod("delete").setRouteParams({recruitmentId:e,candidateId:t}),qt=()=>({mineByEstablishment:Tt,mineWithoutCandidate:xt,mineWithCandidate:jt,withCandidate:Nt,addCandidates:zt,removeCandidate:Ft}),Bt=(e,t,r,n=null)=>{const i=w("candidate/register/open").setMethod("post"),c={email:e};return t==="establishment"&&(c.establishmentId=r),t==="offer"&&(c.offerId=r),n&&(c.referer=n),i.setPayload(c),i},Ht=(e,t)=>w("candidate/register/update/:token").setMethod("post").setRouteParams({token:e}).setPayload(t),Vt=e=>w("candidate/register/read/:token").setRouteParams({token:e}),Qt=e=>w("candidate/register/close/:token").setMethod("post").setRouteParams({token:e}),Ut=()=>({open:Bt,update:Ht,read:Vt,close:Qt}),Gt=()=>w("speciality").isList().addGroup("Term:id").addGroup("Term:name"),Kt=()=>({list:Gt}),Jt=e=>y("/tag/public/establishment/:establishmentId").isList().setRouteParams({establishmentId:e}),Wt=()=>({listByEstablishment:Jt}),Zt=e=>w("user/email/isset/:email").setRouteParams({email:e}),Xt=()=>y("user/self").addGroup("user:self"),Yt=e=>y("/user/:uuid").setRouteParams({uuid:e}),en=e=>w("/user/:uuid").setRouteParams({uuid:e}),q=()=>({emailExists:Zt,self:Xt,byUuidPrivate:Yt,byUuid:en});let _;function Z(){if(_)return _;const e={user:void 0,roles:[],establishments:{}},t=async()=>{if(!L().isAuthenticated())throw new Error("::SDK Authorization:: User not authenticated");const o=(await q().self().send()).getData();e.user={id:o.id,email:o.email,firstName:o.firstName,lastName:o.lastName,avatar:o.avatar},e.roles=o.roles},r=async o=>{if(!L().isAuthenticated())throw new Error("::SDK Authorization:: User not authenticated");e.establishments[o]=(await F().authorizations(o).send()).getData()},n=o=>{if(e.user===void 0)throw new Error("::SDK Authorization:: User not fetched");return e.roles.includes(o)};return _={fetchSelf:t,fetchPermission:r,hasRole:n,hasRoleRH:()=>n("ROLE_RH"),hasRoleCandidate:()=>n("ROLE_CANDIDATE"),hasRoleAdmin:()=>n("ROLE_ADMIN"),hasPermission:(o,...s)=>{const l=e.establishments[o];if(l===void 0)throw new Error(`::SDK Authorization:: Permissions not fetched for establishment ${o}`);return s.every(m=>l[m]===!0)},clear:()=>{e.user=void 0,e.roles=[],e.establishments={}}},_}async function tn(e,...t){if(!L().isAuthenticated())throw"ERR_NOT_AUTHENTICATED";const n=Z();await Promise.all([n.fetchSelf(),n.fetchPermission(e)]);for(let i=0;i<t.length;i++){const c=t[i];if(!n.hasPermission(e,c))throw"ERR_MISSING_PERMISSION"}}const nn=se.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 r=await F().authorizations(e).send();this.establishments[e]=r.getData()}},hasPermission(e,...t){const r=this.establishments[e];return r===void 0?!1:t.every(n=>r[n]===!0)}}}),S=(e,t,r)=>{const n=typeof t=="string"?t.split("."):[t];let i=e;for(const[c,d]of n.entries()){if(c===n.length-1)return i[d]!==void 0?i[d]:r;if(!(d in i)||typeof i[d]!="object")return r;i=i[d]}return r},N=(e,t,r)=>{const n=typeof t=="string"?t.split("."):[t],i=p=>typeof p=="number"||/^\d$/g.test(p),c=p=>parseInt(p,10);let d=e;return n.forEach((p,u)=>{if(u===n.length-1)d[p]=r;else{const o=i(n[u+1])?[]:{};p=i(p)?c(p):p,d[p]=d[p]??o,d=d[p]}}),e},X=e=>{if(typeof e=="object"){if(Array.isArray(e))return[...e];if(Object(e)===e)return{...e}}return e},B=(e,t)=>{const r={...e};for(const[n,i]of Object.entries(t))n in r&&typeof r[n]=="object"&&typeof i=="object"?r[n]=B(r[n],i):r[n]=X(i);return r};let $=null;function g(){if($)return $;const e=k.getEnvironment(),t=(()=>e==="prod"||e==="production"?"pPROC7dPoJ7XdxHrwsTQNXCGX79MJjhp":e==="staging"?"823rqOTwVk1ZCWVyBAdLInZ77TcFF0CF":"TMZX6evFnu87JrBHV5qLwHsld5C6hilZ")(),r=!!t,n=e!=="prod"&&e!=="production";let i=null;function c(){return r}function d(){const m=window.analytics=window.analytics||[];if(!m.initialize)if(m.invoked)window.console&&console.error&&console.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 b=document.createElement("script");b.id="analytics-script",b.type="text/javascript",b.async=!0,b.src="https://cdn.segment.com/analytics.js/v1/"+f+"/analytics.min.js",b.onerror=()=>window.dispatchEvent(new Event("analytics-error"));const C=document.getElementsByTagName("script")[0];C.parentNode.insertBefore(b,C),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 i!==null||(i=new Promise((m,f)=>{if(!c())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()})),i}async function u(m,f){try{if(await this.analyticsScriptReady(),l("[identify]",[m,f]),c())return window.analytics.identify(m,f)}catch{l("[identify]",[m,f],"error")}}async function o(m,f,h){typeof h!="object"&&(h={});try{if(await this.analyticsScriptReady(),l("[page]",[m,f,h]),c())return window.analytics.page(m,{category:f,...h})}catch{l("[page]",[m,f,h],"error")}}async function s(m,f,h){typeof h!="object"&&(h={});try{if(await this.analyticsScriptReady(),l("[track]",[m,f,h]),c())return window.analytics.track(m,{category:f,...h})}catch{l("[track]",[m,f,h],"error")}}function l(m,f=[],h="log"){f||(f=[]),n&&console[h](`%cⒶ%c ::SDK Analytics:: ${m}`,"color: green;","color: inherit;",...f)}return $={analyticsScriptReady:p,isEnabled:c,identify:u,page:o,track:s,consoleMessage:l},$}g.destroy=()=>$=null;function Y(){const e="Hubler Application";function t(o){var l;if(!o)throw new Error(`Missing arguments for domain "${e}"`);const s=!!o.offerId;if(s&&!o.recruitmentId)throw new Error(`Missing argument "recruitmentId" for domain "${e}"`);return{companyId:(l=o.establishmentId)==null?void 0:l.toString(),jobOfferId:s?o.offerId.toString():null,recruitmentId:s?o.recruitmentId.toString():null,selections:[s?"Application":"Spontaneous Application"]}}async function r(o){return g().page("Application Authentication Viewed",e,t(o))}async function n(o){return g().page("Application Magic Link Viewed",e,t(o))}async function i(o){return g().page("Application Job Viewed",e,t(o))}async function c(o){return g().page("Application Information Viewed",e,t(o))}async function d(o){return g().page("Application Document Viewed",e,t(o))}async function p(o){return g().page("Application Success Viewed",e,t(o))}async function u(o){if(!o.error)throw new Error(`Missing argument "error" for domain "${e}", event "Application Form Failed"`);return g().track("Application Form Failed",e,{...t(o),error:o.error})}return{applicationAuthenticationViewed:r,applicationMagicLinkViewed:n,applicationJobViewed:i,applicationInformationViewed:c,applicationDocumentViewed:d,applicationSuccessViewed:p,applicationFormFailed:u}}function ee(){const e="Profile";function t(a,R){var E;if(!a)throw new Error(`Missing arguments for domain "${e}"`);const A={companyId:a.companyId?a.companyId.toString():null,hublerId:(E=a.hublerId)==null?void 0:E.toString()};return R&&(A.productId=a.companyId?a.companyId+"_2":null),a.recruitmentId&&(A.recruitmentId=a.recruitmentId.toString()),a.selections&&(A.selections=a.selections),a.institutionId&&(A.institutionId=a.institutionId.map(String)),A}async function r(a){return g().track(a.name,e,t(a.properties),!0)}async function n(a){return g().track(a.name,e,t(a.properties,!0))}async function i(a){return g().track(a.name,e,t(a.properties,!0))}async function c(a){return g().track(a.name,e,t(a.properties,!0))}async function d(a){return g().track(a.name,e,t(a.properties,!0))}async function p(a){return g().track(a.name,e,t(a.properties,!0))}async function u(a){return g().track(a.name,e,t(a.properties,!0))}async function o(a){return g().track(a.name,e,t(a.properties,!0))}async function s(a){return g().track(a.name,e,t(a.properties,!0))}async function l(a){return g().track(a.name,e,t(a.properties,!0))}async function m(a){return g().track(a.name,e,t(a.properties,!0))}async function f(a){return g().track(a.name,e,t(a.properties,!0))}async function h(a){return g().track(a.name,e,t(a.properties,!0))}async function b(a){return g().page(a.name,a.properties.category,t(a.properties,!1))}async function C(a){return g().track(a.name,e,t(a.properties,!1))}return{profileDocumentDeleted:r,profileLabelAdded:n,profileLabelRemoved:i,profileShared:c,profileArchived:d,profileCandidateAdded:p,profileCommentAdded:u,profileDocumentAdded:o,profileDocumentDownloaded:s,profileDocumentRequested:l,profileRecruitmentAdded:m,profileRecruitmentRemoved:f,profileTabSelected:h,profileViewed:b,profileEmailSent:C}}const V=Object.freeze(Object.defineProperty({__proto__:null,useAnalyticsHublerApplication:Y,useAnalyticsProfile:ee},Symbol.toStringTag,{value:"Module"}));function rn(){function e(r){return g().identify(r.id,{email:r.email,firstName:r.firstname,lastName:r.lastname,createdAt:r.createdAt,type:"Hubler",lang:"fr",medium:t()?"MOBILE_DEVICE":"WEB_BROWSER"})}function t(){let r=!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)))&&(r=!0)}(navigator.userAgent||navigator.vendor||window.opera),r}return{identifyCandidate:e}}const on="AIzaSyDicyRD6rvVdnicp1tgV0ElazASNGbyyTs",te=()=>new Promise(e=>{window.google&&window.google.maps?e():(window.addEventListener("gmap-ready",()=>e()),cn())}),sn=(e,t)=>te().then(()=>an(e,t)),an=(e,t)=>{const r=new window.google.maps.places.Autocomplete(e,{componentRestrictions:{country:["fr","re","yt","gp","mq"]}});window.google.maps.event.addListener(r,"place_changed",()=>{const n=r.getPlace();n.formatted_address&&t(n)})},cn=()=>{window.onGmapScriptReady=function(){};const e=document.createElement("script");e.src="https://maps.googleapis.com/maps/api/js?key="+on+"&libraries=places&callback=onGmapScriptReady",e.async=!0,e.defer=!0,e.onload=()=>window.dispatchEvent(new Event("gmap-ready")),document.body.appendChild(e)},un={scriptReady:te,autocompleteInput:sn},ln={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"}},dn={fr:ln};let z=null;const ne=()=>z,mn=(e={})=>{let t=e.locale||"fr";const r=u=>t=u,n=()=>t,i=B(dn,(e==null?void 0:e.messages)||{}),c=(u,o)=>{const s=S(i,`${t}.${u}`);return s?o?fn(s,o):s:u},d=(u,o)=>{const s=S(i,`${t}.${u}`);return s?pn(s,o):u};return z={t:c,tNode:d,setLocale:r,getLocale:n,install:u=>{u.config.globalProperties.$t=c,u.config.globalProperties.$tNode=d}},z},fn=(e,t)=>e?e.replace(/{{ ?([a-zA-Z_.]+) ?}}/g,(r,n)=>S(t,n)):null,pn=(e,t)=>{if(!e)return null;const r=e.split(/(\{[{%]+[^{}]*[%}]+})/g).filter(n=>n!=="").map(n=>{const i=n.startsWith("{%")&&n.endsWith("%}")?"slot":n.startsWith("{{")&&n.endsWith("}}")?"variable":"text";if(i==="text")return()=>Q.text(n);n=n.replace(/[{}%]/g,"").trim();const c=n.match(/^[a-zA-Z_.]+/)[0];n=n.replace(c,"").trim();const d={};return n!==""&&([...n.matchAll(/([a-zA-Z_.]+)(=([a-zA-Z_.]+))?/g)].reduce((o,s)=>(s[3]===void 0?N(o,s[1],S(t,s[1])):N(o,s[1],S(t,s[3])),o),d),[...n.matchAll(/([a-zA-Z_.]+)="([^"]+)"/g)].reduce((o,s)=>{let l=s[2];return new RegExp(/^[0-9]*$/).exec(s[2])?l=parseInt(s[2]):new RegExp(/^(true|false)$/).exec(s[2])&&(l=s[2]==="true"),o[s[1]]=l,o},d)),p=>Q[i](c,t,p,d)});return{setup:(n,{slots:i})=>()=>r.map(c=>c(i))}},Q={slot:(e,t,r,n)=>T.h("span",{class:"node node--slot"},r[e.trim()](n)),variable:(e,t)=>T.h("span",{class:"node node--variable"},S(t,e.trim())),text:e=>T.h("span",{class:"node node--text"},e)};function hn(e){const{t}=ne(),r={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,i)=>n===1?t(i?"timeAgo.last-month":"timeAgo.next-month"):`${n} ${t("timeAgo.month",n)}`,year:(n,i)=>n===1?t(i?"timeAgo.last-year":"timeAgo.next-year"):`${n} ${t("timeAgo.year",n)}`,day:(n,i)=>n===1?t(i?"timeAgo.yesterday":"timeAgo.tomorrow"):`${n} ${t("timeAgo.day",n)}`,week:(n,i)=>n===1?t(i?"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 ae.useTimeAgo(e,{fullDateFormatter:n=>n.toLocaleDateString(),messages:r})}function yn(){let e=null;function t(){return e}function r(){return e.controller}function n(){return"use"+e.controller.charAt(0).toUpperCase()+e.controller.slice(1)+"QSController"}function i(){return e.action}function c(){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,o)=>{const s=o.split("=");return s[0]==="controller"||s[0]==="action"?u[s[0]]=decodeURIComponent(s[1]):u.arguments[s[0]]=decodeURIComponent(s[1]),u},{controller:null,action:null,arguments:{}}))}return p(),{getParams:t,getController:r,getControllerComposableName:n,getAction:i,getArguments:c,hasAction:d}}function gn(){async function e({domain:n,event:i,...c}){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(!r(p,i))throw new Error(`Event ${i} is not defined in domain ${n}`);return p[i](c)}function t(n){return!!V[n]}function r(n,i){return!!n[i]}return{call:e}}const U=Object.freeze(Object.defineProperty({__proto__:null,useAnalyticsQSController:gn},Symbol.toStringTag,{value:"Module"}));function bn(e){if(!e.hasAction())throw new Error("No action found in router");function t(){if(!r())throw new Error(`Controller ${e.getController()} not found`);const i=U[e.getControllerComposableName()]();if(!n(i))throw new Error(`Action ${e.getAction()} not found in controller ${e.getController()}`);return i[e.getAction()](e.getArguments())}function r(){return e.getControllerComposableName()in U}function n(i){return e.getAction()in i}return{dispatch:t}}function wn(){let e=!1;function t(i,c,d){n(),d()}function r(i,c,d){if(!e)return e=!0,t(i,c,d);d()}function n(){const i=yn();if(!i.hasAction())return;bn(i).dispatch()}return{vueRouterBeforeEach:t,vueRouterBeforeFirst:r,handle:n}}const I=()=>k.getMainAppHost(),Rn=()=>`${I()}/rh/establishments`,An=e=>`${I()}/rh/establishment/${e}`,Pn=e=>e&&typeof e=="object"&&e.urls&&e.urls.display?e.urls.display:"",In=e=>`${I()}/rh/establishment/${e}/cvtheque/`,vn=(e,t)=>`${I()}/rh/establishment/${e}/recruitment/${t}`,En=(e,t)=>`${I()}/rh/establishment/${e}/recruitment/${t}/kanban`,Sn=e=>`${I()}/rh/establishment/${e}/career-configuration`,Cn=(e,t=null)=>t?`${I()}/career-website/${e}/${t}`:`${I()}/career-website/${e}`,kn=(e,t)=>`${I()}/career-website-preview/${e}/${t}`,$n=(e,t=null)=>{const r=I().replace("://",`://${e}.`);return t?`${r}?_version=${t}`:`${r}`};function Ln(){return{root:I,establishments:Rn,establishment:An,img:Pn,cvtheque:In,recruitment:vn,recruitmentKanban:En,career:Sn,careerConfig:Cn,careerPreview:kn,careerWebsite:$n}}const Mn="0.2.4";exports.BaseLogger=x;exports.Gmap=un;exports.SDKConfig=k;exports.SDKLogger=M;exports.VERSION=Mn;exports._clone=X;exports._get=S;exports._merge=B;exports._set=N;exports.createI18n=mn;exports.useActivityRepository=De;exports.useAnalyticsHublerApplication=Y;exports.useAnalyticsIdentify=rn;exports.useAnalyticsProfile=ee;exports.useAuthentication=L;exports.useAuthorization=Z;exports.useAuthorizationStore=nn;exports.useCanAccessEstablishmentMiddleware=tn;exports.useCandidateRepository=Ne;exports.useCommentRepository=He;exports.useContractTypeRepository=Qe;exports.useCvbankRepository=Ge;exports.useCvthequeRepository=Je;exports.useDiplomaRepository=Ze;exports.useDocumentRepository=rt;exports.useDomainUrls=Ln;exports.useEmailHistoryRepository=ot;exports.useEmailRepository=ct;exports.useEmailTemplateRepository=dt;exports.useEstablishmentCareerRepository=gt;exports.useEstablishmentRepository=F;exports.useFeatureFlagRepository=Pt;exports.useI18n=ne;exports.useJobRepository=vt;exports.useLabelRepository=Lt;exports.useLocaleTimeAgo=hn;exports.useOfferRepository=Ot;exports.usePrivateRequest=y;exports.useQSAction=wn;exports.useRecruiterRepository=_t;exports.useRecruitmentRepository=qt;exports.useRegisterRepository=Ut;exports.useRequest=w;exports.useSpecialityRepository=Kt;exports.useTagRepository=Wt;exports.useUserRepository=q;
|
package/dist/main.js
CHANGED
|
@@ -29,50 +29,50 @@ var z = {
|
|
|
29
29
|
return r;
|
|
30
30
|
}
|
|
31
31
|
return r;
|
|
32
|
-
}, e.prototype.set = function(t, r, n, i, c, d,
|
|
32
|
+
}, e.prototype.set = function(t, r, n, i, c, d, p) {
|
|
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);
|
|
36
36
|
} else
|
|
37
37
|
throw new Error("Cookie name is not found in the first argument.");
|
|
38
38
|
r && r.constructor === Object && (r = JSON.stringify(r));
|
|
39
|
-
var
|
|
39
|
+
var u = "";
|
|
40
40
|
if (n == null && (n = this.current_default_config.expireTimes ? this.current_default_config.expireTimes : ""), n && n != 0)
|
|
41
41
|
switch (n.constructor) {
|
|
42
42
|
case Number:
|
|
43
|
-
n === 1 / 0 || n === -1 ?
|
|
43
|
+
n === 1 / 0 || n === -1 ? u = "; expires=Fri, 31 Dec 9999 23:59:59 GMT" : u = "; max-age=" + n;
|
|
44
44
|
break;
|
|
45
45
|
case String:
|
|
46
46
|
if (/^(?:\d+(y|m|d|h|min|s))$/i.test(n)) {
|
|
47
47
|
var o = n.replace(/^(\d+)(?:y|m|d|h|min|s)$/i, "$1");
|
|
48
48
|
switch (n.replace(/^(?:\d+)(y|m|d|h|min|s)$/i, "$1").toLowerCase()) {
|
|
49
49
|
case "m":
|
|
50
|
-
|
|
50
|
+
u = "; max-age=" + +o * 2592e3;
|
|
51
51
|
break;
|
|
52
52
|
case "d":
|
|
53
|
-
|
|
53
|
+
u = "; max-age=" + +o * 86400;
|
|
54
54
|
break;
|
|
55
55
|
case "h":
|
|
56
|
-
|
|
56
|
+
u = "; max-age=" + +o * 3600;
|
|
57
57
|
break;
|
|
58
58
|
case "min":
|
|
59
|
-
|
|
59
|
+
u = "; max-age=" + +o * 60;
|
|
60
60
|
break;
|
|
61
61
|
case "s":
|
|
62
|
-
|
|
62
|
+
u = "; max-age=" + o;
|
|
63
63
|
break;
|
|
64
64
|
case "y":
|
|
65
|
-
|
|
65
|
+
u = "; max-age=" + +o * 31104e3;
|
|
66
66
|
break;
|
|
67
67
|
}
|
|
68
68
|
} else
|
|
69
|
-
|
|
69
|
+
u = "; expires=" + n;
|
|
70
70
|
break;
|
|
71
71
|
case Date:
|
|
72
|
-
|
|
72
|
+
u = "; expires=" + n.toUTCString();
|
|
73
73
|
break;
|
|
74
74
|
}
|
|
75
|
-
return document.cookie = encodeURIComponent(t) + "=" + encodeURIComponent(r) +
|
|
75
|
+
return document.cookie = encodeURIComponent(t) + "=" + encodeURIComponent(r) + u + (c ? "; domain=" + c : this.current_default_config.domain ? this.current_default_config.domain : "") + (i ? "; path=" + i : 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;
|
|
76
76
|
}, e.prototype.remove = function(t, r, 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 : "") + (r ? "; path=" + r : this.current_default_config.path ? this.current_default_config.path : "; path=/") + "; SameSite=Lax", !0);
|
|
78
78
|
}, e.prototype.isKey = function(t) {
|
|
@@ -129,29 +129,29 @@ function D(e = {
|
|
|
129
129
|
function i() {
|
|
130
130
|
return t.getItem(e.expiration);
|
|
131
131
|
}
|
|
132
|
-
function c(
|
|
133
|
-
const h = s(
|
|
132
|
+
function c(m, f) {
|
|
133
|
+
const h = s(m);
|
|
134
134
|
if (!h.exp)
|
|
135
135
|
throw new Error("Invalid JWT token.");
|
|
136
|
-
t.setItem(e.auth,
|
|
136
|
+
t.setItem(e.auth, m), t.setItem(e.refresh, f), t.setItem(e.expiration, ((h.exp - 60) * 1e3).toString());
|
|
137
137
|
}
|
|
138
138
|
function d() {
|
|
139
139
|
t.removeItem(e.auth), t.removeItem(e.refresh), t.removeItem(e.expiration);
|
|
140
140
|
}
|
|
141
|
-
function
|
|
142
|
-
return
|
|
141
|
+
function p() {
|
|
142
|
+
return u() && !o();
|
|
143
143
|
}
|
|
144
|
-
function
|
|
144
|
+
function u() {
|
|
145
145
|
return !!r();
|
|
146
146
|
}
|
|
147
147
|
function o() {
|
|
148
|
-
const
|
|
149
|
-
return
|
|
148
|
+
const m = i();
|
|
149
|
+
return m ? new Date(m) < /* @__PURE__ */ new Date() : !0;
|
|
150
150
|
}
|
|
151
|
-
function s(
|
|
152
|
-
return JSON.parse(atob(
|
|
151
|
+
function s(m) {
|
|
152
|
+
return JSON.parse(atob(m.split(".")[1]));
|
|
153
153
|
}
|
|
154
|
-
function
|
|
154
|
+
function l() {
|
|
155
155
|
return t;
|
|
156
156
|
}
|
|
157
157
|
return L = {
|
|
@@ -161,10 +161,10 @@ function D(e = {
|
|
|
161
161
|
getExpiration: i,
|
|
162
162
|
authenticate: c,
|
|
163
163
|
clear: d,
|
|
164
|
-
isAuthenticated:
|
|
165
|
-
hasAuth:
|
|
164
|
+
isAuthenticated: p,
|
|
165
|
+
hasAuth: u,
|
|
166
166
|
isExpired: o,
|
|
167
|
-
getStorage:
|
|
167
|
+
getStorage: l
|
|
168
168
|
}, L;
|
|
169
169
|
}
|
|
170
170
|
function ae(e) {
|
|
@@ -187,10 +187,10 @@ function ae(e) {
|
|
|
187
187
|
function d(h) {
|
|
188
188
|
return t[h] && delete t[h], this;
|
|
189
189
|
}
|
|
190
|
-
function
|
|
190
|
+
function p(h) {
|
|
191
191
|
return i("Authorization", "Bearer " + h), this;
|
|
192
192
|
}
|
|
193
|
-
function
|
|
193
|
+
function u() {
|
|
194
194
|
return d("Authorization"), this;
|
|
195
195
|
}
|
|
196
196
|
function o() {
|
|
@@ -199,13 +199,13 @@ function ae(e) {
|
|
|
199
199
|
function s() {
|
|
200
200
|
return i("Content-Type", "multipart/form-data"), this;
|
|
201
201
|
}
|
|
202
|
-
function
|
|
202
|
+
function l() {
|
|
203
203
|
return i("Content-Type", "application/json"), this;
|
|
204
204
|
}
|
|
205
|
-
function
|
|
205
|
+
function m() {
|
|
206
206
|
return c("Content-Type") === "multipart/form-data";
|
|
207
207
|
}
|
|
208
|
-
function
|
|
208
|
+
function f() {
|
|
209
209
|
return c("Content-Type") === "application/json";
|
|
210
210
|
}
|
|
211
211
|
return {
|
|
@@ -214,13 +214,13 @@ function ae(e) {
|
|
|
214
214
|
setHeader: i,
|
|
215
215
|
getHeader: c,
|
|
216
216
|
removeHeader: d,
|
|
217
|
-
setAuthorization:
|
|
218
|
-
removeAuthorization:
|
|
217
|
+
setAuthorization: p,
|
|
218
|
+
removeAuthorization: u,
|
|
219
219
|
hasAuthorization: o,
|
|
220
220
|
setFormData: s,
|
|
221
|
-
setJson:
|
|
222
|
-
isFormData:
|
|
223
|
-
isJson:
|
|
221
|
+
setJson: l,
|
|
222
|
+
isFormData: m,
|
|
223
|
+
isJson: f
|
|
224
224
|
};
|
|
225
225
|
}
|
|
226
226
|
function ce(e) {
|
|
@@ -245,31 +245,31 @@ function ue(e, t, r) {
|
|
|
245
245
|
function i(o) {
|
|
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 o instanceof FormData ? t.setFormData() : d(o) && (o =
|
|
248
|
+
return o instanceof FormData ? t.setFormData() : d(o) && (o = p(o), t.setFormData()), t.isFormData() && e.getMethod() === "put" && (e.setMethod("post"), o.append("_method", "PUT")), n = o, this;
|
|
249
249
|
}
|
|
250
250
|
function c() {
|
|
251
251
|
return n;
|
|
252
252
|
}
|
|
253
253
|
function d(o) {
|
|
254
254
|
for (const s in o) {
|
|
255
|
-
const
|
|
256
|
-
if (l
|
|
255
|
+
const l = o[s];
|
|
256
|
+
if (u(l))
|
|
257
257
|
return !0;
|
|
258
|
-
if (typeof
|
|
258
|
+
if (typeof l == "object" && d(l))
|
|
259
259
|
return !0;
|
|
260
260
|
}
|
|
261
261
|
return !1;
|
|
262
262
|
}
|
|
263
|
-
function
|
|
264
|
-
const
|
|
265
|
-
|
|
266
|
-
for (const
|
|
267
|
-
const h = o[
|
|
268
|
-
|
|
263
|
+
function p(o, s = null, l = 0) {
|
|
264
|
+
const m = !s;
|
|
265
|
+
m && (s = new FormData());
|
|
266
|
+
for (const f in o) {
|
|
267
|
+
const h = o[f];
|
|
268
|
+
u(h) ? (o[f] = "<<FileIndex:" + l + ">>", s.append(l, h, h.name), l++) : typeof h == "object" && (o[f] = p(o[f], s, l));
|
|
269
269
|
}
|
|
270
|
-
return
|
|
270
|
+
return m ? (s.append("payload", JSON.stringify(o)), s) : o;
|
|
271
271
|
}
|
|
272
|
-
function
|
|
272
|
+
function u(o) {
|
|
273
273
|
return typeof File < "u" && o instanceof File || typeof Blob < "u" && o instanceof Blob;
|
|
274
274
|
}
|
|
275
275
|
return {
|
|
@@ -277,7 +277,7 @@ function ue(e, t, r) {
|
|
|
277
277
|
getPayload: c
|
|
278
278
|
};
|
|
279
279
|
}
|
|
280
|
-
const
|
|
280
|
+
const P = class P {
|
|
281
281
|
/**
|
|
282
282
|
* Construct the class with the provided sub logger.
|
|
283
283
|
*/
|
|
@@ -299,24 +299,24 @@ 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 <=
|
|
302
|
+
this.level <= P.LEVEL_DEBUG && M(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 <=
|
|
306
|
+
this.level <= P.LEVEL_INFO && M(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 <=
|
|
310
|
+
this.level <= P.LEVEL_WARN && M(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 <=
|
|
314
|
+
this.level <= P.LEVEL_ERROR && M(this.logger.error, this.prefix, t);
|
|
315
315
|
}
|
|
316
316
|
};
|
|
317
317
|
/** Possible logging level by order of verbosity (more verbose first) */
|
|
318
|
-
v(
|
|
319
|
-
let j =
|
|
318
|
+
v(P, "LEVEL_DEBUG", 0), v(P, "LEVEL_INFO", 1), v(P, "LEVEL_WARN", 2), v(P, "LEVEL_ERROR", 3), v(P, "LEVEL_OFF", 4);
|
|
319
|
+
let j = P;
|
|
320
320
|
const M = (e, t, r) => {
|
|
321
321
|
t ? e(t, ...r) : e(...r);
|
|
322
322
|
}, x = new j({
|
|
@@ -350,17 +350,17 @@ const le = () => V, de = (e) => {
|
|
|
350
350
|
function be(e) {
|
|
351
351
|
const t = $.getApiHost().replace(/\/$/g, "");
|
|
352
352
|
let r = null, n = {}, i = {};
|
|
353
|
-
e &&
|
|
353
|
+
e && p(e);
|
|
354
354
|
function c() {
|
|
355
|
-
return t +
|
|
355
|
+
return t + u() + f();
|
|
356
356
|
}
|
|
357
357
|
function d() {
|
|
358
|
-
return
|
|
358
|
+
return u(!0, !0);
|
|
359
359
|
}
|
|
360
|
-
function
|
|
360
|
+
function p(a) {
|
|
361
361
|
return r = "/" + a.replace(/^\//g, ""), this;
|
|
362
362
|
}
|
|
363
|
-
function
|
|
363
|
+
function u(a = !0, R = !1) {
|
|
364
364
|
return a ? r.replace(/:(\w+)/g, (A, E) => R ? "*" : i[E] || ":" + E) : r;
|
|
365
365
|
}
|
|
366
366
|
function o(a) {
|
|
@@ -369,14 +369,14 @@ function be(e) {
|
|
|
369
369
|
function s(a, R) {
|
|
370
370
|
return n[a] = R, this;
|
|
371
371
|
}
|
|
372
|
-
function
|
|
372
|
+
function l(a) {
|
|
373
373
|
return n[a] && delete n[a], this;
|
|
374
374
|
}
|
|
375
|
-
function
|
|
375
|
+
function m() {
|
|
376
376
|
return Object.keys(n).length > 0;
|
|
377
377
|
}
|
|
378
|
-
function
|
|
379
|
-
if (!
|
|
378
|
+
function f(a = !0) {
|
|
379
|
+
if (!m())
|
|
380
380
|
return "";
|
|
381
381
|
let R = "";
|
|
382
382
|
for (const A in n)
|
|
@@ -397,15 +397,15 @@ function be(e) {
|
|
|
397
397
|
return i[a] && delete i[a], this;
|
|
398
398
|
}
|
|
399
399
|
return {
|
|
400
|
-
setPath:
|
|
401
|
-
getPath:
|
|
400
|
+
setPath: p,
|
|
401
|
+
getPath: u,
|
|
402
402
|
getUri: c,
|
|
403
403
|
getMockUri: d,
|
|
404
404
|
setQueryParams: o,
|
|
405
405
|
setQueryParam: s,
|
|
406
|
-
removeQueryParam:
|
|
407
|
-
hasQuery:
|
|
408
|
-
getQueryString:
|
|
406
|
+
removeQueryParam: l,
|
|
407
|
+
hasQuery: m,
|
|
408
|
+
getQueryString: f,
|
|
409
409
|
setRouteParams: h,
|
|
410
410
|
setRouteParam: b,
|
|
411
411
|
removeRouteParam: S
|
|
@@ -423,21 +423,21 @@ function we(e) {
|
|
|
423
423
|
return t.includes(s.trim()) ? this : (t.push(s.trim()), d(), this);
|
|
424
424
|
}
|
|
425
425
|
function c(s) {
|
|
426
|
-
const
|
|
427
|
-
return
|
|
426
|
+
const l = t.indexOf(s.trim());
|
|
427
|
+
return l === -1 ? this : (t.splice(l, 1), d(), this);
|
|
428
428
|
}
|
|
429
429
|
function d() {
|
|
430
|
-
t.length ? e.setQueryParam("groups",
|
|
430
|
+
t.length ? e.setQueryParam("groups", u(t)) : e.removeQueryParam("groups");
|
|
431
431
|
}
|
|
432
|
-
function
|
|
433
|
-
return s.split(",").map((
|
|
432
|
+
function p(s) {
|
|
433
|
+
return s.split(",").map((l) => l.trim());
|
|
434
434
|
}
|
|
435
|
-
function
|
|
435
|
+
function u(s) {
|
|
436
436
|
return s.join(",");
|
|
437
437
|
}
|
|
438
438
|
function o(s) {
|
|
439
|
-
let
|
|
440
|
-
return s.length === 1 ? typeof s[0] == "string" ?
|
|
439
|
+
let l = [];
|
|
440
|
+
return s.length === 1 ? typeof s[0] == "string" ? l = p(s[0]) : Array.isArray(s[0]) && (l = s[0]) : l = Array.from(s), l;
|
|
441
441
|
}
|
|
442
442
|
return {
|
|
443
443
|
setGroups: r,
|
|
@@ -453,35 +453,35 @@ function Re(e) {
|
|
|
453
453
|
}
|
|
454
454
|
function d() {
|
|
455
455
|
r = !0;
|
|
456
|
-
const
|
|
457
|
-
return o(
|
|
456
|
+
const f = m(arguments);
|
|
457
|
+
return o(f.page || 1, !1), s(f.perPage || i, !1), l(), this;
|
|
458
458
|
}
|
|
459
|
-
function
|
|
460
|
-
return r = !1,
|
|
459
|
+
function p() {
|
|
460
|
+
return r = !1, l(), this;
|
|
461
461
|
}
|
|
462
|
-
function
|
|
462
|
+
function u() {
|
|
463
463
|
return r;
|
|
464
464
|
}
|
|
465
|
-
function o(
|
|
466
|
-
return t = !0, r = !0, n =
|
|
465
|
+
function o(f, h = !0) {
|
|
466
|
+
return t = !0, r = !0, n = f, h && l(), this;
|
|
467
467
|
}
|
|
468
|
-
function s(
|
|
469
|
-
return t = !0, r = !0, i =
|
|
468
|
+
function s(f, h = !0) {
|
|
469
|
+
return t = !0, r = !0, i = f, h && l(), this;
|
|
470
470
|
}
|
|
471
|
-
function
|
|
472
|
-
t ?
|
|
471
|
+
function l() {
|
|
472
|
+
t ? u() ? (e.removeQueryParam("pagination"), e.setQueryParam("page", n), e.setQueryParam("nbResultPerPage", i)) : (e.removeQueryParam("page"), e.removeQueryParam("nbResultPerPage"), e.setQueryParam("pagination", "false")) : (e.removeQueryParam("page"), e.removeQueryParam("nbResultPerPage"), e.removeQueryParam("pagination"));
|
|
473
473
|
}
|
|
474
|
-
function f
|
|
475
|
-
if (
|
|
476
|
-
return
|
|
474
|
+
function m(f) {
|
|
475
|
+
if (f.length === 1 && typeof f[0] == "object")
|
|
476
|
+
return f[0];
|
|
477
477
|
const h = {};
|
|
478
|
-
return
|
|
478
|
+
return f.length >= 1 && (h.page = f[0]), f.length >= 2 && (h.perPage = f[1]), h;
|
|
479
479
|
}
|
|
480
480
|
return {
|
|
481
481
|
isList: c,
|
|
482
482
|
paginate: d,
|
|
483
|
-
disablePagination:
|
|
484
|
-
hasPagination:
|
|
483
|
+
disablePagination: p,
|
|
484
|
+
hasPagination: u,
|
|
485
485
|
setPage: o,
|
|
486
486
|
setPerPage: s
|
|
487
487
|
};
|
|
@@ -491,36 +491,36 @@ function Ae(e) {
|
|
|
491
491
|
function i() {
|
|
492
492
|
t = !0;
|
|
493
493
|
const s = o(arguments);
|
|
494
|
-
return s.orderBy && d(s.orderBy, !1), s.orderDir &&
|
|
494
|
+
return s.orderBy && d(s.orderBy, !1), s.orderDir && p(s.orderDir, !1), u(), this;
|
|
495
495
|
}
|
|
496
496
|
function c() {
|
|
497
497
|
return t;
|
|
498
498
|
}
|
|
499
|
-
function d(s,
|
|
500
|
-
return t = !0, r = s,
|
|
499
|
+
function d(s, l = !0) {
|
|
500
|
+
return t = !0, r = s, l && u(), this;
|
|
501
501
|
}
|
|
502
|
-
function
|
|
502
|
+
function p(s, l = !0) {
|
|
503
503
|
if (s = s.toUpperCase(), ["ASC", "DESC"].indexOf(s) === -1)
|
|
504
504
|
throw new Error("Invalid order direction");
|
|
505
|
-
return t = !0, n = s,
|
|
505
|
+
return t = !0, n = s, l && u(), this;
|
|
506
506
|
}
|
|
507
|
-
function
|
|
507
|
+
function u() {
|
|
508
508
|
c() && (e.setQueryParam("orderBy", r), e.setQueryParam("orderDirection", n));
|
|
509
509
|
}
|
|
510
510
|
function o(s) {
|
|
511
511
|
if (s.length === 1 && typeof s[0] == "object")
|
|
512
512
|
return s[0];
|
|
513
|
-
const
|
|
514
|
-
return s.length >= 1 && (
|
|
513
|
+
const l = {};
|
|
514
|
+
return s.length >= 1 && (l.orderBy = s[0]), s.length >= 2 && (l.orderDir = s[1]), l;
|
|
515
515
|
}
|
|
516
516
|
return {
|
|
517
517
|
setOrder: i,
|
|
518
518
|
hasOrder: c,
|
|
519
519
|
setOrderBy: d,
|
|
520
|
-
setOrderDir:
|
|
520
|
+
setOrderDir: p
|
|
521
521
|
};
|
|
522
522
|
}
|
|
523
|
-
function
|
|
523
|
+
function Pe() {
|
|
524
524
|
let e = !1;
|
|
525
525
|
function t() {
|
|
526
526
|
return e = !0, this;
|
|
@@ -533,7 +533,7 @@ function Ie() {
|
|
|
533
533
|
isSilent: r
|
|
534
534
|
};
|
|
535
535
|
}
|
|
536
|
-
function
|
|
536
|
+
function Ie() {
|
|
537
537
|
let e = "json";
|
|
538
538
|
function t(n = "json") {
|
|
539
539
|
if (["arraybuffer", "document", "json", "text", "stream", "blob"].indexOf(n) === -1)
|
|
@@ -591,14 +591,14 @@ function Se(e) {
|
|
|
591
591
|
function d() {
|
|
592
592
|
return i() ? e.data["hydra:totalItems"] : null;
|
|
593
593
|
}
|
|
594
|
-
function
|
|
594
|
+
function p() {
|
|
595
595
|
return i() ? e.data["hydra:view"] && e.data["hydra:view"]["hydra:last"] : !1;
|
|
596
596
|
}
|
|
597
|
-
function
|
|
598
|
-
return !i() || !
|
|
597
|
+
function u() {
|
|
598
|
+
return !i() || !p() ? null : parseInt(e.data["hydra:view"]["@id"].match(/page=(\d+)/)[1]);
|
|
599
599
|
}
|
|
600
600
|
function o() {
|
|
601
|
-
return !i() || !
|
|
601
|
+
return !i() || !p() ? null : parseInt(e.data["hydra:view"]["hydra:last"].match(/page=(\d+)/)[1]);
|
|
602
602
|
}
|
|
603
603
|
return {
|
|
604
604
|
getResponse: t,
|
|
@@ -607,50 +607,50 @@ function Se(e) {
|
|
|
607
607
|
isCollection: i,
|
|
608
608
|
getCollection: c,
|
|
609
609
|
getTotal: d,
|
|
610
|
-
hasPagination:
|
|
611
|
-
getPage:
|
|
610
|
+
hasPagination: p,
|
|
611
|
+
getPage: u,
|
|
612
612
|
getPages: o
|
|
613
613
|
};
|
|
614
614
|
}
|
|
615
615
|
function Ce(e, t, r, n, i, c) {
|
|
616
616
|
async function d() {
|
|
617
|
-
const
|
|
618
|
-
["post", "put", "patch"].includes(
|
|
617
|
+
const u = r.getMethod(), o = t.getUri(), s = e.getHeaders(), l = n.getPayload(), m = [o];
|
|
618
|
+
["post", "put", "patch"].includes(u) && m.push(l || {}), m.push({
|
|
619
619
|
headers: s,
|
|
620
620
|
responseType: c.getResponseType()
|
|
621
|
-
}), x.info("[Request] Sending request:", `[${
|
|
621
|
+
}), x.info("[Request] Sending request:", `[${u.toUpperCase()}]`, o);
|
|
622
622
|
try {
|
|
623
|
-
const
|
|
624
|
-
return
|
|
625
|
-
} catch (
|
|
626
|
-
throw Ee(
|
|
623
|
+
const f = await te[u](...m);
|
|
624
|
+
return p(f);
|
|
625
|
+
} catch (f) {
|
|
626
|
+
throw Ee(f, i.isSilent());
|
|
627
627
|
}
|
|
628
628
|
}
|
|
629
|
-
function
|
|
630
|
-
if (
|
|
631
|
-
const o = Object.keys(
|
|
632
|
-
if (s !== -1 &&
|
|
633
|
-
return Se(
|
|
629
|
+
function p(u) {
|
|
630
|
+
if (u.headers) {
|
|
631
|
+
const o = Object.keys(u.headers), s = o.map((l) => l.toLowerCase()).indexOf("content-type");
|
|
632
|
+
if (s !== -1 && u.headers[o[s]].includes("application/ld+json"))
|
|
633
|
+
return Se(u);
|
|
634
634
|
}
|
|
635
|
-
return ve(
|
|
635
|
+
return ve(u);
|
|
636
636
|
}
|
|
637
637
|
return {
|
|
638
638
|
send: d
|
|
639
639
|
};
|
|
640
640
|
}
|
|
641
641
|
function w(e, t = "get", r = null) {
|
|
642
|
-
const n = ae(), i = be(e), c = ce(t), d = ue(c, n, r),
|
|
642
|
+
const n = ae(), i = be(e), c = ce(t), d = ue(c, n, r), p = we(i), u = Re(i), o = Ae(i), s = Pe(), l = Ie(), m = Ce(n, i, c, d, s, l);
|
|
643
643
|
return {
|
|
644
644
|
...n,
|
|
645
645
|
...i,
|
|
646
646
|
...c,
|
|
647
647
|
...d,
|
|
648
|
-
...
|
|
649
|
-
...
|
|
648
|
+
...p,
|
|
649
|
+
...u,
|
|
650
650
|
...o,
|
|
651
651
|
...s,
|
|
652
|
-
...
|
|
653
|
-
...
|
|
652
|
+
...l,
|
|
653
|
+
...m
|
|
654
654
|
};
|
|
655
655
|
}
|
|
656
656
|
function y(e, t = "get", r = null) {
|
|
@@ -717,13 +717,13 @@ const ke = (e, t) => y("/v2/activity/candidate/:candidateId/establishment/:estab
|
|
|
717
717
|
forEstablishment: ot
|
|
718
718
|
}), st = () => w("job").isList().addGroup("Term:id").addGroup("Term:name"), An = () => ({
|
|
719
719
|
list: st
|
|
720
|
-
}), at = (e) => y("/label/establishment/:establishmentId").isList().setRouteParams({ establishmentId: e }), ct = (e, t) => y("/label/establishment/:establishmentId").setMethod("post").setRouteParams({ establishmentId: e }).setPayload(t), ut = (e, t) => y("/label/:labelId").setMethod("put").setRouteParams({ labelId: e }).setPayload(t), lt = (e) => y("/label/:labelId").setMethod("delete").setRouteParams({ labelId: e }), dt = (e, t, r) => y("/label/establishment/:establishmentId/candidate/:candidateId/synchronize").setMethod("post").setPayload(r).setRouteParams({ establishmentId: e, candidateId: t }),
|
|
720
|
+
}), at = (e) => y("/label/establishment/:establishmentId").isList().setRouteParams({ establishmentId: e }), ct = (e, t) => y("/label/establishment/:establishmentId").setMethod("post").setRouteParams({ establishmentId: e }).setPayload(t), ut = (e, t) => y("/label/:labelId").setMethod("put").setRouteParams({ labelId: e }).setPayload(t), lt = (e) => y("/label/:labelId").setMethod("delete").setRouteParams({ labelId: e }), dt = (e, t, r) => y("/label/establishment/:establishmentId/candidate/:candidateId/synchronize").setMethod("post").setPayload(r).setRouteParams({ establishmentId: e, candidateId: t }), Pn = () => ({
|
|
721
721
|
listByEstablishment: at,
|
|
722
722
|
addToEstablishment: ct,
|
|
723
723
|
update: ut,
|
|
724
724
|
remove: lt,
|
|
725
725
|
syncForCandidate: dt
|
|
726
|
-
}), mt = (e) => w("offer/:offerId").setRouteParams({ offerId: e }),
|
|
726
|
+
}), mt = (e) => w("offer/:offerId").setRouteParams({ offerId: e }), In = () => ({
|
|
727
727
|
read: mt
|
|
728
728
|
}), ft = (e, t = !1) => {
|
|
729
729
|
const r = y("/recruiter/establishment/:establishmentId").isList().setRouteParams({ establishmentId: e });
|
|
@@ -740,11 +740,11 @@ const ke = (e, t) => y("/v2/activity/candidate/:candidateId/establishment/:estab
|
|
|
740
740
|
}), Rt = (e, t, r, n = null) => {
|
|
741
741
|
const i = w("candidate/register/open").setMethod("post"), c = { email: e };
|
|
742
742
|
return t === "establishment" && (c.establishmentId = r), t === "offer" && (c.offerId = r), n && (c.referer = n), i.setPayload(c), i;
|
|
743
|
-
}, At = (e, t) => w("candidate/register/update/:token").setMethod("post").setRouteParams({ token: e }).setPayload(t),
|
|
743
|
+
}, At = (e, t) => w("candidate/register/update/:token").setMethod("post").setRouteParams({ token: e }).setPayload(t), Pt = (e) => w("candidate/register/read/:token").setRouteParams({ token: e }), It = (e) => w("candidate/register/close/:token").setMethod("post").setRouteParams({ token: e }), Sn = () => ({
|
|
744
744
|
open: Rt,
|
|
745
745
|
update: At,
|
|
746
|
-
read:
|
|
747
|
-
close:
|
|
746
|
+
read: Pt,
|
|
747
|
+
close: It
|
|
748
748
|
}), vt = () => w("speciality").isList().addGroup("Term:id").addGroup("Term:name"), Cn = () => ({
|
|
749
749
|
list: vt
|
|
750
750
|
}), Et = (e) => y("/tag/public/establishment/:establishmentId").isList().setRouteParams({ establishmentId: e }), kn = () => ({
|
|
@@ -791,10 +791,10 @@ function Lt() {
|
|
|
791
791
|
hasRoleCandidate: () => n("ROLE_CANDIDATE"),
|
|
792
792
|
hasRoleAdmin: () => n("ROLE_ADMIN"),
|
|
793
793
|
hasPermission: (o, ...s) => {
|
|
794
|
-
const
|
|
795
|
-
if (
|
|
794
|
+
const l = e.establishments[o];
|
|
795
|
+
if (l === void 0)
|
|
796
796
|
throw new Error(`::SDK Authorization:: Permissions not fetched for establishment ${o}`);
|
|
797
|
-
return s.every((
|
|
797
|
+
return s.every((m) => l[m] === !0);
|
|
798
798
|
},
|
|
799
799
|
clear: () => {
|
|
800
800
|
e.user = void 0, e.roles = [], e.establishments = {};
|
|
@@ -862,14 +862,14 @@ const Ln = ne("authorization", {
|
|
|
862
862
|
}
|
|
863
863
|
return r;
|
|
864
864
|
}, F = (e, t, r) => {
|
|
865
|
-
const n = typeof t == "string" ? t.split(".") : [t], i = (
|
|
865
|
+
const n = typeof t == "string" ? t.split(".") : [t], i = (p) => typeof p == "number" || /^\d$/g.test(p), c = (p) => parseInt(p, 10);
|
|
866
866
|
let d = e;
|
|
867
|
-
return n.forEach((
|
|
868
|
-
if (
|
|
869
|
-
d[
|
|
867
|
+
return n.forEach((p, u) => {
|
|
868
|
+
if (u === n.length - 1)
|
|
869
|
+
d[p] = r;
|
|
870
870
|
else {
|
|
871
|
-
const o = i(n[
|
|
872
|
-
|
|
871
|
+
const o = i(n[u + 1]) ? [] : {};
|
|
872
|
+
p = i(p) ? c(p) : p, d[p] = d[p] ?? o, d = d[p];
|
|
873
873
|
}
|
|
874
874
|
}), e;
|
|
875
875
|
}, Mt = (e) => {
|
|
@@ -896,100 +896,100 @@ function g() {
|
|
|
896
896
|
return r;
|
|
897
897
|
}
|
|
898
898
|
function d() {
|
|
899
|
-
const
|
|
900
|
-
if (!
|
|
901
|
-
if (
|
|
899
|
+
const m = window.analytics = window.analytics || [];
|
|
900
|
+
if (!m.initialize)
|
|
901
|
+
if (m.invoked)
|
|
902
902
|
window.console && console.error && console.error("Segment snippet included twice.");
|
|
903
903
|
else {
|
|
904
|
-
|
|
904
|
+
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) {
|
|
905
905
|
return function() {
|
|
906
906
|
if (window.analytics.initialized)
|
|
907
|
-
return window.analytics[
|
|
907
|
+
return window.analytics[f].apply(window.analytics, arguments);
|
|
908
908
|
const h = Array.prototype.slice.call(arguments);
|
|
909
|
-
return h.unshift(
|
|
909
|
+
return h.unshift(f), m.push(h), m;
|
|
910
910
|
};
|
|
911
911
|
};
|
|
912
|
-
for (let
|
|
913
|
-
const h =
|
|
914
|
-
|
|
912
|
+
for (let f = 0; f < m.methods.length; f++) {
|
|
913
|
+
const h = m.methods[f];
|
|
914
|
+
m[h] = m.factory(h);
|
|
915
915
|
}
|
|
916
|
-
|
|
916
|
+
m.load = function(f, h) {
|
|
917
917
|
const b = document.createElement("script");
|
|
918
|
-
b.id = "analytics-script", b.type = "text/javascript", b.async = !0, b.src = "https://cdn.segment.com/analytics.js/v1/" +
|
|
918
|
+
b.id = "analytics-script", b.type = "text/javascript", b.async = !0, b.src = "https://cdn.segment.com/analytics.js/v1/" + f + "/analytics.min.js", b.onerror = () => window.dispatchEvent(new Event("analytics-error"));
|
|
919
919
|
const S = document.getElementsByTagName("script")[0];
|
|
920
|
-
S.parentNode.insertBefore(b, S),
|
|
921
|
-
},
|
|
920
|
+
S.parentNode.insertBefore(b, S), m._loadOptions = h;
|
|
921
|
+
}, m._writeKey = t, m.SNIPPET_VERSION = "4.16.1", m.load(t), m.page(), m.ready(() => window.dispatchEvent(new Event("analytics-ready")));
|
|
922
922
|
}
|
|
923
923
|
}
|
|
924
|
-
async function
|
|
925
|
-
return i !== null || (i = new Promise((
|
|
924
|
+
async function p() {
|
|
925
|
+
return i !== null || (i = new Promise((m, f) => {
|
|
926
926
|
if (!c())
|
|
927
|
-
return
|
|
927
|
+
return l("Analytics is disabled."), m();
|
|
928
928
|
if (window.addEventListener("analytics-ready", () => {
|
|
929
|
-
|
|
929
|
+
l("Analytics script loaded successfully."), m();
|
|
930
930
|
}), window.addEventListener("analytics-error", () => {
|
|
931
|
-
|
|
932
|
-
}),
|
|
933
|
-
return
|
|
931
|
+
l("Analytics script failed to load. Consider disabling your AdBlocker.", null, "error"), f();
|
|
932
|
+
}), l("Loading Analytics script."), window.analytics)
|
|
933
|
+
return m();
|
|
934
934
|
d();
|
|
935
935
|
})), i;
|
|
936
936
|
}
|
|
937
|
-
async function
|
|
937
|
+
async function u(m, f) {
|
|
938
938
|
try {
|
|
939
|
-
if (await this.analyticsScriptReady(),
|
|
940
|
-
return window.analytics.identify(
|
|
939
|
+
if (await this.analyticsScriptReady(), l("[identify]", [m, f]), c())
|
|
940
|
+
return window.analytics.identify(m, f);
|
|
941
941
|
} catch {
|
|
942
|
-
|
|
942
|
+
l("[identify]", [m, f], "error");
|
|
943
943
|
}
|
|
944
944
|
}
|
|
945
|
-
async function o(
|
|
945
|
+
async function o(m, f, h) {
|
|
946
946
|
typeof h != "object" && (h = {});
|
|
947
947
|
try {
|
|
948
|
-
if (await this.analyticsScriptReady(),
|
|
949
|
-
return window.analytics.page(
|
|
950
|
-
category:
|
|
948
|
+
if (await this.analyticsScriptReady(), l("[page]", [m, f, h]), c())
|
|
949
|
+
return window.analytics.page(m, {
|
|
950
|
+
category: f,
|
|
951
951
|
...h
|
|
952
952
|
});
|
|
953
953
|
} catch {
|
|
954
|
-
|
|
954
|
+
l("[page]", [m, f, h], "error");
|
|
955
955
|
}
|
|
956
956
|
}
|
|
957
|
-
async function s(
|
|
957
|
+
async function s(m, f, h) {
|
|
958
958
|
typeof h != "object" && (h = {});
|
|
959
959
|
try {
|
|
960
|
-
if (await this.analyticsScriptReady(),
|
|
961
|
-
return window.analytics.track(
|
|
962
|
-
category:
|
|
960
|
+
if (await this.analyticsScriptReady(), l("[track]", [m, f, h]), c())
|
|
961
|
+
return window.analytics.track(m, {
|
|
962
|
+
category: f,
|
|
963
963
|
...h
|
|
964
964
|
});
|
|
965
965
|
} catch {
|
|
966
|
-
|
|
966
|
+
l("[track]", [m, f, h], "error");
|
|
967
967
|
}
|
|
968
968
|
}
|
|
969
|
-
function
|
|
970
|
-
|
|
969
|
+
function l(m, f = [], h = "log") {
|
|
970
|
+
f || (f = []), n && console[h](`%cⒶ%c ::SDK Analytics:: ${m}`, "color: green;", "color: inherit;", ...f);
|
|
971
971
|
}
|
|
972
972
|
return k = {
|
|
973
|
-
analyticsScriptReady:
|
|
973
|
+
analyticsScriptReady: p,
|
|
974
974
|
isEnabled: c,
|
|
975
|
-
identify:
|
|
975
|
+
identify: u,
|
|
976
976
|
page: o,
|
|
977
977
|
track: s,
|
|
978
|
-
consoleMessage:
|
|
978
|
+
consoleMessage: l
|
|
979
979
|
}, k;
|
|
980
980
|
}
|
|
981
981
|
g.destroy = () => k = null;
|
|
982
982
|
function Ot() {
|
|
983
983
|
const e = "Hubler Application";
|
|
984
984
|
function t(o) {
|
|
985
|
-
var
|
|
985
|
+
var l;
|
|
986
986
|
if (!o)
|
|
987
987
|
throw new Error(`Missing arguments for domain "${e}"`);
|
|
988
988
|
const s = !!o.offerId;
|
|
989
989
|
if (s && !o.recruitmentId)
|
|
990
990
|
throw new Error(`Missing argument "recruitmentId" for domain "${e}"`);
|
|
991
991
|
return {
|
|
992
|
-
companyId: (
|
|
992
|
+
companyId: (l = o.establishmentId) == null ? void 0 : l.toString(),
|
|
993
993
|
jobOfferId: s ? o.offerId.toString() : null,
|
|
994
994
|
recruitmentId: s ? o.recruitmentId.toString() : null,
|
|
995
995
|
selections: [s ? "Application" : "Spontaneous Application"]
|
|
@@ -1010,10 +1010,10 @@ function Ot() {
|
|
|
1010
1010
|
async function d(o) {
|
|
1011
1011
|
return g().page("Application Document Viewed", e, t(o));
|
|
1012
1012
|
}
|
|
1013
|
-
async function
|
|
1013
|
+
async function p(o) {
|
|
1014
1014
|
return g().page("Application Success Viewed", e, t(o));
|
|
1015
1015
|
}
|
|
1016
|
-
async function
|
|
1016
|
+
async function u(o) {
|
|
1017
1017
|
if (!o.error)
|
|
1018
1018
|
throw new Error(`Missing argument "error" for domain "${e}", event "Application Form Failed"`);
|
|
1019
1019
|
return g().track("Application Form Failed", e, { ...t(o), error: o.error });
|
|
@@ -1024,8 +1024,8 @@ function Ot() {
|
|
|
1024
1024
|
applicationJobViewed: i,
|
|
1025
1025
|
applicationInformationViewed: c,
|
|
1026
1026
|
applicationDocumentViewed: d,
|
|
1027
|
-
applicationSuccessViewed:
|
|
1028
|
-
applicationFormFailed:
|
|
1027
|
+
applicationSuccessViewed: p,
|
|
1028
|
+
applicationFormFailed: u
|
|
1029
1029
|
};
|
|
1030
1030
|
}
|
|
1031
1031
|
function Dt() {
|
|
@@ -1055,10 +1055,10 @@ function Dt() {
|
|
|
1055
1055
|
async function d(a) {
|
|
1056
1056
|
return g().track(a.name, e, t(a.properties, !0));
|
|
1057
1057
|
}
|
|
1058
|
-
async function
|
|
1058
|
+
async function p(a) {
|
|
1059
1059
|
return g().track(a.name, e, t(a.properties, !0));
|
|
1060
1060
|
}
|
|
1061
|
-
async function
|
|
1061
|
+
async function u(a) {
|
|
1062
1062
|
return g().track(a.name, e, t(a.properties, !0));
|
|
1063
1063
|
}
|
|
1064
1064
|
async function o(a) {
|
|
@@ -1067,13 +1067,13 @@ function Dt() {
|
|
|
1067
1067
|
async function s(a) {
|
|
1068
1068
|
return g().track(a.name, e, t(a.properties, !0));
|
|
1069
1069
|
}
|
|
1070
|
-
async function
|
|
1070
|
+
async function l(a) {
|
|
1071
1071
|
return g().track(a.name, e, t(a.properties, !0));
|
|
1072
1072
|
}
|
|
1073
|
-
async function
|
|
1073
|
+
async function m(a) {
|
|
1074
1074
|
return g().track(a.name, e, t(a.properties, !0));
|
|
1075
1075
|
}
|
|
1076
|
-
async function
|
|
1076
|
+
async function f(a) {
|
|
1077
1077
|
return g().track(a.name, e, t(a.properties, !0));
|
|
1078
1078
|
}
|
|
1079
1079
|
async function h(a) {
|
|
@@ -1091,13 +1091,13 @@ function Dt() {
|
|
|
1091
1091
|
profileLabelRemoved: i,
|
|
1092
1092
|
profileShared: c,
|
|
1093
1093
|
profileArchived: d,
|
|
1094
|
-
profileCandidateAdded:
|
|
1095
|
-
profileCommentAdded:
|
|
1094
|
+
profileCandidateAdded: p,
|
|
1095
|
+
profileCommentAdded: u,
|
|
1096
1096
|
profileDocumentAdded: o,
|
|
1097
1097
|
profileDocumentDownloaded: s,
|
|
1098
|
-
profileDocumentRequested:
|
|
1099
|
-
profileRecruitmentAdded:
|
|
1100
|
-
profileRecruitmentRemoved:
|
|
1098
|
+
profileDocumentRequested: l,
|
|
1099
|
+
profileRecruitmentAdded: m,
|
|
1100
|
+
profileRecruitmentRemoved: f,
|
|
1101
1101
|
profileTabSelected: h,
|
|
1102
1102
|
profileViewed: b,
|
|
1103
1103
|
profileEmailSent: S
|
|
@@ -1177,18 +1177,21 @@ const xt = "AIzaSyDicyRD6rvVdnicp1tgV0ElazASNGbyyTs", Z = () => new Promise((e)
|
|
|
1177
1177
|
let N = null;
|
|
1178
1178
|
const Ft = () => N, Dn = (e = {}) => {
|
|
1179
1179
|
let t = e.locale || "fr";
|
|
1180
|
-
const r = (
|
|
1180
|
+
const r = (u) => t = u, n = () => t, i = W(zt, (e == null ? void 0 : e.messages) || {}), c = (u, o) => {
|
|
1181
|
+
const s = C(i, `${t}.${u}`);
|
|
1182
|
+
return s ? o ? qt(s, o) : s : u;
|
|
1183
|
+
}, d = (u, o) => {
|
|
1184
|
+
const s = C(i, `${t}.${u}`);
|
|
1185
|
+
return s ? Bt(s, o) : u;
|
|
1186
|
+
};
|
|
1181
1187
|
return N = {
|
|
1182
|
-
t:
|
|
1183
|
-
|
|
1184
|
-
return o ? l ? qt(o, l) : o : m;
|
|
1185
|
-
},
|
|
1186
|
-
tNode: (m, l) => {
|
|
1187
|
-
const o = C(i, `${t}.${m}`);
|
|
1188
|
-
return o ? Bt(o, l) : m;
|
|
1189
|
-
},
|
|
1188
|
+
t: c,
|
|
1189
|
+
tNode: d,
|
|
1190
1190
|
setLocale: r,
|
|
1191
|
-
getLocale: n
|
|
1191
|
+
getLocale: n,
|
|
1192
|
+
install: (u) => {
|
|
1193
|
+
u.config.globalProperties.$t = c, u.config.globalProperties.$tNode = d;
|
|
1194
|
+
}
|
|
1192
1195
|
}, N;
|
|
1193
1196
|
}, qt = (e, t) => e ? e.replace(/{{ ?([a-zA-Z_.]+) ?}}/g, (r, n) => C(t, n)) : null, Bt = (e, t) => {
|
|
1194
1197
|
if (!e)
|
|
@@ -1202,9 +1205,9 @@ const Ft = () => N, Dn = (e = {}) => {
|
|
|
1202
1205
|
n = n.replace(c, "").trim();
|
|
1203
1206
|
const d = {};
|
|
1204
1207
|
return n !== "" && ([...n.matchAll(/([a-zA-Z_.]+)(=([a-zA-Z_.]+))?/g)].reduce((o, s) => (s[3] === void 0 ? F(o, s[1], C(t, s[1])) : F(o, s[1], C(t, s[3])), o), d), [...n.matchAll(/([a-zA-Z_.]+)="([^"]+)"/g)].reduce((o, s) => {
|
|
1205
|
-
let
|
|
1206
|
-
return new RegExp(/^[0-9]*$/).exec(s[2]) ?
|
|
1207
|
-
}, d)), (
|
|
1208
|
+
let l = s[2];
|
|
1209
|
+
return new RegExp(/^[0-9]*$/).exec(s[2]) ? l = parseInt(s[2]) : new RegExp(/^(true|false)$/).exec(s[2]) && (l = s[2] === "true"), o[s[1]] = l, o;
|
|
1210
|
+
}, d)), (p) => B[i](c, t, p, d);
|
|
1208
1211
|
});
|
|
1209
1212
|
return { setup: (n, { slots: i }) => () => r.map((c) => c(i)) };
|
|
1210
1213
|
}, B = {
|
|
@@ -1251,13 +1254,13 @@ function Ht() {
|
|
|
1251
1254
|
function d() {
|
|
1252
1255
|
return !!(e && e.controller && e.action);
|
|
1253
1256
|
}
|
|
1254
|
-
function
|
|
1255
|
-
window.location.search.length !== 0 && (e = window.location.search.substring(1).split("&").reduce((
|
|
1257
|
+
function p() {
|
|
1258
|
+
window.location.search.length !== 0 && (e = window.location.search.substring(1).split("&").reduce((u, o) => {
|
|
1256
1259
|
const s = o.split("=");
|
|
1257
|
-
return s[0] === "controller" || s[0] === "action" ?
|
|
1260
|
+
return s[0] === "controller" || s[0] === "action" ? u[s[0]] = decodeURIComponent(s[1]) : u.arguments[s[0]] = decodeURIComponent(s[1]), u;
|
|
1258
1261
|
}, { controller: null, action: null, arguments: {} }));
|
|
1259
1262
|
}
|
|
1260
|
-
return
|
|
1263
|
+
return p(), {
|
|
1261
1264
|
getParams: t,
|
|
1262
1265
|
getController: r,
|
|
1263
1266
|
getControllerComposableName: n,
|
|
@@ -1271,10 +1274,10 @@ function Vt() {
|
|
|
1271
1274
|
const d = "useAnalytics" + n.charAt(0).toUpperCase() + n.slice(1);
|
|
1272
1275
|
if (!t(d))
|
|
1273
1276
|
throw new Error(`Domain ${n} is not defined`);
|
|
1274
|
-
const
|
|
1275
|
-
if (!r(
|
|
1277
|
+
const p = q[d]();
|
|
1278
|
+
if (!r(p, i))
|
|
1276
1279
|
throw new Error(`Event ${i} is not defined in domain ${n}`);
|
|
1277
|
-
return
|
|
1280
|
+
return p[i](c);
|
|
1278
1281
|
}
|
|
1279
1282
|
function t(n) {
|
|
1280
1283
|
return !!q[n];
|
|
@@ -1333,13 +1336,13 @@ function _n() {
|
|
|
1333
1336
|
handle: n
|
|
1334
1337
|
};
|
|
1335
1338
|
}
|
|
1336
|
-
const
|
|
1337
|
-
const r =
|
|
1339
|
+
const I = () => $.getMainAppHost(), Gt = () => `${I()}/rh/establishments`, Ut = (e) => `${I()}/rh/establishment/${e}`, Kt = (e) => e && typeof e == "object" && e.urls && e.urls.display ? e.urls.display : "", Jt = (e) => `${I()}/rh/establishment/${e}/cvtheque/`, Wt = (e, t) => `${I()}/rh/establishment/${e}/recruitment/${t}`, Zt = (e, t) => `${I()}/rh/establishment/${e}/recruitment/${t}/kanban`, Xt = (e) => `${I()}/rh/establishment/${e}/career-configuration`, Yt = (e, t = null) => t ? `${I()}/career-website/${e}/${t}` : `${I()}/career-website/${e}`, en = (e, t) => `${I()}/career-website-preview/${e}/${t}`, tn = (e, t = null) => {
|
|
1340
|
+
const r = I().replace("://", `://${e}.`);
|
|
1338
1341
|
return t ? `${r}?_version=${t}` : `${r}`;
|
|
1339
1342
|
};
|
|
1340
1343
|
function Tn() {
|
|
1341
1344
|
return {
|
|
1342
|
-
root:
|
|
1345
|
+
root: I,
|
|
1343
1346
|
establishments: Gt,
|
|
1344
1347
|
establishment: Ut,
|
|
1345
1348
|
img: Kt,
|
|
@@ -1352,7 +1355,7 @@ function Tn() {
|
|
|
1352
1355
|
careerWebsite: tn
|
|
1353
1356
|
};
|
|
1354
1357
|
}
|
|
1355
|
-
const jn = "0.2.
|
|
1358
|
+
const jn = "0.2.4";
|
|
1356
1359
|
export {
|
|
1357
1360
|
j as BaseLogger,
|
|
1358
1361
|
On as Gmap,
|
|
@@ -1388,9 +1391,9 @@ export {
|
|
|
1388
1391
|
Rn as useFeatureFlagRepository,
|
|
1389
1392
|
Ft as useI18n,
|
|
1390
1393
|
An as useJobRepository,
|
|
1391
|
-
|
|
1394
|
+
Pn as useLabelRepository,
|
|
1392
1395
|
xn as useLocaleTimeAgo,
|
|
1393
|
-
|
|
1396
|
+
In as useOfferRepository,
|
|
1394
1397
|
y as usePrivateRequest,
|
|
1395
1398
|
_n as useQSAction,
|
|
1396
1399
|
vn as useRecruiterRepository,
|