1import{$ as Ao,$c as $e,A as b,Aa as Ct,Ab as K,Ac as It,B as To,Ba as jt,Bb as Y,Bc as L,Be as et,Cb as Ft,Cc as Jr,Ce as Go,D as F,Fc as Xe,G as Co,H as Lt,Ib as Oe,J as Dt,K as Io,La as Uo,M as xe,Me as Ko,Oe as tt,Pe as qo,Qe as zo,Ra as V,Re as P,T as Rt,Uc as jo,W as Ye,Wb as ie,Xb as Fe,Yb as Ro,Zc as Oo,_ as x,_c as q,a as ho,aa as Po,ad as A,b as mo,ba as j,c as go,ca as h,cd as pe,db as Ze,dd as Fo,eb as ko,f as je,fa as _o,g as wt,h as yo,ia as Vr,je as Ho,k as bo,ke as Mt,l as w,m as ve,me as M,n as vo,o as Ve,ob as Lo,oc as ne,oe as Bo,p as xo,pa as Qe,pb as Ot,pc as fe,q as g,qa as Nt,qc as No,r as Je,s as So,sa as Tt,sb as Do,sd as Mo,ua as Eo,z as wo}from"./chunk-TET5VYI6.js";import{a as T,b as re,g as oe}from"./chunk-SLISG6NT.js";var Ah="Chill",Ht="/teacher/registration",fa=["International","Professional"];function Wo(r){return fa.some(i=>i===r)}function Ph(r,i){let e=Wo(r)?r:"Mty",t=i?.trim();return{targetGroup:e,source:t||null}}function _h(r){let i=r??void 0;return Wo(i)?i:"Mty"}var Yr={mty_nl:{id:1,code:"mty_nl",name:"Meet the Youngsters",region:"NL",language:M.domainLanguages.mty_nl||"nl",supportedLanguageCodes:M.supportedLanguageCodes,newsletterEnabled:!0},mty_be:{id:2,code:"mty_be",name:"Meet the Youngsters",region:"BE",language:M.domainLanguages.mty_be||"nl",supportedLanguageCodes:M.supportedLanguageCodes,newsletterEnabled:!0},mty_eu:{id:3,code:"mty_eu",name:"Meet the Youngsters",region:"EU",language:M.domainLanguages.mty_eu||"nl",supportedLanguageCodes:M.supportedLanguageCodes,newsletterEnabled:!0},mty_de:{id:4,code:"mty_de",name:"Meet the Youngsters",region:"DE",language:M.domainLanguages.mty_de||"de",supportedLanguageCodes:M.supportedLanguageCodes,newsletterEnabled:!0},mty_br:{id:5,code:"mty_br",name:"Meet the Youngsters",region:"BR",language:M.domainLanguages.mty_br||"pt",supportedLanguageCodes:M.supportedLanguageCodes,newsletterEnabled:!1}};
1var Vo={prod:{mty_nl:"https://www.meettheyoungsters.nl",mty_be:"https://www.meettheyoungsters.be",mty_eu:"https://www.meettheyoungsters.eu",mty_de:"https://www.meettheyoungsters.de",mty_br:"https://www.meettheyoungsters.com.br"},"prod-brazil":{mty_br:"https://www.meettheyoungsters.com.br",mty_nl:"https://www.meettheyoungsters.nl",mty_be:"https://www.meettheyoungsters.be",mty_eu:"https://www.meettheyoungsters.eu",mty_de:"https://www.meettheyoungsters.de"},staging:{mty_nl:"https://mty-portal-acceptatie.azurewebsites.net",mty_be:"https://mty-be-portal-acceptatie.azurewebsites.net",mty_eu:"https://mty-eu-portal-acceptatie.azurewebsites.net",mty_de:"https://mty-de-portal-acceptatie.azurewebsites.net",mty_br:"https://mty-br-portal-acceptatie.azurewebsites.net"},"staging-brazil":{mty_nl:"https://mty-portal-acceptatie.azurewebsites.net",mty_be:"https://mty-be-portal-acceptatie.azurewebsites.net",mty_eu:"https://mty-eu-portal-acceptatie.azurewebsites.net",mty_de:"https://mty-de-portal-acceptatie.azurewebsites.net",mty_br:"https://mty-brazil-dev-app-staging.azurewebsites.net"},test:{mty_nl:"https://mty-portal-test.azurewebsites.net",mty_be:"https://mty-be-portal-test.azurewebsites.net",mty_eu:"https://mty-eu-portal-test.azurewebsites.net",mty_de:"https://mty-de-portal-test.azurewebsites.net",mty_br:"https://mty-br-portal-test.azurewebsites.net"},"test-brazil":{mty_nl:"https://mty-portal-test.azurewebsites.net",mty_be:"https://mty-be-portal-test.azurewebsites.net",mty_eu:"https://mty-eu-portal-test.azurewebsites.net",mty_de:"https://mty-de-portal-test.azurewebsites.net",mty_br:"https://mty-brazil-dev-app-test.azurewebsites.net"},dev:{mty_nl:"http://localhost:4200",mty_be:"http://localhost:4201",mty_eu:"http://localhost:4202",mty_de:"http://localhost:4203",mty_br:"http://localhost:4204"}};function Jo(r,i){let e=i||Object.keys(Yr),t=Vo[r];return e.map(o=>re(T({},Yr[o]),{url:t[o]}))}var Q={production:!0,apiUrl:"https://mty-api.azurewebsites.net",statisticsBaseUrl:"https://meettheyoungster
1s.blob.core.windows.net/cache",awvlUrl:"https://www.aantrekkelijkstewerkgever.nl",isDNAEnabled:M.isDNAEnabled,app_domains:Jo("prod"),sentry:{enabled:!0,feedbackEnabled:!0,dsn:"https://93b57404d7b32c30e2c187b99d0532b0@o4510238991122432.ingest.de.sentry.io/4510340485152848",environment:"production",sendDefaultPii:!1,tracesSampleRate:.1,replaysSessionSampleRate:0,replaysOnErrorSampleRate:0},azureMaps:{subscriptionKey:"65TAwBgYcORpiWAKdmSK7ek1lv75sxr2-nWJuAGGBb0"}};var Me=[{code:"aa",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"ab",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"af",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"ak",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"am",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"an",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"ar",flag:"\u{1F1F8}\u{1F1E6}",region:"SA"},{code:"as",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"av",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"ay",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"az",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"ba",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"be",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"bg",flag:"\u{1F1E7}\u{1F1EC}",region:"BG"},{code:"bh",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"bi",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"bm",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"bn",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"bo",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"br",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"bs",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"ca",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"ce",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"ch",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"co",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"cr",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"cs",flag:"\u{1F1E8}\u{1F1FF}",region:"CZ"},{code:"cu",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"cv",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"cy",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"da",flag:"\u{1F1E9}\u{1F1F0}",region:"DK"},{code:"de",flag:"\u{1F1E9}\u{1F1EA}",region:"DE"},{code:"dv",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"dz",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"ee",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"el",flag:"\u{1F1EC}\u{1F1F7}",region:"GR"},{code:"en",flag:"\u{1F1EC}\u{1F1E7}",region:"GB"},{code:"eo",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"es",flag:"\u{1F1EA}\u{1F1F8}",region:"ES"},{code:"et",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"eu",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"fa",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"ff",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"fi",flag:"\u{1F1EB}\u{1F1EE}",region:"FI"},{code:"fj",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"fo",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"fr",flag:"\u{1F1EB}\u{1F1F7}",region:"FR"},{code:"fy",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"ga",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"gd",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"gl",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"gn",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"gu",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"gv",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"ha",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"he",flag:"\u{1F1EE}\u{1F1F1}",region:"IL"},{code:"hi",flag:"\u{1F1EE}\u{1F1F3}",region:"IN"},{code:"ho",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"hr",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"ht",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"hu",flag:"\u{1F1ED}\u{1F1FA}",region:"HU"},{code:"hy",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"hz",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"ia",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"id",flag:"\u{1F1EE}\u{1F1E9}",region:"ID"},{code:"ie",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"ig",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"ii",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"ik",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"io",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"is",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"it",flag:"\u{1F1EE}\u{1F1F9}",region:"IT"},{code:"iu",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"ja",flag:"\u{1F1EF}\u{1F1F5}",region:"JP"},{code:"jv",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"ka",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"kg",flag:"\u{1F3F3}
1\uFE0F",region:"UN"},{code:"ki",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"kj",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"kk",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"kl",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"km",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"kn",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"ko",flag:"\u{1F1F0}\u{1F1F7}",region:"KR"},{code:"kr",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"ks",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"ku",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"kv",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"kw",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"ky",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"la",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"lb",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"lg",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"li",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"ln",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"lo",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"lt",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"lu",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"lv",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"mg",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"mh",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"mi",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"mk",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"ml",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"mn",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"mo",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"mr",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"ms",flag:"\u{1F1F2}\u{1F1FE}",region:"MY"},{code:"mt",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"my",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"na",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"nb",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"nd",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"ne",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"ng",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"nl",flag:"\u{1F1F3}\u{1F1F1}",region:"NL"},{code:"nn",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"no",flag:"\u{1F1F3}\u{1F1F4}",region:"NO"},{code:"nr",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"nv",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"ny",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"oc",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"oj",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"om",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"or",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"os",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"pa",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"pi",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"pl",flag:"\u{1F1F5}\u{1F1F1}",region:"PL"},{code:"ps",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"pt",flag:"\u{1F1F5}\u{1F1F9}",region:"PT"},{code:"qu",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"rm",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"rn",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"ro",flag:"\u{1F1F7}\u{1F1F4}",region:"RO"},{code:"ru",flag:"\u{1F1F7}\u{1F1FA}",region:"RU"},{code:"rw",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"sa",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"sc",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"sd",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"se",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"sg",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"sh",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"si",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"sk",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"sl",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"sm",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"sn",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"so",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"sq",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"sr",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"ss",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"st",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"su",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"sv",flag:"\u{1F1F8}\u{1F1EA}",region:"SE"},{code:"sw",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"ta",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"te",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"tg",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"th",flag:"\u{1F1F9}\u{1F1ED}",region:"TH"},{code:"ti",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"tk",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"tl",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"tn",flag:"\u{1F3F3}
1\uFE0F",region:"UN"},{code:"to",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"tr",flag:"\u{1F1F9}\u{1F1F7}",region:"TR"},{code:"ts",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"tt",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"tw",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"ty",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"ug",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"uk",flag:"\u{1F1FA}\u{1F1E6}",region:"UA"},{code:"ur",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"uz",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"ve",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"vi",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"vo",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"wa",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"wo",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"xh",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"yi",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"yo",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"za",flag:"\u{1F3F3}\uFE0F",region:"UN"},{code:"zh",flag:"\u{1F1E8}\u{1F1F3}",region:"CN"},{code:"zu",flag:"\u{1F3F3}\uFE0F",region:"UN"}],Yo=M.supportedLanguageCodes||["en","de","fr","nl","pt"];var $=(()=>{class r{constructor(){this.document=h(Xe),this.domainConfigs=Q.app_domains,this._currentDomain=jt(this.domainConfigs[0]),this.currentDomain=this._currentDomain.asReadonly(),this.currentRegion=L(()=>this.currentDomain()?.region??"EU"),this.currentCountry=L(()=>this.currentDomain()?.region??"NL"),this.defaultLanguage=L(()=>this.currentDomain()?.language??"en"),this.supportedLanguageCodes=L(()=>this.currentDomain()?.supportedLanguages??Yo),this.supportedLanguages=L(()=>Me.filter(e=>this.supportedLanguageCodes().includes(e.code))),this.currentCode=L(()=>this.currentDomain()?.code??""),this.newsletterEnabled=L(()=>this.currentDomain()?.newsletterEnabled??!0),this.init()}init(){let e=this.detectCurrentDomain();this.setCurrentDomain(e)}detectCurrentDomain(){let e=this.document.location.protocol,t=this.document.location.hostname,o=this.document.location.port,n=e+"//"+t+(o?":"+o:"");for(let s of this.domainConfigs)if(Array.isArray(s.url)){for(let a of s.url)if(a===n)return s}else if(s.url===n)return s;return Q.app_domains[0]}setCurrentDomain(e){this._currentDomain.set(e)}getCurrentDomain(){return this.currentDomain()}getCurrentRegion(){return this.currentRegion()}getAllDomains(){return this.domainConfigs}isNewsletterEnabled(){return this.newsletterEnabled()}getCurrentCode(){return this.currentCode()}useEducationData(){let e=this.getCurrentRegion();return["NL","EU"].includes(e)}isLanguageSupported(e){return this.supportedLanguageCodes().includes(e)}getDomainByCode(e){return this.domainConfigs.find(t=>t.code===e)??null}getDomainByRegion(e){return this.domainConfigs.find(t=>t.region===e)??null}isProduction(){let e=this.getCurrentDomain();return e?(Array.isArray(e.url)?e.url:[e.url]).some(o=>o.includes("www.")||!o.includes("dev.")&&!o.includes("staging.")&&!o.includes("localhost")):!1}static{this.\u0275fac=function(t){return new(t||r)}}static{this.\u0275prov=x({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var se=(()=>{class r{constructor(){this.config={site_title:"Meet the Youngsters",locale:{language:{current:"en",available_languages:[{value:"en",image:"assets/img/icons/locale/en.png",label:"English"},{value:"nl",image:"assets/img/icons/locale/nl.png",label:"Nederlands"},{value:"de",image:"assets/img/icons/locale/de.png",label:"Deutsch"},{value:"pt",image:"assets/img/icons/locale/pt.png",label:"Portugu\xEAs"},{value:"fr",image:"assets/img/icons/locale/fr.png",label:"Fran\xE7ais"}]}}},this.user={id:"",emailAddress:"",firstName:"",lastName:"",phoneNumber:"",avatarUri:"",allowEmailNotifications:!1,isSubscribedToNewsletter:!1,roles:[],preferredLanguage:"",hasAcceptedGdprPolicy:!1}}static{this.\u0275fac=function(t){return new(t||r)}}static{this.\u0275prov=x({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var Bt=class{validateSignature(i){return Promise.resolve(null)}validateAtHash(i){return Promise.resolve(!0)}},Gt=class{};var At=class{},da=(()=>{class r extends At{now(){return Date.now()}new(){return new Date}static{this.\u0275fac=(()=>{let e;return function(o){return(e||(e=Qe(r)))(o||r)}})()}static{this.\u0275prov=x({token:r,factory:r.\u0275fac})}}return r})();var Kt=class{},qt=class{},ha=(()=>
1{class r{constructor(){this.data=new Map}getItem(e){return this.data.get(e)}removeItem(e){this.data.delete(e)}setItem(e,t){this.data.set(e,t)}static{this.\u0275fac=function(t){return new(t||r)}}static{this.\u0275prov=x({token:r,factory:r.\u0275fac})}}return r})();var Pt=class{constructor(i){this.type=i}},H=class extends Pt{constructor(i,e=null){super(i),this.info=e}},ee=class extends Pt{constructor(i,e=null){super(i),this.info=e}},U=class extends Pt{constructor(i,e,t=null){super(i),this.reason=e,this.params=t}};function Qo(r){let i=r.replace(/-/g,"+").replace(/_/g,"/");return decodeURIComponent(atob(i).split("").map(function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)}).join(""))}function Zo(r){return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}var rt=class{constructor(i){this.clientId="",this.redirectUri="",this.postLogoutRedirectUri="",this.redirectUriAsPostLogoutRedirectUriFallback=!0,this.loginUrl="",this.scope="openid profile",this.resource="",this.rngUrl="",this.oidc=!0,this.requestAccessToken=!0,this.options=null,this.issuer="",this.logoutUrl="",this.clearHashAfterLogin=!0,this.tokenEndpoint=null,this.revocationEndpoint=null,this.customTokenParameters=[],this.userinfoEndpoint=null,this.responseType="",this.showDebugInformation=!1,this.silentRefreshRedirectUri="",this.silentRefreshMessagePrefix="",this.silentRefreshShowIFrame=!1,this.siletRefreshTimeout=1e3*20,this.silentRefreshTimeout=1e3*20,this.dummyClientSecret="",this.requireHttps="remoteOnly",this.strictDiscoveryDocumentValidation=!0,this.jwks=null,this.customQueryParams=null,this.silentRefresh
1IFrameName="angular-oauth-oidc-silent-refresh-iframe",this.timeoutFactor=.75,this.sessionChecksEnabled=!1,this.sessionCheckIntervall=3*1e3,this.sessionCheckIFrameUrl=null,this.sessionCheckIFrameName="angular-oauth-oidc-check-session-iframe",this.disableAtHashCheck=!1,this.skipSubjectCheck=!1,this.useIdTokenHintForSilentRefresh=!1,this.skipIssuerCheck=!1,this.nonceStateSeparator=";",this.useHttpBasicAuth=!1,this.decreaseExpirationBySec=0,this.waitForTokenInMsec=0,this.disablePKCE=!1,this.preserveRequestedRoute=!1,this.disableIdTokenTimer=!1,this.checkOrigin=!1,this.openUri=e=>{location.href=e},i&&Object.assign(this,i)}},He=class{encodeKey(i){return encodeURIComponent(i)}encodeValue(i){return encodeURIComponent(i)}decodeKey(i){return decodeURIComponent(i)}decodeValue(i){return decodeURIComponent(i)}},zt=class{};var Xo=(()=>{class r{getHashFragmentParams(e){let t=e||window.location.hash;if(t=decodeURIComponent(t),t.indexOf("#")!==0)return{};let o=t.indexOf("?");return o>-1?t=t.substr(o+1):t=t.substr(1),this.parseQueryString(t)}parseQueryString(e){let t={},o,n,s,a,l,u;if(e===null)return t;let p=e.split("&");for(let c=0;c<p.length;c++)o=p[c],n=o.indexOf("="),n===-1?(s=o,a=null):(s=o.substr(0,n),a=o.substr(n+1)),l=decodeURIComponent(s),u=decodeURIComponent(a),l.substr(0,1)==="/"&&(l=l.substr(1)),t[l]=u;return t}static{this.\u0275fac=function(t){return new(t||r)}}static{this.\u0275prov=x({token:r,factory:r.\u0275fac})}}return r})(),$o=32,ma=64,ga=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);function Qr(r,i,e,t,o){let n,s,a,l,u,p,c,d,m,y,S,I,E;for(;o>=64;){for(n=i[0],s=i[1],a=i[2],l=i[3],u=i[4],p=i[5],c=i[6],d=i[7],y=0;y<16;y++)S=t+y*4,r[y]=(e[S]&255)<<24|(e[S+1]&255)<<16|(e[S+2]&255)<<8|e[S+3]&255;for(y=16;y<64;y++)m=r[y-2],I=(m>>>17|m<<15)^(m>>>19|m<<13)^m>>>10,m=r[y-15],E=(m>>>7|m<<25)^(m>>>18|m<<14)^m>>>3,r[y]=(I+r[y-7]|0)+(E+r[y-16]|0);for(y=0;y<64;y++)I=(((u>>>6|u<<26)^(u>>>11|u<<21)^(u>>>25|u<<7))+(u&p^~u&c)|0)+(d+(ga[y]+r[y]|0)|0)|0,E=((n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10))+(n&s^n&a^s&a)|0,d=c,c=p,p=u,u=l+I|0,l=a,a=s,s=n,n=I+E|0;i[0]+=n,i[1]+=s,i[2]+=a,i[3]+=l,i[4]+=u,i[5]+=p,i[6]+=c,i[7]+=d,t+=64,o-=64}return t}var Zr=class{constructor(){this.digestLength=$o,this.blockSize=ma,this.state=new Int32Array(8),this.temp=new Int32Array(64),this.buffer=new Uint8Array(128),this.bufferLength=0,this.bytesHashed=0,this.finished=!1,this.reset()}reset(){return this.state[0]=1779033703,this.state[1]=3144134277,this.state[2]=1013904242,this.state[3]=2773480762,this.state[4]=1359893119,this.state[5]=2600822924,this.state[6]=528734635,this.state[7]=1541459225,this.bufferLength=0,this.bytesHashed=0,this.finished=!1,this}clean(){for(let i=0;i<this.buffer.length;i++)this.buffer[i]=0;for(let i=0;i<this.temp.length;i++)this.temp[i]=0;this.reset()}update(i,e=i.length){if(this.finished)throw new Error("SHA256: can't update because hash was finished.");let t=0;if(this.bytesHashed+=e,this.bufferLength>0){for(;this.bufferLength<64&&e>0;)this.buffer[this.bufferLength++]=i[t++],e--;this.bufferLength===64&&(Qr(this.temp,this.state,this.buffer,0,64),this.bufferLength=0)}for(e>=64&&(t=Qr(this.temp,this.state,i,t,e),e%=64);e>0;)this.buffer[this.bufferLength++]=i[t++],e--;return this}finish(i){if(!this.finished){let e=this.bytesHashed,t=this.bufferLength,o=e/536870912|0,n=e<<3,s=e%64<56?64:128;this.buffer[t]=128;for(let a=t+1;a<s-8;a++)this.buffer[a]=0;this.buffer[s-8]=o>>>24&255,this.buffer[s-7]=o>>>16&255,this.buffer[s-6]=o>>>8&255,this.buffer[s-5]=o>>>0&255,this.buffer[s-4]=n>>>24&255,this.buffer[s-3]=n>>>16&255,this.buffer[s-2]=n>>>8&255,this.buffer[s-1]=n>>>
10&255,Qr(this.temp,this.state,this.buffer,0,s),this.finished=!0}for(let e=0;e<8;e++)i[e*4+0]=this.state[e]>>>24&255,i[e*4+1]=this.state[e]>>>16&255,i[e*4+2]=this.state[e]>>>8&255,i[e*4+3]=this.state[e]>>>0&255;return this}digest(){let i=new Uint8Array(this.digestLength);return this.finish(i),i}_saveState(i){for(let e=0;e<this.state.length;e++)i[e]=this.state[e]}_restoreState(i,e){for(let t=0;t<this.state.length;t++)this.state[t]=i[t];this.bytesHashed=e,this.finished=!1,this.bufferLength=0}};function ya(r){let i=new Zr().update(r),e=i.digest();return i.clean(),e}var nm=new Uint8Array($o);var Wt=class{};function ba(r){if(typeof r!="string")throw new TypeError("expected string");let i=r,e=new Uint8Array(i.length);for(let t=0;t<i.length;t++)e[t]=i.charCodeAt(t);return e}function va(r){let i=[];for(let e=0;e<r.length;e++)i.push(String.fromCharCode(r[e]));return i.join("")}var xa=(()=>{class r{calcHash(e,t){return oe(this,null,function*(){return va(ya(ba(e)))})}toHashString2(e){let t="";for(let o of e)t+=String.fromCharCode(o);return t}toHashString(e){let t=new Uint8Array(e),o="";for(let n of t)o+=String.fromCharCode(n);return o}static{this.\u0275fac=function(t){return new(t||r)}}static{this.\u0275prov=x({token:r,factory:r.\u0275fac})}}return r})(),ot=(()=>{class r extends rt{constructor(e,t,o,n,s,a,l,u,p,c){super(),this.ngZone=e,this.http=t,this.config=s,this.urlHelper=a,this.logger=l,this.crypto=u,this.dateTimeService=c,this.discoveryDocumentLoaded=!1,this.state="",this.eventsSubject=new je,this.discoveryDocumentLoadedSubject=new je,this.grantTypesSupported=[],this.inImplicitFlow=!1,this.saveNoncesInLocalStorage=!1,this.debug("angular-oauth2-oidc v10"),this.document=p,s||(s={}),this.discoveryDocumentLoaded$=this.discoveryDocumentLoadedSubject.asObservable(),this.events=this.eventsSubject.asObservable(),n&&(this.tokenValidationHandler=n),s&&this.configure(s);try{o?this.setStorage(o):typeof sessionStorage<"u"&&this.setStorage(sessionStorage)}catch(d){console.error("No OAuthStorage provided and cannot access default (sessionStorage).Consider providing a custom OAuthStorage implementation in your module.",d)}if(this.checkLocalStorageAccessable()){let d=window?.navigator?.userAgent;(d?.includes("MSIE ")||d?.includes("Trident"))&&(this.saveNoncesInLocalStorage=!0)}this.setupRefreshTimer()}checkLocalStorageAccessable(){if(typeof window>"u")return!1;let e="test";try{return typeof window.localStorage>"u"?!1:(localStorage.setItem(e,e),localStorage.removeItem(e),!0)}catch{return!1}}configure(e){Object.assign(this,new rt,e),this.config=Object.assign({},new rt,e),this.sessionChecksEnabled&&this.setupSessionCheck(),this.configChanged()}configChanged(){this.setupRefreshTimer()}restartSessionChecksIfStillLoggedIn(){this.hasValidIdToken()&&this.initSessionCheck()}restartRefreshTimerIfStillLoggedIn(){this.setupExpirationTimers()}setupSessionCheck(){this.events.pipe(b(e=>e.type==="token_received")).subscribe(()=>{this.initSessionCheck()})}setupAutomaticSilentRefresh(e={},t,o=!0){let n=!0;this.clearAutomaticRefreshTimer(),this.automaticRefreshSubscription=this.events.pipe(Ye(s=>{s.type==="token_received"?n=!0:s.type==="logout"&&(n=!1)}),b(s=>s.type==="token_expires"&&(t==null||t==="any"||s.info===t)),Co(1e3)).subscribe(()=>{n&&this.refreshInternal(e,o).catch(()=>{this.debug("Automatic silent refresh did not work")})}),this.restartRefreshTimerIfStillLoggedIn()}refreshInternal(e,t){return!this.useSilentRefresh&&this.responseType==="code"?this.refreshToken():this.silentRefresh(e,t)}loadDiscoveryDocumentAndTryLogin(e=null){return this.loadDiscoveryDocument().then(()=>this.tryLogin(e))}loadDiscoveryDocumentAndLogin(e=null){return e=e||{},this.loadDiscoveryDocumentAndTryLogin(e).then(()=>{if(!this.hasValidIdToken()||!this.hasValidAccessToken()){let t=typeof e.state=="string"?e.state:"";return this.initLoginFlow(t),!1}else return!0})}debug(...e){this.showDebugInformation&&this.logger.debug(...e)}validateUrlFromDiscoveryDocument(e){let t=[],o=this.validateUrlForHttps(e),n=this.validateUrlAgainstIssuer(e);return o||t.push("https for all urls required. Also for urls received by discovery."),n||t.push("Every url in discovery document has to start with the issuer url.Also see property strictDiscoveryDocumentValidation."),t}validateUrlForHttps(e){if(!e)return!0;let t=e.toLowerCase();return this.requireHttps===!1||(t.match(/^http:\/\/localhost($|[:/])/)||t.match(/^http:\/\/localhost($|[:/])/))&&this.requireHttps==="remoteOnly"?!0:t.startsWith("https://")}assertUrlNotNullAndCorrectProtocol(e,t){if(!e)throw new Error(`'${t}' should not be null`);if(!this.validateUrlForHttps(e))throw new Error(`'${t}' must use HTTPS (with TLS), or config value for property 'requireHttps' must be set to 'false' and allow HTTP (without TLS).`)}validateUrlAgainstIssuer(e){return!this.strictDiscoveryDocumentValidation||!e?!0:e.toLowerCase().startsWith(this.issuer.toLowerCase())}setupRefreshTimer(){if(typeof window>"u"){this.debug("timer not supported on this plattform");return}(this.hasValidIdToken()||this.hasValidAccessToken())&&(this.clearAccessTokenTimer(),this.clearIdTokenTimer(),this.setupExpirationTimers()),this.tokenReceivedSubscription&&this.tokenReceivedSubscription.unsubscribe(),this.tokenReceivedSubscription=this.events.pipe(b(e=>e.type==="token_received")).subscribe(()=>{this.clearAccessTokenTimer(),this.clearIdTokenTimer(),this.setupExpirationTimers()})}setupExpirationTimers(){this.hasValidAccessToken()&&this.setupAccessTokenTimer(),!this.disableIdTokenTimer&&this.hasValidIdToken()&&this.setupIdTokenTimer()}setupAccessTokenTimer(){let e=this.getAccessTokenExpiration(),t=this.getAccessTokenStoredAt(),o=this.calcTimeout(t,e);this.ngZone.runOutsideAngular(()=>{this.accessTokenTimeoutSubscription=w(new ee("token_expires","access_token")).pipe(Dt(o)).subscribe(n=>{this.ngZone.run(()=>{this.eventsSubject.next(n)})})})}setupIdTokenTimer(){let e=this.getIdTokenExpiration(),t=this.getIdTokenStoredAt(),o=this.calcTimeout(t,e);this.ngZone.runOutsideAngular(()=>{this.idTokenTimeoutSubscription=w(new ee("token_expires","id_token")).pipe(Dt(o)).subscribe(n=>{this.ngZone.run(()=>{this.eventsSubject.next(n)})})})}stopAutomaticRefresh(){this.clearAccessTokenTimer(),this.clearIdTokenTimer(),this.clearAutomaticRefreshTimer()}clearAccessTokenTimer(){this.accessTokenTimeoutSubscription&&this.accessTokenTimeoutSubscription.unsubscribe()}clearIdTokenTimer(){this.idTokenTimeoutSubscription&&this.idTokenTimeoutSubscription.unsubscribe()}clearAutomaticRefreshTimer(){this.automaticRefreshSubscription&&this.automaticRefreshSubscription.unsubscribe()}
1calcTimeout(e,t){let o=this.dateTimeService.now(),n=(t-e)*this.timeoutFactor-(o-e),s=Math.max(0,n),a=2147483647;return s>a?a:s}setStorage(e){this._storage=e,this.configChanged()}loadDiscoveryDocument(e=null){return new Promise((t,o)=>{if(e||(e=this.issuer||"",e.endsWith("/")||(e+="/"),e+=".well-known/openid-configuration"),!this.validateUrlForHttps(e)){o("issuer must use HTTPS (with TLS), or config value for property 'requireHttps' must be set to 'false' and allow HTTP (without TLS).");return}this.http.get(e).subscribe(n=>{if(!this.validateDiscoveryDocument(n)){this.eventsSubject.next(new U("discovery_document_validation_error",null)),o("discovery_document_validation_error");return}this.loginUrl=n.authorization_endpoint,this.logoutUrl=n.end_session_endpoint||this.logoutUrl,this.grantTypesSupported=n.grant_types_supported,this.issuer=n.issuer,this.tokenEndpoint=n.token_endpoint,this.userinfoEndpoint=n.userinfo_endpoint||this.userinfoEndpoint,this.jwksUri=n.jwks_uri,this.sessionCheckIFrameUrl=n.check_session_iframe||this.sessionCheckIFrameUrl,this.discoveryDocumentLoaded=!0,this.discoveryDocumentLoadedSubject.next(n),this.revocationEndpoint=n.revocation_endpoint||this.revocationEndpoint,this.sessionChecksEnabled&&this.restartSessionChecksIfStillLoggedIn(),this.loadJwks().then(s=>{let a={discoveryDocument:n,jwks:s},l=new H("discovery_document_loaded",a);this.eventsSubject.next(l),t(l)}).catch(s=>{this.eventsSubject.next(new U("discovery_document_load_error",s)),o(s)})},n=>{this.logger.error("error loading discovery document",n),this.eventsSubject.next(new U("discovery_document_load_error",n)),o(n)})})}loadJwks(){return new Promise((e,t)=>{this.jwksUri?this.http.get(this.jwksUri).subscribe(o=>{this.jwks=o,e(o)},o=>{this.logger.error("error loading jwks",o),this.eventsSubject.next(new U("jwks_load_error",o)),t(o)}):e(null)})}validateDiscoveryDocument(e){let t;return!this.skipIssuerCheck&&e.issuer!==this.issuer?(this.logger.error("invalid issuer in discovery document","expected: "+this.issuer,"current: "+e.issuer),!1):(t=this.validateUrlFromDiscoveryDocument(e.authorization_endpoint),t.length>0?(this.logger.error("error validating authorization_endpoint in discovery document",t),!1):(t=this.validateUrlFromDiscoveryDocument(e.end_session_endpoint),t.length>0?(this.logger.error("error validating end_session_endpoint in discovery document",t),!1):(t=this.validateUrlFromDiscoveryDocument(e.token_endpoint),t.length>0&&this.logger.error("error validating token_endpoint in discovery document",t),t=this.validateUrlFromDiscoveryDocument(e.revocation_endpoint),t.length>0&&this.logger.error("error validating revocation_endpoint in discovery document",t),t=this.validateUrlFromDiscoveryDocument(e.userinfo_endpoint),t.length>0?(this.logger.error("error validating userinfo_endpoint in discovery document",t),!1):(t=this.validateUrlFromDiscoveryDocument(e.jwks_uri),t.length>0?(this.logger.error("error validating jwks_uri in discovery document",t),!1):(this.sessionChecksEnabled&&!e.check_session_iframe&&this.logger.warn("sessionChecksEnabled is activated but discovery document does not contain a check_session_iframe field"),!0)))))}fetchTokenUsingPasswordFlowAndLoadUserProfile(e,t,o=new q){return this.fetchTokenUsingPasswordFlow(e,t,o).then(()=>this.loadUserProfile())}loadUserProfile(){if(!this.hasValidAccessToken())throw new Error("Can not load User Profile without access_token");if(!this.validateUrlForHttps(this.userinfoEndpoint))throw new Error("userinfoEndpoint must use HTTPS (with TLS), or config value for property 'requireHttps' must be set to 'false' and allow HTTP (without TLS).");return new Promise((e,t)=>{let o=new q().set("Authorization","Bearer "+this.getAccessToken());this.http.get(this.userinfoEndpoint,{headers:o,observe:"response",responseType:"text"}).subscribe(n=>{if(this.debug("userinfo received",JSON.stringify(n)),n.headers.get("content-type").startsWith("application/json")){let s=JSON.parse(n.body),a=this.getIdentityClaims()||{};if(!this.skipSubjectCheck&&this.oidc&&(!a.sub||s.sub!==a.sub)){t(`if property oidc is true, the received user-id (sub) has to be the user-id of the user that has logged in with oidc. 2if you are not using oidc but just oauth2 password flow set oidc to fal
2se`);return}s=Object.assign({},a,s),this._storage.setItem("id_token_claims_obj",JSON.stringify(s)),this.eventsSubject.next(new H("user_profile_loaded")),e({info:s})}else this.debug("userinfo is not JSON, treating it as JWE/JWS"),this.eventsSubject.next(new H("user_profile_loaded")),e(JSON.parse(n.body))},n=>{this.logger.error("error loading user info",n),this.eventsSubject.next(new U("user_profile_load_error",n)),t(n)})})}fetchTokenUsingPasswordFlow(e,t,o=new q){let n={username:e,password:t};return this.fetchTokenUsingGrant("password",n,o)}fetchTokenUsingGrant(e,t,o=new q){this.assertUrlNotNullAndCorrectProtocol(this.tokenEndpoint,"tokenEndpoint");let n=new $e({encoder:new He}).set("grant_type",e).set("scope",this.scope);if(this.useHttpBasicAuth){let s=btoa(`${this.clientId}:${this.dummyClientSecret}`);o=o.set("Authorization","Basic "+s)}if(this.useHttpBasicAuth||(n=n.set("client_id",this.clientId)),!this.useHttpBasicAuth&&this.dummyClientSecret&&(n=n.set("client_secret",this.dummyClientSecret)),this.customQueryParams)for(let s of Object.getOwnPropertyNames(this.customQueryParams))n=n.set(s,this.customQueryParams[s]);for(let s of Object.keys(t))n=n.set(s,t[s]);return o=o.set("Content-Type","application/x-www-form-urlencoded"),new Promise((s,a)=>{this.http.post(this.tokenEndpoint,n,{headers:o}).subscribe(l=>{this.debug("tokenResponse",l),this.storeAccessTokenResponse(l.access_token,l.refresh_token,l.expires_in||this.fallbackAccessTokenExpirationTimeInSec,l.scope,this.extractRecognizedCustomParameters(l)),this.oidc&&l.id_token&&this.processIdToken(l.id_token,l.access_token).then(u=>{this.storeIdToken(u),s(l)}),this.eventsSubject.next(new H("token_received")),s(l)},l=>{this.logger.error("Error performing ${grantType} flow",l),this.eventsSubject.next(new U("token_error",l)),a(l)})})}refreshToken(){return this.assertUrlNotNullAndCorrectProtocol(this.tokenEndpoint,"tokenEndpoint"),new Promise((e,t)=>{let o=new $e({encoder:new He}).set("grant_type","refresh_token").set("scope",this.scope).set("refresh_token",this._storage.getItem("refresh_token")),n=new q().set("Content-Type","application/x-www-form-urlencoded");if(this.useHttpBasicAuth){let s=btoa(`${this.clientId}:${this.dummyClientSecret}`);n=n.set("Authorization","Basic "+s)}if(this.useHttpBasicAuth||(o=o.set("client_id",this.clientId)),!this.useHttpBasicAuth&&this.dummyClientSecret&&(o=o.set("client_secret",this.dummyClientSecret)),this.customQueryParams)for(let s of Object.getOwnPropertyNames(this.customQueryParams))o=o.set(s,this.customQueryParams[s]);this.http.post(this.tokenEndpoint,o,{headers:n}).pipe(Rt(s=>this.oidc&&s.id_token?bo(this.processIdToken(s.id_token,s.access_token,!0)).pipe(Ye(a=>this.storeIdToken(a)),g(()=>s)):w(s))).subscribe(s=>{this.debug("refresh tokenResponse",s),this.storeAccessTokenResponse(s.access_token,s.refresh_token,s.expires_in||this.fallbackAccessTokenExpirationTimeInSec,s.scope,this.extractRecognizedCustomParameters(s)),this.eventsSubject.next(new H("token_received")),this.eventsSubject.next(new H("token_refreshed")),e(s)},s=>{this.logger.error("Error refreshing token",s),this.eventsSubject.next(new U("token_refresh_error",s)),t(s)})})}removeSilentRefreshEventListener(){this.silentRefreshPostMessageEventListener&&(window.removeEventListener("message",this.silentRefreshPostMessageEventListener),this.silentRefreshPostMessageEventListener=null)}setupSilentRefreshEventListener(){this.removeSilentRefreshEventListener(),this.silentRefreshPostMessageEventListener=e=>{let t=this.processMessageEventMessage(e);this.checkOrigin&&e.origin!==location.origin&&console.error("wrong origin requested silent refresh!"),this.tryLogin({customHashFragment:t,preventClearHashAfterLogin:!0,customRedirectUri:this.silentRefreshRedirectUri||this.redirectUri}).catch(o=>this.debug("tryLogin during silent refresh failed",o))},window.addEventListener("message",this.silentRefreshPostMessageEventListener)}silentRefresh(e={},t=!0){let o=this.getIdentityClaims()||{};if(this.useIdTokenHintForSilentRefresh&&this.hasValidIdToken()&&(e.id_token_hint=this.getIdToken()),!this.validateUrlForHttps(this.loginUrl))throw new Error("loginUrl must use HTTPS (with TLS), or config value for property 'requireHttps' must be set to 'false' and allow HTTP (without TLS).");if(typeof this.document>"u")throw new Error("silent refresh is not supported on this platform");
2let n=this.document.getElementById(this.silentRefreshIFrameName);n&&this.document.body.removeChild(n),this.silentRefreshSubject=o.sub;let s=this.document.createElement("iframe");s.id=this.silentRefreshIFrameName,this.setupSilentRefreshEventListener();let a=this.silentRefreshRedirectUri||this.redirectUri;this.createLoginUrl(null,null,a,t,e).then(c=>{s.setAttribute("src",c),this.silentRefreshShowIFrame||(s.style.display="none"),this.document.body.appendChild(s)});let l=this.events.pipe(b(c=>c instanceof U),xe()),u=this.events.pipe(b(c=>c.type==="token_received"),xe()),p=w(new U("silent_refresh_timeout",null)).pipe(Dt(this.silentRefreshTimeout));return To([l,u,p]).pipe(g(c=>{if(c instanceof U)throw c.type==="silent_refresh_timeout"?this.eventsSubject.next(c):(c=new U("silent_refresh_error",c),this.eventsSubject.next(c)),c;return c.type==="token_received"&&(c=new H("silently_refreshed"),this.eventsSubject.next(c)),c})).toPromise()}initImplicitFlowInPopup(e){return this.initLoginFlowInPopup(e)}initLoginFlowInPopup(e){return e=e||{},this.createLoginUrl(null,null,this.silentRefreshRedirectUri,!1,{display:"popup"}).then(t=>new Promise((o,n)=>{let a=null;e.windowRef?e.windowRef&&!e.windowRef.closed&&(a=e.windowRef,a.location.href=t):a=window.open(t,"ngx-oauth2-oidc-login",this.calculatePopupFeatures(e));let l,u=y=>{this.tryLogin({customHashFragment:y,preventClearHashAfterLogin:!0,customRedirectUri:this.silentRefreshRedirectUri}).then(()=>{c(),o(!0)},S=>{c(),n(S)})},p=()=>{(!a||a.closed)&&(c(),n(new U("popup_closed",{})))};a?l=window.setInterval(p,500):n(new U("popup_blocked",{}));let c=()=>{window.clearInterval(l),window.removeEventListener("storage",m),window.removeEventListener("message",d),a!==null&&a.close(),a=null},d=y=>{let S=this.processMessageEventMessage(y);S&&S!==null?(window.removeEventListener("storage",m),u(S)):console.log("false event firing")},m=y=>{y.key==="auth_hash"&&(window.removeEventListener("message",d),u(y.newValue))};window.addEventListener("message",d),window.addEventListener("storage",m)}))}calculatePopupFeatures(e){let t=e.height||470,o=e.width||500,n=window.screenLeft+(window.outerWidth-o)/2,s=window.screenTop+(window.outerHeight-t)/2;return`location=no,toolbar=no,width=${o},height=${t},top=${s},left=${n}`}processMessageEventMessage(e){let t="#";if(this.silentRefreshMessagePrefix&&(t+=this.silentRefreshMessagePrefix),!e||!e.data||typeof e.data!="string")return;let o=e.data;if(o.startsWith(t))return"#"+o.substr(t.length)}canPerformSessionCheck(){return this.sessionChecksEnabled?this.sessionCheckIFrameUrl?this.get
2SessionState()?!(typeof this.document>"u"):(console.warn("sessionChecksEnabled is activated but there is no session_state"),!1):(console.warn("sessionChecksEnabled is activated but there is no sessionCheckIFrameUrl"),!1):!1}setupSessionCheckEventListener(){this.removeSessionCheckEventListener(),this.sessionCheckEventListener=e=>{let t=e.origin.toLowerCase(),o=this.issuer.toLowerCase();if(this.debug("sessionCheckEventListener"),!o.startsWith(t)){this.debug("sessionCheckEventListener","wrong origin",t,"expected",o,"event",e);return}switch(e.data){case"unchanged":this.ngZone.run(()=>{this.handleSessionUnchanged()});break;case"changed":this.ngZone.run(()=>{this.handleSessionChange()});break;case"error":this.ngZone.run(()=>{this.handleSessionError()});break}this.debug("got info from session check inframe",e)},this.ngZone.runOutsideAngular(()=>{window.addEventListener("message",this.sessionCheckEventListener)})}handleSessionUnchanged(){this.debug("session check","session unchanged"),this.eventsSubject.next(new ee("session_unchanged"))}handleSessionChange(){this.eventsSubject.next(new ee("session_changed")),this.stopSessionCheckTimer(),!this.useSilentRefresh&&this.responseType==="code"?this.refreshToken().then(()=>{this.debug("token refresh after session change worked")}).catch(()=>{this.debug("token refresh did not work after session changed"),this.eventsSubject.next(new ee("session_terminated")),this.logOut(!0)}):this.silentRefreshRedirectUri?(this.silentRefresh().catch(()=>this.debug("silent refresh failed after session changed")),this.waitForSilentRefreshAfterSessionChange()):(this.eventsSubject.next(new ee("session_terminated")),this.logOut(!0))}waitForSilentRefreshAfterSessionChange(){this.events.pipe(b(e=>e.type==="silently_refreshed"||e.type==="silent_refresh_timeout"||e.type==="silent_refresh_error"),xe()).subscribe(e=>{e.type!=="silently_refreshed"&&(this.debug("silent refresh did not work after session changed"),this.eventsSubject.next(new ee("session_terminated")),this.logOut(!0))})}handleSessionError(){this.stopSessionCheckTimer(),this.eventsSubject.next(new ee("session_error"))}removeSessionCheckEventListener(){this.sessionCheckEventListener&&(window.removeEventListener("message",this.sessionCheckEventListener),this.sessionCheckEventListener=null)}initSessionCheck(){if(!this.canPerformSessionCheck())return;let e=this.document.getElementById(this.sessionCheckIFrameName);e&&this.document.body.removeChild(e);let t=this.document.createElement("iframe");t.id=this.sessionCheckIFrameName,this.setupSessionCheckEventListener();let o=this.sessionCheckIFrameUrl;t.setAttribute("src",o),t.style.display="none",this.document.body.appendChild(t),this.startSessionCheckTimer()}startSessionCheckTimer(){this.stopSessionCheckTimer(),this.ngZone.runOutsideAngular(()=>{this.sessionCheckTimer=setInterval(this.checkSession.bind(this),this.sessionCheckIntervall)})}stopSessionCheckTimer(){this.sessionCheckTimer&&(clearInterval(this.sessionCheckTimer),this.sessionCheckTimer=null)}checkSession(){let e=this.document.getElementById(this.sessionCheckIFrameName);e||this.logger.warn("checkSession did not find iframe",this.sessionCheckIFrameName);let t=this.getSessionState();t||this.stopSessionCheckTimer();let o=this.clientId+" "+t;e.contentWindow.postMessage(o,this.issuer)}
2createLoginUrl(){return oe(this,arguments,function*(e="",t="",o="",n=!1,s={}){let a=this,l;o?l=o:l=this.redirectUri;let u=yield this.createAndSaveNonce();if(e?e=u+this.config.nonceStateSeparator+encodeURIComponent(e):e=u,!this.requestAccessToken&&!this.oidc)throw new Error("Either requestAccessToken or oidc or both must be true");this.config.responseType?this.responseType=this.config.responseType:this.oidc&&this.requestAccessToken?this.responseType="id_token token":this.oidc&&!this.requestAccessToken?this.responseType="id_token":this.responseType="token";let p=a.loginUrl.indexOf("?")>-1?"&":"?",c=a.scope;this.oidc&&!c.match(/(^|\s)openid($|\s)/)&&(c="openid "+c);let d=a.loginUrl+p+"response_type="+encodeURIComponent(a.responseType)+"&client_id="+encodeURIComponent(a.clientId)+"&state="+encodeURIComponent(e)+"&redirect_uri="+encodeURIComponent(l)+"&scope="+encodeURIComponent(c);if(this.responseType.includes("code")&&!this.disablePKCE){let[m,y]=yield this.createChallangeVerifierPairForPKCE();this.saveNoncesInLocalStorage&&typeof window.localStorage<"u"?localStorage.setItem("PKCE_verifier",y):this._storage.setItem("PKCE_verifier",y),d+="&code_challenge="+m,d+="&code_challenge_method=S256"}t&&(d+="&login_hint="+encodeURIComponent(t)),a.resource&&(d+="&resource="+encodeURIComponent(a.resource)),a.oidc&&(d+="&nonce="+encodeURIComponent(u)),n&&(d+="&prompt=none");for(let m of Object.keys(s))d+="&"+encodeURIComponent(m)+"="+encodeURIComponent(s[m]);if(this.customQueryParams)for(let m of Object.getOwnPropertyNames(this.customQueryParams))d+="&"+m+"="+encodeURIComponent(this.customQueryParams[m]);return d})}initImplicitFlowInternal(e="",t=""){if(this.inImplicitFlow)return;if(this.inImplicitFlow=!0,!this.validateUrlForHttps(this.loginUrl))throw new Error("loginUrl must use HTTPS (with TLS), or config value for property 'requireHttps' must be set to 'false' and allow HTTP (without TLS).");let o={},n=null;typeof t=="string"?n=t:typeof t=="object"&&(o=t),this.createLoginUrl(e,n,null,!1,o).then(this.config.openUri).catch(s=>{console.error("Error in initImplicitFlow",s),this.inImplicitFlow=!1})}initImplicitFlow(e="",t=""){this.loginUrl!==""?this.initImplicitFlowInternal(e,t):this.events.pipe(b(o=>o.type==="discovery_document_loaded")).subscribe(()=>this.initImplicitFlowInternal(e,t))}resetImplicitFlow(){this.inImplicitFlow=!1}callOnTokenReceivedIfExists(e){let t=this;if(e.onTokenReceived){let o={idClaims:t.getIdentityClaims(),idToken:t.getIdToken(),accessToken:t.getAccessToken(),state:t.state};e.onTokenReceived(o)}}storeAccessTokenResponse(e,t,o,n,s){if(this._storage.setItem("access_token",e),n&&!Array.isArray(n)?this._storage.setItem("granted_scopes",JSON.stringify(n.split(" "))):n&&Array.isArray(n)&&this._storage.setItem("granted_scopes",JSON.stringify(n)),this._storage.setItem("access_token_stored_at",""+this.dateTimeService.n
2ow()),o){let a=o*1e3,u=this.dateTimeService.new().getTime()+a;this._storage.setItem("expires_at",""+u)}t&&this._storage.setItem("refresh_token",t),s&&s.forEach((a,l)=>{this._storage.setItem(l,a)})}tryLogin(e=null){return this.config.responseType==="code"?this.tryLoginCodeFlow(e).then(()=>!0):this.tryLoginImplicitFlow(e)}parseQueryString(e){return!e||e.length===0?{}:(e.charAt(0)==="?"&&(e=e.substr(1)),this.urlHelper.parseQueryString(e))}tryLoginCodeFlow(e=null){return oe(this,null,function*(){e=e||{};let t=e.customHashFragment?e.customHashFragment.substring(1):window.location.search,o=this.getCodePartsFromUrl(t),n=o.code,s=o.state,a=o.session_state;if(!e.preventClearHashAfterLogin){let p=location.origin+location.pathname+location.search.replace(/code=[^&$]*/,"").replace(/scope=[^&$]*/,"").replace(/state=[^&$]*/,"").replace(/session_state=[^&$]*/,"").replace(/^\?&/,"?").replace(/&$/,"").replace(/^\?$/,"").replace(/&+/g,"&").replace(/\?&/,"?").replace(/\?$/,"")+location.hash;history.replaceState(null,window.name,p)}let[l,u]=this.parseState(s);if(this.state=u,o.error){this.debug("error trying to login"),this.handleLoginError(e,o);let p=new U("code_error",{},o);return this.eventsSubject.next(p),Promise.reject(p)}if(!e.disableNonceCheck){if(!l)return this.saveRequestedRoute(),Promise.resolve();if(!e.disableOAuth2StateCheck&&!this.validateNonce(l)){let c=new U("invalid_nonce_in_state",null);return this.eventsSubject.next(c),Promise.reject(c)}}return this.storeSessionState(a),n&&(yield this.getTokenFromCode(n,e),this.restoreRequestedRoute()),Promise.resolve()})}saveRequestedRoute(){this.config.preserveRequestedRoute&&this._storage.setItem("requested_route",window.location.pathname+window.location.search)}restoreRequestedRoute(){let e=this._storage.getItem("requested_route");e&&history.replaceState(null,"",window.location.origin+e)}getCodePartsFromUrl(e){return!e||e.length===0?this.urlHelper.getHashFragmentParams():(e.charAt(0)==="?"&&(e=e.substr(1)),this.urlHelper.parseQueryString(e))}getTokenFromCode(e,t){let o=new $e({encoder:new He}).set("grant_type","authorization_code").set("code",e).set("redirect_uri",t.customRedirectUri||this.redirectUri);if(!this.disablePKCE){let n;this.saveNoncesInLocalStorage&&typeof window.localStorage<"u"?n=localStorage.getItem("PKCE_verifier"):n=this._storage.getItem("PKCE_verifier"),n?o=o.set("code_verifier",n):console.warn("No PKCE verifier found in oauth storage!")}return this.fetchAndProcessToken(o,t)}fetchAndProcessToken(e,t){t=t||{},this.assertUrlNotNullAndCorrectProtocol(this.tokenEndpoint,"tokenEndpoint");let o=new q().set("Content-Type","application/x-www-form-urlencoded");if(this.useHttpBasicAuth){let n=btoa(`${this.clientId}:${this.dummyClientSecret}`);o=o.set("Authorization","Basic "+n)}return this.useHttpBasicAuth||(e=e.set("client_id",this.clientId)),!this.useHttpBasicAuth&&this.dummyClientSecret&&(e=e.set("client_secret",this.dummyClientSecret)),new Promise((n,s)=>{if(this.customQueryParams)for(let a of Object.getOwnPropertyNames(this.customQueryParams))e=e.set(a,this.customQueryParams[a]);this.http.post(this.tokenEndpoint,e,{headers:o}).subscribe(a=>{this.debug("refresh tokenResponse",a),this.storeAccessTokenResponse(a.access_token,a.refresh_token,a.expires_in||this.fallbackAccessTokenExpirationTimeInSec,a.scope,this.extractRecognizedCustomParameters(a)),this.oidc&&a.id_token?this.processIdToken(a.id_token,a.access_token,t.disableNonceCheck).then(l=>{this.storeIdToken(l),this.eventsSubject.next(new H("token_received")),this.eventsSubject.next(new H("token_refreshed")),n(a)}).catch(l=>{this.eventsSubject.next(new U("token_validation_error",l)),console.error("Error validating tokens"),console.error(l),s(l)}):(this.eventsSubject.next(new H("token_received")),this.eventsSubject.next(new H("token_refreshed")),n(a))},a=>{console.error("Error getting token",a),this.eventsSubject.next(new U("token_refresh_error",a)),s(a)})})}tryLoginImplicitFlow(e=null){e=e||{};let t;e.customHashFragment?t=this.urlHelper.getHashFragmentParams(e.customHashFragment):t=this.urlHelper.getHashFragmentParams(),this.debug("parsed url",t);let o=t.state,[n,s]=this.parseState(o);if(this.state=s,t.error){this.debug("error trying to login"),this.handleLoginError(e,t);let c=new U("token_error",{},t);return this.eventsSubject.next(c),Promise.reject(c)}
2let a=t.access_token,l=t.id_token,u=t.session_state,p=t.scope;if(!this.requestAccessToken&&!this.oidc)return Promise.reject("Either requestAccessToken or oidc (or both) must be true.");if(this.requestAccessToken&&!a||this.requestAccessToken&&!e.disableOAuth2StateCheck&&!o||this.oidc&&!l)return Promise.resolve(!1);if(this.sessionChecksEnabled&&!u&&this.logger.warn("session checks (Session Status Change Notification) were activated in the configuration but the id_token does not contain a session_state claim"),this.requestAccessToken&&!e.disableNonceCheck&&!this.validateNonce(n)){let d=new U("invalid_nonce_in_state",null);return this.eventsSubject.next(d),Promise.reject(d)}return this.requestAccessToken&&this.storeAccessTokenResponse(a,null,t.expires_in||this.fallbackAccessTokenExpirationTimeInSec,p),this.oidc?this.processIdToken(l,a,e.disableNonceCheck).then(c=>e.validationHandler?e.validationHandler({accessToken:a,idClaims:c.idTokenClaims,idToken:c.idToken,state:o}).then(()=>c):c).then(c=>(this.storeIdToken(c),this.storeSessionState(u),this.clearHashAfterLogin&&!e.preventClearHashAfterLogin&&this.clearLocationHash(),this.eventsSubject.next(new H("token_received")),this.callOnTokenReceivedIfExists(e),this.inImplicitFlow=!1,!0)).catch(c=>(this.eventsSubject.next(new U("token_validation_error",c)),this.logger.error("Error validating tokens"),this.logger.error(c),Promise.reject(c))):(this.eventsSubject.next(new H("token_received")),this.clearHashAfterLogin&&!e.preventClearHashAfterLogin&&this.clearLocationHash(),this.callOnTokenReceivedIfExists(e),Promise.resolve(!0))}parseState(e){let t=e,o="";if(e){let n=e.indexOf(this.config.nonceStateSeparator);n>-1&&(t=e.substr(0,n),o=e.substr(n+this.config.nonceStateSeparator.length))}return[t,o]}validateNonce(e){let t;return this.saveNoncesInLocalStorage&&typeof window.localStorage<"u"?t=localStorage.getItem("nonce"):t=this._storage.getItem("nonce"),t!==e?(console.error("Validating access_token failed, wrong state/nonce.",t,e),!1):!0}storeIdToken(e){this._storage.setItem("id_token",e.idToken),this._storage.setItem("id_token_claims_obj",e.idTokenClaimsJson),this._storage.setItem("id_token_expires_at",""+e.idTokenExpiresAt),this._storage.setItem("id_token_stored_at",""+this.dateTimeService.n
2ow())}storeSessionState(e){this._storage.setItem("session_state",e)}getSessionState(){return this._storage.getItem("session_state")}handleLoginError(e,t){e.onLoginError&&e.onLoginError(t),this.clearHashAfterLogin&&!e.preventClearHashAfterLogin&&this.clearLocationHash()}getClockSkewInMsec(e=6e5){return!this.clockSkewInSec&&this.clockSkewInSec!==0?e:this.clockSkewInSec*1e3}processIdToken(e,t,o=!1){let n=e.split("."),s=this.padBase64(n[0]),a=Qo(s),l=JSON.parse(a),u=this.padBase64(n[1]),p=Qo(u),c=JSON.parse(p),d;if(this.saveNoncesInLocalStorage&&typeof window.localStorage<"u"?d=localStorage.getItem("nonce"):d=this._storage.getItem("nonce"),Array.isArray(c.aud)){if(c.aud.every(v=>v!==this.clientId)){let v="Wrong audience: "+c.aud.join(",");return this.logger.warn(v),Promise.reject(v)}}else if(c.aud!==this.clientId){let v="Wrong audience: "+c.aud;return this.logger.warn(v),Promise.reject(v)}if(!c.sub){let v="No sub claim in id_token";return this.logger.warn(v),Promise.reject(v)}if(this.sessionChecksEnabled&&this.silentRefreshSubject&&this.silentRefreshSubject!==c.sub){let v=`After refreshing, we got an id_token for another user (sub). Expected sub: ${this.silentRefreshSubject}, received sub: ${c.sub}`;return this.logger.warn(v),Promise.reject(v)}if(!c.iat){let v="No iat claim in id_token";return this.logger.warn(v),Promise.reject(v)}if(!this.skipIssuerCheck&&c.iss!==this.issuer){let v="Wrong issuer: "+c.iss;return this.logger.warn(v),Promise.reject(v)}if(!o&&c.nonce!==d){let v="Wrong nonce: "+c.nonce;return this.logger.warn(v),Promise.reject(v)}if(Object.prototype.hasOwnProperty.call(this,"responseType")&&(this.responseType==="code"||this.responseType==="id_token")&&(this.disableAtHashCheck=!0),!this.disableAtHashCheck&&this.requestAccessToken&&!c.at_hash){let v="An at_hash is needed!";return this.logger.warn(v),Promise.reject(v)}
2let m=this.dateTimeService.now(),y=c.iat*1e3,S=c.exp*1e3,I=this.getClockSkewInMsec();if(y-I>=m||S+I-this.decreaseExpirationBySec<=m){let v="Token has expired";return console.error(v),console.error({now:m,issuedAtMSec:y,expiresAtMSec:S}),Promise.reject(v)}let E={accessToken:t,idToken:e,jwks:this.jwks,idTokenClaims:c,idTokenHeader:l,loadKeys:()=>this.loadJwks()};return this.disableAtHashCheck?this.checkSignature(E).then(()=>({idToken:e,idTokenClaims:c,idTokenClaimsJson:p,idTokenHeader:l,idTokenHeaderJson:a,idTokenExpiresAt:S})):this.checkAtHash(E).then(v=>{if(!this.disableAtHashCheck&&this.requestAccessToken&&!v){let Re="Wrong at_hash";return this.logger.warn(Re),Promise.reject(Re)}return this.checkSignature(E).then(()=>{let Re=!this.disableAtHashCheck,Ne={idToken:e,idTokenClaims:c,idTokenClaimsJson:p,idTokenHeader:l,idTokenHeaderJson:a,idTokenExpiresAt:S};return Re?this.checkAtHash(E).then(We=>{if(this.requestAccessToken&&!We){let po="Wrong at_hash";return this.logger.warn(po),Promise.reject(po)}else return Ne}):Ne})})}getIdentityClaims(){let e=this._storage.getItem("id_token_claims_obj");return e?JSON.parse(e):null}getGrantedScopes(){let e=this._storage.getItem("granted_scopes");return e?JSON.parse(e):null}getIdToken(){return this._storage?this._storage.getItem("id_token"):null}padBase64(e){for(;e.length%4!==0;)e+="=";return e}getAccessToken(){return this._storage?this._storage.getItem("access_token"):null}getRefreshToken(){return this._storage?this._storage.getItem("refresh_token"):null}getAccessTokenExpiration(){return this._storage.getItem("expires_at")?parseInt(this._storage.getItem("expires_at"),10):null}getAccessTokenStoredAt(){return parseInt(this._storage.getItem("access_token_stored_at"),10)}getIdTokenStoredAt(){return parseInt(this._storage.getItem("id_token_stored_at"),10)}getIdTokenExpiration(){return this._storage.getItem("id_token_expires_at")?parseInt(this._storage.getItem("id_token_expires_at"),10):null}hasValidAccessToken(){if(this.getAccessToken()){let e=this._storage.getItem("expires_at"),t=this.dateTimeService.new();return!(e&&parseInt(e,10)-this.decreaseExpirationBySec<t.getTime()-this.getClockSkewInMsec())}return!1}hasValidIdToken(){if(this.getIdToken()){let e=this._storage.getItem("id_token_expires_at"),t=this.dateTimeService.new();return!(e&&parseInt(e,10)-this.decreaseExpirationBySec<t.getTime()-this.getClockSkewInMsec())}return!1}getCustomTokenResponseProperty(e){return this._storage&&this.config.customTokenParameters&&this.config.customTokenParameters.indexOf(e)>=0&&this._storage.getItem(e)!==null?JSON.parse(this._storage.getItem(e)):null}authorizationHeader(){return"Bearer "+this.getAccessToken()}logOut(e={},t=""){let o=!1;typeof e=="boolean"&&(o=e,e={});let n=this.getIdToken();if(this._storage.removeItem("access_token"),this._storage.removeItem("id_token"),this._storage.removeItem("refresh_token"),this.saveNoncesInLocalStorage?(localStorage.removeItem("nonce"),localStorage.removeItem("PKCE_verifier")):(this._storage.removeItem("nonce"),this._storage.removeItem("PKCE_verifier")),this._storage.removeItem("expires_at"),this._storage.removeItem("id_token_claims_obj"),this._storage.removeItem("id_token_expires_at"),this._storage.removeItem("id_token_stored_at"),this._storage.removeItem("access_token_stored_at"),this._storage.removeItem("granted_scopes"),this._storage.removeItem("session_state"),this.config.customTokenParameters&&this.config.customTokenParameters.forEach(a=>this._storage.removeItem(a)),this.silentRefreshSubject=null,this.eventsSubject.next(new ee("logout")),!this.logoutUrl||o)return;let s;if(!this.validateUrlForHttps(this.logoutUrl))throw new Error("logoutUrl must use HTTPS (with TLS), or config value for property 'requireHttps' must be set to 'false' and allow HTTP (without TLS).");if(this.logoutUrl.indexOf("{{")>-1)s=this.logoutUrl.replace(/\{\{id_token\}\}/,encodeURIComponent(n)).replace(/\{\{client_id\}\}/,encodeURIComponent(this.clientId));else{let a=new $e({encoder:new He});n&&(a=a.set("id_token_hint",n));let l=this.postLogoutRedirectUri||this.redirectUriAsPostLogoutRedirectUriFallback&&this.redirectUri||"";l&&(a=a.set("post_logout_redirect_uri",l),t&&(a=a.set("state",t)));for(let u in e)a=a.set(u,e[u]);s=this.logoutUrl+(this.logoutUrl.indexOf("?")>-1?"&":"?")+a.toString()}this.config.openUri(s)}createAndSaveNonce(){let e=this;return this.createNonce().then(function(t){return e.saveNoncesInLocalStorage&&typeof window.localStorage<"u"?localStorage.setItem("nonce",t):e._storage.setItem("nonce",t),t})}ngOnDestroy(){this.clearAccessTokenTimer(),this.clearIdTokenTimer(),this.removeSilentRefreshEventListener();
2let e=this.document.getElementById(this.silentRefreshIFrameName);e&&e.remove(),this.stopSessionCheckTimer(),this.removeSessionCheckEventListener();let t=this.document.getElementById(this.sessionCheckIFrameName);t&&t.remove()}createNonce(){return new Promise(e=>{if(this.rngUrl)throw new Error("createNonce with rng-web-api has not been implemented so far");let t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",o=45,n="",s=typeof self>"u"?null:self.crypto||self.msCrypto;if(s){let a=new Uint8Array(o);s.getRandomValues(a),a.map||(a.map=Array.prototype.map),a=a.map(l=>t.charCodeAt(l%t.length)),n=String.fromCharCode.apply(null,a)}else for(;0<o--;)n+=t[Math.random()*t.length|0];e(Zo(n))})}checkAtHash(e){return oe(this,null,function*(){return this.tokenValidationHandler?this.tokenValidationHandler.validateAtHash(e):(this.logger.warn("No tokenValidationHandler configured. Cannot check at_hash."),!0)})}checkSignature(e){return this.tokenValidationHandler?this.tokenValidationHandler.validateSignature(e):(this.logger.warn("No tokenValidationHandler configured. Cannot check signature."),Promise.resolve(null))}initLoginFlow(e="",t={}){return this.responseType==="code"?this.initCodeFlow(e,t):this.initImplicitFlow(e,t)}initCodeFlow(e="",t={}){this.loginUrl!==""?this.initCodeFlowInternal(e,t):this.events.pipe(b(o=>o.type==="discovery_document_loaded")).subscribe(()=>this.initCodeFlowInternal(e,t))}initCodeFlowInternal(e="",t={}){if(!this.validateUrlForHttps(this.loginUrl))throw new Error("loginUrl must use HTTPS (with TLS), or config value for property 'requireHttps' must be set to 'false' and allow HTTP (without TLS).");let o={},n=null;typeof t=="string"?n=t:typeof t=="object"&&(o=t),this.createLoginUrl(e,n,null,!1,o).then(this.config.openUri).catch(s=>{console.error("Error in initAuthorizationCodeFlow"),console.error(s)})}createChallangeVerifierPairForPKCE(){return oe(this,null,function*(){if(!this.crypto)throw new Error("PKCE support for code flow needs a CryptoHander. Did you import the OAuthModule using forRoot() ?");let e=yield this.createNonce(),t=yield this.crypto.calcHash(e,"sha-256");return[Zo(t),e]})}extractRecognizedCustomParameters(e){let t=new Map;return this.config.customTokenParameters&&this.config.customTokenParameters.forEach(o=>{e[o]&&t.set(o,JSON.stringify(e[o]))}),t}revokeTokenAndLogout(e={},t=!1){let o=this.revocationEndpoint,n=this.getAccessToken(),s=this.getRefreshToken();if(!n)return Promise.resolve();let a=new $e({encoder:new He}),l=new q().set("Content-Type","application/x-www-form-urlencoded");if(this.useHttpBasicAuth){let u=btoa(`${this.clientId}:${this.dummyClientSecret}`);l=l.set("Authorization","Basic "+u)}if(this.useHttpBasicAuth||(a=a.set("client_id",this.clientId)),!this.useHttpBasicAuth&&this.dummyClientSecret&&(a=a.set("client_secret",this.dummyClientSecret)),this.customQueryParams)for(let u of Object.getOwnPropertyNames(this.customQueryParams))a=a.set(u,this.customQueryParams[u]);return new Promise((u,p)=>{let c,d;if(n){let m=a.set("token",n).set("token_type_hint","access_token");c=this.http.post(o,m,{headers:l})}else c=w(null);if(s){let m=a.set("token",s).set("token_type_hint","refresh_token");d=this.http.post(o,m,{headers:l})}else d=w(null);t&&(c=c.pipe(F(m=>m.status===0?w(null):ve(m))),d=d.pipe(F(m=>m.status===0?w(null):ve(m)))),Je([c,d]).subscribe(m=>{this.logOut(e),u(m),this.logger.info("Token successfully revoked")},m=>{this.logger.error("Error revoking token",m),this.eventsSubject.next(new U("token_revoke_error",m)),p(m)})})}clearLocationHash(){location.hash!=""&&(location.hash="")}static{this.\u0275fac=function(t){return new(t||r)(j(Eo),j(pe),j(qt,8),j(zt,8),j(rt,8),j(Xo),j(Kt),j(Wt,8),j(Xe),j(At))}}static{this.\u0275prov=x({token:r,factory:r.\u0275fac})}}return r})(),Vt=class{},Xr=class{handleError(i){return ve(i)}},Sa=(()=>{class r{constructor(e,t,o){this.oAuthService=e,this.errorHandler=t,this.moduleConfig=o}checkUrl(e){return this.moduleConfig.resourceServer.customUrlValidation?this.moduleConfig.resourceServer.customUrlValidation(e):this.moduleConfig.resourceServer.allowedUrls?!!this.moduleConfig.resourceServer.allowedUrls.find(t=>e.toLowerCase().startsWith(t.toLowerCase())):!0}intercept(e,t){let o=e.url.toLowerCase();return!this.moduleConfig||!this.moduleConfig.resourceServer||!this.checkUrl(o)?t.handle(e):this.moduleConfig.resourceServer.sendAccessToken?wo(w(this.oAuthService.getAccessToken()).pipe(b(s=>!!s)),this.oAuthService.events.pipe(b(s=>s.type==="token_received"),xo(this.oAuthService.waitForTokenInMsec||0),F(()=>w(null)),g(()=>this.oAuthService.getAccessToken()))).pipe(Lt(1),So(s=>{if(s){let a="Bearer "+s,l=e.headers.set("Authorization",a);e=e.clone({headers:l})}return t.handle(e).pipe(F(a=>this.errorHandler.handleError(a)))})):t.handle(e).pipe(F(s=>this.errorHandler.handleError(s)))}static{this.\u0275fac=function(t){return new(t||r)(j(ot),j(Vt),j(Gt,8))}}static{this.\u0275prov=x({token:r,factory:r.\u0275fac})}}return r})();function wa(){return console}function Ta(){return typeof sessionStorage<"u"?sessionStorage:new ha}function Ca(r=null,i=Bt){return _o([ot,Xo,{provide:Kt,useFactory:wa},{provide:qt,useFactory:Ta},{provide:zt,useClass:i},{provide:Wt,useClass:xa},{provide:Vt,useClass:Xr},{provide:Gt,useValue:r},{provide:Fo,useClass:Sa,multi:!0},{provide:At,useClass:da}])}var sm=(()=>{class r{static forRoot(e=null,t=Bt){return{ngModule:r,providers:[Ca(e,t)]}}static{this.\u0275fac=function(t){return new(t||r)}}static{this.\u0275mod=ko({type:r})}static{this.\u0275inj=Ao({imports:[jo]})}}return r})();var am=new Po("AUTH_CONFIG");var ae=(()=>
2{class r{constructor(){this.global=h(se),this.http=h(pe),this.oauthService=h(ot),this.domain=h($),this.apiUrl="",this.apiKey="149a00ac-2268-4cc5-9569-79c3a1fb4ed6",this.request_options={headers:new q,params:{},body:{},withCredentials:!0},this.request_url="",this.endpoint="",this.serializeQueryParameters=function(e){let t=[];for(let o of Object.keys(e)){let n=e[o];if(Array.isArray(n))for(let s of n)t.push(encodeURIComponent(o)+"="+encodeURIComponent(s));else t.push(encodeURIComponent(o)+"="+encodeURIComponent(e[o]))}return t.join("&")},this.apiUrl=Q.apiUrl}setEndpoint(e){this.endpoint=e}getEndpoint(){return this.endpoint}GET(e=null,t=null,o=!1){this.generateRequestURL(e);let n={Authorization:"Bearer "+this.oauthService.getAccessToken()};t!==null&&t!==""&&(n["X-Region"]=t),o&&(n["Api-Key"]=this.apiKey);let a={headers:new q(n),withCredentials:!1};return this.http.get(this.request_url,a).pipe(F(this.handleError))}POST(e=null){this.generateRequestURL();let o={headers:new q().set("Authorization","Bearer "+this.oauthService.getAccessToken()),withCredentials:!1};return this.http.post(this.request_url,e,o).pipe(F(this.handleError))}PUT(e){this.generateRequestURL();let o={headers:new q().set("Authorization","Bearer "+this.oauthService.getAccessToken()),withCredentials:!1};return this.http.put(this.request_url,e,o)}DELETE(){this.generateRequestURL();let t={headers:new q().set("Authorization","Bearer "+this.oauthService.getAccessToken()),withCredentials:!1};return this.http.delete(this.request_url,t)}downloadLink(){this.generateRequestURL();let e="export";fetch(this.request_url,{headers:this.getDownloadHeaders(),credentials:"same-origin"}).then(function(t){return e=t.headers.get("Content-Disposition").split(";")[1].split("=")[1].replace(new RegExp('"',"g"),""),t.blob()}).then(t=>{this.saveData(t,e)}).catch(t=>{console.log(t)})}saveData(e,t){let o=document.createElement("a");document.body.appendChild(o),o.style.display="none";let n=window.URL.createObjectURL(e);o.href=n,o.download=t,o.click(),window.URL.revokeObjectURL(n),o.remove()}handleError(e){return e.error instanceof ErrorEvent?console.error("An error occurred:",e.error.message):console.error(`Server returned code ${e.status}, body was: ${e.error}`),ve(e)}generateRequestURL(e=null){let t=this.apiUrl;if(t+="/"+this.endpoint+"/",e){let o=this.serializeQueryParameters(e);t=t+"?"+o}this.request_url=t}getApiUrl(){return this.apiUrl}getUploadHeaders(){return{Authorization:"Bearer "+this.oauthService.getAccessToken()}}getDownloadHeaders(){return{Authorization:"Bearer "+this.oauthService.getAccessToken(),Accept:"application/json"}}static{this.\u0275fac=function(t){return new(t||r)}}static{this.\u0275prov=x({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();function f(r){return typeof r>"u"||r===""||r===null||r.length===0}function xm(r,i){if(!i)return!1;let e=i.length;if(e==0)return!1;for(let t=0;t<e;t++)if(i[t]===r)return!0;return!1}function Sm(r,i=1){if(!r)return;let e=[],t=0,o=0;for(let n of r)e.hasOwnProperty(o)||(e[o]=[]),e[o].push(n),t++,t>=i&&(o++,t=0);return e}function Jt(r,i){return r.sort((e,t)=>{let o=e[i],n=t[i];return o=o&&o.toLowerCase(),n=n&&n.toLowerCase(),o<n?-1:o>n?1:0}),r}var ei=(()=>{class r{constructor(){this.http=h(pe),this.handler=h(Oo),this.domain=h($),this.statisticsObject={numberOfStudents:0,numberOfCompanies:0,numberOfJobPostings:0},this.instagramFeedData=[];let e=this.handler;this.http=new pe(e),this.loadStatistics()}loadStatistics(){let e=this.domain.getCurrentRegion().toLowerCase(),t=Q.statisticsBaseUrl+"/statistics.json";!f(e)&&e!="EU"&&(t=t=Q.statisticsBaseUrl+"/statistics-"+e+".json"),this.http.get(t).subscribe(o=>{o.hasOwnProperty("numberOfStudents")&&(this.statisticsObject=Object.assign(this.statisticsObject,o))})}getStatistics(){let e=this.domain.getCurrentRegion().toLowerCase(),t=Q.statisticsBaseUrl+"/statistics.json";return!f(e)&&e!="EU"&&(t=t=Q.statisticsBaseUrl+"/statistics-"+e+".json"),this.http.get(t)}static{this.\u0275fac=function(t){return new(t||r)}}static{this.\u0275prov=x({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var $r={New:"New",Active:"Active",Inactive:"Inactive"},ti=(()=>
2{class r{constructor(){this.global=h(se),this.alertService=h(tt),this.api=h(ae),this.feed=h(ei),this.homeData=[],this.$homeDataSubject=new je,this.amountEmployeesList=[{value:"0-5",label:"0-5"},{value:"5-10",label:"5-10"},{value:"10-20",label:"10-20"},{value:"20-50",label:"20-50"},{value:"50-100",label:"50-100"},{value:"100",label:"100 or more"}]}getHomeData(){return this.homeData}setHomeData(){if(this.homeData.length==0){let e=1,t=1,o=20;this.feed.getStatistics().subscribe(n=>{if(n.hasOwnProperty("numberOfCompanies")){let s=parseInt(n.numberOfCompanies,10);e=Math.ceil(s/o),t=this.getRandomNumberBetween(1,e);let a={pageNumber:t,pageSize:o};this.apiGetCompanies(a).subscribe(l=>{l&&l.hasOwnProperty("data")&&(this.homeData=Object.assign([],l.data),this.$homeDataSubject.next(!0))})}})}}getAmountEmployeesList(){return this.amountEmployeesList}getCompanyStatuses(){return[{value:$r.New,name:"New"},{value:$r.Active,name:"Active"},{value:$r.Inactive,name:"Inactive"}]}apiGetCompanyCurrent(){return this.api.setEndpoint("company/current"),this.api.GET()}apiGetCompanyProfile(e){return this.api.setEndpoint("company/"+e),this.api.GET()}apiCreateCompanyprofile(e){let t={name:e.name,status:e.status,registrationNumber:e.registrationNumber,visitAddress:{street:e.visitAddress.street,number:e.visitAddress.number,numberSuffix:e.visitAddress.numberSuffix,postalCode:e.visitAddress.postalCode,city:e.visitAddress.city,country:e.visitAddress.country},description:e.description,descriptionEn:e.descriptionEn,descriptionDe:e.descriptionDe,descriptionFr:e.descriptionFr,descriptionPt:e.descriptionPt,educationLevels:e.educationLevels,uniqueText:e.uniqueText,uniqueTextEn:e.uniqueTextEn,uniqueTextDe:e.uniqueTextDe,uniqueTextFr:e.uniqueTextFr,uniqueTextPt:e.uniqueTextPt,opportunitiesText:e.opportunitiesText,opportunitiesTextEn:e.opportunitiesTextEn,opportunitiesTextDe:e.opportunitiesTextDe,opportunitiesTextFr:e.opportunitiesTextFr,opportunitiesTextPt:e.opportunitiesTextPt,phoneNumber:e.phoneNumber,sectorId:e.sectorId,sectorName:e.sectorName,numberOfEmployees:f(e.numberOfEmployees)?null:parseInt(e.numberOfEmployees,10),websiteUri:e.websiteUri,facebookUri:e.facebookUri,instagramUri:e.instagramUri,linkedInUri:e.linkedInUri,twitterUri:e.twitterUri,googleUri:e.googleUri,areaOfInterests:e.areaOfInterests,regions:e.regions};return this.api.setEndpoint("company"),this.api.POST(t)}apiUpdateCompanyprofile(e,t){let o={id:t.id,name:t.name,status:t.status,registrationNumber:t.registrationNumber,visitAddress:{street:t.visitAddress.street,number:t.visitAddress.number,numberSuffix:t.visitAddress.numberSuffix,postalCode:t.visitAddress.postalCode,city:t.visitAddress.city,country:t.visitAddress.country},description:t.description,descriptionEn:t.descriptionEn,descriptionDe:t.descriptionDe,descriptionFr:t.descriptionFr,descriptionPt:t.descriptionPt,educationLevels:t.educationLevels,uniqueText:t.uniqueText,uniqueTextEn:t.uniqueTextEn,uniqueTextDe:t.uniqueTextDe,uniqueTextFr:t.uniqueTextFr,uniqueTextPt:t.uniqueTextPt,opportunitiesText:t.opportunitiesText,opportunitiesTextEn:t.opportunitiesTextEn,opportunitiesTextDe:t.opportunitiesTextDe,opportunitiesTextFr:t.opportunitiesTextFr,opportunitiesTextPt:t.opportunitiesTextPt,phoneNumber:t.phoneNumber,sectorId:t.sectorId,sectorName:t.sectorName,numberOfEmployees:f(t.numberOfEmployees)?null:parseInt(t.numberOfEmployees,10),websiteUri:t.websiteUri,facebookUri:t.facebookUri,instagramUri:t.instagramUri,linkedInUri:t.linkedInUri,twitterUri:t.twitterUri,googleUri:t.googleUri,areaOfInterests:t.areaOfInterests,regions:t.regions};return this.api.setEndpoint("company/"+e),this.api.PUT(o)}apiGetTrademarks(e){return this.api.setEndpoint("company/"+e+"/trademarks"),this.api.GET()}apiAddTrademark(e,t){let o={name:t.name,description:t.description};return this.api.setEndpoint("company/"+e+"/trademarks"),this.api.POST(o)}apiUpdateTrademark(e,t,o){let n={id:o.id,name:o.name,description:o.description};return this.api.setEndpoint("company/"+e+"/trademarks/"+t),this.api.PUT(n)}apiDeleteTrademark(e,t){return this.api.setEndpoint("company/"+e+"/trademarks/"+t),this.api.DELETE()}apiCompanyGetImages(e){return this.api.setEndpoint("company/"+e+"/images"),this.api.GET()}
2apiAddPhoto(e,t){let o={title:t.title,description:t.description};return this.api.setEndpoint("company/"+e+"/images"),this.api.POST(o)}apiAddImage(e,t){let o={title:t.title,description:t.description,youtubeUri:f(t.youtubeUri)?null:t.youtubeUri};return this.api.setEndpoint("company/"+e+"/images"),this.api.POST(o)}apiDeleteImage(e,t){return this.api.setEndpoint("company/"+e+"/images/"+t),this.api.DELETE()}apiGetCompanyAccounts(e){return this.api.setEndpoint("company/"+e+"/accounts"),this.api.GET()}apiGetCompanies(e=null,t=null){return this.api.setEndpoint("company"),this.api.GET(e,t)}apiGetCompaniesAll(e=null){return this.api.setEndpoint("company/all"),this.api.GET(e)}apiAddCompanyFavorite(e){return this.api.setEndpoint("company/"+e+"/favorite"),this.api.POST()}apiDeleteCompanyFavorite(e){return this.api.setEndpoint("company/"+e+"/favorite"),this.api.DELETE()}apiAddCompanyConnection(e){return this.api.setEndpoint("company/"+e+"/connection"),this.api.POST()}apiDeleteCompanyConnection(e){return this.api.setEndpoint("company/"+e+"/connection"),this.api.DELETE()}apiUpdateCompanyAccounts(e,t){return this.api.setEndpoint("company/"+e+"/accounts"),this.api.POST(t)}apiUpdateAreaOfInterests(e,t){return this.api.setEndpoint("company/"+e+"/areaofinterest"),this.api.POST(t)}apiGetMatchcriterion(e,t){return this.api.setEndpoint("company/"+e+"/matchcriterion"),this.api.GET(t)}apiUpdateMatchcriterion(e,t){return f(t.companyCultureFactor)&&(t.companyCultureFactor=0),f(t.personalityFactor)&&(t.personalityFactor=0),f(t.areaOfInterestFactor)&&(t.areaOfInterestFactor=0),this.api.setEndpoint("company/"+e+"/matchcriterion"),this.api.PUT(t)}createCompanyAwvlElectionProfile(e,t,o){return this.api.setEndpoint("company/"+e+"/awvl/electionprofile/"+t+"/"+o),this.api.POST()}apiCompanyAccountAddRole(e,t,o){return this.api.setEndpoint("company/"+e+"/accounts/"+t+"/role/add"),this.api.POST({role:o})}apiCompanyAccountRemoveRole(e,t,o){return this.api.setEndpoint("company/"+e+"/accounts/"+t+"/role/remove"),this.api.POST({role:o})}handleError(e="",t){return o=>{switch(e){case"apiAddTrademark":case"apiAddPhoto":default:this.alertService.errorWithReport(o,`company:${e}`);break}return w(t)}}getRandomNumberBetween(e,t){return Math.floor(Math.random()*(t-e+1)+e)}static{this.\u0275fac=function(t){return new(t||r)}}static{this.\u0275prov=x({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var ri=(()=>{class r{constructor(){this.activeModal=h(et),this.title="",this.content="",this.data={}}ngOnInit(){}static{this.\u0275fac=function(t){return new(t||r)}}static{this.\u0275cmp=Ze({type:r,selectors:[["app-modal-alert"]],standalone:!1,decls:15,vars:9,consts:[[1,"modal-content"],[1,"modal-header"],["id","modal-title-login",1,"modal-title"],["tabindex","10","type","button",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body",3,"innerHTML"],[1,"modal-footer"],[1,"btn-toolbar","flex-grow-1","justify-content-end"],["type","button",1,"btn","btn-primary",3,"click"]],template:function(t,o){t&1&&(K(0,"div",0)(1,"div",1)(2,"h5",2),ie(3),ne(4,"translate"),Y(),K(5,"button",3),Oe("click",function(){return o.activeModal.close(!1)}),K(6,"span",4),ie(7,"\xD7"),Y()()(),Ft(8,"div",5),ne(9,"translate"),K(10,"div",6)(11,"div",7)(12,"button",8),Oe("click",function(){return o.activeModal.close(!0)}),ie(13),ne(14,"translate"),Y()()()()),t&2&&(V(3),Fe(fe(4,3,o.title)),V(5),Ot("innerHTML",fe(9,5,o.content),Uo),V(5),Fe(fe(14,7,"Close")))},dependencies:[Mt],encapsulation:2})}}return r})();var oi=(()=>{class r{constructor(){this.activeModal=h(et),this.title="",this.content="",this.data={},this.confirmLabel="Confirm",this.confirmClass="btn btn-primary"}ngOnInit(){}static{this.\u0275fac=function(t){return new(t||r)}}static{this.\u0275cmp=Ze({type:r,selectors:[["app-modal-confirm"]],standalone:!1,decls:20,vars:18,consts:[[1,"modal-content"],[1,"modal-header"],["id","modal-title-login",1,"modal-title"],["type","button",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body"],[1,"modal-footer"],[1,"btn-toolbar","flex-grow-1","justify-content-between"],["type","button",1,"btn","btn-secondary",3,"click"],["type","button",3,"click"]],template:function(t,o){t&1&&(K(0,"div",0)(1,"div",1)(2,"h5",2),ie(3),ne(4,"translate"),Y(),K(5,"button",3),ne(6,"translate"),Oe("click",function(){return o.activeModal.close(!1)}),K(7,"span",4),ie(8,"\xD7"),Y()()(),K(9,"div",5),ie(10),ne(11,"translate"),Y(),K(12,"div",6)(13,"div",7)(14,"button",8),Oe("click",function(){return o.activeModal.close(!1)}),ie(15),ne(16,"translate"),Y(),K(17,"button",9),Oe("click",function(){return o.activeModal.close(!0)}),ie(18),ne(19,"translate"),Y()()()()),t&2&&(V(3),Fe(fe(4,7,o.title)),V(2),Lo("aria-label",fe(6,9,"Close")),V(5),Ro(" ",No(11,11,o.content,o.data)," "),
2V(5),Fe(fe(16,14,"Cancel")),V(2),Do(o.confirmClass),V(),Fe(fe(19,16,o.confirmLabel)))},dependencies:[Mt],encapsulation:2})}}return r})();var eo=(()=>{class r{constructor(){this.activeModal=h(et),this.title="",this.content="",this.data={}}ngOnInit(){}static{this.\u0275fac=function(t){return new(t||r)}}static{this.\u0275cmp=Ze({type:r,selectors:[["app-modal-loader"]],standalone:!1,decls:3,vars:1,consts:[[1,"modal-content"],[1,"modal-body"],[3,"inline"]],template:function(t,o){t&1&&(K(0,"div",0)(1,"div",1),Ft(2,"app-loader",2),Y()()),t&2&&(V(2),Ot("inline",!0))},dependencies:[Ko],encapsulation:2})}}return r})();var Be={Beheerder:"Beheerder",ProfessionalAdmin:"ProfessionalAdmin",InternationalAdmin:"InternationalAdmin",Student:"Student",Teacher:"Docent",Company:"Bedrijf",Verkiezingsbeheerder:"Verkiezingsbeheerder",BedrijfsVerkiezingsbeheerder:"BedrijfsVerkiezingsbeheerder"},ii=[Be.Beheerder,Be.ProfessionalAdmin,Be.InternationalAdmin];var ni={url:"https://meettheyoungsters.b2clogin.com/meettheyoungsters.onmicrosoft.com/v2.0/.well-known/openid-configuration?p=B2C_1_SignIn"}
2,Yt={issuer:"https://meettheyoungsters.b2clogin.com/meettheyoungsters.onmicrosoft.com/B2C_1_SignIn/v2.0/",strictDiscoveryDocumentValidation:!1,redirectUri:window.location.origin+"/",clientId:"9ddb3197-ce8b-4905-b30f-aad5d9953af6",responseType:"token id_token",scope:"openid offline_access https://meettheyoungsters.onmicrosoft.com/12f9bfd1-2100-4764-94ea-4ce9af58bacb/User",skipIssuerCheck:!0,showDebugInformation:!1,loginUrl:"https://meettheyoungsters.b2clogin.com/meettheyoungsters.onmicrosoft.com/b2c_1_signin/oauth2/v2.0/authorize?p=B2C_1_SignIn",logoutUrl:"https://login.microsoftonline.com/meettheyoungsters/oauth2/logout?post_logout_redirect_uri="+window.location.origin,tokenEndpoint:"https://meettheyoungsters.b2clogin.com/meettheyoungsters.onmicrosoft.com/oauth2/v2.0/token?p=B2C_1_SignIn",userinfoEndpoint:"https://meettheyoungsters.onmicrosoft.com/12f9bfd1-2100-4764-94ea-4ce9af58bacb/User",silentRefreshRedirectUri:window.location.origin+"/silent-refresh.html",useSilentRefresh:!0,silentRefreshShowIFrame:!1,silentRefreshTimeout:5e3,timeoutFactor:.25,clearHashAfterLogin:!0,sessionChecksEnabled:!1,postLogoutRedirectUri:window.location.origin,oidc:!0}
2,si="https://meettheyoungsters.b2clogin.com/meettheyoungsters.onmicrosoft.com/oauth2/v2.0/authorize?p=B2C_1_Reset&client_id="+Yt.clientId+"&nonce=defaultNonce&redirect_uri="+window.location.origin+"/&scope=openid&response_type=id_token&prompt=login";function ai(r,i){let e=i?r+";"+encodeURIComponent(i):r;return"https://meettheyoungsters.b2clogin.com/meettheyoungsters.onmicrosoft.com/oauth2/v2.0/authorize?p=B2C_1_SignUp&client_id="+Yt.clientId+"&nonce="+encodeURIComponent(r)+"&redirect_uri="+encodeURIComponent(window.location.origin+"/")+"&scope="+encodeURIComponent(Yt.scope)+"&response_type="+encodeURIComponent(Yt.responseType)+"&state="+encodeURIComponent(e)+"&prompt=login"}var Qt=(()=>{class r{constructor(){this.global=h(se),this.ngbModalService=h(Go),this.template=""}Alert(e="",t="",o={},n=[],s={},a=!0){this.ngbModalService.hasOpenModals()&&a&&this.ngbModalService.dismissAll();let l=this.ngbModalService.open(ri,s);return l.componentInstance.title=e,l.componentInstance.content=t,l.componentInstance.data=o,l.componentInstance.buttons=n,l.result}Confirm(e="",t="",o={}){let{data:n={},buttons:s=[],modalOptions:a={},dismissAll:l=!0,confirmLabel:u,confirmClass:p}=o;this.ngbModalService.hasOpenModals()&&l&&this.ngbModalService.dismissAll();let c=this.ngbModalService.open(oi,a);return c.componentInstance.title=e,c.componentInstance.content=t,c.componentInstance.data=n,c.componentInstance.buttons=s,u&&(c.componentInstance.confirmLabel=u),p&&(c.componentInstance.confirmClass=p),c.result}Loader(e=!0,t=!0){let o={backdrop:"static",centered:!0};return e===!0?this.ngbModalService.open(eo,o).result:(t&&this.ngbModalService.dismissAll(),!1)}Modal(e,t="",o="",n={},s=[],a={}){this.ngbModalService.hasOpenModals()&&this.ngbModalService.dismissAll();let l=this.ngbModalService.open(e,a);return l.componentInstance.title=t,l.componentInstance.content=o,l.componentInstance.data=n,l.componentInstance.buttons=s,l.result}modalComponentRef(e,t="",o="",n={},s=[],a={}){let l=this.ngbModalService.open(e,a);return l.componentInstance.title=t,l.componentInstance.content=o,l.componentInstance.data=n,l.componentInstance.buttons=s,l}modalLoaderRef(){let e={backdrop:"static",centered:!0};return this.ngbModalService.open(eo,e)}static{this.\u0275fac=function(t){return new(t||r)}}static{this.\u0275prov=x({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var Zt=(()=>{class r{constructor(){this.global=h(se),this.api=h(ae),this.modal=h(Qt),this.currentUserRoles=[],this.subscriptionUser=new ho}setCurrentUserRoles(e){Array.isArray(e)?this.currentUserRoles=e:this.currentUserRoles.push(e)}currentUserHasRole(e){return!e||!e.length?!0:this.currentUserRoles.includes(e)}currentUserHasAnyRole(e){return e.some(t=>this.currentUserRoles.includes(t))}currentUserIsAdmin(){return this.currentUserHasAnyRole(ii)}apiAccountRegister(e,t){return this.api.setEndpoint("account/register/"+t),this.api.POST(e)}apiGetAccountCurrent(){return this.api.setEndpoint("account/current"),this.api.GET()}apiUpdateAccount(e,t){return this.api.setEndpoint("account/"+e),this.api.PUT(t)}apiUpdateAccountCurrent(e,t){return this.api.setEndpoint("account/current"),this.api.PUT(t)}apiGetAccountFavoriteJobpostings(e){return this.api.setEndpoint("account/"+e+"/favorites/jobpostings"),this.api.GET()}apiGetAccountFavoriteCompanies(e){return this.api.setEndpoint("account/"+e+"/favorites/companies"),this.api.GET()}apiUpdateAccountEmailAddress(e,t){this.api.setEndpoint("account/"+e+"/emailaddress");let o={emailAddress:t};return this.api.PUT(o)}handleError(e="",t){return o=>{switch(e){case"apiGetAccountCurrent":case"apiGetStudentProfileCurrent":break;default:console.log("error operation: ",e),this.modal.Alert("Error","Something went wrong, please try again");break}return w(t)}}static{this.\u0275fac=function(t){return new(t||r)}}static{this.\u0275prov=x({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var li=function(r){return r.New="New",r.Active="Active",r.Inactive="Inactive",r}(li||{});var ci=function(r){return r.Concept="Concept",r.OpenForRegistration="OpenForRegistration",r.RegistrationClosed="RegistrationClosed",r}(ci||{});var ui=function(r){return r.Fulltime="Fulltime",r.Parttime="Parttime",r}(ui||{});var fi=function(r){return r.Private="Private",r.Closed="Closed",r.Public="Public",r}(fi||{});var pi=function(r){return r.Job="Job",r.Internship="Internship",r.Traineeship="Traineeship",r.Sidejob="Sidejob",r.Assignment="Assignment",r.ApprenticeshipPosition="ApprenticeshipPosition",r}(pi||{});var di=function(r){return r.Generic="Generic",r.Video="Video",r.Event="Event",r.Testimonial="Testimonial",r.Blog="Blog",r.Project="Project",r.School="School",r.Post="Post",r}(di||{});
2var de=function(r){return r.None="None",r.Baan="Baan",r.Stage="Stage",r.Traineeship="Traineeship",r.Bijbaan="Bijbaan",r.ApprenticeshipPosition="ApprenticeshipPosition",r}(de||{});var hi=function(r){return r.Middelbaar="Middelbaar",r.Vervolgonderwijs="Vervolgonderwijs",r}(hi||{});var mi=function(r){return r.Ascending="Ascending",r.Descending="Descending",r}(mi||{});var Ge=function(r){return r.Pupil="Pupil",r.Student="Student",r.Starter="Starter",r.YoungProfessional="YoungProfessional",r.Professional="Professional",r.International="International",r}(Ge||{});var gi=function(r){return r.New="New",r.Active="Active",r.Inactive="Inactive",r}(gi||{});var yi=(()=>{class r{constructor(){this.api=h(ae),this.alertService=h(tt),this.maxAmountAreaOfInterests=10,this.currentStudentprofile={id:"",firstName:"",infix:"",lastName:"",birthDate:"",phoneNumber:"",lookingFor:"",profileType:"",avatarUri:"",profileStrength:0,homeAddress:{street:"",number:"",numberSuffix:"",city:"",postalCode:"",country:"",latitude:"",longitude:""},allowEmailNotifications:!1,hasParentalConsent:!0,isSubscribedToNewsletter:!1,hasMediaConsent:!1,hasAcceptedGdprPolicy:!1,hasDataUsageConsent:!1,parentEmailAddress:"",interests:[],areaOfInterests:[],workExperiences:[],educations:[],languageProficiencies:[],foreignExperiences:[],studentProfileCvs:[],referenceCode:"",preferredLanguage:""}}getLanguageProficiencyLevels(){return[{value:0,label:"Bad"},{value:1,label:"Mediocre"},{value:2,label:"Sufficient"},{value:3,label:"Good"},{value:4,label:"Fluent"},{value:5,label:"Excellent"},{value:6,label:"Native language"}]}getLanguageProficiencyLevelName(e){let t=this.getLanguageProficiencyLevels();for(let o of t)if(o.value===e)return o.label;return""}getProfileTypes(){return[{value:Ge.Pupil,name:"Pupil"},{value:Ge.Student,name:"Student"},{value:Ge.Starter,name:"Starter"},{value:Ge.YoungProfessional,name:"Young professional"}]}getProfileTypeName(e){let t=this.getProfileTypes();for(let o of t)if(e===o.value)return o.name;return""}getLookingForData(){return[{value:de.None,name:"Not actively looking"},{value:de.Bijbaan,name:"Side job"},{value:de.Stage,name:"Internship"},{value:de.Traineeship,name:"Traineeship"},{value:de.ApprenticeshipPosition,name:"ApprenticeshipPosition"},{value:de.Baan,name:"Job"}]}getLookingForName(e){let t=this.getLookingForData();for(let o of t)if(e===o.value)return o.name;return""}sortLookingForOptions(e){}apiGetStudentprofileCurrent(){return this.api.setEndpoint("studentprofile/current"),this.api.GET()}apiGiveParentalConsent(e,t){return this.api.setEndpoint(`studentprofile/${e}/parentalconsent`),this.api.POST({token:t})}apiCreateStudentprofile(e){return this.api.setEndpoint("studentprofile"),this.api.POST(e)}apiRegisterStudentprofile(e){return this.api.setEndpoint("studentprofile/register"),this.api.POST(e)}apiGetStudentProfiles(e=null){return this.api.setEndpoint("studentprofile"),this.api.GET(e)}apiGetStudentprofile(e){return this.api.setEndpoint("studentprofile/"+e),this.api.GET()}deleteProfile(e){return this.api.setEndpoint("studentprofile/"+e),this.api.DELETE()}apiUpdateAreaofinterests(e,t){let o=t;return this.api.setEndpoint("studentprofile/"+e+"/areaofinterest"),this.api.POST(o)}apiDeleteStudentprofile(e){return this.api.setEndpoint("studentprofile/"+e),this.api.DELETE()}apiAddWorkExperience(e,t){let o={title:t.title,companyName:t.companyName,companyUrl:t.companyUrl,location:t.location,jobTitle:t.jobTitle,description:t.description,startDate:t.startDate,endDate:f(t.endDate)?null:t.endD
2ate,isCurrent:t.isCurrent,areaOfInterests:t.areaOfInterests};return this.api.setEndpoint("studentprofile/"+e+"/workexperience"),this.api.POST(o)}apiUpdateWorkExperience(e,t){let o={id:t.id,title:t.title,companyName:t.companyName,companyUrl:t.companyUrl,location:t.location,jobTitle:t.jobTitle,description:t.description,startDate:t.startDate,endDate:f(t.endDate)?null:t.endDate,isCurrent:t.isCurrent,areaOfInterests:t.areaOfInterests};return this.api.setEndpoint("studentprofile/"+e+"/workexperience/"+t.id),this.api.PUT(o)}apiDeleteWorkExperience(e,t){return this.api.setEndpoint("studentprofile/"+e+"/workexperience/"+t),this.api.DELETE()}apiAddEducation(e,t){let o={schoolId:t.schoolId,educationLevelId:t.educationLevelId,educationProfileId:t.educationProfileId,schoolName:t.schoolName,schoolCity:t.schoolCity,schoolCountry:t.schoolCountry,programName:t.programName,level:t.level,profile:t.profile,phase:t.phase,description:t.description,extras:t.extras,startDate:t.startDate,endDate:t.endDate,isCurrent:t.isCurrent,graduated:t.graduated,areaOfInterests:t.areaOfInterests};return f(t.schoolId)||(o.schoolId=t.schoolId),f(t.educationLevelId)||(o.educationLevelId=t.educationLevelId),this.api.setEndpoint("studentprofile/"+e+"/education"),this.api.POST(o)}apiUpdateEducation(e,t){let o={id:t.id,schoolId:t.schoolId,educationLevelId:t.educationLevelId,educationProfileId:t.educationProfileId,schoolName:t.schoolName,schoolCity:t.schoolCity,schoolCountry:t.schoolCountry,programName:t.programName,level:t.level,phase:t.phase,description:t.description,extras:t.extras,startDate:t.startDate,endDate:t.endD
2ate,isCurrent:t.isCurrent,graduated:t.graduated,areaOfInterests:t.areaOfInterests};return f(t.schoolId)||(o.schoolId=t.schoolId),f(t.educationLevelId)||(o.educationLevelId=t.educationLevelId),this.api.setEndpoint("studentprofile/"+e+"/education/"+t.id),this.api.PUT(o)}apiDeleteEducation(e,t){return this.api.setEndpoint("studentprofile/"+e+"/education/"+t),this.api.DELETE()}apiAddLanguageProficiency(e,t){let o={languageCode:t.languageCode,readingProficiency:t.readingProficiency,writingProficiency:t.writingProficiency,speakingProficiency:t.speakingProficiency};return this.api.setEndpoint("studentprofile/"+e+"/languageproficiency"),this.api.POST(o)}apiUpdateLanguageProficiency(e,t){let o={id:t.id,languageCode:t.languageCode,readingProficiency:t.readingProficiency,writingProficiency:t.writingProficiency,speakingProficiency:t.speakingProficiency};return this.api.setEndpoint("studentprofile/"+e+"/languageproficiency/"+t.id),this.api.PUT(o)}apiDeleteLanguageProficiency(e,t){return this.api.setEndpoint("studentprofile/"+e+"/languageproficiency/"+t),this.api.DELETE()}apiAddForeignExperience(e,t){let o={title:t.title,description:t.description,companyInformation:t.companyInformation,country:t.country,startDate:t.startDate,endDate:t.endD
2ate};return this.api.setEndpoint("studentprofile/"+e+"/foreignexperience"),this.api.POST(o)}apiUpdateForeignExperience(e,t){let o={id:t.id,title:t.title,description:t.description,companyInformation:t.companyInformation,country:t.country,startDate:t.startDate,endDate:t.endDate};return this.api.setEndpoint("studentprofile/"+e+"/foreignexperience/"+t.id),this.api.PUT(o)}apiDeleteForeignExperience(e,t){return this.api.setEndpoint("studentprofile/"+e+"/foreignexperience/"+t),this.api.DELETE()}apiAddInterest(e,t){let o={description:t.description};return this.api.setEndpoint("studentprofile/"+e+"/interests"),this.api.POST(o)}apiUpdateInterest(e,t){let o={id:t.id,description:t.description};return this.api.setEndpoint("studentprofile/"+e+"/interests/"+t.id),this.api.PUT(o)}apiDeleteInterest(e,t){return this.api.setEndpoint("studentprofile/"+e+"/interests/"+t),this.api.DELETE()}apiDeleteCv(e,t){return this.api.setEndpoint("studentprofile/"+e+"/cv/"+t),this.api.DELETE()}apiGetPublicCv(e){return this.api.setEndpoint(`studentprofile/${e}/publiccv`),this.api.GET()}apiUpdateProfilePublicStatus(e,t){return this.api.setEndpoint(`studentprofile/${e}/publiccv/${t}`),this.api.PUT({studentId:e,shouldBePublic:t})}apiGetCvSettings(e){let t=`cv-settings-${e}`,o=localStorage.getItem(t);return w(o?JSON.parse(o):null)}apiSaveCvSettings(e,t){let o=`cv-settings-${e}`;return localStorage.setItem(o,JSON.stringify(t)),w(!0)}apiDeleteCvSettings(e){let t=`cv-settings-${e}`;return localStorage.removeItem(t),w(!0)}apiGetApplications(e){return this.api.setEndpoint("studentprofile/"+e+"/applications"),this.api.GET()}apiGetMatchtest(e){return this.api.setEndpoint("studentprofile/"+e+"/matchtest"),this.api.GET()}apiUpdateMatchtest(e,t){return this.api.setEndpoint("studentprofile/"+e+"/matchtest"),this.api.PUT(t)}apiGetStudentCompanyMatches(e,t=null){return this.api.setEndpoint("studentprofile/"+e+"/match/company"),this.api.GET(t)}apiGetStudentJobpostingMatches(e,t=null){return this.api.setEndpoint("studentprofile/"+e+"/match/jobposting"),this.api.GET(t)}apiGetStudentprofileDnaCurrent(e){return this.api.setEndpoint("studentprofile/"+e+"/dna/current"),this.api.GET()}apiGetPublicStudentprofileDnaCurrent(e){return this.api.setEndpoint("public/studentprofile/"+e+"/dna/current"),this.api.GET(null,null,!0)}apiGetStudentprofileDna(e){return this.api.setEndpoint("studentprofile/"+e+"/dna"),this.api.GET()}apiTransferRijrStudentProfile(e){return this.api.setEndpoint("studentprofile/transfer"),this.api.POST(e)}handleError(e="",t){return o=>{switch(e){case"apiGetStudentprofileCurrent":break;case"apiGetStudentProfiles":default:this.alertService.errorWithReport(o,`student:${e}`);break}return w(t)}}sortStudentProfile(e){return e.hasOwnProperty("educations")&&(e.educations=Jt(e.educations,"startDate").reverse(),e.educations=this.sortMostRecent(e.educations)),e.hasOwnProperty("workExperiences")&&(e.workExperiences=Jt(e.workExperiences,"startDate").reverse(),e.workExperiences=this.sortMostRecent(e.workExperiences)),e.hasOwnProperty("foreignExperiences")&&(e.foreignExperiences=Jt(e.foreignExperiences,"startDate").reverse(),e.foreignExperiences=this.sortMostRecent(e.foreignExperiences)),e}getMostRecentKey(e){let t=null,o=null;if(e?.length===0)return t;for(let n in e){let s=e[n];s.hasOwnProperty("isCurrent")&&s.isCurrent===!0&&(t=n,o=n),s.hasOwnProperty("endDate")&&s.endDate==null&&(t=n)}return o??t}sortMostRecent(e){if(e.length===0)return e;let t=this.getMostRecentKey(e);if(t!=null){let o=e[t];e.splice(t,1),e.unshift(o)}return e}static{this.\u0275fac=function(t){return new(t||r)}}static{this.\u0275prov=x({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();function Xt(r,i,e,t){let o=new P(i,Xt.PATH,"post");return e&&o.body(e.body,"application/*+json"),r.request(o.build({responseType:"json",accept:"application/json",context:t})).pipe(b(n=>n instanceof A),g(n=>n))}Xt.PATH="/teacherprofile";function $t(r,i,e,t){let o=new P(i,$t.PATH,"delete");return e&&o.path("id",e.id,{}),r.request(o.build({responseType:"text",accept:"*/*",context:t})).pipe(b(n=>n instanceof A),g(n=>n.clone({body:void 0})))}$t.PATH="/teacherprofile/{id}";function er(r,i,e,t){let o=new P(i,er.PATH,"get");return r.request(o.build({responseType:"json",accept:"application/json",context:t})).pipe(b(n=>n instanceof A),g(n=>n))}er.PATH="/teacherprofile/current";function tr(r,i,e,t){let o=new P(i,tr.PATH,"get");return e&&(o.path("id",e.id,{}
2),o.query("pendingOnly",e.pendingOnly,{})),r.request(o.build({responseType:"json",accept:"application/json",context:t})).pipe(b(n=>n instanceof A),g(n=>n))}tr.PATH="/teacherprofile/{id}/plannedexperiencedays";function rr(r,i,e,t){let o=new P(i,rr.PATH,"get");return e&&(o.path("id",e.id,{}),o.query("pendingOnly",e.pendingOnly,{})),r.request(o.build({responseType:"json",accept:"application/json",context:t})).pipe(b(n=>n instanceof A),g(n=>n))}rr.PATH="/teacherprofile/{id}/plannedfocusdays";function or(r,i,e,t){let o=new P(i,or.PATH,"get");return e&&o.path("id",e.id,{}),r.request(o.build({responseType:"json",accept:"application/json",context:t})).pipe(b(n=>n instanceof A),g(n=>n))}or.PATH="/teacherprofile/{id}";function ir(r,i,e,t){let o=new P(i,ir.PATH,"get");return e&&o.path("id",e.id,{}),r.request(o.build({responseType:"json",accept:"application/json",context:t})).pipe(b(n=>n instanceof A),g(n=>n))}ir.PATH="/teacherprofile/{id}/meetdays";function nr(r,i,e,t){let o=new P(i,nr.PATH,"get");return e&&(o.query("PageNumber",e.PageNumber,{}),o.query("PageSize",e.PageSize,{}),o.query("status",e.status,{})),r.request(o.build({responseType:"json",accept:"application/json",context:t})).pipe(b(n=>n instanceof A),g(n=>n))}nr.PATH="/teacherprofile";function sr(r,i,e,t){let o=new P(i,sr.PATH,"get");return e&&o.path("profileId",e.profileId,{}),r.request(o.build({responseType:"json",accept:"application/json",context:t})).pipe(b(n=>n instanceof A),g(n=>n))}sr.PATH="/teacherprofile/{profileId}/class";function ar(r,i,e,t){let o=new P(i,ar.PATH,"put");return e&&(o.path("id",e.id,{}),o.path("plannedexperiencedayId",e.plannedexperiencedayId,{}),o.body(e.body,"application/*+json")),r.request(o.build({responseType:"json",accept:"application/json",context:t})).pipe(b(n=>n instanceof A),g(n=>n))}ar.PATH="/teacherprofile/{id}/plannedexperiencedays/{plannedexperiencedayId}";function lr(r,i,e,t){let o=new P(i,lr.PATH,"put");return e&&(o.path("id",e.id,{}),o.path("plannedfocusdayId",e.plannedfocusdayId,{}),o.body(e.body,"application/*+json")),r.request(o.build({responseType:"json",accept:"application/json",context:t})).pipe(b(n=>n instanceof A),g(n=>n))}lr.PATH="/teacherprofile/{id}/plannedfocusdays/{plannedfocusdayId}";function cr(r,i,e,t){let o=new P(i,cr.PATH,"post");return e&&o.body(e.body,"application/*+json"),r.request(o.build({responseType:"text",accept:"*/*",context:t})).pipe(b(n=>n instanceof A),g(n=>n.clone({body:void 0})))}cr.PATH="/teacherprofile/register";function ur(r,i,e,t){let o=new P(i,ur.PATH,"post");return e&&(o.path("profileId",e.profileId,{}),o.body(e.body,"application/*+json")),r.request(o.build({responseType:"text",accept:"*/*",context:t})).pipe(b(n=>n instanceof A),g(n=>n.clone({body:void 0})))}ur.PATH="/teacherprofile/{profileId}/class";function fr(r,i,e,t){let o=new P(i,fr.PATH,"put");return e&&(o.path("id",e.id,{}),o.body(e.body,"application/*+json")),r.request(o.build({responseType:"json",accept:"application/json",context:t})).pipe(b(n=>n instanceof A),g(n=>n))}fr.PATH="/teacherprofile/{id}";var bi=(()=>{class r extends zo{constructor(e,t){super(e,t)}static{this.GetTeacherProfilesPath="/teacherprofile"}getTeacherProfiles$Response(e,t){return nr(this.http,this.rootUrl,e,t)}getTeacherProfiles(e,t){return this.getTeacherProfiles$Response(e,t).pipe(g(n=>n.body))}static{this.CreateTeacherProfilePath="/teacherprofile"}createTeacherProfile$Response(e,t){return Xt(this.http,this.rootUrl,e,t)}createTeacherProfile(e,t){return this.createTeacherProfile$Response(e,t).pipe(g(n=>n.body))}static{this.GetTeacherProfilePath="/teacherprofile/{id}"}getTeacherProfile$Response(e,t){return or(this.http,this.rootUrl,e,t)}getTeacherProfile(e,t){return this.getTeacherProfile$Response(e,t).pipe(g(n=>n.body))}static{this.UpdateTeacherProfilePath="/teacherprofile/{id}"}updateTeacherProfile$Response(e,t){return fr(this.http,this.rootUrl,e,t)}updateTeacherProfile(e,t){return this.updateTeacherProfile$Response(e,t).pipe(g(n=>n.body))}static{this.DeleteTeacherProfilePath="/teacherprofile/{id}"}deleteTeacherProfile$Response(e,t){return $t(this.http,this.rootUrl,e,t)}deleteTeacherProfile(e,t){return this.deleteTeacherProfile$Response(e,t).pipe(g(n=>n.body))}static{this.GetTeacherPlannedFocusDaysPath="/teacherprofile/{id}/plannedfocusdays"}getTeacherPlannedFocusDays$Response(e,t){return rr(this.http,this.rootUrl,e,t)}getTeacherPlannedFocusDays(e,t){return this.getTeacherPlannedFocusDays$Response(e,t).pipe(g(n=>n.body))}static{this.PutTeacherPlannedFocusDaysPath="/teacherprofile/{id}/plannedfocusdays/{plannedfocusdayId}"}putTeacherPlannedFocusDays$Response(e,t){return lr(this.http,this.rootUrl,e,t)}putTeacherPlannedFocusDays(e,t){return this.putTeacherPlannedFocusDays$Response(e,t).pipe(g(n=>n.body))}static{this.GetTeacherPlannedExperienceDaysPath="/teacherprofile/{id}/plannedexperiencedays"}getTeacherPlannedExperienceDays$Response(e,t){return tr(this.http,this.rootUrl,e,t)}getTeacherPlannedExperienceDays(e,t){return this.getTeacherPlannedExperienceDays$Response(e,t).pipe(g(n=>n.body))}static{this.PutTeacherPlannedExperienceDaysPath="/teacherprofile/{id}/plannedexperiencedays/{plannedexperiencedayId}"}putTeacherPlannedExperienceDays$Response(e,t){return ar(this.http,this.rootUrl,e,t)}putTeacherPlannedExperienceDays(e,t){return this.putTeacherPlannedExperienceDays$Response(e,t).pipe(g(n=>n.body))}static{this.GetTeacherProfileMeetDaysPath="/teacherprofile/{id}/meetdays"}getTeacherProfileMeetDays$Response(e,t){return ir(this.http,this.rootUrl,e,t)}getTeacherProfileMeetDays(e,t){return this.getTeacherProfileMeetDays$Response(e,t).pipe(g(n=>n.body))}static{this.GetCurrentTeacherProfilePath="/teacherprofile/current"}getCurrentTeacherProfile$Response(e,t){return er(this.http,this.rootUrl,e,t)}getCurrentTeacherProfile(e,t){return this.getCurrentTeacherProfile$Response(e,t).pipe(g(n=>n.body))}static{this.RegisterTeacherProfilePath="/teacherprofile/register"}registerTeacherProfile$Response(e,t){return cr(this.http,this.rootUrl,e,t)}registerTeacherProfile(e,t){return this.registerTeacherProfile$Response(e,t).pipe(g(n=>n.body))}static{this.GetTeacherProfileSchoolClassesPath="/teacherprofile/{profileId}/class"}getTeacherProfileSchoolClasses$Response(e,t){return sr(this.http,this.rootUrl,e,t)}getTeacherProfileSchoolClasses(e,t){return this.getTeacherProfileSchoolClasses$Response(e,t).pipe(g(n=>n.body))}static{this.SetTeacherProfileSchoolClassesPath="/teacherprofile/{profileId}/class"}setTeacherProfileSchoolClasses$Response(e,t){return ur(this.http,this.rootUrl,e,t)}setTeacherProfileSchoolClasses(e,t){return this.setTeacherProfileSchoolClasses$Response(e,t).pipe(g(n=>n.body))}static{this.\u0275fac=function(t){return new(t||r)(j(qo),j(pe))}}static{this.\u0275prov=x({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();
2var Aa="ERR_USER_NOT_FOUND",vi=(()=>{class r{constructor(){this.global=h(se),this.oauthService=h(ot),this.userService=h(Zt),this.studentService=h(yi),this.companyService=h(ti),this.teacherProfileService=h(bi),this.modalService=h(Qt),this.router=h(Mo),this.localStorageRedirectAfterRegistrationKey="redirectAfterRegistrationUrl",this.afterLoginHandled=!1,this.shouldHandleAfterLogin=!1,this.isAuthenticatedSubject$=new wt(!1),this.isDoneLoadingSubject$=new yo,this.isDoneLoading$=this.isDoneLoadingSubject$.asObservable(),this.isAuthenticated$=Je([this.isAuthenticatedSubject$.asObservable(),this.isDoneLoading$]).pipe(g(([e,t])=>t?e:!1)),this.profileSubject$=new wt(null),this.profile$=Je([this.profileSubject$.asObservable(),this.isDoneLoading$]).pipe(g(([e])=>e),Io()),this.studentprofileSubject$=new wt(null),this.studentprofile$=this.studentprofileSubject$.asObservable(),this.companyprofileSubject$=new wt(null),this.companyprofile$=this.companyprofileSubject$.asObservable(),this.canActivateProtectedRoutes$=Je([this.isAuthenticated$,this.isDoneLoading$]).pipe(g(e=>e.every(t=>t))),this.localStorageTargetGroupKey="registrationTargetGroup",this.localStorageRegistrationSourceKey="registrationSource",this.oauthService.events.subscribe(e=>{this.isAuthenticatedSubject$.next(this.oauthService.hasValidAccessToken()),["session_terminated","session_error"].includes(e.type)&&this.navigateToLoginPage()}),this.oauthService.setupAutomaticSilentRefresh(),this.studentprofile$.subscribe(e=>{e&&(this.studentService.currentStudentprofile=Object.assign({},e))})}navigateToLoginPage(){this.router.navigateByUrl("/login")}runInitialLoginSequence(){let e=window.location.hash&&window.location.hash.length>1,t=!!this.oauthService.getAccessToken();if(!e&&!t)return console.log("[Auth] Early bypass: Anonymous user detected - skipping OAuth flow"),this.isDoneLoadingSubject$.next(!0),Promise.resolve();let o=sessionStorage.getItem("isSignUp")==="true";return sessionStorage.removeItem("isSignUp"),this.oauthService.loadDiscoveryDocument(ni.url).then(()=>this.oauthService.tryLogin({disableNonceCheck:o,onTokenReceived:n=>{this.shouldHandleAfterLogin=!0}})).then(()=>this.oauthService.hasValidAccessToken()?Promise.resolve():this.oauthService.silentRefresh().then(()=>Promise.resolve()).catch(n=>{let s=["interaction_required","login_required","account_selection_required","consent_required"],a=n.reason.params.error||n.reason.error;return n&&a&&s.indexOf(a)>=0?Promise.resolve():Promise.reject(n)})).then(()=>Ve(this.userService.apiGetAccountCurrent()).then(n=>(this.profileSubject$.next(n),Promise.resolve()),()=>(this.profileSubject$.next(null),Promise.reject(new Error(Aa))))).then(()=>{if(this.oauthService.state&&this.oauthService.state!=="undefined"&&this.oauthService.state!=="null"){let n=this.oauthService.state;n.startsWith("/")===!1&&(n=decodeURIComponent(n)),console.log(`There was state of ${this.oauthService.state}, so we are sending you to: ${n}`),this.router.navigateByUrl(n)}}).catch(n=>{if(n instanceof U){let s=n.params;return s&&s.error==="access_denied"&&s.error_description.includes("AADB2C90118")&&(window.location.href=si),s&&s.error==="access_denied"&&s.error_description.includes("AADB2C90091")&&this.Login(),Promise.reject()}else return!1}).then(()=>{this.isDoneLoadingSubject$.next(!0),this.shouldHandleAfterLogin&&this.oauthService.hasValidAccessToken()&&!this.afterLoginHandled&&this.handleAfterLoginSequence()})}SignUp(e,t){e?this.setRegistrationSource(e):this.clearRegistrationSource();let o=crypto.randomUUID();sessionStorage.setItem("isSignUp","true"),window.location.href=ai(o,t)}Login(e){this.clearRegistrationSource(),this.oauthService.initLoginFlow(e||this.router.url)}Logout(){this.oauthService.logOut()}refresh(){this.oauthService.silentRefresh()}ResetPassword(){this.oauthService.initLoginFlow()}hasRoles(e){return!e||!e.length?w(!0):(Array.isArray(e)||(e=[e]),this.profile$.pipe(b(t=>!!t),g(t=>{let o=!1;if(t!==null&&t.hasOwnProperty("roles"))for(let n of t.roles)e.includes(n)&&(o=!0);if(!o)throw ve("Required role not present on current user");return!0})))}setProfileData(e){this.profileSubject$.next(e)}getCurrentAccountProfileData(){return this.profileSubject$.value}setStudentprofileData(e){this.studentprofileSubject$.next(e)}handleAfterLoginSequence(){this.isDoneLoading$.pipe(xe()).subscribe(e=>{this.isAuthenticated$.pipe(xe()).subscribe(t=>{t?this.profile$.pipe(xe()).subscribe(o=>{!f(o)&&o!==null?this.userService.currentUserIsAdmin()?this.router.navigateByUrl("/admin"):this.userService.currentUserHasRole(Be.Student)?this.studentService.apiGetStudentprofileCurrent().pipe(F(this.handleError("apiGetStudentprofileCurrent",null))).subscribe(n=>{if(f(n))this.router.navigateByUrl("/student/registration");else{let s=this.getRedirectUrlAfterRegistration();window.localStorage.removeItem(this.localStorageRedirectAfterRegistrationKey),typeof s=="string"?window.location.replace(s):this.router.navigateByUrl("/profile")}}):this.userService.currentUserHasRole(Be.Company)?this.companyService.apiGetCompanyCurrent().pipe(F(this.handleError("apiGetCompanyCurrent",null))).subscribe(n=>{f(n)?this.router.navigateByUrl("/"):this.router.navigateByUrl("/company/profile")}):this.userService.currentUserHasRole(Be.Teacher)?this.teacherProfileService.getCurrentTeacherProfile().pipe(F(this.handleError("getCurrentTeacherProfile",null))).subscribe(n=>{f(n)?this.router.navigateByUrl(Ht):this.router.navigateByUrl("/profile")}):this.router.navigate([this.oauthService.state]):this.oauthService.state==Ht?this.router.navigateByUrl(Ht):this.router.navigateByUrl("/student/registration")}):this.router.navigate([this.oauthService.state])})}),this.afterLoginHandled=!0}handleAfterEmailChange(){}handleError(e="operation",t){return o=>{switch(e){case"apiGetStudentprofileCurrent":case"apiGetCompanyCurrent":case"getCurrentTeacherProfile":break;
2default:this.modalService.Alert("Error","Something went wrong, please try again");break}return w(t)}}setRedirectUrlAfterRegistration(e){window.localStorage.setItem(this.localStorageRedirectAfterRegistrationKey,e)}getRedirectUrlAfterRegistration(){return window.localStorage.getItem(this.localStorageRedirectAfterRegistrationKey)}setRegistrationTargetGroup(e){window.localStorage.setItem(this.localStorageTargetGroupKey,e)}getRegistrationTargetGroup(){return window.localStorage.getItem(this.localStorageTargetGroupKey)}clearRegistrationTargetGroup(){window.localStorage.removeItem(this.localStorageTargetGroupKey)}setRegistrationSource(e){window.localStorage.setItem(this.localStorageRegistrationSourceKey,e)}getRegistrationSource(){return window.localStorage.getItem(this.localStorageRegistrationSourceKey)}clearRegistrationSource(){window.localStorage.removeItem(this.localStorageRegistrationSourceKey)}static{this.\u0275fac=function(t){return new(t||r)}}static{this.\u0275prov=x({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();function xi(r){let i=It(()=>r());return _a(i)?new Proxy(r,{get(e,t){return t in i?(Ct(e[t])||Object.defineProperty(e,t,{value:L(()=>e()[t]),configurable:!0}),xi(e[t])):e[t]}}):r}var Pa=[WeakSet,WeakMap,Promise,Date,Error,RegExp,ArrayBuffer,DataView,Function];function _a(r){if(r===null||typeof r!="object"||Ea(r))return!1;let i=Object.getPrototypeOf(r);if(i===Object.prototype)return!0;for(;i&&i!==Object.prototype;){if(Pa.includes(i.constructor))return!1;i=Object.getPrototypeOf(i)}return i===Object.prototype}function Ea(r){return typeof r?.[Symbol.iterator]=="function"}var Ua=new WeakMap,z=Symbol("STATE_SOURCE");function B(r,...i){r[z].update(e=>i.reduce((t,o)=>T(T({},t),typeof o=="function"?o(t):o),e)),Da(r)}function ka(r){return r[z]()}function La(r){return Ua.get(r[z])||[]}function Da(r){let i=La(r);for(let e of i){let t=It(()=>ka(r));e(t)}}function pr(...r){let i=[...r],e=typeof i[0]=="function"?{}:i.shift(),t=i;return(()=>{class n{constructor(){let a=t.reduce((S,I)=>I(S),Ra()),{stateSignals:l,props:u,methods:p,hooks:c}=a,d=T(T(T({},l),u),p);this[z]=a[z];for(let S of Reflect.ownKeys(d))this[S]=d[S];let{onInit:m,onDestroy:y}=c;m&&m(),y&&h(Tt).onDestroy(y)}static \u0275fac=function(l){return new(l||n)};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:e.providedIn||null})}return n})()}function Ra(){return{[z]:jt({}),stateSignals:{},props:{},methods:{},hooks:{}}}function Na(r){return i=>{let e=r(T(T(T({[z]:i[z]},i.stateSignals),i.props),i.methods));return Reflect.ownKeys(e),re(T({},i),{props:T(T({},i.props),e)})}}function dr(r){return Na(r)}function $b(r){return i=>{let e=T(T(T({[z]:i[z]},i.stateSignals),i.props),i.methods),t=typeof r=="function"?r(e):r,o=n=>{let s=t[n],a=i.hooks[n];return s?()=>{a&&a(),s(e)}:a};return re(T({},i),{hooks:{onInit:o("onInit"),onDestroy:o("onDestroy")}})}}function hr(r){return i=>{let e=r(T(T(T({[z]:i[z]},i.stateSignals),i.props),i.methods));return Reflect.ownKeys(e),re(T({},i),{methods:T(T({},i.methods),e)})}}function mr(r){return i=>{let e=typeof r=="function"?r():r,t=Reflect.ownKeys(e);i[z].update(n=>T(T({},n),e));let o=t.reduce((n,s)=>{let a=L(()=>i[z]()[s]);return re(T({},n),{[s]:xi(a)})},{});return re(T({},i),{stateSignals:T(T({},i.stateSignals),o)})}}function ja(r){return Me.find(i=>i.code.toLowerCase()===r.toLowerCase())?.flag??""}function Si(r,i,e){if(!r||typeof r!="object")return"";let t=r,o=s=>s==null||typeof s=="string"&&!s.trim(),n=t[i];return o(n)&&i!==e&&(n=t[e]),o(n)&&i!==`${e}En`&&(n=t[`${e}En`]),typeof n=="string"?n.trim():String(n??"")}function gr(r,i){let e=new Intl.DisplayNames([i],{type:"language",style:"long"});return r.map(t=>{let o=new Intl.DisplayNames([t],{type:"language",style:"narrow"}),n=e.of(t)??t,s=o.of(t)??n,a=t.toUpperCase(),l=ja(a);return{code:t,name:n,nativeName:s,flag:l}}).filter(t=>t.name.toLowerCase()!==t.code.toLowerCase()).sort((t,o)=>t.name.localeCompare(o.name,i))}var to=Me.find(r=>r.code==="en"),wi=new Intl.DisplayNames([Q.app_domains[0].language],{type:"language",style:"long"}).of(to?.code||"en")||"English",Oa={code:to?.code||"en",name:wi,nativeName:wi,flag:to?.flag||"\u{1F1EC}\u{1F1E7}"},yr={currentLanguage:Oa||{code:"en",name:"English",nativeName:"English",flag:"\u{1F1EC}\u{1F1E7}"},supportedLanguages:[{code:"en",name:"English",nativeName:"English",flag:"\u{1F1EC}\u{1F1E7}"}],isLoading:!1,error:null},br=(()=>{class r extends pr(mr(yr),dr(e=>{let t=h($),o=L(()=>{let s=e.currentLanguage(),a=t.supportedLanguageCodes();return gr(a,s.code)}),n=L(()=>gr(Me.map(s=>s.code),e.currentLanguage().code));return{supportedLanguagesForDomain:o,availableLanguages:n,isLanguageSupported:L(()=>s=>
2t.supportedLanguageCodes().includes(s)),getLanguageName:L(()=>s=>{let a=e.supportedLanguages().find(l=>l.code===s);return a?a.nativeName??a.name:s}),getFieldWithLanguageSuffix:L(()=>(s,a,l=!1)=>{let u=a??e.currentLanguage();if(u.code==="nl")return l&&t.currentRegion()==="BE"?`${s}Be`:s;let p=u.code.charAt(0).toUpperCase()+u.code.slice(1);return`${s}${p}`})}}),hr(e=>{let t=h($);return{getLanguageByCode:o=>e.supportedLanguagesForDomain().find(n=>n.code===o)||e.currentLanguage(),setCurrentLanguage:o=>{let n=typeof o=="string"?o:o.code,s=t.supportedLanguageCodes();if(!s.includes(n)){console.warn("\u{1F527} Language not supported:",n);return}let l=gr(s,n).find(u=>u.code===n);l?B(e,{currentLanguage:l}):console.error("\u{1F527} Could not find language option for:",n)},setLoading:o=>{B(e,{isLoading:o})},setError:o=>{B(e,{error:o,isLoading:!1})},initialize:o=>{let n=t.isLanguageSupported(o.code)?o:e.supportedLanguages().find(s=>s.code===t.defaultLanguage())||yr.currentLanguage;B(e,{currentLanguage:n})},reset:()=>{B(e,re(T({},yr),{currentLanguage:e.supportedLanguages().find(o=>o.code===t.defaultLanguage())||yr.currentLanguage}))}}})){static{this.\u0275fac=(()=>{let e;return function(o){return(e||(e=Qe(r)))(o||r)}})()}static{this.\u0275prov=x({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var Ti=["AF","EG","AX","AL","DZ","AS","VI","UM","AD","AO","AI","AQ","AG","GQ","AR","AM","AW","AZ","ET","AU","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BQ","BA","BW","BV","BR","VG","IO","BN","BG","BF","BI","CV","CL","CN","CK","CR","CI","CW","DK","DE","DM","DO","DJ","EC","SV","ER","EE","SZ","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","GH","GI","GD","GR","GL","GP","GU","GT","GG","GN","GW","GY","HT","HM","HN","IN","ID","IQ","IR","IE","IS","IM","IL","IT","JM","JP","YE","JE","JO","KY","KH","CM","CA","KZ","QA","KE","KG","KI","CC","CO","KM","CG","CD","HR","CU","KW","LA","LS","LV","LB","LR","LY","LI","LT","LU","MG","MW","MY","MV","ML","MT","MA","MH","MQ","MR","MU","YT","MX","FM","MC","MN","ME","MS","MZ","MM","NA","NR","NP","NC","NZ","NI","NL","NE","NG","NU","KP","MP","MK","NF","NO","OM","AT","PK","PS","PW","PA","PG","PY","PE","PH","PN","PL","PT","PR","MD","RE","RW","RO","RU","SB","ZM","WS","SM","ST","SA","SE","CH","SN","RS","SC","SL","ZW","SG","SX","SK","SI","SO","HK","MO","ES","SJ","LK","BL","SH","KN","LC","MF","PM","VC","ZA","SD","GS","KR","SS","SR","SY","TJ","TW","TZ","TH","TL","TG","TK","TO","TT","TD","CZ","TN","TR","TM","TC","TV","UG","UA","HU","UY","UZ","VU","VA","VE","AE","US","GB","VN","WF","CX","EH","CF","CY"];var vr=(()=>{class r{constructor(){this.languageStore=h(br),this.countryCache=new Map,this.currentLanguage=this.languageStore.currentLanguage}getCountries(e){let t=e??this.currentLanguage().code;if(this.countryCache.has(t))return w(this.countryCache.get(t));let o=this.generateCountryList(t);return this.countryCache.set(t,o),w(o)}generateCountryList(e){try{let t=new Intl.DisplayNames([e],{type:"region",style:"long"});return Ti.map(o=>{let n=t.of(o);return{code:o,name:n??o,flag:this.getCountryFlag(o)}}).filter(o=>o.name!==o.code).sort((o,n)=>o.name.localeCompare(n.name,e))}catch(t){return console.warn(`Failed to generate countries for language ${e}:`,t),this.getFallbackCountries()}}getCountryFlag(e){return e.toUpperCase().replace(/./g,t=>String.fromCodePoint(127397+t.charCodeAt(0)))}getFallbackCountries(){let e=["NL","BE","DE","FR","GB","US","ES","IT"],t={NL:"Netherlands",BE:"Belgium",DE:"Germany",FR:"France",GB:"United Kingdom",US:"United States",ES:"Spain",IT:"Italy"};return e.map(o=>({code:o,name:t[o]??o,flag:this.getCountryFlag(o)}))}getCountryName(e,t){return this.getCountries(t).pipe(g(o=>o.find(s=>s.code===e)?.name??e))}getUserCountryCode(){return null}clearCache(){this.countryCache.clear()}static{this.\u0275fac=function(t){return new(t||r)}}static{this.\u0275prov=x({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();function ro(r,i){i?.injector||Vr(ro);let e=i?.injector??h(Nt),t=new je,o=r(t).subscribe();e.get(Tt).onDestroy(()=>o.unsubscribe());let n=(s,a)=>{if(Fa(s))return t.next(s),{destroy:mo};let l=Ma(),u=a?.injector??l??e;if(Ct(s)){let c=Jr(()=>{let d=s();It(()=>t.next(d))},{injector:u});return o.add({unsubscribe:()=>c.destroy()}),c}let p=s.subscribe(c=>t.next(c));return o.add(p),u!==e&&u.get(Tt).onDestroy(()=>p.unsubscribe()),{destroy:()=>p.unsubscribe()}};return n.destroy=o.unsubscribe.bind(o),n}function Fa(r){return!Ct(r)&&!vo(r)}function Ma(){try{return h(Nt)}catch{return}}var Ha=typeof global=="object"&&global&&global.Object===Object&&global,xr=Ha;var Ba=typeof self=="object"&&self&&self.Object===Object&&self,Ga=xr||Ba||Function("return this")(),D=Ga;var Ka=D.Symbol,N=Ka;
2var Ci=Object.prototype,qa=Ci.hasOwnProperty,za=Ci.toString,_t=N?N.toStringTag:void 0;function Wa(r){var i=qa.call(r,_t),e=r[_t];try{r[_t]=void 0;var t=!0}catch{}var o=za.call(r);return t&&(i?r[_t]=e:delete r[_t]),o}var Ii=Wa;var Va=Object.prototype,Ja=Va.toString;function Ya(r){return Ja.call(r)}var Ai=Ya;var Qa="[object Null]",Za="[object Undefined]",Pi=N?N.toStringTag:void 0;function Xa(r){return r==null?r===void 0?Za:Qa:Pi&&Pi in Object(r)?Ii(r):Ai(r)}var te=Xa;function $a(r){return r!=null&&typeof r=="object"}var G=$a;var el="[object Symbol]";function tl(r){return typeof r=="symbol"||G(r)&&te(r)==el}var he=tl;function rl(r,i){for(var e=-1,t=r==null?0:r.length,o=Array(t);++e<t;)o[e]=i(r[e],e,r);return o}var Z=rl;var ol=Array.isArray,C=ol;var il=1/0,_i=N?N.prototype:void 0,Ei=_i?_i.toString:void 0;function Ui(r){if(typeof r=="string")return r;if(C(r))return Z(r,Ui)+"";if(he(r))return Ei?Ei.call(r):"";var i=r+"";return i=="0"&&1/r==-il?"-0":i}var ki=Ui;function nl(r){var i=typeof r;return r!=null&&(i=="object"||i=="function")}var O=nl;function sl(r){return r}var Se=sl;var al="[object AsyncFunction]",ll="[object Function]",cl="[object GeneratorFunction]",ul="[object Proxy]";function fl(r){if(!O(r))return!1;var i=te(r);return i==ll||i==cl||i==al||i==ul}var Sr=fl;var pl=D["__core-js_shared__"],wr=pl;
vendor: 4,541 bytes, line 2
2var Li=function(){var r=/[^.]+$/.exec(wr&&wr.keys&&wr.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}();function dl(r){return!!Li&&Li in r}var Di=dl;var hl=Function.prototype,ml=hl.toString;function gl(r){if(r!=null){try{return ml.call(r)}catch{}try{return r+""}catch{}}return""}var me=gl;var yl=/[\\^$.*+?()[\]{}|]/g,bl=/^\[object .+?Constructor\]$/,vl=Function.prototype,xl=Object.prototype,Sl=vl.toString,wl=xl.hasOwnProperty,Tl=RegExp("^"+Sl.call(wl).replace(yl,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Cl(r){if(!O(r)||Di(r))return!1;var i=Sr(r)?Tl:bl;return i.test(me(r))}var Ri=Cl;function Il(r,i){return r?.[i]}var Ni=Il;function Al(r,i){var e=Ni(r,i);return Ri(e)?e:void 0}var W=Al;var Pl=W(D,"WeakMap"),Tr=Pl;var ji=Object.create,_l=function(){function r(){}return function(i){if(!O(i))return{};if(ji)return ji(i);r.prototype=i;var e=new r;return r.prototype=void 0,e}}(),Oi=_l;function El(r,i,e){switch(e.length){case 0:return r.call(i);case 1:return r.call(i,e[0]);case 2:return r.call(i,e[0],e[1]);case 3:return r.call(i,e[0],e[1],e[2])}return r.apply(i,e)}var Fi=El;function Ul(){}var Mi=Ul;function kl(r,i){var e=-1,t=r.length;for(i||(i=Array(t));++e<t;)i[e]=r[e];return i}var Hi=kl;var Ll=800,Dl=16,Rl=Date.now;function Nl(r){var i=0,e=0;return function(){var t=Rl(),o=Dl-(t-e);if(e=t,o>0){if(++i>=Ll)return arguments[0]}else i=0;return r.apply(void 0,arguments)}}var Bi=Nl;function jl(r){return function(){return r}}var Gi=jl;var Ol=function(){try{var r=W(Object,"defineProperty");return r({},"",{}),r}catch{}}(),it=Ol;var Fl=it?function(r,i){return it(r,"toString",{configurable:!0,enumerable:!1,value:Gi(i),writable:!0})}:Se,Ki=Fl;var Ml=Bi(Ki),qi=Ml;function Hl(r,i){for(var e=-1,t=r==null?0:r.length;++e<t&&i(r[e],e,r)!==!1;);return r}var zi=Hl;function Bl(r,i,e,t){for(var o=r.length,n=e+(t?1:-1);t?n--:++n<o;)if(i(r[n],n,r))return n;return-1}var Wi=Bl;function Gl(r){return r!==r}var Vi=Gl;function Kl(r,i,e){for(var t=e-1,o=r.length;++t<o;)if(r[t]===i)return t;return-1}var Ji=Kl;function ql(r,i,e){return i===i?Ji(r,i,e):Wi(r,Vi,e)}var Yi=ql;function zl(r,i){var e=r==null?0:r.length;return!!e&&Yi(r,i,0)>-1}var Qi=zl;var Wl=9007199254740991,Vl=/^(?:0|[1-9]\d*)$/;function Jl(r,i){var e=typeof r;return i=i??Wl,!!i&&(e=="number"||e!="symbol"&&Vl.test(r))&&r>-1&&r%1==0&&r<i}var we=Jl;function Yl(r,i,e){i=="__proto__"&&it?it(r,i,{configurable:!0,enumerable:!0,value:e,writable:!0}):r[i]=e}var nt=Yl;function Ql(r,i){return r===i||r!==r&&i!==i}var Te=Ql;var Zl=Object.prototype,Xl=Zl.hasOwnProperty;function $l(r,i,e){var t=r[i];(!(Xl.call(r,i)&&Te(t,e))||e===void 0&&!(i in r))&&nt(r,i,e)}var st=$l;function ec(r,i,e,t){var o=!e;e||(e={});for(var n=-1,s=i.length;++n<s;){var a=i[n],l=t?t(e[a],r[a],a,e,r):void 0;l===void 0&&(l=r[a]),o?nt(e,a,l):st(e,a,l)}return e}var Ce=ec;var Zi=Math.max;function tc(r,i,e){return i=Zi(i===void 0?r.length-1:i,0),function(){for(var t=arguments,o=-1,n=Zi(t.length-i,0),s=Array(n);++o<n;)s[o]=t[i+o];o=-1;for(var a=Array(i+1);++o<i;)a[o]=t[o];return a[i]=e(s),Fi(r,this,a)}}var Xi=tc;function rc(r,i){return qi(Xi(r,i,Se),r+"")}var $i=rc;var oc=9007199254740991;function ic(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=oc}var at=ic;function nc(r){return r!=null&&at(r.length)&&!Sr(r)}var le=nc;function sc(r,i,e){if(!O(e))return!1;var t=typeof i;return(t=="number"?le(e)&&we(i,e.length):t=="string"&&i in e)?Te(e[i],r):!1}var Et=sc;var ac=Object.prototype;function lc(r){var i=r&&r.constructor,e=typeof i=="function"&&i.prototype||ac;return r===e}var lt=lc;function cc(r,i){for(var e=-1,t=Array(r);++e<r;)t[e]=i(e);return t}var en=cc;var uc="[object Arguments]";function fc(r){return G(r)&&te(r)==uc}var oo=fc;var tn=Object.prototype,pc=tn.hasOwnProperty,dc=tn.propertyIsEnumerable,hc=oo(function(){return arguments}())?oo:function(r){return G(r)&&pc.call(r,"callee")&&!dc.call(r,"callee")},ct=hc;function mc(){return!1}var rn=mc;var sn=typeof exports=="object"&&exports&&!exports.nodeType&&exports,on=sn&&typeof module=="object"&&module&&!module.nodeType&&module,gc=on&&on.exports===sn,nn=gc?D.Buffer:void 0,yc=nn?nn.isBuffer:void 0,bc=yc||rn,Ke=bc;var vc="[object Arguments]",xc="[object Array]",Sc="[object Boolean]",wc="[object Date]",Tc="[object Error]",Cc="[object Function]",Ic="[object Map]",Ac="[object Number]",Pc="[object Object]",_c="[object RegExp]",Ec="[object Set]",Uc="[object String]",kc="[object WeakMap]",Lc="[object ArrayBuffer]",Dc="[object DataView]",Rc="[object Float32Array]",Nc="[object Float64Array
2]",jc="[object Int8Array]",Oc="[object Int16Array]",Fc="[object Int32Array]",Mc="[object Uint8Array]",Hc="[object Uint8ClampedArray]",Bc="[object Uint16Array]",Gc="[object Uint32Array]",k={};k[Rc]=k[Nc]=k[jc]=k[Oc]=k[Fc]=k[Mc]=k[Hc]=k[Bc]=k[Gc]=!0;k[vc]=k[xc]=k[Lc]=k[Sc]=k[Dc]=k[wc]=k[Tc]=k[Cc]=k[Ic]=k[Ac]=k[Pc]=k[_c]=k[Ec]=k[Uc]=k[kc]=!1;function Kc(r){return G(r)&&at(r.length)&&!!k[te(r)]}var an=Kc;function qc(r){return function(i){return r(i)}}var Ie=qc;var ln=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ut=ln&&typeof module=="object"&&module&&!module.nodeType&&module,zc=Ut&&Ut.exports===ln,io=zc&&xr.process,Wc=function(){try{var r=Ut&&Ut.require&&Ut.require("util").types;return r||io&&io.binding&&io.binding("util")}catch{}}(),ge=Wc;var cn=ge&&ge.isTypedArray,Vc=cn?Ie(cn):an,Cr=Vc;var Jc=Object.prototype,Yc=Jc.hasOwnProperty;function Qc(r,i){var e=C(r),t=!e&&ct(r),o=!e&&!t&&Ke(r),n=!e&&!t&&!o&&Cr(r),s=e||t||o||n,a=s?en(r.length,String):[],l=a.length;for(var u in r)(i||Yc.call(r,u))&&!(s&&(u=="length"||o&&(u=="offset"||u=="parent")||n&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||we(u,l)))&&a.push(u);return a}var Ir=Qc;function Zc(r,i){return function(e){return r(i(e))}}var Ar=Zc;var Xc=Ar(Object.keys,Object),un=Xc;var $c=Object.prototype,eu=$c.hasOwnProperty;function tu(r){if(!lt(r))return un(r);var i=[];for(var e in Object(r))eu.call(r,e)&&e!="constructor"&&i.push(e);return i}var fn=tu;function ru(r){return le(r)?Ir(r):fn(r)}var X=ru;function ou(r){var i=[];if(r!=null)for(var e in Object(r))i.push(e);return i}var pn=ou;var iu=Object.prototype,nu=iu.hasOwnProperty;function su(r){if(!O(r))return pn(r);var i=lt(r),e=[];for(var t in r)t=="constructor"&&(i||!nu.call(r,t))||e.push(t);return e}var dn=su;function au(r){return le(r)?Ir(r,!0):dn(r)}var ut=au;var lu=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,cu=/^\w*$/;function uu(r,i){if(C(r))return!1;var e=typeof r;return e=="number"||e=="symbol"||e=="boolean"||r==null||he(r)?!0:cu.test(r)||!lu.test(r)||i!=null&&r in Object(i)}var ft=uu;var fu=W(Object,"create"),ye=fu;function pu(){this.__data__=ye?ye(null):{},this.size=0}var hn=pu;function du(r){var i=this.has(r)&&delete this.__data__[r];return this.size-=i?1:0,i}var mn=du;var hu="__lodash_hash_undefined__",mu=Object.prototype,gu=mu.hasOwnProperty;function yu(r){var i=this.__data__;if(ye){var e=i[r];return e===hu?void 0:e}return gu.call(i,r)?i[r]:void 0}var gn=yu;var bu=Object.prototype,vu=bu.hasOwnProperty;function xu(r){var i=this.__data__;return ye?i[r]!==void 0:vu.call(i,r)}var yn=xu;var Su="__lodash_hash_undefined__";function wu(r,i){var e=this.__data__;return this.size+=this.has(r)?0:1,e[r]=ye&&i===void 0?Su:i,this}var bn=wu;function pt(r){var i=-1,e=r==null?0:r.length;for(this.clear();++i<e;){var t=r[i];this.set(t[0],t[1])}}pt.prototype.clear=hn;pt.prototype.delete=mn;pt.prototype.get=gn;pt.prototype.has=yn;pt.prototype.set=bn;var no=pt;function Tu(){this.__data__=[],this.size=0}var vn=Tu;function Cu(r,i){for(var e=r.length;e--;)if(Te(r[e][0],i))return e;return-1}var Ae=Cu;var Iu=Array.prototype,Au=Iu.splice;function Pu(r){var i=this.__data__,e=Ae(i,r);if(e<0)return!1;var t=i.length-1;return e==t?i.pop():Au.call(i,e,1),--this.size,!0}var xn=Pu;function _u(r){var i=this.__data__,e=Ae(i,r);return e<0?void 0:i[e][1]}var Sn=_u;function Eu(r){return Ae(this.__data__,r)>-1}var wn=Eu;function Uu(r,i){var e=this.__data__,t=Ae(e,r);return t<0?(++this.size,e.push([r,i])):e[t][1]=i,this}var Tn=Uu;function dt(r){var i=-1,e=r==null?0:r.length;for(this.clear();++i<e;){var t=r[i];this.set(t[0],t[1])}}dt.prototype.clear=vn;dt.prototype.delete=xn;dt.prototype.get=Sn;dt.prototype.has=wn;dt.prototype.set=Tn;var Pe=dt;var ku=W(D,"Map"),_e=ku;function Lu(){this.size=0,this.__data__={hash:new no,map:new(_e||Pe),string:new no}}var Cn=Lu;function Du(r){var i=typeof r;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?r!=="__proto__":r===null}var In=Du;function Ru(r,i){var e=r.__data__;return In(i)?e[typeof i=="string"?"string":"hash"]:e.map}var Ee=Ru;function Nu(r){var i=Ee(this,r).delete(r);return this.size-=i?1:0,i}var An=Nu;function ju(r){return Ee(this,r).get(r)}var Pn=ju;function Ou(r){return Ee(this,r).has(r)}var _n=Ou;function Fu(r,i){var e=Ee(this,r),t=e.size;return e.set(r,i),this.size+=e.size==t?0:1,this}var En=Fu;function ht(r){var i=-1,e=r==null?0:r.length;for(this.clear();++i<e;){var t=r[i];this.set(t[0],t[1])}}ht.prototype.clear=Cn;ht.prototype.delete=An;ht.prototype.get=Pn;ht.prototype.has=_n;ht.prototype.set=En;var qe=ht;var Mu="Expected a function";function so(r,i){if(typeof r!="function"||i!=null&&typeof i!="function")throw new TypeError(Mu);var e=function(){var t=arguments,o=i?i.apply(this,t):t[0],n=e.cache;if(n.has(o))return n.get(o);var s=r.apply(this,t);return e.cache=n.set(o,s)||n,s};return e.cache=new(so.Cache||qe),e}so.Cache=qe;var Un=so;var Hu=500;function Bu(r){var i=Un(r,function(t){return e.size===Hu&&e.clear(),t}),e=i.cache;return i}var kn=Bu;var Gu=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ku=/\\(\\)?/g,qu=kn(function(r){var i=[];return r.charCodeAt(0)===46&&i.push(""),r.replace(Gu,function(e,t,o,n){i.push(o?n.replace(Ku,"$1"):t||e)}),i}),Ln=qu;function zu(r){return r==null?"":ki(r)}var Dn=zu;function Wu(r,i){return C(r)?r:ft(r,i)?[r]:Ln(Dn(r))}var Ue=Wu;var Vu=1/0;function Ju(r){if(typeof r=="string"||he(r))return r;var i=r+"";return i=="0"&&1/r==-Vu?"-0":i}var ce=Ju;function Yu(r,i){i=Ue(i,r);for(var e=0,t=i.length;r!=null&&e<t;)r=r[ce(i[e++])];return e&&e==t?r:void 0}var ke=Yu;function Qu(r,i,e){var t=r==null?void 0:ke(r,i);return t===void 0?e:t}var Rn=Qu;function Zu(r,i){for(var e=-1,t=i.length,o=r.length;++e<t;)r[o+e]=i[e];return r}var mt=Zu;var Nn=N?N.isConcatSpreadable:void 0;
2function Xu(r){return C(r)||ct(r)||!!(Nn&&r&&r[Nn])}var jn=Xu;function On(r,i,e,t,o){var n=-1,s=r.length;for(e||(e=jn),o||(o=[]);++n<s;){var a=r[n];i>0&&e(a)?i>1?On(a,i-1,e,t,o):mt(o,a):t||(o[o.length]=a)}return o}var Pr=On;var $u=Ar(Object.getPrototypeOf,Object),_r=$u;function ef(){this.__data__=new Pe,this.size=0}var Fn=ef;function tf(r){var i=this.__data__,e=i.delete(r);return this.size=i.size,e}var Mn=tf;function rf(r){return this.__data__.get(r)}var Hn=rf;function of(r){return this.__data__.has(r)}var Bn=of;var nf=200;function sf(r,i){var e=this.__data__;if(e instanceof Pe){var t=e.__data__;if(!_e||t.length<nf-1)return t.push([r,i]),this.size=++e.size,this;e=this.__data__=new qe(t)}return e.set(r,i),this.size=e.size,this}var Gn=sf;function gt(r){var i=this.__data__=new Pe(r);this.size=i.size}gt.prototype.clear=Fn;gt.prototype.delete=Mn;gt.prototype.get=Hn;gt.prototype.has=Bn;gt.prototype.set=Gn;var Le=gt;function af(r,i){return r&&Ce(i,X(i),r)}var Kn=af;function lf(r,i){return r&&Ce(i,ut(i),r)}var qn=lf;var Jn=typeof exports=="object"&&exports&&!exports.nodeType&&exports,zn=Jn&&typeof module=="object"&&module&&!module.nodeType&&module,cf=zn&&zn.exports===Jn,Wn=cf?D.Buffer:void 0,Vn=Wn?Wn.allocUnsafe:void 0;function uf(r,i){if(i)return r.slice();var e=r.length,t=Vn?Vn(e):new r.constructor(e);return r.copy(t),t}var Yn=uf;function ff(r,i){for(var e=-1,t=r==null?0:r.length,o=0,n=[];++e<t;){var s=r[e];i(s,e,r)&&(n[o++]=s)}return n}var Qn=ff;function pf(){return[]}var Er=pf;var df=Object.prototype,hf=df.propertyIsEnumerable,Zn=Object.getOwnPropertySymbols,mf=Zn?function(r){return r==null?[]:(r=Object(r),Qn(Zn(r),function(i){return hf.call(r,i)}))}:Er,yt=mf;function gf(r,i){return Ce(r,yt(r),i)}var Xn=gf;var yf=Object.getOwnPropertySymbols,bf=yf?function(r){for(var i=[];r;)mt(i,yt(r)),r=_r(r);return i}:Er,Ur=bf;function vf(r,i){return Ce(r,Ur(r),i)}var $n=vf;function xf(r,i,e){var t=i(r);return C(r)?t:mt(t,e(r))}var kr=xf;function Sf(r){return kr(r,X,yt)}var kt=Sf;function wf(r){return kr(r,ut,Ur)}var Lr=wf;var Tf=W(D,"DataView"),Dr=Tf;var Cf=W(D,"Promise"),Rr=Cf;var If=W(D,"Set"),De=If;var es="[object Map]",Af="[object Object]",ts="[object Promise]",rs="[object Set]",os="[object WeakMap]",is="[object DataView]",Pf=me(Dr),_f=me(_e),Ef=me(Rr),Uf=me(De),kf=me(Tr),ze=te;(Dr&&ze(new Dr(new ArrayBuffer(1)))!=is||_e&&ze(new _e)!=es||Rr&&ze(Rr.resolve())!=ts||De&&ze(new De)!=rs||Tr&&ze(new Tr)!=os)&&(ze=function(r){var i=te(r),e=i==Af?r.constructor:void 0,t=e?me(e):"";if(t)switch(t){case Pf:return is;case _f:return es;case Ef:return ts;case Uf:return rs;case kf:return os}return i});var be=ze;var Lf=Object.prototype,Df=Lf.hasOwnProperty;function Rf(r){var i=r.length,e=new r.constructor(i);return i&&typeof r[0]=="string"&&Df.call(r,"index")&&(e.index=r.index,e.input=r.input),e}var ns=Rf;var Nf=D.Uint8Array,bt=Nf;function jf(r){var i=new r.constructor(r.byteLength);return new bt(i).set(new bt(r)),i}var vt=jf;function Of(r,i){var e=i?vt(r.buffer):r.buffer;return new r.constructor(e,r.byteOffset,r.byteLength)}var ss=Of;var Ff=/\w*$/;function Mf(r){var i=new r.constructor(r.source,Ff.exec(r));return i.lastIndex=r.lastIndex,i}var as=Mf;var ls=N?N.prototype:void 0,cs=ls?ls.valueOf:void 0;function Hf(r){return cs?Object(cs.call(r)):{}}var us=Hf;function Bf(r,i){var e=i?vt(r.buffer):r.buffer;return new r.constructor(e,r.byteOffset,r.length)}var fs=Bf;var Gf="[object Boolean]",Kf="[object Date]",qf="[object Map]",zf="[object Number]",Wf="[object RegExp]",Vf="[object Set]",Jf="[object String]",Yf="[object Symbol]",Qf="[object ArrayBuffer]",Zf="[object DataView]",Xf="[object Float32Array]",$f="[object Float64Array]",ep="[object Int8Array]",tp="[object Int16Array]",rp="[object Int32Array]",op="[object Uint8Array]",ip="[object Uint8ClampedArray]",np="[object Uint16Array]",sp="[object Uint32Array]";function ap(r,i,e){var t=r.constructor;switch(i){case Qf:return vt(r);case Gf:case Kf:return new t(+r);case Zf:return ss(r,e);case Xf:case $f:case ep:case tp:case rp:case op:case ip:case np:case sp:return fs(r,e);case qf:return new t;case zf:case Jf:return new t(r);case Wf:return as(r);case Vf:return new t;case Yf:return us(r)}}var ps=ap;function lp(r){return typeof r.constructor=="function"&&!lt(r)?Oi(_r(r)):{}}var ds=lp;var cp="[object Map]";function up(r){return G(r)&&be(r)==cp}var hs=up;var ms=ge&&ge.isMap,fp=ms?Ie(ms):hs,gs=fp;var pp="[object Set]";function dp(r){return G(r)&&be(r)==pp}var ys=dp;var bs=ge&&ge.isSet,hp=bs?Ie(bs):ys,vs=hp;var mp=1,gp=2,yp=4,xs="[object Arguments]",bp="[object Array]",vp="[object Boolean]",xp="[object Date]",Sp="[object Error]",Ss="[object Function]",wp="[object GeneratorFunction]",Tp="[object Map]",Cp="[object Number]",ws="[object Object]",Ip="[object RegExp]",Ap="[object Set]",Pp="[object String]",_p="[object Symbol]",Ep="[object WeakMap]",Up="[object ArrayBuffer]",kp="[object DataView]",Lp="[object Float32Array]",Dp="[object Float64Array
2]",Rp="[object Int8Array]",Np="[object Int16Array]",jp="[object Int32Array]",Op="[object Uint8Array]",Fp="[object Uint8ClampedArray]",Mp="[object Uint16Array]",Hp="[object Uint32Array]",_={};_[xs]=_[bp]=_[Up]=_[kp]=_[vp]=_[xp]=_[Lp]=_[Dp]=_[Rp]=_[Np]=_[jp]=_[Tp]=_[Cp]=_[ws]=_[Ip]=_[Ap]=_[Pp]=_[_p]=_[Op]=_[Fp]=_[Mp]=_[Hp]=!0;_[Sp]=_[Ss]=_[Ep]=!1;function Nr(r,i,e,t,o,n){var s,a=i&mp,l=i&gp,u=i&yp;if(e&&(s=o?e(r,t,o,n):e(r)),s!==void 0)return s;if(!O(r))return r;var p=C(r);if(p){if(s=ns(r),!a)return Hi(r,s)}else{var c=be(r),d=c==Ss||c==wp;if(Ke(r))return Yn(r,a);if(c==ws||c==xs||d&&!o){if(s=l||d?{}:ds(r),!a)return l?$n(r,qn(s,r)):Xn(r,Kn(s,r))}else{if(!_[c])return o?r:{};s=ps(r,c,a)}}n||(n=new Le);var m=n.get(r);if(m)return m;n.set(r,s),vs(r)?r.forEach(function(I){s.add(Nr(I,i,e,I,r,n))}):gs(r)&&r.forEach(function(I,E){s.set(E,Nr(I,i,e,E,r,n))});var y=u?l?Lr:kt:l?ut:X,S=p?void 0:y(r);return zi(S||r,function(I,E){S&&(E=I,I=r[E]),st(s,E,Nr(I,i,e,E,r,n))}),s}var Ts=Nr;var Bp=4;function Gp(r){return Ts(r,Bp)}var Kp=Gp;function qp(r){for(var i=-1,e=r==null?0:r.length,t=0,o=[];++i<e;){var n=r[i];n&&(o[t++]=n)}return o}var zp=qp;var Wp="__lodash_hash_undefined__";function Vp(r){return this.__data__.set(r,Wp),this}var Cs=Vp;function Jp(r){return this.__data__.has(r)}var Is=Jp;function jr(r){var i=-1,e=r==null?0:r.length;for(this.__data__=new qe;++i<e;)this.add(r[i])}jr.prototype.add=jr.prototype.push=Cs;jr.prototype.has=Is;var Or=jr;function Yp(r,i){for(var e=-1,t=r==null?0:r.length;++e<t;)if(i(r[e],e,r))return!0;return!1}var Fr=Yp;function Qp(r,i){return r.has(i)}var Mr=Qp;var Zp=1,Xp=2;function $p(r,i,e,t,o,n){var s=e&Zp,a=r.length,l=i.length;if(a!=l&&!(s&&l>a))return!1;var u=n.get(r),p=n.get(i);if(u&&p)return u==i&&p==r;var c=-1,d=!0,m=e&Xp?new Or:void 0;for(n.set(r,i),n.set(i,r);++c<a;){var y=r[c],S=i[c];if(t)var I=s?t(S,y,c,i,r,n):t(y,S,c,r,i,n);if(I!==void 0){if(I)continue;d=!1;break}if(m){if(!Fr(i,function(E,v){if(!Mr(m,v)&&(y===E||o(y,E,e,t,n)))return m.push(v)})){d=!1;break}}else if(!(y===S||o(y,S,e,t,n))){d=!1;break}}return n.delete(r),n.delete(i),d}var Hr=$p;function ed(r){var i=-1,e=Array(r.size);return r.forEach(function(t,o){e[++i]=[o,t]}),e}var As=ed;function td(r){var i=-1,e=Array(r.size);return r.forEach(function(t){e[++i]=t}),e}var xt=td;var rd=1,od=2,id="[object Boolean]",nd="[object Date]",sd="[object Error]",ad="[object Map]",ld="[object Number]",cd="[object RegExp]",ud="[object Set]",fd="[object String]",pd="[object Symbol]",dd="[object ArrayBuffer]",hd="[object DataView]",Ps=N?N.prototype:void 0,ao=Ps?Ps.valueOf:void 0;function md(r,i,e,t,o,n,s){switch(e){case hd:if(r.byteLength!=i.byteLength||r.byteOffset!=i.byteOffset)return!1;r=r.buffer,i=i.buffer;case dd:return!(r.byteLength!=i.byteLength||!n(new bt(r),new bt(i)));case id:case nd:case ld:return Te(+r,+i);case sd:return r.name==i.name&&r.message==i.message;case cd:case fd:return r==i+"";case ad:var a=As;case ud:var l=t&rd;if(a||(a=xt),r.size!=i.size&&!l)return!1;var u=s.get(r);if(u)return u==i;t|=od,s.set(r,i);var p=Hr(a(r),a(i),t,o,n,s);return s.delete(r),p;case pd:if(ao)return ao.call(r)==ao.call(i)}return!1}var _s=md;var gd=1,yd=Object.prototype,bd=yd.hasOwnProperty;function vd(r,i,e,t,o,n){var s=e&gd,a=kt(r),l=a.length,u=kt(i),p=u.length;if(l!=p&&!s)return!1;for(var c=l;c--;){var d=a[c];if(!(s?d in i:bd.call(i,d)))return!1}var m=n.get(r),y=n.get(i);if(m&&y)return m==i&&y==r;var S=!0;n.set(r,i),n.set(i,r);for(var I=s;++c<l;){d=a[c];var E=r[d],v=i[d];if(t)var Re=s?t(v,E,d,i,r,n):t(E,v,d,r,i,n);if(!(Re===void 0?E===v||o(E,v,e,t,n):Re)){S=!1;break}I||(I=d=="constructor")}if(S&&!I){var Ne=r.constructor,We=i.constructor;Ne!=We&&"constructor"in r&&"constructor"in i&&!(typeof Ne=="function"&&Ne instanceof Ne&&typeof We=="function"&&We instanceof We)&&(S=!1)}return n.delete(r),n.delete(i),S}var Es=vd;var xd=1,Us="[object Arguments]",ks="[object Array]",Br="[object Object]",Sd=Object.prototype,Ls=Sd.hasOwnProperty;function wd(r,i,e,t,o,n){var s=C(r),a=C(i),l=s?ks:be(r),u=a?ks:be(i);l=l==Us?Br:l,u=u==Us?Br:u;var p=l==Br,c=u==Br,d=l==u;if(d&&Ke(r)){if(!Ke(i))return!1;s=!0,p=!1}if(d&&!p)return n||(n=new Le),s||Cr(r)?Hr(r,i,e,t,o,n):_s(r,i,l,e,t,o,n);if(!(e&xd)){var m=p&&Ls.call(r,"__wrapped__"),y=c&&Ls.call(i,"__wrapped__");
vendor: 1,440 bytes, line 2
2if(m||y){var S=m?r.value():r,I=y?i.value():i;return n||(n=new Le),o(S,I,e,t,n)}}return d?(n||(n=new Le),Es(r,i,e,t,o,n)):!1}var Ds=wd;function Rs(r,i,e,t,o){return r===i?!0:r==null||i==null||!G(r)&&!G(i)?r!==r&&i!==i:Ds(r,i,e,t,Rs,o)}var Gr=Rs;var Td=1,Cd=2;function Id(r,i,e,t){var o=e.length,n=o,s=!t;if(r==null)return!n;for(r=Object(r);o--;){var a=e[o];if(s&&a[2]?a[1]!==r[a[0]]:!(a[0]in r))return!1}for(;++o<n;){a=e[o];var l=a[0],u=r[l],p=a[1];if(s&&a[2]){if(u===void 0&&!(l in r))return!1}else{var c=new Le;if(t)var d=t(u,p,l,r,i,c);if(!(d===void 0?Gr(p,u,Td|Cd,t,c):d))return!1}}return!0}var Ns=Id;function Ad(r){return r===r&&!O(r)}var Kr=Ad;function Pd(r){for(var i=X(r),e=i.length;e--;){var t=i[e],o=r[t];i[e]=[t,o,Kr(o)]}return i}var js=Pd;function _d(r,i){return function(e){return e==null?!1:e[r]===i&&(i!==void 0||r in Object(e))}}var qr=_d;function Ed(r){var i=js(r);return i.length==1&&i[0][2]?qr(i[0][0],i[0][1]):function(e){return e===r||Ns(e,r,i)}}var Os=Ed;function Ud(r,i){return r!=null&&i in Object(r)}var Fs=Ud;function kd(r,i,e){i=Ue(i,r);for(var t=-1,o=i.length,n=!1;++t<o;){var s=ce(i[t]);if(!(n=r!=null&&e(r,s)))break;r=r[s]}return n||++t!=o?n:(o=r==null?0:r.length,!!o&&at(o)&&we(s,o)&&(C(r)||ct(r)))}var Ms=kd;function Ld(r,i){return r!=null&&Ms(r,i,Fs)}var Hs=Ld;var Dd=1,Rd=2;function Nd(r,i){return ft(r)&&Kr(i)?qr(ce(r),i):function(e){var t=Rn(e,r);return t===void 0&&t===i?Hs(e,r):Gr(i,t,Dd|Rd)}}var Bs=Nd;
2function jd(r){return function(i){return i?.[r]}}var Gs=jd;function Od(r){return function(i){return ke(i,r)}}var Ks=Od;function Fd(r){return ft(r)?Gs(ce(r)):Ks(r)}var qs=Fd;function Md(r){return typeof r=="function"?r:r==null?Se:typeof r=="object"?C(r)?Bs(r[0],r[1]):Os(r):qs(r)}var ue=Md;function Hd(r,i,e,t){for(var o=-1,n=r==null?0:r.length;++o<n;){var s=r[o];i(t,s,e(s),r)}return t}var zs=Hd;function Bd(r){return function(i,e,t){for(var o=-1,n=Object(i),s=t(i),a=s.length;a--;){var l=s[r?a:++o];if(e(n[l],l,n)===!1)break}return i}}var Ws=Bd;var Gd=Ws(),Vs=Gd;function Kd(r,i){return r&&Vs(r,i,X)}var Js=Kd;function qd(r,i){return function(e,t){if(e==null)return e;if(!le(e))return r(e,t);for(var o=e.length,n=i?o:-1,s=Object(e);(i?n--:++n<o)&&t(s[n],n,s)!==!1;);return e}}var Ys=qd;var zd=Ys(Js),St=zd;function Wd(r,i,e,t){return St(r,function(o,n,s){i(t,o,e(o),s)}),t}var Qs=Wd;function Vd(r,i){return function(e,t){var o=C(e)?zs:Qs,n=i?i():{};return o(e,r,ue(t,2),n)}}var Zs=Vd;var Jd=Object.prototype,Yd=Jd.hasOwnProperty,Qd=Zs(function(r,i,e){Yd.call(r,e)?++r[e]:nt(r,e,1)}),Zd=Qd;function Xd(r,i,e){for(var t=-1,o=r==null?0:r.length;++t<o;)if(e(i,r[t]))return!0;return!1}var Xs=Xd;function $d(r,i){var e=-1,t=le(r)?Array(r.length):[];return St(r,function(o,n,s){t[++e]=i(o,n,s)}),t}var zr=$d;function eh(r,i){var e=C(r)?Z:zr;return e(r,ue(i,3))}var lo=eh;function th(r,i){return Pr(lo(r,i),1)}var rh=th;function oh(r,i){return Z(i,function(e){return r[e]})}var $s=oh;function ih(r){return r==null?[]:$s(r,X(r))}var nh=ih;function sh(r,i,e,t){if(!O(r))return r;i=Ue(i,r);for(var o=-1,n=i.length,s=n-1,a=r;a!=null&&++o<n;){var l=ce(i[o]),u=e;if(l==="__proto__"||l==="constructor"||l==="prototype")return r;if(o!=s){var p=a[l];u=t?t(p,l,a):void 0,u===void 0&&(u=O(p)?p:we(i[o+1])?[]:{})}st(a,l,u),a=a[l]}return r}var ea=sh;function ah(r,i,e){for(var t=-1,o=i.length,n={};++t<o;){var s=i[t],a=ke(r,s);e(a,s)&&ea(n,Ue(s,r),a)}return n}var ta=ah;function lh(r,i){if(r==null)return{};var e=Z(Lr(r),function(t){return[t]});return i=ue(i),ta(r,e,function(t,o){return i(t,o[0])})}var ch=lh;function uh(r,i){var e=r.length;for(r.sort(i);e--;)r[e]=r[e].value;return r}var ra=uh;function fh(r,i){if(r!==i){var e=r!==void 0,t=r===null,o=r===r,n=he(r),s=i!==void 0,a=i===null,l=i===i,u=he(i);if(!a&&!u&&!n&&r>i||n&&s&&l&&!a&&!u||t&&s&&l||!e&&l||!o)return 1;if(!t&&!n&&!u&&r<i||u&&e&&o&&!t&&!n||a&&e&&o||!s&&o||!l)return-1}return 0}var oa=fh;function ph(r,i,e){for(var t=-1,o=r.criteria,n=i.criteria,s=o.length,a=e.length;++t<s;){var l=oa(o[t],n[t]);if(l){if(t>=a)return l;var u=e[t];return l*(u=="desc"?-1:1)}}return r.index-i.index}var ia=ph;function dh(r,i,e){i.length?i=Z(i,function(n){return C(n)?function(s){return ke(s,n.length===1?n[0]:n)}:n}):i=[Se];var t=-1;i=Z(i,Ie(ue));var o=zr(r,function(n,s,a){var l=Z(i,function(u){return u(n)});return{criteria:l,index:++t,value:n}});return ra(o,function(n,s){return ia(n,s,e)})}var Wr=dh;function hh(r,i,e,t){return r==null?[]:(C(i)||(i=i==null?[]:[i]),e=t?void 0:e,C(e)||(e=e==null?[]:[e]),Wr(r,i,e))}var mh=hh;function gh(r,i){var e;return St(r,function(t,o,n){return e=i(t,o,n),!e}),!!e}var na=gh;function yh(r,i,e){var t=C(r)?Fr:na;return e&&Et(r,i,e)&&(i=void 0),t(r,ue(i,3))}var bh=yh;var vh=$i(function(r,i){if(r==null)return[];var e=i.length;return e>1&&Et(r,i[0],i[1])?i=[]:e>2&&Et(i[0],i[1],i[2])&&(i=[i[0]]),Wr(r,Pr(i,1),[])}),co=vh;var xh=1/0,Sh=De&&1/xt(new De([,-0]))[1]==xh?function(r){return new De(r)}:Mi,sa=Sh;var wh=200;function Th(r,i,e){var t=-1,o=Qi,n=r.length,s=!0,a=[],l=a;if(e)s=!1,o=Xs;else if(n>=wh){var u=i?null:sa(r);if(u)return xt(u);s=!1,o=Mr,l=new Or}else l=i?[]:a;e:for(;++t<n;){var p=r[t],c=i?i(p):p;if(p=e||p!==0?p:0,s&&c===c){for(var d=l.length;d--;)if(l[d]===c)continue e;i&&l.push(c),a.push(p)}else o(l,c,e)||(l!==a&&l.push(c),a.push(p))}return a}var aa=Th;function Ch(r){return r&&r.length?aa(r):[]}var Ih=Ch;var la={availableCountries:[],isLoading:!1,error:null},ca=(()=>{class r extends pr(mr(la),dr(e=>{let t=h($);return{getCountryByCode:L(()=>o=>e.availableCountries().find(n=>n.code===o)??null),prioritizedCountries:L(()=>{let o=t.currentCountry();return co(e.availableCountries(),n=>n.code!==o)}),getCountryName:L(()=>o=>e.availableCountries().find(s=>s.code===o)?.name??o),hasCountries:L(()=>e.availableCountries().length>0),sortedCountries:L(()=>[...e.availableCountries()].sort((o,n)=>o.name.localeCompare(n.name)))}}),hr(e=>{let t=h(vr);return{loadCountries:ro(go(Ye(()=>B(e,{isLoading:!0,error:null}
2)),Rt(o=>t.getCountries(o).pipe(Ye(n=>{B(e,{availableCountries:n,isLoading:!1,error:null})}),F(n=>(console.error("Failed to load countries:",n),B(e,{availableCountries:[],isLoading:!1,error:"Failed to load countries"}),w([]))))))),setCountries:o=>{B(e,{availableCountries:o,isLoading:!1,error:null})},setLoading:o=>{B(e,{isLoading:o})},setError:o=>{B(e,{error:o,isLoading:!1})},clearCountries:()=>{B(e,{availableCountries:[],error:null})},reset:()=>{B(e,la)}}})){static{this.\u0275fac=(()=>{let e;return function(o){return(e||(e=Qe(r)))(o||r)}})()}static{this.\u0275prov=x({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var ua=(()=>{class r{constructor(){this.document=h(Xe),this.translateService=h(Ho),this.domainService=h($),this.countryService=h(vr),this.userService=h(Zt),this.languageStore=h(br),this.countryStore=h(ca),this.api=h(ae),this.auth=h(vi),this.currentLanguage=this.languageStore.currentLanguage,this.supportedLanguages=this.languageStore.supportedLanguagesForDomain,this.availableLanguages=this.languageStore.availableLanguages,this.availableCountries=this.countryStore.availableCountries,this.prioritizedCountries=this.countryStore.prioritizedCountries,this.isLoadingLanguages=this.languageStore.isLoading,this.isLoadingCountries=this.countryStore.isLoading,this.currentDomain=this.domainService.currentDomain,this.currentCountry=this.domainService.currentRegion,this.currentLanguageSubject=Bo(this.currentLanguage),this.getFieldWithLanguageSuffix=this.languageStore.getFieldWithLanguageSuffix,this.translateService.addLangs(this.supportedLanguages().map(e=>e.code)),this.translateService.setDefaultLang(this.domainService.defaultLanguage()),this.initializeLocaleService()}initializeLocaleService(){return oe(this,null,function*(){try{let e=this.detectInitialLanguage();this.languageStore.initialize(e),yield this.setLanguage(e.code,!1)}catch(e){console.error("Failed to initialize locale service:",e),this.languageStore.setError("Initialization failed");let t=this.domainService.defaultLanguage();yield this.setLanguage(t,!1)}})}setLanguage(e,t=!0){return oe(this,null,function*(){try{this.languageStore.setCurrentLanguage(e),this.translateService.use(e),this.document.documentElement.lang=e,this.saveLanguagePreference(e),this.countryStore.loadCountries(e),t&&(yield this.updateUserLanguagePreference(e))}catch(o){console.error("Failed to set language:",o),this.languageStore.setError("Failed to change language")}})}getCurrentLanguage(){return this.languageStore.currentLanguage().code}isLanguageAvailable(e){return this.languageStore.isLanguageSupported()(e)}getFieldLanguageSuffix(e,t,o=!1){let n=t??this.getCurrentLanguage();if(n==="nl")return o&&this.domainService.getCurrentRegion()==="BE"?`${e}Be`:e;let s=n.charAt(0).toUpperCase()+n.slice(1);return`${e}${s}`}getLocalizedField(e,t,o,n=!1){return Si(e,this.getFieldLanguageSuffix(t,o,n),t)}toFilterOptions(e,t="id",o="name",n=!0,s,a=!1){let l=e.map(u=>({value:t==="id"?u.id:u[t],label:this.getLocalizedField(u,o,s,a)}));return n&&l.sort((u,p)=>u.label.localeCompare(p.label)),l}getCountryName(e){return this.availableCountries().find(o=>o.code===e)?.name??e}get config(){return{language:{available_languages:this.supportedLanguages(),current:this.getCurrentLanguage(),list:this.supportedLanguages()},country:{available_countries:this.availableCountries()}}}setCurrentLanguage(e,t=!0){return this.setLanguage(e,t)}getLanguageTypeahead(){return w(this.availableLanguages())}getLanguageName(e,t){if(!e)return"";let o=t||this.currentLanguage().code;try{let n=new Intl.DisplayNames([o],{type:"language",style:"long"}).of(e);if(n&&n.toLowerCase()!==e.toLowerCase())return n}catch{}return e}apiGetRegions(){return this.api.setEndpoint("region"),this.api.GET()}detectInitialLanguage(){let e=this.getSavedLanguagePreference();if(e&&this.domainService.isLanguageSupported(e))return this.languageStore.getLanguageByCode(e);let t=this.domainService.defaultLanguage();if(t)return this.languageStore.getLanguageByCode(t);let o=navigator.language.substring(0,2);return this.domainService.isLanguageSupported(o)?this.languageStore.getLanguageByCode(o):this.languageStore.currentLanguage()}updateUserLanguagePreference(e){return oe(this,null,function*(){try{if(!(yield Ve(this.auth.isAuthenticated$.pipe(Lt(1)))))return;let o=yield Ve(this.userService.apiGetAccountCurrent());o&&(o.preferredLanguage=e,yield Ve(this.userService.apiUpdateAccountCurrent(o.id,o)))}catch(t){console.error("Failed to update user language preference:",t)}})}saveLanguagePreference(e){try{localStorage.setItem("user-language",e)}catch(t){console.warn("Could not save language preference:",t)}}getSavedLanguagePreference(){try{return localStorage.getItem("user-language")}catch{return null}}clearCache(){this.languageStore.reset(),this.countryStore.reset(),this.countryService.clearCache(),localStorage.removeItem("user-language")}getDomainService(){return this.domainService}getCountryService(){return this.countryService}static{this.\u0275fac=function(t){return new(t||r)}}static{this.\u0275prov=x({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var J={Generic:"Generic",Video:"Video",Event:"Event",Testimonial:"Testimonial",Blog:"Blog",Post:"Post",Project:"Project",School:"School"},x0={MainImage:"MainImage",GalleryImage:"GalleryImage",LogoImage:"LogoImage",ContentImage:"ContentImage"},uo={Student:"Student",Company:"Company",School:"School"},S0={Middelbaar:"Middelbaar",Vervolgonderwijs:"Vervolgonderwijs"},fo={Concept:"Concept",Published:"Published",Removed:"Removed"},w0=(()=>
2{class r{constructor(){this.api=h(ae),this.alertService=h(tt),this.locale=h(ua)}isGUID(e){return new RegExp("^[{]?[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}[}]?$").test(e)}getTypes(){return[{value:J.Generic,name:"Generic"},{value:J.Blog,name:"Blog"},{value:J.Event,name:"Event"},{value:J.Video,name:"Video"},{value:J.Testimonial,name:"Testimonial"},{value:J.Project,name:"Project"},{value:J.School,name:"School"}]}getTypeName(e){switch(e){case J.Testimonial:return"Testimonial";case J.Blog:return"News";case J.Video:return"Video";case J.Generic:return"Page";case J.Event:return"Event";case J.Project:return"Project";default:return""}}getStatuses(){return[{value:fo.Concept,name:"Concept"},{value:fo.Published,name:"Published"},{value:fo.Removed,name:"Removed"}]}getTestimonialTypes(){return[{value:uo.Company,name:"Company"},{value:uo.Student,name:"Student"},{value:uo.School,name:"School"}]}apiGetExternalPage(e){return this.api.setEndpoint("externalpage/"+e),this.api.GET()}apiGetExternalPageType(e,t=null,o=null,n=null){return n?this.api.setEndpoint("externalpage/type/"+e+"/"+n):this.api.setEndpoint("externalpage/type/"+e),this.api.GET(t,o)}apiGetExternalPagePermalink(e){return this.api.setEndpoint("externalpage/permalink/"+e),this.api.GET()}apiAddExternalPage(e){let t={status:e.status,type:e.type,publicationDate:e.publicationDate,title:f(e.title)?null:e.title,titleEn:f(e.titleEn)?null:e.titleEn,titleDe:f(e.titleDe)?null:e.titleDe,titleFr:f(e.titleFr)?null:e.titleFr,titlePt:f(e.titlePt)?null:e.titlePt,content:f(e.content)?null:e.content,contentEn:f(e.contentEn)?null:e.contentEn,contentDe:f(e.contentDe)?null:e.contentDe,contentFr:f(e.contentFr)?null:e.contentFr,contentPt:f(e.contentPt)?null:e.contentPt,metaDescription:f(e.metaDescription)?null:e.metaDescription,metaDescriptionEn:f(e.metaDescriptionEn)?null:e.metaDescriptionEn,metaDescriptionDe:f(e.metaDescriptionDe)?null:e.metaDescriptionDe,metaDescriptionFr:f(e.metaDescriptionFr)?null:e.metaDescriptionFr,metaDescriptionPt:f(e.metaDescriptionPt)?null:e.metaDescriptionPt,metaKeywords:f(e.metaKeywords)?null:e.metaKeywords,metaKeywordsEn:f(e.metaKeywordsEn)?null:e.metaKeywordsEn,metaKeywordsDe:f(e.metaKeywordsDe)?null:e.metaKeywordsDe,metaKeywordsFr:f(e.metaKeywordsFr)?null:e.metaKeywordsFr,metaKeywordsPt:f(e.metaKeywordsPt)?null:e.metaKeywordsPt,permalink:f(e.permalink)?null:e.permalink,regions:f(e.regions)?[]:e.regions,targetGroups:f(e.targetGroups)?[]:e.targetGroups,linkedMeetDays:f(e.linkedMeetDays)?[]:e.linkedMeetDays,eventDate:e.eventDate,eventPeriodDescription:e.eventPeriodDescription,testimonialName:e.testimonialName,testimonialOrganisation:e.testimonialOrganisation,testimonialType:e.testimonialType,videoUri:f(e.videoUri)?null:e.videoUri,imageReferences:f(e.imageReferences)?null:e.imageReferences,schoolType:f(e.schoolType)?null:e.schoolType};return!f(e.address)&&!f(e.address.street)&&(t.address=e.address),this.api.setEndpoint("externalpage"),this.api.POST(t)}apiUpdateExternalPage(e,t){let o={id:t.id,status:t.status,type:t.type,publicationDate:t.publicationDate,title:f(t.title)?null:t.title,titleEn:f(t.titleEn)?null:t.titleEn,titleDe:f(t.titleDe)?null:t.titleDe,titleFr:f(t.titleFr)?null:t.titleFr,titlePt:f(t.titlePt)?null:t.titlePt,content:f(t.content)?null:t.content,contentEn:f(t.contentEn)?null:t.contentEn,contentDe:f(t.contentDe)?null:t.contentDe,contentFr:f(t.contentFr)?null:t.contentFr,contentPt:f(t.contentPt)?null:t.contentPt,metaDescription:f(t.metaDescription)?null:t.metaDescription,metaDescriptionEn:f(t.metaDescriptionEn)?null:t.metaDescriptionEn,metaDescriptionDe:f(t.metaDescriptionDe)?null:t.metaDescriptionDe,metaDescriptionFr:f(t.metaDescriptionFr)?null:t.metaDescriptionFr,metaDescriptionPt:f(t.metaDescriptionPt)?null:t.metaDescriptionPt,metaKeywords:f(t.metaKeywords)?null:t.metaKeywords,metaKeywordsEn:f(t.metaKeywordsEn)?null:t.metaKeywordsEn,metaKeywordsDe:f(t.metaKeywordsDe)?null:t.metaKeywordsDe,metaKeywordsFr:f(t.metaKeywordsFr)?null:t.metaKeywordsFr,metaKeywordsPt:f(t.metaKeywordsPt)?null:t.metaKeywordsPt,permalink:f(t.permalink)?null:t.permalink,regions:f(t.regions)?[]:t.regions,targetGroups:f(t.targetGroups)?[]:t.targetGroups,linkedMeetDays:f(t.linkedMeetDays)?[]:t.linkedMeetDays,eventDate:t.eventDate,eventPeriodDescription:t.eventPeriodDescription,testimonialName:t.testimonialName,testimonialOrganisation:t.testimonialOrganisation,testimonialType:t.testimonialType,videoUri:f(t.videoUri)?null:t.videoUri,imageReferences:f(t.imageReferences)?null:t.imageReferences,schoolType:f(t.schoolType)?null:t.schoolType};return!f(t.address)&&!f(t.address.street)&&(o.address=t.address),this.api.setEndpoint("externalpage/"+e),this.api.PUT(o)}apiDeleteExternalPage(e){return this.api.setEndpoint("externalpage/"+e),this.api.DELETE()}apiCreateExternalPageImage(e,t){let o={imageType:t.imageType,title:f(t.title)?null:t.title,de
2scription:f(t.description)?null:t.description,imageUri:f(t.imageUri)?null:t.imageUri,youtubeUri:f(t.youtubeUri)?null:t.youtubeUri};return this.api.setEndpoint("externalpage/"+e+"/images"),this.api.POST(o)}apiDeleteExternalPageImage(e,t){return this.api.setEndpoint("externalpage/"+e+"/images/"+t),this.api.DELETE()}apiGetExternalPageImages(e){return this.api.setEndpoint("externalpage/"+e+"/images"),this.api.GET()}handleError(e="operation",t){return o=>{let n="";if(o.hasOwnProperty("error")&&(o.error.hasOwnProperty("title")&&(n=o.error.title),o.error.hasOwnProperty("errors"))){n=n+"<br>";for(let s of Object.keys(o.error.errors)){let a=o.error.errors[s];n=n+"<br>"+a}}return this.alertService.error("Error: "+n),w(t)}}getTranslatedTitle(e){let t=this.locale.getCurrentLanguage().toLowerCase(),o=e.title;switch(t){case"en":f(e.titleEn)||(o=e.titleEn);break;case"de":f(e.titleDe)||(o=e.titleDe);break;case"fr":f(e.titleFr)||(o=e.titleFr);break;case"pt":f(e.titlePt)||(o=e.titlePt);break;case"nl":default:o=e.title;break}return o}getTranslatedContent(e){let t=this.locale.getCurrentLanguage().toLowerCase(),o=e.content;switch(t){case"en":f(e.contentEn)||(o=e.contentEn);break;case"de":f(e.contentDe)||(o=e.contentDe);break;case"fr":f(e.contentFr)||(o=e.contentFr);break;case"pt":f(e.contentPt)||(o=e.contentPt);break;case"nl":default:o=e.content;break}return o||(o=""),o}static{this.\u0275fac=function(t){return new(t||r)}}static{this.\u0275prov=x({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();export{se as a,Ah as b,Ht as c,Ph as d,_h as e,Yt as f,si as g,Gt as h,qt as i,rt as j,ot as k,sm as l,Q as m,$ as n,ae as o,Qt as p,Be as q,ii as r,Zt as s,f as t,xm as u,Sm as v,Jt as w,li as x,ci as y,ui as z,fi as A,pi as B,di as C,de as D,hi as E,mi as F,Ge as G,gi as H,yi as I,ei as J,ti as K,bi as L,vi as M,B as N,pr as O,dr as P,$b as Q,hr as R,mr as S,br as T,ro as U,Kp as V,zp as W,Zd as X,lo as Y,rh as Z,nh as _,ch as $,mh as aa,bh as ba,Ih as ca,ua as da,J as ea,x0 as fa,S0 as ga,fo as ha,w0 as ia}; 3!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="5d883854-ab2c-5670-b086-e87ebc44f85b")}catch(e){}}(); 4//# debugId=5d883854-ab2c-5670-b086-e87ebc44f85b
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.