import{Q as a,i as c}from"./chunk-LN23P53Z.js";import{ca as s,ha as r}from"./chunk-2BMUMDG3.js";import{i as n}from"./chunk-2AVGQ2MQ.js";var g=(()=>{class e{constructor(t,o){this.http=t,this.router=o,this.configLoaded=!1,this.configPromise=new Promise(i=>{this.resolveConfigPromise=i})}loadConfig(){return this.http.get("./assets/config.json")}setConfig(t){this.config=t;let o=t?.cloudName?.trim(),i=document.location?.pathname?.match(/\/([^\/]+)/)?.[1];this.cloudNameFromPath=o||i||"",this.configLoaded=!0,this.resolveConfigPromise()}ready(){return n(this,null,function*(){this.configLoaded||(yield this.configPromise)})}getConfig(){return this.config}get protocol(){return this.config?.protocol||"https://"}get baseFolder(){let t=this.cloudName;return this.config?.cloudName?this.config?.base_folder:document.location.port==="4200"?(this.config?.base_folder||"")+t+"":`${document.location.host}/`+t+""}get cloudName(){return this.cloudNameFromPath||this.config?.cloudName||""}get componentName(){return this.config?.cloudName?this.config?.COMPONENT_NAME:`${this.cloudName||""}${this.config?.COMPONENT_NAME||""}`}get commonUrl(){return this.config?.commonUrl||""}get ragBasePath(){return this.config?.rag_base_path||{}}static{this.\u0275fac=function(o){return new(o||e)(r(c),r(a))}}static{this.\u0275prov=s({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();export{g as a};
